@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.
@@ -1,226 +0,0 @@
1
- var Hb=Object.defineProperty;var qb=(e,n,o)=>n in e?Hb(e,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[n]=o;var pn=(e,n,o)=>qb(e,typeof n!="symbol"?n+"":n,o);(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))l(c);new MutationObserver(c=>{for(const u of c)if(u.type==="childList")for(const d of u.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&l(d)}).observe(document,{childList:!0,subtree:!0});function o(c){const u={};return c.integrity&&(u.integrity=c.integrity),c.referrerPolicy&&(u.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?u.credentials="include":c.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function l(c){if(c.ep)return;c.ep=!0;const u=o(c);fetch(c.href,u)}})();function al(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ef={exports:{}},qo={};/**
2
- * @license React
3
- * react-jsx-runtime.production.js
4
- *
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var ph;function Pb(){if(ph)return qo;ph=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function o(l,c,u){var d=null;if(u!==void 0&&(d=""+u),c.key!==void 0&&(d=""+c.key),"key"in c){u={};for(var p in c)p!=="key"&&(u[p]=c[p])}else u=c;return c=u.ref,{$$typeof:e,type:l,key:d,ref:c!==void 0?c:null,props:u}}return qo.Fragment=n,qo.jsx=o,qo.jsxs=o,qo}var gh;function Zb(){return gh||(gh=1,ef.exports=Pb()),ef.exports}var i=Zb(),tf={exports:{}},Ne={};/**
10
- * @license React
11
- * react.production.js
12
- *
13
- * Copyright (c) Meta Platforms, Inc. and affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var mh;function Gb(){if(mh)return Ne;mh=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),d=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),j=Symbol.iterator;function k(T){return T===null||typeof T!="object"?null:(T=j&&T[j]||T["@@iterator"],typeof T=="function"?T:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,z={};function w(T,V,L){this.props=T,this.context=V,this.refs=z,this.updater=L||x}w.prototype.isReactComponent={},w.prototype.setState=function(T,V){if(typeof T!="object"&&typeof T!="function"&&T!=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,T,V,"setState")},w.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function $(){}$.prototype=w.prototype;function N(T,V,L){this.props=T,this.context=V,this.refs=z,this.updater=L||x}var R=N.prototype=new $;R.constructor=N,E(R,w.prototype),R.isPureReactComponent=!0;var _=Array.isArray;function S(){}var C={H:null,A:null,T:null,S:null},U=Object.prototype.hasOwnProperty;function te(T,V,L){var O=L.ref;return{$$typeof:e,type:T,key:V,ref:O!==void 0?O:null,props:L}}function G(T,V){return te(T.type,V,T.props)}function H(T){return typeof T=="object"&&T!==null&&T.$$typeof===e}function Y(T){var V={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(L){return V[L]})}var F=/\/+/g;function ie(T,V){return typeof T=="object"&&T!==null&&T.key!=null?Y(""+T.key):V.toString(36)}function _e(T){switch(T.status){case"fulfilled":return T.value;case"rejected":throw T.reason;default:switch(typeof T.status=="string"?T.then(S,S):(T.status="pending",T.then(function(V){T.status==="pending"&&(T.status="fulfilled",T.value=V)},function(V){T.status==="pending"&&(T.status="rejected",T.reason=V)})),T.status){case"fulfilled":return T.value;case"rejected":throw T.reason}}throw T}function ae(T,V,L,O,A){var J=typeof T;(J==="undefined"||J==="boolean")&&(T=null);var pe=!1;if(T===null)pe=!0;else switch(J){case"bigint":case"string":case"number":pe=!0;break;case"object":switch(T.$$typeof){case e:case n:pe=!0;break;case y:return pe=T._init,ae(pe(T._payload),V,L,O,A)}}if(pe)return A=A(T),pe=O===""?"."+ie(T,0):O,_(A)?(L="",pe!=null&&(L=pe.replace(F,"$&/")+"/"),ae(A,V,L,"",function(Te){return Te})):A!=null&&(H(A)&&(A=G(A,L+(A.key==null||T&&T.key===A.key?"":(""+A.key).replace(F,"$&/")+"/")+pe)),V.push(A)),1;pe=0;var he=O===""?".":O+":";if(_(T))for(var Se=0;Se<T.length;Se++)O=T[Se],J=he+ie(O,Se),pe+=ae(O,V,L,J,A);else if(Se=k(T),typeof Se=="function")for(T=Se.call(T),Se=0;!(O=T.next()).done;)O=O.value,J=he+ie(O,Se++),pe+=ae(O,V,L,J,A);else if(J==="object"){if(typeof T.then=="function")return ae(_e(T),V,L,O,A);throw V=String(T),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return pe}function fe(T,V,L){if(T==null)return T;var O=[],A=0;return ae(T,O,"","",function(J){return V.call(L,J,A++)}),O}function ge(T){if(T._status===-1){var V=T._result;V=V(),V.then(function(L){(T._status===0||T._status===-1)&&(T._status=1,T._result=L)},function(L){(T._status===0||T._status===-1)&&(T._status=2,T._result=L)}),T._status===-1&&(T._status=0,T._result=V)}if(T._status===1)return T._result.default;throw T._result}var ke=typeof reportError=="function"?reportError:function(T){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof T=="object"&&T!==null&&typeof T.message=="string"?String(T.message):String(T),error:T});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",T);return}console.error(T)},re={map:fe,forEach:function(T,V,L){fe(T,function(){V.apply(this,arguments)},L)},count:function(T){var V=0;return fe(T,function(){V++}),V},toArray:function(T){return fe(T,function(V){return V})||[]},only:function(T){if(!H(T))throw Error("React.Children.only expected to receive a single React element child.");return T}};return Ne.Activity=v,Ne.Children=re,Ne.Component=w,Ne.Fragment=o,Ne.Profiler=c,Ne.PureComponent=N,Ne.StrictMode=l,Ne.Suspense=g,Ne.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=C,Ne.__COMPILER_RUNTIME={__proto__:null,c:function(T){return C.H.useMemoCache(T)}},Ne.cache=function(T){return function(){return T.apply(null,arguments)}},Ne.cacheSignal=function(){return null},Ne.cloneElement=function(T,V,L){if(T==null)throw Error("The argument must be a React element, but you passed "+T+".");var O=E({},T.props),A=T.key;if(V!=null)for(J in V.key!==void 0&&(A=""+V.key),V)!U.call(V,J)||J==="key"||J==="__self"||J==="__source"||J==="ref"&&V.ref===void 0||(O[J]=V[J]);var J=arguments.length-2;if(J===1)O.children=L;else if(1<J){for(var pe=Array(J),he=0;he<J;he++)pe[he]=arguments[he+2];O.children=pe}return te(T.type,A,O)},Ne.createContext=function(T){return T={$$typeof:d,_currentValue:T,_currentValue2:T,_threadCount:0,Provider:null,Consumer:null},T.Provider=T,T.Consumer={$$typeof:u,_context:T},T},Ne.createElement=function(T,V,L){var O,A={},J=null;if(V!=null)for(O in V.key!==void 0&&(J=""+V.key),V)U.call(V,O)&&O!=="key"&&O!=="__self"&&O!=="__source"&&(A[O]=V[O]);var pe=arguments.length-2;if(pe===1)A.children=L;else if(1<pe){for(var he=Array(pe),Se=0;Se<pe;Se++)he[Se]=arguments[Se+2];A.children=he}if(T&&T.defaultProps)for(O in pe=T.defaultProps,pe)A[O]===void 0&&(A[O]=pe[O]);return te(T,J,A)},Ne.createRef=function(){return{current:null}},Ne.forwardRef=function(T){return{$$typeof:p,render:T}},Ne.isValidElement=H,Ne.lazy=function(T){return{$$typeof:y,_payload:{_status:-1,_result:T},_init:ge}},Ne.memo=function(T,V){return{$$typeof:h,type:T,compare:V===void 0?null:V}},Ne.startTransition=function(T){var V=C.T,L={};C.T=L;try{var O=T(),A=C.S;A!==null&&A(L,O),typeof O=="object"&&O!==null&&typeof O.then=="function"&&O.then(S,ke)}catch(J){ke(J)}finally{V!==null&&L.types!==null&&(V.types=L.types),C.T=V}},Ne.unstable_useCacheRefresh=function(){return C.H.useCacheRefresh()},Ne.use=function(T){return C.H.use(T)},Ne.useActionState=function(T,V,L){return C.H.useActionState(T,V,L)},Ne.useCallback=function(T,V){return C.H.useCallback(T,V)},Ne.useContext=function(T){return C.H.useContext(T)},Ne.useDebugValue=function(){},Ne.useDeferredValue=function(T,V){return C.H.useDeferredValue(T,V)},Ne.useEffect=function(T,V){return C.H.useEffect(T,V)},Ne.useEffectEvent=function(T){return C.H.useEffectEvent(T)},Ne.useId=function(){return C.H.useId()},Ne.useImperativeHandle=function(T,V,L){return C.H.useImperativeHandle(T,V,L)},Ne.useInsertionEffect=function(T,V){return C.H.useInsertionEffect(T,V)},Ne.useLayoutEffect=function(T,V){return C.H.useLayoutEffect(T,V)},Ne.useMemo=function(T,V){return C.H.useMemo(T,V)},Ne.useOptimistic=function(T,V){return C.H.useOptimistic(T,V)},Ne.useReducer=function(T,V,L){return C.H.useReducer(T,V,L)},Ne.useRef=function(T){return C.H.useRef(T)},Ne.useState=function(T){return C.H.useState(T)},Ne.useSyncExternalStore=function(T,V,L){return C.H.useSyncExternalStore(T,V,L)},Ne.useTransition=function(){return C.H.useTransition()},Ne.version="19.2.8",Ne}var hh;function Pf(){return hh||(hh=1,tf.exports=Gb()),tf.exports}var D=Pf();const xc=al(D);var af={exports:{}},Po={},nf={exports:{}},rf={};/**
18
- * @license React
19
- * scheduler.production.js
20
- *
21
- * Copyright (c) Meta Platforms, Inc. and affiliates.
22
- *
23
- * This source code is licensed under the MIT license found in the
24
- * LICENSE file in the root directory of this source tree.
25
- */var yh;function Fb(){return yh||(yh=1,(function(e){function n(ae,fe){var ge=ae.length;ae.push(fe);e:for(;0<ge;){var ke=ge-1>>>1,re=ae[ke];if(0<c(re,fe))ae[ke]=fe,ae[ge]=re,ge=ke;else break e}}function o(ae){return ae.length===0?null:ae[0]}function l(ae){if(ae.length===0)return null;var fe=ae[0],ge=ae.pop();if(ge!==fe){ae[0]=ge;e:for(var ke=0,re=ae.length,T=re>>>1;ke<T;){var V=2*(ke+1)-1,L=ae[V],O=V+1,A=ae[O];if(0>c(L,ge))O<re&&0>c(A,L)?(ae[ke]=A,ae[O]=ge,ke=O):(ae[ke]=L,ae[V]=ge,ke=V);else if(O<re&&0>c(A,ge))ae[ke]=A,ae[O]=ge,ke=O;else break e}}return fe}function c(ae,fe){var ge=ae.sortIndex-fe.sortIndex;return ge!==0?ge:ae.id-fe.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var d=Date,p=d.now();e.unstable_now=function(){return d.now()-p}}var g=[],h=[],y=1,v=null,j=3,k=!1,x=!1,E=!1,z=!1,w=typeof setTimeout=="function"?setTimeout:null,$=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;function R(ae){for(var fe=o(h);fe!==null;){if(fe.callback===null)l(h);else if(fe.startTime<=ae)l(h),fe.sortIndex=fe.expirationTime,n(g,fe);else break;fe=o(h)}}function _(ae){if(E=!1,R(ae),!x)if(o(g)!==null)x=!0,S||(S=!0,Y());else{var fe=o(h);fe!==null&&_e(_,fe.startTime-ae)}}var S=!1,C=-1,U=5,te=-1;function G(){return z?!0:!(e.unstable_now()-te<U)}function H(){if(z=!1,S){var ae=e.unstable_now();te=ae;var fe=!0;try{e:{x=!1,E&&(E=!1,$(C),C=-1),k=!0;var ge=j;try{t:{for(R(ae),v=o(g);v!==null&&!(v.expirationTime>ae&&G());){var ke=v.callback;if(typeof ke=="function"){v.callback=null,j=v.priorityLevel;var re=ke(v.expirationTime<=ae);if(ae=e.unstable_now(),typeof re=="function"){v.callback=re,R(ae),fe=!0;break t}v===o(g)&&l(g),R(ae)}else l(g);v=o(g)}if(v!==null)fe=!0;else{var T=o(h);T!==null&&_e(_,T.startTime-ae),fe=!1}}break e}finally{v=null,j=ge,k=!1}fe=void 0}}finally{fe?Y():S=!1}}}var Y;if(typeof N=="function")Y=function(){N(H)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,ie=F.port2;F.port1.onmessage=H,Y=function(){ie.postMessage(null)}}else Y=function(){w(H,0)};function _e(ae,fe){C=w(function(){ae(e.unstable_now())},fe)}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(ae){ae.callback=null},e.unstable_forceFrameRate=function(ae){0>ae||125<ae?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):U=0<ae?Math.floor(1e3/ae):5},e.unstable_getCurrentPriorityLevel=function(){return j},e.unstable_next=function(ae){switch(j){case 1:case 2:case 3:var fe=3;break;default:fe=j}var ge=j;j=fe;try{return ae()}finally{j=ge}},e.unstable_requestPaint=function(){z=!0},e.unstable_runWithPriority=function(ae,fe){switch(ae){case 1:case 2:case 3:case 4:case 5:break;default:ae=3}var ge=j;j=ae;try{return fe()}finally{j=ge}},e.unstable_scheduleCallback=function(ae,fe,ge){var ke=e.unstable_now();switch(typeof ge=="object"&&ge!==null?(ge=ge.delay,ge=typeof ge=="number"&&0<ge?ke+ge:ke):ge=ke,ae){case 1:var re=-1;break;case 2:re=250;break;case 5:re=1073741823;break;case 4:re=1e4;break;default:re=5e3}return re=ge+re,ae={id:y++,callback:fe,priorityLevel:ae,startTime:ge,expirationTime:re,sortIndex:-1},ge>ke?(ae.sortIndex=ge,n(h,ae),o(g)===null&&ae===o(h)&&(E?($(C),C=-1):E=!0,_e(_,ge-ke))):(ae.sortIndex=re,n(g,ae),x||k||(x=!0,S||(S=!0,Y()))),ae},e.unstable_shouldYield=G,e.unstable_wrapCallback=function(ae){var fe=j;return function(){var ge=j;j=fe;try{return ae.apply(this,arguments)}finally{j=ge}}}})(rf)),rf}var vh;function Yb(){return vh||(vh=1,nf.exports=Fb()),nf.exports}var of={exports:{}},Zt={};/**
26
- * @license React
27
- * react-dom.production.js
28
- *
29
- * Copyright (c) Meta Platforms, Inc. and affiliates.
30
- *
31
- * This source code is licensed under the MIT license found in the
32
- * LICENSE file in the root directory of this source tree.
33
- */var $h;function Kb(){if($h)return Zt;$h=1;var e=Pf();function n(g){var h="https://react.dev/errors/"+g;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)h+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+g+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var l={d:{f:o,r:function(){throw Error(n(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},c=Symbol.for("react.portal");function u(g,h,y){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:v==null?null:""+v,children:g,containerInfo:h,implementation:y}}var d=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function p(g,h){if(g==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Zt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=l,Zt.createPortal=function(g,h){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(n(299));return u(g,h,null,y)},Zt.flushSync=function(g){var h=d.T,y=l.p;try{if(d.T=null,l.p=2,g)return g()}finally{d.T=h,l.p=y,l.d.f()}},Zt.preconnect=function(g,h){typeof g=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,l.d.C(g,h))},Zt.prefetchDNS=function(g){typeof g=="string"&&l.d.D(g)},Zt.preinit=function(g,h){if(typeof g=="string"&&h&&typeof h.as=="string"){var y=h.as,v=p(y,h.crossOrigin),j=typeof h.integrity=="string"?h.integrity:void 0,k=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;y==="style"?l.d.S(g,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:v,integrity:j,fetchPriority:k}):y==="script"&&l.d.X(g,{crossOrigin:v,integrity:j,fetchPriority:k,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Zt.preinitModule=function(g,h){if(typeof g=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var y=p(h.as,h.crossOrigin);l.d.M(g,{crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&l.d.M(g)},Zt.preload=function(g,h){if(typeof g=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var y=h.as,v=p(y,h.crossOrigin);l.d.L(g,y,{crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},Zt.preloadModule=function(g,h){if(typeof g=="string")if(h){var y=p(h.as,h.crossOrigin);l.d.m(g,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else l.d.m(g)},Zt.requestFormReset=function(g){l.d.r(g)},Zt.unstable_batchedUpdates=function(g,h){return g(h)},Zt.useFormState=function(g,h,y){return d.H.useFormState(g,h,y)},Zt.useFormStatus=function(){return d.H.useHostTransitionStatus()},Zt.version="19.2.8",Zt}var bh;function Jb(){if(bh)return of.exports;bh=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),of.exports=Kb(),of.exports}/**
34
- * @license React
35
- * react-dom-client.production.js
36
- *
37
- * Copyright (c) Meta Platforms, Inc. and affiliates.
38
- *
39
- * This source code is licensed under the MIT license found in the
40
- * LICENSE file in the root directory of this source tree.
41
- */var xh;function Xb(){if(xh)return Po;xh=1;var e=Yb(),n=Pf(),o=Jb();function l(t){var a="https://react.dev/errors/"+t;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)a+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+t+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function u(t){var a=t,r=t;if(t.alternate)for(;a.return;)a=a.return;else{t=a;do a=t,(a.flags&4098)!==0&&(r=a.return),t=a.return;while(t)}return a.tag===3?r:null}function d(t){if(t.tag===13){var a=t.memoizedState;if(a===null&&(t=t.alternate,t!==null&&(a=t.memoizedState)),a!==null)return a.dehydrated}return null}function p(t){if(t.tag===31){var a=t.memoizedState;if(a===null&&(t=t.alternate,t!==null&&(a=t.memoizedState)),a!==null)return a.dehydrated}return null}function g(t){if(u(t)!==t)throw Error(l(188))}function h(t){var a=t.alternate;if(!a){if(a=u(t),a===null)throw Error(l(188));return a!==t?null:t}for(var r=t,s=a;;){var f=r.return;if(f===null)break;var m=f.alternate;if(m===null){if(s=f.return,s!==null){r=s;continue}break}if(f.child===m.child){for(m=f.child;m;){if(m===r)return g(f),t;if(m===s)return g(f),a;m=m.sibling}throw Error(l(188))}if(r.return!==s.return)r=f,s=m;else{for(var b=!1,M=f.child;M;){if(M===r){b=!0,r=f,s=m;break}if(M===s){b=!0,s=f,r=m;break}M=M.sibling}if(!b){for(M=m.child;M;){if(M===r){b=!0,r=m,s=f;break}if(M===s){b=!0,s=m,r=f;break}M=M.sibling}if(!b)throw Error(l(189))}}if(r.alternate!==s)throw Error(l(190))}if(r.tag!==3)throw Error(l(188));return r.stateNode.current===r?t:a}function y(t){var a=t.tag;if(a===5||a===26||a===27||a===6)return t;for(t=t.child;t!==null;){if(a=y(t),a!==null)return a;t=t.sibling}return null}var v=Object.assign,j=Symbol.for("react.element"),k=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),z=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),$=Symbol.for("react.consumer"),N=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),S=Symbol.for("react.suspense_list"),C=Symbol.for("react.memo"),U=Symbol.for("react.lazy"),te=Symbol.for("react.activity"),G=Symbol.for("react.memo_cache_sentinel"),H=Symbol.iterator;function Y(t){return t===null||typeof t!="object"?null:(t=H&&t[H]||t["@@iterator"],typeof t=="function"?t:null)}var F=Symbol.for("react.client.reference");function ie(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===F?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case E:return"Fragment";case w:return"Profiler";case z:return"StrictMode";case _:return"Suspense";case S:return"SuspenseList";case te:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case x:return"Portal";case N:return t.displayName||"Context";case $:return(t._context.displayName||"Context")+".Consumer";case R:var a=t.render;return t=t.displayName,t||(t=a.displayName||a.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case C:return a=t.displayName||null,a!==null?a:ie(t.type)||"Memo";case U:a=t._payload,t=t._init;try{return ie(t(a))}catch{}}return null}var _e=Array.isArray,ae=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,fe=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ge={pending:!1,data:null,method:null,action:null},ke=[],re=-1;function T(t){return{current:t}}function V(t){0>re||(t.current=ke[re],ke[re]=null,re--)}function L(t,a){re++,ke[re]=t.current,t.current=a}var O=T(null),A=T(null),J=T(null),pe=T(null);function he(t,a){switch(L(J,a),L(A,t),L(O,null),a.nodeType){case 9:case 11:t=(t=a.documentElement)&&(t=t.namespaceURI)?Dm(t):0;break;default:if(t=a.tagName,a=a.namespaceURI)a=Dm(a),t=Um(a,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}V(O),L(O,t)}function Se(){V(O),V(A),V(J)}function Te(t){t.memoizedState!==null&&L(pe,t);var a=O.current,r=Um(a,t.type);a!==r&&(L(A,t),L(O,r))}function P(t){A.current===t&&(V(O),V(A)),pe.current===t&&(V(pe),Lo._currentValue=ge)}var W,ue;function me(t){if(W===void 0)try{throw Error()}catch(r){var a=r.stack.trim().match(/\n( *(at )?)/);W=a&&a[1]||"",ue=-1<r.stack.indexOf(`
42
- at`)?" (<anonymous>)":-1<r.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+W+t+ue}var ve=!1;function ze(t,a){if(!t||ve)return"";ve=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(a){var ce=function(){throw Error()};if(Object.defineProperty(ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ce,[])}catch(ne){var ee=ne}Reflect.construct(t,[],ce)}else{try{ce.call()}catch(ne){ee=ne}t.call(ce.prototype)}}else{try{throw Error()}catch(ne){ee=ne}(ce=t())&&typeof ce.catch=="function"&&ce.catch(function(){})}}catch(ne){if(ne&&ee&&typeof ne.stack=="string")return[ne.stack,ee.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=s.DetermineComponentFrameRoot(),b=m[0],M=m[1];if(b&&M){var I=b.split(`
44
- `),X=M.split(`
45
- `);for(f=s=0;s<I.length&&!I[s].includes("DetermineComponentFrameRoot");)s++;for(;f<X.length&&!X[f].includes("DetermineComponentFrameRoot");)f++;if(s===I.length||f===X.length)for(s=I.length-1,f=X.length-1;1<=s&&0<=f&&I[s]!==X[f];)f--;for(;1<=s&&0<=f;s--,f--)if(I[s]!==X[f]){if(s!==1||f!==1)do if(s--,f--,0>f||I[s]!==X[f]){var oe=`
46
- `+I[s].replace(" at new "," at ");return t.displayName&&oe.includes("<anonymous>")&&(oe=oe.replace("<anonymous>",t.displayName)),oe}while(1<=s&&0<=f);break}}}finally{ve=!1,Error.prepareStackTrace=r}return(r=t?t.displayName||t.name:"")?me(r):""}function zt(t,a){switch(t.tag){case 26:case 27:case 5:return me(t.type);case 16:return me("Lazy");case 13:return t.child!==a&&a!==null?me("Suspense Fallback"):me("Suspense");case 19:return me("SuspenseList");case 0:case 15:return ze(t.type,!1);case 11:return ze(t.type.render,!1);case 1:return ze(t.type,!0);case 31:return me("Activity");default:return""}}function Qt(t){try{var a="",r=null;do a+=zt(t,r),r=t,t=t.return;while(t);return a}catch(s){return`
47
- Error generating stack: `+s.message+`
48
- `+s.stack}}var Ct=Object.prototype.hasOwnProperty,Tt=e.unstable_scheduleCallback,ht=e.unstable_cancelCallback,_n=e.unstable_shouldYield,Wt=e.unstable_requestPaint,Dt=e.unstable_now,Ki=e.unstable_getCurrentPriorityLevel,jn=e.unstable_ImmediatePriority,Fr=e.unstable_UserBlockingPriority,xr=e.unstable_NormalPriority,sl=e.unstable_LowPriority,cl=e.unstable_IdlePriority,S$=e.log,w$=e.unstable_setDisableYieldValue,Ji=null,da=null;function Sn(t){if(typeof S$=="function"&&w$(t),da&&typeof da.setStrictMode=="function")try{da.setStrictMode(Ji,t)}catch{}}var fa=Math.clz32?Math.clz32:z$,k$=Math.log,N$=Math.LN2;function z$(t){return t>>>=0,t===0?32:31-(k$(t)/N$|0)|0}var ul=256,dl=262144,fl=4194304;function _r(t){var a=t&42;if(a!==0)return a;switch(t&-t){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 t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function pl(t,a,r){var s=t.pendingLanes;if(s===0)return 0;var f=0,m=t.suspendedLanes,b=t.pingedLanes;t=t.warmLanes;var M=s&134217727;return M!==0?(s=M&~m,s!==0?f=_r(s):(b&=M,b!==0?f=_r(b):r||(r=M&~t,r!==0&&(f=_r(r))))):(M=s&~m,M!==0?f=_r(M):b!==0?f=_r(b):r||(r=s&~t,r!==0&&(f=_r(r)))),f===0?0:a!==0&&a!==f&&(a&m)===0&&(m=f&-f,r=a&-a,m>=r||m===32&&(r&4194048)!==0)?a:f}function Xi(t,a){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&a)===0}function E$(t,a){switch(t){case 1:case 2:case 4:case 8:case 64:return a+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 a+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 yp(){var t=fl;return fl<<=1,(fl&62914560)===0&&(fl=4194304),t}function Hc(t){for(var a=[],r=0;31>r;r++)a.push(t);return a}function Qi(t,a){t.pendingLanes|=a,a!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function C$(t,a,r,s,f,m){var b=t.pendingLanes;t.pendingLanes=r,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=r,t.entangledLanes&=r,t.errorRecoveryDisabledLanes&=r,t.shellSuspendCounter=0;var M=t.entanglements,I=t.expirationTimes,X=t.hiddenUpdates;for(r=b&~r;0<r;){var oe=31-fa(r),ce=1<<oe;M[oe]=0,I[oe]=-1;var ee=X[oe];if(ee!==null)for(X[oe]=null,oe=0;oe<ee.length;oe++){var ne=ee[oe];ne!==null&&(ne.lane&=-536870913)}r&=~ce}s!==0&&vp(t,s,0),m!==0&&f===0&&t.tag!==0&&(t.suspendedLanes|=m&~(b&~a))}function vp(t,a,r){t.pendingLanes|=a,t.suspendedLanes&=~a;var s=31-fa(a);t.entangledLanes|=a,t.entanglements[s]=t.entanglements[s]|1073741824|r&261930}function $p(t,a){var r=t.entangledLanes|=a;for(t=t.entanglements;r;){var s=31-fa(r),f=1<<s;f&a|t[s]&a&&(t[s]|=a),r&=~f}}function bp(t,a){var r=a&-a;return r=(r&42)!==0?1:qc(r),(r&(t.suspendedLanes|a))!==0?0:r}function qc(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function Pc(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function xp(){var t=fe.p;return t!==0?t:(t=window.event,t===void 0?32:oh(t.type))}function _p(t,a){var r=fe.p;try{return fe.p=t,a()}finally{fe.p=r}}var wn=Math.random().toString(36).slice(2),Ut="__reactFiber$"+wn,ea="__reactProps$"+wn,Yr="__reactContainer$"+wn,Zc="__reactEvents$"+wn,T$="__reactListeners$"+wn,M$="__reactHandles$"+wn,jp="__reactResources$"+wn,Wi="__reactMarker$"+wn;function Gc(t){delete t[Ut],delete t[ea],delete t[Zc],delete t[T$],delete t[M$]}function Kr(t){var a=t[Ut];if(a)return a;for(var r=t.parentNode;r;){if(a=r[Yr]||r[Ut]){if(r=a.alternate,a.child!==null||r!==null&&r.child!==null)for(t=Pm(t);t!==null;){if(r=t[Ut])return r;t=Pm(t)}return a}t=r,r=t.parentNode}return null}function Jr(t){if(t=t[Ut]||t[Yr]){var a=t.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return t}return null}function eo(t){var a=t.tag;if(a===5||a===26||a===27||a===6)return t.stateNode;throw Error(l(33))}function Xr(t){var a=t[jp];return a||(a=t[jp]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function Mt(t){t[Wi]=!0}var Sp=new Set,wp={};function jr(t,a){Qr(t,a),Qr(t+"Capture",a)}function Qr(t,a){for(wp[t]=a,t=0;t<a.length;t++)Sp.add(a[t])}var O$=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]*$"),kp={},Np={};function R$(t){return Ct.call(Np,t)?!0:Ct.call(kp,t)?!1:O$.test(t)?Np[t]=!0:(kp[t]=!0,!1)}function gl(t,a,r){if(R$(a))if(r===null)t.removeAttribute(a);else{switch(typeof r){case"undefined":case"function":case"symbol":t.removeAttribute(a);return;case"boolean":var s=a.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){t.removeAttribute(a);return}}t.setAttribute(a,""+r)}}function ml(t,a,r){if(r===null)t.removeAttribute(a);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}t.setAttribute(a,""+r)}}function Ya(t,a,r,s){if(s===null)t.removeAttribute(r);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(r);return}t.setAttributeNS(a,r,""+s)}}function ja(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function zp(t){var a=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function A$(t,a,r){var s=Object.getOwnPropertyDescriptor(t.constructor.prototype,a);if(!t.hasOwnProperty(a)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var f=s.get,m=s.set;return Object.defineProperty(t,a,{configurable:!0,get:function(){return f.call(this)},set:function(b){r=""+b,m.call(this,b)}}),Object.defineProperty(t,a,{enumerable:s.enumerable}),{getValue:function(){return r},setValue:function(b){r=""+b},stopTracking:function(){t._valueTracker=null,delete t[a]}}}}function Fc(t){if(!t._valueTracker){var a=zp(t)?"checked":"value";t._valueTracker=A$(t,a,""+t[a])}}function Ep(t){if(!t)return!1;var a=t._valueTracker;if(!a)return!0;var r=a.getValue(),s="";return t&&(s=zp(t)?t.checked?"true":"false":t.value),t=s,t!==r?(a.setValue(t),!0):!1}function hl(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var D$=/[\n"\\]/g;function Sa(t){return t.replace(D$,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function Yc(t,a,r,s,f,m,b,M){t.name="",b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?t.type=b:t.removeAttribute("type"),a!=null?b==="number"?(a===0&&t.value===""||t.value!=a)&&(t.value=""+ja(a)):t.value!==""+ja(a)&&(t.value=""+ja(a)):b!=="submit"&&b!=="reset"||t.removeAttribute("value"),a!=null?Kc(t,b,ja(a)):r!=null?Kc(t,b,ja(r)):s!=null&&t.removeAttribute("value"),f==null&&m!=null&&(t.defaultChecked=!!m),f!=null&&(t.checked=f&&typeof f!="function"&&typeof f!="symbol"),M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?t.name=""+ja(M):t.removeAttribute("name")}function Cp(t,a,r,s,f,m,b,M){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(t.type=m),a!=null||r!=null){if(!(m!=="submit"&&m!=="reset"||a!=null)){Fc(t);return}r=r!=null?""+ja(r):"",a=a!=null?""+ja(a):r,M||a===t.value||(t.value=a),t.defaultValue=a}s=s??f,s=typeof s!="function"&&typeof s!="symbol"&&!!s,t.checked=M?t.checked:!!s,t.defaultChecked=!!s,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(t.name=b),Fc(t)}function Kc(t,a,r){a==="number"&&hl(t.ownerDocument)===t||t.defaultValue===""+r||(t.defaultValue=""+r)}function Wr(t,a,r,s){if(t=t.options,a){a={};for(var f=0;f<r.length;f++)a["$"+r[f]]=!0;for(r=0;r<t.length;r++)f=a.hasOwnProperty("$"+t[r].value),t[r].selected!==f&&(t[r].selected=f),f&&s&&(t[r].defaultSelected=!0)}else{for(r=""+ja(r),a=null,f=0;f<t.length;f++){if(t[f].value===r){t[f].selected=!0,s&&(t[f].defaultSelected=!0);return}a!==null||t[f].disabled||(a=t[f])}a!==null&&(a.selected=!0)}}function Tp(t,a,r){if(a!=null&&(a=""+ja(a),a!==t.value&&(t.value=a),r==null)){t.defaultValue!==a&&(t.defaultValue=a);return}t.defaultValue=r!=null?""+ja(r):""}function Mp(t,a,r,s){if(a==null){if(s!=null){if(r!=null)throw Error(l(92));if(_e(s)){if(1<s.length)throw Error(l(93));s=s[0]}r=s}r==null&&(r=""),a=r}r=ja(a),t.defaultValue=r,s=t.textContent,s===r&&s!==""&&s!==null&&(t.value=s),Fc(t)}function ei(t,a){if(a){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=a;return}}t.textContent=a}var U$=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 Op(t,a,r){var s=a.indexOf("--")===0;r==null||typeof r=="boolean"||r===""?s?t.setProperty(a,""):a==="float"?t.cssFloat="":t[a]="":s?t.setProperty(a,r):typeof r!="number"||r===0||U$.has(a)?a==="float"?t.cssFloat=r:t[a]=(""+r).trim():t[a]=r+"px"}function Rp(t,a,r){if(a!=null&&typeof a!="object")throw Error(l(62));if(t=t.style,r!=null){for(var s in r)!r.hasOwnProperty(s)||a!=null&&a.hasOwnProperty(s)||(s.indexOf("--")===0?t.setProperty(s,""):s==="float"?t.cssFloat="":t[s]="");for(var f in a)s=a[f],a.hasOwnProperty(f)&&r[f]!==s&&Op(t,f,s)}else for(var m in a)a.hasOwnProperty(m)&&Op(t,m,a[m])}function Jc(t){if(t.indexOf("-")===-1)return!1;switch(t){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 I$=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"]]),L$=/^[\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 yl(t){return L$.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Ka(){}var Xc=null;function Qc(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var ti=null,ai=null;function Ap(t){var a=Jr(t);if(a&&(t=a.stateNode)){var r=t[ea]||null;e:switch(t=a.stateNode,a.type){case"input":if(Yc(t,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name),a=r.name,r.type==="radio"&&a!=null){for(r=t;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll('input[name="'+Sa(""+a)+'"][type="radio"]'),a=0;a<r.length;a++){var s=r[a];if(s!==t&&s.form===t.form){var f=s[ea]||null;if(!f)throw Error(l(90));Yc(s,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(a=0;a<r.length;a++)s=r[a],s.form===t.form&&Ep(s)}break e;case"textarea":Tp(t,r.value,r.defaultValue);break e;case"select":a=r.value,a!=null&&Wr(t,!!r.multiple,a,!1)}}}var Wc=!1;function Dp(t,a,r){if(Wc)return t(a,r);Wc=!0;try{var s=t(a);return s}finally{if(Wc=!1,(ti!==null||ai!==null)&&(rs(),ti&&(a=ti,t=ai,ai=ti=null,Ap(a),t)))for(a=0;a<t.length;a++)Ap(t[a])}}function to(t,a){var r=t.stateNode;if(r===null)return null;var s=r[ea]||null;if(s===null)return null;r=s[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(t=t.type,s=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!s;break e;default:t=!1}if(t)return null;if(r&&typeof r!="function")throw Error(l(231,a,typeof r));return r}var Ja=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),eu=!1;if(Ja)try{var ao={};Object.defineProperty(ao,"passive",{get:function(){eu=!0}}),window.addEventListener("test",ao,ao),window.removeEventListener("test",ao,ao)}catch{eu=!1}var kn=null,tu=null,vl=null;function Up(){if(vl)return vl;var t,a=tu,r=a.length,s,f="value"in kn?kn.value:kn.textContent,m=f.length;for(t=0;t<r&&a[t]===f[t];t++);var b=r-t;for(s=1;s<=b&&a[r-s]===f[m-s];s++);return vl=f.slice(t,1<s?1-s:void 0)}function $l(t){var a=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&a===13&&(t=13)):t=a,t===10&&(t=13),32<=t||t===13?t:0}function bl(){return!0}function Ip(){return!1}function ta(t){function a(r,s,f,m,b){this._reactName=r,this._targetInst=f,this.type=s,this.nativeEvent=m,this.target=b,this.currentTarget=null;for(var M in t)t.hasOwnProperty(M)&&(r=t[M],this[M]=r?r(m):m[M]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?bl:Ip,this.isPropagationStopped=Ip,this}return v(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=bl)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=bl)},persist:function(){},isPersistent:bl}),a}var Sr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},xl=ta(Sr),no=v({},Sr,{view:0,detail:0}),V$=ta(no),au,nu,ro,_l=v({},no,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:iu,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==ro&&(ro&&t.type==="mousemove"?(au=t.screenX-ro.screenX,nu=t.screenY-ro.screenY):nu=au=0,ro=t),au)},movementY:function(t){return"movementY"in t?t.movementY:nu}}),Lp=ta(_l),B$=v({},_l,{dataTransfer:0}),H$=ta(B$),q$=v({},no,{relatedTarget:0}),ru=ta(q$),P$=v({},Sr,{animationName:0,elapsedTime:0,pseudoElement:0}),Z$=ta(P$),G$=v({},Sr,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),F$=ta(G$),Y$=v({},Sr,{data:0}),Vp=ta(Y$),K$={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},J$={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"},X$={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Q$(t){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(t):(t=X$[t])?!!a[t]:!1}function iu(){return Q$}var W$=v({},no,{key:function(t){if(t.key){var a=K$[t.key]||t.key;if(a!=="Unidentified")return a}return t.type==="keypress"?(t=$l(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?J$[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:iu,charCode:function(t){return t.type==="keypress"?$l(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?$l(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),e2=ta(W$),t2=v({},_l,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Bp=ta(t2),a2=v({},no,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:iu}),n2=ta(a2),r2=v({},Sr,{propertyName:0,elapsedTime:0,pseudoElement:0}),i2=ta(r2),o2=v({},_l,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),l2=ta(o2),s2=v({},Sr,{newState:0,oldState:0}),c2=ta(s2),u2=[9,13,27,32],ou=Ja&&"CompositionEvent"in window,io=null;Ja&&"documentMode"in document&&(io=document.documentMode);var d2=Ja&&"TextEvent"in window&&!io,Hp=Ja&&(!ou||io&&8<io&&11>=io),qp=" ",Pp=!1;function Zp(t,a){switch(t){case"keyup":return u2.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Gp(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var ni=!1;function f2(t,a){switch(t){case"compositionend":return Gp(a);case"keypress":return a.which!==32?null:(Pp=!0,qp);case"textInput":return t=a.data,t===qp&&Pp?null:t;default:return null}}function p2(t,a){if(ni)return t==="compositionend"||!ou&&Zp(t,a)?(t=Up(),vl=tu=kn=null,ni=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return Hp&&a.locale!=="ko"?null:a.data;default:return null}}var g2={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 Fp(t){var a=t&&t.nodeName&&t.nodeName.toLowerCase();return a==="input"?!!g2[t.type]:a==="textarea"}function Yp(t,a,r,s){ti?ai?ai.push(s):ai=[s]:ti=s,a=ds(a,"onChange"),0<a.length&&(r=new xl("onChange","change",null,r,s),t.push({event:r,listeners:a}))}var oo=null,lo=null;function m2(t){Cm(t,0)}function jl(t){var a=eo(t);if(Ep(a))return t}function Kp(t,a){if(t==="change")return a}var Jp=!1;if(Ja){var lu;if(Ja){var su="oninput"in document;if(!su){var Xp=document.createElement("div");Xp.setAttribute("oninput","return;"),su=typeof Xp.oninput=="function"}lu=su}else lu=!1;Jp=lu&&(!document.documentMode||9<document.documentMode)}function Qp(){oo&&(oo.detachEvent("onpropertychange",Wp),lo=oo=null)}function Wp(t){if(t.propertyName==="value"&&jl(lo)){var a=[];Yp(a,lo,t,Qc(t)),Dp(m2,a)}}function h2(t,a,r){t==="focusin"?(Qp(),oo=a,lo=r,oo.attachEvent("onpropertychange",Wp)):t==="focusout"&&Qp()}function y2(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return jl(lo)}function v2(t,a){if(t==="click")return jl(a)}function $2(t,a){if(t==="input"||t==="change")return jl(a)}function b2(t,a){return t===a&&(t!==0||1/t===1/a)||t!==t&&a!==a}var pa=typeof Object.is=="function"?Object.is:b2;function so(t,a){if(pa(t,a))return!0;if(typeof t!="object"||t===null||typeof a!="object"||a===null)return!1;var r=Object.keys(t),s=Object.keys(a);if(r.length!==s.length)return!1;for(s=0;s<r.length;s++){var f=r[s];if(!Ct.call(a,f)||!pa(t[f],a[f]))return!1}return!0}function e0(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function t0(t,a){var r=e0(t);t=0;for(var s;r;){if(r.nodeType===3){if(s=t+r.textContent.length,t<=a&&s>=a)return{node:r,offset:a-t};t=s}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=e0(r)}}function a0(t,a){return t&&a?t===a?!0:t&&t.nodeType===3?!1:a&&a.nodeType===3?a0(t,a.parentNode):"contains"in t?t.contains(a):t.compareDocumentPosition?!!(t.compareDocumentPosition(a)&16):!1:!1}function n0(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var a=hl(t.document);a instanceof t.HTMLIFrameElement;){try{var r=typeof a.contentWindow.location.href=="string"}catch{r=!1}if(r)t=a.contentWindow;else break;a=hl(t.document)}return a}function cu(t){var a=t&&t.nodeName&&t.nodeName.toLowerCase();return a&&(a==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||a==="textarea"||t.contentEditable==="true")}var x2=Ja&&"documentMode"in document&&11>=document.documentMode,ri=null,uu=null,co=null,du=!1;function r0(t,a,r){var s=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;du||ri==null||ri!==hl(s)||(s=ri,"selectionStart"in s&&cu(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),co&&so(co,s)||(co=s,s=ds(uu,"onSelect"),0<s.length&&(a=new xl("onSelect","select",null,a,r),t.push({event:a,listeners:s}),a.target=ri)))}function wr(t,a){var r={};return r[t.toLowerCase()]=a.toLowerCase(),r["Webkit"+t]="webkit"+a,r["Moz"+t]="moz"+a,r}var ii={animationend:wr("Animation","AnimationEnd"),animationiteration:wr("Animation","AnimationIteration"),animationstart:wr("Animation","AnimationStart"),transitionrun:wr("Transition","TransitionRun"),transitionstart:wr("Transition","TransitionStart"),transitioncancel:wr("Transition","TransitionCancel"),transitionend:wr("Transition","TransitionEnd")},fu={},i0={};Ja&&(i0=document.createElement("div").style,"AnimationEvent"in window||(delete ii.animationend.animation,delete ii.animationiteration.animation,delete ii.animationstart.animation),"TransitionEvent"in window||delete ii.transitionend.transition);function kr(t){if(fu[t])return fu[t];if(!ii[t])return t;var a=ii[t],r;for(r in a)if(a.hasOwnProperty(r)&&r in i0)return fu[t]=a[r];return t}var o0=kr("animationend"),l0=kr("animationiteration"),s0=kr("animationstart"),_2=kr("transitionrun"),j2=kr("transitionstart"),S2=kr("transitioncancel"),c0=kr("transitionend"),u0=new Map,pu="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(" ");pu.push("scrollEnd");function Ra(t,a){u0.set(t,a),jr(a,[t])}var Sl=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},wa=[],oi=0,gu=0;function wl(){for(var t=oi,a=gu=oi=0;a<t;){var r=wa[a];wa[a++]=null;var s=wa[a];wa[a++]=null;var f=wa[a];wa[a++]=null;var m=wa[a];if(wa[a++]=null,s!==null&&f!==null){var b=s.pending;b===null?f.next=f:(f.next=b.next,b.next=f),s.pending=f}m!==0&&d0(r,f,m)}}function kl(t,a,r,s){wa[oi++]=t,wa[oi++]=a,wa[oi++]=r,wa[oi++]=s,gu|=s,t.lanes|=s,t=t.alternate,t!==null&&(t.lanes|=s)}function mu(t,a,r,s){return kl(t,a,r,s),Nl(t)}function Nr(t,a){return kl(t,null,null,a),Nl(t)}function d0(t,a,r){t.lanes|=r;var s=t.alternate;s!==null&&(s.lanes|=r);for(var f=!1,m=t.return;m!==null;)m.childLanes|=r,s=m.alternate,s!==null&&(s.childLanes|=r),m.tag===22&&(t=m.stateNode,t===null||t._visibility&1||(f=!0)),t=m,m=m.return;return t.tag===3?(m=t.stateNode,f&&a!==null&&(f=31-fa(r),t=m.hiddenUpdates,s=t[f],s===null?t[f]=[a]:s.push(a),a.lane=r|536870912),m):null}function Nl(t){if(50<Mo)throw Mo=0,Sd=null,Error(l(185));for(var a=t.return;a!==null;)t=a,a=t.return;return t.tag===3?t.stateNode:null}var li={};function w2(t,a,r,s){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ga(t,a,r,s){return new w2(t,a,r,s)}function hu(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Xa(t,a){var r=t.alternate;return r===null?(r=ga(t.tag,a,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=a,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=t.flags&65011712,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,a=t.dependencies,r.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r.refCleanup=t.refCleanup,r}function f0(t,a){t.flags&=65011714;var r=t.alternate;return r===null?(t.childLanes=0,t.lanes=a,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=r.childLanes,t.lanes=r.lanes,t.child=r.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=r.memoizedProps,t.memoizedState=r.memoizedState,t.updateQueue=r.updateQueue,t.type=r.type,a=r.dependencies,t.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),t}function zl(t,a,r,s,f,m){var b=0;if(s=t,typeof t=="function")hu(t)&&(b=1);else if(typeof t=="string")b=Cb(t,r,O.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case te:return t=ga(31,r,a,f),t.elementType=te,t.lanes=m,t;case E:return zr(r.children,f,m,a);case z:b=8,f|=24;break;case w:return t=ga(12,r,a,f|2),t.elementType=w,t.lanes=m,t;case _:return t=ga(13,r,a,f),t.elementType=_,t.lanes=m,t;case S:return t=ga(19,r,a,f),t.elementType=S,t.lanes=m,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case N:b=10;break e;case $:b=9;break e;case R:b=11;break e;case C:b=14;break e;case U:b=16,s=null;break e}b=29,r=Error(l(130,t===null?"null":typeof t,"")),s=null}return a=ga(b,r,a,f),a.elementType=t,a.type=s,a.lanes=m,a}function zr(t,a,r,s){return t=ga(7,t,s,a),t.lanes=r,t}function yu(t,a,r){return t=ga(6,t,null,a),t.lanes=r,t}function p0(t){var a=ga(18,null,null,0);return a.stateNode=t,a}function vu(t,a,r){return a=ga(4,t.children!==null?t.children:[],t.key,a),a.lanes=r,a.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},a}var g0=new WeakMap;function ka(t,a){if(typeof t=="object"&&t!==null){var r=g0.get(t);return r!==void 0?r:(a={value:t,source:a,stack:Qt(a)},g0.set(t,a),a)}return{value:t,source:a,stack:Qt(a)}}var si=[],ci=0,El=null,uo=0,Na=[],za=0,Nn=null,Va=1,Ba="";function Qa(t,a){si[ci++]=uo,si[ci++]=El,El=t,uo=a}function m0(t,a,r){Na[za++]=Va,Na[za++]=Ba,Na[za++]=Nn,Nn=t;var s=Va;t=Ba;var f=32-fa(s)-1;s&=~(1<<f),r+=1;var m=32-fa(a)+f;if(30<m){var b=f-f%5;m=(s&(1<<b)-1).toString(32),s>>=b,f-=b,Va=1<<32-fa(a)+f|r<<f|s,Ba=m+t}else Va=1<<m|r<<f|s,Ba=t}function $u(t){t.return!==null&&(Qa(t,1),m0(t,1,0))}function bu(t){for(;t===El;)El=si[--ci],si[ci]=null,uo=si[--ci],si[ci]=null;for(;t===Nn;)Nn=Na[--za],Na[za]=null,Ba=Na[--za],Na[za]=null,Va=Na[--za],Na[za]=null}function h0(t,a){Na[za++]=Va,Na[za++]=Ba,Na[za++]=Nn,Va=a.id,Ba=a.overflow,Nn=t}var It=null,rt=null,Le=!1,zn=null,Ea=!1,xu=Error(l(519));function En(t){var a=Error(l(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw fo(ka(a,t)),xu}function y0(t){var a=t.stateNode,r=t.type,s=t.memoizedProps;switch(a[Ut]=t,a[ea]=s,r){case"dialog":De("cancel",a),De("close",a);break;case"iframe":case"object":case"embed":De("load",a);break;case"video":case"audio":for(r=0;r<Ro.length;r++)De(Ro[r],a);break;case"source":De("error",a);break;case"img":case"image":case"link":De("error",a),De("load",a);break;case"details":De("toggle",a);break;case"input":De("invalid",a),Cp(a,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":De("invalid",a);break;case"textarea":De("invalid",a),Mp(a,s.value,s.defaultValue,s.children)}r=s.children,typeof r!="string"&&typeof r!="number"&&typeof r!="bigint"||a.textContent===""+r||s.suppressHydrationWarning===!0||Rm(a.textContent,r)?(s.popover!=null&&(De("beforetoggle",a),De("toggle",a)),s.onScroll!=null&&De("scroll",a),s.onScrollEnd!=null&&De("scrollend",a),s.onClick!=null&&(a.onclick=Ka),a=!0):a=!1,a||En(t,!0)}function v0(t){for(It=t.return;It;)switch(It.tag){case 5:case 31:case 13:Ea=!1;return;case 27:case 3:Ea=!0;return;default:It=It.return}}function ui(t){if(t!==It)return!1;if(!Le)return v0(t),Le=!0,!1;var a=t.tag,r;if((r=a!==3&&a!==27)&&((r=a===5)&&(r=t.type,r=!(r!=="form"&&r!=="button")||Ld(t.type,t.memoizedProps)),r=!r),r&&rt&&En(t),v0(t),a===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(317));rt=qm(t)}else if(a===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(317));rt=qm(t)}else a===27?(a=rt,qn(t.type)?(t=Pd,Pd=null,rt=t):rt=a):rt=It?Ta(t.stateNode.nextSibling):null;return!0}function Er(){rt=It=null,Le=!1}function _u(){var t=zn;return t!==null&&(ia===null?ia=t:ia.push.apply(ia,t),zn=null),t}function fo(t){zn===null?zn=[t]:zn.push(t)}var ju=T(null),Cr=null,Wa=null;function Cn(t,a,r){L(ju,a._currentValue),a._currentValue=r}function en(t){t._currentValue=ju.current,V(ju)}function Su(t,a,r){for(;t!==null;){var s=t.alternate;if((t.childLanes&a)!==a?(t.childLanes|=a,s!==null&&(s.childLanes|=a)):s!==null&&(s.childLanes&a)!==a&&(s.childLanes|=a),t===r)break;t=t.return}}function wu(t,a,r,s){var f=t.child;for(f!==null&&(f.return=t);f!==null;){var m=f.dependencies;if(m!==null){var b=f.child;m=m.firstContext;e:for(;m!==null;){var M=m;m=f;for(var I=0;I<a.length;I++)if(M.context===a[I]){m.lanes|=r,M=m.alternate,M!==null&&(M.lanes|=r),Su(m.return,r,t),s||(b=null);break e}m=M.next}}else if(f.tag===18){if(b=f.return,b===null)throw Error(l(341));b.lanes|=r,m=b.alternate,m!==null&&(m.lanes|=r),Su(b,r,t),b=null}else b=f.child;if(b!==null)b.return=f;else for(b=f;b!==null;){if(b===t){b=null;break}if(f=b.sibling,f!==null){f.return=b.return,b=f;break}b=b.return}f=b}}function di(t,a,r,s){t=null;for(var f=a,m=!1;f!==null;){if(!m){if((f.flags&524288)!==0)m=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var b=f.alternate;if(b===null)throw Error(l(387));if(b=b.memoizedProps,b!==null){var M=f.type;pa(f.pendingProps.value,b.value)||(t!==null?t.push(M):t=[M])}}else if(f===pe.current){if(b=f.alternate,b===null)throw Error(l(387));b.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(t!==null?t.push(Lo):t=[Lo])}f=f.return}t!==null&&wu(a,t,r,s),a.flags|=262144}function Cl(t){for(t=t.firstContext;t!==null;){if(!pa(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Tr(t){Cr=t,Wa=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Lt(t){return $0(Cr,t)}function Tl(t,a){return Cr===null&&Tr(t),$0(t,a)}function $0(t,a){var r=a._currentValue;if(a={context:a,memoizedValue:r,next:null},Wa===null){if(t===null)throw Error(l(308));Wa=a,t.dependencies={lanes:0,firstContext:a},t.flags|=524288}else Wa=Wa.next=a;return r}var k2=typeof AbortController<"u"?AbortController:function(){var t=[],a=this.signal={aborted:!1,addEventListener:function(r,s){t.push(s)}};this.abort=function(){a.aborted=!0,t.forEach(function(r){return r()})}},N2=e.unstable_scheduleCallback,z2=e.unstable_NormalPriority,xt={$$typeof:N,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ku(){return{controller:new k2,data:new Map,refCount:0}}function po(t){t.refCount--,t.refCount===0&&N2(z2,function(){t.controller.abort()})}var go=null,Nu=0,fi=0,pi=null;function E2(t,a){if(go===null){var r=go=[];Nu=0,fi=Cd(),pi={status:"pending",value:void 0,then:function(s){r.push(s)}}}return Nu++,a.then(b0,b0),a}function b0(){if(--Nu===0&&go!==null){pi!==null&&(pi.status="fulfilled");var t=go;go=null,fi=0,pi=null;for(var a=0;a<t.length;a++)(0,t[a])()}}function C2(t,a){var r=[],s={status:"pending",value:null,reason:null,then:function(f){r.push(f)}};return t.then(function(){s.status="fulfilled",s.value=a;for(var f=0;f<r.length;f++)(0,r[f])(a)},function(f){for(s.status="rejected",s.reason=f,f=0;f<r.length;f++)(0,r[f])(void 0)}),s}var x0=ae.S;ae.S=function(t,a){rm=Dt(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&E2(t,a),x0!==null&&x0(t,a)};var Mr=T(null);function zu(){var t=Mr.current;return t!==null?t:nt.pooledCache}function Ml(t,a){a===null?L(Mr,Mr.current):L(Mr,a.pool)}function _0(){var t=zu();return t===null?null:{parent:xt._currentValue,pool:t}}var gi=Error(l(460)),Eu=Error(l(474)),Ol=Error(l(542)),Rl={then:function(){}};function j0(t){return t=t.status,t==="fulfilled"||t==="rejected"}function S0(t,a,r){switch(r=t[r],r===void 0?t.push(a):r!==a&&(a.then(Ka,Ka),a=r),a.status){case"fulfilled":return a.value;case"rejected":throw t=a.reason,k0(t),t;default:if(typeof a.status=="string")a.then(Ka,Ka);else{if(t=nt,t!==null&&100<t.shellSuspendCounter)throw Error(l(482));t=a,t.status="pending",t.then(function(s){if(a.status==="pending"){var f=a;f.status="fulfilled",f.value=s}},function(s){if(a.status==="pending"){var f=a;f.status="rejected",f.reason=s}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw t=a.reason,k0(t),t}throw Rr=a,gi}}function Or(t){try{var a=t._init;return a(t._payload)}catch(r){throw r!==null&&typeof r=="object"&&typeof r.then=="function"?(Rr=r,gi):r}}var Rr=null;function w0(){if(Rr===null)throw Error(l(459));var t=Rr;return Rr=null,t}function k0(t){if(t===gi||t===Ol)throw Error(l(483))}var mi=null,mo=0;function Al(t){var a=mo;return mo+=1,mi===null&&(mi=[]),S0(mi,t,a)}function ho(t,a){a=a.props.ref,t.ref=a!==void 0?a:null}function Dl(t,a){throw a.$$typeof===j?Error(l(525)):(t=Object.prototype.toString.call(a),Error(l(31,t==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":t)))}function N0(t){function a(q,B){if(t){var K=q.deletions;K===null?(q.deletions=[B],q.flags|=16):K.push(B)}}function r(q,B){if(!t)return null;for(;B!==null;)a(q,B),B=B.sibling;return null}function s(q){for(var B=new Map;q!==null;)q.key!==null?B.set(q.key,q):B.set(q.index,q),q=q.sibling;return B}function f(q,B){return q=Xa(q,B),q.index=0,q.sibling=null,q}function m(q,B,K){return q.index=K,t?(K=q.alternate,K!==null?(K=K.index,K<B?(q.flags|=67108866,B):K):(q.flags|=67108866,B)):(q.flags|=1048576,B)}function b(q){return t&&q.alternate===null&&(q.flags|=67108866),q}function M(q,B,K,se){return B===null||B.tag!==6?(B=yu(K,q.mode,se),B.return=q,B):(B=f(B,K),B.return=q,B)}function I(q,B,K,se){var je=K.type;return je===E?oe(q,B,K.props.children,se,K.key):B!==null&&(B.elementType===je||typeof je=="object"&&je!==null&&je.$$typeof===U&&Or(je)===B.type)?(B=f(B,K.props),ho(B,K),B.return=q,B):(B=zl(K.type,K.key,K.props,null,q.mode,se),ho(B,K),B.return=q,B)}function X(q,B,K,se){return B===null||B.tag!==4||B.stateNode.containerInfo!==K.containerInfo||B.stateNode.implementation!==K.implementation?(B=vu(K,q.mode,se),B.return=q,B):(B=f(B,K.children||[]),B.return=q,B)}function oe(q,B,K,se,je){return B===null||B.tag!==7?(B=zr(K,q.mode,se,je),B.return=q,B):(B=f(B,K),B.return=q,B)}function ce(q,B,K){if(typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint")return B=yu(""+B,q.mode,K),B.return=q,B;if(typeof B=="object"&&B!==null){switch(B.$$typeof){case k:return K=zl(B.type,B.key,B.props,null,q.mode,K),ho(K,B),K.return=q,K;case x:return B=vu(B,q.mode,K),B.return=q,B;case U:return B=Or(B),ce(q,B,K)}if(_e(B)||Y(B))return B=zr(B,q.mode,K,null),B.return=q,B;if(typeof B.then=="function")return ce(q,Al(B),K);if(B.$$typeof===N)return ce(q,Tl(q,B),K);Dl(q,B)}return null}function ee(q,B,K,se){var je=B!==null?B.key:null;if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return je!==null?null:M(q,B,""+K,se);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case k:return K.key===je?I(q,B,K,se):null;case x:return K.key===je?X(q,B,K,se):null;case U:return K=Or(K),ee(q,B,K,se)}if(_e(K)||Y(K))return je!==null?null:oe(q,B,K,se,null);if(typeof K.then=="function")return ee(q,B,Al(K),se);if(K.$$typeof===N)return ee(q,B,Tl(q,K),se);Dl(q,K)}return null}function ne(q,B,K,se,je){if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return q=q.get(K)||null,M(B,q,""+se,je);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case k:return q=q.get(se.key===null?K:se.key)||null,I(B,q,se,je);case x:return q=q.get(se.key===null?K:se.key)||null,X(B,q,se,je);case U:return se=Or(se),ne(q,B,K,se,je)}if(_e(se)||Y(se))return q=q.get(K)||null,oe(B,q,se,je,null);if(typeof se.then=="function")return ne(q,B,K,Al(se),je);if(se.$$typeof===N)return ne(q,B,K,Tl(B,se),je);Dl(B,se)}return null}function ye(q,B,K,se){for(var je=null,Pe=null,$e=B,Ce=B=0,Ie=null;$e!==null&&Ce<K.length;Ce++){$e.index>Ce?(Ie=$e,$e=null):Ie=$e.sibling;var Ze=ee(q,$e,K[Ce],se);if(Ze===null){$e===null&&($e=Ie);break}t&&$e&&Ze.alternate===null&&a(q,$e),B=m(Ze,B,Ce),Pe===null?je=Ze:Pe.sibling=Ze,Pe=Ze,$e=Ie}if(Ce===K.length)return r(q,$e),Le&&Qa(q,Ce),je;if($e===null){for(;Ce<K.length;Ce++)$e=ce(q,K[Ce],se),$e!==null&&(B=m($e,B,Ce),Pe===null?je=$e:Pe.sibling=$e,Pe=$e);return Le&&Qa(q,Ce),je}for($e=s($e);Ce<K.length;Ce++)Ie=ne($e,q,Ce,K[Ce],se),Ie!==null&&(t&&Ie.alternate!==null&&$e.delete(Ie.key===null?Ce:Ie.key),B=m(Ie,B,Ce),Pe===null?je=Ie:Pe.sibling=Ie,Pe=Ie);return t&&$e.forEach(function(Yn){return a(q,Yn)}),Le&&Qa(q,Ce),je}function we(q,B,K,se){if(K==null)throw Error(l(151));for(var je=null,Pe=null,$e=B,Ce=B=0,Ie=null,Ze=K.next();$e!==null&&!Ze.done;Ce++,Ze=K.next()){$e.index>Ce?(Ie=$e,$e=null):Ie=$e.sibling;var Yn=ee(q,$e,Ze.value,se);if(Yn===null){$e===null&&($e=Ie);break}t&&$e&&Yn.alternate===null&&a(q,$e),B=m(Yn,B,Ce),Pe===null?je=Yn:Pe.sibling=Yn,Pe=Yn,$e=Ie}if(Ze.done)return r(q,$e),Le&&Qa(q,Ce),je;if($e===null){for(;!Ze.done;Ce++,Ze=K.next())Ze=ce(q,Ze.value,se),Ze!==null&&(B=m(Ze,B,Ce),Pe===null?je=Ze:Pe.sibling=Ze,Pe=Ze);return Le&&Qa(q,Ce),je}for($e=s($e);!Ze.done;Ce++,Ze=K.next())Ze=ne($e,q,Ce,Ze.value,se),Ze!==null&&(t&&Ze.alternate!==null&&$e.delete(Ze.key===null?Ce:Ze.key),B=m(Ze,B,Ce),Pe===null?je=Ze:Pe.sibling=Ze,Pe=Ze);return t&&$e.forEach(function(Bb){return a(q,Bb)}),Le&&Qa(q,Ce),je}function et(q,B,K,se){if(typeof K=="object"&&K!==null&&K.type===E&&K.key===null&&(K=K.props.children),typeof K=="object"&&K!==null){switch(K.$$typeof){case k:e:{for(var je=K.key;B!==null;){if(B.key===je){if(je=K.type,je===E){if(B.tag===7){r(q,B.sibling),se=f(B,K.props.children),se.return=q,q=se;break e}}else if(B.elementType===je||typeof je=="object"&&je!==null&&je.$$typeof===U&&Or(je)===B.type){r(q,B.sibling),se=f(B,K.props),ho(se,K),se.return=q,q=se;break e}r(q,B);break}else a(q,B);B=B.sibling}K.type===E?(se=zr(K.props.children,q.mode,se,K.key),se.return=q,q=se):(se=zl(K.type,K.key,K.props,null,q.mode,se),ho(se,K),se.return=q,q=se)}return b(q);case x:e:{for(je=K.key;B!==null;){if(B.key===je)if(B.tag===4&&B.stateNode.containerInfo===K.containerInfo&&B.stateNode.implementation===K.implementation){r(q,B.sibling),se=f(B,K.children||[]),se.return=q,q=se;break e}else{r(q,B);break}else a(q,B);B=B.sibling}se=vu(K,q.mode,se),se.return=q,q=se}return b(q);case U:return K=Or(K),et(q,B,K,se)}if(_e(K))return ye(q,B,K,se);if(Y(K)){if(je=Y(K),typeof je!="function")throw Error(l(150));return K=je.call(K),we(q,B,K,se)}if(typeof K.then=="function")return et(q,B,Al(K),se);if(K.$$typeof===N)return et(q,B,Tl(q,K),se);Dl(q,K)}return typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint"?(K=""+K,B!==null&&B.tag===6?(r(q,B.sibling),se=f(B,K),se.return=q,q=se):(r(q,B),se=yu(K,q.mode,se),se.return=q,q=se),b(q)):r(q,B)}return function(q,B,K,se){try{mo=0;var je=et(q,B,K,se);return mi=null,je}catch($e){if($e===gi||$e===Ol)throw $e;var Pe=ga(29,$e,null,q.mode);return Pe.lanes=se,Pe.return=q,Pe}finally{}}}var Ar=N0(!0),z0=N0(!1),Tn=!1;function Cu(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Tu(t,a){t=t.updateQueue,a.updateQueue===t&&(a.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Mn(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function On(t,a,r){var s=t.updateQueue;if(s===null)return null;if(s=s.shared,(Ge&2)!==0){var f=s.pending;return f===null?a.next=a:(a.next=f.next,f.next=a),s.pending=a,a=Nl(t),d0(t,null,r),a}return kl(t,s,a,r),Nl(t)}function yo(t,a,r){if(a=a.updateQueue,a!==null&&(a=a.shared,(r&4194048)!==0)){var s=a.lanes;s&=t.pendingLanes,r|=s,a.lanes=r,$p(t,r)}}function Mu(t,a){var r=t.updateQueue,s=t.alternate;if(s!==null&&(s=s.updateQueue,r===s)){var f=null,m=null;if(r=r.firstBaseUpdate,r!==null){do{var b={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};m===null?f=m=b:m=m.next=b,r=r.next}while(r!==null);m===null?f=m=a:m=m.next=a}else f=m=a;r={baseState:s.baseState,firstBaseUpdate:f,lastBaseUpdate:m,shared:s.shared,callbacks:s.callbacks},t.updateQueue=r;return}t=r.lastBaseUpdate,t===null?r.firstBaseUpdate=a:t.next=a,r.lastBaseUpdate=a}var Ou=!1;function vo(){if(Ou){var t=pi;if(t!==null)throw t}}function $o(t,a,r,s){Ou=!1;var f=t.updateQueue;Tn=!1;var m=f.firstBaseUpdate,b=f.lastBaseUpdate,M=f.shared.pending;if(M!==null){f.shared.pending=null;var I=M,X=I.next;I.next=null,b===null?m=X:b.next=X,b=I;var oe=t.alternate;oe!==null&&(oe=oe.updateQueue,M=oe.lastBaseUpdate,M!==b&&(M===null?oe.firstBaseUpdate=X:M.next=X,oe.lastBaseUpdate=I))}if(m!==null){var ce=f.baseState;b=0,oe=X=I=null,M=m;do{var ee=M.lane&-536870913,ne=ee!==M.lane;if(ne?(Ue&ee)===ee:(s&ee)===ee){ee!==0&&ee===fi&&(Ou=!0),oe!==null&&(oe=oe.next={lane:0,tag:M.tag,payload:M.payload,callback:null,next:null});e:{var ye=t,we=M;ee=a;var et=r;switch(we.tag){case 1:if(ye=we.payload,typeof ye=="function"){ce=ye.call(et,ce,ee);break e}ce=ye;break e;case 3:ye.flags=ye.flags&-65537|128;case 0:if(ye=we.payload,ee=typeof ye=="function"?ye.call(et,ce,ee):ye,ee==null)break e;ce=v({},ce,ee);break e;case 2:Tn=!0}}ee=M.callback,ee!==null&&(t.flags|=64,ne&&(t.flags|=8192),ne=f.callbacks,ne===null?f.callbacks=[ee]:ne.push(ee))}else ne={lane:ee,tag:M.tag,payload:M.payload,callback:M.callback,next:null},oe===null?(X=oe=ne,I=ce):oe=oe.next=ne,b|=ee;if(M=M.next,M===null){if(M=f.shared.pending,M===null)break;ne=M,M=ne.next,ne.next=null,f.lastBaseUpdate=ne,f.shared.pending=null}}while(!0);oe===null&&(I=ce),f.baseState=I,f.firstBaseUpdate=X,f.lastBaseUpdate=oe,m===null&&(f.shared.lanes=0),In|=b,t.lanes=b,t.memoizedState=ce}}function E0(t,a){if(typeof t!="function")throw Error(l(191,t));t.call(a)}function C0(t,a){var r=t.callbacks;if(r!==null)for(t.callbacks=null,t=0;t<r.length;t++)E0(r[t],a)}var hi=T(null),Ul=T(0);function T0(t,a){t=un,L(Ul,t),L(hi,a),un=t|a.baseLanes}function Ru(){L(Ul,un),L(hi,hi.current)}function Au(){un=Ul.current,V(hi),V(Ul)}var ma=T(null),Ca=null;function Rn(t){var a=t.alternate;L(yt,yt.current&1),L(ma,t),Ca===null&&(a===null||hi.current!==null||a.memoizedState!==null)&&(Ca=t)}function Du(t){L(yt,yt.current),L(ma,t),Ca===null&&(Ca=t)}function M0(t){t.tag===22?(L(yt,yt.current),L(ma,t),Ca===null&&(Ca=t)):An()}function An(){L(yt,yt.current),L(ma,ma.current)}function ha(t){V(ma),Ca===t&&(Ca=null),V(yt)}var yt=T(0);function Il(t){for(var a=t;a!==null;){if(a.tag===13){var r=a.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||Hd(r)||qd(r)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break;for(;a.sibling===null;){if(a.return===null||a.return===t)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var tn=0,Ee=null,Qe=null,_t=null,Ll=!1,yi=!1,Dr=!1,Vl=0,bo=0,vi=null,T2=0;function ft(){throw Error(l(321))}function Uu(t,a){if(a===null)return!1;for(var r=0;r<a.length&&r<t.length;r++)if(!pa(t[r],a[r]))return!1;return!0}function Iu(t,a,r,s,f,m){return tn=m,Ee=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,ae.H=t===null||t.memoizedState===null?mg:Wu,Dr=!1,m=r(s,f),Dr=!1,yi&&(m=R0(a,r,s,f)),O0(t),m}function O0(t){ae.H=jo;var a=Qe!==null&&Qe.next!==null;if(tn=0,_t=Qe=Ee=null,Ll=!1,bo=0,vi=null,a)throw Error(l(300));t===null||jt||(t=t.dependencies,t!==null&&Cl(t)&&(jt=!0))}function R0(t,a,r,s){Ee=t;var f=0;do{if(yi&&(vi=null),bo=0,yi=!1,25<=f)throw Error(l(301));if(f+=1,_t=Qe=null,t.updateQueue!=null){var m=t.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}ae.H=hg,m=a(r,s)}while(yi);return m}function M2(){var t=ae.H,a=t.useState()[0];return a=typeof a.then=="function"?xo(a):a,t=t.useState()[0],(Qe!==null?Qe.memoizedState:null)!==t&&(Ee.flags|=1024),a}function Lu(){var t=Vl!==0;return Vl=0,t}function Vu(t,a,r){a.updateQueue=t.updateQueue,a.flags&=-2053,t.lanes&=~r}function Bu(t){if(Ll){for(t=t.memoizedState;t!==null;){var a=t.queue;a!==null&&(a.pending=null),t=t.next}Ll=!1}tn=0,_t=Qe=Ee=null,yi=!1,bo=Vl=0,vi=null}function Yt(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return _t===null?Ee.memoizedState=_t=t:_t=_t.next=t,_t}function vt(){if(Qe===null){var t=Ee.alternate;t=t!==null?t.memoizedState:null}else t=Qe.next;var a=_t===null?Ee.memoizedState:_t.next;if(a!==null)_t=a,Qe=t;else{if(t===null)throw Ee.alternate===null?Error(l(467)):Error(l(310));Qe=t,t={memoizedState:Qe.memoizedState,baseState:Qe.baseState,baseQueue:Qe.baseQueue,queue:Qe.queue,next:null},_t===null?Ee.memoizedState=_t=t:_t=_t.next=t}return _t}function Bl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function xo(t){var a=bo;return bo+=1,vi===null&&(vi=[]),t=S0(vi,t,a),a=Ee,(_t===null?a.memoizedState:_t.next)===null&&(a=a.alternate,ae.H=a===null||a.memoizedState===null?mg:Wu),t}function Hl(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return xo(t);if(t.$$typeof===N)return Lt(t)}throw Error(l(438,String(t)))}function Hu(t){var a=null,r=Ee.updateQueue;if(r!==null&&(a=r.memoCache),a==null){var s=Ee.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(a={data:s.data.map(function(f){return f.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),r===null&&(r=Bl(),Ee.updateQueue=r),r.memoCache=a,r=a.data[a.index],r===void 0)for(r=a.data[a.index]=Array(t),s=0;s<t;s++)r[s]=G;return a.index++,r}function an(t,a){return typeof a=="function"?a(t):a}function ql(t){var a=vt();return qu(a,Qe,t)}function qu(t,a,r){var s=t.queue;if(s===null)throw Error(l(311));s.lastRenderedReducer=r;var f=t.baseQueue,m=s.pending;if(m!==null){if(f!==null){var b=f.next;f.next=m.next,m.next=b}a.baseQueue=f=m,s.pending=null}if(m=t.baseState,f===null)t.memoizedState=m;else{a=f.next;var M=b=null,I=null,X=a,oe=!1;do{var ce=X.lane&-536870913;if(ce!==X.lane?(Ue&ce)===ce:(tn&ce)===ce){var ee=X.revertLane;if(ee===0)I!==null&&(I=I.next={lane:0,revertLane:0,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null}),ce===fi&&(oe=!0);else if((tn&ee)===ee){X=X.next,ee===fi&&(oe=!0);continue}else ce={lane:0,revertLane:X.revertLane,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},I===null?(M=I=ce,b=m):I=I.next=ce,Ee.lanes|=ee,In|=ee;ce=X.action,Dr&&r(m,ce),m=X.hasEagerState?X.eagerState:r(m,ce)}else ee={lane:ce,revertLane:X.revertLane,gesture:X.gesture,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},I===null?(M=I=ee,b=m):I=I.next=ee,Ee.lanes|=ce,In|=ce;X=X.next}while(X!==null&&X!==a);if(I===null?b=m:I.next=M,!pa(m,t.memoizedState)&&(jt=!0,oe&&(r=pi,r!==null)))throw r;t.memoizedState=m,t.baseState=b,t.baseQueue=I,s.lastRenderedState=m}return f===null&&(s.lanes=0),[t.memoizedState,s.dispatch]}function Pu(t){var a=vt(),r=a.queue;if(r===null)throw Error(l(311));r.lastRenderedReducer=t;var s=r.dispatch,f=r.pending,m=a.memoizedState;if(f!==null){r.pending=null;var b=f=f.next;do m=t(m,b.action),b=b.next;while(b!==f);pa(m,a.memoizedState)||(jt=!0),a.memoizedState=m,a.baseQueue===null&&(a.baseState=m),r.lastRenderedState=m}return[m,s]}function A0(t,a,r){var s=Ee,f=vt(),m=Le;if(m){if(r===void 0)throw Error(l(407));r=r()}else r=a();var b=!pa((Qe||f).memoizedState,r);if(b&&(f.memoizedState=r,jt=!0),f=f.queue,Fu(I0.bind(null,s,f,t),[t]),f.getSnapshot!==a||b||_t!==null&&_t.memoizedState.tag&1){if(s.flags|=2048,$i(9,{destroy:void 0},U0.bind(null,s,f,r,a),null),nt===null)throw Error(l(349));m||(tn&127)!==0||D0(s,a,r)}return r}function D0(t,a,r){t.flags|=16384,t={getSnapshot:a,value:r},a=Ee.updateQueue,a===null?(a=Bl(),Ee.updateQueue=a,a.stores=[t]):(r=a.stores,r===null?a.stores=[t]:r.push(t))}function U0(t,a,r,s){a.value=r,a.getSnapshot=s,L0(a)&&V0(t)}function I0(t,a,r){return r(function(){L0(a)&&V0(t)})}function L0(t){var a=t.getSnapshot;t=t.value;try{var r=a();return!pa(t,r)}catch{return!0}}function V0(t){var a=Nr(t,2);a!==null&&oa(a,t,2)}function Zu(t){var a=Yt();if(typeof t=="function"){var r=t;if(t=r(),Dr){Sn(!0);try{r()}finally{Sn(!1)}}}return a.memoizedState=a.baseState=t,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:an,lastRenderedState:t},a}function B0(t,a,r,s){return t.baseState=r,qu(t,Qe,typeof s=="function"?s:an)}function O2(t,a,r,s,f){if(Gl(t))throw Error(l(485));if(t=a.action,t!==null){var m={payload:f,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(b){m.listeners.push(b)}};ae.T!==null?r(!0):m.isTransition=!1,s(m),r=a.pending,r===null?(m.next=a.pending=m,H0(a,m)):(m.next=r.next,a.pending=r.next=m)}}function H0(t,a){var r=a.action,s=a.payload,f=t.state;if(a.isTransition){var m=ae.T,b={};ae.T=b;try{var M=r(f,s),I=ae.S;I!==null&&I(b,M),q0(t,a,M)}catch(X){Gu(t,a,X)}finally{m!==null&&b.types!==null&&(m.types=b.types),ae.T=m}}else try{m=r(f,s),q0(t,a,m)}catch(X){Gu(t,a,X)}}function q0(t,a,r){r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(function(s){P0(t,a,s)},function(s){return Gu(t,a,s)}):P0(t,a,r)}function P0(t,a,r){a.status="fulfilled",a.value=r,Z0(a),t.state=r,a=t.pending,a!==null&&(r=a.next,r===a?t.pending=null:(r=r.next,a.next=r,H0(t,r)))}function Gu(t,a,r){var s=t.pending;if(t.pending=null,s!==null){s=s.next;do a.status="rejected",a.reason=r,Z0(a),a=a.next;while(a!==s)}t.action=null}function Z0(t){t=t.listeners;for(var a=0;a<t.length;a++)(0,t[a])()}function G0(t,a){return a}function F0(t,a){if(Le){var r=nt.formState;if(r!==null){e:{var s=Ee;if(Le){if(rt){t:{for(var f=rt,m=Ea;f.nodeType!==8;){if(!m){f=null;break t}if(f=Ta(f.nextSibling),f===null){f=null;break t}}m=f.data,f=m==="F!"||m==="F"?f:null}if(f){rt=Ta(f.nextSibling),s=f.data==="F!";break e}}En(s)}s=!1}s&&(a=r[0])}}return r=Yt(),r.memoizedState=r.baseState=a,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:G0,lastRenderedState:a},r.queue=s,r=fg.bind(null,Ee,s),s.dispatch=r,s=Zu(!1),m=Qu.bind(null,Ee,!1,s.queue),s=Yt(),f={state:a,dispatch:null,action:t,pending:null},s.queue=f,r=O2.bind(null,Ee,f,m,r),f.dispatch=r,s.memoizedState=t,[a,r,!1]}function Y0(t){var a=vt();return K0(a,Qe,t)}function K0(t,a,r){if(a=qu(t,a,G0)[0],t=ql(an)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var s=xo(a)}catch(b){throw b===gi?Ol:b}else s=a;a=vt();var f=a.queue,m=f.dispatch;return r!==a.memoizedState&&(Ee.flags|=2048,$i(9,{destroy:void 0},R2.bind(null,f,r),null)),[s,m,t]}function R2(t,a){t.action=a}function J0(t){var a=vt(),r=Qe;if(r!==null)return K0(a,r,t);vt(),a=a.memoizedState,r=vt();var s=r.queue.dispatch;return r.memoizedState=t,[a,s,!1]}function $i(t,a,r,s){return t={tag:t,create:r,deps:s,inst:a,next:null},a=Ee.updateQueue,a===null&&(a=Bl(),Ee.updateQueue=a),r=a.lastEffect,r===null?a.lastEffect=t.next=t:(s=r.next,r.next=t,t.next=s,a.lastEffect=t),t}function X0(){return vt().memoizedState}function Pl(t,a,r,s){var f=Yt();Ee.flags|=t,f.memoizedState=$i(1|a,{destroy:void 0},r,s===void 0?null:s)}function Zl(t,a,r,s){var f=vt();s=s===void 0?null:s;var m=f.memoizedState.inst;Qe!==null&&s!==null&&Uu(s,Qe.memoizedState.deps)?f.memoizedState=$i(a,m,r,s):(Ee.flags|=t,f.memoizedState=$i(1|a,m,r,s))}function Q0(t,a){Pl(8390656,8,t,a)}function Fu(t,a){Zl(2048,8,t,a)}function A2(t){Ee.flags|=4;var a=Ee.updateQueue;if(a===null)a=Bl(),Ee.updateQueue=a,a.events=[t];else{var r=a.events;r===null?a.events=[t]:r.push(t)}}function W0(t){var a=vt().memoizedState;return A2({ref:a,nextImpl:t}),function(){if((Ge&2)!==0)throw Error(l(440));return a.impl.apply(void 0,arguments)}}function eg(t,a){return Zl(4,2,t,a)}function tg(t,a){return Zl(4,4,t,a)}function ag(t,a){if(typeof a=="function"){t=t();var r=a(t);return function(){typeof r=="function"?r():a(null)}}if(a!=null)return t=t(),a.current=t,function(){a.current=null}}function ng(t,a,r){r=r!=null?r.concat([t]):null,Zl(4,4,ag.bind(null,a,t),r)}function Yu(){}function rg(t,a){var r=vt();a=a===void 0?null:a;var s=r.memoizedState;return a!==null&&Uu(a,s[1])?s[0]:(r.memoizedState=[t,a],t)}function ig(t,a){var r=vt();a=a===void 0?null:a;var s=r.memoizedState;if(a!==null&&Uu(a,s[1]))return s[0];if(s=t(),Dr){Sn(!0);try{t()}finally{Sn(!1)}}return r.memoizedState=[s,a],s}function Ku(t,a,r){return r===void 0||(tn&1073741824)!==0&&(Ue&261930)===0?t.memoizedState=a:(t.memoizedState=r,t=om(),Ee.lanes|=t,In|=t,r)}function og(t,a,r,s){return pa(r,a)?r:hi.current!==null?(t=Ku(t,r,s),pa(t,a)||(jt=!0),t):(tn&42)===0||(tn&1073741824)!==0&&(Ue&261930)===0?(jt=!0,t.memoizedState=r):(t=om(),Ee.lanes|=t,In|=t,a)}function lg(t,a,r,s,f){var m=fe.p;fe.p=m!==0&&8>m?m:8;var b=ae.T,M={};ae.T=M,Qu(t,!1,a,r);try{var I=f(),X=ae.S;if(X!==null&&X(M,I),I!==null&&typeof I=="object"&&typeof I.then=="function"){var oe=C2(I,s);_o(t,a,oe,$a(t))}else _o(t,a,s,$a(t))}catch(ce){_o(t,a,{then:function(){},status:"rejected",reason:ce},$a())}finally{fe.p=m,b!==null&&M.types!==null&&(b.types=M.types),ae.T=b}}function D2(){}function Ju(t,a,r,s){if(t.tag!==5)throw Error(l(476));var f=sg(t).queue;lg(t,f,a,ge,r===null?D2:function(){return cg(t),r(s)})}function sg(t){var a=t.memoizedState;if(a!==null)return a;a={memoizedState:ge,baseState:ge,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:an,lastRenderedState:ge},next:null};var r={};return a.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:an,lastRenderedState:r},next:null},t.memoizedState=a,t=t.alternate,t!==null&&(t.memoizedState=a),a}function cg(t){var a=sg(t);a.next===null&&(a=t.alternate.memoizedState),_o(t,a.next.queue,{},$a())}function Xu(){return Lt(Lo)}function ug(){return vt().memoizedState}function dg(){return vt().memoizedState}function U2(t){for(var a=t.return;a!==null;){switch(a.tag){case 24:case 3:var r=$a();t=Mn(r);var s=On(a,t,r);s!==null&&(oa(s,a,r),yo(s,a,r)),a={cache:ku()},t.payload=a;return}a=a.return}}function I2(t,a,r){var s=$a();r={lane:s,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Gl(t)?pg(a,r):(r=mu(t,a,r,s),r!==null&&(oa(r,t,s),gg(r,a,s)))}function fg(t,a,r){var s=$a();_o(t,a,r,s)}function _o(t,a,r,s){var f={lane:s,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null};if(Gl(t))pg(a,f);else{var m=t.alternate;if(t.lanes===0&&(m===null||m.lanes===0)&&(m=a.lastRenderedReducer,m!==null))try{var b=a.lastRenderedState,M=m(b,r);if(f.hasEagerState=!0,f.eagerState=M,pa(M,b))return kl(t,a,f,0),nt===null&&wl(),!1}catch{}finally{}if(r=mu(t,a,f,s),r!==null)return oa(r,t,s),gg(r,a,s),!0}return!1}function Qu(t,a,r,s){if(s={lane:2,revertLane:Cd(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Gl(t)){if(a)throw Error(l(479))}else a=mu(t,r,s,2),a!==null&&oa(a,t,2)}function Gl(t){var a=t.alternate;return t===Ee||a!==null&&a===Ee}function pg(t,a){yi=Ll=!0;var r=t.pending;r===null?a.next=a:(a.next=r.next,r.next=a),t.pending=a}function gg(t,a,r){if((r&4194048)!==0){var s=a.lanes;s&=t.pendingLanes,r|=s,a.lanes=r,$p(t,r)}}var jo={readContext:Lt,use:Hl,useCallback:ft,useContext:ft,useEffect:ft,useImperativeHandle:ft,useLayoutEffect:ft,useInsertionEffect:ft,useMemo:ft,useReducer:ft,useRef:ft,useState:ft,useDebugValue:ft,useDeferredValue:ft,useTransition:ft,useSyncExternalStore:ft,useId:ft,useHostTransitionStatus:ft,useFormState:ft,useActionState:ft,useOptimistic:ft,useMemoCache:ft,useCacheRefresh:ft};jo.useEffectEvent=ft;var mg={readContext:Lt,use:Hl,useCallback:function(t,a){return Yt().memoizedState=[t,a===void 0?null:a],t},useContext:Lt,useEffect:Q0,useImperativeHandle:function(t,a,r){r=r!=null?r.concat([t]):null,Pl(4194308,4,ag.bind(null,a,t),r)},useLayoutEffect:function(t,a){return Pl(4194308,4,t,a)},useInsertionEffect:function(t,a){Pl(4,2,t,a)},useMemo:function(t,a){var r=Yt();a=a===void 0?null:a;var s=t();if(Dr){Sn(!0);try{t()}finally{Sn(!1)}}return r.memoizedState=[s,a],s},useReducer:function(t,a,r){var s=Yt();if(r!==void 0){var f=r(a);if(Dr){Sn(!0);try{r(a)}finally{Sn(!1)}}}else f=a;return s.memoizedState=s.baseState=f,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:f},s.queue=t,t=t.dispatch=I2.bind(null,Ee,t),[s.memoizedState,t]},useRef:function(t){var a=Yt();return t={current:t},a.memoizedState=t},useState:function(t){t=Zu(t);var a=t.queue,r=fg.bind(null,Ee,a);return a.dispatch=r,[t.memoizedState,r]},useDebugValue:Yu,useDeferredValue:function(t,a){var r=Yt();return Ku(r,t,a)},useTransition:function(){var t=Zu(!1);return t=lg.bind(null,Ee,t.queue,!0,!1),Yt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,a,r){var s=Ee,f=Yt();if(Le){if(r===void 0)throw Error(l(407));r=r()}else{if(r=a(),nt===null)throw Error(l(349));(Ue&127)!==0||D0(s,a,r)}f.memoizedState=r;var m={value:r,getSnapshot:a};return f.queue=m,Q0(I0.bind(null,s,m,t),[t]),s.flags|=2048,$i(9,{destroy:void 0},U0.bind(null,s,m,r,a),null),r},useId:function(){var t=Yt(),a=nt.identifierPrefix;if(Le){var r=Ba,s=Va;r=(s&~(1<<32-fa(s)-1)).toString(32)+r,a="_"+a+"R_"+r,r=Vl++,0<r&&(a+="H"+r.toString(32)),a+="_"}else r=T2++,a="_"+a+"r_"+r.toString(32)+"_";return t.memoizedState=a},useHostTransitionStatus:Xu,useFormState:F0,useActionState:F0,useOptimistic:function(t){var a=Yt();a.memoizedState=a.baseState=t;var r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=r,a=Qu.bind(null,Ee,!0,r),r.dispatch=a,[t,a]},useMemoCache:Hu,useCacheRefresh:function(){return Yt().memoizedState=U2.bind(null,Ee)},useEffectEvent:function(t){var a=Yt(),r={impl:t};return a.memoizedState=r,function(){if((Ge&2)!==0)throw Error(l(440));return r.impl.apply(void 0,arguments)}}},Wu={readContext:Lt,use:Hl,useCallback:rg,useContext:Lt,useEffect:Fu,useImperativeHandle:ng,useInsertionEffect:eg,useLayoutEffect:tg,useMemo:ig,useReducer:ql,useRef:X0,useState:function(){return ql(an)},useDebugValue:Yu,useDeferredValue:function(t,a){var r=vt();return og(r,Qe.memoizedState,t,a)},useTransition:function(){var t=ql(an)[0],a=vt().memoizedState;return[typeof t=="boolean"?t:xo(t),a]},useSyncExternalStore:A0,useId:ug,useHostTransitionStatus:Xu,useFormState:Y0,useActionState:Y0,useOptimistic:function(t,a){var r=vt();return B0(r,Qe,t,a)},useMemoCache:Hu,useCacheRefresh:dg};Wu.useEffectEvent=W0;var hg={readContext:Lt,use:Hl,useCallback:rg,useContext:Lt,useEffect:Fu,useImperativeHandle:ng,useInsertionEffect:eg,useLayoutEffect:tg,useMemo:ig,useReducer:Pu,useRef:X0,useState:function(){return Pu(an)},useDebugValue:Yu,useDeferredValue:function(t,a){var r=vt();return Qe===null?Ku(r,t,a):og(r,Qe.memoizedState,t,a)},useTransition:function(){var t=Pu(an)[0],a=vt().memoizedState;return[typeof t=="boolean"?t:xo(t),a]},useSyncExternalStore:A0,useId:ug,useHostTransitionStatus:Xu,useFormState:J0,useActionState:J0,useOptimistic:function(t,a){var r=vt();return Qe!==null?B0(r,Qe,t,a):(r.baseState=t,[t,r.queue.dispatch])},useMemoCache:Hu,useCacheRefresh:dg};hg.useEffectEvent=W0;function ed(t,a,r,s){a=t.memoizedState,r=r(s,a),r=r==null?a:v({},a,r),t.memoizedState=r,t.lanes===0&&(t.updateQueue.baseState=r)}var td={enqueueSetState:function(t,a,r){t=t._reactInternals;var s=$a(),f=Mn(s);f.payload=a,r!=null&&(f.callback=r),a=On(t,f,s),a!==null&&(oa(a,t,s),yo(a,t,s))},enqueueReplaceState:function(t,a,r){t=t._reactInternals;var s=$a(),f=Mn(s);f.tag=1,f.payload=a,r!=null&&(f.callback=r),a=On(t,f,s),a!==null&&(oa(a,t,s),yo(a,t,s))},enqueueForceUpdate:function(t,a){t=t._reactInternals;var r=$a(),s=Mn(r);s.tag=2,a!=null&&(s.callback=a),a=On(t,s,r),a!==null&&(oa(a,t,r),yo(a,t,r))}};function yg(t,a,r,s,f,m,b){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(s,m,b):a.prototype&&a.prototype.isPureReactComponent?!so(r,s)||!so(f,m):!0}function vg(t,a,r,s){t=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(r,s),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(r,s),a.state!==t&&td.enqueueReplaceState(a,a.state,null)}function Ur(t,a){var r=a;if("ref"in a){r={};for(var s in a)s!=="ref"&&(r[s]=a[s])}if(t=t.defaultProps){r===a&&(r=v({},r));for(var f in t)r[f]===void 0&&(r[f]=t[f])}return r}function $g(t){Sl(t)}function bg(t){console.error(t)}function xg(t){Sl(t)}function Fl(t,a){try{var r=t.onUncaughtError;r(a.value,{componentStack:a.stack})}catch(s){setTimeout(function(){throw s})}}function _g(t,a,r){try{var s=t.onCaughtError;s(r.value,{componentStack:r.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function ad(t,a,r){return r=Mn(r),r.tag=3,r.payload={element:null},r.callback=function(){Fl(t,a)},r}function jg(t){return t=Mn(t),t.tag=3,t}function Sg(t,a,r,s){var f=r.type.getDerivedStateFromError;if(typeof f=="function"){var m=s.value;t.payload=function(){return f(m)},t.callback=function(){_g(a,r,s)}}var b=r.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(t.callback=function(){_g(a,r,s),typeof f!="function"&&(Ln===null?Ln=new Set([this]):Ln.add(this));var M=s.stack;this.componentDidCatch(s.value,{componentStack:M!==null?M:""})})}function L2(t,a,r,s,f){if(r.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(a=r.alternate,a!==null&&di(a,r,f,!0),r=ma.current,r!==null){switch(r.tag){case 31:case 13:return Ca===null?is():r.alternate===null&&pt===0&&(pt=3),r.flags&=-257,r.flags|=65536,r.lanes=f,s===Rl?r.flags|=16384:(a=r.updateQueue,a===null?r.updateQueue=new Set([s]):a.add(s),Nd(t,s,f)),!1;case 22:return r.flags|=65536,s===Rl?r.flags|=16384:(a=r.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([s])},r.updateQueue=a):(r=a.retryQueue,r===null?a.retryQueue=new Set([s]):r.add(s)),Nd(t,s,f)),!1}throw Error(l(435,r.tag))}return Nd(t,s,f),is(),!1}if(Le)return a=ma.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=f,s!==xu&&(t=Error(l(422),{cause:s}),fo(ka(t,r)))):(s!==xu&&(a=Error(l(423),{cause:s}),fo(ka(a,r))),t=t.current.alternate,t.flags|=65536,f&=-f,t.lanes|=f,s=ka(s,r),f=ad(t.stateNode,s,f),Mu(t,f),pt!==4&&(pt=2)),!1;var m=Error(l(520),{cause:s});if(m=ka(m,r),To===null?To=[m]:To.push(m),pt!==4&&(pt=2),a===null)return!0;s=ka(s,r),r=a;do{switch(r.tag){case 3:return r.flags|=65536,t=f&-f,r.lanes|=t,t=ad(r.stateNode,s,t),Mu(r,t),!1;case 1:if(a=r.type,m=r.stateNode,(r.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(Ln===null||!Ln.has(m))))return r.flags|=65536,f&=-f,r.lanes|=f,f=jg(f),Sg(f,t,r,s),Mu(r,f),!1}r=r.return}while(r!==null);return!1}var nd=Error(l(461)),jt=!1;function Vt(t,a,r,s){a.child=t===null?z0(a,null,r,s):Ar(a,t.child,r,s)}function wg(t,a,r,s,f){r=r.render;var m=a.ref;if("ref"in s){var b={};for(var M in s)M!=="ref"&&(b[M]=s[M])}else b=s;return Tr(a),s=Iu(t,a,r,b,m,f),M=Lu(),t!==null&&!jt?(Vu(t,a,f),nn(t,a,f)):(Le&&M&&$u(a),a.flags|=1,Vt(t,a,s,f),a.child)}function kg(t,a,r,s,f){if(t===null){var m=r.type;return typeof m=="function"&&!hu(m)&&m.defaultProps===void 0&&r.compare===null?(a.tag=15,a.type=m,Ng(t,a,m,s,f)):(t=zl(r.type,null,s,a,a.mode,f),t.ref=a.ref,t.return=a,a.child=t)}if(m=t.child,!dd(t,f)){var b=m.memoizedProps;if(r=r.compare,r=r!==null?r:so,r(b,s)&&t.ref===a.ref)return nn(t,a,f)}return a.flags|=1,t=Xa(m,s),t.ref=a.ref,t.return=a,a.child=t}function Ng(t,a,r,s,f){if(t!==null){var m=t.memoizedProps;if(so(m,s)&&t.ref===a.ref)if(jt=!1,a.pendingProps=s=m,dd(t,f))(t.flags&131072)!==0&&(jt=!0);else return a.lanes=t.lanes,nn(t,a,f)}return rd(t,a,r,s,f)}function zg(t,a,r,s){var f=s.children,m=t!==null?t.memoizedState:null;if(t===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((a.flags&128)!==0){if(m=m!==null?m.baseLanes|r:r,t!==null){for(s=a.child=t.child,f=0;s!==null;)f=f|s.lanes|s.childLanes,s=s.sibling;s=f&~m}else s=0,a.child=null;return Eg(t,a,m,r,s)}if((r&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},t!==null&&Ml(a,m!==null?m.cachePool:null),m!==null?T0(a,m):Ru(),M0(a);else return s=a.lanes=536870912,Eg(t,a,m!==null?m.baseLanes|r:r,r,s)}else m!==null?(Ml(a,m.cachePool),T0(a,m),An(),a.memoizedState=null):(t!==null&&Ml(a,null),Ru(),An());return Vt(t,a,f,r),a.child}function So(t,a){return t!==null&&t.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function Eg(t,a,r,s,f){var m=zu();return m=m===null?null:{parent:xt._currentValue,pool:m},a.memoizedState={baseLanes:r,cachePool:m},t!==null&&Ml(a,null),Ru(),M0(a),t!==null&&di(t,a,s,!0),a.childLanes=f,null}function Yl(t,a){return a=Jl({mode:a.mode,children:a.children},t.mode),a.ref=t.ref,t.child=a,a.return=t,a}function Cg(t,a,r){return Ar(a,t.child,null,r),t=Yl(a,a.pendingProps),t.flags|=2,ha(a),a.memoizedState=null,t}function V2(t,a,r){var s=a.pendingProps,f=(a.flags&128)!==0;if(a.flags&=-129,t===null){if(Le){if(s.mode==="hidden")return t=Yl(a,s),a.lanes=536870912,So(null,t);if(Du(a),(t=rt)?(t=Hm(t,Ea),t=t!==null&&t.data==="&"?t:null,t!==null&&(a.memoizedState={dehydrated:t,treeContext:Nn!==null?{id:Va,overflow:Ba}:null,retryLane:536870912,hydrationErrors:null},r=p0(t),r.return=a,a.child=r,It=a,rt=null)):t=null,t===null)throw En(a);return a.lanes=536870912,null}return Yl(a,s)}var m=t.memoizedState;if(m!==null){var b=m.dehydrated;if(Du(a),f)if(a.flags&256)a.flags&=-257,a=Cg(t,a,r);else if(a.memoizedState!==null)a.child=t.child,a.flags|=128,a=null;else throw Error(l(558));else if(jt||di(t,a,r,!1),f=(r&t.childLanes)!==0,jt||f){if(s=nt,s!==null&&(b=bp(s,r),b!==0&&b!==m.retryLane))throw m.retryLane=b,Nr(t,b),oa(s,t,b),nd;is(),a=Cg(t,a,r)}else t=m.treeContext,rt=Ta(b.nextSibling),It=a,Le=!0,zn=null,Ea=!1,t!==null&&h0(a,t),a=Yl(a,s),a.flags|=4096;return a}return t=Xa(t.child,{mode:s.mode,children:s.children}),t.ref=a.ref,a.child=t,t.return=a,t}function Kl(t,a){var r=a.ref;if(r===null)t!==null&&t.ref!==null&&(a.flags|=4194816);else{if(typeof r!="function"&&typeof r!="object")throw Error(l(284));(t===null||t.ref!==r)&&(a.flags|=4194816)}}function rd(t,a,r,s,f){return Tr(a),r=Iu(t,a,r,s,void 0,f),s=Lu(),t!==null&&!jt?(Vu(t,a,f),nn(t,a,f)):(Le&&s&&$u(a),a.flags|=1,Vt(t,a,r,f),a.child)}function Tg(t,a,r,s,f,m){return Tr(a),a.updateQueue=null,r=R0(a,s,r,f),O0(t),s=Lu(),t!==null&&!jt?(Vu(t,a,m),nn(t,a,m)):(Le&&s&&$u(a),a.flags|=1,Vt(t,a,r,m),a.child)}function Mg(t,a,r,s,f){if(Tr(a),a.stateNode===null){var m=li,b=r.contextType;typeof b=="object"&&b!==null&&(m=Lt(b)),m=new r(s,m),a.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=td,a.stateNode=m,m._reactInternals=a,m=a.stateNode,m.props=s,m.state=a.memoizedState,m.refs={},Cu(a),b=r.contextType,m.context=typeof b=="object"&&b!==null?Lt(b):li,m.state=a.memoizedState,b=r.getDerivedStateFromProps,typeof b=="function"&&(ed(a,r,b,s),m.state=a.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(b=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),b!==m.state&&td.enqueueReplaceState(m,m.state,null),$o(a,s,m,f),vo(),m.state=a.memoizedState),typeof m.componentDidMount=="function"&&(a.flags|=4194308),s=!0}else if(t===null){m=a.stateNode;var M=a.memoizedProps,I=Ur(r,M);m.props=I;var X=m.context,oe=r.contextType;b=li,typeof oe=="object"&&oe!==null&&(b=Lt(oe));var ce=r.getDerivedStateFromProps;oe=typeof ce=="function"||typeof m.getSnapshotBeforeUpdate=="function",M=a.pendingProps!==M,oe||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(M||X!==b)&&vg(a,m,s,b),Tn=!1;var ee=a.memoizedState;m.state=ee,$o(a,s,m,f),vo(),X=a.memoizedState,M||ee!==X||Tn?(typeof ce=="function"&&(ed(a,r,ce,s),X=a.memoizedState),(I=Tn||yg(a,r,I,s,ee,X,b))?(oe||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(a.flags|=4194308)):(typeof m.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=s,a.memoizedState=X),m.props=s,m.state=X,m.context=b,s=I):(typeof m.componentDidMount=="function"&&(a.flags|=4194308),s=!1)}else{m=a.stateNode,Tu(t,a),b=a.memoizedProps,oe=Ur(r,b),m.props=oe,ce=a.pendingProps,ee=m.context,X=r.contextType,I=li,typeof X=="object"&&X!==null&&(I=Lt(X)),M=r.getDerivedStateFromProps,(X=typeof M=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(b!==ce||ee!==I)&&vg(a,m,s,I),Tn=!1,ee=a.memoizedState,m.state=ee,$o(a,s,m,f),vo();var ne=a.memoizedState;b!==ce||ee!==ne||Tn||t!==null&&t.dependencies!==null&&Cl(t.dependencies)?(typeof M=="function"&&(ed(a,r,M,s),ne=a.memoizedState),(oe=Tn||yg(a,r,oe,s,ee,ne,I)||t!==null&&t.dependencies!==null&&Cl(t.dependencies))?(X||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(s,ne,I),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(s,ne,I)),typeof m.componentDidUpdate=="function"&&(a.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof m.componentDidUpdate!="function"||b===t.memoizedProps&&ee===t.memoizedState||(a.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||b===t.memoizedProps&&ee===t.memoizedState||(a.flags|=1024),a.memoizedProps=s,a.memoizedState=ne),m.props=s,m.state=ne,m.context=I,s=oe):(typeof m.componentDidUpdate!="function"||b===t.memoizedProps&&ee===t.memoizedState||(a.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||b===t.memoizedProps&&ee===t.memoizedState||(a.flags|=1024),s=!1)}return m=s,Kl(t,a),s=(a.flags&128)!==0,m||s?(m=a.stateNode,r=s&&typeof r.getDerivedStateFromError!="function"?null:m.render(),a.flags|=1,t!==null&&s?(a.child=Ar(a,t.child,null,f),a.child=Ar(a,null,r,f)):Vt(t,a,r,f),a.memoizedState=m.state,t=a.child):t=nn(t,a,f),t}function Og(t,a,r,s){return Er(),a.flags|=256,Vt(t,a,r,s),a.child}var id={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function od(t){return{baseLanes:t,cachePool:_0()}}function ld(t,a,r){return t=t!==null?t.childLanes&~r:0,a&&(t|=va),t}function Rg(t,a,r){var s=a.pendingProps,f=!1,m=(a.flags&128)!==0,b;if((b=m)||(b=t!==null&&t.memoizedState===null?!1:(yt.current&2)!==0),b&&(f=!0,a.flags&=-129),b=(a.flags&32)!==0,a.flags&=-33,t===null){if(Le){if(f?Rn(a):An(),(t=rt)?(t=Hm(t,Ea),t=t!==null&&t.data!=="&"?t:null,t!==null&&(a.memoizedState={dehydrated:t,treeContext:Nn!==null?{id:Va,overflow:Ba}:null,retryLane:536870912,hydrationErrors:null},r=p0(t),r.return=a,a.child=r,It=a,rt=null)):t=null,t===null)throw En(a);return qd(t)?a.lanes=32:a.lanes=536870912,null}var M=s.children;return s=s.fallback,f?(An(),f=a.mode,M=Jl({mode:"hidden",children:M},f),s=zr(s,f,r,null),M.return=a,s.return=a,M.sibling=s,a.child=M,s=a.child,s.memoizedState=od(r),s.childLanes=ld(t,b,r),a.memoizedState=id,So(null,s)):(Rn(a),sd(a,M))}var I=t.memoizedState;if(I!==null&&(M=I.dehydrated,M!==null)){if(m)a.flags&256?(Rn(a),a.flags&=-257,a=cd(t,a,r)):a.memoizedState!==null?(An(),a.child=t.child,a.flags|=128,a=null):(An(),M=s.fallback,f=a.mode,s=Jl({mode:"visible",children:s.children},f),M=zr(M,f,r,null),M.flags|=2,s.return=a,M.return=a,s.sibling=M,a.child=s,Ar(a,t.child,null,r),s=a.child,s.memoizedState=od(r),s.childLanes=ld(t,b,r),a.memoizedState=id,a=So(null,s));else if(Rn(a),qd(M)){if(b=M.nextSibling&&M.nextSibling.dataset,b)var X=b.dgst;b=X,s=Error(l(419)),s.stack="",s.digest=b,fo({value:s,source:null,stack:null}),a=cd(t,a,r)}else if(jt||di(t,a,r,!1),b=(r&t.childLanes)!==0,jt||b){if(b=nt,b!==null&&(s=bp(b,r),s!==0&&s!==I.retryLane))throw I.retryLane=s,Nr(t,s),oa(b,t,s),nd;Hd(M)||is(),a=cd(t,a,r)}else Hd(M)?(a.flags|=192,a.child=t.child,a=null):(t=I.treeContext,rt=Ta(M.nextSibling),It=a,Le=!0,zn=null,Ea=!1,t!==null&&h0(a,t),a=sd(a,s.children),a.flags|=4096);return a}return f?(An(),M=s.fallback,f=a.mode,I=t.child,X=I.sibling,s=Xa(I,{mode:"hidden",children:s.children}),s.subtreeFlags=I.subtreeFlags&65011712,X!==null?M=Xa(X,M):(M=zr(M,f,r,null),M.flags|=2),M.return=a,s.return=a,s.sibling=M,a.child=s,So(null,s),s=a.child,M=t.child.memoizedState,M===null?M=od(r):(f=M.cachePool,f!==null?(I=xt._currentValue,f=f.parent!==I?{parent:I,pool:I}:f):f=_0(),M={baseLanes:M.baseLanes|r,cachePool:f}),s.memoizedState=M,s.childLanes=ld(t,b,r),a.memoizedState=id,So(t.child,s)):(Rn(a),r=t.child,t=r.sibling,r=Xa(r,{mode:"visible",children:s.children}),r.return=a,r.sibling=null,t!==null&&(b=a.deletions,b===null?(a.deletions=[t],a.flags|=16):b.push(t)),a.child=r,a.memoizedState=null,r)}function sd(t,a){return a=Jl({mode:"visible",children:a},t.mode),a.return=t,t.child=a}function Jl(t,a){return t=ga(22,t,null,a),t.lanes=0,t}function cd(t,a,r){return Ar(a,t.child,null,r),t=sd(a,a.pendingProps.children),t.flags|=2,a.memoizedState=null,t}function Ag(t,a,r){t.lanes|=a;var s=t.alternate;s!==null&&(s.lanes|=a),Su(t.return,a,r)}function ud(t,a,r,s,f,m){var b=t.memoizedState;b===null?t.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:s,tail:r,tailMode:f,treeForkCount:m}:(b.isBackwards=a,b.rendering=null,b.renderingStartTime=0,b.last=s,b.tail=r,b.tailMode=f,b.treeForkCount=m)}function Dg(t,a,r){var s=a.pendingProps,f=s.revealOrder,m=s.tail;s=s.children;var b=yt.current,M=(b&2)!==0;if(M?(b=b&1|2,a.flags|=128):b&=1,L(yt,b),Vt(t,a,s,r),s=Le?uo:0,!M&&t!==null&&(t.flags&128)!==0)e:for(t=a.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Ag(t,r,a);else if(t.tag===19)Ag(t,r,a);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===a)break e;for(;t.sibling===null;){if(t.return===null||t.return===a)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(f){case"forwards":for(r=a.child,f=null;r!==null;)t=r.alternate,t!==null&&Il(t)===null&&(f=r),r=r.sibling;r=f,r===null?(f=a.child,a.child=null):(f=r.sibling,r.sibling=null),ud(a,!1,f,r,m,s);break;case"backwards":case"unstable_legacy-backwards":for(r=null,f=a.child,a.child=null;f!==null;){if(t=f.alternate,t!==null&&Il(t)===null){a.child=f;break}t=f.sibling,f.sibling=r,r=f,f=t}ud(a,!0,r,null,m,s);break;case"together":ud(a,!1,null,null,void 0,s);break;default:a.memoizedState=null}return a.child}function nn(t,a,r){if(t!==null&&(a.dependencies=t.dependencies),In|=a.lanes,(r&a.childLanes)===0)if(t!==null){if(di(t,a,r,!1),(r&a.childLanes)===0)return null}else return null;if(t!==null&&a.child!==t.child)throw Error(l(153));if(a.child!==null){for(t=a.child,r=Xa(t,t.pendingProps),a.child=r,r.return=a;t.sibling!==null;)t=t.sibling,r=r.sibling=Xa(t,t.pendingProps),r.return=a;r.sibling=null}return a.child}function dd(t,a){return(t.lanes&a)!==0?!0:(t=t.dependencies,!!(t!==null&&Cl(t)))}function B2(t,a,r){switch(a.tag){case 3:he(a,a.stateNode.containerInfo),Cn(a,xt,t.memoizedState.cache),Er();break;case 27:case 5:Te(a);break;case 4:he(a,a.stateNode.containerInfo);break;case 10:Cn(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,Du(a),null;break;case 13:var s=a.memoizedState;if(s!==null)return s.dehydrated!==null?(Rn(a),a.flags|=128,null):(r&a.child.childLanes)!==0?Rg(t,a,r):(Rn(a),t=nn(t,a,r),t!==null?t.sibling:null);Rn(a);break;case 19:var f=(t.flags&128)!==0;if(s=(r&a.childLanes)!==0,s||(di(t,a,r,!1),s=(r&a.childLanes)!==0),f){if(s)return Dg(t,a,r);a.flags|=128}if(f=a.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),L(yt,yt.current),s)break;return null;case 22:return a.lanes=0,zg(t,a,r,a.pendingProps);case 24:Cn(a,xt,t.memoizedState.cache)}return nn(t,a,r)}function Ug(t,a,r){if(t!==null)if(t.memoizedProps!==a.pendingProps)jt=!0;else{if(!dd(t,r)&&(a.flags&128)===0)return jt=!1,B2(t,a,r);jt=(t.flags&131072)!==0}else jt=!1,Le&&(a.flags&1048576)!==0&&m0(a,uo,a.index);switch(a.lanes=0,a.tag){case 16:e:{var s=a.pendingProps;if(t=Or(a.elementType),a.type=t,typeof t=="function")hu(t)?(s=Ur(t,s),a.tag=1,a=Mg(null,a,t,s,r)):(a.tag=0,a=rd(null,a,t,s,r));else{if(t!=null){var f=t.$$typeof;if(f===R){a.tag=11,a=wg(null,a,t,s,r);break e}else if(f===C){a.tag=14,a=kg(null,a,t,s,r);break e}}throw a=ie(t)||t,Error(l(306,a,""))}}return a;case 0:return rd(t,a,a.type,a.pendingProps,r);case 1:return s=a.type,f=Ur(s,a.pendingProps),Mg(t,a,s,f,r);case 3:e:{if(he(a,a.stateNode.containerInfo),t===null)throw Error(l(387));s=a.pendingProps;var m=a.memoizedState;f=m.element,Tu(t,a),$o(a,s,null,r);var b=a.memoizedState;if(s=b.cache,Cn(a,xt,s),s!==m.cache&&wu(a,[xt],r,!0),vo(),s=b.element,m.isDehydrated)if(m={element:s,isDehydrated:!1,cache:b.cache},a.updateQueue.baseState=m,a.memoizedState=m,a.flags&256){a=Og(t,a,s,r);break e}else if(s!==f){f=ka(Error(l(424)),a),fo(f),a=Og(t,a,s,r);break e}else{switch(t=a.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(rt=Ta(t.firstChild),It=a,Le=!0,zn=null,Ea=!0,r=z0(a,null,s,r),a.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling}else{if(Er(),s===f){a=nn(t,a,r);break e}Vt(t,a,s,r)}a=a.child}return a;case 26:return Kl(t,a),t===null?(r=Ym(a.type,null,a.pendingProps,null))?a.memoizedState=r:Le||(r=a.type,t=a.pendingProps,s=fs(J.current).createElement(r),s[Ut]=a,s[ea]=t,Bt(s,r,t),Mt(s),a.stateNode=s):a.memoizedState=Ym(a.type,t.memoizedProps,a.pendingProps,t.memoizedState),null;case 27:return Te(a),t===null&&Le&&(s=a.stateNode=Zm(a.type,a.pendingProps,J.current),It=a,Ea=!0,f=rt,qn(a.type)?(Pd=f,rt=Ta(s.firstChild)):rt=f),Vt(t,a,a.pendingProps.children,r),Kl(t,a),t===null&&(a.flags|=4194304),a.child;case 5:return t===null&&Le&&((f=s=rt)&&(s=yb(s,a.type,a.pendingProps,Ea),s!==null?(a.stateNode=s,It=a,rt=Ta(s.firstChild),Ea=!1,f=!0):f=!1),f||En(a)),Te(a),f=a.type,m=a.pendingProps,b=t!==null?t.memoizedProps:null,s=m.children,Ld(f,m)?s=null:b!==null&&Ld(f,b)&&(a.flags|=32),a.memoizedState!==null&&(f=Iu(t,a,M2,null,null,r),Lo._currentValue=f),Kl(t,a),Vt(t,a,s,r),a.child;case 6:return t===null&&Le&&((t=r=rt)&&(r=vb(r,a.pendingProps,Ea),r!==null?(a.stateNode=r,It=a,rt=null,t=!0):t=!1),t||En(a)),null;case 13:return Rg(t,a,r);case 4:return he(a,a.stateNode.containerInfo),s=a.pendingProps,t===null?a.child=Ar(a,null,s,r):Vt(t,a,s,r),a.child;case 11:return wg(t,a,a.type,a.pendingProps,r);case 7:return Vt(t,a,a.pendingProps,r),a.child;case 8:return Vt(t,a,a.pendingProps.children,r),a.child;case 12:return Vt(t,a,a.pendingProps.children,r),a.child;case 10:return s=a.pendingProps,Cn(a,a.type,s.value),Vt(t,a,s.children,r),a.child;case 9:return f=a.type._context,s=a.pendingProps.children,Tr(a),f=Lt(f),s=s(f),a.flags|=1,Vt(t,a,s,r),a.child;case 14:return kg(t,a,a.type,a.pendingProps,r);case 15:return Ng(t,a,a.type,a.pendingProps,r);case 19:return Dg(t,a,r);case 31:return V2(t,a,r);case 22:return zg(t,a,r,a.pendingProps);case 24:return Tr(a),s=Lt(xt),t===null?(f=zu(),f===null&&(f=nt,m=ku(),f.pooledCache=m,m.refCount++,m!==null&&(f.pooledCacheLanes|=r),f=m),a.memoizedState={parent:s,cache:f},Cu(a),Cn(a,xt,f)):((t.lanes&r)!==0&&(Tu(t,a),$o(a,null,null,r),vo()),f=t.memoizedState,m=a.memoizedState,f.parent!==s?(f={parent:s,cache:s},a.memoizedState=f,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=f),Cn(a,xt,s)):(s=m.cache,Cn(a,xt,s),s!==f.cache&&wu(a,[xt],r,!0))),Vt(t,a,a.pendingProps.children,r),a.child;case 29:throw a.pendingProps}throw Error(l(156,a.tag))}function rn(t){t.flags|=4}function fd(t,a,r,s,f){if((a=(t.mode&32)!==0)&&(a=!1),a){if(t.flags|=16777216,(f&335544128)===f)if(t.stateNode.complete)t.flags|=8192;else if(um())t.flags|=8192;else throw Rr=Rl,Eu}else t.flags&=-16777217}function Ig(t,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Wm(a))if(um())t.flags|=8192;else throw Rr=Rl,Eu}function Xl(t,a){a!==null&&(t.flags|=4),t.flags&16384&&(a=t.tag!==22?yp():536870912,t.lanes|=a,ji|=a)}function wo(t,a){if(!Le)switch(t.tailMode){case"hidden":a=t.tail;for(var r=null;a!==null;)a.alternate!==null&&(r=a),a=a.sibling;r===null?t.tail=null:r.sibling=null;break;case"collapsed":r=t.tail;for(var s=null;r!==null;)r.alternate!==null&&(s=r),r=r.sibling;s===null?a||t.tail===null?t.tail=null:t.tail.sibling=null:s.sibling=null}}function it(t){var a=t.alternate!==null&&t.alternate.child===t.child,r=0,s=0;if(a)for(var f=t.child;f!==null;)r|=f.lanes|f.childLanes,s|=f.subtreeFlags&65011712,s|=f.flags&65011712,f.return=t,f=f.sibling;else for(f=t.child;f!==null;)r|=f.lanes|f.childLanes,s|=f.subtreeFlags,s|=f.flags,f.return=t,f=f.sibling;return t.subtreeFlags|=s,t.childLanes=r,a}function H2(t,a,r){var s=a.pendingProps;switch(bu(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return it(a),null;case 1:return it(a),null;case 3:return r=a.stateNode,s=null,t!==null&&(s=t.memoizedState.cache),a.memoizedState.cache!==s&&(a.flags|=2048),en(xt),Se(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(ui(a)?rn(a):t===null||t.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,_u())),it(a),null;case 26:var f=a.type,m=a.memoizedState;return t===null?(rn(a),m!==null?(it(a),Ig(a,m)):(it(a),fd(a,f,null,s,r))):m?m!==t.memoizedState?(rn(a),it(a),Ig(a,m)):(it(a),a.flags&=-16777217):(t=t.memoizedProps,t!==s&&rn(a),it(a),fd(a,f,t,s,r)),null;case 27:if(P(a),r=J.current,f=a.type,t!==null&&a.stateNode!=null)t.memoizedProps!==s&&rn(a);else{if(!s){if(a.stateNode===null)throw Error(l(166));return it(a),null}t=O.current,ui(a)?y0(a):(t=Zm(f,s,r),a.stateNode=t,rn(a))}return it(a),null;case 5:if(P(a),f=a.type,t!==null&&a.stateNode!=null)t.memoizedProps!==s&&rn(a);else{if(!s){if(a.stateNode===null)throw Error(l(166));return it(a),null}if(m=O.current,ui(a))y0(a);else{var b=fs(J.current);switch(m){case 1:m=b.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:m=b.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":m=b.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":m=b.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":m=b.createElement("div"),m.innerHTML="<script><\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof s.is=="string"?b.createElement("select",{is:s.is}):b.createElement("select"),s.multiple?m.multiple=!0:s.size&&(m.size=s.size);break;default:m=typeof s.is=="string"?b.createElement(f,{is:s.is}):b.createElement(f)}}m[Ut]=a,m[ea]=s;e:for(b=a.child;b!==null;){if(b.tag===5||b.tag===6)m.appendChild(b.stateNode);else if(b.tag!==4&&b.tag!==27&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===a)break e;for(;b.sibling===null;){if(b.return===null||b.return===a)break e;b=b.return}b.sibling.return=b.return,b=b.sibling}a.stateNode=m;e:switch(Bt(m,f,s),f){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&rn(a)}}return it(a),fd(a,a.type,t===null?null:t.memoizedProps,a.pendingProps,r),null;case 6:if(t&&a.stateNode!=null)t.memoizedProps!==s&&rn(a);else{if(typeof s!="string"&&a.stateNode===null)throw Error(l(166));if(t=J.current,ui(a)){if(t=a.stateNode,r=a.memoizedProps,s=null,f=It,f!==null)switch(f.tag){case 27:case 5:s=f.memoizedProps}t[Ut]=a,t=!!(t.nodeValue===r||s!==null&&s.suppressHydrationWarning===!0||Rm(t.nodeValue,r)),t||En(a,!0)}else t=fs(t).createTextNode(s),t[Ut]=a,a.stateNode=t}return it(a),null;case 31:if(r=a.memoizedState,t===null||t.memoizedState!==null){if(s=ui(a),r!==null){if(t===null){if(!s)throw Error(l(318));if(t=a.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(557));t[Ut]=a}else Er(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;it(a),t=!1}else r=_u(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=r),t=!0;if(!t)return a.flags&256?(ha(a),a):(ha(a),null);if((a.flags&128)!==0)throw Error(l(558))}return it(a),null;case 13:if(s=a.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(f=ui(a),s!==null&&s.dehydrated!==null){if(t===null){if(!f)throw Error(l(318));if(f=a.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(l(317));f[Ut]=a}else Er(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;it(a),f=!1}else f=_u(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=f),f=!0;if(!f)return a.flags&256?(ha(a),a):(ha(a),null)}return ha(a),(a.flags&128)!==0?(a.lanes=r,a):(r=s!==null,t=t!==null&&t.memoizedState!==null,r&&(s=a.child,f=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(f=s.alternate.memoizedState.cachePool.pool),m=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(m=s.memoizedState.cachePool.pool),m!==f&&(s.flags|=2048)),r!==t&&r&&(a.child.flags|=8192),Xl(a,a.updateQueue),it(a),null);case 4:return Se(),t===null&&Rd(a.stateNode.containerInfo),it(a),null;case 10:return en(a.type),it(a),null;case 19:if(V(yt),s=a.memoizedState,s===null)return it(a),null;if(f=(a.flags&128)!==0,m=s.rendering,m===null)if(f)wo(s,!1);else{if(pt!==0||t!==null&&(t.flags&128)!==0)for(t=a.child;t!==null;){if(m=Il(t),m!==null){for(a.flags|=128,wo(s,!1),t=m.updateQueue,a.updateQueue=t,Xl(a,t),a.subtreeFlags=0,t=r,r=a.child;r!==null;)f0(r,t),r=r.sibling;return L(yt,yt.current&1|2),Le&&Qa(a,s.treeForkCount),a.child}t=t.sibling}s.tail!==null&&Dt()>as&&(a.flags|=128,f=!0,wo(s,!1),a.lanes=4194304)}else{if(!f)if(t=Il(m),t!==null){if(a.flags|=128,f=!0,t=t.updateQueue,a.updateQueue=t,Xl(a,t),wo(s,!0),s.tail===null&&s.tailMode==="hidden"&&!m.alternate&&!Le)return it(a),null}else 2*Dt()-s.renderingStartTime>as&&r!==536870912&&(a.flags|=128,f=!0,wo(s,!1),a.lanes=4194304);s.isBackwards?(m.sibling=a.child,a.child=m):(t=s.last,t!==null?t.sibling=m:a.child=m,s.last=m)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Dt(),t.sibling=null,r=yt.current,L(yt,f?r&1|2:r&1),Le&&Qa(a,s.treeForkCount),t):(it(a),null);case 22:case 23:return ha(a),Au(),s=a.memoizedState!==null,t!==null?t.memoizedState!==null!==s&&(a.flags|=8192):s&&(a.flags|=8192),s?(r&536870912)!==0&&(a.flags&128)===0&&(it(a),a.subtreeFlags&6&&(a.flags|=8192)):it(a),r=a.updateQueue,r!==null&&Xl(a,r.retryQueue),r=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),s=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(s=a.memoizedState.cachePool.pool),s!==r&&(a.flags|=2048),t!==null&&V(Mr),null;case 24:return r=null,t!==null&&(r=t.memoizedState.cache),a.memoizedState.cache!==r&&(a.flags|=2048),en(xt),it(a),null;case 25:return null;case 30:return null}throw Error(l(156,a.tag))}function q2(t,a){switch(bu(a),a.tag){case 1:return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 3:return en(xt),Se(),t=a.flags,(t&65536)!==0&&(t&128)===0?(a.flags=t&-65537|128,a):null;case 26:case 27:case 5:return P(a),null;case 31:if(a.memoizedState!==null){if(ha(a),a.alternate===null)throw Error(l(340));Er()}return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 13:if(ha(a),t=a.memoizedState,t!==null&&t.dehydrated!==null){if(a.alternate===null)throw Error(l(340));Er()}return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 19:return V(yt),null;case 4:return Se(),null;case 10:return en(a.type),null;case 22:case 23:return ha(a),Au(),t!==null&&V(Mr),t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 24:return en(xt),null;case 25:return null;default:return null}}function Lg(t,a){switch(bu(a),a.tag){case 3:en(xt),Se();break;case 26:case 27:case 5:P(a);break;case 4:Se();break;case 31:a.memoizedState!==null&&ha(a);break;case 13:ha(a);break;case 19:V(yt);break;case 10:en(a.type);break;case 22:case 23:ha(a),Au(),t!==null&&V(Mr);break;case 24:en(xt)}}function ko(t,a){try{var r=a.updateQueue,s=r!==null?r.lastEffect:null;if(s!==null){var f=s.next;r=f;do{if((r.tag&t)===t){s=void 0;var m=r.create,b=r.inst;s=m(),b.destroy=s}r=r.next}while(r!==f)}}catch(M){Ke(a,a.return,M)}}function Dn(t,a,r){try{var s=a.updateQueue,f=s!==null?s.lastEffect:null;if(f!==null){var m=f.next;s=m;do{if((s.tag&t)===t){var b=s.inst,M=b.destroy;if(M!==void 0){b.destroy=void 0,f=a;var I=r,X=M;try{X()}catch(oe){Ke(f,I,oe)}}}s=s.next}while(s!==m)}}catch(oe){Ke(a,a.return,oe)}}function Vg(t){var a=t.updateQueue;if(a!==null){var r=t.stateNode;try{C0(a,r)}catch(s){Ke(t,t.return,s)}}}function Bg(t,a,r){r.props=Ur(t.type,t.memoizedProps),r.state=t.memoizedState;try{r.componentWillUnmount()}catch(s){Ke(t,a,s)}}function No(t,a){try{var r=t.ref;if(r!==null){switch(t.tag){case 26:case 27:case 5:var s=t.stateNode;break;case 30:s=t.stateNode;break;default:s=t.stateNode}typeof r=="function"?t.refCleanup=r(s):r.current=s}}catch(f){Ke(t,a,f)}}function Ha(t,a){var r=t.ref,s=t.refCleanup;if(r!==null)if(typeof s=="function")try{s()}catch(f){Ke(t,a,f)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof r=="function")try{r(null)}catch(f){Ke(t,a,f)}else r.current=null}function Hg(t){var a=t.type,r=t.memoizedProps,s=t.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":r.autoFocus&&s.focus();break e;case"img":r.src?s.src=r.src:r.srcSet&&(s.srcset=r.srcSet)}}catch(f){Ke(t,t.return,f)}}function pd(t,a,r){try{var s=t.stateNode;db(s,t.type,r,a),s[ea]=a}catch(f){Ke(t,t.return,f)}}function qg(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&qn(t.type)||t.tag===4}function gd(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||qg(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&qn(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function md(t,a,r){var s=t.tag;if(s===5||s===6)t=t.stateNode,a?(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r).insertBefore(t,a):(a=r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,a.appendChild(t),r=r._reactRootContainer,r!=null||a.onclick!==null||(a.onclick=Ka));else if(s!==4&&(s===27&&qn(t.type)&&(r=t.stateNode,a=null),t=t.child,t!==null))for(md(t,a,r),t=t.sibling;t!==null;)md(t,a,r),t=t.sibling}function Ql(t,a,r){var s=t.tag;if(s===5||s===6)t=t.stateNode,a?r.insertBefore(t,a):r.appendChild(t);else if(s!==4&&(s===27&&qn(t.type)&&(r=t.stateNode),t=t.child,t!==null))for(Ql(t,a,r),t=t.sibling;t!==null;)Ql(t,a,r),t=t.sibling}function Pg(t){var a=t.stateNode,r=t.memoizedProps;try{for(var s=t.type,f=a.attributes;f.length;)a.removeAttributeNode(f[0]);Bt(a,s,r),a[Ut]=t,a[ea]=r}catch(m){Ke(t,t.return,m)}}var on=!1,St=!1,hd=!1,Zg=typeof WeakSet=="function"?WeakSet:Set,Ot=null;function P2(t,a){if(t=t.containerInfo,Ud=$s,t=n0(t),cu(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var s=r.getSelection&&r.getSelection();if(s&&s.rangeCount!==0){r=s.anchorNode;var f=s.anchorOffset,m=s.focusNode;s=s.focusOffset;try{r.nodeType,m.nodeType}catch{r=null;break e}var b=0,M=-1,I=-1,X=0,oe=0,ce=t,ee=null;t:for(;;){for(var ne;ce!==r||f!==0&&ce.nodeType!==3||(M=b+f),ce!==m||s!==0&&ce.nodeType!==3||(I=b+s),ce.nodeType===3&&(b+=ce.nodeValue.length),(ne=ce.firstChild)!==null;)ee=ce,ce=ne;for(;;){if(ce===t)break t;if(ee===r&&++X===f&&(M=b),ee===m&&++oe===s&&(I=b),(ne=ce.nextSibling)!==null)break;ce=ee,ee=ce.parentNode}ce=ne}r=M===-1||I===-1?null:{start:M,end:I}}else r=null}r=r||{start:0,end:0}}else r=null;for(Id={focusedElem:t,selectionRange:r},$s=!1,Ot=a;Ot!==null;)if(a=Ot,t=a.child,(a.subtreeFlags&1028)!==0&&t!==null)t.return=a,Ot=t;else for(;Ot!==null;){switch(a=Ot,m=a.alternate,t=a.flags,a.tag){case 0:if((t&4)!==0&&(t=a.updateQueue,t=t!==null?t.events:null,t!==null))for(r=0;r<t.length;r++)f=t[r],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&m!==null){t=void 0,r=a,f=m.memoizedProps,m=m.memoizedState,s=r.stateNode;try{var ye=Ur(r.type,f);t=s.getSnapshotBeforeUpdate(ye,m),s.__reactInternalSnapshotBeforeUpdate=t}catch(we){Ke(r,r.return,we)}}break;case 3:if((t&1024)!==0){if(t=a.stateNode.containerInfo,r=t.nodeType,r===9)Bd(t);else if(r===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Bd(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(l(163))}if(t=a.sibling,t!==null){t.return=a.return,Ot=t;break}Ot=a.return}}function Gg(t,a,r){var s=r.flags;switch(r.tag){case 0:case 11:case 15:sn(t,r),s&4&&ko(5,r);break;case 1:if(sn(t,r),s&4)if(t=r.stateNode,a===null)try{t.componentDidMount()}catch(b){Ke(r,r.return,b)}else{var f=Ur(r.type,a.memoizedProps);a=a.memoizedState;try{t.componentDidUpdate(f,a,t.__reactInternalSnapshotBeforeUpdate)}catch(b){Ke(r,r.return,b)}}s&64&&Vg(r),s&512&&No(r,r.return);break;case 3:if(sn(t,r),s&64&&(t=r.updateQueue,t!==null)){if(a=null,r.child!==null)switch(r.child.tag){case 27:case 5:a=r.child.stateNode;break;case 1:a=r.child.stateNode}try{C0(t,a)}catch(b){Ke(r,r.return,b)}}break;case 27:a===null&&s&4&&Pg(r);case 26:case 5:sn(t,r),a===null&&s&4&&Hg(r),s&512&&No(r,r.return);break;case 12:sn(t,r);break;case 31:sn(t,r),s&4&&Kg(t,r);break;case 13:sn(t,r),s&4&&Jg(t,r),s&64&&(t=r.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(r=W2.bind(null,r),$b(t,r))));break;case 22:if(s=r.memoizedState!==null||on,!s){a=a!==null&&a.memoizedState!==null||St,f=on;var m=St;on=s,(St=a)&&!m?cn(t,r,(r.subtreeFlags&8772)!==0):sn(t,r),on=f,St=m}break;case 30:break;default:sn(t,r)}}function Fg(t){var a=t.alternate;a!==null&&(t.alternate=null,Fg(a)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(a=t.stateNode,a!==null&&Gc(a)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var ct=null,aa=!1;function ln(t,a,r){for(r=r.child;r!==null;)Yg(t,a,r),r=r.sibling}function Yg(t,a,r){if(da&&typeof da.onCommitFiberUnmount=="function")try{da.onCommitFiberUnmount(Ji,r)}catch{}switch(r.tag){case 26:St||Ha(r,a),ln(t,a,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:St||Ha(r,a);var s=ct,f=aa;qn(r.type)&&(ct=r.stateNode,aa=!1),ln(t,a,r),Do(r.stateNode),ct=s,aa=f;break;case 5:St||Ha(r,a);case 6:if(s=ct,f=aa,ct=null,ln(t,a,r),ct=s,aa=f,ct!==null)if(aa)try{(ct.nodeType===9?ct.body:ct.nodeName==="HTML"?ct.ownerDocument.body:ct).removeChild(r.stateNode)}catch(m){Ke(r,a,m)}else try{ct.removeChild(r.stateNode)}catch(m){Ke(r,a,m)}break;case 18:ct!==null&&(aa?(t=ct,Vm(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,r.stateNode),Ti(t)):Vm(ct,r.stateNode));break;case 4:s=ct,f=aa,ct=r.stateNode.containerInfo,aa=!0,ln(t,a,r),ct=s,aa=f;break;case 0:case 11:case 14:case 15:Dn(2,r,a),St||Dn(4,r,a),ln(t,a,r);break;case 1:St||(Ha(r,a),s=r.stateNode,typeof s.componentWillUnmount=="function"&&Bg(r,a,s)),ln(t,a,r);break;case 21:ln(t,a,r);break;case 22:St=(s=St)||r.memoizedState!==null,ln(t,a,r),St=s;break;default:ln(t,a,r)}}function Kg(t,a){if(a.memoizedState===null&&(t=a.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Ti(t)}catch(r){Ke(a,a.return,r)}}}function Jg(t,a){if(a.memoizedState===null&&(t=a.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Ti(t)}catch(r){Ke(a,a.return,r)}}function Z2(t){switch(t.tag){case 31:case 13:case 19:var a=t.stateNode;return a===null&&(a=t.stateNode=new Zg),a;case 22:return t=t.stateNode,a=t._retryCache,a===null&&(a=t._retryCache=new Zg),a;default:throw Error(l(435,t.tag))}}function Wl(t,a){var r=Z2(t);a.forEach(function(s){if(!r.has(s)){r.add(s);var f=eb.bind(null,t,s);s.then(f,f)}})}function na(t,a){var r=a.deletions;if(r!==null)for(var s=0;s<r.length;s++){var f=r[s],m=t,b=a,M=b;e:for(;M!==null;){switch(M.tag){case 27:if(qn(M.type)){ct=M.stateNode,aa=!1;break e}break;case 5:ct=M.stateNode,aa=!1;break e;case 3:case 4:ct=M.stateNode.containerInfo,aa=!0;break e}M=M.return}if(ct===null)throw Error(l(160));Yg(m,b,f),ct=null,aa=!1,m=f.alternate,m!==null&&(m.return=null),f.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)Xg(a,t),a=a.sibling}var Aa=null;function Xg(t,a){var r=t.alternate,s=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:na(a,t),ra(t),s&4&&(Dn(3,t,t.return),ko(3,t),Dn(5,t,t.return));break;case 1:na(a,t),ra(t),s&512&&(St||r===null||Ha(r,r.return)),s&64&&on&&(t=t.updateQueue,t!==null&&(s=t.callbacks,s!==null&&(r=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=r===null?s:r.concat(s))));break;case 26:var f=Aa;if(na(a,t),ra(t),s&512&&(St||r===null||Ha(r,r.return)),s&4){var m=r!==null?r.memoizedState:null;if(s=t.memoizedState,r===null)if(s===null)if(t.stateNode===null){e:{s=t.type,r=t.memoizedProps,f=f.ownerDocument||f;t:switch(s){case"title":m=f.getElementsByTagName("title")[0],(!m||m[Wi]||m[Ut]||m.namespaceURI==="http://www.w3.org/2000/svg"||m.hasAttribute("itemprop"))&&(m=f.createElement(s),f.head.insertBefore(m,f.querySelector("head > title"))),Bt(m,s,r),m[Ut]=t,Mt(m),s=m;break e;case"link":var b=Xm("link","href",f).get(s+(r.href||""));if(b){for(var M=0;M<b.length;M++)if(m=b[M],m.getAttribute("href")===(r.href==null||r.href===""?null:r.href)&&m.getAttribute("rel")===(r.rel==null?null:r.rel)&&m.getAttribute("title")===(r.title==null?null:r.title)&&m.getAttribute("crossorigin")===(r.crossOrigin==null?null:r.crossOrigin)){b.splice(M,1);break t}}m=f.createElement(s),Bt(m,s,r),f.head.appendChild(m);break;case"meta":if(b=Xm("meta","content",f).get(s+(r.content||""))){for(M=0;M<b.length;M++)if(m=b[M],m.getAttribute("content")===(r.content==null?null:""+r.content)&&m.getAttribute("name")===(r.name==null?null:r.name)&&m.getAttribute("property")===(r.property==null?null:r.property)&&m.getAttribute("http-equiv")===(r.httpEquiv==null?null:r.httpEquiv)&&m.getAttribute("charset")===(r.charSet==null?null:r.charSet)){b.splice(M,1);break t}}m=f.createElement(s),Bt(m,s,r),f.head.appendChild(m);break;default:throw Error(l(468,s))}m[Ut]=t,Mt(m),s=m}t.stateNode=s}else Qm(f,t.type,t.stateNode);else t.stateNode=Jm(f,s,t.memoizedProps);else m!==s?(m===null?r.stateNode!==null&&(r=r.stateNode,r.parentNode.removeChild(r)):m.count--,s===null?Qm(f,t.type,t.stateNode):Jm(f,s,t.memoizedProps)):s===null&&t.stateNode!==null&&pd(t,t.memoizedProps,r.memoizedProps)}break;case 27:na(a,t),ra(t),s&512&&(St||r===null||Ha(r,r.return)),r!==null&&s&4&&pd(t,t.memoizedProps,r.memoizedProps);break;case 5:if(na(a,t),ra(t),s&512&&(St||r===null||Ha(r,r.return)),t.flags&32){f=t.stateNode;try{ei(f,"")}catch(ye){Ke(t,t.return,ye)}}s&4&&t.stateNode!=null&&(f=t.memoizedProps,pd(t,f,r!==null?r.memoizedProps:f)),s&1024&&(hd=!0);break;case 6:if(na(a,t),ra(t),s&4){if(t.stateNode===null)throw Error(l(162));s=t.memoizedProps,r=t.stateNode;try{r.nodeValue=s}catch(ye){Ke(t,t.return,ye)}}break;case 3:if(ms=null,f=Aa,Aa=ps(a.containerInfo),na(a,t),Aa=f,ra(t),s&4&&r!==null&&r.memoizedState.isDehydrated)try{Ti(a.containerInfo)}catch(ye){Ke(t,t.return,ye)}hd&&(hd=!1,Qg(t));break;case 4:s=Aa,Aa=ps(t.stateNode.containerInfo),na(a,t),ra(t),Aa=s;break;case 12:na(a,t),ra(t);break;case 31:na(a,t),ra(t),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,Wl(t,s)));break;case 13:na(a,t),ra(t),t.child.flags&8192&&t.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(ts=Dt()),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,Wl(t,s)));break;case 22:f=t.memoizedState!==null;var I=r!==null&&r.memoizedState!==null,X=on,oe=St;if(on=X||f,St=oe||I,na(a,t),St=oe,on=X,ra(t),s&8192)e:for(a=t.stateNode,a._visibility=f?a._visibility&-2:a._visibility|1,f&&(r===null||I||on||St||Ir(t)),r=null,a=t;;){if(a.tag===5||a.tag===26){if(r===null){I=r=a;try{if(m=I.stateNode,f)b=m.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{M=I.stateNode;var ce=I.memoizedProps.style,ee=ce!=null&&ce.hasOwnProperty("display")?ce.display:null;M.style.display=ee==null||typeof ee=="boolean"?"":(""+ee).trim()}}catch(ye){Ke(I,I.return,ye)}}}else if(a.tag===6){if(r===null){I=a;try{I.stateNode.nodeValue=f?"":I.memoizedProps}catch(ye){Ke(I,I.return,ye)}}}else if(a.tag===18){if(r===null){I=a;try{var ne=I.stateNode;f?Bm(ne,!0):Bm(I.stateNode,!1)}catch(ye){Ke(I,I.return,ye)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===t)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break e;for(;a.sibling===null;){if(a.return===null||a.return===t)break e;r===a&&(r=null),a=a.return}r===a&&(r=null),a.sibling.return=a.return,a=a.sibling}s&4&&(s=t.updateQueue,s!==null&&(r=s.retryQueue,r!==null&&(s.retryQueue=null,Wl(t,r))));break;case 19:na(a,t),ra(t),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,Wl(t,s)));break;case 30:break;case 21:break;default:na(a,t),ra(t)}}function ra(t){var a=t.flags;if(a&2){try{for(var r,s=t.return;s!==null;){if(qg(s)){r=s;break}s=s.return}if(r==null)throw Error(l(160));switch(r.tag){case 27:var f=r.stateNode,m=gd(t);Ql(t,m,f);break;case 5:var b=r.stateNode;r.flags&32&&(ei(b,""),r.flags&=-33);var M=gd(t);Ql(t,M,b);break;case 3:case 4:var I=r.stateNode.containerInfo,X=gd(t);md(t,X,I);break;default:throw Error(l(161))}}catch(oe){Ke(t,t.return,oe)}t.flags&=-3}a&4096&&(t.flags&=-4097)}function Qg(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var a=t;Qg(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),t=t.sibling}}function sn(t,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)Gg(t,a.alternate,a),a=a.sibling}function Ir(t){for(t=t.child;t!==null;){var a=t;switch(a.tag){case 0:case 11:case 14:case 15:Dn(4,a,a.return),Ir(a);break;case 1:Ha(a,a.return);var r=a.stateNode;typeof r.componentWillUnmount=="function"&&Bg(a,a.return,r),Ir(a);break;case 27:Do(a.stateNode);case 26:case 5:Ha(a,a.return),Ir(a);break;case 22:a.memoizedState===null&&Ir(a);break;case 30:Ir(a);break;default:Ir(a)}t=t.sibling}}function cn(t,a,r){for(r=r&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var s=a.alternate,f=t,m=a,b=m.flags;switch(m.tag){case 0:case 11:case 15:cn(f,m,r),ko(4,m);break;case 1:if(cn(f,m,r),s=m,f=s.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(X){Ke(s,s.return,X)}if(s=m,f=s.updateQueue,f!==null){var M=s.stateNode;try{var I=f.shared.hiddenCallbacks;if(I!==null)for(f.shared.hiddenCallbacks=null,f=0;f<I.length;f++)E0(I[f],M)}catch(X){Ke(s,s.return,X)}}r&&b&64&&Vg(m),No(m,m.return);break;case 27:Pg(m);case 26:case 5:cn(f,m,r),r&&s===null&&b&4&&Hg(m),No(m,m.return);break;case 12:cn(f,m,r);break;case 31:cn(f,m,r),r&&b&4&&Kg(f,m);break;case 13:cn(f,m,r),r&&b&4&&Jg(f,m);break;case 22:m.memoizedState===null&&cn(f,m,r),No(m,m.return);break;case 30:break;default:cn(f,m,r)}a=a.sibling}}function yd(t,a){var r=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),t=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(t=a.memoizedState.cachePool.pool),t!==r&&(t!=null&&t.refCount++,r!=null&&po(r))}function vd(t,a){t=null,a.alternate!==null&&(t=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==t&&(a.refCount++,t!=null&&po(t))}function Da(t,a,r,s){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)Wg(t,a,r,s),a=a.sibling}function Wg(t,a,r,s){var f=a.flags;switch(a.tag){case 0:case 11:case 15:Da(t,a,r,s),f&2048&&ko(9,a);break;case 1:Da(t,a,r,s);break;case 3:Da(t,a,r,s),f&2048&&(t=null,a.alternate!==null&&(t=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==t&&(a.refCount++,t!=null&&po(t)));break;case 12:if(f&2048){Da(t,a,r,s),t=a.stateNode;try{var m=a.memoizedProps,b=m.id,M=m.onPostCommit;typeof M=="function"&&M(b,a.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(I){Ke(a,a.return,I)}}else Da(t,a,r,s);break;case 31:Da(t,a,r,s);break;case 13:Da(t,a,r,s);break;case 23:break;case 22:m=a.stateNode,b=a.alternate,a.memoizedState!==null?m._visibility&2?Da(t,a,r,s):zo(t,a):m._visibility&2?Da(t,a,r,s):(m._visibility|=2,bi(t,a,r,s,(a.subtreeFlags&10256)!==0||!1)),f&2048&&yd(b,a);break;case 24:Da(t,a,r,s),f&2048&&vd(a.alternate,a);break;default:Da(t,a,r,s)}}function bi(t,a,r,s,f){for(f=f&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var m=t,b=a,M=r,I=s,X=b.flags;switch(b.tag){case 0:case 11:case 15:bi(m,b,M,I,f),ko(8,b);break;case 23:break;case 22:var oe=b.stateNode;b.memoizedState!==null?oe._visibility&2?bi(m,b,M,I,f):zo(m,b):(oe._visibility|=2,bi(m,b,M,I,f)),f&&X&2048&&yd(b.alternate,b);break;case 24:bi(m,b,M,I,f),f&&X&2048&&vd(b.alternate,b);break;default:bi(m,b,M,I,f)}a=a.sibling}}function zo(t,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var r=t,s=a,f=s.flags;switch(s.tag){case 22:zo(r,s),f&2048&&yd(s.alternate,s);break;case 24:zo(r,s),f&2048&&vd(s.alternate,s);break;default:zo(r,s)}a=a.sibling}}var Eo=8192;function xi(t,a,r){if(t.subtreeFlags&Eo)for(t=t.child;t!==null;)em(t,a,r),t=t.sibling}function em(t,a,r){switch(t.tag){case 26:xi(t,a,r),t.flags&Eo&&t.memoizedState!==null&&Tb(r,Aa,t.memoizedState,t.memoizedProps);break;case 5:xi(t,a,r);break;case 3:case 4:var s=Aa;Aa=ps(t.stateNode.containerInfo),xi(t,a,r),Aa=s;break;case 22:t.memoizedState===null&&(s=t.alternate,s!==null&&s.memoizedState!==null?(s=Eo,Eo=16777216,xi(t,a,r),Eo=s):xi(t,a,r));break;default:xi(t,a,r)}}function tm(t){var a=t.alternate;if(a!==null&&(t=a.child,t!==null)){a.child=null;do a=t.sibling,t.sibling=null,t=a;while(t!==null)}}function Co(t){var a=t.deletions;if((t.flags&16)!==0){if(a!==null)for(var r=0;r<a.length;r++){var s=a[r];Ot=s,nm(s,t)}tm(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)am(t),t=t.sibling}function am(t){switch(t.tag){case 0:case 11:case 15:Co(t),t.flags&2048&&Dn(9,t,t.return);break;case 3:Co(t);break;case 12:Co(t);break;case 22:var a=t.stateNode;t.memoizedState!==null&&a._visibility&2&&(t.return===null||t.return.tag!==13)?(a._visibility&=-3,es(t)):Co(t);break;default:Co(t)}}function es(t){var a=t.deletions;if((t.flags&16)!==0){if(a!==null)for(var r=0;r<a.length;r++){var s=a[r];Ot=s,nm(s,t)}tm(t)}for(t=t.child;t!==null;){switch(a=t,a.tag){case 0:case 11:case 15:Dn(8,a,a.return),es(a);break;case 22:r=a.stateNode,r._visibility&2&&(r._visibility&=-3,es(a));break;default:es(a)}t=t.sibling}}function nm(t,a){for(;Ot!==null;){var r=Ot;switch(r.tag){case 0:case 11:case 15:Dn(8,r,a);break;case 23:case 22:if(r.memoizedState!==null&&r.memoizedState.cachePool!==null){var s=r.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:po(r.memoizedState.cache)}if(s=r.child,s!==null)s.return=r,Ot=s;else e:for(r=t;Ot!==null;){s=Ot;var f=s.sibling,m=s.return;if(Fg(s),s===r){Ot=null;break e}if(f!==null){f.return=m,Ot=f;break e}Ot=m}}}var G2={getCacheForType:function(t){var a=Lt(xt),r=a.data.get(t);return r===void 0&&(r=t(),a.data.set(t,r)),r},cacheSignal:function(){return Lt(xt).controller.signal}},F2=typeof WeakMap=="function"?WeakMap:Map,Ge=0,nt=null,Ae=null,Ue=0,Ye=0,ya=null,Un=!1,_i=!1,$d=!1,un=0,pt=0,In=0,Lr=0,bd=0,va=0,ji=0,To=null,ia=null,xd=!1,ts=0,rm=0,as=1/0,ns=null,Ln=null,Et=0,Vn=null,Si=null,dn=0,_d=0,jd=null,im=null,Mo=0,Sd=null;function $a(){return(Ge&2)!==0&&Ue!==0?Ue&-Ue:ae.T!==null?Cd():xp()}function om(){if(va===0)if((Ue&536870912)===0||Le){var t=dl;dl<<=1,(dl&3932160)===0&&(dl=262144),va=t}else va=536870912;return t=ma.current,t!==null&&(t.flags|=32),va}function oa(t,a,r){(t===nt&&(Ye===2||Ye===9)||t.cancelPendingCommit!==null)&&(wi(t,0),Bn(t,Ue,va,!1)),Qi(t,r),((Ge&2)===0||t!==nt)&&(t===nt&&((Ge&2)===0&&(Lr|=r),pt===4&&Bn(t,Ue,va,!1)),qa(t))}function lm(t,a,r){if((Ge&6)!==0)throw Error(l(327));var s=!r&&(a&127)===0&&(a&t.expiredLanes)===0||Xi(t,a),f=s?J2(t,a):kd(t,a,!0),m=s;do{if(f===0){_i&&!s&&Bn(t,a,0,!1);break}else{if(r=t.current.alternate,m&&!Y2(r)){f=kd(t,a,!1),m=!1;continue}if(f===2){if(m=a,t.errorRecoveryDisabledLanes&m)var b=0;else b=t.pendingLanes&-536870913,b=b!==0?b:b&536870912?536870912:0;if(b!==0){a=b;e:{var M=t;f=To;var I=M.current.memoizedState.isDehydrated;if(I&&(wi(M,b).flags|=256),b=kd(M,b,!1),b!==2){if($d&&!I){M.errorRecoveryDisabledLanes|=m,Lr|=m,f=4;break e}m=ia,ia=f,m!==null&&(ia===null?ia=m:ia.push.apply(ia,m))}f=b}if(m=!1,f!==2)continue}}if(f===1){wi(t,0),Bn(t,a,0,!0);break}e:{switch(s=t,m=f,m){case 0:case 1:throw Error(l(345));case 4:if((a&4194048)!==a)break;case 6:Bn(s,a,va,!Un);break e;case 2:ia=null;break;case 3:case 5:break;default:throw Error(l(329))}if((a&62914560)===a&&(f=ts+300-Dt(),10<f)){if(Bn(s,a,va,!Un),pl(s,0,!0)!==0)break e;dn=a,s.timeoutHandle=Im(sm.bind(null,s,r,ia,ns,xd,a,va,Lr,ji,Un,m,"Throttled",-0,0),f);break e}sm(s,r,ia,ns,xd,a,va,Lr,ji,Un,m,null,-0,0)}}break}while(!0);qa(t)}function sm(t,a,r,s,f,m,b,M,I,X,oe,ce,ee,ne){if(t.timeoutHandle=-1,ce=a.subtreeFlags,ce&8192||(ce&16785408)===16785408){ce={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ka},em(a,m,ce);var ye=(m&62914560)===m?ts-Dt():(m&4194048)===m?rm-Dt():0;if(ye=Mb(ce,ye),ye!==null){dn=m,t.cancelPendingCommit=ye(hm.bind(null,t,a,m,r,s,f,b,M,I,oe,ce,null,ee,ne)),Bn(t,m,b,!X);return}}hm(t,a,m,r,s,f,b,M,I)}function Y2(t){for(var a=t;;){var r=a.tag;if((r===0||r===11||r===15)&&a.flags&16384&&(r=a.updateQueue,r!==null&&(r=r.stores,r!==null)))for(var s=0;s<r.length;s++){var f=r[s],m=f.getSnapshot;f=f.value;try{if(!pa(m(),f))return!1}catch{return!1}}if(r=a.child,a.subtreeFlags&16384&&r!==null)r.return=a,a=r;else{if(a===t)break;for(;a.sibling===null;){if(a.return===null||a.return===t)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function Bn(t,a,r,s){a&=~bd,a&=~Lr,t.suspendedLanes|=a,t.pingedLanes&=~a,s&&(t.warmLanes|=a),s=t.expirationTimes;for(var f=a;0<f;){var m=31-fa(f),b=1<<m;s[m]=-1,f&=~b}r!==0&&vp(t,r,a)}function rs(){return(Ge&6)===0?(Oo(0),!1):!0}function wd(){if(Ae!==null){if(Ye===0)var t=Ae.return;else t=Ae,Wa=Cr=null,Bu(t),mi=null,mo=0,t=Ae;for(;t!==null;)Lg(t.alternate,t),t=t.return;Ae=null}}function wi(t,a){var r=t.timeoutHandle;r!==-1&&(t.timeoutHandle=-1,gb(r)),r=t.cancelPendingCommit,r!==null&&(t.cancelPendingCommit=null,r()),dn=0,wd(),nt=t,Ae=r=Xa(t.current,null),Ue=a,Ye=0,ya=null,Un=!1,_i=Xi(t,a),$d=!1,ji=va=bd=Lr=In=pt=0,ia=To=null,xd=!1,(a&8)!==0&&(a|=a&32);var s=t.entangledLanes;if(s!==0)for(t=t.entanglements,s&=a;0<s;){var f=31-fa(s),m=1<<f;a|=t[f],s&=~m}return un=a,wl(),r}function cm(t,a){Ee=null,ae.H=jo,a===gi||a===Ol?(a=w0(),Ye=3):a===Eu?(a=w0(),Ye=4):Ye=a===nd?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,ya=a,Ae===null&&(pt=1,Fl(t,ka(a,t.current)))}function um(){var t=ma.current;return t===null?!0:(Ue&4194048)===Ue?Ca===null:(Ue&62914560)===Ue||(Ue&536870912)!==0?t===Ca:!1}function dm(){var t=ae.H;return ae.H=jo,t===null?jo:t}function fm(){var t=ae.A;return ae.A=G2,t}function is(){pt=4,Un||(Ue&4194048)!==Ue&&ma.current!==null||(_i=!0),(In&134217727)===0&&(Lr&134217727)===0||nt===null||Bn(nt,Ue,va,!1)}function kd(t,a,r){var s=Ge;Ge|=2;var f=dm(),m=fm();(nt!==t||Ue!==a)&&(ns=null,wi(t,a)),a=!1;var b=pt;e:do try{if(Ye!==0&&Ae!==null){var M=Ae,I=ya;switch(Ye){case 8:wd(),b=6;break e;case 3:case 2:case 9:case 6:ma.current===null&&(a=!0);var X=Ye;if(Ye=0,ya=null,ki(t,M,I,X),r&&_i){b=0;break e}break;default:X=Ye,Ye=0,ya=null,ki(t,M,I,X)}}K2(),b=pt;break}catch(oe){cm(t,oe)}while(!0);return a&&t.shellSuspendCounter++,Wa=Cr=null,Ge=s,ae.H=f,ae.A=m,Ae===null&&(nt=null,Ue=0,wl()),b}function K2(){for(;Ae!==null;)pm(Ae)}function J2(t,a){var r=Ge;Ge|=2;var s=dm(),f=fm();nt!==t||Ue!==a?(ns=null,as=Dt()+500,wi(t,a)):_i=Xi(t,a);e:do try{if(Ye!==0&&Ae!==null){a=Ae;var m=ya;t:switch(Ye){case 1:Ye=0,ya=null,ki(t,a,m,1);break;case 2:case 9:if(j0(m)){Ye=0,ya=null,gm(a);break}a=function(){Ye!==2&&Ye!==9||nt!==t||(Ye=7),qa(t)},m.then(a,a);break e;case 3:Ye=7;break e;case 4:Ye=5;break e;case 7:j0(m)?(Ye=0,ya=null,gm(a)):(Ye=0,ya=null,ki(t,a,m,7));break;case 5:var b=null;switch(Ae.tag){case 26:b=Ae.memoizedState;case 5:case 27:var M=Ae;if(b?Wm(b):M.stateNode.complete){Ye=0,ya=null;var I=M.sibling;if(I!==null)Ae=I;else{var X=M.return;X!==null?(Ae=X,os(X)):Ae=null}break t}}Ye=0,ya=null,ki(t,a,m,5);break;case 6:Ye=0,ya=null,ki(t,a,m,6);break;case 8:wd(),pt=6;break e;default:throw Error(l(462))}}X2();break}catch(oe){cm(t,oe)}while(!0);return Wa=Cr=null,ae.H=s,ae.A=f,Ge=r,Ae!==null?0:(nt=null,Ue=0,wl(),pt)}function X2(){for(;Ae!==null&&!_n();)pm(Ae)}function pm(t){var a=Ug(t.alternate,t,un);t.memoizedProps=t.pendingProps,a===null?os(t):Ae=a}function gm(t){var a=t,r=a.alternate;switch(a.tag){case 15:case 0:a=Tg(r,a,a.pendingProps,a.type,void 0,Ue);break;case 11:a=Tg(r,a,a.pendingProps,a.type.render,a.ref,Ue);break;case 5:Bu(a);default:Lg(r,a),a=Ae=f0(a,un),a=Ug(r,a,un)}t.memoizedProps=t.pendingProps,a===null?os(t):Ae=a}function ki(t,a,r,s){Wa=Cr=null,Bu(a),mi=null,mo=0;var f=a.return;try{if(L2(t,f,a,r,Ue)){pt=1,Fl(t,ka(r,t.current)),Ae=null;return}}catch(m){if(f!==null)throw Ae=f,m;pt=1,Fl(t,ka(r,t.current)),Ae=null;return}a.flags&32768?(Le||s===1?t=!0:_i||(Ue&536870912)!==0?t=!1:(Un=t=!0,(s===2||s===9||s===3||s===6)&&(s=ma.current,s!==null&&s.tag===13&&(s.flags|=16384))),mm(a,t)):os(a)}function os(t){var a=t;do{if((a.flags&32768)!==0){mm(a,Un);return}t=a.return;var r=H2(a.alternate,a,un);if(r!==null){Ae=r;return}if(a=a.sibling,a!==null){Ae=a;return}Ae=a=t}while(a!==null);pt===0&&(pt=5)}function mm(t,a){do{var r=q2(t.alternate,t);if(r!==null){r.flags&=32767,Ae=r;return}if(r=t.return,r!==null&&(r.flags|=32768,r.subtreeFlags=0,r.deletions=null),!a&&(t=t.sibling,t!==null)){Ae=t;return}Ae=t=r}while(t!==null);pt=6,Ae=null}function hm(t,a,r,s,f,m,b,M,I){t.cancelPendingCommit=null;do ls();while(Et!==0);if((Ge&6)!==0)throw Error(l(327));if(a!==null){if(a===t.current)throw Error(l(177));if(m=a.lanes|a.childLanes,m|=gu,C$(t,r,m,b,M,I),t===nt&&(Ae=nt=null,Ue=0),Si=a,Vn=t,dn=r,_d=m,jd=f,im=s,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,tb(xr,function(){return xm(),null})):(t.callbackNode=null,t.callbackPriority=0),s=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||s){s=ae.T,ae.T=null,f=fe.p,fe.p=2,b=Ge,Ge|=4;try{P2(t,a,r)}finally{Ge=b,fe.p=f,ae.T=s}}Et=1,ym(),vm(),$m()}}function ym(){if(Et===1){Et=0;var t=Vn,a=Si,r=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||r){r=ae.T,ae.T=null;var s=fe.p;fe.p=2;var f=Ge;Ge|=4;try{Xg(a,t);var m=Id,b=n0(t.containerInfo),M=m.focusedElem,I=m.selectionRange;if(b!==M&&M&&M.ownerDocument&&a0(M.ownerDocument.documentElement,M)){if(I!==null&&cu(M)){var X=I.start,oe=I.end;if(oe===void 0&&(oe=X),"selectionStart"in M)M.selectionStart=X,M.selectionEnd=Math.min(oe,M.value.length);else{var ce=M.ownerDocument||document,ee=ce&&ce.defaultView||window;if(ee.getSelection){var ne=ee.getSelection(),ye=M.textContent.length,we=Math.min(I.start,ye),et=I.end===void 0?we:Math.min(I.end,ye);!ne.extend&&we>et&&(b=et,et=we,we=b);var q=t0(M,we),B=t0(M,et);if(q&&B&&(ne.rangeCount!==1||ne.anchorNode!==q.node||ne.anchorOffset!==q.offset||ne.focusNode!==B.node||ne.focusOffset!==B.offset)){var K=ce.createRange();K.setStart(q.node,q.offset),ne.removeAllRanges(),we>et?(ne.addRange(K),ne.extend(B.node,B.offset)):(K.setEnd(B.node,B.offset),ne.addRange(K))}}}}for(ce=[],ne=M;ne=ne.parentNode;)ne.nodeType===1&&ce.push({element:ne,left:ne.scrollLeft,top:ne.scrollTop});for(typeof M.focus=="function"&&M.focus(),M=0;M<ce.length;M++){var se=ce[M];se.element.scrollLeft=se.left,se.element.scrollTop=se.top}}$s=!!Ud,Id=Ud=null}finally{Ge=f,fe.p=s,ae.T=r}}t.current=a,Et=2}}function vm(){if(Et===2){Et=0;var t=Vn,a=Si,r=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||r){r=ae.T,ae.T=null;var s=fe.p;fe.p=2;var f=Ge;Ge|=4;try{Gg(t,a.alternate,a)}finally{Ge=f,fe.p=s,ae.T=r}}Et=3}}function $m(){if(Et===4||Et===3){Et=0,Wt();var t=Vn,a=Si,r=dn,s=im;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?Et=5:(Et=0,Si=Vn=null,bm(t,t.pendingLanes));var f=t.pendingLanes;if(f===0&&(Ln=null),Pc(r),a=a.stateNode,da&&typeof da.onCommitFiberRoot=="function")try{da.onCommitFiberRoot(Ji,a,void 0,(a.current.flags&128)===128)}catch{}if(s!==null){a=ae.T,f=fe.p,fe.p=2,ae.T=null;try{for(var m=t.onRecoverableError,b=0;b<s.length;b++){var M=s[b];m(M.value,{componentStack:M.stack})}}finally{ae.T=a,fe.p=f}}(dn&3)!==0&&ls(),qa(t),f=t.pendingLanes,(r&261930)!==0&&(f&42)!==0?t===Sd?Mo++:(Mo=0,Sd=t):Mo=0,Oo(0)}}function bm(t,a){(t.pooledCacheLanes&=a)===0&&(a=t.pooledCache,a!=null&&(t.pooledCache=null,po(a)))}function ls(){return ym(),vm(),$m(),xm()}function xm(){if(Et!==5)return!1;var t=Vn,a=_d;_d=0;var r=Pc(dn),s=ae.T,f=fe.p;try{fe.p=32>r?32:r,ae.T=null,r=jd,jd=null;var m=Vn,b=dn;if(Et=0,Si=Vn=null,dn=0,(Ge&6)!==0)throw Error(l(331));var M=Ge;if(Ge|=4,am(m.current),Wg(m,m.current,b,r),Ge=M,Oo(0,!1),da&&typeof da.onPostCommitFiberRoot=="function")try{da.onPostCommitFiberRoot(Ji,m)}catch{}return!0}finally{fe.p=f,ae.T=s,bm(t,a)}}function _m(t,a,r){a=ka(r,a),a=ad(t.stateNode,a,2),t=On(t,a,2),t!==null&&(Qi(t,2),qa(t))}function Ke(t,a,r){if(t.tag===3)_m(t,t,r);else for(;a!==null;){if(a.tag===3){_m(a,t,r);break}else if(a.tag===1){var s=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Ln===null||!Ln.has(s))){t=ka(r,t),r=jg(2),s=On(a,r,2),s!==null&&(Sg(r,s,a,t),Qi(s,2),qa(s));break}}a=a.return}}function Nd(t,a,r){var s=t.pingCache;if(s===null){s=t.pingCache=new F2;var f=new Set;s.set(a,f)}else f=s.get(a),f===void 0&&(f=new Set,s.set(a,f));f.has(r)||($d=!0,f.add(r),t=Q2.bind(null,t,a,r),a.then(t,t))}function Q2(t,a,r){var s=t.pingCache;s!==null&&s.delete(a),t.pingedLanes|=t.suspendedLanes&r,t.warmLanes&=~r,nt===t&&(Ue&r)===r&&(pt===4||pt===3&&(Ue&62914560)===Ue&&300>Dt()-ts?(Ge&2)===0&&wi(t,0):bd|=r,ji===Ue&&(ji=0)),qa(t)}function jm(t,a){a===0&&(a=yp()),t=Nr(t,a),t!==null&&(Qi(t,a),qa(t))}function W2(t){var a=t.memoizedState,r=0;a!==null&&(r=a.retryLane),jm(t,r)}function eb(t,a){var r=0;switch(t.tag){case 31:case 13:var s=t.stateNode,f=t.memoizedState;f!==null&&(r=f.retryLane);break;case 19:s=t.stateNode;break;case 22:s=t.stateNode._retryCache;break;default:throw Error(l(314))}s!==null&&s.delete(a),jm(t,r)}function tb(t,a){return Tt(t,a)}var ss=null,Ni=null,zd=!1,cs=!1,Ed=!1,Hn=0;function qa(t){t!==Ni&&t.next===null&&(Ni===null?ss=Ni=t:Ni=Ni.next=t),cs=!0,zd||(zd=!0,nb())}function Oo(t,a){if(!Ed&&cs){Ed=!0;do for(var r=!1,s=ss;s!==null;){if(t!==0){var f=s.pendingLanes;if(f===0)var m=0;else{var b=s.suspendedLanes,M=s.pingedLanes;m=(1<<31-fa(42|t)+1)-1,m&=f&~(b&~M),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(r=!0,Nm(s,m))}else m=Ue,m=pl(s,s===nt?m:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(m&3)===0||Xi(s,m)||(r=!0,Nm(s,m));s=s.next}while(r);Ed=!1}}function ab(){Sm()}function Sm(){cs=zd=!1;var t=0;Hn!==0&&pb()&&(t=Hn);for(var a=Dt(),r=null,s=ss;s!==null;){var f=s.next,m=wm(s,a);m===0?(s.next=null,r===null?ss=f:r.next=f,f===null&&(Ni=r)):(r=s,(t!==0||(m&3)!==0)&&(cs=!0)),s=f}Et!==0&&Et!==5||Oo(t),Hn!==0&&(Hn=0)}function wm(t,a){for(var r=t.suspendedLanes,s=t.pingedLanes,f=t.expirationTimes,m=t.pendingLanes&-62914561;0<m;){var b=31-fa(m),M=1<<b,I=f[b];I===-1?((M&r)===0||(M&s)!==0)&&(f[b]=E$(M,a)):I<=a&&(t.expiredLanes|=M),m&=~M}if(a=nt,r=Ue,r=pl(t,t===a?r:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),s=t.callbackNode,r===0||t===a&&(Ye===2||Ye===9)||t.cancelPendingCommit!==null)return s!==null&&s!==null&&ht(s),t.callbackNode=null,t.callbackPriority=0;if((r&3)===0||Xi(t,r)){if(a=r&-r,a===t.callbackPriority)return a;switch(s!==null&&ht(s),Pc(r)){case 2:case 8:r=Fr;break;case 32:r=xr;break;case 268435456:r=cl;break;default:r=xr}return s=km.bind(null,t),r=Tt(r,s),t.callbackPriority=a,t.callbackNode=r,a}return s!==null&&s!==null&&ht(s),t.callbackPriority=2,t.callbackNode=null,2}function km(t,a){if(Et!==0&&Et!==5)return t.callbackNode=null,t.callbackPriority=0,null;var r=t.callbackNode;if(ls()&&t.callbackNode!==r)return null;var s=Ue;return s=pl(t,t===nt?s:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),s===0?null:(lm(t,s,a),wm(t,Dt()),t.callbackNode!=null&&t.callbackNode===r?km.bind(null,t):null)}function Nm(t,a){if(ls())return null;lm(t,a,!0)}function nb(){mb(function(){(Ge&6)!==0?Tt(jn,ab):Sm()})}function Cd(){if(Hn===0){var t=fi;t===0&&(t=ul,ul<<=1,(ul&261888)===0&&(ul=256)),Hn=t}return Hn}function zm(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:yl(""+t)}function Em(t,a){var r=a.ownerDocument.createElement("input");return r.name=a.name,r.value=a.value,t.id&&r.setAttribute("form",t.id),a.parentNode.insertBefore(r,a),t=new FormData(t),r.parentNode.removeChild(r),t}function rb(t,a,r,s,f){if(a==="submit"&&r&&r.stateNode===f){var m=zm((f[ea]||null).action),b=s.submitter;b&&(a=(a=b[ea]||null)?zm(a.formAction):b.getAttribute("formAction"),a!==null&&(m=a,b=null));var M=new xl("action","action",null,s,f);t.push({event:M,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Hn!==0){var I=b?Em(f,b):new FormData(f);Ju(r,{pending:!0,data:I,method:f.method,action:m},null,I)}}else typeof m=="function"&&(M.preventDefault(),I=b?Em(f,b):new FormData(f),Ju(r,{pending:!0,data:I,method:f.method,action:m},m,I))},currentTarget:f}]})}}for(var Td=0;Td<pu.length;Td++){var Md=pu[Td],ib=Md.toLowerCase(),ob=Md[0].toUpperCase()+Md.slice(1);Ra(ib,"on"+ob)}Ra(o0,"onAnimationEnd"),Ra(l0,"onAnimationIteration"),Ra(s0,"onAnimationStart"),Ra("dblclick","onDoubleClick"),Ra("focusin","onFocus"),Ra("focusout","onBlur"),Ra(_2,"onTransitionRun"),Ra(j2,"onTransitionStart"),Ra(S2,"onTransitionCancel"),Ra(c0,"onTransitionEnd"),Qr("onMouseEnter",["mouseout","mouseover"]),Qr("onMouseLeave",["mouseout","mouseover"]),Qr("onPointerEnter",["pointerout","pointerover"]),Qr("onPointerLeave",["pointerout","pointerover"]),jr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),jr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),jr("onBeforeInput",["compositionend","keypress","textInput","paste"]),jr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),jr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),jr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ro="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(" "),lb=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ro));function Cm(t,a){a=(a&4)!==0;for(var r=0;r<t.length;r++){var s=t[r],f=s.event;s=s.listeners;e:{var m=void 0;if(a)for(var b=s.length-1;0<=b;b--){var M=s[b],I=M.instance,X=M.currentTarget;if(M=M.listener,I!==m&&f.isPropagationStopped())break e;m=M,f.currentTarget=X;try{m(f)}catch(oe){Sl(oe)}f.currentTarget=null,m=I}else for(b=0;b<s.length;b++){if(M=s[b],I=M.instance,X=M.currentTarget,M=M.listener,I!==m&&f.isPropagationStopped())break e;m=M,f.currentTarget=X;try{m(f)}catch(oe){Sl(oe)}f.currentTarget=null,m=I}}}}function De(t,a){var r=a[Zc];r===void 0&&(r=a[Zc]=new Set);var s=t+"__bubble";r.has(s)||(Tm(a,t,2,!1),r.add(s))}function Od(t,a,r){var s=0;a&&(s|=4),Tm(r,t,s,a)}var us="_reactListening"+Math.random().toString(36).slice(2);function Rd(t){if(!t[us]){t[us]=!0,Sp.forEach(function(r){r!=="selectionchange"&&(lb.has(r)||Od(r,!1,t),Od(r,!0,t))});var a=t.nodeType===9?t:t.ownerDocument;a===null||a[us]||(a[us]=!0,Od("selectionchange",!1,a))}}function Tm(t,a,r,s){switch(oh(a)){case 2:var f=Ab;break;case 8:f=Db;break;default:f=Kd}r=f.bind(null,a,r,t),f=void 0,!eu||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(f=!0),s?f!==void 0?t.addEventListener(a,r,{capture:!0,passive:f}):t.addEventListener(a,r,!0):f!==void 0?t.addEventListener(a,r,{passive:f}):t.addEventListener(a,r,!1)}function Ad(t,a,r,s,f){var m=s;if((a&1)===0&&(a&2)===0&&s!==null)e:for(;;){if(s===null)return;var b=s.tag;if(b===3||b===4){var M=s.stateNode.containerInfo;if(M===f)break;if(b===4)for(b=s.return;b!==null;){var I=b.tag;if((I===3||I===4)&&b.stateNode.containerInfo===f)return;b=b.return}for(;M!==null;){if(b=Kr(M),b===null)return;if(I=b.tag,I===5||I===6||I===26||I===27){s=m=b;continue e}M=M.parentNode}}s=s.return}Dp(function(){var X=m,oe=Qc(r),ce=[];e:{var ee=u0.get(t);if(ee!==void 0){var ne=xl,ye=t;switch(t){case"keypress":if($l(r)===0)break e;case"keydown":case"keyup":ne=e2;break;case"focusin":ye="focus",ne=ru;break;case"focusout":ye="blur",ne=ru;break;case"beforeblur":case"afterblur":ne=ru;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ne=Lp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ne=H$;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ne=n2;break;case o0:case l0:case s0:ne=Z$;break;case c0:ne=i2;break;case"scroll":case"scrollend":ne=V$;break;case"wheel":ne=l2;break;case"copy":case"cut":case"paste":ne=F$;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ne=Bp;break;case"toggle":case"beforetoggle":ne=c2}var we=(a&4)!==0,et=!we&&(t==="scroll"||t==="scrollend"),q=we?ee!==null?ee+"Capture":null:ee;we=[];for(var B=X,K;B!==null;){var se=B;if(K=se.stateNode,se=se.tag,se!==5&&se!==26&&se!==27||K===null||q===null||(se=to(B,q),se!=null&&we.push(Ao(B,se,K))),et)break;B=B.return}0<we.length&&(ee=new ne(ee,ye,null,r,oe),ce.push({event:ee,listeners:we}))}}if((a&7)===0){e:{if(ee=t==="mouseover"||t==="pointerover",ne=t==="mouseout"||t==="pointerout",ee&&r!==Xc&&(ye=r.relatedTarget||r.fromElement)&&(Kr(ye)||ye[Yr]))break e;if((ne||ee)&&(ee=oe.window===oe?oe:(ee=oe.ownerDocument)?ee.defaultView||ee.parentWindow:window,ne?(ye=r.relatedTarget||r.toElement,ne=X,ye=ye?Kr(ye):null,ye!==null&&(et=u(ye),we=ye.tag,ye!==et||we!==5&&we!==27&&we!==6)&&(ye=null)):(ne=null,ye=X),ne!==ye)){if(we=Lp,se="onMouseLeave",q="onMouseEnter",B="mouse",(t==="pointerout"||t==="pointerover")&&(we=Bp,se="onPointerLeave",q="onPointerEnter",B="pointer"),et=ne==null?ee:eo(ne),K=ye==null?ee:eo(ye),ee=new we(se,B+"leave",ne,r,oe),ee.target=et,ee.relatedTarget=K,se=null,Kr(oe)===X&&(we=new we(q,B+"enter",ye,r,oe),we.target=K,we.relatedTarget=et,se=we),et=se,ne&&ye)t:{for(we=sb,q=ne,B=ye,K=0,se=q;se;se=we(se))K++;se=0;for(var je=B;je;je=we(je))se++;for(;0<K-se;)q=we(q),K--;for(;0<se-K;)B=we(B),se--;for(;K--;){if(q===B||B!==null&&q===B.alternate){we=q;break t}q=we(q),B=we(B)}we=null}else we=null;ne!==null&&Mm(ce,ee,ne,we,!1),ye!==null&&et!==null&&Mm(ce,et,ye,we,!0)}}e:{if(ee=X?eo(X):window,ne=ee.nodeName&&ee.nodeName.toLowerCase(),ne==="select"||ne==="input"&&ee.type==="file")var Pe=Kp;else if(Fp(ee))if(Jp)Pe=$2;else{Pe=y2;var $e=h2}else ne=ee.nodeName,!ne||ne.toLowerCase()!=="input"||ee.type!=="checkbox"&&ee.type!=="radio"?X&&Jc(X.elementType)&&(Pe=Kp):Pe=v2;if(Pe&&(Pe=Pe(t,X))){Yp(ce,Pe,r,oe);break e}$e&&$e(t,ee,X),t==="focusout"&&X&&ee.type==="number"&&X.memoizedProps.value!=null&&Kc(ee,"number",ee.value)}switch($e=X?eo(X):window,t){case"focusin":(Fp($e)||$e.contentEditable==="true")&&(ri=$e,uu=X,co=null);break;case"focusout":co=uu=ri=null;break;case"mousedown":du=!0;break;case"contextmenu":case"mouseup":case"dragend":du=!1,r0(ce,r,oe);break;case"selectionchange":if(x2)break;case"keydown":case"keyup":r0(ce,r,oe)}var Ce;if(ou)e:{switch(t){case"compositionstart":var Ie="onCompositionStart";break e;case"compositionend":Ie="onCompositionEnd";break e;case"compositionupdate":Ie="onCompositionUpdate";break e}Ie=void 0}else ni?Zp(t,r)&&(Ie="onCompositionEnd"):t==="keydown"&&r.keyCode===229&&(Ie="onCompositionStart");Ie&&(Hp&&r.locale!=="ko"&&(ni||Ie!=="onCompositionStart"?Ie==="onCompositionEnd"&&ni&&(Ce=Up()):(kn=oe,tu="value"in kn?kn.value:kn.textContent,ni=!0)),$e=ds(X,Ie),0<$e.length&&(Ie=new Vp(Ie,t,null,r,oe),ce.push({event:Ie,listeners:$e}),Ce?Ie.data=Ce:(Ce=Gp(r),Ce!==null&&(Ie.data=Ce)))),(Ce=d2?f2(t,r):p2(t,r))&&(Ie=ds(X,"onBeforeInput"),0<Ie.length&&($e=new Vp("onBeforeInput","beforeinput",null,r,oe),ce.push({event:$e,listeners:Ie}),$e.data=Ce)),rb(ce,t,X,r,oe)}Cm(ce,a)})}function Ao(t,a,r){return{instance:t,listener:a,currentTarget:r}}function ds(t,a){for(var r=a+"Capture",s=[];t!==null;){var f=t,m=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||m===null||(f=to(t,r),f!=null&&s.unshift(Ao(t,f,m)),f=to(t,a),f!=null&&s.push(Ao(t,f,m))),t.tag===3)return s;t=t.return}return[]}function sb(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function Mm(t,a,r,s,f){for(var m=a._reactName,b=[];r!==null&&r!==s;){var M=r,I=M.alternate,X=M.stateNode;if(M=M.tag,I!==null&&I===s)break;M!==5&&M!==26&&M!==27||X===null||(I=X,f?(X=to(r,m),X!=null&&b.unshift(Ao(r,X,I))):f||(X=to(r,m),X!=null&&b.push(Ao(r,X,I)))),r=r.return}b.length!==0&&t.push({event:a,listeners:b})}var cb=/\r\n?/g,ub=/\u0000|\uFFFD/g;function Om(t){return(typeof t=="string"?t:""+t).replace(cb,`
49
- `).replace(ub,"")}function Rm(t,a){return a=Om(a),Om(t)===a}function We(t,a,r,s,f,m){switch(r){case"children":typeof s=="string"?a==="body"||a==="textarea"&&s===""||ei(t,s):(typeof s=="number"||typeof s=="bigint")&&a!=="body"&&ei(t,""+s);break;case"className":ml(t,"class",s);break;case"tabIndex":ml(t,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":ml(t,r,s);break;case"style":Rp(t,s,m);break;case"data":if(a!=="object"){ml(t,"data",s);break}case"src":case"href":if(s===""&&(a!=="a"||r!=="href")){t.removeAttribute(r);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){t.removeAttribute(r);break}s=yl(""+s),t.setAttribute(r,s);break;case"action":case"formAction":if(typeof s=="function"){t.setAttribute(r,"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}else typeof m=="function"&&(r==="formAction"?(a!=="input"&&We(t,a,"name",f.name,f,null),We(t,a,"formEncType",f.formEncType,f,null),We(t,a,"formMethod",f.formMethod,f,null),We(t,a,"formTarget",f.formTarget,f,null)):(We(t,a,"encType",f.encType,f,null),We(t,a,"method",f.method,f,null),We(t,a,"target",f.target,f,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){t.removeAttribute(r);break}s=yl(""+s),t.setAttribute(r,s);break;case"onClick":s!=null&&(t.onclick=Ka);break;case"onScroll":s!=null&&De("scroll",t);break;case"onScrollEnd":s!=null&&De("scrollend",t);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(l(61));if(r=s.__html,r!=null){if(f.children!=null)throw Error(l(60));t.innerHTML=r}}break;case"multiple":t.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":t.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){t.removeAttribute("xlink:href");break}r=yl(""+s),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(r,""+s):t.removeAttribute(r);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":s&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(r,""):t.removeAttribute(r);break;case"capture":case"download":s===!0?t.setAttribute(r,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(r,s):t.removeAttribute(r);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?t.setAttribute(r,s):t.removeAttribute(r);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?t.removeAttribute(r):t.setAttribute(r,s);break;case"popover":De("beforetoggle",t),De("toggle",t),gl(t,"popover",s);break;case"xlinkActuate":Ya(t,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":Ya(t,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":Ya(t,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":Ya(t,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":Ya(t,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":Ya(t,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":Ya(t,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":Ya(t,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":Ya(t,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":gl(t,"is",s);break;case"innerText":case"textContent":break;default:(!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(r=I$.get(r)||r,gl(t,r,s))}}function Dd(t,a,r,s,f,m){switch(r){case"style":Rp(t,s,m);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(l(61));if(r=s.__html,r!=null){if(f.children!=null)throw Error(l(60));t.innerHTML=r}}break;case"children":typeof s=="string"?ei(t,s):(typeof s=="number"||typeof s=="bigint")&&ei(t,""+s);break;case"onScroll":s!=null&&De("scroll",t);break;case"onScrollEnd":s!=null&&De("scrollend",t);break;case"onClick":s!=null&&(t.onclick=Ka);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!wp.hasOwnProperty(r))e:{if(r[0]==="o"&&r[1]==="n"&&(f=r.endsWith("Capture"),a=r.slice(2,f?r.length-7:void 0),m=t[ea]||null,m=m!=null?m[r]:null,typeof m=="function"&&t.removeEventListener(a,m,f),typeof s=="function")){typeof m!="function"&&m!==null&&(r in t?t[r]=null:t.hasAttribute(r)&&t.removeAttribute(r)),t.addEventListener(a,s,f);break e}r in t?t[r]=s:s===!0?t.setAttribute(r,""):gl(t,r,s)}}}function Bt(t,a,r){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":De("error",t),De("load",t);var s=!1,f=!1,m;for(m in r)if(r.hasOwnProperty(m)){var b=r[m];if(b!=null)switch(m){case"src":s=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,a));default:We(t,a,m,b,r,null)}}f&&We(t,a,"srcSet",r.srcSet,r,null),s&&We(t,a,"src",r.src,r,null);return;case"input":De("invalid",t);var M=m=b=f=null,I=null,X=null;for(s in r)if(r.hasOwnProperty(s)){var oe=r[s];if(oe!=null)switch(s){case"name":f=oe;break;case"type":b=oe;break;case"checked":I=oe;break;case"defaultChecked":X=oe;break;case"value":m=oe;break;case"defaultValue":M=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(l(137,a));break;default:We(t,a,s,oe,r,null)}}Cp(t,m,M,I,X,b,f,!1);return;case"select":De("invalid",t),s=b=m=null;for(f in r)if(r.hasOwnProperty(f)&&(M=r[f],M!=null))switch(f){case"value":m=M;break;case"defaultValue":b=M;break;case"multiple":s=M;default:We(t,a,f,M,r,null)}a=m,r=b,t.multiple=!!s,a!=null?Wr(t,!!s,a,!1):r!=null&&Wr(t,!!s,r,!0);return;case"textarea":De("invalid",t),m=f=s=null;for(b in r)if(r.hasOwnProperty(b)&&(M=r[b],M!=null))switch(b){case"value":s=M;break;case"defaultValue":f=M;break;case"children":m=M;break;case"dangerouslySetInnerHTML":if(M!=null)throw Error(l(91));break;default:We(t,a,b,M,r,null)}Mp(t,s,f,m);return;case"option":for(I in r)if(r.hasOwnProperty(I)&&(s=r[I],s!=null))switch(I){case"selected":t.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:We(t,a,I,s,r,null)}return;case"dialog":De("beforetoggle",t),De("toggle",t),De("cancel",t),De("close",t);break;case"iframe":case"object":De("load",t);break;case"video":case"audio":for(s=0;s<Ro.length;s++)De(Ro[s],t);break;case"image":De("error",t),De("load",t);break;case"details":De("toggle",t);break;case"embed":case"source":case"link":De("error",t),De("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(X in r)if(r.hasOwnProperty(X)&&(s=r[X],s!=null))switch(X){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,a));default:We(t,a,X,s,r,null)}return;default:if(Jc(a)){for(oe in r)r.hasOwnProperty(oe)&&(s=r[oe],s!==void 0&&Dd(t,a,oe,s,r,void 0));return}}for(M in r)r.hasOwnProperty(M)&&(s=r[M],s!=null&&We(t,a,M,s,r,null))}function db(t,a,r,s){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,m=null,b=null,M=null,I=null,X=null,oe=null;for(ne in r){var ce=r[ne];if(r.hasOwnProperty(ne)&&ce!=null)switch(ne){case"checked":break;case"value":break;case"defaultValue":I=ce;default:s.hasOwnProperty(ne)||We(t,a,ne,null,s,ce)}}for(var ee in s){var ne=s[ee];if(ce=r[ee],s.hasOwnProperty(ee)&&(ne!=null||ce!=null))switch(ee){case"type":m=ne;break;case"name":f=ne;break;case"checked":X=ne;break;case"defaultChecked":oe=ne;break;case"value":b=ne;break;case"defaultValue":M=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(l(137,a));break;default:ne!==ce&&We(t,a,ee,ne,s,ce)}}Yc(t,b,M,I,X,oe,m,f);return;case"select":ne=b=M=ee=null;for(m in r)if(I=r[m],r.hasOwnProperty(m)&&I!=null)switch(m){case"value":break;case"multiple":ne=I;default:s.hasOwnProperty(m)||We(t,a,m,null,s,I)}for(f in s)if(m=s[f],I=r[f],s.hasOwnProperty(f)&&(m!=null||I!=null))switch(f){case"value":ee=m;break;case"defaultValue":M=m;break;case"multiple":b=m;default:m!==I&&We(t,a,f,m,s,I)}a=M,r=b,s=ne,ee!=null?Wr(t,!!r,ee,!1):!!s!=!!r&&(a!=null?Wr(t,!!r,a,!0):Wr(t,!!r,r?[]:"",!1));return;case"textarea":ne=ee=null;for(M in r)if(f=r[M],r.hasOwnProperty(M)&&f!=null&&!s.hasOwnProperty(M))switch(M){case"value":break;case"children":break;default:We(t,a,M,null,s,f)}for(b in s)if(f=s[b],m=r[b],s.hasOwnProperty(b)&&(f!=null||m!=null))switch(b){case"value":ee=f;break;case"defaultValue":ne=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(l(91));break;default:f!==m&&We(t,a,b,f,s,m)}Tp(t,ee,ne);return;case"option":for(var ye in r)if(ee=r[ye],r.hasOwnProperty(ye)&&ee!=null&&!s.hasOwnProperty(ye))switch(ye){case"selected":t.selected=!1;break;default:We(t,a,ye,null,s,ee)}for(I in s)if(ee=s[I],ne=r[I],s.hasOwnProperty(I)&&ee!==ne&&(ee!=null||ne!=null))switch(I){case"selected":t.selected=ee&&typeof ee!="function"&&typeof ee!="symbol";break;default:We(t,a,I,ee,s,ne)}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 we in r)ee=r[we],r.hasOwnProperty(we)&&ee!=null&&!s.hasOwnProperty(we)&&We(t,a,we,null,s,ee);for(X in s)if(ee=s[X],ne=r[X],s.hasOwnProperty(X)&&ee!==ne&&(ee!=null||ne!=null))switch(X){case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(l(137,a));break;default:We(t,a,X,ee,s,ne)}return;default:if(Jc(a)){for(var et in r)ee=r[et],r.hasOwnProperty(et)&&ee!==void 0&&!s.hasOwnProperty(et)&&Dd(t,a,et,void 0,s,ee);for(oe in s)ee=s[oe],ne=r[oe],!s.hasOwnProperty(oe)||ee===ne||ee===void 0&&ne===void 0||Dd(t,a,oe,ee,s,ne);return}}for(var q in r)ee=r[q],r.hasOwnProperty(q)&&ee!=null&&!s.hasOwnProperty(q)&&We(t,a,q,null,s,ee);for(ce in s)ee=s[ce],ne=r[ce],!s.hasOwnProperty(ce)||ee===ne||ee==null&&ne==null||We(t,a,ce,ee,s,ne)}function Am(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function fb(){if(typeof performance.getEntriesByType=="function"){for(var t=0,a=0,r=performance.getEntriesByType("resource"),s=0;s<r.length;s++){var f=r[s],m=f.transferSize,b=f.initiatorType,M=f.duration;if(m&&M&&Am(b)){for(b=0,M=f.responseEnd,s+=1;s<r.length;s++){var I=r[s],X=I.startTime;if(X>M)break;var oe=I.transferSize,ce=I.initiatorType;oe&&Am(ce)&&(I=I.responseEnd,b+=oe*(I<M?1:(M-X)/(I-X)))}if(--s,a+=8*(m+b)/(f.duration/1e3),t++,10<t)break}}if(0<t)return a/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var Ud=null,Id=null;function fs(t){return t.nodeType===9?t:t.ownerDocument}function Dm(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Um(t,a){if(t===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&a==="foreignObject"?0:t}function Ld(t,a){return t==="textarea"||t==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var Vd=null;function pb(){var t=window.event;return t&&t.type==="popstate"?t===Vd?!1:(Vd=t,!0):(Vd=null,!1)}var Im=typeof setTimeout=="function"?setTimeout:void 0,gb=typeof clearTimeout=="function"?clearTimeout:void 0,Lm=typeof Promise=="function"?Promise:void 0,mb=typeof queueMicrotask=="function"?queueMicrotask:typeof Lm<"u"?function(t){return Lm.resolve(null).then(t).catch(hb)}:Im;function hb(t){setTimeout(function(){throw t})}function qn(t){return t==="head"}function Vm(t,a){var r=a,s=0;do{var f=r.nextSibling;if(t.removeChild(r),f&&f.nodeType===8)if(r=f.data,r==="/$"||r==="/&"){if(s===0){t.removeChild(f),Ti(a);return}s--}else if(r==="$"||r==="$?"||r==="$~"||r==="$!"||r==="&")s++;else if(r==="html")Do(t.ownerDocument.documentElement);else if(r==="head"){r=t.ownerDocument.head,Do(r);for(var m=r.firstChild;m;){var b=m.nextSibling,M=m.nodeName;m[Wi]||M==="SCRIPT"||M==="STYLE"||M==="LINK"&&m.rel.toLowerCase()==="stylesheet"||r.removeChild(m),m=b}}else r==="body"&&Do(t.ownerDocument.body);r=f}while(r);Ti(a)}function Bm(t,a){var r=t;t=0;do{var s=r.nextSibling;if(r.nodeType===1?a?(r._stashedDisplay=r.style.display,r.style.display="none"):(r.style.display=r._stashedDisplay||"",r.getAttribute("style")===""&&r.removeAttribute("style")):r.nodeType===3&&(a?(r._stashedText=r.nodeValue,r.nodeValue=""):r.nodeValue=r._stashedText||""),s&&s.nodeType===8)if(r=s.data,r==="/$"){if(t===0)break;t--}else r!=="$"&&r!=="$?"&&r!=="$~"&&r!=="$!"||t++;r=s}while(r)}function Bd(t){var a=t.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var r=a;switch(a=a.nextSibling,r.nodeName){case"HTML":case"HEAD":case"BODY":Bd(r),Gc(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}t.removeChild(r)}}function yb(t,a,r,s){for(;t.nodeType===1;){var f=r;if(t.nodeName.toLowerCase()!==a.toLowerCase()){if(!s&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(s){if(!t[Wi])switch(a){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(m=t.getAttribute("rel"),m==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(m!==f.rel||t.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||t.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||t.getAttribute("title")!==(f.title==null?null:f.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(m=t.getAttribute("src"),(m!==(f.src==null?null:f.src)||t.getAttribute("type")!==(f.type==null?null:f.type)||t.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&m&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(a==="input"&&t.type==="hidden"){var m=f.name==null?null:""+f.name;if(f.type==="hidden"&&t.getAttribute("name")===m)return t}else return t;if(t=Ta(t.nextSibling),t===null)break}return null}function vb(t,a,r){if(a==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!r||(t=Ta(t.nextSibling),t===null))return null;return t}function Hm(t,a){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a||(t=Ta(t.nextSibling),t===null))return null;return t}function Hd(t){return t.data==="$?"||t.data==="$~"}function qd(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function $b(t,a){var r=t.ownerDocument;if(t.data==="$~")t._reactRetry=a;else if(t.data!=="$?"||r.readyState!=="loading")a();else{var s=function(){a(),r.removeEventListener("DOMContentLoaded",s)};r.addEventListener("DOMContentLoaded",s),t._reactRetry=s}}function Ta(t){for(;t!=null;t=t.nextSibling){var a=t.nodeType;if(a===1||a===3)break;if(a===8){if(a=t.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return t}var Pd=null;function qm(t){t=t.nextSibling;for(var a=0;t;){if(t.nodeType===8){var r=t.data;if(r==="/$"||r==="/&"){if(a===0)return Ta(t.nextSibling);a--}else r!=="$"&&r!=="$!"&&r!=="$?"&&r!=="$~"&&r!=="&"||a++}t=t.nextSibling}return null}function Pm(t){t=t.previousSibling;for(var a=0;t;){if(t.nodeType===8){var r=t.data;if(r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"){if(a===0)return t;a--}else r!=="/$"&&r!=="/&"||a++}t=t.previousSibling}return null}function Zm(t,a,r){switch(a=fs(r),t){case"html":if(t=a.documentElement,!t)throw Error(l(452));return t;case"head":if(t=a.head,!t)throw Error(l(453));return t;case"body":if(t=a.body,!t)throw Error(l(454));return t;default:throw Error(l(451))}}function Do(t){for(var a=t.attributes;a.length;)t.removeAttributeNode(a[0]);Gc(t)}var Ma=new Map,Gm=new Set;function ps(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var fn=fe.d;fe.d={f:bb,r:xb,D:_b,C:jb,L:Sb,m:wb,X:Nb,S:kb,M:zb};function bb(){var t=fn.f(),a=rs();return t||a}function xb(t){var a=Jr(t);a!==null&&a.tag===5&&a.type==="form"?cg(a):fn.r(t)}var zi=typeof document>"u"?null:document;function Fm(t,a,r){var s=zi;if(s&&typeof a=="string"&&a){var f=Sa(a);f='link[rel="'+t+'"][href="'+f+'"]',typeof r=="string"&&(f+='[crossorigin="'+r+'"]'),Gm.has(f)||(Gm.add(f),t={rel:t,crossOrigin:r,href:a},s.querySelector(f)===null&&(a=s.createElement("link"),Bt(a,"link",t),Mt(a),s.head.appendChild(a)))}}function _b(t){fn.D(t),Fm("dns-prefetch",t,null)}function jb(t,a){fn.C(t,a),Fm("preconnect",t,a)}function Sb(t,a,r){fn.L(t,a,r);var s=zi;if(s&&t&&a){var f='link[rel="preload"][as="'+Sa(a)+'"]';a==="image"&&r&&r.imageSrcSet?(f+='[imagesrcset="'+Sa(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(f+='[imagesizes="'+Sa(r.imageSizes)+'"]')):f+='[href="'+Sa(t)+'"]';var m=f;switch(a){case"style":m=Ei(t);break;case"script":m=Ci(t)}Ma.has(m)||(t=v({rel:"preload",href:a==="image"&&r&&r.imageSrcSet?void 0:t,as:a},r),Ma.set(m,t),s.querySelector(f)!==null||a==="style"&&s.querySelector(Uo(m))||a==="script"&&s.querySelector(Io(m))||(a=s.createElement("link"),Bt(a,"link",t),Mt(a),s.head.appendChild(a)))}}function wb(t,a){fn.m(t,a);var r=zi;if(r&&t){var s=a&&typeof a.as=="string"?a.as:"script",f='link[rel="modulepreload"][as="'+Sa(s)+'"][href="'+Sa(t)+'"]',m=f;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=Ci(t)}if(!Ma.has(m)&&(t=v({rel:"modulepreload",href:t},a),Ma.set(m,t),r.querySelector(f)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(Io(m)))return}s=r.createElement("link"),Bt(s,"link",t),Mt(s),r.head.appendChild(s)}}}function kb(t,a,r){fn.S(t,a,r);var s=zi;if(s&&t){var f=Xr(s).hoistableStyles,m=Ei(t);a=a||"default";var b=f.get(m);if(!b){var M={loading:0,preload:null};if(b=s.querySelector(Uo(m)))M.loading=5;else{t=v({rel:"stylesheet",href:t,"data-precedence":a},r),(r=Ma.get(m))&&Zd(t,r);var I=b=s.createElement("link");Mt(I),Bt(I,"link",t),I._p=new Promise(function(X,oe){I.onload=X,I.onerror=oe}),I.addEventListener("load",function(){M.loading|=1}),I.addEventListener("error",function(){M.loading|=2}),M.loading|=4,gs(b,a,s)}b={type:"stylesheet",instance:b,count:1,state:M},f.set(m,b)}}}function Nb(t,a){fn.X(t,a);var r=zi;if(r&&t){var s=Xr(r).hoistableScripts,f=Ci(t),m=s.get(f);m||(m=r.querySelector(Io(f)),m||(t=v({src:t,async:!0},a),(a=Ma.get(f))&&Gd(t,a),m=r.createElement("script"),Mt(m),Bt(m,"link",t),r.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},s.set(f,m))}}function zb(t,a){fn.M(t,a);var r=zi;if(r&&t){var s=Xr(r).hoistableScripts,f=Ci(t),m=s.get(f);m||(m=r.querySelector(Io(f)),m||(t=v({src:t,async:!0,type:"module"},a),(a=Ma.get(f))&&Gd(t,a),m=r.createElement("script"),Mt(m),Bt(m,"link",t),r.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},s.set(f,m))}}function Ym(t,a,r,s){var f=(f=J.current)?ps(f):null;if(!f)throw Error(l(446));switch(t){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(a=Ei(r.href),r=Xr(f).hoistableStyles,s=r.get(a),s||(s={type:"style",instance:null,count:0,state:null},r.set(a,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(r.rel==="stylesheet"&&typeof r.href=="string"&&typeof r.precedence=="string"){t=Ei(r.href);var m=Xr(f).hoistableStyles,b=m.get(t);if(b||(f=f.ownerDocument||f,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(t,b),(m=f.querySelector(Uo(t)))&&!m._p&&(b.instance=m,b.state.loading=5),Ma.has(t)||(r={rel:"preload",as:"style",href:r.href,crossOrigin:r.crossOrigin,integrity:r.integrity,media:r.media,hrefLang:r.hrefLang,referrerPolicy:r.referrerPolicy},Ma.set(t,r),m||Eb(f,t,r,b.state))),a&&s===null)throw Error(l(528,""));return b}if(a&&s!==null)throw Error(l(529,""));return null;case"script":return a=r.async,r=r.src,typeof r=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=Ci(r),r=Xr(f).hoistableScripts,s=r.get(a),s||(s={type:"script",instance:null,count:0,state:null},r.set(a,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,t))}}function Ei(t){return'href="'+Sa(t)+'"'}function Uo(t){return'link[rel="stylesheet"]['+t+"]"}function Km(t){return v({},t,{"data-precedence":t.precedence,precedence:null})}function Eb(t,a,r,s){t.querySelector('link[rel="preload"][as="style"]['+a+"]")?s.loading=1:(a=t.createElement("link"),s.preload=a,a.addEventListener("load",function(){return s.loading|=1}),a.addEventListener("error",function(){return s.loading|=2}),Bt(a,"link",r),Mt(a),t.head.appendChild(a))}function Ci(t){return'[src="'+Sa(t)+'"]'}function Io(t){return"script[async]"+t}function Jm(t,a,r){if(a.count++,a.instance===null)switch(a.type){case"style":var s=t.querySelector('style[data-href~="'+Sa(r.href)+'"]');if(s)return a.instance=s,Mt(s),s;var f=v({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return s=(t.ownerDocument||t).createElement("style"),Mt(s),Bt(s,"style",f),gs(s,r.precedence,t),a.instance=s;case"stylesheet":f=Ei(r.href);var m=t.querySelector(Uo(f));if(m)return a.state.loading|=4,a.instance=m,Mt(m),m;s=Km(r),(f=Ma.get(f))&&Zd(s,f),m=(t.ownerDocument||t).createElement("link"),Mt(m);var b=m;return b._p=new Promise(function(M,I){b.onload=M,b.onerror=I}),Bt(m,"link",s),a.state.loading|=4,gs(m,r.precedence,t),a.instance=m;case"script":return m=Ci(r.src),(f=t.querySelector(Io(m)))?(a.instance=f,Mt(f),f):(s=r,(f=Ma.get(m))&&(s=v({},r),Gd(s,f)),t=t.ownerDocument||t,f=t.createElement("script"),Mt(f),Bt(f,"link",s),t.head.appendChild(f),a.instance=f);case"void":return null;default:throw Error(l(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(s=a.instance,a.state.loading|=4,gs(s,r.precedence,t));return a.instance}function gs(t,a,r){for(var s=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=s.length?s[s.length-1]:null,m=f,b=0;b<s.length;b++){var M=s[b];if(M.dataset.precedence===a)m=M;else if(m!==f)break}m?m.parentNode.insertBefore(t,m.nextSibling):(a=r.nodeType===9?r.head:r,a.insertBefore(t,a.firstChild))}function Zd(t,a){t.crossOrigin==null&&(t.crossOrigin=a.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=a.referrerPolicy),t.title==null&&(t.title=a.title)}function Gd(t,a){t.crossOrigin==null&&(t.crossOrigin=a.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=a.referrerPolicy),t.integrity==null&&(t.integrity=a.integrity)}var ms=null;function Xm(t,a,r){if(ms===null){var s=new Map,f=ms=new Map;f.set(r,s)}else f=ms,s=f.get(r),s||(s=new Map,f.set(r,s));if(s.has(t))return s;for(s.set(t,null),r=r.getElementsByTagName(t),f=0;f<r.length;f++){var m=r[f];if(!(m[Wi]||m[Ut]||t==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var b=m.getAttribute(a)||"";b=t+b;var M=s.get(b);M?M.push(m):s.set(b,[m])}}return s}function Qm(t,a,r){t=t.ownerDocument||t,t.head.insertBefore(r,a==="title"?t.querySelector("head > title"):null)}function Cb(t,a,r){if(r===1||a.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;switch(a.rel){case"stylesheet":return t=a.disabled,typeof a.precedence=="string"&&t==null;default:return!0}case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function Wm(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function Tb(t,a,r,s){if(r.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var f=Ei(s.href),m=a.querySelector(Uo(f));if(m){a=m._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(t.count++,t=hs.bind(t),a.then(t,t)),r.state.loading|=4,r.instance=m,Mt(m);return}m=a.ownerDocument||a,s=Km(s),(f=Ma.get(f))&&Zd(s,f),m=m.createElement("link"),Mt(m);var b=m;b._p=new Promise(function(M,I){b.onload=M,b.onerror=I}),Bt(m,"link",s),r.instance=m}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(r,a),(a=r.state.preload)&&(r.state.loading&3)===0&&(t.count++,r=hs.bind(t),a.addEventListener("load",r),a.addEventListener("error",r))}}var Fd=0;function Mb(t,a){return t.stylesheets&&t.count===0&&vs(t,t.stylesheets),0<t.count||0<t.imgCount?function(r){var s=setTimeout(function(){if(t.stylesheets&&vs(t,t.stylesheets),t.unsuspend){var m=t.unsuspend;t.unsuspend=null,m()}},6e4+a);0<t.imgBytes&&Fd===0&&(Fd=62500*fb());var f=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&vs(t,t.stylesheets),t.unsuspend)){var m=t.unsuspend;t.unsuspend=null,m()}},(t.imgBytes>Fd?50:800)+a);return t.unsuspend=r,function(){t.unsuspend=null,clearTimeout(s),clearTimeout(f)}}:null}function hs(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)vs(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var ys=null;function vs(t,a){t.stylesheets=null,t.unsuspend!==null&&(t.count++,ys=new Map,a.forEach(Ob,t),ys=null,hs.call(t))}function Ob(t,a){if(!(a.state.loading&4)){var r=ys.get(t);if(r)var s=r.get(null);else{r=new Map,ys.set(t,r);for(var f=t.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<f.length;m++){var b=f[m];(b.nodeName==="LINK"||b.getAttribute("media")!=="not all")&&(r.set(b.dataset.precedence,b),s=b)}s&&r.set(null,s)}f=a.instance,b=f.getAttribute("data-precedence"),m=r.get(b)||s,m===s&&r.set(null,f),r.set(b,f),this.count++,s=hs.bind(this),f.addEventListener("load",s),f.addEventListener("error",s),m?m.parentNode.insertBefore(f,m.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(f,t.firstChild)),a.state.loading|=4}}var Lo={$$typeof:N,Provider:null,Consumer:null,_currentValue:ge,_currentValue2:ge,_threadCount:0};function Rb(t,a,r,s,f,m,b,M,I){this.tag=1,this.containerInfo=t,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=Hc(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Hc(0),this.hiddenUpdates=Hc(null),this.identifierPrefix=s,this.onUncaughtError=f,this.onCaughtError=m,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=I,this.incompleteTransitions=new Map}function eh(t,a,r,s,f,m,b,M,I,X,oe,ce){return t=new Rb(t,a,r,b,I,X,oe,ce,M),a=1,m===!0&&(a|=24),m=ga(3,null,null,a),t.current=m,m.stateNode=t,a=ku(),a.refCount++,t.pooledCache=a,a.refCount++,m.memoizedState={element:s,isDehydrated:r,cache:a},Cu(m),t}function th(t){return t?(t=li,t):li}function ah(t,a,r,s,f,m){f=th(f),s.context===null?s.context=f:s.pendingContext=f,s=Mn(a),s.payload={element:r},m=m===void 0?null:m,m!==null&&(s.callback=m),r=On(t,s,a),r!==null&&(oa(r,t,a),yo(r,t,a))}function nh(t,a){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var r=t.retryLane;t.retryLane=r!==0&&r<a?r:a}}function Yd(t,a){nh(t,a),(t=t.alternate)&&nh(t,a)}function rh(t){if(t.tag===13||t.tag===31){var a=Nr(t,67108864);a!==null&&oa(a,t,67108864),Yd(t,67108864)}}function ih(t){if(t.tag===13||t.tag===31){var a=$a();a=qc(a);var r=Nr(t,a);r!==null&&oa(r,t,a),Yd(t,a)}}var $s=!0;function Ab(t,a,r,s){var f=ae.T;ae.T=null;var m=fe.p;try{fe.p=2,Kd(t,a,r,s)}finally{fe.p=m,ae.T=f}}function Db(t,a,r,s){var f=ae.T;ae.T=null;var m=fe.p;try{fe.p=8,Kd(t,a,r,s)}finally{fe.p=m,ae.T=f}}function Kd(t,a,r,s){if($s){var f=Jd(s);if(f===null)Ad(t,a,s,bs,r),lh(t,s);else if(Ib(f,t,a,r,s))s.stopPropagation();else if(lh(t,s),a&4&&-1<Ub.indexOf(t)){for(;f!==null;){var m=Jr(f);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var b=_r(m.pendingLanes);if(b!==0){var M=m;for(M.pendingLanes|=2,M.entangledLanes|=2;b;){var I=1<<31-fa(b);M.entanglements[1]|=I,b&=~I}qa(m),(Ge&6)===0&&(as=Dt()+500,Oo(0))}}break;case 31:case 13:M=Nr(m,2),M!==null&&oa(M,m,2),rs(),Yd(m,2)}if(m=Jd(s),m===null&&Ad(t,a,s,bs,r),m===f)break;f=m}f!==null&&s.stopPropagation()}else Ad(t,a,s,null,r)}}function Jd(t){return t=Qc(t),Xd(t)}var bs=null;function Xd(t){if(bs=null,t=Kr(t),t!==null){var a=u(t);if(a===null)t=null;else{var r=a.tag;if(r===13){if(t=d(a),t!==null)return t;t=null}else if(r===31){if(t=p(a),t!==null)return t;t=null}else if(r===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;t=null}else a!==t&&(t=null)}}return bs=t,null}function oh(t){switch(t){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(Ki()){case jn:return 2;case Fr:return 8;case xr:case sl:return 32;case cl:return 268435456;default:return 32}default:return 32}}var Qd=!1,Pn=null,Zn=null,Gn=null,Vo=new Map,Bo=new Map,Fn=[],Ub="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 lh(t,a){switch(t){case"focusin":case"focusout":Pn=null;break;case"dragenter":case"dragleave":Zn=null;break;case"mouseover":case"mouseout":Gn=null;break;case"pointerover":case"pointerout":Vo.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":Bo.delete(a.pointerId)}}function Ho(t,a,r,s,f,m){return t===null||t.nativeEvent!==m?(t={blockedOn:a,domEventName:r,eventSystemFlags:s,nativeEvent:m,targetContainers:[f]},a!==null&&(a=Jr(a),a!==null&&rh(a)),t):(t.eventSystemFlags|=s,a=t.targetContainers,f!==null&&a.indexOf(f)===-1&&a.push(f),t)}function Ib(t,a,r,s,f){switch(a){case"focusin":return Pn=Ho(Pn,t,a,r,s,f),!0;case"dragenter":return Zn=Ho(Zn,t,a,r,s,f),!0;case"mouseover":return Gn=Ho(Gn,t,a,r,s,f),!0;case"pointerover":var m=f.pointerId;return Vo.set(m,Ho(Vo.get(m)||null,t,a,r,s,f)),!0;case"gotpointercapture":return m=f.pointerId,Bo.set(m,Ho(Bo.get(m)||null,t,a,r,s,f)),!0}return!1}function sh(t){var a=Kr(t.target);if(a!==null){var r=u(a);if(r!==null){if(a=r.tag,a===13){if(a=d(r),a!==null){t.blockedOn=a,_p(t.priority,function(){ih(r)});return}}else if(a===31){if(a=p(r),a!==null){t.blockedOn=a,_p(t.priority,function(){ih(r)});return}}else if(a===3&&r.stateNode.current.memoizedState.isDehydrated){t.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}t.blockedOn=null}function xs(t){if(t.blockedOn!==null)return!1;for(var a=t.targetContainers;0<a.length;){var r=Jd(t.nativeEvent);if(r===null){r=t.nativeEvent;var s=new r.constructor(r.type,r);Xc=s,r.target.dispatchEvent(s),Xc=null}else return a=Jr(r),a!==null&&rh(a),t.blockedOn=r,!1;a.shift()}return!0}function ch(t,a,r){xs(t)&&r.delete(a)}function Lb(){Qd=!1,Pn!==null&&xs(Pn)&&(Pn=null),Zn!==null&&xs(Zn)&&(Zn=null),Gn!==null&&xs(Gn)&&(Gn=null),Vo.forEach(ch),Bo.forEach(ch)}function _s(t,a){t.blockedOn===a&&(t.blockedOn=null,Qd||(Qd=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Lb)))}var js=null;function uh(t){js!==t&&(js=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){js===t&&(js=null);for(var a=0;a<t.length;a+=3){var r=t[a],s=t[a+1],f=t[a+2];if(typeof s!="function"){if(Xd(s||r)===null)continue;break}var m=Jr(r);m!==null&&(t.splice(a,3),a-=3,Ju(m,{pending:!0,data:f,method:r.method,action:s},s,f))}}))}function Ti(t){function a(I){return _s(I,t)}Pn!==null&&_s(Pn,t),Zn!==null&&_s(Zn,t),Gn!==null&&_s(Gn,t),Vo.forEach(a),Bo.forEach(a);for(var r=0;r<Fn.length;r++){var s=Fn[r];s.blockedOn===t&&(s.blockedOn=null)}for(;0<Fn.length&&(r=Fn[0],r.blockedOn===null);)sh(r),r.blockedOn===null&&Fn.shift();if(r=(t.ownerDocument||t).$$reactFormReplay,r!=null)for(s=0;s<r.length;s+=3){var f=r[s],m=r[s+1],b=f[ea]||null;if(typeof m=="function")b||uh(r);else if(b){var M=null;if(m&&m.hasAttribute("formAction")){if(f=m,b=m[ea]||null)M=b.formAction;else if(Xd(f)!==null)continue}else M=b.action;typeof M=="function"?r[s+1]=M:(r.splice(s,3),s-=3),uh(r)}}}function dh(){function t(m){m.canIntercept&&m.info==="react-transition"&&m.intercept({handler:function(){return new Promise(function(b){return f=b})},focusReset:"manual",scroll:"manual"})}function a(){f!==null&&(f(),f=null),s||setTimeout(r,20)}function r(){if(!s&&!navigation.transition){var m=navigation.currentEntry;m&&m.url!=null&&navigation.navigate(m.url,{state:m.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,f=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(r,100),function(){s=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),f!==null&&(f(),f=null)}}}function Wd(t){this._internalRoot=t}Ss.prototype.render=Wd.prototype.render=function(t){var a=this._internalRoot;if(a===null)throw Error(l(409));var r=a.current,s=$a();ah(r,s,t,a,null,null)},Ss.prototype.unmount=Wd.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var a=t.containerInfo;ah(t.current,2,null,t,null,null),rs(),a[Yr]=null}};function Ss(t){this._internalRoot=t}Ss.prototype.unstable_scheduleHydration=function(t){if(t){var a=xp();t={blockedOn:null,target:t,priority:a};for(var r=0;r<Fn.length&&a!==0&&a<Fn[r].priority;r++);Fn.splice(r,0,t),r===0&&sh(t)}};var fh=n.version;if(fh!=="19.2.8")throw Error(l(527,fh,"19.2.8"));fe.findDOMNode=function(t){var a=t._reactInternals;if(a===void 0)throw typeof t.render=="function"?Error(l(188)):(t=Object.keys(t).join(","),Error(l(268,t)));return t=h(a),t=t!==null?y(t):null,t=t===null?null:t.stateNode,t};var Vb={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:ae,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ws=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ws.isDisabled&&ws.supportsFiber)try{Ji=ws.inject(Vb),da=ws}catch{}}return Po.createRoot=function(t,a){if(!c(t))throw Error(l(299));var r=!1,s="",f=$g,m=bg,b=xg;return a!=null&&(a.unstable_strictMode===!0&&(r=!0),a.identifierPrefix!==void 0&&(s=a.identifierPrefix),a.onUncaughtError!==void 0&&(f=a.onUncaughtError),a.onCaughtError!==void 0&&(m=a.onCaughtError),a.onRecoverableError!==void 0&&(b=a.onRecoverableError)),a=eh(t,1,!1,null,null,r,s,null,f,m,b,dh),t[Yr]=a.current,Rd(t),new Wd(a)},Po.hydrateRoot=function(t,a,r){if(!c(t))throw Error(l(299));var s=!1,f="",m=$g,b=bg,M=xg,I=null;return r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(f=r.identifierPrefix),r.onUncaughtError!==void 0&&(m=r.onUncaughtError),r.onCaughtError!==void 0&&(b=r.onCaughtError),r.onRecoverableError!==void 0&&(M=r.onRecoverableError),r.formState!==void 0&&(I=r.formState)),a=eh(t,1,!0,a,r??null,s,f,I,m,b,M,dh),a.context=th(null),r=a.current,s=$a(),s=qc(s),f=Mn(s),f.callback=null,On(r,f,s),r=s,a.current.lanes=r,Qi(a,r),qa(a),t[Yr]=a.current,Rd(t),new Ss(a)},Po.version="19.2.8",Po}var _h;function Qb(){if(_h)return af.exports;_h=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),af.exports=Xb(),af.exports}var Wb=Qb();function ot({num:e,title:n,mute:o,intro:l}){return i.jsxs("header",{className:"ggui-section__head",children:[i.jsx("div",{className:"ggui-section__num",children:e}),i.jsxs("div",{children:[i.jsxs("h2",{className:"ggui-section__title",children:[n,o?i.jsxs("span",{className:"ggui-mute",children:[" ",o]}):null]}),l?i.jsx("p",{className:"ggui-section__intro",children:l}):null]})]})}const Tf="ggui-eui:navigate";function ex(e){if(e==="/"||e==="")return{kind:"admin-index"};const n=/^\/preview\/([^/]+)\/?$/.exec(e);if(n){const c=n[1];return c?{kind:"blueprint",blueprintId:decodeURIComponent(c)}:{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"};const o=/^\/admin\/variants\/([^/]+)\/generate\/?$/.exec(e);if(o){const c=o[1];return c?{kind:"admin-variant-generate",contractHash:decodeURIComponent(c)}:{kind:"not-found",pathname:e}}const l=/^\/admin\/variants\/([^/]+)\/?$/.exec(e);if(l){const c=l[1];return c?{kind:"admin-variant-detail",contractHash:decodeURIComponent(c)}:{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}}let jh=null,lf=null;function tx(e){return(e!==jh||lf===null)&&(jh=e,lf=ex(e)),lf}function Ve(e){typeof window>"u"||(window.history.pushState(null,"",e),window.dispatchEvent(new Event(Tf)))}function ax(e){return typeof window>"u"?()=>{}:(window.addEventListener("popstate",e),window.addEventListener(Tf,e),()=>{window.removeEventListener("popstate",e),window.removeEventListener(Tf,e)})}function nx(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 Vv(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"}const rx=[{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 ix({route:e,children:n}){return i.jsxs("div",{className:"ggui-config-grid","data-ggui-admin-shell":!0,children:[i.jsx(ox,{route:e}),i.jsx("div",{className:"ggui-admin-pane",children:n})]})}function ox({route:e}){return i.jsx("nav",{className:"ggui-config-rail","aria-label":"admin sections","data-ggui-admin-rail":!0,children:rx.map(n=>i.jsxs("div",{"data-ggui-admin-group":n.label,children:[i.jsx("div",{className:"ggui-stack__head",style:{padding:"10px 14px 6px",borderBottom:0},children:i.jsx("span",{className:"ggui-stack__label",style:{fontSize:11},children:n.label})}),i.jsx("ul",{style:{listStyle:"none",margin:0,padding:0},children:n.items.map(o=>{const l=e.kind===o.match;return i.jsx("li",{"data-ggui-admin-item":o.match,children:i.jsx("button",{type:"button",onClick:()=>Ve(o.path),"aria-current":l?"page":void 0,className:`ggui-config-rail__btn${l?" is-active":""}`,children:o.label})},o.path)})})]},n.label))})}const lx=[{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 sx({route:e,children:n}){return i.jsxs("div",{className:"ggui-config-grid","data-ggui-devtools-shell":!0,children:[i.jsx(cx,{route:e}),i.jsx("div",{className:"ggui-admin-pane",children:n})]})}function cx({route:e}){return i.jsx("nav",{className:"ggui-config-rail","aria-label":"devtools sections","data-ggui-devtools-rail":!0,children:lx.map(n=>i.jsxs("div",{"data-ggui-devtools-group":n.label,children:[i.jsx("div",{className:"ggui-stack__head",style:{padding:"10px 14px 6px",borderBottom:0},children:i.jsx("span",{className:"ggui-stack__label",style:{fontSize:11},children:n.label})}),i.jsx("ul",{style:{listStyle:"none",margin:0,padding:0},children:n.items.map(o=>{const l=e.kind===o.match;return i.jsx("li",{"data-ggui-devtools-item":o.match,children:i.jsx("button",{type:"button",onClick:()=>Ve(o.path),"aria-current":l?"page":void 0,className:`ggui-config-rail__btn${l?" is-active":""}`,children:o.label})},o.path)})})]},n.label))})}const gn="#292929",Mi="#d9d9d9",sf="#f4f3ed",ux={mirror:{g1Outer:Mi,g1Inner:gn,g2Outer:gn,g2Inner:Mi,u:gn,i:Mi},"mono-ink":{g1Outer:gn,g1Inner:gn,g2Outer:gn,g2Inner:gn,u:gn,i:gn},reverse:{g1Outer:Mi,g1Inner:sf,g2Outer:sf,g2Inner:Mi,u:sf,i:Mi}};function Bv({width:e,variant:n="mirror"}){const o=Math.round(e*50/224),l=ux[n];return i.jsxs("svg",{viewBox:"0 0 224 50",width:e,height:o,"aria-label":"ggui",children:[i.jsx("path",{d:"M 0 0 H 50 V 25 H 25 V 50 H 0 Z",fill:l.g1Outer}),i.jsx("rect",{x:"33",y:"33",width:"17",height:"17",fill:l.g1Inner}),i.jsx("path",{d:"M 58 0 H 108 V 25 H 83 V 50 H 58 Z",fill:l.g2Outer}),i.jsx("rect",{x:"91",y:"33",width:"17",height:"17",fill:l.g2Inner}),i.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:l.u}),i.jsx("rect",{x:"174",y:"0",width:"50",height:"50",fill:l.i})]})}function dx(){return i.jsx("footer",{className:"ggui-footer",children:i.jsxs("div",{className:"ggui-footer__inner",children:[i.jsxs("div",{className:"ggui-footer__meta",children:[i.jsxs("div",{children:[i.jsx("strong",{children:"ggui"})," — generative graphical user interface"]}),i.jsx("div",{children:"@ggui-ai/console"}),i.jsx("div",{children:"served by your local ggui serve — same origin only"})]}),i.jsx("div",{className:"ggui-footer__mark",children:i.jsx(Bv,{width:160})})]})})}const fx="ggui-mode";let ks=null;function px(){if(ks!==null)return ks;if(typeof document>"u")return"prod";const e=document.querySelector(`meta[name="${fx}"]`);return ks=(e==null?void 0:e.getAttribute("content"))==="dev"?"dev":"prod",ks}function gx({route:e,rightSlot:n}){const o=mx(e),l=nx(e),c=Vv(e),u=px()==="dev"&&!c;return i.jsx("nav",{className:"ggui-nav","aria-label":"console navigation",children:i.jsxs("div",{className:"ggui-nav__inner",children:[i.jsxs("div",{className:"ggui-nav__left",children:[i.jsx("button",{type:"button",className:"ggui-nav__link",onClick:()=>Ve("/admin/status"),"aria-label":"go to admin",style:{display:"flex",alignItems:"center"},children:i.jsx(Bv,{width:84})}),i.jsx("span",{className:"ggui-nav__brand","aria-label":"ggui console",children:"console"}),i.jsx("span",{className:"ggui-nav__version",children:"v1"}),i.jsx("span",{className:"ggui-nav__version","aria-label":"community edition",children:"community"}),c?i.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,o?i.jsx("span",{className:"ggui-nav__crumb",children:o}):null]}),i.jsxs("ul",{className:"ggui-nav__links",children:[u?i.jsx("li",{children:i.jsx("button",{type:"button",className:"ggui-nav__link",onClick:()=>Ve("/devtools"),"data-ggui-nav-devtools":!0,children:"devtools →"})}):null,l?null:i.jsx("li",{children:i.jsx("button",{type:"button",className:"ggui-nav__link",onClick:()=>Ve("/admin/status"),children:"admin →"})}),n?i.jsx("li",{children:n}):null]})]})})}function mx(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 Ht({route:e,children:n,variant:o="wide",showFooter:l=!0,navRightSlot:c}){const u=o==="narrow"?"ggui-shell__main ggui-shell__main--narrow":"ggui-shell__main";let d=n;return o==="admin"?d=i.jsx(ix,{route:e,children:n}):o==="devtools"&&(d=i.jsx(sx,{route:e,children:n})),i.jsxs("div",{className:"ggui-shell",children:[i.jsx(gx,{route:e,rightSlot:c}),i.jsx("main",{className:u,children:d}),l?i.jsx(dx,{}):null]})}function hx(){const[e,n]=D.useState(""),[o,l]=D.useState(!1),[c,u]=D.useState(null),d=(()=>{if(typeof window>"u")return"/admin";const g=new URLSearchParams(window.location.search).get("next");return g===null||g===""||!g.startsWith("/")||g.startsWith("//")?"/admin":g})(),p=async g=>{g.preventDefault(),u(null);const h=e.trim();if(h.length===0){u("Paste an admin token.");return}l(!0);try{const y=await fetch("/ggui/console/admin-login",{method:"POST",headers:{"content-type":"application/json",accept:"application/json"},body:JSON.stringify({token:h})});if(y.status===204){Ve(d);return}if(y.status===401){u("Invalid token. Re-check the value printed on your `ggui serve` boot banner.");return}u(`Login failed — server returned ${y.status}`)}catch(y){u(`Login failed — ${String(y)}`)}finally{l(!1)}};return i.jsxs("section",{className:"ggui-section",children:[i.jsx(ot,{num:"01 / admin",title:"Sign in to the admin zone.",mute:"Admin token gates /admin and /devtools.",intro:i.jsxs(i.Fragment,{children:["Paste the admin token printed on your"," ",i.jsx("code",{className:"ggui-code",children:"ggui serve"})," boot banner. On success we set a same-origin"," ",i.jsx("code",{className:"ggui-code",children:"ggui_console_admin"})," ","HttpOnly cookie and bounce you to"," ",i.jsx("code",{className:"ggui-code",children:d}),"."]})}),i.jsxs("div",{className:"ggui-card",children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:"admin token"}),i.jsx("span",{className:"ggui-card__num",children:"ADM / IN"})]}),i.jsxs("div",{className:"ggui-card__body",children:[i.jsx("form",{className:"ggui-form",onSubmit:p,"data-ggui-admin-login-form":!0,children:i.jsxs("div",{className:"ggui-form__row",children:[i.jsx("label",{className:"ggui-field","aria-label":"admin token",children:i.jsx("input",{type:"password",placeholder:"ggui_admin_...",value:e,onChange:g=>n(g.target.value),disabled:o,autoComplete:"off",spellCheck:!1,autoFocus:!0})}),i.jsxs("button",{type:"submit",className:"ggui-btn","data-ggui-admin-login-submit":!0,disabled:o||e.trim().length===0,children:[i.jsx("span",{className:"ggui-btn__dot","aria-hidden":!0}),o?"signing in…":"sign in"]})]})}),c?i.jsx("p",{className:"ggui-muted",style:{marginTop:12},"data-ggui-admin-login-error":!0,children:c}):null]})]})]})}const yx={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 cf(){if(typeof window>"u")return;const e=window.location.pathname+window.location.search;Ve(`/admin-login?next=${encodeURIComponent(e)}`)}function vx(e){return e.replace(/\[[\d;]*[a-zA-Z]/g,"").replace(/\s+/g,"")}function $x(){const[e,n]=D.useState({kind:"loading"}),o=async()=>{n(u=>u.kind==="ready"?u:{kind:"loading"});try{const u=await fetch("/ggui/console/llm-keys",{credentials:"include",headers:{accept:"application/json"}});if(u.status===401){cf();return}if(!u.ok){n({kind:"error",message:u.status===404?"BYOK store not enabled — `ggui serve` should wire one by default.":`server returned ${u.status}`});return}const d=await u.json();n({kind:"ready",data:d})}catch(u){n({kind:"error",message:String(u)})}};D.useEffect(()=>{o()},[]);const l=async(u,d)=>{const p=await fetch("/ggui/console/llm-keys",{method:"POST",credentials:"include",headers:{"content-type":"application/json",accept:"application/json"},body:JSON.stringify({provider:u,key:d})});if(p.status===401){cf();return}if(!p.ok)throw new Error(`server returned ${p.status}`);await o()},c=async u=>{const d=await fetch(`/ggui/console/llm-keys/${encodeURIComponent(u)}`,{method:"DELETE",credentials:"include"});if(d.status===401){cf();return}if(d.status!==204)throw new Error(`server returned ${d.status}`);await o()};return i.jsxs("section",{className:"ggui-section",children:[i.jsx(ot,{num:"01 / admin / llm-keys",title:"Operator-side LLM keys.",mute:"Server-default keys for unpaired and operator generation.",intro:i.jsxs(i.Fragment,{children:["Each provider is checked against env vars first, then"," ",i.jsx("code",{className:"ggui-code",children:"~/.ggui/credentials.json"})," — env wins on collision. These are the keys"," ",i.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"," ",i.jsx("code",{className:"ggui-code",children:"/settings"}),"; the difference is which scope the writes land in."]})}),e.kind==="loading"?i.jsx("p",{className:"ggui-muted",style:{margin:0,padding:12},children:"Loading providers…"}):e.kind==="error"?i.jsxs("p",{className:"ggui-muted",style:{margin:0,padding:12},"data-ggui-admin-llm-error":!0,children:["Couldn't load providers — ",e.message]}):i.jsx(bx,{rows:e.data.providers,scope:e.data.scope,onSet:l,onClear:c})]})}function bx({rows:e,scope:n,onSet:o,onClear:l}){return i.jsxs("div",{"data-ggui-admin-llm-list":!0,children:[i.jsxs("p",{className:"ggui-muted",style:{marginTop:0,marginBottom:16,fontSize:12},children:["scope: ",i.jsx("code",{className:"ggui-code",children:n})]}),i.jsx("div",{style:{display:"grid",gap:14},children:e.map(c=>i.jsx(xx,{row:c,onSet:o,onClear:l},c.name))})]})}function xx({row:e,onSet:n,onClear:o}){const l=yx[e.name],[c,u]=D.useState(""),[d,p]=D.useState(!1),[g,h]=D.useState(null),y=async j=>{j.preventDefault();const k=vx(c);if(k){p(!0),h(null);try{await n(e.name,k),u("")}catch(x){h(String(x))}finally{p(!1)}}},v=async()=>{p(!0),h(null);try{await o(e.name)}catch(j){h(String(j))}finally{p(!1)}};return i.jsxs("div",{className:"ggui-card","data-ggui-admin-llm-row":e.name,children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:l.label}),i.jsx("span",{className:"ggui-card__num",children:e.configured?e.source??"—":"not set"})]}),i.jsxs("div",{className:"ggui-card__body",children:[i.jsxs("p",{className:"ggui-muted",style:{margin:"0 0 10px",fontSize:13},children:[l.help,e.envNames.length>0?i.jsxs(i.Fragment,{children:[" ","Env:"," ",e.envNames.map((j,k)=>i.jsxs("span",{children:[i.jsx("code",{className:"ggui-code",children:j}),k<e.envNames.length-1?", ":""]},j)),"."]}):null]}),e.configured&&e.keyPreview?i.jsxs("p",{className:"ggui-muted",style:{margin:"0 0 10px",fontSize:12},children:["current: ",i.jsxs("code",{className:"ggui-code",children:[e.keyPreview,"…"]}),e.source==="env"&&e.envName?i.jsxs(i.Fragment,{children:[" (from ",i.jsx("code",{className:"ggui-code",children:e.envName}),")"]}):null]}):null,i.jsxs("form",{onSubmit:y,style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap"},children:[i.jsx("input",{type:"password",placeholder:`Paste ${l.label} key`,value:c,onChange:j=>u(j.target.value),disabled:d,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}}),i.jsx("button",{type:"submit","data-ggui-admin-llm-set":!0,className:"ggui-btn",disabled:d||!c.trim(),children:d?"saving…":"save"}),e.inFile?i.jsx("button",{type:"button","data-ggui-admin-llm-clear":!0,className:"ggui-btn ggui-btn--ghost",onClick:()=>void v(),disabled:d,children:"clear"}):null,i.jsx("a",{href:l.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"ggui-muted",style:{fontSize:12},children:"issue a key →"})]}),e.source==="env"&&e.inFile?i.jsxs("p",{className:"ggui-muted",style:{marginTop:8,marginBottom:0,fontSize:12},children:["File value present but env var"," ",i.jsx("code",{className:"ggui-code",children:e.envName})," overrides."]}):null,g?i.jsx("p",{className:"ggui-muted",style:{marginTop:8,marginBottom:0,fontSize:12,color:"var(--ggui-color-error, #c5374b)"},children:g}):null]})]})}const _x=[{id:"google",label:"Google"},{id:"github",label:"GitHub"}],uf="<redacted>";async function Sh(e,n,o,l){const c=new Headers(n.headers??{});o!==null&&c.set("X-Ggui-CSRF",o);const u=await fetch(e,{...n,headers:c,credentials:"include"});if(u.status!==403)return u;const d=await l();if(d===null)return u;const p=new Headers(n.headers??{});return p.set("X-Ggui-CSRF",d),fetch(e,{...n,headers:p,credentials:"include"})}function jx(){const[e,n]=D.useState({kind:"loading"}),[o,l]=D.useState(null),c=async()=>{try{const g=await fetch("/ggui/csrf-token",{headers:{accept:"application/json"},credentials:"include"});if(!g.ok)return null;const h=await g.json();return l(h.token),h.token}catch{return null}},u=async()=>{n(g=>g.kind==="ready"?g:{kind:"loading"});try{const g=await fetch("/ggui/admin/oauth-providers",{headers:{accept:"application/json"},credentials:"include"});if(g.status===401){Ve(`/admin-login?next=${encodeURIComponent("/admin/oauth-providers")}`);return}if(!g.ok){n({kind:"error",message:`server returned ${g.status}`});return}const h=await g.json();n({kind:"ready",data:h})}catch(g){n({kind:"error",message:String(g)})}};D.useEffect(()=>{c(),u()},[]);const d=async(g,h)=>{const y=await Sh(`/ggui/admin/oauth-providers/${encodeURIComponent(g)}`,{method:"PUT",headers:{"content-type":"application/json",accept:"application/json"},body:JSON.stringify(h)},o,c);if(y.status===401){Ve(`/admin-login?next=${encodeURIComponent("/admin/oauth-providers")}`);return}if(!y.ok)throw new Error(`server returned ${y.status}`);await u()},p=async g=>{const h=await Sh(`/ggui/admin/oauth-providers/${encodeURIComponent(g)}`,{method:"DELETE"},o,c);if(h.status===401){Ve(`/admin-login?next=${encodeURIComponent("/admin/oauth-providers")}`);return}if(h.status!==204)throw new Error(`server returned ${h.status}`);await u()};return i.jsxs("section",{className:"ggui-section",children:[i.jsx(ot,{num:"01 / oauth",title:"OAuth login providers.",mute:"Operator-only — end-user sign-in identity.",intro:i.jsxs(i.Fragment,{children:["Configure OAuth login providers so end-users can sign in with their existing identity. Operator-only — these credentials are stored at"," ",i.jsx("code",{className:"ggui-code",children:"~/.ggui/oauth-providers.json"})," ","(mode 0600). Set the"," ",i.jsx("code",{className:"ggui-code",children:"GGUI_OAUTH_<PROVIDERID>_CLIENT_ID"})," ","/"," ",i.jsx("code",{className:"ggui-code",children:"_CLIENT_SECRET"})," env vars to override per-deployment."]})}),e.kind==="loading"?i.jsx("p",{className:"ggui-muted",style:{margin:0,padding:12},children:"Loading providers…"}):e.kind==="error"?i.jsxs("p",{className:"ggui-muted",style:{margin:0,padding:12},"data-ggui-oauth-providers-error":!0,children:["Couldn't load providers — ",e.message]}):i.jsx("div",{"data-ggui-oauth-providers-list":!0,className:"ggui-stack","aria-label":"oauth providers",children:_x.map(g=>{const h=e.data.providers.find(y=>y.providerId===g.id);return i.jsx(Sx,{providerId:g.id,label:g.label,row:h,onSave:d,onDelete:p},g.id)})})]})}function Sx({providerId:e,label:n,row:o,onSave:l,onDelete:c}){const u=(o==null?void 0:o.source)==="env",d=(o==null?void 0:o.source)==="file",p=(o==null?void 0:o.clientId)??"",g=(o==null?void 0:o.enabled)??!0,[h,y]=D.useState(p),[v,j]=D.useState(""),[k,x]=D.useState(g),[E,z]=D.useState(!1),[w,$]=D.useState(null);D.useEffect(()=>{y((o==null?void 0:o.clientId)??""),j(""),x((o==null?void 0:o.enabled)??!0)},[o==null?void 0:o.clientId,o==null?void 0:o.enabled,o==null?void 0:o.source]);const N=h!==p||v.trim().length>0||k!==g,R=async S=>{if(S.preventDefault(),$(null),h.trim().length===0){$("Client ID is required.");return}if(!d&&v.trim().length===0){$("Client Secret is required.");return}z(!0);try{await l(e,{clientId:h.trim(),clientSecret:v.trim(),enabled:k})}catch(C){$(`save failed — ${String(C)}`)}finally{z(!1)}},_=async()=>{if(window.confirm(`Delete ${n} OAuth config? End-users will no longer be able to sign in with ${n}.`)){$(null),z(!0);try{await c(e)}catch(S){$(`delete failed — ${String(S)}`)}finally{z(!1)}}};return i.jsxs("article",{"data-ggui-oauth-provider-card":e,className:"ggui-card",style:{opacity:E?.6:1},children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:n}),i.jsx("span",{style:{marginLeft:"auto"},children:i.jsx(wx,{row:o})})]}),i.jsxs("div",{className:"ggui-card__body",children:[i.jsxs("form",{className:"ggui-form",onSubmit:S=>{R(S)},children:[i.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[i.jsxs("label",{style:{display:"flex",flexDirection:"column",gap:4},"aria-label":`${n} client ID`,children:[i.jsx("span",{className:"ggui-muted",children:"Client ID"}),i.jsx("span",{className:"ggui-field",children:i.jsx("input",{type:"text",placeholder:o===void 0?`paste ${n} OAuth client ID`:"",value:h,onChange:S=>y(S.target.value),readOnly:u,disabled:E,autoComplete:"off",spellCheck:!1,"data-ggui-oauth-provider-client-id":!0})})]}),i.jsxs("label",{style:{display:"flex",flexDirection:"column",gap:4},"aria-label":`${n} client secret`,children:[i.jsx("span",{className:"ggui-muted",children:"Client Secret"}),i.jsx("span",{className:"ggui-field",children:i.jsx("input",{type:"password",placeholder:u?uf:d?`${uf} — leave blank to keep`:`paste ${n} OAuth client secret`,value:u?uf:v,onChange:S=>j(S.target.value),readOnly:u,disabled:E,autoComplete:"off",spellCheck:!1,"data-ggui-oauth-provider-client-secret":!0})})]}),i.jsxs("label",{style:{display:"inline-flex",flexDirection:"row",alignItems:"center",gap:8},"aria-label":`${n} enabled`,children:[i.jsx("input",{type:"checkbox",checked:k,onChange:S=>x(S.target.checked),disabled:u||E,style:{flex:"none",width:"auto"},"data-ggui-oauth-provider-enabled":!0}),i.jsx("span",{children:"Enabled"}),u?i.jsx("span",{className:"ggui-muted",style:{marginLeft:8},children:"env-overrides are always-on"}):null]})]}),i.jsxs("div",{className:"ggui-form__row",style:{marginTop:12,gap:8},children:[i.jsxs("button",{type:"submit",className:"ggui-btn","data-ggui-oauth-provider-save":!0,disabled:u||E||!N,children:[i.jsx("span",{className:"ggui-btn__dot","aria-hidden":!0}),E?"saving…":"save"]}),d?i.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost","data-ggui-oauth-provider-delete":!0,disabled:E,onClick:()=>{_()},style:{color:"crimson",borderColor:"crimson"},children:"delete"}):null]})]}),w?i.jsx("p",{className:"ggui-muted",style:{marginTop:8},"data-ggui-oauth-provider-error":!0,children:w}):null]})]})}function wx({row:e}){return e===void 0?i.jsx("span",{className:"ggui-tag",style:{opacity:.5},children:"not configured"}):e.source==="env"?i.jsx("span",{className:"ggui-tag",title:"set via GGUI_OAUTH_*_CLIENT_ID/_SECRET env vars",children:"configured (env)"}):i.jsx("span",{className:"ggui-tag",title:"set via this UI; persisted to ~/.ggui/oauth-providers.json",children:"configured (file)"})}const kx="modulepreload",Nx=function(e){return"/"+e},wh={},zx=function(n,o,l){let c=Promise.resolve();if(o&&o.length>0){let d=function(h){return Promise.all(h.map(y=>Promise.resolve(y).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};document.getElementsByTagName("link");const p=document.querySelector("meta[property=csp-nonce]"),g=(p==null?void 0:p.nonce)||(p==null?void 0:p.getAttribute("nonce"));c=d(o.map(h=>{if(h=Nx(h),h in wh)return;wh[h]=!0;const y=h.endsWith(".css"),v=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${v}`))return;const j=document.createElement("link");if(j.rel=y?"stylesheet":kx,y||(j.as="script"),j.crossOrigin="",j.href=h,g&&j.setAttribute("nonce",g),document.head.appendChild(j),y)return new Promise((k,x)=>{j.addEventListener("load",k),j.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${h}`)))})}))}function u(d){const p=new Event("vite:preloadError",{cancelable:!0});if(p.payload=d,window.dispatchEvent(p),!p.defaultPrevented)throw d}return c.then(d=>{for(const p of d||[])p.status==="rejected"&&u(p.reason);return n().catch(u)})};var Ex=Object.defineProperty,Nc=(e,n)=>{for(var o in n)Ex(e,o,{get:n[o],enumerable:!0})};const Cx="draft-2026-08-19",Tx=Cx;function Zf(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var kh;function le(e,n,o){function l(p,g){if(p._zod||Object.defineProperty(p,"_zod",{value:{def:g,constr:d,traits:new Set},enumerable:!1}),p._zod.traits.has(e))return;p._zod.traits.add(e),n(p,g);const h=d.prototype,y=Object.keys(h);for(let v=0;v<y.length;v++){const j=y[v];j in p||(p[j]=h[j].bind(p))}}const c=(o==null?void 0:o.Parent)??Object;class u extends c{}Object.defineProperty(u,"name",{value:e});function d(p){var g;const h=o!=null&&o.Parent?new u:this;l(h,p),(g=h._zod).deferred??(g.deferred=[]);for(const y of h._zod.deferred)y();return h}return Object.defineProperty(d,"init",{value:l}),Object.defineProperty(d,Symbol.hasInstance,{value:p=>{var g,h;return o!=null&&o.Parent&&p instanceof o.Parent?!0:(h=(g=p==null?void 0:p._zod)==null?void 0:g.traits)==null?void 0:h.has(e)}}),Object.defineProperty(d,"name",{value:e}),d}class Ui extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Hv extends Error{constructor(n){super(`Encountered unidirectional transform during encode: ${n}`),this.name="ZodEncodeError"}}(kh=globalThis).__zod_globalConfig??(kh.__zod_globalConfig={});const Gf=globalThis.__zod_globalConfig;function bn(e){return Gf}function qv(e){const n=Object.values(e).filter(l=>typeof l=="number");return Object.entries(e).filter(([l,c])=>n.indexOf(+l)===-1).map(([l,c])=>c)}function Mf(e,n){return typeof n=="bigint"?n.toString():n}function zc(e){return{get value(){{const n=e();return Object.defineProperty(this,"value",{value:n}),n}}}}function Ff(e){return e==null}function Yf(e){const n=e.startsWith("^")?1:0,o=e.endsWith("$")?e.length-1:e.length;return e.slice(n,o)}function Mx(e,n){const o=e/n,l=Math.round(o),c=Number.EPSILON*Math.max(Math.abs(o),1);return Math.abs(o-l)<c?0:o-l}const Nh=Symbol("evaluating");function Be(e,n,o){let l;Object.defineProperty(e,n,{get(){if(l!==Nh)return l===void 0&&(l=Nh,l=o()),l},set(c){Object.defineProperty(e,n,{value:c})},configurable:!0})}function Zr(e,n,o){Object.defineProperty(e,n,{value:o,writable:!0,enumerable:!0,configurable:!0})}function vr(...e){const n={};for(const o of e){const l=Object.getOwnPropertyDescriptors(o);Object.assign(n,l)}return Object.defineProperties({},n)}function zh(e){return JSON.stringify(e)}function Ox(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Pv="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Xo(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Rx=zc(()=>{var e;if(Gf.jitless||typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{const n=Function;return new n(""),!0}catch{return!1}});function Bi(e){if(Xo(e)===!1)return!1;const n=e.constructor;if(n===void 0||typeof n!="function")return!0;const o=n.prototype;return!(Xo(o)===!1||Object.prototype.hasOwnProperty.call(o,"isPrototypeOf")===!1)}function Zv(e){return Bi(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const Ax=new Set(["string","number","symbol"]);function Hi(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function $r(e,n,o){const l=new e._zod.constr(n??e._zod.def);return(!n||o!=null&&o.parent)&&(l._zod.parent=e),l}function xe(e){const n=e;if(!n)return{};if(typeof n=="string")return{error:()=>n};if((n==null?void 0:n.message)!==void 0){if((n==null?void 0:n.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");n.error=n.message}return delete n.message,typeof n.error=="string"?{...n,error:()=>n.error}:n}function Dx(e){return Object.keys(e).filter(n=>e[n]._zod.optin==="optional"&&e[n]._zod.optout==="optional")}const Ux={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Ix(e,n){const o=e._zod.def,l=o.checks;if(l&&l.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const u=vr(e._zod.def,{get shape(){const d={};for(const p in n){if(!(p in o.shape))throw new Error(`Unrecognized key: "${p}"`);n[p]&&(d[p]=o.shape[p])}return Zr(this,"shape",d),d},checks:[]});return $r(e,u)}function Lx(e,n){const o=e._zod.def,l=o.checks;if(l&&l.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const u=vr(e._zod.def,{get shape(){const d={...e._zod.def.shape};for(const p in n){if(!(p in o.shape))throw new Error(`Unrecognized key: "${p}"`);n[p]&&delete d[p]}return Zr(this,"shape",d),d},checks:[]});return $r(e,u)}function Vx(e,n){if(!Bi(n))throw new Error("Invalid input to extend: expected a plain object");const o=e._zod.def.checks;if(o&&o.length>0){const u=e._zod.def.shape;for(const d in n)if(Object.getOwnPropertyDescriptor(u,d)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const c=vr(e._zod.def,{get shape(){const u={...e._zod.def.shape,...n};return Zr(this,"shape",u),u}});return $r(e,c)}function Bx(e,n){if(!Bi(n))throw new Error("Invalid input to safeExtend: expected a plain object");const o=vr(e._zod.def,{get shape(){const l={...e._zod.def.shape,...n};return Zr(this,"shape",l),l}});return $r(e,o)}function Hx(e,n){var l;if((l=e._zod.def.checks)!=null&&l.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const o=vr(e._zod.def,{get shape(){const c={...e._zod.def.shape,...n._zod.def.shape};return Zr(this,"shape",c),c},get catchall(){return n._zod.def.catchall},checks:n._zod.def.checks??[]});return $r(e,o)}function qx(e,n,o){const c=n._zod.def.checks;if(c&&c.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const d=vr(n._zod.def,{get shape(){const p=n._zod.def.shape,g={...p};if(o)for(const h in o){if(!(h in p))throw new Error(`Unrecognized key: "${h}"`);o[h]&&(g[h]=e?new e({type:"optional",innerType:p[h]}):p[h])}else for(const h in p)g[h]=e?new e({type:"optional",innerType:p[h]}):p[h];return Zr(this,"shape",g),g},checks:[]});return $r(n,d)}function Px(e,n,o){const l=vr(n._zod.def,{get shape(){const c=n._zod.def.shape,u={...c};if(o)for(const d in o){if(!(d in u))throw new Error(`Unrecognized key: "${d}"`);o[d]&&(u[d]=new e({type:"nonoptional",innerType:c[d]}))}else for(const d in c)u[d]=new e({type:"nonoptional",innerType:c[d]});return Zr(this,"shape",u),u}});return $r(n,l)}function Ai(e,n=0){var o;if(e.aborted===!0)return!0;for(let l=n;l<e.issues.length;l++)if(((o=e.issues[l])==null?void 0:o.continue)!==!0)return!0;return!1}function Zx(e,n=0){var o;if(e.aborted===!0)return!0;for(let l=n;l<e.issues.length;l++)if(((o=e.issues[l])==null?void 0:o.continue)===!1)return!0;return!1}function Di(e,n){return n.map(o=>{var l;return(l=o).path??(l.path=[]),o.path.unshift(e),o})}function Ns(e){return typeof e=="string"?e:e==null?void 0:e.message}function xn(e,n,o){var g,h,y,v,j,k;const l=e.message?e.message:Ns((y=(h=(g=e.inst)==null?void 0:g._zod.def)==null?void 0:h.error)==null?void 0:y.call(h,e))??Ns((v=n==null?void 0:n.error)==null?void 0:v.call(n,e))??Ns((j=o.customError)==null?void 0:j.call(o,e))??Ns((k=o.localeError)==null?void 0:k.call(o,e))??"Invalid input",{inst:c,continue:u,input:d,...p}=e;return p.path??(p.path=[]),p.message=l,n!=null&&n.reportInput&&(p.input=d),p}function Kf(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Qo(...e){const[n,o,l]=e;return typeof n=="string"?{message:n,code:"custom",input:o,inst:l}:{...n}}const Gv=(e,n)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:n,enumerable:!1}),e.message=JSON.stringify(n,Mf,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Fv=le("$ZodError",Gv),Yv=le("$ZodError",Gv,{Parent:Error});function Gx(e,n=o=>o.message){const o={},l=[];for(const c of e.issues)c.path.length>0?(o[c.path[0]]=o[c.path[0]]||[],o[c.path[0]].push(n(c))):l.push(n(c));return{formErrors:l,fieldErrors:o}}function Fx(e,n=o=>o.message){const o={_errors:[]},l=(c,u=[])=>{for(const d of c.issues)if(d.code==="invalid_union"&&d.errors.length)d.errors.map(p=>l({issues:p},[...u,...d.path]));else if(d.code==="invalid_key")l({issues:d.issues},[...u,...d.path]);else if(d.code==="invalid_element")l({issues:d.issues},[...u,...d.path]);else{const p=[...u,...d.path];if(p.length===0)o._errors.push(n(d));else{let g=o,h=0;for(;h<p.length;){const y=p[h];h===p.length-1?(g[y]=g[y]||{_errors:[]},g[y]._errors.push(n(d))):g[y]=g[y]||{_errors:[]},g=g[y],h++}}}};return l(e),o}const Jf=e=>(n,o,l,c)=>{const u=l?{...l,async:!1}:{async:!1},d=n._zod.run({value:o,issues:[]},u);if(d instanceof Promise)throw new Ui;if(d.issues.length){const p=new((c==null?void 0:c.Err)??e)(d.issues.map(g=>xn(g,u,bn())));throw Pv(p,c==null?void 0:c.callee),p}return d.value},Xf=e=>async(n,o,l,c)=>{const u=l?{...l,async:!0}:{async:!0};let d=n._zod.run({value:o,issues:[]},u);if(d instanceof Promise&&(d=await d),d.issues.length){const p=new((c==null?void 0:c.Err)??e)(d.issues.map(g=>xn(g,u,bn())));throw Pv(p,c==null?void 0:c.callee),p}return d.value},Ec=e=>(n,o,l)=>{const c=l?{...l,async:!1}:{async:!1},u=n._zod.run({value:o,issues:[]},c);if(u instanceof Promise)throw new Ui;return u.issues.length?{success:!1,error:new(e??Fv)(u.issues.map(d=>xn(d,c,bn())))}:{success:!0,data:u.value}},Yx=Ec(Yv),Cc=e=>async(n,o,l)=>{const c=l?{...l,async:!0}:{async:!0};let u=n._zod.run({value:o,issues:[]},c);return u instanceof Promise&&(u=await u),u.issues.length?{success:!1,error:new e(u.issues.map(d=>xn(d,c,bn())))}:{success:!0,data:u.value}},Kx=Cc(Yv),Jx=e=>(n,o,l)=>{const c=l?{...l,direction:"backward"}:{direction:"backward"};return Jf(e)(n,o,c)},Xx=e=>(n,o,l)=>Jf(e)(n,o,l),Qx=e=>async(n,o,l)=>{const c=l?{...l,direction:"backward"}:{direction:"backward"};return Xf(e)(n,o,c)},Wx=e=>async(n,o,l)=>Xf(e)(n,o,l),e4=e=>(n,o,l)=>{const c=l?{...l,direction:"backward"}:{direction:"backward"};return Ec(e)(n,o,c)},t4=e=>(n,o,l)=>Ec(e)(n,o,l),a4=e=>async(n,o,l)=>{const c=l?{...l,direction:"backward"}:{direction:"backward"};return Cc(e)(n,o,c)},n4=e=>async(n,o,l)=>Cc(e)(n,o,l),r4=/^[cC][0-9a-z]{6,}$/,i4=/^[0-9a-z]+$/,o4=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,l4=/^[0-9a-vA-V]{20}$/,s4=/^[A-Za-z0-9]{27}$/,c4=/^[a-zA-Z0-9_-]{21}$/,u4=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,d4=/^([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})$/,Eh=e=>e?new 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)$/,f4=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,p4="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function g4(){return new RegExp(p4,"u")}const m4=/^(?:(?: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])$/,h4=/^(([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}|:))$/,y4=/^((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])$/,v4=/^(([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])$/,$4=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Kv=/^[A-Za-z0-9_-]*$/,b4=/^https?$/,x4=/^\+[1-9]\d{6,14}$/,Jv="(?:(?:\\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])))",_4=new RegExp(`^${Jv}$`);function Xv(e){const n="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${n}`:e.precision===0?`${n}:[0-5]\\d`:`${n}:[0-5]\\d\\.\\d{${e.precision}}`:`${n}(?::[0-5]\\d(?:\\.\\d+)?)?`}function j4(e){return new RegExp(`^${Xv(e)}$`)}function S4(e){const n=Xv({precision:e.precision}),o=["Z"];e.local&&o.push(""),e.offset&&o.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const l=`${n}(?:${o.join("|")})`;return new RegExp(`^${Jv}T(?:${l})$`)}const w4=e=>{const n=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${n}$`)},k4=/^-?\d+$/,Qv=/^-?\d+(?:\.\d+)?$/,N4=/^(?:true|false)$/i,z4=/^null$/i,E4=/^[^A-Z]*$/,C4=/^[^a-z]*$/,sa=le("$ZodCheck",(e,n)=>{var o;e._zod??(e._zod={}),e._zod.def=n,(o=e._zod).onattach??(o.onattach=[])}),Wv={number:"number",bigint:"bigint",object:"date"},e1=le("$ZodCheckLessThan",(e,n)=>{sa.init(e,n);const o=Wv[typeof n.value];e._zod.onattach.push(l=>{const c=l._zod.bag,u=(n.inclusive?c.maximum:c.exclusiveMaximum)??Number.POSITIVE_INFINITY;n.value<u&&(n.inclusive?c.maximum=n.value:c.exclusiveMaximum=n.value)}),e._zod.check=l=>{(n.inclusive?l.value<=n.value:l.value<n.value)||l.issues.push({origin:o,code:"too_big",maximum:typeof n.value=="object"?n.value.getTime():n.value,input:l.value,inclusive:n.inclusive,inst:e,continue:!n.abort})}}),t1=le("$ZodCheckGreaterThan",(e,n)=>{sa.init(e,n);const o=Wv[typeof n.value];e._zod.onattach.push(l=>{const c=l._zod.bag,u=(n.inclusive?c.minimum:c.exclusiveMinimum)??Number.NEGATIVE_INFINITY;n.value>u&&(n.inclusive?c.minimum=n.value:c.exclusiveMinimum=n.value)}),e._zod.check=l=>{(n.inclusive?l.value>=n.value:l.value>n.value)||l.issues.push({origin:o,code:"too_small",minimum:typeof n.value=="object"?n.value.getTime():n.value,input:l.value,inclusive:n.inclusive,inst:e,continue:!n.abort})}}),T4=le("$ZodCheckMultipleOf",(e,n)=>{sa.init(e,n),e._zod.onattach.push(o=>{var l;(l=o._zod.bag).multipleOf??(l.multipleOf=n.value)}),e._zod.check=o=>{if(typeof o.value!=typeof n.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof o.value=="bigint"?o.value%n.value===BigInt(0):Mx(o.value,n.value)===0)||o.issues.push({origin:typeof o.value,code:"not_multiple_of",divisor:n.value,input:o.value,inst:e,continue:!n.abort})}}),M4=le("$ZodCheckNumberFormat",(e,n)=>{var d;sa.init(e,n),n.format=n.format||"float64";const o=(d=n.format)==null?void 0:d.includes("int"),l=o?"int":"number",[c,u]=Ux[n.format];e._zod.onattach.push(p=>{const g=p._zod.bag;g.format=n.format,g.minimum=c,g.maximum=u,o&&(g.pattern=k4)}),e._zod.check=p=>{const g=p.value;if(o){if(!Number.isInteger(g)){p.issues.push({expected:l,format:n.format,code:"invalid_type",continue:!1,input:g,inst:e});return}if(!Number.isSafeInteger(g)){g>0?p.issues.push({input:g,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:l,inclusive:!0,continue:!n.abort}):p.issues.push({input:g,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:l,inclusive:!0,continue:!n.abort});return}}g<c&&p.issues.push({origin:"number",input:g,code:"too_small",minimum:c,inclusive:!0,inst:e,continue:!n.abort}),g>u&&p.issues.push({origin:"number",input:g,code:"too_big",maximum:u,inclusive:!0,inst:e,continue:!n.abort})}}),O4=le("$ZodCheckMaxLength",(e,n)=>{var o;sa.init(e,n),(o=e._zod.def).when??(o.when=l=>{const c=l.value;return!Ff(c)&&c.length!==void 0}),e._zod.onattach.push(l=>{const c=l._zod.bag.maximum??Number.POSITIVE_INFINITY;n.maximum<c&&(l._zod.bag.maximum=n.maximum)}),e._zod.check=l=>{const c=l.value;if(c.length<=n.maximum)return;const d=Kf(c);l.issues.push({origin:d,code:"too_big",maximum:n.maximum,inclusive:!0,input:c,inst:e,continue:!n.abort})}}),R4=le("$ZodCheckMinLength",(e,n)=>{var o;sa.init(e,n),(o=e._zod.def).when??(o.when=l=>{const c=l.value;return!Ff(c)&&c.length!==void 0}),e._zod.onattach.push(l=>{const c=l._zod.bag.minimum??Number.NEGATIVE_INFINITY;n.minimum>c&&(l._zod.bag.minimum=n.minimum)}),e._zod.check=l=>{const c=l.value;if(c.length>=n.minimum)return;const d=Kf(c);l.issues.push({origin:d,code:"too_small",minimum:n.minimum,inclusive:!0,input:c,inst:e,continue:!n.abort})}}),A4=le("$ZodCheckLengthEquals",(e,n)=>{var o;sa.init(e,n),(o=e._zod.def).when??(o.when=l=>{const c=l.value;return!Ff(c)&&c.length!==void 0}),e._zod.onattach.push(l=>{const c=l._zod.bag;c.minimum=n.length,c.maximum=n.length,c.length=n.length}),e._zod.check=l=>{const c=l.value,u=c.length;if(u===n.length)return;const d=Kf(c),p=u>n.length;l.issues.push({origin:d,...p?{code:"too_big",maximum:n.length}:{code:"too_small",minimum:n.length},inclusive:!0,exact:!0,input:l.value,inst:e,continue:!n.abort})}}),Tc=le("$ZodCheckStringFormat",(e,n)=>{var o,l;sa.init(e,n),e._zod.onattach.push(c=>{const u=c._zod.bag;u.format=n.format,n.pattern&&(u.patterns??(u.patterns=new Set),u.patterns.add(n.pattern))}),n.pattern?(o=e._zod).check??(o.check=c=>{n.pattern.lastIndex=0,!n.pattern.test(c.value)&&c.issues.push({origin:"string",code:"invalid_format",format:n.format,input:c.value,...n.pattern?{pattern:n.pattern.toString()}:{},inst:e,continue:!n.abort})}):(l=e._zod).check??(l.check=()=>{})}),D4=le("$ZodCheckRegex",(e,n)=>{Tc.init(e,n),e._zod.check=o=>{n.pattern.lastIndex=0,!n.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:"regex",input:o.value,pattern:n.pattern.toString(),inst:e,continue:!n.abort})}}),U4=le("$ZodCheckLowerCase",(e,n)=>{n.pattern??(n.pattern=E4),Tc.init(e,n)}),I4=le("$ZodCheckUpperCase",(e,n)=>{n.pattern??(n.pattern=C4),Tc.init(e,n)}),L4=le("$ZodCheckIncludes",(e,n)=>{sa.init(e,n);const o=Hi(n.includes),l=new RegExp(typeof n.position=="number"?`^.{${n.position}}${o}`:o);n.pattern=l,e._zod.onattach.push(c=>{const u=c._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(l)}),e._zod.check=c=>{c.value.includes(n.includes,n.position)||c.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:n.includes,input:c.value,inst:e,continue:!n.abort})}}),V4=le("$ZodCheckStartsWith",(e,n)=>{sa.init(e,n);const o=new RegExp(`^${Hi(n.prefix)}.*`);n.pattern??(n.pattern=o),e._zod.onattach.push(l=>{const c=l._zod.bag;c.patterns??(c.patterns=new Set),c.patterns.add(o)}),e._zod.check=l=>{l.value.startsWith(n.prefix)||l.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:n.prefix,input:l.value,inst:e,continue:!n.abort})}}),B4=le("$ZodCheckEndsWith",(e,n)=>{sa.init(e,n);const o=new RegExp(`.*${Hi(n.suffix)}$`);n.pattern??(n.pattern=o),e._zod.onattach.push(l=>{const c=l._zod.bag;c.patterns??(c.patterns=new Set),c.patterns.add(o)}),e._zod.check=l=>{l.value.endsWith(n.suffix)||l.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:n.suffix,input:l.value,inst:e,continue:!n.abort})}}),H4=le("$ZodCheckOverwrite",(e,n)=>{sa.init(e,n),e._zod.check=o=>{o.value=n.tx(o.value)}});class q4{constructor(n=[]){this.content=[],this.indent=0,this&&(this.args=n)}indented(n){this.indent+=1,n(this),this.indent-=1}write(n){if(typeof n=="function"){n(this,{execution:"sync"}),n(this,{execution:"async"});return}const l=n.split(`
50
- `).filter(d=>d),c=Math.min(...l.map(d=>d.length-d.trimStart().length)),u=l.map(d=>d.slice(c)).map(d=>" ".repeat(this.indent*2)+d);for(const d of u)this.content.push(d)}compile(){const n=Function,o=this==null?void 0:this.args,c=[...((this==null?void 0:this.content)??[""]).map(u=>` ${u}`)];return new n(...o,c.join(`
51
- `))}}const P4={major:4,minor:4,patch:3},lt=le("$ZodType",(e,n)=>{var c;var o;e??(e={}),e._zod.def=n,e._zod.bag=e._zod.bag||{},e._zod.version=P4;const l=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&l.unshift(e);for(const u of l)for(const d of u._zod.onattach)d(e);if(l.length===0)(o=e._zod).deferred??(o.deferred=[]),(c=e._zod.deferred)==null||c.push(()=>{e._zod.run=e._zod.parse});else{const u=(p,g,h)=>{let y=Ai(p),v;for(const j of g){if(j._zod.def.when){if(Zx(p)||!j._zod.def.when(p))continue}else if(y)continue;const k=p.issues.length,x=j._zod.check(p);if(x instanceof Promise&&(h==null?void 0:h.async)===!1)throw new Ui;if(v||x instanceof Promise)v=(v??Promise.resolve()).then(async()=>{await x,p.issues.length!==k&&(y||(y=Ai(p,k)))});else{if(p.issues.length===k)continue;y||(y=Ai(p,k))}}return v?v.then(()=>p):p},d=(p,g,h)=>{if(Ai(p))return p.aborted=!0,p;const y=u(g,l,h);if(y instanceof Promise){if(h.async===!1)throw new Ui;return y.then(v=>e._zod.parse(v,h))}return e._zod.parse(y,h)};e._zod.run=(p,g)=>{if(g.skipChecks)return e._zod.parse(p,g);if(g.direction==="backward"){const y=e._zod.parse({value:p.value,issues:[]},{...g,skipChecks:!0});return y instanceof Promise?y.then(v=>d(v,p,g)):d(y,p,g)}const h=e._zod.parse(p,g);if(h instanceof Promise){if(g.async===!1)throw new Ui;return h.then(y=>u(y,l,g))}return u(h,l,g)}}Be(e,"~standard",()=>({validate:u=>{var d;try{const p=Yx(e,u);return p.success?{value:p.data}:{issues:(d=p.error)==null?void 0:d.issues}}catch{return Kx(e,u).then(g=>{var h;return g.success?{value:g.data}:{issues:(h=g.error)==null?void 0:h.issues}})}},vendor:"zod",version:1}))}),Qf=le("$ZodString",(e,n)=>{var o;lt.init(e,n),e._zod.pattern=[...((o=e==null?void 0:e._zod.bag)==null?void 0:o.patterns)??[]].pop()??w4(e._zod.bag),e._zod.parse=(l,c)=>{if(n.coerce)try{l.value=String(l.value)}catch{}return typeof l.value=="string"||l.issues.push({expected:"string",code:"invalid_type",input:l.value,inst:e}),l}}),ut=le("$ZodStringFormat",(e,n)=>{Tc.init(e,n),Qf.init(e,n)}),Z4=le("$ZodGUID",(e,n)=>{n.pattern??(n.pattern=d4),ut.init(e,n)}),G4=le("$ZodUUID",(e,n)=>{if(n.version){const l={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[n.version];if(l===void 0)throw new Error(`Invalid UUID version: "${n.version}"`);n.pattern??(n.pattern=Eh(l))}else n.pattern??(n.pattern=Eh());ut.init(e,n)}),F4=le("$ZodEmail",(e,n)=>{n.pattern??(n.pattern=f4),ut.init(e,n)}),Y4=le("$ZodURL",(e,n)=>{ut.init(e,n),e._zod.check=o=>{var l;try{const c=o.value.trim();if(!n.normalize&&((l=n.protocol)==null?void 0:l.source)===b4.source&&!/^https?:\/\//i.test(c)){o.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:o.value,inst:e,continue:!n.abort});return}const u=new URL(c);n.hostname&&(n.hostname.lastIndex=0,n.hostname.test(u.hostname)||o.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:n.hostname.source,input:o.value,inst:e,continue:!n.abort})),n.protocol&&(n.protocol.lastIndex=0,n.protocol.test(u.protocol.endsWith(":")?u.protocol.slice(0,-1):u.protocol)||o.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:n.protocol.source,input:o.value,inst:e,continue:!n.abort})),n.normalize?o.value=u.href:o.value=c;return}catch{o.issues.push({code:"invalid_format",format:"url",input:o.value,inst:e,continue:!n.abort})}}}),K4=le("$ZodEmoji",(e,n)=>{n.pattern??(n.pattern=g4()),ut.init(e,n)}),J4=le("$ZodNanoID",(e,n)=>{n.pattern??(n.pattern=c4),ut.init(e,n)}),X4=le("$ZodCUID",(e,n)=>{n.pattern??(n.pattern=r4),ut.init(e,n)}),Q4=le("$ZodCUID2",(e,n)=>{n.pattern??(n.pattern=i4),ut.init(e,n)}),W4=le("$ZodULID",(e,n)=>{n.pattern??(n.pattern=o4),ut.init(e,n)}),e5=le("$ZodXID",(e,n)=>{n.pattern??(n.pattern=l4),ut.init(e,n)}),t5=le("$ZodKSUID",(e,n)=>{n.pattern??(n.pattern=s4),ut.init(e,n)}),a5=le("$ZodISODateTime",(e,n)=>{n.pattern??(n.pattern=S4(n)),ut.init(e,n)}),n5=le("$ZodISODate",(e,n)=>{n.pattern??(n.pattern=_4),ut.init(e,n)}),r5=le("$ZodISOTime",(e,n)=>{n.pattern??(n.pattern=j4(n)),ut.init(e,n)}),i5=le("$ZodISODuration",(e,n)=>{n.pattern??(n.pattern=u4),ut.init(e,n)}),o5=le("$ZodIPv4",(e,n)=>{n.pattern??(n.pattern=m4),ut.init(e,n),e._zod.bag.format="ipv4"}),l5=le("$ZodIPv6",(e,n)=>{n.pattern??(n.pattern=h4),ut.init(e,n),e._zod.bag.format="ipv6",e._zod.check=o=>{try{new URL(`http://[${o.value}]`)}catch{o.issues.push({code:"invalid_format",format:"ipv6",input:o.value,inst:e,continue:!n.abort})}}}),s5=le("$ZodCIDRv4",(e,n)=>{n.pattern??(n.pattern=y4),ut.init(e,n)}),c5=le("$ZodCIDRv6",(e,n)=>{n.pattern??(n.pattern=v4),ut.init(e,n),e._zod.check=o=>{const l=o.value.split("/");try{if(l.length!==2)throw new Error;const[c,u]=l;if(!u)throw new Error;const d=Number(u);if(`${d}`!==u)throw new Error;if(d<0||d>128)throw new Error;new URL(`http://[${c}]`)}catch{o.issues.push({code:"invalid_format",format:"cidrv6",input:o.value,inst:e,continue:!n.abort})}}});function a1(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const u5=le("$ZodBase64",(e,n)=>{n.pattern??(n.pattern=$4),ut.init(e,n),e._zod.bag.contentEncoding="base64",e._zod.check=o=>{a1(o.value)||o.issues.push({code:"invalid_format",format:"base64",input:o.value,inst:e,continue:!n.abort})}});function d5(e){if(!Kv.test(e))return!1;const n=e.replace(/[-_]/g,l=>l==="-"?"+":"/"),o=n.padEnd(Math.ceil(n.length/4)*4,"=");return a1(o)}const f5=le("$ZodBase64URL",(e,n)=>{n.pattern??(n.pattern=Kv),ut.init(e,n),e._zod.bag.contentEncoding="base64url",e._zod.check=o=>{d5(o.value)||o.issues.push({code:"invalid_format",format:"base64url",input:o.value,inst:e,continue:!n.abort})}}),p5=le("$ZodE164",(e,n)=>{n.pattern??(n.pattern=x4),ut.init(e,n)});function g5(e,n=null){try{const o=e.split(".");if(o.length!==3)return!1;const[l]=o;if(!l)return!1;const c=JSON.parse(atob(l));return!("typ"in c&&(c==null?void 0:c.typ)!=="JWT"||!c.alg||n&&(!("alg"in c)||c.alg!==n))}catch{return!1}}const m5=le("$ZodJWT",(e,n)=>{ut.init(e,n),e._zod.check=o=>{g5(o.value,n.alg)||o.issues.push({code:"invalid_format",format:"jwt",input:o.value,inst:e,continue:!n.abort})}}),n1=le("$ZodNumber",(e,n)=>{lt.init(e,n),e._zod.pattern=e._zod.bag.pattern??Qv,e._zod.parse=(o,l)=>{if(n.coerce)try{o.value=Number(o.value)}catch{}const c=o.value;if(typeof c=="number"&&!Number.isNaN(c)&&Number.isFinite(c))return o;const u=typeof c=="number"?Number.isNaN(c)?"NaN":Number.isFinite(c)?void 0:"Infinity":void 0;return o.issues.push({expected:"number",code:"invalid_type",input:c,inst:e,...u?{received:u}:{}}),o}}),h5=le("$ZodNumberFormat",(e,n)=>{M4.init(e,n),n1.init(e,n)}),y5=le("$ZodBoolean",(e,n)=>{lt.init(e,n),e._zod.pattern=N4,e._zod.parse=(o,l)=>{if(n.coerce)try{o.value=!!o.value}catch{}const c=o.value;return typeof c=="boolean"||o.issues.push({expected:"boolean",code:"invalid_type",input:c,inst:e}),o}}),v5=le("$ZodNull",(e,n)=>{lt.init(e,n),e._zod.pattern=z4,e._zod.values=new Set([null]),e._zod.parse=(o,l)=>{const c=o.value;return c===null||o.issues.push({expected:"null",code:"invalid_type",input:c,inst:e}),o}}),$5=le("$ZodUnknown",(e,n)=>{lt.init(e,n),e._zod.parse=o=>o}),b5=le("$ZodNever",(e,n)=>{lt.init(e,n),e._zod.parse=(o,l)=>(o.issues.push({expected:"never",code:"invalid_type",input:o.value,inst:e}),o)});function Ch(e,n,o){e.issues.length&&n.issues.push(...Di(o,e.issues)),n.value[o]=e.value}const x5=le("$ZodArray",(e,n)=>{lt.init(e,n),e._zod.parse=(o,l)=>{const c=o.value;if(!Array.isArray(c))return o.issues.push({expected:"array",code:"invalid_type",input:c,inst:e}),o;o.value=Array(c.length);const u=[];for(let d=0;d<c.length;d++){const p=c[d],g=n.element._zod.run({value:p,issues:[]},l);g instanceof Promise?u.push(g.then(h=>Ch(h,o,d))):Ch(g,o,d)}return u.length?Promise.all(u).then(()=>o):o}});function _c(e,n,o,l,c,u){const d=o in l;if(e.issues.length){if(c&&u&&!d)return;n.issues.push(...Di(o,e.issues))}if(!d&&!c){e.issues.length||n.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[o]});return}e.value===void 0?d&&(n.value[o]=void 0):n.value[o]=e.value}function r1(e){var l,c,u,d;const n=Object.keys(e.shape);for(const p of n)if(!((d=(u=(c=(l=e.shape)==null?void 0:l[p])==null?void 0:c._zod)==null?void 0:u.traits)!=null&&d.has("$ZodType")))throw new Error(`Invalid element at key "${p}": expected a Zod schema`);const o=Dx(e.shape);return{...e,keys:n,keySet:new Set(n),numKeys:n.length,optionalKeys:new Set(o)}}function i1(e,n,o,l,c,u){const d=[],p=c.keySet,g=c.catchall._zod,h=g.def.type,y=g.optin==="optional",v=g.optout==="optional";for(const j in n){if(j==="__proto__"||p.has(j))continue;if(h==="never"){d.push(j);continue}const k=g.run({value:n[j],issues:[]},l);k instanceof Promise?e.push(k.then(x=>_c(x,o,j,n,y,v))):_c(k,o,j,n,y,v)}return d.length&&o.issues.push({code:"unrecognized_keys",keys:d,input:n,inst:u}),e.length?Promise.all(e).then(()=>o):o}const _5=le("$ZodObject",(e,n)=>{lt.init(e,n);const o=Object.getOwnPropertyDescriptor(n,"shape");if(!(o!=null&&o.get)){const p=n.shape;Object.defineProperty(n,"shape",{get:()=>{const g={...p};return Object.defineProperty(n,"shape",{value:g}),g}})}const l=zc(()=>r1(n));Be(e._zod,"propValues",()=>{const p=n.shape,g={};for(const h in p){const y=p[h]._zod;if(y.values){g[h]??(g[h]=new Set);for(const v of y.values)g[h].add(v)}}return g});const c=Xo,u=n.catchall;let d;e._zod.parse=(p,g)=>{d??(d=l.value);const h=p.value;if(!c(h))return p.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),p;p.value={};const y=[],v=d.shape;for(const j of d.keys){const k=v[j],x=k._zod.optin==="optional",E=k._zod.optout==="optional",z=k._zod.run({value:h[j],issues:[]},g);z instanceof Promise?y.push(z.then(w=>_c(w,p,j,h,x,E))):_c(z,p,j,h,x,E)}return u?i1(y,h,p,g,l.value,e):y.length?Promise.all(y).then(()=>p):p}}),j5=le("$ZodObjectJIT",(e,n)=>{_5.init(e,n);const o=e._zod.parse,l=zc(()=>r1(n)),c=j=>{var N,R;const k=new q4(["shape","payload","ctx"]),x=l.value,E=_=>{const S=zh(_);return`shape[${S}]._zod.run({ value: input[${S}], issues: [] }, ctx)`};k.write("const input = payload.value;");const z=Object.create(null);let w=0;for(const _ of x.keys)z[_]=`key_${w++}`;k.write("const newResult = {};");for(const _ of x.keys){const S=z[_],C=zh(_),U=j[_],te=((N=U==null?void 0:U._zod)==null?void 0:N.optin)==="optional",G=((R=U==null?void 0:U._zod)==null?void 0:R.optout)==="optional";k.write(`const ${S} = ${E(_)};`),te&&G?k.write(`
52
- if (${S}.issues.length) {
53
- if (${C} in input) {
54
- payload.issues = payload.issues.concat(${S}.issues.map(iss => ({
55
- ...iss,
56
- path: iss.path ? [${C}, ...iss.path] : [${C}]
57
- })));
58
- }
59
- }
60
-
61
- if (${S}.value === undefined) {
62
- if (${C} in input) {
63
- newResult[${C}] = undefined;
64
- }
65
- } else {
66
- newResult[${C}] = ${S}.value;
67
- }
68
-
69
- `):te?k.write(`
70
- if (${S}.issues.length) {
71
- payload.issues = payload.issues.concat(${S}.issues.map(iss => ({
72
- ...iss,
73
- path: iss.path ? [${C}, ...iss.path] : [${C}]
74
- })));
75
- }
76
-
77
- if (${S}.value === undefined) {
78
- if (${C} in input) {
79
- newResult[${C}] = undefined;
80
- }
81
- } else {
82
- newResult[${C}] = ${S}.value;
83
- }
84
-
85
- `):k.write(`
86
- const ${S}_present = ${C} in input;
87
- if (${S}.issues.length) {
88
- payload.issues = payload.issues.concat(${S}.issues.map(iss => ({
89
- ...iss,
90
- path: iss.path ? [${C}, ...iss.path] : [${C}]
91
- })));
92
- }
93
- if (!${S}_present && !${S}.issues.length) {
94
- payload.issues.push({
95
- code: "invalid_type",
96
- expected: "nonoptional",
97
- input: undefined,
98
- path: [${C}]
99
- });
100
- }
101
-
102
- if (${S}_present) {
103
- if (${S}.value === undefined) {
104
- newResult[${C}] = undefined;
105
- } else {
106
- newResult[${C}] = ${S}.value;
107
- }
108
- }
109
-
110
- `)}k.write("payload.value = newResult;"),k.write("return payload;");const $=k.compile();return(_,S)=>$(j,_,S)};let u;const d=Xo,p=!Gf.jitless,h=p&&Rx.value,y=n.catchall;let v;e._zod.parse=(j,k)=>{v??(v=l.value);const x=j.value;return d(x)?p&&h&&(k==null?void 0:k.async)===!1&&k.jitless!==!0?(u||(u=c(n.shape)),j=u(j,k),y?i1([],x,j,k,v,e):j):o(j,k):(j.issues.push({expected:"object",code:"invalid_type",input:x,inst:e}),j)}});function Th(e,n,o,l){for(const u of e)if(u.issues.length===0)return n.value=u.value,n;const c=e.filter(u=>!Ai(u));return c.length===1?(n.value=c[0].value,c[0]):(n.issues.push({code:"invalid_union",input:n.value,inst:o,errors:e.map(u=>u.issues.map(d=>xn(d,l,bn())))}),n)}const o1=le("$ZodUnion",(e,n)=>{lt.init(e,n),Be(e._zod,"optin",()=>n.options.some(l=>l._zod.optin==="optional")?"optional":void 0),Be(e._zod,"optout",()=>n.options.some(l=>l._zod.optout==="optional")?"optional":void 0),Be(e._zod,"values",()=>{if(n.options.every(l=>l._zod.values))return new Set(n.options.flatMap(l=>Array.from(l._zod.values)))}),Be(e._zod,"pattern",()=>{if(n.options.every(l=>l._zod.pattern)){const l=n.options.map(c=>c._zod.pattern);return new RegExp(`^(${l.map(c=>Yf(c.source)).join("|")})$`)}});const o=n.options.length===1?n.options[0]._zod.run:null;e._zod.parse=(l,c)=>{if(o)return o(l,c);let u=!1;const d=[];for(const p of n.options){const g=p._zod.run({value:l.value,issues:[]},c);if(g instanceof Promise)d.push(g),u=!0;else{if(g.issues.length===0)return g;d.push(g)}}return u?Promise.all(d).then(p=>Th(p,l,e,c)):Th(d,l,e,c)}}),S5=le("$ZodDiscriminatedUnion",(e,n)=>{n.inclusive=!1,o1.init(e,n);const o=e._zod.parse;Be(e._zod,"propValues",()=>{const c={};for(const u of n.options){const d=u._zod.propValues;if(!d||Object.keys(d).length===0)throw new Error(`Invalid discriminated union option at index "${n.options.indexOf(u)}"`);for(const[p,g]of Object.entries(d)){c[p]||(c[p]=new Set);for(const h of g)c[p].add(h)}}return c});const l=zc(()=>{var d;const c=n.options,u=new Map;for(const p of c){const g=(d=p._zod.propValues)==null?void 0:d[n.discriminator];if(!g||g.size===0)throw new Error(`Invalid discriminated union option at index "${n.options.indexOf(p)}"`);for(const h of g){if(u.has(h))throw new Error(`Duplicate discriminator value "${String(h)}"`);u.set(h,p)}}return u});e._zod.parse=(c,u)=>{const d=c.value;if(!Xo(d))return c.issues.push({code:"invalid_type",expected:"object",input:d,inst:e}),c;const p=l.value.get(d==null?void 0:d[n.discriminator]);return p?p._zod.run(c,u):n.unionFallback||u.direction==="backward"?o(c,u):(c.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:n.discriminator,options:Array.from(l.value.keys()),input:d,path:[n.discriminator],inst:e}),c)}}),w5=le("$ZodIntersection",(e,n)=>{lt.init(e,n),e._zod.parse=(o,l)=>{const c=o.value,u=n.left._zod.run({value:c,issues:[]},l),d=n.right._zod.run({value:c,issues:[]},l);return u instanceof Promise||d instanceof Promise?Promise.all([u,d]).then(([g,h])=>Mh(o,g,h)):Mh(o,u,d)}});function Of(e,n){if(e===n)return{valid:!0,data:e};if(e instanceof Date&&n instanceof Date&&+e==+n)return{valid:!0,data:e};if(Bi(e)&&Bi(n)){const o=Object.keys(n),l=Object.keys(e).filter(u=>o.indexOf(u)!==-1),c={...e,...n};for(const u of l){const d=Of(e[u],n[u]);if(!d.valid)return{valid:!1,mergeErrorPath:[u,...d.mergeErrorPath]};c[u]=d.data}return{valid:!0,data:c}}if(Array.isArray(e)&&Array.isArray(n)){if(e.length!==n.length)return{valid:!1,mergeErrorPath:[]};const o=[];for(let l=0;l<e.length;l++){const c=e[l],u=n[l],d=Of(c,u);if(!d.valid)return{valid:!1,mergeErrorPath:[l,...d.mergeErrorPath]};o.push(d.data)}return{valid:!0,data:o}}return{valid:!1,mergeErrorPath:[]}}function Mh(e,n,o){const l=new Map;let c;for(const p of n.issues)if(p.code==="unrecognized_keys"){c??(c=p);for(const g of p.keys)l.has(g)||l.set(g,{}),l.get(g).l=!0}else e.issues.push(p);for(const p of o.issues)if(p.code==="unrecognized_keys")for(const g of p.keys)l.has(g)||l.set(g,{}),l.get(g).r=!0;else e.issues.push(p);const u=[...l].filter(([,p])=>p.l&&p.r).map(([p])=>p);if(u.length&&c&&e.issues.push({...c,keys:u}),Ai(e))return e;const d=Of(n.value,o.value);if(!d.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(d.mergeErrorPath)}`);return e.value=d.data,e}const k5=le("$ZodRecord",(e,n)=>{lt.init(e,n),e._zod.parse=(o,l)=>{const c=o.value;if(!Bi(c))return o.issues.push({expected:"record",code:"invalid_type",input:c,inst:e}),o;const u=[],d=n.keyType._zod.values;if(d){o.value={};const p=new Set;for(const h of d)if(typeof h=="string"||typeof h=="number"||typeof h=="symbol"){p.add(typeof h=="number"?h.toString():h);const y=n.keyType._zod.run({value:h,issues:[]},l);if(y instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(y.issues.length){o.issues.push({code:"invalid_key",origin:"record",issues:y.issues.map(k=>xn(k,l,bn())),input:h,path:[h],inst:e});continue}const v=y.value,j=n.valueType._zod.run({value:c[h],issues:[]},l);j instanceof Promise?u.push(j.then(k=>{k.issues.length&&o.issues.push(...Di(h,k.issues)),o.value[v]=k.value})):(j.issues.length&&o.issues.push(...Di(h,j.issues)),o.value[v]=j.value)}let g;for(const h in c)p.has(h)||(g=g??[],g.push(h));g&&g.length>0&&o.issues.push({code:"unrecognized_keys",input:c,inst:e,keys:g})}else{o.value={};for(const p of Reflect.ownKeys(c)){if(p==="__proto__"||!Object.prototype.propertyIsEnumerable.call(c,p))continue;let g=n.keyType._zod.run({value:p,issues:[]},l);if(g instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof p=="string"&&Qv.test(p)&&g.issues.length){const v=n.keyType._zod.run({value:Number(p),issues:[]},l);if(v instanceof Promise)throw new Error("Async schemas not supported in object keys currently");v.issues.length===0&&(g=v)}if(g.issues.length){n.mode==="loose"?o.value[p]=c[p]:o.issues.push({code:"invalid_key",origin:"record",issues:g.issues.map(v=>xn(v,l,bn())),input:p,path:[p],inst:e});continue}const y=n.valueType._zod.run({value:c[p],issues:[]},l);y instanceof Promise?u.push(y.then(v=>{v.issues.length&&o.issues.push(...Di(p,v.issues)),o.value[g.value]=v.value})):(y.issues.length&&o.issues.push(...Di(p,y.issues)),o.value[g.value]=y.value)}}return u.length?Promise.all(u).then(()=>o):o}}),N5=le("$ZodEnum",(e,n)=>{lt.init(e,n);const o=qv(n.entries),l=new Set(o);e._zod.values=l,e._zod.pattern=new RegExp(`^(${o.filter(c=>Ax.has(typeof c)).map(c=>typeof c=="string"?Hi(c):c.toString()).join("|")})$`),e._zod.parse=(c,u)=>{const d=c.value;return l.has(d)||c.issues.push({code:"invalid_value",values:o,input:d,inst:e}),c}}),z5=le("$ZodLiteral",(e,n)=>{if(lt.init(e,n),n.values.length===0)throw new Error("Cannot create literal schema with no valid values");const o=new Set(n.values);e._zod.values=o,e._zod.pattern=new RegExp(`^(${n.values.map(l=>typeof l=="string"?Hi(l):l?Hi(l.toString()):String(l)).join("|")})$`),e._zod.parse=(l,c)=>{const u=l.value;return o.has(u)||l.issues.push({code:"invalid_value",values:n.values,input:u,inst:e}),l}}),E5=le("$ZodTransform",(e,n)=>{lt.init(e,n),e._zod.optin="optional",e._zod.parse=(o,l)=>{if(l.direction==="backward")throw new Hv(e.constructor.name);const c=n.transform(o.value,o);if(l.async)return(c instanceof Promise?c:Promise.resolve(c)).then(d=>(o.value=d,o.fallback=!0,o));if(c instanceof Promise)throw new Ui;return o.value=c,o.fallback=!0,o}});function Oh(e,n){return n===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const l1=le("$ZodOptional",(e,n)=>{lt.init(e,n),e._zod.optin="optional",e._zod.optout="optional",Be(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,void 0]):void 0),Be(e._zod,"pattern",()=>{const o=n.innerType._zod.pattern;return o?new RegExp(`^(${Yf(o.source)})?$`):void 0}),e._zod.parse=(o,l)=>{if(n.innerType._zod.optin==="optional"){const c=o.value,u=n.innerType._zod.run(o,l);return u instanceof Promise?u.then(d=>Oh(d,c)):Oh(u,c)}return o.value===void 0?o:n.innerType._zod.run(o,l)}}),C5=le("$ZodExactOptional",(e,n)=>{l1.init(e,n),Be(e._zod,"values",()=>n.innerType._zod.values),Be(e._zod,"pattern",()=>n.innerType._zod.pattern),e._zod.parse=(o,l)=>n.innerType._zod.run(o,l)}),T5=le("$ZodNullable",(e,n)=>{lt.init(e,n),Be(e._zod,"optin",()=>n.innerType._zod.optin),Be(e._zod,"optout",()=>n.innerType._zod.optout),Be(e._zod,"pattern",()=>{const o=n.innerType._zod.pattern;return o?new RegExp(`^(${Yf(o.source)}|null)$`):void 0}),Be(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,null]):void 0),e._zod.parse=(o,l)=>o.value===null?o:n.innerType._zod.run(o,l)}),M5=le("$ZodDefault",(e,n)=>{lt.init(e,n),e._zod.optin="optional",Be(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(o,l)=>{if(l.direction==="backward")return n.innerType._zod.run(o,l);if(o.value===void 0)return o.value=n.defaultValue,o;const c=n.innerType._zod.run(o,l);return c instanceof Promise?c.then(u=>Rh(u,n)):Rh(c,n)}});function Rh(e,n){return e.value===void 0&&(e.value=n.defaultValue),e}const O5=le("$ZodPrefault",(e,n)=>{lt.init(e,n),e._zod.optin="optional",Be(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(o,l)=>(l.direction==="backward"||o.value===void 0&&(o.value=n.defaultValue),n.innerType._zod.run(o,l))}),R5=le("$ZodNonOptional",(e,n)=>{lt.init(e,n),Be(e._zod,"values",()=>{const o=n.innerType._zod.values;return o?new Set([...o].filter(l=>l!==void 0)):void 0}),e._zod.parse=(o,l)=>{const c=n.innerType._zod.run(o,l);return c instanceof Promise?c.then(u=>Ah(u,e)):Ah(c,e)}});function Ah(e,n){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:n}),e}const A5=le("$ZodCatch",(e,n)=>{lt.init(e,n),e._zod.optin="optional",Be(e._zod,"optout",()=>n.innerType._zod.optout),Be(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(o,l)=>{if(l.direction==="backward")return n.innerType._zod.run(o,l);const c=n.innerType._zod.run(o,l);return c instanceof Promise?c.then(u=>(o.value=u.value,u.issues.length&&(o.value=n.catchValue({...o,error:{issues:u.issues.map(d=>xn(d,l,bn()))},input:o.value}),o.issues=[],o.fallback=!0),o)):(o.value=c.value,c.issues.length&&(o.value=n.catchValue({...o,error:{issues:c.issues.map(u=>xn(u,l,bn()))},input:o.value}),o.issues=[],o.fallback=!0),o)}}),D5=le("$ZodPipe",(e,n)=>{lt.init(e,n),Be(e._zod,"values",()=>n.in._zod.values),Be(e._zod,"optin",()=>n.in._zod.optin),Be(e._zod,"optout",()=>n.out._zod.optout),Be(e._zod,"propValues",()=>n.in._zod.propValues),e._zod.parse=(o,l)=>{if(l.direction==="backward"){const u=n.out._zod.run(o,l);return u instanceof Promise?u.then(d=>zs(d,n.in,l)):zs(u,n.in,l)}const c=n.in._zod.run(o,l);return c instanceof Promise?c.then(u=>zs(u,n.out,l)):zs(c,n.out,l)}});function zs(e,n,o){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},o)}const U5=le("$ZodReadonly",(e,n)=>{lt.init(e,n),Be(e._zod,"propValues",()=>n.innerType._zod.propValues),Be(e._zod,"values",()=>n.innerType._zod.values),Be(e._zod,"optin",()=>{var o,l;return(l=(o=n.innerType)==null?void 0:o._zod)==null?void 0:l.optin}),Be(e._zod,"optout",()=>{var o,l;return(l=(o=n.innerType)==null?void 0:o._zod)==null?void 0:l.optout}),e._zod.parse=(o,l)=>{if(l.direction==="backward")return n.innerType._zod.run(o,l);const c=n.innerType._zod.run(o,l);return c instanceof Promise?c.then(Dh):Dh(c)}});function Dh(e){return e.value=Object.freeze(e.value),e}const I5=le("$ZodLazy",(e,n)=>{lt.init(e,n),Be(e._zod,"innerType",()=>{const o=n;return o._cachedInner||(o._cachedInner=n.getter()),o._cachedInner}),Be(e._zod,"pattern",()=>{var o,l;return(l=(o=e._zod.innerType)==null?void 0:o._zod)==null?void 0:l.pattern}),Be(e._zod,"propValues",()=>{var o,l;return(l=(o=e._zod.innerType)==null?void 0:o._zod)==null?void 0:l.propValues}),Be(e._zod,"optin",()=>{var o,l;return((l=(o=e._zod.innerType)==null?void 0:o._zod)==null?void 0:l.optin)??void 0}),Be(e._zod,"optout",()=>{var o,l;return((l=(o=e._zod.innerType)==null?void 0:o._zod)==null?void 0:l.optout)??void 0}),e._zod.parse=(o,l)=>e._zod.innerType._zod.run(o,l)}),L5=le("$ZodCustom",(e,n)=>{sa.init(e,n),lt.init(e,n),e._zod.parse=(o,l)=>o,e._zod.check=o=>{const l=o.value,c=n.fn(l);if(c instanceof Promise)return c.then(u=>Uh(u,o,l,e));Uh(c,o,l,e)}});function Uh(e,n,o,l){if(!e){const c={code:"custom",input:o,inst:l,path:[...l._zod.def.path??[]],continue:!l._zod.def.abort};l._zod.def.params&&(c.params=l._zod.def.params),n.issues.push(Qo(c))}}var Ih;class V5{constructor(){this._map=new WeakMap,this._idmap=new Map}add(n,...o){const l=o[0];return this._map.set(n,l),l&&typeof l=="object"&&"id"in l&&this._idmap.set(l.id,n),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(n){const o=this._map.get(n);return o&&typeof o=="object"&&"id"in o&&this._idmap.delete(o.id),this._map.delete(n),this}get(n){const o=n._zod.parent;if(o){const l={...this.get(o)??{}};delete l.id;const c={...l,...this._map.get(n)};return Object.keys(c).length?c:void 0}return this._map.get(n)}has(n){return this._map.has(n)}}function B5(){return new V5}(Ih=globalThis).__zod_globalRegistry??(Ih.__zod_globalRegistry=B5());const Jo=globalThis.__zod_globalRegistry;function H5(e,n){return new e({type:"string",...xe(n)})}function q5(e,n){return new e({type:"string",format:"email",check:"string_format",abort:!1,...xe(n)})}function Lh(e,n){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...xe(n)})}function P5(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...xe(n)})}function Z5(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...xe(n)})}function G5(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...xe(n)})}function F5(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...xe(n)})}function s1(e,n){return new e({type:"string",format:"url",check:"string_format",abort:!1,...xe(n)})}function Y5(e,n){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...xe(n)})}function K5(e,n){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...xe(n)})}function J5(e,n){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...xe(n)})}function X5(e,n){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...xe(n)})}function Q5(e,n){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...xe(n)})}function W5(e,n){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...xe(n)})}function e_(e,n){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...xe(n)})}function t_(e,n){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...xe(n)})}function a_(e,n){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...xe(n)})}function n_(e,n){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...xe(n)})}function r_(e,n){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...xe(n)})}function i_(e,n){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...xe(n)})}function o_(e,n){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...xe(n)})}function l_(e,n){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...xe(n)})}function s_(e,n){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...xe(n)})}function c_(e,n){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...xe(n)})}function u_(e,n){return new e({type:"string",format:"date",check:"string_format",...xe(n)})}function d_(e,n){return new e({type:"string",format:"time",check:"string_format",precision:null,...xe(n)})}function f_(e,n){return new e({type:"string",format:"duration",check:"string_format",...xe(n)})}function p_(e,n){return new e({type:"number",checks:[],...xe(n)})}function g_(e,n){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...xe(n)})}function m_(e,n){return new e({type:"boolean",...xe(n)})}function h_(e,n){return new e({type:"null",...xe(n)})}function y_(e){return new e({type:"unknown"})}function v_(e,n){return new e({type:"never",...xe(n)})}function Vh(e,n){return new e1({check:"less_than",...xe(n),value:e,inclusive:!1})}function df(e,n){return new e1({check:"less_than",...xe(n),value:e,inclusive:!0})}function Bh(e,n){return new t1({check:"greater_than",...xe(n),value:e,inclusive:!1})}function ff(e,n){return new t1({check:"greater_than",...xe(n),value:e,inclusive:!0})}function Hh(e,n){return new T4({check:"multiple_of",...xe(n),value:e})}function c1(e,n){return new O4({check:"max_length",...xe(n),maximum:e})}function jc(e,n){return new R4({check:"min_length",...xe(n),minimum:e})}function u1(e,n){return new A4({check:"length_equals",...xe(n),length:e})}function $_(e,n){return new D4({check:"string_format",format:"regex",...xe(n),pattern:e})}function b_(e){return new U4({check:"string_format",format:"lowercase",...xe(e)})}function x_(e){return new I4({check:"string_format",format:"uppercase",...xe(e)})}function __(e,n){return new L4({check:"string_format",format:"includes",...xe(n),includes:e})}function j_(e,n){return new V4({check:"string_format",format:"starts_with",...xe(n),prefix:e})}function S_(e,n){return new B4({check:"string_format",format:"ends_with",...xe(n),suffix:e})}function Zi(e){return new H4({check:"overwrite",tx:e})}function w_(e){return Zi(n=>n.normalize(e))}function k_(){return Zi(e=>e.trim())}function N_(){return Zi(e=>e.toLowerCase())}function z_(){return Zi(e=>e.toUpperCase())}function E_(){return Zi(e=>Ox(e))}function C_(e,n,o){return new e({type:"array",element:n,...xe(o)})}function T_(e,n,o){return new e({type:"custom",check:"custom",fn:n,...xe(o)})}function M_(e,n){const o=O_(l=>(l.addIssue=c=>{if(typeof c=="string")l.issues.push(Qo(c,l.value,o._zod.def));else{const u=c;u.fatal&&(u.continue=!1),u.code??(u.code="custom"),u.input??(u.input=l.value),u.inst??(u.inst=o),u.continue??(u.continue=!o._zod.def.abort),l.issues.push(Qo(u))}},e(l.value,l)),n);return o}function O_(e,n){const o=new sa({check:"custom",...xe(n)});return o._zod.check=e,o}function d1(e){let n=(e==null?void 0:e.target)??"draft-2020-12";return n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),{processors:e.processors??{},metadataRegistry:(e==null?void 0:e.metadata)??Jo,target:n,unrepresentable:(e==null?void 0:e.unrepresentable)??"throw",override:(e==null?void 0:e.override)??(()=>{}),io:(e==null?void 0:e.io)??"output",counter:0,seen:new Map,cycles:(e==null?void 0:e.cycles)??"ref",reused:(e==null?void 0:e.reused)??"inline",external:(e==null?void 0:e.external)??void 0}}function $t(e,n,o={path:[],schemaPath:[]}){var y,v;var l;const c=e._zod.def,u=n.seen.get(e);if(u)return u.count++,o.schemaPath.includes(e)&&(u.cycle=o.path),u.schema;const d={schema:{},count:1,cycle:void 0,path:o.path};n.seen.set(e,d);const p=(v=(y=e._zod).toJSONSchema)==null?void 0:v.call(y);if(p)d.schema=p;else{const j={...o,schemaPath:[...o.schemaPath,e],path:o.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(n,d.schema,j);else{const x=d.schema,E=n.processors[c.type];if(!E)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${c.type}`);E(e,n,x,j)}const k=e._zod.parent;k&&(d.ref||(d.ref=k),$t(k,n,j),n.seen.get(k).isParent=!0)}const g=n.metadataRegistry.get(e);return g&&Object.assign(d.schema,g),n.io==="input"&&Jt(e)&&(delete d.schema.examples,delete d.schema.default),n.io==="input"&&"_prefault"in d.schema&&((l=d.schema).default??(l.default=d.schema._prefault)),delete d.schema._prefault,n.seen.get(e).schema}function f1(e,n){var d,p,g,h;const o=e.seen.get(n);if(!o)throw new Error("Unprocessed schema. This is a bug in Zod.");const l=new Map;for(const y of e.seen.entries()){const v=(d=e.metadataRegistry.get(y[0]))==null?void 0:d.id;if(v){const j=l.get(v);if(j&&j!==y[0])throw new Error(`Duplicate schema id "${v}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);l.set(v,y[0])}}const c=y=>{var E;const v=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const z=(E=e.external.registry.get(y[0]))==null?void 0:E.id,w=e.external.uri??(N=>N);if(z)return{ref:w(z)};const $=y[1].defId??y[1].schema.id??`schema${e.counter++}`;return y[1].defId=$,{defId:$,ref:`${w("__shared")}#/${v}/${$}`}}if(y[1]===o)return{ref:"#"};const k=`#/${v}/`,x=y[1].schema.id??`__schema${e.counter++}`;return{defId:x,ref:k+x}},u=y=>{if(y[1].schema.$ref)return;const v=y[1],{ref:j,defId:k}=c(y);v.def={...v.schema},k&&(v.defId=k);const x=v.schema;for(const E in x)delete x[E];x.$ref=j};if(e.cycles==="throw")for(const y of e.seen.entries()){const v=y[1];if(v.cycle)throw new Error(`Cycle detected: #/${(p=v.cycle)==null?void 0:p.join("/")}/<root>
111
-
112
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const y of e.seen.entries()){const v=y[1];if(n===y[0]){u(y);continue}if(e.external){const k=(g=e.external.registry.get(y[0]))==null?void 0:g.id;if(n!==y[0]&&k){u(y);continue}}if((h=e.metadataRegistry.get(y[0]))==null?void 0:h.id){u(y);continue}if(v.cycle){u(y);continue}if(v.count>1&&e.reused==="ref"){u(y);continue}}}function p1(e,n){var p,g,h,y;const o=e.seen.get(n);if(!o)throw new Error("Unprocessed schema. This is a bug in Zod.");const l=v=>{const j=e.seen.get(v);if(j.ref===null)return;const k=j.def??j.schema,x={...k},E=j.ref;if(j.ref=null,E){l(E);const w=e.seen.get(E),$=w.schema;if($.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(k.allOf=k.allOf??[],k.allOf.push($)):Object.assign(k,$),Object.assign(k,x),v._zod.parent===E)for(const R in k)R==="$ref"||R==="allOf"||R in x||delete k[R];if($.$ref&&w.def)for(const R in k)R==="$ref"||R==="allOf"||R in w.def&&JSON.stringify(k[R])===JSON.stringify(w.def[R])&&delete k[R]}const z=v._zod.parent;if(z&&z!==E){l(z);const w=e.seen.get(z);if(w!=null&&w.schema.$ref&&(k.$ref=w.schema.$ref,w.def))for(const $ in k)$==="$ref"||$==="allOf"||$ in w.def&&JSON.stringify(k[$])===JSON.stringify(w.def[$])&&delete k[$]}e.override({zodSchema:v,jsonSchema:k,path:j.path??[]})};for(const v of[...e.seen.entries()].reverse())l(v[0]);const c={};if(e.target==="draft-2020-12"?c.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?c.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?c.$schema="http://json-schema.org/draft-04/schema#":e.target,(p=e.external)!=null&&p.uri){const v=(g=e.external.registry.get(n))==null?void 0:g.id;if(!v)throw new Error("Schema is missing an `id` property");c.$id=e.external.uri(v)}Object.assign(c,o.def??o.schema);const u=(h=e.metadataRegistry.get(n))==null?void 0:h.id;u!==void 0&&c.id===u&&delete c.id;const d=((y=e.external)==null?void 0:y.defs)??{};for(const v of e.seen.entries()){const j=v[1];j.def&&j.defId&&(j.def.id===j.defId&&delete j.def.id,d[j.defId]=j.def)}e.external||Object.keys(d).length>0&&(e.target==="draft-2020-12"?c.$defs=d:c.definitions=d);try{const v=JSON.parse(JSON.stringify(c));return Object.defineProperty(v,"~standard",{value:{...n["~standard"],jsonSchema:{input:Sc(n,"input",e.processors),output:Sc(n,"output",e.processors)}},enumerable:!1,writable:!1}),v}catch{throw new Error("Error converting schema to JSON.")}}function Jt(e,n){const o=n??{seen:new Set};if(o.seen.has(e))return!1;o.seen.add(e);const l=e._zod.def;if(l.type==="transform")return!0;if(l.type==="array")return Jt(l.element,o);if(l.type==="set")return Jt(l.valueType,o);if(l.type==="lazy")return Jt(l.getter(),o);if(l.type==="promise"||l.type==="optional"||l.type==="nonoptional"||l.type==="nullable"||l.type==="readonly"||l.type==="default"||l.type==="prefault")return Jt(l.innerType,o);if(l.type==="intersection")return Jt(l.left,o)||Jt(l.right,o);if(l.type==="record"||l.type==="map")return Jt(l.keyType,o)||Jt(l.valueType,o);if(l.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:Jt(l.in,o)||Jt(l.out,o);if(l.type==="object"){for(const c in l.shape)if(Jt(l.shape[c],o))return!0;return!1}if(l.type==="union"){for(const c of l.options)if(Jt(c,o))return!0;return!1}if(l.type==="tuple"){for(const c of l.items)if(Jt(c,o))return!0;return!!(l.rest&&Jt(l.rest,o))}return!1}const R_=(e,n={})=>o=>{const l=d1({...o,processors:n});return $t(e,l),f1(l,e),p1(l,e)},Sc=(e,n,o={})=>l=>{const{libraryOptions:c,target:u}=l??{},d=d1({...c??{},target:u,io:n,processors:o});return $t(e,d),f1(d,e),p1(d,e)},A_={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},D_=(e,n,o,l)=>{const c=o;c.type="string";const{minimum:u,maximum:d,format:p,patterns:g,contentEncoding:h}=e._zod.bag;if(typeof u=="number"&&(c.minLength=u),typeof d=="number"&&(c.maxLength=d),p&&(c.format=A_[p]??p,c.format===""&&delete c.format,p==="time"&&delete c.format),h&&(c.contentEncoding=h),g&&g.size>0){const y=[...g];y.length===1?c.pattern=y[0].source:y.length>1&&(c.allOf=[...y.map(v=>({...n.target==="draft-07"||n.target==="draft-04"||n.target==="openapi-3.0"?{type:"string"}:{},pattern:v.source}))])}},U_=(e,n,o,l)=>{const c=o,{minimum:u,maximum:d,format:p,multipleOf:g,exclusiveMaximum:h,exclusiveMinimum:y}=e._zod.bag;typeof p=="string"&&p.includes("int")?c.type="integer":c.type="number";const v=typeof y=="number"&&y>=(u??Number.NEGATIVE_INFINITY),j=typeof h=="number"&&h<=(d??Number.POSITIVE_INFINITY),k=n.target==="draft-04"||n.target==="openapi-3.0";v?k?(c.minimum=y,c.exclusiveMinimum=!0):c.exclusiveMinimum=y:typeof u=="number"&&(c.minimum=u),j?k?(c.maximum=h,c.exclusiveMaximum=!0):c.exclusiveMaximum=h:typeof d=="number"&&(c.maximum=d),typeof g=="number"&&(c.multipleOf=g)},I_=(e,n,o,l)=>{o.type="boolean"},L_=(e,n,o,l)=>{n.target==="openapi-3.0"?(o.type="string",o.nullable=!0,o.enum=[null]):o.type="null"},V_=(e,n,o,l)=>{o.not={}},B_=(e,n,o,l)=>{},H_=(e,n,o,l)=>{const c=e._zod.def,u=qv(c.entries);u.every(d=>typeof d=="number")&&(o.type="number"),u.every(d=>typeof d=="string")&&(o.type="string"),o.enum=u},q_=(e,n,o,l)=>{const c=e._zod.def,u=[];for(const d of c.values)if(d===void 0){if(n.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof d=="bigint"){if(n.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");u.push(Number(d))}else u.push(d);if(u.length!==0)if(u.length===1){const d=u[0];o.type=d===null?"null":typeof d,n.target==="draft-04"||n.target==="openapi-3.0"?o.enum=[d]:o.const=d}else u.every(d=>typeof d=="number")&&(o.type="number"),u.every(d=>typeof d=="string")&&(o.type="string"),u.every(d=>typeof d=="boolean")&&(o.type="boolean"),u.every(d=>d===null)&&(o.type="null"),o.enum=u},P_=(e,n,o,l)=>{if(n.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Z_=(e,n,o,l)=>{if(n.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},G_=(e,n,o,l)=>{const c=o,u=e._zod.def,{minimum:d,maximum:p}=e._zod.bag;typeof d=="number"&&(c.minItems=d),typeof p=="number"&&(c.maxItems=p),c.type="array",c.items=$t(u.element,n,{...l,path:[...l.path,"items"]})},F_=(e,n,o,l)=>{var h;const c=o,u=e._zod.def;c.type="object",c.properties={};const d=u.shape;for(const y in d)c.properties[y]=$t(d[y],n,{...l,path:[...l.path,"properties",y]});const p=new Set(Object.keys(d)),g=new Set([...p].filter(y=>{const v=u.shape[y]._zod;return n.io==="input"?v.optin===void 0:v.optout===void 0}));g.size>0&&(c.required=Array.from(g)),((h=u.catchall)==null?void 0:h._zod.def.type)==="never"?c.additionalProperties=!1:u.catchall?u.catchall&&(c.additionalProperties=$t(u.catchall,n,{...l,path:[...l.path,"additionalProperties"]})):n.io==="output"&&(c.additionalProperties=!1)},Y_=(e,n,o,l)=>{const c=e._zod.def,u=c.inclusive===!1,d=c.options.map((p,g)=>$t(p,n,{...l,path:[...l.path,u?"oneOf":"anyOf",g]}));u?o.oneOf=d:o.anyOf=d},K_=(e,n,o,l)=>{const c=e._zod.def,u=$t(c.left,n,{...l,path:[...l.path,"allOf",0]}),d=$t(c.right,n,{...l,path:[...l.path,"allOf",1]}),p=h=>"allOf"in h&&Object.keys(h).length===1,g=[...p(u)?u.allOf:[u],...p(d)?d.allOf:[d]];o.allOf=g},J_=(e,n,o,l)=>{const c=o,u=e._zod.def;c.type="object";const d=u.keyType,p=d._zod.bag,g=p==null?void 0:p.patterns;if(u.mode==="loose"&&g&&g.size>0){const y=$t(u.valueType,n,{...l,path:[...l.path,"patternProperties","*"]});c.patternProperties={};for(const v of g)c.patternProperties[v.source]=y}else(n.target==="draft-07"||n.target==="draft-2020-12")&&(c.propertyNames=$t(u.keyType,n,{...l,path:[...l.path,"propertyNames"]})),c.additionalProperties=$t(u.valueType,n,{...l,path:[...l.path,"additionalProperties"]});const h=d._zod.values;if(h){const y=[...h].filter(v=>typeof v=="string"||typeof v=="number");y.length>0&&(c.required=y)}},X_=(e,n,o,l)=>{const c=e._zod.def,u=$t(c.innerType,n,l),d=n.seen.get(e);n.target==="openapi-3.0"?(d.ref=c.innerType,o.nullable=!0):o.anyOf=[u,{type:"null"}]},Q_=(e,n,o,l)=>{const c=e._zod.def;$t(c.innerType,n,l);const u=n.seen.get(e);u.ref=c.innerType},W_=(e,n,o,l)=>{const c=e._zod.def;$t(c.innerType,n,l);const u=n.seen.get(e);u.ref=c.innerType,o.default=JSON.parse(JSON.stringify(c.defaultValue))},ej=(e,n,o,l)=>{const c=e._zod.def;$t(c.innerType,n,l);const u=n.seen.get(e);u.ref=c.innerType,n.io==="input"&&(o._prefault=JSON.parse(JSON.stringify(c.defaultValue)))},tj=(e,n,o,l)=>{const c=e._zod.def;$t(c.innerType,n,l);const u=n.seen.get(e);u.ref=c.innerType;let d;try{d=c.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}o.default=d},aj=(e,n,o,l)=>{const c=e._zod.def,u=c.in._zod.traits.has("$ZodTransform"),d=n.io==="input"?u?c.out:c.in:c.out;$t(d,n,l);const p=n.seen.get(e);p.ref=d},nj=(e,n,o,l)=>{const c=e._zod.def;$t(c.innerType,n,l);const u=n.seen.get(e);u.ref=c.innerType,o.readOnly=!0},g1=(e,n,o,l)=>{const c=e._zod.def;$t(c.innerType,n,l);const u=n.seen.get(e);u.ref=c.innerType},rj=(e,n,o,l)=>{const c=e._zod.innerType;$t(c,n,l);const u=n.seen.get(e);u.ref=c},ij=le("ZodISODateTime",(e,n)=>{a5.init(e,n),dt.init(e,n)});function oj(e){return c_(ij,e)}const lj=le("ZodISODate",(e,n)=>{n5.init(e,n),dt.init(e,n)});function sj(e){return u_(lj,e)}const cj=le("ZodISOTime",(e,n)=>{r5.init(e,n),dt.init(e,n)});function uj(e){return d_(cj,e)}const dj=le("ZodISODuration",(e,n)=>{i5.init(e,n),dt.init(e,n)});function fj(e){return f_(dj,e)}const pj=(e,n)=>{Fv.init(e,n),e.name="ZodError",Object.defineProperties(e,{format:{value:o=>Fx(e,o)},flatten:{value:o=>Gx(e,o)},addIssue:{value:o=>{e.issues.push(o),e.message=JSON.stringify(e.issues,Mf,2)}},addIssues:{value:o=>{e.issues.push(...o),e.message=JSON.stringify(e.issues,Mf,2)}},isEmpty:{get(){return e.issues.length===0}}})},Oa=le("ZodError",pj,{Parent:Error}),gj=Jf(Oa),mj=Xf(Oa),hj=Ec(Oa),yj=Cc(Oa),vj=Jx(Oa),$j=Xx(Oa),bj=Qx(Oa),xj=Wx(Oa),_j=e4(Oa),jj=t4(Oa),Sj=a4(Oa),wj=n4(Oa),qh=new WeakMap;function nl(e,n,o){const l=Object.getPrototypeOf(e);let c=qh.get(l);if(c||(c=new Set,qh.set(l,c)),!c.has(n)){c.add(n);for(const u in o){const d=o[u];Object.defineProperty(l,u,{configurable:!0,enumerable:!1,get(){const p=d.bind(this);return Object.defineProperty(this,u,{configurable:!0,writable:!0,enumerable:!0,value:p}),p},set(p){Object.defineProperty(this,u,{configurable:!0,writable:!0,enumerable:!0,value:p})}})}}}const st=le("ZodType",(e,n)=>(lt.init(e,n),Object.assign(e["~standard"],{jsonSchema:{input:Sc(e,"input"),output:Sc(e,"output")}}),e.toJSONSchema=R_(e,{}),e.def=n,e.type=n.type,Object.defineProperty(e,"_def",{value:n}),e.parse=(o,l)=>gj(e,o,l,{callee:e.parse}),e.safeParse=(o,l)=>hj(e,o,l),e.parseAsync=async(o,l)=>mj(e,o,l,{callee:e.parseAsync}),e.safeParseAsync=async(o,l)=>yj(e,o,l),e.spa=e.safeParseAsync,e.encode=(o,l)=>vj(e,o,l),e.decode=(o,l)=>$j(e,o,l),e.encodeAsync=async(o,l)=>bj(e,o,l),e.decodeAsync=async(o,l)=>xj(e,o,l),e.safeEncode=(o,l)=>_j(e,o,l),e.safeDecode=(o,l)=>jj(e,o,l),e.safeEncodeAsync=async(o,l)=>Sj(e,o,l),e.safeDecodeAsync=async(o,l)=>wj(e,o,l),nl(e,"ZodType",{check(...o){const l=this.def;return this.clone(vr(l,{checks:[...l.checks??[],...o.map(c=>typeof c=="function"?{_zod:{check:c,def:{check:"custom"},onattach:[]}}:c)]}),{parent:!0})},with(...o){return this.check(...o)},clone(o,l){return $r(this,o,l)},brand(){return this},register(o,l){return o.add(this,l),this},refine(o,l){return this.check($S(o,l))},superRefine(o,l){return this.check(bS(o,l))},overwrite(o){return this.check(Zi(o))},optional(){return Fh(this)},exactOptional(){return iS(this)},nullable(){return Yh(this)},nullish(){return Fh(Yh(this))},nonoptional(o){return dS(this,o)},array(){return At(this)},or(o){return Ga([this,o])},and(o){return eS(this,o)},transform(o){return Kh(this,nS(o))},default(o){return sS(this,o)},prefault(o){return uS(this,o)},catch(o){return pS(this,o)},pipe(o){return Kh(this,o)},readonly(){return hS(this)},describe(o){const l=this.clone();return Jo.add(l,{description:o}),l},meta(...o){if(o.length===0)return Jo.get(this);const l=this.clone();return Jo.add(l,o[0]),l},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(o){return o(this)}}),Object.defineProperty(e,"description",{get(){var o;return(o=Jo.get(e))==null?void 0:o.description},configurable:!0}),e)),m1=le("_ZodString",(e,n)=>{Qf.init(e,n),st.init(e,n),e._zod.processJSONSchema=(l,c,u)=>D_(e,l,c);const o=e._zod.bag;e.format=o.format??null,e.minLength=o.minimum??null,e.maxLength=o.maximum??null,nl(e,"_ZodString",{regex(...l){return this.check($_(...l))},includes(...l){return this.check(__(...l))},startsWith(...l){return this.check(j_(...l))},endsWith(...l){return this.check(S_(...l))},min(...l){return this.check(jc(...l))},max(...l){return this.check(c1(...l))},length(...l){return this.check(u1(...l))},nonempty(...l){return this.check(jc(1,...l))},lowercase(l){return this.check(b_(l))},uppercase(l){return this.check(x_(l))},trim(){return this.check(k_())},normalize(...l){return this.check(w_(...l))},toLowerCase(){return this.check(N_())},toUpperCase(){return this.check(z_())},slugify(){return this.check(E_())}})}),kj=le("ZodString",(e,n)=>{Qf.init(e,n),m1.init(e,n),e.email=o=>e.check(q5(Nj,o)),e.url=o=>e.check(s1(h1,o)),e.jwt=o=>e.check(s_(Hj,o)),e.emoji=o=>e.check(Y5(zj,o)),e.guid=o=>e.check(Lh(Ph,o)),e.uuid=o=>e.check(P5(Es,o)),e.uuidv4=o=>e.check(Z5(Es,o)),e.uuidv6=o=>e.check(G5(Es,o)),e.uuidv7=o=>e.check(F5(Es,o)),e.nanoid=o=>e.check(K5(Ej,o)),e.guid=o=>e.check(Lh(Ph,o)),e.cuid=o=>e.check(J5(Cj,o)),e.cuid2=o=>e.check(X5(Tj,o)),e.ulid=o=>e.check(Q5(Mj,o)),e.base64=o=>e.check(i_(Lj,o)),e.base64url=o=>e.check(o_(Vj,o)),e.xid=o=>e.check(W5(Oj,o)),e.ksuid=o=>e.check(e_(Rj,o)),e.ipv4=o=>e.check(t_(Aj,o)),e.ipv6=o=>e.check(a_(Dj,o)),e.cidrv4=o=>e.check(n_(Uj,o)),e.cidrv6=o=>e.check(r_(Ij,o)),e.e164=o=>e.check(l_(Bj,o)),e.datetime=o=>e.check(oj(o)),e.date=o=>e.check(sj(o)),e.time=o=>e.check(uj(o)),e.duration=o=>e.check(fj(o))});function Z(e){return H5(kj,e)}const dt=le("ZodStringFormat",(e,n)=>{ut.init(e,n),m1.init(e,n)}),Nj=le("ZodEmail",(e,n)=>{F4.init(e,n),dt.init(e,n)}),Ph=le("ZodGUID",(e,n)=>{Z4.init(e,n),dt.init(e,n)}),Es=le("ZodUUID",(e,n)=>{G4.init(e,n),dt.init(e,n)}),h1=le("ZodURL",(e,n)=>{Y4.init(e,n),dt.init(e,n)});function Cs(e){return s1(h1,e)}const zj=le("ZodEmoji",(e,n)=>{K4.init(e,n),dt.init(e,n)}),Ej=le("ZodNanoID",(e,n)=>{J4.init(e,n),dt.init(e,n)}),Cj=le("ZodCUID",(e,n)=>{X4.init(e,n),dt.init(e,n)}),Tj=le("ZodCUID2",(e,n)=>{Q4.init(e,n),dt.init(e,n)}),Mj=le("ZodULID",(e,n)=>{W4.init(e,n),dt.init(e,n)}),Oj=le("ZodXID",(e,n)=>{e5.init(e,n),dt.init(e,n)}),Rj=le("ZodKSUID",(e,n)=>{t5.init(e,n),dt.init(e,n)}),Aj=le("ZodIPv4",(e,n)=>{o5.init(e,n),dt.init(e,n)}),Dj=le("ZodIPv6",(e,n)=>{l5.init(e,n),dt.init(e,n)}),Uj=le("ZodCIDRv4",(e,n)=>{s5.init(e,n),dt.init(e,n)}),Ij=le("ZodCIDRv6",(e,n)=>{c5.init(e,n),dt.init(e,n)}),Lj=le("ZodBase64",(e,n)=>{u5.init(e,n),dt.init(e,n)}),Vj=le("ZodBase64URL",(e,n)=>{f5.init(e,n),dt.init(e,n)}),Bj=le("ZodE164",(e,n)=>{p5.init(e,n),dt.init(e,n)}),Hj=le("ZodJWT",(e,n)=>{m5.init(e,n),dt.init(e,n)}),y1=le("ZodNumber",(e,n)=>{n1.init(e,n),st.init(e,n),e._zod.processJSONSchema=(l,c,u)=>U_(e,l,c),nl(e,"ZodNumber",{gt(l,c){return this.check(Bh(l,c))},gte(l,c){return this.check(ff(l,c))},min(l,c){return this.check(ff(l,c))},lt(l,c){return this.check(Vh(l,c))},lte(l,c){return this.check(df(l,c))},max(l,c){return this.check(df(l,c))},int(l){return this.check(Zh(l))},safe(l){return this.check(Zh(l))},positive(l){return this.check(Bh(0,l))},nonnegative(l){return this.check(ff(0,l))},negative(l){return this.check(Vh(0,l))},nonpositive(l){return this.check(df(0,l))},multipleOf(l,c){return this.check(Hh(l,c))},step(l,c){return this.check(Hh(l,c))},finite(){return this}});const o=e._zod.bag;e.minValue=Math.max(o.minimum??Number.NEGATIVE_INFINITY,o.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(o.maximum??Number.POSITIVE_INFINITY,o.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(o.format??"").includes("int")||Number.isSafeInteger(o.multipleOf??.5),e.isFinite=!0,e.format=o.format??null});function He(e){return p_(y1,e)}const qj=le("ZodNumberFormat",(e,n)=>{h5.init(e,n),y1.init(e,n)});function Zh(e){return g_(qj,e)}const Pj=le("ZodBoolean",(e,n)=>{y5.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>I_(e,o,l)});function Pt(e){return m_(Pj,e)}const Zj=le("ZodNull",(e,n)=>{v5.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>L_(e,o,l)});function Gj(e){return h_(Zj,e)}const Fj=le("ZodUnknown",(e,n)=>{$5.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>B_()});function Ia(){return y_(Fj)}const Yj=le("ZodNever",(e,n)=>{b5.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>V_(e,o,l)});function Kj(e){return v_(Yj,e)}const Jj=le("ZodArray",(e,n)=>{x5.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>G_(e,o,l,c),e.element=n.element,nl(e,"ZodArray",{min(o,l){return this.check(jc(o,l))},nonempty(o){return this.check(jc(1,o))},max(o,l){return this.check(c1(o,l))},length(o,l){return this.check(u1(o,l))},unwrap(){return this.element}})});function At(e,n){return C_(Jj,e,n)}const Xj=le("ZodObject",(e,n)=>{j5.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>F_(e,o,l,c),Be(e,"shape",()=>n.shape),nl(e,"ZodObject",{keyof(){return gt(Object.keys(this._zod.def.shape))},catchall(o){return this.clone({...this._zod.def,catchall:o})},passthrough(){return this.clone({...this._zod.def,catchall:Ia()})},loose(){return this.clone({...this._zod.def,catchall:Ia()})},strict(){return this.clone({...this._zod.def,catchall:Kj()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(o){return Vx(this,o)},safeExtend(o){return Bx(this,o)},merge(o){return Hx(this,o)},pick(o){return Ix(this,o)},omit(o){return Lx(this,o)},partial(...o){return qx($1,this,o[0])},required(...o){return Px(b1,this,o[0])}})});function de(e,n){const o={type:"object",shape:e??{},...xe(n)};return new Xj(o)}const v1=le("ZodUnion",(e,n)=>{o1.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>Y_(e,o,l,c),e.options=n.options});function Ga(e,n){return new v1({type:"union",options:e,...xe(n)})}const Qj=le("ZodDiscriminatedUnion",(e,n)=>{v1.init(e,n),S5.init(e,n)});function rl(e,n,o){return new Qj({type:"union",options:n,discriminator:e,...xe(o)})}const Wj=le("ZodIntersection",(e,n)=>{w5.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>K_(e,o,l,c)});function eS(e,n){return new Wj({type:"intersection",left:e,right:n})}const Gh=le("ZodRecord",(e,n)=>{k5.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>J_(e,o,l,c),e.keyType=n.keyType,e.valueType=n.valueType});function mt(e,n,o){return!n||!n._zod?new Gh({type:"record",keyType:Z(),valueType:e,...xe(n)}):new Gh({type:"record",keyType:e,valueType:n,...xe(o)})}const Rf=le("ZodEnum",(e,n)=>{N5.init(e,n),st.init(e,n),e._zod.processJSONSchema=(l,c,u)=>H_(e,l,c),e.enum=n.entries,e.options=Object.values(n.entries);const o=new Set(Object.keys(n.entries));e.extract=(l,c)=>{const u={};for(const d of l)if(o.has(d))u[d]=n.entries[d];else throw new Error(`Key ${d} not found in enum`);return new Rf({...n,checks:[],...xe(c),entries:u})},e.exclude=(l,c)=>{const u={...n.entries};for(const d of l)if(o.has(d))delete u[d];else throw new Error(`Key ${d} not found in enum`);return new Rf({...n,checks:[],...xe(c),entries:u})}});function gt(e,n){const o=Array.isArray(e)?Object.fromEntries(e.map(l=>[l,l])):e;return new Rf({type:"enum",entries:o,...xe(n)})}const tS=le("ZodLiteral",(e,n)=>{z5.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>q_(e,o,l),e.values=new Set(n.values),Object.defineProperty(e,"value",{get(){if(n.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return n.values[0]}})});function Fe(e,n){return new tS({type:"literal",values:Array.isArray(e)?e:[e],...xe(n)})}const aS=le("ZodTransform",(e,n)=>{E5.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>Z_(e,o),e._zod.parse=(o,l)=>{if(l.direction==="backward")throw new Hv(e.constructor.name);o.addIssue=u=>{if(typeof u=="string")o.issues.push(Qo(u,o.value,n));else{const d=u;d.fatal&&(d.continue=!1),d.code??(d.code="custom"),d.input??(d.input=o.value),d.inst??(d.inst=e),o.issues.push(Qo(d))}};const c=n.transform(o.value,o);return c instanceof Promise?c.then(u=>(o.value=u,o.fallback=!0,o)):(o.value=c,o.fallback=!0,o)}});function nS(e){return new aS({type:"transform",transform:e})}const $1=le("ZodOptional",(e,n)=>{l1.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>g1(e,o,l,c),e.unwrap=()=>e._zod.def.innerType});function Fh(e){return new $1({type:"optional",innerType:e})}const rS=le("ZodExactOptional",(e,n)=>{C5.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>g1(e,o,l,c),e.unwrap=()=>e._zod.def.innerType});function iS(e){return new rS({type:"optional",innerType:e})}const oS=le("ZodNullable",(e,n)=>{T5.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>X_(e,o,l,c),e.unwrap=()=>e._zod.def.innerType});function Yh(e){return new oS({type:"nullable",innerType:e})}const lS=le("ZodDefault",(e,n)=>{M5.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>W_(e,o,l,c),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function sS(e,n){return new lS({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():Zv(n)}})}const cS=le("ZodPrefault",(e,n)=>{O5.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>ej(e,o,l,c),e.unwrap=()=>e._zod.def.innerType});function uS(e,n){return new cS({type:"prefault",innerType:e,get defaultValue(){return typeof n=="function"?n():Zv(n)}})}const b1=le("ZodNonOptional",(e,n)=>{R5.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>Q_(e,o,l,c),e.unwrap=()=>e._zod.def.innerType});function dS(e,n){return new b1({type:"nonoptional",innerType:e,...xe(n)})}const fS=le("ZodCatch",(e,n)=>{A5.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>tj(e,o,l,c),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function pS(e,n){return new fS({type:"catch",innerType:e,catchValue:typeof n=="function"?n:()=>n})}const gS=le("ZodPipe",(e,n)=>{D5.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>aj(e,o,l,c),e.in=n.in,e.out=n.out});function Kh(e,n){return new gS({type:"pipe",in:e,out:n})}const mS=le("ZodReadonly",(e,n)=>{U5.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>nj(e,o,l,c),e.unwrap=()=>e._zod.def.innerType});function hS(e){return new mS({type:"readonly",innerType:e})}const yS=le("ZodLazy",(e,n)=>{I5.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>rj(e,o,l,c),e.unwrap=()=>e._zod.def.getter()});function x1(e){return new yS({type:"lazy",getter:e})}const vS=le("ZodCustom",(e,n)=>{L5.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>P_(e,o)});function $S(e,n={}){return T_(vS,e,n)}function bS(e,n){return M_(e,n)}const _1="@ggui-ai/gadgets",xS="0.10.0",_S=[{package:_1,version:xS,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"}}}}]}];Object.freeze(new Set(_S.flatMap(e=>e.exports).map(e=>e.hook).filter(e=>e!==void 0)));const Wf=/^use[A-Z][A-Za-z0-9]*$/,ep=/^[A-Z][A-Za-z0-9]*$/,tp=["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(tp);const bt=x1(()=>Ga([Z(),He(),Pt(),Gj(),At(bt),mt(Z(),bt)])),Jh=gt(["string","number","integer","boolean","array","object","null"]),$n=x1(()=>de({type:Ga([Jh,At(Jh)]).optional(),description:Z().optional(),enum:At(bt).optional(),default:bt.optional(),example:bt.optional(),items:$n.optional(),properties:mt(Z(),$n).optional(),required:At(Z()).optional(),additionalProperties:Ga([$n,Pt()]).optional(),format:Z().optional()}).passthrough()),jS=de({description:Z().optional(),schema:$n,required:Pt().optional(),default:bt.optional(),example:bt.optional(),sourceTool:Z().optional()}).strict(),SS=de({description:Z().optional(),properties:mt(Z(),jS)}).strict(),wS=de({description:Z().optional(),label:Z(),schema:$n.optional(),example:bt.optional(),icon:Z().optional(),confirm:Pt().optional(),nextStep:Z().min(1).optional()}).strict(),kS=mt(Z(),wS),NS=de({description:Z().optional(),schema:$n,example:bt.optional(),mode:gt(["append","replace"]).optional(),replay:gt(["latest","all","none"]).optional(),complete:Pt().optional(),source:de({tool:Z(),args:mt(Z(),bt).optional()}).strict().optional()}).strict(),zS=mt(Z(),NS),ES=de({description:Z().optional(),schema:$n,default:bt.optional(),debounceMs:He().int().nonnegative().optional(),example:bt.optional()}).strict(),CS=mt(Z(),ES),TS=de({serverInfo:de({name:Z(),version:Z().optional()}).strict().optional(),toolInfo:de({inputSchema:$n,description:Z().optional(),outputSchema:$n.optional()}).strict(),usage:Z().optional(),example:de({input:bt,output:bt}).strict().optional()}).strict(),MS=de({tools:mt(Z(),TS)}).passthrough(),j1=/^GGUI_PUBLIC_APP_[A-Z0-9_]+$/,OS=At(Z().regex(j1)).readonly(),Xh=/^sha384-[A-Za-z0-9+/]+=*$/,S1=/^(?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*$/,RS=/^\d+\.\d+\.\d+(-[\w.]+)?(\+[\w.]+)?$/,AS=/^[a-z0-9.-]+(:\d+)?$/,w1={gotchas:Z().optional()},Qh={...w1,description:Z().optional(),usage:Z().optional(),example:bt.optional(),permission:Z().optional()},Wh={...w1,description:Z().min(1),usage:Z().min(1),example:bt,permission:gt(tp).optional()},k1={version:Z().regex(RS),package:Z().regex(S1),bundleUrl:Cs().optional(),bundleHost:Z().regex(AS).optional(),bundleSri:Z().regex(Xh).optional(),styleUrl:Cs().optional(),connect:At(Cs()).readonly().optional(),requires:OS.optional(),typesUrl:Cs().optional(),typesSri:Z().regex(Xh).optional()},DS=Ga([de({hook:Z().regex(Wf),...Qh}).strict(),de({component:Z().regex(ep),...Qh}).strict()]),US=Ga([de({hook:Z().regex(Wf),...Wh}).strict(),de({component:Z().regex(ep),...Wh}).strict()]);de({...k1,exports:At(DS).min(1)}).strict();const IS=de({...k1,exports:At(US).min(1)}).strict();IS.refine(e=>e.package===_1||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"]});const LS=de({description:Z().optional(),usage:Z().optional()}).strict(),VS=mt(Z().refine(e=>Wf.test(e)||ep.test(e),{message:"gadget export name must be a `use`-prefixed hook or a PascalCase component identifier"}),LS).refine(e=>Object.keys(e).length>0,{message:"a `clientCapabilities.gadgets` package entry must declare at least one export"}),BS=de({gadgets:mt(Z().regex(S1),VS)}).strict();mt(Z().regex(j1),Z()).readonly();const il=de({propsSpec:SS.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:kS.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:CS.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:MS.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:BS.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(),N1=de({kind:Fe("llm"),generator:Z().min(1),model:Z().min(1)}).strict(),z1=de({kind:Fe("user")}).strict(),HS=de({kind:Fe("curated")}).strict(),E1=Ga([N1,z1,HS]),qS=["persona","aesthetic","context","seedPrompt"],ol=de({persona:Z().optional().describe('Design persona, e.g. "minimalist" / "data-dense". Part of cache identity.'),aesthetic:Z().optional().describe('Visual aesthetic, e.g. "calm" / "ornate". Part of cache identity.'),context:mt(Z(),bt).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:Z().optional().describe("Generation seed directive. Part of cache identity.")},{error:e=>e.code==="unrecognized_keys"?`variance: unknown key(s) ${e.keys.map(n=>JSON.stringify(n)).join(", ")} — variance is EXACTLY {${qS.join(", ")}}; put tonal intent in \`aesthetic\`, and per-user runtime data in props / contextSpec, never in variance`:void 0}).strict(),PS=de({blueprintId:Z().min(1),contractHash:Z().min(1),appId:Z().min(1),codeS3Url:Z().optional(),codeHash:Z().optional(),source:E1,validatorScore:He().min(0).max(1).optional(),variance:ol,isOperatorDefault:Fe(!0).optional(),createdAt:Z().min(1),createdBy:gt(["agent","operator"]),contract:il,contractEmbedding:At(He()).optional()}).strict(),ZS=de({hash:He().min(0).optional(),embed:He().min(0).optional(),struct:He().min(0).optional(),variance:He().min(0).optional(),intent:He().min(0).optional()}).strict();de({weights:ZS.optional(),threshold:He().min(0).max(1).optional(),topK:He().int().min(1).optional()}).strict();const GS=gt(["cache","agent","synth"]),FS=Ga([de({op:Fe("add"),path:Z(),value:bt}).strict(),de({op:Fe("remove"),path:Z()}).strict(),de({op:Fe("replace"),path:Z(),value:bt}).strict()]),YS=At(FS),KS=["contract","variance","generator"],JS=de({contract:il,variance:ol.optional(),generator:Z().optional()},{error:e=>e.code==="unrecognized_keys"?`blueprintDraft: unknown key(s) ${e.keys.map(n=>JSON.stringify(n)).join(", ")} — a draft is EXACTLY {${KS.join(", ")}}; \`intent\` is a top-level ggui_handshake field, not a draft field, and the four specs live INSIDE \`contract\``:void 0}).strict(),XS=JS,QS=de({blueprintId:Z().min(1).optional(),contractHash:Z().min(1),codeHash:Z().optional(),source:E1.optional(),variance:ol,selectedReason:Z().optional()}).strict(),WS=de({code:Z().min(1),severity:gt(["error","warn"]),path:Z(),message:Z()}).strict(),e3=de({contractDiff:YS,reasoning:Z()}).strict(),t3=de({origin:GS,rationale:Z(),blueprintMeta:QS,proposedContractSummary:Z().optional(),amendments:e3.optional(),validationFindings:At(WS).optional()}).strict(),a3=de({width:He(),height:He()}),n3=de({viewport:a3,platform:gt(["web","mobile","desktop"]),deviceType:gt(["phone","tablet","desktop"]),orientation:gt(["portrait","landscape"]),devicePixelRatio:He().optional(),touchPrimary:Pt().optional(),shellType:gt(["chat","fullscreen","spatial"]).optional(),colorScheme:gt(["light","dark"]).optional(),reducedMotion:Pt().optional()}).passthrough(),r3={sessionId:Z().min(1).describe("Globally-unique sessionId to consume events from. Cross-tenant access surfaces uniformly as session_not_found."),timeout:He().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.")};de(r3);const i3={sessionId:Z().min(1),channel:Z().min(1),payload:Ia(),complete:Pt().optional()};de(i3);const o3={sessionId:Z().min(1).describe("GguiSession opaque id (UUID) — returned by ggui_render.")};de(o3);const l3={sessionId:Z().min(1).describe("GguiSession opaque id (UUID) — returned by ggui_render.")};de(l3);const s3={};de(s3);const c3={query:Z().min(1).describe("Natural-language description of the UI you're looking for"),limit:He().int().min(1).max(100).optional(),tool:Z().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:Z().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.")};de(c3);const u3={blueprintId:Z().min(1).describe("The stable blueprint id declared via ggui.ui.json#id. Must match an entry in this server's UI registry.")};de(u3);const d3={};de(d3);de({intent:Z().min(1).describe('Concise purpose — same intent = same component reused. e.g. "Gmail inbox for email triage"'),blueprintDraft:XS.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:Pt().optional()}).strict();de({handshakeId:Z().describe("Stable id — pass to ggui_render / ggui_update"),action:gt(["create","reuse","update","replace","declined"]),suggestion:t3.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:Z().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:de({tool:Fe("ggui_render"),description:Z(),example:Z()}).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.")});const f3={handshakeId:Z({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:mt(Z(),Ia()),themeId:Z().min(1).optional().describe("Per-render theme override. Wins over App.defaultThemeId for THIS render. Omit to inherit the app theme."),infra:de({model:Z().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:de({contract:il.optional().describe("STRICT full re-draft of the contract — must already conform; the server will not repair it."),variance:ol.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).")};de(f3);const p3=de({hit:Pt().describe("True when a stored component was served without generating new code."),similarity:He().optional().describe("Cosine similarity of the matched component to the request (semantic match only)."),cachedBlueprintId:Z().optional().describe("The stored component id that was matched. Equals top-level blueprintId on a hit."),llmCallsAvoided:He().describe("Generation calls skipped by serving the stored component (0 on a fresh generation)."),kind:gt(["full-template","cold"]).optional().describe("full-template = a whole stored component was served; cold = freshly generated."),reason:Z().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.")}),g3=gt(["PRODUCTION_FAILED","VALIDATION_ERROR","NO_PLATFORM_KEY","NO_CREDENTIALS","GENERATION_QUEUE_OVERLOADED"]),m3=de({code:g3.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:Z().describe("Human-readable failure detail — fold into the next attempt or surface to the operator.")}),h3=gt(["NOT_FOUND","BLUEPRINT_UNRESOLVABLE","NOT_SUPPORTED","NOT_MOUNTABLE"]);de({code:h3.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:Z().describe("Human-readable failure detail. Replaced by a constant on NOT_FOUND."),detail:Z().optional().describe("Extra diagnostic context for operators. Dropped on NOT_FOUND so a denied read cannot be told apart from a miss.")});de({sessionId:Z(),resourceUri:Z().optional().describe("MCP-Apps mount URI (ui://ggui/render/{id}). Present iff the render is mountable; absent on a failed render."),action:gt(["create","reuse","update","replace","declined"]),contractHash:Z().describe("Canonical hash of the rendered data contract (shape only — fields, types, specs). Same hash ⟺ same data flow."),blueprintId:Z().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:Z().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:p3.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:m3.optional().describe("Present iff the tool result is isError — canonical {code, message} for a failed/rejected generation. Absent on success."),nextStep:de({tool:Fe("ggui_consume"),description:Z(),example:Z(),args:de({sessionId:Z(),timeout:He()})}).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.")});rl("kind",[de({sessionId:Z().describe("GguiSession opaque id (UUID) — returned by ggui_render."),kind:Fe("replace"),props:mt(Z(),Ia()).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(),de({sessionId:Z().describe("GguiSession opaque id (UUID) — returned by ggui_render."),kind:Fe("merge"),patch:mt(Z(),Ia()).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()]);rl("kind",[de({sessionId:Z().describe("GguiSession opaque id (UUID) — returned by ggui_render."),kind:Fe("replace"),props:mt(Z(),Ia()).describe("Full replacement props map, applied to the currently mounted card in place.")}).strict(),de({sessionId:Z().describe("GguiSession opaque id (UUID) — returned by ggui_render."),kind:Fe("merge"),patch:mt(Z(),Ia()).describe("RFC 7396 JSON Merge Patch — null deletes a key; arrays fully replace. Applied to the currently mounted card in place.")}).strict()]);de({sessionId:Z(),updated:Pt(),resourceUri:Z(),epoch:He().int().min(0),warning:Z().optional()});de({sessionId:Z(),updated:Pt(),resourceUri:Z(),warning:Z().optional()});de({toolCatalog:mt(Z(),de({name:Z(),version:Z().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();de({saved:Pt(),appId:Z()}).strict();const pf=100,ey=20,y3=de({seq:He().int().min(1).describe('Monotonic, gap-free per render; starts at 1 (0 is the "no events yet" cursor sentinel, never an event).'),type:Z().min(1).describe("Wire-frame type — see the canonical GguiSessionEventType taxonomy; plain string so servers can mint new types without a protocol bump."),timestamp:Z().describe("ISO 8601 UTC timestamp the server stamped on emission."),data:Ia().describe("Type-specific payload — structurally identical to the matching live-channel frame payload.")}),v3={sessionId:Z().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:He().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:He().int().min(1).optional().describe(`Max events per page. Values above ${pf} are clamped to ${pf}; omit for the default ${pf}. When hasMore is true, immediately re-pull with the advanced cursor.`),wait:He().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 ${ey} are clamped to ${ey}). 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.`)};de(v3);const $3=de({events:At(y3),lastSequence:He().int().min(0),hasMore:Pt()}),b3=de({reason:Fe("REPLAY_HORIZON_PASSED"),currentSequence:He().int().min(0)});Ga([$3,b3]);const x3=40,_3={sessionId:Z().min(1).describe("Render id the report concerns — sourced from the boot envelope. Client-claimed: used as a log tag only."),events:At(de({at:He().min(0).describe("Milliseconds since iframe boot (monotonic, client clock)."),kind:Z().min(1).max(64).describe("Event name — e.g. 'boot.path', 'status.connected', 'channel_failover_swap', 'doorbell.ring'."),detail:Z().max(512).optional().describe("Optional compact context (JSON fragment or message).")})).min(1).max(x3).describe("Batched ladder/doorbell events, oldest first.")};de(_3);de({ok:Fe(!0)});const j3=de({type:Fe("text"),text:Z()}),S3=de({type:Fe("tool_use"),id:Z(),name:Z(),input:mt(Z(),Ia())}),w3=de({type:Fe("tool_result"),tool_use_id:Z(),content:Ia(),is_error:Pt().optional()}),C1=rl("type",[j3,S3,w3]),k3=de({type:Fe("text_delta"),text:Z()}),N3=de({type:Fe("input_json_delta"),partial_json:Z()}),z3=rl("type",[k3,N3]),E3=de({type:Fe("message_start"),message:de({id:Z(),role:Fe("assistant"),model:Z().optional()})}),C3=de({type:Fe("content_block_start"),index:He().int().nonnegative(),content_block:C1}),T3=de({type:Fe("content_block_delta"),index:He().int().nonnegative(),delta:z3}),M3=de({type:Fe("content_block_stop"),index:He().int().nonnegative()}),O3=de({type:Fe("message_delta"),delta:de({stop_reason:gt(["end_turn","max_tokens","tool_use","error"]),stop_sequence:Z().nullable().optional()}),usage:de({input_tokens:He().int().nonnegative(),output_tokens:He().int().nonnegative()})}),R3=de({type:Fe("message_stop")}),A3=de({type:Fe("ping")}),D3=gt(["invalid_request","unauthorized","rate_limited","invoke_in_progress","upstream_error","tool_error","internal"]),U3=de({type:Fe("error"),error:de({code:D3,message:Z(),retryAfterMs:He().int().nonnegative().optional()})});rl("type",[E3,C3,T3,M3,O3,R3,A3,U3]);const I3=de({role:gt(["user","assistant"]),content:Ga([Z(),At(C1)])});de({message:Z(),history:At(I3).optional(),interfaceContext:n3.optional(),requestId:Z().optional()});const L3=/^--ggui-[a-zA-Z0-9-]+$/,V3=/^[^;{}<>@]*$/,B3=Z().min(1).max(256).regex(V3,"css value contains a disallowed character").refine(e=>!e.includes("/*"),"css value may not contain a comment");de({mode:gt(["light","dark"]),cssVariables:mt(Z().regex(L3,"css var key must be --ggui-*"),B3).refine(e=>Object.keys(e).length<=200,"too many css variables (max 200)"),name:Z().min(1).max(64).optional()}).strict();var Ts={exports:{}},gf={},mn={},Vr={},mf={},hf={},yf={},ty;function wc(){return ty||(ty=1,(function(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;class n{}e._CodeOrName=n,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class o extends n{constructor($){if(super(),!e.IDENTIFIER.test($))throw new Error("CodeGen: name must be a valid identifier");this.str=$}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=o;class l extends n{constructor($){super(),this._items=typeof $=="string"?[$]:$}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const $=this._items[0];return $===""||$==='""'}get str(){var $;return($=this._str)!==null&&$!==void 0?$:this._str=this._items.reduce((N,R)=>`${N}${R}`,"")}get names(){var $;return($=this._names)!==null&&$!==void 0?$:this._names=this._items.reduce((N,R)=>(R instanceof o&&(N[R.str]=(N[R.str]||0)+1),N),{})}}e._Code=l,e.nil=new l("");function c(w,...$){const N=[w[0]];let R=0;for(;R<$.length;)p(N,$[R]),N.push(w[++R]);return new l(N)}e._=c;const u=new l("+");function d(w,...$){const N=[k(w[0])];let R=0;for(;R<$.length;)N.push(u),p(N,$[R]),N.push(u,k(w[++R]));return g(N),new l(N)}e.str=d;function p(w,$){$ instanceof l?w.push(...$._items):$ instanceof o?w.push($):w.push(v($))}e.addCodeArg=p;function g(w){let $=1;for(;$<w.length-1;){if(w[$]===u){const N=h(w[$-1],w[$+1]);if(N!==void 0){w.splice($-1,3,N);continue}w[$++]="+"}$++}}function h(w,$){if($==='""')return w;if(w==='""')return $;if(typeof w=="string")return $ instanceof o||w[w.length-1]!=='"'?void 0:typeof $!="string"?`${w.slice(0,-1)}${$}"`:$[0]==='"'?w.slice(0,-1)+$.slice(1):void 0;if(typeof $=="string"&&$[0]==='"'&&!(w instanceof o))return`"${w}${$.slice(1)}`}function y(w,$){return $.emptyStr()?w:w.emptyStr()?$:d`${w}${$}`}e.strConcat=y;function v(w){return typeof w=="number"||typeof w=="boolean"||w===null?w:k(Array.isArray(w)?w.join(","):w)}function j(w){return new l(k(w))}e.stringify=j;function k(w){return JSON.stringify(w).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=k;function x(w){return typeof w=="string"&&e.IDENTIFIER.test(w)?new l(`.${w}`):c`[${w}]`}e.getProperty=x;function E(w){if(typeof w=="string"&&e.IDENTIFIER.test(w))return new l(`${w}`);throw new Error(`CodeGen: invalid export name: ${w}, use explicit $id name mapping`)}e.getEsmExportName=E;function z(w){return new l(w.toString())}e.regexpCode=z})(yf)),yf}var vf={},ay;function ny(){return ay||(ay=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const n=wc();class o extends Error{constructor(h){super(`CodeGen: "code" for ${h} not defined`),this.value=h.value}}var l;(function(g){g[g.Started=0]="Started",g[g.Completed=1]="Completed"})(l||(e.UsedValueState=l={})),e.varKinds={const:new n.Name("const"),let:new n.Name("let"),var:new n.Name("var")};class c{constructor({prefixes:h,parent:y}={}){this._names={},this._prefixes=h,this._parent=y}toName(h){return h instanceof n.Name?h:this.name(h)}name(h){return new n.Name(this._newName(h))}_newName(h){const y=this._names[h]||this._nameGroup(h);return`${h}${y.index++}`}_nameGroup(h){var y,v;if(!((v=(y=this._parent)===null||y===void 0?void 0:y._prefixes)===null||v===void 0)&&v.has(h)||this._prefixes&&!this._prefixes.has(h))throw new Error(`CodeGen: prefix "${h}" is not allowed in this scope`);return this._names[h]={prefix:h,index:0}}}e.Scope=c;class u extends n.Name{constructor(h,y){super(y),this.prefix=h}setValue(h,{property:y,itemIndex:v}){this.value=h,this.scopePath=(0,n._)`.${new n.Name(y)}[${v}]`}}e.ValueScopeName=u;const d=(0,n._)`\n`;class p extends c{constructor(h){super(h),this._values={},this._scope=h.scope,this.opts={...h,_n:h.lines?d:n.nil}}get(){return this._scope}name(h){return new u(h,this._newName(h))}value(h,y){var v;if(y.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const j=this.toName(h),{prefix:k}=j,x=(v=y.key)!==null&&v!==void 0?v:y.ref;let E=this._values[k];if(E){const $=E.get(x);if($)return $}else E=this._values[k]=new Map;E.set(x,j);const z=this._scope[k]||(this._scope[k]=[]),w=z.length;return z[w]=y.ref,j.setValue(y,{property:k,itemIndex:w}),j}getValue(h,y){const v=this._values[h];if(v)return v.get(y)}scopeRefs(h,y=this._values){return this._reduceValues(y,v=>{if(v.scopePath===void 0)throw new Error(`CodeGen: name "${v}" has no value`);return(0,n._)`${h}${v.scopePath}`})}scopeCode(h=this._values,y,v){return this._reduceValues(h,j=>{if(j.value===void 0)throw new Error(`CodeGen: name "${j}" has no value`);return j.value.code},y,v)}_reduceValues(h,y,v={},j){let k=n.nil;for(const x in h){const E=h[x];if(!E)continue;const z=v[x]=v[x]||new Map;E.forEach(w=>{if(z.has(w))return;z.set(w,l.Started);let $=y(w);if($){const N=this.opts.es5?e.varKinds.var:e.varKinds.const;k=(0,n._)`${k}${N} ${w} = ${$};${this.opts._n}`}else if($=j==null?void 0:j(w))k=(0,n._)`${k}${$}${this.opts._n}`;else throw new o(w);z.set(w,l.Completed)})}return k}}e.ValueScope=p})(vf)),vf}var ry;function Re(){return ry||(ry=1,(function(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;const n=wc(),o=ny();var l=wc();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return l.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return l.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return l.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return l.Name}});var c=ny();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return c.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return c.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return c.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return c.varKinds}}),e.operators={GT:new n._Code(">"),GTE:new n._Code(">="),LT:new n._Code("<"),LTE:new n._Code("<="),EQ:new n._Code("==="),NEQ:new n._Code("!=="),NOT:new n._Code("!"),OR:new n._Code("||"),AND:new n._Code("&&"),ADD:new n._Code("+")};class u{optimizeNodes(){return this}optimizeNames(O,A){return this}}class d extends u{constructor(O,A,J){super(),this.varKind=O,this.name=A,this.rhs=J}render({es5:O,_n:A}){const J=O?o.varKinds.var:this.varKind,pe=this.rhs===void 0?"":` = ${this.rhs}`;return`${J} ${this.name}${pe};`+A}optimizeNames(O,A){if(O[this.name.str])return this.rhs&&(this.rhs=ie(this.rhs,O,A)),this}get names(){return this.rhs instanceof n._CodeOrName?this.rhs.names:{}}}class p extends u{constructor(O,A,J){super(),this.lhs=O,this.rhs=A,this.sideEffects=J}render({_n:O}){return`${this.lhs} = ${this.rhs};`+O}optimizeNames(O,A){if(!(this.lhs instanceof n.Name&&!O[this.lhs.str]&&!this.sideEffects))return this.rhs=ie(this.rhs,O,A),this}get names(){const O=this.lhs instanceof n.Name?{}:{...this.lhs.names};return F(O,this.rhs)}}class g extends p{constructor(O,A,J,pe){super(O,J,pe),this.op=A}render({_n:O}){return`${this.lhs} ${this.op}= ${this.rhs};`+O}}class h extends u{constructor(O){super(),this.label=O,this.names={}}render({_n:O}){return`${this.label}:`+O}}class y extends u{constructor(O){super(),this.label=O,this.names={}}render({_n:O}){return`break${this.label?` ${this.label}`:""};`+O}}class v extends u{constructor(O){super(),this.error=O}render({_n:O}){return`throw ${this.error};`+O}get names(){return this.error.names}}class j extends u{constructor(O){super(),this.code=O}render({_n:O}){return`${this.code};`+O}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(O,A){return this.code=ie(this.code,O,A),this}get names(){return this.code instanceof n._CodeOrName?this.code.names:{}}}class k extends u{constructor(O=[]){super(),this.nodes=O}render(O){return this.nodes.reduce((A,J)=>A+J.render(O),"")}optimizeNodes(){const{nodes:O}=this;let A=O.length;for(;A--;){const J=O[A].optimizeNodes();Array.isArray(J)?O.splice(A,1,...J):J?O[A]=J:O.splice(A,1)}return O.length>0?this:void 0}optimizeNames(O,A){const{nodes:J}=this;let pe=J.length;for(;pe--;){const he=J[pe];he.optimizeNames(O,A)||(_e(O,he.names),J.splice(pe,1))}return J.length>0?this:void 0}get names(){return this.nodes.reduce((O,A)=>Y(O,A.names),{})}}class x extends k{render(O){return"{"+O._n+super.render(O)+"}"+O._n}}class E extends k{}class z extends x{}z.kind="else";class w extends x{constructor(O,A){super(A),this.condition=O}render(O){let A=`if(${this.condition})`+super.render(O);return this.else&&(A+="else "+this.else.render(O)),A}optimizeNodes(){super.optimizeNodes();const O=this.condition;if(O===!0)return this.nodes;let A=this.else;if(A){const J=A.optimizeNodes();A=this.else=Array.isArray(J)?new z(J):J}if(A)return O===!1?A instanceof w?A:A.nodes:this.nodes.length?this:new w(ae(O),A instanceof w?[A]:A.nodes);if(!(O===!1||!this.nodes.length))return this}optimizeNames(O,A){var J;if(this.else=(J=this.else)===null||J===void 0?void 0:J.optimizeNames(O,A),!!(super.optimizeNames(O,A)||this.else))return this.condition=ie(this.condition,O,A),this}get names(){const O=super.names;return F(O,this.condition),this.else&&Y(O,this.else.names),O}}w.kind="if";class $ extends x{}$.kind="for";class N extends ${constructor(O){super(),this.iteration=O}render(O){return`for(${this.iteration})`+super.render(O)}optimizeNames(O,A){if(super.optimizeNames(O,A))return this.iteration=ie(this.iteration,O,A),this}get names(){return Y(super.names,this.iteration.names)}}class R extends ${constructor(O,A,J,pe){super(),this.varKind=O,this.name=A,this.from=J,this.to=pe}render(O){const A=O.es5?o.varKinds.var:this.varKind,{name:J,from:pe,to:he}=this;return`for(${A} ${J}=${pe}; ${J}<${he}; ${J}++)`+super.render(O)}get names(){const O=F(super.names,this.from);return F(O,this.to)}}class _ extends ${constructor(O,A,J,pe){super(),this.loop=O,this.varKind=A,this.name=J,this.iterable=pe}render(O){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(O)}optimizeNames(O,A){if(super.optimizeNames(O,A))return this.iterable=ie(this.iterable,O,A),this}get names(){return Y(super.names,this.iterable.names)}}class S extends x{constructor(O,A,J){super(),this.name=O,this.args=A,this.async=J}render(O){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(O)}}S.kind="func";class C extends k{render(O){return"return "+super.render(O)}}C.kind="return";class U extends x{render(O){let A="try"+super.render(O);return this.catch&&(A+=this.catch.render(O)),this.finally&&(A+=this.finally.render(O)),A}optimizeNodes(){var O,A;return super.optimizeNodes(),(O=this.catch)===null||O===void 0||O.optimizeNodes(),(A=this.finally)===null||A===void 0||A.optimizeNodes(),this}optimizeNames(O,A){var J,pe;return super.optimizeNames(O,A),(J=this.catch)===null||J===void 0||J.optimizeNames(O,A),(pe=this.finally)===null||pe===void 0||pe.optimizeNames(O,A),this}get names(){const O=super.names;return this.catch&&Y(O,this.catch.names),this.finally&&Y(O,this.finally.names),O}}class te extends x{constructor(O){super(),this.error=O}render(O){return`catch(${this.error})`+super.render(O)}}te.kind="catch";class G extends x{render(O){return"finally"+super.render(O)}}G.kind="finally";class H{constructor(O,A={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...A,_n:A.lines?`
113
- `:""},this._extScope=O,this._scope=new o.Scope({parent:O}),this._nodes=[new E]}toString(){return this._root.render(this.opts)}name(O){return this._scope.name(O)}scopeName(O){return this._extScope.name(O)}scopeValue(O,A){const J=this._extScope.value(O,A);return(this._values[J.prefix]||(this._values[J.prefix]=new Set)).add(J),J}getScopeValue(O,A){return this._extScope.getValue(O,A)}scopeRefs(O){return this._extScope.scopeRefs(O,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(O,A,J,pe){const he=this._scope.toName(A);return J!==void 0&&pe&&(this._constants[he.str]=J),this._leafNode(new d(O,he,J)),he}const(O,A,J){return this._def(o.varKinds.const,O,A,J)}let(O,A,J){return this._def(o.varKinds.let,O,A,J)}var(O,A,J){return this._def(o.varKinds.var,O,A,J)}assign(O,A,J){return this._leafNode(new p(O,A,J))}add(O,A){return this._leafNode(new g(O,e.operators.ADD,A))}code(O){return typeof O=="function"?O():O!==n.nil&&this._leafNode(new j(O)),this}object(...O){const A=["{"];for(const[J,pe]of O)A.length>1&&A.push(","),A.push(J),(J!==pe||this.opts.es5)&&(A.push(":"),(0,n.addCodeArg)(A,pe));return A.push("}"),new n._Code(A)}if(O,A,J){if(this._blockNode(new w(O)),A&&J)this.code(A).else().code(J).endIf();else if(A)this.code(A).endIf();else if(J)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(O){return this._elseNode(new w(O))}else(){return this._elseNode(new z)}endIf(){return this._endBlockNode(w,z)}_for(O,A){return this._blockNode(O),A&&this.code(A).endFor(),this}for(O,A){return this._for(new N(O),A)}forRange(O,A,J,pe,he=this.opts.es5?o.varKinds.var:o.varKinds.let){const Se=this._scope.toName(O);return this._for(new R(he,Se,A,J),()=>pe(Se))}forOf(O,A,J,pe=o.varKinds.const){const he=this._scope.toName(O);if(this.opts.es5){const Se=A instanceof n.Name?A:this.var("_arr",A);return this.forRange("_i",0,(0,n._)`${Se}.length`,Te=>{this.var(he,(0,n._)`${Se}[${Te}]`),J(he)})}return this._for(new _("of",pe,he,A),()=>J(he))}forIn(O,A,J,pe=this.opts.es5?o.varKinds.var:o.varKinds.const){if(this.opts.ownProperties)return this.forOf(O,(0,n._)`Object.keys(${A})`,J);const he=this._scope.toName(O);return this._for(new _("in",pe,he,A),()=>J(he))}endFor(){return this._endBlockNode($)}label(O){return this._leafNode(new h(O))}break(O){return this._leafNode(new y(O))}return(O){const A=new C;if(this._blockNode(A),this.code(O),A.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(C)}try(O,A,J){if(!A&&!J)throw new Error('CodeGen: "try" without "catch" and "finally"');const pe=new U;if(this._blockNode(pe),this.code(O),A){const he=this.name("e");this._currNode=pe.catch=new te(he),A(he)}return J&&(this._currNode=pe.finally=new G,this.code(J)),this._endBlockNode(te,G)}throw(O){return this._leafNode(new v(O))}block(O,A){return this._blockStarts.push(this._nodes.length),O&&this.code(O).endBlock(A),this}endBlock(O){const A=this._blockStarts.pop();if(A===void 0)throw new Error("CodeGen: not in self-balancing block");const J=this._nodes.length-A;if(J<0||O!==void 0&&J!==O)throw new Error(`CodeGen: wrong number of nodes: ${J} vs ${O} expected`);return this._nodes.length=A,this}func(O,A=n.nil,J,pe){return this._blockNode(new S(O,A,J)),pe&&this.code(pe).endFunc(),this}endFunc(){return this._endBlockNode(S)}optimize(O=1){for(;O-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(O){return this._currNode.nodes.push(O),this}_blockNode(O){this._currNode.nodes.push(O),this._nodes.push(O)}_endBlockNode(O,A){const J=this._currNode;if(J instanceof O||A&&J instanceof A)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${A?`${O.kind}/${A.kind}`:O.kind}"`)}_elseNode(O){const A=this._currNode;if(!(A instanceof w))throw new Error('CodeGen: "else" without "if"');return this._currNode=A.else=O,this}get _root(){return this._nodes[0]}get _currNode(){const O=this._nodes;return O[O.length-1]}set _currNode(O){const A=this._nodes;A[A.length-1]=O}}e.CodeGen=H;function Y(L,O){for(const A in O)L[A]=(L[A]||0)+(O[A]||0);return L}function F(L,O){return O instanceof n._CodeOrName?Y(L,O.names):L}function ie(L,O,A){if(L instanceof n.Name)return J(L);if(!pe(L))return L;return new n._Code(L._items.reduce((he,Se)=>(Se instanceof n.Name&&(Se=J(Se)),Se instanceof n._Code?he.push(...Se._items):he.push(Se),he),[]));function J(he){const Se=A[he.str];return Se===void 0||O[he.str]!==1?he:(delete O[he.str],Se)}function pe(he){return he instanceof n._Code&&he._items.some(Se=>Se instanceof n.Name&&O[Se.str]===1&&A[Se.str]!==void 0)}}function _e(L,O){for(const A in O)L[A]=(L[A]||0)-(O[A]||0)}function ae(L){return typeof L=="boolean"||typeof L=="number"||L===null?!L:(0,n._)`!${V(L)}`}e.not=ae;const fe=T(e.operators.AND);function ge(...L){return L.reduce(fe)}e.and=ge;const ke=T(e.operators.OR);function re(...L){return L.reduce(ke)}e.or=re;function T(L){return(O,A)=>O===n.nil?A:A===n.nil?O:(0,n._)`${V(O)} ${L} ${V(A)}`}function V(L){return L instanceof n.Name?L:(0,n._)`(${L})`}})(hf)),hf}var Oe={},iy;function qe(){if(iy)return Oe;iy=1,Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.checkStrictMode=Oe.getErrorPath=Oe.Type=Oe.useFunc=Oe.setEvaluated=Oe.evaluatedPropsToName=Oe.mergeEvaluated=Oe.eachItem=Oe.unescapeJsonPointer=Oe.escapeJsonPointer=Oe.escapeFragment=Oe.unescapeFragment=Oe.schemaRefOrVal=Oe.schemaHasRulesButRef=Oe.schemaHasRules=Oe.checkUnknownRules=Oe.alwaysValidSchema=Oe.toHash=void 0;const e=Re(),n=wc();function o(_){const S={};for(const C of _)S[C]=!0;return S}Oe.toHash=o;function l(_,S){return typeof S=="boolean"?S:Object.keys(S).length===0?!0:(c(_,S),!u(S,_.self.RULES.all))}Oe.alwaysValidSchema=l;function c(_,S=_.schema){const{opts:C,self:U}=_;if(!C.strictSchema||typeof S=="boolean")return;const te=U.RULES.keywords;for(const G in S)te[G]||R(_,`unknown keyword: "${G}"`)}Oe.checkUnknownRules=c;function u(_,S){if(typeof _=="boolean")return!_;for(const C in _)if(S[C])return!0;return!1}Oe.schemaHasRules=u;function d(_,S){if(typeof _=="boolean")return!_;for(const C in _)if(C!=="$ref"&&S.all[C])return!0;return!1}Oe.schemaHasRulesButRef=d;function p({topSchemaRef:_,schemaPath:S},C,U,te){if(!te){if(typeof C=="number"||typeof C=="boolean")return C;if(typeof C=="string")return(0,e._)`${C}`}return(0,e._)`${_}${S}${(0,e.getProperty)(U)}`}Oe.schemaRefOrVal=p;function g(_){return v(decodeURIComponent(_))}Oe.unescapeFragment=g;function h(_){return encodeURIComponent(y(_))}Oe.escapeFragment=h;function y(_){return typeof _=="number"?`${_}`:_.replace(/~/g,"~0").replace(/\//g,"~1")}Oe.escapeJsonPointer=y;function v(_){return _.replace(/~1/g,"/").replace(/~0/g,"~")}Oe.unescapeJsonPointer=v;function j(_,S){if(Array.isArray(_))for(const C of _)S(C);else S(_)}Oe.eachItem=j;function k({mergeNames:_,mergeToName:S,mergeValues:C,resultToName:U}){return(te,G,H,Y)=>{const F=H===void 0?G:H instanceof e.Name?(G instanceof e.Name?_(te,G,H):S(te,G,H),H):G instanceof e.Name?(S(te,H,G),G):C(G,H);return Y===e.Name&&!(F instanceof e.Name)?U(te,F):F}}Oe.mergeEvaluated={props:k({mergeNames:(_,S,C)=>_.if((0,e._)`${C} !== true && ${S} !== undefined`,()=>{_.if((0,e._)`${S} === true`,()=>_.assign(C,!0),()=>_.assign(C,(0,e._)`${C} || {}`).code((0,e._)`Object.assign(${C}, ${S})`))}),mergeToName:(_,S,C)=>_.if((0,e._)`${C} !== true`,()=>{S===!0?_.assign(C,!0):(_.assign(C,(0,e._)`${C} || {}`),E(_,C,S))}),mergeValues:(_,S)=>_===!0?!0:{..._,...S},resultToName:x}),items:k({mergeNames:(_,S,C)=>_.if((0,e._)`${C} !== true && ${S} !== undefined`,()=>_.assign(C,(0,e._)`${S} === true ? true : ${C} > ${S} ? ${C} : ${S}`)),mergeToName:(_,S,C)=>_.if((0,e._)`${C} !== true`,()=>_.assign(C,S===!0?!0:(0,e._)`${C} > ${S} ? ${C} : ${S}`)),mergeValues:(_,S)=>_===!0?!0:Math.max(_,S),resultToName:(_,S)=>_.var("items",S)})};function x(_,S){if(S===!0)return _.var("props",!0);const C=_.var("props",(0,e._)`{}`);return S!==void 0&&E(_,C,S),C}Oe.evaluatedPropsToName=x;function E(_,S,C){Object.keys(C).forEach(U=>_.assign((0,e._)`${S}${(0,e.getProperty)(U)}`,!0))}Oe.setEvaluated=E;const z={};function w(_,S){return _.scopeValue("func",{ref:S,code:z[S.code]||(z[S.code]=new n._Code(S.code))})}Oe.useFunc=w;var $;(function(_){_[_.Num=0]="Num",_[_.Str=1]="Str"})($||(Oe.Type=$={}));function N(_,S,C){if(_ instanceof e.Name){const U=S===$.Num;return C?U?(0,e._)`"[" + ${_} + "]"`:(0,e._)`"['" + ${_} + "']"`:U?(0,e._)`"/" + ${_}`:(0,e._)`"/" + ${_}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return C?(0,e.getProperty)(_).toString():"/"+y(_)}Oe.getErrorPath=N;function R(_,S,C=_.opts.strictSchema){if(C){if(S=`strict mode: ${S}`,C===!0)throw new Error(S);_.self.logger.warn(S)}}return Oe.checkStrictMode=R,Oe}var Ms={},oy;function br(){if(oy)return Ms;oy=1,Object.defineProperty(Ms,"__esModule",{value:!0});const e=Re(),n={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return Ms.default=n,Ms}var ly;function Mc(){return ly||(ly=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const n=Re(),o=qe(),l=br();e.keywordError={message:({keyword:z})=>(0,n.str)`must pass "${z}" keyword validation`},e.keyword$DataError={message:({keyword:z,schemaType:w})=>w?(0,n.str)`"${z}" keyword must be ${w} ($data)`:(0,n.str)`"${z}" keyword is invalid ($data)`};function c(z,w=e.keywordError,$,N){const{it:R}=z,{gen:_,compositeRule:S,allErrors:C}=R,U=v(z,w,$);N??(S||C)?g(_,U):h(R,(0,n._)`[${U}]`)}e.reportError=c;function u(z,w=e.keywordError,$){const{it:N}=z,{gen:R,compositeRule:_,allErrors:S}=N,C=v(z,w,$);g(R,C),_||S||h(N,l.default.vErrors)}e.reportExtraError=u;function d(z,w){z.assign(l.default.errors,w),z.if((0,n._)`${l.default.vErrors} !== null`,()=>z.if(w,()=>z.assign((0,n._)`${l.default.vErrors}.length`,w),()=>z.assign(l.default.vErrors,null)))}e.resetErrorsCount=d;function p({gen:z,keyword:w,schemaValue:$,data:N,errsCount:R,it:_}){if(R===void 0)throw new Error("ajv implementation error");const S=z.name("err");z.forRange("i",R,l.default.errors,C=>{z.const(S,(0,n._)`${l.default.vErrors}[${C}]`),z.if((0,n._)`${S}.instancePath === undefined`,()=>z.assign((0,n._)`${S}.instancePath`,(0,n.strConcat)(l.default.instancePath,_.errorPath))),z.assign((0,n._)`${S}.schemaPath`,(0,n.str)`${_.errSchemaPath}/${w}`),_.opts.verbose&&(z.assign((0,n._)`${S}.schema`,$),z.assign((0,n._)`${S}.data`,N))})}e.extendErrors=p;function g(z,w){const $=z.const("err",w);z.if((0,n._)`${l.default.vErrors} === null`,()=>z.assign(l.default.vErrors,(0,n._)`[${$}]`),(0,n._)`${l.default.vErrors}.push(${$})`),z.code((0,n._)`${l.default.errors}++`)}function h(z,w){const{gen:$,validateName:N,schemaEnv:R}=z;R.$async?$.throw((0,n._)`new ${z.ValidationError}(${w})`):($.assign((0,n._)`${N}.errors`,w),$.return(!1))}const y={keyword:new n.Name("keyword"),schemaPath:new n.Name("schemaPath"),params:new n.Name("params"),propertyName:new n.Name("propertyName"),message:new n.Name("message"),schema:new n.Name("schema"),parentSchema:new n.Name("parentSchema")};function v(z,w,$){const{createErrors:N}=z.it;return N===!1?(0,n._)`{}`:j(z,w,$)}function j(z,w,$={}){const{gen:N,it:R}=z,_=[k(R,$),x(z,$)];return E(z,w,_),N.object(..._)}function k({errorPath:z},{instancePath:w}){const $=w?(0,n.str)`${z}${(0,o.getErrorPath)(w,o.Type.Str)}`:z;return[l.default.instancePath,(0,n.strConcat)(l.default.instancePath,$)]}function x({keyword:z,it:{errSchemaPath:w}},{schemaPath:$,parentSchema:N}){let R=N?w:(0,n.str)`${w}/${z}`;return $&&(R=(0,n.str)`${R}${(0,o.getErrorPath)($,o.Type.Str)}`),[y.schemaPath,R]}function E(z,{params:w,message:$},N){const{keyword:R,data:_,schemaValue:S,it:C}=z,{opts:U,propertyName:te,topSchemaRef:G,schemaPath:H}=C;N.push([y.keyword,R],[y.params,typeof w=="function"?w(z):w||(0,n._)`{}`]),U.messages&&N.push([y.message,typeof $=="function"?$(z):$]),U.verbose&&N.push([y.schema,S],[y.parentSchema,(0,n._)`${G}${H}`],[l.default.data,_]),te&&N.push([y.propertyName,te])}})(mf)),mf}var sy;function H3(){if(sy)return Vr;sy=1,Object.defineProperty(Vr,"__esModule",{value:!0}),Vr.boolOrEmptySchema=Vr.topBoolOrEmptySchema=void 0;const e=Mc(),n=Re(),o=br(),l={message:"boolean schema is false"};function c(p){const{gen:g,schema:h,validateName:y}=p;h===!1?d(p,!1):typeof h=="object"&&h.$async===!0?g.return(o.default.data):(g.assign((0,n._)`${y}.errors`,null),g.return(!0))}Vr.topBoolOrEmptySchema=c;function u(p,g){const{gen:h,schema:y}=p;y===!1?(h.var(g,!1),d(p)):h.var(g,!0)}Vr.boolOrEmptySchema=u;function d(p,g){const{gen:h,data:y}=p,v={gen:h,keyword:"false schema",data:y,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:p};(0,e.reportError)(v,l,void 0,g)}return Vr}var qt={},Br={},cy;function T1(){if(cy)return Br;cy=1,Object.defineProperty(Br,"__esModule",{value:!0}),Br.getRules=Br.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],n=new Set(e);function o(c){return typeof c=="string"&&n.has(c)}Br.isJSONType=o;function l(){const c={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...c,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},c.number,c.string,c.array,c.object],post:{rules:[]},all:{},keywords:{}}}return Br.getRules=l,Br}var hn={},uy;function M1(){if(uy)return hn;uy=1,Object.defineProperty(hn,"__esModule",{value:!0}),hn.shouldUseRule=hn.shouldUseGroup=hn.schemaHasRulesForType=void 0;function e({schema:l,self:c},u){const d=c.RULES.types[u];return d&&d!==!0&&n(l,d)}hn.schemaHasRulesForType=e;function n(l,c){return c.rules.some(u=>o(l,u))}hn.shouldUseGroup=n;function o(l,c){var u;return l[c.keyword]!==void 0||((u=c.definition.implements)===null||u===void 0?void 0:u.some(d=>l[d]!==void 0))}return hn.shouldUseRule=o,hn}var dy;function kc(){if(dy)return qt;dy=1,Object.defineProperty(qt,"__esModule",{value:!0}),qt.reportTypeError=qt.checkDataTypes=qt.checkDataType=qt.coerceAndCheckDataType=qt.getJSONTypes=qt.getSchemaTypes=qt.DataType=void 0;const e=T1(),n=M1(),o=Mc(),l=Re(),c=qe();var u;(function($){$[$.Correct=0]="Correct",$[$.Wrong=1]="Wrong"})(u||(qt.DataType=u={}));function d($){const N=p($.type);if(N.includes("null")){if($.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!N.length&&$.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');$.nullable===!0&&N.push("null")}return N}qt.getSchemaTypes=d;function p($){const N=Array.isArray($)?$:$?[$]:[];if(N.every(e.isJSONType))return N;throw new Error("type must be JSONType or JSONType[]: "+N.join(","))}qt.getJSONTypes=p;function g($,N){const{gen:R,data:_,opts:S}=$,C=y(N,S.coerceTypes),U=N.length>0&&!(C.length===0&&N.length===1&&(0,n.schemaHasRulesForType)($,N[0]));if(U){const te=x(N,_,S.strictNumbers,u.Wrong);R.if(te,()=>{C.length?v($,N,C):z($)})}return U}qt.coerceAndCheckDataType=g;const h=new Set(["string","number","integer","boolean","null"]);function y($,N){return N?$.filter(R=>h.has(R)||N==="array"&&R==="array"):[]}function v($,N,R){const{gen:_,data:S,opts:C}=$,U=_.let("dataType",(0,l._)`typeof ${S}`),te=_.let("coerced",(0,l._)`undefined`);C.coerceTypes==="array"&&_.if((0,l._)`${U} == 'object' && Array.isArray(${S}) && ${S}.length == 1`,()=>_.assign(S,(0,l._)`${S}[0]`).assign(U,(0,l._)`typeof ${S}`).if(x(N,S,C.strictNumbers),()=>_.assign(te,S))),_.if((0,l._)`${te} !== undefined`);for(const H of R)(h.has(H)||H==="array"&&C.coerceTypes==="array")&&G(H);_.else(),z($),_.endIf(),_.if((0,l._)`${te} !== undefined`,()=>{_.assign(S,te),j($,te)});function G(H){switch(H){case"string":_.elseIf((0,l._)`${U} == "number" || ${U} == "boolean"`).assign(te,(0,l._)`"" + ${S}`).elseIf((0,l._)`${S} === null`).assign(te,(0,l._)`""`);return;case"number":_.elseIf((0,l._)`${U} == "boolean" || ${S} === null
114
- || (${U} == "string" && ${S} && ${S} == +${S})`).assign(te,(0,l._)`+${S}`);return;case"integer":_.elseIf((0,l._)`${U} === "boolean" || ${S} === null
115
- || (${U} === "string" && ${S} && ${S} == +${S} && !(${S} % 1))`).assign(te,(0,l._)`+${S}`);return;case"boolean":_.elseIf((0,l._)`${S} === "false" || ${S} === 0 || ${S} === null`).assign(te,!1).elseIf((0,l._)`${S} === "true" || ${S} === 1`).assign(te,!0);return;case"null":_.elseIf((0,l._)`${S} === "" || ${S} === 0 || ${S} === false`),_.assign(te,null);return;case"array":_.elseIf((0,l._)`${U} === "string" || ${U} === "number"
116
- || ${U} === "boolean" || ${S} === null`).assign(te,(0,l._)`[${S}]`)}}}function j({gen:$,parentData:N,parentDataProperty:R},_){$.if((0,l._)`${N} !== undefined`,()=>$.assign((0,l._)`${N}[${R}]`,_))}function k($,N,R,_=u.Correct){const S=_===u.Correct?l.operators.EQ:l.operators.NEQ;let C;switch($){case"null":return(0,l._)`${N} ${S} null`;case"array":C=(0,l._)`Array.isArray(${N})`;break;case"object":C=(0,l._)`${N} && typeof ${N} == "object" && !Array.isArray(${N})`;break;case"integer":C=U((0,l._)`!(${N} % 1) && !isNaN(${N})`);break;case"number":C=U();break;default:return(0,l._)`typeof ${N} ${S} ${$}`}return _===u.Correct?C:(0,l.not)(C);function U(te=l.nil){return(0,l.and)((0,l._)`typeof ${N} == "number"`,te,R?(0,l._)`isFinite(${N})`:l.nil)}}qt.checkDataType=k;function x($,N,R,_){if($.length===1)return k($[0],N,R,_);let S;const C=(0,c.toHash)($);if(C.array&&C.object){const U=(0,l._)`typeof ${N} != "object"`;S=C.null?U:(0,l._)`!${N} || ${U}`,delete C.null,delete C.array,delete C.object}else S=l.nil;C.number&&delete C.integer;for(const U in C)S=(0,l.and)(S,k(U,N,R,_));return S}qt.checkDataTypes=x;const E={message:({schema:$})=>`must be ${$}`,params:({schema:$,schemaValue:N})=>typeof $=="string"?(0,l._)`{type: ${$}}`:(0,l._)`{type: ${N}}`};function z($){const N=w($);(0,o.reportError)(N,E)}qt.reportTypeError=z;function w($){const{gen:N,data:R,schema:_}=$,S=(0,c.schemaRefOrVal)($,_,"type");return{gen:N,keyword:"type",data:R,schema:_.type,schemaCode:S,schemaValue:S,parentSchema:_,params:{},it:$}}return qt}var Zo={},fy;function q3(){if(fy)return Zo;fy=1,Object.defineProperty(Zo,"__esModule",{value:!0}),Zo.assignDefaults=void 0;const e=Re(),n=qe();function o(c,u){const{properties:d,items:p}=c.schema;if(u==="object"&&d)for(const g in d)l(c,g,d[g].default);else u==="array"&&Array.isArray(p)&&p.forEach((g,h)=>l(c,h,g.default))}Zo.assignDefaults=o;function l(c,u,d){const{gen:p,compositeRule:g,data:h,opts:y}=c;if(d===void 0)return;const v=(0,e._)`${h}${(0,e.getProperty)(u)}`;if(g){(0,n.checkStrictMode)(c,`default is ignored for: ${v}`);return}let j=(0,e._)`${v} === undefined`;y.useDefaults==="empty"&&(j=(0,e._)`${j} || ${v} === null || ${v} === ""`),p.if(j,(0,e._)`${v} = ${(0,e.stringify)(d)}`)}return Zo}var Ua={},Je={},py;function La(){if(py)return Je;py=1,Object.defineProperty(Je,"__esModule",{value:!0}),Je.validateUnion=Je.validateArray=Je.usePattern=Je.callValidateCode=Je.schemaProperties=Je.allSchemaProperties=Je.noPropertyInData=Je.propertyInData=Je.isOwnProperty=Je.hasPropFunc=Je.reportMissingProp=Je.checkMissingProp=Je.checkReportMissingProp=void 0;const e=Re(),n=qe(),o=br(),l=qe();function c($,N){const{gen:R,data:_,it:S}=$;R.if(y(R,_,N,S.opts.ownProperties),()=>{$.setParams({missingProperty:(0,e._)`${N}`},!0),$.error()})}Je.checkReportMissingProp=c;function u({gen:$,data:N,it:{opts:R}},_,S){return(0,e.or)(..._.map(C=>(0,e.and)(y($,N,C,R.ownProperties),(0,e._)`${S} = ${C}`)))}Je.checkMissingProp=u;function d($,N){$.setParams({missingProperty:N},!0),$.error()}Je.reportMissingProp=d;function p($){return $.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}Je.hasPropFunc=p;function g($,N,R){return(0,e._)`${p($)}.call(${N}, ${R})`}Je.isOwnProperty=g;function h($,N,R,_){const S=(0,e._)`${N}${(0,e.getProperty)(R)} !== undefined`;return _?(0,e._)`${S} && ${g($,N,R)}`:S}Je.propertyInData=h;function y($,N,R,_){const S=(0,e._)`${N}${(0,e.getProperty)(R)} === undefined`;return _?(0,e.or)(S,(0,e.not)(g($,N,R))):S}Je.noPropertyInData=y;function v($){return $?Object.keys($).filter(N=>N!=="__proto__"):[]}Je.allSchemaProperties=v;function j($,N){return v(N).filter(R=>!(0,n.alwaysValidSchema)($,N[R]))}Je.schemaProperties=j;function k({schemaCode:$,data:N,it:{gen:R,topSchemaRef:_,schemaPath:S,errorPath:C},it:U},te,G,H){const Y=H?(0,e._)`${$}, ${N}, ${_}${S}`:N,F=[[o.default.instancePath,(0,e.strConcat)(o.default.instancePath,C)],[o.default.parentData,U.parentData],[o.default.parentDataProperty,U.parentDataProperty],[o.default.rootData,o.default.rootData]];U.opts.dynamicRef&&F.push([o.default.dynamicAnchors,o.default.dynamicAnchors]);const ie=(0,e._)`${Y}, ${R.object(...F)}`;return G!==e.nil?(0,e._)`${te}.call(${G}, ${ie})`:(0,e._)`${te}(${ie})`}Je.callValidateCode=k;const x=(0,e._)`new RegExp`;function E({gen:$,it:{opts:N}},R){const _=N.unicodeRegExp?"u":"",{regExp:S}=N.code,C=S(R,_);return $.scopeValue("pattern",{key:C.toString(),ref:C,code:(0,e._)`${S.code==="new RegExp"?x:(0,l.useFunc)($,S)}(${R}, ${_})`})}Je.usePattern=E;function z($){const{gen:N,data:R,keyword:_,it:S}=$,C=N.name("valid");if(S.allErrors){const te=N.let("valid",!0);return U(()=>N.assign(te,!1)),te}return N.var(C,!0),U(()=>N.break()),C;function U(te){const G=N.const("len",(0,e._)`${R}.length`);N.forRange("i",0,G,H=>{$.subschema({keyword:_,dataProp:H,dataPropType:n.Type.Num},C),N.if((0,e.not)(C),te)})}}Je.validateArray=z;function w($){const{gen:N,schema:R,keyword:_,it:S}=$;if(!Array.isArray(R))throw new Error("ajv implementation error");if(R.some(G=>(0,n.alwaysValidSchema)(S,G))&&!S.opts.unevaluated)return;const U=N.let("valid",!1),te=N.name("_valid");N.block(()=>R.forEach((G,H)=>{const Y=$.subschema({keyword:_,schemaProp:H,compositeRule:!0},te);N.assign(U,(0,e._)`${U} || ${te}`),$.mergeValidEvaluated(Y,te)||N.if((0,e.not)(U))})),$.result(U,()=>$.reset(),()=>$.error(!0))}return Je.validateUnion=w,Je}var gy;function P3(){if(gy)return Ua;gy=1,Object.defineProperty(Ua,"__esModule",{value:!0}),Ua.validateKeywordUsage=Ua.validSchemaType=Ua.funcKeywordCode=Ua.macroKeywordCode=void 0;const e=Re(),n=br(),o=La(),l=Mc();function c(j,k){const{gen:x,keyword:E,schema:z,parentSchema:w,it:$}=j,N=k.macro.call($.self,z,w,$),R=h(x,E,N);$.opts.validateSchema!==!1&&$.self.validateSchema(N,!0);const _=x.name("valid");j.subschema({schema:N,schemaPath:e.nil,errSchemaPath:`${$.errSchemaPath}/${E}`,topSchemaRef:R,compositeRule:!0},_),j.pass(_,()=>j.error(!0))}Ua.macroKeywordCode=c;function u(j,k){var x;const{gen:E,keyword:z,schema:w,parentSchema:$,$data:N,it:R}=j;g(R,k);const _=!N&&k.compile?k.compile.call(R.self,w,$,R):k.validate,S=h(E,z,_),C=E.let("valid");j.block$data(C,U),j.ok((x=k.valid)!==null&&x!==void 0?x:C);function U(){if(k.errors===!1)H(),k.modifying&&d(j),Y(()=>j.error());else{const F=k.async?te():G();k.modifying&&d(j),Y(()=>p(j,F))}}function te(){const F=E.let("ruleErrs",null);return E.try(()=>H((0,e._)`await `),ie=>E.assign(C,!1).if((0,e._)`${ie} instanceof ${R.ValidationError}`,()=>E.assign(F,(0,e._)`${ie}.errors`),()=>E.throw(ie))),F}function G(){const F=(0,e._)`${S}.errors`;return E.assign(F,null),H(e.nil),F}function H(F=k.async?(0,e._)`await `:e.nil){const ie=R.opts.passContext?n.default.this:n.default.self,_e=!("compile"in k&&!N||k.schema===!1);E.assign(C,(0,e._)`${F}${(0,o.callValidateCode)(j,S,ie,_e)}`,k.modifying)}function Y(F){var ie;E.if((0,e.not)((ie=k.valid)!==null&&ie!==void 0?ie:C),F)}}Ua.funcKeywordCode=u;function d(j){const{gen:k,data:x,it:E}=j;k.if(E.parentData,()=>k.assign(x,(0,e._)`${E.parentData}[${E.parentDataProperty}]`))}function p(j,k){const{gen:x}=j;x.if((0,e._)`Array.isArray(${k})`,()=>{x.assign(n.default.vErrors,(0,e._)`${n.default.vErrors} === null ? ${k} : ${n.default.vErrors}.concat(${k})`).assign(n.default.errors,(0,e._)`${n.default.vErrors}.length`),(0,l.extendErrors)(j)},()=>j.error())}function g({schemaEnv:j},k){if(k.async&&!j.$async)throw new Error("async keyword in sync schema")}function h(j,k,x){if(x===void 0)throw new Error(`keyword "${k}" failed to compile`);return j.scopeValue("keyword",typeof x=="function"?{ref:x}:{ref:x,code:(0,e.stringify)(x)})}function y(j,k,x=!1){return!k.length||k.some(E=>E==="array"?Array.isArray(j):E==="object"?j&&typeof j=="object"&&!Array.isArray(j):typeof j==E||x&&typeof j>"u")}Ua.validSchemaType=y;function v({schema:j,opts:k,self:x,errSchemaPath:E},z,w){if(Array.isArray(z.keyword)?!z.keyword.includes(w):z.keyword!==w)throw new Error("ajv implementation error");const $=z.dependencies;if($!=null&&$.some(N=>!Object.prototype.hasOwnProperty.call(j,N)))throw new Error(`parent schema must have dependencies of ${w}: ${$.join(",")}`);if(z.validateSchema&&!z.validateSchema(j[w])){const R=`keyword "${w}" value is invalid at path "${E}": `+x.errorsText(z.validateSchema.errors);if(k.validateSchema==="log")x.logger.error(R);else throw new Error(R)}}return Ua.validateKeywordUsage=v,Ua}var yn={},my;function Z3(){if(my)return yn;my=1,Object.defineProperty(yn,"__esModule",{value:!0}),yn.extendSubschemaMode=yn.extendSubschemaData=yn.getSubschema=void 0;const e=Re(),n=qe();function o(u,{keyword:d,schemaProp:p,schema:g,schemaPath:h,errSchemaPath:y,topSchemaRef:v}){if(d!==void 0&&g!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(d!==void 0){const j=u.schema[d];return p===void 0?{schema:j,schemaPath:(0,e._)`${u.schemaPath}${(0,e.getProperty)(d)}`,errSchemaPath:`${u.errSchemaPath}/${d}`}:{schema:j[p],schemaPath:(0,e._)`${u.schemaPath}${(0,e.getProperty)(d)}${(0,e.getProperty)(p)}`,errSchemaPath:`${u.errSchemaPath}/${d}/${(0,n.escapeFragment)(p)}`}}if(g!==void 0){if(h===void 0||y===void 0||v===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:g,schemaPath:h,topSchemaRef:v,errSchemaPath:y}}throw new Error('either "keyword" or "schema" must be passed')}yn.getSubschema=o;function l(u,d,{dataProp:p,dataPropType:g,data:h,dataTypes:y,propertyName:v}){if(h!==void 0&&p!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:j}=d;if(p!==void 0){const{errorPath:x,dataPathArr:E,opts:z}=d,w=j.let("data",(0,e._)`${d.data}${(0,e.getProperty)(p)}`,!0);k(w),u.errorPath=(0,e.str)`${x}${(0,n.getErrorPath)(p,g,z.jsPropertySyntax)}`,u.parentDataProperty=(0,e._)`${p}`,u.dataPathArr=[...E,u.parentDataProperty]}if(h!==void 0){const x=h instanceof e.Name?h:j.let("data",h,!0);k(x),v!==void 0&&(u.propertyName=v)}y&&(u.dataTypes=y);function k(x){u.data=x,u.dataLevel=d.dataLevel+1,u.dataTypes=[],d.definedProperties=new Set,u.parentData=d.data,u.dataNames=[...d.dataNames,x]}}yn.extendSubschemaData=l;function c(u,{jtdDiscriminator:d,jtdMetadata:p,compositeRule:g,createErrors:h,allErrors:y}){g!==void 0&&(u.compositeRule=g),h!==void 0&&(u.createErrors=h),y!==void 0&&(u.allErrors=y),u.jtdDiscriminator=d,u.jtdMetadata=p}return yn.extendSubschemaMode=c,yn}var Kt={},$f,hy;function O1(){return hy||(hy=1,$f=function e(n,o){if(n===o)return!0;if(n&&o&&typeof n=="object"&&typeof o=="object"){if(n.constructor!==o.constructor)return!1;var l,c,u;if(Array.isArray(n)){if(l=n.length,l!=o.length)return!1;for(c=l;c--!==0;)if(!e(n[c],o[c]))return!1;return!0}if(n.constructor===RegExp)return n.source===o.source&&n.flags===o.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===o.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===o.toString();if(u=Object.keys(n),l=u.length,l!==Object.keys(o).length)return!1;for(c=l;c--!==0;)if(!Object.prototype.hasOwnProperty.call(o,u[c]))return!1;for(c=l;c--!==0;){var d=u[c];if(!e(n[d],o[d]))return!1}return!0}return n!==n&&o!==o}),$f}var bf={exports:{}},yy;function G3(){if(yy)return bf.exports;yy=1;var e=bf.exports=function(l,c,u){typeof c=="function"&&(u=c,c={}),u=c.cb||u;var d=typeof u=="function"?u:u.pre||function(){},p=u.post||function(){};n(c,d,p,l,"",l)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.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 n(l,c,u,d,p,g,h,y,v,j){if(d&&typeof d=="object"&&!Array.isArray(d)){c(d,p,g,h,y,v,j);for(var k in d){var x=d[k];if(Array.isArray(x)){if(k in e.arrayKeywords)for(var E=0;E<x.length;E++)n(l,c,u,x[E],p+"/"+k+"/"+E,g,p,k,d,E)}else if(k in e.propsKeywords){if(x&&typeof x=="object")for(var z in x)n(l,c,u,x[z],p+"/"+k+"/"+o(z),g,p,k,d,z)}else(k in e.keywords||l.allKeys&&!(k in e.skipKeywords))&&n(l,c,u,x,p+"/"+k,g,p,k,d)}u(d,p,g,h,y,v,j)}}function o(l){return l.replace(/~/g,"~0").replace(/\//g,"~1")}return bf.exports}var vy;function Oc(){if(vy)return Kt;vy=1,Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.getSchemaRefs=Kt.resolveUrl=Kt.normalizeId=Kt._getFullPath=Kt.getFullPath=Kt.inlineRef=void 0;const e=qe(),n=O1(),o=G3(),l=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function c(E,z=!0){return typeof E=="boolean"?!0:z===!0?!d(E):z?p(E)<=z:!1}Kt.inlineRef=c;const u=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function d(E){for(const z in E){if(u.has(z))return!0;const w=E[z];if(Array.isArray(w)&&w.some(d)||typeof w=="object"&&d(w))return!0}return!1}function p(E){let z=0;for(const w in E){if(w==="$ref")return 1/0;if(z++,!l.has(w)&&(typeof E[w]=="object"&&(0,e.eachItem)(E[w],$=>z+=p($)),z===1/0))return 1/0}return z}function g(E,z="",w){w!==!1&&(z=v(z));const $=E.parse(z);return h(E,$)}Kt.getFullPath=g;function h(E,z){return E.serialize(z).split("#")[0]+"#"}Kt._getFullPath=h;const y=/#\/?$/;function v(E){return E?E.replace(y,""):""}Kt.normalizeId=v;function j(E,z,w){return w=v(w),E.resolve(z,w)}Kt.resolveUrl=j;const k=/^[a-z_][-a-z0-9._]*$/i;function x(E,z){if(typeof E=="boolean")return{};const{schemaId:w,uriResolver:$}=this.opts,N=v(E[w]||z),R={"":N},_=g($,N,!1),S={},C=new Set;return o(E,{allKeys:!0},(G,H,Y,F)=>{if(F===void 0)return;const ie=_+H;let _e=R[F];typeof G[w]=="string"&&(_e=ae.call(this,G[w])),fe.call(this,G.$anchor),fe.call(this,G.$dynamicAnchor),R[H]=_e;function ae(ge){const ke=this.opts.uriResolver.resolve;if(ge=v(_e?ke(_e,ge):ge),C.has(ge))throw te(ge);C.add(ge);let re=this.refs[ge];return typeof re=="string"&&(re=this.refs[re]),typeof re=="object"?U(G,re.schema,ge):ge!==v(ie)&&(ge[0]==="#"?(U(G,S[ge],ge),S[ge]=G):this.refs[ge]=ie),ge}function fe(ge){if(typeof ge=="string"){if(!k.test(ge))throw new Error(`invalid anchor "${ge}"`);ae.call(this,`#${ge}`)}}}),S;function U(G,H,Y){if(H!==void 0&&!n(G,H))throw te(Y)}function te(G){return new Error(`reference "${G}" resolves to more than one schema`)}}return Kt.getSchemaRefs=x,Kt}var $y;function Rc(){if($y)return mn;$y=1,Object.defineProperty(mn,"__esModule",{value:!0}),mn.getData=mn.KeywordCxt=mn.validateFunctionCode=void 0;const e=H3(),n=kc(),o=M1(),l=kc(),c=q3(),u=P3(),d=Z3(),p=Re(),g=br(),h=Oc(),y=qe(),v=Mc();function j(P){if(_(P)&&(C(P),R(P))){z(P);return}k(P,()=>(0,e.topBoolOrEmptySchema)(P))}mn.validateFunctionCode=j;function k({gen:P,validateName:W,schema:ue,schemaEnv:me,opts:ve},ze){ve.code.es5?P.func(W,(0,p._)`${g.default.data}, ${g.default.valCxt}`,me.$async,()=>{P.code((0,p._)`"use strict"; ${$(ue,ve)}`),E(P,ve),P.code(ze)}):P.func(W,(0,p._)`${g.default.data}, ${x(ve)}`,me.$async,()=>P.code($(ue,ve)).code(ze))}function x(P){return(0,p._)`{${g.default.instancePath}="", ${g.default.parentData}, ${g.default.parentDataProperty}, ${g.default.rootData}=${g.default.data}${P.dynamicRef?(0,p._)`, ${g.default.dynamicAnchors}={}`:p.nil}}={}`}function E(P,W){P.if(g.default.valCxt,()=>{P.var(g.default.instancePath,(0,p._)`${g.default.valCxt}.${g.default.instancePath}`),P.var(g.default.parentData,(0,p._)`${g.default.valCxt}.${g.default.parentData}`),P.var(g.default.parentDataProperty,(0,p._)`${g.default.valCxt}.${g.default.parentDataProperty}`),P.var(g.default.rootData,(0,p._)`${g.default.valCxt}.${g.default.rootData}`),W.dynamicRef&&P.var(g.default.dynamicAnchors,(0,p._)`${g.default.valCxt}.${g.default.dynamicAnchors}`)},()=>{P.var(g.default.instancePath,(0,p._)`""`),P.var(g.default.parentData,(0,p._)`undefined`),P.var(g.default.parentDataProperty,(0,p._)`undefined`),P.var(g.default.rootData,g.default.data),W.dynamicRef&&P.var(g.default.dynamicAnchors,(0,p._)`{}`)})}function z(P){const{schema:W,opts:ue,gen:me}=P;k(P,()=>{ue.$comment&&W.$comment&&F(P),G(P),me.let(g.default.vErrors,null),me.let(g.default.errors,0),ue.unevaluated&&w(P),U(P),ie(P)})}function w(P){const{gen:W,validateName:ue}=P;P.evaluated=W.const("evaluated",(0,p._)`${ue}.evaluated`),W.if((0,p._)`${P.evaluated}.dynamicProps`,()=>W.assign((0,p._)`${P.evaluated}.props`,(0,p._)`undefined`)),W.if((0,p._)`${P.evaluated}.dynamicItems`,()=>W.assign((0,p._)`${P.evaluated}.items`,(0,p._)`undefined`))}function $(P,W){const ue=typeof P=="object"&&P[W.schemaId];return ue&&(W.code.source||W.code.process)?(0,p._)`/*# sourceURL=${ue} */`:p.nil}function N(P,W){if(_(P)&&(C(P),R(P))){S(P,W);return}(0,e.boolOrEmptySchema)(P,W)}function R({schema:P,self:W}){if(typeof P=="boolean")return!P;for(const ue in P)if(W.RULES.all[ue])return!0;return!1}function _(P){return typeof P.schema!="boolean"}function S(P,W){const{schema:ue,gen:me,opts:ve}=P;ve.$comment&&ue.$comment&&F(P),H(P),Y(P);const ze=me.const("_errs",g.default.errors);U(P,ze),me.var(W,(0,p._)`${ze} === ${g.default.errors}`)}function C(P){(0,y.checkUnknownRules)(P),te(P)}function U(P,W){if(P.opts.jtd)return ae(P,[],!1,W);const ue=(0,n.getSchemaTypes)(P.schema),me=(0,n.coerceAndCheckDataType)(P,ue);ae(P,ue,!me,W)}function te(P){const{schema:W,errSchemaPath:ue,opts:me,self:ve}=P;W.$ref&&me.ignoreKeywordsWithRef&&(0,y.schemaHasRulesButRef)(W,ve.RULES)&&ve.logger.warn(`$ref: keywords ignored in schema at path "${ue}"`)}function G(P){const{schema:W,opts:ue}=P;W.default!==void 0&&ue.useDefaults&&ue.strictSchema&&(0,y.checkStrictMode)(P,"default is ignored in the schema root")}function H(P){const W=P.schema[P.opts.schemaId];W&&(P.baseId=(0,h.resolveUrl)(P.opts.uriResolver,P.baseId,W))}function Y(P){if(P.schema.$async&&!P.schemaEnv.$async)throw new Error("async schema in sync schema")}function F({gen:P,schemaEnv:W,schema:ue,errSchemaPath:me,opts:ve}){const ze=ue.$comment;if(ve.$comment===!0)P.code((0,p._)`${g.default.self}.logger.log(${ze})`);else if(typeof ve.$comment=="function"){const zt=(0,p.str)`${me}/$comment`,Qt=P.scopeValue("root",{ref:W.root});P.code((0,p._)`${g.default.self}.opts.$comment(${ze}, ${zt}, ${Qt}.schema)`)}}function ie(P){const{gen:W,schemaEnv:ue,validateName:me,ValidationError:ve,opts:ze}=P;ue.$async?W.if((0,p._)`${g.default.errors} === 0`,()=>W.return(g.default.data),()=>W.throw((0,p._)`new ${ve}(${g.default.vErrors})`)):(W.assign((0,p._)`${me}.errors`,g.default.vErrors),ze.unevaluated&&_e(P),W.return((0,p._)`${g.default.errors} === 0`))}function _e({gen:P,evaluated:W,props:ue,items:me}){ue instanceof p.Name&&P.assign((0,p._)`${W}.props`,ue),me instanceof p.Name&&P.assign((0,p._)`${W}.items`,me)}function ae(P,W,ue,me){const{gen:ve,schema:ze,data:zt,allErrors:Qt,opts:Ct,self:Tt}=P,{RULES:ht}=Tt;if(ze.$ref&&(Ct.ignoreKeywordsWithRef||!(0,y.schemaHasRulesButRef)(ze,ht))){ve.block(()=>pe(P,"$ref",ht.all.$ref.definition));return}Ct.jtd||ge(P,W),ve.block(()=>{for(const Wt of ht.rules)_n(Wt);_n(ht.post)});function _n(Wt){(0,o.shouldUseGroup)(ze,Wt)&&(Wt.type?(ve.if((0,l.checkDataType)(Wt.type,zt,Ct.strictNumbers)),fe(P,Wt),W.length===1&&W[0]===Wt.type&&ue&&(ve.else(),(0,l.reportTypeError)(P)),ve.endIf()):fe(P,Wt),Qt||ve.if((0,p._)`${g.default.errors} === ${me||0}`))}}function fe(P,W){const{gen:ue,schema:me,opts:{useDefaults:ve}}=P;ve&&(0,c.assignDefaults)(P,W.type),ue.block(()=>{for(const ze of W.rules)(0,o.shouldUseRule)(me,ze)&&pe(P,ze.keyword,ze.definition,W.type)})}function ge(P,W){P.schemaEnv.meta||!P.opts.strictTypes||(ke(P,W),P.opts.allowUnionTypes||re(P,W),T(P,P.dataTypes))}function ke(P,W){if(W.length){if(!P.dataTypes.length){P.dataTypes=W;return}W.forEach(ue=>{L(P.dataTypes,ue)||A(P,`type "${ue}" not allowed by context "${P.dataTypes.join(",")}"`)}),O(P,W)}}function re(P,W){W.length>1&&!(W.length===2&&W.includes("null"))&&A(P,"use allowUnionTypes to allow union type keyword")}function T(P,W){const ue=P.self.RULES.all;for(const me in ue){const ve=ue[me];if(typeof ve=="object"&&(0,o.shouldUseRule)(P.schema,ve)){const{type:ze}=ve.definition;ze.length&&!ze.some(zt=>V(W,zt))&&A(P,`missing type "${ze.join(",")}" for keyword "${me}"`)}}}function V(P,W){return P.includes(W)||W==="number"&&P.includes("integer")}function L(P,W){return P.includes(W)||W==="integer"&&P.includes("number")}function O(P,W){const ue=[];for(const me of P.dataTypes)L(W,me)?ue.push(me):W.includes("integer")&&me==="number"&&ue.push("integer");P.dataTypes=ue}function A(P,W){const ue=P.schemaEnv.baseId+P.errSchemaPath;W+=` at "${ue}" (strictTypes)`,(0,y.checkStrictMode)(P,W,P.opts.strictTypes)}class J{constructor(W,ue,me){if((0,u.validateKeywordUsage)(W,ue,me),this.gen=W.gen,this.allErrors=W.allErrors,this.keyword=me,this.data=W.data,this.schema=W.schema[me],this.$data=ue.$data&&W.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,y.schemaRefOrVal)(W,this.schema,me,this.$data),this.schemaType=ue.schemaType,this.parentSchema=W.schema,this.params={},this.it=W,this.def=ue,this.$data)this.schemaCode=W.gen.const("vSchema",Te(this.$data,W));else if(this.schemaCode=this.schemaValue,!(0,u.validSchemaType)(this.schema,ue.schemaType,ue.allowUndefined))throw new Error(`${me} value must be ${JSON.stringify(ue.schemaType)}`);("code"in ue?ue.trackErrors:ue.errors!==!1)&&(this.errsCount=W.gen.const("_errs",g.default.errors))}result(W,ue,me){this.failResult((0,p.not)(W),ue,me)}failResult(W,ue,me){this.gen.if(W),me?me():this.error(),ue?(this.gen.else(),ue(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(W,ue){this.failResult((0,p.not)(W),void 0,ue)}fail(W){if(W===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(W),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(W){if(!this.$data)return this.fail(W);const{schemaCode:ue}=this;this.fail((0,p._)`${ue} !== undefined && (${(0,p.or)(this.invalid$data(),W)})`)}error(W,ue,me){if(ue){this.setParams(ue),this._error(W,me),this.setParams({});return}this._error(W,me)}_error(W,ue){(W?v.reportExtraError:v.reportError)(this,this.def.error,ue)}$dataError(){(0,v.reportError)(this,this.def.$dataError||v.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,v.resetErrorsCount)(this.gen,this.errsCount)}ok(W){this.allErrors||this.gen.if(W)}setParams(W,ue){ue?Object.assign(this.params,W):this.params=W}block$data(W,ue,me=p.nil){this.gen.block(()=>{this.check$data(W,me),ue()})}check$data(W=p.nil,ue=p.nil){if(!this.$data)return;const{gen:me,schemaCode:ve,schemaType:ze,def:zt}=this;me.if((0,p.or)((0,p._)`${ve} === undefined`,ue)),W!==p.nil&&me.assign(W,!0),(ze.length||zt.validateSchema)&&(me.elseIf(this.invalid$data()),this.$dataError(),W!==p.nil&&me.assign(W,!1)),me.else()}invalid$data(){const{gen:W,schemaCode:ue,schemaType:me,def:ve,it:ze}=this;return(0,p.or)(zt(),Qt());function zt(){if(me.length){if(!(ue instanceof p.Name))throw new Error("ajv implementation error");const Ct=Array.isArray(me)?me:[me];return(0,p._)`${(0,l.checkDataTypes)(Ct,ue,ze.opts.strictNumbers,l.DataType.Wrong)}`}return p.nil}function Qt(){if(ve.validateSchema){const Ct=W.scopeValue("validate$data",{ref:ve.validateSchema});return(0,p._)`!${Ct}(${ue})`}return p.nil}}subschema(W,ue){const me=(0,d.getSubschema)(this.it,W);(0,d.extendSubschemaData)(me,this.it,W),(0,d.extendSubschemaMode)(me,W);const ve={...this.it,...me,items:void 0,props:void 0};return N(ve,ue),ve}mergeEvaluated(W,ue){const{it:me,gen:ve}=this;me.opts.unevaluated&&(me.props!==!0&&W.props!==void 0&&(me.props=y.mergeEvaluated.props(ve,W.props,me.props,ue)),me.items!==!0&&W.items!==void 0&&(me.items=y.mergeEvaluated.items(ve,W.items,me.items,ue)))}mergeValidEvaluated(W,ue){const{it:me,gen:ve}=this;if(me.opts.unevaluated&&(me.props!==!0||me.items!==!0))return ve.if(ue,()=>this.mergeEvaluated(W,p.Name)),!0}}mn.KeywordCxt=J;function pe(P,W,ue,me){const ve=new J(P,ue,W);"code"in ue?ue.code(ve,me):ve.$data&&ue.validate?(0,u.funcKeywordCode)(ve,ue):"macro"in ue?(0,u.macroKeywordCode)(ve,ue):(ue.compile||ue.validate)&&(0,u.funcKeywordCode)(ve,ue)}const he=/^\/(?:[^~]|~0|~1)*$/,Se=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Te(P,{dataLevel:W,dataNames:ue,dataPathArr:me}){let ve,ze;if(P==="")return g.default.rootData;if(P[0]==="/"){if(!he.test(P))throw new Error(`Invalid JSON-pointer: ${P}`);ve=P,ze=g.default.rootData}else{const Tt=Se.exec(P);if(!Tt)throw new Error(`Invalid JSON-pointer: ${P}`);const ht=+Tt[1];if(ve=Tt[2],ve==="#"){if(ht>=W)throw new Error(Ct("property/index",ht));return me[W-ht]}if(ht>W)throw new Error(Ct("data",ht));if(ze=ue[W-ht],!ve)return ze}let zt=ze;const Qt=ve.split("/");for(const Tt of Qt)Tt&&(ze=(0,p._)`${ze}${(0,p.getProperty)((0,y.unescapeJsonPointer)(Tt))}`,zt=(0,p._)`${zt} && ${ze}`);return zt;function Ct(Tt,ht){return`Cannot access ${Tt} ${ht} levels up, current level is ${W}`}}return mn.getData=Te,mn}var Os={},by;function ap(){if(by)return Os;by=1,Object.defineProperty(Os,"__esModule",{value:!0});class e extends Error{constructor(o){super("validation failed"),this.errors=o,this.ajv=this.validation=!0}}return Os.default=e,Os}var Rs={},xy;function Ac(){if(xy)return Rs;xy=1,Object.defineProperty(Rs,"__esModule",{value:!0});const e=Oc();class n extends Error{constructor(l,c,u,d){super(d||`can't resolve reference ${u} from id ${c}`),this.missingRef=(0,e.resolveUrl)(l,c,u),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(l,this.missingRef))}}return Rs.default=n,Rs}var ba={},_y;function np(){if(_y)return ba;_y=1,Object.defineProperty(ba,"__esModule",{value:!0}),ba.resolveSchema=ba.getCompilingSchema=ba.resolveRef=ba.compileSchema=ba.SchemaEnv=void 0;const e=Re(),n=ap(),o=br(),l=Oc(),c=qe(),u=Rc();class d{constructor(w){var $;this.refs={},this.dynamicAnchors={};let N;typeof w.schema=="object"&&(N=w.schema),this.schema=w.schema,this.schemaId=w.schemaId,this.root=w.root||this,this.baseId=($=w.baseId)!==null&&$!==void 0?$:(0,l.normalizeId)(N==null?void 0:N[w.schemaId||"$id"]),this.schemaPath=w.schemaPath,this.localRefs=w.localRefs,this.meta=w.meta,this.$async=N==null?void 0:N.$async,this.refs={}}}ba.SchemaEnv=d;function p(z){const w=y.call(this,z);if(w)return w;const $=(0,l.getFullPath)(this.opts.uriResolver,z.root.baseId),{es5:N,lines:R}=this.opts.code,{ownProperties:_}=this.opts,S=new e.CodeGen(this.scope,{es5:N,lines:R,ownProperties:_});let C;z.$async&&(C=S.scopeValue("Error",{ref:n.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const U=S.scopeName("validate");z.validateName=U;const te={gen:S,allErrors:this.opts.allErrors,data:o.default.data,parentData:o.default.parentData,parentDataProperty:o.default.parentDataProperty,dataNames:[o.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:S.scopeValue("schema",this.opts.code.source===!0?{ref:z.schema,code:(0,e.stringify)(z.schema)}:{ref:z.schema}),validateName:U,ValidationError:C,schema:z.schema,schemaEnv:z,rootId:$,baseId:z.baseId||$,schemaPath:e.nil,errSchemaPath:z.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let G;try{this._compilations.add(z),(0,u.validateFunctionCode)(te),S.optimize(this.opts.code.optimize);const H=S.toString();G=`${S.scopeRefs(o.default.scope)}return ${H}`,this.opts.code.process&&(G=this.opts.code.process(G,z));const F=new Function(`${o.default.self}`,`${o.default.scope}`,G)(this,this.scope.get());if(this.scope.value(U,{ref:F}),F.errors=null,F.schema=z.schema,F.schemaEnv=z,z.$async&&(F.$async=!0),this.opts.code.source===!0&&(F.source={validateName:U,validateCode:H,scopeValues:S._values}),this.opts.unevaluated){const{props:ie,items:_e}=te;F.evaluated={props:ie instanceof e.Name?void 0:ie,items:_e instanceof e.Name?void 0:_e,dynamicProps:ie instanceof e.Name,dynamicItems:_e instanceof e.Name},F.source&&(F.source.evaluated=(0,e.stringify)(F.evaluated))}return z.validate=F,z}catch(H){throw delete z.validate,delete z.validateName,G&&this.logger.error("Error compiling schema, function code:",G),H}finally{this._compilations.delete(z)}}ba.compileSchema=p;function g(z,w,$){var N;$=(0,l.resolveUrl)(this.opts.uriResolver,w,$);const R=z.refs[$];if(R)return R;let _=j.call(this,z,$);if(_===void 0){const S=(N=z.localRefs)===null||N===void 0?void 0:N[$],{schemaId:C}=this.opts;S&&(_=new d({schema:S,schemaId:C,root:z,baseId:w}))}if(_!==void 0)return z.refs[$]=h.call(this,_)}ba.resolveRef=g;function h(z){return(0,l.inlineRef)(z.schema,this.opts.inlineRefs)?z.schema:z.validate?z:p.call(this,z)}function y(z){for(const w of this._compilations)if(v(w,z))return w}ba.getCompilingSchema=y;function v(z,w){return z.schema===w.schema&&z.root===w.root&&z.baseId===w.baseId}function j(z,w){let $;for(;typeof($=this.refs[w])=="string";)w=$;return $||this.schemas[w]||k.call(this,z,w)}function k(z,w){const $=this.opts.uriResolver.parse(w),N=(0,l._getFullPath)(this.opts.uriResolver,$);let R=(0,l.getFullPath)(this.opts.uriResolver,z.baseId,void 0);if(Object.keys(z.schema).length>0&&N===R)return E.call(this,$,z);const _=(0,l.normalizeId)(N),S=this.refs[_]||this.schemas[_];if(typeof S=="string"){const C=k.call(this,z,S);return typeof(C==null?void 0:C.schema)!="object"?void 0:E.call(this,$,C)}if(typeof(S==null?void 0:S.schema)=="object"){if(S.validate||p.call(this,S),_===(0,l.normalizeId)(w)){const{schema:C}=S,{schemaId:U}=this.opts,te=C[U];return te&&(R=(0,l.resolveUrl)(this.opts.uriResolver,R,te)),new d({schema:C,schemaId:U,root:z,baseId:R})}return E.call(this,$,S)}}ba.resolveSchema=k;const x=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function E(z,{baseId:w,schema:$,root:N}){var R;if(((R=z.fragment)===null||R===void 0?void 0:R[0])!=="/")return;for(const C of z.fragment.slice(1).split("/")){if(typeof $=="boolean")return;const U=$[(0,c.unescapeFragment)(C)];if(U===void 0)return;$=U;const te=typeof $=="object"&&$[this.opts.schemaId];!x.has(C)&&te&&(w=(0,l.resolveUrl)(this.opts.uriResolver,w,te))}let _;if(typeof $!="boolean"&&$.$ref&&!(0,c.schemaHasRulesButRef)($,this.RULES)){const C=(0,l.resolveUrl)(this.opts.uriResolver,w,$.$ref);_=k.call(this,N,C)}const{schemaId:S}=this.opts;if(_=_||new d({schema:$,schemaId:S,root:N,baseId:w}),_.schema!==_.root.schema)return _}return ba}const F3="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",Y3="Meta-schema for $data reference (JSON AnySchema extension proposal)",K3="object",J3=["$data"],X3={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},Q3=!1,W3={$id:F3,description:Y3,type:K3,required:J3,properties:X3,additionalProperties:Q3};var As={},Go={exports:{}},xf,jy;function R1(){if(jy)return xf;jy=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),n=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),o=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),l=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),c=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function u(_){let S="",C=0,U=0;for(U=0;U<_.length;U++)if(C=_[U].charCodeAt(0),C!==48){if(!(C>=48&&C<=57||C>=65&&C<=70||C>=97&&C<=102))return"";S+=_[U];break}for(U+=1;U<_.length;U++){if(C=_[U].charCodeAt(0),!(C>=48&&C<=57||C>=65&&C<=70||C>=97&&C<=102))return"";S+=_[U]}return S}const d=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function p(_){return _.length=0,!0}function g(_,S,C){if(_.length){const U=u(_);if(U!=="")S.push(U);else return C.error=!0,!1;_.length=0}return!0}function h(_){let S=0;const C={error:!1,address:"",zone:""},U=[],te=[];let G=!1,H=!1,Y=g;for(let F=0;F<_.length;F++){const ie=_[F];if(!(ie==="["||ie==="]"))if(ie===":"){if(G===!0&&(H=!0),!Y(te,U,C))break;if(++S>7){C.error=!0;break}F>0&&_[F-1]===":"&&(G=!0),U.push(":");continue}else if(ie==="%"){if(!Y(te,U,C))break;Y=p}else{te.push(ie);continue}}return te.length&&(Y===p?C.zone=te.join(""):H?U.push(te.join("")):U.push(u(te))),C.address=U.join(""),C}function y(_){if(v(_,":")<2)return{host:_,isIPV6:!1};const S=h(_);if(S.error)return{host:_,isIPV6:!1};{let C=S.address,U=S.address;return S.zone&&(C+="%"+S.zone,U+="%25"+S.zone),{host:C,isIPV6:!0,escapedHost:U}}}function v(_,S){let C=0;for(let U=0;U<_.length;U++)_[U]===S&&C++;return C}function j(_){let S=_;const C=[];let U=-1,te=0;for(;te=S.length;){if(te===1){if(S===".")break;if(S==="/"){C.push("/");break}else{C.push(S);break}}else if(te===2){if(S[0]==="."){if(S[1]===".")break;if(S[1]==="/"){S=S.slice(2);continue}}else if(S[0]==="/"&&(S[1]==="."||S[1]==="/")){C.push("/");break}}else if(te===3&&S==="/.."){C.length!==0&&C.pop(),C.push("/");break}if(S[0]==="."){if(S[1]==="."){if(S[2]==="/"){S=S.slice(3);continue}}else if(S[1]==="/"){S=S.slice(2);continue}}else if(S[0]==="/"&&S[1]==="."){if(S[2]==="/"){S=S.slice(2);continue}else if(S[2]==="."&&S[3]==="/"){S=S.slice(3),C.length!==0&&C.pop();continue}}if((U=S.indexOf("/",1))===-1){C.push(S);break}else C.push(S.slice(0,U)),S=S.slice(U)}return C.join("")}const k={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},x=/[@/?#:]/g,E=/[@/?#]/g;function z(_,S){const C=S?E:x;return C.lastIndex=0,_.replace(C,U=>k[U])}function w(_,S=!1){if(_.indexOf("%")===-1)return _;let C="";for(let U=0;U<_.length;U++){if(_[U]==="%"&&U+2<_.length){const te=_.slice(U+1,U+3);if(o(te)){const G=te.toUpperCase(),H=String.fromCharCode(parseInt(G,16));S&&l(H)?C+=H:C+="%"+G,U+=2;continue}}C+=_[U]}return C}function $(_){let S="";for(let C=0;C<_.length;C++){if(_[C]==="%"&&C+2<_.length){const U=_.slice(C+1,C+3);if(o(U)){const te=U.toUpperCase(),G=String.fromCharCode(parseInt(te,16));G!=="."&&l(G)?S+=G:S+="%"+te,C+=2;continue}}c(_[C])?S+=_[C]:S+=escape(_[C])}return S}function N(_){let S="";for(let C=0;C<_.length;C++){if(_[C]==="%"&&C+2<_.length){const U=_.slice(C+1,C+3);if(o(U)){S+="%"+U.toUpperCase(),C+=2;continue}}S+=escape(_[C])}return S}function R(_){const S=[];if(_.userinfo!==void 0&&(S.push(_.userinfo),S.push("@")),_.host!==void 0){let C=unescape(_.host);if(!n(C)){const U=y(C);U.isIPV6===!0?C=`[${U.escapedHost}]`:C=z(C,!1)}S.push(C)}return(typeof _.port=="number"||typeof _.port=="string")&&(S.push(":"),S.push(String(_.port))),S.length?S.join(""):void 0}return xf={nonSimpleDomain:d,recomposeAuthority:R,reescapeHostDelimiters:z,normalizePercentEncoding:w,normalizePathEncoding:$,escapePreservingEscapes:N,removeDotSegments:j,isIPv4:n,isUUID:e,normalizeIPv6:y,stringArrayToHexStripped:u},xf}var _f,Sy;function e6(){if(Sy)return _f;Sy=1;const{isUUID:e}=R1(),n=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,o=["http","https","ws","wss","urn","urn:uuid"];function l(_){return o.indexOf(_)!==-1}function c(_){return _.secure===!0?!0:_.secure===!1?!1:_.scheme?_.scheme.length===3&&(_.scheme[0]==="w"||_.scheme[0]==="W")&&(_.scheme[1]==="s"||_.scheme[1]==="S")&&(_.scheme[2]==="s"||_.scheme[2]==="S"):!1}function u(_){return _.host||(_.error=_.error||"HTTP URIs must have a host."),_}function d(_){const S=String(_.scheme).toLowerCase()==="https";return(_.port===(S?443:80)||_.port==="")&&(_.port=void 0),_.path||(_.path="/"),_}function p(_){return _.secure=c(_),_.resourceName=(_.path||"/")+(_.query?"?"+_.query:""),_.path=void 0,_.query=void 0,_}function g(_){if((_.port===(c(_)?443:80)||_.port==="")&&(_.port=void 0),typeof _.secure=="boolean"&&(_.scheme=_.secure?"wss":"ws",_.secure=void 0),_.resourceName){const[S,C]=_.resourceName.split("?");_.path=S&&S!=="/"?S:void 0,_.query=C,_.resourceName=void 0}return _.fragment=void 0,_}function h(_,S){if(!_.path)return _.error="URN can not be parsed",_;const C=_.path.match(n);if(C){const U=S.scheme||_.scheme||"urn";_.nid=C[1].toLowerCase(),_.nss=C[2];const te=`${U}:${S.nid||_.nid}`,G=R(te);_.path=void 0,G&&(_=G.parse(_,S))}else _.error=_.error||"URN can not be parsed.";return _}function y(_,S){if(_.nid===void 0)throw new Error("URN without nid cannot be serialized");const C=S.scheme||_.scheme||"urn",U=_.nid.toLowerCase(),te=`${C}:${S.nid||U}`,G=R(te);G&&(_=G.serialize(_,S));const H=_,Y=_.nss;return H.path=`${U||S.nid}:${Y}`,S.skipEscape=!0,H}function v(_,S){const C=_;return C.uuid=C.nss,C.nss=void 0,!S.tolerant&&(!C.uuid||!e(C.uuid))&&(C.error=C.error||"UUID is not valid."),C}function j(_){const S=_;return S.nss=(_.uuid||"").toLowerCase(),S}const k={scheme:"http",domainHost:!0,parse:u,serialize:d},x={scheme:"https",domainHost:k.domainHost,parse:u,serialize:d},E={scheme:"ws",domainHost:!0,parse:p,serialize:g},z={scheme:"wss",domainHost:E.domainHost,parse:E.parse,serialize:E.serialize},N={http:k,https:x,ws:E,wss:z,urn:{scheme:"urn",parse:h,serialize:y,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:v,serialize:j,skipNormalize:!0}};Object.setPrototypeOf(N,null);function R(_){return _&&(N[_]||N[_.toLowerCase()])||void 0}return _f={wsIsSecure:c,SCHEMES:N,isValidSchemeName:l,getSchemeHandler:R},_f}var wy;function t6(){if(wy)return Go.exports;wy=1;const{normalizeIPv6:e,removeDotSegments:n,recomposeAuthority:o,normalizePercentEncoding:l,normalizePathEncoding:c,escapePreservingEscapes:u,reescapeHostDelimiters:d,isIPv4:p,nonSimpleDomain:g}=R1(),{SCHEMES:h,getSchemeHandler:y}=e6();function v(G,H){return typeof G=="string"?G=S(G,H):typeof G=="object"&&(G=_(E(G,H),H)),G}function j(G,H,Y){const F=Y?Object.assign({scheme:"null"},Y):{scheme:"null"},{parsed:ie,malformedAuthorityOrPort:_e}=R(G,F),{parsed:ae,malformedAuthorityOrPort:fe}=R(H,F);if(_e||fe)throw new Error(ie.error||ae.error||"URI is malformed.");const ge=k(ie,ae,F,!0);return F.skipEscape=!0,E(ge,F)}function k(G,H,Y,F){const ie={};return F||(G=_(E(G,Y),Y),H=_(E(H,Y),Y)),Y=Y||{},!Y.tolerant&&H.scheme?(ie.scheme=H.scheme,ie.userinfo=H.userinfo,ie.host=H.host,ie.port=H.port,ie.path=n(H.path||""),ie.query=H.query):(H.userinfo!==void 0||H.host!==void 0||H.port!==void 0?(ie.userinfo=H.userinfo,ie.host=H.host,ie.port=H.port,ie.path=n(H.path||""),ie.query=H.query):(H.path?(H.path[0]==="/"?ie.path=n(H.path):((G.userinfo!==void 0||G.host!==void 0||G.port!==void 0)&&!G.path?ie.path="/"+H.path:G.path?ie.path=G.path.slice(0,G.path.lastIndexOf("/")+1)+H.path:ie.path=H.path,ie.path=n(ie.path)),ie.query=H.query):(ie.path=G.path,H.query!==void 0?ie.query=H.query:ie.query=G.query),ie.userinfo=G.userinfo,ie.host=G.host,ie.port=G.port),ie.scheme=G.scheme),ie.fragment=H.fragment,ie}function x(G,H,Y){const F=U(G,Y),ie=U(H,Y);return F!==void 0&&ie!==void 0&&F.toLowerCase()===ie.toLowerCase()}function E(G,H){const Y={host:G.host,scheme:G.scheme,userinfo:G.userinfo,port:G.port,path:G.path,query:G.query,nid:G.nid,nss:G.nss,uuid:G.uuid,fragment:G.fragment,reference:G.reference,resourceName:G.resourceName,secure:G.secure,error:""},F=Object.assign({},H),ie=[],_e=y(F.scheme||Y.scheme);_e&&_e.serialize&&_e.serialize(Y,F),Y.path!==void 0&&(F.skipEscape?Y.path=l(Y.path):(Y.path=u(Y.path),Y.scheme!==void 0&&(Y.path=Y.path.split("%3A").join(":")))),F.reference!=="suffix"&&Y.scheme&&ie.push(Y.scheme,":");const ae=o(Y);if(ae!==void 0&&(F.reference!=="suffix"&&ie.push("//"),ie.push(ae),Y.path&&Y.path[0]!=="/"&&ie.push("/")),Y.path!==void 0){let fe=Y.path;!F.absolutePath&&(!_e||!_e.absolutePath)&&(fe=n(fe)),ae===void 0&&fe[0]==="/"&&fe[1]==="/"&&(fe="/%2F"+fe.slice(2)),ie.push(fe)}return Y.query!==void 0&&ie.push("?",Y.query),Y.fragment!==void 0&&ie.push("#",Y.fragment),ie.join("")}const z=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,w=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,$=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function N(G,H){if(H[2]!==void 0&&G.path&&G.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof G.port=="number"&&(G.port<0||G.port>65535))return"URI port is malformed."}function R(G,H){const Y=Object.assign({},H),F={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let ie=!1,_e=!1;Y.reference==="suffix"&&(Y.scheme?G=Y.scheme+":"+G:G="//"+G);const ae=G.match(w);ae!==null&&ae[1].indexOf("\\")!==-1&&(F.error="URI authority must not contain a literal backslash.",ie=!0);const fe=G.match($);if(fe!==null){const ke=fe[1],re=ke.replace(/[\t\n\r]/g,"");re.length>=2&&(re.slice(0,2)!=="//"?(F.error=F.error||"URI authority must not contain a literal backslash.",ie=!0):ke.length!==re.length&&(F.error=F.error||"URI authority introducer must not contain whitespace.",ie=!0))}const ge=G.match(z);if(ge){F.scheme=ge[1],F.userinfo=ge[3],F.host=ge[4],F.port=parseInt(ge[5],10),F.path=ge[6]||"",F.query=ge[7],F.fragment=ge[8],isNaN(F.port)&&(F.port=ge[5]);const ke=N(F,ge);if(ke!==void 0&&(F.error=F.error||ke,ie=!0),F.host)if(p(F.host)===!1){const V=e(F.host);F.host=V.host.toLowerCase(),_e=V.isIPV6}else _e=!0;F.scheme===void 0&&F.userinfo===void 0&&F.host===void 0&&F.port===void 0&&F.query===void 0&&!F.path?F.reference="same-document":F.scheme===void 0?F.reference="relative":F.fragment===void 0?F.reference="absolute":F.reference="uri",Y.reference&&Y.reference!=="suffix"&&Y.reference!==F.reference&&(F.error=F.error||"URI is not a "+Y.reference+" reference.");const re=y(Y.scheme||F.scheme);if(!Y.unicodeSupport&&(!re||!re.unicodeSupport)&&F.host&&(Y.domainHost||re&&re.domainHost)&&_e===!1&&g(F.host))try{F.host=new URL("http://"+F.host).hostname}catch(T){F.error=F.error||"Host's domain name can not be converted to ASCII: "+T}if((!re||re&&!re.skipNormalize)&&(G.indexOf("%")!==-1&&(F.scheme!==void 0&&(F.scheme=unescape(F.scheme)),F.host!==void 0&&(F.host=d(unescape(F.host),_e))),F.path&&(F.path=c(F.path)),F.fragment))try{F.fragment=encodeURI(decodeURIComponent(F.fragment))}catch{F.error=F.error||"URI malformed"}re&&re.parse&&re.parse(F,Y)}else F.error=F.error||"URI can not be parsed.";return{parsed:F,malformedAuthorityOrPort:ie}}function _(G,H){return R(G,H).parsed}function S(G,H){return C(G,H).normalized}function C(G,H){const{parsed:Y,malformedAuthorityOrPort:F}=R(G,H);return{normalized:F?G:E(Y,H),malformedAuthorityOrPort:F}}function U(G,H){if(typeof G=="string"){const{normalized:Y,malformedAuthorityOrPort:F}=C(G,H);return F?void 0:Y}if(typeof G=="object")return E(G,H)}const te={SCHEMES:h,normalize:v,resolve:j,resolveComponent:k,equal:x,serialize:E,parse:_};return Go.exports=te,Go.exports.default=te,Go.exports.fastUri=te,Go.exports}var ky;function a6(){if(ky)return As;ky=1,Object.defineProperty(As,"__esModule",{value:!0});const e=t6();return e.code='require("ajv/dist/runtime/uri").default',As.default=e,As}var Ny;function n6(){return Ny||(Ny=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var n=Rc();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return n.KeywordCxt}});var o=Re();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return o._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return o.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return o.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return o.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return o.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return o.CodeGen}});const l=ap(),c=Ac(),u=T1(),d=np(),p=Re(),g=Oc(),h=kc(),y=qe(),v=W3,j=a6(),k=(re,T)=>new RegExp(re,T);k.code="new RegExp";const x=["removeAdditional","useDefaults","coerceTypes"],E=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),z={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."},w={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},$=200;function N(re){var T,V,L,O,A,J,pe,he,Se,Te,P,W,ue,me,ve,ze,zt,Qt,Ct,Tt,ht,_n,Wt,Dt,Ki;const jn=re.strict,Fr=(T=re.code)===null||T===void 0?void 0:T.optimize,xr=Fr===!0||Fr===void 0?1:Fr||0,sl=(L=(V=re.code)===null||V===void 0?void 0:V.regExp)!==null&&L!==void 0?L:k,cl=(O=re.uriResolver)!==null&&O!==void 0?O:j.default;return{strictSchema:(J=(A=re.strictSchema)!==null&&A!==void 0?A:jn)!==null&&J!==void 0?J:!0,strictNumbers:(he=(pe=re.strictNumbers)!==null&&pe!==void 0?pe:jn)!==null&&he!==void 0?he:!0,strictTypes:(Te=(Se=re.strictTypes)!==null&&Se!==void 0?Se:jn)!==null&&Te!==void 0?Te:"log",strictTuples:(W=(P=re.strictTuples)!==null&&P!==void 0?P:jn)!==null&&W!==void 0?W:"log",strictRequired:(me=(ue=re.strictRequired)!==null&&ue!==void 0?ue:jn)!==null&&me!==void 0?me:!1,code:re.code?{...re.code,optimize:xr,regExp:sl}:{optimize:xr,regExp:sl},loopRequired:(ve=re.loopRequired)!==null&&ve!==void 0?ve:$,loopEnum:(ze=re.loopEnum)!==null&&ze!==void 0?ze:$,meta:(zt=re.meta)!==null&&zt!==void 0?zt:!0,messages:(Qt=re.messages)!==null&&Qt!==void 0?Qt:!0,inlineRefs:(Ct=re.inlineRefs)!==null&&Ct!==void 0?Ct:!0,schemaId:(Tt=re.schemaId)!==null&&Tt!==void 0?Tt:"$id",addUsedSchema:(ht=re.addUsedSchema)!==null&&ht!==void 0?ht:!0,validateSchema:(_n=re.validateSchema)!==null&&_n!==void 0?_n:!0,validateFormats:(Wt=re.validateFormats)!==null&&Wt!==void 0?Wt:!0,unicodeRegExp:(Dt=re.unicodeRegExp)!==null&&Dt!==void 0?Dt:!0,int32range:(Ki=re.int32range)!==null&&Ki!==void 0?Ki:!0,uriResolver:cl}}class R{constructor(T={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,T=this.opts={...T,...N(T)};const{es5:V,lines:L}=this.opts.code;this.scope=new p.ValueScope({scope:{},prefixes:E,es5:V,lines:L}),this.logger=Y(T.logger);const O=T.validateFormats;T.validateFormats=!1,this.RULES=(0,u.getRules)(),_.call(this,z,T,"NOT SUPPORTED"),_.call(this,w,T,"DEPRECATED","warn"),this._metaOpts=G.call(this),T.formats&&U.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),T.keywords&&te.call(this,T.keywords),typeof T.meta=="object"&&this.addMetaSchema(T.meta),C.call(this),T.validateFormats=O}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:T,meta:V,schemaId:L}=this.opts;let O=v;L==="id"&&(O={...v},O.id=O.$id,delete O.$id),V&&T&&this.addMetaSchema(O,O[L],!1)}defaultMeta(){const{meta:T,schemaId:V}=this.opts;return this.opts.defaultMeta=typeof T=="object"?T[V]||T:void 0}validate(T,V){let L;if(typeof T=="string"){if(L=this.getSchema(T),!L)throw new Error(`no schema with key or ref "${T}"`)}else L=this.compile(T);const O=L(V);return"$async"in L||(this.errors=L.errors),O}compile(T,V){const L=this._addSchema(T,V);return L.validate||this._compileSchemaEnv(L)}compileAsync(T,V){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:L}=this.opts;return O.call(this,T,V);async function O(Te,P){await A.call(this,Te.$schema);const W=this._addSchema(Te,P);return W.validate||J.call(this,W)}async function A(Te){Te&&!this.getSchema(Te)&&await O.call(this,{$ref:Te},!0)}async function J(Te){try{return this._compileSchemaEnv(Te)}catch(P){if(!(P instanceof c.default))throw P;return pe.call(this,P),await he.call(this,P.missingSchema),J.call(this,Te)}}function pe({missingSchema:Te,missingRef:P}){if(this.refs[Te])throw new Error(`AnySchema ${Te} is loaded but ${P} cannot be resolved`)}async function he(Te){const P=await Se.call(this,Te);this.refs[Te]||await A.call(this,P.$schema),this.refs[Te]||this.addSchema(P,Te,V)}async function Se(Te){const P=this._loading[Te];if(P)return P;try{return await(this._loading[Te]=L(Te))}finally{delete this._loading[Te]}}}addSchema(T,V,L,O=this.opts.validateSchema){if(Array.isArray(T)){for(const J of T)this.addSchema(J,void 0,L,O);return this}let A;if(typeof T=="object"){const{schemaId:J}=this.opts;if(A=T[J],A!==void 0&&typeof A!="string")throw new Error(`schema ${J} must be string`)}return V=(0,g.normalizeId)(V||A),this._checkUnique(V),this.schemas[V]=this._addSchema(T,L,V,O,!0),this}addMetaSchema(T,V,L=this.opts.validateSchema){return this.addSchema(T,V,!0,L),this}validateSchema(T,V){if(typeof T=="boolean")return!0;let L;if(L=T.$schema,L!==void 0&&typeof L!="string")throw new Error("$schema must be a string");if(L=L||this.opts.defaultMeta||this.defaultMeta(),!L)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const O=this.validate(L,T);if(!O&&V){const A="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(A);else throw new Error(A)}return O}getSchema(T){let V;for(;typeof(V=S.call(this,T))=="string";)T=V;if(V===void 0){const{schemaId:L}=this.opts,O=new d.SchemaEnv({schema:{},schemaId:L});if(V=d.resolveSchema.call(this,O,T),!V)return;this.refs[T]=V}return V.validate||this._compileSchemaEnv(V)}removeSchema(T){if(T instanceof RegExp)return this._removeAllSchemas(this.schemas,T),this._removeAllSchemas(this.refs,T),this;switch(typeof T){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const V=S.call(this,T);return typeof V=="object"&&this._cache.delete(V.schema),delete this.schemas[T],delete this.refs[T],this}case"object":{const V=T;this._cache.delete(V);let L=T[this.opts.schemaId];return L&&(L=(0,g.normalizeId)(L),delete this.schemas[L],delete this.refs[L]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(T){for(const V of T)this.addKeyword(V);return this}addKeyword(T,V){let L;if(typeof T=="string")L=T,typeof V=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),V.keyword=L);else if(typeof T=="object"&&V===void 0){if(V=T,L=V.keyword,Array.isArray(L)&&!L.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(ie.call(this,L,V),!V)return(0,y.eachItem)(L,A=>_e.call(this,A)),this;fe.call(this,V);const O={...V,type:(0,h.getJSONTypes)(V.type),schemaType:(0,h.getJSONTypes)(V.schemaType)};return(0,y.eachItem)(L,O.type.length===0?A=>_e.call(this,A,O):A=>O.type.forEach(J=>_e.call(this,A,O,J))),this}getKeyword(T){const V=this.RULES.all[T];return typeof V=="object"?V.definition:!!V}removeKeyword(T){const{RULES:V}=this;delete V.keywords[T],delete V.all[T];for(const L of V.rules){const O=L.rules.findIndex(A=>A.keyword===T);O>=0&&L.rules.splice(O,1)}return this}addFormat(T,V){return typeof V=="string"&&(V=new RegExp(V)),this.formats[T]=V,this}errorsText(T=this.errors,{separator:V=", ",dataVar:L="data"}={}){return!T||T.length===0?"No errors":T.map(O=>`${L}${O.instancePath} ${O.message}`).reduce((O,A)=>O+V+A)}$dataMetaSchema(T,V){const L=this.RULES.all;T=JSON.parse(JSON.stringify(T));for(const O of V){const A=O.split("/").slice(1);let J=T;for(const pe of A)J=J[pe];for(const pe in L){const he=L[pe];if(typeof he!="object")continue;const{$data:Se}=he.definition,Te=J[pe];Se&&Te&&(J[pe]=ke(Te))}}return T}_removeAllSchemas(T,V){for(const L in T){const O=T[L];(!V||V.test(L))&&(typeof O=="string"?delete T[L]:O&&!O.meta&&(this._cache.delete(O.schema),delete T[L]))}}_addSchema(T,V,L,O=this.opts.validateSchema,A=this.opts.addUsedSchema){let J;const{schemaId:pe}=this.opts;if(typeof T=="object")J=T[pe];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof T!="boolean")throw new Error("schema must be object or boolean")}let he=this._cache.get(T);if(he!==void 0)return he;L=(0,g.normalizeId)(J||L);const Se=g.getSchemaRefs.call(this,T,L);return he=new d.SchemaEnv({schema:T,schemaId:pe,meta:V,baseId:L,localRefs:Se}),this._cache.set(he.schema,he),A&&!L.startsWith("#")&&(L&&this._checkUnique(L),this.refs[L]=he),O&&this.validateSchema(T,!0),he}_checkUnique(T){if(this.schemas[T]||this.refs[T])throw new Error(`schema with key or id "${T}" already exists`)}_compileSchemaEnv(T){if(T.meta?this._compileMetaSchema(T):d.compileSchema.call(this,T),!T.validate)throw new Error("ajv implementation error");return T.validate}_compileMetaSchema(T){const V=this.opts;this.opts=this._metaOpts;try{d.compileSchema.call(this,T)}finally{this.opts=V}}}R.ValidationError=l.default,R.MissingRefError=c.default,e.default=R;function _(re,T,V,L="error"){for(const O in re){const A=O;A in T&&this.logger[L](`${V}: option ${O}. ${re[A]}`)}}function S(re){return re=(0,g.normalizeId)(re),this.schemas[re]||this.refs[re]}function C(){const re=this.opts.schemas;if(re)if(Array.isArray(re))this.addSchema(re);else for(const T in re)this.addSchema(re[T],T)}function U(){for(const re in this.opts.formats){const T=this.opts.formats[re];T&&this.addFormat(re,T)}}function te(re){if(Array.isArray(re)){this.addVocabulary(re);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const T in re){const V=re[T];V.keyword||(V.keyword=T),this.addKeyword(V)}}function G(){const re={...this.opts};for(const T of x)delete re[T];return re}const H={log(){},warn(){},error(){}};function Y(re){if(re===!1)return H;if(re===void 0)return console;if(re.log&&re.warn&&re.error)return re;throw new Error("logger must implement log, warn and error methods")}const F=/^[a-z_$][a-z0-9_$:-]*$/i;function ie(re,T){const{RULES:V}=this;if((0,y.eachItem)(re,L=>{if(V.keywords[L])throw new Error(`Keyword ${L} is already defined`);if(!F.test(L))throw new Error(`Keyword ${L} has invalid name`)}),!!T&&T.$data&&!("code"in T||"validate"in T))throw new Error('$data keyword must have "code" or "validate" function')}function _e(re,T,V){var L;const O=T==null?void 0:T.post;if(V&&O)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:A}=this;let J=O?A.post:A.rules.find(({type:he})=>he===V);if(J||(J={type:V,rules:[]},A.rules.push(J)),A.keywords[re]=!0,!T)return;const pe={keyword:re,definition:{...T,type:(0,h.getJSONTypes)(T.type),schemaType:(0,h.getJSONTypes)(T.schemaType)}};T.before?ae.call(this,J,pe,T.before):J.rules.push(pe),A.all[re]=pe,(L=T.implements)===null||L===void 0||L.forEach(he=>this.addKeyword(he))}function ae(re,T,V){const L=re.rules.findIndex(O=>O.keyword===V);L>=0?re.rules.splice(L,0,T):(re.rules.push(T),this.logger.warn(`rule ${V} is not defined`))}function fe(re){let{metaSchema:T}=re;T!==void 0&&(re.$data&&this.opts.$data&&(T=ke(T)),re.validateSchema=this.compile(T,!0))}const ge={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ke(re){return{anyOf:[re,ge]}}})(gf)),gf}var Ds={},Us={},Is={},zy;function r6(){if(zy)return Is;zy=1,Object.defineProperty(Is,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return Is.default=e,Is}var Kn={},Ey;function i6(){if(Ey)return Kn;Ey=1,Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.callRef=Kn.getValidate=void 0;const e=Ac(),n=La(),o=Re(),l=br(),c=np(),u=qe(),d={keyword:"$ref",schemaType:"string",code(h){const{gen:y,schema:v,it:j}=h,{baseId:k,schemaEnv:x,validateName:E,opts:z,self:w}=j,{root:$}=x;if((v==="#"||v==="#/")&&k===$.baseId)return R();const N=c.resolveRef.call(w,$,k,v);if(N===void 0)throw new e.default(j.opts.uriResolver,k,v);if(N instanceof c.SchemaEnv)return _(N);return S(N);function R(){if(x===$)return g(h,E,x,x.$async);const C=y.scopeValue("root",{ref:$});return g(h,(0,o._)`${C}.validate`,$,$.$async)}function _(C){const U=p(h,C);g(h,U,C,C.$async)}function S(C){const U=y.scopeValue("schema",z.code.source===!0?{ref:C,code:(0,o.stringify)(C)}:{ref:C}),te=y.name("valid"),G=h.subschema({schema:C,dataTypes:[],schemaPath:o.nil,topSchemaRef:U,errSchemaPath:v},te);h.mergeEvaluated(G),h.ok(te)}}};function p(h,y){const{gen:v}=h;return y.validate?v.scopeValue("validate",{ref:y.validate}):(0,o._)`${v.scopeValue("wrapper",{ref:y})}.validate`}Kn.getValidate=p;function g(h,y,v,j){const{gen:k,it:x}=h,{allErrors:E,schemaEnv:z,opts:w}=x,$=w.passContext?l.default.this:o.nil;j?N():R();function N(){if(!z.$async)throw new Error("async schema referenced by sync schema");const C=k.let("valid");k.try(()=>{k.code((0,o._)`await ${(0,n.callValidateCode)(h,y,$)}`),S(y),E||k.assign(C,!0)},U=>{k.if((0,o._)`!(${U} instanceof ${x.ValidationError})`,()=>k.throw(U)),_(U),E||k.assign(C,!1)}),h.ok(C)}function R(){h.result((0,n.callValidateCode)(h,y,$),()=>S(y),()=>_(y))}function _(C){const U=(0,o._)`${C}.errors`;k.assign(l.default.vErrors,(0,o._)`${l.default.vErrors} === null ? ${U} : ${l.default.vErrors}.concat(${U})`),k.assign(l.default.errors,(0,o._)`${l.default.vErrors}.length`)}function S(C){var U;if(!x.opts.unevaluated)return;const te=(U=v==null?void 0:v.validate)===null||U===void 0?void 0:U.evaluated;if(x.props!==!0)if(te&&!te.dynamicProps)te.props!==void 0&&(x.props=u.mergeEvaluated.props(k,te.props,x.props));else{const G=k.var("props",(0,o._)`${C}.evaluated.props`);x.props=u.mergeEvaluated.props(k,G,x.props,o.Name)}if(x.items!==!0)if(te&&!te.dynamicItems)te.items!==void 0&&(x.items=u.mergeEvaluated.items(k,te.items,x.items));else{const G=k.var("items",(0,o._)`${C}.evaluated.items`);x.items=u.mergeEvaluated.items(k,G,x.items,o.Name)}}}return Kn.callRef=g,Kn.default=d,Kn}var Cy;function o6(){if(Cy)return Us;Cy=1,Object.defineProperty(Us,"__esModule",{value:!0});const e=r6(),n=i6(),o=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,n.default];return Us.default=o,Us}var Ls={},Vs={},Ty;function l6(){if(Ty)return Vs;Ty=1,Object.defineProperty(Vs,"__esModule",{value:!0});const e=Re(),n=e.operators,o={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}},l={message:({keyword:u,schemaCode:d})=>(0,e.str)`must be ${o[u].okStr} ${d}`,params:({keyword:u,schemaCode:d})=>(0,e._)`{comparison: ${o[u].okStr}, limit: ${d}}`},c={keyword:Object.keys(o),type:"number",schemaType:"number",$data:!0,error:l,code(u){const{keyword:d,data:p,schemaCode:g}=u;u.fail$data((0,e._)`${p} ${o[d].fail} ${g} || isNaN(${p})`)}};return Vs.default=c,Vs}var Bs={},My;function s6(){if(My)return Bs;My=1,Object.defineProperty(Bs,"__esModule",{value:!0});const e=Re(),o={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:l})=>(0,e.str)`must be multiple of ${l}`,params:({schemaCode:l})=>(0,e._)`{multipleOf: ${l}}`},code(l){const{gen:c,data:u,schemaCode:d,it:p}=l,g=p.opts.multipleOfPrecision,h=c.let("res"),y=g?(0,e._)`Math.abs(Math.round(${h}) - ${h}) > 1e-${g}`:(0,e._)`${h} !== parseInt(${h})`;l.fail$data((0,e._)`(${d} === 0 || (${h} = ${u}/${d}, ${y}))`)}};return Bs.default=o,Bs}var Hs={},qs={},Oy;function A1(){if(Oy)return qs;Oy=1,Object.defineProperty(qs,"__esModule",{value:!0});function e(n){const o=n.length;let l=0,c=0,u;for(;c<o;)l++,u=n.charCodeAt(c++),u>=55296&&u<=56319&&c<o&&(u=n.charCodeAt(c),(u&64512)===56320&&c++);return l}return qs.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',qs}var Ry;function c6(){if(Ry)return Hs;Ry=1,Object.defineProperty(Hs,"__esModule",{value:!0});const e=Re(),n=qe(),o=A1(),c={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:u,schemaCode:d}){const p=u==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${p} than ${d} characters`},params:({schemaCode:u})=>(0,e._)`{limit: ${u}}`},code(u){const{keyword:d,data:p,schemaCode:g,it:h}=u,y=d==="maxLength"?e.operators.GT:e.operators.LT,v=h.opts.unicode===!1?(0,e._)`${p}.length`:(0,e._)`${(0,n.useFunc)(u.gen,o.default)}(${p})`;u.fail$data((0,e._)`${v} ${y} ${g}`)}};return Hs.default=c,Hs}var Ps={},Ay;function u6(){if(Ay)return Ps;Ay=1,Object.defineProperty(Ps,"__esModule",{value:!0});const e=La(),n=qe(),o=Re(),c={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:u})=>(0,o.str)`must match pattern "${u}"`,params:({schemaCode:u})=>(0,o._)`{pattern: ${u}}`},code(u){const{gen:d,data:p,$data:g,schema:h,schemaCode:y,it:v}=u,j=v.opts.unicodeRegExp?"u":"";if(g){const{regExp:k}=v.opts.code,x=k.code==="new RegExp"?(0,o._)`new RegExp`:(0,n.useFunc)(d,k),E=d.let("valid");d.try(()=>d.assign(E,(0,o._)`${x}(${y}, ${j}).test(${p})`),()=>d.assign(E,!1)),u.fail$data((0,o._)`!${E}`)}else{const k=(0,e.usePattern)(u,h);u.fail$data((0,o._)`!${k}.test(${p})`)}}};return Ps.default=c,Ps}var Zs={},Dy;function d6(){if(Dy)return Zs;Dy=1,Object.defineProperty(Zs,"__esModule",{value:!0});const e=Re(),o={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:l,schemaCode:c}){const u=l==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${u} than ${c} properties`},params:({schemaCode:l})=>(0,e._)`{limit: ${l}}`},code(l){const{keyword:c,data:u,schemaCode:d}=l,p=c==="maxProperties"?e.operators.GT:e.operators.LT;l.fail$data((0,e._)`Object.keys(${u}).length ${p} ${d}`)}};return Zs.default=o,Zs}var Gs={},Uy;function f6(){if(Uy)return Gs;Uy=1,Object.defineProperty(Gs,"__esModule",{value:!0});const e=La(),n=Re(),o=qe(),c={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:u}})=>(0,n.str)`must have required property '${u}'`,params:({params:{missingProperty:u}})=>(0,n._)`{missingProperty: ${u}}`},code(u){const{gen:d,schema:p,schemaCode:g,data:h,$data:y,it:v}=u,{opts:j}=v;if(!y&&p.length===0)return;const k=p.length>=j.loopRequired;if(v.allErrors?x():E(),j.strictRequired){const $=u.parentSchema.properties,{definedProperties:N}=u.it;for(const R of p)if(($==null?void 0:$[R])===void 0&&!N.has(R)){const _=v.schemaEnv.baseId+v.errSchemaPath,S=`required property "${R}" is not defined at "${_}" (strictRequired)`;(0,o.checkStrictMode)(v,S,v.opts.strictRequired)}}function x(){if(k||y)u.block$data(n.nil,z);else for(const $ of p)(0,e.checkReportMissingProp)(u,$)}function E(){const $=d.let("missing");if(k||y){const N=d.let("valid",!0);u.block$data(N,()=>w($,N)),u.ok(N)}else d.if((0,e.checkMissingProp)(u,p,$)),(0,e.reportMissingProp)(u,$),d.else()}function z(){d.forOf("prop",g,$=>{u.setParams({missingProperty:$}),d.if((0,e.noPropertyInData)(d,h,$,j.ownProperties),()=>u.error())})}function w($,N){u.setParams({missingProperty:$}),d.forOf($,g,()=>{d.assign(N,(0,e.propertyInData)(d,h,$,j.ownProperties)),d.if((0,n.not)(N),()=>{u.error(),d.break()})},n.nil)}}};return Gs.default=c,Gs}var Fs={},Iy;function p6(){if(Iy)return Fs;Iy=1,Object.defineProperty(Fs,"__esModule",{value:!0});const e=Re(),o={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:l,schemaCode:c}){const u=l==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${u} than ${c} items`},params:({schemaCode:l})=>(0,e._)`{limit: ${l}}`},code(l){const{keyword:c,data:u,schemaCode:d}=l,p=c==="maxItems"?e.operators.GT:e.operators.LT;l.fail$data((0,e._)`${u}.length ${p} ${d}`)}};return Fs.default=o,Fs}var Ys={},Ks={},Ly;function Dc(){if(Ly)return Ks;Ly=1,Object.defineProperty(Ks,"__esModule",{value:!0});const e=O1();return e.code='require("ajv/dist/runtime/equal").default',Ks.default=e,Ks}var Vy;function g6(){if(Vy)return Ys;Vy=1,Object.defineProperty(Ys,"__esModule",{value:!0});const e=kc(),n=Re(),o=qe(),l=Dc(),u={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:d,j:p}})=>(0,n.str)`must NOT have duplicate items (items ## ${p} and ${d} are identical)`,params:({params:{i:d,j:p}})=>(0,n._)`{i: ${d}, j: ${p}}`},code(d){const{gen:p,data:g,$data:h,schema:y,parentSchema:v,schemaCode:j,it:k}=d;if(!h&&!y)return;const x=p.let("valid"),E=v.items?(0,e.getSchemaTypes)(v.items):[];d.block$data(x,z,(0,n._)`${j} === false`),d.ok(x);function z(){const R=p.let("i",(0,n._)`${g}.length`),_=p.let("j");d.setParams({i:R,j:_}),p.assign(x,!0),p.if((0,n._)`${R} > 1`,()=>(w()?$:N)(R,_))}function w(){return E.length>0&&!E.some(R=>R==="object"||R==="array")}function $(R,_){const S=p.name("item"),C=(0,e.checkDataTypes)(E,S,k.opts.strictNumbers,e.DataType.Wrong),U=p.const("indices",(0,n._)`{}`);p.for((0,n._)`;${R}--;`,()=>{p.let(S,(0,n._)`${g}[${R}]`),p.if(C,(0,n._)`continue`),E.length>1&&p.if((0,n._)`typeof ${S} == "string"`,(0,n._)`${S} += "_"`),p.if((0,n._)`typeof ${U}[${S}] == "number"`,()=>{p.assign(_,(0,n._)`${U}[${S}]`),d.error(),p.assign(x,!1).break()}).code((0,n._)`${U}[${S}] = ${R}`)})}function N(R,_){const S=(0,o.useFunc)(p,l.default),C=p.name("outer");p.label(C).for((0,n._)`;${R}--;`,()=>p.for((0,n._)`${_} = ${R}; ${_}--;`,()=>p.if((0,n._)`${S}(${g}[${R}], ${g}[${_}])`,()=>{d.error(),p.assign(x,!1).break(C)})))}}};return Ys.default=u,Ys}var Js={},By;function m6(){if(By)return Js;By=1,Object.defineProperty(Js,"__esModule",{value:!0});const e=Re(),n=qe(),o=Dc(),c={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:u})=>(0,e._)`{allowedValue: ${u}}`},code(u){const{gen:d,data:p,$data:g,schemaCode:h,schema:y}=u;g||y&&typeof y=="object"?u.fail$data((0,e._)`!${(0,n.useFunc)(d,o.default)}(${p}, ${h})`):u.fail((0,e._)`${y} !== ${p}`)}};return Js.default=c,Js}var Xs={},Hy;function h6(){if(Hy)return Xs;Hy=1,Object.defineProperty(Xs,"__esModule",{value:!0});const e=Re(),n=qe(),o=Dc(),c={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:u})=>(0,e._)`{allowedValues: ${u}}`},code(u){const{gen:d,data:p,$data:g,schema:h,schemaCode:y,it:v}=u;if(!g&&h.length===0)throw new Error("enum must have non-empty array");const j=h.length>=v.opts.loopEnum;let k;const x=()=>k??(k=(0,n.useFunc)(d,o.default));let E;if(j||g)E=d.let("valid"),u.block$data(E,z);else{if(!Array.isArray(h))throw new Error("ajv implementation error");const $=d.const("vSchema",y);E=(0,e.or)(...h.map((N,R)=>w($,R)))}u.pass(E);function z(){d.assign(E,!1),d.forOf("v",y,$=>d.if((0,e._)`${x()}(${p}, ${$})`,()=>d.assign(E,!0).break()))}function w($,N){const R=h[N];return typeof R=="object"&&R!==null?(0,e._)`${x()}(${p}, ${$}[${N}])`:(0,e._)`${p} === ${R}`}}};return Xs.default=c,Xs}var qy;function y6(){if(qy)return Ls;qy=1,Object.defineProperty(Ls,"__esModule",{value:!0});const e=l6(),n=s6(),o=c6(),l=u6(),c=d6(),u=f6(),d=p6(),p=g6(),g=m6(),h=h6(),y=[e.default,n.default,o.default,l.default,c.default,u.default,d.default,p.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},g.default,h.default];return Ls.default=y,Ls}var Qs={},Oi={},Py;function D1(){if(Py)return Oi;Py=1,Object.defineProperty(Oi,"__esModule",{value:!0}),Oi.validateAdditionalItems=void 0;const e=Re(),n=qe(),l={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:u}})=>(0,e.str)`must NOT have more than ${u} items`,params:({params:{len:u}})=>(0,e._)`{limit: ${u}}`},code(u){const{parentSchema:d,it:p}=u,{items:g}=d;if(!Array.isArray(g)){(0,n.checkStrictMode)(p,'"additionalItems" is ignored when "items" is not an array of schemas');return}c(u,g)}};function c(u,d){const{gen:p,schema:g,data:h,keyword:y,it:v}=u;v.items=!0;const j=p.const("len",(0,e._)`${h}.length`);if(g===!1)u.setParams({len:d.length}),u.pass((0,e._)`${j} <= ${d.length}`);else if(typeof g=="object"&&!(0,n.alwaysValidSchema)(v,g)){const x=p.var("valid",(0,e._)`${j} <= ${d.length}`);p.if((0,e.not)(x),()=>k(x)),u.ok(x)}function k(x){p.forRange("i",d.length,j,E=>{u.subschema({keyword:y,dataProp:E,dataPropType:n.Type.Num},x),v.allErrors||p.if((0,e.not)(x),()=>p.break())})}}return Oi.validateAdditionalItems=c,Oi.default=l,Oi}var Ws={},Ri={},Zy;function U1(){if(Zy)return Ri;Zy=1,Object.defineProperty(Ri,"__esModule",{value:!0}),Ri.validateTuple=void 0;const e=Re(),n=qe(),o=La(),l={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(u){const{schema:d,it:p}=u;if(Array.isArray(d))return c(u,"additionalItems",d);p.items=!0,!(0,n.alwaysValidSchema)(p,d)&&u.ok((0,o.validateArray)(u))}};function c(u,d,p=u.schema){const{gen:g,parentSchema:h,data:y,keyword:v,it:j}=u;E(h),j.opts.unevaluated&&p.length&&j.items!==!0&&(j.items=n.mergeEvaluated.items(g,p.length,j.items));const k=g.name("valid"),x=g.const("len",(0,e._)`${y}.length`);p.forEach((z,w)=>{(0,n.alwaysValidSchema)(j,z)||(g.if((0,e._)`${x} > ${w}`,()=>u.subschema({keyword:v,schemaProp:w,dataProp:w},k)),u.ok(k))});function E(z){const{opts:w,errSchemaPath:$}=j,N=p.length,R=N===z.minItems&&(N===z.maxItems||z[d]===!1);if(w.strictTuples&&!R){const _=`"${v}" is ${N}-tuple, but minItems or maxItems/${d} are not specified or different at path "${$}"`;(0,n.checkStrictMode)(j,_,w.strictTuples)}}}return Ri.validateTuple=c,Ri.default=l,Ri}var Gy;function v6(){if(Gy)return Ws;Gy=1,Object.defineProperty(Ws,"__esModule",{value:!0});const e=U1(),n={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:o=>(0,e.validateTuple)(o,"items")};return Ws.default=n,Ws}var ec={},Fy;function $6(){if(Fy)return ec;Fy=1,Object.defineProperty(ec,"__esModule",{value:!0});const e=Re(),n=qe(),o=La(),l=D1(),u={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:d}})=>(0,e.str)`must NOT have more than ${d} items`,params:({params:{len:d}})=>(0,e._)`{limit: ${d}}`},code(d){const{schema:p,parentSchema:g,it:h}=d,{prefixItems:y}=g;h.items=!0,!(0,n.alwaysValidSchema)(h,p)&&(y?(0,l.validateAdditionalItems)(d,y):d.ok((0,o.validateArray)(d)))}};return ec.default=u,ec}var tc={},Yy;function b6(){if(Yy)return tc;Yy=1,Object.defineProperty(tc,"__esModule",{value:!0});const e=Re(),n=qe(),l={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:c,max:u}})=>u===void 0?(0,e.str)`must contain at least ${c} valid item(s)`:(0,e.str)`must contain at least ${c} and no more than ${u} valid item(s)`,params:({params:{min:c,max:u}})=>u===void 0?(0,e._)`{minContains: ${c}}`:(0,e._)`{minContains: ${c}, maxContains: ${u}}`},code(c){const{gen:u,schema:d,parentSchema:p,data:g,it:h}=c;let y,v;const{minContains:j,maxContains:k}=p;h.opts.next?(y=j===void 0?1:j,v=k):y=1;const x=u.const("len",(0,e._)`${g}.length`);if(c.setParams({min:y,max:v}),v===void 0&&y===0){(0,n.checkStrictMode)(h,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(v!==void 0&&y>v){(0,n.checkStrictMode)(h,'"minContains" > "maxContains" is always invalid'),c.fail();return}if((0,n.alwaysValidSchema)(h,d)){let N=(0,e._)`${x} >= ${y}`;v!==void 0&&(N=(0,e._)`${N} && ${x} <= ${v}`),c.pass(N);return}h.items=!0;const E=u.name("valid");v===void 0&&y===1?w(E,()=>u.if(E,()=>u.break())):y===0?(u.let(E,!0),v!==void 0&&u.if((0,e._)`${g}.length > 0`,z)):(u.let(E,!1),z()),c.result(E,()=>c.reset());function z(){const N=u.name("_valid"),R=u.let("count",0);w(N,()=>u.if(N,()=>$(R)))}function w(N,R){u.forRange("i",0,x,_=>{c.subschema({keyword:"contains",dataProp:_,dataPropType:n.Type.Num,compositeRule:!0},N),R()})}function $(N){u.code((0,e._)`${N}++`),v===void 0?u.if((0,e._)`${N} >= ${y}`,()=>u.assign(E,!0).break()):(u.if((0,e._)`${N} > ${v}`,()=>u.assign(E,!1).break()),y===1?u.assign(E,!0):u.if((0,e._)`${N} >= ${y}`,()=>u.assign(E,!0)))}}};return tc.default=l,tc}var jf={},Ky;function x6(){return Ky||(Ky=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const n=Re(),o=qe(),l=La();e.error={message:({params:{property:g,depsCount:h,deps:y}})=>{const v=h===1?"property":"properties";return(0,n.str)`must have ${v} ${y} when property ${g} is present`},params:({params:{property:g,depsCount:h,deps:y,missingProperty:v}})=>(0,n._)`{property: ${g},
117
- missingProperty: ${v},
118
- depsCount: ${h},
119
- deps: ${y}}`};const c={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(g){const[h,y]=u(g);d(g,h),p(g,y)}};function u({schema:g}){const h={},y={};for(const v in g){if(v==="__proto__")continue;const j=Array.isArray(g[v])?h:y;j[v]=g[v]}return[h,y]}function d(g,h=g.schema){const{gen:y,data:v,it:j}=g;if(Object.keys(h).length===0)return;const k=y.let("missing");for(const x in h){const E=h[x];if(E.length===0)continue;const z=(0,l.propertyInData)(y,v,x,j.opts.ownProperties);g.setParams({property:x,depsCount:E.length,deps:E.join(", ")}),j.allErrors?y.if(z,()=>{for(const w of E)(0,l.checkReportMissingProp)(g,w)}):(y.if((0,n._)`${z} && (${(0,l.checkMissingProp)(g,E,k)})`),(0,l.reportMissingProp)(g,k),y.else())}}e.validatePropertyDeps=d;function p(g,h=g.schema){const{gen:y,data:v,keyword:j,it:k}=g,x=y.name("valid");for(const E in h)(0,o.alwaysValidSchema)(k,h[E])||(y.if((0,l.propertyInData)(y,v,E,k.opts.ownProperties),()=>{const z=g.subschema({keyword:j,schemaProp:E},x);g.mergeValidEvaluated(z,x)},()=>y.var(x,!0)),g.ok(x))}e.validateSchemaDeps=p,e.default=c})(jf)),jf}var ac={},Jy;function _6(){if(Jy)return ac;Jy=1,Object.defineProperty(ac,"__esModule",{value:!0});const e=Re(),n=qe(),l={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:c})=>(0,e._)`{propertyName: ${c.propertyName}}`},code(c){const{gen:u,schema:d,data:p,it:g}=c;if((0,n.alwaysValidSchema)(g,d))return;const h=u.name("valid");u.forIn("key",p,y=>{c.setParams({propertyName:y}),c.subschema({keyword:"propertyNames",data:y,dataTypes:["string"],propertyName:y,compositeRule:!0},h),u.if((0,e.not)(h),()=>{c.error(!0),g.allErrors||u.break()})}),c.ok(h)}};return ac.default=l,ac}var nc={},Xy;function I1(){if(Xy)return nc;Xy=1,Object.defineProperty(nc,"__esModule",{value:!0});const e=La(),n=Re(),o=br(),l=qe(),u={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:d})=>(0,n._)`{additionalProperty: ${d.additionalProperty}}`},code(d){const{gen:p,schema:g,parentSchema:h,data:y,errsCount:v,it:j}=d;if(!v)throw new Error("ajv implementation error");const{allErrors:k,opts:x}=j;if(j.props=!0,x.removeAdditional!=="all"&&(0,l.alwaysValidSchema)(j,g))return;const E=(0,e.allSchemaProperties)(h.properties),z=(0,e.allSchemaProperties)(h.patternProperties);w(),d.ok((0,n._)`${v} === ${o.default.errors}`);function w(){p.forIn("key",y,S=>{!E.length&&!z.length?R(S):p.if($(S),()=>R(S))})}function $(S){let C;if(E.length>8){const U=(0,l.schemaRefOrVal)(j,h.properties,"properties");C=(0,e.isOwnProperty)(p,U,S)}else E.length?C=(0,n.or)(...E.map(U=>(0,n._)`${S} === ${U}`)):C=n.nil;return z.length&&(C=(0,n.or)(C,...z.map(U=>(0,n._)`${(0,e.usePattern)(d,U)}.test(${S})`))),(0,n.not)(C)}function N(S){p.code((0,n._)`delete ${y}[${S}]`)}function R(S){if(x.removeAdditional==="all"||x.removeAdditional&&g===!1){N(S);return}if(g===!1){d.setParams({additionalProperty:S}),d.error(),k||p.break();return}if(typeof g=="object"&&!(0,l.alwaysValidSchema)(j,g)){const C=p.name("valid");x.removeAdditional==="failing"?(_(S,C,!1),p.if((0,n.not)(C),()=>{d.reset(),N(S)})):(_(S,C),k||p.if((0,n.not)(C),()=>p.break()))}}function _(S,C,U){const te={keyword:"additionalProperties",dataProp:S,dataPropType:l.Type.Str};U===!1&&Object.assign(te,{compositeRule:!0,createErrors:!1,allErrors:!1}),d.subschema(te,C)}}};return nc.default=u,nc}var rc={},Qy;function j6(){if(Qy)return rc;Qy=1,Object.defineProperty(rc,"__esModule",{value:!0});const e=Rc(),n=La(),o=qe(),l=I1(),c={keyword:"properties",type:"object",schemaType:"object",code(u){const{gen:d,schema:p,parentSchema:g,data:h,it:y}=u;y.opts.removeAdditional==="all"&&g.additionalProperties===void 0&&l.default.code(new e.KeywordCxt(y,l.default,"additionalProperties"));const v=(0,n.allSchemaProperties)(p);for(const z of v)y.definedProperties.add(z);y.opts.unevaluated&&v.length&&y.props!==!0&&(y.props=o.mergeEvaluated.props(d,(0,o.toHash)(v),y.props));const j=v.filter(z=>!(0,o.alwaysValidSchema)(y,p[z]));if(j.length===0)return;const k=d.name("valid");for(const z of j)x(z)?E(z):(d.if((0,n.propertyInData)(d,h,z,y.opts.ownProperties)),E(z),y.allErrors||d.else().var(k,!0),d.endIf()),u.it.definedProperties.add(z),u.ok(k);function x(z){return y.opts.useDefaults&&!y.compositeRule&&p[z].default!==void 0}function E(z){u.subschema({keyword:"properties",schemaProp:z,dataProp:z},k)}}};return rc.default=c,rc}var ic={},Wy;function S6(){if(Wy)return ic;Wy=1,Object.defineProperty(ic,"__esModule",{value:!0});const e=La(),n=Re(),o=qe(),l=qe(),c={keyword:"patternProperties",type:"object",schemaType:"object",code(u){const{gen:d,schema:p,data:g,parentSchema:h,it:y}=u,{opts:v}=y,j=(0,e.allSchemaProperties)(p),k=j.filter(R=>(0,o.alwaysValidSchema)(y,p[R]));if(j.length===0||k.length===j.length&&(!y.opts.unevaluated||y.props===!0))return;const x=v.strictSchema&&!v.allowMatchingProperties&&h.properties,E=d.name("valid");y.props!==!0&&!(y.props instanceof n.Name)&&(y.props=(0,l.evaluatedPropsToName)(d,y.props));const{props:z}=y;w();function w(){for(const R of j)x&&$(R),y.allErrors?N(R):(d.var(E,!0),N(R),d.if(E))}function $(R){for(const _ in x)new RegExp(R).test(_)&&(0,o.checkStrictMode)(y,`property ${_} matches pattern ${R} (use allowMatchingProperties)`)}function N(R){d.forIn("key",g,_=>{d.if((0,n._)`${(0,e.usePattern)(u,R)}.test(${_})`,()=>{const S=k.includes(R);S||u.subschema({keyword:"patternProperties",schemaProp:R,dataProp:_,dataPropType:l.Type.Str},E),y.opts.unevaluated&&z!==!0?d.assign((0,n._)`${z}[${_}]`,!0):!S&&!y.allErrors&&d.if((0,n.not)(E),()=>d.break())})})}}};return ic.default=c,ic}var oc={},ev;function w6(){if(ev)return oc;ev=1,Object.defineProperty(oc,"__esModule",{value:!0});const e=qe(),n={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(o){const{gen:l,schema:c,it:u}=o;if((0,e.alwaysValidSchema)(u,c)){o.fail();return}const d=l.name("valid");o.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},d),o.failResult(d,()=>o.reset(),()=>o.error())},error:{message:"must NOT be valid"}};return oc.default=n,oc}var lc={},tv;function k6(){if(tv)return lc;tv=1,Object.defineProperty(lc,"__esModule",{value:!0});const n={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:La().validateUnion,error:{message:"must match a schema in anyOf"}};return lc.default=n,lc}var sc={},av;function N6(){if(av)return sc;av=1,Object.defineProperty(sc,"__esModule",{value:!0});const e=Re(),n=qe(),l={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:c})=>(0,e._)`{passingSchemas: ${c.passing}}`},code(c){const{gen:u,schema:d,parentSchema:p,it:g}=c;if(!Array.isArray(d))throw new Error("ajv implementation error");if(g.opts.discriminator&&p.discriminator)return;const h=d,y=u.let("valid",!1),v=u.let("passing",null),j=u.name("_valid");c.setParams({passing:v}),u.block(k),c.result(y,()=>c.reset(),()=>c.error(!0));function k(){h.forEach((x,E)=>{let z;(0,n.alwaysValidSchema)(g,x)?u.var(j,!0):z=c.subschema({keyword:"oneOf",schemaProp:E,compositeRule:!0},j),E>0&&u.if((0,e._)`${j} && ${y}`).assign(y,!1).assign(v,(0,e._)`[${v}, ${E}]`).else(),u.if(j,()=>{u.assign(y,!0),u.assign(v,E),z&&c.mergeEvaluated(z,e.Name)})})}}};return sc.default=l,sc}var cc={},nv;function z6(){if(nv)return cc;nv=1,Object.defineProperty(cc,"__esModule",{value:!0});const e=qe(),n={keyword:"allOf",schemaType:"array",code(o){const{gen:l,schema:c,it:u}=o;if(!Array.isArray(c))throw new Error("ajv implementation error");const d=l.name("valid");c.forEach((p,g)=>{if((0,e.alwaysValidSchema)(u,p))return;const h=o.subschema({keyword:"allOf",schemaProp:g},d);o.ok(d),o.mergeEvaluated(h)})}};return cc.default=n,cc}var uc={},rv;function E6(){if(rv)return uc;rv=1,Object.defineProperty(uc,"__esModule",{value:!0});const e=Re(),n=qe(),l={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:u})=>(0,e.str)`must match "${u.ifClause}" schema`,params:({params:u})=>(0,e._)`{failingKeyword: ${u.ifClause}}`},code(u){const{gen:d,parentSchema:p,it:g}=u;p.then===void 0&&p.else===void 0&&(0,n.checkStrictMode)(g,'"if" without "then" and "else" is ignored');const h=c(g,"then"),y=c(g,"else");if(!h&&!y)return;const v=d.let("valid",!0),j=d.name("_valid");if(k(),u.reset(),h&&y){const E=d.let("ifClause");u.setParams({ifClause:E}),d.if(j,x("then",E),x("else",E))}else h?d.if(j,x("then")):d.if((0,e.not)(j),x("else"));u.pass(v,()=>u.error(!0));function k(){const E=u.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},j);u.mergeEvaluated(E)}function x(E,z){return()=>{const w=u.subschema({keyword:E},j);d.assign(v,j),u.mergeValidEvaluated(w,v),z?d.assign(z,(0,e._)`${E}`):u.setParams({ifClause:E})}}}};function c(u,d){const p=u.schema[d];return p!==void 0&&!(0,n.alwaysValidSchema)(u,p)}return uc.default=l,uc}var dc={},iv;function C6(){if(iv)return dc;iv=1,Object.defineProperty(dc,"__esModule",{value:!0});const e=qe(),n={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:o,parentSchema:l,it:c}){l.if===void 0&&(0,e.checkStrictMode)(c,`"${o}" without "if" is ignored`)}};return dc.default=n,dc}var ov;function T6(){if(ov)return Qs;ov=1,Object.defineProperty(Qs,"__esModule",{value:!0});const e=D1(),n=v6(),o=U1(),l=$6(),c=b6(),u=x6(),d=_6(),p=I1(),g=j6(),h=S6(),y=w6(),v=k6(),j=N6(),k=z6(),x=E6(),E=C6();function z(w=!1){const $=[y.default,v.default,j.default,k.default,x.default,E.default,d.default,p.default,u.default,g.default,h.default];return w?$.push(n.default,l.default):$.push(e.default,o.default),$.push(c.default),$}return Qs.default=z,Qs}var fc={},pc={},lv;function M6(){if(lv)return pc;lv=1,Object.defineProperty(pc,"__esModule",{value:!0});const e=Re(),o={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:l})=>(0,e.str)`must match format "${l}"`,params:({schemaCode:l})=>(0,e._)`{format: ${l}}`},code(l,c){const{gen:u,data:d,$data:p,schema:g,schemaCode:h,it:y}=l,{opts:v,errSchemaPath:j,schemaEnv:k,self:x}=y;if(!v.validateFormats)return;p?E():z();function E(){const w=u.scopeValue("formats",{ref:x.formats,code:v.code.formats}),$=u.const("fDef",(0,e._)`${w}[${h}]`),N=u.let("fType"),R=u.let("format");u.if((0,e._)`typeof ${$} == "object" && !(${$} instanceof RegExp)`,()=>u.assign(N,(0,e._)`${$}.type || "string"`).assign(R,(0,e._)`${$}.validate`),()=>u.assign(N,(0,e._)`"string"`).assign(R,$)),l.fail$data((0,e.or)(_(),S()));function _(){return v.strictSchema===!1?e.nil:(0,e._)`${h} && !${R}`}function S(){const C=k.$async?(0,e._)`(${$}.async ? await ${R}(${d}) : ${R}(${d}))`:(0,e._)`${R}(${d})`,U=(0,e._)`(typeof ${R} == "function" ? ${C} : ${R}.test(${d}))`;return(0,e._)`${R} && ${R} !== true && ${N} === ${c} && !${U}`}}function z(){const w=x.formats[g];if(!w){_();return}if(w===!0)return;const[$,N,R]=S(w);$===c&&l.pass(C());function _(){if(v.strictSchema===!1){x.logger.warn(U());return}throw new Error(U());function U(){return`unknown format "${g}" ignored in schema at path "${j}"`}}function S(U){const te=U instanceof RegExp?(0,e.regexpCode)(U):v.code.formats?(0,e._)`${v.code.formats}${(0,e.getProperty)(g)}`:void 0,G=u.scopeValue("formats",{key:g,ref:U,code:te});return typeof U=="object"&&!(U instanceof RegExp)?[U.type||"string",U.validate,(0,e._)`${G}.validate`]:["string",U,G]}function C(){if(typeof w=="object"&&!(w instanceof RegExp)&&w.async){if(!k.$async)throw new Error("async format in sync schema");return(0,e._)`await ${R}(${d})`}return typeof N=="function"?(0,e._)`${R}(${d})`:(0,e._)`${R}.test(${d})`}}}};return pc.default=o,pc}var sv;function O6(){if(sv)return fc;sv=1,Object.defineProperty(fc,"__esModule",{value:!0});const n=[M6().default];return fc.default=n,fc}var Hr={},cv;function R6(){return cv||(cv=1,Object.defineProperty(Hr,"__esModule",{value:!0}),Hr.contentVocabulary=Hr.metadataVocabulary=void 0,Hr.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Hr.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Hr}var uv;function A6(){if(uv)return Ds;uv=1,Object.defineProperty(Ds,"__esModule",{value:!0});const e=o6(),n=y6(),o=T6(),l=O6(),c=R6(),u=[e.default,n.default,(0,o.default)(),l.default,c.metadataVocabulary,c.contentVocabulary];return Ds.default=u,Ds}var gc={},Fo={},dv;function D6(){if(dv)return Fo;dv=1,Object.defineProperty(Fo,"__esModule",{value:!0}),Fo.DiscrError=void 0;var e;return(function(n){n.Tag="tag",n.Mapping="mapping"})(e||(Fo.DiscrError=e={})),Fo}var fv;function U6(){if(fv)return gc;fv=1,Object.defineProperty(gc,"__esModule",{value:!0});const e=Re(),n=D6(),o=np(),l=Ac(),c=qe(),d={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:p,tagName:g}})=>p===n.DiscrError.Tag?`tag "${g}" must be string`:`value of tag "${g}" must be in oneOf`,params:({params:{discrError:p,tag:g,tagName:h}})=>(0,e._)`{error: ${p}, tag: ${h}, tagValue: ${g}}`},code(p){const{gen:g,data:h,schema:y,parentSchema:v,it:j}=p,{oneOf:k}=v;if(!j.opts.discriminator)throw new Error("discriminator: requires discriminator option");const x=y.propertyName;if(typeof x!="string")throw new Error("discriminator: requires propertyName");if(y.mapping)throw new Error("discriminator: mapping is not supported");if(!k)throw new Error("discriminator: requires oneOf keyword");const E=g.let("valid",!1),z=g.const("tag",(0,e._)`${h}${(0,e.getProperty)(x)}`);g.if((0,e._)`typeof ${z} == "string"`,()=>w(),()=>p.error(!1,{discrError:n.DiscrError.Tag,tag:z,tagName:x})),p.ok(E);function w(){const R=N();g.if(!1);for(const _ in R)g.elseIf((0,e._)`${z} === ${_}`),g.assign(E,$(R[_]));g.else(),p.error(!1,{discrError:n.DiscrError.Mapping,tag:z,tagName:x}),g.endIf()}function $(R){const _=g.name("valid"),S=p.subschema({keyword:"oneOf",schemaProp:R},_);return p.mergeEvaluated(S,e.Name),_}function N(){var R;const _={},S=U(v);let C=!0;for(let H=0;H<k.length;H++){let Y=k[H];if(Y!=null&&Y.$ref&&!(0,c.schemaHasRulesButRef)(Y,j.self.RULES)){const ie=Y.$ref;if(Y=o.resolveRef.call(j.self,j.schemaEnv.root,j.baseId,ie),Y instanceof o.SchemaEnv&&(Y=Y.schema),Y===void 0)throw new l.default(j.opts.uriResolver,j.baseId,ie)}const F=(R=Y==null?void 0:Y.properties)===null||R===void 0?void 0:R[x];if(typeof F!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${x}"`);C=C&&(S||U(Y)),te(F,H)}if(!C)throw new Error(`discriminator: "${x}" must be required`);return _;function U({required:H}){return Array.isArray(H)&&H.includes(x)}function te(H,Y){if(H.const)G(H.const,Y);else if(H.enum)for(const F of H.enum)G(F,Y);else throw new Error(`discriminator: "properties/${x}" must have "const" or "enum"`)}function G(H,Y){if(typeof H!="string"||H in _)throw new Error(`discriminator: "${x}" values must be unique strings`);_[H]=Y}}}};return gc.default=d,gc}const I6="http://json-schema.org/draft-07/schema#",L6="http://json-schema.org/draft-07/schema#",V6="Core schema meta-schema",B6={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:[]}},H6=["object","boolean"],q6={$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:"#"}},P6={$schema:I6,$id:L6,title:V6,definitions:B6,type:H6,properties:q6,default:!0};var pv;function L1(){return pv||(pv=1,(function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.MissingRefError=n.ValidationError=n.CodeGen=n.Name=n.nil=n.stringify=n.str=n._=n.KeywordCxt=n.Ajv=void 0;const o=n6(),l=A6(),c=U6(),u=P6,d=["/properties"],p="http://json-schema.org/draft-07/schema";class g extends o.default{_addVocabularies(){super._addVocabularies(),l.default.forEach(x=>this.addVocabulary(x)),this.opts.discriminator&&this.addKeyword(c.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const x=this.opts.$data?this.$dataMetaSchema(u,d):u;this.addMetaSchema(x,p,!1),this.refs["http://json-schema.org/schema"]=p}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(p)?p:void 0)}}n.Ajv=g,e.exports=n=g,e.exports.Ajv=g,Object.defineProperty(n,"__esModule",{value:!0}),n.default=g;var h=Rc();Object.defineProperty(n,"KeywordCxt",{enumerable:!0,get:function(){return h.KeywordCxt}});var y=Re();Object.defineProperty(n,"_",{enumerable:!0,get:function(){return y._}}),Object.defineProperty(n,"str",{enumerable:!0,get:function(){return y.str}}),Object.defineProperty(n,"stringify",{enumerable:!0,get:function(){return y.stringify}}),Object.defineProperty(n,"nil",{enumerable:!0,get:function(){return y.nil}}),Object.defineProperty(n,"Name",{enumerable:!0,get:function(){return y.Name}}),Object.defineProperty(n,"CodeGen",{enumerable:!0,get:function(){return y.CodeGen}});var v=ap();Object.defineProperty(n,"ValidationError",{enumerable:!0,get:function(){return v.default}});var j=Ac();Object.defineProperty(n,"MissingRefError",{enumerable:!0,get:function(){return j.default}})})(Ts,Ts.exports)),Ts.exports}var Z6=L1();const rp=al(Z6);var mc={exports:{}},Sf={},gv;function G6(){return gv||(gv=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function n(H,Y){return{validate:H,compare:Y}}e.fullFormats={date:n(u,d),time:n(g(!0),h),"date-time":n(j(!0),k),"iso-time":n(g(),y),"iso-date-time":n(j(),x),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:w,"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:G,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:N,int32:{type:"number",validate:S},int64:{type:"number",validate:C},float:{type:"number",validate:U},double:{type:"number",validate:U},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:n(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,d),time:n(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,h),"date-time":n(/^\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,k),"iso-time":n(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,y),"iso-date-time":n(/^\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,x),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 o(H){return H%4===0&&(H%100!==0||H%400===0)}const l=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,c=[0,31,28,31,30,31,30,31,31,30,31,30,31];function u(H){const Y=l.exec(H);if(!Y)return!1;const F=+Y[1],ie=+Y[2],_e=+Y[3];return ie>=1&&ie<=12&&_e>=1&&_e<=(ie===2&&o(F)?29:c[ie])}function d(H,Y){if(H&&Y)return H>Y?1:H<Y?-1:0}const p=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function g(H){return function(F){const ie=p.exec(F);if(!ie)return!1;const _e=+ie[1],ae=+ie[2],fe=+ie[3],ge=ie[4],ke=ie[5]==="-"?-1:1,re=+(ie[6]||0),T=+(ie[7]||0);if(re>23||T>59||H&&!ge)return!1;if(_e<=23&&ae<=59&&fe<60)return!0;const V=ae-T*ke,L=_e-re*ke-(V<0?1:0);return(L===23||L===-1)&&(V===59||V===-1)&&fe<61}}function h(H,Y){if(!(H&&Y))return;const F=new Date("2020-01-01T"+H).valueOf(),ie=new Date("2020-01-01T"+Y).valueOf();if(F&&ie)return F-ie}function y(H,Y){if(!(H&&Y))return;const F=p.exec(H),ie=p.exec(Y);if(F&&ie)return H=F[1]+F[2]+F[3],Y=ie[1]+ie[2]+ie[3],H>Y?1:H<Y?-1:0}const v=/t|\s/i;function j(H){const Y=g(H);return function(ie){const _e=ie.split(v);return _e.length===2&&u(_e[0])&&Y(_e[1])}}function k(H,Y){if(!(H&&Y))return;const F=new Date(H).valueOf(),ie=new Date(Y).valueOf();if(F&&ie)return F-ie}function x(H,Y){if(!(H&&Y))return;const[F,ie]=H.split(v),[_e,ae]=Y.split(v),fe=d(F,_e);if(fe!==void 0)return fe||h(ie,ae)}const E=/\/|:/,z=/^(?:[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 w(H){return E.test(H)&&z.test(H)}const $=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function N(H){return $.lastIndex=0,$.test(H)}const R=-2147483648,_=2**31-1;function S(H){return Number.isInteger(H)&&H<=_&&H>=R}function C(H){return Number.isInteger(H)}function U(){return!0}const te=/[^\\]\\Z/;function G(H){if(te.test(H))return!1;try{return new RegExp(H),!0}catch{return!1}}})(Sf)),Sf}var wf={},mv;function F6(){return mv||(mv=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const n=L1(),o=Re(),l=o.operators,c={formatMaximum:{okStr:"<=",ok:l.LTE,fail:l.GT},formatMinimum:{okStr:">=",ok:l.GTE,fail:l.LT},formatExclusiveMaximum:{okStr:"<",ok:l.LT,fail:l.GTE},formatExclusiveMinimum:{okStr:">",ok:l.GT,fail:l.LTE}},u={message:({keyword:p,schemaCode:g})=>(0,o.str)`should be ${c[p].okStr} ${g}`,params:({keyword:p,schemaCode:g})=>(0,o._)`{comparison: ${c[p].okStr}, limit: ${g}}`};e.formatLimitDefinition={keyword:Object.keys(c),type:"string",schemaType:"string",$data:!0,error:u,code(p){const{gen:g,data:h,schemaCode:y,keyword:v,it:j}=p,{opts:k,self:x}=j;if(!k.validateFormats)return;const E=new n.KeywordCxt(j,x.RULES.all.format.definition,"format");E.$data?z():w();function z(){const N=g.scopeValue("formats",{ref:x.formats,code:k.code.formats}),R=g.const("fmt",(0,o._)`${N}[${E.schemaCode}]`);p.fail$data((0,o.or)((0,o._)`typeof ${R} != "object"`,(0,o._)`${R} instanceof RegExp`,(0,o._)`typeof ${R}.compare != "function"`,$(R)))}function w(){const N=E.schema,R=x.formats[N];if(!R||R===!0)return;if(typeof R!="object"||R instanceof RegExp||typeof R.compare!="function")throw new Error(`"${v}": format "${N}" does not define "compare" function`);const _=g.scopeValue("formats",{key:N,ref:R,code:k.code.formats?(0,o._)`${k.code.formats}${(0,o.getProperty)(N)}`:void 0});p.fail$data($(_))}function $(N){return(0,o._)`${N}.compare(${h}, ${y}) ${c[v].fail} 0`}},dependencies:["format"]};const d=p=>(p.addKeyword(e.formatLimitDefinition),p);e.default=d})(wf)),wf}var hv;function Y6(){return hv||(hv=1,(function(e,n){Object.defineProperty(n,"__esModule",{value:!0});const o=G6(),l=F6(),c=Re(),u=new c.Name("fullFormats"),d=new c.Name("fastFormats"),p=(h,y={keywords:!0})=>{if(Array.isArray(y))return g(h,y,o.fullFormats,u),h;const[v,j]=y.mode==="fast"?[o.fastFormats,d]:[o.fullFormats,u],k=y.formats||o.formatNames;return g(h,k,v,j),y.keywords&&(0,l.default)(h),h};p.get=(h,y="full")=>{const j=(y==="fast"?o.fastFormats:o.fullFormats)[h];if(!j)throw new Error(`Unknown format "${h}"`);return j};function g(h,y,v,j){var k,x;(k=(x=h.opts.code).formats)!==null&&k!==void 0||(x.formats=(0,c._)`require("ajv-formats/dist/formats").${j}`);for(const E of y)h.addFormat(E,v[E])}e.exports=n=p,Object.defineProperty(n,"__esModule",{value:!0}),n.default=p})(mc,mc.exports)),mc.exports}var K6=Y6();const ip=al(K6);var J6=Dc();const X6=al(J6);var Q6=A1();const W6=al(Q6);function V1(e){if(typeof e=="function")return e;const n=e==null?void 0:e.default;if(typeof n=="function")return n;throw new Error("ajv-runtime: could not resolve a runtime-helper function")}V1(X6).toString();V1(W6).toString();const op={strict:!0,allErrors:!0,useDefaults:!1,coerceTypes:!1,removeAdditional:!1,verbose:!0},qi=new rp({...op});ip(qi);qi.getKeyword("example")||qi.addKeyword({keyword:"example"});qi.getKeyword("nullable")||qi.addKeyword({keyword:"nullable"});const Wo=new rp({...op,code:{source:!0,esm:!0}});ip(Wo);Wo.getKeyword("example")||Wo.addKeyword({keyword:"example"});Wo.getKeyword("nullable")||Wo.addKeyword({keyword:"nullable"});const el=new rp({...op,code:{source:!0}});ip(el);el.getKeyword("example")||el.addKeyword({keyword:"example"});el.getKeyword("nullable")||el.addKeyword({keyword:"nullable"});function Wn(e){const n=new Set(Array.isArray(e.type)?e.type:e.type?[e.type]:[]);if(n.has("object")||e.properties!==void 0){const l={...e};if(l.properties){const c={};for(const[u,d]of Object.entries(l.properties))c[u]=Wn(d);l.properties=c}return l.additionalProperties===void 0?l.additionalProperties=!1:typeof l.additionalProperties!="boolean"&&(l.additionalProperties=Wn(l.additionalProperties)),l.oneOf&&(l.oneOf=l.oneOf.map(Wn)),l.anyOf&&(l.anyOf=l.anyOf.map(Wn)),l}if(n.has("array")&&e.items)return{...e,items:Wn(e.items)};if(e.oneOf||e.anyOf){const l={...e};return l.oneOf&&(l.oneOf=l.oneOf.map(Wn)),l.anyOf&&(l.anyOf=l.anyOf.map(Wn)),l}return e}function lp(e){const n=Wn(e);return qi.compile(n)}function sp(e,n){return e?e.map(o=>({...ew(o,n),...o.keyword?{keyword:o.keyword}:{}})):[]}function B1(e,n){return n?e.map(o=>({...o,field:o.field?`${n}.${o.field}`:n})):e}function ew(e,n){const o=tw(e.instancePath);switch(e.keyword){case"additionalProperties":{const c=e.params.additionalProperty??"<unknown>",u=o?`${o}.${c}`:c,d=e.parentSchema,p=d!=null&&d.properties?Object.keys(d.properties):[],g=Yo(n,`${e.instancePath}/${c}`),h=p.length>0?` Declared keys: [${p.join(", ")}].`:" Declared keys: [(none)].";return{field:u,message:`Undeclared field '${c}'${o?` at '${o}'`:""}.${h}`,expected:"<declared key>",received:yv(g)}}case"required":{const c=e.params.missingProperty??"<unknown>";return{field:o?`${o}.${c}`:c,message:`Required field '${c}' missing${o?` at '${o}'`:""}`,expected:"present",received:"undefined"}}case"type":{const l=e.params,c=Array.isArray(l.type)?l.type.join("|"):l.type??"unknown",u=yv(Yo(n,e.instancePath));return{field:o,message:e.message??`Type mismatch at '${o||"<root>"}'`,expected:c,received:u}}case"enum":{const c=e.params.allowedValues??[],u=Yo(n,e.instancePath);return{field:o,message:e.message??`Enum mismatch at '${o||"<root>"}'`,expected:c.map(d=>JSON.stringify(d)).join("|"),received:JSON.stringify(u)}}case"const":{const l=e.params,c=Yo(n,e.instancePath);return{field:o,message:e.message??`Const mismatch at '${o||"<root>"}'`,expected:JSON.stringify(l.allowedValue),received:JSON.stringify(c)}}case"pattern":{const l=e.params,c=Yo(n,e.instancePath);return{field:o,message:e.message??`Pattern mismatch at '${o||"<root>"}'`,expected:l.pattern??"<pattern>",received:typeof c=="string"?c:JSON.stringify(c)}}default:return{field:o,message:e.message??`Validation failed${o?` at '${o}'`:""} (${e.keyword})`}}}function tw(e){if(!e)return"";const n=e.slice(1).split("/");let o="";for(const l of n)/^\d+$/.test(l)?o+=`[${l}]`:o===""?o=l:o+=`.${l}`;return o}function Yo(e,n){if(!n)return e;const o=n.slice(1).split("/");let l=e;for(const c of o){if(l==null)return;if(Array.isArray(l)){const u=Number(c);if(!Number.isInteger(u))return;l=l[u]}else if(Zf(l))l=l[c];else return}return l}function yv(e){return e===null?"null":Array.isArray(e)?"array":typeof e}const vv="_ggui:",aw="_ggui:preview",cp="_ggui:lifecycle",nw=new Set([aw,cp]);function H1(e){return nw.has(e)}const rw=new Map([[cp,iw]]);function iw(e){const n=[];if(!Zf(e))return{valid:!1,violations:[{field:"payload",message:`${cp} payload must be a non-null object`,expected:"object",received:e===null?"null":Array.isArray(e)?"array":typeof e}]};const o=e;if(typeof o.kind!="string")return{valid:!1,violations:[{field:"kind",message:"Required field 'kind' must be a string",expected:"string",received:o.kind===void 0?"undefined":typeof o.kind}]};const l=c=>{typeof o[c]!="string"&&n.push({field:c,message:`Required field '${c}' must be a string`,expected:"string",received:o[c]===void 0?"undefined":typeof o[c]})};switch(o.kind){case"handshake_started":l("handshakeId"),l("intent");break;case"handshake_completed":l("handshakeId"),o.outcome!=="accepted"&&o.outcome!=="amended"&&o.outcome!=="declined"&&o.outcome!=="cached"&&n.push({field:"outcome",message:"Required field 'outcome' must be 'accepted' | 'amended' | 'declined' | 'cached'",expected:"'accepted' | 'amended' | 'declined' | 'cached'",received:o.outcome===void 0?"undefined":String(o.outcome)}),typeof o.genExpected!="boolean"&&n.push({field:"genExpected",message:"Required field 'genExpected' must be a boolean",expected:"boolean",received:o.genExpected===void 0?"undefined":typeof o.genExpected});break;case"render_started":l("sessionId"),l("intent");break;case"consume_polling":l("sessionId"),o.state!=="open"&&n.push({field:"state",message:"Required field 'state' must be 'open'",expected:"'open'",received:o.state===void 0?"undefined":String(o.state)});break;default:n.push({field:"kind",message:`Unknown lifecycle kind '${o.kind}'. Closed union; new kinds bump protocol version.`,expected:"'handshake_started' | 'handshake_completed' | 'render_started' | 'consume_polling'",received:o.kind})}return{valid:n.length===0,violations:n}}function ow(e){const n=e.properties??{};return{type:"object",properties:Object.fromEntries(Object.entries(n).map(([o,l])=>[o,l.schema])),required:Object.entries(n).filter(([,o])=>o.required===!0).map(([o])=>o)}}function lw(e,n,o){const l=lp(ow(n));return l(e)?{valid:!0,violations:[]}:{valid:!1,violations:sp(l.errors,e)}}function $v(e,n,o,l,c){if(H1(e)){const p=l==null?void 0:l.get(e);if(p)return p(n);const g=rw.get(e);return g?g(n):{valid:!0,violations:[]}}const u=[],d=o[e];if(!d)return u.push({field:"channel",message:`Unknown stream channel '${e}'. Declared channels: ${Object.keys(o).join(", ")}`,expected:Object.keys(o).join(" | "),received:e}),{valid:!1,violations:u};if(d.schema&&n!==void 0){const p=lp(d.schema);if(!p(n))for(const h of B1(sp(p.errors,n),`${e}.payload`))u.push(h)}return{valid:u.length===0,violations:u}}function q1(e,n,o){const l=[];if(!Zf(e))return l.push({field:"value",message:"Action payload must be an object with an `action` field",expected:"object",received:bv(e)}),{valid:!1,violations:l};const c=e,u=c.action;if(typeof u!="string"||u.length===0)return l.push({field:"action",message:"Missing or empty `action` identifier",expected:"string",received:bv(u)}),{valid:!1,violations:l};const d=n[u];if(!d)return l.push({field:"action",message:`Unknown action '${u}'. Declared actions: ${Object.keys(n).join(", ")||"(none)"}`,expected:Object.keys(n).join(" | ")||"(none)",received:u}),{valid:!1,violations:l};if(d.schema){const p=lp(d.schema);if(!p(c.data))for(const h of B1(sp(p.errors,c.data),`${u}.data`))l.push(h)}return{valid:l.length===0,violations:l}}function bv(e){return e===null?"null":Array.isArray(e)?"array":typeof e}function sw(e,n,o){return e.type!=="data:submit"?{valid:!0,violations:[]}:n?q1(e.payload,n):{valid:!0,violations:[]}}de({appId:Z().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:il,generator:Z().min(1).optional().describe("Generator slug (e.g. `ui-gen-default-haiku-4-5`). When omitted, dispatches through `GeneratorRegistry.defaultGenerator()`."),persona:Z().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:Z().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:mt(Z(),bt).optional().describe("Small structured signal carried alongside the persona. Persisted on `Blueprint.variance.context`."),seedPrompt:Z().optional().describe("The raw operator prompt that produced this variant. Round-trip input for the variant-selector + audit trail."),setAsOperatorDefault:Pt().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();de({blueprintId:Z().min(1),codeHash:Z().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:He().min(0).max(1).optional().describe("Advanced generator's iterative-loop validator score (0-1). Absent for default-generator output."),source:N1.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();de({appId:Z().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:il,componentCode:Z().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:Z().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:Z().optional().describe("Free-form aesthetic tag. Persisted on `Blueprint.variance.aesthetic`."),context:mt(Z(),bt).optional().describe("Small structured signal carried alongside the persona. Persisted on `Blueprint.variance.context`."),seedPrompt:Z().optional().describe("Optional originating prompt for audit + round-tripping (e.g. the prose the operator originally fed into `*_generate_*` before exporting)."),setAsOperatorDefault:Pt().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();de({blueprintId:Z().min(1),codeHash:Z().min(1).describe("Content hash of the persisted code body (full sha256 hex)."),source:z1.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();de({appId:Z().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:Z().min(1).optional().describe("Filter to a single `(appId, contractHash)` group. Combine with `generator` / `persona` to narrow within the group."),generator:Z().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:Z().optional().describe("Filter on `variance.persona`. Normalized to match persisted form (lowercase+trim)."),intentKeywords:At(Z().min(1)).optional().describe("Semantic-search tokens. When set, dispatches through `BlueprintSearch.search()` rather than indexed `list()`.")}).strict();de({blueprints:At(PS)}).strict();de({appId:Z().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:Z().min(1),isOperatorDefault:Fe(!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:ol.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();de({blueprintId:Z().min(1),updatedAt:Z().min(1)}).strict();de({appId:Z().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:Z().min(1)}).strict();de({deleted:Fe(!0)}).strict();function cw(e){return"schemaVersion"in e?e.schemaVersion:Tx}function uw(e){const n={sessionId:e.sessionId,type:e.type};e.payload!==void 0&&(n.payload=e.payload),e.clientSeq!==void 0&&(n.clientSeq=e.clientSeq);const o=cw(e);return o!==void 0&&(n.schemaVersion=o),n}const P1=D.createContext(null);function Gr(){const e=D.useContext(P1);if(!e)throw new Error("useWireContext must be used within a WireProvider. Ensure the component is rendered inside a GguiWireProvider.");return e}function Z1({config:e,children:n}){return i.jsx(P1.Provider,{value:e,children:n})}const kf=new Set;let Nf=!1;function dw(e,n){try{return`${e}::${JSON.stringify(n??null)}`}catch{return null}}function fw(e,n){const o=dw(e,n);return o===null?{suppressed:!1,signature:o}:kf.has(o)?{suppressed:!0,signature:o}:(kf.add(o),Nf||(Nf=!0,queueMicrotask(()=>{kf.clear(),Nf=!1})),{suppressed:!1,signature:o})}function G1(e){const{dispatch:n,onDispatchSuppressed:o}=Gr();return D.useCallback(l=>{const c=fw(e,l);if(c.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.`),o)try{o({actionName:e,payloadSignature:c.signature,payload:l,suppressedAt:Date.now()})}catch(u){console.warn("[ggui] onDispatchSuppressed observer threw — ignoring:",u)}return}n(e,l)},[e,n,o])}function pw(e){var c;const n=e.length===0?"Context":e.charAt(0).toUpperCase()+e.slice(1)+"Context",o=(c=globalThis.__ggui__)==null?void 0:c.contexts,l=o==null?void 0:o[n];if(!l)throw new 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 D.useContext(l)}function F1(e){const{subscribe:n}=Gr(),[o,l]=D.useState(null),[c,u]=D.useState([]),[d,p]=D.useState(!1),g=D.useRef(c);return g.current=c,D.useEffect(()=>n(e,h=>{const y=h.payload;l(y),h.mode==="replace"?u([y]):u([...g.current,y]),h.complete&&p(!0)}),[e,n]),{latest:o,all:c,isComplete:d}}function gw(e){return{useAction:n=>G1(n),useStream:n=>F1(n)}}function mw(){const{auth:e}=Gr();return e}function hw(){const{app:e}=Gr();return e}function yw(){const{render:e}=Gr();return e}class Y1 extends Error{constructor(o,l,c){super(c?`Client contract violation (${o}): ${c}`:`Client contract violation (${o})`);pn(this,"direction");pn(this,"violations");this.name="ClientContractViolationError",this.direction=o,this.violations=l}}function vw(e,n,o){return e?q1({action:n,data:o},e):{valid:!0,violations:[]}}function $w(e,n,o,l){return H1(n)?$v(n,o,e??{},l):e?$v(n,o,e,l):{valid:!0,violations:[]}}function K1(e){return uw(e)}function J1(e,n){return sw(n,e)}function bw(e,n){return e?lw(n,e):{valid:!0,violations:[]}}const X1=256;class xw{constructor(){pn(this,"listeners",new Map);pn(this,"reservedReplay",new Map)}subscribe(n,o){let l=this.listeners.get(n);if(l===void 0&&(l=new Set,this.listeners.set(n,l)),l.add(o),n.startsWith(vv)){const c=this.reservedReplay.get(n);if(c!==void 0)for(const u of c)o(u)}return()=>{const c=this.listeners.get(n);c!==void 0&&(c.delete(o),c.size===0&&this.listeners.delete(n))}}emit(n){if(n.channel.startsWith(vv)){let l=this.reservedReplay.get(n.channel);l===void 0&&(l=[],this.reservedReplay.set(n.channel,l)),l.push(n),l.length>X1&&l.shift()}const o=this.listeners.get(n.channel);if(o!==void 0)for(const l of o)l(n)}}function _w(e){let n=0;const o=e.nextClientSeq??(()=>(n+=1,n)),l=e.validateEnvelope??J1;return{app:e.app,render:e.render,auth:e.auth,dispatch:(c,u)=>{const d=K1({sessionId:e.render.sessionId,type:"data:submit",payload:{action:c,data:u},clientSeq:o()}),p=l(e.getActiveActionSpec(),d);if(!p.valid){e.onViolation(new Y1("outbound-action",p.violations));return}e.emitEnvelope(d)},subscribe:(c,u)=>e.streamBus.subscribe(c,d=>{u({payload:d.payload,mode:d.mode,...d.complete!==void 0?{complete:d.complete}:{}})})}}const jw=Object.freeze(Object.defineProperty({__proto__:null,ClientContractViolationError:Y1,GguiWireProvider:Z1,RESERVED_CHANNEL_REPLAY_MAX:X1,StreamBus:xw,buildActionEnvelope:K1,buildWireConfig:_w,useAction:G1,useApp:hw,useAuth:mw,useContract:gw,useGguiContext:pw,useRender:yw,useStream:F1,useWireContext:Gr,validateInboundPropsPayload:bw,validateInboundStreamPayload:$w,validateOutboundActionEnvelope:J1,validateOutboundActionPayload:vw},Symbol.toStringTag,{value:"Module"}));D.createContext(null);new Set(tp);var Af={};Nc(Af,{Accordion:()=>b8,Alert:()=>n8,Avatar:()=>Ic,Badge:()=>Qw,Box:()=>Dw,Button:()=>la,Card:()=>Cw,Checkbox:()=>Uf,Container:()=>kw,Divider:()=>Df,Grid:()=>Aw,Heading:()=>Uc,Icon:()=>wt,Image:()=>o8,Input:()=>t$,Link:()=>fp,MotionKeyframes:()=>x8,Progress:()=>a$,RadioGroup:()=>Yw,Row:()=>Li,Select:()=>Zw,Skeleton:()=>Ww,Slider:()=>Kw,Spacer:()=>Uw,Spinner:()=>Fa,Stack:()=>Pi,Table:()=>d8,Tabs:()=>p8,Text:()=>hr,TextArea:()=>up,Toast:()=>v8,Toggle:()=>Fw,Tooltip:()=>c8,useAnimationKey:()=>j8,useMotion:()=>_8});var Jn={xs:"320px",sm:"480px",md:"640px",lg:"768px",xl:"1024px","2xl":"1280px","3xl":"1536px",full:"100%"},Xt={sm:"4px",md:"6px",lg:"8px",xl:"12px",full:"9999px"},ll={sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)"},Gi={dropdown:1e3,sticky:1100,modal:1400,tooltip:1800},Q1={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)"},Sw=new Set(Object.keys(Q1));function Za(e){if(e!==void 0)return typeof e=="number"?`${e}px`:Sw.has(e)?Q1[e]:e}var ww={xs:Jn.xs,sm:Jn.sm,md:Jn.md,lg:Jn.lg,xl:Jn.xl,"2xl":Jn["2xl"],"3xl":Jn["3xl"],full:Jn.full};function kw({children:e,maxWidth:n="lg",center:o=!0,padding:l,style:c,className:u}){const d=ww[n]||n,p=Za(l);return i.jsx("div",{className:u,style:{maxWidth:d,margin:o?"0 auto":void 0,padding:p,width:"100%",...c},children:e})}function Ii(e,n,o,l){return e===void 0?D.createElement("div",{className:o.className,style:o.style},l):D.createElement(e,{...n,className:o.className,style:o.style},l)}function Fi(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, ${Nw[e]})`;case"inverse":return"var(--ggui-color-surface, #ffffff)";case"inherit":return"inherit"}}var Nw={success:"#15803d",warning:"#b45309",error:"#b91c1c",info:"#0e7490"};function W1(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 e$={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)"},zw=new Set(Object.keys(e$));function tl(e){if(e!==void 0)return typeof e=="number"?`${e}px`:zw.has(e)?e$[e]:e}var Ew={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 Cw(e){const{children:n,padding:o="lg",shadow:l="sm",border:c=!0,radius:u="lg",surface:d,style:p,className:g,as:h,...y}=e,v=Za(o),k={backgroundColor:W1(d??"default"),borderRadius:tl(u),padding:v,boxShadow:Ew[l]||l,border:c?"1px solid var(--ggui-color-outlineVariant, #e4e4e7)":void 0,...p};return Ii(h,y,{className:g,style:k},n)}var Tw={start:"flex-start",center:"center",end:"flex-end",between:"space-between",around:"space-around",evenly:"space-evenly"},Mw={start:"flex-start",center:"center",end:"flex-end",stretch:"stretch"};function Pi(e){const{children:n,direction:o="vertical",gap:l="sm",align:c="stretch",justify:u="start",wrap:d=!1,style:p,className:g,as:h,...y}=e,v=Za(l),j={display:"flex",flexDirection:o==="vertical"?"column":"row",gap:v,alignItems:Mw[c]||c,justifyContent:Tw[u]||u,flexWrap:d?"wrap":"nowrap",...p};return Ii(h,y,{className:g,style:j},n)}function Li(e){return D.createElement(Pi,{...e,direction:"horizontal"})}var Ow=[["sm",640],["md",768],["lg",1024],["xl",1280]],zf=e=>`repeat(${e}, minmax(0, 1fr))`;function Rw(e){const n=JSON.stringify(e);let o=0;for(let l=0;l<n.length;l++)o=Math.imul(31,o)+n.charCodeAt(l)|0;return(o>>>0).toString(36)}function Aw(e){const{children:n,columns:o=2,gap:l="md",minColumnWidth:c,style:u,className:d,as:p,...g}=e,h=typeof c=="number"?`${c}px`:c;if(h!==void 0){const v={display:"grid",gridTemplateColumns:`repeat(auto-fill, minmax(${h}, 1fr))`,gap:Za(l),...u};return Ii(p,g,{className:d,style:v},n)}if(typeof o=="object"){const v=`ggui-grid-${Rw(o)}`,j=[`.${v}{grid-template-columns:${zf(o.base??1)}}`];for(const[x,E]of Ow){const z=o[x];typeof z=="number"&&j.push(`@media (min-width:${E}px){.${v}{grid-template-columns:${zf(z)}}}`)}const k={display:"grid",gap:Za(l),...u};return Ii(p,g,{className:d?`${d} ${v}`:v,style:k},i.jsxs(i.Fragment,{children:[i.jsx("style",{children:j.join("")}),n]}))}const y={display:"grid",gridTemplateColumns:zf(o),gap:Za(l),...u};return Ii(p,g,{className:d,style:y},n)}function Dw(e){const{children:n,padding:o,paddingX:l,paddingY:c,margin:u,surface:d,assetColor:p,assetSemantic:g,radius:h,style:y,className:v,as:j,...k}=e;let x;if(l!==void 0||c!==void 0){const $=Za(l)||"0";x=`${Za(c)||"0"} ${$}`}else x=Za(o);const E=p!==void 0&&typeof g=="string"&&g.length>0?p:void 0,z=E||(d?W1(d):void 0),w={padding:x,margin:Za(u),background:z,borderRadius:tl(h),...y};return Ii(j,k,{className:v,style:w},n)}function Df({orientation:e="horizontal",margin:n="var(--ggui-spacing-md, 16px)",tone:o,style:l,className:c}){const u=typeof n=="number"?`${n}px`:n,d=o?Fi(o):"var(--ggui-color-outlineVariant, #e4e4e7)";return e==="vertical"?i.jsx("div",{role:"separator","aria-orientation":"vertical",className:c,style:{width:"1px",backgroundColor:d,margin:`0 ${u}`,alignSelf:"stretch",...l}}):i.jsx("hr",{role:"separator","aria-orientation":"horizontal",className:c,style:{border:"none",height:"1px",backgroundColor:d,margin:`${u} 0`,...l}})}function Uw({size:e=16,style:n,className:o}){return e==="flex"?i.jsx("div",{className:o,style:{flex:1,...n}}):i.jsx("div",{className:o,style:{width:`${e}px`,height:`${e}px`,flexShrink:0,...n}})}var Iw={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)"},Lw={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)"},Vw={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 hr({children:e,size:n="base",weight:o="normal",caps:l=!1,tone:c,align:u,truncate:d,is:p="p",id:g,htmlFor:h,style:y,className:v}){const j=c?Fi(c):"var(--ggui-color-onSurface, #18181b)",k={fontSize:Iw[n],fontWeight:Lw[o],lineHeight:Vw[n],color:j,textAlign:u,margin:0,...l&&{textTransform:"uppercase",letterSpacing:"0.05em"},...d&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},...y},x={id:g,htmlFor:h,className:v,style:k};return D.createElement(p,x,e)}var be={xs:"12px",sm:"14px",base:"16px",lg:"18px",xl:"20px","2xl":"24px","3xl":"30px","4xl":"36px","5xl":"48px"},Xe={normal:400,medium:500,semibold:600,bold:700},xa={tight:1.25,snug:1.375,normal:1.5,relaxed:1.625},Pr={tight:"-0.025em",normal:"0em"},xv={h1:{fontSize:be["4xl"],fontWeight:Xe.bold,lineHeight:xa.tight,letterSpacing:Pr.tight},h2:{fontSize:be["3xl"],fontWeight:Xe.bold,lineHeight:xa.tight,letterSpacing:Pr.tight},h3:{fontSize:be["2xl"],fontWeight:Xe.semibold,lineHeight:xa.snug,letterSpacing:Pr.normal},h4:{fontSize:be.xl,fontWeight:Xe.semibold,lineHeight:xa.snug,letterSpacing:Pr.normal},h5:{fontSize:be.lg,fontWeight:Xe.semibold,lineHeight:xa.normal,letterSpacing:Pr.normal},h6:{fontSize:be.base,fontWeight:Xe.semibold,lineHeight:xa.normal,letterSpacing:Pr.normal}};function Uc({children:e,level:n=2,tone:o,align:l,style:c,className:u}){const d=`h${n}`,p=xv[d]||xv.h2,g=o?Fi(o):"var(--ggui-color-onSurface, #18181b)";return D.createElement(d,{className:u,style:{...p,color:g,textAlign:l,margin:0,...c}},e)}function Fa({size:e=24,tone:n,style:o,className:l}){const c=n==="inherit"?"currentColor":n?Fi(n):"var(--ggui-color-primary-600, #0284c7)";return i.jsxs("svg",{className:l,width:e,height:e,viewBox:"0 0 24 24",fill:"none",role:"status","aria-label":"Loading",style:{animation:"ggui-spin 1s linear infinite",...o},children:[i.jsx("style",{children:"@keyframes ggui-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }"}),i.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"var(--ggui-color-outlineVariant, #e4e4e7)",strokeWidth:"3",fill:"none"}),i.jsx("path",{d:"M12 2a10 10 0 0 1 10 10",stroke:c,strokeWidth:"3",strokeLinecap:"round",fill:"none"})]})}var kt={fast:"100ms",normal:"200ms"},Nt={easeOut:"cubic-bezier(0, 0, 0.2, 1)",easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)"},Bw={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"}},Hw={primary:{backgroundColor:"var(--ggui-color-primary-600, #0284c7)",color:"#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:"#ffffff",border:"none"}};function la({children:e,variant:n="primary",size:o="md",fullWidth:l,loading:c,disabled:u,leftIcon:d,rightIcon:p,type:g="button",onClick:h,onPress:y,style:v,className:j,...k}){const x=u||c,E=h??y;return i.jsx("button",{type:g,onClick:x?void 0:E,disabled:x,className:j,style:{...Bw[o],...Hw[n],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:x?"not-allowed":"pointer",opacity:x?.5:1,width:l?"100%":void 0,transition:`background-color ${kt.normal} ${Nt.easeInOut}, box-shadow ${kt.normal} ${Nt.easeInOut}, opacity ${kt.normal} ${Nt.easeInOut}`,boxShadow:"var(--ggui-shape-shadow-sm, 0 1px 2px rgba(0,0,0,0.05))",...v},...k,children:c?i.jsx(Fa,{size:16,tone:"inherit"}):i.jsxs(i.Fragment,{children:[d,e,p]})})}var qw={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 t$({label:e,placeholder:n,value:o,onChange:l,type:c="text",error:u,helperText:d,required:p,disabled:g,size:h="md",style:y,className:v,...j}){const k=D.useId(),x=`${k}-input`,E=`${k}-message`,z=!!u,w=!!(u||d);return i.jsxs("div",{className:v,style:{display:"flex",flexDirection:"column",gap:"var(--ggui-spacing-1, 4px)",...y},children:[e&&i.jsxs("label",{htmlFor:x,style:{fontSize:"var(--ggui-font-size-sm, 14px)",fontWeight:"var(--ggui-font-weight-medium, 500)",color:"var(--ggui-color-onSurfaceVariant, #52525b)"},children:[e,p&&i.jsx("span",{"aria-hidden":"true",style:{color:"var(--ggui-color-error-500, #ef4444)",marginLeft:"2px"},children:"*"})]}),i.jsx("input",{id:x,type:c,placeholder:n,value:o,onChange:$=>l==null?void 0:l($.target.value),disabled:g,required:p,"aria-invalid":z||void 0,"aria-describedby":w?E:void 0,style:{...qw[h],width:"100%",borderRadius:"var(--ggui-shape-radius-md, 8px)",border:`1px solid ${z?"var(--ggui-color-error-500, #ef4444)":"var(--ggui-color-outline, #d4d4d8)"}`,backgroundColor:g?"var(--ggui-color-surface, #fafafa)":"var(--ggui-color-surface, #ffffff)",color:"var(--ggui-color-onSurface, #18181b)",transition:`border-color ${kt.normal} ${Nt.easeInOut}, box-shadow ${kt.normal} ${Nt.easeInOut}`,boxSizing:"border-box"},...j}),w&&i.jsx("span",{id:E,role:z?"alert":void 0,style:{fontSize:"var(--ggui-font-size-xs, 12px)",color:z?"var(--ggui-color-error-500, #ef4444)":"var(--ggui-color-onSurfaceVariant, #52525b)"},children:u||d})]})}function up({label:e,placeholder:n,value:o,onChange:l,rows:c=4,error:u,helperText:d,required:p,disabled:g,maxLength:h,showCount:y,autoResize:v,style:j,className:k,...x}){const E=D.useId(),z=`${E}-textarea`,w=`${E}-message`,$=!!u,N=!!(u||d),R=(o==null?void 0:o.length)||0;return i.jsxs("div",{className:k,style:{display:"flex",flexDirection:"column",gap:"var(--ggui-spacing-1, 4px)",...j},children:[e&&i.jsxs("label",{htmlFor:z,style:{fontSize:"var(--ggui-font-size-sm, 14px)",fontWeight:"var(--ggui-font-weight-medium, 500)",color:"var(--ggui-color-onSurfaceVariant, #52525b)"},children:[e,p&&i.jsx("span",{"aria-hidden":"true",style:{color:"var(--ggui-color-error-500, #ef4444)",marginLeft:"2px"},children:"*"})]}),i.jsx("textarea",{id:z,placeholder:n,value:o,onChange:_=>l==null?void 0:l(_.target.value),rows:c,disabled:g,required:p,maxLength:h,"aria-invalid":$||void 0,"aria-describedby":N?w:void 0,style:{padding:"10px 12px",width:"100%",borderRadius:"var(--ggui-shape-radius-md, 8px)",border:`1px solid ${$?"var(--ggui-color-error-500, #ef4444)":"var(--ggui-color-outline, #d4d4d8)"}`,backgroundColor:g?"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 ${kt.normal} ${Nt.easeInOut}, box-shadow ${kt.normal} ${Nt.easeInOut}`,boxSizing:"border-box",resize:v?"none":"vertical"},...x}),i.jsxs("div",{style:{display:"flex",justifyContent:"space-between"},children:[N&&i.jsx("span",{id:w,role:$?"alert":void 0,style:{fontSize:"var(--ggui-font-size-xs, 12px)",color:$?"var(--ggui-color-error-500, #ef4444)":"var(--ggui-color-onSurfaceVariant, #52525b)"},children:u||d}),y&&h&&i.jsxs("span",{style:{fontSize:"var(--ggui-font-size-xs, 12px)",color:"var(--ggui-color-onSurfaceVariant, #52525b)",marginLeft:"auto"},children:[R,"/",h]})]})]})}var Pw={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 Zw({label:e,value:n,onChange:o,options:l,placeholder:c,error:u,helperText:d,required:p,disabled:g,size:h="md",style:y,className:v,...j}){const k=D.useId(),x=`${k}-select`,E=`${k}-message`,z=!!u,w=!!(u||d);return i.jsxs("div",{className:v,style:{display:"flex",flexDirection:"column",gap:"var(--ggui-spacing-1, 4px)",...y},children:[e&&i.jsxs("label",{htmlFor:x,style:{fontSize:"var(--ggui-font-size-sm, 14px)",fontWeight:"var(--ggui-font-weight-medium, 500)",color:"var(--ggui-color-onSurfaceVariant, #52525b)"},children:[e,p&&i.jsx("span",{"aria-hidden":"true",style:{color:"var(--ggui-color-error-500, #ef4444)",marginLeft:"2px"},children:"*"})]}),i.jsxs("select",{id:x,value:n,onChange:$=>o==null?void 0:o($.target.value),disabled:g,required:p,"aria-invalid":z||void 0,"aria-describedby":w?E:void 0,style:{...Pw[h],width:"100%",borderRadius:"var(--ggui-shape-radius-md, 8px)",border:`1px solid ${z?"var(--ggui-color-error-500, #ef4444)":"var(--ggui-color-outline, #d4d4d8)"}`,backgroundColor:g?"var(--ggui-color-surface, #fafafa)":"var(--ggui-color-surface, #ffffff)",color:n?"var(--ggui-color-onSurface, #18181b)":"var(--ggui-color-onSurfaceVariant, #52525b)",cursor:g?"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 ${kt.normal} ${Nt.easeInOut}, box-shadow ${kt.normal} ${Nt.easeInOut}`},...j,children:[c&&i.jsx("option",{value:"",disabled:!0,children:c}),l.map($=>i.jsx("option",{value:$.value,disabled:$.disabled,children:$.label},$.value))]}),w&&i.jsx("span",{id:E,role:z?"alert":void 0,style:{fontSize:"var(--ggui-font-size-xs, 12px)",color:z?"var(--ggui-color-error-500, #ef4444)":"var(--ggui-color-onSurfaceVariant, #52525b)"},children:u||d})]})}function Uf({label:e,checked:n,onChange:o,disabled:l,description:c,indeterminate:u,style:d,className:p}){return i.jsxs("label",{className:p,style:{display:"flex",alignItems:"flex-start",gap:"var(--ggui-spacing-2, 8px)",cursor:l?"not-allowed":"pointer",opacity:l?.5:1,...d},children:[i.jsxs("div",{style:{position:"relative",width:"18px",height:"18px",flexShrink:0,marginTop:"2px"},children:[i.jsx("input",{type:"checkbox",checked:n,onChange:g=>o==null?void 0:o(g.target.checked),disabled:l,ref:g=>{g&&(g.indeterminate=u||!1)},style:{position:"absolute",width:"18px",height:"18px",margin:0,opacity:0,cursor:l?"not-allowed":"pointer"}}),i.jsx("div",{style:{width:"18px",height:"18px",borderRadius:"var(--ggui-shape-radius-sm, 4px)",border:`2px solid ${n||u?"var(--ggui-color-primary-600, #0284c7)":"var(--ggui-color-outline, #d4d4d8)"}`,backgroundColor:n||u?"var(--ggui-color-primary-600, #0284c7)":"var(--ggui-color-surface, #ffffff)",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s"},children:(n||u)&&i.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",style:{color:"#ffffff"},children:u?i.jsx("path",{d:"M2.5 6H9.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}):i.jsx("path",{d:"M2.5 6L5 8.5L9.5 3.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),(e||c)&&i.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"2px"},children:[e&&i.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}),c&&i.jsx("span",{style:{fontSize:"var(--ggui-font-size-xs, 12px)",color:"var(--ggui-color-onSurfaceVariant, #52525b)"},children:c})]})]})}var Gw={sm:{width:36,height:20,knob:16},md:{width:44,height:24,knob:20},lg:{width:52,height:28,knob:24}};function Fw({label:e,checked:n,onChange:o,disabled:l,size:c="md",style:u,className:d}){const p=Gw[c],[g,h]=D.useState(!1);return i.jsxs("label",{className:d,style:{display:"flex",alignItems:"center",gap:"var(--ggui-spacing-2, 8px)",cursor:l?"not-allowed":"pointer",opacity:l?.5:1,...u},children:[i.jsx("div",{role:"switch","aria-checked":n,"aria-label":e,tabIndex:l?-1:0,onClick:()=>!l&&(o==null?void 0:o(!n)),onKeyDown:y=>{l||(y.key===" "||y.key==="Enter")&&(y.preventDefault(),o==null||o(!n))},onFocus:()=>h(!0),onBlur:()=>h(!1),style:{width:p.width,height:p.height,borderRadius:"9999px",backgroundColor:n?"var(--ggui-color-primary-600, #0284c7)":"var(--ggui-color-outline, #d4d4d8)",position:"relative",transition:`background-color ${kt.normal} ${Nt.easeInOut}, box-shadow ${kt.normal} ${Nt.easeInOut}`,flexShrink:0,outline:"none",boxShadow:g?"0 0 0 3px var(--ggui-color-primary-200, #bae6fd)":void 0},children:i.jsx("div",{style:{width:p.knob,height:p.knob,borderRadius:"50%",backgroundColor:"#ffffff",position:"absolute",top:(p.height-p.knob)/2,left:n?p.width-p.knob-(p.height-p.knob)/2:(p.height-p.knob)/2,transition:`left ${kt.normal} ${Nt.easeInOut}`,boxShadow:"var(--ggui-shape-shadow-sm, 0 1px 2px rgba(0,0,0,0.05))"}})}),e&&i.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 Yw({label:e,value:n,onChange:o,options:l,direction:c="vertical",disabled:u,error:d,style:p,className:g}){const h=D.useId(),y=`${h}-label`,v=`${h}-error`,j=`${h}-radio`,k=!!d;return i.jsxs("div",{role:"radiogroup","aria-labelledby":e?y:void 0,"aria-describedby":k?v:void 0,className:g,style:{display:"flex",flexDirection:"column",gap:"var(--ggui-spacing-2, 8px)",...p},children:[e&&i.jsx("span",{id:y,style:{fontSize:"var(--ggui-font-size-sm, 14px)",fontWeight:"var(--ggui-font-weight-medium, 500)",color:"var(--ggui-color-onSurfaceVariant, #52525b)"},children:e}),i.jsx("div",{style:{display:"flex",flexDirection:c==="vertical"?"column":"row",gap:c==="vertical"?"var(--ggui-spacing-2, 8px)":"var(--ggui-spacing-4, 16px)",flexWrap:"wrap"},children:l.map(x=>{const E=n===x.value,z=u||x.disabled;return i.jsxs("label",{style:{display:"flex",alignItems:"flex-start",gap:"var(--ggui-spacing-2, 8px)",cursor:z?"not-allowed":"pointer",opacity:z?.5:1},children:[i.jsxs("div",{style:{position:"relative",width:"18px",height:"18px",flexShrink:0,marginTop:"2px"},children:[i.jsx("input",{type:"radio",name:j,value:x.value,checked:E,onChange:()=>o==null?void 0:o(x.value),disabled:z,style:{position:"absolute",width:"18px",height:"18px",margin:0,opacity:0,cursor:z?"not-allowed":"pointer"}}),i.jsx("div",{style:{width:"18px",height:"18px",borderRadius:"var(--ggui-shape-radius-full, 9999px)",border:`2px solid ${E?"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:E&&i.jsx("div",{style:{width:"8px",height:"8px",borderRadius:"var(--ggui-shape-radius-full, 9999px)",backgroundColor:"var(--ggui-color-primary-600, #0284c7)"}})})]}),i.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"2px"},children:[i.jsx("span",{style:{fontSize:"var(--ggui-font-size-sm, 14px)",fontWeight:"var(--ggui-font-weight-medium, 500)",color:"var(--ggui-color-onSurfaceVariant, #52525b)"},children:x.label}),x.description&&i.jsx("span",{style:{fontSize:"var(--ggui-font-size-xs, 12px)",color:"var(--ggui-color-onSurfaceVariant, #52525b)"},children:x.description})]})]},x.value)})}),d&&i.jsx("span",{id:v,role:"alert",style:{fontSize:"var(--ggui-font-size-xs, 12px)",color:"var(--ggui-color-error-500, #ef4444)"},children:d})]})}function Kw({label:e,value:n=0,onChange:o,min:l=0,max:c=100,step:u=1,disabled:d,showValue:p,style:g,className:h}){const y=D.useId(),v=`${y}-slider`,j=`${y}-label`,k=(n-l)/(c-l)*100;return i.jsxs("div",{className:h,style:{display:"flex",flexDirection:"column",gap:"var(--ggui-spacing-2, 8px)",...g},children:[(e||p)&&i.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e&&i.jsx("span",{id:j,style:{fontSize:"var(--ggui-font-size-sm, 14px)",fontWeight:"var(--ggui-font-weight-medium, 500)",color:"var(--ggui-color-onSurfaceVariant, #52525b)"},children:e}),p&&i.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:n})]}),i.jsxs("div",{style:{position:"relative",height:"20px",display:"flex",alignItems:"center"},children:[i.jsx("div",{style:{position:"absolute",width:"100%",height:"6px",borderRadius:"3px",backgroundColor:"var(--ggui-color-outlineVariant, #e4e4e7)"}}),i.jsx("div",{style:{position:"absolute",width:`${k}%`,height:"6px",borderRadius:"3px",backgroundColor:d?"var(--ggui-color-outline, #d4d4d8)":"var(--ggui-color-primary-600, #0284c7)",transition:"width 0.1s"}}),i.jsx("input",{id:v,type:"range",min:l,max:c,step:u,value:n,onChange:x=>o==null?void 0:o(Number(x.target.value)),disabled:d,"aria-labelledby":e?j:void 0,"aria-label":e?void 0:"Slider","aria-valuenow":n,"aria-valuemin":l,"aria-valuemax":c,style:{position:"absolute",width:"100%",height:"20px",margin:0,opacity:0,cursor:d?"not-allowed":"pointer",zIndex:1}}),i.jsx("div",{style:{position:"absolute",left:`calc(${k}% - 10px)`,width:"20px",height:"20px",borderRadius:"50%",backgroundColor:"#ffffff",border:`2px solid ${d?"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 Jw={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)"}},Xw={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 Qw({children:e,variant:n="default",size:o="md",pill:l=!0,style:c,className:u}){return i.jsx("span",{className:u,style:{...Jw[n],...Xw[o],display:"inline-flex",alignItems:"center",justifyContent:"center",fontWeight:"var(--ggui-font-weight-medium, 500)",borderRadius:l?"9999px":"var(--ggui-shape-radius-sm, 4px)",whiteSpace:"nowrap",...c},children:e})}var _v=e=>e===void 0?void 0:typeof e=="number"?`${e}px`:e;function Ww({variant:e="rect",width:n,height:o,radius:l="sm",style:c,className:u}){const d=e==="circle",p=e==="text",g=_v(n)??(d?"2.5rem":"100%"),h=_v(o)??(p?"1em":d?g:"1.25rem"),y={display:"block",width:g,height:h,borderRadius:d?"9999px":tl(l),backgroundColor:"var(--ggui-color-surfaceVariant, #f4f4f5)",animation:"ggui-skeleton-pulse 1.5s ease-in-out infinite",...c};return i.jsx("div",{className:u,style:y,"aria-hidden":"true",children:i.jsx("style",{children:"@keyframes ggui-skeleton-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }"})})}var e8={xs:24,sm:32,md:40,lg:48,xl:64},jv=["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 Ic({src:e,name:n,size:o="md",shape:l="circle",style:c,className:u}){const[d,p]=D.useState(!1),g=typeof o=="number"?o:e8[o]||40,h=n?n.split(" ").map(j=>j[0]).join("").toUpperCase().slice(0,2):"?",y=j=>{if(!j)return"var(--ggui-color-outline, #d4d4d8)";const k=j.split("").reduce((x,E)=>x+E.charCodeAt(0),0);return jv[k%jv.length]},v=!e||d;return i.jsx("div",{role:"img","aria-label":n||"Avatar",className:u,style:{width:g,height:g,borderRadius:l==="circle"?"50%":"var(--ggui-shape-radius-md, 8px)",backgroundColor:v?y(n):"transparent",color:"#ffffff",display:"flex",alignItems:"center",justifyContent:"center",fontSize:g*.4,fontWeight:"var(--ggui-font-weight-semibold, 600)",overflow:"hidden",flexShrink:0,...c},children:v?h:i.jsx("img",{src:e,alt:n||"Avatar",onError:()=>p(!0),style:{width:"100%",height:"100%",objectFit:"cover"}})})}var t8={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)"}},a8={info:i.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",children:i.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:i.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",children:i.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:i.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",children:i.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:i.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",children:i.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 n8({children:e,variant:n="info",title:o,closable:l,onClose:c,icon:u,style:d,className:p}){const g=t8[n];return i.jsxs("div",{role:"alert",className:p,style:{display:"flex",gap:"12px",padding:"12px 16px",borderRadius:"var(--ggui-shape-radius-lg, 12px)",backgroundColor:g.bg,border:`1px solid ${g.border}`,color:g.text,...d},children:[i.jsx("div",{style:{color:g.icon,flexShrink:0},children:u||a8[n]}),i.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:"var(--ggui-spacing-1, 4px)"},children:[o&&i.jsx("div",{style:{fontWeight:"var(--ggui-font-weight-semibold, 600)",fontSize:"var(--ggui-font-size-sm, 14px)"},children:o}),i.jsx("div",{style:{fontSize:"var(--ggui-font-size-sm, 14px)"},children:e})]}),l&&i.jsx("button",{onClick:c,"aria-label":"Close",style:{background:"none",border:"none",padding:"4px",cursor:"pointer",color:g.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:i.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",children:i.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 r8={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)"},i8={sm:4,md:8,lg:12};function a$({value:e,max:n=100,variant:o="default",size:l="md",label:c,showLabel:u,indeterminate:d,style:p,className:g}){const h=Math.min(100,Math.max(0,e/n*100)),y=i8[l],v=r8[o],j=c??"Progress";return i.jsxs("div",{className:g,style:{display:"flex",flexDirection:"column",gap:"var(--ggui-spacing-1, 4px)",...p},children:[u&&i.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[i.jsx("span",{style:{fontSize:"var(--ggui-font-size-sm, 14px)",color:"var(--ggui-color-onSurfaceVariant, #52525b)"},children:j}),i.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(h),"%"]})]}),i.jsxs("div",{role:"progressbar","aria-valuenow":d?void 0:e,"aria-valuemin":0,"aria-valuemax":n,"aria-label":j,style:{width:"100%",height:y,borderRadius:y/2,backgroundColor:"var(--ggui-color-outlineVariant, #e4e4e7)",overflow:"hidden"},children:[i.jsx("div",{style:{height:"100%",borderRadius:y/2,backgroundColor:v,transition:d?"none":"width 0.3s ease",...d?{width:"30%",animation:"ggui-progress-indeterminate 1.5s ease-in-out infinite"}:{width:`${h}%`}}}),d&&i.jsx("style",{children:`@keyframes ggui-progress-indeterminate {
120
- 0% { transform: translateX(-100%); }
121
- 100% { transform: translateX(400%); }
122
- }`})]})]})}function o8({src:e,alt:n,width:o,height:l,objectFit:c="cover",radius:u,fallback:d,style:p,className:g}){const[h,y]=D.useState(!1),v=j=>{if(j!==void 0)return typeof j=="number"?`${j}px`:j};return h&&d?i.jsx(i.Fragment,{children:d}):h?i.jsx("div",{role:"img","aria-label":`${n} (failed to load)`,className:g,style:{width:v(o)||"100%",height:v(l)||"auto",borderRadius:tl(u),backgroundColor:"var(--ggui-color-surfaceVariant, #f4f4f5)",display:"flex",alignItems:"center",justifyContent:"center",color:"var(--ggui-color-outline, #d4d4d8)",...p},children:i.jsx("svg",{width:"48",height:"48",viewBox:"0 0 24 24",fill:"currentColor",children:i.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"})})}):i.jsx("img",{src:e,alt:n,onError:()=>y(!0),className:g,style:{width:v(o)||"100%",height:v(l)||"auto",objectFit:c,borderRadius:tl(u),display:"block",...p}})}var dp={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"}]]},n$=new Map;for(const e of Object.keys(dp))n$.set(e.toLowerCase(),e);function l8(e){if(dp[e])return e;const n=e.replace(/[-_]/g,"").toLowerCase();return n$.get(n)}function s8(e,n,o){return i.jsx("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:o,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.map(([l,c],u)=>xc.createElement(l,{key:u,...c}))})}function wt({name:e,size:n=24,tone:o,children:l,style:c,className:u,"aria-label":d}){const p=o?Fi(o):"currentColor",g=d?{role:"img","aria-label":d}:{"aria-hidden":!0},h={display:"inline-flex",alignItems:"center",justifyContent:"center",width:n,height:n,color:p,...c};if(l)return i.jsx("span",{className:u,style:h,...g,children:l});if(e){const y=l8(e);if(y)return i.jsx("span",{className:u,style:h,...g,children:s8(dp[y],n,p)})}return e&&/[^\x00-\x7F]/.test(e)?i.jsx("span",{className:u,...g,style:{...h,fontSize:n*.75,lineHeight:1},children:e}):i.jsx("span",{className:u,...g,style:{...h,backgroundColor:"var(--ggui-color-outlineVariant, #e4e4e7)",borderRadius:"var(--ggui-shape-radius-sm, 4px)",color:"var(--ggui-color-outline, #d4d4d8)",fontSize:n*.5},children:"?"})}function fp({children:e,href:n,external:o,tone:l,underline:c="hover",style:u,className:d,...p}){const g=l?Fi(l):"var(--ggui-color-primary-600, #0284c7)",h={always:"underline",hover:"none",none:"none"}[c];return i.jsxs("a",{href:n,target:o?"_blank":void 0,rel:o?"noopener noreferrer":void 0,className:d,style:{color:g,textDecoration:h,cursor:"pointer",transition:"color 0.2s",...u},onMouseEnter:y=>{c==="hover"&&(y.target.style.textDecoration="underline")},onMouseLeave:y=>{c==="hover"&&(y.target.style.textDecoration="none")},...p,children:[e,o&&i.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:[i.jsx("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),i.jsx("polyline",{points:"15 3 21 3 21 9"}),i.jsx("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]})]})}function c8({children:e,content:n,position:o="top",delay:l=200,style:c,className:u}){const[d,p]=D.useState(!1),[g,h]=D.useState({top:0,left:0}),y=D.useRef(null),v=D.useRef(null),j=()=>{v.current=setTimeout(()=>{p(!0)},l)},k=()=>{v.current&&clearTimeout(v.current),p(!1)};D.useEffect(()=>{if(d&&y.current){const E=y.current.getBoundingClientRect(),z=8;let w=0,$=0;switch(o){case"top":w=E.top-z,$=E.left+E.width/2;break;case"bottom":w=E.bottom+z,$=E.left+E.width/2;break;case"left":w=E.top+E.height/2,$=E.left-z;break;case"right":w=E.top+E.height/2,$=E.right+z;break}h({top:w,left:$})}},[d,o]),D.useEffect(()=>()=>{v.current&&clearTimeout(v.current)},[]);const x=()=>{switch(o){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 i.jsxs(i.Fragment,{children:[i.jsx("div",{ref:y,onMouseEnter:j,onMouseLeave:k,onFocus:j,onBlur:k,className:u,style:{display:"inline-block",...c},children:e}),d&&i.jsx("div",{role:"tooltip",style:{position:"fixed",top:g.top,left:g.left,transform:x(),backgroundColor:"var(--ggui-color-onSurface, #18181b)",color:"#ffffff",padding:"6px 10px",borderRadius:"var(--ggui-shape-radius-md, 8px)",fontSize:"var(--ggui-font-size-xs, 12px)",zIndex:Gi.tooltip,maxWidth:"200px",pointerEvents:"none",whiteSpace:"nowrap"},children:n})]})}var u8=(e,n)=>i.jsxs("span",{"aria-hidden":"true",style:{display:"inline-flex",flexDirection:"column",marginLeft:"4px",fontSize:"10px",lineHeight:1,opacity:e?1:.3},children:[i.jsx("span",{style:{opacity:e&&n==="asc"?1:.4},children:"▲"}),i.jsx("span",{style:{opacity:e&&n==="desc"?1:.4},children:"▼"})]});function d8({columns:e,data:n,sortKey:o,sortDirection:l="asc",onSort:c,striped:u=!1,hoverable:d=!0,compact:p=!1,bordered:g=!1,caption:h,style:y,className:v}){const[j,k]=D.useState(null),x=p?"var(--ggui-spacing-1, 4px) var(--ggui-spacing-2, 8px)":"var(--ggui-spacing-2, 8px) var(--ggui-spacing-4, 16px)",E=w=>{if(!c)return;c(w,o===w&&l==="asc"?"desc":"asc")},z={padding:x,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 i.jsx("div",{className:v,style:{overflowX:"auto",borderRadius:"var(--ggui-shape-radius-lg, 8px)",border:g?"1px solid var(--ggui-color-outlineVariant, #e4e4e7)":void 0,...y},children:i.jsxs("table",{role:"table",style:{width:"100%",borderCollapse:"collapse",fontSize:"var(--ggui-font-size-sm, 14px)",color:"var(--ggui-color-onSurfaceVariant, #52525b)"},children:[h&&i.jsx("caption",{style:{padding:x,fontSize:"var(--ggui-font-size-sm, 14px)",color:"var(--ggui-color-onSurfaceVariant, #52525b)",textAlign:"left",captionSide:"top"},children:h}),i.jsx("thead",{children:i.jsx("tr",{children:e.map(w=>i.jsx("th",{scope:"col","aria-sort":o===w.key?l==="asc"?"ascending":"descending":void 0,onClick:w.sortable?()=>E(w.key):void 0,onKeyDown:w.sortable?$=>{($.key==="Enter"||$.key===" ")&&($.preventDefault(),E(w.key))}:void 0,tabIndex:w.sortable?0:void 0,style:{...z,textAlign:w.align||"left",width:w.width,cursor:w.sortable?"pointer":"default"},children:i.jsxs("span",{style:{display:"inline-flex",alignItems:"center"},children:[w.header,w.sortable&&u8(o===w.key,l)]})},w.key))})}),i.jsx("tbody",{children:n.map((w,$)=>i.jsx("tr",{onMouseEnter:d?()=>k($):void 0,onMouseLeave:d?()=>k(null):void 0,style:{backgroundColor:d&&j===$||u&&$%2===1?"var(--ggui-color-surface, #fafafa)":"transparent",transition:"background-color 0.15s ease"},children:e.map(N=>i.jsx("td",{style:{padding:x,textAlign:N.align||"left",borderBottom:"1px solid var(--ggui-color-surfaceVariant, #f4f4f5)",borderRight:g?"1px solid var(--ggui-color-surfaceVariant, #f4f4f5)":void 0},children:N.render?N.render(w[N.key],w,$):w[N.key]},N.key))},$))})]})})}var f8={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 p8({items:e,activeKey:n,onChange:o,variant:l="line",size:c="md",fullWidth:u=!1,style:d,className:p}){var $;const g=D.useId(),[h,y]=D.useState(($=e[0])==null?void 0:$.key),v=n??h,j=D.useCallback(N=>{o?o(N):y(N)},[o]),k=e.find(N=>N.key===v),x=D.useRef(null),E=D.useCallback(N=>{var C;const R=e.filter(U=>!U.disabled),_=R.findIndex(U=>U.key===v);let S;if(N.key==="ArrowRight"||N.key==="ArrowDown"?(N.preventDefault(),S=(_+1)%R.length):N.key==="ArrowLeft"||N.key==="ArrowUp"?(N.preventDefault(),S=(_-1+R.length)%R.length):N.key==="Home"?(N.preventDefault(),S=0):N.key==="End"&&(N.preventDefault(),S=R.length-1),S!==void 0){const U=R[S];j(U.key);const te=(C=x.current)==null?void 0:C.querySelector(`#${CSS.escape(`${g}-tab-${U.key}`)}`);te==null||te.focus()}},[e,v,g,j]),z=(N,R)=>{const _={...f8[c],display:"inline-flex",alignItems:"center",gap:"var(--ggui-spacing-1, 4px)",cursor:R?"not-allowed":"pointer",opacity:R?.5:1,background:"none",border:"none",fontWeight:N?"var(--ggui-font-weight-semibold, 600)":"var(--ggui-font-weight-medium, 500)",transition:`color ${kt.normal} ${Nt.easeInOut}, background-color ${kt.normal} ${Nt.easeInOut}, border-color ${kt.normal} ${Nt.easeInOut}`,whiteSpace:"nowrap",flex:u?1:void 0,justifyContent:u?"center":void 0};return l==="line"?{..._,color:N?"var(--ggui-color-primary-600, #0284c7)":"var(--ggui-color-onSurfaceVariant, #52525b)",borderBottom:N?"2px solid var(--ggui-color-primary-600, #0284c7)":"2px solid transparent",marginBottom:"-1px"}:l==="pills"?{..._,color:N?"#ffffff":"var(--ggui-color-onSurfaceVariant, #52525b)",backgroundColor:N?"var(--ggui-color-primary-600, #0284c7)":"transparent",borderRadius:"var(--ggui-shape-radius-md, 6px)"}:{..._,color:N?"var(--ggui-color-primary-600, #0284c7)":"var(--ggui-color-onSurfaceVariant, #52525b)",backgroundColor:N?"var(--ggui-color-surface, #ffffff)":"transparent",border:N?"1px solid var(--ggui-color-outlineVariant, #e4e4e7)":"1px solid transparent",borderBottom:N?"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"}},w={display:"flex",gap:l==="pills"?"var(--ggui-spacing-1, 4px)":"0",borderBottom:l==="line"||l==="enclosed"?"1px solid var(--ggui-color-outlineVariant, #e4e4e7)":void 0,backgroundColor:l==="pills"?"var(--ggui-color-surfaceVariant, #f4f4f5)":void 0,borderRadius:l==="pills"?"var(--ggui-shape-radius-lg, 8px)":void 0,padding:l==="pills"?"var(--ggui-spacing-1, 4px)":void 0};return i.jsxs("div",{className:p,style:d,children:[i.jsx("div",{ref:x,role:"tablist","aria-orientation":"horizontal",style:w,children:e.map(N=>{const R=N.key===v,_=!!N.disabled;return i.jsxs("button",{role:"tab",id:`${g}-tab-${N.key}`,"aria-selected":R,"aria-controls":`${g}-panel-${N.key}`,"aria-disabled":_,tabIndex:R?0:-1,onClick:_?void 0:()=>j(N.key),onKeyDown:_?void 0:E,style:z(R,_),children:[N.icon,N.label]},N.key)})}),k&&i.jsx("div",{role:"tabpanel",id:`${g}-panel-${k.key}`,"aria-labelledby":`${g}-tab-${k.key}`,tabIndex:0,style:{padding:"var(--ggui-spacing-4, 16px) 0"},children:k.content})]})}var g8={fadeIn:`@keyframes ggui-fadeIn {
123
- from { opacity: 0; }
124
- to { opacity: 1; }
125
- }`,fadeOut:`@keyframes ggui-fadeOut {
126
- from { opacity: 1; }
127
- to { opacity: 0; }
128
- }`,slideInUp:`@keyframes ggui-slideInUp {
129
- from { opacity: 0; transform: translateY(8px); }
130
- to { opacity: 1; transform: translateY(0); }
131
- }`,slideInDown:`@keyframes ggui-slideInDown {
132
- from { opacity: 0; transform: translateY(-8px); }
133
- to { opacity: 1; transform: translateY(0); }
134
- }`,scaleIn:`@keyframes ggui-scaleIn {
135
- from { opacity: 0; transform: scale(0.95); }
136
- to { opacity: 1; transform: scale(1); }
137
- }`,scaleOut:`@keyframes ggui-scaleOut {
138
- from { opacity: 1; transform: scale(1); }
139
- to { opacity: 0; transform: scale(0.95); }
140
- }`,flash:`@keyframes ggui-flash {
141
- 0%, 15% { background-color: var(--ggui-flash-color, var(--ggui-color-primary-100)); }
142
- 100% { background-color: transparent; }
143
- }`,pulse:`@keyframes ggui-pulse {
144
- 0%, 100% { opacity: 1; }
145
- 50% { opacity: 0.6; }
146
- }`,bounce:`@keyframes ggui-bounce {
147
- 0% { transform: scale(1); }
148
- 40% { transform: scale(1.06); }
149
- 70% { transform: scale(0.98); }
150
- 100% { transform: scale(1); }
151
- }`},If={fadeIn:`ggui-fadeIn ${kt.normal} ${Nt.easeOut} both`,slideInUp:`ggui-slideInUp ${kt.normal} ${Nt.easeOut} both`,scaleIn:`ggui-scaleIn ${kt.normal} ${Nt.easeOut} both`},m8=`@media (prefers-reduced-motion: reduce) {
152
- *, *::before, *::after {
153
- animation-duration: 0.01ms !important;
154
- animation-iteration-count: 1 !important;
155
- transition-duration: 0.01ms !important;
156
- }
157
- }`,h8={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)"}},y8={info:i.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",children:i.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:i.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",children:i.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:i.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",children:i.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:i.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",children:i.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 v8({message:e,variant:n="info",title:o,duration:l=5e3,onClose:c,visible:u=!0,style:d,className:p}){if(D.useEffect(()=>{if(!u||l===0||!c)return;const y=setTimeout(c,l);return()=>clearTimeout(y)},[u,l,c]),!u)return i.jsx("div",{role:"alert","aria-live":"assertive",className:p,style:{position:"absolute",width:"1px",height:"1px",overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap"}});const g=h8[n],h={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:g.bg,border:`1px solid ${g.border}`,color:g.text,boxShadow:"var(--ggui-shape-shadow-lg, 0 10px 15px -3px rgba(0,0,0,0.1))",minWidth:"280px",maxWidth:"420px",animation:If.slideInUp,...d};return i.jsxs("div",{role:"alert","aria-live":"assertive",className:p,style:h,children:[i.jsx("div",{style:{color:g.icon,flexShrink:0,marginTop:"2px"},children:y8[n]}),i.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:"2px"},children:[o&&i.jsx("div",{style:{fontWeight:"var(--ggui-font-weight-semibold, 600)",fontSize:"var(--ggui-font-size-sm, 14px)"},children:o}),i.jsx("div",{style:{fontSize:"var(--ggui-font-size-sm, 14px)"},children:e})]}),c&&i.jsx("button",{onClick:c,"aria-label":"Dismiss notification",style:{background:"none",border:"none",padding:"4px",cursor:"pointer",color:g.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:i.jsx("svg",{width:"16",height:"16",viewBox:"0 0 20 20",fill:"currentColor",children:i.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 $8=e=>i.jsx("svg",{width:"16",height:"16",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",style:{transition:`transform ${kt.normal} ${Nt.easeInOut}`,transform:e?"rotate(180deg)":"rotate(0deg)",flexShrink:0},children:i.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 b8({items:e,expandedKeys:n,onChange:o,multiple:l=!1,variant:c="default",style:u,className:d}){const p=D.useId(),[g,h]=D.useState([]),y=n??g,v=x=>{let E;y.includes(x)?E=y.filter(z=>z!==x):l?E=[...y,x]:E=[x],o?o(E):h(E)},j={display:"flex",flexDirection:"column",gap:c==="separated"?"var(--ggui-spacing-2, 8px)":"0",...u},k=(x,E)=>c==="separated"?{border:"1px solid var(--ggui-color-outlineVariant, #e4e4e7)",borderRadius:"var(--ggui-shape-radius-lg, 8px)",overflow:"hidden"}:c==="bordered"?{borderLeft:"1px solid var(--ggui-color-outlineVariant, #e4e4e7)",borderRight:"1px solid var(--ggui-color-outlineVariant, #e4e4e7)",borderTop:x?"1px solid var(--ggui-color-outlineVariant, #e4e4e7)":void 0,borderBottom:"1px solid var(--ggui-color-outlineVariant, #e4e4e7)",borderTopLeftRadius:x?"var(--ggui-shape-radius-lg, 8px)":void 0,borderTopRightRadius:x?"var(--ggui-shape-radius-lg, 8px)":void 0,borderBottomLeftRadius:E?"var(--ggui-shape-radius-lg, 8px)":void 0,borderBottomRightRadius:E?"var(--ggui-shape-radius-lg, 8px)":void 0}:{borderBottom:"1px solid var(--ggui-color-outlineVariant, #e4e4e7)",borderTop:x?"1px solid var(--ggui-color-outlineVariant, #e4e4e7)":void 0};return i.jsx("div",{className:d,style:j,children:e.map((x,E)=>{const z=y.includes(x.key),w=!!x.disabled,$=E===0,N=E===e.length-1;return i.jsxs("div",{style:k($,N),children:[i.jsx("h3",{style:{margin:0},children:i.jsxs("button",{id:`${p}-header-${x.key}`,"aria-expanded":z,"aria-controls":`${p}-panel-${x.key}`,"aria-disabled":w,onClick:w?void 0:()=>v(x.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:w?"not-allowed":"pointer",opacity:w?.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 ${kt.fast} ${Nt.easeInOut}`},children:[i.jsx("span",{children:x.title}),$8(z)]})}),i.jsx("div",{id:`${p}-panel-${x.key}`,role:"region","aria-labelledby":`${p}-header-${x.key}`,hidden:!z,style:{overflow:"hidden"},children:z&&i.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:x.content})})]},x.key)})})}var Sv="ggui-motion-keyframes";function x8(){return D.useEffect(()=>{if(document.getElementById(Sv))return;const e=document.createElement("style");return e.id=Sv,e.textContent=[...Object.values(g8),m8].join(`
158
-
159
- `),document.head.appendChild(e),()=>{e.remove()}},[]),null}function _8(){const[e,n]=D.useState(()=>typeof window>"u"?!0:!window.matchMedia("(prefers-reduced-motion: reduce)").matches);return D.useEffect(()=>{const o=window.matchMedia("(prefers-reduced-motion: reduce)"),l=c=>n(!c.matches);return o.addEventListener("change",l),()=>o.removeEventListener("change",l)},[]),{motionEnabled:e}}function j8(e){const[n,o]=D.useState(0),l=D.useRef(!0);return D.useEffect(()=>{if(l.current){l.current=!1;return}o(c=>c+1)},[e]),n}var Lf={};Nc(Lf,{Autocomplete:()=>D8,Breadcrumb:()=>U8,Dropdown:()=>A8,EmptyState:()=>L8,FormField:()=>T8,Markdown:()=>ck,MarkdownInline:()=>uk,MenuItem:()=>r$,Pagination:()=>I8,SearchField:()=>C8,Stat:()=>V8,Stepper:()=>Z8,Tag:()=>R8,renderRichTextInlines:()=>yr});var S8={50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",400:"#38bdf8",600:"#0284c7",700:"#0369a1"},w8={50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",900:"#111827"},k8={50:"#f0fdf4",200:"#bbf7d0",500:"#22c55e",700:"#15803d"},N8={50:"#fffbeb",200:"#fde68a",500:"#f59e0b",700:"#b45309"},z8={50:"#fef2f2",100:"#fee2e2",200:"#fecaca",500:"#ef4444",600:"#dc2626",700:"#b91c1c"},E8={50:"#ecfeff",200:"#a5f3fc",500:"#06b6d4",700:"#0e7490"},Q={primary:S8,gray:w8,success:k8,warning:N8,error:z8,info:E8,white:"#ffffff"};function C8({value:e,onChange:n,onSearch:o,placeholder:l="Search...",showButton:c=!1,buttonText:u="Search",loading:d,disabled:p,size:g="md",style:h,className:y}){const[v,j]=D.useState(""),k=e!==void 0?e:v,x=$=>{e===void 0&&j($),n==null||n($)},E=()=>{o==null||o(k)},z=$=>{$.key==="Enter"&&!p&&E()},w={sm:"sm",md:"md",lg:"md"};return i.jsxs("div",{className:y,style:{display:"flex",gap:"8px",alignItems:"flex-end",...h},children:[i.jsxs("div",{style:{position:"relative",flex:1},children:[i.jsx("div",{style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",color:Q.gray[400],pointerEvents:"none",display:"flex",alignItems:"center"},children:d?i.jsx(Fa,{size:16}):i.jsx(wt,{name:"search",size:16})}),i.jsx("input",{type:"search",value:k,onChange:$=>x($.target.value),onKeyDown:z,placeholder:l,disabled:p||d,style:{width:"100%",padding:g==="sm"?"6px 10px 6px 36px":g==="lg"?"12px 14px 12px 40px":"10px 12px 10px 38px",paddingLeft:"36px",fontSize:g==="lg"?"16px":"14px",borderRadius:"6px",border:`1px solid ${Q.gray[300]}`,backgroundColor:p?Q.gray[50]:Q.white,color:Q.gray[900],outline:"none",boxSizing:"border-box"}})]}),c&&i.jsx(la,{onClick:E,disabled:p||d,size:w[g],loading:d,children:u})]})}function T8({label:e,children:n,error:o,helperText:l,required:c,description:u,style:d,className:p}){const g=!!o;return i.jsxs("div",{className:p,style:{display:"flex",flexDirection:"column",gap:"4px",...d},children:[i.jsxs("label",{style:{fontSize:be.sm,fontWeight:Xe.medium,color:Q.gray[700]},children:[e,c&&i.jsx("span",{style:{color:Q.error[500],marginLeft:"2px"},children:"*"})]}),u&&i.jsx("span",{style:{fontSize:be.xs,color:Q.gray[500],marginBottom:"4px"},children:u}),n,(o||l)&&i.jsx("span",{style:{fontSize:be.xs,color:g?Q.error[500]:Q.gray[500]},children:o||l})]})}function r$({label:e,icon:n,rightElement:o,onClick:l,disabled:c,active:u,danger:d,style:p,className:g}){const h=d?Q.error[600]:Q.gray[700],y=d?Q.error[50]:Q.gray[100],v=d?Q.error[100]:Q.primary[50];return i.jsxs("button",{onClick:c?void 0:l,disabled:c,className:g,style:{display:"flex",alignItems:"center",gap:"8px",width:"100%",padding:"8px 12px",border:"none",borderRadius:Xt.md,backgroundColor:u?v:"transparent",color:c?Q.gray[400]:h,fontSize:be.sm,fontWeight:u?Xe.medium:Xe.normal,textAlign:"left",cursor:c?"not-allowed":"pointer",transition:"background-color 0.15s",...p},onMouseEnter:j=>{!c&&!u&&(j.target.style.backgroundColor=y)},onMouseLeave:j=>{!c&&!u&&(j.target.style.backgroundColor="transparent")},children:[n&&i.jsx("span",{style:{display:"flex",flexShrink:0},children:n}),i.jsx("span",{style:{flex:1},children:e}),o&&i.jsx("span",{style:{display:"flex",flexShrink:0,color:Q.gray[400]},children:o})]})}var M8={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]}`}},O8={sm:{padding:"2px 6px",fontSize:be.xs,gap:"4px"},md:{padding:"4px 8px",fontSize:be.xs,gap:"6px"},lg:{padding:"6px 10px",fontSize:be.sm,gap:"6px"}};function R8({children:e,variant:n="default",size:o="md",closable:l,onClose:c,icon:u,style:d,className:p}){const g=O8[o];return i.jsxs("span",{className:p,style:{display:"inline-flex",alignItems:"center",gap:g.gap,padding:g.padding,fontSize:g.fontSize,fontWeight:Xe.medium,borderRadius:"6px",...M8[n],...d},children:[u&&i.jsx("span",{style:{display:"flex"},children:u}),e,l&&i.jsx("button",{onClick:c,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:i.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"currentColor",children:i.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 A8({trigger:e,options:n,value:o,onChange:l,placement:c="bottom-start",disabled:u,style:d,className:p}){const[g,h]=D.useState(!1),y=D.useRef(null);D.useEffect(()=>{const k=x=>{y.current&&!y.current.contains(x.target)&&h(!1)};if(g)return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[g]),D.useEffect(()=>{const k=x=>{x.key==="Escape"&&h(!1)};if(g)return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[g]);const v=k=>{l==null||l(k),h(!1)},j=()=>{switch(c){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 i.jsxs("div",{ref:y,className:p,style:{position:"relative",display:"inline-block",...d},children:[i.jsx("div",{onClick:()=>!u&&h(!g),style:{cursor:u?"not-allowed":"pointer"},children:e}),g&&i.jsx("div",{style:{position:"absolute",...j(),minWidth:"160px",backgroundColor:Q.white,border:`1px solid ${Q.gray[200]}`,borderRadius:Xt.lg,boxShadow:ll.lg,zIndex:Gi.dropdown,padding:"4px"},children:n.map(k=>i.jsx(r$,{label:k.label,icon:k.icon,onClick:()=>v(k.value),disabled:k.disabled,active:o===k.value,danger:k.danger},k.value))})]})}function D8({value:e="",onChange:n,onSelect:o,options:l,placeholder:c,label:u,loading:d,disabled:p,error:g,noResultsText:h="No results found",style:y,className:v}){const[j,k]=D.useState(!1),[x,E]=D.useState(-1),z=D.useRef(null),w=D.useMemo(()=>{if(!e)return l;const _=e.toLowerCase();return l.filter(S=>S.label.toLowerCase().includes(_)||S.value.toLowerCase().includes(_))},[l,e]);D.useEffect(()=>{const _=S=>{z.current&&!z.current.contains(S.target)&&k(!1)};return document.addEventListener("mousedown",_),()=>document.removeEventListener("mousedown",_)},[]);const $=_=>{n==null||n(_),k(!0),E(-1)},N=_=>{n==null||n(_.label),o==null||o(_),k(!1),E(-1)},R=_=>{if(!j){(_.key==="ArrowDown"||_.key==="ArrowUp")&&k(!0);return}switch(_.key){case"ArrowDown":_.preventDefault(),E(S=>S<w.length-1?S+1:S);break;case"ArrowUp":_.preventDefault(),E(S=>S>0?S-1:S);break;case"Enter":_.preventDefault(),x>=0&&w[x]&&N(w[x]);break;case"Escape":k(!1),E(-1);break}};return i.jsxs("div",{ref:z,className:v,style:{position:"relative",...y},children:[i.jsx("div",{onKeyDown:R,children:i.jsx(t$,{label:u,value:e,onChange:$,onFocus:()=>k(!0),placeholder:c,disabled:p,error:g})}),j&&i.jsx("div",{style:{position:"absolute",top:"100%",left:0,right:0,marginTop:"4px",backgroundColor:Q.white,border:`1px solid ${Q.gray[200]}`,borderRadius:Xt.lg,boxShadow:ll.lg,zIndex:Gi.dropdown,maxHeight:"240px",overflow:"auto"},children:d?i.jsx("div",{style:{padding:"12px",display:"flex",justifyContent:"center"},children:i.jsx(Fa,{size:20})}):w.length===0?i.jsx("div",{style:{padding:"12px",textAlign:"center",color:Q.gray[500],fontSize:be.sm},children:h}):w.map((_,S)=>i.jsxs("div",{onClick:()=>!_.disabled&&N(_),style:{padding:"8px 12px",cursor:_.disabled?"not-allowed":"pointer",backgroundColor:x===S?Q.gray[100]:"transparent",color:_.disabled?Q.gray[400]:Q.gray[900],fontSize:be.sm,display:"flex",alignItems:"center",gap:"8px"},onMouseEnter:()=>E(S),children:[_.icon&&i.jsx("span",{style:{flexShrink:0},children:_.icon}),i.jsxs("div",{style:{flex:1},children:[i.jsx("div",{children:_.label}),_.description&&i.jsx("div",{style:{fontSize:be.xs,color:Q.gray[500]},children:_.description})]})]},_.value))})]})}function U8({items:e,separator:n="/",onItemClick:o,style:l,className:c}){return i.jsx("nav",{"aria-label":"Breadcrumb",className:c,style:{display:"flex",alignItems:"center",gap:"8px",fontSize:be.sm,...l},children:e.map((u,d)=>{const p=d===e.length-1;return i.jsxs(D.Fragment,{children:[d>0&&i.jsx("span",{style:{color:Q.gray[400]},children:n}),u.icon&&i.jsx("span",{style:{display:"flex",alignItems:"center",color:p?Q.gray[900]:Q.gray[500]},children:u.icon}),p?i.jsx("span",{style:{color:Q.gray[900],fontWeight:500},"aria-current":"page",children:u.label}):u.href?i.jsx(fp,{href:u.href,tone:"muted",underline:"hover",onClick:g=>{o&&(g.preventDefault(),o(u,d))},children:u.label}):i.jsx("button",{onClick:()=>o==null?void 0:o(u,d),style:{background:"none",border:"none",padding:0,color:Q.gray[500],cursor:"pointer",fontSize:"inherit"},children:u.label})]},d)})})}function I8({currentPage:e,totalPages:n,onPageChange:o,showFirstLast:l=!0,maxVisible:c=5,size:u="md",disabled:d,style:p,className:g}){const h=()=>{const k=[];if(n<=c)for(let x=1;x<=n;x++)k.push(x);else{k.push(1);const x=Math.floor((c-3)/2);let E=Math.max(2,e-x),z=Math.min(n-1,e+x);e<=x+2&&(z=Math.min(n-1,c-2)),e>=n-x-1&&(E=Math.max(2,n-c+3)),E>2&&k.push("ellipsis");for(let w=E;w<=z;w++)k.push(w);z<n-1&&k.push("ellipsis"),k.push(n)}return k},y=u==="sm"?"xs":u==="lg"?"md":"sm",v=u==="sm"?14:u==="lg"?20:16,j=({page:k,active:x})=>i.jsx("button",{onClick:()=>!d&&(o==null?void 0:o(k)),disabled:d,style:{minWidth:u==="sm"?"28px":u==="lg"?"40px":"32px",height:u==="sm"?"28px":u==="lg"?"40px":"32px",padding:"0 8px",border:"none",borderRadius:"6px",backgroundColor:x?Q.primary[600]:"transparent",color:x?Q.white:Q.gray[700],fontSize:u==="sm"?be.xs:be.sm,fontWeight:x?Xe.medium:Xe.normal,cursor:d?"not-allowed":"pointer",opacity:d?.5:1,transition:"all 0.15s"},children:k});return i.jsxs("nav",{"aria-label":"Pagination",className:g,style:{display:"flex",alignItems:"center",gap:"4px",...p},children:[l&&i.jsxs(la,{variant:"ghost",size:y,onClick:()=>o==null?void 0:o(1),disabled:d||e===1,"aria-label":"First page",children:[i.jsx(wt,{name:"chevron-left",size:v}),i.jsx(wt,{name:"chevron-left",size:v,style:{marginLeft:"-8px"}})]}),i.jsx(la,{variant:"ghost",size:y,onClick:()=>o==null?void 0:o(e-1),disabled:d||e===1,"aria-label":"Previous page",children:i.jsx(wt,{name:"chevron-left",size:v})}),h().map((k,x)=>k==="ellipsis"?i.jsx("span",{style:{padding:"0 4px",color:Q.gray[400]},children:"..."},`ellipsis-${x}`):i.jsx(j,{page:k,active:k===e},k)),i.jsx(la,{variant:"ghost",size:y,onClick:()=>o==null?void 0:o(e+1),disabled:d||e===n,"aria-label":"Next page",children:i.jsx(wt,{name:"chevron-right",size:v})}),l&&i.jsxs(la,{variant:"ghost",size:y,onClick:()=>o==null?void 0:o(n),disabled:d||e===n,"aria-label":"Last page",children:[i.jsx(wt,{name:"chevron-right",size:v}),i.jsx(wt,{name:"chevron-right",size:v,style:{marginLeft:"-8px"}})]})]})}function L8({icon:e,title:n,description:o,action:l,style:c,className:u}){const d={textAlign:"center",padding:"var(--ggui-spacing-xl, 32px)",...c};return i.jsxs(Pi,{align:"center",gap:"sm",className:u,style:d,children:[e!==void 0&&(typeof e=="string"?i.jsx(wt,{name:e,size:40,tone:"subtle"}):e),i.jsx(Uc,{level:3,children:n}),o!==void 0&&i.jsx(hr,{tone:"muted",children:o}),l!==void 0&&i.jsx("div",{style:{marginTop:"var(--ggui-spacing-sm, 8px)"},children:l})]})}function V8({label:e,value:n,delta:o,trend:l="neutral",icon:c,style:u,className:d}){const p=l==="up"?"success":l==="down"?"error":"muted";return i.jsxs(Pi,{gap:"xs",className:d,style:u,children:[i.jsxs(Li,{gap:"xs",align:"center",children:[c!==void 0&&(typeof c=="string"?i.jsx(wt,{name:c,size:16,tone:"muted"}):c),i.jsx(hr,{size:"xs",weight:"semibold",caps:!0,tone:"muted",children:e})]}),i.jsxs(Li,{gap:"sm",align:"end",children:[i.jsx(hr,{size:"3xl",weight:"bold",children:n}),o!==void 0&&i.jsx(hr,{size:"sm",weight:"semibold",tone:p,children:o})]})]})}var Vf=28;function B8(e,n){return e<n?"completed":e===n?"current":"upcoming"}var H8={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 q8({index:e,state:n}){return i.jsx("span",{"aria-hidden":"true",style:{width:Vf,height:Vf,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",...H8[n]},children:n==="completed"?i.jsx(wt,{name:"check",size:16,tone:"inherit"}):i.jsx(hr,{is:"span",size:"sm",weight:"semibold",tone:"inherit",children:e+1})})}function P8({label:e,state:n}){return i.jsx(hr,{is:"span",size:"sm",weight:n==="current"?"semibold":"normal",tone:n==="upcoming"?"muted":"default",children:e})}function Z8({steps:e,current:n,orientation:o="horizontal",onStepClick:l,style:c,className:u}){const d=(p,g)=>{const h=B8(g,n),y=i.jsxs(Li,{gap:"sm",align:"center",children:[i.jsx(q8,{index:g,state:h}),i.jsx(P8,{label:p,state:h})]});return l===void 0?i.jsx("span",{"aria-current":h==="current"?"step":void 0,children:y}):i.jsx("button",{type:"button",onClick:()=>l(g),"aria-current":h==="current"?"step":void 0,style:{background:"none",border:"none",padding:0,margin:0,font:"inherit",textAlign:"inherit",cursor:"pointer"},children:y})};return o==="vertical"?i.jsx("nav",{"aria-label":"Progress",className:u,style:c,children:i.jsx(Pi,{gap:"none",align:"start",children:e.map((p,g)=>i.jsxs(Pi,{gap:"none",align:"start",children:[g>0&&i.jsx("span",{style:{width:Vf,height:16,display:"inline-flex",justifyContent:"center"},children:i.jsx(Df,{orientation:"vertical",margin:0})}),d(p,g)]},g))})}):i.jsx("nav",{"aria-label":"Progress",className:u,style:c,children:i.jsx(Li,{gap:"sm",align:"center",children:e.map((p,g)=>i.jsxs(Li,{gap:"sm",align:"center",style:g>0?{flex:1}:void 0,children:[g>0&&i.jsx(Df,{style:{flex:1,minWidth:16,margin:0}}),d(p,g)]},g))})})}var G8=/^(?:https?:\/\/|mailto:)[^\s\x00-\x1f]+$/i;function F8(e){return G8.test(e)?e:void 0}function Y8(e){const n=new Set;for(const o of e)o>0&&n.add(o-1);return n}function i$(e){return e===void 0||e===" "||e===" "||e===`
160
- `}function o$(e){return e!==void 0&&/[A-Za-z0-9]/.test(e)}function K8(e,n,o){return i$(o)?!1:e==="_"||e==="__"?!o$(n):!0}function J8(e,n,o){return i$(n)?!1:e==="_"||e==="__"?!o$(o):!0}var X8=new Set("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~");function Vi(e,n,o){const l=[];let c="";const u=()=>{c.length>0&&(l.push({type:"text",text:c}),c="")};let d=n;for(;d<e.length;){const p=e[d];if(p===void 0)break;if(p==="\\"){const g=e[d+1];if(g!==void 0&&X8.has(g)){c+=g,d+=2;continue}c+=p,d+=1;continue}if(p===`
161
- `){u(),l.push({type:"break"}),d+=1;continue}if(p==="`"){u();const g=e.indexOf("`",d+1);if(g===-1){l.push({type:"code",code:e.slice(d+1),closed:!1}),d=e.length;continue}l.push({type:"code",code:e.slice(d+1,g),closed:!0}),d=g+1;continue}if(p==="*"||p==="_"){const g=e.slice(d,d+2),h=g==="**"||g==="__"?g:void 0,y=p,v=d>0?e[d-1]:void 0;let j=1;for(;e[d+j]===p;)j++;const k=e[d+j],x=o.indexOf("]"),E=x===-1?o.length-1:x-1,z=new Set;let w=j;for(let R=E;R>=0;R--){const _=o[R];if(!(_===void 0||_[0]!==p)&&!(_.length>w)&&J8(_,v,k)&&(z.add(R),w-=_.length,w===0))break}if(z.size>0)return u(),{children:l,closedBy:Math.max(...z),closedIdxs:z,runConsumed:j-w,pos:d};const $=h??y,N=e[d+$.length];if(K8($,v,N)){u();const R=Vi(e,d+$.length,[$,...o]),_=$==="**"||$==="__"?{type:"strong",children:R.children,closed:R.closedIdxs.has(0)}:{type:"em",children:R.children,closed:R.closedIdxs.has(0)};if(l.push(_),R.closedBy===0){d=R.pos+R.runConsumed;continue}if(R.closedBy===-1){d=R.pos;continue}return{children:l,closedBy:R.closedBy-1,closedIdxs:Y8(R.closedIdxs),runConsumed:R.runConsumed,pos:R.pos}}c+=$,d+=$.length;continue}if(p==="["){const g=Vi(e,d+1,["]",...o]);if(g.closedBy>0){c+="[",d+=1;continue}if(g.closedBy===-1){u(),l.push({type:"link",children:g.children,href:void 0,rawHref:"",closed:!1}),d=g.pos;continue}const h=g.pos+1,y=e[h];if(y==="("){const v=e.indexOf(")",h+1);if(v===-1){const k=e.slice(h+1);u(),l.push({type:"link",children:g.children,href:void 0,rawHref:k,closed:!1}),d=e.length;continue}const j=e.slice(h+1,v).trim().split(/\s+/)[0]??"";u(),l.push({type:"link",children:g.children,href:F8(j),rawHref:j,closed:!0}),d=v+1;continue}if(y===void 0){u(),l.push({type:"link",children:g.children,href:void 0,rawHref:"",closed:!1}),d=h;continue}c+="[",d+=1;continue}if(p==="]"&&o.includes("]")){const g=o.indexOf("]");return u(),{children:l,closedBy:g,closedIdxs:new Set([g]),runConsumed:1,pos:d}}c+=p,d+=1}return u(),{children:l,closedBy:-1,closedIdxs:new Set,runConsumed:0,pos:d}}function Q8(e){return Vi(e,0,[]).children}var W8=/^```+\s*(\S*)\s*$/,ek=/^```+\s*$/,tk=/^(#{1,6})\s+(.*)$/,ak=/^\s*[-*+]\s+(.*)$/,nk=/^\s*(\d{1,9})[.)]\s+(.*)$/;function rk(e){const n=[],o=e.split(`
162
- `);let l=[],c;const u=()=>{l.length>0&&(n.push({type:"paragraph",children:Vi(l.join(`
163
- `),0,[]).children}),l=[])},d=()=>{c!==void 0&&(n.push({type:"list",ordered:c.ordered,start:c.start,items:c.items}),c=void 0)};for(let p=0;p<o.length;p++){const g=o[p];if(g===void 0)continue;const h=g.match(W8);if(h!==null){u(),d();const k=h[1]!==void 0&&h[1].length>0?h[1]:void 0,x=[];let E=!1,z=p+1;for(;z<o.length;z++){const w=o[z];if(w!==void 0&&ek.test(w)){E=!0;break}x.push(w??"")}n.push({type:"code-fence",code:x.join(`
164
- `),lang:k,closed:E}),p=z;continue}if(g.trim().length===0){u(),d();continue}const y=g.match(tk);if(y!==null&&y[1]!==void 0){u(),d();const k=y[1].length;n.push({type:"heading",level:k,children:Vi(y[2]??"",0,[]).children});continue}const v=g.match(nk),j=v===null?g.match(ak):null;if(v!==null||j!==null){u();const k=v!==null,x=(k?v[2]:j==null?void 0:j[1])??"";c!==void 0&&c.ordered!==k&&d(),c===void 0&&(c={ordered:k,start:k&&v[1]!==void 0?parseInt(v[1],10):void 0,items:[]}),c.items.push({children:Vi(x,0,[]).children});continue}d(),l.push(g)}return u(),d(),n}var ik={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"},ok={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},lk={color:"var(--ggui-color-primary, #4f46e5)",textDecoration:"none"},wv={margin:0,paddingInlineStart:"var(--ggui-spacing-lg, 24px)"};function yr(e){return e.map((n,o)=>{switch(n.type){case"text":return n.text;case"break":return i.jsx("br",{},o);case"strong":return i.jsx("strong",{children:yr(n.children)},o);case"em":return i.jsx("em",{children:yr(n.children)},o);case"code":return i.jsx("code",{style:ik,children:n.code},o);case"link":{const l=yr(n.children);return n.href!==void 0?i.jsx(fp,{href:n.href,external:!0,children:l},o):i.jsx("span",{style:lk,children:l},o)}}})}function sk(e,n){switch(e.type){case"paragraph":return i.jsx(hr,{children:yr(e.children)},n);case"heading":return i.jsx(Uc,{level:e.level,children:yr(e.children)},n);case"code-fence":return i.jsx("pre",{style:ok,"data-lang":e.lang,children:i.jsx("code",{children:e.code})},n);case"list":{const o=e.items.map((l,c)=>i.jsx("li",{children:yr(l.children)},c));return e.ordered?i.jsx("ol",{start:e.start,style:wv,children:o},n):i.jsx("ul",{style:wv,children:o},n)}}}function ck({markdown:e,className:n,style:o}){const l=rk(e);return i.jsx("div",{className:n,"data-ggui-markdown":"",style:{display:"flex",flexDirection:"column",gap:"var(--ggui-spacing-sm, 12px)",...o},children:l.map(sk)})}function uk({markdown:e}){return i.jsx(i.Fragment,{children:yr(Q8(e))})}var Bf={};Nc(Bf,{CardGrid:()=>pk,ChatWindow:()=>hk,CommandPalette:()=>Sk,CommentThread:()=>gk,DataTable:()=>mk,FileUploader:()=>vk,Footer:()=>wk,Header:()=>dk,Hero:()=>kk,Modal:()=>jk,NavigationBar:()=>yk,NotificationCenter:()=>xk,Sidebar:()=>fk});function dk({logo:e,navigation:n,actions:o,sticky:l=!1,background:c,bordered:u=!0,style:d,className:p}){return i.jsxs("header",{className:p,style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 24px",backgroundColor:c||Q.white,borderBottom:u?`1px solid ${Q.gray[200]}`:void 0,...l&&{position:"sticky",top:0,zIndex:Gi.sticky,boxShadow:ll.sm},...d},children:[e&&i.jsx("div",{style:{flexShrink:0},children:e}),n&&i.jsx("nav",{style:{display:"flex",alignItems:"center",flex:1,marginLeft:"32px"},children:n}),o&&i.jsx("div",{style:{display:"flex",alignItems:"center",gap:"12px",flexShrink:0},children:o})]})}function l$({item:e,activeId:n,onItemClick:o,collapsed:l,depth:c=0}){const[u,d]=D.useState(!1),p=e.children&&e.children.length>0,g=n===e.id,h=()=>{p&&!l&&d(!u),o==null||o(e)};return i.jsxs("div",{children:[i.jsxs("button",{onClick:h,disabled:e.disabled,style:{display:"flex",alignItems:"center",gap:"12px",width:"100%",padding:l?"10px":"10px 12px",paddingLeft:l?"10px":`${12+c*16}px`,border:"none",borderRadius:Xt.md,backgroundColor:g?Q.primary[50]:"transparent",color:e.disabled?Q.gray[400]:g?Q.primary[700]:Q.gray[700],fontSize:be.sm,fontWeight:g?Xe.medium:Xe.normal,textAlign:"left",cursor:e.disabled?"not-allowed":"pointer",transition:"all 0.15s",justifyContent:l?"center":"flex-start"},children:[e.icon&&i.jsx("span",{style:{display:"flex",flexShrink:0},children:e.icon}),!l&&i.jsxs(i.Fragment,{children:[i.jsx("span",{style:{flex:1},children:e.label}),e.badge&&i.jsx("span",{children:e.badge}),p&&i.jsx(wt,{name:u?"chevron-down":"chevron-right",size:14,tone:"subtle"})]})]}),p&&u&&!l&&i.jsx("div",{style:{marginTop:"4px"},children:e.children.map(y=>i.jsx(l$,{item:y,activeId:n,onItemClick:o,collapsed:l,depth:c+1},y.id))})]})}function fk({items:e,activeId:n,onItemClick:o,collapsed:l=!1,header:c,footer:u,width:d=256,collapsedWidth:p=64,style:g,className:h}){const y=l?p:d;return i.jsxs("aside",{className:h,style:{width:y,minWidth:y,height:"100%",display:"flex",flexDirection:"column",backgroundColor:Q.white,borderRight:`1px solid ${Q.gray[200]}`,transition:"width 0.2s",overflow:"hidden",...g},children:[c&&i.jsx("div",{style:{padding:l?"16px 8px":"16px",borderBottom:`1px solid ${Q.gray[200]}`},children:c}),i.jsx("nav",{style:{flex:1,padding:"8px",overflowY:"auto",overflowX:"hidden"},children:i.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"2px"},children:e.map(v=>i.jsx(l$,{item:v,activeId:n,onItemClick:o,collapsed:l},v.id))})}),u&&i.jsx("div",{style:{padding:l?"16px 8px":"16px",borderTop:`1px solid ${Q.gray[200]}`},children:u})]})}function pk({children:e,columns:n=3,gap:o=16,style:l,className:c}){const u=()=>typeof n=="number"?`repeat(${n}, 1fr)`:"repeat(auto-fit, minmax(280px, 1fr))";return i.jsx("div",{className:c,style:{display:"grid",gridTemplateColumns:u(),gap:`${o}px`,...l},children:e})}function s$({comment:e,onReply:n,onReaction:o,depth:l=0}){var y,v;const[c,u]=D.useState(!1),[d,p]=D.useState(""),g=()=>{d.trim()&&(n==null||n(e.id,d),p(""),u(!1))},h=e.timestamp instanceof Date?e.timestamp.toLocaleString():e.timestamp;return i.jsxs("div",{style:{marginLeft:l>0?"40px":0},children:[i.jsxs("div",{style:{display:"flex",gap:"12px"},children:[i.jsx(Ic,{name:e.author.name,src:e.author.avatar,size:"sm"}),i.jsxs("div",{style:{flex:1},children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[i.jsx("span",{style:{fontWeight:500,fontSize:be.sm},children:e.author.name}),i.jsx("span",{style:{color:Q.gray[500],fontSize:be.xs},children:h})]}),i.jsx("p",{style:{margin:"4px 0 8px",fontSize:be.sm,color:Q.gray[700]},children:e.content}),i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[(y=e.reactions)==null?void 0:y.map(j=>i.jsxs("button",{onClick:()=>o==null?void 0:o(e.id,j.emoji),style:{padding:"2px 8px",border:`1px solid ${Q.gray[200]}`,borderRadius:"12px",backgroundColor:Q.gray[50],fontSize:be.xs,cursor:"pointer"},children:[j.emoji," ",j.count]},j.emoji)),i.jsx("button",{onClick:()=>u(!c),style:{background:"none",border:"none",color:Q.gray[500],fontSize:be.xs,cursor:"pointer"},children:"Reply"})]}),c&&i.jsxs("div",{style:{marginTop:"12px"},children:[i.jsx(up,{value:d,onChange:p,placeholder:"Write a reply...",rows:2}),i.jsxs("div",{style:{display:"flex",gap:"8px",marginTop:"8px"},children:[i.jsx(la,{size:"sm",onClick:g,children:"Reply"}),i.jsx(la,{size:"sm",variant:"ghost",onClick:()=>u(!1),children:"Cancel"})]})]})]})]}),(v=e.replies)==null?void 0:v.map(j=>i.jsx("div",{style:{marginTop:"16px"},children:i.jsx(s$,{comment:j,onReply:n,onReaction:o,depth:l+1})},j.id))]})}function gk({comments:e,currentUser:n,onAddComment:o,onReply:l,onReaction:c,loading:u,style:d,className:p}){const[g,h]=D.useState(""),y=()=>{g.trim()&&(o==null||o(g),h(""))};return i.jsxs("div",{className:p,style:{...d},children:[n&&i.jsxs("div",{style:{display:"flex",gap:"12px",marginBottom:"24px"},children:[i.jsx(Ic,{name:n.name,src:n.avatar,size:"sm"}),i.jsxs("div",{style:{flex:1},children:[i.jsx(up,{value:g,onChange:h,placeholder:"Write a comment...",rows:3}),i.jsx("div",{style:{marginTop:"8px",display:"flex",justifyContent:"flex-end"},children:i.jsx(la,{onClick:y,disabled:!g.trim(),children:"Comment"})})]})]}),u?i.jsx("div",{style:{display:"flex",justifyContent:"center",padding:"24px"},children:i.jsx(Fa,{size:24})}):i.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"20px"},children:e.map(v=>i.jsx(s$,{comment:v,onReply:l,onReaction:c},v.id))})]})}function mk({columns:e,data:n,rowKey:o="id",loading:l,emptyText:c="No data",onSort:u,sortKey:d,sortDirection:p,onRowClick:g,selectable:h,selectedKeys:y=[],onSelectionChange:v,style:j,className:k}){const x=(N,R)=>typeof o=="function"?o(N):String(N[o]??R),E=N=>{N?v==null||v(n.map((R,_)=>x(R,_))):v==null||v([])},z=(N,R)=>{R?v==null||v([...y,N]):v==null||v(y.filter(_=>_!==N))},w=n.length>0&&y.length===n.length,$=y.length>0&&y.length<n.length;return i.jsx("div",{className:k,style:{border:`1px solid ${Q.gray[200]}`,borderRadius:"8px",overflow:"hidden",...j},children:i.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:be.sm},children:[i.jsx("thead",{children:i.jsxs("tr",{style:{backgroundColor:Q.gray[50]},children:[h&&i.jsx("th",{style:{width:"40px",padding:"12px"},children:i.jsx(Uf,{checked:w,indeterminate:$,onChange:E})}),e.map(N=>i.jsx("th",{style:{padding:"12px 16px",textAlign:N.align||"left",fontWeight:Xe.semibold,color:Q.gray[700],borderBottom:`1px solid ${Q.gray[200]}`,cursor:N.sortable?"pointer":void 0,width:N.width},onClick:()=>N.sortable&&(u==null?void 0:u(N.key,d===N.key&&p==="asc"?"desc":"asc")),children:i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[N.header,N.sortable&&d===N.key&&i.jsx(wt,{name:p==="asc"?"chevron-up":"chevron-down",size:14})]})},N.key))]})}),i.jsx("tbody",{children:l?i.jsx("tr",{children:i.jsx("td",{colSpan:e.length+(h?1:0),style:{padding:"48px",textAlign:"center"},children:i.jsx(Fa,{size:24})})}):n.length===0?i.jsx("tr",{children:i.jsx("td",{colSpan:e.length+(h?1:0),style:{padding:"48px",textAlign:"center",color:Q.gray[500]},children:c})}):n.map((N,R)=>{const _=x(N,R),S=y.includes(_);return i.jsxs("tr",{onClick:()=>g==null?void 0:g(N,R),style:{backgroundColor:S?Q.primary[50]:void 0,cursor:g?"pointer":void 0,transition:"background-color 0.15s"},children:[h&&i.jsx("td",{style:{padding:"12px"},children:i.jsx(Uf,{checked:S,onChange:C=>z(_,C)})}),e.map(C=>i.jsx("td",{style:{padding:"12px 16px",textAlign:C.align||"left",color:Q.gray[900],borderBottom:`1px solid ${Q.gray[100]}`},children:C.render?C.render(N[C.key],N,R):String(N[C.key]??"")},C.key))]},_)})})]})})}function hk({messages:e,currentUserId:n,onSendMessage:o,loading:l,typing:c,placeholder:u="Type a message...",header:d,style:p,className:g}){const[h,y]=D.useState(""),v=D.useRef(null);D.useEffect(()=>{var x;(x=v.current)==null||x.scrollIntoView({behavior:"smooth"})},[e]);const j=()=>{h.trim()&&(o==null||o(h),y(""))},k=x=>{x.key==="Enter"&&!x.shiftKey&&(x.preventDefault(),j())};return i.jsxs("div",{className:g,style:{display:"flex",flexDirection:"column",height:"100%",border:`1px solid ${Q.gray[200]}`,borderRadius:Xt.lg,backgroundColor:Q.white,overflow:"hidden",...p},children:[d&&i.jsx("div",{style:{padding:"12px 16px",borderBottom:`1px solid ${Q.gray[200]}`},children:d}),i.jsxs("div",{style:{flex:1,padding:"16px",overflowY:"auto",display:"flex",flexDirection:"column",gap:"12px"},children:[l?i.jsx("div",{style:{display:"flex",justifyContent:"center",padding:"24px"},children:i.jsx(Fa,{size:24})}):e.map(x=>{const E=x.sender.id===n,z=x.timestamp instanceof Date?x.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):x.timestamp;return i.jsxs("div",{style:{display:"flex",flexDirection:E?"row-reverse":"row",alignItems:"flex-end",gap:"8px"},children:[!E&&i.jsx(Ic,{name:x.sender.name,src:x.sender.avatar,size:"xs"}),i.jsxs("div",{style:{maxWidth:"70%",padding:"10px 14px",borderRadius:Xt.lg,backgroundColor:E?Q.primary[600]:Q.gray[100],color:E?Q.white:Q.gray[900]},children:[i.jsx("p",{style:{margin:0,fontSize:be.sm},children:x.content}),i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px",marginTop:"4px",fontSize:be.xs,opacity:.7},children:[i.jsx("span",{children:z}),E&&x.status&&i.jsxs("span",{children:[x.status==="sending"&&"•",x.status==="sent"&&"✓",x.status==="delivered"&&"✓✓",x.status==="read"&&"✓✓",x.status==="error"&&"!"]})]})]})]},x.id)}),c&&i.jsx("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:i.jsxs("span",{style:{fontSize:be.xs,color:Q.gray[500]},children:[c.name," is typing..."]})}),i.jsx("div",{ref:v})]}),i.jsxs("div",{style:{padding:"12px 16px",borderTop:`1px solid ${Q.gray[200]}`,display:"flex",gap:"8px"},children:[i.jsx("input",{type:"text",value:h,onChange:x=>y(x.target.value),onKeyDown:k,placeholder:u,style:{flex:1,padding:"10px 14px",border:`1px solid ${Q.gray[300]}`,borderRadius:Xt.full,fontSize:be.sm,outline:"none"}}),i.jsx(la,{onClick:j,disabled:!h.trim(),children:i.jsx(wt,{name:"chevron-right",size:18})})]})]})}function yk({items:e,activeId:n,onItemClick:o,orientation:l="horizontal",variant:c="default",style:u,className:d}){const p=g=>{const h=n===g.id,y={display:"flex",alignItems:"center",gap:"8px",padding:l==="horizontal"?"8px 16px":"10px 16px",border:"none",background:"none",fontSize:be.sm,cursor:g.disabled?"not-allowed":"pointer",opacity:g.disabled?.5:1,transition:"all 0.15s",textDecoration:"none",color:"inherit"},v={default:{fontWeight:h?Xe.medium:Xe.normal,color:h?Q.primary[600]:Q.gray[600]},pills:{borderRadius:Xt.full,backgroundColor:h?Q.primary[100]:"transparent",color:h?Q.primary[700]:Q.gray[600],fontWeight:h?Xe.medium:Xe.normal},underline:{borderBottom:h?`2px solid ${Q.primary[600]}`:"2px solid transparent",color:h?Q.primary[600]:Q.gray[600],fontWeight:h?Xe.medium:Xe.normal,borderRadius:0}},j=()=>{g.disabled||o==null||o(g)},k=i.jsxs(i.Fragment,{children:[g.icon&&i.jsx("span",{style:{display:"flex"},children:g.icon}),i.jsx("span",{children:g.label})]});return g.href?i.jsx("a",{href:g.href,onClick:x=>{x.preventDefault(),j()},style:{...y,...v[c]},children:k},g.id):i.jsx("button",{onClick:j,disabled:g.disabled,style:{...y,...v[c]},children:k},g.id)};return i.jsx("nav",{className:d,style:{display:"flex",flexDirection:l==="horizontal"?"row":"column",gap:l==="horizontal"?"4px":"2px",...c==="underline"&&l==="horizontal"&&{borderBottom:`1px solid ${Q.gray[200]}`},...u},children:e.map(p)})}function kv(e){if(e===0)return"0 B";const n=1024,o=["B","KB","MB","GB"],l=Math.floor(Math.log(e)/Math.log(n));return`${parseFloat((e/Math.pow(n,l)).toFixed(1))} ${o[l]}`}function vk({files:e=[],onFilesSelected:n,onFileRemove:o,accept:l,multiple:c=!0,maxSize:u,maxFiles:d,disabled:p,dragDrop:g=!0,style:h,className:y}){const[v,j]=D.useState(!1),k=D.useRef(null),x=$=>{if(!$)return;let N=Array.from($);d&&(N=N.slice(0,d-e.length)),u&&(N=N.filter(R=>R.size<=u)),n==null||n(N)},E=$=>{$.preventDefault(),j(!1),!p&&g&&x($.dataTransfer.files)},z=$=>{$.preventDefault(),!p&&g&&j(!0)},w=()=>{j(!1)};return i.jsxs("div",{className:y,style:{...h},children:[i.jsxs("div",{onClick:()=>{var $;return!p&&(($=k.current)==null?void 0:$.click())},onDrop:E,onDragOver:z,onDragLeave:w,style:{border:`2px dashed ${v?Q.primary[400]:Q.gray[300]}`,borderRadius:Xt.lg,padding:"32px",textAlign:"center",backgroundColor:v?Q.primary[50]:Q.gray[50],cursor:p?"not-allowed":"pointer",transition:"all 0.2s",opacity:p?.5:1},children:[i.jsx("input",{ref:k,type:"file",accept:l,multiple:c,onChange:$=>x($.target.files),disabled:p,style:{display:"none"}}),i.jsx(wt,{name:"plus",size:32,tone:"subtle"}),i.jsx("p",{style:{margin:"12px 0 4px",color:Q.gray[700],fontSize:be.sm},children:g?"Drag and drop files here, or click to browse":"Click to browse files"}),i.jsxs("p",{style:{margin:0,color:Q.gray[500],fontSize:be.xs},children:[l&&`Accepted: ${l}`,u&&` • Max size: ${kv(u)}`,d&&` • Max files: ${d}`]})]}),e.length>0&&i.jsx("div",{style:{marginTop:"16px",display:"flex",flexDirection:"column",gap:"8px"},children:e.map($=>i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",padding:"12px",border:`1px solid ${Q.gray[200]}`,borderRadius:Xt.md,backgroundColor:Q.white},children:[i.jsx(wt,{name:"menu",size:20,tone:"subtle"}),i.jsxs("div",{style:{flex:1,minWidth:0},children:[i.jsx("p",{style:{margin:0,fontSize:be.sm,color:Q.gray[900],whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:$.name}),i.jsxs("p",{style:{margin:"2px 0 0",fontSize:be.xs,color:Q.gray[500]},children:[kv($.size),$.error&&i.jsx("span",{style:{color:Q.error[500],marginLeft:"8px"},children:$.error})]}),$.status==="uploading"&&$.progress!==void 0&&i.jsx(a$,{value:$.progress,size:"sm",style:{marginTop:"8px"}})]}),i.jsx(la,{variant:"ghost",size:"sm",onClick:()=>o==null?void 0:o($.id),children:i.jsx(wt,{name:"x",size:16})})]},$.id))})]})}var $k={info:Q.info[500],success:Q.success[500],warning:Q.warning[500],error:Q.error[500]};function bk({notification:e,onMarkAsRead:n,onDismiss:o}){const l=e.timestamp instanceof Date?e.timestamp.toLocaleString():e.timestamp,c=$k[e.type||"info"];return i.jsxs("div",{style:{display:"flex",gap:"12px",padding:"12px",backgroundColor:e.read?"transparent":Q.primary[50],borderRadius:Xt.md,transition:"background-color 0.15s"},children:[i.jsx("div",{style:{width:"8px",height:"8px",borderRadius:"50%",backgroundColor:e.read?"transparent":c,flexShrink:0,marginTop:"6px"}}),i.jsxs("div",{style:{flex:1,minWidth:0},children:[i.jsxs("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:"8px"},children:[i.jsx("p",{style:{margin:0,fontWeight:Xe.medium,color:Q.gray[900],fontSize:be.sm},children:e.title}),i.jsx("button",{onClick:()=>o==null?void 0:o(e.id),style:{background:"none",border:"none",padding:"2px",cursor:"pointer",color:Q.gray[400],flexShrink:0},children:i.jsx(wt,{name:"x",size:14})})]}),e.message&&i.jsx("p",{style:{margin:"4px 0 0",color:Q.gray[600],fontSize:be.xs},children:e.message}),i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",marginTop:"8px"},children:[i.jsx("span",{style:{color:Q.gray[400],fontSize:be.xs},children:l}),!e.read&&i.jsx("button",{onClick:()=>n==null?void 0:n(e.id),style:{background:"none",border:"none",padding:0,color:Q.primary[600],fontSize:be.xs,cursor:"pointer"},children:"Mark as read"}),e.action&&i.jsx("button",{onClick:e.action.onClick,style:{background:"none",border:"none",padding:0,color:Q.primary[600],fontSize:be.xs,cursor:"pointer"},children:e.action.label})]})]})]})}function xk({notifications:e,onMarkAsRead:n,onMarkAllAsRead:o,onDismiss:l,onClearAll:c,emptyText:u="No notifications",loading:d,style:p,className:g}){const h=e.filter(y=>!y.read).length;return i.jsxs("div",{className:g,style:{display:"flex",flexDirection:"column",...p},children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",borderBottom:`1px solid ${Q.gray[200]}`},children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[i.jsx("span",{style:{fontWeight:Xe.semibold,color:Q.gray[900]},children:"Notifications"}),h>0&&i.jsx("span",{style:{padding:"2px 8px",borderRadius:"12px",backgroundColor:Q.primary[100],color:Q.primary[700],fontSize:be.xs,fontWeight:Xe.medium},children:h})]}),i.jsxs("div",{style:{display:"flex",gap:"8px"},children:[h>0&&i.jsx(la,{variant:"ghost",size:"sm",onClick:o,children:"Mark all read"}),e.length>0&&i.jsx(la,{variant:"ghost",size:"sm",onClick:c,children:"Clear all"})]})]}),i.jsx("div",{style:{flex:1,overflowY:"auto",padding:"8px"},children:d?i.jsx("div",{style:{display:"flex",justifyContent:"center",padding:"32px"},children:i.jsx(Fa,{size:24})}):e.length===0?i.jsx("div",{style:{textAlign:"center",padding:"32px",color:Q.gray[500]},children:u}):i.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:e.map(y=>i.jsx(bk,{notification:y,onMarkAsRead:n,onDismiss:l},y.id))})})]})}var _k={sm:"400px",md:"500px",lg:"640px",xl:"800px",full:"100vw"};function jk({open:e,onClose:n,title:o,children:l,footer:c,size:u="md",closeOnOverlayClick:d=!0,closeOnEscape:p=!0,showCloseButton:g=!0,style:h,className:y}){const v=D.useCallback(x=>{x.key==="Escape"&&p&&n()},[p,n]);if(D.useEffect(()=>{if(e)return document.addEventListener("keydown",v),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",v),document.body.style.overflow=""}},[e,v]),!e)return null;const j=x=>{x.target===x.currentTarget&&d&&n()},k=u==="full";return i.jsxs("div",{style:{position:"fixed",inset:0,zIndex:Gi.modal,display:"flex",alignItems:k?"stretch":"center",justifyContent:"center",padding:k?0:"24px"},children:[i.jsx("div",{onClick:j,style:{position:"absolute",inset:0,backgroundColor:"rgba(0, 0, 0, 0.5)",animation:If.fadeIn}}),i.jsxs("div",{role:"dialog","aria-modal":"true",className:y,style:{position:"relative",width:_k[u],maxWidth:k?"100%":"calc(100vw - 48px)",maxHeight:k?"100%":"calc(100vh - 48px)",backgroundColor:Q.white,borderRadius:k?0:Xt.xl,boxShadow:ll["2xl"],display:"flex",flexDirection:"column",overflow:"hidden",animation:If.scaleIn,...h},children:[(o||g)&&i.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px 20px",borderBottom:`1px solid ${Q.gray[200]}`},children:[o&&i.jsx(Uc,{level:4,children:o}),g&&i.jsx(la,{variant:"ghost",size:"sm",onClick:n,"aria-label":"Close modal",style:{marginLeft:"auto"},children:i.jsx(wt,{name:"x",size:20})})]}),i.jsx("div",{style:{flex:1,padding:"20px",overflowY:"auto"},children:l}),c&&i.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:"8px",padding:"16px 20px",borderTop:`1px solid ${Q.gray[200]}`},children:c})]})]})}function Sk({open:e,onClose:n,commands:o,onSelect:l,placeholder:c="Search commands...",recentIds:u=[],loading:d,style:p,className:g}){const[h,y]=D.useState(""),[v,j]=D.useState(0),k=D.useMemo(()=>{const w=h?o.filter(N=>{var R;return N.label.toLowerCase().includes(h.toLowerCase())||((R=N.description)==null?void 0:R.toLowerCase().includes(h.toLowerCase()))}):o,$=new Map;if(!h&&u.length>0){const N=u.map(R=>o.find(_=>_.id===R)).filter(Boolean);N.length>0&&$.set("Recent",N)}return w.forEach(N=>{const R=N.group||"Commands";$.has(R)||$.set(R,[]),!(!h&&u.includes(N.id)&&$.has("Recent"))&&$.get(R).push(N)}),$},[o,h,u]),x=D.useMemo(()=>{const w=[];return k.forEach($=>w.push(...$)),w},[k]);D.useEffect(()=>{j(0)},[h]),D.useEffect(()=>{e&&(y(""),j(0))},[e]);const E=D.useCallback(w=>{if(w.key==="Escape"){n();return}if(w.key==="ArrowDown")w.preventDefault(),j($=>Math.min($+1,x.length-1));else if(w.key==="ArrowUp")w.preventDefault(),j($=>Math.max($-1,0));else if(w.key==="Enter"){w.preventDefault();const $=x[v];$&&!$.disabled&&(l($),n())}},[x,v,l,n]);if(D.useEffect(()=>{if(e)return document.addEventListener("keydown",E),()=>document.removeEventListener("keydown",E)},[e,E]),!e)return null;let z=0;return i.jsxs("div",{style:{position:"fixed",inset:0,zIndex:Gi.modal,display:"flex",alignItems:"flex-start",justifyContent:"center",paddingTop:"15vh"},children:[i.jsx("div",{onClick:n,style:{position:"absolute",inset:0,backgroundColor:"rgba(0, 0, 0, 0.5)"}}),i.jsxs("div",{role:"dialog",className:g,style:{position:"relative",width:"560px",maxWidth:"calc(100vw - 48px)",maxHeight:"60vh",backgroundColor:Q.white,borderRadius:Xt.xl,boxShadow:ll["2xl"],overflow:"hidden",display:"flex",flexDirection:"column",...p},children:[i.jsx("div",{style:{padding:"12px",borderBottom:`1px solid ${Q.gray[200]}`},children:i.jsxs("div",{style:{position:"relative"},children:[i.jsx(wt,{name:"search",size:18,tone:"subtle",style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)"}}),i.jsx("input",{type:"text",value:h,onChange:w=>y(w.target.value),placeholder:c,autoFocus:!0,style:{width:"100%",padding:"12px 12px 12px 42px",border:"none",fontSize:be.base,outline:"none",backgroundColor:"transparent"}})]})}),i.jsx("div",{style:{flex:1,overflowY:"auto",padding:"8px"},children:d?i.jsx("div",{style:{display:"flex",justifyContent:"center",padding:"32px"},children:i.jsx(Fa,{size:24})}):x.length===0?i.jsx("div",{style:{textAlign:"center",padding:"32px",color:Q.gray[500]},children:"No commands found"}):Array.from(k.entries()).map(([w,$])=>i.jsxs("div",{style:{marginBottom:"8px"},children:[i.jsx("div",{style:{padding:"8px 12px",fontSize:be.xs,fontWeight:Xe.semibold,color:Q.gray[500],textTransform:"uppercase",letterSpacing:"0.05em"},children:w}),$.map(N=>{const _=z++===v;return i.jsxs("button",{onClick:()=>{N.disabled||(l(N),n())},disabled:N.disabled,style:{display:"flex",alignItems:"center",gap:"12px",width:"100%",padding:"10px 12px",border:"none",borderRadius:Xt.md,backgroundColor:_?Q.gray[100]:"transparent",color:N.disabled?Q.gray[400]:Q.gray[900],textAlign:"left",cursor:N.disabled?"not-allowed":"pointer"},children:[N.icon&&i.jsx("span",{style:{display:"flex",color:Q.gray[500]},children:N.icon}),i.jsxs("div",{style:{flex:1},children:[i.jsx("div",{style:{fontSize:be.sm},children:N.label}),N.description&&i.jsx("div",{style:{fontSize:be.xs,color:Q.gray[500]},children:N.description})]}),N.shortcut&&i.jsx("kbd",{style:{padding:"2px 6px",backgroundColor:Q.gray[100],borderRadius:Xt.sm,fontSize:be.xs,color:Q.gray[500],fontFamily:"inherit"},children:N.shortcut})]},N.id)})]},w))}),i.jsxs("div",{style:{padding:"8px 12px",borderTop:`1px solid ${Q.gray[200]}`,display:"flex",alignItems:"center",gap:"16px",fontSize:be.xs,color:Q.gray[500]},children:[i.jsx("span",{children:"↑↓ Navigate"}),i.jsx("span",{children:"↵ Select"}),i.jsx("span",{children:"Esc Close"})]})]})]})}function wk({brand:e,columns:n,socialLinks:o,bottomText:l,bottomLinks:c,background:u,bordered:d=!0,style:p,className:g}){return i.jsxs("footer",{className:g,role:"contentinfo",style:{backgroundColor:u||Q.gray[50],borderTop:d?`1px solid ${Q.gray[200]}`:void 0,...p},children:[i.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"48px",padding:"48px 24px",maxWidth:"1280px",margin:"0 auto"},children:[e&&i.jsx("div",{style:{flex:"1 1 280px",minWidth:"200px"},children:e}),n==null?void 0:n.map((h,y)=>i.jsxs("div",{style:{flex:"0 1 180px",minWidth:"140px"},children:[h.title&&i.jsx("h4",{style:{fontSize:be.sm,fontWeight:Xe.semibold,color:Q.gray[900],lineHeight:xa.normal,margin:"0 0 16px 0",padding:0},children:h.title}),i.jsx("ul",{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",gap:"10px"},children:h.links.map((v,j)=>i.jsx("li",{children:i.jsx("a",{href:v.href,onClick:v.onClick?k=>{var x;k.preventDefault(),(x=v.onClick)==null||x.call(v)}:void 0,style:{fontSize:be.sm,color:Q.gray[600],textDecoration:"none",transition:"color 0.15s",lineHeight:xa.normal},"aria-label":v.label,children:v.label})},j))})]},y))]}),(l||c||o)&&i.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:[l&&i.jsx("span",{style:{fontSize:be.sm,color:Q.gray[500],lineHeight:xa.normal},children:l}),i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"20px"},children:[o==null?void 0:o.map((h,y)=>i.jsx("a",{href:h.href,"aria-label":h.label,style:{display:"flex",alignItems:"center",justifyContent:"center",color:Q.gray[500],transition:"color 0.15s"},children:h.icon},y)),c==null?void 0:c.map((h,y)=>i.jsx("a",{href:h.href,onClick:h.onClick?v=>{var j;v.preventDefault(),(j=h.onClick)==null||j.call(h)}:void 0,style:{fontSize:be.sm,color:Q.gray[500],textDecoration:"none",transition:"color 0.15s"},children:h.label},y))]})]})]})}function kk({heading:e,description:n,primaryAction:o,secondaryAction:l,media:c,align:u="center",size:d="md",background:p,backgroundImage:g,overlay:h=!1,style:y,className:v}){const j={sm:{padding:"48px 24px",headingSize:be["3xl"],descSize:be.lg},md:{padding:"80px 24px",headingSize:be["4xl"],descSize:be.xl},lg:{padding:"120px 24px",headingSize:be["5xl"],descSize:be.xl}},k=j[d]||j.md,x=!!g,E=x&&h;return i.jsxs("section",{className:v,style:{position:"relative",backgroundColor:p||(x?void 0:Q.white),...x&&{backgroundImage:`url(${g})`,backgroundSize:"cover",backgroundPosition:"center"},overflow:"hidden",...y},children:[E&&i.jsx("div",{"aria-hidden":"true",style:{position:"absolute",inset:0,backgroundColor:"rgba(0, 0, 0, 0.5)"}}),i.jsxs("div",{style:{position:"relative",maxWidth:"1280px",margin:"0 auto",padding:k.padding,display:"flex",flexDirection:u==="center"?"column":"row",alignItems:"center",gap:"48px",textAlign:u==="center"?"center":"left"},children:[i.jsxs("div",{style:{flex:u==="left"&&c?"1 1 50%":void 0,maxWidth:u==="center"?"800px":void 0},children:[e&&i.jsx("h1",{style:{fontSize:k.headingSize,fontWeight:Xe.bold,lineHeight:xa.tight,letterSpacing:Pr.tight,color:E?Q.white:Q.gray[900],margin:"0 0 16px 0",padding:0},children:e}),n&&i.jsx("p",{style:{fontSize:k.descSize,lineHeight:xa.relaxed,color:E?"rgba(255,255,255,0.9)":Q.gray[600],margin:"0 0 32px 0",padding:0,maxWidth:u==="center"?"640px":void 0,...u==="center"&&{marginLeft:"auto",marginRight:"auto"}},children:n}),(o||l)&&i.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"12px",justifyContent:u==="center"?"center":"flex-start"},children:[o&&i.jsx("button",{onClick:o.onClick,style:{padding:"12px 28px",fontSize:be.base,fontWeight:Xe.semibold,color:Q.white,backgroundColor:Q.primary[600],border:"none",borderRadius:"8px",cursor:"pointer",transition:"background-color 0.15s",lineHeight:xa.normal},children:o.label}),l&&i.jsx("button",{onClick:l.onClick,style:{padding:"12px 28px",fontSize:be.base,fontWeight:Xe.semibold,color:E?Q.white:Q.gray[700],backgroundColor:"transparent",border:`1px solid ${E?"rgba(255,255,255,0.3)":Q.gray[300]}`,borderRadius:"8px",cursor:"pointer",transition:"all 0.15s",lineHeight:xa.normal},children:l.label})]})]}),c&&i.jsx("div",{style:{flex:u==="left"?"1 1 50%":void 0,display:"flex",justifyContent:"center",alignItems:"center",...u==="center"&&{marginTop:"16px"}},children:c})]})]})}var Hf={};Nc(Hf,{Clickable:()=>Nk,Hoverable:()=>zk,Pressable:()=>Ek});var Nk=D.forwardRef(function({children:n,onClick:o,onDoubleClick:l,hoverStyle:c,activeStyle:u,cursor:d,transition:p="all 200ms ease",disabled:g=!1,role:h,"aria-label":y,tabIndex:v,style:j,className:k,...x},E){const[z,w]=D.useState(!1),[$,N]=D.useState(!1),R=!!o,_=g?"not-allowed":d??(R?"pointer":void 0),S=h??(R?"button":void 0),C=v??(R?0:void 0),U=G=>{g||!o||(G.key==="Enter"||G.key===" ")&&(G.preventDefault(),o(G))},te={...j,cursor:_,transition:p,opacity:g?.5:void 0,...z&&!g?c:{},...$&&!g?u:{}};return i.jsx("div",{ref:E,className:k,style:te,onClick:g?void 0:o,onDoubleClick:g?void 0:l,onMouseEnter:()=>w(!0),onMouseLeave:()=>{w(!1),N(!1)},onMouseDown:()=>N(!0),onMouseUp:()=>N(!1),onKeyDown:U,role:S,"aria-label":y,"aria-disabled":g||void 0,tabIndex:C,...x,children:n})}),zk=D.forwardRef(function({children:n,hoverStyle:o,onHoverChange:l,transition:c="all 200ms ease",style:u,className:d,...p},g){const[h,y]=D.useState(!1),v={...u,transition:c,...h?o:{}};return i.jsx("div",{ref:g,className:d,style:v,onMouseEnter:()=>{y(!0),l==null||l(!0)},onMouseLeave:()=>{y(!1),l==null||l(!1)},...p,children:n})}),Ek=D.forwardRef(function({children:n,onPress:o,onLongPress:l,longPressDelay:c=500,hoverStyle:u,pressStyle:d,disabled:p=!1,transition:g="all 150ms ease",role:h,"aria-label":y,tabIndex:v,style:j,className:k,...x},E){const[z,w]=D.useState(!1),[$,N]=D.useState(!1),[R,_]=D.useState(null),S=!!o||!!l,C=Y=>{if(!p&&(N(!0),l)){const F=setTimeout(()=>{l(Y)},c);_(F)}},U=Y=>{p||(N(!1),R?(clearTimeout(R),_(null),o==null||o(Y)):l||o==null||o(Y))},te=Y=>{p||!o||(Y.key==="Enter"||Y.key===" ")&&(Y.preventDefault(),o(Y))},G={...j,cursor:p?"not-allowed":S?"pointer":void 0,transition:g,opacity:p?.5:void 0,userSelect:S?"none":void 0,...z&&!p?u:{},...$&&!p?d:{}},H=typeof n=="function"?n({pressed:$,hovered:z}):n;return i.jsx("div",{ref:E,className:k,style:G,onMouseDown:C,onMouseUp:U,onMouseEnter:()=>w(!0),onMouseLeave:()=>{w(!1),N(!1),R&&clearTimeout(R)},onKeyDown:te,role:h??(S?"button":void 0),"aria-label":y,"aria-disabled":p||void 0,tabIndex:v??(S?0:void 0),...x,children:H})});function Ck(e){return e.replace(/__GGUI_META__[\s\S]*?__GGUI_META_END__/g,"").replace(/__GGUI_STREAM_SPEC__[\s\S]*?__GGUI_STREAM_SPEC_END__/g,"")}function Tk(e){const n=e.$value;if(Array.isArray(n))return n.join(", ");if(n!==null&&typeof n=="object"){const o=n;if(e.$type==="shadow"&&"offsetX"in o)return`${o.offsetX} ${o.offsetY} ${o.blur} ${o.spread} ${o.color}`;if(e.$type==="transition"&&"duration"in o&&"timingFunction"in o)return`${typeof o.property=="string"&&o.property?`${o.property} `:""}${o.duration} ${o.timingFunction}`}return String(n)}function er(e,n,o){for(const[l,c]of Object.entries(e))l.startsWith("$")||(c!==null&&typeof c=="object"&&"$value"in c?o.push(` --ggui-${n}-${l}: ${Tk(c)};`):c!==null&&typeof c=="object"&&er(c,`${n}-${l}`,o))}function Mk(e){const n=[];return er(e.color,"color",n),er(e.font,"font",n),er(e.spacing,"spacing",n),er(e.shape,"shape",n),er({duration:e.motion.duration,easing:e.motion.easing,transition:e.motion.transition},"motion",n),er(e.accessibility,"accessibility",n),er(e.zIndex,"zIndex",n),n.join(`
165
- `)}function Ok(e,n){const o=/([\d.]+%|from|to)\s*\{([^}]*)\}/g,l=[];let c;for(;(c=o.exec(n))!==null;){const u=c[1],p=c[2].trim().split(";").map(g=>g.trim()).filter(Boolean).map(g=>g.endsWith(";")?g:`${g};`).join(" ");l.push(` ${u} { ${p} }`)}return`@keyframes ggui-${e} {
166
- ${l.join(`
167
- `)}
168
- }`}function Rk(e){const n=[];for(const[o,l]of Object.entries(e.motion.keyframes))o.startsWith("$")||n.push(Ok(o,String(l.$value)));return n.join(`
169
-
170
- `)}function Ak(e,n){const l=`:root {
171
- ${Mk(n)}
172
- }`,c=Rk(n),u=c?`${l}
173
-
174
- ${c}`:l;return{id:e,name:n.$name,description:n.$description,metadata:n.$metadata,cssVariables:l,cssKeyframes:c,css:u}}var Gt={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"}}}},tt={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"}}}},ca={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}},Lc={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)"}},ar={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:Lc,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"}}}},Dk={$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:"#a87b0e",$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:"#d93822",$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:ar.font,spacing:ar.spacing,shape:ar.shape,motion:ar.motion,accessibility:{...tt.light,focusRing:{...tt.light.focusRing,color:{$type:"color",$value:"#292929"}}},zIndex:ca},Uk={$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:ar.font,spacing:ar.spacing,shape:ar.shape,motion:ar.motion,accessibility:{...tt.dark,focusRing:{...tt.dark.focusRing,color:{$type:"color",$value:"#f4f3ed"}}},zIndex:ca},Ik={light:Dk,dark:Uk},nr={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)"}}}},Lk={$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:"#0e7490",$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:"#55556a",$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:nr.font,spacing:nr.spacing,shape:nr.shape,motion:nr.motion,accessibility:{...tt.light,focusRing:{...tt.light.focusRing,color:{$type:"color",$value:"#06b6d4"}}},zIndex:ca},Vk={$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:"#55556a",$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:nr.font,spacing:nr.spacing,shape:nr.shape,motion:nr.motion,accessibility:{...tt.dark,focusRing:{...tt.dark.focusRing,color:{$type:"color",$value:"#22d3ee"}}},zIndex:ca},Bk={light:Lk,dark:Vk},rr={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)"}}}},Hk={$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:"#9a9084",$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:"#6b8f5e"},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:"#c9a84c"},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:rr.font,spacing:rr.spacing,shape:rr.shape,motion:rr.motion,accessibility:{...tt.light,focusRing:{...tt.light.focusRing,color:{$type:"color",$value:"#748660"}}},zIndex:ca},qk={$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:"#cf6f6a"},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:rr.font,spacing:rr.spacing,shape:rr.shape,motion:rr.motion,accessibility:{...tt.dark,focusRing:{...tt.dark.focusRing,color:{$type:"color",$value:"#93a17c"}}},zIndex:ca},Pk={light:Hk,dark:qk},ir={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"}}}},Zk={$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:"#be185d",$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:"#5a5a68",$type:"color"},600:{$value:"#8a8a9a",$type:"color"},700:{$value:"#b0b0be",$type:"color"},800:{$value:"#d4d4de",$type:"color"},900:{$value:"#ececf0",$type:"color"}},success:{...Gt.dark.success,500:{$value:"#34d399",$type:"color"}},warning:{...Gt.dark.warning,500:{$value:"#fbbf24",$type:"color"}},error:{...Gt.dark.error,500:{$value:"#f87171",$type:"color"}},info:{...Gt.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:"#09090b",$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:ir.font,spacing:ir.spacing,shape:ir.shape,motion:ir.motion,accessibility:{...tt.dark,focusRing:{...tt.dark.focusRing,color:{$value:"#ec4899",$type:"color"}}},zIndex:ca},Gk={$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:{...Gt.dark.success,500:{$value:"#5ee0ad",$type:"color"}},warning:{...Gt.dark.warning,500:{$value:"#ffd24a",$type:"color"}},error:{...Gt.dark.error,500:{$value:"#ff8a8a",$type:"color"}},info:{...Gt.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:ir.font,spacing:ir.spacing,shape:ir.shape,motion:ir.motion,accessibility:{...tt.dark,focusRing:{...tt.dark.focusRing,color:{$value:"#f472b6",$type:"color"}}},zIndex:ca},Fk={light:Zk,dark:Gk},or={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:Lc}},Yk={$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:"#bfaa80",$type:"color"},600:{$value:"#9a8660",$type:"color"},700:{$value:"#746448",$type:"color"},800:{$value:"#504530",$type:"color"},900:{$value:"#352e20",$type:"color"}},success:Gt.light.success,warning:Gt.light.warning,error:Gt.light.error,info:Gt.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:"#fefcf8",$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:or.font,spacing:or.spacing,shape:or.shape,motion:or.motion,accessibility:{...tt.light,focusRing:{...tt.light.focusRing,color:{$type:"color",$value:"#16a34a"}}},zIndex:ca},Kk={$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:Gt.dark.success,warning:Gt.dark.warning,error:Gt.dark.error,info:Gt.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:or.font,spacing:or.spacing,shape:or.shape,motion:or.motion,accessibility:{...tt.dark,focusRing:{...tt.dark.focusRing,color:{$type:"color",$value:"#4ade80"}}},zIndex:ca},Jk={light:Yk,dark:Kk},Xk={...Lc,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)"}},lr={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:Xk}},Qk={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"}},Wk={$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:{...Qk},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:"#6b8e3d",$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:"#c98e2e",$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:"#faf9f5",$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:lr.font,spacing:lr.spacing,shape:lr.shape,motion:lr.motion,accessibility:{...tt.light,focusRing:{...tt.light.focusRing,color:{$type:"color",$value:"#cc785c"}}},zIndex:ca},e9={$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:"#d56b59",$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:lr.font,spacing:lr.spacing,shape:lr.shape,motion:lr.motion,accessibility:{...tt.dark,focusRing:{...tt.dark.focusRing,color:{$type:"color",$value:"#d6896c"}}},zIndex:ca},t9={light:Wk,dark:e9},sr={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:Lc}},a9={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"}},n9={$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:{...a9},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:"#0e9d6e",$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:"#e08515",$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:sr.font,spacing:sr.spacing,shape:sr.shape,motion:sr.motion,accessibility:{...tt.light,focusRing:{...tt.light.focusRing,color:{$type:"color",$value:"#4f46e5"}}},zIndex:ca},r9={$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:"#5e5c70",$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:sr.font,spacing:sr.spacing,shape:sr.shape,motion:sr.motion,accessibility:{...tt.dark,focusRing:{...tt.dark.focusRing,color:{$type:"color",$value:"#818cf8"}}},zIndex:ca},i9={light:n9,dark:r9},o9=new Map([["ggui",Ik],["indigo",i9],["claudic",t9],["premium-cyberpunk",Bk],["premium-zen",Pk],["premium-neon-noir",Fk],["premium-botanical",Jk]]),Nv=new Map;function l9(e,n){return n==="dark"&&e.dark?"dark":"light"}function s9(e,n="light"){const o=o9.get(e);if(!o)return;const l=l9(o,n),c=`${e}:${l}`,u=Nv.get(c);if(u)return u;const d=l==="dark"?o.dark:o.light,p=Ak(e,d);return Nv.set(c,p),p}function c$(){return"ggui"}D.createContext(null);var u$="@supports (color: color-mix(in srgb, red, blue))";function c9(e){const n=e.match(/--ggui-color-primary-500:\s*(#[0-9a-fA-F]{3}|#[0-9a-fA-F]{6})\s*;/);return n?n[1]:null}function u9(e){let n=e.replace("#","");if(n.length===3&&(n=n.split("").map(u=>u+u).join("")),n.length!==6)return null;const o=Number.parseInt(n.slice(0,2),16),l=Number.parseInt(n.slice(2,4),16),c=Number.parseInt(n.slice(4,6),16);return Number.isNaN(o)||Number.isNaN(l)||Number.isNaN(c)?null:{r:o,g:l,b:c}}function qf(e,n){const o=u9(n);return o?e.replace(/color-mix\(\s*in srgb\s*,\s*var\(--ggui-color-primary-500\)\s+(\d+(?:\.\d+)?)%\s*,\s*transparent\s*\)/g,(l,c)=>{const u=Number(c)/100,d=Number(u.toFixed(4)).toString();return`rgba(${o.r}, ${o.g}, ${o.b}, ${d})`}):e}function d9(e){const n=e.indexOf("{"),o=e.lastIndexOf("}");if(n===-1||o===-1)return{base:e,colorMix:[]};const l=e.slice(0,n+1),c=e.slice(n+1,o),u=[],d=[];for(const p of c.split(`
175
- `))p.trim()!==""&&(p.includes("color-mix(")?d.push(p):u.push(p));return{base:`${l}
176
- ${u.join(`
177
- `)}
178
- }`,colorMix:d}}function f9(e,n,o){if(!o||!e.includes("color-mix("))return e;const{base:l,colorMix:c}=d9(e);if(c.length===0)return e;const u=c.map(g=>qf(g,o)),d=`${n} {
179
- ${u.join(`
180
- `)}
181
- }`,p=`${u$} {
182
- ${n} {
183
- ${c.join(`
184
- `)}
185
- }
186
- }`;return`${l}
187
- ${d}
188
- ${p}`}function p9(e,n="light"){return pp(c$(),e,n)}function pp(e,n,o="light"){const l=s9(e,o);if(!l){const g=c$();return e===g?"":pp(g,n,o)}const c=c9(l.cssVariables),u=f9(l.cssVariables.replace(/^:root\s*\{/,`.${n} {`),`.${n}`,c),d=`.${n} {
189
- font-family: var(--ggui-font-family-sans);
190
- color: var(--ggui-color-onSurface);
191
- background-color: transparent;
192
- }`,p=g9(n,c);return`${u}
193
- ${d}
194
- ${p}
195
- ${l.cssKeyframes}
196
- .${n} *, .${n} *::before, .${n} *::after { box-sizing: border-box; }
197
- .${n} h1, .${n} h2, .${n} h3, .${n} h4, .${n} h5, .${n} h6, .${n} button, .${n} input, .${n} textarea, .${n} select { font-family: inherit; }`}function g9(e,n){const o=`.${e}`,l=" --ggui-color-primary-gradient: linear-gradient(135deg, var(--ggui-color-primary-500) 0%, var(--ggui-color-primary-600) 100%);",c=" --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%);",u=" --ggui-effect-glow-primary: 0 0 0 4px color-mix(in srgb, var(--ggui-color-primary-500) 18%, transparent);",d=" --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;";if(!n)return`${o} {
198
- ${l}
199
- ${c}
200
- ${u}
201
- ${d}
202
- }`;const p=" --ggui-color-surface-gradient: linear-gradient(180deg, var(--ggui-color-surface) 0%, var(--ggui-color-surface) 100%);",g=` --ggui-effect-glow-primary: ${qf("0 0 0 4px color-mix(in srgb, var(--ggui-color-primary-500) 18%, transparent)",n)};`,h=` --ggui-effect-glow-primary-strong: ${qf("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",n)};`,y=`${o} {
203
- ${l}
204
- ${p}
205
- ${g}
206
- ${h}
207
- }`,v=`${u$} {
208
- ${o} {
209
- ${c}
210
- ${u}
211
- ${d}
212
- }
213
- }`;return`${y}
214
- ${v}`}var m9=["useAction","useStream","useAuth","useApp","useRender","useGguiContext","useContract","useWireContext","GguiWireProvider"],h9=["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"],y9=["SearchField","FormField","MenuItem","Tag","Dropdown","Autocomplete","Breadcrumb","Pagination","EmptyState","Stat","Stepper","Markdown","MarkdownInline","renderRichTextInlines"],v9=["Header","Sidebar","CardGrid","CommentThread","DataTable","ChatWindow","NavigationBar","FileUploader","NotificationCenter","Modal","CommandPalette","Footer","Hero"],zv=["Clickable","Hoverable","Pressable"],$9=["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"],b9=["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"];function Rt(e,n,o){return e=e.split(`from"${n}"`).join(`from"${o}"`),e=e.split(`from "${n}"`).join(`from "${o}"`),e=e.split(`from'${n}'`).join(`from'${o}'`),e=e.split(`from '${n}'`).join(`from '${o}'`),e=e.split(`import"${n}"`).join(`import"${o}"`),e=e.split(`import "${n}"`).join(`import "${o}"`),e=e.split(`import'${n}'`).join(`import'${o}'`),e=e.split(`import '${n}'`).join(`import '${o}'`),e}function gp(e,n){return`(globalThis.__ggui__&&globalThis.__ggui__["${e}"]||window["${n}"])`}function Yi(e){return`data:text/javascript,${encodeURIComponent(e)}`}function x9(e){const n=$9.map(l=>`export const ${l} = R.${l};`).join(" ");return`const R = ${gp("react",e)}; export default R; ${n}`}function _9(e){return Yi(x9(e))}function j9(){return`const D = globalThis.__ggui__["reactDom"]; export default D; ${["createPortal","flushSync","unstable_batchedUpdates"].map(o=>`export const ${o} = D.${o};`).join(" ")}`}function S9(){return Yi(j9())}function w9(e){return[`const R = ${gp("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 k9(e){return Yi(w9(e))}function N9(e,n,o,l,c){if(o&&o.length>0){const d=[e,...l||[]],p=[n,...c||[]],g=d.map((v,j)=>`(globalThis.__ggui__&&globalThis.__ggui__["${p[j]}"]||window["${v}"]||{})`),h=g.join(","),y=o.map(v=>`export const ${v} = M["${v}"];`).join(" ");return g.length>1?`const M = Object.assign({}, ${h}); ${y} export default M;`:`const M = ${g[0]}; ${y} export default M;`}return`const M = ${gp(n,e)} || {}; const handler = { get(_, key) { return M[key]; } }; export default new Proxy({}, handler);`}function Xn(e,n,o,l,c){return Yi(N9(e,n,o,l,c))}function z9(){return`const w = globalThis.__ggui__.wire; ${m9.map(n=>`export const ${n} = w.${n};`).join(" ")} export default w;`}function E9(){return Yi(z9())}function C9(e,n){var d;const o=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),l=new RegExp(`import\\s*(?:[A-Za-z_$][\\w$]*\\s*,\\s*)?\\{([^}]*)\\}\\s*from\\s*['"]${o}['"]`,"g"),c=new Set;let u;for(;(u=l.exec(e))!==null;)for(const p of u[1].split(",")){const g=(d=p.trim().split(/\s+as\s+/)[0])==null?void 0:d.trim();g!==void 0&&/^[A-Za-z_$][\w$]*$/.test(g)&&c.add(g)}return[...c]}function T9(e,n){const o=JSON.stringify(e),l=n.some(u=>/^[A-Z]/.test(u)),c=[];c.push(`var P=${o};`),c.push("function NS(){return(globalThis.__ggui__&&globalThis.__ggui__.gadgets&&globalThis.__ggui__.gadgets[P])||{};}"),c.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);};}'),l&&(c.push("var R=globalThis.__ggui__&&globalThis.__ggui__.react;"),c.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;}}'),c.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(const u of n){const d=/^[A-Z]/.test(u)?"C":"H";c.push(`export const ${u}=${d}(${JSON.stringify(u)});`)}return c.push("export default new Proxy({},{get:function(_,k){return NS()[k];}});"),c.join("")}function M9(e,n){return Yi(T9(e,n))}function O9(e,n){const o=n.reactGlobal??"__REACT",l=n.primitivesGlobal??"__GGUI_PRIMITIVES",c=n.componentsGlobal??"__GGUI_COMPONENTS",u=n.compositionsGlobal??"__GGUI_COMPOSITIONS",d=n.interactGlobal??"__GGUI_INTERACT",p=n.appComponentsGlobal??"__GGUI_APP_COMPONENTS",g=_9(o),h=k9(o);e=Rt(e,"react/jsx-runtime",h),e=Rt(e,"react/jsx-dev-runtime",h);const y=S9();e=Rt(e,"react-dom",y),e=Rt(e,"react",g);const v=[...h9,...y9,...v9,...zv];e=Rt(e,"@ggui-ai/design/primitives",Xn(l,"primitives",v,[c,u,d],["components","compositions","interact"])),e=Rt(e,"@ggui-ai/design/components",Xn(c,"components",v,[l,u,d],["primitives","compositions","interact"])),e=Rt(e,"@ggui-ai/design/compositions",Xn(u,"compositions",v,[l,c,d],["primitives","components","interact"])),e=Rt(e,"@ggui-ai/design/interact",Xn(d,"interact",[...zv])),e=Rt(e,"@ggui-ai/design/templates",Xn(u,"compositions",v,[l,c],["primitives","components"])),e=Rt(e,"@ggui-ai/design/app-components",Xn(p,"appComponents")),e=Rt(e,"@ggui-ai/design/tokens",Xn("__GGUI_TOKENS","tokens",[...b9])),e=Rt(e,"@ggui-ai/design",Xn(l,"primitives",v,[c,u,d],["components","compositions","interact"])),e=Rt(e,"@ggui-ai/wire",E9());const j=[...new Set(["@ggui-ai/gadgets",...n.gadgetPackages??[]])];for(const k of j){const x=C9(e,k);e=Rt(e,k,M9(k,x))}return e}var R9={"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 A9(e,n){const o=n.shimBaseUrl.replace(/\/$/,"");for(const[l,c]of Object.entries(R9))e=Rt(e,l,`${o}/${c}.js`);return e}function D9(e,n){const o=n.reactBaseUrl??"https://esm.sh/react@18.2.0";return e=Rt(e,"react/jsx-runtime",`${o}/jsx-runtime`),e=Rt(e,"react/jsx-dev-runtime",`${o}/jsx-runtime`),e=Rt(e,"react",o),e}function U9(e,n){switch(n.mode){case"data-url":return O9(e,n);case"importmap":return D9(e,n);case"asset-url":return A9(e,n)}}function I9(e){const n=e.split(";"),o=[],l=[];for(const c of n)c.trimStart().startsWith("import")?o.push(c):l.push(c);return o.length===0?e:o.join(";")+";"+l.join(";")}async function L9(e){const n=new Blob([e],{type:"application/javascript"}),o=URL.createObjectURL(n);try{return await import(o)}finally{URL.revokeObjectURL(o)}}var V9=0;function B9(e){return`ggui-rcr-${e.replace(/[^a-z0-9]/gi,"")}`}var H9=1,q9=500,P9=class extends xc.Component{constructor(){super(...arguments);pn(this,"state",{error:null,catchCount:0,autoRetrying:!1});pn(this,"retryTimer",null)}static getDerivedStateFromError(n){return{error:n}}componentDidCatch(n){var l,c;const o=this.state.catchCount+1;this.setState({catchCount:o}),o<=H9?(this.setState({autoRetrying:!0}),this.retryTimer=setTimeout(()=>{this.setState({error:null,autoRetrying:!1})},q9)):(c=(l=this.props).onError)==null||c.call(l,n)}componentWillUnmount(){this.retryTimer&&clearTimeout(this.retryTimer)}render(){const{error:n,autoRetrying:o}=this.state;return n?o?i.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:[i.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...",i.jsx("style",{children:"@keyframes ggui-err-spin { to { transform: rotate(360deg); } }"})]}):i.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:[i.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:"!"}),i.jsx("div",{style:{fontSize:14,fontWeight:600,opacity:.9},children:"Something went wrong"}),i.jsx("div",{style:{fontSize:12,opacity:.6,maxWidth:280,lineHeight:1.4},children:"This component encountered an error. Try asking for a different view."}),i.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"}),i.jsxs("details",{style:{marginTop:8,maxWidth:320,width:"100%",textAlign:"left",opacity:.65},children:[i.jsx("summary",{style:{fontSize:11,cursor:"pointer"},children:"Error details"}),i.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:n.message})]})]}):this.props.children}};function Z9({code:e,props:n={},themeId:o,cssOverrides:l,fallback:c=i.jsx("div",{children:"Loading component..."}),onError:u}){const d=D.useId(),[p]=D.useState(()=>B9(d)||`ggui-rcr-${++V9}`),[g,h]=D.useState(null),[y,v]=D.useState(null),[j,k]=D.useState(!0);D.useEffect(()=>{if(!e||e.trim().length===0){h(null),k(!1);return}let E=!1;k(!0),v(null),h(null);async function z(){try{let w=e;if(e.startsWith("https://")){const te=await fetch(e);if(!te.ok)throw new Error(`Failed to fetch component code: ${te.status}`);w=await te.text()}const $=Ck(w),N=globalThis;let R={};try{R=await zx(()=>import("./index-CjzC-uU0.js").then(te=>te.i),[])}catch{}N.__ggui__={react:xc,reactDom:R,primitives:Af,components:Lf,compositions:Bf,interact:Hf,wire:jw},N.__REACT=xc,N.__GGUI_PRIMITIVES=Af,N.__GGUI_COMPONENTS=Lf,N.__GGUI_COMPOSITIONS=Bf,N.__GGUI_INTERACT=Hf;const _=I9($),S=U9(_,{mode:"data-url"}),C=await L9(S);if(E)return;const U=C.default??Object.values(C).find(te=>typeof te=="function");if(!U)throw new Error("Module does not export a default component");h(()=>U),v(null)}catch(w){if(E)return;const $=w instanceof Error?w:new Error(String(w));v($),h(null),u==null||u($)}finally{E||k(!1)}}return z(),()=>{E=!0}},[e]);const x=o?pp(o,p):p9(p);return!e||e.trim().length===0?i.jsx("div",{children:c}):j?i.jsx("div",{children:c}):y?i.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:[i.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:"!"}),i.jsx("div",{style:{fontSize:14,fontWeight:600,color:"rgba(255,255,255,0.8)"},children:"Failed to load component"}),i.jsx("div",{style:{fontSize:12,color:"rgba(255,255,255,0.4)",maxWidth:280,lineHeight:1.4},children:y.message})]}):g?i.jsxs("div",{className:p,children:[i.jsxs("style",{children:[x,l??""]}),i.jsx(P9,{onError:u,children:i.jsx(g,{...n})},e.length)]}):i.jsx("div",{children:c})}function G9(){return i.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:80},children:i.jsx(Fa,{})})}function F9({suspended:e=!1,fallback:n}={}){return e?null:i.jsx(i.Fragment,{children:n??i.jsx(G9,{})})}var Y9="var(--ggui-font-family-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)",K9={display:"inline-flex",alignItems:"center",gap:4,fontFamily:Y9,fontSize:12,lineHeight:1.2,color:"var(--ggui-color-neutral-500, #6b7280)"},hc={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"},J9={appearance:"none",background:"transparent",border:"none",padding:"2px 4px",fontFamily:"inherit",fontSize:"inherit",color:"var(--ggui-color-neutral-400, #9ca3af)",cursor:"pointer"},X9={display:"inline-flex",alignItems:"center",gap:4,margin:0},Q9={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 W9({onUiFeedback:e,sessionId:n,toolName:o}){const[l,c]=D.useState("idle"),[u,d]=D.useState(""),p=D.useCallback((h,y)=>{if(!e)return;const v=y==null?void 0:y.trim();e({verdict:h,...v!==void 0&&v.length>0?{comment:v}:{},...n!==void 0?{sessionId:n}:{},...o!==void 0?{toolName:o}:{}}),c("sent")},[e,n,o]),g=D.useCallback(h=>{h.preventDefault(),p("other",u)},[p,u]);return!e||l==="dismissed"?null:i.jsxs("div",{"data-ggui-ui-feedback":!0,role:"group","aria-label":"Share feedback on this UI",style:K9,children:[l==="sent"?i.jsx("span",{"data-ggui-ui-feedback-thanks":!0,children:"Thanks for the feedback"}):l==="comment"?i.jsxs("form",{onSubmit:g,style:X9,"data-ggui-ui-feedback-comment-form":!0,children:[i.jsx("input",{type:"text",value:u,onChange:h=>d(h.target.value),placeholder:"What happened?","aria-label":"Feedback comment","data-ggui-ui-feedback-comment":!0,style:Q9,autoFocus:!0}),i.jsx("button",{type:"submit",style:hc,"data-ggui-ui-feedback-send":!0,children:"Send"})]}):i.jsxs(i.Fragment,{children:[i.jsx("button",{type:"button",style:hc,"data-ggui-ui-feedback-verdict":"love",onClick:()=>p("love"),children:"Love"}),i.jsx("button",{type:"button",style:hc,"data-ggui-ui-feedback-verdict":"dislike",onClick:()=>p("dislike"),children:"Dislike"}),i.jsx("button",{type:"button",style:hc,"data-ggui-ui-feedback-verdict":"other",onClick:()=>c("comment"),children:"Other…"})]}),i.jsx("button",{type:"button",style:J9,"aria-label":"Dismiss feedback","data-ggui-ui-feedback-dismiss":!0,onClick:()=>c("dismissed"),children:"×"})]})}function eN({render:e,fallback:n,onError:o,cssOverrides:l,themeId:c,onUiFeedback:u,feedbackSessionId:d,feedbackToolName:p}){return!e.componentCode||e.componentCode.length===0?i.jsx(Ev,{children:i.jsx(F9,{fallback:n})}):i.jsxs(Ev,{children:[i.jsx(Z9,{code:e.componentCode,props:e.props,cssOverrides:l,themeId:c,onError:o,fallback:n}),u?i.jsx(W9,{onUiFeedback:u,...d!==void 0?{sessionId:d}:{},...p!==void 0?{toolName:p}:{}}):null]})}function Ev({children:e}){return aN()?i.jsx(i.Fragment,{children:e}):i.jsx(Z1,{config:tN,children:e})}var tN={app:{appId:"preview",appName:"preview"},render:{sessionId:"preview",isConnected:!1},auth:{isAuthenticated:!1},dispatch:()=>{},subscribe:()=>()=>{}};function aN(){try{return Gr()}catch{return null}}new TextDecoder;function Me({tone:e,children:n,dot:o=!0}){return i.jsxs("span",{className:`ggui-status ggui-status--${e}`,children:[o?i.jsx("span",{className:"ggui-status__dot","aria-hidden":!0}):null,n]})}function nN({blueprintId:e}){const[n,o]=D.useState({kind:"loading"});return D.useEffect(()=>{const l=new AbortController;return(async()=>{try{const c=await fetch(`/ggui/console/blueprint/${encodeURIComponent(e)}`,{signal:l.signal,headers:{accept:"application/json"}});if(c.status===404){o({kind:"not-found"});return}if(!c.ok){o({kind:"error",message:`server returned ${c.status}`});return}const u=await c.json();o({kind:"ready",blueprint:u})}catch(c){if(l.signal.aborted)return;o({kind:"error",message:String(c)})}})(),()=>l.abort()},[e]),i.jsxs("section",{className:"ggui-section",children:[i.jsx(ot,{num:"01 / blueprint",title:"Manifest-registered surface.",mute:i.jsx(i.Fragment,{children:i.jsxs("code",{className:"ggui-code",children:["/preview/",e]})}),intro:i.jsxs(i.Fragment,{children:["Reads the bundle via"," ",i.jsx("code",{className:"ggui-code",children:"LocalUiRegistry"}),". Same bytes an agent would get from"," ",i.jsx("code",{className:"ggui-code",children:"ggui_render_blueprint"}),"."]})}),n.kind==="loading"?i.jsx(Cv,{title:"loading",num:"BPR / 01",tone:"draft",children:"Loading blueprint…"}):n.kind==="not-found"?i.jsx(oN,{blueprintId:e}):n.kind==="error"?i.jsxs(Cv,{title:"error",num:"ERR / 01",tone:"signal",children:["Couldn't load blueprint — ",n.message,"."]}):i.jsx(rN,{blueprint:n.blueprint})]})}function rN({blueprint:e}){return i.jsxs("section",{"data-ggui-session-entry":"component","data-ggui-code-ready":"true","data-ggui-blueprint-id":e.blueprintId,className:"ggui-pane",children:[i.jsxs("div",{className:"ggui-pane__head",children:[i.jsxs("div",{className:"ggui-pane__traffic","aria-hidden":!0,children:[i.jsx("span",{}),i.jsx("span",{}),i.jsx("span",{})]}),i.jsx("span",{className:"ggui-pane__title",children:e.blueprintName}),i.jsx("span",{className:"ggui-pane__meta",children:e.contentType}),i.jsx(iN,{blueprintId:e.blueprintId})]}),i.jsx("div",{className:"ggui-pane__body",children:i.jsx(eN,{render:{componentCode:e.code},fallback:i.jsx("div",{"data-ggui-preview-state":"waiting",className:"ggui-muted",style:{padding:"16px 0"},children:"Loading component…"})})})]})}function iN({blueprintId:e}){const[n,o]=D.useState({kind:"idle"}),l=async()=>{o({kind:"pending"});try{const c=await fetch(`/ggui/console/blueprint/${encodeURIComponent(e)}/try`,{method:"POST",headers:{accept:"application/json"}});if(!c.ok){const u=await c.json().catch(()=>({}));o({kind:"error",message:u.message??`server returned ${c.status}`});return}o({kind:"ok"})}catch(c){o({kind:"error",message:String(c)})}};return i.jsxs("span",{className:"ggui-pane__actions",style:{marginLeft:"auto"},children:[n.kind==="error"?i.jsx("span",{className:"ggui-muted","data-ggui-try-live":"error",title:n.message,style:{marginRight:"8px",fontSize:"0.75rem"},children:"try-live failed"}):null,n.kind==="ok"?i.jsx("span",{className:"ggui-muted","data-ggui-try-live":"ok",style:{marginRight:"8px",fontSize:"0.75rem"},children:"try-live ok"}):null,i.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost","data-ggui-try-live":n.kind==="pending"?"pending":"idle","data-ggui-blueprint-id":e,disabled:n.kind==="pending",onClick:()=>{l()},children:n.kind==="pending"?"trying…":"Try live →"})]})}function oN({blueprintId:e}){return i.jsxs("div",{className:"ggui-card",children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:"not found"}),i.jsx("span",{className:"ggui-card__num",children:"ERR / 01"})]}),i.jsxs("div",{className:"ggui-card__body",children:[i.jsx("h2",{className:"ggui-h2",children:"Blueprint not found"}),i.jsxs("p",{className:"ggui-body",children:["No blueprint registered with id"," ",i.jsx("code",{className:"ggui-code",children:e}),". Check"," ",i.jsx("code",{className:"ggui-code",children:"ggui.json#blueprints.include"})," ","and the blueprint's"," ",i.jsx("code",{className:"ggui-code",children:"ggui.ui.json#id"}),"."]}),i.jsx("div",{children:i.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:()=>Ve("/"),children:"back to landing"})})]})]})}function Cv({title:e,num:n,tone:o,children:l}){return i.jsxs("div",{className:"ggui-card",children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:e}),i.jsx("span",{className:"ggui-card__num",children:n})]}),i.jsxs("div",{className:"ggui-card__body",children:[i.jsx("p",{className:"ggui-body",children:i.jsx(Me,{tone:o,children:e})}),i.jsx("p",{className:"ggui-muted",children:l})]})]})}function lN(){const[e,n]=D.useState({kind:"loading"}),[o,l]=D.useState({kind:"loading"}),[c,u]=D.useState(""),[d,p]=D.useState(!1);D.useEffect(()=>{const x=new AbortController;return(async()=>{try{const E=await fetch("/ggui/console/registry",{signal:x.signal,headers:{accept:"application/json"}});if(!E.ok){n({kind:"error",message:`server returned ${E.status}`});return}const z=await E.json();n({kind:"ready",data:z})}catch(E){if(x.signal.aborted)return;n({kind:"error",message:String(E)})}})(),()=>x.abort()},[]);const g=D.useCallback(async x=>{l({kind:"loading"});try{const E=await fetch("/ggui/console/blueprints/cached",{signal:x,headers:{accept:"application/json"}});if(E.status===501){const w=await E.json().catch(()=>({}));l({kind:"unsupported",message:w.message??"The configured vector store does not support enumeration."});return}if(!E.ok){l({kind:"error",message:`server returned ${E.status}`});return}const z=await E.json();l({kind:"ready",data:z})}catch(E){if(x!=null&&x.aborted)return;l({kind:"error",message:String(E)})}},[]);D.useEffect(()=>{const x=new AbortController;return g(x.signal),()=>x.abort()},[g]);const h=D.useCallback(async x=>{try{await fetch(`/ggui/console/blueprints/cached/${encodeURIComponent(x)}`,{method:"DELETE"})}catch(E){l({kind:"error",message:String(E)});return}await g()},[g]),y=D.useCallback(async()=>{try{await fetch("/ggui/console/blueprints/cached/clear",{method:"POST"})}catch(x){l({kind:"error",message:String(x)});return}await g()},[g]),v=c.trim().toLowerCase(),j=D.useMemo(()=>e.kind!=="ready"?null:v.length===0?e.data:{blueprints:e.data.blueprints.filter(x=>[x.id,x.name,x.description??"",x.category??""].join(" ").toLowerCase().includes(v)),primitives:e.data.primitives.filter(x=>[x.name,x.catalog,x.source].join(" ").toLowerCase().includes(v))},[e,v]),k=D.useMemo(()=>o.kind!=="ready"?null:v.length===0?o.data.entries:o.data.entries.filter(x=>[x.id,x.cachedIntent].join(" ").toLowerCase().includes(v)),[o,v]);return i.jsxs("section",{className:"ggui-section",children:[i.jsx(ot,{num:"01 / blueprints",title:"What can this server produce without generating?",mute:"Declared and cached.",intro:i.jsxs(i.Fragment,{children:["Two answers on one screen. ",i.jsx("strong",{children:"Declared"})," blueprints from ",i.jsx("code",{className:"ggui-code",children:"ggui.json#blueprints.include"}),";"," ",i.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"||o.kind==="loading"?i.jsx(Mv,{title:"loading",num:"REG / 01",tone:"draft",children:"Loading…"}):e.kind==="error"?i.jsxs(Mv,{title:"error",num:"ERR / 01",tone:"signal",children:["Couldn't load registry — ",e.message,"."]}):i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"ggui-form",style:{marginBottom:20},children:[i.jsx("label",{className:"ggui-label",htmlFor:"ggui-registry-filter",children:"filter"}),i.jsx("div",{className:"ggui-field",children:i.jsx("input",{id:"ggui-registry-filter",name:"filter","aria-label":"filter registry entries",placeholder:"substring match over id, name, description, intent…",value:c,onChange:x=>u(x.target.value),autoCapitalize:"off",autoCorrect:"off",spellCheck:!1})})]}),i.jsxs("div",{className:"ggui-registry-grid",children:[i.jsx(sN,{all:e.data.blueprints,shown:(j==null?void 0:j.blueprints)??e.data.blueprints,filterActive:v.length>0}),i.jsx(cN,{state:o,shown:k,filterActive:v.length>0,onInvalidate:h,onClearAll:y})]}),i.jsx(uN,{all:e.data.primitives,shown:(j==null?void 0:j.primitives)??e.data.primitives,filterActive:v.length>0,expanded:d,onToggle:()=>p(x=>!x)})]})]})}function sN({all:e,shown:n,filterActive:o}){return i.jsxs("div",{"data-ggui-registry-list":"blueprints",className:"ggui-stack","aria-label":"declared blueprints",children:[i.jsxs("div",{className:"ggui-stack__head",children:[i.jsx("span",{className:"ggui-stack__num",children:"BPR"}),i.jsx("span",{className:"ggui-stack__label",children:"declared"}),i.jsxs("span",{className:"ggui-stack__count",children:[n.length,o&&n.length!==e.length?` / ${e.length}`:""]})]}),e.length===0?i.jsx(dN,{}):n.length===0?i.jsx("p",{className:"ggui-muted",style:{margin:0,padding:12},children:"No declared blueprints match the filter."}):i.jsx("ul",{className:"ggui-stack__list",children:n.map((l,c)=>i.jsxs("li",{"data-ggui-registry-item":"blueprint","data-ggui-registry-id":l.id,className:"ggui-stack__entry",children:[i.jsxs("div",{className:"ggui-stack__entry-head",children:[i.jsx("span",{className:"ggui-stack__entry-num",children:`BPR / ${String(c+1).padStart(2,"0")}`}),i.jsx("span",{className:"ggui-stack__entry-title",children:l.name}),l.category?i.jsx(Me,{tone:"ink",children:l.category}):null]}),i.jsx("div",{className:"ggui-stack__entry-meta",children:i.jsx("code",{className:"ggui-code",children:l.id})}),l.description?i.jsx("p",{className:"ggui-body",style:{margin:"8px 0 0"},children:l.description}):null,i.jsx("div",{style:{marginTop:12},children:i.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:()=>Ve(`/preview/${encodeURIComponent(l.id)}`),children:"preview →"})})]},l.id))})]})}function cN({state:e,shown:n,filterActive:o,onInvalidate:l,onClearAll:c}){const u=e.kind==="ready"?e.data.entries:[],d=n??u;return i.jsxs("div",{"data-ggui-cached-list":!0,className:"ggui-stack","aria-label":"cached blueprints",children:[i.jsxs("div",{className:"ggui-stack__head",children:[i.jsx("span",{className:"ggui-stack__num",children:"CCH"}),i.jsx("span",{className:"ggui-stack__label",children:"cached"}),i.jsx("span",{className:"ggui-stack__count",children:e.kind==="ready"?`${d.length}${o&&d.length!==u.length?` / ${u.length}`:""}`:"—"}),e.kind==="ready"&&u.length>0?i.jsx("button",{type:"button","data-ggui-cached-clear-all":!0,className:"ggui-btn ggui-btn--ghost",style:{marginLeft:"auto"},onClick:()=>{c()},children:"clear all"}):null]}),e.kind==="unsupported"?i.jsx(pN,{message:e.message}):e.kind==="error"?i.jsxs("p",{className:"ggui-muted",style:{margin:0,padding:12},children:["Couldn't load cache — ",e.message,"."]}):u.length===0?i.jsx(fN,{}):d.length===0?i.jsx("p",{className:"ggui-muted",style:{margin:0,padding:12},children:"No cached entries match the filter."}):i.jsx("ul",{className:"ggui-stack__list",children:d.map((p,g)=>i.jsxs("li",{"data-ggui-cached-item":!0,"data-ggui-cached-id":p.id,className:"ggui-stack__entry",children:[i.jsxs("div",{className:"ggui-stack__entry-head",children:[i.jsx("span",{className:"ggui-stack__entry-num",children:`CCH / ${String(g+1).padStart(2,"0")}`}),i.jsx("span",{className:"ggui-stack__entry-title",children:p.cachedIntent}),typeof p.hitCount=="number"?i.jsxs(Me,{tone:"ink",children:["hits ",p.hitCount]}):null]}),i.jsxs("div",{className:"ggui-stack__entry-meta",children:[i.jsx("code",{className:"ggui-code",children:p.id}),i.jsxs("span",{style:{marginLeft:12},children:["cached ",Tv(p.cachedAt)]}),p.lastHitAt?i.jsxs("span",{style:{marginLeft:12},children:["last hit ",Tv(p.lastHitAt)]}):null]}),i.jsx("div",{style:{marginTop:12},children:i.jsx("button",{type:"button","data-ggui-cached-invalidate":!0,className:"ggui-btn ggui-btn--ghost",onClick:()=>{l(p.id)},children:"invalidate ✕"})})]},p.id))})]})}function Tv(e){if(!e)return"—";try{const n=new Date(e);return Number.isNaN(n.getTime())?e:n.toISOString().replace("T"," ").replace(/\.\d+Z$/,"Z")}catch{return e}}function uN({all:e,shown:n,filterActive:o,expanded:l,onToggle:c}){return i.jsxs("div",{"data-ggui-registry-list":"primitives",className:"ggui-card","aria-label":"primitives",style:{marginTop:24},children:[i.jsxs("button",{type:"button","data-ggui-primitives-toggle":!0,onClick:c,className:"ggui-card__head",style:{width:"100%",background:"transparent",border:"none",textAlign:"left",cursor:"pointer",font:"inherit",color:"inherit"},"aria-expanded":l,children:[i.jsxs("span",{className:"ggui-card__title",children:[l?"▾":"▸"," primitives"]}),i.jsxs("span",{className:"ggui-card__num",children:[n.length,o&&n.length!==e.length?` / ${e.length}`:""," available — fyi"]})]}),l?e.length===0?i.jsx(gN,{}):n.length===0?i.jsx("p",{className:"ggui-muted",style:{margin:0,padding:12},children:"No primitives match the filter."}):i.jsx("ul",{className:"ggui-card__body",style:{listStyle:"none",margin:0,padding:"12px 16px",display:"flex",flexWrap:"wrap",gap:"6px 12px"},children:n.map(u=>i.jsxs("li",{"data-ggui-registry-item":"primitive","data-ggui-registry-name":u.name,style:{display:"inline-flex",alignItems:"center",gap:6},children:[i.jsx("code",{className:"ggui-code",children:u.name}),i.jsx(Me,{tone:u.source==="package"?"ink":"draft",children:u.source})]},`${u.catalog}::${u.name}`))}):null]})}function dN(){return i.jsxs("div",{className:"ggui-card__body",style:{padding:"16px 12px"},children:[i.jsx("p",{className:"ggui-body",style:{margin:0},children:"No declared blueprints."}),i.jsxs("p",{className:"ggui-muted",style:{margin:"8px 0 0"},children:["Add include globs to"," ",i.jsx("code",{className:"ggui-code",children:"ggui.json#blueprints.include"})," and colocate each UI with a"," ",i.jsx("code",{className:"ggui-code",children:"ggui.ui.json"}),"."]})]})}function fN(){return i.jsxs("div",{className:"ggui-card__body",style:{padding:"16px 12px"},children:[i.jsx("p",{className:"ggui-body",style:{margin:0},children:"No cached generations yet."}),i.jsxs("p",{className:"ggui-muted",style:{margin:"8px 0 0"},children:["Generate a UI from ",i.jsx("code",{className:"ggui-code",children:"/"})," (the playground) and the result will land here for future cache hits."]})]})}function pN({message:e}){return i.jsxs("div",{className:"ggui-card__body",style:{padding:"16px 12px"},children:[i.jsxs("p",{className:"ggui-body",style:{margin:0},children:[i.jsx(Me,{tone:"signal",children:"unsupported"})," Vector store doesn't support enumeration."]}),i.jsx("p",{className:"ggui-muted",style:{margin:"8px 0 0"},children:e})]})}function gN(){return i.jsxs("div",{className:"ggui-card__body",style:{padding:"16px 12px"},children:[i.jsx("p",{className:"ggui-body",style:{margin:0},children:"No primitives declared."}),i.jsxs("p",{className:"ggui-muted",style:{margin:"8px 0 0"},children:["Declare packages or local catalogs in"," ",i.jsx("code",{className:"ggui-code",children:"ggui.json#primitives"}),"."]})]})}function Mv({title:e,num:n,tone:o,children:l}){return i.jsxs("div",{className:"ggui-card",children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:e}),i.jsx("span",{className:"ggui-card__num",children:n})]}),i.jsxs("div",{className:"ggui-card__body",children:[i.jsx("p",{className:"ggui-body",children:i.jsx(Me,{tone:o,children:e})}),i.jsx("p",{className:"ggui-muted",children:l})]})]})}function d$({blueprint:e,height:n,title:o}){var d;const l=typeof e.codeHash=="string",c=o??e.variance.persona??`variant ${e.blueprintId.slice(0,8)}`;if(!l)return i.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:n??320,display:"flex",alignItems:"center",justifyContent:"center"},children:i.jsxs("div",{style:{textAlign:"center"},children:[i.jsx("p",{className:"ggui-body",style:{margin:0},children:i.jsx(Me,{tone:"draft",children:"pending"})}),i.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"," ",i.jsx("code",{className:"ggui-code",children:e.blueprintId}),"."]})]})});const u=`/preview/${encodeURIComponent(e.blueprintId)}`;return i.jsxs("div",{"data-ggui-variant-preview":!0,"data-ggui-variant-preview-id":e.blueprintId,"data-ggui-variant-preview-state":"ready",className:"ggui-pane",children:[i.jsxs("div",{className:"ggui-pane__head",children:[i.jsxs("div",{className:"ggui-pane__traffic","aria-hidden":!0,children:[i.jsx("span",{}),i.jsx("span",{}),i.jsx("span",{})]}),i.jsx("span",{className:"ggui-pane__title",children:c}),i.jsx("span",{className:"ggui-pane__meta",children:i.jsxs("code",{className:"ggui-code",children:[(d=e.codeHash)==null?void 0:d.slice(0,12),"…"]})})]}),i.jsx("div",{className:"ggui-pane__body",style:{padding:0},children:i.jsx("iframe",{src:u,title:`Preview of ${c}`,sandbox:"allow-scripts allow-same-origin",style:{width:"100%",height:n??320,border:"none",display:"block"}})})]})}function mN({blueprints:e,height:n}){return i.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(o=>i.jsx(d$,{blueprint:o,height:n,title:o.variance.persona??o.blueprintId.slice(0,12)},o.blueprintId))})}const f$=["ui-gen-default-haiku-4-5","ui-gen-advanced-opus-4-7"],mp=.8,hN={persona:"",generator:"",draftsOnly:!1};function yN({filters:e,onChange:n,generatorSlugs:o}){const l=o??f$,c=p=>{n({...e,persona:p.target.value})},u=p=>{n({...e,generator:p.target.value})},d=p=>{n({...e,draftsOnly:p.target.checked})};return i.jsxs("form",{"data-ggui-variants-filter-bar":!0,className:"ggui-form",onSubmit:p=>p.preventDefault(),style:{display:"flex",flexWrap:"wrap",gap:16,alignItems:"flex-end",marginBottom:20},children:[i.jsxs("div",{className:"ggui-field",style:{flex:1,minWidth:200},children:[i.jsx("label",{className:"ggui-label",htmlFor:"ggui-variants-filter-persona",children:"persona"}),i.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:c,autoCapitalize:"off",autoCorrect:"off",spellCheck:!1})]}),i.jsxs("div",{className:"ggui-field",style:{minWidth:220},children:[i.jsx("label",{className:"ggui-label",htmlFor:"ggui-variants-filter-generator",children:"generator"}),i.jsxs("select",{id:"ggui-variants-filter-generator","data-ggui-variants-filter-generator":!0,"aria-label":"filter by generator",value:e.generator,onChange:u,children:[i.jsx("option",{value:"",children:"any"}),l.map(p=>i.jsx("option",{value:p,children:p},p))]})]}),i.jsxs("label",{className:"ggui-field",htmlFor:"ggui-variants-filter-drafts-only",style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer"},children:[i.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:d}),i.jsxs("span",{className:"ggui-label",style:{margin:0},children:["drafts only (score < ",mp.toFixed(2),")"]})]})]})}function vN(e,n){var l;const o=n.persona.trim().toLowerCase();return!(o.length>0&&!(((l=e.variance.persona)==null?void 0:l.toLowerCase())??"").includes(o)||n.generator.length>0&&(e.source.kind!=="llm"||e.source.generator!==n.generator)||n.draftsOnly&&(e.validatorScore===void 0||e.validatorScore>=mp))}function $N(e){return e>=mp?"live":e>=.5?"draft":"signal"}function bN(e){return e.kind==="llm"?e.generator:e.kind}function p$({blueprint:e,index:n,onPreview:o,onSetDefault:l,onDelete:c,compareSelected:u,onCompareToggle:d}){const p=e.isOperatorDefault===!0,g=e.variance.persona,h=e.validatorScore;return i.jsxs("li",{"data-ggui-variant-card":!0,"data-ggui-variant-id":e.blueprintId,"data-ggui-variant-default":p?"true":"false","data-ggui-variant-compare-selected":u?"true":"false",className:"ggui-stack__entry",style:u?{outline:"2px solid var(--ggui-ink, #292929)"}:void 0,children:[i.jsxs("div",{className:"ggui-stack__entry-head",children:[i.jsx("span",{className:"ggui-stack__entry-num",children:`VAR / ${String(n+1).padStart(2,"0")}`}),i.jsxs("span",{className:"ggui-stack__entry-title",children:[p?i.jsx("span",{"aria-label":"operator default",children:"★ "}):null,g&&g.length>0?g:"(no persona)"]}),g?i.jsxs(Me,{tone:"ink",children:["persona: ",g]}):null,i.jsx(Me,{tone:"ink",children:bN(e.source)}),typeof h=="number"?i.jsxs(Me,{tone:$N(h),children:["score ",h.toFixed(2)]}):null,i.jsxs(Me,{tone:e.createdBy==="operator"?"live":"draft",children:["by ",e.createdBy]})]}),i.jsxs("div",{className:"ggui-stack__entry-meta",children:[i.jsx("code",{className:"ggui-code",children:e.blueprintId}),i.jsxs("span",{style:{marginLeft:12},children:["created ",xN(e.createdAt)]}),e.codeHash?i.jsxs("span",{style:{marginLeft:12},children:["hash ",i.jsx("code",{className:"ggui-code",children:_N(e.codeHash)})]}):i.jsx("span",{style:{marginLeft:12},children:i.jsx(Me,{tone:"signal",children:"no code"})})]}),e.variance.seedPrompt?i.jsxs("p",{className:"ggui-muted",style:{margin:"8px 0 0",fontStyle:"italic"},children:["“",e.variance.seedPrompt,"”"]}):null,i.jsxs("div",{style:{display:"flex",gap:8,marginTop:12,flexWrap:"wrap"},children:[i.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost","data-ggui-variant-action":"preview",onClick:()=>o(e.blueprintId),children:"preview →"}),i.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost","data-ggui-variant-action":"set-default",disabled:p,onClick:()=>l(e.blueprintId),title:p?"Already the operator default for this contract":"Pin as the operator default for this contract",children:p?"★ default":"set as default"}),d?i.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost","data-ggui-variant-action":"compare-toggle",onClick:()=>d(e.blueprintId),children:u?"✓ in compare":"add to compare"}):null,i.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost","data-ggui-variant-action":"delete",onClick:()=>c(e.blueprintId),children:"delete ✕"})]})]})}function xN(e){if(!e)return"—";try{const n=new Date(e);return Number.isNaN(n.getTime())?e:n.toISOString().replace("T"," ").replace(/\.\d+Z$/,"Z")}catch{return e}}function _N(e){return e.length<=12?e:`${e.slice(0,8)}…${e.slice(-4)}`}class _a extends Error{constructor(o,l,c){super(o);pn(this,"code");pn(this,"status");this.name="OpsCallError",this.code=l,c!==void 0&&(this.status=c)}}let jN=1;async function SN(e){if((e.headers.get("content-type")??"").includes("text/event-stream")){const o=await e.text(),l=/^data:\s*(.+)$/m.exec(o);if(!l||!l[1])throw new _a("Malformed SSE response from /control — no data line",-32700,e.status);return JSON.parse(l[1])}return await e.json()}async function Vc(e,n,o){var y,v,j,k;const l=jN++,c=JSON.stringify({jsonrpc:"2.0",id:l,method:"tools/call",params:{name:e,arguments:n}}),u={method:"POST",headers:{"content-type":"application/json",accept:"application/json, text/event-stream"},body:c};o!==void 0&&(u.signal=o);const d=await fetch("/control",u);if(!d.ok&&d.status!==200){const x=await d.text().catch(()=>"");throw new _a(`/control returned HTTP ${d.status}${x?` — ${x}`:""}`,-32e3,d.status)}const p=await SN(d);if("error"in p)throw new _a(p.error.message,p.error.code);const g=p.result;if(g.isError){const x=((v=(y=g.content)==null?void 0:y[0])==null?void 0:v.text)??"tool reported error";throw new _a(x,-32e3)}if(g.structuredContent!==void 0)return g.structuredContent;const h=(k=(j=g.content)==null?void 0:j[0])==null?void 0:k.text;if(typeof h=="string"&&h.length>0)return JSON.parse(h);throw new _a(`tool ${e} returned empty result`,-32e3)}function wN(e,n){return Vc("ggui_ops_generate_blueprint",{...e,confirm:!0},n)}function hp(e,n){return Vc("ggui_ops_list_blueprints",e,n)}function g$(e,n){return Vc("ggui_ops_update_blueprint",{...e,confirm:!0},n)}function m$(e,n){return Vc("ggui_ops_delete_blueprint",{...e,confirm:!0},n)}function kN({contractHash:e}){var E;const[n,o]=D.useState({kind:"loading"}),[l,c]=D.useState([]),[u,d]=D.useState(!1),p=D.useCallback(async z=>{o({kind:"loading"});try{const w=await hp({contractHash:e},z);o({kind:"ready",blueprints:w.blueprints})}catch(w){if(z!=null&&z.aborted)return;const $=w instanceof _a||w instanceof Error?w.message:String(w);o({kind:"error",message:$})}},[e]);D.useEffect(()=>{const z=new AbortController;return p(z.signal),()=>z.abort()},[p]);const g=D.useMemo(()=>n.kind!=="ready"?[]:[...n.blueprints].sort((z,w)=>{const $=z.isOperatorDefault===!0?1:0,N=w.isOperatorDefault===!0?1:0;if($!==N)return N-$;const R=z.validatorScore??-1,_=w.validatorScore??-1;return R!==_?_-R:w.createdAt.localeCompare(z.createdAt)}),[n]),h=(E=g[0])==null?void 0:E.contract,y=D.useMemo(()=>u?g.filter(z=>l.includes(z.blueprintId)):[],[g,l,u]),v=D.useCallback(z=>{Ve(`/preview/${encodeURIComponent(z)}`)},[]),j=D.useCallback(async z=>{try{await g$({blueprintId:z,isOperatorDefault:!0}),await p()}catch(w){const $=w instanceof _a||w instanceof Error?w.message:String(w);o({kind:"error",message:$})}},[p]),k=D.useCallback(async z=>{try{await m$({blueprintId:z}),c(w=>w.filter($=>$!==z)),await p()}catch(w){const $=w instanceof _a||w instanceof Error?w.message:String(w);o({kind:"error",message:$})}},[p]),x=D.useCallback(z=>{c(w=>w.includes(z)?w.filter($=>$!==z):[...w,z])},[]);return i.jsxs("section",{className:"ggui-section","data-ggui-variant-detail":!0,"data-ggui-variant-detail-hash":e,children:[i.jsx(ot,{num:"01 / contract",title:"One contract — many variants.",mute:`hash ${e.slice(0,16)}…`,intro:i.jsxs(i.Fragment,{children:["Every variant the server has for this contract, grouped under the canonical"," ",i.jsx("code",{className:"ggui-code",children:"contractHash"}),'. Pick two with the "add to compare" toggle, hit Compare selected, and read aesthetics side-by-side.']})}),i.jsxs("div",{style:{marginBottom:16},children:[i.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:()=>Ve("/admin/variants"),children:"← all variants"})," ",i.jsx("button",{type:"button",className:"ggui-btn","data-ggui-variant-detail-generate":!0,onClick:()=>Ve(`/admin/variants/${encodeURIComponent(e)}/generate`),children:"generate new variant +"})]}),n.kind==="error"?i.jsxs("div",{className:"ggui-card",style:{marginBottom:20},children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:"error"}),i.jsx("span",{className:"ggui-card__num",children:"ERR / 01"})]}),i.jsxs("div",{className:"ggui-card__body",children:[i.jsxs("p",{className:"ggui-body",children:[i.jsx(Me,{tone:"signal",children:"error"})," Couldn't load variants — ",n.message,"."]}),i.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:()=>{p()},children:"retry →"})]})]}):null,h?i.jsxs("div",{className:"ggui-card",style:{marginBottom:20},children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:"contract"}),i.jsx("span",{className:"ggui-card__num",children:"CTR / 01"})]}),i.jsx("div",{className:"ggui-card__body",children:i.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(h,null,2)})})]}):null,n.kind==="loading"?i.jsx("p",{className:"ggui-body",children:"Loading variants…"}):g.length===0?i.jsxs("div",{className:"ggui-card",children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:"empty"}),i.jsx("span",{className:"ggui-card__num",children:"VAR / 00"})]}),i.jsxs("div",{className:"ggui-card__body",children:[i.jsx("p",{className:"ggui-body",children:"No variants registered for this contract."}),i.jsx("p",{className:"ggui-muted",children:'Click "generate new variant" above to author the first one.'})]})]}):i.jsxs(i.Fragment,{children:[i.jsxs("div",{"data-ggui-variant-compare-controls":!0,style:{display:"flex",gap:12,alignItems:"center",marginBottom:16},children:[i.jsxs(Me,{tone:"ink",children:[l.length," selected"]}),i.jsx("button",{type:"button",className:"ggui-btn","data-ggui-variant-compare-run":!0,disabled:l.length<2,onClick:()=>d(!0),children:"compare selected →"}),u?i.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost","data-ggui-variant-compare-clear":!0,onClick:()=>{d(!1),c([])},children:"exit compare"}):null]}),u&&y.length>=2?i.jsx("div",{"data-ggui-variant-compare-set":y.length,style:{marginBottom:24},children:i.jsx(mN,{blueprints:y,height:420})}):i.jsx("div",{className:"ggui-stack",style:{marginBottom:24},"aria-label":"variants and preview",children:g.map((z,w)=>i.jsxs("article",{"data-ggui-variant-detail-row":!0,"data-ggui-variant-detail-row-id":z.blueprintId,style:{display:"grid",gridTemplateColumns:"minmax(0, 1fr) minmax(0, 1fr)",gap:16,padding:12,borderBottom:"1px solid var(--ggui-line2, #d6d4cb)"},children:[i.jsx("ul",{className:"ggui-stack__list",style:{listStyle:"none",margin:0,padding:0},children:i.jsx(p$,{blueprint:z,index:w,onPreview:v,onSetDefault:$=>{j($)},onDelete:$=>{k($)},compareSelected:l.includes(z.blueprintId),onCompareToggle:x})}),i.jsx(d$,{blueprint:z,height:240})]},z.blueprintId))})]})]})}function NN({contract:e,contractHash:n,onSubmit:o,onCancel:l,generatorSlugs:c}){const[u,d]=D.useState(""),[p,g]=D.useState(""),[h,y]=D.useState(""),[v,j]=D.useState(""),[k,x]=D.useState(!1),[E,z]=D.useState({kind:"idle"}),w=async N=>{N.preventDefault();let R;if(v.trim().length>0)try{const S=JSON.parse(v);if(typeof S!="object"||S===null||Array.isArray(S)){z({kind:"error",message:'context must be a JSON object (e.g. {"foo": "bar"})'});return}R=S}catch(S){z({kind:"error",message:`context JSON parse failed — ${S instanceof Error?S.message:String(S)}`});return}z({kind:"pending"});const _={contract:e,...h.length>0?{generator:h}:{},...u.trim().length>0?{persona:u.trim()}:{},...R!==void 0?{context:R}:{},...p.trim().length>0?{seedPrompt:p.trim()}:{},...k?{setAsOperatorDefault:!0}:{}};try{const S=await o(_);"error"in S&&z({kind:"error",message:S.error})}catch(S){z({kind:"error",message:S instanceof Error?S.message:String(S)})}},$=c??f$;return i.jsxs("form",{"data-ggui-variant-generate-form":!0,"data-ggui-variant-generate-state":E.kind,className:"ggui-form",onSubmit:w,children:[i.jsxs(Ef,{title:"contract",num:"GEN / 01",children:[i.jsxs("p",{className:"ggui-muted",style:{margin:"0 0 8px"},children:["Contract hash"," ",i.jsxs("code",{className:"ggui-code",children:[n.slice(0,16),"…"]})," ","— read-only; create variants for the same contract here."]}),i.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)})]}),i.jsxs(Ef,{title:"variance",num:"GEN / 02",children:[i.jsxs("div",{className:"ggui-field",children:[i.jsx("label",{className:"ggui-label",htmlFor:"ggui-gen-persona",children:"persona"}),i.jsx("input",{id:"ggui-gen-persona",name:"persona","data-ggui-variant-generate-persona":!0,placeholder:"e.g. minimalist, data-dense, mobile-first",value:u,onChange:N=>d(N.target.value),autoCapitalize:"off",autoCorrect:"off",spellCheck:!1})]}),i.jsxs("div",{className:"ggui-field",children:[i.jsx("label",{className:"ggui-label",htmlFor:"ggui-gen-seed",children:"seed prompt"}),i.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:p,onChange:N=>g(N.target.value),rows:3})]}),i.jsxs("div",{className:"ggui-field",children:[i.jsx("label",{className:"ggui-label",htmlFor:"ggui-gen-context",children:"context (JSON object, optional)"}),i.jsx("textarea",{id:"ggui-gen-context",name:"context","data-ggui-variant-generate-context":!0,placeholder:'{"locale": "en", "density": "compact"}',value:v,onChange:N=>j(N.target.value),rows:3,spellCheck:!1,style:{fontFamily:"var(--ggui-font-mono, monospace)"}})]})]}),i.jsxs(Ef,{title:"dispatch",num:"GEN / 03",children:[i.jsxs("div",{className:"ggui-field",children:[i.jsx("label",{className:"ggui-label",htmlFor:"ggui-gen-generator",children:"generator"}),i.jsxs("select",{id:"ggui-gen-generator",name:"generator","data-ggui-variant-generate-generator":!0,value:h,onChange:N=>y(N.target.value),children:[i.jsx("option",{value:"",children:"(registry default)"}),$.map(N=>i.jsx("option",{value:N,children:N},N))]})]}),i.jsxs("label",{className:"ggui-field",htmlFor:"ggui-gen-set-default",style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer"},children:[i.jsx("input",{id:"ggui-gen-set-default","data-ggui-variant-generate-set-default":!0,type:"checkbox",checked:k,onChange:N=>x(N.target.checked)}),i.jsx("span",{className:"ggui-label",style:{margin:0},children:"pin as operator default for this contract"})]})]}),E.kind==="error"?i.jsxs("p",{className:"ggui-body",children:[i.jsx(Me,{tone:"signal",children:"error"})," ",E.message]}):null,i.jsxs("div",{style:{display:"flex",gap:12,marginTop:16},children:[i.jsx("button",{type:"submit",className:"ggui-btn","data-ggui-variant-generate-submit":!0,disabled:E.kind==="pending",children:E.kind==="pending"?"generating…":"generate →"}),l?i.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:l,disabled:E.kind==="pending",children:"cancel"}):null]})]})}function Ef({title:e,num:n,children:o}){return i.jsxs("div",{className:"ggui-card",style:{marginBottom:16},children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:e}),i.jsx("span",{className:"ggui-card__num",children:n})]}),i.jsx("div",{className:"ggui-card__body",children:o})]})}function zN({contractHash:e}){const[n,o]=D.useState({kind:"loading"});return D.useEffect(()=>{const l=new AbortController;return(async()=>{try{const c=await hp({contractHash:e},l.signal);if(l.signal.aborted)return;if(c.blueprints.length===0){o({kind:"empty"});return}const u=c.blueprints[0];o({kind:"ready",contract:u.contract,variantCount:c.blueprints.length})}catch(c){if(l.signal.aborted)return;const u=c instanceof _a||c instanceof Error?c.message:String(c);o({kind:"error",message:u})}})(),()=>l.abort()},[e]),i.jsxs("section",{className:"ggui-section",children:[i.jsx(ot,{num:"01 / generate",title:"Author a new variant.",mute:`hash ${e.slice(0,16)}…`,intro:i.jsxs(i.Fragment,{children:["Forks the contract from an existing variant in this group and dispatches it through"," ",i.jsx("code",{className:"ggui-code",children:"ggui_ops_generate_blueprint"})," ","with your persona + context + seed prompt. The new blueprint persists under the same"," ",i.jsx("code",{className:"ggui-code",children:"contractHash"}),"."]})}),i.jsx("div",{style:{marginBottom:16},children:i.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:()=>Ve(`/admin/variants/${encodeURIComponent(e)}`),children:"← contract detail"})}),n.kind==="loading"?i.jsx("p",{className:"ggui-body",children:"Loading contract…"}):n.kind==="error"?i.jsxs("div",{className:"ggui-card",children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:"error"}),i.jsx("span",{className:"ggui-card__num",children:"ERR / 01"})]}),i.jsxs("div",{className:"ggui-card__body",children:[i.jsxs("p",{className:"ggui-body",children:[i.jsx(Me,{tone:"signal",children:"error"})," ","Couldn't load contract — ",n.message,"."]}),i.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:()=>Ve("/admin/variants"),children:"← all variants"})]})]}):n.kind==="empty"?i.jsxs("div",{className:"ggui-card",children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:"empty"}),i.jsx("span",{className:"ggui-card__num",children:"VAR / 00"})]}),i.jsxs("div",{className:"ggui-card__body",children:[i.jsxs("p",{className:"ggui-body",children:["No variant exists for hash"," ",i.jsx("code",{className:"ggui-code",children:e})," yet."]}),i.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."}),i.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:()=>Ve("/admin/variants"),children:"← all variants"})]})]}):i.jsx(NN,{contract:n.contract,contractHash:e,onSubmit:async l=>{try{const c=await wN(l);return Ve(`/preview/${encodeURIComponent(c.blueprintId)}`),{blueprintId:c.blueprintId}}catch(c){return{error:c instanceof _a||c instanceof Error?c.message:String(c)}}},onCancel:()=>Ve(`/admin/variants/${encodeURIComponent(e)}`)})]})}function EN(e){const n=new Map;for(const o of e){const l=n.get(o.contractHash);l?l.push(o):n.set(o.contractHash,[o])}return Array.from(n.entries()).map(([o,l])=>{const c=[...l].sort((p,g)=>{const h=p.isOperatorDefault===!0?1:0,y=g.isOperatorDefault===!0?1:0;if(h!==y)return y-h;const v=p.validatorScore??-1,j=g.validatorScore??-1;return v!==j?j-v:g.createdAt.localeCompare(p.createdAt)}),u=c[0],d=u!==void 0&&typeof u.contract=="object"&&u.contract!==null&&"intent"in u.contract&&typeof u.contract.intent=="string"?u.contract.intent:`(contract ${o.slice(0,10)}…)`;return{contractHash:o,intent:d,blueprints:c}}).sort((o,l)=>{var d,p;const c=((d=o.blueprints[0])==null?void 0:d.createdAt)??"";return(((p=l.blueprints[0])==null?void 0:p.createdAt)??"").localeCompare(c)})}function CN({blueprints:e,filters:n,onPreview:o,onSetDefault:l,onDelete:c,onOpenContract:u,onGenerate:d}){const p=D.useMemo(()=>EN(e),[e]);return e.length===0?i.jsxs("div",{className:"ggui-card",children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:"empty"}),i.jsx("span",{className:"ggui-card__num",children:"VAR / 00"})]}),i.jsxs("div",{className:"ggui-card__body",children:[i.jsx("p",{className:"ggui-body",style:{margin:0},children:"No blueprints for this app yet."}),i.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"," ",i.jsx("code",{className:"ggui-code",children:"ggui_handshake"}),"."]})]})]}):i.jsx("div",{"data-ggui-variants-list":!0,"aria-label":"blueprint variants",children:p.map(g=>i.jsx(TN,{group:g,filters:n,onPreview:o,onSetDefault:l,onDelete:c,onOpenContract:u,onGenerate:d},g.contractHash))})}function TN({group:e,filters:n,onPreview:o,onSetDefault:l,onDelete:c,onOpenContract:u,onGenerate:d}){const[p,g]=D.useState(!0),h=e.blueprints.filter(y=>vN(y,n));return i.jsxs("section",{"data-ggui-variants-group":!0,"data-ggui-variants-group-hash":e.contractHash,"data-ggui-variants-group-count":h.length,className:"ggui-stack",style:{marginBottom:24},children:[i.jsxs("header",{className:"ggui-stack__head",style:{alignItems:"center",gap:12},children:[i.jsxs("button",{type:"button","aria-expanded":p,"data-ggui-variants-group-toggle":!0,onClick:()=>g(y=>!y),className:"ggui-stack__num",style:{background:"transparent",border:"none",font:"inherit",cursor:"pointer",color:"inherit",padding:0},children:[p?"▾":"▸"," VAR"]}),i.jsx("span",{className:"ggui-stack__label",children:e.intent}),i.jsxs(Me,{tone:"ink",children:[h.length,h.length!==e.blueprints.length?` / ${e.blueprints.length}`:""," ","variant",h.length===1?"":"s"]}),i.jsxs("code",{className:"ggui-code",style:{marginLeft:"auto",fontSize:"0.75rem"},children:[e.contractHash.slice(0,16),"…"]}),i.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost","data-ggui-variants-group-open":!0,onClick:()=>u(e.contractHash),children:"open →"}),i.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost","data-ggui-variants-group-generate":!0,onClick:()=>d(e.contractHash),children:"generate variant +"})]}),p?h.length===0?i.jsx("p",{className:"ggui-muted",style:{margin:0,padding:12},children:"No variants in this group match the active filters."}):i.jsx("ul",{className:"ggui-stack__list",children:h.map((y,v)=>i.jsx(p$,{blueprint:y,index:v,onPreview:o,onSetDefault:l,onDelete:c},y.blueprintId))}):null]})}function MN(){const[e,n]=D.useState({kind:"loading"}),[o,l]=D.useState(hN),c=D.useCallback(async y=>{n({kind:"loading"});try{const v=await hp({},y);n({kind:"ready",blueprints:v.blueprints})}catch(v){if(y!=null&&y.aborted)return;const j=v instanceof _a||v instanceof Error?v.message:String(v);n({kind:"error",message:j})}},[]);D.useEffect(()=>{const y=new AbortController;return c(y.signal),()=>y.abort()},[c]);const u=D.useCallback(y=>{Ve(`/preview/${encodeURIComponent(y)}`)},[]),d=D.useCallback(async y=>{try{await g$({blueprintId:y,isOperatorDefault:!0}),await c()}catch(v){const j=v instanceof _a||v instanceof Error?v.message:String(v);n({kind:"error",message:j})}},[c]),p=D.useCallback(async y=>{try{await m$({blueprintId:y}),await c()}catch(v){const j=v instanceof _a||v instanceof Error?v.message:String(v);n({kind:"error",message:j})}},[c]),g=D.useCallback(y=>{Ve(`/admin/variants/${encodeURIComponent(y)}`)},[]),h=D.useCallback(y=>{Ve(`/admin/variants/${encodeURIComponent(y)}/generate`)},[]);return i.jsxs("section",{className:"ggui-section",children:[i.jsx(ot,{num:"01 / variants",title:"Blueprint variants — N codes per contract.",mute:"Operator-pinned defaults · validatorScore · personas.",intro:i.jsx(i.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"?i.jsxs("div",{className:"ggui-card",style:{marginBottom:20},children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:"error"}),i.jsx("span",{className:"ggui-card__num",children:"ERR / 01"})]}),i.jsxs("div",{className:"ggui-card__body",children:[i.jsxs("p",{className:"ggui-body",children:[i.jsx(Me,{tone:"signal",children:"error"})," Couldn't load variants — ",e.message,"."]}),i.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:()=>{c()},children:"retry →"})]})]}):null,i.jsx(yN,{filters:o,onChange:l}),e.kind==="loading"?i.jsxs("div",{className:"ggui-card",children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:"loading"}),i.jsx("span",{className:"ggui-card__num",children:"VAR / 01"})]}),i.jsx("div",{className:"ggui-card__body",children:i.jsx("p",{className:"ggui-body",children:"Loading variants…"})})]}):e.kind==="ready"?i.jsx(CN,{blueprints:e.blueprints,filters:o,onPreview:u,onSetDefault:y=>{d(y)},onDelete:y=>{p(y)},onOpenContract:g,onGenerate:h}):null]})}function ON(){const[e,n]=D.useState({kind:"loading"}),[o,l]=D.useState(null),[c,u]=D.useState(null),d=async()=>{n({kind:"loading"});try{const g=await fetch("/ggui/console/oauth-clients",{headers:{accept:"application/json"}});if(!g.ok){if(g.status===404){n({kind:"error",message:"OAuth not enabled on this server — re-run `ggui serve --oauth` to mount the management routes."});return}n({kind:"error",message:`server returned ${g.status}`});return}const h=await g.json();n({kind:"ready",data:h})}catch(g){n({kind:"error",message:String(g)})}};D.useEffect(()=>{d()},[]);const p=async g=>{l(g);try{const h=await fetch(`/ggui/console/oauth-clients/${encodeURIComponent(g)}`,{method:"DELETE"});if(h.status!==204){n({kind:"error",message:`revoke failed — server returned ${h.status}`});return}u(null),await d()}catch(h){n({kind:"error",message:`revoke failed — ${String(h)}`})}finally{l(null)}};return i.jsxs("section",{className:"ggui-section",children:[i.jsx(ot,{num:"01 / clients",title:"Connected apps.",mute:"OAuth clients that have registered against this server.",intro:i.jsxs(i.Fragment,{children:["Each row is an OAuth client (typically an MCP custom-connector host like claude.ai) that completed"," ",i.jsx("code",{className:"ggui-code",children:"/oauth/register"})," against this server. Revoke removes the registration so future re-discovery fails — Phase 1 caveat:"," ",i.jsx("strong",{children:"existing bearers keep working"})," until they expire or you re-pair."]})}),e.kind==="loading"?i.jsx("p",{className:"ggui-muted",style:{margin:0,padding:12},children:"Loading clients…"}):e.kind==="error"?i.jsxs("p",{className:"ggui-muted",style:{margin:0,padding:12},"data-ggui-clients-error":!0,children:["Couldn't load clients — ",e.message]}):i.jsx(RN,{clients:e.data.clients,revokingId:o,pendingConfirm:c,onRevokeRequest:g=>u(g),onRevokeCancel:()=>u(null),onRevokeConfirm:g=>{p(g)},onRefresh:()=>{d()}})]})}function RN({clients:e,revokingId:n,pendingConfirm:o,onRevokeRequest:l,onRevokeCancel:c,onRevokeConfirm:u,onRefresh:d}){return e.length===0?i.jsxs("div",{className:"ggui-stack","data-ggui-clients-list":!0,"aria-label":"connected apps (empty)",children:[i.jsxs("div",{className:"ggui-stack__head",children:[i.jsx("span",{className:"ggui-stack__num",children:"CON"}),i.jsx("span",{className:"ggui-stack__label",children:"connected apps"}),i.jsx("span",{className:"ggui-stack__count",children:"0"})]}),i.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."})]}):i.jsxs("div",{"data-ggui-clients-list":!0,className:"ggui-stack","aria-label":"connected apps",children:[i.jsxs("div",{className:"ggui-stack__head",children:[i.jsx("span",{className:"ggui-stack__num",children:"CON"}),i.jsx("span",{className:"ggui-stack__label",children:"connected apps"}),i.jsx("span",{className:"ggui-stack__count",children:e.length}),i.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:d,style:{marginLeft:"auto"},children:"refresh"})]}),i.jsx("ul",{className:"ggui-stack__list",children:e.map((p,g)=>i.jsx(AN,{client:p,index:g+1,isRevoking:n===p.clientId,isPendingConfirm:o===p.clientId,onRevokeRequest:l,onRevokeCancel:c,onRevokeConfirm:u},p.clientId))})]})}function AN({client:e,index:n,isRevoking:o,isPendingConfirm:l,onRevokeRequest:c,onRevokeCancel:u,onRevokeConfirm:d}){const p=e.clientId.slice(0,12),g=e.clientName??p;return i.jsxs("li",{"data-ggui-client-id":e.clientId,className:"ggui-stack__entry",style:{opacity:o?.5:1},children:[i.jsxs("div",{className:"ggui-stack__entry-head",children:[i.jsx("span",{className:"ggui-stack__entry-num",children:`CON / ${String(n).padStart(2,"0")}`}),i.jsx("span",{className:"ggui-stack__entry-title",children:g})]}),i.jsxs("div",{className:"ggui-stack__entry-meta",children:[i.jsxs("span",{children:["id ",i.jsxs("code",{className:"ggui-code",children:[p,"…"]})]}),i.jsxs("span",{style:{marginLeft:12},children:["registered"," ",i.jsx("code",{className:"ggui-code",children:DN(e.createdAt)})]})]}),e.redirectUris.length>0?i.jsx("div",{className:"ggui-stack__entry-meta",style:{marginTop:4},children:i.jsxs("span",{children:["redirect"," ",i.jsx("code",{className:"ggui-code",children:e.redirectUris[0]}),e.redirectUris.length>1?` (+${e.redirectUris.length-1} more)`:""]})}):null,i.jsx("div",{style:{marginTop:12,display:"flex",gap:10,alignItems:"center"},children:l?i.jsxs(i.Fragment,{children:[i.jsx("button",{type:"button",className:"ggui-btn","data-ggui-client-revoke":!0,disabled:o,onClick:()=>d(e.clientId),children:o?"revoking…":"confirm revoke"}),i.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",disabled:o,onClick:u,children:"cancel"})]}):i.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost","data-ggui-client-revoke":!0,disabled:o,onClick:()=>c(e.clientId),children:"revoke"})})]})}function DN(e){const n=Date.now()-e;if(n<0)return"just now";const o=Math.floor(n/1e3);if(o<60)return`${o}s ago`;const l=Math.floor(o/60);if(l<60)return`${l}m ago`;const c=Math.floor(l/60);return c<24?`${c}h ago`:`${Math.floor(c/24)}d ago`}const UN=new Set(["theme"]),IN={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 LN(){const[e,n]=D.useState({kind:"loading"});return D.useEffect(()=>{const o=new AbortController;return(async()=>{try{const l=await fetch("/ggui/console/config",{signal:o.signal,headers:{accept:"application/json"}});if(!l.ok){n({kind:"error",message:`server returned ${l.status}`});return}const c=await l.json();n({kind:"ready",data:c})}catch(l){if(o.signal.aborted)return;n({kind:"error",message:String(l)})}})(),()=>o.abort()},[]),e.kind==="loading"?i.jsxs("section",{className:"ggui-section",children:[i.jsx(ot,{num:"01 / config",title:"ggui.json viewer.",mute:"Probing project root."}),i.jsx(Ov,{title:"loading",num:"CFG / 01",tone:"draft",children:"Loading config…"})]}):e.kind==="error"?i.jsxs("section",{className:"ggui-section",children:[i.jsx(ot,{num:"01 / config",title:"ggui.json viewer.",mute:"Endpoint unreachable."}),i.jsxs(Ov,{title:"error",num:"ERR / 01",tone:"signal",children:["Couldn't load config — ",e.message,"."]})]}):i.jsx(VN,{data:e.data})}function VN({data:e}){const n=D.useMemo(()=>Object.keys(e.schema.properties??{}).filter(u=>!UN.has(u)),[e.schema]),[o,l]=D.useState(n[0]??""),c=e.source.found?e.source.error?"found-invalid":"found-valid":"missing";return i.jsxs("section",{className:"ggui-section","data-ggui-config-source":c,children:[i.jsx(ot,{num:"01 / admin / config",title:"ggui.json — read-only manifest view.",mute:BN(e),intro:i.jsxs(i.Fragment,{children:["Debug view of every top-level field your"," ",i.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 ",i.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."]})}),i.jsx(HN,{data:e}),c==="found-invalid"?null:i.jsxs("div",{className:"ggui-config-stack",children:[i.jsx(qN,{sections:n,active:o,onSelect:l}),i.jsx(PN,{data:e,active:o})]}),e.source.found&&"raw"in e&&e.raw?i.jsx(FN,{raw:e.raw}):null]})}function BN(e){return e.source.found?e.source.error?"Validation failed.":"Loaded from disk.":"No ggui.json reachable."}function HN({data:e}){return e.source.found?e.source.error?i.jsxs("div",{className:"ggui-card",children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:"validation failed"}),i.jsx("span",{className:"ggui-card__num",children:"SRC / 01"})]}),i.jsxs("div",{className:"ggui-card__body",children:[i.jsx("p",{className:"ggui-body",children:i.jsx(Me,{tone:"signal",children:"invalid"})}),i.jsx("p",{className:"ggui-muted",children:i.jsx("code",{className:"ggui-code",children:e.source.path})}),i.jsx("pre",{className:"ggui-config-error",children:e.source.error.message})]})]}):i.jsxs("div",{className:"ggui-card",children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:"source"}),i.jsx("span",{className:"ggui-card__num",children:"SRC / 01"})]}),i.jsxs("div",{className:"ggui-card__body",children:[i.jsx("p",{className:"ggui-body",children:i.jsx(Me,{tone:"live",children:"loaded"})}),i.jsx("p",{className:"ggui-muted",children:i.jsx("code",{className:"ggui-code",children:e.source.path})})]})]}):i.jsxs("div",{className:"ggui-card",children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:"no manifest"}),i.jsx("span",{className:"ggui-card__num",children:"SRC / 01"})]}),i.jsxs("div",{className:"ggui-card__body",children:[i.jsx("p",{className:"ggui-body",children:i.jsx(Me,{tone:"ink",children:"missing"})}),i.jsxs("p",{className:"ggui-muted",children:["No ",i.jsx("code",{className:"ggui-code",children:"ggui.json"})," walked up from"," ",i.jsx("code",{className:"ggui-code",children:e.source.searchedFrom}),". The schema below shows what would be configurable; create a"," ",i.jsx("code",{className:"ggui-code",children:"ggui.json"})," at the project root and reload."]})]})]})}function qN({sections:e,active:n,onSelect:o}){return i.jsx("nav",{"aria-label":"config sections","data-ggui-config-active-section":n,children:i.jsx("ul",{className:"ggui-config-tabs",role:"tablist",children:e.map(l=>i.jsx("li",{"data-ggui-config-section":l,role:"presentation",children:i.jsx("button",{type:"button",role:"tab",onClick:()=>o(l),"aria-selected":l===n?"true":"false","aria-current":l===n?"true":void 0,className:`ggui-config-tabs__btn${l===n?" is-active":""}`,children:l})},l))})})}function PN({data:e,active:n}){var d,p;const o=(d=e.schema.properties)==null?void 0:d[n],l=e.source.found&&"manifest"in e&&e.manifest?e.manifest[n]:void 0,c=((p=e.schema.required)==null?void 0:p.includes(n))??!1;if(!o)return i.jsx("div",{className:"ggui-config-panel",children:i.jsxs("p",{className:"ggui-muted",children:['No schema for "',n,'".']})});const u=IN[n];return i.jsxs("div",{className:"ggui-config-panel","data-ggui-config-section":n,children:[i.jsxs("div",{className:"ggui-config-panel__head",children:[i.jsx("span",{className:"ggui-config-panel__name",children:i.jsx("code",{className:"ggui-code",children:n})}),c?i.jsx(Me,{tone:"signal",children:"required"}):i.jsx(Me,{tone:"ink",children:"optional"}),i.jsx("span",{className:"ggui-config-panel__type",children:ZN(o)})]}),u?i.jsx(GN,{link:u}):null,o.description?i.jsx("p",{className:"ggui-body",style:{margin:"12px 0"},children:o.description}):i.jsx("p",{className:"ggui-muted",children:"No description on the schema — file a bug if this is a known field."}),i.jsx(yc,{label:"current",value:l,absentNote:"not set in your manifest — schema default applies"}),o.default!==void 0?i.jsx(yc,{label:"default",value:o.default}):i.jsx(yc,{label:"default",value:void 0,absentNote:"no default — must be set explicitly when used"}),o.enum?i.jsx(yc,{label:"allowed",value:o.enum}):null,i.jsxs("div",{style:{marginTop:16},children:[i.jsx("div",{className:"ggui-stack__entry-meta",style:{marginBottom:6,textTransform:"uppercase",letterSpacing:"0.12em"},children:"schema"}),i.jsx("pre",{className:"ggui-config-schema",children:JSON.stringify(o,null,2)})]})]})}function ZN(e){return e.const!==void 0?`literal "${String(e.const)}"`:e.enum?`enum (${e.enum.length})`:e.type==="array"?"array":e.type==="object"?"object":typeof e.type=="string"?e.type:"unknown"}function GN({link:e}){return i.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:[i.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:()=>Ve(e.path),style:{fontSize:12},children:e.label}),i.jsx("span",{className:"ggui-muted",style:{fontSize:12,flex:1},children:e.mute})]})}function yc({label:e,value:n,absentNote:o}){return i.jsxs("div",{className:"ggui-config-value-row",children:[i.jsx("div",{className:"ggui-stack__entry-meta",style:{marginBottom:4,textTransform:"uppercase",letterSpacing:"0.12em"},children:e}),n===void 0?i.jsx("p",{className:"ggui-muted",style:{margin:0},children:o??"—"}):i.jsx("pre",{className:"ggui-config-value",children:JSON.stringify(n,null,2)})]})}function FN({raw:e}){const[n,o]=D.useState(!1);return i.jsxs("div",{className:"ggui-card",style:{marginTop:24},children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:"raw ggui.json"}),i.jsx("span",{className:"ggui-card__num",children:"RAW / 01"})]}),i.jsxs("div",{className:"ggui-card__body",children:[i.jsxs("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:()=>o(l=>!l),"aria-expanded":n,children:[n?"hide":"show"," raw bytes"]}),n?i.jsx("pre",{className:"ggui-config-raw","data-ggui-config-raw":!0,children:e}):null]})]})}function Ov({title:e,num:n,tone:o,children:l}){return i.jsxs("div",{className:"ggui-card",children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:e}),i.jsx("span",{className:"ggui-card__num",children:n})]}),i.jsxs("div",{className:"ggui-card__body",children:[i.jsx("p",{className:"ggui-body",children:i.jsx(Me,{tone:o,children:e})}),i.jsx("p",{className:"ggui-muted",children:l})]})]})}function YN(){const[e,n]=D.useState([]),[o,l]=D.useState("loading"),[c,u]=D.useState(null),[d,p]=D.useState(new Set),g=D.useRef(new Set);D.useEffect(()=>{let y=!1,v=null;const j=x=>{g.current.has(x.id)||(g.current.add(x.id),n(E=>[x,...E].slice(0,500)))};return(async()=>{try{const x=await fetch("/ggui/console/llm-trace/recent?limit=100",{credentials:"same-origin",headers:{accept:"application/json"}});if(!x.ok)throw new Error(`recent fetch returned ${x.status}`);const E=await x.json();if(y)return;const z=[...E.events].reverse();for(const w of z)g.current.add(w.id);n(z),l("live")}catch(x){if(y)return;l("error"),u(x instanceof Error?x.message:"Could not load recent LLM trace.");return}v=new EventSource("/ggui/console/llm-trace/stream",{withCredentials:!0}),v.onmessage=x=>{try{const E=JSON.parse(x.data);j(E)}catch{}},v.onerror=()=>{l("reconnecting")},v.onopen=()=>{l("live")}})(),()=>{y=!0,v&&v.close()}},[]);const h=y=>{p(v=>{const j=new Set(v);return j.has(y)?j.delete(y):j.add(y),j})};return i.jsxs("section",{className:"ggui-section",children:[i.jsx(ot,{num:"DEVTOOLS / 7A",title:"LLM trace.",mute:"Live.",intro:i.jsx(i.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."})}),i.jsxs("div",{className:"ggui-card",children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:"events"}),i.jsx("span",{className:"ggui-card__num",children:o==="loading"?"connecting…":o==="live"?`live · ${e.length}`:o==="reconnecting"?"reconnecting…":"error"})]}),i.jsxs("div",{className:"ggui-card__body",children:[c?i.jsx("p",{className:"ggui-muted","data-ggui-llm-trace-error":!0,children:c}):null,e.length===0&&o!=="error"?i.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,i.jsx("ul",{style:{listStyle:"none",padding:0,margin:0,display:"grid",gap:12},"data-ggui-llm-trace-list":!0,children:e.map(y=>i.jsx(KN,{event:y,expanded:d.has(y.id),onToggle:()=>h(y.id)},y.id))})]})]})]})}function KN({event:e,expanded:n,onToggle:o}){const c=new Date(e.at).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}),u=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`:""):"—",d=e.error?"error":"ok";return i.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":d,children:[i.jsxs("button",{type:"button",onClick:o,style:{all:"unset",cursor:"pointer",display:"flex",gap:12,alignItems:"baseline",width:"100%"},children:[i.jsx("span",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)"},children:c}),i.jsxs("span",{style:{fontFamily:"var(--ggui-font-mono)",fontSize:12},children:[e.provider,"/",e.model]}),i.jsx("span",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)"},children:e.kind}),i.jsx("span",{style:{flex:1}}),i.jsxs("span",{className:"ggui-muted",style:{fontSize:11},children:[e.durationMs,"ms"]}),i.jsx("span",{className:"ggui-muted",style:{fontSize:11},children:u}),e.error?i.jsx("span",{style:{fontSize:11,padding:"0 6px",border:"1px solid var(--ggui-rule)"},children:"error"}):null]}),n?i.jsx(JN,{event:e}):null]})}function JN({event:e}){var n,o,l;return i.jsxs("div",{style:{marginTop:10,paddingTop:10,borderTop:"1px solid var(--ggui-rule)",display:"grid",gap:12},children:[e.error?i.jsx(qr,{label:"error",children:i.jsx("pre",{style:Ko,children:e.error.message})}):null,e.systemPrompt?i.jsx(qr,{label:"system prompt",children:i.jsx("pre",{style:Ko,children:e.systemPrompt})}):null,e.userPrompt?i.jsx(qr,{label:"user prompt",children:i.jsx("pre",{style:Ko,children:e.userPrompt})}):null,e.tools&&e.tools.length>0?i.jsx(qr,{label:`tools (${e.tools.length})`,children:i.jsx("ul",{style:{listStyle:"none",padding:0,margin:0},children:e.tools.map(c=>i.jsxs("li",{style:{fontFamily:"var(--ggui-font-mono)",fontSize:12,padding:"2px 0"},children:[i.jsx("strong",{children:c.name}),i.jsxs("span",{className:"ggui-muted",children:[" — ",c.description]})]},c.name))})}):null,(n=e.result)!=null&&n.text?i.jsx(qr,{label:"completion text",children:i.jsx("pre",{style:Ko,children:e.result.text})}):null,(o=e.result)!=null&&o.toolCalls&&e.result.toolCalls.length>0?i.jsx(qr,{label:`tool calls (${e.result.toolCalls.length})`,children:i.jsx("pre",{style:Ko,children:JSON.stringify(e.result.toolCalls,null,2)})}):null,(l=e.result)!=null&&l.turnsUsed?i.jsx(qr,{label:"agentic turns",children:i.jsx("span",{className:"ggui-muted",children:e.result.turnsUsed})}):null]})}function qr({label:e,children:n}){return i.jsxs("div",{children:[i.jsx("div",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)",textTransform:"uppercase",marginBottom:4},children:e}),n]})}const Ko={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 XN(){const[e,n]=D.useState([]),[o,l]=D.useState("loading"),[c,u]=D.useState(null),[d,p]=D.useState(new Set),g=D.useRef(new Set);D.useEffect(()=>{let y=!1,v=null;const j=x=>{g.current.has(x.id)||(g.current.add(x.id),n(E=>[x,...E].slice(0,500)))};return(async()=>{try{const x=await fetch("/ggui/console/validator/recent?limit=100",{credentials:"same-origin",headers:{accept:"application/json"}});if(!x.ok)throw new Error(`recent fetch returned ${x.status}`);const E=await x.json();if(y)return;const z=[...E.events].reverse();for(const w of z)g.current.add(w.id);n(z),l("live")}catch(x){if(y)return;l("error"),u(x instanceof Error?x.message:"Could not load recent validator trace.");return}v=new EventSource("/ggui/console/validator/stream",{withCredentials:!0}),v.onmessage=x=>{try{const E=JSON.parse(x.data);j(E)}catch{}},v.onerror=()=>{l("reconnecting")},v.onopen=()=>{l("live")}})(),()=>{y=!0,v&&v.close()}},[]);const h=y=>{p(v=>{const j=new Set(v);return j.has(y)?j.delete(y):j.add(y),j})};return i.jsxs("section",{className:"ggui-section",children:[i.jsx(ot,{num:"DEVTOOLS / 7B",title:"Validator tier results.",mute:"Live.",intro:i.jsxs(i.Fragment,{children:["Every ",i.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."]})}),i.jsxs("div",{className:"ggui-card",children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:"events"}),i.jsx("span",{className:"ggui-card__num",children:o==="loading"?"connecting…":o==="live"?`live · ${e.length}`:o==="reconnecting"?"reconnecting…":"error"})]}),i.jsxs("div",{className:"ggui-card__body",children:[c?i.jsx("p",{className:"ggui-muted","data-ggui-validator-error":!0,children:c}):null,e.length===0&&o!=="error"?i.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,i.jsx("ul",{style:{listStyle:"none",padding:0,margin:0,display:"grid",gap:12},"data-ggui-validator-list":!0,children:e.map(y=>i.jsx(QN,{event:y,expanded:d.has(y.id),onToggle:()=>h(y.id)},y.id))})]})]})]})}function QN({event:e,expanded:n,onToggle:o}){const c=new Date(e.at).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}),u=e.issues.filter(h=>h.result==="fail").length,d=e.issues.filter(h=>h.result==="warn").length,p=u>0?"fail":d>0?"warn":"pass",g=e.harnessId.length>12?e.harnessId.slice(0,12)+"…":e.harnessId;return i.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":p,children:[i.jsxs("button",{type:"button",onClick:o,style:{all:"unset",cursor:"pointer",display:"flex",gap:12,alignItems:"baseline",width:"100%",flexWrap:"wrap"},children:[i.jsx("span",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)"},children:c}),i.jsx("span",{style:{fontFamily:"var(--ggui-font-mono)",fontSize:12},title:e.harnessId,children:g}),i.jsx("span",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)"},children:e.workflowId}),i.jsx(vc,{label:"axis",count:e.summary.axisIssues}),i.jsx(vc,{label:"tier-0",count:e.summary.tierIssues}),i.jsx(vc,{label:"probe",count:e.summary.runtimeRenderIssues,dimmed:e.skippedRuntimeRender}),i.jsx(vc,{label:"llm",count:e.summary.llmIssues}),i.jsx("span",{style:{flex:1}}),i.jsxs("span",{className:"ggui-muted",style:{fontSize:11},children:[e.durationMs,"ms"]}),i.jsx(WN,{outcome:p,fails:u,warns:d})]}),n?i.jsx(e7,{event:e}):null]})}function vc({label:e,count:n,dimmed:o}){const l=n>0;return i.jsxs("span",{style:{fontSize:11,fontFamily:"var(--ggui-font-mono)",padding:"0 6px",border:"1px solid var(--ggui-rule)",opacity:o?.4:l?1:.7},children:[e," ",n]})}function WN({outcome:e,fails:n,warns:o}){const l=e==="pass"?"pass":e==="warn"?`${o} warn`:`${n} fail`;return i.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:l})}function e7({event:e}){const n=t7(e.issues);return i.jsxs("div",{style:{marginTop:10,paddingTop:10,borderTop:"1px solid var(--ggui-rule)",display:"grid",gap:12},children:[e.error?i.jsx(Pa,{label:"error",children:i.jsx("pre",{style:bc,children:e.error.message})}):null,i.jsx(Pa,{label:"harness",children:i.jsxs("div",{style:{fontFamily:"var(--ggui-font-mono)",fontSize:12},children:[i.jsxs("div",{children:["id: ",e.harnessId]}),i.jsxs("div",{children:["workflow: ",e.workflowId]}),i.jsxs("div",{children:["compiled: ",e.hadCompiledCode?"yes":"no — checks skipped"]}),i.jsxs("div",{children:["runtime-render: ",e.skippedRuntimeRender?"skipped":"ran"]})]})}),i.jsx(Pa,{label:"classification",children:i.jsx("div",{style:{fontFamily:"var(--ggui-font-mono)",fontSize:12},children:Object.entries(e.classification).map(([o,l])=>i.jsxs("div",{children:[o,": ",String(l)]},o))})}),e.summary.firedCheckIds.length>0?i.jsx(Pa,{label:`fired check ids (${e.summary.firedCheckIds.length})`,children:i.jsx("pre",{style:bc,children:e.summary.firedCheckIds.join(`
215
- `)})}):null,n.axis.length>0?i.jsx(Pa,{label:`axis issues (${n.axis.length})`,children:i.jsx($c,{issues:n.axis})}):null,n.tier0.length>0?i.jsx(Pa,{label:`tier-0 issues (${n.tier0.length})`,children:i.jsx($c,{issues:n.tier0})}):null,n.tier1.length>0?i.jsx(Pa,{label:`tier-1 issues (${n.tier1.length})`,children:i.jsx($c,{issues:n.tier1})}):null,n.tier2.length>0?i.jsx(Pa,{label:`tier-2 issues (${n.tier2.length})`,children:i.jsx($c,{issues:n.tier2})}):null,e.prompt?i.jsx(Pa,{label:"prompt",children:i.jsx("pre",{style:bc,children:e.prompt})}):null,e.sourceCode?i.jsx(Pa,{label:"source under check",children:i.jsx("pre",{style:bc,children:e.sourceCode})}):null]})}function t7(e){const n=[],o=[],l=[],c=[];for(const u of e){if(typeof u.subcategory=="string"&&u.subcategory.startsWith("axis.")){n.push(u);continue}u.tier===0?o.push(u):u.tier===1?l.push(u):c.push(u)}return{axis:n,tier0:o,tier1:l,tier2:c}}function $c({issues:e}){return i.jsx("ul",{style:{listStyle:"none",padding:0,margin:0,display:"grid",gap:8},children:e.map((n,o)=>i.jsxs("li",{style:{border:"1px solid var(--ggui-rule)",padding:"6px 8px",background:"var(--ggui-paper-2, #efeee8)"},"data-ggui-validator-issue":n.category,"data-ggui-validator-issue-result":n.result,children:[i.jsxs("div",{style:{display:"flex",gap:8,alignItems:"baseline",flexWrap:"wrap",fontSize:11,fontFamily:"var(--ggui-font-mono)"},children:[i.jsx("span",{style:{padding:"0 4px",border:"1px solid var(--ggui-rule)"},children:n.result}),i.jsx("span",{style:{fontWeight:500},children:n.category}),n.subcategory?i.jsx("span",{className:"ggui-muted",children:n.subcategory}):null,n.priority?i.jsx("span",{className:"ggui-muted",children:n.priority}):null,n.severity?i.jsx("span",{className:"ggui-muted",children:n.severity}):null,typeof n.line=="number"?i.jsxs("span",{className:"ggui-muted",children:["line ",n.line]}):null]}),i.jsx("div",{style:{fontSize:12,marginTop:4},children:n.description}),n.fix?i.jsxs("div",{className:"ggui-muted",style:{fontSize:12,marginTop:2},children:["fix: ",n.fix]}):null]},o))})}function Pa({label:e,children:n}){return i.jsxs("div",{children:[i.jsx("div",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)",textTransform:"uppercase",marginBottom:4},children:e}),n]})}const bc={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 a7(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 n7(){const[e,n]=D.useState([]),[o,l]=D.useState("loading"),[c,u]=D.useState(null),[d,p]=D.useState(new Set),[g,h]=D.useState("all"),[y,v]=D.useState("all"),j=D.useRef(new Set);D.useEffect(()=>{let $=!1,N=null;const R=S=>{j.current.has(S.id)||(j.current.add(S.id),n(C=>[S,...C].slice(0,500)))};return(async()=>{try{const S=await fetch("/ggui/console/cache/recent?limit=100",{credentials:"same-origin",headers:{accept:"application/json"}});if(!S.ok)throw new Error(`recent fetch returned ${S.status}`);const C=await S.json();if($)return;const U=[...C.events].reverse();for(const te of U)j.current.add(te.id);n(U),l("live")}catch(S){if($)return;l("error"),u(S instanceof Error?S.message:"Could not load recent cache trace.");return}N=new EventSource("/ggui/console/cache/stream",{withCredentials:!0}),N.onmessage=S=>{try{const C=JSON.parse(S.data);R(C)}catch{}},N.onerror=()=>{l("reconnecting")},N.onopen=()=>{l("live")}})(),()=>{$=!0,N&&N.close()}},[]);const k=$=>{p(N=>{const R=new Set(N);return R.has($)?R.delete($):R.add($),R})},x=r7(e),E=i7(e),z=g==="all"?e:g==="no-strategy"?e.filter($=>$.strategy===void 0):e.filter($=>$.strategy===g),w=y==="all"?z:z.filter($=>$.agentClassification===y);return i.jsxs("section",{className:"ggui-section",children:[i.jsx(ot,{num:"DEVTOOLS / 7C",title:"Cache decisions.",mute:"Live.",intro:i.jsx(i.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."})}),i.jsxs("div",{className:"ggui-card",children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:"events"}),i.jsx("span",{className:"ggui-card__num",children:o==="loading"?"connecting…":o==="live"?`live · ${e.length}`:o==="reconnecting"?"reconnecting…":"error"})]}),i.jsxs("div",{className:"ggui-card__body",children:[c?i.jsx("p",{className:"ggui-muted","data-ggui-cache-trace-error":!0,children:c}):null,i.jsx(o7,{filter:g,onFilter:h,counts:x}),i.jsx(l7,{filter:y,onFilter:v,counts:E}),e.length===0&&o!=="error"?i.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&&w.length===0?i.jsx("p",{className:"ggui-muted",children:"No events for this strategy. Try a different filter."}):null,i.jsx("ul",{style:{listStyle:"none",padding:0,margin:0,display:"grid",gap:12},"data-ggui-cache-trace-list":!0,children:w.map($=>i.jsx(s7,{event:$,expanded:d.has($.id),onToggle:()=>k($.id)},$.id))})]})]})]})}function r7(e){let n=0,o=0,l=0;for(const c of e)c.strategy==="exact-key"?n+=1:c.strategy==="semantic"?o+=1:l+=1;return{all:e.length,"exact-key":n,semantic:o,"no-strategy":l}}function i7(e){let n=0,o=0;for(const l of e)l.agentClassification==="confirm"?n+=1:l.agentClassification==="override"&&(o+=1);return{all:e.length,confirm:n,override:o}}function o7({filter:e,onFilter:n,counts:o}){const l=[{key:"all",label:"all"},{key:"exact-key",label:"exact-key"},{key:"semantic",label:"semantic"},{key:"no-strategy",label:"no-strategy"}];return i.jsxs("div",{style:{display:"flex",gap:6,alignItems:"center",marginBottom:12,flexWrap:"wrap"},"data-ggui-cache-trace-filter":!0,children:[i.jsx("span",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)",textTransform:"uppercase",marginRight:4},children:"strategy"}),l.map(c=>{const u=e===c.key,d=o[c.key];return i.jsxs("button",{type:"button",onClick:()=>n(c.key),style:{all:"unset",cursor:"pointer",fontFamily:"var(--ggui-font-mono)",fontSize:11,padding:"2px 8px",border:"1px solid var(--ggui-rule)",background:u?"var(--ggui-ink)":"transparent",color:u?"var(--ggui-paper)":"var(--ggui-ink)",letterSpacing:"0.05em"},"data-ggui-cache-trace-filter-key":c.key,"data-ggui-cache-trace-filter-active":u?"true":"false",children:[c.label," · ",d]},c.key)})]})}function l7({filter:e,onFilter:n,counts:o}){const l=[{key:"all",label:"all"},{key:"confirm",label:"confirm"},{key:"override",label:"override"}];return i.jsxs("div",{style:{display:"flex",gap:6,alignItems:"center",marginBottom:12,flexWrap:"wrap"},"data-ggui-cache-trace-classification-filter":!0,children:[i.jsx("span",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)",textTransform:"uppercase",marginRight:4},children:"agent"}),l.map(c=>{const u=e===c.key,d=o[c.key];return i.jsxs("button",{type:"button",onClick:()=>n(c.key),style:{all:"unset",cursor:"pointer",fontFamily:"var(--ggui-font-mono)",fontSize:11,padding:"2px 8px",border:"1px solid var(--ggui-rule)",background:u?"var(--ggui-ink)":"transparent",color:u?"var(--ggui-paper)":"var(--ggui-ink)",letterSpacing:"0.05em"},"data-ggui-cache-trace-classification-key":c.key,"data-ggui-cache-trace-classification-active":u?"true":"false",children:[c.label," · ",d]},c.key)})]})}function s7({event:e,expanded:n,onToggle:o}){const c=new Date(e.at).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}),u=a7(e.decision),d=u==="match"&&e.winningBlueprintId,p=e.candidates[0],g=p?p.score.toFixed(3):"—",h=e.intent.length>80?`${e.intent.slice(0,80)}…`:e.intent;return i.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:[i.jsxs("button",{type:"button",onClick:o,style:{all:"unset",cursor:"pointer",display:"flex",gap:12,alignItems:"baseline",width:"100%"},children:[i.jsx("span",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)"},children:c}),i.jsx(c7,{outcome:u}),e.strategy?i.jsx(u7,{strategy:e.strategy}):null,e.agentClassification?i.jsx(h$,{classification:e.agentClassification}):null,e.validatorFindings&&e.validatorFindings.length>0?i.jsx(y$,{count:e.validatorFindings.length,severity:e.validatorFindings.some(y=>y.severity==="error")?"error":"warn"}):null,i.jsx("span",{style:{fontFamily:"var(--ggui-font-mono)",fontSize:12,flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h||i.jsx("span",{className:"ggui-muted",children:"(empty intent)"})}),i.jsxs("span",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)"},children:["top ",g]}),i.jsxs("span",{className:"ggui-muted",style:{fontSize:11},children:[e.durationMs,"ms"]}),d?i.jsx("span",{style:{fontFamily:"var(--ggui-font-mono)",fontSize:11,padding:"0 6px",border:"1px solid var(--ggui-rule)"},children:e.winningBlueprintId}):null]}),n?i.jsx(d7,{event:e}):null]})}function c7({outcome:e}){const n=e==="match"||e==="synth-ok",o=e==="match"?"MATCH":e==="synth-ok"||e==="synth-fail"?"SYNTH":e==="classify"?"PUSH":"MISS";return i.jsx("span",{style:{fontFamily:"var(--ggui-font-mono)",fontSize:11,padding:"0 8px",border:"1px solid var(--ggui-rule)",background:n?"var(--ggui-ink)":"transparent",color:n?"var(--ggui-paper)":"var(--ggui-ink)",letterSpacing:"0.05em"},"data-ggui-cache-trace-outcome":e,children:o})}function u7({strategy:e}){return i.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 h$({classification:e}){const n=e==="confirm";return i.jsx("span",{style:{fontFamily:"var(--ggui-font-mono)",fontSize:10,padding:"0 6px",border:"1px solid var(--ggui-rule)",background:n?"var(--ggui-ink)":"transparent",color:n?"var(--ggui-paper)":"var(--ggui-ink)",letterSpacing:"0.05em"},"data-ggui-cache-trace-classification-chip":e,children:e})}function y$({count:e,severity:n}){return i.jsxs("span",{title:n==="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:n==="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":n,children:[n==="error"?"err":"warn"," · ",e]})}function d7({event:e}){return i.jsxs("div",{style:{marginTop:10,paddingTop:10,borderTop:"1px solid var(--ggui-rule)",display:"grid",gap:12},children:[i.jsx(Qn,{label:"reason",children:i.jsx("p",{style:{margin:0,fontSize:13},children:e.reason})}),i.jsx(Qn,{label:"decision class",children:i.jsxs("div",{style:{display:"flex",gap:8,alignItems:"baseline",fontFamily:"var(--ggui-font-mono)",fontSize:12},children:[i.jsx("span",{children:e.decision}),e.strategy?i.jsxs("span",{className:"ggui-muted",children:["· strategy = ",e.strategy]}):null,e.agentClassification?i.jsxs("span",{className:"ggui-muted",children:["· classification = ",e.agentClassification]}):null]})}),e.agentClassification?i.jsx(Qn,{label:"agent classification",children:i.jsxs("div",{style:{display:"flex",gap:8,alignItems:"baseline",fontFamily:"var(--ggui-font-mono)",fontSize:12},children:[i.jsx(h$,{classification:e.agentClassification}),i.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?i.jsx(Qn,{label:"cosine novelty distance",children:i.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)})}):null,e.validatorFindings&&e.validatorFindings.length>0?i.jsx(Qn,{label:`validator findings (${e.validatorFindings.length})`,children:i.jsx("ul",{style:{listStyle:"none",padding:0,margin:0},children:e.validatorFindings.map((n,o)=>{var l;return i.jsxs("li",{style:{padding:"4px 0",borderBottom:o<(((l=e.validatorFindings)==null?void 0:l.length)??0)-1?"1px solid var(--ggui-rule)":"none",display:"grid",gap:2},children:[i.jsxs("div",{style:{display:"flex",gap:8,alignItems:"baseline"},children:[i.jsx(y$,{count:1,severity:n.severity}),i.jsx("span",{style:{fontFamily:"var(--ggui-font-mono)",fontSize:12},children:n.kind})]}),i.jsx("div",{style:{fontSize:12},children:n.hint})]},`${n.kind}-${o}`)})})}):null,i.jsx(Qn,{label:"intent",children:i.jsx("pre",{style:f7,children:e.intent||"(empty)"})}),i.jsx(Qn,{label:"scope / threshold",children:i.jsxs("div",{style:{fontFamily:"var(--ggui-font-mono)",fontSize:12},children:[i.jsxs("div",{children:["scope = ",i.jsx("strong",{children:e.scope})]}),i.jsxs("div",{children:["threshold = ",i.jsx("strong",{children:e.threshold})]}),i.jsxs("div",{children:["expectedKey = ",i.jsx("strong",{children:e.expectedKey||"(none)"})]}),e.winningBlueprintId?i.jsxs("div",{children:["winningBlueprintId = ",i.jsx("strong",{children:e.winningBlueprintId})]}):null]})}),i.jsx(Qn,{label:`candidates (${e.candidates.length})`,children:e.candidates.length===0?i.jsx("p",{className:"ggui-muted",style:{margin:0,fontSize:12},children:"No candidates returned by the vector store."}):i.jsx("ul",{style:{listStyle:"none",padding:0,margin:0},children:e.candidates.map((n,o)=>{const l=e.winningBlueprintId!==void 0&&n.key===e.winningBlueprintId;return i.jsxs("li",{style:{padding:"4px 0",borderBottom:o<e.candidates.length-1?"1px solid var(--ggui-rule)":"none",display:"grid",gap:4},children:[i.jsxs("div",{style:{display:"flex",gap:8,alignItems:"baseline"},children:[i.jsx("span",{style:{fontFamily:"var(--ggui-font-mono)",fontSize:12,fontWeight:l?600:400},children:n.key}),l?i.jsx("span",{className:"ggui-muted",style:{fontSize:10},children:"(winner)"}):null,i.jsx("span",{style:{flex:1}}),i.jsx("span",{style:{fontFamily:"var(--ggui-font-mono)",fontSize:12},children:n.score.toFixed(3)})]}),n.cachedIntent?i.jsx("div",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:n.cachedIntent}):null]},`${n.key}-${o}`)})})})]})}function Qn({label:e,children:n}){return i.jsxs("div",{children:[i.jsx("div",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)",textTransform:"uppercase",marginBottom:4},children:e}),n]})}const f7={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 p7(){const[e,n]=D.useState({kind:"loading"}),[o,l]=D.useState({kind:"idle"}),[c,u]=D.useState(null),[d,p]=D.useState(0);D.useEffect(()=>{const h=new AbortController;return(async()=>{try{const y=await fetch("/ggui/console/timeline/renders",{signal:h.signal,headers:{accept:"application/json"},credentials:"same-origin"});if(!y.ok){n({kind:"error",message:`server returned ${y.status}`});return}const v=await y.json();n({kind:"ready",data:v})}catch(y){if(h.signal.aborted)return;n({kind:"error",message:y instanceof Error?y.message:String(y)})}})(),()=>h.abort()},[]);const g=D.useCallback(h=>{u(h),p(0),l({kind:"loading",sessionId:h})},[]);return D.useEffect(()=>{if(!c)return;const h=new AbortController;return(async()=>{try{const y=await fetch(`/ggui/console/timeline/${encodeURIComponent(c)}/events`,{signal:h.signal,headers:{accept:"application/json"},credentials:"same-origin"}),v=await y.json();if(!y.ok&&y.status!==404){l({kind:"error",sessionId:c,message:`server returned ${y.status}`});return}l({kind:"ready",sessionId:c,data:v}),p(Math.max(0,v.events.length-1))}catch(y){if(h.signal.aborted)return;l({kind:"error",sessionId:c,message:y instanceof Error?y.message:String(y)})}})(),()=>h.abort()},[c]),i.jsxs("section",{className:"ggui-section",children:[i.jsx(ot,{num:"DEVTOOLS / 7D",title:"Render timeline.",mute:"Snapshot.",intro:i.jsxs(i.Fragment,{children:["Pick a render, then step through its event log chronologically. Each event carries the full",i.jsx("code",{className:"ggui-code",children:" GguiSessionEvent.data "}),"payload — useful for answering “what was the UI state at event N?” without a live tail."]})}),i.jsxs("div",{style:{display:"grid",gridTemplateColumns:"minmax(260px, 320px) 1fr",gap:16,alignItems:"start"},children:[i.jsx(g7,{state:e,pickedSessionId:c,onPick:g}),i.jsx(h7,{state:o,scrubIndex:d,onScrub:p})]})]})}function g7({state:e,pickedSessionId:n,onPick:o}){return i.jsxs("div",{className:"ggui-card","data-ggui-timeline-pane":"renders",children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:"renders"}),i.jsx("span",{className:"ggui-card__num",children:e.kind==="loading"?"loading…":e.kind==="error"?"error":`${e.data.sessions.length} / ${e.data.total}`})]}),i.jsx("div",{className:"ggui-card__body",style:{padding:0},children:e.kind==="loading"?i.jsx("p",{className:"ggui-muted",style:{margin:0,padding:12},children:"Loading renders…"}):e.kind==="error"?i.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?i.jsxs("p",{className:"ggui-muted",style:{margin:0,padding:12},children:["No renders yet. Render from an agent (",i.jsx("code",{className:"ggui-code",children:"ggui_render"}),") to create one."]}):i.jsx("ul",{style:{listStyle:"none",padding:0,margin:0,maxHeight:520,overflowY:"auto"},children:e.data.sessions.map(l=>i.jsx(m7,{render:l,selected:l.sessionId===n,onClick:()=>o(l.sessionId)},l.sessionId))})})]})}function m7({render:e,selected:n,onClick:o}){const l=e.sessionId.slice(0,12),c=e.status==="active"?"live":e.status==="expired"?"signal":"ink";return i.jsx("li",{"data-ggui-timeline-session-id":e.sessionId,"data-ggui-timeline-session-selected":n?"true":"false",style:{borderBottom:"1px solid var(--ggui-rule)"},children:i.jsxs("button",{type:"button",onClick:o,style:{all:"unset",cursor:"pointer",width:"100%",padding:"10px 12px",display:"block",background:n?"var(--ggui-paper-2, #efeee8)":"transparent"},children:[i.jsxs("div",{style:{display:"flex",gap:8,alignItems:"baseline",marginBottom:4},children:[i.jsxs("code",{className:"ggui-code",style:{fontSize:12,fontFamily:"var(--ggui-font-mono)"},children:[l,"…"]}),i.jsx(Me,{tone:c,children:e.status})]}),i.jsxs("div",{className:"ggui-muted",style:{fontSize:11},children:["app ",i.jsx("code",{className:"ggui-code",children:e.appId})," · stream"," ",e.streamSeq]}),i.jsxs("div",{className:"ggui-muted",style:{fontSize:11,marginTop:2},children:["last ",x7(e.lastActivityAt)]})]})})}function h7({state:e,scrubIndex:n,onScrub:o}){return e.kind==="idle"?i.jsxs("div",{className:"ggui-card","data-ggui-timeline-pane":"events",children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:"timeline"}),i.jsx("span",{className:"ggui-card__num",children:"DEV / 7D"})]}),i.jsx("div",{className:"ggui-card__body",children:i.jsx("p",{className:"ggui-muted",children:"Pick a render on the left to load its event log."})})]}):e.kind==="loading"?i.jsxs("div",{className:"ggui-card","data-ggui-timeline-pane":"events",children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:"timeline"}),i.jsx("span",{className:"ggui-card__num",children:"loading…"})]}),i.jsx("div",{className:"ggui-card__body",children:i.jsxs("p",{className:"ggui-muted",children:["Loading events for"," ",i.jsx("code",{className:"ggui-code",children:v$(e.sessionId)}),"…"]})})]}):e.kind==="error"?i.jsxs("div",{className:"ggui-card","data-ggui-timeline-pane":"events",children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:"timeline"}),i.jsx("span",{className:"ggui-card__num",children:"error"})]}),i.jsx("div",{className:"ggui-card__body",children:i.jsxs("p",{className:"ggui-muted","data-ggui-timeline-events-error":!0,children:["Couldn't load events — ",e.message,"."]})})]}):i.jsx(y7,{state:e,scrubIndex:n,onScrub:o})}function y7({state:e,scrubIndex:n,onScrub:o}){const{events:l,status:c,streamSeq:u}=e.data,d=l.length,p=D.useMemo(()=>d===0?0:Math.max(0,Math.min(n,d-1)),[n,d]),g=d>0?l[p]:null,h=D.useCallback(()=>{d!==0&&o(Math.max(0,p-1))},[o,p,d]),y=D.useCallback(()=>{d!==0&&o(Math.min(d-1,p+1))},[o,p,d]),v=D.useCallback(()=>o(0),[o]),j=D.useCallback(()=>{d!==0&&o(d-1)},[o,d]);return i.jsxs("div",{className:"ggui-card","data-ggui-timeline-pane":"events",children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:i.jsx("code",{className:"ggui-code",children:v$(e.sessionId)})}),i.jsx("span",{className:"ggui-card__num",children:d===0?"no events":`${p+1} / ${d}`})]}),i.jsxs("div",{className:"ggui-card__body",children:[i.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center",marginBottom:12,flexWrap:"wrap"},children:[i.jsxs("span",{className:"ggui-muted",style:{fontSize:12},children:["status"," ",i.jsx("code",{className:"ggui-code",children:c})]}),i.jsxs("span",{className:"ggui-muted",style:{fontSize:12},children:["stream cursor"," ",i.jsx("code",{className:"ggui-code",children:u})]}),i.jsxs("span",{className:"ggui-muted",style:{fontSize:12},children:["inbound events"," ",i.jsx("code",{className:"ggui-code",children:d})]})]}),d===0?i.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."}):i.jsxs(i.Fragment,{children:[i.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center",marginBottom:12,flexWrap:"wrap"},children:[i.jsx("button",{type:"button",onClick:v,disabled:p===0,className:"ggui-btn ggui-btn--ghost","data-ggui-timeline-jump":"start",children:"⟪ start"}),i.jsx("button",{type:"button",onClick:h,disabled:p===0,className:"ggui-btn ggui-btn--ghost","data-ggui-timeline-jump":"prev",children:"‹ prev"}),i.jsx("input",{type:"range",min:0,max:d-1,value:p,onChange:k=>o(Number(k.target.value)),"aria-label":"event scrubber","data-ggui-timeline-scrubber":!0,style:{flex:1,minWidth:160}}),i.jsx("button",{type:"button",onClick:y,disabled:p>=d-1,className:"ggui-btn ggui-btn--ghost","data-ggui-timeline-jump":"next",children:"next ›"}),i.jsx("button",{type:"button",onClick:j,disabled:p>=d-1,className:"ggui-btn ggui-btn--ghost","data-ggui-timeline-jump":"end",children:"end ⟫"})]}),g?i.jsx(v7,{event:g}):null]})]})]})}function v7({event:e}){return i.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:[i.jsxs("div",{style:{display:"flex",gap:12,alignItems:"baseline",marginBottom:8},children:[i.jsxs("span",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)"},children:["seq ",e.seq]}),i.jsx("span",{style:{fontFamily:"var(--ggui-font-mono)",fontSize:12},children:e.type}),i.jsx("span",{style:{flex:1}}),i.jsx("span",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)"},children:b7(e.timestamp)})]}),i.jsx("pre",{style:$7,children:_7(e.data)})]})}const $7={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 v$(e){return e.length>16?`${e.slice(0,16)}…`:e}function b7(e){try{return(typeof e=="number"?new Date(e):new Date(e)).toISOString().slice(11,23)}catch{return String(e)}}function x7(e){const n=Date.now()-e;if(n<0)return"just now";const o=Math.floor(n/1e3);if(o<5)return"just now";if(o<60)return`${o}s ago`;const l=Math.floor(o/60);if(l<60)return`${l}m ago`;const c=Math.floor(l/60);if(c<24)return`${c}h ago`;const u=new Date(e),d=p=>p<10?`0${p}`:String(p);return`${u.getFullYear()}-${d(u.getMonth()+1)}-${d(u.getDate())}`}function _7(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}function j7(){const[e,n]=D.useState([]),[o,l]=D.useState("loading"),[c,u]=D.useState(null),[d,p]=D.useState(new Set),g=D.useRef(new Set);D.useEffect(()=>{let y=!1,v=null;const j=x=>{g.current.has(x.id)||(g.current.add(x.id),n(E=>[x,...E].slice(0,500)))};return(async()=>{try{const x=await fetch("/ggui/console/payloads/recent?limit=100",{credentials:"same-origin",headers:{accept:"application/json"}});if(!x.ok)throw new Error(`recent fetch returned ${x.status}`);const E=await x.json();if(y)return;const z=[...E.events].reverse();for(const w of z)g.current.add(w.id);n(z),l("live")}catch(x){if(y)return;l("error"),u(x instanceof Error?x.message:"Could not load recent payloads.");return}v=new EventSource("/ggui/console/payloads/stream",{withCredentials:!0}),v.onmessage=x=>{try{const E=JSON.parse(x.data);j(E)}catch{}},v.onerror=()=>{l("reconnecting")},v.onopen=()=>{l("live")}})(),()=>{y=!0,v&&v.close()}},[]);const h=y=>{p(v=>{const j=new Set(v);return j.has(y)?j.delete(y):j.add(y),j})};return i.jsxs("section",{className:"ggui-section",children:[i.jsx(ot,{num:"DEVTOOLS / 7E",title:"Payloads.",mute:"Live.",intro:i.jsxs(i.Fragment,{children:["Every ",i.jsx("code",{className:"ggui-code",children:"ggui_render"})," and"," ",i.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."]})}),i.jsxs("div",{className:"ggui-card",children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:"events"}),i.jsx("span",{className:"ggui-card__num",children:o==="loading"?"connecting…":o==="live"?`live · ${e.length}`:o==="reconnecting"?"reconnecting…":"error"})]}),i.jsxs("div",{className:"ggui-card__body",children:[c?i.jsx("p",{className:"ggui-muted","data-ggui-payloads-error":!0,children:c}):null,e.length===0&&o!=="error"?i.jsxs("p",{className:"ggui-muted",children:["No payloads yet. Trigger a"," ",i.jsx("code",{className:"ggui-code",children:"ggui_render"})," from your MCP client and it'll appear here as it lands."]}):null,i.jsx("ul",{style:{listStyle:"none",padding:0,margin:0,display:"grid",gap:12},"data-ggui-payloads-list":!0,children:e.map(y=>i.jsx(S7,{event:y,expanded:d.has(y.id),onToggle:()=>h(y.id)},y.id))})]})]})]})}function S7({event:e,expanded:n,onToggle:o}){const c=new Date(e.at).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}),u=e.sessionId.length>8?`${e.sessionId.slice(0,8)}…`:e.sessionId,d=e.direction==="inbound-render"?"inbound":"outbound";return i.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:[i.jsxs("button",{type:"button",onClick:o,style:{all:"unset",cursor:"pointer",display:"flex",gap:12,alignItems:"baseline",width:"100%"},children:[i.jsx("span",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)"},children:c}),i.jsx("span",{style:{fontSize:11,padding:"0 6px",border:"1px solid var(--ggui-rule)",fontFamily:"var(--ggui-font-mono)"},children:d}),i.jsx("span",{style:{fontFamily:"var(--ggui-font-mono)",fontSize:12},children:e.tool}),i.jsx("span",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)"},children:u}),i.jsx("span",{style:{flex:1}}),i.jsx("span",{className:"ggui-muted",style:{fontSize:11},children:N7(e.byteSize)})]}),n?i.jsx(w7,{event:e}):null]})}function w7({event:e}){const n=k7(e.payload);return i.jsxs("div",{style:{marginTop:10,paddingTop:10,borderTop:"1px solid var(--ggui-rule)",display:"grid",gap:12},children:[i.jsx(Rv,{label:"session",children:i.jsxs("span",{className:"ggui-muted",style:{fontFamily:"var(--ggui-font-mono)",fontSize:12},children:[e.sessionId," · app ",e.appId]})}),i.jsx(Rv,{label:"payload",children:i.jsx("pre",{style:z7,children:n})})]})}function Rv({label:e,children:n}){return i.jsxs("div",{children:[i.jsx("div",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)",textTransform:"uppercase",marginBottom:4},children:e}),n]})}function k7(e){try{return JSON.stringify(e,null,2)??"undefined"}catch{return"[unstringifiable]"}}function N7(e){return!Number.isFinite(e)||e<0?"—":e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}const z7={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"},Cf="ggui-console:benchmark-dashboard-url",E7="https://benchmarks.ggui.ai";function C7(){const[e,n]=D.useState(""),[o,l]=D.useState("");D.useEffect(()=>{const u=localStorage.getItem(Cf);u&&(n(u),l(u))},[]);const c=u=>{const d=u.trim();n(d),d?localStorage.setItem(Cf,d):localStorage.removeItem(Cf)};return i.jsxs("section",{className:"ggui-section",children:[i.jsx(ot,{num:"DEVTOOLS / 06",title:"Benchmarks dashboard.",mute:"GGUI_MODE=dev",intro:i.jsxs(i.Fragment,{children:["Embed a ",i.jsx("code",{className:"ggui-code",children:"@ggui-ai/benchmark"})," ","dashboard. Default points at"," ",i.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."]})}),i.jsxs("div",{className:"ggui-card",children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:"dashboard URL"}),i.jsx("span",{className:"ggui-card__num",children:"DEV / 06"})]}),i.jsxs("div",{className:"ggui-card__body",children:[i.jsxs("form",{onSubmit:u=>{u.preventDefault(),c(o)},style:{display:"flex",gap:8},children:[i.jsx("input",{type:"url",value:o,onChange:u=>l(u.target.value),placeholder:E7,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)"}}),i.jsx("button",{type:"submit",className:"ggui-btn",disabled:o.trim()===e.trim(),children:"load"}),e&&i.jsx("button",{type:"button",className:"ggui-btn ggui-btn--muted",onClick:()=>{l(""),c("")},children:"clear"})]}),i.jsxs("p",{className:"ggui-muted",style:{marginTop:12,fontSize:13,lineHeight:1.5},children:["URL persists across reloads. Local dev:"," ",i.jsx("code",{className:"ggui-code",children:"npx serve ./bench-results"})," then paste ",i.jsx("code",{className:"ggui-code",children:"http://localhost:3000"}),"."]})]})]}),e&&i.jsxs("div",{className:"ggui-card",style:{marginTop:16},children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:e}),i.jsx("span",{className:"ggui-card__num",children:"DEV / 06.1"})]}),i.jsx("div",{className:"ggui-card__body",style:{padding:0},children:i.jsx("iframe",{src:e,title:"Benchmarks dashboard",style:{width:"100%",height:"78vh",border:"none",background:"var(--ggui-paper)"}})})]})]})}const T7={"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 M7({route:e}){return e.kind==="devtools-index"?i.jsx(Av,{}):e.kind==="devtools-llm-trace"?i.jsx(YN,{}):e.kind==="devtools-validator"?i.jsx(XN,{}):e.kind==="devtools-cache"?i.jsx(n7,{}):e.kind==="devtools-timeline"?i.jsx(p7,{}):e.kind==="devtools-payloads"?i.jsx(j7,{}):e.kind==="devtools-benchmarks"?i.jsx(C7,{}):i.jsx(Av,{})}function Av(){return i.jsxs("section",{className:"ggui-section",children:[i.jsx(ot,{num:"DEVTOOLS / 00",title:"Dev-mode debug surfaces.",mute:"GGUI_MODE=dev",intro:i.jsxs(i.Fragment,{children:["Default for ",i.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."]})}),i.jsxs("div",{className:"ggui-card",children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:"surfaces"}),i.jsx("span",{className:"ggui-card__num",children:"DEV / 01"})]}),i.jsx("div",{className:"ggui-card__body",children:i.jsx("ul",{style:{listStyle:"none",padding:0,margin:0,display:"grid",gap:12},children:Object.entries(T7).map(([e,n])=>i.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:[i.jsxs("div",{style:{minWidth:0},children:[i.jsx("div",{style:{fontWeight:500},children:n.title}),i.jsx("div",{className:"ggui-muted",style:{fontSize:13},children:n.answers})]}),i.jsxs("span",{className:"ggui-muted",style:{fontSize:12,whiteSpace:"nowrap"},children:["Slice ",n.slice]})]},e))})})]})]})}function O7(){const[e,n]=D.useState({kind:"loading"}),[o,l]=D.useState(null),[c,u]=D.useState(null),[d,p]=D.useState(""),[g,h]=D.useState(!1),[y,v]=D.useState(null),[j,k]=D.useState(null),x=async()=>{n({kind:"loading"});try{const w=await fetch("/ggui/console/keys",{headers:{accept:"application/json"}});if(w.status===401){Ve(`/admin-login?next=${encodeURIComponent("/admin/connector-keys")}`);return}if(!w.ok){if(w.status===404){n({kind:"error",message:"Pairing not enabled on this server — re-run `ggui serve` (pairing is on by default for the OSS bundle)."});return}n({kind:"error",message:`server returned ${w.status}`});return}const $=await w.json();n({kind:"ready",data:$})}catch(w){n({kind:"error",message:String(w)})}};D.useEffect(()=>{x()},[]);const E=async w=>{l(w);try{const $=await fetch(`/ggui/console/keys/${encodeURIComponent(w)}`,{method:"DELETE"});if($.status===401){Ve(`/admin-login?next=${encodeURIComponent("/admin/connector-keys")}`);return}if($.status!==204){n({kind:"error",message:`revoke failed — server returned ${$.status}`});return}u(null),await x()}catch($){n({kind:"error",message:`revoke failed — ${String($)}`})}finally{l(null)}},z=async w=>{w.preventDefault(),v(null);const $=d.trim();if($.length===0){v("Device name is required.");return}h(!0);try{const N=await fetch("/ggui/console/keys",{method:"POST",headers:{"content-type":"application/json",accept:"application/json"},body:JSON.stringify({deviceName:$})});if(N.status===401){Ve(`/admin-login?next=${encodeURIComponent("/admin/connector-keys")}`);return}if(!N.ok){v(`mint failed — server returned ${N.status}`);return}const R=await N.json();k(R),p(""),await x()}catch(N){v(`mint failed — ${String(N)}`)}finally{h(!1)}};return i.jsxs("section",{className:"ggui-section",children:[i.jsx(ot,{num:"01 / keys",title:"Paired bearer tokens.",mute:"Personal-mode bearers minted by /pair.",intro:i.jsxs(i.Fragment,{children:["Each row is a paired bearer minted by the pairing service — paste these into MCP clients (Claude Desktop, claude.ai) as the ",i.jsx("code",{className:"ggui-code",children:"Authorization: Bearer"})," ","header. Tokens are stored in plaintext on disk (",i.jsx("code",{className:"ggui-code",children:"~/.ggui/keys.json"})," by default); treat this page like"," ",i.jsx("code",{className:"ggui-code",children:"~/.ssh/"})," — anyone with view access can copy a bearer."]})}),i.jsx(R7,{deviceName:d,onDeviceName:p,minting:g,error:y,result:j,onSubmit:w=>{z(w)},onDismissResult:()=>k(null)}),e.kind==="loading"?i.jsx("p",{className:"ggui-muted",style:{margin:0,padding:12},children:"Loading keys…"}):e.kind==="error"?i.jsxs("p",{className:"ggui-muted",style:{margin:0,padding:12},"data-ggui-keys-error":!0,children:["Couldn't load keys — ",e.message]}):i.jsx(D7,{keys:e.data.keys,revokingId:o,pendingConfirm:c,onRevokeRequest:w=>u(w),onRevokeCancel:()=>u(null),onRevokeConfirm:w=>{E(w)},onRefresh:()=>{x()}})]})}function R7({deviceName:e,onDeviceName:n,minting:o,error:l,result:c,onSubmit:u,onDismissResult:d}){return i.jsxs("div",{className:"ggui-card",style:{marginBottom:20},children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:"mint a new key"}),i.jsx("span",{className:"ggui-card__num",children:"KEY / NEW"})]}),i.jsxs("div",{className:"ggui-card__body",children:[i.jsx("form",{className:"ggui-form",onSubmit:u,children:i.jsxs("div",{className:"ggui-form__row",children:[i.jsx("label",{className:"ggui-field","aria-label":"device name for the new key",children:i.jsx("input",{type:"text",placeholder:"device name (e.g. Claude Desktop, iPhone)",value:e,onChange:p=>n(p.target.value),disabled:o,maxLength:256})}),i.jsxs("button",{type:"submit",className:"ggui-btn","data-ggui-key-mint":!0,disabled:o||e.trim().length===0,children:[i.jsx("span",{className:"ggui-btn__dot","aria-hidden":!0}),o?"minting…":"mint"]})]})}),l?i.jsx("p",{className:"ggui-muted",style:{marginTop:10},children:l}):null,c?i.jsx(A7,{result:c,onDismiss:d}):null]})]})}function A7({result:e,onDismiss:n}){const[o,l]=D.useState(!1),c=async()=>{try{await navigator.clipboard.writeText(e.token),l(!0),window.setTimeout(()=>l(!1),2e3)}catch{}};return i.jsxs("div",{className:"ggui-card",style:{marginTop:16},"data-ggui-key-mint-result":!0,children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:"new bearer minted — copy it now"}),i.jsx("span",{className:"ggui-card__num",children:"KEY / FRESH"})]}),i.jsxs("div",{className:"ggui-card__body",children:[i.jsxs("p",{className:"ggui-muted",style:{marginTop:0},children:["Paste this into your MCP client's"," ",i.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."]}),i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,marginTop:12},children:[i.jsx("code",{className:"ggui-code",style:{flex:1,padding:10,wordBreak:"break-all",userSelect:"all"},children:e.token}),i.jsxs("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:()=>{c()},children:[i.jsx("span",{className:"ggui-btn__dot","aria-hidden":!0}),o?"copied":"copy"]})]}),i.jsxs("div",{className:"ggui-stack__entry-meta",style:{marginTop:12},children:[i.jsxs("span",{children:["device ",i.jsx("code",{className:"ggui-code",children:e.deviceName})]}),i.jsxs("span",{style:{marginLeft:12},children:["id ",i.jsx("code",{className:"ggui-code",children:e.pairingId})]})]}),i.jsx("div",{style:{marginTop:14},children:i.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:n,children:"dismiss"})})]})]})}function D7({keys:e,revokingId:n,pendingConfirm:o,onRevokeRequest:l,onRevokeCancel:c,onRevokeConfirm:u,onRefresh:d}){return e.length===0?i.jsxs("div",{className:"ggui-stack","data-ggui-keys-list":!0,"aria-label":"paired keys (empty)",children:[i.jsxs("div",{className:"ggui-stack__head",children:[i.jsx("span",{className:"ggui-stack__num",children:"KEY"}),i.jsx("span",{className:"ggui-stack__label",children:"paired keys"}),i.jsx("span",{className:"ggui-stack__count",children:"0"})]}),i.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 ",i.jsx("code",{className:"ggui-code",children:"POST /pair"})," from a viewer client to land a row here."]})]}):i.jsxs("div",{"data-ggui-keys-list":!0,className:"ggui-stack","aria-label":"paired keys",children:[i.jsxs("div",{className:"ggui-stack__head",children:[i.jsx("span",{className:"ggui-stack__num",children:"KEY"}),i.jsx("span",{className:"ggui-stack__label",children:"paired keys"}),i.jsx("span",{className:"ggui-stack__count",children:e.length}),i.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:d,style:{marginLeft:"auto"},children:"refresh"})]}),i.jsx("ul",{className:"ggui-stack__list",children:e.map((p,g)=>i.jsx(U7,{entry:p,index:g+1,isRevoking:n===p.pairingId,isPendingConfirm:o===p.pairingId,onRevokeRequest:l,onRevokeCancel:c,onRevokeConfirm:u},p.pairingId))})]})}function U7({entry:e,index:n,isRevoking:o,isPendingConfirm:l,onRevokeRequest:c,onRevokeCancel:u,onRevokeConfirm:d}){return i.jsxs("li",{"data-ggui-key-id":e.pairingId,className:"ggui-stack__entry",style:{opacity:o?.5:1},children:[i.jsxs("div",{className:"ggui-stack__entry-head",children:[i.jsx("span",{className:"ggui-stack__entry-num",children:`KEY / ${String(n).padStart(2,"0")}`}),i.jsx("span",{className:"ggui-stack__entry-title",children:e.deviceName})]}),i.jsxs("div",{className:"ggui-stack__entry-meta",children:[i.jsxs("span",{children:["id ",i.jsx("code",{className:"ggui-code",children:e.pairingId})]}),i.jsxs("span",{style:{marginLeft:12},children:["minted"," ",i.jsx("code",{className:"ggui-code",children:Dv(e.createdAt)})]}),e.lastUsedAt!==void 0?i.jsxs("span",{style:{marginLeft:12},children:["used"," ",i.jsx("code",{className:"ggui-code",children:Dv(e.lastUsedAt)})]}):null]}),i.jsx("div",{className:"ggui-stack__entry-meta",style:{marginTop:6},children:i.jsxs("span",{style:{display:"flex",alignItems:"center",gap:8},children:["token"," ",e.token===null?i.jsx("code",{className:"ggui-code",children:"— rotated, re-pair to recover"}):i.jsx("code",{className:"ggui-code",style:{wordBreak:"break-all",userSelect:"all"},children:e.token})]})}),i.jsx("div",{style:{marginTop:12,display:"flex",gap:10,alignItems:"center"},children:l?i.jsxs(i.Fragment,{children:[i.jsx("button",{type:"button",className:"ggui-btn","data-ggui-key-revoke":!0,disabled:o,onClick:()=>d(e.pairingId),children:o?"revoking…":"confirm revoke"}),i.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",disabled:o,onClick:u,children:"cancel"})]}):i.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost","data-ggui-key-revoke":!0,disabled:o,onClick:()=>c(e.pairingId),children:"revoke"})})]})}function Dv(e){const n=Date.now()-e;if(n<0)return"just now";const o=Math.floor(n/1e3);if(o<60)return`${o}s ago`;const l=Math.floor(o/60);if(l<60)return`${l}m ago`;const c=Math.floor(l/60);return c<24?`${c}h ago`:`${Math.floor(c/24)}d ago`}function I7(){const[e,n]=D.useState({kind:"loading"}),[o,l]=D.useState("");D.useEffect(()=>{const d=new AbortController;return(async()=>{try{const p=await fetch("/ggui/console/mcp/tools",{signal:d.signal,headers:{accept:"application/json"}});if(!p.ok){n({kind:"error",message:`server returned ${p.status}`});return}const g=await p.json();n({kind:"ready",data:g})}catch(p){if(d.signal.aborted)return;n({kind:"error",message:String(p)})}})(),()=>d.abort()},[]);const c=o.trim().toLowerCase(),u=D.useMemo(()=>e.kind!=="ready"?null:c.length===0?e.data.tools:e.data.tools.filter(d=>[d.name,d.title??"",d.description].join(" ").toLowerCase().includes(c)),[e,c]);return i.jsxs("section",{className:"ggui-section",children:[i.jsx(ot,{num:"01 / mcp",title:"Registered MCP tools.",mute:"Read-only inventory.",intro:i.jsxs(i.Fragment,{children:["Every tool this server registered with the MCP runtime — same set ",i.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."," ",i.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"?i.jsx(Iv,{title:"loading",num:"MCP / 01",tone:"draft",children:"Loading tool inventory…"}):e.kind==="error"?i.jsxs(Iv,{title:"error",num:"ERR / 01",tone:"signal",children:["Couldn't load tools — ",e.message,"."]}):i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"ggui-form",style:{marginBottom:20},children:[i.jsx("label",{className:"ggui-label",htmlFor:"ggui-mcp-filter",children:"filter"}),i.jsx("div",{className:"ggui-field",children:i.jsx("input",{id:"ggui-mcp-filter",name:"filter","aria-label":"filter tools",placeholder:"substring match over name, title, description…",value:o,onChange:d=>l(d.target.value),autoCapitalize:"off",autoCorrect:"off",spellCheck:!1})})]}),i.jsx(L7,{all:e.data.tools,shown:u??e.data.tools,filterActive:c.length>0})]})]})}function L7({all:e,shown:n,filterActive:o}){return e.length===0?i.jsxs("div",{className:"ggui-card",children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:"empty"}),i.jsx("span",{className:"ggui-card__num",children:"MCP / 00"})]}),i.jsxs("div",{className:"ggui-card__body",children:[i.jsx("p",{className:"ggui-body",children:"No tools registered."}),i.jsxs("p",{className:"ggui-muted",children:["This server booted without any handlers — unusual for a full ",i.jsx("code",{className:"ggui-code",children:"ggui serve"}),". Check the boot config."]})]})]}):i.jsxs("div",{"data-ggui-mcp-list":!0,className:"ggui-stack","aria-label":"mcp tools",children:[i.jsxs("div",{className:"ggui-stack__head",children:[i.jsx("span",{className:"ggui-stack__num",children:"MCP"}),i.jsx("span",{className:"ggui-stack__label",children:"registered tools"}),i.jsxs("span",{className:"ggui-stack__count",children:[n.length,o&&n.length!==e.length?` / ${e.length}`:""]})]}),n.length===0?i.jsx("p",{className:"ggui-muted",style:{margin:0,padding:12},children:"No tools match the filter."}):i.jsx("ul",{className:"ggui-stack__list",children:n.map((l,c)=>i.jsx(V7,{tool:l,index:c+1},l.name))})]})}function V7({tool:e,index:n}){const[o,l]=D.useState(!1);return i.jsxs("li",{"data-ggui-mcp-tool-name":e.name,"data-ggui-mcp-tool-expanded":o?"true":"false",className:"ggui-stack__entry",children:[i.jsxs("button",{type:"button",onClick:()=>l(c=>!c),"aria-expanded":o,style:{background:"transparent",border:0,padding:0,width:"100%",textAlign:"left",cursor:"pointer",color:"inherit",font:"inherit"},children:[i.jsxs("div",{className:"ggui-stack__entry-head",children:[i.jsx("span",{className:"ggui-stack__entry-num",children:`MCP / ${String(n).padStart(2,"0")}`}),i.jsx("span",{className:"ggui-stack__entry-title",children:i.jsx("code",{className:"ggui-code",children:e.name})}),e.title?i.jsx(Me,{tone:"ink",children:e.title}):null,i.jsx("span",{className:"ggui-muted",style:{marginLeft:"auto",fontFamily:"var(--ggui-mono)",fontSize:11},children:o?"−":"+"})]}),e.description?i.jsx("p",{className:"ggui-body",style:{margin:"8px 0 0"},children:e.description}):null]}),o?i.jsxs("div",{style:{marginTop:12,display:"grid",gap:12},children:[i.jsx(Uv,{label:"input",schema:e.inputSchema}),i.jsx(Uv,{label:"output",schema:e.outputSchema})]}):null]})}function Uv({label:e,schema:n}){return i.jsxs("div",{children:[i.jsx("div",{className:"ggui-stack__entry-meta",style:{marginBottom:6,textTransform:"uppercase",letterSpacing:"0.12em"},children:e}),i.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(n,null,2)})]})}function Iv({title:e,num:n,tone:o,children:l}){return i.jsxs("div",{className:"ggui-card",children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:e}),i.jsx("span",{className:"ggui-card__num",children:n})]}),i.jsxs("div",{className:"ggui-card__body",children:[i.jsx("p",{className:"ggui-body",children:i.jsx(Me,{tone:o,children:e})}),i.jsx("p",{className:"ggui-muted",children:l})]})]})}function B7(){const[e,n]=D.useState({kind:"loading"}),[o,l]=D.useState("");D.useEffect(()=>{const d=new AbortController;return(async()=>{try{const p=await fetch("/ggui/console/sessions",{signal:d.signal,headers:{accept:"application/json"}});if(!p.ok){n({kind:"error",message:`server returned ${p.status}`});return}const g=await p.json();n({kind:"ready",data:g})}catch(p){if(d.signal.aborted)return;n({kind:"error",message:String(p)})}})(),()=>d.abort()},[]);const c=o.trim().toLowerCase(),u=D.useMemo(()=>e.kind!=="ready"?null:c.length===0?e.data.sessions:e.data.sessions.filter(d=>[d.sessionId,d.shortCode??"",d.appId].join(" ").toLowerCase().includes(c)),[e,c]);return i.jsxs("section",{className:"ggui-section",children:[i.jsx(ot,{num:"01 / sessions",title:"Live sessions.",mute:"Active only — render from an agent to create one.",intro:i.jsxs(i.Fragment,{children:["Every row is an active GguiSession on this server. A session has a"," ",i.jsx("code",{className:"ggui-code",children:"shortCode"})," once one is minted by ",i.jsx("code",{className:"ggui-code",children:"ggui_render"}),"."]})}),e.kind==="loading"?i.jsx(Lv,{title:"loading",num:"SES / 01",tone:"draft",children:"Loading sessions…"}):e.kind==="error"?i.jsxs(Lv,{title:"error",num:"ERR / 01",tone:"signal",children:["Couldn't load sessions — ",e.message,"."]}):i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"ggui-form",style:{marginBottom:20},children:[i.jsx("label",{className:"ggui-label",htmlFor:"ggui-sessions-filter",children:"filter"}),i.jsx("div",{className:"ggui-field",children:i.jsx("input",{id:"ggui-sessions-filter",name:"filter","aria-label":"filter session entries",placeholder:"substring match over sessionId, shortCode, appId…",value:o,onChange:d=>l(d.target.value),autoCapitalize:"off",autoCorrect:"off",spellCheck:!1})})]}),i.jsx(H7,{all:e.data.sessions,shown:u??e.data.sessions,filterActive:c.length>0})]})]})}function H7({all:e,shown:n,filterActive:o}){return e.length===0?i.jsx(Z7,{}):i.jsxs("div",{"data-ggui-sessions-list":!0,className:"ggui-stack","aria-label":"active sessions",children:[i.jsxs("div",{className:"ggui-stack__head",children:[i.jsx("span",{className:"ggui-stack__num",children:"SES"}),i.jsx("span",{className:"ggui-stack__label",children:"live sessions"}),i.jsxs("span",{className:"ggui-stack__count",children:[n.length,o&&n.length!==e.length?` / ${e.length}`:""]})]}),n.length===0?i.jsx("p",{className:"ggui-muted",style:{margin:0,padding:12},children:"No sessions match the filter."}):i.jsx("ul",{className:"ggui-stack__list",children:n.map((l,c)=>i.jsx(q7,{render:l,index:c+1},l.sessionId))})]})}function q7({render:e,index:n}){const o=e.sessionId.slice(0,8),l=e.status==="active"?"live":e.status==="expired"?"signal":"ink";return i.jsxs("li",{"data-ggui-session-id":e.sessionId,"data-ggui-session-status":e.status,className:"ggui-stack__entry",children:[i.jsxs("div",{className:"ggui-stack__entry-head",children:[i.jsx("span",{className:"ggui-stack__entry-num",children:`SES / ${String(n).padStart(2,"0")}`}),i.jsxs("span",{className:"ggui-stack__entry-title",children:[i.jsx("code",{className:"ggui-code",children:o}),"…"]}),i.jsx(Me,{tone:l,children:e.status})]}),i.jsxs("div",{className:"ggui-stack__entry-meta",children:[i.jsxs("span",{children:["app ",i.jsx("code",{className:"ggui-code",children:e.appId})]}),i.jsxs("span",{style:{marginLeft:12},children:["last active"," ",i.jsx("code",{className:"ggui-code",children:P7(e.lastActivityAt)})]})]}),i.jsx("div",{style:{marginTop:12,display:"flex",gap:10,alignItems:"center"},children:e.shortCode?i.jsxs("span",{children:["shortCode"," ",i.jsx("code",{className:"ggui-code",children:e.shortCode})]}):i.jsxs("span",{className:"ggui-muted",children:["No shortCode — render via"," ",i.jsx("code",{className:"ggui-code",children:"ggui_render"})," to mint one."]})})]})}function P7(e){const n=Date.now()-e;if(n<0)return"just now";const o=Math.floor(n/1e3);if(o<5)return"just now";if(o<60)return`${o}s ago`;const l=Math.floor(o/60);if(l<60)return`${l}m ago`;const c=Math.floor(l/60);if(c<24)return`${c}h ago`;const u=new Date(e),d=p=>p<10?`0${p}`:String(p);return`${u.getFullYear()}-${d(u.getMonth()+1)}-${d(u.getDate())}`}function Z7(){return i.jsxs("div",{className:"ggui-card",children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:"empty"}),i.jsx("span",{className:"ggui-card__num",children:"SES / 00"})]}),i.jsxs("div",{className:"ggui-card__body",children:[i.jsx("p",{className:"ggui-body",children:"No sessions yet."}),i.jsxs("p",{className:"ggui-muted",children:["Render from an agent (",i.jsx("code",{className:"ggui-code",children:"ggui_render"}),") to start a generation — new sessions appear here on reload."]})]})]})}function Lv({title:e,num:n,tone:o,children:l}){return i.jsxs("div",{className:"ggui-card",children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:e}),i.jsx("span",{className:"ggui-card__num",children:n})]}),i.jsxs("div",{className:"ggui-card__body",children:[i.jsx("p",{className:"ggui-body",children:i.jsx(Me,{tone:o,children:e})}),i.jsx("p",{className:"ggui-muted",children:l})]})]})}function G7(){const[e,n]=D.useState({kind:"loading"}),[o,l]=D.useState({kind:"loading"});return D.useEffect(()=>{const c=new AbortController;return(async()=>{try{const u=await fetch("/ggui/console/info",{signal:c.signal,headers:{accept:"application/json"}});if(!u.ok){n({kind:"error",message:`server returned ${u.status}`});return}const d=await u.json();n({kind:"ok",info:d})}catch(u){if(c.signal.aborted)return;n({kind:"error",message:String(u)})}})(),(async()=>{try{const u=await fetch("/ggui/console/sessions?limit=3",{signal:c.signal,headers:{accept:"application/json"}});if(!u.ok){l({kind:"error"});return}const d=await u.json();l({kind:"ok",data:d})}catch{c.signal.aborted||l({kind:"error"})}})(),()=>c.abort()},[]),i.jsxs("section",{className:"ggui-section","data-ggui-status-dashboard":!0,children:[i.jsx(ot,{num:"01 / status",title:"What's this server doing right now?",mute:"Every card reads a local endpoint. No hosted calls.",intro:i.jsxs(i.Fragment,{children:["Reloads on demand — console is an operator surface, not a live feed. Nav above points at the other pages:"," ",i.jsx("code",{className:"ggui-code",children:"playground"}),","," ",i.jsx("code",{className:"ggui-code",children:"blueprints"}),","," ",i.jsx("code",{className:"ggui-code",children:"tools"}),","," ",i.jsx("code",{className:"ggui-code",children:"config"}),"."]})}),i.jsx(Q7,{state:o}),i.jsxs("div",{className:"ggui-status-grid",children:[i.jsx(F7,{state:e}),i.jsx(Y7,{state:e}),i.jsx(K7,{state:e}),i.jsx(X7,{state:e})]})]})}function F7({state:e}){return i.jsx(vn,{num:"SRV / 01",title:"server",children:e.kind==="ok"?i.jsx(i.Fragment,{children:i.jsxs("dl",{className:"ggui-kv",children:[i.jsxs("div",{children:[i.jsx("dt",{children:"name"}),i.jsx("dd",{children:e.info.server})]}),i.jsxs("div",{children:[i.jsx("dt",{children:"version"}),i.jsx("dd",{children:i.jsx("code",{className:"ggui-code",children:e.info.version})})]}),e.info.description?i.jsxs("div",{children:[i.jsx("dt",{children:"description"}),i.jsx("dd",{children:e.info.description})]}):null]})}):e.kind==="loading"?i.jsx("p",{className:"ggui-muted",children:"Loading server identity…"}):i.jsxs("p",{className:"ggui-muted",children:["Couldn't reach ",i.jsx("code",{className:"ggui-code",children:"/ggui/console/info"})," ","— ",e.message,"."]})})}function Y7({state:e}){if(e.kind!=="ok")return i.jsx(vn,{num:"PAR / 01",title:"pairing",children:i.jsx("p",{className:"ggui-muted",children:e.kind==="loading"?"Loading…":"Unavailable."})});const{enabled:n,pending:o}=e.info.pairing;if(!n)return i.jsxs(vn,{num:"PAR / 01",title:"pairing",children:[i.jsx("p",{className:"ggui-body",children:i.jsx(Me,{tone:"ink",children:"disabled"})}),i.jsxs("p",{className:"ggui-muted",children:["This server was composed with"," ",i.jsx("code",{className:"ggui-code",children:"pairing: false"}),". Pass"," ",i.jsx("code",{className:"ggui-code",children:"pairing: true"})," at boot to enable per-device auth."]})]});if(!o)return i.jsxs(vn,{num:"PAR / 01",title:"pairing",children:[i.jsx("p",{className:"ggui-body",children:i.jsx(Me,{tone:"live",children:"idle"})}),i.jsxs("p",{className:"ggui-muted",children:["Pairing is enabled. No pair code is pending — mint one via the CLI (",i.jsx("code",{className:"ggui-code",children:"ggui pair"}),") or the admin route."]})]});const l=Math.max(0,Math.round((o.codeExpiresAt-Date.now())/1e3));return i.jsxs(vn,{num:"PAR / 01",title:"pairing",children:[i.jsx("p",{className:"ggui-body",children:i.jsx(Me,{tone:"draft",children:"pending"})}),i.jsx("p",{className:"ggui-code",style:{fontSize:24,letterSpacing:"0.08em",margin:"8px 0"},children:o.code}),i.jsxs("p",{className:"ggui-muted",children:["Valid for ",i.jsxs("code",{className:"ggui-code",children:[l,"s"]}),". Paste into a paired client or"," ",i.jsx("code",{className:"ggui-code",children:"POST /pair"})," with the bearer."]})]})}function K7({state:e}){if(e.kind!=="ok")return i.jsx(vn,{num:"CAP / 01",title:"capabilities",children:i.jsx("p",{className:"ggui-muted",children:e.kind==="loading"?"Loading…":"Unavailable."})});const n=e.info.capabilities;return i.jsx(vn,{num:"CAP / 01",title:"capabilities",children:i.jsxs("dl",{className:"ggui-kv",children:[i.jsxs("div",{children:[i.jsx("dt",{children:"tools"}),i.jsx("dd",{children:i.jsx("code",{className:"ggui-code",children:n.toolCount})})]}),i.jsxs("div",{children:[i.jsx("dt",{children:"blueprints"}),i.jsx("dd",{children:i.jsx("code",{className:"ggui-code",children:n.blueprintCount})})]}),i.jsxs("div",{children:[i.jsx("dt",{children:"primitives"}),i.jsx("dd",{children:i.jsx("code",{className:"ggui-code",children:n.primitiveCount})})]}),i.jsxs("div",{children:[i.jsx("dt",{children:"agent"}),i.jsx("dd",{children:i.jsx(Me,{tone:n.agentWired?"live":"ink",children:n.agentWired?"wired":"off"})})]}),i.jsxs("div",{children:[i.jsx("dt",{children:"generation"}),i.jsx("dd",{children:J7(n.generation)})]})]})})}function J7(e){return e.wired?e.hasCredentials?i.jsx(Me,{tone:"live",children:"ready"}):i.jsx(Me,{tone:"draft",children:"needs key"}):i.jsx(Me,{tone:"ink",children:"off"})}function X7({state:e}){if(e.kind!=="ok")return i.jsx(vn,{num:"STG / 01",title:"storage",children:i.jsx("p",{className:"ggui-muted",children:e.kind==="loading"?"Loading…":"Unavailable."})});const n=e.info.storage,o=l=>l==="custom"?"live":"draft";return i.jsxs(vn,{num:"STG / 01",title:"storage",children:[i.jsxs("dl",{className:"ggui-kv",children:[i.jsxs("div",{children:[i.jsx("dt",{children:"renders"}),i.jsx("dd",{children:i.jsx(Me,{tone:o(n.renderStore),children:n.renderStore})})]}),i.jsxs("div",{children:[i.jsx("dt",{children:"vectors"}),i.jsx("dd",{children:i.jsx(Me,{tone:o(n.vectorStore),children:n.vectorStore})})]})]}),i.jsxs("p",{className:"ggui-muted",style:{marginTop:12},children:[i.jsx("code",{className:"ggui-code",children:"memory"})," = in-process default (loss on restart). ",i.jsx("code",{className:"ggui-code",children:"custom"})," = operator-wired store."]})]})}function Q7({state:e}){if(e.kind==="loading")return i.jsx("div",{className:"ggui-status-hero","data-ggui-status-hero":"loading",children:i.jsx("p",{className:"ggui-muted",children:"Loading live sessions…"})});if(e.kind==="error")return i.jsx("div",{className:"ggui-status-hero","data-ggui-status-hero":"error",children:i.jsxs("p",{className:"ggui-muted",children:["Couldn't reach ",i.jsx("code",{className:"ggui-code",children:"/ggui/console/sessions"}),"."]})});if(e.data.sessions.length===0)return i.jsxs("div",{className:"ggui-status-hero ggui-status-hero--empty","data-ggui-status-hero":"empty",children:[i.jsx("div",{className:"ggui-status-hero__head",children:i.jsxs("span",{className:"ggui-status-hero__eyebrow",children:[i.jsx(Me,{tone:"ink",children:"idle"}),i.jsx("span",{children:"live sessions"})]})}),i.jsxs("p",{className:"ggui-muted",style:{margin:0},children:["No sessions yet. Open"," ",i.jsx("button",{type:"button",className:"ggui-link",onClick:()=>Ve("/"),children:"playground"})," ","to start one, or point an agent at"," ",i.jsx("code",{className:"ggui-code",children:"ggui_render"}),"."]})]});const n=e.data.sessions,o=n.slice(0,3);return i.jsxs("div",{className:"ggui-status-hero ggui-status-hero--active","data-ggui-status-hero":"active","data-ggui-live-session-count":String(n.length),children:[i.jsx("div",{className:"ggui-status-hero__head",children:i.jsxs("span",{className:"ggui-status-hero__eyebrow",children:[i.jsx(Me,{tone:"live",children:"live"}),i.jsxs("span",{children:[n.length," ",n.length===1?"session":"sessions"]})]})}),i.jsx("ul",{className:"ggui-status-hero__list",children:o.map(l=>i.jsx("li",{className:"ggui-status-hero__row","data-ggui-dashboard-session-id":l.sessionId,children:i.jsxs("div",{className:"ggui-status-hero__row-main",children:[l.shortCode?i.jsx("code",{className:"ggui-code","data-ggui-status-hero-shortcode":l.shortCode,children:l.shortCode}):i.jsxs("code",{className:"ggui-code",children:[l.sessionId.slice(0,8),"…"]}),i.jsx("span",{className:"ggui-muted",children:W7(l.lastActivityAt)})]})},l.sessionId))}),n.length>o.length?i.jsx("div",{className:"ggui-status-hero__foot",children:i.jsxs("button",{type:"button",className:"ggui-link",onClick:()=>Ve("/admin/sessions"),children:["view all ",n.length," →"]})}):i.jsx("div",{className:"ggui-status-hero__foot",children:i.jsx("button",{type:"button",className:"ggui-link",onClick:()=>Ve("/admin/sessions"),children:"view all →"})})]})}function W7(e){const n=Date.now()-e;if(n<0)return"just now";const o=Math.floor(n/1e3);if(o<5)return"just now";if(o<60)return`${o}s ago`;const l=Math.floor(o/60);if(l<60)return`${l}m ago`;const c=Math.floor(l/60);if(c<24)return`${c}h ago`;const u=new Date(e),d=p=>p<10?`0${p}`:String(p);return`${u.getFullYear()}-${d(u.getMonth()+1)}-${d(u.getDate())}`}function vn({num:e,title:n,children:o}){return i.jsxs("div",{className:"ggui-card",children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:n}),i.jsx("span",{className:"ggui-card__num",children:e})]}),i.jsx("div",{className:"ggui-card__body",children:o})]})}function ez(e){const n=e.$value;if(Array.isArray(n))return n.join(", ");if(n!==null&&typeof n=="object"){const o=n;if(e.$type==="shadow"&&"offsetX"in o)return`${o.offsetX} ${o.offsetY} ${o.blur} ${o.spread} ${o.color}`;if(e.$type==="transition"&&"duration"in o&&"timingFunction"in o)return`${typeof o.property=="string"&&o.property?`${o.property} `:""}${o.duration} ${o.timingFunction}`}return String(n)}function tr(e,n,o){for(const[l,c]of Object.entries(e))l.startsWith("$")||(c!==null&&typeof c=="object"&&"$value"in c?o.push(` --ggui-${n}-${l}: ${ez(c)};`):c!==null&&typeof c=="object"&&tr(c,`${n}-${l}`,o))}function tz(e){const n=[];return tr(e.color,"color",n),tr(e.font,"font",n),tr(e.spacing,"spacing",n),tr(e.shape,"shape",n),tr({duration:e.motion.duration,easing:e.motion.easing,transition:e.motion.transition},"motion",n),tr(e.accessibility,"accessibility",n),tr(e.zIndex,"zIndex",n),n.join(`
216
- `)}function az(e,n){const o=/([\d.]+%|from|to)\s*\{([^}]*)\}/g,l=[];let c;for(;(c=o.exec(n))!==null;){const u=c[1],p=c[2].trim().split(";").map(g=>g.trim()).filter(Boolean).map(g=>g.endsWith(";")?g:`${g};`).join(" ");l.push(` ${u} { ${p} }`)}return`@keyframes ggui-${e} {
217
- ${l.join(`
218
- `)}
219
- }`}function nz(e){const n=[];for(const[o,l]of Object.entries(e.motion.keyframes))o.startsWith("$")||n.push(az(o,String(l.$value)));return n.join(`
220
-
221
- `)}function rz(e,n){const l=`:root {
222
- ${tz(n)}
223
- }`,c=nz(n),u=c?`${l}
224
-
225
- ${c}`:l;return{id:e,name:n.$name,description:n.$description,metadata:n.$metadata,cssVariables:l,cssKeyframes:c,css:u}}const Ft={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"}}}},at={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"}}}},ua={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}},Bc={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)"}},cr={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:Bc,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"}}}},iz={$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:"#a87b0e",$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:"#d93822",$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:cr.font,spacing:cr.spacing,shape:cr.shape,motion:cr.motion,accessibility:{...at.light,focusRing:{...at.light.focusRing,color:{$type:"color",$value:"#292929"}}},zIndex:ua},oz={$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:cr.font,spacing:cr.spacing,shape:cr.shape,motion:cr.motion,accessibility:{...at.dark,focusRing:{...at.dark.focusRing,color:{$type:"color",$value:"#f4f3ed"}}},zIndex:ua},lz={light:iz,dark:oz},ur={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)"}}}},sz={$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:"#0e7490",$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:"#55556a",$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:ur.font,spacing:ur.spacing,shape:ur.shape,motion:ur.motion,accessibility:{...at.light,focusRing:{...at.light.focusRing,color:{$type:"color",$value:"#06b6d4"}}},zIndex:ua},cz={$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:"#55556a",$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:ur.font,spacing:ur.spacing,shape:ur.shape,motion:ur.motion,accessibility:{...at.dark,focusRing:{...at.dark.focusRing,color:{$type:"color",$value:"#22d3ee"}}},zIndex:ua},uz={light:sz,dark:cz},dr={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)"}}}},dz={$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:"#9a9084",$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:"#6b8f5e"},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:"#c9a84c"},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:dr.font,spacing:dr.spacing,shape:dr.shape,motion:dr.motion,accessibility:{...at.light,focusRing:{...at.light.focusRing,color:{$type:"color",$value:"#748660"}}},zIndex:ua},fz={$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:"#cf6f6a"},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:dr.font,spacing:dr.spacing,shape:dr.shape,motion:dr.motion,accessibility:{...at.dark,focusRing:{...at.dark.focusRing,color:{$type:"color",$value:"#93a17c"}}},zIndex:ua},pz={light:dz,dark:fz},fr={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"}}}},gz={$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:"#be185d",$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:"#5a5a68",$type:"color"},600:{$value:"#8a8a9a",$type:"color"},700:{$value:"#b0b0be",$type:"color"},800:{$value:"#d4d4de",$type:"color"},900:{$value:"#ececf0",$type:"color"}},success:{...Ft.dark.success,500:{$value:"#34d399",$type:"color"}},warning:{...Ft.dark.warning,500:{$value:"#fbbf24",$type:"color"}},error:{...Ft.dark.error,500:{$value:"#f87171",$type:"color"}},info:{...Ft.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:"#09090b",$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:fr.font,spacing:fr.spacing,shape:fr.shape,motion:fr.motion,accessibility:{...at.dark,focusRing:{...at.dark.focusRing,color:{$value:"#ec4899",$type:"color"}}},zIndex:ua},mz={$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:{...Ft.dark.success,500:{$value:"#5ee0ad",$type:"color"}},warning:{...Ft.dark.warning,500:{$value:"#ffd24a",$type:"color"}},error:{...Ft.dark.error,500:{$value:"#ff8a8a",$type:"color"}},info:{...Ft.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:fr.font,spacing:fr.spacing,shape:fr.shape,motion:fr.motion,accessibility:{...at.dark,focusRing:{...at.dark.focusRing,color:{$value:"#f472b6",$type:"color"}}},zIndex:ua},hz={light:gz,dark:mz},pr={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:Bc}},yz={$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:"#bfaa80",$type:"color"},600:{$value:"#9a8660",$type:"color"},700:{$value:"#746448",$type:"color"},800:{$value:"#504530",$type:"color"},900:{$value:"#352e20",$type:"color"}},success:Ft.light.success,warning:Ft.light.warning,error:Ft.light.error,info:Ft.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:"#fefcf8",$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:pr.font,spacing:pr.spacing,shape:pr.shape,motion:pr.motion,accessibility:{...at.light,focusRing:{...at.light.focusRing,color:{$type:"color",$value:"#16a34a"}}},zIndex:ua},vz={$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:Ft.dark.success,warning:Ft.dark.warning,error:Ft.dark.error,info:Ft.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:pr.font,spacing:pr.spacing,shape:pr.shape,motion:pr.motion,accessibility:{...at.dark,focusRing:{...at.dark.focusRing,color:{$type:"color",$value:"#4ade80"}}},zIndex:ua},$z={light:yz,dark:vz},bz={...Bc,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)"}},gr={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:bz}},xz={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"}},_z={$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:{...xz},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:"#6b8e3d",$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:"#c98e2e",$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:"#faf9f5",$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:gr.font,spacing:gr.spacing,shape:gr.shape,motion:gr.motion,accessibility:{...at.light,focusRing:{...at.light.focusRing,color:{$type:"color",$value:"#cc785c"}}},zIndex:ua},jz={$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:"#d56b59",$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:gr.font,spacing:gr.spacing,shape:gr.shape,motion:gr.motion,accessibility:{...at.dark,focusRing:{...at.dark.focusRing,color:{$type:"color",$value:"#d6896c"}}},zIndex:ua},Sz={light:_z,dark:jz},mr={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:Bc}},wz={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"}},kz={$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:{...wz},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:"#0e9d6e",$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:"#e08515",$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:mr.font,spacing:mr.spacing,shape:mr.shape,motion:mr.motion,accessibility:{...at.light,focusRing:{...at.light.focusRing,color:{$type:"color",$value:"#4f46e5"}}},zIndex:ua},Nz={$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:"#5e5c70",$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:mr.font,spacing:mr.spacing,shape:mr.shape,motion:mr.motion,accessibility:{...at.dark,focusRing:{...at.dark.focusRing,color:{$type:"color",$value:"#818cf8"}}},zIndex:ua},zz={light:kz,dark:Nz},$$=new Map([["ggui",lz],["indigo",zz],["claudic",Sz],["premium-cyberpunk",uz],["premium-zen",pz],["premium-neon-noir",hz],["premium-botanical",$z]]);function Ez(e,n){return n==="dark"&&e.dark?"dark":"light"}function b$(e,n="light"){const o=$$.get(e);return o?Ez(o,n)==="dark"?o.dark:o.light:void 0}function Cz(){const e=[];for(const[n,o]of $$){const l=o.dark?["light","dark"]:["light"];e.push({id:n,name:o.light.$name,description:o.light.$description,metadata:o.light.$metadata,modes:l})}return e}D.createContext(null);function Tz(e,n){return e===null?{presetId:n,mode:"light",fromFile:!1,overrides:{}}:typeof e=="string"?{presetId:e,mode:"light",fromFile:!1,overrides:{}}:"file"in e?{presetId:n,mode:e.mode??"light",fromFile:!0,overrides:{}}:{presetId:e.preset,mode:e.mode??"light",fromFile:!1,overrides:e.overrides??{}}}function Mz(e,n,o){const l=Object.keys(o);if(l.length===0)return{preset:e,mode:n};l.sort();const c={};for(const u of l)c[u]=o[u];return{preset:e,mode:n,overrides:c}}function Oz(){var _;const e=D.useMemo(()=>Cz(),[]),n=((_=e[0])==null?void 0:_.id)??"ggui",[o,l]=D.useState({kind:"loading"}),[c,u]=D.useState(n),[d,p]=D.useState("light"),[g,h]=D.useState(!1),[y,v]=D.useState(null),[j,k]=D.useState(!1),[x,E]=D.useState({}),z=async()=>{l(S=>S.kind==="ready"?S:{kind:"loading"});try{const S=await fetch("/ggui/console/theme",{credentials:"include",headers:{accept:"application/json"}});if(S.status===401){Ve(`/admin-login?next=${encodeURIComponent("/admin/theme")}`);return}if(!S.ok){l({kind:"error",message:`server returned ${S.status}`});return}const C=await S.json();l({kind:"ready",data:C});const U=Tz(C.current,n);u(U.presetId),p(U.mode),k(U.fromFile),E({...U.overrides})}catch(S){l({kind:"error",message:String(S)})}};D.useEffect(()=>{z()},[]);const w=(S,C)=>{E(U=>{const te={...U};return C===null||C===""?delete te[S]:te[S]=C,te})},$=()=>{E({})},N=async S=>{if(o.kind==="ready"){v(null),h(!0);try{const C=await S.text();let U;try{U=JSON.parse(C)}catch(Y){v(`upload failed — file is not valid JSON: ${String(Y)}`);return}const te=S.name.replace(/[^a-zA-Z0-9._-]/g,"-"),G=/\.json$/i.test(te)?te:`${te}.json`,H=await fetch("/ggui/console/theme/upload",{method:"POST",credentials:"include",headers:{"content-type":"application/json",accept:"application/json"},body:JSON.stringify({filename:G,content:U,mode:d})});if(H.status===401){Ve(`/admin-login?next=${encodeURIComponent("/admin/theme")}`);return}if(H.status===400){const Y=await H.json();v(Y.message??`upload rejected — ${Y.error??"invalid_content"}: ${JSON.stringify(Y.issue)}`);return}if(H.status===501){const Y=await H.json();v(Y.message??"Theme uploads need the CLI’s themeFileUploader — launch via `ggui serve`.");return}if(!H.ok){v(`upload failed — server returned ${H.status}`);return}await z()}catch(C){v(`upload failed — ${String(C)}`)}finally{h(!1)}}},R=async()=>{if(o.kind==="ready"){v(null),h(!0);try{const S=await fetch("/ggui/console/theme",{method:"POST",credentials:"include",headers:{"content-type":"application/json",accept:"application/json"},body:JSON.stringify(Mz(c,d,x))});if(S.status===401){Ve(`/admin-login?next=${encodeURIComponent("/admin/theme")}`);return}if(S.status===501){const C=await S.json();v(C.message??"Theme writes need the CLI’s themeWriter — launch via `ggui serve`.");return}if(!S.ok){v(`save failed — server returned ${S.status}`);return}await z()}catch(S){v(`save failed — ${String(S)}`)}finally{h(!1)}}};return i.jsxs("section",{className:"ggui-section",children:[i.jsx(ot,{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:i.jsxs(i.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"," ",i.jsx("code",{className:"ggui-code",children:"ggui.json"})," and takes effect on the next generation."]})}),o.kind==="loading"?i.jsx("p",{className:"ggui-muted",style:{margin:0,padding:12},children:"Loading themes…"}):o.kind==="error"?i.jsxs("p",{className:"ggui-muted",style:{margin:0,padding:12},"data-ggui-theme-error":!0,children:["Couldn’t load theme state — ",o.message]}):i.jsx(Rz,{presets:e,selectedPresetId:c,mode:d,writerEnabled:o.data.writerEnabled,uploadEnabled:o.data.uploadEnabled??!1,fromFile:j,busy:g,err:y,overrides:x,onSelectPreset:u,onSelectMode:p,onSetOverride:w,onClearAllOverrides:$,onSave:()=>{R()},onUploadFile:S=>{N(S)}})]})}function Rz({presets:e,selectedPresetId:n,mode:o,writerEnabled:l,uploadEnabled:c,fromFile:u,busy:d,err:p,overrides:g,onSelectPreset:h,onSelectMode:y,onSetOverride:v,onClearAllOverrides:j,onSave:k,onUploadFile:x}){const E=e.find(N=>N.id===n),z=(E==null?void 0:E.modes.includes("dark"))??!1,w=o==="dark"&&!z?"light":o,$=b$(n,w);return i.jsxs("div",{"data-ggui-theme-layout":!0,style:{display:"flex",gap:16,alignItems:"flex-start"},children:[i.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:[i.jsxs("div",{className:"ggui-stack__head",style:{display:"flex",alignItems:"center",gap:8},children:[i.jsx("span",{className:"ggui-stack__num",children:"THM"}),i.jsx("span",{className:"ggui-stack__label",children:"mode"}),i.jsxs("span",{style:{marginLeft:"auto",display:"inline-flex",gap:8},children:[i.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost","data-ggui-theme-mode":"light",onClick:()=>y("light"),...w==="light"?{"aria-pressed":!0}:{},style:w==="light"?{fontWeight:600}:void 0,children:"◐ Light"}),i.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost","data-ggui-theme-mode":"dark",onClick:()=>y("dark"),disabled:!z,title:z?"Switch to dark variant":"This preset hasn’t shipped a dark variant yet",...w==="dark"?{"aria-pressed":!0}:{},style:w==="dark"?{fontWeight:600}:void 0,children:"◑ Dark"})]})]}),u?i.jsxs("p",{className:"ggui-muted",style:{margin:0,fontSize:12},children:["⚠ Current selection is a file-form theme (",i.jsx("code",{className:"ggui-code",children:'{ file: "..." }'}),"). Saving a preset below will replace it."]}):null,l?null:i.jsxs("p",{className:"ggui-muted",style:{margin:0,fontSize:12},children:["Read-only — launch via ",i.jsx("code",{className:"ggui-code",children:"ggui serve"})," ","to enable saves."]}),i.jsx("div",{"data-ggui-theme-grid":!0,style:{display:"flex",flexDirection:"column",gap:6},children:e.map(N=>i.jsx(Vz,{preset:N,selected:N.id===n,mode:w,onSelect:()=>h(N.id)},N.id))}),i.jsx("div",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap",paddingTop:4,borderTop:"1px solid currentColor",marginTop:4,opacity:.95},children:i.jsxs("button",{type:"button",className:"ggui-btn","data-ggui-theme-save":!0,disabled:d||!l,onClick:k,style:{flex:1},children:[i.jsx("span",{className:"ggui-btn__dot","aria-hidden":!0}),d?"saving…":"Save to ggui.json"]})}),i.jsxs("p",{className:"ggui-muted",style:{margin:0,fontSize:11,lineHeight:1.4},children:[i.jsx("code",{className:"ggui-code",children:n})," ","· ",i.jsx("code",{className:"ggui-code",children:w}),Object.keys(g).length>0?i.jsxs(i.Fragment,{children:[" ","· ",i.jsxs("code",{className:"ggui-code",children:["+",Object.keys(g).length," override",Object.keys(g).length===1?"":"s"]})]}):null,w!==o?i.jsxs(i.Fragment,{children:[" ","· requested ",i.jsx("code",{className:"ggui-code",children:o}),", fell back"]}):null]}),i.jsx(Uz,{uploadEnabled:c,busy:d,onUploadFile:x}),p?i.jsx("p",{className:"ggui-muted",style:{margin:0,color:"#c0392b",fontSize:12},"data-ggui-theme-error":!0,children:p}):null,$?i.jsx(Iz,{rawTheme:$,overrides:g,onSetOverride:v,onClearAll:j}):i.jsxs("p",{className:"ggui-muted",style:{margin:0,fontSize:12},children:["⚠ ",i.jsx("code",{className:"ggui-code",children:n})," isn’t registered on this build. Saving still writes the manifest; overrides require a recognised preset."]})]}),i.jsx("main",{"aria-label":"theme preview",style:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:12},children:$?i.jsx(Bz,{presetId:n,mode:w,rawTheme:$,overrides:g}):i.jsxs("div",{className:"ggui-card",children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:"preview unavailable"}),i.jsx("span",{className:"ggui-card__num",children:"PRV / 00"})]}),i.jsx("div",{className:"ggui-card__body",children:i.jsxs("p",{className:"ggui-muted",style:{margin:0},children:[i.jsx("code",{className:"ggui-code",children:n})," isn’t a registered preset on this build, so there’s no token tree to paint from. Pick another preset on the left."]})})]})})]})}function Az(e){const n=u=>{const d=u.$value;return typeof d=="string"?d:JSON.stringify(d)},o=(u,d)=>Object.keys(d).sort((g,h)=>{const y=Number(g),v=Number(h);return Number.isFinite(y)&&Number.isFinite(v)?y-v:g.localeCompare(h)}).map(g=>({path:`${u}.${g}`,value:n(d[g])})),l=[];l.push({label:"Color · Primary",prefix:"color.primary",leaves:o("color.primary",e.color.primary)}),l.push({label:"Color · Neutral",prefix:"color.neutral",leaves:o("color.neutral",e.color.neutral)}),l.push({label:"Color · Success",prefix:"color.success",leaves:o("color.success",e.color.success)}),l.push({label:"Color · Warning",prefix:"color.warning",leaves:o("color.warning",e.color.warning)}),l.push({label:"Color · Error",prefix:"color.error",leaves:o("color.error",e.color.error)}),l.push({label:"Color · Info",prefix:"color.info",leaves:o("color.info",e.color.info)}),l.push({label:"Color · Roles",prefix:"color",leaves:[{path:"color.surface",value:n(e.color.surface)},{path:"color.onSurface",value:n(e.color.onSurface)},{path:"color.surfaceVariant",value:n(e.color.surfaceVariant)},{path:"color.onSurfaceVariant",value:n(e.color.onSurfaceVariant)},{path:"color.container",value:n(e.color.container)},{path:"color.onContainer",value:n(e.color.onContainer)},{path:"color.outline",value:n(e.color.outline)},{path:"color.outlineVariant",value:n(e.color.outlineVariant)}]}),l.push({label:"Shape · Radius",prefix:"shape.radius",leaves:o("shape.radius",e.shape.radius)}),l.push({label:"Shape · Shadow",prefix:"shape.shadow",leaves:o("shape.shadow",e.shape.shadow)});const c=[{path:"font.family.sans",value:n(e.font.family.sans)}];return e.font.family.mono&&c.push({path:"font.family.mono",value:n(e.font.family.mono)}),l.push({label:"Font · Family",prefix:"font.family",leaves:c}),l.push({label:"Font · Size",prefix:"font.size",leaves:o("font.size",e.font.size)}),l.push({label:"Font · Weight",prefix:"font.weight",leaves:o("font.weight",e.font.weight)}),l.push({label:"Spacing",prefix:"spacing",leaves:o("spacing",e.spacing)}),l.filter(u=>u.leaves.length>0)}const Dz="https://github.com/ggui-ai/ggui/blob/main/design/CUSTOM_THEMES.md";function Uz({uploadEnabled:e,busy:n,onUploadFile:o}){return i.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?i.jsxs("label",{className:"ggui-btn ggui-btn--ghost","data-ggui-theme-upload":!0,style:{display:"inline-flex",alignItems:"center",gap:8,cursor:n?"not-allowed":"pointer",justifyContent:"center"},children:[i.jsx("input",{type:"file",accept:".json,application/json",disabled:n,onChange:l=>{var u;const c=(u=l.target.files)==null?void 0:u[0];c!==void 0&&o(c),l.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,i.jsx("a",{href:Dz,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 Iz({rawTheme:e,overrides:n,onSetOverride:o,onClearAll:l}){const c=D.useMemo(()=>Az(e),[e]),u=Object.keys(n).length;return i.jsxs("div",{"data-ggui-theme-overrides":!0,className:"ggui-stack",style:{marginTop:16},"aria-label":"theme token overrides",children:[i.jsxs("div",{className:"ggui-stack__head",children:[i.jsx("span",{className:"ggui-stack__num",children:"DTCG"}),i.jsx("span",{className:"ggui-stack__label",children:"overrides"}),i.jsxs("span",{className:"ggui-stack__count",children:[u," ",u===1?"override":"overrides"]}),u>0?i.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost","data-ggui-theme-overrides-clear":!0,onClick:l,style:{marginLeft:"auto"},children:"Clear all"}):null]}),i.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 ",i.jsx("code",{className:"ggui-code",children:"$value"}),"; type a CSS-valid replacement to override it. Per-leaf"," ",i.jsx("em",{children:"reset"})," clears that path; saving with no overrides writes the bare ",i.jsx("code",{className:"ggui-code",children:"{ preset, mode }"})," ","shape (no ",i.jsx("code",{className:"ggui-code",children:"overrides"})," field)."]}),c.map(d=>i.jsxs("details",{...d.prefix==="color.primary"?{open:!0}:{},style:{marginTop:8},children:[i.jsxs("summary",{style:{cursor:"pointer",padding:"6px 0",fontSize:13,fontWeight:500,userSelect:"none"},children:[d.label," ",i.jsxs("span",{className:"ggui-muted",style:{fontSize:11},children:["(",d.leaves.length,d.leaves.some(p=>p.path in n)?`, +${d.leaves.filter(p=>p.path in n).length} overridden`:"",")"]})]}),i.jsx("div",{style:{display:"grid",gap:6,gridTemplateColumns:"auto 1fr auto",padding:"8px 0 8px 12px",alignItems:"center",fontSize:12},children:d.leaves.map(p=>i.jsx(Lz,{path:p.path,presetValue:p.value,overrideValue:n[p.path]??null,onChange:o},p.path))})]},d.prefix))]})}function Lz({path:e,presetValue:n,overrideValue:o,onChange:l}){const c=o!==null,u=o??"";return i.jsxs("div",{"data-ggui-theme-override-leaf":e,style:{display:"contents"},children:[i.jsx("code",{className:"ggui-code",style:{fontSize:11,opacity:.85,padding:"2px 6px"},children:e}),i.jsx("input",{type:"text","data-ggui-theme-override-input":!0,value:u,placeholder:n,onChange:d=>{const p=d.target.value;l(e,p.length===0?null:p)},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:c?1:.85,outline:c?"1px solid currentColor":"none"},"aria-label":`override ${e}`}),i.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost","data-ggui-theme-override-reset":!0,onClick:()=>l(e,null),disabled:!c,style:{fontSize:11,padding:"2px 8px",opacity:c?1:.4,cursor:c?"pointer":"default"},title:c?"Reset this leaf to the preset value":"No override set on this leaf",children:"reset"})]})}function Vz({preset:e,selected:n,mode:o,onSelect:l}){var g;const c=e.modes.includes("dark"),u=b$(e.id,o),d=(g=u==null?void 0:u.color.primary["500"])==null?void 0:g.$value,p=u==null?void 0:u.color.surface.$value;return i.jsxs("button",{type:"button","data-ggui-theme-card":e.id,onClick:l,"aria-pressed":n,style:{display:"flex",alignItems:"center",gap:10,padding:"8px 10px",textAlign:"left",cursor:"pointer",border:n?"2px solid currentColor":"1px solid currentColor",borderRadius:6,background:"transparent",color:"inherit",opacity:n?1:.85},children:[i.jsxs("span",{"aria-hidden":!0,style:{display:"inline-flex",flexShrink:0,width:28,height:28,borderRadius:4,overflow:"hidden",border:"1px solid currentColor"},children:[i.jsx("span",{style:{flex:1,background:d??"#ccc"}}),i.jsx("span",{style:{flex:1,background:p??"#fff"}})]}),i.jsxs("span",{style:{flex:1,minWidth:0},children:[i.jsx("span",{style:{display:"block",fontSize:13,fontWeight:n?600:500},children:e.name}),i.jsxs("span",{className:"ggui-muted",style:{display:"block",fontSize:11,opacity:.75},children:[e.id==="claudic"?"claude.ai · ":"",c?"Light · Dark":"Light only"]})]})]})}function x$(e,n){if(Object.keys(n).length===0)return e;const o=structuredClone(e);for(const[l,c]of Object.entries(n)){const u=l.split(".");let d=o,p=!0;for(let y=0;y<u.length-1;y+=1){const v=u[y];if(v===void 0){p=!1;break}const j=d[v];if(j==null||typeof j!="object"){p=!1;break}d=j}if(!p)continue;const g=u[u.length-1];if(g===void 0)continue;const h=d[g];h===null||typeof h!="object"||(h.$value=c)}return o}function Bz({presetId:e,mode:n,rawTheme:o,overrides:l}){const c=D.useMemo(()=>`ggui-theme-preview-${e}-${n}`,[e,n]),u=D.useMemo(()=>{const d=x$(o,l),p=rz(e,d);return`${p.cssVariables.replace(/^:root\s*\{/,`.${c} {`)}
226
- ${p.cssKeyframes}`},[o,l,e,c]);return i.jsxs(i.Fragment,{children:[i.jsx("style",{"data-ggui-theme-preview-style":c,children:u}),i.jsxs("div",{"data-ggui-theme-preview":!0,className:c,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:[i.jsx(Hz,{presetName:o.$name,mode:n}),i.jsx(qz,{}),i.jsx(Pz,{}),i.jsx(Zz,{}),i.jsx(Gz,{theme:o,overrides:l}),i.jsx(Fz,{})]})]})}function Hz({presetName:e,mode:n}){return i.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:[i.jsx("span",{style:{fontSize:"var(--ggui-font-size-2xl, 1.5rem)",fontWeight:"var(--ggui-font-weight-semibold, 600)"},children:e}),i.jsx("span",{style:{fontSize:"var(--ggui-font-size-sm, 0.875rem)",color:"var(--ggui-color-onSurfaceVariant)",fontFamily:"var(--ggui-font-family-mono)"},children:n})]})}function qz(){return i.jsxs("section",{style:{display:"flex",flexDirection:"column",gap:8},children:[i.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"}),i.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"," ",i.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"," ",i.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."]}),i.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 Pz(){return i.jsxs("section",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:[i.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"}),i.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"}),i.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 Zz(){return i.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:[i.jsx("strong",{style:{fontSize:"var(--ggui-font-size-lg, 1.125rem)",fontWeight:"var(--ggui-font-weight-semibold, 600)"},children:"Container card"}),i.jsxs("span",{style:{fontSize:"var(--ggui-font-size-sm, 0.875rem)"},children:["Painted with ",i.jsx("code",{style:{fontFamily:"var(--ggui-font-family-mono)"},children:"color.container"})," ","+ ",i.jsx("code",{style:{fontFamily:"var(--ggui-font-family-mono)"},children:"color.onContainer"})," ","— the role pair generated UIs reach for to highlight primary-tinted content."]}),i.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 Gz({theme:e,overrides:n}){const o=D.useMemo(()=>x$(e,n),[e,n]),l=(c,u,d)=>{const p=Object.keys(u).sort((g,h)=>{{const y=Number(g),v=Number(h);if(Number.isFinite(y)&&Number.isFinite(v))return y-v}return g.localeCompare(h)});return i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[i.jsx("span",{style:{width:64,fontSize:"var(--ggui-font-size-sm, 0.875rem)",color:"var(--ggui-color-onSurfaceVariant)"},children:c}),i.jsx("div",{style:{display:"flex",flex:1,borderRadius:"var(--ggui-shape-radius-sm, 4px)",overflow:"hidden",border:"1px solid var(--ggui-color-outlineVariant)"},children:p.map(g=>{const h=u[g];return h?i.jsx("span",{title:`${c.toLowerCase()}.${g} · ${h.$value}`,style:{flex:1,height:24,background:h.$value}},g):null})})]})};return i.jsxs("section",{style:{display:"flex",flexDirection:"column",gap:8},children:[i.jsx("strong",{style:{fontSize:"var(--ggui-font-size-sm, 0.875rem)",color:"var(--ggui-color-onSurfaceVariant)",textTransform:"uppercase",letterSpacing:"0.06em"},children:"Color ramps"}),l("Primary",o.color.primary),l("Neutral",o.color.neutral)]})}function Fz(){const e=(n,o)=>i.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:"var(--ggui-font-size-sm, 0.875rem)"},children:[i.jsx("span",{"aria-hidden":!0,style:{width:12,height:12,borderRadius:"50%",background:n,border:"1px solid var(--ggui-color-outline)"}}),i.jsx("span",{style:{color:"var(--ggui-color-onSurfaceVariant)"},children:o})]});return i.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")]})}const _$={kind:"admin-index"};function Yz(){return typeof window>"u"?_$:tx(window.location.pathname)}function Kz(){return _$}function Jz(){const e=D.useSyncExternalStore(ax,Yz,Kz);return e.kind==="blueprint"?i.jsx(Ht,{route:e,variant:"narrow",children:i.jsx(nN,{blueprintId:e.blueprintId})}):e.kind==="admin-index"||e.kind==="admin-status"?i.jsx(Ht,{route:e,variant:"admin",children:i.jsx(G7,{})}):e.kind==="admin-sessions"?i.jsx(Ht,{route:e,variant:"admin",children:i.jsx(B7,{})}):e.kind==="admin-blueprints"?i.jsx(Ht,{route:e,variant:"admin",children:i.jsx(lN,{})}):e.kind==="admin-variants"?i.jsx(Ht,{route:e,variant:"admin",children:i.jsx(MN,{})}):e.kind==="admin-variant-detail"?i.jsx(Ht,{route:e,variant:"admin",children:i.jsx(kN,{contractHash:e.contractHash})}):e.kind==="admin-variant-generate"?i.jsx(Ht,{route:e,variant:"admin",children:i.jsx(zN,{contractHash:e.contractHash})}):e.kind==="admin-config"?i.jsx(Ht,{route:e,variant:"admin",children:i.jsx(LN,{})}):e.kind==="admin-tools"?i.jsx(Ht,{route:e,variant:"admin",children:i.jsx(I7,{})}):e.kind==="admin-llm-keys"?i.jsx(Ht,{route:e,variant:"admin",children:i.jsx($x,{})}):e.kind==="admin-connector-keys"?i.jsx(Ht,{route:e,variant:"admin",children:i.jsx(O7,{})}):e.kind==="admin-oauth-providers"?i.jsx(Ht,{route:e,variant:"admin",children:i.jsx(jx,{})}):e.kind==="admin-clients"?i.jsx(Ht,{route:e,variant:"admin",children:i.jsx(ON,{})}):e.kind==="admin-theme"?i.jsx(Ht,{route:e,variant:"admin",children:i.jsx(Oz,{})}):e.kind==="admin-login"?i.jsx(Ht,{route:e,variant:"narrow",children:i.jsx(hx,{})}):Vv(e)?i.jsx(Ht,{route:e,variant:"devtools",children:i.jsx(M7,{route:e})}):i.jsx(Ht,{route:e,variant:"narrow",children:i.jsx(Xz,{pathname:e.pathname})})}function Xz({pathname:e}){return i.jsxs("section",{className:"ggui-section",children:[i.jsx(ot,{num:"404 / not found",title:"Nothing lives here.",mute:"This is an operator-only server.",intro:i.jsxs(i.Fragment,{children:[i.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."]})}),i.jsxs("div",{className:"ggui-card",children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:"routes"}),i.jsx("span",{className:"ggui-card__num",children:"RTE / 01"})]}),i.jsxs("div",{className:"ggui-card__body",children:[i.jsxs("ul",{style:{listStyle:"none",padding:0,margin:0,display:"grid",gap:10},children:[i.jsx("li",{children:i.jsxs("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:()=>Ve("/admin/status"),children:[i.jsx("span",{className:"ggui-btn__dot","aria-hidden":!0}),"/ admin"]})}),i.jsx("li",{children:i.jsxs("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:()=>Ve("/admin-login"),children:[i.jsx("span",{className:"ggui-btn__dot","aria-hidden":!0}),"/ admin-login"]})})]}),i.jsxs("p",{className:"ggui-muted",children:["The"," ",i.jsx("code",{className:"ggui-code",children:"/preview/<blueprintId>"})," ","route requires a real id — paste a blueprint id registered in ",i.jsx("code",{className:"ggui-code",children:"ggui.json"}),"."]})]})]})]})}const j$=document.getElementById("root");if(!j$)throw new Error("console: #root element missing from index.html");Wb.createRoot(j$).render(i.jsx(D.StrictMode,{children:i.jsx(Jz,{})}));export{al as g,Jb as r};