@ggui-ai/console 0.5.0-rc.2 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
var tx=Object.defineProperty;var ax=(e,n,o)=>n in e?tx(e,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[n]=o;var gn=(e,n,o)=>ax(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 nf={exports:{}},Po={};/**
|
|
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 hh;function nx(){if(hh)return Po;hh=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 Po.Fragment=n,Po.jsx=o,Po.jsxs=o,Po}var yh;function rx(){return yh||(yh=1,nf.exports=nx()),nf.exports}var i=rx(),rf={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 vh;function ix(){if(vh)return Ne;vh=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},I=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,D){var X=typeof T;(X==="undefined"||X==="boolean")&&(T=null);var pe=!1;if(T===null)pe=!0;else switch(X){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,D)}}if(pe)return D=D(T),pe=O===""?"."+ie(T,0):O,_(D)?(L="",pe!=null&&(L=pe.replace(F,"$&/")+"/"),ae(D,V,L,"",function(Te){return Te})):D!=null&&(H(D)&&(D=G(D,L+(D.key==null||T&&T.key===D.key?"":(""+D.key).replace(F,"$&/")+"/")+pe)),V.push(D)),1;pe=0;var he=O===""?".":O+":";if(_(T))for(var Se=0;Se<T.length;Se++)O=T[Se],X=he+ie(O,Se),pe+=ae(O,V,L,X,D);else if(Se=k(T),typeof Se=="function")for(T=Se.call(T),Se=0;!(O=T.next()).done;)O=O.value,X=he+ie(O,Se++),pe+=ae(O,V,L,X,D);else if(X==="object"){if(typeof T.then=="function")return ae(_e(T),V,L,O,D);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 de(T,V,L){if(T==null)return T;var O=[],D=0;return ae(T,O,"","",function(X){return V.call(L,X,D++)}),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:de,forEach:function(T,V,L){de(T,function(){V.apply(this,arguments)},L)},count:function(T){var V=0;return de(T,function(){V++}),V},toArray:function(T){return de(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),D=T.key;if(V!=null)for(X in V.key!==void 0&&(D=""+V.key),V)!I.call(V,X)||X==="key"||X==="__self"||X==="__source"||X==="ref"&&V.ref===void 0||(O[X]=V[X]);var X=arguments.length-2;if(X===1)O.children=L;else if(1<X){for(var pe=Array(X),he=0;he<X;he++)pe[he]=arguments[he+2];O.children=pe}return te(T.type,D,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,D={},X=null;if(V!=null)for(O in V.key!==void 0&&(X=""+V.key),V)I.call(V,O)&&O!=="key"&&O!=="__self"&&O!=="__source"&&(D[O]=V[O]);var pe=arguments.length-2;if(pe===1)D.children=L;else if(1<pe){for(var he=Array(pe),Se=0;Se<pe;Se++)he[Se]=arguments[Se+2];D.children=he}if(T&&T.defaultProps)for(O in pe=T.defaultProps,pe)D[O]===void 0&&(D[O]=pe[O]);return te(T,X,D)},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(),D=C.S;D!==null&&D(L,O),typeof O=="object"&&O!==null&&typeof O.then=="function"&&O.then(S,ke)}catch(X){ke(X)}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 $h;function Gf(){return $h||($h=1,rf.exports=ix()),rf.exports}var A=Gf();const xc=al(A);var of={exports:{}},Zo={},lf={exports:{}},sf={};/**
|
|
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 bh;function ox(){return bh||(bh=1,(function(e){function n(ae,de){var ge=ae.length;ae.push(de);e:for(;0<ge;){var ke=ge-1>>>1,re=ae[ke];if(0<c(re,de))ae[ke]=de,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 de=ae[0],ge=ae.pop();if(ge!==de){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,D=ae[O];if(0>c(L,ge))O<re&&0>c(D,L)?(ae[ke]=D,ae[O]=ge,ke=O):(ae[ke]=L,ae[V]=ge,ke=V);else if(O<re&&0>c(D,ge))ae[ke]=D,ae[O]=ge,ke=O;else break e}}return de}function c(ae,de){var ge=ae.sortIndex-de.sortIndex;return ge!==0?ge:ae.id-de.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 de=o(h);de!==null;){if(de.callback===null)l(h);else if(de.startTime<=ae)l(h),de.sortIndex=de.expirationTime,n(g,de);else break;de=o(h)}}function _(ae){if(E=!1,R(ae),!x)if(o(g)!==null)x=!0,S||(S=!0,Y());else{var de=o(h);de!==null&&_e(_,de.startTime-ae)}}var S=!1,C=-1,I=5,te=-1;function G(){return z?!0:!(e.unstable_now()-te<I)}function H(){if(z=!1,S){var ae=e.unstable_now();te=ae;var de=!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),de=!0;break t}v===o(g)&&l(g),R(ae)}else l(g);v=o(g)}if(v!==null)de=!0;else{var T=o(h);T!==null&&_e(_,T.startTime-ae),de=!1}}break e}finally{v=null,j=ge,k=!1}de=void 0}}finally{de?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,de){C=w(function(){ae(e.unstable_now())},de)}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"):I=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 de=3;break;default:de=j}var ge=j;j=de;try{return ae()}finally{j=ge}},e.unstable_requestPaint=function(){z=!0},e.unstable_runWithPriority=function(ae,de){switch(ae){case 1:case 2:case 3:case 4:case 5:break;default:ae=3}var ge=j;j=ae;try{return de()}finally{j=ge}},e.unstable_scheduleCallback=function(ae,de,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:de,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 de=j;return function(){var ge=j;j=de;try{return ae.apply(this,arguments)}finally{j=ge}}}})(sf)),sf}var xh;function lx(){return xh||(xh=1,lf.exports=ox()),lf.exports}var cf={exports:{}},Pt={};/**
|
|
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 sx(){if(_h)return Pt;_h=1;var e=Gf();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 Pt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=l,Pt.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)},Pt.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()}},Pt.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))},Pt.prefetchDNS=function(g){typeof g=="string"&&l.d.D(g)},Pt.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})}},Pt.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)},Pt.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})}},Pt.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)},Pt.requestFormReset=function(g){l.d.r(g)},Pt.unstable_batchedUpdates=function(g,h){return g(h)},Pt.useFormState=function(g,h,y){return d.H.useFormState(g,h,y)},Pt.useFormStatus=function(){return d.H.useHostTransitionStatus()},Pt.version="19.2.8",Pt}var jh;function cx(){if(jh)return cf.exports;jh=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(),cf.exports=sx(),cf.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 Sh;function ux(){if(Sh)return Zo;Sh=1;var e=lx(),n=Gf(),o=cx();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"),I=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 I: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,de=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),D=T(null),X=T(null),pe=T(null);function he(t,a){switch(L(X,a),L(D,t),L(O,null),a.nodeType){case 9:case 11:t=(t=a.documentElement)&&(t=t.namespaceURI)?Lm(t):0;break;default:if(t=a.tagName,a=a.namespaceURI)a=Lm(a),t=Vm(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(D),V(X)}function Te(t){t.memoizedState!==null&&L(pe,t);var a=O.current,r=Vm(a,t.type);a!==r&&(L(D,t),L(O,r))}function P(t){D.current===t&&(V(O),V(D)),pe.current===t&&(V(pe),Vo._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 U=b.split(`
|
|
44
|
+
`),J=M.split(`
|
|
45
|
+
`);for(f=s=0;s<U.length&&!U[s].includes("DetermineComponentFrameRoot");)s++;for(;f<J.length&&!J[f].includes("DetermineComponentFrameRoot");)f++;if(s===U.length||f===J.length)for(s=U.length-1,f=J.length-1;1<=s&&0<=f&&U[s]!==J[f];)f--;for(;1<=s&&0<=f;s--,f--)if(U[s]!==J[f]){if(s!==1||f!==1)do if(s--,f--,0>f||U[s]!==J[f]){var oe=`
|
|
46
|
+
`+U[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 Et(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 Wt(t){try{var a="",r=null;do a+=Et(t,r),r=t,t=t.return;while(t);return a}catch(s){return`
|
|
47
|
+
Error generating stack: `+s.message+`
|
|
48
|
+
`+s.stack}}var Tt=Object.prototype.hasOwnProperty,Mt=e.unstable_scheduleCallback,ht=e.unstable_cancelCallback,Sn=e.unstable_shouldYield,ea=e.unstable_requestPaint,At=e.unstable_now,Xi=e.unstable_getCurrentPriorityLevel,wn=e.unstable_ImmediatePriority,Jr=e.unstable_UserBlockingPriority,Sr=e.unstable_NormalPriority,sl=e.unstable_LowPriority,cl=e.unstable_IdlePriority,I$=e.log,U$=e.unstable_setDisableYieldValue,Ji=null,fa=null;function kn(t){if(typeof I$=="function"&&U$(t),fa&&typeof fa.setStrictMode=="function")try{fa.setStrictMode(Ji,t)}catch{}}var pa=Math.clz32?Math.clz32:B$,L$=Math.log,V$=Math.LN2;function B$(t){return t>>>=0,t===0?32:31-(L$(t)/V$|0)|0}var ul=256,dl=262144,fl=4194304;function wr(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=wr(s):(b&=M,b!==0?f=wr(b):r||(r=M&~t,r!==0&&(f=wr(r))))):(M=s&~m,M!==0?f=wr(M):b!==0?f=wr(b):r||(r=s&~t,r!==0&&(f=wr(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 Qi(t,a){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&a)===0}function H$(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 bp(){var t=fl;return fl<<=1,(fl&62914560)===0&&(fl=4194304),t}function Zc(t){for(var a=[],r=0;31>r;r++)a.push(t);return a}function Wi(t,a){t.pendingLanes|=a,a!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function q$(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,U=t.expirationTimes,J=t.hiddenUpdates;for(r=b&~r;0<r;){var oe=31-pa(r),ce=1<<oe;M[oe]=0,U[oe]=-1;var ee=J[oe];if(ee!==null)for(J[oe]=null,oe=0;oe<ee.length;oe++){var ne=ee[oe];ne!==null&&(ne.lane&=-536870913)}r&=~ce}s!==0&&xp(t,s,0),m!==0&&f===0&&t.tag!==0&&(t.suspendedLanes|=m&~(b&~a))}function xp(t,a,r){t.pendingLanes|=a,t.suspendedLanes&=~a;var s=31-pa(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-pa(r),f=1<<s;f&a|t[s]&a&&(t[s]|=a),r&=~f}}function jp(t,a){var r=a&-a;return r=(r&42)!==0?1:Gc(r),(r&(t.suspendedLanes|a))!==0?0:r}function Gc(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 Fc(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Sp(){var t=de.p;return t!==0?t:(t=window.event,t===void 0?32:ch(t.type))}function wp(t,a){var r=de.p;try{return de.p=t,a()}finally{de.p=r}}var Nn=Math.random().toString(36).slice(2),Dt="__reactFiber$"+Nn,ta="__reactProps$"+Nn,Qr="__reactContainer$"+Nn,Yc="__reactEvents$"+Nn,P$="__reactListeners$"+Nn,Z$="__reactHandles$"+Nn,kp="__reactResources$"+Nn,eo="__reactMarker$"+Nn;function Kc(t){delete t[Dt],delete t[ta],delete t[Yc],delete t[P$],delete t[Z$]}function Wr(t){var a=t[Dt];if(a)return a;for(var r=t.parentNode;r;){if(a=r[Qr]||r[Dt]){if(r=a.alternate,a.child!==null||r!==null&&r.child!==null)for(t=Fm(t);t!==null;){if(r=t[Dt])return r;t=Fm(t)}return a}t=r,r=t.parentNode}return null}function ei(t){if(t=t[Dt]||t[Qr]){var a=t.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return t}return null}function to(t){var a=t.tag;if(a===5||a===26||a===27||a===6)return t.stateNode;throw Error(l(33))}function ti(t){var a=t[kp];return a||(a=t[kp]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function Ot(t){t[eo]=!0}var Np=new Set,zp={};function kr(t,a){ai(t,a),ai(t+"Capture",a)}function ai(t,a){for(zp[t]=a,t=0;t<a.length;t++)Np.add(a[t])}var G$=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]*$"),Ep={},Cp={};function F$(t){return Tt.call(Cp,t)?!0:Tt.call(Ep,t)?!1:G$.test(t)?Cp[t]=!0:(Ep[t]=!0,!1)}function gl(t,a,r){if(F$(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 Ka(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 Sa(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Tp(t){var a=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function Y$(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 Xc(t){if(!t._valueTracker){var a=Tp(t)?"checked":"value";t._valueTracker=Y$(t,a,""+t[a])}}function Mp(t){if(!t)return!1;var a=t._valueTracker;if(!a)return!0;var r=a.getValue(),s="";return t&&(s=Tp(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 K$=/[\n"\\]/g;function wa(t){return t.replace(K$,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function Jc(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=""+Sa(a)):t.value!==""+Sa(a)&&(t.value=""+Sa(a)):b!=="submit"&&b!=="reset"||t.removeAttribute("value"),a!=null?Qc(t,b,Sa(a)):r!=null?Qc(t,b,Sa(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=""+Sa(M):t.removeAttribute("name")}function Op(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)){Xc(t);return}r=r!=null?""+Sa(r):"",a=a!=null?""+Sa(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),Xc(t)}function Qc(t,a,r){a==="number"&&hl(t.ownerDocument)===t||t.defaultValue===""+r||(t.defaultValue=""+r)}function ni(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=""+Sa(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 Rp(t,a,r){if(a!=null&&(a=""+Sa(a),a!==t.value&&(t.value=a),r==null)){t.defaultValue!==a&&(t.defaultValue=a);return}t.defaultValue=r!=null?""+Sa(r):""}function Ap(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=Sa(a),t.defaultValue=r,s=t.textContent,s===r&&s!==""&&s!==null&&(t.value=s),Xc(t)}function ri(t,a){if(a){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=a;return}}t.textContent=a}var X$=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 Dp(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||X$.has(a)?a==="float"?t.cssFloat=r:t[a]=(""+r).trim():t[a]=r+"px"}function Ip(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&&Dp(t,f,s)}else for(var m in a)a.hasOwnProperty(m)&&Dp(t,m,a[m])}function Wc(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 J$=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"]]),Q$=/^[\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 Q$.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Xa(){}var eu=null;function tu(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var ii=null,oi=null;function Up(t){var a=ei(t);if(a&&(t=a.stateNode)){var r=t[ta]||null;e:switch(t=a.stateNode,a.type){case"input":if(Jc(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="'+wa(""+a)+'"][type="radio"]'),a=0;a<r.length;a++){var s=r[a];if(s!==t&&s.form===t.form){var f=s[ta]||null;if(!f)throw Error(l(90));Jc(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&&Mp(s)}break e;case"textarea":Rp(t,r.value,r.defaultValue);break e;case"select":a=r.value,a!=null&&ni(t,!!r.multiple,a,!1)}}}var au=!1;function Lp(t,a,r){if(au)return t(a,r);au=!0;try{var s=t(a);return s}finally{if(au=!1,(ii!==null||oi!==null)&&(rs(),ii&&(a=ii,t=oi,oi=ii=null,Up(a),t)))for(a=0;a<t.length;a++)Up(t[a])}}function ao(t,a){var r=t.stateNode;if(r===null)return null;var s=r[ta]||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"),nu=!1;if(Ja)try{var no={};Object.defineProperty(no,"passive",{get:function(){nu=!0}}),window.addEventListener("test",no,no),window.removeEventListener("test",no,no)}catch{nu=!1}var zn=null,ru=null,vl=null;function Vp(){if(vl)return vl;var t,a=ru,r=a.length,s,f="value"in zn?zn.value:zn.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 Bp(){return!1}function aa(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:Bp,this.isPropagationStopped=Bp,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 Nr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},xl=aa(Nr),ro=v({},Nr,{view:0,detail:0}),W$=aa(ro),iu,ou,io,_l=v({},ro,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:su,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!==io&&(io&&t.type==="mousemove"?(iu=t.screenX-io.screenX,ou=t.screenY-io.screenY):ou=iu=0,io=t),iu)},movementY:function(t){return"movementY"in t?t.movementY:ou}}),Hp=aa(_l),e2=v({},_l,{dataTransfer:0}),t2=aa(e2),a2=v({},ro,{relatedTarget:0}),lu=aa(a2),n2=v({},Nr,{animationName:0,elapsedTime:0,pseudoElement:0}),r2=aa(n2),i2=v({},Nr,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),o2=aa(i2),l2=v({},Nr,{data:0}),qp=aa(l2),s2={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},c2={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"},u2={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function d2(t){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(t):(t=u2[t])?!!a[t]:!1}function su(){return d2}var f2=v({},ro,{key:function(t){if(t.key){var a=s2[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"?c2[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:su,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}}),p2=aa(f2),g2=v({},_l,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Pp=aa(g2),m2=v({},ro,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:su}),h2=aa(m2),y2=v({},Nr,{propertyName:0,elapsedTime:0,pseudoElement:0}),v2=aa(y2),$2=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}),b2=aa($2),x2=v({},Nr,{newState:0,oldState:0}),_2=aa(x2),j2=[9,13,27,32],cu=Ja&&"CompositionEvent"in window,oo=null;Ja&&"documentMode"in document&&(oo=document.documentMode);var S2=Ja&&"TextEvent"in window&&!oo,Zp=Ja&&(!cu||oo&&8<oo&&11>=oo),Gp=" ",Fp=!1;function Yp(t,a){switch(t){case"keyup":return j2.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Kp(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var li=!1;function w2(t,a){switch(t){case"compositionend":return Kp(a);case"keypress":return a.which!==32?null:(Fp=!0,Gp);case"textInput":return t=a.data,t===Gp&&Fp?null:t;default:return null}}function k2(t,a){if(li)return t==="compositionend"||!cu&&Yp(t,a)?(t=Vp(),vl=ru=zn=null,li=!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 Zp&&a.locale!=="ko"?null:a.data;default:return null}}var N2={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 Xp(t){var a=t&&t.nodeName&&t.nodeName.toLowerCase();return a==="input"?!!N2[t.type]:a==="textarea"}function Jp(t,a,r,s){ii?oi?oi.push(s):oi=[s]:ii=s,a=ds(a,"onChange"),0<a.length&&(r=new xl("onChange","change",null,r,s),t.push({event:r,listeners:a}))}var lo=null,so=null;function z2(t){Om(t,0)}function jl(t){var a=to(t);if(Mp(a))return t}function Qp(t,a){if(t==="change")return a}var Wp=!1;if(Ja){var uu;if(Ja){var du="oninput"in document;if(!du){var e0=document.createElement("div");e0.setAttribute("oninput","return;"),du=typeof e0.oninput=="function"}uu=du}else uu=!1;Wp=uu&&(!document.documentMode||9<document.documentMode)}function t0(){lo&&(lo.detachEvent("onpropertychange",a0),so=lo=null)}function a0(t){if(t.propertyName==="value"&&jl(so)){var a=[];Jp(a,so,t,tu(t)),Lp(z2,a)}}function E2(t,a,r){t==="focusin"?(t0(),lo=a,so=r,lo.attachEvent("onpropertychange",a0)):t==="focusout"&&t0()}function C2(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return jl(so)}function T2(t,a){if(t==="click")return jl(a)}function M2(t,a){if(t==="input"||t==="change")return jl(a)}function O2(t,a){return t===a&&(t!==0||1/t===1/a)||t!==t&&a!==a}var ga=typeof Object.is=="function"?Object.is:O2;function co(t,a){if(ga(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(!Tt.call(a,f)||!ga(t[f],a[f]))return!1}return!0}function n0(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function r0(t,a){var r=n0(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=n0(r)}}function i0(t,a){return t&&a?t===a?!0:t&&t.nodeType===3?!1:a&&a.nodeType===3?i0(t,a.parentNode):"contains"in t?t.contains(a):t.compareDocumentPosition?!!(t.compareDocumentPosition(a)&16):!1:!1}function o0(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 fu(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 R2=Ja&&"documentMode"in document&&11>=document.documentMode,si=null,pu=null,uo=null,gu=!1;function l0(t,a,r){var s=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;gu||si==null||si!==hl(s)||(s=si,"selectionStart"in s&&fu(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}),uo&&co(uo,s)||(uo=s,s=ds(pu,"onSelect"),0<s.length&&(a=new xl("onSelect","select",null,a,r),t.push({event:a,listeners:s}),a.target=si)))}function zr(t,a){var r={};return r[t.toLowerCase()]=a.toLowerCase(),r["Webkit"+t]="webkit"+a,r["Moz"+t]="moz"+a,r}var ci={animationend:zr("Animation","AnimationEnd"),animationiteration:zr("Animation","AnimationIteration"),animationstart:zr("Animation","AnimationStart"),transitionrun:zr("Transition","TransitionRun"),transitionstart:zr("Transition","TransitionStart"),transitioncancel:zr("Transition","TransitionCancel"),transitionend:zr("Transition","TransitionEnd")},mu={},s0={};Ja&&(s0=document.createElement("div").style,"AnimationEvent"in window||(delete ci.animationend.animation,delete ci.animationiteration.animation,delete ci.animationstart.animation),"TransitionEvent"in window||delete ci.transitionend.transition);function Er(t){if(mu[t])return mu[t];if(!ci[t])return t;var a=ci[t],r;for(r in a)if(a.hasOwnProperty(r)&&r in s0)return mu[t]=a[r];return t}var c0=Er("animationend"),u0=Er("animationiteration"),d0=Er("animationstart"),A2=Er("transitionrun"),D2=Er("transitionstart"),I2=Er("transitioncancel"),f0=Er("transitionend"),p0=new Map,hu="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(" ");hu.push("scrollEnd");function Da(t,a){p0.set(t,a),kr(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)},ka=[],ui=0,yu=0;function wl(){for(var t=ui,a=yu=ui=0;a<t;){var r=ka[a];ka[a++]=null;var s=ka[a];ka[a++]=null;var f=ka[a];ka[a++]=null;var m=ka[a];if(ka[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&&g0(r,f,m)}}function kl(t,a,r,s){ka[ui++]=t,ka[ui++]=a,ka[ui++]=r,ka[ui++]=s,yu|=s,t.lanes|=s,t=t.alternate,t!==null&&(t.lanes|=s)}function vu(t,a,r,s){return kl(t,a,r,s),Nl(t)}function Cr(t,a){return kl(t,null,null,a),Nl(t)}function g0(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-pa(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<Oo)throw Oo=0,Nd=null,Error(l(185));for(var a=t.return;a!==null;)t=a,a=t.return;return t.tag===3?t.stateNode:null}var di={};function U2(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 ma(t,a,r,s){return new U2(t,a,r,s)}function $u(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Qa(t,a){var r=t.alternate;return r===null?(r=ma(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 m0(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")$u(t)&&(b=1);else if(typeof t=="string")b=qb(t,r,O.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case te:return t=ma(31,r,a,f),t.elementType=te,t.lanes=m,t;case E:return Tr(r.children,f,m,a);case z:b=8,f|=24;break;case w:return t=ma(12,r,a,f|2),t.elementType=w,t.lanes=m,t;case _:return t=ma(13,r,a,f),t.elementType=_,t.lanes=m,t;case S:return t=ma(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 I:b=16,s=null;break e}b=29,r=Error(l(130,t===null?"null":typeof t,"")),s=null}return a=ma(b,r,a,f),a.elementType=t,a.type=s,a.lanes=m,a}function Tr(t,a,r,s){return t=ma(7,t,s,a),t.lanes=r,t}function bu(t,a,r){return t=ma(6,t,null,a),t.lanes=r,t}function h0(t){var a=ma(18,null,null,0);return a.stateNode=t,a}function xu(t,a,r){return a=ma(4,t.children!==null?t.children:[],t.key,a),a.lanes=r,a.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},a}var y0=new WeakMap;function Na(t,a){if(typeof t=="object"&&t!==null){var r=y0.get(t);return r!==void 0?r:(a={value:t,source:a,stack:Wt(a)},y0.set(t,a),a)}return{value:t,source:a,stack:Wt(a)}}var fi=[],pi=0,El=null,fo=0,za=[],Ea=0,En=null,Ba=1,Ha="";function Wa(t,a){fi[pi++]=fo,fi[pi++]=El,El=t,fo=a}function v0(t,a,r){za[Ea++]=Ba,za[Ea++]=Ha,za[Ea++]=En,En=t;var s=Ba;t=Ha;var f=32-pa(s)-1;s&=~(1<<f),r+=1;var m=32-pa(a)+f;if(30<m){var b=f-f%5;m=(s&(1<<b)-1).toString(32),s>>=b,f-=b,Ba=1<<32-pa(a)+f|r<<f|s,Ha=m+t}else Ba=1<<m|r<<f|s,Ha=t}function _u(t){t.return!==null&&(Wa(t,1),v0(t,1,0))}function ju(t){for(;t===El;)El=fi[--pi],fi[pi]=null,fo=fi[--pi],fi[pi]=null;for(;t===En;)En=za[--Ea],za[Ea]=null,Ha=za[--Ea],za[Ea]=null,Ba=za[--Ea],za[Ea]=null}function $0(t,a){za[Ea++]=Ba,za[Ea++]=Ha,za[Ea++]=En,Ba=a.id,Ha=a.overflow,En=t}var It=null,nt=null,Ve=!1,Cn=null,Ca=!1,Su=Error(l(519));function Tn(t){var a=Error(l(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw po(Na(a,t)),Su}function b0(t){var a=t.stateNode,r=t.type,s=t.memoizedProps;switch(a[Dt]=t,a[ta]=s,r){case"dialog":Ie("cancel",a),Ie("close",a);break;case"iframe":case"object":case"embed":Ie("load",a);break;case"video":case"audio":for(r=0;r<Ao.length;r++)Ie(Ao[r],a);break;case"source":Ie("error",a);break;case"img":case"image":case"link":Ie("error",a),Ie("load",a);break;case"details":Ie("toggle",a);break;case"input":Ie("invalid",a),Op(a,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Ie("invalid",a);break;case"textarea":Ie("invalid",a),Ap(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||Im(a.textContent,r)?(s.popover!=null&&(Ie("beforetoggle",a),Ie("toggle",a)),s.onScroll!=null&&Ie("scroll",a),s.onScrollEnd!=null&&Ie("scrollend",a),s.onClick!=null&&(a.onclick=Xa),a=!0):a=!1,a||Tn(t,!0)}function x0(t){for(It=t.return;It;)switch(It.tag){case 5:case 31:case 13:Ca=!1;return;case 27:case 3:Ca=!0;return;default:It=It.return}}function gi(t){if(t!==It)return!1;if(!Ve)return x0(t),Ve=!0,!1;var a=t.tag,r;if((r=a!==3&&a!==27)&&((r=a===5)&&(r=t.type,r=!(r!=="form"&&r!=="button")||Hd(t.type,t.memoizedProps)),r=!r),r&&nt&&Tn(t),x0(t),a===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(317));nt=Gm(t)}else if(a===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(317));nt=Gm(t)}else a===27?(a=nt,Zn(t.type)?(t=Fd,Fd=null,nt=t):nt=a):nt=It?Ma(t.stateNode.nextSibling):null;return!0}function Mr(){nt=It=null,Ve=!1}function wu(){var t=Cn;return t!==null&&(oa===null?oa=t:oa.push.apply(oa,t),Cn=null),t}function po(t){Cn===null?Cn=[t]:Cn.push(t)}var ku=T(null),Or=null,en=null;function Mn(t,a,r){L(ku,a._currentValue),a._currentValue=r}function tn(t){t._currentValue=ku.current,V(ku)}function Nu(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 zu(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 U=0;U<a.length;U++)if(M.context===a[U]){m.lanes|=r,M=m.alternate,M!==null&&(M.lanes|=r),Nu(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),Nu(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 mi(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;ga(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(Vo):t=[Vo])}f=f.return}t!==null&&zu(a,t,r,s),a.flags|=262144}function Cl(t){for(t=t.firstContext;t!==null;){if(!ga(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Rr(t){Or=t,en=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Ut(t){return _0(Or,t)}function Tl(t,a){return Or===null&&Rr(t),_0(t,a)}function _0(t,a){var r=a._currentValue;if(a={context:a,memoizedValue:r,next:null},en===null){if(t===null)throw Error(l(308));en=a,t.dependencies={lanes:0,firstContext:a},t.flags|=524288}else en=en.next=a;return r}var L2=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()})}},V2=e.unstable_scheduleCallback,B2=e.unstable_NormalPriority,_t={$$typeof:N,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Eu(){return{controller:new L2,data:new Map,refCount:0}}function go(t){t.refCount--,t.refCount===0&&V2(B2,function(){t.controller.abort()})}var mo=null,Cu=0,hi=0,yi=null;function H2(t,a){if(mo===null){var r=mo=[];Cu=0,hi=Od(),yi={status:"pending",value:void 0,then:function(s){r.push(s)}}}return Cu++,a.then(j0,j0),a}function j0(){if(--Cu===0&&mo!==null){yi!==null&&(yi.status="fulfilled");var t=mo;mo=null,hi=0,yi=null;for(var a=0;a<t.length;a++)(0,t[a])()}}function q2(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 S0=ae.S;ae.S=function(t,a){lm=At(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&H2(t,a),S0!==null&&S0(t,a)};var Ar=T(null);function Tu(){var t=Ar.current;return t!==null?t:at.pooledCache}function Ml(t,a){a===null?L(Ar,Ar.current):L(Ar,a.pool)}function w0(){var t=Tu();return t===null?null:{parent:_t._currentValue,pool:t}}var vi=Error(l(460)),Mu=Error(l(474)),Ol=Error(l(542)),Rl={then:function(){}};function k0(t){return t=t.status,t==="fulfilled"||t==="rejected"}function N0(t,a,r){switch(r=t[r],r===void 0?t.push(a):r!==a&&(a.then(Xa,Xa),a=r),a.status){case"fulfilled":return a.value;case"rejected":throw t=a.reason,E0(t),t;default:if(typeof a.status=="string")a.then(Xa,Xa);else{if(t=at,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,E0(t),t}throw Ir=a,vi}}function Dr(t){try{var a=t._init;return a(t._payload)}catch(r){throw r!==null&&typeof r=="object"&&typeof r.then=="function"?(Ir=r,vi):r}}var Ir=null;function z0(){if(Ir===null)throw Error(l(459));var t=Ir;return Ir=null,t}function E0(t){if(t===vi||t===Ol)throw Error(l(483))}var $i=null,ho=0;function Al(t){var a=ho;return ho+=1,$i===null&&($i=[]),N0($i,t,a)}function yo(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 C0(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=Qa(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=bu(K,q.mode,se),B.return=q,B):(B=f(B,K),B.return=q,B)}function U(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===I&&Dr(je)===B.type)?(B=f(B,K.props),yo(B,K),B.return=q,B):(B=zl(K.type,K.key,K.props,null,q.mode,se),yo(B,K),B.return=q,B)}function J(q,B,K,se){return B===null||B.tag!==4||B.stateNode.containerInfo!==K.containerInfo||B.stateNode.implementation!==K.implementation?(B=xu(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=Tr(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=bu(""+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),yo(K,B),K.return=q,K;case x:return B=xu(B,q.mode,K),B.return=q,B;case I:return B=Dr(B),ce(q,B,K)}if(_e(B)||Y(B))return B=Tr(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?U(q,B,K,se):null;case x:return K.key===je?J(q,B,K,se):null;case I:return K=Dr(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,U(B,q,se,je);case x:return q=q.get(se.key===null?K:se.key)||null,J(B,q,se,je);case I:return se=Dr(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,Le=null;$e!==null&&Ce<K.length;Ce++){$e.index>Ce?(Le=$e,$e=null):Le=$e.sibling;var Ze=ee(q,$e,K[Ce],se);if(Ze===null){$e===null&&($e=Le);break}t&&$e&&Ze.alternate===null&&a(q,$e),B=m(Ze,B,Ce),Pe===null?je=Ze:Pe.sibling=Ze,Pe=Ze,$e=Le}if(Ce===K.length)return r(q,$e),Ve&&Wa(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 Ve&&Wa(q,Ce),je}for($e=s($e);Ce<K.length;Ce++)Le=ne($e,q,Ce,K[Ce],se),Le!==null&&(t&&Le.alternate!==null&&$e.delete(Le.key===null?Ce:Le.key),B=m(Le,B,Ce),Pe===null?je=Le:Pe.sibling=Le,Pe=Le);return t&&$e.forEach(function(Xn){return a(q,Xn)}),Ve&&Wa(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,Le=null,Ze=K.next();$e!==null&&!Ze.done;Ce++,Ze=K.next()){$e.index>Ce?(Le=$e,$e=null):Le=$e.sibling;var Xn=ee(q,$e,Ze.value,se);if(Xn===null){$e===null&&($e=Le);break}t&&$e&&Xn.alternate===null&&a(q,$e),B=m(Xn,B,Ce),Pe===null?je=Xn:Pe.sibling=Xn,Pe=Xn,$e=Le}if(Ze.done)return r(q,$e),Ve&&Wa(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 Ve&&Wa(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(ex){return a(q,ex)}),Ve&&Wa(q,Ce),je}function We(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===I&&Dr(je)===B.type){r(q,B.sibling),se=f(B,K.props),yo(se,K),se.return=q,q=se;break e}r(q,B);break}else a(q,B);B=B.sibling}K.type===E?(se=Tr(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),yo(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=xu(K,q.mode,se),se.return=q,q=se}return b(q);case I:return K=Dr(K),We(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 We(q,B,Al(K),se);if(K.$$typeof===N)return We(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=bu(K,q.mode,se),se.return=q,q=se),b(q)):r(q,B)}return function(q,B,K,se){try{ho=0;var je=We(q,B,K,se);return $i=null,je}catch($e){if($e===vi||$e===Ol)throw $e;var Pe=ma(29,$e,null,q.mode);return Pe.lanes=se,Pe.return=q,Pe}finally{}}}var Ur=C0(!0),T0=C0(!1),On=!1;function Ou(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ru(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 Rn(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function An(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),g0(t,null,r),a}return kl(t,s,a,r),Nl(t)}function vo(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 Au(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 Du=!1;function $o(){if(Du){var t=yi;if(t!==null)throw t}}function bo(t,a,r,s){Du=!1;var f=t.updateQueue;On=!1;var m=f.firstBaseUpdate,b=f.lastBaseUpdate,M=f.shared.pending;if(M!==null){f.shared.pending=null;var U=M,J=U.next;U.next=null,b===null?m=J:b.next=J,b=U;var oe=t.alternate;oe!==null&&(oe=oe.updateQueue,M=oe.lastBaseUpdate,M!==b&&(M===null?oe.firstBaseUpdate=J:M.next=J,oe.lastBaseUpdate=U))}if(m!==null){var ce=f.baseState;b=0,oe=J=U=null,M=m;do{var ee=M.lane&-536870913,ne=ee!==M.lane;if(ne?(Ue&ee)===ee:(s&ee)===ee){ee!==0&&ee===hi&&(Du=!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 We=r;switch(we.tag){case 1:if(ye=we.payload,typeof ye=="function"){ce=ye.call(We,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(We,ce,ee):ye,ee==null)break e;ce=v({},ce,ee);break e;case 2:On=!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?(J=oe=ne,U=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&&(U=ce),f.baseState=U,f.firstBaseUpdate=J,f.lastBaseUpdate=oe,m===null&&(f.shared.lanes=0),Vn|=b,t.lanes=b,t.memoizedState=ce}}function M0(t,a){if(typeof t!="function")throw Error(l(191,t));t.call(a)}function O0(t,a){var r=t.callbacks;if(r!==null)for(t.callbacks=null,t=0;t<r.length;t++)M0(r[t],a)}var bi=T(null),Il=T(0);function R0(t,a){t=dn,L(Il,t),L(bi,a),dn=t|a.baseLanes}function Iu(){L(Il,dn),L(bi,bi.current)}function Uu(){dn=Il.current,V(bi),V(Il)}var ha=T(null),Ta=null;function Dn(t){var a=t.alternate;L(yt,yt.current&1),L(ha,t),Ta===null&&(a===null||bi.current!==null||a.memoizedState!==null)&&(Ta=t)}function Lu(t){L(yt,yt.current),L(ha,t),Ta===null&&(Ta=t)}function A0(t){t.tag===22?(L(yt,yt.current),L(ha,t),Ta===null&&(Ta=t)):In()}function In(){L(yt,yt.current),L(ha,ha.current)}function ya(t){V(ha),Ta===t&&(Ta=null),V(yt)}var yt=T(0);function Ul(t){for(var a=t;a!==null;){if(a.tag===13){var r=a.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||Zd(r)||Gd(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 an=0,Ee=null,Je=null,jt=null,Ll=!1,xi=!1,Lr=!1,Vl=0,xo=0,_i=null,P2=0;function pt(){throw Error(l(321))}function Vu(t,a){if(a===null)return!1;for(var r=0;r<a.length&&r<t.length;r++)if(!ga(t[r],a[r]))return!1;return!0}function Bu(t,a,r,s,f,m){return an=m,Ee=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,ae.H=t===null||t.memoizedState===null?vg:ad,Lr=!1,m=r(s,f),Lr=!1,xi&&(m=I0(a,r,s,f)),D0(t),m}function D0(t){ae.H=So;var a=Je!==null&&Je.next!==null;if(an=0,jt=Je=Ee=null,Ll=!1,xo=0,_i=null,a)throw Error(l(300));t===null||St||(t=t.dependencies,t!==null&&Cl(t)&&(St=!0))}function I0(t,a,r,s){Ee=t;var f=0;do{if(xi&&(_i=null),xo=0,xi=!1,25<=f)throw Error(l(301));if(f+=1,jt=Je=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=$g,m=a(r,s)}while(xi);return m}function Z2(){var t=ae.H,a=t.useState()[0];return a=typeof a.then=="function"?_o(a):a,t=t.useState()[0],(Je!==null?Je.memoizedState:null)!==t&&(Ee.flags|=1024),a}function Hu(){var t=Vl!==0;return Vl=0,t}function qu(t,a,r){a.updateQueue=t.updateQueue,a.flags&=-2053,t.lanes&=~r}function Pu(t){if(Ll){for(t=t.memoizedState;t!==null;){var a=t.queue;a!==null&&(a.pending=null),t=t.next}Ll=!1}an=0,jt=Je=Ee=null,xi=!1,xo=Vl=0,_i=null}function Yt(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return jt===null?Ee.memoizedState=jt=t:jt=jt.next=t,jt}function vt(){if(Je===null){var t=Ee.alternate;t=t!==null?t.memoizedState:null}else t=Je.next;var a=jt===null?Ee.memoizedState:jt.next;if(a!==null)jt=a,Je=t;else{if(t===null)throw Ee.alternate===null?Error(l(467)):Error(l(310));Je=t,t={memoizedState:Je.memoizedState,baseState:Je.baseState,baseQueue:Je.baseQueue,queue:Je.queue,next:null},jt===null?Ee.memoizedState=jt=t:jt=jt.next=t}return jt}function Bl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function _o(t){var a=xo;return xo+=1,_i===null&&(_i=[]),t=N0(_i,t,a),a=Ee,(jt===null?a.memoizedState:jt.next)===null&&(a=a.alternate,ae.H=a===null||a.memoizedState===null?vg:ad),t}function Hl(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return _o(t);if(t.$$typeof===N)return Ut(t)}throw Error(l(438,String(t)))}function Zu(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 nn(t,a){return typeof a=="function"?a(t):a}function ql(t){var a=vt();return Gu(a,Je,t)}function Gu(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,U=null,J=a,oe=!1;do{var ce=J.lane&-536870913;if(ce!==J.lane?(Ue&ce)===ce:(an&ce)===ce){var ee=J.revertLane;if(ee===0)U!==null&&(U=U.next={lane:0,revertLane:0,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null}),ce===hi&&(oe=!0);else if((an&ee)===ee){J=J.next,ee===hi&&(oe=!0);continue}else ce={lane:0,revertLane:J.revertLane,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},U===null?(M=U=ce,b=m):U=U.next=ce,Ee.lanes|=ee,Vn|=ee;ce=J.action,Lr&&r(m,ce),m=J.hasEagerState?J.eagerState:r(m,ce)}else ee={lane:ce,revertLane:J.revertLane,gesture:J.gesture,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},U===null?(M=U=ee,b=m):U=U.next=ee,Ee.lanes|=ce,Vn|=ce;J=J.next}while(J!==null&&J!==a);if(U===null?b=m:U.next=M,!ga(m,t.memoizedState)&&(St=!0,oe&&(r=yi,r!==null)))throw r;t.memoizedState=m,t.baseState=b,t.baseQueue=U,s.lastRenderedState=m}return f===null&&(s.lanes=0),[t.memoizedState,s.dispatch]}function Fu(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);ga(m,a.memoizedState)||(St=!0),a.memoizedState=m,a.baseQueue===null&&(a.baseState=m),r.lastRenderedState=m}return[m,s]}function U0(t,a,r){var s=Ee,f=vt(),m=Ve;if(m){if(r===void 0)throw Error(l(407));r=r()}else r=a();var b=!ga((Je||f).memoizedState,r);if(b&&(f.memoizedState=r,St=!0),f=f.queue,Xu(B0.bind(null,s,f,t),[t]),f.getSnapshot!==a||b||jt!==null&&jt.memoizedState.tag&1){if(s.flags|=2048,ji(9,{destroy:void 0},V0.bind(null,s,f,r,a),null),at===null)throw Error(l(349));m||(an&127)!==0||L0(s,a,r)}return r}function L0(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 V0(t,a,r,s){a.value=r,a.getSnapshot=s,H0(a)&&q0(t)}function B0(t,a,r){return r(function(){H0(a)&&q0(t)})}function H0(t){var a=t.getSnapshot;t=t.value;try{var r=a();return!ga(t,r)}catch{return!0}}function q0(t){var a=Cr(t,2);a!==null&&la(a,t,2)}function Yu(t){var a=Yt();if(typeof t=="function"){var r=t;if(t=r(),Lr){kn(!0);try{r()}finally{kn(!1)}}}return a.memoizedState=a.baseState=t,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:nn,lastRenderedState:t},a}function P0(t,a,r,s){return t.baseState=r,Gu(t,Je,typeof s=="function"?s:nn)}function G2(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,Z0(a,m)):(m.next=r.next,a.pending=r.next=m)}}function Z0(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),U=ae.S;U!==null&&U(b,M),G0(t,a,M)}catch(J){Ku(t,a,J)}finally{m!==null&&b.types!==null&&(m.types=b.types),ae.T=m}}else try{m=r(f,s),G0(t,a,m)}catch(J){Ku(t,a,J)}}function G0(t,a,r){r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(function(s){F0(t,a,s)},function(s){return Ku(t,a,s)}):F0(t,a,r)}function F0(t,a,r){a.status="fulfilled",a.value=r,Y0(a),t.state=r,a=t.pending,a!==null&&(r=a.next,r===a?t.pending=null:(r=r.next,a.next=r,Z0(t,r)))}function Ku(t,a,r){var s=t.pending;if(t.pending=null,s!==null){s=s.next;do a.status="rejected",a.reason=r,Y0(a),a=a.next;while(a!==s)}t.action=null}function Y0(t){t=t.listeners;for(var a=0;a<t.length;a++)(0,t[a])()}function K0(t,a){return a}function X0(t,a){if(Ve){var r=at.formState;if(r!==null){e:{var s=Ee;if(Ve){if(nt){t:{for(var f=nt,m=Ca;f.nodeType!==8;){if(!m){f=null;break t}if(f=Ma(f.nextSibling),f===null){f=null;break t}}m=f.data,f=m==="F!"||m==="F"?f:null}if(f){nt=Ma(f.nextSibling),s=f.data==="F!";break e}}Tn(s)}s=!1}s&&(a=r[0])}}return r=Yt(),r.memoizedState=r.baseState=a,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:K0,lastRenderedState:a},r.queue=s,r=mg.bind(null,Ee,s),s.dispatch=r,s=Yu(!1),m=td.bind(null,Ee,!1,s.queue),s=Yt(),f={state:a,dispatch:null,action:t,pending:null},s.queue=f,r=G2.bind(null,Ee,f,m,r),f.dispatch=r,s.memoizedState=t,[a,r,!1]}function J0(t){var a=vt();return Q0(a,Je,t)}function Q0(t,a,r){if(a=Gu(t,a,K0)[0],t=ql(nn)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var s=_o(a)}catch(b){throw b===vi?Ol:b}else s=a;a=vt();var f=a.queue,m=f.dispatch;return r!==a.memoizedState&&(Ee.flags|=2048,ji(9,{destroy:void 0},F2.bind(null,f,r),null)),[s,m,t]}function F2(t,a){t.action=a}function W0(t){var a=vt(),r=Je;if(r!==null)return Q0(a,r,t);vt(),a=a.memoizedState,r=vt();var s=r.queue.dispatch;return r.memoizedState=t,[a,s,!1]}function ji(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 eg(){return vt().memoizedState}function Pl(t,a,r,s){var f=Yt();Ee.flags|=t,f.memoizedState=ji(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;Je!==null&&s!==null&&Vu(s,Je.memoizedState.deps)?f.memoizedState=ji(a,m,r,s):(Ee.flags|=t,f.memoizedState=ji(1|a,m,r,s))}function tg(t,a){Pl(8390656,8,t,a)}function Xu(t,a){Zl(2048,8,t,a)}function Y2(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 ag(t){var a=vt().memoizedState;return Y2({ref:a,nextImpl:t}),function(){if((Ge&2)!==0)throw Error(l(440));return a.impl.apply(void 0,arguments)}}function ng(t,a){return Zl(4,2,t,a)}function rg(t,a){return Zl(4,4,t,a)}function ig(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 og(t,a,r){r=r!=null?r.concat([t]):null,Zl(4,4,ig.bind(null,a,t),r)}function Ju(){}function lg(t,a){var r=vt();a=a===void 0?null:a;var s=r.memoizedState;return a!==null&&Vu(a,s[1])?s[0]:(r.memoizedState=[t,a],t)}function sg(t,a){var r=vt();a=a===void 0?null:a;var s=r.memoizedState;if(a!==null&&Vu(a,s[1]))return s[0];if(s=t(),Lr){kn(!0);try{t()}finally{kn(!1)}}return r.memoizedState=[s,a],s}function Qu(t,a,r){return r===void 0||(an&1073741824)!==0&&(Ue&261930)===0?t.memoizedState=a:(t.memoizedState=r,t=cm(),Ee.lanes|=t,Vn|=t,r)}function cg(t,a,r,s){return ga(r,a)?r:bi.current!==null?(t=Qu(t,r,s),ga(t,a)||(St=!0),t):(an&42)===0||(an&1073741824)!==0&&(Ue&261930)===0?(St=!0,t.memoizedState=r):(t=cm(),Ee.lanes|=t,Vn|=t,a)}function ug(t,a,r,s,f){var m=de.p;de.p=m!==0&&8>m?m:8;var b=ae.T,M={};ae.T=M,td(t,!1,a,r);try{var U=f(),J=ae.S;if(J!==null&&J(M,U),U!==null&&typeof U=="object"&&typeof U.then=="function"){var oe=q2(U,s);jo(t,a,oe,ba(t))}else jo(t,a,s,ba(t))}catch(ce){jo(t,a,{then:function(){},status:"rejected",reason:ce},ba())}finally{de.p=m,b!==null&&M.types!==null&&(b.types=M.types),ae.T=b}}function K2(){}function Wu(t,a,r,s){if(t.tag!==5)throw Error(l(476));var f=dg(t).queue;ug(t,f,a,ge,r===null?K2:function(){return fg(t),r(s)})}function dg(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:nn,lastRenderedState:ge},next:null};var r={};return a.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:nn,lastRenderedState:r},next:null},t.memoizedState=a,t=t.alternate,t!==null&&(t.memoizedState=a),a}function fg(t){var a=dg(t);a.next===null&&(a=t.alternate.memoizedState),jo(t,a.next.queue,{},ba())}function ed(){return Ut(Vo)}function pg(){return vt().memoizedState}function gg(){return vt().memoizedState}function X2(t){for(var a=t.return;a!==null;){switch(a.tag){case 24:case 3:var r=ba();t=Rn(r);var s=An(a,t,r);s!==null&&(la(s,a,r),vo(s,a,r)),a={cache:Eu()},t.payload=a;return}a=a.return}}function J2(t,a,r){var s=ba();r={lane:s,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Gl(t)?hg(a,r):(r=vu(t,a,r,s),r!==null&&(la(r,t,s),yg(r,a,s)))}function mg(t,a,r){var s=ba();jo(t,a,r,s)}function jo(t,a,r,s){var f={lane:s,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null};if(Gl(t))hg(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,ga(M,b))return kl(t,a,f,0),at===null&&wl(),!1}catch{}finally{}if(r=vu(t,a,f,s),r!==null)return la(r,t,s),yg(r,a,s),!0}return!1}function td(t,a,r,s){if(s={lane:2,revertLane:Od(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Gl(t)){if(a)throw Error(l(479))}else a=vu(t,r,s,2),a!==null&&la(a,t,2)}function Gl(t){var a=t.alternate;return t===Ee||a!==null&&a===Ee}function hg(t,a){xi=Ll=!0;var r=t.pending;r===null?a.next=a:(a.next=r.next,r.next=a),t.pending=a}function yg(t,a,r){if((r&4194048)!==0){var s=a.lanes;s&=t.pendingLanes,r|=s,a.lanes=r,_p(t,r)}}var So={readContext:Ut,use:Hl,useCallback:pt,useContext:pt,useEffect:pt,useImperativeHandle:pt,useLayoutEffect:pt,useInsertionEffect:pt,useMemo:pt,useReducer:pt,useRef:pt,useState:pt,useDebugValue:pt,useDeferredValue:pt,useTransition:pt,useSyncExternalStore:pt,useId:pt,useHostTransitionStatus:pt,useFormState:pt,useActionState:pt,useOptimistic:pt,useMemoCache:pt,useCacheRefresh:pt};So.useEffectEvent=pt;var vg={readContext:Ut,use:Hl,useCallback:function(t,a){return Yt().memoizedState=[t,a===void 0?null:a],t},useContext:Ut,useEffect:tg,useImperativeHandle:function(t,a,r){r=r!=null?r.concat([t]):null,Pl(4194308,4,ig.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(Lr){kn(!0);try{t()}finally{kn(!1)}}return r.memoizedState=[s,a],s},useReducer:function(t,a,r){var s=Yt();if(r!==void 0){var f=r(a);if(Lr){kn(!0);try{r(a)}finally{kn(!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=J2.bind(null,Ee,t),[s.memoizedState,t]},useRef:function(t){var a=Yt();return t={current:t},a.memoizedState=t},useState:function(t){t=Yu(t);var a=t.queue,r=mg.bind(null,Ee,a);return a.dispatch=r,[t.memoizedState,r]},useDebugValue:Ju,useDeferredValue:function(t,a){var r=Yt();return Qu(r,t,a)},useTransition:function(){var t=Yu(!1);return t=ug.bind(null,Ee,t.queue,!0,!1),Yt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,a,r){var s=Ee,f=Yt();if(Ve){if(r===void 0)throw Error(l(407));r=r()}else{if(r=a(),at===null)throw Error(l(349));(Ue&127)!==0||L0(s,a,r)}f.memoizedState=r;var m={value:r,getSnapshot:a};return f.queue=m,tg(B0.bind(null,s,m,t),[t]),s.flags|=2048,ji(9,{destroy:void 0},V0.bind(null,s,m,r,a),null),r},useId:function(){var t=Yt(),a=at.identifierPrefix;if(Ve){var r=Ha,s=Ba;r=(s&~(1<<32-pa(s)-1)).toString(32)+r,a="_"+a+"R_"+r,r=Vl++,0<r&&(a+="H"+r.toString(32)),a+="_"}else r=P2++,a="_"+a+"r_"+r.toString(32)+"_";return t.memoizedState=a},useHostTransitionStatus:ed,useFormState:X0,useActionState:X0,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=td.bind(null,Ee,!0,r),r.dispatch=a,[t,a]},useMemoCache:Zu,useCacheRefresh:function(){return Yt().memoizedState=X2.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)}}},ad={readContext:Ut,use:Hl,useCallback:lg,useContext:Ut,useEffect:Xu,useImperativeHandle:og,useInsertionEffect:ng,useLayoutEffect:rg,useMemo:sg,useReducer:ql,useRef:eg,useState:function(){return ql(nn)},useDebugValue:Ju,useDeferredValue:function(t,a){var r=vt();return cg(r,Je.memoizedState,t,a)},useTransition:function(){var t=ql(nn)[0],a=vt().memoizedState;return[typeof t=="boolean"?t:_o(t),a]},useSyncExternalStore:U0,useId:pg,useHostTransitionStatus:ed,useFormState:J0,useActionState:J0,useOptimistic:function(t,a){var r=vt();return P0(r,Je,t,a)},useMemoCache:Zu,useCacheRefresh:gg};ad.useEffectEvent=ag;var $g={readContext:Ut,use:Hl,useCallback:lg,useContext:Ut,useEffect:Xu,useImperativeHandle:og,useInsertionEffect:ng,useLayoutEffect:rg,useMemo:sg,useReducer:Fu,useRef:eg,useState:function(){return Fu(nn)},useDebugValue:Ju,useDeferredValue:function(t,a){var r=vt();return Je===null?Qu(r,t,a):cg(r,Je.memoizedState,t,a)},useTransition:function(){var t=Fu(nn)[0],a=vt().memoizedState;return[typeof t=="boolean"?t:_o(t),a]},useSyncExternalStore:U0,useId:pg,useHostTransitionStatus:ed,useFormState:W0,useActionState:W0,useOptimistic:function(t,a){var r=vt();return Je!==null?P0(r,Je,t,a):(r.baseState=t,[t,r.queue.dispatch])},useMemoCache:Zu,useCacheRefresh:gg};$g.useEffectEvent=ag;function nd(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 rd={enqueueSetState:function(t,a,r){t=t._reactInternals;var s=ba(),f=Rn(s);f.payload=a,r!=null&&(f.callback=r),a=An(t,f,s),a!==null&&(la(a,t,s),vo(a,t,s))},enqueueReplaceState:function(t,a,r){t=t._reactInternals;var s=ba(),f=Rn(s);f.tag=1,f.payload=a,r!=null&&(f.callback=r),a=An(t,f,s),a!==null&&(la(a,t,s),vo(a,t,s))},enqueueForceUpdate:function(t,a){t=t._reactInternals;var r=ba(),s=Rn(r);s.tag=2,a!=null&&(s.callback=a),a=An(t,s,r),a!==null&&(la(a,t,r),vo(a,t,r))}};function bg(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?!co(r,s)||!co(f,m):!0}function xg(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&&rd.enqueueReplaceState(a,a.state,null)}function Vr(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 jg(t){console.error(t)}function Sg(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 wg(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 id(t,a,r){return r=Rn(r),r.tag=3,r.payload={element:null},r.callback=function(){Fl(t,a)},r}function kg(t){return t=Rn(t),t.tag=3,t}function Ng(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(){wg(a,r,s)}}var b=r.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(t.callback=function(){wg(a,r,s),typeof f!="function"&&(Bn===null?Bn=new Set([this]):Bn.add(this));var M=s.stack;this.componentDidCatch(s.value,{componentStack:M!==null?M:""})})}function Q2(t,a,r,s,f){if(r.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(a=r.alternate,a!==null&&mi(a,r,f,!0),r=ha.current,r!==null){switch(r.tag){case 31:case 13:return Ta===null?is():r.alternate===null&>===0&&(gt=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),Cd(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)),Cd(t,s,f)),!1}throw Error(l(435,r.tag))}return Cd(t,s,f),is(),!1}if(Ve)return a=ha.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=f,s!==Su&&(t=Error(l(422),{cause:s}),po(Na(t,r)))):(s!==Su&&(a=Error(l(423),{cause:s}),po(Na(a,r))),t=t.current.alternate,t.flags|=65536,f&=-f,t.lanes|=f,s=Na(s,r),f=id(t.stateNode,s,f),Au(t,f),gt!==4&&(gt=2)),!1;var m=Error(l(520),{cause:s});if(m=Na(m,r),Mo===null?Mo=[m]:Mo.push(m),gt!==4&&(gt=2),a===null)return!0;s=Na(s,r),r=a;do{switch(r.tag){case 3:return r.flags|=65536,t=f&-f,r.lanes|=t,t=id(r.stateNode,s,t),Au(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"&&(Bn===null||!Bn.has(m))))return r.flags|=65536,f&=-f,r.lanes|=f,f=kg(f),Ng(f,t,r,s),Au(r,f),!1}r=r.return}while(r!==null);return!1}var od=Error(l(461)),St=!1;function Lt(t,a,r,s){a.child=t===null?T0(a,null,r,s):Ur(a,t.child,r,s)}function zg(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 Rr(a),s=Bu(t,a,r,b,m,f),M=Hu(),t!==null&&!St?(qu(t,a,f),rn(t,a,f)):(Ve&&M&&_u(a),a.flags|=1,Lt(t,a,s,f),a.child)}function Eg(t,a,r,s,f){if(t===null){var m=r.type;return typeof m=="function"&&!$u(m)&&m.defaultProps===void 0&&r.compare===null?(a.tag=15,a.type=m,Cg(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,!gd(t,f)){var b=m.memoizedProps;if(r=r.compare,r=r!==null?r:co,r(b,s)&&t.ref===a.ref)return rn(t,a,f)}return a.flags|=1,t=Qa(m,s),t.ref=a.ref,t.return=a,a.child=t}function Cg(t,a,r,s,f){if(t!==null){var m=t.memoizedProps;if(co(m,s)&&t.ref===a.ref)if(St=!1,a.pendingProps=s=m,gd(t,f))(t.flags&131072)!==0&&(St=!0);else return a.lanes=t.lanes,rn(t,a,f)}return ld(t,a,r,s,f)}function Tg(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 Mg(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?R0(a,m):Iu(),A0(a);else return s=a.lanes=536870912,Mg(t,a,m!==null?m.baseLanes|r:r,r,s)}else m!==null?(Ml(a,m.cachePool),R0(a,m),In(),a.memoizedState=null):(t!==null&&Ml(a,null),Iu(),In());return Lt(t,a,f,r),a.child}function wo(t,a){return t!==null&&t.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function Mg(t,a,r,s,f){var m=Tu();return m=m===null?null:{parent:_t._currentValue,pool:m},a.memoizedState={baseLanes:r,cachePool:m},t!==null&&Ml(a,null),Iu(),A0(a),t!==null&&mi(t,a,s,!0),a.childLanes=f,null}function Yl(t,a){return a=Xl({mode:a.mode,children:a.children},t.mode),a.ref=t.ref,t.child=a,a.return=t,a}function Og(t,a,r){return Ur(a,t.child,null,r),t=Yl(a,a.pendingProps),t.flags|=2,ya(a),a.memoizedState=null,t}function W2(t,a,r){var s=a.pendingProps,f=(a.flags&128)!==0;if(a.flags&=-129,t===null){if(Ve){if(s.mode==="hidden")return t=Yl(a,s),a.lanes=536870912,wo(null,t);if(Lu(a),(t=nt)?(t=Zm(t,Ca),t=t!==null&&t.data==="&"?t:null,t!==null&&(a.memoizedState={dehydrated:t,treeContext:En!==null?{id:Ba,overflow:Ha}:null,retryLane:536870912,hydrationErrors:null},r=h0(t),r.return=a,a.child=r,It=a,nt=null)):t=null,t===null)throw Tn(a);return a.lanes=536870912,null}return Yl(a,s)}var m=t.memoizedState;if(m!==null){var b=m.dehydrated;if(Lu(a),f)if(a.flags&256)a.flags&=-257,a=Og(t,a,r);else if(a.memoizedState!==null)a.child=t.child,a.flags|=128,a=null;else throw Error(l(558));else if(St||mi(t,a,r,!1),f=(r&t.childLanes)!==0,St||f){if(s=at,s!==null&&(b=jp(s,r),b!==0&&b!==m.retryLane))throw m.retryLane=b,Cr(t,b),la(s,t,b),od;is(),a=Og(t,a,r)}else t=m.treeContext,nt=Ma(b.nextSibling),It=a,Ve=!0,Cn=null,Ca=!1,t!==null&&$0(a,t),a=Yl(a,s),a.flags|=4096;return a}return t=Qa(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 ld(t,a,r,s,f){return Rr(a),r=Bu(t,a,r,s,void 0,f),s=Hu(),t!==null&&!St?(qu(t,a,f),rn(t,a,f)):(Ve&&s&&_u(a),a.flags|=1,Lt(t,a,r,f),a.child)}function Rg(t,a,r,s,f,m){return Rr(a),a.updateQueue=null,r=I0(a,s,r,f),D0(t),s=Hu(),t!==null&&!St?(qu(t,a,m),rn(t,a,m)):(Ve&&s&&_u(a),a.flags|=1,Lt(t,a,r,m),a.child)}function Ag(t,a,r,s,f){if(Rr(a),a.stateNode===null){var m=di,b=r.contextType;typeof b=="object"&&b!==null&&(m=Ut(b)),m=new r(s,m),a.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=rd,a.stateNode=m,m._reactInternals=a,m=a.stateNode,m.props=s,m.state=a.memoizedState,m.refs={},Ou(a),b=r.contextType,m.context=typeof b=="object"&&b!==null?Ut(b):di,m.state=a.memoizedState,b=r.getDerivedStateFromProps,typeof b=="function"&&(nd(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&&rd.enqueueReplaceState(m,m.state,null),bo(a,s,m,f),$o(),m.state=a.memoizedState),typeof m.componentDidMount=="function"&&(a.flags|=4194308),s=!0}else if(t===null){m=a.stateNode;var M=a.memoizedProps,U=Vr(r,M);m.props=U;var J=m.context,oe=r.contextType;b=di,typeof oe=="object"&&oe!==null&&(b=Ut(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||J!==b)&&xg(a,m,s,b),On=!1;var ee=a.memoizedState;m.state=ee,bo(a,s,m,f),$o(),J=a.memoizedState,M||ee!==J||On?(typeof ce=="function"&&(nd(a,r,ce,s),J=a.memoizedState),(U=On||bg(a,r,U,s,ee,J,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=J),m.props=s,m.state=J,m.context=b,s=U):(typeof m.componentDidMount=="function"&&(a.flags|=4194308),s=!1)}else{m=a.stateNode,Ru(t,a),b=a.memoizedProps,oe=Vr(r,b),m.props=oe,ce=a.pendingProps,ee=m.context,J=r.contextType,U=di,typeof J=="object"&&J!==null&&(U=Ut(J)),M=r.getDerivedStateFromProps,(J=typeof M=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(b!==ce||ee!==U)&&xg(a,m,s,U),On=!1,ee=a.memoizedState,m.state=ee,bo(a,s,m,f),$o();var ne=a.memoizedState;b!==ce||ee!==ne||On||t!==null&&t.dependencies!==null&&Cl(t.dependencies)?(typeof M=="function"&&(nd(a,r,M,s),ne=a.memoizedState),(oe=On||bg(a,r,oe,s,ee,ne,U)||t!==null&&t.dependencies!==null&&Cl(t.dependencies))?(J||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(s,ne,U),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(s,ne,U)),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=U,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=Ur(a,t.child,null,f),a.child=Ur(a,null,r,f)):Lt(t,a,r,f),a.memoizedState=m.state,t=a.child):t=rn(t,a,f),t}function Dg(t,a,r,s){return Mr(),a.flags|=256,Lt(t,a,r,s),a.child}var sd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function cd(t){return{baseLanes:t,cachePool:w0()}}function ud(t,a,r){return t=t!==null?t.childLanes&~r:0,a&&(t|=$a),t}function Ig(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(Ve){if(f?Dn(a):In(),(t=nt)?(t=Zm(t,Ca),t=t!==null&&t.data!=="&"?t:null,t!==null&&(a.memoizedState={dehydrated:t,treeContext:En!==null?{id:Ba,overflow:Ha}:null,retryLane:536870912,hydrationErrors:null},r=h0(t),r.return=a,a.child=r,It=a,nt=null)):t=null,t===null)throw Tn(a);return Gd(t)?a.lanes=32:a.lanes=536870912,null}var M=s.children;return s=s.fallback,f?(In(),f=a.mode,M=Xl({mode:"hidden",children:M},f),s=Tr(s,f,r,null),M.return=a,s.return=a,M.sibling=s,a.child=M,s=a.child,s.memoizedState=cd(r),s.childLanes=ud(t,b,r),a.memoizedState=sd,wo(null,s)):(Dn(a),dd(a,M))}var U=t.memoizedState;if(U!==null&&(M=U.dehydrated,M!==null)){if(m)a.flags&256?(Dn(a),a.flags&=-257,a=fd(t,a,r)):a.memoizedState!==null?(In(),a.child=t.child,a.flags|=128,a=null):(In(),M=s.fallback,f=a.mode,s=Xl({mode:"visible",children:s.children},f),M=Tr(M,f,r,null),M.flags|=2,s.return=a,M.return=a,s.sibling=M,a.child=s,Ur(a,t.child,null,r),s=a.child,s.memoizedState=cd(r),s.childLanes=ud(t,b,r),a.memoizedState=sd,a=wo(null,s));else if(Dn(a),Gd(M)){if(b=M.nextSibling&&M.nextSibling.dataset,b)var J=b.dgst;b=J,s=Error(l(419)),s.stack="",s.digest=b,po({value:s,source:null,stack:null}),a=fd(t,a,r)}else if(St||mi(t,a,r,!1),b=(r&t.childLanes)!==0,St||b){if(b=at,b!==null&&(s=jp(b,r),s!==0&&s!==U.retryLane))throw U.retryLane=s,Cr(t,s),la(b,t,s),od;Zd(M)||is(),a=fd(t,a,r)}else Zd(M)?(a.flags|=192,a.child=t.child,a=null):(t=U.treeContext,nt=Ma(M.nextSibling),It=a,Ve=!0,Cn=null,Ca=!1,t!==null&&$0(a,t),a=dd(a,s.children),a.flags|=4096);return a}return f?(In(),M=s.fallback,f=a.mode,U=t.child,J=U.sibling,s=Qa(U,{mode:"hidden",children:s.children}),s.subtreeFlags=U.subtreeFlags&65011712,J!==null?M=Qa(J,M):(M=Tr(M,f,r,null),M.flags|=2),M.return=a,s.return=a,s.sibling=M,a.child=s,wo(null,s),s=a.child,M=t.child.memoizedState,M===null?M=cd(r):(f=M.cachePool,f!==null?(U=_t._currentValue,f=f.parent!==U?{parent:U,pool:U}:f):f=w0(),M={baseLanes:M.baseLanes|r,cachePool:f}),s.memoizedState=M,s.childLanes=ud(t,b,r),a.memoizedState=sd,wo(t.child,s)):(Dn(a),r=t.child,t=r.sibling,r=Qa(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 dd(t,a){return a=Xl({mode:"visible",children:a},t.mode),a.return=t,t.child=a}function Xl(t,a){return t=ma(22,t,null,a),t.lanes=0,t}function fd(t,a,r){return Ur(a,t.child,null,r),t=dd(a,a.pendingProps.children),t.flags|=2,a.memoizedState=null,t}function Ug(t,a,r){t.lanes|=a;var s=t.alternate;s!==null&&(s.lanes|=a),Nu(t.return,a,r)}function pd(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 Lg(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),Lt(t,a,s,r),s=Ve?fo:0,!M&&t!==null&&(t.flags&128)!==0)e:for(t=a.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Ug(t,r,a);else if(t.tag===19)Ug(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&&Ul(t)===null&&(f=r),r=r.sibling;r=f,r===null?(f=a.child,a.child=null):(f=r.sibling,r.sibling=null),pd(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&&Ul(t)===null){a.child=f;break}t=f.sibling,f.sibling=r,r=f,f=t}pd(a,!0,r,null,m,s);break;case"together":pd(a,!1,null,null,void 0,s);break;default:a.memoizedState=null}return a.child}function rn(t,a,r){if(t!==null&&(a.dependencies=t.dependencies),Vn|=a.lanes,(r&a.childLanes)===0)if(t!==null){if(mi(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=Qa(t,t.pendingProps),a.child=r,r.return=a;t.sibling!==null;)t=t.sibling,r=r.sibling=Qa(t,t.pendingProps),r.return=a;r.sibling=null}return a.child}function gd(t,a){return(t.lanes&a)!==0?!0:(t=t.dependencies,!!(t!==null&&Cl(t)))}function eb(t,a,r){switch(a.tag){case 3:he(a,a.stateNode.containerInfo),Mn(a,_t,t.memoizedState.cache),Mr();break;case 27:case 5:Te(a);break;case 4:he(a,a.stateNode.containerInfo);break;case 10:Mn(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,Lu(a),null;break;case 13:var s=a.memoizedState;if(s!==null)return s.dehydrated!==null?(Dn(a),a.flags|=128,null):(r&a.child.childLanes)!==0?Ig(t,a,r):(Dn(a),t=rn(t,a,r),t!==null?t.sibling:null);Dn(a);break;case 19:var f=(t.flags&128)!==0;if(s=(r&a.childLanes)!==0,s||(mi(t,a,r,!1),s=(r&a.childLanes)!==0),f){if(s)return Lg(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,Tg(t,a,r,a.pendingProps);case 24:Mn(a,_t,t.memoizedState.cache)}return rn(t,a,r)}function Vg(t,a,r){if(t!==null)if(t.memoizedProps!==a.pendingProps)St=!0;else{if(!gd(t,r)&&(a.flags&128)===0)return St=!1,eb(t,a,r);St=(t.flags&131072)!==0}else St=!1,Ve&&(a.flags&1048576)!==0&&v0(a,fo,a.index);switch(a.lanes=0,a.tag){case 16:e:{var s=a.pendingProps;if(t=Dr(a.elementType),a.type=t,typeof t=="function")$u(t)?(s=Vr(t,s),a.tag=1,a=Ag(null,a,t,s,r)):(a.tag=0,a=ld(null,a,t,s,r));else{if(t!=null){var f=t.$$typeof;if(f===R){a.tag=11,a=zg(null,a,t,s,r);break e}else if(f===C){a.tag=14,a=Eg(null,a,t,s,r);break e}}throw a=ie(t)||t,Error(l(306,a,""))}}return a;case 0:return ld(t,a,a.type,a.pendingProps,r);case 1:return s=a.type,f=Vr(s,a.pendingProps),Ag(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,Ru(t,a),bo(a,s,null,r);var b=a.memoizedState;if(s=b.cache,Mn(a,_t,s),s!==m.cache&&zu(a,[_t],r,!0),$o(),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=Dg(t,a,s,r);break e}else if(s!==f){f=Na(Error(l(424)),a),po(f),a=Dg(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(nt=Ma(t.firstChild),It=a,Ve=!0,Cn=null,Ca=!0,r=T0(a,null,s,r),a.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling}else{if(Mr(),s===f){a=rn(t,a,r);break e}Lt(t,a,s,r)}a=a.child}return a;case 26:return Kl(t,a),t===null?(r=Jm(a.type,null,a.pendingProps,null))?a.memoizedState=r:Ve||(r=a.type,t=a.pendingProps,s=fs(X.current).createElement(r),s[Dt]=a,s[ta]=t,Vt(s,r,t),Ot(s),a.stateNode=s):a.memoizedState=Jm(a.type,t.memoizedProps,a.pendingProps,t.memoizedState),null;case 27:return Te(a),t===null&&Ve&&(s=a.stateNode=Ym(a.type,a.pendingProps,X.current),It=a,Ca=!0,f=nt,Zn(a.type)?(Fd=f,nt=Ma(s.firstChild)):nt=f),Lt(t,a,a.pendingProps.children,r),Kl(t,a),t===null&&(a.flags|=4194304),a.child;case 5:return t===null&&Ve&&((f=s=nt)&&(s=Cb(s,a.type,a.pendingProps,Ca),s!==null?(a.stateNode=s,It=a,nt=Ma(s.firstChild),Ca=!1,f=!0):f=!1),f||Tn(a)),Te(a),f=a.type,m=a.pendingProps,b=t!==null?t.memoizedProps:null,s=m.children,Hd(f,m)?s=null:b!==null&&Hd(f,b)&&(a.flags|=32),a.memoizedState!==null&&(f=Bu(t,a,Z2,null,null,r),Vo._currentValue=f),Kl(t,a),Lt(t,a,s,r),a.child;case 6:return t===null&&Ve&&((t=r=nt)&&(r=Tb(r,a.pendingProps,Ca),r!==null?(a.stateNode=r,It=a,nt=null,t=!0):t=!1),t||Tn(a)),null;case 13:return Ig(t,a,r);case 4:return he(a,a.stateNode.containerInfo),s=a.pendingProps,t===null?a.child=Ur(a,null,s,r):Lt(t,a,s,r),a.child;case 11:return zg(t,a,a.type,a.pendingProps,r);case 7:return Lt(t,a,a.pendingProps,r),a.child;case 8:return Lt(t,a,a.pendingProps.children,r),a.child;case 12:return Lt(t,a,a.pendingProps.children,r),a.child;case 10:return s=a.pendingProps,Mn(a,a.type,s.value),Lt(t,a,s.children,r),a.child;case 9:return f=a.type._context,s=a.pendingProps.children,Rr(a),f=Ut(f),s=s(f),a.flags|=1,Lt(t,a,s,r),a.child;case 14:return Eg(t,a,a.type,a.pendingProps,r);case 15:return Cg(t,a,a.type,a.pendingProps,r);case 19:return Lg(t,a,r);case 31:return W2(t,a,r);case 22:return Tg(t,a,r,a.pendingProps);case 24:return Rr(a),s=Ut(_t),t===null?(f=Tu(),f===null&&(f=at,m=Eu(),f.pooledCache=m,m.refCount++,m!==null&&(f.pooledCacheLanes|=r),f=m),a.memoizedState={parent:s,cache:f},Ou(a),Mn(a,_t,f)):((t.lanes&r)!==0&&(Ru(t,a),bo(a,null,null,r),$o()),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),Mn(a,_t,s)):(s=m.cache,Mn(a,_t,s),s!==f.cache&&zu(a,[_t],r,!0))),Lt(t,a,a.pendingProps.children,r),a.child;case 29:throw a.pendingProps}throw Error(l(156,a.tag))}function on(t){t.flags|=4}function md(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(pm())t.flags|=8192;else throw Ir=Rl,Mu}else t.flags&=-16777217}function Bg(t,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!ah(a))if(pm())t.flags|=8192;else throw Ir=Rl,Mu}function Jl(t,a){a!==null&&(t.flags|=4),t.flags&16384&&(a=t.tag!==22?bp():536870912,t.lanes|=a,Ni|=a)}function ko(t,a){if(!Ve)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 rt(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 tb(t,a,r){var s=a.pendingProps;switch(ju(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return rt(a),null;case 1:return rt(a),null;case 3:return r=a.stateNode,s=null,t!==null&&(s=t.memoizedState.cache),a.memoizedState.cache!==s&&(a.flags|=2048),tn(_t),Se(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(gi(a)?on(a):t===null||t.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,wu())),rt(a),null;case 26:var f=a.type,m=a.memoizedState;return t===null?(on(a),m!==null?(rt(a),Bg(a,m)):(rt(a),md(a,f,null,s,r))):m?m!==t.memoizedState?(on(a),rt(a),Bg(a,m)):(rt(a),a.flags&=-16777217):(t=t.memoizedProps,t!==s&&on(a),rt(a),md(a,f,t,s,r)),null;case 27:if(P(a),r=X.current,f=a.type,t!==null&&a.stateNode!=null)t.memoizedProps!==s&&on(a);else{if(!s){if(a.stateNode===null)throw Error(l(166));return rt(a),null}t=O.current,gi(a)?b0(a):(t=Ym(f,s,r),a.stateNode=t,on(a))}return rt(a),null;case 5:if(P(a),f=a.type,t!==null&&a.stateNode!=null)t.memoizedProps!==s&&on(a);else{if(!s){if(a.stateNode===null)throw Error(l(166));return rt(a),null}if(m=O.current,gi(a))b0(a);else{var b=fs(X.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[Dt]=a,m[ta]=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(Vt(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&&on(a)}}return rt(a),md(a,a.type,t===null?null:t.memoizedProps,a.pendingProps,r),null;case 6:if(t&&a.stateNode!=null)t.memoizedProps!==s&&on(a);else{if(typeof s!="string"&&a.stateNode===null)throw Error(l(166));if(t=X.current,gi(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[Dt]=a,t=!!(t.nodeValue===r||s!==null&&s.suppressHydrationWarning===!0||Im(t.nodeValue,r)),t||Tn(a,!0)}else t=fs(t).createTextNode(s),t[Dt]=a,a.stateNode=t}return rt(a),null;case 31:if(r=a.memoizedState,t===null||t.memoizedState!==null){if(s=gi(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[Dt]=a}else Mr(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;rt(a),t=!1}else r=wu(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=r),t=!0;if(!t)return a.flags&256?(ya(a),a):(ya(a),null);if((a.flags&128)!==0)throw Error(l(558))}return rt(a),null;case 13:if(s=a.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(f=gi(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[Dt]=a}else Mr(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;rt(a),f=!1}else f=wu(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=f),f=!0;if(!f)return a.flags&256?(ya(a),a):(ya(a),null)}return ya(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),Jl(a,a.updateQueue),rt(a),null);case 4:return Se(),t===null&&Id(a.stateNode.containerInfo),rt(a),null;case 10:return tn(a.type),rt(a),null;case 19:if(V(yt),s=a.memoizedState,s===null)return rt(a),null;if(f=(a.flags&128)!==0,m=s.rendering,m===null)if(f)ko(s,!1);else{if(gt!==0||t!==null&&(t.flags&128)!==0)for(t=a.child;t!==null;){if(m=Ul(t),m!==null){for(a.flags|=128,ko(s,!1),t=m.updateQueue,a.updateQueue=t,Jl(a,t),a.subtreeFlags=0,t=r,r=a.child;r!==null;)m0(r,t),r=r.sibling;return L(yt,yt.current&1|2),Ve&&Wa(a,s.treeForkCount),a.child}t=t.sibling}s.tail!==null&&At()>as&&(a.flags|=128,f=!0,ko(s,!1),a.lanes=4194304)}else{if(!f)if(t=Ul(m),t!==null){if(a.flags|=128,f=!0,t=t.updateQueue,a.updateQueue=t,Jl(a,t),ko(s,!0),s.tail===null&&s.tailMode==="hidden"&&!m.alternate&&!Ve)return rt(a),null}else 2*At()-s.renderingStartTime>as&&r!==536870912&&(a.flags|=128,f=!0,ko(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=At(),t.sibling=null,r=yt.current,L(yt,f?r&1|2:r&1),Ve&&Wa(a,s.treeForkCount),t):(rt(a),null);case 22:case 23:return ya(a),Uu(),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&&(rt(a),a.subtreeFlags&6&&(a.flags|=8192)):rt(a),r=a.updateQueue,r!==null&&Jl(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(Ar),null;case 24:return r=null,t!==null&&(r=t.memoizedState.cache),a.memoizedState.cache!==r&&(a.flags|=2048),tn(_t),rt(a),null;case 25:return null;case 30:return null}throw Error(l(156,a.tag))}function ab(t,a){switch(ju(a),a.tag){case 1:return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 3:return tn(_t),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(ya(a),a.alternate===null)throw Error(l(340));Mr()}return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 13:if(ya(a),t=a.memoizedState,t!==null&&t.dehydrated!==null){if(a.alternate===null)throw Error(l(340));Mr()}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 tn(a.type),null;case 22:case 23:return ya(a),Uu(),t!==null&&V(Ar),t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 24:return tn(_t),null;case 25:return null;default:return null}}function Hg(t,a){switch(ju(a),a.tag){case 3:tn(_t),Se();break;case 26:case 27:case 5:P(a);break;case 4:Se();break;case 31:a.memoizedState!==null&&ya(a);break;case 13:ya(a);break;case 19:V(yt);break;case 10:tn(a.type);break;case 22:case 23:ya(a),Uu(),t!==null&&V(Ar);break;case 24:tn(_t)}}function No(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){Ye(a,a.return,M)}}function Un(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 U=r,J=M;try{J()}catch(oe){Ye(f,U,oe)}}}s=s.next}while(s!==m)}}catch(oe){Ye(a,a.return,oe)}}function qg(t){var a=t.updateQueue;if(a!==null){var r=t.stateNode;try{O0(a,r)}catch(s){Ye(t,t.return,s)}}}function Pg(t,a,r){r.props=Vr(t.type,t.memoizedProps),r.state=t.memoizedState;try{r.componentWillUnmount()}catch(s){Ye(t,a,s)}}function zo(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){Ye(t,a,f)}}function qa(t,a){var r=t.ref,s=t.refCleanup;if(r!==null)if(typeof s=="function")try{s()}catch(f){Ye(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){Ye(t,a,f)}else r.current=null}function Zg(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){Ye(t,t.return,f)}}function hd(t,a,r){try{var s=t.stateNode;Sb(s,t.type,r,a),s[ta]=a}catch(f){Ye(t,t.return,f)}}function Gg(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Zn(t.type)||t.tag===4}function yd(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Gg(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&&Zn(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 vd(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=Xa));else if(s!==4&&(s===27&&Zn(t.type)&&(r=t.stateNode,a=null),t=t.child,t!==null))for(vd(t,a,r),t=t.sibling;t!==null;)vd(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&&Zn(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 Fg(t){var a=t.stateNode,r=t.memoizedProps;try{for(var s=t.type,f=a.attributes;f.length;)a.removeAttributeNode(f[0]);Vt(a,s,r),a[Dt]=t,a[ta]=r}catch(m){Ye(t,t.return,m)}}var ln=!1,wt=!1,$d=!1,Yg=typeof WeakSet=="function"?WeakSet:Set,Rt=null;function nb(t,a){if(t=t.containerInfo,Vd=$s,t=o0(t),fu(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,U=-1,J=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||(U=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&&++J===f&&(M=b),ee===m&&++oe===s&&(U=b),(ne=ce.nextSibling)!==null)break;ce=ee,ee=ce.parentNode}ce=ne}r=M===-1||U===-1?null:{start:M,end:U}}else r=null}r=r||{start:0,end:0}}else r=null;for(Bd={focusedElem:t,selectionRange:r},$s=!1,Rt=a;Rt!==null;)if(a=Rt,t=a.child,(a.subtreeFlags&1028)!==0&&t!==null)t.return=a,Rt=t;else for(;Rt!==null;){switch(a=Rt,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=Vr(r.type,f);t=s.getSnapshotBeforeUpdate(ye,m),s.__reactInternalSnapshotBeforeUpdate=t}catch(we){Ye(r,r.return,we)}}break;case 3:if((t&1024)!==0){if(t=a.stateNode.containerInfo,r=t.nodeType,r===9)Pd(t);else if(r===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Pd(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,Rt=t;break}Rt=a.return}}function Kg(t,a,r){var s=r.flags;switch(r.tag){case 0:case 11:case 15:cn(t,r),s&4&&No(5,r);break;case 1:if(cn(t,r),s&4)if(t=r.stateNode,a===null)try{t.componentDidMount()}catch(b){Ye(r,r.return,b)}else{var f=Vr(r.type,a.memoizedProps);a=a.memoizedState;try{t.componentDidUpdate(f,a,t.__reactInternalSnapshotBeforeUpdate)}catch(b){Ye(r,r.return,b)}}s&64&&qg(r),s&512&&zo(r,r.return);break;case 3:if(cn(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{O0(t,a)}catch(b){Ye(r,r.return,b)}}break;case 27:a===null&&s&4&&Fg(r);case 26:case 5:cn(t,r),a===null&&s&4&&Zg(r),s&512&&zo(r,r.return);break;case 12:cn(t,r);break;case 31:cn(t,r),s&4&&Qg(t,r);break;case 13:cn(t,r),s&4&&Wg(t,r),s&64&&(t=r.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(r=fb.bind(null,r),Mb(t,r))));break;case 22:if(s=r.memoizedState!==null||ln,!s){a=a!==null&&a.memoizedState!==null||wt,f=ln;var m=wt;ln=s,(wt=a)&&!m?un(t,r,(r.subtreeFlags&8772)!==0):cn(t,r),ln=f,wt=m}break;case 30:break;default:cn(t,r)}}function Xg(t){var a=t.alternate;a!==null&&(t.alternate=null,Xg(a)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(a=t.stateNode,a!==null&&Kc(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,na=!1;function sn(t,a,r){for(r=r.child;r!==null;)Jg(t,a,r),r=r.sibling}function Jg(t,a,r){if(fa&&typeof fa.onCommitFiberUnmount=="function")try{fa.onCommitFiberUnmount(Ji,r)}catch{}switch(r.tag){case 26:wt||qa(r,a),sn(t,a,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:wt||qa(r,a);var s=ct,f=na;Zn(r.type)&&(ct=r.stateNode,na=!1),sn(t,a,r),Io(r.stateNode),ct=s,na=f;break;case 5:wt||qa(r,a);case 6:if(s=ct,f=na,ct=null,sn(t,a,r),ct=s,na=f,ct!==null)if(na)try{(ct.nodeType===9?ct.body:ct.nodeName==="HTML"?ct.ownerDocument.body:ct).removeChild(r.stateNode)}catch(m){Ye(r,a,m)}else try{ct.removeChild(r.stateNode)}catch(m){Ye(r,a,m)}break;case 18:ct!==null&&(na?(t=ct,qm(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,r.stateNode),Ai(t)):qm(ct,r.stateNode));break;case 4:s=ct,f=na,ct=r.stateNode.containerInfo,na=!0,sn(t,a,r),ct=s,na=f;break;case 0:case 11:case 14:case 15:Un(2,r,a),wt||Un(4,r,a),sn(t,a,r);break;case 1:wt||(qa(r,a),s=r.stateNode,typeof s.componentWillUnmount=="function"&&Pg(r,a,s)),sn(t,a,r);break;case 21:sn(t,a,r);break;case 22:wt=(s=wt)||r.memoizedState!==null,sn(t,a,r),wt=s;break;default:sn(t,a,r)}}function Qg(t,a){if(a.memoizedState===null&&(t=a.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Ai(t)}catch(r){Ye(a,a.return,r)}}}function Wg(t,a){if(a.memoizedState===null&&(t=a.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Ai(t)}catch(r){Ye(a,a.return,r)}}function rb(t){switch(t.tag){case 31:case 13:case 19:var a=t.stateNode;return a===null&&(a=t.stateNode=new Yg),a;case 22:return t=t.stateNode,a=t._retryCache,a===null&&(a=t._retryCache=new Yg),a;default:throw Error(l(435,t.tag))}}function Wl(t,a){var r=rb(t);a.forEach(function(s){if(!r.has(s)){r.add(s);var f=pb.bind(null,t,s);s.then(f,f)}})}function ra(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(Zn(M.type)){ct=M.stateNode,na=!1;break e}break;case 5:ct=M.stateNode,na=!1;break e;case 3:case 4:ct=M.stateNode.containerInfo,na=!0;break e}M=M.return}if(ct===null)throw Error(l(160));Jg(m,b,f),ct=null,na=!1,m=f.alternate,m!==null&&(m.return=null),f.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)em(a,t),a=a.sibling}var Ia=null;function em(t,a){var r=t.alternate,s=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:ra(a,t),ia(t),s&4&&(Un(3,t,t.return),No(3,t),Un(5,t,t.return));break;case 1:ra(a,t),ia(t),s&512&&(wt||r===null||qa(r,r.return)),s&64&&ln&&(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=Ia;if(ra(a,t),ia(t),s&512&&(wt||r===null||qa(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[eo]||m[Dt]||m.namespaceURI==="http://www.w3.org/2000/svg"||m.hasAttribute("itemprop"))&&(m=f.createElement(s),f.head.insertBefore(m,f.querySelector("head > title"))),Vt(m,s,r),m[Dt]=t,Ot(m),s=m;break e;case"link":var b=eh("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),Vt(m,s,r),f.head.appendChild(m);break;case"meta":if(b=eh("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),Vt(m,s,r),f.head.appendChild(m);break;default:throw Error(l(468,s))}m[Dt]=t,Ot(m),s=m}t.stateNode=s}else th(f,t.type,t.stateNode);else t.stateNode=Wm(f,s,t.memoizedProps);else m!==s?(m===null?r.stateNode!==null&&(r=r.stateNode,r.parentNode.removeChild(r)):m.count--,s===null?th(f,t.type,t.stateNode):Wm(f,s,t.memoizedProps)):s===null&&t.stateNode!==null&&hd(t,t.memoizedProps,r.memoizedProps)}break;case 27:ra(a,t),ia(t),s&512&&(wt||r===null||qa(r,r.return)),r!==null&&s&4&&hd(t,t.memoizedProps,r.memoizedProps);break;case 5:if(ra(a,t),ia(t),s&512&&(wt||r===null||qa(r,r.return)),t.flags&32){f=t.stateNode;try{ri(f,"")}catch(ye){Ye(t,t.return,ye)}}s&4&&t.stateNode!=null&&(f=t.memoizedProps,hd(t,f,r!==null?r.memoizedProps:f)),s&1024&&($d=!0);break;case 6:if(ra(a,t),ia(t),s&4){if(t.stateNode===null)throw Error(l(162));s=t.memoizedProps,r=t.stateNode;try{r.nodeValue=s}catch(ye){Ye(t,t.return,ye)}}break;case 3:if(ms=null,f=Ia,Ia=ps(a.containerInfo),ra(a,t),Ia=f,ia(t),s&4&&r!==null&&r.memoizedState.isDehydrated)try{Ai(a.containerInfo)}catch(ye){Ye(t,t.return,ye)}$d&&($d=!1,tm(t));break;case 4:s=Ia,Ia=ps(t.stateNode.containerInfo),ra(a,t),ia(t),Ia=s;break;case 12:ra(a,t),ia(t);break;case 31:ra(a,t),ia(t),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,Wl(t,s)));break;case 13:ra(a,t),ia(t),t.child.flags&8192&&t.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(ts=At()),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,Wl(t,s)));break;case 22:f=t.memoizedState!==null;var U=r!==null&&r.memoizedState!==null,J=ln,oe=wt;if(ln=J||f,wt=oe||U,ra(a,t),wt=oe,ln=J,ia(t),s&8192)e:for(a=t.stateNode,a._visibility=f?a._visibility&-2:a._visibility|1,f&&(r===null||U||ln||wt||Br(t)),r=null,a=t;;){if(a.tag===5||a.tag===26){if(r===null){U=r=a;try{if(m=U.stateNode,f)b=m.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{M=U.stateNode;var ce=U.memoizedProps.style,ee=ce!=null&&ce.hasOwnProperty("display")?ce.display:null;M.style.display=ee==null||typeof ee=="boolean"?"":(""+ee).trim()}}catch(ye){Ye(U,U.return,ye)}}}else if(a.tag===6){if(r===null){U=a;try{U.stateNode.nodeValue=f?"":U.memoizedProps}catch(ye){Ye(U,U.return,ye)}}}else if(a.tag===18){if(r===null){U=a;try{var ne=U.stateNode;f?Pm(ne,!0):Pm(U.stateNode,!1)}catch(ye){Ye(U,U.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:ra(a,t),ia(t),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,Wl(t,s)));break;case 30:break;case 21:break;default:ra(a,t),ia(t)}}function ia(t){var a=t.flags;if(a&2){try{for(var r,s=t.return;s!==null;){if(Gg(s)){r=s;break}s=s.return}if(r==null)throw Error(l(160));switch(r.tag){case 27:var f=r.stateNode,m=yd(t);Ql(t,m,f);break;case 5:var b=r.stateNode;r.flags&32&&(ri(b,""),r.flags&=-33);var M=yd(t);Ql(t,M,b);break;case 3:case 4:var U=r.stateNode.containerInfo,J=yd(t);vd(t,J,U);break;default:throw Error(l(161))}}catch(oe){Ye(t,t.return,oe)}t.flags&=-3}a&4096&&(t.flags&=-4097)}function tm(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var a=t;tm(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),t=t.sibling}}function cn(t,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)Kg(t,a.alternate,a),a=a.sibling}function Br(t){for(t=t.child;t!==null;){var a=t;switch(a.tag){case 0:case 11:case 14:case 15:Un(4,a,a.return),Br(a);break;case 1:qa(a,a.return);var r=a.stateNode;typeof r.componentWillUnmount=="function"&&Pg(a,a.return,r),Br(a);break;case 27:Io(a.stateNode);case 26:case 5:qa(a,a.return),Br(a);break;case 22:a.memoizedState===null&&Br(a);break;case 30:Br(a);break;default:Br(a)}t=t.sibling}}function un(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:un(f,m,r),No(4,m);break;case 1:if(un(f,m,r),s=m,f=s.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(J){Ye(s,s.return,J)}if(s=m,f=s.updateQueue,f!==null){var M=s.stateNode;try{var U=f.shared.hiddenCallbacks;if(U!==null)for(f.shared.hiddenCallbacks=null,f=0;f<U.length;f++)M0(U[f],M)}catch(J){Ye(s,s.return,J)}}r&&b&64&&qg(m),zo(m,m.return);break;case 27:Fg(m);case 26:case 5:un(f,m,r),r&&s===null&&b&4&&Zg(m),zo(m,m.return);break;case 12:un(f,m,r);break;case 31:un(f,m,r),r&&b&4&&Qg(f,m);break;case 13:un(f,m,r),r&&b&4&&Wg(f,m);break;case 22:m.memoizedState===null&&un(f,m,r),zo(m,m.return);break;case 30:break;default:un(f,m,r)}a=a.sibling}}function bd(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&&go(r))}function xd(t,a){t=null,a.alternate!==null&&(t=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==t&&(a.refCount++,t!=null&&go(t))}function Ua(t,a,r,s){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)am(t,a,r,s),a=a.sibling}function am(t,a,r,s){var f=a.flags;switch(a.tag){case 0:case 11:case 15:Ua(t,a,r,s),f&2048&&No(9,a);break;case 1:Ua(t,a,r,s);break;case 3:Ua(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&&go(t)));break;case 12:if(f&2048){Ua(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(U){Ye(a,a.return,U)}}else Ua(t,a,r,s);break;case 31:Ua(t,a,r,s);break;case 13:Ua(t,a,r,s);break;case 23:break;case 22:m=a.stateNode,b=a.alternate,a.memoizedState!==null?m._visibility&2?Ua(t,a,r,s):Eo(t,a):m._visibility&2?Ua(t,a,r,s):(m._visibility|=2,Si(t,a,r,s,(a.subtreeFlags&10256)!==0||!1)),f&2048&&bd(b,a);break;case 24:Ua(t,a,r,s),f&2048&&xd(a.alternate,a);break;default:Ua(t,a,r,s)}}function Si(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,U=s,J=b.flags;switch(b.tag){case 0:case 11:case 15:Si(m,b,M,U,f),No(8,b);break;case 23:break;case 22:var oe=b.stateNode;b.memoizedState!==null?oe._visibility&2?Si(m,b,M,U,f):Eo(m,b):(oe._visibility|=2,Si(m,b,M,U,f)),f&&J&2048&&bd(b.alternate,b);break;case 24:Si(m,b,M,U,f),f&&J&2048&&xd(b.alternate,b);break;default:Si(m,b,M,U,f)}a=a.sibling}}function Eo(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:Eo(r,s),f&2048&&bd(s.alternate,s);break;case 24:Eo(r,s),f&2048&&xd(s.alternate,s);break;default:Eo(r,s)}a=a.sibling}}var Co=8192;function wi(t,a,r){if(t.subtreeFlags&Co)for(t=t.child;t!==null;)nm(t,a,r),t=t.sibling}function nm(t,a,r){switch(t.tag){case 26:wi(t,a,r),t.flags&Co&&t.memoizedState!==null&&Pb(r,Ia,t.memoizedState,t.memoizedProps);break;case 5:wi(t,a,r);break;case 3:case 4:var s=Ia;Ia=ps(t.stateNode.containerInfo),wi(t,a,r),Ia=s;break;case 22:t.memoizedState===null&&(s=t.alternate,s!==null&&s.memoizedState!==null?(s=Co,Co=16777216,wi(t,a,r),Co=s):wi(t,a,r));break;default:wi(t,a,r)}}function rm(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 To(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];Rt=s,om(s,t)}rm(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)im(t),t=t.sibling}function im(t){switch(t.tag){case 0:case 11:case 15:To(t),t.flags&2048&&Un(9,t,t.return);break;case 3:To(t);break;case 12:To(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)):To(t);break;default:To(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];Rt=s,om(s,t)}rm(t)}for(t=t.child;t!==null;){switch(a=t,a.tag){case 0:case 11:case 15:Un(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 om(t,a){for(;Rt!==null;){var r=Rt;switch(r.tag){case 0:case 11:case 15:Un(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:go(r.memoizedState.cache)}if(s=r.child,s!==null)s.return=r,Rt=s;else e:for(r=t;Rt!==null;){s=Rt;var f=s.sibling,m=s.return;if(Xg(s),s===r){Rt=null;break e}if(f!==null){f.return=m,Rt=f;break e}Rt=m}}}var ib={getCacheForType:function(t){var a=Ut(_t),r=a.data.get(t);return r===void 0&&(r=t(),a.data.set(t,r)),r},cacheSignal:function(){return Ut(_t).controller.signal}},ob=typeof WeakMap=="function"?WeakMap:Map,Ge=0,at=null,De=null,Ue=0,Fe=0,va=null,Ln=!1,ki=!1,_d=!1,dn=0,gt=0,Vn=0,Hr=0,jd=0,$a=0,Ni=0,Mo=null,oa=null,Sd=!1,ts=0,lm=0,as=1/0,ns=null,Bn=null,Ct=0,Hn=null,zi=null,fn=0,wd=0,kd=null,sm=null,Oo=0,Nd=null;function ba(){return(Ge&2)!==0&&Ue!==0?Ue&-Ue:ae.T!==null?Od():Sp()}function cm(){if($a===0)if((Ue&536870912)===0||Ve){var t=dl;dl<<=1,(dl&3932160)===0&&(dl=262144),$a=t}else $a=536870912;return t=ha.current,t!==null&&(t.flags|=32),$a}function la(t,a,r){(t===at&&(Fe===2||Fe===9)||t.cancelPendingCommit!==null)&&(Ei(t,0),qn(t,Ue,$a,!1)),Wi(t,r),((Ge&2)===0||t!==at)&&(t===at&&((Ge&2)===0&&(Hr|=r),gt===4&&qn(t,Ue,$a,!1)),Pa(t))}function um(t,a,r){if((Ge&6)!==0)throw Error(l(327));var s=!r&&(a&127)===0&&(a&t.expiredLanes)===0||Qi(t,a),f=s?cb(t,a):Ed(t,a,!0),m=s;do{if(f===0){ki&&!s&&qn(t,a,0,!1);break}else{if(r=t.current.alternate,m&&!lb(r)){f=Ed(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=Mo;var U=M.current.memoizedState.isDehydrated;if(U&&(Ei(M,b).flags|=256),b=Ed(M,b,!1),b!==2){if(_d&&!U){M.errorRecoveryDisabledLanes|=m,Hr|=m,f=4;break e}m=oa,oa=f,m!==null&&(oa===null?oa=m:oa.push.apply(oa,m))}f=b}if(m=!1,f!==2)continue}}if(f===1){Ei(t,0),qn(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:qn(s,a,$a,!Ln);break e;case 2:oa=null;break;case 3:case 5:break;default:throw Error(l(329))}if((a&62914560)===a&&(f=ts+300-At(),10<f)){if(qn(s,a,$a,!Ln),pl(s,0,!0)!==0)break e;fn=a,s.timeoutHandle=Bm(dm.bind(null,s,r,oa,ns,Sd,a,$a,Hr,Ni,Ln,m,"Throttled",-0,0),f);break e}dm(s,r,oa,ns,Sd,a,$a,Hr,Ni,Ln,m,null,-0,0)}}break}while(!0);Pa(t)}function dm(t,a,r,s,f,m,b,M,U,J,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:Xa},nm(a,m,ce);var ye=(m&62914560)===m?ts-At():(m&4194048)===m?lm-At():0;if(ye=Zb(ce,ye),ye!==null){fn=m,t.cancelPendingCommit=ye($m.bind(null,t,a,m,r,s,f,b,M,U,oe,ce,null,ee,ne)),qn(t,m,b,!J);return}}$m(t,a,m,r,s,f,b,M,U)}function lb(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(!ga(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 qn(t,a,r,s){a&=~jd,a&=~Hr,t.suspendedLanes|=a,t.pingedLanes&=~a,s&&(t.warmLanes|=a),s=t.expirationTimes;for(var f=a;0<f;){var m=31-pa(f),b=1<<m;s[m]=-1,f&=~b}r!==0&&xp(t,r,a)}function rs(){return(Ge&6)===0?(Ro(0),!1):!0}function zd(){if(De!==null){if(Fe===0)var t=De.return;else t=De,en=Or=null,Pu(t),$i=null,ho=0,t=De;for(;t!==null;)Hg(t.alternate,t),t=t.return;De=null}}function Ei(t,a){var r=t.timeoutHandle;r!==-1&&(t.timeoutHandle=-1,Nb(r)),r=t.cancelPendingCommit,r!==null&&(t.cancelPendingCommit=null,r()),fn=0,zd(),at=t,De=r=Qa(t.current,null),Ue=a,Fe=0,va=null,Ln=!1,ki=Qi(t,a),_d=!1,Ni=$a=jd=Hr=Vn=gt=0,oa=Mo=null,Sd=!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-pa(s),m=1<<f;a|=t[f],s&=~m}return dn=a,wl(),r}function fm(t,a){Ee=null,ae.H=So,a===vi||a===Ol?(a=z0(),Fe=3):a===Mu?(a=z0(),Fe=4):Fe=a===od?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,va=a,De===null&&(gt=1,Fl(t,Na(a,t.current)))}function pm(){var t=ha.current;return t===null?!0:(Ue&4194048)===Ue?Ta===null:(Ue&62914560)===Ue||(Ue&536870912)!==0?t===Ta:!1}function gm(){var t=ae.H;return ae.H=So,t===null?So:t}function mm(){var t=ae.A;return ae.A=ib,t}function is(){gt=4,Ln||(Ue&4194048)!==Ue&&ha.current!==null||(ki=!0),(Vn&134217727)===0&&(Hr&134217727)===0||at===null||qn(at,Ue,$a,!1)}function Ed(t,a,r){var s=Ge;Ge|=2;var f=gm(),m=mm();(at!==t||Ue!==a)&&(ns=null,Ei(t,a)),a=!1;var b=gt;e:do try{if(Fe!==0&&De!==null){var M=De,U=va;switch(Fe){case 8:zd(),b=6;break e;case 3:case 2:case 9:case 6:ha.current===null&&(a=!0);var J=Fe;if(Fe=0,va=null,Ci(t,M,U,J),r&&ki){b=0;break e}break;default:J=Fe,Fe=0,va=null,Ci(t,M,U,J)}}sb(),b=gt;break}catch(oe){fm(t,oe)}while(!0);return a&&t.shellSuspendCounter++,en=Or=null,Ge=s,ae.H=f,ae.A=m,De===null&&(at=null,Ue=0,wl()),b}function sb(){for(;De!==null;)hm(De)}function cb(t,a){var r=Ge;Ge|=2;var s=gm(),f=mm();at!==t||Ue!==a?(ns=null,as=At()+500,Ei(t,a)):ki=Qi(t,a);e:do try{if(Fe!==0&&De!==null){a=De;var m=va;t:switch(Fe){case 1:Fe=0,va=null,Ci(t,a,m,1);break;case 2:case 9:if(k0(m)){Fe=0,va=null,ym(a);break}a=function(){Fe!==2&&Fe!==9||at!==t||(Fe=7),Pa(t)},m.then(a,a);break e;case 3:Fe=7;break e;case 4:Fe=5;break e;case 7:k0(m)?(Fe=0,va=null,ym(a)):(Fe=0,va=null,Ci(t,a,m,7));break;case 5:var b=null;switch(De.tag){case 26:b=De.memoizedState;case 5:case 27:var M=De;if(b?ah(b):M.stateNode.complete){Fe=0,va=null;var U=M.sibling;if(U!==null)De=U;else{var J=M.return;J!==null?(De=J,os(J)):De=null}break t}}Fe=0,va=null,Ci(t,a,m,5);break;case 6:Fe=0,va=null,Ci(t,a,m,6);break;case 8:zd(),gt=6;break e;default:throw Error(l(462))}}ub();break}catch(oe){fm(t,oe)}while(!0);return en=Or=null,ae.H=s,ae.A=f,Ge=r,De!==null?0:(at=null,Ue=0,wl(),gt)}function ub(){for(;De!==null&&!Sn();)hm(De)}function hm(t){var a=Vg(t.alternate,t,dn);t.memoizedProps=t.pendingProps,a===null?os(t):De=a}function ym(t){var a=t,r=a.alternate;switch(a.tag){case 15:case 0:a=Rg(r,a,a.pendingProps,a.type,void 0,Ue);break;case 11:a=Rg(r,a,a.pendingProps,a.type.render,a.ref,Ue);break;case 5:Pu(a);default:Hg(r,a),a=De=m0(a,dn),a=Vg(r,a,dn)}t.memoizedProps=t.pendingProps,a===null?os(t):De=a}function Ci(t,a,r,s){en=Or=null,Pu(a),$i=null,ho=0;var f=a.return;try{if(Q2(t,f,a,r,Ue)){gt=1,Fl(t,Na(r,t.current)),De=null;return}}catch(m){if(f!==null)throw De=f,m;gt=1,Fl(t,Na(r,t.current)),De=null;return}a.flags&32768?(Ve||s===1?t=!0:ki||(Ue&536870912)!==0?t=!1:(Ln=t=!0,(s===2||s===9||s===3||s===6)&&(s=ha.current,s!==null&&s.tag===13&&(s.flags|=16384))),vm(a,t)):os(a)}function os(t){var a=t;do{if((a.flags&32768)!==0){vm(a,Ln);return}t=a.return;var r=tb(a.alternate,a,dn);if(r!==null){De=r;return}if(a=a.sibling,a!==null){De=a;return}De=a=t}while(a!==null);gt===0&&(gt=5)}function vm(t,a){do{var r=ab(t.alternate,t);if(r!==null){r.flags&=32767,De=r;return}if(r=t.return,r!==null&&(r.flags|=32768,r.subtreeFlags=0,r.deletions=null),!a&&(t=t.sibling,t!==null)){De=t;return}De=t=r}while(t!==null);gt=6,De=null}function $m(t,a,r,s,f,m,b,M,U){t.cancelPendingCommit=null;do ls();while(Ct!==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|=yu,q$(t,r,m,b,M,U),t===at&&(De=at=null,Ue=0),zi=a,Hn=t,fn=r,wd=m,kd=f,sm=s,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,gb(Sr,function(){return Sm(),null})):(t.callbackNode=null,t.callbackPriority=0),s=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||s){s=ae.T,ae.T=null,f=de.p,de.p=2,b=Ge,Ge|=4;try{nb(t,a,r)}finally{Ge=b,de.p=f,ae.T=s}}Ct=1,bm(),xm(),_m()}}function bm(){if(Ct===1){Ct=0;var t=Hn,a=zi,r=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||r){r=ae.T,ae.T=null;var s=de.p;de.p=2;var f=Ge;Ge|=4;try{em(a,t);var m=Bd,b=o0(t.containerInfo),M=m.focusedElem,U=m.selectionRange;if(b!==M&&M&&M.ownerDocument&&i0(M.ownerDocument.documentElement,M)){if(U!==null&&fu(M)){var J=U.start,oe=U.end;if(oe===void 0&&(oe=J),"selectionStart"in M)M.selectionStart=J,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(U.start,ye),We=U.end===void 0?we:Math.min(U.end,ye);!ne.extend&&we>We&&(b=We,We=we,we=b);var q=r0(M,we),B=r0(M,We);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>We?(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=!!Vd,Bd=Vd=null}finally{Ge=f,de.p=s,ae.T=r}}t.current=a,Ct=2}}function xm(){if(Ct===2){Ct=0;var t=Hn,a=zi,r=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||r){r=ae.T,ae.T=null;var s=de.p;de.p=2;var f=Ge;Ge|=4;try{Kg(t,a.alternate,a)}finally{Ge=f,de.p=s,ae.T=r}}Ct=3}}function _m(){if(Ct===4||Ct===3){Ct=0,ea();var t=Hn,a=zi,r=fn,s=sm;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?Ct=5:(Ct=0,zi=Hn=null,jm(t,t.pendingLanes));var f=t.pendingLanes;if(f===0&&(Bn=null),Fc(r),a=a.stateNode,fa&&typeof fa.onCommitFiberRoot=="function")try{fa.onCommitFiberRoot(Ji,a,void 0,(a.current.flags&128)===128)}catch{}if(s!==null){a=ae.T,f=de.p,de.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,de.p=f}}(fn&3)!==0&&ls(),Pa(t),f=t.pendingLanes,(r&261930)!==0&&(f&42)!==0?t===Nd?Oo++:(Oo=0,Nd=t):Oo=0,Ro(0)}}function jm(t,a){(t.pooledCacheLanes&=a)===0&&(a=t.pooledCache,a!=null&&(t.pooledCache=null,go(a)))}function ls(){return bm(),xm(),_m(),Sm()}function Sm(){if(Ct!==5)return!1;var t=Hn,a=wd;wd=0;var r=Fc(fn),s=ae.T,f=de.p;try{de.p=32>r?32:r,ae.T=null,r=kd,kd=null;var m=Hn,b=fn;if(Ct=0,zi=Hn=null,fn=0,(Ge&6)!==0)throw Error(l(331));var M=Ge;if(Ge|=4,im(m.current),am(m,m.current,b,r),Ge=M,Ro(0,!1),fa&&typeof fa.onPostCommitFiberRoot=="function")try{fa.onPostCommitFiberRoot(Ji,m)}catch{}return!0}finally{de.p=f,ae.T=s,jm(t,a)}}function wm(t,a,r){a=Na(r,a),a=id(t.stateNode,a,2),t=An(t,a,2),t!==null&&(Wi(t,2),Pa(t))}function Ye(t,a,r){if(t.tag===3)wm(t,t,r);else for(;a!==null;){if(a.tag===3){wm(a,t,r);break}else if(a.tag===1){var s=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Bn===null||!Bn.has(s))){t=Na(r,t),r=kg(2),s=An(a,r,2),s!==null&&(Ng(r,s,a,t),Wi(s,2),Pa(s));break}}a=a.return}}function Cd(t,a,r){var s=t.pingCache;if(s===null){s=t.pingCache=new ob;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=db.bind(null,t,a,r),a.then(t,t))}function db(t,a,r){var s=t.pingCache;s!==null&&s.delete(a),t.pingedLanes|=t.suspendedLanes&r,t.warmLanes&=~r,at===t&&(Ue&r)===r&&(gt===4||gt===3&&(Ue&62914560)===Ue&&300>At()-ts?(Ge&2)===0&&Ei(t,0):jd|=r,Ni===Ue&&(Ni=0)),Pa(t)}function km(t,a){a===0&&(a=bp()),t=Cr(t,a),t!==null&&(Wi(t,a),Pa(t))}function fb(t){var a=t.memoizedState,r=0;a!==null&&(r=a.retryLane),km(t,r)}function pb(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),km(t,r)}function gb(t,a){return Mt(t,a)}var ss=null,Ti=null,Td=!1,cs=!1,Md=!1,Pn=0;function Pa(t){t!==Ti&&t.next===null&&(Ti===null?ss=Ti=t:Ti=Ti.next=t),cs=!0,Td||(Td=!0,hb())}function Ro(t,a){if(!Md&&cs){Md=!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-pa(42|t)+1)-1,m&=f&~(b&~M),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(r=!0,Cm(s,m))}else m=Ue,m=pl(s,s===at?m:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(m&3)===0||Qi(s,m)||(r=!0,Cm(s,m));s=s.next}while(r);Md=!1}}function mb(){Nm()}function Nm(){cs=Td=!1;var t=0;Pn!==0&&kb()&&(t=Pn);for(var a=At(),r=null,s=ss;s!==null;){var f=s.next,m=zm(s,a);m===0?(s.next=null,r===null?ss=f:r.next=f,f===null&&(Ti=r)):(r=s,(t!==0||(m&3)!==0)&&(cs=!0)),s=f}Ct!==0&&Ct!==5||Ro(t),Pn!==0&&(Pn=0)}function zm(t,a){for(var r=t.suspendedLanes,s=t.pingedLanes,f=t.expirationTimes,m=t.pendingLanes&-62914561;0<m;){var b=31-pa(m),M=1<<b,U=f[b];U===-1?((M&r)===0||(M&s)!==0)&&(f[b]=H$(M,a)):U<=a&&(t.expiredLanes|=M),m&=~M}if(a=at,r=Ue,r=pl(t,t===a?r:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),s=t.callbackNode,r===0||t===a&&(Fe===2||Fe===9)||t.cancelPendingCommit!==null)return s!==null&&s!==null&&ht(s),t.callbackNode=null,t.callbackPriority=0;if((r&3)===0||Qi(t,r)){if(a=r&-r,a===t.callbackPriority)return a;switch(s!==null&&ht(s),Fc(r)){case 2:case 8:r=Jr;break;case 32:r=Sr;break;case 268435456:r=cl;break;default:r=Sr}return s=Em.bind(null,t),r=Mt(r,s),t.callbackPriority=a,t.callbackNode=r,a}return s!==null&&s!==null&&ht(s),t.callbackPriority=2,t.callbackNode=null,2}function Em(t,a){if(Ct!==0&&Ct!==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===at?s:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),s===0?null:(um(t,s,a),zm(t,At()),t.callbackNode!=null&&t.callbackNode===r?Em.bind(null,t):null)}function Cm(t,a){if(ls())return null;um(t,a,!0)}function hb(){zb(function(){(Ge&6)!==0?Mt(wn,mb):Nm()})}function Od(){if(Pn===0){var t=hi;t===0&&(t=ul,ul<<=1,(ul&261888)===0&&(ul=256)),Pn=t}return Pn}function Tm(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:yl(""+t)}function Mm(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 yb(t,a,r,s,f){if(a==="submit"&&r&&r.stateNode===f){var m=Tm((f[ta]||null).action),b=s.submitter;b&&(a=(a=b[ta]||null)?Tm(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(Pn!==0){var U=b?Mm(f,b):new FormData(f);Wu(r,{pending:!0,data:U,method:f.method,action:m},null,U)}}else typeof m=="function"&&(M.preventDefault(),U=b?Mm(f,b):new FormData(f),Wu(r,{pending:!0,data:U,method:f.method,action:m},m,U))},currentTarget:f}]})}}for(var Rd=0;Rd<hu.length;Rd++){var Ad=hu[Rd],vb=Ad.toLowerCase(),$b=Ad[0].toUpperCase()+Ad.slice(1);Da(vb,"on"+$b)}Da(c0,"onAnimationEnd"),Da(u0,"onAnimationIteration"),Da(d0,"onAnimationStart"),Da("dblclick","onDoubleClick"),Da("focusin","onFocus"),Da("focusout","onBlur"),Da(A2,"onTransitionRun"),Da(D2,"onTransitionStart"),Da(I2,"onTransitionCancel"),Da(f0,"onTransitionEnd"),ai("onMouseEnter",["mouseout","mouseover"]),ai("onMouseLeave",["mouseout","mouseover"]),ai("onPointerEnter",["pointerout","pointerover"]),ai("onPointerLeave",["pointerout","pointerover"]),kr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),kr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),kr("onBeforeInput",["compositionend","keypress","textInput","paste"]),kr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),kr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),kr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ao="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(" "),bb=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ao));function Om(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],U=M.instance,J=M.currentTarget;if(M=M.listener,U!==m&&f.isPropagationStopped())break e;m=M,f.currentTarget=J;try{m(f)}catch(oe){Sl(oe)}f.currentTarget=null,m=U}else for(b=0;b<s.length;b++){if(M=s[b],U=M.instance,J=M.currentTarget,M=M.listener,U!==m&&f.isPropagationStopped())break e;m=M,f.currentTarget=J;try{m(f)}catch(oe){Sl(oe)}f.currentTarget=null,m=U}}}}function Ie(t,a){var r=a[Yc];r===void 0&&(r=a[Yc]=new Set);var s=t+"__bubble";r.has(s)||(Rm(a,t,2,!1),r.add(s))}function Dd(t,a,r){var s=0;a&&(s|=4),Rm(r,t,s,a)}var us="_reactListening"+Math.random().toString(36).slice(2);function Id(t){if(!t[us]){t[us]=!0,Np.forEach(function(r){r!=="selectionchange"&&(bb.has(r)||Dd(r,!1,t),Dd(r,!0,t))});var a=t.nodeType===9?t:t.ownerDocument;a===null||a[us]||(a[us]=!0,Dd("selectionchange",!1,a))}}function Rm(t,a,r,s){switch(ch(a)){case 2:var f=Yb;break;case 8:f=Kb;break;default:f=Qd}r=f.bind(null,a,r,t),f=void 0,!nu||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 Ud(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 U=b.tag;if((U===3||U===4)&&b.stateNode.containerInfo===f)return;b=b.return}for(;M!==null;){if(b=Wr(M),b===null)return;if(U=b.tag,U===5||U===6||U===26||U===27){s=m=b;continue e}M=M.parentNode}}s=s.return}Lp(function(){var J=m,oe=tu(r),ce=[];e:{var ee=p0.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=p2;break;case"focusin":ye="focus",ne=lu;break;case"focusout":ye="blur",ne=lu;break;case"beforeblur":case"afterblur":ne=lu;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=Hp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ne=t2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ne=h2;break;case c0:case u0:case d0:ne=r2;break;case f0:ne=v2;break;case"scroll":case"scrollend":ne=W$;break;case"wheel":ne=b2;break;case"copy":case"cut":case"paste":ne=o2;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ne=Pp;break;case"toggle":case"beforetoggle":ne=_2}var we=(a&4)!==0,We=!we&&(t==="scroll"||t==="scrollend"),q=we?ee!==null?ee+"Capture":null:ee;we=[];for(var B=J,K;B!==null;){var se=B;if(K=se.stateNode,se=se.tag,se!==5&&se!==26&&se!==27||K===null||q===null||(se=ao(B,q),se!=null&&we.push(Do(B,se,K))),We)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!==eu&&(ye=r.relatedTarget||r.fromElement)&&(Wr(ye)||ye[Qr]))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=J,ye=ye?Wr(ye):null,ye!==null&&(We=u(ye),we=ye.tag,ye!==We||we!==5&&we!==27&&we!==6)&&(ye=null)):(ne=null,ye=J),ne!==ye)){if(we=Hp,se="onMouseLeave",q="onMouseEnter",B="mouse",(t==="pointerout"||t==="pointerover")&&(we=Pp,se="onPointerLeave",q="onPointerEnter",B="pointer"),We=ne==null?ee:to(ne),K=ye==null?ee:to(ye),ee=new we(se,B+"leave",ne,r,oe),ee.target=We,ee.relatedTarget=K,se=null,Wr(oe)===J&&(we=new we(q,B+"enter",ye,r,oe),we.target=K,we.relatedTarget=We,se=we),We=se,ne&&ye)t:{for(we=xb,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&&Am(ce,ee,ne,we,!1),ye!==null&&We!==null&&Am(ce,We,ye,we,!0)}}e:{if(ee=J?to(J):window,ne=ee.nodeName&&ee.nodeName.toLowerCase(),ne==="select"||ne==="input"&&ee.type==="file")var Pe=Qp;else if(Xp(ee))if(Wp)Pe=M2;else{Pe=C2;var $e=E2}else ne=ee.nodeName,!ne||ne.toLowerCase()!=="input"||ee.type!=="checkbox"&&ee.type!=="radio"?J&&Wc(J.elementType)&&(Pe=Qp):Pe=T2;if(Pe&&(Pe=Pe(t,J))){Jp(ce,Pe,r,oe);break e}$e&&$e(t,ee,J),t==="focusout"&&J&&ee.type==="number"&&J.memoizedProps.value!=null&&Qc(ee,"number",ee.value)}switch($e=J?to(J):window,t){case"focusin":(Xp($e)||$e.contentEditable==="true")&&(si=$e,pu=J,uo=null);break;case"focusout":uo=pu=si=null;break;case"mousedown":gu=!0;break;case"contextmenu":case"mouseup":case"dragend":gu=!1,l0(ce,r,oe);break;case"selectionchange":if(R2)break;case"keydown":case"keyup":l0(ce,r,oe)}var Ce;if(cu)e:{switch(t){case"compositionstart":var Le="onCompositionStart";break e;case"compositionend":Le="onCompositionEnd";break e;case"compositionupdate":Le="onCompositionUpdate";break e}Le=void 0}else li?Yp(t,r)&&(Le="onCompositionEnd"):t==="keydown"&&r.keyCode===229&&(Le="onCompositionStart");Le&&(Zp&&r.locale!=="ko"&&(li||Le!=="onCompositionStart"?Le==="onCompositionEnd"&&li&&(Ce=Vp()):(zn=oe,ru="value"in zn?zn.value:zn.textContent,li=!0)),$e=ds(J,Le),0<$e.length&&(Le=new qp(Le,t,null,r,oe),ce.push({event:Le,listeners:$e}),Ce?Le.data=Ce:(Ce=Kp(r),Ce!==null&&(Le.data=Ce)))),(Ce=S2?w2(t,r):k2(t,r))&&(Le=ds(J,"onBeforeInput"),0<Le.length&&($e=new qp("onBeforeInput","beforeinput",null,r,oe),ce.push({event:$e,listeners:Le}),$e.data=Ce)),yb(ce,t,J,r,oe)}Om(ce,a)})}function Do(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=ao(t,r),f!=null&&s.unshift(Do(t,f,m)),f=ao(t,a),f!=null&&s.push(Do(t,f,m))),t.tag===3)return s;t=t.return}return[]}function xb(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function Am(t,a,r,s,f){for(var m=a._reactName,b=[];r!==null&&r!==s;){var M=r,U=M.alternate,J=M.stateNode;if(M=M.tag,U!==null&&U===s)break;M!==5&&M!==26&&M!==27||J===null||(U=J,f?(J=ao(r,m),J!=null&&b.unshift(Do(r,J,U))):f||(J=ao(r,m),J!=null&&b.push(Do(r,J,U)))),r=r.return}b.length!==0&&t.push({event:a,listeners:b})}var _b=/\r\n?/g,jb=/\u0000|\uFFFD/g;function Dm(t){return(typeof t=="string"?t:""+t).replace(_b,`
|
|
49
|
+
`).replace(jb,"")}function Im(t,a){return a=Dm(a),Dm(t)===a}function Qe(t,a,r,s,f,m){switch(r){case"children":typeof s=="string"?a==="body"||a==="textarea"&&s===""||ri(t,s):(typeof s=="number"||typeof s=="bigint")&&a!=="body"&&ri(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":Ip(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"&&Qe(t,a,"name",f.name,f,null),Qe(t,a,"formEncType",f.formEncType,f,null),Qe(t,a,"formMethod",f.formMethod,f,null),Qe(t,a,"formTarget",f.formTarget,f,null)):(Qe(t,a,"encType",f.encType,f,null),Qe(t,a,"method",f.method,f,null),Qe(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=Xa);break;case"onScroll":s!=null&&Ie("scroll",t);break;case"onScrollEnd":s!=null&&Ie("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":Ie("beforetoggle",t),Ie("toggle",t),gl(t,"popover",s);break;case"xlinkActuate":Ka(t,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":Ka(t,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":Ka(t,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":Ka(t,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":Ka(t,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":Ka(t,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":Ka(t,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":Ka(t,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":Ka(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=J$.get(r)||r,gl(t,r,s))}}function Ld(t,a,r,s,f,m){switch(r){case"style":Ip(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"?ri(t,s):(typeof s=="number"||typeof s=="bigint")&&ri(t,""+s);break;case"onScroll":s!=null&&Ie("scroll",t);break;case"onScrollEnd":s!=null&&Ie("scrollend",t);break;case"onClick":s!=null&&(t.onclick=Xa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!zp.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[ta]||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 Vt(t,a,r){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ie("error",t),Ie("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:Qe(t,a,m,b,r,null)}}f&&Qe(t,a,"srcSet",r.srcSet,r,null),s&&Qe(t,a,"src",r.src,r,null);return;case"input":Ie("invalid",t);var M=m=b=f=null,U=null,J=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":U=oe;break;case"defaultChecked":J=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:Qe(t,a,s,oe,r,null)}}Op(t,m,M,U,J,b,f,!1);return;case"select":Ie("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:Qe(t,a,f,M,r,null)}a=m,r=b,t.multiple=!!s,a!=null?ni(t,!!s,a,!1):r!=null&&ni(t,!!s,r,!0);return;case"textarea":Ie("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:Qe(t,a,b,M,r,null)}Ap(t,s,f,m);return;case"option":for(U in r)if(r.hasOwnProperty(U)&&(s=r[U],s!=null))switch(U){case"selected":t.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:Qe(t,a,U,s,r,null)}return;case"dialog":Ie("beforetoggle",t),Ie("toggle",t),Ie("cancel",t),Ie("close",t);break;case"iframe":case"object":Ie("load",t);break;case"video":case"audio":for(s=0;s<Ao.length;s++)Ie(Ao[s],t);break;case"image":Ie("error",t),Ie("load",t);break;case"details":Ie("toggle",t);break;case"embed":case"source":case"link":Ie("error",t),Ie("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(J in r)if(r.hasOwnProperty(J)&&(s=r[J],s!=null))switch(J){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,a));default:Qe(t,a,J,s,r,null)}return;default:if(Wc(a)){for(oe in r)r.hasOwnProperty(oe)&&(s=r[oe],s!==void 0&&Ld(t,a,oe,s,r,void 0));return}}for(M in r)r.hasOwnProperty(M)&&(s=r[M],s!=null&&Qe(t,a,M,s,r,null))}function Sb(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,U=null,J=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":U=ce;default:s.hasOwnProperty(ne)||Qe(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":J=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&&Qe(t,a,ee,ne,s,ce)}}Jc(t,b,M,U,J,oe,m,f);return;case"select":ne=b=M=ee=null;for(m in r)if(U=r[m],r.hasOwnProperty(m)&&U!=null)switch(m){case"value":break;case"multiple":ne=U;default:s.hasOwnProperty(m)||Qe(t,a,m,null,s,U)}for(f in s)if(m=s[f],U=r[f],s.hasOwnProperty(f)&&(m!=null||U!=null))switch(f){case"value":ee=m;break;case"defaultValue":M=m;break;case"multiple":b=m;default:m!==U&&Qe(t,a,f,m,s,U)}a=M,r=b,s=ne,ee!=null?ni(t,!!r,ee,!1):!!s!=!!r&&(a!=null?ni(t,!!r,a,!0):ni(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:Qe(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&&Qe(t,a,b,f,s,m)}Rp(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:Qe(t,a,ye,null,s,ee)}for(U in s)if(ee=s[U],ne=r[U],s.hasOwnProperty(U)&&ee!==ne&&(ee!=null||ne!=null))switch(U){case"selected":t.selected=ee&&typeof ee!="function"&&typeof ee!="symbol";break;default:Qe(t,a,U,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)&&Qe(t,a,we,null,s,ee);for(J in s)if(ee=s[J],ne=r[J],s.hasOwnProperty(J)&&ee!==ne&&(ee!=null||ne!=null))switch(J){case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(l(137,a));break;default:Qe(t,a,J,ee,s,ne)}return;default:if(Wc(a)){for(var We in r)ee=r[We],r.hasOwnProperty(We)&&ee!==void 0&&!s.hasOwnProperty(We)&&Ld(t,a,We,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||Ld(t,a,oe,ee,s,ne);return}}for(var q in r)ee=r[q],r.hasOwnProperty(q)&&ee!=null&&!s.hasOwnProperty(q)&&Qe(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||Qe(t,a,ce,ee,s,ne)}function Um(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function wb(){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&&Um(b)){for(b=0,M=f.responseEnd,s+=1;s<r.length;s++){var U=r[s],J=U.startTime;if(J>M)break;var oe=U.transferSize,ce=U.initiatorType;oe&&Um(ce)&&(U=U.responseEnd,b+=oe*(U<M?1:(M-J)/(U-J)))}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 Vd=null,Bd=null;function fs(t){return t.nodeType===9?t:t.ownerDocument}function Lm(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 Vm(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 Hd(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 qd=null;function kb(){var t=window.event;return t&&t.type==="popstate"?t===qd?!1:(qd=t,!0):(qd=null,!1)}var Bm=typeof setTimeout=="function"?setTimeout:void 0,Nb=typeof clearTimeout=="function"?clearTimeout:void 0,Hm=typeof Promise=="function"?Promise:void 0,zb=typeof queueMicrotask=="function"?queueMicrotask:typeof Hm<"u"?function(t){return Hm.resolve(null).then(t).catch(Eb)}:Bm;function Eb(t){setTimeout(function(){throw t})}function Zn(t){return t==="head"}function qm(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),Ai(a);return}s--}else if(r==="$"||r==="$?"||r==="$~"||r==="$!"||r==="&")s++;else if(r==="html")Io(t.ownerDocument.documentElement);else if(r==="head"){r=t.ownerDocument.head,Io(r);for(var m=r.firstChild;m;){var b=m.nextSibling,M=m.nodeName;m[eo]||M==="SCRIPT"||M==="STYLE"||M==="LINK"&&m.rel.toLowerCase()==="stylesheet"||r.removeChild(m),m=b}}else r==="body"&&Io(t.ownerDocument.body);r=f}while(r);Ai(a)}function Pm(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 Pd(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":Pd(r),Kc(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}t.removeChild(r)}}function Cb(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[eo])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=Ma(t.nextSibling),t===null)break}return null}function Tb(t,a,r){if(a==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!r||(t=Ma(t.nextSibling),t===null))return null;return t}function Zm(t,a){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a||(t=Ma(t.nextSibling),t===null))return null;return t}function Zd(t){return t.data==="$?"||t.data==="$~"}function Gd(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function Mb(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 Ma(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 Fd=null;function Gm(t){t=t.nextSibling;for(var a=0;t;){if(t.nodeType===8){var r=t.data;if(r==="/$"||r==="/&"){if(a===0)return Ma(t.nextSibling);a--}else r!=="$"&&r!=="$!"&&r!=="$?"&&r!=="$~"&&r!=="&"||a++}t=t.nextSibling}return null}function Fm(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 Ym(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 Io(t){for(var a=t.attributes;a.length;)t.removeAttributeNode(a[0]);Kc(t)}var Oa=new Map,Km=new Set;function ps(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var pn=de.d;de.d={f:Ob,r:Rb,D:Ab,C:Db,L:Ib,m:Ub,X:Vb,S:Lb,M:Bb};function Ob(){var t=pn.f(),a=rs();return t||a}function Rb(t){var a=ei(t);a!==null&&a.tag===5&&a.type==="form"?fg(a):pn.r(t)}var Mi=typeof document>"u"?null:document;function Xm(t,a,r){var s=Mi;if(s&&typeof a=="string"&&a){var f=wa(a);f='link[rel="'+t+'"][href="'+f+'"]',typeof r=="string"&&(f+='[crossorigin="'+r+'"]'),Km.has(f)||(Km.add(f),t={rel:t,crossOrigin:r,href:a},s.querySelector(f)===null&&(a=s.createElement("link"),Vt(a,"link",t),Ot(a),s.head.appendChild(a)))}}function Ab(t){pn.D(t),Xm("dns-prefetch",t,null)}function Db(t,a){pn.C(t,a),Xm("preconnect",t,a)}function Ib(t,a,r){pn.L(t,a,r);var s=Mi;if(s&&t&&a){var f='link[rel="preload"][as="'+wa(a)+'"]';a==="image"&&r&&r.imageSrcSet?(f+='[imagesrcset="'+wa(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(f+='[imagesizes="'+wa(r.imageSizes)+'"]')):f+='[href="'+wa(t)+'"]';var m=f;switch(a){case"style":m=Oi(t);break;case"script":m=Ri(t)}Oa.has(m)||(t=v({rel:"preload",href:a==="image"&&r&&r.imageSrcSet?void 0:t,as:a},r),Oa.set(m,t),s.querySelector(f)!==null||a==="style"&&s.querySelector(Uo(m))||a==="script"&&s.querySelector(Lo(m))||(a=s.createElement("link"),Vt(a,"link",t),Ot(a),s.head.appendChild(a)))}}function Ub(t,a){pn.m(t,a);var r=Mi;if(r&&t){var s=a&&typeof a.as=="string"?a.as:"script",f='link[rel="modulepreload"][as="'+wa(s)+'"][href="'+wa(t)+'"]',m=f;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=Ri(t)}if(!Oa.has(m)&&(t=v({rel:"modulepreload",href:t},a),Oa.set(m,t),r.querySelector(f)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(Lo(m)))return}s=r.createElement("link"),Vt(s,"link",t),Ot(s),r.head.appendChild(s)}}}function Lb(t,a,r){pn.S(t,a,r);var s=Mi;if(s&&t){var f=ti(s).hoistableStyles,m=Oi(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=Oa.get(m))&&Yd(t,r);var U=b=s.createElement("link");Ot(U),Vt(U,"link",t),U._p=new Promise(function(J,oe){U.onload=J,U.onerror=oe}),U.addEventListener("load",function(){M.loading|=1}),U.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 Vb(t,a){pn.X(t,a);var r=Mi;if(r&&t){var s=ti(r).hoistableScripts,f=Ri(t),m=s.get(f);m||(m=r.querySelector(Lo(f)),m||(t=v({src:t,async:!0},a),(a=Oa.get(f))&&Kd(t,a),m=r.createElement("script"),Ot(m),Vt(m,"link",t),r.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},s.set(f,m))}}function Bb(t,a){pn.M(t,a);var r=Mi;if(r&&t){var s=ti(r).hoistableScripts,f=Ri(t),m=s.get(f);m||(m=r.querySelector(Lo(f)),m||(t=v({src:t,async:!0,type:"module"},a),(a=Oa.get(f))&&Kd(t,a),m=r.createElement("script"),Ot(m),Vt(m,"link",t),r.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},s.set(f,m))}}function Jm(t,a,r,s){var f=(f=X.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=Oi(r.href),r=ti(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=Oi(r.href);var m=ti(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),Oa.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},Oa.set(t,r),m||Hb(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=Ri(r),r=ti(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 Oi(t){return'href="'+wa(t)+'"'}function Uo(t){return'link[rel="stylesheet"]['+t+"]"}function Qm(t){return v({},t,{"data-precedence":t.precedence,precedence:null})}function Hb(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}),Vt(a,"link",r),Ot(a),t.head.appendChild(a))}function Ri(t){return'[src="'+wa(t)+'"]'}function Lo(t){return"script[async]"+t}function Wm(t,a,r){if(a.count++,a.instance===null)switch(a.type){case"style":var s=t.querySelector('style[data-href~="'+wa(r.href)+'"]');if(s)return a.instance=s,Ot(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"),Ot(s),Vt(s,"style",f),gs(s,r.precedence,t),a.instance=s;case"stylesheet":f=Oi(r.href);var m=t.querySelector(Uo(f));if(m)return a.state.loading|=4,a.instance=m,Ot(m),m;s=Qm(r),(f=Oa.get(f))&&Yd(s,f),m=(t.ownerDocument||t).createElement("link"),Ot(m);var b=m;return b._p=new Promise(function(M,U){b.onload=M,b.onerror=U}),Vt(m,"link",s),a.state.loading|=4,gs(m,r.precedence,t),a.instance=m;case"script":return m=Ri(r.src),(f=t.querySelector(Lo(m)))?(a.instance=f,Ot(f),f):(s=r,(f=Oa.get(m))&&(s=v({},r),Kd(s,f)),t=t.ownerDocument||t,f=t.createElement("script"),Ot(f),Vt(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 Yd(t,a){t.crossOrigin==null&&(t.crossOrigin=a.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=a.referrerPolicy),t.title==null&&(t.title=a.title)}function Kd(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 eh(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[eo]||m[Dt]||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 th(t,a,r){t=t.ownerDocument||t,t.head.insertBefore(r,a==="title"?t.querySelector("head > title"):null)}function qb(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 ah(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function Pb(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=Oi(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,Ot(m);return}m=a.ownerDocument||a,s=Qm(s),(f=Oa.get(f))&&Yd(s,f),m=m.createElement("link"),Ot(m);var b=m;b._p=new Promise(function(M,U){b.onload=M,b.onerror=U}),Vt(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 Xd=0;function Zb(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&&Xd===0&&(Xd=62500*wb());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>Xd?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(Gb,t),ys=null,hs.call(t))}function Gb(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 Vo={$$typeof:N,Provider:null,Consumer:null,_currentValue:ge,_currentValue2:ge,_threadCount:0};function Fb(t,a,r,s,f,m,b,M,U){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=Zc(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Zc(0),this.hiddenUpdates=Zc(null),this.identifierPrefix=s,this.onUncaughtError=f,this.onCaughtError=m,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=U,this.incompleteTransitions=new Map}function nh(t,a,r,s,f,m,b,M,U,J,oe,ce){return t=new Fb(t,a,r,b,U,J,oe,ce,M),a=1,m===!0&&(a|=24),m=ma(3,null,null,a),t.current=m,m.stateNode=t,a=Eu(),a.refCount++,t.pooledCache=a,a.refCount++,m.memoizedState={element:s,isDehydrated:r,cache:a},Ou(m),t}function rh(t){return t?(t=di,t):di}function ih(t,a,r,s,f,m){f=rh(f),s.context===null?s.context=f:s.pendingContext=f,s=Rn(a),s.payload={element:r},m=m===void 0?null:m,m!==null&&(s.callback=m),r=An(t,s,a),r!==null&&(la(r,t,a),vo(r,t,a))}function oh(t,a){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var r=t.retryLane;t.retryLane=r!==0&&r<a?r:a}}function Jd(t,a){oh(t,a),(t=t.alternate)&&oh(t,a)}function lh(t){if(t.tag===13||t.tag===31){var a=Cr(t,67108864);a!==null&&la(a,t,67108864),Jd(t,67108864)}}function sh(t){if(t.tag===13||t.tag===31){var a=ba();a=Gc(a);var r=Cr(t,a);r!==null&&la(r,t,a),Jd(t,a)}}var $s=!0;function Yb(t,a,r,s){var f=ae.T;ae.T=null;var m=de.p;try{de.p=2,Qd(t,a,r,s)}finally{de.p=m,ae.T=f}}function Kb(t,a,r,s){var f=ae.T;ae.T=null;var m=de.p;try{de.p=8,Qd(t,a,r,s)}finally{de.p=m,ae.T=f}}function Qd(t,a,r,s){if($s){var f=Wd(s);if(f===null)Ud(t,a,s,bs,r),uh(t,s);else if(Jb(f,t,a,r,s))s.stopPropagation();else if(uh(t,s),a&4&&-1<Xb.indexOf(t)){for(;f!==null;){var m=ei(f);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var b=wr(m.pendingLanes);if(b!==0){var M=m;for(M.pendingLanes|=2,M.entangledLanes|=2;b;){var U=1<<31-pa(b);M.entanglements[1]|=U,b&=~U}Pa(m),(Ge&6)===0&&(as=At()+500,Ro(0))}}break;case 31:case 13:M=Cr(m,2),M!==null&&la(M,m,2),rs(),Jd(m,2)}if(m=Wd(s),m===null&&Ud(t,a,s,bs,r),m===f)break;f=m}f!==null&&s.stopPropagation()}else Ud(t,a,s,null,r)}}function Wd(t){return t=tu(t),ef(t)}var bs=null;function ef(t){if(bs=null,t=Wr(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 ch(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(Xi()){case wn:return 2;case Jr:return 8;case Sr:case sl:return 32;case cl:return 268435456;default:return 32}default:return 32}}var tf=!1,Gn=null,Fn=null,Yn=null,Bo=new Map,Ho=new Map,Kn=[],Xb="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 uh(t,a){switch(t){case"focusin":case"focusout":Gn=null;break;case"dragenter":case"dragleave":Fn=null;break;case"mouseover":case"mouseout":Yn=null;break;case"pointerover":case"pointerout":Bo.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ho.delete(a.pointerId)}}function qo(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=ei(a),a!==null&&lh(a)),t):(t.eventSystemFlags|=s,a=t.targetContainers,f!==null&&a.indexOf(f)===-1&&a.push(f),t)}function Jb(t,a,r,s,f){switch(a){case"focusin":return Gn=qo(Gn,t,a,r,s,f),!0;case"dragenter":return Fn=qo(Fn,t,a,r,s,f),!0;case"mouseover":return Yn=qo(Yn,t,a,r,s,f),!0;case"pointerover":var m=f.pointerId;return Bo.set(m,qo(Bo.get(m)||null,t,a,r,s,f)),!0;case"gotpointercapture":return m=f.pointerId,Ho.set(m,qo(Ho.get(m)||null,t,a,r,s,f)),!0}return!1}function dh(t){var a=Wr(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,wp(t.priority,function(){sh(r)});return}}else if(a===31){if(a=p(r),a!==null){t.blockedOn=a,wp(t.priority,function(){sh(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=Wd(t.nativeEvent);if(r===null){r=t.nativeEvent;var s=new r.constructor(r.type,r);eu=s,r.target.dispatchEvent(s),eu=null}else return a=ei(r),a!==null&&lh(a),t.blockedOn=r,!1;a.shift()}return!0}function fh(t,a,r){xs(t)&&r.delete(a)}function Qb(){tf=!1,Gn!==null&&xs(Gn)&&(Gn=null),Fn!==null&&xs(Fn)&&(Fn=null),Yn!==null&&xs(Yn)&&(Yn=null),Bo.forEach(fh),Ho.forEach(fh)}function _s(t,a){t.blockedOn===a&&(t.blockedOn=null,tf||(tf=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Qb)))}var js=null;function ph(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(ef(s||r)===null)continue;break}var m=ei(r);m!==null&&(t.splice(a,3),a-=3,Wu(m,{pending:!0,data:f,method:r.method,action:s},s,f))}}))}function Ai(t){function a(U){return _s(U,t)}Gn!==null&&_s(Gn,t),Fn!==null&&_s(Fn,t),Yn!==null&&_s(Yn,t),Bo.forEach(a),Ho.forEach(a);for(var r=0;r<Kn.length;r++){var s=Kn[r];s.blockedOn===t&&(s.blockedOn=null)}for(;0<Kn.length&&(r=Kn[0],r.blockedOn===null);)dh(r),r.blockedOn===null&&Kn.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[ta]||null;if(typeof m=="function")b||ph(r);else if(b){var M=null;if(m&&m.hasAttribute("formAction")){if(f=m,b=m[ta]||null)M=b.formAction;else if(ef(f)!==null)continue}else M=b.action;typeof M=="function"?r[s+1]=M:(r.splice(s,3),s-=3),ph(r)}}}function gh(){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 af(t){this._internalRoot=t}Ss.prototype.render=af.prototype.render=function(t){var a=this._internalRoot;if(a===null)throw Error(l(409));var r=a.current,s=ba();ih(r,s,t,a,null,null)},Ss.prototype.unmount=af.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var a=t.containerInfo;ih(t.current,2,null,t,null,null),rs(),a[Qr]=null}};function Ss(t){this._internalRoot=t}Ss.prototype.unstable_scheduleHydration=function(t){if(t){var a=Sp();t={blockedOn:null,target:t,priority:a};for(var r=0;r<Kn.length&&a!==0&&a<Kn[r].priority;r++);Kn.splice(r,0,t),r===0&&dh(t)}};var mh=n.version;if(mh!=="19.2.8")throw Error(l(527,mh,"19.2.8"));de.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 Wb={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(Wb),fa=ws}catch{}}return Zo.createRoot=function(t,a){if(!c(t))throw Error(l(299));var r=!1,s="",f=_g,m=jg,b=Sg;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=nh(t,1,!1,null,null,r,s,null,f,m,b,gh),t[Qr]=a.current,Id(t),new af(a)},Zo.hydrateRoot=function(t,a,r){if(!c(t))throw Error(l(299));var s=!1,f="",m=_g,b=jg,M=Sg,U=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&&(U=r.formState)),a=nh(t,1,!0,a,r??null,s,f,U,m,b,M,gh),a.context=rh(null),r=a.current,s=ba(),s=Gc(s),f=Rn(s),f.callback=null,An(r,f,s),r=s,a.current.lanes=r,Wi(a,r),Pa(a),t[Qr]=a.current,Id(t),new Ss(a)},Zo.version="19.2.8",Zo}var wh;function dx(){if(wh)return of.exports;wh=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=ux(),of.exports}var fx=dx();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 Rf="ggui-eui:navigate";function px(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 kh=null,uf=null;function gx(e){return(e!==kh||uf===null)&&(kh=e,uf=px(e)),uf}function Be(e){typeof window>"u"||(window.history.pushState(null,"",e),window.dispatchEvent(new Event(Rf)))}function mx(e){return typeof window>"u"?()=>{}:(window.addEventListener("popstate",e),window.addEventListener(Rf,e),()=>{window.removeEventListener("popstate",e),window.removeEventListener(Rf,e)})}function hx(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 Zv(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 yx=[{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 vx({route:e,children:n}){return i.jsxs("div",{className:"ggui-config-grid","data-ggui-admin-shell":!0,children:[i.jsx($x,{route:e}),i.jsx("div",{className:"ggui-admin-pane",children:n})]})}function $x({route:e}){return i.jsx("nav",{className:"ggui-config-rail","aria-label":"admin sections","data-ggui-admin-rail":!0,children:yx.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:()=>Be(o.path),"aria-current":l?"page":void 0,className:`ggui-config-rail__btn${l?" is-active":""}`,children:o.label})},o.path)})})]},n.label))})}const bx=[{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 xx({route:e,children:n}){return i.jsxs("div",{className:"ggui-config-grid","data-ggui-devtools-shell":!0,children:[i.jsx(_x,{route:e}),i.jsx("div",{className:"ggui-admin-pane",children:n})]})}function _x({route:e}){return i.jsx("nav",{className:"ggui-config-rail","aria-label":"devtools sections","data-ggui-devtools-rail":!0,children:bx.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:()=>Be(o.path),"aria-current":l?"page":void 0,className:`ggui-config-rail__btn${l?" is-active":""}`,children:o.label})},o.path)})})]},n.label))})}const mn="#292929",Di="#d9d9d9",df="#f4f3ed",jx={mirror:{g1Outer:Di,g1Inner:mn,g2Outer:mn,g2Inner:Di,u:mn,i:Di},"mono-ink":{g1Outer:mn,g1Inner:mn,g2Outer:mn,g2Inner:mn,u:mn,i:mn},reverse:{g1Outer:Di,g1Inner:df,g2Outer:df,g2Inner:Di,u:df,i:Di}};function Gv({width:e,variant:n="mirror"}){const o=Math.round(e*50/224),l=jx[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 Sx(){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(Gv,{width:160})})]})})}const wx="ggui-mode";let ks=null;function kx(){if(ks!==null)return ks;if(typeof document>"u")return"prod";const e=document.querySelector(`meta[name="${wx}"]`);return ks=(e==null?void 0:e.getAttribute("content"))==="dev"?"dev":"prod",ks}function Nx({route:e,rightSlot:n}){const o=zx(e),l=hx(e),c=Zv(e),u=kx()==="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:()=>Be("/admin/status"),"aria-label":"go to admin",style:{display:"flex",alignItems:"center"},children:i.jsx(Gv,{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:()=>Be("/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:()=>Be("/admin/status"),children:"admin →"})}),n?i.jsx("li",{children:n}):null]})]})})}function zx(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 Bt({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(vx,{route:e,children:n}):o==="devtools"&&(d=i.jsx(xx,{route:e,children:n})),i.jsxs("div",{className:"ggui-shell",children:[i.jsx(Nx,{route:e,rightSlot:c}),i.jsx("main",{className:u,children:d}),l?i.jsx(Sx,{}):null]})}function Ex(){const[e,n]=A.useState(""),[o,l]=A.useState(!1),[c,u]=A.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){Be(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 Cx={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 ff(){if(typeof window>"u")return;const e=window.location.pathname+window.location.search;Be(`/admin-login?next=${encodeURIComponent(e)}`)}function Tx(e){return e.replace(/\[[\d;]*[a-zA-Z]/g,"").replace(/\s+/g,"")}function Mx(){const[e,n]=A.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){ff();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)})}};A.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){ff();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){ff();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(Ox,{rows:e.data.providers,scope:e.data.scope,onSet:l,onClear:c})]})}function Ox({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(Rx,{row:c,onSet:o,onClear:l},c.name))})]})}function Rx({row:e,onSet:n,onClear:o}){const l=Cx[e.name],[c,u]=A.useState(""),[d,p]=A.useState(!1),[g,h]=A.useState(null),y=async j=>{j.preventDefault();const k=Tx(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 Ax=[{id:"google",label:"Google"},{id:"github",label:"GitHub"}],pf="<redacted>";async function Nh(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 Dx(){const[e,n]=A.useState({kind:"loading"}),[o,l]=A.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){Be(`/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)})}};A.useEffect(()=>{c(),u()},[]);const d=async(g,h)=>{const y=await Nh(`/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){Be(`/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 Nh(`/ggui/admin/oauth-providers/${encodeURIComponent(g)}`,{method:"DELETE"},o,c);if(h.status===401){Be(`/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:Ax.map(g=>{const h=e.data.providers.find(y=>y.providerId===g.id);return i.jsx(Ix,{providerId:g.id,label:g.label,row:h,onSave:d,onDelete:p},g.id)})})]})}function Ix({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]=A.useState(p),[v,j]=A.useState(""),[k,x]=A.useState(g),[E,z]=A.useState(!1),[w,$]=A.useState(null);A.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(Ux,{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?pf:d?`${pf} — leave blank to keep`:`paste ${n} OAuth client secret`,value:u?pf: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 Ux({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 Lx="modulepreload",Vx=function(e){return"/"+e},zh={},Bx=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=Vx(h),h in zh)return;zh[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":Lx,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)})},Hx="draft-2026-06-12",qx=Hx;function Ff(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var Eh;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 Bi extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Fv extends Error{constructor(n){super(`Encountered unidirectional transform during encode: ${n}`),this.name="ZodEncodeError"}}(Eh=globalThis).__zod_globalConfig??(Eh.__zod_globalConfig={});const Yf=globalThis.__zod_globalConfig;function xn(e){return Yf}function Yv(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 Af(e,n){return typeof n=="bigint"?n.toString():n}function Ec(e){return{get value(){{const n=e();return Object.defineProperty(this,"value",{value:n}),n}}}}function Kf(e){return e==null}function Xf(e){const n=e.startsWith("^")?1:0,o=e.endsWith("$")?e.length-1:e.length;return e.slice(n,o)}function Px(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 Ch=Symbol("evaluating");function He(e,n,o){let l;Object.defineProperty(e,n,{get(){if(l!==Ch)return l===void 0&&(l=Ch,l=o()),l},set(c){Object.defineProperty(e,n,{value:c})},configurable:!0})}function Kr(e,n,o){Object.defineProperty(e,n,{value:o,writable:!0,enumerable:!0,configurable:!0})}function xr(...e){const n={};for(const o of e){const l=Object.getOwnPropertyDescriptors(o);Object.assign(n,l)}return Object.defineProperties({},n)}function Th(e){return JSON.stringify(e)}function Zx(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Kv="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Qo(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Gx=Ec(()=>{var e;if(Yf.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 Pi(e){if(Qo(e)===!1)return!1;const n=e.constructor;if(n===void 0||typeof n!="function")return!0;const o=n.prototype;return!(Qo(o)===!1||Object.prototype.hasOwnProperty.call(o,"isPrototypeOf")===!1)}function Xv(e){return Pi(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const Fx=new Set(["string","number","symbol"]);function Zi(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 Yx(e){return Object.keys(e).filter(n=>e[n]._zod.optin==="optional"&&e[n]._zod.optout==="optional")}const Kx={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 Xx(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=xr(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 Kr(this,"shape",d),d},checks:[]});return _r(e,u)}function Jx(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=xr(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 Kr(this,"shape",d),d},checks:[]});return _r(e,u)}function Qx(e,n){if(!Pi(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=xr(e._zod.def,{get shape(){const u={...e._zod.def.shape,...n};return Kr(this,"shape",u),u}});return _r(e,c)}function Wx(e,n){if(!Pi(n))throw new Error("Invalid input to safeExtend: expected a plain object");const o=xr(e._zod.def,{get shape(){const l={...e._zod.def.shape,...n};return Kr(this,"shape",l),l}});return _r(e,o)}function e5(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=xr(e._zod.def,{get shape(){const c={...e._zod.def.shape,...n._zod.def.shape};return Kr(this,"shape",c),c},get catchall(){return n._zod.def.catchall},checks:n._zod.def.checks??[]});return _r(e,o)}function t5(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=xr(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 Kr(this,"shape",g),g},checks:[]});return _r(n,d)}function a5(e,n,o){const l=xr(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 Kr(this,"shape",u),u}});return _r(n,l)}function Li(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 n5(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 Vi(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 _n(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 Jf(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Wo(...e){const[n,o,l]=e;return typeof n=="string"?{message:n,code:"custom",input:o,inst:l}:{...n}}const Jv=(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,Af,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Qv=le("$ZodError",Jv),Wv=le("$ZodError",Jv,{Parent:Error});function r5(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 i5(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 Qf=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 Bi;if(d.issues.length){const p=new((c==null?void 0:c.Err)??e)(d.issues.map(g=>_n(g,u,xn())));throw Kv(p,c==null?void 0:c.callee),p}return d.value},Wf=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=>_n(g,u,xn())));throw Kv(p,c==null?void 0:c.callee),p}return d.value},Cc=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 Bi;return u.issues.length?{success:!1,error:new(e??Qv)(u.issues.map(d=>_n(d,c,xn())))}:{success:!0,data:u.value}},o5=Cc(Wv),Tc=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=>_n(d,c,xn())))}:{success:!0,data:u.value}},l5=Tc(Wv),s5=e=>(n,o,l)=>{const c=l?{...l,direction:"backward"}:{direction:"backward"};return Qf(e)(n,o,c)},c5=e=>(n,o,l)=>Qf(e)(n,o,l),u5=e=>async(n,o,l)=>{const c=l?{...l,direction:"backward"}:{direction:"backward"};return Wf(e)(n,o,c)},d5=e=>async(n,o,l)=>Wf(e)(n,o,l),f5=e=>(n,o,l)=>{const c=l?{...l,direction:"backward"}:{direction:"backward"};return Cc(e)(n,o,c)},p5=e=>(n,o,l)=>Cc(e)(n,o,l),g5=e=>async(n,o,l)=>{const c=l?{...l,direction:"backward"}:{direction:"backward"};return Tc(e)(n,o,c)},m5=e=>async(n,o,l)=>Tc(e)(n,o,l),h5=/^[cC][0-9a-z]{6,}$/,y5=/^[0-9a-z]+$/,v5=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,$5=/^[0-9a-vA-V]{20}$/,b5=/^[A-Za-z0-9]{27}$/,x5=/^[a-zA-Z0-9_-]{21}$/,_5=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,j5=/^([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})$/,Mh=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)$/,S5=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,w5="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function k5(){return new RegExp(w5,"u")}const N5=/^(?:(?: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])$/,z5=/^(([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}|:))$/,E5=/^((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])$/,C5=/^(([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])$/,T5=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,e1=/^[A-Za-z0-9_-]*$/,M5=/^https?$/,O5=/^\+[1-9]\d{6,14}$/,t1="(?:(?:\\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])))",R5=new RegExp(`^${t1}$`);function a1(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 A5(e){return new RegExp(`^${a1(e)}$`)}function D5(e){const n=a1({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(`^${t1}T(?:${l})$`)}const I5=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}$`)},U5=/^-?\d+$/,n1=/^-?\d+(?:\.\d+)?$/,L5=/^(?:true|false)$/i,V5=/^null$/i,B5=/^[^A-Z]*$/,H5=/^[^a-z]*$/,ca=le("$ZodCheck",(e,n)=>{var o;e._zod??(e._zod={}),e._zod.def=n,(o=e._zod).onattach??(o.onattach=[])}),r1={number:"number",bigint:"bigint",object:"date"},i1=le("$ZodCheckLessThan",(e,n)=>{ca.init(e,n);const o=r1[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})}}),o1=le("$ZodCheckGreaterThan",(e,n)=>{ca.init(e,n);const o=r1[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})}}),q5=le("$ZodCheckMultipleOf",(e,n)=>{ca.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):Px(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})}}),P5=le("$ZodCheckNumberFormat",(e,n)=>{var d;ca.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]=Kx[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=U5)}),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})}}),Z5=le("$ZodCheckMaxLength",(e,n)=>{var o;ca.init(e,n),(o=e._zod.def).when??(o.when=l=>{const c=l.value;return!Kf(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=Jf(c);l.issues.push({origin:d,code:"too_big",maximum:n.maximum,inclusive:!0,input:c,inst:e,continue:!n.abort})}}),G5=le("$ZodCheckMinLength",(e,n)=>{var o;ca.init(e,n),(o=e._zod.def).when??(o.when=l=>{const c=l.value;return!Kf(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=Jf(c);l.issues.push({origin:d,code:"too_small",minimum:n.minimum,inclusive:!0,input:c,inst:e,continue:!n.abort})}}),F5=le("$ZodCheckLengthEquals",(e,n)=>{var o;ca.init(e,n),(o=e._zod.def).when??(o.when=l=>{const c=l.value;return!Kf(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=Jf(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})}}),Mc=le("$ZodCheckStringFormat",(e,n)=>{var o,l;ca.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=()=>{})}),Y5=le("$ZodCheckRegex",(e,n)=>{Mc.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})}}),K5=le("$ZodCheckLowerCase",(e,n)=>{n.pattern??(n.pattern=B5),Mc.init(e,n)}),X5=le("$ZodCheckUpperCase",(e,n)=>{n.pattern??(n.pattern=H5),Mc.init(e,n)}),J5=le("$ZodCheckIncludes",(e,n)=>{ca.init(e,n);const o=Zi(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})}}),Q5=le("$ZodCheckStartsWith",(e,n)=>{ca.init(e,n);const o=new RegExp(`^${Zi(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})}}),W5=le("$ZodCheckEndsWith",(e,n)=>{ca.init(e,n);const o=new RegExp(`.*${Zi(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})}}),e4=le("$ZodCheckOverwrite",(e,n)=>{ca.init(e,n),e._zod.check=o=>{o.value=n.tx(o.value)}});class t4{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 a4={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=a4;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=Li(p),v;for(const j of g){if(j._zod.def.when){if(n5(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 Bi;if(v||x instanceof Promise)v=(v??Promise.resolve()).then(async()=>{await x,p.issues.length!==k&&(y||(y=Li(p,k)))});else{if(p.issues.length===k)continue;y||(y=Li(p,k))}}return v?v.then(()=>p):p},d=(p,g,h)=>{if(Li(p))return p.aborted=!0,p;const y=u(g,l,h);if(y instanceof Promise){if(h.async===!1)throw new Bi;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 Bi;return h.then(y=>u(y,l,g))}return u(h,l,g)}}He(e,"~standard",()=>({validate:u=>{var d;try{const p=o5(e,u);return p.success?{value:p.data}:{issues:(d=p.error)==null?void 0:d.issues}}catch{return l5(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}))}),ep=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()??I5(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}}),dt=le("$ZodStringFormat",(e,n)=>{Mc.init(e,n),ep.init(e,n)}),n4=le("$ZodGUID",(e,n)=>{n.pattern??(n.pattern=j5),dt.init(e,n)}),r4=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=Mh(l))}else n.pattern??(n.pattern=Mh());dt.init(e,n)}),i4=le("$ZodEmail",(e,n)=>{n.pattern??(n.pattern=S5),dt.init(e,n)}),o4=le("$ZodURL",(e,n)=>{dt.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)===M5.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})}}}),l4=le("$ZodEmoji",(e,n)=>{n.pattern??(n.pattern=k5()),dt.init(e,n)}),s4=le("$ZodNanoID",(e,n)=>{n.pattern??(n.pattern=x5),dt.init(e,n)}),c4=le("$ZodCUID",(e,n)=>{n.pattern??(n.pattern=h5),dt.init(e,n)}),u4=le("$ZodCUID2",(e,n)=>{n.pattern??(n.pattern=y5),dt.init(e,n)}),d4=le("$ZodULID",(e,n)=>{n.pattern??(n.pattern=v5),dt.init(e,n)}),f4=le("$ZodXID",(e,n)=>{n.pattern??(n.pattern=$5),dt.init(e,n)}),p4=le("$ZodKSUID",(e,n)=>{n.pattern??(n.pattern=b5),dt.init(e,n)}),g4=le("$ZodISODateTime",(e,n)=>{n.pattern??(n.pattern=D5(n)),dt.init(e,n)}),m4=le("$ZodISODate",(e,n)=>{n.pattern??(n.pattern=R5),dt.init(e,n)}),h4=le("$ZodISOTime",(e,n)=>{n.pattern??(n.pattern=A5(n)),dt.init(e,n)}),y4=le("$ZodISODuration",(e,n)=>{n.pattern??(n.pattern=_5),dt.init(e,n)}),v4=le("$ZodIPv4",(e,n)=>{n.pattern??(n.pattern=N5),dt.init(e,n),e._zod.bag.format="ipv4"}),$4=le("$ZodIPv6",(e,n)=>{n.pattern??(n.pattern=z5),dt.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})}}}),b4=le("$ZodCIDRv4",(e,n)=>{n.pattern??(n.pattern=E5),dt.init(e,n)}),x4=le("$ZodCIDRv6",(e,n)=>{n.pattern??(n.pattern=C5),dt.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 l1(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const _4=le("$ZodBase64",(e,n)=>{n.pattern??(n.pattern=T5),dt.init(e,n),e._zod.bag.contentEncoding="base64",e._zod.check=o=>{l1(o.value)||o.issues.push({code:"invalid_format",format:"base64",input:o.value,inst:e,continue:!n.abort})}});function j4(e){if(!e1.test(e))return!1;const n=e.replace(/[-_]/g,l=>l==="-"?"+":"/"),o=n.padEnd(Math.ceil(n.length/4)*4,"=");return l1(o)}const S4=le("$ZodBase64URL",(e,n)=>{n.pattern??(n.pattern=e1),dt.init(e,n),e._zod.bag.contentEncoding="base64url",e._zod.check=o=>{j4(o.value)||o.issues.push({code:"invalid_format",format:"base64url",input:o.value,inst:e,continue:!n.abort})}}),w4=le("$ZodE164",(e,n)=>{n.pattern??(n.pattern=O5),dt.init(e,n)});function k4(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 N4=le("$ZodJWT",(e,n)=>{dt.init(e,n),e._zod.check=o=>{k4(o.value,n.alg)||o.issues.push({code:"invalid_format",format:"jwt",input:o.value,inst:e,continue:!n.abort})}}),s1=le("$ZodNumber",(e,n)=>{lt.init(e,n),e._zod.pattern=e._zod.bag.pattern??n1,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}}),z4=le("$ZodNumberFormat",(e,n)=>{P5.init(e,n),s1.init(e,n)}),E4=le("$ZodBoolean",(e,n)=>{lt.init(e,n),e._zod.pattern=L5,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}}),C4=le("$ZodNull",(e,n)=>{lt.init(e,n),e._zod.pattern=V5,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}}),T4=le("$ZodUnknown",(e,n)=>{lt.init(e,n),e._zod.parse=o=>o}),M4=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 Oh(e,n,o){e.issues.length&&n.issues.push(...Vi(o,e.issues)),n.value[o]=e.value}const O4=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=>Oh(h,o,d))):Oh(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(...Vi(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 c1(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=Yx(e.shape);return{...e,keys:n,keySet:new Set(n),numKeys:n.length,optionalKeys:new Set(o)}}function u1(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 R4=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=Ec(()=>c1(n));He(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=Qo,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?u1(y,h,p,g,l.value,e):y.length?Promise.all(y).then(()=>p):p}}),A4=le("$ZodObjectJIT",(e,n)=>{R4.init(e,n);const o=e._zod.parse,l=Ec(()=>c1(n)),c=j=>{var N,R;const k=new t4(["shape","payload","ctx"]),x=l.value,E=_=>{const S=Th(_);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=Th(_),I=j[_],te=((N=I==null?void 0:I._zod)==null?void 0:N.optin)==="optional",G=((R=I==null?void 0:I._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=Qo,p=!Yf.jitless,h=p&&Gx.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?u1([],x,j,k,v,e):j):o(j,k):(j.issues.push({expected:"object",code:"invalid_type",input:x,inst:e}),j)}});function Rh(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=>!Li(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=>_n(d,l,xn())))}),n)}const d1=le("$ZodUnion",(e,n)=>{lt.init(e,n),He(e._zod,"optin",()=>n.options.some(l=>l._zod.optin==="optional")?"optional":void 0),He(e._zod,"optout",()=>n.options.some(l=>l._zod.optout==="optional")?"optional":void 0),He(e._zod,"values",()=>{if(n.options.every(l=>l._zod.values))return new Set(n.options.flatMap(l=>Array.from(l._zod.values)))}),He(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=>Xf(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=>Rh(p,l,e,c)):Rh(d,l,e,c)}}),D4=le("$ZodDiscriminatedUnion",(e,n)=>{n.inclusive=!1,d1.init(e,n);const o=e._zod.parse;He(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=Ec(()=>{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(!Qo(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)}}),I4=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])=>Ah(o,g,h)):Ah(o,u,d)}});function Df(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(Pi(e)&&Pi(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=Df(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=Df(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 Ah(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}),Li(e))return e;const d=Df(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 U4=le("$ZodRecord",(e,n)=>{lt.init(e,n),e._zod.parse=(o,l)=>{const c=o.value;if(!Pi(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=>_n(k,l,xn())),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(...Vi(h,k.issues)),o.value[v]=k.value})):(j.issues.length&&o.issues.push(...Vi(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"&&n1.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=>_n(v,l,xn())),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(...Vi(p,v.issues)),o.value[g.value]=v.value})):(y.issues.length&&o.issues.push(...Vi(p,y.issues)),o.value[g.value]=y.value)}}return u.length?Promise.all(u).then(()=>o):o}}),L4=le("$ZodEnum",(e,n)=>{lt.init(e,n);const o=Yv(n.entries),l=new Set(o);e._zod.values=l,e._zod.pattern=new RegExp(`^(${o.filter(c=>Fx.has(typeof c)).map(c=>typeof c=="string"?Zi(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}}),V4=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"?Zi(l):l?Zi(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}}),B4=le("$ZodTransform",(e,n)=>{lt.init(e,n),e._zod.optin="optional",e._zod.parse=(o,l)=>{if(l.direction==="backward")throw new Fv(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 Bi;return o.value=c,o.fallback=!0,o}});function Dh(e,n){return n===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const f1=le("$ZodOptional",(e,n)=>{lt.init(e,n),e._zod.optin="optional",e._zod.optout="optional",He(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,void 0]):void 0),He(e._zod,"pattern",()=>{const o=n.innerType._zod.pattern;return o?new RegExp(`^(${Xf(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=>Dh(d,c)):Dh(u,c)}return o.value===void 0?o:n.innerType._zod.run(o,l)}}),H4=le("$ZodExactOptional",(e,n)=>{f1.init(e,n),He(e._zod,"values",()=>n.innerType._zod.values),He(e._zod,"pattern",()=>n.innerType._zod.pattern),e._zod.parse=(o,l)=>n.innerType._zod.run(o,l)}),q4=le("$ZodNullable",(e,n)=>{lt.init(e,n),He(e._zod,"optin",()=>n.innerType._zod.optin),He(e._zod,"optout",()=>n.innerType._zod.optout),He(e._zod,"pattern",()=>{const o=n.innerType._zod.pattern;return o?new RegExp(`^(${Xf(o.source)}|null)$`):void 0}),He(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)}),P4=le("$ZodDefault",(e,n)=>{lt.init(e,n),e._zod.optin="optional",He(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=>Ih(u,n)):Ih(c,n)}});function Ih(e,n){return e.value===void 0&&(e.value=n.defaultValue),e}const Z4=le("$ZodPrefault",(e,n)=>{lt.init(e,n),e._zod.optin="optional",He(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))}),G4=le("$ZodNonOptional",(e,n)=>{lt.init(e,n),He(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=>Uh(u,e)):Uh(c,e)}});function Uh(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 F4=le("$ZodCatch",(e,n)=>{lt.init(e,n),e._zod.optin="optional",He(e._zod,"optout",()=>n.innerType._zod.optout),He(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=>_n(d,l,xn()))},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=>_n(u,l,xn()))},input:o.value}),o.issues=[],o.fallback=!0),o)}}),Y4=le("$ZodPipe",(e,n)=>{lt.init(e,n),He(e._zod,"values",()=>n.in._zod.values),He(e._zod,"optin",()=>n.in._zod.optin),He(e._zod,"optout",()=>n.out._zod.optout),He(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 K4=le("$ZodReadonly",(e,n)=>{lt.init(e,n),He(e._zod,"propValues",()=>n.innerType._zod.propValues),He(e._zod,"values",()=>n.innerType._zod.values),He(e._zod,"optin",()=>{var o,l;return(l=(o=n.innerType)==null?void 0:o._zod)==null?void 0:l.optin}),He(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(Lh):Lh(c)}});function Lh(e){return e.value=Object.freeze(e.value),e}const X4=le("$ZodLazy",(e,n)=>{lt.init(e,n),He(e._zod,"innerType",()=>{const o=n;return o._cachedInner||(o._cachedInner=n.getter()),o._cachedInner}),He(e._zod,"pattern",()=>{var o,l;return(l=(o=e._zod.innerType)==null?void 0:o._zod)==null?void 0:l.pattern}),He(e._zod,"propValues",()=>{var o,l;return(l=(o=e._zod.innerType)==null?void 0:o._zod)==null?void 0:l.propValues}),He(e._zod,"optin",()=>{var o,l;return((l=(o=e._zod.innerType)==null?void 0:o._zod)==null?void 0:l.optin)??void 0}),He(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)}),J4=le("$ZodCustom",(e,n)=>{ca.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=>Vh(u,o,l,e));Vh(c,o,l,e)}});function Vh(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(Wo(c))}}var Bh;class Q4{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 W4(){return new Q4}(Bh=globalThis).__zod_globalRegistry??(Bh.__zod_globalRegistry=W4());const Jo=globalThis.__zod_globalRegistry;function e_(e,n){return new e({type:"string",...xe(n)})}function t_(e,n){return new e({type:"string",format:"email",check:"string_format",abort:!1,...xe(n)})}function Hh(e,n){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...xe(n)})}function a_(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...xe(n)})}function n_(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...xe(n)})}function r_(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...xe(n)})}function i_(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...xe(n)})}function p1(e,n){return new e({type:"string",format:"url",check:"string_format",abort:!1,...xe(n)})}function o_(e,n){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...xe(n)})}function l_(e,n){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...xe(n)})}function s_(e,n){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...xe(n)})}function c_(e,n){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...xe(n)})}function u_(e,n){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...xe(n)})}function d_(e,n){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...xe(n)})}function f_(e,n){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...xe(n)})}function p_(e,n){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...xe(n)})}function g_(e,n){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...xe(n)})}function m_(e,n){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...xe(n)})}function h_(e,n){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...xe(n)})}function y_(e,n){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...xe(n)})}function v_(e,n){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...xe(n)})}function $_(e,n){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...xe(n)})}function b_(e,n){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...xe(n)})}function x_(e,n){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...xe(n)})}function __(e,n){return new e({type:"string",format:"date",check:"string_format",...xe(n)})}function j_(e,n){return new e({type:"string",format:"time",check:"string_format",precision:null,...xe(n)})}function S_(e,n){return new e({type:"string",format:"duration",check:"string_format",...xe(n)})}function w_(e,n){return new e({type:"number",checks:[],...xe(n)})}function k_(e,n){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...xe(n)})}function N_(e,n){return new e({type:"boolean",...xe(n)})}function z_(e,n){return new e({type:"null",...xe(n)})}function E_(e){return new e({type:"unknown"})}function C_(e,n){return new e({type:"never",...xe(n)})}function qh(e,n){return new i1({check:"less_than",...xe(n),value:e,inclusive:!1})}function gf(e,n){return new i1({check:"less_than",...xe(n),value:e,inclusive:!0})}function Ph(e,n){return new o1({check:"greater_than",...xe(n),value:e,inclusive:!1})}function mf(e,n){return new o1({check:"greater_than",...xe(n),value:e,inclusive:!0})}function Zh(e,n){return new q5({check:"multiple_of",...xe(n),value:e})}function g1(e,n){return new Z5({check:"max_length",...xe(n),maximum:e})}function jc(e,n){return new G5({check:"min_length",...xe(n),minimum:e})}function m1(e,n){return new F5({check:"length_equals",...xe(n),length:e})}function T_(e,n){return new Y5({check:"string_format",format:"regex",...xe(n),pattern:e})}function M_(e){return new K5({check:"string_format",format:"lowercase",...xe(e)})}function O_(e){return new X5({check:"string_format",format:"uppercase",...xe(e)})}function R_(e,n){return new J5({check:"string_format",format:"includes",...xe(n),includes:e})}function A_(e,n){return new Q5({check:"string_format",format:"starts_with",...xe(n),prefix:e})}function D_(e,n){return new W5({check:"string_format",format:"ends_with",...xe(n),suffix:e})}function Fi(e){return new e4({check:"overwrite",tx:e})}function I_(e){return Fi(n=>n.normalize(e))}function U_(){return Fi(e=>e.trim())}function L_(){return Fi(e=>e.toLowerCase())}function V_(){return Fi(e=>e.toUpperCase())}function B_(){return Fi(e=>Zx(e))}function H_(e,n,o){return new e({type:"array",element:n,...xe(o)})}function q_(e,n,o){return new e({type:"custom",check:"custom",fn:n,...xe(o)})}function P_(e,n){const o=Z_(l=>(l.addIssue=c=>{if(typeof c=="string")l.issues.push(Wo(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(Wo(u))}},e(l.value,l)),n);return o}function Z_(e,n){const o=new ca({check:"custom",...xe(n)});return o._zod.check=e,o}function h1(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 bt(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),bt(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"&&Xt(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 y1(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 v1(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 Xt(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 Xt(l.element,o);if(l.type==="set")return Xt(l.valueType,o);if(l.type==="lazy")return Xt(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 Xt(l.innerType,o);if(l.type==="intersection")return Xt(l.left,o)||Xt(l.right,o);if(l.type==="record"||l.type==="map")return Xt(l.keyType,o)||Xt(l.valueType,o);if(l.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:Xt(l.in,o)||Xt(l.out,o);if(l.type==="object"){for(const c in l.shape)if(Xt(l.shape[c],o))return!0;return!1}if(l.type==="union"){for(const c of l.options)if(Xt(c,o))return!0;return!1}if(l.type==="tuple"){for(const c of l.items)if(Xt(c,o))return!0;return!!(l.rest&&Xt(l.rest,o))}return!1}const G_=(e,n={})=>o=>{const l=h1({...o,processors:n});return bt(e,l),y1(l,e),v1(l,e)},Sc=(e,n,o={})=>l=>{const{libraryOptions:c,target:u}=l??{},d=h1({...c??{},target:u,io:n,processors:o});return bt(e,d),y1(d,e),v1(d,e)},F_={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Y_=(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=F_[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}))])}},K_=(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)},X_=(e,n,o,l)=>{o.type="boolean"},J_=(e,n,o,l)=>{n.target==="openapi-3.0"?(o.type="string",o.nullable=!0,o.enum=[null]):o.type="null"},Q_=(e,n,o,l)=>{o.not={}},W_=(e,n,o,l)=>{},ej=(e,n,o,l)=>{const c=e._zod.def,u=Yv(c.entries);u.every(d=>typeof d=="number")&&(o.type="number"),u.every(d=>typeof d=="string")&&(o.type="string"),o.enum=u},tj=(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},aj=(e,n,o,l)=>{if(n.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},nj=(e,n,o,l)=>{if(n.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},rj=(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=bt(u.element,n,{...l,path:[...l.path,"items"]})},ij=(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]=bt(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=bt(u.catchall,n,{...l,path:[...l.path,"additionalProperties"]})):n.io==="output"&&(c.additionalProperties=!1)},oj=(e,n,o,l)=>{const c=e._zod.def,u=c.inclusive===!1,d=c.options.map((p,g)=>bt(p,n,{...l,path:[...l.path,u?"oneOf":"anyOf",g]}));u?o.oneOf=d:o.anyOf=d},lj=(e,n,o,l)=>{const c=e._zod.def,u=bt(c.left,n,{...l,path:[...l.path,"allOf",0]}),d=bt(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},sj=(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=bt(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=bt(u.keyType,n,{...l,path:[...l.path,"propertyNames"]})),c.additionalProperties=bt(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)}},cj=(e,n,o,l)=>{const c=e._zod.def,u=bt(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"}]},uj=(e,n,o,l)=>{const c=e._zod.def;bt(c.innerType,n,l);const u=n.seen.get(e);u.ref=c.innerType},dj=(e,n,o,l)=>{const c=e._zod.def;bt(c.innerType,n,l);const u=n.seen.get(e);u.ref=c.innerType,o.default=JSON.parse(JSON.stringify(c.defaultValue))},fj=(e,n,o,l)=>{const c=e._zod.def;bt(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)))},pj=(e,n,o,l)=>{const c=e._zod.def;bt(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},gj=(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;bt(d,n,l);const p=n.seen.get(e);p.ref=d},mj=(e,n,o,l)=>{const c=e._zod.def;bt(c.innerType,n,l);const u=n.seen.get(e);u.ref=c.innerType,o.readOnly=!0},$1=(e,n,o,l)=>{const c=e._zod.def;bt(c.innerType,n,l);const u=n.seen.get(e);u.ref=c.innerType},hj=(e,n,o,l)=>{const c=e._zod.innerType;bt(c,n,l);const u=n.seen.get(e);u.ref=c},yj=le("ZodISODateTime",(e,n)=>{g4.init(e,n),ft.init(e,n)});function vj(e){return x_(yj,e)}const $j=le("ZodISODate",(e,n)=>{m4.init(e,n),ft.init(e,n)});function bj(e){return __($j,e)}const xj=le("ZodISOTime",(e,n)=>{h4.init(e,n),ft.init(e,n)});function _j(e){return j_(xj,e)}const jj=le("ZodISODuration",(e,n)=>{y4.init(e,n),ft.init(e,n)});function Sj(e){return S_(jj,e)}const wj=(e,n)=>{Qv.init(e,n),e.name="ZodError",Object.defineProperties(e,{format:{value:o=>i5(e,o)},flatten:{value:o=>r5(e,o)},addIssue:{value:o=>{e.issues.push(o),e.message=JSON.stringify(e.issues,Af,2)}},addIssues:{value:o=>{e.issues.push(...o),e.message=JSON.stringify(e.issues,Af,2)}},isEmpty:{get(){return e.issues.length===0}}})},Ra=le("ZodError",wj,{Parent:Error}),kj=Qf(Ra),Nj=Wf(Ra),zj=Cc(Ra),Ej=Tc(Ra),Cj=s5(Ra),Tj=c5(Ra),Mj=u5(Ra),Oj=d5(Ra),Rj=f5(Ra),Aj=p5(Ra),Dj=g5(Ra),Ij=m5(Ra),Gh=new WeakMap;function nl(e,n,o){const l=Object.getPrototypeOf(e);let c=Gh.get(l);if(c||(c=new Set,Gh.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=G_(e,{}),e.def=n,e.type=n.type,Object.defineProperty(e,"_def",{value:n}),e.parse=(o,l)=>kj(e,o,l,{callee:e.parse}),e.safeParse=(o,l)=>zj(e,o,l),e.parseAsync=async(o,l)=>Nj(e,o,l,{callee:e.parseAsync}),e.safeParseAsync=async(o,l)=>Ej(e,o,l),e.spa=e.safeParseAsync,e.encode=(o,l)=>Cj(e,o,l),e.decode=(o,l)=>Tj(e,o,l),e.encodeAsync=async(o,l)=>Mj(e,o,l),e.decodeAsync=async(o,l)=>Oj(e,o,l),e.safeEncode=(o,l)=>Rj(e,o,l),e.safeDecode=(o,l)=>Aj(e,o,l),e.safeEncodeAsync=async(o,l)=>Dj(e,o,l),e.safeDecodeAsync=async(o,l)=>Ij(e,o,l),nl(e,"ZodType",{check(...o){const l=this.def;return this.clone(xr(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(TS(o,l))},superRefine(o,l){return this.check(MS(o,l))},overwrite(o){return this.check(Fi(o))},optional(){return Xh(this)},exactOptional(){return yS(this)},nullable(){return Jh(this)},nullish(){return Xh(Jh(this))},nonoptional(o){return jS(this,o)},array(){return zt(this)},or(o){return jn([this,o])},and(o){return fS(this,o)},transform(o){return Qh(this,mS(o))},default(o){return bS(this,o)},prefault(o){return _S(this,o)},catch(o){return wS(this,o)},pipe(o){return Qh(this,o)},readonly(){return zS(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)),b1=le("_ZodString",(e,n)=>{ep.init(e,n),st.init(e,n),e._zod.processJSONSchema=(l,c,u)=>Y_(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(T_(...l))},includes(...l){return this.check(R_(...l))},startsWith(...l){return this.check(A_(...l))},endsWith(...l){return this.check(D_(...l))},min(...l){return this.check(jc(...l))},max(...l){return this.check(g1(...l))},length(...l){return this.check(m1(...l))},nonempty(...l){return this.check(jc(1,...l))},lowercase(l){return this.check(M_(l))},uppercase(l){return this.check(O_(l))},trim(){return this.check(U_())},normalize(...l){return this.check(I_(...l))},toLowerCase(){return this.check(L_())},toUpperCase(){return this.check(V_())},slugify(){return this.check(B_())}})}),Uj=le("ZodString",(e,n)=>{ep.init(e,n),b1.init(e,n),e.email=o=>e.check(t_(Lj,o)),e.url=o=>e.check(p1(x1,o)),e.jwt=o=>e.check(b_(eS,o)),e.emoji=o=>e.check(o_(Vj,o)),e.guid=o=>e.check(Hh(Fh,o)),e.uuid=o=>e.check(a_(Es,o)),e.uuidv4=o=>e.check(n_(Es,o)),e.uuidv6=o=>e.check(r_(Es,o)),e.uuidv7=o=>e.check(i_(Es,o)),e.nanoid=o=>e.check(l_(Bj,o)),e.guid=o=>e.check(Hh(Fh,o)),e.cuid=o=>e.check(s_(Hj,o)),e.cuid2=o=>e.check(c_(qj,o)),e.ulid=o=>e.check(u_(Pj,o)),e.base64=o=>e.check(y_(Jj,o)),e.base64url=o=>e.check(v_(Qj,o)),e.xid=o=>e.check(d_(Zj,o)),e.ksuid=o=>e.check(f_(Gj,o)),e.ipv4=o=>e.check(p_(Fj,o)),e.ipv6=o=>e.check(g_(Yj,o)),e.cidrv4=o=>e.check(m_(Kj,o)),e.cidrv6=o=>e.check(h_(Xj,o)),e.e164=o=>e.check($_(Wj,o)),e.datetime=o=>e.check(vj(o)),e.date=o=>e.check(bj(o)),e.time=o=>e.check(_j(o)),e.duration=o=>e.check(Sj(o))});function Z(e){return e_(Uj,e)}const ft=le("ZodStringFormat",(e,n)=>{dt.init(e,n),b1.init(e,n)}),Lj=le("ZodEmail",(e,n)=>{i4.init(e,n),ft.init(e,n)}),Fh=le("ZodGUID",(e,n)=>{n4.init(e,n),ft.init(e,n)}),Es=le("ZodUUID",(e,n)=>{r4.init(e,n),ft.init(e,n)}),x1=le("ZodURL",(e,n)=>{o4.init(e,n),ft.init(e,n)});function Cs(e){return p1(x1,e)}const Vj=le("ZodEmoji",(e,n)=>{l4.init(e,n),ft.init(e,n)}),Bj=le("ZodNanoID",(e,n)=>{s4.init(e,n),ft.init(e,n)}),Hj=le("ZodCUID",(e,n)=>{c4.init(e,n),ft.init(e,n)}),qj=le("ZodCUID2",(e,n)=>{u4.init(e,n),ft.init(e,n)}),Pj=le("ZodULID",(e,n)=>{d4.init(e,n),ft.init(e,n)}),Zj=le("ZodXID",(e,n)=>{f4.init(e,n),ft.init(e,n)}),Gj=le("ZodKSUID",(e,n)=>{p4.init(e,n),ft.init(e,n)}),Fj=le("ZodIPv4",(e,n)=>{v4.init(e,n),ft.init(e,n)}),Yj=le("ZodIPv6",(e,n)=>{$4.init(e,n),ft.init(e,n)}),Kj=le("ZodCIDRv4",(e,n)=>{b4.init(e,n),ft.init(e,n)}),Xj=le("ZodCIDRv6",(e,n)=>{x4.init(e,n),ft.init(e,n)}),Jj=le("ZodBase64",(e,n)=>{_4.init(e,n),ft.init(e,n)}),Qj=le("ZodBase64URL",(e,n)=>{S4.init(e,n),ft.init(e,n)}),Wj=le("ZodE164",(e,n)=>{w4.init(e,n),ft.init(e,n)}),eS=le("ZodJWT",(e,n)=>{N4.init(e,n),ft.init(e,n)}),_1=le("ZodNumber",(e,n)=>{s1.init(e,n),st.init(e,n),e._zod.processJSONSchema=(l,c,u)=>K_(e,l,c),nl(e,"ZodNumber",{gt(l,c){return this.check(Ph(l,c))},gte(l,c){return this.check(mf(l,c))},min(l,c){return this.check(mf(l,c))},lt(l,c){return this.check(qh(l,c))},lte(l,c){return this.check(gf(l,c))},max(l,c){return this.check(gf(l,c))},int(l){return this.check(Yh(l))},safe(l){return this.check(Yh(l))},positive(l){return this.check(Ph(0,l))},nonnegative(l){return this.check(mf(0,l))},negative(l){return this.check(qh(0,l))},nonpositive(l){return this.check(gf(0,l))},multipleOf(l,c){return this.check(Zh(l,c))},step(l,c){return this.check(Zh(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 it(e){return w_(_1,e)}const tS=le("ZodNumberFormat",(e,n)=>{z4.init(e,n),_1.init(e,n)});function Yh(e){return k_(tS,e)}const aS=le("ZodBoolean",(e,n)=>{E4.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>X_(e,o,l)});function Ft(e){return N_(aS,e)}const nS=le("ZodNull",(e,n)=>{C4.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>J_(e,o,l)});function rS(e){return z_(nS,e)}const iS=le("ZodUnknown",(e,n)=>{T4.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>W_()});function $r(){return E_(iS)}const oS=le("ZodNever",(e,n)=>{M4.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>Q_(e,o,l)});function lS(e){return C_(oS,e)}const sS=le("ZodArray",(e,n)=>{O4.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>rj(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(g1(o,l))},length(o,l){return this.check(m1(o,l))},unwrap(){return this.element}})});function zt(e,n){return H_(sS,e,n)}const cS=le("ZodObject",(e,n)=>{A4.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>ij(e,o,l,c),He(e,"shape",()=>n.shape),nl(e,"ZodObject",{keyof(){return ut(Object.keys(this._zod.def.shape))},catchall(o){return this.clone({...this._zod.def,catchall:o})},passthrough(){return this.clone({...this._zod.def,catchall:$r()})},loose(){return this.clone({...this._zod.def,catchall:$r()})},strict(){return this.clone({...this._zod.def,catchall:lS()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(o){return Qx(this,o)},safeExtend(o){return Wx(this,o)},merge(o){return e5(this,o)},pick(o){return Xx(this,o)},omit(o){return Jx(this,o)},partial(...o){return t5(S1,this,o[0])},required(...o){return a5(w1,this,o[0])}})});function fe(e,n){const o={type:"object",shape:e??{},...xe(n)};return new cS(o)}const j1=le("ZodUnion",(e,n)=>{d1.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>oj(e,o,l,c),e.options=n.options});function jn(e,n){return new j1({type:"union",options:e,...xe(n)})}const uS=le("ZodDiscriminatedUnion",(e,n)=>{j1.init(e,n),D4.init(e,n)});function rl(e,n,o){return new uS({type:"union",options:n,discriminator:e,...xe(o)})}const dS=le("ZodIntersection",(e,n)=>{I4.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>lj(e,o,l,c)});function fS(e,n){return new dS({type:"intersection",left:e,right:n})}const Kh=le("ZodRecord",(e,n)=>{U4.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>sj(e,o,l,c),e.keyType=n.keyType,e.valueType=n.valueType});function xt(e,n,o){return!n||!n._zod?new Kh({type:"record",keyType:Z(),valueType:e,...xe(n)}):new Kh({type:"record",keyType:e,valueType:n,...xe(o)})}const If=le("ZodEnum",(e,n)=>{L4.init(e,n),st.init(e,n),e._zod.processJSONSchema=(l,c,u)=>ej(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 If({...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 If({...n,checks:[],...xe(c),entries:u})}});function ut(e,n){const o=Array.isArray(e)?Object.fromEntries(e.map(l=>[l,l])):e;return new If({type:"enum",entries:o,...xe(n)})}const pS=le("ZodLiteral",(e,n)=>{V4.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>tj(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 Oe(e,n){return new pS({type:"literal",values:Array.isArray(e)?e:[e],...xe(n)})}const gS=le("ZodTransform",(e,n)=>{B4.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>nj(e,o),e._zod.parse=(o,l)=>{if(l.direction==="backward")throw new Fv(e.constructor.name);o.addIssue=u=>{if(typeof u=="string")o.issues.push(Wo(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(Wo(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 mS(e){return new gS({type:"transform",transform:e})}const S1=le("ZodOptional",(e,n)=>{f1.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>$1(e,o,l,c),e.unwrap=()=>e._zod.def.innerType});function Xh(e){return new S1({type:"optional",innerType:e})}const hS=le("ZodExactOptional",(e,n)=>{H4.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>$1(e,o,l,c),e.unwrap=()=>e._zod.def.innerType});function yS(e){return new hS({type:"optional",innerType:e})}const vS=le("ZodNullable",(e,n)=>{q4.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>cj(e,o,l,c),e.unwrap=()=>e._zod.def.innerType});function Jh(e){return new vS({type:"nullable",innerType:e})}const $S=le("ZodDefault",(e,n)=>{P4.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>dj(e,o,l,c),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function bS(e,n){return new $S({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():Xv(n)}})}const xS=le("ZodPrefault",(e,n)=>{Z4.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>fj(e,o,l,c),e.unwrap=()=>e._zod.def.innerType});function _S(e,n){return new xS({type:"prefault",innerType:e,get defaultValue(){return typeof n=="function"?n():Xv(n)}})}const w1=le("ZodNonOptional",(e,n)=>{G4.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>uj(e,o,l,c),e.unwrap=()=>e._zod.def.innerType});function jS(e,n){return new w1({type:"nonoptional",innerType:e,...xe(n)})}const SS=le("ZodCatch",(e,n)=>{F4.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>pj(e,o,l,c),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function wS(e,n){return new SS({type:"catch",innerType:e,catchValue:typeof n=="function"?n:()=>n})}const kS=le("ZodPipe",(e,n)=>{Y4.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>gj(e,o,l,c),e.in=n.in,e.out=n.out});function Qh(e,n){return new kS({type:"pipe",in:e,out:n})}const NS=le("ZodReadonly",(e,n)=>{K4.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>mj(e,o,l,c),e.unwrap=()=>e._zod.def.innerType});function zS(e){return new NS({type:"readonly",innerType:e})}const ES=le("ZodLazy",(e,n)=>{X4.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>hj(e,o,l,c),e.unwrap=()=>e._zod.def.getter()});function k1(e){return new ES({type:"lazy",getter:e})}const CS=le("ZodCustom",(e,n)=>{J4.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>aj(e,o)});function TS(e,n={}){return q_(CS,e,n)}function MS(e,n){return P_(e,n)}const N1="@ggui-ai/gadgets",OS="0.6.0",RS=[{package:N1,version:OS,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(RS.flatMap(e=>e.exports).map(e=>e.hook).filter(e=>e!==void 0)));const tp=/^use[A-Z][A-Za-z0-9]*$/,ap=/^[A-Z][A-Za-z0-9]*$/,np=["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(np);const mt=k1(()=>jn([Z(),it(),Ft(),rS(),zt(mt),xt(Z(),mt)])),bn=k1(()=>fe({type:ut(["string","number","integer","boolean","array","object","null"]).optional(),description:Z().optional(),enum:zt(mt).optional(),default:mt.optional(),example:mt.optional(),items:bn.optional(),properties:xt(Z(),bn).optional(),required:zt(Z()).optional(),additionalProperties:jn([bn,Ft()]).optional(),format:Z().optional()}).passthrough()),AS=fe({description:Z().optional(),schema:bn,required:Ft().optional(),default:mt.optional(),example:mt.optional(),sourceTool:Z().optional()}).strict(),DS=fe({description:Z().optional(),properties:xt(Z(),AS)}).strict(),IS=fe({description:Z().optional(),label:Z(),schema:bn.optional(),example:mt.optional(),icon:Z().optional(),confirm:Ft().optional(),nextStep:Z().min(1).optional()}).strict(),US=xt(Z(),IS),LS=fe({description:Z().optional(),schema:bn,example:mt.optional(),mode:ut(["append","replace"]).optional(),replay:ut(["latest","all","none"]).optional(),complete:Ft().optional(),source:fe({tool:Z(),args:xt(Z(),mt).optional()}).strict().optional()}).strict(),VS=xt(Z(),LS),BS=fe({description:Z().optional(),schema:bn,default:mt.optional(),debounceMs:it().int().nonnegative().optional(),example:mt.optional()}).strict(),HS=xt(Z(),BS),qS=fe({serverInfo:fe({name:Z(),version:Z().optional()}).strict().optional(),toolInfo:fe({inputSchema:bn,description:Z().optional(),outputSchema:bn.optional()}).strict(),usage:Z().optional(),example:fe({input:mt,output:mt}).strict().optional()}).strict(),PS=fe({tools:xt(Z(),qS)}).passthrough(),z1=/^GGUI_PUBLIC_APP_[A-Z0-9_]+$/,ZS=zt(Z().regex(z1)).readonly(),Wh=/^sha384-[A-Za-z0-9+/]+=*$/,E1=/^(?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*$/,GS=/^\d+\.\d+\.\d+(-[\w.]+)?(\+[\w.]+)?$/,FS=/^[a-z0-9.-]+(:\d+)?$/,C1={gotchas:Z().optional()},ey={...C1,description:Z().optional(),usage:Z().optional(),example:mt.optional(),permission:Z().optional()},ty={...C1,description:Z().min(1),usage:Z().min(1),example:mt,permission:ut(np).optional()},T1={version:Z().regex(GS),package:Z().regex(E1),bundleUrl:Cs().optional(),bundleHost:Z().regex(FS).optional(),bundleSri:Z().regex(Wh).optional(),styleUrl:Cs().optional(),connect:zt(Cs()).readonly().optional(),requires:ZS.optional(),typesUrl:Cs().optional(),typesSri:Z().regex(Wh).optional()},YS=jn([fe({hook:Z().regex(tp),...ey}).strict(),fe({component:Z().regex(ap),...ey}).strict()]),KS=jn([fe({hook:Z().regex(tp),...ty}).strict(),fe({component:Z().regex(ap),...ty}).strict()]);fe({...T1,exports:zt(YS).min(1)}).strict();const XS=fe({...T1,exports:zt(KS).min(1)}).strict();XS.refine(e=>e.package===N1||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 JS=fe({description:Z().optional(),usage:Z().optional()}).strict(),QS=xt(Z().refine(e=>tp.test(e)||ap.test(e),{message:"gadget export name must be a `use`-prefixed hook or a PascalCase component identifier"}),JS).refine(e=>Object.keys(e).length>0,{message:"a `clientCapabilities.gadgets` package entry must declare at least one export"}),WS=fe({gadgets:xt(Z().regex(E1),QS)}).strict();xt(Z().regex(z1),Z()).readonly();const il=fe({propsSpec:DS.optional(),actionSpec:US.optional(),streamSpec:VS.optional(),contextSpec:HS.optional(),agentCapabilities:PS.optional(),clientCapabilities:WS.optional()}).passthrough(),M1=fe({kind:Oe("llm"),generator:Z().min(1),model:Z().min(1)}).strict(),O1=fe({kind:Oe("user")}).strict(),e3=fe({kind:Oe("curated")}).strict(),R1=jn([M1,O1,e3]),Oc=fe({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:xt(Z(),mt).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.")}).strict(),t3=fe({blueprintId:Z().min(1),contractHash:Z().min(1),appId:Z().min(1),codeS3Url:Z().optional(),codeHash:Z().optional(),source:R1,validatorScore:it().min(0).max(1).optional(),variance:Oc,isOperatorDefault:Oe(!0).optional(),createdAt:Z().min(1),createdBy:ut(["agent","operator"]),contract:il,contractEmbedding:zt(it()).optional()}).strict(),a3=fe({hash:it().min(0).optional(),embed:it().min(0).optional(),struct:it().min(0).optional(),variance:it().min(0).optional(),intent:it().min(0).optional()}).strict();fe({weights:a3.optional(),threshold:it().min(0).max(1).optional(),topK:it().int().min(1).optional()}).strict();const n3=ut(["cache","agent","synth"]),r3=jn([fe({op:Oe("add"),path:Z(),value:mt}).strict(),fe({op:Oe("remove"),path:Z()}).strict(),fe({op:Oe("replace"),path:Z(),value:mt}).strict()]),i3=zt(r3),o3=fe({contract:il,variance:fe({persona:Z().optional(),aesthetic:Z().optional(),context:xt(Z(),mt).optional(),seedPrompt:Z().optional()}).strict().optional(),generator:Z().optional()}).strict(),l3=o3,s3=fe({blueprintId:Z().min(1).optional(),contractHash:Z().min(1),codeHash:Z().optional(),source:R1.optional(),variance:Oc,selectedReason:Z().optional()}).strict(),c3=fe({code:Z().min(1),severity:ut(["error","warn"]),path:Z(),message:Z()}).strict(),u3=fe({contractDiff:i3,reasoning:Z()}).strict(),d3=fe({origin:n3,rationale:Z(),blueprintMeta:s3,proposedContractSummary:Z().optional(),amendments:u3.optional(),validationFindings:zt(c3).optional()}).strict(),f3=fe({width:it(),height:it()}),p3=fe({viewport:f3,platform:ut(["web","mobile","desktop"]),deviceType:ut(["phone","tablet","desktop"]),orientation:ut(["portrait","landscape"]),devicePixelRatio:it().optional(),touchPrimary:Ft().optional(),shellType:ut(["chat","fullscreen","spatial"]).optional(),colorScheme:ut(["light","dark"]).optional(),reducedMotion:Ft().optional()}).passthrough(),g3={sessionId:Z().min(1).describe("Globally-unique sessionId to consume events from. Cross-tenant access surfaces uniformly as session_not_found."),timeout:it().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.")};fe(g3);const m3={sessionId:Z().min(1),channel:Z().min(1),payload:$r(),complete:Ft().optional()};fe(m3);const h3={sessionId:Z().min(1).describe("GguiSession opaque id (UUID) — returned by ggui_render.")};fe(h3);const y3={};fe(y3);const v3={query:Z().min(1).describe("Natural-language description of the UI you're looking for"),limit:it().int().min(1).max(100).optional()};fe(v3);const $3={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.")};fe($3);const b3={};fe(b3);const x3={serviceId:Z().min(1),reason:Z().optional(),sessionId:Z().optional()};fe(x3);fe({intent:Z().min(1).describe('Concise purpose — same intent = same component reused. e.g. "Gmail inbox for email triage"'),blueprintDraft:l3.describe("Agent's draft: 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:Ft().optional()}).strict();fe({handshakeId:Z().describe("Stable id — pass to ggui_render / ggui_update"),action:ut(["create","reuse","update","replace","declined"]),suggestion:d3.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:fe({tool:Oe("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 _3={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:xt(Z(),$r()),themeId:Z().min(1).optional().describe("Per-render theme override. Wins over App.defaultThemeId for THIS render. Omit to inherit the app theme."),infra:fe({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:fe({contract:il.optional().describe("STRICT full re-draft of the contract — must already conform; the server will not repair it."),variance:Oc.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).")};fe(_3);const j3=fe({hit:Ft().describe("True when a stored component was served without generating new code."),similarity:it().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:it().describe("Generation calls skipped by serving the stored component (0 on a fresh generation)."),kind:ut(["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.")}),S3=ut(["PRODUCTION_FAILED","VALIDATION_ERROR","NO_PLATFORM_KEY","NO_CREDENTIALS"]),w3=fe({code:S3.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."),message:Z().describe("Human-readable failure detail — fold into the next attempt or surface to the operator.")});fe({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:ut(["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:j3.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:w3.optional().describe("Present iff the tool result is isError — canonical {code, message} for a failed/rejected generation. Absent on success."),nextStep:fe({tool:Oe("ggui_consume"),description:Z(),example:Z(),args:fe({sessionId:Z()})}).optional().describe("Recovery hint — when the rendered contract has actions, points the agent at ggui_consume({sessionId}) for the inbound action loop. Absent for pure-display renders.")});rl("kind",[fe({sessionId:Z().describe("GguiSession opaque id (UUID) — returned by ggui_render."),kind:Oe("replace"),props:xt(Z(),$r()).describe("Full replacement props map. New map IS the new state.")}).strict(),fe({sessionId:Z().describe("GguiSession opaque id (UUID) — returned by ggui_render."),kind:Oe("merge"),patch:xt(Z(),$r()).describe("RFC 7396 JSON Merge Patch — null deletes a key; arrays fully replace.")}).strict()]);fe({sessionId:Z(),updated:Ft(),resourceUri:Z()});fe({toolCatalog:xt(Z(),fe({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();fe({saved:Ft(),appId:Z()}).strict();const k3=fe({type:Oe("text"),text:Z()}),N3=fe({type:Oe("tool_use"),id:Z(),name:Z(),input:xt(Z(),$r())}),z3=fe({type:Oe("tool_result"),tool_use_id:Z(),content:$r(),is_error:Ft().optional()}),A1=rl("type",[k3,N3,z3]),E3=fe({type:Oe("text_delta"),text:Z()}),C3=fe({type:Oe("input_json_delta"),partial_json:Z()}),T3=rl("type",[E3,C3]),M3=fe({type:Oe("message_start"),message:fe({id:Z(),role:Oe("assistant"),model:Z().optional()})}),O3=fe({type:Oe("content_block_start"),index:it().int().nonnegative(),content_block:A1}),R3=fe({type:Oe("content_block_delta"),index:it().int().nonnegative(),delta:T3}),A3=fe({type:Oe("content_block_stop"),index:it().int().nonnegative()}),D3=fe({type:Oe("message_delta"),delta:fe({stop_reason:ut(["end_turn","max_tokens","tool_use","error"]),stop_sequence:Z().nullable().optional()}),usage:fe({input_tokens:it().int().nonnegative(),output_tokens:it().int().nonnegative()})}),I3=fe({type:Oe("message_stop")}),U3=fe({type:Oe("ping")}),L3=ut(["invalid_request","unauthorized","rate_limited","invoke_in_progress","upstream_error","tool_error","internal"]),V3=fe({type:Oe("error"),error:fe({code:L3,message:Z(),retryAfterMs:it().int().nonnegative().optional()})});rl("type",[M3,O3,R3,A3,D3,I3,U3,V3]);const B3=fe({role:ut(["user","assistant"]),content:jn([Z(),zt(A1)])});fe({message:Z(),history:zt(B3).optional(),interfaceContext:p3.optional(),requestId:Z().optional()});const H3=/^--ggui-[a-zA-Z0-9-]+$/,q3=/^[^;{}<>@]*$/,P3=Z().min(1).max(256).regex(q3,"css value contains a disallowed character").refine(e=>!e.includes("/*"),"css value may not contain a comment");fe({mode:ut(["light","dark"]),cssVariables:xt(Z().regex(H3,"css var key must be --ggui-*"),P3).refine(e=>Object.keys(e).length<=200,"too many css variables (max 200)"),name:Z().min(1).max(64).optional()}).strict();fe({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:xt(Z(),mt).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:Ft().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();fe({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:it().min(0).max(1).optional().describe("Advanced generator's iterative-loop validator score (0-1). Absent for default-generator output."),source:M1.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();fe({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:xt(Z(),mt).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:Ft().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();fe({blueprintId:Z().min(1),codeHash:Z().min(1).describe("Content hash of the persisted code body (full sha256 hex)."),source:O1.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();fe({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:zt(Z().min(1)).optional().describe("Semantic-search tokens. When set, dispatches through `BlueprintSearch.search()` rather than indexed `list()`.")}).strict();fe({blueprints:zt(t3)}).strict();fe({blueprintId:Z().min(1),isOperatorDefault:Oe(!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:Oc.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();fe({blueprintId:Z().min(1),updatedAt:Z().min(1)}).strict();fe({blueprintId:Z().min(1)}).strict();fe({deleted:Oe(!0)}).strict();function Z3(e){return"schemaVersion"in e?e.schemaVersion:qx}function G3(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=Z3(e);return o!==void 0&&(n.schemaVersion=o),n}var Ts={exports:{}},hf={},hn={},qr={},yf={},vf={},$f={},ay;function wc(){return ay||(ay=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})($f)),$f}var bf={},ny;function ry(){return ny||(ny=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})(bf)),bf}var iy;function Ae(){return iy||(iy=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=ry();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=ry();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,D){return this}}class d extends u{constructor(O,D,X){super(),this.varKind=O,this.name=D,this.rhs=X}render({es5:O,_n:D}){const X=O?o.varKinds.var:this.varKind,pe=this.rhs===void 0?"":` = ${this.rhs}`;return`${X} ${this.name}${pe};`+D}optimizeNames(O,D){if(O[this.name.str])return this.rhs&&(this.rhs=ie(this.rhs,O,D)),this}get names(){return this.rhs instanceof n._CodeOrName?this.rhs.names:{}}}class p extends u{constructor(O,D,X){super(),this.lhs=O,this.rhs=D,this.sideEffects=X}render({_n:O}){return`${this.lhs} = ${this.rhs};`+O}optimizeNames(O,D){if(!(this.lhs instanceof n.Name&&!O[this.lhs.str]&&!this.sideEffects))return this.rhs=ie(this.rhs,O,D),this}get names(){const O=this.lhs instanceof n.Name?{}:{...this.lhs.names};return F(O,this.rhs)}}class g extends p{constructor(O,D,X,pe){super(O,X,pe),this.op=D}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,D){return this.code=ie(this.code,O,D),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((D,X)=>D+X.render(O),"")}optimizeNodes(){const{nodes:O}=this;let D=O.length;for(;D--;){const X=O[D].optimizeNodes();Array.isArray(X)?O.splice(D,1,...X):X?O[D]=X:O.splice(D,1)}return O.length>0?this:void 0}optimizeNames(O,D){const{nodes:X}=this;let pe=X.length;for(;pe--;){const he=X[pe];he.optimizeNames(O,D)||(_e(O,he.names),X.splice(pe,1))}return X.length>0?this:void 0}get names(){return this.nodes.reduce((O,D)=>Y(O,D.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,D){super(D),this.condition=O}render(O){let D=`if(${this.condition})`+super.render(O);return this.else&&(D+="else "+this.else.render(O)),D}optimizeNodes(){super.optimizeNodes();const O=this.condition;if(O===!0)return this.nodes;let D=this.else;if(D){const X=D.optimizeNodes();D=this.else=Array.isArray(X)?new z(X):X}if(D)return O===!1?D instanceof w?D:D.nodes:this.nodes.length?this:new w(ae(O),D instanceof w?[D]:D.nodes);if(!(O===!1||!this.nodes.length))return this}optimizeNames(O,D){var X;if(this.else=(X=this.else)===null||X===void 0?void 0:X.optimizeNames(O,D),!!(super.optimizeNames(O,D)||this.else))return this.condition=ie(this.condition,O,D),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,D){if(super.optimizeNames(O,D))return this.iteration=ie(this.iteration,O,D),this}get names(){return Y(super.names,this.iteration.names)}}class R extends ${constructor(O,D,X,pe){super(),this.varKind=O,this.name=D,this.from=X,this.to=pe}render(O){const D=O.es5?o.varKinds.var:this.varKind,{name:X,from:pe,to:he}=this;return`for(${D} ${X}=${pe}; ${X}<${he}; ${X}++)`+super.render(O)}get names(){const O=F(super.names,this.from);return F(O,this.to)}}class _ extends ${constructor(O,D,X,pe){super(),this.loop=O,this.varKind=D,this.name=X,this.iterable=pe}render(O){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(O)}optimizeNames(O,D){if(super.optimizeNames(O,D))return this.iterable=ie(this.iterable,O,D),this}get names(){return Y(super.names,this.iterable.names)}}class S extends x{constructor(O,D,X){super(),this.name=O,this.args=D,this.async=X}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 I extends x{render(O){let D="try"+super.render(O);return this.catch&&(D+=this.catch.render(O)),this.finally&&(D+=this.finally.render(O)),D}optimizeNodes(){var O,D;return super.optimizeNodes(),(O=this.catch)===null||O===void 0||O.optimizeNodes(),(D=this.finally)===null||D===void 0||D.optimizeNodes(),this}optimizeNames(O,D){var X,pe;return super.optimizeNames(O,D),(X=this.catch)===null||X===void 0||X.optimizeNames(O,D),(pe=this.finally)===null||pe===void 0||pe.optimizeNames(O,D),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,D={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...D,_n:D.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,D){const X=this._extScope.value(O,D);return(this._values[X.prefix]||(this._values[X.prefix]=new Set)).add(X),X}getScopeValue(O,D){return this._extScope.getValue(O,D)}scopeRefs(O){return this._extScope.scopeRefs(O,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(O,D,X,pe){const he=this._scope.toName(D);return X!==void 0&&pe&&(this._constants[he.str]=X),this._leafNode(new d(O,he,X)),he}const(O,D,X){return this._def(o.varKinds.const,O,D,X)}let(O,D,X){return this._def(o.varKinds.let,O,D,X)}var(O,D,X){return this._def(o.varKinds.var,O,D,X)}assign(O,D,X){return this._leafNode(new p(O,D,X))}add(O,D){return this._leafNode(new g(O,e.operators.ADD,D))}code(O){return typeof O=="function"?O():O!==n.nil&&this._leafNode(new j(O)),this}object(...O){const D=["{"];for(const[X,pe]of O)D.length>1&&D.push(","),D.push(X),(X!==pe||this.opts.es5)&&(D.push(":"),(0,n.addCodeArg)(D,pe));return D.push("}"),new n._Code(D)}if(O,D,X){if(this._blockNode(new w(O)),D&&X)this.code(D).else().code(X).endIf();else if(D)this.code(D).endIf();else if(X)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,D){return this._blockNode(O),D&&this.code(D).endFor(),this}for(O,D){return this._for(new N(O),D)}forRange(O,D,X,pe,he=this.opts.es5?o.varKinds.var:o.varKinds.let){const Se=this._scope.toName(O);return this._for(new R(he,Se,D,X),()=>pe(Se))}forOf(O,D,X,pe=o.varKinds.const){const he=this._scope.toName(O);if(this.opts.es5){const Se=D instanceof n.Name?D:this.var("_arr",D);return this.forRange("_i",0,(0,n._)`${Se}.length`,Te=>{this.var(he,(0,n._)`${Se}[${Te}]`),X(he)})}return this._for(new _("of",pe,he,D),()=>X(he))}forIn(O,D,X,pe=this.opts.es5?o.varKinds.var:o.varKinds.const){if(this.opts.ownProperties)return this.forOf(O,(0,n._)`Object.keys(${D})`,X);const he=this._scope.toName(O);return this._for(new _("in",pe,he,D),()=>X(he))}endFor(){return this._endBlockNode($)}label(O){return this._leafNode(new h(O))}break(O){return this._leafNode(new y(O))}return(O){const D=new C;if(this._blockNode(D),this.code(O),D.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(C)}try(O,D,X){if(!D&&!X)throw new Error('CodeGen: "try" without "catch" and "finally"');const pe=new I;if(this._blockNode(pe),this.code(O),D){const he=this.name("e");this._currNode=pe.catch=new te(he),D(he)}return X&&(this._currNode=pe.finally=new G,this.code(X)),this._endBlockNode(te,G)}throw(O){return this._leafNode(new v(O))}block(O,D){return this._blockStarts.push(this._nodes.length),O&&this.code(O).endBlock(D),this}endBlock(O){const D=this._blockStarts.pop();if(D===void 0)throw new Error("CodeGen: not in self-balancing block");const X=this._nodes.length-D;if(X<0||O!==void 0&&X!==O)throw new Error(`CodeGen: wrong number of nodes: ${X} vs ${O} expected`);return this._nodes.length=D,this}func(O,D=n.nil,X,pe){return this._blockNode(new S(O,D,X)),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,D){const X=this._currNode;if(X instanceof O||D&&X instanceof D)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${D?`${O.kind}/${D.kind}`:O.kind}"`)}_elseNode(O){const D=this._currNode;if(!(D instanceof w))throw new Error('CodeGen: "else" without "if"');return this._currNode=D.else=O,this}get _root(){return this._nodes[0]}get _currNode(){const O=this._nodes;return O[O.length-1]}set _currNode(O){const D=this._nodes;D[D.length-1]=O}}e.CodeGen=H;function Y(L,O){for(const D in O)L[D]=(L[D]||0)+(O[D]||0);return L}function F(L,O){return O instanceof n._CodeOrName?Y(L,O.names):L}function ie(L,O,D){if(L instanceof n.Name)return X(L);if(!pe(L))return L;return new n._Code(L._items.reduce((he,Se)=>(Se instanceof n.Name&&(Se=X(Se)),Se instanceof n._Code?he.push(...Se._items):he.push(Se),he),[]));function X(he){const Se=D[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&&D[Se.str]!==void 0)}}function _e(L,O){for(const D in O)L[D]=(L[D]||0)-(O[D]||0)}function ae(L){return typeof L=="boolean"||typeof L=="number"||L===null?!L:(0,n._)`!${V(L)}`}e.not=ae;const de=T(e.operators.AND);function ge(...L){return L.reduce(de)}e.and=ge;const ke=T(e.operators.OR);function re(...L){return L.reduce(ke)}e.or=re;function T(L){return(O,D)=>O===n.nil?D:D===n.nil?O:(0,n._)`${V(O)} ${L} ${V(D)}`}function V(L){return L instanceof n.Name?L:(0,n._)`(${L})`}})(vf)),vf}var Re={},oy;function qe(){if(oy)return Re;oy=1,Object.defineProperty(Re,"__esModule",{value:!0}),Re.checkStrictMode=Re.getErrorPath=Re.Type=Re.useFunc=Re.setEvaluated=Re.evaluatedPropsToName=Re.mergeEvaluated=Re.eachItem=Re.unescapeJsonPointer=Re.escapeJsonPointer=Re.escapeFragment=Re.unescapeFragment=Re.schemaRefOrVal=Re.schemaHasRulesButRef=Re.schemaHasRules=Re.checkUnknownRules=Re.alwaysValidSchema=Re.toHash=void 0;const e=Ae(),n=wc();function o(_){const S={};for(const C of _)S[C]=!0;return S}Re.toHash=o;function l(_,S){return typeof S=="boolean"?S:Object.keys(S).length===0?!0:(c(_,S),!u(S,_.self.RULES.all))}Re.alwaysValidSchema=l;function c(_,S=_.schema){const{opts:C,self:I}=_;if(!C.strictSchema||typeof S=="boolean")return;const te=I.RULES.keywords;for(const G in S)te[G]||R(_,`unknown keyword: "${G}"`)}Re.checkUnknownRules=c;function u(_,S){if(typeof _=="boolean")return!_;for(const C in _)if(S[C])return!0;return!1}Re.schemaHasRules=u;function d(_,S){if(typeof _=="boolean")return!_;for(const C in _)if(C!=="$ref"&&S.all[C])return!0;return!1}Re.schemaHasRulesButRef=d;function p({topSchemaRef:_,schemaPath:S},C,I,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)(I)}`}Re.schemaRefOrVal=p;function g(_){return v(decodeURIComponent(_))}Re.unescapeFragment=g;function h(_){return encodeURIComponent(y(_))}Re.escapeFragment=h;function y(_){return typeof _=="number"?`${_}`:_.replace(/~/g,"~0").replace(/\//g,"~1")}Re.escapeJsonPointer=y;function v(_){return _.replace(/~1/g,"/").replace(/~0/g,"~")}Re.unescapeJsonPointer=v;function j(_,S){if(Array.isArray(_))for(const C of _)S(C);else S(_)}Re.eachItem=j;function k({mergeNames:_,mergeToName:S,mergeValues:C,resultToName:I}){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)?I(te,F):F}}Re.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}Re.evaluatedPropsToName=x;function E(_,S,C){Object.keys(C).forEach(I=>_.assign((0,e._)`${S}${(0,e.getProperty)(I)}`,!0))}Re.setEvaluated=E;const z={};function w(_,S){return _.scopeValue("func",{ref:S,code:z[S.code]||(z[S.code]=new n._Code(S.code))})}Re.useFunc=w;var $;(function(_){_[_.Num=0]="Num",_[_.Str=1]="Str"})($||(Re.Type=$={}));function N(_,S,C){if(_ instanceof e.Name){const I=S===$.Num;return C?I?(0,e._)`"[" + ${_} + "]"`:(0,e._)`"['" + ${_} + "']"`:I?(0,e._)`"/" + ${_}`:(0,e._)`"/" + ${_}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return C?(0,e.getProperty)(_).toString():"/"+y(_)}Re.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 Re.checkStrictMode=R,Re}var Ms={},ly;function jr(){if(ly)return Ms;ly=1,Object.defineProperty(Ms,"__esModule",{value:!0});const e=Ae(),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 sy;function Rc(){return sy||(sy=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=Ae(),o=qe(),l=jr();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,I=v(z,w,$);N??(S||C)?g(_,I):h(R,(0,n._)`[${I}]`)}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:I,propertyName:te,topSchemaRef:G,schemaPath:H}=C;N.push([y.keyword,R],[y.params,typeof w=="function"?w(z):w||(0,n._)`{}`]),I.messages&&N.push([y.message,typeof $=="function"?$(z):$]),I.verbose&&N.push([y.schema,S],[y.parentSchema,(0,n._)`${G}${H}`],[l.default.data,_]),te&&N.push([y.propertyName,te])}})(yf)),yf}var cy;function F3(){if(cy)return qr;cy=1,Object.defineProperty(qr,"__esModule",{value:!0}),qr.boolOrEmptySchema=qr.topBoolOrEmptySchema=void 0;const e=Rc(),n=Ae(),o=jr(),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))}qr.topBoolOrEmptySchema=c;function u(p,g){const{gen:h,schema:y}=p;y===!1?(h.var(g,!1),d(p)):h.var(g,!0)}qr.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 qr}var Ht={},Pr={},uy;function D1(){if(uy)return Pr;uy=1,Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.getRules=Pr.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)}Pr.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 Pr.getRules=l,Pr}var yn={},dy;function I1(){if(dy)return yn;dy=1,Object.defineProperty(yn,"__esModule",{value:!0}),yn.shouldUseRule=yn.shouldUseGroup=yn.schemaHasRulesForType=void 0;function e({schema:l,self:c},u){const d=c.RULES.types[u];return d&&d!==!0&&n(l,d)}yn.schemaHasRulesForType=e;function n(l,c){return c.rules.some(u=>o(l,u))}yn.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 yn.shouldUseRule=o,yn}var fy;function kc(){if(fy)return Ht;fy=1,Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.reportTypeError=Ht.checkDataTypes=Ht.checkDataType=Ht.coerceAndCheckDataType=Ht.getJSONTypes=Ht.getSchemaTypes=Ht.DataType=void 0;const e=D1(),n=I1(),o=Rc(),l=Ae(),c=qe();var u;(function($){$[$.Correct=0]="Correct",$[$.Wrong=1]="Wrong"})(u||(Ht.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}Ht.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(","))}Ht.getJSONTypes=p;function g($,N){const{gen:R,data:_,opts:S}=$,C=y(N,S.coerceTypes),I=N.length>0&&!(C.length===0&&N.length===1&&(0,n.schemaHasRulesForType)($,N[0]));if(I){const te=x(N,_,S.strictNumbers,u.Wrong);R.if(te,()=>{C.length?v($,N,C):z($)})}return I}Ht.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}=$,I=_.let("dataType",(0,l._)`typeof ${S}`),te=_.let("coerced",(0,l._)`undefined`);C.coerceTypes==="array"&&_.if((0,l._)`${I} == 'object' && Array.isArray(${S}) && ${S}.length == 1`,()=>_.assign(S,(0,l._)`${S}[0]`).assign(I,(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._)`${I} == "number" || ${I} == "boolean"`).assign(te,(0,l._)`"" + ${S}`).elseIf((0,l._)`${S} === null`).assign(te,(0,l._)`""`);return;case"number":_.elseIf((0,l._)`${I} == "boolean" || ${S} === null
|
|
114
|
+
|| (${I} == "string" && ${S} && ${S} == +${S})`).assign(te,(0,l._)`+${S}`);return;case"integer":_.elseIf((0,l._)`${I} === "boolean" || ${S} === null
|
|
115
|
+
|| (${I} === "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._)`${I} === "string" || ${I} === "number"
|
|
116
|
+
|| ${I} === "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=I((0,l._)`!(${N} % 1) && !isNaN(${N})`);break;case"number":C=I();break;default:return(0,l._)`typeof ${N} ${S} ${$}`}return _===u.Correct?C:(0,l.not)(C);function I(te=l.nil){return(0,l.and)((0,l._)`typeof ${N} == "number"`,te,R?(0,l._)`isFinite(${N})`:l.nil)}}Ht.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 I=(0,l._)`typeof ${N} != "object"`;S=C.null?I:(0,l._)`!${N} || ${I}`,delete C.null,delete C.array,delete C.object}else S=l.nil;C.number&&delete C.integer;for(const I in C)S=(0,l.and)(S,k(I,N,R,_));return S}Ht.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)}Ht.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 Ht}var Go={},py;function Y3(){if(py)return Go;py=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.assignDefaults=void 0;const e=Ae(),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))}Go.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 Go}var La={},Ke={},gy;function Va(){if(gy)return Ke;gy=1,Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.validateUnion=Ke.validateArray=Ke.usePattern=Ke.callValidateCode=Ke.schemaProperties=Ke.allSchemaProperties=Ke.noPropertyInData=Ke.propertyInData=Ke.isOwnProperty=Ke.hasPropFunc=Ke.reportMissingProp=Ke.checkMissingProp=Ke.checkReportMissingProp=void 0;const e=Ae(),n=qe(),o=jr(),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()})}Ke.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}`)))}Ke.checkMissingProp=u;function d($,N){$.setParams({missingProperty:N},!0),$.error()}Ke.reportMissingProp=d;function p($){return $.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}Ke.hasPropFunc=p;function g($,N,R){return(0,e._)`${p($)}.call(${N}, ${R})`}Ke.isOwnProperty=g;function h($,N,R,_){const S=(0,e._)`${N}${(0,e.getProperty)(R)} !== undefined`;return _?(0,e._)`${S} && ${g($,N,R)}`:S}Ke.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}Ke.noPropertyInData=y;function v($){return $?Object.keys($).filter(N=>N!=="__proto__"):[]}Ke.allSchemaProperties=v;function j($,N){return v(N).filter(R=>!(0,n.alwaysValidSchema)($,N[R]))}Ke.schemaProperties=j;function k({schemaCode:$,data:N,it:{gen:R,topSchemaRef:_,schemaPath:S,errorPath:C},it:I},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,I.parentData],[o.default.parentDataProperty,I.parentDataProperty],[o.default.rootData,o.default.rootData]];I.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})`}Ke.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}, ${_})`})}Ke.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 I(()=>N.assign(te,!1)),te}return N.var(C,!0),I(()=>N.break()),C;function I(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)})}}Ke.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 I=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(I,(0,e._)`${I} || ${te}`),$.mergeValidEvaluated(Y,te)||N.if((0,e.not)(I))})),$.result(I,()=>$.reset(),()=>$.error(!0))}return Ke.validateUnion=w,Ke}var my;function K3(){if(my)return La;my=1,Object.defineProperty(La,"__esModule",{value:!0}),La.validateKeywordUsage=La.validSchemaType=La.funcKeywordCode=La.macroKeywordCode=void 0;const e=Ae(),n=jr(),o=Va(),l=Rc();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))}La.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,I),j.ok((x=k.valid)!==null&&x!==void 0?x:C);function I(){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)}}La.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")}La.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 La.validateKeywordUsage=v,La}var vn={},hy;function X3(){if(hy)return vn;hy=1,Object.defineProperty(vn,"__esModule",{value:!0}),vn.extendSubschemaMode=vn.extendSubschemaData=vn.getSubschema=void 0;const e=Ae(),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')}vn.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]}}vn.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 vn.extendSubschemaMode=c,vn}var Kt={},xf,yy;function U1(){return yy||(yy=1,xf=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}),xf}var _f={exports:{}},vy;function J3(){if(vy)return _f.exports;vy=1;var e=_f.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 _f.exports}var $y;function Ac(){if($y)return Kt;$y=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=U1(),o=J3(),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])),de.call(this,G.$anchor),de.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"?I(G,re.schema,ge):ge!==v(ie)&&(ge[0]==="#"?(I(G,S[ge],ge),S[ge]=G):this.refs[ge]=ie),ge}function de(ge){if(typeof ge=="string"){if(!k.test(ge))throw new Error(`invalid anchor "${ge}"`);ae.call(this,`#${ge}`)}}}),S;function I(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 by;function Dc(){if(by)return hn;by=1,Object.defineProperty(hn,"__esModule",{value:!0}),hn.getData=hn.KeywordCxt=hn.validateFunctionCode=void 0;const e=F3(),n=kc(),o=I1(),l=kc(),c=Y3(),u=K3(),d=X3(),p=Ae(),g=jr(),h=Ac(),y=qe(),v=Rc();function j(P){if(_(P)&&(C(P),R(P))){z(P);return}k(P,()=>(0,e.topBoolOrEmptySchema)(P))}hn.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),I(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);I(P,ze),me.var(W,(0,p._)`${ze} === ${g.default.errors}`)}function C(P){(0,y.checkUnknownRules)(P),te(P)}function I(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 Et=(0,p.str)`${me}/$comment`,Wt=P.scopeValue("root",{ref:W.root});P.code((0,p._)`${g.default.self}.opts.$comment(${ze}, ${Et}, ${Wt}.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:Et,allErrors:Wt,opts:Tt,self:Mt}=P,{RULES:ht}=Mt;if(ze.$ref&&(Tt.ignoreKeywordsWithRef||!(0,y.schemaHasRulesButRef)(ze,ht))){ve.block(()=>pe(P,"$ref",ht.all.$ref.definition));return}Tt.jtd||ge(P,W),ve.block(()=>{for(const ea of ht.rules)Sn(ea);Sn(ht.post)});function Sn(ea){(0,o.shouldUseGroup)(ze,ea)&&(ea.type?(ve.if((0,l.checkDataType)(ea.type,Et,Tt.strictNumbers)),de(P,ea),W.length===1&&W[0]===ea.type&&ue&&(ve.else(),(0,l.reportTypeError)(P)),ve.endIf()):de(P,ea),Wt||ve.if((0,p._)`${g.default.errors} === ${me||0}`))}}function de(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)||D(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"))&&D(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(Et=>V(W,Et))&&D(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 D(P,W){const ue=P.schemaEnv.baseId+P.errSchemaPath;W+=` at "${ue}" (strictTypes)`,(0,y.checkStrictMode)(P,W,P.opts.strictTypes)}class X{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:Et}=this;me.if((0,p.or)((0,p._)`${ve} === undefined`,ue)),W!==p.nil&&me.assign(W,!0),(ze.length||Et.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)(Et(),Wt());function Et(){if(me.length){if(!(ue instanceof p.Name))throw new Error("ajv implementation error");const Tt=Array.isArray(me)?me:[me];return(0,p._)`${(0,l.checkDataTypes)(Tt,ue,ze.opts.strictNumbers,l.DataType.Wrong)}`}return p.nil}function Wt(){if(ve.validateSchema){const Tt=W.scopeValue("validate$data",{ref:ve.validateSchema});return(0,p._)`!${Tt}(${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}}hn.KeywordCxt=X;function pe(P,W,ue,me){const ve=new X(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 Mt=Se.exec(P);if(!Mt)throw new Error(`Invalid JSON-pointer: ${P}`);const ht=+Mt[1];if(ve=Mt[2],ve==="#"){if(ht>=W)throw new Error(Tt("property/index",ht));return me[W-ht]}if(ht>W)throw new Error(Tt("data",ht));if(ze=ue[W-ht],!ve)return ze}let Et=ze;const Wt=ve.split("/");for(const Mt of Wt)Mt&&(ze=(0,p._)`${ze}${(0,p.getProperty)((0,y.unescapeJsonPointer)(Mt))}`,Et=(0,p._)`${Et} && ${ze}`);return Et;function Tt(Mt,ht){return`Cannot access ${Mt} ${ht} levels up, current level is ${W}`}}return hn.getData=Te,hn}var Os={},xy;function rp(){if(xy)return Os;xy=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={},_y;function Ic(){if(_y)return Rs;_y=1,Object.defineProperty(Rs,"__esModule",{value:!0});const e=Ac();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 xa={},jy;function ip(){if(jy)return xa;jy=1,Object.defineProperty(xa,"__esModule",{value:!0}),xa.resolveSchema=xa.getCompilingSchema=xa.resolveRef=xa.compileSchema=xa.SchemaEnv=void 0;const e=Ae(),n=rp(),o=jr(),l=Ac(),c=qe(),u=Dc();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={}}}xa.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 I=S.scopeName("validate");z.validateName=I;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:I,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(I,{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:I,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)}}xa.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,_)}xa.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}xa.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:I}=this.opts,te=C[I];return te&&(R=(0,l.resolveUrl)(this.opts.uriResolver,R,te)),new d({schema:C,schemaId:I,root:z,baseId:R})}return E.call(this,$,S)}}xa.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 I=$[(0,c.unescapeFragment)(C)];if(I===void 0)return;$=I;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 xa}const Q3="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",W3="Meta-schema for $data reference (JSON AnySchema extension proposal)",e6="object",t6=["$data"],a6={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},n6=!1,r6={$id:Q3,description:W3,type:e6,required:t6,properties:a6,additionalProperties:n6};var As={},Fo={exports:{}},jf,Sy;function L1(){if(Sy)return jf;Sy=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,I=0;for(I=0;I<_.length;I++)if(C=_[I].charCodeAt(0),C!==48){if(!(C>=48&&C<=57||C>=65&&C<=70||C>=97&&C<=102))return"";S+=_[I];break}for(I+=1;I<_.length;I++){if(C=_[I].charCodeAt(0),!(C>=48&&C<=57||C>=65&&C<=70||C>=97&&C<=102))return"";S+=_[I]}return S}const d=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function p(_){return _.length=0,!0}function g(_,S,C){if(_.length){const I=u(_);if(I!=="")S.push(I);else return C.error=!0,!1;_.length=0}return!0}function h(_){let S=0;const C={error:!1,address:"",zone:""},I=[],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,I,C))break;if(++S>7){C.error=!0;break}F>0&&_[F-1]===":"&&(G=!0),I.push(":");continue}else if(ie==="%"){if(!Y(te,I,C))break;Y=p}else{te.push(ie);continue}}return te.length&&(Y===p?C.zone=te.join(""):H?I.push(te.join("")):I.push(u(te))),C.address=I.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,I=S.address;return S.zone&&(C+="%"+S.zone,I+="%25"+S.zone),{host:C,isIPV6:!0,escapedHost:I}}}function v(_,S){let C=0;for(let I=0;I<_.length;I++)_[I]===S&&C++;return C}function j(_){let S=_;const C=[];let I=-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((I=S.indexOf("/",1))===-1){C.push(S);break}else C.push(S.slice(0,I)),S=S.slice(I)}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,I=>k[I])}function w(_,S=!1){if(_.indexOf("%")===-1)return _;let C="";for(let I=0;I<_.length;I++){if(_[I]==="%"&&I+2<_.length){const te=_.slice(I+1,I+3);if(o(te)){const G=te.toUpperCase(),H=String.fromCharCode(parseInt(G,16));S&&l(H)?C+=H:C+="%"+G,I+=2;continue}}C+=_[I]}return C}function $(_){let S="";for(let C=0;C<_.length;C++){if(_[C]==="%"&&C+2<_.length){const I=_.slice(C+1,C+3);if(o(I)){const te=I.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 I=_.slice(C+1,C+3);if(o(I)){S+="%"+I.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 I=y(C);I.isIPV6===!0?C=`[${I.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 jf={nonSimpleDomain:d,recomposeAuthority:R,reescapeHostDelimiters:z,normalizePercentEncoding:w,normalizePathEncoding:$,escapePreservingEscapes:N,removeDotSegments:j,isIPv4:n,isUUID:e,normalizeIPv6:y,stringArrayToHexStripped:u},jf}var Sf,wy;function i6(){if(wy)return Sf;wy=1;const{isUUID:e}=L1(),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 I=S.scheme||_.scheme||"urn";_.nid=C[1].toLowerCase(),_.nss=C[2];const te=`${I}:${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",I=_.nid.toLowerCase(),te=`${C}:${S.nid||I}`,G=R(te);G&&(_=G.serialize(_,S));const H=_,Y=_.nss;return H.path=`${I||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 Sf={wsIsSecure:c,SCHEMES:N,isValidSchemeName:l,getSchemeHandler:R},Sf}var ky;function o6(){if(ky)return Fo.exports;ky=1;const{normalizeIPv6:e,removeDotSegments:n,recomposeAuthority:o,normalizePercentEncoding:l,normalizePathEncoding:c,escapePreservingEscapes:u,reescapeHostDelimiters:d,isIPv4:p,nonSimpleDomain:g}=L1(),{SCHEMES:h,getSchemeHandler:y}=i6();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:de}=R(H,F);if(_e||de)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=I(G,Y),ie=I(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 de=Y.path;!F.absolutePath&&(!_e||!_e.absolutePath)&&(de=n(de)),ae===void 0&&de[0]==="/"&&de[1]==="/"&&(de="/%2F"+de.slice(2)),ie.push(de)}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 de=G.match($);if(de!==null){const ke=de[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 I(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 Fo.exports=te,Fo.exports.default=te,Fo.exports.fastUri=te,Fo.exports}var Ny;function l6(){if(Ny)return As;Ny=1,Object.defineProperty(As,"__esModule",{value:!0});const e=o6();return e.code='require("ajv/dist/runtime/uri").default',As.default=e,As}var zy;function s6(){return zy||(zy=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=Dc();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return n.KeywordCxt}});var o=Ae();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=rp(),c=Ic(),u=D1(),d=ip(),p=Ae(),g=Ac(),h=kc(),y=qe(),v=r6,j=l6(),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,D,X,pe,he,Se,Te,P,W,ue,me,ve,ze,Et,Wt,Tt,Mt,ht,Sn,ea,At,Xi;const wn=re.strict,Jr=(T=re.code)===null||T===void 0?void 0:T.optimize,Sr=Jr===!0||Jr===void 0?1:Jr||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:(X=(D=re.strictSchema)!==null&&D!==void 0?D:wn)!==null&&X!==void 0?X:!0,strictNumbers:(he=(pe=re.strictNumbers)!==null&&pe!==void 0?pe:wn)!==null&&he!==void 0?he:!0,strictTypes:(Te=(Se=re.strictTypes)!==null&&Se!==void 0?Se:wn)!==null&&Te!==void 0?Te:"log",strictTuples:(W=(P=re.strictTuples)!==null&&P!==void 0?P:wn)!==null&&W!==void 0?W:"log",strictRequired:(me=(ue=re.strictRequired)!==null&&ue!==void 0?ue:wn)!==null&&me!==void 0?me:!1,code:re.code?{...re.code,optimize:Sr,regExp:sl}:{optimize:Sr,regExp:sl},loopRequired:(ve=re.loopRequired)!==null&&ve!==void 0?ve:$,loopEnum:(ze=re.loopEnum)!==null&&ze!==void 0?ze:$,meta:(Et=re.meta)!==null&&Et!==void 0?Et:!0,messages:(Wt=re.messages)!==null&&Wt!==void 0?Wt:!0,inlineRefs:(Tt=re.inlineRefs)!==null&&Tt!==void 0?Tt:!0,schemaId:(Mt=re.schemaId)!==null&&Mt!==void 0?Mt:"$id",addUsedSchema:(ht=re.addUsedSchema)!==null&&ht!==void 0?ht:!0,validateSchema:(Sn=re.validateSchema)!==null&&Sn!==void 0?Sn:!0,validateFormats:(ea=re.validateFormats)!==null&&ea!==void 0?ea:!0,unicodeRegExp:(At=re.unicodeRegExp)!==null&&At!==void 0?At:!0,int32range:(Xi=re.int32range)!==null&&Xi!==void 0?Xi:!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&&I.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 D.call(this,Te.$schema);const W=this._addSchema(Te,P);return W.validate||X.call(this,W)}async function D(Te){Te&&!this.getSchema(Te)&&await O.call(this,{$ref:Te},!0)}async function X(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),X.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 D.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 X of T)this.addSchema(X,void 0,L,O);return this}let D;if(typeof T=="object"){const{schemaId:X}=this.opts;if(D=T[X],D!==void 0&&typeof D!="string")throw new Error(`schema ${X} must be string`)}return V=(0,g.normalizeId)(V||D),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 D="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(D);else throw new Error(D)}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,D=>_e.call(this,D)),this;de.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?D=>_e.call(this,D,O):D=>O.type.forEach(X=>_e.call(this,D,O,X))),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(D=>D.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,D)=>O+V+D)}$dataMetaSchema(T,V){const L=this.RULES.all;T=JSON.parse(JSON.stringify(T));for(const O of V){const D=O.split("/").slice(1);let X=T;for(const pe of D)X=X[pe];for(const pe in L){const he=L[pe];if(typeof he!="object")continue;const{$data:Se}=he.definition,Te=X[pe];Se&&Te&&(X[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,D=this.opts.addUsedSchema){let X;const{schemaId:pe}=this.opts;if(typeof T=="object")X=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)(X||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),D&&!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 D=O;D in T&&this.logger[L](`${V}: option ${O}. ${re[D]}`)}}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 I(){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:D}=this;let X=O?D.post:D.rules.find(({type:he})=>he===V);if(X||(X={type:V,rules:[]},D.rules.push(X)),D.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,X,pe,T.before):X.rules.push(pe),D.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 de(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]}}})(hf)),hf}var Ds={},Is={},Us={},Ey;function c6(){if(Ey)return Us;Ey=1,Object.defineProperty(Us,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return Us.default=e,Us}var Jn={},Cy;function u6(){if(Cy)return Jn;Cy=1,Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.callRef=Jn.getValidate=void 0;const e=Ic(),n=Va(),o=Ae(),l=jr(),c=ip(),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 I=p(h,C);g(h,I,C,C.$async)}function S(C){const I=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:I,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`}Jn.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)},I=>{k.if((0,o._)`!(${I} instanceof ${x.ValidationError})`,()=>k.throw(I)),_(I),E||k.assign(C,!1)}),h.ok(C)}function R(){h.result((0,n.callValidateCode)(h,y,$),()=>S(y),()=>_(y))}function _(C){const I=(0,o._)`${C}.errors`;k.assign(l.default.vErrors,(0,o._)`${l.default.vErrors} === null ? ${I} : ${l.default.vErrors}.concat(${I})`),k.assign(l.default.errors,(0,o._)`${l.default.vErrors}.length`)}function S(C){var I;if(!x.opts.unevaluated)return;const te=(I=v==null?void 0:v.validate)===null||I===void 0?void 0:I.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 Jn.callRef=g,Jn.default=d,Jn}var Ty;function d6(){if(Ty)return Is;Ty=1,Object.defineProperty(Is,"__esModule",{value:!0});const e=c6(),n=u6(),o=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,n.default];return Is.default=o,Is}var Ls={},Vs={},My;function f6(){if(My)return Vs;My=1,Object.defineProperty(Vs,"__esModule",{value:!0});const e=Ae(),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={},Oy;function p6(){if(Oy)return Bs;Oy=1,Object.defineProperty(Bs,"__esModule",{value:!0});const e=Ae(),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={},Ry;function V1(){if(Ry)return qs;Ry=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 Ay;function g6(){if(Ay)return Hs;Ay=1,Object.defineProperty(Hs,"__esModule",{value:!0});const e=Ae(),n=qe(),o=V1(),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={},Dy;function m6(){if(Dy)return Ps;Dy=1,Object.defineProperty(Ps,"__esModule",{value:!0});const e=Va(),n=qe(),o=Ae(),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={},Iy;function h6(){if(Iy)return Zs;Iy=1,Object.defineProperty(Zs,"__esModule",{value:!0});const e=Ae(),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 y6(){if(Uy)return Gs;Uy=1,Object.defineProperty(Gs,"__esModule",{value:!0});const e=Va(),n=Ae(),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={},Ly;function v6(){if(Ly)return Fs;Ly=1,Object.defineProperty(Fs,"__esModule",{value:!0});const e=Ae(),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={},Vy;function Uc(){if(Vy)return Ks;Vy=1,Object.defineProperty(Ks,"__esModule",{value:!0});const e=U1();return e.code='require("ajv/dist/runtime/equal").default',Ks.default=e,Ks}var By;function $6(){if(By)return Ys;By=1,Object.defineProperty(Ys,"__esModule",{value:!0});const e=kc(),n=Ae(),o=qe(),l=Uc(),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),I=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 ${I}[${S}] == "number"`,()=>{p.assign(_,(0,n._)`${I}[${S}]`),d.error(),p.assign(x,!1).break()}).code((0,n._)`${I}[${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 Xs={},Hy;function b6(){if(Hy)return Xs;Hy=1,Object.defineProperty(Xs,"__esModule",{value:!0});const e=Ae(),n=qe(),o=Uc(),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 Xs.default=c,Xs}var Js={},qy;function x6(){if(qy)return Js;qy=1,Object.defineProperty(Js,"__esModule",{value:!0});const e=Ae(),n=qe(),o=Uc(),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 Js.default=c,Js}var Py;function _6(){if(Py)return Ls;Py=1,Object.defineProperty(Ls,"__esModule",{value:!0});const e=f6(),n=p6(),o=g6(),l=m6(),c=h6(),u=y6(),d=v6(),p=$6(),g=b6(),h=x6(),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={},Ii={},Zy;function B1(){if(Zy)return Ii;Zy=1,Object.defineProperty(Ii,"__esModule",{value:!0}),Ii.validateAdditionalItems=void 0;const e=Ae(),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 Ii.validateAdditionalItems=c,Ii.default=l,Ii}var Ws={},Ui={},Gy;function H1(){if(Gy)return Ui;Gy=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.validateTuple=void 0;const e=Ae(),n=qe(),o=Va(),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 Ui.validateTuple=c,Ui.default=l,Ui}var Fy;function j6(){if(Fy)return Ws;Fy=1,Object.defineProperty(Ws,"__esModule",{value:!0});const e=H1(),n={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:o=>(0,e.validateTuple)(o,"items")};return Ws.default=n,Ws}var ec={},Yy;function S6(){if(Yy)return ec;Yy=1,Object.defineProperty(ec,"__esModule",{value:!0});const e=Ae(),n=qe(),o=Va(),l=B1(),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={},Ky;function w6(){if(Ky)return tc;Ky=1,Object.defineProperty(tc,"__esModule",{value:!0});const e=Ae(),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 wf={},Xy;function k6(){return Xy||(Xy=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const n=Ae(),o=qe(),l=Va();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})(wf)),wf}var ac={},Jy;function N6(){if(Jy)return ac;Jy=1,Object.defineProperty(ac,"__esModule",{value:!0});const e=Ae(),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={},Qy;function q1(){if(Qy)return nc;Qy=1,Object.defineProperty(nc,"__esModule",{value:!0});const e=Va(),n=Ae(),o=jr(),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 I=(0,l.schemaRefOrVal)(j,h.properties,"properties");C=(0,e.isOwnProperty)(p,I,S)}else E.length?C=(0,n.or)(...E.map(I=>(0,n._)`${S} === ${I}`)):C=n.nil;return z.length&&(C=(0,n.or)(C,...z.map(I=>(0,n._)`${(0,e.usePattern)(d,I)}.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,I){const te={keyword:"additionalProperties",dataProp:S,dataPropType:l.Type.Str};I===!1&&Object.assign(te,{compositeRule:!0,createErrors:!1,allErrors:!1}),d.subschema(te,C)}}};return nc.default=u,nc}var rc={},Wy;function z6(){if(Wy)return rc;Wy=1,Object.defineProperty(rc,"__esModule",{value:!0});const e=Dc(),n=Va(),o=qe(),l=q1(),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={},ev;function E6(){if(ev)return ic;ev=1,Object.defineProperty(ic,"__esModule",{value:!0});const e=Va(),n=Ae(),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={},tv;function C6(){if(tv)return oc;tv=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={},av;function T6(){if(av)return lc;av=1,Object.defineProperty(lc,"__esModule",{value:!0});const n={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Va().validateUnion,error:{message:"must match a schema in anyOf"}};return lc.default=n,lc}var sc={},nv;function M6(){if(nv)return sc;nv=1,Object.defineProperty(sc,"__esModule",{value:!0});const e=Ae(),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={},rv;function O6(){if(rv)return cc;rv=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={},iv;function R6(){if(iv)return uc;iv=1,Object.defineProperty(uc,"__esModule",{value:!0});const e=Ae(),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={},ov;function A6(){if(ov)return dc;ov=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 lv;function D6(){if(lv)return Qs;lv=1,Object.defineProperty(Qs,"__esModule",{value:!0});const e=B1(),n=j6(),o=H1(),l=S6(),c=w6(),u=k6(),d=N6(),p=q1(),g=z6(),h=E6(),y=C6(),v=T6(),j=M6(),k=O6(),x=R6(),E=A6();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={},sv;function I6(){if(sv)return pc;sv=1,Object.defineProperty(pc,"__esModule",{value:!0});const e=Ae(),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})`,I=(0,e._)`(typeof ${R} == "function" ? ${C} : ${R}.test(${d}))`;return(0,e._)`${R} && ${R} !== true && ${N} === ${c} && !${I}`}}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(I());return}throw new Error(I());function I(){return`unknown format "${g}" ignored in schema at path "${j}"`}}function S(I){const te=I instanceof RegExp?(0,e.regexpCode)(I):v.code.formats?(0,e._)`${v.code.formats}${(0,e.getProperty)(g)}`:void 0,G=u.scopeValue("formats",{key:g,ref:I,code:te});return typeof I=="object"&&!(I instanceof RegExp)?[I.type||"string",I.validate,(0,e._)`${G}.validate`]:["string",I,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 cv;function U6(){if(cv)return fc;cv=1,Object.defineProperty(fc,"__esModule",{value:!0});const n=[I6().default];return fc.default=n,fc}var Zr={},uv;function L6(){return uv||(uv=1,Object.defineProperty(Zr,"__esModule",{value:!0}),Zr.contentVocabulary=Zr.metadataVocabulary=void 0,Zr.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Zr.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Zr}var dv;function V6(){if(dv)return Ds;dv=1,Object.defineProperty(Ds,"__esModule",{value:!0});const e=d6(),n=_6(),o=D6(),l=U6(),c=L6(),u=[e.default,n.default,(0,o.default)(),l.default,c.metadataVocabulary,c.contentVocabulary];return Ds.default=u,Ds}var gc={},Yo={},fv;function B6(){if(fv)return Yo;fv=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.DiscrError=void 0;var e;return(function(n){n.Tag="tag",n.Mapping="mapping"})(e||(Yo.DiscrError=e={})),Yo}var pv;function H6(){if(pv)return gc;pv=1,Object.defineProperty(gc,"__esModule",{value:!0});const e=Ae(),n=B6(),o=ip(),l=Ic(),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=I(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||I(Y)),te(F,H)}if(!C)throw new Error(`discriminator: "${x}" must be required`);return _;function I({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 q6="http://json-schema.org/draft-07/schema#",P6="http://json-schema.org/draft-07/schema#",Z6="Core schema meta-schema",G6={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:[]}},F6=["object","boolean"],Y6={$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:"#"}},K6={$schema:q6,$id:P6,title:Z6,definitions:G6,type:F6,properties:Y6,default:!0};var gv;function P1(){return gv||(gv=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=s6(),l=V6(),c=H6(),u=K6,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=Dc();Object.defineProperty(n,"KeywordCxt",{enumerable:!0,get:function(){return h.KeywordCxt}});var y=Ae();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=rp();Object.defineProperty(n,"ValidationError",{enumerable:!0,get:function(){return v.default}});var j=Ic();Object.defineProperty(n,"MissingRefError",{enumerable:!0,get:function(){return j.default}})})(Ts,Ts.exports)),Ts.exports}var X6=P1();const Z1=al(X6);var mc={exports:{}},kf={},mv;function J6(){return mv||(mv=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:I},double:{type:"number",validate:I},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],de=+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&&de<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)&&de<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),de=d(F,_e);if(de!==void 0)return de||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 I(){return!0}const te=/[^\\]\\Z/;function G(H){if(te.test(H))return!1;try{return new RegExp(H),!0}catch{return!1}}})(kf)),kf}var Nf={},hv;function Q6(){return hv||(hv=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const n=P1(),o=Ae(),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})(Nf)),Nf}var yv;function W6(){return yv||(yv=1,(function(e,n){Object.defineProperty(n,"__esModule",{value:!0});const o=J6(),l=Q6(),c=Ae(),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 ew=W6();const G1=al(ew);var tw=Uc();const aw=al(tw);var nw=V1();const rw=al(nw);function F1(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")}F1(aw).toString();F1(rw).toString();const Y1={strict:!0,allErrors:!0,useDefaults:!1,coerceTypes:!1,removeAdditional:!1,verbose:!0},Gi=new Z1({...Y1});G1(Gi);Gi.getKeyword("example")||Gi.addKeyword({keyword:"example"});Gi.getKeyword("nullable")||Gi.addKeyword({keyword:"nullable"});const el=new Z1({...Y1,code:{source:!0,esm:!0}});G1(el);el.getKeyword("example")||el.addKeyword({keyword:"example"});el.getKeyword("nullable")||el.addKeyword({keyword:"nullable"});function tr(e){if(e.type==="object"||e.properties!==void 0){const o={...e};if(o.properties){const l={};for(const[c,u]of Object.entries(o.properties))l[c]=tr(u);o.properties=l}return o.additionalProperties===void 0?o.additionalProperties=!1:typeof o.additionalProperties!="boolean"&&(o.additionalProperties=tr(o.additionalProperties)),o.oneOf&&(o.oneOf=o.oneOf.map(tr)),o.anyOf&&(o.anyOf=o.anyOf.map(tr)),o}if(e.type==="array"&&e.items)return{...e,items:tr(e.items)};if(e.oneOf||e.anyOf){const o={...e};return o.oneOf&&(o.oneOf=o.oneOf.map(tr)),o.anyOf&&(o.anyOf=o.anyOf.map(tr)),o}return e}function op(e){const n=tr(e);return Gi.compile(n)}function lp(e,n){return e?e.map(o=>iw(o,n)):[]}function K1(e,n){return n?e.map(o=>({...o,field:o.field?`${n}.${o.field}`:n})):e}function iw(e,n){const o=ow(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=Ko(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:vv(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=vv(Ko(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=Ko(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=Ko(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=Ko(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 ow(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 Ko(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(Ff(l))l=l[c];else return}return l}function vv(e){return e===null?"null":Array.isArray(e)?"array":typeof e}const $v="_ggui:",X1="_ggui:preview",sp="_ggui:lifecycle",lw=new Set([X1,sp]);function J1(e){return lw.has(e)}const sw=new Map([[sp,cw]]);function cw(e){const n=[];if(!Ff(e))return{valid:!1,violations:[{field:"payload",message:`${sp} 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 uw(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 dw(e,n,o){const l=op(uw(n));return l(e)?{valid:!0,violations:[]}:{valid:!1,violations:lp(l.errors,e)}}function bv(e,n,o,l,c){if(J1(e)){const p=l==null?void 0:l.get(e);if(p)return p(n);const g=sw.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=op(d.schema);if(!p(n))for(const h of K1(lp(p.errors,n),`${e}.payload`))u.push(h)}return{valid:u.length===0,violations:u}}function Q1(e,n,o){const l=[];if(!Ff(e))return l.push({field:"value",message:"Action payload must be an object with an `action` field",expected:"object",received:xv(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:xv(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=op(d.schema);if(!p(c.data))for(const h of K1(lp(p.errors,c.data),`${u}.data`))l.push(h)}return{valid:l.length===0,violations:l}}function xv(e){return e===null?"null":Array.isArray(e)?"array":typeof e}function fw(e,n,o){return e.type!=="data:submit"?{valid:!0,violations:[]}:n?Q1(e.payload,n):{valid:!0,violations:[]}}A.createContext(null);new Set(np);new TextDecoder;var pw=Object.defineProperty,Lc=(e,n)=>{for(var o in n)pw(e,o,{get:n[o],enumerable:!0})};const W1=A.createContext(null);function Xr(){const e=A.useContext(W1);if(!e)throw new Error("useWireContext must be used within a WireProvider. Ensure the component is rendered inside a GguiWireProvider.");return e}function e$({config:e,children:n}){return i.jsx(W1.Provider,{value:e,children:n})}const zf=new Set;let Ef=!1;function gw(e,n){try{return`${e}::${JSON.stringify(n??null)}`}catch{return null}}function mw(e,n){const o=gw(e,n);return o===null?{suppressed:!1,signature:o}:zf.has(o)?{suppressed:!0,signature:o}:(zf.add(o),Ef||(Ef=!0,queueMicrotask(()=>{zf.clear(),Ef=!1})),{suppressed:!1,signature:o})}function t$(e){const{dispatch:n,onDispatchSuppressed:o}=Xr();return A.useCallback(l=>{const c=mw(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 hw(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 A.useContext(l)}function a$(e){const{subscribe:n}=Xr(),[o,l]=A.useState(null),[c,u]=A.useState([]),[d,p]=A.useState(!1),g=A.useRef(c);return g.current=c,A.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 yw(e){return{useAction:n=>t$(n),useStream:n=>a$(n)}}function vw(){const{auth:e}=Xr();return e}function $w(){const{app:e}=Xr();return e}function bw(){const{render:e}=Xr();return e}class n$ extends Error{constructor(o,l,c){super(c?`Client contract violation (${o}): ${c}`:`Client contract violation (${o})`);gn(this,"direction");gn(this,"violations");this.name="ClientContractViolationError",this.direction=o,this.violations=l}}function xw(e,n,o){return e?Q1({action:n,data:o},e):{valid:!0,violations:[]}}function _w(e,n,o,l){return J1(n)?bv(n,o,e??{},l):e?bv(n,o,e,l):{valid:!0,violations:[]}}function r$(e){return G3(e)}function i$(e,n){return fw(n,e)}function jw(e,n){return e?dw(n,e):{valid:!0,violations:[]}}const o$=256;class Sw{constructor(){gn(this,"listeners",new Map);gn(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($v)){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($v)){let l=this.reservedReplay.get(n.channel);l===void 0&&(l=[],this.reservedReplay.set(n.channel,l)),l.push(n),l.length>o$&&l.shift()}const o=this.listeners.get(n.channel);if(o!==void 0)for(const l of o)l(n)}}function ww(e){let n=0;const o=e.nextClientSeq??(()=>(n+=1,n)),l=e.validateEnvelope??i$;return{app:e.app,render:e.render,auth:e.auth,dispatch:(c,u)=>{const d=r$({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 n$("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 kw=Object.freeze(Object.defineProperty({__proto__:null,ClientContractViolationError:n$,GguiWireProvider:e$,RESERVED_CHANNEL_REPLAY_MAX:o$,StreamBus:Sw,buildActionEnvelope:r$,buildWireConfig:ww,useAction:t$,useApp:$w,useAuth:vw,useContract:yw,useGguiContext:hw,useRender:bw,useStream:a$,useWireContext:Xr,validateInboundPropsPayload:jw,validateInboundStreamPayload:_w,validateOutboundActionEnvelope:i$,validateOutboundActionPayload:xw},Symbol.toStringTag,{value:"Module"})),Aa=fe({id:Z().min(1)}),Vc=Z().min(1),l$=ut(["start","center","end","stretch"]),s$=ut(["start","center","end","between","around","evenly"]),Nw=Aa.extend({component:Oe("Row"),children:zt(Vc).optional(),gap:Z().optional(),align:l$.optional(),justify:s$.optional()}),zw=Aa.extend({component:Oe("Column"),children:zt(Vc).optional(),gap:Z().optional(),align:l$.optional(),justify:s$.optional()}),Ew=Aa.extend({component:Oe("Card"),child:Vc.optional()}),Cw=Aa.extend({component:Oe("List"),children:zt(Vc).optional()}),Tw=Aa.extend({component:Oe("Divider"),orientation:ut(["horizontal","vertical"]).optional()}),Mw=Aa.extend({component:Oe("Text"),text:Z(),variant:Z().optional()}),Ow=Aa.extend({component:Oe("Image"),src:Z().min(1),alt:Z().optional()}),Rw=Aa.extend({component:Oe("Icon"),name:Z().min(1)}),Aw=Aa.extend({component:Oe("Button"),label:Z()}),Dw=Aa.extend({component:Oe("TextField"),label:Z().optional(),placeholder:Z().optional(),value:Z().optional()}),Iw=Aa.extend({component:Oe("CheckBox"),label:Z().optional(),checked:Ft().optional()}),Uw=fe({label:Z(),value:Z()}),Lw=Aa.extend({component:Oe("ChoicePicker"),label:Z().optional(),options:zt(Uw).optional(),value:Z().optional()}),Vw=rl("component",[Nw,zw,Ew,Cw,Tw,Mw,Ow,Rw,Aw,Dw,Iw,Lw]),Bw="v0.9",cp=Oe(Bw),up=Z().min(1),Hw=fe({version:cp,createSurface:fe({surfaceId:up,catalogId:Z().min(1)})}),qw=fe({version:cp,updateComponents:fe({surfaceId:up,components:zt(Vw)})}),Pw=fe({version:cp,deleteSurface:fe({surfaceId:up})}),Zw=jn([Hw,qw,Pw]);function Gw(e){const n=Zw.safeParse(e);return n.success?{ok:!0,value:n.data}:{ok:!1,issues:n.error.issues.map(o=>({path:o.path,message:o.message}))}}var Fw=A.createContext(null),Uf={};Lc(Uf,{Accordion:()=>B8,Alert:()=>w8,Avatar:()=>Bc,Badge:()=>b8,Box:()=>i8,Button:()=>Jt,Card:()=>dp,Checkbox:()=>zc,Container:()=>Xw,Divider:()=>Nc,Grid:()=>r8,Heading:()=>ll,Icon:()=>$t,Image:()=>g$,Input:()=>fp,Link:()=>mp,MotionKeyframes:()=>H8,Progress:()=>p$,RadioGroup:()=>h8,Row:()=>Yr,Select:()=>f$,Skeleton:()=>x8,Slider:()=>y8,Spacer:()=>o8,Spinner:()=>Ya,Stack:()=>br,Table:()=>M8,Tabs:()=>R8,Text:()=>Fa,TextArea:()=>pp,Toast:()=>L8,Toggle:()=>m8,Tooltip:()=>C8,useAnimationKey:()=>P8,useMotion:()=>q8});var Qn={xs:"320px",sm:"480px",md:"640px",lg:"768px",xl:"1024px","2xl":"1280px","3xl":"1536px",full:"100%"},Qt={sm:"4px",md:"6px",lg:"8px",xl:"12px",full:"9999px"},ol={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)"},Yi={dropdown:1e3,sticky:1100,modal:1400,tooltip:1800},c$={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)"},Yw=new Set(Object.keys(c$));function Ga(e){if(e!==void 0)return typeof e=="number"?`${e}px`:Yw.has(e)?c$[e]:e}var Kw={xs:Qn.xs,sm:Qn.sm,md:Qn.md,lg:Qn.lg,xl:Qn.xl,"2xl":Qn["2xl"],"3xl":Qn["3xl"],full:Qn.full};function Xw({children:e,maxWidth:n="lg",center:o=!0,padding:l,style:c,className:u}){const d=Kw[n]||n,p=Ga(l);return i.jsx("div",{className:u,style:{maxWidth:d,margin:o?"0 auto":void 0,padding:p,width:"100%",...c},children:e})}function Hi(e,n,o,l){return e===void 0?A.createElement("div",{className:o.className,style:o.style},l):A.createElement(e,{...n,className:o.className,style:o.style},l)}function Ki(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}, ${Jw[e]})`;case"inverse":return"var(--ggui-color-surface, #ffffff)";case"inherit":return"inherit"}}var Jw={success:"#15803d",warning:"#b45309",error:"#b91c1c",info:"#0e7490"};function u$(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 d$={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)"},Qw=new Set(Object.keys(d$));function tl(e){if(e!==void 0)return typeof e=="number"?`${e}px`:Qw.has(e)?d$[e]:e}var Ww={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 dp(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=Ga(o),k={backgroundColor:u$(d??"default"),borderRadius:tl(u),padding:v,boxShadow:Ww[l]||l,border:c?"1px solid var(--ggui-color-outlineVariant, #e4e4e7)":void 0,...p};return Hi(h,y,{className:g,style:k},n)}var e8={start:"flex-start",center:"center",end:"flex-end",between:"space-between",around:"space-around",evenly:"space-evenly"},t8={start:"flex-start",center:"center",end:"flex-end",stretch:"stretch"};function br(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=Ga(l),j={display:"flex",flexDirection:o==="vertical"?"column":"row",gap:v,alignItems:t8[c]||c,justifyContent:e8[u]||u,flexWrap:d?"wrap":"nowrap",...p};return Hi(h,y,{className:g,style:j},n)}function Yr(e){return A.createElement(br,{...e,direction:"horizontal"})}var a8=[["sm",640],["md",768],["lg",1024],["xl",1280]],Cf=e=>`repeat(${e}, minmax(0, 1fr))`;function n8(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 r8(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:Ga(l),...u};return Hi(p,g,{className:d,style:v},n)}if(typeof o=="object"){const v=`ggui-grid-${n8(o)}`,j=[`.${v}{grid-template-columns:${Cf(o.base??1)}}`];for(const[x,E]of a8){const z=o[x];typeof z=="number"&&j.push(`@media (min-width:${E}px){.${v}{grid-template-columns:${Cf(z)}}}`)}const k={display:"grid",gap:Ga(l),...u};return Hi(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:Cf(o),gap:Ga(l),...u};return Hi(p,g,{className:d,style:y},n)}function i8(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 $=Ga(l)||"0";x=`${Ga(c)||"0"} ${$}`}else x=Ga(o);const E=p!==void 0&&typeof g=="string"&&g.length>0?p:void 0,z=E||(d?u$(d):void 0),w={padding:x,margin:Ga(u),background:z,borderRadius:tl(h),...y};return Hi(j,k,{className:v,style:w},n)}function Nc({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?Ki(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 o8({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 l8={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)"},s8={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)"},c8={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 Fa({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?Ki(c):"var(--ggui-color-onSurface, #18181b)",k={fontSize:l8[n],fontWeight:s8[o],lineHeight:c8[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 A.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},_a={tight:1.25,snug:1.375,normal:1.5,relaxed:1.625},Fr={tight:"-0.025em",normal:"0em"},_v={h1:{fontSize:be["4xl"],fontWeight:Xe.bold,lineHeight:_a.tight,letterSpacing:Fr.tight},h2:{fontSize:be["3xl"],fontWeight:Xe.bold,lineHeight:_a.tight,letterSpacing:Fr.tight},h3:{fontSize:be["2xl"],fontWeight:Xe.semibold,lineHeight:_a.snug,letterSpacing:Fr.normal},h4:{fontSize:be.xl,fontWeight:Xe.semibold,lineHeight:_a.snug,letterSpacing:Fr.normal},h5:{fontSize:be.lg,fontWeight:Xe.semibold,lineHeight:_a.normal,letterSpacing:Fr.normal},h6:{fontSize:be.base,fontWeight:Xe.semibold,lineHeight:_a.normal,letterSpacing:Fr.normal}};function ll({children:e,level:n=2,tone:o,align:l,style:c,className:u}){const d=`h${n}`,p=_v[d]||_v.h2,g=o?Ki(o):"var(--ggui-color-onSurface, #18181b)";return A.createElement(d,{className:u,style:{...p,color:g,textAlign:l,margin:0,...c}},e)}function Ya({size:e=24,tone:n,style:o,className:l}){const c=n==="inherit"?"currentColor":n?Ki(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)"},u8={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"}},d8={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 Jt({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:{...u8[o],...d8[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(Ya,{size:16,tone:"inherit"}):i.jsxs(i.Fragment,{children:[d,e,p]})})}var f8={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 fp({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=A.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:{...f8[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 pp({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=A.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 p8={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 f$({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=A.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:{...p8[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 zc({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 g8={sm:{width:36,height:20,knob:16},md:{width:44,height:24,knob:20},lg:{width:52,height:28,knob:24}};function m8({label:e,checked:n,onChange:o,disabled:l,size:c="md",style:u,className:d}){const p=g8[c],[g,h]=A.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 h8({label:e,value:n,onChange:o,options:l,direction:c="vertical",disabled:u,error:d,style:p,className:g}){const h=A.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 y8({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=A.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 v8={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)"}},$8={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 b8({children:e,variant:n="default",size:o="md",pill:l=!0,style:c,className:u}){return i.jsx("span",{className:u,style:{...v8[n],...$8[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 jv=e=>e===void 0?void 0:typeof e=="number"?`${e}px`:e;function x8({variant:e="rect",width:n,height:o,radius:l="sm",style:c,className:u}){const d=e==="circle",p=e==="text",g=jv(n)??(d?"2.5rem":"100%"),h=jv(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 _8={xs:24,sm:32,md:40,lg:48,xl:64},Sv=["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 Bc({src:e,name:n,size:o="md",shape:l="circle",style:c,className:u}){const[d,p]=A.useState(!1),g=typeof o=="number"?o:_8[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 Sv[k%Sv.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 j8={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)"}},S8={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 w8({children:e,variant:n="info",title:o,closable:l,onClose:c,icon:u,style:d,className:p}){const g=j8[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||S8[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 k8={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)"},N8={sm:4,md:8,lg:12};function p$({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=N8[l],v=k8[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 g$({src:e,alt:n,width:o,height:l,objectFit:c="cover",radius:u,fallback:d,style:p,className:g}){const[h,y]=A.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 gp={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"}]]},m$=new Map;for(const e of Object.keys(gp))m$.set(e.toLowerCase(),e);function z8(e){if(gp[e])return e;const n=e.replace(/[-_]/g,"").toLowerCase();return m$.get(n)}function E8(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 $t({name:e,size:n=24,tone:o,children:l,style:c,className:u,"aria-label":d}){const p=o?Ki(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=z8(e);if(y)return i.jsx("span",{className:u,style:h,...g,children:E8(gp[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 mp({children:e,href:n,external:o,tone:l,underline:c="hover",style:u,className:d,...p}){const g=l?Ki(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]=A.useState(!1),[g,h]=A.useState({top:0,left:0}),y=A.useRef(null),v=A.useRef(null),j=()=>{v.current=setTimeout(()=>{p(!0)},l)},k=()=>{v.current&&clearTimeout(v.current),p(!1)};A.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]),A.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:Yi.tooltip,maxWidth:"200px",pointerEvents:"none",whiteSpace:"nowrap"},children:n})]})}var T8=(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 M8({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]=A.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&&T8(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 O8={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 R8({items:e,activeKey:n,onChange:o,variant:l="line",size:c="md",fullWidth:u=!1,style:d,className:p}){var $;const g=A.useId(),[h,y]=A.useState(($=e[0])==null?void 0:$.key),v=n??h,j=A.useCallback(N=>{o?o(N):y(N)},[o]),k=e.find(N=>N.key===v),x=A.useRef(null),E=A.useCallback(N=>{var C;const R=e.filter(I=>!I.disabled),_=R.findIndex(I=>I.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 I=R[S];j(I.key);const te=(C=x.current)==null?void 0:C.querySelector(`#${CSS.escape(`${g}-tab-${I.key}`)}`);te==null||te.focus()}},[e,v,g,j]),z=(N,R)=>{const _={...O8[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 A8={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
|
+
}`},Lf={fadeIn:`ggui-fadeIn ${kt.normal} ${Nt.easeOut} both`,slideInUp:`ggui-slideInUp ${kt.normal} ${Nt.easeOut} both`,scaleIn:`ggui-scaleIn ${kt.normal} ${Nt.easeOut} both`},D8=`@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
|
+
}`,I8={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)"}},U8={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 L8({message:e,variant:n="info",title:o,duration:l=5e3,onClose:c,visible:u=!0,style:d,className:p}){if(A.useEffect(()=>{if(!u||l===0||!c)return;const y=setTimeout(c,l);return()=>clearTimeout(y)},[u,l,c]),!u)return null;const g=I8[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:Lf.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:U8[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 V8=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=A.useId(),[g,h]=A.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}),V8(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 wv="ggui-motion-keyframes";function H8(){return A.useEffect(()=>{if(document.getElementById(wv))return;const e=document.createElement("style");return e.id=wv,e.textContent=[...Object.values(A8),D8].join(`
|
|
158
|
+
|
|
159
|
+
`),document.head.appendChild(e),()=>{e.remove()}},[]),null}function q8(){const[e,n]=A.useState(()=>typeof window>"u"?!0:!window.matchMedia("(prefers-reduced-motion: reduce)").matches);return A.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 P8(e){const[n,o]=A.useState(0),l=A.useRef(!0);return A.useEffect(()=>{if(l.current){l.current=!1;return}o(c=>c+1)},[e]),n}var Vf={};Lc(Vf,{Autocomplete:()=>nk,Breadcrumb:()=>rk,Dropdown:()=>ak,EmptyState:()=>ok,FormField:()=>Q8,Markdown:()=>Ck,MarkdownInline:()=>Tk,MenuItem:()=>h$,Pagination:()=>ik,SearchField:()=>J8,Stat:()=>lk,Stepper:()=>fk,Tag:()=>tk,renderRichTextInlines:()=>vr});var Z8={50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",400:"#38bdf8",600:"#0284c7",700:"#0369a1"},G8={50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",900:"#111827"},F8={50:"#f0fdf4",200:"#bbf7d0",500:"#22c55e",700:"#15803d"},Y8={50:"#fffbeb",200:"#fde68a",500:"#f59e0b",700:"#b45309"},K8={50:"#fef2f2",100:"#fee2e2",200:"#fecaca",500:"#ef4444",600:"#dc2626",700:"#b91c1c"},X8={50:"#ecfeff",200:"#a5f3fc",500:"#06b6d4",700:"#0e7490"},Q={primary:Z8,gray:G8,success:F8,warning:Y8,error:K8,info:X8,white:"#ffffff"};function J8({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]=A.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(Ya,{size:16}):i.jsx($t,{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(Jt,{onClick:E,disabled:p||d,size:w[g],loading:d,children:u})]})}function Q8({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 h$({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:Qt.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 W8={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]}`}},ek={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 tk({children:e,variant:n="default",size:o="md",closable:l,onClose:c,icon:u,style:d,className:p}){const g=ek[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",...W8[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 ak({trigger:e,options:n,value:o,onChange:l,placement:c="bottom-start",disabled:u,style:d,className:p}){const[g,h]=A.useState(!1),y=A.useRef(null);A.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]),A.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:Qt.lg,boxShadow:ol.lg,zIndex:Yi.dropdown,padding:"4px"},children:n.map(k=>i.jsx(h$,{label:k.label,icon:k.icon,onClick:()=>v(k.value),disabled:k.disabled,active:o===k.value,danger:k.danger},k.value))})]})}function nk({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]=A.useState(!1),[x,E]=A.useState(-1),z=A.useRef(null),w=A.useMemo(()=>{if(!e)return l;const _=e.toLowerCase();return l.filter(S=>S.label.toLowerCase().includes(_)||S.value.toLowerCase().includes(_))},[l,e]);A.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(fp,{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:Qt.lg,boxShadow:ol.lg,zIndex:Yi.dropdown,maxHeight:"240px",overflow:"auto"},children:d?i.jsx("div",{style:{padding:"12px",display:"flex",justifyContent:"center"},children:i.jsx(Ya,{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 rk({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(A.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(mp,{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 ik({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(Jt,{variant:"ghost",size:y,onClick:()=>o==null?void 0:o(1),disabled:d||e===1,"aria-label":"First page",children:[i.jsx($t,{name:"chevron-left",size:v}),i.jsx($t,{name:"chevron-left",size:v,style:{marginLeft:"-8px"}})]}),i.jsx(Jt,{variant:"ghost",size:y,onClick:()=>o==null?void 0:o(e-1),disabled:d||e===1,"aria-label":"Previous page",children:i.jsx($t,{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(Jt,{variant:"ghost",size:y,onClick:()=>o==null?void 0:o(e+1),disabled:d||e===n,"aria-label":"Next page",children:i.jsx($t,{name:"chevron-right",size:v})}),l&&i.jsxs(Jt,{variant:"ghost",size:y,onClick:()=>o==null?void 0:o(n),disabled:d||e===n,"aria-label":"Last page",children:[i.jsx($t,{name:"chevron-right",size:v}),i.jsx($t,{name:"chevron-right",size:v,style:{marginLeft:"-8px"}})]})]})}function ok({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(br,{align:"center",gap:"sm",className:u,style:d,children:[e!==void 0&&(typeof e=="string"?i.jsx($t,{name:e,size:40,tone:"subtle"}):e),i.jsx(ll,{level:3,children:n}),o!==void 0&&i.jsx(Fa,{tone:"muted",children:o}),l!==void 0&&i.jsx("div",{style:{marginTop:"var(--ggui-spacing-sm, 8px)"},children:l})]})}function lk({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(br,{gap:"xs",className:d,style:u,children:[i.jsxs(Yr,{gap:"xs",align:"center",children:[c!==void 0&&(typeof c=="string"?i.jsx($t,{name:c,size:16,tone:"muted"}):c),i.jsx(Fa,{size:"xs",weight:"semibold",caps:!0,tone:"muted",children:e})]}),i.jsxs(Yr,{gap:"sm",align:"end",children:[i.jsx(Fa,{size:"3xl",weight:"bold",children:n}),o!==void 0&&i.jsx(Fa,{size:"sm",weight:"semibold",tone:p,children:o})]})]})}var Bf=28;function sk(e,n){return e<n?"completed":e===n?"current":"upcoming"}var ck={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 uk({index:e,state:n}){return i.jsx("span",{"aria-hidden":"true",style:{width:Bf,height:Bf,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",...ck[n]},children:n==="completed"?i.jsx($t,{name:"check",size:16,tone:"inherit"}):i.jsx(Fa,{is:"span",size:"sm",weight:"semibold",tone:"inherit",children:e+1})})}function dk({label:e,state:n}){return i.jsx(Fa,{is:"span",size:"sm",weight:n==="current"?"semibold":"normal",tone:n==="upcoming"?"muted":"default",children:e})}function fk({steps:e,current:n,orientation:o="horizontal",onStepClick:l,style:c,className:u}){const d=(p,g)=>{const h=sk(g,n),y=i.jsxs(Yr,{gap:"sm",align:"center",children:[i.jsx(uk,{index:g,state:h}),i.jsx(dk,{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(br,{gap:"none",align:"start",children:e.map((p,g)=>i.jsxs(br,{gap:"none",align:"start",children:[g>0&&i.jsx("span",{style:{width:Bf,height:16,display:"inline-flex",justifyContent:"center"},children:i.jsx(Nc,{orientation:"vertical",margin:0})}),d(p,g)]},g))})}):i.jsx("nav",{"aria-label":"Progress",className:u,style:c,children:i.jsx(Yr,{gap:"sm",align:"center",children:e.map((p,g)=>i.jsxs(Yr,{gap:"sm",align:"center",style:g>0?{flex:1}:void 0,children:[g>0&&i.jsx(Nc,{style:{flex:1,minWidth:16,margin:0}}),d(p,g)]},g))})})}var pk=/^(?:https?:\/\/|mailto:)[^\s\x00-\x1f]+$/i;function gk(e){return pk.test(e)?e:void 0}function mk(e){const n=new Set;for(const o of e)o>0&&n.add(o-1);return n}function y$(e){return e===void 0||e===" "||e===" "||e===`
|
|
160
|
+
`}function v$(e){return e!==void 0&&/[A-Za-z0-9]/.test(e)}function hk(e,n,o){return y$(o)?!1:e==="_"||e==="__"?!v$(n):!0}function yk(e,n,o){return y$(n)?!1:e==="_"||e==="__"?!v$(o):!0}var vk=new Set("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~");function qi(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&&vk.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)&&yk(_,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(hk($,v,N)){u();const R=qi(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:mk(R.closedIdxs),runConsumed:R.runConsumed,pos:R.pos}}c+=$,d+=$.length;continue}if(p==="["){const g=qi(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:gk(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 $k(e){return qi(e,0,[]).children}var bk=/^```+\s*(\S*)\s*$/,xk=/^```+\s*$/,_k=/^(#{1,6})\s+(.*)$/,jk=/^\s*[-*+]\s+(.*)$/,Sk=/^\s*(\d{1,9})[.)]\s+(.*)$/;function wk(e){const n=[],o=e.split(`
|
|
162
|
+
`);let l=[],c;const u=()=>{l.length>0&&(n.push({type:"paragraph",children:qi(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(bk);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&&xk.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(_k);if(y!==null&&y[1]!==void 0){u(),d();const k=y[1].length;n.push({type:"heading",level:k,children:qi(y[2]??"",0,[]).children});continue}const v=g.match(Sk),j=v===null?g.match(jk):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:qi(x,0,[]).children});continue}d(),l.push(g)}return u(),d(),n}var kk={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"},Nk={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},zk={color:"var(--ggui-color-primary, #4f46e5)",textDecoration:"none"},kv={margin:0,paddingInlineStart:"var(--ggui-spacing-lg, 24px)"};function vr(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:vr(n.children)},o);case"em":return i.jsx("em",{children:vr(n.children)},o);case"code":return i.jsx("code",{style:kk,children:n.code},o);case"link":{const l=vr(n.children);return n.href!==void 0?i.jsx(mp,{href:n.href,external:!0,children:l},o):i.jsx("span",{style:zk,children:l},o)}}})}function Ek(e,n){switch(e.type){case"paragraph":return i.jsx(Fa,{children:vr(e.children)},n);case"heading":return i.jsx(ll,{level:e.level,children:vr(e.children)},n);case"code-fence":return i.jsx("pre",{style:Nk,"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:vr(l.children)},c));return e.ordered?i.jsx("ol",{start:e.start,style:kv,children:o},n):i.jsx("ul",{style:kv,children:o},n)}}}function Ck({text:e,className:n,style:o}){const l=wk(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(Ek)})}function Tk({text:e}){return i.jsx(i.Fragment,{children:vr($k(e))})}var Hf={};Lc(Hf,{CardGrid:()=>Rk,ChatWindow:()=>Ik,CommandPalette:()=>Zk,CommentThread:()=>Ak,DataTable:()=>Dk,FileUploader:()=>Lk,Footer:()=>Gk,Header:()=>Mk,Hero:()=>Fk,Modal:()=>Pk,NavigationBar:()=>Uk,NotificationCenter:()=>Hk,Sidebar:()=>Ok});function Mk({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:Yi.sticky,boxShadow:ol.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 $$({item:e,activeId:n,onItemClick:o,collapsed:l,depth:c=0}){const[u,d]=A.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:Qt.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($t,{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($$,{item:y,activeId:n,onItemClick:o,collapsed:l,depth:c+1},y.id))})]})}function Ok({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($$,{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 Rk({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 b$({comment:e,onReply:n,onReaction:o,depth:l=0}){var y,v;const[c,u]=A.useState(!1),[d,p]=A.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(Bc,{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(pp,{value:d,onChange:p,placeholder:"Write a reply...",rows:2}),i.jsxs("div",{style:{display:"flex",gap:"8px",marginTop:"8px"},children:[i.jsx(Jt,{size:"sm",onClick:g,children:"Reply"}),i.jsx(Jt,{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(b$,{comment:j,onReply:n,onReaction:o,depth:l+1})},j.id))]})}function Ak({comments:e,currentUser:n,onAddComment:o,onReply:l,onReaction:c,loading:u,style:d,className:p}){const[g,h]=A.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(Bc,{name:n.name,src:n.avatar,size:"sm"}),i.jsxs("div",{style:{flex:1},children:[i.jsx(pp,{value:g,onChange:h,placeholder:"Write a comment...",rows:3}),i.jsx("div",{style:{marginTop:"8px",display:"flex",justifyContent:"flex-end"},children:i.jsx(Jt,{onClick:y,disabled:!g.trim(),children:"Comment"})})]})]}),u?i.jsx("div",{style:{display:"flex",justifyContent:"center",padding:"24px"},children:i.jsx(Ya,{size:24})}):i.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"20px"},children:e.map(v=>i.jsx(b$,{comment:v,onReply:l,onReaction:c},v.id))})]})}function Dk({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(zc,{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($t,{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(Ya,{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(zc,{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 Ik({messages:e,currentUserId:n,onSendMessage:o,loading:l,typing:c,placeholder:u="Type a message...",header:d,style:p,className:g}){const[h,y]=A.useState(""),v=A.useRef(null);A.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:Qt.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(Ya,{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(Bc,{name:x.sender.name,src:x.sender.avatar,size:"xs"}),i.jsxs("div",{style:{maxWidth:"70%",padding:"10px 14px",borderRadius:Qt.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:Qt.full,fontSize:be.sm,outline:"none"}}),i.jsx(Jt,{onClick:j,disabled:!h.trim(),children:i.jsx($t,{name:"chevron-right",size:18})})]})]})}function Uk({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:Qt.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 Nv(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 Lk({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]=A.useState(!1),k=A.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:Qt.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($t,{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: ${Nv(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:Qt.md,backgroundColor:Q.white},children:[i.jsx($t,{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:[Nv($.size),$.error&&i.jsx("span",{style:{color:Q.error[500],marginLeft:"8px"},children:$.error})]}),$.status==="uploading"&&$.progress!==void 0&&i.jsx(p$,{value:$.progress,size:"sm",style:{marginTop:"8px"}})]}),i.jsx(Jt,{variant:"ghost",size:"sm",onClick:()=>o==null?void 0:o($.id),children:i.jsx($t,{name:"x",size:16})})]},$.id))})]})}var Vk={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=Vk[e.type||"info"];return i.jsxs("div",{style:{display:"flex",gap:"12px",padding:"12px",backgroundColor:e.read?"transparent":Q.primary[50],borderRadius:Qt.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($t,{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 Hk({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(Jt,{variant:"ghost",size:"sm",onClick:o,children:"Mark all read"}),e.length>0&&i.jsx(Jt,{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(Ya,{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 qk={sm:"400px",md:"500px",lg:"640px",xl:"800px",full:"100vw"};function Pk({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=A.useCallback(x=>{x.key==="Escape"&&p&&n()},[p,n]);if(A.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:Yi.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:Lf.fadeIn}}),i.jsxs("div",{role:"dialog","aria-modal":"true",className:y,style:{position:"relative",width:qk[u],maxWidth:k?"100%":"calc(100vw - 48px)",maxHeight:k?"100%":"calc(100vh - 48px)",backgroundColor:Q.white,borderRadius:k?0:Qt.xl,boxShadow:ol["2xl"],display:"flex",flexDirection:"column",overflow:"hidden",animation:Lf.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(ll,{level:4,children:o}),g&&i.jsx(Jt,{variant:"ghost",size:"sm",onClick:n,"aria-label":"Close modal",style:{marginLeft:"auto"},children:i.jsx($t,{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 Zk({open:e,onClose:n,commands:o,onSelect:l,placeholder:c="Search commands...",recentIds:u=[],loading:d,style:p,className:g}){const[h,y]=A.useState(""),[v,j]=A.useState(0),k=A.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=A.useMemo(()=>{const w=[];return k.forEach($=>w.push(...$)),w},[k]);A.useEffect(()=>{j(0)},[h]),A.useEffect(()=>{e&&(y(""),j(0))},[e]);const E=A.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(A.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:Yi.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:Qt.xl,boxShadow:ol["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($t,{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(Ya,{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:Qt.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:Qt.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 Gk({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:_a.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:_a.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:_a.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 Fk({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:_a.tight,letterSpacing:Fr.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:_a.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:_a.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:_a.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 qf={};Lc(qf,{Clickable:()=>Yk,Hoverable:()=>Kk,Pressable:()=>Xk});var Yk=A.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]=A.useState(!1),[$,N]=A.useState(!1),R=!!o,_=g?"not-allowed":d??(R?"pointer":void 0),S=h??(R?"button":void 0),C=v??(R?0:void 0),I=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:I,role:S,"aria-label":y,"aria-disabled":g||void 0,tabIndex:C,...x,children:n})}),Kk=A.forwardRef(function({children:n,hoverStyle:o,onHoverChange:l,transition:c="all 200ms ease",style:u,className:d,...p},g){const[h,y]=A.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})}),Xk=A.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]=A.useState(!1),[$,N]=A.useState(!1),[R,_]=A.useState(null),S=!!o||!!l,C=Y=>{if(!p&&(N(!0),l)){const F=setTimeout(()=>{l(Y)},c);_(F)}},I=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:I,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 Jk(e){return e.replace(/__GGUI_META__[\s\S]*?__GGUI_META_END__/g,"").replace(/__GGUI_STREAM_SPEC__[\s\S]*?__GGUI_STREAM_SPEC_END__/g,"")}function Qk(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 ar(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}: ${Qk(c)};`):c!==null&&typeof c=="object"&&ar(c,`${n}-${l}`,o))}function Wk(e){const n=[];return ar(e.color,"color",n),ar(e.font,"font",n),ar(e.spacing,"spacing",n),ar(e.shape,"shape",n),ar({duration:e.motion.duration,easing:e.motion.easing,transition:e.motion.transition},"motion",n),ar(e.accessibility,"accessibility",n),ar(e.zIndex,"zIndex",n),n.join(`
|
|
165
|
+
`)}function e9(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 t9(e){const n=[];for(const[o,l]of Object.entries(e.motion.keyframes))o.startsWith("$")||n.push(e9(o,String(l.$value)));return n.join(`
|
|
169
|
+
|
|
170
|
+
`)}function a9(e,n){const l=`:root {
|
|
171
|
+
${Wk(n)}
|
|
172
|
+
}`,c=t9(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 Zt={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"}}}},et={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}},Hc={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)"}},rr={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:Hc,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"}}}},n9={$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:rr.font,spacing:rr.spacing,shape:rr.shape,motion:rr.motion,accessibility:{...et.light,focusRing:{...et.light.focusRing,color:{$type:"color",$value:"#292929"}}},zIndex:ua},r9={$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:rr.font,spacing:rr.spacing,shape:rr.shape,motion:rr.motion,accessibility:{...et.dark,focusRing:{...et.dark.focusRing,color:{$type:"color",$value:"#f4f3ed"}}},zIndex:ua},i9={light:n9,dark:r9},ir={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)"}}}},o9={$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:ir.font,spacing:ir.spacing,shape:ir.shape,motion:ir.motion,accessibility:{...et.light,focusRing:{...et.light.focusRing,color:{$type:"color",$value:"#06b6d4"}}},zIndex:ua},l9={$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:ir.font,spacing:ir.spacing,shape:ir.shape,motion:ir.motion,accessibility:{...et.dark,focusRing:{...et.dark.focusRing,color:{$type:"color",$value:"#22d3ee"}}},zIndex:ua},s9={light:o9,dark:l9},or={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)"}}}},c9={$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:or.font,spacing:or.spacing,shape:or.shape,motion:or.motion,accessibility:{...et.light,focusRing:{...et.light.focusRing,color:{$type:"color",$value:"#748660"}}},zIndex:ua},u9={$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:or.font,spacing:or.spacing,shape:or.shape,motion:or.motion,accessibility:{...et.dark,focusRing:{...et.dark.focusRing,color:{$type:"color",$value:"#93a17c"}}},zIndex:ua},d9={light:c9,dark:u9},lr={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"}}}},f9={$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:{...Zt.dark.success,500:{$value:"#34d399",$type:"color"}},warning:{...Zt.dark.warning,500:{$value:"#fbbf24",$type:"color"}},error:{...Zt.dark.error,500:{$value:"#f87171",$type:"color"}},info:{...Zt.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:lr.font,spacing:lr.spacing,shape:lr.shape,motion:lr.motion,accessibility:{...et.dark,focusRing:{...et.dark.focusRing,color:{$value:"#ec4899",$type:"color"}}},zIndex:ua},p9={$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:{...Zt.dark.success,500:{$value:"#5ee0ad",$type:"color"}},warning:{...Zt.dark.warning,500:{$value:"#ffd24a",$type:"color"}},error:{...Zt.dark.error,500:{$value:"#ff8a8a",$type:"color"}},info:{...Zt.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:lr.font,spacing:lr.spacing,shape:lr.shape,motion:lr.motion,accessibility:{...et.dark,focusRing:{...et.dark.focusRing,color:{$value:"#f472b6",$type:"color"}}},zIndex:ua},g9={light:f9,dark:p9},sr={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:Hc}},m9={$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:Zt.light.success,warning:Zt.light.warning,error:Zt.light.error,info:Zt.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:sr.font,spacing:sr.spacing,shape:sr.shape,motion:sr.motion,accessibility:{...et.light,focusRing:{...et.light.focusRing,color:{$type:"color",$value:"#16a34a"}}},zIndex:ua},h9={$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:Zt.dark.success,warning:Zt.dark.warning,error:Zt.dark.error,info:Zt.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:sr.font,spacing:sr.spacing,shape:sr.shape,motion:sr.motion,accessibility:{...et.dark,focusRing:{...et.dark.focusRing,color:{$type:"color",$value:"#4ade80"}}},zIndex:ua},y9={light:m9,dark:h9},v9={...Hc,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)"}},cr={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:v9}},$9={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"}},b9={$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:{...$9},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:cr.font,spacing:cr.spacing,shape:cr.shape,motion:cr.motion,accessibility:{...et.light,focusRing:{...et.light.focusRing,color:{$type:"color",$value:"#cc785c"}}},zIndex:ua},x9={$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:cr.font,spacing:cr.spacing,shape:cr.shape,motion:cr.motion,accessibility:{...et.dark,focusRing:{...et.dark.focusRing,color:{$type:"color",$value:"#d6896c"}}},zIndex:ua},_9={light:b9,dark:x9},ur={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:Hc}},j9={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"}},S9={$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:{...j9},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:ur.font,spacing:ur.spacing,shape:ur.shape,motion:ur.motion,accessibility:{...et.light,focusRing:{...et.light.focusRing,color:{$type:"color",$value:"#4f46e5"}}},zIndex:ua},w9={$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:ur.font,spacing:ur.spacing,shape:ur.shape,motion:ur.motion,accessibility:{...et.dark,focusRing:{...et.dark.focusRing,color:{$type:"color",$value:"#818cf8"}}},zIndex:ua},k9={light:S9,dark:w9},N9=new Map([["ggui",i9],["indigo",k9],["claudic",_9],["premium-cyberpunk",s9],["premium-zen",d9],["premium-neon-noir",g9],["premium-botanical",y9]]),zv=new Map;function z9(e,n){return n==="dark"&&e.dark?"dark":"light"}function E9(e,n="light"){const o=N9.get(e);if(!o)return;const l=z9(o,n),c=`${e}:${l}`,u=zv.get(c);if(u)return u;const d=l==="dark"?o.dark:o.light,p=a9(e,d);return zv.set(c,p),p}function x$(){return"ggui"}A.createContext(null);var _$="@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 T9(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 Pf(e,n){const o=T9(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 M9(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 O9(e,n,o){if(!o||!e.includes("color-mix("))return e;const{base:l,colorMix:c}=M9(e);if(c.length===0)return e;const u=c.map(g=>Pf(g,o)),d=`${n} {
|
|
179
|
+
${u.join(`
|
|
180
|
+
`)}
|
|
181
|
+
}`,p=`${_$} {
|
|
182
|
+
${n} {
|
|
183
|
+
${c.join(`
|
|
184
|
+
`)}
|
|
185
|
+
}
|
|
186
|
+
}`;return`${l}
|
|
187
|
+
${d}
|
|
188
|
+
${p}`}function R9(e,n="light"){return hp(x$(),e,n)}function hp(e,n,o="light"){const l=E9(e,o);if(!l){const g=x$();return e===g?"":hp(g,n,o)}const c=C9(l.cssVariables),u=O9(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=A9(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 A9(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: ${Pf("0 0 0 4px color-mix(in srgb, var(--ggui-color-primary-500) 18%, transparent)",n)};`,h=` --ggui-effect-glow-primary-strong: ${Pf("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=`${_$} {
|
|
208
|
+
${o} {
|
|
209
|
+
${c}
|
|
210
|
+
${u}
|
|
211
|
+
${d}
|
|
212
|
+
}
|
|
213
|
+
}`;return`${y}
|
|
214
|
+
${v}`}var D9=["useAction","useStream","useAuth","useApp","useRender","useGguiContext","useContract","useWireContext","GguiWireProvider"],I9=["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"],U9=["SearchField","FormField","MenuItem","Tag","Dropdown","Autocomplete","Breadcrumb","Pagination","EmptyState","Stat","Stepper","Markdown","MarkdownInline","renderRichTextInlines"],L9=["Header","Sidebar","CardGrid","CommentThread","DataTable","ChatWindow","NavigationBar","FileUploader","NotificationCenter","Modal","CommandPalette","Footer","Hero"],Ev=["Clickable","Hoverable","Pressable"],V9=["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 qt(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 yp(e,n){return`(globalThis.__ggui__&&globalThis.__ggui__["${e}"]||window["${n}"])`}function H9(e){const n=V9.map(c=>`export const ${c} = R.${c};`).join(" "),l=`const R = ${yp("react",e)}; export default R; ${n}`;return`data:text/javascript,${encodeURIComponent(l)}`}function q9(){const o=`const D = globalThis.__ggui__["reactDom"]; export default D; ${["createPortal","flushSync","unstable_batchedUpdates"].map(l=>`export const ${l} = D.${l};`).join(" ")}`;return`data:text/javascript,${encodeURIComponent(o)}`}function P9(e){const o=[`const R = ${yp("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("");return`data:text/javascript,${encodeURIComponent(o)}`}function Wn(e,n,o,l,c){if(o&&o.length>0){const p=[e,...l||[]],g=[n,...c||[]],h=p.map((k,x)=>`(globalThis.__ggui__&&globalThis.__ggui__["${g[x]}"]||window["${k}"]||{})`),y=h.join(","),v=o.map(k=>`export const ${k} = M["${k}"];`).join(" "),j=h.length>1?`const M = Object.assign({}, ${y}); ${v} export default M;`:`const M = ${h[0]}; ${v} export default M;`;return`data:text/javascript,${encodeURIComponent(j)}`}const d=`const M = ${yp(n,e)} || {}; const handler = { get(_, key) { return M[key]; } }; export default new Proxy({}, handler);`;return`data:text/javascript,${encodeURIComponent(d)}`}function Z9(){const n=`const w = globalThis.__ggui__.wire; ${D9.map(o=>`export const ${o} = w.${o};`).join(" ")} export default w;`;return`data:text/javascript,${encodeURIComponent(n)}`}function G9(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 F9(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];}});"),`data:text/javascript,${encodeURIComponent(c.join(""))}`}function Y9(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=H9(o),h=P9(o);e=qt(e,"react/jsx-runtime",h),e=qt(e,"react/jsx-dev-runtime",h);const y=q9();e=qt(e,"react-dom",y),e=qt(e,"react",g);const v=[...I9,...U9,...L9,...Ev];e=qt(e,"@ggui-ai/design/primitives",Wn(l,"primitives",v,[c,u,d],["components","compositions","interact"])),e=qt(e,"@ggui-ai/design/components",Wn(c,"components",v,[l,u,d],["primitives","compositions","interact"])),e=qt(e,"@ggui-ai/design/compositions",Wn(u,"compositions",v,[l,c,d],["primitives","components","interact"])),e=qt(e,"@ggui-ai/design/interact",Wn(d,"interact",[...Ev])),e=qt(e,"@ggui-ai/design/templates",Wn(u,"compositions",v,[l,c],["primitives","components"])),e=qt(e,"@ggui-ai/design/app-components",Wn(p,"appComponents")),e=qt(e,"@ggui-ai/design/tokens",Wn("__GGUI_TOKENS","tokens",[...B9])),e=qt(e,"@ggui-ai/design",Wn(l,"primitives",v,[c,u,d],["components","compositions","interact"])),e=qt(e,"@ggui-ai/wire",Z9());const j=[...new Set(["@ggui-ai/gadgets",...n.gadgetPackages??[]])];for(const k of j){const x=G9(e,k);e=qt(e,k,F9(k,x))}return e}function K9(e,n){const o=n.reactBaseUrl??"https://esm.sh/react@18.2.0";return e=qt(e,"react/jsx-runtime",`${o}/jsx-runtime`),e=qt(e,"react/jsx-dev-runtime",`${o}/jsx-runtime`),e=qt(e,"react",o),e}function X9(e,n){switch(n.mode){case"data-url":return Y9(e,n);case"importmap":return K9(e,n)}}function J9(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 Q9(e){const n=new Blob([e],{type:"application/javascript"}),o=URL.createObjectURL(n);try{return await import(o)}finally{URL.revokeObjectURL(o)}}var W9=0;function eN(e){return`ggui-rcr-${e.replace(/[^a-z0-9]/gi,"")}`}var tN=1,aN=500,nN=class extends xc.Component{constructor(){super(...arguments);gn(this,"state",{error:null,catchCount:0,autoRetrying:!1});gn(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<=tN?(this.setState({autoRetrying:!0}),this.retryTimer=setTimeout(()=>{this.setState({error:null,autoRetrying:!1})},aN)):(c=(l=this.props).onError)==null||c.call(l,n)}componentWillUnmount(){this.retryTimer&&clearTimeout(this.retryTimer)}render(){const{error:n,autoRetrying:o,catchCount:l}=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:"rgba(255,255,255,0.4)"},children:[i.jsx("div",{style:{width:16,height:16,border:"2px solid rgba(255,255,255,0.15)",borderTopColor:"rgba(255,255,255,0.5)",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'},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:"Something went wrong"}),i.jsx("div",{style:{fontSize:12,color:"rgba(255,255,255,0.4)",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 rgba(255,255,255,0.15)",background:"rgba(255,255,255,0.08)",color:"rgba(255,255,255,0.7)",fontSize:13,fontWeight:500,cursor:"pointer"},children:"Retry"}),l>1&&i.jsx("div",{style:{fontSize:11,color:"rgba(255,255,255,0.2)"},children:n.message})]}):this.props.children}};function rN({code:e,props:n={},themeId:o,cssOverrides:l,fallback:c=i.jsx("div",{children:"Loading component..."}),onError:u}){const d=A.useId(),[p]=A.useState(()=>eN(d)||`ggui-rcr-${++W9}`),[g,h]=A.useState(null),[y,v]=A.useState(null),[j,k]=A.useState(!0);A.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 $=Jk(w),N=globalThis;let R={};try{R=await Bx(()=>import("./index-CmF9cf65.js").then(te=>te.i),[])}catch{}N.__ggui__={react:xc,reactDom:R,primitives:Uf,components:Vf,compositions:Hf,interact:qf,wire:kw},N.__REACT=xc,N.__GGUI_PRIMITIVES=Uf,N.__GGUI_COMPONENTS=Vf,N.__GGUI_COMPOSITIONS=Hf,N.__GGUI_INTERACT=qf;const _=J9($),S=X9(_,{mode:"data-url"}),C=await Q9(S);if(E)return;const I=C.default??Object.values(C).find(te=>typeof te=="function");if(!I)throw new Error("Module does not export a default component");h(()=>I),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?hp(o,p):R9(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(nN,{onError:u,children:i.jsx(g,{...n})},e.length)]}):i.jsx("div",{children:c})}var Cv="ggui-preview-keyframes",iN=`@keyframes ggui-preview-shimmer {
|
|
215
|
+
0% { transform: translateX(-100%); }
|
|
216
|
+
100% { transform: translateX(100%); }
|
|
217
|
+
}`,oN=`@keyframes ggui-preview-caret {
|
|
218
|
+
0%, 45% { opacity: 1; }
|
|
219
|
+
55%, 100% { opacity: 0; }
|
|
220
|
+
}`,lN=`@keyframes ggui-preview-fragment-enter {
|
|
221
|
+
from { opacity: 0; transform: scale(0.97); }
|
|
222
|
+
to { opacity: 1; transform: scale(1); }
|
|
223
|
+
}`,sN=`@media (prefers-reduced-motion: reduce) {
|
|
224
|
+
[data-ggui-preview] *,
|
|
225
|
+
[data-ggui-preview]::before,
|
|
226
|
+
[data-ggui-preview]::after {
|
|
227
|
+
animation-duration: 0.01ms !important;
|
|
228
|
+
animation-iteration-count: 1 !important;
|
|
229
|
+
transition-duration: 0.01ms !important;
|
|
230
|
+
}
|
|
231
|
+
}`,cN=[iN,oN,lN,sN].join(`
|
|
232
|
+
|
|
233
|
+
`);function uN(){if(typeof document>"u"||document.getElementById(Cv))return;const e=document.createElement("style");e.id=Cv,e.textContent=cN,document.head.appendChild(e)}function dN({children:e,frozen:n=!1,className:o,style:l}){A.useEffect(()=>{uN()},[]);const c={position:"relative",cursor:"progress",backgroundColor:"var(--ggui-color-surface-subtle, rgba(148, 163, 184, 0.08))",borderRadius:"var(--ggui-shape-radius-md, 8px)",overflow:"hidden",...l},u={position:"absolute",inset:0,backgroundImage:"linear-gradient(110deg, transparent 0%, transparent 40%, rgba(255, 255, 255, 0.22) 50%, transparent 60%, transparent 100%)",backgroundSize:"200% 100%",animation:n?"none":"ggui-preview-shimmer 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite",pointerEvents:"none",mixBlendMode:"overlay"},d={position:"relative",pointerEvents:"none"};return i.jsxs("div",{"data-ggui-preview":"","data-ggui-preview-frozen":n?"":void 0,className:o,style:c,"aria-busy":"true",children:[i.jsx("div",{style:d,children:e}),i.jsx("div",{"aria-hidden":"true",style:u})]})}function sa({children:e,delayMs:n=0,className:o,style:l}){const c={animation:"ggui-preview-fragment-enter 220ms cubic-bezier(0, 0, 0.2, 1) both",animationDelay:`${Math.max(0,n)}ms`,...l};return i.jsx("div",{className:o,style:c,children:e})}function Tv({children:e,streaming:n=!1,className:o,style:l}){const c={display:"inline",...l},u={display:"inline-block",width:"0.5ch",height:"1em",marginLeft:"0.1em",verticalAlign:"text-bottom",borderRight:"0.08em solid currentColor",animation:"ggui-preview-caret 900ms steps(1, end) infinite"};return i.jsxs("span",{className:o,"data-ggui-preview-streaming":n?"":void 0,style:c,children:[e,n?i.jsx("span",{"aria-hidden":"true",style:u}):null]})}var Mv={envelopes:[],complete:!1};function fN(e){const n=A.useContext(Fw),[o,l]=A.useState(Mv);return A.useEffect(()=>{if(l(Mv),n!==null)return n.subscribe(e,c=>{l(u=>({envelopes:[...u.envelopes,c],complete:u.complete||c.complete===!0}))})},[n,e]),o}var pN="root",j$={surfaceId:null,fragments:new Map};function gN(e,n){if("createSurface"in n)return{surfaceId:n.createSurface.surfaceId,fragments:new Map};if("updateComponents"in n){if(e.surfaceId!==n.updateComponents.surfaceId)return e;const o=new Map(e.fragments);for(const l of n.updateComponents.components)o.set(l.id,l);return{...e,fragments:o}}return"deleteSurface"in n?e.surfaceId!==n.deleteSurface.surfaceId?e:j$:e}function mN(e){let n=j$;for(const o of e){const l=Gw(o.payload);l.ok&&(n=gN(n,l.value))}return n}function Ov(){return i.jsx("div",{style:{minHeight:24,minWidth:32,borderRadius:"var(--ggui-shape-radius-sm, 4px)",backgroundColor:"var(--ggui-color-outlineVariant, rgba(148, 163, 184, 0.18))"},"aria-hidden":"true"})}function hN({name:e}){return i.jsx(dp,{padding:12,shadow:"none",border:!0,children:i.jsx(Fa,{size:"xs",tone:"muted",children:`[${e}]`})})}function Zf(e,n){const o=c=>c?c.map(u=>{const d=n.get(u);return d?Zf(d,n):i.jsx(Ov,{},u)}):[],{id:l}=e;switch(e.component){case"Row":return i.jsx(sa,{children:i.jsx(Yr,{gap:e.gap,align:e.align??"stretch",justify:e.justify??"start",children:o(e.children)})},l);case"Column":return i.jsx(sa,{children:i.jsx(br,{direction:"vertical",gap:e.gap,align:e.align??"stretch",justify:e.justify??"start",children:o(e.children)})},l);case"List":return i.jsx(sa,{children:i.jsx(br,{direction:"vertical",gap:8,children:o(e.children)})},l);case"Card":{const c=e.child?n.get(e.child):void 0;return i.jsx(sa,{children:i.jsx(dp,{padding:16,shadow:"sm",children:e.child&&!c?i.jsx(Ov,{}):c?Zf(c,n):null})},l)}case"Divider":return i.jsx(sa,{children:i.jsx(Nc,{orientation:e.orientation??"horizontal"})},l);case"Text":{const c=e.variant??"body",u=/^h([1-6])$/.exec(c);if(u){const p=Number(u[1]);return i.jsx(sa,{children:i.jsx(ll,{level:p,children:i.jsx(Tv,{children:e.text})})},l)}const d=c==="caption"?{size:"xs",tone:"muted"}:c==="label"?{size:"sm",weight:"medium"}:{};return i.jsx(sa,{children:i.jsx(Fa,{...d,children:i.jsx(Tv,{children:e.text})})},l)}case"Image":return i.jsx(sa,{children:i.jsx(g$,{src:e.src,alt:e.alt??""})},l);case"Icon":return i.jsx(sa,{children:i.jsx($t,{name:e.name})},l);case"Button":return i.jsx(sa,{children:i.jsx(Jt,{disabled:!0,children:e.label})},l);case"TextField":return i.jsx(sa,{children:i.jsx(fp,{disabled:!0,label:e.label,placeholder:e.placeholder,value:e.value??"",onChange:Tf})},l);case"CheckBox":return i.jsx(sa,{children:i.jsx(zc,{disabled:!0,label:e.label??"",checked:e.checked??!1,onChange:Tf})},l);case"ChoicePicker":{const c=e.options??[];return i.jsx(sa,{children:i.jsx(f$,{disabled:!0,label:e.label,value:e.value??"",options:c,onChange:Tf})},l)}default:{const c=e;return i.jsx(sa,{children:i.jsx(hN,{name:c.component})},l)}}}function Tf(){}function yN(){return i.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:80},children:i.jsx(Ya,{})})}function vN({suspended:e=!1,fallback:n}={}){const{envelopes:o}=fN(X1),l=A.useMemo(()=>mN(o),[o]);if(e)return null;const c=l.fragments.get(pN);return c?i.jsx(dN,{children:Zf(c,l.fragments)}):i.jsx(i.Fragment,{children:n??i.jsx(yN,{})})}var $N="var(--ggui-font-family-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)",bN={display:"inline-flex",alignItems:"center",gap:4,fontFamily:$N,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"},xN={appearance:"none",background:"transparent",border:"none",padding:"2px 4px",fontFamily:"inherit",fontSize:"inherit",color:"var(--ggui-color-neutral-400, #9ca3af)",cursor:"pointer"},_N={display:"inline-flex",alignItems:"center",gap:4,margin:0},jN={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 SN({onUiFeedback:e,sessionId:n,toolName:o}){const[l,c]=A.useState("idle"),[u,d]=A.useState(""),p=A.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=A.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:bN,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:_N,"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:jN,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:xN,"aria-label":"Dismiss feedback","data-ggui-ui-feedback-dismiss":!0,onClick:()=>c("dismissed"),children:"×"})]})}function wN({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(Rv,{children:i.jsx(vN,{fallback:n})}):i.jsxs(Rv,{children:[i.jsx(rN,{code:e.componentCode,props:e.props,cssOverrides:l,themeId:c,onError:o,fallback:n}),u?i.jsx(SN,{onUiFeedback:u,...d!==void 0?{sessionId:d}:{},...p!==void 0?{toolName:p}:{}}):null]})}function Rv({children:e}){return NN()?i.jsx(i.Fragment,{children:e}):i.jsx(e$,{config:kN,children:e})}var kN={app:{appId:"preview",appName:"preview"},render:{sessionId:"preview",isConnected:!1},auth:{isAuthenticated:!1},dispatch:()=>{},subscribe:()=>()=>{}};function NN(){try{return Xr()}catch{return null}}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 zN({blueprintId:e}){const[n,o]=A.useState({kind:"loading"});return A.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(Av,{title:"loading",num:"BPR / 01",tone:"draft",children:"Loading blueprint…"}):n.kind==="not-found"?i.jsx(TN,{blueprintId:e}):n.kind==="error"?i.jsxs(Av,{title:"error",num:"ERR / 01",tone:"signal",children:["Couldn't load blueprint — ",n.message,"."]}):i.jsx(EN,{blueprint:n.blueprint})]})}function EN({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(CN,{blueprintId:e.blueprintId})]}),i.jsx("div",{className:"ggui-pane__body",children:i.jsx(wN,{render:{componentCode:e.code},fallback:i.jsx("div",{"data-ggui-preview-state":"waiting",className:"ggui-muted",style:{padding:"16px 0"},children:"Loading component…"})})})]})}function CN({blueprintId:e}){const[n,o]=A.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 TN({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:()=>Be("/"),children:"back to landing"})})]})]})}function Av({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 MN(){const[e,n]=A.useState({kind:"loading"}),[o,l]=A.useState({kind:"loading"}),[c,u]=A.useState(""),[d,p]=A.useState(!1);A.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=A.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)})}},[]);A.useEffect(()=>{const x=new AbortController;return g(x.signal),()=>x.abort()},[g]);const h=A.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=A.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=A.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=A.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(Iv,{title:"loading",num:"REG / 01",tone:"draft",children:"Loading…"}):e.kind==="error"?i.jsxs(Iv,{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(ON,{all:e.data.blueprints,shown:(j==null?void 0:j.blueprints)??e.data.blueprints,filterActive:v.length>0}),i.jsx(RN,{state:o,shown:k,filterActive:v.length>0,onInvalidate:h,onClearAll:y})]}),i.jsx(AN,{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 ON({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:()=>Be(`/preview/${encodeURIComponent(l.id)}`),children:"preview →"})})]},l.id))})]})}function RN({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(UN,{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(IN,{}):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 ",Dv(p.cachedAt)]}),p.lastHitAt?i.jsxs("span",{style:{marginLeft:12},children:["last hit ",Dv(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 Dv(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 AN({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(LN,{}):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 IN(){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 UN({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 LN(){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 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 S$({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 VN({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(S$,{blueprint:o,height:n,title:o.variance.persona??o.blueprintId.slice(0,12)},o.blueprintId))})}const w$=["ui-gen-default-haiku-4-5","ui-gen-advanced-opus-4-7"],vp=.8,BN={persona:"",generator:"",draftsOnly:!1};function HN({filters:e,onChange:n,generatorSlugs:o}){const l=o??w$,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 < ",vp.toFixed(2),")"]})]})]})}function qN(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>=vp))}function PN(e){return e>=vp?"live":e>=.5?"draft":"signal"}function ZN(e){return e.kind==="llm"?e.generator:e.kind}function k$({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:ZN(e.source)}),typeof h=="number"?i.jsxs(Me,{tone:PN(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 ",GN(e.createdAt)]}),e.codeHash?i.jsxs("span",{style:{marginLeft:12},children:["hash ",i.jsx("code",{className:"ggui-code",children:FN(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 GN(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 FN(e){return e.length<=12?e:`${e.slice(0,8)}…${e.slice(-4)}`}class ja extends Error{constructor(o,l,c){super(o);gn(this,"code");gn(this,"status");this.name="OpsCallError",this.code=l,c!==void 0&&(this.status=c)}}let YN=1;async function KN(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 ja("Malformed SSE response from /control — no data line",-32700,e.status);return JSON.parse(l[1])}return await e.json()}async function qc(e,n,o){var y,v,j,k;const l=YN++,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 ja(`/control returned HTTP ${d.status}${x?` — ${x}`:""}`,-32e3,d.status)}const p=await KN(d);if("error"in p)throw new ja(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 ja(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 ja(`tool ${e} returned empty result`,-32e3)}function XN(e,n){return qc("ggui_ops_generate_blueprint",{...e,confirm:!0},n)}function $p(e,n){return qc("ggui_ops_list_blueprints",e,n)}function N$(e,n){return qc("ggui_ops_update_blueprint",{...e,confirm:!0},n)}function z$(e,n){return qc("ggui_ops_delete_blueprint",{...e,confirm:!0},n)}function JN({contractHash:e}){var E;const[n,o]=A.useState({kind:"loading"}),[l,c]=A.useState([]),[u,d]=A.useState(!1),p=A.useCallback(async z=>{o({kind:"loading"});try{const w=await $p({contractHash:e},z);o({kind:"ready",blueprints:w.blueprints})}catch(w){if(z!=null&&z.aborted)return;const $=w instanceof ja||w instanceof Error?w.message:String(w);o({kind:"error",message:$})}},[e]);A.useEffect(()=>{const z=new AbortController;return p(z.signal),()=>z.abort()},[p]);const g=A.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=A.useMemo(()=>u?g.filter(z=>l.includes(z.blueprintId)):[],[g,l,u]),v=A.useCallback(z=>{Be(`/preview/${encodeURIComponent(z)}`)},[]),j=A.useCallback(async z=>{try{await N$({blueprintId:z,isOperatorDefault:!0}),await p()}catch(w){const $=w instanceof ja||w instanceof Error?w.message:String(w);o({kind:"error",message:$})}},[p]),k=A.useCallback(async z=>{try{await z$({blueprintId:z}),c(w=>w.filter($=>$!==z)),await p()}catch(w){const $=w instanceof ja||w instanceof Error?w.message:String(w);o({kind:"error",message:$})}},[p]),x=A.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:()=>Be("/admin/variants"),children:"← all variants"})," ",i.jsx("button",{type:"button",className:"ggui-btn","data-ggui-variant-detail-generate":!0,onClick:()=>Be(`/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(VN,{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(k$,{blueprint:z,index:w,onPreview:v,onSetDefault:$=>{j($)},onDelete:$=>{k($)},compareSelected:l.includes(z.blueprintId),onCompareToggle:x})}),i.jsx(S$,{blueprint:z,height:240})]},z.blueprintId))})]})]})}function QN({contract:e,contractHash:n,onSubmit:o,onCancel:l,generatorSlugs:c}){const[u,d]=A.useState(""),[p,g]=A.useState(""),[h,y]=A.useState(""),[v,j]=A.useState(""),[k,x]=A.useState(!1),[E,z]=A.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??w$;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(Mf,{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(Mf,{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(Mf,{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 Mf({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 WN({contractHash:e}){const[n,o]=A.useState({kind:"loading"});return A.useEffect(()=>{const l=new AbortController;return(async()=>{try{const c=await $p({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 ja||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:()=>Be(`/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:()=>Be("/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:()=>Be("/admin/variants"),children:"← all variants"})]})]}):i.jsx(QN,{contract:n.contract,contractHash:e,onSubmit:async l=>{try{const c=await XN(l);return Be(`/preview/${encodeURIComponent(c.blueprintId)}`),{blueprintId:c.blueprintId}}catch(c){return{error:c instanceof ja||c instanceof Error?c.message:String(c)}}},onCancel:()=>Be(`/admin/variants/${encodeURIComponent(e)}`)})]})}function e7(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 t7({blueprints:e,filters:n,onPreview:o,onSetDefault:l,onDelete:c,onOpenContract:u,onGenerate:d}){const p=A.useMemo(()=>e7(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(a7,{group:g,filters:n,onPreview:o,onSetDefault:l,onDelete:c,onOpenContract:u,onGenerate:d},g.contractHash))})}function a7({group:e,filters:n,onPreview:o,onSetDefault:l,onDelete:c,onOpenContract:u,onGenerate:d}){const[p,g]=A.useState(!0),h=e.blueprints.filter(y=>qN(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(k$,{blueprint:y,index:v,onPreview:o,onSetDefault:l,onDelete:c},y.blueprintId))}):null]})}function n7(){const[e,n]=A.useState({kind:"loading"}),[o,l]=A.useState(BN),c=A.useCallback(async y=>{n({kind:"loading"});try{const v=await $p({},y);n({kind:"ready",blueprints:v.blueprints})}catch(v){if(y!=null&&y.aborted)return;const j=v instanceof ja||v instanceof Error?v.message:String(v);n({kind:"error",message:j})}},[]);A.useEffect(()=>{const y=new AbortController;return c(y.signal),()=>y.abort()},[c]);const u=A.useCallback(y=>{Be(`/preview/${encodeURIComponent(y)}`)},[]),d=A.useCallback(async y=>{try{await N$({blueprintId:y,isOperatorDefault:!0}),await c()}catch(v){const j=v instanceof ja||v instanceof Error?v.message:String(v);n({kind:"error",message:j})}},[c]),p=A.useCallback(async y=>{try{await z$({blueprintId:y}),await c()}catch(v){const j=v instanceof ja||v instanceof Error?v.message:String(v);n({kind:"error",message:j})}},[c]),g=A.useCallback(y=>{Be(`/admin/variants/${encodeURIComponent(y)}`)},[]),h=A.useCallback(y=>{Be(`/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(HN,{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(t7,{blueprints:e.blueprints,filters:o,onPreview:u,onSetDefault:y=>{d(y)},onDelete:y=>{p(y)},onOpenContract:g,onGenerate:h}):null]})}function r7(){const[e,n]=A.useState({kind:"loading"}),[o,l]=A.useState(null),[c,u]=A.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)})}};A.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(i7,{clients:e.data.clients,revokingId:o,pendingConfirm:c,onRevokeRequest:g=>u(g),onRevokeCancel:()=>u(null),onRevokeConfirm:g=>{p(g)},onRefresh:()=>{d()}})]})}function i7({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(o7,{client:p,index:g+1,isRevoking:n===p.clientId,isPendingConfirm:o===p.clientId,onRevokeRequest:l,onRevokeCancel:c,onRevokeConfirm:u},p.clientId))})]})}function o7({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:l7(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 l7(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 s7=new Set(["theme"]),c7={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 u7(){const[e,n]=A.useState({kind:"loading"});return A.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(Uv,{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(Uv,{title:"error",num:"ERR / 01",tone:"signal",children:["Couldn't load config — ",e.message,"."]})]}):i.jsx(d7,{data:e.data})}function d7({data:e}){const n=A.useMemo(()=>Object.keys(e.schema.properties??{}).filter(u=>!s7.has(u)),[e.schema]),[o,l]=A.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:f7(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(p7,{data:e}),c==="found-invalid"?null:i.jsxs("div",{className:"ggui-config-stack",children:[i.jsx(g7,{sections:n,active:o,onSelect:l}),i.jsx(m7,{data:e,active:o})]}),e.source.found&&"raw"in e&&e.raw?i.jsx(v7,{raw:e.raw}):null]})}function f7(e){return e.source.found?e.source.error?"Validation failed.":"Loaded from disk.":"No ggui.json reachable."}function p7({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 g7({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 m7({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=c7[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:h7(o)})]}),u?i.jsx(y7,{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 h7(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 y7({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:()=>Be(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 v7({raw:e}){const[n,o]=A.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 Uv({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 $7(){const[e,n]=A.useState([]),[o,l]=A.useState("loading"),[c,u]=A.useState(null),[d,p]=A.useState(new Set),g=A.useRef(new Set);A.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(b7,{event:y,expanded:d.has(y.id),onToggle:()=>h(y.id)},y.id))})]})]})]})}function b7({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(x7,{event:e}):null]})}function x7({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(Gr,{label:"error",children:i.jsx("pre",{style:Xo,children:e.error.message})}):null,e.systemPrompt?i.jsx(Gr,{label:"system prompt",children:i.jsx("pre",{style:Xo,children:e.systemPrompt})}):null,e.userPrompt?i.jsx(Gr,{label:"user prompt",children:i.jsx("pre",{style:Xo,children:e.userPrompt})}):null,e.tools&&e.tools.length>0?i.jsx(Gr,{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(Gr,{label:"completion text",children:i.jsx("pre",{style:Xo,children:e.result.text})}):null,(o=e.result)!=null&&o.toolCalls&&e.result.toolCalls.length>0?i.jsx(Gr,{label:`tool calls (${e.result.toolCalls.length})`,children:i.jsx("pre",{style:Xo,children:JSON.stringify(e.result.toolCalls,null,2)})}):null,(l=e.result)!=null&&l.turnsUsed?i.jsx(Gr,{label:"agentic turns",children:i.jsx("span",{className:"ggui-muted",children:e.result.turnsUsed})}):null]})}function Gr({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 Xo={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 _7(){const[e,n]=A.useState([]),[o,l]=A.useState("loading"),[c,u]=A.useState(null),[d,p]=A.useState(new Set),g=A.useRef(new Set);A.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(j7,{event:y,expanded:d.has(y.id),onToggle:()=>h(y.id)},y.id))})]})]})]})}function j7({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(S7,{outcome:p,fails:u,warns:d})]}),n?i.jsx(w7,{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 S7({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 w7({event:e}){const n=k7(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(Za,{label:"error",children:i.jsx("pre",{style:bc,children:e.error.message})}):null,i.jsx(Za,{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(Za,{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(Za,{label:`fired check ids (${e.summary.firedCheckIds.length})`,children:i.jsx("pre",{style:bc,children:e.summary.firedCheckIds.join(`
|
|
234
|
+
`)})}):null,n.axis.length>0?i.jsx(Za,{label:`axis issues (${n.axis.length})`,children:i.jsx($c,{issues:n.axis})}):null,n.tier0.length>0?i.jsx(Za,{label:`tier-0 issues (${n.tier0.length})`,children:i.jsx($c,{issues:n.tier0})}):null,n.tier1.length>0?i.jsx(Za,{label:`tier-1 issues (${n.tier1.length})`,children:i.jsx($c,{issues:n.tier1})}):null,n.tier2.length>0?i.jsx(Za,{label:`tier-2 issues (${n.tier2.length})`,children:i.jsx($c,{issues:n.tier2})}):null,e.prompt?i.jsx(Za,{label:"prompt",children:i.jsx("pre",{style:bc,children:e.prompt})}):null,e.sourceCode?i.jsx(Za,{label:"source under check",children:i.jsx("pre",{style:bc,children:e.sourceCode})}):null]})}function k7(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 Za({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 N7(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 z7(){const[e,n]=A.useState([]),[o,l]=A.useState("loading"),[c,u]=A.useState(null),[d,p]=A.useState(new Set),[g,h]=A.useState("all"),[y,v]=A.useState("all"),j=A.useRef(new Set);A.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 I=[...C.events].reverse();for(const te of I)j.current.add(te.id);n(I),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=E7(e),E=C7(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(T7,{filter:g,onFilter:h,counts:x}),i.jsx(M7,{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(O7,{event:$,expanded:d.has($.id),onToggle:()=>k($.id)},$.id))})]})]})]})}function E7(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 C7(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 T7({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 M7({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 O7({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=N7(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(R7,{outcome:u}),e.strategy?i.jsx(A7,{strategy:e.strategy}):null,e.agentClassification?i.jsx(E$,{classification:e.agentClassification}):null,e.validatorFindings&&e.validatorFindings.length>0?i.jsx(C$,{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 R7({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 A7({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 E$({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 C$({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(er,{label:"reason",children:i.jsx("p",{style:{margin:0,fontSize:13},children:e.reason})}),i.jsx(er,{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(er,{label:"agent classification",children:i.jsxs("div",{style:{display:"flex",gap:8,alignItems:"baseline",fontFamily:"var(--ggui-font-mono)",fontSize:12},children:[i.jsx(E$,{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(er,{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(er,{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(C$,{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(er,{label:"intent",children:i.jsx("pre",{style:I7,children:e.intent||"(empty)"})}),i.jsx(er,{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(er,{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 er({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 I7={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 U7(){const[e,n]=A.useState({kind:"loading"}),[o,l]=A.useState({kind:"idle"}),[c,u]=A.useState(null),[d,p]=A.useState(0);A.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=A.useCallback(h=>{u(h),p(0),l({kind:"loading",sessionId:h})},[]);return A.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(L7,{state:e,pickedSessionId:c,onPick:g}),i.jsx(B7,{state:o,scrubIndex:d,onScrub:p})]})]})}function L7({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(V7,{render:l,selected:l.sessionId===n,onClick:()=>o(l.sessionId)},l.sessionId))})})]})}function V7({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 ",G7(e.lastActivityAt)]})]})})}function B7({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:T$(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(H7,{state:e,scrubIndex:n,onScrub:o})}function H7({state:e,scrubIndex:n,onScrub:o}){const{events:l,status:c,streamSeq:u}=e.data,d=l.length,p=A.useMemo(()=>d===0?0:Math.max(0,Math.min(n,d-1)),[n,d]),g=d>0?l[p]:null,h=A.useCallback(()=>{d!==0&&o(Math.max(0,p-1))},[o,p,d]),y=A.useCallback(()=>{d!==0&&o(Math.min(d-1,p+1))},[o,p,d]),v=A.useCallback(()=>o(0),[o]),j=A.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:T$(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(q7,{event:g}):null]})]})]})}function q7({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:Z7(e.timestamp)})]}),i.jsx("pre",{style:P7,children:F7(e.data)})]})}const P7={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 T$(e){return e.length>16?`${e.slice(0,16)}…`:e}function Z7(e){try{return(typeof e=="number"?new Date(e):new Date(e)).toISOString().slice(11,23)}catch{return String(e)}}function G7(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 F7(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}function Y7(){const[e,n]=A.useState([]),[o,l]=A.useState("loading"),[c,u]=A.useState(null),[d,p]=A.useState(new Set),g=A.useRef(new Set);A.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(K7,{event:y,expanded:d.has(y.id),onToggle:()=>h(y.id)},y.id))})]})]})]})}function K7({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:Q7(e.byteSize)})]}),n?i.jsx(X7,{event:e}):null]})}function X7({event:e}){const n=J7(e.payload);return i.jsxs("div",{style:{marginTop:10,paddingTop:10,borderTop:"1px solid var(--ggui-rule)",display:"grid",gap:12},children:[i.jsx(Lv,{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(Lv,{label:"payload",children:i.jsx("pre",{style:W7,children:n})})]})}function Lv({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 J7(e){try{return JSON.stringify(e,null,2)??"undefined"}catch{return"[unstringifiable]"}}function Q7(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 W7={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"},Of="ggui-console:benchmark-dashboard-url",ez="https://benchmarks.ggui.ai";function tz(){const[e,n]=A.useState(""),[o,l]=A.useState("");A.useEffect(()=>{const u=localStorage.getItem(Of);u&&(n(u),l(u))},[]);const c=u=>{const d=u.trim();n(d),d?localStorage.setItem(Of,d):localStorage.removeItem(Of)};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:ez,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 az={"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 nz({route:e}){return e.kind==="devtools-index"?i.jsx(Vv,{}):e.kind==="devtools-llm-trace"?i.jsx($7,{}):e.kind==="devtools-validator"?i.jsx(_7,{}):e.kind==="devtools-cache"?i.jsx(z7,{}):e.kind==="devtools-timeline"?i.jsx(U7,{}):e.kind==="devtools-payloads"?i.jsx(Y7,{}):e.kind==="devtools-benchmarks"?i.jsx(tz,{}):i.jsx(Vv,{})}function Vv(){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(az).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 rz(){const[e,n]=A.useState({kind:"loading"}),[o,l]=A.useState(null),[c,u]=A.useState(null),[d,p]=A.useState(""),[g,h]=A.useState(!1),[y,v]=A.useState(null),[j,k]=A.useState(null),x=async()=>{n({kind:"loading"});try{const w=await fetch("/ggui/console/keys",{headers:{accept:"application/json"}});if(w.status===401){Be(`/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)})}};A.useEffect(()=>{x()},[]);const E=async w=>{l(w);try{const $=await fetch(`/ggui/console/keys/${encodeURIComponent(w)}`,{method:"DELETE"});if($.status===401){Be(`/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){Be(`/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(iz,{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(lz,{keys:e.data.keys,revokingId:o,pendingConfirm:c,onRevokeRequest:w=>u(w),onRevokeCancel:()=>u(null),onRevokeConfirm:w=>{E(w)},onRefresh:()=>{x()}})]})}function iz({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(oz,{result:c,onDismiss:d}):null]})]})}function oz({result:e,onDismiss:n}){const[o,l]=A.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 lz({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(sz,{entry:p,index:g+1,isRevoking:n===p.pairingId,isPendingConfirm:o===p.pairingId,onRevokeRequest:l,onRevokeCancel:c,onRevokeConfirm:u},p.pairingId))})]})}function sz({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:Bv(e.createdAt)})]}),e.lastUsedAt!==void 0?i.jsxs("span",{style:{marginLeft:12},children:["used"," ",i.jsx("code",{className:"ggui-code",children:Bv(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 Bv(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 cz(){const[e,n]=A.useState({kind:"loading"}),[o,l]=A.useState("");A.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=A.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(qv,{title:"loading",num:"MCP / 01",tone:"draft",children:"Loading tool inventory…"}):e.kind==="error"?i.jsxs(qv,{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(uz,{all:e.data.tools,shown:u??e.data.tools,filterActive:c.length>0})]})]})}function uz({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(dz,{tool:l,index:c+1},l.name))})]})}function dz({tool:e,index:n}){const[o,l]=A.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(Hv,{label:"input",schema:e.inputSchema}),i.jsx(Hv,{label:"output",schema:e.outputSchema})]}):null]})}function Hv({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 qv({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 fz(){const[e,n]=A.useState({kind:"loading"}),[o,l]=A.useState("");A.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=A.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(Pv,{title:"loading",num:"SES / 01",tone:"draft",children:"Loading sessions…"}):e.kind==="error"?i.jsxs(Pv,{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(pz,{all:e.data.sessions,shown:u??e.data.sessions,filterActive:c.length>0})]})]})}function pz({all:e,shown:n,filterActive:o}){return e.length===0?i.jsx(hz,{}):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(gz,{render:l,index:c+1},l.sessionId))})]})}function gz({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:mz(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 mz(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 hz(){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 Pv({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 yz(){const[e,n]=A.useState({kind:"loading"}),[o,l]=A.useState({kind:"loading"});return A.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(jz,{state:o}),i.jsxs("div",{className:"ggui-status-grid",children:[i.jsx(vz,{state:e}),i.jsx($z,{state:e}),i.jsx(bz,{state:e}),i.jsx(_z,{state:e})]})]})}function vz({state:e}){return i.jsx($n,{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 $z({state:e}){if(e.kind!=="ok")return i.jsx($n,{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($n,{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($n,{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($n,{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 bz({state:e}){if(e.kind!=="ok")return i.jsx($n,{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($n,{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:xz(n.generation)})]})]})})}function xz(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 _z({state:e}){if(e.kind!=="ok")return i.jsx($n,{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($n,{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 jz({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:()=>Be("/"),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:Sz(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:()=>Be("/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:()=>Be("/admin/sessions"),children:"view all →"})})]})}function Sz(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 $n({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 wz(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 nr(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}: ${wz(c)};`):c!==null&&typeof c=="object"&&nr(c,`${n}-${l}`,o))}function kz(e){const n=[];return nr(e.color,"color",n),nr(e.font,"font",n),nr(e.spacing,"spacing",n),nr(e.shape,"shape",n),nr({duration:e.motion.duration,easing:e.motion.easing,transition:e.motion.transition},"motion",n),nr(e.accessibility,"accessibility",n),nr(e.zIndex,"zIndex",n),n.join(`
|
|
235
|
+
`)}function Nz(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} {
|
|
236
|
+
${l.join(`
|
|
237
|
+
`)}
|
|
238
|
+
}`}function zz(e){const n=[];for(const[o,l]of Object.entries(e.motion.keyframes))o.startsWith("$")||n.push(Nz(o,String(l.$value)));return n.join(`
|
|
239
|
+
|
|
240
|
+
`)}function Ez(e,n){const l=`:root {
|
|
241
|
+
${kz(n)}
|
|
242
|
+
}`,c=zz(n),u=c?`${l}
|
|
243
|
+
|
|
244
|
+
${c}`:l;return{id:e,name:n.$name,description:n.$description,metadata:n.$metadata,cssVariables:l,cssKeyframes:c,css:u}}const 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"}}}},da={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}},Pc={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)"}},dr={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:Pc,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"}}}},Cz={$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:dr.font,spacing:dr.spacing,shape:dr.shape,motion:dr.motion,accessibility:{...tt.light,focusRing:{...tt.light.focusRing,color:{$type:"color",$value:"#292929"}}},zIndex:da},Tz={$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:dr.font,spacing:dr.spacing,shape:dr.shape,motion:dr.motion,accessibility:{...tt.dark,focusRing:{...tt.dark.focusRing,color:{$type:"color",$value:"#f4f3ed"}}},zIndex:da},Mz={light:Cz,dark:Tz},fr={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)"}}}},Oz={$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:fr.font,spacing:fr.spacing,shape:fr.shape,motion:fr.motion,accessibility:{...tt.light,focusRing:{...tt.light.focusRing,color:{$type:"color",$value:"#06b6d4"}}},zIndex:da},Rz={$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:fr.font,spacing:fr.spacing,shape:fr.shape,motion:fr.motion,accessibility:{...tt.dark,focusRing:{...tt.dark.focusRing,color:{$type:"color",$value:"#22d3ee"}}},zIndex:da},Az={light:Oz,dark:Rz},pr={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:pr.font,spacing:pr.spacing,shape:pr.shape,motion:pr.motion,accessibility:{...tt.light,focusRing:{...tt.light.focusRing,color:{$type:"color",$value:"#748660"}}},zIndex:da},Iz={$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:pr.font,spacing:pr.spacing,shape:pr.shape,motion:pr.motion,accessibility:{...tt.dark,focusRing:{...tt.dark.focusRing,color:{$type:"color",$value:"#93a17c"}}},zIndex:da},Uz={light:Dz,dark:Iz},gr={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"}}}},Lz={$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:gr.font,spacing:gr.spacing,shape:gr.shape,motion:gr.motion,accessibility:{...tt.dark,focusRing:{...tt.dark.focusRing,color:{$value:"#ec4899",$type:"color"}}},zIndex:da},Vz={$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:gr.font,spacing:gr.spacing,shape:gr.shape,motion:gr.motion,accessibility:{...tt.dark,focusRing:{...tt.dark.focusRing,color:{$value:"#f472b6",$type:"color"}}},zIndex:da},Bz={light:Lz,dark:Vz},mr={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:Pc}},Hz={$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:mr.font,spacing:mr.spacing,shape:mr.shape,motion:mr.motion,accessibility:{...tt.light,focusRing:{...tt.light.focusRing,color:{$type:"color",$value:"#16a34a"}}},zIndex:da},qz={$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:mr.font,spacing:mr.spacing,shape:mr.shape,motion:mr.motion,accessibility:{...tt.dark,focusRing:{...tt.dark.focusRing,color:{$type:"color",$value:"#4ade80"}}},zIndex:da},Pz={light:Hz,dark:qz},Zz={...Pc,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)"}},hr={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:Zz}},Gz={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"}},Fz={$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:{...Gz},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:hr.font,spacing:hr.spacing,shape:hr.shape,motion:hr.motion,accessibility:{...tt.light,focusRing:{...tt.light.focusRing,color:{$type:"color",$value:"#cc785c"}}},zIndex:da},Yz={$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:hr.font,spacing:hr.spacing,shape:hr.shape,motion:hr.motion,accessibility:{...tt.dark,focusRing:{...tt.dark.focusRing,color:{$type:"color",$value:"#d6896c"}}},zIndex:da},Kz={light:Fz,dark:Yz},yr={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:Pc}},Xz={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"}},Jz={$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:{...Xz},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:yr.font,spacing:yr.spacing,shape:yr.shape,motion:yr.motion,accessibility:{...tt.light,focusRing:{...tt.light.focusRing,color:{$type:"color",$value:"#4f46e5"}}},zIndex:da},Qz={$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:yr.font,spacing:yr.spacing,shape:yr.shape,motion:yr.motion,accessibility:{...tt.dark,focusRing:{...tt.dark.focusRing,color:{$type:"color",$value:"#818cf8"}}},zIndex:da},Wz={light:Jz,dark:Qz},M$=new Map([["ggui",Mz],["indigo",Wz],["claudic",Kz],["premium-cyberpunk",Az],["premium-zen",Uz],["premium-neon-noir",Bz],["premium-botanical",Pz]]);function eE(e,n){return n==="dark"&&e.dark?"dark":"light"}function O$(e,n="light"){const o=M$.get(e);return o?eE(o,n)==="dark"?o.dark:o.light:void 0}function tE(){const e=[];for(const[n,o]of M$){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}A.createContext(null);function aE(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 nE(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 rE(){var _;const e=A.useMemo(()=>tE(),[]),n=((_=e[0])==null?void 0:_.id)??"ggui",[o,l]=A.useState({kind:"loading"}),[c,u]=A.useState(n),[d,p]=A.useState("light"),[g,h]=A.useState(!1),[y,v]=A.useState(null),[j,k]=A.useState(!1),[x,E]=A.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){Be(`/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 I=aE(C.current,n);u(I.presetId),p(I.mode),k(I.fromFile),E({...I.overrides})}catch(S){l({kind:"error",message:String(S)})}};A.useEffect(()=>{z()},[]);const w=(S,C)=>{E(I=>{const te={...I};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 I;try{I=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:I,mode:d})});if(H.status===401){Be(`/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(nE(c,d,x))});if(S.status===401){Be(`/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(iE,{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 iE({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,$=O$(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(dE,{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(sE,{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(cE,{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(fE,{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 oE(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 lE="https://github.com/ggui-ai/ggui/blob/main/design/CUSTOM_THEMES.md";function sE({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:lE,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 cE({rawTheme:e,overrides:n,onSetOverride:o,onClearAll:l}){const c=A.useMemo(()=>oE(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(uE,{path:p.path,presetValue:p.value,overrideValue:n[p.path]??null,onChange:o},p.path))})]},d.prefix))]})}function uE({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 dE({preset:e,selected:n,mode:o,onSelect:l}){var g;const c=e.modes.includes("dark"),u=O$(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 R$(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 fE({presetId:e,mode:n,rawTheme:o,overrides:l}){const c=A.useMemo(()=>`ggui-theme-preview-${e}-${n}`,[e,n]),u=A.useMemo(()=>{const d=R$(o,l),p=Ez(e,d);return`${p.cssVariables.replace(/^:root\s*\{/,`.${c} {`)}
|
|
245
|
+
${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(pE,{presetName:o.$name,mode:n}),i.jsx(gE,{}),i.jsx(mE,{}),i.jsx(hE,{}),i.jsx(yE,{theme:o,overrides:l}),i.jsx(vE,{})]})]})}function pE({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 gE(){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 mE(){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 hE(){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 yE({theme:e,overrides:n}){const o=A.useMemo(()=>R$(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 vE(){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)","success"),e("var(--ggui-color-warning)","warning"),e("var(--ggui-color-error)","error"),e("var(--ggui-color-info)","info")]})}const A$={kind:"admin-index"};function $E(){return typeof window>"u"?A$:gx(window.location.pathname)}function bE(){return A$}function xE(){const e=A.useSyncExternalStore(mx,$E,bE);return e.kind==="blueprint"?i.jsx(Bt,{route:e,variant:"narrow",children:i.jsx(zN,{blueprintId:e.blueprintId})}):e.kind==="admin-index"||e.kind==="admin-status"?i.jsx(Bt,{route:e,variant:"admin",children:i.jsx(yz,{})}):e.kind==="admin-sessions"?i.jsx(Bt,{route:e,variant:"admin",children:i.jsx(fz,{})}):e.kind==="admin-blueprints"?i.jsx(Bt,{route:e,variant:"admin",children:i.jsx(MN,{})}):e.kind==="admin-variants"?i.jsx(Bt,{route:e,variant:"admin",children:i.jsx(n7,{})}):e.kind==="admin-variant-detail"?i.jsx(Bt,{route:e,variant:"admin",children:i.jsx(JN,{contractHash:e.contractHash})}):e.kind==="admin-variant-generate"?i.jsx(Bt,{route:e,variant:"admin",children:i.jsx(WN,{contractHash:e.contractHash})}):e.kind==="admin-config"?i.jsx(Bt,{route:e,variant:"admin",children:i.jsx(u7,{})}):e.kind==="admin-tools"?i.jsx(Bt,{route:e,variant:"admin",children:i.jsx(cz,{})}):e.kind==="admin-llm-keys"?i.jsx(Bt,{route:e,variant:"admin",children:i.jsx(Mx,{})}):e.kind==="admin-connector-keys"?i.jsx(Bt,{route:e,variant:"admin",children:i.jsx(rz,{})}):e.kind==="admin-oauth-providers"?i.jsx(Bt,{route:e,variant:"admin",children:i.jsx(Dx,{})}):e.kind==="admin-clients"?i.jsx(Bt,{route:e,variant:"admin",children:i.jsx(r7,{})}):e.kind==="admin-theme"?i.jsx(Bt,{route:e,variant:"admin",children:i.jsx(rE,{})}):e.kind==="admin-login"?i.jsx(Bt,{route:e,variant:"narrow",children:i.jsx(Ex,{})}):Zv(e)?i.jsx(Bt,{route:e,variant:"devtools",children:i.jsx(nz,{route:e})}):i.jsx(Bt,{route:e,variant:"narrow",children:i.jsx(_E,{pathname:e.pathname})})}function _E({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:()=>Be("/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:()=>Be("/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 D$=document.getElementById("root");if(!D$)throw new Error("console: #root element missing from index.html");fx.createRoot(D$).render(i.jsx(A.StrictMode,{children:i.jsx(xE,{})}));export{al as g,cx as r};
|