@ggui-ai/console 0.10.0 → 0.12.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.
@@ -0,0 +1,206 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),c=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},u=(n,r,o)=>(o=n==null?{}:e(i(n)),l(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n)),d=e=>a.call(e,`module.exports`)?e[`module.exports`]:l(t({},`__esModule`,{value:!0}),e);(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var f=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function ee(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function te(e,t){return ee(e.type,t,e.props)}function ne(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function re(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var ie=/\/+/g;function E(e,t){return typeof e==`object`&&e&&e.key!=null?re(``+e.key):t.toString(36)}function ae(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function oe(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,oe(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+E(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(ie,`$&/`)+`/`),oe(o,r,i,``,function(e){return e})):o!=null&&(ne(o)&&(o=te(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(ie,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+E(a,u),c+=oe(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+E(a,u++),c+=oe(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return oe(ae(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function se(e,t,n){if(e==null)return e;var r=[],i=0;return oe(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ce(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var D=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},O={map:se,forEach:function(e,t,n){se(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return se(e,function(){t++}),t},toArray:function(e){return se(e,function(e){return e})||[]},only:function(e){if(!ne(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=O,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return ee(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return ee(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=ne,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ce}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,D)}catch(e){D(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.8`})),p=s(((e,t)=>{t.exports=f()})),m=s((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,ne());else{var t=n(l);t!==null&&E(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function ee(){return g?!0:!(e.unstable_now()-T<w)}function te(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&ee());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&E(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}}}finally{i?ne():S=!1}}}var ne;if(typeof y==`function`)ne=function(){y(te)};else if(typeof MessageChannel<`u`){var re=new MessageChannel,ie=re.port2;re.port1.onmessage=te,ne=function(){ie.postMessage(null)}}else ne=function(){_(te,0)};function E(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,E(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,ne()))),r},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),h=s(((e,t)=>{t.exports=m()})),g=s((e=>{var t=p();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.8`})),_=s(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=g()})),v=s((e=>{var t=h(),n=p(),r=_();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,m=Symbol.for(`react.element`),g=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),ee=Symbol.for(`react.suspense_list`),te=Symbol.for(`react.memo`),ne=Symbol.for(`react.lazy`),re=Symbol.for(`react.activity`),ie=Symbol.for(`react.memo_cache_sentinel`),E=Symbol.iterator;function ae(e){return typeof e!=`object`||!e?null:(e=E&&e[E]||e[`@@iterator`],typeof e==`function`?e:null)}var oe=Symbol.for(`react.client.reference`);function se(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===oe?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case ee:return`SuspenseList`;case re:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case te:return t=e.displayName||null,t===null?se(e.type)||`Memo`:t;case ne:t=e._payload,e=e._init;try{return se(e(t))}catch{}}return null}var ce=Array.isArray,D=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,O=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,le={pending:!1,data:null,method:null,action:null},ue=[],de=-1;function fe(e){return{current:e}}function pe(e){0>de||(e.current=ue[de],ue[de]=null,de--)}function k(e,t){de++,ue[de]=e.current,e.current=t}var me=fe(null),he=fe(null),ge=fe(null),_e=fe(null);function ve(e,t){switch(k(ge,t),k(he,e),k(me,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?J(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=J(t),e=Y(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}pe(me),k(me,e)}function ye(){pe(me),pe(he),pe(ge)}function be(e){e.memoizedState!==null&&k(_e,e);var t=me.current,n=Y(t,e.type);t!==n&&(k(he,e),k(me,n))}function xe(e){he.current===e&&(pe(me),pe(he)),_e.current===e&&(pe(_e),ep._currentValue=le)}var Se,Ce;function we(e){if(Se===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Se=t&&t[1]||``,Ce=-1<e.stack.indexOf(`
2
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
3
+ `+Se+e+Ce}var Te=!1;function Ee(e,t){if(!e||Te)return``;Te=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
4
+ `),l=s.split(`
5
+ `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
6
+ `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Te=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?we(n):``}function De(e,t){switch(e.tag){case 26:case 27:case 5:return we(e.type);case 16:return we(`Lazy`);case 13:return e.child!==t&&t!==null?we(`Suspense Fallback`):we(`Suspense`);case 19:return we(`SuspenseList`);case 0:case 15:return Ee(e.type,!1);case 11:return Ee(e.type.render,!1);case 1:return Ee(e.type,!0);case 31:return we(`Activity`);default:return``}}function Oe(e){try{var t=``,n=null;do t+=De(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
7
+ Error generating stack: `+e.message+`
8
+ `+e.stack}}var ke=Object.prototype.hasOwnProperty,Ae=t.unstable_scheduleCallback,je=t.unstable_cancelCallback,Me=t.unstable_shouldYield,Ne=t.unstable_requestPaint,Pe=t.unstable_now,Fe=t.unstable_getCurrentPriorityLevel,Ie=t.unstable_ImmediatePriority,Le=t.unstable_UserBlockingPriority,Re=t.unstable_NormalPriority,ze=t.unstable_LowPriority,Be=t.unstable_IdlePriority,A=t.log,Ve=t.unstable_setDisableYieldValue,He=null,Ue=null;function We(e){if(typeof A==`function`&&Ve(e),Ue&&typeof Ue.setStrictMode==`function`)try{Ue.setStrictMode(He,e)}catch{}}var Ge=Math.clz32?Math.clz32:Je,Ke=Math.log,qe=Math.LN2;function Je(e){return e>>>=0,e===0?32:31-(Ke(e)/qe|0)|0}var Ye=256,Xe=262144,Ze=4194304;function j(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Qe(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=j(n))):i=j(o):i=j(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=j(n))):i=j(o)):i=j(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function $e(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function et(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function tt(){var e=Ze;return Ze<<=1,!(Ze&62914560)&&(Ze=4194304),e}function nt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function rt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function it(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Ge(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&at(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function at(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ge(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function ot(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ge(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function st(e,t){var n=t&-t;return n=n&42?1:ct(n),(n&(e.suspendedLanes|t))===0?n:0}function ct(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function lt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function M(){var e=O.p;return e===0?(e=window.event,e===void 0?32:hp(e.type)):e}function ut(e,t){var n=O.p;try{return O.p=e,t()}finally{O.p=n}}var dt=Math.random().toString(36).slice(2),ft=`__reactFiber$`+dt,pt=`__reactProps$`+dt,mt=`__reactContainer$`+dt,ht=`__reactEvents$`+dt,gt=`__reactListeners$`+dt,_t=`__reactHandles$`+dt,vt=`__reactResources$`+dt,yt=`__reactMarker$`+dt;function bt(e){delete e[ft],delete e[pt],delete e[ht],delete e[gt],delete e[_t]}function xt(e){var t=e[ft];if(t)return t;for(var n=e.parentNode;n;){if(t=n[mt]||n[ft]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=pf(e);e!==null;){if(n=e[ft])return n;e=pf(e)}return t}e=n,n=e.parentNode}return null}function St(e){if(e=e[ft]||e[mt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ct(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function wt(e){var t=e[vt];return t||=e[vt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Tt(e){e[yt]=!0}var Et=new Set,Dt={};function Ot(e,t){kt(e,t),kt(e+`Capture`,t)}function kt(e,t){for(Dt[e]=t,e=0;e<t.length;e++)Et.add(t[e])}var At=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),jt={},Mt={};function Nt(e){return ke.call(Mt,e)?!0:ke.call(jt,e)?!1:At.test(e)?Mt[e]=!0:(jt[e]=!0,!1)}function Pt(e,t,n){if(Nt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function Ft(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function It(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Lt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Rt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function zt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Bt(e){if(!e._valueTracker){var t=Rt(e)?`checked`:`value`;e._valueTracker=zt(e,t,``+e[t])}}function Vt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Rt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}function Ht(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Ut=/[\n"\\]/g;function Wt(e){return e.replace(Ut,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Gt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Lt(t)):e.value!==``+Lt(t)&&(e.value=``+Lt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):qt(e,o,Lt(n)):qt(e,o,Lt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Lt(s):e.removeAttribute(`name`)}function Kt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Bt(e);return}n=n==null?``:``+Lt(n),t=t==null?n:``+Lt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Bt(e)}function qt(e,t,n){t===`number`&&Ht(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Jt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Lt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Yt(e,t,n){if(t!=null&&(t=``+Lt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Lt(n)}function Xt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(ce(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Lt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Bt(e)}function Zt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Qt=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function $t(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Qt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function en(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&$t(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&$t(e,o,t[o])}function tn(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var nn=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),rn=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function an(e){return rn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function on(){}var sn=null;function cn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ln=null,un=null;function dn(e){var t=St(e);if(t&&(e=t.stateNode)){var n=e[pt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Gt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Wt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[pt]||null;if(!a)throw Error(i(90));Gt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Vt(r)}break a;case`textarea`:Yt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Jt(e,!!n.multiple,t,!1)}}}var fn=!1;function pn(e,t,n){if(fn)return e(t,n);fn=!0;try{return e(t)}finally{if(fn=!1,(ln!==null||un!==null)&&(wu(),ln&&(t=ln,e=un,un=ln=null,dn(t),e)))for(t=0;t<e.length;t++)dn(e[t])}}function mn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[pt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var hn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),gn=!1;if(hn)try{var _n={};Object.defineProperty(_n,"passive",{get:function(){gn=!0}}),window.addEventListener(`test`,_n,_n),window.removeEventListener(`test`,_n,_n)}catch{gn=!1}var vn=null,yn=null,bn=null;function xn(){if(bn)return bn;var e,t=yn,n=t.length,r,i=`value`in vn?vn.value:vn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return bn=i.slice(e,1<r?1-r:void 0)}function Sn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Cn(){return!0}function wn(){return!1}function Tn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?Cn:wn,this.isPropagationStopped=wn,this}return f(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Cn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Cn)},persist:function(){},isPersistent:Cn}),t}var En={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Dn=Tn(En),On=f({},En,{view:0,detail:0}),kn=Tn(On),An,jn,Mn,Nn=f({},On,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Wn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Mn&&(Mn&&e.type===`mousemove`?(An=e.screenX-Mn.screenX,jn=e.screenY-Mn.screenY):jn=An=0,Mn=e),An)},movementY:function(e){return`movementY`in e?e.movementY:jn}}),Pn=Tn(Nn),Fn=Tn(f({},Nn,{dataTransfer:0})),In=Tn(f({},On,{relatedTarget:0})),Ln=Tn(f({},En,{animationName:0,elapsedTime:0,pseudoElement:0})),Rn=Tn(f({},En,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),zn=Tn(f({},En,{data:0})),Bn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Vn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},Hn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Un(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Hn[e])?!!t[e]:!1}function Wn(){return Un}var Gn=Tn(f({},On,{key:function(e){if(e.key){var t=Bn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Sn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Vn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Wn,charCode:function(e){return e.type===`keypress`?Sn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Sn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Kn=Tn(f({},Nn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),qn=Tn(f({},On,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Wn})),Jn=Tn(f({},En,{propertyName:0,elapsedTime:0,pseudoElement:0})),Yn=Tn(f({},Nn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Xn=Tn(f({},En,{newState:0,oldState:0})),Zn=[9,13,27,32],Qn=hn&&`CompositionEvent`in window,$n=null;hn&&`documentMode`in document&&($n=document.documentMode);var er=hn&&`TextEvent`in window&&!$n,tr=hn&&(!Qn||$n&&8<$n&&11>=$n),nr=` `,rr=!1;function ir(e,t){switch(e){case`keyup`:return Zn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function ar(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var or=!1;function sr(e,t){switch(e){case`compositionend`:return ar(t);case`keypress`:return t.which===32?(rr=!0,nr):null;case`textInput`:return e=t.data,e===nr&&rr?null:e;default:return null}}function cr(e,t){if(or)return e===`compositionend`||!Qn&&ir(e,t)?(e=xn(),bn=yn=vn=null,or=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return tr&&t.locale!==`ko`?null:t.data;default:return null}}var lr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ur(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!lr[e.type]:t===`textarea`}function dr(e,t,n,r){ln?un?un.push(r):un=[r]:ln=r,t=jd(t,`onChange`),0<t.length&&(n=new Dn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var fr=null,pr=null;function mr(e){wd(e,0)}function hr(e){if(Vt(Ct(e)))return e}function gr(e,t){if(e===`change`)return t}var _r=!1;if(hn){var vr;if(hn){var yr=`oninput`in document;if(!yr){var br=document.createElement(`div`);br.setAttribute(`oninput`,`return;`),yr=typeof br.oninput==`function`}vr=yr}else vr=!1;_r=vr&&(!document.documentMode||9<document.documentMode)}function xr(){fr&&(fr.detachEvent(`onpropertychange`,Sr),pr=fr=null)}function Sr(e){if(e.propertyName===`value`&&hr(pr)){var t=[];dr(t,pr,e,cn(e)),pn(mr,t)}}function Cr(e,t,n){e===`focusin`?(xr(),fr=t,pr=n,fr.attachEvent(`onpropertychange`,Sr)):e===`focusout`&&xr()}function wr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return hr(pr)}function Tr(e,t){if(e===`click`)return hr(t)}function Er(e,t){if(e===`input`||e===`change`)return hr(t)}function Dr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Or=typeof Object.is==`function`?Object.is:Dr;function kr(e,t){if(Or(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!ke.call(t,i)||!Or(e[i],t[i]))return!1}return!0}function Ar(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function jr(e,t){var n=Ar(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Ar(n)}}function Mr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Mr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Nr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ht(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ht(e.document)}return t}function Pr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Fr=hn&&`documentMode`in document&&11>=document.documentMode,Ir=null,Lr=null,Rr=null,zr=!1;function Br(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;zr||Ir==null||Ir!==Ht(r)||(r=Ir,`selectionStart`in r&&Pr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Rr&&kr(Rr,r)||(Rr=r,r=jd(Lr,`onSelect`),0<r.length&&(t=new Dn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Ir)))}function Vr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Hr={animationend:Vr(`Animation`,`AnimationEnd`),animationiteration:Vr(`Animation`,`AnimationIteration`),animationstart:Vr(`Animation`,`AnimationStart`),transitionrun:Vr(`Transition`,`TransitionRun`),transitionstart:Vr(`Transition`,`TransitionStart`),transitioncancel:Vr(`Transition`,`TransitionCancel`),transitionend:Vr(`Transition`,`TransitionEnd`)},Ur={},Wr={};hn&&(Wr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Hr.animationend.animation,delete Hr.animationiteration.animation,delete Hr.animationstart.animation),`TransitionEvent`in window||delete Hr.transitionend.transition);function Gr(e){if(Ur[e])return Ur[e];if(!Hr[e])return e;var t=Hr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Wr)return Ur[e]=t[n];return e}var Kr=Gr(`animationend`),qr=Gr(`animationiteration`),Jr=Gr(`animationstart`),Yr=Gr(`transitionrun`),Xr=Gr(`transitionstart`),Zr=Gr(`transitioncancel`),Qr=Gr(`transitionend`),$r=new Map,ei=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);ei.push(`scrollEnd`);function ti(e,t){$r.set(e,t),Ot(t,[e])}var ni=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},ri=[],ii=0,ai=0;function oi(){for(var e=ii,t=ai=ii=0;t<e;){var n=ri[t];ri[t++]=null;var r=ri[t];ri[t++]=null;var i=ri[t];ri[t++]=null;var a=ri[t];if(ri[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ui(n,i,a)}}function si(e,t,n,r){ri[ii++]=e,ri[ii++]=t,ri[ii++]=n,ri[ii++]=r,ai|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ci(e,t,n,r){return si(e,t,n,r),di(e)}function li(e,t){return si(e,null,null,t),di(e)}function ui(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Ge(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function di(e){if(50<hu)throw hu=0,gu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var fi={};function pi(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function mi(e,t,n,r){return new pi(e,t,n,r)}function hi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function gi(e,t){var n=e.alternate;return n===null?(n=mi(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function _i(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function vi(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)hi(e)&&(s=1);else if(typeof e==`string`)s=Gf(e,n,me.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case re:return e=mi(31,n,t,a),e.elementType=re,e.lanes=o,e;case y:return yi(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=mi(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=mi(13,n,t,a),e.elementType=T,e.lanes=o,e;case ee:return e=mi(19,n,t,a),e.elementType=ee,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case te:s=14;break a;case ne:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=mi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function yi(e,t,n,r){return e=mi(7,e,r,t),e.lanes=n,e}function bi(e,t,n){return e=mi(6,e,null,t),e.lanes=n,e}function xi(e){var t=mi(18,null,null,0);return t.stateNode=e,t}function Si(e,t,n){return t=mi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ci=new WeakMap;function wi(e,t){if(typeof e==`object`&&e){var n=Ci.get(e);return n===void 0?(t={value:e,source:t,stack:Oe(t)},Ci.set(e,t),t):n}return{value:e,source:t,stack:Oe(t)}}var Ti=[],Ei=0,Di=null,Oi=0,ki=[],Ai=0,ji=null,Mi=1,Ni=``;function Pi(e,t){Ti[Ei++]=Oi,Ti[Ei++]=Di,Di=e,Oi=t}function Fi(e,t,n){ki[Ai++]=Mi,ki[Ai++]=Ni,ki[Ai++]=ji,ji=e;var r=Mi;e=Ni;var i=32-Ge(r)-1;r&=~(1<<i),n+=1;var a=32-Ge(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Mi=1<<32-Ge(t)+i|n<<i|r,Ni=a+e}else Mi=1<<a|n<<i|r,Ni=e}function Ii(e){e.return!==null&&(Pi(e,1),Fi(e,1,0))}function Li(e){for(;e===Di;)Di=Ti[--Ei],Ti[Ei]=null,Oi=Ti[--Ei],Ti[Ei]=null;for(;e===ji;)ji=ki[--Ai],ki[Ai]=null,Ni=ki[--Ai],ki[Ai]=null,Mi=ki[--Ai],ki[Ai]=null}function Ri(e,t){ki[Ai++]=Mi,ki[Ai++]=Ni,ki[Ai++]=ji,Mi=t.id,Ni=t.overflow,ji=e}var zi=null,Bi=null,N=!1,Vi=null,Hi=!1,Ui=Error(i(519));function Wi(e){throw Xi(wi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Ui}function Gi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[ft]=e,t[pt]=r,n){case`dialog`:q(`cancel`,t),q(`close`,t);break;case`iframe`:case`object`:case`embed`:q(`load`,t);break;case`video`:case`audio`:for(n=0;n<Sd.length;n++)q(Sd[n],t);break;case`source`:q(`error`,t);break;case`img`:case`image`:case`link`:q(`error`,t),q(`load`,t);break;case`details`:q(`toggle`,t);break;case`input`:q(`invalid`,t),Kt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:q(`invalid`,t);break;case`textarea`:q(`invalid`,t),Xt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Ld(t.textContent,n)?(r.popover!=null&&(q(`beforetoggle`,t),q(`toggle`,t)),r.onScroll!=null&&q(`scroll`,t),r.onScrollEnd!=null&&q(`scrollend`,t),r.onClick!=null&&(t.onclick=on),t=!0):t=!1,t||Wi(e,!0)}function Ki(e){for(zi=e.return;zi;)switch(zi.tag){case 5:case 31:case 13:Hi=!1;return;case 27:case 3:Hi=!0;return;default:zi=zi.return}}function qi(e){if(e!==zi)return!1;if(!N)return Ki(e),N=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||qd(e.type,e.memoizedProps)),n=!n),n&&Bi&&Wi(e),Ki(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Bi=ff(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Bi=ff(e)}else t===27?(t=Bi,$d(e.type)?(e=df,df=null,Bi=e):Bi=t):Bi=zi?uf(e.stateNode.nextSibling):null;return!0}function Ji(){Bi=zi=null,N=!1}function Yi(){var e=Vi;return e!==null&&(tu===null?tu=e:tu.push.apply(tu,e),Vi=null),e}function Xi(e){Vi===null?Vi=[e]:Vi.push(e)}var Zi=fe(null),Qi=null,$i=null;function ea(e,t,n){k(Zi,t._currentValue),t._currentValue=n}function ta(e){e._currentValue=Zi.current,pe(Zi)}function na(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function ra(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),na(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),na(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function ia(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Or(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===_e.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[ep]:e.push(ep))}a=a.return}e!==null&&ra(t,e,n,r),t.flags|=262144}function aa(e){for(e=e.firstContext;e!==null;){if(!Or(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function oa(e){Qi=e,$i=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function sa(e){return la(Qi,e)}function ca(e,t){return Qi===null&&oa(e),la(e,t)}function la(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},$i===null){if(e===null)throw Error(i(308));$i=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else $i=$i.next=t;return n}var ua=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},da=t.unstable_scheduleCallback,fa=t.unstable_NormalPriority,pa={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ma(){return{controller:new ua,data:new Map,refCount:0}}function ha(e){e.refCount--,e.refCount===0&&da(fa,function(){e.controller.abort()})}var ga=null,_a=0,va=0,ya=null;function ba(e,t){if(ga===null){var n=ga=[];_a=0,va=gd(),ya={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return _a++,t.then(xa,xa),t}function xa(){if(--_a===0&&ga!==null){ya!==null&&(ya.status=`fulfilled`);var e=ga;ga=null,va=0,ya=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Sa(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var Ca=D.S;D.S=function(e,t){iu=Pe(),typeof t==`object`&&t&&typeof t.then==`function`&&ba(e,t),Ca!==null&&Ca(e,t)};var wa=fe(null);function Ta(){var e=wa.current;return e===null?Hl.pooledCache:e}function Ea(e,t){t===null?k(wa,wa.current):k(wa,t.pool)}function Da(){var e=Ta();return e===null?null:{parent:pa._currentValue,pool:e}}var Oa=Error(i(460)),ka=Error(i(474)),Aa=Error(i(542)),ja={then:function(){}};function Ma(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Na(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(on,on),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,La(e),e;default:if(typeof t.status==`string`)t.then(on,on);else{if(e=Hl,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,La(e),e}throw Fa=t,Oa}}function Pa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Fa=e,Oa):e}}var Fa=null;function Ia(){if(Fa===null)throw Error(i(459));var e=Fa;return Fa=null,e}function La(e){if(e===Oa||e===Aa)throw Error(i(483))}var Ra=null,za=0;function Ba(e){var t=za;return za+=1,Ra===null&&(Ra=[]),Na(Ra,e,t)}function Va(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Ha(e,t){throw t.$$typeof===m?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Ua(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=gi(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=bi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===ne&&Pa(i)===t.type)?(t=a(t,n.props),Va(t,n),t.return=e,t):(t=vi(n.type,n.key,n.props,null,e.mode,r),Va(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=Si(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=yi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=bi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case g:return n=vi(t.type,t.key,t.props,null,e.mode,n),Va(n,t),n.return=e,n;case v:return t=Si(t,e.mode,n),t.return=e,t;case ne:return t=Pa(t),f(e,t,n)}if(ce(t)||ae(t))return t=yi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Ba(t),n);if(t.$$typeof===C)return f(e,ca(e,t),n);Ha(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case g:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case ne:return n=Pa(n),p(e,t,n,r)}if(ce(n)||ae(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Ba(n),r);if(n.$$typeof===C)return p(e,t,ca(e,n),r);Ha(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case g:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case ne:return r=Pa(r),m(e,t,n,r,i)}if(ce(r)||ae(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Ba(r),i);if(r.$$typeof===C)return m(e,t,n,ca(t,r),i);Ha(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),N&&Pi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return N&&Pi(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),N&&Pi(i,h),l}function _(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),N&&Pi(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return N&&Pi(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),N&&Pi(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case g:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===ne&&Pa(l)===r.type){n(e,r.sibling),c=a(r,o.props),Va(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===y?(c=yi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=vi(o.type,o.key,o.props,null,e.mode,c),Va(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}t(e,r),r=r.sibling}c=Si(o,e.mode,c),c.return=e,e=c}return s(e);case ne:return o=Pa(o),b(e,r,o,c)}if(ce(o))return h(e,r,o,c);if(ae(o)){if(l=ae(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),_(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Ba(o),c);if(o.$$typeof===C)return b(e,r,ca(e,o),c);Ha(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=bi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{za=0;var i=b(e,t,n,r);return Ra=null,i}catch(t){if(t===Oa||t===Aa)throw t;var a=mi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Wa=Ua(!0),Ga=Ua(!1),Ka=!1;function qa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ja(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ya(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Xa(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,U&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=di(e),ui(e,null,n),t}return si(e,r,t,n),di(e)}function Za(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ot(e,n)}}function Qa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var $a=!1;function eo(){if($a){var e=ya;if(e!==null)throw e}}function to(e,t,n,r){$a=!1;var i=e.updateQueue;Ka=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var p=s.lane&-536870913,m=p!==s.lane;if(m?(G&p)===p:(r&p)===p){p!==0&&p===va&&($a=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:Ka=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Yl|=o,e.lanes=o,e.memoizedState=d}}function no(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function ro(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)no(n[e],t)}var io=fe(null),ao=fe(0);function oo(e,t){e=ql,k(ao,e),k(io,t),ql=e|t.baseLanes}function so(){k(ao,ql),k(io,io.current)}function co(){ql=ao.current,pe(io),pe(ao)}var lo=fe(null),P=null;function uo(e){var t=e.alternate;k(mo,mo.current&1),k(lo,e),P===null&&(t===null||io.current!==null||t.memoizedState!==null)&&(P=e)}function fo(e){k(mo,mo.current),k(lo,e),P===null&&(P=e)}function F(e){e.tag===22?(k(mo,mo.current),k(lo,e),P===null&&(P=e)):I(e)}function I(){k(mo,mo.current),k(lo,lo.current)}function po(e){pe(lo),P===e&&(P=null),pe(mo)}var mo=fe(0);function ho(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||sf(n)||cf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var go=0,L=null,_o=null,vo=null,yo=!1,bo=!1,xo=!1,So=0,Co=0,wo=null,To=0;function Eo(){throw Error(i(321))}function Do(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Or(e[n],t[n]))return!1;return!0}function Oo(e,t,n,r,i,a){return go=a,L=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,D.H=e===null||e.memoizedState===null?Hs:Us,xo=!1,a=n(r,i),xo=!1,bo&&(a=Ao(t,n,r,i)),ko(e),a}function ko(e){D.H=Vs;var t=_o!==null&&_o.next!==null;if(go=0,vo=_o=L=null,yo=!1,Co=0,wo=null,t)throw Error(i(300));e===null||oc||(e=e.dependencies,e!==null&&aa(e)&&(oc=!0))}function Ao(e,t,n,r){L=e;var a=0;do{if(bo&&(wo=null),Co=0,bo=!1,25<=a)throw Error(i(301));if(a+=1,vo=_o=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}D.H=Ws,o=t(n,r)}while(bo);return o}function jo(){var e=D.H,t=e.useState()[0];return t=typeof t.then==`function`?Lo(t):t,e=e.useState()[0],(_o===null?null:_o.memoizedState)!==e&&(L.flags|=1024),t}function Mo(){var e=So!==0;return So=0,e}function R(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function No(e){if(yo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}yo=!1}go=0,vo=_o=L=null,bo=!1,Co=So=0,wo=null}function Po(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return vo===null?L.memoizedState=vo=e:vo=vo.next=e,vo}function Fo(){if(_o===null){var e=L.alternate;e=e===null?null:e.memoizedState}else e=_o.next;var t=vo===null?L.memoizedState:vo.next;if(t!==null)vo=t,_o=e;else{if(e===null)throw L.alternate===null?Error(i(467)):Error(i(310));_o=e,e={memoizedState:_o.memoizedState,baseState:_o.baseState,baseQueue:_o.baseQueue,queue:_o.queue,next:null},vo===null?L.memoizedState=vo=e:vo=vo.next=e}return vo}function Io(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Lo(e){var t=Co;return Co+=1,wo===null&&(wo=[]),e=Na(wo,e,t),t=L,(vo===null?t.memoizedState:vo.next)===null&&(t=t.alternate,D.H=t===null||t.memoizedState===null?Hs:Us),e}function Ro(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Lo(e);if(e.$$typeof===C)return sa(e)}throw Error(i(438,String(e)))}function zo(e){var t=null,n=L.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=L.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Io(),L.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=ie;return t.index++,n}function Bo(e,t){return typeof t==`function`?t(e):t}function Vo(e){return Ho(Fo(),_o,e)}function Ho(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(go&f)===f:(G&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===va&&(d=!0);else if((go&p)===p){u=u.next,p===va&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,L.lanes|=p,Yl|=p;f=u.action,xo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,L.lanes|=f,Yl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Or(o,e.memoizedState)&&(oc=!0,d&&(n=ya,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Uo(e){var t=Fo(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Or(o,t.memoizedState)||(oc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Wo(e,t,n){var r=L,a=Fo(),o=N;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Or((_o||a).memoizedState,n);if(s&&(a.memoizedState=n,oc=!0),a=a.queue,ps(Ko.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||vo!==null&&vo.memoizedState.tag&1){if(r.flags|=2048,cs(9,{destroy:void 0},z.bind(null,r,a,n,t),null),Hl===null)throw Error(i(349));o||go&127||Go(r,t,n)}return n}function Go(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=L.updateQueue,t===null?(t=Io(),L.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function z(e,t,n,r){t.value=n,t.getSnapshot=r,qo(t)&&Jo(e)}function Ko(e,t,n){return n(function(){qo(t)&&Jo(e)})}function qo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Or(e,n)}catch{return!0}}function Jo(e){var t=li(e,2);t!==null&&yu(t,e,2)}function Yo(e){var t=Po();if(typeof e==`function`){var n=e;if(e=n(),xo){We(!0);try{n()}finally{We(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bo,lastRenderedState:e},t}function Xo(e,t,n,r){return e.baseState=n,Ho(e,_o,typeof r==`function`?r:Bo)}function Zo(e,t,n,r,a){if(Rs(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};D.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Qo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Qo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=D.T,o={};D.T=o;try{var s=n(i,r),c=D.S;c!==null&&c(o,s),$o(e,t,s)}catch(n){ts(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),D.T=a}}else try{a=n(i,r),$o(e,t,a)}catch(n){ts(e,t,n)}}function $o(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){es(e,t,n)},function(n){return ts(e,t,n)}):es(e,t,n)}function es(e,t,n){t.status=`fulfilled`,t.value=n,ns(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Qo(e,n)))}function ts(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,ns(t),t=t.next;while(t!==r)}e.action=null}function ns(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function B(e,t){return t}function rs(e,t){if(N){var n=Hl.formState;if(n!==null){a:{var r=L;if(N){if(Bi){b:{for(var i=Bi,a=Hi;i.nodeType!==8;){if(!a){i=null;break b}if(i=uf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Bi=uf(i.nextSibling),r=i.data===`F!`;break a}}Wi(r)}r=!1}r&&(t=n[0])}}return n=Po(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:B,lastRenderedState:t},n.queue=r,n=Fs.bind(null,L,r),r.dispatch=n,r=Yo(!1),a=Ls.bind(null,L,!1,r.queue),r=Po(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Zo.bind(null,L,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function is(e){return as(Fo(),_o,e)}function as(e,t,n){if(t=Ho(e,t,B)[0],e=Vo(Bo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Lo(t)}catch(e){throw e===Oa?Aa:e}else r=t;t=Fo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(L.flags|=2048,cs(9,{destroy:void 0},os.bind(null,i,n),null)),[r,a,e]}function os(e,t){e.action=t}function ss(e){var t=Fo(),n=_o;if(n!==null)return as(t,n,e);Fo(),t=t.memoizedState,n=Fo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function cs(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=L.updateQueue,t===null&&(t=Io(),L.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ls(){return Fo().memoizedState}function us(e,t,n,r){var i=Po();L.flags|=e,i.memoizedState=cs(1|t,{destroy:void 0},n,r===void 0?null:r)}function ds(e,t,n,r){var i=Fo();r=r===void 0?null:r;var a=i.memoizedState.inst;_o!==null&&r!==null&&Do(r,_o.memoizedState.deps)?i.memoizedState=cs(t,a,n,r):(L.flags|=e,i.memoizedState=cs(1|t,a,n,r))}function fs(e,t){us(8390656,8,e,t)}function ps(e,t){ds(2048,8,e,t)}function ms(e){L.flags|=4;var t=L.updateQueue;if(t===null)t=Io(),L.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function hs(e){var t=Fo().memoizedState;return ms({ref:t,nextImpl:e}),function(){if(U&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function gs(e,t){return ds(4,2,e,t)}function _s(e,t){return ds(4,4,e,t)}function vs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ys(e,t,n){n=n==null?null:n.concat([e]),ds(4,4,vs.bind(null,t,e),n)}function bs(){}function xs(e,t){var n=Fo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Do(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ss(e,t){var n=Fo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Do(t,r[1]))return r[0];if(r=e(),xo){We(!0);try{e()}finally{We(!1)}}return n.memoizedState=[r,t],r}function Cs(e,t,n){return n===void 0||go&1073741824&&!(G&261930)?e.memoizedState=t:(e.memoizedState=n,e=vu(),L.lanes|=e,Yl|=e,n)}function ws(e,t,n,r){return Or(n,t)?n:io.current===null?!(go&42)||go&1073741824&&!(G&261930)?(oc=!0,e.memoizedState=n):(e=vu(),L.lanes|=e,Yl|=e,t):(e=Cs(e,n,r),Or(e,t)||(oc=!0),e)}function Ts(e,t,n,r,i){var a=O.p;O.p=a!==0&&8>a?a:8;var o=D.T,s={};D.T=s,Ls(e,!1,t,n);try{var c=i(),l=D.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Is(e,t,Sa(c,r),_u(e)):Is(e,t,r,_u(e))}catch(n){Is(e,t,{then:function(){},status:`rejected`,reason:n},_u())}finally{O.p=a,o!==null&&s.types!==null&&(o.types=s.types),D.T=o}}function Es(){}function Ds(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Os(e).queue;Ts(e,a,t,le,n===null?Es:function(){return ks(e),n(r)})}function Os(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:le,baseState:le,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bo,lastRenderedState:le},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ks(e){var t=Os(e);t.next===null&&(t=e.alternate.memoizedState),Is(e,t.next.queue,{},_u())}function As(){return sa(ep)}function js(){return Fo().memoizedState}function Ms(){return Fo().memoizedState}function Ns(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=_u();e=Ya(n);var r=Xa(t,e,n);r!==null&&(yu(r,t,n),Za(r,t,n)),t={cache:ma()},e.payload=t;return}t=t.return}}function Ps(e,t,n){var r=_u();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Rs(e)?zs(t,n):(n=ci(e,t,n,r),n!==null&&(yu(n,e,r),Bs(n,t,r)))}function Fs(e,t,n){Is(e,t,n,_u())}function Is(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Rs(e))zs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Or(s,o))return si(e,t,i,0),Hl===null&&oi(),!1}catch{}if(n=ci(e,t,i,r),n!==null)return yu(n,e,r),Bs(n,t,r),!0}return!1}function Ls(e,t,n,r){if(r={lane:2,revertLane:gd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Rs(e)){if(t)throw Error(i(479))}else t=ci(e,n,r,2),t!==null&&yu(t,e,2)}function Rs(e){var t=e.alternate;return e===L||t!==null&&t===L}function zs(e,t){bo=yo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Bs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ot(e,n)}}var Vs={readContext:sa,use:Ro,useCallback:Eo,useContext:Eo,useEffect:Eo,useImperativeHandle:Eo,useLayoutEffect:Eo,useInsertionEffect:Eo,useMemo:Eo,useReducer:Eo,useRef:Eo,useState:Eo,useDebugValue:Eo,useDeferredValue:Eo,useTransition:Eo,useSyncExternalStore:Eo,useId:Eo,useHostTransitionStatus:Eo,useFormState:Eo,useActionState:Eo,useOptimistic:Eo,useMemoCache:Eo,useCacheRefresh:Eo};Vs.useEffectEvent=Eo;var Hs={readContext:sa,use:Ro,useCallback:function(e,t){return Po().memoizedState=[e,t===void 0?null:t],e},useContext:sa,useEffect:fs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),us(4194308,4,vs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return us(4194308,4,e,t)},useInsertionEffect:function(e,t){us(4,2,e,t)},useMemo:function(e,t){var n=Po();t=t===void 0?null:t;var r=e();if(xo){We(!0);try{e()}finally{We(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Po();if(n!==void 0){var i=n(t);if(xo){We(!0);try{n(t)}finally{We(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ps.bind(null,L,e),[r.memoizedState,e]},useRef:function(e){var t=Po();return e={current:e},t.memoizedState=e},useState:function(e){e=Yo(e);var t=e.queue,n=Fs.bind(null,L,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:bs,useDeferredValue:function(e,t){return Cs(Po(),e,t)},useTransition:function(){var e=Yo(!1);return e=Ts.bind(null,L,e.queue,!0,!1),Po().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=L,a=Po();if(N){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Hl===null)throw Error(i(349));G&127||Go(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,fs(Ko.bind(null,r,o,e),[e]),r.flags|=2048,cs(9,{destroy:void 0},z.bind(null,r,o,n,t),null),n},useId:function(){var e=Po(),t=Hl.identifierPrefix;if(N){var n=Ni,r=Mi;n=(r&~(1<<32-Ge(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=So++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=To++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:As,useFormState:rs,useActionState:rs,useOptimistic:function(e){var t=Po();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ls.bind(null,L,!0,n),n.dispatch=t,[e,t]},useMemoCache:zo,useCacheRefresh:function(){return Po().memoizedState=Ns.bind(null,L)},useEffectEvent:function(e){var t=Po(),n={impl:e};return t.memoizedState=n,function(){if(U&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Us={readContext:sa,use:Ro,useCallback:xs,useContext:sa,useEffect:ps,useImperativeHandle:ys,useInsertionEffect:gs,useLayoutEffect:_s,useMemo:Ss,useReducer:Vo,useRef:ls,useState:function(){return Vo(Bo)},useDebugValue:bs,useDeferredValue:function(e,t){return ws(Fo(),_o.memoizedState,e,t)},useTransition:function(){var e=Vo(Bo)[0],t=Fo().memoizedState;return[typeof e==`boolean`?e:Lo(e),t]},useSyncExternalStore:Wo,useId:js,useHostTransitionStatus:As,useFormState:is,useActionState:is,useOptimistic:function(e,t){return Xo(Fo(),_o,e,t)},useMemoCache:zo,useCacheRefresh:Ms};Us.useEffectEvent=hs;var Ws={readContext:sa,use:Ro,useCallback:xs,useContext:sa,useEffect:ps,useImperativeHandle:ys,useInsertionEffect:gs,useLayoutEffect:_s,useMemo:Ss,useReducer:Uo,useRef:ls,useState:function(){return Uo(Bo)},useDebugValue:bs,useDeferredValue:function(e,t){var n=Fo();return _o===null?Cs(n,e,t):ws(n,_o.memoizedState,e,t)},useTransition:function(){var e=Uo(Bo)[0],t=Fo().memoizedState;return[typeof e==`boolean`?e:Lo(e),t]},useSyncExternalStore:Wo,useId:js,useHostTransitionStatus:As,useFormState:ss,useActionState:ss,useOptimistic:function(e,t){var n=Fo();return _o===null?(n.baseState=e,[e,n.queue.dispatch]):Xo(n,_o,e,t)},useMemoCache:zo,useCacheRefresh:Ms};Ws.useEffectEvent=hs;function Gs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:f({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ks={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=_u(),i=Ya(r);i.payload=t,n!=null&&(i.callback=n),t=Xa(e,i,r),t!==null&&(yu(t,e,r),Za(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=_u(),i=Ya(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Xa(e,i,r),t!==null&&(yu(t,e,r),Za(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=_u(),r=Ya(n);r.tag=2,t!=null&&(r.callback=t),t=Xa(e,r,n),t!==null&&(yu(t,e,n),Za(t,e,n))}};function qs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!kr(n,r)||!kr(i,a):!0}function Js(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ks.enqueueReplaceState(t,t.state,null)}function Ys(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=f({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Xs(e){ni(e)}function Zs(e){console.error(e)}function Qs(e){ni(e)}function $s(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function ec(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function tc(e,t,n){return n=Ya(n),n.tag=3,n.payload={element:null},n.callback=function(){$s(e,t)},n}function nc(e){return e=Ya(e),e.tag=3,e}function rc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){ec(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){ec(t,n,r),typeof i!=`function`&&(su===null?su=new Set([this]):su.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function ic(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&ia(t,n,a,!0),n=lo.current,n!==null){switch(n.tag){case 31:case 13:return P===null?ju():n.alternate===null&&Jl===0&&(Jl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===ja?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Xu(e,r,a)),!1;case 22:return n.flags|=65536,r===ja?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Xu(e,r,a)),!1}throw Error(i(435,n.tag))}return Xu(e,r,a),ju(),!1}if(N)return t=lo.current,t===null?(r!==Ui&&(t=Error(i(423),{cause:r}),Xi(wi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=wi(r,n),a=tc(e.stateNode,r,a),Qa(e,a),Jl!==4&&(Jl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Ui&&(e=Error(i(422),{cause:r}),Xi(wi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=wi(o,n),eu===null?eu=[o]:eu.push(o),Jl!==4&&(Jl=2),t===null)return!0;r=wi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=tc(n.stateNode,r,e),Qa(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(su===null||!su.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=nc(a),rc(a,e,n,r),Qa(n,a),!1}n=n.return}while(n!==null);return!1}var ac=Error(i(461)),oc=!1;function sc(e,t,n,r){t.child=e===null?Ga(t,null,n,r):Wa(t,e.child,n,r)}function cc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return oa(t),r=Oo(e,t,n,o,a,i),s=Mo(),e!==null&&!oc?(R(e,t,i),Mc(e,t,i)):(N&&s&&Ii(t),t.flags|=1,sc(e,t,r,i),t.child)}function lc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!hi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,uc(e,t,a,r,i)):(e=vi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Nc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?kr:n,n(o,r)&&e.ref===t.ref)return Mc(e,t,i)}return t.flags|=1,e=gi(a,r),e.ref=t.ref,e.return=t,t.child=e}function uc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(kr(a,r)&&e.ref===t.ref)if(oc=!1,t.pendingProps=r=a,Nc(e,i))e.flags&131072&&(oc=!0);else return t.lanes=e.lanes,Mc(e,t,i)}return vc(e,t,n,r,i)}function dc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return pc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ea(t,a===null?null:a.cachePool),a===null?so():oo(t,a),F(t);else return r=t.lanes=536870912,pc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ea(t,null),so(),I(t)):(Ea(t,a.cachePool),oo(t,a),I(t),t.memoizedState=null);return sc(e,t,i,n),t.child}function fc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function pc(e,t,n,r,i){var a=Ta();return a=a===null?null:{parent:pa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ea(t,null),so(),F(t),e!==null&&ia(e,t,r,!0),t.childLanes=i,null}function mc(e,t){return t=Dc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function hc(e,t,n){return Wa(t,e.child,null,n),e=mc(t,t.pendingProps),e.flags|=2,po(t),t.memoizedState=null,e}function gc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(N){if(r.mode===`hidden`)return e=mc(t,r),t.lanes=536870912,fc(null,e);if(fo(t),(e=Bi)?(e=of(e,Hi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ji===null?null:{id:Mi,overflow:Ni},retryLane:536870912,hydrationErrors:null},n=xi(e),n.return=t,t.child=n,zi=t,Bi=null)):e=null,e===null)throw Wi(t);return t.lanes=536870912,null}return mc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(fo(t),a)if(t.flags&256)t.flags&=-257,t=hc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(oc||ia(e,t,n,!1),a=(n&e.childLanes)!==0,oc||a){if(r=Hl,r!==null&&(s=st(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,li(e,s),yu(r,e,s),ac;ju(),t=hc(e,t,n)}else e=o.treeContext,Bi=uf(s.nextSibling),zi=t,N=!0,Vi=null,Hi=!1,e!==null&&Ri(t,e),t=mc(t,r),t.flags|=4096;return t}return e=gi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function _c(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function vc(e,t,n,r,i){return oa(t),n=Oo(e,t,n,r,void 0,i),r=Mo(),e!==null&&!oc?(R(e,t,i),Mc(e,t,i)):(N&&r&&Ii(t),t.flags|=1,sc(e,t,n,i),t.child)}function yc(e,t,n,r,i,a){return oa(t),t.updateQueue=null,n=Ao(t,r,n,i),ko(e),r=Mo(),e!==null&&!oc?(R(e,t,a),Mc(e,t,a)):(N&&r&&Ii(t),t.flags|=1,sc(e,t,n,a),t.child)}function bc(e,t,n,r,i){if(oa(t),t.stateNode===null){var a=fi,o=n.contextType;typeof o==`object`&&o&&(a=sa(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Ks,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},qa(t),o=n.contextType,a.context=typeof o==`object`&&o?sa(o):fi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Gs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Ks.enqueueReplaceState(a,a.state,null),to(t,r,a,i),eo(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Ys(n,s);a.props=c;var l=a.context,u=n.contextType;o=fi,typeof u==`object`&&u&&(o=sa(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Js(t,a,r,o),Ka=!1;var f=t.memoizedState;a.state=f,to(t,r,a,i),eo(),l=t.memoizedState,s||f!==l||Ka?(typeof d==`function`&&(Gs(t,n,d,r),l=t.memoizedState),(c=Ka||qs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Ja(e,t),o=t.memoizedProps,u=Ys(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=fi,typeof l==`object`&&l&&(c=sa(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Js(t,a,r,c),Ka=!1,f=t.memoizedState,a.state=f,to(t,r,a,i),eo();var p=t.memoizedState;o!==d||f!==p||Ka||e!==null&&e.dependencies!==null&&aa(e.dependencies)?(typeof s==`function`&&(Gs(t,n,s,r),p=t.memoizedState),(u=Ka||qs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&aa(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,_c(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Wa(t,e.child,null,i),t.child=Wa(t,null,n,i)):sc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Mc(e,t,i),e}function xc(e,t,n,r){return Ji(),t.flags|=256,sc(e,t,n,r),t.child}var Sc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Cc(e){return{baseLanes:e,cachePool:Da()}}function wc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Ql),e}function Tc(e,t,n){var r=t.pendingProps,a=!1,o=!!(t.flags&128),s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:!!(mo.current&2)),s&&(a=!0,t.flags&=-129),s=!!(t.flags&32),t.flags&=-33,e===null){if(N){if(a?uo(t):I(t),(e=Bi)?(e=of(e,Hi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ji===null?null:{id:Mi,overflow:Ni},retryLane:536870912,hydrationErrors:null},n=xi(e),n.return=t,t.child=n,zi=t,Bi=null)):e=null,e===null)throw Wi(t);return cf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(I(t),a=t.mode,c=Dc({mode:`hidden`,children:c},a),r=yi(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=Cc(n),r.childLanes=wc(e,s,n),t.memoizedState=Sc,fc(null,r)):(uo(t),Ec(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(uo(t),t.flags&=-257,t=Oc(e,t,n)):t.memoizedState===null?(I(t),c=r.fallback,a=t.mode,r=Dc({mode:`visible`,children:r.children},a),c=yi(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Wa(t,e.child,null,n),r=t.child,r.memoizedState=Cc(n),r.childLanes=wc(e,s,n),t.memoizedState=Sc,t=fc(null,r)):(I(t),t.child=e.child,t.flags|=128,t=null);else if(uo(t),cf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Xi({value:r,source:null,stack:null}),t=Oc(e,t,n)}else if(oc||ia(e,t,n,!1),s=(n&e.childLanes)!==0,oc||s){if(s=Hl,s!==null&&(r=st(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,li(e,r),yu(s,e,r),ac;sf(c)||ju(),t=Oc(e,t,n)}else sf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Bi=uf(c.nextSibling),zi=t,N=!0,Vi=null,Hi=!1,e!==null&&Ri(t,e),t=Ec(t,r.children),t.flags|=4096);return t}return a?(I(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=gi(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=yi(c,a,n,null),c.flags|=2):c=gi(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,fc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=Cc(n):(a=c.cachePool,a===null?a=Da():(l=pa._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=wc(e,s,n),t.memoizedState=Sc,fc(e.child,r)):(uo(t),n=e.child,e=n.sibling,n=gi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Ec(e,t){return t=Dc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Dc(e,t){return e=mi(22,e,null,t),e.lanes=0,e}function Oc(e,t,n){return Wa(t,e.child,null,n),e=Ec(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function kc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),na(e.return,t,n)}function Ac(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function jc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=mo.current,s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,k(mo,o),sc(e,t,r,n),r=N?Oi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&kc(e,n,t);else if(e.tag===19)kc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&ho(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Ac(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ho(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Ac(t,!0,n,null,a,r);break;case`together`:Ac(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Mc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Yl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(ia(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=gi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=gi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Nc(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&aa(e)))}function Pc(e,t,n){switch(t.tag){case 3:ve(t,t.stateNode.containerInfo),ea(t,pa,e.memoizedState.cache),Ji();break;case 27:case 5:be(t);break;case 4:ve(t,t.stateNode.containerInfo);break;case 10:ea(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,fo(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(uo(t),e=Mc(e,t,n),e===null?null:e.sibling):Tc(e,t,n):(uo(t),t.flags|=128,null);uo(t);break;case 19:var i=!!(e.flags&128);if(r=(n&t.childLanes)!==0,r||=(ia(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return jc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),k(mo,mo.current),r)break;return null;case 22:return t.lanes=0,dc(e,t,n,t.pendingProps);case 24:ea(t,pa,e.memoizedState.cache)}return Mc(e,t,n)}function Fc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)oc=!0;else{if(!Nc(e,n)&&!(t.flags&128))return oc=!1,Pc(e,t,n);oc=!!(e.flags&131072)}else oc=!1,N&&t.flags&1048576&&Fi(t,Oi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Pa(t.elementType),t.type=e,typeof e==`function`)hi(e)?(r=Ys(e,r),t.tag=1,t=bc(null,t,e,r,n)):(t.tag=0,t=vc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=cc(null,t,e,r,n);break a}if(a===te){t.tag=14,t=lc(null,t,e,r,n);break a}}throw t=se(e)||e,Error(i(306,t,``))}}return t;case 0:return vc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Ys(r,t.pendingProps),bc(e,t,r,a,n);case 3:a:{if(ve(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Ja(e,t),to(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ea(t,pa,r),r!==o.cache&&ra(t,[pa],n,!0),eo(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=xc(e,t,r,n);break a}else if(r!==a){a=wi(Error(i(424)),t),Xi(a),t=xc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Bi=uf(e.firstChild),zi=t,N=!0,Vi=null,Hi=!0,n=Ga(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Ji(),r===a){t=Mc(e,t,n);break a}sc(e,t,r,n)}t=t.child}return t;case 26:return _c(e,t),e===null?(n=jf(t.type,null,t.pendingProps,null))?t.memoizedState=n:N||(n=t.type,e=t.pendingProps,r=Kd(ge.current).createElement(n),r[ft]=t,r[pt]=e,Bd(r,n,e),Tt(r),t.stateNode=r):t.memoizedState=jf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return be(t),e===null&&N&&(r=t.stateNode=mf(t.type,t.pendingProps,ge.current),zi=t,Hi=!0,a=Bi,$d(t.type)?(df=a,Bi=uf(r.firstChild)):Bi=a),sc(e,t,t.pendingProps.children,n),_c(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&N&&((a=r=Bi)&&(r=rf(r,t.type,t.pendingProps,Hi),r===null?a=!1:(t.stateNode=r,zi=t,Bi=uf(r.firstChild),Hi=!1,a=!0)),a||Wi(t)),be(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,qd(a,o)?r=null:s!==null&&qd(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Oo(e,t,jo,null,null,n),ep._currentValue=a),_c(e,t),sc(e,t,r,n),t.child;case 6:return e===null&&N&&((e=n=Bi)&&(n=af(n,t.pendingProps,Hi),n===null?e=!1:(t.stateNode=n,zi=t,Bi=null,e=!0)),e||Wi(t)),null;case 13:return Tc(e,t,n);case 4:return ve(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Wa(t,null,r,n):sc(e,t,r,n),t.child;case 11:return cc(e,t,t.type,t.pendingProps,n);case 7:return sc(e,t,t.pendingProps,n),t.child;case 8:return sc(e,t,t.pendingProps.children,n),t.child;case 12:return sc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,ea(t,t.type,r.value),sc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,oa(t),a=sa(a),r=r(a),t.flags|=1,sc(e,t,r,n),t.child;case 14:return lc(e,t,t.type,t.pendingProps,n);case 15:return uc(e,t,t.type,t.pendingProps,n);case 19:return jc(e,t,n);case 31:return gc(e,t,n);case 22:return dc(e,t,n,t.pendingProps);case 24:return oa(t),r=sa(pa),e===null?(a=Ta(),a===null&&(a=Hl,o=ma(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},qa(t),ea(t,pa,a)):((e.lanes&n)!==0&&(Ja(e,t),to(t,null,null,n),eo()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,ea(t,pa,r),r!==a.cache&&ra(t,[pa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),ea(t,pa,r))),sc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Ic(e){e.flags|=4}function Lc(e,t,n,r,i){if((t=!!(e.mode&32))&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Ou())e.flags|=8192;else throw Fa=ja,ka}else e.flags&=-16777217}function Rc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Kf(t))if(Ou())e.flags|=8192;else throw Fa=ja,ka}function zc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:tt(),e.lanes|=t,$l|=t)}function V(e,t){if(!N)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function H(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Bc(e,t,n){var r=t.pendingProps;switch(Li(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return H(t),null;case 1:return H(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ta(pa),ye(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(qi(t)?Ic(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Yi())),H(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Ic(t),o===null?(H(t),Lc(t,a,null,r,n)):(H(t),Rc(t,o))):o?o===e.memoizedState?(H(t),t.flags&=-16777217):(Ic(t),H(t),Rc(t,o)):(e=e.memoizedProps,e!==r&&Ic(t),H(t),Lc(t,a,e,r,n)),null;case 27:if(xe(t),n=ge.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Ic(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return H(t),null}e=me.current,qi(t)?Gi(t,e):(e=mf(a,r,n),t.stateNode=e,Ic(t))}return H(t),null;case 5:if(xe(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Ic(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return H(t),null}if(o=me.current,qi(t))Gi(t,o);else{var s=Kd(ge.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[ft]=t,o[pt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Bd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Ic(t)}}return H(t),Lc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Ic(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=ge.current,qi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=zi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[ft]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Ld(e.nodeValue,n)),e||Wi(t,!0)}else e=Kd(e).createTextNode(r),e[ft]=t,t.stateNode=e}return H(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=qi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[ft]=t}else Ji(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;H(t),e=!1}else n=Yi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(po(t),t):(po(t),null);if(t.flags&128)throw Error(i(558))}return H(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=qi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[ft]=t}else Ji(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;H(t),a=!1}else a=Yi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(po(t),t):(po(t),null)}return po(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),zc(t,t.updateQueue),H(t),null);case 4:return ye(),e===null&&Dd(t.stateNode.containerInfo),H(t),null;case 10:return ta(t.type),H(t),null;case 19:if(pe(mo),r=t.memoizedState,r===null)return H(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null)if(a)V(r,!1);else{if(Jl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=ho(e),o!==null){for(t.flags|=128,V(r,!1),e=o.updateQueue,t.updateQueue=e,zc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)_i(n,e),n=n.sibling;return k(mo,mo.current&1|2),N&&Pi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Pe()>au&&(t.flags|=128,a=!0,V(r,!1),t.lanes=4194304)}else{if(!a)if(e=ho(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,zc(t,e),V(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!N)return H(t),null}else 2*Pe()-r.renderingStartTime>au&&n!==536870912&&(t.flags|=128,a=!0,V(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(H(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Pe(),e.sibling=null,n=mo.current,k(mo,a?n&1|2:n&1),N&&Pi(t,r.treeForkCount),e);case 22:case 23:return po(t),co(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(H(t),t.subtreeFlags&6&&(t.flags|=8192)):H(t),n=t.updateQueue,n!==null&&zc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&pe(wa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ta(pa),H(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Vc(e,t){switch(Li(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ta(pa),ye(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return xe(t),null;case 31:if(t.memoizedState!==null){if(po(t),t.alternate===null)throw Error(i(340));Ji()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(po(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Ji()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return pe(mo),null;case 4:return ye(),null;case 10:return ta(t.type),null;case 22:case 23:return po(t),co(),e!==null&&pe(wa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ta(pa),null;case 25:return null;default:return null}}function Hc(e,t){switch(Li(t),t.tag){case 3:ta(pa),ye();break;case 26:case 27:case 5:xe(t);break;case 4:ye();break;case 31:t.memoizedState!==null&&po(t);break;case 13:po(t);break;case 19:pe(mo);break;case 10:ta(t.type);break;case 22:case 23:po(t),co(),e!==null&&pe(wa);break;case 24:ta(pa)}}function Uc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Yu(t,t.return,e)}}function Wc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Yu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Yu(t,t.return,e)}}function Gc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{ro(t,n)}catch(t){Yu(e,e.return,t)}}}function Kc(e,t,n){n.props=Ys(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Yu(e,t,n)}}function qc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Yu(e,t,n)}}function Jc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Yu(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Yu(e,t,n)}else n.current=null}function Yc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Yu(e,e.return,t)}}function Xc(e,t,n){try{var r=e.stateNode;Vd(r,e.type,n,t),r[pt]=t}catch(t){Yu(e,e.return,t)}}function Zc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&$d(e.type)||e.tag===4}function Qc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Zc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&$d(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function $c(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=on));else if(r!==4&&(r===27&&$d(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for($c(e,t,n),e=e.sibling;e!==null;)$c(e,t,n),e=e.sibling}function el(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&$d(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(el(e,t,n),e=e.sibling;e!==null;)el(e,t,n),e=e.sibling}function tl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Bd(t,r,n),t[ft]=e,t[pt]=n}catch(t){Yu(e,e.return,t)}}var nl=!1,rl=!1,il=!1,al=typeof WeakSet==`function`?WeakSet:Set,ol=null;function sl(e,t){if(e=e.containerInfo,Wd=cp,e=Nr(e),Pr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Gd={focusedElem:e,selectionRange:n},cp=!1,ol=t;ol!==null;)if(t=ol,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,ol=e;else for(;ol!==null;){switch(t=ol,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Ys(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Yu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)nf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:nf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,ol=e;break}ol=t.return}}function cl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Cl(e,n),r&4&&Uc(5,n);break;case 1:if(Cl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Yu(n,n.return,e)}else{var i=Ys(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Yu(n,n.return,e)}}r&64&&Gc(n),r&512&&qc(n,n.return);break;case 3:if(Cl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{ro(e,t)}catch(e){Yu(n,n.return,e)}}break;case 27:t===null&&r&4&&tl(n);case 26:case 5:Cl(e,n),t===null&&r&4&&Yc(n),r&512&&qc(n,n.return);break;case 12:Cl(e,n);break;case 31:Cl(e,n),r&4&&ml(e,n);break;case 13:Cl(e,n),r&4&&hl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=$u.bind(null,n),lf(e,n))));break;case 22:if(r=n.memoizedState!==null||nl,!r){t=t!==null&&t.memoizedState!==null||rl,i=nl;var a=rl;nl=r,(rl=t)&&!a?Tl(e,n,!!(n.subtreeFlags&8772)):Cl(e,n),nl=i,rl=a}break;case 30:break;default:Cl(e,n)}}function ll(e){var t=e.alternate;t!==null&&(e.alternate=null,ll(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&bt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ul=null,dl=!1;function fl(e,t,n){for(n=n.child;n!==null;)pl(e,t,n),n=n.sibling}function pl(e,t,n){if(Ue&&typeof Ue.onCommitFiberUnmount==`function`)try{Ue.onCommitFiberUnmount(He,n)}catch{}switch(n.tag){case 26:rl||Jc(n,t),fl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:rl||Jc(n,t);var r=ul,i=dl;$d(n.type)&&(ul=n.stateNode,dl=!1),fl(e,t,n),hf(n.stateNode),ul=r,dl=i;break;case 5:rl||Jc(n,t);case 6:if(r=ul,i=dl,ul=null,fl(e,t,n),ul=r,dl=i,ul!==null)if(dl)try{(ul.nodeType===9?ul.body:ul.nodeName===`HTML`?ul.ownerDocument.body:ul).removeChild(n.stateNode)}catch(e){Yu(n,t,e)}else try{ul.removeChild(n.stateNode)}catch(e){Yu(n,t,e)}break;case 18:ul!==null&&(dl?(e=ul,ef(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Pp(e)):ef(ul,n.stateNode));break;case 4:r=ul,i=dl,ul=n.stateNode.containerInfo,dl=!0,fl(e,t,n),ul=r,dl=i;break;case 0:case 11:case 14:case 15:Wc(2,n,t),rl||Wc(4,n,t),fl(e,t,n);break;case 1:rl||(Jc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Kc(n,t,r)),fl(e,t,n);break;case 21:fl(e,t,n);break;case 22:rl=(r=rl)||n.memoizedState!==null,fl(e,t,n),rl=r;break;default:fl(e,t,n)}}function ml(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Pp(e)}catch(e){Yu(t,t.return,e)}}}function hl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Pp(e)}catch(e){Yu(t,t.return,e)}}function gl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new al),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new al),t;default:throw Error(i(435,e.tag))}}function _l(e,t){var n=gl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=ed.bind(null,e,t);t.then(r,r)}})}function vl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if($d(c.type)){ul=c.stateNode,dl=!1;break a}break;case 5:ul=c.stateNode,dl=!1;break a;case 3:case 4:ul=c.stateNode.containerInfo,dl=!0;break a}c=c.return}if(ul===null)throw Error(i(160));pl(o,s,a),ul=null,dl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)bl(t,e),t=t.sibling}var yl=null;function bl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:vl(t,e),xl(e),r&4&&(Wc(3,e,e.return),Uc(3,e),Wc(5,e,e.return));break;case 1:vl(t,e),xl(e),r&512&&(rl||n===null||Jc(n,n.return)),r&64&&nl&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=yl;if(vl(t,e),xl(e),r&512&&(rl||n===null||Jc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[yt]||o[ft]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Bd(o,r,n),o[ft]=e,Tt(o),r=o;break a;case`link`:var s=Uf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Bd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Uf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Bd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[ft]=e,Tt(o),r=o}e.stateNode=r}else Wf(a,e.type,e.stateNode);else e.stateNode=Rf(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Xc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Wf(a,e.type,e.stateNode):Rf(a,r,e.memoizedProps))}break;case 27:vl(t,e),xl(e),r&512&&(rl||n===null||Jc(n,n.return)),n!==null&&r&4&&Xc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(vl(t,e),xl(e),r&512&&(rl||n===null||Jc(n,n.return)),e.flags&32){a=e.stateNode;try{Zt(a,``)}catch(t){Yu(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Xc(e,a,n===null?a:n.memoizedProps)),r&1024&&(il=!0);break;case 6:if(vl(t,e),xl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Yu(e,e.return,t)}}break;case 3:if(Hf=null,a=yl,yl=vf(t.containerInfo),vl(t,e),yl=a,xl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Pp(t.containerInfo)}catch(t){Yu(e,e.return,t)}il&&(il=!1,Sl(e));break;case 4:r=yl,yl=vf(e.stateNode.containerInfo),vl(t,e),xl(e),yl=r;break;case 12:vl(t,e),xl(e);break;case 31:vl(t,e),xl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,_l(e,r)));break;case 13:vl(t,e),xl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(ru=Pe()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,_l(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=nl,d=rl;if(nl=u||a,rl=d||l,vl(t,e),rl=d,nl=u,xl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||nl||rl||wl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Yu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Yu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?tf(m,!0):tf(l.stateNode,!1)}catch(e){Yu(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,_l(e,n))));break;case 19:vl(t,e),xl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,_l(e,r)));break;case 30:break;case 21:break;default:vl(t,e),xl(e)}}function xl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Zc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;el(e,Qc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Zt(o,``),n.flags&=-33),el(e,Qc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;$c(e,Qc(e),s);break;default:throw Error(i(161))}}catch(t){Yu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Sl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Sl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Cl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)cl(e,t.alternate,t),t=t.sibling}function wl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Wc(4,t,t.return),wl(t);break;case 1:Jc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Kc(t,t.return,n),wl(t);break;case 27:hf(t.stateNode);case 26:case 5:Jc(t,t.return),wl(t);break;case 22:t.memoizedState===null&&wl(t);break;case 30:wl(t);break;default:wl(t)}e=e.sibling}}function Tl(e,t,n){for(n&&=!!(t.subtreeFlags&8772),t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:Tl(i,a,n),Uc(4,a);break;case 1:if(Tl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Yu(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)no(c[i],s)}catch(e){Yu(r,r.return,e)}}n&&o&64&&Gc(a),qc(a,a.return);break;case 27:tl(a);case 26:case 5:Tl(i,a,n),n&&r===null&&o&4&&Yc(a),qc(a,a.return);break;case 12:Tl(i,a,n);break;case 31:Tl(i,a,n),n&&o&4&&ml(i,a);break;case 13:Tl(i,a,n),n&&o&4&&hl(i,a);break;case 22:a.memoizedState===null&&Tl(i,a,n),qc(a,a.return);break;case 30:break;default:Tl(i,a,n)}t=t.sibling}}function El(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ha(n))}function Dl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ha(e))}function Ol(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)kl(e,t,n,r),t=t.sibling}function kl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Ol(e,t,n,r),i&2048&&Uc(9,t);break;case 1:Ol(e,t,n,r);break;case 3:Ol(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ha(e)));break;case 12:if(i&2048){Ol(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Yu(t,t.return,e)}}else Ol(e,t,n,r);break;case 31:Ol(e,t,n,r);break;case 13:Ol(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Ol(e,t,n,r):(a._visibility|=2,Al(e,t,n,r,!!(t.subtreeFlags&10256)||!1)):a._visibility&2?Ol(e,t,n,r):jl(e,t),i&2048&&El(o,t);break;case 24:Ol(e,t,n,r),i&2048&&Dl(t.alternate,t);break;default:Ol(e,t,n,r)}}function Al(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Al(a,o,s,c,i),Uc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Al(a,o,s,c,i)):u._visibility&2?Al(a,o,s,c,i):jl(a,o),i&&l&2048&&El(o.alternate,o);break;case 24:Al(a,o,s,c,i),i&&l&2048&&Dl(o.alternate,o);break;default:Al(a,o,s,c,i)}t=t.sibling}}function jl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:jl(n,r),i&2048&&El(r.alternate,r);break;case 24:jl(n,r),i&2048&&Dl(r.alternate,r);break;default:jl(n,r)}t=t.sibling}}var Ml=8192;function Nl(e,t,n){if(e.subtreeFlags&Ml)for(e=e.child;e!==null;)Pl(e,t,n),e=e.sibling}function Pl(e,t,n){switch(e.tag){case 26:Nl(e,t,n),e.flags&Ml&&e.memoizedState!==null&&qf(n,yl,e.memoizedState,e.memoizedProps);break;case 5:Nl(e,t,n);break;case 3:case 4:var r=yl;yl=vf(e.stateNode.containerInfo),Nl(e,t,n),yl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Ml,Ml=16777216,Nl(e,t,n),Ml=r):Nl(e,t,n));break;default:Nl(e,t,n)}}function Fl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Il(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ol=r,zl(r,e)}Fl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ll(e),e=e.sibling}function Ll(e){switch(e.tag){case 0:case 11:case 15:Il(e),e.flags&2048&&Wc(9,e,e.return);break;case 3:Il(e);break;case 12:Il(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Rl(e)):Il(e);break;default:Il(e)}}function Rl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ol=r,zl(r,e)}Fl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Wc(8,t,t.return),Rl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Rl(t));break;default:Rl(t)}e=e.sibling}}function zl(e,t){for(;ol!==null;){var n=ol;switch(n.tag){case 0:case 11:case 15:Wc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:ha(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,ol=r;else a:for(n=e;ol!==null;){r=ol;var i=r.sibling,a=r.return;if(ll(r),r===n){ol=null;break a}if(i!==null){i.return=a,ol=i;break a}ol=a}}}var Bl={getCacheForType:function(e){var t=sa(pa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return sa(pa).controller.signal}},Vl=typeof WeakMap==`function`?WeakMap:Map,U=0,Hl=null,W=null,G=0,K=0,Ul=null,Wl=!1,Gl=!1,Kl=!1,ql=0,Jl=0,Yl=0,Xl=0,Zl=0,Ql=0,$l=0,eu=null,tu=null,nu=!1,ru=0,iu=0,au=1/0,ou=null,su=null,cu=0,lu=null,uu=null,du=0,fu=0,pu=null,mu=null,hu=0,gu=null;function _u(){return U&2&&G!==0?G&-G:D.T===null?M():gd()}function vu(){if(Ql===0)if(!(G&536870912)||N){var e=Xe;Xe<<=1,!(Xe&3932160)&&(Xe=262144),Ql=e}else Ql=536870912;return e=lo.current,e!==null&&(e.flags|=32),Ql}function yu(e,t,n){(e===Hl&&(K===2||K===9)||e.cancelPendingCommit!==null)&&(Eu(e,0),Cu(e,G,Ql,!1)),rt(e,n),(!(U&2)||e!==Hl)&&(e===Hl&&(!(U&2)&&(Xl|=n),Jl===4&&Cu(e,G,Ql,!1)),cd(e))}function bu(e,t,n){if(U&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||$e(e,t),a=r?Pu(e,t):Mu(e,t,!0),o=r;do{if(a===0){Gl&&!r&&Cu(e,t,0,!1);break}if(n=e.current.alternate,o&&!Su(n)){a=Mu(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=eu;var l=c.current.memoizedState.isDehydrated;if(l&&(Eu(c,s).flags|=256),s=Mu(c,s,!1),s!==2){if(Kl&&!l){c.errorRecoveryDisabledLanes|=o,Xl|=o,a=4;break a}o=tu,tu=a,o!==null&&(tu===null?tu=o:tu.push.apply(tu,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Eu(e,0),Cu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:Cu(r,t,Ql,!Wl);break a;case 2:tu=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=ru+300-Pe(),10<a)){if(Cu(r,t,Ql,!Wl),Qe(r,0,!0)!==0)break a;du=t,r.timeoutHandle=Xd(xu.bind(null,r,n,tu,ou,nu,t,Ql,Xl,$l,Wl,o,`Throttled`,-0,0),a);break a}xu(r,n,tu,ou,nu,t,Ql,Xl,$l,Wl,o,null,-0,0)}break}while(1);cd(e)}function xu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:on},Pl(t,a,d);var m=(a&62914560)===a?ru-Pe():(a&4194048)===a?iu-Pe():0;if(m=Yf(d,m),m!==null){du=a,e.cancelPendingCommit=m(Vu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),Cu(e,a,o,!l);return}}Vu(e,t,a,n,r,i,o,s,c)}function Su(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Or(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Cu(e,t,n,r){t&=~Zl,t&=~Xl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ge(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&at(e,n,t)}function wu(){return U&6?!0:(ld(0,!1),!1)}function Tu(){if(W!==null){if(K===0)var e=W.return;else e=W,$i=Qi=null,No(e),Ra=null,za=0,e=W;for(;e!==null;)Hc(e.alternate,e),e=e.return;W=null}}function Eu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Zd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),du=0,Tu(),Hl=e,W=n=gi(e.current,null),G=t,K=0,Ul=null,Wl=!1,Gl=$e(e,t),Kl=!1,$l=Ql=Zl=Xl=Yl=Jl=0,tu=eu=null,nu=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Ge(r),a=1<<i;t|=e[i],r&=~a}return ql=t,oi(),n}function Du(e,t){L=null,D.H=Vs,t===Oa||t===Aa?(t=Ia(),K=3):t===ka?(t=Ia(),K=4):K=t===ac?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Ul=t,W===null&&(Jl=1,$s(e,wi(t,e.current)))}function Ou(){var e=lo.current;return e===null?!0:(G&4194048)===G?P===null:(G&62914560)===G||G&536870912?e===P:!1}function ku(){var e=D.H;return D.H=Vs,e===null?Vs:e}function Au(){var e=D.A;return D.A=Bl,e}function ju(){Jl=4,Wl||(G&4194048)!==G&&lo.current!==null||(Gl=!0),!(Yl&134217727)&&!(Xl&134217727)||Hl===null||Cu(Hl,G,Ql,!1)}function Mu(e,t,n){var r=U;U|=2;var i=ku(),a=Au();(Hl!==e||G!==t)&&(ou=null,Eu(e,t)),t=!1;var o=Jl;a:do try{if(K!==0&&W!==null){var s=W,c=Ul;switch(K){case 8:Tu(),o=6;break a;case 3:case 2:case 9:case 6:lo.current===null&&(t=!0);var l=K;if(K=0,Ul=null,Ru(e,s,c,l),n&&Gl){o=0;break a}break;default:l=K,K=0,Ul=null,Ru(e,s,c,l)}}Nu(),o=Jl;break}catch(t){Du(e,t)}while(1);return t&&e.shellSuspendCounter++,$i=Qi=null,U=r,D.H=i,D.A=a,W===null&&(Hl=null,G=0,oi()),o}function Nu(){for(;W!==null;)Iu(W)}function Pu(e,t){var n=U;U|=2;var r=ku(),a=Au();Hl!==e||G!==t?(ou=null,au=Pe()+500,Eu(e,t)):Gl=$e(e,t);a:do try{if(K!==0&&W!==null){t=W;var o=Ul;b:switch(K){case 1:K=0,Ul=null,Ru(e,t,o,1);break;case 2:case 9:if(Ma(o)){K=0,Ul=null,Lu(t);break}t=function(){K!==2&&K!==9||Hl!==e||(K=7),cd(e)},o.then(t,t);break a;case 3:K=7;break a;case 4:K=5;break a;case 7:Ma(o)?(K=0,Ul=null,Lu(t)):(K=0,Ul=null,Ru(e,t,o,7));break;case 5:var s=null;switch(W.tag){case 26:s=W.memoizedState;case 5:case 27:var c=W;if(s?Kf(s):c.stateNode.complete){K=0,Ul=null;var l=c.sibling;if(l!==null)W=l;else{var u=c.return;u===null?W=null:(W=u,zu(u))}break b}}K=0,Ul=null,Ru(e,t,o,5);break;case 6:K=0,Ul=null,Ru(e,t,o,6);break;case 8:Tu(),Jl=6;break a;default:throw Error(i(462))}}Fu();break}catch(t){Du(e,t)}while(1);return $i=Qi=null,D.H=r,D.A=a,U=n,W===null?(Hl=null,G=0,oi(),Jl):0}function Fu(){for(;W!==null&&!Me();)Iu(W)}function Iu(e){var t=Fc(e.alternate,e,ql);e.memoizedProps=e.pendingProps,t===null?zu(e):W=t}function Lu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=yc(n,t,t.pendingProps,t.type,void 0,G);break;case 11:t=yc(n,t,t.pendingProps,t.type.render,t.ref,G);break;case 5:No(t);default:Hc(n,t),t=W=_i(t,ql),t=Fc(n,t,ql)}e.memoizedProps=e.pendingProps,t===null?zu(e):W=t}function Ru(e,t,n,r){$i=Qi=null,No(t),Ra=null,za=0;var i=t.return;try{if(ic(e,i,t,n,G)){Jl=1,$s(e,wi(n,e.current)),W=null;return}}catch(t){if(i!==null)throw W=i,t;Jl=1,$s(e,wi(n,e.current)),W=null;return}t.flags&32768?(N||r===1?e=!0:Gl||G&536870912?e=!1:(Wl=e=!0,(r===2||r===9||r===3||r===6)&&(r=lo.current,r!==null&&r.tag===13&&(r.flags|=16384))),Bu(t,e)):zu(t)}function zu(e){var t=e;do{if(t.flags&32768){Bu(t,Wl);return}e=t.return;var n=Bc(t.alternate,t,ql);if(n!==null){W=n;return}if(t=t.sibling,t!==null){W=t;return}W=t=e}while(t!==null);Jl===0&&(Jl=5)}function Bu(e,t){do{var n=Vc(e.alternate,e);if(n!==null){n.flags&=32767,W=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){W=e;return}W=e=n}while(e!==null);Jl=6,W=null}function Vu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Ku();while(cu!==0);if(U&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=ai,it(e,n,o,s,c,l),e===Hl&&(W=Hl=null,G=0),uu=t,lu=e,du=n,fu=o,pu=a,mu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,td(Re,function(){return qu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=D.T,D.T=null,a=O.p,O.p=2,s=U,U|=4;try{sl(e,t,n)}finally{U=s,O.p=a,D.T=r}}cu=1,Hu(),Uu(),Wu()}}function Hu(){if(cu===1){cu=0;var e=lu,t=uu,n=!!(t.flags&13878);if(t.subtreeFlags&13878||n){n=D.T,D.T=null;var r=O.p;O.p=2;var i=U;U|=4;try{bl(t,e);var a=Gd,o=Nr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Mr(s.ownerDocument.documentElement,s)){if(c!==null&&Pr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=jr(s,h),v=jr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}cp=!!Wd,Gd=Wd=null}finally{U=i,O.p=r,D.T=n}}e.current=t,cu=2}}function Uu(){if(cu===2){cu=0;var e=lu,t=uu,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=D.T,D.T=null;var r=O.p;O.p=2;var i=U;U|=4;try{cl(e,t.alternate,t)}finally{U=i,O.p=r,D.T=n}}cu=3}}function Wu(){if(cu===4||cu===3){cu=0,Ne();var e=lu,t=uu,n=du,r=mu;t.subtreeFlags&10256||t.flags&10256?cu=5:(cu=0,uu=lu=null,Gu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(su=null),lt(n),t=t.stateNode,Ue&&typeof Ue.onCommitFiberRoot==`function`)try{Ue.onCommitFiberRoot(He,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=D.T,i=O.p,O.p=2,D.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{D.T=t,O.p=i}}du&3&&Ku(),cd(e),i=e.pendingLanes,n&261930&&i&42?e===gu?hu++:(hu=0,gu=e):hu=0,ld(0,!1)}}function Gu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ha(t)))}function Ku(){return Hu(),Uu(),Wu(),qu()}function qu(){if(cu!==5)return!1;var e=lu,t=fu;fu=0;var n=lt(du),r=D.T,a=O.p;try{O.p=32>n?32:n,D.T=null,n=pu,pu=null;var o=lu,s=du;if(cu=0,uu=lu=null,du=0,U&6)throw Error(i(331));var c=U;if(U|=4,Ll(o.current),kl(o,o.current,s,n),U=c,ld(0,!1),Ue&&typeof Ue.onPostCommitFiberRoot==`function`)try{Ue.onPostCommitFiberRoot(He,o)}catch{}return!0}finally{O.p=a,D.T=r,Gu(e,t)}}function Ju(e,t,n){t=wi(n,t),t=tc(e.stateNode,t,2),e=Xa(e,t,2),e!==null&&(rt(e,2),cd(e))}function Yu(e,t,n){if(e.tag===3)Ju(e,e,n);else for(;t!==null;){if(t.tag===3){Ju(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(su===null||!su.has(r))){e=wi(n,e),n=nc(2),r=Xa(t,n,2),r!==null&&(rc(n,r,t,e),rt(r,2),cd(r));break}}t=t.return}}function Xu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Vl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Kl=!0,i.add(n),e=Zu.bind(null,e,t,n),t.then(e,e))}function Zu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Hl===e&&(G&n)===n&&(Jl===4||Jl===3&&(G&62914560)===G&&300>Pe()-ru?!(U&2)&&Eu(e,0):Zl|=n,$l===G&&($l=0)),cd(e)}function Qu(e,t){t===0&&(t=tt()),e=li(e,t),e!==null&&(rt(e,t),cd(e))}function $u(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Qu(e,n)}function ed(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),Qu(e,n)}function td(e,t){return Ae(e,t)}var nd=null,rd=null,id=!1,ad=!1,od=!1,sd=0;function cd(e){e!==rd&&e.next===null&&(rd===null?nd=rd=e:rd=rd.next=e),ad=!0,id||(id=!0,hd())}function ld(e,t){if(!od&&ad){od=!0;do for(var n=!1,r=nd;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ge(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,md(r,a))}else a=G,a=Qe(r,r===Hl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||$e(r,a)||(n=!0,md(r,a));r=r.next}while(n);od=!1}}function ud(){dd()}function dd(){ad=id=!1;var e=0;sd!==0&&Yd()&&(e=sd);for(var t=Pe(),n=null,r=nd;r!==null;){var i=r.next,a=fd(r,t);a===0?(r.next=null,n===null?nd=i:n.next=i,i===null&&(rd=n)):(n=r,(e!==0||a&3)&&(ad=!0)),r=i}cu!==0&&cu!==5||ld(e,!1),sd!==0&&(sd=0)}function fd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ge(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=et(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Hl,n=G,n=Qe(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(K===2||K===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&je(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||$e(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&je(r),lt(n)){case 2:case 8:n=Le;break;case 32:n=Re;break;case 268435456:n=Be;break;default:n=Re}return r=pd.bind(null,e),n=Ae(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&je(r),e.callbackPriority=2,e.callbackNode=null,2}function pd(e,t){if(cu!==0&&cu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Ku()&&e.callbackNode!==n)return null;var r=G;return r=Qe(e,e===Hl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(bu(e,r,t),fd(e,Pe()),e.callbackNode!=null&&e.callbackNode===n?pd.bind(null,e):null)}function md(e,t){if(Ku())return null;bu(e,t,!0)}function hd(){Z(function(){U&6?Ae(Ie,ud):dd()})}function gd(){if(sd===0){var e=va;e===0&&(e=Ye,Ye<<=1,!(Ye&261888)&&(Ye=256)),sd=e}return sd}function _d(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:an(``+e)}function vd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function yd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=_d((i[pt]||null).action),o=r.submitter;o&&(t=(t=o[pt]||null)?_d(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Dn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(sd!==0){var e=o?vd(i,o):new FormData(i);Ds(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?vd(i,o):new FormData(i),Ds(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var bd=0;bd<ei.length;bd++){var xd=ei[bd];ti(xd.toLowerCase(),`on`+(xd[0].toUpperCase()+xd.slice(1)))}ti(Kr,`onAnimationEnd`),ti(qr,`onAnimationIteration`),ti(Jr,`onAnimationStart`),ti(`dblclick`,`onDoubleClick`),ti(`focusin`,`onFocus`),ti(`focusout`,`onBlur`),ti(Yr,`onTransitionRun`),ti(Xr,`onTransitionStart`),ti(Zr,`onTransitionCancel`),ti(Qr,`onTransitionEnd`),kt(`onMouseEnter`,[`mouseout`,`mouseover`]),kt(`onMouseLeave`,[`mouseout`,`mouseover`]),kt(`onPointerEnter`,[`pointerout`,`pointerover`]),kt(`onPointerLeave`,[`pointerout`,`pointerover`]),Ot(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Ot(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Ot(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Ot(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Ot(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Ot(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Sd=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),Cd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Sd));function wd(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){ni(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){ni(e)}i.currentTarget=null,a=c}}}}function q(e,t){var n=t[ht];n===void 0&&(n=t[ht]=new Set);var r=e+`__bubble`;n.has(r)||(Od(t,e,2,!1),n.add(r))}function Td(e,t,n){var r=0;t&&(r|=4),Od(n,e,r,t)}var Ed=`_reactListening`+Math.random().toString(36).slice(2);function Dd(e){if(!e[Ed]){e[Ed]=!0,Et.forEach(function(t){t!==`selectionchange`&&(Cd.has(t)||Td(t,!1,e),Td(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ed]||(t[Ed]=!0,Td(`selectionchange`,!1,t))}}function Od(e,t,n,r){switch(hp(t)){case 2:var i=lp;break;case 8:i=up;break;default:i=dp}n=i.bind(null,t,n,e),i=void 0,!gn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function kd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=xt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}pn(function(){var r=a,i=cn(n),s=[];a:{var c=$r.get(e);if(c!==void 0){var l=Dn,u=e;switch(e){case`keypress`:if(Sn(n)===0)break a;case`keydown`:case`keyup`:l=Gn;break;case`focusin`:u=`focus`,l=In;break;case`focusout`:u=`blur`,l=In;break;case`beforeblur`:case`afterblur`:l=In;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Pn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Fn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=qn;break;case Kr:case qr:case Jr:l=Ln;break;case Qr:l=Jn;break;case`scroll`:case`scrollend`:l=kn;break;case`wheel`:l=Yn;break;case`copy`:case`cut`:case`paste`:l=Rn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Kn;break;case`toggle`:case`beforetoggle`:l=Xn}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=mn(m,p),g!=null&&d.push(Ad(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==sn&&(u=n.relatedTarget||n.fromElement)&&(xt(u)||u[mt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?xt(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=Pn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Kn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:Ct(l),h=u==null?c:Ct(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,xt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Md,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Nd(s,c,l,d,!1),u!==null&&f!==null&&Nd(s,f,u,d,!0)}}a:{if(c=r?Ct(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=gr;else if(ur(c))if(_r)v=Er;else{v=wr;var y=Cr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&tn(r.elementType)&&(v=gr):v=Tr;if(v&&=v(e,r)){dr(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&qt(c,`number`,c.value)}switch(y=r?Ct(r):window,e){case`focusin`:(ur(y)||y.contentEditable===`true`)&&(Ir=y,Lr=r,Rr=null);break;case`focusout`:Rr=Lr=Ir=null;break;case`mousedown`:zr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:zr=!1,Br(s,n,i);break;case`selectionchange`:if(Fr)break;case`keydown`:case`keyup`:Br(s,n,i)}var b;if(Qn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else or?ir(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(tr&&n.locale!==`ko`&&(or||x!==`onCompositionStart`?x===`onCompositionEnd`&&or&&(b=xn()):(vn=i,yn=`value`in vn?vn.value:vn.textContent,or=!0)),y=jd(r,x),0<y.length&&(x=new zn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=ar(n),b!==null&&(x.data=b)))),(b=er?sr(e,n):cr(e,n))&&(x=jd(r,`onBeforeInput`),0<x.length&&(y=new zn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),yd(s,e,r,n,i)}wd(s,t)})}function Ad(e,t,n){return{instance:e,listener:t,currentTarget:n}}function jd(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=mn(e,n),i!=null&&r.unshift(Ad(e,i,a)),i=mn(e,t),i!=null&&r.push(Ad(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Md(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Nd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=mn(n,a),l!=null&&o.unshift(Ad(n,l,c))):i||(l=mn(n,a),l!=null&&o.push(Ad(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Pd=/\r\n?/g,Fd=/\u0000|\uFFFD/g;function Id(e){return(typeof e==`string`?e:``+e).replace(Pd,`
9
+ `).replace(Fd,``)}function Ld(e,t){return t=Id(t),Id(e)===t}function Rd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Zt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Zt(e,``+r);break;case`className`:Ft(e,`class`,r);break;case`tabIndex`:Ft(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Ft(e,n,r);break;case`style`:en(e,r,o);break;case`data`:if(t!==`object`){Ft(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=an(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&Rd(e,t,`name`,a.name,a,null),Rd(e,t,`formEncType`,a.formEncType,a,null),Rd(e,t,`formMethod`,a.formMethod,a,null),Rd(e,t,`formTarget`,a.formTarget,a,null)):(Rd(e,t,`encType`,a.encType,a,null),Rd(e,t,`method`,a.method,a,null),Rd(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=an(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=on);break;case`onScroll`:r!=null&&q(`scroll`,e);break;case`onScrollEnd`:r!=null&&q(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=an(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:q(`beforetoggle`,e),q(`toggle`,e),Pt(e,`popover`,r);break;case`xlinkActuate`:It(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:It(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:It(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:It(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:It(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:It(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:It(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:It(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:It(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Pt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=nn.get(n)||n,Pt(e,n,r))}}function zd(e,t,n,r,a,o){switch(n){case`style`:en(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Zt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Zt(e,``+r);break;case`onScroll`:r!=null&&q(`scroll`,e);break;case`onScrollEnd`:r!=null&&q(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=on);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!Dt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[pt]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Pt(e,n,r)}}}function Bd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:q(`error`,e),q(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Rd(e,t,o,s,n,null)}}a&&Rd(e,t,`srcSet`,n.srcSet,n,null),r&&Rd(e,t,`src`,n.src,n,null);return;case`input`:q(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Rd(e,t,r,d,n,null)}}Kt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in q(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Rd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Jt(e,!!r,n,!0):Jt(e,!!r,t,!1);return;case`textarea`:for(s in q(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Rd(e,t,s,c,n,null)}Xt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Rd(e,t,l,r,n,null)}return;case`dialog`:q(`beforetoggle`,e),q(`toggle`,e),q(`cancel`,e),q(`close`,e);break;case`iframe`:case`object`:q(`load`,e);break;case`video`:case`audio`:for(r=0;r<Sd.length;r++)q(Sd[r],e);break;case`image`:q(`error`,e),q(`load`,e);break;case`details`:q(`toggle`,e);break;case`embed`:case`source`:case`link`:q(`error`,e),q(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Rd(e,t,u,r,n,null)}return;default:if(tn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&zd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Rd(e,t,c,r,n,null))}function Vd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Rd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Rd(e,t,p,m,r,f)}}Gt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Rd(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Rd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Jt(e,!!n,n?[]:``,!1):Jt(e,!!n,t,!0)):Jt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Rd(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Rd(e,t,s,a,r,o)}Yt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Rd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Rd(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Rd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Rd(e,t,u,p,r,m)}return;default:if(tn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&zd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||zd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Rd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Rd(e,t,f,p,r,m)}function Hd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ud(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Hd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Hd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Wd=null,Gd=null;function Kd(e){return e.nodeType===9?e:e.ownerDocument}function J(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Y(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function qd(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Jd=null;function Yd(){var e=window.event;return e&&e.type===`popstate`?e!==Jd&&(Jd=e,!0):(Jd=null,!1)}var Xd=typeof setTimeout==`function`?setTimeout:void 0,Zd=typeof clearTimeout==`function`?clearTimeout:void 0,X=typeof Promise==`function`?Promise:void 0,Z=typeof queueMicrotask==`function`?queueMicrotask:X===void 0?Xd:function(e){return X.resolve(null).then(e).catch(Qd)};function Qd(e){setTimeout(function(){throw e})}function $d(e){return e===`head`}function ef(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Pp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)hf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,hf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[yt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&hf(e.ownerDocument.body);n=i}while(n);Pp(t)}function tf(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function nf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:nf(n),bt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function rf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[yt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=uf(e.nextSibling),e===null)break}return null}function af(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=uf(e.nextSibling),e===null))return null;return e}function of(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=uf(e.nextSibling),e===null))return null;return e}function sf(e){return e.data===`$?`||e.data===`$~`}function cf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function lf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function uf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var df=null;function ff(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return uf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function pf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function mf(e,t,n){switch(t=Kd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function hf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);bt(e)}var gf=new Map,_f=new Set;function vf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var yf=O.d;O.d={f:bf,r:xf,D:wf,C:Tf,L:Ef,m:Df,X:kf,S:Of,M:Af};function bf(){var e=yf.f(),t=wu();return e||t}function xf(e){var t=St(e);t!==null&&t.tag===5&&t.type===`form`?ks(t):yf.r(e)}var Sf=typeof document>`u`?null:document;function Cf(e,t,n){var r=Sf;if(r&&typeof t==`string`&&t){var i=Wt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),_f.has(i)||(_f.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Bd(t,`link`,e),Tt(t),r.head.appendChild(t)))}}function wf(e){yf.D(e),Cf(`dns-prefetch`,e,null)}function Tf(e,t){yf.C(e,t),Cf(`preconnect`,e,t)}function Ef(e,t,n){yf.L(e,t,n);var r=Sf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Wt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Wt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Wt(n.imageSizes)+`"]`)):i+=`[href="`+Wt(e)+`"]`;var a=i;switch(t){case`style`:a=Mf(e);break;case`script`:a=If(e)}gf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),gf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Nf(a))||t===`script`&&r.querySelector(Lf(a))||(t=r.createElement(`link`),Bd(t,`link`,e),Tt(t),r.head.appendChild(t)))}}function Df(e,t){yf.m(e,t);var n=Sf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Wt(r)+`"][href="`+Wt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=If(e)}if(!gf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),gf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Lf(a)))return}r=n.createElement(`link`),Bd(r,`link`,e),Tt(r),n.head.appendChild(r)}}}function Of(e,t,n){yf.S(e,t,n);var r=Sf;if(r&&e){var i=wt(r).hoistableStyles,a=Mf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Nf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=gf.get(a))&&Bf(e,n);var c=o=r.createElement(`link`);Tt(c),Bd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,zf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function kf(e,t){yf.X(e,t);var n=Sf;if(n&&e){var r=wt(n).hoistableScripts,i=If(e),a=r.get(i);a||(a=n.querySelector(Lf(i)),a||(e=f({src:e,async:!0},t),(t=gf.get(i))&&Vf(e,t),a=n.createElement(`script`),Tt(a),Bd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Af(e,t){yf.M(e,t);var n=Sf;if(n&&e){var r=wt(n).hoistableScripts,i=If(e),a=r.get(i);a||(a=n.querySelector(Lf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=gf.get(i))&&Vf(e,t),a=n.createElement(`script`),Tt(a),Bd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function jf(e,t,n,r){var a=(a=ge.current)?vf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Mf(n.href),n=wt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Mf(n.href);var o=wt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Nf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),gf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},gf.set(e,n),o||Ff(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=If(n),n=wt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Mf(e){return`href="`+Wt(e)+`"`}function Nf(e){return`link[rel="stylesheet"][`+e+`]`}function Pf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Ff(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Bd(t,`link`,n),Tt(t),e.head.appendChild(t))}function If(e){return`[src="`+Wt(e)+`"]`}function Lf(e){return`script[async]`+e}function Rf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Wt(n.href)+`"]`);if(r)return t.instance=r,Tt(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Tt(r),Bd(r,`style`,a),zf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Mf(n.href);var o=e.querySelector(Nf(a));if(o)return t.state.loading|=4,t.instance=o,Tt(o),o;r=Pf(n),(a=gf.get(a))&&Bf(r,a),o=(e.ownerDocument||e).createElement(`link`),Tt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Bd(o,`link`,r),t.state.loading|=4,zf(o,n.precedence,e),t.instance=o;case`script`:return o=If(n.src),(a=e.querySelector(Lf(o)))?(t.instance=a,Tt(a),a):(r=n,(a=gf.get(o))&&(r=f({},n),Vf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Tt(a),Bd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,zf(r,n.precedence,e));return t.instance}function zf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Bf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Vf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Hf=null;function Uf(e,t,n){if(Hf===null){var r=new Map,i=Hf=new Map;i.set(n,r)}else i=Hf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[yt]||a[ft]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Wf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Gf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Kf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function qf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Mf(r.href),a=t.querySelector(Nf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Xf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Tt(a);return}a=t.ownerDocument||t,r=Pf(r),(i=gf.get(i))&&Bf(r,i),a=a.createElement(`link`),Tt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Bd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Xf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Jf=0;function Yf(e,t){return e.stylesheets&&e.count===0&&Qf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Qf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Jf===0&&(Jf=62500*Ud());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Qf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Jf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Xf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Qf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Zf=null;function Qf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Zf=new Map,t.forEach($f,e),Zf=null,Xf.call(e))}function $f(e,t){if(!(t.state.loading&4)){var n=Zf.get(e);if(n)var r=n.get(null);else{n=new Map,Zf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Xf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var ep={$$typeof:C,Provider:null,Consumer:null,_currentValue:le,_currentValue2:le,_threadCount:0};function tp(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=nt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=nt(0),this.hiddenUpdates=nt(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function np(e,t,n,r,i,a,o,s,c,l,u,d){return e=new tp(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=mi(3,null,null,t),e.current=a,a.stateNode=e,t=ma(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},qa(a),e}function rp(e){return e?(e=fi,e):fi}function ip(e,t,n,r,i,a){i=rp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ya(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Xa(e,r,t),n!==null&&(yu(n,e,t),Za(n,e,t))}function Q(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ap(e,t){Q(e,t),(e=e.alternate)&&Q(e,t)}function op(e){if(e.tag===13||e.tag===31){var t=li(e,67108864);t!==null&&yu(t,e,67108864),ap(e,67108864)}}function sp(e){if(e.tag===13||e.tag===31){var t=_u();t=ct(t);var n=li(e,t);n!==null&&yu(n,e,t),ap(e,t)}}var cp=!0;function lp(e,t,n,r){var i=D.T;D.T=null;var a=O.p;try{O.p=2,dp(e,t,n,r)}finally{O.p=a,D.T=i}}function up(e,t,n,r){var i=D.T;D.T=null;var a=O.p;try{O.p=8,dp(e,t,n,r)}finally{O.p=a,D.T=i}}function dp(e,t,n,r){if(cp){var i=fp(r);if(i===null)kd(e,t,r,pp,n),wp(e,r);else if(Ep(i,e,t,n,r))r.stopPropagation();else if(wp(e,r),t&4&&-1<Cp.indexOf(e)){for(;i!==null;){var a=St(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=j(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ge(o);s.entanglements[1]|=c,o&=~c}cd(a),!(U&6)&&(au=Pe()+500,ld(0,!1))}}break;case 31:case 13:s=li(a,2),s!==null&&yu(s,a,2),wu(),ap(a,2)}if(a=fp(r),a===null&&kd(e,t,r,pp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else kd(e,t,r,null,n)}}function fp(e){return e=cn(e),mp(e)}var pp=null;function mp(e){if(pp=null,e=xt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return pp=e,null}function hp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Fe()){case Ie:return 2;case Le:return 8;case Re:case ze:return 32;case Be:return 268435456;default:return 32}default:return 32}}var gp=!1,_p=null,vp=null,yp=null,bp=new Map,xp=new Map,Sp=[],Cp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function wp(e,t){switch(e){case`focusin`:case`focusout`:_p=null;break;case`dragenter`:case`dragleave`:vp=null;break;case`mouseover`:case`mouseout`:yp=null;break;case`pointerover`:case`pointerout`:bp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:xp.delete(t.pointerId)}}function Tp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=St(t),t!==null&&op(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ep(e,t,n,r,i){switch(t){case`focusin`:return _p=Tp(_p,e,t,n,r,i),!0;case`dragenter`:return vp=Tp(vp,e,t,n,r,i),!0;case`mouseover`:return yp=Tp(yp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return bp.set(a,Tp(bp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,xp.set(a,Tp(xp.get(a)||null,e,t,n,r,i)),!0}return!1}function Dp(e){var t=xt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,ut(e.priority,function(){sp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,ut(e.priority,function(){sp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Op(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=fp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);sn=r,n.target.dispatchEvent(r),sn=null}else return t=St(n),t!==null&&op(t),e.blockedOn=n,!1;t.shift()}return!0}function kp(e,t,n){Op(e)&&n.delete(t)}function Ap(){gp=!1,_p!==null&&Op(_p)&&(_p=null),vp!==null&&Op(vp)&&(vp=null),yp!==null&&Op(yp)&&(yp=null),bp.forEach(kp),xp.forEach(kp)}function jp(e,n){e.blockedOn===n&&(e.blockedOn=null,gp||(gp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Ap)))}var Mp=null;function Np(e){Mp!==e&&(Mp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Mp===e&&(Mp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(mp(r||n)===null)continue;break}var a=St(n);a!==null&&(e.splice(t,3),t-=3,Ds(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Pp(e){function t(t){return jp(t,e)}_p!==null&&jp(_p,e),vp!==null&&jp(vp,e),yp!==null&&jp(yp,e),bp.forEach(t),xp.forEach(t);for(var n=0;n<Sp.length;n++){var r=Sp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Sp.length&&(n=Sp[0],n.blockedOn===null);)Dp(n),n.blockedOn===null&&Sp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[pt]||null;if(typeof a==`function`)o||Np(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[pt]||null)s=o.formAction;else if(mp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Np(n)}}}function Fp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Ip(e){this._internalRoot=e}Lp.prototype.render=Ip.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;ip(n,_u(),e,t,null,null)},Lp.prototype.unmount=Ip.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ip(e.current,2,null,e,null,null),wu(),t[mt]=null}};function Lp(e){this._internalRoot=e}Lp.prototype.unstable_scheduleHydration=function(e){if(e){var t=M();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Sp.length&&t!==0&&t<Sp[n].priority;n++);Sp.splice(n,0,e),n===0&&Dp(e)}};var Rp=n.version;if(Rp!==`19.2.8`)throw Error(i(527,Rp,`19.2.8`));O.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var zp={bundleType:0,version:`19.2.8`,rendererPackageName:`react-dom`,currentDispatcherRef:D,reconcilerVersion:`19.2.8`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Bp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Bp.isDisabled&&Bp.supportsFiber)try{He=Bp.inject(zp),Ue=Bp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Xs,s=Zs,c=Qs;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=np(e,1,!1,null,null,n,r,null,o,s,c,Fp),e[mt]=t.current,Dd(e),new Ip(t)}})),y=s(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=v()})),b=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),x=s(((e,t)=>{t.exports=b()})),S=u(p(),1),C=y(),w=x();function T({num:e,title:t,mute:n,intro:r}){return(0,w.jsxs)(`header`,{className:`ggui-section__head`,children:[(0,w.jsx)(`div`,{className:`ggui-section__num`,children:e}),(0,w.jsxs)(`div`,{children:[(0,w.jsxs)(`h2`,{className:`ggui-section__title`,children:[t,n?(0,w.jsxs)(`span`,{className:`ggui-mute`,children:[` `,n]}):null]}),r?(0,w.jsx)(`p`,{className:`ggui-section__intro`,children:r}):null]})]})}var ee=`ggui-eui:navigate`;function te(e){if(e===`/`||e===``)return{kind:`admin-index`};let t=/^\/preview\/([^/]+)\/?$/.exec(e);if(t){let n=t[1];return n?{kind:`blueprint`,blueprintId:decodeURIComponent(n)}:{kind:`not-found`,pathname:e}}if(e===`/admin`||e===`/admin/`)return{kind:`admin-index`};if(e===`/admin/status`||e===`/admin/status/`)return{kind:`admin-status`};if(e===`/admin/sessions`||e===`/admin/sessions/`)return{kind:`admin-sessions`};if(e===`/admin/blueprints`||e===`/admin/blueprints/`)return{kind:`admin-blueprints`};let n=/^\/admin\/variants\/([^/]+)\/generate\/?$/.exec(e);if(n){let t=n[1];return t?{kind:`admin-variant-generate`,contractHash:decodeURIComponent(t)}:{kind:`not-found`,pathname:e}}let r=/^\/admin\/variants\/([^/]+)\/?$/.exec(e);if(r){let t=r[1];return t?{kind:`admin-variant-detail`,contractHash:decodeURIComponent(t)}:{kind:`not-found`,pathname:e}}return e===`/admin/variants`||e===`/admin/variants/`?{kind:`admin-variants`}:e===`/admin/config`||e===`/admin/config/`?{kind:`admin-config`}:e===`/admin/tools`||e===`/admin/tools/`?{kind:`admin-tools`}:e===`/admin/llm-keys`||e===`/admin/llm-keys/`?{kind:`admin-llm-keys`}:e===`/admin/connector-keys`||e===`/admin/connector-keys/`?{kind:`admin-connector-keys`}:e===`/admin/oauth-providers`||e===`/admin/oauth-providers/`?{kind:`admin-oauth-providers`}:e===`/admin/clients`||e===`/admin/clients/`?{kind:`admin-clients`}:e===`/admin/theme`||e===`/admin/theme/`?{kind:`admin-theme`}:e===`/admin-login`||e===`/admin-login/`?{kind:`admin-login`}:e===`/devtools`||e===`/devtools/`?{kind:`devtools-index`}:e===`/devtools/llm-trace`||e===`/devtools/llm-trace/`?{kind:`devtools-llm-trace`}:e===`/devtools/validator`||e===`/devtools/validator/`?{kind:`devtools-validator`}:e===`/devtools/cache`||e===`/devtools/cache/`?{kind:`devtools-cache`}:e===`/devtools/timeline`||e===`/devtools/timeline/`?{kind:`devtools-timeline`}:e===`/devtools/payloads`||e===`/devtools/payloads/`?{kind:`devtools-payloads`}:e===`/devtools/benchmarks`||e===`/devtools/benchmarks/`?{kind:`devtools-benchmarks`}:{kind:`not-found`,pathname:e}}var ne=null,re=null;function ie(e){return(e!==ne||re===null)&&(ne=e,re=te(e)),re}function E(e){typeof window>`u`||(window.history.pushState(null,``,e),window.dispatchEvent(new Event(ee)))}function ae(e){return typeof window>`u`?()=>void 0:(window.addEventListener(`popstate`,e),window.addEventListener(ee,e),()=>{window.removeEventListener(`popstate`,e),window.removeEventListener(ee,e)})}function oe(e){return e.kind===`admin-index`||e.kind===`admin-status`||e.kind===`admin-sessions`||e.kind===`admin-blueprints`||e.kind===`admin-variants`||e.kind===`admin-variant-detail`||e.kind===`admin-variant-generate`||e.kind===`admin-config`||e.kind===`admin-tools`||e.kind===`admin-llm-keys`||e.kind===`admin-connector-keys`||e.kind===`admin-oauth-providers`||e.kind===`admin-clients`||e.kind===`admin-theme`}function se(e){return e.kind===`devtools-index`||e.kind===`devtools-llm-trace`||e.kind===`devtools-validator`||e.kind===`devtools-cache`||e.kind===`devtools-timeline`||e.kind===`devtools-payloads`||e.kind===`devtools-benchmarks`}var ce=[{label:`server`,items:[{label:`status`,path:`/admin/status`,match:`admin-status`},{label:`sessions`,path:`/admin/sessions`,match:`admin-sessions`},{label:`blueprints`,path:`/admin/blueprints`,match:`admin-blueprints`},{label:`variants`,path:`/admin/variants`,match:`admin-variants`},{label:`config`,path:`/admin/config`,match:`admin-config`},{label:`tools`,path:`/admin/tools`,match:`admin-tools`}]},{label:`auth`,items:[{label:`LLM keys`,path:`/admin/llm-keys`,match:`admin-llm-keys`},{label:`connector keys`,path:`/admin/connector-keys`,match:`admin-connector-keys`},{label:`OAuth providers`,path:`/admin/oauth-providers`,match:`admin-oauth-providers`},{label:`clients`,path:`/admin/clients`,match:`admin-clients`}]},{label:`appearance`,items:[{label:`theme`,path:`/admin/theme`,match:`admin-theme`}]}];function D({route:e,children:t}){return(0,w.jsxs)(`div`,{className:`ggui-config-grid`,"data-ggui-admin-shell":!0,children:[(0,w.jsx)(O,{route:e}),(0,w.jsx)(`div`,{className:`ggui-admin-pane`,children:t})]})}function O({route:e}){return(0,w.jsx)(`nav`,{className:`ggui-config-rail`,"aria-label":`admin sections`,"data-ggui-admin-rail":!0,children:ce.map(t=>(0,w.jsxs)(`div`,{"data-ggui-admin-group":t.label,children:[(0,w.jsx)(`div`,{className:`ggui-stack__head`,style:{padding:`10px 14px 6px`,borderBottom:0},children:(0,w.jsx)(`span`,{className:`ggui-stack__label`,style:{fontSize:11},children:t.label})}),(0,w.jsx)(`ul`,{style:{listStyle:`none`,margin:0,padding:0},children:t.items.map(t=>{let n=e.kind===t.match;return(0,w.jsx)(`li`,{"data-ggui-admin-item":t.match,children:(0,w.jsx)(`button`,{type:`button`,onClick:()=>E(t.path),"aria-current":n?`page`:void 0,className:`ggui-config-rail__btn${n?` is-active`:``}`,children:t.label})},t.path)})})]},t.label))})}var le=[{label:`inspect`,items:[{label:`LLM trace`,path:`/devtools/llm-trace`,match:`devtools-llm-trace`},{label:`validator`,path:`/devtools/validator`,match:`devtools-validator`},{label:`cache`,path:`/devtools/cache`,match:`devtools-cache`}]},{label:`replay`,items:[{label:`timeline`,path:`/devtools/timeline`,match:`devtools-timeline`},{label:`payloads`,path:`/devtools/payloads`,match:`devtools-payloads`}]},{label:`performance`,items:[{label:`benchmarks`,path:`/devtools/benchmarks`,match:`devtools-benchmarks`}]}];function ue({route:e,children:t}){return(0,w.jsxs)(`div`,{className:`ggui-config-grid`,"data-ggui-devtools-shell":!0,children:[(0,w.jsx)(de,{route:e}),(0,w.jsx)(`div`,{className:`ggui-admin-pane`,children:t})]})}function de({route:e}){return(0,w.jsx)(`nav`,{className:`ggui-config-rail`,"aria-label":`devtools sections`,"data-ggui-devtools-rail":!0,children:le.map(t=>(0,w.jsxs)(`div`,{"data-ggui-devtools-group":t.label,children:[(0,w.jsx)(`div`,{className:`ggui-stack__head`,style:{padding:`10px 14px 6px`,borderBottom:0},children:(0,w.jsx)(`span`,{className:`ggui-stack__label`,style:{fontSize:11},children:t.label})}),(0,w.jsx)(`ul`,{style:{listStyle:`none`,margin:0,padding:0},children:t.items.map(t=>{let n=e.kind===t.match;return(0,w.jsx)(`li`,{"data-ggui-devtools-item":t.match,children:(0,w.jsx)(`button`,{type:`button`,onClick:()=>E(t.path),"aria-current":n?`page`:void 0,className:`ggui-config-rail__btn${n?` is-active`:``}`,children:t.label})},t.path)})})]},t.label))})}var fe=`#292929`,pe=`#d9d9d9`,k=`#f4f3ed`,me={mirror:{g1Outer:pe,g1Inner:fe,g2Outer:fe,g2Inner:pe,u:fe,i:pe},"mono-ink":{g1Outer:fe,g1Inner:fe,g2Outer:fe,g2Inner:fe,u:fe,i:fe},reverse:{g1Outer:pe,g1Inner:k,g2Outer:k,g2Inner:pe,u:k,i:pe}};function he({width:e,variant:t=`mirror`}){let n=Math.round(e*50/224),r=me[t];return(0,w.jsxs)(`svg`,{viewBox:`0 0 224 50`,width:e,height:n,"aria-label":`ggui`,children:[(0,w.jsx)(`path`,{d:`M 0 0 H 50 V 25 H 25 V 50 H 0 Z`,fill:r.g1Outer}),(0,w.jsx)(`rect`,{x:`33`,y:`33`,width:`17`,height:`17`,fill:r.g1Inner}),(0,w.jsx)(`path`,{d:`M 58 0 H 108 V 25 H 83 V 50 H 58 Z`,fill:r.g2Outer}),(0,w.jsx)(`rect`,{x:`91`,y:`33`,width:`17`,height:`17`,fill:r.g2Inner}),(0,w.jsx)(`path`,{d:`M 141 50 C 154.807 50 166 38.8071 166 25 V 0 H 116 V 25 C 116 38.8071 127.193 50 141 50 Z`,fill:r.u}),(0,w.jsx)(`rect`,{x:`174`,y:`0`,width:`50`,height:`50`,fill:r.i})]})}function ge(){return(0,w.jsx)(`footer`,{className:`ggui-footer`,children:(0,w.jsxs)(`div`,{className:`ggui-footer__inner`,children:[(0,w.jsxs)(`div`,{className:`ggui-footer__meta`,children:[(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`strong`,{children:`ggui`}),` — generative graphical user interface`]}),(0,w.jsx)(`div`,{children:`@ggui-ai/console`}),(0,w.jsx)(`div`,{children:`served by your local ggui serve — same origin only`})]}),(0,w.jsx)(`div`,{className:`ggui-footer__mark`,children:(0,w.jsx)(he,{width:160})})]})})}var _e=`ggui-mode`,ve=null;function ye(){return ve===null?typeof document>`u`?`prod`:(ve=document.querySelector(`meta[name="${_e}"]`)?.getAttribute(`content`)===`dev`?`dev`:`prod`,ve):ve}function be({route:e,rightSlot:t}){let n=xe(e),r=oe(e),i=se(e),a=ye()===`dev`&&!i;return(0,w.jsx)(`nav`,{className:`ggui-nav`,"aria-label":`console navigation`,children:(0,w.jsxs)(`div`,{className:`ggui-nav__inner`,children:[(0,w.jsxs)(`div`,{className:`ggui-nav__left`,children:[(0,w.jsx)(`button`,{type:`button`,className:`ggui-nav__link`,onClick:()=>E(`/admin/status`),"aria-label":`go to admin`,style:{display:`flex`,alignItems:`center`},children:(0,w.jsx)(he,{width:84})}),(0,w.jsx)(`span`,{className:`ggui-nav__brand`,"aria-label":`ggui console`,children:`console`}),(0,w.jsx)(`span`,{className:`ggui-nav__version`,children:`v1`}),(0,w.jsx)(`span`,{className:`ggui-nav__version`,"aria-label":`community edition`,children:`community`}),i?(0,w.jsx)(`span`,{className:`ggui-nav__version`,"data-ggui-dev-mode-pill":!0,style:{background:`var(--ggui-accent)`,color:`white`},"aria-label":`dev mode`,children:`DEV MODE`}):null,n?(0,w.jsx)(`span`,{className:`ggui-nav__crumb`,children:n}):null]}),(0,w.jsxs)(`ul`,{className:`ggui-nav__links`,children:[a?(0,w.jsx)(`li`,{children:(0,w.jsx)(`button`,{type:`button`,className:`ggui-nav__link`,onClick:()=>E(`/devtools`),"data-ggui-nav-devtools":!0,children:`devtools →`})}):null,r?null:(0,w.jsx)(`li`,{children:(0,w.jsx)(`button`,{type:`button`,className:`ggui-nav__link`,onClick:()=>E(`/admin/status`),children:`admin →`})}),t?(0,w.jsx)(`li`,{children:t}):null]})]})})}function xe(e){switch(e.kind){case`blueprint`:return`/ preview / ${e.blueprintId}`;case`admin-index`:case`admin-status`:return`/ admin / status`;case`admin-sessions`:return`/ admin / sessions`;case`admin-blueprints`:return`/ admin / blueprints`;case`admin-config`:return`/ admin / config`;case`admin-tools`:return`/ admin / tools`;case`admin-llm-keys`:return`/ admin / llm-keys`;case`admin-connector-keys`:return`/ admin / connector-keys`;case`admin-oauth-providers`:return`/ admin / oauth-providers`;case`admin-clients`:return`/ admin / clients`;case`admin-theme`:return`/ admin / theme`;case`admin-login`:return`/ admin-login`;case`devtools-index`:return`/ devtools`;case`devtools-llm-trace`:return`/ devtools / llm-trace`;case`devtools-validator`:return`/ devtools / validator`;case`devtools-cache`:return`/ devtools / cache`;case`devtools-timeline`:return`/ devtools / timeline`;case`devtools-payloads`:return`/ devtools / payloads`;case`devtools-benchmarks`:return`/ devtools / benchmarks`;case`not-found`:return e.pathname;default:return null}}function Se({route:e,children:t,variant:n=`wide`,showFooter:r=!0,navRightSlot:i}){let a=n===`narrow`?`ggui-shell__main ggui-shell__main--narrow`:`ggui-shell__main`,o=t;return n===`admin`?o=(0,w.jsx)(D,{route:e,children:t}):n===`devtools`&&(o=(0,w.jsx)(ue,{route:e,children:t})),(0,w.jsxs)(`div`,{className:`ggui-shell`,children:[(0,w.jsx)(be,{route:e,rightSlot:i}),(0,w.jsx)(`main`,{className:a,children:o}),r?(0,w.jsx)(ge,{}):null]})}function Ce(){let[e,t]=(0,S.useState)(``),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)(null),o=(()=>{if(typeof window>`u`)return`/admin`;let e=new URLSearchParams(window.location.search).get(`next`);return e===null||e===``||!e.startsWith(`/`)||e.startsWith(`//`)?`/admin`:e})();return(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`01 / admin`,title:`Sign in to the admin zone.`,mute:`Admin token gates /admin and /devtools.`,intro:(0,w.jsxs)(w.Fragment,{children:[`Paste the admin token printed on your`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui serve`}),` boot banner. On success we set a same-origin`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui_console_admin`}),` `,`HttpOnly cookie and bounce you to`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:o}),`.`]})}),(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:`admin token`}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:`ADM / IN`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsx)(`form`,{className:`ggui-form`,onSubmit:async t=>{t.preventDefault(),a(null);let n=e.trim();if(n.length===0){a(`Paste an admin token.`);return}r(!0);try{let e=await fetch(`/ggui/console/admin-login`,{method:`POST`,headers:{"content-type":`application/json`,accept:`application/json`},body:JSON.stringify({token:n})});if(e.status===204){E(o);return}if(e.status===401){a("Invalid token. Re-check the value printed on your `ggui serve` boot banner.");return}a(`Login failed — server returned ${e.status}`)}catch(e){a(`Login failed — ${String(e)}`)}finally{r(!1)}},"data-ggui-admin-login-form":!0,children:(0,w.jsxs)(`div`,{className:`ggui-form__row`,children:[(0,w.jsx)(`label`,{className:`ggui-field`,"aria-label":`admin token`,children:(0,w.jsx)(`input`,{type:`password`,placeholder:`ggui_admin_...`,value:e,onChange:e=>t(e.target.value),disabled:n,autoComplete:`off`,spellCheck:!1,autoFocus:!0})}),(0,w.jsxs)(`button`,{type:`submit`,className:`ggui-btn`,"data-ggui-admin-login-submit":!0,disabled:n||e.trim().length===0,children:[(0,w.jsx)(`span`,{className:`ggui-btn__dot`,"aria-hidden":!0}),n?`signing in…`:`sign in`]})]})}),i?(0,w.jsx)(`p`,{className:`ggui-muted`,style:{marginTop:12},"data-ggui-admin-login-error":!0,children:i}):null]})]})]})}var we={anthropic:{label:`Anthropic`,help:`Used by Claude models.`,apiKeyUrl:`https://console.anthropic.com/settings/keys`},openai:{label:`OpenAI`,help:`Used by GPT models.`,apiKeyUrl:`https://platform.openai.com/api-keys`},google:{label:`Google`,help:`Used by Gemini models.`,apiKeyUrl:`https://aistudio.google.com/app/apikey`},openrouter:{label:`OpenRouter`,help:`Routes to any provider via one key.`,apiKeyUrl:`https://openrouter.ai/keys`}};function Te(){if(typeof window>`u`)return;let e=window.location.pathname+window.location.search;E(`/admin-login?next=${encodeURIComponent(e)}`)}function Ee(e){return e.replace(/\[[\d;]*[a-zA-Z]/g,``).replace(/\s+/g,``)}function De(){let[e,t]=(0,S.useState)({kind:`loading`}),n=async()=>{t(e=>e.kind===`ready`?e:{kind:`loading`});try{let e=await fetch(`/ggui/console/llm-keys`,{credentials:`include`,headers:{accept:`application/json`}});if(e.status===401){Te();return}if(!e.ok){t({kind:`error`,message:e.status===404?"BYOK store not enabled — `ggui serve` should wire one by default.":`server returned ${e.status}`});return}let n=await e.json();t({kind:`ready`,data:n})}catch(e){t({kind:`error`,message:String(e)})}};return(0,S.useEffect)(()=>{n()},[]),(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`01 / admin / llm-keys`,title:`Operator-side LLM keys.`,mute:`Server-default keys for unpaired and operator generation.`,intro:(0,w.jsxs)(w.Fragment,{children:[`Each provider is checked against env vars first, then`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`~/.ggui/credentials.json`}),` — env wins on collision. These are the keys`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`ggui serve`}),` uses for any generation that doesn't carry a paired-user scope. The same plane is exposed to paired users at`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`/settings`}),`; the difference is which scope the writes land in.`]})}),e.kind===`loading`?(0,w.jsx)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},children:`Loading providers…`}):e.kind===`error`?(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},"data-ggui-admin-llm-error":!0,children:[`Couldn't load providers — `,e.message]}):(0,w.jsx)(Oe,{rows:e.data.providers,scope:e.data.scope,onSet:async(e,t)=>{let r=await fetch(`/ggui/console/llm-keys`,{method:`POST`,credentials:`include`,headers:{"content-type":`application/json`,accept:`application/json`},body:JSON.stringify({provider:e,key:t})});if(r.status===401){Te();return}if(!r.ok)throw Error(`server returned ${r.status}`);await n()},onClear:async e=>{let t=await fetch(`/ggui/console/llm-keys/${encodeURIComponent(e)}`,{method:`DELETE`,credentials:`include`});if(t.status===401){Te();return}if(t.status!==204)throw Error(`server returned ${t.status}`);await n()}})]})}function Oe({rows:e,scope:t,onSet:n,onClear:r}){return(0,w.jsxs)(`div`,{"data-ggui-admin-llm-list":!0,children:[(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{marginTop:0,marginBottom:16,fontSize:12},children:[`scope: `,(0,w.jsx)(`code`,{className:`ggui-code`,children:t})]}),(0,w.jsx)(`div`,{style:{display:`grid`,gap:14},children:e.map(e=>(0,w.jsx)(ke,{row:e,onSet:n,onClear:r},e.name))})]})}function ke({row:e,onSet:t,onClear:n}){let r=we[e.name],[i,a]=(0,S.useState)(``),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(null),u=async n=>{n.preventDefault();let r=Ee(i);if(r){s(!0),l(null);try{await t(e.name,r),a(``)}catch(e){l(String(e))}finally{s(!1)}}},d=async()=>{s(!0),l(null);try{await n(e.name)}catch(e){l(String(e))}finally{s(!1)}};return(0,w.jsxs)(`div`,{className:`ggui-card`,"data-ggui-admin-llm-row":e.name,children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:r.label}),(0,w.jsx)(`span`,{className:`ggui-card__num`,children:e.configured?e.source??`—`:`not set`})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:`0 0 10px`,fontSize:13},children:[r.help,e.envNames.length>0?(0,w.jsxs)(w.Fragment,{children:[` `,`Env:`,` `,e.envNames.map((t,n)=>(0,w.jsxs)(`span`,{children:[(0,w.jsx)(`code`,{className:`ggui-code`,children:t}),n<e.envNames.length-1?`, `:``]},t)),`.`]}):null]}),e.configured&&e.keyPreview?(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:`0 0 10px`,fontSize:12},children:[`current: `,(0,w.jsxs)(`code`,{className:`ggui-code`,children:[e.keyPreview,`…`]}),e.source===`env`&&e.envName?(0,w.jsxs)(w.Fragment,{children:[` (from `,(0,w.jsx)(`code`,{className:`ggui-code`,children:e.envName}),`)`]}):null]}):null,(0,w.jsxs)(`form`,{onSubmit:u,style:{display:`flex`,gap:8,alignItems:`center`,flexWrap:`wrap`},children:[(0,w.jsx)(`input`,{type:`password`,placeholder:`Paste ${r.label} key`,value:i,onChange:e=>a(e.target.value),disabled:o,autoComplete:`off`,spellCheck:!1,style:{flex:1,minWidth:240,padding:`8px 10px`,fontFamily:`var(--ggui-mono)`,fontSize:12,border:`1px solid var(--ggui-line-2)`,background:`var(--ggui-paper)`,color:`var(--ggui-ink)`,borderRadius:2}}),(0,w.jsx)(`button`,{type:`submit`,"data-ggui-admin-llm-set":!0,className:`ggui-btn`,disabled:o||!i.trim(),children:o?`saving…`:`save`}),e.inFile?(0,w.jsx)(`button`,{type:`button`,"data-ggui-admin-llm-clear":!0,className:`ggui-btn ggui-btn--ghost`,onClick:()=>void d(),disabled:o,children:`clear`}):null,(0,w.jsx)(`a`,{href:r.apiKeyUrl,target:`_blank`,rel:`noopener noreferrer`,className:`ggui-muted`,style:{fontSize:12},children:`issue a key →`})]}),e.source===`env`&&e.inFile?(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{marginTop:8,marginBottom:0,fontSize:12},children:[`File value present but env var`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:e.envName}),` overrides.`]}):null,c?(0,w.jsx)(`p`,{className:`ggui-muted`,style:{marginTop:8,marginBottom:0,fontSize:12,color:`var(--ggui-color-error, #c5374b)`},children:c}):null]})]})}var Ae=[{id:`google`,label:`Google`},{id:`github`,label:`GitHub`}],je=`<redacted>`;async function Me(e,t,n,r){let i=new Headers(t.headers??{});n!==null&&i.set(`X-Ggui-CSRF`,n);let a=await fetch(e,{...t,headers:i,credentials:`include`});if(a.status!==403)return a;let o=await r();if(o===null)return a;let s=new Headers(t.headers??{});return s.set(`X-Ggui-CSRF`,o),fetch(e,{...t,headers:s,credentials:`include`})}function Ne(){let[e,t]=(0,S.useState)({kind:`loading`}),[n,r]=(0,S.useState)(null),i=async()=>{try{let e=await fetch(`/ggui/csrf-token`,{headers:{accept:`application/json`},credentials:`include`});if(!e.ok)return null;let t=await e.json();return r(t.token),t.token}catch{return null}},a=async()=>{t(e=>e.kind===`ready`?e:{kind:`loading`});try{let e=await fetch(`/ggui/admin/oauth-providers`,{headers:{accept:`application/json`},credentials:`include`});if(e.status===401){E(`/admin-login?next=%2Fadmin%2Foauth-providers`);return}if(!e.ok){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)(()=>{i(),a()},[]);let o=async(e,t)=>{let r=await Me(`/ggui/admin/oauth-providers/${encodeURIComponent(e)}`,{method:`PUT`,headers:{"content-type":`application/json`,accept:`application/json`},body:JSON.stringify(t)},n,i);if(r.status===401){E(`/admin-login?next=%2Fadmin%2Foauth-providers`);return}if(!r.ok)throw Error(`server returned ${r.status}`);await a()},s=async e=>{let t=await Me(`/ggui/admin/oauth-providers/${encodeURIComponent(e)}`,{method:`DELETE`},n,i);if(t.status===401){E(`/admin-login?next=%2Fadmin%2Foauth-providers`);return}if(t.status!==204)throw Error(`server returned ${t.status}`);await a()};return(0,w.jsxs)(`section`,{className:`ggui-section`,children:[(0,w.jsx)(T,{num:`01 / oauth`,title:`OAuth login providers.`,mute:`Operator-only — end-user sign-in identity.`,intro:(0,w.jsxs)(w.Fragment,{children:[`Configure OAuth login providers so end-users can sign in with their existing identity. Operator-only — these credentials are stored at`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`~/.ggui/oauth-providers.json`}),` `,`(mode 0600). Set the`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`GGUI_OAUTH_<PROVIDERID>_CLIENT_ID`}),` `,`/`,` `,(0,w.jsx)(`code`,{className:`ggui-code`,children:`_CLIENT_SECRET`}),` env vars to override per-deployment.`]})}),e.kind===`loading`?(0,w.jsx)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},children:`Loading providers…`}):e.kind===`error`?(0,w.jsxs)(`p`,{className:`ggui-muted`,style:{margin:0,padding:12},"data-ggui-oauth-providers-error":!0,children:[`Couldn't load providers — `,e.message]}):(0,w.jsx)(`div`,{"data-ggui-oauth-providers-list":!0,className:`ggui-stack`,"aria-label":`oauth providers`,children:Ae.map(t=>{let n=e.data.providers.find(e=>e.providerId===t.id);return(0,w.jsx)(Pe,{providerId:t.id,label:t.label,row:n,onSave:o,onDelete:s},t.id)})})]})}function Pe({providerId:e,label:t,row:n,onSave:r,onDelete:i}){let a=n?.source===`env`,o=n?.source===`file`,s=n?.clientId??``,c=n?.enabled??!0,[l,u]=(0,S.useState)(s),[d,f]=(0,S.useState)(``),[p,m]=(0,S.useState)(c),[h,g]=(0,S.useState)(!1),[_,v]=(0,S.useState)(null);(0,S.useEffect)(()=>{u(n?.clientId??``),f(``),m(n?.enabled??!0)},[n?.clientId,n?.enabled,n?.source]);let y=l!==s||d.trim().length>0||p!==c,b=async t=>{if(t.preventDefault(),v(null),l.trim().length===0){v(`Client ID is required.`);return}if(!o&&d.trim().length===0){v(`Client Secret is required.`);return}g(!0);try{await r(e,{clientId:l.trim(),clientSecret:d.trim(),enabled:p})}catch(e){v(`save failed — ${String(e)}`)}finally{g(!1)}},x=async()=>{if(window.confirm(`Delete ${t} OAuth config? End-users will no longer be able to sign in with ${t}.`)){v(null),g(!0);try{await i(e)}catch(e){v(`delete failed — ${String(e)}`)}finally{g(!1)}}};return(0,w.jsxs)(`article`,{"data-ggui-oauth-provider-card":e,className:`ggui-card`,style:{opacity:h?.6:1},children:[(0,w.jsxs)(`div`,{className:`ggui-card__head`,children:[(0,w.jsx)(`span`,{className:`ggui-card__title`,children:t}),(0,w.jsx)(`span`,{style:{marginLeft:`auto`},children:(0,w.jsx)(Fe,{row:n})})]}),(0,w.jsxs)(`div`,{className:`ggui-card__body`,children:[(0,w.jsxs)(`form`,{className:`ggui-form`,onSubmit:e=>{b(e)},children:[(0,w.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:12},children:[(0,w.jsxs)(`label`,{style:{display:`flex`,flexDirection:`column`,gap:4},"aria-label":`${t} client ID`,children:[(0,w.jsx)(`span`,{className:`ggui-muted`,children:`Client ID`}),(0,w.jsx)(`span`,{className:`ggui-field`,children:(0,w.jsx)(`input`,{type:`text`,placeholder:n===void 0?`paste ${t} OAuth client ID`:``,value:l,onChange:e=>u(e.target.value),readOnly:a,disabled:h,autoComplete:`off`,spellCheck:!1,"data-ggui-oauth-provider-client-id":!0})})]}),(0,w.jsxs)(`label`,{style:{display:`flex`,flexDirection:`column`,gap:4},"aria-label":`${t} client secret`,children:[(0,w.jsx)(`span`,{className:`ggui-muted`,children:`Client Secret`}),(0,w.jsx)(`span`,{className:`ggui-field`,children:(0,w.jsx)(`input`,{type:`password`,placeholder:a?je:o?`${je} — leave blank to keep`:`paste ${t} OAuth client secret`,value:a?je:d,onChange:e=>f(e.target.value),readOnly:a,disabled:h,autoComplete:`off`,spellCheck:!1,"data-ggui-oauth-provider-client-secret":!0})})]}),(0,w.jsxs)(`label`,{style:{display:`inline-flex`,flexDirection:`row`,alignItems:`center`,gap:8},"aria-label":`${t} enabled`,children:[(0,w.jsx)(`input`,{type:`checkbox`,checked:p,onChange:e=>m(e.target.checked),disabled:a||h,style:{flex:`none`,width:`auto`},"data-ggui-oauth-provider-enabled":!0}),(0,w.jsx)(`span`,{children:`Enabled`}),a?(0,w.jsx)(`span`,{className:`ggui-muted`,style:{marginLeft:8},children:`env-overrides are always-on`}):null]})]}),(0,w.jsxs)(`div`,{className:`ggui-form__row`,style:{marginTop:12,gap:8},children:[(0,w.jsxs)(`button`,{type:`submit`,className:`ggui-btn`,"data-ggui-oauth-provider-save":!0,disabled:a||h||!y,children:[(0,w.jsx)(`span`,{className:`ggui-btn__dot`,"aria-hidden":!0}),h?`saving…`:`save`]}),o?(0,w.jsx)(`button`,{type:`button`,className:`ggui-btn ggui-btn--ghost`,"data-ggui-oauth-provider-delete":!0,disabled:h,onClick:()=>{x()},style:{color:`crimson`,borderColor:`crimson`},children:`delete`}):null]})]}),_?(0,w.jsx)(`p`,{className:`ggui-muted`,style:{marginTop:8},"data-ggui-oauth-provider-error":!0,children:_}):null]})]})}function Fe({row:e}){return e===void 0?(0,w.jsx)(`span`,{className:`ggui-tag`,style:{opacity:.5},children:`not configured`}):e.source===`env`?(0,w.jsx)(`span`,{className:`ggui-tag`,title:`set via GGUI_OAUTH_*_CLIENT_ID/_SECRET env vars`,children:`configured (env)`}):(0,w.jsx)(`span`,{className:`ggui-tag`,title:`set via this UI; persisted to ~/.ggui/oauth-providers.json`,children:`configured (file)`})}var Ie=Object.defineProperty,Le=(e,t)=>{for(var n in t)Ie(e,n,{get:t[n],enumerable:!0})},Re=`draft-2026-08-19`;Object.freeze([Re]);function ze(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Be;function A(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}var Ve=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},He=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(Be=globalThis).__zod_globalConfig??(Be.__zod_globalConfig={});var Ue=globalThis.__zod_globalConfig;function We(e){return e&&Object.assign(Ue,e),Ue}function Ge(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function Ke(e,t){return typeof t==`bigint`?t.toString():t}function qe(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Je(e){return e==null}function Ye(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function Xe(e,t){let n=e/t,r=Math.round(n),i=2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}var Ze=Symbol(`evaluating`);function j(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Ze)return r===void 0&&(r=Ze,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Qe(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function $e(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function et(e){return JSON.stringify(e)}function tt(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var nt=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function rt(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var it=qe(()=>{if(Ue.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function at(e){if(rt(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return rt(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function ot(e){return at(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var st=new Set([`string`,`number`,`symbol`]);function ct(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function lt(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function M(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function ut(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var dt={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function ft(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return lt(e,$e(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return Qe(this,`shape`,e),e},checks:[]}))}function pt(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return lt(e,$e(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return Qe(this,`shape`,r),r},checks:[]}))}function mt(e,t){if(!at(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return lt(e,$e(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Qe(this,`shape`,n),n}}))}function ht(e,t){if(!at(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return lt(e,$e(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Qe(this,`shape`,n),n}}))}function gt(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return lt(e,$e(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return Qe(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function _t(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return lt(t,$e(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return Qe(this,`shape`,i),i},checks:[]}))}function vt(e,t,n){return lt(t,$e(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return Qe(this,`shape`,i),i}}))}function yt(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function bt(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function xt(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function St(e){return typeof e==`string`?e:e?.message}function Ct(e,t,n){let r=e.message?e.message:St(e.inst?._zod.def?.error?.(e))??St(t?.error?.(e))??St(n.customError?.(e))??St(n.localeError?.(e))??`Invalid input`,{inst:i,continue:a,input:o,...s}=e;return s.path??=[],s.message=r,t?.reportInput&&(s.input=o),s}function wt(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Tt(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var Et=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Ke,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Dt=A(`$ZodError`,Et),Ot=A(`$ZodError`,Et,{Parent:Error});function kt(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function At(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i];i===e.length-1?(r[n]=r[n]||{_errors:[]},r[n]._errors.push(t(a))):r[n]=r[n]||{_errors:[]},r=r[n],i++}}}};return r(e),n}var jt=e=>(t,n,r,i)=>{let a=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new Ve;if(o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>Ct(e,a,We())));throw nt(t,i?.callee),t}return o.value},Mt=e=>async(t,n,r,i)=>{let a=r?{...r,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>Ct(e,a,We())));throw nt(t,i?.callee),t}return o.value},Nt=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new Ve;return a.issues.length?{success:!1,error:new(e??Dt)(a.issues.map(e=>Ct(e,i,We())))}:{success:!0,data:a.value}},Pt=Nt(Ot),Ft=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>Ct(e,i,We())))}:{success:!0,data:a.value}},It=Ft(Ot),Lt=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return jt(e)(t,n,i)},Rt=e=>(t,n,r)=>jt(e)(t,n,r),zt=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Mt(e)(t,n,i)},Bt=e=>async(t,n,r)=>Mt(e)(t,n,r),Vt=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Nt(e)(t,n,i)},Ht=e=>(t,n,r)=>Nt(e)(t,n,r),Ut=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Ft(e)(t,n,i)},Wt=e=>async(t,n,r)=>Ft(e)(t,n,r),Gt=/^[cC][0-9a-z]{6,}$/,Kt=/^[0-9a-z]+$/,qt=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Jt=/^[0-9a-vA-V]{20}$/,Yt=/^[A-Za-z0-9]{27}$/,Xt=/^[a-zA-Z0-9_-]{21}$/,Zt=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Qt=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,$t=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,en=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,tn=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function nn(){return new RegExp(tn,`u`)}var rn=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,an=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,on=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,sn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,cn=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ln=/^[A-Za-z0-9_-]*$/,un=/^https?$/,dn=/^\+[1-9]\d{6,14}$/,fn=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,pn=RegExp(`^${fn}$`);function mn(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function hn(e){return RegExp(`^${mn(e)}$`)}function gn(e){let t=mn({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${fn}T(?:${r})$`)}var _n=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},vn=/^-?\d+$/,yn=/^-?\d+(?:\.\d+)?$/,bn=/^(?:true|false)$/i,xn=/^null$/i,Sn=/^[^A-Z]*$/,Cn=/^[^a-z]*$/,wn=A(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Tn={number:`number`,bigint:`bigint`,object:`date`},En=A(`$ZodCheckLessThan`,(e,t)=>{wn.init(e,t);let n=Tn[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Dn=A(`$ZodCheckGreaterThan`,(e,t)=>{wn.init(e,t);let n=Tn[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),On=A(`$ZodCheckMultipleOf`,(e,t)=>{wn.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):Xe(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),kn=A(`$ZodCheckNumberFormat`,(e,t)=>{wn.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=dt[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=vn)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),An=A(`$ZodCheckMaxLength`,(e,t)=>{var n;wn.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Je(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=wt(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),jn=A(`$ZodCheckMinLength`,(e,t)=>{var n;wn.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Je(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=wt(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Mn=A(`$ZodCheckLengthEquals`,(e,t)=>{var n;wn.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Je(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=wt(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Nn=A(`$ZodCheckStringFormat`,(e,t)=>{var n,r;wn.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Pn=A(`$ZodCheckRegex`,(e,t)=>{Nn.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Fn=A(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Sn,Nn.init(e,t)}),In=A(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Cn,Nn.init(e,t)}),Ln=A(`$ZodCheckIncludes`,(e,t)=>{wn.init(e,t);let n=ct(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Rn=A(`$ZodCheckStartsWith`,(e,t)=>{wn.init(e,t);let n=RegExp(`^${ct(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),zn=A(`$ZodCheckEndsWith`,(e,t)=>{wn.init(e,t);let n=RegExp(`.*${ct(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Bn=A(`$ZodCheckOverwrite`,(e,t)=>{wn.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),Vn=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
10
+ `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
11
+ `))}},Hn={major:4,minor:4,patch:3},Un=A(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Hn;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=yt(e),i;for(let a of t){if(a._zod.def.when){if(bt(e)||!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new Ve;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=yt(e,t))});else{if(e.issues.length===t)continue;r||=yt(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(yt(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new Ve;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new Ve;return o.then(e=>t(e,r,a))}return t(o,r,a)}}j(e,`~standard`,()=>({validate:t=>{try{let n=Pt(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return It(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),Wn=A(`$ZodString`,(e,t)=>{Un.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??_n(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),Gn=A(`$ZodStringFormat`,(e,t)=>{Nn.init(e,t),Wn.init(e,t)}),Kn=A(`$ZodGUID`,(e,t)=>{t.pattern??=Qt,Gn.init(e,t)}),qn=A(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=$t(e)}else t.pattern??=$t();Gn.init(e,t)}),Jn=A(`$ZodEmail`,(e,t)=>{t.pattern??=en,Gn.init(e,t)}),Yn=A(`$ZodURL`,(e,t)=>{Gn.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===un.source&&!/^https?:\/\//i.test(r)){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}let i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),n.value=t.normalize?i.href:r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Xn=A(`$ZodEmoji`,(e,t)=>{t.pattern??=nn(),Gn.init(e,t)}),Zn=A(`$ZodNanoID`,(e,t)=>{t.pattern??=Xt,Gn.init(e,t)}),Qn=A(`$ZodCUID`,(e,t)=>{t.pattern??=Gt,Gn.init(e,t)}),$n=A(`$ZodCUID2`,(e,t)=>{t.pattern??=Kt,Gn.init(e,t)}),er=A(`$ZodULID`,(e,t)=>{t.pattern??=qt,Gn.init(e,t)}),tr=A(`$ZodXID`,(e,t)=>{t.pattern??=Jt,Gn.init(e,t)}),nr=A(`$ZodKSUID`,(e,t)=>{t.pattern??=Yt,Gn.init(e,t)}),rr=A(`$ZodISODateTime`,(e,t)=>{t.pattern??=gn(t),Gn.init(e,t)}),ir=A(`$ZodISODate`,(e,t)=>{t.pattern??=pn,Gn.init(e,t)}),ar=A(`$ZodISOTime`,(e,t)=>{t.pattern??=hn(t),Gn.init(e,t)}),or=A(`$ZodISODuration`,(e,t)=>{t.pattern??=Zt,Gn.init(e,t)}),sr=A(`$ZodIPv4`,(e,t)=>{t.pattern??=rn,Gn.init(e,t),e._zod.bag.format=`ipv4`}),cr=A(`$ZodIPv6`,(e,t)=>{t.pattern??=an,Gn.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),lr=A(`$ZodCIDRv4`,(e,t)=>{t.pattern??=on,Gn.init(e,t)}),ur=A(`$ZodCIDRv6`,(e,t)=>{t.pattern??=sn,Gn.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function dr(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var fr=A(`$ZodBase64`,(e,t)=>{t.pattern??=cn,Gn.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{dr(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function pr(e){if(!ln.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return dr(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var mr=A(`$ZodBase64URL`,(e,t)=>{t.pattern??=ln,Gn.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{pr(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),hr=A(`$ZodE164`,(e,t)=>{t.pattern??=dn,Gn.init(e,t)});function gr(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var _r=A(`$ZodJWT`,(e,t)=>{Gn.init(e,t),e._zod.check=n=>{gr(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),vr=A(`$ZodNumber`,(e,t)=>{Un.init(e,t),e._zod.pattern=e._zod.bag.pattern??yn,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),yr=A(`$ZodNumberFormat`,(e,t)=>{kn.init(e,t),vr.init(e,t)}),br=A(`$ZodBoolean`,(e,t)=>{Un.init(e,t),e._zod.pattern=bn,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),xr=A(`$ZodNull`,(e,t)=>{Un.init(e,t),e._zod.pattern=xn,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),Sr=A(`$ZodUnknown`,(e,t)=>{Un.init(e,t),e._zod.parse=e=>e}),Cr=A(`$ZodNever`,(e,t)=>{Un.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function wr(e,t,n){e.issues.length&&t.issues.push(...xt(n,e.issues)),t.value[n]=e.value}var Tr=A(`$ZodArray`,(e,t)=>{Un.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>wr(t,n,e))):wr(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function Er(e,t,n,r,i,a){let o=n in r;if(e.issues.length){if(i&&a&&!o)return;t.issues.push(...xt(n,e.issues))}if(!o&&!i){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}function Dr(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=ut(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Or(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin===`optional`,d=c.optout===`optional`;for(let i in t){if(i===`__proto__`||s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>Er(e,n,i,t,u,d))):Er(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var kr=A(`$ZodObject`,(e,t)=>{if(Un.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}let n=qe(()=>Dr(t));j(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=rt,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optin===`optional`,i=n._zod.optout===`optional`,a=n._zod.run({value:s[e],issues:[]},o);a instanceof Promise?c.push(a.then(n=>Er(n,t,e,s,r,i))):Er(a,t,e,s,r,i)}return i?Or(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),Ar=A(`$ZodObjectJIT`,(e,t)=>{kr.init(e,t);let n=e._zod.parse,r=qe(()=>Dr(t)),i=e=>{let t=new Vn([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=et(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=et(r),s=e[r],c=s?._zod?.optin===`optional`,l=s?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),c&&l?t.write(`
12
+ if (${n}.issues.length) {
13
+ if (${o} in input) {
14
+ payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
15
+ ...iss,
16
+ path: iss.path ? [${o}, ...iss.path] : [${o}]
17
+ })));
18
+ }
19
+ }
20
+
21
+ if (${n}.value === undefined) {
22
+ if (${o} in input) {
23
+ newResult[${o}] = undefined;
24
+ }
25
+ } else {
26
+ newResult[${o}] = ${n}.value;
27
+ }
28
+
29
+ `):c?t.write(`
30
+ if (${n}.issues.length) {
31
+ payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
32
+ ...iss,
33
+ path: iss.path ? [${o}, ...iss.path] : [${o}]
34
+ })));
35
+ }
36
+
37
+ if (${n}.value === undefined) {
38
+ if (${o} in input) {
39
+ newResult[${o}] = undefined;
40
+ }
41
+ } else {
42
+ newResult[${o}] = ${n}.value;
43
+ }
44
+
45
+ `):t.write(`
46
+ const ${n}_present = ${o} in input;
47
+ if (${n}.issues.length) {
48
+ payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
49
+ ...iss,
50
+ path: iss.path ? [${o}, ...iss.path] : [${o}]
51
+ })));
52
+ }
53
+ if (!${n}_present && !${n}.issues.length) {
54
+ payload.issues.push({
55
+ code: "invalid_type",
56
+ expected: "nonoptional",
57
+ input: undefined,
58
+ path: [${o}]
59
+ });
60
+ }
61
+
62
+ if (${n}_present) {
63
+ if (${n}.value === undefined) {
64
+ newResult[${o}] = undefined;
65
+ } else {
66
+ newResult[${o}] = ${n}.value;
67
+ }
68
+ }
69
+
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
+
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?`
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
+ || (${s} == "string" && ${a} && ${a} == +${a})`).assign(c,(0,i._)`+${a}`);return;case`integer`:r.elseIf((0,i._)`${s} === "boolean" || ${a} === null
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"
76
+ || ${s} === "boolean" || ${a} === null`).assign(c,(0,i._)`[${a}]`)}}}function p({gen:e,parentData:t,parentDataProperty:n},r){e.if((0,i._)`${t} !== undefined`,()=>e.assign((0,i._)`${t}[${n}]`,r))}function m(e,t,n,r=o.Correct){let a=r===o.Correct?i.operators.EQ:i.operators.NEQ,s;switch(e){case`null`:return(0,i._)`${t} ${a} null`;case`array`:s=(0,i._)`Array.isArray(${t})`;break;case`object`:s=(0,i._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case`integer`:s=c((0,i._)`!(${t} % 1) && !isNaN(${t})`);break;case`number`:s=c();break;default:return(0,i._)`typeof ${t} ${a} ${e}`}return r===o.Correct?s:(0,i.not)(s);function c(e=i.nil){return(0,i.and)((0,i._)`typeof ${t} == "number"`,e,n?(0,i._)`isFinite(${t})`:i.nil)}}e.checkDataType=m;function h(e,t,n,r){if(e.length===1)return m(e[0],t,n,r);let o,s=(0,a.toHash)(e);if(s.array&&s.object){let e=(0,i._)`typeof ${t} != "object"`;o=s.null?e:(0,i._)`!${t} || ${e}`,delete s.null,delete s.array,delete s.object}else o=i.nil;s.number&&delete s.integer;for(let e in s)o=(0,i.and)(o,m(e,t,n,r));return o}e.checkDataTypes=h;var g={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e==`string`?(0,i._)`{type: ${e}}`:(0,i._)`{type: ${t}}`};function _(e){let t=v(e);(0,r.reportError)(t,g)}e.reportTypeError=_;function v(e){let{gen:t,data:n,schema:r}=e,i=(0,a.schemaRefOrVal)(e,r,`type`);return{gen:t,keyword:`type`,data:n,schema:r.type,schemaCode:i,schemaValue:i,parentSchema:r,params:{},it:e}}})),Kc=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.assignDefaults=void 0;var t=V(),n=H();function r(e,t){let{properties:n,items:r}=e.schema;if(t===`object`&&n)for(let t in n)i(e,t,n[t].default);else t===`array`&&Array.isArray(r)&&r.forEach((t,n)=>i(e,n,t.default))}e.assignDefaults=r;function i(e,r,i){let{gen:a,compositeRule:o,data:s,opts:c}=e;if(i===void 0)return;let l=(0,t._)`${s}${(0,t.getProperty)(r)}`;if(o){(0,n.checkStrictMode)(e,`default is ignored for: ${l}`);return}let u=(0,t._)`${l} === undefined`;c.useDefaults===`empty`&&(u=(0,t._)`${u} || ${l} === null || ${l} === ""`),a.if(u,(0,t._)`${l} = ${(0,t.stringify)(i)}`)}})),qc=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateUnion=e.validateArray=e.usePattern=e.callValidateCode=e.schemaProperties=e.allSchemaProperties=e.noPropertyInData=e.propertyInData=e.isOwnProperty=e.hasPropFunc=e.reportMissingProp=e.checkMissingProp=e.checkReportMissingProp=void 0;var t=V(),n=H(),r=Bc(),i=H();function a(e,n){let{gen:r,data:i,it:a}=e;r.if(d(r,i,n,a.opts.ownProperties),()=>{e.setParams({missingProperty:(0,t._)`${n}`},!0),e.error()})}e.checkReportMissingProp=a;function o({gen:e,data:n,it:{opts:r}},i,a){return(0,t.or)(...i.map(i=>(0,t.and)(d(e,n,i,r.ownProperties),(0,t._)`${a} = ${i}`)))}e.checkMissingProp=o;function s(e,t){e.setParams({missingProperty:t},!0),e.error()}e.reportMissingProp=s;function c(e){return e.scopeValue(`func`,{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}e.hasPropFunc=c;function l(e,n,r){return(0,t._)`${c(e)}.call(${n}, ${r})`}e.isOwnProperty=l;function u(e,n,r,i){let a=(0,t._)`${n}${(0,t.getProperty)(r)} !== undefined`;return i?(0,t._)`${a} && ${l(e,n,r)}`:a}e.propertyInData=u;function d(e,n,r,i){let a=(0,t._)`${n}${(0,t.getProperty)(r)} === undefined`;return i?(0,t.or)(a,(0,t.not)(l(e,n,r))):a}e.noPropertyInData=d;function f(e){return e?Object.keys(e).filter(e=>e!==`__proto__`):[]}e.allSchemaProperties=f;function p(e,t){return f(t).filter(r=>!(0,n.alwaysValidSchema)(e,t[r]))}e.schemaProperties=p;function m({schemaCode:e,data:n,it:{gen:i,topSchemaRef:a,schemaPath:o,errorPath:s},it:c},l,u,d){let f=d?(0,t._)`${e}, ${n}, ${a}${o}`:n,p=[[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,s)],[r.default.parentData,c.parentData],[r.default.parentDataProperty,c.parentDataProperty],[r.default.rootData,r.default.rootData]];c.opts.dynamicRef&&p.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);let m=(0,t._)`${f}, ${i.object(...p)}`;return u===t.nil?(0,t._)`${l}(${m})`:(0,t._)`${l}.call(${u}, ${m})`}e.callValidateCode=m;var h=(0,t._)`new RegExp`;function g({gen:e,it:{opts:n}},r){let a=n.unicodeRegExp?`u`:``,{regExp:o}=n.code,s=o(r,a);return e.scopeValue(`pattern`,{key:s.toString(),ref:s,code:(0,t._)`${o.code===`new RegExp`?h:(0,i.useFunc)(e,o)}(${r}, ${a})`})}e.usePattern=g;function _(e){let{gen:r,data:i,keyword:a,it:o}=e,s=r.name(`valid`);if(o.allErrors){let e=r.let(`valid`,!0);return c(()=>r.assign(e,!1)),e}return r.var(s,!0),c(()=>r.break()),s;function c(o){let c=r.const(`len`,(0,t._)`${i}.length`);r.forRange(`i`,0,c,i=>{e.subschema({keyword:a,dataProp:i,dataPropType:n.Type.Num},s),r.if((0,t.not)(s),o)})}}e.validateArray=_;function v(e){let{gen:r,schema:i,keyword:a,it:o}=e;if(!Array.isArray(i))throw Error(`ajv implementation error`);if(i.some(e=>(0,n.alwaysValidSchema)(o,e))&&!o.opts.unevaluated)return;let s=r.let(`valid`,!1),c=r.name(`_valid`);r.block(()=>i.forEach((n,i)=>{let o=e.subschema({keyword:a,schemaProp:i,compositeRule:!0},c);r.assign(s,(0,t._)`${s} || ${c}`),e.mergeValidEvaluated(o,c)||r.if((0,t.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}e.validateUnion=v})),Jc=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateKeywordUsage=e.validSchemaType=e.funcKeywordCode=e.macroKeywordCode=void 0;var t=V(),n=Bc(),r=qc(),i=Vc();function a(e,n){let{gen:r,keyword:i,schema:a,parentSchema:o,it:s}=e,c=n.macro.call(s.self,a,o,s),l=u(r,i,c);s.opts.validateSchema!==!1&&s.self.validateSchema(c,!0);let d=r.name(`valid`);e.subschema({schema:c,schemaPath:t.nil,errSchemaPath:`${s.errSchemaPath}/${i}`,topSchemaRef:l,compositeRule:!0},d),e.pass(d,()=>e.error(!0))}e.macroKeywordCode=a;function o(e,i){let{gen:a,keyword:o,schema:d,parentSchema:f,$data:p,it:m}=e;l(m,i);let h=u(a,o,!p&&i.compile?i.compile.call(m.self,d,f,m):i.validate),g=a.let(`valid`);e.block$data(g,_),e.ok(i.valid??g);function _(){if(i.errors===!1)b(),i.modifying&&s(e),x(()=>e.error());else{let t=i.async?v():y();i.modifying&&s(e),x(()=>c(e,t))}}function v(){let e=a.let(`ruleErrs`,null);return a.try(()=>b((0,t._)`await `),n=>a.assign(g,!1).if((0,t._)`${n} instanceof ${m.ValidationError}`,()=>a.assign(e,(0,t._)`${n}.errors`),()=>a.throw(n))),e}function y(){let e=(0,t._)`${h}.errors`;return a.assign(e,null),b(t.nil),e}function b(o=i.async?(0,t._)`await `:t.nil){let s=m.opts.passContext?n.default.this:n.default.self,c=!(`compile`in i&&!p||i.schema===!1);a.assign(g,(0,t._)`${o}${(0,r.callValidateCode)(e,h,s,c)}`,i.modifying)}function x(e){a.if((0,t.not)(i.valid??g),e)}}e.funcKeywordCode=o;function s(e){let{gen:n,data:r,it:i}=e;n.if(i.parentData,()=>n.assign(r,(0,t._)`${i.parentData}[${i.parentDataProperty}]`))}function c(e,r){let{gen:a}=e;a.if((0,t._)`Array.isArray(${r})`,()=>{a.assign(n.default.vErrors,(0,t._)`${n.default.vErrors} === null ? ${r} : ${n.default.vErrors}.concat(${r})`).assign(n.default.errors,(0,t._)`${n.default.vErrors}.length`),(0,i.extendErrors)(e)},()=>e.error())}function l({schemaEnv:e},t){if(t.async&&!e.$async)throw Error(`async keyword in sync schema`)}function u(e,n,r){if(r===void 0)throw Error(`keyword "${n}" failed to compile`);return e.scopeValue(`keyword`,typeof r==`function`?{ref:r}:{ref:r,code:(0,t.stringify)(r)})}function d(e,t,n=!1){return!t.length||t.some(t=>t===`array`?Array.isArray(e):t===`object`?e&&typeof e==`object`&&!Array.isArray(e):typeof e==t||n&&e===void 0)}e.validSchemaType=d;function f({schema:e,opts:t,self:n,errSchemaPath:r},i,a){if(Array.isArray(i.keyword)?!i.keyword.includes(a):i.keyword!==a)throw Error(`ajv implementation error`);let o=i.dependencies;if(o?.some(t=>!Object.prototype.hasOwnProperty.call(e,t)))throw Error(`parent schema must have dependencies of ${a}: ${o.join(`,`)}`);if(i.validateSchema&&!i.validateSchema(e[a])){let e=`keyword "${a}" value is invalid at path "${r}": `+n.errorsText(i.validateSchema.errors);if(t.validateSchema===`log`)n.logger.error(e);else throw Error(e)}}e.validateKeywordUsage=f})),Yc=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendSubschemaMode=e.extendSubschemaData=e.getSubschema=void 0;var t=V(),n=H();function r(e,{keyword:r,schemaProp:i,schema:a,schemaPath:o,errSchemaPath:s,topSchemaRef:c}){if(r!==void 0&&a!==void 0)throw Error(`both "keyword" and "schema" passed, only one allowed`);if(r!==void 0){let a=e.schema[r];return i===void 0?{schema:a,schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${r}`}:{schema:a[i],schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(r)}${(0,t.getProperty)(i)}`,errSchemaPath:`${e.errSchemaPath}/${r}/${(0,n.escapeFragment)(i)}`}}if(a!==void 0){if(o===void 0||s===void 0||c===void 0)throw Error(`"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"`);return{schema:a,schemaPath:o,topSchemaRef:c,errSchemaPath:s}}throw Error(`either "keyword" or "schema" must be passed`)}e.getSubschema=r;function i(e,r,{dataProp:i,dataPropType:a,data:o,dataTypes:s,propertyName:c}){if(o!==void 0&&i!==void 0)throw Error(`both "data" and "dataProp" passed, only one allowed`);let{gen:l}=r;if(i!==void 0){let{errorPath:o,dataPathArr:s,opts:c}=r;u(l.let(`data`,(0,t._)`${r.data}${(0,t.getProperty)(i)}`,!0)),e.errorPath=(0,t.str)`${o}${(0,n.getErrorPath)(i,a,c.jsPropertySyntax)}`,e.parentDataProperty=(0,t._)`${i}`,e.dataPathArr=[...s,e.parentDataProperty]}o!==void 0&&(u(o instanceof t.Name?o:l.let(`data`,o,!0)),c!==void 0&&(e.propertyName=c)),s&&(e.dataTypes=s);function u(t){e.data=t,e.dataLevel=r.dataLevel+1,e.dataTypes=[],r.definedProperties=new Set,e.parentData=r.data,e.dataNames=[...r.dataNames,t]}}e.extendSubschemaData=i;function a(e,{jtdDiscriminator:t,jtdMetadata:n,compositeRule:r,createErrors:i,allErrors:a}){r!==void 0&&(e.compositeRule=r),i!==void 0&&(e.createErrors=i),a!==void 0&&(e.allErrors=a),e.jtdDiscriminator=t,e.jtdMetadata=n}e.extendSubschemaMode=a})),Xc=s(((e,t)=>{t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t==`object`&&typeof n==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n}})),Zc=s(((e,t)=>{var n=t.exports=function(e,t,n){typeof t==`function`&&(n=t,t={}),n=t.cb||n;var i=typeof n==`function`?n:n.pre||function(){},a=n.post||function(){};r(t,i,a,e,``,e)};n.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},n.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},n.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},n.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function r(e,t,a,o,s,c,l,u,d,f){if(o&&typeof o==`object`&&!Array.isArray(o)){for(var p in t(o,s,c,l,u,d,f),o){var m=o[p];if(Array.isArray(m)){if(p in n.arrayKeywords)for(var h=0;h<m.length;h++)r(e,t,a,m[h],s+`/`+p+`/`+h,c,s,p,o,h)}else if(p in n.propsKeywords){if(m&&typeof m==`object`)for(var g in m)r(e,t,a,m[g],s+`/`+p+`/`+i(g),c,s,p,o,g)}else(p in n.keywords||e.allKeys&&!(p in n.skipKeywords))&&r(e,t,a,m,s+`/`+p,c,s,p,o)}a(o,s,c,l,u,d,f)}}function i(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}})),Qc=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getSchemaRefs=e.resolveUrl=e.normalizeId=e._getFullPath=e.getFullPath=e.inlineRef=void 0;var t=H(),n=Xc(),r=Zc(),i=new Set([`type`,`format`,`pattern`,`maxLength`,`minLength`,`maxProperties`,`minProperties`,`maxItems`,`minItems`,`maximum`,`minimum`,`uniqueItems`,`multipleOf`,`required`,`enum`,`const`]);function a(e,t=!0){return typeof e==`boolean`?!0:t===!0?!s(e):t?c(e)<=t:!1}e.inlineRef=a;var o=new Set([`$ref`,`$recursiveRef`,`$recursiveAnchor`,`$dynamicRef`,`$dynamicAnchor`]);function s(e){for(let t in e){if(o.has(t))return!0;let n=e[t];if(Array.isArray(n)&&n.some(s)||typeof n==`object`&&s(n))return!0}return!1}function c(e){let n=0;for(let r in e)if(r===`$ref`||(n++,!i.has(r)&&(typeof e[r]==`object`&&(0,t.eachItem)(e[r],e=>n+=c(e)),n===1/0)))return 1/0;return n}function l(e,t=``,n){return n!==!1&&(t=f(t)),u(e,e.parse(t))}e.getFullPath=l;function u(e,t){return e.serialize(t).split(`#`)[0]+`#`}e._getFullPath=u;var d=/#\/?$/;function f(e){return e?e.replace(d,``):``}e.normalizeId=f;function p(e,t,n){return n=f(n),e.resolve(t,n)}e.resolveUrl=p;var m=/^[a-z_][-a-z0-9._]*$/i;function h(e,t){if(typeof e==`boolean`)return{};let{schemaId:i,uriResolver:a}=this.opts,o=f(e[i]||t),s={"":o},c=l(a,o,!1),u={},d=new Set;return r(e,{allKeys:!0},(e,t,n,r)=>{if(r===void 0)return;let a=c+t,o=s[r];typeof e[i]==`string`&&(o=l.call(this,e[i])),g.call(this,e.$anchor),g.call(this,e.$dynamicAnchor),s[t]=o;function l(t){let n=this.opts.uriResolver.resolve;if(t=f(o?n(o,t):t),d.has(t))throw h(t);d.add(t);let r=this.refs[t];return typeof r==`string`&&(r=this.refs[r]),typeof r==`object`?p(e,r.schema,t):t!==f(a)&&(t[0]===`#`?(p(e,u[t],t),u[t]=e):this.refs[t]=a),t}function g(e){if(typeof e==`string`){if(!m.test(e))throw Error(`invalid anchor "${e}"`);l.call(this,`#${e}`)}}}),u;function p(e,t,r){if(t!==void 0&&!n(e,t))throw h(r)}function h(e){return Error(`reference "${e}" resolves to more than one schema`)}}e.getSchemaRefs=h})),$c=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getData=e.KeywordCxt=e.validateFunctionCode=void 0;var t=Hc(),n=Gc(),r=Wc(),i=Gc(),a=Kc(),o=Jc(),s=Yc(),c=V(),l=Bc(),u=Qc(),d=H(),f=Vc();function p(e){if(S(e)&&(w(e),x(e))){_(e);return}m(e,()=>(0,t.topBoolOrEmptySchema)(e))}e.validateFunctionCode=p;function m({gen:e,validateName:t,schema:n,schemaEnv:r,opts:i},a){i.code.es5?e.func(t,(0,c._)`${l.default.data}, ${l.default.valCxt}`,r.$async,()=>{e.code((0,c._)`"use strict"; ${y(n,i)}`),g(e,i),e.code(a)}):e.func(t,(0,c._)`${l.default.data}, ${h(i)}`,r.$async,()=>e.code(y(n,i)).code(a))}function h(e){return(0,c._)`{${l.default.instancePath}="", ${l.default.parentData}, ${l.default.parentDataProperty}, ${l.default.rootData}=${l.default.data}${e.dynamicRef?(0,c._)`, ${l.default.dynamicAnchors}={}`:c.nil}}={}`}function g(e,t){e.if(l.default.valCxt,()=>{e.var(l.default.instancePath,(0,c._)`${l.default.valCxt}.${l.default.instancePath}`),e.var(l.default.parentData,(0,c._)`${l.default.valCxt}.${l.default.parentData}`),e.var(l.default.parentDataProperty,(0,c._)`${l.default.valCxt}.${l.default.parentDataProperty}`),e.var(l.default.rootData,(0,c._)`${l.default.valCxt}.${l.default.rootData}`),t.dynamicRef&&e.var(l.default.dynamicAnchors,(0,c._)`${l.default.valCxt}.${l.default.dynamicAnchors}`)},()=>{e.var(l.default.instancePath,(0,c._)`""`),e.var(l.default.parentData,(0,c._)`undefined`),e.var(l.default.parentDataProperty,(0,c._)`undefined`),e.var(l.default.rootData,l.default.data),t.dynamicRef&&e.var(l.default.dynamicAnchors,(0,c._)`{}`)})}function _(e){let{schema:t,opts:n,gen:r}=e;m(e,()=>{n.$comment&&t.$comment&&ie(e),te(e),r.let(l.default.vErrors,null),r.let(l.default.errors,0),n.unevaluated&&v(e),T(e),E(e)})}function v(e){let{gen:t,validateName:n}=e;e.evaluated=t.const(`evaluated`,(0,c._)`${n}.evaluated`),t.if((0,c._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,c._)`${e.evaluated}.props`,(0,c._)`undefined`)),t.if((0,c._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,c._)`${e.evaluated}.items`,(0,c._)`undefined`))}function y(e,t){let n=typeof e==`object`&&e[t.schemaId];return n&&(t.code.source||t.code.process)?(0,c._)`/*# sourceURL=${n} */`:c.nil}function b(e,n){if(S(e)&&(w(e),x(e))){C(e,n);return}(0,t.boolOrEmptySchema)(e,n)}function x({schema:e,self:t}){if(typeof e==`boolean`)return!e;for(let n in e)if(t.RULES.all[n])return!0;return!1}function S(e){return typeof e.schema!=`boolean`}function C(e,t){let{schema:n,gen:r,opts:i}=e;i.$comment&&n.$comment&&ie(e),ne(e),re(e);let a=r.const(`_errs`,l.default.errors);T(e,a),r.var(t,(0,c._)`${a} === ${l.default.errors}`)}function w(e){(0,d.checkUnknownRules)(e),ee(e)}function T(e,t){if(e.opts.jtd)return oe(e,[],!1,t);let r=(0,n.getSchemaTypes)(e.schema);oe(e,r,!(0,n.coerceAndCheckDataType)(e,r),t)}function ee(e){let{schema:t,errSchemaPath:n,opts:r,self:i}=e;t.$ref&&r.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}function te(e){let{schema:t,opts:n}=e;t.default!==void 0&&n.useDefaults&&n.strictSchema&&(0,d.checkStrictMode)(e,`default is ignored in the schema root`)}function ne(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,u.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function re(e){if(e.schema.$async&&!e.schemaEnv.$async)throw Error(`async schema in sync schema`)}function ie({gen:e,schemaEnv:t,schema:n,errSchemaPath:r,opts:i}){let a=n.$comment;if(i.$comment===!0)e.code((0,c._)`${l.default.self}.logger.log(${a})`);else if(typeof i.$comment==`function`){let n=(0,c.str)`${r}/$comment`,i=e.scopeValue(`root`,{ref:t.root});e.code((0,c._)`${l.default.self}.opts.$comment(${a}, ${n}, ${i}.schema)`)}}function E(e){let{gen:t,schemaEnv:n,validateName:r,ValidationError:i,opts:a}=e;n.$async?t.if((0,c._)`${l.default.errors} === 0`,()=>t.return(l.default.data),()=>t.throw((0,c._)`new ${i}(${l.default.vErrors})`)):(t.assign((0,c._)`${r}.errors`,l.default.vErrors),a.unevaluated&&ae(e),t.return((0,c._)`${l.default.errors} === 0`))}function ae({gen:e,evaluated:t,props:n,items:r}){n instanceof c.Name&&e.assign((0,c._)`${t}.props`,n),r instanceof c.Name&&e.assign((0,c._)`${t}.items`,r)}function oe(e,t,n,a){let{gen:o,schema:s,data:u,allErrors:f,opts:p,self:m}=e,{RULES:h}=m;if(s.$ref&&(p.ignoreKeywordsWithRef||!(0,d.schemaHasRulesButRef)(s,h))){o.block(()=>me(e,`$ref`,h.all.$ref.definition));return}p.jtd||ce(e,t),o.block(()=>{for(let e of h.rules)g(e);g(h.post)});function g(d){(0,r.shouldUseGroup)(s,d)&&(d.type?(o.if((0,i.checkDataType)(d.type,u,p.strictNumbers)),se(e,d),t.length===1&&t[0]===d.type&&n&&(o.else(),(0,i.reportTypeError)(e)),o.endIf()):se(e,d),f||o.if((0,c._)`${l.default.errors} === ${a||0}`))}}function se(e,t){let{gen:n,schema:i,opts:{useDefaults:o}}=e;o&&(0,a.assignDefaults)(e,t.type),n.block(()=>{for(let n of t.rules)(0,r.shouldUseRule)(i,n)&&me(e,n.keyword,n.definition,t.type)})}function ce(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(D(e,t),e.opts.allowUnionTypes||O(e,t),le(e,e.dataTypes))}function D(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(t=>{de(e.dataTypes,t)||pe(e,`type "${t}" not allowed by context "${e.dataTypes.join(`,`)}"`)}),fe(e,t)}}function O(e,t){t.length>1&&!(t.length===2&&t.includes(`null`))&&pe(e,`use allowUnionTypes to allow union type keyword`)}function le(e,t){let n=e.self.RULES.all;for(let i in n){let a=n[i];if(typeof a==`object`&&(0,r.shouldUseRule)(e.schema,a)){let{type:n}=a.definition;n.length&&!n.some(e=>ue(t,e))&&pe(e,`missing type "${n.join(`,`)}" for keyword "${i}"`)}}}function ue(e,t){return e.includes(t)||t===`number`&&e.includes(`integer`)}function de(e,t){return e.includes(t)||t===`integer`&&e.includes(`number`)}function fe(e,t){let n=[];for(let r of e.dataTypes)de(t,r)?n.push(r):t.includes(`integer`)&&r===`number`&&n.push(`integer`);e.dataTypes=n}function pe(e,t){let n=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${n}" (strictTypes)`,(0,d.checkStrictMode)(e,t,e.opts.strictTypes)}var k=class{constructor(e,t,n){if((0,o.validateKeywordUsage)(e,t,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,d.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const(`vSchema`,_e(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw Error(`${n} value must be ${JSON.stringify(t.schemaType)}`);(`code`in t?t.trackErrors:t.errors!==!1)&&(this.errsCount=e.gen.const(`_errs`,l.default.errors))}result(e,t,n){this.failResult((0,c.not)(e),t,n)}failResult(e,t,n){this.gen.if(e),n?n():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,c.not)(e),void 0,t)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail((0,c._)`${t} !== undefined && (${(0,c.or)(this.invalid$data(),e)})`)}error(e,t,n){if(t){this.setParams(t),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,t){(e?f.reportExtraError:f.reportError)(this,this.def.error,t)}$dataError(){(0,f.reportError)(this,this.def.$dataError||f.keyword$DataError)}reset(){if(this.errsCount===void 0)throw Error(`add "trackErrors" to keyword definition`);(0,f.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,n=c.nil){this.gen.block(()=>{this.check$data(e,n),t()})}check$data(e=c.nil,t=c.nil){if(!this.$data)return;let{gen:n,schemaCode:r,schemaType:i,def:a}=this;n.if((0,c.or)((0,c._)`${r} === undefined`,t)),e!==c.nil&&n.assign(e,!0),(i.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==c.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:n,def:r,it:a}=this;return(0,c.or)(o(),s());function o(){if(n.length){if(!(t instanceof c.Name))throw Error(`ajv implementation error`);let e=Array.isArray(n)?n:[n];return(0,c._)`${(0,i.checkDataTypes)(e,t,a.opts.strictNumbers,i.DataType.Wrong)}`}return c.nil}function s(){if(r.validateSchema){let n=e.scopeValue(`validate$data`,{ref:r.validateSchema});return(0,c._)`!${n}(${t})`}return c.nil}}subschema(e,t){let n=(0,s.getSubschema)(this.it,e);(0,s.extendSubschemaData)(n,this.it,e),(0,s.extendSubschemaMode)(n,e);let r={...this.it,...n,items:void 0,props:void 0};return b(r,t),r}mergeEvaluated(e,t){let{it:n,gen:r}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=d.mergeEvaluated.props(r,e.props,n.props,t)),n.items!==!0&&e.items!==void 0&&(n.items=d.mergeEvaluated.items(r,e.items,n.items,t)))}mergeValidEvaluated(e,t){let{it:n,gen:r}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return r.if(t,()=>this.mergeEvaluated(e,c.Name)),!0}};e.KeywordCxt=k;function me(e,t,n,r){let i=new k(e,n,t);`code`in n?n.code(i,r):i.$data&&n.validate?(0,o.funcKeywordCode)(i,n):`macro`in n?(0,o.macroKeywordCode)(i,n):(n.compile||n.validate)&&(0,o.funcKeywordCode)(i,n)}var he=/^\/(?:[^~]|~0|~1)*$/,ge=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function _e(e,{dataLevel:t,dataNames:n,dataPathArr:r}){let i,a;if(e===``)return l.default.rootData;if(e[0]===`/`){if(!he.test(e))throw Error(`Invalid JSON-pointer: ${e}`);i=e,a=l.default.rootData}else{let o=ge.exec(e);if(!o)throw Error(`Invalid JSON-pointer: ${e}`);let s=+o[1];if(i=o[2],i===`#`){if(s>=t)throw Error(u(`property/index`,s));return r[t-s]}if(s>t)throw Error(u(`data`,s));if(a=n[t-s],!i)return a}let o=a,s=i.split(`/`);for(let e of s)e&&(a=(0,c._)`${a}${(0,c.getProperty)((0,d.unescapeJsonPointer)(e))}`,o=(0,c._)`${o} && ${a}`);return o;function u(e,n){return`Cannot access ${e} ${n} levels up, current level is ${t}`}}e.getData=_e})),el=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=class extends Error{constructor(e){super(`validation failed`),this.errors=e,this.ajv=this.validation=!0}}})),tl=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Qc();e.default=class extends Error{constructor(e,n,r,i){super(i||`can't resolve reference ${r} from id ${n}`),this.missingRef=(0,t.resolveUrl)(e,n,r),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(e,this.missingRef))}}})),nl=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.resolveSchema=e.getCompilingSchema=e.resolveRef=e.compileSchema=e.SchemaEnv=void 0;var t=V(),n=el(),r=Bc(),i=Qc(),a=H(),o=$c(),s=class{constructor(e){this.refs={},this.dynamicAnchors={};let t;typeof e.schema==`object`&&(t=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=e.baseId??(0,i.normalizeId)(t?.[e.schemaId||`$id`]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=t?.$async,this.refs={}}};e.SchemaEnv=s;function c(e){let a=d.call(this,e);if(a)return a;let s=(0,i.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:c,lines:l}=this.opts.code,{ownProperties:u}=this.opts,f=new t.CodeGen(this.scope,{es5:c,lines:l,ownProperties:u}),p;e.$async&&(p=f.scopeValue(`Error`,{ref:n.default,code:(0,t._)`require("ajv/dist/runtime/validation_error").default`}));let m=f.scopeName(`validate`);e.validateName=m;let h={gen:f,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:f.scopeValue(`schema`,this.opts.code.source===!0?{ref:e.schema,code:(0,t.stringify)(e.schema)}:{ref:e.schema}),validateName:m,ValidationError:p,schema:e.schema,schemaEnv:e,rootId:s,baseId:e.baseId||s,schemaPath:t.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?``:`#`),errorPath:(0,t._)`""`,opts:this.opts,self:this},g;try{this._compilations.add(e),(0,o.validateFunctionCode)(h),f.optimize(this.opts.code.optimize);let n=f.toString();g=`${f.scopeRefs(r.default.scope)}return ${n}`,this.opts.code.process&&(g=this.opts.code.process(g,e));let i=Function(`${r.default.self}`,`${r.default.scope}`,g)(this,this.scope.get());if(this.scope.value(m,{ref:i}),i.errors=null,i.schema=e.schema,i.schemaEnv=e,e.$async&&(i.$async=!0),this.opts.code.source===!0&&(i.source={validateName:m,validateCode:n,scopeValues:f._values}),this.opts.unevaluated){let{props:e,items:n}=h;i.evaluated={props:e instanceof t.Name?void 0:e,items:n instanceof t.Name?void 0:n,dynamicProps:e instanceof t.Name,dynamicItems:n instanceof t.Name},i.source&&(i.source.evaluated=(0,t.stringify)(i.evaluated))}return e.validate=i,e}catch(t){throw delete e.validate,delete e.validateName,g&&this.logger.error(`Error compiling schema, function code:`,g),t}finally{this._compilations.delete(e)}}e.compileSchema=c;function l(e,t,n){n=(0,i.resolveUrl)(this.opts.uriResolver,t,n);let r=e.refs[n];if(r)return r;let a=p.call(this,e,n);if(a===void 0){let r=e.localRefs?.[n],{schemaId:i}=this.opts;r&&(a=new s({schema:r,schemaId:i,root:e,baseId:t}))}if(a!==void 0)return e.refs[n]=u.call(this,a)}e.resolveRef=l;function u(e){return(0,i.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:c.call(this,e)}function d(e){for(let t of this._compilations)if(f(t,e))return t}e.getCompilingSchema=d;function f(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function p(e,t){let n;for(;typeof(n=this.refs[t])==`string`;)t=n;return n||this.schemas[t]||m.call(this,e,t)}function m(e,t){let n=this.opts.uriResolver.parse(t),r=(0,i._getFullPath)(this.opts.uriResolver,n),a=(0,i.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&r===a)return g.call(this,n,e);let o=(0,i.normalizeId)(r),l=this.refs[o]||this.schemas[o];if(typeof l==`string`){let t=m.call(this,e,l);return typeof t?.schema==`object`?g.call(this,n,t):void 0}if(typeof l?.schema==`object`){if(l.validate||c.call(this,l),o===(0,i.normalizeId)(t)){let{schema:t}=l,{schemaId:n}=this.opts,r=t[n];return r&&(a=(0,i.resolveUrl)(this.opts.uriResolver,a,r)),new s({schema:t,schemaId:n,root:e,baseId:a})}return g.call(this,n,l)}}e.resolveSchema=m;var h=new Set([`properties`,`patternProperties`,`enum`,`dependencies`,`definitions`]);function g(e,{baseId:t,schema:n,root:r}){if(e.fragment?.[0]!==`/`)return;for(let r of e.fragment.slice(1).split(`/`)){if(typeof n==`boolean`)return;let e=n[(0,a.unescapeFragment)(r)];if(e===void 0)return;n=e;let o=typeof n==`object`&&n[this.opts.schemaId];!h.has(r)&&o&&(t=(0,i.resolveUrl)(this.opts.uriResolver,t,o))}let o;if(typeof n!=`boolean`&&n.$ref&&!(0,a.schemaHasRulesButRef)(n,this.RULES)){let e=(0,i.resolveUrl)(this.opts.uriResolver,t,n.$ref);o=m.call(this,r,e)}let{schemaId:c}=this.opts;if(o||=new s({schema:n,schemaId:c,root:r,baseId:t}),o.schema!==o.root.schema)return o}})),rl=c({$id:()=>il,additionalProperties:()=>!1,default:()=>ll,description:()=>al,properties:()=>cl,required:()=>sl,type:()=>ol}),il,al,ol,sl,cl,ll,ul=o((()=>{il=`https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#`,al=`Meta-schema for $data reference (JSON AnySchema extension proposal)`,ol=`object`,sl=[`$data`],cl={$data:{type:`string`,anyOf:[{format:`relative-json-pointer`},{format:`json-pointer`}]}},ll={$id:il,description:al,type:ol,required:sl,properties:cl,additionalProperties:!1}})),dl=s(((e,t)=>{var n=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),r=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),i=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),a=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),o=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function s(e){let t=``,n=0,r=0;for(r=0;r<e.length;r++)if(n=e[r].charCodeAt(0),n!==48){if(!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return``;t+=e[r];break}for(r+=1;r<e.length;r++){if(n=e[r].charCodeAt(0),!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return``;t+=e[r]}return t}var c=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function l(e){return e.length=0,!0}function u(e,t,n){if(e.length){let r=s(e);if(r!==``)t.push(r);else return n.error=!0,!1;e.length=0}return!0}function d(e){let t=0,n={error:!1,address:``,zone:``},r=[],i=[],a=!1,o=!1,c=u;for(let s=0;s<e.length;s++){let u=e[s];if(u!==`[`&&u!==`]`){if(u===`:`){if(a===!0&&(o=!0),!c(i,r,n))break;if(++t>7){n.error=!0;break}s>0&&e[s-1]===`:`&&(a=!0),r.push(`:`);continue}if(u===`%`){if(!c(i,r,n))break;c=l}else{i.push(u);continue}}}return i.length&&(c===l?n.zone=i.join(``):o?r.push(i.join(``)):r.push(s(i))),n.address=r.join(``),n}function f(e){if(p(e,`:`)<2)return{host:e,isIPV6:!1};let t=d(e);if(t.error)return{host:e,isIPV6:!1};{let e=t.address,n=t.address;return t.zone&&(e+=`%`+t.zone,n+=`%25`+t.zone),{host:e,isIPV6:!0,escapedHost:n}}}function p(e,t){let n=0;for(let r=0;r<e.length;r++)e[r]===t&&n++;return n}function m(e){let t=e,n=[],r=-1,i=0;for(;i=t.length;){if(i===1){if(t===`.`)break;if(t===`/`){n.push(`/`);break}n.push(t);break}if(i===2){if(t[0]===`.`){if(t[1]===`.`)break;if(t[1]===`/`){t=t.slice(2);continue}}else if(t[0]===`/`&&(t[1]===`.`||t[1]===`/`)){n.push(`/`);break}}else if(i===3&&t===`/..`){n.length!==0&&n.pop(),n.push(`/`);break}if(t[0]===`.`){if(t[1]===`.`){if(t[2]===`/`){t=t.slice(3);continue}}else if(t[1]===`/`){t=t.slice(2);continue}}else if(t[0]===`/`&&t[1]===`.`){if(t[2]===`/`){t=t.slice(2);continue}if(t[2]===`.`&&t[3]===`/`){t=t.slice(3),n.length!==0&&n.pop();continue}}if((r=t.indexOf(`/`,1))===-1){n.push(t);break}n.push(t.slice(0,r)),t=t.slice(r)}return n.join(``)}var h={"@":`%40`,"/":`%2F`,"?":`%3F`,"#":`%23`,":":`%3A`},g=/[@/?#:]/g,_=/[@/?#]/g;function v(e,t){let n=t?_:g;return n.lastIndex=0,e.replace(n,e=>h[e])}function y(e,t=!1){if(e.indexOf(`%`)===-1)return e;let n=``;for(let r=0;r<e.length;r++){if(e[r]===`%`&&r+2<e.length){let o=e.slice(r+1,r+3);if(i(o)){let e=o.toUpperCase(),i=String.fromCharCode(parseInt(e,16));t&&a(i)?n+=i:n+=`%`+e,r+=2;continue}}n+=e[r]}return n}function b(e){let t=``;for(let n=0;n<e.length;n++){if(e[n]===`%`&&n+2<e.length){let r=e.slice(n+1,n+3);if(i(r)){let e=r.toUpperCase(),i=String.fromCharCode(parseInt(e,16));i!==`.`&&a(i)?t+=i:t+=`%`+e,n+=2;continue}}o(e[n])?t+=e[n]:t+=escape(e[n])}return t}function x(e){let t=``;for(let n=0;n<e.length;n++){if(e[n]===`%`&&n+2<e.length){let r=e.slice(n+1,n+3);if(i(r)){t+=`%`+r.toUpperCase(),n+=2;continue}}t+=escape(e[n])}return t}function S(e){let t=[];if(e.userinfo!==void 0&&(t.push(e.userinfo),t.push(`@`)),e.host!==void 0){let n=unescape(e.host);if(!r(n)){let e=f(n);n=e.isIPV6===!0?`[${e.escapedHost}]`:v(n,!1)}t.push(n)}return(typeof e.port==`number`||typeof e.port==`string`)&&(t.push(`:`),t.push(String(e.port))),t.length?t.join(``):void 0}t.exports={nonSimpleDomain:c,recomposeAuthority:S,reescapeHostDelimiters:v,normalizePercentEncoding:y,normalizePathEncoding:b,escapePreservingEscapes:x,removeDotSegments:m,isIPv4:r,isUUID:n,normalizeIPv6:f,stringArrayToHexStripped:s}})),fl=s(((e,t)=>{var{isUUID:n}=dl(),r=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,i=[`http`,`https`,`ws`,`wss`,`urn`,`urn:uuid`];function a(e){return i.indexOf(e)!==-1}function o(e){return e.secure===!0?!0:e.secure===!1?!1:e.scheme?e.scheme.length===3&&(e.scheme[0]===`w`||e.scheme[0]===`W`)&&(e.scheme[1]===`s`||e.scheme[1]===`S`)&&(e.scheme[2]===`s`||e.scheme[2]===`S`):!1}function s(e){return e.host||(e.error=e.error||`HTTP URIs must have a host.`),e}function c(e){let t=String(e.scheme).toLowerCase()===`https`;return(e.port===(t?443:80)||e.port===``)&&(e.port=void 0),e.path||=`/`,e}function l(e){return e.secure=o(e),e.resourceName=(e.path||`/`)+(e.query?`?`+e.query:``),e.path=void 0,e.query=void 0,e}function u(e){if((e.port===(o(e)?443:80)||e.port===``)&&(e.port=void 0),typeof e.secure==`boolean`&&(e.scheme=e.secure?`wss`:`ws`,e.secure=void 0),e.resourceName){let[t,n]=e.resourceName.split(`?`);e.path=t&&t!==`/`?t:void 0,e.query=n,e.resourceName=void 0}return e.fragment=void 0,e}function d(e,t){if(!e.path)return e.error=`URN can not be parsed`,e;let n=e.path.match(r);if(n){let r=t.scheme||e.scheme||`urn`;e.nid=n[1].toLowerCase(),e.nss=n[2];let i=y(`${r}:${t.nid||e.nid}`);e.path=void 0,i&&(e=i.parse(e,t))}else e.error=e.error||`URN can not be parsed.`;return e}function f(e,t){if(e.nid===void 0)throw Error(`URN without nid cannot be serialized`);let n=t.scheme||e.scheme||`urn`,r=e.nid.toLowerCase(),i=y(`${n}:${t.nid||r}`);i&&(e=i.serialize(e,t));let a=e,o=e.nss;return a.path=`${r||t.nid}:${o}`,t.skipEscape=!0,a}function p(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!n(r.uuid))&&(r.error=r.error||`UUID is not valid.`),r}function m(e){let t=e;return t.nss=(e.uuid||``).toLowerCase(),t}var h={scheme:`http`,domainHost:!0,parse:s,serialize:c},g={scheme:`https`,domainHost:h.domainHost,parse:s,serialize:c},_={scheme:`ws`,domainHost:!0,parse:l,serialize:u},v={http:h,https:g,ws:_,wss:{scheme:`wss`,domainHost:_.domainHost,parse:_.parse,serialize:_.serialize},urn:{scheme:`urn`,parse:d,serialize:f,skipNormalize:!0},"urn:uuid":{scheme:`urn:uuid`,parse:p,serialize:m,skipNormalize:!0}};Object.setPrototypeOf(v,null);function y(e){return e&&(v[e]||v[e.toLowerCase()])||void 0}t.exports={wsIsSecure:o,SCHEMES:v,isValidSchemeName:a,getSchemeHandler:y}})),pl=s(((e,t)=>{var{normalizeIPv6:n,removeDotSegments:r,recomposeAuthority:i,normalizePercentEncoding:a,normalizePathEncoding:o,escapePreservingEscapes:s,reescapeHostDelimiters:c,isIPv4:l,nonSimpleDomain:u}=dl(),{SCHEMES:d,getSchemeHandler:f}=fl();function p(e,t){return typeof e==`string`?e=w(e,t):typeof e==`object`&&(e=C(_(e,t),t)),e}function m(e,t,n){let r=n?Object.assign({scheme:`null`},n):{scheme:`null`},{parsed:i,malformedAuthorityOrPort:a}=S(e,r),{parsed:o,malformedAuthorityOrPort:s}=S(t,r);if(a||s)throw Error(i.error||o.error||`URI is malformed.`);let c=h(i,o,r,!0);return r.skipEscape=!0,_(c,r)}function h(e,t,n,i){let a={};return i||(e=C(_(e,n),n),t=C(_(t,n),n)),n||={},!n.tolerant&&t.scheme?(a.scheme=t.scheme,a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=r(t.path||``),a.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=r(t.path||``),a.query=t.query):(t.path?(t.path[0]===`/`?a.path=r(t.path):(a.path=(e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?`/`+t.path:e.path?e.path.slice(0,e.path.lastIndexOf(`/`)+1)+t.path:t.path,a.path=r(a.path)),a.query=t.query):(a.path=e.path,a.query=t.query===void 0?e.query:t.query),a.userinfo=e.userinfo,a.host=e.host,a.port=e.port),a.scheme=e.scheme),a.fragment=t.fragment,a}function g(e,t,n){let r=ee(e,n),i=ee(t,n);return r!==void 0&&i!==void 0&&r.toLowerCase()===i.toLowerCase()}function _(e,t){let n={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:``},o=Object.assign({},t),c=[],l=f(o.scheme||n.scheme);l&&l.serialize&&l.serialize(n,o),n.path!==void 0&&(o.skipEscape?n.path=a(n.path):(n.path=s(n.path),n.scheme!==void 0&&(n.path=n.path.split(`%3A`).join(`:`)))),o.reference!==`suffix`&&n.scheme&&c.push(n.scheme,`:`);let u=i(n);if(u!==void 0&&(o.reference!==`suffix`&&c.push(`//`),c.push(u),n.path&&n.path[0]!==`/`&&c.push(`/`)),n.path!==void 0){let e=n.path;!o.absolutePath&&(!l||!l.absolutePath)&&(e=r(e)),u===void 0&&e[0]===`/`&&e[1]===`/`&&(e=`/%2F`+e.slice(2)),c.push(e)}return n.query!==void 0&&c.push(`?`,n.query),n.fragment!==void 0&&c.push(`#`,n.fragment),c.join(``)}var v=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,y=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,b=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function x(e,t){if(t[2]!==void 0&&e.path&&e.path[0]!==`/`)return`URI path must start with "/" when authority is present.`;if(typeof e.port==`number`&&(e.port<0||e.port>65535))return`URI port is malformed.`}function S(e,t){let r=Object.assign({},t),i={scheme:void 0,userinfo:void 0,host:``,port:void 0,path:``,query:void 0,fragment:void 0},a=!1,s=!1;r.reference===`suffix`&&(e=r.scheme?r.scheme+`:`+e:`//`+e);let d=e.match(y);d!==null&&d[1].indexOf(`\\`)!==-1&&(i.error=`URI authority must not contain a literal backslash.`,a=!0);let p=e.match(b);if(p!==null){let e=p[1],t=e.replace(/[\t\n\r]/g,``);t.length>=2&&(t.slice(0,2)===`//`?e.length!==t.length&&(i.error=i.error||`URI authority introducer must not contain whitespace.`,a=!0):(i.error=i.error||`URI authority must not contain a literal backslash.`,a=!0))}let m=e.match(v);if(m){i.scheme=m[1],i.userinfo=m[3],i.host=m[4],i.port=parseInt(m[5],10),i.path=m[6]||``,i.query=m[7],i.fragment=m[8],isNaN(i.port)&&(i.port=m[5]);let t=x(i,m);if(t!==void 0&&(i.error=i.error||t,a=!0),i.host)if(l(i.host)===!1){let e=n(i.host);i.host=e.host.toLowerCase(),s=e.isIPV6}else s=!0;i.reference=i.scheme===void 0&&i.userinfo===void 0&&i.host===void 0&&i.port===void 0&&i.query===void 0&&!i.path?`same-document`:i.scheme===void 0?`relative`:i.fragment===void 0?`absolute`:`uri`,r.reference&&r.reference!==`suffix`&&r.reference!==i.reference&&(i.error=i.error||`URI is not a `+r.reference+` reference.`);let d=f(r.scheme||i.scheme);if(!r.unicodeSupport&&(!d||!d.unicodeSupport)&&i.host&&(r.domainHost||d&&d.domainHost)&&s===!1&&u(i.host))try{i.host=new URL(`http://`+i.host).hostname}catch(e){i.error=i.error||`Host's domain name can not be converted to ASCII: `+e}if((!d||d&&!d.skipNormalize)&&(e.indexOf(`%`)!==-1&&(i.scheme!==void 0&&(i.scheme=unescape(i.scheme)),i.host!==void 0&&(i.host=c(unescape(i.host),s))),i.path&&=o(i.path),i.fragment))try{i.fragment=encodeURI(decodeURIComponent(i.fragment))}catch{i.error=i.error||`URI malformed`}d&&d.parse&&d.parse(i,r)}else i.error=i.error||`URI can not be parsed.`;return{parsed:i,malformedAuthorityOrPort:a}}function C(e,t){return S(e,t).parsed}function w(e,t){return T(e,t).normalized}function T(e,t){let{parsed:n,malformedAuthorityOrPort:r}=S(e,t);return{normalized:r?e:_(n,t),malformedAuthorityOrPort:r}}function ee(e,t){if(typeof e==`string`){let{normalized:n,malformedAuthorityOrPort:r}=T(e,t);return r?void 0:n}if(typeof e==`object`)return _(e,t)}var te={SCHEMES:d,normalize:p,resolve:m,resolveComponent:h,equal:g,serialize:_,parse:C};t.exports=te,t.exports.default=te,t.exports.fastUri=te})),ml=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=pl();t.code=`require("ajv/dist/runtime/uri").default`,e.default=t})),hl=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=$c();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var n=V();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return n.CodeGen}});var r=el(),i=tl(),a=Uc(),o=nl(),s=V(),c=Qc(),l=Gc(),u=H(),f=(ul(),d(rl).default),p=ml(),m=(e,t)=>new RegExp(e,t);m.code=`new RegExp`;var h=[`removeAdditional`,`useDefaults`,`coerceTypes`],g=new Set([`validate`,`serialize`,`parse`,`wrapper`,`root`,`schema`,`keyword`,`pattern`,`formats`,`validate$data`,`func`,`obj`,`Error`]),_={errorDataPath:``,format:"`validateFormats: false` can be used instead.",nullable:`"nullable" keyword is supported by default.`,jsonPointers:`Deprecated jsPropertySyntax can be used instead.`,extendRefs:`Deprecated ignoreKeywordsWithRef can be used instead.`,missingRefs:`Pass empty schema with $id that should be ignored to ajv.addSchema.`,processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:`"uniqueItems" keyword is always validated.`,unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:`Map is used as cache, schema object as key.`,serialize:`Map is used as cache, schema object as key.`,ajvErrors:`It is default now.`},v={ignoreKeywordsWithRef:``,jsPropertySyntax:``,unicode:`"minLength"/"maxLength" account for unicode characters by default.`},y=200;function b(e){let t=e.strict,n=e.code?.optimize,r=n===!0||n===void 0?1:n||0,i=e.code?.regExp??m,a=e.uriResolver??p.default;return{strictSchema:e.strictSchema??t??!0,strictNumbers:e.strictNumbers??t??!0,strictTypes:e.strictTypes??t??`log`,strictTuples:e.strictTuples??t??`log`,strictRequired:e.strictRequired??t??!1,code:e.code?{...e.code,optimize:r,regExp:i}:{optimize:r,regExp:i},loopRequired:e.loopRequired??y,loopEnum:e.loopEnum??y,meta:e.meta??!0,messages:e.messages??!0,inlineRefs:e.inlineRefs??!0,schemaId:e.schemaId??`$id`,addUsedSchema:e.addUsedSchema??!0,validateSchema:e.validateSchema??!0,validateFormats:e.validateFormats??!0,unicodeRegExp:e.unicodeRegExp??!0,int32range:e.int32range??!0,uriResolver:a}}var x=class{constructor(e={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...b(e)};let{es5:t,lines:n}=this.opts.code;this.scope=new s.ValueScope({scope:{},prefixes:g,es5:t,lines:n}),this.logger=re(e.logger);let r=e.validateFormats;e.validateFormats=!1,this.RULES=(0,a.getRules)(),S.call(this,_,e,`NOT SUPPORTED`),S.call(this,v,e,`DEPRECATED`,`warn`),this._metaOpts=te.call(this),e.formats&&T.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&ee.call(this,e.keywords),typeof e.meta==`object`&&this.addMetaSchema(e.meta),w.call(this),e.validateFormats=r}_addVocabularies(){this.addKeyword(`$async`)}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:n}=this.opts,r=f;n===`id`&&(r={...f},r.id=r.$id,delete r.$id),t&&e&&this.addMetaSchema(r,r[n],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta=typeof e==`object`?e[t]||e:void 0}validate(e,t){let n;if(typeof e==`string`){if(n=this.getSchema(e),!n)throw Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let r=n(t);return`$async`in n||(this.errors=n.errors),r}compile(e,t){let n=this._addSchema(e,t);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,t){if(typeof this.opts.loadSchema!=`function`)throw Error(`options.loadSchema should be a function`);let{loadSchema:n}=this.opts;return r.call(this,e,t);async function r(e,t){await a.call(this,e.$schema);let n=this._addSchema(e,t);return n.validate||o.call(this,n)}async function a(e){e&&!this.getSchema(e)&&await r.call(this,{$ref:e},!0)}async function o(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof i.default))throw t;return s.call(this,t),await c.call(this,t.missingSchema),o.call(this,e)}}function s({missingSchema:e,missingRef:t}){if(this.refs[e])throw Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function c(e){let n=await l.call(this,e);this.refs[e]||await a.call(this,n.$schema),this.refs[e]||this.addSchema(n,e,t)}async function l(e){let t=this._loading[e];if(t)return t;try{return await(this._loading[e]=n(e))}finally{delete this._loading[e]}}}addSchema(e,t,n,r=this.opts.validateSchema){if(Array.isArray(e)){for(let t of e)this.addSchema(t,void 0,n,r);return this}let i;if(typeof e==`object`){let{schemaId:t}=this.opts;if(i=e[t],i!==void 0&&typeof i!=`string`)throw Error(`schema ${t} must be string`)}return t=(0,c.normalizeId)(t||i),this._checkUnique(t),this.schemas[t]=this._addSchema(e,n,t,r,!0),this}addMetaSchema(e,t,n=this.opts.validateSchema){return this.addSchema(e,t,!0,n),this}validateSchema(e,t){if(typeof e==`boolean`)return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!=`string`)throw Error(`$schema must be a string`);if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn(`meta-schema not available`),this.errors=null,!0;let r=this.validate(n,e);if(!r&&t){let e=`schema is invalid: `+this.errorsText();if(this.opts.validateSchema===`log`)this.logger.error(e);else throw Error(e)}return r}getSchema(e){let t;for(;typeof(t=C.call(this,e))==`string`;)e=t;if(t===void 0){let{schemaId:n}=this.opts,r=new o.SchemaEnv({schema:{},schemaId:n});if(t=o.resolveSchema.call(this,r,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case`undefined`:return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case`string`:{let t=C.call(this,e);return typeof t==`object`&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case`object`:{let t=e;this._cache.delete(t);let n=e[this.opts.schemaId];return n&&(n=(0,c.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw Error(`ajv.removeSchema: invalid parameter`)}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let n;if(typeof e==`string`)n=e,typeof t==`object`&&(this.logger.warn(`these parameters are deprecated, see docs for addKeyword`),t.keyword=n);else if(typeof e==`object`&&t===void 0){if(t=e,n=t.keyword,Array.isArray(n)&&!n.length)throw Error(`addKeywords: keyword must be string or non-empty array`)}else throw Error(`invalid addKeywords parameters`);if(E.call(this,n,t),!t)return(0,u.eachItem)(n,e=>ae.call(this,e)),this;se.call(this,t);let r={...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)};return(0,u.eachItem)(n,r.type.length===0?e=>ae.call(this,e,r):e=>r.type.forEach(t=>ae.call(this,e,r,t))),this}getKeyword(e){let t=this.RULES.all[e];return typeof t==`object`?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(let n of t.rules){let t=n.rules.findIndex(t=>t.keyword===e);t>=0&&n.rules.splice(t,1)}return this}addFormat(e,t){return typeof t==`string`&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=`, `,dataVar:n=`data`}={}){return!e||e.length===0?`No errors`:e.map(e=>`${n}${e.instancePath} ${e.message}`).reduce((e,n)=>e+t+n)}$dataMetaSchema(e,t){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let r of t){let t=r.split(`/`).slice(1),i=e;for(let e of t)i=i[e];for(let e in n){let t=n[e];if(typeof t!=`object`)continue;let{$data:r}=t.definition,a=i[e];r&&a&&(i[e]=D(a))}}return e}_removeAllSchemas(e,t){for(let n in e){let r=e[n];(!t||t.test(n))&&(typeof r==`string`?delete e[n]:r&&!r.meta&&(this._cache.delete(r.schema),delete e[n]))}}_addSchema(e,t,n,r=this.opts.validateSchema,i=this.opts.addUsedSchema){let a,{schemaId:s}=this.opts;if(typeof e==`object`)a=e[s];else if(this.opts.jtd)throw Error(`schema must be object`);else if(typeof e!=`boolean`)throw Error(`schema must be object or boolean`);let l=this._cache.get(e);if(l!==void 0)return l;n=(0,c.normalizeId)(a||n);let u=c.getSchemaRefs.call(this,e,n);return l=new o.SchemaEnv({schema:e,schemaId:s,meta:t,baseId:n,localRefs:u}),this._cache.set(l.schema,l),i&&!n.startsWith(`#`)&&(n&&this._checkUnique(n),this.refs[n]=l),r&&this.validateSchema(e,!0),l}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):o.compileSchema.call(this,e),!e.validate)throw Error(`ajv implementation error`);return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,e)}finally{this.opts=t}}};x.ValidationError=r.default,x.MissingRefError=i.default,e.default=x;function S(e,t,n,r=`error`){for(let i in e){let a=i;a in t&&this.logger[r](`${n}: option ${i}. ${e[a]}`)}}function C(e){return e=(0,c.normalizeId)(e),this.schemas[e]||this.refs[e]}function w(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function T(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function ee(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn(`keywords option as map is deprecated, pass array`);for(let t in e){let n=e[t];n.keyword||=t,this.addKeyword(n)}}function te(){let e={...this.opts};for(let t of h)delete e[t];return e}var ne={log(){},warn(){},error(){}};function re(e){if(e===!1)return ne;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw Error(`logger must implement log, warn and error methods`)}var ie=/^[a-z_$][a-z0-9_$:-]*$/i;function E(e,t){let{RULES:n}=this;if((0,u.eachItem)(e,e=>{if(n.keywords[e])throw Error(`Keyword ${e} is already defined`);if(!ie.test(e))throw Error(`Keyword ${e} has invalid name`)}),t&&t.$data&&!(`code`in t||`validate`in t))throw Error(`$data keyword must have "code" or "validate" function`)}function ae(e,t,n){var r;let i=t?.post;if(n&&i)throw Error(`keyword with "post" flag cannot have "type"`);let{RULES:a}=this,o=i?a.post:a.rules.find(({type:e})=>e===n);if(o||(o={type:n,rules:[]},a.rules.push(o)),a.keywords[e]=!0,!t)return;let s={keyword:e,definition:{...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)}};t.before?oe.call(this,o,s,t.before):o.rules.push(s),a.all[e]=s,(r=t.implements)==null||r.forEach(e=>this.addKeyword(e))}function oe(e,t,n){let r=e.rules.findIndex(e=>e.keyword===n);r>=0?e.rules.splice(r,0,t):(e.rules.push(t),this.logger.warn(`rule ${n} is not defined`))}function se(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=D(t)),e.validateSchema=this.compile(t,!0))}var ce={$ref:`https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#`};function D(e){return{anyOf:[e,ce]}}})),gl=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={keyword:`id`,code(){throw Error(`NOT SUPPORTED: keyword "id", use "$id" for schema ID`)}}})),_l=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.callRef=e.getValidate=void 0;var t=tl(),n=qc(),r=V(),i=Bc(),a=nl(),o=H(),s={keyword:`$ref`,schemaType:`string`,code(e){let{gen:n,schema:i,it:o}=e,{baseId:s,schemaEnv:u,validateName:d,opts:f,self:p}=o,{root:m}=u;if((i===`#`||i===`#/`)&&s===m.baseId)return g();let h=a.resolveRef.call(p,m,s,i);if(h===void 0)throw new t.default(o.opts.uriResolver,s,i);if(h instanceof a.SchemaEnv)return _(h);return v(h);function g(){if(u===m)return l(e,d,u,u.$async);let t=n.scopeValue(`root`,{ref:m});return l(e,(0,r._)`${t}.validate`,m,m.$async)}function _(t){l(e,c(e,t),t,t.$async)}function v(t){let a=n.scopeValue(`schema`,f.code.source===!0?{ref:t,code:(0,r.stringify)(t)}:{ref:t}),o=n.name(`valid`),s=e.subschema({schema:t,dataTypes:[],schemaPath:r.nil,topSchemaRef:a,errSchemaPath:i},o);e.mergeEvaluated(s),e.ok(o)}}};function c(e,t){let{gen:n}=e;return t.validate?n.scopeValue(`validate`,{ref:t.validate}):(0,r._)`${n.scopeValue(`wrapper`,{ref:t})}.validate`}e.getValidate=c;function l(e,t,a,s){let{gen:c,it:l}=e,{allErrors:u,schemaEnv:d,opts:f}=l,p=f.passContext?i.default.this:r.nil;s?m():h();function m(){if(!d.$async)throw Error(`async schema referenced by sync schema`);let i=c.let(`valid`);c.try(()=>{c.code((0,r._)`await ${(0,n.callValidateCode)(e,t,p)}`),_(t),u||c.assign(i,!0)},e=>{c.if((0,r._)`!(${e} instanceof ${l.ValidationError})`,()=>c.throw(e)),g(e),u||c.assign(i,!1)}),e.ok(i)}function h(){e.result((0,n.callValidateCode)(e,t,p),()=>_(t),()=>g(t))}function g(e){let t=(0,r._)`${e}.errors`;c.assign(i.default.vErrors,(0,r._)`${i.default.vErrors} === null ? ${t} : ${i.default.vErrors}.concat(${t})`),c.assign(i.default.errors,(0,r._)`${i.default.vErrors}.length`)}function _(e){if(!l.opts.unevaluated)return;let t=a?.validate?.evaluated;if(l.props!==!0)if(t&&!t.dynamicProps)t.props!==void 0&&(l.props=o.mergeEvaluated.props(c,t.props,l.props));else{let t=c.var(`props`,(0,r._)`${e}.evaluated.props`);l.props=o.mergeEvaluated.props(c,t,l.props,r.Name)}if(l.items!==!0)if(t&&!t.dynamicItems)t.items!==void 0&&(l.items=o.mergeEvaluated.items(c,t.items,l.items));else{let t=c.var(`items`,(0,r._)`${e}.evaluated.items`);l.items=o.mergeEvaluated.items(c,t,l.items,r.Name)}}}e.callRef=l,e.default=s})),vl=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=gl(),n=_l();e.default=[`$schema`,`$id`,`$defs`,`$vocabulary`,{keyword:`$comment`},`definitions`,t.default,n.default]})),yl=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=V(),n=t.operators,r={maximum:{okStr:`<=`,ok:n.LTE,fail:n.GT},minimum:{okStr:`>=`,ok:n.GTE,fail:n.LT},exclusiveMaximum:{okStr:`<`,ok:n.LT,fail:n.GTE},exclusiveMinimum:{okStr:`>`,ok:n.GT,fail:n.LTE}};e.default={keyword:Object.keys(r),type:`number`,schemaType:`number`,$data:!0,error:{message:({keyword:e,schemaCode:n})=>(0,t.str)`must be ${r[e].okStr} ${n}`,params:({keyword:e,schemaCode:n})=>(0,t._)`{comparison: ${r[e].okStr}, limit: ${n}}`},code(e){let{keyword:n,data:i,schemaCode:a}=e;e.fail$data((0,t._)`${i} ${r[n].fail} ${a} || isNaN(${i})`)}}})),bl=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=V();e.default={keyword:`multipleOf`,type:`number`,schemaType:`number`,$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,t._)`{multipleOf: ${e}}`},code(e){let{gen:n,data:r,schemaCode:i,it:a}=e,o=a.opts.multipleOfPrecision,s=n.let(`res`),c=o?(0,t._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${o}`:(0,t._)`${s} !== parseInt(${s})`;e.fail$data((0,t._)`(${i} === 0 || (${s} = ${r}/${i}, ${c}))`)}}})),xl=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(e){let t=e.length,n=0,r=0,i;for(;r<t;)n++,i=e.charCodeAt(r++),i>=55296&&i<=56319&&r<t&&(i=e.charCodeAt(r),(i&64512)==56320&&r++);return n}e.default=t,t.code=`require("ajv/dist/runtime/ucs2length").default`})),Sl=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=V(),n=H(),r=xl();e.default={keyword:[`maxLength`,`minLength`],type:`string`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxLength`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} characters`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:i,data:a,schemaCode:o,it:s}=e,c=i===`maxLength`?t.operators.GT:t.operators.LT,l=s.opts.unicode===!1?(0,t._)`${a}.length`:(0,t._)`${(0,n.useFunc)(e.gen,r.default)}(${a})`;e.fail$data((0,t._)`${l} ${c} ${o}`)}}})),Cl=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=qc(),n=H(),r=V();e.default={keyword:`pattern`,type:`string`,schemaType:`string`,$data:!0,error:{message:({schemaCode:e})=>(0,r.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,r._)`{pattern: ${e}}`},code(e){let{gen:i,data:a,$data:o,schema:s,schemaCode:c,it:l}=e,u=l.opts.unicodeRegExp?`u`:``;if(o){let{regExp:t}=l.opts.code,o=t.code===`new RegExp`?(0,r._)`new RegExp`:(0,n.useFunc)(i,t),s=i.let(`valid`);i.try(()=>i.assign(s,(0,r._)`${o}(${c}, ${u}).test(${a})`),()=>i.assign(s,!1)),e.fail$data((0,r._)`!${s}`)}else{let n=(0,t.usePattern)(e,s);e.fail$data((0,r._)`!${n}.test(${a})`)}}}})),wl=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=V();e.default={keyword:[`maxProperties`,`minProperties`],type:`object`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxProperties`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} properties`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:n,data:r,schemaCode:i}=e,a=n===`maxProperties`?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`Object.keys(${r}).length ${a} ${i}`)}}})),Tl=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=qc(),n=V(),r=H();e.default={keyword:`required`,type:`object`,schemaType:`array`,$data:!0,error:{message:({params:{missingProperty:e}})=>(0,n.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,n._)`{missingProperty: ${e}}`},code(e){let{gen:i,schema:a,schemaCode:o,data:s,$data:c,it:l}=e,{opts:u}=l;if(!c&&a.length===0)return;let d=a.length>=u.loopRequired;if(l.allErrors?f():p(),u.strictRequired){let t=e.parentSchema.properties,{definedProperties:n}=e.it;for(let e of a)if(t?.[e]===void 0&&!n.has(e)){let t=`required property "${e}" is not defined at "${l.schemaEnv.baseId+l.errSchemaPath}" (strictRequired)`;(0,r.checkStrictMode)(l,t,l.opts.strictRequired)}}function f(){if(d||c)e.block$data(n.nil,m);else for(let n of a)(0,t.checkReportMissingProp)(e,n)}function p(){let n=i.let(`missing`);if(d||c){let t=i.let(`valid`,!0);e.block$data(t,()=>h(n,t)),e.ok(t)}else i.if((0,t.checkMissingProp)(e,a,n)),(0,t.reportMissingProp)(e,n),i.else()}function m(){i.forOf(`prop`,o,n=>{e.setParams({missingProperty:n}),i.if((0,t.noPropertyInData)(i,s,n,u.ownProperties),()=>e.error())})}function h(r,a){e.setParams({missingProperty:r}),i.forOf(r,o,()=>{i.assign(a,(0,t.propertyInData)(i,s,r,u.ownProperties)),i.if((0,n.not)(a),()=>{e.error(),i.break()})},n.nil)}}}})),El=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=V();e.default={keyword:[`maxItems`,`minItems`],type:`array`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxItems`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} items`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:n,data:r,schemaCode:i}=e,a=n===`maxItems`?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`${r}.length ${a} ${i}`)}}})),Dl=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Xc();t.code=`require("ajv/dist/runtime/equal").default`,e.default=t})),Ol=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Gc(),n=V(),r=H(),i=Dl();e.default={keyword:`uniqueItems`,type:`array`,schemaType:`boolean`,$data:!0,error:{message:({params:{i:e,j:t}})=>(0,n.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,n._)`{i: ${e}, j: ${t}}`},code(e){let{gen:a,data:o,$data:s,schema:c,parentSchema:l,schemaCode:u,it:d}=e;if(!s&&!c)return;let f=a.let(`valid`),p=l.items?(0,t.getSchemaTypes)(l.items):[];e.block$data(f,m,(0,n._)`${u} === false`),e.ok(f);function m(){let t=a.let(`i`,(0,n._)`${o}.length`),r=a.let(`j`);e.setParams({i:t,j:r}),a.assign(f,!0),a.if((0,n._)`${t} > 1`,()=>(h()?g:_)(t,r))}function h(){return p.length>0&&!p.some(e=>e===`object`||e===`array`)}function g(r,i){let s=a.name(`item`),c=(0,t.checkDataTypes)(p,s,d.opts.strictNumbers,t.DataType.Wrong),l=a.const(`indices`,(0,n._)`{}`);a.for((0,n._)`;${r}--;`,()=>{a.let(s,(0,n._)`${o}[${r}]`),a.if(c,(0,n._)`continue`),p.length>1&&a.if((0,n._)`typeof ${s} == "string"`,(0,n._)`${s} += "_"`),a.if((0,n._)`typeof ${l}[${s}] == "number"`,()=>{a.assign(i,(0,n._)`${l}[${s}]`),e.error(),a.assign(f,!1).break()}).code((0,n._)`${l}[${s}] = ${r}`)})}function _(t,s){let c=(0,r.useFunc)(a,i.default),l=a.name(`outer`);a.label(l).for((0,n._)`;${t}--;`,()=>a.for((0,n._)`${s} = ${t}; ${s}--;`,()=>a.if((0,n._)`${c}(${o}[${t}], ${o}[${s}])`,()=>{e.error(),a.assign(f,!1).break(l)})))}}}})),kl=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=V(),n=H(),r=Dl();e.default={keyword:`const`,$data:!0,error:{message:`must be equal to constant`,params:({schemaCode:e})=>(0,t._)`{allowedValue: ${e}}`},code(e){let{gen:i,data:a,$data:o,schemaCode:s,schema:c}=e;o||c&&typeof c==`object`?e.fail$data((0,t._)`!${(0,n.useFunc)(i,r.default)}(${a}, ${s})`):e.fail((0,t._)`${c} !== ${a}`)}}})),Al=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=V(),n=H(),r=Dl();e.default={keyword:`enum`,schemaType:`array`,$data:!0,error:{message:`must be equal to one of the allowed values`,params:({schemaCode:e})=>(0,t._)`{allowedValues: ${e}}`},code(e){let{gen:i,data:a,$data:o,schema:s,schemaCode:c,it:l}=e;if(!o&&s.length===0)throw Error(`enum must have non-empty array`);let u=s.length>=l.opts.loopEnum,d,f=()=>d??=(0,n.useFunc)(i,r.default),p;if(u||o)p=i.let(`valid`),e.block$data(p,m);else{if(!Array.isArray(s))throw Error(`ajv implementation error`);let e=i.const(`vSchema`,c);p=(0,t.or)(...s.map((t,n)=>h(e,n)))}e.pass(p);function m(){i.assign(p,!1),i.forOf(`v`,c,e=>i.if((0,t._)`${f()}(${a}, ${e})`,()=>i.assign(p,!0).break()))}function h(e,n){let r=s[n];return typeof r==`object`&&r?(0,t._)`${f()}(${a}, ${e}[${n}])`:(0,t._)`${a} === ${r}`}}}})),jl=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=yl(),n=bl(),r=Sl(),i=Cl(),a=wl(),o=Tl(),s=El(),c=Ol(),l=kl(),u=Al();e.default=[t.default,n.default,r.default,i.default,a.default,o.default,s.default,c.default,{keyword:`type`,schemaType:[`string`,`array`]},{keyword:`nullable`,schemaType:`boolean`},l.default,u.default]})),Ml=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateAdditionalItems=void 0;var t=V(),n=H(),r={keyword:`additionalItems`,type:`array`,schemaType:[`boolean`,`object`],before:`uniqueItems`,error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{parentSchema:t,it:r}=e,{items:a}=t;if(!Array.isArray(a)){(0,n.checkStrictMode)(r,`"additionalItems" is ignored when "items" is not an array of schemas`);return}i(e,a)}};function i(e,r){let{gen:i,schema:a,data:o,keyword:s,it:c}=e;c.items=!0;let l=i.const(`len`,(0,t._)`${o}.length`);if(a===!1)e.setParams({len:r.length}),e.pass((0,t._)`${l} <= ${r.length}`);else if(typeof a==`object`&&!(0,n.alwaysValidSchema)(c,a)){let n=i.var(`valid`,(0,t._)`${l} <= ${r.length}`);i.if((0,t.not)(n),()=>u(n)),e.ok(n)}function u(a){i.forRange(`i`,r.length,l,r=>{e.subschema({keyword:s,dataProp:r,dataPropType:n.Type.Num},a),c.allErrors||i.if((0,t.not)(a),()=>i.break())})}}e.validateAdditionalItems=i,e.default=r})),Nl=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateTuple=void 0;var t=V(),n=H(),r=qc(),i={keyword:`items`,type:`array`,schemaType:[`object`,`array`,`boolean`],before:`uniqueItems`,code(e){let{schema:t,it:i}=e;if(Array.isArray(t))return a(e,`additionalItems`,t);i.items=!0,!(0,n.alwaysValidSchema)(i,t)&&e.ok((0,r.validateArray)(e))}};function a(e,r,i=e.schema){let{gen:a,parentSchema:o,data:s,keyword:c,it:l}=e;f(o),l.opts.unevaluated&&i.length&&l.items!==!0&&(l.items=n.mergeEvaluated.items(a,i.length,l.items));let u=a.name(`valid`),d=a.const(`len`,(0,t._)`${s}.length`);i.forEach((r,i)=>{(0,n.alwaysValidSchema)(l,r)||(a.if((0,t._)`${d} > ${i}`,()=>e.subschema({keyword:c,schemaProp:i,dataProp:i},u)),e.ok(u))});function f(e){let{opts:t,errSchemaPath:a}=l,o=i.length,s=o===e.minItems&&(o===e.maxItems||e[r]===!1);if(t.strictTuples&&!s){let e=`"${c}" is ${o}-tuple, but minItems or maxItems/${r} are not specified or different at path "${a}"`;(0,n.checkStrictMode)(l,e,t.strictTuples)}}}e.validateTuple=a,e.default=i})),Pl=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Nl();e.default={keyword:`prefixItems`,type:`array`,schemaType:[`array`],before:`uniqueItems`,code:e=>(0,t.validateTuple)(e,`items`)}})),Fl=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=V(),n=H(),r=qc(),i=Ml();e.default={keyword:`items`,type:`array`,schemaType:[`object`,`boolean`],before:`uniqueItems`,error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{schema:t,parentSchema:a,it:o}=e,{prefixItems:s}=a;o.items=!0,!(0,n.alwaysValidSchema)(o,t)&&(s?(0,i.validateAdditionalItems)(e,s):e.ok((0,r.validateArray)(e)))}}})),Il=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=V(),n=H();e.default={keyword:`contains`,type:`array`,schemaType:[`object`,`boolean`],before:`uniqueItems`,trackErrors:!0,error:{message:({params:{min:e,max:n}})=>n===void 0?(0,t.str)`must contain at least ${e} valid item(s)`:(0,t.str)`must contain at least ${e} and no more than ${n} valid item(s)`,params:({params:{min:e,max:n}})=>n===void 0?(0,t._)`{minContains: ${e}}`:(0,t._)`{minContains: ${e}, maxContains: ${n}}`},code(e){let{gen:r,schema:i,parentSchema:a,data:o,it:s}=e,c,l,{minContains:u,maxContains:d}=a;s.opts.next?(c=u===void 0?1:u,l=d):c=1;let f=r.const(`len`,(0,t._)`${o}.length`);if(e.setParams({min:c,max:l}),l===void 0&&c===0){(0,n.checkStrictMode)(s,`"minContains" == 0 without "maxContains": "contains" keyword ignored`);return}if(l!==void 0&&c>l){(0,n.checkStrictMode)(s,`"minContains" > "maxContains" is always invalid`),e.fail();return}if((0,n.alwaysValidSchema)(s,i)){let n=(0,t._)`${f} >= ${c}`;l!==void 0&&(n=(0,t._)`${n} && ${f} <= ${l}`),e.pass(n);return}s.items=!0;let p=r.name(`valid`);l===void 0&&c===1?h(p,()=>r.if(p,()=>r.break())):c===0?(r.let(p,!0),l!==void 0&&r.if((0,t._)`${o}.length > 0`,m)):(r.let(p,!1),m()),e.result(p,()=>e.reset());function m(){let e=r.name(`_valid`),t=r.let(`count`,0);h(e,()=>r.if(e,()=>g(t)))}function h(t,i){r.forRange(`i`,0,f,r=>{e.subschema({keyword:`contains`,dataProp:r,dataPropType:n.Type.Num,compositeRule:!0},t),i()})}function g(e){r.code((0,t._)`${e}++`),l===void 0?r.if((0,t._)`${e} >= ${c}`,()=>r.assign(p,!0).break()):(r.if((0,t._)`${e} > ${l}`,()=>r.assign(p,!1).break()),c===1?r.assign(p,!0):r.if((0,t._)`${e} >= ${c}`,()=>r.assign(p,!0)))}}}})),Ll=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;var t=V(),n=H(),r=qc();e.error={message:({params:{property:e,depsCount:n,deps:r}})=>{let i=n===1?`property`:`properties`;return(0,t.str)`must have ${i} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:n,deps:r,missingProperty:i}})=>(0,t._)`{property: ${e},
77
+ missingProperty: ${i},
78
+ depsCount: ${n},
79
+ deps: ${r}}`};var i={keyword:`dependencies`,type:`object`,schemaType:`object`,error:e.error,code(e){let[t,n]=a(e);o(e,t),s(e,n)}};function a({schema:e}){let t={},n={};for(let r in e){if(r===`__proto__`)continue;let i=Array.isArray(e[r])?t:n;i[r]=e[r]}return[t,n]}function o(e,n=e.schema){let{gen:i,data:a,it:o}=e;if(Object.keys(n).length===0)return;let s=i.let(`missing`);for(let c in n){let l=n[c];if(l.length===0)continue;let u=(0,r.propertyInData)(i,a,c,o.opts.ownProperties);e.setParams({property:c,depsCount:l.length,deps:l.join(`, `)}),o.allErrors?i.if(u,()=>{for(let t of l)(0,r.checkReportMissingProp)(e,t)}):(i.if((0,t._)`${u} && (${(0,r.checkMissingProp)(e,l,s)})`),(0,r.reportMissingProp)(e,s),i.else())}}e.validatePropertyDeps=o;function s(e,t=e.schema){let{gen:i,data:a,keyword:o,it:s}=e,c=i.name(`valid`);for(let l in t)(0,n.alwaysValidSchema)(s,t[l])||(i.if((0,r.propertyInData)(i,a,l,s.opts.ownProperties),()=>{let t=e.subschema({keyword:o,schemaProp:l},c);e.mergeValidEvaluated(t,c)},()=>i.var(c,!0)),e.ok(c))}e.validateSchemaDeps=s,e.default=i})),Rl=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=V(),n=H();e.default={keyword:`propertyNames`,type:`object`,schemaType:[`object`,`boolean`],error:{message:`property name must be valid`,params:({params:e})=>(0,t._)`{propertyName: ${e.propertyName}}`},code(e){let{gen:r,schema:i,data:a,it:o}=e;if((0,n.alwaysValidSchema)(o,i))return;let s=r.name(`valid`);r.forIn(`key`,a,n=>{e.setParams({propertyName:n}),e.subschema({keyword:`propertyNames`,data:n,dataTypes:[`string`],propertyName:n,compositeRule:!0},s),r.if((0,t.not)(s),()=>{e.error(!0),o.allErrors||r.break()})}),e.ok(s)}}})),zl=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=qc(),n=V(),r=Bc(),i=H();e.default={keyword:`additionalProperties`,type:[`object`],schemaType:[`boolean`,`object`],allowUndefined:!0,trackErrors:!0,error:{message:`must NOT have additional properties`,params:({params:e})=>(0,n._)`{additionalProperty: ${e.additionalProperty}}`},code(e){let{gen:a,schema:o,parentSchema:s,data:c,errsCount:l,it:u}=e;if(!l)throw Error(`ajv implementation error`);let{allErrors:d,opts:f}=u;if(u.props=!0,f.removeAdditional!==`all`&&(0,i.alwaysValidSchema)(u,o))return;let p=(0,t.allSchemaProperties)(s.properties),m=(0,t.allSchemaProperties)(s.patternProperties);h(),e.ok((0,n._)`${l} === ${r.default.errors}`);function h(){a.forIn(`key`,c,e=>{!p.length&&!m.length?v(e):a.if(g(e),()=>v(e))})}function g(r){let o;if(p.length>8){let e=(0,i.schemaRefOrVal)(u,s.properties,`properties`);o=(0,t.isOwnProperty)(a,e,r)}else o=p.length?(0,n.or)(...p.map(e=>(0,n._)`${r} === ${e}`)):n.nil;return m.length&&(o=(0,n.or)(o,...m.map(i=>(0,n._)`${(0,t.usePattern)(e,i)}.test(${r})`))),(0,n.not)(o)}function _(e){a.code((0,n._)`delete ${c}[${e}]`)}function v(t){if(f.removeAdditional===`all`||f.removeAdditional&&o===!1){_(t);return}if(o===!1){e.setParams({additionalProperty:t}),e.error(),d||a.break();return}if(typeof o==`object`&&!(0,i.alwaysValidSchema)(u,o)){let r=a.name(`valid`);f.removeAdditional===`failing`?(y(t,r,!1),a.if((0,n.not)(r),()=>{e.reset(),_(t)})):(y(t,r),d||a.if((0,n.not)(r),()=>a.break()))}}function y(t,n,r){let a={keyword:`additionalProperties`,dataProp:t,dataPropType:i.Type.Str};r===!1&&Object.assign(a,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(a,n)}}}})),Bl=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=$c(),n=qc(),r=H(),i=zl();e.default={keyword:`properties`,type:`object`,schemaType:`object`,code(e){let{gen:a,schema:o,parentSchema:s,data:c,it:l}=e;l.opts.removeAdditional===`all`&&s.additionalProperties===void 0&&i.default.code(new t.KeywordCxt(l,i.default,`additionalProperties`));let u=(0,n.allSchemaProperties)(o);for(let e of u)l.definedProperties.add(e);l.opts.unevaluated&&u.length&&l.props!==!0&&(l.props=r.mergeEvaluated.props(a,(0,r.toHash)(u),l.props));let d=u.filter(e=>!(0,r.alwaysValidSchema)(l,o[e]));if(d.length===0)return;let f=a.name(`valid`);for(let t of d)p(t)?m(t):(a.if((0,n.propertyInData)(a,c,t,l.opts.ownProperties)),m(t),l.allErrors||a.else().var(f,!0),a.endIf()),e.it.definedProperties.add(t),e.ok(f);function p(e){return l.opts.useDefaults&&!l.compositeRule&&o[e].default!==void 0}function m(t){e.subschema({keyword:`properties`,schemaProp:t,dataProp:t},f)}}}})),Vl=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=qc(),n=V(),r=H(),i=H();e.default={keyword:`patternProperties`,type:`object`,schemaType:`object`,code(e){let{gen:a,schema:o,data:s,parentSchema:c,it:l}=e,{opts:u}=l,d=(0,t.allSchemaProperties)(o),f=d.filter(e=>(0,r.alwaysValidSchema)(l,o[e]));if(d.length===0||f.length===d.length&&(!l.opts.unevaluated||l.props===!0))return;let p=u.strictSchema&&!u.allowMatchingProperties&&c.properties,m=a.name(`valid`);l.props!==!0&&!(l.props instanceof n.Name)&&(l.props=(0,i.evaluatedPropsToName)(a,l.props));let{props:h}=l;g();function g(){for(let e of d)p&&_(e),l.allErrors?v(e):(a.var(m,!0),v(e),a.if(m))}function _(e){for(let t in p)new RegExp(e).test(t)&&(0,r.checkStrictMode)(l,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function v(r){a.forIn(`key`,s,o=>{a.if((0,n._)`${(0,t.usePattern)(e,r)}.test(${o})`,()=>{let t=f.includes(r);t||e.subschema({keyword:`patternProperties`,schemaProp:r,dataProp:o,dataPropType:i.Type.Str},m),l.opts.unevaluated&&h!==!0?a.assign((0,n._)`${h}[${o}]`,!0):!t&&!l.allErrors&&a.if((0,n.not)(m),()=>a.break())})})}}}})),U=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=H();e.default={keyword:`not`,schemaType:[`object`,`boolean`],trackErrors:!0,code(e){let{gen:n,schema:r,it:i}=e;if((0,t.alwaysValidSchema)(i,r)){e.fail();return}let a=n.name(`valid`);e.subschema({keyword:`not`,compositeRule:!0,createErrors:!1,allErrors:!1},a),e.failResult(a,()=>e.reset(),()=>e.error())},error:{message:`must NOT be valid`}}})),Hl=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={keyword:`anyOf`,schemaType:`array`,trackErrors:!0,code:qc().validateUnion,error:{message:`must match a schema in anyOf`}}})),W=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=V(),n=H();e.default={keyword:`oneOf`,schemaType:`array`,trackErrors:!0,error:{message:`must match exactly one schema in oneOf`,params:({params:e})=>(0,t._)`{passingSchemas: ${e.passing}}`},code(e){let{gen:r,schema:i,parentSchema:a,it:o}=e;if(!Array.isArray(i))throw Error(`ajv implementation error`);if(o.opts.discriminator&&a.discriminator)return;let s=i,c=r.let(`valid`,!1),l=r.let(`passing`,null),u=r.name(`_valid`);e.setParams({passing:l}),r.block(d),e.result(c,()=>e.reset(),()=>e.error(!0));function d(){s.forEach((i,a)=>{let s;(0,n.alwaysValidSchema)(o,i)?r.var(u,!0):s=e.subschema({keyword:`oneOf`,schemaProp:a,compositeRule:!0},u),a>0&&r.if((0,t._)`${u} && ${c}`).assign(c,!1).assign(l,(0,t._)`[${l}, ${a}]`).else(),r.if(u,()=>{r.assign(c,!0),r.assign(l,a),s&&e.mergeEvaluated(s,t.Name)})})}}}})),G=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=H();e.default={keyword:`allOf`,schemaType:`array`,code(e){let{gen:n,schema:r,it:i}=e;if(!Array.isArray(r))throw Error(`ajv implementation error`);let a=n.name(`valid`);r.forEach((n,r)=>{if((0,t.alwaysValidSchema)(i,n))return;let o=e.subschema({keyword:`allOf`,schemaProp:r},a);e.ok(a),e.mergeEvaluated(o)})}}})),K=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=V(),n=H(),r={keyword:`if`,schemaType:[`object`,`boolean`],trackErrors:!0,error:{message:({params:e})=>(0,t.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,t._)`{failingKeyword: ${e.ifClause}}`},code(e){let{gen:r,parentSchema:a,it:o}=e;a.then===void 0&&a.else===void 0&&(0,n.checkStrictMode)(o,`"if" without "then" and "else" is ignored`);let s=i(o,`then`),c=i(o,`else`);if(!s&&!c)return;let l=r.let(`valid`,!0),u=r.name(`_valid`);if(d(),e.reset(),s&&c){let t=r.let(`ifClause`);e.setParams({ifClause:t}),r.if(u,f(`then`,t),f(`else`,t))}else s?r.if(u,f(`then`)):r.if((0,t.not)(u),f(`else`));e.pass(l,()=>e.error(!0));function d(){let t=e.subschema({keyword:`if`,compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(t)}function f(n,i){return()=>{let a=e.subschema({keyword:n},u);r.assign(l,u),e.mergeValidEvaluated(a,l),i?r.assign(i,(0,t._)`${n}`):e.setParams({ifClause:n})}}}};function i(e,t){let r=e.schema[t];return r!==void 0&&!(0,n.alwaysValidSchema)(e,r)}e.default=r})),Ul=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=H();e.default={keyword:[`then`,`else`],schemaType:[`object`,`boolean`],code({keyword:e,parentSchema:n,it:r}){n.if===void 0&&(0,t.checkStrictMode)(r,`"${e}" without "if" is ignored`)}}})),Wl=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Ml(),n=Pl(),r=Nl(),i=Fl(),a=Il(),o=Ll(),s=Rl(),c=zl(),l=Bl(),u=Vl(),d=U(),f=Hl(),p=W(),m=G(),h=K(),g=Ul();function _(e=!1){let _=[d.default,f.default,p.default,m.default,h.default,g.default,s.default,c.default,o.default,l.default,u.default];return e?_.push(n.default,i.default):_.push(t.default,r.default),_.push(a.default),_}e.default=_})),Gl=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=V();e.default={keyword:`format`,type:[`number`,`string`],schemaType:`string`,$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,t._)`{format: ${e}}`},code(e,n){let{gen:r,data:i,$data:a,schema:o,schemaCode:s,it:c}=e,{opts:l,errSchemaPath:u,schemaEnv:d,self:f}=c;if(!l.validateFormats)return;a?p():m();function p(){let a=r.scopeValue(`formats`,{ref:f.formats,code:l.code.formats}),o=r.const(`fDef`,(0,t._)`${a}[${s}]`),c=r.let(`fType`),u=r.let(`format`);r.if((0,t._)`typeof ${o} == "object" && !(${o} instanceof RegExp)`,()=>r.assign(c,(0,t._)`${o}.type || "string"`).assign(u,(0,t._)`${o}.validate`),()=>r.assign(c,(0,t._)`"string"`).assign(u,o)),e.fail$data((0,t.or)(p(),m()));function p(){return l.strictSchema===!1?t.nil:(0,t._)`${s} && !${u}`}function m(){let e=d.$async?(0,t._)`(${o}.async ? await ${u}(${i}) : ${u}(${i}))`:(0,t._)`${u}(${i})`,r=(0,t._)`(typeof ${u} == "function" ? ${e} : ${u}.test(${i}))`;return(0,t._)`${u} && ${u} !== true && ${c} === ${n} && !${r}`}}function m(){let a=f.formats[o];if(!a){m();return}if(a===!0)return;let[s,c,p]=h(a);s===n&&e.pass(g());function m(){if(l.strictSchema===!1){f.logger.warn(e());return}throw Error(e());function e(){return`unknown format "${o}" ignored in schema at path "${u}"`}}function h(e){let n=e instanceof RegExp?(0,t.regexpCode)(e):l.code.formats?(0,t._)`${l.code.formats}${(0,t.getProperty)(o)}`:void 0,i=r.scopeValue(`formats`,{key:o,ref:e,code:n});return typeof e==`object`&&!(e instanceof RegExp)?[e.type||`string`,e.validate,(0,t._)`${i}.validate`]:[`string`,e,i]}function g(){if(typeof a==`object`&&!(a instanceof RegExp)&&a.async){if(!d.$async)throw Error(`async format in sync schema`);return(0,t._)`await ${p}(${i})`}return typeof c==`function`?(0,t._)`${p}(${i})`:(0,t._)`${p}.test(${i})`}}}}})),Kl=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=[Gl().default]})),ql=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.contentVocabulary=e.metadataVocabulary=void 0,e.metadataVocabulary=[`title`,`description`,`default`,`deprecated`,`readOnly`,`writeOnly`,`examples`],e.contentVocabulary=[`contentMediaType`,`contentEncoding`,`contentSchema`]})),Jl=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=vl(),n=jl(),r=Wl(),i=Kl(),a=ql();e.default=[t.default,n.default,(0,r.default)(),i.default,a.metadataVocabulary,a.contentVocabulary]})),Yl=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0;var t;(function(e){e.Tag=`tag`,e.Mapping=`mapping`})(t||(e.DiscrError=t={}))})),Xl=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=V(),n=Yl(),r=nl(),i=tl(),a=H();e.default={keyword:`discriminator`,type:`object`,schemaType:`object`,error:{message:({params:{discrError:e,tagName:t}})=>e===n.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:n,tagName:r}})=>(0,t._)`{error: ${e}, tag: ${r}, tagValue: ${n}}`},code(e){let{gen:o,data:s,schema:c,parentSchema:l,it:u}=e,{oneOf:d}=l;if(!u.opts.discriminator)throw Error(`discriminator: requires discriminator option`);let f=c.propertyName;if(typeof f!=`string`)throw Error(`discriminator: requires propertyName`);if(c.mapping)throw Error(`discriminator: mapping is not supported`);if(!d)throw Error(`discriminator: requires oneOf keyword`);let p=o.let(`valid`,!1),m=o.const(`tag`,(0,t._)`${s}${(0,t.getProperty)(f)}`);o.if((0,t._)`typeof ${m} == "string"`,()=>h(),()=>e.error(!1,{discrError:n.DiscrError.Tag,tag:m,tagName:f})),e.ok(p);function h(){let r=_();o.if(!1);for(let e in r)o.elseIf((0,t._)`${m} === ${e}`),o.assign(p,g(r[e]));o.else(),e.error(!1,{discrError:n.DiscrError.Mapping,tag:m,tagName:f}),o.endIf()}function g(n){let r=o.name(`valid`),i=e.subschema({keyword:`oneOf`,schemaProp:n},r);return e.mergeEvaluated(i,t.Name),r}function _(){let e={},t=o(l),n=!0;for(let e=0;e<d.length;e++){let c=d[e];if(c?.$ref&&!(0,a.schemaHasRulesButRef)(c,u.self.RULES)){let e=c.$ref;if(c=r.resolveRef.call(u.self,u.schemaEnv.root,u.baseId,e),c instanceof r.SchemaEnv&&(c=c.schema),c===void 0)throw new i.default(u.opts.uriResolver,u.baseId,e)}let l=c?.properties?.[f];if(typeof l!=`object`)throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${f}"`);n&&=t||o(c),s(l,e)}if(!n)throw Error(`discriminator: "${f}" must be required`);return e;function o({required:e}){return Array.isArray(e)&&e.includes(f)}function s(e,t){if(e.const)c(e.const,t);else if(e.enum)for(let n of e.enum)c(n,t);else throw Error(`discriminator: "properties/${f}" must have "const" or "enum"`)}function c(t,n){if(typeof t!=`string`||t in e)throw Error(`discriminator: "${f}" values must be unique strings`);e[t]=n}}}}})),Zl=c({$id:()=>$l,$schema:()=>Ql,default:()=>iu,definitions:()=>tu,properties:()=>ru,title:()=>eu,type:()=>nu}),Ql,$l,eu,tu,nu,ru,iu,au=o((()=>{Ql=`http://json-schema.org/draft-07/schema#`,$l=`http://json-schema.org/draft-07/schema#`,eu=`Core schema meta-schema`,tu={schemaArray:{type:`array`,minItems:1,items:{$ref:`#`}},nonNegativeInteger:{type:`integer`,minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:`#/definitions/nonNegativeInteger`},{default:0}]},simpleTypes:{enum:[`array`,`boolean`,`integer`,`null`,`number`,`object`,`string`]},stringArray:{type:`array`,items:{type:`string`},uniqueItems:!0,default:[]}},nu=[`object`,`boolean`],ru={$id:{type:`string`,format:`uri-reference`},$schema:{type:`string`,format:`uri`},$ref:{type:`string`,format:`uri-reference`},$comment:{type:`string`},title:{type:`string`},description:{type:`string`},default:!0,readOnly:{type:`boolean`,default:!1},examples:{type:`array`,items:!0},multipleOf:{type:`number`,exclusiveMinimum:0},maximum:{type:`number`},exclusiveMaximum:{type:`number`},minimum:{type:`number`},exclusiveMinimum:{type:`number`},maxLength:{$ref:`#/definitions/nonNegativeInteger`},minLength:{$ref:`#/definitions/nonNegativeIntegerDefault0`},pattern:{type:`string`,format:`regex`},additionalItems:{$ref:`#`},items:{anyOf:[{$ref:`#`},{$ref:`#/definitions/schemaArray`}],default:!0},maxItems:{$ref:`#/definitions/nonNegativeInteger`},minItems:{$ref:`#/definitions/nonNegativeIntegerDefault0`},uniqueItems:{type:`boolean`,default:!1},contains:{$ref:`#`},maxProperties:{$ref:`#/definitions/nonNegativeInteger`},minProperties:{$ref:`#/definitions/nonNegativeIntegerDefault0`},required:{$ref:`#/definitions/stringArray`},additionalProperties:{$ref:`#`},definitions:{type:`object`,additionalProperties:{$ref:`#`},default:{}},properties:{type:`object`,additionalProperties:{$ref:`#`},default:{}},patternProperties:{type:`object`,additionalProperties:{$ref:`#`},propertyNames:{format:`regex`},default:{}},dependencies:{type:`object`,additionalProperties:{anyOf:[{$ref:`#`},{$ref:`#/definitions/stringArray`}]}},propertyNames:{$ref:`#`},const:!0,enum:{type:`array`,items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:`#/definitions/simpleTypes`},{type:`array`,items:{$ref:`#/definitions/simpleTypes`},minItems:1,uniqueItems:!0}]},format:{type:`string`},contentMediaType:{type:`string`},contentEncoding:{type:`string`},if:{$ref:`#`},then:{$ref:`#`},else:{$ref:`#`},allOf:{$ref:`#/definitions/schemaArray`},anyOf:{$ref:`#/definitions/schemaArray`},oneOf:{$ref:`#/definitions/schemaArray`},not:{$ref:`#`}},iu={$schema:Ql,$id:$l,title:eu,definitions:tu,type:nu,properties:ru,default:!0}})),ou=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;var n=hl(),r=Jl(),i=Xl(),a=(au(),d(Zl).default),o=[`/properties`],s=`http://json-schema.org/draft-07/schema`,c=class extends n.default{_addVocabularies(){super._addVocabularies(),r.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(a,o):a;this.addMetaSchema(e,s,!1),this.refs[`http://json-schema.org/schema`]=s}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(s)?s:void 0)}};e.Ajv=c,t.exports=e=c,t.exports.Ajv=c,Object.defineProperty(e,"__esModule",{value:!0}),e.default=c;var l=$c();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var u=V();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var f=el();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return f.default}});var p=tl();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return p.default}})})),su=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(e,t){return{validate:e,compare:t}}e.fullFormats={date:t(a,o),time:t(c(!0),l),"date-time":t(f(!0),p),"iso-time":t(c(),u),"iso-date-time":t(f(),m),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:_,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:ee,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:y,int32:{type:`number`,validate:S},int64:{type:`number`,validate:C},float:{type:`number`,validate:w},double:{type:`number`,validate:w},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,o),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,l),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,p),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,u),"iso-date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,m),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function n(e){return e%4==0&&(e%100!=0||e%400==0)}var r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function a(e){let t=r.exec(e);if(!t)return!1;let a=+t[1],o=+t[2],s=+t[3];return o>=1&&o<=12&&s>=1&&s<=(o===2&&n(a)?29:i[o])}function o(e,t){if(e&&t)return e>t?1:e<t?-1:0}var s=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function c(e){return function(t){let n=s.exec(t);if(!n)return!1;let r=+n[1],i=+n[2],a=+n[3],o=n[4],c=n[5]===`-`?-1:1,l=+(n[6]||0),u=+(n[7]||0);if(l>23||u>59||e&&!o)return!1;if(r<=23&&i<=59&&a<60)return!0;let d=i-u*c,f=r-l*c-+(d<0);return(f===23||f===-1)&&(d===59||d===-1)&&a<61}}function l(e,t){if(!(e&&t))return;let n=new Date(`2020-01-01T`+e).valueOf(),r=new Date(`2020-01-01T`+t).valueOf();if(n&&r)return n-r}function u(e,t){if(!(e&&t))return;let n=s.exec(e),r=s.exec(t);if(n&&r)return e=n[1]+n[2]+n[3],t=r[1]+r[2]+r[3],e>t?1:e<t?-1:0}var d=/t|\s/i;function f(e){let t=c(e);return function(e){let n=e.split(d);return n.length===2&&a(n[0])&&t(n[1])}}function p(e,t){if(!(e&&t))return;let n=new Date(e).valueOf(),r=new Date(t).valueOf();if(n&&r)return n-r}function m(e,t){if(!(e&&t))return;let[n,r]=e.split(d),[i,a]=t.split(d),s=o(n,i);if(s!==void 0)return s||l(r,a)}var h=/\/|:/,g=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function _(e){return h.test(e)&&g.test(e)}var v=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function y(e){return v.lastIndex=0,v.test(e)}var b=-(2**31),x=2**31-1;function S(e){return Number.isInteger(e)&&e<=x&&e>=b}function C(e){return Number.isInteger(e)}function w(){return!0}var T=/[^\\]\\Z/;function ee(e){if(T.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}})),cu=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;var t=ou(),n=V(),r=n.operators,i={formatMaximum:{okStr:`<=`,ok:r.LTE,fail:r.GT},formatMinimum:{okStr:`>=`,ok:r.GTE,fail:r.LT},formatExclusiveMaximum:{okStr:`<`,ok:r.LT,fail:r.GTE},formatExclusiveMinimum:{okStr:`>`,ok:r.GT,fail:r.LTE}};e.formatLimitDefinition={keyword:Object.keys(i),type:`string`,schemaType:`string`,$data:!0,error:{message:({keyword:e,schemaCode:t})=>(0,n.str)`should be ${i[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,n._)`{comparison: ${i[e].okStr}, limit: ${t}}`},code(e){let{gen:r,data:a,schemaCode:o,keyword:s,it:c}=e,{opts:l,self:u}=c;if(!l.validateFormats)return;let d=new t.KeywordCxt(c,u.RULES.all.format.definition,`format`);d.$data?f():p();function f(){let t=r.scopeValue(`formats`,{ref:u.formats,code:l.code.formats}),i=r.const(`fmt`,(0,n._)`${t}[${d.schemaCode}]`);e.fail$data((0,n.or)((0,n._)`typeof ${i} != "object"`,(0,n._)`${i} instanceof RegExp`,(0,n._)`typeof ${i}.compare != "function"`,m(i)))}function p(){let t=d.schema,i=u.formats[t];if(!i||i===!0)return;if(typeof i!=`object`||i instanceof RegExp||typeof i.compare!=`function`)throw Error(`"${s}": format "${t}" does not define "compare" function`);let a=r.scopeValue(`formats`,{key:t,ref:i,code:l.code.formats?(0,n._)`${l.code.formats}${(0,n.getProperty)(t)}`:void 0});e.fail$data(m(a))}function m(e){return(0,n._)`${e}.compare(${a}, ${o}) ${i[s].fail} 0`}},dependencies:[`format`]},e.default=t=>(t.addKeyword(e.formatLimitDefinition),t)})),lu=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0});var n=su(),r=cu(),i=V(),a=new i.Name(`fullFormats`),o=new i.Name(`fastFormats`),s=(e,t={keywords:!0})=>{if(Array.isArray(t))return c(e,t,n.fullFormats,a),e;let[i,s]=t.mode===`fast`?[n.fastFormats,o]:[n.fullFormats,a];return c(e,t.formats||n.formatNames,i,s),t.keywords&&(0,r.default)(e),e};s.get=(e,t=`full`)=>{let r=(t===`fast`?n.fastFormats:n.fullFormats)[e];if(!r)throw Error(`Unknown format "${e}"`);return r};function c(e,t,n,r){var a;(a=e.opts.code).formats??(a.formats=(0,i._)`require("ajv-formats/dist/formats").${r}`);for(let r of t)e.addFormat(r,n[r])}t.exports=e=s,Object.defineProperty(e,"__esModule",{value:!0}),e.default=s})),uu=u(ou(),1),du=u(lu(),1),fu=u(Dl(),1),pu=u(xl(),1);function mu(e){if(typeof e==`function`)return e;let t=e?.default;if(typeof t==`function`)return t;throw Error(`ajv-runtime: could not resolve a runtime-helper function`)}mu(fu.default).toString(),mu(pu.default).toString();var hu={strict:!0,allErrors:!0,useDefaults:!1,coerceTypes:!1,removeAdditional:!1,verbose:!0},gu=new uu.default({...hu});(0,du.default)(gu),gu.getKeyword(`example`)||gu.addKeyword({keyword:`example`}),gu.getKeyword(`nullable`)||gu.addKeyword({keyword:`nullable`});var _u=new uu.default({...hu,code:{source:!0,esm:!0}});(0,du.default)(_u),_u.getKeyword(`example`)||_u.addKeyword({keyword:`example`}),_u.getKeyword(`nullable`)||_u.addKeyword({keyword:`nullable`});var vu=new uu.default({...hu,code:{source:!0}});(0,du.default)(vu),vu.getKeyword(`example`)||vu.addKeyword({keyword:`example`}),vu.getKeyword(`nullable`)||vu.addKeyword({keyword:`nullable`});function yu(e){let t=new Set(Array.isArray(e.type)?e.type:e.type?[e.type]:[]);if(t.has(`object`)||e.properties!==void 0){let t={...e};if(t.properties){let e={};for(let[n,r]of Object.entries(t.properties))e[n]=yu(r);t.properties=e}return t.additionalProperties===void 0?t.additionalProperties=!1:typeof t.additionalProperties!=`boolean`&&(t.additionalProperties=yu(t.additionalProperties)),t.oneOf&&=t.oneOf.map(yu),t.anyOf&&=t.anyOf.map(yu),t}if(t.has(`array`)&&e.items)return{...e,items:yu(e.items)};if(e.oneOf||e.anyOf){let t={...e};return t.oneOf&&=t.oneOf.map(yu),t.anyOf&&=t.anyOf.map(yu),t}return e}function bu(e){let t=yu(e);return gu.compile(t)}function xu(e,t){return e?e.map(e=>({...Cu(e,t),...e.keyword?{keyword:e.keyword}:{}})):[]}function Su(e,t){return t?e.map(e=>({...e,field:e.field?`${t}.${e.field}`:t})):e}function Cu(e,t){let n=wu(e.instancePath);switch(e.keyword){case`additionalProperties`:{let r=e.params.additionalProperty??`<unknown>`,i=n?`${n}.${r}`:r,a=e.parentSchema,o=a?.properties?Object.keys(a.properties):[],s=Tu(t,`${e.instancePath}/${r}`),c=o.length>0?` Declared keys: [${o.join(`, `)}].`:` Declared keys: [(none)].`;return{field:i,message:`Undeclared field '${r}'${n?` at '${n}'`:``}.${c}`,expected:`<declared key>`,received:Eu(s)}}case`required`:{let t=e.params.missingProperty??`<unknown>`;return{field:n?`${n}.${t}`:t,message:`Required field '${t}' missing${n?` at '${n}'`:``}`,expected:`present`,received:`undefined`}}case`type`:{let r=e.params,i=Array.isArray(r.type)?r.type.join(`|`):r.type??`unknown`,a=Eu(Tu(t,e.instancePath));return{field:n,message:e.message??`Type mismatch at '${n||`<root>`}'`,expected:i,received:a}}case`enum`:{let r=e.params.allowedValues??[],i=Tu(t,e.instancePath);return{field:n,message:e.message??`Enum mismatch at '${n||`<root>`}'`,expected:r.map(e=>JSON.stringify(e)).join(`|`),received:JSON.stringify(i)}}case`const`:{let r=e.params,i=Tu(t,e.instancePath);return{field:n,message:e.message??`Const mismatch at '${n||`<root>`}'`,expected:JSON.stringify(r.allowedValue),received:JSON.stringify(i)}}case`pattern`:{let r=e.params,i=Tu(t,e.instancePath);return{field:n,message:e.message??`Pattern mismatch at '${n||`<root>`}'`,expected:r.pattern??`<pattern>`,received:typeof i==`string`?i:JSON.stringify(i)}}default:return{field:n,message:e.message??`Validation failed${n?` at '${n}'`:``} (${e.keyword})`}}}function wu(e){if(!e)return``;let t=e.slice(1).split(`/`),n=``;for(let e of t)/^\d+$/.test(e)?n+=`[${e}]`:n===``?n=e:n+=`.${e}`;return n}function Tu(e,t){if(!t)return e;let n=t.slice(1).split(`/`),r=e;for(let e of n){if(r==null)return;if(Array.isArray(r)){let t=Number(e);if(!Number.isInteger(t))return;r=r[t]}else if(ze(r))r=r[e];else return}return r}function Eu(e){return e===null?`null`:Array.isArray(e)?`array`:typeof e}var Du=`_ggui:preview`,Ou=`_ggui:lifecycle`,ku=new Set([Du,Ou]);function Au(e){return ku.has(e)}var ju=new Map([[Ou,Mu]]);function Mu(e){let t=[];if(!ze(e))return{valid:!1,violations:[{field:`payload`,message:`${Ou} payload must be a non-null object`,expected:`object`,received:e===null?`null`:Array.isArray(e)?`array`:typeof e}]};let n=e;if(typeof n.kind!=`string`)return{valid:!1,violations:[{field:`kind`,message:`Required field 'kind' must be a string`,expected:`string`,received:n.kind===void 0?`undefined`:typeof n.kind}]};let r=e=>{typeof n[e]!=`string`&&t.push({field:e,message:`Required field '${e}' must be a string`,expected:`string`,received:n[e]===void 0?`undefined`:typeof n[e]})};switch(n.kind){case`handshake_started`:r(`handshakeId`),r(`intent`);break;case`handshake_completed`:r(`handshakeId`),n.outcome!==`accepted`&&n.outcome!==`amended`&&n.outcome!==`declined`&&n.outcome!==`cached`&&t.push({field:`outcome`,message:`Required field 'outcome' must be 'accepted' | 'amended' | 'declined' | 'cached'`,expected:`'accepted' | 'amended' | 'declined' | 'cached'`,received:n.outcome===void 0?`undefined`:String(n.outcome)}),typeof n.genExpected!=`boolean`&&t.push({field:`genExpected`,message:`Required field 'genExpected' must be a boolean`,expected:`boolean`,received:n.genExpected===void 0?`undefined`:typeof n.genExpected});break;case`render_started`:r(`sessionId`),r(`intent`);break;case`consume_polling`:r(`sessionId`),n.state!==`open`&&t.push({field:`state`,message:`Required field 'state' must be 'open'`,expected:`'open'`,received:n.state===void 0?`undefined`:String(n.state)});break;default:t.push({field:`kind`,message:`Unknown lifecycle kind '${n.kind}'. Closed union; new kinds bump protocol version.`,expected:`'handshake_started' | 'handshake_completed' | 'render_started' | 'consume_polling'`,received:n.kind})}return{valid:t.length===0,violations:t}}function Nu(e){let t=e.properties??{};return{type:`object`,properties:Object.fromEntries(Object.entries(t).map(([e,t])=>[e,t.schema])),required:Object.entries(t).filter(([,e])=>e.required===!0).map(([e])=>e)}}function Pu(e,t,n){let r=n??bu(Nu(t));return r(e)?{valid:!0,violations:[]}:{valid:!1,violations:xu(r.errors,e)}}function Fu(e,t,n,r,i){if(Au(e)){let n=r?.get(e);if(n)return n(t);let i=ju.get(e);return i?i(t):{valid:!0,violations:[]}}let a=[],o=n[e];if(!o)return a.push({field:`channel`,message:`Unknown stream channel '${e}'. Declared channels: ${Object.keys(n).join(`, `)}`,expected:Object.keys(n).join(` | `),received:e}),{valid:!1,violations:a};if(o.schema&&t!==void 0){let n=i?.get(e)??bu(o.schema);if(!n(t))for(let r of Su(xu(n.errors,t),`${e}.payload`))a.push(r)}return{valid:a.length===0,violations:a}}function Iu(e,t,n){let r=[];if(!ze(e))return r.push({field:`value`,message:"Action payload must be an object with an `action` field",expected:`object`,received:Lu(e)}),{valid:!1,violations:r};let i=e,a=i.action;if(typeof a!=`string`||a.length===0)return r.push({field:`action`,message:"Missing or empty `action` identifier",expected:`string`,received:Lu(a)}),{valid:!1,violations:r};let o=t[a];if(!o)return r.push({field:`action`,message:`Unknown action '${a}'. Declared actions: ${Object.keys(t).join(`, `)||`(none)`}`,expected:Object.keys(t).join(` | `)||`(none)`,received:a}),{valid:!1,violations:r};if(o.schema){let e=n?.get(a)??bu(o.schema);if(!e(i.data))for(let t of Su(xu(e.errors,i.data),`${a}.data`))r.push(t)}return{valid:r.length===0,violations:r}}function Lu(e){return e===null?`null`:Array.isArray(e)?`array`:typeof e}function Ru(e,t,n){return e.type!==`data:submit`||!t?{valid:!0,violations:[]}:Iu(e.payload,t,n)}z({appId:F().min(1).optional().describe(`Target app for this curation call. Defaults to the caller's bound app identity; callers not bound to an app must provide it. The deployment's authorization policy decides whether the caller may curate the named app.`),contract:ac,generator:F().min(1).optional().describe("Generator slug (e.g. `ui-gen-default-haiku-4-5`). When omitted, dispatches through `GeneratorRegistry.defaultGenerator()`."),persona:F().optional().describe(`Free-form persona tag (e.g. 'minimalist', 'data-dense'). Normalized via lowercase+trim before persistence; logged as a warning when within Levenshtein distance < 2 of an existing tag for the same appId.`),aesthetic:F().optional().describe("Free-form aesthetic tag (e.g. 'glassmorphic', 'brutalist', 'editorial'). Persisted on `Blueprint.variance.aesthetic`. Distinct from persona — persona names the user mental model; aesthetic names the visual treatment."),context:$o(F(),js).optional().describe("Small structured signal carried alongside the persona. Persisted on `Blueprint.variance.context`."),seedPrompt:F().optional().describe(`The raw operator prompt that produced this variant. Round-trip input for the variant-selector + audit trail.`),setAsOperatorDefault:Io().optional().describe("When true, pins the new blueprint as the operator default for its `(appId, contractHash)` group, clearing any prior default in the same group.")}).strict(),z({blueprintId:F().min(1),codeHash:F().optional().describe("Content hash of the generated code body. Absent when the generator returned a non-`ok` result and persistence skipped — the failure mode is surfaced through generator-level error reporting elsewhere."),validatorScore:R().min(0).max(1).optional().describe(`Advanced generator's iterative-loop validator score (0-1). Absent for default-generator output.`),source:oc.describe("Provenance stamped on the persisted `Blueprint.source` — always the `llm` arm on this path: `generator` is the engine slug the dispatch resolved to (stamped from the engine's own metadata claim); `model` is the LLM model id the engine called.")}).strict(),z({appId:F().min(1).optional().describe(`Target app for this curation call. Defaults to the caller's bound app identity; callers not bound to an app must provide it. The deployment's authorization policy decides whether the caller may curate the named app.`),contract:ac,componentCode:F().min(1).describe("Verbatim component-code body to persist. Stored as-is — no LLM call, no validator pass. Operator owns correctness; the handler computes the canonical sha256 codeHash and routes the bytes through the same persistence seams as `*_generate_*`."),persona:F().optional().describe(`Free-form persona tag (e.g. 'minimalist', 'data-dense'). Normalized via lowercase+trim before persistence; logged as a warning when within Levenshtein distance < 2 of an existing tag for the same appId.`),aesthetic:F().optional().describe("Free-form aesthetic tag. Persisted on `Blueprint.variance.aesthetic`."),context:$o(F(),js).optional().describe("Small structured signal carried alongside the persona. Persisted on `Blueprint.variance.context`."),seedPrompt:F().optional().describe("Optional originating prompt for audit + round-tripping (e.g. the prose the operator originally fed into `*_generate_*` before exporting)."),setAsOperatorDefault:Io().optional().describe("When true, pins the new blueprint as the operator default for its `(appId, contractHash)` group, clearing any prior default in the same group.")}).strict(),z({blueprintId:F().min(1),codeHash:F().min(1).describe(`Content hash of the persisted code body (full sha256 hex).`),source:sc.describe('Provenance stamped on the persisted `Blueprint.source` — always `{kind: "user"}` on this path: operator-supplied bytes, no LLM dispatch, no engine claim to record.')}).strict(),z({appId:F().min(1).optional().describe(`Target app for this curation call. Defaults to the caller's bound app identity; callers not bound to an app must provide it. The deployment's authorization policy decides whether the caller may curate the named app.`),contractHash:F().min(1).optional().describe("Filter to a single `(appId, contractHash)` group. Combine with `generator` / `persona` to narrow within the group."),generator:F().min(1).optional().describe('Filter to engine-generated blueprints (`source.kind === "llm"`) whose `source.generator` equals this slug. `user`-sourced rows never match (they carry no engine provenance).'),persona:F().optional().describe("Filter on `variance.persona`. Normalized to match persisted form (lowercase+trim)."),intentKeywords:Wo(F().min(1)).optional().describe("Semantic-search tokens. When set, dispatches through `BlueprintSearch.search()` rather than indexed `list()`.")}).strict(),z({blueprints:Wo(dc)}).strict(),z({appId:F().min(1).optional().describe(`Target app for this curation call. Defaults to the caller's bound app identity; callers not bound to an app must provide it. The deployment's authorization policy decides whether the caller may curate the named app. Must match the app the addressed blueprint belongs to.`),blueprintId:F().min(1),isOperatorDefault:B(!0).optional().describe("When `true`, pins this blueprint as the operator default for its `(appId, contractHash)` group. Clears any prior default. Cannot set to `false` — to unpin, set another blueprint in the same group as default, or delete this one."),variance:uc.optional().describe('Partial-merge into the existing variance. Supplied keys overwrite; omitted keys preserve. Pass `{persona: ""}` to clear a persona (handler treats empty string as removal).')}).strict(),z({blueprintId:F().min(1),updatedAt:F().min(1)}).strict(),z({appId:F().min(1).optional().describe(`Target app for this curation call. Defaults to the caller's bound app identity; callers not bound to an app must provide it. The deployment's authorization policy decides whether the caller may curate the named app. Must match the app the addressed blueprint belongs to.`),blueprintId:F().min(1)}).strict(),z({deleted:B(!0)}).strict();function zu(e){return`schemaVersion`in e?e.schemaVersion:Re}function Bu(e){let t={sessionId:e.sessionId,type:e.type};e.payload!==void 0&&(t.payload=e.payload),e.clientSeq!==void 0&&(t.clientSeq=e.clientSeq);let n=zu(e);return n!==void 0&&(t.schemaVersion=n),t}var Vu=(0,S.createContext)(null);function Hu(){let e=(0,S.useContext)(Vu);if(!e)throw Error(`useWireContext must be used within a WireProvider. Ensure the component is rendered inside a GguiWireProvider.`);return e}function Uu({config:e,children:t}){return(0,w.jsx)(Vu.Provider,{value:e,children:t})}var Wu=new Set,Gu=!1;function Ku(e,t){try{return`${e}::${JSON.stringify(t??null)}`}catch{return null}}function qu(e,t){let n=Ku(e,t);return n===null?{suppressed:!1,signature:n}:Wu.has(n)?{suppressed:!0,signature:n}:(Wu.add(n),Gu||(Gu=!0,queueMicrotask(()=>{Wu.clear(),Gu=!1})),{suppressed:!1,signature:n})}function Ju(e){let{dispatch:t,onDispatchSuppressed:n}=Hu();return(0,S.useCallback)(r=>{let i=qu(e,r);if(i.suppressed){if(console.warn(`[ggui] useAction('${e}') suppressed a duplicate dispatch (same name + payload, same event-loop task). This usually means two interactive elements nest and both wire to the same action (e.g. a Checkbox onChange inside a Card as={Clickable} onClick); the inner gesture bubbles to the outer handler so one user click would fire the action twice. Wire each useAction callback to exactly ONE interactive surface. Tier-0 'double-wired-action' warns on this at gen time; this runtime defense ensures the user-visible behavior stays correct regardless of code shape.`),n)try{n({actionName:e,payloadSignature:i.signature,payload:r,suppressedAt:Date.now()})}catch(e){console.warn(`[ggui] onDispatchSuppressed observer threw — ignoring:`,e)}return}t(e,r)},[e,t,n])}function Yu(e){let t=e.length===0?`Context`:e.charAt(0).toUpperCase()+e.slice(1)+`Context`,n=globalThis.__ggui__?.contexts?.[t];if(!n)throw Error(`[ggui] useGguiContext('${e}'): no Context registered. The contract must declare 'contextSpec.${e}' AND the runtime must have synthesized the per-slot React Context at boot. If you see this in production code generated by the LLM, the boilerplate's destructure line drifted from the contract.`);return(0,S.useContext)(n)}function Xu(e){let{subscribe:t}=Hu(),[n,r]=(0,S.useState)(null),[i,a]=(0,S.useState)([]),[o,s]=(0,S.useState)(!1),c=(0,S.useRef)(i);return c.current=i,(0,S.useEffect)(()=>t(e,e=>{let t=e.payload;r(t),e.mode===`replace`?a([t]):a([...c.current,t]),e.complete&&s(!0)}),[e,t]),{latest:n,all:i,isComplete:o}}function Zu(e){return{useAction:e=>Ju(e),useStream:e=>Xu(e)}}function Qu(){let{auth:e}=Hu();return e}function $u(){let{app:e}=Hu();return e}function ed(){let{render:e}=Hu();return e}var td=class extends Error{direction;violations;constructor(e,t,n){super(n?`Client contract violation (${e}): ${n}`:`Client contract violation (${e})`),this.name=`ClientContractViolationError`,this.direction=e,this.violations=t}};function nd(e,t,n){return e?Iu({action:t,data:n},e):{valid:!0,violations:[]}}function rd(e,t,n,r){return Au(t)?Fu(t,n,e??{},r):e?Fu(t,n,e,r):{valid:!0,violations:[]}}function id(e){return Bu(e)}function ad(e,t){return Ru(t,e)}function od(e,t){return e?Pu(t,e):{valid:!0,violations:[]}}var sd=class{listeners=new Map;reservedReplay=new Map;subscribe(e,t){let n=this.listeners.get(e);if(n===void 0&&(n=new Set,this.listeners.set(e,n)),n.add(t),e.startsWith(`_ggui:`)){let n=this.reservedReplay.get(e);if(n!==void 0)for(let e of n)t(e)}return()=>{let n=this.listeners.get(e);n!==void 0&&(n.delete(t),n.size===0&&this.listeners.delete(e))}}emit(e){if(e.channel.startsWith(`_ggui:`)){let t=this.reservedReplay.get(e.channel);t===void 0&&(t=[],this.reservedReplay.set(e.channel,t)),t.push(e),t.length>256&&t.shift()}let t=this.listeners.get(e.channel);if(t!==void 0)for(let n of t)n(e)}};function cd(e){let t=0,n=e.nextClientSeq??(()=>(t+=1,t)),r=e.validateEnvelope??ad;return{app:e.app,render:e.render,auth:e.auth,dispatch:(t,i)=>{let a=id({sessionId:e.render.sessionId,type:`data:submit`,payload:{action:t,data:i},clientSeq:n()}),o=r(e.getActiveActionSpec(),a);if(!o.valid){e.onViolation(new td(`outbound-action`,o.violations));return}e.emitEnvelope(a)},subscribe:(t,n)=>e.streamBus.subscribe(t,e=>{n({payload:e.payload,mode:e.mode,...e.complete===void 0?{}:{complete:e.complete}})})}}var ld=c({ClientContractViolationError:()=>td,GguiWireProvider:()=>Uu,RESERVED_CHANNEL_REPLAY_MAX:()=>256,StreamBus:()=>sd,buildActionEnvelope:()=>id,buildWireConfig:()=>cd,useAction:()=>Ju,useApp:()=>$u,useAuth:()=>Qu,useContract:()=>Zu,useGguiContext:()=>Yu,useRender:()=>ed,useStream:()=>Xu,useWireContext:()=>Hu,validateInboundPropsPayload:()=>od,validateInboundStreamPayload:()=>rd,validateOutboundActionEnvelope:()=>ad,validateOutboundActionPayload:()=>nd}),ud=`modulepreload`,dd=function(e){return`/`+e},fd={},pd=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=dd(t,n),t=s(t),t in fd)return;fd[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:ud,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};(0,S.createContext)(null),new Set(As);var md={};Le(md,{Accordion:()=>qf,Alert:()=>Sf,Avatar:()=>yf,Badge:()=>mf,Box:()=>Bd,Button:()=>ef,Card:()=>jd,Checkbox:()=>sf,Container:()=>Cd,Divider:()=>Vd,Grid:()=>zd,Heading:()=>Xd,Icon:()=>jf,Image:()=>Ef,Input:()=>nf,Link:()=>Mf,MotionKeyframes:()=>Yf,Progress:()=>Tf,RadioGroup:()=>uf,Row:()=>Fd,Select:()=>of,Skeleton:()=>gf,Slider:()=>df,Spacer:()=>Hd,Spinner:()=>Zd,Stack:()=>Pd,Table:()=>Ff,Tabs:()=>Lf,Text:()=>Kd,TextArea:()=>rf,Toast:()=>Gf,Toggle:()=>lf,Tooltip:()=>Nf,useAnimationKey:()=>Zf,useMotion:()=>Xf});var hd={xs:`320px`,sm:`480px`,md:`640px`,lg:`768px`,xl:`1024px`,"2xl":`1280px`,"3xl":`1536px`,full:`100%`},gd={none:`0`,sm:`4px`,md:`6px`,lg:`8px`,xl:`12px`,"2xl":`16px`,"3xl":`24px`,full:`9999px`},_d={none:`none`,sm:`0 1px 2px 0 rgb(0 0 0 / 0.05)`,md:`0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)`,lg:`0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)`,xl:`0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)`,"2xl":`0 25px 50px -12px rgb(0 0 0 / 0.25)`,inner:`inset 0 2px 4px 0 rgb(0 0 0 / 0.05)`},vd={hide:-1,auto:`auto`,base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},yd={none:`0`,xs:`var(--ggui-spacing-xs, 4px)`,sm:`var(--ggui-spacing-sm, 8px)`,md:`var(--ggui-spacing-md, 16px)`,lg:`var(--ggui-spacing-lg, 24px)`,xl:`var(--ggui-spacing-xl, 32px)`,"2xl":`var(--ggui-spacing-2xl, 48px)`},bd=new Set(Object.keys(yd));function xd(e){if(e!==void 0)return typeof e==`number`?`${e}px`:bd.has(e)?yd[e]:e}var Sd={xs:hd.xs,sm:hd.sm,md:hd.md,lg:hd.lg,xl:hd.xl,"2xl":hd[`2xl`],"3xl":hd[`3xl`],full:hd.full};function Cd({children:e,maxWidth:t=`lg`,center:n=!0,padding:r,style:i,className:a}){let o=Sd[t]||t,s=xd(r);return(0,w.jsx)(`div`,{className:a,style:{maxWidth:o,margin:n?`0 auto`:void 0,padding:s,width:`100%`,...i},children:e})}function wd(e,t,n,r){return e===void 0?(0,S.createElement)(`div`,{className:n.className,style:n.style},r):(0,S.createElement)(e,{...t,className:n.className,style:n.style},r)}function q(e){switch(e){case`default`:return`var(--ggui-color-onSurface, #18181b)`;case`muted`:return`var(--ggui-color-onSurfaceVariant, #52525b)`;case`subtle`:return`var(--ggui-color-neutral-500, #71717a)`;case`emphasized`:return`var(--ggui-color-primary-700, #0369a1)`;case`loud`:return`var(--ggui-color-primary-500, #0ea5e9)`;case`success`:case`warning`:case`error`:case`info`:return`var(--ggui-color-${e}-500, ${Td[e]})`;case`inverse`:return`var(--ggui-color-surface, #ffffff)`;case`inherit`:return`inherit`}}var Td={success:`#15803d`,warning:`#b45309`,error:`#b91c1c`,info:`#0e7490`};function Ed(e){switch(e){case`default`:case`elevated`:return`var(--ggui-color-surface, #ffffff)`;case`sunken`:return`var(--ggui-color-surfaceVariant, #f4f4f5)`;case`accent`:return`var(--ggui-color-primary-50, #f0f9ff)`;case`inverted`:return`var(--ggui-color-onSurface, #18181b)`;case`transparent`:return`transparent`}}var Dd={none:`0`,sm:`var(--ggui-shape-radius-sm, 4px)`,md:`var(--ggui-shape-radius-md, 8px)`,lg:`var(--ggui-shape-radius-lg, 12px)`,xl:`var(--ggui-shape-radius-xl, 16px)`},Od=new Set(Object.keys(Dd));function kd(e){if(e!==void 0)return typeof e==`number`?`${e}px`:Od.has(e)?Dd[e]:e}var Ad={none:`none`,sm:`var(--ggui-shape-shadow-sm, 0 1px 2px rgba(15, 23, 42, 0.04))`,md:`var(--ggui-shape-shadow-md, 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 8px -2px rgba(15, 23, 42, 0.08))`,lg:`var(--ggui-shape-shadow-lg, 0 2px 4px rgba(15, 23, 42, 0.04), 0 12px 24px -6px rgba(15, 23, 42, 0.10))`,xl:`var(--ggui-shape-shadow-xl, 0 4px 8px rgba(15, 23, 42, 0.04), 0 20px 40px -8px rgba(15, 23, 42, 0.14))`};function jd(e){let{children:t,padding:n=`lg`,shadow:r=`sm`,border:i=!0,radius:a=`lg`,surface:o,style:s,className:c,as:l,...u}=e,d=xd(n);return wd(l,u,{className:c,style:{backgroundColor:Ed(o??`default`),borderRadius:kd(a),padding:d,boxShadow:Ad[r]||r,border:i?`1px solid var(--ggui-color-outlineVariant, #e4e4e7)`:void 0,...s}},t)}var Md={start:`flex-start`,center:`center`,end:`flex-end`,between:`space-between`,around:`space-around`,evenly:`space-evenly`},Nd={start:`flex-start`,center:`center`,end:`flex-end`,stretch:`stretch`};function Pd(e){let{children:t,direction:n=`vertical`,gap:r=`sm`,align:i=`stretch`,justify:a=`start`,wrap:o=!1,style:s,className:c,as:l,...u}=e,d=xd(r);return wd(l,u,{className:c,style:{display:`flex`,flexDirection:n===`vertical`?`column`:`row`,gap:d,alignItems:Nd[i]||i,justifyContent:Md[a]||a,flexWrap:o?`wrap`:`nowrap`,...s}},t)}function Fd(e){return(0,S.createElement)(Pd,{...e,direction:`horizontal`})}var Id=[[`sm`,640],[`md`,768],[`lg`,1024],[`xl`,1280]],Ld=e=>`repeat(${e}, minmax(0, 1fr))`;function Rd(e){let t=JSON.stringify(e),n=0;for(let e=0;e<t.length;e++)n=Math.imul(31,n)+t.charCodeAt(e)|0;return(n>>>0).toString(36)}function zd(e){let{children:t,columns:n=2,gap:r=`md`,minColumnWidth:i,style:a,className:o,as:s,...c}=e,l=typeof i==`number`?`${i}px`:i;if(l!==void 0)return wd(s,c,{className:o,style:{display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(${l}, 1fr))`,gap:xd(r),...a}},t);if(typeof n==`object`){let e=`ggui-grid-${Rd(n)}`,i=[`.${e}{grid-template-columns:${Ld(n.base??1)}}`];for(let[t,r]of Id){let a=n[t];typeof a==`number`&&i.push(`@media (min-width:${r}px){.${e}{grid-template-columns:${Ld(a)}}}`)}let l={display:`grid`,gap:xd(r),...a};return wd(s,c,{className:o?`${o} ${e}`:e,style:l},(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`style`,{children:i.join(``)}),t]}))}return wd(s,c,{className:o,style:{display:`grid`,gridTemplateColumns:Ld(n),gap:xd(r),...a}},t)}function Bd(e){let{children:t,padding:n,paddingX:r,paddingY:i,margin:a,surface:o,assetColor:s,assetSemantic:c,radius:l,style:u,className:d,as:f,...p}=e,m;if(r!==void 0||i!==void 0){let e=xd(r)||`0`;m=`${xd(i)||`0`} ${e}`}else m=xd(n);let h=(s!==void 0&&typeof c==`string`&&c.length>0?s:void 0)||(o?Ed(o):void 0);return wd(f,p,{className:d,style:{padding:m,margin:xd(a),background:h,borderRadius:kd(l),...u}},t)}function Vd({orientation:e=`horizontal`,margin:t=`var(--ggui-spacing-md, 16px)`,tone:n,style:r,className:i}){let a=typeof t==`number`?`${t}px`:t,o=n?q(n):`var(--ggui-color-outlineVariant, #e4e4e7)`;return e===`vertical`?(0,w.jsx)(`div`,{role:`separator`,"aria-orientation":`vertical`,className:i,style:{width:`1px`,backgroundColor:o,margin:`0 ${a}`,alignSelf:`stretch`,...r}}):(0,w.jsx)(`hr`,{role:`separator`,"aria-orientation":`horizontal`,className:i,style:{border:`none`,height:`1px`,backgroundColor:o,margin:`${a} 0`,...r}})}function Hd({size:e=16,style:t,className:n}){return e===`flex`?(0,w.jsx)(`div`,{className:n,style:{flex:1,...t}}):(0,w.jsx)(`div`,{className:n,style:{width:`${e}px`,height:`${e}px`,flexShrink:0,...t}})}var Ud={xs:`var(--ggui-font-size-xs, 12px)`,sm:`var(--ggui-font-size-sm, 14px)`,base:`var(--ggui-font-size-base, 16px)`,lg:`var(--ggui-font-size-lg, 18px)`,xl:`var(--ggui-font-size-xl, 20px)`,"2xl":`var(--ggui-font-size-2xl, 24px)`,"3xl":`var(--ggui-font-size-3xl, 30px)`,"4xl":`var(--ggui-font-size-4xl, 36px)`},Wd={normal:`var(--ggui-font-weight-normal, 400)`,medium:`var(--ggui-font-weight-medium, 500)`,semibold:`var(--ggui-font-weight-semibold, 600)`,bold:`var(--ggui-font-weight-bold, 700)`},Gd={xs:1.5,sm:1.5,base:1.5,lg:1.625,xl:1.375,"2xl":1.25,"3xl":1.25,"4xl":1.25};function Kd({children:e,size:t=`base`,weight:n=`normal`,caps:r=!1,tone:i,align:a,truncate:o,is:s=`p`,id:c,htmlFor:l,style:u,className:d}){let f=i?q(i):`var(--ggui-color-onSurface, #18181b)`,p={id:c,htmlFor:l,className:d,style:{fontSize:Ud[t],fontWeight:Wd[n],lineHeight:Gd[t],color:f,textAlign:a,margin:0,...r&&{textTransform:`uppercase`,letterSpacing:`0.05em`},...o&&{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},...u}};return(0,S.createElement)(s,p,e)}var J={xs:`12px`,sm:`14px`,base:`16px`,lg:`18px`,xl:`20px`,"2xl":`24px`,"3xl":`30px`,"4xl":`36px`,"5xl":`48px`,"6xl":`60px`},Y={thin:100,extralight:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},qd={none:1,tight:1.25,snug:1.375,normal:1.5,relaxed:1.625,loose:2},Jd={tighter:`-0.05em`,tight:`-0.025em`,normal:`0em`,wide:`0.025em`,wider:`0.05em`,widest:`0.1em`},Yd={h1:{fontSize:J[`4xl`],fontWeight:Y.bold,lineHeight:qd.tight,letterSpacing:Jd.tight},h2:{fontSize:J[`3xl`],fontWeight:Y.bold,lineHeight:qd.tight,letterSpacing:Jd.tight},h3:{fontSize:J[`2xl`],fontWeight:Y.semibold,lineHeight:qd.snug,letterSpacing:Jd.normal},h4:{fontSize:J.xl,fontWeight:Y.semibold,lineHeight:qd.snug,letterSpacing:Jd.normal},h5:{fontSize:J.lg,fontWeight:Y.semibold,lineHeight:qd.normal,letterSpacing:Jd.normal},h6:{fontSize:J.base,fontWeight:Y.semibold,lineHeight:qd.normal,letterSpacing:Jd.normal}};function Xd({children:e,level:t=2,tone:n,align:r,style:i,className:a}){let o=`h${t}`,s=Yd[o]||Yd.h2,c=n?q(n):`var(--ggui-color-onSurface, #18181b)`;return(0,S.createElement)(o,{className:a,style:{...s,color:c,textAlign:r,margin:0,...i}},e)}function Zd({size:e=24,tone:t,style:n,className:r}){let i=t===`inherit`?`currentColor`:t?q(t):`var(--ggui-color-primary-600, #0284c7)`;return(0,w.jsxs)(`svg`,{className:r,width:e,height:e,viewBox:`0 0 24 24`,fill:`none`,role:`status`,"aria-label":`Loading`,style:{animation:`ggui-spin 1s linear infinite`,...n},children:[(0,w.jsx)(`style`,{children:`@keyframes ggui-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }`}),(0,w.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`,stroke:`var(--ggui-color-outlineVariant, #e4e4e7)`,strokeWidth:`3`,fill:`none`}),(0,w.jsx)(`path`,{d:`M12 2a10 10 0 0 1 10 10`,stroke:i,strokeWidth:`3`,strokeLinecap:`round`,fill:`none`})]})}var X={instant:`0ms`,fast:`100ms`,normal:`200ms`,slow:`300ms`,slower:`500ms`},Z={linear:`linear`,easeIn:`cubic-bezier(0.4, 0, 1, 1)`,easeOut:`cubic-bezier(0, 0, 0.2, 1)`,easeInOut:`cubic-bezier(0.4, 0, 0.2, 1)`,spring:`cubic-bezier(0.175, 0.885, 0.32, 1.275)`};`${X.fast}${Z.easeInOut}`,`${X.normal}${Z.easeInOut}`,`${X.slow}${Z.easeInOut}`,`${X.normal}${Z.easeInOut}${X.normal}${Z.easeInOut}${X.normal}${Z.easeInOut}`,`${X.normal}${Z.easeInOut}`,`${X.normal}${Z.easeOut}`;var Qd={xs:{padding:`var(--ggui-spacing-1, 4px) var(--ggui-spacing-2, 8px)`,fontSize:`var(--ggui-font-size-xs, 12px)`,minHeight:`24px`},sm:{padding:`6px var(--ggui-spacing-4, 12px)`,fontSize:`var(--ggui-font-size-sm, 14px)`,minHeight:`32px`},md:{padding:`10px var(--ggui-spacing-4, 16px)`,fontSize:`var(--ggui-font-size-sm, 14px)`,minHeight:`40px`},lg:{padding:`12px var(--ggui-spacing-6, 24px)`,fontSize:`var(--ggui-font-size-base, 16px)`,minHeight:`48px`}},$d={primary:{backgroundColor:`var(--ggui-color-primary-600, #0284c7)`,color:`var(--ggui-color-onPrimary, #ffffff)`,border:`none`},secondary:{backgroundColor:`var(--ggui-color-surfaceVariant, #f4f4f5)`,color:`var(--ggui-color-onSurfaceVariant, #52525b)`,border:`none`},outline:{backgroundColor:`transparent`,color:`var(--ggui-color-primary-600, #0284c7)`,border:`1px solid var(--ggui-color-primary-600, #0284c7)`},ghost:{backgroundColor:`transparent`,color:`var(--ggui-color-onSurfaceVariant, #52525b)`,border:`none`},danger:{backgroundColor:`var(--ggui-color-error-600, #dc2626)`,color:`var(--ggui-color-onError, #ffffff)`,border:`none`}};function ef({children:e,variant:t=`primary`,size:n=`md`,fullWidth:r,loading:i,disabled:a,leftIcon:o,rightIcon:s,type:c=`button`,onClick:l,onPress:u,style:d,className:f,...p}){let m=a||i;return(0,w.jsx)(`button`,{type:c,onClick:m?void 0:l??u,disabled:m,className:f,style:{...Qd[n],...$d[t],display:`inline-flex`,alignItems:`center`,justifyContent:`center`,gap:`var(--ggui-spacing-2, 8px)`,borderRadius:`var(--ggui-shape-radius-md, 8px)`,fontWeight:`var(--ggui-font-weight-medium, 500)`,cursor:m?`not-allowed`:`pointer`,opacity:m?.5:1,width:r?`100%`:void 0,transition:`background-color ${X.normal} ${Z.easeInOut}, box-shadow ${X.normal} ${Z.easeInOut}, opacity ${X.normal} ${Z.easeInOut}`,boxShadow:`var(--ggui-shape-shadow-sm, 0 1px 2px rgba(0,0,0,0.05))`,...d},...p,children:i?(0,w.jsx)(Zd,{size:16,tone:`inherit`}):(0,w.jsxs)(w.Fragment,{children:[o,e,s]})})}var tf={sm:{padding:`6px 10px`,fontSize:`var(--ggui-font-size-sm, 14px)`},md:{padding:`10px 12px`,fontSize:`var(--ggui-font-size-sm, 14px)`},lg:{padding:`12px 14px`,fontSize:`var(--ggui-font-size-base, 16px)`}};function nf({label:e,placeholder:t,value:n,onChange:r,type:i=`text`,error:a,helperText:o,required:s,disabled:c,size:l=`md`,style:u,className:d,...f}){let p=(0,S.useId)(),m=`${p}-input`,h=`${p}-message`,g=!!a,_=!!(a||o);return(0,w.jsxs)(`div`,{className:d,style:{display:`flex`,flexDirection:`column`,gap:`var(--ggui-spacing-1, 4px)`,...u},children:[e&&(0,w.jsxs)(`label`,{htmlFor:m,style:{fontSize:`var(--ggui-font-size-sm, 14px)`,fontWeight:`var(--ggui-font-weight-medium, 500)`,color:`var(--ggui-color-onSurfaceVariant, #52525b)`},children:[e,s&&(0,w.jsx)(`span`,{"aria-hidden":`true`,style:{color:`var(--ggui-color-error-500, #ef4444)`,marginLeft:`2px`},children:`*`})]}),(0,w.jsx)(`input`,{id:m,type:i,placeholder:t,value:n,onChange:e=>r?.(e.target.value),disabled:c,required:s,"aria-invalid":g||void 0,"aria-describedby":_?h:void 0,style:{...tf[l],width:`100%`,borderRadius:`var(--ggui-shape-radius-md, 8px)`,border:`1px solid ${g?`var(--ggui-color-error-500, #ef4444)`:`var(--ggui-color-outline, #d4d4d8)`}`,backgroundColor:c?`var(--ggui-color-surface, #fafafa)`:`var(--ggui-color-surface, #ffffff)`,color:`var(--ggui-color-onSurface, #18181b)`,transition:`border-color ${X.normal} ${Z.easeInOut}, box-shadow ${X.normal} ${Z.easeInOut}`,boxSizing:`border-box`},...f}),_&&(0,w.jsx)(`span`,{id:h,role:g?`alert`:void 0,style:{fontSize:`var(--ggui-font-size-xs, 12px)`,color:g?`var(--ggui-color-error-500, #ef4444)`:`var(--ggui-color-onSurfaceVariant, #52525b)`},children:a||o})]})}function rf({label:e,placeholder:t,value:n,onChange:r,rows:i=4,error:a,helperText:o,required:s,disabled:c,maxLength:l,showCount:u,autoResize:d,style:f,className:p,...m}){let h=(0,S.useId)(),g=`${h}-textarea`,_=`${h}-message`,v=!!a,y=!!(a||o),b=n?.length||0;return(0,w.jsxs)(`div`,{className:p,style:{display:`flex`,flexDirection:`column`,gap:`var(--ggui-spacing-1, 4px)`,...f},children:[e&&(0,w.jsxs)(`label`,{htmlFor:g,style:{fontSize:`var(--ggui-font-size-sm, 14px)`,fontWeight:`var(--ggui-font-weight-medium, 500)`,color:`var(--ggui-color-onSurfaceVariant, #52525b)`},children:[e,s&&(0,w.jsx)(`span`,{"aria-hidden":`true`,style:{color:`var(--ggui-color-error-500, #ef4444)`,marginLeft:`2px`},children:`*`})]}),(0,w.jsx)(`textarea`,{id:g,placeholder:t,value:n,onChange:e=>r?.(e.target.value),rows:i,disabled:c,required:s,maxLength:l,"aria-invalid":v||void 0,"aria-describedby":y?_:void 0,style:{padding:`10px 12px`,width:`100%`,borderRadius:`var(--ggui-shape-radius-md, 8px)`,border:`1px solid ${v?`var(--ggui-color-error-500, #ef4444)`:`var(--ggui-color-outline, #d4d4d8)`}`,backgroundColor:c?`var(--ggui-color-surface, #fafafa)`:`var(--ggui-color-surface, #ffffff)`,color:`var(--ggui-color-onSurface, #18181b)`,fontSize:`var(--ggui-font-size-sm, 14px)`,fontFamily:`inherit`,transition:`border-color ${X.normal} ${Z.easeInOut}, box-shadow ${X.normal} ${Z.easeInOut}`,boxSizing:`border-box`,resize:d?`none`:`vertical`},...m}),(0,w.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[y&&(0,w.jsx)(`span`,{id:_,role:v?`alert`:void 0,style:{fontSize:`var(--ggui-font-size-xs, 12px)`,color:v?`var(--ggui-color-error-500, #ef4444)`:`var(--ggui-color-onSurfaceVariant, #52525b)`},children:a||o}),u&&l&&(0,w.jsxs)(`span`,{style:{fontSize:`var(--ggui-font-size-xs, 12px)`,color:`var(--ggui-color-onSurfaceVariant, #52525b)`,marginLeft:`auto`},children:[b,`/`,l]})]})]})}var af={sm:{padding:`6px 10px`,fontSize:`var(--ggui-font-size-sm, 14px)`},md:{padding:`10px 12px`,fontSize:`var(--ggui-font-size-sm, 14px)`},lg:{padding:`12px 14px`,fontSize:`var(--ggui-font-size-base, 16px)`}};function of({label:e,value:t,onChange:n,options:r,placeholder:i,error:a,helperText:o,required:s,disabled:c,size:l=`md`,style:u,className:d,...f}){let p=(0,S.useId)(),m=`${p}-select`,h=`${p}-message`,g=!!a,_=!!(a||o);return(0,w.jsxs)(`div`,{className:d,style:{display:`flex`,flexDirection:`column`,gap:`var(--ggui-spacing-1, 4px)`,...u},children:[e&&(0,w.jsxs)(`label`,{htmlFor:m,style:{fontSize:`var(--ggui-font-size-sm, 14px)`,fontWeight:`var(--ggui-font-weight-medium, 500)`,color:`var(--ggui-color-onSurfaceVariant, #52525b)`},children:[e,s&&(0,w.jsx)(`span`,{"aria-hidden":`true`,style:{color:`var(--ggui-color-error-500, #ef4444)`,marginLeft:`2px`},children:`*`})]}),(0,w.jsxs)(`select`,{id:m,value:t,onChange:e=>n?.(e.target.value),disabled:c,required:s,"aria-invalid":g||void 0,"aria-describedby":_?h:void 0,style:{...af[l],width:`100%`,borderRadius:`var(--ggui-shape-radius-md, 8px)`,border:`1px solid ${g?`var(--ggui-color-error-500, #ef4444)`:`var(--ggui-color-outline, #d4d4d8)`}`,backgroundColor:c?`var(--ggui-color-surface, #fafafa)`:`var(--ggui-color-surface, #ffffff)`,color:t?`var(--ggui-color-onSurface, #18181b)`:`var(--ggui-color-onSurfaceVariant, #52525b)`,cursor:c?`not-allowed`:`pointer`,appearance:`none`,backgroundImage:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M3 4.5L6 7.5L9 4.5'/%3E%3C/svg%3E")`,backgroundRepeat:`no-repeat`,backgroundPosition:`right 12px center`,paddingRight:`36px`,boxSizing:`border-box`,transition:`border-color ${X.normal} ${Z.easeInOut}, box-shadow ${X.normal} ${Z.easeInOut}`},...f,children:[i&&(0,w.jsx)(`option`,{value:``,disabled:!0,children:i}),r.map(e=>(0,w.jsx)(`option`,{value:e.value,disabled:e.disabled,children:e.label},e.value))]}),_&&(0,w.jsx)(`span`,{id:h,role:g?`alert`:void 0,style:{fontSize:`var(--ggui-font-size-xs, 12px)`,color:g?`var(--ggui-color-error-500, #ef4444)`:`var(--ggui-color-onSurfaceVariant, #52525b)`},children:a||o})]})}function sf({label:e,checked:t,onChange:n,disabled:r,description:i,indeterminate:a,style:o,className:s}){return(0,w.jsxs)(`label`,{className:s,style:{display:`flex`,alignItems:`flex-start`,gap:`var(--ggui-spacing-2, 8px)`,cursor:r?`not-allowed`:`pointer`,opacity:r?.5:1,...o},children:[(0,w.jsxs)(`div`,{style:{position:`relative`,width:`18px`,height:`18px`,flexShrink:0,marginTop:`2px`},children:[(0,w.jsx)(`input`,{type:`checkbox`,checked:t,onChange:e=>n?.(e.target.checked),disabled:r,ref:e=>{e&&(e.indeterminate=a||!1)},style:{position:`absolute`,width:`18px`,height:`18px`,margin:0,opacity:0,cursor:r?`not-allowed`:`pointer`}}),(0,w.jsx)(`div`,{style:{width:`18px`,height:`18px`,borderRadius:`var(--ggui-shape-radius-sm, 4px)`,border:`2px solid ${t||a?`var(--ggui-color-primary-600, #0284c7)`:`var(--ggui-color-outline, #d4d4d8)`}`,backgroundColor:t||a?`var(--ggui-color-primary-600, #0284c7)`:`var(--ggui-color-surface, #ffffff)`,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`all 0.2s`},children:(t||a)&&(0,w.jsx)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 12 12`,fill:`none`,style:{color:`var(--ggui-color-onPrimary, #ffffff)`},children:a?(0,w.jsx)(`path`,{d:`M2.5 6H9.5`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`}):(0,w.jsx)(`path`,{d:`M2.5 6L5 8.5L9.5 3.5`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})})]}),(e||i)&&(0,w.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`2px`},children:[e&&(0,w.jsx)(`span`,{style:{fontSize:`var(--ggui-font-size-sm, 14px)`,fontWeight:`var(--ggui-font-weight-medium, 500)`,color:`var(--ggui-color-onSurfaceVariant, #52525b)`},children:e}),i&&(0,w.jsx)(`span`,{style:{fontSize:`var(--ggui-font-size-xs, 12px)`,color:`var(--ggui-color-onSurfaceVariant, #52525b)`},children:i})]})]})}var cf={sm:{width:36,height:20,knob:16},md:{width:44,height:24,knob:20},lg:{width:52,height:28,knob:24}};function lf({label:e,checked:t,onChange:n,disabled:r,size:i=`md`,style:a,className:o}){let s=cf[i],[c,l]=(0,S.useState)(!1);return(0,w.jsxs)(`label`,{className:o,style:{display:`flex`,alignItems:`center`,gap:`var(--ggui-spacing-2, 8px)`,cursor:r?`not-allowed`:`pointer`,opacity:r?.5:1,...a},children:[(0,w.jsx)(`div`,{role:`switch`,"aria-checked":t,"aria-label":e,tabIndex:r?-1:0,onClick:()=>!r&&n?.(!t),onKeyDown:e=>{r||(e.key===` `||e.key===`Enter`)&&(e.preventDefault(),n?.(!t))},onFocus:()=>l(!0),onBlur:()=>l(!1),style:{width:s.width,height:s.height,borderRadius:`9999px`,backgroundColor:t?`var(--ggui-color-primary-600, #0284c7)`:`var(--ggui-color-outline, #d4d4d8)`,position:`relative`,transition:`background-color ${X.normal} ${Z.easeInOut}, box-shadow ${X.normal} ${Z.easeInOut}`,flexShrink:0,outline:`none`,boxShadow:c?`0 0 0 3px var(--ggui-color-primary-200, #bae6fd)`:void 0},children:(0,w.jsx)(`div`,{style:{width:s.knob,height:s.knob,borderRadius:`50%`,backgroundColor:`#ffffff`,position:`absolute`,top:(s.height-s.knob)/2,left:t?s.width-s.knob-(s.height-s.knob)/2:(s.height-s.knob)/2,transition:`left ${X.normal} ${Z.easeInOut}`,boxShadow:`var(--ggui-shape-shadow-sm, 0 1px 2px rgba(0,0,0,0.05))`}})}),e&&(0,w.jsx)(`span`,{style:{fontSize:`var(--ggui-font-size-sm, 14px)`,fontWeight:`var(--ggui-font-weight-medium, 500)`,color:`var(--ggui-color-onSurfaceVariant, #52525b)`},children:e})]})}function uf({label:e,value:t,onChange:n,options:r,direction:i=`vertical`,disabled:a,error:o,style:s,className:c}){let l=(0,S.useId)(),u=`${l}-label`,d=`${l}-error`,f=`${l}-radio`;return(0,w.jsxs)(`div`,{role:`radiogroup`,"aria-labelledby":e?u:void 0,"aria-describedby":o?d:void 0,className:c,style:{display:`flex`,flexDirection:`column`,gap:`var(--ggui-spacing-2, 8px)`,...s},children:[e&&(0,w.jsx)(`span`,{id:u,style:{fontSize:`var(--ggui-font-size-sm, 14px)`,fontWeight:`var(--ggui-font-weight-medium, 500)`,color:`var(--ggui-color-onSurfaceVariant, #52525b)`},children:e}),(0,w.jsx)(`div`,{style:{display:`flex`,flexDirection:i===`vertical`?`column`:`row`,gap:i===`vertical`?`var(--ggui-spacing-2, 8px)`:`var(--ggui-spacing-4, 16px)`,flexWrap:`wrap`},children:r.map(e=>{let r=t===e.value,i=a||e.disabled;return(0,w.jsxs)(`label`,{style:{display:`flex`,alignItems:`flex-start`,gap:`var(--ggui-spacing-2, 8px)`,cursor:i?`not-allowed`:`pointer`,opacity:i?.5:1},children:[(0,w.jsxs)(`div`,{style:{position:`relative`,width:`18px`,height:`18px`,flexShrink:0,marginTop:`2px`},children:[(0,w.jsx)(`input`,{type:`radio`,name:f,value:e.value,checked:r,onChange:()=>n?.(e.value),disabled:i,style:{position:`absolute`,width:`18px`,height:`18px`,margin:0,opacity:0,cursor:i?`not-allowed`:`pointer`}}),(0,w.jsx)(`div`,{style:{width:`18px`,height:`18px`,borderRadius:`var(--ggui-shape-radius-full, 9999px)`,border:`2px solid ${r?`var(--ggui-color-primary-600, #0284c7)`:`var(--ggui-color-outline, #d4d4d8)`}`,backgroundColor:`var(--ggui-color-surface, #ffffff)`,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`all 0.2s`},children:r&&(0,w.jsx)(`div`,{style:{width:`8px`,height:`8px`,borderRadius:`var(--ggui-shape-radius-full, 9999px)`,backgroundColor:`var(--ggui-color-primary-600, #0284c7)`}})})]}),(0,w.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`2px`},children:[(0,w.jsx)(`span`,{style:{fontSize:`var(--ggui-font-size-sm, 14px)`,fontWeight:`var(--ggui-font-weight-medium, 500)`,color:`var(--ggui-color-onSurfaceVariant, #52525b)`},children:e.label}),e.description&&(0,w.jsx)(`span`,{style:{fontSize:`var(--ggui-font-size-xs, 12px)`,color:`var(--ggui-color-onSurfaceVariant, #52525b)`},children:e.description})]})]},e.value)})}),o&&(0,w.jsx)(`span`,{id:d,role:`alert`,style:{fontSize:`var(--ggui-font-size-xs, 12px)`,color:`var(--ggui-color-error-500, #ef4444)`},children:o})]})}function df({label:e,value:t=0,onChange:n,min:r=0,max:i=100,step:a=1,disabled:o,showValue:s,style:c,className:l}){let u=(0,S.useId)(),d=`${u}-slider`,f=`${u}-label`,p=(t-r)/(i-r)*100;return(0,w.jsxs)(`div`,{className:l,style:{display:`flex`,flexDirection:`column`,gap:`var(--ggui-spacing-2, 8px)`,...c},children:[(e||s)&&(0,w.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[e&&(0,w.jsx)(`span`,{id:f,style:{fontSize:`var(--ggui-font-size-sm, 14px)`,fontWeight:`var(--ggui-font-weight-medium, 500)`,color:`var(--ggui-color-onSurfaceVariant, #52525b)`},children:e}),s&&(0,w.jsx)(`span`,{style:{fontSize:`var(--ggui-font-size-sm, 14px)`,fontWeight:`var(--ggui-font-weight-medium, 500)`,color:`var(--ggui-color-primary-600, #0284c7)`},children:t})]}),(0,w.jsxs)(`div`,{style:{position:`relative`,height:`20px`,display:`flex`,alignItems:`center`},children:[(0,w.jsx)(`div`,{style:{position:`absolute`,width:`100%`,height:`6px`,borderRadius:`3px`,backgroundColor:`var(--ggui-color-outlineVariant, #e4e4e7)`}}),(0,w.jsx)(`div`,{style:{position:`absolute`,width:`${p}%`,height:`6px`,borderRadius:`3px`,backgroundColor:o?`var(--ggui-color-outline, #d4d4d8)`:`var(--ggui-color-primary-600, #0284c7)`,transition:`width 0.1s`}}),(0,w.jsx)(`input`,{id:d,type:`range`,min:r,max:i,step:a,value:t,onChange:e=>n?.(Number(e.target.value)),disabled:o,"aria-labelledby":e?f:void 0,"aria-label":e?void 0:`Slider`,"aria-valuenow":t,"aria-valuemin":r,"aria-valuemax":i,style:{position:`absolute`,width:`100%`,height:`20px`,margin:0,opacity:0,cursor:o?`not-allowed`:`pointer`,zIndex:1}}),(0,w.jsx)(`div`,{style:{position:`absolute`,left:`calc(${p}% - 10px)`,width:`20px`,height:`20px`,borderRadius:`50%`,backgroundColor:`#ffffff`,border:`2px solid ${o?`var(--ggui-color-outline, #d4d4d8)`:`var(--ggui-color-primary-600, #0284c7)`}`,boxShadow:`var(--ggui-shape-shadow-sm, 0 1px 2px rgba(0,0,0,0.05))`,transition:`left 0.1s`,pointerEvents:`none`}})]})]})}var ff={default:{backgroundColor:`var(--ggui-color-surfaceVariant, #f4f4f5)`,color:`var(--ggui-color-onSurfaceVariant, #52525b)`},primary:{backgroundColor:`var(--ggui-color-primary-100, #e0f2fe)`,color:`var(--ggui-color-primary-700, #0369a1)`},secondary:{backgroundColor:`var(--ggui-color-outlineVariant, #e4e4e7)`,color:`var(--ggui-color-onSurface, #18181b)`},success:{backgroundColor:`var(--ggui-color-success-100, #dcfce7)`,color:`var(--ggui-color-success-700, #15803d)`},warning:{backgroundColor:`var(--ggui-color-warning-100, #fef3c7)`,color:`var(--ggui-color-warning-700, #b45309)`},error:{backgroundColor:`var(--ggui-color-error-100, #fee2e2)`,color:`var(--ggui-color-error-700, #b91c1c)`},info:{backgroundColor:`var(--ggui-color-info-100, #cffafe)`,color:`var(--ggui-color-info-700, #0e7490)`}},pf={sm:{padding:`2px 6px`,fontSize:`var(--ggui-font-size-xs, 12px)`},md:{padding:`2px 8px`,fontSize:`var(--ggui-font-size-xs, 12px)`},lg:{padding:`4px 10px`,fontSize:`var(--ggui-font-size-sm, 14px)`}};function mf({children:e,variant:t=`default`,size:n=`md`,pill:r=!0,style:i,className:a}){return(0,w.jsx)(`span`,{className:a,style:{...ff[t],...pf[n],display:`inline-flex`,alignItems:`center`,justifyContent:`center`,fontWeight:`var(--ggui-font-weight-medium, 500)`,borderRadius:r?`9999px`:`var(--ggui-shape-radius-sm, 4px)`,whiteSpace:`nowrap`,...i},children:e})}var hf=e=>e===void 0?void 0:typeof e==`number`?`${e}px`:e;function gf({variant:e=`rect`,width:t,height:n,radius:r=`sm`,style:i,className:a}){let o=e===`circle`,s=e===`text`,c=hf(t)??(o?`2.5rem`:`100%`),l={display:`block`,width:c,height:hf(n)??(s?`1em`:o?c:`1.25rem`),borderRadius:o?`9999px`:kd(r),backgroundColor:`var(--ggui-color-surfaceVariant, #f4f4f5)`,animation:`ggui-skeleton-pulse 1.5s ease-in-out infinite`,...i};return(0,w.jsx)(`div`,{className:a,style:l,"aria-hidden":`true`,children:(0,w.jsx)(`style`,{children:`@keyframes ggui-skeleton-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }`})})}var _f={xs:24,sm:32,md:40,lg:48,xl:64},vf=[`var(--ggui-color-primary-500, #0ea5e9)`,`var(--ggui-color-success-500, #22c55e)`,`var(--ggui-color-warning-500, #f59e0b)`,`var(--ggui-color-error-500, #ef4444)`,`var(--ggui-color-info-500, #06b6d4)`];function yf({src:e,name:t,size:n=`md`,shape:r=`circle`,style:i,className:a}){let[o,s]=(0,S.useState)(!1),c=typeof n==`number`?n:_f[n]||40,l=t?t.split(` `).map(e=>e[0]).join(``).toUpperCase().slice(0,2):`?`,u=e=>e?vf[e.split(``).reduce((e,t)=>e+t.charCodeAt(0),0)%vf.length]:`var(--ggui-color-outline, #d4d4d8)`,d=!e||o;return(0,w.jsx)(`div`,{role:`img`,"aria-label":t||`Avatar`,className:a,style:{width:c,height:c,borderRadius:r===`circle`?`50%`:`var(--ggui-shape-radius-md, 8px)`,backgroundColor:d?u(t):`transparent`,color:`#ffffff`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:c*.4,fontWeight:`var(--ggui-font-weight-semibold, 600)`,overflow:`hidden`,flexShrink:0,...i},children:d?l:(0,w.jsx)(`img`,{src:e,alt:t||`Avatar`,onError:()=>s(!0),style:{width:`100%`,height:`100%`,objectFit:`cover`}})})}var bf={info:{bg:`var(--ggui-color-info-50, #ecfeff)`,border:`var(--ggui-color-info-200, #a5f3fc)`,text:`var(--ggui-color-info-800, #155e75)`,icon:`var(--ggui-color-info-500, #06b6d4)`},success:{bg:`var(--ggui-color-success-50, #f0fdf4)`,border:`var(--ggui-color-success-200, #bbf7d0)`,text:`var(--ggui-color-success-800, #166534)`,icon:`var(--ggui-color-success-500, #22c55e)`},warning:{bg:`var(--ggui-color-warning-50, #fffbeb)`,border:`var(--ggui-color-warning-200, #fde68a)`,text:`var(--ggui-color-warning-800, #92400e)`,icon:`var(--ggui-color-warning-500, #f59e0b)`},error:{bg:`var(--ggui-color-error-50, #fef2f2)`,border:`var(--ggui-color-error-200, #fecaca)`,text:`var(--ggui-color-error-800, #991b1b)`,icon:`var(--ggui-color-error-500, #ef4444)`}},xf={info:(0,w.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 20 20`,fill:`currentColor`,children:(0,w.jsx)(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z`,clipRule:`evenodd`})}),success:(0,w.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 20 20`,fill:`currentColor`,children:(0,w.jsx)(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z`,clipRule:`evenodd`})}),warning:(0,w.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 20 20`,fill:`currentColor`,children:(0,w.jsx)(`path`,{fillRule:`evenodd`,d:`M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z`,clipRule:`evenodd`})}),error:(0,w.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 20 20`,fill:`currentColor`,children:(0,w.jsx)(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z`,clipRule:`evenodd`})})};function Sf({children:e,variant:t=`info`,title:n,closable:r,onClose:i,icon:a,style:o,className:s}){let c=bf[t];return(0,w.jsxs)(`div`,{role:`alert`,className:s,style:{display:`flex`,gap:`12px`,padding:`12px 16px`,borderRadius:`var(--ggui-shape-radius-lg, 12px)`,backgroundColor:c.bg,border:`1px solid ${c.border}`,color:c.text,...o},children:[(0,w.jsx)(`div`,{style:{color:c.icon,flexShrink:0},children:a||xf[t]}),(0,w.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,gap:`var(--ggui-spacing-1, 4px)`},children:[n&&(0,w.jsx)(`div`,{style:{fontWeight:`var(--ggui-font-weight-semibold, 600)`,fontSize:`var(--ggui-font-size-sm, 14px)`},children:n}),(0,w.jsx)(`div`,{style:{fontSize:`var(--ggui-font-size-sm, 14px)`},children:e})]}),r&&(0,w.jsx)(`button`,{onClick:i,"aria-label":`Close`,style:{background:`none`,border:`none`,padding:`4px`,cursor:`pointer`,color:c.text,opacity:.7,flexShrink:0,lineHeight:0,minWidth:`28px`,minHeight:`28px`,display:`inline-flex`,alignItems:`center`,justifyContent:`center`,borderRadius:`var(--ggui-shape-radius-sm, 4px)`},children:(0,w.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 20 20`,fill:`currentColor`,children:(0,w.jsx)(`path`,{fillRule:`evenodd`,d:`M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z`,clipRule:`evenodd`})})})]})}var Cf={default:`var(--ggui-color-primary-600, #0284c7)`,success:`var(--ggui-color-success-500, #22c55e)`,warning:`var(--ggui-color-warning-500, #f59e0b)`,error:`var(--ggui-color-error-500, #ef4444)`},wf={sm:4,md:8,lg:12};function Tf({value:e,max:t=100,variant:n=`default`,size:r=`md`,label:i,showLabel:a,indeterminate:o,style:s,className:c}){let l=Math.min(100,Math.max(0,e/t*100)),u=wf[r],d=Cf[n],f=i??`Progress`;return(0,w.jsxs)(`div`,{className:c,style:{display:`flex`,flexDirection:`column`,gap:`var(--ggui-spacing-1, 4px)`,...s},children:[a&&(0,w.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,w.jsx)(`span`,{style:{fontSize:`var(--ggui-font-size-sm, 14px)`,color:`var(--ggui-color-onSurfaceVariant, #52525b)`},children:f}),(0,w.jsxs)(`span`,{style:{fontSize:`var(--ggui-font-size-sm, 14px)`,fontWeight:`var(--ggui-font-weight-medium, 500)`,color:`var(--ggui-color-onSurface, #18181b)`},children:[Math.round(l),`%`]})]}),(0,w.jsxs)(`div`,{role:`progressbar`,"aria-valuenow":o?void 0:e,"aria-valuemin":0,"aria-valuemax":t,"aria-label":f,style:{width:`100%`,height:u,borderRadius:u/2,backgroundColor:`var(--ggui-color-outlineVariant, #e4e4e7)`,overflow:`hidden`},children:[(0,w.jsx)(`div`,{style:{height:`100%`,borderRadius:u/2,backgroundColor:d,transition:o?`none`:`width 0.3s ease`,...o?{width:`30%`,animation:`ggui-progress-indeterminate 1.5s ease-in-out infinite`}:{width:`${l}%`}}}),o&&(0,w.jsx)(`style`,{children:`@keyframes ggui-progress-indeterminate {
80
+ 0% { transform: translateX(-100%); }
81
+ 100% { transform: translateX(400%); }
82
+ }`})]})]})}function Ef({src:e,alt:t,width:n,height:r,objectFit:i=`cover`,radius:a,fallback:o,style:s,className:c}){let[l,u]=(0,S.useState)(!1),d=e=>{if(e!==void 0)return typeof e==`number`?`${e}px`:e};return l&&o?(0,w.jsx)(w.Fragment,{children:o}):l?(0,w.jsx)(`div`,{role:`img`,"aria-label":`${t} (failed to load)`,className:c,style:{width:d(n)||`100%`,height:d(r)||`auto`,borderRadius:kd(a),backgroundColor:`var(--ggui-color-surfaceVariant, #f4f4f5)`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`var(--ggui-color-outline, #d4d4d8)`,...s},children:(0,w.jsx)(`svg`,{width:`48`,height:`48`,viewBox:`0 0 24 24`,fill:`currentColor`,children:(0,w.jsx)(`path`,{d:`M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z`})})}):(0,w.jsx)(`img`,{src:e,alt:t,onError:()=>u(!0),className:c,style:{width:d(n)||`100%`,height:d(r)||`auto`,objectFit:i,borderRadius:kd(a),display:`block`,...s}})}var Df={Sun:[[`circle`,{cx:`12`,cy:`12`,r:`4`}],[`path`,{d:`M12 2v2`}],[`path`,{d:`M12 20v2`}],[`path`,{d:`m4.93 4.93 1.41 1.41`}],[`path`,{d:`m17.66 17.66 1.41 1.41`}],[`path`,{d:`M2 12h2`}],[`path`,{d:`M20 12h2`}],[`path`,{d:`m6.34 17.66-1.41 1.41`}],[`path`,{d:`m19.07 4.93-1.41 1.41`}]],Moon:[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`}]],Cloud:[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`}]],CloudRain:[[`path`,{d:`M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242`}],[`path`,{d:`M16 14v6`}],[`path`,{d:`M8 14v6`}],[`path`,{d:`M12 16v6`}]],CloudSnow:[[`path`,{d:`M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242`}],[`path`,{d:`M8 15h.01`}],[`path`,{d:`M8 19h.01`}],[`path`,{d:`M12 17h.01`}],[`path`,{d:`M12 21h.01`}],[`path`,{d:`M16 15h.01`}],[`path`,{d:`M16 19h.01`}]],CloudLightning:[[`path`,{d:`M6 16.326A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 .5 8.973`}],[`path`,{d:`m13 12-3 5h4l-3 5`}]],CloudDrizzle:[[`path`,{d:`M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242`}],[`path`,{d:`M8 19v1`}],[`path`,{d:`M8 14v1`}],[`path`,{d:`M16 19v1`}],[`path`,{d:`M16 14v1`}],[`path`,{d:`M12 21v1`}],[`path`,{d:`M12 16v1`}]],CloudSun:[[`path`,{d:`M12 2v2`}],[`path`,{d:`m4.93 4.93 1.41 1.41`}],[`path`,{d:`M20 12h2`}],[`path`,{d:`m19.07 4.93-1.41 1.41`}],[`path`,{d:`M15.947 12.65a4 4 0 0 0-5.925-4.128`}],[`path`,{d:`M13 22H7a5 5 0 1 1 4.9-6H13a3 3 0 0 1 0 6Z`}]],CloudMoon:[[`path`,{d:`M13 16a3 3 0 0 1 0 6H7a5 5 0 1 1 4.9-6z`}],[`path`,{d:`M18.376 14.512a6 6 0 0 0 3.461-4.127c.148-.625-.659-.97-1.248-.714a4 4 0 0 1-5.259-5.26c.255-.589-.09-1.395-.716-1.248a6 6 0 0 0-4.594 5.36`}]],CloudFog:[[`path`,{d:`M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242`}],[`path`,{d:`M16 17H7`}],[`path`,{d:`M17 21H9`}]],Wind:[[`path`,{d:`M12.8 19.6A2 2 0 1 0 14 16H2`}],[`path`,{d:`M17.5 8a2.5 2.5 0 1 1 2 4H2`}],[`path`,{d:`M9.8 4.4A2 2 0 1 1 11 8H2`}]],Thermometer:[[`path`,{d:`M14 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0Z`}]],Droplets:[[`path`,{d:`M7 16.3c2.2 0 4-1.83 4-4.05 0-1.16-.57-2.26-1.71-3.19S7.29 6.75 7 5.3c-.29 1.45-1.14 2.84-2.29 3.76S3 11.1 3 12.25c0 2.22 1.8 4.05 4 4.05z`}],[`path`,{d:`M12.56 6.6A10.97 10.97 0 0 0 14 3.02c.5 2.5 2 4.9 4 6.5s3 3.5 3 5.5a6.98 6.98 0 0 1-11.91 4.97`}]],Umbrella:[[`path`,{d:`M12 13v7a2 2 0 0 0 4 0`}],[`path`,{d:`M12 2v2`}],[`path`,{d:`M20.992 13a1 1 0 0 0 .97-1.274 10.284 10.284 0 0 0-19.923 0A1 1 0 0 0 3 13z`}]],Snowflake:[[`path`,{d:`m10 20-1.25-2.5L6 18`}],[`path`,{d:`M10 4 8.75 6.5 6 6`}],[`path`,{d:`m14 20 1.25-2.5L18 18`}],[`path`,{d:`m14 4 1.25 2.5L18 6`}],[`path`,{d:`m17 21-3-6h-4`}],[`path`,{d:`m17 3-3 6 1.5 3`}],[`path`,{d:`M2 12h6.5L10 9`}],[`path`,{d:`m20 10-1.5 2 1.5 2`}],[`path`,{d:`M22 12h-6.5L14 15`}],[`path`,{d:`m4 10 1.5 2L4 14`}],[`path`,{d:`m7 21 3-6-1.5-3`}],[`path`,{d:`m7 3 3 6h4`}]],Rainbow:[[`path`,{d:`M22 17a10 10 0 0 0-20 0`}],[`path`,{d:`M6 17a6 6 0 0 1 12 0`}],[`path`,{d:`M10 17a2 2 0 0 1 4 0`}]],Home:[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`}]],ArrowLeft:[[`path`,{d:`m12 19-7-7 7-7`}],[`path`,{d:`M19 12H5`}]],ArrowRight:[[`path`,{d:`M5 12h14`}],[`path`,{d:`m12 5 7 7-7 7`}]],ArrowUp:[[`path`,{d:`m5 12 7-7 7 7`}],[`path`,{d:`M12 19V5`}]],ArrowDown:[[`path`,{d:`M12 5v14`}],[`path`,{d:`m19 12-7 7-7-7`}]],ChevronLeft:[[`path`,{d:`m15 18-6-6 6-6`}]],ChevronRight:[[`path`,{d:`m9 18 6-6-6-6`}]],ChevronUp:[[`path`,{d:`m18 15-6-6-6 6`}]],ChevronDown:[[`path`,{d:`m6 9 6 6 6-6`}]],ChevronsLeft:[[`path`,{d:`m11 17-5-5 5-5`}],[`path`,{d:`m18 17-5-5 5-5`}]],ChevronsRight:[[`path`,{d:`m6 17 5-5-5-5`}],[`path`,{d:`m13 17 5-5-5-5`}]],ChevronsUp:[[`path`,{d:`m17 11-5-5-5 5`}],[`path`,{d:`m17 18-5-5-5 5`}]],ChevronsDown:[[`path`,{d:`m7 6 5 5 5-5`}],[`path`,{d:`m7 13 5 5 5-5`}]],ExternalLink:[[`path`,{d:`M15 3h6v6`}],[`path`,{d:`M10 14 21 3`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`}]],CornerDownLeft:[[`path`,{d:`M20 4v7a4 4 0 0 1-4 4H4`}],[`path`,{d:`m9 10-5 5 5 5`}]],CornerDownRight:[[`path`,{d:`m15 10 5 5-5 5`}],[`path`,{d:`M4 4v7a4 4 0 0 0 4 4h12`}]],MoveHorizontal:[[`path`,{d:`m18 8 4 4-4 4`}],[`path`,{d:`M2 12h20`}],[`path`,{d:`m6 8-4 4 4 4`}]],MoveVertical:[[`path`,{d:`M12 2v20`}],[`path`,{d:`m8 18 4 4 4-4`}],[`path`,{d:`m8 6 4-4 4 4`}]],Plus:[[`path`,{d:`M5 12h14`}],[`path`,{d:`M12 5v14`}]],Minus:[[`path`,{d:`M5 12h14`}]],X:[[`path`,{d:`M18 6 6 18`}],[`path`,{d:`m6 6 12 12`}]],Check:[[`path`,{d:`M20 6 9 17l-5-5`}]],Search:[[`path`,{d:`m21 21-4.34-4.34`}],[`circle`,{cx:`11`,cy:`11`,r:`8`}]],Edit:[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`}]],Trash2:[[`path`,{d:`M10 11v6`}],[`path`,{d:`M14 11v6`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`}],[`path`,{d:`M3 6h18`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`}]],Save:[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`}]],Download:[[`path`,{d:`M12 15V3`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}],[`path`,{d:`m7 10 5 5 5-5`}]],Upload:[[`path`,{d:`M12 3v12`}],[`path`,{d:`m17 8-5-5-5 5`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}]],Share2:[[`circle`,{cx:`18`,cy:`5`,r:`3`}],[`circle`,{cx:`6`,cy:`12`,r:`3`}],[`circle`,{cx:`18`,cy:`19`,r:`3`}],[`line`,{x1:`8.59`,x2:`15.42`,y1:`13.51`,y2:`17.49`}],[`line`,{x1:`15.41`,x2:`8.59`,y1:`6.51`,y2:`10.49`}]],Copy:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`}]],Clipboard:[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`}]],RotateCcw:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`}],[`path`,{d:`M3 3v5h5`}]],RotateCw:[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`}],[`path`,{d:`M21 3v5h-5`}]],RefreshCw:[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`}],[`path`,{d:`M21 3v5h-5`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`}],[`path`,{d:`M8 16H3v5`}]],Undo2:[[`path`,{d:`M9 14 4 9l5-5`}],[`path`,{d:`M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11`}]],Redo2:[[`path`,{d:`m15 14 5-5-5-5`}],[`path`,{d:`M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13`}]],Maximize2:[[`path`,{d:`M15 3h6v6`}],[`path`,{d:`m21 3-7 7`}],[`path`,{d:`m3 21 7-7`}],[`path`,{d:`M9 21H3v-6`}]],Minimize2:[[`path`,{d:`m14 10 7-7`}],[`path`,{d:`M20 10h-6V4`}],[`path`,{d:`m3 21 7-7`}],[`path`,{d:`M4 14h6v6`}]],ZoomIn:[[`circle`,{cx:`11`,cy:`11`,r:`8`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`}],[`line`,{x1:`11`,x2:`11`,y1:`8`,y2:`14`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`}]],ZoomOut:[[`circle`,{cx:`11`,cy:`11`,r:`8`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`}]],Send:[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`}],[`path`,{d:`m21.854 2.147-10.94 10.939`}]],LogIn:[[`path`,{d:`m10 17 5-5-5-5`}],[`path`,{d:`M15 12H3`}],[`path`,{d:`M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4`}]],LogOut:[[`path`,{d:`m16 17 5-5-5-5`}],[`path`,{d:`M21 12H9`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`}]],Heart:[[`path`,{d:`M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5`}]],Star:[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`}]],ThumbsUp:[[`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`}],[`path`,{d:`M7 10v12`}]],ThumbsDown:[[`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`}],[`path`,{d:`M17 14V2`}]],MessageCircle:[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`}]],MessageSquare:[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`}]],Bell:[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`}]],BellOff:[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`}],[`path`,{d:`M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742`}],[`path`,{d:`m2 2 20 20`}],[`path`,{d:`M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05`}]],Mail:[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`}]],Phone:[[`path`,{d:`M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384`}]],PhoneCall:[[`path`,{d:`M13 2a9 9 0 0 1 9 9`}],[`path`,{d:`M13 6a5 5 0 0 1 5 5`}],[`path`,{d:`M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384`}]],Video:[[`path`,{d:`m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5`}],[`rect`,{x:`2`,y:`6`,width:`14`,height:`12`,rx:`2`}]],AtSign:[[`circle`,{cx:`12`,cy:`12`,r:`4`}],[`path`,{d:`M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8`}]],Users:[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`}],[`circle`,{cx:`9`,cy:`7`,r:`4`}]],UserPlus:[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`}],[`circle`,{cx:`9`,cy:`7`,r:`4`}],[`line`,{x1:`19`,x2:`19`,y1:`8`,y2:`14`}],[`line`,{x1:`22`,x2:`16`,y1:`11`,y2:`11`}]],ShoppingCart:[[`circle`,{cx:`8`,cy:`21`,r:`1`}],[`circle`,{cx:`19`,cy:`21`,r:`1`}],[`path`,{d:`M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12`}]],ShoppingBag:[[`path`,{d:`M16 10a4 4 0 0 1-8 0`}],[`path`,{d:`M3.103 6.034h17.794`}],[`path`,{d:`M3.4 5.467a2 2 0 0 0-.4 1.2V20a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6.667a2 2 0 0 0-.4-1.2l-2-2.667A2 2 0 0 0 17 2H7a2 2 0 0 0-1.6.8z`}]],CreditCard:[[`rect`,{width:`20`,height:`14`,x:`2`,y:`5`,rx:`2`}],[`line`,{x1:`2`,x2:`22`,y1:`10`,y2:`10`}]],DollarSign:[[`line`,{x1:`12`,x2:`12`,y1:`2`,y2:`22`}],[`path`,{d:`M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6`}]],Package:[[`path`,{d:`M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z`}],[`path`,{d:`M12 22V12`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`}],[`path`,{d:`m7.5 4.27 9 5.15`}]],Tag:[[`path`,{d:`M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z`}],[`circle`,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`}]],Receipt:[[`path`,{d:`M12 17V7`}],[`path`,{d:`M16 8h-6a2 2 0 0 0 0 4h4a2 2 0 0 1 0 4H8`}],[`path`,{d:`M4 3a1 1 0 0 1 1-1 1.3 1.3 0 0 1 .7.2l.933.6a1.3 1.3 0 0 0 1.4 0l.934-.6a1.3 1.3 0 0 1 1.4 0l.933.6a1.3 1.3 0 0 0 1.4 0l.933-.6a1.3 1.3 0 0 1 1.4 0l.934.6a1.3 1.3 0 0 0 1.4 0l.933-.6A1.3 1.3 0 0 1 19 2a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1 1.3 1.3 0 0 1-.7-.2l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.934.6a1.3 1.3 0 0 1-1.4 0l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-1.4 0l-.934-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-.7.2 1 1 0 0 1-1-1z`}]],Wallet:[[`path`,{d:`M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1`}],[`path`,{d:`M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4`}]],Banknote:[[`rect`,{width:`20`,height:`12`,x:`2`,y:`6`,rx:`2`}],[`circle`,{cx:`12`,cy:`12`,r:`2`}],[`path`,{d:`M6 12h.01M18 12h.01`}]],Percent:[[`line`,{x1:`19`,x2:`5`,y1:`5`,y2:`19`}],[`circle`,{cx:`6.5`,cy:`6.5`,r:`2.5`}],[`circle`,{cx:`17.5`,cy:`17.5`,r:`2.5`}]],Gift:[[`path`,{d:`M12 7v14`}],[`path`,{d:`M20 11v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8`}],[`path`,{d:`M7.5 7a1 1 0 0 1 0-5A4.8 8 0 0 1 12 7a4.8 8 0 0 1 4.5-5 1 1 0 0 1 0 5`}],[`rect`,{x:`3`,y:`7`,width:`18`,height:`4`,rx:`1`}]],Store:[[`path`,{d:`M15 21v-5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v5`}],[`path`,{d:`M17.774 10.31a1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.451 0 1.12 1.12 0 0 0-1.548 0 2.5 2.5 0 0 1-3.452 0 1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.77-3.248l2.889-4.184A2 2 0 0 1 7 2h10a2 2 0 0 1 1.653.873l2.895 4.192a2.5 2.5 0 0 1-3.774 3.244`}],[`path`,{d:`M4 10.95V19a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8.05`}]],Truck:[[`path`,{d:`M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2`}],[`path`,{d:`M15 18H9`}],[`path`,{d:`M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14`}],[`circle`,{cx:`17`,cy:`18`,r:`2`}],[`circle`,{cx:`7`,cy:`18`,r:`2`}]],AlertCircle:[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`}]],AlertTriangle:[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`}],[`path`,{d:`M12 9v4`}],[`path`,{d:`M12 17h.01`}]],Info:[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M12 16v-4`}],[`path`,{d:`M12 8h.01`}]],HelpCircle:[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`}],[`path`,{d:`M12 17h.01`}]],CheckCircle:[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`}],[`path`,{d:`m9 11 3 3L22 4`}]],XCircle:[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`m15 9-6 6`}],[`path`,{d:`m9 9 6 6`}]],Loader:[[`path`,{d:`M12 2v4`}],[`path`,{d:`m16.2 7.8 2.9-2.9`}],[`path`,{d:`M18 12h4`}],[`path`,{d:`m16.2 16.2 2.9 2.9`}],[`path`,{d:`M12 18v4`}],[`path`,{d:`m4.9 19.1 2.9-2.9`}],[`path`,{d:`M2 12h4`}],[`path`,{d:`m4.9 4.9 2.9 2.9`}]],Loader2:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`}]],CircleDot:[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`circle`,{cx:`12`,cy:`12`,r:`1`}]],ShieldCheck:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`}],[`path`,{d:`m9 12 2 2 4-4`}]],ShieldAlert:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`}],[`path`,{d:`M12 8v4`}],[`path`,{d:`M12 16h.01`}]],Ban:[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M4.929 4.929 19.07 19.071`}]],Play:[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`}]],Pause:[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`}]],Square:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}]],SkipBack:[[`path`,{d:`M17.971 4.285A2 2 0 0 1 21 6v12a2 2 0 0 1-3.029 1.715l-9.997-5.998a2 2 0 0 1-.003-3.432z`}],[`path`,{d:`M3 20V4`}]],SkipForward:[[`path`,{d:`M21 4v16`}],[`path`,{d:`M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z`}]],Volume2:[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`}],[`path`,{d:`M16 9a5 5 0 0 1 0 6`}],[`path`,{d:`M19.364 18.364a9 9 0 0 0 0-12.728`}]],VolumeX:[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`}],[`line`,{x1:`22`,x2:`16`,y1:`9`,y2:`15`}],[`line`,{x1:`16`,x2:`22`,y1:`9`,y2:`15`}]],Camera:[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`}],[`circle`,{cx:`12`,cy:`13`,r:`3`}]],Image:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`}],[`circle`,{cx:`9`,cy:`9`,r:`2`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`}]],Film:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M7 3v18`}],[`path`,{d:`M3 7.5h4`}],[`path`,{d:`M3 12h18`}],[`path`,{d:`M3 16.5h4`}],[`path`,{d:`M17 3v18`}],[`path`,{d:`M17 7.5h4`}],[`path`,{d:`M17 16.5h4`}]],Music:[[`path`,{d:`M9 18V5l12-2v13`}],[`circle`,{cx:`6`,cy:`18`,r:`3`}],[`circle`,{cx:`18`,cy:`16`,r:`3`}]],Mic:[[`path`,{d:`M12 19v3`}],[`path`,{d:`M19 10v2a7 7 0 0 1-14 0v-2`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`13`,rx:`3`}]],MicOff:[[`path`,{d:`M12 19v3`}],[`path`,{d:`M15 9.34V5a3 3 0 0 0-5.68-1.33`}],[`path`,{d:`M16.95 16.95A7 7 0 0 1 5 12v-2`}],[`path`,{d:`M18.89 13.23A7 7 0 0 0 19 12v-2`}],[`path`,{d:`m2 2 20 20`}],[`path`,{d:`M9 9v3a3 3 0 0 0 5.12 2.12`}]],Headphones:[[`path`,{d:`M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3`}]],File:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`}]],FileText:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`}],[`path`,{d:`M10 9H8`}],[`path`,{d:`M16 13H8`}],[`path`,{d:`M16 17H8`}]],Folder:[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`}]],FolderOpen:[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`}]],Database:[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`}]],HardDrive:[[`path`,{d:`M10 16h.01`}],[`path`,{d:`M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`}],[`path`,{d:`M21.946 12.013H2.054`}],[`path`,{d:`M6 16h.01`}]],Server:[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`}]],PieChart:[[`path`,{d:`M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z`}],[`path`,{d:`M21.21 15.89A10 10 0 1 1 8 2.83`}]],BarChart3:[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`}],[`path`,{d:`M18 17V9`}],[`path`,{d:`M13 17V5`}],[`path`,{d:`M8 17v-3`}]],LineChart:[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`}],[`path`,{d:`m19 9-5 5-4-4-3 3`}]],TrendingUp:[[`path`,{d:`M16 7h6v6`}],[`path`,{d:`m22 7-8.5 8.5-5-5L2 17`}]],TrendingDown:[[`path`,{d:`M16 17h6v-6`}],[`path`,{d:`m22 17-8.5-8.5-5 5L2 7`}]],Activity:[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`}]],Menu:[[`path`,{d:`M4 5h16`}],[`path`,{d:`M4 12h16`}],[`path`,{d:`M4 19h16`}]],MoreHorizontal:[[`circle`,{cx:`12`,cy:`12`,r:`1`}],[`circle`,{cx:`19`,cy:`12`,r:`1`}],[`circle`,{cx:`5`,cy:`12`,r:`1`}]],MoreVertical:[[`circle`,{cx:`12`,cy:`12`,r:`1`}],[`circle`,{cx:`12`,cy:`5`,r:`1`}],[`circle`,{cx:`12`,cy:`19`,r:`1`}]],Grid:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M3 9h18`}],[`path`,{d:`M3 15h18`}],[`path`,{d:`M9 3v18`}],[`path`,{d:`M15 3v18`}]],List:[[`path`,{d:`M3 5h.01`}],[`path`,{d:`M3 12h.01`}],[`path`,{d:`M3 19h.01`}],[`path`,{d:`M8 5h13`}],[`path`,{d:`M8 12h13`}],[`path`,{d:`M8 19h13`}]],Columns:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M12 3v18`}]],Layout:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M3 9h18`}],[`path`,{d:`M9 21V9`}]],Sidebar:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M9 3v18`}]],PanelLeft:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M9 3v18`}]],PanelRight:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M15 3v18`}]],SlidersHorizontal:[[`path`,{d:`M10 5H3`}],[`path`,{d:`M12 19H3`}],[`path`,{d:`M14 3v4`}],[`path`,{d:`M16 17v4`}],[`path`,{d:`M21 12h-9`}],[`path`,{d:`M21 19h-5`}],[`path`,{d:`M21 5h-7`}],[`path`,{d:`M8 10v4`}],[`path`,{d:`M8 12H3`}]],Filter:[[`path`,{d:`M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z`}]],SortAsc:[[`path`,{d:`m3 8 4-4 4 4`}],[`path`,{d:`M7 4v16`}],[`path`,{d:`M11 12h4`}],[`path`,{d:`M11 16h7`}],[`path`,{d:`M11 20h10`}]],SortDesc:[[`path`,{d:`m3 16 4 4 4-4`}],[`path`,{d:`M7 20V4`}],[`path`,{d:`M11 4h10`}],[`path`,{d:`M11 8h7`}],[`path`,{d:`M11 12h4`}]],Table:[[`path`,{d:`M12 3v18`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M3 9h18`}],[`path`,{d:`M3 15h18`}]],Calendar:[[`path`,{d:`M8 2v4`}],[`path`,{d:`M16 2v4`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`}],[`path`,{d:`M3 10h18`}]],Clock:[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M12 6v6l4 2`}]],Timer:[[`line`,{x1:`10`,x2:`14`,y1:`2`,y2:`2`}],[`line`,{x1:`12`,x2:`15`,y1:`14`,y2:`11`}],[`circle`,{cx:`12`,cy:`14`,r:`8`}]],Hourglass:[[`path`,{d:`M5 22h14`}],[`path`,{d:`M5 2h14`}],[`path`,{d:`M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22`}],[`path`,{d:`M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2`}]],User:[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`}],[`circle`,{cx:`12`,cy:`7`,r:`4`}]],UserCheck:[[`path`,{d:`m16 11 2 2 4-4`}],[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`}],[`circle`,{cx:`9`,cy:`7`,r:`4`}]],Settings:[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`}],[`circle`,{cx:`12`,cy:`12`,r:`3`}]],Sliders:[[`path`,{d:`M10 8h4`}],[`path`,{d:`M12 21v-9`}],[`path`,{d:`M12 8V3`}],[`path`,{d:`M17 16h4`}],[`path`,{d:`M19 12V3`}],[`path`,{d:`M19 21v-5`}],[`path`,{d:`M3 14h4`}],[`path`,{d:`M5 10V3`}],[`path`,{d:`M5 21v-7`}]],Cog:[[`path`,{d:`M11 10.27 7 3.34`}],[`path`,{d:`m11 13.73-4 6.93`}],[`path`,{d:`M12 22v-2`}],[`path`,{d:`M12 2v2`}],[`path`,{d:`M14 12h8`}],[`path`,{d:`m17 20.66-1-1.73`}],[`path`,{d:`m17 3.34-1 1.73`}],[`path`,{d:`M2 12h2`}],[`path`,{d:`m20.66 17-1.73-1`}],[`path`,{d:`m20.66 7-1.73 1`}],[`path`,{d:`m3.34 17 1.73-1`}],[`path`,{d:`m3.34 7 1.73 1`}],[`circle`,{cx:`12`,cy:`12`,r:`2`}],[`circle`,{cx:`12`,cy:`12`,r:`8`}]],MapPin:[[`path`,{d:`M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0`}],[`circle`,{cx:`12`,cy:`10`,r:`3`}]],Map:[[`path`,{d:`M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z`}],[`path`,{d:`M15 5.764v15`}],[`path`,{d:`M9 3.236v15`}]],Globe:[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`}],[`path`,{d:`M2 12h20`}]],Compass:[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z`}]],Link:[[`path`,{d:`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`}],[`path`,{d:`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`}]],Lock:[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`}]],Unlock:[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`}],[`path`,{d:`M7 11V7a5 5 0 0 1 9.9-1`}]],Key:[[`path`,{d:`m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4`}],[`path`,{d:`m21 2-9.6 9.6`}],[`circle`,{cx:`7.5`,cy:`15.5`,r:`5.5`}]],Shield:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`}]],Eye:[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`}]],EyeOff:[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`}],[`path`,{d:`m2 2 20 20`}]],Bookmark:[[`path`,{d:`M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z`}]],Flag:[[`path`,{d:`M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528`}]],Award:[[`path`,{d:`m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526`}],[`circle`,{cx:`12`,cy:`8`,r:`6`}]],Target:[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`circle`,{cx:`12`,cy:`12`,r:`6`}],[`circle`,{cx:`12`,cy:`12`,r:`2`}]],Zap:[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`}]],Flame:[[`path`,{d:`M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4`}]],Coffee:[[`path`,{d:`M10 2v2`}],[`path`,{d:`M14 2v2`}],[`path`,{d:`M16 8a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1`}],[`path`,{d:`M6 2v2`}]],Lightbulb:[[`path`,{d:`M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5`}],[`path`,{d:`M9 18h6`}],[`path`,{d:`M10 22h4`}]],Puzzle:[[`path`,{d:`M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z`}]],Rocket:[[`path`,{d:`M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5`}],[`path`,{d:`M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09`}],[`path`,{d:`M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z`}],[`path`,{d:`M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05`}]],Code:[[`path`,{d:`m16 18 6-6-6-6`}],[`path`,{d:`m8 6-6 6 6 6`}]],Terminal:[[`path`,{d:`M12 19h8`}],[`path`,{d:`m4 17 6-6-6-6`}]],Braces:[[`path`,{d:`M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1`}],[`path`,{d:`M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1`}]],Hash:[[`line`,{x1:`4`,x2:`20`,y1:`9`,y2:`9`}],[`line`,{x1:`4`,x2:`20`,y1:`15`,y2:`15`}],[`line`,{x1:`10`,x2:`8`,y1:`3`,y2:`21`}],[`line`,{x1:`16`,x2:`14`,y1:`3`,y2:`21`}]],Wifi:[[`path`,{d:`M12 20h.01`}],[`path`,{d:`M2 8.82a15 15 0 0 1 20 0`}],[`path`,{d:`M5 12.859a10 10 0 0 1 14 0`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`}]],WifiOff:[[`path`,{d:`M12 20h.01`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`}],[`path`,{d:`M5 12.859a10 10 0 0 1 5.17-2.69`}],[`path`,{d:`M19 12.859a10 10 0 0 0-2.007-1.523`}],[`path`,{d:`M2 8.82a15 15 0 0 1 4.177-2.643`}],[`path`,{d:`M22 8.82a15 15 0 0 0-11.288-3.764`}],[`path`,{d:`m2 2 20 20`}]],Bluetooth:[[`path`,{d:`m7 7 10 10-5 5V2l5 5L7 17`}]],Battery:[[`path`,{d:`M 22 14 L 22 10`}],[`rect`,{x:`2`,y:`6`,width:`16`,height:`12`,rx:`2`}]],BatteryCharging:[[`path`,{d:`m11 7-3 5h4l-3 5`}],[`path`,{d:`M14.856 6H16a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.935`}],[`path`,{d:`M22 14v-4`}],[`path`,{d:`M5.14 18H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h2.936`}]],Power:[[`path`,{d:`M12 2v10`}],[`path`,{d:`M18.4 6.6a9 9 0 1 1-12.77.04`}]],Printer:[[`path`,{d:`M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2`}],[`path`,{d:`M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6`}],[`rect`,{x:`6`,y:`14`,width:`12`,height:`8`,rx:`1`}]],QrCode:[[`rect`,{width:`5`,height:`5`,x:`3`,y:`3`,rx:`1`}],[`rect`,{width:`5`,height:`5`,x:`16`,y:`3`,rx:`1`}],[`rect`,{width:`5`,height:`5`,x:`3`,y:`16`,rx:`1`}],[`path`,{d:`M21 16h-3a2 2 0 0 0-2 2v3`}],[`path`,{d:`M21 21v.01`}],[`path`,{d:`M12 7v3a2 2 0 0 1-2 2H7`}],[`path`,{d:`M3 12h.01`}],[`path`,{d:`M12 3h.01`}],[`path`,{d:`M12 16v.01`}],[`path`,{d:`M16 12h1`}],[`path`,{d:`M21 12v.01`}],[`path`,{d:`M12 21v-1`}]],Fingerprint:[[`path`,{d:`M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4`}],[`path`,{d:`M14 13.12c0 2.38 0 6.38-1 8.88`}],[`path`,{d:`M17.29 21.02c.12-.6.43-2.3.5-3.02`}],[`path`,{d:`M2 12a10 10 0 0 1 18-6`}],[`path`,{d:`M2 16h.01`}],[`path`,{d:`M21.8 16c.2-2 .131-5.354 0-6`}],[`path`,{d:`M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2`}],[`path`,{d:`M8.65 22c.21-.66.45-1.32.57-2`}],[`path`,{d:`M9 6.8a6 6 0 0 1 9 5.2v2`}]],Gauge:[[`path`,{d:`m12 14 4-4`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`}]]},Of=new Map;for(let e of Object.keys(Df))Of.set(e.toLowerCase(),e);function kf(e){if(Df[e])return e;let t=e.replace(/[-_]/g,``).toLowerCase();return Of.get(t)}function Af(e,t,n){return(0,w.jsx)(`svg`,{width:t,height:t,viewBox:`0 0 24 24`,fill:`none`,stroke:n,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:e.map(([e,t],n)=>S.createElement(e,{key:n,...t}))})}function jf({name:e,size:t=24,tone:n,children:r,style:i,className:a,"aria-label":o}){let s=n?q(n):`currentColor`,c=o?{role:`img`,"aria-label":o}:{"aria-hidden":!0},l={display:`inline-flex`,alignItems:`center`,justifyContent:`center`,width:t,height:t,color:s,...i};if(r)return(0,w.jsx)(`span`,{className:a,style:l,...c,children:r});if(e){let n=kf(e);if(n)return(0,w.jsx)(`span`,{className:a,style:l,...c,children:Af(Df[n],t,s)})}return e&&/[^\x00-\x7F]/.test(e)?(0,w.jsx)(`span`,{className:a,...c,style:{...l,fontSize:t*.75,lineHeight:1},children:e}):(0,w.jsx)(`span`,{className:a,...c,style:{...l,backgroundColor:`var(--ggui-color-outlineVariant, #e4e4e7)`,borderRadius:`var(--ggui-shape-radius-sm, 4px)`,color:`var(--ggui-color-outline, #d4d4d8)`,fontSize:t*.5},children:`?`})}function Mf({children:e,href:t,external:n,tone:r,underline:i=`hover`,style:a,className:o,...s}){let c=r?q(r):`var(--ggui-color-primary-600, #0284c7)`,l={always:`underline`,hover:`none`,none:`none`}[i];return(0,w.jsxs)(`a`,{href:t,target:n?`_blank`:void 0,rel:n?`noopener noreferrer`:void 0,className:o,style:{color:c,textDecoration:l,cursor:`pointer`,transition:`color 0.2s`,...a},onMouseEnter:e=>{i===`hover`&&(e.target.style.textDecoration=`underline`)},onMouseLeave:e=>{i===`hover`&&(e.target.style.textDecoration=`none`)},...s,children:[e,n&&(0,w.jsxs)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,style:{marginLeft:`4px`,verticalAlign:`middle`},children:[(0,w.jsx)(`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`}),(0,w.jsx)(`polyline`,{points:`15 3 21 3 21 9`}),(0,w.jsx)(`line`,{x1:`10`,y1:`14`,x2:`21`,y2:`3`})]})]})}function Nf({children:e,content:t,position:n=`top`,delay:r=200,style:i,className:a}){let[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)({top:0,left:0}),u=(0,S.useRef)(null),d=(0,S.useRef)(null),f=()=>{d.current=setTimeout(()=>{s(!0)},r)},p=()=>{d.current&&clearTimeout(d.current),s(!1)};(0,S.useEffect)(()=>{if(o&&u.current){let e=u.current.getBoundingClientRect(),t=0,r=0;switch(n){case`top`:t=e.top-8,r=e.left+e.width/2;break;case`bottom`:t=e.bottom+8,r=e.left+e.width/2;break;case`left`:t=e.top+e.height/2,r=e.left-8;break;case`right`:t=e.top+e.height/2,r=e.right+8}l({top:t,left:r})}},[o,n]),(0,S.useEffect)(()=>()=>{d.current&&clearTimeout(d.current)},[]);let m=()=>{switch(n){case`top`:return`translateX(-50%) translateY(-100%)`;case`bottom`:return`translateX(-50%)`;case`left`:return`translateX(-100%) translateY(-50%)`;case`right`:return`translateY(-50%)`}};return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`div`,{ref:u,onMouseEnter:f,onMouseLeave:p,onFocus:f,onBlur:p,className:a,style:{display:`inline-block`,...i},children:e}),o&&(0,w.jsx)(`div`,{role:`tooltip`,style:{position:`fixed`,top:c.top,left:c.left,transform:m(),backgroundColor:`var(--ggui-color-onSurface, #18181b)`,color:`var(--ggui-color-surface, #ffffff)`,padding:`6px 10px`,borderRadius:`var(--ggui-shape-radius-md, 8px)`,fontSize:`var(--ggui-font-size-xs, 12px)`,zIndex:vd.tooltip,maxWidth:`200px`,pointerEvents:`none`,whiteSpace:`nowrap`},children:t})]})}var Pf=(e,t)=>(0,w.jsxs)(`span`,{"aria-hidden":`true`,style:{display:`inline-flex`,flexDirection:`column`,marginLeft:`4px`,fontSize:`10px`,lineHeight:1,opacity:e?1:.3},children:[(0,w.jsx)(`span`,{style:{opacity:e&&t===`asc`?1:.4},children:`▲`}),(0,w.jsx)(`span`,{style:{opacity:e&&t===`desc`?1:.4},children:`▼`})]});function Ff({columns:e,data:t,sortKey:n,sortDirection:r=`asc`,onSort:i,striped:a=!1,hoverable:o=!0,compact:s=!1,bordered:c=!1,caption:l,style:u,className:d}){let[f,p]=(0,S.useState)(null),m=s?`var(--ggui-spacing-1, 4px) var(--ggui-spacing-2, 8px)`:`var(--ggui-spacing-2, 8px) var(--ggui-spacing-4, 16px)`,h=e=>{i&&i(e,n===e&&r===`asc`?`desc`:`asc`)},g={padding:m,textAlign:`left`,fontWeight:`var(--ggui-font-weight-semibold, 600)`,fontSize:`var(--ggui-font-size-xs, 12px)`,color:`var(--ggui-color-onSurfaceVariant, #52525b)`,textTransform:`uppercase`,letterSpacing:`0.05em`,borderBottom:`2px solid var(--ggui-color-outlineVariant, #e4e4e7)`,whiteSpace:`nowrap`,userSelect:`none`};return(0,w.jsx)(`div`,{className:d,style:{overflowX:`auto`,borderRadius:`var(--ggui-shape-radius-lg, 8px)`,border:c?`1px solid var(--ggui-color-outlineVariant, #e4e4e7)`:void 0,...u},children:(0,w.jsxs)(`table`,{role:`table`,style:{width:`100%`,borderCollapse:`collapse`,fontSize:`var(--ggui-font-size-sm, 14px)`,color:`var(--ggui-color-onSurfaceVariant, #52525b)`},children:[l&&(0,w.jsx)(`caption`,{style:{padding:m,fontSize:`var(--ggui-font-size-sm, 14px)`,color:`var(--ggui-color-onSurfaceVariant, #52525b)`,textAlign:`left`,captionSide:`top`},children:l}),(0,w.jsx)(`thead`,{children:(0,w.jsx)(`tr`,{children:e.map(e=>(0,w.jsx)(`th`,{scope:`col`,"aria-sort":n===e.key?r===`asc`?`ascending`:`descending`:void 0,onClick:e.sortable?()=>h(e.key):void 0,onKeyDown:e.sortable?t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),h(e.key))}:void 0,tabIndex:e.sortable?0:void 0,style:{...g,textAlign:e.align||`left`,width:e.width,cursor:e.sortable?`pointer`:`default`},children:(0,w.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`},children:[e.header,e.sortable&&Pf(n===e.key,r)]})},e.key))})}),(0,w.jsx)(`tbody`,{children:t.map((t,n)=>(0,w.jsx)(`tr`,{onMouseEnter:o?()=>p(n):void 0,onMouseLeave:o?()=>p(null):void 0,style:{backgroundColor:o&&f===n||a&&n%2==1?`var(--ggui-color-surface, #fafafa)`:`transparent`,transition:`background-color 0.15s ease`},children:e.map(e=>(0,w.jsx)(`td`,{style:{padding:m,textAlign:e.align||`left`,borderBottom:`1px solid var(--ggui-color-surfaceVariant, #f4f4f5)`,borderRight:c?`1px solid var(--ggui-color-surfaceVariant, #f4f4f5)`:void 0},children:e.render?e.render(t[e.key],t,n):t[e.key]},e.key))},n))})]})})}var If={sm:{padding:`var(--ggui-spacing-1, 4px) var(--ggui-spacing-2, 8px)`,fontSize:`var(--ggui-font-size-xs, 12px)`},md:{padding:`var(--ggui-spacing-2, 8px) var(--ggui-spacing-4, 16px)`,fontSize:`var(--ggui-font-size-sm, 14px)`},lg:{padding:`var(--ggui-spacing-4, 12px) var(--ggui-spacing-6, 24px)`,fontSize:`var(--ggui-font-size-base, 16px)`}};function Lf({items:e,activeKey:t,onChange:n,variant:r=`line`,size:i=`md`,fullWidth:a=!1,style:o,className:s}){let c=(0,S.useId)(),[l,u]=(0,S.useState)(e[0]?.key),d=t??l,f=(0,S.useCallback)(e=>{n?n(e):u(e)},[n]),p=e.find(e=>e.key===d),m=(0,S.useRef)(null),h=(0,S.useCallback)(t=>{let n=e.filter(e=>!e.disabled),r=n.findIndex(e=>e.key===d),i;if(t.key===`ArrowRight`||t.key===`ArrowDown`?(t.preventDefault(),i=(r+1)%n.length):t.key===`ArrowLeft`||t.key===`ArrowUp`?(t.preventDefault(),i=(r-1+n.length)%n.length):t.key===`Home`?(t.preventDefault(),i=0):t.key===`End`&&(t.preventDefault(),i=n.length-1),i!==void 0){let e=n[i];f(e.key),(m.current?.querySelector(`#${CSS.escape(`${c}-tab-${e.key}`)}`))?.focus()}},[e,d,c,f]),g=(e,t)=>{let n={...If[i],display:`inline-flex`,alignItems:`center`,gap:`var(--ggui-spacing-1, 4px)`,cursor:t?`not-allowed`:`pointer`,opacity:t?.5:1,background:`none`,border:`none`,fontWeight:e?`var(--ggui-font-weight-semibold, 600)`:`var(--ggui-font-weight-medium, 500)`,transition:`color ${X.normal} ${Z.easeInOut}, background-color ${X.normal} ${Z.easeInOut}, border-color ${X.normal} ${Z.easeInOut}`,whiteSpace:`nowrap`,flex:a?1:void 0,justifyContent:a?`center`:void 0};return r===`line`?{...n,color:e?`var(--ggui-color-primary-600, #0284c7)`:`var(--ggui-color-onSurfaceVariant, #52525b)`,borderBottom:e?`2px solid var(--ggui-color-primary-600, #0284c7)`:`2px solid transparent`,marginBottom:`-1px`}:r===`pills`?{...n,color:e?`var(--ggui-color-onPrimary, #ffffff)`:`var(--ggui-color-onSurfaceVariant, #52525b)`,backgroundColor:e?`var(--ggui-color-primary-600, #0284c7)`:`transparent`,borderRadius:`var(--ggui-shape-radius-md, 6px)`}:{...n,color:e?`var(--ggui-color-primary-600, #0284c7)`:`var(--ggui-color-onSurfaceVariant, #52525b)`,backgroundColor:e?`var(--ggui-color-surface, #ffffff)`:`transparent`,border:e?`1px solid var(--ggui-color-outlineVariant, #e4e4e7)`:`1px solid transparent`,borderBottom:e?`1px solid var(--ggui-color-surface, #ffffff)`:`1px solid transparent`,borderRadius:`var(--ggui-shape-radius-md, 6px) var(--ggui-shape-radius-md, 6px) 0 0`,marginBottom:`-1px`}};return(0,w.jsxs)(`div`,{className:s,style:o,children:[(0,w.jsx)(`div`,{ref:m,role:`tablist`,"aria-orientation":`horizontal`,style:{display:`flex`,gap:r===`pills`?`var(--ggui-spacing-1, 4px)`:`0`,borderBottom:r===`line`||r===`enclosed`?`1px solid var(--ggui-color-outlineVariant, #e4e4e7)`:void 0,backgroundColor:r===`pills`?`var(--ggui-color-surfaceVariant, #f4f4f5)`:void 0,borderRadius:r===`pills`?`var(--ggui-shape-radius-lg, 8px)`:void 0,padding:r===`pills`?`var(--ggui-spacing-1, 4px)`:void 0},children:e.map(e=>{let t=e.key===d,n=!!e.disabled;return(0,w.jsxs)(`button`,{role:`tab`,id:`${c}-tab-${e.key}`,"aria-selected":t,"aria-controls":`${c}-panel-${e.key}`,"aria-disabled":n,tabIndex:t?0:-1,onClick:n?void 0:()=>f(e.key),onKeyDown:n?void 0:h,style:g(t,n),children:[e.icon,e.label]},e.key)})}),p&&(0,w.jsx)(`div`,{role:`tabpanel`,id:`${c}-panel-${p.key}`,"aria-labelledby":`${c}-tab-${p.key}`,tabIndex:0,style:{padding:`var(--ggui-spacing-4, 16px) 0`},children:p.content})]})}var Rf={fadeIn:`@keyframes ggui-fadeIn {
83
+ from { opacity: 0; }
84
+ to { opacity: 1; }
85
+ }`,fadeOut:`@keyframes ggui-fadeOut {
86
+ from { opacity: 1; }
87
+ to { opacity: 0; }
88
+ }`,slideInUp:`@keyframes ggui-slideInUp {
89
+ from { opacity: 0; transform: translateY(8px); }
90
+ to { opacity: 1; transform: translateY(0); }
91
+ }`,slideInDown:`@keyframes ggui-slideInDown {
92
+ from { opacity: 0; transform: translateY(-8px); }
93
+ to { opacity: 1; transform: translateY(0); }
94
+ }`,scaleIn:`@keyframes ggui-scaleIn {
95
+ from { opacity: 0; transform: scale(0.95); }
96
+ to { opacity: 1; transform: scale(1); }
97
+ }`,scaleOut:`@keyframes ggui-scaleOut {
98
+ from { opacity: 1; transform: scale(1); }
99
+ to { opacity: 0; transform: scale(0.95); }
100
+ }`,flash:`@keyframes ggui-flash {
101
+ 0%, 15% { background-color: var(--ggui-flash-color, var(--ggui-color-primary-100)); }
102
+ 100% { background-color: transparent; }
103
+ }`,pulse:`@keyframes ggui-pulse {
104
+ 0%, 100% { opacity: 1; }
105
+ 50% { opacity: 0.6; }
106
+ }`,bounce:`@keyframes ggui-bounce {
107
+ 0% { transform: scale(1); }
108
+ 40% { transform: scale(1.06); }
109
+ 70% { transform: scale(0.98); }
110
+ 100% { transform: scale(1); }
111
+ }`},zf={fadeIn:`ggui-fadeIn ${X.normal} ${Z.easeOut} both`,fadeOut:`ggui-fadeOut ${X.normal} ${Z.easeIn} both`,slideInUp:`ggui-slideInUp ${X.normal} ${Z.easeOut} both`,slideInDown:`ggui-slideInDown ${X.normal} ${Z.easeOut} both`,scaleIn:`ggui-scaleIn ${X.normal} ${Z.easeOut} both`,scaleOut:`ggui-scaleOut ${X.fast} ${Z.easeIn} both`,flash:`ggui-flash ${X.slow} ${Z.easeOut}`,pulse:`ggui-pulse 2s ${Z.easeInOut} infinite`,bounce:`ggui-bounce ${X.slow} ${Z.spring}`},Bf={textIn:`@keyframes ggui-thinking-text-in {
112
+ from { opacity: 0; transform: translateY(6px); }
113
+ to { opacity: 1; transform: translateY(0); }
114
+ }`,textOut:`@keyframes ggui-thinking-text-out {
115
+ from { opacity: 1; transform: translateY(0); }
116
+ to { opacity: 0; transform: translateY(-6px); }
117
+ }`,shimmer:`@keyframes ggui-thinking-shimmer {
118
+ 0% { transform: translateX(-100%); }
119
+ 100% { transform: translateX(200%); }
120
+ }`,pulse:`@keyframes ggui-thinking-pulse {
121
+ 0%, 100% { opacity: 0.5; }
122
+ 50% { opacity: 1; }
123
+ }`,wave:`@keyframes ggui-thinking-wave {
124
+ 0% { background-position: -200% 0; }
125
+ 100% { background-position: 200% 0; }
126
+ }`,breathe:`@keyframes ggui-thinking-breathe {
127
+ 0%, 100% { transform: scale(1); opacity: 0.6; }
128
+ 50% { transform: scale(1.02); opacity: 1; }
129
+ }`,cursor:`@keyframes ggui-thinking-cursor {
130
+ 0%, 100% { border-right-color: currentColor; }
131
+ 50% { border-right-color: transparent; }
132
+ }`},Vf={textIn:`ggui-thinking-text-in ${X.slow} ${Z.easeOut} forwards`,textOut:`ggui-thinking-text-out ${X.normal} ${Z.easeIn} forwards`,shimmer:`ggui-thinking-shimmer 3s ${Z.easeInOut} infinite`,pulse:`ggui-thinking-pulse 2s ${Z.easeInOut} infinite`,wave:`ggui-thinking-wave 2s ${Z.linear} infinite`,breathe:`ggui-thinking-breathe 3s ${Z.easeInOut} infinite`,cursor:`ggui-thinking-cursor 1s step-end infinite`};Vf.shimmer,Vf.pulse,Vf.textIn,Vf.textOut,[Bf.shimmer,Bf.pulse,Bf.textIn,Bf.textOut].join(`
133
+ `),Vf.wave,Vf.pulse,Vf.textIn,Vf.textOut,[Bf.wave,Bf.pulse,Bf.textIn,Bf.textOut].join(`
134
+ `),Vf.pulse,Vf.breathe,Vf.textIn,Vf.textOut,[Bf.pulse,Bf.breathe,Bf.textIn,Bf.textOut].join(`
135
+ `),Vf.breathe,Vf.pulse,Vf.textIn,Vf.textOut,[Bf.breathe,Bf.pulse,Bf.textIn,Bf.textOut].join(`
136
+ `),Vf.pulse,`${X.normal}${Z.easeOut}`,`${X.fast}${Z.easeIn}`,[Bf.pulse,Rf.fadeIn,Rf.fadeOut].join(`
137
+ `);var Hf=`@media (prefers-reduced-motion: reduce) {
138
+ *, *::before, *::after {
139
+ animation-duration: 0.01ms !important;
140
+ animation-iteration-count: 1 !important;
141
+ transition-duration: 0.01ms !important;
142
+ }
143
+ }`,Uf={info:{bg:`var(--ggui-color-info-50, #ecfeff)`,border:`var(--ggui-color-info-200, #a5f3fc)`,text:`var(--ggui-color-info-800, #155e75)`,icon:`var(--ggui-color-info-500, #06b6d4)`},success:{bg:`var(--ggui-color-success-50, #f0fdf4)`,border:`var(--ggui-color-success-200, #bbf7d0)`,text:`var(--ggui-color-success-800, #166534)`,icon:`var(--ggui-color-success-500, #22c55e)`},warning:{bg:`var(--ggui-color-warning-50, #fffbeb)`,border:`var(--ggui-color-warning-200, #fde68a)`,text:`var(--ggui-color-warning-800, #92400e)`,icon:`var(--ggui-color-warning-500, #f59e0b)`},error:{bg:`var(--ggui-color-error-50, #fef2f2)`,border:`var(--ggui-color-error-200, #fecaca)`,text:`var(--ggui-color-error-800, #991b1b)`,icon:`var(--ggui-color-error-500, #ef4444)`}},Wf={info:(0,w.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 20 20`,fill:`currentColor`,children:(0,w.jsx)(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z`,clipRule:`evenodd`})}),success:(0,w.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 20 20`,fill:`currentColor`,children:(0,w.jsx)(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z`,clipRule:`evenodd`})}),warning:(0,w.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 20 20`,fill:`currentColor`,children:(0,w.jsx)(`path`,{fillRule:`evenodd`,d:`M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z`,clipRule:`evenodd`})}),error:(0,w.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 20 20`,fill:`currentColor`,children:(0,w.jsx)(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z`,clipRule:`evenodd`})})};function Gf({message:e,variant:t=`info`,title:n,duration:r=5e3,onClose:i,visible:a=!0,style:o,className:s}){if((0,S.useEffect)(()=>{if(!a||r===0||!i)return;let e=setTimeout(i,r);return()=>clearTimeout(e)},[a,r,i]),!a)return(0,w.jsx)(`div`,{role:`alert`,"aria-live":`assertive`,className:s,style:{position:`absolute`,width:`1px`,height:`1px`,overflow:`hidden`,clipPath:`inset(50%)`,whiteSpace:`nowrap`}});let c=Uf[t],l={display:`flex`,alignItems:`flex-start`,gap:`var(--ggui-spacing-2, 8px)`,padding:`var(--ggui-spacing-2, 12px) var(--ggui-spacing-4, 16px)`,borderRadius:`var(--ggui-shape-radius-lg, 8px)`,backgroundColor:c.bg,border:`1px solid ${c.border}`,color:c.text,boxShadow:`var(--ggui-shape-shadow-lg, 0 10px 15px -3px rgba(0,0,0,0.1))`,minWidth:`280px`,maxWidth:`420px`,animation:zf.slideInUp,...o};return(0,w.jsxs)(`div`,{role:`alert`,"aria-live":`assertive`,className:s,style:l,children:[(0,w.jsx)(`div`,{style:{color:c.icon,flexShrink:0,marginTop:`2px`},children:Wf[t]}),(0,w.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,gap:`2px`},children:[n&&(0,w.jsx)(`div`,{style:{fontWeight:`var(--ggui-font-weight-semibold, 600)`,fontSize:`var(--ggui-font-size-sm, 14px)`},children:n}),(0,w.jsx)(`div`,{style:{fontSize:`var(--ggui-font-size-sm, 14px)`},children:e})]}),i&&(0,w.jsx)(`button`,{onClick:i,"aria-label":`Dismiss notification`,style:{background:`none`,border:`none`,padding:`4px`,cursor:`pointer`,color:c.text,opacity:.7,flexShrink:0,lineHeight:0,minWidth:`28px`,minHeight:`28px`,display:`inline-flex`,alignItems:`center`,justifyContent:`center`,borderRadius:`var(--ggui-shape-radius-sm, 4px)`},children:(0,w.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 20 20`,fill:`currentColor`,children:(0,w.jsx)(`path`,{fillRule:`evenodd`,d:`M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z`,clipRule:`evenodd`})})})]})}var Kf=e=>(0,w.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 20 20`,fill:`currentColor`,"aria-hidden":`true`,style:{transition:`transform ${X.normal} ${Z.easeInOut}`,transform:e?`rotate(180deg)`:`rotate(0deg)`,flexShrink:0},children:(0,w.jsx)(`path`,{fillRule:`evenodd`,d:`M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z`,clipRule:`evenodd`})});function qf({items:e,expandedKeys:t,onChange:n,multiple:r=!1,variant:i=`default`,style:a,className:o}){let s=(0,S.useId)(),[c,l]=(0,S.useState)([]),u=t??c,d=e=>{let t;t=u.includes(e)?u.filter(t=>t!==e):r?[...u,e]:[e],n?n(t):l(t)},f={display:`flex`,flexDirection:`column`,gap:i===`separated`?`var(--ggui-spacing-2, 8px)`:`0`,...a},p=(e,t)=>i===`separated`?{border:`1px solid var(--ggui-color-outlineVariant, #e4e4e7)`,borderRadius:`var(--ggui-shape-radius-lg, 8px)`,overflow:`hidden`}:i===`bordered`?{borderLeft:`1px solid var(--ggui-color-outlineVariant, #e4e4e7)`,borderRight:`1px solid var(--ggui-color-outlineVariant, #e4e4e7)`,borderTop:e?`1px solid var(--ggui-color-outlineVariant, #e4e4e7)`:void 0,borderBottom:`1px solid var(--ggui-color-outlineVariant, #e4e4e7)`,borderTopLeftRadius:e?`var(--ggui-shape-radius-lg, 8px)`:void 0,borderTopRightRadius:e?`var(--ggui-shape-radius-lg, 8px)`:void 0,borderBottomLeftRadius:t?`var(--ggui-shape-radius-lg, 8px)`:void 0,borderBottomRightRadius:t?`var(--ggui-shape-radius-lg, 8px)`:void 0}:{borderBottom:`1px solid var(--ggui-color-outlineVariant, #e4e4e7)`,borderTop:e?`1px solid var(--ggui-color-outlineVariant, #e4e4e7)`:void 0};return(0,w.jsx)(`div`,{className:o,style:f,children:e.map((t,n)=>{let r=u.includes(t.key),i=!!t.disabled,a=n===0,o=n===e.length-1;return(0,w.jsxs)(`div`,{style:p(a,o),children:[(0,w.jsx)(`h3`,{style:{margin:0},children:(0,w.jsxs)(`button`,{id:`${s}-header-${t.key}`,"aria-expanded":r,"aria-controls":`${s}-panel-${t.key}`,"aria-disabled":i,onClick:i?void 0:()=>d(t.key),style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,width:`100%`,padding:`var(--ggui-spacing-2, 12px) var(--ggui-spacing-4, 16px)`,background:`none`,border:`none`,cursor:i?`not-allowed`:`pointer`,opacity:i?.5:1,fontSize:`var(--ggui-font-size-sm, 14px)`,fontWeight:`var(--ggui-font-weight-medium, 500)`,color:`var(--ggui-color-onSurface, #18181b)`,textAlign:`left`,transition:`background-color ${X.fast} ${Z.easeInOut}`},children:[(0,w.jsx)(`span`,{children:t.title}),Kf(r)]})}),(0,w.jsx)(`div`,{id:`${s}-panel-${t.key}`,role:`region`,"aria-labelledby":`${s}-header-${t.key}`,hidden:!r,style:{overflow:`hidden`},children:r&&(0,w.jsx)(`div`,{style:{padding:`0 var(--ggui-spacing-4, 16px) var(--ggui-spacing-4, 16px)`,fontSize:`var(--ggui-font-size-sm, 14px)`,color:`var(--ggui-color-onSurfaceVariant, #52525b)`,lineHeight:`var(--ggui-font-lineHeight-normal, 1.5)`},children:t.content})})]},t.key)})})}var Jf=`ggui-motion-keyframes`;function Yf(){return(0,S.useEffect)(()=>{if(document.getElementById(Jf))return;let e=document.createElement(`style`);return e.id=Jf,e.textContent=[...Object.values(Rf),Hf].join(`
144
+
145
+ `),document.head.appendChild(e),()=>{e.remove()}},[]),null}function Xf(){let[e,t]=(0,S.useState)(()=>typeof window>`u`||!window.matchMedia(`(prefers-reduced-motion: reduce)`).matches);return(0,S.useEffect)(()=>{let e=window.matchMedia(`(prefers-reduced-motion: reduce)`),n=e=>t(!e.matches);return e.addEventListener(`change`,n),()=>e.removeEventListener(`change`,n)},[]),{motionEnabled:e}}function Zf(e){let[t,n]=(0,S.useState)(0),r=(0,S.useRef)(!0);return(0,S.useEffect)(()=>{if(r.current){r.current=!1;return}n(e=>e+1)},[e]),t}var Qf={};Le(Qf,{Autocomplete:()=>fp,Breadcrumb:()=>pp,Dropdown:()=>dp,EmptyState:()=>hp,FormField:()=>op,Markdown:()=>Gp,MarkdownInline:()=>Kp,MenuItem:()=>sp,Pagination:()=>mp,SearchField:()=>ap,Stat:()=>gp,Stepper:()=>Sp,Tag:()=>up,renderRichTextInlines:()=>Up});var $f={50:`#f0f9ff`,100:`#e0f2fe`,200:`#bae6fd`,300:`#7dd3fc`,400:`#38bdf8`,500:`#0ea5e9`,600:`#0284c7`,700:`#0369a1`,800:`#075985`,900:`#0c4a6e`},ep={50:`#f9fafb`,100:`#f3f4f6`,200:`#e5e7eb`,300:`#d1d5db`,400:`#9ca3af`,500:`#6b7280`,600:`#4b5563`,700:`#374151`,800:`#1f2937`,900:`#111827`},tp={50:`#f0fdf4`,100:`#dcfce7`,200:`#bbf7d0`,300:`#86efac`,400:`#4ade80`,500:`#22c55e`,600:`#16a34a`,700:`#15803d`,800:`#166534`,900:`#14532d`},np={50:`#fffbeb`,100:`#fef3c7`,200:`#fde68a`,300:`#fcd34d`,400:`#fbbf24`,500:`#f59e0b`,600:`#d97706`,700:`#b45309`,800:`#92400e`,900:`#78350f`},rp={50:`#fef2f2`,100:`#fee2e2`,200:`#fecaca`,300:`#fca5a5`,400:`#f87171`,500:`#ef4444`,600:`#dc2626`,700:`#b91c1c`,800:`#991b1b`,900:`#7f1d1d`},ip={50:`#ecfeff`,100:`#cffafe`,200:`#a5f3fc`,300:`#67e8f9`,400:`#22d3ee`,500:`#06b6d4`,600:`#0891b2`,700:`#0e7490`,800:`#155e75`,900:`#164e63`},Q={primary:$f,gray:ep,success:tp,warning:np,error:rp,info:ip,semantic:{textPrimary:ep[900],textSecondary:ep[600],textMuted:ep[400],textInverse:`#ffffff`,bgPrimary:`#ffffff`,bgSecondary:ep[50],bgTertiary:ep[100],bgInverse:ep[900],borderLight:ep[200],borderDefault:ep[300],borderDark:ep[400],focus:$f[500],hover:$f[50],active:$f[100],disabled:ep[300],success:tp[500],warning:np[500],error:rp[500],info:ip[500]},white:`#ffffff`,black:`#000000`,transparent:`transparent`};function ap({value:e,onChange:t,onSearch:n,placeholder:r=`Search...`,showButton:i=!1,buttonText:a=`Search`,loading:o,disabled:s,size:c=`md`,style:l,className:u}){let[d,f]=(0,S.useState)(``),p=e===void 0?d:e,m=n=>{e===void 0&&f(n),t?.(n)},h=()=>{n?.(p)},g=e=>{e.key===`Enter`&&!s&&h()},_={sm:`sm`,md:`md`,lg:`md`};return(0,w.jsxs)(`div`,{className:u,style:{display:`flex`,gap:`8px`,alignItems:`flex-end`,...l},children:[(0,w.jsxs)(`div`,{style:{position:`relative`,flex:1},children:[(0,w.jsx)(`div`,{style:{position:`absolute`,left:`12px`,top:`50%`,transform:`translateY(-50%)`,color:Q.gray[400],pointerEvents:`none`,display:`flex`,alignItems:`center`},children:o?(0,w.jsx)(Zd,{size:16}):(0,w.jsx)(jf,{name:`search`,size:16})}),(0,w.jsx)(`input`,{type:`search`,value:p,onChange:e=>m(e.target.value),onKeyDown:g,placeholder:r,disabled:s||o,style:{width:`100%`,padding:c===`sm`?`6px 10px 6px 36px`:c===`lg`?`12px 14px 12px 40px`:`10px 12px 10px 38px`,paddingLeft:`36px`,fontSize:c===`lg`?`16px`:`14px`,borderRadius:`6px`,border:`1px solid ${Q.gray[300]}`,backgroundColor:s?Q.gray[50]:Q.white,color:Q.gray[900],outline:`none`,boxSizing:`border-box`}})]}),i&&(0,w.jsx)(ef,{onClick:h,disabled:s||o,size:_[c],loading:o,children:a})]})}function op({label:e,children:t,error:n,helperText:r,required:i,description:a,style:o,className:s}){let c=!!n;return(0,w.jsxs)(`div`,{className:s,style:{display:`flex`,flexDirection:`column`,gap:`4px`,...o},children:[(0,w.jsxs)(`label`,{style:{fontSize:J.sm,fontWeight:Y.medium,color:Q.gray[700]},children:[e,i&&(0,w.jsx)(`span`,{style:{color:Q.error[500],marginLeft:`2px`},children:`*`})]}),a&&(0,w.jsx)(`span`,{style:{fontSize:J.xs,color:Q.gray[500],marginBottom:`4px`},children:a}),t,(n||r)&&(0,w.jsx)(`span`,{style:{fontSize:J.xs,color:c?Q.error[500]:Q.gray[500]},children:n||r})]})}function sp({label:e,icon:t,rightElement:n,onClick:r,disabled:i,active:a,danger:o,style:s,className:c}){let l=o?Q.error[600]:Q.gray[700],u=o?Q.error[50]:Q.gray[100],d=o?Q.error[100]:Q.primary[50];return(0,w.jsxs)(`button`,{onClick:i?void 0:r,disabled:i,className:c,style:{display:`flex`,alignItems:`center`,gap:`8px`,width:`100%`,padding:`8px 12px`,border:`none`,borderRadius:gd.md,backgroundColor:a?d:`transparent`,color:i?Q.gray[400]:l,fontSize:J.sm,fontWeight:a?Y.medium:Y.normal,textAlign:`left`,cursor:i?`not-allowed`:`pointer`,transition:`background-color 0.15s`,...s},onMouseEnter:e=>{!i&&!a&&(e.target.style.backgroundColor=u)},onMouseLeave:e=>{!i&&!a&&(e.target.style.backgroundColor=`transparent`)},children:[t&&(0,w.jsx)(`span`,{style:{display:`flex`,flexShrink:0},children:t}),(0,w.jsx)(`span`,{style:{flex:1},children:e}),n&&(0,w.jsx)(`span`,{style:{display:`flex`,flexShrink:0,color:Q.gray[400]},children:n})]})}var cp={default:{backgroundColor:Q.gray[100],color:Q.gray[700],border:`1px solid ${Q.gray[200]}`},primary:{backgroundColor:Q.primary[50],color:Q.primary[700],border:`1px solid ${Q.primary[200]}`},success:{backgroundColor:Q.success[50],color:Q.success[700],border:`1px solid ${Q.success[200]}`},warning:{backgroundColor:Q.warning[50],color:Q.warning[700],border:`1px solid ${Q.warning[200]}`},error:{backgroundColor:Q.error[50],color:Q.error[700],border:`1px solid ${Q.error[200]}`},info:{backgroundColor:Q.info[50],color:Q.info[700],border:`1px solid ${Q.info[200]}`}},lp={sm:{padding:`2px 6px`,fontSize:J.xs,gap:`4px`},md:{padding:`4px 8px`,fontSize:J.xs,gap:`6px`},lg:{padding:`6px 10px`,fontSize:J.sm,gap:`6px`}};function up({children:e,variant:t=`default`,size:n=`md`,closable:r,onClose:i,icon:a,style:o,className:s}){let c=lp[n];return(0,w.jsxs)(`span`,{className:s,style:{display:`inline-flex`,alignItems:`center`,gap:c.gap,padding:c.padding,fontSize:c.fontSize,fontWeight:Y.medium,borderRadius:`6px`,...cp[t],...o},children:[a&&(0,w.jsx)(`span`,{style:{display:`flex`},children:a}),e,r&&(0,w.jsx)(`button`,{onClick:i,style:{display:`flex`,alignItems:`center`,justifyContent:`center`,padding:0,border:`none`,background:`none`,color:`inherit`,cursor:`pointer`,opacity:.7,marginLeft:`2px`},"aria-label":`Remove`,children:(0,w.jsx)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 12 12`,fill:`currentColor`,children:(0,w.jsx)(`path`,{d:`M9.5 3.205L8.795 2.5 6 5.295 3.205 2.5l-.705.705L5.295 6 2.5 8.795l.705.705L6 6.705 8.795 9.5l.705-.705L6.705 6 9.5 3.205z`})})})]})}function dp({trigger:e,options:t,value:n,onChange:r,placement:i=`bottom-start`,disabled:a,style:o,className:s}){let[c,l]=(0,S.useState)(!1),u=(0,S.useRef)(null);(0,S.useEffect)(()=>{let e=e=>{u.current&&!u.current.contains(e.target)&&l(!1)};if(c)return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[c]),(0,S.useEffect)(()=>{let e=e=>{e.key===`Escape`&&l(!1)};if(c)return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[c]);let d=e=>{r?.(e),l(!1)},f=()=>{switch(i){case`bottom-start`:return{top:`100%`,left:0,marginTop:`4px`};case`bottom-end`:return{top:`100%`,right:0,marginTop:`4px`};case`top-start`:return{bottom:`100%`,left:0,marginBottom:`4px`};case`top-end`:return{bottom:`100%`,right:0,marginBottom:`4px`};default:return{top:`100%`,left:0,marginTop:`4px`}}};return(0,w.jsxs)(`div`,{ref:u,className:s,style:{position:`relative`,display:`inline-block`,...o},children:[(0,w.jsx)(`div`,{onClick:()=>!a&&l(!c),style:{cursor:a?`not-allowed`:`pointer`},children:e}),c&&(0,w.jsx)(`div`,{style:{position:`absolute`,...f(),minWidth:`160px`,backgroundColor:Q.white,border:`1px solid ${Q.gray[200]}`,borderRadius:gd.lg,boxShadow:_d.lg,zIndex:vd.dropdown,padding:`4px`},children:t.map(e=>(0,w.jsx)(sp,{label:e.label,icon:e.icon,onClick:()=>d(e.value),disabled:e.disabled,active:n===e.value,danger:e.danger},e.value))})]})}function fp({value:e=``,onChange:t,onSelect:n,options:r,placeholder:i,label:a,loading:o,disabled:s,error:c,noResultsText:l=`No results found`,style:u,className:d}){let[f,p]=(0,S.useState)(!1),[m,h]=(0,S.useState)(-1),g=(0,S.useRef)(null),_=(0,S.useMemo)(()=>{if(!e)return r;let t=e.toLowerCase();return r.filter(e=>e.label.toLowerCase().includes(t)||e.value.toLowerCase().includes(t))},[r,e]);(0,S.useEffect)(()=>{let e=e=>{g.current&&!g.current.contains(e.target)&&p(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[]);let v=e=>{t?.(e),p(!0),h(-1)},y=e=>{t?.(e.label),n?.(e),p(!1),h(-1)},b=e=>{if(!f){(e.key===`ArrowDown`||e.key===`ArrowUp`)&&p(!0);return}switch(e.key){case`ArrowDown`:e.preventDefault(),h(e=>e<_.length-1?e+1:e);break;case`ArrowUp`:e.preventDefault(),h(e=>e>0?e-1:e);break;case`Enter`:e.preventDefault(),m>=0&&_[m]&&y(_[m]);break;case`Escape`:p(!1),h(-1)}};return(0,w.jsxs)(`div`,{ref:g,className:d,style:{position:`relative`,...u},children:[(0,w.jsx)(`div`,{onKeyDown:b,children:(0,w.jsx)(nf,{label:a,value:e,onChange:v,onFocus:()=>p(!0),placeholder:i,disabled:s,error:c})}),f&&(0,w.jsx)(`div`,{style:{position:`absolute`,top:`100%`,left:0,right:0,marginTop:`4px`,backgroundColor:Q.white,border:`1px solid ${Q.gray[200]}`,borderRadius:gd.lg,boxShadow:_d.lg,zIndex:vd.dropdown,maxHeight:`240px`,overflow:`auto`},children:o?(0,w.jsx)(`div`,{style:{padding:`12px`,display:`flex`,justifyContent:`center`},children:(0,w.jsx)(Zd,{size:20})}):_.length===0?(0,w.jsx)(`div`,{style:{padding:`12px`,textAlign:`center`,color:Q.gray[500],fontSize:J.sm},children:l}):_.map((e,t)=>(0,w.jsxs)(`div`,{onClick:()=>!e.disabled&&y(e),style:{padding:`8px 12px`,cursor:e.disabled?`not-allowed`:`pointer`,backgroundColor:m===t?Q.gray[100]:`transparent`,color:e.disabled?Q.gray[400]:Q.gray[900],fontSize:J.sm,display:`flex`,alignItems:`center`,gap:`8px`},onMouseEnter:()=>h(t),children:[e.icon&&(0,w.jsx)(`span`,{style:{flexShrink:0},children:e.icon}),(0,w.jsxs)(`div`,{style:{flex:1},children:[(0,w.jsx)(`div`,{children:e.label}),e.description&&(0,w.jsx)(`div`,{style:{fontSize:J.xs,color:Q.gray[500]},children:e.description})]})]},e.value))})]})}function pp({items:e,separator:t=`/`,onItemClick:n,style:r,className:i}){return(0,w.jsx)(`nav`,{"aria-label":`Breadcrumb`,className:i,style:{display:`flex`,alignItems:`center`,gap:`8px`,fontSize:J.sm,...r},children:e.map((r,i)=>{let a=i===e.length-1;return(0,w.jsxs)(S.Fragment,{children:[i>0&&(0,w.jsx)(`span`,{style:{color:Q.gray[400]},children:t}),r.icon&&(0,w.jsx)(`span`,{style:{display:`flex`,alignItems:`center`,color:a?Q.gray[900]:Q.gray[500]},children:r.icon}),a?(0,w.jsx)(`span`,{style:{color:Q.gray[900],fontWeight:500},"aria-current":`page`,children:r.label}):r.href?(0,w.jsx)(Mf,{href:r.href,tone:`muted`,underline:`hover`,onClick:e=>{n&&(e.preventDefault(),n(r,i))},children:r.label}):(0,w.jsx)(`button`,{onClick:()=>n?.(r,i),style:{background:`none`,border:`none`,padding:0,color:Q.gray[500],cursor:`pointer`,fontSize:`inherit`},children:r.label})]},i)})})}function mp({currentPage:e,totalPages:t,onPageChange:n,showFirstLast:r=!0,maxVisible:i=5,size:a=`md`,disabled:o,style:s,className:c}){let l=()=>{let n=[];if(t<=i)for(let e=1;e<=t;e++)n.push(e);else{n.push(1);let r=Math.floor((i-3)/2),a=Math.max(2,e-r),o=Math.min(t-1,e+r);e<=r+2&&(o=Math.min(t-1,i-2)),e>=t-r-1&&(a=Math.max(2,t-i+3)),a>2&&n.push(`ellipsis`);for(let e=a;e<=o;e++)n.push(e);o<t-1&&n.push(`ellipsis`),n.push(t)}return n},u=a===`sm`?`xs`:a===`lg`?`md`:`sm`,d=a===`sm`?14:a===`lg`?20:16,f=({page:e,active:t})=>(0,w.jsx)(`button`,{onClick:()=>!o&&n?.(e),disabled:o,style:{minWidth:a===`sm`?`28px`:a===`lg`?`40px`:`32px`,height:a===`sm`?`28px`:a===`lg`?`40px`:`32px`,padding:`0 8px`,border:`none`,borderRadius:`6px`,backgroundColor:t?Q.primary[600]:`transparent`,color:t?Q.white:Q.gray[700],fontSize:a===`sm`?J.xs:J.sm,fontWeight:t?Y.medium:Y.normal,cursor:o?`not-allowed`:`pointer`,opacity:o?.5:1,transition:`all 0.15s`},children:e});return(0,w.jsxs)(`nav`,{"aria-label":`Pagination`,className:c,style:{display:`flex`,alignItems:`center`,gap:`4px`,...s},children:[r&&(0,w.jsxs)(ef,{variant:`ghost`,size:u,onClick:()=>n?.(1),disabled:o||e===1,"aria-label":`First page`,children:[(0,w.jsx)(jf,{name:`chevron-left`,size:d}),(0,w.jsx)(jf,{name:`chevron-left`,size:d,style:{marginLeft:`-8px`}})]}),(0,w.jsx)(ef,{variant:`ghost`,size:u,onClick:()=>n?.(e-1),disabled:o||e===1,"aria-label":`Previous page`,children:(0,w.jsx)(jf,{name:`chevron-left`,size:d})}),l().map((t,n)=>t===`ellipsis`?(0,w.jsx)(`span`,{style:{padding:`0 4px`,color:Q.gray[400]},children:`...`},`ellipsis-${n}`):(0,w.jsx)(f,{page:t,active:t===e},t)),(0,w.jsx)(ef,{variant:`ghost`,size:u,onClick:()=>n?.(e+1),disabled:o||e===t,"aria-label":`Next page`,children:(0,w.jsx)(jf,{name:`chevron-right`,size:d})}),r&&(0,w.jsxs)(ef,{variant:`ghost`,size:u,onClick:()=>n?.(t),disabled:o||e===t,"aria-label":`Last page`,children:[(0,w.jsx)(jf,{name:`chevron-right`,size:d}),(0,w.jsx)(jf,{name:`chevron-right`,size:d,style:{marginLeft:`-8px`}})]})]})}function hp({icon:e,title:t,description:n,action:r,style:i,className:a}){let o={textAlign:`center`,padding:`var(--ggui-spacing-xl, 32px)`,...i};return(0,w.jsxs)(Pd,{align:`center`,gap:`sm`,className:a,style:o,children:[e!==void 0&&(typeof e==`string`?(0,w.jsx)(jf,{name:e,size:40,tone:`subtle`}):e),(0,w.jsx)(Xd,{level:3,children:t}),n!==void 0&&(0,w.jsx)(Kd,{tone:`muted`,children:n}),r!==void 0&&(0,w.jsx)(`div`,{style:{marginTop:`var(--ggui-spacing-sm, 8px)`},children:r})]})}function gp({label:e,value:t,delta:n,trend:r=`neutral`,icon:i,style:a,className:o}){let s=r===`up`?`success`:r===`down`?`error`:`muted`;return(0,w.jsxs)(Pd,{gap:`xs`,className:o,style:a,children:[(0,w.jsxs)(Fd,{gap:`xs`,align:`center`,children:[i!==void 0&&(typeof i==`string`?(0,w.jsx)(jf,{name:i,size:16,tone:`muted`}):i),(0,w.jsx)(Kd,{size:`xs`,weight:`semibold`,caps:!0,tone:`muted`,children:e})]}),(0,w.jsxs)(Fd,{gap:`sm`,align:`end`,children:[(0,w.jsx)(Kd,{size:`3xl`,weight:`bold`,children:t}),n!==void 0&&(0,w.jsx)(Kd,{size:`sm`,weight:`semibold`,tone:s,children:n})]})]})}var _p=28;function vp(e,t){return e<t?`completed`:e===t?`current`:`upcoming`}var yp={completed:{backgroundColor:`var(--ggui-color-primary-100, #e0f2fe)`,border:`1px solid var(--ggui-color-primary-300, #7dd3fc)`,color:`var(--ggui-color-primary-700, #0369a1)`},current:{backgroundColor:`var(--ggui-color-primary-600, #0284c7)`,border:`1px solid var(--ggui-color-primary-600, #0284c7)`,color:`var(--ggui-color-onPrimary, #ffffff)`},upcoming:{backgroundColor:`var(--ggui-color-surface, #fafafa)`,border:`1px solid var(--ggui-color-outline, #d4d4d8)`,color:`var(--ggui-color-onSurfaceVariant, #52525b)`}};function bp({index:e,state:t}){return(0,w.jsx)(`span`,{"aria-hidden":`true`,style:{width:_p,height:_p,borderRadius:`50%`,display:`inline-flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0,boxSizing:`border-box`,transition:`background-color 0.2s, border-color 0.2s, color 0.2s`,...yp[t]},children:t===`completed`?(0,w.jsx)(jf,{name:`check`,size:16,tone:`inherit`}):(0,w.jsx)(Kd,{is:`span`,size:`sm`,weight:`semibold`,tone:`inherit`,children:e+1})})}function xp({label:e,state:t}){return(0,w.jsx)(Kd,{is:`span`,size:`sm`,weight:t===`current`?`semibold`:`normal`,tone:t===`upcoming`?`muted`:`default`,children:e})}function Sp({steps:e,current:t,orientation:n=`horizontal`,onStepClick:r,style:i,className:a}){let o=(e,n)=>{let i=vp(n,t),a=(0,w.jsxs)(Fd,{gap:`sm`,align:`center`,children:[(0,w.jsx)(bp,{index:n,state:i}),(0,w.jsx)(xp,{label:e,state:i})]});return r===void 0?(0,w.jsx)(`span`,{"aria-current":i===`current`?`step`:void 0,children:a}):(0,w.jsx)(`button`,{type:`button`,onClick:()=>r(n),"aria-current":i===`current`?`step`:void 0,style:{background:`none`,border:`none`,padding:0,margin:0,font:`inherit`,textAlign:`inherit`,cursor:`pointer`},children:a})};return n===`vertical`?(0,w.jsx)(`nav`,{"aria-label":`Progress`,className:a,style:i,children:(0,w.jsx)(Pd,{gap:`none`,align:`start`,children:e.map((e,t)=>(0,w.jsxs)(Pd,{gap:`none`,align:`start`,children:[t>0&&(0,w.jsx)(`span`,{style:{width:_p,height:16,display:`inline-flex`,justifyContent:`center`},children:(0,w.jsx)(Vd,{orientation:`vertical`,margin:0})}),o(e,t)]},t))})}):(0,w.jsx)(`nav`,{"aria-label":`Progress`,className:a,style:i,children:(0,w.jsx)(Fd,{gap:`sm`,align:`center`,children:e.map((e,t)=>(0,w.jsxs)(Fd,{gap:`sm`,align:`center`,style:t>0?{flex:1}:void 0,children:[t>0&&(0,w.jsx)(Vd,{style:{flex:1,minWidth:16,margin:0}}),o(e,t)]},t))})})}var Cp=/^(?:https?:\/\/|mailto:)[^\s\x00-\x1f]+$/i;function wp(e){return Cp.test(e)?e:void 0}function Tp(e){let t=new Set;for(let n of e)n>0&&t.add(n-1);return t}function Ep(e){return e===void 0||e===` `||e===` `||e===`
146
+ `}function Dp(e){return e!==void 0&&/[A-Za-z0-9]/.test(e)}function Op(e,t,n){return Ep(n)?!1:e===`_`||e===`__`?!Dp(t):!0}function kp(e,t,n){return Ep(t)?!1:e===`_`||e===`__`?!Dp(n):!0}var Ap=new Set(`!"#$%&'()*+,-./:;<=>?@[\\]^_\`{|}~`);function jp(e,t,n){let r=[],i=``,a=()=>{i.length>0&&(r.push({type:`text`,text:i}),i=``)},o=t;for(;o<e.length;){let t=e[o];if(t===void 0)break;if(t===`\\`){let n=e[o+1];if(n!==void 0&&Ap.has(n)){i+=n,o+=2;continue}i+=t,o+=1;continue}if(t===`
147
+ `){a(),r.push({type:`break`}),o+=1;continue}if(t==="`"){a();let t=e.indexOf("`",o+1);if(t===-1){r.push({type:`code`,code:e.slice(o+1),closed:!1}),o=e.length;continue}r.push({type:`code`,code:e.slice(o+1,t),closed:!0}),o=t+1;continue}if(t===`*`||t===`_`){let s=e.slice(o,o+2),c=s===`**`||s===`__`?s:void 0,l=t,u=o>0?e[o-1]:void 0,d=1;for(;e[o+d]===t;)d++;let f=e[o+d],p=n.indexOf(`]`),m=p===-1?n.length-1:p-1,h=new Set,g=d;for(let e=m;e>=0;e--){let r=n[e];if(r!==void 0&&r[0]===t&&!(r.length>g)&&kp(r,u,f)&&(h.add(e),g-=r.length,g===0))break}if(h.size>0)return a(),{children:r,closedBy:Math.max(...h),closedIdxs:h,runConsumed:d-g,pos:o};let _=c??l,v=e[o+_.length];if(Op(_,u,v)){a();let t=jp(e,o+_.length,[_,...n]),i=_===`**`||_===`__`?{type:`strong`,children:t.children,closed:t.closedIdxs.has(0)}:{type:`em`,children:t.children,closed:t.closedIdxs.has(0)};if(r.push(i),t.closedBy===0){o=t.pos+t.runConsumed;continue}if(t.closedBy===-1){o=t.pos;continue}return{children:r,closedBy:t.closedBy-1,closedIdxs:Tp(t.closedIdxs),runConsumed:t.runConsumed,pos:t.pos}}i+=_,o+=_.length;continue}if(t===`[`){let t=jp(e,o+1,[`]`,...n]);if(t.closedBy>0){i+=`[`,o+=1;continue}if(t.closedBy===-1){a(),r.push({type:`link`,children:t.children,href:void 0,rawHref:``,closed:!1}),o=t.pos;continue}let s=t.pos+1,c=e[s];if(c===`(`){let n=e.indexOf(`)`,s+1);if(n===-1){let n=e.slice(s+1);a(),r.push({type:`link`,children:t.children,href:void 0,rawHref:n,closed:!1}),o=e.length;continue}let i=e.slice(s+1,n).trim().split(/\s+/)[0]??``;a(),r.push({type:`link`,children:t.children,href:wp(i),rawHref:i,closed:!0}),o=n+1;continue}if(c===void 0){a(),r.push({type:`link`,children:t.children,href:void 0,rawHref:``,closed:!1}),o=s;continue}i+=`[`,o+=1;continue}if(t===`]`&&n.includes(`]`)){let e=n.indexOf(`]`);return a(),{children:r,closedBy:e,closedIdxs:new Set([e]),runConsumed:1,pos:o}}i+=t,o+=1}return a(),{children:r,closedBy:-1,closedIdxs:new Set,runConsumed:0,pos:o}}function Mp(e){return jp(e,0,[]).children}var Np=/^```+\s*(\S*)\s*$/,Pp=/^```+\s*$/,Fp=/^(#{1,6})\s+(.*)$/,Ip=/^\s*[-*+]\s+(.*)$/,Lp=/^\s*(\d{1,9})[.)]\s+(.*)$/;function Rp(e){let t=[],n=e.split(`
148
+ `),r=[],i,a=()=>{r.length>0&&(t.push({type:`paragraph`,children:jp(r.join(`
149
+ `),0,[]).children}),r=[])},o=()=>{i!==void 0&&(t.push({type:`list`,ordered:i.ordered,start:i.start,items:i.items}),i=void 0)};for(let e=0;e<n.length;e++){let s=n[e];if(s===void 0)continue;let c=s.match(Np);if(c!==null){a(),o();let r=c[1]!==void 0&&c[1].length>0?c[1]:void 0,i=[],s=!1,l=e+1;for(;l<n.length;l++){let e=n[l];if(e!==void 0&&Pp.test(e)){s=!0;break}i.push(e??``)}t.push({type:`code-fence`,code:i.join(`
150
+ `),lang:r,closed:s}),e=l;continue}if(s.trim().length===0){a(),o();continue}let l=s.match(Fp);if(l!==null&&l[1]!==void 0){a(),o();let e=l[1].length;t.push({type:`heading`,level:e,children:jp(l[2]??``,0,[]).children});continue}let u=s.match(Lp),d=u===null?s.match(Ip):null;if(u!==null||d!==null){a();let e=u!==null,t=(e?u[2]:d?.[1])??``;i!==void 0&&i.ordered!==e&&o(),i===void 0&&(i={ordered:e,start:e&&u[1]!==void 0?parseInt(u[1],10):void 0,items:[]}),i.items.push({children:jp(t,0,[]).children});continue}o(),r.push(s)}return a(),o(),t}var zp={fontFamily:`var(--ggui-font-family-mono, ui-monospace, monospace)`,fontSize:`0.9em`,background:`var(--ggui-color-surface-sunken, rgba(0,0,0,0.06))`,borderRadius:`var(--ggui-radius-sm, 4px)`,padding:`0.1em 0.35em`},Bp={fontFamily:`var(--ggui-font-family-mono, ui-monospace, monospace)`,fontSize:`var(--ggui-font-size-sm, 14px)`,background:`var(--ggui-color-surface-sunken, rgba(0,0,0,0.06))`,borderRadius:`var(--ggui-radius-md, 8px)`,padding:`var(--ggui-spacing-sm, 12px)`,overflowX:`auto`,whiteSpace:`pre`,margin:0},Vp={color:`var(--ggui-color-primary, #4f46e5)`,textDecoration:`none`},Hp={margin:0,paddingInlineStart:`var(--ggui-spacing-lg, 24px)`};function Up(e){return e.map((e,t)=>{switch(e.type){case`text`:return e.text;case`break`:return(0,w.jsx)(`br`,{},t);case`strong`:return(0,w.jsx)(`strong`,{children:Up(e.children)},t);case`em`:return(0,w.jsx)(`em`,{children:Up(e.children)},t);case`code`:return(0,w.jsx)(`code`,{style:zp,children:e.code},t);case`link`:{let n=Up(e.children);return e.href===void 0?(0,w.jsx)(`span`,{style:Vp,children:n},t):(0,w.jsx)(Mf,{href:e.href,external:!0,children:n},t)}}})}function Wp(e,t){switch(e.type){case`paragraph`:return(0,w.jsx)(Kd,{children:Up(e.children)},t);case`heading`:return(0,w.jsx)(Xd,{level:e.level,children:Up(e.children)},t);case`code-fence`:return(0,w.jsx)(`pre`,{style:Bp,"data-lang":e.lang,children:(0,w.jsx)(`code`,{children:e.code})},t);case`list`:{let n=e.items.map((e,t)=>(0,w.jsx)(`li`,{children:Up(e.children)},t));return e.ordered?(0,w.jsx)(`ol`,{start:e.start,style:Hp,children:n},t):(0,w.jsx)(`ul`,{style:Hp,children:n},t)}}}function Gp({markdown:e,className:t,style:n}){let r=Rp(e);return(0,w.jsx)(`div`,{className:t,"data-ggui-markdown":``,style:{display:`flex`,flexDirection:`column`,gap:`var(--ggui-spacing-sm, 12px)`,...n},children:r.map(Wp)})}function Kp({markdown:e}){return(0,w.jsx)(w.Fragment,{children:Up(Mp(e))})}var qp={};Le(qp,{CardGrid:()=>Zp,ChatWindow:()=>tm,CommandPalette:()=>um,CommentThread:()=>$p,DataTable:()=>em,FileUploader:()=>im,Footer:()=>dm,Header:()=>Jp,Hero:()=>fm,Modal:()=>lm,NavigationBar:()=>nm,NotificationCenter:()=>sm,Sidebar:()=>Xp});function Jp({logo:e,navigation:t,actions:n,sticky:r=!1,background:i,bordered:a=!0,style:o,className:s}){return(0,w.jsxs)(`header`,{className:s,style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`12px 24px`,backgroundColor:i||Q.white,borderBottom:a?`1px solid ${Q.gray[200]}`:void 0,...r&&{position:`sticky`,top:0,zIndex:vd.sticky,boxShadow:_d.sm},...o},children:[e&&(0,w.jsx)(`div`,{style:{flexShrink:0},children:e}),t&&(0,w.jsx)(`nav`,{style:{display:`flex`,alignItems:`center`,flex:1,marginLeft:`32px`},children:t}),n&&(0,w.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`12px`,flexShrink:0},children:n})]})}function Yp({item:e,activeId:t,onItemClick:n,collapsed:r,depth:i=0}){let[a,o]=(0,S.useState)(!1),s=e.children&&e.children.length>0,c=t===e.id;return(0,w.jsxs)(`div`,{children:[(0,w.jsxs)(`button`,{onClick:()=>{s&&!r&&o(!a),n?.(e)},disabled:e.disabled,style:{display:`flex`,alignItems:`center`,gap:`12px`,width:`100%`,padding:r?`10px`:`10px 12px`,paddingLeft:r?`10px`:`${12+i*16}px`,border:`none`,borderRadius:gd.md,backgroundColor:c?Q.primary[50]:`transparent`,color:e.disabled?Q.gray[400]:c?Q.primary[700]:Q.gray[700],fontSize:J.sm,fontWeight:c?Y.medium:Y.normal,textAlign:`left`,cursor:e.disabled?`not-allowed`:`pointer`,transition:`all 0.15s`,justifyContent:r?`center`:`flex-start`},children:[e.icon&&(0,w.jsx)(`span`,{style:{display:`flex`,flexShrink:0},children:e.icon}),!r&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`span`,{style:{flex:1},children:e.label}),e.badge&&(0,w.jsx)(`span`,{children:e.badge}),s&&(0,w.jsx)(jf,{name:a?`chevron-down`:`chevron-right`,size:14,tone:`subtle`})]})]}),s&&a&&!r&&(0,w.jsx)(`div`,{style:{marginTop:`4px`},children:e.children.map(e=>(0,w.jsx)(Yp,{item:e,activeId:t,onItemClick:n,collapsed:r,depth:i+1},e.id))})]})}function Xp({items:e,activeId:t,onItemClick:n,collapsed:r=!1,header:i,footer:a,width:o=256,collapsedWidth:s=64,style:c,className:l}){let u=r?s:o;return(0,w.jsxs)(`aside`,{className:l,style:{width:u,minWidth:u,height:`100%`,display:`flex`,flexDirection:`column`,backgroundColor:Q.white,borderRight:`1px solid ${Q.gray[200]}`,transition:`width 0.2s`,overflow:`hidden`,...c},children:[i&&(0,w.jsx)(`div`,{style:{padding:r?`16px 8px`:`16px`,borderBottom:`1px solid ${Q.gray[200]}`},children:i}),(0,w.jsx)(`nav`,{style:{flex:1,padding:`8px`,overflowY:`auto`,overflowX:`hidden`},children:(0,w.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`2px`},children:e.map(e=>(0,w.jsx)(Yp,{item:e,activeId:t,onItemClick:n,collapsed:r},e.id))})}),a&&(0,w.jsx)(`div`,{style:{padding:r?`16px 8px`:`16px`,borderTop:`1px solid ${Q.gray[200]}`},children:a})]})}function Zp({children:e,columns:t=3,gap:n=16,style:r,className:i}){return(0,w.jsx)(`div`,{className:i,style:{display:`grid`,gridTemplateColumns:typeof t==`number`?`repeat(${t}, 1fr)`:`repeat(auto-fit, minmax(280px, 1fr))`,gap:`${n}px`,...r},children:e})}function Qp({comment:e,onReply:t,onReaction:n,depth:r=0}){let[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(``),c=()=>{o.trim()&&(t?.(e.id,o),s(``),a(!1))},l=e.timestamp instanceof Date?e.timestamp.toLocaleString():e.timestamp;return(0,w.jsxs)(`div`,{style:{marginLeft:r>0?`40px`:0},children:[(0,w.jsxs)(`div`,{style:{display:`flex`,gap:`12px`},children:[(0,w.jsx)(yf,{name:e.author.name,src:e.author.avatar,size:`sm`}),(0,w.jsxs)(`div`,{style:{flex:1},children:[(0,w.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`8px`},children:[(0,w.jsx)(`span`,{style:{fontWeight:500,fontSize:J.sm},children:e.author.name}),(0,w.jsx)(`span`,{style:{color:Q.gray[500],fontSize:J.xs},children:l})]}),(0,w.jsx)(`p`,{style:{margin:`4px 0 8px`,fontSize:J.sm,color:Q.gray[700]},children:e.content}),(0,w.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`12px`},children:[e.reactions?.map(t=>(0,w.jsxs)(`button`,{onClick:()=>n?.(e.id,t.emoji),style:{padding:`2px 8px`,border:`1px solid ${Q.gray[200]}`,borderRadius:`12px`,backgroundColor:Q.gray[50],fontSize:J.xs,cursor:`pointer`},children:[t.emoji,` `,t.count]},t.emoji)),(0,w.jsx)(`button`,{onClick:()=>a(!i),style:{background:`none`,border:`none`,color:Q.gray[500],fontSize:J.xs,cursor:`pointer`},children:`Reply`})]}),i&&(0,w.jsxs)(`div`,{style:{marginTop:`12px`},children:[(0,w.jsx)(rf,{value:o,onChange:s,placeholder:`Write a reply...`,rows:2}),(0,w.jsxs)(`div`,{style:{display:`flex`,gap:`8px`,marginTop:`8px`},children:[(0,w.jsx)(ef,{size:`sm`,onClick:c,children:`Reply`}),(0,w.jsx)(ef,{size:`sm`,variant:`ghost`,onClick:()=>a(!1),children:`Cancel`})]})]})]})]}),e.replies?.map(e=>(0,w.jsx)(`div`,{style:{marginTop:`16px`},children:(0,w.jsx)(Qp,{comment:e,onReply:t,onReaction:n,depth:r+1})},e.id))]})}function $p({comments:e,currentUser:t,onAddComment:n,onReply:r,onReaction:i,loading:a,style:o,className:s}){let[c,l]=(0,S.useState)(``),u=()=>{c.trim()&&(n?.(c),l(``))};return(0,w.jsxs)(`div`,{className:s,style:{...o},children:[t&&(0,w.jsxs)(`div`,{style:{display:`flex`,gap:`12px`,marginBottom:`24px`},children:[(0,w.jsx)(yf,{name:t.name,src:t.avatar,size:`sm`}),(0,w.jsxs)(`div`,{style:{flex:1},children:[(0,w.jsx)(rf,{value:c,onChange:l,placeholder:`Write a comment...`,rows:3}),(0,w.jsx)(`div`,{style:{marginTop:`8px`,display:`flex`,justifyContent:`flex-end`},children:(0,w.jsx)(ef,{onClick:u,disabled:!c.trim(),children:`Comment`})})]})]}),a?(0,w.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,padding:`24px`},children:(0,w.jsx)(Zd,{size:24})}):(0,w.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`20px`},children:e.map(e=>(0,w.jsx)(Qp,{comment:e,onReply:r,onReaction:i},e.id))})]})}function em({columns:e,data:t,rowKey:n=`id`,loading:r,emptyText:i=`No data`,onSort:a,sortKey:o,sortDirection:s,onRowClick:c,selectable:l,selectedKeys:u=[],onSelectionChange:d,style:f,className:p}){let m=(e,t)=>typeof n==`function`?n(e):String(e[n]??t),h=e=>{e?d?.(t.map((e,t)=>m(e,t))):d?.([])},g=(e,t)=>{t?d?.([...u,e]):d?.(u.filter(t=>t!==e))},_=t.length>0&&u.length===t.length,v=u.length>0&&u.length<t.length;return(0,w.jsx)(`div`,{className:p,style:{border:`1px solid ${Q.gray[200]}`,borderRadius:`8px`,overflow:`hidden`,...f},children:(0,w.jsxs)(`table`,{style:{width:`100%`,borderCollapse:`collapse`,fontSize:J.sm},children:[(0,w.jsx)(`thead`,{children:(0,w.jsxs)(`tr`,{style:{backgroundColor:Q.gray[50]},children:[l&&(0,w.jsx)(`th`,{style:{width:`40px`,padding:`12px`},children:(0,w.jsx)(sf,{checked:_,indeterminate:v,onChange:h})}),e.map(e=>(0,w.jsx)(`th`,{style:{padding:`12px 16px`,textAlign:e.align||`left`,fontWeight:Y.semibold,color:Q.gray[700],borderBottom:`1px solid ${Q.gray[200]}`,cursor:e.sortable?`pointer`:void 0,width:e.width},onClick:()=>e.sortable&&a?.(e.key,o===e.key&&s===`asc`?`desc`:`asc`),children:(0,w.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`4px`},children:[e.header,e.sortable&&o===e.key&&(0,w.jsx)(jf,{name:s===`asc`?`chevron-up`:`chevron-down`,size:14})]})},e.key))]})}),(0,w.jsx)(`tbody`,{children:r?(0,w.jsx)(`tr`,{children:(0,w.jsx)(`td`,{colSpan:e.length+ +!!l,style:{padding:`48px`,textAlign:`center`},children:(0,w.jsx)(Zd,{size:24})})}):t.length===0?(0,w.jsx)(`tr`,{children:(0,w.jsx)(`td`,{colSpan:e.length+ +!!l,style:{padding:`48px`,textAlign:`center`,color:Q.gray[500]},children:i})}):t.map((t,n)=>{let r=m(t,n),i=u.includes(r);return(0,w.jsxs)(`tr`,{onClick:()=>c?.(t,n),style:{backgroundColor:i?Q.primary[50]:void 0,cursor:c?`pointer`:void 0,transition:`background-color 0.15s`},children:[l&&(0,w.jsx)(`td`,{style:{padding:`12px`},children:(0,w.jsx)(sf,{checked:i,onChange:e=>g(r,e)})}),e.map(e=>(0,w.jsx)(`td`,{style:{padding:`12px 16px`,textAlign:e.align||`left`,color:Q.gray[900],borderBottom:`1px solid ${Q.gray[100]}`},children:e.render?e.render(t[e.key],t,n):String(t[e.key]??``)},e.key))]},r)})})]})})}function tm({messages:e,currentUserId:t,onSendMessage:n,loading:r,typing:i,placeholder:a=`Type a message...`,header:o,style:s,className:c}){let[l,u]=(0,S.useState)(``),d=(0,S.useRef)(null);(0,S.useEffect)(()=>{d.current?.scrollIntoView({behavior:`smooth`})},[e]);let f=()=>{l.trim()&&(n?.(l),u(``))},p=e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),f())};return(0,w.jsxs)(`div`,{className:c,style:{display:`flex`,flexDirection:`column`,height:`100%`,border:`1px solid ${Q.gray[200]}`,borderRadius:gd.lg,backgroundColor:Q.white,overflow:`hidden`,...s},children:[o&&(0,w.jsx)(`div`,{style:{padding:`12px 16px`,borderBottom:`1px solid ${Q.gray[200]}`},children:o}),(0,w.jsxs)(`div`,{style:{flex:1,padding:`16px`,overflowY:`auto`,display:`flex`,flexDirection:`column`,gap:`12px`},children:[r?(0,w.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,padding:`24px`},children:(0,w.jsx)(Zd,{size:24})}):e.map(e=>{let n=e.sender.id===t,r=e.timestamp instanceof Date?e.timestamp.toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`}):e.timestamp;return(0,w.jsxs)(`div`,{style:{display:`flex`,flexDirection:n?`row-reverse`:`row`,alignItems:`flex-end`,gap:`8px`},children:[!n&&(0,w.jsx)(yf,{name:e.sender.name,src:e.sender.avatar,size:`xs`}),(0,w.jsxs)(`div`,{style:{maxWidth:`70%`,padding:`10px 14px`,borderRadius:gd.lg,backgroundColor:n?Q.primary[600]:Q.gray[100],color:n?Q.white:Q.gray[900]},children:[(0,w.jsx)(`p`,{style:{margin:0,fontSize:J.sm},children:e.content}),(0,w.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`4px`,marginTop:`4px`,fontSize:J.xs,opacity:.7},children:[(0,w.jsx)(`span`,{children:r}),n&&e.status&&(0,w.jsxs)(`span`,{children:[e.status===`sending`&&`•`,e.status===`sent`&&`✓`,e.status===`delivered`&&`✓✓`,e.status===`read`&&`✓✓`,e.status===`error`&&`!`]})]})]})]},e.id)}),i&&(0,w.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`8px`},children:(0,w.jsxs)(`span`,{style:{fontSize:J.xs,color:Q.gray[500]},children:[i.name,` is typing...`]})}),(0,w.jsx)(`div`,{ref:d})]}),(0,w.jsxs)(`div`,{style:{padding:`12px 16px`,borderTop:`1px solid ${Q.gray[200]}`,display:`flex`,gap:`8px`},children:[(0,w.jsx)(`input`,{type:`text`,value:l,onChange:e=>u(e.target.value),onKeyDown:p,placeholder:a,style:{flex:1,padding:`10px 14px`,border:`1px solid ${Q.gray[300]}`,borderRadius:gd.full,fontSize:J.sm,outline:`none`}}),(0,w.jsx)(ef,{onClick:f,disabled:!l.trim(),children:(0,w.jsx)(jf,{name:`chevron-right`,size:18})})]})]})}function nm({items:e,activeId:t,onItemClick:n,orientation:r=`horizontal`,variant:i=`default`,style:a,className:o}){let s=e=>{let a=t===e.id,o={display:`flex`,alignItems:`center`,gap:`8px`,padding:r===`horizontal`?`8px 16px`:`10px 16px`,border:`none`,background:`none`,fontSize:J.sm,cursor:e.disabled?`not-allowed`:`pointer`,opacity:e.disabled?.5:1,transition:`all 0.15s`,textDecoration:`none`,color:`inherit`},s={default:{fontWeight:a?Y.medium:Y.normal,color:a?Q.primary[600]:Q.gray[600]},pills:{borderRadius:gd.full,backgroundColor:a?Q.primary[100]:`transparent`,color:a?Q.primary[700]:Q.gray[600],fontWeight:a?Y.medium:Y.normal},underline:{borderBottom:a?`2px solid ${Q.primary[600]}`:`2px solid transparent`,color:a?Q.primary[600]:Q.gray[600],fontWeight:a?Y.medium:Y.normal,borderRadius:0}},c=()=>{e.disabled||n?.(e)},l=(0,w.jsxs)(w.Fragment,{children:[e.icon&&(0,w.jsx)(`span`,{style:{display:`flex`},children:e.icon}),(0,w.jsx)(`span`,{children:e.label})]});return e.href?(0,w.jsx)(`a`,{href:e.href,onClick:e=>{e.preventDefault(),c()},style:{...o,...s[i]},children:l},e.id):(0,w.jsx)(`button`,{onClick:c,disabled:e.disabled,style:{...o,...s[i]},children:l},e.id)};return(0,w.jsx)(`nav`,{className:o,style:{display:`flex`,flexDirection:r===`horizontal`?`row`:`column`,gap:r===`horizontal`?`4px`:`2px`,...i===`underline`&&r===`horizontal`&&{borderBottom:`1px solid ${Q.gray[200]}`},...a},children:e.map(s)})}function rm(e){if(e===0)return`0 B`;let t=1024,n=[`B`,`KB`,`MB`,`GB`],r=Math.floor(Math.log(e)/Math.log(t));return`${parseFloat((e/t**r).toFixed(1))} ${n[r]}`}function im({files:e=[],onFilesSelected:t,onFileRemove:n,accept:r,multiple:i=!0,maxSize:a,maxFiles:o,disabled:s,dragDrop:c=!0,style:l,className:u}){let[d,f]=(0,S.useState)(!1),p=(0,S.useRef)(null),m=n=>{if(!n)return;let r=Array.from(n);o&&(r=r.slice(0,o-e.length)),a&&(r=r.filter(e=>e.size<=a)),t?.(r)},h=e=>{e.preventDefault(),f(!1),!s&&c&&m(e.dataTransfer.files)},g=e=>{e.preventDefault(),!s&&c&&f(!0)},_=()=>{f(!1)};return(0,w.jsxs)(`div`,{className:u,style:{...l},children:[(0,w.jsxs)(`div`,{onClick:()=>!s&&p.current?.click(),onDrop:h,onDragOver:g,onDragLeave:_,style:{border:`2px dashed ${d?Q.primary[400]:Q.gray[300]}`,borderRadius:gd.lg,padding:`32px`,textAlign:`center`,backgroundColor:d?Q.primary[50]:Q.gray[50],cursor:s?`not-allowed`:`pointer`,transition:`all 0.2s`,opacity:s?.5:1},children:[(0,w.jsx)(`input`,{ref:p,type:`file`,accept:r,multiple:i,onChange:e=>m(e.target.files),disabled:s,style:{display:`none`}}),(0,w.jsx)(jf,{name:`plus`,size:32,tone:`subtle`}),(0,w.jsx)(`p`,{style:{margin:`12px 0 4px`,color:Q.gray[700],fontSize:J.sm},children:c?`Drag and drop files here, or click to browse`:`Click to browse files`}),(0,w.jsxs)(`p`,{style:{margin:0,color:Q.gray[500],fontSize:J.xs},children:[r&&`Accepted: ${r}`,a&&` \u2022 Max size: ${rm(a)}`,o&&` \u2022 Max files: ${o}`]})]}),e.length>0&&(0,w.jsx)(`div`,{style:{marginTop:`16px`,display:`flex`,flexDirection:`column`,gap:`8px`},children:e.map(e=>(0,w.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`12px`,padding:`12px`,border:`1px solid ${Q.gray[200]}`,borderRadius:gd.md,backgroundColor:Q.white},children:[(0,w.jsx)(jf,{name:`menu`,size:20,tone:`subtle`}),(0,w.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,w.jsx)(`p`,{style:{margin:0,fontSize:J.sm,color:Q.gray[900],whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:e.name}),(0,w.jsxs)(`p`,{style:{margin:`2px 0 0`,fontSize:J.xs,color:Q.gray[500]},children:[rm(e.size),e.error&&(0,w.jsx)(`span`,{style:{color:Q.error[500],marginLeft:`8px`},children:e.error})]}),e.status===`uploading`&&e.progress!==void 0&&(0,w.jsx)(Tf,{value:e.progress,size:`sm`,style:{marginTop:`8px`}})]}),(0,w.jsx)(ef,{variant:`ghost`,size:`sm`,onClick:()=>n?.(e.id),children:(0,w.jsx)(jf,{name:`x`,size:16})})]},e.id))})]})}var am={info:Q.info[500],success:Q.success[500],warning:Q.warning[500],error:Q.error[500]};function om({notification:e,onMarkAsRead:t,onDismiss:n}){let r=e.timestamp instanceof Date?e.timestamp.toLocaleString():e.timestamp,i=am[e.type||`info`];return(0,w.jsxs)(`div`,{style:{display:`flex`,gap:`12px`,padding:`12px`,backgroundColor:e.read?`transparent`:Q.primary[50],borderRadius:gd.md,transition:`background-color 0.15s`},children:[(0,w.jsx)(`div`,{style:{width:`8px`,height:`8px`,borderRadius:`50%`,backgroundColor:e.read?`transparent`:i,flexShrink:0,marginTop:`6px`}}),(0,w.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,w.jsxs)(`div`,{style:{display:`flex`,alignItems:`flex-start`,justifyContent:`space-between`,gap:`8px`},children:[(0,w.jsx)(`p`,{style:{margin:0,fontWeight:Y.medium,color:Q.gray[900],fontSize:J.sm},children:e.title}),(0,w.jsx)(`button`,{onClick:()=>n?.(e.id),style:{background:`none`,border:`none`,padding:`2px`,cursor:`pointer`,color:Q.gray[400],flexShrink:0},children:(0,w.jsx)(jf,{name:`x`,size:14})})]}),e.message&&(0,w.jsx)(`p`,{style:{margin:`4px 0 0`,color:Q.gray[600],fontSize:J.xs},children:e.message}),(0,w.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`12px`,marginTop:`8px`},children:[(0,w.jsx)(`span`,{style:{color:Q.gray[400],fontSize:J.xs},children:r}),!e.read&&(0,w.jsx)(`button`,{onClick:()=>t?.(e.id),style:{background:`none`,border:`none`,padding:0,color:Q.primary[600],fontSize:J.xs,cursor:`pointer`},children:`Mark as read`}),e.action&&(0,w.jsx)(`button`,{onClick:e.action.onClick,style:{background:`none`,border:`none`,padding:0,color:Q.primary[600],fontSize:J.xs,cursor:`pointer`},children:e.action.label})]})]})]})}function sm({notifications:e,onMarkAsRead:t,onMarkAllAsRead:n,onDismiss:r,onClearAll:i,emptyText:a=`No notifications`,loading:o,style:s,className:c}){let l=e.filter(e=>!e.read).length;return(0,w.jsxs)(`div`,{className:c,style:{display:`flex`,flexDirection:`column`,...s},children:[(0,w.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`12px 16px`,borderBottom:`1px solid ${Q.gray[200]}`},children:[(0,w.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`8px`},children:[(0,w.jsx)(`span`,{style:{fontWeight:Y.semibold,color:Q.gray[900]},children:`Notifications`}),l>0&&(0,w.jsx)(`span`,{style:{padding:`2px 8px`,borderRadius:`12px`,backgroundColor:Q.primary[100],color:Q.primary[700],fontSize:J.xs,fontWeight:Y.medium},children:l})]}),(0,w.jsxs)(`div`,{style:{display:`flex`,gap:`8px`},children:[l>0&&(0,w.jsx)(ef,{variant:`ghost`,size:`sm`,onClick:n,children:`Mark all read`}),e.length>0&&(0,w.jsx)(ef,{variant:`ghost`,size:`sm`,onClick:i,children:`Clear all`})]})]}),(0,w.jsx)(`div`,{style:{flex:1,overflowY:`auto`,padding:`8px`},children:o?(0,w.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,padding:`32px`},children:(0,w.jsx)(Zd,{size:24})}):e.length===0?(0,w.jsx)(`div`,{style:{textAlign:`center`,padding:`32px`,color:Q.gray[500]},children:a}):(0,w.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`4px`},children:e.map(e=>(0,w.jsx)(om,{notification:e,onMarkAsRead:t,onDismiss:r},e.id))})})]})}var cm={sm:`400px`,md:`500px`,lg:`640px`,xl:`800px`,full:`100vw`};function lm({open:e,onClose:t,title:n,children:r,footer:i,size:a=`md`,closeOnOverlayClick:o=!0,closeOnEscape:s=!0,showCloseButton:c=!0,style:l,className:u}){let d=(0,S.useCallback)(e=>{e.key===`Escape`&&s&&t()},[s,t]);if((0,S.useEffect)(()=>{if(e)return document.addEventListener(`keydown`,d),document.body.style.overflow=`hidden`,()=>{document.removeEventListener(`keydown`,d),document.body.style.overflow=``}},[e,d]),!e)return null;let f=e=>{e.target===e.currentTarget&&o&&t()},p=a===`full`;return(0,w.jsxs)(`div`,{style:{position:`fixed`,inset:0,zIndex:vd.modal,display:`flex`,alignItems:p?`stretch`:`center`,justifyContent:`center`,padding:p?0:`24px`},children:[(0,w.jsx)(`div`,{onClick:f,style:{position:`absolute`,inset:0,backgroundColor:`rgba(0, 0, 0, 0.5)`,animation:zf.fadeIn}}),(0,w.jsxs)(`div`,{role:`dialog`,"aria-modal":`true`,className:u,style:{position:`relative`,width:cm[a],maxWidth:p?`100%`:`calc(100vw - 48px)`,maxHeight:p?`100%`:`calc(100vh - 48px)`,backgroundColor:Q.white,borderRadius:p?0:gd.xl,boxShadow:_d[`2xl`],display:`flex`,flexDirection:`column`,overflow:`hidden`,animation:zf.scaleIn,...l},children:[(n||c)&&(0,w.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`16px 20px`,borderBottom:`1px solid ${Q.gray[200]}`},children:[n&&(0,w.jsx)(Xd,{level:4,children:n}),c&&(0,w.jsx)(ef,{variant:`ghost`,size:`sm`,onClick:t,"aria-label":`Close modal`,style:{marginLeft:`auto`},children:(0,w.jsx)(jf,{name:`x`,size:20})})]}),(0,w.jsx)(`div`,{style:{flex:1,padding:`20px`,overflowY:`auto`},children:r}),i&&(0,w.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`flex-end`,gap:`8px`,padding:`16px 20px`,borderTop:`1px solid ${Q.gray[200]}`},children:i})]})]})}function um({open:e,onClose:t,commands:n,onSelect:r,placeholder:i=`Search commands...`,recentIds:a=[],loading:o,style:s,className:c}){let[l,u]=(0,S.useState)(``),[d,f]=(0,S.useState)(0),p=(0,S.useMemo)(()=>{let e=l?n.filter(e=>e.label.toLowerCase().includes(l.toLowerCase())||e.description?.toLowerCase().includes(l.toLowerCase())):n,t=new Map;if(!l&&a.length>0){let e=a.map(e=>n.find(t=>t.id===e)).filter(Boolean);e.length>0&&t.set(`Recent`,e)}return e.forEach(e=>{let n=e.group||`Commands`;t.has(n)||t.set(n,[]),!(!l&&a.includes(e.id)&&t.has(`Recent`))&&t.get(n).push(e)}),t},[n,l,a]),m=(0,S.useMemo)(()=>{let e=[];return p.forEach(t=>e.push(...t)),e},[p]);(0,S.useEffect)(()=>{f(0)},[l]),(0,S.useEffect)(()=>{e&&(u(``),f(0))},[e]);let h=(0,S.useCallback)(e=>{if(e.key===`Escape`){t();return}if(e.key===`ArrowDown`)e.preventDefault(),f(e=>Math.min(e+1,m.length-1));else if(e.key===`ArrowUp`)e.preventDefault(),f(e=>Math.max(e-1,0));else if(e.key===`Enter`){e.preventDefault();let n=m[d];n&&!n.disabled&&(r(n),t())}},[m,d,r,t]);if((0,S.useEffect)(()=>{if(e)return document.addEventListener(`keydown`,h),()=>document.removeEventListener(`keydown`,h)},[e,h]),!e)return null;let g=0;return(0,w.jsxs)(`div`,{style:{position:`fixed`,inset:0,zIndex:vd.modal,display:`flex`,alignItems:`flex-start`,justifyContent:`center`,paddingTop:`15vh`},children:[(0,w.jsx)(`div`,{onClick:t,style:{position:`absolute`,inset:0,backgroundColor:`rgba(0, 0, 0, 0.5)`}}),(0,w.jsxs)(`div`,{role:`dialog`,className:c,style:{position:`relative`,width:`560px`,maxWidth:`calc(100vw - 48px)`,maxHeight:`60vh`,backgroundColor:Q.white,borderRadius:gd.xl,boxShadow:_d[`2xl`],overflow:`hidden`,display:`flex`,flexDirection:`column`,...s},children:[(0,w.jsx)(`div`,{style:{padding:`12px`,borderBottom:`1px solid ${Q.gray[200]}`},children:(0,w.jsxs)(`div`,{style:{position:`relative`},children:[(0,w.jsx)(jf,{name:`search`,size:18,tone:`subtle`,style:{position:`absolute`,left:`12px`,top:`50%`,transform:`translateY(-50%)`}}),(0,w.jsx)(`input`,{type:`text`,value:l,onChange:e=>u(e.target.value),placeholder:i,autoFocus:!0,style:{width:`100%`,padding:`12px 12px 12px 42px`,border:`none`,fontSize:J.base,outline:`none`,backgroundColor:`transparent`}})]})}),(0,w.jsx)(`div`,{style:{flex:1,overflowY:`auto`,padding:`8px`},children:o?(0,w.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,padding:`32px`},children:(0,w.jsx)(Zd,{size:24})}):m.length===0?(0,w.jsx)(`div`,{style:{textAlign:`center`,padding:`32px`,color:Q.gray[500]},children:`No commands found`}):Array.from(p.entries()).map(([e,n])=>(0,w.jsxs)(`div`,{style:{marginBottom:`8px`},children:[(0,w.jsx)(`div`,{style:{padding:`8px 12px`,fontSize:J.xs,fontWeight:Y.semibold,color:Q.gray[500],textTransform:`uppercase`,letterSpacing:`0.05em`},children:e}),n.map(e=>{let n=g++===d;return(0,w.jsxs)(`button`,{onClick:()=>{e.disabled||(r(e),t())},disabled:e.disabled,style:{display:`flex`,alignItems:`center`,gap:`12px`,width:`100%`,padding:`10px 12px`,border:`none`,borderRadius:gd.md,backgroundColor:n?Q.gray[100]:`transparent`,color:e.disabled?Q.gray[400]:Q.gray[900],textAlign:`left`,cursor:e.disabled?`not-allowed`:`pointer`},children:[e.icon&&(0,w.jsx)(`span`,{style:{display:`flex`,color:Q.gray[500]},children:e.icon}),(0,w.jsxs)(`div`,{style:{flex:1},children:[(0,w.jsx)(`div`,{style:{fontSize:J.sm},children:e.label}),e.description&&(0,w.jsx)(`div`,{style:{fontSize:J.xs,color:Q.gray[500]},children:e.description})]}),e.shortcut&&(0,w.jsx)(`kbd`,{style:{padding:`2px 6px`,backgroundColor:Q.gray[100],borderRadius:gd.sm,fontSize:J.xs,color:Q.gray[500],fontFamily:`inherit`},children:e.shortcut})]},e.id)})]},e))}),(0,w.jsxs)(`div`,{style:{padding:`8px 12px`,borderTop:`1px solid ${Q.gray[200]}`,display:`flex`,alignItems:`center`,gap:`16px`,fontSize:J.xs,color:Q.gray[500]},children:[(0,w.jsx)(`span`,{children:`↑↓ Navigate`}),(0,w.jsx)(`span`,{children:`↵ Select`}),(0,w.jsx)(`span`,{children:`Esc Close`})]})]})]})}function dm({brand:e,columns:t,socialLinks:n,bottomText:r,bottomLinks:i,background:a,bordered:o=!0,style:s,className:c}){return(0,w.jsxs)(`footer`,{className:c,role:`contentinfo`,style:{backgroundColor:a||Q.gray[50],borderTop:o?`1px solid ${Q.gray[200]}`:void 0,...s},children:[(0,w.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:`48px`,padding:`48px 24px`,maxWidth:`1280px`,margin:`0 auto`},children:[e&&(0,w.jsx)(`div`,{style:{flex:`1 1 280px`,minWidth:`200px`},children:e}),t?.map((e,t)=>(0,w.jsxs)(`div`,{style:{flex:`0 1 180px`,minWidth:`140px`},children:[e.title&&(0,w.jsx)(`h4`,{style:{fontSize:J.sm,fontWeight:Y.semibold,color:Q.gray[900],lineHeight:qd.normal,margin:`0 0 16px 0`,padding:0},children:e.title}),(0,w.jsx)(`ul`,{style:{listStyle:`none`,margin:0,padding:0,display:`flex`,flexDirection:`column`,gap:`10px`},children:e.links.map((e,t)=>(0,w.jsx)(`li`,{children:(0,w.jsx)(`a`,{href:e.href,onClick:e.onClick?t=>{t.preventDefault(),e.onClick?.()}:void 0,style:{fontSize:J.sm,color:Q.gray[600],textDecoration:`none`,transition:`color 0.15s`,lineHeight:qd.normal},"aria-label":e.label,children:e.label})},t))})]},t))]}),(r||i||n)&&(0,w.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`,alignItems:`center`,justifyContent:`space-between`,gap:`16px`,padding:`20px 24px`,maxWidth:`1280px`,margin:`0 auto`,borderTop:`1px solid ${Q.gray[200]}`},children:[r&&(0,w.jsx)(`span`,{style:{fontSize:J.sm,color:Q.gray[500],lineHeight:qd.normal},children:r}),(0,w.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`20px`},children:[n?.map((e,t)=>(0,w.jsx)(`a`,{href:e.href,"aria-label":e.label,style:{display:`flex`,alignItems:`center`,justifyContent:`center`,color:Q.gray[500],transition:`color 0.15s`},children:e.icon},t)),i?.map((e,t)=>(0,w.jsx)(`a`,{href:e.href,onClick:e.onClick?t=>{t.preventDefault(),e.onClick?.()}:void 0,style:{fontSize:J.sm,color:Q.gray[500],textDecoration:`none`,transition:`color 0.15s`},children:e.label},t))]})]})]})}function fm({heading:e,description:t,primaryAction:n,secondaryAction:r,media:i,align:a=`center`,size:o=`md`,background:s,backgroundImage:c,overlay:l=!1,style:u,className:d}){let f={sm:{padding:`48px 24px`,headingSize:J[`3xl`],descSize:J.lg},md:{padding:`80px 24px`,headingSize:J[`4xl`],descSize:J.xl},lg:{padding:`120px 24px`,headingSize:J[`5xl`],descSize:J.xl}},p=f[o]||f.md,m=!!c,h=m&&l;return(0,w.jsxs)(`section`,{className:d,style:{position:`relative`,backgroundColor:s||(m?void 0:Q.white),...m&&{backgroundImage:`url(${c})`,backgroundSize:`cover`,backgroundPosition:`center`},overflow:`hidden`,...u},children:[h&&(0,w.jsx)(`div`,{"aria-hidden":`true`,style:{position:`absolute`,inset:0,backgroundColor:`rgba(0, 0, 0, 0.5)`}}),(0,w.jsxs)(`div`,{style:{position:`relative`,maxWidth:`1280px`,margin:`0 auto`,padding:p.padding,display:`flex`,flexDirection:a===`center`?`column`:`row`,alignItems:`center`,gap:`48px`,textAlign:a===`center`?`center`:`left`},children:[(0,w.jsxs)(`div`,{style:{flex:a===`left`&&i?`1 1 50%`:void 0,maxWidth:a===`center`?`800px`:void 0},children:[e&&(0,w.jsx)(`h1`,{style:{fontSize:p.headingSize,fontWeight:Y.bold,lineHeight:qd.tight,letterSpacing:Jd.tight,color:h?Q.white:Q.gray[900],margin:`0 0 16px 0`,padding:0},children:e}),t&&(0,w.jsx)(`p`,{style:{fontSize:p.descSize,lineHeight:qd.relaxed,color:h?`rgba(255,255,255,0.9)`:Q.gray[600],margin:`0 0 32px 0`,padding:0,maxWidth:a===`center`?`640px`:void 0,...a===`center`&&{marginLeft:`auto`,marginRight:`auto`}},children:t}),(n||r)&&(0,w.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:`12px`,justifyContent:a===`center`?`center`:`flex-start`},children:[n&&(0,w.jsx)(`button`,{onClick:n.onClick,style:{padding:`12px 28px`,fontSize:J.base,fontWeight:Y.semibold,color:Q.white,backgroundColor:Q.primary[600],border:`none`,borderRadius:`8px`,cursor:`pointer`,transition:`background-color 0.15s`,lineHeight:qd.normal},children:n.label}),r&&(0,w.jsx)(`button`,{onClick:r.onClick,style:{padding:`12px 28px`,fontSize:J.base,fontWeight:Y.semibold,color:h?Q.white:Q.gray[700],backgroundColor:`transparent`,border:`1px solid ${h?`rgba(255,255,255,0.3)`:Q.gray[300]}`,borderRadius:`8px`,cursor:`pointer`,transition:`all 0.15s`,lineHeight:qd.normal},children:r.label})]})]}),i&&(0,w.jsx)(`div`,{style:{flex:a===`left`?`1 1 50%`:void 0,display:`flex`,justifyContent:`center`,alignItems:`center`,...a===`center`&&{marginTop:`16px`}},children:i})]})]})}var pm={};Le(pm,{Clickable:()=>mm,Hoverable:()=>hm,Pressable:()=>gm});var mm=(0,S.forwardRef)(function({children:e,onClick:t,onDoubleClick:n,hoverStyle:r,activeStyle:i,cursor:a,transition:o=`all 200ms ease`,disabled:s=!1,role:c,"aria-label":l,tabIndex:u,style:d,className:f,...p},m){let[h,g]=(0,S.useState)(!1),[_,v]=(0,S.useState)(!1),y=!!t,b=s?`not-allowed`:a??(y?`pointer`:void 0),x=c??(y?`button`:void 0),C=u??(y?0:void 0),T=e=>{s||!t||(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),t(e))},ee={...d,cursor:b,transition:o,opacity:s?.5:void 0,...h&&!s?r:{},..._&&!s?i:{}};return(0,w.jsx)(`div`,{ref:m,className:f,style:ee,onClick:s?void 0:t,onDoubleClick:s?void 0:n,onMouseEnter:()=>g(!0),onMouseLeave:()=>{g(!1),v(!1)},onMouseDown:()=>v(!0),onMouseUp:()=>v(!1),onKeyDown:T,role:x,"aria-label":l,"aria-disabled":s||void 0,tabIndex:C,...p,children:e})}),hm=(0,S.forwardRef)(function({children:e,hoverStyle:t,onHoverChange:n,transition:r=`all 200ms ease`,style:i,className:a,...o},s){let[c,l]=(0,S.useState)(!1),u={...i,transition:r,...c?t:{}};return(0,w.jsx)(`div`,{ref:s,className:a,style:u,onMouseEnter:()=>{l(!0),n?.(!0)},onMouseLeave:()=>{l(!1),n?.(!1)},...o,children:e})}),gm=(0,S.forwardRef)(function({children:e,onPress:t,onLongPress:n,longPressDelay:r=500,hoverStyle:i,pressStyle:a,disabled:o=!1,transition:s=`all 150ms ease`,role:c,"aria-label":l,tabIndex:u,style:d,className:f,...p},m){let[h,g]=(0,S.useState)(!1),[_,v]=(0,S.useState)(!1),[y,b]=(0,S.useState)(null),x=!!t||!!n,C=e=>{if(!o&&(v(!0),n)){let t=setTimeout(()=>{n(e)},r);b(t)}},T=e=>{o||(v(!1),y?(clearTimeout(y),b(null),t?.(e)):n||t?.(e))},ee=e=>{o||!t||(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),t(e))},te={...d,cursor:o?`not-allowed`:x?`pointer`:void 0,transition:s,opacity:o?.5:void 0,userSelect:x?`none`:void 0,...h&&!o?i:{},..._&&!o?a:{}},ne=typeof e==`function`?e({pressed:_,hovered:h}):e;return(0,w.jsx)(`div`,{ref:m,className:f,style:te,onMouseDown:C,onMouseUp:T,onMouseEnter:()=>g(!0),onMouseLeave:()=>{g(!1),v(!1),y&&clearTimeout(y)},onKeyDown:ee,role:c??(x?`button`:void 0),"aria-label":l,"aria-disabled":o||void 0,tabIndex:u??(x?0:void 0),...p,children:ne})});function _m(e){return e.replace(/__GGUI_META__[\s\S]*?__GGUI_META_END__/g,``).replace(/__GGUI_STREAM_SPEC__[\s\S]*?__GGUI_STREAM_SPEC_END__/g,``)}function vm(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 ym(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}: ${vm(i)};`):typeof i==`object`&&i&&ym(i,`${t}-${r}`,n))}function bm(e){let t=[];return ym(e.color,`color`,t),ym(e.font,`font`,t),ym(e.spacing,`spacing`,t),ym(e.shape,`shape`,t),ym({duration:e.motion.duration,easing:e.motion.easing,transition:e.motion.transition},`motion`,t),ym(e.accessibility,`accessibility`,t),ym(e.zIndex,`zIndex`,t),t.join(`
151
+ `)}function xm(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} {
152
+ ${r.join(`
153
+ `)}
154
+ }`}function Sm(e){let t=[];for(let[n,r]of Object.entries(e.motion.keyframes))n.startsWith(`$`)||t.push(xm(n,String(r.$value)));return t.join(`
155
+
156
+ `)}function Cm(e,t){let n=`:root {
157
+ ${bm(t)}
158
+ }`,r=Sm(t),i=r?`${n}
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(`
161
+ `))e.trim()!==``&&(e.includes(`color-mix(`)?o.push(e):a.push(e));return{base:`${r}
162
+ ${a.join(`
163
+ `)}
164
+ }`,colorMix:o}}function ih(e,t,n){if(!n||!e.includes(`color-mix(`))return e;let{base:r,colorMix:i}=rh(e);return i.length===0?e:`${r}
165
+ ${`${t} {
166
+ ${i.map(e=>nh(e,n)).join(`
167
+ `)}
168
+ }`}
169
+ ${`${$m} {
170
+ ${t} {
171
+ ${i.join(`
172
+ `)}
173
+ }
174
+ }`}`}function ah(e,t=`light`){return oh(Qm(),e,t)}function oh(e,t,n=`light`){let r=Zm(e,n);if(!r){let r=Qm();return e===r?``:oh(r,t,n)}let i=eh(r.cssVariables),a=ih(r.cssVariables.replace(/^:root\s*\{/,`.${t} {`),`.${t}`,i),o=`.${t} {
175
+ font-family: var(--ggui-font-family-sans);
176
+ color: var(--ggui-color-onSurface);
177
+ background-color: transparent;
178
+ }`,s=ch(t,i),c=r.metadata?.frameless===!0?`
179
+ .${t} > :where(:not(style)) { border: none !important; }`:``;return`${a}
180
+ ${o}
181
+ ${s}
182
+ ${r.cssKeyframes}
183
+ ${sh(t)}${c}`}function sh(e){return`.${e} *, .${e} *::before, .${e} *::after { box-sizing: border-box; }
184
+ .${e} h1, .${e} h2, .${e} h3, .${e} h4, .${e} h5, .${e} h6, .${e} button, .${e} input, .${e} textarea, .${e} select { font-family: inherit; }`}function ch(e,t){let n=`.${e}`,r=` --ggui-color-primary-gradient: linear-gradient(135deg, var(--ggui-color-primary-500) 0%, var(--ggui-color-primary-600) 100%);`,i=` --ggui-color-surface-gradient: linear-gradient(180deg, var(--ggui-color-surface) 0%, color-mix(in srgb, var(--ggui-color-primary-500) 4%, var(--ggui-color-surface)) 100%);`,a=` --ggui-effect-glow-primary: 0 0 0 4px color-mix(in srgb, var(--ggui-color-primary-500) 18%, transparent);`,o=` --ggui-effect-glow-primary-strong: 0 8px 24px -4px color-mix(in srgb, var(--ggui-color-primary-500) 40%, transparent), 0 0 0 1px color-mix(in srgb, var(--ggui-color-primary-500) 30%, transparent) inset;`;return t?`${`${n} {
185
+ ${r}
186
+ --ggui-color-surface-gradient: linear-gradient(180deg, var(--ggui-color-surface) 0%, var(--ggui-color-surface) 100%);
187
+ ${` --ggui-effect-glow-primary: ${nh(`0 0 0 4px color-mix(in srgb, var(--ggui-color-primary-500) 18%, transparent)`,t)};`}
188
+ ${` --ggui-effect-glow-primary-strong: ${nh(`0 8px 24px -4px color-mix(in srgb, var(--ggui-color-primary-500) 40%, transparent), 0 0 0 1px color-mix(in srgb, var(--ggui-color-primary-500) 30%, transparent) inset`,t)};`}
189
+ }`}
190
+ ${`${$m} {
191
+ ${n} {
192
+ ${i}
193
+ ${a}
194
+ ${o}
195
+ }
196
+ }`}`:`${n} {
197
+ ${r}
198
+ ${i}
199
+ ${a}
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(`
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
+ `)}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
+ `)}\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
+
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,{})}));