@ggui-ai/console 0.12.0 → 0.13.0
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.
|
@@ -69,7 +69,7 @@ Error generating stack: `+e.message+`
|
|
|
69
69
|
|
|
70
70
|
`)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=rt,s=!Ue.jitless,c=s&&it.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?Or([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function jr(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!yt(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Ct(e,r,We())))}),t)}var Mr=A(`$ZodUnion`,(e,t)=>{Un.init(e,t),j(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),j(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),j(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),j(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>Ye(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>jr(t,r,e,i)):jr(o,r,e,i)}}),Nr=A(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,Mr.init(e,t);let n=e._zod.parse;j(e._zod,`propValues`,()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(let r of n)e[t].add(r)}}return e});let r=qe(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!rt(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()),input:o,path:[t.discriminator],inst:e}),i)}}),Pr=A(`$ZodIntersection`,(e,t)=>{Un.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>Ir(e,t,n)):Ir(e,i,a)}});function Fr(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(at(e)&&at(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=Fr(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=Fr(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Ir(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),yt(e))return e;let o=Fr(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var Lr=A(`$ZodRecord`,(e,t)=>{Un.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!at(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[],o=t.keyType._zod.values;if(o){n.value={};let s=new Set;for(let c of o)if(typeof c==`string`||typeof c==`number`||typeof c==`symbol`){s.add(typeof c==`number`?c.toString():c);let o=t.keyType._zod.run({value:c,issues:[]},r);if(o instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(o.issues.length){n.issues.push({code:`invalid_key`,origin:`record`,issues:o.issues.map(e=>Ct(e,r,We())),input:c,path:[c],inst:e});continue}let l=o.value,u=t.valueType._zod.run({value:i[c],issues:[]},r);u instanceof Promise?a.push(u.then(e=>{e.issues.length&&n.issues.push(...xt(c,e.issues)),n.value[l]=e.value})):(u.issues.length&&n.issues.push(...xt(c,u.issues)),n.value[l]=u.value)}let c;for(let e in i)s.has(e)||(c??=[],c.push(e));c&&c.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:c})}else{n.value={};for(let o of Reflect.ownKeys(i)){if(o===`__proto__`||!Object.prototype.propertyIsEnumerable.call(i,o))continue;let s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof o==`string`&&yn.test(o)&&s.issues.length){let e=t.keyType._zod.run({value:Number(o),issues:[]},r);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(s=e)}if(s.issues.length){t.mode===`loose`?n.value[o]=i[o]:n.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>Ct(e,r,We())),input:o,path:[o],inst:e});continue}let c=t.valueType._zod.run({value:i[o],issues:[]},r);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&n.issues.push(...xt(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...xt(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),Rr=A(`$ZodEnum`,(e,t)=>{Un.init(e,t);let n=Ge(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>st.has(typeof e)).map(e=>typeof e==`string`?ct(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),zr=A(`$ZodLiteral`,(e,t)=>{if(Un.init(e,t),t.values.length===0)throw Error(`Cannot create literal schema with no valid values`);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?ct(e):e?ct(e.toString()):String(e)).join(`|`)})$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),Br=A(`$ZodTransform`,(e,t)=>{Un.init(e,t),e._zod.optin=`optional`,e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new He(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n.fallback=!0,n));if(i instanceof Promise)throw new Ve;return n.value=i,n.fallback=!0,n}});function Vr(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var Hr=A(`$ZodOptional`,(e,t)=>{Un.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,j(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),j(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${Ye(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=e.value,i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(e=>Vr(e,r)):Vr(i,r)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),Ur=A(`$ZodExactOptional`,(e,t)=>{Hr.init(e,t),j(e._zod,`values`,()=>t.innerType._zod.values),j(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Wr=A(`$ZodNullable`,(e,t)=>{Un.init(e,t),j(e._zod,`optin`,()=>t.innerType._zod.optin),j(e._zod,`optout`,()=>t.innerType._zod.optout),j(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${Ye(e.source)}|null)$`):void 0}),j(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),Gr=A(`$ZodDefault`,(e,t)=>{Un.init(e,t),e._zod.optin=`optional`,j(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Kr(e,t)):Kr(r,t)}});function Kr(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var qr=A(`$ZodPrefault`,(e,t)=>{Un.init(e,t),e._zod.optin=`optional`,j(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Jr=A(`$ZodNonOptional`,(e,t)=>{Un.init(e,t),j(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Yr(t,e)):Yr(i,e)}});function Yr(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var Xr=A(`$ZodCatch`,(e,t)=>{Un.init(e,t),e._zod.optin=`optional`,j(e._zod,`optout`,()=>t.innerType._zod.optout),j(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Ct(e,n,We()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Ct(e,n,We()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),Zr=A(`$ZodPipe`,(e,t)=>{Un.init(e,t),j(e._zod,`values`,()=>t.in._zod.values),j(e._zod,`optin`,()=>t.in._zod.optin),j(e._zod,`optout`,()=>t.out._zod.optout),j(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Qr(e,t.in,n)):Qr(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Qr(e,t.out,n)):Qr(r,t.out,n)}});function Qr(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var $r=A(`$ZodReadonly`,(e,t)=>{Un.init(e,t),j(e._zod,`propValues`,()=>t.innerType._zod.propValues),j(e._zod,`values`,()=>t.innerType._zod.values),j(e._zod,`optin`,()=>t.innerType?._zod?.optin),j(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(ei):ei(r)}});function ei(e){return e.value=Object.freeze(e.value),e}var ti=A(`$ZodLazy`,(e,t)=>{Un.init(e,t),j(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),j(e._zod,`pattern`,()=>e._zod.innerType?._zod?.pattern),j(e._zod,`propValues`,()=>e._zod.innerType?._zod?.propValues),j(e._zod,`optin`,()=>e._zod.innerType?._zod?.optin??void 0),j(e._zod,`optout`,()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),ni=A(`$ZodCustom`,(e,t)=>{wn.init(e,t),Un.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>ri(t,n,r,e));ri(i,n,r,e)}});function ri(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Tt(e))}}var ii,ai=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function oi(){return new ai}(ii=globalThis).__zod_globalRegistry??(ii.__zod_globalRegistry=oi());var si=globalThis.__zod_globalRegistry;function ci(e,t){return new e({type:`string`,...M(t)})}function li(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...M(t)})}function ui(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...M(t)})}function di(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...M(t)})}function fi(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...M(t)})}function pi(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...M(t)})}function mi(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...M(t)})}function hi(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...M(t)})}function gi(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...M(t)})}function _i(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...M(t)})}function vi(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...M(t)})}function yi(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...M(t)})}function bi(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...M(t)})}function xi(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...M(t)})}function Si(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...M(t)})}function Ci(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...M(t)})}function wi(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...M(t)})}function Ti(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...M(t)})}function Ei(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...M(t)})}function Di(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...M(t)})}function Oi(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...M(t)})}function ki(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...M(t)})}function Ai(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...M(t)})}function ji(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...M(t)})}function Mi(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...M(t)})}function Ni(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...M(t)})}function Pi(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...M(t)})}function Fi(e,t){return new e({type:`number`,checks:[],...M(t)})}function Ii(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...M(t)})}function Li(e,t){return new e({type:`boolean`,...M(t)})}function Ri(e,t){return new e({type:`null`,...M(t)})}function zi(e){return new e({type:`unknown`})}function Bi(e,t){return new e({type:`never`,...M(t)})}function N(e,t){return new En({check:`less_than`,...M(t),value:e,inclusive:!1})}function Vi(e,t){return new En({check:`less_than`,...M(t),value:e,inclusive:!0})}function Hi(e,t){return new Dn({check:`greater_than`,...M(t),value:e,inclusive:!1})}function Ui(e,t){return new Dn({check:`greater_than`,...M(t),value:e,inclusive:!0})}function Wi(e,t){return new On({check:`multiple_of`,...M(t),value:e})}function Gi(e,t){return new An({check:`max_length`,...M(t),maximum:e})}function Ki(e,t){return new jn({check:`min_length`,...M(t),minimum:e})}function qi(e,t){return new Mn({check:`length_equals`,...M(t),length:e})}function Ji(e,t){return new Pn({check:`string_format`,format:`regex`,...M(t),pattern:e})}function Yi(e){return new Fn({check:`string_format`,format:`lowercase`,...M(e)})}function Xi(e){return new In({check:`string_format`,format:`uppercase`,...M(e)})}function Zi(e,t){return new Ln({check:`string_format`,format:`includes`,...M(t),includes:e})}function Qi(e,t){return new Rn({check:`string_format`,format:`starts_with`,...M(t),prefix:e})}function $i(e,t){return new zn({check:`string_format`,format:`ends_with`,...M(t),suffix:e})}function ea(e){return new Bn({check:`overwrite`,tx:e})}function ta(e){return ea(t=>t.normalize(e))}function na(){return ea(e=>e.trim())}function ra(){return ea(e=>e.toLowerCase())}function ia(){return ea(e=>e.toUpperCase())}function aa(){return ea(e=>tt(e))}function oa(e,t,n){return new e({type:`array`,element:t,...M(n)})}function sa(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...M(n)})}function ca(e,t){let n=la(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(Tt(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=t.value,r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(Tt(r))}},e(t.value,t)),t);return n}function la(e,t){let n=new wn({check:`custom`,...M(t)});return n._zod.check=e,n}function ua(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??si,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function da(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,da(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&ma(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function fa(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
71
71
|
|
|
72
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function pa(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:ga(t,`input`,e.processors),output:ga(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function ma(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return ma(r.element,n);if(r.type===`set`)return ma(r.valueType,n);if(r.type===`lazy`)return ma(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`)return ma(r.innerType,n);if(r.type===`intersection`)return ma(r.left,n)||ma(r.right,n);if(r.type===`record`||r.type===`map`)return ma(r.keyType,n)||ma(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:ma(r.in,n)||ma(r.out,n);if(r.type===`object`){for(let e in r.shape)if(ma(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(ma(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(ma(e,n))return!0;return!!(r.rest&&ma(r.rest,n))}return!1}var ha=(e,t={})=>n=>{let r=ua({...n,processors:t});return da(e,r),fa(r,e),pa(r,e)},ga=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=ua({...i??{},target:a,io:t,processors:n});return da(e,o),fa(o,e),pa(o,e)},_a={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},va=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=_a[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},ya=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;i.type=typeof s==`string`&&s.includes(`int`)?`integer`:`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(i.multipleOf=c)},ba=(e,t,n,r)=>{n.type=`boolean`},xa=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},Sa=(e,t,n,r)=>{n.not={}},Ca=(e,t,n,r)=>{let i=e._zod.def,a=Ge(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},wa=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},Ta=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},Ea=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},Da=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=da(a.element,t,{...r,path:[...r.path,`items`]})},Oa=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=da(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=da(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},ka=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>da(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Aa=(e,t,n,r)=>{let i=e._zod.def,a=da(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=da(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},ja=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=da(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else(t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=da(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=da(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},Ma=(e,t,n,r)=>{let i=e._zod.def,a=da(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},Na=(e,t,n,r)=>{let i=e._zod.def;da(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Pa=(e,t,n,r)=>{let i=e._zod.def;da(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},Fa=(e,t,n,r)=>{let i=e._zod.def;da(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},Ia=(e,t,n,r)=>{let i=e._zod.def;da(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},La=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;da(o,t,r);let s=t.seen.get(e);s.ref=o},Ra=(e,t,n,r)=>{let i=e._zod.def;da(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},za=(e,t,n,r)=>{let i=e._zod.def;da(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Ba=(e,t,n,r)=>{let i=e._zod.innerType;da(i,t,r);let a=t.seen.get(e);a.ref=i},Va=A(`ZodISODateTime`,(e,t)=>{rr.init(e,t),I.init(e,t)});function Ha(e){return ji(Va,e)}var Ua=A(`ZodISODate`,(e,t)=>{ir.init(e,t),I.init(e,t)});function Wa(e){return Mi(Ua,e)}var Ga=A(`ZodISOTime`,(e,t)=>{ar.init(e,t),I.init(e,t)});function Ka(e){return Ni(Ga,e)}var qa=A(`ZodISODuration`,(e,t)=>{or.init(e,t),I.init(e,t)});function Ja(e){return Pi(qa,e)}var Ya=A(`ZodError`,(e,t)=>{Dt.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>At(e,t)},flatten:{value:t=>kt(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Ke,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Ke,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),Xa=jt(Ya),Za=Mt(Ya),Qa=Nt(Ya),$a=Ft(Ya),eo=Lt(Ya),to=Rt(Ya),no=zt(Ya),ro=Bt(Ya),io=Vt(Ya),ao=Ht(Ya),oo=Ut(Ya),so=Wt(Ya),co=new WeakMap;function lo(e,t,n){let r=Object.getPrototypeOf(e),i=co.get(r);if(i||(i=new Set,co.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}var P=A(`ZodType`,(e,t)=>(Un.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:ga(e,`input`),output:ga(e,`output`)}}),e.toJSONSchema=ha(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>Xa(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Qa(e,t,n),e.parseAsync=async(t,n)=>Za(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>$a(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>eo(e,t,n),e.decode=(t,n)=>to(e,t,n),e.encodeAsync=async(t,n)=>no(e,t,n),e.decodeAsync=async(t,n)=>ro(e,t,n),e.safeEncode=(t,n)=>io(e,t,n),e.safeDecode=(t,n)=>ao(e,t,n),e.safeEncodeAsync=async(t,n)=>oo(e,t,n),e.safeDecodeAsync=async(t,n)=>so(e,t,n),lo(e,`ZodType`,{check(...e){let t=this.def;return this.clone($e(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return lt(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Es(e,t))},superRefine(e,t){return this.check(Ds(e,t))},overwrite(e){return this.check(ea(e))},optional(){return os(this)},exactOptional(){return cs(this)},nullable(){return us(this)},nullish(){return os(us(this))},nonoptional(e){return gs(this,e)},array(){return Wo(this)},or(e){return qo([this,e])},and(e){return Zo(this,e)},transform(e){return bs(this,is(e))},default(e){return fs(this,e)},prefault(e){return ms(this,e)},catch(e){return vs(this,e)},pipe(e){return bs(this,e)},readonly(){return Ss(this)},describe(e){let t=this.clone();return si.add(t,{description:e}),t},meta(...e){if(e.length===0)return si.get(this);let t=this.clone();return si.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get(){return si.get(e)?.description},configurable:!0}),e)),uo=A(`_ZodString`,(e,t)=>{Wn.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>va(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,lo(e,`_ZodString`,{regex(...e){return this.check(Ji(...e))},includes(...e){return this.check(Zi(...e))},startsWith(...e){return this.check(Qi(...e))},endsWith(...e){return this.check($i(...e))},min(...e){return this.check(Ki(...e))},max(...e){return this.check(Gi(...e))},length(...e){return this.check(qi(...e))},nonempty(...e){return this.check(Ki(1,...e))},lowercase(e){return this.check(Yi(e))},uppercase(e){return this.check(Xi(e))},trim(){return this.check(na())},normalize(...e){return this.check(ta(...e))},toLowerCase(){return this.check(ra())},toUpperCase(){return this.check(ia())},slugify(){return this.check(aa())}})}),fo=A(`ZodString`,(e,t)=>{Wn.init(e,t),uo.init(e,t),e.email=t=>e.check(li(po,t)),e.url=t=>e.check(hi(go,t)),e.jwt=t=>e.check(Ai(jo,t)),e.emoji=t=>e.check(gi(_o,t)),e.guid=t=>e.check(ui(mo,t)),e.uuid=t=>e.check(di(ho,t)),e.uuidv4=t=>e.check(fi(ho,t)),e.uuidv6=t=>e.check(pi(ho,t)),e.uuidv7=t=>e.check(mi(ho,t)),e.nanoid=t=>e.check(_i(vo,t)),e.guid=t=>e.check(ui(mo,t)),e.cuid=t=>e.check(vi(yo,t)),e.cuid2=t=>e.check(yi(bo,t)),e.ulid=t=>e.check(bi(xo,t)),e.base64=t=>e.check(Di(Oo,t)),e.base64url=t=>e.check(Oi(ko,t)),e.xid=t=>e.check(xi(So,t)),e.ksuid=t=>e.check(Si(Co,t)),e.ipv4=t=>e.check(Ci(wo,t)),e.ipv6=t=>e.check(wi(To,t)),e.cidrv4=t=>e.check(Ti(Eo,t)),e.cidrv6=t=>e.check(Ei(Do,t)),e.e164=t=>e.check(ki(Ao,t)),e.datetime=t=>e.check(Ha(t)),e.date=t=>e.check(Wa(t)),e.time=t=>e.check(Ka(t)),e.duration=t=>e.check(Ja(t))});function F(e){return ci(fo,e)}var I=A(`ZodStringFormat`,(e,t)=>{Gn.init(e,t),uo.init(e,t)}),po=A(`ZodEmail`,(e,t)=>{Jn.init(e,t),I.init(e,t)}),mo=A(`ZodGUID`,(e,t)=>{Kn.init(e,t),I.init(e,t)}),ho=A(`ZodUUID`,(e,t)=>{qn.init(e,t),I.init(e,t)}),go=A(`ZodURL`,(e,t)=>{Yn.init(e,t),I.init(e,t)});function L(e){return hi(go,e)}var _o=A(`ZodEmoji`,(e,t)=>{Xn.init(e,t),I.init(e,t)}),vo=A(`ZodNanoID`,(e,t)=>{Zn.init(e,t),I.init(e,t)}),yo=A(`ZodCUID`,(e,t)=>{Qn.init(e,t),I.init(e,t)}),bo=A(`ZodCUID2`,(e,t)=>{$n.init(e,t),I.init(e,t)}),xo=A(`ZodULID`,(e,t)=>{er.init(e,t),I.init(e,t)}),So=A(`ZodXID`,(e,t)=>{tr.init(e,t),I.init(e,t)}),Co=A(`ZodKSUID`,(e,t)=>{nr.init(e,t),I.init(e,t)}),wo=A(`ZodIPv4`,(e,t)=>{sr.init(e,t),I.init(e,t)}),To=A(`ZodIPv6`,(e,t)=>{cr.init(e,t),I.init(e,t)}),Eo=A(`ZodCIDRv4`,(e,t)=>{lr.init(e,t),I.init(e,t)}),Do=A(`ZodCIDRv6`,(e,t)=>{ur.init(e,t),I.init(e,t)}),Oo=A(`ZodBase64`,(e,t)=>{fr.init(e,t),I.init(e,t)}),ko=A(`ZodBase64URL`,(e,t)=>{mr.init(e,t),I.init(e,t)}),Ao=A(`ZodE164`,(e,t)=>{hr.init(e,t),I.init(e,t)}),jo=A(`ZodJWT`,(e,t)=>{_r.init(e,t),I.init(e,t)}),Mo=A(`ZodNumber`,(e,t)=>{vr.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ya(e,t,n,r),lo(e,`ZodNumber`,{gt(e,t){return this.check(Hi(e,t))},gte(e,t){return this.check(Ui(e,t))},min(e,t){return this.check(Ui(e,t))},lt(e,t){return this.check(N(e,t))},lte(e,t){return this.check(Vi(e,t))},max(e,t){return this.check(Vi(e,t))},int(e){return this.check(Po(e))},safe(e){return this.check(Po(e))},positive(e){return this.check(Hi(0,e))},nonnegative(e){return this.check(Ui(0,e))},negative(e){return this.check(N(0,e))},nonpositive(e){return this.check(Vi(0,e))},multipleOf(e,t){return this.check(Wi(e,t))},step(e,t){return this.check(Wi(e,t))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function R(e){return Fi(Mo,e)}var No=A(`ZodNumberFormat`,(e,t)=>{yr.init(e,t),Mo.init(e,t)});function Po(e){return Ii(No,e)}var Fo=A(`ZodBoolean`,(e,t)=>{br.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ba(e,t,n,r)});function Io(e){return Li(Fo,e)}var Lo=A(`ZodNull`,(e,t)=>{xr.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xa(e,t,n,r)});function Ro(e){return Ri(Lo,e)}var zo=A(`ZodUnknown`,(e,t)=>{Sr.init(e,t),P.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Bo(){return zi(zo)}var Vo=A(`ZodNever`,(e,t)=>{Cr.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Sa(e,t,n,r)});function Ho(e){return Bi(Vo,e)}var Uo=A(`ZodArray`,(e,t)=>{Tr.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Da(e,t,n,r),e.element=t.element,lo(e,`ZodArray`,{min(e,t){return this.check(Ki(e,t))},nonempty(e){return this.check(Ki(1,e))},max(e,t){return this.check(Gi(e,t))},length(e,t){return this.check(qi(e,t))},unwrap(){return this.element}})});function Wo(e,t){return oa(Uo,e,t)}var Go=A(`ZodObject`,(e,t)=>{Ar.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Oa(e,t,n,r),j(e,`shape`,()=>t.shape),lo(e,`ZodObject`,{keyof(){return ts(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:Bo()})},loose(){return this.clone({...this._zod.def,catchall:Bo()})},strict(){return this.clone({...this._zod.def,catchall:Ho()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return mt(this,e)},safeExtend(e){return ht(this,e)},merge(e){return gt(this,e)},pick(e){return ft(this,e)},omit(e){return pt(this,e)},partial(...e){return _t(as,this,e[0])},required(...e){return vt(hs,this,e[0])}})});function z(e,t){return new Go({type:`object`,shape:e??{},...M(t)})}var Ko=A(`ZodUnion`,(e,t)=>{Mr.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ka(e,t,n,r),e.options=t.options});function qo(e,t){return new Ko({type:`union`,options:e,...M(t)})}var Jo=A(`ZodDiscriminatedUnion`,(e,t)=>{Ko.init(e,t),Nr.init(e,t)});function Yo(e,t,n){return new Jo({type:`union`,options:t,discriminator:e,...M(n)})}var Xo=A(`ZodIntersection`,(e,t)=>{Pr.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Aa(e,t,n,r)});function Zo(e,t){return new Xo({type:`intersection`,left:e,right:t})}var Qo=A(`ZodRecord`,(e,t)=>{Lr.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ja(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function $o(e,t,n){return!t||!t._zod?new Qo({type:`record`,keyType:F(),valueType:e,...M(t)}):new Qo({type:`record`,keyType:e,valueType:t,...M(n)})}var es=A(`ZodEnum`,(e,t)=>{Rr.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ca(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new es({...t,checks:[],...M(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new es({...t,checks:[],...M(r),entries:i})}});function ts(e,t){return new es({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...M(t)})}var ns=A(`ZodLiteral`,(e,t)=>{zr.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wa(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function B(e,t){return new ns({type:`literal`,values:Array.isArray(e)?e:[e],...M(t)})}var rs=A(`ZodTransform`,(e,t)=>{Br.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ea(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new He(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Tt(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(Tt(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}});function is(e){return new rs({type:`transform`,transform:e})}var as=A(`ZodOptional`,(e,t)=>{Hr.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>za(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function os(e){return new as({type:`optional`,innerType:e})}var ss=A(`ZodExactOptional`,(e,t)=>{Ur.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>za(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function cs(e){return new ss({type:`optional`,innerType:e})}var ls=A(`ZodNullable`,(e,t)=>{Wr.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ma(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function us(e){return new ls({type:`nullable`,innerType:e})}var ds=A(`ZodDefault`,(e,t)=>{Gr.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Pa(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function fs(e,t){return new ds({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():ot(t)}})}var ps=A(`ZodPrefault`,(e,t)=>{qr.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Fa(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ms(e,t){return new ps({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():ot(t)}})}var hs=A(`ZodNonOptional`,(e,t)=>{Jr.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Na(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function gs(e,t){return new hs({type:`nonoptional`,innerType:e,...M(t)})}var _s=A(`ZodCatch`,(e,t)=>{Xr.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ia(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function vs(e,t){return new _s({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var ys=A(`ZodPipe`,(e,t)=>{Zr.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>La(e,t,n,r),e.in=t.in,e.out=t.out});function bs(e,t){return new ys({type:`pipe`,in:e,out:t})}var xs=A(`ZodReadonly`,(e,t)=>{$r.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ra(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ss(e){return new xs({type:`readonly`,innerType:e})}var Cs=A(`ZodLazy`,(e,t)=>{ti.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ba(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function ws(e){return new Cs({type:`lazy`,getter:e})}var Ts=A(`ZodCustom`,(e,t)=>{ni.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ta(e,t,n,r)});function Es(e,t={}){return sa(Ts,e,t)}function Ds(e,t){return ca(e,t)}Object.freeze(new Set([{package:`@ggui-ai/gadgets`,version:`0.12.0`,exports:[{hook:`useCamera`,permission:`camera`,description:`Capture stills or live video from the device camera.`,usage:"Mount when the intent names photo capture, QR / barcode scanning, video recording, or anything that requires a camera feed. The hook returns a stream once `start()` resolves; thread the resulting blob or stream URL into a contextSpec slot or an actionSpec payload to surface it to the agent.",example:{call:`const cam = useCamera({ facingMode: 'environment' }); // on button click: await cam.start()`,returns:{status:`completed`,value:{dataUrl:`data:image/png;base64,…`,width:640,height:480,mimeType:`image/png`}}}},{hook:`useClipboardPaste`,permission:`clipboard-read`,description:`Read the system clipboard contents on user gesture.`,usage:"Mount when the intent involves importing copied content (paste-into-form, paste-image-to-upload, paste-link). The Permissions API requires a user gesture; gate `start()` behind a button click. Returned value lands in a contextSpec slot or an actionSpec payload.",example:{call:`const paste = useClipboardPaste(); // on button click: await paste.start()`,returns:{status:`completed`,value:`pasted clipboard text`}}},{hook:`useClipboardWrite`,permission:`clipboard-write`,description:`Write to the system clipboard on user gesture.`,usage:`Mount when the intent includes copying generated text, share links, codes, or transcripts to the system clipboard. Fire an actionSpec event so the agent observes the act (it does not see the written value — that stays component-local).`,example:{call:`const write = useClipboardWrite({ text: 'hello' }); // on button click: await write.start()`,returns:{status:`completed`,value:`hello`}}},{hook:`useFilePicker`,description:`Open the native file picker and read selected files.`,usage:`Mount when the intent names file upload, attachment selection, or document import. No permission required. The hook returns the picked files plus metadata; thread file refs / data URLs into a contextSpec slot or actionSpec payload.`,example:{call:`const picker = useFilePicker({ accept: 'image/*' }); // on button click: await picker.start()`,returns:{status:`completed`,value:{files:[{name:`photo.png`,type:`image/png`,size:12345,_file:`<File>`}]}}}},{hook:`useGeolocation`,permission:`geolocation`,description:`Resolve the device's current geolocation.`,usage:'Mount when the intent names "current location", maps, nearby search, location-aware UI. Browser prompts the user on `start()`; the hook returns coordinates once granted. Thread the resolved coords into a contextSpec slot so the agent observes the latest fix.',example:{call:`const geo = useGeolocation(); // on button click: await geo.start()`,returns:{status:`completed`,value:{latitude:37.7749,longitude:-122.4194,accuracy:20,timestamp:1718e9}}}},{hook:`useMicrophone`,permission:`microphone`,description:`Capture audio from the device microphone.`,usage:`Mount when the intent names voice memos, audio messages, dictation, voice-driven UI. Returns an audio stream / blob; thread it into an actionSpec payload at recording-stop, or into a contextSpec slot for live transcription pipelines.`,example:{call:`const mic = useMicrophone(); // record on click: await mic.start(); end with mic.stop()`,returns:{status:`completed`,value:{blob:`<Blob>`,durationMs:4200,mimeType:`audio/webm`}}}},{hook:`useNotifications`,permission:`notifications`,description:`Show system / browser notifications to the user.`,usage:"Mount when the intent involves alerting the user about something (reminders, completion of long tasks, incoming messages) and the UI may be in the background. Permission is prompted on first `start()`; the agent does NOT see notification dismissal directly — surface it via an actionSpec if needed.",example:{call:`const notify = useNotifications({ title: 'Done' }); // after the task completes: await notify.start()`,returns:{status:`completed`,value:{outcome:`closed`}}}}]}].flatMap(e=>e.exports).map(e=>e.hook).filter(e=>e!==void 0)));var Os=/^use[A-Z][A-Za-z0-9]*$/,ks=/^[A-Z][A-Za-z0-9]*$/,As=[`geolocation`,`notifications`,`microphone`,`camera`,`persistent-storage`,`midi`,`clipboard-read`,`clipboard-write`,`speaker-selection`,`storage-access`,`background-sync`,`accelerometer`,`gyroscope`,`magnetometer`,`ambient-light-sensor`,`screen-wake-lock`];new Set(As);var js=ws(()=>qo([F(),R(),Io(),Ro(),Wo(js),$o(F(),js)])),Ms=ts([`string`,`number`,`integer`,`boolean`,`array`,`object`,`null`]),Ns=ws(()=>z({type:qo([Ms,Wo(Ms)]).optional(),description:F().optional(),enum:Wo(js).optional(),default:js.optional(),example:js.optional(),items:Ns.optional(),properties:$o(F(),Ns).optional(),required:Wo(F()).optional(),additionalProperties:qo([Ns,Io()]).optional(),format:F().optional()}).passthrough()),Ps=z({description:F().optional(),schema:Ns,required:Io().optional(),default:js.optional(),example:js.optional(),sourceTool:F().optional()}).strict(),Fs=z({description:F().optional(),properties:$o(F(),Ps)}).strict(),Is=z({description:F().optional(),label:F(),schema:Ns.optional(),example:js.optional(),icon:F().optional(),confirm:Io().optional(),nextStep:F().min(1).optional()}).strict(),Ls=$o(F(),Is),Rs=z({description:F().optional(),schema:Ns,example:js.optional(),mode:ts([`append`,`replace`]).optional(),replay:ts([`latest`,`all`,`none`]).optional(),complete:Io().optional(),source:z({tool:F(),args:$o(F(),js).optional()}).strict().optional()}).strict(),zs=$o(F(),Rs),Bs=z({description:F().optional(),schema:Ns,default:js.optional(),debounceMs:R().int().nonnegative().optional(),example:js.optional()}).strict(),Vs=$o(F(),Bs),Hs=z({serverInfo:z({name:F(),version:F().optional()}).strict().optional(),toolInfo:z({inputSchema:Ns,description:F().optional(),outputSchema:Ns.optional()}).strict(),usage:F().optional(),example:z({input:js,output:js}).strict().optional()}).strict(),Us=z({tools:$o(F(),Hs)}).passthrough(),Ws=/^GGUI_PUBLIC_APP_[A-Z0-9_]+$/,Gs=Wo(F().regex(Ws)).readonly(),Ks=/^sha384-[A-Za-z0-9+/]+=*$/,qs=/^(?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*$/,Js=/^\d+\.\d+\.\d+(-[\w.]+)?(\+[\w.]+)?$/,Ys=/^[a-z0-9.-]+(:\d+)?$/,Xs={gotchas:F().optional()},Zs={...Xs,description:F().optional(),usage:F().optional(),example:js.optional(),permission:F().optional()},Qs={...Xs,description:F().min(1),usage:F().min(1),example:js,permission:ts(As).optional()},$s={version:F().regex(Js),package:F().regex(qs),bundleUrl:L().optional(),bundleHost:F().regex(Ys).optional(),bundleSri:F().regex(Ks).optional(),styleUrl:L().optional(),connect:Wo(L()).readonly().optional(),requires:Gs.optional(),typesUrl:L().optional(),typesSri:F().regex(Ks).optional()},ec=qo([z({hook:F().regex(Os),...Zs}).strict(),z({component:F().regex(ks),...Zs}).strict()]),tc=qo([z({hook:F().regex(Os),...Qs}).strict(),z({component:F().regex(ks),...Qs}).strict()]);z({...$s,exports:Wo(ec).min(1)}).strict(),z({...$s,exports:Wo(tc).min(1)}).strict().refine(e=>e.package===`@ggui-ai/gadgets`||typeof e.typesUrl==`string`,{message:"registered GadgetDescriptor MUST declare a `typesUrl` (HTTPS URL to the package's .d.ts) — the code-gen sandbox loads it to typecheck generated component code against the export signatures. Run `tsup --dts` (or `tsc --declaration`) in the wrapper build and publish the emitted .d.ts. Only the first-party `@ggui-ai/gadgets` stdlib is exempt.",path:[`typesUrl`]});var nc=z({description:F().optional(),usage:F().optional()}).strict(),rc=$o(F().refine(e=>Os.test(e)||ks.test(e),{message:"gadget export name must be a `use`-prefixed hook or a PascalCase component identifier"}),nc).refine(e=>Object.keys(e).length>0,{message:"a `clientCapabilities.gadgets` package entry must declare at least one export"}),ic=z({gadgets:$o(F().regex(qs),rc)}).strict();$o(F().regex(Ws),F()).readonly();var ac=z({propsSpec:Fs.optional().describe("Initial render data: {description?, properties: {<name>: {schema: <JSON Schema>, required?: boolean, description?, default?, example?}}}. A prop is required at the wire gate ONLY when `required: true`; omitted ⇒ optional (declare `required: true` for props the render must always pass)."),actionSpec:Ls.optional().describe("User gestures the agent reacts to on its next turn: {<action>: {label: string (REQUIRED — button copy / accessible name), schema?: <payload JSON Schema>, description?, example?, icon?, confirm?, nextStep?: '<agentCapabilities.tools key>'}}. Every action is agent-routed; `nextStep` is a hint, not a dispatch."),streamSpec:zs.optional().describe("Live update channels the agent emits into: {<channel>: {schema: <JSON Schema>, description?, example?, mode?: append|replace, replay?: latest|all|none, complete?, source?: {tool, args?}}}. `source.tool` must be declared in agentCapabilities.tools."),contextSpec:Vs.optional().describe(`Observable client state the agent reads alongside each action: {<slot>: {schema: <JSON Schema>, description?, default?, debounceMs?, example?}}. State that needs no next-turn reasoning belongs here, not in actionSpec.`),agentCapabilities:Us.optional().describe("MCP tools the AGENT may call: {tools: {<bareToolName>: {toolInfo: {inputSchema (REQUIRED), description?, outputSchema?}, serverInfo?: {name, version?}, usage?, example?: {input, output}}}}. Key by the BARE tool name (after any `mcp__<server>__` prefix); the component never calls these."),clientCapabilities:ic.optional().describe("Browser-capability gadgets the COMPONENT imports: {gadgets: {<npm package>: {<exportName>: {description?, usage?}}}} — `use`-prefixed export keys are hooks, PascalCase keys are components; version and transport resolve from the app's registered catalog, never on the wire.")}).passthrough(),oc=z({kind:B(`llm`),generator:F().min(1),model:F().min(1)}).strict(),sc=z({kind:B(`user`)}).strict(),cc=qo([oc,sc,z({kind:B(`curated`)}).strict()]),lc=[`persona`,`aesthetic`,`context`,`seedPrompt`],uc=z({persona:F().optional().describe(`Design persona, e.g. "minimalist" / "data-dense". Part of cache identity.`),aesthetic:F().optional().describe(`Visual aesthetic, e.g. "calm" / "ornate". Part of cache identity.`),context:$o(F(),js).optional().describe(`Deliberate design-shaping signals (e.g. {situation:"sad"}) — part of cache identity. NOT for per-user runtime data; put that in propsSpec/contextSpec.`),seedPrompt:F().optional().describe(`Generation seed directive. Part of cache identity.`)},{error:e=>e.code===`unrecognized_keys`?`variance: unknown key(s) ${e.keys.map(e=>JSON.stringify(e)).join(`, `)} — variance is EXACTLY {${lc.join(`, `)}}; put tonal intent in \`aesthetic\`, and per-user runtime data in props / contextSpec, never in variance`:void 0}).strict(),dc=z({blueprintId:F().min(1),contractHash:F().min(1),appId:F().min(1),codeS3Url:F().optional(),codeHash:F().optional(),source:cc,validatorScore:R().min(0).max(1).optional(),variance:uc,isOperatorDefault:B(!0).optional(),createdAt:F().min(1),createdBy:ts([`agent`,`operator`]),contract:ac,contractEmbedding:Wo(R()).optional()}).strict();z({weights:z({hash:R().min(0).optional(),embed:R().min(0).optional(),struct:R().min(0).optional(),variance:R().min(0).optional(),intent:R().min(0).optional()}).strict().optional(),threshold:R().min(0).max(1).optional(),topK:R().int().min(1).optional()}).strict();var fc=ts([`cache`,`agent`,`synth`]),pc=Wo(qo([z({op:B(`add`),path:F(),value:js}).strict(),z({op:B(`remove`),path:F()}).strict(),z({op:B(`replace`),path:F(),value:js}).strict()])),mc=[`contract`,`variance`,`generator`],hc=z({contract:ac,variance:uc.optional(),generator:F().optional()},{error:e=>e.code===`unrecognized_keys`?`blueprintDraft: unknown key(s) ${e.keys.map(e=>JSON.stringify(e)).join(`, `)} — a draft is EXACTLY {${mc.join(`, `)}}; \`intent\` is a top-level ggui_handshake field, not a draft field, and the four specs live INSIDE \`contract\``:void 0}).strict(),gc=z({blueprintId:F().min(1).optional(),contractHash:F().min(1),codeHash:F().optional(),source:cc.optional(),variance:uc,selectedReason:F().optional()}).strict(),_c=z({code:F().min(1),severity:ts([`error`,`warn`]),path:F(),message:F()}).strict(),vc=z({contractDiff:pc,reasoning:F()}).strict(),yc=z({origin:fc,rationale:F(),blueprintMeta:gc,proposedContractSummary:F().optional(),amendments:vc.optional(),validationFindings:Wo(_c).optional()}).strict(),bc=z({viewport:z({width:R(),height:R()}),platform:ts([`web`,`mobile`,`desktop`]),deviceType:ts([`phone`,`tablet`,`desktop`]),orientation:ts([`portrait`,`landscape`]),devicePixelRatio:R().optional(),touchPrimary:Io().optional(),shellType:ts([`chat`,`fullscreen`,`spatial`]).optional(),colorScheme:ts([`light`,`dark`]).optional(),reducedMotion:Io().optional()}).passthrough();z({sessionId:F().min(1).describe(`Globally-unique sessionId to consume events from. Cross-tenant access surfaces uniformly as session_not_found.`),timeout:R().int().min(0).max(25).optional().describe(`Inline long-poll seconds, integer in [0, 25]. 0 = immediate. Values outside the bound reject INVALID_PARAMS. Returns on first event OR timeout; re-call on empty to keep waiting — longer waits are your loop, not a bigger timeout.`)}),z({sessionId:F().min(1),channel:F().min(1),payload:Bo(),complete:Io().optional()}),z({sessionId:F().min(1).describe(`GguiSession opaque id (UUID) — returned by ggui_render.`)}),z({sessionId:F().min(1).describe(`GguiSession opaque id (UUID) — returned by ggui_render.`)}),z({}),z({query:F().min(1).describe(`Natural-language description of the UI you're looking for`),limit:R().int().min(1).max(100).optional(),tool:F().regex(/^[A-Za-z0-9_.-]{1,128}$/).optional().describe(`Filter registry-sourced candidates to artifacts declaring a binding for this exact MCP tool name (case-sensitive). Local results are unaffected.`),server:F().regex(/^[A-Za-z0-9_.-]{1,128}$/).optional().describe("Filter registry-sourced candidates to artifacts declaring a binding for this exact MCP server name (case-sensitive). Combine with `tool` to require the exact (server, tool) pair.")}),z({blueprintId:F().min(1).describe(`The stable blueprint id declared via ggui.ui.json#id. Must match an entry in this server's UI registry.`)}),z({}),z({intent:F().min(1).describe(`Concise purpose — same intent = same component reused. e.g. "Gmail inbox for email triage"`),blueprintDraft:hc.describe(`Agent's draft — a JSON OBJECT, never a JSON-encoded string (pass {contract: {...}}, not "{\\"contract\\":...}"; a string fails input validation with -32602). Fields: contract (required) + optional variance + optional generator slug hint. The server combines this with cached blueprints + validator outcomes to produce a three-mode suggestion (cache / agent / synth).`),forceCreate:Io().optional()}).strict(),z({handshakeId:F().describe(`Stable id — pass to ggui_render / ggui_update`),action:ts([`create`,`reuse`,`update`,`replace`,`declined`]),suggestion:yc.describe("Server's suggestion — origin-routed (cache | agent | synth). Always carries a provisional `blueprintMeta` the agent reuses by rendering WITHOUT `override` (accept the proposal as-is)."),reason:F().max(280).optional().describe("Short rationale (≤280 chars) for the `action` value. Surfaced for agent + operator visibility; truncated to keep the structuredContent payload predictable."),nextStep:z({tool:B(`ggui_render`),description:F(),example:F()}).optional().describe("Wire-shape recovery hint. A worked literal example of the next ggui_render call the agent should emit — the example string can be copied verbatim and tweaked (e.g. fill in `props` placeholders). Top-level field so a skimming agent finds it immediately.")}),z({handshakeId:F({message:`ggui_render: handshakeId is REQUIRED. Call ggui_handshake({intent, blueprintDraft}) first to negotiate — handshake returns a handshakeId + suggestion. Then render with {handshakeId, props} (accept the suggestion as-is) or {handshakeId, props, override: {contract?, variance?}} (re-aim the contract and/or variance). Direct-render without a handshakeId is not supported.`}).min(1,`ggui_render: handshakeId must be a non-empty string from a prior ggui_handshake call.`),props:$o(F(),Bo()),themeId:F().min(1).optional().describe(`Per-render theme override. Wins over App.defaultThemeId for THIS render. Omit to inherit the app theme.`),infra:z({model:F().min(1).optional().describe("Provider-prefixed model id (e.g., `anthropic/claude-haiku-4-5`, `openai/gpt-5`). Generator-specific prefixes (e.g., `bedrock/...` for AWS Bedrock routing) supported when the bound generator handles them.")}).strict().optional(),override:z({contract:ac.optional().describe(`STRICT full re-draft of the contract — must already conform; the server will not repair it.`),variance:uc.optional().describe(`Re-aim the variant (persona/aesthetic/context/seedPrompt); keeps the agreed contract.`)}).strict().refine(e=>e.contract!==void 0||e.variance!==void 0,{message:`override must set contract and/or variance — omit override entirely to ACCEPT the handshake proposal as-is.`}).optional().describe(`Omit to ACCEPT the proposal as-is. Provide to re-aim contract and/or variance (PATCH semantics).`)});var xc=z({hit:Io().describe(`True when a stored component was served without generating new code.`),similarity:R().optional().describe(`Cosine similarity of the matched component to the request (semantic match only).`),cachedBlueprintId:F().optional().describe(`The stored component id that was matched. Equals top-level blueprintId on a hit.`),llmCallsAvoided:R().describe(`Generation calls skipped by serving the stored component (0 on a fresh generation).`),kind:ts([`full-template`,`cold`]).optional().describe(`full-template = a whole stored component was served; cold = freshly generated.`),reason:F().optional().describe(`Compact human-readable explanation of the cache outcome — why this render reused a stored component or generated cold. Diagnostic; default-available without the verbose env-gated trace.`)}),Sc=z({code:ts([`PRODUCTION_FAILED`,`VALIDATION_ERROR`,`NO_PLATFORM_KEY`,`NO_CREDENTIALS`,`GENERATION_QUEUE_OVERLOADED`]).describe(`Canonical failure class. PRODUCTION_FAILED: generation did not produce a component. VALIDATION_ERROR: a server-side precondition rejected the render before generation. NO_PLATFORM_KEY: the server's managed provider-key configuration has no key for the resolved route. NO_CREDENTIALS: no generation credentials are configured on the server. GENERATION_QUEUE_OVERLOADED: the deployment's admission gate rejected the request before generation started (queue full or wait timed out) — not a failed attempt; safe to retry immediately.`),message:F().describe(`Human-readable failure detail — fold into the next attempt or surface to the operator.`)});z({code:ts([`NOT_FOUND`,`BLUEPRINT_UNRESOLVABLE`,`NOT_SUPPORTED`,`NOT_MOUNTABLE`]).describe(`Canonical failure class. NOT_FOUND: no live render and no restorable record (also the response when the caller may not read this locator). BLUEPRINT_UNRESOLVABLE: a record exists but the component behind it is gone. NOT_SUPPORTED: this server keeps no durable record, so an evicted locator can never be restored. NOT_MOUNTABLE: the render resolved but no delivery channel is available.`),message:F().describe(`Human-readable failure detail. Replaced by a constant on NOT_FOUND.`),detail:F().optional().describe(`Extra diagnostic context for operators. Dropped on NOT_FOUND so a denied read cannot be told apart from a miss.`)}),z({sessionId:F(),resourceUri:F().optional().describe(`MCP-Apps mount URI (ui://ggui/render/{id}). Present iff the render is mountable; absent on a failed render.`),action:ts([`create`,`reuse`,`update`,`replace`,`declined`]),contractHash:F().describe(`Canonical hash of the rendered data contract (shape only — fields, types, specs). Same hash ⟺ same data flow.`),blueprintId:F().describe(`Opaque id of the materialised component for this render. On the handshake-decided reuse paths (accept a cache-origin proposal, or a variance re-aim that resolves to an existing variant) it is the stored id — equal ids across renders mean the same stored component. override.contract always generates cold and mints a fresh id, even for an identical contract.`),variantKey:F().describe(`Canonical hash of the design-time variance (persona, aesthetic, seed prompt, context). With contractHash it forms the reuse key: the same pair reuses one component; a different variant of the same contract gets its own.`),cache:xc.describe(`Reuse outcome for this render: whether a stored component was served, its similarity, the matched component id, and how many generation calls that avoided.`),error:Sc.optional().describe(`Present iff the tool result is isError — canonical {code, message} for a failed/rejected generation. Absent on success.`),nextStep:z({tool:B(`ggui_consume`),description:F(),example:F(),args:z({sessionId:F(),timeout:R()})}).optional().describe(`Required-next-call hint — when the rendered contract has actions, points the agent at ggui_consume({sessionId, timeout}) for the inbound action loop. Absent for pure-display renders.`)}),Yo(`kind`,[z({sessionId:F().describe(`GguiSession opaque id (UUID) — returned by ggui_render.`),kind:B(`replace`),props:$o(F(),Bo()).describe(`Full replacement props map. New map IS the new state, rendered as a NEW card (a new history entry). For an in-place repaint of the mounted card use ggui_amend.`)}).strict(),z({sessionId:F().describe(`GguiSession opaque id (UUID) — returned by ggui_render.`),kind:B(`merge`),patch:$o(F(),Bo()).describe(`RFC 7396 JSON Merge Patch — null deletes a key; arrays fully replace. The merged state renders as a NEW card (a new history entry). For an in-place repaint of the mounted card use ggui_amend.`)}).strict()]),Yo(`kind`,[z({sessionId:F().describe(`GguiSession opaque id (UUID) — returned by ggui_render.`),kind:B(`replace`),props:$o(F(),Bo()).describe(`Full replacement props map, applied to the currently mounted card in place.`)}).strict(),z({sessionId:F().describe(`GguiSession opaque id (UUID) — returned by ggui_render.`),kind:B(`merge`),patch:$o(F(),Bo()).describe(`RFC 7396 JSON Merge Patch — null deletes a key; arrays fully replace. Applied to the currently mounted card in place.`)}).strict()]),z({sessionId:F(),updated:Io(),resourceUri:F(),epoch:R().int().min(0),warning:F().optional(),propsSchemaHash:F().optional(),propsSchemaProfile:F().optional()}),z({sessionId:F(),updated:Io(),resourceUri:F(),warning:F().optional(),propsSchemaHash:F().optional(),propsSchemaProfile:F().optional()}),z({toolCatalog:$o(F(),z({name:F(),version:F().optional()}).strict()).describe(`Per-app canonical tool identities: bare tool name -> its server's initialize-declared serverInfo. Host/library-supplied; not an agent action.`)}).strict(),z({saved:Io(),appId:F()}).strict();var Cc=z({seq:R().int().min(1).describe(`Monotonic, gap-free per render; starts at 1 (0 is the "no events yet" cursor sentinel, never an event).`),type:F().min(1).describe(`Wire-frame type — see the canonical GguiSessionEventType taxonomy; plain string so servers can mint new types without a protocol bump.`),timestamp:F().describe(`ISO 8601 UTC timestamp the server stamped on emission.`),data:Bo().describe(`Type-specific payload — structurally identical to the matching live-channel frame payload.`)});z({sessionId:F().min(1).describe('Active render id — sourced from `_meta["ai.ggui/render"].sessionId` on the iframe boot envelope. Unknown and cross-tenant ids surface uniformly as session_not_found.'),sinceSequence:R().int().min(0).optional().describe(`Replay cursor — only events with seq > sinceSequence return. Omit (= 0) on first pull; advance to the last event's seq (or lastSequence on an empty page) on every subsequent pull.`),limit:R().int().min(1).optional().describe(`Max events per page. Values above 100 are clamped to 100; omit for the default 100. When hasMore is true, immediately re-pull with the advanced cursor.`),wait:R().min(0).optional().describe(`Subscription-mode hold, in seconds. When set and the cursor page is empty, the server holds this call until an event lands or the hold elapses (values above 20 are clamped to 20). An empty page after a full hold is a NORMAL result — immediately re-pull to stay subscribed, or back off to sparse un-held pulls after a few consecutive empties. Omit (= 0) for an immediate return.`)}),qo([z({events:Wo(Cc),lastSequence:R().int().min(0),hasMore:Io()}),z({reason:B(`REPLAY_HORIZON_PASSED`),currentSequence:R().int().min(0)})]),z({sessionId:F().min(1).describe(`Render id the report concerns — sourced from the boot envelope. Client-claimed: used as a log tag only.`),events:Wo(z({at:R().min(0).describe(`Milliseconds since iframe boot (monotonic, client clock).`),kind:F().min(1).max(64).describe(`Event name — e.g. 'boot.path', 'status.connected', 'channel_failover_swap', 'doorbell.ring'.`),detail:F().max(512).optional().describe(`Optional compact context (JSON fragment or message).`)})).min(1).max(40).describe(`Batched ladder/doorbell events, oldest first.`)}),z({ok:B(!0)});var wc=Yo(`type`,[z({type:B(`text`),text:F()}),z({type:B(`tool_use`),id:F(),name:F(),input:$o(F(),Bo())}),z({type:B(`tool_result`),tool_use_id:F(),content:Bo(),is_error:Io().optional()})]),Tc=Yo(`type`,[z({type:B(`text_delta`),text:F()}),z({type:B(`input_json_delta`),partial_json:F()})]),Ec=z({type:B(`message_start`),message:z({id:F(),role:B(`assistant`),model:F().optional()})}),Dc=z({type:B(`content_block_start`),index:R().int().nonnegative(),content_block:wc}),Oc=z({type:B(`content_block_delta`),index:R().int().nonnegative(),delta:Tc}),kc=z({type:B(`content_block_stop`),index:R().int().nonnegative()}),Ac=z({type:B(`message_delta`),delta:z({stop_reason:ts([`end_turn`,`max_tokens`,`tool_use`,`error`]),stop_sequence:F().nullable().optional()}),usage:z({input_tokens:R().int().nonnegative(),output_tokens:R().int().nonnegative()})}),jc=z({type:B(`message_stop`)}),Mc=z({type:B(`ping`)}),Nc=ts([`invalid_request`,`unauthorized`,`rate_limited`,`invoke_in_progress`,`upstream_error`,`tool_error`,`internal`]);Yo(`type`,[Ec,Dc,Oc,kc,Ac,jc,Mc,z({type:B(`error`),error:z({code:Nc,message:F(),retryAfterMs:R().int().nonnegative().optional()})})]);var Pc=z({role:ts([`user`,`assistant`]),content:qo([F(),Wo(wc)])});z({message:F(),history:Wo(Pc).optional(),interfaceContext:bc.optional(),requestId:F().optional()});var Fc=/^--ggui-[a-zA-Z0-9-]+$/,Ic=F().min(1).max(256).regex(/^[^;{}<>@]*$/,`css value contains a disallowed character`).refine(e=>!e.includes(`/*`),`css value may not contain a comment`),Lc=$o(F().regex(Fc,`css var key must be --ggui-*`),Ic).refine(e=>Object.keys(e).length<=200,`too many css variables (max 200)`);z({mode:ts([`light`,`dark`]),cssVariables:Lc,name:F().min(1).max(64).optional(),base:z({documentHash:F().regex(/^[0-9a-f]{64}$/,`documentHash must be sha256 lowercase hex`),light:Lc,dark:Lc}).strict().optional()}).strict(),s(((e,t)=>{t.exports=function e(t){if(typeof t==`number`&&isNaN(t))throw Error(`NaN is not allowed`);if(typeof t==`number`&&!isFinite(t))throw Error(`Infinity is not allowed`);return typeof t!=`object`||!t?JSON.stringify(t):t.toJSON instanceof Function?e(t.toJSON()):Array.isArray(t)?`[${t.reduce((t,n,r)=>`${t}${r===0?``:`,`}${e(n===void 0||typeof n==`symbol`?null:n)}`,``)}]`:`{${Object.keys(t).sort().reduce((n,r)=>t[r]===void 0||typeof t[r]==`symbol`?n:`${n}${n.length===0?``:`,`}${e(r)}:${e(t[r])}`,``)}}`}}))();var Rc=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;var t=class{};e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var n=class extends t{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw Error(`CodeGen: name must be a valid identifier`);this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};e.Name=n;var r=class extends t{constructor(e){super(),this._items=typeof e==`string`?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===``||e===`""`}get str(){return this._str??=this._items.reduce((e,t)=>`${e}${t}`,``)}get names(){return this._names??=this._items.reduce((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e),{})}};e._Code=r,e.nil=new r(``);function i(e,...t){let n=[e[0]],i=0;for(;i<t.length;)s(n,t[i]),n.push(e[++i]);return new r(n)}e._=i;var a=new r(`+`);function o(e,...t){let n=[p(e[0])],i=0;for(;i<t.length;)n.push(a),s(n,t[i]),n.push(a,p(e[++i]));return c(n),new r(n)}e.str=o;function s(e,t){t instanceof r?e.push(...t._items):t instanceof n?e.push(t):e.push(d(t))}e.addCodeArg=s;function c(e){let t=1;for(;t<e.length-1;){if(e[t]===a){let n=l(e[t-1],e[t+1]);if(n!==void 0){e.splice(t-1,3,n);continue}e[t++]=`+`}t++}}function l(e,t){if(t===`""`)return e;if(e===`""`)return t;if(typeof e==`string`)return t instanceof n||e[e.length-1]!==`"`?void 0:typeof t==`string`?t[0]===`"`?e.slice(0,-1)+t.slice(1):void 0:`${e.slice(0,-1)}${t}"`;if(typeof t==`string`&&t[0]===`"`&&!(e instanceof n))return`"${e}${t.slice(1)}`}function u(e,t){return t.emptyStr()?e:e.emptyStr()?t:o`${e}${t}`}e.strConcat=u;function d(e){return typeof e==`number`||typeof e==`boolean`||e===null?e:p(Array.isArray(e)?e.join(`,`):e)}function f(e){return new r(p(e))}e.stringify=f;function p(e){return JSON.stringify(e).replace(/\u2028/g,`\\u2028`).replace(/\u2029/g,`\\u2029`)}e.safeStringify=p;function m(t){return typeof t==`string`&&e.IDENTIFIER.test(t)?new r(`.${t}`):i`[${t}]`}e.getProperty=m;function h(t){if(typeof t==`string`&&e.IDENTIFIER.test(t))return new r(`${t}`);throw Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}e.getEsmExportName=h;function g(e){return new r(e.toString())}e.regexpCode=g})),zc=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;var t=Rc(),n=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},r;(function(e){e[e.Started=0]=`Started`,e[e.Completed=1]=`Completed`})(r||(e.UsedValueState=r={})),e.varKinds={const:new t.Name(`const`),let:new t.Name(`let`),var:new t.Name(`var`)};var i=class{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof t.Name?e:this.name(e)}name(e){return new t.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){if((this._parent?._prefixes)?.has(e)||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};e.Scope=i;var a=class extends t.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:n,itemIndex:r}){this.value=e,this.scopePath=(0,t._)`.${new t.Name(n)}[${r}]`}};e.ValueScopeName=a;var o=(0,t._)`\n`;e.ValueScope=class extends i{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?o:t.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){if(t.ref===void 0)throw Error(`CodeGen: ref must be passed in value`);let n=this.toName(e),{prefix:r}=n,i=t.key??t.ref,a=this._values[r];if(a){let e=a.get(i);if(e)return e}else a=this._values[r]=new Map;a.set(i,n);let o=this._scope[r]||(this._scope[r]=[]),s=o.length;return o[s]=t.ref,n.setValue(t,{property:r,itemIndex:s}),n}getValue(e,t){let n=this._values[e];if(n)return n.get(t)}scopeRefs(e,n=this._values){return this._reduceValues(n,n=>{if(n.scopePath===void 0)throw Error(`CodeGen: name "${n}" has no value`);return(0,t._)`${e}${n.scopePath}`})}scopeCode(e=this._values,t,n){return this._reduceValues(e,e=>{if(e.value===void 0)throw Error(`CodeGen: name "${e}" has no value`);return e.value.code},t,n)}_reduceValues(i,a,o={},s){let c=t.nil;for(let l in i){let u=i[l];if(!u)continue;let d=o[l]=o[l]||new Map;u.forEach(i=>{if(d.has(i))return;d.set(i,r.Started);let o=a(i);if(o){let n=this.opts.es5?e.varKinds.var:e.varKinds.const;c=(0,t._)`${c}${n} ${i} = ${o};${this.opts._n}`}else if(o=s?.(i))c=(0,t._)`${c}${o}${this.opts._n}`;else throw new n(i);d.set(i,r.Completed)})}return c}}})),V=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;var t=Rc(),n=zc(),r=Rc();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}});var i=zc();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),e.operators={GT:new t._Code(`>`),GTE:new t._Code(`>=`),LT:new t._Code(`<`),LTE:new t._Code(`<=`),EQ:new t._Code(`===`),NEQ:new t._Code(`!==`),NOT:new t._Code(`!`),OR:new t._Code(`||`),AND:new t._Code(`&&`),ADD:new t._Code(`+`)};var a=class{optimizeNodes(){return this}optimizeNames(e,t){return this}},o=class extends a{constructor(e,t,n){super(),this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){let r=e?n.varKinds.var:this.varKind,i=this.rhs===void 0?``:` = ${this.rhs}`;return`${r} ${this.name}${i};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&=re(this.rhs,e,t),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}},s=class extends a{constructor(e,t,n){super(),this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,n){if(!(this.lhs instanceof t.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=re(this.rhs,e,n),this}get names(){return ne(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}},c=class extends s{constructor(e,t,n,r){super(e,n,r),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},l=class extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},u=class extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:``};`+e}},d=class extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},f=class extends a{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=re(this.code,e,t),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}},p=class extends a{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,n)=>t+n.render(e),``)}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let n=e[t].optimizeNodes();Array.isArray(n)?e.splice(t,1,...n):n?e[t]=n:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:n}=this,r=n.length;for(;r--;){let i=n[r];i.optimizeNames(e,t)||(ie(e,i.names),n.splice(r,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>te(e,t.names),{})}},m=class extends p{render(e){return`{`+e._n+super.render(e)+`}`+e._n}},h=class extends p{},g=class extends m{};g.kind=`else`;var _=class e extends m{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+=`else `+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let n=this.else;if(n){let e=n.optimizeNodes();n=this.else=Array.isArray(e)?new g(e):e}if(n)return t===!1?n instanceof e?n:n.nodes:this.nodes.length?this:new e(E(t),n instanceof e?[n]:n.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(e,t){if(this.else=this.else?.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=re(this.condition,e,t),this}get names(){let e=super.names;return ne(e,this.condition),this.else&&te(e,this.else.names),e}};_.kind=`if`;var v=class extends m{};v.kind=`for`;var y=class extends v{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=re(this.iteration,e,t),this}get names(){return te(super.names,this.iteration.names)}},b=class extends v{constructor(e,t,n,r){super(),this.varKind=e,this.name=t,this.from=n,this.to=r}render(e){let t=e.es5?n.varKinds.var:this.varKind,{name:r,from:i,to:a}=this;return`for(${t} ${r}=${i}; ${r}<${a}; ${r}++)`+super.render(e)}get names(){return ne(ne(super.names,this.from),this.to)}},x=class extends v{constructor(e,t,n,r){super(),this.loop=e,this.varKind=t,this.name=n,this.iterable=r}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=re(this.iterable,e,t),this}get names(){return te(super.names,this.iterable.names)}},S=class extends m{constructor(e,t,n){super(),this.name=e,this.args=t,this.async=n}render(e){return`${this.async?`async `:``}function ${this.name}(${this.args})`+super.render(e)}};S.kind=`func`;var C=class extends p{render(e){return`return `+super.render(e)}};C.kind=`return`;var w=class extends m{render(e){let t=`try`+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)==null||e.optimizeNodes(),(t=this.finally)==null||t.optimizeNodes(),this}optimizeNames(e,t){var n,r;return super.optimizeNames(e,t),(n=this.catch)==null||n.optimizeNames(e,t),(r=this.finally)==null||r.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&te(e,this.catch.names),this.finally&&te(e,this.finally.names),e}},T=class extends m{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};T.kind=`catch`;var ee=class extends m{render(e){return`finally`+super.render(e)}};ee.kind=`finally`,e.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
|
|
72
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function pa(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:ga(t,`input`,e.processors),output:ga(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function ma(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return ma(r.element,n);if(r.type===`set`)return ma(r.valueType,n);if(r.type===`lazy`)return ma(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`)return ma(r.innerType,n);if(r.type===`intersection`)return ma(r.left,n)||ma(r.right,n);if(r.type===`record`||r.type===`map`)return ma(r.keyType,n)||ma(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:ma(r.in,n)||ma(r.out,n);if(r.type===`object`){for(let e in r.shape)if(ma(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(ma(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(ma(e,n))return!0;return!!(r.rest&&ma(r.rest,n))}return!1}var ha=(e,t={})=>n=>{let r=ua({...n,processors:t});return da(e,r),fa(r,e),pa(r,e)},ga=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=ua({...i??{},target:a,io:t,processors:n});return da(e,o),fa(o,e),pa(o,e)},_a={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},va=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=_a[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},ya=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;i.type=typeof s==`string`&&s.includes(`int`)?`integer`:`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(i.multipleOf=c)},ba=(e,t,n,r)=>{n.type=`boolean`},xa=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},Sa=(e,t,n,r)=>{n.not={}},Ca=(e,t,n,r)=>{let i=e._zod.def,a=Ge(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},wa=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},Ta=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},Ea=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},Da=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=da(a.element,t,{...r,path:[...r.path,`items`]})},Oa=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=da(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=da(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},ka=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>da(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Aa=(e,t,n,r)=>{let i=e._zod.def,a=da(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=da(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},ja=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=da(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else(t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=da(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=da(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},Ma=(e,t,n,r)=>{let i=e._zod.def,a=da(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},Na=(e,t,n,r)=>{let i=e._zod.def;da(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Pa=(e,t,n,r)=>{let i=e._zod.def;da(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},Fa=(e,t,n,r)=>{let i=e._zod.def;da(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},Ia=(e,t,n,r)=>{let i=e._zod.def;da(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},La=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;da(o,t,r);let s=t.seen.get(e);s.ref=o},Ra=(e,t,n,r)=>{let i=e._zod.def;da(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},za=(e,t,n,r)=>{let i=e._zod.def;da(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Ba=(e,t,n,r)=>{let i=e._zod.innerType;da(i,t,r);let a=t.seen.get(e);a.ref=i},Va=A(`ZodISODateTime`,(e,t)=>{rr.init(e,t),I.init(e,t)});function Ha(e){return ji(Va,e)}var Ua=A(`ZodISODate`,(e,t)=>{ir.init(e,t),I.init(e,t)});function Wa(e){return Mi(Ua,e)}var Ga=A(`ZodISOTime`,(e,t)=>{ar.init(e,t),I.init(e,t)});function Ka(e){return Ni(Ga,e)}var qa=A(`ZodISODuration`,(e,t)=>{or.init(e,t),I.init(e,t)});function Ja(e){return Pi(qa,e)}var Ya=A(`ZodError`,(e,t)=>{Dt.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>At(e,t)},flatten:{value:t=>kt(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Ke,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Ke,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),Xa=jt(Ya),Za=Mt(Ya),Qa=Nt(Ya),$a=Ft(Ya),eo=Lt(Ya),to=Rt(Ya),no=zt(Ya),ro=Bt(Ya),io=Vt(Ya),ao=Ht(Ya),oo=Ut(Ya),so=Wt(Ya),co=new WeakMap;function lo(e,t,n){let r=Object.getPrototypeOf(e),i=co.get(r);if(i||(i=new Set,co.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}var P=A(`ZodType`,(e,t)=>(Un.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:ga(e,`input`),output:ga(e,`output`)}}),e.toJSONSchema=ha(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>Xa(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Qa(e,t,n),e.parseAsync=async(t,n)=>Za(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>$a(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>eo(e,t,n),e.decode=(t,n)=>to(e,t,n),e.encodeAsync=async(t,n)=>no(e,t,n),e.decodeAsync=async(t,n)=>ro(e,t,n),e.safeEncode=(t,n)=>io(e,t,n),e.safeDecode=(t,n)=>ao(e,t,n),e.safeEncodeAsync=async(t,n)=>oo(e,t,n),e.safeDecodeAsync=async(t,n)=>so(e,t,n),lo(e,`ZodType`,{check(...e){let t=this.def;return this.clone($e(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return lt(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Es(e,t))},superRefine(e,t){return this.check(Ds(e,t))},overwrite(e){return this.check(ea(e))},optional(){return os(this)},exactOptional(){return cs(this)},nullable(){return us(this)},nullish(){return os(us(this))},nonoptional(e){return gs(this,e)},array(){return Wo(this)},or(e){return qo([this,e])},and(e){return Zo(this,e)},transform(e){return bs(this,is(e))},default(e){return fs(this,e)},prefault(e){return ms(this,e)},catch(e){return vs(this,e)},pipe(e){return bs(this,e)},readonly(){return Ss(this)},describe(e){let t=this.clone();return si.add(t,{description:e}),t},meta(...e){if(e.length===0)return si.get(this);let t=this.clone();return si.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get(){return si.get(e)?.description},configurable:!0}),e)),uo=A(`_ZodString`,(e,t)=>{Wn.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>va(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,lo(e,`_ZodString`,{regex(...e){return this.check(Ji(...e))},includes(...e){return this.check(Zi(...e))},startsWith(...e){return this.check(Qi(...e))},endsWith(...e){return this.check($i(...e))},min(...e){return this.check(Ki(...e))},max(...e){return this.check(Gi(...e))},length(...e){return this.check(qi(...e))},nonempty(...e){return this.check(Ki(1,...e))},lowercase(e){return this.check(Yi(e))},uppercase(e){return this.check(Xi(e))},trim(){return this.check(na())},normalize(...e){return this.check(ta(...e))},toLowerCase(){return this.check(ra())},toUpperCase(){return this.check(ia())},slugify(){return this.check(aa())}})}),fo=A(`ZodString`,(e,t)=>{Wn.init(e,t),uo.init(e,t),e.email=t=>e.check(li(po,t)),e.url=t=>e.check(hi(go,t)),e.jwt=t=>e.check(Ai(jo,t)),e.emoji=t=>e.check(gi(_o,t)),e.guid=t=>e.check(ui(mo,t)),e.uuid=t=>e.check(di(ho,t)),e.uuidv4=t=>e.check(fi(ho,t)),e.uuidv6=t=>e.check(pi(ho,t)),e.uuidv7=t=>e.check(mi(ho,t)),e.nanoid=t=>e.check(_i(vo,t)),e.guid=t=>e.check(ui(mo,t)),e.cuid=t=>e.check(vi(yo,t)),e.cuid2=t=>e.check(yi(bo,t)),e.ulid=t=>e.check(bi(xo,t)),e.base64=t=>e.check(Di(Oo,t)),e.base64url=t=>e.check(Oi(ko,t)),e.xid=t=>e.check(xi(So,t)),e.ksuid=t=>e.check(Si(Co,t)),e.ipv4=t=>e.check(Ci(wo,t)),e.ipv6=t=>e.check(wi(To,t)),e.cidrv4=t=>e.check(Ti(Eo,t)),e.cidrv6=t=>e.check(Ei(Do,t)),e.e164=t=>e.check(ki(Ao,t)),e.datetime=t=>e.check(Ha(t)),e.date=t=>e.check(Wa(t)),e.time=t=>e.check(Ka(t)),e.duration=t=>e.check(Ja(t))});function F(e){return ci(fo,e)}var I=A(`ZodStringFormat`,(e,t)=>{Gn.init(e,t),uo.init(e,t)}),po=A(`ZodEmail`,(e,t)=>{Jn.init(e,t),I.init(e,t)}),mo=A(`ZodGUID`,(e,t)=>{Kn.init(e,t),I.init(e,t)}),ho=A(`ZodUUID`,(e,t)=>{qn.init(e,t),I.init(e,t)}),go=A(`ZodURL`,(e,t)=>{Yn.init(e,t),I.init(e,t)});function L(e){return hi(go,e)}var _o=A(`ZodEmoji`,(e,t)=>{Xn.init(e,t),I.init(e,t)}),vo=A(`ZodNanoID`,(e,t)=>{Zn.init(e,t),I.init(e,t)}),yo=A(`ZodCUID`,(e,t)=>{Qn.init(e,t),I.init(e,t)}),bo=A(`ZodCUID2`,(e,t)=>{$n.init(e,t),I.init(e,t)}),xo=A(`ZodULID`,(e,t)=>{er.init(e,t),I.init(e,t)}),So=A(`ZodXID`,(e,t)=>{tr.init(e,t),I.init(e,t)}),Co=A(`ZodKSUID`,(e,t)=>{nr.init(e,t),I.init(e,t)}),wo=A(`ZodIPv4`,(e,t)=>{sr.init(e,t),I.init(e,t)}),To=A(`ZodIPv6`,(e,t)=>{cr.init(e,t),I.init(e,t)}),Eo=A(`ZodCIDRv4`,(e,t)=>{lr.init(e,t),I.init(e,t)}),Do=A(`ZodCIDRv6`,(e,t)=>{ur.init(e,t),I.init(e,t)}),Oo=A(`ZodBase64`,(e,t)=>{fr.init(e,t),I.init(e,t)}),ko=A(`ZodBase64URL`,(e,t)=>{mr.init(e,t),I.init(e,t)}),Ao=A(`ZodE164`,(e,t)=>{hr.init(e,t),I.init(e,t)}),jo=A(`ZodJWT`,(e,t)=>{_r.init(e,t),I.init(e,t)}),Mo=A(`ZodNumber`,(e,t)=>{vr.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ya(e,t,n,r),lo(e,`ZodNumber`,{gt(e,t){return this.check(Hi(e,t))},gte(e,t){return this.check(Ui(e,t))},min(e,t){return this.check(Ui(e,t))},lt(e,t){return this.check(N(e,t))},lte(e,t){return this.check(Vi(e,t))},max(e,t){return this.check(Vi(e,t))},int(e){return this.check(Po(e))},safe(e){return this.check(Po(e))},positive(e){return this.check(Hi(0,e))},nonnegative(e){return this.check(Ui(0,e))},negative(e){return this.check(N(0,e))},nonpositive(e){return this.check(Vi(0,e))},multipleOf(e,t){return this.check(Wi(e,t))},step(e,t){return this.check(Wi(e,t))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function R(e){return Fi(Mo,e)}var No=A(`ZodNumberFormat`,(e,t)=>{yr.init(e,t),Mo.init(e,t)});function Po(e){return Ii(No,e)}var Fo=A(`ZodBoolean`,(e,t)=>{br.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ba(e,t,n,r)});function Io(e){return Li(Fo,e)}var Lo=A(`ZodNull`,(e,t)=>{xr.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xa(e,t,n,r)});function Ro(e){return Ri(Lo,e)}var zo=A(`ZodUnknown`,(e,t)=>{Sr.init(e,t),P.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Bo(){return zi(zo)}var Vo=A(`ZodNever`,(e,t)=>{Cr.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Sa(e,t,n,r)});function Ho(e){return Bi(Vo,e)}var Uo=A(`ZodArray`,(e,t)=>{Tr.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Da(e,t,n,r),e.element=t.element,lo(e,`ZodArray`,{min(e,t){return this.check(Ki(e,t))},nonempty(e){return this.check(Ki(1,e))},max(e,t){return this.check(Gi(e,t))},length(e,t){return this.check(qi(e,t))},unwrap(){return this.element}})});function Wo(e,t){return oa(Uo,e,t)}var Go=A(`ZodObject`,(e,t)=>{Ar.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Oa(e,t,n,r),j(e,`shape`,()=>t.shape),lo(e,`ZodObject`,{keyof(){return ts(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:Bo()})},loose(){return this.clone({...this._zod.def,catchall:Bo()})},strict(){return this.clone({...this._zod.def,catchall:Ho()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return mt(this,e)},safeExtend(e){return ht(this,e)},merge(e){return gt(this,e)},pick(e){return ft(this,e)},omit(e){return pt(this,e)},partial(...e){return _t(as,this,e[0])},required(...e){return vt(hs,this,e[0])}})});function z(e,t){return new Go({type:`object`,shape:e??{},...M(t)})}var Ko=A(`ZodUnion`,(e,t)=>{Mr.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ka(e,t,n,r),e.options=t.options});function qo(e,t){return new Ko({type:`union`,options:e,...M(t)})}var Jo=A(`ZodDiscriminatedUnion`,(e,t)=>{Ko.init(e,t),Nr.init(e,t)});function Yo(e,t,n){return new Jo({type:`union`,options:t,discriminator:e,...M(n)})}var Xo=A(`ZodIntersection`,(e,t)=>{Pr.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Aa(e,t,n,r)});function Zo(e,t){return new Xo({type:`intersection`,left:e,right:t})}var Qo=A(`ZodRecord`,(e,t)=>{Lr.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ja(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function $o(e,t,n){return!t||!t._zod?new Qo({type:`record`,keyType:F(),valueType:e,...M(t)}):new Qo({type:`record`,keyType:e,valueType:t,...M(n)})}var es=A(`ZodEnum`,(e,t)=>{Rr.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ca(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new es({...t,checks:[],...M(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new es({...t,checks:[],...M(r),entries:i})}});function ts(e,t){return new es({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...M(t)})}var ns=A(`ZodLiteral`,(e,t)=>{zr.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wa(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function B(e,t){return new ns({type:`literal`,values:Array.isArray(e)?e:[e],...M(t)})}var rs=A(`ZodTransform`,(e,t)=>{Br.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ea(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new He(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Tt(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(Tt(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}});function is(e){return new rs({type:`transform`,transform:e})}var as=A(`ZodOptional`,(e,t)=>{Hr.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>za(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function os(e){return new as({type:`optional`,innerType:e})}var ss=A(`ZodExactOptional`,(e,t)=>{Ur.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>za(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function cs(e){return new ss({type:`optional`,innerType:e})}var ls=A(`ZodNullable`,(e,t)=>{Wr.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ma(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function us(e){return new ls({type:`nullable`,innerType:e})}var ds=A(`ZodDefault`,(e,t)=>{Gr.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Pa(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function fs(e,t){return new ds({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():ot(t)}})}var ps=A(`ZodPrefault`,(e,t)=>{qr.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Fa(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ms(e,t){return new ps({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():ot(t)}})}var hs=A(`ZodNonOptional`,(e,t)=>{Jr.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Na(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function gs(e,t){return new hs({type:`nonoptional`,innerType:e,...M(t)})}var _s=A(`ZodCatch`,(e,t)=>{Xr.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ia(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function vs(e,t){return new _s({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var ys=A(`ZodPipe`,(e,t)=>{Zr.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>La(e,t,n,r),e.in=t.in,e.out=t.out});function bs(e,t){return new ys({type:`pipe`,in:e,out:t})}var xs=A(`ZodReadonly`,(e,t)=>{$r.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ra(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ss(e){return new xs({type:`readonly`,innerType:e})}var Cs=A(`ZodLazy`,(e,t)=>{ti.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ba(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function ws(e){return new Cs({type:`lazy`,getter:e})}var Ts=A(`ZodCustom`,(e,t)=>{ni.init(e,t),P.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ta(e,t,n,r)});function Es(e,t={}){return sa(Ts,e,t)}function Ds(e,t){return ca(e,t)}Object.freeze(new Set([{package:`@ggui-ai/gadgets`,version:`0.13.0`,exports:[{hook:`useCamera`,permission:`camera`,description:`Capture stills or live video from the device camera.`,usage:"Mount when the intent names photo capture, QR / barcode scanning, video recording, or anything that requires a camera feed. The hook returns a stream once `start()` resolves; thread the resulting blob or stream URL into a contextSpec slot or an actionSpec payload to surface it to the agent.",example:{call:`const cam = useCamera({ facingMode: 'environment' }); // on button click: await cam.start()`,returns:{status:`completed`,value:{dataUrl:`data:image/png;base64,…`,width:640,height:480,mimeType:`image/png`}}}},{hook:`useClipboardPaste`,permission:`clipboard-read`,description:`Read the system clipboard contents on user gesture.`,usage:"Mount when the intent involves importing copied content (paste-into-form, paste-image-to-upload, paste-link). The Permissions API requires a user gesture; gate `start()` behind a button click. Returned value lands in a contextSpec slot or an actionSpec payload.",example:{call:`const paste = useClipboardPaste(); // on button click: await paste.start()`,returns:{status:`completed`,value:`pasted clipboard text`}}},{hook:`useClipboardWrite`,permission:`clipboard-write`,description:`Write to the system clipboard on user gesture.`,usage:`Mount when the intent includes copying generated text, share links, codes, or transcripts to the system clipboard. Fire an actionSpec event so the agent observes the act (it does not see the written value — that stays component-local).`,example:{call:`const write = useClipboardWrite({ text: 'hello' }); // on button click: await write.start()`,returns:{status:`completed`,value:`hello`}}},{hook:`useFilePicker`,description:`Open the native file picker and read selected files.`,usage:`Mount when the intent names file upload, attachment selection, or document import. No permission required. The hook returns the picked files plus metadata; thread file refs / data URLs into a contextSpec slot or actionSpec payload.`,example:{call:`const picker = useFilePicker({ accept: 'image/*' }); // on button click: await picker.start()`,returns:{status:`completed`,value:{files:[{name:`photo.png`,type:`image/png`,size:12345,_file:`<File>`}]}}}},{hook:`useGeolocation`,permission:`geolocation`,description:`Resolve the device's current geolocation.`,usage:'Mount when the intent names "current location", maps, nearby search, location-aware UI. Browser prompts the user on `start()`; the hook returns coordinates once granted. Thread the resolved coords into a contextSpec slot so the agent observes the latest fix.',example:{call:`const geo = useGeolocation(); // on button click: await geo.start()`,returns:{status:`completed`,value:{latitude:37.7749,longitude:-122.4194,accuracy:20,timestamp:1718e9}}}},{hook:`useMicrophone`,permission:`microphone`,description:`Capture audio from the device microphone.`,usage:`Mount when the intent names voice memos, audio messages, dictation, voice-driven UI. Returns an audio stream / blob; thread it into an actionSpec payload at recording-stop, or into a contextSpec slot for live transcription pipelines.`,example:{call:`const mic = useMicrophone(); // record on click: await mic.start(); end with mic.stop()`,returns:{status:`completed`,value:{blob:`<Blob>`,durationMs:4200,mimeType:`audio/webm`}}}},{hook:`useNotifications`,permission:`notifications`,description:`Show system / browser notifications to the user.`,usage:"Mount when the intent involves alerting the user about something (reminders, completion of long tasks, incoming messages) and the UI may be in the background. Permission is prompted on first `start()`; the agent does NOT see notification dismissal directly — surface it via an actionSpec if needed.",example:{call:`const notify = useNotifications({ title: 'Done' }); // after the task completes: await notify.start()`,returns:{status:`completed`,value:{outcome:`closed`}}}}]}].flatMap(e=>e.exports).map(e=>e.hook).filter(e=>e!==void 0)));var Os=/^use[A-Z][A-Za-z0-9]*$/,ks=/^[A-Z][A-Za-z0-9]*$/,As=[`geolocation`,`notifications`,`microphone`,`camera`,`persistent-storage`,`midi`,`clipboard-read`,`clipboard-write`,`speaker-selection`,`storage-access`,`background-sync`,`accelerometer`,`gyroscope`,`magnetometer`,`ambient-light-sensor`,`screen-wake-lock`];new Set(As);var js=ws(()=>qo([F(),R(),Io(),Ro(),Wo(js),$o(F(),js)])),Ms=ts([`string`,`number`,`integer`,`boolean`,`array`,`object`,`null`]),Ns=ws(()=>z({type:qo([Ms,Wo(Ms)]).optional(),description:F().optional(),enum:Wo(js).optional(),default:js.optional(),example:js.optional(),items:Ns.optional(),properties:$o(F(),Ns).optional(),required:Wo(F()).optional(),additionalProperties:qo([Ns,Io()]).optional(),format:F().optional()}).passthrough()),Ps=z({description:F().optional(),schema:Ns,required:Io().optional(),default:js.optional(),example:js.optional(),sourceTool:F().optional()}).strict(),Fs=z({description:F().optional(),properties:$o(F(),Ps)}).strict(),Is=z({description:F().optional(),label:F(),schema:Ns.optional(),example:js.optional(),icon:F().optional(),confirm:Io().optional(),nextStep:F().min(1).optional()}).strict(),Ls=$o(F(),Is),Rs=z({description:F().optional(),schema:Ns,example:js.optional(),mode:ts([`append`,`replace`]).optional(),replay:ts([`latest`,`all`,`none`]).optional(),complete:Io().optional(),source:z({tool:F(),args:$o(F(),js).optional()}).strict().optional()}).strict(),zs=$o(F(),Rs),Bs=z({description:F().optional(),schema:Ns,default:js.optional(),debounceMs:R().int().nonnegative().optional(),example:js.optional()}).strict(),Vs=$o(F(),Bs),Hs=z({serverInfo:z({name:F(),version:F().optional()}).strict().optional(),toolInfo:z({inputSchema:Ns,description:F().optional(),outputSchema:Ns.optional()}).strict(),usage:F().optional(),example:z({input:js,output:js}).strict().optional()}).strict(),Us=z({tools:$o(F(),Hs)}).passthrough(),Ws=/^GGUI_PUBLIC_APP_[A-Z0-9_]+$/,Gs=Wo(F().regex(Ws)).readonly(),Ks=/^sha384-[A-Za-z0-9+/]+=*$/,qs=/^(?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*$/,Js=/^\d+\.\d+\.\d+(-[\w.]+)?(\+[\w.]+)?$/,Ys=/^[a-z0-9.-]+(:\d+)?$/,Xs={gotchas:F().optional()},Zs={...Xs,description:F().optional(),usage:F().optional(),example:js.optional(),permission:F().optional()},Qs={...Xs,description:F().min(1),usage:F().min(1),example:js,permission:ts(As).optional()},$s={version:F().regex(Js),package:F().regex(qs),bundleUrl:L().optional(),bundleHost:F().regex(Ys).optional(),bundleSri:F().regex(Ks).optional(),styleUrl:L().optional(),connect:Wo(L()).readonly().optional(),requires:Gs.optional(),typesUrl:L().optional(),typesSri:F().regex(Ks).optional()},ec=qo([z({hook:F().regex(Os),...Zs}).strict(),z({component:F().regex(ks),...Zs}).strict()]),tc=qo([z({hook:F().regex(Os),...Qs}).strict(),z({component:F().regex(ks),...Qs}).strict()]);z({...$s,exports:Wo(ec).min(1)}).strict(),z({...$s,exports:Wo(tc).min(1)}).strict().refine(e=>e.package===`@ggui-ai/gadgets`||typeof e.typesUrl==`string`,{message:"registered GadgetDescriptor MUST declare a `typesUrl` (HTTPS URL to the package's .d.ts) — the code-gen sandbox loads it to typecheck generated component code against the export signatures. Run `tsup --dts` (or `tsc --declaration`) in the wrapper build and publish the emitted .d.ts. Only the first-party `@ggui-ai/gadgets` stdlib is exempt.",path:[`typesUrl`]});var nc=z({description:F().optional(),usage:F().optional()}).strict(),rc=$o(F().refine(e=>Os.test(e)||ks.test(e),{message:"gadget export name must be a `use`-prefixed hook or a PascalCase component identifier"}),nc).refine(e=>Object.keys(e).length>0,{message:"a `clientCapabilities.gadgets` package entry must declare at least one export"}),ic=z({gadgets:$o(F().regex(qs),rc)}).strict();$o(F().regex(Ws),F()).readonly();var ac=z({propsSpec:Fs.optional().describe("Initial render data: {description?, properties: {<name>: {schema: <JSON Schema>, required?: boolean, description?, default?, example?}}}. A prop is required at the wire gate ONLY when `required: true`; omitted ⇒ optional (declare `required: true` for props the render must always pass)."),actionSpec:Ls.optional().describe("User gestures the agent reacts to on its next turn: {<action>: {label: string (REQUIRED — button copy / accessible name), schema?: <payload JSON Schema>, description?, example?, icon?, confirm?, nextStep?: '<agentCapabilities.tools key>'}}. Every action is agent-routed; `nextStep` is a hint, not a dispatch."),streamSpec:zs.optional().describe("Live update channels the agent emits into: {<channel>: {schema: <JSON Schema>, description?, example?, mode?: append|replace, replay?: latest|all|none, complete?, source?: {tool, args?}}}. `source.tool` must be declared in agentCapabilities.tools."),contextSpec:Vs.optional().describe(`Observable client state the agent reads alongside each action: {<slot>: {schema: <JSON Schema>, description?, default?, debounceMs?, example?}}. State that needs no next-turn reasoning belongs here, not in actionSpec.`),agentCapabilities:Us.optional().describe("MCP tools the AGENT may call: {tools: {<bareToolName>: {toolInfo: {inputSchema (REQUIRED), description?, outputSchema?}, serverInfo?: {name, version?}, usage?, example?: {input, output}}}}. Key by the BARE tool name (after any `mcp__<server>__` prefix); the component never calls these."),clientCapabilities:ic.optional().describe("Browser-capability gadgets the COMPONENT imports: {gadgets: {<npm package>: {<exportName>: {description?, usage?}}}} — `use`-prefixed export keys are hooks, PascalCase keys are components; version and transport resolve from the app's registered catalog, never on the wire.")}).passthrough(),oc=z({kind:B(`llm`),generator:F().min(1),model:F().min(1)}).strict(),sc=z({kind:B(`user`)}).strict(),cc=qo([oc,sc,z({kind:B(`curated`)}).strict()]),lc=[`persona`,`aesthetic`,`context`,`seedPrompt`],uc=z({persona:F().optional().describe(`Design persona, e.g. "minimalist" / "data-dense". Part of cache identity.`),aesthetic:F().optional().describe(`Visual aesthetic, e.g. "calm" / "ornate". Part of cache identity.`),context:$o(F(),js).optional().describe(`Deliberate design-shaping signals (e.g. {situation:"sad"}) — part of cache identity. NOT for per-user runtime data; put that in propsSpec/contextSpec.`),seedPrompt:F().optional().describe(`Generation seed directive. Part of cache identity.`)},{error:e=>e.code===`unrecognized_keys`?`variance: unknown key(s) ${e.keys.map(e=>JSON.stringify(e)).join(`, `)} — variance is EXACTLY {${lc.join(`, `)}}; put tonal intent in \`aesthetic\`, and per-user runtime data in props / contextSpec, never in variance`:void 0}).strict(),dc=z({blueprintId:F().min(1),contractHash:F().min(1),appId:F().min(1),codeS3Url:F().optional(),codeHash:F().optional(),source:cc,validatorScore:R().min(0).max(1).optional(),variance:uc,isOperatorDefault:B(!0).optional(),createdAt:F().min(1),createdBy:ts([`agent`,`operator`]),contract:ac,contractEmbedding:Wo(R()).optional()}).strict();z({weights:z({hash:R().min(0).optional(),embed:R().min(0).optional(),struct:R().min(0).optional(),variance:R().min(0).optional(),intent:R().min(0).optional()}).strict().optional(),threshold:R().min(0).max(1).optional(),topK:R().int().min(1).optional()}).strict();var fc=ts([`cache`,`agent`,`synth`]),pc=Wo(qo([z({op:B(`add`),path:F(),value:js}).strict(),z({op:B(`remove`),path:F()}).strict(),z({op:B(`replace`),path:F(),value:js}).strict()])),mc=[`contract`,`variance`,`generator`],hc=z({contract:ac,variance:uc.optional(),generator:F().optional()},{error:e=>e.code===`unrecognized_keys`?`blueprintDraft: unknown key(s) ${e.keys.map(e=>JSON.stringify(e)).join(`, `)} — a draft is EXACTLY {${mc.join(`, `)}}; \`intent\` is a top-level ggui_handshake field, not a draft field, and the four specs live INSIDE \`contract\``:void 0}).strict(),gc=z({blueprintId:F().min(1).optional(),contractHash:F().min(1),codeHash:F().optional(),source:cc.optional(),variance:uc,selectedReason:F().optional()}).strict(),_c=z({code:F().min(1),severity:ts([`error`,`warn`]),path:F(),message:F()}).strict(),vc=z({contractDiff:pc,reasoning:F()}).strict(),yc=z({origin:fc,rationale:F(),blueprintMeta:gc,proposedContractSummary:F().optional(),amendments:vc.optional(),validationFindings:Wo(_c).optional()}).strict(),bc=z({viewport:z({width:R(),height:R()}),platform:ts([`web`,`mobile`,`desktop`]),deviceType:ts([`phone`,`tablet`,`desktop`]),orientation:ts([`portrait`,`landscape`]),devicePixelRatio:R().optional(),touchPrimary:Io().optional(),shellType:ts([`chat`,`fullscreen`,`spatial`]).optional(),colorScheme:ts([`light`,`dark`]).optional(),reducedMotion:Io().optional()}).passthrough();z({sessionId:F().min(1).describe(`Globally-unique sessionId to consume events from. Cross-tenant access surfaces uniformly as session_not_found.`),timeout:R().int().min(0).max(25).optional().describe(`Inline long-poll seconds, integer in [0, 25]. 0 = immediate. Values outside the bound reject INVALID_PARAMS. Returns on first event OR timeout; re-call on empty to keep waiting — longer waits are your loop, not a bigger timeout.`)}),z({sessionId:F().min(1),channel:F().min(1),payload:Bo(),complete:Io().optional()}),z({sessionId:F().min(1).describe(`GguiSession opaque id (UUID) — returned by ggui_render.`)}),z({sessionId:F().min(1).describe(`GguiSession opaque id (UUID) — returned by ggui_render.`)}),z({}),z({query:F().min(1).describe(`Natural-language description of the UI you're looking for`),limit:R().int().min(1).max(100).optional(),tool:F().regex(/^[A-Za-z0-9_.-]{1,128}$/).optional().describe(`Filter registry-sourced candidates to artifacts declaring a binding for this exact MCP tool name (case-sensitive). Local results are unaffected.`),server:F().regex(/^[A-Za-z0-9_.-]{1,128}$/).optional().describe("Filter registry-sourced candidates to artifacts declaring a binding for this exact MCP server name (case-sensitive). Combine with `tool` to require the exact (server, tool) pair.")}),z({blueprintId:F().min(1).describe(`The stable blueprint id declared via ggui.ui.json#id. Must match an entry in this server's UI registry.`)}),z({}),z({intent:F().min(1).describe(`Concise purpose — same intent = same component reused. e.g. "Gmail inbox for email triage"`),blueprintDraft:hc.describe(`Agent's draft — a JSON OBJECT, never a JSON-encoded string (pass {contract: {...}}, not "{\\"contract\\":...}"; a string fails input validation with -32602). Fields: contract (required) + optional variance + optional generator slug hint. The server combines this with cached blueprints + validator outcomes to produce a three-mode suggestion (cache / agent / synth).`),forceCreate:Io().optional()}).strict(),z({handshakeId:F().describe(`Stable id — pass to ggui_render / ggui_update`),action:ts([`create`,`reuse`,`update`,`replace`,`declined`]),suggestion:yc.describe("Server's suggestion — origin-routed (cache | agent | synth). Always carries a provisional `blueprintMeta` the agent reuses by rendering WITHOUT `override` (accept the proposal as-is)."),reason:F().max(280).optional().describe("Short rationale (≤280 chars) for the `action` value. Surfaced for agent + operator visibility; truncated to keep the structuredContent payload predictable."),nextStep:z({tool:B(`ggui_render`),description:F(),example:F()}).optional().describe("Wire-shape recovery hint. A worked literal example of the next ggui_render call the agent should emit — the example string can be copied verbatim and tweaked (e.g. fill in `props` placeholders). Top-level field so a skimming agent finds it immediately.")}),z({handshakeId:F({message:`ggui_render: handshakeId is REQUIRED. Call ggui_handshake({intent, blueprintDraft}) first to negotiate — handshake returns a handshakeId + suggestion. Then render with {handshakeId, props} (accept the suggestion as-is) or {handshakeId, props, override: {contract?, variance?}} (re-aim the contract and/or variance). Direct-render without a handshakeId is not supported.`}).min(1,`ggui_render: handshakeId must be a non-empty string from a prior ggui_handshake call.`),props:$o(F(),Bo()),themeId:F().min(1).optional().describe(`Per-render theme override. Wins over App.defaultThemeId for THIS render. Omit to inherit the app theme.`),infra:z({model:F().min(1).optional().describe("Provider-prefixed model id (e.g., `anthropic/claude-haiku-4-5`, `openai/gpt-5`). Generator-specific prefixes (e.g., `bedrock/...` for AWS Bedrock routing) supported when the bound generator handles them.")}).strict().optional(),override:z({contract:ac.optional().describe(`STRICT full re-draft of the contract — must already conform; the server will not repair it.`),variance:uc.optional().describe(`Re-aim the variant (persona/aesthetic/context/seedPrompt); keeps the agreed contract.`)}).strict().refine(e=>e.contract!==void 0||e.variance!==void 0,{message:`override must set contract and/or variance — omit override entirely to ACCEPT the handshake proposal as-is.`}).optional().describe(`Omit to ACCEPT the proposal as-is. Provide to re-aim contract and/or variance (PATCH semantics).`)});var xc=z({hit:Io().describe(`True when a stored component was served without generating new code.`),similarity:R().optional().describe(`Cosine similarity of the matched component to the request (semantic match only).`),cachedBlueprintId:F().optional().describe(`The stored component id that was matched. Equals top-level blueprintId on a hit.`),llmCallsAvoided:R().describe(`Generation calls skipped by serving the stored component (0 on a fresh generation).`),kind:ts([`full-template`,`cold`]).optional().describe(`full-template = a whole stored component was served; cold = freshly generated.`),reason:F().optional().describe(`Compact human-readable explanation of the cache outcome — why this render reused a stored component or generated cold. Diagnostic; default-available without the verbose env-gated trace.`)}),Sc=z({code:ts([`PRODUCTION_FAILED`,`VALIDATION_ERROR`,`NO_PLATFORM_KEY`,`NO_CREDENTIALS`,`GENERATION_QUEUE_OVERLOADED`]).describe(`Canonical failure class. PRODUCTION_FAILED: generation did not produce a component. VALIDATION_ERROR: a server-side precondition rejected the render before generation. NO_PLATFORM_KEY: the server's managed provider-key configuration has no key for the resolved route. NO_CREDENTIALS: no generation credentials are configured on the server. GENERATION_QUEUE_OVERLOADED: the deployment's admission gate rejected the request before generation started (queue full or wait timed out) — not a failed attempt; safe to retry immediately.`),message:F().describe(`Human-readable failure detail — fold into the next attempt or surface to the operator.`)});z({code:ts([`NOT_FOUND`,`BLUEPRINT_UNRESOLVABLE`,`NOT_SUPPORTED`,`NOT_MOUNTABLE`]).describe(`Canonical failure class. NOT_FOUND: no live render and no restorable record (also the response when the caller may not read this locator). BLUEPRINT_UNRESOLVABLE: a record exists but the component behind it is gone. NOT_SUPPORTED: this server keeps no durable record, so an evicted locator can never be restored. NOT_MOUNTABLE: the render resolved but no delivery channel is available.`),message:F().describe(`Human-readable failure detail. Replaced by a constant on NOT_FOUND.`),detail:F().optional().describe(`Extra diagnostic context for operators. Dropped on NOT_FOUND so a denied read cannot be told apart from a miss.`)}),z({sessionId:F(),resourceUri:F().optional().describe(`MCP-Apps mount URI (ui://ggui/render/{id}). Present iff the render is mountable; absent on a failed render.`),action:ts([`create`,`reuse`,`update`,`replace`,`declined`]),contractHash:F().describe(`Canonical hash of the rendered data contract (shape only — fields, types, specs). Same hash ⟺ same data flow.`),blueprintId:F().describe(`Opaque id of the materialised component for this render. On the handshake-decided reuse paths (accept a cache-origin proposal, or a variance re-aim that resolves to an existing variant) it is the stored id — equal ids across renders mean the same stored component. override.contract always generates cold and mints a fresh id, even for an identical contract.`),variantKey:F().describe(`Canonical hash of the design-time variance (persona, aesthetic, seed prompt, context). With contractHash it forms the reuse key: the same pair reuses one component; a different variant of the same contract gets its own.`),cache:xc.describe(`Reuse outcome for this render: whether a stored component was served, its similarity, the matched component id, and how many generation calls that avoided.`),error:Sc.optional().describe(`Present iff the tool result is isError — canonical {code, message} for a failed/rejected generation. Absent on success.`),nextStep:z({tool:B(`ggui_consume`),description:F(),example:F(),args:z({sessionId:F(),timeout:R()})}).optional().describe(`Required-next-call hint — when the rendered contract has actions, points the agent at ggui_consume({sessionId, timeout}) for the inbound action loop. Absent for pure-display renders.`)}),Yo(`kind`,[z({sessionId:F().describe(`GguiSession opaque id (UUID) — returned by ggui_render.`),kind:B(`replace`),props:$o(F(),Bo()).describe(`Full replacement props map. New map IS the new state, rendered as a NEW card (a new history entry). For an in-place repaint of the mounted card use ggui_amend.`)}).strict(),z({sessionId:F().describe(`GguiSession opaque id (UUID) — returned by ggui_render.`),kind:B(`merge`),patch:$o(F(),Bo()).describe(`RFC 7396 JSON Merge Patch — null deletes a key; arrays fully replace. The merged state renders as a NEW card (a new history entry). For an in-place repaint of the mounted card use ggui_amend.`)}).strict()]),Yo(`kind`,[z({sessionId:F().describe(`GguiSession opaque id (UUID) — returned by ggui_render.`),kind:B(`replace`),props:$o(F(),Bo()).describe(`Full replacement props map, applied to the currently mounted card in place.`)}).strict(),z({sessionId:F().describe(`GguiSession opaque id (UUID) — returned by ggui_render.`),kind:B(`merge`),patch:$o(F(),Bo()).describe(`RFC 7396 JSON Merge Patch — null deletes a key; arrays fully replace. Applied to the currently mounted card in place.`)}).strict()]),z({sessionId:F(),updated:Io(),resourceUri:F(),epoch:R().int().min(0),warning:F().optional(),propsSchemaHash:F().optional(),propsSchemaProfile:F().optional()}),z({sessionId:F(),updated:Io(),resourceUri:F(),warning:F().optional(),propsSchemaHash:F().optional(),propsSchemaProfile:F().optional()}),z({toolCatalog:$o(F(),z({name:F(),version:F().optional()}).strict()).describe(`Per-app canonical tool identities: bare tool name -> its server's initialize-declared serverInfo. Host/library-supplied; not an agent action.`)}).strict(),z({saved:Io(),appId:F()}).strict();var Cc=z({seq:R().int().min(1).describe(`Monotonic, gap-free per render; starts at 1 (0 is the "no events yet" cursor sentinel, never an event).`),type:F().min(1).describe(`Wire-frame type — see the canonical GguiSessionEventType taxonomy; plain string so servers can mint new types without a protocol bump.`),timestamp:F().describe(`ISO 8601 UTC timestamp the server stamped on emission.`),data:Bo().describe(`Type-specific payload — structurally identical to the matching live-channel frame payload.`)});z({sessionId:F().min(1).describe('Active render id — sourced from `_meta["ai.ggui/render"].sessionId` on the iframe boot envelope. Unknown and cross-tenant ids surface uniformly as session_not_found.'),sinceSequence:R().int().min(0).optional().describe(`Replay cursor — only events with seq > sinceSequence return. Omit (= 0) on first pull; advance to the last event's seq (or lastSequence on an empty page) on every subsequent pull.`),limit:R().int().min(1).optional().describe(`Max events per page. Values above 100 are clamped to 100; omit for the default 100. When hasMore is true, immediately re-pull with the advanced cursor.`),wait:R().min(0).optional().describe(`Subscription-mode hold, in seconds. When set and the cursor page is empty, the server holds this call until an event lands or the hold elapses (values above 20 are clamped to 20). An empty page after a full hold is a NORMAL result — immediately re-pull to stay subscribed, or back off to sparse un-held pulls after a few consecutive empties. Omit (= 0) for an immediate return.`)}),qo([z({events:Wo(Cc),lastSequence:R().int().min(0),hasMore:Io()}),z({reason:B(`REPLAY_HORIZON_PASSED`),currentSequence:R().int().min(0)})]),z({sessionId:F().min(1).describe(`Render id the report concerns — sourced from the boot envelope. Client-claimed: used as a log tag only.`),events:Wo(z({at:R().min(0).describe(`Milliseconds since iframe boot (monotonic, client clock).`),kind:F().min(1).max(64).describe(`Event name — e.g. 'boot.path', 'status.connected', 'channel_failover_swap', 'doorbell.ring'.`),detail:F().max(512).optional().describe(`Optional compact context (JSON fragment or message).`)})).min(1).max(40).describe(`Batched ladder/doorbell events, oldest first.`)}),z({ok:B(!0)});var wc=Yo(`type`,[z({type:B(`text`),text:F()}),z({type:B(`tool_use`),id:F(),name:F(),input:$o(F(),Bo())}),z({type:B(`tool_result`),tool_use_id:F(),content:Bo(),is_error:Io().optional()})]),Tc=Yo(`type`,[z({type:B(`text_delta`),text:F()}),z({type:B(`input_json_delta`),partial_json:F()})]),Ec=z({type:B(`message_start`),message:z({id:F(),role:B(`assistant`),model:F().optional()})}),Dc=z({type:B(`content_block_start`),index:R().int().nonnegative(),content_block:wc}),Oc=z({type:B(`content_block_delta`),index:R().int().nonnegative(),delta:Tc}),kc=z({type:B(`content_block_stop`),index:R().int().nonnegative()}),Ac=z({type:B(`message_delta`),delta:z({stop_reason:ts([`end_turn`,`max_tokens`,`tool_use`,`error`]),stop_sequence:F().nullable().optional()}),usage:z({input_tokens:R().int().nonnegative(),output_tokens:R().int().nonnegative()})}),jc=z({type:B(`message_stop`)}),Mc=z({type:B(`ping`)}),Nc=ts([`invalid_request`,`unauthorized`,`rate_limited`,`invoke_in_progress`,`upstream_error`,`tool_error`,`internal`]);Yo(`type`,[Ec,Dc,Oc,kc,Ac,jc,Mc,z({type:B(`error`),error:z({code:Nc,message:F(),retryAfterMs:R().int().nonnegative().optional()})})]);var Pc=z({role:ts([`user`,`assistant`]),content:qo([F(),Wo(wc)])});z({message:F(),history:Wo(Pc).optional(),interfaceContext:bc.optional(),requestId:F().optional()});var Fc=/^--ggui-[a-zA-Z0-9-]+$/,Ic=F().min(1).max(256).regex(/^[^;{}<>@]*$/,`css value contains a disallowed character`).refine(e=>!e.includes(`/*`),`css value may not contain a comment`),Lc=$o(F().regex(Fc,`css var key must be --ggui-*`),Ic).refine(e=>Object.keys(e).length<=200,`too many css variables (max 200)`);z({mode:ts([`light`,`dark`]),cssVariables:Lc,name:F().min(1).max(64).optional(),base:z({documentHash:F().regex(/^[0-9a-f]{64}$/,`documentHash must be sha256 lowercase hex`),light:Lc,dark:Lc}).strict().optional()}).strict(),s(((e,t)=>{t.exports=function e(t){if(typeof t==`number`&&isNaN(t))throw Error(`NaN is not allowed`);if(typeof t==`number`&&!isFinite(t))throw Error(`Infinity is not allowed`);return typeof t!=`object`||!t?JSON.stringify(t):t.toJSON instanceof Function?e(t.toJSON()):Array.isArray(t)?`[${t.reduce((t,n,r)=>`${t}${r===0?``:`,`}${e(n===void 0||typeof n==`symbol`?null:n)}`,``)}]`:`{${Object.keys(t).sort().reduce((n,r)=>t[r]===void 0||typeof t[r]==`symbol`?n:`${n}${n.length===0?``:`,`}${e(r)}:${e(t[r])}`,``)}}`}}))();var Rc=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;var t=class{};e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var n=class extends t{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw Error(`CodeGen: name must be a valid identifier`);this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};e.Name=n;var r=class extends t{constructor(e){super(),this._items=typeof e==`string`?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===``||e===`""`}get str(){return this._str??=this._items.reduce((e,t)=>`${e}${t}`,``)}get names(){return this._names??=this._items.reduce((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e),{})}};e._Code=r,e.nil=new r(``);function i(e,...t){let n=[e[0]],i=0;for(;i<t.length;)s(n,t[i]),n.push(e[++i]);return new r(n)}e._=i;var a=new r(`+`);function o(e,...t){let n=[p(e[0])],i=0;for(;i<t.length;)n.push(a),s(n,t[i]),n.push(a,p(e[++i]));return c(n),new r(n)}e.str=o;function s(e,t){t instanceof r?e.push(...t._items):t instanceof n?e.push(t):e.push(d(t))}e.addCodeArg=s;function c(e){let t=1;for(;t<e.length-1;){if(e[t]===a){let n=l(e[t-1],e[t+1]);if(n!==void 0){e.splice(t-1,3,n);continue}e[t++]=`+`}t++}}function l(e,t){if(t===`""`)return e;if(e===`""`)return t;if(typeof e==`string`)return t instanceof n||e[e.length-1]!==`"`?void 0:typeof t==`string`?t[0]===`"`?e.slice(0,-1)+t.slice(1):void 0:`${e.slice(0,-1)}${t}"`;if(typeof t==`string`&&t[0]===`"`&&!(e instanceof n))return`"${e}${t.slice(1)}`}function u(e,t){return t.emptyStr()?e:e.emptyStr()?t:o`${e}${t}`}e.strConcat=u;function d(e){return typeof e==`number`||typeof e==`boolean`||e===null?e:p(Array.isArray(e)?e.join(`,`):e)}function f(e){return new r(p(e))}e.stringify=f;function p(e){return JSON.stringify(e).replace(/\u2028/g,`\\u2028`).replace(/\u2029/g,`\\u2029`)}e.safeStringify=p;function m(t){return typeof t==`string`&&e.IDENTIFIER.test(t)?new r(`.${t}`):i`[${t}]`}e.getProperty=m;function h(t){if(typeof t==`string`&&e.IDENTIFIER.test(t))return new r(`${t}`);throw Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}e.getEsmExportName=h;function g(e){return new r(e.toString())}e.regexpCode=g})),zc=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;var t=Rc(),n=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},r;(function(e){e[e.Started=0]=`Started`,e[e.Completed=1]=`Completed`})(r||(e.UsedValueState=r={})),e.varKinds={const:new t.Name(`const`),let:new t.Name(`let`),var:new t.Name(`var`)};var i=class{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof t.Name?e:this.name(e)}name(e){return new t.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){if((this._parent?._prefixes)?.has(e)||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};e.Scope=i;var a=class extends t.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:n,itemIndex:r}){this.value=e,this.scopePath=(0,t._)`.${new t.Name(n)}[${r}]`}};e.ValueScopeName=a;var o=(0,t._)`\n`;e.ValueScope=class extends i{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?o:t.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){if(t.ref===void 0)throw Error(`CodeGen: ref must be passed in value`);let n=this.toName(e),{prefix:r}=n,i=t.key??t.ref,a=this._values[r];if(a){let e=a.get(i);if(e)return e}else a=this._values[r]=new Map;a.set(i,n);let o=this._scope[r]||(this._scope[r]=[]),s=o.length;return o[s]=t.ref,n.setValue(t,{property:r,itemIndex:s}),n}getValue(e,t){let n=this._values[e];if(n)return n.get(t)}scopeRefs(e,n=this._values){return this._reduceValues(n,n=>{if(n.scopePath===void 0)throw Error(`CodeGen: name "${n}" has no value`);return(0,t._)`${e}${n.scopePath}`})}scopeCode(e=this._values,t,n){return this._reduceValues(e,e=>{if(e.value===void 0)throw Error(`CodeGen: name "${e}" has no value`);return e.value.code},t,n)}_reduceValues(i,a,o={},s){let c=t.nil;for(let l in i){let u=i[l];if(!u)continue;let d=o[l]=o[l]||new Map;u.forEach(i=>{if(d.has(i))return;d.set(i,r.Started);let o=a(i);if(o){let n=this.opts.es5?e.varKinds.var:e.varKinds.const;c=(0,t._)`${c}${n} ${i} = ${o};${this.opts._n}`}else if(o=s?.(i))c=(0,t._)`${c}${o}${this.opts._n}`;else throw new n(i);d.set(i,r.Completed)})}return c}}})),V=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;var t=Rc(),n=zc(),r=Rc();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}});var i=zc();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),e.operators={GT:new t._Code(`>`),GTE:new t._Code(`>=`),LT:new t._Code(`<`),LTE:new t._Code(`<=`),EQ:new t._Code(`===`),NEQ:new t._Code(`!==`),NOT:new t._Code(`!`),OR:new t._Code(`||`),AND:new t._Code(`&&`),ADD:new t._Code(`+`)};var a=class{optimizeNodes(){return this}optimizeNames(e,t){return this}},o=class extends a{constructor(e,t,n){super(),this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){let r=e?n.varKinds.var:this.varKind,i=this.rhs===void 0?``:` = ${this.rhs}`;return`${r} ${this.name}${i};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&=re(this.rhs,e,t),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}},s=class extends a{constructor(e,t,n){super(),this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,n){if(!(this.lhs instanceof t.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=re(this.rhs,e,n),this}get names(){return ne(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}},c=class extends s{constructor(e,t,n,r){super(e,n,r),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},l=class extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},u=class extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:``};`+e}},d=class extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},f=class extends a{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=re(this.code,e,t),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}},p=class extends a{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,n)=>t+n.render(e),``)}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let n=e[t].optimizeNodes();Array.isArray(n)?e.splice(t,1,...n):n?e[t]=n:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:n}=this,r=n.length;for(;r--;){let i=n[r];i.optimizeNames(e,t)||(ie(e,i.names),n.splice(r,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>te(e,t.names),{})}},m=class extends p{render(e){return`{`+e._n+super.render(e)+`}`+e._n}},h=class extends p{},g=class extends m{};g.kind=`else`;var _=class e extends m{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+=`else `+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let n=this.else;if(n){let e=n.optimizeNodes();n=this.else=Array.isArray(e)?new g(e):e}if(n)return t===!1?n instanceof e?n:n.nodes:this.nodes.length?this:new e(E(t),n instanceof e?[n]:n.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(e,t){if(this.else=this.else?.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=re(this.condition,e,t),this}get names(){let e=super.names;return ne(e,this.condition),this.else&&te(e,this.else.names),e}};_.kind=`if`;var v=class extends m{};v.kind=`for`;var y=class extends v{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=re(this.iteration,e,t),this}get names(){return te(super.names,this.iteration.names)}},b=class extends v{constructor(e,t,n,r){super(),this.varKind=e,this.name=t,this.from=n,this.to=r}render(e){let t=e.es5?n.varKinds.var:this.varKind,{name:r,from:i,to:a}=this;return`for(${t} ${r}=${i}; ${r}<${a}; ${r}++)`+super.render(e)}get names(){return ne(ne(super.names,this.from),this.to)}},x=class extends v{constructor(e,t,n,r){super(),this.loop=e,this.varKind=t,this.name=n,this.iterable=r}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=re(this.iterable,e,t),this}get names(){return te(super.names,this.iterable.names)}},S=class extends m{constructor(e,t,n){super(),this.name=e,this.args=t,this.async=n}render(e){return`${this.async?`async `:``}function ${this.name}(${this.args})`+super.render(e)}};S.kind=`func`;var C=class extends p{render(e){return`return `+super.render(e)}};C.kind=`return`;var w=class extends m{render(e){let t=`try`+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)==null||e.optimizeNodes(),(t=this.finally)==null||t.optimizeNodes(),this}optimizeNames(e,t){var n,r;return super.optimizeNames(e,t),(n=this.catch)==null||n.optimizeNames(e,t),(r=this.finally)==null||r.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&te(e,this.catch.names),this.finally&&te(e,this.finally.names),e}},T=class extends m{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};T.kind=`catch`;var ee=class extends m{render(e){return`finally`+super.render(e)}};ee.kind=`finally`,e.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
|
|
73
73
|
`:``},this._extScope=e,this._scope=new n.Scope({parent:e}),this._nodes=[new h]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,n,r){let i=this._scope.toName(t);return n!==void 0&&r&&(this._constants[i.str]=n),this._leafNode(new o(e,i,n)),i}const(e,t,r){return this._def(n.varKinds.const,e,t,r)}let(e,t,r){return this._def(n.varKinds.let,e,t,r)}var(e,t,r){return this._def(n.varKinds.var,e,t,r)}assign(e,t,n){return this._leafNode(new s(e,t,n))}add(t,n){return this._leafNode(new c(t,e.operators.ADD,n))}code(e){return typeof e==`function`?e():e!==t.nil&&this._leafNode(new f(e)),this}object(...e){let n=[`{`];for(let[r,i]of e)n.length>1&&n.push(`,`),n.push(r),(r!==i||this.opts.es5)&&(n.push(`:`),(0,t.addCodeArg)(n,i));return n.push(`}`),new t._Code(n)}if(e,t,n){if(this._blockNode(new _(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw Error(`CodeGen: "else" body without "then" body`);return this}elseIf(e){return this._elseNode(new _(e))}else(){return this._elseNode(new g)}endIf(){return this._endBlockNode(_,g)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new y(e),t)}forRange(e,t,r,i,a=this.opts.es5?n.varKinds.var:n.varKinds.let){let o=this._scope.toName(e);return this._for(new b(a,o,t,r),()=>i(o))}forOf(e,r,i,a=n.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let e=r instanceof t.Name?r:this.var(`_arr`,r);return this.forRange(`_i`,0,(0,t._)`${e}.length`,n=>{this.var(o,(0,t._)`${e}[${n}]`),i(o)})}return this._for(new x(`of`,a,o,r),()=>i(o))}forIn(e,r,i,a=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,t._)`Object.keys(${r})`,i);let o=this._scope.toName(e);return this._for(new x(`in`,a,o,r),()=>i(o))}endFor(){return this._endBlockNode(v)}label(e){return this._leafNode(new l(e))}break(e){return this._leafNode(new u(e))}return(e){let t=new C;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw Error(`CodeGen: "return" should have one node`);return this._endBlockNode(C)}try(e,t,n){if(!t&&!n)throw Error(`CodeGen: "try" without "catch" and "finally"`);let r=new w;if(this._blockNode(r),this.code(e),t){let e=this.name(`e`);this._currNode=r.catch=new T(e),t(e)}return n&&(this._currNode=r.finally=new ee,this.code(n)),this._endBlockNode(T,ee)}throw(e){return this._leafNode(new d(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw Error(`CodeGen: not in self-balancing block`);let n=this._nodes.length-t;if(n<0||e!==void 0&&n!==e)throw Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=t,this}func(e,n=t.nil,r,i){return this._blockNode(new S(e,n,r)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(S)}optimize(e=1){for(;e-->0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let n=this._currNode;if(n instanceof e||t&&n instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof _))throw Error(`CodeGen: "else" without "if"`);return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}};function te(e,t){for(let n in t)e[n]=(e[n]||0)+(t[n]||0);return e}function ne(e,n){return n instanceof t._CodeOrName?te(e,n.names):e}function re(e,n,r){if(e instanceof t.Name)return i(e);if(!a(e))return e;return new t._Code(e._items.reduce((e,n)=>(n instanceof t.Name&&(n=i(n)),n instanceof t._Code?e.push(...n._items):e.push(n),e),[]));function i(e){let t=r[e.str];return t===void 0||n[e.str]!==1?e:(delete n[e.str],t)}function a(e){return e instanceof t._Code&&e._items.some(e=>e instanceof t.Name&&n[e.str]===1&&r[e.str]!==void 0)}}function ie(e,t){for(let n in t)e[n]=(e[n]||0)-(t[n]||0)}function E(e){return typeof e==`boolean`||typeof e==`number`||e===null?!e:(0,t._)`!${O(e)}`}e.not=E;var ae=D(e.operators.AND);function oe(...e){return e.reduce(ae)}e.and=oe;var se=D(e.operators.OR);function ce(...e){return e.reduce(se)}e.or=ce;function D(e){return(n,r)=>n===t.nil?r:r===t.nil?n:(0,t._)`${O(n)} ${e} ${O(r)}`}function O(e){return e instanceof t.Name?e:(0,t._)`(${e})`}})),H=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;var t=V(),n=Rc();function r(e){let t={};for(let n of e)t[n]=!0;return t}e.toHash=r;function i(e,t){return typeof t==`boolean`?t:Object.keys(t).length===0||(a(e,t),!o(t,e.self.RULES.all))}e.alwaysValidSchema=i;function a(e,t=e.schema){let{opts:n,self:r}=e;if(!n.strictSchema||typeof t==`boolean`)return;let i=r.RULES.keywords;for(let n in t)i[n]||x(e,`unknown keyword: "${n}"`)}e.checkUnknownRules=a;function o(e,t){if(typeof e==`boolean`)return!e;for(let n in e)if(t[n])return!0;return!1}e.schemaHasRules=o;function s(e,t){if(typeof e==`boolean`)return!e;for(let n in e)if(n!==`$ref`&&t.all[n])return!0;return!1}e.schemaHasRulesButRef=s;function c({topSchemaRef:e,schemaPath:n},r,i,a){if(!a){if(typeof r==`number`||typeof r==`boolean`)return r;if(typeof r==`string`)return(0,t._)`${r}`}return(0,t._)`${e}${n}${(0,t.getProperty)(i)}`}e.schemaRefOrVal=c;function l(e){return f(decodeURIComponent(e))}e.unescapeFragment=l;function u(e){return encodeURIComponent(d(e))}e.escapeFragment=u;function d(e){return typeof e==`number`?`${e}`:e.replace(/~/g,`~0`).replace(/\//g,`~1`)}e.escapeJsonPointer=d;function f(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}e.unescapeJsonPointer=f;function p(e,t){if(Array.isArray(e))for(let n of e)t(n);else t(e)}e.eachItem=p;function m({mergeNames:e,mergeToName:n,mergeValues:r,resultToName:i}){return(a,o,s,c)=>{let l=s===void 0?o:s instanceof t.Name?(o instanceof t.Name?e(a,o,s):n(a,o,s),s):o instanceof t.Name?(n(a,s,o),o):r(o,s);return c===t.Name&&!(l instanceof t.Name)?i(a,l):l}}e.mergeEvaluated={props:m({mergeNames:(e,n,r)=>e.if((0,t._)`${r} !== true && ${n} !== undefined`,()=>{e.if((0,t._)`${n} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,t._)`${r} || {}`).code((0,t._)`Object.assign(${r}, ${n})`))}),mergeToName:(e,n,r)=>e.if((0,t._)`${r} !== true`,()=>{n===!0?e.assign(r,!0):(e.assign(r,(0,t._)`${r} || {}`),g(e,r,n))}),mergeValues:(e,t)=>e===!0||{...e,...t},resultToName:h}),items:m({mergeNames:(e,n,r)=>e.if((0,t._)`${r} !== true && ${n} !== undefined`,()=>e.assign(r,(0,t._)`${n} === true ? true : ${r} > ${n} ? ${r} : ${n}`)),mergeToName:(e,n,r)=>e.if((0,t._)`${r} !== true`,()=>e.assign(r,n===!0||(0,t._)`${r} > ${n} ? ${r} : ${n}`)),mergeValues:(e,t)=>e===!0||Math.max(e,t),resultToName:(e,t)=>e.var(`items`,t)})};function h(e,n){if(n===!0)return e.var(`props`,!0);let r=e.var(`props`,(0,t._)`{}`);return n!==void 0&&g(e,r,n),r}e.evaluatedPropsToName=h;function g(e,n,r){Object.keys(r).forEach(r=>e.assign((0,t._)`${n}${(0,t.getProperty)(r)}`,!0))}e.setEvaluated=g;var _={};function v(e,t){return e.scopeValue(`func`,{ref:t,code:_[t.code]||(_[t.code]=new n._Code(t.code))})}e.useFunc=v;var y;(function(e){e[e.Num=0]=`Num`,e[e.Str=1]=`Str`})(y||(e.Type=y={}));function b(e,n,r){if(e instanceof t.Name){let i=n===y.Num;return r?i?(0,t._)`"[" + ${e} + "]"`:(0,t._)`"['" + ${e} + "']"`:i?(0,t._)`"/" + ${e}`:(0,t._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,t.getProperty)(e).toString():`/`+d(e)}e.getErrorPath=b;function x(e,t,n=e.opts.strictSchema){if(n){if(t=`strict mode: ${t}`,n===!0)throw Error(t);e.self.logger.warn(t)}}e.checkStrictMode=x})),Bc=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=V();e.default={data:new t.Name(`data`),valCxt:new t.Name(`valCxt`),instancePath:new t.Name(`instancePath`),parentData:new t.Name(`parentData`),parentDataProperty:new t.Name(`parentDataProperty`),rootData:new t.Name(`rootData`),dynamicAnchors:new t.Name(`dynamicAnchors`),vErrors:new t.Name(`vErrors`),errors:new t.Name(`errors`),this:new t.Name(`this`),self:new t.Name(`self`),scope:new t.Name(`scope`),json:new t.Name(`json`),jsonPos:new t.Name(`jsonPos`),jsonLen:new t.Name(`jsonLen`),jsonPart:new t.Name(`jsonPart`)}})),Vc=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;var t=V(),n=H(),r=Bc();e.keywordError={message:({keyword:e})=>(0,t.str)`must pass "${e}" keyword validation`},e.keyword$DataError={message:({keyword:e,schemaType:n})=>n?(0,t.str)`"${e}" keyword must be ${n} ($data)`:(0,t.str)`"${e}" keyword is invalid ($data)`};function i(n,r=e.keywordError,i,a){let{it:o}=n,{gen:s,compositeRule:u,allErrors:f}=o,p=d(n,r,i);a??(u||f)?c(s,p):l(o,(0,t._)`[${p}]`)}e.reportError=i;function a(t,n=e.keywordError,i){let{it:a}=t,{gen:o,compositeRule:s,allErrors:u}=a;c(o,d(t,n,i)),s||u||l(a,r.default.vErrors)}e.reportExtraError=a;function o(e,n){e.assign(r.default.errors,n),e.if((0,t._)`${r.default.vErrors} !== null`,()=>e.if(n,()=>e.assign((0,t._)`${r.default.vErrors}.length`,n),()=>e.assign(r.default.vErrors,null)))}e.resetErrorsCount=o;function s({gen:e,keyword:n,schemaValue:i,data:a,errsCount:o,it:s}){if(o===void 0)throw Error(`ajv implementation error`);let c=e.name(`err`);e.forRange(`i`,o,r.default.errors,o=>{e.const(c,(0,t._)`${r.default.vErrors}[${o}]`),e.if((0,t._)`${c}.instancePath === undefined`,()=>e.assign((0,t._)`${c}.instancePath`,(0,t.strConcat)(r.default.instancePath,s.errorPath))),e.assign((0,t._)`${c}.schemaPath`,(0,t.str)`${s.errSchemaPath}/${n}`),s.opts.verbose&&(e.assign((0,t._)`${c}.schema`,i),e.assign((0,t._)`${c}.data`,a))})}e.extendErrors=s;function c(e,n){let i=e.const(`err`,n);e.if((0,t._)`${r.default.vErrors} === null`,()=>e.assign(r.default.vErrors,(0,t._)`[${i}]`),(0,t._)`${r.default.vErrors}.push(${i})`),e.code((0,t._)`${r.default.errors}++`)}function l(e,n){let{gen:r,validateName:i,schemaEnv:a}=e;a.$async?r.throw((0,t._)`new ${e.ValidationError}(${n})`):(r.assign((0,t._)`${i}.errors`,n),r.return(!1))}var u={keyword:new t.Name(`keyword`),schemaPath:new t.Name(`schemaPath`),params:new t.Name(`params`),propertyName:new t.Name(`propertyName`),message:new t.Name(`message`),schema:new t.Name(`schema`),parentSchema:new t.Name(`parentSchema`)};function d(e,n,r){let{createErrors:i}=e.it;return i===!1?(0,t._)`{}`:f(e,n,r)}function f(e,t,n={}){let{gen:r,it:i}=e,a=[p(i,n),m(e,n)];return h(e,t,a),r.object(...a)}function p({errorPath:e},{instancePath:i}){let a=i?(0,t.str)`${e}${(0,n.getErrorPath)(i,n.Type.Str)}`:e;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,a)]}function m({keyword:e,it:{errSchemaPath:r}},{schemaPath:i,parentSchema:a}){let o=a?r:(0,t.str)`${r}/${e}`;return i&&(o=(0,t.str)`${o}${(0,n.getErrorPath)(i,n.Type.Str)}`),[u.schemaPath,o]}function h(e,{params:n,message:i},a){let{keyword:o,data:s,schemaValue:c,it:l}=e,{opts:d,propertyName:f,topSchemaRef:p,schemaPath:m}=l;a.push([u.keyword,o],[u.params,typeof n==`function`?n(e):n||(0,t._)`{}`]),d.messages&&a.push([u.message,typeof i==`function`?i(e):i]),d.verbose&&a.push([u.schema,c],[u.parentSchema,(0,t._)`${p}${m}`],[r.default.data,s]),f&&a.push([u.propertyName,f])}})),Hc=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;var t=Vc(),n=V(),r=Bc(),i={message:`boolean schema is false`};function a(e){let{gen:t,schema:i,validateName:a}=e;i===!1?s(e,!1):typeof i==`object`&&i.$async===!0?t.return(r.default.data):(t.assign((0,n._)`${a}.errors`,null),t.return(!0))}e.topBoolOrEmptySchema=a;function o(e,t){let{gen:n,schema:r}=e;r===!1?(n.var(t,!1),s(e)):n.var(t,!0)}e.boolOrEmptySchema=o;function s(e,n){let{gen:r,data:a}=e,o={gen:r,keyword:`false schema`,data:a,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,t.reportError)(o,i,void 0,n)}})),Uc=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getRules=e.isJSONType=void 0;var t=new Set([`string`,`number`,`integer`,`boolean`,`null`,`object`,`array`]);function n(e){return typeof e==`string`&&t.has(e)}e.isJSONType=n;function r(){let e={number:{type:`number`,rules:[]},string:{type:`string`,rules:[]},array:{type:`array`,rules:[]},object:{type:`object`,rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}e.getRules=r})),Wc=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.shouldUseRule=e.shouldUseGroup=e.schemaHasRulesForType=void 0;function t({schema:e,self:t},r){let i=t.RULES.types[r];return i&&i!==!0&&n(e,i)}e.schemaHasRulesForType=t;function n(e,t){return t.rules.some(t=>r(e,t))}e.shouldUseGroup=n;function r(e,t){return e[t.keyword]!==void 0||t.definition.implements?.some(t=>e[t]!==void 0)}e.shouldUseRule=r})),Gc=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;var t=Uc(),n=Wc(),r=Vc(),i=V(),a=H(),o;(function(e){e[e.Correct=0]=`Correct`,e[e.Wrong=1]=`Wrong`})(o||(e.DataType=o={}));function s(e){let t=c(e.type);if(t.includes(`null`)){if(e.nullable===!1)throw Error(`type: null contradicts nullable: false`)}else{if(!t.length&&e.nullable!==void 0)throw Error(`"nullable" cannot be used without "type"`);e.nullable===!0&&t.push(`null`)}return t}e.getSchemaTypes=s;function c(e){let n=Array.isArray(e)?e:e?[e]:[];if(n.every(t.isJSONType))return n;throw Error(`type must be JSONType or JSONType[]: `+n.join(`,`))}e.getJSONTypes=c;function l(e,t){let{gen:r,data:i,opts:a}=e,s=d(t,a.coerceTypes),c=t.length>0&&!(s.length===0&&t.length===1&&(0,n.schemaHasRulesForType)(e,t[0]));if(c){let n=h(t,i,a.strictNumbers,o.Wrong);r.if(n,()=>{s.length?f(e,t,s):_(e)})}return c}e.coerceAndCheckDataType=l;var u=new Set([`string`,`number`,`integer`,`boolean`,`null`]);function d(e,t){return t?e.filter(e=>u.has(e)||t===`array`&&e===`array`):[]}function f(e,t,n){let{gen:r,data:a,opts:o}=e,s=r.let(`dataType`,(0,i._)`typeof ${a}`),c=r.let(`coerced`,(0,i._)`undefined`);o.coerceTypes===`array`&&r.if((0,i._)`${s} == 'object' && Array.isArray(${a}) && ${a}.length == 1`,()=>r.assign(a,(0,i._)`${a}[0]`).assign(s,(0,i._)`typeof ${a}`).if(h(t,a,o.strictNumbers),()=>r.assign(c,a))),r.if((0,i._)`${c} !== undefined`);for(let e of n)(u.has(e)||e===`array`&&o.coerceTypes===`array`)&&l(e);r.else(),_(e),r.endIf(),r.if((0,i._)`${c} !== undefined`,()=>{r.assign(a,c),p(e,c)});function l(e){switch(e){case`string`:r.elseIf((0,i._)`${s} == "number" || ${s} == "boolean"`).assign(c,(0,i._)`"" + ${a}`).elseIf((0,i._)`${a} === null`).assign(c,(0,i._)`""`);return;case`number`:r.elseIf((0,i._)`${s} == "boolean" || ${a} === null
|
|
74
74
|
|| (${s} == "string" && ${a} && ${a} == +${a})`).assign(c,(0,i._)`+${a}`);return;case`integer`:r.elseIf((0,i._)`${s} === "boolean" || ${a} === null
|
|
75
75
|
|| (${s} === "string" && ${a} && ${a} == +${a} && !(${a} % 1))`).assign(c,(0,i._)`+${a}`);return;case`boolean`:r.elseIf((0,i._)`${a} === "false" || ${a} === 0 || ${a} === null`).assign(c,!1).elseIf((0,i._)`${a} === "true" || ${a} === 1`).assign(c,!0);return;case`null`:r.elseIf((0,i._)`${a} === "" || ${a} === 0 || ${a} === false`),r.assign(c,null);return;case`array`:r.elseIf((0,i._)`${s} === "string" || ${s} === "number"
|
|
@@ -157,7 +157,7 @@ ${r.join(`
|
|
|
157
157
|
${bm(t)}
|
|
158
158
|
}`,r=Sm(t),i=r?`${n}
|
|
159
159
|
|
|
160
|
-
${r}`:n;return{id:e,name:t.$name,description:t.$description,metadata:t.$metadata,cssVariables:n,cssKeyframes:r,css:i}}({version:1,tokens:`--ggui-color-container.--ggui-color-error-100.--ggui-color-error-200.--ggui-color-error-50.--ggui-color-error-500.--ggui-color-error-600.--ggui-color-error-700.--ggui-color-error-800.--ggui-color-info-100.--ggui-color-info-200.--ggui-color-info-50.--ggui-color-info-500.--ggui-color-info-700.--ggui-color-info-800.--ggui-color-neutral-100.--ggui-color-neutral-200.--ggui-color-neutral-300.--ggui-color-neutral-400.--ggui-color-neutral-50.--ggui-color-neutral-500.--ggui-color-neutral-600.--ggui-color-neutral-800.--ggui-color-onContainer.--ggui-color-onError.--ggui-color-onPrimary.--ggui-color-onSurface.--ggui-color-onSurfaceVariant.--ggui-color-outline.--ggui-color-outlineVariant.--ggui-color-primary.--ggui-color-primary-100.--ggui-color-primary-200.--ggui-color-primary-300.--ggui-color-primary-400.--ggui-color-primary-50.--ggui-color-primary-500.--ggui-color-primary-600.--ggui-color-primary-700.--ggui-color-primary-800.--ggui-color-primary-900.--ggui-color-success-100.--ggui-color-success-200.--ggui-color-success-50.--ggui-color-success-500.--ggui-color-success-700.--ggui-color-success-800.--ggui-color-surface.--ggui-color-surface-gradient.--ggui-color-surface-subtle.--ggui-color-surface-sunken.--ggui-color-surfaceVariant.--ggui-color-warning-100.--ggui-color-warning-200.--ggui-color-warning-50.--ggui-color-warning-500.--ggui-color-warning-700.--ggui-color-warning-800.--ggui-flash-color.--ggui-font-family-mono.--ggui-font-family-sans.--ggui-font-lineHeight-normal.--ggui-font-size-2xl.--ggui-font-size-3xl.--ggui-font-size-4xl.--ggui-font-size-base.--ggui-font-size-lg.--ggui-font-size-sm.--ggui-font-size-xl.--ggui-font-size-xs.--ggui-font-weight-bold.--ggui-font-weight-medium.--ggui-font-weight-normal.--ggui-font-weight-semibold.--ggui-radius-md.--ggui-radius-sm.--ggui-shape-radius-full.--ggui-shape-radius-lg.--ggui-shape-radius-md.--ggui-shape-radius-sm.--ggui-shape-radius-xl.--ggui-shape-shadow-lg.--ggui-shape-shadow-md.--ggui-shape-shadow-sm.--ggui-shape-shadow-xl.--ggui-spacing-1.--ggui-spacing-10.--ggui-spacing-12.--ggui-spacing-2.--ggui-spacing-2xl.--ggui-spacing-3.--ggui-spacing-4.--ggui-spacing-5.--ggui-spacing-6.--ggui-spacing-8.--ggui-spacing-lg.--ggui-spacing-md.--ggui-spacing-sm.--ggui-spacing-xl.--ggui-spacing-xs`.split(`.`)}).tokens;var wm={light:{success:{50:{$type:`color`,$value:`#f0fdf4`},100:{$type:`color`,$value:`#dcfce7`},200:{$type:`color`,$value:`#bbf7d0`},500:{$type:`color`,$value:`#22c55e`},600:{$type:`color`,$value:`#16a34a`},700:{$type:`color`,$value:`#15803d`},800:{$type:`color`,$value:`#166534`}},warning:{50:{$type:`color`,$value:`#fffbeb`},100:{$type:`color`,$value:`#fef3c7`},200:{$type:`color`,$value:`#fde68a`},500:{$type:`color`,$value:`#f59e0b`},600:{$type:`color`,$value:`#d97706`},700:{$type:`color`,$value:`#b45309`},800:{$type:`color`,$value:`#92400e`}},error:{50:{$type:`color`,$value:`#fef2f2`},100:{$type:`color`,$value:`#fee2e2`},200:{$type:`color`,$value:`#fecaca`},500:{$type:`color`,$value:`#ef4444`},600:{$type:`color`,$value:`#dc2626`},700:{$type:`color`,$value:`#b91c1c`},800:{$type:`color`,$value:`#991b1b`}},info:{50:{$type:`color`,$value:`#ecfeff`},100:{$type:`color`,$value:`#cffafe`},200:{$type:`color`,$value:`#a5f3fc`},500:{$type:`color`,$value:`#06b6d4`},600:{$type:`color`,$value:`#0891b2`},700:{$type:`color`,$value:`#0e7490`},800:{$type:`color`,$value:`#155e75`}}},dark:{success:{50:{$type:`color`,$value:`#052e16`},100:{$type:`color`,$value:`#14532d`},200:{$type:`color`,$value:`#166534`},500:{$type:`color`,$value:`#22c55e`},600:{$type:`color`,$value:`#4ade80`},700:{$type:`color`,$value:`#86efac`},800:{$type:`color`,$value:`#bbf7d0`}},warning:{50:{$type:`color`,$value:`#451a03`},100:{$type:`color`,$value:`#78350f`},200:{$type:`color`,$value:`#92400e`},500:{$type:`color`,$value:`#f59e0b`},600:{$type:`color`,$value:`#fbbf24`},700:{$type:`color`,$value:`#fcd34d`},800:{$type:`color`,$value:`#fde68a`}},error:{50:{$type:`color`,$value:`#450a0a`},100:{$type:`color`,$value:`#7f1d1d`},200:{$type:`color`,$value:`#991b1b`},500:{$type:`color`,$value:`#ef4444`},600:{$type:`color`,$value:`#f87171`},700:{$type:`color`,$value:`#fca5a5`},800:{$type:`color`,$value:`#fecaca`}},info:{50:{$type:`color`,$value:`#083344`},100:{$type:`color`,$value:`#164e63`},200:{$type:`color`,$value:`#155e75`},500:{$type:`color`,$value:`#06b6d4`},600:{$type:`color`,$value:`#22d3ee`},700:{$type:`color`,$value:`#67e8f9`},800:{$type:`color`,$value:`#a5f3fc`}}}},Tm={light:{focusRing:{color:{$type:`color`,$value:`#0284c7`},width:{$type:`dimension`,$value:`2px`},offset:{$type:`dimension`,$value:`2px`}},reducedMotion:{duration:{$type:`duration`,$value:`0ms`}},highContrast:{borderWidth:{$type:`dimension`,$value:`2px`},textColor:{$type:`color`,$value:`#000000`},backgroundColor:{$type:`color`,$value:`#ffffff`},linkColor:{$type:`color`,$value:`#0369a1`}}},dark:{focusRing:{color:{$type:`color`,$value:`#38bdf8`},width:{$type:`dimension`,$value:`2px`},offset:{$type:`dimension`,$value:`2px`}},reducedMotion:{duration:{$type:`duration`,$value:`0ms`}},highContrast:{borderWidth:{$type:`dimension`,$value:`2px`},textColor:{$type:`color`,$value:`#f1f5f9`},backgroundColor:{$type:`color`,$value:`#0f172a`},linkColor:{$type:`color`,$value:`#7dd3fc`}}}},Em={hide:{$type:`number`,$value:-1},base:{$type:`number`,$value:0},docked:{$type:`number`,$value:10},dropdown:{$type:`number`,$value:1e3},sticky:{$type:`number`,$value:1100},banner:{$type:`number`,$value:1200},overlay:{$type:`number`,$value:1300},modal:{$type:`number`,$value:1400},popover:{$type:`number`,$value:1500},skipLink:{$type:`number`,$value:1600},toast:{$type:`number`,$value:1700},tooltip:{$type:`number`,$value:1800}},Dm={fast:{$type:`transition`,$value:`100ms cubic-bezier(0.4, 0, 0.2, 1)`},normal:{$type:`transition`,$value:`200ms cubic-bezier(0.4, 0, 0.2, 1)`},slow:{$type:`transition`,$value:`300ms cubic-bezier(0.4, 0, 0.2, 1)`},colors:{$type:`transition`,$value:`color 200ms cubic-bezier(0.4, 0, 0.2, 1), background-color 200ms cubic-bezier(0.4, 0, 0.2, 1), border-color 200ms cubic-bezier(0.4, 0, 0.2, 1)`},opacity:{$type:`transition`,$value:`opacity 200ms cubic-bezier(0.4, 0, 0.2, 1)`},transform:{$type:`transition`,$value:`transform 200ms cubic-bezier(0, 0, 0.2, 1)`}},Om={font:{family:{sans:{$value:`"Inter", system-ui, -apple-system, sans-serif`,$type:`fontFamily`},mono:{$value:`"Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace`,$type:`fontFamily`}},size:{sm:{$value:`0.8125rem`,$type:`dimension`},base:{$value:`0.875rem`,$type:`dimension`},lg:{$value:`1rem`,$type:`dimension`},xl:{$value:`1.125rem`,$type:`dimension`},"2xl":{$value:`1.375rem`,$type:`dimension`}},weight:{normal:{$value:`400`,$type:`fontWeight`},medium:{$value:`500`,$type:`fontWeight`},semibold:{$value:`600`,$type:`fontWeight`},bold:{$value:`700`,$type:`fontWeight`}},lineHeight:{tight:{$value:`1.2`,$type:`number`},normal:{$value:`1.5`,$type:`number`},relaxed:{$value:`1.6`,$type:`number`}}},spacing:{1:{$value:`0.25rem`,$type:`dimension`},2:{$value:`0.5rem`,$type:`dimension`},3:{$value:`0.75rem`,$type:`dimension`},4:{$value:`1rem`,$type:`dimension`},5:{$value:`1.25rem`,$type:`dimension`},6:{$value:`1.5rem`,$type:`dimension`},8:{$value:`2rem`,$type:`dimension`},10:{$value:`2.5rem`,$type:`dimension`},12:{$value:`3rem`,$type:`dimension`},xs:{$value:`0.25rem`,$type:`dimension`},sm:{$value:`0.5rem`,$type:`dimension`},md:{$value:`1rem`,$type:`dimension`},lg:{$value:`1.5rem`,$type:`dimension`},xl:{$value:`2rem`,$type:`dimension`},"2xl":{$value:`3rem`,$type:`dimension`}},shape:{radius:{sm:{$value:`2px`,$type:`dimension`},md:{$value:`2px`,$type:`dimension`},lg:{$value:`4px`,$type:`dimension`},xl:{$value:`6px`,$type:`dimension`},full:{$value:`9999px`,$type:`dimension`}},shadow:{sm:{$value:`none`,$type:`shadow`},md:{$value:`0 1px 2px rgba(41, 41, 41, 0.06)`,$type:`shadow`},lg:{$value:`0 2px 6px rgba(41, 41, 41, 0.08)`,$type:`shadow`},xl:{$value:`0 4px 12px rgba(41, 41, 41, 0.10)`,$type:`shadow`}}},motion:{duration:{fast:{$value:`120ms`,$type:`duration`},normal:{$value:`200ms`,$type:`duration`},slow:{$value:`400ms`,$type:`duration`},ambient:{$value:`2000ms`,$type:`duration`}},easing:{default:{$value:`cubic-bezier(0.4, 0, 0.2, 1)`,$type:`cubicBezier`},bounce:{$value:`cubic-bezier(0.34, 1.56, 0.64, 1)`,$type:`cubicBezier`},spring:{$value:`cubic-bezier(0.22, 1, 0.36, 1)`,$type:`cubicBezier`}},transition:Dm,keyframes:{"accent-pulse":{$value:`0%{opacity:1}50%{opacity:0.7}100%{opacity:1}`,$type:`keyframes`},entrance:{$value:`0%{opacity:0;transform:translateY(4px)}100%{opacity:1;transform:none}`,$type:`keyframes`},shimmer:{$value:`0%{background-position:-200% 0}100%{background-position:200% 0}`,$type:`keyframes`}}}},km={light:{$name:`GGUI`,$description:`The default ggui theme — monochrome paper + ink, architectural, no decorative flourish.`,$metadata:{font:`Inter`,fontUrl:`https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Geist+Mono:wght@400;500;700&display=swap`,philosophy:`The interface is the artifact, not the chrome around it.`},color:{primary:{50:{$value:`#f4f3ed`,$type:`color`},100:{$value:`#ebe9e1`,$type:`color`},200:{$value:`#e4e4e2`,$type:`color`},300:{$value:`#d9d9d9`,$type:`color`},400:{$value:`#8c8c93`,$type:`color`},500:{$value:`#292929`,$type:`color`},600:{$value:`#1f1f1f`,$type:`color`},700:{$value:`#171717`,$type:`color`},800:{$value:`#0e0e0e`,$type:`color`},900:{$value:`#000000`,$type:`color`}},neutral:{50:{$value:`#f4f3ed`,$type:`color`},100:{$value:`#ebe9e1`,$type:`color`},200:{$value:`#e4e4e2`,$type:`color`},300:{$value:`#d9d9d9`,$type:`color`},400:{$value:`#8c8c93`,$type:`color`},500:{$value:`#5a5a5a`,$type:`color`},600:{$value:`#3d3d3d`,$type:`color`},700:{$value:`#292929`,$type:`color`},800:{$value:`#24242c`,$type:`color`},900:{$value:`#0e0e0e`,$type:`color`}},success:{50:{$value:`#e8f5ec`,$type:`color`},100:{$value:`#c5e6cd`,$type:`color`},200:{$value:`#8fcca0`,$type:`color`},500:{$value:`#1b7a37`,$type:`color`},600:{$value:`#15622c`,$type:`color`},700:{$value:`#0f4a21`,$type:`color`},800:{$value:`#093116`,$type:`color`}},warning:{50:{$value:`#fbf3e0`,$type:`color`},100:{$value:`#f3e1b0`,$type:`color`},200:{$value:`#e6c46e`,$type:`color`},500:{$value:`#8e680c`,$type:`color`},600:{$value:`#86620b`,$type:`color`},700:{$value:`#654a08`,$type:`color`},800:{$value:`#433105`,$type:`color`}},error:{50:{$value:`#fbe7e3`,$type:`color`},100:{$value:`#f4bbb1`,$type:`color`},200:{$value:`#ea8a7a`,$type:`color`},500:{$value:`#cc3520`,$type:`color`},600:{$value:`#ae2d1b`,$type:`color`},700:{$value:`#822214`,$type:`color`},800:{$value:`#57160d`,$type:`color`}},info:{50:{$value:`#e1e1e1`,$type:`color`},100:{$value:`#bababa`,$type:`color`},200:{$value:`#8e8e8e`,$type:`color`},500:{$value:`#3d3d3d`,$type:`color`},600:{$value:`#313131`,$type:`color`},700:{$value:`#252525`,$type:`color`},800:{$value:`#181818`,$type:`color`}},surface:{$value:`#f4f3ed`,$type:`color`},onSurface:{$value:`#292929`,$type:`color`},surfaceVariant:{$value:`#ebe9e1`,$type:`color`},onSurfaceVariant:{$value:`#5a5a5a`,$type:`color`},container:{$value:`#ebe9e1`,$type:`color`},onContainer:{$value:`#292929`,$type:`color`},outline:{$value:`#d6d4cb`,$type:`color`},outlineVariant:{$value:`#e4e4e2`,$type:`color`},onPrimary:{$value:`#f4f3ed`,$type:`color`},primaryContainer:{$value:`#ebe9e1`,$type:`color`},onPrimaryContainer:{$value:`#292929`,$type:`color`},onError:{$value:`#f4f3ed`,$type:`color`},errorContainer:{$value:`#fbe7e3`,$type:`color`},onErrorContainer:{$value:`#57160d`,$type:`color`},tertiary:{$value:`#1b7a37`,$type:`color`},onTertiary:{$value:`#f4f3ed`,$type:`color`},tertiaryContainer:{$value:`#e8f5ec`,$type:`color`},onTertiaryContainer:{$value:`#093116`,$type:`color`}},font:Om.font,spacing:Om.spacing,shape:Om.shape,motion:Om.motion,accessibility:{...Tm.light,focusRing:{...Tm.light.focusRing,color:{$type:`color`,$value:`#292929`}}},zIndex:Em},dark:{$name:`GGUI`,$description:`The default ggui theme (dark) — ink canvas, paper text, architectural and flat.`,$metadata:{font:`Inter`,fontUrl:`https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Geist+Mono:wght@400;500;700&display=swap`,philosophy:`The interface is the artifact, not the chrome around it.`},color:{primary:{50:{$value:`#0e0e0e`,$type:`color`},100:{$value:`#1f1f1f`,$type:`color`},200:{$value:`#292929`,$type:`color`},300:{$value:`#3d3d3d`,$type:`color`},400:{$value:`#5a5a5a`,$type:`color`},500:{$value:`#f4f3ed`,$type:`color`},600:{$value:`#ebe9e1`,$type:`color`},700:{$value:`#e4e4e2`,$type:`color`},800:{$value:`#d9d9d9`,$type:`color`},900:{$value:`#ffffff`,$type:`color`}},neutral:{50:{$value:`#0e0e0e`,$type:`color`},100:{$value:`#1f1f1f`,$type:`color`},200:{$value:`#292929`,$type:`color`},300:{$value:`#3d3d3d`,$type:`color`},400:{$value:`#5a5a5a`,$type:`color`},500:{$value:`#8c8c93`,$type:`color`},600:{$value:`#d9d9d9`,$type:`color`},700:{$value:`#e4e4e2`,$type:`color`},800:{$value:`#ebe9e1`,$type:`color`},900:{$value:`#f4f3ed`,$type:`color`}},success:{50:{$value:`#0d2918`,$type:`color`},100:{$value:`#174f2a`,$type:`color`},200:{$value:`#286b3d`,$type:`color`},500:{$value:`#3da85b`,$type:`color`},600:{$value:`#6dbf83`,$type:`color`},700:{$value:`#9dd5ab`,$type:`color`},800:{$value:`#cdead3`,$type:`color`}},warning:{50:{$value:`#332608`,$type:`color`},100:{$value:`#5e4612`,$type:`color`},200:{$value:`#896720`,$type:`color`},500:{$value:`#d4a02e`,$type:`color`},600:{$value:`#dfb55c`,$type:`color`},700:{$value:`#eaca8a`,$type:`color`},800:{$value:`#f5deb8`,$type:`color`}},error:{50:{$value:`#3d130d`,$type:`color`},100:{$value:`#702419`,$type:`color`},200:{$value:`#a33828`,$type:`color`},500:{$value:`#ff5b46`,$type:`color`},600:{$value:`#ff7d6c`,$type:`color`},700:{$value:`#ff9f93`,$type:`color`},800:{$value:`#ffc2ba`,$type:`color`}},info:{50:{$value:`#363636`,$type:`color`},100:{$value:`#5a5a5a`,$type:`color`},200:{$value:`#8c8c8c`,$type:`color`},500:{$value:`#d9d9d9`,$type:`color`},600:{$value:`#e0e0e0`,$type:`color`},700:{$value:`#e8e8e8`,$type:`color`},800:{$value:`#f0f0f0`,$type:`color`}},surface:{$value:`#1f1f1f`,$type:`color`},onSurface:{$value:`#f4f3ed`,$type:`color`},surfaceVariant:{$value:`#292929`,$type:`color`},onSurfaceVariant:{$value:`#d9d9d9`,$type:`color`},container:{$value:`#292929`,$type:`color`},onContainer:{$value:`#f4f3ed`,$type:`color`},outline:{$value:`#3d3d3d`,$type:`color`},outlineVariant:{$value:`#292929`,$type:`color`},onPrimary:{$value:`#292929`,$type:`color`},primaryContainer:{$value:`#3d3d3d`,$type:`color`},onPrimaryContainer:{$value:`#f4f3ed`,$type:`color`},onError:{$value:`#3d130d`,$type:`color`},errorContainer:{$value:`#702419`,$type:`color`},onErrorContainer:{$value:`#ffc2ba`,$type:`color`},tertiary:{$value:`#3da85b`,$type:`color`},onTertiary:{$value:`#0d2918`,$type:`color`},tertiaryContainer:{$value:`#174f2a`,$type:`color`},onTertiaryContainer:{$value:`#cdead3`,$type:`color`}},font:Om.font,spacing:Om.spacing,shape:Om.shape,motion:Om.motion,accessibility:{...Tm.dark,focusRing:{...Tm.dark.focusRing,color:{$type:`color`,$value:`#f4f3ed`}}},zIndex:Em}},Am={font:{family:{sans:{$value:`"Orbitron", "Rajdhani", system-ui, sans-serif`,$type:`fontFamily`},mono:{$value:`"Share Tech Mono", "Fira Code", monospace`,$type:`fontFamily`}},size:{sm:{$value:`0.8rem`,$type:`dimension`},base:{$value:`0.95rem`,$type:`dimension`},lg:{$value:`1.1rem`,$type:`dimension`},xl:{$value:`1.3rem`,$type:`dimension`},"2xl":{$value:`1.6rem`,$type:`dimension`}},weight:{normal:{$value:`400`,$type:`fontWeight`},medium:{$value:`500`,$type:`fontWeight`},semibold:{$value:`600`,$type:`fontWeight`},bold:{$value:`700`,$type:`fontWeight`}},lineHeight:{tight:{$value:`1.2`,$type:`number`},normal:{$value:`1.5`,$type:`number`},relaxed:{$value:`1.7`,$type:`number`}}},spacing:{1:{$value:`0.25rem`,$type:`dimension`},2:{$value:`0.5rem`,$type:`dimension`},3:{$value:`0.75rem`,$type:`dimension`},4:{$value:`1rem`,$type:`dimension`},5:{$value:`1.25rem`,$type:`dimension`},6:{$value:`1.5rem`,$type:`dimension`},8:{$value:`2rem`,$type:`dimension`},10:{$value:`2.5rem`,$type:`dimension`},12:{$value:`3rem`,$type:`dimension`}},shape:{radius:{sm:{$value:`2px`,$type:`dimension`},md:{$value:`4px`,$type:`dimension`},lg:{$value:`6px`,$type:`dimension`},xl:{$value:`8px`,$type:`dimension`},full:{$value:`9999px`,$type:`dimension`}},shadow:{sm:{$value:`0 0 4px rgba(6, 182, 212, 0.3)`,$type:`shadow`},md:{$value:`0 0 8px rgba(6, 182, 212, 0.4)`,$type:`shadow`},lg:{$value:`0 0 16px rgba(6, 182, 212, 0.5)`,$type:`shadow`},xl:{$value:`0 0 24px rgba(6, 182, 212, 0.6), 0 0 48px rgba(6, 182, 212, 0.2)`,$type:`shadow`}}},motion:{duration:{fast:{$value:`100ms`,$type:`duration`},normal:{$value:`200ms`,$type:`duration`},slow:{$value:`600ms`,$type:`duration`},ambient:{$value:`2000ms`,$type:`duration`}},easing:{default:{$value:`cubic-bezier(0.4, 0, 0.2, 1)`,$type:`cubicBezier`},bounce:{$value:`cubic-bezier(0.68, -0.55, 0.27, 1.55)`,$type:`cubicBezier`},spring:{$value:`cubic-bezier(0.22, 1, 0.36, 1)`,$type:`cubicBezier`}},keyframes:{"glitch-flicker":{$value:`0%{opacity:1;transform:none}7%{opacity:0.8;transform:translateX(-2px) skewX(-1deg)}10%{opacity:1;transform:none}47%{opacity:1;transform:none}50%{opacity:0.6;transform:translateX(3px) skewX(2deg)}53%{opacity:1;transform:none}100%{opacity:1;transform:none}`,$type:`keyframes`},"scan-line":{$value:`0%{transform:translateY(-100%)}100%{transform:translateY(100%)}`,$type:`keyframes`},"neon-pulse":{$value:`0%{box-shadow:0 0 4px rgba(6,182,212,0.4)}50%{box-shadow:0 0 16px rgba(6,182,212,0.8)}100%{box-shadow:0 0 4px rgba(6,182,212,0.4)}`,$type:`keyframes`}},transition:{fast:{$type:`transition`,$value:`100ms cubic-bezier(0.4, 0, 0.2, 1)`},normal:{$type:`transition`,$value:`200ms cubic-bezier(0.4, 0, 0.2, 1)`},slow:{$type:`transition`,$value:`600ms cubic-bezier(0.4, 0, 0.2, 1)`},colors:{$type:`transition`,$value:`color 200ms cubic-bezier(0.4, 0, 0.2, 1), background-color 200ms cubic-bezier(0.4, 0, 0.2, 1), border-color 200ms cubic-bezier(0.4, 0, 0.2, 1)`},opacity:{$type:`transition`,$value:`opacity 200ms cubic-bezier(0.4, 0, 0.2, 1)`},transform:{$type:`transition`,$value:`transform 200ms cubic-bezier(0, 0, 0.2, 1)`}}}},jm={light:{$name:`Cyberpunk`,$description:`Neon-lit dystopian tech — cyan neon on dark chrome with glitch animations.`,$metadata:{font:`Orbitron`,fontUrl:`https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700&display=swap`,philosophy:`Chromatic noise, electric tension, digital rebellion.`},color:{primary:{50:{$value:`#ecfeff`,$type:`color`},100:{$value:`#cffafe`,$type:`color`},200:{$value:`#a5f3fc`,$type:`color`},300:{$value:`#67e8f9`,$type:`color`},400:{$value:`#22d3ee`,$type:`color`},500:{$value:`#06b6d4`,$type:`color`},600:{$value:`#0891b2`,$type:`color`},700:{$value:`#1085a5`,$type:`color`},800:{$value:`#155e75`,$type:`color`},900:{$value:`#164e63`,$type:`color`}},neutral:{50:{$value:`#0a0a0f`,$type:`color`},100:{$value:`#111118`,$type:`color`},200:{$value:`#1a1a24`,$type:`color`},300:{$value:`#25252f`,$type:`color`},400:{$value:`#3a3a48`,$type:`color`},500:{$value:`#5d5d74`,$type:`color`},600:{$value:`#8888a0`,$type:`color`},700:{$value:`#aaaabe`,$type:`color`},800:{$value:`#d0d0e0`,$type:`color`},900:{$value:`#e8e8f0`,$type:`color`}},success:{50:{$value:`#e0fff1`,$type:`color`},100:{$value:`#b3ffd9`,$type:`color`},200:{$value:`#66ffb3`,$type:`color`},500:{$value:`#00ff88`,$type:`color`},600:{$value:`#00cc6e`,$type:`color`},700:{$value:`#009955`,$type:`color`},800:{$value:`#006638`,$type:`color`}},warning:{50:{$value:`#fff5e0`,$type:`color`},100:{$value:`#ffe5b3`,$type:`color`},200:{$value:`#ffcc66`,$type:`color`},500:{$value:`#ffaa00`,$type:`color`},600:{$value:`#cc8800`,$type:`color`},700:{$value:`#996600`,$type:`color`},800:{$value:`#664400`,$type:`color`}},error:{50:{$value:`#ffe0e8`,$type:`color`},100:{$value:`#ffb3c4`,$type:`color`},200:{$value:`#ff6688`,$type:`color`},500:{$value:`#ff2255`,$type:`color`},600:{$value:`#cc1a44`,$type:`color`},700:{$value:`#991333`,$type:`color`},800:{$value:`#660d22`,$type:`color`}},info:{50:{$value:`#e0f9ff`,$type:`color`},100:{$value:`#b3edff`,$type:`color`},200:{$value:`#66dbff`,$type:`color`},500:{$value:`#00ccff`,$type:`color`},600:{$value:`#00a3cc`,$type:`color`},700:{$value:`#007a99`,$type:`color`},800:{$value:`#005266`,$type:`color`}},surface:{$value:`#0a0a0f`,$type:`color`},onSurface:{$value:`#e8e8f0`,$type:`color`},surfaceVariant:{$value:`#111118`,$type:`color`},onSurfaceVariant:{$value:`#8888a0`,$type:`color`},container:{$value:`#155e75`,$type:`color`},onContainer:{$value:`#cffafe`,$type:`color`},outline:{$value:`#3a3a48`,$type:`color`},outlineVariant:{$value:`#25252f`,$type:`color`},onPrimary:{$value:`#0a0a0f`,$type:`color`},primaryContainer:{$value:`#155e75`,$type:`color`},onPrimaryContainer:{$value:`#cffafe`,$type:`color`},onError:{$value:`#0a0a0f`,$type:`color`},errorContainer:{$value:`#660d22`,$type:`color`},onErrorContainer:{$value:`#ffe0e8`,$type:`color`},tertiary:{$value:`#00ff88`,$type:`color`},onTertiary:{$value:`#0a0a0f`,$type:`color`},tertiaryContainer:{$value:`#006638`,$type:`color`},onTertiaryContainer:{$value:`#e0fff1`,$type:`color`}},font:Am.font,spacing:Am.spacing,shape:Am.shape,motion:Am.motion,accessibility:{...Tm.light,focusRing:{...Tm.light.focusRing,color:{$type:`color`,$value:`#06b6d4`}}},zIndex:Em},dark:{$name:`Cyberpunk`,$description:`Neon-lit dystopian tech (dark) — brighter cyan on pure-black chrome, cranked neon contrast.`,$metadata:{font:`Orbitron`,fontUrl:`https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700&display=swap`,philosophy:`Chromatic noise, electric tension, digital rebellion.`},color:{primary:{50:{$value:`#164e63`,$type:`color`},100:{$value:`#155e75`,$type:`color`},200:{$value:`#0e7490`,$type:`color`},300:{$value:`#0891b2`,$type:`color`},400:{$value:`#06b6d4`,$type:`color`},500:{$value:`#22d3ee`,$type:`color`},600:{$value:`#67e8f9`,$type:`color`},700:{$value:`#a5f3fc`,$type:`color`},800:{$value:`#cffafe`,$type:`color`},900:{$value:`#ecfeff`,$type:`color`}},neutral:{50:{$value:`#000005`,$type:`color`},100:{$value:`#0a0a0f`,$type:`color`},200:{$value:`#111118`,$type:`color`},300:{$value:`#1a1a24`,$type:`color`},400:{$value:`#3a3a48`,$type:`color`},500:{$value:`#5a5a70`,$type:`color`},600:{$value:`#8888a0`,$type:`color`},700:{$value:`#aaaabe`,$type:`color`},800:{$value:`#d0d0e0`,$type:`color`},900:{$value:`#e8e8f0`,$type:`color`}},success:{50:{$value:`#003319`,$type:`color`},100:{$value:`#006633`,$type:`color`},200:{$value:`#00994d`,$type:`color`},500:{$value:`#33ffaa`,$type:`color`},600:{$value:`#66ffbf`,$type:`color`},700:{$value:`#99ffd4`,$type:`color`},800:{$value:`#ccffea`,$type:`color`}},warning:{50:{$value:`#332200`,$type:`color`},100:{$value:`#664400`,$type:`color`},200:{$value:`#996600`,$type:`color`},500:{$value:`#ffbe33`,$type:`color`},600:{$value:`#ffcb5c`,$type:`color`},700:{$value:`#ffd985`,$type:`color`},800:{$value:`#ffe7ad`,$type:`color`}},error:{50:{$value:`#330a17`,$type:`color`},100:{$value:`#66142e`,$type:`color`},200:{$value:`#991e45`,$type:`color`},500:{$value:`#ff4477`,$type:`color`},600:{$value:`#ff6e94`,$type:`color`},700:{$value:`#ff97b1`,$type:`color`},800:{$value:`#ffc1cf`,$type:`color`}},info:{50:{$value:`#002b33`,$type:`color`},100:{$value:`#005566`,$type:`color`},200:{$value:`#008099`,$type:`color`},500:{$value:`#33d6ff`,$type:`color`},600:{$value:`#5cdeff`,$type:`color`},700:{$value:`#85e6ff`,$type:`color`},800:{$value:`#adeeff`,$type:`color`}},surface:{$value:`#000005`,$type:`color`},onSurface:{$value:`#e8e8f0`,$type:`color`},surfaceVariant:{$value:`#0a0a0f`,$type:`color`},onSurfaceVariant:{$value:`#aaaabe`,$type:`color`},container:{$value:`#0e7490`,$type:`color`},onContainer:{$value:`#cffafe`,$type:`color`},outline:{$value:`#1a1a24`,$type:`color`},outlineVariant:{$value:`#111118`,$type:`color`},onPrimary:{$value:`#000005`,$type:`color`},primaryContainer:{$value:`#0e7490`,$type:`color`},onPrimaryContainer:{$value:`#cffafe`,$type:`color`},onError:{$value:`#000005`,$type:`color`},errorContainer:{$value:`#991e45`,$type:`color`},onErrorContainer:{$value:`#ffc1cf`,$type:`color`},tertiary:{$value:`#33ffaa`,$type:`color`},onTertiary:{$value:`#000005`,$type:`color`},tertiaryContainer:{$value:`#006633`,$type:`color`},onTertiaryContainer:{$value:`#ccffea`,$type:`color`}},font:Am.font,spacing:Am.spacing,shape:Am.shape,motion:Am.motion,accessibility:{...Tm.dark,focusRing:{...Tm.dark.focusRing,color:{$type:`color`,$value:`#22d3ee`}}},zIndex:Em}},Mm={font:{family:{sans:{$value:`"Noto Serif JP", "Georgia", serif`,$type:`fontFamily`},mono:{$value:`"Noto Sans Mono", "Courier New", monospace`,$type:`fontFamily`}},size:{sm:{$value:`0.875rem`,$type:`dimension`},base:{$value:`1rem`,$type:`dimension`},lg:{$value:`1.125rem`,$type:`dimension`},xl:{$value:`1.3rem`,$type:`dimension`},"2xl":{$value:`1.6rem`,$type:`dimension`}},weight:{normal:{$value:`400`,$type:`fontWeight`},medium:{$value:`500`,$type:`fontWeight`},semibold:{$value:`600`,$type:`fontWeight`},bold:{$value:`700`,$type:`fontWeight`}},lineHeight:{tight:{$value:`1.3`,$type:`number`},normal:{$value:`1.6`,$type:`number`},relaxed:{$value:`1.9`,$type:`number`}}},spacing:{1:{$value:`0.25rem`,$type:`dimension`},2:{$value:`0.5rem`,$type:`dimension`},3:{$value:`0.75rem`,$type:`dimension`},4:{$value:`1rem`,$type:`dimension`},5:{$value:`1.25rem`,$type:`dimension`},6:{$value:`1.5rem`,$type:`dimension`},8:{$value:`2rem`,$type:`dimension`},10:{$value:`2.5rem`,$type:`dimension`},12:{$value:`3rem`,$type:`dimension`}},shape:{radius:{sm:{$value:`0.125rem`,$type:`dimension`},md:{$value:`0.25rem`,$type:`dimension`},lg:{$value:`0.5rem`,$type:`dimension`},xl:{$value:`0.75rem`,$type:`dimension`},full:{$value:`9999px`,$type:`dimension`}},shadow:{sm:{$value:`0 1px 3px rgba(42, 39, 36, 0.06)`,$type:`shadow`},md:{$value:`0 3px 8px rgba(42, 39, 36, 0.08)`,$type:`shadow`},lg:{$value:`0 8px 20px rgba(42, 39, 36, 0.10)`,$type:`shadow`},xl:{$value:`0 16px 40px rgba(42, 39, 36, 0.12)`,$type:`shadow`}}},motion:{duration:{fast:{$value:`200ms`,$type:`duration`},normal:{$value:`500ms`,$type:`duration`},slow:{$value:`1500ms`,$type:`duration`},ambient:{$value:`6000ms`,$type:`duration`}},easing:{default:{$value:`cubic-bezier(0.33, 0, 0.67, 1)`,$type:`cubicBezier`},bounce:{$value:`cubic-bezier(0.34, 1.2, 0.64, 1)`,$type:`cubicBezier`},spring:{$value:`cubic-bezier(0.22, 1, 0.36, 1)`,$type:`cubicBezier`}},keyframes:{"slow-breathe":{$value:`0%{opacity:0.85}50%{opacity:1}100%{opacity:0.85}`,$type:`keyframes`},"gentle-fade":{$value:`0%{opacity:0}100%{opacity:1}`,$type:`keyframes`},"ink-ripple":{$value:`0%{transform:scale(0.95);opacity:0.5}50%{transform:scale(1);opacity:0.8}100%{transform:scale(0.95);opacity:0.5}`,$type:`keyframes`}},transition:{fast:{$type:`transition`,$value:`200ms cubic-bezier(0.33, 0, 0.67, 1)`},normal:{$type:`transition`,$value:`500ms cubic-bezier(0.33, 0, 0.67, 1)`},slow:{$type:`transition`,$value:`1500ms cubic-bezier(0.33, 0, 0.67, 1)`},colors:{$type:`transition`,$value:`color 500ms cubic-bezier(0.33, 0, 0.67, 1), background-color 500ms cubic-bezier(0.33, 0, 0.67, 1), border-color 500ms cubic-bezier(0.33, 0, 0.67, 1)`},opacity:{$type:`transition`,$value:`opacity 500ms cubic-bezier(0.33, 0, 0.67, 1)`},transform:{$type:`transition`,$value:`transform 500ms cubic-bezier(0.22, 1, 0.36, 1)`}}}},Nm={light:{$name:`Zen`,$description:`Minimalist Japanese aesthetic — warm stone tones, deliberate space, and unhurried motion.`,$metadata:{font:`Noto Serif JP`,fontUrl:`https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@400;500;600;700&display=swap`,philosophy:`Beauty in imperfection. Stillness as presence.`},color:{primary:{50:{$value:`#f6f7f4`,$type:`color`},100:{$value:`#e8ebe2`,$type:`color`},200:{$value:`#d1d7c5`,$type:`color`},300:{$value:`#b3bda1`,$type:`color`},400:{$value:`#93a17c`,$type:`color`},500:{$value:`#748660`,$type:`color`},600:{$value:`#5c6b4c`,$type:`color`},700:{$value:`#48543d`,$type:`color`},800:{$value:`#3b4434`,$type:`color`},900:{$value:`#33392e`,$type:`color`}},neutral:{50:{$value:`#faf9f7`,$type:`color`},100:{$value:`#f3f1ed`,$type:`color`},200:{$value:`#e7e4de`,$type:`color`},300:{$value:`#d5d0c8`,$type:`color`},400:{$value:`#b8b0a4`,$type:`color`},500:{$value:`#988d81`,$type:`color`},600:{$value:`#7a7068`,$type:`color`},700:{$value:`#5e5650`,$type:`color`},800:{$value:`#3e3a36`,$type:`color`},900:{$value:`#2a2724`,$type:`color`}},success:{50:{$type:`color`,$value:`#f0f4ee`},100:{$type:`color`,$value:`#dde6d8`},200:{$type:`color`,$value:`#c6d4be`},500:{$type:`color`,$value:`#5b7950`},600:{$type:`color`,$value:`#58754d`},700:{$type:`color`,$value:`#43583a`},800:{$type:`color`,$value:`#2f3e29`}},warning:{50:{$type:`color`,$value:`#faf6ea`},100:{$type:`color`,$value:`#f4ebcb`},200:{$type:`color`,$value:`#ecdda4`},500:{$type:`color`,$value:`#886f29`},600:{$type:`color`,$value:`#a88a3a`},700:{$type:`color`,$value:`#7e672c`},800:{$type:`color`,$value:`#59481f`}},error:{50:{$type:`color`,$value:`#f8edec`},100:{$type:`color`,$value:`#efd0ce`},200:{$type:`color`,$value:`#e3aba8`},500:{$type:`color`,$value:`#b85450`},600:{$type:`color`,$value:`#9a4340`},700:{$type:`color`,$value:`#743330`},800:{$type:`color`,$value:`#522423`}},info:{50:{$type:`color`,$value:`#eef3f5`},100:{$type:`color`,$value:`#d7e2e7`},200:{$type:`color`,$value:`#b9cdd5`},500:{$type:`color`,$value:`#6a8fa0`},600:{$type:`color`,$value:`#557585`},700:{$type:`color`,$value:`#405864`},800:{$type:`color`,$value:`#2c3d46`}},surface:{$value:`#faf9f7`,$type:`color`},onSurface:{$value:`#2a2724`,$type:`color`},surfaceVariant:{$value:`#f3f1ed`,$type:`color`},onSurfaceVariant:{$value:`#6b635b`,$type:`color`},container:{$value:`#e8ebe2`,$type:`color`},onContainer:{$value:`#33392e`,$type:`color`},outline:{$value:`#d5d0c8`,$type:`color`},outlineVariant:{$value:`#e7e4de`,$type:`color`},onPrimary:{$value:`#faf9f7`,$type:`color`},primaryContainer:{$value:`#e8ebe2`,$type:`color`},onPrimaryContainer:{$value:`#33392e`,$type:`color`},onError:{$value:`#faf9f7`,$type:`color`},errorContainer:{$value:`#f8edec`,$type:`color`},onErrorContainer:{$value:`#522423`,$type:`color`},tertiary:{$value:`#7d5e6e`,$type:`color`},onTertiary:{$value:`#faf9f7`,$type:`color`},tertiaryContainer:{$value:`#ebe2e6`,$type:`color`},onTertiaryContainer:{$value:`#3a2a32`,$type:`color`}},font:Mm.font,spacing:Mm.spacing,shape:Mm.shape,motion:Mm.motion,accessibility:{...Tm.light,focusRing:{...Tm.light.focusRing,color:{$type:`color`,$value:`#748660`}}},zIndex:Em},dark:{$name:`Zen`,$description:`Minimalist Japanese aesthetic (dark) — dusk stone surfaces with restrained moss accents and unhurried motion.`,$metadata:{font:`Noto Serif JP`,fontUrl:`https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@400;500;600;700&display=swap`,philosophy:`Beauty in imperfection. Stillness as presence.`},color:{primary:{50:{$value:`#33392e`,$type:`color`},100:{$value:`#3b4434`,$type:`color`},200:{$value:`#48543d`,$type:`color`},300:{$value:`#5c6b4c`,$type:`color`},400:{$value:`#748660`,$type:`color`},500:{$value:`#93a17c`,$type:`color`},600:{$value:`#b3bda1`,$type:`color`},700:{$value:`#d1d7c5`,$type:`color`},800:{$value:`#e8ebe2`,$type:`color`},900:{$value:`#f6f7f4`,$type:`color`}},neutral:{50:{$value:`#1a1816`,$type:`color`},100:{$value:`#2a2724`,$type:`color`},200:{$value:`#3e3a36`,$type:`color`},300:{$value:`#5e5650`,$type:`color`},400:{$value:`#7a7068`,$type:`color`},500:{$value:`#9a9084`,$type:`color`},600:{$value:`#b8b0a4`,$type:`color`},700:{$value:`#d5d0c8`,$type:`color`},800:{$value:`#e7e4de`,$type:`color`},900:{$value:`#faf9f7`,$type:`color`}},success:{50:{$type:`color`,$value:`#f1f6ee`},100:{$type:`color`,$value:`#dceacc`},200:{$type:`color`,$value:`#c4dab1`},500:{$type:`color`,$value:`#8aab7a`},600:{$type:`color`,$value:`#6f8d62`},700:{$type:`color`,$value:`#546b4a`},800:{$type:`color`,$value:`#3a4b34`}},warning:{50:{$type:`color`,$value:`#fbf6e9`},100:{$type:`color`,$value:`#f4e9c1`},200:{$type:`color`,$value:`#ecdda4`},500:{$type:`color`,$value:`#d8b96a`},600:{$type:`color`,$value:`#b09553`},700:{$type:`color`,$value:`#84703d`},800:{$type:`color`,$value:`#5a4c2a`}},error:{50:{$type:`color`,$value:`#faeae9`},100:{$type:`color`,$value:`#f1cac8`},200:{$type:`color`,$value:`#e4a5a1`},500:{$type:`color`,$value:`#d17570`},600:{$type:`color`,$value:`#a85753`},700:{$type:`color`,$value:`#7d403c`},800:{$type:`color`,$value:`#552a27`}},info:{50:{$type:`color`,$value:`#f0f4f6`},100:{$type:`color`,$value:`#d7e0e5`},200:{$type:`color`,$value:`#bccbd2`},500:{$type:`color`,$value:`#8eaab8`},600:{$type:`color`,$value:`#708995`},700:{$type:`color`,$value:`#546771`},800:{$type:`color`,$value:`#38454d`}},surface:{$value:`#2a2724`,$type:`color`},onSurface:{$value:`#f3f1ed`,$type:`color`},surfaceVariant:{$value:`#3e3a36`,$type:`color`},onSurfaceVariant:{$value:`#b8b0a4`,$type:`color`},container:{$value:`#48543d`,$type:`color`},onContainer:{$value:`#e8ebe2`,$type:`color`},outline:{$value:`#5e5650`,$type:`color`},outlineVariant:{$value:`#3e3a36`,$type:`color`},onPrimary:{$value:`#1a1816`,$type:`color`},primaryContainer:{$value:`#3b4434`,$type:`color`},onPrimaryContainer:{$value:`#e8ebe2`,$type:`color`},onError:{$value:`#1a1816`,$type:`color`},errorContainer:{$value:`#552a27`,$type:`color`},onErrorContainer:{$value:`#f1cac8`,$type:`color`},tertiary:{$value:`#a98899`,$type:`color`},onTertiary:{$value:`#1a1816`,$type:`color`},tertiaryContainer:{$value:`#4e3a44`,$type:`color`},onTertiaryContainer:{$value:`#ebe2e6`,$type:`color`}},font:Mm.font,spacing:Mm.spacing,shape:Mm.shape,motion:Mm.motion,accessibility:{...Tm.dark,focusRing:{...Tm.dark.focusRing,color:{$type:`color`,$value:`#93a17c`}}},zIndex:Em}},Pm={font:{family:{sans:{$value:`"Outfit", system-ui, -apple-system, sans-serif`,$type:`fontFamily`},mono:{$value:`"Fira Code", "JetBrains Mono", monospace`,$type:`fontFamily`}},size:{sm:{$value:`0.875rem`,$type:`dimension`},base:{$value:`1rem`,$type:`dimension`},lg:{$value:`1.125rem`,$type:`dimension`},xl:{$value:`1.25rem`,$type:`dimension`},"2xl":{$value:`1.5rem`,$type:`dimension`}},weight:{normal:{$value:`400`,$type:`fontWeight`},medium:{$value:`500`,$type:`fontWeight`},semibold:{$value:`600`,$type:`fontWeight`},bold:{$value:`700`,$type:`fontWeight`}},lineHeight:{tight:{$value:`1.25`,$type:`number`},normal:{$value:`1.5`,$type:`number`},relaxed:{$value:`1.75`,$type:`number`}}},spacing:{1:{$value:`0.25rem`,$type:`dimension`},2:{$value:`0.5rem`,$type:`dimension`},3:{$value:`0.75rem`,$type:`dimension`},4:{$value:`1rem`,$type:`dimension`},5:{$value:`1.25rem`,$type:`dimension`},6:{$value:`1.5rem`,$type:`dimension`},8:{$value:`2rem`,$type:`dimension`},10:{$value:`2.5rem`,$type:`dimension`},12:{$value:`3rem`,$type:`dimension`}},shape:{radius:{sm:{$value:`0.25rem`,$type:`dimension`},md:{$value:`0.5rem`,$type:`dimension`},lg:{$value:`0.75rem`,$type:`dimension`},xl:{$value:`1rem`,$type:`dimension`},full:{$value:`9999px`,$type:`dimension`}},shadow:{sm:{$value:`0 0 6px rgba(236, 72, 153, 0.25)`,$type:`shadow`},md:{$value:`0 0 12px rgba(236, 72, 153, 0.35)`,$type:`shadow`},lg:{$value:`0 0 20px rgba(236, 72, 153, 0.45)`,$type:`shadow`},xl:{$value:`0 0 30px rgba(236, 72, 153, 0.55), 0 0 60px rgba(236, 72, 153, 0.2)`,$type:`shadow`}}},motion:{duration:{fast:{$value:`120ms`,$type:`duration`},normal:{$value:`250ms`,$type:`duration`},slow:{$value:`800ms`,$type:`duration`},ambient:{$value:`2500ms`,$type:`duration`}},easing:{default:{$value:`cubic-bezier(0.4, 0, 0.2, 1)`,$type:`cubicBezier`},bounce:{$value:`cubic-bezier(0.68, -0.55, 0.27, 1.55)`,$type:`cubicBezier`},spring:{$value:`cubic-bezier(0.22, 1, 0.36, 1)`,$type:`cubicBezier`}},transition:{fast:{$value:`120ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},normal:{$value:`250ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},slow:{$value:`800ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},colors:{$value:`color 250ms cubic-bezier(0.4, 0, 0.2, 1), background-color 250ms cubic-bezier(0.4, 0, 0.2, 1), border-color 250ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},opacity:{$value:`opacity 250ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},transform:{$value:`transform 250ms cubic-bezier(0.22, 1, 0.36, 1)`,$type:`transition`}},keyframes:{"neon-flicker":{$value:`0%{opacity:1}4%{opacity:0.7}8%{opacity:1}12%{opacity:0.85}16%{opacity:1}100%{opacity:1}`,$type:`keyframes`},"glow-pulse":{$value:`0%{box-shadow:0 0 8px rgba(236,72,153,0.4)}50%{box-shadow:0 0 24px rgba(236,72,153,0.8)}100%{box-shadow:0 0 8px rgba(236,72,153,0.4)}`,$type:`keyframes`},"electric-arc":{$value:`0%{clip-path:inset(0 100% 0 0)}50%{clip-path:inset(0 0 0 0)}100%{clip-path:inset(0 0 0 100%)}`,$type:`keyframes`}}}},Fm={light:{$name:`Neon Noir`,$description:`Hot pink neon on dark — electric glow effects, neon flicker, and flowing magenta particles.`,$metadata:{font:`Outfit`,fontUrl:`https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&display=swap`,philosophy:`Midnight electricity. The city never sleeps.`},color:{primary:{50:{$value:`#fdf2f8`,$type:`color`},100:{$value:`#fce7f3`,$type:`color`},200:{$value:`#fbcfe8`,$type:`color`},300:{$value:`#f9a8d4`,$type:`color`},400:{$value:`#f472b6`,$type:`color`},500:{$value:`#ec4899`,$type:`color`},600:{$value:`#db2777`,$type:`color`},700:{$value:`#e42574`,$type:`color`},800:{$value:`#9d174d`,$type:`color`},900:{$value:`#831843`,$type:`color`}},neutral:{50:{$value:`#09090b`,$type:`color`},100:{$value:`#111114`,$type:`color`},200:{$value:`#19191e`,$type:`color`},300:{$value:`#232329`,$type:`color`},400:{$value:`#3b3b44`,$type:`color`},500:{$value:`#5e5e6c`,$type:`color`},600:{$value:`#8a8a9a`,$type:`color`},700:{$value:`#b0b0be`,$type:`color`},800:{$value:`#d4d4de`,$type:`color`},900:{$value:`#ececf0`,$type:`color`}},success:{...wm.dark.success,500:{$value:`#34d399`,$type:`color`}},warning:{...wm.dark.warning,500:{$value:`#fbbf24`,$type:`color`}},error:{...wm.dark.error,500:{$value:`#f87171`,$type:`color`}},info:{...wm.dark.info,500:{$value:`#38bdf8`,$type:`color`}},surface:{$value:`#09090b`,$type:`color`},onSurface:{$value:`#ececf0`,$type:`color`},surfaceVariant:{$value:`#111114`,$type:`color`},onSurfaceVariant:{$value:`#8a8a9a`,$type:`color`},container:{$value:`#9d174d`,$type:`color`},onContainer:{$value:`#fce7f3`,$type:`color`},outline:{$value:`#3b3b44`,$type:`color`},outlineVariant:{$value:`#232329`,$type:`color`},onPrimary:{$value:`#ffffff`,$type:`color`},primaryContainer:{$value:`#9d174d`,$type:`color`},onPrimaryContainer:{$value:`#fce7f3`,$type:`color`},onError:{$value:`#09090b`,$type:`color`},errorContainer:{$value:`#7f1d1d`,$type:`color`},onErrorContainer:{$value:`#fecaca`,$type:`color`},tertiary:{$value:`#a855f7`,$type:`color`},onTertiary:{$value:`#09090b`,$type:`color`},tertiaryContainer:{$value:`#6b21a8`,$type:`color`},onTertiaryContainer:{$value:`#f3e8ff`,$type:`color`}},font:Pm.font,spacing:Pm.spacing,shape:Pm.shape,motion:Pm.motion,accessibility:{...Tm.dark,focusRing:{...Tm.dark.focusRing,color:{$value:`#ec4899`,$type:`color`}}},zIndex:Em},dark:{$name:`Neon Noir`,$description:`Hot pink neon on pure black (dark) — sharper noir contrast, brighter electric glow, deeper magenta containers.`,$metadata:{font:`Outfit`,fontUrl:`https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&display=swap`,philosophy:`Midnight electricity. The city never sleeps.`},color:{primary:{50:{$value:`#831843`,$type:`color`},100:{$value:`#9d174d`,$type:`color`},200:{$value:`#be185d`,$type:`color`},300:{$value:`#db2777`,$type:`color`},400:{$value:`#ec4899`,$type:`color`},500:{$value:`#f472b6`,$type:`color`},600:{$value:`#f9a8d4`,$type:`color`},700:{$value:`#fbcfe8`,$type:`color`},800:{$value:`#fce7f3`,$type:`color`},900:{$value:`#fdf2f8`,$type:`color`}},neutral:{50:{$value:`#000000`,$type:`color`},100:{$value:`#09090b`,$type:`color`},200:{$value:`#111114`,$type:`color`},300:{$value:`#19191e`,$type:`color`},400:{$value:`#3b3b44`,$type:`color`},500:{$value:`#5a5a68`,$type:`color`},600:{$value:`#8a8a9a`,$type:`color`},700:{$value:`#b0b0be`,$type:`color`},800:{$value:`#d4d4de`,$type:`color`},900:{$value:`#ececf0`,$type:`color`}},success:{...wm.dark.success,500:{$value:`#5ee0ad`,$type:`color`}},warning:{...wm.dark.warning,500:{$value:`#ffd24a`,$type:`color`}},error:{...wm.dark.error,500:{$value:`#ff8a8a`,$type:`color`}},info:{...wm.dark.info,500:{$value:`#5acdff`,$type:`color`}},surface:{$value:`#000000`,$type:`color`},onSurface:{$value:`#ececf0`,$type:`color`},surfaceVariant:{$value:`#09090b`,$type:`color`},onSurfaceVariant:{$value:`#b0b0be`,$type:`color`},container:{$value:`#be185d`,$type:`color`},onContainer:{$value:`#fce7f3`,$type:`color`},outline:{$value:`#19191e`,$type:`color`},outlineVariant:{$value:`#111114`,$type:`color`},onPrimary:{$value:`#000000`,$type:`color`},primaryContainer:{$value:`#be185d`,$type:`color`},onPrimaryContainer:{$value:`#fce7f3`,$type:`color`},onError:{$value:`#000000`,$type:`color`},errorContainer:{$value:`#7f1d1d`,$type:`color`},onErrorContainer:{$value:`#fecdd3`,$type:`color`},tertiary:{$value:`#c084fc`,$type:`color`},onTertiary:{$value:`#000000`,$type:`color`},tertiaryContainer:{$value:`#581c87`,$type:`color`},onTertiaryContainer:{$value:`#f3e8ff`,$type:`color`}},font:Pm.font,spacing:Pm.spacing,shape:Pm.shape,motion:Pm.motion,accessibility:{...Tm.dark,focusRing:{...Tm.dark.focusRing,color:{$value:`#f472b6`,$type:`color`}}},zIndex:Em}},Im={font:{family:{sans:{$value:`"Lora", "Georgia", serif`,$type:`fontFamily`},mono:{$value:`"IBM Plex Mono", "Courier New", monospace`,$type:`fontFamily`}},size:{sm:{$value:`0.875rem`,$type:`dimension`},base:{$value:`1rem`,$type:`dimension`},lg:{$value:`1.15rem`,$type:`dimension`},xl:{$value:`1.3rem`,$type:`dimension`},"2xl":{$value:`1.625rem`,$type:`dimension`}},weight:{normal:{$value:`400`,$type:`fontWeight`},medium:{$value:`500`,$type:`fontWeight`},semibold:{$value:`600`,$type:`fontWeight`},bold:{$value:`700`,$type:`fontWeight`}},lineHeight:{tight:{$value:`1.3`,$type:`number`},normal:{$value:`1.6`,$type:`number`},relaxed:{$value:`1.85`,$type:`number`}}},spacing:{1:{$value:`0.25rem`,$type:`dimension`},2:{$value:`0.5rem`,$type:`dimension`},3:{$value:`0.75rem`,$type:`dimension`},4:{$value:`1rem`,$type:`dimension`},5:{$value:`1.25rem`,$type:`dimension`},6:{$value:`1.5rem`,$type:`dimension`},8:{$value:`2rem`,$type:`dimension`},10:{$value:`2.5rem`,$type:`dimension`},12:{$value:`3rem`,$type:`dimension`}},shape:{radius:{sm:{$value:`0.375rem`,$type:`dimension`},md:{$value:`0.625rem`,$type:`dimension`},lg:{$value:`1rem`,$type:`dimension`},xl:{$value:`1.5rem`,$type:`dimension`},full:{$value:`9999px`,$type:`dimension`}},shadow:{sm:{$value:`0 1px 3px rgba(53, 46, 32, 0.08)`,$type:`shadow`},md:{$value:`0 4px 8px rgba(53, 46, 32, 0.10)`,$type:`shadow`},lg:{$value:`0 8px 20px rgba(53, 46, 32, 0.12)`,$type:`shadow`},xl:{$value:`0 16px 40px rgba(53, 46, 32, 0.14)`,$type:`shadow`}}},motion:{duration:{fast:{$value:`200ms`,$type:`duration`},normal:{$value:`400ms`,$type:`duration`},slow:{$value:`1200ms`,$type:`duration`},ambient:{$value:`5000ms`,$type:`duration`}},easing:{default:{$value:`cubic-bezier(0.4, 0, 0.2, 1)`,$type:`cubicBezier`},bounce:{$value:`cubic-bezier(0.34, 1.3, 0.64, 1)`,$type:`cubicBezier`},spring:{$value:`cubic-bezier(0.22, 1, 0.36, 1)`,$type:`cubicBezier`}},keyframes:{"leaf-float":{$value:`0%{transform:translateY(0) rotate(0deg);opacity:0.7}25%{transform:translateY(-6px) rotate(3deg)}50%{transform:translateY(-2px) rotate(-2deg);opacity:1}75%{transform:translateY(-8px) rotate(2deg)}100%{transform:translateY(0) rotate(0deg);opacity:0.7}`,$type:`keyframes`},"vine-grow":{$value:`0%{transform:scaleY(0);transform-origin:bottom}100%{transform:scaleY(1);transform-origin:bottom}`,$type:`keyframes`},"gentle-sway":{$value:`0%{transform:rotate(-1deg)}50%{transform:rotate(1deg)}100%{transform:rotate(-1deg)}`,$type:`keyframes`}},transition:Dm}},Lm={light:{$name:`Botanical`,$description:`Organic greens on warm cream — leaf-float animations and vine-grow motion.`,$metadata:{font:`Lora`,fontUrl:`https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap`,philosophy:`Rooted in nature. Growing with intention.`},color:{primary:{50:{$value:`#f0fdf4`,$type:`color`},100:{$value:`#dcfce7`,$type:`color`},200:{$value:`#bbf7d0`,$type:`color`},300:{$value:`#86efac`,$type:`color`},400:{$value:`#4ade80`,$type:`color`},500:{$value:`#22c55e`,$type:`color`},600:{$value:`#16a34a`,$type:`color`},700:{$value:`#15803d`,$type:`color`},800:{$value:`#166534`,$type:`color`},900:{$value:`#14532d`,$type:`color`}},neutral:{50:{$value:`#fefcf8`,$type:`color`},100:{$value:`#fdf8ef`,$type:`color`},200:{$value:`#f8f0df`,$type:`color`},300:{$value:`#f0e4c9`,$type:`color`},400:{$value:`#dccba5`,$type:`color`},500:{$value:`#aa8e56`,$type:`color`},600:{$value:`#9a8660`,$type:`color`},700:{$value:`#746448`,$type:`color`},800:{$value:`#504530`,$type:`color`},900:{$value:`#352e20`,$type:`color`}},success:{...wm.light.success,500:{$type:`color`,$value:`#17843f`}},warning:{...wm.light.warning,500:{$type:`color`,$value:`#a06707`}},error:{...wm.light.error,500:{$type:`color`,$value:`#e51414`}},info:wm.light.info,surface:{$value:`#fefcf8`,$type:`color`},onSurface:{$value:`#352e20`,$type:`color`},surfaceVariant:{$value:`#fdf8ef`,$type:`color`},onSurfaceVariant:{$value:`#746448`,$type:`color`},container:{$value:`#dcfce7`,$type:`color`},onContainer:{$value:`#14532d`,$type:`color`},outline:{$value:`#f0e4c9`,$type:`color`},outlineVariant:{$value:`#f8f0df`,$type:`color`},onPrimary:{$value:`#332407`,$type:`color`},primaryContainer:{$value:`#dcfce7`,$type:`color`},onPrimaryContainer:{$value:`#14532d`,$type:`color`},onError:{$value:`#fefcf8`,$type:`color`},errorContainer:{$value:`#fee2e2`,$type:`color`},onErrorContainer:{$value:`#7f1d1d`,$type:`color`},tertiary:{$value:`#b45309`,$type:`color`},onTertiary:{$value:`#fefcf8`,$type:`color`},tertiaryContainer:{$value:`#fef3c7`,$type:`color`},onTertiaryContainer:{$value:`#451a03`,$type:`color`}},font:Im.font,spacing:Im.spacing,shape:Im.shape,motion:Im.motion,accessibility:{...Tm.light,focusRing:{...Tm.light.focusRing,color:{$type:`color`,$value:`#16a34a`}}},zIndex:Em},dark:{$name:`Botanical`,$description:`Forest at night (dark) — deep soil surfaces with lifted leaf-green accents and gentle organic motion.`,$metadata:{font:`Lora`,fontUrl:`https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap`,philosophy:`Rooted in nature. Growing with intention.`},color:{primary:{50:{$value:`#14532d`,$type:`color`},100:{$value:`#166534`,$type:`color`},200:{$value:`#15803d`,$type:`color`},300:{$value:`#16a34a`,$type:`color`},400:{$value:`#22c55e`,$type:`color`},500:{$value:`#4ade80`,$type:`color`},600:{$value:`#86efac`,$type:`color`},700:{$value:`#bbf7d0`,$type:`color`},800:{$value:`#dcfce7`,$type:`color`},900:{$value:`#f0fdf4`,$type:`color`}},neutral:{50:{$value:`#141210`,$type:`color`},100:{$value:`#1f1c18`,$type:`color`},200:{$value:`#352e20`,$type:`color`},300:{$value:`#504530`,$type:`color`},400:{$value:`#746448`,$type:`color`},500:{$value:`#9a8660`,$type:`color`},600:{$value:`#bfaa80`,$type:`color`},700:{$value:`#dccba5`,$type:`color`},800:{$value:`#f0e4c9`,$type:`color`},900:{$value:`#fefcf8`,$type:`color`}},success:wm.dark.success,warning:wm.dark.warning,error:wm.dark.error,info:wm.dark.info,surface:{$value:`#1f1c18`,$type:`color`},onSurface:{$value:`#fefcf8`,$type:`color`},surfaceVariant:{$value:`#352e20`,$type:`color`},onSurfaceVariant:{$value:`#dccba5`,$type:`color`},container:{$value:`#166534`,$type:`color`},onContainer:{$value:`#dcfce7`,$type:`color`},outline:{$value:`#504530`,$type:`color`},outlineVariant:{$value:`#352e20`,$type:`color`},onPrimary:{$value:`#141210`,$type:`color`},primaryContainer:{$value:`#166534`,$type:`color`},onPrimaryContainer:{$value:`#dcfce7`,$type:`color`},onError:{$value:`#450a0a`,$type:`color`},errorContainer:{$value:`#7f1d1d`,$type:`color`},onErrorContainer:{$value:`#fecaca`,$type:`color`},tertiary:{$value:`#fbbf24`,$type:`color`},onTertiary:{$value:`#451a03`,$type:`color`},tertiaryContainer:{$value:`#78350f`,$type:`color`},onTertiaryContainer:{$value:`#fef3c7`,$type:`color`}},font:Im.font,spacing:Im.spacing,shape:Im.shape,motion:Im.motion,accessibility:{...Tm.dark,focusRing:{...Tm.dark.focusRing,color:{$type:`color`,$value:`#4ade80`}}},zIndex:Em}},Rm={font:{family:{sans:{$value:`-apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif`,$type:`fontFamily`},mono:{$value:`ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace`,$type:`fontFamily`}},size:{sm:{$value:`0.875rem`,$type:`dimension`},base:{$value:`1rem`,$type:`dimension`},lg:{$value:`1.125rem`,$type:`dimension`},xl:{$value:`1.25rem`,$type:`dimension`},"2xl":{$value:`1.5rem`,$type:`dimension`}},weight:{normal:{$value:`400`,$type:`fontWeight`},medium:{$value:`500`,$type:`fontWeight`},semibold:{$value:`600`,$type:`fontWeight`},bold:{$value:`700`,$type:`fontWeight`}},lineHeight:{tight:{$value:`1.25`,$type:`number`},normal:{$value:`1.55`,$type:`number`},relaxed:{$value:`1.75`,$type:`number`}}},spacing:{1:{$value:`0.25rem`,$type:`dimension`},2:{$value:`0.5rem`,$type:`dimension`},3:{$value:`0.75rem`,$type:`dimension`},4:{$value:`1rem`,$type:`dimension`},5:{$value:`1.25rem`,$type:`dimension`},6:{$value:`1.5rem`,$type:`dimension`},8:{$value:`2rem`,$type:`dimension`},10:{$value:`2.5rem`,$type:`dimension`},12:{$value:`3rem`,$type:`dimension`},xs:{$value:`0.25rem`,$type:`dimension`},sm:{$value:`0.5rem`,$type:`dimension`},md:{$value:`1rem`,$type:`dimension`},lg:{$value:`1.5rem`,$type:`dimension`},xl:{$value:`2rem`,$type:`dimension`},"2xl":{$value:`3rem`,$type:`dimension`}},shape:{radius:{sm:{$value:`0.5rem`,$type:`dimension`},md:{$value:`0.75rem`,$type:`dimension`},lg:{$value:`1rem`,$type:`dimension`},xl:{$value:`1.5rem`,$type:`dimension`},full:{$value:`9999px`,$type:`dimension`}},shadow:{sm:{$value:`0 1px 3px color-mix(in srgb, var(--ggui-color-primary-500) 8%, transparent)`,$type:`shadow`},md:{$value:`0 1px 2px rgba(20, 20, 19, 0.04), 0 8px 16px -4px color-mix(in srgb, var(--ggui-color-primary-500) 14%, transparent)`,$type:`shadow`},lg:{$value:`0 2px 4px rgba(20, 20, 19, 0.04), 0 16px 32px -8px color-mix(in srgb, var(--ggui-color-primary-500) 20%, transparent)`,$type:`shadow`},xl:{$value:`0 4px 8px rgba(20, 20, 19, 0.04), 0 24px 48px -12px color-mix(in srgb, var(--ggui-color-primary-500) 26%, transparent)`,$type:`shadow`}}},motion:{duration:{fast:{$value:`120ms`,$type:`duration`},normal:{$value:`240ms`,$type:`duration`},slow:{$value:`480ms`,$type:`duration`}},easing:{default:{$value:`cubic-bezier(0.4, 0, 0.2, 1)`,$type:`cubicBezier`},spring:{$value:`cubic-bezier(0.22, 1, 0.36, 1)`,$type:`cubicBezier`}},keyframes:{entrance:{$value:`0%{opacity:0;transform:translateY(4px)}100%{opacity:1;transform:none}`,$type:`keyframes`}},transition:{...Dm,fast:{$type:`transition`,$value:`120ms cubic-bezier(0.4, 0, 0.2, 1)`},normal:{$type:`transition`,$value:`240ms cubic-bezier(0.4, 0, 0.2, 1)`},slow:{$type:`transition`,$value:`480ms cubic-bezier(0.4, 0, 0.2, 1)`}}}},zm={light:{$name:`Claudic`,$description:`Fits inside claude.ai — warm ivory surfaces, terracotta accent, calm by design.`,$metadata:{font:`system`,philosophy:`Quiet, papery, conversational. Built to feel native when rendered inside claude.ai.`},color:{primary:{50:{$value:`#fbf2ee`,$type:`color`},100:{$value:`#f5dfd4`,$type:`color`},200:{$value:`#ecbfa9`,$type:`color`},300:{$value:`#df9d80`,$type:`color`},400:{$value:`#d6896c`,$type:`color`},500:{$value:`#cc785c`,$type:`color`},600:{$value:`#b8694f`,$type:`color`},700:{$value:`#965240`,$type:`color`},800:{$value:`#723e30`,$type:`color`},900:{$value:`#4d2920`,$type:`color`}},neutral:{50:{$value:`#faf9f5`,$type:`color`},100:{$value:`#f5f4ee`,$type:`color`},200:{$value:`#ebe9df`,$type:`color`},300:{$value:`#dad8cc`,$type:`color`},400:{$value:`#a8a59f`,$type:`color`},500:{$value:`#7c7a76`,$type:`color`},600:{$value:`#56544f`,$type:`color`},700:{$value:`#3d3b39`,$type:`color`},800:{$value:`#262624`,$type:`color`},900:{$value:`#141413`,$type:`color`}},success:{50:{$value:`#f4f7ec`,$type:`color`},100:{$value:`#e3ecd0`,$type:`color`},200:{$value:`#c8d8a5`,$type:`color`},500:{$value:`#5c7a35`,$type:`color`},600:{$value:`#587634`,$type:`color`},700:{$value:`#465c29`,$type:`color`},800:{$value:`#33431e`,$type:`color`}},warning:{50:{$value:`#fbf3e3`,$type:`color`},100:{$value:`#f6e2bb`,$type:`color`},200:{$value:`#eac786`,$type:`color`},500:{$value:`#956922`,$type:`color`},600:{$value:`#a87725`,$type:`color`},700:{$value:`#825c1d`,$type:`color`},800:{$value:`#5d4214`,$type:`color`}},error:{50:{$value:`#f9ebe7`,$type:`color`},100:{$value:`#f1cec5`,$type:`color`},200:{$value:`#e3a294`,$type:`color`},500:{$value:`#bc4a3a`,$type:`color`},600:{$value:`#9d3d30`,$type:`color`},700:{$value:`#7a2f25`,$type:`color`},800:{$value:`#57211a`,$type:`color`}},info:{50:{$value:`#f1f0ee`,$type:`color`},100:{$value:`#dedcd8`,$type:`color`},200:{$value:`#bdbab4`,$type:`color`},500:{$value:`#7c7a76`,$type:`color`},600:{$value:`#65635f`,$type:`color`},700:{$value:`#4d4b48`,$type:`color`},800:{$value:`#363432`,$type:`color`}},surface:{$value:`#faf9f5`,$type:`color`},onSurface:{$value:`#141413`,$type:`color`},surfaceVariant:{$value:`#f5f4ee`,$type:`color`},onSurfaceVariant:{$value:`#56544f`,$type:`color`},container:{$value:`#fbf2ee`,$type:`color`},onContainer:{$value:`#4d2920`,$type:`color`},outline:{$value:`#dad8cc`,$type:`color`},outlineVariant:{$value:`#ebe9df`,$type:`color`},onPrimary:{$value:`#15130a`,$type:`color`},primaryContainer:{$value:`#fbf2ee`,$type:`color`},onPrimaryContainer:{$value:`#4d2920`,$type:`color`},onError:{$value:`#faf9f5`,$type:`color`},errorContainer:{$value:`#f9ebe7`,$type:`color`},onErrorContainer:{$value:`#57211a`,$type:`color`},tertiary:{$value:`#6b8e3d`,$type:`color`},onTertiary:{$value:`#faf9f5`,$type:`color`},tertiaryContainer:{$value:`#f4f7ec`,$type:`color`},onTertiaryContainer:{$value:`#33431e`,$type:`color`}},font:Rm.font,spacing:Rm.spacing,shape:Rm.shape,motion:Rm.motion,accessibility:{...Tm.light,focusRing:{...Tm.light.focusRing,color:{$type:`color`,$value:`#cc785c`}}},zIndex:Em},dark:{$name:`Claudic`,$description:`Fits inside claude.ai (dark) — warm charcoal surfaces, terracotta accent, calm by design.`,$metadata:{font:`system`,philosophy:`Quiet, papery, conversational. Built to feel native when rendered inside claude.ai.`},color:{primary:{50:{$value:`#4d2920`,$type:`color`},100:{$value:`#723e30`,$type:`color`},200:{$value:`#965240`,$type:`color`},300:{$value:`#b8694f`,$type:`color`},400:{$value:`#cc785c`,$type:`color`},500:{$value:`#d6896c`,$type:`color`},600:{$value:`#df9d80`,$type:`color`},700:{$value:`#ecbfa9`,$type:`color`},800:{$value:`#f5dfd4`,$type:`color`},900:{$value:`#fbf2ee`,$type:`color`}},neutral:{50:{$value:`#1a1917`,$type:`color`},100:{$value:`#262624`,$type:`color`},200:{$value:`#2d2c2a`,$type:`color`},300:{$value:`#3d3b39`,$type:`color`},400:{$value:`#56544f`,$type:`color`},500:{$value:`#7c7a76`,$type:`color`},600:{$value:`#a8a59f`,$type:`color`},700:{$value:`#dad8cc`,$type:`color`},800:{$value:`#ebe9df`,$type:`color`},900:{$value:`#faf9f5`,$type:`color`}},success:{50:{$value:`#1c2412`,$type:`color`},100:{$value:`#34461e`,$type:`color`},200:{$value:`#4a6029`,$type:`color`},500:{$value:`#9bb56b`,$type:`color`},600:{$value:`#b1c688`,$type:`color`},700:{$value:`#c8d8a5`,$type:`color`},800:{$value:`#e3ecd0`,$type:`color`}},warning:{50:{$value:`#2a1e0c`,$type:`color`},100:{$value:`#523915`,$type:`color`},200:{$value:`#7a541f`,$type:`color`},500:{$value:`#dba14a`,$type:`color`},600:{$value:`#e4b46e`,$type:`color`},700:{$value:`#eac786`,$type:`color`},800:{$value:`#f6e2bb`,$type:`color`}},error:{50:{$value:`#2a1410`,$type:`color`},100:{$value:`#52271f`,$type:`color`},200:{$value:`#7a3a2e`,$type:`color`},500:{$value:`#d7705f`,$type:`color`},600:{$value:`#df8576`,$type:`color`},700:{$value:`#e3a294`,$type:`color`},800:{$value:`#f1cec5`,$type:`color`}},info:{50:{$value:`#222220`,$type:`color`},100:{$value:`#3a3936`,$type:`color`},200:{$value:`#56544f`,$type:`color`},500:{$value:`#a8a59f`,$type:`color`},600:{$value:`#bcbab5`,$type:`color`},700:{$value:`#d1cfca`,$type:`color`},800:{$value:`#e6e4e0`,$type:`color`}},surface:{$value:`#262624`,$type:`color`},onSurface:{$value:`#faf9f5`,$type:`color`},surfaceVariant:{$value:`#2d2c2a`,$type:`color`},onSurfaceVariant:{$value:`#a8a59f`,$type:`color`},container:{$value:`#3d3b39`,$type:`color`},onContainer:{$value:`#fbf2ee`,$type:`color`},outline:{$value:`#3d3b39`,$type:`color`},outlineVariant:{$value:`#2d2c2a`,$type:`color`},onPrimary:{$value:`#262624`,$type:`color`},primaryContainer:{$value:`#723e30`,$type:`color`},onPrimaryContainer:{$value:`#f5dfd4`,$type:`color`},onError:{$value:`#2a1410`,$type:`color`},errorContainer:{$value:`#52271f`,$type:`color`},onErrorContainer:{$value:`#f1cec5`,$type:`color`},tertiary:{$value:`#9bb56b`,$type:`color`},onTertiary:{$value:`#1c2412`,$type:`color`},tertiaryContainer:{$value:`#34461e`,$type:`color`},onTertiaryContainer:{$value:`#e3ecd0`,$type:`color`}},font:Rm.font,spacing:Rm.spacing,shape:Rm.shape,motion:Rm.motion,accessibility:{...Tm.dark,focusRing:{...Tm.dark.focusRing,color:{$type:`color`,$value:`#d6896c`}}},zIndex:Em}},Bm={font:{family:{sans:{$value:`"Inter Variable", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif`,$type:`fontFamily`},mono:{$value:`"JetBrains Mono", "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace`,$type:`fontFamily`}},size:{sm:{$value:`0.8125rem`,$type:`dimension`},base:{$value:`0.9375rem`,$type:`dimension`},lg:{$value:`1.0625rem`,$type:`dimension`},xl:{$value:`1.3125rem`,$type:`dimension`},"2xl":{$value:`1.75rem`,$type:`dimension`}},weight:{normal:{$value:`400`,$type:`fontWeight`},medium:{$value:`500`,$type:`fontWeight`},semibold:{$value:`600`,$type:`fontWeight`},bold:{$value:`680`,$type:`fontWeight`}},lineHeight:{tight:{$value:`1.1`,$type:`number`},normal:{$value:`1.55`,$type:`number`},relaxed:{$value:`1.7`,$type:`number`}}},spacing:{1:{$value:`0.25rem`,$type:`dimension`},2:{$value:`0.5rem`,$type:`dimension`},3:{$value:`0.75rem`,$type:`dimension`},4:{$value:`1rem`,$type:`dimension`},5:{$value:`1.25rem`,$type:`dimension`},6:{$value:`1.5rem`,$type:`dimension`},8:{$value:`2rem`,$type:`dimension`},10:{$value:`2.5rem`,$type:`dimension`},12:{$value:`3rem`,$type:`dimension`},xs:{$value:`0.25rem`,$type:`dimension`},sm:{$value:`0.5rem`,$type:`dimension`},md:{$value:`1rem`,$type:`dimension`},lg:{$value:`1.5rem`,$type:`dimension`},xl:{$value:`2rem`,$type:`dimension`},"2xl":{$value:`3rem`,$type:`dimension`}},shape:{radius:{sm:{$value:`0.5rem`,$type:`dimension`},md:{$value:`0.875rem`,$type:`dimension`},lg:{$value:`1.125rem`,$type:`dimension`},xl:{$value:`1.5rem`,$type:`dimension`},full:{$value:`9999px`,$type:`dimension`}},shadow:{sm:{$value:`0 1px 2px color-mix(in srgb, var(--ggui-color-primary-500) 6%, transparent)`,$type:`shadow`},md:{$value:`0 1px 3px rgba(21, 19, 31, 0.06), 0 8px 24px -6px color-mix(in srgb, var(--ggui-color-primary-500) 16%, transparent)`,$type:`shadow`},lg:{$value:`0 2px 6px rgba(21, 19, 31, 0.05), 0 20px 40px -10px color-mix(in srgb, var(--ggui-color-primary-500) 22%, transparent)`,$type:`shadow`},xl:{$value:`0 4px 10px rgba(21, 19, 31, 0.04), 0 32px 64px -16px color-mix(in srgb, var(--ggui-color-primary-500) 28%, transparent)`,$type:`shadow`}}},motion:{duration:{fast:{$value:`150ms`,$type:`duration`},normal:{$value:`250ms`,$type:`duration`},slow:{$value:`420ms`,$type:`duration`},ambient:{$value:`8000ms`,$type:`duration`}},easing:{default:{$value:`cubic-bezier(0.32, 0.72, 0, 1)`,$type:`cubicBezier`},spring:{$value:`cubic-bezier(0.16, 1, 0.3, 1)`,$type:`cubicBezier`}},keyframes:{entrance:{$value:`0%{opacity:0;transform:translateY(6px)}100%{opacity:1;transform:none}`,$type:`keyframes`}},transition:Dm}},Vm={light:{$name:`Indigo`,$description:`Flagship ggui preset — refined electric indigo on a quiet paper surface. Premium, restrained, distinctive.`,$metadata:{font:`inter`,philosophy:`Looks like a deliberate aesthetic choice. Linear/Arc/Vercel-grade restraint with one confident accent.`},color:{primary:{50:{$value:`#eef2ff`,$type:`color`},100:{$value:`#e0e7ff`,$type:`color`},200:{$value:`#c7d2fe`,$type:`color`},300:{$value:`#a5b4fc`,$type:`color`},400:{$value:`#818cf8`,$type:`color`},500:{$value:`#4f46e5`,$type:`color`},600:{$value:`#4338ca`,$type:`color`},700:{$value:`#3730a3`,$type:`color`},800:{$value:`#312e81`,$type:`color`},900:{$value:`#1e1b4b`,$type:`color`}},neutral:{50:{$value:`#fafaf7`,$type:`color`},100:{$value:`#f4f4f0`,$type:`color`},200:{$value:`#e8e7e3`,$type:`color`},300:{$value:`#d4d3cf`,$type:`color`},400:{$value:`#9c9ba0`,$type:`color`},500:{$value:`#6e6d74`,$type:`color`},600:{$value:`#4a4954`,$type:`color`},700:{$value:`#322f3e`,$type:`color`},800:{$value:`#211f2c`,$type:`color`},900:{$value:`#15131f`,$type:`color`}},success:{50:{$value:`#ecfdf5`,$type:`color`},100:{$value:`#d1fae5`,$type:`color`},200:{$value:`#a7f3d0`,$type:`color`},500:{$value:`#0b815a`,$type:`color`},600:{$value:`#0b8259`,$type:`color`},700:{$value:`#086847`,$type:`color`},800:{$value:`#064e36`,$type:`color`}},warning:{50:{$value:`#fff8eb`,$type:`color`},100:{$value:`#fdecc8`,$type:`color`},200:{$value:`#fbd897`,$type:`color`},500:{$value:`#a66210`,$type:`color`},600:{$value:`#b86b0e`,$type:`color`},700:{$value:`#90530a`,$type:`color`},800:{$value:`#6b3d07`,$type:`color`}},error:{50:{$value:`#fef2f4`,$type:`color`},100:{$value:`#fde2e7`,$type:`color`},200:{$value:`#fbc5cf`,$type:`color`},500:{$value:`#dc2845`,$type:`color`},600:{$value:`#b81f38`,$type:`color`},700:{$value:`#94182d`,$type:`color`},800:{$value:`#701222`,$type:`color`}},info:{50:{$value:`#ecfeff`,$type:`color`},100:{$value:`#cffafe`,$type:`color`},200:{$value:`#a5f3fc`,$type:`color`},500:{$value:`#0891b2`,$type:`color`},600:{$value:`#0e7490`,$type:`color`},700:{$value:`#155e75`,$type:`color`},800:{$value:`#164e63`,$type:`color`}},surface:{$value:`#fafaf7`,$type:`color`},onSurface:{$value:`#15131f`,$type:`color`},surfaceVariant:{$value:`#f4f4f0`,$type:`color`},onSurfaceVariant:{$value:`#4a4954`,$type:`color`},container:{$value:`#eef2ff`,$type:`color`},onContainer:{$value:`#1e1b4b`,$type:`color`},outline:{$value:`#d4d3cf`,$type:`color`},outlineVariant:{$value:`#e8e7e3`,$type:`color`},onPrimary:{$value:`#fafaf7`,$type:`color`},primaryContainer:{$value:`#eef2ff`,$type:`color`},onPrimaryContainer:{$value:`#1e1b4b`,$type:`color`},onError:{$value:`#fafaf7`,$type:`color`},errorContainer:{$value:`#fde2e7`,$type:`color`},onErrorContainer:{$value:`#701222`,$type:`color`},tertiary:{$value:`#7c3aed`,$type:`color`},onTertiary:{$value:`#fafaf7`,$type:`color`},tertiaryContainer:{$value:`#ede9fe`,$type:`color`},onTertiaryContainer:{$value:`#4c1d95`,$type:`color`}},font:Bm.font,spacing:Bm.spacing,shape:Bm.shape,motion:Bm.motion,accessibility:{...Tm.light,focusRing:{...Tm.light.focusRing,color:{$type:`color`,$value:`#4f46e5`}}},zIndex:Em},dark:{$name:`Indigo`,$description:`Flagship ggui preset (dark) — refined electric indigo on rich midnight. Premium, restrained, distinctive.`,$metadata:{font:`inter`,philosophy:`Looks like a deliberate aesthetic choice. Linear/Arc/Vercel-grade restraint with one confident accent.`},color:{primary:{50:{$value:`#1e1b4b`,$type:`color`},100:{$value:`#312e81`,$type:`color`},200:{$value:`#3730a3`,$type:`color`},300:{$value:`#4338ca`,$type:`color`},400:{$value:`#4f46e5`,$type:`color`},500:{$value:`#818cf8`,$type:`color`},600:{$value:`#a5b4fc`,$type:`color`},700:{$value:`#c7d2fe`,$type:`color`},800:{$value:`#e0e7ff`,$type:`color`},900:{$value:`#eef2ff`,$type:`color`}},neutral:{50:{$value:`#0c0b14`,$type:`color`},100:{$value:`#15131f`,$type:`color`},200:{$value:`#1d1b29`,$type:`color`},300:{$value:`#2a2839`,$type:`color`},400:{$value:`#3e3c50`,$type:`color`},500:{$value:`#636176`,$type:`color`},600:{$value:`#8b8898`,$type:`color`},700:{$value:`#b8b6c2`,$type:`color`},800:{$value:`#dcdbe2`,$type:`color`},900:{$value:`#f5f4f9`,$type:`color`}},success:{50:{$value:`#022c1d`,$type:`color`},100:{$value:`#064e36`,$type:`color`},200:{$value:`#086847`,$type:`color`},500:{$value:`#34d399`,$type:`color`},600:{$value:`#6ee7b7`,$type:`color`},700:{$value:`#a7f3d0`,$type:`color`},800:{$value:`#d1fae5`,$type:`color`}},warning:{50:{$value:`#3a2104`,$type:`color`},100:{$value:`#6b3d07`,$type:`color`},200:{$value:`#90530a`,$type:`color`},500:{$value:`#f59e0b`,$type:`color`},600:{$value:`#fbbf24`,$type:`color`},700:{$value:`#fcd34d`,$type:`color`},800:{$value:`#fde68a`,$type:`color`}},error:{50:{$value:`#3b0a14`,$type:`color`},100:{$value:`#701222`,$type:`color`},200:{$value:`#94182d`,$type:`color`},500:{$value:`#fb7185`,$type:`color`},600:{$value:`#fda4af`,$type:`color`},700:{$value:`#fecdd3`,$type:`color`},800:{$value:`#ffe4e6`,$type:`color`}},info:{50:{$value:`#083344`,$type:`color`},100:{$value:`#164e63`,$type:`color`},200:{$value:`#155e75`,$type:`color`},500:{$value:`#22d3ee`,$type:`color`},600:{$value:`#67e8f9`,$type:`color`},700:{$value:`#a5f3fc`,$type:`color`},800:{$value:`#cffafe`,$type:`color`}},surface:{$value:`#15131f`,$type:`color`},onSurface:{$value:`#f5f4f9`,$type:`color`},surfaceVariant:{$value:`#221e35`,$type:`color`},onSurfaceVariant:{$value:`#c8c6d2`,$type:`color`},container:{$value:`#312e81`,$type:`color`},onContainer:{$value:`#eef2ff`,$type:`color`},outline:{$value:`#3e3c50`,$type:`color`},outlineVariant:{$value:`#2a2839`,$type:`color`},onPrimary:{$value:`#0c0b14`,$type:`color`},primaryContainer:{$value:`#312e81`,$type:`color`},onPrimaryContainer:{$value:`#e0e7ff`,$type:`color`},onError:{$value:`#3b0a14`,$type:`color`},errorContainer:{$value:`#701222`,$type:`color`},onErrorContainer:{$value:`#fecdd3`,$type:`color`},tertiary:{$value:`#a78bfa`,$type:`color`},onTertiary:{$value:`#2e1065`,$type:`color`},tertiaryContainer:{$value:`#4c1d95`,$type:`color`},onTertiaryContainer:{$value:`#ede9fe`,$type:`color`}},font:Bm.font,spacing:Bm.spacing,shape:Bm.shape,motion:Bm.motion,accessibility:{...Tm.dark,focusRing:{...Tm.dark.focusRing,color:{$type:`color`,$value:`#818cf8`}}},zIndex:Em}},Hm={font:{family:{sans:{$value:`"DM Sans", system-ui, -apple-system, sans-serif`,$type:`fontFamily`},mono:{$value:`"JetBrains Mono", ui-monospace, monospace`,$type:`fontFamily`}},size:{sm:{$value:`0.875rem`,$type:`dimension`},base:{$value:`1rem`,$type:`dimension`},lg:{$value:`1.125rem`,$type:`dimension`},xl:{$value:`1.25rem`,$type:`dimension`},"2xl":{$value:`1.5rem`,$type:`dimension`}},weight:{normal:{$value:`400`,$type:`fontWeight`},medium:{$value:`500`,$type:`fontWeight`},semibold:{$value:`600`,$type:`fontWeight`},bold:{$value:`700`,$type:`fontWeight`}},lineHeight:{tight:{$value:`1.25`,$type:`number`},normal:{$value:`1.5`,$type:`number`},relaxed:{$value:`1.75`,$type:`number`}}},spacing:{1:{$value:`0.25rem`,$type:`dimension`},2:{$value:`0.5rem`,$type:`dimension`},3:{$value:`0.75rem`,$type:`dimension`},4:{$value:`1rem`,$type:`dimension`},5:{$value:`1.25rem`,$type:`dimension`},6:{$value:`1.5rem`,$type:`dimension`},8:{$value:`2rem`,$type:`dimension`},10:{$value:`2.5rem`,$type:`dimension`},12:{$value:`3rem`,$type:`dimension`}},motion:{duration:{fast:{$value:`120ms`,$type:`duration`},normal:{$value:`200ms`,$type:`duration`},slow:{$value:`400ms`,$type:`duration`},ambient:{$value:`2000ms`,$type:`duration`}},easing:{default:{$value:`cubic-bezier(0.4, 0, 0.2, 1)`,$type:`cubicBezier`},bounce:{$value:`cubic-bezier(0.68, -0.55, 0.27, 1.55)`,$type:`cubicBezier`},spring:{$value:`cubic-bezier(0.22, 1, 0.36, 1)`,$type:`cubicBezier`}},transition:{fast:{$value:`120ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},normal:{$value:`200ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},slow:{$value:`400ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},colors:{$value:`color 200ms cubic-bezier(0.4, 0, 0.2, 1), background-color 200ms cubic-bezier(0.4, 0, 0.2, 1), border-color 200ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},opacity:{$value:`opacity 200ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},transform:{$value:`transform 200ms cubic-bezier(0.22, 1, 0.36, 1)`,$type:`transition`}},keyframes:{"fade-in":{$value:`0%{opacity:0}100%{opacity:1}`,$type:`keyframes`},"slide-up":{$value:`0%{opacity:0;transform:translateY(8px)}100%{opacity:1;transform:translateY(0)}`,$type:`keyframes`},"pulse-soft":{$value:`0%{opacity:1}50%{opacity:0.65}100%{opacity:1}`,$type:`keyframes`}}},accessibility:{focusRing:{color:{$value:`#B8FF3A`,$type:`color`},width:{$value:`2px`,$type:`dimension`},offset:{$value:`2px`,$type:`dimension`}},reducedMotion:{duration:{$value:`0ms`,$type:`duration`}},highContrast:{borderWidth:{$value:`2px`,$type:`dimension`},textColor:{$value:`#FFFFFF`,$type:`color`},backgroundColor:{$value:`#000000`,$type:`color`},linkColor:{$value:`#CCFF66`,$type:`color`}}},zIndex:Em},Um={sm:{$value:`0.375rem`,$type:`dimension`},md:{$value:`0.5rem`,$type:`dimension`},lg:{$value:`0.75rem`,$type:`dimension`},xl:{$value:`1rem`,$type:`dimension`},full:{$value:`9999px`,$type:`dimension`}},Wm={sm:{$value:`0 1px 2px rgba(0, 0, 0, 0.2)`,$type:`shadow`},md:{$value:`0 2px 8px rgba(0, 0, 0, 0.25)`,$type:`shadow`},lg:{$value:`0 6px 16px rgba(0, 0, 0, 0.28)`,$type:`shadow`},xl:{$value:`0 10px 24px rgba(0, 0, 0, 0.3)`,$type:`shadow`}},Gm={sm:{$value:`0 1px 2px rgba(26, 29, 36, 0.06)`,$type:`shadow`},md:{$value:`0 2px 8px rgba(26, 29, 36, 0.08)`,$type:`shadow`},lg:{$value:`0 6px 16px rgba(26, 29, 36, 0.1)`,$type:`shadow`},xl:{$value:`0 12px 28px rgba(26, 29, 36, 0.12)`,$type:`shadow`}},Km={$name:`guuey-brand-v1`,$description:`The guuey product brand (dark) — slate-ink surfaces, slime #B8FF3A accent, DM Sans.`,$metadata:{font:`DM Sans`,fontUrl:`https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap`,philosophy:`Agent-native. Slime on slate.`,frameless:!0},color:{primary:{50:{$value:`#141D05`,$type:`color`},100:{$value:`#28390B`,$type:`color`},200:{$value:`#3F5A11`,$type:`color`},300:{$value:`#5F8719`,$type:`color`},400:{$value:`#8CC627`,$type:`color`},500:{$value:`#B8FF3A`,$type:`color`},600:{$value:`#CCFF66`,$type:`color`},700:{$value:`#DBFF8F`,$type:`color`},800:{$value:`#E9FFB8`,$type:`color`},900:{$value:`#F6FFE0`,$type:`color`}},neutral:{50:{$value:`#0E1014`,$type:`color`},100:{$value:`#1A1D24`,$type:`color`},200:{$value:`#232630`,$type:`color`},300:{$value:`#242938`,$type:`color`},400:{$value:`#3B4152`,$type:`color`},500:{$value:`#878C99`,$type:`color`},600:{$value:`#B7BAC4`,$type:`color`},700:{$value:`#D5D6DC`,$type:`color`},800:{$value:`#E8E7E2`,$type:`color`},900:{$value:`#F6F5EE`,$type:`color`}},success:{50:{$value:`#141D05`,$type:`color`},100:{$value:`#28390B`,$type:`color`},200:{$value:`#3F5A11`,$type:`color`},500:{$value:`#B8FF3A`,$type:`color`},600:{$value:`#CCFF66`,$type:`color`},700:{$value:`#DBFF8F`,$type:`color`},800:{$value:`#E9FFB8`,$type:`color`}},warning:{50:{$value:`#33240A`,$type:`color`},100:{$value:`#5C420F`,$type:`color`},200:{$value:`#8A6318`,$type:`color`},500:{$value:`#FFB020`,$type:`color`},600:{$value:`#FFC24D`,$type:`color`},700:{$value:`#FFD37D`,$type:`color`},800:{$value:`#FFE5AE`,$type:`color`}},error:{50:{$value:`#33110E`,$type:`color`},100:{$value:`#5E1F1B`,$type:`color`},200:{$value:`#8F2F2A`,$type:`color`},500:{$value:`#FF5B5B`,$type:`color`},600:{$value:`#FF7D7A`,$type:`color`},700:{$value:`#FF9F9C`,$type:`color`},800:{$value:`#FFC3C0`,$type:`color`}},info:{50:{$value:`#0A2733`,$type:`color`},100:{$value:`#12455C`,$type:`color`},200:{$value:`#1E6A8A`,$type:`color`},500:{$value:`#3AC8FF`,$type:`color`},600:{$value:`#66D4FF`,$type:`color`},700:{$value:`#92E0FF`,$type:`color`},800:{$value:`#BFECFF`,$type:`color`}},surface:{$value:`#1A1D24`,$type:`color`},onSurface:{$value:`#F6F5EE`,$type:`color`},surfaceVariant:{$value:`#242938`,$type:`color`},onSurfaceVariant:{$value:`#B7BAC4`,$type:`color`},container:{$value:`#232630`,$type:`color`},onContainer:{$value:`#F6F5EE`,$type:`color`},outline:{$value:`rgba(246, 245, 238, 0.14)`,$type:`color`},outlineVariant:{$value:`rgba(246, 245, 238, 0.1)`,$type:`color`},onPrimary:{$value:`#0E1014`,$type:`color`},primaryContainer:{$value:`#242938`,$type:`color`},onPrimaryContainer:{$value:`#CCFF66`,$type:`color`},onError:{$value:`#33110E`,$type:`color`},errorContainer:{$value:`#5E1F1B`,$type:`color`},onErrorContainer:{$value:`#FFC3C0`,$type:`color`},tertiary:{$value:`#FF4FB0`,$type:`color`},onTertiary:{$value:`#0E1014`,$type:`color`},tertiaryContainer:{$value:`#451A35`,$type:`color`},onTertiaryContainer:{$value:`#FFC1E4`,$type:`color`}},...Hm,shape:{radius:Um,shadow:Wm}},qm={light:{$name:`guuey-brand-v1`,$description:`The guuey product brand (light, provisional) — paper surfaces, slime accent held for fills, darkened slime for text emphasis.`,$metadata:Km.$metadata,color:{primary:{50:{$value:`#F6FFE0`,$type:`color`},100:{$value:`#E9FFB8`,$type:`color`},200:{$value:`#DBFF8F`,$type:`color`},300:{$value:`#CCFF66`,$type:`color`},400:{$value:`#B8FF3A`,$type:`color`},500:{$value:`#9FE01C`,$type:`color`},600:{$value:`#7DB214`,$type:`color`},700:{$value:`#476809`,$type:`color`},800:{$value:`#3F5A11`,$type:`color`},900:{$value:`#28390B`,$type:`color`}},neutral:{50:{$value:`#FBFAF6`,$type:`color`},100:{$value:`#F6F5EE`,$type:`color`},200:{$value:`#E8E7E2`,$type:`color`},300:{$value:`#D5D6DC`,$type:`color`},400:{$value:`#B7BAC4`,$type:`color`},500:{$value:`#6E7380`,$type:`color`},600:{$value:`#4A4F5C`,$type:`color`},700:{$value:`#333846`,$type:`color`},800:{$value:`#242938`,$type:`color`},900:{$value:`#1A1D24`,$type:`color`}},success:{50:{$value:`#F6FFE0`,$type:`color`},100:{$value:`#E9FFB8`,$type:`color`},200:{$value:`#DBFF8F`,$type:`color`},500:{$value:`#517709`,$type:`color`},600:{$value:`#476809`,$type:`color`},700:{$value:`#35510B`,$type:`color`},800:{$value:`#28390B`,$type:`color`}},warning:{50:{$value:`#FFF4DD`,$type:`color`},100:{$value:`#FFE5AE`,$type:`color`},200:{$value:`#FFD37D`,$type:`color`},500:{$value:`#9C6205`,$type:`color`},600:{$value:`#7C4D04`,$type:`color`},700:{$value:`#5E3A03`,$type:`color`},800:{$value:`#3F2702`,$type:`color`}},error:{50:{$value:`#FFE9E8`,$type:`color`},100:{$value:`#FFC3C0`,$type:`color`},200:{$value:`#FF9F9C`,$type:`color`},500:{$value:`#CC2F2F`,$type:`color`},600:{$value:`#A62626`,$type:`color`},700:{$value:`#7E1D1D`,$type:`color`},800:{$value:`#5E1F1B`,$type:`color`}},info:{50:{$value:`#E5F7FF`,$type:`color`},100:{$value:`#BFECFF`,$type:`color`},200:{$value:`#92E0FF`,$type:`color`},500:{$value:`#0B739E`,$type:`color`},600:{$value:`#085572`,$type:`color`},700:{$value:`#06455D`,$type:`color`},800:{$value:`#0A3346`,$type:`color`}},surface:{$value:`#FFFFFF`,$type:`color`},onSurface:{$value:`#1A1D24`,$type:`color`},surfaceVariant:{$value:`#F6F5EE`,$type:`color`},onSurfaceVariant:{$value:`#4A4F5C`,$type:`color`},container:{$value:`#FBFAF6`,$type:`color`},onContainer:{$value:`#1A1D24`,$type:`color`},outline:{$value:`rgba(26, 29, 36, 0.18)`,$type:`color`},outlineVariant:{$value:`rgba(26, 29, 36, 0.10)`,$type:`color`},onPrimary:{$value:`#0E1014`,$type:`color`},primaryContainer:{$value:`#E9FFB8`,$type:`color`},onPrimaryContainer:{$value:`#28390B`,$type:`color`},onError:{$value:`#FFFFFF`,$type:`color`},errorContainer:{$value:`#FFE9E8`,$type:`color`},onErrorContainer:{$value:`#8A1F1F`,$type:`color`},tertiary:{$value:`#D6247F`,$type:`color`},onTertiary:{$value:`#FFFFFF`,$type:`color`},tertiaryContainer:{$value:`#FFDCEE`,$type:`color`},onTertiaryContainer:{$value:`#6B1240`,$type:`color`}},...Hm,shape:{radius:Um,shadow:Gm}},dark:Km},Jm=new Map([[`ggui`,km],[`indigo`,Vm],[`claudic`,zm],[`premium-cyberpunk`,jm],[`premium-zen`,Nm],[`premium-neon-noir`,Fm],[`premium-botanical`,Lm],[`guuey-brand-v1`,qm]]),Ym=new Map;function Xm(e,t){return t===`dark`&&e.dark?`dark`:`light`}function Zm(e,t=`light`){let n=Jm.get(e);if(!n)return;let r=Xm(n,t),i=`${e}:${r}`,a=Ym.get(i);if(a)return a;let o=Cm(e,r===`dark`?n.dark:n.light);return Ym.set(i,o),o}function Qm(){return`ggui`}(0,S.createContext)(null);var $m=`@supports (color: color-mix(in srgb, red, blue))`;function eh(e){let t=e.match(/--ggui-color-primary-500:\s*(#[0-9a-fA-F]{3}|#[0-9a-fA-F]{6})\s*;/);return t?t[1]:null}function th(e){let t=e.replace(`#`,``);if(t.length===3&&(t=t.split(``).map(e=>e+e).join(``)),t.length!==6)return null;let n=Number.parseInt(t.slice(0,2),16),r=Number.parseInt(t.slice(2,4),16),i=Number.parseInt(t.slice(4,6),16);return Number.isNaN(n)||Number.isNaN(r)||Number.isNaN(i)?null:{r:n,g:r,b:i}}function nh(e,t){let n=th(t);return n?e.replace(/color-mix\(\s*in srgb\s*,\s*var\(--ggui-color-primary-500\)\s+(\d+(?:\.\d+)?)%\s*,\s*transparent\s*\)/g,(e,t)=>{let r=Number(t)/100,i=Number(r.toFixed(4)).toString();return`rgba(${n.r}, ${n.g}, ${n.b}, ${i})`}):e}function rh(e){let t=e.indexOf(`{`),n=e.lastIndexOf(`}`);if(t===-1||n===-1)return{base:e,colorMix:[]};let r=e.slice(0,t+1),i=e.slice(t+1,n),a=[],o=[];for(let e of i.split(`
|
|
160
|
+
${r}`:n;return{id:e,name:t.$name,description:t.$description,metadata:t.$metadata,cssVariables:n,cssKeyframes:r,css:i}}({version:1,tokens:`--ggui-color-container.--ggui-color-error-100.--ggui-color-error-200.--ggui-color-error-50.--ggui-color-error-500.--ggui-color-error-600.--ggui-color-error-700.--ggui-color-error-800.--ggui-color-info-100.--ggui-color-info-200.--ggui-color-info-50.--ggui-color-info-500.--ggui-color-info-700.--ggui-color-info-800.--ggui-color-neutral-100.--ggui-color-neutral-200.--ggui-color-neutral-300.--ggui-color-neutral-400.--ggui-color-neutral-50.--ggui-color-neutral-500.--ggui-color-neutral-600.--ggui-color-onContainer.--ggui-color-onError.--ggui-color-onPrimary.--ggui-color-onSurface.--ggui-color-onSurfaceVariant.--ggui-color-outline.--ggui-color-outlineVariant.--ggui-color-primary.--ggui-color-primary-100.--ggui-color-primary-200.--ggui-color-primary-300.--ggui-color-primary-400.--ggui-color-primary-50.--ggui-color-primary-500.--ggui-color-primary-600.--ggui-color-primary-700.--ggui-color-primary-800.--ggui-color-primary-900.--ggui-color-success-100.--ggui-color-success-200.--ggui-color-success-50.--ggui-color-success-500.--ggui-color-success-700.--ggui-color-success-800.--ggui-color-surface.--ggui-color-surface-gradient.--ggui-color-surface-subtle.--ggui-color-surface-sunken.--ggui-color-surfaceVariant.--ggui-color-warning-100.--ggui-color-warning-200.--ggui-color-warning-50.--ggui-color-warning-500.--ggui-color-warning-700.--ggui-color-warning-800.--ggui-flash-color.--ggui-font-family-mono.--ggui-font-family-sans.--ggui-font-lineHeight-normal.--ggui-font-size-2xl.--ggui-font-size-3xl.--ggui-font-size-4xl.--ggui-font-size-base.--ggui-font-size-lg.--ggui-font-size-sm.--ggui-font-size-xl.--ggui-font-size-xs.--ggui-font-weight-bold.--ggui-font-weight-medium.--ggui-font-weight-normal.--ggui-font-weight-semibold.--ggui-radius-md.--ggui-radius-sm.--ggui-shape-radius-full.--ggui-shape-radius-lg.--ggui-shape-radius-md.--ggui-shape-radius-sm.--ggui-shape-radius-xl.--ggui-shape-shadow-lg.--ggui-shape-shadow-md.--ggui-shape-shadow-sm.--ggui-shape-shadow-xl.--ggui-spacing-1.--ggui-spacing-10.--ggui-spacing-12.--ggui-spacing-2.--ggui-spacing-2xl.--ggui-spacing-3.--ggui-spacing-4.--ggui-spacing-5.--ggui-spacing-6.--ggui-spacing-8.--ggui-spacing-lg.--ggui-spacing-md.--ggui-spacing-sm.--ggui-spacing-xl.--ggui-spacing-xs`.split(`.`)}).tokens;var wm={light:{success:{50:{$type:`color`,$value:`#f0fdf4`},100:{$type:`color`,$value:`#dcfce7`},200:{$type:`color`,$value:`#bbf7d0`},500:{$type:`color`,$value:`#22c55e`},600:{$type:`color`,$value:`#16a34a`},700:{$type:`color`,$value:`#15803d`},800:{$type:`color`,$value:`#166534`}},warning:{50:{$type:`color`,$value:`#fffbeb`},100:{$type:`color`,$value:`#fef3c7`},200:{$type:`color`,$value:`#fde68a`},500:{$type:`color`,$value:`#f59e0b`},600:{$type:`color`,$value:`#d97706`},700:{$type:`color`,$value:`#b45309`},800:{$type:`color`,$value:`#92400e`}},error:{50:{$type:`color`,$value:`#fef2f2`},100:{$type:`color`,$value:`#fee2e2`},200:{$type:`color`,$value:`#fecaca`},500:{$type:`color`,$value:`#ef4444`},600:{$type:`color`,$value:`#dc2626`},700:{$type:`color`,$value:`#b91c1c`},800:{$type:`color`,$value:`#991b1b`}},info:{50:{$type:`color`,$value:`#ecfeff`},100:{$type:`color`,$value:`#cffafe`},200:{$type:`color`,$value:`#a5f3fc`},500:{$type:`color`,$value:`#06b6d4`},600:{$type:`color`,$value:`#0891b2`},700:{$type:`color`,$value:`#0e7490`},800:{$type:`color`,$value:`#155e75`}}},dark:{success:{50:{$type:`color`,$value:`#052e16`},100:{$type:`color`,$value:`#14532d`},200:{$type:`color`,$value:`#166534`},500:{$type:`color`,$value:`#22c55e`},600:{$type:`color`,$value:`#4ade80`},700:{$type:`color`,$value:`#86efac`},800:{$type:`color`,$value:`#bbf7d0`}},warning:{50:{$type:`color`,$value:`#451a03`},100:{$type:`color`,$value:`#78350f`},200:{$type:`color`,$value:`#92400e`},500:{$type:`color`,$value:`#f59e0b`},600:{$type:`color`,$value:`#fbbf24`},700:{$type:`color`,$value:`#fcd34d`},800:{$type:`color`,$value:`#fde68a`}},error:{50:{$type:`color`,$value:`#450a0a`},100:{$type:`color`,$value:`#7f1d1d`},200:{$type:`color`,$value:`#991b1b`},500:{$type:`color`,$value:`#ef4444`},600:{$type:`color`,$value:`#f87171`},700:{$type:`color`,$value:`#fca5a5`},800:{$type:`color`,$value:`#fecaca`}},info:{50:{$type:`color`,$value:`#083344`},100:{$type:`color`,$value:`#164e63`},200:{$type:`color`,$value:`#155e75`},500:{$type:`color`,$value:`#06b6d4`},600:{$type:`color`,$value:`#22d3ee`},700:{$type:`color`,$value:`#67e8f9`},800:{$type:`color`,$value:`#a5f3fc`}}}},Tm={light:{focusRing:{color:{$type:`color`,$value:`#0284c7`},width:{$type:`dimension`,$value:`2px`},offset:{$type:`dimension`,$value:`2px`}},reducedMotion:{duration:{$type:`duration`,$value:`0ms`}},highContrast:{borderWidth:{$type:`dimension`,$value:`2px`},textColor:{$type:`color`,$value:`#000000`},backgroundColor:{$type:`color`,$value:`#ffffff`},linkColor:{$type:`color`,$value:`#0369a1`}}},dark:{focusRing:{color:{$type:`color`,$value:`#38bdf8`},width:{$type:`dimension`,$value:`2px`},offset:{$type:`dimension`,$value:`2px`}},reducedMotion:{duration:{$type:`duration`,$value:`0ms`}},highContrast:{borderWidth:{$type:`dimension`,$value:`2px`},textColor:{$type:`color`,$value:`#f1f5f9`},backgroundColor:{$type:`color`,$value:`#0f172a`},linkColor:{$type:`color`,$value:`#7dd3fc`}}}},Em={hide:{$type:`number`,$value:-1},base:{$type:`number`,$value:0},docked:{$type:`number`,$value:10},dropdown:{$type:`number`,$value:1e3},sticky:{$type:`number`,$value:1100},banner:{$type:`number`,$value:1200},overlay:{$type:`number`,$value:1300},modal:{$type:`number`,$value:1400},popover:{$type:`number`,$value:1500},skipLink:{$type:`number`,$value:1600},toast:{$type:`number`,$value:1700},tooltip:{$type:`number`,$value:1800}},Dm={fast:{$type:`transition`,$value:`100ms cubic-bezier(0.4, 0, 0.2, 1)`},normal:{$type:`transition`,$value:`200ms cubic-bezier(0.4, 0, 0.2, 1)`},slow:{$type:`transition`,$value:`300ms cubic-bezier(0.4, 0, 0.2, 1)`},colors:{$type:`transition`,$value:`color 200ms cubic-bezier(0.4, 0, 0.2, 1), background-color 200ms cubic-bezier(0.4, 0, 0.2, 1), border-color 200ms cubic-bezier(0.4, 0, 0.2, 1)`},opacity:{$type:`transition`,$value:`opacity 200ms cubic-bezier(0.4, 0, 0.2, 1)`},transform:{$type:`transition`,$value:`transform 200ms cubic-bezier(0, 0, 0.2, 1)`}},Om={font:{family:{sans:{$value:`"Inter", system-ui, -apple-system, sans-serif`,$type:`fontFamily`},mono:{$value:`"Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace`,$type:`fontFamily`}},size:{sm:{$value:`0.8125rem`,$type:`dimension`},base:{$value:`0.875rem`,$type:`dimension`},lg:{$value:`1rem`,$type:`dimension`},xl:{$value:`1.125rem`,$type:`dimension`},"2xl":{$value:`1.375rem`,$type:`dimension`}},weight:{normal:{$value:`400`,$type:`fontWeight`},medium:{$value:`500`,$type:`fontWeight`},semibold:{$value:`600`,$type:`fontWeight`},bold:{$value:`700`,$type:`fontWeight`}},lineHeight:{tight:{$value:`1.2`,$type:`number`},normal:{$value:`1.5`,$type:`number`},relaxed:{$value:`1.6`,$type:`number`}}},spacing:{1:{$value:`0.25rem`,$type:`dimension`},2:{$value:`0.5rem`,$type:`dimension`},3:{$value:`0.75rem`,$type:`dimension`},4:{$value:`1rem`,$type:`dimension`},5:{$value:`1.25rem`,$type:`dimension`},6:{$value:`1.5rem`,$type:`dimension`},8:{$value:`2rem`,$type:`dimension`},10:{$value:`2.5rem`,$type:`dimension`},12:{$value:`3rem`,$type:`dimension`},xs:{$value:`0.25rem`,$type:`dimension`},sm:{$value:`0.5rem`,$type:`dimension`},md:{$value:`1rem`,$type:`dimension`},lg:{$value:`1.5rem`,$type:`dimension`},xl:{$value:`2rem`,$type:`dimension`},"2xl":{$value:`3rem`,$type:`dimension`}},shape:{radius:{sm:{$value:`2px`,$type:`dimension`},md:{$value:`2px`,$type:`dimension`},lg:{$value:`4px`,$type:`dimension`},xl:{$value:`6px`,$type:`dimension`},full:{$value:`9999px`,$type:`dimension`}},shadow:{sm:{$value:`none`,$type:`shadow`},md:{$value:`0 1px 2px rgba(41, 41, 41, 0.06)`,$type:`shadow`},lg:{$value:`0 2px 6px rgba(41, 41, 41, 0.08)`,$type:`shadow`},xl:{$value:`0 4px 12px rgba(41, 41, 41, 0.10)`,$type:`shadow`}}},motion:{duration:{fast:{$value:`120ms`,$type:`duration`},normal:{$value:`200ms`,$type:`duration`},slow:{$value:`400ms`,$type:`duration`},ambient:{$value:`2000ms`,$type:`duration`}},easing:{default:{$value:`cubic-bezier(0.4, 0, 0.2, 1)`,$type:`cubicBezier`},bounce:{$value:`cubic-bezier(0.34, 1.56, 0.64, 1)`,$type:`cubicBezier`},spring:{$value:`cubic-bezier(0.22, 1, 0.36, 1)`,$type:`cubicBezier`}},transition:Dm,keyframes:{"accent-pulse":{$value:`0%{opacity:1}50%{opacity:0.7}100%{opacity:1}`,$type:`keyframes`},entrance:{$value:`0%{opacity:0;transform:translateY(4px)}100%{opacity:1;transform:none}`,$type:`keyframes`},shimmer:{$value:`0%{background-position:-200% 0}100%{background-position:200% 0}`,$type:`keyframes`}}}},km={light:{$name:`GGUI`,$description:`The default ggui theme — monochrome paper + ink, architectural, no decorative flourish.`,$metadata:{font:`Inter`,fontUrl:`https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Geist+Mono:wght@400;500;700&display=swap`,philosophy:`The interface is the artifact, not the chrome around it.`},color:{primary:{50:{$value:`#f4f3ed`,$type:`color`},100:{$value:`#ebe9e1`,$type:`color`},200:{$value:`#e4e4e2`,$type:`color`},300:{$value:`#d9d9d9`,$type:`color`},400:{$value:`#8c8c93`,$type:`color`},500:{$value:`#292929`,$type:`color`},600:{$value:`#1f1f1f`,$type:`color`},700:{$value:`#171717`,$type:`color`},800:{$value:`#0e0e0e`,$type:`color`},900:{$value:`#000000`,$type:`color`}},neutral:{50:{$value:`#f4f3ed`,$type:`color`},100:{$value:`#ebe9e1`,$type:`color`},200:{$value:`#e4e4e2`,$type:`color`},300:{$value:`#d9d9d9`,$type:`color`},400:{$value:`#8c8c93`,$type:`color`},500:{$value:`#5a5a5a`,$type:`color`},600:{$value:`#3d3d3d`,$type:`color`},700:{$value:`#292929`,$type:`color`},800:{$value:`#24242c`,$type:`color`},900:{$value:`#0e0e0e`,$type:`color`}},success:{50:{$value:`#e8f5ec`,$type:`color`},100:{$value:`#c5e6cd`,$type:`color`},200:{$value:`#8fcca0`,$type:`color`},500:{$value:`#1b7a37`,$type:`color`},600:{$value:`#15622c`,$type:`color`},700:{$value:`#0f4a21`,$type:`color`},800:{$value:`#093116`,$type:`color`}},warning:{50:{$value:`#fbf3e0`,$type:`color`},100:{$value:`#f3e1b0`,$type:`color`},200:{$value:`#e6c46e`,$type:`color`},500:{$value:`#8e680c`,$type:`color`},600:{$value:`#86620b`,$type:`color`},700:{$value:`#654a08`,$type:`color`},800:{$value:`#433105`,$type:`color`}},error:{50:{$value:`#fbe7e3`,$type:`color`},100:{$value:`#f4bbb1`,$type:`color`},200:{$value:`#ea8a7a`,$type:`color`},500:{$value:`#cc3520`,$type:`color`},600:{$value:`#ae2d1b`,$type:`color`},700:{$value:`#822214`,$type:`color`},800:{$value:`#57160d`,$type:`color`}},info:{50:{$value:`#e1e1e1`,$type:`color`},100:{$value:`#bababa`,$type:`color`},200:{$value:`#8e8e8e`,$type:`color`},500:{$value:`#3d3d3d`,$type:`color`},600:{$value:`#313131`,$type:`color`},700:{$value:`#252525`,$type:`color`},800:{$value:`#181818`,$type:`color`}},surface:{$value:`#f4f3ed`,$type:`color`},onSurface:{$value:`#292929`,$type:`color`},surfaceVariant:{$value:`#ebe9e1`,$type:`color`},onSurfaceVariant:{$value:`#5a5a5a`,$type:`color`},container:{$value:`#ebe9e1`,$type:`color`},onContainer:{$value:`#292929`,$type:`color`},outline:{$value:`#d6d4cb`,$type:`color`},outlineVariant:{$value:`#e4e4e2`,$type:`color`},onPrimary:{$value:`#f4f3ed`,$type:`color`},primaryContainer:{$value:`#ebe9e1`,$type:`color`},onPrimaryContainer:{$value:`#292929`,$type:`color`},onError:{$value:`#f4f3ed`,$type:`color`},errorContainer:{$value:`#fbe7e3`,$type:`color`},onErrorContainer:{$value:`#57160d`,$type:`color`},tertiary:{$value:`#1b7a37`,$type:`color`},onTertiary:{$value:`#f4f3ed`,$type:`color`},tertiaryContainer:{$value:`#e8f5ec`,$type:`color`},onTertiaryContainer:{$value:`#093116`,$type:`color`}},font:Om.font,spacing:Om.spacing,shape:Om.shape,motion:Om.motion,accessibility:{...Tm.light,focusRing:{...Tm.light.focusRing,color:{$type:`color`,$value:`#292929`}}},zIndex:Em},dark:{$name:`GGUI`,$description:`The default ggui theme (dark) — ink canvas, paper text, architectural and flat.`,$metadata:{font:`Inter`,fontUrl:`https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Geist+Mono:wght@400;500;700&display=swap`,philosophy:`The interface is the artifact, not the chrome around it.`},color:{primary:{50:{$value:`#0e0e0e`,$type:`color`},100:{$value:`#1f1f1f`,$type:`color`},200:{$value:`#292929`,$type:`color`},300:{$value:`#3d3d3d`,$type:`color`},400:{$value:`#5a5a5a`,$type:`color`},500:{$value:`#f4f3ed`,$type:`color`},600:{$value:`#ebe9e1`,$type:`color`},700:{$value:`#e4e4e2`,$type:`color`},800:{$value:`#d9d9d9`,$type:`color`},900:{$value:`#ffffff`,$type:`color`}},neutral:{50:{$value:`#0e0e0e`,$type:`color`},100:{$value:`#1f1f1f`,$type:`color`},200:{$value:`#292929`,$type:`color`},300:{$value:`#3d3d3d`,$type:`color`},400:{$value:`#5a5a5a`,$type:`color`},500:{$value:`#8c8c93`,$type:`color`},600:{$value:`#d9d9d9`,$type:`color`},700:{$value:`#e4e4e2`,$type:`color`},800:{$value:`#ebe9e1`,$type:`color`},900:{$value:`#f4f3ed`,$type:`color`}},success:{50:{$value:`#0d2918`,$type:`color`},100:{$value:`#174f2a`,$type:`color`},200:{$value:`#286b3d`,$type:`color`},500:{$value:`#3da85b`,$type:`color`},600:{$value:`#6dbf83`,$type:`color`},700:{$value:`#9dd5ab`,$type:`color`},800:{$value:`#cdead3`,$type:`color`}},warning:{50:{$value:`#332608`,$type:`color`},100:{$value:`#5e4612`,$type:`color`},200:{$value:`#896720`,$type:`color`},500:{$value:`#d4a02e`,$type:`color`},600:{$value:`#dfb55c`,$type:`color`},700:{$value:`#eaca8a`,$type:`color`},800:{$value:`#f5deb8`,$type:`color`}},error:{50:{$value:`#3d130d`,$type:`color`},100:{$value:`#702419`,$type:`color`},200:{$value:`#a33828`,$type:`color`},500:{$value:`#ff5b46`,$type:`color`},600:{$value:`#ff7d6c`,$type:`color`},700:{$value:`#ff9f93`,$type:`color`},800:{$value:`#ffc2ba`,$type:`color`}},info:{50:{$value:`#363636`,$type:`color`},100:{$value:`#5a5a5a`,$type:`color`},200:{$value:`#8c8c8c`,$type:`color`},500:{$value:`#d9d9d9`,$type:`color`},600:{$value:`#e0e0e0`,$type:`color`},700:{$value:`#e8e8e8`,$type:`color`},800:{$value:`#f0f0f0`,$type:`color`}},surface:{$value:`#1f1f1f`,$type:`color`},onSurface:{$value:`#f4f3ed`,$type:`color`},surfaceVariant:{$value:`#292929`,$type:`color`},onSurfaceVariant:{$value:`#d9d9d9`,$type:`color`},container:{$value:`#292929`,$type:`color`},onContainer:{$value:`#f4f3ed`,$type:`color`},outline:{$value:`#3d3d3d`,$type:`color`},outlineVariant:{$value:`#292929`,$type:`color`},onPrimary:{$value:`#292929`,$type:`color`},primaryContainer:{$value:`#3d3d3d`,$type:`color`},onPrimaryContainer:{$value:`#f4f3ed`,$type:`color`},onError:{$value:`#3d130d`,$type:`color`},errorContainer:{$value:`#702419`,$type:`color`},onErrorContainer:{$value:`#ffc2ba`,$type:`color`},tertiary:{$value:`#3da85b`,$type:`color`},onTertiary:{$value:`#0d2918`,$type:`color`},tertiaryContainer:{$value:`#174f2a`,$type:`color`},onTertiaryContainer:{$value:`#cdead3`,$type:`color`}},font:Om.font,spacing:Om.spacing,shape:Om.shape,motion:Om.motion,accessibility:{...Tm.dark,focusRing:{...Tm.dark.focusRing,color:{$type:`color`,$value:`#f4f3ed`}}},zIndex:Em}},Am={font:{family:{sans:{$value:`"Orbitron", "Rajdhani", system-ui, sans-serif`,$type:`fontFamily`},mono:{$value:`"Share Tech Mono", "Fira Code", monospace`,$type:`fontFamily`}},size:{sm:{$value:`0.8rem`,$type:`dimension`},base:{$value:`0.95rem`,$type:`dimension`},lg:{$value:`1.1rem`,$type:`dimension`},xl:{$value:`1.3rem`,$type:`dimension`},"2xl":{$value:`1.6rem`,$type:`dimension`}},weight:{normal:{$value:`400`,$type:`fontWeight`},medium:{$value:`500`,$type:`fontWeight`},semibold:{$value:`600`,$type:`fontWeight`},bold:{$value:`700`,$type:`fontWeight`}},lineHeight:{tight:{$value:`1.2`,$type:`number`},normal:{$value:`1.5`,$type:`number`},relaxed:{$value:`1.7`,$type:`number`}}},spacing:{1:{$value:`0.25rem`,$type:`dimension`},2:{$value:`0.5rem`,$type:`dimension`},3:{$value:`0.75rem`,$type:`dimension`},4:{$value:`1rem`,$type:`dimension`},5:{$value:`1.25rem`,$type:`dimension`},6:{$value:`1.5rem`,$type:`dimension`},8:{$value:`2rem`,$type:`dimension`},10:{$value:`2.5rem`,$type:`dimension`},12:{$value:`3rem`,$type:`dimension`}},shape:{radius:{sm:{$value:`2px`,$type:`dimension`},md:{$value:`4px`,$type:`dimension`},lg:{$value:`6px`,$type:`dimension`},xl:{$value:`8px`,$type:`dimension`},full:{$value:`9999px`,$type:`dimension`}},shadow:{sm:{$value:`0 0 4px rgba(6, 182, 212, 0.3)`,$type:`shadow`},md:{$value:`0 0 8px rgba(6, 182, 212, 0.4)`,$type:`shadow`},lg:{$value:`0 0 16px rgba(6, 182, 212, 0.5)`,$type:`shadow`},xl:{$value:`0 0 24px rgba(6, 182, 212, 0.6), 0 0 48px rgba(6, 182, 212, 0.2)`,$type:`shadow`}}},motion:{duration:{fast:{$value:`100ms`,$type:`duration`},normal:{$value:`200ms`,$type:`duration`},slow:{$value:`600ms`,$type:`duration`},ambient:{$value:`2000ms`,$type:`duration`}},easing:{default:{$value:`cubic-bezier(0.4, 0, 0.2, 1)`,$type:`cubicBezier`},bounce:{$value:`cubic-bezier(0.68, -0.55, 0.27, 1.55)`,$type:`cubicBezier`},spring:{$value:`cubic-bezier(0.22, 1, 0.36, 1)`,$type:`cubicBezier`}},keyframes:{"glitch-flicker":{$value:`0%{opacity:1;transform:none}7%{opacity:0.8;transform:translateX(-2px) skewX(-1deg)}10%{opacity:1;transform:none}47%{opacity:1;transform:none}50%{opacity:0.6;transform:translateX(3px) skewX(2deg)}53%{opacity:1;transform:none}100%{opacity:1;transform:none}`,$type:`keyframes`},"scan-line":{$value:`0%{transform:translateY(-100%)}100%{transform:translateY(100%)}`,$type:`keyframes`},"neon-pulse":{$value:`0%{box-shadow:0 0 4px rgba(6,182,212,0.4)}50%{box-shadow:0 0 16px rgba(6,182,212,0.8)}100%{box-shadow:0 0 4px rgba(6,182,212,0.4)}`,$type:`keyframes`}},transition:{fast:{$type:`transition`,$value:`100ms cubic-bezier(0.4, 0, 0.2, 1)`},normal:{$type:`transition`,$value:`200ms cubic-bezier(0.4, 0, 0.2, 1)`},slow:{$type:`transition`,$value:`600ms cubic-bezier(0.4, 0, 0.2, 1)`},colors:{$type:`transition`,$value:`color 200ms cubic-bezier(0.4, 0, 0.2, 1), background-color 200ms cubic-bezier(0.4, 0, 0.2, 1), border-color 200ms cubic-bezier(0.4, 0, 0.2, 1)`},opacity:{$type:`transition`,$value:`opacity 200ms cubic-bezier(0.4, 0, 0.2, 1)`},transform:{$type:`transition`,$value:`transform 200ms cubic-bezier(0, 0, 0.2, 1)`}}}},jm={light:{$name:`Cyberpunk`,$description:`Neon-lit dystopian tech — cyan neon on dark chrome with glitch animations.`,$metadata:{font:`Orbitron`,fontUrl:`https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700&display=swap`,philosophy:`Chromatic noise, electric tension, digital rebellion.`},color:{primary:{50:{$value:`#ecfeff`,$type:`color`},100:{$value:`#cffafe`,$type:`color`},200:{$value:`#a5f3fc`,$type:`color`},300:{$value:`#67e8f9`,$type:`color`},400:{$value:`#22d3ee`,$type:`color`},500:{$value:`#06b6d4`,$type:`color`},600:{$value:`#0891b2`,$type:`color`},700:{$value:`#1085a5`,$type:`color`},800:{$value:`#155e75`,$type:`color`},900:{$value:`#164e63`,$type:`color`}},neutral:{50:{$value:`#0a0a0f`,$type:`color`},100:{$value:`#111118`,$type:`color`},200:{$value:`#1a1a24`,$type:`color`},300:{$value:`#25252f`,$type:`color`},400:{$value:`#3a3a48`,$type:`color`},500:{$value:`#5d5d74`,$type:`color`},600:{$value:`#8888a0`,$type:`color`},700:{$value:`#aaaabe`,$type:`color`},800:{$value:`#d0d0e0`,$type:`color`},900:{$value:`#e8e8f0`,$type:`color`}},success:{50:{$value:`#e0fff1`,$type:`color`},100:{$value:`#b3ffd9`,$type:`color`},200:{$value:`#66ffb3`,$type:`color`},500:{$value:`#00ff88`,$type:`color`},600:{$value:`#00cc6e`,$type:`color`},700:{$value:`#009955`,$type:`color`},800:{$value:`#006638`,$type:`color`}},warning:{50:{$value:`#fff5e0`,$type:`color`},100:{$value:`#ffe5b3`,$type:`color`},200:{$value:`#ffcc66`,$type:`color`},500:{$value:`#ffaa00`,$type:`color`},600:{$value:`#cc8800`,$type:`color`},700:{$value:`#996600`,$type:`color`},800:{$value:`#664400`,$type:`color`}},error:{50:{$value:`#ffe0e8`,$type:`color`},100:{$value:`#ffb3c4`,$type:`color`},200:{$value:`#ff6688`,$type:`color`},500:{$value:`#ff2255`,$type:`color`},600:{$value:`#cc1a44`,$type:`color`},700:{$value:`#991333`,$type:`color`},800:{$value:`#660d22`,$type:`color`}},info:{50:{$value:`#e0f9ff`,$type:`color`},100:{$value:`#b3edff`,$type:`color`},200:{$value:`#66dbff`,$type:`color`},500:{$value:`#00ccff`,$type:`color`},600:{$value:`#00a3cc`,$type:`color`},700:{$value:`#007a99`,$type:`color`},800:{$value:`#005266`,$type:`color`}},surface:{$value:`#0a0a0f`,$type:`color`},onSurface:{$value:`#e8e8f0`,$type:`color`},surfaceVariant:{$value:`#111118`,$type:`color`},onSurfaceVariant:{$value:`#8888a0`,$type:`color`},container:{$value:`#155e75`,$type:`color`},onContainer:{$value:`#cffafe`,$type:`color`},outline:{$value:`#3a3a48`,$type:`color`},outlineVariant:{$value:`#25252f`,$type:`color`},onPrimary:{$value:`#0a0a0f`,$type:`color`},primaryContainer:{$value:`#155e75`,$type:`color`},onPrimaryContainer:{$value:`#cffafe`,$type:`color`},onError:{$value:`#0a0a0f`,$type:`color`},errorContainer:{$value:`#660d22`,$type:`color`},onErrorContainer:{$value:`#ffe0e8`,$type:`color`},tertiary:{$value:`#00ff88`,$type:`color`},onTertiary:{$value:`#0a0a0f`,$type:`color`},tertiaryContainer:{$value:`#006638`,$type:`color`},onTertiaryContainer:{$value:`#e0fff1`,$type:`color`}},font:Am.font,spacing:Am.spacing,shape:Am.shape,motion:Am.motion,accessibility:{...Tm.light,focusRing:{...Tm.light.focusRing,color:{$type:`color`,$value:`#06b6d4`}}},zIndex:Em},dark:{$name:`Cyberpunk`,$description:`Neon-lit dystopian tech (dark) — brighter cyan on pure-black chrome, cranked neon contrast.`,$metadata:{font:`Orbitron`,fontUrl:`https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700&display=swap`,philosophy:`Chromatic noise, electric tension, digital rebellion.`},color:{primary:{50:{$value:`#164e63`,$type:`color`},100:{$value:`#155e75`,$type:`color`},200:{$value:`#0e7490`,$type:`color`},300:{$value:`#0891b2`,$type:`color`},400:{$value:`#06b6d4`,$type:`color`},500:{$value:`#22d3ee`,$type:`color`},600:{$value:`#67e8f9`,$type:`color`},700:{$value:`#a5f3fc`,$type:`color`},800:{$value:`#cffafe`,$type:`color`},900:{$value:`#ecfeff`,$type:`color`}},neutral:{50:{$value:`#000005`,$type:`color`},100:{$value:`#0a0a0f`,$type:`color`},200:{$value:`#111118`,$type:`color`},300:{$value:`#1a1a24`,$type:`color`},400:{$value:`#3a3a48`,$type:`color`},500:{$value:`#5a5a70`,$type:`color`},600:{$value:`#8888a0`,$type:`color`},700:{$value:`#aaaabe`,$type:`color`},800:{$value:`#d0d0e0`,$type:`color`},900:{$value:`#e8e8f0`,$type:`color`}},success:{50:{$value:`#003319`,$type:`color`},100:{$value:`#006633`,$type:`color`},200:{$value:`#00994d`,$type:`color`},500:{$value:`#33ffaa`,$type:`color`},600:{$value:`#66ffbf`,$type:`color`},700:{$value:`#99ffd4`,$type:`color`},800:{$value:`#ccffea`,$type:`color`}},warning:{50:{$value:`#332200`,$type:`color`},100:{$value:`#664400`,$type:`color`},200:{$value:`#996600`,$type:`color`},500:{$value:`#ffbe33`,$type:`color`},600:{$value:`#ffcb5c`,$type:`color`},700:{$value:`#ffd985`,$type:`color`},800:{$value:`#ffe7ad`,$type:`color`}},error:{50:{$value:`#330a17`,$type:`color`},100:{$value:`#66142e`,$type:`color`},200:{$value:`#991e45`,$type:`color`},500:{$value:`#ff4477`,$type:`color`},600:{$value:`#ff6e94`,$type:`color`},700:{$value:`#ff97b1`,$type:`color`},800:{$value:`#ffc1cf`,$type:`color`}},info:{50:{$value:`#002b33`,$type:`color`},100:{$value:`#005566`,$type:`color`},200:{$value:`#008099`,$type:`color`},500:{$value:`#33d6ff`,$type:`color`},600:{$value:`#5cdeff`,$type:`color`},700:{$value:`#85e6ff`,$type:`color`},800:{$value:`#adeeff`,$type:`color`}},surface:{$value:`#000005`,$type:`color`},onSurface:{$value:`#e8e8f0`,$type:`color`},surfaceVariant:{$value:`#0a0a0f`,$type:`color`},onSurfaceVariant:{$value:`#aaaabe`,$type:`color`},container:{$value:`#0e7490`,$type:`color`},onContainer:{$value:`#cffafe`,$type:`color`},outline:{$value:`#1a1a24`,$type:`color`},outlineVariant:{$value:`#111118`,$type:`color`},onPrimary:{$value:`#000005`,$type:`color`},primaryContainer:{$value:`#0e7490`,$type:`color`},onPrimaryContainer:{$value:`#cffafe`,$type:`color`},onError:{$value:`#000005`,$type:`color`},errorContainer:{$value:`#991e45`,$type:`color`},onErrorContainer:{$value:`#ffc1cf`,$type:`color`},tertiary:{$value:`#33ffaa`,$type:`color`},onTertiary:{$value:`#000005`,$type:`color`},tertiaryContainer:{$value:`#006633`,$type:`color`},onTertiaryContainer:{$value:`#ccffea`,$type:`color`}},font:Am.font,spacing:Am.spacing,shape:Am.shape,motion:Am.motion,accessibility:{...Tm.dark,focusRing:{...Tm.dark.focusRing,color:{$type:`color`,$value:`#22d3ee`}}},zIndex:Em}},Mm={font:{family:{sans:{$value:`"Noto Serif JP", "Georgia", serif`,$type:`fontFamily`},mono:{$value:`"Noto Sans Mono", "Courier New", monospace`,$type:`fontFamily`}},size:{sm:{$value:`0.875rem`,$type:`dimension`},base:{$value:`1rem`,$type:`dimension`},lg:{$value:`1.125rem`,$type:`dimension`},xl:{$value:`1.3rem`,$type:`dimension`},"2xl":{$value:`1.6rem`,$type:`dimension`}},weight:{normal:{$value:`400`,$type:`fontWeight`},medium:{$value:`500`,$type:`fontWeight`},semibold:{$value:`600`,$type:`fontWeight`},bold:{$value:`700`,$type:`fontWeight`}},lineHeight:{tight:{$value:`1.3`,$type:`number`},normal:{$value:`1.6`,$type:`number`},relaxed:{$value:`1.9`,$type:`number`}}},spacing:{1:{$value:`0.25rem`,$type:`dimension`},2:{$value:`0.5rem`,$type:`dimension`},3:{$value:`0.75rem`,$type:`dimension`},4:{$value:`1rem`,$type:`dimension`},5:{$value:`1.25rem`,$type:`dimension`},6:{$value:`1.5rem`,$type:`dimension`},8:{$value:`2rem`,$type:`dimension`},10:{$value:`2.5rem`,$type:`dimension`},12:{$value:`3rem`,$type:`dimension`}},shape:{radius:{sm:{$value:`0.125rem`,$type:`dimension`},md:{$value:`0.25rem`,$type:`dimension`},lg:{$value:`0.5rem`,$type:`dimension`},xl:{$value:`0.75rem`,$type:`dimension`},full:{$value:`9999px`,$type:`dimension`}},shadow:{sm:{$value:`0 1px 3px rgba(42, 39, 36, 0.06)`,$type:`shadow`},md:{$value:`0 3px 8px rgba(42, 39, 36, 0.08)`,$type:`shadow`},lg:{$value:`0 8px 20px rgba(42, 39, 36, 0.10)`,$type:`shadow`},xl:{$value:`0 16px 40px rgba(42, 39, 36, 0.12)`,$type:`shadow`}}},motion:{duration:{fast:{$value:`200ms`,$type:`duration`},normal:{$value:`500ms`,$type:`duration`},slow:{$value:`1500ms`,$type:`duration`},ambient:{$value:`6000ms`,$type:`duration`}},easing:{default:{$value:`cubic-bezier(0.33, 0, 0.67, 1)`,$type:`cubicBezier`},bounce:{$value:`cubic-bezier(0.34, 1.2, 0.64, 1)`,$type:`cubicBezier`},spring:{$value:`cubic-bezier(0.22, 1, 0.36, 1)`,$type:`cubicBezier`}},keyframes:{"slow-breathe":{$value:`0%{opacity:0.85}50%{opacity:1}100%{opacity:0.85}`,$type:`keyframes`},"gentle-fade":{$value:`0%{opacity:0}100%{opacity:1}`,$type:`keyframes`},"ink-ripple":{$value:`0%{transform:scale(0.95);opacity:0.5}50%{transform:scale(1);opacity:0.8}100%{transform:scale(0.95);opacity:0.5}`,$type:`keyframes`}},transition:{fast:{$type:`transition`,$value:`200ms cubic-bezier(0.33, 0, 0.67, 1)`},normal:{$type:`transition`,$value:`500ms cubic-bezier(0.33, 0, 0.67, 1)`},slow:{$type:`transition`,$value:`1500ms cubic-bezier(0.33, 0, 0.67, 1)`},colors:{$type:`transition`,$value:`color 500ms cubic-bezier(0.33, 0, 0.67, 1), background-color 500ms cubic-bezier(0.33, 0, 0.67, 1), border-color 500ms cubic-bezier(0.33, 0, 0.67, 1)`},opacity:{$type:`transition`,$value:`opacity 500ms cubic-bezier(0.33, 0, 0.67, 1)`},transform:{$type:`transition`,$value:`transform 500ms cubic-bezier(0.22, 1, 0.36, 1)`}}}},Nm={light:{$name:`Zen`,$description:`Minimalist Japanese aesthetic — warm stone tones, deliberate space, and unhurried motion.`,$metadata:{font:`Noto Serif JP`,fontUrl:`https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@400;500;600;700&display=swap`,philosophy:`Beauty in imperfection. Stillness as presence.`},color:{primary:{50:{$value:`#f6f7f4`,$type:`color`},100:{$value:`#e8ebe2`,$type:`color`},200:{$value:`#d1d7c5`,$type:`color`},300:{$value:`#b3bda1`,$type:`color`},400:{$value:`#93a17c`,$type:`color`},500:{$value:`#748660`,$type:`color`},600:{$value:`#5c6b4c`,$type:`color`},700:{$value:`#48543d`,$type:`color`},800:{$value:`#3b4434`,$type:`color`},900:{$value:`#33392e`,$type:`color`}},neutral:{50:{$value:`#faf9f7`,$type:`color`},100:{$value:`#f3f1ed`,$type:`color`},200:{$value:`#e7e4de`,$type:`color`},300:{$value:`#d5d0c8`,$type:`color`},400:{$value:`#b8b0a4`,$type:`color`},500:{$value:`#988d81`,$type:`color`},600:{$value:`#7a7068`,$type:`color`},700:{$value:`#5e5650`,$type:`color`},800:{$value:`#3e3a36`,$type:`color`},900:{$value:`#2a2724`,$type:`color`}},success:{50:{$type:`color`,$value:`#f0f4ee`},100:{$type:`color`,$value:`#dde6d8`},200:{$type:`color`,$value:`#c6d4be`},500:{$type:`color`,$value:`#5b7950`},600:{$type:`color`,$value:`#58754d`},700:{$type:`color`,$value:`#43583a`},800:{$type:`color`,$value:`#2f3e29`}},warning:{50:{$type:`color`,$value:`#faf6ea`},100:{$type:`color`,$value:`#f4ebcb`},200:{$type:`color`,$value:`#ecdda4`},500:{$type:`color`,$value:`#886f29`},600:{$type:`color`,$value:`#a88a3a`},700:{$type:`color`,$value:`#7e672c`},800:{$type:`color`,$value:`#59481f`}},error:{50:{$type:`color`,$value:`#f8edec`},100:{$type:`color`,$value:`#efd0ce`},200:{$type:`color`,$value:`#e3aba8`},500:{$type:`color`,$value:`#b85450`},600:{$type:`color`,$value:`#9a4340`},700:{$type:`color`,$value:`#743330`},800:{$type:`color`,$value:`#522423`}},info:{50:{$type:`color`,$value:`#eef3f5`},100:{$type:`color`,$value:`#d7e2e7`},200:{$type:`color`,$value:`#b9cdd5`},500:{$type:`color`,$value:`#6a8fa0`},600:{$type:`color`,$value:`#557585`},700:{$type:`color`,$value:`#405864`},800:{$type:`color`,$value:`#2c3d46`}},surface:{$value:`#faf9f7`,$type:`color`},onSurface:{$value:`#2a2724`,$type:`color`},surfaceVariant:{$value:`#f3f1ed`,$type:`color`},onSurfaceVariant:{$value:`#6b635b`,$type:`color`},container:{$value:`#e8ebe2`,$type:`color`},onContainer:{$value:`#33392e`,$type:`color`},outline:{$value:`#d5d0c8`,$type:`color`},outlineVariant:{$value:`#e7e4de`,$type:`color`},onPrimary:{$value:`#faf9f7`,$type:`color`},primaryContainer:{$value:`#e8ebe2`,$type:`color`},onPrimaryContainer:{$value:`#33392e`,$type:`color`},onError:{$value:`#faf9f7`,$type:`color`},errorContainer:{$value:`#f8edec`,$type:`color`},onErrorContainer:{$value:`#522423`,$type:`color`},tertiary:{$value:`#7d5e6e`,$type:`color`},onTertiary:{$value:`#faf9f7`,$type:`color`},tertiaryContainer:{$value:`#ebe2e6`,$type:`color`},onTertiaryContainer:{$value:`#3a2a32`,$type:`color`}},font:Mm.font,spacing:Mm.spacing,shape:Mm.shape,motion:Mm.motion,accessibility:{...Tm.light,focusRing:{...Tm.light.focusRing,color:{$type:`color`,$value:`#748660`}}},zIndex:Em},dark:{$name:`Zen`,$description:`Minimalist Japanese aesthetic (dark) — dusk stone surfaces with restrained moss accents and unhurried motion.`,$metadata:{font:`Noto Serif JP`,fontUrl:`https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@400;500;600;700&display=swap`,philosophy:`Beauty in imperfection. Stillness as presence.`},color:{primary:{50:{$value:`#33392e`,$type:`color`},100:{$value:`#3b4434`,$type:`color`},200:{$value:`#48543d`,$type:`color`},300:{$value:`#5c6b4c`,$type:`color`},400:{$value:`#748660`,$type:`color`},500:{$value:`#93a17c`,$type:`color`},600:{$value:`#b3bda1`,$type:`color`},700:{$value:`#d1d7c5`,$type:`color`},800:{$value:`#e8ebe2`,$type:`color`},900:{$value:`#f6f7f4`,$type:`color`}},neutral:{50:{$value:`#1a1816`,$type:`color`},100:{$value:`#2a2724`,$type:`color`},200:{$value:`#3e3a36`,$type:`color`},300:{$value:`#5e5650`,$type:`color`},400:{$value:`#7a7068`,$type:`color`},500:{$value:`#9a9084`,$type:`color`},600:{$value:`#b8b0a4`,$type:`color`},700:{$value:`#d5d0c8`,$type:`color`},800:{$value:`#e7e4de`,$type:`color`},900:{$value:`#faf9f7`,$type:`color`}},success:{50:{$type:`color`,$value:`#f1f6ee`},100:{$type:`color`,$value:`#dceacc`},200:{$type:`color`,$value:`#c4dab1`},500:{$type:`color`,$value:`#8aab7a`},600:{$type:`color`,$value:`#6f8d62`},700:{$type:`color`,$value:`#546b4a`},800:{$type:`color`,$value:`#3a4b34`}},warning:{50:{$type:`color`,$value:`#fbf6e9`},100:{$type:`color`,$value:`#f4e9c1`},200:{$type:`color`,$value:`#ecdda4`},500:{$type:`color`,$value:`#d8b96a`},600:{$type:`color`,$value:`#b09553`},700:{$type:`color`,$value:`#84703d`},800:{$type:`color`,$value:`#5a4c2a`}},error:{50:{$type:`color`,$value:`#faeae9`},100:{$type:`color`,$value:`#f1cac8`},200:{$type:`color`,$value:`#e4a5a1`},500:{$type:`color`,$value:`#d17570`},600:{$type:`color`,$value:`#a85753`},700:{$type:`color`,$value:`#7d403c`},800:{$type:`color`,$value:`#552a27`}},info:{50:{$type:`color`,$value:`#f0f4f6`},100:{$type:`color`,$value:`#d7e0e5`},200:{$type:`color`,$value:`#bccbd2`},500:{$type:`color`,$value:`#8eaab8`},600:{$type:`color`,$value:`#708995`},700:{$type:`color`,$value:`#546771`},800:{$type:`color`,$value:`#38454d`}},surface:{$value:`#2a2724`,$type:`color`},onSurface:{$value:`#f3f1ed`,$type:`color`},surfaceVariant:{$value:`#3e3a36`,$type:`color`},onSurfaceVariant:{$value:`#b8b0a4`,$type:`color`},container:{$value:`#48543d`,$type:`color`},onContainer:{$value:`#e8ebe2`,$type:`color`},outline:{$value:`#5e5650`,$type:`color`},outlineVariant:{$value:`#3e3a36`,$type:`color`},onPrimary:{$value:`#1a1816`,$type:`color`},primaryContainer:{$value:`#3b4434`,$type:`color`},onPrimaryContainer:{$value:`#e8ebe2`,$type:`color`},onError:{$value:`#1a1816`,$type:`color`},errorContainer:{$value:`#552a27`,$type:`color`},onErrorContainer:{$value:`#f1cac8`,$type:`color`},tertiary:{$value:`#a98899`,$type:`color`},onTertiary:{$value:`#1a1816`,$type:`color`},tertiaryContainer:{$value:`#4e3a44`,$type:`color`},onTertiaryContainer:{$value:`#ebe2e6`,$type:`color`}},font:Mm.font,spacing:Mm.spacing,shape:Mm.shape,motion:Mm.motion,accessibility:{...Tm.dark,focusRing:{...Tm.dark.focusRing,color:{$type:`color`,$value:`#93a17c`}}},zIndex:Em}},Pm={font:{family:{sans:{$value:`"Outfit", system-ui, -apple-system, sans-serif`,$type:`fontFamily`},mono:{$value:`"Fira Code", "JetBrains Mono", monospace`,$type:`fontFamily`}},size:{sm:{$value:`0.875rem`,$type:`dimension`},base:{$value:`1rem`,$type:`dimension`},lg:{$value:`1.125rem`,$type:`dimension`},xl:{$value:`1.25rem`,$type:`dimension`},"2xl":{$value:`1.5rem`,$type:`dimension`}},weight:{normal:{$value:`400`,$type:`fontWeight`},medium:{$value:`500`,$type:`fontWeight`},semibold:{$value:`600`,$type:`fontWeight`},bold:{$value:`700`,$type:`fontWeight`}},lineHeight:{tight:{$value:`1.25`,$type:`number`},normal:{$value:`1.5`,$type:`number`},relaxed:{$value:`1.75`,$type:`number`}}},spacing:{1:{$value:`0.25rem`,$type:`dimension`},2:{$value:`0.5rem`,$type:`dimension`},3:{$value:`0.75rem`,$type:`dimension`},4:{$value:`1rem`,$type:`dimension`},5:{$value:`1.25rem`,$type:`dimension`},6:{$value:`1.5rem`,$type:`dimension`},8:{$value:`2rem`,$type:`dimension`},10:{$value:`2.5rem`,$type:`dimension`},12:{$value:`3rem`,$type:`dimension`}},shape:{radius:{sm:{$value:`0.25rem`,$type:`dimension`},md:{$value:`0.5rem`,$type:`dimension`},lg:{$value:`0.75rem`,$type:`dimension`},xl:{$value:`1rem`,$type:`dimension`},full:{$value:`9999px`,$type:`dimension`}},shadow:{sm:{$value:`0 0 6px rgba(236, 72, 153, 0.25)`,$type:`shadow`},md:{$value:`0 0 12px rgba(236, 72, 153, 0.35)`,$type:`shadow`},lg:{$value:`0 0 20px rgba(236, 72, 153, 0.45)`,$type:`shadow`},xl:{$value:`0 0 30px rgba(236, 72, 153, 0.55), 0 0 60px rgba(236, 72, 153, 0.2)`,$type:`shadow`}}},motion:{duration:{fast:{$value:`120ms`,$type:`duration`},normal:{$value:`250ms`,$type:`duration`},slow:{$value:`800ms`,$type:`duration`},ambient:{$value:`2500ms`,$type:`duration`}},easing:{default:{$value:`cubic-bezier(0.4, 0, 0.2, 1)`,$type:`cubicBezier`},bounce:{$value:`cubic-bezier(0.68, -0.55, 0.27, 1.55)`,$type:`cubicBezier`},spring:{$value:`cubic-bezier(0.22, 1, 0.36, 1)`,$type:`cubicBezier`}},transition:{fast:{$value:`120ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},normal:{$value:`250ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},slow:{$value:`800ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},colors:{$value:`color 250ms cubic-bezier(0.4, 0, 0.2, 1), background-color 250ms cubic-bezier(0.4, 0, 0.2, 1), border-color 250ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},opacity:{$value:`opacity 250ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},transform:{$value:`transform 250ms cubic-bezier(0.22, 1, 0.36, 1)`,$type:`transition`}},keyframes:{"neon-flicker":{$value:`0%{opacity:1}4%{opacity:0.7}8%{opacity:1}12%{opacity:0.85}16%{opacity:1}100%{opacity:1}`,$type:`keyframes`},"glow-pulse":{$value:`0%{box-shadow:0 0 8px rgba(236,72,153,0.4)}50%{box-shadow:0 0 24px rgba(236,72,153,0.8)}100%{box-shadow:0 0 8px rgba(236,72,153,0.4)}`,$type:`keyframes`},"electric-arc":{$value:`0%{clip-path:inset(0 100% 0 0)}50%{clip-path:inset(0 0 0 0)}100%{clip-path:inset(0 0 0 100%)}`,$type:`keyframes`}}}},Fm={light:{$name:`Neon Noir`,$description:`Hot pink neon on dark — electric glow effects, neon flicker, and flowing magenta particles.`,$metadata:{font:`Outfit`,fontUrl:`https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&display=swap`,philosophy:`Midnight electricity. The city never sleeps.`},color:{primary:{50:{$value:`#fdf2f8`,$type:`color`},100:{$value:`#fce7f3`,$type:`color`},200:{$value:`#fbcfe8`,$type:`color`},300:{$value:`#f9a8d4`,$type:`color`},400:{$value:`#f472b6`,$type:`color`},500:{$value:`#ec4899`,$type:`color`},600:{$value:`#db2777`,$type:`color`},700:{$value:`#e42574`,$type:`color`},800:{$value:`#9d174d`,$type:`color`},900:{$value:`#831843`,$type:`color`}},neutral:{50:{$value:`#09090b`,$type:`color`},100:{$value:`#111114`,$type:`color`},200:{$value:`#19191e`,$type:`color`},300:{$value:`#232329`,$type:`color`},400:{$value:`#3b3b44`,$type:`color`},500:{$value:`#5e5e6c`,$type:`color`},600:{$value:`#8a8a9a`,$type:`color`},700:{$value:`#b0b0be`,$type:`color`},800:{$value:`#d4d4de`,$type:`color`},900:{$value:`#ececf0`,$type:`color`}},success:{...wm.dark.success,500:{$value:`#34d399`,$type:`color`}},warning:{...wm.dark.warning,500:{$value:`#fbbf24`,$type:`color`}},error:{...wm.dark.error,500:{$value:`#f87171`,$type:`color`}},info:{...wm.dark.info,500:{$value:`#38bdf8`,$type:`color`}},surface:{$value:`#09090b`,$type:`color`},onSurface:{$value:`#ececf0`,$type:`color`},surfaceVariant:{$value:`#111114`,$type:`color`},onSurfaceVariant:{$value:`#8a8a9a`,$type:`color`},container:{$value:`#9d174d`,$type:`color`},onContainer:{$value:`#fce7f3`,$type:`color`},outline:{$value:`#3b3b44`,$type:`color`},outlineVariant:{$value:`#232329`,$type:`color`},onPrimary:{$value:`#ffffff`,$type:`color`},primaryContainer:{$value:`#9d174d`,$type:`color`},onPrimaryContainer:{$value:`#fce7f3`,$type:`color`},onError:{$value:`#09090b`,$type:`color`},errorContainer:{$value:`#7f1d1d`,$type:`color`},onErrorContainer:{$value:`#fecaca`,$type:`color`},tertiary:{$value:`#a855f7`,$type:`color`},onTertiary:{$value:`#09090b`,$type:`color`},tertiaryContainer:{$value:`#6b21a8`,$type:`color`},onTertiaryContainer:{$value:`#f3e8ff`,$type:`color`}},font:Pm.font,spacing:Pm.spacing,shape:Pm.shape,motion:Pm.motion,accessibility:{...Tm.dark,focusRing:{...Tm.dark.focusRing,color:{$value:`#ec4899`,$type:`color`}}},zIndex:Em},dark:{$name:`Neon Noir`,$description:`Hot pink neon on pure black (dark) — sharper noir contrast, brighter electric glow, deeper magenta containers.`,$metadata:{font:`Outfit`,fontUrl:`https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&display=swap`,philosophy:`Midnight electricity. The city never sleeps.`},color:{primary:{50:{$value:`#831843`,$type:`color`},100:{$value:`#9d174d`,$type:`color`},200:{$value:`#be185d`,$type:`color`},300:{$value:`#db2777`,$type:`color`},400:{$value:`#ec4899`,$type:`color`},500:{$value:`#f472b6`,$type:`color`},600:{$value:`#f9a8d4`,$type:`color`},700:{$value:`#fbcfe8`,$type:`color`},800:{$value:`#fce7f3`,$type:`color`},900:{$value:`#fdf2f8`,$type:`color`}},neutral:{50:{$value:`#000000`,$type:`color`},100:{$value:`#09090b`,$type:`color`},200:{$value:`#111114`,$type:`color`},300:{$value:`#19191e`,$type:`color`},400:{$value:`#3b3b44`,$type:`color`},500:{$value:`#5a5a68`,$type:`color`},600:{$value:`#8a8a9a`,$type:`color`},700:{$value:`#b0b0be`,$type:`color`},800:{$value:`#d4d4de`,$type:`color`},900:{$value:`#ececf0`,$type:`color`}},success:{...wm.dark.success,500:{$value:`#5ee0ad`,$type:`color`}},warning:{...wm.dark.warning,500:{$value:`#ffd24a`,$type:`color`}},error:{...wm.dark.error,500:{$value:`#ff8a8a`,$type:`color`}},info:{...wm.dark.info,500:{$value:`#5acdff`,$type:`color`}},surface:{$value:`#000000`,$type:`color`},onSurface:{$value:`#ececf0`,$type:`color`},surfaceVariant:{$value:`#09090b`,$type:`color`},onSurfaceVariant:{$value:`#b0b0be`,$type:`color`},container:{$value:`#be185d`,$type:`color`},onContainer:{$value:`#fce7f3`,$type:`color`},outline:{$value:`#19191e`,$type:`color`},outlineVariant:{$value:`#111114`,$type:`color`},onPrimary:{$value:`#000000`,$type:`color`},primaryContainer:{$value:`#be185d`,$type:`color`},onPrimaryContainer:{$value:`#fce7f3`,$type:`color`},onError:{$value:`#000000`,$type:`color`},errorContainer:{$value:`#7f1d1d`,$type:`color`},onErrorContainer:{$value:`#fecdd3`,$type:`color`},tertiary:{$value:`#c084fc`,$type:`color`},onTertiary:{$value:`#000000`,$type:`color`},tertiaryContainer:{$value:`#581c87`,$type:`color`},onTertiaryContainer:{$value:`#f3e8ff`,$type:`color`}},font:Pm.font,spacing:Pm.spacing,shape:Pm.shape,motion:Pm.motion,accessibility:{...Tm.dark,focusRing:{...Tm.dark.focusRing,color:{$value:`#f472b6`,$type:`color`}}},zIndex:Em}},Im={font:{family:{sans:{$value:`"Lora", "Georgia", serif`,$type:`fontFamily`},mono:{$value:`"IBM Plex Mono", "Courier New", monospace`,$type:`fontFamily`}},size:{sm:{$value:`0.875rem`,$type:`dimension`},base:{$value:`1rem`,$type:`dimension`},lg:{$value:`1.15rem`,$type:`dimension`},xl:{$value:`1.3rem`,$type:`dimension`},"2xl":{$value:`1.625rem`,$type:`dimension`}},weight:{normal:{$value:`400`,$type:`fontWeight`},medium:{$value:`500`,$type:`fontWeight`},semibold:{$value:`600`,$type:`fontWeight`},bold:{$value:`700`,$type:`fontWeight`}},lineHeight:{tight:{$value:`1.3`,$type:`number`},normal:{$value:`1.6`,$type:`number`},relaxed:{$value:`1.85`,$type:`number`}}},spacing:{1:{$value:`0.25rem`,$type:`dimension`},2:{$value:`0.5rem`,$type:`dimension`},3:{$value:`0.75rem`,$type:`dimension`},4:{$value:`1rem`,$type:`dimension`},5:{$value:`1.25rem`,$type:`dimension`},6:{$value:`1.5rem`,$type:`dimension`},8:{$value:`2rem`,$type:`dimension`},10:{$value:`2.5rem`,$type:`dimension`},12:{$value:`3rem`,$type:`dimension`}},shape:{radius:{sm:{$value:`0.375rem`,$type:`dimension`},md:{$value:`0.625rem`,$type:`dimension`},lg:{$value:`1rem`,$type:`dimension`},xl:{$value:`1.5rem`,$type:`dimension`},full:{$value:`9999px`,$type:`dimension`}},shadow:{sm:{$value:`0 1px 3px rgba(53, 46, 32, 0.08)`,$type:`shadow`},md:{$value:`0 4px 8px rgba(53, 46, 32, 0.10)`,$type:`shadow`},lg:{$value:`0 8px 20px rgba(53, 46, 32, 0.12)`,$type:`shadow`},xl:{$value:`0 16px 40px rgba(53, 46, 32, 0.14)`,$type:`shadow`}}},motion:{duration:{fast:{$value:`200ms`,$type:`duration`},normal:{$value:`400ms`,$type:`duration`},slow:{$value:`1200ms`,$type:`duration`},ambient:{$value:`5000ms`,$type:`duration`}},easing:{default:{$value:`cubic-bezier(0.4, 0, 0.2, 1)`,$type:`cubicBezier`},bounce:{$value:`cubic-bezier(0.34, 1.3, 0.64, 1)`,$type:`cubicBezier`},spring:{$value:`cubic-bezier(0.22, 1, 0.36, 1)`,$type:`cubicBezier`}},keyframes:{"leaf-float":{$value:`0%{transform:translateY(0) rotate(0deg);opacity:0.7}25%{transform:translateY(-6px) rotate(3deg)}50%{transform:translateY(-2px) rotate(-2deg);opacity:1}75%{transform:translateY(-8px) rotate(2deg)}100%{transform:translateY(0) rotate(0deg);opacity:0.7}`,$type:`keyframes`},"vine-grow":{$value:`0%{transform:scaleY(0);transform-origin:bottom}100%{transform:scaleY(1);transform-origin:bottom}`,$type:`keyframes`},"gentle-sway":{$value:`0%{transform:rotate(-1deg)}50%{transform:rotate(1deg)}100%{transform:rotate(-1deg)}`,$type:`keyframes`}},transition:Dm}},Lm={light:{$name:`Botanical`,$description:`Organic greens on warm cream — leaf-float animations and vine-grow motion.`,$metadata:{font:`Lora`,fontUrl:`https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap`,philosophy:`Rooted in nature. Growing with intention.`},color:{primary:{50:{$value:`#f0fdf4`,$type:`color`},100:{$value:`#dcfce7`,$type:`color`},200:{$value:`#bbf7d0`,$type:`color`},300:{$value:`#86efac`,$type:`color`},400:{$value:`#4ade80`,$type:`color`},500:{$value:`#22c55e`,$type:`color`},600:{$value:`#16a34a`,$type:`color`},700:{$value:`#15803d`,$type:`color`},800:{$value:`#166534`,$type:`color`},900:{$value:`#14532d`,$type:`color`}},neutral:{50:{$value:`#fefcf8`,$type:`color`},100:{$value:`#fdf8ef`,$type:`color`},200:{$value:`#f8f0df`,$type:`color`},300:{$value:`#f0e4c9`,$type:`color`},400:{$value:`#dccba5`,$type:`color`},500:{$value:`#aa8e56`,$type:`color`},600:{$value:`#9a8660`,$type:`color`},700:{$value:`#746448`,$type:`color`},800:{$value:`#504530`,$type:`color`},900:{$value:`#352e20`,$type:`color`}},success:{...wm.light.success,500:{$type:`color`,$value:`#17843f`}},warning:{...wm.light.warning,500:{$type:`color`,$value:`#a06707`}},error:{...wm.light.error,500:{$type:`color`,$value:`#e51414`}},info:wm.light.info,surface:{$value:`#fefcf8`,$type:`color`},onSurface:{$value:`#352e20`,$type:`color`},surfaceVariant:{$value:`#fdf8ef`,$type:`color`},onSurfaceVariant:{$value:`#746448`,$type:`color`},container:{$value:`#dcfce7`,$type:`color`},onContainer:{$value:`#14532d`,$type:`color`},outline:{$value:`#f0e4c9`,$type:`color`},outlineVariant:{$value:`#f8f0df`,$type:`color`},onPrimary:{$value:`#332407`,$type:`color`},primaryContainer:{$value:`#dcfce7`,$type:`color`},onPrimaryContainer:{$value:`#14532d`,$type:`color`},onError:{$value:`#fefcf8`,$type:`color`},errorContainer:{$value:`#fee2e2`,$type:`color`},onErrorContainer:{$value:`#7f1d1d`,$type:`color`},tertiary:{$value:`#b45309`,$type:`color`},onTertiary:{$value:`#fefcf8`,$type:`color`},tertiaryContainer:{$value:`#fef3c7`,$type:`color`},onTertiaryContainer:{$value:`#451a03`,$type:`color`}},font:Im.font,spacing:Im.spacing,shape:Im.shape,motion:Im.motion,accessibility:{...Tm.light,focusRing:{...Tm.light.focusRing,color:{$type:`color`,$value:`#16a34a`}}},zIndex:Em},dark:{$name:`Botanical`,$description:`Forest at night (dark) — deep soil surfaces with lifted leaf-green accents and gentle organic motion.`,$metadata:{font:`Lora`,fontUrl:`https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap`,philosophy:`Rooted in nature. Growing with intention.`},color:{primary:{50:{$value:`#14532d`,$type:`color`},100:{$value:`#166534`,$type:`color`},200:{$value:`#15803d`,$type:`color`},300:{$value:`#16a34a`,$type:`color`},400:{$value:`#22c55e`,$type:`color`},500:{$value:`#4ade80`,$type:`color`},600:{$value:`#86efac`,$type:`color`},700:{$value:`#bbf7d0`,$type:`color`},800:{$value:`#dcfce7`,$type:`color`},900:{$value:`#f0fdf4`,$type:`color`}},neutral:{50:{$value:`#141210`,$type:`color`},100:{$value:`#1f1c18`,$type:`color`},200:{$value:`#352e20`,$type:`color`},300:{$value:`#504530`,$type:`color`},400:{$value:`#746448`,$type:`color`},500:{$value:`#9a8660`,$type:`color`},600:{$value:`#bfaa80`,$type:`color`},700:{$value:`#dccba5`,$type:`color`},800:{$value:`#f0e4c9`,$type:`color`},900:{$value:`#fefcf8`,$type:`color`}},success:wm.dark.success,warning:wm.dark.warning,error:wm.dark.error,info:wm.dark.info,surface:{$value:`#1f1c18`,$type:`color`},onSurface:{$value:`#fefcf8`,$type:`color`},surfaceVariant:{$value:`#352e20`,$type:`color`},onSurfaceVariant:{$value:`#dccba5`,$type:`color`},container:{$value:`#166534`,$type:`color`},onContainer:{$value:`#dcfce7`,$type:`color`},outline:{$value:`#504530`,$type:`color`},outlineVariant:{$value:`#352e20`,$type:`color`},onPrimary:{$value:`#141210`,$type:`color`},primaryContainer:{$value:`#166534`,$type:`color`},onPrimaryContainer:{$value:`#dcfce7`,$type:`color`},onError:{$value:`#450a0a`,$type:`color`},errorContainer:{$value:`#7f1d1d`,$type:`color`},onErrorContainer:{$value:`#fecaca`,$type:`color`},tertiary:{$value:`#fbbf24`,$type:`color`},onTertiary:{$value:`#451a03`,$type:`color`},tertiaryContainer:{$value:`#78350f`,$type:`color`},onTertiaryContainer:{$value:`#fef3c7`,$type:`color`}},font:Im.font,spacing:Im.spacing,shape:Im.shape,motion:Im.motion,accessibility:{...Tm.dark,focusRing:{...Tm.dark.focusRing,color:{$type:`color`,$value:`#4ade80`}}},zIndex:Em}},Rm={font:{family:{sans:{$value:`-apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif`,$type:`fontFamily`},mono:{$value:`ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace`,$type:`fontFamily`}},size:{sm:{$value:`0.875rem`,$type:`dimension`},base:{$value:`1rem`,$type:`dimension`},lg:{$value:`1.125rem`,$type:`dimension`},xl:{$value:`1.25rem`,$type:`dimension`},"2xl":{$value:`1.5rem`,$type:`dimension`}},weight:{normal:{$value:`400`,$type:`fontWeight`},medium:{$value:`500`,$type:`fontWeight`},semibold:{$value:`600`,$type:`fontWeight`},bold:{$value:`700`,$type:`fontWeight`}},lineHeight:{tight:{$value:`1.25`,$type:`number`},normal:{$value:`1.55`,$type:`number`},relaxed:{$value:`1.75`,$type:`number`}}},spacing:{1:{$value:`0.25rem`,$type:`dimension`},2:{$value:`0.5rem`,$type:`dimension`},3:{$value:`0.75rem`,$type:`dimension`},4:{$value:`1rem`,$type:`dimension`},5:{$value:`1.25rem`,$type:`dimension`},6:{$value:`1.5rem`,$type:`dimension`},8:{$value:`2rem`,$type:`dimension`},10:{$value:`2.5rem`,$type:`dimension`},12:{$value:`3rem`,$type:`dimension`},xs:{$value:`0.25rem`,$type:`dimension`},sm:{$value:`0.5rem`,$type:`dimension`},md:{$value:`1rem`,$type:`dimension`},lg:{$value:`1.5rem`,$type:`dimension`},xl:{$value:`2rem`,$type:`dimension`},"2xl":{$value:`3rem`,$type:`dimension`}},shape:{radius:{sm:{$value:`0.5rem`,$type:`dimension`},md:{$value:`0.75rem`,$type:`dimension`},lg:{$value:`1rem`,$type:`dimension`},xl:{$value:`1.5rem`,$type:`dimension`},full:{$value:`9999px`,$type:`dimension`}},shadow:{sm:{$value:`0 1px 3px color-mix(in srgb, var(--ggui-color-primary-500) 8%, transparent)`,$type:`shadow`},md:{$value:`0 1px 2px rgba(20, 20, 19, 0.04), 0 8px 16px -4px color-mix(in srgb, var(--ggui-color-primary-500) 14%, transparent)`,$type:`shadow`},lg:{$value:`0 2px 4px rgba(20, 20, 19, 0.04), 0 16px 32px -8px color-mix(in srgb, var(--ggui-color-primary-500) 20%, transparent)`,$type:`shadow`},xl:{$value:`0 4px 8px rgba(20, 20, 19, 0.04), 0 24px 48px -12px color-mix(in srgb, var(--ggui-color-primary-500) 26%, transparent)`,$type:`shadow`}}},motion:{duration:{fast:{$value:`120ms`,$type:`duration`},normal:{$value:`240ms`,$type:`duration`},slow:{$value:`480ms`,$type:`duration`}},easing:{default:{$value:`cubic-bezier(0.4, 0, 0.2, 1)`,$type:`cubicBezier`},spring:{$value:`cubic-bezier(0.22, 1, 0.36, 1)`,$type:`cubicBezier`}},keyframes:{entrance:{$value:`0%{opacity:0;transform:translateY(4px)}100%{opacity:1;transform:none}`,$type:`keyframes`}},transition:{...Dm,fast:{$type:`transition`,$value:`120ms cubic-bezier(0.4, 0, 0.2, 1)`},normal:{$type:`transition`,$value:`240ms cubic-bezier(0.4, 0, 0.2, 1)`},slow:{$type:`transition`,$value:`480ms cubic-bezier(0.4, 0, 0.2, 1)`}}}},zm={light:{$name:`Claudic`,$description:`Fits inside claude.ai — warm ivory surfaces, terracotta accent, calm by design.`,$metadata:{font:`system`,philosophy:`Quiet, papery, conversational. Built to feel native when rendered inside claude.ai.`},color:{primary:{50:{$value:`#fbf2ee`,$type:`color`},100:{$value:`#f5dfd4`,$type:`color`},200:{$value:`#ecbfa9`,$type:`color`},300:{$value:`#df9d80`,$type:`color`},400:{$value:`#d6896c`,$type:`color`},500:{$value:`#cc785c`,$type:`color`},600:{$value:`#b8694f`,$type:`color`},700:{$value:`#965240`,$type:`color`},800:{$value:`#723e30`,$type:`color`},900:{$value:`#4d2920`,$type:`color`}},neutral:{50:{$value:`#faf9f5`,$type:`color`},100:{$value:`#f5f4ee`,$type:`color`},200:{$value:`#ebe9df`,$type:`color`},300:{$value:`#dad8cc`,$type:`color`},400:{$value:`#a8a59f`,$type:`color`},500:{$value:`#7c7a76`,$type:`color`},600:{$value:`#56544f`,$type:`color`},700:{$value:`#3d3b39`,$type:`color`},800:{$value:`#262624`,$type:`color`},900:{$value:`#141413`,$type:`color`}},success:{50:{$value:`#f4f7ec`,$type:`color`},100:{$value:`#e3ecd0`,$type:`color`},200:{$value:`#c8d8a5`,$type:`color`},500:{$value:`#5c7a35`,$type:`color`},600:{$value:`#587634`,$type:`color`},700:{$value:`#465c29`,$type:`color`},800:{$value:`#33431e`,$type:`color`}},warning:{50:{$value:`#fbf3e3`,$type:`color`},100:{$value:`#f6e2bb`,$type:`color`},200:{$value:`#eac786`,$type:`color`},500:{$value:`#956922`,$type:`color`},600:{$value:`#a87725`,$type:`color`},700:{$value:`#825c1d`,$type:`color`},800:{$value:`#5d4214`,$type:`color`}},error:{50:{$value:`#f9ebe7`,$type:`color`},100:{$value:`#f1cec5`,$type:`color`},200:{$value:`#e3a294`,$type:`color`},500:{$value:`#bc4a3a`,$type:`color`},600:{$value:`#9d3d30`,$type:`color`},700:{$value:`#7a2f25`,$type:`color`},800:{$value:`#57211a`,$type:`color`}},info:{50:{$value:`#f1f0ee`,$type:`color`},100:{$value:`#dedcd8`,$type:`color`},200:{$value:`#bdbab4`,$type:`color`},500:{$value:`#7c7a76`,$type:`color`},600:{$value:`#65635f`,$type:`color`},700:{$value:`#4d4b48`,$type:`color`},800:{$value:`#363432`,$type:`color`}},surface:{$value:`#faf9f5`,$type:`color`},onSurface:{$value:`#141413`,$type:`color`},surfaceVariant:{$value:`#f5f4ee`,$type:`color`},onSurfaceVariant:{$value:`#56544f`,$type:`color`},container:{$value:`#fbf2ee`,$type:`color`},onContainer:{$value:`#4d2920`,$type:`color`},outline:{$value:`#dad8cc`,$type:`color`},outlineVariant:{$value:`#ebe9df`,$type:`color`},onPrimary:{$value:`#15130a`,$type:`color`},primaryContainer:{$value:`#fbf2ee`,$type:`color`},onPrimaryContainer:{$value:`#4d2920`,$type:`color`},onError:{$value:`#faf9f5`,$type:`color`},errorContainer:{$value:`#f9ebe7`,$type:`color`},onErrorContainer:{$value:`#57211a`,$type:`color`},tertiary:{$value:`#6b8e3d`,$type:`color`},onTertiary:{$value:`#faf9f5`,$type:`color`},tertiaryContainer:{$value:`#f4f7ec`,$type:`color`},onTertiaryContainer:{$value:`#33431e`,$type:`color`}},font:Rm.font,spacing:Rm.spacing,shape:Rm.shape,motion:Rm.motion,accessibility:{...Tm.light,focusRing:{...Tm.light.focusRing,color:{$type:`color`,$value:`#cc785c`}}},zIndex:Em},dark:{$name:`Claudic`,$description:`Fits inside claude.ai (dark) — warm charcoal surfaces, terracotta accent, calm by design.`,$metadata:{font:`system`,philosophy:`Quiet, papery, conversational. Built to feel native when rendered inside claude.ai.`},color:{primary:{50:{$value:`#4d2920`,$type:`color`},100:{$value:`#723e30`,$type:`color`},200:{$value:`#965240`,$type:`color`},300:{$value:`#b8694f`,$type:`color`},400:{$value:`#cc785c`,$type:`color`},500:{$value:`#d6896c`,$type:`color`},600:{$value:`#df9d80`,$type:`color`},700:{$value:`#ecbfa9`,$type:`color`},800:{$value:`#f5dfd4`,$type:`color`},900:{$value:`#fbf2ee`,$type:`color`}},neutral:{50:{$value:`#1a1917`,$type:`color`},100:{$value:`#262624`,$type:`color`},200:{$value:`#2d2c2a`,$type:`color`},300:{$value:`#3d3b39`,$type:`color`},400:{$value:`#56544f`,$type:`color`},500:{$value:`#7c7a76`,$type:`color`},600:{$value:`#a8a59f`,$type:`color`},700:{$value:`#dad8cc`,$type:`color`},800:{$value:`#ebe9df`,$type:`color`},900:{$value:`#faf9f5`,$type:`color`}},success:{50:{$value:`#1c2412`,$type:`color`},100:{$value:`#34461e`,$type:`color`},200:{$value:`#4a6029`,$type:`color`},500:{$value:`#9bb56b`,$type:`color`},600:{$value:`#b1c688`,$type:`color`},700:{$value:`#c8d8a5`,$type:`color`},800:{$value:`#e3ecd0`,$type:`color`}},warning:{50:{$value:`#2a1e0c`,$type:`color`},100:{$value:`#523915`,$type:`color`},200:{$value:`#7a541f`,$type:`color`},500:{$value:`#dba14a`,$type:`color`},600:{$value:`#e4b46e`,$type:`color`},700:{$value:`#eac786`,$type:`color`},800:{$value:`#f6e2bb`,$type:`color`}},error:{50:{$value:`#2a1410`,$type:`color`},100:{$value:`#52271f`,$type:`color`},200:{$value:`#7a3a2e`,$type:`color`},500:{$value:`#d7705f`,$type:`color`},600:{$value:`#df8576`,$type:`color`},700:{$value:`#e3a294`,$type:`color`},800:{$value:`#f1cec5`,$type:`color`}},info:{50:{$value:`#222220`,$type:`color`},100:{$value:`#3a3936`,$type:`color`},200:{$value:`#56544f`,$type:`color`},500:{$value:`#a8a59f`,$type:`color`},600:{$value:`#bcbab5`,$type:`color`},700:{$value:`#d1cfca`,$type:`color`},800:{$value:`#e6e4e0`,$type:`color`}},surface:{$value:`#262624`,$type:`color`},onSurface:{$value:`#faf9f5`,$type:`color`},surfaceVariant:{$value:`#2d2c2a`,$type:`color`},onSurfaceVariant:{$value:`#a8a59f`,$type:`color`},container:{$value:`#3d3b39`,$type:`color`},onContainer:{$value:`#fbf2ee`,$type:`color`},outline:{$value:`#3d3b39`,$type:`color`},outlineVariant:{$value:`#2d2c2a`,$type:`color`},onPrimary:{$value:`#262624`,$type:`color`},primaryContainer:{$value:`#723e30`,$type:`color`},onPrimaryContainer:{$value:`#f5dfd4`,$type:`color`},onError:{$value:`#2a1410`,$type:`color`},errorContainer:{$value:`#52271f`,$type:`color`},onErrorContainer:{$value:`#f1cec5`,$type:`color`},tertiary:{$value:`#9bb56b`,$type:`color`},onTertiary:{$value:`#1c2412`,$type:`color`},tertiaryContainer:{$value:`#34461e`,$type:`color`},onTertiaryContainer:{$value:`#e3ecd0`,$type:`color`}},font:Rm.font,spacing:Rm.spacing,shape:Rm.shape,motion:Rm.motion,accessibility:{...Tm.dark,focusRing:{...Tm.dark.focusRing,color:{$type:`color`,$value:`#d6896c`}}},zIndex:Em}},Bm={font:{family:{sans:{$value:`"Inter Variable", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif`,$type:`fontFamily`},mono:{$value:`"JetBrains Mono", "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace`,$type:`fontFamily`}},size:{sm:{$value:`0.8125rem`,$type:`dimension`},base:{$value:`0.9375rem`,$type:`dimension`},lg:{$value:`1.0625rem`,$type:`dimension`},xl:{$value:`1.3125rem`,$type:`dimension`},"2xl":{$value:`1.75rem`,$type:`dimension`}},weight:{normal:{$value:`400`,$type:`fontWeight`},medium:{$value:`500`,$type:`fontWeight`},semibold:{$value:`600`,$type:`fontWeight`},bold:{$value:`680`,$type:`fontWeight`}},lineHeight:{tight:{$value:`1.1`,$type:`number`},normal:{$value:`1.55`,$type:`number`},relaxed:{$value:`1.7`,$type:`number`}}},spacing:{1:{$value:`0.25rem`,$type:`dimension`},2:{$value:`0.5rem`,$type:`dimension`},3:{$value:`0.75rem`,$type:`dimension`},4:{$value:`1rem`,$type:`dimension`},5:{$value:`1.25rem`,$type:`dimension`},6:{$value:`1.5rem`,$type:`dimension`},8:{$value:`2rem`,$type:`dimension`},10:{$value:`2.5rem`,$type:`dimension`},12:{$value:`3rem`,$type:`dimension`},xs:{$value:`0.25rem`,$type:`dimension`},sm:{$value:`0.5rem`,$type:`dimension`},md:{$value:`1rem`,$type:`dimension`},lg:{$value:`1.5rem`,$type:`dimension`},xl:{$value:`2rem`,$type:`dimension`},"2xl":{$value:`3rem`,$type:`dimension`}},shape:{radius:{sm:{$value:`0.5rem`,$type:`dimension`},md:{$value:`0.875rem`,$type:`dimension`},lg:{$value:`1.125rem`,$type:`dimension`},xl:{$value:`1.5rem`,$type:`dimension`},full:{$value:`9999px`,$type:`dimension`}},shadow:{sm:{$value:`0 1px 2px color-mix(in srgb, var(--ggui-color-primary-500) 6%, transparent)`,$type:`shadow`},md:{$value:`0 1px 3px rgba(21, 19, 31, 0.06), 0 8px 24px -6px color-mix(in srgb, var(--ggui-color-primary-500) 16%, transparent)`,$type:`shadow`},lg:{$value:`0 2px 6px rgba(21, 19, 31, 0.05), 0 20px 40px -10px color-mix(in srgb, var(--ggui-color-primary-500) 22%, transparent)`,$type:`shadow`},xl:{$value:`0 4px 10px rgba(21, 19, 31, 0.04), 0 32px 64px -16px color-mix(in srgb, var(--ggui-color-primary-500) 28%, transparent)`,$type:`shadow`}}},motion:{duration:{fast:{$value:`150ms`,$type:`duration`},normal:{$value:`250ms`,$type:`duration`},slow:{$value:`420ms`,$type:`duration`},ambient:{$value:`8000ms`,$type:`duration`}},easing:{default:{$value:`cubic-bezier(0.32, 0.72, 0, 1)`,$type:`cubicBezier`},spring:{$value:`cubic-bezier(0.16, 1, 0.3, 1)`,$type:`cubicBezier`}},keyframes:{entrance:{$value:`0%{opacity:0;transform:translateY(6px)}100%{opacity:1;transform:none}`,$type:`keyframes`}},transition:Dm}},Vm={light:{$name:`Indigo`,$description:`Flagship ggui preset — refined electric indigo on a quiet paper surface. Premium, restrained, distinctive.`,$metadata:{font:`inter`,philosophy:`Looks like a deliberate aesthetic choice. Linear/Arc/Vercel-grade restraint with one confident accent.`},color:{primary:{50:{$value:`#eef2ff`,$type:`color`},100:{$value:`#e0e7ff`,$type:`color`},200:{$value:`#c7d2fe`,$type:`color`},300:{$value:`#a5b4fc`,$type:`color`},400:{$value:`#818cf8`,$type:`color`},500:{$value:`#4f46e5`,$type:`color`},600:{$value:`#4338ca`,$type:`color`},700:{$value:`#3730a3`,$type:`color`},800:{$value:`#312e81`,$type:`color`},900:{$value:`#1e1b4b`,$type:`color`}},neutral:{50:{$value:`#fafaf7`,$type:`color`},100:{$value:`#f4f4f0`,$type:`color`},200:{$value:`#e8e7e3`,$type:`color`},300:{$value:`#d4d3cf`,$type:`color`},400:{$value:`#9c9ba0`,$type:`color`},500:{$value:`#6e6d74`,$type:`color`},600:{$value:`#4a4954`,$type:`color`},700:{$value:`#322f3e`,$type:`color`},800:{$value:`#211f2c`,$type:`color`},900:{$value:`#15131f`,$type:`color`}},success:{50:{$value:`#ecfdf5`,$type:`color`},100:{$value:`#d1fae5`,$type:`color`},200:{$value:`#a7f3d0`,$type:`color`},500:{$value:`#0b815a`,$type:`color`},600:{$value:`#0b8259`,$type:`color`},700:{$value:`#086847`,$type:`color`},800:{$value:`#064e36`,$type:`color`}},warning:{50:{$value:`#fff8eb`,$type:`color`},100:{$value:`#fdecc8`,$type:`color`},200:{$value:`#fbd897`,$type:`color`},500:{$value:`#a66210`,$type:`color`},600:{$value:`#b86b0e`,$type:`color`},700:{$value:`#90530a`,$type:`color`},800:{$value:`#6b3d07`,$type:`color`}},error:{50:{$value:`#fef2f4`,$type:`color`},100:{$value:`#fde2e7`,$type:`color`},200:{$value:`#fbc5cf`,$type:`color`},500:{$value:`#dc2845`,$type:`color`},600:{$value:`#b81f38`,$type:`color`},700:{$value:`#94182d`,$type:`color`},800:{$value:`#701222`,$type:`color`}},info:{50:{$value:`#ecfeff`,$type:`color`},100:{$value:`#cffafe`,$type:`color`},200:{$value:`#a5f3fc`,$type:`color`},500:{$value:`#0891b2`,$type:`color`},600:{$value:`#0e7490`,$type:`color`},700:{$value:`#155e75`,$type:`color`},800:{$value:`#164e63`,$type:`color`}},surface:{$value:`#fafaf7`,$type:`color`},onSurface:{$value:`#15131f`,$type:`color`},surfaceVariant:{$value:`#f4f4f0`,$type:`color`},onSurfaceVariant:{$value:`#4a4954`,$type:`color`},container:{$value:`#eef2ff`,$type:`color`},onContainer:{$value:`#1e1b4b`,$type:`color`},outline:{$value:`#d4d3cf`,$type:`color`},outlineVariant:{$value:`#e8e7e3`,$type:`color`},onPrimary:{$value:`#fafaf7`,$type:`color`},primaryContainer:{$value:`#eef2ff`,$type:`color`},onPrimaryContainer:{$value:`#1e1b4b`,$type:`color`},onError:{$value:`#fafaf7`,$type:`color`},errorContainer:{$value:`#fde2e7`,$type:`color`},onErrorContainer:{$value:`#701222`,$type:`color`},tertiary:{$value:`#7c3aed`,$type:`color`},onTertiary:{$value:`#fafaf7`,$type:`color`},tertiaryContainer:{$value:`#ede9fe`,$type:`color`},onTertiaryContainer:{$value:`#4c1d95`,$type:`color`}},font:Bm.font,spacing:Bm.spacing,shape:Bm.shape,motion:Bm.motion,accessibility:{...Tm.light,focusRing:{...Tm.light.focusRing,color:{$type:`color`,$value:`#4f46e5`}}},zIndex:Em},dark:{$name:`Indigo`,$description:`Flagship ggui preset (dark) — refined electric indigo on rich midnight. Premium, restrained, distinctive.`,$metadata:{font:`inter`,philosophy:`Looks like a deliberate aesthetic choice. Linear/Arc/Vercel-grade restraint with one confident accent.`},color:{primary:{50:{$value:`#1e1b4b`,$type:`color`},100:{$value:`#312e81`,$type:`color`},200:{$value:`#3730a3`,$type:`color`},300:{$value:`#4338ca`,$type:`color`},400:{$value:`#4f46e5`,$type:`color`},500:{$value:`#818cf8`,$type:`color`},600:{$value:`#a5b4fc`,$type:`color`},700:{$value:`#c7d2fe`,$type:`color`},800:{$value:`#e0e7ff`,$type:`color`},900:{$value:`#eef2ff`,$type:`color`}},neutral:{50:{$value:`#0c0b14`,$type:`color`},100:{$value:`#15131f`,$type:`color`},200:{$value:`#1d1b29`,$type:`color`},300:{$value:`#2a2839`,$type:`color`},400:{$value:`#3e3c50`,$type:`color`},500:{$value:`#636176`,$type:`color`},600:{$value:`#8b8898`,$type:`color`},700:{$value:`#b8b6c2`,$type:`color`},800:{$value:`#dcdbe2`,$type:`color`},900:{$value:`#f5f4f9`,$type:`color`}},success:{50:{$value:`#022c1d`,$type:`color`},100:{$value:`#064e36`,$type:`color`},200:{$value:`#086847`,$type:`color`},500:{$value:`#34d399`,$type:`color`},600:{$value:`#6ee7b7`,$type:`color`},700:{$value:`#a7f3d0`,$type:`color`},800:{$value:`#d1fae5`,$type:`color`}},warning:{50:{$value:`#3a2104`,$type:`color`},100:{$value:`#6b3d07`,$type:`color`},200:{$value:`#90530a`,$type:`color`},500:{$value:`#f59e0b`,$type:`color`},600:{$value:`#fbbf24`,$type:`color`},700:{$value:`#fcd34d`,$type:`color`},800:{$value:`#fde68a`,$type:`color`}},error:{50:{$value:`#3b0a14`,$type:`color`},100:{$value:`#701222`,$type:`color`},200:{$value:`#94182d`,$type:`color`},500:{$value:`#fb7185`,$type:`color`},600:{$value:`#fda4af`,$type:`color`},700:{$value:`#fecdd3`,$type:`color`},800:{$value:`#ffe4e6`,$type:`color`}},info:{50:{$value:`#083344`,$type:`color`},100:{$value:`#164e63`,$type:`color`},200:{$value:`#155e75`,$type:`color`},500:{$value:`#22d3ee`,$type:`color`},600:{$value:`#67e8f9`,$type:`color`},700:{$value:`#a5f3fc`,$type:`color`},800:{$value:`#cffafe`,$type:`color`}},surface:{$value:`#15131f`,$type:`color`},onSurface:{$value:`#f5f4f9`,$type:`color`},surfaceVariant:{$value:`#221e35`,$type:`color`},onSurfaceVariant:{$value:`#c8c6d2`,$type:`color`},container:{$value:`#312e81`,$type:`color`},onContainer:{$value:`#eef2ff`,$type:`color`},outline:{$value:`#3e3c50`,$type:`color`},outlineVariant:{$value:`#2a2839`,$type:`color`},onPrimary:{$value:`#0c0b14`,$type:`color`},primaryContainer:{$value:`#312e81`,$type:`color`},onPrimaryContainer:{$value:`#e0e7ff`,$type:`color`},onError:{$value:`#3b0a14`,$type:`color`},errorContainer:{$value:`#701222`,$type:`color`},onErrorContainer:{$value:`#fecdd3`,$type:`color`},tertiary:{$value:`#a78bfa`,$type:`color`},onTertiary:{$value:`#2e1065`,$type:`color`},tertiaryContainer:{$value:`#4c1d95`,$type:`color`},onTertiaryContainer:{$value:`#ede9fe`,$type:`color`}},font:Bm.font,spacing:Bm.spacing,shape:Bm.shape,motion:Bm.motion,accessibility:{...Tm.dark,focusRing:{...Tm.dark.focusRing,color:{$type:`color`,$value:`#818cf8`}}},zIndex:Em}},Hm={font:{family:{sans:{$value:`"DM Sans", system-ui, -apple-system, sans-serif`,$type:`fontFamily`},mono:{$value:`"JetBrains Mono", ui-monospace, monospace`,$type:`fontFamily`}},size:{sm:{$value:`0.875rem`,$type:`dimension`},base:{$value:`1rem`,$type:`dimension`},lg:{$value:`1.125rem`,$type:`dimension`},xl:{$value:`1.25rem`,$type:`dimension`},"2xl":{$value:`1.5rem`,$type:`dimension`}},weight:{normal:{$value:`400`,$type:`fontWeight`},medium:{$value:`500`,$type:`fontWeight`},semibold:{$value:`600`,$type:`fontWeight`},bold:{$value:`700`,$type:`fontWeight`}},lineHeight:{tight:{$value:`1.25`,$type:`number`},normal:{$value:`1.5`,$type:`number`},relaxed:{$value:`1.75`,$type:`number`}}},spacing:{1:{$value:`0.25rem`,$type:`dimension`},2:{$value:`0.5rem`,$type:`dimension`},3:{$value:`0.75rem`,$type:`dimension`},4:{$value:`1rem`,$type:`dimension`},5:{$value:`1.25rem`,$type:`dimension`},6:{$value:`1.5rem`,$type:`dimension`},8:{$value:`2rem`,$type:`dimension`},10:{$value:`2.5rem`,$type:`dimension`},12:{$value:`3rem`,$type:`dimension`}},motion:{duration:{fast:{$value:`120ms`,$type:`duration`},normal:{$value:`200ms`,$type:`duration`},slow:{$value:`400ms`,$type:`duration`},ambient:{$value:`2000ms`,$type:`duration`}},easing:{default:{$value:`cubic-bezier(0.4, 0, 0.2, 1)`,$type:`cubicBezier`},bounce:{$value:`cubic-bezier(0.68, -0.55, 0.27, 1.55)`,$type:`cubicBezier`},spring:{$value:`cubic-bezier(0.22, 1, 0.36, 1)`,$type:`cubicBezier`}},transition:{fast:{$value:`120ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},normal:{$value:`200ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},slow:{$value:`400ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},colors:{$value:`color 200ms cubic-bezier(0.4, 0, 0.2, 1), background-color 200ms cubic-bezier(0.4, 0, 0.2, 1), border-color 200ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},opacity:{$value:`opacity 200ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},transform:{$value:`transform 200ms cubic-bezier(0.22, 1, 0.36, 1)`,$type:`transition`}},keyframes:{"fade-in":{$value:`0%{opacity:0}100%{opacity:1}`,$type:`keyframes`},"slide-up":{$value:`0%{opacity:0;transform:translateY(8px)}100%{opacity:1;transform:translateY(0)}`,$type:`keyframes`},"pulse-soft":{$value:`0%{opacity:1}50%{opacity:0.65}100%{opacity:1}`,$type:`keyframes`}}},accessibility:{focusRing:{color:{$value:`#B8FF3A`,$type:`color`},width:{$value:`2px`,$type:`dimension`},offset:{$value:`2px`,$type:`dimension`}},reducedMotion:{duration:{$value:`0ms`,$type:`duration`}},highContrast:{borderWidth:{$value:`2px`,$type:`dimension`},textColor:{$value:`#FFFFFF`,$type:`color`},backgroundColor:{$value:`#000000`,$type:`color`},linkColor:{$value:`#CCFF66`,$type:`color`}}},zIndex:Em},Um={sm:{$value:`0.375rem`,$type:`dimension`},md:{$value:`0.5rem`,$type:`dimension`},lg:{$value:`0.75rem`,$type:`dimension`},xl:{$value:`1rem`,$type:`dimension`},full:{$value:`9999px`,$type:`dimension`}},Wm={sm:{$value:`0 1px 2px rgba(0, 0, 0, 0.2)`,$type:`shadow`},md:{$value:`0 2px 8px rgba(0, 0, 0, 0.25)`,$type:`shadow`},lg:{$value:`0 6px 16px rgba(0, 0, 0, 0.28)`,$type:`shadow`},xl:{$value:`0 10px 24px rgba(0, 0, 0, 0.3)`,$type:`shadow`}},Gm={sm:{$value:`0 1px 2px rgba(26, 29, 36, 0.06)`,$type:`shadow`},md:{$value:`0 2px 8px rgba(26, 29, 36, 0.08)`,$type:`shadow`},lg:{$value:`0 6px 16px rgba(26, 29, 36, 0.1)`,$type:`shadow`},xl:{$value:`0 12px 28px rgba(26, 29, 36, 0.12)`,$type:`shadow`}},Km={$name:`guuey-brand-v1`,$description:`The guuey product brand (dark) — slate-ink surfaces, slime #B8FF3A accent, DM Sans.`,$metadata:{font:`DM Sans`,fontUrl:`https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap`,philosophy:`Agent-native. Slime on slate.`,frameless:!0},color:{primary:{50:{$value:`#141D05`,$type:`color`},100:{$value:`#28390B`,$type:`color`},200:{$value:`#3F5A11`,$type:`color`},300:{$value:`#5F8719`,$type:`color`},400:{$value:`#8CC627`,$type:`color`},500:{$value:`#B8FF3A`,$type:`color`},600:{$value:`#CCFF66`,$type:`color`},700:{$value:`#DBFF8F`,$type:`color`},800:{$value:`#E9FFB8`,$type:`color`},900:{$value:`#F6FFE0`,$type:`color`}},neutral:{50:{$value:`#0E1014`,$type:`color`},100:{$value:`#1A1D24`,$type:`color`},200:{$value:`#232630`,$type:`color`},300:{$value:`#242938`,$type:`color`},400:{$value:`#3B4152`,$type:`color`},500:{$value:`#878C99`,$type:`color`},600:{$value:`#B7BAC4`,$type:`color`},700:{$value:`#D5D6DC`,$type:`color`},800:{$value:`#E8E7E2`,$type:`color`},900:{$value:`#F6F5EE`,$type:`color`}},success:{50:{$value:`#141D05`,$type:`color`},100:{$value:`#28390B`,$type:`color`},200:{$value:`#3F5A11`,$type:`color`},500:{$value:`#B8FF3A`,$type:`color`},600:{$value:`#CCFF66`,$type:`color`},700:{$value:`#DBFF8F`,$type:`color`},800:{$value:`#E9FFB8`,$type:`color`}},warning:{50:{$value:`#33240A`,$type:`color`},100:{$value:`#5C420F`,$type:`color`},200:{$value:`#8A6318`,$type:`color`},500:{$value:`#FFB020`,$type:`color`},600:{$value:`#FFC24D`,$type:`color`},700:{$value:`#FFD37D`,$type:`color`},800:{$value:`#FFE5AE`,$type:`color`}},error:{50:{$value:`#33110E`,$type:`color`},100:{$value:`#5E1F1B`,$type:`color`},200:{$value:`#8F2F2A`,$type:`color`},500:{$value:`#FF5B5B`,$type:`color`},600:{$value:`#FF7D7A`,$type:`color`},700:{$value:`#FF9F9C`,$type:`color`},800:{$value:`#FFC3C0`,$type:`color`}},info:{50:{$value:`#0A2733`,$type:`color`},100:{$value:`#12455C`,$type:`color`},200:{$value:`#1E6A8A`,$type:`color`},500:{$value:`#3AC8FF`,$type:`color`},600:{$value:`#66D4FF`,$type:`color`},700:{$value:`#92E0FF`,$type:`color`},800:{$value:`#BFECFF`,$type:`color`}},surface:{$value:`#1A1D24`,$type:`color`},onSurface:{$value:`#F6F5EE`,$type:`color`},surfaceVariant:{$value:`#242938`,$type:`color`},onSurfaceVariant:{$value:`#B7BAC4`,$type:`color`},container:{$value:`#232630`,$type:`color`},onContainer:{$value:`#F6F5EE`,$type:`color`},outline:{$value:`rgba(246, 245, 238, 0.14)`,$type:`color`},outlineVariant:{$value:`rgba(246, 245, 238, 0.1)`,$type:`color`},onPrimary:{$value:`#0E1014`,$type:`color`},primaryContainer:{$value:`#242938`,$type:`color`},onPrimaryContainer:{$value:`#CCFF66`,$type:`color`},onError:{$value:`#33110E`,$type:`color`},errorContainer:{$value:`#5E1F1B`,$type:`color`},onErrorContainer:{$value:`#FFC3C0`,$type:`color`},tertiary:{$value:`#FF4FB0`,$type:`color`},onTertiary:{$value:`#0E1014`,$type:`color`},tertiaryContainer:{$value:`#451A35`,$type:`color`},onTertiaryContainer:{$value:`#FFC1E4`,$type:`color`}},...Hm,shape:{radius:Um,shadow:Wm}},qm={light:{$name:`guuey-brand-v1`,$description:`The guuey product brand (light, provisional) — paper surfaces, slime accent held for fills, darkened slime for text emphasis.`,$metadata:Km.$metadata,color:{primary:{50:{$value:`#F6FFE0`,$type:`color`},100:{$value:`#E9FFB8`,$type:`color`},200:{$value:`#DBFF8F`,$type:`color`},300:{$value:`#CCFF66`,$type:`color`},400:{$value:`#B8FF3A`,$type:`color`},500:{$value:`#9FE01C`,$type:`color`},600:{$value:`#7DB214`,$type:`color`},700:{$value:`#476809`,$type:`color`},800:{$value:`#3F5A11`,$type:`color`},900:{$value:`#28390B`,$type:`color`}},neutral:{50:{$value:`#FBFAF6`,$type:`color`},100:{$value:`#F6F5EE`,$type:`color`},200:{$value:`#E8E7E2`,$type:`color`},300:{$value:`#D5D6DC`,$type:`color`},400:{$value:`#B7BAC4`,$type:`color`},500:{$value:`#6E7380`,$type:`color`},600:{$value:`#4A4F5C`,$type:`color`},700:{$value:`#333846`,$type:`color`},800:{$value:`#242938`,$type:`color`},900:{$value:`#1A1D24`,$type:`color`}},success:{50:{$value:`#F6FFE0`,$type:`color`},100:{$value:`#E9FFB8`,$type:`color`},200:{$value:`#DBFF8F`,$type:`color`},500:{$value:`#517709`,$type:`color`},600:{$value:`#476809`,$type:`color`},700:{$value:`#35510B`,$type:`color`},800:{$value:`#28390B`,$type:`color`}},warning:{50:{$value:`#FFF4DD`,$type:`color`},100:{$value:`#FFE5AE`,$type:`color`},200:{$value:`#FFD37D`,$type:`color`},500:{$value:`#9C6205`,$type:`color`},600:{$value:`#7C4D04`,$type:`color`},700:{$value:`#5E3A03`,$type:`color`},800:{$value:`#3F2702`,$type:`color`}},error:{50:{$value:`#FFE9E8`,$type:`color`},100:{$value:`#FFC3C0`,$type:`color`},200:{$value:`#FF9F9C`,$type:`color`},500:{$value:`#CC2F2F`,$type:`color`},600:{$value:`#A62626`,$type:`color`},700:{$value:`#7E1D1D`,$type:`color`},800:{$value:`#5E1F1B`,$type:`color`}},info:{50:{$value:`#E5F7FF`,$type:`color`},100:{$value:`#BFECFF`,$type:`color`},200:{$value:`#92E0FF`,$type:`color`},500:{$value:`#0B739E`,$type:`color`},600:{$value:`#085572`,$type:`color`},700:{$value:`#06455D`,$type:`color`},800:{$value:`#0A3346`,$type:`color`}},surface:{$value:`#FFFFFF`,$type:`color`},onSurface:{$value:`#1A1D24`,$type:`color`},surfaceVariant:{$value:`#F6F5EE`,$type:`color`},onSurfaceVariant:{$value:`#4A4F5C`,$type:`color`},container:{$value:`#FBFAF6`,$type:`color`},onContainer:{$value:`#1A1D24`,$type:`color`},outline:{$value:`rgba(26, 29, 36, 0.18)`,$type:`color`},outlineVariant:{$value:`rgba(26, 29, 36, 0.10)`,$type:`color`},onPrimary:{$value:`#0E1014`,$type:`color`},primaryContainer:{$value:`#E9FFB8`,$type:`color`},onPrimaryContainer:{$value:`#28390B`,$type:`color`},onError:{$value:`#FFFFFF`,$type:`color`},errorContainer:{$value:`#FFE9E8`,$type:`color`},onErrorContainer:{$value:`#8A1F1F`,$type:`color`},tertiary:{$value:`#D6247F`,$type:`color`},onTertiary:{$value:`#FFFFFF`,$type:`color`},tertiaryContainer:{$value:`#FFDCEE`,$type:`color`},onTertiaryContainer:{$value:`#6B1240`,$type:`color`}},...Hm,shape:{radius:Um,shadow:Gm}},dark:Km},Jm=new Map([[`ggui`,km],[`indigo`,Vm],[`claudic`,zm],[`premium-cyberpunk`,jm],[`premium-zen`,Nm],[`premium-neon-noir`,Fm],[`premium-botanical`,Lm],[`guuey-brand-v1`,qm]]),Ym=new Map;function Xm(e,t){return t===`dark`&&e.dark?`dark`:`light`}function Zm(e,t=`light`){let n=Jm.get(e);if(!n)return;let r=Xm(n,t),i=`${e}:${r}`,a=Ym.get(i);if(a)return a;let o=Cm(e,r===`dark`?n.dark:n.light);return Ym.set(i,o),o}function Qm(){return`ggui`}(0,S.createContext)(null);var $m=`@supports (color: color-mix(in srgb, red, blue))`;function eh(e){let t=e.match(/--ggui-color-primary-500:\s*(#[0-9a-fA-F]{3}|#[0-9a-fA-F]{6})\s*;/);return t?t[1]:null}function th(e){let t=e.replace(`#`,``);if(t.length===3&&(t=t.split(``).map(e=>e+e).join(``)),t.length!==6)return null;let n=Number.parseInt(t.slice(0,2),16),r=Number.parseInt(t.slice(2,4),16),i=Number.parseInt(t.slice(4,6),16);return Number.isNaN(n)||Number.isNaN(r)||Number.isNaN(i)?null:{r:n,g:r,b:i}}function nh(e,t){let n=th(t);return n?e.replace(/color-mix\(\s*in srgb\s*,\s*var\(--ggui-color-primary-500\)\s+(\d+(?:\.\d+)?)%\s*,\s*transparent\s*\)/g,(e,t)=>{let r=Number(t)/100,i=Number(r.toFixed(4)).toString();return`rgba(${n.r}, ${n.g}, ${n.b}, ${i})`}):e}function rh(e){let t=e.indexOf(`{`),n=e.lastIndexOf(`}`);if(t===-1||n===-1)return{base:e,colorMix:[]};let r=e.slice(0,t+1),i=e.slice(t+1,n),a=[],o=[];for(let e of i.split(`
|
|
161
161
|
`))e.trim()!==``&&(e.includes(`color-mix(`)?o.push(e):a.push(e));return{base:`${r}
|
|
162
162
|
${a.join(`
|
|
163
163
|
`)}
|
|
@@ -198,9 +198,9 @@ ${r}
|
|
|
198
198
|
${i}
|
|
199
199
|
${a}
|
|
200
200
|
${o}
|
|
201
|
-
}`}var lh=[`useAction`,`useStream`,`useAuth`,`useApp`,`useRender`,`useGguiContext`,`useContract`,`useWireContext`,`GguiWireProvider`],uh=`Container.Card.Stack.Row.Grid.Box.Divider.Spacer.Text.Heading.Button.Input.TextArea.Select.Checkbox.Toggle.RadioGroup.Slider.Badge.Spinner.Skeleton.Avatar.Alert.Progress.Image.Icon.Link.Tooltip.Table.Tabs.Toast.Accordion.MotionKeyframes.useMotion.useAnimationKey`.split(`.`),dh=[`SearchField`,`FormField`,`MenuItem`,`Tag`,`Dropdown`,`Autocomplete`,`Breadcrumb`,`Pagination`,`EmptyState`,`Stat`,`Stepper`,`Markdown`,`MarkdownInline`,`renderRichTextInlines`],fh=[`Header`,`Sidebar`,`CardGrid`,`CommentThread`,`DataTable`,`ChatWindow`,`NavigationBar`,`FileUploader`,`NotificationCenter`,`Modal`,`CommandPalette`,`Footer`,`Hero`],ph=[`Clickable`,`Hoverable`,`Pressable`],mh=`useState.useEffect.useRef.useCallback.useMemo.useContext.useReducer.useId.use.useActionState.useOptimistic.useTransition.startTransition.useDeferredValue.useSyncExternalStore.useInsertionEffect.useLayoutEffect.useImperativeHandle.useDebugValue.createElement.Fragment.Children.cloneElement.createContext.forwardRef.memo.lazy.Suspense.Component.PureComponent.isValidElement.createRef`.split(`.`),hh=`animation.duration.easing.transition.keyframes.thinkingAnimation.thinkingKeyframes.thinkingPresets.THINKING_DEFAULT_STYLE.motionSafe.reducedMotion.reducedMotionCSS.colors.gray.primary.semantic.chartColors.success.warning.error.info.highContrast.typography.fontFamily.fontSize.fontSizeValues.fontWeight.lineHeight.letterSpacing.headingStyles.spacing.spacingValues.radius.shadow.elevation.maxWidth.zIndex.accessibility.focusRing.nativeTokens.tokens`.split(`.`);function gh(e,t,n){return e=e.split(`from"${t}"`).join(`from"${n}"`),e=e.split(`from "${t}"`).join(`from "${n}"`),e=e.split(`from'${t}'`).join(`from'${n}'`),e=e.split(`from '${t}'`).join(`from '${n}'`),e=e.split(`import"${t}"`).join(`import"${n}"`),e=e.split(`import "${t}"`).join(`import "${n}"`),e=e.split(`import'${t}'`).join(`import'${n}'`),e=e.split(`import '${t}'`).join(`import '${n}'`),e}function _h(e,t){return`(globalThis.__ggui__&&globalThis.__ggui__["${e}"]||window["${t}"])`}function vh(e){return`data:text/javascript,${encodeURIComponent(e)}`}function yh(e){let t=mh.map(e=>`export const ${e} = R.${e};`).join(` `);return`const R = ${_h(`react`,e)}; export default R; ${t}`}function bh(e){return vh(yh(e))}function xh(){return`const D = globalThis.__ggui__["reactDom"]; export default D; ${[`createPortal`,`flushSync`,`unstable_batchedUpdates`].map(e=>`export const ${e} = D.${e};`).join(` `)}`}function Sh(){return vh(xh())}function Ch(e){return[`const R = ${_h(`react`,e)};`,`function jsx(t,p,k){`,`if(k!==undefined){p={...p,key:k}}`,`const c=p.children;`,`delete p.children;`,`return Array.isArray(c)?R.createElement(t,p,...c):c!==undefined?R.createElement(t,p,c):R.createElement(t,p)`,`}`,`export{jsx,jsx as jsxs,jsx as jsxDEV};`,`export const Fragment=R.Fragment;`].join(``)}function wh(e){return vh(Ch(e))}function Th(e,t,n,r,i){if(n&&n.length>0){let a=[e,...r||[]],o=[t,...i||[]],s=a.map((e,t)=>`(globalThis.__ggui__&&globalThis.__ggui__["${o[t]}"]||window["${e}"]||{})`),c=s.join(`,`),l=n.map(e=>`export const ${e} = M["${e}"];`).join(` `);return s.length>1?`const M = Object.assign({}, ${c}); ${l} export default M;`:`const M = ${s[0]}; ${l} export default M;`}return`const M = ${_h(t,e)} || {}; const handler = { get(_, key) { return M[key]; } }; export default new Proxy({}, handler);`}function Eh(e,t,n,r,i){return vh(Th(e,t,n,r,i))}function Dh(){return`const w = globalThis.__ggui__.wire; ${lh.map(e=>`export const ${e} = w.${e};`).join(` `)} export default w;`}function Oh(){return vh(Dh())}function kh(e,t){let n=t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`),r=RegExp(`import\\s*(?:[A-Za-z_$][\\w$]*\\s*,\\s*)?\\{([^}]*)\\}\\s*from\\s*['"]${n}['"]`,`g`),i=new Set,a;for(;(a=r.exec(e))!==null;)for(let e of a[1].split(`,`)){let t=e.trim().split(/\s+as\s+/)[0]?.trim();t!==void 0&&/^[A-Za-z_$][\w$]*$/.test(t)&&i.add(t)}return[...i]}function Ah(e,t){let n=JSON.stringify(e),r=t.some(e=>/^[A-Z]/.test(e)),i=[];i.push(`var P=${n};`),i.push(`function NS(){return(globalThis.__ggui__&&globalThis.__ggui__.gadgets&&globalThis.__ggui__.gadgets[P])||{};}`),i.push(`function H(n){return function(){var f=NS()[n];if(typeof f!=="function")throw new Error("[gadget] export "+n+" from package "+P+" is not loaded — the package failed to load at iframe boot or is not registered on App.gadgets.");return f.apply(this,arguments);};}`),r&&(i.push(`var R=globalThis.__ggui__&&globalThis.__ggui__.react;`),i.push(`class GEB extends R.Component{constructor(p){super(p);this.state={e:null};}static getDerivedStateFromError(e){return{e:e};}render(){if(this.state.e)return R.createElement("div",{style:{padding:"8px",border:"1px solid #e0a0c0",borderRadius:"6px",color:"#a03070",font:"13px system-ui"}},"[gadget] "+this.props.g+" failed to render");return this.props.children;}}`),i.push(`function C(n){return function(props){var Cmp=NS()[n];if(typeof Cmp!=="function")return R.createElement("div",{style:{padding:"8px",border:"1px solid #e0a0c0",borderRadius:"6px",color:"#a03070",font:"13px system-ui"}},"[gadget] component "+n+" from package "+P+" is not loaded");return R.createElement(GEB,{g:n},R.createElement(Cmp,props));};}`));for(let e of t){let t=/^[A-Z]/.test(e)?`C`:`H`;i.push(`export const ${e}=${t}(${JSON.stringify(e)});`)}return i.push(`export default new Proxy({},{get:function(_,k){return NS()[k];}});`),i.join(``)}function jh(e,t){return vh(Ah(e,t))}function Mh(e,t){let n=t.reactGlobal??`__REACT`,r=t.primitivesGlobal??`__GGUI_PRIMITIVES`,i=t.componentsGlobal??`__GGUI_COMPONENTS`,a=t.compositionsGlobal??`__GGUI_COMPOSITIONS`,o=t.interactGlobal??`__GGUI_INTERACT`,s=t.appComponentsGlobal??`__GGUI_APP_COMPONENTS`,c=bh(n),l=wh(n);e=gh(e,`react/jsx-runtime`,l),e=gh(e,`react/jsx-dev-runtime`,l);let u=Sh();e=gh(e,`react-dom`,u),e=gh(e,`react`,c);let d=[...uh,...dh,...fh,...ph];e=gh(e,`@ggui-ai/design/primitives`,Eh(r,`primitives`,d,[i,a,o],[`components`,`compositions`,`interact`])),e=gh(e,`@ggui-ai/design/components`,Eh(i,`components`,d,[r,a,o],[`primitives`,`compositions`,`interact`])),e=gh(e,`@ggui-ai/design/compositions`,Eh(a,`compositions`,d,[r,i,o],[`primitives`,`components`,`interact`])),e=gh(e,`@ggui-ai/design/interact`,Eh(o,`interact`,[...ph])),e=gh(e,`@ggui-ai/design/templates`,Eh(a,`compositions`,d,[r,i],[`primitives`,`components`])),e=gh(e,`@ggui-ai/design/app-components`,Eh(s,`appComponents`)),e=gh(e,`@ggui-ai/design/tokens`,Eh(`__GGUI_TOKENS`,`tokens`,[...hh])),e=gh(e,`@ggui-ai/design`,Eh(r,`primitives`,d,[i,a,o],[`components`,`compositions`,`interact`])),e=gh(e,`@ggui-ai/wire`,Oh());let f=[...new Set([`@ggui-ai/gadgets`,...t.gadgetPackages??[]])];for(let t of f){let n=kh(e,t);e=gh(e,t,jh(t,n))}return e}var Nh={"react/jsx-runtime":`jsx-runtime`,"react/jsx-dev-runtime":`jsx-runtime`,"react-dom":`react-dom`,react:`react`,"@ggui-ai/design/primitives":`primitives`,"@ggui-ai/design/components":`components`,"@ggui-ai/design/compositions":`compositions`,"@ggui-ai/design/interact":`interact`,"@ggui-ai/design/templates":`templates`,"@ggui-ai/design/app-components":`app-components`,"@ggui-ai/design/tokens":`tokens`,"@ggui-ai/design":`design`,"@ggui-ai/wire":`wire`,"@ggui-ai/gadgets":`gadgets`};function Ph(e,t){let n=t.shimBaseUrl.replace(/\/$/,``);for(let[t,r]of Object.entries(Nh))e=gh(e,t,`${n}/${r}.js`);return e}function Fh(e,t){let n=t.reactBaseUrl??`https://esm.sh/react@18.2.0`;return e=gh(e,`react/jsx-runtime`,`${n}/jsx-runtime`),e=gh(e,`react/jsx-dev-runtime`,`${n}/jsx-runtime`),e=gh(e,`react`,n),e}function Ih(e,t){switch(t.mode){case`data-url`:return Mh(e,t);case`importmap`:return Fh(e,t);case`asset-url`:return Ph(e,t)}}function Lh(e){let t=e.split(`;`),n=[],r=[];for(let e of t)e.trimStart().startsWith(`import`)?n.push(e):r.push(e);return n.length===0?e:n.join(`;`)+`;`+r.join(`;`)}async function Rh(e){let t=new Blob([e],{type:`application/javascript`}),n=URL.createObjectURL(t);try{return await pd(()=>import(n),[])}finally{URL.revokeObjectURL(n)}}var zh=0;function Bh(e){return`ggui-rcr-${e.replace(/[^a-z0-9]/gi,``)}`}var Vh=1,Hh=500,Uh=class extends S.Component{state={error:null,catchCount:0,autoRetrying:!1};retryTimer=null;static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e){let t=this.state.catchCount+1;this.setState({catchCount:t}),t<=Vh?(this.setState({autoRetrying:!0}),this.retryTimer=setTimeout(()=>{this.setState({error:null,autoRetrying:!1})},Hh)):this.props.onError?.(e)}componentWillUnmount(){this.retryTimer&&clearTimeout(this.retryTimer)}render(){let{error:e,autoRetrying:t}=this.state;return e?t?(0,w.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,padding:24,minHeight:80,gap:8,fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif`,fontSize:13,color:`var(--ggui-color-onSurface, inherit)`,opacity:.6},children:[(0,w.jsx)(`div`,{style:{width:16,height:16,border:`2px solid rgba(128,128,128,0.25)`,borderTopColor:`currentColor`,borderRadius:`50%`,animation:`ggui-err-spin 0.6s linear infinite`}}),`Retrying...`,(0,w.jsx)(`style`,{children:`@keyframes ggui-err-spin { to { transform: rotate(360deg); } }`})]}):(0,w.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,padding:`32px 24px`,minHeight:120,gap:12,textAlign:`center`,fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif`,color:`var(--ggui-color-onSurface, inherit)`},children:[(0,w.jsx)(`div`,{style:{width:48,height:48,borderRadius:14,background:`rgba(239, 68, 68, 0.1)`,color:`#ef4444`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:22},children:`!`}),(0,w.jsx)(`div`,{style:{fontSize:14,fontWeight:600,opacity:.9},children:`Something went wrong`}),(0,w.jsx)(`div`,{style:{fontSize:12,opacity:.6,maxWidth:280,lineHeight:1.4},children:`This component encountered an error. Try asking for a different view.`}),(0,w.jsx)(`button`,{onClick:()=>this.setState({error:null,catchCount:0}),style:{marginTop:4,padding:`8px 20px`,borderRadius:8,border:`1px solid currentColor`,background:`transparent`,color:`inherit`,opacity:.75,fontSize:13,fontWeight:500,cursor:`pointer`},children:`Retry`}),(0,w.jsxs)(`details`,{style:{marginTop:8,maxWidth:320,width:`100%`,textAlign:`left`,opacity:.65},children:[(0,w.jsx)(`summary`,{style:{fontSize:11,cursor:`pointer`},children:`Error details`}),(0,w.jsx)(`pre`,{style:{fontSize:11,fontFamily:`ui-monospace, SFMono-Regular, Menlo, monospace`,whiteSpace:`pre-wrap`,overflowWrap:`anywhere`,margin:`6px 0 0`,maxHeight:140,overflow:`auto`},children:e.message})]})]}):this.props.children}};function Wh({code:e,props:t={},themeId:n,cssOverrides:r,fallback:i=(0,w.jsx)(`div`,{children:`Loading component...`}),onError:a}){let o=(0,S.useId)(),[s]=(0,S.useState)(()=>Bh(o)||`ggui-rcr-${++zh}`),[c,l]=(0,S.useState)(null),[d,f]=(0,S.useState)(null),[p,m]=(0,S.useState)(!0);(0,S.useEffect)(()=>{if(!e||e.trim().length===0){l(null),m(!1);return}let t=!1;m(!0),f(null),l(null);async function n(){try{let n=e;if(e.startsWith(`https://`)){let t=await fetch(e);if(!t.ok)throw Error(`Failed to fetch component code: ${t.status}`);n=await t.text()}let r=_m(n),i=globalThis,a={};try{a=await pd(()=>Promise.resolve().then(()=>u(_(),1)),void 0)}catch{}i.__ggui__={react:S.default,reactDom:a,primitives:md,components:Qf,compositions:qp,interact:pm,wire:ld},i.__REACT=S.default,i.__GGUI_PRIMITIVES=md,i.__GGUI_COMPONENTS=Qf,i.__GGUI_COMPOSITIONS=qp,i.__GGUI_INTERACT=pm;let o=await Rh(Ih(Lh(r),{mode:`data-url`}));if(t)return;let s=o.default??Object.values(o).find(e=>typeof e==`function`);if(!s)throw Error(`Module does not export a default component`);l(()=>s),f(null)}catch(e){if(t)return;let n=e instanceof Error?e:Error(String(e));f(n),l(null),a?.(n)}finally{t||m(!1)}}return n(),()=>{t=!0}},[e]);let h=n?oh(n,s):ah(s);return!e||e.trim().length===0||p?(0,w.jsx)(`div`,{children:i}):d?(0,w.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,padding:`32px 24px`,minHeight:120,gap:12,textAlign:`center`,fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif`},children:[(0,w.jsx)(`div`,{style:{width:48,height:48,borderRadius:14,background:`rgba(239, 68, 68, 0.1)`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:22},children:`!`}),(0,w.jsx)(`div`,{style:{fontSize:14,fontWeight:600,color:`rgba(255,255,255,0.8)`},children:`Failed to load component`}),(0,w.jsx)(`div`,{style:{fontSize:12,color:`rgba(255,255,255,0.4)`,maxWidth:280,lineHeight:1.4},children:d.message})]}):c?(0,w.jsxs)(`div`,{className:s,children:[(0,w.jsxs)(`style`,{children:[h,r??``]}),(0,w.jsx)(Uh,{onError:a,children:(0,w.jsx)(c,{...t})},e.length)]}):(0,w.jsx)(`div`,{children:i})}function Gh(){return(0,w.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,minHeight:80},children:(0,w.jsx)(Zd,{})})}function Kh({suspended:e=!1,fallback:t}={}){return e?null:(0,w.jsx)(w.Fragment,{children:t??(0,w.jsx)(Gh,{})})}var qh={display:`inline-flex`,alignItems:`center`,gap:4,fontFamily:`var(--ggui-font-family-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)`,fontSize:12,lineHeight:1.2,color:`var(--ggui-color-neutral-500, #6b7280)`},Jh={appearance:`none`,background:`var(--ggui-color-neutral-50, #f9fafb)`,border:`1px solid var(--ggui-color-neutral-200, #e5e7eb)`,borderRadius:`var(--ggui-shape-radius-sm, 4px)`,padding:`2px 8px`,fontFamily:`inherit`,fontSize:`inherit`,color:`var(--ggui-color-neutral-600, #4b5563)`,cursor:`pointer`},Yh={appearance:`none`,background:`transparent`,border:`none`,padding:`2px 4px`,fontFamily:`inherit`,fontSize:`inherit`,color:`var(--ggui-color-neutral-400, #9ca3af)`,cursor:`pointer`},Xh={display:`inline-flex`,alignItems:`center`,gap:4,margin:0},Zh={fontFamily:`inherit`,fontSize:`inherit`,padding:`2px 6px`,minWidth:140,border:`1px solid var(--ggui-color-neutral-200, #e5e7eb)`,borderRadius:`var(--ggui-shape-radius-sm, 4px)`,background:`var(--ggui-color-neutral-50, #ffffff)`,color:`var(--ggui-color-neutral-800, #1f2937)`};function Qh({onUiFeedback:e,sessionId:t,toolName:n}){let[r,i]=(0,S.useState)(`idle`),[a,o]=(0,S.useState)(``),s=(0,S.useCallback)((r,a)=>{if(!e)return;let o=a?.trim();e({verdict:r,...o!==void 0&&o.length>0?{comment:o}:{},...t===void 0?{}:{sessionId:t},...n===void 0?{}:{toolName:n}}),i(`sent`)},[e,t,n]),c=(0,S.useCallback)(e=>{e.preventDefault(),s(`other`,a)},[s,a]);return!e||r===`dismissed`?null:(0,w.jsxs)(`div`,{"data-ggui-ui-feedback":!0,role:`group`,"aria-label":`Share feedback on this UI`,style:qh,children:[r===`sent`?(0,w.jsx)(`span`,{"data-ggui-ui-feedback-thanks":!0,children:`Thanks for the feedback`}):r===`comment`?(0,w.jsxs)(`form`,{onSubmit:c,style:Xh,"data-ggui-ui-feedback-comment-form":!0,children:[(0,w.jsx)(`input`,{type:`text`,value:a,onChange:e=>o(e.target.value),placeholder:`What happened?`,"aria-label":`Feedback comment`,"data-ggui-ui-feedback-comment":!0,style:Zh,autoFocus:!0}),(0,w.jsx)(`button`,{type:`submit`,style:Jh,"data-ggui-ui-feedback-send":!0,children:`Send`})]}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`button`,{type:`button`,style:Jh,"data-ggui-ui-feedback-verdict":`love`,onClick:()=>s(`love`),children:`Love`}),(0,w.jsx)(`button`,{type:`button`,style:Jh,"data-ggui-ui-feedback-verdict":`dislike`,onClick:()=>s(`dislike`),children:`Dislike`}),(0,w.jsx)(`button`,{type:`button`,style:Jh,"data-ggui-ui-feedback-verdict":`other`,onClick:()=>i(`comment`),children:`Other…`})]}),(0,w.jsx)(`button`,{type:`button`,style:Yh,"aria-label":`Dismiss feedback`,"data-ggui-ui-feedback-dismiss":!0,onClick:()=>i(`dismissed`),children:`×`})]})}function $h({render:e,fallback:t,onError:n,cssOverrides:r,themeId:i,onUiFeedback:a,feedbackSessionId:o,feedbackToolName:s}){return!e.componentCode||e.componentCode.length===0?(0,w.jsx)(eg,{children:(0,w.jsx)(Kh,{fallback:t})}):(0,w.jsxs)(eg,{children:[(0,w.jsx)(Wh,{code:e.componentCode,props:e.props,cssOverrides:r,themeId:i,onError:n,fallback:t}),a?(0,w.jsx)(Qh,{onUiFeedback:a,...o===void 0?{}:{sessionId:o},...s===void 0?{}:{toolName:s}}):null]})}function eg({children:e}){return ng()?(0,w.jsx)(w.Fragment,{children:e}):(0,w.jsx)(Uu,{config:tg,children:e})}var tg={app:{appId:`preview`,appName:`preview`},render:{sessionId:`preview`,isConnected:!1},auth:{isAuthenticated:!1},dispatch:()=>{},subscribe:()=>()=>{}};function ng(){try{return Hu()}catch{return null}}new TextDecoder;function $({tone:e,children:t,dot:n=!0}){return(0,w.jsxs)(`span`,{className:`ggui-status ggui-status--${e}`,children:[n?(0,w.jsx)(`span`,{className:`ggui-status__dot`,"aria-hidden":!0}):null,t]})}function rg({blueprintId:e}){let[t,n]=(0,S.useState)({kind:`loading`});return(0,S.useEffect)(()=>{let t=new AbortController;return(async()=>{try{let r=await fetch(`/ggui/console/blueprint/${encodeURIComponent(e)}`,{signal:t.signal,headers:{accept:`application/json`}});if(r.status===404){n({kind:`not-found`});return}if(!r.ok){n({kind:`error`,message:`server returned ${r.status}`});return}let i=await r.json();n({kind:`ready`,blueprint:i})}catch(e){if(t.signal.aborted)return;n({kind:`error`,message:String(e)})}})(),()=>t.abort()},[e]),(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`01 / blueprint`,title:`Manifest-registered surface.`,mute:(0,w.jsx)(w.Fragment,{children:(0,w.jsxs)(`code`,{className:`ggui-code`,children:[`/preview/`,e]})}),intro:(0,w.jsxs)(w.Fragment,{children:[`Reads the bundle via`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`LocalUiRegistry`}),`. Same bytes an agent would get from`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui_render_blueprint`}),`.`]})}),t.kind===`loading`?(0,w.jsx)(sg,{title:`loading`,num:`BPR / 01`,tone:`draft`,children:`Loading blueprint…`}):t.kind===`not-found`?(0,w.jsx)(og,{blueprintId:e}):t.kind===`error`?(0,w.jsxs)(sg,{title:`error`,num:`ERR / 01`,tone:`signal`,children:[`Couldn't load blueprint — `,t.message,`.`]}):(0,w.jsx)(ig,{blueprint:t.blueprint})]})}function ig({blueprint:e}){return(0,w.jsxs)(`section`,{"data-ggui-session-entry":`component`,"data-ggui-code-ready":`true`,"data-ggui-blueprint-id":e.blueprintId,className:`ggui-pane`,children:[(0,w.jsxs)(`div`,{className:`ggui-pane__head`,children:[(0,w.jsxs)(`div`,{className:`ggui-pane__traffic`,"aria-hidden":!0,children:[(0,w.jsx)(`span`,{}),(0,w.jsx)(`span`,{}),(0,w.jsx)(`span`,{})]}),(0,w.jsx)(`span`,{className:`ggui-pane__title`,children:e.blueprintName}),(0,w.jsx)(`span`,{className:`ggui-pane__meta`,children:e.contentType}),(0,w.jsx)(ag,{blueprintId:e.blueprintId})]}),(0,w.jsx)(`div`,{className:`ggui-pane__body`,children:(0,w.jsx)($h,{render:{componentCode:e.code},fallback:(0,w.jsx)(`div`,{"data-ggui-preview-state":`waiting`,className:`ggui-muted`,style:{padding:`16px 0`},children:`Loading component…`})})})]})}function ag({blueprintId:e}){let[t,n]=(0,S.useState)({kind:`idle`}),r=async()=>{n({kind:`pending`});try{let t=await fetch(`/ggui/console/blueprint/${encodeURIComponent(e)}/try`,{method:`POST`,headers:{accept:`application/json`}});if(!t.ok){let e=await t.json().catch(()=>({}));n({kind:`error`,message:e.message??`server returned ${t.status}`});return}n({kind:`ok`})}catch(e){n({kind:`error`,message:String(e)})}};return(0,w.jsxs)(`span`,{className:`ggui-pane__actions`,style:{marginLeft:`auto`},children:[t.kind===`error`?(0,w.jsx)(`span`,{className:`ggui-muted`,"data-ggui-try-live":`error`,title:t.message,style:{marginRight:`8px`,fontSize:`0.75rem`},children:`try-live failed`}):null,t.kind===`ok`?(0,w.jsx)(`span`,{className:`ggui-muted`,"data-ggui-try-live":`ok`,style:{marginRight:`8px`,fontSize:`0.75rem`},children:`try-live ok`}):null,(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,"data-ggui-try-live":t.kind===`pending`?`pending`:`idle`,"data-ggui-blueprint-id":e,disabled:t.kind===`pending`,onClick:()=>{r()},children:t.kind===`pending`?`trying…`:`Try live →`})]})}function og({blueprintId:e}){return(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`not found`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`ERR / 01`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsx)(`h2`,{className:`ggui-h2`,children:`Blueprint not found`}),(0,w.jsxs)(`p`,{className:`ggui-body`,children:[`No blueprint registered with id`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:e}),`. Check`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui.json#blueprints.include`}),` `,`and the blueprint's`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui.ui.json#id`}),`.`]}),(0,w.jsx)(`div`,{children:(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,onClick:()=>E(`/`),children:`back to landing`})})]})]})}function sg({title:e,num:t,tone:n,children:r}){return(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:e}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:t})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsx)(`p`,{className:`ggui-body`,children:(0,w.jsx)($,{tone:n,children:e})}),(0,w.jsx)(`p`,{className:`ggui-muted`,children:r})]})]})}function cg(){let[e,t]=(0,S.useState)({kind:`loading`}),[n,r]=(0,S.useState)({kind:`loading`}),[i,a]=(0,S.useState)(``),[o,s]=(0,S.useState)(!1);(0,S.useEffect)(()=>{let e=new AbortController;return(async()=>{try{let n=await fetch(`/ggui/console/registry`,{signal:e.signal,headers:{accept:`application/json`}});if(!n.ok){t({kind:`error`,message:`server returned ${n.status}`});return}let r=await n.json();t({kind:`ready`,data:r})}catch(n){if(e.signal.aborted)return;t({kind:`error`,message:String(n)})}})(),()=>e.abort()},[]);let c=(0,S.useCallback)(async e=>{r({kind:`loading`});try{let t=await fetch(`/ggui/console/blueprints/cached`,{signal:e,headers:{accept:`application/json`}});if(t.status===501){let e=await t.json().catch(()=>({}));r({kind:`unsupported`,message:e.message??`The configured vector store does not support enumeration.`});return}if(!t.ok){r({kind:`error`,message:`server returned ${t.status}`});return}let n=await t.json();r({kind:`ready`,data:n})}catch(t){if(e?.aborted)return;r({kind:`error`,message:String(t)})}},[]);(0,S.useEffect)(()=>{let e=new AbortController;return c(e.signal),()=>e.abort()},[c]);let l=(0,S.useCallback)(async e=>{try{await fetch(`/ggui/console/blueprints/cached/${encodeURIComponent(e)}`,{method:`DELETE`})}catch(e){r({kind:`error`,message:String(e)});return}await c()},[c]),u=(0,S.useCallback)(async()=>{try{await fetch(`/ggui/console/blueprints/cached/clear`,{method:`POST`})}catch(e){r({kind:`error`,message:String(e)});return}await c()},[c]),d=i.trim().toLowerCase(),f=(0,S.useMemo)(()=>e.kind===`ready`?d.length===0?e.data:{blueprints:e.data.blueprints.filter(e=>[e.id,e.name,e.description??``,e.category??``].join(` `).toLowerCase().includes(d)),primitives:e.data.primitives.filter(e=>[e.name,e.catalog,e.source].join(` `).toLowerCase().includes(d))}:null,[e,d]),p=(0,S.useMemo)(()=>n.kind===`ready`?d.length===0?n.data.entries:n.data.entries.filter(e=>[e.id,e.cachedIntent].join(` `).toLowerCase().includes(d)):null,[n,d]);return(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`01 / blueprints`,title:`What can this server produce without generating?`,mute:`Declared and cached.`,intro:(0,w.jsxs)(w.Fragment,{children:[`Two answers on one screen. `,(0,w.jsx)(`strong`,{children:`Declared`}),` blueprints from `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui.json#blueprints.include`}),`;`,` `,(0,w.jsx)(`strong`,{children:`cached`}),` generations the render path has stored (contract-keyed, written by the blueprint registry on every successful cold-gen).`]})}),e.kind===`loading`||n.kind===`loading`?(0,w.jsx)(_g,{title:`loading`,num:`REG / 01`,tone:`draft`,children:`Loading…`}):e.kind===`error`?(0,w.jsxs)(_g,{title:`error`,num:`ERR / 01`,tone:`signal`,children:[`Couldn't load registry — `,e.message,`.`]}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(`div`,{className:`ggui-form`,style:{marginBottom:20},children:[(0,w.jsx)(`label`,{className:`ggui-label`,htmlFor:`ggui-registry-filter`,children:`filter`}),(0,w.jsx)(`div`,{className:`ggui-field`,children:(0,w.jsx)(`input`,{id:`ggui-registry-filter`,name:`filter`,"aria-label":`filter registry entries`,placeholder:`substring match over id, name, description, intent…`,value:i,onChange:e=>a(e.target.value),autoCapitalize:`off`,autoCorrect:`off`,spellCheck:!1})})]}),(0,w.jsxs)(`div`,{className:`ggui-registry-grid`,children:[(0,w.jsx)(lg,{all:e.data.blueprints,shown:f?.blueprints??e.data.blueprints,filterActive:d.length>0}),(0,w.jsx)(ug,{state:n,shown:p,filterActive:d.length>0,onInvalidate:l,onClearAll:u})]}),(0,w.jsx)(fg,{all:e.data.primitives,shown:f?.primitives??e.data.primitives,filterActive:d.length>0,expanded:o,onToggle:()=>s(e=>!e)})]})]})}function lg({all:e,shown:t,filterActive:n}){return(0,w.jsxs)(`div`,{"data-ggui-registry-list":`blueprints`,className:`ggui-stack`,"aria-label":`declared blueprints`,children:[(0,w.jsxs)(`div`,{className:`ggui-stack__head`,children:[(0,w.jsx)(`span`,{className:`ggui-stack__num`,children:`BPR`}),(0,w.jsx)(`span`,{className:`ggui-stack__label`,children:`declared`}),(0,w.jsxs)(`span`,{className:`ggui-stack__count`,children:[t.length,n&&t.length!==e.length?` / ${e.length}`:``]})]}),e.length===0?(0,w.jsx)(pg,{}):t.length===0?(0,w.jsx)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},children:`No declared blueprints match the filter.`}):(0,w.jsx)(`ul`,{className:`ggui-stack__list`,children:t.map((e,t)=>(0,w.jsxs)(`li`,{"data-ggui-registry-item":`blueprint`,"data-ggui-registry-id":e.id,className:`ggui-stack__entry`,children:[(0,w.jsxs)(`div`,{className:`ggui-stack__entry-head`,children:[(0,w.jsx)(`span`,{className:`ggui-stack__entry-num`,children:`BPR / ${String(t+1).padStart(2,`0`)}`}),(0,w.jsx)(`span`,{className:`ggui-stack__entry-title`,children:e.name}),e.category?(0,w.jsx)($,{tone:`ink`,children:e.category}):null]}),(0,w.jsx)(`div`,{className:`ggui-stack__entry-meta`,children:(0,w.jsx)(`code`,{className:`ggui-code`,children:e.id})}),e.description?(0,w.jsx)(`p`,{className:`ggui-body`,style:{margin:`8px 0 0`},children:e.description}):null,(0,w.jsx)(`div`,{style:{marginTop:12},children:(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,onClick:()=>E(`/preview/${encodeURIComponent(e.id)}`),children:`preview →`})})]},e.id))})]})}function ug({state:e,shown:t,filterActive:n,onInvalidate:r,onClearAll:i}){let a=e.kind===`ready`?e.data.entries:[],o=t??a;return(0,w.jsxs)(`div`,{"data-ggui-cached-list":!0,className:`ggui-stack`,"aria-label":`cached blueprints`,children:[(0,w.jsxs)(`div`,{className:`ggui-stack__head`,children:[(0,w.jsx)(`span`,{className:`ggui-stack__num`,children:`CCH`}),(0,w.jsx)(`span`,{className:`ggui-stack__label`,children:`cached`}),(0,w.jsx)(`span`,{className:`ggui-stack__count`,children:e.kind===`ready`?`${o.length}${n&&o.length!==a.length?` / ${a.length}`:``}`:`—`}),e.kind===`ready`&&a.length>0?(0,w.jsx)(`button`,{type:`button`,"data-ggui-cached-clear-all":!0,className:`ggui-btn ggui-btn--ghost`,style:{marginLeft:`auto`},onClick:()=>{i()},children:`clear all`}):null]}),e.kind===`unsupported`?(0,w.jsx)(hg,{message:e.message}):e.kind===`error`?(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},children:[`Couldn't load cache — `,e.message,`.`]}):a.length===0?(0,w.jsx)(mg,{}):o.length===0?(0,w.jsx)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},children:`No cached entries match the filter.`}):(0,w.jsx)(`ul`,{className:`ggui-stack__list`,children:o.map((e,t)=>(0,w.jsxs)(`li`,{"data-ggui-cached-item":!0,"data-ggui-cached-id":e.id,className:`ggui-stack__entry`,children:[(0,w.jsxs)(`div`,{className:`ggui-stack__entry-head`,children:[(0,w.jsx)(`span`,{className:`ggui-stack__entry-num`,children:`CCH / ${String(t+1).padStart(2,`0`)}`}),(0,w.jsx)(`span`,{className:`ggui-stack__entry-title`,children:e.cachedIntent}),typeof e.hitCount==`number`?(0,w.jsxs)($,{tone:`ink`,children:[`hits `,e.hitCount]}):null]}),(0,w.jsxs)(`div`,{className:`ggui-stack__entry-meta`,children:[(0,w.jsx)(`code`,{className:`ggui-code`,children:e.id}),(0,w.jsxs)(`span`,{style:{marginLeft:12},children:[`cached `,dg(e.cachedAt)]}),e.lastHitAt?(0,w.jsxs)(`span`,{style:{marginLeft:12},children:[`last hit `,dg(e.lastHitAt)]}):null]}),(0,w.jsx)(`div`,{style:{marginTop:12},children:(0,w.jsx)(`button`,{type:`button`,"data-ggui-cached-invalidate":!0,className:`ggui-btn ggui-btn--ghost`,onClick:()=>{r(e.id)},children:`invalidate ✕`})})]},e.id))})]})}function dg(e){if(!e)return`—`;try{let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toISOString().replace(`T`,` `).replace(/\.\d+Z$/,`Z`)}catch{return e}}function fg({all:e,shown:t,filterActive:n,expanded:r,onToggle:i}){return(0,w.jsxs)(`div`,{"data-ggui-registry-list":`primitives`,className:`ggui-card`,"aria-label":`primitives`,style:{marginTop:24},children:[(0,w.jsxs)(`button`,{type:`button`,"data-ggui-primitives-toggle":!0,onClick:i,className:`ggui-card__head`,style:{width:`100%`,background:`transparent`,border:`none`,textAlign:`left`,cursor:`pointer`,font:`inherit`,color:`inherit`},"aria-expanded":r,children:[(0,w.jsxs)(`span`,{className:`ggui-card__title`,children:[r?`▾`:`▸`,` primitives`]}),(0,w.jsxs)(`span`,{className:`ggui-card__num`,children:[t.length,n&&t.length!==e.length?` / ${e.length}`:``,` available — fyi`]})]}),r?e.length===0?(0,w.jsx)(gg,{}):t.length===0?(0,w.jsx)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},children:`No primitives match the filter.`}):(0,w.jsx)(`ul`,{className:`ggui-card__body`,style:{listStyle:`none`,margin:0,padding:`12px 16px`,display:`flex`,flexWrap:`wrap`,gap:`6px 12px`},children:t.map(e=>(0,w.jsxs)(`li`,{"data-ggui-registry-item":`primitive`,"data-ggui-registry-name":e.name,style:{display:`inline-flex`,alignItems:`center`,gap:6},children:[(0,w.jsx)(`code`,{className:`ggui-code`,children:e.name}),(0,w.jsx)($,{tone:e.source===`package`?`ink`:`draft`,children:e.source})]},`${e.catalog}::${e.name}`))}):null]})}function pg(){return(0,w.jsxs)(`div`,{className:`ggui-card__body`,style:{padding:`16px 12px`},children:[(0,w.jsx)(`p`,{className:`ggui-body`,style:{margin:0},children:`No declared blueprints.`}),(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:`8px 0 0`},children:[`Add include globs to`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui.json#blueprints.include`}),` and colocate each UI with a`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui.ui.json`}),`.`]})]})}function mg(){return(0,w.jsxs)(`div`,{className:`ggui-card__body`,style:{padding:`16px 12px`},children:[(0,w.jsx)(`p`,{className:`ggui-body`,style:{margin:0},children:`No cached generations yet.`}),(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:`8px 0 0`},children:[`Generate a UI from `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`/`}),` (the playground) and the result will land here for future cache hits.`]})]})}function hg({message:e}){return(0,w.jsxs)(`div`,{className:`ggui-card__body`,style:{padding:`16px 12px`},children:[(0,w.jsxs)(`p`,{className:`ggui-body`,style:{margin:0},children:[(0,w.jsx)($,{tone:`signal`,children:`unsupported`}),` Vector store doesn't support enumeration.`]}),(0,w.jsx)(`p`,{className:`ggui-muted`,style:{margin:`8px 0 0`},children:e})]})}function gg(){return(0,w.jsxs)(`div`,{className:`ggui-card__body`,style:{padding:`16px 12px`},children:[(0,w.jsx)(`p`,{className:`ggui-body`,style:{margin:0},children:`No primitives declared.`}),(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:`8px 0 0`},children:[`Declare packages or local catalogs in`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui.json#primitives`}),`.`]})]})}function _g({title:e,num:t,tone:n,children:r}){return(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:e}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:t})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsx)(`p`,{className:`ggui-body`,children:(0,w.jsx)($,{tone:n,children:e})}),(0,w.jsx)(`p`,{className:`ggui-muted`,children:r})]})]})}function vg({blueprint:e,height:t,title:n}){let r=typeof e.codeHash==`string`,i=n??e.variance.persona??`variant ${e.blueprintId.slice(0,8)}`;if(!r)return(0,w.jsx)(`div`,{"data-ggui-variant-preview":!0,"data-ggui-variant-preview-id":e.blueprintId,"data-ggui-variant-preview-state":`pending`,className:`ggui-card`,style:{height:t??320,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,w.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,w.jsx)(`p`,{className:`ggui-body`,style:{margin:0},children:(0,w.jsx)($,{tone:`draft`,children:`pending`})}),(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:`8px 0 0`},children:[`This variant has no code yet — the next render against the same contract will gen against`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:e.blueprintId}),`.`]})]})});let a=`/preview/${encodeURIComponent(e.blueprintId)}`;return(0,w.jsxs)(`div`,{"data-ggui-variant-preview":!0,"data-ggui-variant-preview-id":e.blueprintId,"data-ggui-variant-preview-state":`ready`,className:`ggui-pane`,children:[(0,w.jsxs)(`div`,{className:`ggui-pane__head`,children:[(0,w.jsxs)(`div`,{className:`ggui-pane__traffic`,"aria-hidden":!0,children:[(0,w.jsx)(`span`,{}),(0,w.jsx)(`span`,{}),(0,w.jsx)(`span`,{})]}),(0,w.jsx)(`span`,{className:`ggui-pane__title`,children:i}),(0,w.jsx)(`span`,{className:`ggui-pane__meta`,children:(0,w.jsxs)(`code`,{className:`ggui-code`,children:[e.codeHash?.slice(0,12),`…`]})})]}),(0,w.jsx)(`div`,{className:`ggui-pane__body`,style:{padding:0},children:(0,w.jsx)(`iframe`,{src:a,title:`Preview of ${i}`,sandbox:`allow-scripts allow-same-origin`,style:{width:`100%`,height:t??320,border:`none`,display:`block`}})})]})}function yg({blueprints:e,height:t}){return(0,w.jsx)(`div`,{"data-ggui-variant-comparison":!0,"data-ggui-variant-comparison-count":e.length,style:{display:`grid`,gridTemplateColumns:`repeat(${Math.max(e.length,1)}, minmax(0, 1fr))`,gap:16},children:e.map(e=>(0,w.jsx)(vg,{blueprint:e,height:t,title:e.variance.persona??e.blueprintId.slice(0,12)},e.blueprintId))})}var bg=[`ui-gen-default-haiku-4-5`,`ui-gen-advanced-opus-4-7`],xg=.8,Sg={persona:``,generator:``,draftsOnly:!1};function Cg({filters:e,onChange:t,generatorSlugs:n}){let r=n??bg;return(0,w.jsxs)(`form`,{"data-ggui-variants-filter-bar":!0,className:`ggui-form`,onSubmit:e=>e.preventDefault(),style:{display:`flex`,flexWrap:`wrap`,gap:16,alignItems:`flex-end`,marginBottom:20},children:[(0,w.jsxs)(`div`,{className:`ggui-field`,style:{flex:1,minWidth:200},children:[(0,w.jsx)(`label`,{className:`ggui-label`,htmlFor:`ggui-variants-filter-persona`,children:`persona`}),(0,w.jsx)(`input`,{id:`ggui-variants-filter-persona`,"data-ggui-variants-filter-persona":!0,"aria-label":`filter by persona`,placeholder:`e.g. minimalist, data-dense`,value:e.persona,onChange:n=>{t({...e,persona:n.target.value})},autoCapitalize:`off`,autoCorrect:`off`,spellCheck:!1})]}),(0,w.jsxs)(`div`,{className:`ggui-field`,style:{minWidth:220},children:[(0,w.jsx)(`label`,{className:`ggui-label`,htmlFor:`ggui-variants-filter-generator`,children:`generator`}),(0,w.jsxs)(`select`,{id:`ggui-variants-filter-generator`,"data-ggui-variants-filter-generator":!0,"aria-label":`filter by generator`,value:e.generator,onChange:n=>{t({...e,generator:n.target.value})},children:[(0,w.jsx)(`option`,{value:``,children:`any`}),r.map(e=>(0,w.jsx)(`option`,{value:e,children:e},e))]})]}),(0,w.jsxs)(`label`,{className:`ggui-field`,htmlFor:`ggui-variants-filter-drafts-only`,style:{display:`flex`,alignItems:`center`,gap:6,cursor:`pointer`},children:[(0,w.jsx)(`input`,{id:`ggui-variants-filter-drafts-only`,"data-ggui-variants-filter-drafts-only":!0,type:`checkbox`,"aria-label":`show drafts only`,checked:e.draftsOnly,onChange:n=>{t({...e,draftsOnly:n.target.checked})}}),(0,w.jsxs)(`span`,{className:`ggui-label`,style:{margin:0},children:[`drafts only (score < `,xg.toFixed(2),`)`]})]})]})}function wg(e,t){let n=t.persona.trim().toLowerCase();return!(n.length>0&&!(e.variance.persona?.toLowerCase()??``).includes(n)||t.generator.length>0&&(e.source.kind!==`llm`||e.source.generator!==t.generator)||t.draftsOnly&&(e.validatorScore===void 0||e.validatorScore>=.8))}function Tg(e){return e>=.8?`live`:e>=.5?`draft`:`signal`}function Eg(e){return e.kind===`llm`?e.generator:e.kind}function Dg({blueprint:e,index:t,onPreview:n,onSetDefault:r,onDelete:i,compareSelected:a,onCompareToggle:o}){let s=e.isOperatorDefault===!0,c=e.variance.persona,l=e.validatorScore;return(0,w.jsxs)(`li`,{"data-ggui-variant-card":!0,"data-ggui-variant-id":e.blueprintId,"data-ggui-variant-default":s?`true`:`false`,"data-ggui-variant-compare-selected":a?`true`:`false`,className:`ggui-stack__entry`,style:a?{outline:`2px solid var(--ggui-ink, #292929)`}:void 0,children:[(0,w.jsxs)(`div`,{className:`ggui-stack__entry-head`,children:[(0,w.jsx)(`span`,{className:`ggui-stack__entry-num`,children:`VAR / ${String(t+1).padStart(2,`0`)}`}),(0,w.jsxs)(`span`,{className:`ggui-stack__entry-title`,children:[s?(0,w.jsx)(`span`,{"aria-label":`operator default`,children:`★ `}):null,c&&c.length>0?c:`(no persona)`]}),c?(0,w.jsxs)($,{tone:`ink`,children:[`persona: `,c]}):null,(0,w.jsx)($,{tone:`ink`,children:Eg(e.source)}),typeof l==`number`?(0,w.jsxs)($,{tone:Tg(l),children:[`score `,l.toFixed(2)]}):null,(0,w.jsxs)($,{tone:e.createdBy===`operator`?`live`:`draft`,children:[`by `,e.createdBy]})]}),(0,w.jsxs)(`div`,{className:`ggui-stack__entry-meta`,children:[(0,w.jsx)(`code`,{className:`ggui-code`,children:e.blueprintId}),(0,w.jsxs)(`span`,{style:{marginLeft:12},children:[`created `,Og(e.createdAt)]}),e.codeHash?(0,w.jsxs)(`span`,{style:{marginLeft:12},children:[`hash `,(0,w.jsx)(`code`,{className:`ggui-code`,children:kg(e.codeHash)})]}):(0,w.jsx)(`span`,{style:{marginLeft:12},children:(0,w.jsx)($,{tone:`signal`,children:`no code`})})]}),e.variance.seedPrompt?(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:`8px 0 0`,fontStyle:`italic`},children:[`“`,e.variance.seedPrompt,`”`]}):null,(0,w.jsxs)(`div`,{style:{display:`flex`,gap:8,marginTop:12,flexWrap:`wrap`},children:[(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,"data-ggui-variant-action":`preview`,onClick:()=>n(e.blueprintId),children:`preview →`}),(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,"data-ggui-variant-action":`set-default`,disabled:s,onClick:()=>r(e.blueprintId),title:s?`Already the operator default for this contract`:`Pin as the operator default for this contract`,children:s?`★ default`:`set as default`}),o?(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,"data-ggui-variant-action":`compare-toggle`,onClick:()=>o(e.blueprintId),children:a?`✓ in compare`:`add to compare`}):null,(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,"data-ggui-variant-action":`delete`,onClick:()=>i(e.blueprintId),children:`delete ✕`})]})]})}function Og(e){if(!e)return`—`;try{let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toISOString().replace(`T`,` `).replace(/\.\d+Z$/,`Z`)}catch{return e}}function kg(e){return e.length<=12?e:`${e.slice(0,8)}…${e.slice(-4)}`}var Ag=class extends Error{code;status;constructor(e,t,n){super(e),this.name=`OpsCallError`,this.code=t,n!==void 0&&(this.status=n)}},jg=1;async function Mg(e){if((e.headers.get(`content-type`)??``).includes(`text/event-stream`)){let t=await e.text(),n=/^data:\s*(.+)$/m.exec(t);if(!n||!n[1])throw new Ag(`Malformed SSE response from /control — no data line`,-32700,e.status);return JSON.parse(n[1])}return await e.json()}async function Ng(e,t,n){let r=jg++,i={method:`POST`,headers:{"content-type":`application/json`,accept:`application/json, text/event-stream`},body:JSON.stringify({jsonrpc:`2.0`,id:r,method:`tools/call`,params:{name:e,arguments:t}})};n!==void 0&&(i.signal=n);let a=await fetch(`/control`,i);if(!a.ok&&a.status!==200){let e=await a.text().catch(()=>``);throw new Ag(`/control returned HTTP ${a.status}${e?` — ${e}`:``}`,-32e3,a.status)}let o=await Mg(a);if(`error`in o)throw new Ag(o.error.message,o.error.code);let s=o.result;if(s.isError)throw new Ag(s.content?.[0]?.text??`tool reported error`,-32e3);if(s.structuredContent!==void 0)return s.structuredContent;let c=s.content?.[0]?.text;if(typeof c==`string`&&c.length>0)return JSON.parse(c);throw new Ag(`tool ${e} returned empty result`,-32e3)}function Pg(e,t){return Ng(`ggui_ops_generate_blueprint`,{...e,confirm:!0},t)}function Fg(e,t){return Ng(`ggui_ops_list_blueprints`,e,t)}function Ig(e,t){return Ng(`ggui_ops_update_blueprint`,{...e,confirm:!0},t)}function Lg(e,t){return Ng(`ggui_ops_delete_blueprint`,{...e,confirm:!0},t)}function Rg({contractHash:e}){let[t,n]=(0,S.useState)({kind:`loading`}),[r,i]=(0,S.useState)([]),[a,o]=(0,S.useState)(!1),s=(0,S.useCallback)(async t=>{n({kind:`loading`});try{let r=await Fg({contractHash:e},t);n({kind:`ready`,blueprints:r.blueprints})}catch(e){if(t?.aborted)return;let r=e instanceof Ag||e instanceof Error?e.message:String(e);n({kind:`error`,message:r})}},[e]);(0,S.useEffect)(()=>{let e=new AbortController;return s(e.signal),()=>e.abort()},[s]);let c=(0,S.useMemo)(()=>t.kind===`ready`?[...t.blueprints].sort((e,t)=>{let n=+(e.isOperatorDefault===!0),r=+(t.isOperatorDefault===!0);if(n!==r)return r-n;let i=e.validatorScore??-1,a=t.validatorScore??-1;return i===a?t.createdAt.localeCompare(e.createdAt):a-i}):[],[t]),l=c[0]?.contract,u=(0,S.useMemo)(()=>a?c.filter(e=>r.includes(e.blueprintId)):[],[c,r,a]),d=(0,S.useCallback)(e=>{E(`/preview/${encodeURIComponent(e)}`)},[]),f=(0,S.useCallback)(async e=>{try{await Ig({blueprintId:e,isOperatorDefault:!0}),await s()}catch(e){let t=e instanceof Ag||e instanceof Error?e.message:String(e);n({kind:`error`,message:t})}},[s]),p=(0,S.useCallback)(async e=>{try{await Lg({blueprintId:e}),i(t=>t.filter(t=>t!==e)),await s()}catch(e){let t=e instanceof Ag||e instanceof Error?e.message:String(e);n({kind:`error`,message:t})}},[s]),m=(0,S.useCallback)(e=>{i(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},[]);return(0,w.jsxs)(`section`,{className:`ggui-section`,"data-ggui-variant-detail":!0,"data-ggui-variant-detail-hash":e,children:[(0,w.jsx)(T,{num:`01 / contract`,title:`One contract — many variants.`,mute:`hash ${e.slice(0,16)}…`,intro:(0,w.jsxs)(w.Fragment,{children:[`Every variant the server has for this contract, grouped under the canonical`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`contractHash`}),`. Pick two with the "add to compare" toggle, hit Compare selected, and read aesthetics side-by-side.`]})}),(0,w.jsxs)(`div`,{style:{marginBottom:16},children:[(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,onClick:()=>E(`/admin/variants`),children:`← all variants`}),` `,(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn`,"data-ggui-variant-detail-generate":!0,onClick:()=>E(`/admin/variants/${encodeURIComponent(e)}/generate`),children:`generate new variant +`})]}),t.kind===`error`?(0,w.jsxs)(`div`,{className:`ggui-card`,style:{marginBottom:20},children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`error`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`ERR / 01`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsxs)(`p`,{className:`ggui-body`,children:[(0,w.jsx)($,{tone:`signal`,children:`error`}),` Couldn't load variants — `,t.message,`.`]}),(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,onClick:()=>{s()},children:`retry →`})]})]}):null,l?(0,w.jsxs)(`div`,{className:`ggui-card`,style:{marginBottom:20},children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`contract`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`CTR / 01`})]}),(0,w.jsx)(`div`,{className:`ggui-card__body`,children:(0,w.jsx)(`pre`,{"data-ggui-variant-detail-contract":!0,className:`ggui-code`,style:{whiteSpace:`pre-wrap`,wordBreak:`break-word`,maxHeight:280,overflow:`auto`,padding:12,background:`var(--ggui-paper2, #ebe9e1)`,borderRadius:4,margin:0,fontSize:`0.75rem`},children:JSON.stringify(l,null,2)})})]}):null,t.kind===`loading`?(0,w.jsx)(`p`,{className:`ggui-body`,children:`Loading variants…`}):c.length===0?(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`empty`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`VAR / 00`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsx)(`p`,{className:`ggui-body`,children:`No variants registered for this contract.`}),(0,w.jsx)(`p`,{className:`ggui-muted`,children:`Click "generate new variant" above to author the first one.`})]})]}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(`div`,{"data-ggui-variant-compare-controls":!0,style:{display:`flex`,gap:12,alignItems:`center`,marginBottom:16},children:[(0,w.jsxs)($,{tone:`ink`,children:[r.length,` selected`]}),(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn`,"data-ggui-variant-compare-run":!0,disabled:r.length<2,onClick:()=>o(!0),children:`compare selected →`}),a?(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,"data-ggui-variant-compare-clear":!0,onClick:()=>{o(!1),i([])},children:`exit compare`}):null]}),a&&u.length>=2?(0,w.jsx)(`div`,{"data-ggui-variant-compare-set":u.length,style:{marginBottom:24},children:(0,w.jsx)(yg,{blueprints:u,height:420})}):(0,w.jsx)(`div`,{className:`ggui-stack`,style:{marginBottom:24},"aria-label":`variants and preview`,children:c.map((e,t)=>(0,w.jsxs)(`article`,{"data-ggui-variant-detail-row":!0,"data-ggui-variant-detail-row-id":e.blueprintId,style:{display:`grid`,gridTemplateColumns:`minmax(0, 1fr) minmax(0, 1fr)`,gap:16,padding:12,borderBottom:`1px solid var(--ggui-line2, #d6d4cb)`},children:[(0,w.jsx)(`ul`,{className:`ggui-stack__list`,style:{listStyle:`none`,margin:0,padding:0},children:(0,w.jsx)(Dg,{blueprint:e,index:t,onPreview:d,onSetDefault:e=>{f(e)},onDelete:e=>{p(e)},compareSelected:r.includes(e.blueprintId),onCompareToggle:m})}),(0,w.jsx)(vg,{blueprint:e,height:240})]},e.blueprintId))})]})]})}function zg({contract:e,contractHash:t,onSubmit:n,onCancel:r,generatorSlugs:i}){let[a,o]=(0,S.useState)(``),[s,c]=(0,S.useState)(``),[l,u]=(0,S.useState)(``),[d,f]=(0,S.useState)(``),[p,m]=(0,S.useState)(!1),[h,g]=(0,S.useState)({kind:`idle`}),_=async t=>{t.preventDefault();let r;if(d.trim().length>0)try{let e=JSON.parse(d);if(typeof e!=`object`||!e||Array.isArray(e)){g({kind:`error`,message:`context must be a JSON object (e.g. {"foo": "bar"})`});return}r=e}catch(e){g({kind:`error`,message:`context JSON parse failed — ${e instanceof Error?e.message:String(e)}`});return}g({kind:`pending`});let i={contract:e,...l.length>0?{generator:l}:{},...a.trim().length>0?{persona:a.trim()}:{},...r===void 0?{}:{context:r},...s.trim().length>0?{seedPrompt:s.trim()}:{},...p?{setAsOperatorDefault:!0}:{}};try{let e=await n(i);`error`in e&&g({kind:`error`,message:e.error})}catch(e){g({kind:`error`,message:e instanceof Error?e.message:String(e)})}},v=i??bg;return(0,w.jsxs)(`form`,{"data-ggui-variant-generate-form":!0,"data-ggui-variant-generate-state":h.kind,className:`ggui-form`,onSubmit:_,children:[(0,w.jsxs)(Bg,{title:`contract`,num:`GEN / 01`,children:[(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:`0 0 8px`},children:[`Contract hash`,` `,(0,w.jsxs)(`code`,{className:`ggui-code`,children:[t.slice(0,16),`…`]}),` `,`— read-only; create variants for the same contract here.`]}),(0,w.jsx)(`pre`,{className:`ggui-code`,style:{whiteSpace:`pre-wrap`,wordBreak:`break-word`,maxHeight:200,overflow:`auto`,padding:12,background:`var(--ggui-paper2, #ebe9e1)`,borderRadius:4,margin:0,fontSize:`0.75rem`},children:JSON.stringify(e,null,2)})]}),(0,w.jsxs)(Bg,{title:`variance`,num:`GEN / 02`,children:[(0,w.jsxs)(`div`,{className:`ggui-field`,children:[(0,w.jsx)(`label`,{className:`ggui-label`,htmlFor:`ggui-gen-persona`,children:`persona`}),(0,w.jsx)(`input`,{id:`ggui-gen-persona`,name:`persona`,"data-ggui-variant-generate-persona":!0,placeholder:`e.g. minimalist, data-dense, mobile-first`,value:a,onChange:e=>o(e.target.value),autoCapitalize:`off`,autoCorrect:`off`,spellCheck:!1})]}),(0,w.jsxs)(`div`,{className:`ggui-field`,children:[(0,w.jsx)(`label`,{className:`ggui-label`,htmlFor:`ggui-gen-seed`,children:`seed prompt`}),(0,w.jsx)(`textarea`,{id:`ggui-gen-seed`,name:`seedPrompt`,"data-ggui-variant-generate-seed":!0,placeholder:`e.g. use a glassy card with rounded corners…`,value:s,onChange:e=>c(e.target.value),rows:3})]}),(0,w.jsxs)(`div`,{className:`ggui-field`,children:[(0,w.jsx)(`label`,{className:`ggui-label`,htmlFor:`ggui-gen-context`,children:`context (JSON object, optional)`}),(0,w.jsx)(`textarea`,{id:`ggui-gen-context`,name:`context`,"data-ggui-variant-generate-context":!0,placeholder:`{"locale": "en", "density": "compact"}`,value:d,onChange:e=>f(e.target.value),rows:3,spellCheck:!1,style:{fontFamily:`var(--ggui-font-mono, monospace)`}})]})]}),(0,w.jsxs)(Bg,{title:`dispatch`,num:`GEN / 03`,children:[(0,w.jsxs)(`div`,{className:`ggui-field`,children:[(0,w.jsx)(`label`,{className:`ggui-label`,htmlFor:`ggui-gen-generator`,children:`generator`}),(0,w.jsxs)(`select`,{id:`ggui-gen-generator`,name:`generator`,"data-ggui-variant-generate-generator":!0,value:l,onChange:e=>u(e.target.value),children:[(0,w.jsx)(`option`,{value:``,children:`(registry default)`}),v.map(e=>(0,w.jsx)(`option`,{value:e,children:e},e))]})]}),(0,w.jsxs)(`label`,{className:`ggui-field`,htmlFor:`ggui-gen-set-default`,style:{display:`flex`,alignItems:`center`,gap:6,cursor:`pointer`},children:[(0,w.jsx)(`input`,{id:`ggui-gen-set-default`,"data-ggui-variant-generate-set-default":!0,type:`checkbox`,checked:p,onChange:e=>m(e.target.checked)}),(0,w.jsx)(`span`,{className:`ggui-label`,style:{margin:0},children:`pin as operator default for this contract`})]})]}),h.kind===`error`?(0,w.jsxs)(`p`,{className:`ggui-body`,children:[(0,w.jsx)($,{tone:`signal`,children:`error`}),` `,h.message]}):null,(0,w.jsxs)(`div`,{style:{display:`flex`,gap:12,marginTop:16},children:[(0,w.jsx)(`button`,{type:`submit`,className:`ggui-btn`,"data-ggui-variant-generate-submit":!0,disabled:h.kind===`pending`,children:h.kind===`pending`?`generating…`:`generate →`}),r?(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,onClick:r,disabled:h.kind===`pending`,children:`cancel`}):null]})]})}function Bg({title:e,num:t,children:n}){return(0,w.jsxs)(`div`,{className:`ggui-card`,style:{marginBottom:16},children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:e}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:t})]}),(0,w.jsx)(`div`,{className:`ggui-card__body`,children:n})]})}function Vg({contractHash:e}){let[t,n]=(0,S.useState)({kind:`loading`});return(0,S.useEffect)(()=>{let t=new AbortController;return(async()=>{try{let r=await Fg({contractHash:e},t.signal);if(t.signal.aborted)return;if(r.blueprints.length===0){n({kind:`empty`});return}let i=r.blueprints[0];n({kind:`ready`,contract:i.contract,variantCount:r.blueprints.length})}catch(e){if(t.signal.aborted)return;let r=e instanceof Ag||e instanceof Error?e.message:String(e);n({kind:`error`,message:r})}})(),()=>t.abort()},[e]),(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`01 / generate`,title:`Author a new variant.`,mute:`hash ${e.slice(0,16)}…`,intro:(0,w.jsxs)(w.Fragment,{children:[`Forks the contract from an existing variant in this group and dispatches it through`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui_ops_generate_blueprint`}),` `,`with your persona + context + seed prompt. The new blueprint persists under the same`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`contractHash`}),`.`]})}),(0,w.jsx)(`div`,{style:{marginBottom:16},children:(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,onClick:()=>E(`/admin/variants/${encodeURIComponent(e)}`),children:`← contract detail`})}),t.kind===`loading`?(0,w.jsx)(`p`,{className:`ggui-body`,children:`Loading contract…`}):t.kind===`error`?(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`error`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`ERR / 01`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsxs)(`p`,{className:`ggui-body`,children:[(0,w.jsx)($,{tone:`signal`,children:`error`}),` `,`Couldn't load contract — `,t.message,`.`]}),(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,onClick:()=>E(`/admin/variants`),children:`← all variants`})]})]}):t.kind===`empty`?(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`empty`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`VAR / 00`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsxs)(`p`,{className:`ggui-body`,children:[`No variant exists for hash`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:e}),` yet.`]}),(0,w.jsx)(`p`,{className:`ggui-muted`,children:`The generate form needs an existing variant to fork the contract from. Either trigger a render from an agent first (which will mint the initial variant), or navigate back and pick a contract with at least one variant.`}),(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,onClick:()=>E(`/admin/variants`),children:`← all variants`})]})]}):(0,w.jsx)(zg,{contract:t.contract,contractHash:e,onSubmit:async e=>{try{let t=await Pg(e);return E(`/preview/${encodeURIComponent(t.blueprintId)}`),{blueprintId:t.blueprintId}}catch(e){return{error:e instanceof Ag||e instanceof Error?e.message:String(e)}}},onCancel:()=>E(`/admin/variants/${encodeURIComponent(e)}`)})]})}function Hg(e){let t=new Map;for(let n of e){let e=t.get(n.contractHash);e?e.push(n):t.set(n.contractHash,[n])}return Array.from(t.entries()).map(([e,t])=>{let n=[...t].sort((e,t)=>{let n=+(e.isOperatorDefault===!0),r=+(t.isOperatorDefault===!0);if(n!==r)return r-n;let i=e.validatorScore??-1,a=t.validatorScore??-1;return i===a?t.createdAt.localeCompare(e.createdAt):a-i}),r=n[0];return{contractHash:e,intent:r!==void 0&&typeof r.contract==`object`&&r.contract!==null&&`intent`in r.contract&&typeof r.contract.intent==`string`?r.contract.intent:`(contract ${e.slice(0,10)}…)`,blueprints:n}}).sort((e,t)=>{let n=e.blueprints[0]?.createdAt??``;return(t.blueprints[0]?.createdAt??``).localeCompare(n)})}function Ug({blueprints:e,filters:t,onPreview:n,onSetDefault:r,onDelete:i,onOpenContract:a,onGenerate:o}){let s=(0,S.useMemo)(()=>Hg(e),[e]);return e.length===0?(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`empty`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`VAR / 00`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsx)(`p`,{className:`ggui-body`,style:{margin:0},children:`No blueprints for this app yet.`}),(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:`8px 0 0`},children:[`Generate one via the per-contract page, or wait for an agent to render a contract through`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui_handshake`}),`.`]})]})]}):(0,w.jsx)(`div`,{"data-ggui-variants-list":!0,"aria-label":`blueprint variants`,children:s.map(e=>(0,w.jsx)(Wg,{group:e,filters:t,onPreview:n,onSetDefault:r,onDelete:i,onOpenContract:a,onGenerate:o},e.contractHash))})}function Wg({group:e,filters:t,onPreview:n,onSetDefault:r,onDelete:i,onOpenContract:a,onGenerate:o}){let[s,c]=(0,S.useState)(!0),l=e.blueprints.filter(e=>wg(e,t));return(0,w.jsxs)(`section`,{"data-ggui-variants-group":!0,"data-ggui-variants-group-hash":e.contractHash,"data-ggui-variants-group-count":l.length,className:`ggui-stack`,style:{marginBottom:24},children:[(0,w.jsxs)(`header`,{className:`ggui-stack__head`,style:{alignItems:`center`,gap:12},children:[(0,w.jsxs)(`button`,{type:`button`,"aria-expanded":s,"data-ggui-variants-group-toggle":!0,onClick:()=>c(e=>!e),className:`ggui-stack__num`,style:{background:`transparent`,border:`none`,font:`inherit`,cursor:`pointer`,color:`inherit`,padding:0},children:[s?`▾`:`▸`,` VAR`]}),(0,w.jsx)(`span`,{className:`ggui-stack__label`,children:e.intent}),(0,w.jsxs)($,{tone:`ink`,children:[l.length,l.length===e.blueprints.length?``:` / ${e.blueprints.length}`,` `,`variant`,l.length===1?``:`s`]}),(0,w.jsxs)(`code`,{className:`ggui-code`,style:{marginLeft:`auto`,fontSize:`0.75rem`},children:[e.contractHash.slice(0,16),`…`]}),(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,"data-ggui-variants-group-open":!0,onClick:()=>a(e.contractHash),children:`open →`}),(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,"data-ggui-variants-group-generate":!0,onClick:()=>o(e.contractHash),children:`generate variant +`})]}),s?l.length===0?(0,w.jsx)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},children:`No variants in this group match the active filters.`}):(0,w.jsx)(`ul`,{className:`ggui-stack__list`,children:l.map((e,t)=>(0,w.jsx)(Dg,{blueprint:e,index:t,onPreview:n,onSetDefault:r,onDelete:i},e.blueprintId))}):null]})}function Gg(){let[e,t]=(0,S.useState)({kind:`loading`}),[n,r]=(0,S.useState)(Sg),i=(0,S.useCallback)(async e=>{t({kind:`loading`});try{let n=await Fg({},e);t({kind:`ready`,blueprints:n.blueprints})}catch(n){if(e?.aborted)return;let r=n instanceof Ag||n instanceof Error?n.message:String(n);t({kind:`error`,message:r})}},[]);(0,S.useEffect)(()=>{let e=new AbortController;return i(e.signal),()=>e.abort()},[i]);let a=(0,S.useCallback)(e=>{E(`/preview/${encodeURIComponent(e)}`)},[]),o=(0,S.useCallback)(async e=>{try{await Ig({blueprintId:e,isOperatorDefault:!0}),await i()}catch(e){let n=e instanceof Ag||e instanceof Error?e.message:String(e);t({kind:`error`,message:n})}},[i]),s=(0,S.useCallback)(async e=>{try{await Lg({blueprintId:e}),await i()}catch(e){let n=e instanceof Ag||e instanceof Error?e.message:String(e);t({kind:`error`,message:n})}},[i]),c=(0,S.useCallback)(e=>{E(`/admin/variants/${encodeURIComponent(e)}`)},[]),l=(0,S.useCallback)(e=>{E(`/admin/variants/${encodeURIComponent(e)}/generate`)},[]);return(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`01 / variants`,title:`Blueprint variants — N codes per contract.`,mute:`Operator-pinned defaults · validatorScore · personas.`,intro:(0,w.jsx)(w.Fragment,{children:`Every blueprint variant the server has for the current app, grouped by the contract they implement. The matcher picks among siblings in a group at handshake time — pin one as the operator default to fix the floor, or seed personas for the LLM selector (MVB-6) to choose from.`})}),e.kind===`error`?(0,w.jsxs)(`div`,{className:`ggui-card`,style:{marginBottom:20},children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`error`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`ERR / 01`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsxs)(`p`,{className:`ggui-body`,children:[(0,w.jsx)($,{tone:`signal`,children:`error`}),` Couldn't load variants — `,e.message,`.`]}),(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,onClick:()=>{i()},children:`retry →`})]})]}):null,(0,w.jsx)(Cg,{filters:n,onChange:r}),e.kind===`loading`?(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`loading`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`VAR / 01`})]}),(0,w.jsx)(`div`,{className:`ggui-card__body`,children:(0,w.jsx)(`p`,{className:`ggui-body`,children:`Loading variants…`})})]}):e.kind===`ready`?(0,w.jsx)(Ug,{blueprints:e.blueprints,filters:n,onPreview:a,onSetDefault:e=>{o(e)},onDelete:e=>{s(e)},onOpenContract:c,onGenerate:l}):null]})}function Kg(){let[e,t]=(0,S.useState)({kind:`loading`}),[n,r]=(0,S.useState)(null),[i,a]=(0,S.useState)(null),o=async()=>{t({kind:`loading`});try{let e=await fetch(`/ggui/console/oauth-clients`,{headers:{accept:`application/json`}});if(!e.ok){if(e.status===404){t({kind:`error`,message:"OAuth not enabled on this server — re-run `ggui serve --oauth` to mount the management routes."});return}t({kind:`error`,message:`server returned ${e.status}`});return}let n=await e.json();t({kind:`ready`,data:n})}catch(e){t({kind:`error`,message:String(e)})}};(0,S.useEffect)(()=>{o()},[]);let s=async e=>{r(e);try{let n=await fetch(`/ggui/console/oauth-clients/${encodeURIComponent(e)}`,{method:`DELETE`});if(n.status!==204){t({kind:`error`,message:`revoke failed — server returned ${n.status}`});return}a(null),await o()}catch(e){t({kind:`error`,message:`revoke failed — ${String(e)}`})}finally{r(null)}};return(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`01 / clients`,title:`Connected apps.`,mute:`OAuth clients that have registered against this server.`,intro:(0,w.jsxs)(w.Fragment,{children:[`Each row is an OAuth client (typically an MCP custom-connector host like claude.ai) that completed`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`/oauth/register`}),` against this server. Revoke removes the registration so future re-discovery fails — Phase 1 caveat:`,` `,(0,w.jsx)(`strong`,{children:`existing bearers keep working`}),` until they expire or you re-pair.`]})}),e.kind===`loading`?(0,w.jsx)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},children:`Loading clients…`}):e.kind===`error`?(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},"data-ggui-clients-error":!0,children:[`Couldn't load clients — `,e.message]}):(0,w.jsx)(qg,{clients:e.data.clients,revokingId:n,pendingConfirm:i,onRevokeRequest:e=>a(e),onRevokeCancel:()=>a(null),onRevokeConfirm:e=>{s(e)},onRefresh:()=>{o()}})]})}function qg({clients:e,revokingId:t,pendingConfirm:n,onRevokeRequest:r,onRevokeCancel:i,onRevokeConfirm:a,onRefresh:o}){return e.length===0?(0,w.jsxs)(`div`,{className:`ggui-stack`,"data-ggui-clients-list":!0,"aria-label":`connected apps (empty)`,children:[(0,w.jsxs)(`div`,{className:`ggui-stack__head`,children:[(0,w.jsx)(`span`,{className:`ggui-stack__num`,children:`CON`}),(0,w.jsx)(`span`,{className:`ggui-stack__label`,children:`connected apps`}),(0,w.jsx)(`span`,{className:`ggui-stack__count`,children:`0`})]}),(0,w.jsx)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},children:`No clients have registered yet. Add this server as a custom connector in claude.ai (or another MCP host) — its OAuth flow will register a client here.`})]}):(0,w.jsxs)(`div`,{"data-ggui-clients-list":!0,className:`ggui-stack`,"aria-label":`connected apps`,children:[(0,w.jsxs)(`div`,{className:`ggui-stack__head`,children:[(0,w.jsx)(`span`,{className:`ggui-stack__num`,children:`CON`}),(0,w.jsx)(`span`,{className:`ggui-stack__label`,children:`connected apps`}),(0,w.jsx)(`span`,{className:`ggui-stack__count`,children:e.length}),(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,onClick:o,style:{marginLeft:`auto`},children:`refresh`})]}),(0,w.jsx)(`ul`,{className:`ggui-stack__list`,children:e.map((e,o)=>(0,w.jsx)(Jg,{client:e,index:o+1,isRevoking:t===e.clientId,isPendingConfirm:n===e.clientId,onRevokeRequest:r,onRevokeCancel:i,onRevokeConfirm:a},e.clientId))})]})}function Jg({client:e,index:t,isRevoking:n,isPendingConfirm:r,onRevokeRequest:i,onRevokeCancel:a,onRevokeConfirm:o}){let s=e.clientId.slice(0,12),c=e.clientName??s;return(0,w.jsxs)(`li`,{"data-ggui-client-id":e.clientId,className:`ggui-stack__entry`,style:{opacity:n?.5:1},children:[(0,w.jsxs)(`div`,{className:`ggui-stack__entry-head`,children:[(0,w.jsx)(`span`,{className:`ggui-stack__entry-num`,children:`CON / ${String(t).padStart(2,`0`)}`}),(0,w.jsx)(`span`,{className:`ggui-stack__entry-title`,children:c})]}),(0,w.jsxs)(`div`,{className:`ggui-stack__entry-meta`,children:[(0,w.jsxs)(`span`,{children:[`id `,(0,w.jsxs)(`code`,{className:`ggui-code`,children:[s,`…`]})]}),(0,w.jsxs)(`span`,{style:{marginLeft:12},children:[`registered`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:Yg(e.createdAt)})]})]}),e.redirectUris.length>0?(0,w.jsx)(`div`,{className:`ggui-stack__entry-meta`,style:{marginTop:4},children:(0,w.jsxs)(`span`,{children:[`redirect`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:e.redirectUris[0]}),e.redirectUris.length>1?` (+${e.redirectUris.length-1} more)`:``]})}):null,(0,w.jsx)(`div`,{style:{marginTop:12,display:`flex`,gap:10,alignItems:`center`},children:r?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn`,"data-ggui-client-revoke":!0,disabled:n,onClick:()=>o(e.clientId),children:n?`revoking…`:`confirm revoke`}),(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,disabled:n,onClick:a,children:`cancel`})]}):(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,"data-ggui-client-revoke":!0,disabled:n,onClick:()=>i(e.clientId),children:`revoke`})})]})}function Yg(e){let t=Date.now()-e;if(t<0)return`just now`;let n=Math.floor(t/1e3);if(n<60)return`${n}s ago`;let r=Math.floor(n/60);if(r<60)return`${r}m ago`;let i=Math.floor(r/60);return i<24?`${i}h ago`:`${Math.floor(i/24)}d ago`}var Xg=new Set([`theme`]),Zg={blueprints:{path:`/admin/blueprints`,label:`browse blueprints →`,mute:`The Blueprints page renders every entry with its primitives + props.`},primitives:{path:`/admin/blueprints`,label:`browse primitives →`,mute:`Primitives surface alongside blueprints on the Blueprints page.`},mcpMounts:{path:`/admin/tools`,label:`open Tools →`,mute:`The Tools page lists every mounted MCP tool with its handler + schema.`},storage:{path:`/admin/status`,label:`open Status →`,mute:`The Status dashboard shows render + vector-store backends as live wiring.`},agent:{path:`/admin/status`,label:`open Status →`,mute:`The Status dashboard shows agent + generation wiring.`}};function Qg(){let[e,t]=(0,S.useState)({kind:`loading`});return(0,S.useEffect)(()=>{let e=new AbortController;return(async()=>{try{let n=await fetch(`/ggui/console/config`,{signal:e.signal,headers:{accept:`application/json`}});if(!n.ok){t({kind:`error`,message:`server returned ${n.status}`});return}let r=await n.json();t({kind:`ready`,data:r})}catch(n){if(e.signal.aborted)return;t({kind:`error`,message:String(n)})}})(),()=>e.abort()},[]),e.kind===`loading`?(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`01 / config`,title:`ggui.json viewer.`,mute:`Probing project root.`}),(0,w.jsx)(c_,{title:`loading`,num:`CFG / 01`,tone:`draft`,children:`Loading config…`})]}):e.kind===`error`?(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`01 / config`,title:`ggui.json viewer.`,mute:`Endpoint unreachable.`}),(0,w.jsxs)(c_,{title:`error`,num:`ERR / 01`,tone:`signal`,children:[`Couldn't load config — `,e.message,`.`]})]}):(0,w.jsx)($g,{data:e.data})}function $g({data:e}){let t=(0,S.useMemo)(()=>Object.keys(e.schema.properties??{}).filter(e=>!Xg.has(e)),[e.schema]),[n,r]=(0,S.useState)(t[0]??``),i=e.source.found?e.source.error?`found-invalid`:`found-valid`:`missing`;return(0,w.jsxs)(`section`,{className:`ggui-section`,"data-ggui-config-source":i,children:[(0,w.jsx)(T,{num:`01 / admin / config`,title:`ggui.json — read-only manifest view.`,mute:e_(e),intro:(0,w.jsxs)(w.Fragment,{children:[`Debug view of every top-level field your`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui.json`}),` can carry. Descriptions come from the Zod schema; the value column shows what your manifest currently sets (or the schema default when omitted). To `,(0,w.jsx)(`strong`,{children:`author`}),` theme, paired keys, OAuth providers, etc., use the dedicated pages in the admin sub-nav — this page is just for inspection.`]})}),(0,w.jsx)(t_,{data:e}),i===`found-invalid`?null:(0,w.jsxs)(`div`,{className:`ggui-config-stack`,children:[(0,w.jsx)(n_,{sections:t,active:n,onSelect:r}),(0,w.jsx)(r_,{data:e,active:n})]}),e.source.found&&`raw`in e&&e.raw?(0,w.jsx)(s_,{raw:e.raw}):null]})}function e_(e){return e.source.found?e.source.error?`Validation failed.`:`Loaded from disk.`:`No ggui.json reachable.`}function t_({data:e}){return e.source.found?e.source.error?(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`validation failed`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`SRC / 01`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsx)(`p`,{className:`ggui-body`,children:(0,w.jsx)($,{tone:`signal`,children:`invalid`})}),(0,w.jsx)(`p`,{className:`ggui-muted`,children:(0,w.jsx)(`code`,{className:`ggui-code`,children:e.source.path})}),(0,w.jsx)(`pre`,{className:`ggui-config-error`,children:e.source.error.message})]})]}):(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`source`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`SRC / 01`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsx)(`p`,{className:`ggui-body`,children:(0,w.jsx)($,{tone:`live`,children:`loaded`})}),(0,w.jsx)(`p`,{className:`ggui-muted`,children:(0,w.jsx)(`code`,{className:`ggui-code`,children:e.source.path})})]})]}):(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`no manifest`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`SRC / 01`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsx)(`p`,{className:`ggui-body`,children:(0,w.jsx)($,{tone:`ink`,children:`missing`})}),(0,w.jsxs)(`p`,{className:`ggui-muted`,children:[`No `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui.json`}),` walked up from`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:e.source.searchedFrom}),`. The schema below shows what would be configurable; create a`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui.json`}),` at the project root and reload.`]})]})]})}function n_({sections:e,active:t,onSelect:n}){return(0,w.jsx)(`nav`,{"aria-label":`config sections`,"data-ggui-config-active-section":t,children:(0,w.jsx)(`ul`,{className:`ggui-config-tabs`,role:`tablist`,children:e.map(e=>(0,w.jsx)(`li`,{"data-ggui-config-section":e,role:`presentation`,children:(0,w.jsx)(`button`,{type:`button`,role:`tab`,onClick:()=>n(e),"aria-selected":e===t?`true`:`false`,"aria-current":e===t?`true`:void 0,className:`ggui-config-tabs__btn${e===t?` is-active`:``}`,children:e})},e))})})}function r_({data:e,active:t}){let n=e.schema.properties?.[t],r=e.source.found&&`manifest`in e&&e.manifest?e.manifest[t]:void 0,i=e.schema.required?.includes(t)??!1;if(!n)return(0,w.jsx)(`div`,{className:`ggui-config-panel`,children:(0,w.jsxs)(`p`,{className:`ggui-muted`,children:[`No schema for "`,t,`".`]})});let a=Zg[t];return(0,w.jsxs)(`div`,{className:`ggui-config-panel`,"data-ggui-config-section":t,children:[(0,w.jsxs)(`div`,{className:`ggui-config-panel__head`,children:[(0,w.jsx)(`span`,{className:`ggui-config-panel__name`,children:(0,w.jsx)(`code`,{className:`ggui-code`,children:t})}),i?(0,w.jsx)($,{tone:`signal`,children:`required`}):(0,w.jsx)($,{tone:`ink`,children:`optional`}),(0,w.jsx)(`span`,{className:`ggui-config-panel__type`,children:i_(n)})]}),a?(0,w.jsx)(a_,{link:a}):null,n.description?(0,w.jsx)(`p`,{className:`ggui-body`,style:{margin:`12px 0`},children:n.description}):(0,w.jsx)(`p`,{className:`ggui-muted`,children:`No description on the schema — file a bug if this is a known field.`}),(0,w.jsx)(o_,{label:`current`,value:r,absentNote:`not set in your manifest — schema default applies`}),n.default===void 0?(0,w.jsx)(o_,{label:`default`,value:void 0,absentNote:`no default — must be set explicitly when used`}):(0,w.jsx)(o_,{label:`default`,value:n.default}),n.enum?(0,w.jsx)(o_,{label:`allowed`,value:n.enum}):null,(0,w.jsxs)(`div`,{style:{marginTop:16},children:[(0,w.jsx)(`div`,{className:`ggui-stack__entry-meta`,style:{marginBottom:6,textTransform:`uppercase`,letterSpacing:`0.12em`},children:`schema`}),(0,w.jsx)(`pre`,{className:`ggui-config-schema`,children:JSON.stringify(n,null,2)})]})]})}function i_(e){return e.const===void 0?e.enum?`enum (${e.enum.length})`:e.type===`array`?`array`:e.type===`object`?`object`:typeof e.type==`string`?e.type:`unknown`:`literal "${String(e.const)}"`}function a_({link:e}){return(0,w.jsxs)(`div`,{"data-ggui-config-cross-link":e.path,style:{marginTop:8,padding:`10px 12px`,background:`var(--ggui-paper-2)`,border:`1px solid var(--ggui-line-1)`,borderRadius:2,display:`flex`,alignItems:`center`,gap:12,flexWrap:`wrap`},children:[(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,onClick:()=>E(e.path),style:{fontSize:12},children:e.label}),(0,w.jsx)(`span`,{className:`ggui-muted`,style:{fontSize:12,flex:1},children:e.mute})]})}function o_({label:e,value:t,absentNote:n}){return(0,w.jsxs)(`div`,{className:`ggui-config-value-row`,children:[(0,w.jsx)(`div`,{className:`ggui-stack__entry-meta`,style:{marginBottom:4,textTransform:`uppercase`,letterSpacing:`0.12em`},children:e}),t===void 0?(0,w.jsx)(`p`,{className:`ggui-muted`,style:{margin:0},children:n??`—`}):(0,w.jsx)(`pre`,{className:`ggui-config-value`,children:JSON.stringify(t,null,2)})]})}function s_({raw:e}){let[t,n]=(0,S.useState)(!1);return(0,w.jsxs)(`div`,{className:`ggui-card`,style:{marginTop:24},children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`raw ggui.json`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`RAW / 01`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsxs)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,onClick:()=>n(e=>!e),"aria-expanded":t,children:[t?`hide`:`show`,` raw bytes`]}),t?(0,w.jsx)(`pre`,{className:`ggui-config-raw`,"data-ggui-config-raw":!0,children:e}):null]})]})}function c_({title:e,num:t,tone:n,children:r}){return(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:e}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:t})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsx)(`p`,{className:`ggui-body`,children:(0,w.jsx)($,{tone:n,children:e})}),(0,w.jsx)(`p`,{className:`ggui-muted`,children:r})]})]})}function l_(){let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(`loading`),[i,a]=(0,S.useState)(null),[o,s]=(0,S.useState)(new Set),c=(0,S.useRef)(new Set);(0,S.useEffect)(()=>{let e=!1,n=null,i=e=>{c.current.has(e.id)||(c.current.add(e.id),t(t=>[e,...t].slice(0,500)))};return(async()=>{try{let n=await fetch(`/ggui/console/llm-trace/recent?limit=100`,{credentials:`same-origin`,headers:{accept:`application/json`}});if(!n.ok)throw Error(`recent fetch returned ${n.status}`);let i=await n.json();if(e)return;let a=[...i.events].reverse();for(let e of a)c.current.add(e.id);t(a),r(`live`)}catch(t){if(e)return;r(`error`),a(t instanceof Error?t.message:`Could not load recent LLM trace.`);return}n=new EventSource(`/ggui/console/llm-trace/stream`,{withCredentials:!0}),n.onmessage=e=>{try{let t=JSON.parse(e.data);i(t)}catch{}},n.onerror=()=>{r(`reconnecting`)},n.onopen=()=>{r(`live`)}})(),()=>{e=!0,n&&n.close()}},[]);let l=e=>{s(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})};return(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`DEVTOOLS / 7A`,title:`LLM trace.`,mute:`Live.`,intro:(0,w.jsx)(w.Fragment,{children:`Every LLM call the harness makes during generation — system prompt, user prompt, tool defs, completion, token counts. Anthropic only for now; OpenAI / Google / OpenRouter slot in later. Bounded ring buffer — most recent 200 events stay in memory.`})}),(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`events`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:n===`loading`?`connecting…`:n===`live`?`live · ${e.length}`:n===`reconnecting`?`reconnecting…`:`error`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[i?(0,w.jsx)(`p`,{className:`ggui-muted`,"data-ggui-llm-trace-error":!0,children:i}):null,e.length===0&&n!==`error`?(0,w.jsx)(`p`,{className:`ggui-muted`,children:`No LLM calls yet. Trigger a generation (push a prompt through your MCP client) and they'll appear here as they fire.`}):null,(0,w.jsx)(`ul`,{style:{listStyle:`none`,padding:0,margin:0,display:`grid`,gap:12},"data-ggui-llm-trace-list":!0,children:e.map(e=>(0,w.jsx)(u_,{event:e,expanded:o.has(e.id),onToggle:()=>l(e.id)},e.id))})]})]})]})}function u_({event:e,expanded:t,onToggle:n}){let r=new Date(e.at).toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hour12:!1}),i=e.result?`${e.result.inputTokens} in · ${e.result.outputTokens} out`+(e.result.cacheRead?` · ${e.result.cacheRead} cache hit`:``)+(e.result.cacheCreated?` · ${e.result.cacheCreated} cache write`:``):`—`,a=e.error?`error`:`ok`;return(0,w.jsxs)(`li`,{style:{border:`1px solid var(--ggui-rule)`,padding:`10px 12px`,background:`var(--ggui-paper)`},"data-ggui-llm-trace-event":e.id,"data-ggui-llm-trace-status":a,children:[(0,w.jsxs)(`button`,{type:`button`,onClick:n,style:{all:`unset`,cursor:`pointer`,display:`flex`,gap:12,alignItems:`baseline`,width:`100%`},children:[(0,w.jsx)(`span`,{className:`ggui-muted`,style:{fontSize:11,fontFamily:`var(--ggui-font-mono)`},children:r}),(0,w.jsxs)(`span`,{style:{fontFamily:`var(--ggui-font-mono)`,fontSize:12},children:[e.provider,`/`,e.model]}),(0,w.jsx)(`span`,{className:`ggui-muted`,style:{fontSize:11,fontFamily:`var(--ggui-font-mono)`},children:e.kind}),(0,w.jsx)(`span`,{style:{flex:1}}),(0,w.jsxs)(`span`,{className:`ggui-muted`,style:{fontSize:11},children:[e.durationMs,`ms`]}),(0,w.jsx)(`span`,{className:`ggui-muted`,style:{fontSize:11},children:i}),e.error?(0,w.jsx)(`span`,{style:{fontSize:11,padding:`0 6px`,border:`1px solid var(--ggui-rule)`},children:`error`}):null]}),t?(0,w.jsx)(d_,{event:e}):null]})}function d_({event:e}){return(0,w.jsxs)(`div`,{style:{marginTop:10,paddingTop:10,borderTop:`1px solid var(--ggui-rule)`,display:`grid`,gap:12},children:[e.error?(0,w.jsx)(f_,{label:`error`,children:(0,w.jsx)(`pre`,{style:p_,children:e.error.message})}):null,e.systemPrompt?(0,w.jsx)(f_,{label:`system prompt`,children:(0,w.jsx)(`pre`,{style:p_,children:e.systemPrompt})}):null,e.userPrompt?(0,w.jsx)(f_,{label:`user prompt`,children:(0,w.jsx)(`pre`,{style:p_,children:e.userPrompt})}):null,e.tools&&e.tools.length>0?(0,w.jsx)(f_,{label:`tools (${e.tools.length})`,children:(0,w.jsx)(`ul`,{style:{listStyle:`none`,padding:0,margin:0},children:e.tools.map(e=>(0,w.jsxs)(`li`,{style:{fontFamily:`var(--ggui-font-mono)`,fontSize:12,padding:`2px 0`},children:[(0,w.jsx)(`strong`,{children:e.name}),(0,w.jsxs)(`span`,{className:`ggui-muted`,children:[` — `,e.description]})]},e.name))})}):null,e.result?.text?(0,w.jsx)(f_,{label:`completion text`,children:(0,w.jsx)(`pre`,{style:p_,children:e.result.text})}):null,e.result?.toolCalls&&e.result.toolCalls.length>0?(0,w.jsx)(f_,{label:`tool calls (${e.result.toolCalls.length})`,children:(0,w.jsx)(`pre`,{style:p_,children:JSON.stringify(e.result.toolCalls,null,2)})}):null,e.result?.turnsUsed?(0,w.jsx)(f_,{label:`agentic turns`,children:(0,w.jsx)(`span`,{className:`ggui-muted`,children:e.result.turnsUsed})}):null]})}function f_({label:e,children:t}){return(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`div`,{className:`ggui-muted`,style:{fontSize:11,fontFamily:`var(--ggui-font-mono)`,textTransform:`uppercase`,marginBottom:4},children:e}),t]})}var p_={margin:0,padding:8,background:`var(--ggui-paper-2, #efeee8)`,border:`1px solid var(--ggui-rule)`,fontFamily:`var(--ggui-font-mono)`,fontSize:12,whiteSpace:`pre-wrap`,wordBreak:`break-word`,maxHeight:360,overflow:`auto`};function m_(){let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(`loading`),[i,a]=(0,S.useState)(null),[o,s]=(0,S.useState)(new Set),c=(0,S.useRef)(new Set);(0,S.useEffect)(()=>{let e=!1,n=null,i=e=>{c.current.has(e.id)||(c.current.add(e.id),t(t=>[e,...t].slice(0,500)))};return(async()=>{try{let n=await fetch(`/ggui/console/validator/recent?limit=100`,{credentials:`same-origin`,headers:{accept:`application/json`}});if(!n.ok)throw Error(`recent fetch returned ${n.status}`);let i=await n.json();if(e)return;let a=[...i.events].reverse();for(let e of a)c.current.add(e.id);t(a),r(`live`)}catch(t){if(e)return;r(`error`),a(t instanceof Error?t.message:`Could not load recent validator trace.`);return}n=new EventSource(`/ggui/console/validator/stream`,{withCredentials:!0}),n.onmessage=e=>{try{let t=JSON.parse(e.data);i(t)}catch{}},n.onerror=()=>{r(`reconnecting`)},n.onopen=()=>{r(`live`)}})(),()=>{e=!0,n&&n.close()}},[]);let l=e=>{s(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})};return(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`DEVTOOLS / 7B`,title:`Validator tier results.`,mute:`Live.`,intro:(0,w.jsxs)(w.Fragment,{children:[`Every `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`runCheck()`}),` the harness performs during generation — which axis-checks fired, which tier-0 deterministic checks failed, what the runtime- render probe surfaced, what the LLM evaluator flagged. Bounded ring buffer — most recent 200 events stay in memory.`]})}),(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`events`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:n===`loading`?`connecting…`:n===`live`?`live · ${e.length}`:n===`reconnecting`?`reconnecting…`:`error`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[i?(0,w.jsx)(`p`,{className:`ggui-muted`,"data-ggui-validator-error":!0,children:i}):null,e.length===0&&n!==`error`?(0,w.jsx)(`p`,{className:`ggui-muted`,children:`No validator runs yet. Trigger a generation (push a prompt through your MCP client) and tier results will appear here as they fire.`}):null,(0,w.jsx)(`ul`,{style:{listStyle:`none`,padding:0,margin:0,display:`grid`,gap:12},"data-ggui-validator-list":!0,children:e.map(e=>(0,w.jsx)(h_,{event:e,expanded:o.has(e.id),onToggle:()=>l(e.id)},e.id))})]})]})]})}function h_({event:e,expanded:t,onToggle:n}){let r=new Date(e.at).toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hour12:!1}),i=e.issues.filter(e=>e.result===`fail`).length,a=e.issues.filter(e=>e.result===`warn`).length,o=i>0?`fail`:a>0?`warn`:`pass`,s=e.harnessId.length>12?e.harnessId.slice(0,12)+`…`:e.harnessId;return(0,w.jsxs)(`li`,{style:{border:`1px solid var(--ggui-rule)`,padding:`10px 12px`,background:`var(--ggui-paper)`},"data-ggui-validator-event":e.id,"data-ggui-validator-outcome":o,children:[(0,w.jsxs)(`button`,{type:`button`,onClick:n,style:{all:`unset`,cursor:`pointer`,display:`flex`,gap:12,alignItems:`baseline`,width:`100%`,flexWrap:`wrap`},children:[(0,w.jsx)(`span`,{className:`ggui-muted`,style:{fontSize:11,fontFamily:`var(--ggui-font-mono)`},children:r}),(0,w.jsx)(`span`,{style:{fontFamily:`var(--ggui-font-mono)`,fontSize:12},title:e.harnessId,children:s}),(0,w.jsx)(`span`,{className:`ggui-muted`,style:{fontSize:11,fontFamily:`var(--ggui-font-mono)`},children:e.workflowId}),(0,w.jsx)(g_,{label:`axis`,count:e.summary.axisIssues}),(0,w.jsx)(g_,{label:`tier-0`,count:e.summary.tierIssues}),(0,w.jsx)(g_,{label:`probe`,count:e.summary.runtimeRenderIssues,dimmed:e.skippedRuntimeRender}),(0,w.jsx)(g_,{label:`llm`,count:e.summary.llmIssues}),(0,w.jsx)(`span`,{style:{flex:1}}),(0,w.jsxs)(`span`,{className:`ggui-muted`,style:{fontSize:11},children:[e.durationMs,`ms`]}),(0,w.jsx)(__,{outcome:o,fails:i,warns:a})]}),t?(0,w.jsx)(v_,{event:e}):null]})}function g_({label:e,count:t,dimmed:n}){return(0,w.jsxs)(`span`,{style:{fontSize:11,fontFamily:`var(--ggui-font-mono)`,padding:`0 6px`,border:`1px solid var(--ggui-rule)`,opacity:n?.4:t>0?1:.7},children:[e,` `,t]})}function __({outcome:e,fails:t,warns:n}){let r=e===`pass`?`pass`:e===`warn`?`${n} warn`:`${t} fail`;return(0,w.jsx)(`span`,{style:{fontSize:11,fontFamily:`var(--ggui-font-mono)`,padding:`0 6px`,border:`1px solid var(--ggui-rule)`},"data-ggui-validator-pill":e,children:r})}function v_({event:e}){let t=y_(e.issues);return(0,w.jsxs)(`div`,{style:{marginTop:10,paddingTop:10,borderTop:`1px solid var(--ggui-rule)`,display:`grid`,gap:12},children:[e.error?(0,w.jsx)(x_,{label:`error`,children:(0,w.jsx)(`pre`,{style:S_,children:e.error.message})}):null,(0,w.jsx)(x_,{label:`harness`,children:(0,w.jsxs)(`div`,{style:{fontFamily:`var(--ggui-font-mono)`,fontSize:12},children:[(0,w.jsxs)(`div`,{children:[`id: `,e.harnessId]}),(0,w.jsxs)(`div`,{children:[`workflow: `,e.workflowId]}),(0,w.jsxs)(`div`,{children:[`compiled: `,e.hadCompiledCode?`yes`:`no — checks skipped`]}),(0,w.jsxs)(`div`,{children:[`runtime-render: `,e.skippedRuntimeRender?`skipped`:`ran`]})]})}),(0,w.jsx)(x_,{label:`classification`,children:(0,w.jsx)(`div`,{style:{fontFamily:`var(--ggui-font-mono)`,fontSize:12},children:Object.entries(e.classification).map(([e,t])=>(0,w.jsxs)(`div`,{children:[e,`: `,String(t)]},e))})}),e.summary.firedCheckIds.length>0?(0,w.jsx)(x_,{label:`fired check ids (${e.summary.firedCheckIds.length})`,children:(0,w.jsx)(`pre`,{style:S_,children:e.summary.firedCheckIds.join(`
|
|
201
|
+
}`}var lh=[`useAction`,`useStream`,`useAuth`,`useApp`,`useRender`,`useGguiContext`,`useContract`,`useWireContext`,`GguiWireProvider`],uh=`Container.Card.Stack.Row.Grid.Box.Divider.Spacer.Text.Heading.Button.Input.TextArea.Select.Checkbox.Toggle.RadioGroup.Slider.Badge.Spinner.Skeleton.Avatar.Alert.Progress.Image.Icon.Link.Tooltip.Table.Tabs.Toast.Accordion.MotionKeyframes.useMotion.useAnimationKey`.split(`.`),dh=[`SearchField`,`FormField`,`MenuItem`,`Tag`,`Dropdown`,`Autocomplete`,`Breadcrumb`,`Pagination`,`EmptyState`,`Stat`,`Stepper`,`Markdown`,`MarkdownInline`,`renderRichTextInlines`],fh=[`Header`,`Sidebar`,`CardGrid`,`CommentThread`,`DataTable`,`ChatWindow`,`NavigationBar`,`FileUploader`,`NotificationCenter`,`Modal`,`CommandPalette`,`Footer`,`Hero`],ph=[`Clickable`,`Hoverable`,`Pressable`],mh=`useState.useEffect.useRef.useCallback.useMemo.useContext.useReducer.useId.use.useActionState.useOptimistic.useTransition.startTransition.useDeferredValue.useSyncExternalStore.useInsertionEffect.useLayoutEffect.useImperativeHandle.useDebugValue.createElement.Fragment.Children.cloneElement.createContext.forwardRef.memo.lazy.Suspense.Component.PureComponent.isValidElement.createRef`.split(`.`),hh=`animation.duration.easing.transition.keyframes.thinkingAnimation.thinkingKeyframes.thinkingPresets.THINKING_DEFAULT_STYLE.motionSafe.reducedMotion.reducedMotionCSS.colors.gray.primary.semantic.chartColors.success.warning.error.info.highContrast.typography.fontFamily.fontSize.fontSizeValues.fontWeight.lineHeight.letterSpacing.headingStyles.spacing.spacingValues.radius.shadow.elevation.maxWidth.zIndex.accessibility.focusRing.nativeTokens.tokens`.split(`.`);function gh(e,t,n){return e=e.split(`from"${t}"`).join(`from"${n}"`),e=e.split(`from "${t}"`).join(`from "${n}"`),e=e.split(`from'${t}'`).join(`from'${n}'`),e=e.split(`from '${t}'`).join(`from '${n}'`),e=e.split(`import"${t}"`).join(`import"${n}"`),e=e.split(`import "${t}"`).join(`import "${n}"`),e=e.split(`import'${t}'`).join(`import'${n}'`),e=e.split(`import '${t}'`).join(`import '${n}'`),e}function _h(e,t){return`(globalThis.__ggui__&&globalThis.__ggui__["${e}"]||window["${t}"])`}function vh(e){return`data:text/javascript,${encodeURIComponent(e)}`}function yh(e){let t=mh.map(e=>`export const ${e} = R.${e};`).join(` `);return`const R = ${_h(`react`,e)}; export default R; ${t}`}function bh(e){return vh(yh(e))}function xh(){return`const D = globalThis.__ggui__["reactDom"]; export default D; ${[`createPortal`,`flushSync`,`unstable_batchedUpdates`].map(e=>`export const ${e} = D.${e};`).join(` `)}`}function Sh(){return vh(xh())}function Ch(e){return[`const R = ${_h(`react`,e)};`,`function jsx(t,p,k){`,`if(k!==undefined){p={...p,key:k}}`,`const c=p.children;`,`delete p.children;`,`return Array.isArray(c)?R.createElement(t,p,...c):c!==undefined?R.createElement(t,p,c):R.createElement(t,p)`,`}`,`export{jsx,jsx as jsxs,jsx as jsxDEV};`,`export const Fragment=R.Fragment;`].join(``)}function wh(e){return vh(Ch(e))}function Th(e,t,n,r,i){if(n&&n.length>0){let a=[e,...r||[]],o=[t,...i||[]],s=a.map((e,t)=>`(globalThis.__ggui__&&globalThis.__ggui__["${o[t]}"]||window["${e}"]||{})`),c=s.join(`,`),l=n.map(e=>`export const ${e} = M["${e}"];`).join(` `);return s.length>1?`const M = Object.assign({}, ${c}); ${l} export default M;`:`const M = ${s[0]}; ${l} export default M;`}return`const M = ${_h(t,e)} || {}; const handler = { get(_, key) { return M[key]; } }; export default new Proxy({}, handler);`}function Eh(e,t,n,r,i){return vh(Th(e,t,n,r,i))}function Dh(){return`const w = globalThis.__ggui__.wire; ${lh.map(e=>`export const ${e} = w.${e};`).join(` `)} export default w;`}function Oh(){return vh(Dh())}function kh(e,t){let n=t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`),r=RegExp(`import\\s*(?:[A-Za-z_$][\\w$]*\\s*,\\s*)?\\{([^}]*)\\}\\s*from\\s*['"]${n}['"]`,`g`),i=new Set,a;for(;(a=r.exec(e))!==null;)for(let e of a[1].split(`,`)){let t=e.trim().split(/\s+as\s+/)[0]?.trim();t!==void 0&&/^[A-Za-z_$][\w$]*$/.test(t)&&i.add(t)}return[...i]}function Ah(e,t){let n=JSON.stringify(e),r=t.some(e=>/^[A-Z]/.test(e)),i=[];i.push(`var P=${n};`),i.push(`function NS(){return(globalThis.__ggui__&&globalThis.__ggui__.gadgets&&globalThis.__ggui__.gadgets[P])||{};}`),i.push(`function H(n){return function(){var f=NS()[n];if(typeof f!=="function")throw new Error("[gadget] export "+n+" from package "+P+" is not loaded — the package failed to load at iframe boot or is not registered on App.gadgets.");return f.apply(this,arguments);};}`),r&&(i.push(`var R=globalThis.__ggui__&&globalThis.__ggui__.react;`),i.push(`class GEB extends R.Component{constructor(p){super(p);this.state={e:null};}static getDerivedStateFromError(e){return{e:e};}render(){if(this.state.e)return R.createElement("div",{style:{padding:"8px",border:"1px solid #e0a0c0",borderRadius:"6px",color:"#a03070",font:"13px system-ui"}},"[gadget] "+this.props.g+" failed to render");return this.props.children;}}`),i.push(`function C(n){return function(props){var Cmp=NS()[n];if(typeof Cmp!=="function")return R.createElement("div",{style:{padding:"8px",border:"1px solid #e0a0c0",borderRadius:"6px",color:"#a03070",font:"13px system-ui"}},"[gadget] component "+n+" from package "+P+" is not loaded");return R.createElement(GEB,{g:n},R.createElement(Cmp,props));};}`));for(let e of t){let t=/^[A-Z]/.test(e)?`C`:`H`;i.push(`export const ${e}=${t}(${JSON.stringify(e)});`)}return i.push(`export default new Proxy({},{get:function(_,k){return NS()[k];}});`),i.join(``)}function jh(e,t){return vh(Ah(e,t))}function Mh(e,t){let n=t.reactGlobal??`__REACT`,r=t.primitivesGlobal??`__GGUI_PRIMITIVES`,i=t.componentsGlobal??`__GGUI_COMPONENTS`,a=t.compositionsGlobal??`__GGUI_COMPOSITIONS`,o=t.interactGlobal??`__GGUI_INTERACT`,s=t.appComponentsGlobal??`__GGUI_APP_COMPONENTS`,c=bh(n),l=wh(n);e=gh(e,`react/jsx-runtime`,l),e=gh(e,`react/jsx-dev-runtime`,l);let u=Sh();e=gh(e,`react-dom`,u),e=gh(e,`react`,c);let d=[...uh,...dh,...fh,...ph];e=gh(e,`@ggui-ai/design/primitives`,Eh(r,`primitives`,d,[i,a,o],[`components`,`compositions`,`interact`])),e=gh(e,`@ggui-ai/design/components`,Eh(i,`components`,d,[r,a,o],[`primitives`,`compositions`,`interact`])),e=gh(e,`@ggui-ai/design/compositions`,Eh(a,`compositions`,d,[r,i,o],[`primitives`,`components`,`interact`])),e=gh(e,`@ggui-ai/design/interact`,Eh(o,`interact`,[...ph])),e=gh(e,`@ggui-ai/design/templates`,Eh(a,`compositions`,d,[r,i],[`primitives`,`components`])),e=gh(e,`@ggui-ai/design/app-components`,Eh(s,`appComponents`)),e=gh(e,`@ggui-ai/design/tokens`,Eh(`__GGUI_TOKENS`,`tokens`,[...hh])),e=gh(e,`@ggui-ai/design`,Eh(r,`primitives`,d,[i,a,o],[`components`,`compositions`,`interact`])),e=gh(e,`@ggui-ai/wire`,Oh());let f=[...new Set([`@ggui-ai/gadgets`,...t.gadgetPackages??[]])];for(let t of f){let n=kh(e,t);e=gh(e,t,jh(t,n))}return e}var Nh={"react/jsx-runtime":`jsx-runtime`,"react/jsx-dev-runtime":`jsx-runtime`,"react-dom":`react-dom`,react:`react`,"@ggui-ai/design/primitives":`primitives`,"@ggui-ai/design/components":`components`,"@ggui-ai/design/compositions":`compositions`,"@ggui-ai/design/interact":`interact`,"@ggui-ai/design/templates":`templates`,"@ggui-ai/design/app-components":`app-components`,"@ggui-ai/design/tokens":`tokens`,"@ggui-ai/design":`design`,"@ggui-ai/wire":`wire`,"@ggui-ai/gadgets":`gadgets`};function Ph(e,t){let n=t.shimBaseUrl.replace(/\/$/,``);for(let[t,r]of Object.entries(Nh))e=gh(e,t,`${n}/${r}.js`);return e}function Fh(e,t){let n=t.reactBaseUrl??`https://esm.sh/react@18.2.0`;return e=gh(e,`react/jsx-runtime`,`${n}/jsx-runtime`),e=gh(e,`react/jsx-dev-runtime`,`${n}/jsx-runtime`),e=gh(e,`react`,n),e}function Ih(e,t){switch(t.mode){case`data-url`:return Mh(e,t);case`importmap`:return Fh(e,t);case`asset-url`:return Ph(e,t)}}function Lh(e){let t=e.split(`;`),n=[],r=[];for(let e of t)e.trimStart().startsWith(`import`)?n.push(e):r.push(e);return n.length===0?e:n.join(`;`)+`;`+r.join(`;`)}async function Rh(e){let t=new Blob([e],{type:`application/javascript`}),n=URL.createObjectURL(t);try{return await pd(()=>import(n),[])}finally{URL.revokeObjectURL(n)}}var zh=0;function Bh(e){return`ggui-rcr-${e.replace(/[^a-z0-9]/gi,``)}`}var Vh=1,Hh=500,Uh=class extends S.Component{state={error:null,catchCount:0,autoRetrying:!1};retryTimer=null;static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e){let t=this.state.catchCount+1;this.setState({catchCount:t}),t<=Vh?(this.setState({autoRetrying:!0}),this.retryTimer=setTimeout(()=>{this.setState({error:null,autoRetrying:!1})},Hh)):this.props.onError?.(e)}componentWillUnmount(){this.retryTimer&&clearTimeout(this.retryTimer)}render(){let{error:e,autoRetrying:t}=this.state;return e?t?(0,w.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,padding:24,minHeight:80,gap:8,fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif`,fontSize:13,color:`var(--ggui-color-onSurface, inherit)`,opacity:.6},children:[(0,w.jsx)(`div`,{style:{width:16,height:16,border:`2px solid rgba(128,128,128,0.25)`,borderTopColor:`currentColor`,borderRadius:`50%`,animation:`ggui-err-spin 0.6s linear infinite`}}),`Retrying...`,(0,w.jsx)(`style`,{children:`@keyframes ggui-err-spin { to { transform: rotate(360deg); } }`})]}):(0,w.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,padding:`32px 24px`,minHeight:120,gap:12,textAlign:`center`,fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif`,color:`var(--ggui-color-onSurface, inherit)`},children:[(0,w.jsx)(`div`,{style:{width:48,height:48,borderRadius:14,background:`rgba(239, 68, 68, 0.1)`,color:`#ef4444`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:22},children:`!`}),(0,w.jsx)(`div`,{style:{fontSize:14,fontWeight:600,opacity:.9},children:`Something went wrong`}),(0,w.jsx)(`div`,{style:{fontSize:12,opacity:.6,maxWidth:280,lineHeight:1.4},children:`This component encountered an error. Try asking for a different view.`}),(0,w.jsx)(`button`,{onClick:()=>this.setState({error:null,catchCount:0}),style:{marginTop:4,padding:`8px 20px`,borderRadius:8,border:`1px solid currentColor`,background:`transparent`,color:`inherit`,opacity:.75,fontSize:13,fontWeight:500,cursor:`pointer`},children:`Retry`}),(0,w.jsxs)(`details`,{style:{marginTop:8,maxWidth:320,width:`100%`,textAlign:`left`,opacity:.65},children:[(0,w.jsx)(`summary`,{style:{fontSize:11,cursor:`pointer`},children:`Error details`}),(0,w.jsx)(`pre`,{style:{fontSize:11,fontFamily:`ui-monospace, SFMono-Regular, Menlo, monospace`,whiteSpace:`pre-wrap`,overflowWrap:`anywhere`,margin:`6px 0 0`,maxHeight:140,overflow:`auto`},children:e.message})]})]}):this.props.children}};function Wh({code:e,props:t={},themeId:n,cssOverrides:r,fallback:i=(0,w.jsx)(`div`,{children:`Loading component...`}),onError:a}){let o=(0,S.useId)(),[s]=(0,S.useState)(()=>Bh(o)||`ggui-rcr-${++zh}`),[c,l]=(0,S.useState)(null),[d,f]=(0,S.useState)(null),[p,m]=(0,S.useState)(!0);(0,S.useEffect)(()=>{if(!e||e.trim().length===0){l(null),m(!1);return}let t=!1;m(!0),f(null),l(null);async function n(){try{let n=e;if(e.startsWith(`https://`)){let t=await fetch(e);if(!t.ok)throw Error(`Failed to fetch component code: ${t.status}`);n=await t.text()}let r=_m(n),i=globalThis,a={};try{a=await pd(()=>Promise.resolve().then(()=>u(_(),1)),void 0)}catch{}i.__ggui__={react:S.default,reactDom:a,primitives:md,components:Qf,compositions:qp,interact:pm,wire:ld},i.__REACT=S.default,i.__GGUI_PRIMITIVES=md,i.__GGUI_COMPONENTS=Qf,i.__GGUI_COMPOSITIONS=qp,i.__GGUI_INTERACT=pm;let o=await Rh(Ih(Lh(r),{mode:`data-url`}));if(t)return;let s=o.default??Object.values(o).find(e=>typeof e==`function`);if(!s)throw Error(`Module does not export a default component`);l(()=>s),f(null)}catch(e){if(t)return;let n=e instanceof Error?e:Error(String(e));f(n),l(null),a?.(n)}finally{t||m(!1)}}return n(),()=>{t=!0}},[e]);let h=n?oh(n,s):ah(s);return!e||e.trim().length===0||p?(0,w.jsx)(`div`,{children:i}):d?(0,w.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,padding:`32px 24px`,minHeight:120,gap:12,textAlign:`center`,fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif`},children:[(0,w.jsx)(`div`,{style:{width:48,height:48,borderRadius:14,background:`rgba(239, 68, 68, 0.1)`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:22},children:`!`}),(0,w.jsx)(`div`,{style:{fontSize:14,fontWeight:600,color:`rgba(255,255,255,0.8)`},children:`Failed to load component`}),(0,w.jsx)(`div`,{style:{fontSize:12,color:`rgba(255,255,255,0.4)`,maxWidth:280,lineHeight:1.4},children:d.message})]}):c?(0,w.jsxs)(`div`,{className:s,children:[(0,w.jsxs)(`style`,{children:[h,r??``]}),(0,w.jsx)(Uh,{onError:a,children:(0,w.jsx)(c,{...t})},e.length)]}):(0,w.jsx)(`div`,{children:i})}function Gh(){return(0,w.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,minHeight:80},children:(0,w.jsx)(Zd,{})})}function Kh({suspended:e=!1,fallback:t}={}){return e?null:(0,w.jsx)(w.Fragment,{children:t??(0,w.jsx)(Gh,{})})}var qh={display:`inline-flex`,alignItems:`center`,gap:4,fontFamily:`var(--ggui-font-family-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)`,fontSize:12,lineHeight:1.2,color:`var(--ggui-color-neutral-500, #6b7280)`},Jh={appearance:`none`,display:`inline-flex`,alignItems:`center`,background:`var(--ggui-color-neutral-50, #f9fafb)`,border:`1px solid var(--ggui-color-neutral-200, #e5e7eb)`,borderRadius:`var(--ggui-shape-radius-sm, 4px)`,padding:`3px 7px`,fontFamily:`inherit`,fontSize:`inherit`,color:`var(--ggui-color-neutral-600, #4b5563)`,cursor:`pointer`},Yh={appearance:`none`,background:`transparent`,border:`none`,padding:`2px 4px`,fontFamily:`inherit`,fontSize:`inherit`,color:`var(--ggui-color-neutral-400, #9ca3af)`,cursor:`pointer`};function Xh({direction:e}){return(0,w.jsx)(`svg`,{width:13,height:13,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:e===`up`?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`path`,{d:`M7 10v12`}),(0,w.jsx)(`path`,{d:`M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z`})]}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`path`,{d:`M17 14V2`}),(0,w.jsx)(`path`,{d:`M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z`})]})})}var Zh={up:`Thumbs up`,down:`Thumbs down`};function Qh({onUiFeedback:e,sessionId:t,toolName:n}){let[r,i]=(0,S.useState)(`idle`),a=(0,S.useCallback)(r=>{e&&(e({verdict:r,...t===void 0?{}:{sessionId:t},...n===void 0?{}:{toolName:n}}),i(`sent`))},[e,t,n]);return!e||r===`dismissed`?null:(0,w.jsxs)(`div`,{"data-ggui-ui-feedback":!0,role:`group`,"aria-label":`Share feedback on this UI`,style:qh,children:[r===`sent`?(0,w.jsx)(`span`,{"data-ggui-ui-feedback-thanks":!0,children:`Thanks for the feedback`}):[`up`,`down`].map(e=>(0,w.jsx)(`button`,{type:`button`,style:Jh,"data-ggui-ui-feedback-verdict":e,"aria-label":Zh[e],title:Zh[e],onClick:()=>a(e),children:(0,w.jsx)(Xh,{direction:e})},e)),(0,w.jsx)(`button`,{type:`button`,style:Yh,"aria-label":`Dismiss feedback`,"data-ggui-ui-feedback-dismiss":!0,onClick:()=>i(`dismissed`),children:`×`})]})}function $h({render:e,fallback:t,onError:n,cssOverrides:r,themeId:i,onUiFeedback:a,feedbackSessionId:o,feedbackToolName:s}){return!e.componentCode||e.componentCode.length===0?(0,w.jsx)(eg,{children:(0,w.jsx)(Kh,{fallback:t})}):(0,w.jsxs)(eg,{children:[(0,w.jsx)(Wh,{code:e.componentCode,props:e.props,cssOverrides:r,themeId:i,onError:n,fallback:t}),a?(0,w.jsx)(Qh,{onUiFeedback:a,...o===void 0?{}:{sessionId:o},...s===void 0?{}:{toolName:s}}):null]})}function eg({children:e}){return ng()?(0,w.jsx)(w.Fragment,{children:e}):(0,w.jsx)(Uu,{config:tg,children:e})}var tg={app:{appId:`preview`,appName:`preview`},render:{sessionId:`preview`,isConnected:!1},auth:{isAuthenticated:!1},dispatch:()=>{},subscribe:()=>()=>{}};function ng(){try{return Hu()}catch{return null}}new TextDecoder;function $({tone:e,children:t,dot:n=!0}){return(0,w.jsxs)(`span`,{className:`ggui-status ggui-status--${e}`,children:[n?(0,w.jsx)(`span`,{className:`ggui-status__dot`,"aria-hidden":!0}):null,t]})}function rg({blueprintId:e}){let[t,n]=(0,S.useState)({kind:`loading`});return(0,S.useEffect)(()=>{let t=new AbortController;return(async()=>{try{let r=await fetch(`/ggui/console/blueprint/${encodeURIComponent(e)}`,{signal:t.signal,headers:{accept:`application/json`}});if(r.status===404){n({kind:`not-found`});return}if(!r.ok){n({kind:`error`,message:`server returned ${r.status}`});return}let i=await r.json();n({kind:`ready`,blueprint:i})}catch(e){if(t.signal.aborted)return;n({kind:`error`,message:String(e)})}})(),()=>t.abort()},[e]),(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`01 / blueprint`,title:`Manifest-registered surface.`,mute:(0,w.jsx)(w.Fragment,{children:(0,w.jsxs)(`code`,{className:`ggui-code`,children:[`/preview/`,e]})}),intro:(0,w.jsxs)(w.Fragment,{children:[`Reads the bundle via`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`LocalUiRegistry`}),`. Same bytes an agent would get from`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui_render_blueprint`}),`.`]})}),t.kind===`loading`?(0,w.jsx)(sg,{title:`loading`,num:`BPR / 01`,tone:`draft`,children:`Loading blueprint…`}):t.kind===`not-found`?(0,w.jsx)(og,{blueprintId:e}):t.kind===`error`?(0,w.jsxs)(sg,{title:`error`,num:`ERR / 01`,tone:`signal`,children:[`Couldn't load blueprint — `,t.message,`.`]}):(0,w.jsx)(ig,{blueprint:t.blueprint})]})}function ig({blueprint:e}){return(0,w.jsxs)(`section`,{"data-ggui-session-entry":`component`,"data-ggui-code-ready":`true`,"data-ggui-blueprint-id":e.blueprintId,className:`ggui-pane`,children:[(0,w.jsxs)(`div`,{className:`ggui-pane__head`,children:[(0,w.jsxs)(`div`,{className:`ggui-pane__traffic`,"aria-hidden":!0,children:[(0,w.jsx)(`span`,{}),(0,w.jsx)(`span`,{}),(0,w.jsx)(`span`,{})]}),(0,w.jsx)(`span`,{className:`ggui-pane__title`,children:e.blueprintName}),(0,w.jsx)(`span`,{className:`ggui-pane__meta`,children:e.contentType}),(0,w.jsx)(ag,{blueprintId:e.blueprintId})]}),(0,w.jsx)(`div`,{className:`ggui-pane__body`,children:(0,w.jsx)($h,{render:{componentCode:e.code},fallback:(0,w.jsx)(`div`,{"data-ggui-preview-state":`waiting`,className:`ggui-muted`,style:{padding:`16px 0`},children:`Loading component…`})})})]})}function ag({blueprintId:e}){let[t,n]=(0,S.useState)({kind:`idle`}),r=async()=>{n({kind:`pending`});try{let t=await fetch(`/ggui/console/blueprint/${encodeURIComponent(e)}/try`,{method:`POST`,headers:{accept:`application/json`}});if(!t.ok){let e=await t.json().catch(()=>({}));n({kind:`error`,message:e.message??`server returned ${t.status}`});return}n({kind:`ok`})}catch(e){n({kind:`error`,message:String(e)})}};return(0,w.jsxs)(`span`,{className:`ggui-pane__actions`,style:{marginLeft:`auto`},children:[t.kind===`error`?(0,w.jsx)(`span`,{className:`ggui-muted`,"data-ggui-try-live":`error`,title:t.message,style:{marginRight:`8px`,fontSize:`0.75rem`},children:`try-live failed`}):null,t.kind===`ok`?(0,w.jsx)(`span`,{className:`ggui-muted`,"data-ggui-try-live":`ok`,style:{marginRight:`8px`,fontSize:`0.75rem`},children:`try-live ok`}):null,(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,"data-ggui-try-live":t.kind===`pending`?`pending`:`idle`,"data-ggui-blueprint-id":e,disabled:t.kind===`pending`,onClick:()=>{r()},children:t.kind===`pending`?`trying…`:`Try live →`})]})}function og({blueprintId:e}){return(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`not found`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`ERR / 01`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsx)(`h2`,{className:`ggui-h2`,children:`Blueprint not found`}),(0,w.jsxs)(`p`,{className:`ggui-body`,children:[`No blueprint registered with id`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:e}),`. Check`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui.json#blueprints.include`}),` `,`and the blueprint's`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui.ui.json#id`}),`.`]}),(0,w.jsx)(`div`,{children:(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,onClick:()=>E(`/`),children:`back to landing`})})]})]})}function sg({title:e,num:t,tone:n,children:r}){return(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:e}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:t})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsx)(`p`,{className:`ggui-body`,children:(0,w.jsx)($,{tone:n,children:e})}),(0,w.jsx)(`p`,{className:`ggui-muted`,children:r})]})]})}function cg(){let[e,t]=(0,S.useState)({kind:`loading`}),[n,r]=(0,S.useState)({kind:`loading`}),[i,a]=(0,S.useState)(``),[o,s]=(0,S.useState)(!1);(0,S.useEffect)(()=>{let e=new AbortController;return(async()=>{try{let n=await fetch(`/ggui/console/registry`,{signal:e.signal,headers:{accept:`application/json`}});if(!n.ok){t({kind:`error`,message:`server returned ${n.status}`});return}let r=await n.json();t({kind:`ready`,data:r})}catch(n){if(e.signal.aborted)return;t({kind:`error`,message:String(n)})}})(),()=>e.abort()},[]);let c=(0,S.useCallback)(async e=>{r({kind:`loading`});try{let t=await fetch(`/ggui/console/blueprints/cached`,{signal:e,headers:{accept:`application/json`}});if(t.status===501){let e=await t.json().catch(()=>({}));r({kind:`unsupported`,message:e.message??`The configured vector store does not support enumeration.`});return}if(!t.ok){r({kind:`error`,message:`server returned ${t.status}`});return}let n=await t.json();r({kind:`ready`,data:n})}catch(t){if(e?.aborted)return;r({kind:`error`,message:String(t)})}},[]);(0,S.useEffect)(()=>{let e=new AbortController;return c(e.signal),()=>e.abort()},[c]);let l=(0,S.useCallback)(async e=>{try{await fetch(`/ggui/console/blueprints/cached/${encodeURIComponent(e)}`,{method:`DELETE`})}catch(e){r({kind:`error`,message:String(e)});return}await c()},[c]),u=(0,S.useCallback)(async()=>{try{await fetch(`/ggui/console/blueprints/cached/clear`,{method:`POST`})}catch(e){r({kind:`error`,message:String(e)});return}await c()},[c]),d=i.trim().toLowerCase(),f=(0,S.useMemo)(()=>e.kind===`ready`?d.length===0?e.data:{blueprints:e.data.blueprints.filter(e=>[e.id,e.name,e.description??``,e.category??``].join(` `).toLowerCase().includes(d)),primitives:e.data.primitives.filter(e=>[e.name,e.catalog,e.source].join(` `).toLowerCase().includes(d))}:null,[e,d]),p=(0,S.useMemo)(()=>n.kind===`ready`?d.length===0?n.data.entries:n.data.entries.filter(e=>[e.id,e.cachedIntent].join(` `).toLowerCase().includes(d)):null,[n,d]);return(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`01 / blueprints`,title:`What can this server produce without generating?`,mute:`Declared and cached.`,intro:(0,w.jsxs)(w.Fragment,{children:[`Two answers on one screen. `,(0,w.jsx)(`strong`,{children:`Declared`}),` blueprints from `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui.json#blueprints.include`}),`;`,` `,(0,w.jsx)(`strong`,{children:`cached`}),` generations the render path has stored (contract-keyed, written by the blueprint registry on every successful cold-gen).`]})}),e.kind===`loading`||n.kind===`loading`?(0,w.jsx)(_g,{title:`loading`,num:`REG / 01`,tone:`draft`,children:`Loading…`}):e.kind===`error`?(0,w.jsxs)(_g,{title:`error`,num:`ERR / 01`,tone:`signal`,children:[`Couldn't load registry — `,e.message,`.`]}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(`div`,{className:`ggui-form`,style:{marginBottom:20},children:[(0,w.jsx)(`label`,{className:`ggui-label`,htmlFor:`ggui-registry-filter`,children:`filter`}),(0,w.jsx)(`div`,{className:`ggui-field`,children:(0,w.jsx)(`input`,{id:`ggui-registry-filter`,name:`filter`,"aria-label":`filter registry entries`,placeholder:`substring match over id, name, description, intent…`,value:i,onChange:e=>a(e.target.value),autoCapitalize:`off`,autoCorrect:`off`,spellCheck:!1})})]}),(0,w.jsxs)(`div`,{className:`ggui-registry-grid`,children:[(0,w.jsx)(lg,{all:e.data.blueprints,shown:f?.blueprints??e.data.blueprints,filterActive:d.length>0}),(0,w.jsx)(ug,{state:n,shown:p,filterActive:d.length>0,onInvalidate:l,onClearAll:u})]}),(0,w.jsx)(fg,{all:e.data.primitives,shown:f?.primitives??e.data.primitives,filterActive:d.length>0,expanded:o,onToggle:()=>s(e=>!e)})]})]})}function lg({all:e,shown:t,filterActive:n}){return(0,w.jsxs)(`div`,{"data-ggui-registry-list":`blueprints`,className:`ggui-stack`,"aria-label":`declared blueprints`,children:[(0,w.jsxs)(`div`,{className:`ggui-stack__head`,children:[(0,w.jsx)(`span`,{className:`ggui-stack__num`,children:`BPR`}),(0,w.jsx)(`span`,{className:`ggui-stack__label`,children:`declared`}),(0,w.jsxs)(`span`,{className:`ggui-stack__count`,children:[t.length,n&&t.length!==e.length?` / ${e.length}`:``]})]}),e.length===0?(0,w.jsx)(pg,{}):t.length===0?(0,w.jsx)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},children:`No declared blueprints match the filter.`}):(0,w.jsx)(`ul`,{className:`ggui-stack__list`,children:t.map((e,t)=>(0,w.jsxs)(`li`,{"data-ggui-registry-item":`blueprint`,"data-ggui-registry-id":e.id,className:`ggui-stack__entry`,children:[(0,w.jsxs)(`div`,{className:`ggui-stack__entry-head`,children:[(0,w.jsx)(`span`,{className:`ggui-stack__entry-num`,children:`BPR / ${String(t+1).padStart(2,`0`)}`}),(0,w.jsx)(`span`,{className:`ggui-stack__entry-title`,children:e.name}),e.category?(0,w.jsx)($,{tone:`ink`,children:e.category}):null]}),(0,w.jsx)(`div`,{className:`ggui-stack__entry-meta`,children:(0,w.jsx)(`code`,{className:`ggui-code`,children:e.id})}),e.description?(0,w.jsx)(`p`,{className:`ggui-body`,style:{margin:`8px 0 0`},children:e.description}):null,(0,w.jsx)(`div`,{style:{marginTop:12},children:(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,onClick:()=>E(`/preview/${encodeURIComponent(e.id)}`),children:`preview →`})})]},e.id))})]})}function ug({state:e,shown:t,filterActive:n,onInvalidate:r,onClearAll:i}){let a=e.kind===`ready`?e.data.entries:[],o=t??a;return(0,w.jsxs)(`div`,{"data-ggui-cached-list":!0,className:`ggui-stack`,"aria-label":`cached blueprints`,children:[(0,w.jsxs)(`div`,{className:`ggui-stack__head`,children:[(0,w.jsx)(`span`,{className:`ggui-stack__num`,children:`CCH`}),(0,w.jsx)(`span`,{className:`ggui-stack__label`,children:`cached`}),(0,w.jsx)(`span`,{className:`ggui-stack__count`,children:e.kind===`ready`?`${o.length}${n&&o.length!==a.length?` / ${a.length}`:``}`:`—`}),e.kind===`ready`&&a.length>0?(0,w.jsx)(`button`,{type:`button`,"data-ggui-cached-clear-all":!0,className:`ggui-btn ggui-btn--ghost`,style:{marginLeft:`auto`},onClick:()=>{i()},children:`clear all`}):null]}),e.kind===`unsupported`?(0,w.jsx)(hg,{message:e.message}):e.kind===`error`?(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},children:[`Couldn't load cache — `,e.message,`.`]}):a.length===0?(0,w.jsx)(mg,{}):o.length===0?(0,w.jsx)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},children:`No cached entries match the filter.`}):(0,w.jsx)(`ul`,{className:`ggui-stack__list`,children:o.map((e,t)=>(0,w.jsxs)(`li`,{"data-ggui-cached-item":!0,"data-ggui-cached-id":e.id,className:`ggui-stack__entry`,children:[(0,w.jsxs)(`div`,{className:`ggui-stack__entry-head`,children:[(0,w.jsx)(`span`,{className:`ggui-stack__entry-num`,children:`CCH / ${String(t+1).padStart(2,`0`)}`}),(0,w.jsx)(`span`,{className:`ggui-stack__entry-title`,children:e.cachedIntent}),typeof e.hitCount==`number`?(0,w.jsxs)($,{tone:`ink`,children:[`hits `,e.hitCount]}):null]}),(0,w.jsxs)(`div`,{className:`ggui-stack__entry-meta`,children:[(0,w.jsx)(`code`,{className:`ggui-code`,children:e.id}),(0,w.jsxs)(`span`,{style:{marginLeft:12},children:[`cached `,dg(e.cachedAt)]}),e.lastHitAt?(0,w.jsxs)(`span`,{style:{marginLeft:12},children:[`last hit `,dg(e.lastHitAt)]}):null]}),(0,w.jsx)(`div`,{style:{marginTop:12},children:(0,w.jsx)(`button`,{type:`button`,"data-ggui-cached-invalidate":!0,className:`ggui-btn ggui-btn--ghost`,onClick:()=>{r(e.id)},children:`invalidate ✕`})})]},e.id))})]})}function dg(e){if(!e)return`—`;try{let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toISOString().replace(`T`,` `).replace(/\.\d+Z$/,`Z`)}catch{return e}}function fg({all:e,shown:t,filterActive:n,expanded:r,onToggle:i}){return(0,w.jsxs)(`div`,{"data-ggui-registry-list":`primitives`,className:`ggui-card`,"aria-label":`primitives`,style:{marginTop:24},children:[(0,w.jsxs)(`button`,{type:`button`,"data-ggui-primitives-toggle":!0,onClick:i,className:`ggui-card__head`,style:{width:`100%`,background:`transparent`,border:`none`,textAlign:`left`,cursor:`pointer`,font:`inherit`,color:`inherit`},"aria-expanded":r,children:[(0,w.jsxs)(`span`,{className:`ggui-card__title`,children:[r?`▾`:`▸`,` primitives`]}),(0,w.jsxs)(`span`,{className:`ggui-card__num`,children:[t.length,n&&t.length!==e.length?` / ${e.length}`:``,` available — fyi`]})]}),r?e.length===0?(0,w.jsx)(gg,{}):t.length===0?(0,w.jsx)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},children:`No primitives match the filter.`}):(0,w.jsx)(`ul`,{className:`ggui-card__body`,style:{listStyle:`none`,margin:0,padding:`12px 16px`,display:`flex`,flexWrap:`wrap`,gap:`6px 12px`},children:t.map(e=>(0,w.jsxs)(`li`,{"data-ggui-registry-item":`primitive`,"data-ggui-registry-name":e.name,style:{display:`inline-flex`,alignItems:`center`,gap:6},children:[(0,w.jsx)(`code`,{className:`ggui-code`,children:e.name}),(0,w.jsx)($,{tone:e.source===`package`?`ink`:`draft`,children:e.source})]},`${e.catalog}::${e.name}`))}):null]})}function pg(){return(0,w.jsxs)(`div`,{className:`ggui-card__body`,style:{padding:`16px 12px`},children:[(0,w.jsx)(`p`,{className:`ggui-body`,style:{margin:0},children:`No declared blueprints.`}),(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:`8px 0 0`},children:[`Add include globs to`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui.json#blueprints.include`}),` and colocate each UI with a`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui.ui.json`}),`.`]})]})}function mg(){return(0,w.jsxs)(`div`,{className:`ggui-card__body`,style:{padding:`16px 12px`},children:[(0,w.jsx)(`p`,{className:`ggui-body`,style:{margin:0},children:`No cached generations yet.`}),(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:`8px 0 0`},children:[`Generate a UI from `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`/`}),` (the playground) and the result will land here for future cache hits.`]})]})}function hg({message:e}){return(0,w.jsxs)(`div`,{className:`ggui-card__body`,style:{padding:`16px 12px`},children:[(0,w.jsxs)(`p`,{className:`ggui-body`,style:{margin:0},children:[(0,w.jsx)($,{tone:`signal`,children:`unsupported`}),` Vector store doesn't support enumeration.`]}),(0,w.jsx)(`p`,{className:`ggui-muted`,style:{margin:`8px 0 0`},children:e})]})}function gg(){return(0,w.jsxs)(`div`,{className:`ggui-card__body`,style:{padding:`16px 12px`},children:[(0,w.jsx)(`p`,{className:`ggui-body`,style:{margin:0},children:`No primitives declared.`}),(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:`8px 0 0`},children:[`Declare packages or local catalogs in`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui.json#primitives`}),`.`]})]})}function _g({title:e,num:t,tone:n,children:r}){return(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:e}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:t})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsx)(`p`,{className:`ggui-body`,children:(0,w.jsx)($,{tone:n,children:e})}),(0,w.jsx)(`p`,{className:`ggui-muted`,children:r})]})]})}function vg({blueprint:e,height:t,title:n}){let r=typeof e.codeHash==`string`,i=n??e.variance.persona??`variant ${e.blueprintId.slice(0,8)}`;if(!r)return(0,w.jsx)(`div`,{"data-ggui-variant-preview":!0,"data-ggui-variant-preview-id":e.blueprintId,"data-ggui-variant-preview-state":`pending`,className:`ggui-card`,style:{height:t??320,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,w.jsxs)(`div`,{style:{textAlign:`center`},children:[(0,w.jsx)(`p`,{className:`ggui-body`,style:{margin:0},children:(0,w.jsx)($,{tone:`draft`,children:`pending`})}),(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:`8px 0 0`},children:[`This variant has no code yet — the next render against the same contract will gen against`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:e.blueprintId}),`.`]})]})});let a=`/preview/${encodeURIComponent(e.blueprintId)}`;return(0,w.jsxs)(`div`,{"data-ggui-variant-preview":!0,"data-ggui-variant-preview-id":e.blueprintId,"data-ggui-variant-preview-state":`ready`,className:`ggui-pane`,children:[(0,w.jsxs)(`div`,{className:`ggui-pane__head`,children:[(0,w.jsxs)(`div`,{className:`ggui-pane__traffic`,"aria-hidden":!0,children:[(0,w.jsx)(`span`,{}),(0,w.jsx)(`span`,{}),(0,w.jsx)(`span`,{})]}),(0,w.jsx)(`span`,{className:`ggui-pane__title`,children:i}),(0,w.jsx)(`span`,{className:`ggui-pane__meta`,children:(0,w.jsxs)(`code`,{className:`ggui-code`,children:[e.codeHash?.slice(0,12),`…`]})})]}),(0,w.jsx)(`div`,{className:`ggui-pane__body`,style:{padding:0},children:(0,w.jsx)(`iframe`,{src:a,title:`Preview of ${i}`,sandbox:`allow-scripts allow-same-origin`,style:{width:`100%`,height:t??320,border:`none`,display:`block`}})})]})}function yg({blueprints:e,height:t}){return(0,w.jsx)(`div`,{"data-ggui-variant-comparison":!0,"data-ggui-variant-comparison-count":e.length,style:{display:`grid`,gridTemplateColumns:`repeat(${Math.max(e.length,1)}, minmax(0, 1fr))`,gap:16},children:e.map(e=>(0,w.jsx)(vg,{blueprint:e,height:t,title:e.variance.persona??e.blueprintId.slice(0,12)},e.blueprintId))})}var bg=[`ui-gen-default-haiku-4-5`,`ui-gen-advanced-opus-4-7`],xg=.8,Sg={persona:``,generator:``,draftsOnly:!1};function Cg({filters:e,onChange:t,generatorSlugs:n}){let r=n??bg;return(0,w.jsxs)(`form`,{"data-ggui-variants-filter-bar":!0,className:`ggui-form`,onSubmit:e=>e.preventDefault(),style:{display:`flex`,flexWrap:`wrap`,gap:16,alignItems:`flex-end`,marginBottom:20},children:[(0,w.jsxs)(`div`,{className:`ggui-field`,style:{flex:1,minWidth:200},children:[(0,w.jsx)(`label`,{className:`ggui-label`,htmlFor:`ggui-variants-filter-persona`,children:`persona`}),(0,w.jsx)(`input`,{id:`ggui-variants-filter-persona`,"data-ggui-variants-filter-persona":!0,"aria-label":`filter by persona`,placeholder:`e.g. minimalist, data-dense`,value:e.persona,onChange:n=>{t({...e,persona:n.target.value})},autoCapitalize:`off`,autoCorrect:`off`,spellCheck:!1})]}),(0,w.jsxs)(`div`,{className:`ggui-field`,style:{minWidth:220},children:[(0,w.jsx)(`label`,{className:`ggui-label`,htmlFor:`ggui-variants-filter-generator`,children:`generator`}),(0,w.jsxs)(`select`,{id:`ggui-variants-filter-generator`,"data-ggui-variants-filter-generator":!0,"aria-label":`filter by generator`,value:e.generator,onChange:n=>{t({...e,generator:n.target.value})},children:[(0,w.jsx)(`option`,{value:``,children:`any`}),r.map(e=>(0,w.jsx)(`option`,{value:e,children:e},e))]})]}),(0,w.jsxs)(`label`,{className:`ggui-field`,htmlFor:`ggui-variants-filter-drafts-only`,style:{display:`flex`,alignItems:`center`,gap:6,cursor:`pointer`},children:[(0,w.jsx)(`input`,{id:`ggui-variants-filter-drafts-only`,"data-ggui-variants-filter-drafts-only":!0,type:`checkbox`,"aria-label":`show drafts only`,checked:e.draftsOnly,onChange:n=>{t({...e,draftsOnly:n.target.checked})}}),(0,w.jsxs)(`span`,{className:`ggui-label`,style:{margin:0},children:[`drafts only (score < `,xg.toFixed(2),`)`]})]})]})}function wg(e,t){let n=t.persona.trim().toLowerCase();return!(n.length>0&&!(e.variance.persona?.toLowerCase()??``).includes(n)||t.generator.length>0&&(e.source.kind!==`llm`||e.source.generator!==t.generator)||t.draftsOnly&&(e.validatorScore===void 0||e.validatorScore>=.8))}function Tg(e){return e>=.8?`live`:e>=.5?`draft`:`signal`}function Eg(e){return e.kind===`llm`?e.generator:e.kind}function Dg({blueprint:e,index:t,onPreview:n,onSetDefault:r,onDelete:i,compareSelected:a,onCompareToggle:o}){let s=e.isOperatorDefault===!0,c=e.variance.persona,l=e.validatorScore;return(0,w.jsxs)(`li`,{"data-ggui-variant-card":!0,"data-ggui-variant-id":e.blueprintId,"data-ggui-variant-default":s?`true`:`false`,"data-ggui-variant-compare-selected":a?`true`:`false`,className:`ggui-stack__entry`,style:a?{outline:`2px solid var(--ggui-ink, #292929)`}:void 0,children:[(0,w.jsxs)(`div`,{className:`ggui-stack__entry-head`,children:[(0,w.jsx)(`span`,{className:`ggui-stack__entry-num`,children:`VAR / ${String(t+1).padStart(2,`0`)}`}),(0,w.jsxs)(`span`,{className:`ggui-stack__entry-title`,children:[s?(0,w.jsx)(`span`,{"aria-label":`operator default`,children:`★ `}):null,c&&c.length>0?c:`(no persona)`]}),c?(0,w.jsxs)($,{tone:`ink`,children:[`persona: `,c]}):null,(0,w.jsx)($,{tone:`ink`,children:Eg(e.source)}),typeof l==`number`?(0,w.jsxs)($,{tone:Tg(l),children:[`score `,l.toFixed(2)]}):null,(0,w.jsxs)($,{tone:e.createdBy===`operator`?`live`:`draft`,children:[`by `,e.createdBy]})]}),(0,w.jsxs)(`div`,{className:`ggui-stack__entry-meta`,children:[(0,w.jsx)(`code`,{className:`ggui-code`,children:e.blueprintId}),(0,w.jsxs)(`span`,{style:{marginLeft:12},children:[`created `,Og(e.createdAt)]}),e.codeHash?(0,w.jsxs)(`span`,{style:{marginLeft:12},children:[`hash `,(0,w.jsx)(`code`,{className:`ggui-code`,children:kg(e.codeHash)})]}):(0,w.jsx)(`span`,{style:{marginLeft:12},children:(0,w.jsx)($,{tone:`signal`,children:`no code`})})]}),e.variance.seedPrompt?(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:`8px 0 0`,fontStyle:`italic`},children:[`“`,e.variance.seedPrompt,`”`]}):null,(0,w.jsxs)(`div`,{style:{display:`flex`,gap:8,marginTop:12,flexWrap:`wrap`},children:[(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,"data-ggui-variant-action":`preview`,onClick:()=>n(e.blueprintId),children:`preview →`}),(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,"data-ggui-variant-action":`set-default`,disabled:s,onClick:()=>r(e.blueprintId),title:s?`Already the operator default for this contract`:`Pin as the operator default for this contract`,children:s?`★ default`:`set as default`}),o?(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,"data-ggui-variant-action":`compare-toggle`,onClick:()=>o(e.blueprintId),children:a?`✓ in compare`:`add to compare`}):null,(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,"data-ggui-variant-action":`delete`,onClick:()=>i(e.blueprintId),children:`delete ✕`})]})]})}function Og(e){if(!e)return`—`;try{let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toISOString().replace(`T`,` `).replace(/\.\d+Z$/,`Z`)}catch{return e}}function kg(e){return e.length<=12?e:`${e.slice(0,8)}…${e.slice(-4)}`}var Ag=class extends Error{code;status;constructor(e,t,n){super(e),this.name=`OpsCallError`,this.code=t,n!==void 0&&(this.status=n)}},jg=1;async function Mg(e){if((e.headers.get(`content-type`)??``).includes(`text/event-stream`)){let t=await e.text(),n=/^data:\s*(.+)$/m.exec(t);if(!n||!n[1])throw new Ag(`Malformed SSE response from /control — no data line`,-32700,e.status);return JSON.parse(n[1])}return await e.json()}async function Ng(e,t,n){let r=jg++,i={method:`POST`,headers:{"content-type":`application/json`,accept:`application/json, text/event-stream`},body:JSON.stringify({jsonrpc:`2.0`,id:r,method:`tools/call`,params:{name:e,arguments:t}})};n!==void 0&&(i.signal=n);let a=await fetch(`/control`,i);if(!a.ok&&a.status!==200){let e=await a.text().catch(()=>``);throw new Ag(`/control returned HTTP ${a.status}${e?` — ${e}`:``}`,-32e3,a.status)}let o=await Mg(a);if(`error`in o)throw new Ag(o.error.message,o.error.code);let s=o.result;if(s.isError)throw new Ag(s.content?.[0]?.text??`tool reported error`,-32e3);if(s.structuredContent!==void 0)return s.structuredContent;let c=s.content?.[0]?.text;if(typeof c==`string`&&c.length>0)return JSON.parse(c);throw new Ag(`tool ${e} returned empty result`,-32e3)}function Pg(e,t){return Ng(`ggui_ops_generate_blueprint`,{...e,confirm:!0},t)}function Fg(e,t){return Ng(`ggui_ops_list_blueprints`,e,t)}function Ig(e,t){return Ng(`ggui_ops_update_blueprint`,{...e,confirm:!0},t)}function Lg(e,t){return Ng(`ggui_ops_delete_blueprint`,{...e,confirm:!0},t)}function Rg({contractHash:e}){let[t,n]=(0,S.useState)({kind:`loading`}),[r,i]=(0,S.useState)([]),[a,o]=(0,S.useState)(!1),s=(0,S.useCallback)(async t=>{n({kind:`loading`});try{let r=await Fg({contractHash:e},t);n({kind:`ready`,blueprints:r.blueprints})}catch(e){if(t?.aborted)return;let r=e instanceof Ag||e instanceof Error?e.message:String(e);n({kind:`error`,message:r})}},[e]);(0,S.useEffect)(()=>{let e=new AbortController;return s(e.signal),()=>e.abort()},[s]);let c=(0,S.useMemo)(()=>t.kind===`ready`?[...t.blueprints].sort((e,t)=>{let n=+(e.isOperatorDefault===!0),r=+(t.isOperatorDefault===!0);if(n!==r)return r-n;let i=e.validatorScore??-1,a=t.validatorScore??-1;return i===a?t.createdAt.localeCompare(e.createdAt):a-i}):[],[t]),l=c[0]?.contract,u=(0,S.useMemo)(()=>a?c.filter(e=>r.includes(e.blueprintId)):[],[c,r,a]),d=(0,S.useCallback)(e=>{E(`/preview/${encodeURIComponent(e)}`)},[]),f=(0,S.useCallback)(async e=>{try{await Ig({blueprintId:e,isOperatorDefault:!0}),await s()}catch(e){let t=e instanceof Ag||e instanceof Error?e.message:String(e);n({kind:`error`,message:t})}},[s]),p=(0,S.useCallback)(async e=>{try{await Lg({blueprintId:e}),i(t=>t.filter(t=>t!==e)),await s()}catch(e){let t=e instanceof Ag||e instanceof Error?e.message:String(e);n({kind:`error`,message:t})}},[s]),m=(0,S.useCallback)(e=>{i(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},[]);return(0,w.jsxs)(`section`,{className:`ggui-section`,"data-ggui-variant-detail":!0,"data-ggui-variant-detail-hash":e,children:[(0,w.jsx)(T,{num:`01 / contract`,title:`One contract — many variants.`,mute:`hash ${e.slice(0,16)}…`,intro:(0,w.jsxs)(w.Fragment,{children:[`Every variant the server has for this contract, grouped under the canonical`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`contractHash`}),`. Pick two with the "add to compare" toggle, hit Compare selected, and read aesthetics side-by-side.`]})}),(0,w.jsxs)(`div`,{style:{marginBottom:16},children:[(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,onClick:()=>E(`/admin/variants`),children:`← all variants`}),` `,(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn`,"data-ggui-variant-detail-generate":!0,onClick:()=>E(`/admin/variants/${encodeURIComponent(e)}/generate`),children:`generate new variant +`})]}),t.kind===`error`?(0,w.jsxs)(`div`,{className:`ggui-card`,style:{marginBottom:20},children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`error`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`ERR / 01`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsxs)(`p`,{className:`ggui-body`,children:[(0,w.jsx)($,{tone:`signal`,children:`error`}),` Couldn't load variants — `,t.message,`.`]}),(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,onClick:()=>{s()},children:`retry →`})]})]}):null,l?(0,w.jsxs)(`div`,{className:`ggui-card`,style:{marginBottom:20},children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`contract`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`CTR / 01`})]}),(0,w.jsx)(`div`,{className:`ggui-card__body`,children:(0,w.jsx)(`pre`,{"data-ggui-variant-detail-contract":!0,className:`ggui-code`,style:{whiteSpace:`pre-wrap`,wordBreak:`break-word`,maxHeight:280,overflow:`auto`,padding:12,background:`var(--ggui-paper2, #ebe9e1)`,borderRadius:4,margin:0,fontSize:`0.75rem`},children:JSON.stringify(l,null,2)})})]}):null,t.kind===`loading`?(0,w.jsx)(`p`,{className:`ggui-body`,children:`Loading variants…`}):c.length===0?(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`empty`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`VAR / 00`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsx)(`p`,{className:`ggui-body`,children:`No variants registered for this contract.`}),(0,w.jsx)(`p`,{className:`ggui-muted`,children:`Click "generate new variant" above to author the first one.`})]})]}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(`div`,{"data-ggui-variant-compare-controls":!0,style:{display:`flex`,gap:12,alignItems:`center`,marginBottom:16},children:[(0,w.jsxs)($,{tone:`ink`,children:[r.length,` selected`]}),(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn`,"data-ggui-variant-compare-run":!0,disabled:r.length<2,onClick:()=>o(!0),children:`compare selected →`}),a?(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,"data-ggui-variant-compare-clear":!0,onClick:()=>{o(!1),i([])},children:`exit compare`}):null]}),a&&u.length>=2?(0,w.jsx)(`div`,{"data-ggui-variant-compare-set":u.length,style:{marginBottom:24},children:(0,w.jsx)(yg,{blueprints:u,height:420})}):(0,w.jsx)(`div`,{className:`ggui-stack`,style:{marginBottom:24},"aria-label":`variants and preview`,children:c.map((e,t)=>(0,w.jsxs)(`article`,{"data-ggui-variant-detail-row":!0,"data-ggui-variant-detail-row-id":e.blueprintId,style:{display:`grid`,gridTemplateColumns:`minmax(0, 1fr) minmax(0, 1fr)`,gap:16,padding:12,borderBottom:`1px solid var(--ggui-line2, #d6d4cb)`},children:[(0,w.jsx)(`ul`,{className:`ggui-stack__list`,style:{listStyle:`none`,margin:0,padding:0},children:(0,w.jsx)(Dg,{blueprint:e,index:t,onPreview:d,onSetDefault:e=>{f(e)},onDelete:e=>{p(e)},compareSelected:r.includes(e.blueprintId),onCompareToggle:m})}),(0,w.jsx)(vg,{blueprint:e,height:240})]},e.blueprintId))})]})]})}function zg({contract:e,contractHash:t,onSubmit:n,onCancel:r,generatorSlugs:i}){let[a,o]=(0,S.useState)(``),[s,c]=(0,S.useState)(``),[l,u]=(0,S.useState)(``),[d,f]=(0,S.useState)(``),[p,m]=(0,S.useState)(!1),[h,g]=(0,S.useState)({kind:`idle`}),_=async t=>{t.preventDefault();let r;if(d.trim().length>0)try{let e=JSON.parse(d);if(typeof e!=`object`||!e||Array.isArray(e)){g({kind:`error`,message:`context must be a JSON object (e.g. {"foo": "bar"})`});return}r=e}catch(e){g({kind:`error`,message:`context JSON parse failed — ${e instanceof Error?e.message:String(e)}`});return}g({kind:`pending`});let i={contract:e,...l.length>0?{generator:l}:{},...a.trim().length>0?{persona:a.trim()}:{},...r===void 0?{}:{context:r},...s.trim().length>0?{seedPrompt:s.trim()}:{},...p?{setAsOperatorDefault:!0}:{}};try{let e=await n(i);`error`in e&&g({kind:`error`,message:e.error})}catch(e){g({kind:`error`,message:e instanceof Error?e.message:String(e)})}},v=i??bg;return(0,w.jsxs)(`form`,{"data-ggui-variant-generate-form":!0,"data-ggui-variant-generate-state":h.kind,className:`ggui-form`,onSubmit:_,children:[(0,w.jsxs)(Bg,{title:`contract`,num:`GEN / 01`,children:[(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:`0 0 8px`},children:[`Contract hash`,` `,(0,w.jsxs)(`code`,{className:`ggui-code`,children:[t.slice(0,16),`…`]}),` `,`— read-only; create variants for the same contract here.`]}),(0,w.jsx)(`pre`,{className:`ggui-code`,style:{whiteSpace:`pre-wrap`,wordBreak:`break-word`,maxHeight:200,overflow:`auto`,padding:12,background:`var(--ggui-paper2, #ebe9e1)`,borderRadius:4,margin:0,fontSize:`0.75rem`},children:JSON.stringify(e,null,2)})]}),(0,w.jsxs)(Bg,{title:`variance`,num:`GEN / 02`,children:[(0,w.jsxs)(`div`,{className:`ggui-field`,children:[(0,w.jsx)(`label`,{className:`ggui-label`,htmlFor:`ggui-gen-persona`,children:`persona`}),(0,w.jsx)(`input`,{id:`ggui-gen-persona`,name:`persona`,"data-ggui-variant-generate-persona":!0,placeholder:`e.g. minimalist, data-dense, mobile-first`,value:a,onChange:e=>o(e.target.value),autoCapitalize:`off`,autoCorrect:`off`,spellCheck:!1})]}),(0,w.jsxs)(`div`,{className:`ggui-field`,children:[(0,w.jsx)(`label`,{className:`ggui-label`,htmlFor:`ggui-gen-seed`,children:`seed prompt`}),(0,w.jsx)(`textarea`,{id:`ggui-gen-seed`,name:`seedPrompt`,"data-ggui-variant-generate-seed":!0,placeholder:`e.g. use a glassy card with rounded corners…`,value:s,onChange:e=>c(e.target.value),rows:3})]}),(0,w.jsxs)(`div`,{className:`ggui-field`,children:[(0,w.jsx)(`label`,{className:`ggui-label`,htmlFor:`ggui-gen-context`,children:`context (JSON object, optional)`}),(0,w.jsx)(`textarea`,{id:`ggui-gen-context`,name:`context`,"data-ggui-variant-generate-context":!0,placeholder:`{"locale": "en", "density": "compact"}`,value:d,onChange:e=>f(e.target.value),rows:3,spellCheck:!1,style:{fontFamily:`var(--ggui-font-mono, monospace)`}})]})]}),(0,w.jsxs)(Bg,{title:`dispatch`,num:`GEN / 03`,children:[(0,w.jsxs)(`div`,{className:`ggui-field`,children:[(0,w.jsx)(`label`,{className:`ggui-label`,htmlFor:`ggui-gen-generator`,children:`generator`}),(0,w.jsxs)(`select`,{id:`ggui-gen-generator`,name:`generator`,"data-ggui-variant-generate-generator":!0,value:l,onChange:e=>u(e.target.value),children:[(0,w.jsx)(`option`,{value:``,children:`(registry default)`}),v.map(e=>(0,w.jsx)(`option`,{value:e,children:e},e))]})]}),(0,w.jsxs)(`label`,{className:`ggui-field`,htmlFor:`ggui-gen-set-default`,style:{display:`flex`,alignItems:`center`,gap:6,cursor:`pointer`},children:[(0,w.jsx)(`input`,{id:`ggui-gen-set-default`,"data-ggui-variant-generate-set-default":!0,type:`checkbox`,checked:p,onChange:e=>m(e.target.checked)}),(0,w.jsx)(`span`,{className:`ggui-label`,style:{margin:0},children:`pin as operator default for this contract`})]})]}),h.kind===`error`?(0,w.jsxs)(`p`,{className:`ggui-body`,children:[(0,w.jsx)($,{tone:`signal`,children:`error`}),` `,h.message]}):null,(0,w.jsxs)(`div`,{style:{display:`flex`,gap:12,marginTop:16},children:[(0,w.jsx)(`button`,{type:`submit`,className:`ggui-btn`,"data-ggui-variant-generate-submit":!0,disabled:h.kind===`pending`,children:h.kind===`pending`?`generating…`:`generate →`}),r?(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,onClick:r,disabled:h.kind===`pending`,children:`cancel`}):null]})]})}function Bg({title:e,num:t,children:n}){return(0,w.jsxs)(`div`,{className:`ggui-card`,style:{marginBottom:16},children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:e}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:t})]}),(0,w.jsx)(`div`,{className:`ggui-card__body`,children:n})]})}function Vg({contractHash:e}){let[t,n]=(0,S.useState)({kind:`loading`});return(0,S.useEffect)(()=>{let t=new AbortController;return(async()=>{try{let r=await Fg({contractHash:e},t.signal);if(t.signal.aborted)return;if(r.blueprints.length===0){n({kind:`empty`});return}let i=r.blueprints[0];n({kind:`ready`,contract:i.contract,variantCount:r.blueprints.length})}catch(e){if(t.signal.aborted)return;let r=e instanceof Ag||e instanceof Error?e.message:String(e);n({kind:`error`,message:r})}})(),()=>t.abort()},[e]),(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`01 / generate`,title:`Author a new variant.`,mute:`hash ${e.slice(0,16)}…`,intro:(0,w.jsxs)(w.Fragment,{children:[`Forks the contract from an existing variant in this group and dispatches it through`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui_ops_generate_blueprint`}),` `,`with your persona + context + seed prompt. The new blueprint persists under the same`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`contractHash`}),`.`]})}),(0,w.jsx)(`div`,{style:{marginBottom:16},children:(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,onClick:()=>E(`/admin/variants/${encodeURIComponent(e)}`),children:`← contract detail`})}),t.kind===`loading`?(0,w.jsx)(`p`,{className:`ggui-body`,children:`Loading contract…`}):t.kind===`error`?(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`error`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`ERR / 01`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsxs)(`p`,{className:`ggui-body`,children:[(0,w.jsx)($,{tone:`signal`,children:`error`}),` `,`Couldn't load contract — `,t.message,`.`]}),(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,onClick:()=>E(`/admin/variants`),children:`← all variants`})]})]}):t.kind===`empty`?(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`empty`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`VAR / 00`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsxs)(`p`,{className:`ggui-body`,children:[`No variant exists for hash`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:e}),` yet.`]}),(0,w.jsx)(`p`,{className:`ggui-muted`,children:`The generate form needs an existing variant to fork the contract from. Either trigger a render from an agent first (which will mint the initial variant), or navigate back and pick a contract with at least one variant.`}),(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,onClick:()=>E(`/admin/variants`),children:`← all variants`})]})]}):(0,w.jsx)(zg,{contract:t.contract,contractHash:e,onSubmit:async e=>{try{let t=await Pg(e);return E(`/preview/${encodeURIComponent(t.blueprintId)}`),{blueprintId:t.blueprintId}}catch(e){return{error:e instanceof Ag||e instanceof Error?e.message:String(e)}}},onCancel:()=>E(`/admin/variants/${encodeURIComponent(e)}`)})]})}function Hg(e){let t=new Map;for(let n of e){let e=t.get(n.contractHash);e?e.push(n):t.set(n.contractHash,[n])}return Array.from(t.entries()).map(([e,t])=>{let n=[...t].sort((e,t)=>{let n=+(e.isOperatorDefault===!0),r=+(t.isOperatorDefault===!0);if(n!==r)return r-n;let i=e.validatorScore??-1,a=t.validatorScore??-1;return i===a?t.createdAt.localeCompare(e.createdAt):a-i}),r=n[0];return{contractHash:e,intent:r!==void 0&&typeof r.contract==`object`&&r.contract!==null&&`intent`in r.contract&&typeof r.contract.intent==`string`?r.contract.intent:`(contract ${e.slice(0,10)}…)`,blueprints:n}}).sort((e,t)=>{let n=e.blueprints[0]?.createdAt??``;return(t.blueprints[0]?.createdAt??``).localeCompare(n)})}function Ug({blueprints:e,filters:t,onPreview:n,onSetDefault:r,onDelete:i,onOpenContract:a,onGenerate:o}){let s=(0,S.useMemo)(()=>Hg(e),[e]);return e.length===0?(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`empty`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`VAR / 00`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsx)(`p`,{className:`ggui-body`,style:{margin:0},children:`No blueprints for this app yet.`}),(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:`8px 0 0`},children:[`Generate one via the per-contract page, or wait for an agent to render a contract through`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui_handshake`}),`.`]})]})]}):(0,w.jsx)(`div`,{"data-ggui-variants-list":!0,"aria-label":`blueprint variants`,children:s.map(e=>(0,w.jsx)(Wg,{group:e,filters:t,onPreview:n,onSetDefault:r,onDelete:i,onOpenContract:a,onGenerate:o},e.contractHash))})}function Wg({group:e,filters:t,onPreview:n,onSetDefault:r,onDelete:i,onOpenContract:a,onGenerate:o}){let[s,c]=(0,S.useState)(!0),l=e.blueprints.filter(e=>wg(e,t));return(0,w.jsxs)(`section`,{"data-ggui-variants-group":!0,"data-ggui-variants-group-hash":e.contractHash,"data-ggui-variants-group-count":l.length,className:`ggui-stack`,style:{marginBottom:24},children:[(0,w.jsxs)(`header`,{className:`ggui-stack__head`,style:{alignItems:`center`,gap:12},children:[(0,w.jsxs)(`button`,{type:`button`,"aria-expanded":s,"data-ggui-variants-group-toggle":!0,onClick:()=>c(e=>!e),className:`ggui-stack__num`,style:{background:`transparent`,border:`none`,font:`inherit`,cursor:`pointer`,color:`inherit`,padding:0},children:[s?`▾`:`▸`,` VAR`]}),(0,w.jsx)(`span`,{className:`ggui-stack__label`,children:e.intent}),(0,w.jsxs)($,{tone:`ink`,children:[l.length,l.length===e.blueprints.length?``:` / ${e.blueprints.length}`,` `,`variant`,l.length===1?``:`s`]}),(0,w.jsxs)(`code`,{className:`ggui-code`,style:{marginLeft:`auto`,fontSize:`0.75rem`},children:[e.contractHash.slice(0,16),`…`]}),(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,"data-ggui-variants-group-open":!0,onClick:()=>a(e.contractHash),children:`open →`}),(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,"data-ggui-variants-group-generate":!0,onClick:()=>o(e.contractHash),children:`generate variant +`})]}),s?l.length===0?(0,w.jsx)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},children:`No variants in this group match the active filters.`}):(0,w.jsx)(`ul`,{className:`ggui-stack__list`,children:l.map((e,t)=>(0,w.jsx)(Dg,{blueprint:e,index:t,onPreview:n,onSetDefault:r,onDelete:i},e.blueprintId))}):null]})}function Gg(){let[e,t]=(0,S.useState)({kind:`loading`}),[n,r]=(0,S.useState)(Sg),i=(0,S.useCallback)(async e=>{t({kind:`loading`});try{let n=await Fg({},e);t({kind:`ready`,blueprints:n.blueprints})}catch(n){if(e?.aborted)return;let r=n instanceof Ag||n instanceof Error?n.message:String(n);t({kind:`error`,message:r})}},[]);(0,S.useEffect)(()=>{let e=new AbortController;return i(e.signal),()=>e.abort()},[i]);let a=(0,S.useCallback)(e=>{E(`/preview/${encodeURIComponent(e)}`)},[]),o=(0,S.useCallback)(async e=>{try{await Ig({blueprintId:e,isOperatorDefault:!0}),await i()}catch(e){let n=e instanceof Ag||e instanceof Error?e.message:String(e);t({kind:`error`,message:n})}},[i]),s=(0,S.useCallback)(async e=>{try{await Lg({blueprintId:e}),await i()}catch(e){let n=e instanceof Ag||e instanceof Error?e.message:String(e);t({kind:`error`,message:n})}},[i]),c=(0,S.useCallback)(e=>{E(`/admin/variants/${encodeURIComponent(e)}`)},[]),l=(0,S.useCallback)(e=>{E(`/admin/variants/${encodeURIComponent(e)}/generate`)},[]);return(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`01 / variants`,title:`Blueprint variants — N codes per contract.`,mute:`Operator-pinned defaults · validatorScore · personas.`,intro:(0,w.jsx)(w.Fragment,{children:`Every blueprint variant the server has for the current app, grouped by the contract they implement. The matcher picks among siblings in a group at handshake time — pin one as the operator default to fix the floor, or seed personas for the LLM selector (MVB-6) to choose from.`})}),e.kind===`error`?(0,w.jsxs)(`div`,{className:`ggui-card`,style:{marginBottom:20},children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`error`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`ERR / 01`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsxs)(`p`,{className:`ggui-body`,children:[(0,w.jsx)($,{tone:`signal`,children:`error`}),` Couldn't load variants — `,e.message,`.`]}),(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,onClick:()=>{i()},children:`retry →`})]})]}):null,(0,w.jsx)(Cg,{filters:n,onChange:r}),e.kind===`loading`?(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`loading`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`VAR / 01`})]}),(0,w.jsx)(`div`,{className:`ggui-card__body`,children:(0,w.jsx)(`p`,{className:`ggui-body`,children:`Loading variants…`})})]}):e.kind===`ready`?(0,w.jsx)(Ug,{blueprints:e.blueprints,filters:n,onPreview:a,onSetDefault:e=>{o(e)},onDelete:e=>{s(e)},onOpenContract:c,onGenerate:l}):null]})}function Kg(){let[e,t]=(0,S.useState)({kind:`loading`}),[n,r]=(0,S.useState)(null),[i,a]=(0,S.useState)(null),o=async()=>{t({kind:`loading`});try{let e=await fetch(`/ggui/console/oauth-clients`,{headers:{accept:`application/json`}});if(!e.ok){if(e.status===404){t({kind:`error`,message:"OAuth not enabled on this server — re-run `ggui serve --oauth` to mount the management routes."});return}t({kind:`error`,message:`server returned ${e.status}`});return}let n=await e.json();t({kind:`ready`,data:n})}catch(e){t({kind:`error`,message:String(e)})}};(0,S.useEffect)(()=>{o()},[]);let s=async e=>{r(e);try{let n=await fetch(`/ggui/console/oauth-clients/${encodeURIComponent(e)}`,{method:`DELETE`});if(n.status!==204){t({kind:`error`,message:`revoke failed — server returned ${n.status}`});return}a(null),await o()}catch(e){t({kind:`error`,message:`revoke failed — ${String(e)}`})}finally{r(null)}};return(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`01 / clients`,title:`Connected apps.`,mute:`OAuth clients that have registered against this server.`,intro:(0,w.jsxs)(w.Fragment,{children:[`Each row is an OAuth client (typically an MCP custom-connector host like claude.ai) that completed`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`/oauth/register`}),` against this server. Revoke removes the registration so future re-discovery fails — Phase 1 caveat:`,` `,(0,w.jsx)(`strong`,{children:`existing bearers keep working`}),` until they expire or you re-pair.`]})}),e.kind===`loading`?(0,w.jsx)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},children:`Loading clients…`}):e.kind===`error`?(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},"data-ggui-clients-error":!0,children:[`Couldn't load clients — `,e.message]}):(0,w.jsx)(qg,{clients:e.data.clients,revokingId:n,pendingConfirm:i,onRevokeRequest:e=>a(e),onRevokeCancel:()=>a(null),onRevokeConfirm:e=>{s(e)},onRefresh:()=>{o()}})]})}function qg({clients:e,revokingId:t,pendingConfirm:n,onRevokeRequest:r,onRevokeCancel:i,onRevokeConfirm:a,onRefresh:o}){return e.length===0?(0,w.jsxs)(`div`,{className:`ggui-stack`,"data-ggui-clients-list":!0,"aria-label":`connected apps (empty)`,children:[(0,w.jsxs)(`div`,{className:`ggui-stack__head`,children:[(0,w.jsx)(`span`,{className:`ggui-stack__num`,children:`CON`}),(0,w.jsx)(`span`,{className:`ggui-stack__label`,children:`connected apps`}),(0,w.jsx)(`span`,{className:`ggui-stack__count`,children:`0`})]}),(0,w.jsx)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},children:`No clients have registered yet. Add this server as a custom connector in claude.ai (or another MCP host) — its OAuth flow will register a client here.`})]}):(0,w.jsxs)(`div`,{"data-ggui-clients-list":!0,className:`ggui-stack`,"aria-label":`connected apps`,children:[(0,w.jsxs)(`div`,{className:`ggui-stack__head`,children:[(0,w.jsx)(`span`,{className:`ggui-stack__num`,children:`CON`}),(0,w.jsx)(`span`,{className:`ggui-stack__label`,children:`connected apps`}),(0,w.jsx)(`span`,{className:`ggui-stack__count`,children:e.length}),(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,onClick:o,style:{marginLeft:`auto`},children:`refresh`})]}),(0,w.jsx)(`ul`,{className:`ggui-stack__list`,children:e.map((e,o)=>(0,w.jsx)(Jg,{client:e,index:o+1,isRevoking:t===e.clientId,isPendingConfirm:n===e.clientId,onRevokeRequest:r,onRevokeCancel:i,onRevokeConfirm:a},e.clientId))})]})}function Jg({client:e,index:t,isRevoking:n,isPendingConfirm:r,onRevokeRequest:i,onRevokeCancel:a,onRevokeConfirm:o}){let s=e.clientId.slice(0,12),c=e.clientName??s;return(0,w.jsxs)(`li`,{"data-ggui-client-id":e.clientId,className:`ggui-stack__entry`,style:{opacity:n?.5:1},children:[(0,w.jsxs)(`div`,{className:`ggui-stack__entry-head`,children:[(0,w.jsx)(`span`,{className:`ggui-stack__entry-num`,children:`CON / ${String(t).padStart(2,`0`)}`}),(0,w.jsx)(`span`,{className:`ggui-stack__entry-title`,children:c})]}),(0,w.jsxs)(`div`,{className:`ggui-stack__entry-meta`,children:[(0,w.jsxs)(`span`,{children:[`id `,(0,w.jsxs)(`code`,{className:`ggui-code`,children:[s,`…`]})]}),(0,w.jsxs)(`span`,{style:{marginLeft:12},children:[`registered`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:Yg(e.createdAt)})]})]}),e.redirectUris.length>0?(0,w.jsx)(`div`,{className:`ggui-stack__entry-meta`,style:{marginTop:4},children:(0,w.jsxs)(`span`,{children:[`redirect`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:e.redirectUris[0]}),e.redirectUris.length>1?` (+${e.redirectUris.length-1} more)`:``]})}):null,(0,w.jsx)(`div`,{style:{marginTop:12,display:`flex`,gap:10,alignItems:`center`},children:r?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn`,"data-ggui-client-revoke":!0,disabled:n,onClick:()=>o(e.clientId),children:n?`revoking…`:`confirm revoke`}),(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,disabled:n,onClick:a,children:`cancel`})]}):(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,"data-ggui-client-revoke":!0,disabled:n,onClick:()=>i(e.clientId),children:`revoke`})})]})}function Yg(e){let t=Date.now()-e;if(t<0)return`just now`;let n=Math.floor(t/1e3);if(n<60)return`${n}s ago`;let r=Math.floor(n/60);if(r<60)return`${r}m ago`;let i=Math.floor(r/60);return i<24?`${i}h ago`:`${Math.floor(i/24)}d ago`}var Xg=new Set([`theme`]),Zg={blueprints:{path:`/admin/blueprints`,label:`browse blueprints →`,mute:`The Blueprints page renders every entry with its primitives + props.`},primitives:{path:`/admin/blueprints`,label:`browse primitives →`,mute:`Primitives surface alongside blueprints on the Blueprints page.`},mcpMounts:{path:`/admin/tools`,label:`open Tools →`,mute:`The Tools page lists every mounted MCP tool with its handler + schema.`},storage:{path:`/admin/status`,label:`open Status →`,mute:`The Status dashboard shows render + vector-store backends as live wiring.`},agent:{path:`/admin/status`,label:`open Status →`,mute:`The Status dashboard shows agent + generation wiring.`}};function Qg(){let[e,t]=(0,S.useState)({kind:`loading`});return(0,S.useEffect)(()=>{let e=new AbortController;return(async()=>{try{let n=await fetch(`/ggui/console/config`,{signal:e.signal,headers:{accept:`application/json`}});if(!n.ok){t({kind:`error`,message:`server returned ${n.status}`});return}let r=await n.json();t({kind:`ready`,data:r})}catch(n){if(e.signal.aborted)return;t({kind:`error`,message:String(n)})}})(),()=>e.abort()},[]),e.kind===`loading`?(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`01 / config`,title:`ggui.json viewer.`,mute:`Probing project root.`}),(0,w.jsx)(c_,{title:`loading`,num:`CFG / 01`,tone:`draft`,children:`Loading config…`})]}):e.kind===`error`?(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`01 / config`,title:`ggui.json viewer.`,mute:`Endpoint unreachable.`}),(0,w.jsxs)(c_,{title:`error`,num:`ERR / 01`,tone:`signal`,children:[`Couldn't load config — `,e.message,`.`]})]}):(0,w.jsx)($g,{data:e.data})}function $g({data:e}){let t=(0,S.useMemo)(()=>Object.keys(e.schema.properties??{}).filter(e=>!Xg.has(e)),[e.schema]),[n,r]=(0,S.useState)(t[0]??``),i=e.source.found?e.source.error?`found-invalid`:`found-valid`:`missing`;return(0,w.jsxs)(`section`,{className:`ggui-section`,"data-ggui-config-source":i,children:[(0,w.jsx)(T,{num:`01 / admin / config`,title:`ggui.json — read-only manifest view.`,mute:e_(e),intro:(0,w.jsxs)(w.Fragment,{children:[`Debug view of every top-level field your`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui.json`}),` can carry. Descriptions come from the Zod schema; the value column shows what your manifest currently sets (or the schema default when omitted). To `,(0,w.jsx)(`strong`,{children:`author`}),` theme, paired keys, OAuth providers, etc., use the dedicated pages in the admin sub-nav — this page is just for inspection.`]})}),(0,w.jsx)(t_,{data:e}),i===`found-invalid`?null:(0,w.jsxs)(`div`,{className:`ggui-config-stack`,children:[(0,w.jsx)(n_,{sections:t,active:n,onSelect:r}),(0,w.jsx)(r_,{data:e,active:n})]}),e.source.found&&`raw`in e&&e.raw?(0,w.jsx)(s_,{raw:e.raw}):null]})}function e_(e){return e.source.found?e.source.error?`Validation failed.`:`Loaded from disk.`:`No ggui.json reachable.`}function t_({data:e}){return e.source.found?e.source.error?(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`validation failed`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`SRC / 01`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsx)(`p`,{className:`ggui-body`,children:(0,w.jsx)($,{tone:`signal`,children:`invalid`})}),(0,w.jsx)(`p`,{className:`ggui-muted`,children:(0,w.jsx)(`code`,{className:`ggui-code`,children:e.source.path})}),(0,w.jsx)(`pre`,{className:`ggui-config-error`,children:e.source.error.message})]})]}):(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`source`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`SRC / 01`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsx)(`p`,{className:`ggui-body`,children:(0,w.jsx)($,{tone:`live`,children:`loaded`})}),(0,w.jsx)(`p`,{className:`ggui-muted`,children:(0,w.jsx)(`code`,{className:`ggui-code`,children:e.source.path})})]})]}):(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`no manifest`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`SRC / 01`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsx)(`p`,{className:`ggui-body`,children:(0,w.jsx)($,{tone:`ink`,children:`missing`})}),(0,w.jsxs)(`p`,{className:`ggui-muted`,children:[`No `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui.json`}),` walked up from`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:e.source.searchedFrom}),`. The schema below shows what would be configurable; create a`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui.json`}),` at the project root and reload.`]})]})]})}function n_({sections:e,active:t,onSelect:n}){return(0,w.jsx)(`nav`,{"aria-label":`config sections`,"data-ggui-config-active-section":t,children:(0,w.jsx)(`ul`,{className:`ggui-config-tabs`,role:`tablist`,children:e.map(e=>(0,w.jsx)(`li`,{"data-ggui-config-section":e,role:`presentation`,children:(0,w.jsx)(`button`,{type:`button`,role:`tab`,onClick:()=>n(e),"aria-selected":e===t?`true`:`false`,"aria-current":e===t?`true`:void 0,className:`ggui-config-tabs__btn${e===t?` is-active`:``}`,children:e})},e))})})}function r_({data:e,active:t}){let n=e.schema.properties?.[t],r=e.source.found&&`manifest`in e&&e.manifest?e.manifest[t]:void 0,i=e.schema.required?.includes(t)??!1;if(!n)return(0,w.jsx)(`div`,{className:`ggui-config-panel`,children:(0,w.jsxs)(`p`,{className:`ggui-muted`,children:[`No schema for "`,t,`".`]})});let a=Zg[t];return(0,w.jsxs)(`div`,{className:`ggui-config-panel`,"data-ggui-config-section":t,children:[(0,w.jsxs)(`div`,{className:`ggui-config-panel__head`,children:[(0,w.jsx)(`span`,{className:`ggui-config-panel__name`,children:(0,w.jsx)(`code`,{className:`ggui-code`,children:t})}),i?(0,w.jsx)($,{tone:`signal`,children:`required`}):(0,w.jsx)($,{tone:`ink`,children:`optional`}),(0,w.jsx)(`span`,{className:`ggui-config-panel__type`,children:i_(n)})]}),a?(0,w.jsx)(a_,{link:a}):null,n.description?(0,w.jsx)(`p`,{className:`ggui-body`,style:{margin:`12px 0`},children:n.description}):(0,w.jsx)(`p`,{className:`ggui-muted`,children:`No description on the schema — file a bug if this is a known field.`}),(0,w.jsx)(o_,{label:`current`,value:r,absentNote:`not set in your manifest — schema default applies`}),n.default===void 0?(0,w.jsx)(o_,{label:`default`,value:void 0,absentNote:`no default — must be set explicitly when used`}):(0,w.jsx)(o_,{label:`default`,value:n.default}),n.enum?(0,w.jsx)(o_,{label:`allowed`,value:n.enum}):null,(0,w.jsxs)(`div`,{style:{marginTop:16},children:[(0,w.jsx)(`div`,{className:`ggui-stack__entry-meta`,style:{marginBottom:6,textTransform:`uppercase`,letterSpacing:`0.12em`},children:`schema`}),(0,w.jsx)(`pre`,{className:`ggui-config-schema`,children:JSON.stringify(n,null,2)})]})]})}function i_(e){return e.const===void 0?e.enum?`enum (${e.enum.length})`:e.type===`array`?`array`:e.type===`object`?`object`:typeof e.type==`string`?e.type:`unknown`:`literal "${String(e.const)}"`}function a_({link:e}){return(0,w.jsxs)(`div`,{"data-ggui-config-cross-link":e.path,style:{marginTop:8,padding:`10px 12px`,background:`var(--ggui-paper-2)`,border:`1px solid var(--ggui-line-1)`,borderRadius:2,display:`flex`,alignItems:`center`,gap:12,flexWrap:`wrap`},children:[(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,onClick:()=>E(e.path),style:{fontSize:12},children:e.label}),(0,w.jsx)(`span`,{className:`ggui-muted`,style:{fontSize:12,flex:1},children:e.mute})]})}function o_({label:e,value:t,absentNote:n}){return(0,w.jsxs)(`div`,{className:`ggui-config-value-row`,children:[(0,w.jsx)(`div`,{className:`ggui-stack__entry-meta`,style:{marginBottom:4,textTransform:`uppercase`,letterSpacing:`0.12em`},children:e}),t===void 0?(0,w.jsx)(`p`,{className:`ggui-muted`,style:{margin:0},children:n??`—`}):(0,w.jsx)(`pre`,{className:`ggui-config-value`,children:JSON.stringify(t,null,2)})]})}function s_({raw:e}){let[t,n]=(0,S.useState)(!1);return(0,w.jsxs)(`div`,{className:`ggui-card`,style:{marginTop:24},children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`raw ggui.json`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`RAW / 01`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsxs)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,onClick:()=>n(e=>!e),"aria-expanded":t,children:[t?`hide`:`show`,` raw bytes`]}),t?(0,w.jsx)(`pre`,{className:`ggui-config-raw`,"data-ggui-config-raw":!0,children:e}):null]})]})}function c_({title:e,num:t,tone:n,children:r}){return(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:e}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:t})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsx)(`p`,{className:`ggui-body`,children:(0,w.jsx)($,{tone:n,children:e})}),(0,w.jsx)(`p`,{className:`ggui-muted`,children:r})]})]})}function l_(){let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(`loading`),[i,a]=(0,S.useState)(null),[o,s]=(0,S.useState)(new Set),c=(0,S.useRef)(new Set);(0,S.useEffect)(()=>{let e=!1,n=null,i=e=>{c.current.has(e.id)||(c.current.add(e.id),t(t=>[e,...t].slice(0,500)))};return(async()=>{try{let n=await fetch(`/ggui/console/llm-trace/recent?limit=100`,{credentials:`same-origin`,headers:{accept:`application/json`}});if(!n.ok)throw Error(`recent fetch returned ${n.status}`);let i=await n.json();if(e)return;let a=[...i.events].reverse();for(let e of a)c.current.add(e.id);t(a),r(`live`)}catch(t){if(e)return;r(`error`),a(t instanceof Error?t.message:`Could not load recent LLM trace.`);return}n=new EventSource(`/ggui/console/llm-trace/stream`,{withCredentials:!0}),n.onmessage=e=>{try{let t=JSON.parse(e.data);i(t)}catch{}},n.onerror=()=>{r(`reconnecting`)},n.onopen=()=>{r(`live`)}})(),()=>{e=!0,n&&n.close()}},[]);let l=e=>{s(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})};return(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`DEVTOOLS / 7A`,title:`LLM trace.`,mute:`Live.`,intro:(0,w.jsx)(w.Fragment,{children:`Every LLM call the harness makes during generation — system prompt, user prompt, tool defs, completion, token counts. Anthropic only for now; OpenAI / Google / OpenRouter slot in later. Bounded ring buffer — most recent 200 events stay in memory.`})}),(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`events`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:n===`loading`?`connecting…`:n===`live`?`live · ${e.length}`:n===`reconnecting`?`reconnecting…`:`error`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[i?(0,w.jsx)(`p`,{className:`ggui-muted`,"data-ggui-llm-trace-error":!0,children:i}):null,e.length===0&&n!==`error`?(0,w.jsx)(`p`,{className:`ggui-muted`,children:`No LLM calls yet. Trigger a generation (push a prompt through your MCP client) and they'll appear here as they fire.`}):null,(0,w.jsx)(`ul`,{style:{listStyle:`none`,padding:0,margin:0,display:`grid`,gap:12},"data-ggui-llm-trace-list":!0,children:e.map(e=>(0,w.jsx)(u_,{event:e,expanded:o.has(e.id),onToggle:()=>l(e.id)},e.id))})]})]})]})}function u_({event:e,expanded:t,onToggle:n}){let r=new Date(e.at).toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hour12:!1}),i=e.result?`${e.result.inputTokens} in · ${e.result.outputTokens} out`+(e.result.cacheRead?` · ${e.result.cacheRead} cache hit`:``)+(e.result.cacheCreated?` · ${e.result.cacheCreated} cache write`:``):`—`,a=e.error?`error`:`ok`;return(0,w.jsxs)(`li`,{style:{border:`1px solid var(--ggui-rule)`,padding:`10px 12px`,background:`var(--ggui-paper)`},"data-ggui-llm-trace-event":e.id,"data-ggui-llm-trace-status":a,children:[(0,w.jsxs)(`button`,{type:`button`,onClick:n,style:{all:`unset`,cursor:`pointer`,display:`flex`,gap:12,alignItems:`baseline`,width:`100%`},children:[(0,w.jsx)(`span`,{className:`ggui-muted`,style:{fontSize:11,fontFamily:`var(--ggui-font-mono)`},children:r}),(0,w.jsxs)(`span`,{style:{fontFamily:`var(--ggui-font-mono)`,fontSize:12},children:[e.provider,`/`,e.model]}),(0,w.jsx)(`span`,{className:`ggui-muted`,style:{fontSize:11,fontFamily:`var(--ggui-font-mono)`},children:e.kind}),(0,w.jsx)(`span`,{style:{flex:1}}),(0,w.jsxs)(`span`,{className:`ggui-muted`,style:{fontSize:11},children:[e.durationMs,`ms`]}),(0,w.jsx)(`span`,{className:`ggui-muted`,style:{fontSize:11},children:i}),e.error?(0,w.jsx)(`span`,{style:{fontSize:11,padding:`0 6px`,border:`1px solid var(--ggui-rule)`},children:`error`}):null]}),t?(0,w.jsx)(d_,{event:e}):null]})}function d_({event:e}){return(0,w.jsxs)(`div`,{style:{marginTop:10,paddingTop:10,borderTop:`1px solid var(--ggui-rule)`,display:`grid`,gap:12},children:[e.error?(0,w.jsx)(f_,{label:`error`,children:(0,w.jsx)(`pre`,{style:p_,children:e.error.message})}):null,e.systemPrompt?(0,w.jsx)(f_,{label:`system prompt`,children:(0,w.jsx)(`pre`,{style:p_,children:e.systemPrompt})}):null,e.userPrompt?(0,w.jsx)(f_,{label:`user prompt`,children:(0,w.jsx)(`pre`,{style:p_,children:e.userPrompt})}):null,e.tools&&e.tools.length>0?(0,w.jsx)(f_,{label:`tools (${e.tools.length})`,children:(0,w.jsx)(`ul`,{style:{listStyle:`none`,padding:0,margin:0},children:e.tools.map(e=>(0,w.jsxs)(`li`,{style:{fontFamily:`var(--ggui-font-mono)`,fontSize:12,padding:`2px 0`},children:[(0,w.jsx)(`strong`,{children:e.name}),(0,w.jsxs)(`span`,{className:`ggui-muted`,children:[` — `,e.description]})]},e.name))})}):null,e.result?.text?(0,w.jsx)(f_,{label:`completion text`,children:(0,w.jsx)(`pre`,{style:p_,children:e.result.text})}):null,e.result?.toolCalls&&e.result.toolCalls.length>0?(0,w.jsx)(f_,{label:`tool calls (${e.result.toolCalls.length})`,children:(0,w.jsx)(`pre`,{style:p_,children:JSON.stringify(e.result.toolCalls,null,2)})}):null,e.result?.turnsUsed?(0,w.jsx)(f_,{label:`agentic turns`,children:(0,w.jsx)(`span`,{className:`ggui-muted`,children:e.result.turnsUsed})}):null]})}function f_({label:e,children:t}){return(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`div`,{className:`ggui-muted`,style:{fontSize:11,fontFamily:`var(--ggui-font-mono)`,textTransform:`uppercase`,marginBottom:4},children:e}),t]})}var p_={margin:0,padding:8,background:`var(--ggui-paper-2, #efeee8)`,border:`1px solid var(--ggui-rule)`,fontFamily:`var(--ggui-font-mono)`,fontSize:12,whiteSpace:`pre-wrap`,wordBreak:`break-word`,maxHeight:360,overflow:`auto`};function m_(){let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(`loading`),[i,a]=(0,S.useState)(null),[o,s]=(0,S.useState)(new Set),c=(0,S.useRef)(new Set);(0,S.useEffect)(()=>{let e=!1,n=null,i=e=>{c.current.has(e.id)||(c.current.add(e.id),t(t=>[e,...t].slice(0,500)))};return(async()=>{try{let n=await fetch(`/ggui/console/validator/recent?limit=100`,{credentials:`same-origin`,headers:{accept:`application/json`}});if(!n.ok)throw Error(`recent fetch returned ${n.status}`);let i=await n.json();if(e)return;let a=[...i.events].reverse();for(let e of a)c.current.add(e.id);t(a),r(`live`)}catch(t){if(e)return;r(`error`),a(t instanceof Error?t.message:`Could not load recent validator trace.`);return}n=new EventSource(`/ggui/console/validator/stream`,{withCredentials:!0}),n.onmessage=e=>{try{let t=JSON.parse(e.data);i(t)}catch{}},n.onerror=()=>{r(`reconnecting`)},n.onopen=()=>{r(`live`)}})(),()=>{e=!0,n&&n.close()}},[]);let l=e=>{s(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})};return(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`DEVTOOLS / 7B`,title:`Validator tier results.`,mute:`Live.`,intro:(0,w.jsxs)(w.Fragment,{children:[`Every `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`runCheck()`}),` the harness performs during generation — which axis-checks fired, which tier-0 deterministic checks failed, what the runtime- render probe surfaced, what the LLM evaluator flagged. Bounded ring buffer — most recent 200 events stay in memory.`]})}),(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`events`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:n===`loading`?`connecting…`:n===`live`?`live · ${e.length}`:n===`reconnecting`?`reconnecting…`:`error`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[i?(0,w.jsx)(`p`,{className:`ggui-muted`,"data-ggui-validator-error":!0,children:i}):null,e.length===0&&n!==`error`?(0,w.jsx)(`p`,{className:`ggui-muted`,children:`No validator runs yet. Trigger a generation (push a prompt through your MCP client) and tier results will appear here as they fire.`}):null,(0,w.jsx)(`ul`,{style:{listStyle:`none`,padding:0,margin:0,display:`grid`,gap:12},"data-ggui-validator-list":!0,children:e.map(e=>(0,w.jsx)(h_,{event:e,expanded:o.has(e.id),onToggle:()=>l(e.id)},e.id))})]})]})]})}function h_({event:e,expanded:t,onToggle:n}){let r=new Date(e.at).toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hour12:!1}),i=e.issues.filter(e=>e.result===`fail`).length,a=e.issues.filter(e=>e.result===`warn`).length,o=i>0?`fail`:a>0?`warn`:`pass`,s=e.harnessId.length>12?e.harnessId.slice(0,12)+`…`:e.harnessId;return(0,w.jsxs)(`li`,{style:{border:`1px solid var(--ggui-rule)`,padding:`10px 12px`,background:`var(--ggui-paper)`},"data-ggui-validator-event":e.id,"data-ggui-validator-outcome":o,children:[(0,w.jsxs)(`button`,{type:`button`,onClick:n,style:{all:`unset`,cursor:`pointer`,display:`flex`,gap:12,alignItems:`baseline`,width:`100%`,flexWrap:`wrap`},children:[(0,w.jsx)(`span`,{className:`ggui-muted`,style:{fontSize:11,fontFamily:`var(--ggui-font-mono)`},children:r}),(0,w.jsx)(`span`,{style:{fontFamily:`var(--ggui-font-mono)`,fontSize:12},title:e.harnessId,children:s}),(0,w.jsx)(`span`,{className:`ggui-muted`,style:{fontSize:11,fontFamily:`var(--ggui-font-mono)`},children:e.workflowId}),(0,w.jsx)(g_,{label:`axis`,count:e.summary.axisIssues}),(0,w.jsx)(g_,{label:`tier-0`,count:e.summary.tierIssues}),(0,w.jsx)(g_,{label:`probe`,count:e.summary.runtimeRenderIssues,dimmed:e.skippedRuntimeRender}),(0,w.jsx)(g_,{label:`llm`,count:e.summary.llmIssues}),(0,w.jsx)(`span`,{style:{flex:1}}),(0,w.jsxs)(`span`,{className:`ggui-muted`,style:{fontSize:11},children:[e.durationMs,`ms`]}),(0,w.jsx)(__,{outcome:o,fails:i,warns:a})]}),t?(0,w.jsx)(v_,{event:e}):null]})}function g_({label:e,count:t,dimmed:n}){return(0,w.jsxs)(`span`,{style:{fontSize:11,fontFamily:`var(--ggui-font-mono)`,padding:`0 6px`,border:`1px solid var(--ggui-rule)`,opacity:n?.4:t>0?1:.7},children:[e,` `,t]})}function __({outcome:e,fails:t,warns:n}){let r=e===`pass`?`pass`:e===`warn`?`${n} warn`:`${t} fail`;return(0,w.jsx)(`span`,{style:{fontSize:11,fontFamily:`var(--ggui-font-mono)`,padding:`0 6px`,border:`1px solid var(--ggui-rule)`},"data-ggui-validator-pill":e,children:r})}function v_({event:e}){let t=y_(e.issues);return(0,w.jsxs)(`div`,{style:{marginTop:10,paddingTop:10,borderTop:`1px solid var(--ggui-rule)`,display:`grid`,gap:12},children:[e.error?(0,w.jsx)(x_,{label:`error`,children:(0,w.jsx)(`pre`,{style:S_,children:e.error.message})}):null,(0,w.jsx)(x_,{label:`harness`,children:(0,w.jsxs)(`div`,{style:{fontFamily:`var(--ggui-font-mono)`,fontSize:12},children:[(0,w.jsxs)(`div`,{children:[`id: `,e.harnessId]}),(0,w.jsxs)(`div`,{children:[`workflow: `,e.workflowId]}),(0,w.jsxs)(`div`,{children:[`compiled: `,e.hadCompiledCode?`yes`:`no — checks skipped`]}),(0,w.jsxs)(`div`,{children:[`runtime-render: `,e.skippedRuntimeRender?`skipped`:`ran`]})]})}),(0,w.jsx)(x_,{label:`classification`,children:(0,w.jsx)(`div`,{style:{fontFamily:`var(--ggui-font-mono)`,fontSize:12},children:Object.entries(e.classification).map(([e,t])=>(0,w.jsxs)(`div`,{children:[e,`: `,String(t)]},e))})}),e.summary.firedCheckIds.length>0?(0,w.jsx)(x_,{label:`fired check ids (${e.summary.firedCheckIds.length})`,children:(0,w.jsx)(`pre`,{style:S_,children:e.summary.firedCheckIds.join(`
|
|
202
202
|
`)})}):null,t.axis.length>0?(0,w.jsx)(x_,{label:`axis issues (${t.axis.length})`,children:(0,w.jsx)(b_,{issues:t.axis})}):null,t.tier0.length>0?(0,w.jsx)(x_,{label:`tier-0 issues (${t.tier0.length})`,children:(0,w.jsx)(b_,{issues:t.tier0})}):null,t.tier1.length>0?(0,w.jsx)(x_,{label:`tier-1 issues (${t.tier1.length})`,children:(0,w.jsx)(b_,{issues:t.tier1})}):null,t.tier2.length>0?(0,w.jsx)(x_,{label:`tier-2 issues (${t.tier2.length})`,children:(0,w.jsx)(b_,{issues:t.tier2})}):null,e.prompt?(0,w.jsx)(x_,{label:`prompt`,children:(0,w.jsx)(`pre`,{style:S_,children:e.prompt})}):null,e.sourceCode?(0,w.jsx)(x_,{label:`source under check`,children:(0,w.jsx)(`pre`,{style:S_,children:e.sourceCode})}):null]})}function y_(e){let t=[],n=[],r=[],i=[];for(let a of e){if(typeof a.subcategory==`string`&&a.subcategory.startsWith(`axis.`)){t.push(a);continue}a.tier===0?n.push(a):a.tier===1?r.push(a):i.push(a)}return{axis:t,tier0:n,tier1:r,tier2:i}}function b_({issues:e}){return(0,w.jsx)(`ul`,{style:{listStyle:`none`,padding:0,margin:0,display:`grid`,gap:8},children:e.map((e,t)=>(0,w.jsxs)(`li`,{style:{border:`1px solid var(--ggui-rule)`,padding:`6px 8px`,background:`var(--ggui-paper-2, #efeee8)`},"data-ggui-validator-issue":e.category,"data-ggui-validator-issue-result":e.result,children:[(0,w.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`baseline`,flexWrap:`wrap`,fontSize:11,fontFamily:`var(--ggui-font-mono)`},children:[(0,w.jsx)(`span`,{style:{padding:`0 4px`,border:`1px solid var(--ggui-rule)`},children:e.result}),(0,w.jsx)(`span`,{style:{fontWeight:500},children:e.category}),e.subcategory?(0,w.jsx)(`span`,{className:`ggui-muted`,children:e.subcategory}):null,e.priority?(0,w.jsx)(`span`,{className:`ggui-muted`,children:e.priority}):null,e.severity?(0,w.jsx)(`span`,{className:`ggui-muted`,children:e.severity}):null,typeof e.line==`number`?(0,w.jsxs)(`span`,{className:`ggui-muted`,children:[`line `,e.line]}):null]}),(0,w.jsx)(`div`,{style:{fontSize:12,marginTop:4},children:e.description}),e.fix?(0,w.jsxs)(`div`,{className:`ggui-muted`,style:{fontSize:12,marginTop:2},children:[`fix: `,e.fix]}):null]},t))})}function x_({label:e,children:t}){return(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`div`,{className:`ggui-muted`,style:{fontSize:11,fontFamily:`var(--ggui-font-mono)`,textTransform:`uppercase`,marginBottom:4},children:e}),t]})}var S_={margin:0,padding:8,background:`var(--ggui-paper-2, #efeee8)`,border:`1px solid var(--ggui-rule)`,fontFamily:`var(--ggui-font-mono)`,fontSize:12,whiteSpace:`pre-wrap`,wordBreak:`break-word`,maxHeight:360,overflow:`auto`};function C_(e){return e===`synth-ok`?`synth-ok`:e===`synth-fail`?`synth-fail`:e===`push-classify`?`classify`:e===`match-exact`||e===`match-semantic`||e===`hit`?`match`:`miss`}function w_(){let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(`loading`),[i,a]=(0,S.useState)(null),[o,s]=(0,S.useState)(new Set),[c,l]=(0,S.useState)(`all`),[u,d]=(0,S.useState)(`all`),f=(0,S.useRef)(new Set);(0,S.useEffect)(()=>{let e=!1,n=null,i=e=>{f.current.has(e.id)||(f.current.add(e.id),t(t=>[e,...t].slice(0,500)))};return(async()=>{try{let n=await fetch(`/ggui/console/cache/recent?limit=100`,{credentials:`same-origin`,headers:{accept:`application/json`}});if(!n.ok)throw Error(`recent fetch returned ${n.status}`);let i=await n.json();if(e)return;let a=[...i.events].reverse();for(let e of a)f.current.add(e.id);t(a),r(`live`)}catch(t){if(e)return;r(`error`),a(t instanceof Error?t.message:`Could not load recent cache trace.`);return}n=new EventSource(`/ggui/console/cache/stream`,{withCredentials:!0}),n.onmessage=e=>{try{let t=JSON.parse(e.data);i(t)}catch{}},n.onerror=()=>{r(`reconnecting`)},n.onopen=()=>{r(`live`)}})(),()=>{e=!0,n&&n.close()}},[]);let p=e=>{s(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},m=T_(e),h=E_(e),g=c===`all`?e:c===`no-strategy`?e.filter(e=>e.strategy===void 0):e.filter(e=>e.strategy===c),_=u===`all`?g:g.filter(e=>e.agentClassification===u);return(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`DEVTOOLS / 7C`,title:`Cache decisions.`,mute:`Live.`,intro:(0,w.jsx)(w.Fragment,{children:`Every blueprint-cache lookup the matcher runs — query intent, threshold, top-k candidate similarity scores, and the outcome (MATCH on canonical-key equality or judge accept; MISS on no-match buckets; SYNTH for cold-path contract synthesis; PUSH for paired-push confirm-vs-override classification). Quality-overlay chips surface validator findings on synth output, cosine novelty distance from the registry, and the agent's confirm-vs-override rate against the handshake's provisional. Filter by strategy or agent disposition to slice the stream. Bounded ring buffer — most recent 200 events stay in memory.`})}),(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`events`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:n===`loading`?`connecting…`:n===`live`?`live · ${e.length}`:n===`reconnecting`?`reconnecting…`:`error`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[i?(0,w.jsx)(`p`,{className:`ggui-muted`,"data-ggui-cache-trace-error":!0,children:i}):null,(0,w.jsx)(D_,{filter:c,onFilter:l,counts:m}),(0,w.jsx)(O_,{filter:u,onFilter:d,counts:h}),e.length===0&&n!==`error`?(0,w.jsx)(`p`,{className:`ggui-muted`,children:`No cache lookups yet. Trigger a generation (push a prompt through your MCP client) and decisions will appear here as they fire.`}):null,e.length>0&&_.length===0?(0,w.jsx)(`p`,{className:`ggui-muted`,children:`No events for this strategy. Try a different filter.`}):null,(0,w.jsx)(`ul`,{style:{listStyle:`none`,padding:0,margin:0,display:`grid`,gap:12},"data-ggui-cache-trace-list":!0,children:_.map(e=>(0,w.jsx)(k_,{event:e,expanded:o.has(e.id),onToggle:()=>p(e.id)},e.id))})]})]})]})}function T_(e){let t=0,n=0,r=0;for(let i of e)i.strategy===`exact-key`?t+=1:i.strategy===`semantic`?n+=1:r+=1;return{all:e.length,"exact-key":t,semantic:n,"no-strategy":r}}function E_(e){let t=0,n=0;for(let r of e)r.agentClassification===`confirm`?t+=1:r.agentClassification===`override`&&(n+=1);return{all:e.length,confirm:t,override:n}}function D_({filter:e,onFilter:t,counts:n}){return(0,w.jsxs)(`div`,{style:{display:`flex`,gap:6,alignItems:`center`,marginBottom:12,flexWrap:`wrap`},"data-ggui-cache-trace-filter":!0,children:[(0,w.jsx)(`span`,{className:`ggui-muted`,style:{fontSize:11,fontFamily:`var(--ggui-font-mono)`,textTransform:`uppercase`,marginRight:4},children:`strategy`}),[{key:`all`,label:`all`},{key:`exact-key`,label:`exact-key`},{key:`semantic`,label:`semantic`},{key:`no-strategy`,label:`no-strategy`}].map(r=>{let i=e===r.key,a=n[r.key];return(0,w.jsxs)(`button`,{type:`button`,onClick:()=>t(r.key),style:{all:`unset`,cursor:`pointer`,fontFamily:`var(--ggui-font-mono)`,fontSize:11,padding:`2px 8px`,border:`1px solid var(--ggui-rule)`,background:i?`var(--ggui-ink)`:`transparent`,color:i?`var(--ggui-paper)`:`var(--ggui-ink)`,letterSpacing:`0.05em`},"data-ggui-cache-trace-filter-key":r.key,"data-ggui-cache-trace-filter-active":i?`true`:`false`,children:[r.label,` · `,a]},r.key)})]})}function O_({filter:e,onFilter:t,counts:n}){return(0,w.jsxs)(`div`,{style:{display:`flex`,gap:6,alignItems:`center`,marginBottom:12,flexWrap:`wrap`},"data-ggui-cache-trace-classification-filter":!0,children:[(0,w.jsx)(`span`,{className:`ggui-muted`,style:{fontSize:11,fontFamily:`var(--ggui-font-mono)`,textTransform:`uppercase`,marginRight:4},children:`agent`}),[{key:`all`,label:`all`},{key:`confirm`,label:`confirm`},{key:`override`,label:`override`}].map(r=>{let i=e===r.key,a=n[r.key];return(0,w.jsxs)(`button`,{type:`button`,onClick:()=>t(r.key),style:{all:`unset`,cursor:`pointer`,fontFamily:`var(--ggui-font-mono)`,fontSize:11,padding:`2px 8px`,border:`1px solid var(--ggui-rule)`,background:i?`var(--ggui-ink)`:`transparent`,color:i?`var(--ggui-paper)`:`var(--ggui-ink)`,letterSpacing:`0.05em`},"data-ggui-cache-trace-classification-key":r.key,"data-ggui-cache-trace-classification-active":i?`true`:`false`,children:[r.label,` · `,a]},r.key)})]})}function k_({event:e,expanded:t,onToggle:n}){let r=new Date(e.at).toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hour12:!1}),i=C_(e.decision),a=i===`match`&&e.winningBlueprintId,o=e.candidates[0],s=o?o.score.toFixed(3):`—`,c=e.intent.length>80?`${e.intent.slice(0,80)}…`:e.intent;return(0,w.jsxs)(`li`,{style:{border:`1px solid var(--ggui-rule)`,padding:`10px 12px`,background:`var(--ggui-paper)`},"data-ggui-cache-trace-event":e.id,"data-ggui-cache-trace-decision":e.decision,...e.strategy?{"data-ggui-cache-trace-strategy":e.strategy}:{},...e.agentClassification?{"data-ggui-cache-trace-classification":e.agentClassification}:{},children:[(0,w.jsxs)(`button`,{type:`button`,onClick:n,style:{all:`unset`,cursor:`pointer`,display:`flex`,gap:12,alignItems:`baseline`,width:`100%`},children:[(0,w.jsx)(`span`,{className:`ggui-muted`,style:{fontSize:11,fontFamily:`var(--ggui-font-mono)`},children:r}),(0,w.jsx)(A_,{outcome:i}),e.strategy?(0,w.jsx)(j_,{strategy:e.strategy}):null,e.agentClassification?(0,w.jsx)(M_,{classification:e.agentClassification}):null,e.validatorFindings&&e.validatorFindings.length>0?(0,w.jsx)(N_,{count:e.validatorFindings.length,severity:e.validatorFindings.some(e=>e.severity===`error`)?`error`:`warn`}):null,(0,w.jsx)(`span`,{style:{fontFamily:`var(--ggui-font-mono)`,fontSize:12,flex:1,minWidth:0,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:c||(0,w.jsx)(`span`,{className:`ggui-muted`,children:`(empty intent)`})}),(0,w.jsxs)(`span`,{className:`ggui-muted`,style:{fontSize:11,fontFamily:`var(--ggui-font-mono)`},children:[`top `,s]}),(0,w.jsxs)(`span`,{className:`ggui-muted`,style:{fontSize:11},children:[e.durationMs,`ms`]}),a?(0,w.jsx)(`span`,{style:{fontFamily:`var(--ggui-font-mono)`,fontSize:11,padding:`0 6px`,border:`1px solid var(--ggui-rule)`},children:e.winningBlueprintId}):null]}),t?(0,w.jsx)(P_,{event:e}):null]})}function A_({outcome:e}){let t=e===`match`||e===`synth-ok`;return(0,w.jsx)(`span`,{style:{fontFamily:`var(--ggui-font-mono)`,fontSize:11,padding:`0 8px`,border:`1px solid var(--ggui-rule)`,background:t?`var(--ggui-ink)`:`transparent`,color:t?`var(--ggui-paper)`:`var(--ggui-ink)`,letterSpacing:`0.05em`},"data-ggui-cache-trace-outcome":e,children:e===`match`?`MATCH`:e===`synth-ok`||e===`synth-fail`?`SYNTH`:e===`classify`?`PUSH`:`MISS`})}function j_({strategy:e}){return(0,w.jsx)(`span`,{style:{fontFamily:`var(--ggui-font-mono)`,fontSize:10,padding:`0 6px`,border:`1px dashed var(--ggui-rule)`,background:`transparent`,color:`var(--ggui-ink)`,letterSpacing:`0.05em`,textTransform:`lowercase`},children:e})}function M_({classification:e}){let t=e===`confirm`;return(0,w.jsx)(`span`,{style:{fontFamily:`var(--ggui-font-mono)`,fontSize:10,padding:`0 6px`,border:`1px solid var(--ggui-rule)`,background:t?`var(--ggui-ink)`:`transparent`,color:t?`var(--ggui-paper)`:`var(--ggui-ink)`,letterSpacing:`0.05em`},"data-ggui-cache-trace-classification-chip":e,children:e})}function N_({count:e,severity:t}){return(0,w.jsxs)(`span`,{title:t===`error`?`Validator emitted at least one error finding — synth dropped the contract.`:`Validator emitted warning findings — contract was returned but flagged.`,style:{fontFamily:`var(--ggui-font-mono)`,fontSize:10,padding:`0 6px`,border:t===`error`?`1px solid var(--ggui-ink)`:`1px dashed var(--ggui-rule)`,background:`transparent`,color:`var(--ggui-ink)`,letterSpacing:`0.05em`},"data-ggui-cache-trace-validator-severity":t,children:[t===`error`?`err`:`warn`,` · `,e]})}function P_({event:e}){return(0,w.jsxs)(`div`,{style:{marginTop:10,paddingTop:10,borderTop:`1px solid var(--ggui-rule)`,display:`grid`,gap:12},children:[(0,w.jsx)(F_,{label:`reason`,children:(0,w.jsx)(`p`,{style:{margin:0,fontSize:13},children:e.reason})}),(0,w.jsx)(F_,{label:`decision class`,children:(0,w.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`baseline`,fontFamily:`var(--ggui-font-mono)`,fontSize:12},children:[(0,w.jsx)(`span`,{children:e.decision}),e.strategy?(0,w.jsxs)(`span`,{className:`ggui-muted`,children:[`· strategy = `,e.strategy]}):null,e.agentClassification?(0,w.jsxs)(`span`,{className:`ggui-muted`,children:[`· classification = `,e.agentClassification]}):null]})}),e.agentClassification?(0,w.jsx)(F_,{label:`agent classification`,children:(0,w.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`baseline`,fontFamily:`var(--ggui-font-mono)`,fontSize:12},children:[(0,w.jsx)(M_,{classification:e.agentClassification}),(0,w.jsx)(`span`,{className:`ggui-muted`,children:e.agentClassification===`confirm`?`agent render contract canonicalizes to the handshake plan key`:`agent render contract diverges from the handshake plan key`})]})}):null,e.cosineNoveltyDistance===void 0?null:(0,w.jsx)(F_,{label:`cosine novelty distance`,children:(0,w.jsx)(`div`,{style:{fontFamily:`var(--ggui-font-mono)`,fontSize:12},title:`1 - top.cosine. Higher = farther from any registered blueprint. Track over time to spot synth fragmentation.`,children:e.cosineNoveltyDistance.toFixed(3)})}),e.validatorFindings&&e.validatorFindings.length>0?(0,w.jsx)(F_,{label:`validator findings (${e.validatorFindings.length})`,children:(0,w.jsx)(`ul`,{style:{listStyle:`none`,padding:0,margin:0},children:e.validatorFindings.map((t,n)=>(0,w.jsxs)(`li`,{style:{padding:`4px 0`,borderBottom:n<(e.validatorFindings?.length??0)-1?`1px solid var(--ggui-rule)`:`none`,display:`grid`,gap:2},children:[(0,w.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`baseline`},children:[(0,w.jsx)(N_,{count:1,severity:t.severity}),(0,w.jsx)(`span`,{style:{fontFamily:`var(--ggui-font-mono)`,fontSize:12},children:t.kind})]}),(0,w.jsx)(`div`,{style:{fontSize:12},children:t.hint})]},`${t.kind}-${n}`))})}):null,(0,w.jsx)(F_,{label:`intent`,children:(0,w.jsx)(`pre`,{style:I_,children:e.intent||`(empty)`})}),(0,w.jsx)(F_,{label:`scope / threshold`,children:(0,w.jsxs)(`div`,{style:{fontFamily:`var(--ggui-font-mono)`,fontSize:12},children:[(0,w.jsxs)(`div`,{children:[`scope = `,(0,w.jsx)(`strong`,{children:e.scope})]}),(0,w.jsxs)(`div`,{children:[`threshold = `,(0,w.jsx)(`strong`,{children:e.threshold})]}),(0,w.jsxs)(`div`,{children:[`expectedKey = `,(0,w.jsx)(`strong`,{children:e.expectedKey||`(none)`})]}),e.winningBlueprintId?(0,w.jsxs)(`div`,{children:[`winningBlueprintId = `,(0,w.jsx)(`strong`,{children:e.winningBlueprintId})]}):null]})}),(0,w.jsx)(F_,{label:`candidates (${e.candidates.length})`,children:e.candidates.length===0?(0,w.jsx)(`p`,{className:`ggui-muted`,style:{margin:0,fontSize:12},children:`No candidates returned by the vector store.`}):(0,w.jsx)(`ul`,{style:{listStyle:`none`,padding:0,margin:0},children:e.candidates.map((t,n)=>{let r=e.winningBlueprintId!==void 0&&t.key===e.winningBlueprintId;return(0,w.jsxs)(`li`,{style:{padding:`4px 0`,borderBottom:n<e.candidates.length-1?`1px solid var(--ggui-rule)`:`none`,display:`grid`,gap:4},children:[(0,w.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`baseline`},children:[(0,w.jsx)(`span`,{style:{fontFamily:`var(--ggui-font-mono)`,fontSize:12,fontWeight:r?600:400},children:t.key}),r?(0,w.jsx)(`span`,{className:`ggui-muted`,style:{fontSize:10},children:`(winner)`}):null,(0,w.jsx)(`span`,{style:{flex:1}}),(0,w.jsx)(`span`,{style:{fontFamily:`var(--ggui-font-mono)`,fontSize:12},children:t.score.toFixed(3)})]}),t.cachedIntent?(0,w.jsx)(`div`,{className:`ggui-muted`,style:{fontSize:11,fontFamily:`var(--ggui-font-mono)`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:t.cachedIntent}):null]},`${t.key}-${n}`)})})})]})}function F_({label:e,children:t}){return(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`div`,{className:`ggui-muted`,style:{fontSize:11,fontFamily:`var(--ggui-font-mono)`,textTransform:`uppercase`,marginBottom:4},children:e}),t]})}var I_={margin:0,padding:8,background:`var(--ggui-paper-2, #efeee8)`,border:`1px solid var(--ggui-rule)`,fontFamily:`var(--ggui-font-mono)`,fontSize:12,whiteSpace:`pre-wrap`,wordBreak:`break-word`,maxHeight:360,overflow:`auto`};function L_(){let[e,t]=(0,S.useState)({kind:`loading`}),[n,r]=(0,S.useState)({kind:`idle`}),[i,a]=(0,S.useState)(null),[o,s]=(0,S.useState)(0);(0,S.useEffect)(()=>{let e=new AbortController;return(async()=>{try{let n=await fetch(`/ggui/console/timeline/renders`,{signal:e.signal,headers:{accept:`application/json`},credentials:`same-origin`});if(!n.ok){t({kind:`error`,message:`server returned ${n.status}`});return}let r=await n.json();t({kind:`ready`,data:r})}catch(n){if(e.signal.aborted)return;t({kind:`error`,message:n instanceof Error?n.message:String(n)})}})(),()=>e.abort()},[]);let c=(0,S.useCallback)(e=>{a(e),s(0),r({kind:`loading`,sessionId:e})},[]);return(0,S.useEffect)(()=>{if(!i)return;let e=new AbortController;return(async()=>{try{let t=await fetch(`/ggui/console/timeline/${encodeURIComponent(i)}/events`,{signal:e.signal,headers:{accept:`application/json`},credentials:`same-origin`}),n=await t.json();if(!t.ok&&t.status!==404){r({kind:`error`,sessionId:i,message:`server returned ${t.status}`});return}r({kind:`ready`,sessionId:i,data:n}),s(Math.max(0,n.events.length-1))}catch(t){if(e.signal.aborted)return;r({kind:`error`,sessionId:i,message:t instanceof Error?t.message:String(t)})}})(),()=>e.abort()},[i]),(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`DEVTOOLS / 7D`,title:`Render timeline.`,mute:`Snapshot.`,intro:(0,w.jsxs)(w.Fragment,{children:[`Pick a render, then step through its event log chronologically. Each event carries the full`,(0,w.jsx)(`code`,{className:`ggui-code`,children:` GguiSessionEvent.data `}),`payload — useful for answering “what was the UI state at event N?” without a live tail.`]})}),(0,w.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`minmax(260px, 320px) 1fr`,gap:16,alignItems:`start`},children:[(0,w.jsx)(R_,{state:e,pickedSessionId:i,onPick:c}),(0,w.jsx)(B_,{state:n,scrubIndex:o,onScrub:s})]})]})}function R_({state:e,pickedSessionId:t,onPick:n}){return(0,w.jsxs)(`div`,{className:`ggui-card`,"data-ggui-timeline-pane":`renders`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`renders`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:e.kind===`loading`?`loading…`:e.kind===`error`?`error`:`${e.data.sessions.length} / ${e.data.total}`})]}),(0,w.jsx)(`div`,{className:`ggui-card__body`,style:{padding:0},children:e.kind===`loading`?(0,w.jsx)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},children:`Loading renders…`}):e.kind===`error`?(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},"data-ggui-timeline-sessions-error":!0,children:[`Couldn't load renders — `,e.message,`.`]}):e.data.sessions.length===0?(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},children:[`No renders yet. Render from an agent (`,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui_render`}),`) to create one.`]}):(0,w.jsx)(`ul`,{style:{listStyle:`none`,padding:0,margin:0,maxHeight:520,overflowY:`auto`},children:e.data.sessions.map(e=>(0,w.jsx)(z_,{render:e,selected:e.sessionId===t,onClick:()=>n(e.sessionId)},e.sessionId))})})]})}function z_({render:e,selected:t,onClick:n}){let r=e.sessionId.slice(0,12),i=e.status===`active`?`live`:e.status===`expired`?`signal`:`ink`;return(0,w.jsx)(`li`,{"data-ggui-timeline-session-id":e.sessionId,"data-ggui-timeline-session-selected":t?`true`:`false`,style:{borderBottom:`1px solid var(--ggui-rule)`},children:(0,w.jsxs)(`button`,{type:`button`,onClick:n,style:{all:`unset`,cursor:`pointer`,width:`100%`,padding:`10px 12px`,display:`block`,background:t?`var(--ggui-paper-2, #efeee8)`:`transparent`},children:[(0,w.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`baseline`,marginBottom:4},children:[(0,w.jsxs)(`code`,{className:`ggui-code`,style:{fontSize:12,fontFamily:`var(--ggui-font-mono)`},children:[r,`…`]}),(0,w.jsx)($,{tone:i,children:e.status})]}),(0,w.jsxs)(`div`,{className:`ggui-muted`,style:{fontSize:11},children:[`app `,(0,w.jsx)(`code`,{className:`ggui-code`,children:e.appId}),` · stream`,` `,e.streamSeq]}),(0,w.jsxs)(`div`,{className:`ggui-muted`,style:{fontSize:11,marginTop:2},children:[`last `,K_(e.lastActivityAt)]})]})})}function B_({state:e,scrubIndex:t,onScrub:n}){return e.kind===`idle`?(0,w.jsxs)(`div`,{className:`ggui-card`,"data-ggui-timeline-pane":`events`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`timeline`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`DEV / 7D`})]}),(0,w.jsx)(`div`,{className:`ggui-card__body`,children:(0,w.jsx)(`p`,{className:`ggui-muted`,children:`Pick a render on the left to load its event log.`})})]}):e.kind===`loading`?(0,w.jsxs)(`div`,{className:`ggui-card`,"data-ggui-timeline-pane":`events`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`timeline`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`loading…`})]}),(0,w.jsx)(`div`,{className:`ggui-card__body`,children:(0,w.jsxs)(`p`,{className:`ggui-muted`,children:[`Loading events for`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:W_(e.sessionId)}),`…`]})})]}):e.kind===`error`?(0,w.jsxs)(`div`,{className:`ggui-card`,"data-ggui-timeline-pane":`events`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`timeline`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`error`})]}),(0,w.jsx)(`div`,{className:`ggui-card__body`,children:(0,w.jsxs)(`p`,{className:`ggui-muted`,"data-ggui-timeline-events-error":!0,children:[`Couldn't load events — `,e.message,`.`]})})]}):(0,w.jsx)(V_,{state:e,scrubIndex:t,onScrub:n})}function V_({state:e,scrubIndex:t,onScrub:n}){let{events:r,status:i,streamSeq:a}=e.data,o=r.length,s=(0,S.useMemo)(()=>o===0?0:Math.max(0,Math.min(t,o-1)),[t,o]),c=o>0?r[s]:null,l=(0,S.useCallback)(()=>{o!==0&&n(Math.max(0,s-1))},[n,s,o]),u=(0,S.useCallback)(()=>{o!==0&&n(Math.min(o-1,s+1))},[n,s,o]),d=(0,S.useCallback)(()=>n(0),[n]),f=(0,S.useCallback)(()=>{o!==0&&n(o-1)},[n,o]);return(0,w.jsxs)(`div`,{className:`ggui-card`,"data-ggui-timeline-pane":`events`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:(0,w.jsx)(`code`,{className:`ggui-code`,children:W_(e.sessionId)})}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:o===0?`no events`:`${s+1} / ${o}`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsxs)(`div`,{style:{display:`flex`,gap:12,alignItems:`center`,marginBottom:12,flexWrap:`wrap`},children:[(0,w.jsxs)(`span`,{className:`ggui-muted`,style:{fontSize:12},children:[`status`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:i})]}),(0,w.jsxs)(`span`,{className:`ggui-muted`,style:{fontSize:12},children:[`stream cursor`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:a})]}),(0,w.jsxs)(`span`,{className:`ggui-muted`,style:{fontSize:12},children:[`inbound events`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:o})]})]}),o===0?(0,w.jsx)(`p`,{className:`ggui-muted`,children:`No events recorded for this render yet. Inbound user actions, tool calls, and UI mutations land here as the agent runs — open the iframe and interact to populate.`}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`,marginBottom:12,flexWrap:`wrap`},children:[(0,w.jsx)(`button`,{type:`button`,onClick:d,disabled:s===0,className:`ggui-btn ggui-btn--ghost`,"data-ggui-timeline-jump":`start`,children:`⟪ start`}),(0,w.jsx)(`button`,{type:`button`,onClick:l,disabled:s===0,className:`ggui-btn ggui-btn--ghost`,"data-ggui-timeline-jump":`prev`,children:`‹ prev`}),(0,w.jsx)(`input`,{type:`range`,min:0,max:o-1,value:s,onChange:e=>n(Number(e.target.value)),"aria-label":`event scrubber`,"data-ggui-timeline-scrubber":!0,style:{flex:1,minWidth:160}}),(0,w.jsx)(`button`,{type:`button`,onClick:u,disabled:s>=o-1,className:`ggui-btn ggui-btn--ghost`,"data-ggui-timeline-jump":`next`,children:`next ›`}),(0,w.jsx)(`button`,{type:`button`,onClick:f,disabled:s>=o-1,className:`ggui-btn ggui-btn--ghost`,"data-ggui-timeline-jump":`end`,children:`end ⟫`})]}),c?(0,w.jsx)(H_,{event:c}):null]})]})]})}function H_({event:e}){return(0,w.jsxs)(`div`,{"data-ggui-timeline-event-seq":e.seq,"data-ggui-timeline-event-type":e.type,style:{border:`1px solid var(--ggui-rule)`,padding:`10px 12px`,background:`var(--ggui-paper)`},children:[(0,w.jsxs)(`div`,{style:{display:`flex`,gap:12,alignItems:`baseline`,marginBottom:8},children:[(0,w.jsxs)(`span`,{className:`ggui-muted`,style:{fontSize:11,fontFamily:`var(--ggui-font-mono)`},children:[`seq `,e.seq]}),(0,w.jsx)(`span`,{style:{fontFamily:`var(--ggui-font-mono)`,fontSize:12},children:e.type}),(0,w.jsx)(`span`,{style:{flex:1}}),(0,w.jsx)(`span`,{className:`ggui-muted`,style:{fontSize:11,fontFamily:`var(--ggui-font-mono)`},children:G_(e.timestamp)})]}),(0,w.jsx)(`pre`,{style:U_,children:q_(e.data)})]})}var U_={margin:0,padding:8,background:`var(--ggui-paper-2, #efeee8)`,border:`1px solid var(--ggui-rule)`,fontFamily:`var(--ggui-font-mono)`,fontSize:12,whiteSpace:`pre-wrap`,wordBreak:`break-word`,maxHeight:420,overflow:`auto`};function W_(e){return e.length>16?`${e.slice(0,16)}…`:e}function G_(e){try{return new Date(e).toISOString().slice(11,23)}catch{return String(e)}}function K_(e){let t=Date.now()-e;if(t<0)return`just now`;let n=Math.floor(t/1e3);if(n<5)return`just now`;if(n<60)return`${n}s ago`;let r=Math.floor(n/60);if(r<60)return`${r}m ago`;let i=Math.floor(r/60);if(i<24)return`${i}h ago`;let a=new Date(e),o=e=>e<10?`0${e}`:String(e);return`${a.getFullYear()}-${o(a.getMonth()+1)}-${o(a.getDate())}`}function q_(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}function J_(){let[e,t]=(0,S.useState)([]),[n,r]=(0,S.useState)(`loading`),[i,a]=(0,S.useState)(null),[o,s]=(0,S.useState)(new Set),c=(0,S.useRef)(new Set);(0,S.useEffect)(()=>{let e=!1,n=null,i=e=>{c.current.has(e.id)||(c.current.add(e.id),t(t=>[e,...t].slice(0,500)))};return(async()=>{try{let n=await fetch(`/ggui/console/payloads/recent?limit=100`,{credentials:`same-origin`,headers:{accept:`application/json`}});if(!n.ok)throw Error(`recent fetch returned ${n.status}`);let i=await n.json();if(e)return;let a=[...i.events].reverse();for(let e of a)c.current.add(e.id);t(a),r(`live`)}catch(t){if(e)return;r(`error`),a(t instanceof Error?t.message:`Could not load recent payloads.`);return}n=new EventSource(`/ggui/console/payloads/stream`,{withCredentials:!0}),n.onmessage=e=>{try{let t=JSON.parse(e.data);i(t)}catch{}},n.onerror=()=>{r(`reconnecting`)},n.onopen=()=>{r(`live`)}})(),()=>{e=!0,n&&n.close()}},[]);let l=e=>{s(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})};return(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`DEVTOOLS / 7E`,title:`Payloads.`,mute:`Live.`,intro:(0,w.jsxs)(w.Fragment,{children:[`Every `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui_render`}),` and`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui_update`}),` tool call as it lands on the handler — exactly the JSON the agent sent. Useful when contract drift or the agent paraphrases an intent. Bounded ring buffer — most recent 100 payloads stay in memory.`]})}),(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`events`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:n===`loading`?`connecting…`:n===`live`?`live · ${e.length}`:n===`reconnecting`?`reconnecting…`:`error`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[i?(0,w.jsx)(`p`,{className:`ggui-muted`,"data-ggui-payloads-error":!0,children:i}):null,e.length===0&&n!==`error`?(0,w.jsxs)(`p`,{className:`ggui-muted`,children:[`No payloads yet. Trigger a`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui_render`}),` from your MCP client and it'll appear here as it lands.`]}):null,(0,w.jsx)(`ul`,{style:{listStyle:`none`,padding:0,margin:0,display:`grid`,gap:12},"data-ggui-payloads-list":!0,children:e.map(e=>(0,w.jsx)(Y_,{event:e,expanded:o.has(e.id),onToggle:()=>l(e.id)},e.id))})]})]})]})}function Y_({event:e,expanded:t,onToggle:n}){let r=new Date(e.at).toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hour12:!1}),i=e.sessionId.length>8?`${e.sessionId.slice(0,8)}…`:e.sessionId,a=e.direction===`inbound-render`?`inbound`:`outbound`;return(0,w.jsxs)(`li`,{style:{border:`1px solid var(--ggui-rule)`,padding:`10px 12px`,background:`var(--ggui-paper)`},"data-ggui-payloads-event":e.id,"data-ggui-payloads-direction":e.direction,children:[(0,w.jsxs)(`button`,{type:`button`,onClick:n,style:{all:`unset`,cursor:`pointer`,display:`flex`,gap:12,alignItems:`baseline`,width:`100%`},children:[(0,w.jsx)(`span`,{className:`ggui-muted`,style:{fontSize:11,fontFamily:`var(--ggui-font-mono)`},children:r}),(0,w.jsx)(`span`,{style:{fontSize:11,padding:`0 6px`,border:`1px solid var(--ggui-rule)`,fontFamily:`var(--ggui-font-mono)`},children:a}),(0,w.jsx)(`span`,{style:{fontFamily:`var(--ggui-font-mono)`,fontSize:12},children:e.tool}),(0,w.jsx)(`span`,{className:`ggui-muted`,style:{fontSize:11,fontFamily:`var(--ggui-font-mono)`},children:i}),(0,w.jsx)(`span`,{style:{flex:1}}),(0,w.jsx)(`span`,{className:`ggui-muted`,style:{fontSize:11},children:$_(e.byteSize)})]}),t?(0,w.jsx)(X_,{event:e}):null]})}function X_({event:e}){let t=Q_(e.payload);return(0,w.jsxs)(`div`,{style:{marginTop:10,paddingTop:10,borderTop:`1px solid var(--ggui-rule)`,display:`grid`,gap:12},children:[(0,w.jsx)(Z_,{label:`session`,children:(0,w.jsxs)(`span`,{className:`ggui-muted`,style:{fontFamily:`var(--ggui-font-mono)`,fontSize:12},children:[e.sessionId,` · app `,e.appId]})}),(0,w.jsx)(Z_,{label:`payload`,children:(0,w.jsx)(`pre`,{style:ev,children:t})})]})}function Z_({label:e,children:t}){return(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`div`,{className:`ggui-muted`,style:{fontSize:11,fontFamily:`var(--ggui-font-mono)`,textTransform:`uppercase`,marginBottom:4},children:e}),t]})}function Q_(e){try{return JSON.stringify(e,null,2)??`undefined`}catch{return`[unstringifiable]`}}function $_(e){return!Number.isFinite(e)||e<0?`—`:e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`}var ev={margin:0,padding:8,background:`var(--ggui-paper-2, #efeee8)`,border:`1px solid var(--ggui-rule)`,fontFamily:`var(--ggui-font-mono)`,fontSize:12,whiteSpace:`pre-wrap`,wordBreak:`break-word`,maxHeight:400,overflow:`auto`},tv=`ggui-console:benchmark-dashboard-url`,nv=`https://benchmarks.ggui.ai`;function rv(){let[e,t]=(0,S.useState)(``),[n,r]=(0,S.useState)(``);(0,S.useEffect)(()=>{let e=localStorage.getItem(tv);e&&(t(e),r(e))},[]);let i=e=>{let n=e.trim();t(n),n?localStorage.setItem(tv,n):localStorage.removeItem(tv)};return(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`DEVTOOLS / 06`,title:`Benchmarks dashboard.`,mute:`GGUI_MODE=dev`,intro:(0,w.jsxs)(w.Fragment,{children:[`Embed a `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`@ggui-ai/benchmark`}),` `,`dashboard. Default points at`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`benchmarks.ggui.ai`}),` (the public ggui-protocol leaderboard); paste any URL serving the same shape to view your own runs.`]})}),(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`dashboard URL`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`DEV / 06`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),i(n)},style:{display:`flex`,gap:8},children:[(0,w.jsx)(`input`,{type:`url`,value:n,onChange:e=>r(e.target.value),placeholder:nv,spellCheck:!1,autoComplete:`off`,style:{flex:1,padding:`8px 10px`,fontFamily:`var(--ggui-font-mono, ui-monospace, monospace)`,fontSize:13,border:`1px solid var(--ggui-rule)`,background:`var(--ggui-paper)`,color:`var(--ggui-ink)`}}),(0,w.jsx)(`button`,{type:`submit`,className:`ggui-btn`,disabled:n.trim()===e.trim(),children:`load`}),e&&(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--muted`,onClick:()=>{r(``),i(``)},children:`clear`})]}),(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{marginTop:12,fontSize:13,lineHeight:1.5},children:[`URL persists across reloads. Local dev:`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`npx serve ./bench-results`}),` then paste `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`http://localhost:3000`}),`.`]})]})]}),e&&(0,w.jsxs)(`div`,{className:`ggui-card`,style:{marginTop:16},children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:e}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`DEV / 06.1`})]}),(0,w.jsx)(`div`,{className:`ggui-card__body`,style:{padding:0},children:(0,w.jsx)(`iframe`,{src:e,title:`Benchmarks dashboard`,style:{width:`100%`,height:`78vh`,border:`none`,background:`var(--ggui-paper)`}})})]})]})}var iv={"devtools-llm-trace":{title:`LLM trace`,slice:`7a`,answers:`Why is my generation slow / wrong?`},"devtools-validator":{title:`Validator tier results`,slice:`7b`,answers:`Which check failed, and what did the LLM emit?`},"devtools-cache":{title:`Cache hit/miss + feature vectors`,slice:`7c`,answers:`Why didn't this match my saved blueprint?`},"devtools-timeline":{title:`Render event timeline`,slice:`7d`,answers:`What was the UI state at each event?`},"devtools-payloads":{title:`Raw render/update payloads`,slice:`7e`,answers:`What did the agent actually send me?`},"devtools-benchmarks":{title:`Benchmarks dashboard`,slice:`7f`,answers:`How do providers/models score on the public corpus?`}};function av({route:e}){return e.kind===`devtools-index`?(0,w.jsx)(ov,{}):e.kind===`devtools-llm-trace`?(0,w.jsx)(l_,{}):e.kind===`devtools-validator`?(0,w.jsx)(m_,{}):e.kind===`devtools-cache`?(0,w.jsx)(w_,{}):e.kind===`devtools-timeline`?(0,w.jsx)(L_,{}):e.kind===`devtools-payloads`?(0,w.jsx)(J_,{}):e.kind===`devtools-benchmarks`?(0,w.jsx)(rv,{}):(0,w.jsx)(ov,{})}function ov(){return(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`DEVTOOLS / 00`,title:`Dev-mode debug surfaces.`,mute:`GGUI_MODE=dev`,intro:(0,w.jsxs)(w.Fragment,{children:[`Default for `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui dev`}),`. Each surface answers a different question about the last generation; sub-slices ship one at a time.`]})}),(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`surfaces`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`DEV / 01`})]}),(0,w.jsx)(`div`,{className:`ggui-card__body`,children:(0,w.jsx)(`ul`,{style:{listStyle:`none`,padding:0,margin:0,display:`grid`,gap:12},children:Object.entries(iv).map(([e,t])=>(0,w.jsxs)(`li`,{"data-ggui-devtools-surface":e,style:{display:`flex`,justifyContent:`space-between`,gap:16,padding:`10px 0`,borderBottom:`1px solid var(--ggui-rule)`},children:[(0,w.jsxs)(`div`,{style:{minWidth:0},children:[(0,w.jsx)(`div`,{style:{fontWeight:500},children:t.title}),(0,w.jsx)(`div`,{className:`ggui-muted`,style:{fontSize:13},children:t.answers})]}),(0,w.jsxs)(`span`,{className:`ggui-muted`,style:{fontSize:12,whiteSpace:`nowrap`},children:[`Slice `,t.slice]})]},e))})})]})]})}function sv(){let[e,t]=(0,S.useState)({kind:`loading`}),[n,r]=(0,S.useState)(null),[i,a]=(0,S.useState)(null),[o,s]=(0,S.useState)(``),[c,l]=(0,S.useState)(!1),[u,d]=(0,S.useState)(null),[f,p]=(0,S.useState)(null),m=async()=>{t({kind:`loading`});try{let e=await fetch(`/ggui/console/keys`,{headers:{accept:`application/json`}});if(e.status===401){E(`/admin-login?next=%2Fadmin%2Fconnector-keys`);return}if(!e.ok){if(e.status===404){t({kind:`error`,message:"Pairing not enabled on this server — re-run `ggui serve` (pairing is on by default for the OSS bundle)."});return}t({kind:`error`,message:`server returned ${e.status}`});return}let n=await e.json();t({kind:`ready`,data:n})}catch(e){t({kind:`error`,message:String(e)})}};(0,S.useEffect)(()=>{m()},[]);let h=async e=>{r(e);try{let n=await fetch(`/ggui/console/keys/${encodeURIComponent(e)}`,{method:`DELETE`});if(n.status===401){E(`/admin-login?next=%2Fadmin%2Fconnector-keys`);return}if(n.status!==204){t({kind:`error`,message:`revoke failed — server returned ${n.status}`});return}a(null),await m()}catch(e){t({kind:`error`,message:`revoke failed — ${String(e)}`})}finally{r(null)}},g=async e=>{e.preventDefault(),d(null);let t=o.trim();if(t.length===0){d(`Device name is required.`);return}l(!0);try{let e=await fetch(`/ggui/console/keys`,{method:`POST`,headers:{"content-type":`application/json`,accept:`application/json`},body:JSON.stringify({deviceName:t})});if(e.status===401){E(`/admin-login?next=%2Fadmin%2Fconnector-keys`);return}if(!e.ok){d(`mint failed — server returned ${e.status}`);return}let n=await e.json();p(n),s(``),await m()}catch(e){d(`mint failed — ${String(e)}`)}finally{l(!1)}};return(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`01 / keys`,title:`Paired bearer tokens.`,mute:`Personal-mode bearers minted by /pair.`,intro:(0,w.jsxs)(w.Fragment,{children:[`Each row is a paired bearer minted by the pairing service — paste these into MCP clients (Claude Desktop, claude.ai) as the `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`Authorization: Bearer`}),` `,`header. Tokens are stored in plaintext on disk (`,(0,w.jsx)(`code`,{className:`ggui-code`,children:`~/.ggui/keys.json`}),` by default); treat this page like`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`~/.ssh/`}),` — anyone with view access can copy a bearer.`]})}),(0,w.jsx)(cv,{deviceName:o,onDeviceName:s,minting:c,error:u,result:f,onSubmit:e=>{g(e)},onDismissResult:()=>p(null)}),e.kind===`loading`?(0,w.jsx)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},children:`Loading keys…`}):e.kind===`error`?(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},"data-ggui-keys-error":!0,children:[`Couldn't load keys — `,e.message]}):(0,w.jsx)(uv,{keys:e.data.keys,revokingId:n,pendingConfirm:i,onRevokeRequest:e=>a(e),onRevokeCancel:()=>a(null),onRevokeConfirm:e=>{h(e)},onRefresh:()=>{m()}})]})}function cv({deviceName:e,onDeviceName:t,minting:n,error:r,result:i,onSubmit:a,onDismissResult:o}){return(0,w.jsxs)(`div`,{className:`ggui-card`,style:{marginBottom:20},children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`mint a new key`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`KEY / NEW`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsx)(`form`,{className:`ggui-form`,onSubmit:a,children:(0,w.jsxs)(`div`,{className:`ggui-form__row`,children:[(0,w.jsx)(`label`,{className:`ggui-field`,"aria-label":`device name for the new key`,children:(0,w.jsx)(`input`,{type:`text`,placeholder:`device name (e.g. Claude Desktop, iPhone)`,value:e,onChange:e=>t(e.target.value),disabled:n,maxLength:256})}),(0,w.jsxs)(`button`,{type:`submit`,className:`ggui-btn`,"data-ggui-key-mint":!0,disabled:n||e.trim().length===0,children:[(0,w.jsx)(`span`,{className:`ggui-btn__dot`,"aria-hidden":!0}),n?`minting…`:`mint`]})]})}),r?(0,w.jsx)(`p`,{className:`ggui-muted`,style:{marginTop:10},children:r}):null,i?(0,w.jsx)(lv,{result:i,onDismiss:o}):null]})]})}function lv({result:e,onDismiss:t}){let[n,r]=(0,S.useState)(!1),i=async()=>{try{await navigator.clipboard.writeText(e.token),r(!0),window.setTimeout(()=>r(!1),2e3)}catch{}};return(0,w.jsxs)(`div`,{className:`ggui-card`,style:{marginTop:16},"data-ggui-key-mint-result":!0,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`new bearer minted — copy it now`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`KEY / FRESH`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{marginTop:0},children:[`Paste this into your MCP client's`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`Authorization: Bearer`}),` `,`header. The plaintext stays visible until you dismiss this card — there's no second-fetch path; close the page and you'll need to copy it from the table below or mint a fresh one.`]}),(0,w.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,marginTop:12},children:[(0,w.jsx)(`code`,{className:`ggui-code`,style:{flex:1,padding:10,wordBreak:`break-all`,userSelect:`all`},children:e.token}),(0,w.jsxs)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,onClick:()=>{i()},children:[(0,w.jsx)(`span`,{className:`ggui-btn__dot`,"aria-hidden":!0}),n?`copied`:`copy`]})]}),(0,w.jsxs)(`div`,{className:`ggui-stack__entry-meta`,style:{marginTop:12},children:[(0,w.jsxs)(`span`,{children:[`device `,(0,w.jsx)(`code`,{className:`ggui-code`,children:e.deviceName})]}),(0,w.jsxs)(`span`,{style:{marginLeft:12},children:[`id `,(0,w.jsx)(`code`,{className:`ggui-code`,children:e.pairingId})]})]}),(0,w.jsx)(`div`,{style:{marginTop:14},children:(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,onClick:t,children:`dismiss`})})]})]})}function uv({keys:e,revokingId:t,pendingConfirm:n,onRevokeRequest:r,onRevokeCancel:i,onRevokeConfirm:a,onRefresh:o}){return e.length===0?(0,w.jsxs)(`div`,{className:`ggui-stack`,"data-ggui-keys-list":!0,"aria-label":`paired keys (empty)`,children:[(0,w.jsxs)(`div`,{className:`ggui-stack__head`,children:[(0,w.jsx)(`span`,{className:`ggui-stack__num`,children:`KEY`}),(0,w.jsx)(`span`,{className:`ggui-stack__label`,children:`paired keys`}),(0,w.jsx)(`span`,{className:`ggui-stack__count`,children:`0`})]}),(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},children:[`No keys minted yet. Use the form above to mint one, or complete a `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`POST /pair`}),` from a viewer client to land a row here.`]})]}):(0,w.jsxs)(`div`,{"data-ggui-keys-list":!0,className:`ggui-stack`,"aria-label":`paired keys`,children:[(0,w.jsxs)(`div`,{className:`ggui-stack__head`,children:[(0,w.jsx)(`span`,{className:`ggui-stack__num`,children:`KEY`}),(0,w.jsx)(`span`,{className:`ggui-stack__label`,children:`paired keys`}),(0,w.jsx)(`span`,{className:`ggui-stack__count`,children:e.length}),(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,onClick:o,style:{marginLeft:`auto`},children:`refresh`})]}),(0,w.jsx)(`ul`,{className:`ggui-stack__list`,children:e.map((e,o)=>(0,w.jsx)(dv,{entry:e,index:o+1,isRevoking:t===e.pairingId,isPendingConfirm:n===e.pairingId,onRevokeRequest:r,onRevokeCancel:i,onRevokeConfirm:a},e.pairingId))})]})}function dv({entry:e,index:t,isRevoking:n,isPendingConfirm:r,onRevokeRequest:i,onRevokeCancel:a,onRevokeConfirm:o}){return(0,w.jsxs)(`li`,{"data-ggui-key-id":e.pairingId,className:`ggui-stack__entry`,style:{opacity:n?.5:1},children:[(0,w.jsxs)(`div`,{className:`ggui-stack__entry-head`,children:[(0,w.jsx)(`span`,{className:`ggui-stack__entry-num`,children:`KEY / ${String(t).padStart(2,`0`)}`}),(0,w.jsx)(`span`,{className:`ggui-stack__entry-title`,children:e.deviceName})]}),(0,w.jsxs)(`div`,{className:`ggui-stack__entry-meta`,children:[(0,w.jsxs)(`span`,{children:[`id `,(0,w.jsx)(`code`,{className:`ggui-code`,children:e.pairingId})]}),(0,w.jsxs)(`span`,{style:{marginLeft:12},children:[`minted`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:fv(e.createdAt)})]}),e.lastUsedAt===void 0?null:(0,w.jsxs)(`span`,{style:{marginLeft:12},children:[`used`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:fv(e.lastUsedAt)})]})]}),(0,w.jsx)(`div`,{className:`ggui-stack__entry-meta`,style:{marginTop:6},children:(0,w.jsxs)(`span`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[`token`,` `,e.token===null?(0,w.jsx)(`code`,{className:`ggui-code`,children:`— rotated, re-pair to recover`}):(0,w.jsx)(`code`,{className:`ggui-code`,style:{wordBreak:`break-all`,userSelect:`all`},children:e.token})]})}),(0,w.jsx)(`div`,{style:{marginTop:12,display:`flex`,gap:10,alignItems:`center`},children:r?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn`,"data-ggui-key-revoke":!0,disabled:n,onClick:()=>o(e.pairingId),children:n?`revoking…`:`confirm revoke`}),(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,disabled:n,onClick:a,children:`cancel`})]}):(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,"data-ggui-key-revoke":!0,disabled:n,onClick:()=>i(e.pairingId),children:`revoke`})})]})}function fv(e){let t=Date.now()-e;if(t<0)return`just now`;let n=Math.floor(t/1e3);if(n<60)return`${n}s ago`;let r=Math.floor(n/60);if(r<60)return`${r}m ago`;let i=Math.floor(r/60);return i<24?`${i}h ago`:`${Math.floor(i/24)}d ago`}function pv(){let[e,t]=(0,S.useState)({kind:`loading`}),[n,r]=(0,S.useState)(``);(0,S.useEffect)(()=>{let e=new AbortController;return(async()=>{try{let n=await fetch(`/ggui/console/mcp/tools`,{signal:e.signal,headers:{accept:`application/json`}});if(!n.ok){t({kind:`error`,message:`server returned ${n.status}`});return}let r=await n.json();t({kind:`ready`,data:r})}catch(n){if(e.signal.aborted)return;t({kind:`error`,message:String(n)})}})(),()=>e.abort()},[]);let i=n.trim().toLowerCase(),a=(0,S.useMemo)(()=>e.kind===`ready`?i.length===0?e.data.tools:e.data.tools.filter(e=>[e.name,e.title??``,e.description].join(` `).toLowerCase().includes(i)):null,[e,i]);return(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`01 / mcp`,title:`Registered MCP tools.`,mute:`Read-only inventory.`,intro:(0,w.jsxs)(w.Fragment,{children:[`Every tool this server registered with the MCP runtime — same set `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`tools/list`}),` `,`returns over JSON-RPC, rendered as expandable cards. Click a row to see its input + output JSON Schema.`,` `,(0,w.jsx)(`span`,{className:`ggui-muted`,children:`Test-invoke from the browser is deferred — for now, exercise tools via your paired MCP client.`})]})}),e.kind===`loading`?(0,w.jsx)(_v,{title:`loading`,num:`MCP / 01`,tone:`draft`,children:`Loading tool inventory…`}):e.kind===`error`?(0,w.jsxs)(_v,{title:`error`,num:`ERR / 01`,tone:`signal`,children:[`Couldn't load tools — `,e.message,`.`]}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(`div`,{className:`ggui-form`,style:{marginBottom:20},children:[(0,w.jsx)(`label`,{className:`ggui-label`,htmlFor:`ggui-mcp-filter`,children:`filter`}),(0,w.jsx)(`div`,{className:`ggui-field`,children:(0,w.jsx)(`input`,{id:`ggui-mcp-filter`,name:`filter`,"aria-label":`filter tools`,placeholder:`substring match over name, title, description…`,value:n,onChange:e=>r(e.target.value),autoCapitalize:`off`,autoCorrect:`off`,spellCheck:!1})})]}),(0,w.jsx)(mv,{all:e.data.tools,shown:a??e.data.tools,filterActive:i.length>0})]})]})}function mv({all:e,shown:t,filterActive:n}){return e.length===0?(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`empty`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`MCP / 00`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsx)(`p`,{className:`ggui-body`,children:`No tools registered.`}),(0,w.jsxs)(`p`,{className:`ggui-muted`,children:[`This server booted without any handlers — unusual for a full `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui serve`}),`. Check the boot config.`]})]})]}):(0,w.jsxs)(`div`,{"data-ggui-mcp-list":!0,className:`ggui-stack`,"aria-label":`mcp tools`,children:[(0,w.jsxs)(`div`,{className:`ggui-stack__head`,children:[(0,w.jsx)(`span`,{className:`ggui-stack__num`,children:`MCP`}),(0,w.jsx)(`span`,{className:`ggui-stack__label`,children:`registered tools`}),(0,w.jsxs)(`span`,{className:`ggui-stack__count`,children:[t.length,n&&t.length!==e.length?` / ${e.length}`:``]})]}),t.length===0?(0,w.jsx)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},children:`No tools match the filter.`}):(0,w.jsx)(`ul`,{className:`ggui-stack__list`,children:t.map((e,t)=>(0,w.jsx)(hv,{tool:e,index:t+1},e.name))})]})}function hv({tool:e,index:t}){let[n,r]=(0,S.useState)(!1);return(0,w.jsxs)(`li`,{"data-ggui-mcp-tool-name":e.name,"data-ggui-mcp-tool-expanded":n?`true`:`false`,className:`ggui-stack__entry`,children:[(0,w.jsxs)(`button`,{type:`button`,onClick:()=>r(e=>!e),"aria-expanded":n,style:{background:`transparent`,border:0,padding:0,width:`100%`,textAlign:`left`,cursor:`pointer`,color:`inherit`,font:`inherit`},children:[(0,w.jsxs)(`div`,{className:`ggui-stack__entry-head`,children:[(0,w.jsx)(`span`,{className:`ggui-stack__entry-num`,children:`MCP / ${String(t).padStart(2,`0`)}`}),(0,w.jsx)(`span`,{className:`ggui-stack__entry-title`,children:(0,w.jsx)(`code`,{className:`ggui-code`,children:e.name})}),e.title?(0,w.jsx)($,{tone:`ink`,children:e.title}):null,(0,w.jsx)(`span`,{className:`ggui-muted`,style:{marginLeft:`auto`,fontFamily:`var(--ggui-mono)`,fontSize:11},children:n?`−`:`+`})]}),e.description?(0,w.jsx)(`p`,{className:`ggui-body`,style:{margin:`8px 0 0`},children:e.description}):null]}),n?(0,w.jsxs)(`div`,{style:{marginTop:12,display:`grid`,gap:12},children:[(0,w.jsx)(gv,{label:`input`,schema:e.inputSchema}),(0,w.jsx)(gv,{label:`output`,schema:e.outputSchema})]}):null]})}function gv({label:e,schema:t}){return(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`div`,{className:`ggui-stack__entry-meta`,style:{marginBottom:6,textTransform:`uppercase`,letterSpacing:`0.12em`},children:e}),(0,w.jsx)(`pre`,{"data-ggui-mcp-schema":e,style:{margin:0,padding:12,background:`var(--ggui-paper-2)`,border:`1px solid var(--ggui-line-2)`,borderRadius:2,fontFamily:`var(--ggui-mono)`,fontSize:11,lineHeight:1.5,overflow:`auto`,maxHeight:320,whiteSpace:`pre-wrap`,wordBreak:`break-word`},children:JSON.stringify(t,null,2)})]})}function _v({title:e,num:t,tone:n,children:r}){return(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:e}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:t})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsx)(`p`,{className:`ggui-body`,children:(0,w.jsx)($,{tone:n,children:e})}),(0,w.jsx)(`p`,{className:`ggui-muted`,children:r})]})]})}function vv(){let[e,t]=(0,S.useState)({kind:`loading`}),[n,r]=(0,S.useState)(``);(0,S.useEffect)(()=>{let e=new AbortController;return(async()=>{try{let n=await fetch(`/ggui/console/sessions`,{signal:e.signal,headers:{accept:`application/json`}});if(!n.ok){t({kind:`error`,message:`server returned ${n.status}`});return}let r=await n.json();t({kind:`ready`,data:r})}catch(n){if(e.signal.aborted)return;t({kind:`error`,message:String(n)})}})(),()=>e.abort()},[]);let i=n.trim().toLowerCase(),a=(0,S.useMemo)(()=>e.kind===`ready`?i.length===0?e.data.sessions:e.data.sessions.filter(e=>[e.sessionId,e.shortCode??``,e.appId].join(` `).toLowerCase().includes(i)):null,[e,i]);return(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`01 / sessions`,title:`Live sessions.`,mute:`Active only — render from an agent to create one.`,intro:(0,w.jsxs)(w.Fragment,{children:[`Every row is an active GguiSession on this server. A session has a`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`shortCode`}),` once one is minted by `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui_render`}),`.`]})}),e.kind===`loading`?(0,w.jsx)(Cv,{title:`loading`,num:`SES / 01`,tone:`draft`,children:`Loading sessions…`}):e.kind===`error`?(0,w.jsxs)(Cv,{title:`error`,num:`ERR / 01`,tone:`signal`,children:[`Couldn't load sessions — `,e.message,`.`]}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(`div`,{className:`ggui-form`,style:{marginBottom:20},children:[(0,w.jsx)(`label`,{className:`ggui-label`,htmlFor:`ggui-sessions-filter`,children:`filter`}),(0,w.jsx)(`div`,{className:`ggui-field`,children:(0,w.jsx)(`input`,{id:`ggui-sessions-filter`,name:`filter`,"aria-label":`filter session entries`,placeholder:`substring match over sessionId, shortCode, appId…`,value:n,onChange:e=>r(e.target.value),autoCapitalize:`off`,autoCorrect:`off`,spellCheck:!1})})]}),(0,w.jsx)(yv,{all:e.data.sessions,shown:a??e.data.sessions,filterActive:i.length>0})]})]})}function yv({all:e,shown:t,filterActive:n}){return e.length===0?(0,w.jsx)(Sv,{}):(0,w.jsxs)(`div`,{"data-ggui-sessions-list":!0,className:`ggui-stack`,"aria-label":`active sessions`,children:[(0,w.jsxs)(`div`,{className:`ggui-stack__head`,children:[(0,w.jsx)(`span`,{className:`ggui-stack__num`,children:`SES`}),(0,w.jsx)(`span`,{className:`ggui-stack__label`,children:`live sessions`}),(0,w.jsxs)(`span`,{className:`ggui-stack__count`,children:[t.length,n&&t.length!==e.length?` / ${e.length}`:``]})]}),t.length===0?(0,w.jsx)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},children:`No sessions match the filter.`}):(0,w.jsx)(`ul`,{className:`ggui-stack__list`,children:t.map((e,t)=>(0,w.jsx)(bv,{render:e,index:t+1},e.sessionId))})]})}function bv({render:e,index:t}){let n=e.sessionId.slice(0,8),r=e.status===`active`?`live`:e.status===`expired`?`signal`:`ink`;return(0,w.jsxs)(`li`,{"data-ggui-session-id":e.sessionId,"data-ggui-session-status":e.status,className:`ggui-stack__entry`,children:[(0,w.jsxs)(`div`,{className:`ggui-stack__entry-head`,children:[(0,w.jsx)(`span`,{className:`ggui-stack__entry-num`,children:`SES / ${String(t).padStart(2,`0`)}`}),(0,w.jsxs)(`span`,{className:`ggui-stack__entry-title`,children:[(0,w.jsx)(`code`,{className:`ggui-code`,children:n}),`…`]}),(0,w.jsx)($,{tone:r,children:e.status})]}),(0,w.jsxs)(`div`,{className:`ggui-stack__entry-meta`,children:[(0,w.jsxs)(`span`,{children:[`app `,(0,w.jsx)(`code`,{className:`ggui-code`,children:e.appId})]}),(0,w.jsxs)(`span`,{style:{marginLeft:12},children:[`last active`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:xv(e.lastActivityAt)})]})]}),(0,w.jsx)(`div`,{style:{marginTop:12,display:`flex`,gap:10,alignItems:`center`},children:e.shortCode?(0,w.jsxs)(`span`,{children:[`shortCode`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:e.shortCode})]}):(0,w.jsxs)(`span`,{className:`ggui-muted`,children:[`No shortCode — render via`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui_render`}),` to mint one.`]})})]})}function xv(e){let t=Date.now()-e;if(t<0)return`just now`;let n=Math.floor(t/1e3);if(n<5)return`just now`;if(n<60)return`${n}s ago`;let r=Math.floor(n/60);if(r<60)return`${r}m ago`;let i=Math.floor(r/60);if(i<24)return`${i}h ago`;let a=new Date(e),o=e=>e<10?`0${e}`:String(e);return`${a.getFullYear()}-${o(a.getMonth()+1)}-${o(a.getDate())}`}function Sv(){return(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`empty`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`SES / 00`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsx)(`p`,{className:`ggui-body`,children:`No sessions yet.`}),(0,w.jsxs)(`p`,{className:`ggui-muted`,children:[`Render from an agent (`,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui_render`}),`) to start a generation — new sessions appear here on reload.`]})]})]})}function Cv({title:e,num:t,tone:n,children:r}){return(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:e}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:t})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsx)(`p`,{className:`ggui-body`,children:(0,w.jsx)($,{tone:n,children:e})}),(0,w.jsx)(`p`,{className:`ggui-muted`,children:r})]})]})}function wv(){let[e,t]=(0,S.useState)({kind:`loading`}),[n,r]=(0,S.useState)({kind:`loading`});return(0,S.useEffect)(()=>{let e=new AbortController;return(async()=>{try{let n=await fetch(`/ggui/console/info`,{signal:e.signal,headers:{accept:`application/json`}});if(!n.ok){t({kind:`error`,message:`server returned ${n.status}`});return}let r=await n.json();t({kind:`ok`,info:r})}catch(n){if(e.signal.aborted)return;t({kind:`error`,message:String(n)})}})(),(async()=>{try{let t=await fetch(`/ggui/console/sessions?limit=3`,{signal:e.signal,headers:{accept:`application/json`}});if(!t.ok){r({kind:`error`});return}let n=await t.json();r({kind:`ok`,data:n})}catch{e.signal.aborted||r({kind:`error`})}})(),()=>e.abort()},[]),(0,w.jsxs)(`section`,{className:`ggui-section`,"data-ggui-status-dashboard":!0,children:[(0,w.jsx)(T,{num:`01 / status`,title:`What's this server doing right now?`,mute:`Every card reads a local endpoint. No hosted calls.`,intro:(0,w.jsxs)(w.Fragment,{children:[`Reloads on demand — console is an operator surface, not a live feed. Nav above points at the other pages:`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`playground`}),`,`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`blueprints`}),`,`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`tools`}),`,`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`config`}),`.`]})}),(0,w.jsx)(Av,{state:n}),(0,w.jsxs)(`div`,{className:`ggui-status-grid`,children:[(0,w.jsx)(Tv,{state:e}),(0,w.jsx)(Ev,{state:e}),(0,w.jsx)(Dv,{state:e}),(0,w.jsx)(kv,{state:e})]})]})}function Tv({state:e}){return(0,w.jsx)(Mv,{num:`SRV / 01`,title:`server`,children:e.kind===`ok`?(0,w.jsx)(w.Fragment,{children:(0,w.jsxs)(`dl`,{className:`ggui-kv`,children:[(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`dt`,{children:`name`}),(0,w.jsx)(`dd`,{children:e.info.server})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`dt`,{children:`version`}),(0,w.jsx)(`dd`,{children:(0,w.jsx)(`code`,{className:`ggui-code`,children:e.info.version})})]}),e.info.description?(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`dt`,{children:`description`}),(0,w.jsx)(`dd`,{children:e.info.description})]}):null]})}):e.kind===`loading`?(0,w.jsx)(`p`,{className:`ggui-muted`,children:`Loading server identity…`}):(0,w.jsxs)(`p`,{className:`ggui-muted`,children:[`Couldn't reach `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`/ggui/console/info`}),` `,`— `,e.message,`.`]})})}function Ev({state:e}){if(e.kind!==`ok`)return(0,w.jsx)(Mv,{num:`PAR / 01`,title:`pairing`,children:(0,w.jsx)(`p`,{className:`ggui-muted`,children:e.kind===`loading`?`Loading…`:`Unavailable.`})});let{enabled:t,pending:n}=e.info.pairing;if(!t)return(0,w.jsxs)(Mv,{num:`PAR / 01`,title:`pairing`,children:[(0,w.jsx)(`p`,{className:`ggui-body`,children:(0,w.jsx)($,{tone:`ink`,children:`disabled`})}),(0,w.jsxs)(`p`,{className:`ggui-muted`,children:[`This server was composed with`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`pairing: false`}),`. Pass`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`pairing: true`}),` at boot to enable per-device auth.`]})]});if(!n)return(0,w.jsxs)(Mv,{num:`PAR / 01`,title:`pairing`,children:[(0,w.jsx)(`p`,{className:`ggui-body`,children:(0,w.jsx)($,{tone:`live`,children:`idle`})}),(0,w.jsxs)(`p`,{className:`ggui-muted`,children:[`Pairing is enabled. No pair code is pending — mint one via the CLI (`,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui pair`}),`) or the admin route.`]})]});let r=Math.max(0,Math.round((n.codeExpiresAt-Date.now())/1e3));return(0,w.jsxs)(Mv,{num:`PAR / 01`,title:`pairing`,children:[(0,w.jsx)(`p`,{className:`ggui-body`,children:(0,w.jsx)($,{tone:`draft`,children:`pending`})}),(0,w.jsx)(`p`,{className:`ggui-code`,style:{fontSize:24,letterSpacing:`0.08em`,margin:`8px 0`},children:n.code}),(0,w.jsxs)(`p`,{className:`ggui-muted`,children:[`Valid for `,(0,w.jsxs)(`code`,{className:`ggui-code`,children:[r,`s`]}),`. Paste into a paired client or`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`POST /pair`}),` with the bearer.`]})]})}function Dv({state:e}){if(e.kind!==`ok`)return(0,w.jsx)(Mv,{num:`CAP / 01`,title:`capabilities`,children:(0,w.jsx)(`p`,{className:`ggui-muted`,children:e.kind===`loading`?`Loading…`:`Unavailable.`})});let t=e.info.capabilities;return(0,w.jsx)(Mv,{num:`CAP / 01`,title:`capabilities`,children:(0,w.jsxs)(`dl`,{className:`ggui-kv`,children:[(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`dt`,{children:`tools`}),(0,w.jsx)(`dd`,{children:(0,w.jsx)(`code`,{className:`ggui-code`,children:t.toolCount})})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`dt`,{children:`blueprints`}),(0,w.jsx)(`dd`,{children:(0,w.jsx)(`code`,{className:`ggui-code`,children:t.blueprintCount})})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`dt`,{children:`primitives`}),(0,w.jsx)(`dd`,{children:(0,w.jsx)(`code`,{className:`ggui-code`,children:t.primitiveCount})})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`dt`,{children:`agent`}),(0,w.jsx)(`dd`,{children:(0,w.jsx)($,{tone:t.agentWired?`live`:`ink`,children:t.agentWired?`wired`:`off`})})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`dt`,{children:`generation`}),(0,w.jsx)(`dd`,{children:Ov(t.generation)})]})]})})}function Ov(e){return e.wired?e.hasCredentials?(0,w.jsx)($,{tone:`live`,children:`ready`}):(0,w.jsx)($,{tone:`draft`,children:`needs key`}):(0,w.jsx)($,{tone:`ink`,children:`off`})}function kv({state:e}){if(e.kind!==`ok`)return(0,w.jsx)(Mv,{num:`STG / 01`,title:`storage`,children:(0,w.jsx)(`p`,{className:`ggui-muted`,children:e.kind===`loading`?`Loading…`:`Unavailable.`})});let t=e.info.storage,n=e=>e===`custom`?`live`:`draft`;return(0,w.jsxs)(Mv,{num:`STG / 01`,title:`storage`,children:[(0,w.jsxs)(`dl`,{className:`ggui-kv`,children:[(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`dt`,{children:`renders`}),(0,w.jsx)(`dd`,{children:(0,w.jsx)($,{tone:n(t.renderStore),children:t.renderStore})})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`dt`,{children:`vectors`}),(0,w.jsx)(`dd`,{children:(0,w.jsx)($,{tone:n(t.vectorStore),children:t.vectorStore})})]})]}),(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{marginTop:12},children:[(0,w.jsx)(`code`,{className:`ggui-code`,children:`memory`}),` = in-process default (loss on restart). `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`custom`}),` = operator-wired store.`]})]})}function Av({state:e}){if(e.kind===`loading`)return(0,w.jsx)(`div`,{className:`ggui-status-hero`,"data-ggui-status-hero":`loading`,children:(0,w.jsx)(`p`,{className:`ggui-muted`,children:`Loading live sessions…`})});if(e.kind===`error`)return(0,w.jsx)(`div`,{className:`ggui-status-hero`,"data-ggui-status-hero":`error`,children:(0,w.jsxs)(`p`,{className:`ggui-muted`,children:[`Couldn't reach `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`/ggui/console/sessions`}),`.`]})});if(e.data.sessions.length===0)return(0,w.jsxs)(`div`,{className:`ggui-status-hero ggui-status-hero--empty`,"data-ggui-status-hero":`empty`,children:[(0,w.jsx)(`div`,{className:`ggui-status-hero__head`,children:(0,w.jsxs)(`span`,{className:`ggui-status-hero__eyebrow`,children:[(0,w.jsx)($,{tone:`ink`,children:`idle`}),(0,w.jsx)(`span`,{children:`live sessions`})]})}),(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:0},children:[`No sessions yet. Open`,` `,(0,w.jsx)(`button`,{type:`button`,className:`ggui-link`,onClick:()=>E(`/`),children:`playground`}),` `,`to start one, or point an agent at`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui_render`}),`.`]})]});let t=e.data.sessions,n=t.slice(0,3);return(0,w.jsxs)(`div`,{className:`ggui-status-hero ggui-status-hero--active`,"data-ggui-status-hero":`active`,"data-ggui-live-session-count":String(t.length),children:[(0,w.jsx)(`div`,{className:`ggui-status-hero__head`,children:(0,w.jsxs)(`span`,{className:`ggui-status-hero__eyebrow`,children:[(0,w.jsx)($,{tone:`live`,children:`live`}),(0,w.jsxs)(`span`,{children:[t.length,` `,t.length===1?`session`:`sessions`]})]})}),(0,w.jsx)(`ul`,{className:`ggui-status-hero__list`,children:n.map(e=>(0,w.jsx)(`li`,{className:`ggui-status-hero__row`,"data-ggui-dashboard-session-id":e.sessionId,children:(0,w.jsxs)(`div`,{className:`ggui-status-hero__row-main`,children:[e.shortCode?(0,w.jsx)(`code`,{className:`ggui-code`,"data-ggui-status-hero-shortcode":e.shortCode,children:e.shortCode}):(0,w.jsxs)(`code`,{className:`ggui-code`,children:[e.sessionId.slice(0,8),`…`]}),(0,w.jsx)(`span`,{className:`ggui-muted`,children:jv(e.lastActivityAt)})]})},e.sessionId))}),t.length>n.length?(0,w.jsx)(`div`,{className:`ggui-status-hero__foot`,children:(0,w.jsxs)(`button`,{type:`button`,className:`ggui-link`,onClick:()=>E(`/admin/sessions`),children:[`view all `,t.length,` →`]})}):(0,w.jsx)(`div`,{className:`ggui-status-hero__foot`,children:(0,w.jsx)(`button`,{type:`button`,className:`ggui-link`,onClick:()=>E(`/admin/sessions`),children:`view all →`})})]})}function jv(e){let t=Date.now()-e;if(t<0)return`just now`;let n=Math.floor(t/1e3);if(n<5)return`just now`;if(n<60)return`${n}s ago`;let r=Math.floor(n/60);if(r<60)return`${r}m ago`;let i=Math.floor(r/60);if(i<24)return`${i}h ago`;let a=new Date(e),o=e=>e<10?`0${e}`:String(e);return`${a.getFullYear()}-${o(a.getMonth()+1)}-${o(a.getDate())}`}function Mv({num:e,title:t,children:n}){return(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:t}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:e})]}),(0,w.jsx)(`div`,{className:`ggui-card__body`,children:n})]})}function Nv(e){let t=e.$value;if(Array.isArray(t))return t.join(`, `);if(typeof t==`object`&&t){let n=t;if(e.$type===`shadow`&&`offsetX`in n)return`${n.offsetX} ${n.offsetY} ${n.blur} ${n.spread} ${n.color}`;if(e.$type===`transition`&&`duration`in n&&`timingFunction`in n)return`${typeof n.property==`string`&&n.property?`${n.property} `:``}${n.duration} ${n.timingFunction}`}return String(t)}function Pv(e,t,n){for(let[r,i]of Object.entries(e))r.startsWith(`$`)||(typeof i==`object`&&i&&`$value`in i?n.push(` --ggui-${t}-${r}: ${Nv(i)};`):typeof i==`object`&&i&&Pv(i,`${t}-${r}`,n))}function Fv(e){let t=[];return Pv(e.color,`color`,t),Pv(e.font,`font`,t),Pv(e.spacing,`spacing`,t),Pv(e.shape,`shape`,t),Pv({duration:e.motion.duration,easing:e.motion.easing,transition:e.motion.transition},`motion`,t),Pv(e.accessibility,`accessibility`,t),Pv(e.zIndex,`zIndex`,t),t.join(`
|
|
203
203
|
`)}function Iv(e,t){let n=/([\d.]+%|from|to)\s*\{([^}]*)\}/g,r=[],i;for(;(i=n.exec(t))!==null;){let e=i[1],t=i[2].trim().split(`;`).map(e=>e.trim()).filter(Boolean).map(e=>e.endsWith(`;`)?e:`${e};`).join(` `);r.push(` ${e} { ${t} }`)}return`@keyframes ggui-${e} {\n${r.join(`
|
|
204
204
|
`)}\n}`}function Lv(e){let t=[];for(let[n,r]of Object.entries(e.motion.keyframes))n.startsWith(`$`)||t.push(Iv(n,String(r.$value)));return t.join(`
|
|
205
205
|
|
|
206
|
-
`)}function Rv(e,t){let n=`:root {\n${Fv(t)}\n}`,r=Lv(t),i=r?`${n}\n\n${r}`:n;return{id:e,name:t.$name,description:t.$description,metadata:t.$metadata,cssVariables:n,cssKeyframes:r,css:i}}({version:1,tokens:`--ggui-color-container.--ggui-color-error-100.--ggui-color-error-200.--ggui-color-error-50.--ggui-color-error-500.--ggui-color-error-600.--ggui-color-error-700.--ggui-color-error-800.--ggui-color-info-100.--ggui-color-info-200.--ggui-color-info-50.--ggui-color-info-500.--ggui-color-info-700.--ggui-color-info-800.--ggui-color-neutral-100.--ggui-color-neutral-200.--ggui-color-neutral-300.--ggui-color-neutral-400.--ggui-color-neutral-50.--ggui-color-neutral-500.--ggui-color-neutral-600.--ggui-color-neutral-800.--ggui-color-onContainer.--ggui-color-onError.--ggui-color-onPrimary.--ggui-color-onSurface.--ggui-color-onSurfaceVariant.--ggui-color-outline.--ggui-color-outlineVariant.--ggui-color-primary.--ggui-color-primary-100.--ggui-color-primary-200.--ggui-color-primary-300.--ggui-color-primary-400.--ggui-color-primary-50.--ggui-color-primary-500.--ggui-color-primary-600.--ggui-color-primary-700.--ggui-color-primary-800.--ggui-color-primary-900.--ggui-color-success-100.--ggui-color-success-200.--ggui-color-success-50.--ggui-color-success-500.--ggui-color-success-700.--ggui-color-success-800.--ggui-color-surface.--ggui-color-surface-gradient.--ggui-color-surface-subtle.--ggui-color-surface-sunken.--ggui-color-surfaceVariant.--ggui-color-warning-100.--ggui-color-warning-200.--ggui-color-warning-50.--ggui-color-warning-500.--ggui-color-warning-700.--ggui-color-warning-800.--ggui-flash-color.--ggui-font-family-mono.--ggui-font-family-sans.--ggui-font-lineHeight-normal.--ggui-font-size-2xl.--ggui-font-size-3xl.--ggui-font-size-4xl.--ggui-font-size-base.--ggui-font-size-lg.--ggui-font-size-sm.--ggui-font-size-xl.--ggui-font-size-xs.--ggui-font-weight-bold.--ggui-font-weight-medium.--ggui-font-weight-normal.--ggui-font-weight-semibold.--ggui-radius-md.--ggui-radius-sm.--ggui-shape-radius-full.--ggui-shape-radius-lg.--ggui-shape-radius-md.--ggui-shape-radius-sm.--ggui-shape-radius-xl.--ggui-shape-shadow-lg.--ggui-shape-shadow-md.--ggui-shape-shadow-sm.--ggui-shape-shadow-xl.--ggui-spacing-1.--ggui-spacing-10.--ggui-spacing-12.--ggui-spacing-2.--ggui-spacing-2xl.--ggui-spacing-3.--ggui-spacing-4.--ggui-spacing-5.--ggui-spacing-6.--ggui-spacing-8.--ggui-spacing-lg.--ggui-spacing-md.--ggui-spacing-sm.--ggui-spacing-xl.--ggui-spacing-xs`.split(`.`)}).tokens;var zv={light:{success:{50:{$type:`color`,$value:`#f0fdf4`},100:{$type:`color`,$value:`#dcfce7`},200:{$type:`color`,$value:`#bbf7d0`},500:{$type:`color`,$value:`#22c55e`},600:{$type:`color`,$value:`#16a34a`},700:{$type:`color`,$value:`#15803d`},800:{$type:`color`,$value:`#166534`}},warning:{50:{$type:`color`,$value:`#fffbeb`},100:{$type:`color`,$value:`#fef3c7`},200:{$type:`color`,$value:`#fde68a`},500:{$type:`color`,$value:`#f59e0b`},600:{$type:`color`,$value:`#d97706`},700:{$type:`color`,$value:`#b45309`},800:{$type:`color`,$value:`#92400e`}},error:{50:{$type:`color`,$value:`#fef2f2`},100:{$type:`color`,$value:`#fee2e2`},200:{$type:`color`,$value:`#fecaca`},500:{$type:`color`,$value:`#ef4444`},600:{$type:`color`,$value:`#dc2626`},700:{$type:`color`,$value:`#b91c1c`},800:{$type:`color`,$value:`#991b1b`}},info:{50:{$type:`color`,$value:`#ecfeff`},100:{$type:`color`,$value:`#cffafe`},200:{$type:`color`,$value:`#a5f3fc`},500:{$type:`color`,$value:`#06b6d4`},600:{$type:`color`,$value:`#0891b2`},700:{$type:`color`,$value:`#0e7490`},800:{$type:`color`,$value:`#155e75`}}},dark:{success:{50:{$type:`color`,$value:`#052e16`},100:{$type:`color`,$value:`#14532d`},200:{$type:`color`,$value:`#166534`},500:{$type:`color`,$value:`#22c55e`},600:{$type:`color`,$value:`#4ade80`},700:{$type:`color`,$value:`#86efac`},800:{$type:`color`,$value:`#bbf7d0`}},warning:{50:{$type:`color`,$value:`#451a03`},100:{$type:`color`,$value:`#78350f`},200:{$type:`color`,$value:`#92400e`},500:{$type:`color`,$value:`#f59e0b`},600:{$type:`color`,$value:`#fbbf24`},700:{$type:`color`,$value:`#fcd34d`},800:{$type:`color`,$value:`#fde68a`}},error:{50:{$type:`color`,$value:`#450a0a`},100:{$type:`color`,$value:`#7f1d1d`},200:{$type:`color`,$value:`#991b1b`},500:{$type:`color`,$value:`#ef4444`},600:{$type:`color`,$value:`#f87171`},700:{$type:`color`,$value:`#fca5a5`},800:{$type:`color`,$value:`#fecaca`}},info:{50:{$type:`color`,$value:`#083344`},100:{$type:`color`,$value:`#164e63`},200:{$type:`color`,$value:`#155e75`},500:{$type:`color`,$value:`#06b6d4`},600:{$type:`color`,$value:`#22d3ee`},700:{$type:`color`,$value:`#67e8f9`},800:{$type:`color`,$value:`#a5f3fc`}}}},Bv={light:{focusRing:{color:{$type:`color`,$value:`#0284c7`},width:{$type:`dimension`,$value:`2px`},offset:{$type:`dimension`,$value:`2px`}},reducedMotion:{duration:{$type:`duration`,$value:`0ms`}},highContrast:{borderWidth:{$type:`dimension`,$value:`2px`},textColor:{$type:`color`,$value:`#000000`},backgroundColor:{$type:`color`,$value:`#ffffff`},linkColor:{$type:`color`,$value:`#0369a1`}}},dark:{focusRing:{color:{$type:`color`,$value:`#38bdf8`},width:{$type:`dimension`,$value:`2px`},offset:{$type:`dimension`,$value:`2px`}},reducedMotion:{duration:{$type:`duration`,$value:`0ms`}},highContrast:{borderWidth:{$type:`dimension`,$value:`2px`},textColor:{$type:`color`,$value:`#f1f5f9`},backgroundColor:{$type:`color`,$value:`#0f172a`},linkColor:{$type:`color`,$value:`#7dd3fc`}}}},Vv={hide:{$type:`number`,$value:-1},base:{$type:`number`,$value:0},docked:{$type:`number`,$value:10},dropdown:{$type:`number`,$value:1e3},sticky:{$type:`number`,$value:1100},banner:{$type:`number`,$value:1200},overlay:{$type:`number`,$value:1300},modal:{$type:`number`,$value:1400},popover:{$type:`number`,$value:1500},skipLink:{$type:`number`,$value:1600},toast:{$type:`number`,$value:1700},tooltip:{$type:`number`,$value:1800}},Hv={fast:{$type:`transition`,$value:`100ms cubic-bezier(0.4, 0, 0.2, 1)`},normal:{$type:`transition`,$value:`200ms cubic-bezier(0.4, 0, 0.2, 1)`},slow:{$type:`transition`,$value:`300ms cubic-bezier(0.4, 0, 0.2, 1)`},colors:{$type:`transition`,$value:`color 200ms cubic-bezier(0.4, 0, 0.2, 1), background-color 200ms cubic-bezier(0.4, 0, 0.2, 1), border-color 200ms cubic-bezier(0.4, 0, 0.2, 1)`},opacity:{$type:`transition`,$value:`opacity 200ms cubic-bezier(0.4, 0, 0.2, 1)`},transform:{$type:`transition`,$value:`transform 200ms cubic-bezier(0, 0, 0.2, 1)`}},Uv={font:{family:{sans:{$value:`"Inter", system-ui, -apple-system, sans-serif`,$type:`fontFamily`},mono:{$value:`"Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace`,$type:`fontFamily`}},size:{sm:{$value:`0.8125rem`,$type:`dimension`},base:{$value:`0.875rem`,$type:`dimension`},lg:{$value:`1rem`,$type:`dimension`},xl:{$value:`1.125rem`,$type:`dimension`},"2xl":{$value:`1.375rem`,$type:`dimension`}},weight:{normal:{$value:`400`,$type:`fontWeight`},medium:{$value:`500`,$type:`fontWeight`},semibold:{$value:`600`,$type:`fontWeight`},bold:{$value:`700`,$type:`fontWeight`}},lineHeight:{tight:{$value:`1.2`,$type:`number`},normal:{$value:`1.5`,$type:`number`},relaxed:{$value:`1.6`,$type:`number`}}},spacing:{1:{$value:`0.25rem`,$type:`dimension`},2:{$value:`0.5rem`,$type:`dimension`},3:{$value:`0.75rem`,$type:`dimension`},4:{$value:`1rem`,$type:`dimension`},5:{$value:`1.25rem`,$type:`dimension`},6:{$value:`1.5rem`,$type:`dimension`},8:{$value:`2rem`,$type:`dimension`},10:{$value:`2.5rem`,$type:`dimension`},12:{$value:`3rem`,$type:`dimension`},xs:{$value:`0.25rem`,$type:`dimension`},sm:{$value:`0.5rem`,$type:`dimension`},md:{$value:`1rem`,$type:`dimension`},lg:{$value:`1.5rem`,$type:`dimension`},xl:{$value:`2rem`,$type:`dimension`},"2xl":{$value:`3rem`,$type:`dimension`}},shape:{radius:{sm:{$value:`2px`,$type:`dimension`},md:{$value:`2px`,$type:`dimension`},lg:{$value:`4px`,$type:`dimension`},xl:{$value:`6px`,$type:`dimension`},full:{$value:`9999px`,$type:`dimension`}},shadow:{sm:{$value:`none`,$type:`shadow`},md:{$value:`0 1px 2px rgba(41, 41, 41, 0.06)`,$type:`shadow`},lg:{$value:`0 2px 6px rgba(41, 41, 41, 0.08)`,$type:`shadow`},xl:{$value:`0 4px 12px rgba(41, 41, 41, 0.10)`,$type:`shadow`}}},motion:{duration:{fast:{$value:`120ms`,$type:`duration`},normal:{$value:`200ms`,$type:`duration`},slow:{$value:`400ms`,$type:`duration`},ambient:{$value:`2000ms`,$type:`duration`}},easing:{default:{$value:`cubic-bezier(0.4, 0, 0.2, 1)`,$type:`cubicBezier`},bounce:{$value:`cubic-bezier(0.34, 1.56, 0.64, 1)`,$type:`cubicBezier`},spring:{$value:`cubic-bezier(0.22, 1, 0.36, 1)`,$type:`cubicBezier`}},transition:Hv,keyframes:{"accent-pulse":{$value:`0%{opacity:1}50%{opacity:0.7}100%{opacity:1}`,$type:`keyframes`},entrance:{$value:`0%{opacity:0;transform:translateY(4px)}100%{opacity:1;transform:none}`,$type:`keyframes`},shimmer:{$value:`0%{background-position:-200% 0}100%{background-position:200% 0}`,$type:`keyframes`}}}},Wv={light:{$name:`GGUI`,$description:`The default ggui theme — monochrome paper + ink, architectural, no decorative flourish.`,$metadata:{font:`Inter`,fontUrl:`https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Geist+Mono:wght@400;500;700&display=swap`,philosophy:`The interface is the artifact, not the chrome around it.`},color:{primary:{50:{$value:`#f4f3ed`,$type:`color`},100:{$value:`#ebe9e1`,$type:`color`},200:{$value:`#e4e4e2`,$type:`color`},300:{$value:`#d9d9d9`,$type:`color`},400:{$value:`#8c8c93`,$type:`color`},500:{$value:`#292929`,$type:`color`},600:{$value:`#1f1f1f`,$type:`color`},700:{$value:`#171717`,$type:`color`},800:{$value:`#0e0e0e`,$type:`color`},900:{$value:`#000000`,$type:`color`}},neutral:{50:{$value:`#f4f3ed`,$type:`color`},100:{$value:`#ebe9e1`,$type:`color`},200:{$value:`#e4e4e2`,$type:`color`},300:{$value:`#d9d9d9`,$type:`color`},400:{$value:`#8c8c93`,$type:`color`},500:{$value:`#5a5a5a`,$type:`color`},600:{$value:`#3d3d3d`,$type:`color`},700:{$value:`#292929`,$type:`color`},800:{$value:`#24242c`,$type:`color`},900:{$value:`#0e0e0e`,$type:`color`}},success:{50:{$value:`#e8f5ec`,$type:`color`},100:{$value:`#c5e6cd`,$type:`color`},200:{$value:`#8fcca0`,$type:`color`},500:{$value:`#1b7a37`,$type:`color`},600:{$value:`#15622c`,$type:`color`},700:{$value:`#0f4a21`,$type:`color`},800:{$value:`#093116`,$type:`color`}},warning:{50:{$value:`#fbf3e0`,$type:`color`},100:{$value:`#f3e1b0`,$type:`color`},200:{$value:`#e6c46e`,$type:`color`},500:{$value:`#8e680c`,$type:`color`},600:{$value:`#86620b`,$type:`color`},700:{$value:`#654a08`,$type:`color`},800:{$value:`#433105`,$type:`color`}},error:{50:{$value:`#fbe7e3`,$type:`color`},100:{$value:`#f4bbb1`,$type:`color`},200:{$value:`#ea8a7a`,$type:`color`},500:{$value:`#cc3520`,$type:`color`},600:{$value:`#ae2d1b`,$type:`color`},700:{$value:`#822214`,$type:`color`},800:{$value:`#57160d`,$type:`color`}},info:{50:{$value:`#e1e1e1`,$type:`color`},100:{$value:`#bababa`,$type:`color`},200:{$value:`#8e8e8e`,$type:`color`},500:{$value:`#3d3d3d`,$type:`color`},600:{$value:`#313131`,$type:`color`},700:{$value:`#252525`,$type:`color`},800:{$value:`#181818`,$type:`color`}},surface:{$value:`#f4f3ed`,$type:`color`},onSurface:{$value:`#292929`,$type:`color`},surfaceVariant:{$value:`#ebe9e1`,$type:`color`},onSurfaceVariant:{$value:`#5a5a5a`,$type:`color`},container:{$value:`#ebe9e1`,$type:`color`},onContainer:{$value:`#292929`,$type:`color`},outline:{$value:`#d6d4cb`,$type:`color`},outlineVariant:{$value:`#e4e4e2`,$type:`color`},onPrimary:{$value:`#f4f3ed`,$type:`color`},primaryContainer:{$value:`#ebe9e1`,$type:`color`},onPrimaryContainer:{$value:`#292929`,$type:`color`},onError:{$value:`#f4f3ed`,$type:`color`},errorContainer:{$value:`#fbe7e3`,$type:`color`},onErrorContainer:{$value:`#57160d`,$type:`color`},tertiary:{$value:`#1b7a37`,$type:`color`},onTertiary:{$value:`#f4f3ed`,$type:`color`},tertiaryContainer:{$value:`#e8f5ec`,$type:`color`},onTertiaryContainer:{$value:`#093116`,$type:`color`}},font:Uv.font,spacing:Uv.spacing,shape:Uv.shape,motion:Uv.motion,accessibility:{...Bv.light,focusRing:{...Bv.light.focusRing,color:{$type:`color`,$value:`#292929`}}},zIndex:Vv},dark:{$name:`GGUI`,$description:`The default ggui theme (dark) — ink canvas, paper text, architectural and flat.`,$metadata:{font:`Inter`,fontUrl:`https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Geist+Mono:wght@400;500;700&display=swap`,philosophy:`The interface is the artifact, not the chrome around it.`},color:{primary:{50:{$value:`#0e0e0e`,$type:`color`},100:{$value:`#1f1f1f`,$type:`color`},200:{$value:`#292929`,$type:`color`},300:{$value:`#3d3d3d`,$type:`color`},400:{$value:`#5a5a5a`,$type:`color`},500:{$value:`#f4f3ed`,$type:`color`},600:{$value:`#ebe9e1`,$type:`color`},700:{$value:`#e4e4e2`,$type:`color`},800:{$value:`#d9d9d9`,$type:`color`},900:{$value:`#ffffff`,$type:`color`}},neutral:{50:{$value:`#0e0e0e`,$type:`color`},100:{$value:`#1f1f1f`,$type:`color`},200:{$value:`#292929`,$type:`color`},300:{$value:`#3d3d3d`,$type:`color`},400:{$value:`#5a5a5a`,$type:`color`},500:{$value:`#8c8c93`,$type:`color`},600:{$value:`#d9d9d9`,$type:`color`},700:{$value:`#e4e4e2`,$type:`color`},800:{$value:`#ebe9e1`,$type:`color`},900:{$value:`#f4f3ed`,$type:`color`}},success:{50:{$value:`#0d2918`,$type:`color`},100:{$value:`#174f2a`,$type:`color`},200:{$value:`#286b3d`,$type:`color`},500:{$value:`#3da85b`,$type:`color`},600:{$value:`#6dbf83`,$type:`color`},700:{$value:`#9dd5ab`,$type:`color`},800:{$value:`#cdead3`,$type:`color`}},warning:{50:{$value:`#332608`,$type:`color`},100:{$value:`#5e4612`,$type:`color`},200:{$value:`#896720`,$type:`color`},500:{$value:`#d4a02e`,$type:`color`},600:{$value:`#dfb55c`,$type:`color`},700:{$value:`#eaca8a`,$type:`color`},800:{$value:`#f5deb8`,$type:`color`}},error:{50:{$value:`#3d130d`,$type:`color`},100:{$value:`#702419`,$type:`color`},200:{$value:`#a33828`,$type:`color`},500:{$value:`#ff5b46`,$type:`color`},600:{$value:`#ff7d6c`,$type:`color`},700:{$value:`#ff9f93`,$type:`color`},800:{$value:`#ffc2ba`,$type:`color`}},info:{50:{$value:`#363636`,$type:`color`},100:{$value:`#5a5a5a`,$type:`color`},200:{$value:`#8c8c8c`,$type:`color`},500:{$value:`#d9d9d9`,$type:`color`},600:{$value:`#e0e0e0`,$type:`color`},700:{$value:`#e8e8e8`,$type:`color`},800:{$value:`#f0f0f0`,$type:`color`}},surface:{$value:`#1f1f1f`,$type:`color`},onSurface:{$value:`#f4f3ed`,$type:`color`},surfaceVariant:{$value:`#292929`,$type:`color`},onSurfaceVariant:{$value:`#d9d9d9`,$type:`color`},container:{$value:`#292929`,$type:`color`},onContainer:{$value:`#f4f3ed`,$type:`color`},outline:{$value:`#3d3d3d`,$type:`color`},outlineVariant:{$value:`#292929`,$type:`color`},onPrimary:{$value:`#292929`,$type:`color`},primaryContainer:{$value:`#3d3d3d`,$type:`color`},onPrimaryContainer:{$value:`#f4f3ed`,$type:`color`},onError:{$value:`#3d130d`,$type:`color`},errorContainer:{$value:`#702419`,$type:`color`},onErrorContainer:{$value:`#ffc2ba`,$type:`color`},tertiary:{$value:`#3da85b`,$type:`color`},onTertiary:{$value:`#0d2918`,$type:`color`},tertiaryContainer:{$value:`#174f2a`,$type:`color`},onTertiaryContainer:{$value:`#cdead3`,$type:`color`}},font:Uv.font,spacing:Uv.spacing,shape:Uv.shape,motion:Uv.motion,accessibility:{...Bv.dark,focusRing:{...Bv.dark.focusRing,color:{$type:`color`,$value:`#f4f3ed`}}},zIndex:Vv}},Gv={font:{family:{sans:{$value:`"Orbitron", "Rajdhani", system-ui, sans-serif`,$type:`fontFamily`},mono:{$value:`"Share Tech Mono", "Fira Code", monospace`,$type:`fontFamily`}},size:{sm:{$value:`0.8rem`,$type:`dimension`},base:{$value:`0.95rem`,$type:`dimension`},lg:{$value:`1.1rem`,$type:`dimension`},xl:{$value:`1.3rem`,$type:`dimension`},"2xl":{$value:`1.6rem`,$type:`dimension`}},weight:{normal:{$value:`400`,$type:`fontWeight`},medium:{$value:`500`,$type:`fontWeight`},semibold:{$value:`600`,$type:`fontWeight`},bold:{$value:`700`,$type:`fontWeight`}},lineHeight:{tight:{$value:`1.2`,$type:`number`},normal:{$value:`1.5`,$type:`number`},relaxed:{$value:`1.7`,$type:`number`}}},spacing:{1:{$value:`0.25rem`,$type:`dimension`},2:{$value:`0.5rem`,$type:`dimension`},3:{$value:`0.75rem`,$type:`dimension`},4:{$value:`1rem`,$type:`dimension`},5:{$value:`1.25rem`,$type:`dimension`},6:{$value:`1.5rem`,$type:`dimension`},8:{$value:`2rem`,$type:`dimension`},10:{$value:`2.5rem`,$type:`dimension`},12:{$value:`3rem`,$type:`dimension`}},shape:{radius:{sm:{$value:`2px`,$type:`dimension`},md:{$value:`4px`,$type:`dimension`},lg:{$value:`6px`,$type:`dimension`},xl:{$value:`8px`,$type:`dimension`},full:{$value:`9999px`,$type:`dimension`}},shadow:{sm:{$value:`0 0 4px rgba(6, 182, 212, 0.3)`,$type:`shadow`},md:{$value:`0 0 8px rgba(6, 182, 212, 0.4)`,$type:`shadow`},lg:{$value:`0 0 16px rgba(6, 182, 212, 0.5)`,$type:`shadow`},xl:{$value:`0 0 24px rgba(6, 182, 212, 0.6), 0 0 48px rgba(6, 182, 212, 0.2)`,$type:`shadow`}}},motion:{duration:{fast:{$value:`100ms`,$type:`duration`},normal:{$value:`200ms`,$type:`duration`},slow:{$value:`600ms`,$type:`duration`},ambient:{$value:`2000ms`,$type:`duration`}},easing:{default:{$value:`cubic-bezier(0.4, 0, 0.2, 1)`,$type:`cubicBezier`},bounce:{$value:`cubic-bezier(0.68, -0.55, 0.27, 1.55)`,$type:`cubicBezier`},spring:{$value:`cubic-bezier(0.22, 1, 0.36, 1)`,$type:`cubicBezier`}},keyframes:{"glitch-flicker":{$value:`0%{opacity:1;transform:none}7%{opacity:0.8;transform:translateX(-2px) skewX(-1deg)}10%{opacity:1;transform:none}47%{opacity:1;transform:none}50%{opacity:0.6;transform:translateX(3px) skewX(2deg)}53%{opacity:1;transform:none}100%{opacity:1;transform:none}`,$type:`keyframes`},"scan-line":{$value:`0%{transform:translateY(-100%)}100%{transform:translateY(100%)}`,$type:`keyframes`},"neon-pulse":{$value:`0%{box-shadow:0 0 4px rgba(6,182,212,0.4)}50%{box-shadow:0 0 16px rgba(6,182,212,0.8)}100%{box-shadow:0 0 4px rgba(6,182,212,0.4)}`,$type:`keyframes`}},transition:{fast:{$type:`transition`,$value:`100ms cubic-bezier(0.4, 0, 0.2, 1)`},normal:{$type:`transition`,$value:`200ms cubic-bezier(0.4, 0, 0.2, 1)`},slow:{$type:`transition`,$value:`600ms cubic-bezier(0.4, 0, 0.2, 1)`},colors:{$type:`transition`,$value:`color 200ms cubic-bezier(0.4, 0, 0.2, 1), background-color 200ms cubic-bezier(0.4, 0, 0.2, 1), border-color 200ms cubic-bezier(0.4, 0, 0.2, 1)`},opacity:{$type:`transition`,$value:`opacity 200ms cubic-bezier(0.4, 0, 0.2, 1)`},transform:{$type:`transition`,$value:`transform 200ms cubic-bezier(0, 0, 0.2, 1)`}}}},Kv={light:{$name:`Cyberpunk`,$description:`Neon-lit dystopian tech — cyan neon on dark chrome with glitch animations.`,$metadata:{font:`Orbitron`,fontUrl:`https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700&display=swap`,philosophy:`Chromatic noise, electric tension, digital rebellion.`},color:{primary:{50:{$value:`#ecfeff`,$type:`color`},100:{$value:`#cffafe`,$type:`color`},200:{$value:`#a5f3fc`,$type:`color`},300:{$value:`#67e8f9`,$type:`color`},400:{$value:`#22d3ee`,$type:`color`},500:{$value:`#06b6d4`,$type:`color`},600:{$value:`#0891b2`,$type:`color`},700:{$value:`#1085a5`,$type:`color`},800:{$value:`#155e75`,$type:`color`},900:{$value:`#164e63`,$type:`color`}},neutral:{50:{$value:`#0a0a0f`,$type:`color`},100:{$value:`#111118`,$type:`color`},200:{$value:`#1a1a24`,$type:`color`},300:{$value:`#25252f`,$type:`color`},400:{$value:`#3a3a48`,$type:`color`},500:{$value:`#5d5d74`,$type:`color`},600:{$value:`#8888a0`,$type:`color`},700:{$value:`#aaaabe`,$type:`color`},800:{$value:`#d0d0e0`,$type:`color`},900:{$value:`#e8e8f0`,$type:`color`}},success:{50:{$value:`#e0fff1`,$type:`color`},100:{$value:`#b3ffd9`,$type:`color`},200:{$value:`#66ffb3`,$type:`color`},500:{$value:`#00ff88`,$type:`color`},600:{$value:`#00cc6e`,$type:`color`},700:{$value:`#009955`,$type:`color`},800:{$value:`#006638`,$type:`color`}},warning:{50:{$value:`#fff5e0`,$type:`color`},100:{$value:`#ffe5b3`,$type:`color`},200:{$value:`#ffcc66`,$type:`color`},500:{$value:`#ffaa00`,$type:`color`},600:{$value:`#cc8800`,$type:`color`},700:{$value:`#996600`,$type:`color`},800:{$value:`#664400`,$type:`color`}},error:{50:{$value:`#ffe0e8`,$type:`color`},100:{$value:`#ffb3c4`,$type:`color`},200:{$value:`#ff6688`,$type:`color`},500:{$value:`#ff2255`,$type:`color`},600:{$value:`#cc1a44`,$type:`color`},700:{$value:`#991333`,$type:`color`},800:{$value:`#660d22`,$type:`color`}},info:{50:{$value:`#e0f9ff`,$type:`color`},100:{$value:`#b3edff`,$type:`color`},200:{$value:`#66dbff`,$type:`color`},500:{$value:`#00ccff`,$type:`color`},600:{$value:`#00a3cc`,$type:`color`},700:{$value:`#007a99`,$type:`color`},800:{$value:`#005266`,$type:`color`}},surface:{$value:`#0a0a0f`,$type:`color`},onSurface:{$value:`#e8e8f0`,$type:`color`},surfaceVariant:{$value:`#111118`,$type:`color`},onSurfaceVariant:{$value:`#8888a0`,$type:`color`},container:{$value:`#155e75`,$type:`color`},onContainer:{$value:`#cffafe`,$type:`color`},outline:{$value:`#3a3a48`,$type:`color`},outlineVariant:{$value:`#25252f`,$type:`color`},onPrimary:{$value:`#0a0a0f`,$type:`color`},primaryContainer:{$value:`#155e75`,$type:`color`},onPrimaryContainer:{$value:`#cffafe`,$type:`color`},onError:{$value:`#0a0a0f`,$type:`color`},errorContainer:{$value:`#660d22`,$type:`color`},onErrorContainer:{$value:`#ffe0e8`,$type:`color`},tertiary:{$value:`#00ff88`,$type:`color`},onTertiary:{$value:`#0a0a0f`,$type:`color`},tertiaryContainer:{$value:`#006638`,$type:`color`},onTertiaryContainer:{$value:`#e0fff1`,$type:`color`}},font:Gv.font,spacing:Gv.spacing,shape:Gv.shape,motion:Gv.motion,accessibility:{...Bv.light,focusRing:{...Bv.light.focusRing,color:{$type:`color`,$value:`#06b6d4`}}},zIndex:Vv},dark:{$name:`Cyberpunk`,$description:`Neon-lit dystopian tech (dark) — brighter cyan on pure-black chrome, cranked neon contrast.`,$metadata:{font:`Orbitron`,fontUrl:`https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700&display=swap`,philosophy:`Chromatic noise, electric tension, digital rebellion.`},color:{primary:{50:{$value:`#164e63`,$type:`color`},100:{$value:`#155e75`,$type:`color`},200:{$value:`#0e7490`,$type:`color`},300:{$value:`#0891b2`,$type:`color`},400:{$value:`#06b6d4`,$type:`color`},500:{$value:`#22d3ee`,$type:`color`},600:{$value:`#67e8f9`,$type:`color`},700:{$value:`#a5f3fc`,$type:`color`},800:{$value:`#cffafe`,$type:`color`},900:{$value:`#ecfeff`,$type:`color`}},neutral:{50:{$value:`#000005`,$type:`color`},100:{$value:`#0a0a0f`,$type:`color`},200:{$value:`#111118`,$type:`color`},300:{$value:`#1a1a24`,$type:`color`},400:{$value:`#3a3a48`,$type:`color`},500:{$value:`#5a5a70`,$type:`color`},600:{$value:`#8888a0`,$type:`color`},700:{$value:`#aaaabe`,$type:`color`},800:{$value:`#d0d0e0`,$type:`color`},900:{$value:`#e8e8f0`,$type:`color`}},success:{50:{$value:`#003319`,$type:`color`},100:{$value:`#006633`,$type:`color`},200:{$value:`#00994d`,$type:`color`},500:{$value:`#33ffaa`,$type:`color`},600:{$value:`#66ffbf`,$type:`color`},700:{$value:`#99ffd4`,$type:`color`},800:{$value:`#ccffea`,$type:`color`}},warning:{50:{$value:`#332200`,$type:`color`},100:{$value:`#664400`,$type:`color`},200:{$value:`#996600`,$type:`color`},500:{$value:`#ffbe33`,$type:`color`},600:{$value:`#ffcb5c`,$type:`color`},700:{$value:`#ffd985`,$type:`color`},800:{$value:`#ffe7ad`,$type:`color`}},error:{50:{$value:`#330a17`,$type:`color`},100:{$value:`#66142e`,$type:`color`},200:{$value:`#991e45`,$type:`color`},500:{$value:`#ff4477`,$type:`color`},600:{$value:`#ff6e94`,$type:`color`},700:{$value:`#ff97b1`,$type:`color`},800:{$value:`#ffc1cf`,$type:`color`}},info:{50:{$value:`#002b33`,$type:`color`},100:{$value:`#005566`,$type:`color`},200:{$value:`#008099`,$type:`color`},500:{$value:`#33d6ff`,$type:`color`},600:{$value:`#5cdeff`,$type:`color`},700:{$value:`#85e6ff`,$type:`color`},800:{$value:`#adeeff`,$type:`color`}},surface:{$value:`#000005`,$type:`color`},onSurface:{$value:`#e8e8f0`,$type:`color`},surfaceVariant:{$value:`#0a0a0f`,$type:`color`},onSurfaceVariant:{$value:`#aaaabe`,$type:`color`},container:{$value:`#0e7490`,$type:`color`},onContainer:{$value:`#cffafe`,$type:`color`},outline:{$value:`#1a1a24`,$type:`color`},outlineVariant:{$value:`#111118`,$type:`color`},onPrimary:{$value:`#000005`,$type:`color`},primaryContainer:{$value:`#0e7490`,$type:`color`},onPrimaryContainer:{$value:`#cffafe`,$type:`color`},onError:{$value:`#000005`,$type:`color`},errorContainer:{$value:`#991e45`,$type:`color`},onErrorContainer:{$value:`#ffc1cf`,$type:`color`},tertiary:{$value:`#33ffaa`,$type:`color`},onTertiary:{$value:`#000005`,$type:`color`},tertiaryContainer:{$value:`#006633`,$type:`color`},onTertiaryContainer:{$value:`#ccffea`,$type:`color`}},font:Gv.font,spacing:Gv.spacing,shape:Gv.shape,motion:Gv.motion,accessibility:{...Bv.dark,focusRing:{...Bv.dark.focusRing,color:{$type:`color`,$value:`#22d3ee`}}},zIndex:Vv}},qv={font:{family:{sans:{$value:`"Noto Serif JP", "Georgia", serif`,$type:`fontFamily`},mono:{$value:`"Noto Sans Mono", "Courier New", monospace`,$type:`fontFamily`}},size:{sm:{$value:`0.875rem`,$type:`dimension`},base:{$value:`1rem`,$type:`dimension`},lg:{$value:`1.125rem`,$type:`dimension`},xl:{$value:`1.3rem`,$type:`dimension`},"2xl":{$value:`1.6rem`,$type:`dimension`}},weight:{normal:{$value:`400`,$type:`fontWeight`},medium:{$value:`500`,$type:`fontWeight`},semibold:{$value:`600`,$type:`fontWeight`},bold:{$value:`700`,$type:`fontWeight`}},lineHeight:{tight:{$value:`1.3`,$type:`number`},normal:{$value:`1.6`,$type:`number`},relaxed:{$value:`1.9`,$type:`number`}}},spacing:{1:{$value:`0.25rem`,$type:`dimension`},2:{$value:`0.5rem`,$type:`dimension`},3:{$value:`0.75rem`,$type:`dimension`},4:{$value:`1rem`,$type:`dimension`},5:{$value:`1.25rem`,$type:`dimension`},6:{$value:`1.5rem`,$type:`dimension`},8:{$value:`2rem`,$type:`dimension`},10:{$value:`2.5rem`,$type:`dimension`},12:{$value:`3rem`,$type:`dimension`}},shape:{radius:{sm:{$value:`0.125rem`,$type:`dimension`},md:{$value:`0.25rem`,$type:`dimension`},lg:{$value:`0.5rem`,$type:`dimension`},xl:{$value:`0.75rem`,$type:`dimension`},full:{$value:`9999px`,$type:`dimension`}},shadow:{sm:{$value:`0 1px 3px rgba(42, 39, 36, 0.06)`,$type:`shadow`},md:{$value:`0 3px 8px rgba(42, 39, 36, 0.08)`,$type:`shadow`},lg:{$value:`0 8px 20px rgba(42, 39, 36, 0.10)`,$type:`shadow`},xl:{$value:`0 16px 40px rgba(42, 39, 36, 0.12)`,$type:`shadow`}}},motion:{duration:{fast:{$value:`200ms`,$type:`duration`},normal:{$value:`500ms`,$type:`duration`},slow:{$value:`1500ms`,$type:`duration`},ambient:{$value:`6000ms`,$type:`duration`}},easing:{default:{$value:`cubic-bezier(0.33, 0, 0.67, 1)`,$type:`cubicBezier`},bounce:{$value:`cubic-bezier(0.34, 1.2, 0.64, 1)`,$type:`cubicBezier`},spring:{$value:`cubic-bezier(0.22, 1, 0.36, 1)`,$type:`cubicBezier`}},keyframes:{"slow-breathe":{$value:`0%{opacity:0.85}50%{opacity:1}100%{opacity:0.85}`,$type:`keyframes`},"gentle-fade":{$value:`0%{opacity:0}100%{opacity:1}`,$type:`keyframes`},"ink-ripple":{$value:`0%{transform:scale(0.95);opacity:0.5}50%{transform:scale(1);opacity:0.8}100%{transform:scale(0.95);opacity:0.5}`,$type:`keyframes`}},transition:{fast:{$type:`transition`,$value:`200ms cubic-bezier(0.33, 0, 0.67, 1)`},normal:{$type:`transition`,$value:`500ms cubic-bezier(0.33, 0, 0.67, 1)`},slow:{$type:`transition`,$value:`1500ms cubic-bezier(0.33, 0, 0.67, 1)`},colors:{$type:`transition`,$value:`color 500ms cubic-bezier(0.33, 0, 0.67, 1), background-color 500ms cubic-bezier(0.33, 0, 0.67, 1), border-color 500ms cubic-bezier(0.33, 0, 0.67, 1)`},opacity:{$type:`transition`,$value:`opacity 500ms cubic-bezier(0.33, 0, 0.67, 1)`},transform:{$type:`transition`,$value:`transform 500ms cubic-bezier(0.22, 1, 0.36, 1)`}}}},Jv={light:{$name:`Zen`,$description:`Minimalist Japanese aesthetic — warm stone tones, deliberate space, and unhurried motion.`,$metadata:{font:`Noto Serif JP`,fontUrl:`https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@400;500;600;700&display=swap`,philosophy:`Beauty in imperfection. Stillness as presence.`},color:{primary:{50:{$value:`#f6f7f4`,$type:`color`},100:{$value:`#e8ebe2`,$type:`color`},200:{$value:`#d1d7c5`,$type:`color`},300:{$value:`#b3bda1`,$type:`color`},400:{$value:`#93a17c`,$type:`color`},500:{$value:`#748660`,$type:`color`},600:{$value:`#5c6b4c`,$type:`color`},700:{$value:`#48543d`,$type:`color`},800:{$value:`#3b4434`,$type:`color`},900:{$value:`#33392e`,$type:`color`}},neutral:{50:{$value:`#faf9f7`,$type:`color`},100:{$value:`#f3f1ed`,$type:`color`},200:{$value:`#e7e4de`,$type:`color`},300:{$value:`#d5d0c8`,$type:`color`},400:{$value:`#b8b0a4`,$type:`color`},500:{$value:`#988d81`,$type:`color`},600:{$value:`#7a7068`,$type:`color`},700:{$value:`#5e5650`,$type:`color`},800:{$value:`#3e3a36`,$type:`color`},900:{$value:`#2a2724`,$type:`color`}},success:{50:{$type:`color`,$value:`#f0f4ee`},100:{$type:`color`,$value:`#dde6d8`},200:{$type:`color`,$value:`#c6d4be`},500:{$type:`color`,$value:`#5b7950`},600:{$type:`color`,$value:`#58754d`},700:{$type:`color`,$value:`#43583a`},800:{$type:`color`,$value:`#2f3e29`}},warning:{50:{$type:`color`,$value:`#faf6ea`},100:{$type:`color`,$value:`#f4ebcb`},200:{$type:`color`,$value:`#ecdda4`},500:{$type:`color`,$value:`#886f29`},600:{$type:`color`,$value:`#a88a3a`},700:{$type:`color`,$value:`#7e672c`},800:{$type:`color`,$value:`#59481f`}},error:{50:{$type:`color`,$value:`#f8edec`},100:{$type:`color`,$value:`#efd0ce`},200:{$type:`color`,$value:`#e3aba8`},500:{$type:`color`,$value:`#b85450`},600:{$type:`color`,$value:`#9a4340`},700:{$type:`color`,$value:`#743330`},800:{$type:`color`,$value:`#522423`}},info:{50:{$type:`color`,$value:`#eef3f5`},100:{$type:`color`,$value:`#d7e2e7`},200:{$type:`color`,$value:`#b9cdd5`},500:{$type:`color`,$value:`#6a8fa0`},600:{$type:`color`,$value:`#557585`},700:{$type:`color`,$value:`#405864`},800:{$type:`color`,$value:`#2c3d46`}},surface:{$value:`#faf9f7`,$type:`color`},onSurface:{$value:`#2a2724`,$type:`color`},surfaceVariant:{$value:`#f3f1ed`,$type:`color`},onSurfaceVariant:{$value:`#6b635b`,$type:`color`},container:{$value:`#e8ebe2`,$type:`color`},onContainer:{$value:`#33392e`,$type:`color`},outline:{$value:`#d5d0c8`,$type:`color`},outlineVariant:{$value:`#e7e4de`,$type:`color`},onPrimary:{$value:`#faf9f7`,$type:`color`},primaryContainer:{$value:`#e8ebe2`,$type:`color`},onPrimaryContainer:{$value:`#33392e`,$type:`color`},onError:{$value:`#faf9f7`,$type:`color`},errorContainer:{$value:`#f8edec`,$type:`color`},onErrorContainer:{$value:`#522423`,$type:`color`},tertiary:{$value:`#7d5e6e`,$type:`color`},onTertiary:{$value:`#faf9f7`,$type:`color`},tertiaryContainer:{$value:`#ebe2e6`,$type:`color`},onTertiaryContainer:{$value:`#3a2a32`,$type:`color`}},font:qv.font,spacing:qv.spacing,shape:qv.shape,motion:qv.motion,accessibility:{...Bv.light,focusRing:{...Bv.light.focusRing,color:{$type:`color`,$value:`#748660`}}},zIndex:Vv},dark:{$name:`Zen`,$description:`Minimalist Japanese aesthetic (dark) — dusk stone surfaces with restrained moss accents and unhurried motion.`,$metadata:{font:`Noto Serif JP`,fontUrl:`https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@400;500;600;700&display=swap`,philosophy:`Beauty in imperfection. Stillness as presence.`},color:{primary:{50:{$value:`#33392e`,$type:`color`},100:{$value:`#3b4434`,$type:`color`},200:{$value:`#48543d`,$type:`color`},300:{$value:`#5c6b4c`,$type:`color`},400:{$value:`#748660`,$type:`color`},500:{$value:`#93a17c`,$type:`color`},600:{$value:`#b3bda1`,$type:`color`},700:{$value:`#d1d7c5`,$type:`color`},800:{$value:`#e8ebe2`,$type:`color`},900:{$value:`#f6f7f4`,$type:`color`}},neutral:{50:{$value:`#1a1816`,$type:`color`},100:{$value:`#2a2724`,$type:`color`},200:{$value:`#3e3a36`,$type:`color`},300:{$value:`#5e5650`,$type:`color`},400:{$value:`#7a7068`,$type:`color`},500:{$value:`#9a9084`,$type:`color`},600:{$value:`#b8b0a4`,$type:`color`},700:{$value:`#d5d0c8`,$type:`color`},800:{$value:`#e7e4de`,$type:`color`},900:{$value:`#faf9f7`,$type:`color`}},success:{50:{$type:`color`,$value:`#f1f6ee`},100:{$type:`color`,$value:`#dceacc`},200:{$type:`color`,$value:`#c4dab1`},500:{$type:`color`,$value:`#8aab7a`},600:{$type:`color`,$value:`#6f8d62`},700:{$type:`color`,$value:`#546b4a`},800:{$type:`color`,$value:`#3a4b34`}},warning:{50:{$type:`color`,$value:`#fbf6e9`},100:{$type:`color`,$value:`#f4e9c1`},200:{$type:`color`,$value:`#ecdda4`},500:{$type:`color`,$value:`#d8b96a`},600:{$type:`color`,$value:`#b09553`},700:{$type:`color`,$value:`#84703d`},800:{$type:`color`,$value:`#5a4c2a`}},error:{50:{$type:`color`,$value:`#faeae9`},100:{$type:`color`,$value:`#f1cac8`},200:{$type:`color`,$value:`#e4a5a1`},500:{$type:`color`,$value:`#d17570`},600:{$type:`color`,$value:`#a85753`},700:{$type:`color`,$value:`#7d403c`},800:{$type:`color`,$value:`#552a27`}},info:{50:{$type:`color`,$value:`#f0f4f6`},100:{$type:`color`,$value:`#d7e0e5`},200:{$type:`color`,$value:`#bccbd2`},500:{$type:`color`,$value:`#8eaab8`},600:{$type:`color`,$value:`#708995`},700:{$type:`color`,$value:`#546771`},800:{$type:`color`,$value:`#38454d`}},surface:{$value:`#2a2724`,$type:`color`},onSurface:{$value:`#f3f1ed`,$type:`color`},surfaceVariant:{$value:`#3e3a36`,$type:`color`},onSurfaceVariant:{$value:`#b8b0a4`,$type:`color`},container:{$value:`#48543d`,$type:`color`},onContainer:{$value:`#e8ebe2`,$type:`color`},outline:{$value:`#5e5650`,$type:`color`},outlineVariant:{$value:`#3e3a36`,$type:`color`},onPrimary:{$value:`#1a1816`,$type:`color`},primaryContainer:{$value:`#3b4434`,$type:`color`},onPrimaryContainer:{$value:`#e8ebe2`,$type:`color`},onError:{$value:`#1a1816`,$type:`color`},errorContainer:{$value:`#552a27`,$type:`color`},onErrorContainer:{$value:`#f1cac8`,$type:`color`},tertiary:{$value:`#a98899`,$type:`color`},onTertiary:{$value:`#1a1816`,$type:`color`},tertiaryContainer:{$value:`#4e3a44`,$type:`color`},onTertiaryContainer:{$value:`#ebe2e6`,$type:`color`}},font:qv.font,spacing:qv.spacing,shape:qv.shape,motion:qv.motion,accessibility:{...Bv.dark,focusRing:{...Bv.dark.focusRing,color:{$type:`color`,$value:`#93a17c`}}},zIndex:Vv}},Yv={font:{family:{sans:{$value:`"Outfit", system-ui, -apple-system, sans-serif`,$type:`fontFamily`},mono:{$value:`"Fira Code", "JetBrains Mono", monospace`,$type:`fontFamily`}},size:{sm:{$value:`0.875rem`,$type:`dimension`},base:{$value:`1rem`,$type:`dimension`},lg:{$value:`1.125rem`,$type:`dimension`},xl:{$value:`1.25rem`,$type:`dimension`},"2xl":{$value:`1.5rem`,$type:`dimension`}},weight:{normal:{$value:`400`,$type:`fontWeight`},medium:{$value:`500`,$type:`fontWeight`},semibold:{$value:`600`,$type:`fontWeight`},bold:{$value:`700`,$type:`fontWeight`}},lineHeight:{tight:{$value:`1.25`,$type:`number`},normal:{$value:`1.5`,$type:`number`},relaxed:{$value:`1.75`,$type:`number`}}},spacing:{1:{$value:`0.25rem`,$type:`dimension`},2:{$value:`0.5rem`,$type:`dimension`},3:{$value:`0.75rem`,$type:`dimension`},4:{$value:`1rem`,$type:`dimension`},5:{$value:`1.25rem`,$type:`dimension`},6:{$value:`1.5rem`,$type:`dimension`},8:{$value:`2rem`,$type:`dimension`},10:{$value:`2.5rem`,$type:`dimension`},12:{$value:`3rem`,$type:`dimension`}},shape:{radius:{sm:{$value:`0.25rem`,$type:`dimension`},md:{$value:`0.5rem`,$type:`dimension`},lg:{$value:`0.75rem`,$type:`dimension`},xl:{$value:`1rem`,$type:`dimension`},full:{$value:`9999px`,$type:`dimension`}},shadow:{sm:{$value:`0 0 6px rgba(236, 72, 153, 0.25)`,$type:`shadow`},md:{$value:`0 0 12px rgba(236, 72, 153, 0.35)`,$type:`shadow`},lg:{$value:`0 0 20px rgba(236, 72, 153, 0.45)`,$type:`shadow`},xl:{$value:`0 0 30px rgba(236, 72, 153, 0.55), 0 0 60px rgba(236, 72, 153, 0.2)`,$type:`shadow`}}},motion:{duration:{fast:{$value:`120ms`,$type:`duration`},normal:{$value:`250ms`,$type:`duration`},slow:{$value:`800ms`,$type:`duration`},ambient:{$value:`2500ms`,$type:`duration`}},easing:{default:{$value:`cubic-bezier(0.4, 0, 0.2, 1)`,$type:`cubicBezier`},bounce:{$value:`cubic-bezier(0.68, -0.55, 0.27, 1.55)`,$type:`cubicBezier`},spring:{$value:`cubic-bezier(0.22, 1, 0.36, 1)`,$type:`cubicBezier`}},transition:{fast:{$value:`120ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},normal:{$value:`250ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},slow:{$value:`800ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},colors:{$value:`color 250ms cubic-bezier(0.4, 0, 0.2, 1), background-color 250ms cubic-bezier(0.4, 0, 0.2, 1), border-color 250ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},opacity:{$value:`opacity 250ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},transform:{$value:`transform 250ms cubic-bezier(0.22, 1, 0.36, 1)`,$type:`transition`}},keyframes:{"neon-flicker":{$value:`0%{opacity:1}4%{opacity:0.7}8%{opacity:1}12%{opacity:0.85}16%{opacity:1}100%{opacity:1}`,$type:`keyframes`},"glow-pulse":{$value:`0%{box-shadow:0 0 8px rgba(236,72,153,0.4)}50%{box-shadow:0 0 24px rgba(236,72,153,0.8)}100%{box-shadow:0 0 8px rgba(236,72,153,0.4)}`,$type:`keyframes`},"electric-arc":{$value:`0%{clip-path:inset(0 100% 0 0)}50%{clip-path:inset(0 0 0 0)}100%{clip-path:inset(0 0 0 100%)}`,$type:`keyframes`}}}},Xv={light:{$name:`Neon Noir`,$description:`Hot pink neon on dark — electric glow effects, neon flicker, and flowing magenta particles.`,$metadata:{font:`Outfit`,fontUrl:`https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&display=swap`,philosophy:`Midnight electricity. The city never sleeps.`},color:{primary:{50:{$value:`#fdf2f8`,$type:`color`},100:{$value:`#fce7f3`,$type:`color`},200:{$value:`#fbcfe8`,$type:`color`},300:{$value:`#f9a8d4`,$type:`color`},400:{$value:`#f472b6`,$type:`color`},500:{$value:`#ec4899`,$type:`color`},600:{$value:`#db2777`,$type:`color`},700:{$value:`#e42574`,$type:`color`},800:{$value:`#9d174d`,$type:`color`},900:{$value:`#831843`,$type:`color`}},neutral:{50:{$value:`#09090b`,$type:`color`},100:{$value:`#111114`,$type:`color`},200:{$value:`#19191e`,$type:`color`},300:{$value:`#232329`,$type:`color`},400:{$value:`#3b3b44`,$type:`color`},500:{$value:`#5e5e6c`,$type:`color`},600:{$value:`#8a8a9a`,$type:`color`},700:{$value:`#b0b0be`,$type:`color`},800:{$value:`#d4d4de`,$type:`color`},900:{$value:`#ececf0`,$type:`color`}},success:{...zv.dark.success,500:{$value:`#34d399`,$type:`color`}},warning:{...zv.dark.warning,500:{$value:`#fbbf24`,$type:`color`}},error:{...zv.dark.error,500:{$value:`#f87171`,$type:`color`}},info:{...zv.dark.info,500:{$value:`#38bdf8`,$type:`color`}},surface:{$value:`#09090b`,$type:`color`},onSurface:{$value:`#ececf0`,$type:`color`},surfaceVariant:{$value:`#111114`,$type:`color`},onSurfaceVariant:{$value:`#8a8a9a`,$type:`color`},container:{$value:`#9d174d`,$type:`color`},onContainer:{$value:`#fce7f3`,$type:`color`},outline:{$value:`#3b3b44`,$type:`color`},outlineVariant:{$value:`#232329`,$type:`color`},onPrimary:{$value:`#ffffff`,$type:`color`},primaryContainer:{$value:`#9d174d`,$type:`color`},onPrimaryContainer:{$value:`#fce7f3`,$type:`color`},onError:{$value:`#09090b`,$type:`color`},errorContainer:{$value:`#7f1d1d`,$type:`color`},onErrorContainer:{$value:`#fecaca`,$type:`color`},tertiary:{$value:`#a855f7`,$type:`color`},onTertiary:{$value:`#09090b`,$type:`color`},tertiaryContainer:{$value:`#6b21a8`,$type:`color`},onTertiaryContainer:{$value:`#f3e8ff`,$type:`color`}},font:Yv.font,spacing:Yv.spacing,shape:Yv.shape,motion:Yv.motion,accessibility:{...Bv.dark,focusRing:{...Bv.dark.focusRing,color:{$value:`#ec4899`,$type:`color`}}},zIndex:Vv},dark:{$name:`Neon Noir`,$description:`Hot pink neon on pure black (dark) — sharper noir contrast, brighter electric glow, deeper magenta containers.`,$metadata:{font:`Outfit`,fontUrl:`https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&display=swap`,philosophy:`Midnight electricity. The city never sleeps.`},color:{primary:{50:{$value:`#831843`,$type:`color`},100:{$value:`#9d174d`,$type:`color`},200:{$value:`#be185d`,$type:`color`},300:{$value:`#db2777`,$type:`color`},400:{$value:`#ec4899`,$type:`color`},500:{$value:`#f472b6`,$type:`color`},600:{$value:`#f9a8d4`,$type:`color`},700:{$value:`#fbcfe8`,$type:`color`},800:{$value:`#fce7f3`,$type:`color`},900:{$value:`#fdf2f8`,$type:`color`}},neutral:{50:{$value:`#000000`,$type:`color`},100:{$value:`#09090b`,$type:`color`},200:{$value:`#111114`,$type:`color`},300:{$value:`#19191e`,$type:`color`},400:{$value:`#3b3b44`,$type:`color`},500:{$value:`#5a5a68`,$type:`color`},600:{$value:`#8a8a9a`,$type:`color`},700:{$value:`#b0b0be`,$type:`color`},800:{$value:`#d4d4de`,$type:`color`},900:{$value:`#ececf0`,$type:`color`}},success:{...zv.dark.success,500:{$value:`#5ee0ad`,$type:`color`}},warning:{...zv.dark.warning,500:{$value:`#ffd24a`,$type:`color`}},error:{...zv.dark.error,500:{$value:`#ff8a8a`,$type:`color`}},info:{...zv.dark.info,500:{$value:`#5acdff`,$type:`color`}},surface:{$value:`#000000`,$type:`color`},onSurface:{$value:`#ececf0`,$type:`color`},surfaceVariant:{$value:`#09090b`,$type:`color`},onSurfaceVariant:{$value:`#b0b0be`,$type:`color`},container:{$value:`#be185d`,$type:`color`},onContainer:{$value:`#fce7f3`,$type:`color`},outline:{$value:`#19191e`,$type:`color`},outlineVariant:{$value:`#111114`,$type:`color`},onPrimary:{$value:`#000000`,$type:`color`},primaryContainer:{$value:`#be185d`,$type:`color`},onPrimaryContainer:{$value:`#fce7f3`,$type:`color`},onError:{$value:`#000000`,$type:`color`},errorContainer:{$value:`#7f1d1d`,$type:`color`},onErrorContainer:{$value:`#fecdd3`,$type:`color`},tertiary:{$value:`#c084fc`,$type:`color`},onTertiary:{$value:`#000000`,$type:`color`},tertiaryContainer:{$value:`#581c87`,$type:`color`},onTertiaryContainer:{$value:`#f3e8ff`,$type:`color`}},font:Yv.font,spacing:Yv.spacing,shape:Yv.shape,motion:Yv.motion,accessibility:{...Bv.dark,focusRing:{...Bv.dark.focusRing,color:{$value:`#f472b6`,$type:`color`}}},zIndex:Vv}},Zv={font:{family:{sans:{$value:`"Lora", "Georgia", serif`,$type:`fontFamily`},mono:{$value:`"IBM Plex Mono", "Courier New", monospace`,$type:`fontFamily`}},size:{sm:{$value:`0.875rem`,$type:`dimension`},base:{$value:`1rem`,$type:`dimension`},lg:{$value:`1.15rem`,$type:`dimension`},xl:{$value:`1.3rem`,$type:`dimension`},"2xl":{$value:`1.625rem`,$type:`dimension`}},weight:{normal:{$value:`400`,$type:`fontWeight`},medium:{$value:`500`,$type:`fontWeight`},semibold:{$value:`600`,$type:`fontWeight`},bold:{$value:`700`,$type:`fontWeight`}},lineHeight:{tight:{$value:`1.3`,$type:`number`},normal:{$value:`1.6`,$type:`number`},relaxed:{$value:`1.85`,$type:`number`}}},spacing:{1:{$value:`0.25rem`,$type:`dimension`},2:{$value:`0.5rem`,$type:`dimension`},3:{$value:`0.75rem`,$type:`dimension`},4:{$value:`1rem`,$type:`dimension`},5:{$value:`1.25rem`,$type:`dimension`},6:{$value:`1.5rem`,$type:`dimension`},8:{$value:`2rem`,$type:`dimension`},10:{$value:`2.5rem`,$type:`dimension`},12:{$value:`3rem`,$type:`dimension`}},shape:{radius:{sm:{$value:`0.375rem`,$type:`dimension`},md:{$value:`0.625rem`,$type:`dimension`},lg:{$value:`1rem`,$type:`dimension`},xl:{$value:`1.5rem`,$type:`dimension`},full:{$value:`9999px`,$type:`dimension`}},shadow:{sm:{$value:`0 1px 3px rgba(53, 46, 32, 0.08)`,$type:`shadow`},md:{$value:`0 4px 8px rgba(53, 46, 32, 0.10)`,$type:`shadow`},lg:{$value:`0 8px 20px rgba(53, 46, 32, 0.12)`,$type:`shadow`},xl:{$value:`0 16px 40px rgba(53, 46, 32, 0.14)`,$type:`shadow`}}},motion:{duration:{fast:{$value:`200ms`,$type:`duration`},normal:{$value:`400ms`,$type:`duration`},slow:{$value:`1200ms`,$type:`duration`},ambient:{$value:`5000ms`,$type:`duration`}},easing:{default:{$value:`cubic-bezier(0.4, 0, 0.2, 1)`,$type:`cubicBezier`},bounce:{$value:`cubic-bezier(0.34, 1.3, 0.64, 1)`,$type:`cubicBezier`},spring:{$value:`cubic-bezier(0.22, 1, 0.36, 1)`,$type:`cubicBezier`}},keyframes:{"leaf-float":{$value:`0%{transform:translateY(0) rotate(0deg);opacity:0.7}25%{transform:translateY(-6px) rotate(3deg)}50%{transform:translateY(-2px) rotate(-2deg);opacity:1}75%{transform:translateY(-8px) rotate(2deg)}100%{transform:translateY(0) rotate(0deg);opacity:0.7}`,$type:`keyframes`},"vine-grow":{$value:`0%{transform:scaleY(0);transform-origin:bottom}100%{transform:scaleY(1);transform-origin:bottom}`,$type:`keyframes`},"gentle-sway":{$value:`0%{transform:rotate(-1deg)}50%{transform:rotate(1deg)}100%{transform:rotate(-1deg)}`,$type:`keyframes`}},transition:Hv}},Qv={light:{$name:`Botanical`,$description:`Organic greens on warm cream — leaf-float animations and vine-grow motion.`,$metadata:{font:`Lora`,fontUrl:`https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap`,philosophy:`Rooted in nature. Growing with intention.`},color:{primary:{50:{$value:`#f0fdf4`,$type:`color`},100:{$value:`#dcfce7`,$type:`color`},200:{$value:`#bbf7d0`,$type:`color`},300:{$value:`#86efac`,$type:`color`},400:{$value:`#4ade80`,$type:`color`},500:{$value:`#22c55e`,$type:`color`},600:{$value:`#16a34a`,$type:`color`},700:{$value:`#15803d`,$type:`color`},800:{$value:`#166534`,$type:`color`},900:{$value:`#14532d`,$type:`color`}},neutral:{50:{$value:`#fefcf8`,$type:`color`},100:{$value:`#fdf8ef`,$type:`color`},200:{$value:`#f8f0df`,$type:`color`},300:{$value:`#f0e4c9`,$type:`color`},400:{$value:`#dccba5`,$type:`color`},500:{$value:`#aa8e56`,$type:`color`},600:{$value:`#9a8660`,$type:`color`},700:{$value:`#746448`,$type:`color`},800:{$value:`#504530`,$type:`color`},900:{$value:`#352e20`,$type:`color`}},success:{...zv.light.success,500:{$type:`color`,$value:`#17843f`}},warning:{...zv.light.warning,500:{$type:`color`,$value:`#a06707`}},error:{...zv.light.error,500:{$type:`color`,$value:`#e51414`}},info:zv.light.info,surface:{$value:`#fefcf8`,$type:`color`},onSurface:{$value:`#352e20`,$type:`color`},surfaceVariant:{$value:`#fdf8ef`,$type:`color`},onSurfaceVariant:{$value:`#746448`,$type:`color`},container:{$value:`#dcfce7`,$type:`color`},onContainer:{$value:`#14532d`,$type:`color`},outline:{$value:`#f0e4c9`,$type:`color`},outlineVariant:{$value:`#f8f0df`,$type:`color`},onPrimary:{$value:`#332407`,$type:`color`},primaryContainer:{$value:`#dcfce7`,$type:`color`},onPrimaryContainer:{$value:`#14532d`,$type:`color`},onError:{$value:`#fefcf8`,$type:`color`},errorContainer:{$value:`#fee2e2`,$type:`color`},onErrorContainer:{$value:`#7f1d1d`,$type:`color`},tertiary:{$value:`#b45309`,$type:`color`},onTertiary:{$value:`#fefcf8`,$type:`color`},tertiaryContainer:{$value:`#fef3c7`,$type:`color`},onTertiaryContainer:{$value:`#451a03`,$type:`color`}},font:Zv.font,spacing:Zv.spacing,shape:Zv.shape,motion:Zv.motion,accessibility:{...Bv.light,focusRing:{...Bv.light.focusRing,color:{$type:`color`,$value:`#16a34a`}}},zIndex:Vv},dark:{$name:`Botanical`,$description:`Forest at night (dark) — deep soil surfaces with lifted leaf-green accents and gentle organic motion.`,$metadata:{font:`Lora`,fontUrl:`https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap`,philosophy:`Rooted in nature. Growing with intention.`},color:{primary:{50:{$value:`#14532d`,$type:`color`},100:{$value:`#166534`,$type:`color`},200:{$value:`#15803d`,$type:`color`},300:{$value:`#16a34a`,$type:`color`},400:{$value:`#22c55e`,$type:`color`},500:{$value:`#4ade80`,$type:`color`},600:{$value:`#86efac`,$type:`color`},700:{$value:`#bbf7d0`,$type:`color`},800:{$value:`#dcfce7`,$type:`color`},900:{$value:`#f0fdf4`,$type:`color`}},neutral:{50:{$value:`#141210`,$type:`color`},100:{$value:`#1f1c18`,$type:`color`},200:{$value:`#352e20`,$type:`color`},300:{$value:`#504530`,$type:`color`},400:{$value:`#746448`,$type:`color`},500:{$value:`#9a8660`,$type:`color`},600:{$value:`#bfaa80`,$type:`color`},700:{$value:`#dccba5`,$type:`color`},800:{$value:`#f0e4c9`,$type:`color`},900:{$value:`#fefcf8`,$type:`color`}},success:zv.dark.success,warning:zv.dark.warning,error:zv.dark.error,info:zv.dark.info,surface:{$value:`#1f1c18`,$type:`color`},onSurface:{$value:`#fefcf8`,$type:`color`},surfaceVariant:{$value:`#352e20`,$type:`color`},onSurfaceVariant:{$value:`#dccba5`,$type:`color`},container:{$value:`#166534`,$type:`color`},onContainer:{$value:`#dcfce7`,$type:`color`},outline:{$value:`#504530`,$type:`color`},outlineVariant:{$value:`#352e20`,$type:`color`},onPrimary:{$value:`#141210`,$type:`color`},primaryContainer:{$value:`#166534`,$type:`color`},onPrimaryContainer:{$value:`#dcfce7`,$type:`color`},onError:{$value:`#450a0a`,$type:`color`},errorContainer:{$value:`#7f1d1d`,$type:`color`},onErrorContainer:{$value:`#fecaca`,$type:`color`},tertiary:{$value:`#fbbf24`,$type:`color`},onTertiary:{$value:`#451a03`,$type:`color`},tertiaryContainer:{$value:`#78350f`,$type:`color`},onTertiaryContainer:{$value:`#fef3c7`,$type:`color`}},font:Zv.font,spacing:Zv.spacing,shape:Zv.shape,motion:Zv.motion,accessibility:{...Bv.dark,focusRing:{...Bv.dark.focusRing,color:{$type:`color`,$value:`#4ade80`}}},zIndex:Vv}},$v={font:{family:{sans:{$value:`-apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif`,$type:`fontFamily`},mono:{$value:`ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace`,$type:`fontFamily`}},size:{sm:{$value:`0.875rem`,$type:`dimension`},base:{$value:`1rem`,$type:`dimension`},lg:{$value:`1.125rem`,$type:`dimension`},xl:{$value:`1.25rem`,$type:`dimension`},"2xl":{$value:`1.5rem`,$type:`dimension`}},weight:{normal:{$value:`400`,$type:`fontWeight`},medium:{$value:`500`,$type:`fontWeight`},semibold:{$value:`600`,$type:`fontWeight`},bold:{$value:`700`,$type:`fontWeight`}},lineHeight:{tight:{$value:`1.25`,$type:`number`},normal:{$value:`1.55`,$type:`number`},relaxed:{$value:`1.75`,$type:`number`}}},spacing:{1:{$value:`0.25rem`,$type:`dimension`},2:{$value:`0.5rem`,$type:`dimension`},3:{$value:`0.75rem`,$type:`dimension`},4:{$value:`1rem`,$type:`dimension`},5:{$value:`1.25rem`,$type:`dimension`},6:{$value:`1.5rem`,$type:`dimension`},8:{$value:`2rem`,$type:`dimension`},10:{$value:`2.5rem`,$type:`dimension`},12:{$value:`3rem`,$type:`dimension`},xs:{$value:`0.25rem`,$type:`dimension`},sm:{$value:`0.5rem`,$type:`dimension`},md:{$value:`1rem`,$type:`dimension`},lg:{$value:`1.5rem`,$type:`dimension`},xl:{$value:`2rem`,$type:`dimension`},"2xl":{$value:`3rem`,$type:`dimension`}},shape:{radius:{sm:{$value:`0.5rem`,$type:`dimension`},md:{$value:`0.75rem`,$type:`dimension`},lg:{$value:`1rem`,$type:`dimension`},xl:{$value:`1.5rem`,$type:`dimension`},full:{$value:`9999px`,$type:`dimension`}},shadow:{sm:{$value:`0 1px 3px color-mix(in srgb, var(--ggui-color-primary-500) 8%, transparent)`,$type:`shadow`},md:{$value:`0 1px 2px rgba(20, 20, 19, 0.04), 0 8px 16px -4px color-mix(in srgb, var(--ggui-color-primary-500) 14%, transparent)`,$type:`shadow`},lg:{$value:`0 2px 4px rgba(20, 20, 19, 0.04), 0 16px 32px -8px color-mix(in srgb, var(--ggui-color-primary-500) 20%, transparent)`,$type:`shadow`},xl:{$value:`0 4px 8px rgba(20, 20, 19, 0.04), 0 24px 48px -12px color-mix(in srgb, var(--ggui-color-primary-500) 26%, transparent)`,$type:`shadow`}}},motion:{duration:{fast:{$value:`120ms`,$type:`duration`},normal:{$value:`240ms`,$type:`duration`},slow:{$value:`480ms`,$type:`duration`}},easing:{default:{$value:`cubic-bezier(0.4, 0, 0.2, 1)`,$type:`cubicBezier`},spring:{$value:`cubic-bezier(0.22, 1, 0.36, 1)`,$type:`cubicBezier`}},keyframes:{entrance:{$value:`0%{opacity:0;transform:translateY(4px)}100%{opacity:1;transform:none}`,$type:`keyframes`}},transition:{...Hv,fast:{$type:`transition`,$value:`120ms cubic-bezier(0.4, 0, 0.2, 1)`},normal:{$type:`transition`,$value:`240ms cubic-bezier(0.4, 0, 0.2, 1)`},slow:{$type:`transition`,$value:`480ms cubic-bezier(0.4, 0, 0.2, 1)`}}}},ey={light:{$name:`Claudic`,$description:`Fits inside claude.ai — warm ivory surfaces, terracotta accent, calm by design.`,$metadata:{font:`system`,philosophy:`Quiet, papery, conversational. Built to feel native when rendered inside claude.ai.`},color:{primary:{50:{$value:`#fbf2ee`,$type:`color`},100:{$value:`#f5dfd4`,$type:`color`},200:{$value:`#ecbfa9`,$type:`color`},300:{$value:`#df9d80`,$type:`color`},400:{$value:`#d6896c`,$type:`color`},500:{$value:`#cc785c`,$type:`color`},600:{$value:`#b8694f`,$type:`color`},700:{$value:`#965240`,$type:`color`},800:{$value:`#723e30`,$type:`color`},900:{$value:`#4d2920`,$type:`color`}},neutral:{50:{$value:`#faf9f5`,$type:`color`},100:{$value:`#f5f4ee`,$type:`color`},200:{$value:`#ebe9df`,$type:`color`},300:{$value:`#dad8cc`,$type:`color`},400:{$value:`#a8a59f`,$type:`color`},500:{$value:`#7c7a76`,$type:`color`},600:{$value:`#56544f`,$type:`color`},700:{$value:`#3d3b39`,$type:`color`},800:{$value:`#262624`,$type:`color`},900:{$value:`#141413`,$type:`color`}},success:{50:{$value:`#f4f7ec`,$type:`color`},100:{$value:`#e3ecd0`,$type:`color`},200:{$value:`#c8d8a5`,$type:`color`},500:{$value:`#5c7a35`,$type:`color`},600:{$value:`#587634`,$type:`color`},700:{$value:`#465c29`,$type:`color`},800:{$value:`#33431e`,$type:`color`}},warning:{50:{$value:`#fbf3e3`,$type:`color`},100:{$value:`#f6e2bb`,$type:`color`},200:{$value:`#eac786`,$type:`color`},500:{$value:`#956922`,$type:`color`},600:{$value:`#a87725`,$type:`color`},700:{$value:`#825c1d`,$type:`color`},800:{$value:`#5d4214`,$type:`color`}},error:{50:{$value:`#f9ebe7`,$type:`color`},100:{$value:`#f1cec5`,$type:`color`},200:{$value:`#e3a294`,$type:`color`},500:{$value:`#bc4a3a`,$type:`color`},600:{$value:`#9d3d30`,$type:`color`},700:{$value:`#7a2f25`,$type:`color`},800:{$value:`#57211a`,$type:`color`}},info:{50:{$value:`#f1f0ee`,$type:`color`},100:{$value:`#dedcd8`,$type:`color`},200:{$value:`#bdbab4`,$type:`color`},500:{$value:`#7c7a76`,$type:`color`},600:{$value:`#65635f`,$type:`color`},700:{$value:`#4d4b48`,$type:`color`},800:{$value:`#363432`,$type:`color`}},surface:{$value:`#faf9f5`,$type:`color`},onSurface:{$value:`#141413`,$type:`color`},surfaceVariant:{$value:`#f5f4ee`,$type:`color`},onSurfaceVariant:{$value:`#56544f`,$type:`color`},container:{$value:`#fbf2ee`,$type:`color`},onContainer:{$value:`#4d2920`,$type:`color`},outline:{$value:`#dad8cc`,$type:`color`},outlineVariant:{$value:`#ebe9df`,$type:`color`},onPrimary:{$value:`#15130a`,$type:`color`},primaryContainer:{$value:`#fbf2ee`,$type:`color`},onPrimaryContainer:{$value:`#4d2920`,$type:`color`},onError:{$value:`#faf9f5`,$type:`color`},errorContainer:{$value:`#f9ebe7`,$type:`color`},onErrorContainer:{$value:`#57211a`,$type:`color`},tertiary:{$value:`#6b8e3d`,$type:`color`},onTertiary:{$value:`#faf9f5`,$type:`color`},tertiaryContainer:{$value:`#f4f7ec`,$type:`color`},onTertiaryContainer:{$value:`#33431e`,$type:`color`}},font:$v.font,spacing:$v.spacing,shape:$v.shape,motion:$v.motion,accessibility:{...Bv.light,focusRing:{...Bv.light.focusRing,color:{$type:`color`,$value:`#cc785c`}}},zIndex:Vv},dark:{$name:`Claudic`,$description:`Fits inside claude.ai (dark) — warm charcoal surfaces, terracotta accent, calm by design.`,$metadata:{font:`system`,philosophy:`Quiet, papery, conversational. Built to feel native when rendered inside claude.ai.`},color:{primary:{50:{$value:`#4d2920`,$type:`color`},100:{$value:`#723e30`,$type:`color`},200:{$value:`#965240`,$type:`color`},300:{$value:`#b8694f`,$type:`color`},400:{$value:`#cc785c`,$type:`color`},500:{$value:`#d6896c`,$type:`color`},600:{$value:`#df9d80`,$type:`color`},700:{$value:`#ecbfa9`,$type:`color`},800:{$value:`#f5dfd4`,$type:`color`},900:{$value:`#fbf2ee`,$type:`color`}},neutral:{50:{$value:`#1a1917`,$type:`color`},100:{$value:`#262624`,$type:`color`},200:{$value:`#2d2c2a`,$type:`color`},300:{$value:`#3d3b39`,$type:`color`},400:{$value:`#56544f`,$type:`color`},500:{$value:`#7c7a76`,$type:`color`},600:{$value:`#a8a59f`,$type:`color`},700:{$value:`#dad8cc`,$type:`color`},800:{$value:`#ebe9df`,$type:`color`},900:{$value:`#faf9f5`,$type:`color`}},success:{50:{$value:`#1c2412`,$type:`color`},100:{$value:`#34461e`,$type:`color`},200:{$value:`#4a6029`,$type:`color`},500:{$value:`#9bb56b`,$type:`color`},600:{$value:`#b1c688`,$type:`color`},700:{$value:`#c8d8a5`,$type:`color`},800:{$value:`#e3ecd0`,$type:`color`}},warning:{50:{$value:`#2a1e0c`,$type:`color`},100:{$value:`#523915`,$type:`color`},200:{$value:`#7a541f`,$type:`color`},500:{$value:`#dba14a`,$type:`color`},600:{$value:`#e4b46e`,$type:`color`},700:{$value:`#eac786`,$type:`color`},800:{$value:`#f6e2bb`,$type:`color`}},error:{50:{$value:`#2a1410`,$type:`color`},100:{$value:`#52271f`,$type:`color`},200:{$value:`#7a3a2e`,$type:`color`},500:{$value:`#d7705f`,$type:`color`},600:{$value:`#df8576`,$type:`color`},700:{$value:`#e3a294`,$type:`color`},800:{$value:`#f1cec5`,$type:`color`}},info:{50:{$value:`#222220`,$type:`color`},100:{$value:`#3a3936`,$type:`color`},200:{$value:`#56544f`,$type:`color`},500:{$value:`#a8a59f`,$type:`color`},600:{$value:`#bcbab5`,$type:`color`},700:{$value:`#d1cfca`,$type:`color`},800:{$value:`#e6e4e0`,$type:`color`}},surface:{$value:`#262624`,$type:`color`},onSurface:{$value:`#faf9f5`,$type:`color`},surfaceVariant:{$value:`#2d2c2a`,$type:`color`},onSurfaceVariant:{$value:`#a8a59f`,$type:`color`},container:{$value:`#3d3b39`,$type:`color`},onContainer:{$value:`#fbf2ee`,$type:`color`},outline:{$value:`#3d3b39`,$type:`color`},outlineVariant:{$value:`#2d2c2a`,$type:`color`},onPrimary:{$value:`#262624`,$type:`color`},primaryContainer:{$value:`#723e30`,$type:`color`},onPrimaryContainer:{$value:`#f5dfd4`,$type:`color`},onError:{$value:`#2a1410`,$type:`color`},errorContainer:{$value:`#52271f`,$type:`color`},onErrorContainer:{$value:`#f1cec5`,$type:`color`},tertiary:{$value:`#9bb56b`,$type:`color`},onTertiary:{$value:`#1c2412`,$type:`color`},tertiaryContainer:{$value:`#34461e`,$type:`color`},onTertiaryContainer:{$value:`#e3ecd0`,$type:`color`}},font:$v.font,spacing:$v.spacing,shape:$v.shape,motion:$v.motion,accessibility:{...Bv.dark,focusRing:{...Bv.dark.focusRing,color:{$type:`color`,$value:`#d6896c`}}},zIndex:Vv}},ty={font:{family:{sans:{$value:`"Inter Variable", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif`,$type:`fontFamily`},mono:{$value:`"JetBrains Mono", "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace`,$type:`fontFamily`}},size:{sm:{$value:`0.8125rem`,$type:`dimension`},base:{$value:`0.9375rem`,$type:`dimension`},lg:{$value:`1.0625rem`,$type:`dimension`},xl:{$value:`1.3125rem`,$type:`dimension`},"2xl":{$value:`1.75rem`,$type:`dimension`}},weight:{normal:{$value:`400`,$type:`fontWeight`},medium:{$value:`500`,$type:`fontWeight`},semibold:{$value:`600`,$type:`fontWeight`},bold:{$value:`680`,$type:`fontWeight`}},lineHeight:{tight:{$value:`1.1`,$type:`number`},normal:{$value:`1.55`,$type:`number`},relaxed:{$value:`1.7`,$type:`number`}}},spacing:{1:{$value:`0.25rem`,$type:`dimension`},2:{$value:`0.5rem`,$type:`dimension`},3:{$value:`0.75rem`,$type:`dimension`},4:{$value:`1rem`,$type:`dimension`},5:{$value:`1.25rem`,$type:`dimension`},6:{$value:`1.5rem`,$type:`dimension`},8:{$value:`2rem`,$type:`dimension`},10:{$value:`2.5rem`,$type:`dimension`},12:{$value:`3rem`,$type:`dimension`},xs:{$value:`0.25rem`,$type:`dimension`},sm:{$value:`0.5rem`,$type:`dimension`},md:{$value:`1rem`,$type:`dimension`},lg:{$value:`1.5rem`,$type:`dimension`},xl:{$value:`2rem`,$type:`dimension`},"2xl":{$value:`3rem`,$type:`dimension`}},shape:{radius:{sm:{$value:`0.5rem`,$type:`dimension`},md:{$value:`0.875rem`,$type:`dimension`},lg:{$value:`1.125rem`,$type:`dimension`},xl:{$value:`1.5rem`,$type:`dimension`},full:{$value:`9999px`,$type:`dimension`}},shadow:{sm:{$value:`0 1px 2px color-mix(in srgb, var(--ggui-color-primary-500) 6%, transparent)`,$type:`shadow`},md:{$value:`0 1px 3px rgba(21, 19, 31, 0.06), 0 8px 24px -6px color-mix(in srgb, var(--ggui-color-primary-500) 16%, transparent)`,$type:`shadow`},lg:{$value:`0 2px 6px rgba(21, 19, 31, 0.05), 0 20px 40px -10px color-mix(in srgb, var(--ggui-color-primary-500) 22%, transparent)`,$type:`shadow`},xl:{$value:`0 4px 10px rgba(21, 19, 31, 0.04), 0 32px 64px -16px color-mix(in srgb, var(--ggui-color-primary-500) 28%, transparent)`,$type:`shadow`}}},motion:{duration:{fast:{$value:`150ms`,$type:`duration`},normal:{$value:`250ms`,$type:`duration`},slow:{$value:`420ms`,$type:`duration`},ambient:{$value:`8000ms`,$type:`duration`}},easing:{default:{$value:`cubic-bezier(0.32, 0.72, 0, 1)`,$type:`cubicBezier`},spring:{$value:`cubic-bezier(0.16, 1, 0.3, 1)`,$type:`cubicBezier`}},keyframes:{entrance:{$value:`0%{opacity:0;transform:translateY(6px)}100%{opacity:1;transform:none}`,$type:`keyframes`}},transition:Hv}},ny={light:{$name:`Indigo`,$description:`Flagship ggui preset — refined electric indigo on a quiet paper surface. Premium, restrained, distinctive.`,$metadata:{font:`inter`,philosophy:`Looks like a deliberate aesthetic choice. Linear/Arc/Vercel-grade restraint with one confident accent.`},color:{primary:{50:{$value:`#eef2ff`,$type:`color`},100:{$value:`#e0e7ff`,$type:`color`},200:{$value:`#c7d2fe`,$type:`color`},300:{$value:`#a5b4fc`,$type:`color`},400:{$value:`#818cf8`,$type:`color`},500:{$value:`#4f46e5`,$type:`color`},600:{$value:`#4338ca`,$type:`color`},700:{$value:`#3730a3`,$type:`color`},800:{$value:`#312e81`,$type:`color`},900:{$value:`#1e1b4b`,$type:`color`}},neutral:{50:{$value:`#fafaf7`,$type:`color`},100:{$value:`#f4f4f0`,$type:`color`},200:{$value:`#e8e7e3`,$type:`color`},300:{$value:`#d4d3cf`,$type:`color`},400:{$value:`#9c9ba0`,$type:`color`},500:{$value:`#6e6d74`,$type:`color`},600:{$value:`#4a4954`,$type:`color`},700:{$value:`#322f3e`,$type:`color`},800:{$value:`#211f2c`,$type:`color`},900:{$value:`#15131f`,$type:`color`}},success:{50:{$value:`#ecfdf5`,$type:`color`},100:{$value:`#d1fae5`,$type:`color`},200:{$value:`#a7f3d0`,$type:`color`},500:{$value:`#0b815a`,$type:`color`},600:{$value:`#0b8259`,$type:`color`},700:{$value:`#086847`,$type:`color`},800:{$value:`#064e36`,$type:`color`}},warning:{50:{$value:`#fff8eb`,$type:`color`},100:{$value:`#fdecc8`,$type:`color`},200:{$value:`#fbd897`,$type:`color`},500:{$value:`#a66210`,$type:`color`},600:{$value:`#b86b0e`,$type:`color`},700:{$value:`#90530a`,$type:`color`},800:{$value:`#6b3d07`,$type:`color`}},error:{50:{$value:`#fef2f4`,$type:`color`},100:{$value:`#fde2e7`,$type:`color`},200:{$value:`#fbc5cf`,$type:`color`},500:{$value:`#dc2845`,$type:`color`},600:{$value:`#b81f38`,$type:`color`},700:{$value:`#94182d`,$type:`color`},800:{$value:`#701222`,$type:`color`}},info:{50:{$value:`#ecfeff`,$type:`color`},100:{$value:`#cffafe`,$type:`color`},200:{$value:`#a5f3fc`,$type:`color`},500:{$value:`#0891b2`,$type:`color`},600:{$value:`#0e7490`,$type:`color`},700:{$value:`#155e75`,$type:`color`},800:{$value:`#164e63`,$type:`color`}},surface:{$value:`#fafaf7`,$type:`color`},onSurface:{$value:`#15131f`,$type:`color`},surfaceVariant:{$value:`#f4f4f0`,$type:`color`},onSurfaceVariant:{$value:`#4a4954`,$type:`color`},container:{$value:`#eef2ff`,$type:`color`},onContainer:{$value:`#1e1b4b`,$type:`color`},outline:{$value:`#d4d3cf`,$type:`color`},outlineVariant:{$value:`#e8e7e3`,$type:`color`},onPrimary:{$value:`#fafaf7`,$type:`color`},primaryContainer:{$value:`#eef2ff`,$type:`color`},onPrimaryContainer:{$value:`#1e1b4b`,$type:`color`},onError:{$value:`#fafaf7`,$type:`color`},errorContainer:{$value:`#fde2e7`,$type:`color`},onErrorContainer:{$value:`#701222`,$type:`color`},tertiary:{$value:`#7c3aed`,$type:`color`},onTertiary:{$value:`#fafaf7`,$type:`color`},tertiaryContainer:{$value:`#ede9fe`,$type:`color`},onTertiaryContainer:{$value:`#4c1d95`,$type:`color`}},font:ty.font,spacing:ty.spacing,shape:ty.shape,motion:ty.motion,accessibility:{...Bv.light,focusRing:{...Bv.light.focusRing,color:{$type:`color`,$value:`#4f46e5`}}},zIndex:Vv},dark:{$name:`Indigo`,$description:`Flagship ggui preset (dark) — refined electric indigo on rich midnight. Premium, restrained, distinctive.`,$metadata:{font:`inter`,philosophy:`Looks like a deliberate aesthetic choice. Linear/Arc/Vercel-grade restraint with one confident accent.`},color:{primary:{50:{$value:`#1e1b4b`,$type:`color`},100:{$value:`#312e81`,$type:`color`},200:{$value:`#3730a3`,$type:`color`},300:{$value:`#4338ca`,$type:`color`},400:{$value:`#4f46e5`,$type:`color`},500:{$value:`#818cf8`,$type:`color`},600:{$value:`#a5b4fc`,$type:`color`},700:{$value:`#c7d2fe`,$type:`color`},800:{$value:`#e0e7ff`,$type:`color`},900:{$value:`#eef2ff`,$type:`color`}},neutral:{50:{$value:`#0c0b14`,$type:`color`},100:{$value:`#15131f`,$type:`color`},200:{$value:`#1d1b29`,$type:`color`},300:{$value:`#2a2839`,$type:`color`},400:{$value:`#3e3c50`,$type:`color`},500:{$value:`#636176`,$type:`color`},600:{$value:`#8b8898`,$type:`color`},700:{$value:`#b8b6c2`,$type:`color`},800:{$value:`#dcdbe2`,$type:`color`},900:{$value:`#f5f4f9`,$type:`color`}},success:{50:{$value:`#022c1d`,$type:`color`},100:{$value:`#064e36`,$type:`color`},200:{$value:`#086847`,$type:`color`},500:{$value:`#34d399`,$type:`color`},600:{$value:`#6ee7b7`,$type:`color`},700:{$value:`#a7f3d0`,$type:`color`},800:{$value:`#d1fae5`,$type:`color`}},warning:{50:{$value:`#3a2104`,$type:`color`},100:{$value:`#6b3d07`,$type:`color`},200:{$value:`#90530a`,$type:`color`},500:{$value:`#f59e0b`,$type:`color`},600:{$value:`#fbbf24`,$type:`color`},700:{$value:`#fcd34d`,$type:`color`},800:{$value:`#fde68a`,$type:`color`}},error:{50:{$value:`#3b0a14`,$type:`color`},100:{$value:`#701222`,$type:`color`},200:{$value:`#94182d`,$type:`color`},500:{$value:`#fb7185`,$type:`color`},600:{$value:`#fda4af`,$type:`color`},700:{$value:`#fecdd3`,$type:`color`},800:{$value:`#ffe4e6`,$type:`color`}},info:{50:{$value:`#083344`,$type:`color`},100:{$value:`#164e63`,$type:`color`},200:{$value:`#155e75`,$type:`color`},500:{$value:`#22d3ee`,$type:`color`},600:{$value:`#67e8f9`,$type:`color`},700:{$value:`#a5f3fc`,$type:`color`},800:{$value:`#cffafe`,$type:`color`}},surface:{$value:`#15131f`,$type:`color`},onSurface:{$value:`#f5f4f9`,$type:`color`},surfaceVariant:{$value:`#221e35`,$type:`color`},onSurfaceVariant:{$value:`#c8c6d2`,$type:`color`},container:{$value:`#312e81`,$type:`color`},onContainer:{$value:`#eef2ff`,$type:`color`},outline:{$value:`#3e3c50`,$type:`color`},outlineVariant:{$value:`#2a2839`,$type:`color`},onPrimary:{$value:`#0c0b14`,$type:`color`},primaryContainer:{$value:`#312e81`,$type:`color`},onPrimaryContainer:{$value:`#e0e7ff`,$type:`color`},onError:{$value:`#3b0a14`,$type:`color`},errorContainer:{$value:`#701222`,$type:`color`},onErrorContainer:{$value:`#fecdd3`,$type:`color`},tertiary:{$value:`#a78bfa`,$type:`color`},onTertiary:{$value:`#2e1065`,$type:`color`},tertiaryContainer:{$value:`#4c1d95`,$type:`color`},onTertiaryContainer:{$value:`#ede9fe`,$type:`color`}},font:ty.font,spacing:ty.spacing,shape:ty.shape,motion:ty.motion,accessibility:{...Bv.dark,focusRing:{...Bv.dark.focusRing,color:{$type:`color`,$value:`#818cf8`}}},zIndex:Vv}},ry={font:{family:{sans:{$value:`"DM Sans", system-ui, -apple-system, sans-serif`,$type:`fontFamily`},mono:{$value:`"JetBrains Mono", ui-monospace, monospace`,$type:`fontFamily`}},size:{sm:{$value:`0.875rem`,$type:`dimension`},base:{$value:`1rem`,$type:`dimension`},lg:{$value:`1.125rem`,$type:`dimension`},xl:{$value:`1.25rem`,$type:`dimension`},"2xl":{$value:`1.5rem`,$type:`dimension`}},weight:{normal:{$value:`400`,$type:`fontWeight`},medium:{$value:`500`,$type:`fontWeight`},semibold:{$value:`600`,$type:`fontWeight`},bold:{$value:`700`,$type:`fontWeight`}},lineHeight:{tight:{$value:`1.25`,$type:`number`},normal:{$value:`1.5`,$type:`number`},relaxed:{$value:`1.75`,$type:`number`}}},spacing:{1:{$value:`0.25rem`,$type:`dimension`},2:{$value:`0.5rem`,$type:`dimension`},3:{$value:`0.75rem`,$type:`dimension`},4:{$value:`1rem`,$type:`dimension`},5:{$value:`1.25rem`,$type:`dimension`},6:{$value:`1.5rem`,$type:`dimension`},8:{$value:`2rem`,$type:`dimension`},10:{$value:`2.5rem`,$type:`dimension`},12:{$value:`3rem`,$type:`dimension`}},motion:{duration:{fast:{$value:`120ms`,$type:`duration`},normal:{$value:`200ms`,$type:`duration`},slow:{$value:`400ms`,$type:`duration`},ambient:{$value:`2000ms`,$type:`duration`}},easing:{default:{$value:`cubic-bezier(0.4, 0, 0.2, 1)`,$type:`cubicBezier`},bounce:{$value:`cubic-bezier(0.68, -0.55, 0.27, 1.55)`,$type:`cubicBezier`},spring:{$value:`cubic-bezier(0.22, 1, 0.36, 1)`,$type:`cubicBezier`}},transition:{fast:{$value:`120ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},normal:{$value:`200ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},slow:{$value:`400ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},colors:{$value:`color 200ms cubic-bezier(0.4, 0, 0.2, 1), background-color 200ms cubic-bezier(0.4, 0, 0.2, 1), border-color 200ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},opacity:{$value:`opacity 200ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},transform:{$value:`transform 200ms cubic-bezier(0.22, 1, 0.36, 1)`,$type:`transition`}},keyframes:{"fade-in":{$value:`0%{opacity:0}100%{opacity:1}`,$type:`keyframes`},"slide-up":{$value:`0%{opacity:0;transform:translateY(8px)}100%{opacity:1;transform:translateY(0)}`,$type:`keyframes`},"pulse-soft":{$value:`0%{opacity:1}50%{opacity:0.65}100%{opacity:1}`,$type:`keyframes`}}},accessibility:{focusRing:{color:{$value:`#B8FF3A`,$type:`color`},width:{$value:`2px`,$type:`dimension`},offset:{$value:`2px`,$type:`dimension`}},reducedMotion:{duration:{$value:`0ms`,$type:`duration`}},highContrast:{borderWidth:{$value:`2px`,$type:`dimension`},textColor:{$value:`#FFFFFF`,$type:`color`},backgroundColor:{$value:`#000000`,$type:`color`},linkColor:{$value:`#CCFF66`,$type:`color`}}},zIndex:Vv},iy={sm:{$value:`0.375rem`,$type:`dimension`},md:{$value:`0.5rem`,$type:`dimension`},lg:{$value:`0.75rem`,$type:`dimension`},xl:{$value:`1rem`,$type:`dimension`},full:{$value:`9999px`,$type:`dimension`}},ay={sm:{$value:`0 1px 2px rgba(0, 0, 0, 0.2)`,$type:`shadow`},md:{$value:`0 2px 8px rgba(0, 0, 0, 0.25)`,$type:`shadow`},lg:{$value:`0 6px 16px rgba(0, 0, 0, 0.28)`,$type:`shadow`},xl:{$value:`0 10px 24px rgba(0, 0, 0, 0.3)`,$type:`shadow`}},oy={sm:{$value:`0 1px 2px rgba(26, 29, 36, 0.06)`,$type:`shadow`},md:{$value:`0 2px 8px rgba(26, 29, 36, 0.08)`,$type:`shadow`},lg:{$value:`0 6px 16px rgba(26, 29, 36, 0.1)`,$type:`shadow`},xl:{$value:`0 12px 28px rgba(26, 29, 36, 0.12)`,$type:`shadow`}},sy={$name:`guuey-brand-v1`,$description:`The guuey product brand (dark) — slate-ink surfaces, slime #B8FF3A accent, DM Sans.`,$metadata:{font:`DM Sans`,fontUrl:`https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap`,philosophy:`Agent-native. Slime on slate.`,frameless:!0},color:{primary:{50:{$value:`#141D05`,$type:`color`},100:{$value:`#28390B`,$type:`color`},200:{$value:`#3F5A11`,$type:`color`},300:{$value:`#5F8719`,$type:`color`},400:{$value:`#8CC627`,$type:`color`},500:{$value:`#B8FF3A`,$type:`color`},600:{$value:`#CCFF66`,$type:`color`},700:{$value:`#DBFF8F`,$type:`color`},800:{$value:`#E9FFB8`,$type:`color`},900:{$value:`#F6FFE0`,$type:`color`}},neutral:{50:{$value:`#0E1014`,$type:`color`},100:{$value:`#1A1D24`,$type:`color`},200:{$value:`#232630`,$type:`color`},300:{$value:`#242938`,$type:`color`},400:{$value:`#3B4152`,$type:`color`},500:{$value:`#878C99`,$type:`color`},600:{$value:`#B7BAC4`,$type:`color`},700:{$value:`#D5D6DC`,$type:`color`},800:{$value:`#E8E7E2`,$type:`color`},900:{$value:`#F6F5EE`,$type:`color`}},success:{50:{$value:`#141D05`,$type:`color`},100:{$value:`#28390B`,$type:`color`},200:{$value:`#3F5A11`,$type:`color`},500:{$value:`#B8FF3A`,$type:`color`},600:{$value:`#CCFF66`,$type:`color`},700:{$value:`#DBFF8F`,$type:`color`},800:{$value:`#E9FFB8`,$type:`color`}},warning:{50:{$value:`#33240A`,$type:`color`},100:{$value:`#5C420F`,$type:`color`},200:{$value:`#8A6318`,$type:`color`},500:{$value:`#FFB020`,$type:`color`},600:{$value:`#FFC24D`,$type:`color`},700:{$value:`#FFD37D`,$type:`color`},800:{$value:`#FFE5AE`,$type:`color`}},error:{50:{$value:`#33110E`,$type:`color`},100:{$value:`#5E1F1B`,$type:`color`},200:{$value:`#8F2F2A`,$type:`color`},500:{$value:`#FF5B5B`,$type:`color`},600:{$value:`#FF7D7A`,$type:`color`},700:{$value:`#FF9F9C`,$type:`color`},800:{$value:`#FFC3C0`,$type:`color`}},info:{50:{$value:`#0A2733`,$type:`color`},100:{$value:`#12455C`,$type:`color`},200:{$value:`#1E6A8A`,$type:`color`},500:{$value:`#3AC8FF`,$type:`color`},600:{$value:`#66D4FF`,$type:`color`},700:{$value:`#92E0FF`,$type:`color`},800:{$value:`#BFECFF`,$type:`color`}},surface:{$value:`#1A1D24`,$type:`color`},onSurface:{$value:`#F6F5EE`,$type:`color`},surfaceVariant:{$value:`#242938`,$type:`color`},onSurfaceVariant:{$value:`#B7BAC4`,$type:`color`},container:{$value:`#232630`,$type:`color`},onContainer:{$value:`#F6F5EE`,$type:`color`},outline:{$value:`rgba(246, 245, 238, 0.14)`,$type:`color`},outlineVariant:{$value:`rgba(246, 245, 238, 0.1)`,$type:`color`},onPrimary:{$value:`#0E1014`,$type:`color`},primaryContainer:{$value:`#242938`,$type:`color`},onPrimaryContainer:{$value:`#CCFF66`,$type:`color`},onError:{$value:`#33110E`,$type:`color`},errorContainer:{$value:`#5E1F1B`,$type:`color`},onErrorContainer:{$value:`#FFC3C0`,$type:`color`},tertiary:{$value:`#FF4FB0`,$type:`color`},onTertiary:{$value:`#0E1014`,$type:`color`},tertiaryContainer:{$value:`#451A35`,$type:`color`},onTertiaryContainer:{$value:`#FFC1E4`,$type:`color`}},...ry,shape:{radius:iy,shadow:ay}},cy={light:{$name:`guuey-brand-v1`,$description:`The guuey product brand (light, provisional) — paper surfaces, slime accent held for fills, darkened slime for text emphasis.`,$metadata:sy.$metadata,color:{primary:{50:{$value:`#F6FFE0`,$type:`color`},100:{$value:`#E9FFB8`,$type:`color`},200:{$value:`#DBFF8F`,$type:`color`},300:{$value:`#CCFF66`,$type:`color`},400:{$value:`#B8FF3A`,$type:`color`},500:{$value:`#9FE01C`,$type:`color`},600:{$value:`#7DB214`,$type:`color`},700:{$value:`#476809`,$type:`color`},800:{$value:`#3F5A11`,$type:`color`},900:{$value:`#28390B`,$type:`color`}},neutral:{50:{$value:`#FBFAF6`,$type:`color`},100:{$value:`#F6F5EE`,$type:`color`},200:{$value:`#E8E7E2`,$type:`color`},300:{$value:`#D5D6DC`,$type:`color`},400:{$value:`#B7BAC4`,$type:`color`},500:{$value:`#6E7380`,$type:`color`},600:{$value:`#4A4F5C`,$type:`color`},700:{$value:`#333846`,$type:`color`},800:{$value:`#242938`,$type:`color`},900:{$value:`#1A1D24`,$type:`color`}},success:{50:{$value:`#F6FFE0`,$type:`color`},100:{$value:`#E9FFB8`,$type:`color`},200:{$value:`#DBFF8F`,$type:`color`},500:{$value:`#517709`,$type:`color`},600:{$value:`#476809`,$type:`color`},700:{$value:`#35510B`,$type:`color`},800:{$value:`#28390B`,$type:`color`}},warning:{50:{$value:`#FFF4DD`,$type:`color`},100:{$value:`#FFE5AE`,$type:`color`},200:{$value:`#FFD37D`,$type:`color`},500:{$value:`#9C6205`,$type:`color`},600:{$value:`#7C4D04`,$type:`color`},700:{$value:`#5E3A03`,$type:`color`},800:{$value:`#3F2702`,$type:`color`}},error:{50:{$value:`#FFE9E8`,$type:`color`},100:{$value:`#FFC3C0`,$type:`color`},200:{$value:`#FF9F9C`,$type:`color`},500:{$value:`#CC2F2F`,$type:`color`},600:{$value:`#A62626`,$type:`color`},700:{$value:`#7E1D1D`,$type:`color`},800:{$value:`#5E1F1B`,$type:`color`}},info:{50:{$value:`#E5F7FF`,$type:`color`},100:{$value:`#BFECFF`,$type:`color`},200:{$value:`#92E0FF`,$type:`color`},500:{$value:`#0B739E`,$type:`color`},600:{$value:`#085572`,$type:`color`},700:{$value:`#06455D`,$type:`color`},800:{$value:`#0A3346`,$type:`color`}},surface:{$value:`#FFFFFF`,$type:`color`},onSurface:{$value:`#1A1D24`,$type:`color`},surfaceVariant:{$value:`#F6F5EE`,$type:`color`},onSurfaceVariant:{$value:`#4A4F5C`,$type:`color`},container:{$value:`#FBFAF6`,$type:`color`},onContainer:{$value:`#1A1D24`,$type:`color`},outline:{$value:`rgba(26, 29, 36, 0.18)`,$type:`color`},outlineVariant:{$value:`rgba(26, 29, 36, 0.10)`,$type:`color`},onPrimary:{$value:`#0E1014`,$type:`color`},primaryContainer:{$value:`#E9FFB8`,$type:`color`},onPrimaryContainer:{$value:`#28390B`,$type:`color`},onError:{$value:`#FFFFFF`,$type:`color`},errorContainer:{$value:`#FFE9E8`,$type:`color`},onErrorContainer:{$value:`#8A1F1F`,$type:`color`},tertiary:{$value:`#D6247F`,$type:`color`},onTertiary:{$value:`#FFFFFF`,$type:`color`},tertiaryContainer:{$value:`#FFDCEE`,$type:`color`},onTertiaryContainer:{$value:`#6B1240`,$type:`color`}},...ry,shape:{radius:iy,shadow:oy}},dark:sy},ly=new Map([[`ggui`,Wv],[`indigo`,ny],[`claudic`,ey],[`premium-cyberpunk`,Kv],[`premium-zen`,Jv],[`premium-neon-noir`,Xv],[`premium-botanical`,Qv],[`guuey-brand-v1`,cy]]);function uy(e,t){return t===`dark`&&e.dark?`dark`:`light`}function dy(e,t=`light`){let n=ly.get(e);if(n)return uy(n,t)===`dark`?n.dark:n.light}function fy(){let e=[];for(let[t,n]of ly){let r=n.dark?[`light`,`dark`]:[`light`];e.push({id:t,name:n.light.$name,description:n.light.$description,metadata:n.light.$metadata,modes:r})}return e}(0,S.createContext)(null);function py(e,t){return e===null?{presetId:t,mode:`light`,fromFile:!1,overrides:{}}:typeof e==`string`?{presetId:e,mode:`light`,fromFile:!1,overrides:{}}:`file`in e?{presetId:t,mode:e.mode??`light`,fromFile:!0,overrides:{}}:{presetId:e.preset,mode:e.mode??`light`,fromFile:!1,overrides:e.overrides??{}}}function my(e,t,n){let r=Object.keys(n);if(r.length===0)return{preset:e,mode:t};r.sort();let i={};for(let e of r)i[e]=n[e];return{preset:e,mode:t,overrides:i}}function hy(){let e=(0,S.useMemo)(()=>fy(),[]),t=e[0]?.id??`ggui`,[n,r]=(0,S.useState)({kind:`loading`}),[i,a]=(0,S.useState)(t),[o,s]=(0,S.useState)(`light`),[c,l]=(0,S.useState)(!1),[u,d]=(0,S.useState)(null),[f,p]=(0,S.useState)(!1),[m,h]=(0,S.useState)({}),g=async()=>{r(e=>e.kind===`ready`?e:{kind:`loading`});try{let e=await fetch(`/ggui/console/theme`,{credentials:`include`,headers:{accept:`application/json`}});if(e.status===401){E(`/admin-login?next=%2Fadmin%2Ftheme`);return}if(!e.ok){r({kind:`error`,message:`server returned ${e.status}`});return}let n=await e.json();r({kind:`ready`,data:n});let i=py(n.current,t);a(i.presetId),s(i.mode),p(i.fromFile),h({...i.overrides})}catch(e){r({kind:`error`,message:String(e)})}};(0,S.useEffect)(()=>{g()},[]);let _=(e,t)=>{h(n=>{let r={...n};return t===null||t===``?delete r[e]:r[e]=t,r})},v=()=>{h({})},y=async e=>{if(n.kind===`ready`){d(null),l(!0);try{let t=await e.text(),n;try{n=JSON.parse(t)}catch(e){d(`upload failed — file is not valid JSON: ${String(e)}`);return}let r=e.name.replace(/[^a-zA-Z0-9._-]/g,`-`),i=/\.json$/i.test(r)?r:`${r}.json`,a=await fetch(`/ggui/console/theme/upload`,{method:`POST`,credentials:`include`,headers:{"content-type":`application/json`,accept:`application/json`},body:JSON.stringify({filename:i,content:n,mode:o})});if(a.status===401){E(`/admin-login?next=%2Fadmin%2Ftheme`);return}if(a.status===400){let e=await a.json();d(e.message??`upload rejected — ${e.error??`invalid_content`}: ${JSON.stringify(e.issue)}`);return}if(a.status===501){let e=await a.json();d(e.message??"Theme uploads need the CLI’s themeFileUploader — launch via `ggui serve`.");return}if(!a.ok){d(`upload failed — server returned ${a.status}`);return}await g()}catch(e){d(`upload failed — ${String(e)}`)}finally{l(!1)}}},b=async()=>{if(n.kind===`ready`){d(null),l(!0);try{let e=await fetch(`/ggui/console/theme`,{method:`POST`,credentials:`include`,headers:{"content-type":`application/json`,accept:`application/json`},body:JSON.stringify(my(i,o,m))});if(e.status===401){E(`/admin-login?next=%2Fadmin%2Ftheme`);return}if(e.status===501){let t=await e.json();d(t.message??"Theme writes need the CLI’s themeWriter — launch via `ggui serve`.");return}if(!e.ok){d(`save failed — server returned ${e.status}`);return}await g()}catch(e){d(`save failed — ${String(e)}`)}finally{l(!1)}}};return(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`01 / theme`,title:`Pick a theme for your generated UI.`,mute:`Persists to ggui.json#theme. Affects every UI the LLM emits — not the console chrome you’re looking at.`,intro:(0,w.jsxs)(w.Fragment,{children:[`Each preset ships a complete DTCG token tree (color, type, spacing, motion). Light + dark variants are independent — presets that haven’t shipped a dark mode fall back to light on selection. The chosen theme writes to`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui.json`}),` and takes effect on the next generation.`]})}),n.kind===`loading`?(0,w.jsx)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},children:`Loading themes…`}):n.kind===`error`?(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},"data-ggui-theme-error":!0,children:[`Couldn’t load theme state — `,n.message]}):(0,w.jsx)(gy,{presets:e,selectedPresetId:i,mode:o,writerEnabled:n.data.writerEnabled,uploadEnabled:n.data.uploadEnabled??!1,fromFile:f,busy:c,err:u,overrides:m,onSelectPreset:a,onSelectMode:s,onSetOverride:_,onClearAllOverrides:v,onSave:()=>{b()},onUploadFile:e=>{y(e)}})]})}function gy({presets:e,selectedPresetId:t,mode:n,writerEnabled:r,uploadEnabled:i,fromFile:a,busy:o,err:s,overrides:c,onSelectPreset:l,onSelectMode:u,onSetOverride:d,onClearAllOverrides:f,onSave:p,onUploadFile:m}){let h=e.find(e=>e.id===t)?.modes.includes(`dark`)??!1,g=n===`dark`&&!h?`light`:n,_=dy(t,g);return(0,w.jsxs)(`div`,{"data-ggui-theme-layout":!0,style:{display:`flex`,gap:16,alignItems:`flex-start`},children:[(0,w.jsxs)(`aside`,{"aria-label":`theme picker controls`,style:{flex:`0 0 360px`,minWidth:320,maxWidth:400,display:`flex`,flexDirection:`column`,gap:12,position:`sticky`,top:16},children:[(0,w.jsxs)(`div`,{className:`ggui-stack__head`,style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,w.jsx)(`span`,{className:`ggui-stack__num`,children:`THM`}),(0,w.jsx)(`span`,{className:`ggui-stack__label`,children:`mode`}),(0,w.jsxs)(`span`,{style:{marginLeft:`auto`,display:`inline-flex`,gap:8},children:[(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,"data-ggui-theme-mode":`light`,onClick:()=>u(`light`),...g===`light`?{"aria-pressed":!0}:{},style:g===`light`?{fontWeight:600}:void 0,children:`◐ Light`}),(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,"data-ggui-theme-mode":`dark`,onClick:()=>u(`dark`),disabled:!h,title:h?`Switch to dark variant`:`This preset hasn’t shipped a dark variant yet`,...g===`dark`?{"aria-pressed":!0}:{},style:g===`dark`?{fontWeight:600}:void 0,children:`◑ Dark`})]})]}),a?(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:0,fontSize:12},children:[`⚠ Current selection is a file-form theme (`,(0,w.jsx)(`code`,{className:`ggui-code`,children:`{ file: "..." }`}),`). Saving a preset below will replace it.`]}):null,r?null:(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:0,fontSize:12},children:[`Read-only — launch via `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui serve`}),` `,`to enable saves.`]}),(0,w.jsx)(`div`,{"data-ggui-theme-grid":!0,style:{display:`flex`,flexDirection:`column`,gap:6},children:e.map(e=>(0,w.jsx)(Sy,{preset:e,selected:e.id===t,mode:g,onSelect:()=>l(e.id)},e.id))}),(0,w.jsx)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`,flexWrap:`wrap`,paddingTop:4,borderTop:`1px solid currentColor`,marginTop:4,opacity:.95},children:(0,w.jsxs)(`button`,{type:`button`,className:`ggui-btn`,"data-ggui-theme-save":!0,disabled:o||!r,onClick:p,style:{flex:1},children:[(0,w.jsx)(`span`,{className:`ggui-btn__dot`,"aria-hidden":!0}),o?`saving…`:`Save to ggui.json`]})}),(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:0,fontSize:11,lineHeight:1.4},children:[(0,w.jsx)(`code`,{className:`ggui-code`,children:t}),` `,`· `,(0,w.jsx)(`code`,{className:`ggui-code`,children:g}),Object.keys(c).length>0?(0,w.jsxs)(w.Fragment,{children:[` `,`· `,(0,w.jsxs)(`code`,{className:`ggui-code`,children:[`+`,Object.keys(c).length,` override`,Object.keys(c).length===1?``:`s`]})]}):null,g===n?null:(0,w.jsxs)(w.Fragment,{children:[` `,`· requested `,(0,w.jsx)(`code`,{className:`ggui-code`,children:n}),`, fell back`]})]}),(0,w.jsx)(yy,{uploadEnabled:i,busy:o,onUploadFile:m}),s?(0,w.jsx)(`p`,{className:`ggui-muted`,style:{margin:0,color:`#c0392b`,fontSize:12},"data-ggui-theme-error":!0,children:s}):null,_?(0,w.jsx)(by,{rawTheme:_,overrides:c,onSetOverride:d,onClearAll:f}):(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:0,fontSize:12},children:[`⚠ `,(0,w.jsx)(`code`,{className:`ggui-code`,children:t}),` isn’t registered on this build. Saving still writes the manifest; overrides require a recognised preset.`]})]}),(0,w.jsx)(`main`,{"aria-label":`theme preview`,style:{flex:1,minWidth:0,display:`flex`,flexDirection:`column`,gap:12},children:_?(0,w.jsx)(wy,{presetId:t,mode:g,rawTheme:_,overrides:c}):(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`preview unavailable`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`PRV / 00`})]}),(0,w.jsx)(`div`,{className:`ggui-card__body`,children:(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:0},children:[(0,w.jsx)(`code`,{className:`ggui-code`,children:t}),` isn’t a registered preset on this build, so there’s no token tree to paint from. Pick another preset on the left.`]})})]})})]})}function _y(e){let t=e=>{let t=e.$value;return typeof t==`string`?t:JSON.stringify(t)},n=(e,n)=>Object.keys(n).sort((e,t)=>{let n=Number(e),r=Number(t);return Number.isFinite(n)&&Number.isFinite(r)?n-r:e.localeCompare(t)}).map(r=>({path:`${e}.${r}`,value:t(n[r])})),r=[];r.push({label:`Color · Primary`,prefix:`color.primary`,leaves:n(`color.primary`,e.color.primary)}),r.push({label:`Color · Neutral`,prefix:`color.neutral`,leaves:n(`color.neutral`,e.color.neutral)}),r.push({label:`Color · Success`,prefix:`color.success`,leaves:n(`color.success`,e.color.success)}),r.push({label:`Color · Warning`,prefix:`color.warning`,leaves:n(`color.warning`,e.color.warning)}),r.push({label:`Color · Error`,prefix:`color.error`,leaves:n(`color.error`,e.color.error)}),r.push({label:`Color · Info`,prefix:`color.info`,leaves:n(`color.info`,e.color.info)}),r.push({label:`Color · Roles`,prefix:`color`,leaves:[{path:`color.surface`,value:t(e.color.surface)},{path:`color.onSurface`,value:t(e.color.onSurface)},{path:`color.surfaceVariant`,value:t(e.color.surfaceVariant)},{path:`color.onSurfaceVariant`,value:t(e.color.onSurfaceVariant)},{path:`color.container`,value:t(e.color.container)},{path:`color.onContainer`,value:t(e.color.onContainer)},{path:`color.outline`,value:t(e.color.outline)},{path:`color.outlineVariant`,value:t(e.color.outlineVariant)}]}),r.push({label:`Shape · Radius`,prefix:`shape.radius`,leaves:n(`shape.radius`,e.shape.radius)}),r.push({label:`Shape · Shadow`,prefix:`shape.shadow`,leaves:n(`shape.shadow`,e.shape.shadow)});let i=[{path:`font.family.sans`,value:t(e.font.family.sans)}];return e.font.family.mono&&i.push({path:`font.family.mono`,value:t(e.font.family.mono)}),r.push({label:`Font · Family`,prefix:`font.family`,leaves:i}),r.push({label:`Font · Size`,prefix:`font.size`,leaves:n(`font.size`,e.font.size)}),r.push({label:`Font · Weight`,prefix:`font.weight`,leaves:n(`font.weight`,e.font.weight)}),r.push({label:`Spacing`,prefix:`spacing`,leaves:n(`spacing`,e.spacing)}),r.filter(e=>e.leaves.length>0)}var vy=`https://github.com/ggui-ai/ggui/blob/main/design/CUSTOM_THEMES.md`;function yy({uploadEnabled:e,busy:t,onUploadFile:n}){return(0,w.jsxs)(`div`,{"data-ggui-theme-custom-row":!0,style:{display:`flex`,flexDirection:`column`,gap:6,paddingTop:8,marginTop:4,borderTop:`1px dashed currentColor`,opacity:.95},children:[e?(0,w.jsxs)(`label`,{className:`ggui-btn ggui-btn--ghost`,"data-ggui-theme-upload":!0,style:{display:`inline-flex`,alignItems:`center`,gap:8,cursor:t?`not-allowed`:`pointer`,justifyContent:`center`},children:[(0,w.jsx)(`input`,{type:`file`,accept:`.json,application/json`,disabled:t,onChange:e=>{let t=e.target.files?.[0];t!==void 0&&n(t),e.target.value=``},style:{position:`absolute`,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0,0,0,0)`,whiteSpace:`nowrap`,border:0}}),`↑ Upload theme.json`]}):null,(0,w.jsx)(`a`,{href:vy,target:`_blank`,rel:`noreferrer noopener`,"data-ggui-theme-docs":!0,className:`ggui-muted`,style:{fontSize:11,textDecoration:`underline`,textAlign:`center`,opacity:.85},children:`Roll your own theme →`})]})}function by({rawTheme:e,overrides:t,onSetOverride:n,onClearAll:r}){let i=(0,S.useMemo)(()=>_y(e),[e]),a=Object.keys(t).length;return(0,w.jsxs)(`div`,{"data-ggui-theme-overrides":!0,className:`ggui-stack`,style:{marginTop:16},"aria-label":`theme token overrides`,children:[(0,w.jsxs)(`div`,{className:`ggui-stack__head`,children:[(0,w.jsx)(`span`,{className:`ggui-stack__num`,children:`DTCG`}),(0,w.jsx)(`span`,{className:`ggui-stack__label`,children:`overrides`}),(0,w.jsxs)(`span`,{className:`ggui-stack__count`,children:[a,` `,a===1?`override`:`overrides`]}),a>0?(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,"data-ggui-theme-overrides-clear":!0,onClick:r,style:{marginLeft:`auto`},children:`Clear all`}):null]}),(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:`8px 0`,fontSize:12},children:[`Tweak individual DTCG tokens on top of the selected preset. Each leaf shows the preset’s shipped `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`$value`}),`; type a CSS-valid replacement to override it. Per-leaf`,` `,(0,w.jsx)(`em`,{children:`reset`}),` clears that path; saving with no overrides writes the bare `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`{ preset, mode }`}),` `,`shape (no `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`overrides`}),` field).`]}),i.map(e=>(0,w.jsxs)(`details`,{...e.prefix===`color.primary`?{open:!0}:{},style:{marginTop:8},children:[(0,w.jsxs)(`summary`,{style:{cursor:`pointer`,padding:`6px 0`,fontSize:13,fontWeight:500,userSelect:`none`},children:[e.label,` `,(0,w.jsxs)(`span`,{className:`ggui-muted`,style:{fontSize:11},children:[`(`,e.leaves.length,e.leaves.some(e=>e.path in t)?`, +${e.leaves.filter(e=>e.path in t).length} overridden`:``,`)`]})]}),(0,w.jsx)(`div`,{style:{display:`grid`,gap:6,gridTemplateColumns:`auto 1fr auto`,padding:`8px 0 8px 12px`,alignItems:`center`,fontSize:12},children:e.leaves.map(e=>(0,w.jsx)(xy,{path:e.path,presetValue:e.value,overrideValue:t[e.path]??null,onChange:n},e.path))})]},e.prefix))]})}function xy({path:e,presetValue:t,overrideValue:n,onChange:r}){let i=n!==null;return(0,w.jsxs)(`div`,{"data-ggui-theme-override-leaf":e,style:{display:`contents`},children:[(0,w.jsx)(`code`,{className:`ggui-code`,style:{fontSize:11,opacity:.85,padding:`2px 6px`},children:e}),(0,w.jsx)(`input`,{type:`text`,"data-ggui-theme-override-input":!0,value:n??``,placeholder:t,onChange:t=>{let n=t.target.value;r(e,n.length===0?null:n)},spellCheck:!1,autoComplete:`off`,style:{fontSize:12,fontFamily:`var(--ggui-font-mono, ui-monospace, monospace)`,padding:`4px 8px`,border:`1px solid currentColor`,borderRadius:4,background:`transparent`,color:`inherit`,opacity:i?1:.85,outline:i?`1px solid currentColor`:`none`},"aria-label":`override ${e}`}),(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,"data-ggui-theme-override-reset":!0,onClick:()=>r(e,null),disabled:!i,style:{fontSize:11,padding:`2px 8px`,opacity:i?1:.4,cursor:i?`pointer`:`default`},title:i?`Reset this leaf to the preset value`:`No override set on this leaf`,children:`reset`})]})}function Sy({preset:e,selected:t,mode:n,onSelect:r}){let i=e.modes.includes(`dark`),a=dy(e.id,n),o=a?.color.primary[500]?.$value,s=a?.color.surface.$value;return(0,w.jsxs)(`button`,{type:`button`,"data-ggui-theme-card":e.id,onClick:r,"aria-pressed":t,style:{display:`flex`,alignItems:`center`,gap:10,padding:`8px 10px`,textAlign:`left`,cursor:`pointer`,border:t?`2px solid currentColor`:`1px solid currentColor`,borderRadius:6,background:`transparent`,color:`inherit`,opacity:t?1:.85},children:[(0,w.jsxs)(`span`,{"aria-hidden":!0,style:{display:`inline-flex`,flexShrink:0,width:28,height:28,borderRadius:4,overflow:`hidden`,border:`1px solid currentColor`},children:[(0,w.jsx)(`span`,{style:{flex:1,background:o??`#ccc`}}),(0,w.jsx)(`span`,{style:{flex:1,background:s??`#fff`}})]}),(0,w.jsxs)(`span`,{style:{flex:1,minWidth:0},children:[(0,w.jsx)(`span`,{style:{display:`block`,fontSize:13,fontWeight:t?600:500},children:e.name}),(0,w.jsxs)(`span`,{className:`ggui-muted`,style:{display:`block`,fontSize:11,opacity:.75},children:[e.id===`claudic`?`claude.ai · `:``,i?`Light · Dark`:`Light only`]})]})]})}function Cy(e,t){if(Object.keys(t).length===0)return e;let n=structuredClone(e);for(let[e,r]of Object.entries(t)){let t=e.split(`.`),i=n,a=!0;for(let e=0;e<t.length-1;e+=1){let n=t[e];if(n===void 0){a=!1;break}let r=i[n];if(typeof r!=`object`||!r){a=!1;break}i=r}if(!a)continue;let o=t[t.length-1];if(o===void 0)continue;let s=i[o];typeof s!=`object`||!s||(s.$value=r)}return n}function wy({presetId:e,mode:t,rawTheme:n,overrides:r}){let i=(0,S.useMemo)(()=>`ggui-theme-preview-${e}-${t}`,[e,t]),a=(0,S.useMemo)(()=>{let t=Rv(e,Cy(n,r));return`${t.cssVariables.replace(/^:root\s*\{/,`.${i} {`)}\n${t.cssKeyframes}`},[n,r,e,i]);return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`style`,{"data-ggui-theme-preview-style":i,children:a}),(0,w.jsxs)(`div`,{"data-ggui-theme-preview":!0,className:i,style:{background:`var(--ggui-color-surface)`,color:`var(--ggui-color-onSurface)`,fontFamily:`var(--ggui-font-family-sans)`,padding:`var(--ggui-spacing-lg, 24px)`,borderRadius:`var(--ggui-shape-radius-lg, 12px)`,border:`1px solid var(--ggui-color-outline)`,boxShadow:`var(--ggui-shape-shadow-md)`,display:`flex`,flexDirection:`column`,gap:`var(--ggui-spacing-lg, 24px)`},children:[(0,w.jsx)(Ty,{presetName:n.$name,mode:t}),(0,w.jsx)(Ey,{}),(0,w.jsx)(Dy,{}),(0,w.jsx)(Oy,{}),(0,w.jsx)(ky,{theme:n,overrides:r}),(0,w.jsx)(Ay,{})]})]})}function Ty({presetName:e,mode:t}){return(0,w.jsxs)(`header`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`baseline`,gap:12,flexWrap:`wrap`,borderBottom:`1px solid var(--ggui-color-outlineVariant)`,paddingBottom:`var(--ggui-spacing-md, 16px)`},children:[(0,w.jsx)(`span`,{style:{fontSize:`var(--ggui-font-size-2xl, 1.5rem)`,fontWeight:`var(--ggui-font-weight-semibold, 600)`},children:e}),(0,w.jsx)(`span`,{style:{fontSize:`var(--ggui-font-size-sm, 0.875rem)`,color:`var(--ggui-color-onSurfaceVariant)`,fontFamily:`var(--ggui-font-family-mono)`},children:t})]})}function Ey(){return(0,w.jsxs)(`section`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:[(0,w.jsx)(`h3`,{style:{margin:0,fontSize:`var(--ggui-font-size-xl, 1.25rem)`,fontWeight:`var(--ggui-font-weight-semibold, 600)`,lineHeight:`var(--ggui-font-lineHeight-tight, 1.25)`},children:`Typography reads naturally`}),(0,w.jsxs)(`p`,{style:{margin:0,fontSize:`var(--ggui-font-size-base, 1rem)`,lineHeight:`var(--ggui-font-lineHeight-normal, 1.5)`},children:[`The body paragraph is what generated UIs use for prose. Inline`,` `,(0,w.jsx)(`code`,{style:{fontFamily:`var(--ggui-font-family-mono)`,fontSize:`0.9em`,background:`var(--ggui-color-surfaceVariant)`,color:`var(--ggui-color-onSurfaceVariant)`,padding:`0.1em 0.4em`,borderRadius:`var(--ggui-shape-radius-sm, 4px)`},children:`code`}),` `,`and a`,` `,(0,w.jsx)(`a`,{href:`#preview`,style:{color:`var(--ggui-color-primary-600)`,textDecorationColor:`var(--ggui-color-primary-400)`},onClick:e=>e.preventDefault(),children:`link`}),` `,`sit alongside.`]}),(0,w.jsx)(`p`,{className:`ggui-muted`,style:{margin:0,fontSize:`var(--ggui-font-size-sm, 0.875rem)`,color:`var(--ggui-color-onSurfaceVariant)`},children:`Caption text — softer contrast for secondary info.`})]})}function Dy(){return(0,w.jsxs)(`section`,{style:{display:`flex`,gap:8,flexWrap:`wrap`},children:[(0,w.jsx)(`button`,{type:`button`,onClick:e=>e.preventDefault(),style:{padding:`8px 16px`,background:`var(--ggui-color-primary-500)`,color:`var(--ggui-color-surface)`,border:`none`,borderRadius:`var(--ggui-shape-radius-md, 8px)`,fontFamily:`var(--ggui-font-family-sans)`,fontSize:`var(--ggui-font-size-sm, 0.875rem)`,fontWeight:`var(--ggui-font-weight-medium, 500)`,cursor:`pointer`,boxShadow:`var(--ggui-shape-shadow-sm)`},children:`Primary`}),(0,w.jsx)(`button`,{type:`button`,onClick:e=>e.preventDefault(),style:{padding:`8px 16px`,background:`transparent`,color:`var(--ggui-color-primary-600)`,border:`1px solid var(--ggui-color-primary-500)`,borderRadius:`var(--ggui-shape-radius-md, 8px)`,fontFamily:`var(--ggui-font-family-sans)`,fontSize:`var(--ggui-font-size-sm, 0.875rem)`,fontWeight:`var(--ggui-font-weight-medium, 500)`,cursor:`pointer`},children:`Outline`}),(0,w.jsx)(`button`,{type:`button`,onClick:e=>e.preventDefault(),style:{padding:`8px 16px`,background:`transparent`,color:`var(--ggui-color-onSurfaceVariant)`,border:`none`,borderRadius:`var(--ggui-shape-radius-md, 8px)`,fontFamily:`var(--ggui-font-family-sans)`,fontSize:`var(--ggui-font-size-sm, 0.875rem)`,cursor:`pointer`},children:`Ghost`})]})}function Oy(){return(0,w.jsxs)(`section`,{style:{background:`var(--ggui-color-container)`,color:`var(--ggui-color-onContainer)`,padding:`var(--ggui-spacing-md, 16px)`,borderRadius:`var(--ggui-shape-radius-lg, 12px)`,boxShadow:`var(--ggui-shape-shadow-lg)`,display:`flex`,flexDirection:`column`,gap:8},children:[(0,w.jsx)(`strong`,{style:{fontSize:`var(--ggui-font-size-lg, 1.125rem)`,fontWeight:`var(--ggui-font-weight-semibold, 600)`},children:`Container card`}),(0,w.jsxs)(`span`,{style:{fontSize:`var(--ggui-font-size-sm, 0.875rem)`},children:[`Painted with `,(0,w.jsx)(`code`,{style:{fontFamily:`var(--ggui-font-family-mono)`},children:`color.container`}),` `,`+ `,(0,w.jsx)(`code`,{style:{fontFamily:`var(--ggui-font-family-mono)`},children:`color.onContainer`}),` `,`— the role pair generated UIs reach for to highlight primary-tinted content.`]}),(0,w.jsx)(`input`,{type:`text`,defaultValue:`Form input — focus to see border`,onChange:()=>{},style:{padding:`6px 10px`,background:`var(--ggui-color-surface)`,color:`var(--ggui-color-onSurface)`,border:`1px solid var(--ggui-color-outline)`,borderRadius:`var(--ggui-shape-radius-sm, 4px)`,fontFamily:`var(--ggui-font-family-sans)`,fontSize:`var(--ggui-font-size-sm, 0.875rem)`,outline:`none`}})]})}function ky({theme:e,overrides:t}){let n=(0,S.useMemo)(()=>Cy(e,t),[e,t]),r=(e,t,n)=>{let r=Object.keys(t).sort((e,t)=>{if(n){let n=Number(e),r=Number(t);if(Number.isFinite(n)&&Number.isFinite(r))return n-r}return e.localeCompare(t)});return(0,w.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,w.jsx)(`span`,{style:{width:64,fontSize:`var(--ggui-font-size-sm, 0.875rem)`,color:`var(--ggui-color-onSurfaceVariant)`},children:e}),(0,w.jsx)(`div`,{style:{display:`flex`,flex:1,borderRadius:`var(--ggui-shape-radius-sm, 4px)`,overflow:`hidden`,border:`1px solid var(--ggui-color-outlineVariant)`},children:r.map(n=>{let r=t[n];return r?(0,w.jsx)(`span`,{title:`${e.toLowerCase()}.${n} · ${r.$value}`,style:{flex:1,height:24,background:r.$value}},n):null})})]})};return(0,w.jsxs)(`section`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:[(0,w.jsx)(`strong`,{style:{fontSize:`var(--ggui-font-size-sm, 0.875rem)`,color:`var(--ggui-color-onSurfaceVariant)`,textTransform:`uppercase`,letterSpacing:`0.06em`},children:`Color ramps`}),r(`Primary`,n.color.primary,!0),r(`Neutral`,n.color.neutral,!0)]})}function Ay(){let e=(e,t)=>(0,w.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:6,fontSize:`var(--ggui-font-size-sm, 0.875rem)`},children:[(0,w.jsx)(`span`,{"aria-hidden":!0,style:{width:12,height:12,borderRadius:`50%`,background:e,border:`1px solid var(--ggui-color-outline)`}}),(0,w.jsx)(`span`,{style:{color:`var(--ggui-color-onSurfaceVariant)`},children:t})]});return(0,w.jsxs)(`section`,{style:{display:`flex`,gap:16,flexWrap:`wrap`},children:[e(`var(--ggui-color-success-500)`,`success`),e(`var(--ggui-color-warning-500)`,`warning`),e(`var(--ggui-color-error-500)`,`error`),e(`var(--ggui-color-info-500)`,`info`)]})}var jy={kind:`admin-index`};function My(){return typeof window>`u`?jy:ie(window.location.pathname)}function Ny(){return jy}function Py(){let e=(0,S.useSyncExternalStore)(ae,My,Ny);return e.kind===`blueprint`?(0,w.jsx)(Se,{route:e,variant:`narrow`,children:(0,w.jsx)(rg,{blueprintId:e.blueprintId})}):e.kind===`admin-index`||e.kind===`admin-status`?(0,w.jsx)(Se,{route:e,variant:`admin`,children:(0,w.jsx)(wv,{})}):e.kind===`admin-sessions`?(0,w.jsx)(Se,{route:e,variant:`admin`,children:(0,w.jsx)(vv,{})}):e.kind===`admin-blueprints`?(0,w.jsx)(Se,{route:e,variant:`admin`,children:(0,w.jsx)(cg,{})}):e.kind===`admin-variants`?(0,w.jsx)(Se,{route:e,variant:`admin`,children:(0,w.jsx)(Gg,{})}):e.kind===`admin-variant-detail`?(0,w.jsx)(Se,{route:e,variant:`admin`,children:(0,w.jsx)(Rg,{contractHash:e.contractHash})}):e.kind===`admin-variant-generate`?(0,w.jsx)(Se,{route:e,variant:`admin`,children:(0,w.jsx)(Vg,{contractHash:e.contractHash})}):e.kind===`admin-config`?(0,w.jsx)(Se,{route:e,variant:`admin`,children:(0,w.jsx)(Qg,{})}):e.kind===`admin-tools`?(0,w.jsx)(Se,{route:e,variant:`admin`,children:(0,w.jsx)(pv,{})}):e.kind===`admin-llm-keys`?(0,w.jsx)(Se,{route:e,variant:`admin`,children:(0,w.jsx)(De,{})}):e.kind===`admin-connector-keys`?(0,w.jsx)(Se,{route:e,variant:`admin`,children:(0,w.jsx)(sv,{})}):e.kind===`admin-oauth-providers`?(0,w.jsx)(Se,{route:e,variant:`admin`,children:(0,w.jsx)(Ne,{})}):e.kind===`admin-clients`?(0,w.jsx)(Se,{route:e,variant:`admin`,children:(0,w.jsx)(Kg,{})}):e.kind===`admin-theme`?(0,w.jsx)(Se,{route:e,variant:`admin`,children:(0,w.jsx)(hy,{})}):e.kind===`admin-login`?(0,w.jsx)(Se,{route:e,variant:`narrow`,children:(0,w.jsx)(Ce,{})}):se(e)?(0,w.jsx)(Se,{route:e,variant:`devtools`,children:(0,w.jsx)(av,{route:e})}):(0,w.jsx)(Se,{route:e,variant:`narrow`,children:(0,w.jsx)(Fy,{pathname:e.pathname})})}function Fy({pathname:e}){return(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`404 / not found`,title:`Nothing lives here.`,mute:`This is an operator-only server.`,intro:(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`code`,{className:`ggui-code`,children:e}),` is not a route served by this console. The end-user pages were retired — ggui’s end-users see UI through their MCP host (claude.ai, Claude Desktop, Cursor), not through this server’s own surface.`]})}),(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`routes`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`RTE / 01`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsxs)(`ul`,{style:{listStyle:`none`,padding:0,margin:0,display:`grid`,gap:10},children:[(0,w.jsx)(`li`,{children:(0,w.jsxs)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,onClick:()=>E(`/admin/status`),children:[(0,w.jsx)(`span`,{className:`ggui-btn__dot`,"aria-hidden":!0}),`/ admin`]})}),(0,w.jsx)(`li`,{children:(0,w.jsxs)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,onClick:()=>E(`/admin-login`),children:[(0,w.jsx)(`span`,{className:`ggui-btn__dot`,"aria-hidden":!0}),`/ admin-login`]})})]}),(0,w.jsxs)(`p`,{className:`ggui-muted`,children:[`The`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`/preview/<blueprintId>`}),` `,`route requires a real id — paste a blueprint id registered in `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui.json`}),`.`]})]})]})]})}var Iy=document.getElementById(`root`);if(!Iy)throw Error(`console: #root element missing from index.html`);(0,C.createRoot)(Iy).render((0,w.jsx)(S.StrictMode,{children:(0,w.jsx)(Py,{})}));
|
|
206
|
+
`)}function Rv(e,t){let n=`:root {\n${Fv(t)}\n}`,r=Lv(t),i=r?`${n}\n\n${r}`:n;return{id:e,name:t.$name,description:t.$description,metadata:t.$metadata,cssVariables:n,cssKeyframes:r,css:i}}({version:1,tokens:`--ggui-color-container.--ggui-color-error-100.--ggui-color-error-200.--ggui-color-error-50.--ggui-color-error-500.--ggui-color-error-600.--ggui-color-error-700.--ggui-color-error-800.--ggui-color-info-100.--ggui-color-info-200.--ggui-color-info-50.--ggui-color-info-500.--ggui-color-info-700.--ggui-color-info-800.--ggui-color-neutral-100.--ggui-color-neutral-200.--ggui-color-neutral-300.--ggui-color-neutral-400.--ggui-color-neutral-50.--ggui-color-neutral-500.--ggui-color-neutral-600.--ggui-color-onContainer.--ggui-color-onError.--ggui-color-onPrimary.--ggui-color-onSurface.--ggui-color-onSurfaceVariant.--ggui-color-outline.--ggui-color-outlineVariant.--ggui-color-primary.--ggui-color-primary-100.--ggui-color-primary-200.--ggui-color-primary-300.--ggui-color-primary-400.--ggui-color-primary-50.--ggui-color-primary-500.--ggui-color-primary-600.--ggui-color-primary-700.--ggui-color-primary-800.--ggui-color-primary-900.--ggui-color-success-100.--ggui-color-success-200.--ggui-color-success-50.--ggui-color-success-500.--ggui-color-success-700.--ggui-color-success-800.--ggui-color-surface.--ggui-color-surface-gradient.--ggui-color-surface-subtle.--ggui-color-surface-sunken.--ggui-color-surfaceVariant.--ggui-color-warning-100.--ggui-color-warning-200.--ggui-color-warning-50.--ggui-color-warning-500.--ggui-color-warning-700.--ggui-color-warning-800.--ggui-flash-color.--ggui-font-family-mono.--ggui-font-family-sans.--ggui-font-lineHeight-normal.--ggui-font-size-2xl.--ggui-font-size-3xl.--ggui-font-size-4xl.--ggui-font-size-base.--ggui-font-size-lg.--ggui-font-size-sm.--ggui-font-size-xl.--ggui-font-size-xs.--ggui-font-weight-bold.--ggui-font-weight-medium.--ggui-font-weight-normal.--ggui-font-weight-semibold.--ggui-radius-md.--ggui-radius-sm.--ggui-shape-radius-full.--ggui-shape-radius-lg.--ggui-shape-radius-md.--ggui-shape-radius-sm.--ggui-shape-radius-xl.--ggui-shape-shadow-lg.--ggui-shape-shadow-md.--ggui-shape-shadow-sm.--ggui-shape-shadow-xl.--ggui-spacing-1.--ggui-spacing-10.--ggui-spacing-12.--ggui-spacing-2.--ggui-spacing-2xl.--ggui-spacing-3.--ggui-spacing-4.--ggui-spacing-5.--ggui-spacing-6.--ggui-spacing-8.--ggui-spacing-lg.--ggui-spacing-md.--ggui-spacing-sm.--ggui-spacing-xl.--ggui-spacing-xs`.split(`.`)}).tokens;var zv={light:{success:{50:{$type:`color`,$value:`#f0fdf4`},100:{$type:`color`,$value:`#dcfce7`},200:{$type:`color`,$value:`#bbf7d0`},500:{$type:`color`,$value:`#22c55e`},600:{$type:`color`,$value:`#16a34a`},700:{$type:`color`,$value:`#15803d`},800:{$type:`color`,$value:`#166534`}},warning:{50:{$type:`color`,$value:`#fffbeb`},100:{$type:`color`,$value:`#fef3c7`},200:{$type:`color`,$value:`#fde68a`},500:{$type:`color`,$value:`#f59e0b`},600:{$type:`color`,$value:`#d97706`},700:{$type:`color`,$value:`#b45309`},800:{$type:`color`,$value:`#92400e`}},error:{50:{$type:`color`,$value:`#fef2f2`},100:{$type:`color`,$value:`#fee2e2`},200:{$type:`color`,$value:`#fecaca`},500:{$type:`color`,$value:`#ef4444`},600:{$type:`color`,$value:`#dc2626`},700:{$type:`color`,$value:`#b91c1c`},800:{$type:`color`,$value:`#991b1b`}},info:{50:{$type:`color`,$value:`#ecfeff`},100:{$type:`color`,$value:`#cffafe`},200:{$type:`color`,$value:`#a5f3fc`},500:{$type:`color`,$value:`#06b6d4`},600:{$type:`color`,$value:`#0891b2`},700:{$type:`color`,$value:`#0e7490`},800:{$type:`color`,$value:`#155e75`}}},dark:{success:{50:{$type:`color`,$value:`#052e16`},100:{$type:`color`,$value:`#14532d`},200:{$type:`color`,$value:`#166534`},500:{$type:`color`,$value:`#22c55e`},600:{$type:`color`,$value:`#4ade80`},700:{$type:`color`,$value:`#86efac`},800:{$type:`color`,$value:`#bbf7d0`}},warning:{50:{$type:`color`,$value:`#451a03`},100:{$type:`color`,$value:`#78350f`},200:{$type:`color`,$value:`#92400e`},500:{$type:`color`,$value:`#f59e0b`},600:{$type:`color`,$value:`#fbbf24`},700:{$type:`color`,$value:`#fcd34d`},800:{$type:`color`,$value:`#fde68a`}},error:{50:{$type:`color`,$value:`#450a0a`},100:{$type:`color`,$value:`#7f1d1d`},200:{$type:`color`,$value:`#991b1b`},500:{$type:`color`,$value:`#ef4444`},600:{$type:`color`,$value:`#f87171`},700:{$type:`color`,$value:`#fca5a5`},800:{$type:`color`,$value:`#fecaca`}},info:{50:{$type:`color`,$value:`#083344`},100:{$type:`color`,$value:`#164e63`},200:{$type:`color`,$value:`#155e75`},500:{$type:`color`,$value:`#06b6d4`},600:{$type:`color`,$value:`#22d3ee`},700:{$type:`color`,$value:`#67e8f9`},800:{$type:`color`,$value:`#a5f3fc`}}}},Bv={light:{focusRing:{color:{$type:`color`,$value:`#0284c7`},width:{$type:`dimension`,$value:`2px`},offset:{$type:`dimension`,$value:`2px`}},reducedMotion:{duration:{$type:`duration`,$value:`0ms`}},highContrast:{borderWidth:{$type:`dimension`,$value:`2px`},textColor:{$type:`color`,$value:`#000000`},backgroundColor:{$type:`color`,$value:`#ffffff`},linkColor:{$type:`color`,$value:`#0369a1`}}},dark:{focusRing:{color:{$type:`color`,$value:`#38bdf8`},width:{$type:`dimension`,$value:`2px`},offset:{$type:`dimension`,$value:`2px`}},reducedMotion:{duration:{$type:`duration`,$value:`0ms`}},highContrast:{borderWidth:{$type:`dimension`,$value:`2px`},textColor:{$type:`color`,$value:`#f1f5f9`},backgroundColor:{$type:`color`,$value:`#0f172a`},linkColor:{$type:`color`,$value:`#7dd3fc`}}}},Vv={hide:{$type:`number`,$value:-1},base:{$type:`number`,$value:0},docked:{$type:`number`,$value:10},dropdown:{$type:`number`,$value:1e3},sticky:{$type:`number`,$value:1100},banner:{$type:`number`,$value:1200},overlay:{$type:`number`,$value:1300},modal:{$type:`number`,$value:1400},popover:{$type:`number`,$value:1500},skipLink:{$type:`number`,$value:1600},toast:{$type:`number`,$value:1700},tooltip:{$type:`number`,$value:1800}},Hv={fast:{$type:`transition`,$value:`100ms cubic-bezier(0.4, 0, 0.2, 1)`},normal:{$type:`transition`,$value:`200ms cubic-bezier(0.4, 0, 0.2, 1)`},slow:{$type:`transition`,$value:`300ms cubic-bezier(0.4, 0, 0.2, 1)`},colors:{$type:`transition`,$value:`color 200ms cubic-bezier(0.4, 0, 0.2, 1), background-color 200ms cubic-bezier(0.4, 0, 0.2, 1), border-color 200ms cubic-bezier(0.4, 0, 0.2, 1)`},opacity:{$type:`transition`,$value:`opacity 200ms cubic-bezier(0.4, 0, 0.2, 1)`},transform:{$type:`transition`,$value:`transform 200ms cubic-bezier(0, 0, 0.2, 1)`}},Uv={font:{family:{sans:{$value:`"Inter", system-ui, -apple-system, sans-serif`,$type:`fontFamily`},mono:{$value:`"Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace`,$type:`fontFamily`}},size:{sm:{$value:`0.8125rem`,$type:`dimension`},base:{$value:`0.875rem`,$type:`dimension`},lg:{$value:`1rem`,$type:`dimension`},xl:{$value:`1.125rem`,$type:`dimension`},"2xl":{$value:`1.375rem`,$type:`dimension`}},weight:{normal:{$value:`400`,$type:`fontWeight`},medium:{$value:`500`,$type:`fontWeight`},semibold:{$value:`600`,$type:`fontWeight`},bold:{$value:`700`,$type:`fontWeight`}},lineHeight:{tight:{$value:`1.2`,$type:`number`},normal:{$value:`1.5`,$type:`number`},relaxed:{$value:`1.6`,$type:`number`}}},spacing:{1:{$value:`0.25rem`,$type:`dimension`},2:{$value:`0.5rem`,$type:`dimension`},3:{$value:`0.75rem`,$type:`dimension`},4:{$value:`1rem`,$type:`dimension`},5:{$value:`1.25rem`,$type:`dimension`},6:{$value:`1.5rem`,$type:`dimension`},8:{$value:`2rem`,$type:`dimension`},10:{$value:`2.5rem`,$type:`dimension`},12:{$value:`3rem`,$type:`dimension`},xs:{$value:`0.25rem`,$type:`dimension`},sm:{$value:`0.5rem`,$type:`dimension`},md:{$value:`1rem`,$type:`dimension`},lg:{$value:`1.5rem`,$type:`dimension`},xl:{$value:`2rem`,$type:`dimension`},"2xl":{$value:`3rem`,$type:`dimension`}},shape:{radius:{sm:{$value:`2px`,$type:`dimension`},md:{$value:`2px`,$type:`dimension`},lg:{$value:`4px`,$type:`dimension`},xl:{$value:`6px`,$type:`dimension`},full:{$value:`9999px`,$type:`dimension`}},shadow:{sm:{$value:`none`,$type:`shadow`},md:{$value:`0 1px 2px rgba(41, 41, 41, 0.06)`,$type:`shadow`},lg:{$value:`0 2px 6px rgba(41, 41, 41, 0.08)`,$type:`shadow`},xl:{$value:`0 4px 12px rgba(41, 41, 41, 0.10)`,$type:`shadow`}}},motion:{duration:{fast:{$value:`120ms`,$type:`duration`},normal:{$value:`200ms`,$type:`duration`},slow:{$value:`400ms`,$type:`duration`},ambient:{$value:`2000ms`,$type:`duration`}},easing:{default:{$value:`cubic-bezier(0.4, 0, 0.2, 1)`,$type:`cubicBezier`},bounce:{$value:`cubic-bezier(0.34, 1.56, 0.64, 1)`,$type:`cubicBezier`},spring:{$value:`cubic-bezier(0.22, 1, 0.36, 1)`,$type:`cubicBezier`}},transition:Hv,keyframes:{"accent-pulse":{$value:`0%{opacity:1}50%{opacity:0.7}100%{opacity:1}`,$type:`keyframes`},entrance:{$value:`0%{opacity:0;transform:translateY(4px)}100%{opacity:1;transform:none}`,$type:`keyframes`},shimmer:{$value:`0%{background-position:-200% 0}100%{background-position:200% 0}`,$type:`keyframes`}}}},Wv={light:{$name:`GGUI`,$description:`The default ggui theme — monochrome paper + ink, architectural, no decorative flourish.`,$metadata:{font:`Inter`,fontUrl:`https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Geist+Mono:wght@400;500;700&display=swap`,philosophy:`The interface is the artifact, not the chrome around it.`},color:{primary:{50:{$value:`#f4f3ed`,$type:`color`},100:{$value:`#ebe9e1`,$type:`color`},200:{$value:`#e4e4e2`,$type:`color`},300:{$value:`#d9d9d9`,$type:`color`},400:{$value:`#8c8c93`,$type:`color`},500:{$value:`#292929`,$type:`color`},600:{$value:`#1f1f1f`,$type:`color`},700:{$value:`#171717`,$type:`color`},800:{$value:`#0e0e0e`,$type:`color`},900:{$value:`#000000`,$type:`color`}},neutral:{50:{$value:`#f4f3ed`,$type:`color`},100:{$value:`#ebe9e1`,$type:`color`},200:{$value:`#e4e4e2`,$type:`color`},300:{$value:`#d9d9d9`,$type:`color`},400:{$value:`#8c8c93`,$type:`color`},500:{$value:`#5a5a5a`,$type:`color`},600:{$value:`#3d3d3d`,$type:`color`},700:{$value:`#292929`,$type:`color`},800:{$value:`#24242c`,$type:`color`},900:{$value:`#0e0e0e`,$type:`color`}},success:{50:{$value:`#e8f5ec`,$type:`color`},100:{$value:`#c5e6cd`,$type:`color`},200:{$value:`#8fcca0`,$type:`color`},500:{$value:`#1b7a37`,$type:`color`},600:{$value:`#15622c`,$type:`color`},700:{$value:`#0f4a21`,$type:`color`},800:{$value:`#093116`,$type:`color`}},warning:{50:{$value:`#fbf3e0`,$type:`color`},100:{$value:`#f3e1b0`,$type:`color`},200:{$value:`#e6c46e`,$type:`color`},500:{$value:`#8e680c`,$type:`color`},600:{$value:`#86620b`,$type:`color`},700:{$value:`#654a08`,$type:`color`},800:{$value:`#433105`,$type:`color`}},error:{50:{$value:`#fbe7e3`,$type:`color`},100:{$value:`#f4bbb1`,$type:`color`},200:{$value:`#ea8a7a`,$type:`color`},500:{$value:`#cc3520`,$type:`color`},600:{$value:`#ae2d1b`,$type:`color`},700:{$value:`#822214`,$type:`color`},800:{$value:`#57160d`,$type:`color`}},info:{50:{$value:`#e1e1e1`,$type:`color`},100:{$value:`#bababa`,$type:`color`},200:{$value:`#8e8e8e`,$type:`color`},500:{$value:`#3d3d3d`,$type:`color`},600:{$value:`#313131`,$type:`color`},700:{$value:`#252525`,$type:`color`},800:{$value:`#181818`,$type:`color`}},surface:{$value:`#f4f3ed`,$type:`color`},onSurface:{$value:`#292929`,$type:`color`},surfaceVariant:{$value:`#ebe9e1`,$type:`color`},onSurfaceVariant:{$value:`#5a5a5a`,$type:`color`},container:{$value:`#ebe9e1`,$type:`color`},onContainer:{$value:`#292929`,$type:`color`},outline:{$value:`#d6d4cb`,$type:`color`},outlineVariant:{$value:`#e4e4e2`,$type:`color`},onPrimary:{$value:`#f4f3ed`,$type:`color`},primaryContainer:{$value:`#ebe9e1`,$type:`color`},onPrimaryContainer:{$value:`#292929`,$type:`color`},onError:{$value:`#f4f3ed`,$type:`color`},errorContainer:{$value:`#fbe7e3`,$type:`color`},onErrorContainer:{$value:`#57160d`,$type:`color`},tertiary:{$value:`#1b7a37`,$type:`color`},onTertiary:{$value:`#f4f3ed`,$type:`color`},tertiaryContainer:{$value:`#e8f5ec`,$type:`color`},onTertiaryContainer:{$value:`#093116`,$type:`color`}},font:Uv.font,spacing:Uv.spacing,shape:Uv.shape,motion:Uv.motion,accessibility:{...Bv.light,focusRing:{...Bv.light.focusRing,color:{$type:`color`,$value:`#292929`}}},zIndex:Vv},dark:{$name:`GGUI`,$description:`The default ggui theme (dark) — ink canvas, paper text, architectural and flat.`,$metadata:{font:`Inter`,fontUrl:`https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Geist+Mono:wght@400;500;700&display=swap`,philosophy:`The interface is the artifact, not the chrome around it.`},color:{primary:{50:{$value:`#0e0e0e`,$type:`color`},100:{$value:`#1f1f1f`,$type:`color`},200:{$value:`#292929`,$type:`color`},300:{$value:`#3d3d3d`,$type:`color`},400:{$value:`#5a5a5a`,$type:`color`},500:{$value:`#f4f3ed`,$type:`color`},600:{$value:`#ebe9e1`,$type:`color`},700:{$value:`#e4e4e2`,$type:`color`},800:{$value:`#d9d9d9`,$type:`color`},900:{$value:`#ffffff`,$type:`color`}},neutral:{50:{$value:`#0e0e0e`,$type:`color`},100:{$value:`#1f1f1f`,$type:`color`},200:{$value:`#292929`,$type:`color`},300:{$value:`#3d3d3d`,$type:`color`},400:{$value:`#5a5a5a`,$type:`color`},500:{$value:`#8c8c93`,$type:`color`},600:{$value:`#d9d9d9`,$type:`color`},700:{$value:`#e4e4e2`,$type:`color`},800:{$value:`#ebe9e1`,$type:`color`},900:{$value:`#f4f3ed`,$type:`color`}},success:{50:{$value:`#0d2918`,$type:`color`},100:{$value:`#174f2a`,$type:`color`},200:{$value:`#286b3d`,$type:`color`},500:{$value:`#3da85b`,$type:`color`},600:{$value:`#6dbf83`,$type:`color`},700:{$value:`#9dd5ab`,$type:`color`},800:{$value:`#cdead3`,$type:`color`}},warning:{50:{$value:`#332608`,$type:`color`},100:{$value:`#5e4612`,$type:`color`},200:{$value:`#896720`,$type:`color`},500:{$value:`#d4a02e`,$type:`color`},600:{$value:`#dfb55c`,$type:`color`},700:{$value:`#eaca8a`,$type:`color`},800:{$value:`#f5deb8`,$type:`color`}},error:{50:{$value:`#3d130d`,$type:`color`},100:{$value:`#702419`,$type:`color`},200:{$value:`#a33828`,$type:`color`},500:{$value:`#ff5b46`,$type:`color`},600:{$value:`#ff7d6c`,$type:`color`},700:{$value:`#ff9f93`,$type:`color`},800:{$value:`#ffc2ba`,$type:`color`}},info:{50:{$value:`#363636`,$type:`color`},100:{$value:`#5a5a5a`,$type:`color`},200:{$value:`#8c8c8c`,$type:`color`},500:{$value:`#d9d9d9`,$type:`color`},600:{$value:`#e0e0e0`,$type:`color`},700:{$value:`#e8e8e8`,$type:`color`},800:{$value:`#f0f0f0`,$type:`color`}},surface:{$value:`#1f1f1f`,$type:`color`},onSurface:{$value:`#f4f3ed`,$type:`color`},surfaceVariant:{$value:`#292929`,$type:`color`},onSurfaceVariant:{$value:`#d9d9d9`,$type:`color`},container:{$value:`#292929`,$type:`color`},onContainer:{$value:`#f4f3ed`,$type:`color`},outline:{$value:`#3d3d3d`,$type:`color`},outlineVariant:{$value:`#292929`,$type:`color`},onPrimary:{$value:`#292929`,$type:`color`},primaryContainer:{$value:`#3d3d3d`,$type:`color`},onPrimaryContainer:{$value:`#f4f3ed`,$type:`color`},onError:{$value:`#3d130d`,$type:`color`},errorContainer:{$value:`#702419`,$type:`color`},onErrorContainer:{$value:`#ffc2ba`,$type:`color`},tertiary:{$value:`#3da85b`,$type:`color`},onTertiary:{$value:`#0d2918`,$type:`color`},tertiaryContainer:{$value:`#174f2a`,$type:`color`},onTertiaryContainer:{$value:`#cdead3`,$type:`color`}},font:Uv.font,spacing:Uv.spacing,shape:Uv.shape,motion:Uv.motion,accessibility:{...Bv.dark,focusRing:{...Bv.dark.focusRing,color:{$type:`color`,$value:`#f4f3ed`}}},zIndex:Vv}},Gv={font:{family:{sans:{$value:`"Orbitron", "Rajdhani", system-ui, sans-serif`,$type:`fontFamily`},mono:{$value:`"Share Tech Mono", "Fira Code", monospace`,$type:`fontFamily`}},size:{sm:{$value:`0.8rem`,$type:`dimension`},base:{$value:`0.95rem`,$type:`dimension`},lg:{$value:`1.1rem`,$type:`dimension`},xl:{$value:`1.3rem`,$type:`dimension`},"2xl":{$value:`1.6rem`,$type:`dimension`}},weight:{normal:{$value:`400`,$type:`fontWeight`},medium:{$value:`500`,$type:`fontWeight`},semibold:{$value:`600`,$type:`fontWeight`},bold:{$value:`700`,$type:`fontWeight`}},lineHeight:{tight:{$value:`1.2`,$type:`number`},normal:{$value:`1.5`,$type:`number`},relaxed:{$value:`1.7`,$type:`number`}}},spacing:{1:{$value:`0.25rem`,$type:`dimension`},2:{$value:`0.5rem`,$type:`dimension`},3:{$value:`0.75rem`,$type:`dimension`},4:{$value:`1rem`,$type:`dimension`},5:{$value:`1.25rem`,$type:`dimension`},6:{$value:`1.5rem`,$type:`dimension`},8:{$value:`2rem`,$type:`dimension`},10:{$value:`2.5rem`,$type:`dimension`},12:{$value:`3rem`,$type:`dimension`}},shape:{radius:{sm:{$value:`2px`,$type:`dimension`},md:{$value:`4px`,$type:`dimension`},lg:{$value:`6px`,$type:`dimension`},xl:{$value:`8px`,$type:`dimension`},full:{$value:`9999px`,$type:`dimension`}},shadow:{sm:{$value:`0 0 4px rgba(6, 182, 212, 0.3)`,$type:`shadow`},md:{$value:`0 0 8px rgba(6, 182, 212, 0.4)`,$type:`shadow`},lg:{$value:`0 0 16px rgba(6, 182, 212, 0.5)`,$type:`shadow`},xl:{$value:`0 0 24px rgba(6, 182, 212, 0.6), 0 0 48px rgba(6, 182, 212, 0.2)`,$type:`shadow`}}},motion:{duration:{fast:{$value:`100ms`,$type:`duration`},normal:{$value:`200ms`,$type:`duration`},slow:{$value:`600ms`,$type:`duration`},ambient:{$value:`2000ms`,$type:`duration`}},easing:{default:{$value:`cubic-bezier(0.4, 0, 0.2, 1)`,$type:`cubicBezier`},bounce:{$value:`cubic-bezier(0.68, -0.55, 0.27, 1.55)`,$type:`cubicBezier`},spring:{$value:`cubic-bezier(0.22, 1, 0.36, 1)`,$type:`cubicBezier`}},keyframes:{"glitch-flicker":{$value:`0%{opacity:1;transform:none}7%{opacity:0.8;transform:translateX(-2px) skewX(-1deg)}10%{opacity:1;transform:none}47%{opacity:1;transform:none}50%{opacity:0.6;transform:translateX(3px) skewX(2deg)}53%{opacity:1;transform:none}100%{opacity:1;transform:none}`,$type:`keyframes`},"scan-line":{$value:`0%{transform:translateY(-100%)}100%{transform:translateY(100%)}`,$type:`keyframes`},"neon-pulse":{$value:`0%{box-shadow:0 0 4px rgba(6,182,212,0.4)}50%{box-shadow:0 0 16px rgba(6,182,212,0.8)}100%{box-shadow:0 0 4px rgba(6,182,212,0.4)}`,$type:`keyframes`}},transition:{fast:{$type:`transition`,$value:`100ms cubic-bezier(0.4, 0, 0.2, 1)`},normal:{$type:`transition`,$value:`200ms cubic-bezier(0.4, 0, 0.2, 1)`},slow:{$type:`transition`,$value:`600ms cubic-bezier(0.4, 0, 0.2, 1)`},colors:{$type:`transition`,$value:`color 200ms cubic-bezier(0.4, 0, 0.2, 1), background-color 200ms cubic-bezier(0.4, 0, 0.2, 1), border-color 200ms cubic-bezier(0.4, 0, 0.2, 1)`},opacity:{$type:`transition`,$value:`opacity 200ms cubic-bezier(0.4, 0, 0.2, 1)`},transform:{$type:`transition`,$value:`transform 200ms cubic-bezier(0, 0, 0.2, 1)`}}}},Kv={light:{$name:`Cyberpunk`,$description:`Neon-lit dystopian tech — cyan neon on dark chrome with glitch animations.`,$metadata:{font:`Orbitron`,fontUrl:`https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700&display=swap`,philosophy:`Chromatic noise, electric tension, digital rebellion.`},color:{primary:{50:{$value:`#ecfeff`,$type:`color`},100:{$value:`#cffafe`,$type:`color`},200:{$value:`#a5f3fc`,$type:`color`},300:{$value:`#67e8f9`,$type:`color`},400:{$value:`#22d3ee`,$type:`color`},500:{$value:`#06b6d4`,$type:`color`},600:{$value:`#0891b2`,$type:`color`},700:{$value:`#1085a5`,$type:`color`},800:{$value:`#155e75`,$type:`color`},900:{$value:`#164e63`,$type:`color`}},neutral:{50:{$value:`#0a0a0f`,$type:`color`},100:{$value:`#111118`,$type:`color`},200:{$value:`#1a1a24`,$type:`color`},300:{$value:`#25252f`,$type:`color`},400:{$value:`#3a3a48`,$type:`color`},500:{$value:`#5d5d74`,$type:`color`},600:{$value:`#8888a0`,$type:`color`},700:{$value:`#aaaabe`,$type:`color`},800:{$value:`#d0d0e0`,$type:`color`},900:{$value:`#e8e8f0`,$type:`color`}},success:{50:{$value:`#e0fff1`,$type:`color`},100:{$value:`#b3ffd9`,$type:`color`},200:{$value:`#66ffb3`,$type:`color`},500:{$value:`#00ff88`,$type:`color`},600:{$value:`#00cc6e`,$type:`color`},700:{$value:`#009955`,$type:`color`},800:{$value:`#006638`,$type:`color`}},warning:{50:{$value:`#fff5e0`,$type:`color`},100:{$value:`#ffe5b3`,$type:`color`},200:{$value:`#ffcc66`,$type:`color`},500:{$value:`#ffaa00`,$type:`color`},600:{$value:`#cc8800`,$type:`color`},700:{$value:`#996600`,$type:`color`},800:{$value:`#664400`,$type:`color`}},error:{50:{$value:`#ffe0e8`,$type:`color`},100:{$value:`#ffb3c4`,$type:`color`},200:{$value:`#ff6688`,$type:`color`},500:{$value:`#ff2255`,$type:`color`},600:{$value:`#cc1a44`,$type:`color`},700:{$value:`#991333`,$type:`color`},800:{$value:`#660d22`,$type:`color`}},info:{50:{$value:`#e0f9ff`,$type:`color`},100:{$value:`#b3edff`,$type:`color`},200:{$value:`#66dbff`,$type:`color`},500:{$value:`#00ccff`,$type:`color`},600:{$value:`#00a3cc`,$type:`color`},700:{$value:`#007a99`,$type:`color`},800:{$value:`#005266`,$type:`color`}},surface:{$value:`#0a0a0f`,$type:`color`},onSurface:{$value:`#e8e8f0`,$type:`color`},surfaceVariant:{$value:`#111118`,$type:`color`},onSurfaceVariant:{$value:`#8888a0`,$type:`color`},container:{$value:`#155e75`,$type:`color`},onContainer:{$value:`#cffafe`,$type:`color`},outline:{$value:`#3a3a48`,$type:`color`},outlineVariant:{$value:`#25252f`,$type:`color`},onPrimary:{$value:`#0a0a0f`,$type:`color`},primaryContainer:{$value:`#155e75`,$type:`color`},onPrimaryContainer:{$value:`#cffafe`,$type:`color`},onError:{$value:`#0a0a0f`,$type:`color`},errorContainer:{$value:`#660d22`,$type:`color`},onErrorContainer:{$value:`#ffe0e8`,$type:`color`},tertiary:{$value:`#00ff88`,$type:`color`},onTertiary:{$value:`#0a0a0f`,$type:`color`},tertiaryContainer:{$value:`#006638`,$type:`color`},onTertiaryContainer:{$value:`#e0fff1`,$type:`color`}},font:Gv.font,spacing:Gv.spacing,shape:Gv.shape,motion:Gv.motion,accessibility:{...Bv.light,focusRing:{...Bv.light.focusRing,color:{$type:`color`,$value:`#06b6d4`}}},zIndex:Vv},dark:{$name:`Cyberpunk`,$description:`Neon-lit dystopian tech (dark) — brighter cyan on pure-black chrome, cranked neon contrast.`,$metadata:{font:`Orbitron`,fontUrl:`https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700&display=swap`,philosophy:`Chromatic noise, electric tension, digital rebellion.`},color:{primary:{50:{$value:`#164e63`,$type:`color`},100:{$value:`#155e75`,$type:`color`},200:{$value:`#0e7490`,$type:`color`},300:{$value:`#0891b2`,$type:`color`},400:{$value:`#06b6d4`,$type:`color`},500:{$value:`#22d3ee`,$type:`color`},600:{$value:`#67e8f9`,$type:`color`},700:{$value:`#a5f3fc`,$type:`color`},800:{$value:`#cffafe`,$type:`color`},900:{$value:`#ecfeff`,$type:`color`}},neutral:{50:{$value:`#000005`,$type:`color`},100:{$value:`#0a0a0f`,$type:`color`},200:{$value:`#111118`,$type:`color`},300:{$value:`#1a1a24`,$type:`color`},400:{$value:`#3a3a48`,$type:`color`},500:{$value:`#5a5a70`,$type:`color`},600:{$value:`#8888a0`,$type:`color`},700:{$value:`#aaaabe`,$type:`color`},800:{$value:`#d0d0e0`,$type:`color`},900:{$value:`#e8e8f0`,$type:`color`}},success:{50:{$value:`#003319`,$type:`color`},100:{$value:`#006633`,$type:`color`},200:{$value:`#00994d`,$type:`color`},500:{$value:`#33ffaa`,$type:`color`},600:{$value:`#66ffbf`,$type:`color`},700:{$value:`#99ffd4`,$type:`color`},800:{$value:`#ccffea`,$type:`color`}},warning:{50:{$value:`#332200`,$type:`color`},100:{$value:`#664400`,$type:`color`},200:{$value:`#996600`,$type:`color`},500:{$value:`#ffbe33`,$type:`color`},600:{$value:`#ffcb5c`,$type:`color`},700:{$value:`#ffd985`,$type:`color`},800:{$value:`#ffe7ad`,$type:`color`}},error:{50:{$value:`#330a17`,$type:`color`},100:{$value:`#66142e`,$type:`color`},200:{$value:`#991e45`,$type:`color`},500:{$value:`#ff4477`,$type:`color`},600:{$value:`#ff6e94`,$type:`color`},700:{$value:`#ff97b1`,$type:`color`},800:{$value:`#ffc1cf`,$type:`color`}},info:{50:{$value:`#002b33`,$type:`color`},100:{$value:`#005566`,$type:`color`},200:{$value:`#008099`,$type:`color`},500:{$value:`#33d6ff`,$type:`color`},600:{$value:`#5cdeff`,$type:`color`},700:{$value:`#85e6ff`,$type:`color`},800:{$value:`#adeeff`,$type:`color`}},surface:{$value:`#000005`,$type:`color`},onSurface:{$value:`#e8e8f0`,$type:`color`},surfaceVariant:{$value:`#0a0a0f`,$type:`color`},onSurfaceVariant:{$value:`#aaaabe`,$type:`color`},container:{$value:`#0e7490`,$type:`color`},onContainer:{$value:`#cffafe`,$type:`color`},outline:{$value:`#1a1a24`,$type:`color`},outlineVariant:{$value:`#111118`,$type:`color`},onPrimary:{$value:`#000005`,$type:`color`},primaryContainer:{$value:`#0e7490`,$type:`color`},onPrimaryContainer:{$value:`#cffafe`,$type:`color`},onError:{$value:`#000005`,$type:`color`},errorContainer:{$value:`#991e45`,$type:`color`},onErrorContainer:{$value:`#ffc1cf`,$type:`color`},tertiary:{$value:`#33ffaa`,$type:`color`},onTertiary:{$value:`#000005`,$type:`color`},tertiaryContainer:{$value:`#006633`,$type:`color`},onTertiaryContainer:{$value:`#ccffea`,$type:`color`}},font:Gv.font,spacing:Gv.spacing,shape:Gv.shape,motion:Gv.motion,accessibility:{...Bv.dark,focusRing:{...Bv.dark.focusRing,color:{$type:`color`,$value:`#22d3ee`}}},zIndex:Vv}},qv={font:{family:{sans:{$value:`"Noto Serif JP", "Georgia", serif`,$type:`fontFamily`},mono:{$value:`"Noto Sans Mono", "Courier New", monospace`,$type:`fontFamily`}},size:{sm:{$value:`0.875rem`,$type:`dimension`},base:{$value:`1rem`,$type:`dimension`},lg:{$value:`1.125rem`,$type:`dimension`},xl:{$value:`1.3rem`,$type:`dimension`},"2xl":{$value:`1.6rem`,$type:`dimension`}},weight:{normal:{$value:`400`,$type:`fontWeight`},medium:{$value:`500`,$type:`fontWeight`},semibold:{$value:`600`,$type:`fontWeight`},bold:{$value:`700`,$type:`fontWeight`}},lineHeight:{tight:{$value:`1.3`,$type:`number`},normal:{$value:`1.6`,$type:`number`},relaxed:{$value:`1.9`,$type:`number`}}},spacing:{1:{$value:`0.25rem`,$type:`dimension`},2:{$value:`0.5rem`,$type:`dimension`},3:{$value:`0.75rem`,$type:`dimension`},4:{$value:`1rem`,$type:`dimension`},5:{$value:`1.25rem`,$type:`dimension`},6:{$value:`1.5rem`,$type:`dimension`},8:{$value:`2rem`,$type:`dimension`},10:{$value:`2.5rem`,$type:`dimension`},12:{$value:`3rem`,$type:`dimension`}},shape:{radius:{sm:{$value:`0.125rem`,$type:`dimension`},md:{$value:`0.25rem`,$type:`dimension`},lg:{$value:`0.5rem`,$type:`dimension`},xl:{$value:`0.75rem`,$type:`dimension`},full:{$value:`9999px`,$type:`dimension`}},shadow:{sm:{$value:`0 1px 3px rgba(42, 39, 36, 0.06)`,$type:`shadow`},md:{$value:`0 3px 8px rgba(42, 39, 36, 0.08)`,$type:`shadow`},lg:{$value:`0 8px 20px rgba(42, 39, 36, 0.10)`,$type:`shadow`},xl:{$value:`0 16px 40px rgba(42, 39, 36, 0.12)`,$type:`shadow`}}},motion:{duration:{fast:{$value:`200ms`,$type:`duration`},normal:{$value:`500ms`,$type:`duration`},slow:{$value:`1500ms`,$type:`duration`},ambient:{$value:`6000ms`,$type:`duration`}},easing:{default:{$value:`cubic-bezier(0.33, 0, 0.67, 1)`,$type:`cubicBezier`},bounce:{$value:`cubic-bezier(0.34, 1.2, 0.64, 1)`,$type:`cubicBezier`},spring:{$value:`cubic-bezier(0.22, 1, 0.36, 1)`,$type:`cubicBezier`}},keyframes:{"slow-breathe":{$value:`0%{opacity:0.85}50%{opacity:1}100%{opacity:0.85}`,$type:`keyframes`},"gentle-fade":{$value:`0%{opacity:0}100%{opacity:1}`,$type:`keyframes`},"ink-ripple":{$value:`0%{transform:scale(0.95);opacity:0.5}50%{transform:scale(1);opacity:0.8}100%{transform:scale(0.95);opacity:0.5}`,$type:`keyframes`}},transition:{fast:{$type:`transition`,$value:`200ms cubic-bezier(0.33, 0, 0.67, 1)`},normal:{$type:`transition`,$value:`500ms cubic-bezier(0.33, 0, 0.67, 1)`},slow:{$type:`transition`,$value:`1500ms cubic-bezier(0.33, 0, 0.67, 1)`},colors:{$type:`transition`,$value:`color 500ms cubic-bezier(0.33, 0, 0.67, 1), background-color 500ms cubic-bezier(0.33, 0, 0.67, 1), border-color 500ms cubic-bezier(0.33, 0, 0.67, 1)`},opacity:{$type:`transition`,$value:`opacity 500ms cubic-bezier(0.33, 0, 0.67, 1)`},transform:{$type:`transition`,$value:`transform 500ms cubic-bezier(0.22, 1, 0.36, 1)`}}}},Jv={light:{$name:`Zen`,$description:`Minimalist Japanese aesthetic — warm stone tones, deliberate space, and unhurried motion.`,$metadata:{font:`Noto Serif JP`,fontUrl:`https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@400;500;600;700&display=swap`,philosophy:`Beauty in imperfection. Stillness as presence.`},color:{primary:{50:{$value:`#f6f7f4`,$type:`color`},100:{$value:`#e8ebe2`,$type:`color`},200:{$value:`#d1d7c5`,$type:`color`},300:{$value:`#b3bda1`,$type:`color`},400:{$value:`#93a17c`,$type:`color`},500:{$value:`#748660`,$type:`color`},600:{$value:`#5c6b4c`,$type:`color`},700:{$value:`#48543d`,$type:`color`},800:{$value:`#3b4434`,$type:`color`},900:{$value:`#33392e`,$type:`color`}},neutral:{50:{$value:`#faf9f7`,$type:`color`},100:{$value:`#f3f1ed`,$type:`color`},200:{$value:`#e7e4de`,$type:`color`},300:{$value:`#d5d0c8`,$type:`color`},400:{$value:`#b8b0a4`,$type:`color`},500:{$value:`#988d81`,$type:`color`},600:{$value:`#7a7068`,$type:`color`},700:{$value:`#5e5650`,$type:`color`},800:{$value:`#3e3a36`,$type:`color`},900:{$value:`#2a2724`,$type:`color`}},success:{50:{$type:`color`,$value:`#f0f4ee`},100:{$type:`color`,$value:`#dde6d8`},200:{$type:`color`,$value:`#c6d4be`},500:{$type:`color`,$value:`#5b7950`},600:{$type:`color`,$value:`#58754d`},700:{$type:`color`,$value:`#43583a`},800:{$type:`color`,$value:`#2f3e29`}},warning:{50:{$type:`color`,$value:`#faf6ea`},100:{$type:`color`,$value:`#f4ebcb`},200:{$type:`color`,$value:`#ecdda4`},500:{$type:`color`,$value:`#886f29`},600:{$type:`color`,$value:`#a88a3a`},700:{$type:`color`,$value:`#7e672c`},800:{$type:`color`,$value:`#59481f`}},error:{50:{$type:`color`,$value:`#f8edec`},100:{$type:`color`,$value:`#efd0ce`},200:{$type:`color`,$value:`#e3aba8`},500:{$type:`color`,$value:`#b85450`},600:{$type:`color`,$value:`#9a4340`},700:{$type:`color`,$value:`#743330`},800:{$type:`color`,$value:`#522423`}},info:{50:{$type:`color`,$value:`#eef3f5`},100:{$type:`color`,$value:`#d7e2e7`},200:{$type:`color`,$value:`#b9cdd5`},500:{$type:`color`,$value:`#6a8fa0`},600:{$type:`color`,$value:`#557585`},700:{$type:`color`,$value:`#405864`},800:{$type:`color`,$value:`#2c3d46`}},surface:{$value:`#faf9f7`,$type:`color`},onSurface:{$value:`#2a2724`,$type:`color`},surfaceVariant:{$value:`#f3f1ed`,$type:`color`},onSurfaceVariant:{$value:`#6b635b`,$type:`color`},container:{$value:`#e8ebe2`,$type:`color`},onContainer:{$value:`#33392e`,$type:`color`},outline:{$value:`#d5d0c8`,$type:`color`},outlineVariant:{$value:`#e7e4de`,$type:`color`},onPrimary:{$value:`#faf9f7`,$type:`color`},primaryContainer:{$value:`#e8ebe2`,$type:`color`},onPrimaryContainer:{$value:`#33392e`,$type:`color`},onError:{$value:`#faf9f7`,$type:`color`},errorContainer:{$value:`#f8edec`,$type:`color`},onErrorContainer:{$value:`#522423`,$type:`color`},tertiary:{$value:`#7d5e6e`,$type:`color`},onTertiary:{$value:`#faf9f7`,$type:`color`},tertiaryContainer:{$value:`#ebe2e6`,$type:`color`},onTertiaryContainer:{$value:`#3a2a32`,$type:`color`}},font:qv.font,spacing:qv.spacing,shape:qv.shape,motion:qv.motion,accessibility:{...Bv.light,focusRing:{...Bv.light.focusRing,color:{$type:`color`,$value:`#748660`}}},zIndex:Vv},dark:{$name:`Zen`,$description:`Minimalist Japanese aesthetic (dark) — dusk stone surfaces with restrained moss accents and unhurried motion.`,$metadata:{font:`Noto Serif JP`,fontUrl:`https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@400;500;600;700&display=swap`,philosophy:`Beauty in imperfection. Stillness as presence.`},color:{primary:{50:{$value:`#33392e`,$type:`color`},100:{$value:`#3b4434`,$type:`color`},200:{$value:`#48543d`,$type:`color`},300:{$value:`#5c6b4c`,$type:`color`},400:{$value:`#748660`,$type:`color`},500:{$value:`#93a17c`,$type:`color`},600:{$value:`#b3bda1`,$type:`color`},700:{$value:`#d1d7c5`,$type:`color`},800:{$value:`#e8ebe2`,$type:`color`},900:{$value:`#f6f7f4`,$type:`color`}},neutral:{50:{$value:`#1a1816`,$type:`color`},100:{$value:`#2a2724`,$type:`color`},200:{$value:`#3e3a36`,$type:`color`},300:{$value:`#5e5650`,$type:`color`},400:{$value:`#7a7068`,$type:`color`},500:{$value:`#9a9084`,$type:`color`},600:{$value:`#b8b0a4`,$type:`color`},700:{$value:`#d5d0c8`,$type:`color`},800:{$value:`#e7e4de`,$type:`color`},900:{$value:`#faf9f7`,$type:`color`}},success:{50:{$type:`color`,$value:`#f1f6ee`},100:{$type:`color`,$value:`#dceacc`},200:{$type:`color`,$value:`#c4dab1`},500:{$type:`color`,$value:`#8aab7a`},600:{$type:`color`,$value:`#6f8d62`},700:{$type:`color`,$value:`#546b4a`},800:{$type:`color`,$value:`#3a4b34`}},warning:{50:{$type:`color`,$value:`#fbf6e9`},100:{$type:`color`,$value:`#f4e9c1`},200:{$type:`color`,$value:`#ecdda4`},500:{$type:`color`,$value:`#d8b96a`},600:{$type:`color`,$value:`#b09553`},700:{$type:`color`,$value:`#84703d`},800:{$type:`color`,$value:`#5a4c2a`}},error:{50:{$type:`color`,$value:`#faeae9`},100:{$type:`color`,$value:`#f1cac8`},200:{$type:`color`,$value:`#e4a5a1`},500:{$type:`color`,$value:`#d17570`},600:{$type:`color`,$value:`#a85753`},700:{$type:`color`,$value:`#7d403c`},800:{$type:`color`,$value:`#552a27`}},info:{50:{$type:`color`,$value:`#f0f4f6`},100:{$type:`color`,$value:`#d7e0e5`},200:{$type:`color`,$value:`#bccbd2`},500:{$type:`color`,$value:`#8eaab8`},600:{$type:`color`,$value:`#708995`},700:{$type:`color`,$value:`#546771`},800:{$type:`color`,$value:`#38454d`}},surface:{$value:`#2a2724`,$type:`color`},onSurface:{$value:`#f3f1ed`,$type:`color`},surfaceVariant:{$value:`#3e3a36`,$type:`color`},onSurfaceVariant:{$value:`#b8b0a4`,$type:`color`},container:{$value:`#48543d`,$type:`color`},onContainer:{$value:`#e8ebe2`,$type:`color`},outline:{$value:`#5e5650`,$type:`color`},outlineVariant:{$value:`#3e3a36`,$type:`color`},onPrimary:{$value:`#1a1816`,$type:`color`},primaryContainer:{$value:`#3b4434`,$type:`color`},onPrimaryContainer:{$value:`#e8ebe2`,$type:`color`},onError:{$value:`#1a1816`,$type:`color`},errorContainer:{$value:`#552a27`,$type:`color`},onErrorContainer:{$value:`#f1cac8`,$type:`color`},tertiary:{$value:`#a98899`,$type:`color`},onTertiary:{$value:`#1a1816`,$type:`color`},tertiaryContainer:{$value:`#4e3a44`,$type:`color`},onTertiaryContainer:{$value:`#ebe2e6`,$type:`color`}},font:qv.font,spacing:qv.spacing,shape:qv.shape,motion:qv.motion,accessibility:{...Bv.dark,focusRing:{...Bv.dark.focusRing,color:{$type:`color`,$value:`#93a17c`}}},zIndex:Vv}},Yv={font:{family:{sans:{$value:`"Outfit", system-ui, -apple-system, sans-serif`,$type:`fontFamily`},mono:{$value:`"Fira Code", "JetBrains Mono", monospace`,$type:`fontFamily`}},size:{sm:{$value:`0.875rem`,$type:`dimension`},base:{$value:`1rem`,$type:`dimension`},lg:{$value:`1.125rem`,$type:`dimension`},xl:{$value:`1.25rem`,$type:`dimension`},"2xl":{$value:`1.5rem`,$type:`dimension`}},weight:{normal:{$value:`400`,$type:`fontWeight`},medium:{$value:`500`,$type:`fontWeight`},semibold:{$value:`600`,$type:`fontWeight`},bold:{$value:`700`,$type:`fontWeight`}},lineHeight:{tight:{$value:`1.25`,$type:`number`},normal:{$value:`1.5`,$type:`number`},relaxed:{$value:`1.75`,$type:`number`}}},spacing:{1:{$value:`0.25rem`,$type:`dimension`},2:{$value:`0.5rem`,$type:`dimension`},3:{$value:`0.75rem`,$type:`dimension`},4:{$value:`1rem`,$type:`dimension`},5:{$value:`1.25rem`,$type:`dimension`},6:{$value:`1.5rem`,$type:`dimension`},8:{$value:`2rem`,$type:`dimension`},10:{$value:`2.5rem`,$type:`dimension`},12:{$value:`3rem`,$type:`dimension`}},shape:{radius:{sm:{$value:`0.25rem`,$type:`dimension`},md:{$value:`0.5rem`,$type:`dimension`},lg:{$value:`0.75rem`,$type:`dimension`},xl:{$value:`1rem`,$type:`dimension`},full:{$value:`9999px`,$type:`dimension`}},shadow:{sm:{$value:`0 0 6px rgba(236, 72, 153, 0.25)`,$type:`shadow`},md:{$value:`0 0 12px rgba(236, 72, 153, 0.35)`,$type:`shadow`},lg:{$value:`0 0 20px rgba(236, 72, 153, 0.45)`,$type:`shadow`},xl:{$value:`0 0 30px rgba(236, 72, 153, 0.55), 0 0 60px rgba(236, 72, 153, 0.2)`,$type:`shadow`}}},motion:{duration:{fast:{$value:`120ms`,$type:`duration`},normal:{$value:`250ms`,$type:`duration`},slow:{$value:`800ms`,$type:`duration`},ambient:{$value:`2500ms`,$type:`duration`}},easing:{default:{$value:`cubic-bezier(0.4, 0, 0.2, 1)`,$type:`cubicBezier`},bounce:{$value:`cubic-bezier(0.68, -0.55, 0.27, 1.55)`,$type:`cubicBezier`},spring:{$value:`cubic-bezier(0.22, 1, 0.36, 1)`,$type:`cubicBezier`}},transition:{fast:{$value:`120ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},normal:{$value:`250ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},slow:{$value:`800ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},colors:{$value:`color 250ms cubic-bezier(0.4, 0, 0.2, 1), background-color 250ms cubic-bezier(0.4, 0, 0.2, 1), border-color 250ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},opacity:{$value:`opacity 250ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},transform:{$value:`transform 250ms cubic-bezier(0.22, 1, 0.36, 1)`,$type:`transition`}},keyframes:{"neon-flicker":{$value:`0%{opacity:1}4%{opacity:0.7}8%{opacity:1}12%{opacity:0.85}16%{opacity:1}100%{opacity:1}`,$type:`keyframes`},"glow-pulse":{$value:`0%{box-shadow:0 0 8px rgba(236,72,153,0.4)}50%{box-shadow:0 0 24px rgba(236,72,153,0.8)}100%{box-shadow:0 0 8px rgba(236,72,153,0.4)}`,$type:`keyframes`},"electric-arc":{$value:`0%{clip-path:inset(0 100% 0 0)}50%{clip-path:inset(0 0 0 0)}100%{clip-path:inset(0 0 0 100%)}`,$type:`keyframes`}}}},Xv={light:{$name:`Neon Noir`,$description:`Hot pink neon on dark — electric glow effects, neon flicker, and flowing magenta particles.`,$metadata:{font:`Outfit`,fontUrl:`https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&display=swap`,philosophy:`Midnight electricity. The city never sleeps.`},color:{primary:{50:{$value:`#fdf2f8`,$type:`color`},100:{$value:`#fce7f3`,$type:`color`},200:{$value:`#fbcfe8`,$type:`color`},300:{$value:`#f9a8d4`,$type:`color`},400:{$value:`#f472b6`,$type:`color`},500:{$value:`#ec4899`,$type:`color`},600:{$value:`#db2777`,$type:`color`},700:{$value:`#e42574`,$type:`color`},800:{$value:`#9d174d`,$type:`color`},900:{$value:`#831843`,$type:`color`}},neutral:{50:{$value:`#09090b`,$type:`color`},100:{$value:`#111114`,$type:`color`},200:{$value:`#19191e`,$type:`color`},300:{$value:`#232329`,$type:`color`},400:{$value:`#3b3b44`,$type:`color`},500:{$value:`#5e5e6c`,$type:`color`},600:{$value:`#8a8a9a`,$type:`color`},700:{$value:`#b0b0be`,$type:`color`},800:{$value:`#d4d4de`,$type:`color`},900:{$value:`#ececf0`,$type:`color`}},success:{...zv.dark.success,500:{$value:`#34d399`,$type:`color`}},warning:{...zv.dark.warning,500:{$value:`#fbbf24`,$type:`color`}},error:{...zv.dark.error,500:{$value:`#f87171`,$type:`color`}},info:{...zv.dark.info,500:{$value:`#38bdf8`,$type:`color`}},surface:{$value:`#09090b`,$type:`color`},onSurface:{$value:`#ececf0`,$type:`color`},surfaceVariant:{$value:`#111114`,$type:`color`},onSurfaceVariant:{$value:`#8a8a9a`,$type:`color`},container:{$value:`#9d174d`,$type:`color`},onContainer:{$value:`#fce7f3`,$type:`color`},outline:{$value:`#3b3b44`,$type:`color`},outlineVariant:{$value:`#232329`,$type:`color`},onPrimary:{$value:`#ffffff`,$type:`color`},primaryContainer:{$value:`#9d174d`,$type:`color`},onPrimaryContainer:{$value:`#fce7f3`,$type:`color`},onError:{$value:`#09090b`,$type:`color`},errorContainer:{$value:`#7f1d1d`,$type:`color`},onErrorContainer:{$value:`#fecaca`,$type:`color`},tertiary:{$value:`#a855f7`,$type:`color`},onTertiary:{$value:`#09090b`,$type:`color`},tertiaryContainer:{$value:`#6b21a8`,$type:`color`},onTertiaryContainer:{$value:`#f3e8ff`,$type:`color`}},font:Yv.font,spacing:Yv.spacing,shape:Yv.shape,motion:Yv.motion,accessibility:{...Bv.dark,focusRing:{...Bv.dark.focusRing,color:{$value:`#ec4899`,$type:`color`}}},zIndex:Vv},dark:{$name:`Neon Noir`,$description:`Hot pink neon on pure black (dark) — sharper noir contrast, brighter electric glow, deeper magenta containers.`,$metadata:{font:`Outfit`,fontUrl:`https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&display=swap`,philosophy:`Midnight electricity. The city never sleeps.`},color:{primary:{50:{$value:`#831843`,$type:`color`},100:{$value:`#9d174d`,$type:`color`},200:{$value:`#be185d`,$type:`color`},300:{$value:`#db2777`,$type:`color`},400:{$value:`#ec4899`,$type:`color`},500:{$value:`#f472b6`,$type:`color`},600:{$value:`#f9a8d4`,$type:`color`},700:{$value:`#fbcfe8`,$type:`color`},800:{$value:`#fce7f3`,$type:`color`},900:{$value:`#fdf2f8`,$type:`color`}},neutral:{50:{$value:`#000000`,$type:`color`},100:{$value:`#09090b`,$type:`color`},200:{$value:`#111114`,$type:`color`},300:{$value:`#19191e`,$type:`color`},400:{$value:`#3b3b44`,$type:`color`},500:{$value:`#5a5a68`,$type:`color`},600:{$value:`#8a8a9a`,$type:`color`},700:{$value:`#b0b0be`,$type:`color`},800:{$value:`#d4d4de`,$type:`color`},900:{$value:`#ececf0`,$type:`color`}},success:{...zv.dark.success,500:{$value:`#5ee0ad`,$type:`color`}},warning:{...zv.dark.warning,500:{$value:`#ffd24a`,$type:`color`}},error:{...zv.dark.error,500:{$value:`#ff8a8a`,$type:`color`}},info:{...zv.dark.info,500:{$value:`#5acdff`,$type:`color`}},surface:{$value:`#000000`,$type:`color`},onSurface:{$value:`#ececf0`,$type:`color`},surfaceVariant:{$value:`#09090b`,$type:`color`},onSurfaceVariant:{$value:`#b0b0be`,$type:`color`},container:{$value:`#be185d`,$type:`color`},onContainer:{$value:`#fce7f3`,$type:`color`},outline:{$value:`#19191e`,$type:`color`},outlineVariant:{$value:`#111114`,$type:`color`},onPrimary:{$value:`#000000`,$type:`color`},primaryContainer:{$value:`#be185d`,$type:`color`},onPrimaryContainer:{$value:`#fce7f3`,$type:`color`},onError:{$value:`#000000`,$type:`color`},errorContainer:{$value:`#7f1d1d`,$type:`color`},onErrorContainer:{$value:`#fecdd3`,$type:`color`},tertiary:{$value:`#c084fc`,$type:`color`},onTertiary:{$value:`#000000`,$type:`color`},tertiaryContainer:{$value:`#581c87`,$type:`color`},onTertiaryContainer:{$value:`#f3e8ff`,$type:`color`}},font:Yv.font,spacing:Yv.spacing,shape:Yv.shape,motion:Yv.motion,accessibility:{...Bv.dark,focusRing:{...Bv.dark.focusRing,color:{$value:`#f472b6`,$type:`color`}}},zIndex:Vv}},Zv={font:{family:{sans:{$value:`"Lora", "Georgia", serif`,$type:`fontFamily`},mono:{$value:`"IBM Plex Mono", "Courier New", monospace`,$type:`fontFamily`}},size:{sm:{$value:`0.875rem`,$type:`dimension`},base:{$value:`1rem`,$type:`dimension`},lg:{$value:`1.15rem`,$type:`dimension`},xl:{$value:`1.3rem`,$type:`dimension`},"2xl":{$value:`1.625rem`,$type:`dimension`}},weight:{normal:{$value:`400`,$type:`fontWeight`},medium:{$value:`500`,$type:`fontWeight`},semibold:{$value:`600`,$type:`fontWeight`},bold:{$value:`700`,$type:`fontWeight`}},lineHeight:{tight:{$value:`1.3`,$type:`number`},normal:{$value:`1.6`,$type:`number`},relaxed:{$value:`1.85`,$type:`number`}}},spacing:{1:{$value:`0.25rem`,$type:`dimension`},2:{$value:`0.5rem`,$type:`dimension`},3:{$value:`0.75rem`,$type:`dimension`},4:{$value:`1rem`,$type:`dimension`},5:{$value:`1.25rem`,$type:`dimension`},6:{$value:`1.5rem`,$type:`dimension`},8:{$value:`2rem`,$type:`dimension`},10:{$value:`2.5rem`,$type:`dimension`},12:{$value:`3rem`,$type:`dimension`}},shape:{radius:{sm:{$value:`0.375rem`,$type:`dimension`},md:{$value:`0.625rem`,$type:`dimension`},lg:{$value:`1rem`,$type:`dimension`},xl:{$value:`1.5rem`,$type:`dimension`},full:{$value:`9999px`,$type:`dimension`}},shadow:{sm:{$value:`0 1px 3px rgba(53, 46, 32, 0.08)`,$type:`shadow`},md:{$value:`0 4px 8px rgba(53, 46, 32, 0.10)`,$type:`shadow`},lg:{$value:`0 8px 20px rgba(53, 46, 32, 0.12)`,$type:`shadow`},xl:{$value:`0 16px 40px rgba(53, 46, 32, 0.14)`,$type:`shadow`}}},motion:{duration:{fast:{$value:`200ms`,$type:`duration`},normal:{$value:`400ms`,$type:`duration`},slow:{$value:`1200ms`,$type:`duration`},ambient:{$value:`5000ms`,$type:`duration`}},easing:{default:{$value:`cubic-bezier(0.4, 0, 0.2, 1)`,$type:`cubicBezier`},bounce:{$value:`cubic-bezier(0.34, 1.3, 0.64, 1)`,$type:`cubicBezier`},spring:{$value:`cubic-bezier(0.22, 1, 0.36, 1)`,$type:`cubicBezier`}},keyframes:{"leaf-float":{$value:`0%{transform:translateY(0) rotate(0deg);opacity:0.7}25%{transform:translateY(-6px) rotate(3deg)}50%{transform:translateY(-2px) rotate(-2deg);opacity:1}75%{transform:translateY(-8px) rotate(2deg)}100%{transform:translateY(0) rotate(0deg);opacity:0.7}`,$type:`keyframes`},"vine-grow":{$value:`0%{transform:scaleY(0);transform-origin:bottom}100%{transform:scaleY(1);transform-origin:bottom}`,$type:`keyframes`},"gentle-sway":{$value:`0%{transform:rotate(-1deg)}50%{transform:rotate(1deg)}100%{transform:rotate(-1deg)}`,$type:`keyframes`}},transition:Hv}},Qv={light:{$name:`Botanical`,$description:`Organic greens on warm cream — leaf-float animations and vine-grow motion.`,$metadata:{font:`Lora`,fontUrl:`https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap`,philosophy:`Rooted in nature. Growing with intention.`},color:{primary:{50:{$value:`#f0fdf4`,$type:`color`},100:{$value:`#dcfce7`,$type:`color`},200:{$value:`#bbf7d0`,$type:`color`},300:{$value:`#86efac`,$type:`color`},400:{$value:`#4ade80`,$type:`color`},500:{$value:`#22c55e`,$type:`color`},600:{$value:`#16a34a`,$type:`color`},700:{$value:`#15803d`,$type:`color`},800:{$value:`#166534`,$type:`color`},900:{$value:`#14532d`,$type:`color`}},neutral:{50:{$value:`#fefcf8`,$type:`color`},100:{$value:`#fdf8ef`,$type:`color`},200:{$value:`#f8f0df`,$type:`color`},300:{$value:`#f0e4c9`,$type:`color`},400:{$value:`#dccba5`,$type:`color`},500:{$value:`#aa8e56`,$type:`color`},600:{$value:`#9a8660`,$type:`color`},700:{$value:`#746448`,$type:`color`},800:{$value:`#504530`,$type:`color`},900:{$value:`#352e20`,$type:`color`}},success:{...zv.light.success,500:{$type:`color`,$value:`#17843f`}},warning:{...zv.light.warning,500:{$type:`color`,$value:`#a06707`}},error:{...zv.light.error,500:{$type:`color`,$value:`#e51414`}},info:zv.light.info,surface:{$value:`#fefcf8`,$type:`color`},onSurface:{$value:`#352e20`,$type:`color`},surfaceVariant:{$value:`#fdf8ef`,$type:`color`},onSurfaceVariant:{$value:`#746448`,$type:`color`},container:{$value:`#dcfce7`,$type:`color`},onContainer:{$value:`#14532d`,$type:`color`},outline:{$value:`#f0e4c9`,$type:`color`},outlineVariant:{$value:`#f8f0df`,$type:`color`},onPrimary:{$value:`#332407`,$type:`color`},primaryContainer:{$value:`#dcfce7`,$type:`color`},onPrimaryContainer:{$value:`#14532d`,$type:`color`},onError:{$value:`#fefcf8`,$type:`color`},errorContainer:{$value:`#fee2e2`,$type:`color`},onErrorContainer:{$value:`#7f1d1d`,$type:`color`},tertiary:{$value:`#b45309`,$type:`color`},onTertiary:{$value:`#fefcf8`,$type:`color`},tertiaryContainer:{$value:`#fef3c7`,$type:`color`},onTertiaryContainer:{$value:`#451a03`,$type:`color`}},font:Zv.font,spacing:Zv.spacing,shape:Zv.shape,motion:Zv.motion,accessibility:{...Bv.light,focusRing:{...Bv.light.focusRing,color:{$type:`color`,$value:`#16a34a`}}},zIndex:Vv},dark:{$name:`Botanical`,$description:`Forest at night (dark) — deep soil surfaces with lifted leaf-green accents and gentle organic motion.`,$metadata:{font:`Lora`,fontUrl:`https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap`,philosophy:`Rooted in nature. Growing with intention.`},color:{primary:{50:{$value:`#14532d`,$type:`color`},100:{$value:`#166534`,$type:`color`},200:{$value:`#15803d`,$type:`color`},300:{$value:`#16a34a`,$type:`color`},400:{$value:`#22c55e`,$type:`color`},500:{$value:`#4ade80`,$type:`color`},600:{$value:`#86efac`,$type:`color`},700:{$value:`#bbf7d0`,$type:`color`},800:{$value:`#dcfce7`,$type:`color`},900:{$value:`#f0fdf4`,$type:`color`}},neutral:{50:{$value:`#141210`,$type:`color`},100:{$value:`#1f1c18`,$type:`color`},200:{$value:`#352e20`,$type:`color`},300:{$value:`#504530`,$type:`color`},400:{$value:`#746448`,$type:`color`},500:{$value:`#9a8660`,$type:`color`},600:{$value:`#bfaa80`,$type:`color`},700:{$value:`#dccba5`,$type:`color`},800:{$value:`#f0e4c9`,$type:`color`},900:{$value:`#fefcf8`,$type:`color`}},success:zv.dark.success,warning:zv.dark.warning,error:zv.dark.error,info:zv.dark.info,surface:{$value:`#1f1c18`,$type:`color`},onSurface:{$value:`#fefcf8`,$type:`color`},surfaceVariant:{$value:`#352e20`,$type:`color`},onSurfaceVariant:{$value:`#dccba5`,$type:`color`},container:{$value:`#166534`,$type:`color`},onContainer:{$value:`#dcfce7`,$type:`color`},outline:{$value:`#504530`,$type:`color`},outlineVariant:{$value:`#352e20`,$type:`color`},onPrimary:{$value:`#141210`,$type:`color`},primaryContainer:{$value:`#166534`,$type:`color`},onPrimaryContainer:{$value:`#dcfce7`,$type:`color`},onError:{$value:`#450a0a`,$type:`color`},errorContainer:{$value:`#7f1d1d`,$type:`color`},onErrorContainer:{$value:`#fecaca`,$type:`color`},tertiary:{$value:`#fbbf24`,$type:`color`},onTertiary:{$value:`#451a03`,$type:`color`},tertiaryContainer:{$value:`#78350f`,$type:`color`},onTertiaryContainer:{$value:`#fef3c7`,$type:`color`}},font:Zv.font,spacing:Zv.spacing,shape:Zv.shape,motion:Zv.motion,accessibility:{...Bv.dark,focusRing:{...Bv.dark.focusRing,color:{$type:`color`,$value:`#4ade80`}}},zIndex:Vv}},$v={font:{family:{sans:{$value:`-apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif`,$type:`fontFamily`},mono:{$value:`ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace`,$type:`fontFamily`}},size:{sm:{$value:`0.875rem`,$type:`dimension`},base:{$value:`1rem`,$type:`dimension`},lg:{$value:`1.125rem`,$type:`dimension`},xl:{$value:`1.25rem`,$type:`dimension`},"2xl":{$value:`1.5rem`,$type:`dimension`}},weight:{normal:{$value:`400`,$type:`fontWeight`},medium:{$value:`500`,$type:`fontWeight`},semibold:{$value:`600`,$type:`fontWeight`},bold:{$value:`700`,$type:`fontWeight`}},lineHeight:{tight:{$value:`1.25`,$type:`number`},normal:{$value:`1.55`,$type:`number`},relaxed:{$value:`1.75`,$type:`number`}}},spacing:{1:{$value:`0.25rem`,$type:`dimension`},2:{$value:`0.5rem`,$type:`dimension`},3:{$value:`0.75rem`,$type:`dimension`},4:{$value:`1rem`,$type:`dimension`},5:{$value:`1.25rem`,$type:`dimension`},6:{$value:`1.5rem`,$type:`dimension`},8:{$value:`2rem`,$type:`dimension`},10:{$value:`2.5rem`,$type:`dimension`},12:{$value:`3rem`,$type:`dimension`},xs:{$value:`0.25rem`,$type:`dimension`},sm:{$value:`0.5rem`,$type:`dimension`},md:{$value:`1rem`,$type:`dimension`},lg:{$value:`1.5rem`,$type:`dimension`},xl:{$value:`2rem`,$type:`dimension`},"2xl":{$value:`3rem`,$type:`dimension`}},shape:{radius:{sm:{$value:`0.5rem`,$type:`dimension`},md:{$value:`0.75rem`,$type:`dimension`},lg:{$value:`1rem`,$type:`dimension`},xl:{$value:`1.5rem`,$type:`dimension`},full:{$value:`9999px`,$type:`dimension`}},shadow:{sm:{$value:`0 1px 3px color-mix(in srgb, var(--ggui-color-primary-500) 8%, transparent)`,$type:`shadow`},md:{$value:`0 1px 2px rgba(20, 20, 19, 0.04), 0 8px 16px -4px color-mix(in srgb, var(--ggui-color-primary-500) 14%, transparent)`,$type:`shadow`},lg:{$value:`0 2px 4px rgba(20, 20, 19, 0.04), 0 16px 32px -8px color-mix(in srgb, var(--ggui-color-primary-500) 20%, transparent)`,$type:`shadow`},xl:{$value:`0 4px 8px rgba(20, 20, 19, 0.04), 0 24px 48px -12px color-mix(in srgb, var(--ggui-color-primary-500) 26%, transparent)`,$type:`shadow`}}},motion:{duration:{fast:{$value:`120ms`,$type:`duration`},normal:{$value:`240ms`,$type:`duration`},slow:{$value:`480ms`,$type:`duration`}},easing:{default:{$value:`cubic-bezier(0.4, 0, 0.2, 1)`,$type:`cubicBezier`},spring:{$value:`cubic-bezier(0.22, 1, 0.36, 1)`,$type:`cubicBezier`}},keyframes:{entrance:{$value:`0%{opacity:0;transform:translateY(4px)}100%{opacity:1;transform:none}`,$type:`keyframes`}},transition:{...Hv,fast:{$type:`transition`,$value:`120ms cubic-bezier(0.4, 0, 0.2, 1)`},normal:{$type:`transition`,$value:`240ms cubic-bezier(0.4, 0, 0.2, 1)`},slow:{$type:`transition`,$value:`480ms cubic-bezier(0.4, 0, 0.2, 1)`}}}},ey={light:{$name:`Claudic`,$description:`Fits inside claude.ai — warm ivory surfaces, terracotta accent, calm by design.`,$metadata:{font:`system`,philosophy:`Quiet, papery, conversational. Built to feel native when rendered inside claude.ai.`},color:{primary:{50:{$value:`#fbf2ee`,$type:`color`},100:{$value:`#f5dfd4`,$type:`color`},200:{$value:`#ecbfa9`,$type:`color`},300:{$value:`#df9d80`,$type:`color`},400:{$value:`#d6896c`,$type:`color`},500:{$value:`#cc785c`,$type:`color`},600:{$value:`#b8694f`,$type:`color`},700:{$value:`#965240`,$type:`color`},800:{$value:`#723e30`,$type:`color`},900:{$value:`#4d2920`,$type:`color`}},neutral:{50:{$value:`#faf9f5`,$type:`color`},100:{$value:`#f5f4ee`,$type:`color`},200:{$value:`#ebe9df`,$type:`color`},300:{$value:`#dad8cc`,$type:`color`},400:{$value:`#a8a59f`,$type:`color`},500:{$value:`#7c7a76`,$type:`color`},600:{$value:`#56544f`,$type:`color`},700:{$value:`#3d3b39`,$type:`color`},800:{$value:`#262624`,$type:`color`},900:{$value:`#141413`,$type:`color`}},success:{50:{$value:`#f4f7ec`,$type:`color`},100:{$value:`#e3ecd0`,$type:`color`},200:{$value:`#c8d8a5`,$type:`color`},500:{$value:`#5c7a35`,$type:`color`},600:{$value:`#587634`,$type:`color`},700:{$value:`#465c29`,$type:`color`},800:{$value:`#33431e`,$type:`color`}},warning:{50:{$value:`#fbf3e3`,$type:`color`},100:{$value:`#f6e2bb`,$type:`color`},200:{$value:`#eac786`,$type:`color`},500:{$value:`#956922`,$type:`color`},600:{$value:`#a87725`,$type:`color`},700:{$value:`#825c1d`,$type:`color`},800:{$value:`#5d4214`,$type:`color`}},error:{50:{$value:`#f9ebe7`,$type:`color`},100:{$value:`#f1cec5`,$type:`color`},200:{$value:`#e3a294`,$type:`color`},500:{$value:`#bc4a3a`,$type:`color`},600:{$value:`#9d3d30`,$type:`color`},700:{$value:`#7a2f25`,$type:`color`},800:{$value:`#57211a`,$type:`color`}},info:{50:{$value:`#f1f0ee`,$type:`color`},100:{$value:`#dedcd8`,$type:`color`},200:{$value:`#bdbab4`,$type:`color`},500:{$value:`#7c7a76`,$type:`color`},600:{$value:`#65635f`,$type:`color`},700:{$value:`#4d4b48`,$type:`color`},800:{$value:`#363432`,$type:`color`}},surface:{$value:`#faf9f5`,$type:`color`},onSurface:{$value:`#141413`,$type:`color`},surfaceVariant:{$value:`#f5f4ee`,$type:`color`},onSurfaceVariant:{$value:`#56544f`,$type:`color`},container:{$value:`#fbf2ee`,$type:`color`},onContainer:{$value:`#4d2920`,$type:`color`},outline:{$value:`#dad8cc`,$type:`color`},outlineVariant:{$value:`#ebe9df`,$type:`color`},onPrimary:{$value:`#15130a`,$type:`color`},primaryContainer:{$value:`#fbf2ee`,$type:`color`},onPrimaryContainer:{$value:`#4d2920`,$type:`color`},onError:{$value:`#faf9f5`,$type:`color`},errorContainer:{$value:`#f9ebe7`,$type:`color`},onErrorContainer:{$value:`#57211a`,$type:`color`},tertiary:{$value:`#6b8e3d`,$type:`color`},onTertiary:{$value:`#faf9f5`,$type:`color`},tertiaryContainer:{$value:`#f4f7ec`,$type:`color`},onTertiaryContainer:{$value:`#33431e`,$type:`color`}},font:$v.font,spacing:$v.spacing,shape:$v.shape,motion:$v.motion,accessibility:{...Bv.light,focusRing:{...Bv.light.focusRing,color:{$type:`color`,$value:`#cc785c`}}},zIndex:Vv},dark:{$name:`Claudic`,$description:`Fits inside claude.ai (dark) — warm charcoal surfaces, terracotta accent, calm by design.`,$metadata:{font:`system`,philosophy:`Quiet, papery, conversational. Built to feel native when rendered inside claude.ai.`},color:{primary:{50:{$value:`#4d2920`,$type:`color`},100:{$value:`#723e30`,$type:`color`},200:{$value:`#965240`,$type:`color`},300:{$value:`#b8694f`,$type:`color`},400:{$value:`#cc785c`,$type:`color`},500:{$value:`#d6896c`,$type:`color`},600:{$value:`#df9d80`,$type:`color`},700:{$value:`#ecbfa9`,$type:`color`},800:{$value:`#f5dfd4`,$type:`color`},900:{$value:`#fbf2ee`,$type:`color`}},neutral:{50:{$value:`#1a1917`,$type:`color`},100:{$value:`#262624`,$type:`color`},200:{$value:`#2d2c2a`,$type:`color`},300:{$value:`#3d3b39`,$type:`color`},400:{$value:`#56544f`,$type:`color`},500:{$value:`#7c7a76`,$type:`color`},600:{$value:`#a8a59f`,$type:`color`},700:{$value:`#dad8cc`,$type:`color`},800:{$value:`#ebe9df`,$type:`color`},900:{$value:`#faf9f5`,$type:`color`}},success:{50:{$value:`#1c2412`,$type:`color`},100:{$value:`#34461e`,$type:`color`},200:{$value:`#4a6029`,$type:`color`},500:{$value:`#9bb56b`,$type:`color`},600:{$value:`#b1c688`,$type:`color`},700:{$value:`#c8d8a5`,$type:`color`},800:{$value:`#e3ecd0`,$type:`color`}},warning:{50:{$value:`#2a1e0c`,$type:`color`},100:{$value:`#523915`,$type:`color`},200:{$value:`#7a541f`,$type:`color`},500:{$value:`#dba14a`,$type:`color`},600:{$value:`#e4b46e`,$type:`color`},700:{$value:`#eac786`,$type:`color`},800:{$value:`#f6e2bb`,$type:`color`}},error:{50:{$value:`#2a1410`,$type:`color`},100:{$value:`#52271f`,$type:`color`},200:{$value:`#7a3a2e`,$type:`color`},500:{$value:`#d7705f`,$type:`color`},600:{$value:`#df8576`,$type:`color`},700:{$value:`#e3a294`,$type:`color`},800:{$value:`#f1cec5`,$type:`color`}},info:{50:{$value:`#222220`,$type:`color`},100:{$value:`#3a3936`,$type:`color`},200:{$value:`#56544f`,$type:`color`},500:{$value:`#a8a59f`,$type:`color`},600:{$value:`#bcbab5`,$type:`color`},700:{$value:`#d1cfca`,$type:`color`},800:{$value:`#e6e4e0`,$type:`color`}},surface:{$value:`#262624`,$type:`color`},onSurface:{$value:`#faf9f5`,$type:`color`},surfaceVariant:{$value:`#2d2c2a`,$type:`color`},onSurfaceVariant:{$value:`#a8a59f`,$type:`color`},container:{$value:`#3d3b39`,$type:`color`},onContainer:{$value:`#fbf2ee`,$type:`color`},outline:{$value:`#3d3b39`,$type:`color`},outlineVariant:{$value:`#2d2c2a`,$type:`color`},onPrimary:{$value:`#262624`,$type:`color`},primaryContainer:{$value:`#723e30`,$type:`color`},onPrimaryContainer:{$value:`#f5dfd4`,$type:`color`},onError:{$value:`#2a1410`,$type:`color`},errorContainer:{$value:`#52271f`,$type:`color`},onErrorContainer:{$value:`#f1cec5`,$type:`color`},tertiary:{$value:`#9bb56b`,$type:`color`},onTertiary:{$value:`#1c2412`,$type:`color`},tertiaryContainer:{$value:`#34461e`,$type:`color`},onTertiaryContainer:{$value:`#e3ecd0`,$type:`color`}},font:$v.font,spacing:$v.spacing,shape:$v.shape,motion:$v.motion,accessibility:{...Bv.dark,focusRing:{...Bv.dark.focusRing,color:{$type:`color`,$value:`#d6896c`}}},zIndex:Vv}},ty={font:{family:{sans:{$value:`"Inter Variable", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif`,$type:`fontFamily`},mono:{$value:`"JetBrains Mono", "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace`,$type:`fontFamily`}},size:{sm:{$value:`0.8125rem`,$type:`dimension`},base:{$value:`0.9375rem`,$type:`dimension`},lg:{$value:`1.0625rem`,$type:`dimension`},xl:{$value:`1.3125rem`,$type:`dimension`},"2xl":{$value:`1.75rem`,$type:`dimension`}},weight:{normal:{$value:`400`,$type:`fontWeight`},medium:{$value:`500`,$type:`fontWeight`},semibold:{$value:`600`,$type:`fontWeight`},bold:{$value:`680`,$type:`fontWeight`}},lineHeight:{tight:{$value:`1.1`,$type:`number`},normal:{$value:`1.55`,$type:`number`},relaxed:{$value:`1.7`,$type:`number`}}},spacing:{1:{$value:`0.25rem`,$type:`dimension`},2:{$value:`0.5rem`,$type:`dimension`},3:{$value:`0.75rem`,$type:`dimension`},4:{$value:`1rem`,$type:`dimension`},5:{$value:`1.25rem`,$type:`dimension`},6:{$value:`1.5rem`,$type:`dimension`},8:{$value:`2rem`,$type:`dimension`},10:{$value:`2.5rem`,$type:`dimension`},12:{$value:`3rem`,$type:`dimension`},xs:{$value:`0.25rem`,$type:`dimension`},sm:{$value:`0.5rem`,$type:`dimension`},md:{$value:`1rem`,$type:`dimension`},lg:{$value:`1.5rem`,$type:`dimension`},xl:{$value:`2rem`,$type:`dimension`},"2xl":{$value:`3rem`,$type:`dimension`}},shape:{radius:{sm:{$value:`0.5rem`,$type:`dimension`},md:{$value:`0.875rem`,$type:`dimension`},lg:{$value:`1.125rem`,$type:`dimension`},xl:{$value:`1.5rem`,$type:`dimension`},full:{$value:`9999px`,$type:`dimension`}},shadow:{sm:{$value:`0 1px 2px color-mix(in srgb, var(--ggui-color-primary-500) 6%, transparent)`,$type:`shadow`},md:{$value:`0 1px 3px rgba(21, 19, 31, 0.06), 0 8px 24px -6px color-mix(in srgb, var(--ggui-color-primary-500) 16%, transparent)`,$type:`shadow`},lg:{$value:`0 2px 6px rgba(21, 19, 31, 0.05), 0 20px 40px -10px color-mix(in srgb, var(--ggui-color-primary-500) 22%, transparent)`,$type:`shadow`},xl:{$value:`0 4px 10px rgba(21, 19, 31, 0.04), 0 32px 64px -16px color-mix(in srgb, var(--ggui-color-primary-500) 28%, transparent)`,$type:`shadow`}}},motion:{duration:{fast:{$value:`150ms`,$type:`duration`},normal:{$value:`250ms`,$type:`duration`},slow:{$value:`420ms`,$type:`duration`},ambient:{$value:`8000ms`,$type:`duration`}},easing:{default:{$value:`cubic-bezier(0.32, 0.72, 0, 1)`,$type:`cubicBezier`},spring:{$value:`cubic-bezier(0.16, 1, 0.3, 1)`,$type:`cubicBezier`}},keyframes:{entrance:{$value:`0%{opacity:0;transform:translateY(6px)}100%{opacity:1;transform:none}`,$type:`keyframes`}},transition:Hv}},ny={light:{$name:`Indigo`,$description:`Flagship ggui preset — refined electric indigo on a quiet paper surface. Premium, restrained, distinctive.`,$metadata:{font:`inter`,philosophy:`Looks like a deliberate aesthetic choice. Linear/Arc/Vercel-grade restraint with one confident accent.`},color:{primary:{50:{$value:`#eef2ff`,$type:`color`},100:{$value:`#e0e7ff`,$type:`color`},200:{$value:`#c7d2fe`,$type:`color`},300:{$value:`#a5b4fc`,$type:`color`},400:{$value:`#818cf8`,$type:`color`},500:{$value:`#4f46e5`,$type:`color`},600:{$value:`#4338ca`,$type:`color`},700:{$value:`#3730a3`,$type:`color`},800:{$value:`#312e81`,$type:`color`},900:{$value:`#1e1b4b`,$type:`color`}},neutral:{50:{$value:`#fafaf7`,$type:`color`},100:{$value:`#f4f4f0`,$type:`color`},200:{$value:`#e8e7e3`,$type:`color`},300:{$value:`#d4d3cf`,$type:`color`},400:{$value:`#9c9ba0`,$type:`color`},500:{$value:`#6e6d74`,$type:`color`},600:{$value:`#4a4954`,$type:`color`},700:{$value:`#322f3e`,$type:`color`},800:{$value:`#211f2c`,$type:`color`},900:{$value:`#15131f`,$type:`color`}},success:{50:{$value:`#ecfdf5`,$type:`color`},100:{$value:`#d1fae5`,$type:`color`},200:{$value:`#a7f3d0`,$type:`color`},500:{$value:`#0b815a`,$type:`color`},600:{$value:`#0b8259`,$type:`color`},700:{$value:`#086847`,$type:`color`},800:{$value:`#064e36`,$type:`color`}},warning:{50:{$value:`#fff8eb`,$type:`color`},100:{$value:`#fdecc8`,$type:`color`},200:{$value:`#fbd897`,$type:`color`},500:{$value:`#a66210`,$type:`color`},600:{$value:`#b86b0e`,$type:`color`},700:{$value:`#90530a`,$type:`color`},800:{$value:`#6b3d07`,$type:`color`}},error:{50:{$value:`#fef2f4`,$type:`color`},100:{$value:`#fde2e7`,$type:`color`},200:{$value:`#fbc5cf`,$type:`color`},500:{$value:`#dc2845`,$type:`color`},600:{$value:`#b81f38`,$type:`color`},700:{$value:`#94182d`,$type:`color`},800:{$value:`#701222`,$type:`color`}},info:{50:{$value:`#ecfeff`,$type:`color`},100:{$value:`#cffafe`,$type:`color`},200:{$value:`#a5f3fc`,$type:`color`},500:{$value:`#0891b2`,$type:`color`},600:{$value:`#0e7490`,$type:`color`},700:{$value:`#155e75`,$type:`color`},800:{$value:`#164e63`,$type:`color`}},surface:{$value:`#fafaf7`,$type:`color`},onSurface:{$value:`#15131f`,$type:`color`},surfaceVariant:{$value:`#f4f4f0`,$type:`color`},onSurfaceVariant:{$value:`#4a4954`,$type:`color`},container:{$value:`#eef2ff`,$type:`color`},onContainer:{$value:`#1e1b4b`,$type:`color`},outline:{$value:`#d4d3cf`,$type:`color`},outlineVariant:{$value:`#e8e7e3`,$type:`color`},onPrimary:{$value:`#fafaf7`,$type:`color`},primaryContainer:{$value:`#eef2ff`,$type:`color`},onPrimaryContainer:{$value:`#1e1b4b`,$type:`color`},onError:{$value:`#fafaf7`,$type:`color`},errorContainer:{$value:`#fde2e7`,$type:`color`},onErrorContainer:{$value:`#701222`,$type:`color`},tertiary:{$value:`#7c3aed`,$type:`color`},onTertiary:{$value:`#fafaf7`,$type:`color`},tertiaryContainer:{$value:`#ede9fe`,$type:`color`},onTertiaryContainer:{$value:`#4c1d95`,$type:`color`}},font:ty.font,spacing:ty.spacing,shape:ty.shape,motion:ty.motion,accessibility:{...Bv.light,focusRing:{...Bv.light.focusRing,color:{$type:`color`,$value:`#4f46e5`}}},zIndex:Vv},dark:{$name:`Indigo`,$description:`Flagship ggui preset (dark) — refined electric indigo on rich midnight. Premium, restrained, distinctive.`,$metadata:{font:`inter`,philosophy:`Looks like a deliberate aesthetic choice. Linear/Arc/Vercel-grade restraint with one confident accent.`},color:{primary:{50:{$value:`#1e1b4b`,$type:`color`},100:{$value:`#312e81`,$type:`color`},200:{$value:`#3730a3`,$type:`color`},300:{$value:`#4338ca`,$type:`color`},400:{$value:`#4f46e5`,$type:`color`},500:{$value:`#818cf8`,$type:`color`},600:{$value:`#a5b4fc`,$type:`color`},700:{$value:`#c7d2fe`,$type:`color`},800:{$value:`#e0e7ff`,$type:`color`},900:{$value:`#eef2ff`,$type:`color`}},neutral:{50:{$value:`#0c0b14`,$type:`color`},100:{$value:`#15131f`,$type:`color`},200:{$value:`#1d1b29`,$type:`color`},300:{$value:`#2a2839`,$type:`color`},400:{$value:`#3e3c50`,$type:`color`},500:{$value:`#636176`,$type:`color`},600:{$value:`#8b8898`,$type:`color`},700:{$value:`#b8b6c2`,$type:`color`},800:{$value:`#dcdbe2`,$type:`color`},900:{$value:`#f5f4f9`,$type:`color`}},success:{50:{$value:`#022c1d`,$type:`color`},100:{$value:`#064e36`,$type:`color`},200:{$value:`#086847`,$type:`color`},500:{$value:`#34d399`,$type:`color`},600:{$value:`#6ee7b7`,$type:`color`},700:{$value:`#a7f3d0`,$type:`color`},800:{$value:`#d1fae5`,$type:`color`}},warning:{50:{$value:`#3a2104`,$type:`color`},100:{$value:`#6b3d07`,$type:`color`},200:{$value:`#90530a`,$type:`color`},500:{$value:`#f59e0b`,$type:`color`},600:{$value:`#fbbf24`,$type:`color`},700:{$value:`#fcd34d`,$type:`color`},800:{$value:`#fde68a`,$type:`color`}},error:{50:{$value:`#3b0a14`,$type:`color`},100:{$value:`#701222`,$type:`color`},200:{$value:`#94182d`,$type:`color`},500:{$value:`#fb7185`,$type:`color`},600:{$value:`#fda4af`,$type:`color`},700:{$value:`#fecdd3`,$type:`color`},800:{$value:`#ffe4e6`,$type:`color`}},info:{50:{$value:`#083344`,$type:`color`},100:{$value:`#164e63`,$type:`color`},200:{$value:`#155e75`,$type:`color`},500:{$value:`#22d3ee`,$type:`color`},600:{$value:`#67e8f9`,$type:`color`},700:{$value:`#a5f3fc`,$type:`color`},800:{$value:`#cffafe`,$type:`color`}},surface:{$value:`#15131f`,$type:`color`},onSurface:{$value:`#f5f4f9`,$type:`color`},surfaceVariant:{$value:`#221e35`,$type:`color`},onSurfaceVariant:{$value:`#c8c6d2`,$type:`color`},container:{$value:`#312e81`,$type:`color`},onContainer:{$value:`#eef2ff`,$type:`color`},outline:{$value:`#3e3c50`,$type:`color`},outlineVariant:{$value:`#2a2839`,$type:`color`},onPrimary:{$value:`#0c0b14`,$type:`color`},primaryContainer:{$value:`#312e81`,$type:`color`},onPrimaryContainer:{$value:`#e0e7ff`,$type:`color`},onError:{$value:`#3b0a14`,$type:`color`},errorContainer:{$value:`#701222`,$type:`color`},onErrorContainer:{$value:`#fecdd3`,$type:`color`},tertiary:{$value:`#a78bfa`,$type:`color`},onTertiary:{$value:`#2e1065`,$type:`color`},tertiaryContainer:{$value:`#4c1d95`,$type:`color`},onTertiaryContainer:{$value:`#ede9fe`,$type:`color`}},font:ty.font,spacing:ty.spacing,shape:ty.shape,motion:ty.motion,accessibility:{...Bv.dark,focusRing:{...Bv.dark.focusRing,color:{$type:`color`,$value:`#818cf8`}}},zIndex:Vv}},ry={font:{family:{sans:{$value:`"DM Sans", system-ui, -apple-system, sans-serif`,$type:`fontFamily`},mono:{$value:`"JetBrains Mono", ui-monospace, monospace`,$type:`fontFamily`}},size:{sm:{$value:`0.875rem`,$type:`dimension`},base:{$value:`1rem`,$type:`dimension`},lg:{$value:`1.125rem`,$type:`dimension`},xl:{$value:`1.25rem`,$type:`dimension`},"2xl":{$value:`1.5rem`,$type:`dimension`}},weight:{normal:{$value:`400`,$type:`fontWeight`},medium:{$value:`500`,$type:`fontWeight`},semibold:{$value:`600`,$type:`fontWeight`},bold:{$value:`700`,$type:`fontWeight`}},lineHeight:{tight:{$value:`1.25`,$type:`number`},normal:{$value:`1.5`,$type:`number`},relaxed:{$value:`1.75`,$type:`number`}}},spacing:{1:{$value:`0.25rem`,$type:`dimension`},2:{$value:`0.5rem`,$type:`dimension`},3:{$value:`0.75rem`,$type:`dimension`},4:{$value:`1rem`,$type:`dimension`},5:{$value:`1.25rem`,$type:`dimension`},6:{$value:`1.5rem`,$type:`dimension`},8:{$value:`2rem`,$type:`dimension`},10:{$value:`2.5rem`,$type:`dimension`},12:{$value:`3rem`,$type:`dimension`}},motion:{duration:{fast:{$value:`120ms`,$type:`duration`},normal:{$value:`200ms`,$type:`duration`},slow:{$value:`400ms`,$type:`duration`},ambient:{$value:`2000ms`,$type:`duration`}},easing:{default:{$value:`cubic-bezier(0.4, 0, 0.2, 1)`,$type:`cubicBezier`},bounce:{$value:`cubic-bezier(0.68, -0.55, 0.27, 1.55)`,$type:`cubicBezier`},spring:{$value:`cubic-bezier(0.22, 1, 0.36, 1)`,$type:`cubicBezier`}},transition:{fast:{$value:`120ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},normal:{$value:`200ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},slow:{$value:`400ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},colors:{$value:`color 200ms cubic-bezier(0.4, 0, 0.2, 1), background-color 200ms cubic-bezier(0.4, 0, 0.2, 1), border-color 200ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},opacity:{$value:`opacity 200ms cubic-bezier(0.4, 0, 0.2, 1)`,$type:`transition`},transform:{$value:`transform 200ms cubic-bezier(0.22, 1, 0.36, 1)`,$type:`transition`}},keyframes:{"fade-in":{$value:`0%{opacity:0}100%{opacity:1}`,$type:`keyframes`},"slide-up":{$value:`0%{opacity:0;transform:translateY(8px)}100%{opacity:1;transform:translateY(0)}`,$type:`keyframes`},"pulse-soft":{$value:`0%{opacity:1}50%{opacity:0.65}100%{opacity:1}`,$type:`keyframes`}}},accessibility:{focusRing:{color:{$value:`#B8FF3A`,$type:`color`},width:{$value:`2px`,$type:`dimension`},offset:{$value:`2px`,$type:`dimension`}},reducedMotion:{duration:{$value:`0ms`,$type:`duration`}},highContrast:{borderWidth:{$value:`2px`,$type:`dimension`},textColor:{$value:`#FFFFFF`,$type:`color`},backgroundColor:{$value:`#000000`,$type:`color`},linkColor:{$value:`#CCFF66`,$type:`color`}}},zIndex:Vv},iy={sm:{$value:`0.375rem`,$type:`dimension`},md:{$value:`0.5rem`,$type:`dimension`},lg:{$value:`0.75rem`,$type:`dimension`},xl:{$value:`1rem`,$type:`dimension`},full:{$value:`9999px`,$type:`dimension`}},ay={sm:{$value:`0 1px 2px rgba(0, 0, 0, 0.2)`,$type:`shadow`},md:{$value:`0 2px 8px rgba(0, 0, 0, 0.25)`,$type:`shadow`},lg:{$value:`0 6px 16px rgba(0, 0, 0, 0.28)`,$type:`shadow`},xl:{$value:`0 10px 24px rgba(0, 0, 0, 0.3)`,$type:`shadow`}},oy={sm:{$value:`0 1px 2px rgba(26, 29, 36, 0.06)`,$type:`shadow`},md:{$value:`0 2px 8px rgba(26, 29, 36, 0.08)`,$type:`shadow`},lg:{$value:`0 6px 16px rgba(26, 29, 36, 0.1)`,$type:`shadow`},xl:{$value:`0 12px 28px rgba(26, 29, 36, 0.12)`,$type:`shadow`}},sy={$name:`guuey-brand-v1`,$description:`The guuey product brand (dark) — slate-ink surfaces, slime #B8FF3A accent, DM Sans.`,$metadata:{font:`DM Sans`,fontUrl:`https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap`,philosophy:`Agent-native. Slime on slate.`,frameless:!0},color:{primary:{50:{$value:`#141D05`,$type:`color`},100:{$value:`#28390B`,$type:`color`},200:{$value:`#3F5A11`,$type:`color`},300:{$value:`#5F8719`,$type:`color`},400:{$value:`#8CC627`,$type:`color`},500:{$value:`#B8FF3A`,$type:`color`},600:{$value:`#CCFF66`,$type:`color`},700:{$value:`#DBFF8F`,$type:`color`},800:{$value:`#E9FFB8`,$type:`color`},900:{$value:`#F6FFE0`,$type:`color`}},neutral:{50:{$value:`#0E1014`,$type:`color`},100:{$value:`#1A1D24`,$type:`color`},200:{$value:`#232630`,$type:`color`},300:{$value:`#242938`,$type:`color`},400:{$value:`#3B4152`,$type:`color`},500:{$value:`#878C99`,$type:`color`},600:{$value:`#B7BAC4`,$type:`color`},700:{$value:`#D5D6DC`,$type:`color`},800:{$value:`#E8E7E2`,$type:`color`},900:{$value:`#F6F5EE`,$type:`color`}},success:{50:{$value:`#141D05`,$type:`color`},100:{$value:`#28390B`,$type:`color`},200:{$value:`#3F5A11`,$type:`color`},500:{$value:`#B8FF3A`,$type:`color`},600:{$value:`#CCFF66`,$type:`color`},700:{$value:`#DBFF8F`,$type:`color`},800:{$value:`#E9FFB8`,$type:`color`}},warning:{50:{$value:`#33240A`,$type:`color`},100:{$value:`#5C420F`,$type:`color`},200:{$value:`#8A6318`,$type:`color`},500:{$value:`#FFB020`,$type:`color`},600:{$value:`#FFC24D`,$type:`color`},700:{$value:`#FFD37D`,$type:`color`},800:{$value:`#FFE5AE`,$type:`color`}},error:{50:{$value:`#33110E`,$type:`color`},100:{$value:`#5E1F1B`,$type:`color`},200:{$value:`#8F2F2A`,$type:`color`},500:{$value:`#FF5B5B`,$type:`color`},600:{$value:`#FF7D7A`,$type:`color`},700:{$value:`#FF9F9C`,$type:`color`},800:{$value:`#FFC3C0`,$type:`color`}},info:{50:{$value:`#0A2733`,$type:`color`},100:{$value:`#12455C`,$type:`color`},200:{$value:`#1E6A8A`,$type:`color`},500:{$value:`#3AC8FF`,$type:`color`},600:{$value:`#66D4FF`,$type:`color`},700:{$value:`#92E0FF`,$type:`color`},800:{$value:`#BFECFF`,$type:`color`}},surface:{$value:`#1A1D24`,$type:`color`},onSurface:{$value:`#F6F5EE`,$type:`color`},surfaceVariant:{$value:`#242938`,$type:`color`},onSurfaceVariant:{$value:`#B7BAC4`,$type:`color`},container:{$value:`#232630`,$type:`color`},onContainer:{$value:`#F6F5EE`,$type:`color`},outline:{$value:`rgba(246, 245, 238, 0.14)`,$type:`color`},outlineVariant:{$value:`rgba(246, 245, 238, 0.1)`,$type:`color`},onPrimary:{$value:`#0E1014`,$type:`color`},primaryContainer:{$value:`#242938`,$type:`color`},onPrimaryContainer:{$value:`#CCFF66`,$type:`color`},onError:{$value:`#33110E`,$type:`color`},errorContainer:{$value:`#5E1F1B`,$type:`color`},onErrorContainer:{$value:`#FFC3C0`,$type:`color`},tertiary:{$value:`#FF4FB0`,$type:`color`},onTertiary:{$value:`#0E1014`,$type:`color`},tertiaryContainer:{$value:`#451A35`,$type:`color`},onTertiaryContainer:{$value:`#FFC1E4`,$type:`color`}},...ry,shape:{radius:iy,shadow:ay}},cy={light:{$name:`guuey-brand-v1`,$description:`The guuey product brand (light, provisional) — paper surfaces, slime accent held for fills, darkened slime for text emphasis.`,$metadata:sy.$metadata,color:{primary:{50:{$value:`#F6FFE0`,$type:`color`},100:{$value:`#E9FFB8`,$type:`color`},200:{$value:`#DBFF8F`,$type:`color`},300:{$value:`#CCFF66`,$type:`color`},400:{$value:`#B8FF3A`,$type:`color`},500:{$value:`#9FE01C`,$type:`color`},600:{$value:`#7DB214`,$type:`color`},700:{$value:`#476809`,$type:`color`},800:{$value:`#3F5A11`,$type:`color`},900:{$value:`#28390B`,$type:`color`}},neutral:{50:{$value:`#FBFAF6`,$type:`color`},100:{$value:`#F6F5EE`,$type:`color`},200:{$value:`#E8E7E2`,$type:`color`},300:{$value:`#D5D6DC`,$type:`color`},400:{$value:`#B7BAC4`,$type:`color`},500:{$value:`#6E7380`,$type:`color`},600:{$value:`#4A4F5C`,$type:`color`},700:{$value:`#333846`,$type:`color`},800:{$value:`#242938`,$type:`color`},900:{$value:`#1A1D24`,$type:`color`}},success:{50:{$value:`#F6FFE0`,$type:`color`},100:{$value:`#E9FFB8`,$type:`color`},200:{$value:`#DBFF8F`,$type:`color`},500:{$value:`#517709`,$type:`color`},600:{$value:`#476809`,$type:`color`},700:{$value:`#35510B`,$type:`color`},800:{$value:`#28390B`,$type:`color`}},warning:{50:{$value:`#FFF4DD`,$type:`color`},100:{$value:`#FFE5AE`,$type:`color`},200:{$value:`#FFD37D`,$type:`color`},500:{$value:`#9C6205`,$type:`color`},600:{$value:`#7C4D04`,$type:`color`},700:{$value:`#5E3A03`,$type:`color`},800:{$value:`#3F2702`,$type:`color`}},error:{50:{$value:`#FFE9E8`,$type:`color`},100:{$value:`#FFC3C0`,$type:`color`},200:{$value:`#FF9F9C`,$type:`color`},500:{$value:`#CC2F2F`,$type:`color`},600:{$value:`#A62626`,$type:`color`},700:{$value:`#7E1D1D`,$type:`color`},800:{$value:`#5E1F1B`,$type:`color`}},info:{50:{$value:`#E5F7FF`,$type:`color`},100:{$value:`#BFECFF`,$type:`color`},200:{$value:`#92E0FF`,$type:`color`},500:{$value:`#0B739E`,$type:`color`},600:{$value:`#085572`,$type:`color`},700:{$value:`#06455D`,$type:`color`},800:{$value:`#0A3346`,$type:`color`}},surface:{$value:`#FFFFFF`,$type:`color`},onSurface:{$value:`#1A1D24`,$type:`color`},surfaceVariant:{$value:`#F6F5EE`,$type:`color`},onSurfaceVariant:{$value:`#4A4F5C`,$type:`color`},container:{$value:`#FBFAF6`,$type:`color`},onContainer:{$value:`#1A1D24`,$type:`color`},outline:{$value:`rgba(26, 29, 36, 0.18)`,$type:`color`},outlineVariant:{$value:`rgba(26, 29, 36, 0.10)`,$type:`color`},onPrimary:{$value:`#0E1014`,$type:`color`},primaryContainer:{$value:`#E9FFB8`,$type:`color`},onPrimaryContainer:{$value:`#28390B`,$type:`color`},onError:{$value:`#FFFFFF`,$type:`color`},errorContainer:{$value:`#FFE9E8`,$type:`color`},onErrorContainer:{$value:`#8A1F1F`,$type:`color`},tertiary:{$value:`#D6247F`,$type:`color`},onTertiary:{$value:`#FFFFFF`,$type:`color`},tertiaryContainer:{$value:`#FFDCEE`,$type:`color`},onTertiaryContainer:{$value:`#6B1240`,$type:`color`}},...ry,shape:{radius:iy,shadow:oy}},dark:sy},ly=new Map([[`ggui`,Wv],[`indigo`,ny],[`claudic`,ey],[`premium-cyberpunk`,Kv],[`premium-zen`,Jv],[`premium-neon-noir`,Xv],[`premium-botanical`,Qv],[`guuey-brand-v1`,cy]]);function uy(e,t){return t===`dark`&&e.dark?`dark`:`light`}function dy(e,t=`light`){let n=ly.get(e);if(n)return uy(n,t)===`dark`?n.dark:n.light}function fy(){let e=[];for(let[t,n]of ly){let r=n.dark?[`light`,`dark`]:[`light`];e.push({id:t,name:n.light.$name,description:n.light.$description,metadata:n.light.$metadata,modes:r})}return e}(0,S.createContext)(null);function py(e,t){return e===null?{presetId:t,mode:`light`,fromFile:!1,overrides:{}}:typeof e==`string`?{presetId:e,mode:`light`,fromFile:!1,overrides:{}}:`file`in e?{presetId:t,mode:e.mode??`light`,fromFile:!0,overrides:{}}:{presetId:e.preset,mode:e.mode??`light`,fromFile:!1,overrides:e.overrides??{}}}function my(e,t,n){let r=Object.keys(n);if(r.length===0)return{preset:e,mode:t};r.sort();let i={};for(let e of r)i[e]=n[e];return{preset:e,mode:t,overrides:i}}function hy(){let e=(0,S.useMemo)(()=>fy(),[]),t=e[0]?.id??`ggui`,[n,r]=(0,S.useState)({kind:`loading`}),[i,a]=(0,S.useState)(t),[o,s]=(0,S.useState)(`light`),[c,l]=(0,S.useState)(!1),[u,d]=(0,S.useState)(null),[f,p]=(0,S.useState)(!1),[m,h]=(0,S.useState)({}),g=async()=>{r(e=>e.kind===`ready`?e:{kind:`loading`});try{let e=await fetch(`/ggui/console/theme`,{credentials:`include`,headers:{accept:`application/json`}});if(e.status===401){E(`/admin-login?next=%2Fadmin%2Ftheme`);return}if(!e.ok){r({kind:`error`,message:`server returned ${e.status}`});return}let n=await e.json();r({kind:`ready`,data:n});let i=py(n.current,t);a(i.presetId),s(i.mode),p(i.fromFile),h({...i.overrides})}catch(e){r({kind:`error`,message:String(e)})}};(0,S.useEffect)(()=>{g()},[]);let _=(e,t)=>{h(n=>{let r={...n};return t===null||t===``?delete r[e]:r[e]=t,r})},v=()=>{h({})},y=async e=>{if(n.kind===`ready`){d(null),l(!0);try{let t=await e.text(),n;try{n=JSON.parse(t)}catch(e){d(`upload failed — file is not valid JSON: ${String(e)}`);return}let r=e.name.replace(/[^a-zA-Z0-9._-]/g,`-`),i=/\.json$/i.test(r)?r:`${r}.json`,a=await fetch(`/ggui/console/theme/upload`,{method:`POST`,credentials:`include`,headers:{"content-type":`application/json`,accept:`application/json`},body:JSON.stringify({filename:i,content:n,mode:o})});if(a.status===401){E(`/admin-login?next=%2Fadmin%2Ftheme`);return}if(a.status===400){let e=await a.json();d(e.message??`upload rejected — ${e.error??`invalid_content`}: ${JSON.stringify(e.issue)}`);return}if(a.status===501){let e=await a.json();d(e.message??"Theme uploads need the CLI’s themeFileUploader — launch via `ggui serve`.");return}if(!a.ok){d(`upload failed — server returned ${a.status}`);return}await g()}catch(e){d(`upload failed — ${String(e)}`)}finally{l(!1)}}},b=async()=>{if(n.kind===`ready`){d(null),l(!0);try{let e=await fetch(`/ggui/console/theme`,{method:`POST`,credentials:`include`,headers:{"content-type":`application/json`,accept:`application/json`},body:JSON.stringify(my(i,o,m))});if(e.status===401){E(`/admin-login?next=%2Fadmin%2Ftheme`);return}if(e.status===501){let t=await e.json();d(t.message??"Theme writes need the CLI’s themeWriter — launch via `ggui serve`.");return}if(!e.ok){d(`save failed — server returned ${e.status}`);return}await g()}catch(e){d(`save failed — ${String(e)}`)}finally{l(!1)}}};return(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`01 / theme`,title:`Pick a theme for your generated UI.`,mute:`Persists to ggui.json#theme. Affects every UI the LLM emits — not the console chrome you’re looking at.`,intro:(0,w.jsxs)(w.Fragment,{children:[`Each preset ships a complete DTCG token tree (color, type, spacing, motion). Light + dark variants are independent — presets that haven’t shipped a dark mode fall back to light on selection. The chosen theme writes to`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui.json`}),` and takes effect on the next generation.`]})}),n.kind===`loading`?(0,w.jsx)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},children:`Loading themes…`}):n.kind===`error`?(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},"data-ggui-theme-error":!0,children:[`Couldn’t load theme state — `,n.message]}):(0,w.jsx)(gy,{presets:e,selectedPresetId:i,mode:o,writerEnabled:n.data.writerEnabled,uploadEnabled:n.data.uploadEnabled??!1,fromFile:f,busy:c,err:u,overrides:m,onSelectPreset:a,onSelectMode:s,onSetOverride:_,onClearAllOverrides:v,onSave:()=>{b()},onUploadFile:e=>{y(e)}})]})}function gy({presets:e,selectedPresetId:t,mode:n,writerEnabled:r,uploadEnabled:i,fromFile:a,busy:o,err:s,overrides:c,onSelectPreset:l,onSelectMode:u,onSetOverride:d,onClearAllOverrides:f,onSave:p,onUploadFile:m}){let h=e.find(e=>e.id===t)?.modes.includes(`dark`)??!1,g=n===`dark`&&!h?`light`:n,_=dy(t,g);return(0,w.jsxs)(`div`,{"data-ggui-theme-layout":!0,style:{display:`flex`,gap:16,alignItems:`flex-start`},children:[(0,w.jsxs)(`aside`,{"aria-label":`theme picker controls`,style:{flex:`0 0 360px`,minWidth:320,maxWidth:400,display:`flex`,flexDirection:`column`,gap:12,position:`sticky`,top:16},children:[(0,w.jsxs)(`div`,{className:`ggui-stack__head`,style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,w.jsx)(`span`,{className:`ggui-stack__num`,children:`THM`}),(0,w.jsx)(`span`,{className:`ggui-stack__label`,children:`mode`}),(0,w.jsxs)(`span`,{style:{marginLeft:`auto`,display:`inline-flex`,gap:8},children:[(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,"data-ggui-theme-mode":`light`,onClick:()=>u(`light`),...g===`light`?{"aria-pressed":!0}:{},style:g===`light`?{fontWeight:600}:void 0,children:`◐ Light`}),(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,"data-ggui-theme-mode":`dark`,onClick:()=>u(`dark`),disabled:!h,title:h?`Switch to dark variant`:`This preset hasn’t shipped a dark variant yet`,...g===`dark`?{"aria-pressed":!0}:{},style:g===`dark`?{fontWeight:600}:void 0,children:`◑ Dark`})]})]}),a?(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:0,fontSize:12},children:[`⚠ Current selection is a file-form theme (`,(0,w.jsx)(`code`,{className:`ggui-code`,children:`{ file: "..." }`}),`). Saving a preset below will replace it.`]}):null,r?null:(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:0,fontSize:12},children:[`Read-only — launch via `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui serve`}),` `,`to enable saves.`]}),(0,w.jsx)(`div`,{"data-ggui-theme-grid":!0,style:{display:`flex`,flexDirection:`column`,gap:6},children:e.map(e=>(0,w.jsx)(Sy,{preset:e,selected:e.id===t,mode:g,onSelect:()=>l(e.id)},e.id))}),(0,w.jsx)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`,flexWrap:`wrap`,paddingTop:4,borderTop:`1px solid currentColor`,marginTop:4,opacity:.95},children:(0,w.jsxs)(`button`,{type:`button`,className:`ggui-btn`,"data-ggui-theme-save":!0,disabled:o||!r,onClick:p,style:{flex:1},children:[(0,w.jsx)(`span`,{className:`ggui-btn__dot`,"aria-hidden":!0}),o?`saving…`:`Save to ggui.json`]})}),(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:0,fontSize:11,lineHeight:1.4},children:[(0,w.jsx)(`code`,{className:`ggui-code`,children:t}),` `,`· `,(0,w.jsx)(`code`,{className:`ggui-code`,children:g}),Object.keys(c).length>0?(0,w.jsxs)(w.Fragment,{children:[` `,`· `,(0,w.jsxs)(`code`,{className:`ggui-code`,children:[`+`,Object.keys(c).length,` override`,Object.keys(c).length===1?``:`s`]})]}):null,g===n?null:(0,w.jsxs)(w.Fragment,{children:[` `,`· requested `,(0,w.jsx)(`code`,{className:`ggui-code`,children:n}),`, fell back`]})]}),(0,w.jsx)(yy,{uploadEnabled:i,busy:o,onUploadFile:m}),s?(0,w.jsx)(`p`,{className:`ggui-muted`,style:{margin:0,color:`#c0392b`,fontSize:12},"data-ggui-theme-error":!0,children:s}):null,_?(0,w.jsx)(by,{rawTheme:_,overrides:c,onSetOverride:d,onClearAll:f}):(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:0,fontSize:12},children:[`⚠ `,(0,w.jsx)(`code`,{className:`ggui-code`,children:t}),` isn’t registered on this build. Saving still writes the manifest; overrides require a recognised preset.`]})]}),(0,w.jsx)(`main`,{"aria-label":`theme preview`,style:{flex:1,minWidth:0,display:`flex`,flexDirection:`column`,gap:12},children:_?(0,w.jsx)(wy,{presetId:t,mode:g,rawTheme:_,overrides:c}):(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`preview unavailable`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`PRV / 00`})]}),(0,w.jsx)(`div`,{className:`ggui-card__body`,children:(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:0},children:[(0,w.jsx)(`code`,{className:`ggui-code`,children:t}),` isn’t a registered preset on this build, so there’s no token tree to paint from. Pick another preset on the left.`]})})]})})]})}function _y(e){let t=e=>{let t=e.$value;return typeof t==`string`?t:JSON.stringify(t)},n=(e,n)=>Object.keys(n).sort((e,t)=>{let n=Number(e),r=Number(t);return Number.isFinite(n)&&Number.isFinite(r)?n-r:e.localeCompare(t)}).map(r=>({path:`${e}.${r}`,value:t(n[r])})),r=[];r.push({label:`Color · Primary`,prefix:`color.primary`,leaves:n(`color.primary`,e.color.primary)}),r.push({label:`Color · Neutral`,prefix:`color.neutral`,leaves:n(`color.neutral`,e.color.neutral)}),r.push({label:`Color · Success`,prefix:`color.success`,leaves:n(`color.success`,e.color.success)}),r.push({label:`Color · Warning`,prefix:`color.warning`,leaves:n(`color.warning`,e.color.warning)}),r.push({label:`Color · Error`,prefix:`color.error`,leaves:n(`color.error`,e.color.error)}),r.push({label:`Color · Info`,prefix:`color.info`,leaves:n(`color.info`,e.color.info)}),r.push({label:`Color · Roles`,prefix:`color`,leaves:[{path:`color.surface`,value:t(e.color.surface)},{path:`color.onSurface`,value:t(e.color.onSurface)},{path:`color.surfaceVariant`,value:t(e.color.surfaceVariant)},{path:`color.onSurfaceVariant`,value:t(e.color.onSurfaceVariant)},{path:`color.container`,value:t(e.color.container)},{path:`color.onContainer`,value:t(e.color.onContainer)},{path:`color.outline`,value:t(e.color.outline)},{path:`color.outlineVariant`,value:t(e.color.outlineVariant)}]}),r.push({label:`Shape · Radius`,prefix:`shape.radius`,leaves:n(`shape.radius`,e.shape.radius)}),r.push({label:`Shape · Shadow`,prefix:`shape.shadow`,leaves:n(`shape.shadow`,e.shape.shadow)});let i=[{path:`font.family.sans`,value:t(e.font.family.sans)}];return e.font.family.mono&&i.push({path:`font.family.mono`,value:t(e.font.family.mono)}),r.push({label:`Font · Family`,prefix:`font.family`,leaves:i}),r.push({label:`Font · Size`,prefix:`font.size`,leaves:n(`font.size`,e.font.size)}),r.push({label:`Font · Weight`,prefix:`font.weight`,leaves:n(`font.weight`,e.font.weight)}),r.push({label:`Spacing`,prefix:`spacing`,leaves:n(`spacing`,e.spacing)}),r.filter(e=>e.leaves.length>0)}var vy=`https://github.com/ggui-ai/ggui/blob/main/design/CUSTOM_THEMES.md`;function yy({uploadEnabled:e,busy:t,onUploadFile:n}){return(0,w.jsxs)(`div`,{"data-ggui-theme-custom-row":!0,style:{display:`flex`,flexDirection:`column`,gap:6,paddingTop:8,marginTop:4,borderTop:`1px dashed currentColor`,opacity:.95},children:[e?(0,w.jsxs)(`label`,{className:`ggui-btn ggui-btn--ghost`,"data-ggui-theme-upload":!0,style:{display:`inline-flex`,alignItems:`center`,gap:8,cursor:t?`not-allowed`:`pointer`,justifyContent:`center`},children:[(0,w.jsx)(`input`,{type:`file`,accept:`.json,application/json`,disabled:t,onChange:e=>{let t=e.target.files?.[0];t!==void 0&&n(t),e.target.value=``},style:{position:`absolute`,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0,0,0,0)`,whiteSpace:`nowrap`,border:0}}),`↑ Upload theme.json`]}):null,(0,w.jsx)(`a`,{href:vy,target:`_blank`,rel:`noreferrer noopener`,"data-ggui-theme-docs":!0,className:`ggui-muted`,style:{fontSize:11,textDecoration:`underline`,textAlign:`center`,opacity:.85},children:`Roll your own theme →`})]})}function by({rawTheme:e,overrides:t,onSetOverride:n,onClearAll:r}){let i=(0,S.useMemo)(()=>_y(e),[e]),a=Object.keys(t).length;return(0,w.jsxs)(`div`,{"data-ggui-theme-overrides":!0,className:`ggui-stack`,style:{marginTop:16},"aria-label":`theme token overrides`,children:[(0,w.jsxs)(`div`,{className:`ggui-stack__head`,children:[(0,w.jsx)(`span`,{className:`ggui-stack__num`,children:`DTCG`}),(0,w.jsx)(`span`,{className:`ggui-stack__label`,children:`overrides`}),(0,w.jsxs)(`span`,{className:`ggui-stack__count`,children:[a,` `,a===1?`override`:`overrides`]}),a>0?(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,"data-ggui-theme-overrides-clear":!0,onClick:r,style:{marginLeft:`auto`},children:`Clear all`}):null]}),(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:`8px 0`,fontSize:12},children:[`Tweak individual DTCG tokens on top of the selected preset. Each leaf shows the preset’s shipped `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`$value`}),`; type a CSS-valid replacement to override it. Per-leaf`,` `,(0,w.jsx)(`em`,{children:`reset`}),` clears that path; saving with no overrides writes the bare `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`{ preset, mode }`}),` `,`shape (no `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`overrides`}),` field).`]}),i.map(e=>(0,w.jsxs)(`details`,{...e.prefix===`color.primary`?{open:!0}:{},style:{marginTop:8},children:[(0,w.jsxs)(`summary`,{style:{cursor:`pointer`,padding:`6px 0`,fontSize:13,fontWeight:500,userSelect:`none`},children:[e.label,` `,(0,w.jsxs)(`span`,{className:`ggui-muted`,style:{fontSize:11},children:[`(`,e.leaves.length,e.leaves.some(e=>e.path in t)?`, +${e.leaves.filter(e=>e.path in t).length} overridden`:``,`)`]})]}),(0,w.jsx)(`div`,{style:{display:`grid`,gap:6,gridTemplateColumns:`auto 1fr auto`,padding:`8px 0 8px 12px`,alignItems:`center`,fontSize:12},children:e.leaves.map(e=>(0,w.jsx)(xy,{path:e.path,presetValue:e.value,overrideValue:t[e.path]??null,onChange:n},e.path))})]},e.prefix))]})}function xy({path:e,presetValue:t,overrideValue:n,onChange:r}){let i=n!==null;return(0,w.jsxs)(`div`,{"data-ggui-theme-override-leaf":e,style:{display:`contents`},children:[(0,w.jsx)(`code`,{className:`ggui-code`,style:{fontSize:11,opacity:.85,padding:`2px 6px`},children:e}),(0,w.jsx)(`input`,{type:`text`,"data-ggui-theme-override-input":!0,value:n??``,placeholder:t,onChange:t=>{let n=t.target.value;r(e,n.length===0?null:n)},spellCheck:!1,autoComplete:`off`,style:{fontSize:12,fontFamily:`var(--ggui-font-mono, ui-monospace, monospace)`,padding:`4px 8px`,border:`1px solid currentColor`,borderRadius:4,background:`transparent`,color:`inherit`,opacity:i?1:.85,outline:i?`1px solid currentColor`:`none`},"aria-label":`override ${e}`}),(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,"data-ggui-theme-override-reset":!0,onClick:()=>r(e,null),disabled:!i,style:{fontSize:11,padding:`2px 8px`,opacity:i?1:.4,cursor:i?`pointer`:`default`},title:i?`Reset this leaf to the preset value`:`No override set on this leaf`,children:`reset`})]})}function Sy({preset:e,selected:t,mode:n,onSelect:r}){let i=e.modes.includes(`dark`),a=dy(e.id,n),o=a?.color.primary[500]?.$value,s=a?.color.surface.$value;return(0,w.jsxs)(`button`,{type:`button`,"data-ggui-theme-card":e.id,onClick:r,"aria-pressed":t,style:{display:`flex`,alignItems:`center`,gap:10,padding:`8px 10px`,textAlign:`left`,cursor:`pointer`,border:t?`2px solid currentColor`:`1px solid currentColor`,borderRadius:6,background:`transparent`,color:`inherit`,opacity:t?1:.85},children:[(0,w.jsxs)(`span`,{"aria-hidden":!0,style:{display:`inline-flex`,flexShrink:0,width:28,height:28,borderRadius:4,overflow:`hidden`,border:`1px solid currentColor`},children:[(0,w.jsx)(`span`,{style:{flex:1,background:o??`#ccc`}}),(0,w.jsx)(`span`,{style:{flex:1,background:s??`#fff`}})]}),(0,w.jsxs)(`span`,{style:{flex:1,minWidth:0},children:[(0,w.jsx)(`span`,{style:{display:`block`,fontSize:13,fontWeight:t?600:500},children:e.name}),(0,w.jsxs)(`span`,{className:`ggui-muted`,style:{display:`block`,fontSize:11,opacity:.75},children:[e.id===`claudic`?`claude.ai · `:``,i?`Light · Dark`:`Light only`]})]})]})}function Cy(e,t){if(Object.keys(t).length===0)return e;let n=structuredClone(e);for(let[e,r]of Object.entries(t)){let t=e.split(`.`),i=n,a=!0;for(let e=0;e<t.length-1;e+=1){let n=t[e];if(n===void 0){a=!1;break}let r=i[n];if(typeof r!=`object`||!r){a=!1;break}i=r}if(!a)continue;let o=t[t.length-1];if(o===void 0)continue;let s=i[o];typeof s!=`object`||!s||(s.$value=r)}return n}function wy({presetId:e,mode:t,rawTheme:n,overrides:r}){let i=(0,S.useMemo)(()=>`ggui-theme-preview-${e}-${t}`,[e,t]),a=(0,S.useMemo)(()=>{let t=Rv(e,Cy(n,r));return`${t.cssVariables.replace(/^:root\s*\{/,`.${i} {`)}\n${t.cssKeyframes}`},[n,r,e,i]);return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`style`,{"data-ggui-theme-preview-style":i,children:a}),(0,w.jsxs)(`div`,{"data-ggui-theme-preview":!0,className:i,style:{background:`var(--ggui-color-surface)`,color:`var(--ggui-color-onSurface)`,fontFamily:`var(--ggui-font-family-sans)`,padding:`var(--ggui-spacing-lg, 24px)`,borderRadius:`var(--ggui-shape-radius-lg, 12px)`,border:`1px solid var(--ggui-color-outline)`,boxShadow:`var(--ggui-shape-shadow-md)`,display:`flex`,flexDirection:`column`,gap:`var(--ggui-spacing-lg, 24px)`},children:[(0,w.jsx)(Ty,{presetName:n.$name,mode:t}),(0,w.jsx)(Ey,{}),(0,w.jsx)(Dy,{}),(0,w.jsx)(Oy,{}),(0,w.jsx)(ky,{theme:n,overrides:r}),(0,w.jsx)(Ay,{})]})]})}function Ty({presetName:e,mode:t}){return(0,w.jsxs)(`header`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`baseline`,gap:12,flexWrap:`wrap`,borderBottom:`1px solid var(--ggui-color-outlineVariant)`,paddingBottom:`var(--ggui-spacing-md, 16px)`},children:[(0,w.jsx)(`span`,{style:{fontSize:`var(--ggui-font-size-2xl, 1.5rem)`,fontWeight:`var(--ggui-font-weight-semibold, 600)`},children:e}),(0,w.jsx)(`span`,{style:{fontSize:`var(--ggui-font-size-sm, 0.875rem)`,color:`var(--ggui-color-onSurfaceVariant)`,fontFamily:`var(--ggui-font-family-mono)`},children:t})]})}function Ey(){return(0,w.jsxs)(`section`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:[(0,w.jsx)(`h3`,{style:{margin:0,fontSize:`var(--ggui-font-size-xl, 1.25rem)`,fontWeight:`var(--ggui-font-weight-semibold, 600)`,lineHeight:`var(--ggui-font-lineHeight-tight, 1.25)`},children:`Typography reads naturally`}),(0,w.jsxs)(`p`,{style:{margin:0,fontSize:`var(--ggui-font-size-base, 1rem)`,lineHeight:`var(--ggui-font-lineHeight-normal, 1.5)`},children:[`The body paragraph is what generated UIs use for prose. Inline`,` `,(0,w.jsx)(`code`,{style:{fontFamily:`var(--ggui-font-family-mono)`,fontSize:`0.9em`,background:`var(--ggui-color-surfaceVariant)`,color:`var(--ggui-color-onSurfaceVariant)`,padding:`0.1em 0.4em`,borderRadius:`var(--ggui-shape-radius-sm, 4px)`},children:`code`}),` `,`and a`,` `,(0,w.jsx)(`a`,{href:`#preview`,style:{color:`var(--ggui-color-primary-600)`,textDecorationColor:`var(--ggui-color-primary-400)`},onClick:e=>e.preventDefault(),children:`link`}),` `,`sit alongside.`]}),(0,w.jsx)(`p`,{className:`ggui-muted`,style:{margin:0,fontSize:`var(--ggui-font-size-sm, 0.875rem)`,color:`var(--ggui-color-onSurfaceVariant)`},children:`Caption text — softer contrast for secondary info.`})]})}function Dy(){return(0,w.jsxs)(`section`,{style:{display:`flex`,gap:8,flexWrap:`wrap`},children:[(0,w.jsx)(`button`,{type:`button`,onClick:e=>e.preventDefault(),style:{padding:`8px 16px`,background:`var(--ggui-color-primary-500)`,color:`var(--ggui-color-surface)`,border:`none`,borderRadius:`var(--ggui-shape-radius-md, 8px)`,fontFamily:`var(--ggui-font-family-sans)`,fontSize:`var(--ggui-font-size-sm, 0.875rem)`,fontWeight:`var(--ggui-font-weight-medium, 500)`,cursor:`pointer`,boxShadow:`var(--ggui-shape-shadow-sm)`},children:`Primary`}),(0,w.jsx)(`button`,{type:`button`,onClick:e=>e.preventDefault(),style:{padding:`8px 16px`,background:`transparent`,color:`var(--ggui-color-primary-600)`,border:`1px solid var(--ggui-color-primary-500)`,borderRadius:`var(--ggui-shape-radius-md, 8px)`,fontFamily:`var(--ggui-font-family-sans)`,fontSize:`var(--ggui-font-size-sm, 0.875rem)`,fontWeight:`var(--ggui-font-weight-medium, 500)`,cursor:`pointer`},children:`Outline`}),(0,w.jsx)(`button`,{type:`button`,onClick:e=>e.preventDefault(),style:{padding:`8px 16px`,background:`transparent`,color:`var(--ggui-color-onSurfaceVariant)`,border:`none`,borderRadius:`var(--ggui-shape-radius-md, 8px)`,fontFamily:`var(--ggui-font-family-sans)`,fontSize:`var(--ggui-font-size-sm, 0.875rem)`,cursor:`pointer`},children:`Ghost`})]})}function Oy(){return(0,w.jsxs)(`section`,{style:{background:`var(--ggui-color-container)`,color:`var(--ggui-color-onContainer)`,padding:`var(--ggui-spacing-md, 16px)`,borderRadius:`var(--ggui-shape-radius-lg, 12px)`,boxShadow:`var(--ggui-shape-shadow-lg)`,display:`flex`,flexDirection:`column`,gap:8},children:[(0,w.jsx)(`strong`,{style:{fontSize:`var(--ggui-font-size-lg, 1.125rem)`,fontWeight:`var(--ggui-font-weight-semibold, 600)`},children:`Container card`}),(0,w.jsxs)(`span`,{style:{fontSize:`var(--ggui-font-size-sm, 0.875rem)`},children:[`Painted with `,(0,w.jsx)(`code`,{style:{fontFamily:`var(--ggui-font-family-mono)`},children:`color.container`}),` `,`+ `,(0,w.jsx)(`code`,{style:{fontFamily:`var(--ggui-font-family-mono)`},children:`color.onContainer`}),` `,`— the role pair generated UIs reach for to highlight primary-tinted content.`]}),(0,w.jsx)(`input`,{type:`text`,defaultValue:`Form input — focus to see border`,onChange:()=>{},style:{padding:`6px 10px`,background:`var(--ggui-color-surface)`,color:`var(--ggui-color-onSurface)`,border:`1px solid var(--ggui-color-outline)`,borderRadius:`var(--ggui-shape-radius-sm, 4px)`,fontFamily:`var(--ggui-font-family-sans)`,fontSize:`var(--ggui-font-size-sm, 0.875rem)`,outline:`none`}})]})}function ky({theme:e,overrides:t}){let n=(0,S.useMemo)(()=>Cy(e,t),[e,t]),r=(e,t,n)=>{let r=Object.keys(t).sort((e,t)=>{if(n){let n=Number(e),r=Number(t);if(Number.isFinite(n)&&Number.isFinite(r))return n-r}return e.localeCompare(t)});return(0,w.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,w.jsx)(`span`,{style:{width:64,fontSize:`var(--ggui-font-size-sm, 0.875rem)`,color:`var(--ggui-color-onSurfaceVariant)`},children:e}),(0,w.jsx)(`div`,{style:{display:`flex`,flex:1,borderRadius:`var(--ggui-shape-radius-sm, 4px)`,overflow:`hidden`,border:`1px solid var(--ggui-color-outlineVariant)`},children:r.map(n=>{let r=t[n];return r?(0,w.jsx)(`span`,{title:`${e.toLowerCase()}.${n} · ${r.$value}`,style:{flex:1,height:24,background:r.$value}},n):null})})]})};return(0,w.jsxs)(`section`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:[(0,w.jsx)(`strong`,{style:{fontSize:`var(--ggui-font-size-sm, 0.875rem)`,color:`var(--ggui-color-onSurfaceVariant)`,textTransform:`uppercase`,letterSpacing:`0.06em`},children:`Color ramps`}),r(`Primary`,n.color.primary,!0),r(`Neutral`,n.color.neutral,!0)]})}function Ay(){let e=(e,t)=>(0,w.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:6,fontSize:`var(--ggui-font-size-sm, 0.875rem)`},children:[(0,w.jsx)(`span`,{"aria-hidden":!0,style:{width:12,height:12,borderRadius:`50%`,background:e,border:`1px solid var(--ggui-color-outline)`}}),(0,w.jsx)(`span`,{style:{color:`var(--ggui-color-onSurfaceVariant)`},children:t})]});return(0,w.jsxs)(`section`,{style:{display:`flex`,gap:16,flexWrap:`wrap`},children:[e(`var(--ggui-color-success-500)`,`success`),e(`var(--ggui-color-warning-500)`,`warning`),e(`var(--ggui-color-error-500)`,`error`),e(`var(--ggui-color-info-500)`,`info`)]})}var jy={kind:`admin-index`};function My(){return typeof window>`u`?jy:ie(window.location.pathname)}function Ny(){return jy}function Py(){let e=(0,S.useSyncExternalStore)(ae,My,Ny);return e.kind===`blueprint`?(0,w.jsx)(Se,{route:e,variant:`narrow`,children:(0,w.jsx)(rg,{blueprintId:e.blueprintId})}):e.kind===`admin-index`||e.kind===`admin-status`?(0,w.jsx)(Se,{route:e,variant:`admin`,children:(0,w.jsx)(wv,{})}):e.kind===`admin-sessions`?(0,w.jsx)(Se,{route:e,variant:`admin`,children:(0,w.jsx)(vv,{})}):e.kind===`admin-blueprints`?(0,w.jsx)(Se,{route:e,variant:`admin`,children:(0,w.jsx)(cg,{})}):e.kind===`admin-variants`?(0,w.jsx)(Se,{route:e,variant:`admin`,children:(0,w.jsx)(Gg,{})}):e.kind===`admin-variant-detail`?(0,w.jsx)(Se,{route:e,variant:`admin`,children:(0,w.jsx)(Rg,{contractHash:e.contractHash})}):e.kind===`admin-variant-generate`?(0,w.jsx)(Se,{route:e,variant:`admin`,children:(0,w.jsx)(Vg,{contractHash:e.contractHash})}):e.kind===`admin-config`?(0,w.jsx)(Se,{route:e,variant:`admin`,children:(0,w.jsx)(Qg,{})}):e.kind===`admin-tools`?(0,w.jsx)(Se,{route:e,variant:`admin`,children:(0,w.jsx)(pv,{})}):e.kind===`admin-llm-keys`?(0,w.jsx)(Se,{route:e,variant:`admin`,children:(0,w.jsx)(De,{})}):e.kind===`admin-connector-keys`?(0,w.jsx)(Se,{route:e,variant:`admin`,children:(0,w.jsx)(sv,{})}):e.kind===`admin-oauth-providers`?(0,w.jsx)(Se,{route:e,variant:`admin`,children:(0,w.jsx)(Ne,{})}):e.kind===`admin-clients`?(0,w.jsx)(Se,{route:e,variant:`admin`,children:(0,w.jsx)(Kg,{})}):e.kind===`admin-theme`?(0,w.jsx)(Se,{route:e,variant:`admin`,children:(0,w.jsx)(hy,{})}):e.kind===`admin-login`?(0,w.jsx)(Se,{route:e,variant:`narrow`,children:(0,w.jsx)(Ce,{})}):se(e)?(0,w.jsx)(Se,{route:e,variant:`devtools`,children:(0,w.jsx)(av,{route:e})}):(0,w.jsx)(Se,{route:e,variant:`narrow`,children:(0,w.jsx)(Fy,{pathname:e.pathname})})}function Fy({pathname:e}){return(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`404 / not found`,title:`Nothing lives here.`,mute:`This is an operator-only server.`,intro:(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`code`,{className:`ggui-code`,children:e}),` is not a route served by this console. The end-user pages were retired — ggui’s end-users see UI through their MCP host (claude.ai, Claude Desktop, Cursor), not through this server’s own surface.`]})}),(0,w.jsxs)(`div`,{className:`ggui-card`,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:`routes`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`RTE / 01`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsxs)(`ul`,{style:{listStyle:`none`,padding:0,margin:0,display:`grid`,gap:10},children:[(0,w.jsx)(`li`,{children:(0,w.jsxs)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,onClick:()=>E(`/admin/status`),children:[(0,w.jsx)(`span`,{className:`ggui-btn__dot`,"aria-hidden":!0}),`/ admin`]})}),(0,w.jsx)(`li`,{children:(0,w.jsxs)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,onClick:()=>E(`/admin-login`),children:[(0,w.jsx)(`span`,{className:`ggui-btn__dot`,"aria-hidden":!0}),`/ admin-login`]})})]}),(0,w.jsxs)(`p`,{className:`ggui-muted`,children:[`The`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`/preview/<blueprintId>`}),` `,`route requires a real id — paste a blueprint id registered in `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui.json`}),`.`]})]})]})]})}var Iy=document.getElementById(`root`);if(!Iy)throw Error(`console: #root element missing from index.html`);(0,C.createRoot)(Iy).render((0,w.jsx)(S.StrictMode,{children:(0,w.jsx)(Py,{})}));
|