@ggui-ai/console 0.11.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,227 +0,0 @@
|
|
|
1
|
-
var Yb=Object.defineProperty;var Kb=(e,n,o)=>n in e?Yb(e,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[n]=o;var pn=(e,n,o)=>Kb(e,typeof n!="symbol"?n+"":n,o);(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))l(c);new MutationObserver(c=>{for(const u of c)if(u.type==="childList")for(const d of u.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&l(d)}).observe(document,{childList:!0,subtree:!0});function o(c){const u={};return c.integrity&&(u.integrity=c.integrity),c.referrerPolicy&&(u.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?u.credentials="include":c.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function l(c){if(c.ep)return;c.ep=!0;const u=o(c);fetch(c.href,u)}})();function al(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ef={exports:{}},Ho={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.production.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var ph;function Jb(){if(ph)return Ho;ph=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function o(l,c,u){var d=null;if(u!==void 0&&(d=""+u),c.key!==void 0&&(d=""+c.key),"key"in c){u={};for(var p in c)p!=="key"&&(u[p]=c[p])}else u=c;return c=u.ref,{$$typeof:e,type:l,key:d,ref:c!==void 0?c:null,props:u}}return Ho.Fragment=n,Ho.jsx=o,Ho.jsxs=o,Ho}var gh;function Xb(){return gh||(gh=1,ef.exports=Jb()),ef.exports}var i=Xb(),tf={exports:{}},Ne={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react.production.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var mh;function Wb(){if(mh)return Ne;mh=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),d=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),j=Symbol.iterator;function k(T){return T===null||typeof T!="object"?null:(T=j&&T[j]||T["@@iterator"],typeof T=="function"?T:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},z=Object.assign,E={};function w(T,L,B){this.props=T,this.context=L,this.refs=E,this.updater=B||x}w.prototype.isReactComponent={},w.prototype.setState=function(T,L){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,L,"setState")},w.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function $(){}$.prototype=w.prototype;function N(T,L,B){this.props=T,this.context=L,this.refs=E,this.updater=B||x}var R=N.prototype=new $;R.constructor=N,z(R,w.prototype),R.isPureReactComponent=!0;var _=Array.isArray;function S(){}var C={H:null,A:null,T:null,S:null},U=Object.prototype.hasOwnProperty;function te(T,L,B){var O=B.ref;return{$$typeof:e,type:T,key:L,ref:O!==void 0?O:null,props:B}}function Z(T,L){return te(T.type,L,T.props)}function V(T){return typeof T=="object"&&T!==null&&T.$$typeof===e}function Y(T){var L={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(B){return L[B]})}var G=/\/+/g;function ie(T,L){return typeof T=="object"&&T!==null&&T.key!=null?Y(""+T.key):L.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(L){T.status==="pending"&&(T.status="fulfilled",T.value=L)},function(L){T.status==="pending"&&(T.status="rejected",T.reason=L)})),T.status){case"fulfilled":return T.value;case"rejected":throw T.reason}}throw T}function ae(T,L,B,O,A){var J=typeof T;(J==="undefined"||J==="boolean")&&(T=null);var pe=!1;if(T===null)pe=!0;else switch(J){case"bigint":case"string":case"number":pe=!0;break;case"object":switch(T.$$typeof){case e:case n:pe=!0;break;case y:return pe=T._init,ae(pe(T._payload),L,B,O,A)}}if(pe)return A=A(T),pe=O===""?"."+ie(T,0):O,_(A)?(B="",pe!=null&&(B=pe.replace(G,"$&/")+"/"),ae(A,L,B,"",function(Te){return Te})):A!=null&&(V(A)&&(A=Z(A,B+(A.key==null||T&&T.key===A.key?"":(""+A.key).replace(G,"$&/")+"/")+pe)),L.push(A)),1;pe=0;var he=O===""?".":O+":";if(_(T))for(var Se=0;Se<T.length;Se++)O=T[Se],J=he+ie(O,Se),pe+=ae(O,L,B,J,A);else if(Se=k(T),typeof Se=="function")for(T=Se.call(T),Se=0;!(O=T.next()).done;)O=O.value,J=he+ie(O,Se++),pe+=ae(O,L,B,J,A);else if(J==="object"){if(typeof T.then=="function")return ae(_e(T),L,B,O,A);throw L=String(T),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.")}return pe}function fe(T,L,B){if(T==null)return T;var O=[],A=0;return ae(T,O,"","",function(J){return L.call(B,J,A++)}),O}function ge(T){if(T._status===-1){var L=T._result;L=L(),L.then(function(B){(T._status===0||T._status===-1)&&(T._status=1,T._result=B)},function(B){(T._status===0||T._status===-1)&&(T._status=2,T._result=B)}),T._status===-1&&(T._status=0,T._result=L)}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 L=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(L))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",T);return}console.error(T)},re={map:fe,forEach:function(T,L,B){fe(T,function(){L.apply(this,arguments)},B)},count:function(T){var L=0;return fe(T,function(){L++}),L},toArray:function(T){return fe(T,function(L){return L})||[]},only:function(T){if(!V(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,L,B){if(T==null)throw Error("The argument must be a React element, but you passed "+T+".");var O=z({},T.props),A=T.key;if(L!=null)for(J in L.key!==void 0&&(A=""+L.key),L)!U.call(L,J)||J==="key"||J==="__self"||J==="__source"||J==="ref"&&L.ref===void 0||(O[J]=L[J]);var J=arguments.length-2;if(J===1)O.children=B;else if(1<J){for(var pe=Array(J),he=0;he<J;he++)pe[he]=arguments[he+2];O.children=pe}return te(T.type,A,O)},Ne.createContext=function(T){return T={$$typeof:d,_currentValue:T,_currentValue2:T,_threadCount:0,Provider:null,Consumer:null},T.Provider=T,T.Consumer={$$typeof:u,_context:T},T},Ne.createElement=function(T,L,B){var O,A={},J=null;if(L!=null)for(O in L.key!==void 0&&(J=""+L.key),L)U.call(L,O)&&O!=="key"&&O!=="__self"&&O!=="__source"&&(A[O]=L[O]);var pe=arguments.length-2;if(pe===1)A.children=B;else if(1<pe){for(var he=Array(pe),Se=0;Se<pe;Se++)he[Se]=arguments[Se+2];A.children=he}if(T&&T.defaultProps)for(O in pe=T.defaultProps,pe)A[O]===void 0&&(A[O]=pe[O]);return te(T,J,A)},Ne.createRef=function(){return{current:null}},Ne.forwardRef=function(T){return{$$typeof:p,render:T}},Ne.isValidElement=V,Ne.lazy=function(T){return{$$typeof:y,_payload:{_status:-1,_result:T},_init:ge}},Ne.memo=function(T,L){return{$$typeof:h,type:T,compare:L===void 0?null:L}},Ne.startTransition=function(T){var L=C.T,B={};C.T=B;try{var O=T(),A=C.S;A!==null&&A(B,O),typeof O=="object"&&O!==null&&typeof O.then=="function"&&O.then(S,ke)}catch(J){ke(J)}finally{L!==null&&B.types!==null&&(L.types=B.types),C.T=L}},Ne.unstable_useCacheRefresh=function(){return C.H.useCacheRefresh()},Ne.use=function(T){return C.H.use(T)},Ne.useActionState=function(T,L,B){return C.H.useActionState(T,L,B)},Ne.useCallback=function(T,L){return C.H.useCallback(T,L)},Ne.useContext=function(T){return C.H.useContext(T)},Ne.useDebugValue=function(){},Ne.useDeferredValue=function(T,L){return C.H.useDeferredValue(T,L)},Ne.useEffect=function(T,L){return C.H.useEffect(T,L)},Ne.useEffectEvent=function(T){return C.H.useEffectEvent(T)},Ne.useId=function(){return C.H.useId()},Ne.useImperativeHandle=function(T,L,B){return C.H.useImperativeHandle(T,L,B)},Ne.useInsertionEffect=function(T,L){return C.H.useInsertionEffect(T,L)},Ne.useLayoutEffect=function(T,L){return C.H.useLayoutEffect(T,L)},Ne.useMemo=function(T,L){return C.H.useMemo(T,L)},Ne.useOptimistic=function(T,L){return C.H.useOptimistic(T,L)},Ne.useReducer=function(T,L,B){return C.H.useReducer(T,L,B)},Ne.useRef=function(T){return C.H.useRef(T)},Ne.useState=function(T){return C.H.useState(T)},Ne.useSyncExternalStore=function(T,L,B){return C.H.useSyncExternalStore(T,L,B)},Ne.useTransition=function(){return C.H.useTransition()},Ne.version="19.2.8",Ne}var hh;function qf(){return hh||(hh=1,tf.exports=Wb()),tf.exports}var D=qf();const xc=al(D);var af={exports:{}},qo={},nf={exports:{}},rf={};/**
|
|
18
|
-
* @license React
|
|
19
|
-
* scheduler.production.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the MIT license found in the
|
|
24
|
-
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var yh;function Qb(){return yh||(yh=1,(function(e){function n(ae,fe){var ge=ae.length;ae.push(fe);e:for(;0<ge;){var ke=ge-1>>>1,re=ae[ke];if(0<c(re,fe))ae[ke]=fe,ae[ge]=re,ge=ke;else break e}}function o(ae){return ae.length===0?null:ae[0]}function l(ae){if(ae.length===0)return null;var fe=ae[0],ge=ae.pop();if(ge!==fe){ae[0]=ge;e:for(var ke=0,re=ae.length,T=re>>>1;ke<T;){var L=2*(ke+1)-1,B=ae[L],O=L+1,A=ae[O];if(0>c(B,ge))O<re&&0>c(A,B)?(ae[ke]=A,ae[O]=ge,ke=O):(ae[ke]=B,ae[L]=ge,ke=L);else if(O<re&&0>c(A,ge))ae[ke]=A,ae[O]=ge,ke=O;else break e}}return fe}function c(ae,fe){var ge=ae.sortIndex-fe.sortIndex;return ge!==0?ge:ae.id-fe.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var d=Date,p=d.now();e.unstable_now=function(){return d.now()-p}}var g=[],h=[],y=1,v=null,j=3,k=!1,x=!1,z=!1,E=!1,w=typeof setTimeout=="function"?setTimeout:null,$=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;function R(ae){for(var fe=o(h);fe!==null;){if(fe.callback===null)l(h);else if(fe.startTime<=ae)l(h),fe.sortIndex=fe.expirationTime,n(g,fe);else break;fe=o(h)}}function _(ae){if(z=!1,R(ae),!x)if(o(g)!==null)x=!0,S||(S=!0,Y());else{var fe=o(h);fe!==null&&_e(_,fe.startTime-ae)}}var S=!1,C=-1,U=5,te=-1;function Z(){return E?!0:!(e.unstable_now()-te<U)}function V(){if(E=!1,S){var ae=e.unstable_now();te=ae;var fe=!0;try{e:{x=!1,z&&(z=!1,$(C),C=-1),k=!0;var ge=j;try{t:{for(R(ae),v=o(g);v!==null&&!(v.expirationTime>ae&&Z());){var ke=v.callback;if(typeof ke=="function"){v.callback=null,j=v.priorityLevel;var re=ke(v.expirationTime<=ae);if(ae=e.unstable_now(),typeof re=="function"){v.callback=re,R(ae),fe=!0;break t}v===o(g)&&l(g),R(ae)}else l(g);v=o(g)}if(v!==null)fe=!0;else{var T=o(h);T!==null&&_e(_,T.startTime-ae),fe=!1}}break e}finally{v=null,j=ge,k=!1}fe=void 0}}finally{fe?Y():S=!1}}}var Y;if(typeof N=="function")Y=function(){N(V)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,ie=G.port2;G.port1.onmessage=V,Y=function(){ie.postMessage(null)}}else Y=function(){w(V,0)};function _e(ae,fe){C=w(function(){ae(e.unstable_now())},fe)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(ae){ae.callback=null},e.unstable_forceFrameRate=function(ae){0>ae||125<ae?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):U=0<ae?Math.floor(1e3/ae):5},e.unstable_getCurrentPriorityLevel=function(){return j},e.unstable_next=function(ae){switch(j){case 1:case 2:case 3:var fe=3;break;default:fe=j}var ge=j;j=fe;try{return ae()}finally{j=ge}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(ae,fe){switch(ae){case 1:case 2:case 3:case 4:case 5:break;default:ae=3}var ge=j;j=ae;try{return fe()}finally{j=ge}},e.unstable_scheduleCallback=function(ae,fe,ge){var ke=e.unstable_now();switch(typeof ge=="object"&&ge!==null?(ge=ge.delay,ge=typeof ge=="number"&&0<ge?ke+ge:ke):ge=ke,ae){case 1:var re=-1;break;case 2:re=250;break;case 5:re=1073741823;break;case 4:re=1e4;break;default:re=5e3}return re=ge+re,ae={id:y++,callback:fe,priorityLevel:ae,startTime:ge,expirationTime:re,sortIndex:-1},ge>ke?(ae.sortIndex=ge,n(h,ae),o(g)===null&&ae===o(h)&&(z?($(C),C=-1):z=!0,_e(_,ge-ke))):(ae.sortIndex=re,n(g,ae),x||k||(x=!0,S||(S=!0,Y()))),ae},e.unstable_shouldYield=Z,e.unstable_wrapCallback=function(ae){var fe=j;return function(){var ge=j;j=fe;try{return ae.apply(this,arguments)}finally{j=ge}}}})(rf)),rf}var vh;function ex(){return vh||(vh=1,nf.exports=Qb()),nf.exports}var of={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 tx(){if($h)return Pt;$h=1;var e=qf();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 bh;function ax(){if(bh)return of.exports;bh=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),of.exports=tx(),of.exports}/**
|
|
34
|
-
* @license React
|
|
35
|
-
* react-dom-client.production.js
|
|
36
|
-
*
|
|
37
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
-
*
|
|
39
|
-
* This source code is licensed under the MIT license found in the
|
|
40
|
-
* LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/var xh;function nx(){if(xh)return qo;xh=1;var e=ex(),n=qf(),o=ax();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"),z=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),$=Symbol.for("react.consumer"),N=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),S=Symbol.for("react.suspense_list"),C=Symbol.for("react.memo"),U=Symbol.for("react.lazy"),te=Symbol.for("react.activity"),Z=Symbol.for("react.memo_cache_sentinel"),V=Symbol.iterator;function Y(t){return t===null||typeof t!="object"?null:(t=V&&t[V]||t["@@iterator"],typeof t=="function"?t:null)}var G=Symbol.for("react.client.reference");function ie(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===G?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case z:return"Fragment";case w:return"Profiler";case E:return"StrictMode";case _:return"Suspense";case S:return"SuspenseList";case te:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case x:return"Portal";case N:return t.displayName||"Context";case $:return(t._context.displayName||"Context")+".Consumer";case R:var a=t.render;return t=t.displayName,t||(t=a.displayName||a.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case C:return a=t.displayName||null,a!==null?a:ie(t.type)||"Memo";case U:a=t._payload,t=t._init;try{return ie(t(a))}catch{}}return null}var _e=Array.isArray,ae=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,fe=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ge={pending:!1,data:null,method:null,action:null},ke=[],re=-1;function T(t){return{current:t}}function L(t){0>re||(t.current=ke[re],ke[re]=null,re--)}function B(t,a){re++,ke[re]=t.current,t.current=a}var O=T(null),A=T(null),J=T(null),pe=T(null);function he(t,a){switch(B(J,a),B(A,t),B(O,null),a.nodeType){case 9:case 11:t=(t=a.documentElement)&&(t=t.namespaceURI)?Dm(t):0;break;default:if(t=a.tagName,a=a.namespaceURI)a=Dm(a),t=Um(a,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}L(O),B(O,t)}function Se(){L(O),L(A),L(J)}function Te(t){t.memoizedState!==null&&B(pe,t);var a=O.current,r=Um(a,t.type);a!==r&&(B(A,t),B(O,r))}function q(t){A.current===t&&(L(O),L(A)),pe.current===t&&(L(pe),Bo._currentValue=ge)}var Q,ue;function me(t){if(Q===void 0)try{throw Error()}catch(r){var a=r.stack.trim().match(/\n( *(at )?)/);Q=a&&a[1]||"",ue=-1<r.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<r.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+Q+t+ue}var ve=!1;function Ee(t,a){if(!t||ve)return"";ve=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(a){var ce=function(){throw Error()};if(Object.defineProperty(ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ce,[])}catch(ne){var ee=ne}Reflect.construct(t,[],ce)}else{try{ce.call()}catch(ne){ee=ne}t.call(ce.prototype)}}else{try{throw Error()}catch(ne){ee=ne}(ce=t())&&typeof ce.catch=="function"&&ce.catch(function(){})}}catch(ne){if(ne&&ee&&typeof ne.stack=="string")return[ne.stack,ee.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=s.DetermineComponentFrameRoot(),b=m[0],M=m[1];if(b&&M){var I=b.split(`
|
|
44
|
-
`),X=M.split(`
|
|
45
|
-
`);for(f=s=0;s<I.length&&!I[s].includes("DetermineComponentFrameRoot");)s++;for(;f<X.length&&!X[f].includes("DetermineComponentFrameRoot");)f++;if(s===I.length||f===X.length)for(s=I.length-1,f=X.length-1;1<=s&&0<=f&&I[s]!==X[f];)f--;for(;1<=s&&0<=f;s--,f--)if(I[s]!==X[f]){if(s!==1||f!==1)do if(s--,f--,0>f||I[s]!==X[f]){var oe=`
|
|
46
|
-
`+I[s].replace(" at new "," at ");return t.displayName&&oe.includes("<anonymous>")&&(oe=oe.replace("<anonymous>",t.displayName)),oe}while(1<=s&&0<=f);break}}}finally{ve=!1,Error.prepareStackTrace=r}return(r=t?t.displayName||t.name:"")?me(r):""}function 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 Ee(t.type,!1);case 11:return Ee(t.type.render,!1);case 1:return Ee(t.type,!0);case 31:return me("Activity");default:return""}}function ea(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 Ct=Object.prototype.hasOwnProperty,Tt=e.unstable_scheduleCallback,ht=e.unstable_cancelCallback,_n=e.unstable_shouldYield,ta=e.unstable_requestPaint,Dt=e.unstable_now,Ki=e.unstable_getCurrentPriorityLevel,jn=e.unstable_ImmediatePriority,Gr=e.unstable_UserBlockingPriority,xr=e.unstable_NormalPriority,sl=e.unstable_LowPriority,cl=e.unstable_IdlePriority,C1=e.log,T1=e.unstable_setDisableYieldValue,Ji=null,da=null;function Sn(t){if(typeof C1=="function"&&T1(t),da&&typeof da.setStrictMode=="function")try{da.setStrictMode(Ji,t)}catch{}}var fa=Math.clz32?Math.clz32:R1,M1=Math.log,O1=Math.LN2;function R1(t){return t>>>=0,t===0?32:31-(M1(t)/O1|0)|0}var ul=256,dl=262144,fl=4194304;function _r(t){var a=t&42;if(a!==0)return a;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function pl(t,a,r){var s=t.pendingLanes;if(s===0)return 0;var f=0,m=t.suspendedLanes,b=t.pingedLanes;t=t.warmLanes;var M=s&134217727;return M!==0?(s=M&~m,s!==0?f=_r(s):(b&=M,b!==0?f=_r(b):r||(r=M&~t,r!==0&&(f=_r(r))))):(M=s&~m,M!==0?f=_r(M):b!==0?f=_r(b):r||(r=s&~t,r!==0&&(f=_r(r)))),f===0?0:a!==0&&a!==f&&(a&m)===0&&(m=f&-f,r=a&-a,m>=r||m===32&&(r&4194048)!==0)?a:f}function Xi(t,a){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&a)===0}function A1(t,a){switch(t){case 1:case 2:case 4:case 8:case 64:return a+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function yp(){var t=fl;return fl<<=1,(fl&62914560)===0&&(fl=4194304),t}function Vc(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 D1(t,a,r,s,f,m){var b=t.pendingLanes;t.pendingLanes=r,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=r,t.entangledLanes&=r,t.errorRecoveryDisabledLanes&=r,t.shellSuspendCounter=0;var M=t.entanglements,I=t.expirationTimes,X=t.hiddenUpdates;for(r=b&~r;0<r;){var oe=31-fa(r),ce=1<<oe;M[oe]=0,I[oe]=-1;var ee=X[oe];if(ee!==null)for(X[oe]=null,oe=0;oe<ee.length;oe++){var ne=ee[oe];ne!==null&&(ne.lane&=-536870913)}r&=~ce}s!==0&&vp(t,s,0),m!==0&&f===0&&t.tag!==0&&(t.suspendedLanes|=m&~(b&~a))}function vp(t,a,r){t.pendingLanes|=a,t.suspendedLanes&=~a;var s=31-fa(a);t.entangledLanes|=a,t.entanglements[s]=t.entanglements[s]|1073741824|r&261930}function $p(t,a){var r=t.entangledLanes|=a;for(t=t.entanglements;r;){var s=31-fa(r),f=1<<s;f&a|t[s]&a&&(t[s]|=a),r&=~f}}function bp(t,a){var r=a&-a;return r=(r&42)!==0?1:Hc(r),(r&(t.suspendedLanes|a))!==0?0:r}function Hc(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 qc(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function xp(){var t=fe.p;return t!==0?t:(t=window.event,t===void 0?32:oh(t.type))}function _p(t,a){var r=fe.p;try{return fe.p=t,a()}finally{fe.p=r}}var wn=Math.random().toString(36).slice(2),Ut="__reactFiber$"+wn,aa="__reactProps$"+wn,Yr="__reactContainer$"+wn,Pc="__reactEvents$"+wn,U1="__reactListeners$"+wn,I1="__reactHandles$"+wn,jp="__reactResources$"+wn,Qi="__reactMarker$"+wn;function Zc(t){delete t[Ut],delete t[aa],delete t[Pc],delete t[U1],delete t[I1]}function Kr(t){var a=t[Ut];if(a)return a;for(var r=t.parentNode;r;){if(a=r[Yr]||r[Ut]){if(r=a.alternate,a.child!==null||r!==null&&r.child!==null)for(t=qm(t);t!==null;){if(r=t[Ut])return r;t=qm(t)}return a}t=r,r=t.parentNode}return null}function Jr(t){if(t=t[Ut]||t[Yr]){var a=t.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return t}return null}function eo(t){var a=t.tag;if(a===5||a===26||a===27||a===6)return t.stateNode;throw Error(l(33))}function Xr(t){var a=t[jp];return a||(a=t[jp]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function Mt(t){t[Qi]=!0}var Sp=new Set,wp={};function jr(t,a){Wr(t,a),Wr(t+"Capture",a)}function Wr(t,a){for(wp[t]=a,t=0;t<a.length;t++)Sp.add(a[t])}var B1=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),kp={},Np={};function L1(t){return Ct.call(Np,t)?!0:Ct.call(kp,t)?!1:B1.test(t)?Np[t]=!0:(kp[t]=!0,!1)}function gl(t,a,r){if(L1(a))if(r===null)t.removeAttribute(a);else{switch(typeof r){case"undefined":case"function":case"symbol":t.removeAttribute(a);return;case"boolean":var s=a.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){t.removeAttribute(a);return}}t.setAttribute(a,""+r)}}function ml(t,a,r){if(r===null)t.removeAttribute(a);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}t.setAttribute(a,""+r)}}function Ya(t,a,r,s){if(s===null)t.removeAttribute(r);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(r);return}t.setAttributeNS(a,r,""+s)}}function ja(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Ep(t){var a=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function F1(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 Gc(t){if(!t._valueTracker){var a=Ep(t)?"checked":"value";t._valueTracker=F1(t,a,""+t[a])}}function zp(t){if(!t)return!1;var a=t._valueTracker;if(!a)return!0;var r=a.getValue(),s="";return t&&(s=Ep(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 V1=/[\n"\\]/g;function Sa(t){return t.replace(V1,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function Yc(t,a,r,s,f,m,b,M){t.name="",b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?t.type=b:t.removeAttribute("type"),a!=null?b==="number"?(a===0&&t.value===""||t.value!=a)&&(t.value=""+ja(a)):t.value!==""+ja(a)&&(t.value=""+ja(a)):b!=="submit"&&b!=="reset"||t.removeAttribute("value"),a!=null?Kc(t,b,ja(a)):r!=null?Kc(t,b,ja(r)):s!=null&&t.removeAttribute("value"),f==null&&m!=null&&(t.defaultChecked=!!m),f!=null&&(t.checked=f&&typeof f!="function"&&typeof f!="symbol"),M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?t.name=""+ja(M):t.removeAttribute("name")}function Cp(t,a,r,s,f,m,b,M){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(t.type=m),a!=null||r!=null){if(!(m!=="submit"&&m!=="reset"||a!=null)){Gc(t);return}r=r!=null?""+ja(r):"",a=a!=null?""+ja(a):r,M||a===t.value||(t.value=a),t.defaultValue=a}s=s??f,s=typeof s!="function"&&typeof s!="symbol"&&!!s,t.checked=M?t.checked:!!s,t.defaultChecked=!!s,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(t.name=b),Gc(t)}function Kc(t,a,r){a==="number"&&hl(t.ownerDocument)===t||t.defaultValue===""+r||(t.defaultValue=""+r)}function Qr(t,a,r,s){if(t=t.options,a){a={};for(var f=0;f<r.length;f++)a["$"+r[f]]=!0;for(r=0;r<t.length;r++)f=a.hasOwnProperty("$"+t[r].value),t[r].selected!==f&&(t[r].selected=f),f&&s&&(t[r].defaultSelected=!0)}else{for(r=""+ja(r),a=null,f=0;f<t.length;f++){if(t[f].value===r){t[f].selected=!0,s&&(t[f].defaultSelected=!0);return}a!==null||t[f].disabled||(a=t[f])}a!==null&&(a.selected=!0)}}function Tp(t,a,r){if(a!=null&&(a=""+ja(a),a!==t.value&&(t.value=a),r==null)){t.defaultValue!==a&&(t.defaultValue=a);return}t.defaultValue=r!=null?""+ja(r):""}function Mp(t,a,r,s){if(a==null){if(s!=null){if(r!=null)throw Error(l(92));if(_e(s)){if(1<s.length)throw Error(l(93));s=s[0]}r=s}r==null&&(r=""),a=r}r=ja(a),t.defaultValue=r,s=t.textContent,s===r&&s!==""&&s!==null&&(t.value=s),Gc(t)}function ei(t,a){if(a){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=a;return}}t.textContent=a}var H1=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Op(t,a,r){var s=a.indexOf("--")===0;r==null||typeof r=="boolean"||r===""?s?t.setProperty(a,""):a==="float"?t.cssFloat="":t[a]="":s?t.setProperty(a,r):typeof r!="number"||r===0||H1.has(a)?a==="float"?t.cssFloat=r:t[a]=(""+r).trim():t[a]=r+"px"}function Rp(t,a,r){if(a!=null&&typeof a!="object")throw Error(l(62));if(t=t.style,r!=null){for(var s in r)!r.hasOwnProperty(s)||a!=null&&a.hasOwnProperty(s)||(s.indexOf("--")===0?t.setProperty(s,""):s==="float"?t.cssFloat="":t[s]="");for(var f in a)s=a[f],a.hasOwnProperty(f)&&r[f]!==s&&Op(t,f,s)}else for(var m in a)a.hasOwnProperty(m)&&Op(t,m,a[m])}function Jc(t){if(t.indexOf("-")===-1)return!1;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var q1=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"]]),P1=/^[\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 P1.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Ka(){}var Xc=null;function Wc(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var ti=null,ai=null;function Ap(t){var a=Jr(t);if(a&&(t=a.stateNode)){var r=t[aa]||null;e:switch(t=a.stateNode,a.type){case"input":if(Yc(t,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name),a=r.name,r.type==="radio"&&a!=null){for(r=t;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll('input[name="'+Sa(""+a)+'"][type="radio"]'),a=0;a<r.length;a++){var s=r[a];if(s!==t&&s.form===t.form){var f=s[aa]||null;if(!f)throw Error(l(90));Yc(s,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(a=0;a<r.length;a++)s=r[a],s.form===t.form&&zp(s)}break e;case"textarea":Tp(t,r.value,r.defaultValue);break e;case"select":a=r.value,a!=null&&Qr(t,!!r.multiple,a,!1)}}}var Qc=!1;function Dp(t,a,r){if(Qc)return t(a,r);Qc=!0;try{var s=t(a);return s}finally{if(Qc=!1,(ti!==null||ai!==null)&&(rs(),ti&&(a=ti,t=ai,ai=ti=null,Ap(a),t)))for(a=0;a<t.length;a++)Ap(t[a])}}function to(t,a){var r=t.stateNode;if(r===null)return null;var s=r[aa]||null;if(s===null)return null;r=s[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(t=t.type,s=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!s;break e;default:t=!1}if(t)return null;if(r&&typeof r!="function")throw Error(l(231,a,typeof r));return r}var Ja=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),eu=!1;if(Ja)try{var ao={};Object.defineProperty(ao,"passive",{get:function(){eu=!0}}),window.addEventListener("test",ao,ao),window.removeEventListener("test",ao,ao)}catch{eu=!1}var kn=null,tu=null,vl=null;function Up(){if(vl)return vl;var t,a=tu,r=a.length,s,f="value"in kn?kn.value:kn.textContent,m=f.length;for(t=0;t<r&&a[t]===f[t];t++);var b=r-t;for(s=1;s<=b&&a[r-s]===f[m-s];s++);return vl=f.slice(t,1<s?1-s:void 0)}function $l(t){var a=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&a===13&&(t=13)):t=a,t===10&&(t=13),32<=t||t===13?t:0}function bl(){return!0}function Ip(){return!1}function na(t){function a(r,s,f,m,b){this._reactName=r,this._targetInst=f,this.type=s,this.nativeEvent=m,this.target=b,this.currentTarget=null;for(var M in t)t.hasOwnProperty(M)&&(r=t[M],this[M]=r?r(m):m[M]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?bl:Ip,this.isPropagationStopped=Ip,this}return v(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=bl)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=bl)},persist:function(){},isPersistent:bl}),a}var Sr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},xl=na(Sr),no=v({},Sr,{view:0,detail:0}),Z1=na(no),au,nu,ro,_l=v({},no,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:iu,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==ro&&(ro&&t.type==="mousemove"?(au=t.screenX-ro.screenX,nu=t.screenY-ro.screenY):nu=au=0,ro=t),au)},movementY:function(t){return"movementY"in t?t.movementY:nu}}),Bp=na(_l),G1=v({},_l,{dataTransfer:0}),Y1=na(G1),K1=v({},no,{relatedTarget:0}),ru=na(K1),J1=v({},Sr,{animationName:0,elapsedTime:0,pseudoElement:0}),X1=na(J1),W1=v({},Sr,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),Q1=na(W1),e2=v({},Sr,{data:0}),Lp=na(e2),t2={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},a2={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"},n2={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function r2(t){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(t):(t=n2[t])?!!a[t]:!1}function iu(){return r2}var i2=v({},no,{key:function(t){if(t.key){var a=t2[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"?a2[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:iu,charCode:function(t){return t.type==="keypress"?$l(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?$l(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),o2=na(i2),l2=v({},_l,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Fp=na(l2),s2=v({},no,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:iu}),c2=na(s2),u2=v({},Sr,{propertyName:0,elapsedTime:0,pseudoElement:0}),d2=na(u2),f2=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}),p2=na(f2),g2=v({},Sr,{newState:0,oldState:0}),m2=na(g2),h2=[9,13,27,32],ou=Ja&&"CompositionEvent"in window,io=null;Ja&&"documentMode"in document&&(io=document.documentMode);var y2=Ja&&"TextEvent"in window&&!io,Vp=Ja&&(!ou||io&&8<io&&11>=io),Hp=" ",qp=!1;function Pp(t,a){switch(t){case"keyup":return h2.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Zp(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var ni=!1;function v2(t,a){switch(t){case"compositionend":return Zp(a);case"keypress":return a.which!==32?null:(qp=!0,Hp);case"textInput":return t=a.data,t===Hp&&qp?null:t;default:return null}}function $2(t,a){if(ni)return t==="compositionend"||!ou&&Pp(t,a)?(t=Up(),vl=tu=kn=null,ni=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return Vp&&a.locale!=="ko"?null:a.data;default:return null}}var b2={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 Gp(t){var a=t&&t.nodeName&&t.nodeName.toLowerCase();return a==="input"?!!b2[t.type]:a==="textarea"}function Yp(t,a,r,s){ti?ai?ai.push(s):ai=[s]:ti=s,a=ds(a,"onChange"),0<a.length&&(r=new xl("onChange","change",null,r,s),t.push({event:r,listeners:a}))}var oo=null,lo=null;function x2(t){Cm(t,0)}function jl(t){var a=eo(t);if(zp(a))return t}function Kp(t,a){if(t==="change")return a}var Jp=!1;if(Ja){var lu;if(Ja){var su="oninput"in document;if(!su){var Xp=document.createElement("div");Xp.setAttribute("oninput","return;"),su=typeof Xp.oninput=="function"}lu=su}else lu=!1;Jp=lu&&(!document.documentMode||9<document.documentMode)}function Wp(){oo&&(oo.detachEvent("onpropertychange",Qp),lo=oo=null)}function Qp(t){if(t.propertyName==="value"&&jl(lo)){var a=[];Yp(a,lo,t,Wc(t)),Dp(x2,a)}}function _2(t,a,r){t==="focusin"?(Wp(),oo=a,lo=r,oo.attachEvent("onpropertychange",Qp)):t==="focusout"&&Wp()}function j2(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return jl(lo)}function S2(t,a){if(t==="click")return jl(a)}function w2(t,a){if(t==="input"||t==="change")return jl(a)}function k2(t,a){return t===a&&(t!==0||1/t===1/a)||t!==t&&a!==a}var pa=typeof Object.is=="function"?Object.is:k2;function so(t,a){if(pa(t,a))return!0;if(typeof t!="object"||t===null||typeof a!="object"||a===null)return!1;var r=Object.keys(t),s=Object.keys(a);if(r.length!==s.length)return!1;for(s=0;s<r.length;s++){var f=r[s];if(!Ct.call(a,f)||!pa(t[f],a[f]))return!1}return!0}function e0(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function t0(t,a){var r=e0(t);t=0;for(var s;r;){if(r.nodeType===3){if(s=t+r.textContent.length,t<=a&&s>=a)return{node:r,offset:a-t};t=s}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=e0(r)}}function a0(t,a){return t&&a?t===a?!0:t&&t.nodeType===3?!1:a&&a.nodeType===3?a0(t,a.parentNode):"contains"in t?t.contains(a):t.compareDocumentPosition?!!(t.compareDocumentPosition(a)&16):!1:!1}function n0(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var a=hl(t.document);a instanceof t.HTMLIFrameElement;){try{var r=typeof a.contentWindow.location.href=="string"}catch{r=!1}if(r)t=a.contentWindow;else break;a=hl(t.document)}return a}function cu(t){var a=t&&t.nodeName&&t.nodeName.toLowerCase();return a&&(a==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||a==="textarea"||t.contentEditable==="true")}var N2=Ja&&"documentMode"in document&&11>=document.documentMode,ri=null,uu=null,co=null,du=!1;function r0(t,a,r){var s=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;du||ri==null||ri!==hl(s)||(s=ri,"selectionStart"in s&&cu(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),co&&so(co,s)||(co=s,s=ds(uu,"onSelect"),0<s.length&&(a=new xl("onSelect","select",null,a,r),t.push({event:a,listeners:s}),a.target=ri)))}function wr(t,a){var r={};return r[t.toLowerCase()]=a.toLowerCase(),r["Webkit"+t]="webkit"+a,r["Moz"+t]="moz"+a,r}var ii={animationend:wr("Animation","AnimationEnd"),animationiteration:wr("Animation","AnimationIteration"),animationstart:wr("Animation","AnimationStart"),transitionrun:wr("Transition","TransitionRun"),transitionstart:wr("Transition","TransitionStart"),transitioncancel:wr("Transition","TransitionCancel"),transitionend:wr("Transition","TransitionEnd")},fu={},i0={};Ja&&(i0=document.createElement("div").style,"AnimationEvent"in window||(delete ii.animationend.animation,delete ii.animationiteration.animation,delete ii.animationstart.animation),"TransitionEvent"in window||delete ii.transitionend.transition);function kr(t){if(fu[t])return fu[t];if(!ii[t])return t;var a=ii[t],r;for(r in a)if(a.hasOwnProperty(r)&&r in i0)return fu[t]=a[r];return t}var o0=kr("animationend"),l0=kr("animationiteration"),s0=kr("animationstart"),E2=kr("transitionrun"),z2=kr("transitionstart"),C2=kr("transitioncancel"),c0=kr("transitionend"),u0=new Map,pu="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");pu.push("scrollEnd");function Ra(t,a){u0.set(t,a),jr(a,[t])}var Sl=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},wa=[],oi=0,gu=0;function wl(){for(var t=oi,a=gu=oi=0;a<t;){var r=wa[a];wa[a++]=null;var s=wa[a];wa[a++]=null;var f=wa[a];wa[a++]=null;var m=wa[a];if(wa[a++]=null,s!==null&&f!==null){var b=s.pending;b===null?f.next=f:(f.next=b.next,b.next=f),s.pending=f}m!==0&&d0(r,f,m)}}function kl(t,a,r,s){wa[oi++]=t,wa[oi++]=a,wa[oi++]=r,wa[oi++]=s,gu|=s,t.lanes|=s,t=t.alternate,t!==null&&(t.lanes|=s)}function mu(t,a,r,s){return kl(t,a,r,s),Nl(t)}function Nr(t,a){return kl(t,null,null,a),Nl(t)}function d0(t,a,r){t.lanes|=r;var s=t.alternate;s!==null&&(s.lanes|=r);for(var f=!1,m=t.return;m!==null;)m.childLanes|=r,s=m.alternate,s!==null&&(s.childLanes|=r),m.tag===22&&(t=m.stateNode,t===null||t._visibility&1||(f=!0)),t=m,m=m.return;return t.tag===3?(m=t.stateNode,f&&a!==null&&(f=31-fa(r),t=m.hiddenUpdates,s=t[f],s===null?t[f]=[a]:s.push(a),a.lane=r|536870912),m):null}function Nl(t){if(50<Mo)throw Mo=0,Sd=null,Error(l(185));for(var a=t.return;a!==null;)t=a,a=t.return;return t.tag===3?t.stateNode:null}var li={};function T2(t,a,r,s){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ga(t,a,r,s){return new T2(t,a,r,s)}function hu(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Xa(t,a){var r=t.alternate;return r===null?(r=ga(t.tag,a,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=a,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=t.flags&65011712,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,a=t.dependencies,r.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r.refCleanup=t.refCleanup,r}function f0(t,a){t.flags&=65011714;var r=t.alternate;return r===null?(t.childLanes=0,t.lanes=a,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=r.childLanes,t.lanes=r.lanes,t.child=r.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=r.memoizedProps,t.memoizedState=r.memoizedState,t.updateQueue=r.updateQueue,t.type=r.type,a=r.dependencies,t.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),t}function El(t,a,r,s,f,m){var b=0;if(s=t,typeof t=="function")hu(t)&&(b=1);else if(typeof t=="string")b=Db(t,r,O.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case te:return t=ga(31,r,a,f),t.elementType=te,t.lanes=m,t;case z:return Er(r.children,f,m,a);case E:b=8,f|=24;break;case w:return t=ga(12,r,a,f|2),t.elementType=w,t.lanes=m,t;case _:return t=ga(13,r,a,f),t.elementType=_,t.lanes=m,t;case S:return t=ga(19,r,a,f),t.elementType=S,t.lanes=m,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case N:b=10;break e;case $:b=9;break e;case R:b=11;break e;case C:b=14;break e;case U:b=16,s=null;break e}b=29,r=Error(l(130,t===null?"null":typeof t,"")),s=null}return a=ga(b,r,a,f),a.elementType=t,a.type=s,a.lanes=m,a}function Er(t,a,r,s){return t=ga(7,t,s,a),t.lanes=r,t}function yu(t,a,r){return t=ga(6,t,null,a),t.lanes=r,t}function p0(t){var a=ga(18,null,null,0);return a.stateNode=t,a}function vu(t,a,r){return a=ga(4,t.children!==null?t.children:[],t.key,a),a.lanes=r,a.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},a}var g0=new WeakMap;function ka(t,a){if(typeof t=="object"&&t!==null){var r=g0.get(t);return r!==void 0?r:(a={value:t,source:a,stack:ea(a)},g0.set(t,a),a)}return{value:t,source:a,stack:ea(a)}}var si=[],ci=0,zl=null,uo=0,Na=[],Ea=0,Nn=null,La=1,Fa="";function Wa(t,a){si[ci++]=uo,si[ci++]=zl,zl=t,uo=a}function m0(t,a,r){Na[Ea++]=La,Na[Ea++]=Fa,Na[Ea++]=Nn,Nn=t;var s=La;t=Fa;var f=32-fa(s)-1;s&=~(1<<f),r+=1;var m=32-fa(a)+f;if(30<m){var b=f-f%5;m=(s&(1<<b)-1).toString(32),s>>=b,f-=b,La=1<<32-fa(a)+f|r<<f|s,Fa=m+t}else La=1<<m|r<<f|s,Fa=t}function $u(t){t.return!==null&&(Wa(t,1),m0(t,1,0))}function bu(t){for(;t===zl;)zl=si[--ci],si[ci]=null,uo=si[--ci],si[ci]=null;for(;t===Nn;)Nn=Na[--Ea],Na[Ea]=null,Fa=Na[--Ea],Na[Ea]=null,La=Na[--Ea],Na[Ea]=null}function h0(t,a){Na[Ea++]=La,Na[Ea++]=Fa,Na[Ea++]=Nn,La=a.id,Fa=a.overflow,Nn=t}var It=null,rt=null,Be=!1,En=null,za=!1,xu=Error(l(519));function zn(t){var a=Error(l(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw fo(ka(a,t)),xu}function y0(t){var a=t.stateNode,r=t.type,s=t.memoizedProps;switch(a[Ut]=t,a[aa]=s,r){case"dialog":De("cancel",a),De("close",a);break;case"iframe":case"object":case"embed":De("load",a);break;case"video":case"audio":for(r=0;r<Ro.length;r++)De(Ro[r],a);break;case"source":De("error",a);break;case"img":case"image":case"link":De("error",a),De("load",a);break;case"details":De("toggle",a);break;case"input":De("invalid",a),Cp(a,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":De("invalid",a);break;case"textarea":De("invalid",a),Mp(a,s.value,s.defaultValue,s.children)}r=s.children,typeof r!="string"&&typeof r!="number"&&typeof r!="bigint"||a.textContent===""+r||s.suppressHydrationWarning===!0||Rm(a.textContent,r)?(s.popover!=null&&(De("beforetoggle",a),De("toggle",a)),s.onScroll!=null&&De("scroll",a),s.onScrollEnd!=null&&De("scrollend",a),s.onClick!=null&&(a.onclick=Ka),a=!0):a=!1,a||zn(t,!0)}function v0(t){for(It=t.return;It;)switch(It.tag){case 5:case 31:case 13:za=!1;return;case 27:case 3:za=!0;return;default:It=It.return}}function ui(t){if(t!==It)return!1;if(!Be)return v0(t),Be=!0,!1;var a=t.tag,r;if((r=a!==3&&a!==27)&&((r=a===5)&&(r=t.type,r=!(r!=="form"&&r!=="button")||Bd(t.type,t.memoizedProps)),r=!r),r&&rt&&zn(t),v0(t),a===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(317));rt=Hm(t)}else if(a===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(317));rt=Hm(t)}else a===27?(a=rt,Hn(t.type)?(t=qd,qd=null,rt=t):rt=a):rt=It?Ta(t.stateNode.nextSibling):null;return!0}function zr(){rt=It=null,Be=!1}function _u(){var t=En;return t!==null&&(la===null?la=t:la.push.apply(la,t),En=null),t}function fo(t){En===null?En=[t]:En.push(t)}var ju=T(null),Cr=null,Qa=null;function Cn(t,a,r){B(ju,a._currentValue),a._currentValue=r}function en(t){t._currentValue=ju.current,L(ju)}function Su(t,a,r){for(;t!==null;){var s=t.alternate;if((t.childLanes&a)!==a?(t.childLanes|=a,s!==null&&(s.childLanes|=a)):s!==null&&(s.childLanes&a)!==a&&(s.childLanes|=a),t===r)break;t=t.return}}function wu(t,a,r,s){var f=t.child;for(f!==null&&(f.return=t);f!==null;){var m=f.dependencies;if(m!==null){var b=f.child;m=m.firstContext;e:for(;m!==null;){var M=m;m=f;for(var I=0;I<a.length;I++)if(M.context===a[I]){m.lanes|=r,M=m.alternate,M!==null&&(M.lanes|=r),Su(m.return,r,t),s||(b=null);break e}m=M.next}}else if(f.tag===18){if(b=f.return,b===null)throw Error(l(341));b.lanes|=r,m=b.alternate,m!==null&&(m.lanes|=r),Su(b,r,t),b=null}else b=f.child;if(b!==null)b.return=f;else for(b=f;b!==null;){if(b===t){b=null;break}if(f=b.sibling,f!==null){f.return=b.return,b=f;break}b=b.return}f=b}}function di(t,a,r,s){t=null;for(var f=a,m=!1;f!==null;){if(!m){if((f.flags&524288)!==0)m=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var b=f.alternate;if(b===null)throw Error(l(387));if(b=b.memoizedProps,b!==null){var M=f.type;pa(f.pendingProps.value,b.value)||(t!==null?t.push(M):t=[M])}}else if(f===pe.current){if(b=f.alternate,b===null)throw Error(l(387));b.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(t!==null?t.push(Bo):t=[Bo])}f=f.return}t!==null&&wu(a,t,r,s),a.flags|=262144}function Cl(t){for(t=t.firstContext;t!==null;){if(!pa(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Tr(t){Cr=t,Qa=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Bt(t){return $0(Cr,t)}function Tl(t,a){return Cr===null&&Tr(t),$0(t,a)}function $0(t,a){var r=a._currentValue;if(a={context:a,memoizedValue:r,next:null},Qa===null){if(t===null)throw Error(l(308));Qa=a,t.dependencies={lanes:0,firstContext:a},t.flags|=524288}else Qa=Qa.next=a;return r}var M2=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()})}},O2=e.unstable_scheduleCallback,R2=e.unstable_NormalPriority,xt={$$typeof:N,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ku(){return{controller:new M2,data:new Map,refCount:0}}function po(t){t.refCount--,t.refCount===0&&O2(R2,function(){t.controller.abort()})}var go=null,Nu=0,fi=0,pi=null;function A2(t,a){if(go===null){var r=go=[];Nu=0,fi=Cd(),pi={status:"pending",value:void 0,then:function(s){r.push(s)}}}return Nu++,a.then(b0,b0),a}function b0(){if(--Nu===0&&go!==null){pi!==null&&(pi.status="fulfilled");var t=go;go=null,fi=0,pi=null;for(var a=0;a<t.length;a++)(0,t[a])()}}function D2(t,a){var r=[],s={status:"pending",value:null,reason:null,then:function(f){r.push(f)}};return t.then(function(){s.status="fulfilled",s.value=a;for(var f=0;f<r.length;f++)(0,r[f])(a)},function(f){for(s.status="rejected",s.reason=f,f=0;f<r.length;f++)(0,r[f])(void 0)}),s}var x0=ae.S;ae.S=function(t,a){rm=Dt(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&A2(t,a),x0!==null&&x0(t,a)};var Mr=T(null);function Eu(){var t=Mr.current;return t!==null?t:nt.pooledCache}function Ml(t,a){a===null?B(Mr,Mr.current):B(Mr,a.pool)}function _0(){var t=Eu();return t===null?null:{parent:xt._currentValue,pool:t}}var gi=Error(l(460)),zu=Error(l(474)),Ol=Error(l(542)),Rl={then:function(){}};function j0(t){return t=t.status,t==="fulfilled"||t==="rejected"}function S0(t,a,r){switch(r=t[r],r===void 0?t.push(a):r!==a&&(a.then(Ka,Ka),a=r),a.status){case"fulfilled":return a.value;case"rejected":throw t=a.reason,k0(t),t;default:if(typeof a.status=="string")a.then(Ka,Ka);else{if(t=nt,t!==null&&100<t.shellSuspendCounter)throw Error(l(482));t=a,t.status="pending",t.then(function(s){if(a.status==="pending"){var f=a;f.status="fulfilled",f.value=s}},function(s){if(a.status==="pending"){var f=a;f.status="rejected",f.reason=s}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw t=a.reason,k0(t),t}throw Rr=a,gi}}function Or(t){try{var a=t._init;return a(t._payload)}catch(r){throw r!==null&&typeof r=="object"&&typeof r.then=="function"?(Rr=r,gi):r}}var Rr=null;function w0(){if(Rr===null)throw Error(l(459));var t=Rr;return Rr=null,t}function k0(t){if(t===gi||t===Ol)throw Error(l(483))}var mi=null,mo=0;function Al(t){var a=mo;return mo+=1,mi===null&&(mi=[]),S0(mi,t,a)}function ho(t,a){a=a.props.ref,t.ref=a!==void 0?a:null}function Dl(t,a){throw a.$$typeof===j?Error(l(525)):(t=Object.prototype.toString.call(a),Error(l(31,t==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":t)))}function N0(t){function a(H,F){if(t){var K=H.deletions;K===null?(H.deletions=[F],H.flags|=16):K.push(F)}}function r(H,F){if(!t)return null;for(;F!==null;)a(H,F),F=F.sibling;return null}function s(H){for(var F=new Map;H!==null;)H.key!==null?F.set(H.key,H):F.set(H.index,H),H=H.sibling;return F}function f(H,F){return H=Xa(H,F),H.index=0,H.sibling=null,H}function m(H,F,K){return H.index=K,t?(K=H.alternate,K!==null?(K=K.index,K<F?(H.flags|=67108866,F):K):(H.flags|=67108866,F)):(H.flags|=1048576,F)}function b(H){return t&&H.alternate===null&&(H.flags|=67108866),H}function M(H,F,K,se){return F===null||F.tag!==6?(F=yu(K,H.mode,se),F.return=H,F):(F=f(F,K),F.return=H,F)}function I(H,F,K,se){var je=K.type;return je===z?oe(H,F,K.props.children,se,K.key):F!==null&&(F.elementType===je||typeof je=="object"&&je!==null&&je.$$typeof===U&&Or(je)===F.type)?(F=f(F,K.props),ho(F,K),F.return=H,F):(F=El(K.type,K.key,K.props,null,H.mode,se),ho(F,K),F.return=H,F)}function X(H,F,K,se){return F===null||F.tag!==4||F.stateNode.containerInfo!==K.containerInfo||F.stateNode.implementation!==K.implementation?(F=vu(K,H.mode,se),F.return=H,F):(F=f(F,K.children||[]),F.return=H,F)}function oe(H,F,K,se,je){return F===null||F.tag!==7?(F=Er(K,H.mode,se,je),F.return=H,F):(F=f(F,K),F.return=H,F)}function ce(H,F,K){if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return F=yu(""+F,H.mode,K),F.return=H,F;if(typeof F=="object"&&F!==null){switch(F.$$typeof){case k:return K=El(F.type,F.key,F.props,null,H.mode,K),ho(K,F),K.return=H,K;case x:return F=vu(F,H.mode,K),F.return=H,F;case U:return F=Or(F),ce(H,F,K)}if(_e(F)||Y(F))return F=Er(F,H.mode,K,null),F.return=H,F;if(typeof F.then=="function")return ce(H,Al(F),K);if(F.$$typeof===N)return ce(H,Tl(H,F),K);Dl(H,F)}return null}function ee(H,F,K,se){var je=F!==null?F.key:null;if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return je!==null?null:M(H,F,""+K,se);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case k:return K.key===je?I(H,F,K,se):null;case x:return K.key===je?X(H,F,K,se):null;case U:return K=Or(K),ee(H,F,K,se)}if(_e(K)||Y(K))return je!==null?null:oe(H,F,K,se,null);if(typeof K.then=="function")return ee(H,F,Al(K),se);if(K.$$typeof===N)return ee(H,F,Tl(H,K),se);Dl(H,K)}return null}function ne(H,F,K,se,je){if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return H=H.get(K)||null,M(F,H,""+se,je);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case k:return H=H.get(se.key===null?K:se.key)||null,I(F,H,se,je);case x:return H=H.get(se.key===null?K:se.key)||null,X(F,H,se,je);case U:return se=Or(se),ne(H,F,K,se,je)}if(_e(se)||Y(se))return H=H.get(K)||null,oe(F,H,se,je,null);if(typeof se.then=="function")return ne(H,F,K,Al(se),je);if(se.$$typeof===N)return ne(H,F,K,Tl(F,se),je);Dl(F,se)}return null}function ye(H,F,K,se){for(var je=null,qe=null,$e=F,Ce=F=0,Ie=null;$e!==null&&Ce<K.length;Ce++){$e.index>Ce?(Ie=$e,$e=null):Ie=$e.sibling;var Pe=ee(H,$e,K[Ce],se);if(Pe===null){$e===null&&($e=Ie);break}t&&$e&&Pe.alternate===null&&a(H,$e),F=m(Pe,F,Ce),qe===null?je=Pe:qe.sibling=Pe,qe=Pe,$e=Ie}if(Ce===K.length)return r(H,$e),Be&&Wa(H,Ce),je;if($e===null){for(;Ce<K.length;Ce++)$e=ce(H,K[Ce],se),$e!==null&&(F=m($e,F,Ce),qe===null?je=$e:qe.sibling=$e,qe=$e);return Be&&Wa(H,Ce),je}for($e=s($e);Ce<K.length;Ce++)Ie=ne($e,H,Ce,K[Ce],se),Ie!==null&&(t&&Ie.alternate!==null&&$e.delete(Ie.key===null?Ce:Ie.key),F=m(Ie,F,Ce),qe===null?je=Ie:qe.sibling=Ie,qe=Ie);return t&&$e.forEach(function(Yn){return a(H,Yn)}),Be&&Wa(H,Ce),je}function we(H,F,K,se){if(K==null)throw Error(l(151));for(var je=null,qe=null,$e=F,Ce=F=0,Ie=null,Pe=K.next();$e!==null&&!Pe.done;Ce++,Pe=K.next()){$e.index>Ce?(Ie=$e,$e=null):Ie=$e.sibling;var Yn=ee(H,$e,Pe.value,se);if(Yn===null){$e===null&&($e=Ie);break}t&&$e&&Yn.alternate===null&&a(H,$e),F=m(Yn,F,Ce),qe===null?je=Yn:qe.sibling=Yn,qe=Yn,$e=Ie}if(Pe.done)return r(H,$e),Be&&Wa(H,Ce),je;if($e===null){for(;!Pe.done;Ce++,Pe=K.next())Pe=ce(H,Pe.value,se),Pe!==null&&(F=m(Pe,F,Ce),qe===null?je=Pe:qe.sibling=Pe,qe=Pe);return Be&&Wa(H,Ce),je}for($e=s($e);!Pe.done;Ce++,Pe=K.next())Pe=ne($e,H,Ce,Pe.value,se),Pe!==null&&(t&&Pe.alternate!==null&&$e.delete(Pe.key===null?Ce:Pe.key),F=m(Pe,F,Ce),qe===null?je=Pe:qe.sibling=Pe,qe=Pe);return t&&$e.forEach(function(Gb){return a(H,Gb)}),Be&&Wa(H,Ce),je}function et(H,F,K,se){if(typeof K=="object"&&K!==null&&K.type===z&&K.key===null&&(K=K.props.children),typeof K=="object"&&K!==null){switch(K.$$typeof){case k:e:{for(var je=K.key;F!==null;){if(F.key===je){if(je=K.type,je===z){if(F.tag===7){r(H,F.sibling),se=f(F,K.props.children),se.return=H,H=se;break e}}else if(F.elementType===je||typeof je=="object"&&je!==null&&je.$$typeof===U&&Or(je)===F.type){r(H,F.sibling),se=f(F,K.props),ho(se,K),se.return=H,H=se;break e}r(H,F);break}else a(H,F);F=F.sibling}K.type===z?(se=Er(K.props.children,H.mode,se,K.key),se.return=H,H=se):(se=El(K.type,K.key,K.props,null,H.mode,se),ho(se,K),se.return=H,H=se)}return b(H);case x:e:{for(je=K.key;F!==null;){if(F.key===je)if(F.tag===4&&F.stateNode.containerInfo===K.containerInfo&&F.stateNode.implementation===K.implementation){r(H,F.sibling),se=f(F,K.children||[]),se.return=H,H=se;break e}else{r(H,F);break}else a(H,F);F=F.sibling}se=vu(K,H.mode,se),se.return=H,H=se}return b(H);case U:return K=Or(K),et(H,F,K,se)}if(_e(K))return ye(H,F,K,se);if(Y(K)){if(je=Y(K),typeof je!="function")throw Error(l(150));return K=je.call(K),we(H,F,K,se)}if(typeof K.then=="function")return et(H,F,Al(K),se);if(K.$$typeof===N)return et(H,F,Tl(H,K),se);Dl(H,K)}return typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint"?(K=""+K,F!==null&&F.tag===6?(r(H,F.sibling),se=f(F,K),se.return=H,H=se):(r(H,F),se=yu(K,H.mode,se),se.return=H,H=se),b(H)):r(H,F)}return function(H,F,K,se){try{mo=0;var je=et(H,F,K,se);return mi=null,je}catch($e){if($e===gi||$e===Ol)throw $e;var qe=ga(29,$e,null,H.mode);return qe.lanes=se,qe.return=H,qe}finally{}}}var Ar=N0(!0),E0=N0(!1),Tn=!1;function Cu(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Tu(t,a){t=t.updateQueue,a.updateQueue===t&&(a.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Mn(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function On(t,a,r){var s=t.updateQueue;if(s===null)return null;if(s=s.shared,(Ze&2)!==0){var f=s.pending;return f===null?a.next=a:(a.next=f.next,f.next=a),s.pending=a,a=Nl(t),d0(t,null,r),a}return kl(t,s,a,r),Nl(t)}function yo(t,a,r){if(a=a.updateQueue,a!==null&&(a=a.shared,(r&4194048)!==0)){var s=a.lanes;s&=t.pendingLanes,r|=s,a.lanes=r,$p(t,r)}}function Mu(t,a){var r=t.updateQueue,s=t.alternate;if(s!==null&&(s=s.updateQueue,r===s)){var f=null,m=null;if(r=r.firstBaseUpdate,r!==null){do{var b={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};m===null?f=m=b:m=m.next=b,r=r.next}while(r!==null);m===null?f=m=a:m=m.next=a}else f=m=a;r={baseState:s.baseState,firstBaseUpdate:f,lastBaseUpdate:m,shared:s.shared,callbacks:s.callbacks},t.updateQueue=r;return}t=r.lastBaseUpdate,t===null?r.firstBaseUpdate=a:t.next=a,r.lastBaseUpdate=a}var Ou=!1;function vo(){if(Ou){var t=pi;if(t!==null)throw t}}function $o(t,a,r,s){Ou=!1;var f=t.updateQueue;Tn=!1;var m=f.firstBaseUpdate,b=f.lastBaseUpdate,M=f.shared.pending;if(M!==null){f.shared.pending=null;var I=M,X=I.next;I.next=null,b===null?m=X:b.next=X,b=I;var oe=t.alternate;oe!==null&&(oe=oe.updateQueue,M=oe.lastBaseUpdate,M!==b&&(M===null?oe.firstBaseUpdate=X:M.next=X,oe.lastBaseUpdate=I))}if(m!==null){var ce=f.baseState;b=0,oe=X=I=null,M=m;do{var ee=M.lane&-536870913,ne=ee!==M.lane;if(ne?(Ue&ee)===ee:(s&ee)===ee){ee!==0&&ee===fi&&(Ou=!0),oe!==null&&(oe=oe.next={lane:0,tag:M.tag,payload:M.payload,callback:null,next:null});e:{var ye=t,we=M;ee=a;var et=r;switch(we.tag){case 1:if(ye=we.payload,typeof ye=="function"){ce=ye.call(et,ce,ee);break e}ce=ye;break e;case 3:ye.flags=ye.flags&-65537|128;case 0:if(ye=we.payload,ee=typeof ye=="function"?ye.call(et,ce,ee):ye,ee==null)break e;ce=v({},ce,ee);break e;case 2:Tn=!0}}ee=M.callback,ee!==null&&(t.flags|=64,ne&&(t.flags|=8192),ne=f.callbacks,ne===null?f.callbacks=[ee]:ne.push(ee))}else ne={lane:ee,tag:M.tag,payload:M.payload,callback:M.callback,next:null},oe===null?(X=oe=ne,I=ce):oe=oe.next=ne,b|=ee;if(M=M.next,M===null){if(M=f.shared.pending,M===null)break;ne=M,M=ne.next,ne.next=null,f.lastBaseUpdate=ne,f.shared.pending=null}}while(!0);oe===null&&(I=ce),f.baseState=I,f.firstBaseUpdate=X,f.lastBaseUpdate=oe,m===null&&(f.shared.lanes=0),In|=b,t.lanes=b,t.memoizedState=ce}}function z0(t,a){if(typeof t!="function")throw Error(l(191,t));t.call(a)}function C0(t,a){var r=t.callbacks;if(r!==null)for(t.callbacks=null,t=0;t<r.length;t++)z0(r[t],a)}var hi=T(null),Ul=T(0);function T0(t,a){t=un,B(Ul,t),B(hi,a),un=t|a.baseLanes}function Ru(){B(Ul,un),B(hi,hi.current)}function Au(){un=Ul.current,L(hi),L(Ul)}var ma=T(null),Ca=null;function Rn(t){var a=t.alternate;B(yt,yt.current&1),B(ma,t),Ca===null&&(a===null||hi.current!==null||a.memoizedState!==null)&&(Ca=t)}function Du(t){B(yt,yt.current),B(ma,t),Ca===null&&(Ca=t)}function M0(t){t.tag===22?(B(yt,yt.current),B(ma,t),Ca===null&&(Ca=t)):An()}function An(){B(yt,yt.current),B(ma,ma.current)}function ha(t){L(ma),Ca===t&&(Ca=null),L(yt)}var yt=T(0);function Il(t){for(var a=t;a!==null;){if(a.tag===13){var r=a.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||Vd(r)||Hd(r)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break;for(;a.sibling===null;){if(a.return===null||a.return===t)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var tn=0,ze=null,We=null,_t=null,Bl=!1,yi=!1,Dr=!1,Ll=0,bo=0,vi=null,U2=0;function ft(){throw Error(l(321))}function Uu(t,a){if(a===null)return!1;for(var r=0;r<a.length&&r<t.length;r++)if(!pa(t[r],a[r]))return!1;return!0}function Iu(t,a,r,s,f,m){return tn=m,ze=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,ae.H=t===null||t.memoizedState===null?mg:Qu,Dr=!1,m=r(s,f),Dr=!1,yi&&(m=R0(a,r,s,f)),O0(t),m}function O0(t){ae.H=jo;var a=We!==null&&We.next!==null;if(tn=0,_t=We=ze=null,Bl=!1,bo=0,vi=null,a)throw Error(l(300));t===null||jt||(t=t.dependencies,t!==null&&Cl(t)&&(jt=!0))}function R0(t,a,r,s){ze=t;var f=0;do{if(yi&&(vi=null),bo=0,yi=!1,25<=f)throw Error(l(301));if(f+=1,_t=We=null,t.updateQueue!=null){var m=t.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}ae.H=hg,m=a(r,s)}while(yi);return m}function I2(){var t=ae.H,a=t.useState()[0];return a=typeof a.then=="function"?xo(a):a,t=t.useState()[0],(We!==null?We.memoizedState:null)!==t&&(ze.flags|=1024),a}function Bu(){var t=Ll!==0;return Ll=0,t}function Lu(t,a,r){a.updateQueue=t.updateQueue,a.flags&=-2053,t.lanes&=~r}function Fu(t){if(Bl){for(t=t.memoizedState;t!==null;){var a=t.queue;a!==null&&(a.pending=null),t=t.next}Bl=!1}tn=0,_t=We=ze=null,yi=!1,bo=Ll=0,vi=null}function Yt(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return _t===null?ze.memoizedState=_t=t:_t=_t.next=t,_t}function vt(){if(We===null){var t=ze.alternate;t=t!==null?t.memoizedState:null}else t=We.next;var a=_t===null?ze.memoizedState:_t.next;if(a!==null)_t=a,We=t;else{if(t===null)throw ze.alternate===null?Error(l(467)):Error(l(310));We=t,t={memoizedState:We.memoizedState,baseState:We.baseState,baseQueue:We.baseQueue,queue:We.queue,next:null},_t===null?ze.memoizedState=_t=t:_t=_t.next=t}return _t}function Fl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function xo(t){var a=bo;return bo+=1,vi===null&&(vi=[]),t=S0(vi,t,a),a=ze,(_t===null?a.memoizedState:_t.next)===null&&(a=a.alternate,ae.H=a===null||a.memoizedState===null?mg:Qu),t}function Vl(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return xo(t);if(t.$$typeof===N)return Bt(t)}throw Error(l(438,String(t)))}function Vu(t){var a=null,r=ze.updateQueue;if(r!==null&&(a=r.memoCache),a==null){var s=ze.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=Fl(),ze.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]=Z;return a.index++,r}function an(t,a){return typeof a=="function"?a(t):a}function Hl(t){var a=vt();return Hu(a,We,t)}function Hu(t,a,r){var s=t.queue;if(s===null)throw Error(l(311));s.lastRenderedReducer=r;var f=t.baseQueue,m=s.pending;if(m!==null){if(f!==null){var b=f.next;f.next=m.next,m.next=b}a.baseQueue=f=m,s.pending=null}if(m=t.baseState,f===null)t.memoizedState=m;else{a=f.next;var M=b=null,I=null,X=a,oe=!1;do{var ce=X.lane&-536870913;if(ce!==X.lane?(Ue&ce)===ce:(tn&ce)===ce){var ee=X.revertLane;if(ee===0)I!==null&&(I=I.next={lane:0,revertLane:0,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null}),ce===fi&&(oe=!0);else if((tn&ee)===ee){X=X.next,ee===fi&&(oe=!0);continue}else ce={lane:0,revertLane:X.revertLane,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},I===null?(M=I=ce,b=m):I=I.next=ce,ze.lanes|=ee,In|=ee;ce=X.action,Dr&&r(m,ce),m=X.hasEagerState?X.eagerState:r(m,ce)}else ee={lane:ce,revertLane:X.revertLane,gesture:X.gesture,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},I===null?(M=I=ee,b=m):I=I.next=ee,ze.lanes|=ce,In|=ce;X=X.next}while(X!==null&&X!==a);if(I===null?b=m:I.next=M,!pa(m,t.memoizedState)&&(jt=!0,oe&&(r=pi,r!==null)))throw r;t.memoizedState=m,t.baseState=b,t.baseQueue=I,s.lastRenderedState=m}return f===null&&(s.lanes=0),[t.memoizedState,s.dispatch]}function qu(t){var a=vt(),r=a.queue;if(r===null)throw Error(l(311));r.lastRenderedReducer=t;var s=r.dispatch,f=r.pending,m=a.memoizedState;if(f!==null){r.pending=null;var b=f=f.next;do m=t(m,b.action),b=b.next;while(b!==f);pa(m,a.memoizedState)||(jt=!0),a.memoizedState=m,a.baseQueue===null&&(a.baseState=m),r.lastRenderedState=m}return[m,s]}function A0(t,a,r){var s=ze,f=vt(),m=Be;if(m){if(r===void 0)throw Error(l(407));r=r()}else r=a();var b=!pa((We||f).memoizedState,r);if(b&&(f.memoizedState=r,jt=!0),f=f.queue,Gu(I0.bind(null,s,f,t),[t]),f.getSnapshot!==a||b||_t!==null&&_t.memoizedState.tag&1){if(s.flags|=2048,$i(9,{destroy:void 0},U0.bind(null,s,f,r,a),null),nt===null)throw Error(l(349));m||(tn&127)!==0||D0(s,a,r)}return r}function D0(t,a,r){t.flags|=16384,t={getSnapshot:a,value:r},a=ze.updateQueue,a===null?(a=Fl(),ze.updateQueue=a,a.stores=[t]):(r=a.stores,r===null?a.stores=[t]:r.push(t))}function U0(t,a,r,s){a.value=r,a.getSnapshot=s,B0(a)&&L0(t)}function I0(t,a,r){return r(function(){B0(a)&&L0(t)})}function B0(t){var a=t.getSnapshot;t=t.value;try{var r=a();return!pa(t,r)}catch{return!0}}function L0(t){var a=Nr(t,2);a!==null&&sa(a,t,2)}function Pu(t){var a=Yt();if(typeof t=="function"){var r=t;if(t=r(),Dr){Sn(!0);try{r()}finally{Sn(!1)}}}return a.memoizedState=a.baseState=t,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:an,lastRenderedState:t},a}function F0(t,a,r,s){return t.baseState=r,Hu(t,We,typeof s=="function"?s:an)}function B2(t,a,r,s,f){if(Zl(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,V0(a,m)):(m.next=r.next,a.pending=r.next=m)}}function V0(t,a){var r=a.action,s=a.payload,f=t.state;if(a.isTransition){var m=ae.T,b={};ae.T=b;try{var M=r(f,s),I=ae.S;I!==null&&I(b,M),H0(t,a,M)}catch(X){Zu(t,a,X)}finally{m!==null&&b.types!==null&&(m.types=b.types),ae.T=m}}else try{m=r(f,s),H0(t,a,m)}catch(X){Zu(t,a,X)}}function H0(t,a,r){r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(function(s){q0(t,a,s)},function(s){return Zu(t,a,s)}):q0(t,a,r)}function q0(t,a,r){a.status="fulfilled",a.value=r,P0(a),t.state=r,a=t.pending,a!==null&&(r=a.next,r===a?t.pending=null:(r=r.next,a.next=r,V0(t,r)))}function Zu(t,a,r){var s=t.pending;if(t.pending=null,s!==null){s=s.next;do a.status="rejected",a.reason=r,P0(a),a=a.next;while(a!==s)}t.action=null}function P0(t){t=t.listeners;for(var a=0;a<t.length;a++)(0,t[a])()}function Z0(t,a){return a}function G0(t,a){if(Be){var r=nt.formState;if(r!==null){e:{var s=ze;if(Be){if(rt){t:{for(var f=rt,m=za;f.nodeType!==8;){if(!m){f=null;break t}if(f=Ta(f.nextSibling),f===null){f=null;break t}}m=f.data,f=m==="F!"||m==="F"?f:null}if(f){rt=Ta(f.nextSibling),s=f.data==="F!";break e}}zn(s)}s=!1}s&&(a=r[0])}}return r=Yt(),r.memoizedState=r.baseState=a,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Z0,lastRenderedState:a},r.queue=s,r=fg.bind(null,ze,s),s.dispatch=r,s=Pu(!1),m=Wu.bind(null,ze,!1,s.queue),s=Yt(),f={state:a,dispatch:null,action:t,pending:null},s.queue=f,r=B2.bind(null,ze,f,m,r),f.dispatch=r,s.memoizedState=t,[a,r,!1]}function Y0(t){var a=vt();return K0(a,We,t)}function K0(t,a,r){if(a=Hu(t,a,Z0)[0],t=Hl(an)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var s=xo(a)}catch(b){throw b===gi?Ol:b}else s=a;a=vt();var f=a.queue,m=f.dispatch;return r!==a.memoizedState&&(ze.flags|=2048,$i(9,{destroy:void 0},L2.bind(null,f,r),null)),[s,m,t]}function L2(t,a){t.action=a}function J0(t){var a=vt(),r=We;if(r!==null)return K0(a,r,t);vt(),a=a.memoizedState,r=vt();var s=r.queue.dispatch;return r.memoizedState=t,[a,s,!1]}function $i(t,a,r,s){return t={tag:t,create:r,deps:s,inst:a,next:null},a=ze.updateQueue,a===null&&(a=Fl(),ze.updateQueue=a),r=a.lastEffect,r===null?a.lastEffect=t.next=t:(s=r.next,r.next=t,t.next=s,a.lastEffect=t),t}function X0(){return vt().memoizedState}function ql(t,a,r,s){var f=Yt();ze.flags|=t,f.memoizedState=$i(1|a,{destroy:void 0},r,s===void 0?null:s)}function Pl(t,a,r,s){var f=vt();s=s===void 0?null:s;var m=f.memoizedState.inst;We!==null&&s!==null&&Uu(s,We.memoizedState.deps)?f.memoizedState=$i(a,m,r,s):(ze.flags|=t,f.memoizedState=$i(1|a,m,r,s))}function W0(t,a){ql(8390656,8,t,a)}function Gu(t,a){Pl(2048,8,t,a)}function F2(t){ze.flags|=4;var a=ze.updateQueue;if(a===null)a=Fl(),ze.updateQueue=a,a.events=[t];else{var r=a.events;r===null?a.events=[t]:r.push(t)}}function Q0(t){var a=vt().memoizedState;return F2({ref:a,nextImpl:t}),function(){if((Ze&2)!==0)throw Error(l(440));return a.impl.apply(void 0,arguments)}}function eg(t,a){return Pl(4,2,t,a)}function tg(t,a){return Pl(4,4,t,a)}function ag(t,a){if(typeof a=="function"){t=t();var r=a(t);return function(){typeof r=="function"?r():a(null)}}if(a!=null)return t=t(),a.current=t,function(){a.current=null}}function ng(t,a,r){r=r!=null?r.concat([t]):null,Pl(4,4,ag.bind(null,a,t),r)}function Yu(){}function rg(t,a){var r=vt();a=a===void 0?null:a;var s=r.memoizedState;return a!==null&&Uu(a,s[1])?s[0]:(r.memoizedState=[t,a],t)}function ig(t,a){var r=vt();a=a===void 0?null:a;var s=r.memoizedState;if(a!==null&&Uu(a,s[1]))return s[0];if(s=t(),Dr){Sn(!0);try{t()}finally{Sn(!1)}}return r.memoizedState=[s,a],s}function Ku(t,a,r){return r===void 0||(tn&1073741824)!==0&&(Ue&261930)===0?t.memoizedState=a:(t.memoizedState=r,t=om(),ze.lanes|=t,In|=t,r)}function og(t,a,r,s){return pa(r,a)?r:hi.current!==null?(t=Ku(t,r,s),pa(t,a)||(jt=!0),t):(tn&42)===0||(tn&1073741824)!==0&&(Ue&261930)===0?(jt=!0,t.memoizedState=r):(t=om(),ze.lanes|=t,In|=t,a)}function lg(t,a,r,s,f){var m=fe.p;fe.p=m!==0&&8>m?m:8;var b=ae.T,M={};ae.T=M,Wu(t,!1,a,r);try{var I=f(),X=ae.S;if(X!==null&&X(M,I),I!==null&&typeof I=="object"&&typeof I.then=="function"){var oe=D2(I,s);_o(t,a,oe,$a(t))}else _o(t,a,s,$a(t))}catch(ce){_o(t,a,{then:function(){},status:"rejected",reason:ce},$a())}finally{fe.p=m,b!==null&&M.types!==null&&(b.types=M.types),ae.T=b}}function V2(){}function Ju(t,a,r,s){if(t.tag!==5)throw Error(l(476));var f=sg(t).queue;lg(t,f,a,ge,r===null?V2:function(){return cg(t),r(s)})}function sg(t){var a=t.memoizedState;if(a!==null)return a;a={memoizedState:ge,baseState:ge,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:an,lastRenderedState:ge},next:null};var r={};return a.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:an,lastRenderedState:r},next:null},t.memoizedState=a,t=t.alternate,t!==null&&(t.memoizedState=a),a}function cg(t){var a=sg(t);a.next===null&&(a=t.alternate.memoizedState),_o(t,a.next.queue,{},$a())}function Xu(){return Bt(Bo)}function ug(){return vt().memoizedState}function dg(){return vt().memoizedState}function H2(t){for(var a=t.return;a!==null;){switch(a.tag){case 24:case 3:var r=$a();t=Mn(r);var s=On(a,t,r);s!==null&&(sa(s,a,r),yo(s,a,r)),a={cache:ku()},t.payload=a;return}a=a.return}}function q2(t,a,r){var s=$a();r={lane:s,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Zl(t)?pg(a,r):(r=mu(t,a,r,s),r!==null&&(sa(r,t,s),gg(r,a,s)))}function fg(t,a,r){var s=$a();_o(t,a,r,s)}function _o(t,a,r,s){var f={lane:s,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null};if(Zl(t))pg(a,f);else{var m=t.alternate;if(t.lanes===0&&(m===null||m.lanes===0)&&(m=a.lastRenderedReducer,m!==null))try{var b=a.lastRenderedState,M=m(b,r);if(f.hasEagerState=!0,f.eagerState=M,pa(M,b))return kl(t,a,f,0),nt===null&&wl(),!1}catch{}finally{}if(r=mu(t,a,f,s),r!==null)return sa(r,t,s),gg(r,a,s),!0}return!1}function Wu(t,a,r,s){if(s={lane:2,revertLane:Cd(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Zl(t)){if(a)throw Error(l(479))}else a=mu(t,r,s,2),a!==null&&sa(a,t,2)}function Zl(t){var a=t.alternate;return t===ze||a!==null&&a===ze}function pg(t,a){yi=Bl=!0;var r=t.pending;r===null?a.next=a:(a.next=r.next,r.next=a),t.pending=a}function gg(t,a,r){if((r&4194048)!==0){var s=a.lanes;s&=t.pendingLanes,r|=s,a.lanes=r,$p(t,r)}}var jo={readContext:Bt,use:Vl,useCallback:ft,useContext:ft,useEffect:ft,useImperativeHandle:ft,useLayoutEffect:ft,useInsertionEffect:ft,useMemo:ft,useReducer:ft,useRef:ft,useState:ft,useDebugValue:ft,useDeferredValue:ft,useTransition:ft,useSyncExternalStore:ft,useId:ft,useHostTransitionStatus:ft,useFormState:ft,useActionState:ft,useOptimistic:ft,useMemoCache:ft,useCacheRefresh:ft};jo.useEffectEvent=ft;var mg={readContext:Bt,use:Vl,useCallback:function(t,a){return Yt().memoizedState=[t,a===void 0?null:a],t},useContext:Bt,useEffect:W0,useImperativeHandle:function(t,a,r){r=r!=null?r.concat([t]):null,ql(4194308,4,ag.bind(null,a,t),r)},useLayoutEffect:function(t,a){return ql(4194308,4,t,a)},useInsertionEffect:function(t,a){ql(4,2,t,a)},useMemo:function(t,a){var r=Yt();a=a===void 0?null:a;var s=t();if(Dr){Sn(!0);try{t()}finally{Sn(!1)}}return r.memoizedState=[s,a],s},useReducer:function(t,a,r){var s=Yt();if(r!==void 0){var f=r(a);if(Dr){Sn(!0);try{r(a)}finally{Sn(!1)}}}else f=a;return s.memoizedState=s.baseState=f,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:f},s.queue=t,t=t.dispatch=q2.bind(null,ze,t),[s.memoizedState,t]},useRef:function(t){var a=Yt();return t={current:t},a.memoizedState=t},useState:function(t){t=Pu(t);var a=t.queue,r=fg.bind(null,ze,a);return a.dispatch=r,[t.memoizedState,r]},useDebugValue:Yu,useDeferredValue:function(t,a){var r=Yt();return Ku(r,t,a)},useTransition:function(){var t=Pu(!1);return t=lg.bind(null,ze,t.queue,!0,!1),Yt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,a,r){var s=ze,f=Yt();if(Be){if(r===void 0)throw Error(l(407));r=r()}else{if(r=a(),nt===null)throw Error(l(349));(Ue&127)!==0||D0(s,a,r)}f.memoizedState=r;var m={value:r,getSnapshot:a};return f.queue=m,W0(I0.bind(null,s,m,t),[t]),s.flags|=2048,$i(9,{destroy:void 0},U0.bind(null,s,m,r,a),null),r},useId:function(){var t=Yt(),a=nt.identifierPrefix;if(Be){var r=Fa,s=La;r=(s&~(1<<32-fa(s)-1)).toString(32)+r,a="_"+a+"R_"+r,r=Ll++,0<r&&(a+="H"+r.toString(32)),a+="_"}else r=U2++,a="_"+a+"r_"+r.toString(32)+"_";return t.memoizedState=a},useHostTransitionStatus:Xu,useFormState:G0,useActionState:G0,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=Wu.bind(null,ze,!0,r),r.dispatch=a,[t,a]},useMemoCache:Vu,useCacheRefresh:function(){return Yt().memoizedState=H2.bind(null,ze)},useEffectEvent:function(t){var a=Yt(),r={impl:t};return a.memoizedState=r,function(){if((Ze&2)!==0)throw Error(l(440));return r.impl.apply(void 0,arguments)}}},Qu={readContext:Bt,use:Vl,useCallback:rg,useContext:Bt,useEffect:Gu,useImperativeHandle:ng,useInsertionEffect:eg,useLayoutEffect:tg,useMemo:ig,useReducer:Hl,useRef:X0,useState:function(){return Hl(an)},useDebugValue:Yu,useDeferredValue:function(t,a){var r=vt();return og(r,We.memoizedState,t,a)},useTransition:function(){var t=Hl(an)[0],a=vt().memoizedState;return[typeof t=="boolean"?t:xo(t),a]},useSyncExternalStore:A0,useId:ug,useHostTransitionStatus:Xu,useFormState:Y0,useActionState:Y0,useOptimistic:function(t,a){var r=vt();return F0(r,We,t,a)},useMemoCache:Vu,useCacheRefresh:dg};Qu.useEffectEvent=Q0;var hg={readContext:Bt,use:Vl,useCallback:rg,useContext:Bt,useEffect:Gu,useImperativeHandle:ng,useInsertionEffect:eg,useLayoutEffect:tg,useMemo:ig,useReducer:qu,useRef:X0,useState:function(){return qu(an)},useDebugValue:Yu,useDeferredValue:function(t,a){var r=vt();return We===null?Ku(r,t,a):og(r,We.memoizedState,t,a)},useTransition:function(){var t=qu(an)[0],a=vt().memoizedState;return[typeof t=="boolean"?t:xo(t),a]},useSyncExternalStore:A0,useId:ug,useHostTransitionStatus:Xu,useFormState:J0,useActionState:J0,useOptimistic:function(t,a){var r=vt();return We!==null?F0(r,We,t,a):(r.baseState=t,[t,r.queue.dispatch])},useMemoCache:Vu,useCacheRefresh:dg};hg.useEffectEvent=Q0;function ed(t,a,r,s){a=t.memoizedState,r=r(s,a),r=r==null?a:v({},a,r),t.memoizedState=r,t.lanes===0&&(t.updateQueue.baseState=r)}var td={enqueueSetState:function(t,a,r){t=t._reactInternals;var s=$a(),f=Mn(s);f.payload=a,r!=null&&(f.callback=r),a=On(t,f,s),a!==null&&(sa(a,t,s),yo(a,t,s))},enqueueReplaceState:function(t,a,r){t=t._reactInternals;var s=$a(),f=Mn(s);f.tag=1,f.payload=a,r!=null&&(f.callback=r),a=On(t,f,s),a!==null&&(sa(a,t,s),yo(a,t,s))},enqueueForceUpdate:function(t,a){t=t._reactInternals;var r=$a(),s=Mn(r);s.tag=2,a!=null&&(s.callback=a),a=On(t,s,r),a!==null&&(sa(a,t,r),yo(a,t,r))}};function yg(t,a,r,s,f,m,b){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(s,m,b):a.prototype&&a.prototype.isPureReactComponent?!so(r,s)||!so(f,m):!0}function vg(t,a,r,s){t=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(r,s),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(r,s),a.state!==t&&td.enqueueReplaceState(a,a.state,null)}function Ur(t,a){var r=a;if("ref"in a){r={};for(var s in a)s!=="ref"&&(r[s]=a[s])}if(t=t.defaultProps){r===a&&(r=v({},r));for(var f in t)r[f]===void 0&&(r[f]=t[f])}return r}function $g(t){Sl(t)}function bg(t){console.error(t)}function xg(t){Sl(t)}function Gl(t,a){try{var r=t.onUncaughtError;r(a.value,{componentStack:a.stack})}catch(s){setTimeout(function(){throw s})}}function _g(t,a,r){try{var s=t.onCaughtError;s(r.value,{componentStack:r.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function ad(t,a,r){return r=Mn(r),r.tag=3,r.payload={element:null},r.callback=function(){Gl(t,a)},r}function jg(t){return t=Mn(t),t.tag=3,t}function Sg(t,a,r,s){var f=r.type.getDerivedStateFromError;if(typeof f=="function"){var m=s.value;t.payload=function(){return f(m)},t.callback=function(){_g(a,r,s)}}var b=r.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(t.callback=function(){_g(a,r,s),typeof f!="function"&&(Bn===null?Bn=new Set([this]):Bn.add(this));var M=s.stack;this.componentDidCatch(s.value,{componentStack:M!==null?M:""})})}function P2(t,a,r,s,f){if(r.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(a=r.alternate,a!==null&&di(a,r,f,!0),r=ma.current,r!==null){switch(r.tag){case 31:case 13:return Ca===null?is():r.alternate===null&&pt===0&&(pt=3),r.flags&=-257,r.flags|=65536,r.lanes=f,s===Rl?r.flags|=16384:(a=r.updateQueue,a===null?r.updateQueue=new Set([s]):a.add(s),Nd(t,s,f)),!1;case 22:return r.flags|=65536,s===Rl?r.flags|=16384:(a=r.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([s])},r.updateQueue=a):(r=a.retryQueue,r===null?a.retryQueue=new Set([s]):r.add(s)),Nd(t,s,f)),!1}throw Error(l(435,r.tag))}return Nd(t,s,f),is(),!1}if(Be)return a=ma.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=f,s!==xu&&(t=Error(l(422),{cause:s}),fo(ka(t,r)))):(s!==xu&&(a=Error(l(423),{cause:s}),fo(ka(a,r))),t=t.current.alternate,t.flags|=65536,f&=-f,t.lanes|=f,s=ka(s,r),f=ad(t.stateNode,s,f),Mu(t,f),pt!==4&&(pt=2)),!1;var m=Error(l(520),{cause:s});if(m=ka(m,r),To===null?To=[m]:To.push(m),pt!==4&&(pt=2),a===null)return!0;s=ka(s,r),r=a;do{switch(r.tag){case 3:return r.flags|=65536,t=f&-f,r.lanes|=t,t=ad(r.stateNode,s,t),Mu(r,t),!1;case 1:if(a=r.type,m=r.stateNode,(r.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(Bn===null||!Bn.has(m))))return r.flags|=65536,f&=-f,r.lanes|=f,f=jg(f),Sg(f,t,r,s),Mu(r,f),!1}r=r.return}while(r!==null);return!1}var nd=Error(l(461)),jt=!1;function Lt(t,a,r,s){a.child=t===null?E0(a,null,r,s):Ar(a,t.child,r,s)}function wg(t,a,r,s,f){r=r.render;var m=a.ref;if("ref"in s){var b={};for(var M in s)M!=="ref"&&(b[M]=s[M])}else b=s;return Tr(a),s=Iu(t,a,r,b,m,f),M=Bu(),t!==null&&!jt?(Lu(t,a,f),nn(t,a,f)):(Be&&M&&$u(a),a.flags|=1,Lt(t,a,s,f),a.child)}function kg(t,a,r,s,f){if(t===null){var m=r.type;return typeof m=="function"&&!hu(m)&&m.defaultProps===void 0&&r.compare===null?(a.tag=15,a.type=m,Ng(t,a,m,s,f)):(t=El(r.type,null,s,a,a.mode,f),t.ref=a.ref,t.return=a,a.child=t)}if(m=t.child,!dd(t,f)){var b=m.memoizedProps;if(r=r.compare,r=r!==null?r:so,r(b,s)&&t.ref===a.ref)return nn(t,a,f)}return a.flags|=1,t=Xa(m,s),t.ref=a.ref,t.return=a,a.child=t}function Ng(t,a,r,s,f){if(t!==null){var m=t.memoizedProps;if(so(m,s)&&t.ref===a.ref)if(jt=!1,a.pendingProps=s=m,dd(t,f))(t.flags&131072)!==0&&(jt=!0);else return a.lanes=t.lanes,nn(t,a,f)}return rd(t,a,r,s,f)}function Eg(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 zg(t,a,m,r,s)}if((r&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},t!==null&&Ml(a,m!==null?m.cachePool:null),m!==null?T0(a,m):Ru(),M0(a);else return s=a.lanes=536870912,zg(t,a,m!==null?m.baseLanes|r:r,r,s)}else m!==null?(Ml(a,m.cachePool),T0(a,m),An(),a.memoizedState=null):(t!==null&&Ml(a,null),Ru(),An());return Lt(t,a,f,r),a.child}function So(t,a){return t!==null&&t.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function zg(t,a,r,s,f){var m=Eu();return m=m===null?null:{parent:xt._currentValue,pool:m},a.memoizedState={baseLanes:r,cachePool:m},t!==null&&Ml(a,null),Ru(),M0(a),t!==null&&di(t,a,s,!0),a.childLanes=f,null}function Yl(t,a){return a=Jl({mode:a.mode,children:a.children},t.mode),a.ref=t.ref,t.child=a,a.return=t,a}function Cg(t,a,r){return Ar(a,t.child,null,r),t=Yl(a,a.pendingProps),t.flags|=2,ha(a),a.memoizedState=null,t}function Z2(t,a,r){var s=a.pendingProps,f=(a.flags&128)!==0;if(a.flags&=-129,t===null){if(Be){if(s.mode==="hidden")return t=Yl(a,s),a.lanes=536870912,So(null,t);if(Du(a),(t=rt)?(t=Vm(t,za),t=t!==null&&t.data==="&"?t:null,t!==null&&(a.memoizedState={dehydrated:t,treeContext:Nn!==null?{id:La,overflow:Fa}:null,retryLane:536870912,hydrationErrors:null},r=p0(t),r.return=a,a.child=r,It=a,rt=null)):t=null,t===null)throw zn(a);return a.lanes=536870912,null}return Yl(a,s)}var m=t.memoizedState;if(m!==null){var b=m.dehydrated;if(Du(a),f)if(a.flags&256)a.flags&=-257,a=Cg(t,a,r);else if(a.memoizedState!==null)a.child=t.child,a.flags|=128,a=null;else throw Error(l(558));else if(jt||di(t,a,r,!1),f=(r&t.childLanes)!==0,jt||f){if(s=nt,s!==null&&(b=bp(s,r),b!==0&&b!==m.retryLane))throw m.retryLane=b,Nr(t,b),sa(s,t,b),nd;is(),a=Cg(t,a,r)}else t=m.treeContext,rt=Ta(b.nextSibling),It=a,Be=!0,En=null,za=!1,t!==null&&h0(a,t),a=Yl(a,s),a.flags|=4096;return a}return t=Xa(t.child,{mode:s.mode,children:s.children}),t.ref=a.ref,a.child=t,t.return=a,t}function Kl(t,a){var r=a.ref;if(r===null)t!==null&&t.ref!==null&&(a.flags|=4194816);else{if(typeof r!="function"&&typeof r!="object")throw Error(l(284));(t===null||t.ref!==r)&&(a.flags|=4194816)}}function rd(t,a,r,s,f){return Tr(a),r=Iu(t,a,r,s,void 0,f),s=Bu(),t!==null&&!jt?(Lu(t,a,f),nn(t,a,f)):(Be&&s&&$u(a),a.flags|=1,Lt(t,a,r,f),a.child)}function Tg(t,a,r,s,f,m){return Tr(a),a.updateQueue=null,r=R0(a,s,r,f),O0(t),s=Bu(),t!==null&&!jt?(Lu(t,a,m),nn(t,a,m)):(Be&&s&&$u(a),a.flags|=1,Lt(t,a,r,m),a.child)}function Mg(t,a,r,s,f){if(Tr(a),a.stateNode===null){var m=li,b=r.contextType;typeof b=="object"&&b!==null&&(m=Bt(b)),m=new r(s,m),a.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=td,a.stateNode=m,m._reactInternals=a,m=a.stateNode,m.props=s,m.state=a.memoizedState,m.refs={},Cu(a),b=r.contextType,m.context=typeof b=="object"&&b!==null?Bt(b):li,m.state=a.memoizedState,b=r.getDerivedStateFromProps,typeof b=="function"&&(ed(a,r,b,s),m.state=a.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(b=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),b!==m.state&&td.enqueueReplaceState(m,m.state,null),$o(a,s,m,f),vo(),m.state=a.memoizedState),typeof m.componentDidMount=="function"&&(a.flags|=4194308),s=!0}else if(t===null){m=a.stateNode;var M=a.memoizedProps,I=Ur(r,M);m.props=I;var X=m.context,oe=r.contextType;b=li,typeof oe=="object"&&oe!==null&&(b=Bt(oe));var ce=r.getDerivedStateFromProps;oe=typeof ce=="function"||typeof m.getSnapshotBeforeUpdate=="function",M=a.pendingProps!==M,oe||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(M||X!==b)&&vg(a,m,s,b),Tn=!1;var ee=a.memoizedState;m.state=ee,$o(a,s,m,f),vo(),X=a.memoizedState,M||ee!==X||Tn?(typeof ce=="function"&&(ed(a,r,ce,s),X=a.memoizedState),(I=Tn||yg(a,r,I,s,ee,X,b))?(oe||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(a.flags|=4194308)):(typeof m.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=s,a.memoizedState=X),m.props=s,m.state=X,m.context=b,s=I):(typeof m.componentDidMount=="function"&&(a.flags|=4194308),s=!1)}else{m=a.stateNode,Tu(t,a),b=a.memoizedProps,oe=Ur(r,b),m.props=oe,ce=a.pendingProps,ee=m.context,X=r.contextType,I=li,typeof X=="object"&&X!==null&&(I=Bt(X)),M=r.getDerivedStateFromProps,(X=typeof M=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(b!==ce||ee!==I)&&vg(a,m,s,I),Tn=!1,ee=a.memoizedState,m.state=ee,$o(a,s,m,f),vo();var ne=a.memoizedState;b!==ce||ee!==ne||Tn||t!==null&&t.dependencies!==null&&Cl(t.dependencies)?(typeof M=="function"&&(ed(a,r,M,s),ne=a.memoizedState),(oe=Tn||yg(a,r,oe,s,ee,ne,I)||t!==null&&t.dependencies!==null&&Cl(t.dependencies))?(X||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(s,ne,I),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(s,ne,I)),typeof m.componentDidUpdate=="function"&&(a.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof m.componentDidUpdate!="function"||b===t.memoizedProps&&ee===t.memoizedState||(a.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||b===t.memoizedProps&&ee===t.memoizedState||(a.flags|=1024),a.memoizedProps=s,a.memoizedState=ne),m.props=s,m.state=ne,m.context=I,s=oe):(typeof m.componentDidUpdate!="function"||b===t.memoizedProps&&ee===t.memoizedState||(a.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||b===t.memoizedProps&&ee===t.memoizedState||(a.flags|=1024),s=!1)}return m=s,Kl(t,a),s=(a.flags&128)!==0,m||s?(m=a.stateNode,r=s&&typeof r.getDerivedStateFromError!="function"?null:m.render(),a.flags|=1,t!==null&&s?(a.child=Ar(a,t.child,null,f),a.child=Ar(a,null,r,f)):Lt(t,a,r,f),a.memoizedState=m.state,t=a.child):t=nn(t,a,f),t}function Og(t,a,r,s){return zr(),a.flags|=256,Lt(t,a,r,s),a.child}var id={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function od(t){return{baseLanes:t,cachePool:_0()}}function ld(t,a,r){return t=t!==null?t.childLanes&~r:0,a&&(t|=va),t}function Rg(t,a,r){var s=a.pendingProps,f=!1,m=(a.flags&128)!==0,b;if((b=m)||(b=t!==null&&t.memoizedState===null?!1:(yt.current&2)!==0),b&&(f=!0,a.flags&=-129),b=(a.flags&32)!==0,a.flags&=-33,t===null){if(Be){if(f?Rn(a):An(),(t=rt)?(t=Vm(t,za),t=t!==null&&t.data!=="&"?t:null,t!==null&&(a.memoizedState={dehydrated:t,treeContext:Nn!==null?{id:La,overflow:Fa}:null,retryLane:536870912,hydrationErrors:null},r=p0(t),r.return=a,a.child=r,It=a,rt=null)):t=null,t===null)throw zn(a);return Hd(t)?a.lanes=32:a.lanes=536870912,null}var M=s.children;return s=s.fallback,f?(An(),f=a.mode,M=Jl({mode:"hidden",children:M},f),s=Er(s,f,r,null),M.return=a,s.return=a,M.sibling=s,a.child=M,s=a.child,s.memoizedState=od(r),s.childLanes=ld(t,b,r),a.memoizedState=id,So(null,s)):(Rn(a),sd(a,M))}var I=t.memoizedState;if(I!==null&&(M=I.dehydrated,M!==null)){if(m)a.flags&256?(Rn(a),a.flags&=-257,a=cd(t,a,r)):a.memoizedState!==null?(An(),a.child=t.child,a.flags|=128,a=null):(An(),M=s.fallback,f=a.mode,s=Jl({mode:"visible",children:s.children},f),M=Er(M,f,r,null),M.flags|=2,s.return=a,M.return=a,s.sibling=M,a.child=s,Ar(a,t.child,null,r),s=a.child,s.memoizedState=od(r),s.childLanes=ld(t,b,r),a.memoizedState=id,a=So(null,s));else if(Rn(a),Hd(M)){if(b=M.nextSibling&&M.nextSibling.dataset,b)var X=b.dgst;b=X,s=Error(l(419)),s.stack="",s.digest=b,fo({value:s,source:null,stack:null}),a=cd(t,a,r)}else if(jt||di(t,a,r,!1),b=(r&t.childLanes)!==0,jt||b){if(b=nt,b!==null&&(s=bp(b,r),s!==0&&s!==I.retryLane))throw I.retryLane=s,Nr(t,s),sa(b,t,s),nd;Vd(M)||is(),a=cd(t,a,r)}else Vd(M)?(a.flags|=192,a.child=t.child,a=null):(t=I.treeContext,rt=Ta(M.nextSibling),It=a,Be=!0,En=null,za=!1,t!==null&&h0(a,t),a=sd(a,s.children),a.flags|=4096);return a}return f?(An(),M=s.fallback,f=a.mode,I=t.child,X=I.sibling,s=Xa(I,{mode:"hidden",children:s.children}),s.subtreeFlags=I.subtreeFlags&65011712,X!==null?M=Xa(X,M):(M=Er(M,f,r,null),M.flags|=2),M.return=a,s.return=a,s.sibling=M,a.child=s,So(null,s),s=a.child,M=t.child.memoizedState,M===null?M=od(r):(f=M.cachePool,f!==null?(I=xt._currentValue,f=f.parent!==I?{parent:I,pool:I}:f):f=_0(),M={baseLanes:M.baseLanes|r,cachePool:f}),s.memoizedState=M,s.childLanes=ld(t,b,r),a.memoizedState=id,So(t.child,s)):(Rn(a),r=t.child,t=r.sibling,r=Xa(r,{mode:"visible",children:s.children}),r.return=a,r.sibling=null,t!==null&&(b=a.deletions,b===null?(a.deletions=[t],a.flags|=16):b.push(t)),a.child=r,a.memoizedState=null,r)}function sd(t,a){return a=Jl({mode:"visible",children:a},t.mode),a.return=t,t.child=a}function Jl(t,a){return t=ga(22,t,null,a),t.lanes=0,t}function cd(t,a,r){return Ar(a,t.child,null,r),t=sd(a,a.pendingProps.children),t.flags|=2,a.memoizedState=null,t}function Ag(t,a,r){t.lanes|=a;var s=t.alternate;s!==null&&(s.lanes|=a),Su(t.return,a,r)}function ud(t,a,r,s,f,m){var b=t.memoizedState;b===null?t.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:s,tail:r,tailMode:f,treeForkCount:m}:(b.isBackwards=a,b.rendering=null,b.renderingStartTime=0,b.last=s,b.tail=r,b.tailMode=f,b.treeForkCount=m)}function Dg(t,a,r){var s=a.pendingProps,f=s.revealOrder,m=s.tail;s=s.children;var b=yt.current,M=(b&2)!==0;if(M?(b=b&1|2,a.flags|=128):b&=1,B(yt,b),Lt(t,a,s,r),s=Be?uo:0,!M&&t!==null&&(t.flags&128)!==0)e:for(t=a.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Ag(t,r,a);else if(t.tag===19)Ag(t,r,a);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===a)break e;for(;t.sibling===null;){if(t.return===null||t.return===a)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(f){case"forwards":for(r=a.child,f=null;r!==null;)t=r.alternate,t!==null&&Il(t)===null&&(f=r),r=r.sibling;r=f,r===null?(f=a.child,a.child=null):(f=r.sibling,r.sibling=null),ud(a,!1,f,r,m,s);break;case"backwards":case"unstable_legacy-backwards":for(r=null,f=a.child,a.child=null;f!==null;){if(t=f.alternate,t!==null&&Il(t)===null){a.child=f;break}t=f.sibling,f.sibling=r,r=f,f=t}ud(a,!0,r,null,m,s);break;case"together":ud(a,!1,null,null,void 0,s);break;default:a.memoizedState=null}return a.child}function nn(t,a,r){if(t!==null&&(a.dependencies=t.dependencies),In|=a.lanes,(r&a.childLanes)===0)if(t!==null){if(di(t,a,r,!1),(r&a.childLanes)===0)return null}else return null;if(t!==null&&a.child!==t.child)throw Error(l(153));if(a.child!==null){for(t=a.child,r=Xa(t,t.pendingProps),a.child=r,r.return=a;t.sibling!==null;)t=t.sibling,r=r.sibling=Xa(t,t.pendingProps),r.return=a;r.sibling=null}return a.child}function dd(t,a){return(t.lanes&a)!==0?!0:(t=t.dependencies,!!(t!==null&&Cl(t)))}function G2(t,a,r){switch(a.tag){case 3:he(a,a.stateNode.containerInfo),Cn(a,xt,t.memoizedState.cache),zr();break;case 27:case 5:Te(a);break;case 4:he(a,a.stateNode.containerInfo);break;case 10:Cn(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,Du(a),null;break;case 13:var s=a.memoizedState;if(s!==null)return s.dehydrated!==null?(Rn(a),a.flags|=128,null):(r&a.child.childLanes)!==0?Rg(t,a,r):(Rn(a),t=nn(t,a,r),t!==null?t.sibling:null);Rn(a);break;case 19:var f=(t.flags&128)!==0;if(s=(r&a.childLanes)!==0,s||(di(t,a,r,!1),s=(r&a.childLanes)!==0),f){if(s)return Dg(t,a,r);a.flags|=128}if(f=a.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),B(yt,yt.current),s)break;return null;case 22:return a.lanes=0,Eg(t,a,r,a.pendingProps);case 24:Cn(a,xt,t.memoizedState.cache)}return nn(t,a,r)}function Ug(t,a,r){if(t!==null)if(t.memoizedProps!==a.pendingProps)jt=!0;else{if(!dd(t,r)&&(a.flags&128)===0)return jt=!1,G2(t,a,r);jt=(t.flags&131072)!==0}else jt=!1,Be&&(a.flags&1048576)!==0&&m0(a,uo,a.index);switch(a.lanes=0,a.tag){case 16:e:{var s=a.pendingProps;if(t=Or(a.elementType),a.type=t,typeof t=="function")hu(t)?(s=Ur(t,s),a.tag=1,a=Mg(null,a,t,s,r)):(a.tag=0,a=rd(null,a,t,s,r));else{if(t!=null){var f=t.$$typeof;if(f===R){a.tag=11,a=wg(null,a,t,s,r);break e}else if(f===C){a.tag=14,a=kg(null,a,t,s,r);break e}}throw a=ie(t)||t,Error(l(306,a,""))}}return a;case 0:return rd(t,a,a.type,a.pendingProps,r);case 1:return s=a.type,f=Ur(s,a.pendingProps),Mg(t,a,s,f,r);case 3:e:{if(he(a,a.stateNode.containerInfo),t===null)throw Error(l(387));s=a.pendingProps;var m=a.memoizedState;f=m.element,Tu(t,a),$o(a,s,null,r);var b=a.memoizedState;if(s=b.cache,Cn(a,xt,s),s!==m.cache&&wu(a,[xt],r,!0),vo(),s=b.element,m.isDehydrated)if(m={element:s,isDehydrated:!1,cache:b.cache},a.updateQueue.baseState=m,a.memoizedState=m,a.flags&256){a=Og(t,a,s,r);break e}else if(s!==f){f=ka(Error(l(424)),a),fo(f),a=Og(t,a,s,r);break e}else{switch(t=a.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(rt=Ta(t.firstChild),It=a,Be=!0,En=null,za=!0,r=E0(a,null,s,r),a.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling}else{if(zr(),s===f){a=nn(t,a,r);break e}Lt(t,a,s,r)}a=a.child}return a;case 26:return Kl(t,a),t===null?(r=Ym(a.type,null,a.pendingProps,null))?a.memoizedState=r:Be||(r=a.type,t=a.pendingProps,s=fs(J.current).createElement(r),s[Ut]=a,s[aa]=t,Ft(s,r,t),Mt(s),a.stateNode=s):a.memoizedState=Ym(a.type,t.memoizedProps,a.pendingProps,t.memoizedState),null;case 27:return Te(a),t===null&&Be&&(s=a.stateNode=Pm(a.type,a.pendingProps,J.current),It=a,za=!0,f=rt,Hn(a.type)?(qd=f,rt=Ta(s.firstChild)):rt=f),Lt(t,a,a.pendingProps.children,r),Kl(t,a),t===null&&(a.flags|=4194304),a.child;case 5:return t===null&&Be&&((f=s=rt)&&(s=jb(s,a.type,a.pendingProps,za),s!==null?(a.stateNode=s,It=a,rt=Ta(s.firstChild),za=!1,f=!0):f=!1),f||zn(a)),Te(a),f=a.type,m=a.pendingProps,b=t!==null?t.memoizedProps:null,s=m.children,Bd(f,m)?s=null:b!==null&&Bd(f,b)&&(a.flags|=32),a.memoizedState!==null&&(f=Iu(t,a,I2,null,null,r),Bo._currentValue=f),Kl(t,a),Lt(t,a,s,r),a.child;case 6:return t===null&&Be&&((t=r=rt)&&(r=Sb(r,a.pendingProps,za),r!==null?(a.stateNode=r,It=a,rt=null,t=!0):t=!1),t||zn(a)),null;case 13:return Rg(t,a,r);case 4:return he(a,a.stateNode.containerInfo),s=a.pendingProps,t===null?a.child=Ar(a,null,s,r):Lt(t,a,s,r),a.child;case 11:return wg(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,Cn(a,a.type,s.value),Lt(t,a,s.children,r),a.child;case 9:return f=a.type._context,s=a.pendingProps.children,Tr(a),f=Bt(f),s=s(f),a.flags|=1,Lt(t,a,s,r),a.child;case 14:return kg(t,a,a.type,a.pendingProps,r);case 15:return Ng(t,a,a.type,a.pendingProps,r);case 19:return Dg(t,a,r);case 31:return Z2(t,a,r);case 22:return Eg(t,a,r,a.pendingProps);case 24:return Tr(a),s=Bt(xt),t===null?(f=Eu(),f===null&&(f=nt,m=ku(),f.pooledCache=m,m.refCount++,m!==null&&(f.pooledCacheLanes|=r),f=m),a.memoizedState={parent:s,cache:f},Cu(a),Cn(a,xt,f)):((t.lanes&r)!==0&&(Tu(t,a),$o(a,null,null,r),vo()),f=t.memoizedState,m=a.memoizedState,f.parent!==s?(f={parent:s,cache:s},a.memoizedState=f,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=f),Cn(a,xt,s)):(s=m.cache,Cn(a,xt,s),s!==f.cache&&wu(a,[xt],r,!0))),Lt(t,a,a.pendingProps.children,r),a.child;case 29:throw a.pendingProps}throw Error(l(156,a.tag))}function rn(t){t.flags|=4}function fd(t,a,r,s,f){if((a=(t.mode&32)!==0)&&(a=!1),a){if(t.flags|=16777216,(f&335544128)===f)if(t.stateNode.complete)t.flags|=8192;else if(um())t.flags|=8192;else throw Rr=Rl,zu}else t.flags&=-16777217}function Ig(t,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Qm(a))if(um())t.flags|=8192;else throw Rr=Rl,zu}function Xl(t,a){a!==null&&(t.flags|=4),t.flags&16384&&(a=t.tag!==22?yp():536870912,t.lanes|=a,ji|=a)}function wo(t,a){if(!Be)switch(t.tailMode){case"hidden":a=t.tail;for(var r=null;a!==null;)a.alternate!==null&&(r=a),a=a.sibling;r===null?t.tail=null:r.sibling=null;break;case"collapsed":r=t.tail;for(var s=null;r!==null;)r.alternate!==null&&(s=r),r=r.sibling;s===null?a||t.tail===null?t.tail=null:t.tail.sibling=null:s.sibling=null}}function it(t){var a=t.alternate!==null&&t.alternate.child===t.child,r=0,s=0;if(a)for(var f=t.child;f!==null;)r|=f.lanes|f.childLanes,s|=f.subtreeFlags&65011712,s|=f.flags&65011712,f.return=t,f=f.sibling;else for(f=t.child;f!==null;)r|=f.lanes|f.childLanes,s|=f.subtreeFlags,s|=f.flags,f.return=t,f=f.sibling;return t.subtreeFlags|=s,t.childLanes=r,a}function Y2(t,a,r){var s=a.pendingProps;switch(bu(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return it(a),null;case 1:return it(a),null;case 3:return r=a.stateNode,s=null,t!==null&&(s=t.memoizedState.cache),a.memoizedState.cache!==s&&(a.flags|=2048),en(xt),Se(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(ui(a)?rn(a):t===null||t.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,_u())),it(a),null;case 26:var f=a.type,m=a.memoizedState;return t===null?(rn(a),m!==null?(it(a),Ig(a,m)):(it(a),fd(a,f,null,s,r))):m?m!==t.memoizedState?(rn(a),it(a),Ig(a,m)):(it(a),a.flags&=-16777217):(t=t.memoizedProps,t!==s&&rn(a),it(a),fd(a,f,t,s,r)),null;case 27:if(q(a),r=J.current,f=a.type,t!==null&&a.stateNode!=null)t.memoizedProps!==s&&rn(a);else{if(!s){if(a.stateNode===null)throw Error(l(166));return it(a),null}t=O.current,ui(a)?y0(a):(t=Pm(f,s,r),a.stateNode=t,rn(a))}return it(a),null;case 5:if(q(a),f=a.type,t!==null&&a.stateNode!=null)t.memoizedProps!==s&&rn(a);else{if(!s){if(a.stateNode===null)throw Error(l(166));return it(a),null}if(m=O.current,ui(a))y0(a);else{var b=fs(J.current);switch(m){case 1:m=b.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:m=b.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":m=b.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":m=b.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":m=b.createElement("div"),m.innerHTML="<script><\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof s.is=="string"?b.createElement("select",{is:s.is}):b.createElement("select"),s.multiple?m.multiple=!0:s.size&&(m.size=s.size);break;default:m=typeof s.is=="string"?b.createElement(f,{is:s.is}):b.createElement(f)}}m[Ut]=a,m[aa]=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(Ft(m,f,s),f){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&rn(a)}}return it(a),fd(a,a.type,t===null?null:t.memoizedProps,a.pendingProps,r),null;case 6:if(t&&a.stateNode!=null)t.memoizedProps!==s&&rn(a);else{if(typeof s!="string"&&a.stateNode===null)throw Error(l(166));if(t=J.current,ui(a)){if(t=a.stateNode,r=a.memoizedProps,s=null,f=It,f!==null)switch(f.tag){case 27:case 5:s=f.memoizedProps}t[Ut]=a,t=!!(t.nodeValue===r||s!==null&&s.suppressHydrationWarning===!0||Rm(t.nodeValue,r)),t||zn(a,!0)}else t=fs(t).createTextNode(s),t[Ut]=a,a.stateNode=t}return it(a),null;case 31:if(r=a.memoizedState,t===null||t.memoizedState!==null){if(s=ui(a),r!==null){if(t===null){if(!s)throw Error(l(318));if(t=a.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(557));t[Ut]=a}else zr(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;it(a),t=!1}else r=_u(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=r),t=!0;if(!t)return a.flags&256?(ha(a),a):(ha(a),null);if((a.flags&128)!==0)throw Error(l(558))}return it(a),null;case 13:if(s=a.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(f=ui(a),s!==null&&s.dehydrated!==null){if(t===null){if(!f)throw Error(l(318));if(f=a.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(l(317));f[Ut]=a}else zr(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;it(a),f=!1}else f=_u(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=f),f=!0;if(!f)return a.flags&256?(ha(a),a):(ha(a),null)}return ha(a),(a.flags&128)!==0?(a.lanes=r,a):(r=s!==null,t=t!==null&&t.memoizedState!==null,r&&(s=a.child,f=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(f=s.alternate.memoizedState.cachePool.pool),m=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(m=s.memoizedState.cachePool.pool),m!==f&&(s.flags|=2048)),r!==t&&r&&(a.child.flags|=8192),Xl(a,a.updateQueue),it(a),null);case 4:return Se(),t===null&&Rd(a.stateNode.containerInfo),it(a),null;case 10:return en(a.type),it(a),null;case 19:if(L(yt),s=a.memoizedState,s===null)return it(a),null;if(f=(a.flags&128)!==0,m=s.rendering,m===null)if(f)wo(s,!1);else{if(pt!==0||t!==null&&(t.flags&128)!==0)for(t=a.child;t!==null;){if(m=Il(t),m!==null){for(a.flags|=128,wo(s,!1),t=m.updateQueue,a.updateQueue=t,Xl(a,t),a.subtreeFlags=0,t=r,r=a.child;r!==null;)f0(r,t),r=r.sibling;return B(yt,yt.current&1|2),Be&&Wa(a,s.treeForkCount),a.child}t=t.sibling}s.tail!==null&&Dt()>as&&(a.flags|=128,f=!0,wo(s,!1),a.lanes=4194304)}else{if(!f)if(t=Il(m),t!==null){if(a.flags|=128,f=!0,t=t.updateQueue,a.updateQueue=t,Xl(a,t),wo(s,!0),s.tail===null&&s.tailMode==="hidden"&&!m.alternate&&!Be)return it(a),null}else 2*Dt()-s.renderingStartTime>as&&r!==536870912&&(a.flags|=128,f=!0,wo(s,!1),a.lanes=4194304);s.isBackwards?(m.sibling=a.child,a.child=m):(t=s.last,t!==null?t.sibling=m:a.child=m,s.last=m)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Dt(),t.sibling=null,r=yt.current,B(yt,f?r&1|2:r&1),Be&&Wa(a,s.treeForkCount),t):(it(a),null);case 22:case 23:return ha(a),Au(),s=a.memoizedState!==null,t!==null?t.memoizedState!==null!==s&&(a.flags|=8192):s&&(a.flags|=8192),s?(r&536870912)!==0&&(a.flags&128)===0&&(it(a),a.subtreeFlags&6&&(a.flags|=8192)):it(a),r=a.updateQueue,r!==null&&Xl(a,r.retryQueue),r=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),s=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(s=a.memoizedState.cachePool.pool),s!==r&&(a.flags|=2048),t!==null&&L(Mr),null;case 24:return r=null,t!==null&&(r=t.memoizedState.cache),a.memoizedState.cache!==r&&(a.flags|=2048),en(xt),it(a),null;case 25:return null;case 30:return null}throw Error(l(156,a.tag))}function K2(t,a){switch(bu(a),a.tag){case 1:return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 3:return en(xt),Se(),t=a.flags,(t&65536)!==0&&(t&128)===0?(a.flags=t&-65537|128,a):null;case 26:case 27:case 5:return q(a),null;case 31:if(a.memoizedState!==null){if(ha(a),a.alternate===null)throw Error(l(340));zr()}return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 13:if(ha(a),t=a.memoizedState,t!==null&&t.dehydrated!==null){if(a.alternate===null)throw Error(l(340));zr()}return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 19:return L(yt),null;case 4:return Se(),null;case 10:return en(a.type),null;case 22:case 23:return ha(a),Au(),t!==null&&L(Mr),t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 24:return en(xt),null;case 25:return null;default:return null}}function Bg(t,a){switch(bu(a),a.tag){case 3:en(xt),Se();break;case 26:case 27:case 5:q(a);break;case 4:Se();break;case 31:a.memoizedState!==null&&ha(a);break;case 13:ha(a);break;case 19:L(yt);break;case 10:en(a.type);break;case 22:case 23:ha(a),Au(),t!==null&&L(Mr);break;case 24:en(xt)}}function ko(t,a){try{var r=a.updateQueue,s=r!==null?r.lastEffect:null;if(s!==null){var f=s.next;r=f;do{if((r.tag&t)===t){s=void 0;var m=r.create,b=r.inst;s=m(),b.destroy=s}r=r.next}while(r!==f)}}catch(M){Ke(a,a.return,M)}}function Dn(t,a,r){try{var s=a.updateQueue,f=s!==null?s.lastEffect:null;if(f!==null){var m=f.next;s=m;do{if((s.tag&t)===t){var b=s.inst,M=b.destroy;if(M!==void 0){b.destroy=void 0,f=a;var I=r,X=M;try{X()}catch(oe){Ke(f,I,oe)}}}s=s.next}while(s!==m)}}catch(oe){Ke(a,a.return,oe)}}function Lg(t){var a=t.updateQueue;if(a!==null){var r=t.stateNode;try{C0(a,r)}catch(s){Ke(t,t.return,s)}}}function Fg(t,a,r){r.props=Ur(t.type,t.memoizedProps),r.state=t.memoizedState;try{r.componentWillUnmount()}catch(s){Ke(t,a,s)}}function No(t,a){try{var r=t.ref;if(r!==null){switch(t.tag){case 26:case 27:case 5:var s=t.stateNode;break;case 30:s=t.stateNode;break;default:s=t.stateNode}typeof r=="function"?t.refCleanup=r(s):r.current=s}}catch(f){Ke(t,a,f)}}function Va(t,a){var r=t.ref,s=t.refCleanup;if(r!==null)if(typeof s=="function")try{s()}catch(f){Ke(t,a,f)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof r=="function")try{r(null)}catch(f){Ke(t,a,f)}else r.current=null}function Vg(t){var a=t.type,r=t.memoizedProps,s=t.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":r.autoFocus&&s.focus();break e;case"img":r.src?s.src=r.src:r.srcSet&&(s.srcset=r.srcSet)}}catch(f){Ke(t,t.return,f)}}function pd(t,a,r){try{var s=t.stateNode;yb(s,t.type,r,a),s[aa]=a}catch(f){Ke(t,t.return,f)}}function Hg(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Hn(t.type)||t.tag===4}function gd(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Hg(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&&Hn(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function md(t,a,r){var s=t.tag;if(s===5||s===6)t=t.stateNode,a?(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r).insertBefore(t,a):(a=r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,a.appendChild(t),r=r._reactRootContainer,r!=null||a.onclick!==null||(a.onclick=Ka));else if(s!==4&&(s===27&&Hn(t.type)&&(r=t.stateNode,a=null),t=t.child,t!==null))for(md(t,a,r),t=t.sibling;t!==null;)md(t,a,r),t=t.sibling}function Wl(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&&Hn(t.type)&&(r=t.stateNode),t=t.child,t!==null))for(Wl(t,a,r),t=t.sibling;t!==null;)Wl(t,a,r),t=t.sibling}function qg(t){var a=t.stateNode,r=t.memoizedProps;try{for(var s=t.type,f=a.attributes;f.length;)a.removeAttributeNode(f[0]);Ft(a,s,r),a[Ut]=t,a[aa]=r}catch(m){Ke(t,t.return,m)}}var on=!1,St=!1,hd=!1,Pg=typeof WeakSet=="function"?WeakSet:Set,Ot=null;function J2(t,a){if(t=t.containerInfo,Ud=$s,t=n0(t),cu(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var s=r.getSelection&&r.getSelection();if(s&&s.rangeCount!==0){r=s.anchorNode;var f=s.anchorOffset,m=s.focusNode;s=s.focusOffset;try{r.nodeType,m.nodeType}catch{r=null;break e}var b=0,M=-1,I=-1,X=0,oe=0,ce=t,ee=null;t:for(;;){for(var ne;ce!==r||f!==0&&ce.nodeType!==3||(M=b+f),ce!==m||s!==0&&ce.nodeType!==3||(I=b+s),ce.nodeType===3&&(b+=ce.nodeValue.length),(ne=ce.firstChild)!==null;)ee=ce,ce=ne;for(;;){if(ce===t)break t;if(ee===r&&++X===f&&(M=b),ee===m&&++oe===s&&(I=b),(ne=ce.nextSibling)!==null)break;ce=ee,ee=ce.parentNode}ce=ne}r=M===-1||I===-1?null:{start:M,end:I}}else r=null}r=r||{start:0,end:0}}else r=null;for(Id={focusedElem:t,selectionRange:r},$s=!1,Ot=a;Ot!==null;)if(a=Ot,t=a.child,(a.subtreeFlags&1028)!==0&&t!==null)t.return=a,Ot=t;else for(;Ot!==null;){switch(a=Ot,m=a.alternate,t=a.flags,a.tag){case 0:if((t&4)!==0&&(t=a.updateQueue,t=t!==null?t.events:null,t!==null))for(r=0;r<t.length;r++)f=t[r],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&m!==null){t=void 0,r=a,f=m.memoizedProps,m=m.memoizedState,s=r.stateNode;try{var ye=Ur(r.type,f);t=s.getSnapshotBeforeUpdate(ye,m),s.__reactInternalSnapshotBeforeUpdate=t}catch(we){Ke(r,r.return,we)}}break;case 3:if((t&1024)!==0){if(t=a.stateNode.containerInfo,r=t.nodeType,r===9)Fd(t);else if(r===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Fd(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(l(163))}if(t=a.sibling,t!==null){t.return=a.return,Ot=t;break}Ot=a.return}}function Zg(t,a,r){var s=r.flags;switch(r.tag){case 0:case 11:case 15:sn(t,r),s&4&&ko(5,r);break;case 1:if(sn(t,r),s&4)if(t=r.stateNode,a===null)try{t.componentDidMount()}catch(b){Ke(r,r.return,b)}else{var f=Ur(r.type,a.memoizedProps);a=a.memoizedState;try{t.componentDidUpdate(f,a,t.__reactInternalSnapshotBeforeUpdate)}catch(b){Ke(r,r.return,b)}}s&64&&Lg(r),s&512&&No(r,r.return);break;case 3:if(sn(t,r),s&64&&(t=r.updateQueue,t!==null)){if(a=null,r.child!==null)switch(r.child.tag){case 27:case 5:a=r.child.stateNode;break;case 1:a=r.child.stateNode}try{C0(t,a)}catch(b){Ke(r,r.return,b)}}break;case 27:a===null&&s&4&&qg(r);case 26:case 5:sn(t,r),a===null&&s&4&&Vg(r),s&512&&No(r,r.return);break;case 12:sn(t,r);break;case 31:sn(t,r),s&4&&Kg(t,r);break;case 13:sn(t,r),s&4&&Jg(t,r),s&64&&(t=r.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(r=ib.bind(null,r),wb(t,r))));break;case 22:if(s=r.memoizedState!==null||on,!s){a=a!==null&&a.memoizedState!==null||St,f=on;var m=St;on=s,(St=a)&&!m?cn(t,r,(r.subtreeFlags&8772)!==0):sn(t,r),on=f,St=m}break;case 30:break;default:sn(t,r)}}function Gg(t){var a=t.alternate;a!==null&&(t.alternate=null,Gg(a)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(a=t.stateNode,a!==null&&Zc(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,ra=!1;function ln(t,a,r){for(r=r.child;r!==null;)Yg(t,a,r),r=r.sibling}function Yg(t,a,r){if(da&&typeof da.onCommitFiberUnmount=="function")try{da.onCommitFiberUnmount(Ji,r)}catch{}switch(r.tag){case 26:St||Va(r,a),ln(t,a,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:St||Va(r,a);var s=ct,f=ra;Hn(r.type)&&(ct=r.stateNode,ra=!1),ln(t,a,r),Do(r.stateNode),ct=s,ra=f;break;case 5:St||Va(r,a);case 6:if(s=ct,f=ra,ct=null,ln(t,a,r),ct=s,ra=f,ct!==null)if(ra)try{(ct.nodeType===9?ct.body:ct.nodeName==="HTML"?ct.ownerDocument.body:ct).removeChild(r.stateNode)}catch(m){Ke(r,a,m)}else try{ct.removeChild(r.stateNode)}catch(m){Ke(r,a,m)}break;case 18:ct!==null&&(ra?(t=ct,Lm(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,r.stateNode),Ti(t)):Lm(ct,r.stateNode));break;case 4:s=ct,f=ra,ct=r.stateNode.containerInfo,ra=!0,ln(t,a,r),ct=s,ra=f;break;case 0:case 11:case 14:case 15:Dn(2,r,a),St||Dn(4,r,a),ln(t,a,r);break;case 1:St||(Va(r,a),s=r.stateNode,typeof s.componentWillUnmount=="function"&&Fg(r,a,s)),ln(t,a,r);break;case 21:ln(t,a,r);break;case 22:St=(s=St)||r.memoizedState!==null,ln(t,a,r),St=s;break;default:ln(t,a,r)}}function Kg(t,a){if(a.memoizedState===null&&(t=a.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Ti(t)}catch(r){Ke(a,a.return,r)}}}function Jg(t,a){if(a.memoizedState===null&&(t=a.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Ti(t)}catch(r){Ke(a,a.return,r)}}function X2(t){switch(t.tag){case 31:case 13:case 19:var a=t.stateNode;return a===null&&(a=t.stateNode=new Pg),a;case 22:return t=t.stateNode,a=t._retryCache,a===null&&(a=t._retryCache=new Pg),a;default:throw Error(l(435,t.tag))}}function Ql(t,a){var r=X2(t);a.forEach(function(s){if(!r.has(s)){r.add(s);var f=ob.bind(null,t,s);s.then(f,f)}})}function ia(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(Hn(M.type)){ct=M.stateNode,ra=!1;break e}break;case 5:ct=M.stateNode,ra=!1;break e;case 3:case 4:ct=M.stateNode.containerInfo,ra=!0;break e}M=M.return}if(ct===null)throw Error(l(160));Yg(m,b,f),ct=null,ra=!1,m=f.alternate,m!==null&&(m.return=null),f.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)Xg(a,t),a=a.sibling}var Aa=null;function Xg(t,a){var r=t.alternate,s=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:ia(a,t),oa(t),s&4&&(Dn(3,t,t.return),ko(3,t),Dn(5,t,t.return));break;case 1:ia(a,t),oa(t),s&512&&(St||r===null||Va(r,r.return)),s&64&&on&&(t=t.updateQueue,t!==null&&(s=t.callbacks,s!==null&&(r=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=r===null?s:r.concat(s))));break;case 26:var f=Aa;if(ia(a,t),oa(t),s&512&&(St||r===null||Va(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[Qi]||m[Ut]||m.namespaceURI==="http://www.w3.org/2000/svg"||m.hasAttribute("itemprop"))&&(m=f.createElement(s),f.head.insertBefore(m,f.querySelector("head > title"))),Ft(m,s,r),m[Ut]=t,Mt(m),s=m;break e;case"link":var b=Xm("link","href",f).get(s+(r.href||""));if(b){for(var M=0;M<b.length;M++)if(m=b[M],m.getAttribute("href")===(r.href==null||r.href===""?null:r.href)&&m.getAttribute("rel")===(r.rel==null?null:r.rel)&&m.getAttribute("title")===(r.title==null?null:r.title)&&m.getAttribute("crossorigin")===(r.crossOrigin==null?null:r.crossOrigin)){b.splice(M,1);break t}}m=f.createElement(s),Ft(m,s,r),f.head.appendChild(m);break;case"meta":if(b=Xm("meta","content",f).get(s+(r.content||""))){for(M=0;M<b.length;M++)if(m=b[M],m.getAttribute("content")===(r.content==null?null:""+r.content)&&m.getAttribute("name")===(r.name==null?null:r.name)&&m.getAttribute("property")===(r.property==null?null:r.property)&&m.getAttribute("http-equiv")===(r.httpEquiv==null?null:r.httpEquiv)&&m.getAttribute("charset")===(r.charSet==null?null:r.charSet)){b.splice(M,1);break t}}m=f.createElement(s),Ft(m,s,r),f.head.appendChild(m);break;default:throw Error(l(468,s))}m[Ut]=t,Mt(m),s=m}t.stateNode=s}else Wm(f,t.type,t.stateNode);else t.stateNode=Jm(f,s,t.memoizedProps);else m!==s?(m===null?r.stateNode!==null&&(r=r.stateNode,r.parentNode.removeChild(r)):m.count--,s===null?Wm(f,t.type,t.stateNode):Jm(f,s,t.memoizedProps)):s===null&&t.stateNode!==null&&pd(t,t.memoizedProps,r.memoizedProps)}break;case 27:ia(a,t),oa(t),s&512&&(St||r===null||Va(r,r.return)),r!==null&&s&4&&pd(t,t.memoizedProps,r.memoizedProps);break;case 5:if(ia(a,t),oa(t),s&512&&(St||r===null||Va(r,r.return)),t.flags&32){f=t.stateNode;try{ei(f,"")}catch(ye){Ke(t,t.return,ye)}}s&4&&t.stateNode!=null&&(f=t.memoizedProps,pd(t,f,r!==null?r.memoizedProps:f)),s&1024&&(hd=!0);break;case 6:if(ia(a,t),oa(t),s&4){if(t.stateNode===null)throw Error(l(162));s=t.memoizedProps,r=t.stateNode;try{r.nodeValue=s}catch(ye){Ke(t,t.return,ye)}}break;case 3:if(ms=null,f=Aa,Aa=ps(a.containerInfo),ia(a,t),Aa=f,oa(t),s&4&&r!==null&&r.memoizedState.isDehydrated)try{Ti(a.containerInfo)}catch(ye){Ke(t,t.return,ye)}hd&&(hd=!1,Wg(t));break;case 4:s=Aa,Aa=ps(t.stateNode.containerInfo),ia(a,t),oa(t),Aa=s;break;case 12:ia(a,t),oa(t);break;case 31:ia(a,t),oa(t),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,Ql(t,s)));break;case 13:ia(a,t),oa(t),t.child.flags&8192&&t.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(ts=Dt()),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,Ql(t,s)));break;case 22:f=t.memoizedState!==null;var I=r!==null&&r.memoizedState!==null,X=on,oe=St;if(on=X||f,St=oe||I,ia(a,t),St=oe,on=X,oa(t),s&8192)e:for(a=t.stateNode,a._visibility=f?a._visibility&-2:a._visibility|1,f&&(r===null||I||on||St||Ir(t)),r=null,a=t;;){if(a.tag===5||a.tag===26){if(r===null){I=r=a;try{if(m=I.stateNode,f)b=m.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{M=I.stateNode;var ce=I.memoizedProps.style,ee=ce!=null&&ce.hasOwnProperty("display")?ce.display:null;M.style.display=ee==null||typeof ee=="boolean"?"":(""+ee).trim()}}catch(ye){Ke(I,I.return,ye)}}}else if(a.tag===6){if(r===null){I=a;try{I.stateNode.nodeValue=f?"":I.memoizedProps}catch(ye){Ke(I,I.return,ye)}}}else if(a.tag===18){if(r===null){I=a;try{var ne=I.stateNode;f?Fm(ne,!0):Fm(I.stateNode,!1)}catch(ye){Ke(I,I.return,ye)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===t)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break e;for(;a.sibling===null;){if(a.return===null||a.return===t)break e;r===a&&(r=null),a=a.return}r===a&&(r=null),a.sibling.return=a.return,a=a.sibling}s&4&&(s=t.updateQueue,s!==null&&(r=s.retryQueue,r!==null&&(s.retryQueue=null,Ql(t,r))));break;case 19:ia(a,t),oa(t),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,Ql(t,s)));break;case 30:break;case 21:break;default:ia(a,t),oa(t)}}function oa(t){var a=t.flags;if(a&2){try{for(var r,s=t.return;s!==null;){if(Hg(s)){r=s;break}s=s.return}if(r==null)throw Error(l(160));switch(r.tag){case 27:var f=r.stateNode,m=gd(t);Wl(t,m,f);break;case 5:var b=r.stateNode;r.flags&32&&(ei(b,""),r.flags&=-33);var M=gd(t);Wl(t,M,b);break;case 3:case 4:var I=r.stateNode.containerInfo,X=gd(t);md(t,X,I);break;default:throw Error(l(161))}}catch(oe){Ke(t,t.return,oe)}t.flags&=-3}a&4096&&(t.flags&=-4097)}function Wg(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var a=t;Wg(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),t=t.sibling}}function sn(t,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)Zg(t,a.alternate,a),a=a.sibling}function Ir(t){for(t=t.child;t!==null;){var a=t;switch(a.tag){case 0:case 11:case 14:case 15:Dn(4,a,a.return),Ir(a);break;case 1:Va(a,a.return);var r=a.stateNode;typeof r.componentWillUnmount=="function"&&Fg(a,a.return,r),Ir(a);break;case 27:Do(a.stateNode);case 26:case 5:Va(a,a.return),Ir(a);break;case 22:a.memoizedState===null&&Ir(a);break;case 30:Ir(a);break;default:Ir(a)}t=t.sibling}}function cn(t,a,r){for(r=r&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var s=a.alternate,f=t,m=a,b=m.flags;switch(m.tag){case 0:case 11:case 15:cn(f,m,r),ko(4,m);break;case 1:if(cn(f,m,r),s=m,f=s.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(X){Ke(s,s.return,X)}if(s=m,f=s.updateQueue,f!==null){var M=s.stateNode;try{var I=f.shared.hiddenCallbacks;if(I!==null)for(f.shared.hiddenCallbacks=null,f=0;f<I.length;f++)z0(I[f],M)}catch(X){Ke(s,s.return,X)}}r&&b&64&&Lg(m),No(m,m.return);break;case 27:qg(m);case 26:case 5:cn(f,m,r),r&&s===null&&b&4&&Vg(m),No(m,m.return);break;case 12:cn(f,m,r);break;case 31:cn(f,m,r),r&&b&4&&Kg(f,m);break;case 13:cn(f,m,r),r&&b&4&&Jg(f,m);break;case 22:m.memoizedState===null&&cn(f,m,r),No(m,m.return);break;case 30:break;default:cn(f,m,r)}a=a.sibling}}function yd(t,a){var r=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),t=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(t=a.memoizedState.cachePool.pool),t!==r&&(t!=null&&t.refCount++,r!=null&&po(r))}function vd(t,a){t=null,a.alternate!==null&&(t=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==t&&(a.refCount++,t!=null&&po(t))}function Da(t,a,r,s){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)Qg(t,a,r,s),a=a.sibling}function Qg(t,a,r,s){var f=a.flags;switch(a.tag){case 0:case 11:case 15:Da(t,a,r,s),f&2048&&ko(9,a);break;case 1:Da(t,a,r,s);break;case 3:Da(t,a,r,s),f&2048&&(t=null,a.alternate!==null&&(t=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==t&&(a.refCount++,t!=null&&po(t)));break;case 12:if(f&2048){Da(t,a,r,s),t=a.stateNode;try{var m=a.memoizedProps,b=m.id,M=m.onPostCommit;typeof M=="function"&&M(b,a.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(I){Ke(a,a.return,I)}}else Da(t,a,r,s);break;case 31:Da(t,a,r,s);break;case 13:Da(t,a,r,s);break;case 23:break;case 22:m=a.stateNode,b=a.alternate,a.memoizedState!==null?m._visibility&2?Da(t,a,r,s):Eo(t,a):m._visibility&2?Da(t,a,r,s):(m._visibility|=2,bi(t,a,r,s,(a.subtreeFlags&10256)!==0||!1)),f&2048&&yd(b,a);break;case 24:Da(t,a,r,s),f&2048&&vd(a.alternate,a);break;default:Da(t,a,r,s)}}function bi(t,a,r,s,f){for(f=f&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var m=t,b=a,M=r,I=s,X=b.flags;switch(b.tag){case 0:case 11:case 15:bi(m,b,M,I,f),ko(8,b);break;case 23:break;case 22:var oe=b.stateNode;b.memoizedState!==null?oe._visibility&2?bi(m,b,M,I,f):Eo(m,b):(oe._visibility|=2,bi(m,b,M,I,f)),f&&X&2048&&yd(b.alternate,b);break;case 24:bi(m,b,M,I,f),f&&X&2048&&vd(b.alternate,b);break;default:bi(m,b,M,I,f)}a=a.sibling}}function 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&&yd(s.alternate,s);break;case 24:Eo(r,s),f&2048&&vd(s.alternate,s);break;default:Eo(r,s)}a=a.sibling}}var zo=8192;function xi(t,a,r){if(t.subtreeFlags&zo)for(t=t.child;t!==null;)em(t,a,r),t=t.sibling}function em(t,a,r){switch(t.tag){case 26:xi(t,a,r),t.flags&zo&&t.memoizedState!==null&&Ub(r,Aa,t.memoizedState,t.memoizedProps);break;case 5:xi(t,a,r);break;case 3:case 4:var s=Aa;Aa=ps(t.stateNode.containerInfo),xi(t,a,r),Aa=s;break;case 22:t.memoizedState===null&&(s=t.alternate,s!==null&&s.memoizedState!==null?(s=zo,zo=16777216,xi(t,a,r),zo=s):xi(t,a,r));break;default:xi(t,a,r)}}function tm(t){var a=t.alternate;if(a!==null&&(t=a.child,t!==null)){a.child=null;do a=t.sibling,t.sibling=null,t=a;while(t!==null)}}function Co(t){var a=t.deletions;if((t.flags&16)!==0){if(a!==null)for(var r=0;r<a.length;r++){var s=a[r];Ot=s,nm(s,t)}tm(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)am(t),t=t.sibling}function am(t){switch(t.tag){case 0:case 11:case 15:Co(t),t.flags&2048&&Dn(9,t,t.return);break;case 3:Co(t);break;case 12:Co(t);break;case 22:var a=t.stateNode;t.memoizedState!==null&&a._visibility&2&&(t.return===null||t.return.tag!==13)?(a._visibility&=-3,es(t)):Co(t);break;default:Co(t)}}function es(t){var a=t.deletions;if((t.flags&16)!==0){if(a!==null)for(var r=0;r<a.length;r++){var s=a[r];Ot=s,nm(s,t)}tm(t)}for(t=t.child;t!==null;){switch(a=t,a.tag){case 0:case 11:case 15:Dn(8,a,a.return),es(a);break;case 22:r=a.stateNode,r._visibility&2&&(r._visibility&=-3,es(a));break;default:es(a)}t=t.sibling}}function nm(t,a){for(;Ot!==null;){var r=Ot;switch(r.tag){case 0:case 11:case 15:Dn(8,r,a);break;case 23:case 22:if(r.memoizedState!==null&&r.memoizedState.cachePool!==null){var s=r.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:po(r.memoizedState.cache)}if(s=r.child,s!==null)s.return=r,Ot=s;else e:for(r=t;Ot!==null;){s=Ot;var f=s.sibling,m=s.return;if(Gg(s),s===r){Ot=null;break e}if(f!==null){f.return=m,Ot=f;break e}Ot=m}}}var W2={getCacheForType:function(t){var a=Bt(xt),r=a.data.get(t);return r===void 0&&(r=t(),a.data.set(t,r)),r},cacheSignal:function(){return Bt(xt).controller.signal}},Q2=typeof WeakMap=="function"?WeakMap:Map,Ze=0,nt=null,Ae=null,Ue=0,Ye=0,ya=null,Un=!1,_i=!1,$d=!1,un=0,pt=0,In=0,Br=0,bd=0,va=0,ji=0,To=null,la=null,xd=!1,ts=0,rm=0,as=1/0,ns=null,Bn=null,zt=0,Ln=null,Si=null,dn=0,_d=0,jd=null,im=null,Mo=0,Sd=null;function $a(){return(Ze&2)!==0&&Ue!==0?Ue&-Ue:ae.T!==null?Cd():xp()}function om(){if(va===0)if((Ue&536870912)===0||Be){var t=dl;dl<<=1,(dl&3932160)===0&&(dl=262144),va=t}else va=536870912;return t=ma.current,t!==null&&(t.flags|=32),va}function sa(t,a,r){(t===nt&&(Ye===2||Ye===9)||t.cancelPendingCommit!==null)&&(wi(t,0),Fn(t,Ue,va,!1)),Wi(t,r),((Ze&2)===0||t!==nt)&&(t===nt&&((Ze&2)===0&&(Br|=r),pt===4&&Fn(t,Ue,va,!1)),Ha(t))}function lm(t,a,r){if((Ze&6)!==0)throw Error(l(327));var s=!r&&(a&127)===0&&(a&t.expiredLanes)===0||Xi(t,a),f=s?ab(t,a):kd(t,a,!0),m=s;do{if(f===0){_i&&!s&&Fn(t,a,0,!1);break}else{if(r=t.current.alternate,m&&!eb(r)){f=kd(t,a,!1),m=!1;continue}if(f===2){if(m=a,t.errorRecoveryDisabledLanes&m)var b=0;else b=t.pendingLanes&-536870913,b=b!==0?b:b&536870912?536870912:0;if(b!==0){a=b;e:{var M=t;f=To;var I=M.current.memoizedState.isDehydrated;if(I&&(wi(M,b).flags|=256),b=kd(M,b,!1),b!==2){if($d&&!I){M.errorRecoveryDisabledLanes|=m,Br|=m,f=4;break e}m=la,la=f,m!==null&&(la===null?la=m:la.push.apply(la,m))}f=b}if(m=!1,f!==2)continue}}if(f===1){wi(t,0),Fn(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:Fn(s,a,va,!Un);break e;case 2:la=null;break;case 3:case 5:break;default:throw Error(l(329))}if((a&62914560)===a&&(f=ts+300-Dt(),10<f)){if(Fn(s,a,va,!Un),pl(s,0,!0)!==0)break e;dn=a,s.timeoutHandle=Im(sm.bind(null,s,r,la,ns,xd,a,va,Br,ji,Un,m,"Throttled",-0,0),f);break e}sm(s,r,la,ns,xd,a,va,Br,ji,Un,m,null,-0,0)}}break}while(!0);Ha(t)}function sm(t,a,r,s,f,m,b,M,I,X,oe,ce,ee,ne){if(t.timeoutHandle=-1,ce=a.subtreeFlags,ce&8192||(ce&16785408)===16785408){ce={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ka},em(a,m,ce);var ye=(m&62914560)===m?ts-Dt():(m&4194048)===m?rm-Dt():0;if(ye=Ib(ce,ye),ye!==null){dn=m,t.cancelPendingCommit=ye(hm.bind(null,t,a,m,r,s,f,b,M,I,oe,ce,null,ee,ne)),Fn(t,m,b,!X);return}}hm(t,a,m,r,s,f,b,M,I)}function eb(t){for(var a=t;;){var r=a.tag;if((r===0||r===11||r===15)&&a.flags&16384&&(r=a.updateQueue,r!==null&&(r=r.stores,r!==null)))for(var s=0;s<r.length;s++){var f=r[s],m=f.getSnapshot;f=f.value;try{if(!pa(m(),f))return!1}catch{return!1}}if(r=a.child,a.subtreeFlags&16384&&r!==null)r.return=a,a=r;else{if(a===t)break;for(;a.sibling===null;){if(a.return===null||a.return===t)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function Fn(t,a,r,s){a&=~bd,a&=~Br,t.suspendedLanes|=a,t.pingedLanes&=~a,s&&(t.warmLanes|=a),s=t.expirationTimes;for(var f=a;0<f;){var m=31-fa(f),b=1<<m;s[m]=-1,f&=~b}r!==0&&vp(t,r,a)}function rs(){return(Ze&6)===0?(Oo(0),!1):!0}function wd(){if(Ae!==null){if(Ye===0)var t=Ae.return;else t=Ae,Qa=Cr=null,Fu(t),mi=null,mo=0,t=Ae;for(;t!==null;)Bg(t.alternate,t),t=t.return;Ae=null}}function wi(t,a){var r=t.timeoutHandle;r!==-1&&(t.timeoutHandle=-1,bb(r)),r=t.cancelPendingCommit,r!==null&&(t.cancelPendingCommit=null,r()),dn=0,wd(),nt=t,Ae=r=Xa(t.current,null),Ue=a,Ye=0,ya=null,Un=!1,_i=Xi(t,a),$d=!1,ji=va=bd=Br=In=pt=0,la=To=null,xd=!1,(a&8)!==0&&(a|=a&32);var s=t.entangledLanes;if(s!==0)for(t=t.entanglements,s&=a;0<s;){var f=31-fa(s),m=1<<f;a|=t[f],s&=~m}return un=a,wl(),r}function cm(t,a){ze=null,ae.H=jo,a===gi||a===Ol?(a=w0(),Ye=3):a===zu?(a=w0(),Ye=4):Ye=a===nd?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,ya=a,Ae===null&&(pt=1,Gl(t,ka(a,t.current)))}function um(){var t=ma.current;return t===null?!0:(Ue&4194048)===Ue?Ca===null:(Ue&62914560)===Ue||(Ue&536870912)!==0?t===Ca:!1}function dm(){var t=ae.H;return ae.H=jo,t===null?jo:t}function fm(){var t=ae.A;return ae.A=W2,t}function is(){pt=4,Un||(Ue&4194048)!==Ue&&ma.current!==null||(_i=!0),(In&134217727)===0&&(Br&134217727)===0||nt===null||Fn(nt,Ue,va,!1)}function kd(t,a,r){var s=Ze;Ze|=2;var f=dm(),m=fm();(nt!==t||Ue!==a)&&(ns=null,wi(t,a)),a=!1;var b=pt;e:do try{if(Ye!==0&&Ae!==null){var M=Ae,I=ya;switch(Ye){case 8:wd(),b=6;break e;case 3:case 2:case 9:case 6:ma.current===null&&(a=!0);var X=Ye;if(Ye=0,ya=null,ki(t,M,I,X),r&&_i){b=0;break e}break;default:X=Ye,Ye=0,ya=null,ki(t,M,I,X)}}tb(),b=pt;break}catch(oe){cm(t,oe)}while(!0);return a&&t.shellSuspendCounter++,Qa=Cr=null,Ze=s,ae.H=f,ae.A=m,Ae===null&&(nt=null,Ue=0,wl()),b}function tb(){for(;Ae!==null;)pm(Ae)}function ab(t,a){var r=Ze;Ze|=2;var s=dm(),f=fm();nt!==t||Ue!==a?(ns=null,as=Dt()+500,wi(t,a)):_i=Xi(t,a);e:do try{if(Ye!==0&&Ae!==null){a=Ae;var m=ya;t:switch(Ye){case 1:Ye=0,ya=null,ki(t,a,m,1);break;case 2:case 9:if(j0(m)){Ye=0,ya=null,gm(a);break}a=function(){Ye!==2&&Ye!==9||nt!==t||(Ye=7),Ha(t)},m.then(a,a);break e;case 3:Ye=7;break e;case 4:Ye=5;break e;case 7:j0(m)?(Ye=0,ya=null,gm(a)):(Ye=0,ya=null,ki(t,a,m,7));break;case 5:var b=null;switch(Ae.tag){case 26:b=Ae.memoizedState;case 5:case 27:var M=Ae;if(b?Qm(b):M.stateNode.complete){Ye=0,ya=null;var I=M.sibling;if(I!==null)Ae=I;else{var X=M.return;X!==null?(Ae=X,os(X)):Ae=null}break t}}Ye=0,ya=null,ki(t,a,m,5);break;case 6:Ye=0,ya=null,ki(t,a,m,6);break;case 8:wd(),pt=6;break e;default:throw Error(l(462))}}nb();break}catch(oe){cm(t,oe)}while(!0);return Qa=Cr=null,ae.H=s,ae.A=f,Ze=r,Ae!==null?0:(nt=null,Ue=0,wl(),pt)}function nb(){for(;Ae!==null&&!_n();)pm(Ae)}function pm(t){var a=Ug(t.alternate,t,un);t.memoizedProps=t.pendingProps,a===null?os(t):Ae=a}function gm(t){var a=t,r=a.alternate;switch(a.tag){case 15:case 0:a=Tg(r,a,a.pendingProps,a.type,void 0,Ue);break;case 11:a=Tg(r,a,a.pendingProps,a.type.render,a.ref,Ue);break;case 5:Fu(a);default:Bg(r,a),a=Ae=f0(a,un),a=Ug(r,a,un)}t.memoizedProps=t.pendingProps,a===null?os(t):Ae=a}function ki(t,a,r,s){Qa=Cr=null,Fu(a),mi=null,mo=0;var f=a.return;try{if(P2(t,f,a,r,Ue)){pt=1,Gl(t,ka(r,t.current)),Ae=null;return}}catch(m){if(f!==null)throw Ae=f,m;pt=1,Gl(t,ka(r,t.current)),Ae=null;return}a.flags&32768?(Be||s===1?t=!0:_i||(Ue&536870912)!==0?t=!1:(Un=t=!0,(s===2||s===9||s===3||s===6)&&(s=ma.current,s!==null&&s.tag===13&&(s.flags|=16384))),mm(a,t)):os(a)}function os(t){var a=t;do{if((a.flags&32768)!==0){mm(a,Un);return}t=a.return;var r=Y2(a.alternate,a,un);if(r!==null){Ae=r;return}if(a=a.sibling,a!==null){Ae=a;return}Ae=a=t}while(a!==null);pt===0&&(pt=5)}function mm(t,a){do{var r=K2(t.alternate,t);if(r!==null){r.flags&=32767,Ae=r;return}if(r=t.return,r!==null&&(r.flags|=32768,r.subtreeFlags=0,r.deletions=null),!a&&(t=t.sibling,t!==null)){Ae=t;return}Ae=t=r}while(t!==null);pt=6,Ae=null}function hm(t,a,r,s,f,m,b,M,I){t.cancelPendingCommit=null;do ls();while(zt!==0);if((Ze&6)!==0)throw Error(l(327));if(a!==null){if(a===t.current)throw Error(l(177));if(m=a.lanes|a.childLanes,m|=gu,D1(t,r,m,b,M,I),t===nt&&(Ae=nt=null,Ue=0),Si=a,Ln=t,dn=r,_d=m,jd=f,im=s,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,lb(xr,function(){return xm(),null})):(t.callbackNode=null,t.callbackPriority=0),s=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||s){s=ae.T,ae.T=null,f=fe.p,fe.p=2,b=Ze,Ze|=4;try{J2(t,a,r)}finally{Ze=b,fe.p=f,ae.T=s}}zt=1,ym(),vm(),$m()}}function ym(){if(zt===1){zt=0;var t=Ln,a=Si,r=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||r){r=ae.T,ae.T=null;var s=fe.p;fe.p=2;var f=Ze;Ze|=4;try{Xg(a,t);var m=Id,b=n0(t.containerInfo),M=m.focusedElem,I=m.selectionRange;if(b!==M&&M&&M.ownerDocument&&a0(M.ownerDocument.documentElement,M)){if(I!==null&&cu(M)){var X=I.start,oe=I.end;if(oe===void 0&&(oe=X),"selectionStart"in M)M.selectionStart=X,M.selectionEnd=Math.min(oe,M.value.length);else{var ce=M.ownerDocument||document,ee=ce&&ce.defaultView||window;if(ee.getSelection){var ne=ee.getSelection(),ye=M.textContent.length,we=Math.min(I.start,ye),et=I.end===void 0?we:Math.min(I.end,ye);!ne.extend&&we>et&&(b=et,et=we,we=b);var H=t0(M,we),F=t0(M,et);if(H&&F&&(ne.rangeCount!==1||ne.anchorNode!==H.node||ne.anchorOffset!==H.offset||ne.focusNode!==F.node||ne.focusOffset!==F.offset)){var K=ce.createRange();K.setStart(H.node,H.offset),ne.removeAllRanges(),we>et?(ne.addRange(K),ne.extend(F.node,F.offset)):(K.setEnd(F.node,F.offset),ne.addRange(K))}}}}for(ce=[],ne=M;ne=ne.parentNode;)ne.nodeType===1&&ce.push({element:ne,left:ne.scrollLeft,top:ne.scrollTop});for(typeof M.focus=="function"&&M.focus(),M=0;M<ce.length;M++){var se=ce[M];se.element.scrollLeft=se.left,se.element.scrollTop=se.top}}$s=!!Ud,Id=Ud=null}finally{Ze=f,fe.p=s,ae.T=r}}t.current=a,zt=2}}function vm(){if(zt===2){zt=0;var t=Ln,a=Si,r=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||r){r=ae.T,ae.T=null;var s=fe.p;fe.p=2;var f=Ze;Ze|=4;try{Zg(t,a.alternate,a)}finally{Ze=f,fe.p=s,ae.T=r}}zt=3}}function $m(){if(zt===4||zt===3){zt=0,ta();var t=Ln,a=Si,r=dn,s=im;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?zt=5:(zt=0,Si=Ln=null,bm(t,t.pendingLanes));var f=t.pendingLanes;if(f===0&&(Bn=null),qc(r),a=a.stateNode,da&&typeof da.onCommitFiberRoot=="function")try{da.onCommitFiberRoot(Ji,a,void 0,(a.current.flags&128)===128)}catch{}if(s!==null){a=ae.T,f=fe.p,fe.p=2,ae.T=null;try{for(var m=t.onRecoverableError,b=0;b<s.length;b++){var M=s[b];m(M.value,{componentStack:M.stack})}}finally{ae.T=a,fe.p=f}}(dn&3)!==0&&ls(),Ha(t),f=t.pendingLanes,(r&261930)!==0&&(f&42)!==0?t===Sd?Mo++:(Mo=0,Sd=t):Mo=0,Oo(0)}}function bm(t,a){(t.pooledCacheLanes&=a)===0&&(a=t.pooledCache,a!=null&&(t.pooledCache=null,po(a)))}function ls(){return ym(),vm(),$m(),xm()}function xm(){if(zt!==5)return!1;var t=Ln,a=_d;_d=0;var r=qc(dn),s=ae.T,f=fe.p;try{fe.p=32>r?32:r,ae.T=null,r=jd,jd=null;var m=Ln,b=dn;if(zt=0,Si=Ln=null,dn=0,(Ze&6)!==0)throw Error(l(331));var M=Ze;if(Ze|=4,am(m.current),Qg(m,m.current,b,r),Ze=M,Oo(0,!1),da&&typeof da.onPostCommitFiberRoot=="function")try{da.onPostCommitFiberRoot(Ji,m)}catch{}return!0}finally{fe.p=f,ae.T=s,bm(t,a)}}function _m(t,a,r){a=ka(r,a),a=ad(t.stateNode,a,2),t=On(t,a,2),t!==null&&(Wi(t,2),Ha(t))}function Ke(t,a,r){if(t.tag===3)_m(t,t,r);else for(;a!==null;){if(a.tag===3){_m(a,t,r);break}else if(a.tag===1){var s=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Bn===null||!Bn.has(s))){t=ka(r,t),r=jg(2),s=On(a,r,2),s!==null&&(Sg(r,s,a,t),Wi(s,2),Ha(s));break}}a=a.return}}function Nd(t,a,r){var s=t.pingCache;if(s===null){s=t.pingCache=new Q2;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=rb.bind(null,t,a,r),a.then(t,t))}function rb(t,a,r){var s=t.pingCache;s!==null&&s.delete(a),t.pingedLanes|=t.suspendedLanes&r,t.warmLanes&=~r,nt===t&&(Ue&r)===r&&(pt===4||pt===3&&(Ue&62914560)===Ue&&300>Dt()-ts?(Ze&2)===0&&wi(t,0):bd|=r,ji===Ue&&(ji=0)),Ha(t)}function jm(t,a){a===0&&(a=yp()),t=Nr(t,a),t!==null&&(Wi(t,a),Ha(t))}function ib(t){var a=t.memoizedState,r=0;a!==null&&(r=a.retryLane),jm(t,r)}function ob(t,a){var r=0;switch(t.tag){case 31:case 13:var s=t.stateNode,f=t.memoizedState;f!==null&&(r=f.retryLane);break;case 19:s=t.stateNode;break;case 22:s=t.stateNode._retryCache;break;default:throw Error(l(314))}s!==null&&s.delete(a),jm(t,r)}function lb(t,a){return Tt(t,a)}var ss=null,Ni=null,Ed=!1,cs=!1,zd=!1,Vn=0;function Ha(t){t!==Ni&&t.next===null&&(Ni===null?ss=Ni=t:Ni=Ni.next=t),cs=!0,Ed||(Ed=!0,cb())}function Oo(t,a){if(!zd&&cs){zd=!0;do for(var r=!1,s=ss;s!==null;){if(t!==0){var f=s.pendingLanes;if(f===0)var m=0;else{var b=s.suspendedLanes,M=s.pingedLanes;m=(1<<31-fa(42|t)+1)-1,m&=f&~(b&~M),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(r=!0,Nm(s,m))}else m=Ue,m=pl(s,s===nt?m:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(m&3)===0||Xi(s,m)||(r=!0,Nm(s,m));s=s.next}while(r);zd=!1}}function sb(){Sm()}function Sm(){cs=Ed=!1;var t=0;Vn!==0&&$b()&&(t=Vn);for(var a=Dt(),r=null,s=ss;s!==null;){var f=s.next,m=wm(s,a);m===0?(s.next=null,r===null?ss=f:r.next=f,f===null&&(Ni=r)):(r=s,(t!==0||(m&3)!==0)&&(cs=!0)),s=f}zt!==0&&zt!==5||Oo(t),Vn!==0&&(Vn=0)}function wm(t,a){for(var r=t.suspendedLanes,s=t.pingedLanes,f=t.expirationTimes,m=t.pendingLanes&-62914561;0<m;){var b=31-fa(m),M=1<<b,I=f[b];I===-1?((M&r)===0||(M&s)!==0)&&(f[b]=A1(M,a)):I<=a&&(t.expiredLanes|=M),m&=~M}if(a=nt,r=Ue,r=pl(t,t===a?r:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),s=t.callbackNode,r===0||t===a&&(Ye===2||Ye===9)||t.cancelPendingCommit!==null)return s!==null&&s!==null&&ht(s),t.callbackNode=null,t.callbackPriority=0;if((r&3)===0||Xi(t,r)){if(a=r&-r,a===t.callbackPriority)return a;switch(s!==null&&ht(s),qc(r)){case 2:case 8:r=Gr;break;case 32:r=xr;break;case 268435456:r=cl;break;default:r=xr}return s=km.bind(null,t),r=Tt(r,s),t.callbackPriority=a,t.callbackNode=r,a}return s!==null&&s!==null&&ht(s),t.callbackPriority=2,t.callbackNode=null,2}function km(t,a){if(zt!==0&&zt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var r=t.callbackNode;if(ls()&&t.callbackNode!==r)return null;var s=Ue;return s=pl(t,t===nt?s:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),s===0?null:(lm(t,s,a),wm(t,Dt()),t.callbackNode!=null&&t.callbackNode===r?km.bind(null,t):null)}function Nm(t,a){if(ls())return null;lm(t,a,!0)}function cb(){xb(function(){(Ze&6)!==0?Tt(jn,sb):Sm()})}function Cd(){if(Vn===0){var t=fi;t===0&&(t=ul,ul<<=1,(ul&261888)===0&&(ul=256)),Vn=t}return Vn}function Em(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:yl(""+t)}function zm(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 ub(t,a,r,s,f){if(a==="submit"&&r&&r.stateNode===f){var m=Em((f[aa]||null).action),b=s.submitter;b&&(a=(a=b[aa]||null)?Em(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(Vn!==0){var I=b?zm(f,b):new FormData(f);Ju(r,{pending:!0,data:I,method:f.method,action:m},null,I)}}else typeof m=="function"&&(M.preventDefault(),I=b?zm(f,b):new FormData(f),Ju(r,{pending:!0,data:I,method:f.method,action:m},m,I))},currentTarget:f}]})}}for(var Td=0;Td<pu.length;Td++){var Md=pu[Td],db=Md.toLowerCase(),fb=Md[0].toUpperCase()+Md.slice(1);Ra(db,"on"+fb)}Ra(o0,"onAnimationEnd"),Ra(l0,"onAnimationIteration"),Ra(s0,"onAnimationStart"),Ra("dblclick","onDoubleClick"),Ra("focusin","onFocus"),Ra("focusout","onBlur"),Ra(E2,"onTransitionRun"),Ra(z2,"onTransitionStart"),Ra(C2,"onTransitionCancel"),Ra(c0,"onTransitionEnd"),Wr("onMouseEnter",["mouseout","mouseover"]),Wr("onMouseLeave",["mouseout","mouseover"]),Wr("onPointerEnter",["pointerout","pointerover"]),Wr("onPointerLeave",["pointerout","pointerover"]),jr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),jr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),jr("onBeforeInput",["compositionend","keypress","textInput","paste"]),jr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),jr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),jr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ro="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),pb=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ro));function Cm(t,a){a=(a&4)!==0;for(var r=0;r<t.length;r++){var s=t[r],f=s.event;s=s.listeners;e:{var m=void 0;if(a)for(var b=s.length-1;0<=b;b--){var M=s[b],I=M.instance,X=M.currentTarget;if(M=M.listener,I!==m&&f.isPropagationStopped())break e;m=M,f.currentTarget=X;try{m(f)}catch(oe){Sl(oe)}f.currentTarget=null,m=I}else for(b=0;b<s.length;b++){if(M=s[b],I=M.instance,X=M.currentTarget,M=M.listener,I!==m&&f.isPropagationStopped())break e;m=M,f.currentTarget=X;try{m(f)}catch(oe){Sl(oe)}f.currentTarget=null,m=I}}}}function De(t,a){var r=a[Pc];r===void 0&&(r=a[Pc]=new Set);var s=t+"__bubble";r.has(s)||(Tm(a,t,2,!1),r.add(s))}function Od(t,a,r){var s=0;a&&(s|=4),Tm(r,t,s,a)}var us="_reactListening"+Math.random().toString(36).slice(2);function Rd(t){if(!t[us]){t[us]=!0,Sp.forEach(function(r){r!=="selectionchange"&&(pb.has(r)||Od(r,!1,t),Od(r,!0,t))});var a=t.nodeType===9?t:t.ownerDocument;a===null||a[us]||(a[us]=!0,Od("selectionchange",!1,a))}}function Tm(t,a,r,s){switch(oh(a)){case 2:var f=Fb;break;case 8:f=Vb;break;default:f=Kd}r=f.bind(null,a,r,t),f=void 0,!eu||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(f=!0),s?f!==void 0?t.addEventListener(a,r,{capture:!0,passive:f}):t.addEventListener(a,r,!0):f!==void 0?t.addEventListener(a,r,{passive:f}):t.addEventListener(a,r,!1)}function Ad(t,a,r,s,f){var m=s;if((a&1)===0&&(a&2)===0&&s!==null)e:for(;;){if(s===null)return;var b=s.tag;if(b===3||b===4){var M=s.stateNode.containerInfo;if(M===f)break;if(b===4)for(b=s.return;b!==null;){var I=b.tag;if((I===3||I===4)&&b.stateNode.containerInfo===f)return;b=b.return}for(;M!==null;){if(b=Kr(M),b===null)return;if(I=b.tag,I===5||I===6||I===26||I===27){s=m=b;continue e}M=M.parentNode}}s=s.return}Dp(function(){var X=m,oe=Wc(r),ce=[];e:{var ee=u0.get(t);if(ee!==void 0){var ne=xl,ye=t;switch(t){case"keypress":if($l(r)===0)break e;case"keydown":case"keyup":ne=o2;break;case"focusin":ye="focus",ne=ru;break;case"focusout":ye="blur",ne=ru;break;case"beforeblur":case"afterblur":ne=ru;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ne=Bp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ne=Y1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ne=c2;break;case o0:case l0:case s0:ne=X1;break;case c0:ne=d2;break;case"scroll":case"scrollend":ne=Z1;break;case"wheel":ne=p2;break;case"copy":case"cut":case"paste":ne=Q1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ne=Fp;break;case"toggle":case"beforetoggle":ne=m2}var we=(a&4)!==0,et=!we&&(t==="scroll"||t==="scrollend"),H=we?ee!==null?ee+"Capture":null:ee;we=[];for(var F=X,K;F!==null;){var se=F;if(K=se.stateNode,se=se.tag,se!==5&&se!==26&&se!==27||K===null||H===null||(se=to(F,H),se!=null&&we.push(Ao(F,se,K))),et)break;F=F.return}0<we.length&&(ee=new ne(ee,ye,null,r,oe),ce.push({event:ee,listeners:we}))}}if((a&7)===0){e:{if(ee=t==="mouseover"||t==="pointerover",ne=t==="mouseout"||t==="pointerout",ee&&r!==Xc&&(ye=r.relatedTarget||r.fromElement)&&(Kr(ye)||ye[Yr]))break e;if((ne||ee)&&(ee=oe.window===oe?oe:(ee=oe.ownerDocument)?ee.defaultView||ee.parentWindow:window,ne?(ye=r.relatedTarget||r.toElement,ne=X,ye=ye?Kr(ye):null,ye!==null&&(et=u(ye),we=ye.tag,ye!==et||we!==5&&we!==27&&we!==6)&&(ye=null)):(ne=null,ye=X),ne!==ye)){if(we=Bp,se="onMouseLeave",H="onMouseEnter",F="mouse",(t==="pointerout"||t==="pointerover")&&(we=Fp,se="onPointerLeave",H="onPointerEnter",F="pointer"),et=ne==null?ee:eo(ne),K=ye==null?ee:eo(ye),ee=new we(se,F+"leave",ne,r,oe),ee.target=et,ee.relatedTarget=K,se=null,Kr(oe)===X&&(we=new we(H,F+"enter",ye,r,oe),we.target=K,we.relatedTarget=et,se=we),et=se,ne&&ye)t:{for(we=gb,H=ne,F=ye,K=0,se=H;se;se=we(se))K++;se=0;for(var je=F;je;je=we(je))se++;for(;0<K-se;)H=we(H),K--;for(;0<se-K;)F=we(F),se--;for(;K--;){if(H===F||F!==null&&H===F.alternate){we=H;break t}H=we(H),F=we(F)}we=null}else we=null;ne!==null&&Mm(ce,ee,ne,we,!1),ye!==null&&et!==null&&Mm(ce,et,ye,we,!0)}}e:{if(ee=X?eo(X):window,ne=ee.nodeName&&ee.nodeName.toLowerCase(),ne==="select"||ne==="input"&&ee.type==="file")var qe=Kp;else if(Gp(ee))if(Jp)qe=w2;else{qe=j2;var $e=_2}else ne=ee.nodeName,!ne||ne.toLowerCase()!=="input"||ee.type!=="checkbox"&&ee.type!=="radio"?X&&Jc(X.elementType)&&(qe=Kp):qe=S2;if(qe&&(qe=qe(t,X))){Yp(ce,qe,r,oe);break e}$e&&$e(t,ee,X),t==="focusout"&&X&&ee.type==="number"&&X.memoizedProps.value!=null&&Kc(ee,"number",ee.value)}switch($e=X?eo(X):window,t){case"focusin":(Gp($e)||$e.contentEditable==="true")&&(ri=$e,uu=X,co=null);break;case"focusout":co=uu=ri=null;break;case"mousedown":du=!0;break;case"contextmenu":case"mouseup":case"dragend":du=!1,r0(ce,r,oe);break;case"selectionchange":if(N2)break;case"keydown":case"keyup":r0(ce,r,oe)}var Ce;if(ou)e:{switch(t){case"compositionstart":var Ie="onCompositionStart";break e;case"compositionend":Ie="onCompositionEnd";break e;case"compositionupdate":Ie="onCompositionUpdate";break e}Ie=void 0}else ni?Pp(t,r)&&(Ie="onCompositionEnd"):t==="keydown"&&r.keyCode===229&&(Ie="onCompositionStart");Ie&&(Vp&&r.locale!=="ko"&&(ni||Ie!=="onCompositionStart"?Ie==="onCompositionEnd"&&ni&&(Ce=Up()):(kn=oe,tu="value"in kn?kn.value:kn.textContent,ni=!0)),$e=ds(X,Ie),0<$e.length&&(Ie=new Lp(Ie,t,null,r,oe),ce.push({event:Ie,listeners:$e}),Ce?Ie.data=Ce:(Ce=Zp(r),Ce!==null&&(Ie.data=Ce)))),(Ce=y2?v2(t,r):$2(t,r))&&(Ie=ds(X,"onBeforeInput"),0<Ie.length&&($e=new Lp("onBeforeInput","beforeinput",null,r,oe),ce.push({event:$e,listeners:Ie}),$e.data=Ce)),ub(ce,t,X,r,oe)}Cm(ce,a)})}function Ao(t,a,r){return{instance:t,listener:a,currentTarget:r}}function ds(t,a){for(var r=a+"Capture",s=[];t!==null;){var f=t,m=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||m===null||(f=to(t,r),f!=null&&s.unshift(Ao(t,f,m)),f=to(t,a),f!=null&&s.push(Ao(t,f,m))),t.tag===3)return s;t=t.return}return[]}function gb(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function Mm(t,a,r,s,f){for(var m=a._reactName,b=[];r!==null&&r!==s;){var M=r,I=M.alternate,X=M.stateNode;if(M=M.tag,I!==null&&I===s)break;M!==5&&M!==26&&M!==27||X===null||(I=X,f?(X=to(r,m),X!=null&&b.unshift(Ao(r,X,I))):f||(X=to(r,m),X!=null&&b.push(Ao(r,X,I)))),r=r.return}b.length!==0&&t.push({event:a,listeners:b})}var mb=/\r\n?/g,hb=/\u0000|\uFFFD/g;function Om(t){return(typeof t=="string"?t:""+t).replace(mb,`
|
|
49
|
-
`).replace(hb,"")}function Rm(t,a){return a=Om(a),Om(t)===a}function Qe(t,a,r,s,f,m){switch(r){case"children":typeof s=="string"?a==="body"||a==="textarea"&&s===""||ei(t,s):(typeof s=="number"||typeof s=="bigint")&&a!=="body"&&ei(t,""+s);break;case"className":ml(t,"class",s);break;case"tabIndex":ml(t,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":ml(t,r,s);break;case"style":Rp(t,s,m);break;case"data":if(a!=="object"){ml(t,"data",s);break}case"src":case"href":if(s===""&&(a!=="a"||r!=="href")){t.removeAttribute(r);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){t.removeAttribute(r);break}s=yl(""+s),t.setAttribute(r,s);break;case"action":case"formAction":if(typeof s=="function"){t.setAttribute(r,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof m=="function"&&(r==="formAction"?(a!=="input"&&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=Ka);break;case"onScroll":s!=null&&De("scroll",t);break;case"onScrollEnd":s!=null&&De("scrollend",t);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(l(61));if(r=s.__html,r!=null){if(f.children!=null)throw Error(l(60));t.innerHTML=r}}break;case"multiple":t.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":t.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){t.removeAttribute("xlink:href");break}r=yl(""+s),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(r,""+s):t.removeAttribute(r);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":s&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(r,""):t.removeAttribute(r);break;case"capture":case"download":s===!0?t.setAttribute(r,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(r,s):t.removeAttribute(r);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?t.setAttribute(r,s):t.removeAttribute(r);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?t.removeAttribute(r):t.setAttribute(r,s);break;case"popover":De("beforetoggle",t),De("toggle",t),gl(t,"popover",s);break;case"xlinkActuate":Ya(t,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":Ya(t,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":Ya(t,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":Ya(t,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":Ya(t,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":Ya(t,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":Ya(t,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":Ya(t,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":Ya(t,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":gl(t,"is",s);break;case"innerText":case"textContent":break;default:(!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(r=q1.get(r)||r,gl(t,r,s))}}function Dd(t,a,r,s,f,m){switch(r){case"style":Rp(t,s,m);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(l(61));if(r=s.__html,r!=null){if(f.children!=null)throw Error(l(60));t.innerHTML=r}}break;case"children":typeof s=="string"?ei(t,s):(typeof s=="number"||typeof s=="bigint")&&ei(t,""+s);break;case"onScroll":s!=null&&De("scroll",t);break;case"onScrollEnd":s!=null&&De("scrollend",t);break;case"onClick":s!=null&&(t.onclick=Ka);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!wp.hasOwnProperty(r))e:{if(r[0]==="o"&&r[1]==="n"&&(f=r.endsWith("Capture"),a=r.slice(2,f?r.length-7:void 0),m=t[aa]||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 Ft(t,a,r){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":De("error",t),De("load",t);var s=!1,f=!1,m;for(m in r)if(r.hasOwnProperty(m)){var b=r[m];if(b!=null)switch(m){case"src":s=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,a));default: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":De("invalid",t);var M=m=b=f=null,I=null,X=null;for(s in r)if(r.hasOwnProperty(s)){var oe=r[s];if(oe!=null)switch(s){case"name":f=oe;break;case"type":b=oe;break;case"checked":I=oe;break;case"defaultChecked":X=oe;break;case"value":m=oe;break;case"defaultValue":M=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(l(137,a));break;default:Qe(t,a,s,oe,r,null)}}Cp(t,m,M,I,X,b,f,!1);return;case"select":De("invalid",t),s=b=m=null;for(f in r)if(r.hasOwnProperty(f)&&(M=r[f],M!=null))switch(f){case"value":m=M;break;case"defaultValue":b=M;break;case"multiple":s=M;default:Qe(t,a,f,M,r,null)}a=m,r=b,t.multiple=!!s,a!=null?Qr(t,!!s,a,!1):r!=null&&Qr(t,!!s,r,!0);return;case"textarea":De("invalid",t),m=f=s=null;for(b in r)if(r.hasOwnProperty(b)&&(M=r[b],M!=null))switch(b){case"value":s=M;break;case"defaultValue":f=M;break;case"children":m=M;break;case"dangerouslySetInnerHTML":if(M!=null)throw Error(l(91));break;default:Qe(t,a,b,M,r,null)}Mp(t,s,f,m);return;case"option":for(I in r)if(r.hasOwnProperty(I)&&(s=r[I],s!=null))switch(I){case"selected":t.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:Qe(t,a,I,s,r,null)}return;case"dialog":De("beforetoggle",t),De("toggle",t),De("cancel",t),De("close",t);break;case"iframe":case"object":De("load",t);break;case"video":case"audio":for(s=0;s<Ro.length;s++)De(Ro[s],t);break;case"image":De("error",t),De("load",t);break;case"details":De("toggle",t);break;case"embed":case"source":case"link":De("error",t),De("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(X in r)if(r.hasOwnProperty(X)&&(s=r[X],s!=null))switch(X){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,a));default:Qe(t,a,X,s,r,null)}return;default:if(Jc(a)){for(oe in r)r.hasOwnProperty(oe)&&(s=r[oe],s!==void 0&&Dd(t,a,oe,s,r,void 0));return}}for(M in r)r.hasOwnProperty(M)&&(s=r[M],s!=null&&Qe(t,a,M,s,r,null))}function yb(t,a,r,s){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,m=null,b=null,M=null,I=null,X=null,oe=null;for(ne in r){var ce=r[ne];if(r.hasOwnProperty(ne)&&ce!=null)switch(ne){case"checked":break;case"value":break;case"defaultValue":I=ce;default:s.hasOwnProperty(ne)||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":X=ne;break;case"defaultChecked":oe=ne;break;case"value":b=ne;break;case"defaultValue":M=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(l(137,a));break;default:ne!==ce&&Qe(t,a,ee,ne,s,ce)}}Yc(t,b,M,I,X,oe,m,f);return;case"select":ne=b=M=ee=null;for(m in r)if(I=r[m],r.hasOwnProperty(m)&&I!=null)switch(m){case"value":break;case"multiple":ne=I;default:s.hasOwnProperty(m)||Qe(t,a,m,null,s,I)}for(f in s)if(m=s[f],I=r[f],s.hasOwnProperty(f)&&(m!=null||I!=null))switch(f){case"value":ee=m;break;case"defaultValue":M=m;break;case"multiple":b=m;default:m!==I&&Qe(t,a,f,m,s,I)}a=M,r=b,s=ne,ee!=null?Qr(t,!!r,ee,!1):!!s!=!!r&&(a!=null?Qr(t,!!r,a,!0):Qr(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)}Tp(t,ee,ne);return;case"option":for(var ye in r)if(ee=r[ye],r.hasOwnProperty(ye)&&ee!=null&&!s.hasOwnProperty(ye))switch(ye){case"selected":t.selected=!1;break;default:Qe(t,a,ye,null,s,ee)}for(I in s)if(ee=s[I],ne=r[I],s.hasOwnProperty(I)&&ee!==ne&&(ee!=null||ne!=null))switch(I){case"selected":t.selected=ee&&typeof ee!="function"&&typeof ee!="symbol";break;default:Qe(t,a,I,ee,s,ne)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var we in r)ee=r[we],r.hasOwnProperty(we)&&ee!=null&&!s.hasOwnProperty(we)&&Qe(t,a,we,null,s,ee);for(X in s)if(ee=s[X],ne=r[X],s.hasOwnProperty(X)&&ee!==ne&&(ee!=null||ne!=null))switch(X){case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(l(137,a));break;default:Qe(t,a,X,ee,s,ne)}return;default:if(Jc(a)){for(var et in r)ee=r[et],r.hasOwnProperty(et)&&ee!==void 0&&!s.hasOwnProperty(et)&&Dd(t,a,et,void 0,s,ee);for(oe in s)ee=s[oe],ne=r[oe],!s.hasOwnProperty(oe)||ee===ne||ee===void 0&&ne===void 0||Dd(t,a,oe,ee,s,ne);return}}for(var H in r)ee=r[H],r.hasOwnProperty(H)&&ee!=null&&!s.hasOwnProperty(H)&&Qe(t,a,H,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 Am(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function vb(){if(typeof performance.getEntriesByType=="function"){for(var t=0,a=0,r=performance.getEntriesByType("resource"),s=0;s<r.length;s++){var f=r[s],m=f.transferSize,b=f.initiatorType,M=f.duration;if(m&&M&&Am(b)){for(b=0,M=f.responseEnd,s+=1;s<r.length;s++){var I=r[s],X=I.startTime;if(X>M)break;var oe=I.transferSize,ce=I.initiatorType;oe&&Am(ce)&&(I=I.responseEnd,b+=oe*(I<M?1:(M-X)/(I-X)))}if(--s,a+=8*(m+b)/(f.duration/1e3),t++,10<t)break}}if(0<t)return a/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var Ud=null,Id=null;function fs(t){return t.nodeType===9?t:t.ownerDocument}function Dm(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Um(t,a){if(t===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&a==="foreignObject"?0:t}function Bd(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 Ld=null;function $b(){var t=window.event;return t&&t.type==="popstate"?t===Ld?!1:(Ld=t,!0):(Ld=null,!1)}var Im=typeof setTimeout=="function"?setTimeout:void 0,bb=typeof clearTimeout=="function"?clearTimeout:void 0,Bm=typeof Promise=="function"?Promise:void 0,xb=typeof queueMicrotask=="function"?queueMicrotask:typeof Bm<"u"?function(t){return Bm.resolve(null).then(t).catch(_b)}:Im;function _b(t){setTimeout(function(){throw t})}function Hn(t){return t==="head"}function Lm(t,a){var r=a,s=0;do{var f=r.nextSibling;if(t.removeChild(r),f&&f.nodeType===8)if(r=f.data,r==="/$"||r==="/&"){if(s===0){t.removeChild(f),Ti(a);return}s--}else if(r==="$"||r==="$?"||r==="$~"||r==="$!"||r==="&")s++;else if(r==="html")Do(t.ownerDocument.documentElement);else if(r==="head"){r=t.ownerDocument.head,Do(r);for(var m=r.firstChild;m;){var b=m.nextSibling,M=m.nodeName;m[Qi]||M==="SCRIPT"||M==="STYLE"||M==="LINK"&&m.rel.toLowerCase()==="stylesheet"||r.removeChild(m),m=b}}else r==="body"&&Do(t.ownerDocument.body);r=f}while(r);Ti(a)}function Fm(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 Fd(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":Fd(r),Zc(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}t.removeChild(r)}}function jb(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[Qi])switch(a){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(m=t.getAttribute("rel"),m==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(m!==f.rel||t.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||t.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||t.getAttribute("title")!==(f.title==null?null:f.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(m=t.getAttribute("src"),(m!==(f.src==null?null:f.src)||t.getAttribute("type")!==(f.type==null?null:f.type)||t.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&m&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(a==="input"&&t.type==="hidden"){var m=f.name==null?null:""+f.name;if(f.type==="hidden"&&t.getAttribute("name")===m)return t}else return t;if(t=Ta(t.nextSibling),t===null)break}return null}function Sb(t,a,r){if(a==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!r||(t=Ta(t.nextSibling),t===null))return null;return t}function Vm(t,a){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a||(t=Ta(t.nextSibling),t===null))return null;return t}function Vd(t){return t.data==="$?"||t.data==="$~"}function Hd(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function wb(t,a){var r=t.ownerDocument;if(t.data==="$~")t._reactRetry=a;else if(t.data!=="$?"||r.readyState!=="loading")a();else{var s=function(){a(),r.removeEventListener("DOMContentLoaded",s)};r.addEventListener("DOMContentLoaded",s),t._reactRetry=s}}function Ta(t){for(;t!=null;t=t.nextSibling){var a=t.nodeType;if(a===1||a===3)break;if(a===8){if(a=t.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return t}var qd=null;function Hm(t){t=t.nextSibling;for(var a=0;t;){if(t.nodeType===8){var r=t.data;if(r==="/$"||r==="/&"){if(a===0)return Ta(t.nextSibling);a--}else r!=="$"&&r!=="$!"&&r!=="$?"&&r!=="$~"&&r!=="&"||a++}t=t.nextSibling}return null}function qm(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 Pm(t,a,r){switch(a=fs(r),t){case"html":if(t=a.documentElement,!t)throw Error(l(452));return t;case"head":if(t=a.head,!t)throw Error(l(453));return t;case"body":if(t=a.body,!t)throw Error(l(454));return t;default:throw Error(l(451))}}function Do(t){for(var a=t.attributes;a.length;)t.removeAttributeNode(a[0]);Zc(t)}var Ma=new Map,Zm=new Set;function ps(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var fn=fe.d;fe.d={f:kb,r:Nb,D:Eb,C:zb,L:Cb,m:Tb,X:Ob,S:Mb,M:Rb};function kb(){var t=fn.f(),a=rs();return t||a}function Nb(t){var a=Jr(t);a!==null&&a.tag===5&&a.type==="form"?cg(a):fn.r(t)}var Ei=typeof document>"u"?null:document;function Gm(t,a,r){var s=Ei;if(s&&typeof a=="string"&&a){var f=Sa(a);f='link[rel="'+t+'"][href="'+f+'"]',typeof r=="string"&&(f+='[crossorigin="'+r+'"]'),Zm.has(f)||(Zm.add(f),t={rel:t,crossOrigin:r,href:a},s.querySelector(f)===null&&(a=s.createElement("link"),Ft(a,"link",t),Mt(a),s.head.appendChild(a)))}}function Eb(t){fn.D(t),Gm("dns-prefetch",t,null)}function zb(t,a){fn.C(t,a),Gm("preconnect",t,a)}function Cb(t,a,r){fn.L(t,a,r);var s=Ei;if(s&&t&&a){var f='link[rel="preload"][as="'+Sa(a)+'"]';a==="image"&&r&&r.imageSrcSet?(f+='[imagesrcset="'+Sa(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(f+='[imagesizes="'+Sa(r.imageSizes)+'"]')):f+='[href="'+Sa(t)+'"]';var m=f;switch(a){case"style":m=zi(t);break;case"script":m=Ci(t)}Ma.has(m)||(t=v({rel:"preload",href:a==="image"&&r&&r.imageSrcSet?void 0:t,as:a},r),Ma.set(m,t),s.querySelector(f)!==null||a==="style"&&s.querySelector(Uo(m))||a==="script"&&s.querySelector(Io(m))||(a=s.createElement("link"),Ft(a,"link",t),Mt(a),s.head.appendChild(a)))}}function Tb(t,a){fn.m(t,a);var r=Ei;if(r&&t){var s=a&&typeof a.as=="string"?a.as:"script",f='link[rel="modulepreload"][as="'+Sa(s)+'"][href="'+Sa(t)+'"]',m=f;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=Ci(t)}if(!Ma.has(m)&&(t=v({rel:"modulepreload",href:t},a),Ma.set(m,t),r.querySelector(f)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(Io(m)))return}s=r.createElement("link"),Ft(s,"link",t),Mt(s),r.head.appendChild(s)}}}function Mb(t,a,r){fn.S(t,a,r);var s=Ei;if(s&&t){var f=Xr(s).hoistableStyles,m=zi(t);a=a||"default";var b=f.get(m);if(!b){var M={loading:0,preload:null};if(b=s.querySelector(Uo(m)))M.loading=5;else{t=v({rel:"stylesheet",href:t,"data-precedence":a},r),(r=Ma.get(m))&&Pd(t,r);var I=b=s.createElement("link");Mt(I),Ft(I,"link",t),I._p=new Promise(function(X,oe){I.onload=X,I.onerror=oe}),I.addEventListener("load",function(){M.loading|=1}),I.addEventListener("error",function(){M.loading|=2}),M.loading|=4,gs(b,a,s)}b={type:"stylesheet",instance:b,count:1,state:M},f.set(m,b)}}}function Ob(t,a){fn.X(t,a);var r=Ei;if(r&&t){var s=Xr(r).hoistableScripts,f=Ci(t),m=s.get(f);m||(m=r.querySelector(Io(f)),m||(t=v({src:t,async:!0},a),(a=Ma.get(f))&&Zd(t,a),m=r.createElement("script"),Mt(m),Ft(m,"link",t),r.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},s.set(f,m))}}function Rb(t,a){fn.M(t,a);var r=Ei;if(r&&t){var s=Xr(r).hoistableScripts,f=Ci(t),m=s.get(f);m||(m=r.querySelector(Io(f)),m||(t=v({src:t,async:!0,type:"module"},a),(a=Ma.get(f))&&Zd(t,a),m=r.createElement("script"),Mt(m),Ft(m,"link",t),r.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},s.set(f,m))}}function Ym(t,a,r,s){var f=(f=J.current)?ps(f):null;if(!f)throw Error(l(446));switch(t){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(a=zi(r.href),r=Xr(f).hoistableStyles,s=r.get(a),s||(s={type:"style",instance:null,count:0,state:null},r.set(a,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(r.rel==="stylesheet"&&typeof r.href=="string"&&typeof r.precedence=="string"){t=zi(r.href);var m=Xr(f).hoistableStyles,b=m.get(t);if(b||(f=f.ownerDocument||f,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(t,b),(m=f.querySelector(Uo(t)))&&!m._p&&(b.instance=m,b.state.loading=5),Ma.has(t)||(r={rel:"preload",as:"style",href:r.href,crossOrigin:r.crossOrigin,integrity:r.integrity,media:r.media,hrefLang:r.hrefLang,referrerPolicy:r.referrerPolicy},Ma.set(t,r),m||Ab(f,t,r,b.state))),a&&s===null)throw Error(l(528,""));return b}if(a&&s!==null)throw Error(l(529,""));return null;case"script":return a=r.async,r=r.src,typeof r=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=Ci(r),r=Xr(f).hoistableScripts,s=r.get(a),s||(s={type:"script",instance:null,count:0,state:null},r.set(a,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,t))}}function zi(t){return'href="'+Sa(t)+'"'}function Uo(t){return'link[rel="stylesheet"]['+t+"]"}function Km(t){return v({},t,{"data-precedence":t.precedence,precedence:null})}function Ab(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}),Ft(a,"link",r),Mt(a),t.head.appendChild(a))}function Ci(t){return'[src="'+Sa(t)+'"]'}function Io(t){return"script[async]"+t}function Jm(t,a,r){if(a.count++,a.instance===null)switch(a.type){case"style":var s=t.querySelector('style[data-href~="'+Sa(r.href)+'"]');if(s)return a.instance=s,Mt(s),s;var f=v({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return s=(t.ownerDocument||t).createElement("style"),Mt(s),Ft(s,"style",f),gs(s,r.precedence,t),a.instance=s;case"stylesheet":f=zi(r.href);var m=t.querySelector(Uo(f));if(m)return a.state.loading|=4,a.instance=m,Mt(m),m;s=Km(r),(f=Ma.get(f))&&Pd(s,f),m=(t.ownerDocument||t).createElement("link"),Mt(m);var b=m;return b._p=new Promise(function(M,I){b.onload=M,b.onerror=I}),Ft(m,"link",s),a.state.loading|=4,gs(m,r.precedence,t),a.instance=m;case"script":return m=Ci(r.src),(f=t.querySelector(Io(m)))?(a.instance=f,Mt(f),f):(s=r,(f=Ma.get(m))&&(s=v({},r),Zd(s,f)),t=t.ownerDocument||t,f=t.createElement("script"),Mt(f),Ft(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 Pd(t,a){t.crossOrigin==null&&(t.crossOrigin=a.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=a.referrerPolicy),t.title==null&&(t.title=a.title)}function Zd(t,a){t.crossOrigin==null&&(t.crossOrigin=a.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=a.referrerPolicy),t.integrity==null&&(t.integrity=a.integrity)}var ms=null;function Xm(t,a,r){if(ms===null){var s=new Map,f=ms=new Map;f.set(r,s)}else f=ms,s=f.get(r),s||(s=new Map,f.set(r,s));if(s.has(t))return s;for(s.set(t,null),r=r.getElementsByTagName(t),f=0;f<r.length;f++){var m=r[f];if(!(m[Qi]||m[Ut]||t==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var b=m.getAttribute(a)||"";b=t+b;var M=s.get(b);M?M.push(m):s.set(b,[m])}}return s}function Wm(t,a,r){t=t.ownerDocument||t,t.head.insertBefore(r,a==="title"?t.querySelector("head > title"):null)}function Db(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 Qm(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function Ub(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=zi(s.href),m=a.querySelector(Uo(f));if(m){a=m._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(t.count++,t=hs.bind(t),a.then(t,t)),r.state.loading|=4,r.instance=m,Mt(m);return}m=a.ownerDocument||a,s=Km(s),(f=Ma.get(f))&&Pd(s,f),m=m.createElement("link"),Mt(m);var b=m;b._p=new Promise(function(M,I){b.onload=M,b.onerror=I}),Ft(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 Gd=0;function Ib(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&&Gd===0&&(Gd=62500*vb());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>Gd?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(Bb,t),ys=null,hs.call(t))}function Bb(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 Bo={$$typeof:N,Provider:null,Consumer:null,_currentValue:ge,_currentValue2:ge,_threadCount:0};function Lb(t,a,r,s,f,m,b,M,I){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Vc(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Vc(0),this.hiddenUpdates=Vc(null),this.identifierPrefix=s,this.onUncaughtError=f,this.onCaughtError=m,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=I,this.incompleteTransitions=new Map}function eh(t,a,r,s,f,m,b,M,I,X,oe,ce){return t=new Lb(t,a,r,b,I,X,oe,ce,M),a=1,m===!0&&(a|=24),m=ga(3,null,null,a),t.current=m,m.stateNode=t,a=ku(),a.refCount++,t.pooledCache=a,a.refCount++,m.memoizedState={element:s,isDehydrated:r,cache:a},Cu(m),t}function th(t){return t?(t=li,t):li}function ah(t,a,r,s,f,m){f=th(f),s.context===null?s.context=f:s.pendingContext=f,s=Mn(a),s.payload={element:r},m=m===void 0?null:m,m!==null&&(s.callback=m),r=On(t,s,a),r!==null&&(sa(r,t,a),yo(r,t,a))}function nh(t,a){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var r=t.retryLane;t.retryLane=r!==0&&r<a?r:a}}function Yd(t,a){nh(t,a),(t=t.alternate)&&nh(t,a)}function rh(t){if(t.tag===13||t.tag===31){var a=Nr(t,67108864);a!==null&&sa(a,t,67108864),Yd(t,67108864)}}function ih(t){if(t.tag===13||t.tag===31){var a=$a();a=Hc(a);var r=Nr(t,a);r!==null&&sa(r,t,a),Yd(t,a)}}var $s=!0;function Fb(t,a,r,s){var f=ae.T;ae.T=null;var m=fe.p;try{fe.p=2,Kd(t,a,r,s)}finally{fe.p=m,ae.T=f}}function Vb(t,a,r,s){var f=ae.T;ae.T=null;var m=fe.p;try{fe.p=8,Kd(t,a,r,s)}finally{fe.p=m,ae.T=f}}function Kd(t,a,r,s){if($s){var f=Jd(s);if(f===null)Ad(t,a,s,bs,r),lh(t,s);else if(qb(f,t,a,r,s))s.stopPropagation();else if(lh(t,s),a&4&&-1<Hb.indexOf(t)){for(;f!==null;){var m=Jr(f);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var b=_r(m.pendingLanes);if(b!==0){var M=m;for(M.pendingLanes|=2,M.entangledLanes|=2;b;){var I=1<<31-fa(b);M.entanglements[1]|=I,b&=~I}Ha(m),(Ze&6)===0&&(as=Dt()+500,Oo(0))}}break;case 31:case 13:M=Nr(m,2),M!==null&&sa(M,m,2),rs(),Yd(m,2)}if(m=Jd(s),m===null&&Ad(t,a,s,bs,r),m===f)break;f=m}f!==null&&s.stopPropagation()}else Ad(t,a,s,null,r)}}function Jd(t){return t=Wc(t),Xd(t)}var bs=null;function Xd(t){if(bs=null,t=Kr(t),t!==null){var a=u(t);if(a===null)t=null;else{var r=a.tag;if(r===13){if(t=d(a),t!==null)return t;t=null}else if(r===31){if(t=p(a),t!==null)return t;t=null}else if(r===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;t=null}else a!==t&&(t=null)}}return bs=t,null}function oh(t){switch(t){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ki()){case jn:return 2;case Gr:return 8;case xr:case sl:return 32;case cl:return 268435456;default:return 32}default:return 32}}var Wd=!1,qn=null,Pn=null,Zn=null,Lo=new Map,Fo=new Map,Gn=[],Hb="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function lh(t,a){switch(t){case"focusin":case"focusout":qn=null;break;case"dragenter":case"dragleave":Pn=null;break;case"mouseover":case"mouseout":Zn=null;break;case"pointerover":case"pointerout":Lo.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":Fo.delete(a.pointerId)}}function Vo(t,a,r,s,f,m){return t===null||t.nativeEvent!==m?(t={blockedOn:a,domEventName:r,eventSystemFlags:s,nativeEvent:m,targetContainers:[f]},a!==null&&(a=Jr(a),a!==null&&rh(a)),t):(t.eventSystemFlags|=s,a=t.targetContainers,f!==null&&a.indexOf(f)===-1&&a.push(f),t)}function qb(t,a,r,s,f){switch(a){case"focusin":return qn=Vo(qn,t,a,r,s,f),!0;case"dragenter":return Pn=Vo(Pn,t,a,r,s,f),!0;case"mouseover":return Zn=Vo(Zn,t,a,r,s,f),!0;case"pointerover":var m=f.pointerId;return Lo.set(m,Vo(Lo.get(m)||null,t,a,r,s,f)),!0;case"gotpointercapture":return m=f.pointerId,Fo.set(m,Vo(Fo.get(m)||null,t,a,r,s,f)),!0}return!1}function sh(t){var a=Kr(t.target);if(a!==null){var r=u(a);if(r!==null){if(a=r.tag,a===13){if(a=d(r),a!==null){t.blockedOn=a,_p(t.priority,function(){ih(r)});return}}else if(a===31){if(a=p(r),a!==null){t.blockedOn=a,_p(t.priority,function(){ih(r)});return}}else if(a===3&&r.stateNode.current.memoizedState.isDehydrated){t.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}t.blockedOn=null}function xs(t){if(t.blockedOn!==null)return!1;for(var a=t.targetContainers;0<a.length;){var r=Jd(t.nativeEvent);if(r===null){r=t.nativeEvent;var s=new r.constructor(r.type,r);Xc=s,r.target.dispatchEvent(s),Xc=null}else return a=Jr(r),a!==null&&rh(a),t.blockedOn=r,!1;a.shift()}return!0}function ch(t,a,r){xs(t)&&r.delete(a)}function Pb(){Wd=!1,qn!==null&&xs(qn)&&(qn=null),Pn!==null&&xs(Pn)&&(Pn=null),Zn!==null&&xs(Zn)&&(Zn=null),Lo.forEach(ch),Fo.forEach(ch)}function _s(t,a){t.blockedOn===a&&(t.blockedOn=null,Wd||(Wd=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Pb)))}var js=null;function uh(t){js!==t&&(js=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){js===t&&(js=null);for(var a=0;a<t.length;a+=3){var r=t[a],s=t[a+1],f=t[a+2];if(typeof s!="function"){if(Xd(s||r)===null)continue;break}var m=Jr(r);m!==null&&(t.splice(a,3),a-=3,Ju(m,{pending:!0,data:f,method:r.method,action:s},s,f))}}))}function Ti(t){function a(I){return _s(I,t)}qn!==null&&_s(qn,t),Pn!==null&&_s(Pn,t),Zn!==null&&_s(Zn,t),Lo.forEach(a),Fo.forEach(a);for(var r=0;r<Gn.length;r++){var s=Gn[r];s.blockedOn===t&&(s.blockedOn=null)}for(;0<Gn.length&&(r=Gn[0],r.blockedOn===null);)sh(r),r.blockedOn===null&&Gn.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[aa]||null;if(typeof m=="function")b||uh(r);else if(b){var M=null;if(m&&m.hasAttribute("formAction")){if(f=m,b=m[aa]||null)M=b.formAction;else if(Xd(f)!==null)continue}else M=b.action;typeof M=="function"?r[s+1]=M:(r.splice(s,3),s-=3),uh(r)}}}function dh(){function t(m){m.canIntercept&&m.info==="react-transition"&&m.intercept({handler:function(){return new Promise(function(b){return f=b})},focusReset:"manual",scroll:"manual"})}function a(){f!==null&&(f(),f=null),s||setTimeout(r,20)}function r(){if(!s&&!navigation.transition){var m=navigation.currentEntry;m&&m.url!=null&&navigation.navigate(m.url,{state:m.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,f=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(r,100),function(){s=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),f!==null&&(f(),f=null)}}}function Qd(t){this._internalRoot=t}Ss.prototype.render=Qd.prototype.render=function(t){var a=this._internalRoot;if(a===null)throw Error(l(409));var r=a.current,s=$a();ah(r,s,t,a,null,null)},Ss.prototype.unmount=Qd.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var a=t.containerInfo;ah(t.current,2,null,t,null,null),rs(),a[Yr]=null}};function Ss(t){this._internalRoot=t}Ss.prototype.unstable_scheduleHydration=function(t){if(t){var a=xp();t={blockedOn:null,target:t,priority:a};for(var r=0;r<Gn.length&&a!==0&&a<Gn[r].priority;r++);Gn.splice(r,0,t),r===0&&sh(t)}};var fh=n.version;if(fh!=="19.2.8")throw Error(l(527,fh,"19.2.8"));fe.findDOMNode=function(t){var a=t._reactInternals;if(a===void 0)throw typeof t.render=="function"?Error(l(188)):(t=Object.keys(t).join(","),Error(l(268,t)));return t=h(a),t=t!==null?y(t):null,t=t===null?null:t.stateNode,t};var Zb={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(Zb),da=ws}catch{}}return qo.createRoot=function(t,a){if(!c(t))throw Error(l(299));var r=!1,s="",f=$g,m=bg,b=xg;return a!=null&&(a.unstable_strictMode===!0&&(r=!0),a.identifierPrefix!==void 0&&(s=a.identifierPrefix),a.onUncaughtError!==void 0&&(f=a.onUncaughtError),a.onCaughtError!==void 0&&(m=a.onCaughtError),a.onRecoverableError!==void 0&&(b=a.onRecoverableError)),a=eh(t,1,!1,null,null,r,s,null,f,m,b,dh),t[Yr]=a.current,Rd(t),new Qd(a)},qo.hydrateRoot=function(t,a,r){if(!c(t))throw Error(l(299));var s=!1,f="",m=$g,b=bg,M=xg,I=null;return r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(f=r.identifierPrefix),r.onUncaughtError!==void 0&&(m=r.onUncaughtError),r.onCaughtError!==void 0&&(b=r.onCaughtError),r.onRecoverableError!==void 0&&(M=r.onRecoverableError),r.formState!==void 0&&(I=r.formState)),a=eh(t,1,!0,a,r??null,s,f,I,m,b,M,dh),a.context=th(null),r=a.current,s=$a(),s=Hc(s),f=Mn(s),f.callback=null,On(r,f,s),r=s,a.current.lanes=r,Wi(a,r),Ha(a),t[Yr]=a.current,Rd(t),new Ss(a)},qo.version="19.2.8",qo}var _h;function rx(){if(_h)return af.exports;_h=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),af.exports=nx(),af.exports}var ix=rx();function ot({num:e,title:n,mute:o,intro:l}){return i.jsxs("header",{className:"ggui-section__head",children:[i.jsx("div",{className:"ggui-section__num",children:e}),i.jsxs("div",{children:[i.jsxs("h2",{className:"ggui-section__title",children:[n,o?i.jsxs("span",{className:"ggui-mute",children:[" ",o]}):null]}),l?i.jsx("p",{className:"ggui-section__intro",children:l}):null]})]})}const Tf="ggui-eui:navigate";function ox(e){if(e==="/"||e==="")return{kind:"admin-index"};const n=/^\/preview\/([^/]+)\/?$/.exec(e);if(n){const c=n[1];return c?{kind:"blueprint",blueprintId:decodeURIComponent(c)}:{kind:"not-found",pathname:e}}if(e==="/admin"||e==="/admin/")return{kind:"admin-index"};if(e==="/admin/status"||e==="/admin/status/")return{kind:"admin-status"};if(e==="/admin/sessions"||e==="/admin/sessions/")return{kind:"admin-sessions"};if(e==="/admin/blueprints"||e==="/admin/blueprints/")return{kind:"admin-blueprints"};const o=/^\/admin\/variants\/([^/]+)\/generate\/?$/.exec(e);if(o){const c=o[1];return c?{kind:"admin-variant-generate",contractHash:decodeURIComponent(c)}:{kind:"not-found",pathname:e}}const l=/^\/admin\/variants\/([^/]+)\/?$/.exec(e);if(l){const c=l[1];return c?{kind:"admin-variant-detail",contractHash:decodeURIComponent(c)}:{kind:"not-found",pathname:e}}return e==="/admin/variants"||e==="/admin/variants/"?{kind:"admin-variants"}:e==="/admin/config"||e==="/admin/config/"?{kind:"admin-config"}:e==="/admin/tools"||e==="/admin/tools/"?{kind:"admin-tools"}:e==="/admin/llm-keys"||e==="/admin/llm-keys/"?{kind:"admin-llm-keys"}:e==="/admin/connector-keys"||e==="/admin/connector-keys/"?{kind:"admin-connector-keys"}:e==="/admin/oauth-providers"||e==="/admin/oauth-providers/"?{kind:"admin-oauth-providers"}:e==="/admin/clients"||e==="/admin/clients/"?{kind:"admin-clients"}:e==="/admin/theme"||e==="/admin/theme/"?{kind:"admin-theme"}:e==="/admin-login"||e==="/admin-login/"?{kind:"admin-login"}:e==="/devtools"||e==="/devtools/"?{kind:"devtools-index"}:e==="/devtools/llm-trace"||e==="/devtools/llm-trace/"?{kind:"devtools-llm-trace"}:e==="/devtools/validator"||e==="/devtools/validator/"?{kind:"devtools-validator"}:e==="/devtools/cache"||e==="/devtools/cache/"?{kind:"devtools-cache"}:e==="/devtools/timeline"||e==="/devtools/timeline/"?{kind:"devtools-timeline"}:e==="/devtools/payloads"||e==="/devtools/payloads/"?{kind:"devtools-payloads"}:e==="/devtools/benchmarks"||e==="/devtools/benchmarks/"?{kind:"devtools-benchmarks"}:{kind:"not-found",pathname:e}}let jh=null,lf=null;function lx(e){return(e!==jh||lf===null)&&(jh=e,lf=ox(e)),lf}function Le(e){typeof window>"u"||(window.history.pushState(null,"",e),window.dispatchEvent(new Event(Tf)))}function sx(e){return typeof window>"u"?()=>{}:(window.addEventListener("popstate",e),window.addEventListener(Tf,e),()=>{window.removeEventListener("popstate",e),window.removeEventListener(Tf,e)})}function cx(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 Lv(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 ux=[{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 dx({route:e,children:n}){return i.jsxs("div",{className:"ggui-config-grid","data-ggui-admin-shell":!0,children:[i.jsx(fx,{route:e}),i.jsx("div",{className:"ggui-admin-pane",children:n})]})}function fx({route:e}){return i.jsx("nav",{className:"ggui-config-rail","aria-label":"admin sections","data-ggui-admin-rail":!0,children:ux.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:()=>Le(o.path),"aria-current":l?"page":void 0,className:`ggui-config-rail__btn${l?" is-active":""}`,children:o.label})},o.path)})})]},n.label))})}const px=[{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 gx({route:e,children:n}){return i.jsxs("div",{className:"ggui-config-grid","data-ggui-devtools-shell":!0,children:[i.jsx(mx,{route:e}),i.jsx("div",{className:"ggui-admin-pane",children:n})]})}function mx({route:e}){return i.jsx("nav",{className:"ggui-config-rail","aria-label":"devtools sections","data-ggui-devtools-rail":!0,children:px.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:()=>Le(o.path),"aria-current":l?"page":void 0,className:`ggui-config-rail__btn${l?" is-active":""}`,children:o.label})},o.path)})})]},n.label))})}const gn="#292929",Mi="#d9d9d9",sf="#f4f3ed",hx={mirror:{g1Outer:Mi,g1Inner:gn,g2Outer:gn,g2Inner:Mi,u:gn,i:Mi},"mono-ink":{g1Outer:gn,g1Inner:gn,g2Outer:gn,g2Inner:gn,u:gn,i:gn},reverse:{g1Outer:Mi,g1Inner:sf,g2Outer:sf,g2Inner:Mi,u:sf,i:Mi}};function Fv({width:e,variant:n="mirror"}){const o=Math.round(e*50/224),l=hx[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 yx(){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(Fv,{width:160})})]})})}const vx="ggui-mode";let ks=null;function $x(){if(ks!==null)return ks;if(typeof document>"u")return"prod";const e=document.querySelector(`meta[name="${vx}"]`);return ks=(e==null?void 0:e.getAttribute("content"))==="dev"?"dev":"prod",ks}function bx({route:e,rightSlot:n}){const o=xx(e),l=cx(e),c=Lv(e),u=$x()==="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:()=>Le("/admin/status"),"aria-label":"go to admin",style:{display:"flex",alignItems:"center"},children:i.jsx(Fv,{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:()=>Le("/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:()=>Le("/admin/status"),children:"admin →"})}),n?i.jsx("li",{children:n}):null]})]})})}function xx(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 Vt({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(dx,{route:e,children:n}):o==="devtools"&&(d=i.jsx(gx,{route:e,children:n})),i.jsxs("div",{className:"ggui-shell",children:[i.jsx(bx,{route:e,rightSlot:c}),i.jsx("main",{className:u,children:d}),l?i.jsx(yx,{}):null]})}function _x(){const[e,n]=D.useState(""),[o,l]=D.useState(!1),[c,u]=D.useState(null),d=(()=>{if(typeof window>"u")return"/admin";const g=new URLSearchParams(window.location.search).get("next");return g===null||g===""||!g.startsWith("/")||g.startsWith("//")?"/admin":g})(),p=async g=>{g.preventDefault(),u(null);const h=e.trim();if(h.length===0){u("Paste an admin token.");return}l(!0);try{const y=await fetch("/ggui/console/admin-login",{method:"POST",headers:{"content-type":"application/json",accept:"application/json"},body:JSON.stringify({token:h})});if(y.status===204){Le(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 jx={anthropic:{label:"Anthropic",help:"Used by Claude models.",apiKeyUrl:"https://console.anthropic.com/settings/keys"},openai:{label:"OpenAI",help:"Used by GPT models.",apiKeyUrl:"https://platform.openai.com/api-keys"},google:{label:"Google",help:"Used by Gemini models.",apiKeyUrl:"https://aistudio.google.com/app/apikey"},openrouter:{label:"OpenRouter",help:"Routes to any provider via one key.",apiKeyUrl:"https://openrouter.ai/keys"}};function cf(){if(typeof window>"u")return;const e=window.location.pathname+window.location.search;Le(`/admin-login?next=${encodeURIComponent(e)}`)}function Sx(e){return e.replace(/\[[\d;]*[a-zA-Z]/g,"").replace(/\s+/g,"")}function wx(){const[e,n]=D.useState({kind:"loading"}),o=async()=>{n(u=>u.kind==="ready"?u:{kind:"loading"});try{const u=await fetch("/ggui/console/llm-keys",{credentials:"include",headers:{accept:"application/json"}});if(u.status===401){cf();return}if(!u.ok){n({kind:"error",message:u.status===404?"BYOK store not enabled — `ggui serve` should wire one by default.":`server returned ${u.status}`});return}const d=await u.json();n({kind:"ready",data:d})}catch(u){n({kind:"error",message:String(u)})}};D.useEffect(()=>{o()},[]);const l=async(u,d)=>{const p=await fetch("/ggui/console/llm-keys",{method:"POST",credentials:"include",headers:{"content-type":"application/json",accept:"application/json"},body:JSON.stringify({provider:u,key:d})});if(p.status===401){cf();return}if(!p.ok)throw new Error(`server returned ${p.status}`);await o()},c=async u=>{const d=await fetch(`/ggui/console/llm-keys/${encodeURIComponent(u)}`,{method:"DELETE",credentials:"include"});if(d.status===401){cf();return}if(d.status!==204)throw new Error(`server returned ${d.status}`);await o()};return i.jsxs("section",{className:"ggui-section",children:[i.jsx(ot,{num:"01 / admin / llm-keys",title:"Operator-side LLM keys.",mute:"Server-default keys for unpaired and operator generation.",intro:i.jsxs(i.Fragment,{children:["Each provider is checked against env vars first, then"," ",i.jsx("code",{className:"ggui-code",children:"~/.ggui/credentials.json"})," — env wins on collision. These are the keys"," ",i.jsx("code",{className:"ggui-code",children:"ggui serve"})," uses for any generation that doesn't carry a paired-user scope. The same plane is exposed to paired users at"," ",i.jsx("code",{className:"ggui-code",children:"/settings"}),"; the difference is which scope the writes land in."]})}),e.kind==="loading"?i.jsx("p",{className:"ggui-muted",style:{margin:0,padding:12},children:"Loading providers…"}):e.kind==="error"?i.jsxs("p",{className:"ggui-muted",style:{margin:0,padding:12},"data-ggui-admin-llm-error":!0,children:["Couldn't load providers — ",e.message]}):i.jsx(kx,{rows:e.data.providers,scope:e.data.scope,onSet:l,onClear:c})]})}function kx({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(Nx,{row:c,onSet:o,onClear:l},c.name))})]})}function Nx({row:e,onSet:n,onClear:o}){const l=jx[e.name],[c,u]=D.useState(""),[d,p]=D.useState(!1),[g,h]=D.useState(null),y=async j=>{j.preventDefault();const k=Sx(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 Ex=[{id:"google",label:"Google"},{id:"github",label:"GitHub"}],uf="<redacted>";async function Sh(e,n,o,l){const c=new Headers(n.headers??{});o!==null&&c.set("X-Ggui-CSRF",o);const u=await fetch(e,{...n,headers:c,credentials:"include"});if(u.status!==403)return u;const d=await l();if(d===null)return u;const p=new Headers(n.headers??{});return p.set("X-Ggui-CSRF",d),fetch(e,{...n,headers:p,credentials:"include"})}function zx(){const[e,n]=D.useState({kind:"loading"}),[o,l]=D.useState(null),c=async()=>{try{const g=await fetch("/ggui/csrf-token",{headers:{accept:"application/json"},credentials:"include"});if(!g.ok)return null;const h=await g.json();return l(h.token),h.token}catch{return null}},u=async()=>{n(g=>g.kind==="ready"?g:{kind:"loading"});try{const g=await fetch("/ggui/admin/oauth-providers",{headers:{accept:"application/json"},credentials:"include"});if(g.status===401){Le(`/admin-login?next=${encodeURIComponent("/admin/oauth-providers")}`);return}if(!g.ok){n({kind:"error",message:`server returned ${g.status}`});return}const h=await g.json();n({kind:"ready",data:h})}catch(g){n({kind:"error",message:String(g)})}};D.useEffect(()=>{c(),u()},[]);const d=async(g,h)=>{const y=await Sh(`/ggui/admin/oauth-providers/${encodeURIComponent(g)}`,{method:"PUT",headers:{"content-type":"application/json",accept:"application/json"},body:JSON.stringify(h)},o,c);if(y.status===401){Le(`/admin-login?next=${encodeURIComponent("/admin/oauth-providers")}`);return}if(!y.ok)throw new Error(`server returned ${y.status}`);await u()},p=async g=>{const h=await Sh(`/ggui/admin/oauth-providers/${encodeURIComponent(g)}`,{method:"DELETE"},o,c);if(h.status===401){Le(`/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:Ex.map(g=>{const h=e.data.providers.find(y=>y.providerId===g.id);return i.jsx(Cx,{providerId:g.id,label:g.label,row:h,onSave:d,onDelete:p},g.id)})})]})}function Cx({providerId:e,label:n,row:o,onSave:l,onDelete:c}){const u=(o==null?void 0:o.source)==="env",d=(o==null?void 0:o.source)==="file",p=(o==null?void 0:o.clientId)??"",g=(o==null?void 0:o.enabled)??!0,[h,y]=D.useState(p),[v,j]=D.useState(""),[k,x]=D.useState(g),[z,E]=D.useState(!1),[w,$]=D.useState(null);D.useEffect(()=>{y((o==null?void 0:o.clientId)??""),j(""),x((o==null?void 0:o.enabled)??!0)},[o==null?void 0:o.clientId,o==null?void 0:o.enabled,o==null?void 0:o.source]);const N=h!==p||v.trim().length>0||k!==g,R=async S=>{if(S.preventDefault(),$(null),h.trim().length===0){$("Client ID is required.");return}if(!d&&v.trim().length===0){$("Client Secret is required.");return}E(!0);try{await l(e,{clientId:h.trim(),clientSecret:v.trim(),enabled:k})}catch(C){$(`save failed — ${String(C)}`)}finally{E(!1)}},_=async()=>{if(window.confirm(`Delete ${n} OAuth config? End-users will no longer be able to sign in with ${n}.`)){$(null),E(!0);try{await c(e)}catch(S){$(`delete failed — ${String(S)}`)}finally{E(!1)}}};return i.jsxs("article",{"data-ggui-oauth-provider-card":e,className:"ggui-card",style:{opacity:z?.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(Tx,{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:z,autoComplete:"off",spellCheck:!1,"data-ggui-oauth-provider-client-id":!0})})]}),i.jsxs("label",{style:{display:"flex",flexDirection:"column",gap:4},"aria-label":`${n} client secret`,children:[i.jsx("span",{className:"ggui-muted",children:"Client Secret"}),i.jsx("span",{className:"ggui-field",children:i.jsx("input",{type:"password",placeholder:u?uf:d?`${uf} — leave blank to keep`:`paste ${n} OAuth client secret`,value:u?uf:v,onChange:S=>j(S.target.value),readOnly:u,disabled:z,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||z,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||z||!N,children:[i.jsx("span",{className:"ggui-btn__dot","aria-hidden":!0}),z?"saving…":"save"]}),d?i.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost","data-ggui-oauth-provider-delete":!0,disabled:z,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 Tx({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 Mx="modulepreload",Ox=function(e){return"/"+e},wh={},Rx=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=Ox(h),h in wh)return;wh[h]=!0;const y=h.endsWith(".css"),v=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${v}`))return;const j=document.createElement("link");if(j.rel=y?"stylesheet":Mx,y||(j.as="script"),j.crossOrigin="",j.href=h,g&&j.setAttribute("nonce",g),document.head.appendChild(j),y)return new Promise((k,x)=>{j.addEventListener("load",k),j.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${h}`)))})}))}function u(d){const p=new Event("vite:preloadError",{cancelable:!0});if(p.payload=d,window.dispatchEvent(p),!p.defaultPrevented)throw d}return c.then(d=>{for(const p of d||[])p.status==="rejected"&&u(p.reason);return n().catch(u)})};var Ax=Object.defineProperty,Nc=(e,n)=>{for(var o in n)Ax(e,o,{get:n[o],enumerable:!0})};const Dx="draft-2026-08-19",Ux=Dx;function Pf(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var kh;function le(e,n,o){function l(p,g){if(p._zod||Object.defineProperty(p,"_zod",{value:{def:g,constr:d,traits:new Set},enumerable:!1}),p._zod.traits.has(e))return;p._zod.traits.add(e),n(p,g);const h=d.prototype,y=Object.keys(h);for(let v=0;v<y.length;v++){const j=y[v];j in p||(p[j]=h[j].bind(p))}}const c=(o==null?void 0:o.Parent)??Object;class u extends c{}Object.defineProperty(u,"name",{value:e});function d(p){var g;const h=o!=null&&o.Parent?new u:this;l(h,p),(g=h._zod).deferred??(g.deferred=[]);for(const y of h._zod.deferred)y();return h}return Object.defineProperty(d,"init",{value:l}),Object.defineProperty(d,Symbol.hasInstance,{value:p=>{var g,h;return o!=null&&o.Parent&&p instanceof o.Parent?!0:(h=(g=p==null?void 0:p._zod)==null?void 0:g.traits)==null?void 0:h.has(e)}}),Object.defineProperty(d,"name",{value:e}),d}class Ui extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Vv extends Error{constructor(n){super(`Encountered unidirectional transform during encode: ${n}`),this.name="ZodEncodeError"}}(kh=globalThis).__zod_globalConfig??(kh.__zod_globalConfig={});const Zf=globalThis.__zod_globalConfig;function bn(e){return Zf}function Hv(e){const n=Object.values(e).filter(l=>typeof l=="number");return Object.entries(e).filter(([l,c])=>n.indexOf(+l)===-1).map(([l,c])=>c)}function Mf(e,n){return typeof n=="bigint"?n.toString():n}function Ec(e){return{get value(){{const n=e();return Object.defineProperty(this,"value",{value:n}),n}}}}function Gf(e){return e==null}function Yf(e){const n=e.startsWith("^")?1:0,o=e.endsWith("$")?e.length-1:e.length;return e.slice(n,o)}function Ix(e,n){const o=e/n,l=Math.round(o),c=Number.EPSILON*Math.max(Math.abs(o),1);return Math.abs(o-l)<c?0:o-l}const Nh=Symbol("evaluating");function Fe(e,n,o){let l;Object.defineProperty(e,n,{get(){if(l!==Nh)return l===void 0&&(l=Nh,l=o()),l},set(c){Object.defineProperty(e,n,{value:c})},configurable:!0})}function Pr(e,n,o){Object.defineProperty(e,n,{value:o,writable:!0,enumerable:!0,configurable:!0})}function vr(...e){const n={};for(const o of e){const l=Object.getOwnPropertyDescriptors(o);Object.assign(n,l)}return Object.defineProperties({},n)}function Eh(e){return JSON.stringify(e)}function Bx(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const qv="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Xo(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Lx=Ec(()=>{var e;if(Zf.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 Fi(e){if(Xo(e)===!1)return!1;const n=e.constructor;if(n===void 0||typeof n!="function")return!0;const o=n.prototype;return!(Xo(o)===!1||Object.prototype.hasOwnProperty.call(o,"isPrototypeOf")===!1)}function Pv(e){return Fi(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 Vi(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 Vx(e){return Object.keys(e).filter(n=>e[n]._zod.optin==="optional"&&e[n]._zod.optout==="optional")}const Hx={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 qx(e,n){const o=e._zod.def,l=o.checks;if(l&&l.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const u=vr(e._zod.def,{get shape(){const d={};for(const p in n){if(!(p in o.shape))throw new Error(`Unrecognized key: "${p}"`);n[p]&&(d[p]=o.shape[p])}return Pr(this,"shape",d),d},checks:[]});return $r(e,u)}function Px(e,n){const o=e._zod.def,l=o.checks;if(l&&l.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const u=vr(e._zod.def,{get shape(){const d={...e._zod.def.shape};for(const p in n){if(!(p in o.shape))throw new Error(`Unrecognized key: "${p}"`);n[p]&&delete d[p]}return Pr(this,"shape",d),d},checks:[]});return $r(e,u)}function Zx(e,n){if(!Fi(n))throw new Error("Invalid input to extend: expected a plain object");const o=e._zod.def.checks;if(o&&o.length>0){const u=e._zod.def.shape;for(const d in n)if(Object.getOwnPropertyDescriptor(u,d)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const c=vr(e._zod.def,{get shape(){const u={...e._zod.def.shape,...n};return Pr(this,"shape",u),u}});return $r(e,c)}function Gx(e,n){if(!Fi(n))throw new Error("Invalid input to safeExtend: expected a plain object");const o=vr(e._zod.def,{get shape(){const l={...e._zod.def.shape,...n};return Pr(this,"shape",l),l}});return $r(e,o)}function Yx(e,n){var l;if((l=e._zod.def.checks)!=null&&l.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const o=vr(e._zod.def,{get shape(){const c={...e._zod.def.shape,...n._zod.def.shape};return Pr(this,"shape",c),c},get catchall(){return n._zod.def.catchall},checks:n._zod.def.checks??[]});return $r(e,o)}function Kx(e,n,o){const c=n._zod.def.checks;if(c&&c.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const d=vr(n._zod.def,{get shape(){const p=n._zod.def.shape,g={...p};if(o)for(const h in o){if(!(h in p))throw new Error(`Unrecognized key: "${h}"`);o[h]&&(g[h]=e?new e({type:"optional",innerType:p[h]}):p[h])}else for(const h in p)g[h]=e?new e({type:"optional",innerType:p[h]}):p[h];return Pr(this,"shape",g),g},checks:[]});return $r(n,d)}function Jx(e,n,o){const l=vr(n._zod.def,{get shape(){const c=n._zod.def.shape,u={...c};if(o)for(const d in o){if(!(d in u))throw new Error(`Unrecognized key: "${d}"`);o[d]&&(u[d]=new e({type:"nonoptional",innerType:c[d]}))}else for(const d in c)u[d]=new e({type:"nonoptional",innerType:c[d]});return Pr(this,"shape",u),u}});return $r(n,l)}function Ai(e,n=0){var o;if(e.aborted===!0)return!0;for(let l=n;l<e.issues.length;l++)if(((o=e.issues[l])==null?void 0:o.continue)!==!0)return!0;return!1}function Xx(e,n=0){var o;if(e.aborted===!0)return!0;for(let l=n;l<e.issues.length;l++)if(((o=e.issues[l])==null?void 0:o.continue)===!1)return!0;return!1}function Di(e,n){return n.map(o=>{var l;return(l=o).path??(l.path=[]),o.path.unshift(e),o})}function Ns(e){return typeof e=="string"?e:e==null?void 0:e.message}function xn(e,n,o){var g,h,y,v,j,k;const l=e.message?e.message:Ns((y=(h=(g=e.inst)==null?void 0:g._zod.def)==null?void 0:h.error)==null?void 0:y.call(h,e))??Ns((v=n==null?void 0:n.error)==null?void 0:v.call(n,e))??Ns((j=o.customError)==null?void 0:j.call(o,e))??Ns((k=o.localeError)==null?void 0:k.call(o,e))??"Invalid input",{inst:c,continue:u,input:d,...p}=e;return p.path??(p.path=[]),p.message=l,n!=null&&n.reportInput&&(p.input=d),p}function Kf(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Wo(...e){const[n,o,l]=e;return typeof n=="string"?{message:n,code:"custom",input:o,inst:l}:{...n}}const Zv=(e,n)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:n,enumerable:!1}),e.message=JSON.stringify(n,Mf,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Gv=le("$ZodError",Zv),Yv=le("$ZodError",Zv,{Parent:Error});function Wx(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 Qx(e,n=o=>o.message){const o={_errors:[]},l=(c,u=[])=>{for(const d of c.issues)if(d.code==="invalid_union"&&d.errors.length)d.errors.map(p=>l({issues:p},[...u,...d.path]));else if(d.code==="invalid_key")l({issues:d.issues},[...u,...d.path]);else if(d.code==="invalid_element")l({issues:d.issues},[...u,...d.path]);else{const p=[...u,...d.path];if(p.length===0)o._errors.push(n(d));else{let g=o,h=0;for(;h<p.length;){const y=p[h];h===p.length-1?(g[y]=g[y]||{_errors:[]},g[y]._errors.push(n(d))):g[y]=g[y]||{_errors:[]},g=g[y],h++}}}};return l(e),o}const Jf=e=>(n,o,l,c)=>{const u=l?{...l,async:!1}:{async:!1},d=n._zod.run({value:o,issues:[]},u);if(d instanceof Promise)throw new Ui;if(d.issues.length){const p=new((c==null?void 0:c.Err)??e)(d.issues.map(g=>xn(g,u,bn())));throw qv(p,c==null?void 0:c.callee),p}return d.value},Xf=e=>async(n,o,l,c)=>{const u=l?{...l,async:!0}:{async:!0};let d=n._zod.run({value:o,issues:[]},u);if(d instanceof Promise&&(d=await d),d.issues.length){const p=new((c==null?void 0:c.Err)??e)(d.issues.map(g=>xn(g,u,bn())));throw qv(p,c==null?void 0:c.callee),p}return d.value},zc=e=>(n,o,l)=>{const c=l?{...l,async:!1}:{async:!1},u=n._zod.run({value:o,issues:[]},c);if(u instanceof Promise)throw new Ui;return u.issues.length?{success:!1,error:new(e??Gv)(u.issues.map(d=>xn(d,c,bn())))}:{success:!0,data:u.value}},e5=zc(Yv),Cc=e=>async(n,o,l)=>{const c=l?{...l,async:!0}:{async:!0};let u=n._zod.run({value:o,issues:[]},c);return u instanceof Promise&&(u=await u),u.issues.length?{success:!1,error:new e(u.issues.map(d=>xn(d,c,bn())))}:{success:!0,data:u.value}},t5=Cc(Yv),a5=e=>(n,o,l)=>{const c=l?{...l,direction:"backward"}:{direction:"backward"};return Jf(e)(n,o,c)},n5=e=>(n,o,l)=>Jf(e)(n,o,l),r5=e=>async(n,o,l)=>{const c=l?{...l,direction:"backward"}:{direction:"backward"};return Xf(e)(n,o,c)},i5=e=>async(n,o,l)=>Xf(e)(n,o,l),o5=e=>(n,o,l)=>{const c=l?{...l,direction:"backward"}:{direction:"backward"};return zc(e)(n,o,c)},l5=e=>(n,o,l)=>zc(e)(n,o,l),s5=e=>async(n,o,l)=>{const c=l?{...l,direction:"backward"}:{direction:"backward"};return Cc(e)(n,o,c)},c5=e=>async(n,o,l)=>Cc(e)(n,o,l),u5=/^[cC][0-9a-z]{6,}$/,d5=/^[0-9a-z]+$/,f5=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,p5=/^[0-9a-vA-V]{20}$/,g5=/^[A-Za-z0-9]{27}$/,m5=/^[a-zA-Z0-9_-]{21}$/,h5=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,y5=/^([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})$/,zh=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)$/,v5=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,$5="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function b5(){return new RegExp($5,"u")}const x5=/^(?:(?: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])$/,_5=/^(([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}|:))$/,j5=/^((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])$/,S5=/^(([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])$/,w5=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Kv=/^[A-Za-z0-9_-]*$/,k5=/^https?$/,N5=/^\+[1-9]\d{6,14}$/,Jv="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",E5=new RegExp(`^${Jv}$`);function Xv(e){const n="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${n}`:e.precision===0?`${n}:[0-5]\\d`:`${n}:[0-5]\\d\\.\\d{${e.precision}}`:`${n}(?::[0-5]\\d(?:\\.\\d+)?)?`}function z5(e){return new RegExp(`^${Xv(e)}$`)}function C5(e){const n=Xv({precision:e.precision}),o=["Z"];e.local&&o.push(""),e.offset&&o.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const l=`${n}(?:${o.join("|")})`;return new RegExp(`^${Jv}T(?:${l})$`)}const T5=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}$`)},M5=/^-?\d+$/,Wv=/^-?\d+(?:\.\d+)?$/,O5=/^(?:true|false)$/i,R5=/^null$/i,A5=/^[^A-Z]*$/,D5=/^[^a-z]*$/,ua=le("$ZodCheck",(e,n)=>{var o;e._zod??(e._zod={}),e._zod.def=n,(o=e._zod).onattach??(o.onattach=[])}),Qv={number:"number",bigint:"bigint",object:"date"},e$=le("$ZodCheckLessThan",(e,n)=>{ua.init(e,n);const o=Qv[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})}}),t$=le("$ZodCheckGreaterThan",(e,n)=>{ua.init(e,n);const o=Qv[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})}}),U5=le("$ZodCheckMultipleOf",(e,n)=>{ua.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):Ix(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})}}),I5=le("$ZodCheckNumberFormat",(e,n)=>{var d;ua.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]=Hx[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=M5)}),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})}}),B5=le("$ZodCheckMaxLength",(e,n)=>{var o;ua.init(e,n),(o=e._zod.def).when??(o.when=l=>{const c=l.value;return!Gf(c)&&c.length!==void 0}),e._zod.onattach.push(l=>{const c=l._zod.bag.maximum??Number.POSITIVE_INFINITY;n.maximum<c&&(l._zod.bag.maximum=n.maximum)}),e._zod.check=l=>{const c=l.value;if(c.length<=n.maximum)return;const d=Kf(c);l.issues.push({origin:d,code:"too_big",maximum:n.maximum,inclusive:!0,input:c,inst:e,continue:!n.abort})}}),L5=le("$ZodCheckMinLength",(e,n)=>{var o;ua.init(e,n),(o=e._zod.def).when??(o.when=l=>{const c=l.value;return!Gf(c)&&c.length!==void 0}),e._zod.onattach.push(l=>{const c=l._zod.bag.minimum??Number.NEGATIVE_INFINITY;n.minimum>c&&(l._zod.bag.minimum=n.minimum)}),e._zod.check=l=>{const c=l.value;if(c.length>=n.minimum)return;const d=Kf(c);l.issues.push({origin:d,code:"too_small",minimum:n.minimum,inclusive:!0,input:c,inst:e,continue:!n.abort})}}),F5=le("$ZodCheckLengthEquals",(e,n)=>{var o;ua.init(e,n),(o=e._zod.def).when??(o.when=l=>{const c=l.value;return!Gf(c)&&c.length!==void 0}),e._zod.onattach.push(l=>{const c=l._zod.bag;c.minimum=n.length,c.maximum=n.length,c.length=n.length}),e._zod.check=l=>{const c=l.value,u=c.length;if(u===n.length)return;const d=Kf(c),p=u>n.length;l.issues.push({origin:d,...p?{code:"too_big",maximum:n.length}:{code:"too_small",minimum:n.length},inclusive:!0,exact:!0,input:l.value,inst:e,continue:!n.abort})}}),Tc=le("$ZodCheckStringFormat",(e,n)=>{var o,l;ua.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=()=>{})}),V5=le("$ZodCheckRegex",(e,n)=>{Tc.init(e,n),e._zod.check=o=>{n.pattern.lastIndex=0,!n.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:"regex",input:o.value,pattern:n.pattern.toString(),inst:e,continue:!n.abort})}}),H5=le("$ZodCheckLowerCase",(e,n)=>{n.pattern??(n.pattern=A5),Tc.init(e,n)}),q5=le("$ZodCheckUpperCase",(e,n)=>{n.pattern??(n.pattern=D5),Tc.init(e,n)}),P5=le("$ZodCheckIncludes",(e,n)=>{ua.init(e,n);const o=Vi(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})}}),Z5=le("$ZodCheckStartsWith",(e,n)=>{ua.init(e,n);const o=new RegExp(`^${Vi(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})}}),G5=le("$ZodCheckEndsWith",(e,n)=>{ua.init(e,n);const o=new RegExp(`.*${Vi(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})}}),Y5=le("$ZodCheckOverwrite",(e,n)=>{ua.init(e,n),e._zod.check=o=>{o.value=n.tx(o.value)}});class K5{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 J5={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=J5;const l=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&l.unshift(e);for(const u of l)for(const d of u._zod.onattach)d(e);if(l.length===0)(o=e._zod).deferred??(o.deferred=[]),(c=e._zod.deferred)==null||c.push(()=>{e._zod.run=e._zod.parse});else{const u=(p,g,h)=>{let y=Ai(p),v;for(const j of g){if(j._zod.def.when){if(Xx(p)||!j._zod.def.when(p))continue}else if(y)continue;const k=p.issues.length,x=j._zod.check(p);if(x instanceof Promise&&(h==null?void 0:h.async)===!1)throw new Ui;if(v||x instanceof Promise)v=(v??Promise.resolve()).then(async()=>{await x,p.issues.length!==k&&(y||(y=Ai(p,k)))});else{if(p.issues.length===k)continue;y||(y=Ai(p,k))}}return v?v.then(()=>p):p},d=(p,g,h)=>{if(Ai(p))return p.aborted=!0,p;const y=u(g,l,h);if(y instanceof Promise){if(h.async===!1)throw new Ui;return y.then(v=>e._zod.parse(v,h))}return e._zod.parse(y,h)};e._zod.run=(p,g)=>{if(g.skipChecks)return e._zod.parse(p,g);if(g.direction==="backward"){const y=e._zod.parse({value:p.value,issues:[]},{...g,skipChecks:!0});return y instanceof Promise?y.then(v=>d(v,p,g)):d(y,p,g)}const h=e._zod.parse(p,g);if(h instanceof Promise){if(g.async===!1)throw new Ui;return h.then(y=>u(y,l,g))}return u(h,l,g)}}Fe(e,"~standard",()=>({validate:u=>{var d;try{const p=e5(e,u);return p.success?{value:p.data}:{issues:(d=p.error)==null?void 0:d.issues}}catch{return t5(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}))}),Wf=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()??T5(e._zod.bag),e._zod.parse=(l,c)=>{if(n.coerce)try{l.value=String(l.value)}catch{}return typeof l.value=="string"||l.issues.push({expected:"string",code:"invalid_type",input:l.value,inst:e}),l}}),ut=le("$ZodStringFormat",(e,n)=>{Tc.init(e,n),Wf.init(e,n)}),X5=le("$ZodGUID",(e,n)=>{n.pattern??(n.pattern=y5),ut.init(e,n)}),W5=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=zh(l))}else n.pattern??(n.pattern=zh());ut.init(e,n)}),Q5=le("$ZodEmail",(e,n)=>{n.pattern??(n.pattern=v5),ut.init(e,n)}),e4=le("$ZodURL",(e,n)=>{ut.init(e,n),e._zod.check=o=>{var l;try{const c=o.value.trim();if(!n.normalize&&((l=n.protocol)==null?void 0:l.source)===k5.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})}}}),t4=le("$ZodEmoji",(e,n)=>{n.pattern??(n.pattern=b5()),ut.init(e,n)}),a4=le("$ZodNanoID",(e,n)=>{n.pattern??(n.pattern=m5),ut.init(e,n)}),n4=le("$ZodCUID",(e,n)=>{n.pattern??(n.pattern=u5),ut.init(e,n)}),r4=le("$ZodCUID2",(e,n)=>{n.pattern??(n.pattern=d5),ut.init(e,n)}),i4=le("$ZodULID",(e,n)=>{n.pattern??(n.pattern=f5),ut.init(e,n)}),o4=le("$ZodXID",(e,n)=>{n.pattern??(n.pattern=p5),ut.init(e,n)}),l4=le("$ZodKSUID",(e,n)=>{n.pattern??(n.pattern=g5),ut.init(e,n)}),s4=le("$ZodISODateTime",(e,n)=>{n.pattern??(n.pattern=C5(n)),ut.init(e,n)}),c4=le("$ZodISODate",(e,n)=>{n.pattern??(n.pattern=E5),ut.init(e,n)}),u4=le("$ZodISOTime",(e,n)=>{n.pattern??(n.pattern=z5(n)),ut.init(e,n)}),d4=le("$ZodISODuration",(e,n)=>{n.pattern??(n.pattern=h5),ut.init(e,n)}),f4=le("$ZodIPv4",(e,n)=>{n.pattern??(n.pattern=x5),ut.init(e,n),e._zod.bag.format="ipv4"}),p4=le("$ZodIPv6",(e,n)=>{n.pattern??(n.pattern=_5),ut.init(e,n),e._zod.bag.format="ipv6",e._zod.check=o=>{try{new URL(`http://[${o.value}]`)}catch{o.issues.push({code:"invalid_format",format:"ipv6",input:o.value,inst:e,continue:!n.abort})}}}),g4=le("$ZodCIDRv4",(e,n)=>{n.pattern??(n.pattern=j5),ut.init(e,n)}),m4=le("$ZodCIDRv6",(e,n)=>{n.pattern??(n.pattern=S5),ut.init(e,n),e._zod.check=o=>{const l=o.value.split("/");try{if(l.length!==2)throw new Error;const[c,u]=l;if(!u)throw new Error;const d=Number(u);if(`${d}`!==u)throw new Error;if(d<0||d>128)throw new Error;new URL(`http://[${c}]`)}catch{o.issues.push({code:"invalid_format",format:"cidrv6",input:o.value,inst:e,continue:!n.abort})}}});function a$(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const h4=le("$ZodBase64",(e,n)=>{n.pattern??(n.pattern=w5),ut.init(e,n),e._zod.bag.contentEncoding="base64",e._zod.check=o=>{a$(o.value)||o.issues.push({code:"invalid_format",format:"base64",input:o.value,inst:e,continue:!n.abort})}});function y4(e){if(!Kv.test(e))return!1;const n=e.replace(/[-_]/g,l=>l==="-"?"+":"/"),o=n.padEnd(Math.ceil(n.length/4)*4,"=");return a$(o)}const v4=le("$ZodBase64URL",(e,n)=>{n.pattern??(n.pattern=Kv),ut.init(e,n),e._zod.bag.contentEncoding="base64url",e._zod.check=o=>{y4(o.value)||o.issues.push({code:"invalid_format",format:"base64url",input:o.value,inst:e,continue:!n.abort})}}),$4=le("$ZodE164",(e,n)=>{n.pattern??(n.pattern=N5),ut.init(e,n)});function b4(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 x4=le("$ZodJWT",(e,n)=>{ut.init(e,n),e._zod.check=o=>{b4(o.value,n.alg)||o.issues.push({code:"invalid_format",format:"jwt",input:o.value,inst:e,continue:!n.abort})}}),n$=le("$ZodNumber",(e,n)=>{lt.init(e,n),e._zod.pattern=e._zod.bag.pattern??Wv,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}}),_4=le("$ZodNumberFormat",(e,n)=>{I5.init(e,n),n$.init(e,n)}),j4=le("$ZodBoolean",(e,n)=>{lt.init(e,n),e._zod.pattern=O5,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}}),S4=le("$ZodNull",(e,n)=>{lt.init(e,n),e._zod.pattern=R5,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}}),w4=le("$ZodUnknown",(e,n)=>{lt.init(e,n),e._zod.parse=o=>o}),k4=le("$ZodNever",(e,n)=>{lt.init(e,n),e._zod.parse=(o,l)=>(o.issues.push({expected:"never",code:"invalid_type",input:o.value,inst:e}),o)});function Ch(e,n,o){e.issues.length&&n.issues.push(...Di(o,e.issues)),n.value[o]=e.value}const N4=le("$ZodArray",(e,n)=>{lt.init(e,n),e._zod.parse=(o,l)=>{const c=o.value;if(!Array.isArray(c))return o.issues.push({expected:"array",code:"invalid_type",input:c,inst:e}),o;o.value=Array(c.length);const u=[];for(let d=0;d<c.length;d++){const p=c[d],g=n.element._zod.run({value:p,issues:[]},l);g instanceof Promise?u.push(g.then(h=>Ch(h,o,d))):Ch(g,o,d)}return u.length?Promise.all(u).then(()=>o):o}});function _c(e,n,o,l,c,u){const d=o in l;if(e.issues.length){if(c&&u&&!d)return;n.issues.push(...Di(o,e.issues))}if(!d&&!c){e.issues.length||n.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[o]});return}e.value===void 0?d&&(n.value[o]=void 0):n.value[o]=e.value}function r$(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=Vx(e.shape);return{...e,keys:n,keySet:new Set(n),numKeys:n.length,optionalKeys:new Set(o)}}function i$(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 E4=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(()=>r$(n));Fe(e._zod,"propValues",()=>{const p=n.shape,g={};for(const h in p){const y=p[h]._zod;if(y.values){g[h]??(g[h]=new Set);for(const v of y.values)g[h].add(v)}}return g});const c=Xo,u=n.catchall;let d;e._zod.parse=(p,g)=>{d??(d=l.value);const h=p.value;if(!c(h))return p.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),p;p.value={};const y=[],v=d.shape;for(const j of d.keys){const k=v[j],x=k._zod.optin==="optional",z=k._zod.optout==="optional",E=k._zod.run({value:h[j],issues:[]},g);E instanceof Promise?y.push(E.then(w=>_c(w,p,j,h,x,z))):_c(E,p,j,h,x,z)}return u?i$(y,h,p,g,l.value,e):y.length?Promise.all(y).then(()=>p):p}}),z4=le("$ZodObjectJIT",(e,n)=>{E4.init(e,n);const o=e._zod.parse,l=Ec(()=>r$(n)),c=j=>{var N,R;const k=new K5(["shape","payload","ctx"]),x=l.value,z=_=>{const S=Eh(_);return`shape[${S}]._zod.run({ value: input[${S}], issues: [] }, ctx)`};k.write("const input = payload.value;");const E=Object.create(null);let w=0;for(const _ of x.keys)E[_]=`key_${w++}`;k.write("const newResult = {};");for(const _ of x.keys){const S=E[_],C=Eh(_),U=j[_],te=((N=U==null?void 0:U._zod)==null?void 0:N.optin)==="optional",Z=((R=U==null?void 0:U._zod)==null?void 0:R.optout)==="optional";k.write(`const ${S} = ${z(_)};`),te&&Z?k.write(`
|
|
52
|
-
if (${S}.issues.length) {
|
|
53
|
-
if (${C} in input) {
|
|
54
|
-
payload.issues = payload.issues.concat(${S}.issues.map(iss => ({
|
|
55
|
-
...iss,
|
|
56
|
-
path: iss.path ? [${C}, ...iss.path] : [${C}]
|
|
57
|
-
})));
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
if (${S}.value === undefined) {
|
|
62
|
-
if (${C} in input) {
|
|
63
|
-
newResult[${C}] = undefined;
|
|
64
|
-
}
|
|
65
|
-
} else {
|
|
66
|
-
newResult[${C}] = ${S}.value;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
`):te?k.write(`
|
|
70
|
-
if (${S}.issues.length) {
|
|
71
|
-
payload.issues = payload.issues.concat(${S}.issues.map(iss => ({
|
|
72
|
-
...iss,
|
|
73
|
-
path: iss.path ? [${C}, ...iss.path] : [${C}]
|
|
74
|
-
})));
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
if (${S}.value === undefined) {
|
|
78
|
-
if (${C} in input) {
|
|
79
|
-
newResult[${C}] = undefined;
|
|
80
|
-
}
|
|
81
|
-
} else {
|
|
82
|
-
newResult[${C}] = ${S}.value;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
`):k.write(`
|
|
86
|
-
const ${S}_present = ${C} in input;
|
|
87
|
-
if (${S}.issues.length) {
|
|
88
|
-
payload.issues = payload.issues.concat(${S}.issues.map(iss => ({
|
|
89
|
-
...iss,
|
|
90
|
-
path: iss.path ? [${C}, ...iss.path] : [${C}]
|
|
91
|
-
})));
|
|
92
|
-
}
|
|
93
|
-
if (!${S}_present && !${S}.issues.length) {
|
|
94
|
-
payload.issues.push({
|
|
95
|
-
code: "invalid_type",
|
|
96
|
-
expected: "nonoptional",
|
|
97
|
-
input: undefined,
|
|
98
|
-
path: [${C}]
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
if (${S}_present) {
|
|
103
|
-
if (${S}.value === undefined) {
|
|
104
|
-
newResult[${C}] = undefined;
|
|
105
|
-
} else {
|
|
106
|
-
newResult[${C}] = ${S}.value;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
`)}k.write("payload.value = newResult;"),k.write("return payload;");const $=k.compile();return(_,S)=>$(j,_,S)};let u;const d=Xo,p=!Zf.jitless,h=p&&Lx.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?i$([],x,j,k,v,e):j):o(j,k):(j.issues.push({expected:"object",code:"invalid_type",input:x,inst:e}),j)}});function Th(e,n,o,l){for(const u of e)if(u.issues.length===0)return n.value=u.value,n;const c=e.filter(u=>!Ai(u));return c.length===1?(n.value=c[0].value,c[0]):(n.issues.push({code:"invalid_union",input:n.value,inst:o,errors:e.map(u=>u.issues.map(d=>xn(d,l,bn())))}),n)}const o$=le("$ZodUnion",(e,n)=>{lt.init(e,n),Fe(e._zod,"optin",()=>n.options.some(l=>l._zod.optin==="optional")?"optional":void 0),Fe(e._zod,"optout",()=>n.options.some(l=>l._zod.optout==="optional")?"optional":void 0),Fe(e._zod,"values",()=>{if(n.options.every(l=>l._zod.values))return new Set(n.options.flatMap(l=>Array.from(l._zod.values)))}),Fe(e._zod,"pattern",()=>{if(n.options.every(l=>l._zod.pattern)){const l=n.options.map(c=>c._zod.pattern);return new RegExp(`^(${l.map(c=>Yf(c.source)).join("|")})$`)}});const o=n.options.length===1?n.options[0]._zod.run:null;e._zod.parse=(l,c)=>{if(o)return o(l,c);let u=!1;const d=[];for(const p of n.options){const g=p._zod.run({value:l.value,issues:[]},c);if(g instanceof Promise)d.push(g),u=!0;else{if(g.issues.length===0)return g;d.push(g)}}return u?Promise.all(d).then(p=>Th(p,l,e,c)):Th(d,l,e,c)}}),C4=le("$ZodDiscriminatedUnion",(e,n)=>{n.inclusive=!1,o$.init(e,n);const o=e._zod.parse;Fe(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(!Xo(d))return c.issues.push({code:"invalid_type",expected:"object",input:d,inst:e}),c;const p=l.value.get(d==null?void 0:d[n.discriminator]);return p?p._zod.run(c,u):n.unionFallback||u.direction==="backward"?o(c,u):(c.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:n.discriminator,options:Array.from(l.value.keys()),input:d,path:[n.discriminator],inst:e}),c)}}),T4=le("$ZodIntersection",(e,n)=>{lt.init(e,n),e._zod.parse=(o,l)=>{const c=o.value,u=n.left._zod.run({value:c,issues:[]},l),d=n.right._zod.run({value:c,issues:[]},l);return u instanceof Promise||d instanceof Promise?Promise.all([u,d]).then(([g,h])=>Mh(o,g,h)):Mh(o,u,d)}});function Of(e,n){if(e===n)return{valid:!0,data:e};if(e instanceof Date&&n instanceof Date&&+e==+n)return{valid:!0,data:e};if(Fi(e)&&Fi(n)){const o=Object.keys(n),l=Object.keys(e).filter(u=>o.indexOf(u)!==-1),c={...e,...n};for(const u of l){const d=Of(e[u],n[u]);if(!d.valid)return{valid:!1,mergeErrorPath:[u,...d.mergeErrorPath]};c[u]=d.data}return{valid:!0,data:c}}if(Array.isArray(e)&&Array.isArray(n)){if(e.length!==n.length)return{valid:!1,mergeErrorPath:[]};const o=[];for(let l=0;l<e.length;l++){const c=e[l],u=n[l],d=Of(c,u);if(!d.valid)return{valid:!1,mergeErrorPath:[l,...d.mergeErrorPath]};o.push(d.data)}return{valid:!0,data:o}}return{valid:!1,mergeErrorPath:[]}}function Mh(e,n,o){const l=new Map;let c;for(const p of n.issues)if(p.code==="unrecognized_keys"){c??(c=p);for(const g of p.keys)l.has(g)||l.set(g,{}),l.get(g).l=!0}else e.issues.push(p);for(const p of o.issues)if(p.code==="unrecognized_keys")for(const g of p.keys)l.has(g)||l.set(g,{}),l.get(g).r=!0;else e.issues.push(p);const u=[...l].filter(([,p])=>p.l&&p.r).map(([p])=>p);if(u.length&&c&&e.issues.push({...c,keys:u}),Ai(e))return e;const d=Of(n.value,o.value);if(!d.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(d.mergeErrorPath)}`);return e.value=d.data,e}const M4=le("$ZodRecord",(e,n)=>{lt.init(e,n),e._zod.parse=(o,l)=>{const c=o.value;if(!Fi(c))return o.issues.push({expected:"record",code:"invalid_type",input:c,inst:e}),o;const u=[],d=n.keyType._zod.values;if(d){o.value={};const p=new Set;for(const h of d)if(typeof h=="string"||typeof h=="number"||typeof h=="symbol"){p.add(typeof h=="number"?h.toString():h);const y=n.keyType._zod.run({value:h,issues:[]},l);if(y instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(y.issues.length){o.issues.push({code:"invalid_key",origin:"record",issues:y.issues.map(k=>xn(k,l,bn())),input:h,path:[h],inst:e});continue}const v=y.value,j=n.valueType._zod.run({value:c[h],issues:[]},l);j instanceof Promise?u.push(j.then(k=>{k.issues.length&&o.issues.push(...Di(h,k.issues)),o.value[v]=k.value})):(j.issues.length&&o.issues.push(...Di(h,j.issues)),o.value[v]=j.value)}let g;for(const h in c)p.has(h)||(g=g??[],g.push(h));g&&g.length>0&&o.issues.push({code:"unrecognized_keys",input:c,inst:e,keys:g})}else{o.value={};for(const p of Reflect.ownKeys(c)){if(p==="__proto__"||!Object.prototype.propertyIsEnumerable.call(c,p))continue;let g=n.keyType._zod.run({value:p,issues:[]},l);if(g instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof p=="string"&&Wv.test(p)&&g.issues.length){const v=n.keyType._zod.run({value:Number(p),issues:[]},l);if(v instanceof Promise)throw new Error("Async schemas not supported in object keys currently");v.issues.length===0&&(g=v)}if(g.issues.length){n.mode==="loose"?o.value[p]=c[p]:o.issues.push({code:"invalid_key",origin:"record",issues:g.issues.map(v=>xn(v,l,bn())),input:p,path:[p],inst:e});continue}const y=n.valueType._zod.run({value:c[p],issues:[]},l);y instanceof Promise?u.push(y.then(v=>{v.issues.length&&o.issues.push(...Di(p,v.issues)),o.value[g.value]=v.value})):(y.issues.length&&o.issues.push(...Di(p,y.issues)),o.value[g.value]=y.value)}}return u.length?Promise.all(u).then(()=>o):o}}),O4=le("$ZodEnum",(e,n)=>{lt.init(e,n);const o=Hv(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"?Vi(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}}),R4=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"?Vi(l):l?Vi(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}}),A4=le("$ZodTransform",(e,n)=>{lt.init(e,n),e._zod.optin="optional",e._zod.parse=(o,l)=>{if(l.direction==="backward")throw new Vv(e.constructor.name);const c=n.transform(o.value,o);if(l.async)return(c instanceof Promise?c:Promise.resolve(c)).then(d=>(o.value=d,o.fallback=!0,o));if(c instanceof Promise)throw new Ui;return o.value=c,o.fallback=!0,o}});function Oh(e,n){return n===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const l$=le("$ZodOptional",(e,n)=>{lt.init(e,n),e._zod.optin="optional",e._zod.optout="optional",Fe(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,void 0]):void 0),Fe(e._zod,"pattern",()=>{const o=n.innerType._zod.pattern;return o?new RegExp(`^(${Yf(o.source)})?$`):void 0}),e._zod.parse=(o,l)=>{if(n.innerType._zod.optin==="optional"){const c=o.value,u=n.innerType._zod.run(o,l);return u instanceof Promise?u.then(d=>Oh(d,c)):Oh(u,c)}return o.value===void 0?o:n.innerType._zod.run(o,l)}}),D4=le("$ZodExactOptional",(e,n)=>{l$.init(e,n),Fe(e._zod,"values",()=>n.innerType._zod.values),Fe(e._zod,"pattern",()=>n.innerType._zod.pattern),e._zod.parse=(o,l)=>n.innerType._zod.run(o,l)}),U4=le("$ZodNullable",(e,n)=>{lt.init(e,n),Fe(e._zod,"optin",()=>n.innerType._zod.optin),Fe(e._zod,"optout",()=>n.innerType._zod.optout),Fe(e._zod,"pattern",()=>{const o=n.innerType._zod.pattern;return o?new RegExp(`^(${Yf(o.source)}|null)$`):void 0}),Fe(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)}),I4=le("$ZodDefault",(e,n)=>{lt.init(e,n),e._zod.optin="optional",Fe(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(o,l)=>{if(l.direction==="backward")return n.innerType._zod.run(o,l);if(o.value===void 0)return o.value=n.defaultValue,o;const c=n.innerType._zod.run(o,l);return c instanceof Promise?c.then(u=>Rh(u,n)):Rh(c,n)}});function Rh(e,n){return e.value===void 0&&(e.value=n.defaultValue),e}const B4=le("$ZodPrefault",(e,n)=>{lt.init(e,n),e._zod.optin="optional",Fe(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))}),L4=le("$ZodNonOptional",(e,n)=>{lt.init(e,n),Fe(e._zod,"values",()=>{const o=n.innerType._zod.values;return o?new Set([...o].filter(l=>l!==void 0)):void 0}),e._zod.parse=(o,l)=>{const c=n.innerType._zod.run(o,l);return c instanceof Promise?c.then(u=>Ah(u,e)):Ah(c,e)}});function Ah(e,n){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:n}),e}const F4=le("$ZodCatch",(e,n)=>{lt.init(e,n),e._zod.optin="optional",Fe(e._zod,"optout",()=>n.innerType._zod.optout),Fe(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(o,l)=>{if(l.direction==="backward")return n.innerType._zod.run(o,l);const c=n.innerType._zod.run(o,l);return c instanceof Promise?c.then(u=>(o.value=u.value,u.issues.length&&(o.value=n.catchValue({...o,error:{issues:u.issues.map(d=>xn(d,l,bn()))},input:o.value}),o.issues=[],o.fallback=!0),o)):(o.value=c.value,c.issues.length&&(o.value=n.catchValue({...o,error:{issues:c.issues.map(u=>xn(u,l,bn()))},input:o.value}),o.issues=[],o.fallback=!0),o)}}),V4=le("$ZodPipe",(e,n)=>{lt.init(e,n),Fe(e._zod,"values",()=>n.in._zod.values),Fe(e._zod,"optin",()=>n.in._zod.optin),Fe(e._zod,"optout",()=>n.out._zod.optout),Fe(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=>Es(d,n.in,l)):Es(u,n.in,l)}const c=n.in._zod.run(o,l);return c instanceof Promise?c.then(u=>Es(u,n.out,l)):Es(c,n.out,l)}});function Es(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 H4=le("$ZodReadonly",(e,n)=>{lt.init(e,n),Fe(e._zod,"propValues",()=>n.innerType._zod.propValues),Fe(e._zod,"values",()=>n.innerType._zod.values),Fe(e._zod,"optin",()=>{var o,l;return(l=(o=n.innerType)==null?void 0:o._zod)==null?void 0:l.optin}),Fe(e._zod,"optout",()=>{var o,l;return(l=(o=n.innerType)==null?void 0:o._zod)==null?void 0:l.optout}),e._zod.parse=(o,l)=>{if(l.direction==="backward")return n.innerType._zod.run(o,l);const c=n.innerType._zod.run(o,l);return c instanceof Promise?c.then(Dh):Dh(c)}});function Dh(e){return e.value=Object.freeze(e.value),e}const q4=le("$ZodLazy",(e,n)=>{lt.init(e,n),Fe(e._zod,"innerType",()=>{const o=n;return o._cachedInner||(o._cachedInner=n.getter()),o._cachedInner}),Fe(e._zod,"pattern",()=>{var o,l;return(l=(o=e._zod.innerType)==null?void 0:o._zod)==null?void 0:l.pattern}),Fe(e._zod,"propValues",()=>{var o,l;return(l=(o=e._zod.innerType)==null?void 0:o._zod)==null?void 0:l.propValues}),Fe(e._zod,"optin",()=>{var o,l;return((l=(o=e._zod.innerType)==null?void 0:o._zod)==null?void 0:l.optin)??void 0}),Fe(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)}),P4=le("$ZodCustom",(e,n)=>{ua.init(e,n),lt.init(e,n),e._zod.parse=(o,l)=>o,e._zod.check=o=>{const l=o.value,c=n.fn(l);if(c instanceof Promise)return c.then(u=>Uh(u,o,l,e));Uh(c,o,l,e)}});function Uh(e,n,o,l){if(!e){const c={code:"custom",input:o,inst:l,path:[...l._zod.def.path??[]],continue:!l._zod.def.abort};l._zod.def.params&&(c.params=l._zod.def.params),n.issues.push(Wo(c))}}var Ih;class Z4{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 G4(){return new Z4}(Ih=globalThis).__zod_globalRegistry??(Ih.__zod_globalRegistry=G4());const Jo=globalThis.__zod_globalRegistry;function Y4(e,n){return new e({type:"string",...xe(n)})}function K4(e,n){return new e({type:"string",format:"email",check:"string_format",abort:!1,...xe(n)})}function Bh(e,n){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...xe(n)})}function J4(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...xe(n)})}function X4(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...xe(n)})}function W4(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...xe(n)})}function Q4(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...xe(n)})}function s$(e,n){return new e({type:"string",format:"url",check:"string_format",abort:!1,...xe(n)})}function e_(e,n){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...xe(n)})}function t_(e,n){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...xe(n)})}function a_(e,n){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...xe(n)})}function n_(e,n){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...xe(n)})}function r_(e,n){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...xe(n)})}function i_(e,n){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...xe(n)})}function o_(e,n){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...xe(n)})}function l_(e,n){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...xe(n)})}function s_(e,n){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...xe(n)})}function c_(e,n){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...xe(n)})}function u_(e,n){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...xe(n)})}function d_(e,n){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...xe(n)})}function f_(e,n){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...xe(n)})}function p_(e,n){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...xe(n)})}function g_(e,n){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...xe(n)})}function m_(e,n){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...xe(n)})}function h_(e,n){return new e({type:"string",format:"date",check:"string_format",...xe(n)})}function y_(e,n){return new e({type:"string",format:"time",check:"string_format",precision:null,...xe(n)})}function v_(e,n){return new e({type:"string",format:"duration",check:"string_format",...xe(n)})}function $_(e,n){return new e({type:"number",checks:[],...xe(n)})}function b_(e,n){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...xe(n)})}function x_(e,n){return new e({type:"boolean",...xe(n)})}function __(e,n){return new e({type:"null",...xe(n)})}function j_(e){return new e({type:"unknown"})}function S_(e,n){return new e({type:"never",...xe(n)})}function Lh(e,n){return new e$({check:"less_than",...xe(n),value:e,inclusive:!1})}function df(e,n){return new e$({check:"less_than",...xe(n),value:e,inclusive:!0})}function Fh(e,n){return new t$({check:"greater_than",...xe(n),value:e,inclusive:!1})}function ff(e,n){return new t$({check:"greater_than",...xe(n),value:e,inclusive:!0})}function Vh(e,n){return new U5({check:"multiple_of",...xe(n),value:e})}function c$(e,n){return new B5({check:"max_length",...xe(n),maximum:e})}function jc(e,n){return new L5({check:"min_length",...xe(n),minimum:e})}function u$(e,n){return new F5({check:"length_equals",...xe(n),length:e})}function w_(e,n){return new V5({check:"string_format",format:"regex",...xe(n),pattern:e})}function k_(e){return new H5({check:"string_format",format:"lowercase",...xe(e)})}function N_(e){return new q5({check:"string_format",format:"uppercase",...xe(e)})}function E_(e,n){return new P5({check:"string_format",format:"includes",...xe(n),includes:e})}function z_(e,n){return new Z5({check:"string_format",format:"starts_with",...xe(n),prefix:e})}function C_(e,n){return new G5({check:"string_format",format:"ends_with",...xe(n),suffix:e})}function Pi(e){return new Y5({check:"overwrite",tx:e})}function T_(e){return Pi(n=>n.normalize(e))}function M_(){return Pi(e=>e.trim())}function O_(){return Pi(e=>e.toLowerCase())}function R_(){return Pi(e=>e.toUpperCase())}function A_(){return Pi(e=>Bx(e))}function D_(e,n,o){return new e({type:"array",element:n,...xe(o)})}function U_(e,n,o){return new e({type:"custom",check:"custom",fn:n,...xe(o)})}function I_(e,n){const o=B_(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 B_(e,n){const o=new ua({check:"custom",...xe(n)});return o._zod.check=e,o}function d$(e){let n=(e==null?void 0:e.target)??"draft-2020-12";return n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),{processors:e.processors??{},metadataRegistry:(e==null?void 0:e.metadata)??Jo,target:n,unrepresentable:(e==null?void 0:e.unrepresentable)??"throw",override:(e==null?void 0:e.override)??(()=>{}),io:(e==null?void 0:e.io)??"output",counter:0,seen:new Map,cycles:(e==null?void 0:e.cycles)??"ref",reused:(e==null?void 0:e.reused)??"inline",external:(e==null?void 0:e.external)??void 0}}function $t(e,n,o={path:[],schemaPath:[]}){var y,v;var l;const c=e._zod.def,u=n.seen.get(e);if(u)return u.count++,o.schemaPath.includes(e)&&(u.cycle=o.path),u.schema;const d={schema:{},count:1,cycle:void 0,path:o.path};n.seen.set(e,d);const p=(v=(y=e._zod).toJSONSchema)==null?void 0:v.call(y);if(p)d.schema=p;else{const j={...o,schemaPath:[...o.schemaPath,e],path:o.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(n,d.schema,j);else{const x=d.schema,z=n.processors[c.type];if(!z)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${c.type}`);z(e,n,x,j)}const k=e._zod.parent;k&&(d.ref||(d.ref=k),$t(k,n,j),n.seen.get(k).isParent=!0)}const g=n.metadataRegistry.get(e);return g&&Object.assign(d.schema,g),n.io==="input"&&Jt(e)&&(delete d.schema.examples,delete d.schema.default),n.io==="input"&&"_prefault"in d.schema&&((l=d.schema).default??(l.default=d.schema._prefault)),delete d.schema._prefault,n.seen.get(e).schema}function f$(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 z;const v=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const E=(z=e.external.registry.get(y[0]))==null?void 0:z.id,w=e.external.uri??(N=>N);if(E)return{ref:w(E)};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 z in x)delete x[z];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 p$(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},z=j.ref;if(j.ref=null,z){l(z);const w=e.seen.get(z),$=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===z)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 E=v._zod.parent;if(E&&E!==z){l(E);const w=e.seen.get(E);if(w!=null&&w.schema.$ref&&(k.$ref=w.schema.$ref,w.def))for(const $ in k)$==="$ref"||$==="allOf"||$ in w.def&&JSON.stringify(k[$])===JSON.stringify(w.def[$])&&delete k[$]}e.override({zodSchema:v,jsonSchema:k,path:j.path??[]})};for(const v of[...e.seen.entries()].reverse())l(v[0]);const c={};if(e.target==="draft-2020-12"?c.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?c.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?c.$schema="http://json-schema.org/draft-04/schema#":e.target,(p=e.external)!=null&&p.uri){const v=(g=e.external.registry.get(n))==null?void 0:g.id;if(!v)throw new Error("Schema is missing an `id` property");c.$id=e.external.uri(v)}Object.assign(c,o.def??o.schema);const u=(h=e.metadataRegistry.get(n))==null?void 0:h.id;u!==void 0&&c.id===u&&delete c.id;const d=((y=e.external)==null?void 0:y.defs)??{};for(const v of e.seen.entries()){const j=v[1];j.def&&j.defId&&(j.def.id===j.defId&&delete j.def.id,d[j.defId]=j.def)}e.external||Object.keys(d).length>0&&(e.target==="draft-2020-12"?c.$defs=d:c.definitions=d);try{const v=JSON.parse(JSON.stringify(c));return Object.defineProperty(v,"~standard",{value:{...n["~standard"],jsonSchema:{input:Sc(n,"input",e.processors),output:Sc(n,"output",e.processors)}},enumerable:!1,writable:!1}),v}catch{throw new Error("Error converting schema to JSON.")}}function Jt(e,n){const o=n??{seen:new Set};if(o.seen.has(e))return!1;o.seen.add(e);const l=e._zod.def;if(l.type==="transform")return!0;if(l.type==="array")return Jt(l.element,o);if(l.type==="set")return Jt(l.valueType,o);if(l.type==="lazy")return Jt(l.getter(),o);if(l.type==="promise"||l.type==="optional"||l.type==="nonoptional"||l.type==="nullable"||l.type==="readonly"||l.type==="default"||l.type==="prefault")return Jt(l.innerType,o);if(l.type==="intersection")return Jt(l.left,o)||Jt(l.right,o);if(l.type==="record"||l.type==="map")return Jt(l.keyType,o)||Jt(l.valueType,o);if(l.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:Jt(l.in,o)||Jt(l.out,o);if(l.type==="object"){for(const c in l.shape)if(Jt(l.shape[c],o))return!0;return!1}if(l.type==="union"){for(const c of l.options)if(Jt(c,o))return!0;return!1}if(l.type==="tuple"){for(const c of l.items)if(Jt(c,o))return!0;return!!(l.rest&&Jt(l.rest,o))}return!1}const L_=(e,n={})=>o=>{const l=d$({...o,processors:n});return $t(e,l),f$(l,e),p$(l,e)},Sc=(e,n,o={})=>l=>{const{libraryOptions:c,target:u}=l??{},d=d$({...c??{},target:u,io:n,processors:o});return $t(e,d),f$(d,e),p$(d,e)},F_={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},V_=(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}))])}},H_=(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)},q_=(e,n,o,l)=>{o.type="boolean"},P_=(e,n,o,l)=>{n.target==="openapi-3.0"?(o.type="string",o.nullable=!0,o.enum=[null]):o.type="null"},Z_=(e,n,o,l)=>{o.not={}},G_=(e,n,o,l)=>{},Y_=(e,n,o,l)=>{const c=e._zod.def,u=Hv(c.entries);u.every(d=>typeof d=="number")&&(o.type="number"),u.every(d=>typeof d=="string")&&(o.type="string"),o.enum=u},K_=(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},J_=(e,n,o,l)=>{if(n.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},X_=(e,n,o,l)=>{if(n.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},W_=(e,n,o,l)=>{const c=o,u=e._zod.def,{minimum:d,maximum:p}=e._zod.bag;typeof d=="number"&&(c.minItems=d),typeof p=="number"&&(c.maxItems=p),c.type="array",c.items=$t(u.element,n,{...l,path:[...l.path,"items"]})},Q_=(e,n,o,l)=>{var h;const c=o,u=e._zod.def;c.type="object",c.properties={};const d=u.shape;for(const y in d)c.properties[y]=$t(d[y],n,{...l,path:[...l.path,"properties",y]});const p=new Set(Object.keys(d)),g=new Set([...p].filter(y=>{const v=u.shape[y]._zod;return n.io==="input"?v.optin===void 0:v.optout===void 0}));g.size>0&&(c.required=Array.from(g)),((h=u.catchall)==null?void 0:h._zod.def.type)==="never"?c.additionalProperties=!1:u.catchall?u.catchall&&(c.additionalProperties=$t(u.catchall,n,{...l,path:[...l.path,"additionalProperties"]})):n.io==="output"&&(c.additionalProperties=!1)},ej=(e,n,o,l)=>{const c=e._zod.def,u=c.inclusive===!1,d=c.options.map((p,g)=>$t(p,n,{...l,path:[...l.path,u?"oneOf":"anyOf",g]}));u?o.oneOf=d:o.anyOf=d},tj=(e,n,o,l)=>{const c=e._zod.def,u=$t(c.left,n,{...l,path:[...l.path,"allOf",0]}),d=$t(c.right,n,{...l,path:[...l.path,"allOf",1]}),p=h=>"allOf"in h&&Object.keys(h).length===1,g=[...p(u)?u.allOf:[u],...p(d)?d.allOf:[d]];o.allOf=g},aj=(e,n,o,l)=>{const c=o,u=e._zod.def;c.type="object";const d=u.keyType,p=d._zod.bag,g=p==null?void 0:p.patterns;if(u.mode==="loose"&&g&&g.size>0){const y=$t(u.valueType,n,{...l,path:[...l.path,"patternProperties","*"]});c.patternProperties={};for(const v of g)c.patternProperties[v.source]=y}else(n.target==="draft-07"||n.target==="draft-2020-12")&&(c.propertyNames=$t(u.keyType,n,{...l,path:[...l.path,"propertyNames"]})),c.additionalProperties=$t(u.valueType,n,{...l,path:[...l.path,"additionalProperties"]});const h=d._zod.values;if(h){const y=[...h].filter(v=>typeof v=="string"||typeof v=="number");y.length>0&&(c.required=y)}},nj=(e,n,o,l)=>{const c=e._zod.def,u=$t(c.innerType,n,l),d=n.seen.get(e);n.target==="openapi-3.0"?(d.ref=c.innerType,o.nullable=!0):o.anyOf=[u,{type:"null"}]},rj=(e,n,o,l)=>{const c=e._zod.def;$t(c.innerType,n,l);const u=n.seen.get(e);u.ref=c.innerType},ij=(e,n,o,l)=>{const c=e._zod.def;$t(c.innerType,n,l);const u=n.seen.get(e);u.ref=c.innerType,o.default=JSON.parse(JSON.stringify(c.defaultValue))},oj=(e,n,o,l)=>{const c=e._zod.def;$t(c.innerType,n,l);const u=n.seen.get(e);u.ref=c.innerType,n.io==="input"&&(o._prefault=JSON.parse(JSON.stringify(c.defaultValue)))},lj=(e,n,o,l)=>{const c=e._zod.def;$t(c.innerType,n,l);const u=n.seen.get(e);u.ref=c.innerType;let d;try{d=c.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}o.default=d},sj=(e,n,o,l)=>{const c=e._zod.def,u=c.in._zod.traits.has("$ZodTransform"),d=n.io==="input"?u?c.out:c.in:c.out;$t(d,n,l);const p=n.seen.get(e);p.ref=d},cj=(e,n,o,l)=>{const c=e._zod.def;$t(c.innerType,n,l);const u=n.seen.get(e);u.ref=c.innerType,o.readOnly=!0},g$=(e,n,o,l)=>{const c=e._zod.def;$t(c.innerType,n,l);const u=n.seen.get(e);u.ref=c.innerType},uj=(e,n,o,l)=>{const c=e._zod.innerType;$t(c,n,l);const u=n.seen.get(e);u.ref=c},dj=le("ZodISODateTime",(e,n)=>{s4.init(e,n),dt.init(e,n)});function fj(e){return m_(dj,e)}const pj=le("ZodISODate",(e,n)=>{c4.init(e,n),dt.init(e,n)});function gj(e){return h_(pj,e)}const mj=le("ZodISOTime",(e,n)=>{u4.init(e,n),dt.init(e,n)});function hj(e){return y_(mj,e)}const yj=le("ZodISODuration",(e,n)=>{d4.init(e,n),dt.init(e,n)});function vj(e){return v_(yj,e)}const $j=(e,n)=>{Gv.init(e,n),e.name="ZodError",Object.defineProperties(e,{format:{value:o=>Qx(e,o)},flatten:{value:o=>Wx(e,o)},addIssue:{value:o=>{e.issues.push(o),e.message=JSON.stringify(e.issues,Mf,2)}},addIssues:{value:o=>{e.issues.push(...o),e.message=JSON.stringify(e.issues,Mf,2)}},isEmpty:{get(){return e.issues.length===0}}})},Oa=le("ZodError",$j,{Parent:Error}),bj=Jf(Oa),xj=Xf(Oa),_j=zc(Oa),jj=Cc(Oa),Sj=a5(Oa),wj=n5(Oa),kj=r5(Oa),Nj=i5(Oa),Ej=o5(Oa),zj=l5(Oa),Cj=s5(Oa),Tj=c5(Oa),Hh=new WeakMap;function nl(e,n,o){const l=Object.getPrototypeOf(e);let c=Hh.get(l);if(c||(c=new Set,Hh.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=L_(e,{}),e.def=n,e.type=n.type,Object.defineProperty(e,"_def",{value:n}),e.parse=(o,l)=>bj(e,o,l,{callee:e.parse}),e.safeParse=(o,l)=>_j(e,o,l),e.parseAsync=async(o,l)=>xj(e,o,l,{callee:e.parseAsync}),e.safeParseAsync=async(o,l)=>jj(e,o,l),e.spa=e.safeParseAsync,e.encode=(o,l)=>Sj(e,o,l),e.decode=(o,l)=>wj(e,o,l),e.encodeAsync=async(o,l)=>kj(e,o,l),e.decodeAsync=async(o,l)=>Nj(e,o,l),e.safeEncode=(o,l)=>Ej(e,o,l),e.safeDecode=(o,l)=>zj(e,o,l),e.safeEncodeAsync=async(o,l)=>Cj(e,o,l),e.safeDecodeAsync=async(o,l)=>Tj(e,o,l),nl(e,"ZodType",{check(...o){const l=this.def;return this.clone(vr(l,{checks:[...l.checks??[],...o.map(c=>typeof c=="function"?{_zod:{check:c,def:{check:"custom"},onattach:[]}}:c)]}),{parent:!0})},with(...o){return this.check(...o)},clone(o,l){return $r(this,o,l)},brand(){return this},register(o,l){return o.add(this,l),this},refine(o,l){return this.check(wS(o,l))},superRefine(o,l){return this.check(kS(o,l))},overwrite(o){return this.check(Pi(o))},optional(){return Gh(this)},exactOptional(){return dS(this)},nullable(){return Yh(this)},nullish(){return Gh(Yh(this))},nonoptional(o){return yS(this,o)},array(){return At(this)},or(o){return Za([this,o])},and(o){return oS(this,o)},transform(o){return Kh(this,cS(o))},default(o){return gS(this,o)},prefault(o){return hS(this,o)},catch(o){return $S(this,o)},pipe(o){return Kh(this,o)},readonly(){return _S(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)),m$=le("_ZodString",(e,n)=>{Wf.init(e,n),st.init(e,n),e._zod.processJSONSchema=(l,c,u)=>V_(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(w_(...l))},includes(...l){return this.check(E_(...l))},startsWith(...l){return this.check(z_(...l))},endsWith(...l){return this.check(C_(...l))},min(...l){return this.check(jc(...l))},max(...l){return this.check(c$(...l))},length(...l){return this.check(u$(...l))},nonempty(...l){return this.check(jc(1,...l))},lowercase(l){return this.check(k_(l))},uppercase(l){return this.check(N_(l))},trim(){return this.check(M_())},normalize(...l){return this.check(T_(...l))},toLowerCase(){return this.check(O_())},toUpperCase(){return this.check(R_())},slugify(){return this.check(A_())}})}),Mj=le("ZodString",(e,n)=>{Wf.init(e,n),m$.init(e,n),e.email=o=>e.check(K4(Oj,o)),e.url=o=>e.check(s$(h$,o)),e.jwt=o=>e.check(g_(Yj,o)),e.emoji=o=>e.check(e_(Rj,o)),e.guid=o=>e.check(Bh(qh,o)),e.uuid=o=>e.check(J4(zs,o)),e.uuidv4=o=>e.check(X4(zs,o)),e.uuidv6=o=>e.check(W4(zs,o)),e.uuidv7=o=>e.check(Q4(zs,o)),e.nanoid=o=>e.check(t_(Aj,o)),e.guid=o=>e.check(Bh(qh,o)),e.cuid=o=>e.check(a_(Dj,o)),e.cuid2=o=>e.check(n_(Uj,o)),e.ulid=o=>e.check(r_(Ij,o)),e.base64=o=>e.check(d_(Pj,o)),e.base64url=o=>e.check(f_(Zj,o)),e.xid=o=>e.check(i_(Bj,o)),e.ksuid=o=>e.check(o_(Lj,o)),e.ipv4=o=>e.check(l_(Fj,o)),e.ipv6=o=>e.check(s_(Vj,o)),e.cidrv4=o=>e.check(c_(Hj,o)),e.cidrv6=o=>e.check(u_(qj,o)),e.e164=o=>e.check(p_(Gj,o)),e.datetime=o=>e.check(fj(o)),e.date=o=>e.check(gj(o)),e.time=o=>e.check(hj(o)),e.duration=o=>e.check(vj(o))});function P(e){return Y4(Mj,e)}const dt=le("ZodStringFormat",(e,n)=>{ut.init(e,n),m$.init(e,n)}),Oj=le("ZodEmail",(e,n)=>{Q5.init(e,n),dt.init(e,n)}),qh=le("ZodGUID",(e,n)=>{X5.init(e,n),dt.init(e,n)}),zs=le("ZodUUID",(e,n)=>{W5.init(e,n),dt.init(e,n)}),h$=le("ZodURL",(e,n)=>{e4.init(e,n),dt.init(e,n)});function Cs(e){return s$(h$,e)}const Rj=le("ZodEmoji",(e,n)=>{t4.init(e,n),dt.init(e,n)}),Aj=le("ZodNanoID",(e,n)=>{a4.init(e,n),dt.init(e,n)}),Dj=le("ZodCUID",(e,n)=>{n4.init(e,n),dt.init(e,n)}),Uj=le("ZodCUID2",(e,n)=>{r4.init(e,n),dt.init(e,n)}),Ij=le("ZodULID",(e,n)=>{i4.init(e,n),dt.init(e,n)}),Bj=le("ZodXID",(e,n)=>{o4.init(e,n),dt.init(e,n)}),Lj=le("ZodKSUID",(e,n)=>{l4.init(e,n),dt.init(e,n)}),Fj=le("ZodIPv4",(e,n)=>{f4.init(e,n),dt.init(e,n)}),Vj=le("ZodIPv6",(e,n)=>{p4.init(e,n),dt.init(e,n)}),Hj=le("ZodCIDRv4",(e,n)=>{g4.init(e,n),dt.init(e,n)}),qj=le("ZodCIDRv6",(e,n)=>{m4.init(e,n),dt.init(e,n)}),Pj=le("ZodBase64",(e,n)=>{h4.init(e,n),dt.init(e,n)}),Zj=le("ZodBase64URL",(e,n)=>{v4.init(e,n),dt.init(e,n)}),Gj=le("ZodE164",(e,n)=>{$4.init(e,n),dt.init(e,n)}),Yj=le("ZodJWT",(e,n)=>{x4.init(e,n),dt.init(e,n)}),y$=le("ZodNumber",(e,n)=>{n$.init(e,n),st.init(e,n),e._zod.processJSONSchema=(l,c,u)=>H_(e,l,c),nl(e,"ZodNumber",{gt(l,c){return this.check(Fh(l,c))},gte(l,c){return this.check(ff(l,c))},min(l,c){return this.check(ff(l,c))},lt(l,c){return this.check(Lh(l,c))},lte(l,c){return this.check(df(l,c))},max(l,c){return this.check(df(l,c))},int(l){return this.check(Ph(l))},safe(l){return this.check(Ph(l))},positive(l){return this.check(Fh(0,l))},nonnegative(l){return this.check(ff(0,l))},negative(l){return this.check(Lh(0,l))},nonpositive(l){return this.check(df(0,l))},multipleOf(l,c){return this.check(Vh(l,c))},step(l,c){return this.check(Vh(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 Ve(e){return $_(y$,e)}const Kj=le("ZodNumberFormat",(e,n)=>{_4.init(e,n),y$.init(e,n)});function Ph(e){return b_(Kj,e)}const Jj=le("ZodBoolean",(e,n)=>{j4.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>q_(e,o,l)});function qt(e){return x_(Jj,e)}const Xj=le("ZodNull",(e,n)=>{S4.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>P_(e,o,l)});function Wj(e){return __(Xj,e)}const Qj=le("ZodUnknown",(e,n)=>{w4.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>G_()});function Ia(){return j_(Qj)}const eS=le("ZodNever",(e,n)=>{k4.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>Z_(e,o,l)});function tS(e){return S_(eS,e)}const aS=le("ZodArray",(e,n)=>{N4.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>W_(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(c$(o,l))},length(o,l){return this.check(u$(o,l))},unwrap(){return this.element}})});function At(e,n){return D_(aS,e,n)}const nS=le("ZodObject",(e,n)=>{z4.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>Q_(e,o,l,c),Fe(e,"shape",()=>n.shape),nl(e,"ZodObject",{keyof(){return gt(Object.keys(this._zod.def.shape))},catchall(o){return this.clone({...this._zod.def,catchall:o})},passthrough(){return this.clone({...this._zod.def,catchall:Ia()})},loose(){return this.clone({...this._zod.def,catchall:Ia()})},strict(){return this.clone({...this._zod.def,catchall:tS()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(o){return Zx(this,o)},safeExtend(o){return Gx(this,o)},merge(o){return Yx(this,o)},pick(o){return qx(this,o)},omit(o){return Px(this,o)},partial(...o){return Kx($$,this,o[0])},required(...o){return Jx(b$,this,o[0])}})});function de(e,n){const o={type:"object",shape:e??{},...xe(n)};return new nS(o)}const v$=le("ZodUnion",(e,n)=>{o$.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>ej(e,o,l,c),e.options=n.options});function Za(e,n){return new v$({type:"union",options:e,...xe(n)})}const rS=le("ZodDiscriminatedUnion",(e,n)=>{v$.init(e,n),C4.init(e,n)});function rl(e,n,o){return new rS({type:"union",options:n,discriminator:e,...xe(o)})}const iS=le("ZodIntersection",(e,n)=>{T4.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>tj(e,o,l,c)});function oS(e,n){return new iS({type:"intersection",left:e,right:n})}const Zh=le("ZodRecord",(e,n)=>{M4.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>aj(e,o,l,c),e.keyType=n.keyType,e.valueType=n.valueType});function mt(e,n,o){return!n||!n._zod?new Zh({type:"record",keyType:P(),valueType:e,...xe(n)}):new Zh({type:"record",keyType:e,valueType:n,...xe(o)})}const Rf=le("ZodEnum",(e,n)=>{O4.init(e,n),st.init(e,n),e._zod.processJSONSchema=(l,c,u)=>Y_(e,l,c),e.enum=n.entries,e.options=Object.values(n.entries);const o=new Set(Object.keys(n.entries));e.extract=(l,c)=>{const u={};for(const d of l)if(o.has(d))u[d]=n.entries[d];else throw new Error(`Key ${d} not found in enum`);return new Rf({...n,checks:[],...xe(c),entries:u})},e.exclude=(l,c)=>{const u={...n.entries};for(const d of l)if(o.has(d))delete u[d];else throw new Error(`Key ${d} not found in enum`);return new Rf({...n,checks:[],...xe(c),entries:u})}});function gt(e,n){const o=Array.isArray(e)?Object.fromEntries(e.map(l=>[l,l])):e;return new Rf({type:"enum",entries:o,...xe(n)})}const lS=le("ZodLiteral",(e,n)=>{R4.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>K_(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 Ge(e,n){return new lS({type:"literal",values:Array.isArray(e)?e:[e],...xe(n)})}const sS=le("ZodTransform",(e,n)=>{A4.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>X_(e,o),e._zod.parse=(o,l)=>{if(l.direction==="backward")throw new Vv(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 cS(e){return new sS({type:"transform",transform:e})}const $$=le("ZodOptional",(e,n)=>{l$.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>g$(e,o,l,c),e.unwrap=()=>e._zod.def.innerType});function Gh(e){return new $$({type:"optional",innerType:e})}const uS=le("ZodExactOptional",(e,n)=>{D4.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>g$(e,o,l,c),e.unwrap=()=>e._zod.def.innerType});function dS(e){return new uS({type:"optional",innerType:e})}const fS=le("ZodNullable",(e,n)=>{U4.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>nj(e,o,l,c),e.unwrap=()=>e._zod.def.innerType});function Yh(e){return new fS({type:"nullable",innerType:e})}const pS=le("ZodDefault",(e,n)=>{I4.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>ij(e,o,l,c),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function gS(e,n){return new pS({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():Pv(n)}})}const mS=le("ZodPrefault",(e,n)=>{B4.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>oj(e,o,l,c),e.unwrap=()=>e._zod.def.innerType});function hS(e,n){return new mS({type:"prefault",innerType:e,get defaultValue(){return typeof n=="function"?n():Pv(n)}})}const b$=le("ZodNonOptional",(e,n)=>{L4.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>rj(e,o,l,c),e.unwrap=()=>e._zod.def.innerType});function yS(e,n){return new b$({type:"nonoptional",innerType:e,...xe(n)})}const vS=le("ZodCatch",(e,n)=>{F4.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>lj(e,o,l,c),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function $S(e,n){return new vS({type:"catch",innerType:e,catchValue:typeof n=="function"?n:()=>n})}const bS=le("ZodPipe",(e,n)=>{V4.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>sj(e,o,l,c),e.in=n.in,e.out=n.out});function Kh(e,n){return new bS({type:"pipe",in:e,out:n})}const xS=le("ZodReadonly",(e,n)=>{H4.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 _S(e){return new xS({type:"readonly",innerType:e})}const jS=le("ZodLazy",(e,n)=>{q4.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>uj(e,o,l,c),e.unwrap=()=>e._zod.def.getter()});function x$(e){return new jS({type:"lazy",getter:e})}const SS=le("ZodCustom",(e,n)=>{P4.init(e,n),st.init(e,n),e._zod.processJSONSchema=(o,l,c)=>J_(e,o)});function wS(e,n={}){return U_(SS,e,n)}function kS(e,n){return I_(e,n)}const _$="@ggui-ai/gadgets",NS="0.11.0",ES=[{package:_$,version:NS,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(ES.flatMap(e=>e.exports).map(e=>e.hook).filter(e=>e!==void 0)));const Qf=/^use[A-Z][A-Za-z0-9]*$/,ep=/^[A-Z][A-Za-z0-9]*$/,tp=["geolocation","notifications","microphone","camera","persistent-storage","midi","clipboard-read","clipboard-write","speaker-selection","storage-access","background-sync","accelerometer","gyroscope","magnetometer","ambient-light-sensor","screen-wake-lock"];new Set(tp);const bt=x$(()=>Za([P(),Ve(),qt(),Wj(),At(bt),mt(P(),bt)])),Jh=gt(["string","number","integer","boolean","array","object","null"]),$n=x$(()=>de({type:Za([Jh,At(Jh)]).optional(),description:P().optional(),enum:At(bt).optional(),default:bt.optional(),example:bt.optional(),items:$n.optional(),properties:mt(P(),$n).optional(),required:At(P()).optional(),additionalProperties:Za([$n,qt()]).optional(),format:P().optional()}).passthrough()),zS=de({description:P().optional(),schema:$n,required:qt().optional(),default:bt.optional(),example:bt.optional(),sourceTool:P().optional()}).strict(),CS=de({description:P().optional(),properties:mt(P(),zS)}).strict(),TS=de({description:P().optional(),label:P(),schema:$n.optional(),example:bt.optional(),icon:P().optional(),confirm:qt().optional(),nextStep:P().min(1).optional()}).strict(),MS=mt(P(),TS),OS=de({description:P().optional(),schema:$n,example:bt.optional(),mode:gt(["append","replace"]).optional(),replay:gt(["latest","all","none"]).optional(),complete:qt().optional(),source:de({tool:P(),args:mt(P(),bt).optional()}).strict().optional()}).strict(),RS=mt(P(),OS),AS=de({description:P().optional(),schema:$n,default:bt.optional(),debounceMs:Ve().int().nonnegative().optional(),example:bt.optional()}).strict(),DS=mt(P(),AS),US=de({serverInfo:de({name:P(),version:P().optional()}).strict().optional(),toolInfo:de({inputSchema:$n,description:P().optional(),outputSchema:$n.optional()}).strict(),usage:P().optional(),example:de({input:bt,output:bt}).strict().optional()}).strict(),IS=de({tools:mt(P(),US)}).passthrough(),j$=/^GGUI_PUBLIC_APP_[A-Z0-9_]+$/,BS=At(P().regex(j$)).readonly(),Xh=/^sha384-[A-Za-z0-9+/]+=*$/,S$=/^(?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*$/,LS=/^\d+\.\d+\.\d+(-[\w.]+)?(\+[\w.]+)?$/,FS=/^[a-z0-9.-]+(:\d+)?$/,w$={gotchas:P().optional()},Wh={...w$,description:P().optional(),usage:P().optional(),example:bt.optional(),permission:P().optional()},Qh={...w$,description:P().min(1),usage:P().min(1),example:bt,permission:gt(tp).optional()},k$={version:P().regex(LS),package:P().regex(S$),bundleUrl:Cs().optional(),bundleHost:P().regex(FS).optional(),bundleSri:P().regex(Xh).optional(),styleUrl:Cs().optional(),connect:At(Cs()).readonly().optional(),requires:BS.optional(),typesUrl:Cs().optional(),typesSri:P().regex(Xh).optional()},VS=Za([de({hook:P().regex(Qf),...Wh}).strict(),de({component:P().regex(ep),...Wh}).strict()]),HS=Za([de({hook:P().regex(Qf),...Qh}).strict(),de({component:P().regex(ep),...Qh}).strict()]);de({...k$,exports:At(VS).min(1)}).strict();const qS=de({...k$,exports:At(HS).min(1)}).strict();qS.refine(e=>e.package===_$||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 PS=de({description:P().optional(),usage:P().optional()}).strict(),ZS=mt(P().refine(e=>Qf.test(e)||ep.test(e),{message:"gadget export name must be a `use`-prefixed hook or a PascalCase component identifier"}),PS).refine(e=>Object.keys(e).length>0,{message:"a `clientCapabilities.gadgets` package entry must declare at least one export"}),GS=de({gadgets:mt(P().regex(S$),ZS)}).strict();mt(P().regex(j$),P()).readonly();const il=de({propsSpec:CS.optional().describe("Initial render data: {description?, properties: {<name>: {schema: <JSON Schema>, required?: boolean, description?, default?, example?}}}. A prop is required at the wire gate ONLY when `required: true`; omitted ⇒ optional (declare `required: true` for props the render must always pass)."),actionSpec:MS.optional().describe("User gestures the agent reacts to on its next turn: {<action>: {label: string (REQUIRED — button copy / accessible name), schema?: <payload JSON Schema>, description?, example?, icon?, confirm?, nextStep?: '<agentCapabilities.tools key>'}}. Every action is agent-routed; `nextStep` is a hint, not a dispatch."),streamSpec:RS.optional().describe("Live update channels the agent emits into: {<channel>: {schema: <JSON Schema>, description?, example?, mode?: append|replace, replay?: latest|all|none, complete?, source?: {tool, args?}}}. `source.tool` must be declared in agentCapabilities.tools."),contextSpec:DS.optional().describe("Observable client state the agent reads alongside each action: {<slot>: {schema: <JSON Schema>, description?, default?, debounceMs?, example?}}. State that needs no next-turn reasoning belongs here, not in actionSpec."),agentCapabilities:IS.optional().describe("MCP tools the AGENT may call: {tools: {<bareToolName>: {toolInfo: {inputSchema (REQUIRED), description?, outputSchema?}, serverInfo?: {name, version?}, usage?, example?: {input, output}}}}. Key by the BARE tool name (after any `mcp__<server>__` prefix); the component never calls these."),clientCapabilities:GS.optional().describe("Browser-capability gadgets the COMPONENT imports: {gadgets: {<npm package>: {<exportName>: {description?, usage?}}}} — `use`-prefixed export keys are hooks, PascalCase keys are components; version and transport resolve from the app's registered catalog, never on the wire.")}).passthrough(),N$=de({kind:Ge("llm"),generator:P().min(1),model:P().min(1)}).strict(),E$=de({kind:Ge("user")}).strict(),YS=de({kind:Ge("curated")}).strict(),z$=Za([N$,E$,YS]),KS=["persona","aesthetic","context","seedPrompt"],ol=de({persona:P().optional().describe('Design persona, e.g. "minimalist" / "data-dense". Part of cache identity.'),aesthetic:P().optional().describe('Visual aesthetic, e.g. "calm" / "ornate". Part of cache identity.'),context:mt(P(),bt).optional().describe('Deliberate design-shaping signals (e.g. {situation:"sad"}) — part of cache identity. NOT for per-user runtime data; put that in propsSpec/contextSpec.'),seedPrompt:P().optional().describe("Generation seed directive. Part of cache identity.")},{error:e=>e.code==="unrecognized_keys"?`variance: unknown key(s) ${e.keys.map(n=>JSON.stringify(n)).join(", ")} — variance is EXACTLY {${KS.join(", ")}}; put tonal intent in \`aesthetic\`, and per-user runtime data in props / contextSpec, never in variance`:void 0}).strict(),JS=de({blueprintId:P().min(1),contractHash:P().min(1),appId:P().min(1),codeS3Url:P().optional(),codeHash:P().optional(),source:z$,validatorScore:Ve().min(0).max(1).optional(),variance:ol,isOperatorDefault:Ge(!0).optional(),createdAt:P().min(1),createdBy:gt(["agent","operator"]),contract:il,contractEmbedding:At(Ve()).optional()}).strict(),XS=de({hash:Ve().min(0).optional(),embed:Ve().min(0).optional(),struct:Ve().min(0).optional(),variance:Ve().min(0).optional(),intent:Ve().min(0).optional()}).strict();de({weights:XS.optional(),threshold:Ve().min(0).max(1).optional(),topK:Ve().int().min(1).optional()}).strict();const WS=gt(["cache","agent","synth"]),QS=Za([de({op:Ge("add"),path:P(),value:bt}).strict(),de({op:Ge("remove"),path:P()}).strict(),de({op:Ge("replace"),path:P(),value:bt}).strict()]),e3=At(QS),t3=["contract","variance","generator"],a3=de({contract:il,variance:ol.optional(),generator:P().optional()},{error:e=>e.code==="unrecognized_keys"?`blueprintDraft: unknown key(s) ${e.keys.map(n=>JSON.stringify(n)).join(", ")} — a draft is EXACTLY {${t3.join(", ")}}; \`intent\` is a top-level ggui_handshake field, not a draft field, and the four specs live INSIDE \`contract\``:void 0}).strict(),n3=a3,r3=de({blueprintId:P().min(1).optional(),contractHash:P().min(1),codeHash:P().optional(),source:z$.optional(),variance:ol,selectedReason:P().optional()}).strict(),i3=de({code:P().min(1),severity:gt(["error","warn"]),path:P(),message:P()}).strict(),o3=de({contractDiff:e3,reasoning:P()}).strict(),l3=de({origin:WS,rationale:P(),blueprintMeta:r3,proposedContractSummary:P().optional(),amendments:o3.optional(),validationFindings:At(i3).optional()}).strict(),s3=de({width:Ve(),height:Ve()}),c3=de({viewport:s3,platform:gt(["web","mobile","desktop"]),deviceType:gt(["phone","tablet","desktop"]),orientation:gt(["portrait","landscape"]),devicePixelRatio:Ve().optional(),touchPrimary:qt().optional(),shellType:gt(["chat","fullscreen","spatial"]).optional(),colorScheme:gt(["light","dark"]).optional(),reducedMotion:qt().optional()}).passthrough(),u3={sessionId:P().min(1).describe("Globally-unique sessionId to consume events from. Cross-tenant access surfaces uniformly as session_not_found."),timeout:Ve().int().min(0).max(25).optional().describe("Inline long-poll seconds, integer in [0, 25]. 0 = immediate. Values outside the bound reject INVALID_PARAMS. Returns on first event OR timeout; re-call on empty to keep waiting — longer waits are your loop, not a bigger timeout.")};de(u3);const d3={sessionId:P().min(1),channel:P().min(1),payload:Ia(),complete:qt().optional()};de(d3);const f3={sessionId:P().min(1).describe("GguiSession opaque id (UUID) — returned by ggui_render.")};de(f3);const p3={sessionId:P().min(1).describe("GguiSession opaque id (UUID) — returned by ggui_render.")};de(p3);const g3={};de(g3);const m3={query:P().min(1).describe("Natural-language description of the UI you're looking for"),limit:Ve().int().min(1).max(100).optional(),tool:P().regex(/^[A-Za-z0-9_.-]{1,128}$/).optional().describe("Filter registry-sourced candidates to artifacts declaring a binding for this exact MCP tool name (case-sensitive). Local results are unaffected."),server:P().regex(/^[A-Za-z0-9_.-]{1,128}$/).optional().describe("Filter registry-sourced candidates to artifacts declaring a binding for this exact MCP server name (case-sensitive). Combine with `tool` to require the exact (server, tool) pair.")};de(m3);const h3={blueprintId:P().min(1).describe("The stable blueprint id declared via ggui.ui.json#id. Must match an entry in this server's UI registry.")};de(h3);const y3={};de(y3);de({intent:P().min(1).describe('Concise purpose — same intent = same component reused. e.g. "Gmail inbox for email triage"'),blueprintDraft:n3.describe(`Agent's draft — a JSON OBJECT, never a JSON-encoded string (pass {contract: {...}}, not "{\\"contract\\":...}"; a string fails input validation with -32602). Fields: contract (required) + optional variance + optional generator slug hint. The server combines this with cached blueprints + validator outcomes to produce a three-mode suggestion (cache / agent / synth).`),forceCreate:qt().optional()}).strict();de({handshakeId:P().describe("Stable id — pass to ggui_render / ggui_update"),action:gt(["create","reuse","update","replace","declined"]),suggestion:l3.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:P().max(280).optional().describe("Short rationale (≤280 chars) for the `action` value. Surfaced for agent + operator visibility; truncated to keep the structuredContent payload predictable."),nextStep:de({tool:Ge("ggui_render"),description:P(),example:P()}).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 v3={handshakeId:P({message:"ggui_render: handshakeId is REQUIRED. Call ggui_handshake({intent, blueprintDraft}) first to negotiate — handshake returns a handshakeId + suggestion. Then render with {handshakeId, props} (accept the suggestion as-is) or {handshakeId, props, override: {contract?, variance?}} (re-aim the contract and/or variance). Direct-render without a handshakeId is not supported."}).min(1,"ggui_render: handshakeId must be a non-empty string from a prior ggui_handshake call."),props:mt(P(),Ia()),themeId:P().min(1).optional().describe("Per-render theme override. Wins over App.defaultThemeId for THIS render. Omit to inherit the app theme."),infra:de({model:P().min(1).optional().describe("Provider-prefixed model id (e.g., `anthropic/claude-haiku-4-5`, `openai/gpt-5`). Generator-specific prefixes (e.g., `bedrock/...` for AWS Bedrock routing) supported when the bound generator handles them.")}).strict().optional(),override:de({contract:il.optional().describe("STRICT full re-draft of the contract — must already conform; the server will not repair it."),variance:ol.optional().describe("Re-aim the variant (persona/aesthetic/context/seedPrompt); keeps the agreed contract.")}).strict().refine(e=>e.contract!==void 0||e.variance!==void 0,{message:"override must set contract and/or variance — omit override entirely to ACCEPT the handshake proposal as-is."}).optional().describe("Omit to ACCEPT the proposal as-is. Provide to re-aim contract and/or variance (PATCH semantics).")};de(v3);const $3=de({hit:qt().describe("True when a stored component was served without generating new code."),similarity:Ve().optional().describe("Cosine similarity of the matched component to the request (semantic match only)."),cachedBlueprintId:P().optional().describe("The stored component id that was matched. Equals top-level blueprintId on a hit."),llmCallsAvoided:Ve().describe("Generation calls skipped by serving the stored component (0 on a fresh generation)."),kind:gt(["full-template","cold"]).optional().describe("full-template = a whole stored component was served; cold = freshly generated."),reason:P().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.")}),b3=gt(["PRODUCTION_FAILED","VALIDATION_ERROR","NO_PLATFORM_KEY","NO_CREDENTIALS","GENERATION_QUEUE_OVERLOADED"]),x3=de({code:b3.describe("Canonical failure class. PRODUCTION_FAILED: generation did not produce a component. VALIDATION_ERROR: a server-side precondition rejected the render before generation. NO_PLATFORM_KEY: the server's managed provider-key configuration has no key for the resolved route. NO_CREDENTIALS: no generation credentials are configured on the server. GENERATION_QUEUE_OVERLOADED: the deployment's admission gate rejected the request before generation started (queue full or wait timed out) — not a failed attempt; safe to retry immediately."),message:P().describe("Human-readable failure detail — fold into the next attempt or surface to the operator.")}),_3=gt(["NOT_FOUND","BLUEPRINT_UNRESOLVABLE","NOT_SUPPORTED","NOT_MOUNTABLE"]);de({code:_3.describe("Canonical failure class. NOT_FOUND: no live render and no restorable record (also the response when the caller may not read this locator). BLUEPRINT_UNRESOLVABLE: a record exists but the component behind it is gone. NOT_SUPPORTED: this server keeps no durable record, so an evicted locator can never be restored. NOT_MOUNTABLE: the render resolved but no delivery channel is available."),message:P().describe("Human-readable failure detail. Replaced by a constant on NOT_FOUND."),detail:P().optional().describe("Extra diagnostic context for operators. Dropped on NOT_FOUND so a denied read cannot be told apart from a miss.")});de({sessionId:P(),resourceUri:P().optional().describe("MCP-Apps mount URI (ui://ggui/render/{id}). Present iff the render is mountable; absent on a failed render."),action:gt(["create","reuse","update","replace","declined"]),contractHash:P().describe("Canonical hash of the rendered data contract (shape only — fields, types, specs). Same hash ⟺ same data flow."),blueprintId:P().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:P().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:$3.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:x3.optional().describe("Present iff the tool result is isError — canonical {code, message} for a failed/rejected generation. Absent on success."),nextStep:de({tool:Ge("ggui_consume"),description:P(),example:P(),args:de({sessionId:P(),timeout:Ve()})}).optional().describe("Required-next-call hint — when the rendered contract has actions, points the agent at ggui_consume({sessionId, timeout}) for the inbound action loop. Absent for pure-display renders.")});rl("kind",[de({sessionId:P().describe("GguiSession opaque id (UUID) — returned by ggui_render."),kind:Ge("replace"),props:mt(P(),Ia()).describe("Full replacement props map. New map IS the new state, rendered as a NEW card (a new history entry). For an in-place repaint of the mounted card use ggui_amend.")}).strict(),de({sessionId:P().describe("GguiSession opaque id (UUID) — returned by ggui_render."),kind:Ge("merge"),patch:mt(P(),Ia()).describe("RFC 7396 JSON Merge Patch — null deletes a key; arrays fully replace. The merged state renders as a NEW card (a new history entry). For an in-place repaint of the mounted card use ggui_amend.")}).strict()]);rl("kind",[de({sessionId:P().describe("GguiSession opaque id (UUID) — returned by ggui_render."),kind:Ge("replace"),props:mt(P(),Ia()).describe("Full replacement props map, applied to the currently mounted card in place.")}).strict(),de({sessionId:P().describe("GguiSession opaque id (UUID) — returned by ggui_render."),kind:Ge("merge"),patch:mt(P(),Ia()).describe("RFC 7396 JSON Merge Patch — null deletes a key; arrays fully replace. Applied to the currently mounted card in place.")}).strict()]);de({sessionId:P(),updated:qt(),resourceUri:P(),epoch:Ve().int().min(0),warning:P().optional()});de({sessionId:P(),updated:qt(),resourceUri:P(),warning:P().optional()});de({toolCatalog:mt(P(),de({name:P(),version:P().optional()}).strict()).describe("Per-app canonical tool identities: bare tool name -> its server's initialize-declared serverInfo. Host/library-supplied; not an agent action.")}).strict();de({saved:qt(),appId:P()}).strict();const pf=100,ey=20,j3=de({seq:Ve().int().min(1).describe('Monotonic, gap-free per render; starts at 1 (0 is the "no events yet" cursor sentinel, never an event).'),type:P().min(1).describe("Wire-frame type — see the canonical GguiSessionEventType taxonomy; plain string so servers can mint new types without a protocol bump."),timestamp:P().describe("ISO 8601 UTC timestamp the server stamped on emission."),data:Ia().describe("Type-specific payload — structurally identical to the matching live-channel frame payload.")}),S3={sessionId:P().min(1).describe('Active render id — sourced from `_meta["ai.ggui/render"].sessionId` on the iframe boot envelope. Unknown and cross-tenant ids surface uniformly as session_not_found.'),sinceSequence:Ve().int().min(0).optional().describe("Replay cursor — only events with seq > sinceSequence return. Omit (= 0) on first pull; advance to the last event's seq (or lastSequence on an empty page) on every subsequent pull."),limit:Ve().int().min(1).optional().describe(`Max events per page. Values above ${pf} are clamped to ${pf}; omit for the default ${pf}. When hasMore is true, immediately re-pull with the advanced cursor.`),wait:Ve().min(0).optional().describe(`Subscription-mode hold, in seconds. When set and the cursor page is empty, the server holds this call until an event lands or the hold elapses (values above ${ey} are clamped to ${ey}). An empty page after a full hold is a NORMAL result — immediately re-pull to stay subscribed, or back off to sparse un-held pulls after a few consecutive empties. Omit (= 0) for an immediate return.`)};de(S3);const w3=de({events:At(j3),lastSequence:Ve().int().min(0),hasMore:qt()}),k3=de({reason:Ge("REPLAY_HORIZON_PASSED"),currentSequence:Ve().int().min(0)});Za([w3,k3]);const N3=40,E3={sessionId:P().min(1).describe("Render id the report concerns — sourced from the boot envelope. Client-claimed: used as a log tag only."),events:At(de({at:Ve().min(0).describe("Milliseconds since iframe boot (monotonic, client clock)."),kind:P().min(1).max(64).describe("Event name — e.g. 'boot.path', 'status.connected', 'channel_failover_swap', 'doorbell.ring'."),detail:P().max(512).optional().describe("Optional compact context (JSON fragment or message).")})).min(1).max(N3).describe("Batched ladder/doorbell events, oldest first.")};de(E3);de({ok:Ge(!0)});const z3=de({type:Ge("text"),text:P()}),C3=de({type:Ge("tool_use"),id:P(),name:P(),input:mt(P(),Ia())}),T3=de({type:Ge("tool_result"),tool_use_id:P(),content:Ia(),is_error:qt().optional()}),C$=rl("type",[z3,C3,T3]),M3=de({type:Ge("text_delta"),text:P()}),O3=de({type:Ge("input_json_delta"),partial_json:P()}),R3=rl("type",[M3,O3]),A3=de({type:Ge("message_start"),message:de({id:P(),role:Ge("assistant"),model:P().optional()})}),D3=de({type:Ge("content_block_start"),index:Ve().int().nonnegative(),content_block:C$}),U3=de({type:Ge("content_block_delta"),index:Ve().int().nonnegative(),delta:R3}),I3=de({type:Ge("content_block_stop"),index:Ve().int().nonnegative()}),B3=de({type:Ge("message_delta"),delta:de({stop_reason:gt(["end_turn","max_tokens","tool_use","error"]),stop_sequence:P().nullable().optional()}),usage:de({input_tokens:Ve().int().nonnegative(),output_tokens:Ve().int().nonnegative()})}),L3=de({type:Ge("message_stop")}),F3=de({type:Ge("ping")}),V3=gt(["invalid_request","unauthorized","rate_limited","invoke_in_progress","upstream_error","tool_error","internal"]),H3=de({type:Ge("error"),error:de({code:V3,message:P(),retryAfterMs:Ve().int().nonnegative().optional()})});rl("type",[A3,D3,U3,I3,B3,L3,F3,H3]);const q3=de({role:gt(["user","assistant"]),content:Za([P(),At(C$)])});de({message:P(),history:At(q3).optional(),interfaceContext:c3.optional(),requestId:P().optional()});const P3=/^--ggui-[a-zA-Z0-9-]+$/,Z3=/^[^;{}<>@]*$/,G3=P().min(1).max(256).regex(Z3,"css value contains a disallowed character").refine(e=>!e.includes("/*"),"css value may not contain a comment");de({mode:gt(["light","dark"]),cssVariables:mt(P().regex(P3,"css var key must be --ggui-*"),G3).refine(e=>Object.keys(e).length<=200,"too many css variables (max 200)"),name:P().min(1).max(64).optional()}).strict();var Ts={exports:{}},gf={},mn={},Lr={},mf={},hf={},yf={},ty;function wc(){return ty||(ty=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class n{}e._CodeOrName=n,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class o extends n{constructor($){if(super(),!e.IDENTIFIER.test($))throw new Error("CodeGen: name must be a valid identifier");this.str=$}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=o;class l extends n{constructor($){super(),this._items=typeof $=="string"?[$]:$}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const $=this._items[0];return $===""||$==='""'}get str(){var $;return($=this._str)!==null&&$!==void 0?$:this._str=this._items.reduce((N,R)=>`${N}${R}`,"")}get names(){var $;return($=this._names)!==null&&$!==void 0?$:this._names=this._items.reduce((N,R)=>(R instanceof o&&(N[R.str]=(N[R.str]||0)+1),N),{})}}e._Code=l,e.nil=new l("");function c(w,...$){const N=[w[0]];let R=0;for(;R<$.length;)p(N,$[R]),N.push(w[++R]);return new l(N)}e._=c;const u=new l("+");function d(w,...$){const N=[k(w[0])];let R=0;for(;R<$.length;)N.push(u),p(N,$[R]),N.push(u,k(w[++R]));return g(N),new l(N)}e.str=d;function p(w,$){$ instanceof l?w.push(...$._items):$ instanceof o?w.push($):w.push(v($))}e.addCodeArg=p;function g(w){let $=1;for(;$<w.length-1;){if(w[$]===u){const N=h(w[$-1],w[$+1]);if(N!==void 0){w.splice($-1,3,N);continue}w[$++]="+"}$++}}function h(w,$){if($==='""')return w;if(w==='""')return $;if(typeof w=="string")return $ instanceof o||w[w.length-1]!=='"'?void 0:typeof $!="string"?`${w.slice(0,-1)}${$}"`:$[0]==='"'?w.slice(0,-1)+$.slice(1):void 0;if(typeof $=="string"&&$[0]==='"'&&!(w instanceof o))return`"${w}${$.slice(1)}`}function y(w,$){return $.emptyStr()?w:w.emptyStr()?$:d`${w}${$}`}e.strConcat=y;function v(w){return typeof w=="number"||typeof w=="boolean"||w===null?w:k(Array.isArray(w)?w.join(","):w)}function j(w){return new l(k(w))}e.stringify=j;function k(w){return JSON.stringify(w).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=k;function x(w){return typeof w=="string"&&e.IDENTIFIER.test(w)?new l(`.${w}`):c`[${w}]`}e.getProperty=x;function z(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=z;function E(w){return new l(w.toString())}e.regexpCode=E})(yf)),yf}var vf={},ay;function ny(){return ay||(ay=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const n=wc();class o extends Error{constructor(h){super(`CodeGen: "code" for ${h} not defined`),this.value=h.value}}var l;(function(g){g[g.Started=0]="Started",g[g.Completed=1]="Completed"})(l||(e.UsedValueState=l={})),e.varKinds={const:new n.Name("const"),let:new n.Name("let"),var:new n.Name("var")};class c{constructor({prefixes:h,parent:y}={}){this._names={},this._prefixes=h,this._parent=y}toName(h){return h instanceof n.Name?h:this.name(h)}name(h){return new n.Name(this._newName(h))}_newName(h){const y=this._names[h]||this._nameGroup(h);return`${h}${y.index++}`}_nameGroup(h){var y,v;if(!((v=(y=this._parent)===null||y===void 0?void 0:y._prefixes)===null||v===void 0)&&v.has(h)||this._prefixes&&!this._prefixes.has(h))throw new Error(`CodeGen: prefix "${h}" is not allowed in this scope`);return this._names[h]={prefix:h,index:0}}}e.Scope=c;class u extends n.Name{constructor(h,y){super(y),this.prefix=h}setValue(h,{property:y,itemIndex:v}){this.value=h,this.scopePath=(0,n._)`.${new n.Name(y)}[${v}]`}}e.ValueScopeName=u;const d=(0,n._)`\n`;class p extends c{constructor(h){super(h),this._values={},this._scope=h.scope,this.opts={...h,_n:h.lines?d:n.nil}}get(){return this._scope}name(h){return new u(h,this._newName(h))}value(h,y){var v;if(y.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const j=this.toName(h),{prefix:k}=j,x=(v=y.key)!==null&&v!==void 0?v:y.ref;let z=this._values[k];if(z){const $=z.get(x);if($)return $}else z=this._values[k]=new Map;z.set(x,j);const E=this._scope[k]||(this._scope[k]=[]),w=E.length;return E[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 z=h[x];if(!z)continue;const E=v[x]=v[x]||new Map;z.forEach(w=>{if(E.has(w))return;E.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);E.set(w,l.Completed)})}return k}}e.ValueScope=p})(vf)),vf}var ry;function Re(){return ry||(ry=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const n=wc(),o=ny();var l=wc();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return l.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return l.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return l.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return l.Name}});var c=ny();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return c.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return c.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return c.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return c.varKinds}}),e.operators={GT:new n._Code(">"),GTE:new n._Code(">="),LT:new n._Code("<"),LTE:new n._Code("<="),EQ:new n._Code("==="),NEQ:new n._Code("!=="),NOT:new n._Code("!"),OR:new n._Code("||"),AND:new n._Code("&&"),ADD:new n._Code("+")};class u{optimizeNodes(){return this}optimizeNames(O,A){return this}}class d extends u{constructor(O,A,J){super(),this.varKind=O,this.name=A,this.rhs=J}render({es5:O,_n:A}){const J=O?o.varKinds.var:this.varKind,pe=this.rhs===void 0?"":` = ${this.rhs}`;return`${J} ${this.name}${pe};`+A}optimizeNames(O,A){if(O[this.name.str])return this.rhs&&(this.rhs=ie(this.rhs,O,A)),this}get names(){return this.rhs instanceof n._CodeOrName?this.rhs.names:{}}}class p extends u{constructor(O,A,J){super(),this.lhs=O,this.rhs=A,this.sideEffects=J}render({_n:O}){return`${this.lhs} = ${this.rhs};`+O}optimizeNames(O,A){if(!(this.lhs instanceof n.Name&&!O[this.lhs.str]&&!this.sideEffects))return this.rhs=ie(this.rhs,O,A),this}get names(){const O=this.lhs instanceof n.Name?{}:{...this.lhs.names};return G(O,this.rhs)}}class g extends p{constructor(O,A,J,pe){super(O,J,pe),this.op=A}render({_n:O}){return`${this.lhs} ${this.op}= ${this.rhs};`+O}}class h extends u{constructor(O){super(),this.label=O,this.names={}}render({_n:O}){return`${this.label}:`+O}}class y extends u{constructor(O){super(),this.label=O,this.names={}}render({_n:O}){return`break${this.label?` ${this.label}`:""};`+O}}class v extends u{constructor(O){super(),this.error=O}render({_n:O}){return`throw ${this.error};`+O}get names(){return this.error.names}}class j extends u{constructor(O){super(),this.code=O}render({_n:O}){return`${this.code};`+O}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(O,A){return this.code=ie(this.code,O,A),this}get names(){return this.code instanceof n._CodeOrName?this.code.names:{}}}class k extends u{constructor(O=[]){super(),this.nodes=O}render(O){return this.nodes.reduce((A,J)=>A+J.render(O),"")}optimizeNodes(){const{nodes:O}=this;let A=O.length;for(;A--;){const J=O[A].optimizeNodes();Array.isArray(J)?O.splice(A,1,...J):J?O[A]=J:O.splice(A,1)}return O.length>0?this:void 0}optimizeNames(O,A){const{nodes:J}=this;let pe=J.length;for(;pe--;){const he=J[pe];he.optimizeNames(O,A)||(_e(O,he.names),J.splice(pe,1))}return J.length>0?this:void 0}get names(){return this.nodes.reduce((O,A)=>Y(O,A.names),{})}}class x extends k{render(O){return"{"+O._n+super.render(O)+"}"+O._n}}class z extends k{}class E extends x{}E.kind="else";class w extends x{constructor(O,A){super(A),this.condition=O}render(O){let A=`if(${this.condition})`+super.render(O);return this.else&&(A+="else "+this.else.render(O)),A}optimizeNodes(){super.optimizeNodes();const O=this.condition;if(O===!0)return this.nodes;let A=this.else;if(A){const J=A.optimizeNodes();A=this.else=Array.isArray(J)?new E(J):J}if(A)return O===!1?A instanceof w?A:A.nodes:this.nodes.length?this:new w(ae(O),A instanceof w?[A]:A.nodes);if(!(O===!1||!this.nodes.length))return this}optimizeNames(O,A){var J;if(this.else=(J=this.else)===null||J===void 0?void 0:J.optimizeNames(O,A),!!(super.optimizeNames(O,A)||this.else))return this.condition=ie(this.condition,O,A),this}get names(){const O=super.names;return G(O,this.condition),this.else&&Y(O,this.else.names),O}}w.kind="if";class $ extends x{}$.kind="for";class N extends ${constructor(O){super(),this.iteration=O}render(O){return`for(${this.iteration})`+super.render(O)}optimizeNames(O,A){if(super.optimizeNames(O,A))return this.iteration=ie(this.iteration,O,A),this}get names(){return Y(super.names,this.iteration.names)}}class R extends ${constructor(O,A,J,pe){super(),this.varKind=O,this.name=A,this.from=J,this.to=pe}render(O){const A=O.es5?o.varKinds.var:this.varKind,{name:J,from:pe,to:he}=this;return`for(${A} ${J}=${pe}; ${J}<${he}; ${J}++)`+super.render(O)}get names(){const O=G(super.names,this.from);return G(O,this.to)}}class _ extends ${constructor(O,A,J,pe){super(),this.loop=O,this.varKind=A,this.name=J,this.iterable=pe}render(O){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(O)}optimizeNames(O,A){if(super.optimizeNames(O,A))return this.iterable=ie(this.iterable,O,A),this}get names(){return Y(super.names,this.iterable.names)}}class S extends x{constructor(O,A,J){super(),this.name=O,this.args=A,this.async=J}render(O){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(O)}}S.kind="func";class C extends k{render(O){return"return "+super.render(O)}}C.kind="return";class U extends x{render(O){let A="try"+super.render(O);return this.catch&&(A+=this.catch.render(O)),this.finally&&(A+=this.finally.render(O)),A}optimizeNodes(){var O,A;return super.optimizeNodes(),(O=this.catch)===null||O===void 0||O.optimizeNodes(),(A=this.finally)===null||A===void 0||A.optimizeNodes(),this}optimizeNames(O,A){var J,pe;return super.optimizeNames(O,A),(J=this.catch)===null||J===void 0||J.optimizeNames(O,A),(pe=this.finally)===null||pe===void 0||pe.optimizeNames(O,A),this}get names(){const O=super.names;return this.catch&&Y(O,this.catch.names),this.finally&&Y(O,this.finally.names),O}}class te extends x{constructor(O){super(),this.error=O}render(O){return`catch(${this.error})`+super.render(O)}}te.kind="catch";class Z extends x{render(O){return"finally"+super.render(O)}}Z.kind="finally";class V{constructor(O,A={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...A,_n:A.lines?`
|
|
113
|
-
`:""},this._extScope=O,this._scope=new o.Scope({parent:O}),this._nodes=[new z]}toString(){return this._root.render(this.opts)}name(O){return this._scope.name(O)}scopeName(O){return this._extScope.name(O)}scopeValue(O,A){const J=this._extScope.value(O,A);return(this._values[J.prefix]||(this._values[J.prefix]=new Set)).add(J),J}getScopeValue(O,A){return this._extScope.getValue(O,A)}scopeRefs(O){return this._extScope.scopeRefs(O,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(O,A,J,pe){const he=this._scope.toName(A);return J!==void 0&&pe&&(this._constants[he.str]=J),this._leafNode(new d(O,he,J)),he}const(O,A,J){return this._def(o.varKinds.const,O,A,J)}let(O,A,J){return this._def(o.varKinds.let,O,A,J)}var(O,A,J){return this._def(o.varKinds.var,O,A,J)}assign(O,A,J){return this._leafNode(new p(O,A,J))}add(O,A){return this._leafNode(new g(O,e.operators.ADD,A))}code(O){return typeof O=="function"?O():O!==n.nil&&this._leafNode(new j(O)),this}object(...O){const A=["{"];for(const[J,pe]of O)A.length>1&&A.push(","),A.push(J),(J!==pe||this.opts.es5)&&(A.push(":"),(0,n.addCodeArg)(A,pe));return A.push("}"),new n._Code(A)}if(O,A,J){if(this._blockNode(new w(O)),A&&J)this.code(A).else().code(J).endIf();else if(A)this.code(A).endIf();else if(J)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(O){return this._elseNode(new w(O))}else(){return this._elseNode(new E)}endIf(){return this._endBlockNode(w,E)}_for(O,A){return this._blockNode(O),A&&this.code(A).endFor(),this}for(O,A){return this._for(new N(O),A)}forRange(O,A,J,pe,he=this.opts.es5?o.varKinds.var:o.varKinds.let){const Se=this._scope.toName(O);return this._for(new R(he,Se,A,J),()=>pe(Se))}forOf(O,A,J,pe=o.varKinds.const){const he=this._scope.toName(O);if(this.opts.es5){const Se=A instanceof n.Name?A:this.var("_arr",A);return this.forRange("_i",0,(0,n._)`${Se}.length`,Te=>{this.var(he,(0,n._)`${Se}[${Te}]`),J(he)})}return this._for(new _("of",pe,he,A),()=>J(he))}forIn(O,A,J,pe=this.opts.es5?o.varKinds.var:o.varKinds.const){if(this.opts.ownProperties)return this.forOf(O,(0,n._)`Object.keys(${A})`,J);const he=this._scope.toName(O);return this._for(new _("in",pe,he,A),()=>J(he))}endFor(){return this._endBlockNode($)}label(O){return this._leafNode(new h(O))}break(O){return this._leafNode(new y(O))}return(O){const A=new C;if(this._blockNode(A),this.code(O),A.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(C)}try(O,A,J){if(!A&&!J)throw new Error('CodeGen: "try" without "catch" and "finally"');const pe=new U;if(this._blockNode(pe),this.code(O),A){const he=this.name("e");this._currNode=pe.catch=new te(he),A(he)}return J&&(this._currNode=pe.finally=new Z,this.code(J)),this._endBlockNode(te,Z)}throw(O){return this._leafNode(new v(O))}block(O,A){return this._blockStarts.push(this._nodes.length),O&&this.code(O).endBlock(A),this}endBlock(O){const A=this._blockStarts.pop();if(A===void 0)throw new Error("CodeGen: not in self-balancing block");const J=this._nodes.length-A;if(J<0||O!==void 0&&J!==O)throw new Error(`CodeGen: wrong number of nodes: ${J} vs ${O} expected`);return this._nodes.length=A,this}func(O,A=n.nil,J,pe){return this._blockNode(new S(O,A,J)),pe&&this.code(pe).endFunc(),this}endFunc(){return this._endBlockNode(S)}optimize(O=1){for(;O-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(O){return this._currNode.nodes.push(O),this}_blockNode(O){this._currNode.nodes.push(O),this._nodes.push(O)}_endBlockNode(O,A){const J=this._currNode;if(J instanceof O||A&&J instanceof A)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${A?`${O.kind}/${A.kind}`:O.kind}"`)}_elseNode(O){const A=this._currNode;if(!(A instanceof w))throw new Error('CodeGen: "else" without "if"');return this._currNode=A.else=O,this}get _root(){return this._nodes[0]}get _currNode(){const O=this._nodes;return O[O.length-1]}set _currNode(O){const A=this._nodes;A[A.length-1]=O}}e.CodeGen=V;function Y(B,O){for(const A in O)B[A]=(B[A]||0)+(O[A]||0);return B}function G(B,O){return O instanceof n._CodeOrName?Y(B,O.names):B}function ie(B,O,A){if(B instanceof n.Name)return J(B);if(!pe(B))return B;return new n._Code(B._items.reduce((he,Se)=>(Se instanceof n.Name&&(Se=J(Se)),Se instanceof n._Code?he.push(...Se._items):he.push(Se),he),[]));function J(he){const Se=A[he.str];return Se===void 0||O[he.str]!==1?he:(delete O[he.str],Se)}function pe(he){return he instanceof n._Code&&he._items.some(Se=>Se instanceof n.Name&&O[Se.str]===1&&A[Se.str]!==void 0)}}function _e(B,O){for(const A in O)B[A]=(B[A]||0)-(O[A]||0)}function ae(B){return typeof B=="boolean"||typeof B=="number"||B===null?!B:(0,n._)`!${L(B)}`}e.not=ae;const fe=T(e.operators.AND);function ge(...B){return B.reduce(fe)}e.and=ge;const ke=T(e.operators.OR);function re(...B){return B.reduce(ke)}e.or=re;function T(B){return(O,A)=>O===n.nil?A:A===n.nil?O:(0,n._)`${L(O)} ${B} ${L(A)}`}function L(B){return B instanceof n.Name?B:(0,n._)`(${B})`}})(hf)),hf}var Oe={},iy;function He(){if(iy)return Oe;iy=1,Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.checkStrictMode=Oe.getErrorPath=Oe.Type=Oe.useFunc=Oe.setEvaluated=Oe.evaluatedPropsToName=Oe.mergeEvaluated=Oe.eachItem=Oe.unescapeJsonPointer=Oe.escapeJsonPointer=Oe.escapeFragment=Oe.unescapeFragment=Oe.schemaRefOrVal=Oe.schemaHasRulesButRef=Oe.schemaHasRules=Oe.checkUnknownRules=Oe.alwaysValidSchema=Oe.toHash=void 0;const e=Re(),n=wc();function o(_){const S={};for(const C of _)S[C]=!0;return S}Oe.toHash=o;function l(_,S){return typeof S=="boolean"?S:Object.keys(S).length===0?!0:(c(_,S),!u(S,_.self.RULES.all))}Oe.alwaysValidSchema=l;function c(_,S=_.schema){const{opts:C,self:U}=_;if(!C.strictSchema||typeof S=="boolean")return;const te=U.RULES.keywords;for(const Z in S)te[Z]||R(_,`unknown keyword: "${Z}"`)}Oe.checkUnknownRules=c;function u(_,S){if(typeof _=="boolean")return!_;for(const C in _)if(S[C])return!0;return!1}Oe.schemaHasRules=u;function d(_,S){if(typeof _=="boolean")return!_;for(const C in _)if(C!=="$ref"&&S.all[C])return!0;return!1}Oe.schemaHasRulesButRef=d;function p({topSchemaRef:_,schemaPath:S},C,U,te){if(!te){if(typeof C=="number"||typeof C=="boolean")return C;if(typeof C=="string")return(0,e._)`${C}`}return(0,e._)`${_}${S}${(0,e.getProperty)(U)}`}Oe.schemaRefOrVal=p;function g(_){return v(decodeURIComponent(_))}Oe.unescapeFragment=g;function h(_){return encodeURIComponent(y(_))}Oe.escapeFragment=h;function y(_){return typeof _=="number"?`${_}`:_.replace(/~/g,"~0").replace(/\//g,"~1")}Oe.escapeJsonPointer=y;function v(_){return _.replace(/~1/g,"/").replace(/~0/g,"~")}Oe.unescapeJsonPointer=v;function j(_,S){if(Array.isArray(_))for(const C of _)S(C);else S(_)}Oe.eachItem=j;function k({mergeNames:_,mergeToName:S,mergeValues:C,resultToName:U}){return(te,Z,V,Y)=>{const G=V===void 0?Z:V instanceof e.Name?(Z instanceof e.Name?_(te,Z,V):S(te,Z,V),V):Z instanceof e.Name?(S(te,V,Z),Z):C(Z,V);return Y===e.Name&&!(G instanceof e.Name)?U(te,G):G}}Oe.mergeEvaluated={props:k({mergeNames:(_,S,C)=>_.if((0,e._)`${C} !== true && ${S} !== undefined`,()=>{_.if((0,e._)`${S} === true`,()=>_.assign(C,!0),()=>_.assign(C,(0,e._)`${C} || {}`).code((0,e._)`Object.assign(${C}, ${S})`))}),mergeToName:(_,S,C)=>_.if((0,e._)`${C} !== true`,()=>{S===!0?_.assign(C,!0):(_.assign(C,(0,e._)`${C} || {}`),z(_,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&&z(_,C,S),C}Oe.evaluatedPropsToName=x;function z(_,S,C){Object.keys(C).forEach(U=>_.assign((0,e._)`${S}${(0,e.getProperty)(U)}`,!0))}Oe.setEvaluated=z;const E={};function w(_,S){return _.scopeValue("func",{ref:S,code:E[S.code]||(E[S.code]=new n._Code(S.code))})}Oe.useFunc=w;var $;(function(_){_[_.Num=0]="Num",_[_.Str=1]="Str"})($||(Oe.Type=$={}));function N(_,S,C){if(_ instanceof e.Name){const U=S===$.Num;return C?U?(0,e._)`"[" + ${_} + "]"`:(0,e._)`"['" + ${_} + "']"`:U?(0,e._)`"/" + ${_}`:(0,e._)`"/" + ${_}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return C?(0,e.getProperty)(_).toString():"/"+y(_)}Oe.getErrorPath=N;function R(_,S,C=_.opts.strictSchema){if(C){if(S=`strict mode: ${S}`,C===!0)throw new Error(S);_.self.logger.warn(S)}}return Oe.checkStrictMode=R,Oe}var Ms={},oy;function br(){if(oy)return Ms;oy=1,Object.defineProperty(Ms,"__esModule",{value:!0});const e=Re(),n={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return Ms.default=n,Ms}var ly;function Mc(){return ly||(ly=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const n=Re(),o=He(),l=br();e.keywordError={message:({keyword:E})=>(0,n.str)`must pass "${E}" keyword validation`},e.keyword$DataError={message:({keyword:E,schemaType:w})=>w?(0,n.str)`"${E}" keyword must be ${w} ($data)`:(0,n.str)`"${E}" keyword is invalid ($data)`};function c(E,w=e.keywordError,$,N){const{it:R}=E,{gen:_,compositeRule:S,allErrors:C}=R,U=v(E,w,$);N??(S||C)?g(_,U):h(R,(0,n._)`[${U}]`)}e.reportError=c;function u(E,w=e.keywordError,$){const{it:N}=E,{gen:R,compositeRule:_,allErrors:S}=N,C=v(E,w,$);g(R,C),_||S||h(N,l.default.vErrors)}e.reportExtraError=u;function d(E,w){E.assign(l.default.errors,w),E.if((0,n._)`${l.default.vErrors} !== null`,()=>E.if(w,()=>E.assign((0,n._)`${l.default.vErrors}.length`,w),()=>E.assign(l.default.vErrors,null)))}e.resetErrorsCount=d;function p({gen:E,keyword:w,schemaValue:$,data:N,errsCount:R,it:_}){if(R===void 0)throw new Error("ajv implementation error");const S=E.name("err");E.forRange("i",R,l.default.errors,C=>{E.const(S,(0,n._)`${l.default.vErrors}[${C}]`),E.if((0,n._)`${S}.instancePath === undefined`,()=>E.assign((0,n._)`${S}.instancePath`,(0,n.strConcat)(l.default.instancePath,_.errorPath))),E.assign((0,n._)`${S}.schemaPath`,(0,n.str)`${_.errSchemaPath}/${w}`),_.opts.verbose&&(E.assign((0,n._)`${S}.schema`,$),E.assign((0,n._)`${S}.data`,N))})}e.extendErrors=p;function g(E,w){const $=E.const("err",w);E.if((0,n._)`${l.default.vErrors} === null`,()=>E.assign(l.default.vErrors,(0,n._)`[${$}]`),(0,n._)`${l.default.vErrors}.push(${$})`),E.code((0,n._)`${l.default.errors}++`)}function h(E,w){const{gen:$,validateName:N,schemaEnv:R}=E;R.$async?$.throw((0,n._)`new ${E.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(E,w,$){const{createErrors:N}=E.it;return N===!1?(0,n._)`{}`:j(E,w,$)}function j(E,w,$={}){const{gen:N,it:R}=E,_=[k(R,$),x(E,$)];return z(E,w,_),N.object(..._)}function k({errorPath:E},{instancePath:w}){const $=w?(0,n.str)`${E}${(0,o.getErrorPath)(w,o.Type.Str)}`:E;return[l.default.instancePath,(0,n.strConcat)(l.default.instancePath,$)]}function x({keyword:E,it:{errSchemaPath:w}},{schemaPath:$,parentSchema:N}){let R=N?w:(0,n.str)`${w}/${E}`;return $&&(R=(0,n.str)`${R}${(0,o.getErrorPath)($,o.Type.Str)}`),[y.schemaPath,R]}function z(E,{params:w,message:$},N){const{keyword:R,data:_,schemaValue:S,it:C}=E,{opts:U,propertyName:te,topSchemaRef:Z,schemaPath:V}=C;N.push([y.keyword,R],[y.params,typeof w=="function"?w(E):w||(0,n._)`{}`]),U.messages&&N.push([y.message,typeof $=="function"?$(E):$]),U.verbose&&N.push([y.schema,S],[y.parentSchema,(0,n._)`${Z}${V}`],[l.default.data,_]),te&&N.push([y.propertyName,te])}})(mf)),mf}var sy;function Y3(){if(sy)return Lr;sy=1,Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.boolOrEmptySchema=Lr.topBoolOrEmptySchema=void 0;const e=Mc(),n=Re(),o=br(),l={message:"boolean schema is false"};function c(p){const{gen:g,schema:h,validateName:y}=p;h===!1?d(p,!1):typeof h=="object"&&h.$async===!0?g.return(o.default.data):(g.assign((0,n._)`${y}.errors`,null),g.return(!0))}Lr.topBoolOrEmptySchema=c;function u(p,g){const{gen:h,schema:y}=p;y===!1?(h.var(g,!1),d(p)):h.var(g,!0)}Lr.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 Lr}var Ht={},Fr={},cy;function T$(){if(cy)return Fr;cy=1,Object.defineProperty(Fr,"__esModule",{value:!0}),Fr.getRules=Fr.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)}Fr.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 Fr.getRules=l,Fr}var hn={},uy;function M$(){if(uy)return hn;uy=1,Object.defineProperty(hn,"__esModule",{value:!0}),hn.shouldUseRule=hn.shouldUseGroup=hn.schemaHasRulesForType=void 0;function e({schema:l,self:c},u){const d=c.RULES.types[u];return d&&d!==!0&&n(l,d)}hn.schemaHasRulesForType=e;function n(l,c){return c.rules.some(u=>o(l,u))}hn.shouldUseGroup=n;function o(l,c){var u;return l[c.keyword]!==void 0||((u=c.definition.implements)===null||u===void 0?void 0:u.some(d=>l[d]!==void 0))}return hn.shouldUseRule=o,hn}var dy;function kc(){if(dy)return Ht;dy=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=T$(),n=M$(),o=Mc(),l=Re(),c=He();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),U=N.length>0&&!(C.length===0&&N.length===1&&(0,n.schemaHasRulesForType)($,N[0]));if(U){const te=x(N,_,S.strictNumbers,u.Wrong);R.if(te,()=>{C.length?v($,N,C):E($)})}return U}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}=$,U=_.let("dataType",(0,l._)`typeof ${S}`),te=_.let("coerced",(0,l._)`undefined`);C.coerceTypes==="array"&&_.if((0,l._)`${U} == 'object' && Array.isArray(${S}) && ${S}.length == 1`,()=>_.assign(S,(0,l._)`${S}[0]`).assign(U,(0,l._)`typeof ${S}`).if(x(N,S,C.strictNumbers),()=>_.assign(te,S))),_.if((0,l._)`${te} !== undefined`);for(const V of R)(h.has(V)||V==="array"&&C.coerceTypes==="array")&&Z(V);_.else(),E($),_.endIf(),_.if((0,l._)`${te} !== undefined`,()=>{_.assign(S,te),j($,te)});function Z(V){switch(V){case"string":_.elseIf((0,l._)`${U} == "number" || ${U} == "boolean"`).assign(te,(0,l._)`"" + ${S}`).elseIf((0,l._)`${S} === null`).assign(te,(0,l._)`""`);return;case"number":_.elseIf((0,l._)`${U} == "boolean" || ${S} === null
|
|
114
|
-
|| (${U} == "string" && ${S} && ${S} == +${S})`).assign(te,(0,l._)`+${S}`);return;case"integer":_.elseIf((0,l._)`${U} === "boolean" || ${S} === null
|
|
115
|
-
|| (${U} === "string" && ${S} && ${S} == +${S} && !(${S} % 1))`).assign(te,(0,l._)`+${S}`);return;case"boolean":_.elseIf((0,l._)`${S} === "false" || ${S} === 0 || ${S} === null`).assign(te,!1).elseIf((0,l._)`${S} === "true" || ${S} === 1`).assign(te,!0);return;case"null":_.elseIf((0,l._)`${S} === "" || ${S} === 0 || ${S} === false`),_.assign(te,null);return;case"array":_.elseIf((0,l._)`${U} === "string" || ${U} === "number"
|
|
116
|
-
|| ${U} === "boolean" || ${S} === null`).assign(te,(0,l._)`[${S}]`)}}}function j({gen:$,parentData:N,parentDataProperty:R},_){$.if((0,l._)`${N} !== undefined`,()=>$.assign((0,l._)`${N}[${R}]`,_))}function k($,N,R,_=u.Correct){const S=_===u.Correct?l.operators.EQ:l.operators.NEQ;let C;switch($){case"null":return(0,l._)`${N} ${S} null`;case"array":C=(0,l._)`Array.isArray(${N})`;break;case"object":C=(0,l._)`${N} && typeof ${N} == "object" && !Array.isArray(${N})`;break;case"integer":C=U((0,l._)`!(${N} % 1) && !isNaN(${N})`);break;case"number":C=U();break;default:return(0,l._)`typeof ${N} ${S} ${$}`}return _===u.Correct?C:(0,l.not)(C);function U(te=l.nil){return(0,l.and)((0,l._)`typeof ${N} == "number"`,te,R?(0,l._)`isFinite(${N})`:l.nil)}}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 U=(0,l._)`typeof ${N} != "object"`;S=C.null?U:(0,l._)`!${N} || ${U}`,delete C.null,delete C.array,delete C.object}else S=l.nil;C.number&&delete C.integer;for(const U in C)S=(0,l.and)(S,k(U,N,R,_));return S}Ht.checkDataTypes=x;const z={message:({schema:$})=>`must be ${$}`,params:({schema:$,schemaValue:N})=>typeof $=="string"?(0,l._)`{type: ${$}}`:(0,l._)`{type: ${N}}`};function E($){const N=w($);(0,o.reportError)(N,z)}Ht.reportTypeError=E;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 Po={},fy;function K3(){if(fy)return Po;fy=1,Object.defineProperty(Po,"__esModule",{value:!0}),Po.assignDefaults=void 0;const e=Re(),n=He();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))}Po.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 Po}var Ua={},Je={},py;function Ba(){if(py)return Je;py=1,Object.defineProperty(Je,"__esModule",{value:!0}),Je.validateUnion=Je.validateArray=Je.usePattern=Je.callValidateCode=Je.schemaProperties=Je.allSchemaProperties=Je.noPropertyInData=Je.propertyInData=Je.isOwnProperty=Je.hasPropFunc=Je.reportMissingProp=Je.checkMissingProp=Je.checkReportMissingProp=void 0;const e=Re(),n=He(),o=br(),l=He();function c($,N){const{gen:R,data:_,it:S}=$;R.if(y(R,_,N,S.opts.ownProperties),()=>{$.setParams({missingProperty:(0,e._)`${N}`},!0),$.error()})}Je.checkReportMissingProp=c;function u({gen:$,data:N,it:{opts:R}},_,S){return(0,e.or)(..._.map(C=>(0,e.and)(y($,N,C,R.ownProperties),(0,e._)`${S} = ${C}`)))}Je.checkMissingProp=u;function d($,N){$.setParams({missingProperty:N},!0),$.error()}Je.reportMissingProp=d;function p($){return $.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}Je.hasPropFunc=p;function g($,N,R){return(0,e._)`${p($)}.call(${N}, ${R})`}Je.isOwnProperty=g;function h($,N,R,_){const S=(0,e._)`${N}${(0,e.getProperty)(R)} !== undefined`;return _?(0,e._)`${S} && ${g($,N,R)}`:S}Je.propertyInData=h;function y($,N,R,_){const S=(0,e._)`${N}${(0,e.getProperty)(R)} === undefined`;return _?(0,e.or)(S,(0,e.not)(g($,N,R))):S}Je.noPropertyInData=y;function v($){return $?Object.keys($).filter(N=>N!=="__proto__"):[]}Je.allSchemaProperties=v;function j($,N){return v(N).filter(R=>!(0,n.alwaysValidSchema)($,N[R]))}Je.schemaProperties=j;function k({schemaCode:$,data:N,it:{gen:R,topSchemaRef:_,schemaPath:S,errorPath:C},it:U},te,Z,V){const Y=V?(0,e._)`${$}, ${N}, ${_}${S}`:N,G=[[o.default.instancePath,(0,e.strConcat)(o.default.instancePath,C)],[o.default.parentData,U.parentData],[o.default.parentDataProperty,U.parentDataProperty],[o.default.rootData,o.default.rootData]];U.opts.dynamicRef&&G.push([o.default.dynamicAnchors,o.default.dynamicAnchors]);const ie=(0,e._)`${Y}, ${R.object(...G)}`;return Z!==e.nil?(0,e._)`${te}.call(${Z}, ${ie})`:(0,e._)`${te}(${ie})`}Je.callValidateCode=k;const x=(0,e._)`new RegExp`;function z({gen:$,it:{opts:N}},R){const _=N.unicodeRegExp?"u":"",{regExp:S}=N.code,C=S(R,_);return $.scopeValue("pattern",{key:C.toString(),ref:C,code:(0,e._)`${S.code==="new RegExp"?x:(0,l.useFunc)($,S)}(${R}, ${_})`})}Je.usePattern=z;function E($){const{gen:N,data:R,keyword:_,it:S}=$,C=N.name("valid");if(S.allErrors){const te=N.let("valid",!0);return U(()=>N.assign(te,!1)),te}return N.var(C,!0),U(()=>N.break()),C;function U(te){const Z=N.const("len",(0,e._)`${R}.length`);N.forRange("i",0,Z,V=>{$.subschema({keyword:_,dataProp:V,dataPropType:n.Type.Num},C),N.if((0,e.not)(C),te)})}}Je.validateArray=E;function w($){const{gen:N,schema:R,keyword:_,it:S}=$;if(!Array.isArray(R))throw new Error("ajv implementation error");if(R.some(Z=>(0,n.alwaysValidSchema)(S,Z))&&!S.opts.unevaluated)return;const U=N.let("valid",!1),te=N.name("_valid");N.block(()=>R.forEach((Z,V)=>{const Y=$.subschema({keyword:_,schemaProp:V,compositeRule:!0},te);N.assign(U,(0,e._)`${U} || ${te}`),$.mergeValidEvaluated(Y,te)||N.if((0,e.not)(U))})),$.result(U,()=>$.reset(),()=>$.error(!0))}return Je.validateUnion=w,Je}var gy;function J3(){if(gy)return Ua;gy=1,Object.defineProperty(Ua,"__esModule",{value:!0}),Ua.validateKeywordUsage=Ua.validSchemaType=Ua.funcKeywordCode=Ua.macroKeywordCode=void 0;const e=Re(),n=br(),o=Ba(),l=Mc();function c(j,k){const{gen:x,keyword:z,schema:E,parentSchema:w,it:$}=j,N=k.macro.call($.self,E,w,$),R=h(x,z,N);$.opts.validateSchema!==!1&&$.self.validateSchema(N,!0);const _=x.name("valid");j.subschema({schema:N,schemaPath:e.nil,errSchemaPath:`${$.errSchemaPath}/${z}`,topSchemaRef:R,compositeRule:!0},_),j.pass(_,()=>j.error(!0))}Ua.macroKeywordCode=c;function u(j,k){var x;const{gen:z,keyword:E,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(z,E,_),C=z.let("valid");j.block$data(C,U),j.ok((x=k.valid)!==null&&x!==void 0?x:C);function U(){if(k.errors===!1)V(),k.modifying&&d(j),Y(()=>j.error());else{const G=k.async?te():Z();k.modifying&&d(j),Y(()=>p(j,G))}}function te(){const G=z.let("ruleErrs",null);return z.try(()=>V((0,e._)`await `),ie=>z.assign(C,!1).if((0,e._)`${ie} instanceof ${R.ValidationError}`,()=>z.assign(G,(0,e._)`${ie}.errors`),()=>z.throw(ie))),G}function Z(){const G=(0,e._)`${S}.errors`;return z.assign(G,null),V(e.nil),G}function V(G=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);z.assign(C,(0,e._)`${G}${(0,o.callValidateCode)(j,S,ie,_e)}`,k.modifying)}function Y(G){var ie;z.if((0,e.not)((ie=k.valid)!==null&&ie!==void 0?ie:C),G)}}Ua.funcKeywordCode=u;function d(j){const{gen:k,data:x,it:z}=j;k.if(z.parentData,()=>k.assign(x,(0,e._)`${z.parentData}[${z.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(z=>z==="array"?Array.isArray(j):z==="object"?j&&typeof j=="object"&&!Array.isArray(j):typeof j==z||x&&typeof j>"u")}Ua.validSchemaType=y;function v({schema:j,opts:k,self:x,errSchemaPath:z},E,w){if(Array.isArray(E.keyword)?!E.keyword.includes(w):E.keyword!==w)throw new Error("ajv implementation error");const $=E.dependencies;if($!=null&&$.some(N=>!Object.prototype.hasOwnProperty.call(j,N)))throw new Error(`parent schema must have dependencies of ${w}: ${$.join(",")}`);if(E.validateSchema&&!E.validateSchema(j[w])){const R=`keyword "${w}" value is invalid at path "${z}": `+x.errorsText(E.validateSchema.errors);if(k.validateSchema==="log")x.logger.error(R);else throw new Error(R)}}return Ua.validateKeywordUsage=v,Ua}var yn={},my;function X3(){if(my)return yn;my=1,Object.defineProperty(yn,"__esModule",{value:!0}),yn.extendSubschemaMode=yn.extendSubschemaData=yn.getSubschema=void 0;const e=Re(),n=He();function o(u,{keyword:d,schemaProp:p,schema:g,schemaPath:h,errSchemaPath:y,topSchemaRef:v}){if(d!==void 0&&g!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(d!==void 0){const j=u.schema[d];return p===void 0?{schema:j,schemaPath:(0,e._)`${u.schemaPath}${(0,e.getProperty)(d)}`,errSchemaPath:`${u.errSchemaPath}/${d}`}:{schema:j[p],schemaPath:(0,e._)`${u.schemaPath}${(0,e.getProperty)(d)}${(0,e.getProperty)(p)}`,errSchemaPath:`${u.errSchemaPath}/${d}/${(0,n.escapeFragment)(p)}`}}if(g!==void 0){if(h===void 0||y===void 0||v===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:g,schemaPath:h,topSchemaRef:v,errSchemaPath:y}}throw new Error('either "keyword" or "schema" must be passed')}yn.getSubschema=o;function l(u,d,{dataProp:p,dataPropType:g,data:h,dataTypes:y,propertyName:v}){if(h!==void 0&&p!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:j}=d;if(p!==void 0){const{errorPath:x,dataPathArr:z,opts:E}=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,E.jsPropertySyntax)}`,u.parentDataProperty=(0,e._)`${p}`,u.dataPathArr=[...z,u.parentDataProperty]}if(h!==void 0){const x=h instanceof e.Name?h:j.let("data",h,!0);k(x),v!==void 0&&(u.propertyName=v)}y&&(u.dataTypes=y);function k(x){u.data=x,u.dataLevel=d.dataLevel+1,u.dataTypes=[],d.definedProperties=new Set,u.parentData=d.data,u.dataNames=[...d.dataNames,x]}}yn.extendSubschemaData=l;function c(u,{jtdDiscriminator:d,jtdMetadata:p,compositeRule:g,createErrors:h,allErrors:y}){g!==void 0&&(u.compositeRule=g),h!==void 0&&(u.createErrors=h),y!==void 0&&(u.allErrors=y),u.jtdDiscriminator=d,u.jtdMetadata=p}return yn.extendSubschemaMode=c,yn}var Kt={},$f,hy;function O$(){return hy||(hy=1,$f=function e(n,o){if(n===o)return!0;if(n&&o&&typeof n=="object"&&typeof o=="object"){if(n.constructor!==o.constructor)return!1;var l,c,u;if(Array.isArray(n)){if(l=n.length,l!=o.length)return!1;for(c=l;c--!==0;)if(!e(n[c],o[c]))return!1;return!0}if(n.constructor===RegExp)return n.source===o.source&&n.flags===o.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===o.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===o.toString();if(u=Object.keys(n),l=u.length,l!==Object.keys(o).length)return!1;for(c=l;c--!==0;)if(!Object.prototype.hasOwnProperty.call(o,u[c]))return!1;for(c=l;c--!==0;){var d=u[c];if(!e(n[d],o[d]))return!1}return!0}return n!==n&&o!==o}),$f}var bf={exports:{}},yy;function W3(){if(yy)return bf.exports;yy=1;var e=bf.exports=function(l,c,u){typeof c=="function"&&(u=c,c={}),u=c.cb||u;var d=typeof u=="function"?u:u.pre||function(){},p=u.post||function(){};n(c,d,p,l,"",l)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function n(l,c,u,d,p,g,h,y,v,j){if(d&&typeof d=="object"&&!Array.isArray(d)){c(d,p,g,h,y,v,j);for(var k in d){var x=d[k];if(Array.isArray(x)){if(k in e.arrayKeywords)for(var z=0;z<x.length;z++)n(l,c,u,x[z],p+"/"+k+"/"+z,g,p,k,d,z)}else if(k in e.propsKeywords){if(x&&typeof x=="object")for(var E in x)n(l,c,u,x[E],p+"/"+k+"/"+o(E),g,p,k,d,E)}else(k in e.keywords||l.allKeys&&!(k in e.skipKeywords))&&n(l,c,u,x,p+"/"+k,g,p,k,d)}u(d,p,g,h,y,v,j)}}function o(l){return l.replace(/~/g,"~0").replace(/\//g,"~1")}return bf.exports}var vy;function Oc(){if(vy)return Kt;vy=1,Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.getSchemaRefs=Kt.resolveUrl=Kt.normalizeId=Kt._getFullPath=Kt.getFullPath=Kt.inlineRef=void 0;const e=He(),n=O$(),o=W3(),l=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function c(z,E=!0){return typeof z=="boolean"?!0:E===!0?!d(z):E?p(z)<=E:!1}Kt.inlineRef=c;const u=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function d(z){for(const E in z){if(u.has(E))return!0;const w=z[E];if(Array.isArray(w)&&w.some(d)||typeof w=="object"&&d(w))return!0}return!1}function p(z){let E=0;for(const w in z){if(w==="$ref")return 1/0;if(E++,!l.has(w)&&(typeof z[w]=="object"&&(0,e.eachItem)(z[w],$=>E+=p($)),E===1/0))return 1/0}return E}function g(z,E="",w){w!==!1&&(E=v(E));const $=z.parse(E);return h(z,$)}Kt.getFullPath=g;function h(z,E){return z.serialize(E).split("#")[0]+"#"}Kt._getFullPath=h;const y=/#\/?$/;function v(z){return z?z.replace(y,""):""}Kt.normalizeId=v;function j(z,E,w){return w=v(w),z.resolve(E,w)}Kt.resolveUrl=j;const k=/^[a-z_][-a-z0-9._]*$/i;function x(z,E){if(typeof z=="boolean")return{};const{schemaId:w,uriResolver:$}=this.opts,N=v(z[w]||E),R={"":N},_=g($,N,!1),S={},C=new Set;return o(z,{allKeys:!0},(Z,V,Y,G)=>{if(G===void 0)return;const ie=_+V;let _e=R[G];typeof Z[w]=="string"&&(_e=ae.call(this,Z[w])),fe.call(this,Z.$anchor),fe.call(this,Z.$dynamicAnchor),R[V]=_e;function ae(ge){const ke=this.opts.uriResolver.resolve;if(ge=v(_e?ke(_e,ge):ge),C.has(ge))throw te(ge);C.add(ge);let re=this.refs[ge];return typeof re=="string"&&(re=this.refs[re]),typeof re=="object"?U(Z,re.schema,ge):ge!==v(ie)&&(ge[0]==="#"?(U(Z,S[ge],ge),S[ge]=Z):this.refs[ge]=ie),ge}function fe(ge){if(typeof ge=="string"){if(!k.test(ge))throw new Error(`invalid anchor "${ge}"`);ae.call(this,`#${ge}`)}}}),S;function U(Z,V,Y){if(V!==void 0&&!n(Z,V))throw te(Y)}function te(Z){return new Error(`reference "${Z}" resolves to more than one schema`)}}return Kt.getSchemaRefs=x,Kt}var $y;function Rc(){if($y)return mn;$y=1,Object.defineProperty(mn,"__esModule",{value:!0}),mn.getData=mn.KeywordCxt=mn.validateFunctionCode=void 0;const e=Y3(),n=kc(),o=M$(),l=kc(),c=K3(),u=J3(),d=X3(),p=Re(),g=br(),h=Oc(),y=He(),v=Mc();function j(q){if(_(q)&&(C(q),R(q))){E(q);return}k(q,()=>(0,e.topBoolOrEmptySchema)(q))}mn.validateFunctionCode=j;function k({gen:q,validateName:Q,schema:ue,schemaEnv:me,opts:ve},Ee){ve.code.es5?q.func(Q,(0,p._)`${g.default.data}, ${g.default.valCxt}`,me.$async,()=>{q.code((0,p._)`"use strict"; ${$(ue,ve)}`),z(q,ve),q.code(Ee)}):q.func(Q,(0,p._)`${g.default.data}, ${x(ve)}`,me.$async,()=>q.code($(ue,ve)).code(Ee))}function x(q){return(0,p._)`{${g.default.instancePath}="", ${g.default.parentData}, ${g.default.parentDataProperty}, ${g.default.rootData}=${g.default.data}${q.dynamicRef?(0,p._)`, ${g.default.dynamicAnchors}={}`:p.nil}}={}`}function z(q,Q){q.if(g.default.valCxt,()=>{q.var(g.default.instancePath,(0,p._)`${g.default.valCxt}.${g.default.instancePath}`),q.var(g.default.parentData,(0,p._)`${g.default.valCxt}.${g.default.parentData}`),q.var(g.default.parentDataProperty,(0,p._)`${g.default.valCxt}.${g.default.parentDataProperty}`),q.var(g.default.rootData,(0,p._)`${g.default.valCxt}.${g.default.rootData}`),Q.dynamicRef&&q.var(g.default.dynamicAnchors,(0,p._)`${g.default.valCxt}.${g.default.dynamicAnchors}`)},()=>{q.var(g.default.instancePath,(0,p._)`""`),q.var(g.default.parentData,(0,p._)`undefined`),q.var(g.default.parentDataProperty,(0,p._)`undefined`),q.var(g.default.rootData,g.default.data),Q.dynamicRef&&q.var(g.default.dynamicAnchors,(0,p._)`{}`)})}function E(q){const{schema:Q,opts:ue,gen:me}=q;k(q,()=>{ue.$comment&&Q.$comment&&G(q),Z(q),me.let(g.default.vErrors,null),me.let(g.default.errors,0),ue.unevaluated&&w(q),U(q),ie(q)})}function w(q){const{gen:Q,validateName:ue}=q;q.evaluated=Q.const("evaluated",(0,p._)`${ue}.evaluated`),Q.if((0,p._)`${q.evaluated}.dynamicProps`,()=>Q.assign((0,p._)`${q.evaluated}.props`,(0,p._)`undefined`)),Q.if((0,p._)`${q.evaluated}.dynamicItems`,()=>Q.assign((0,p._)`${q.evaluated}.items`,(0,p._)`undefined`))}function $(q,Q){const ue=typeof q=="object"&&q[Q.schemaId];return ue&&(Q.code.source||Q.code.process)?(0,p._)`/*# sourceURL=${ue} */`:p.nil}function N(q,Q){if(_(q)&&(C(q),R(q))){S(q,Q);return}(0,e.boolOrEmptySchema)(q,Q)}function R({schema:q,self:Q}){if(typeof q=="boolean")return!q;for(const ue in q)if(Q.RULES.all[ue])return!0;return!1}function _(q){return typeof q.schema!="boolean"}function S(q,Q){const{schema:ue,gen:me,opts:ve}=q;ve.$comment&&ue.$comment&&G(q),V(q),Y(q);const Ee=me.const("_errs",g.default.errors);U(q,Ee),me.var(Q,(0,p._)`${Ee} === ${g.default.errors}`)}function C(q){(0,y.checkUnknownRules)(q),te(q)}function U(q,Q){if(q.opts.jtd)return ae(q,[],!1,Q);const ue=(0,n.getSchemaTypes)(q.schema),me=(0,n.coerceAndCheckDataType)(q,ue);ae(q,ue,!me,Q)}function te(q){const{schema:Q,errSchemaPath:ue,opts:me,self:ve}=q;Q.$ref&&me.ignoreKeywordsWithRef&&(0,y.schemaHasRulesButRef)(Q,ve.RULES)&&ve.logger.warn(`$ref: keywords ignored in schema at path "${ue}"`)}function Z(q){const{schema:Q,opts:ue}=q;Q.default!==void 0&&ue.useDefaults&&ue.strictSchema&&(0,y.checkStrictMode)(q,"default is ignored in the schema root")}function V(q){const Q=q.schema[q.opts.schemaId];Q&&(q.baseId=(0,h.resolveUrl)(q.opts.uriResolver,q.baseId,Q))}function Y(q){if(q.schema.$async&&!q.schemaEnv.$async)throw new Error("async schema in sync schema")}function G({gen:q,schemaEnv:Q,schema:ue,errSchemaPath:me,opts:ve}){const Ee=ue.$comment;if(ve.$comment===!0)q.code((0,p._)`${g.default.self}.logger.log(${Ee})`);else if(typeof ve.$comment=="function"){const Et=(0,p.str)`${me}/$comment`,ea=q.scopeValue("root",{ref:Q.root});q.code((0,p._)`${g.default.self}.opts.$comment(${Ee}, ${Et}, ${ea}.schema)`)}}function ie(q){const{gen:Q,schemaEnv:ue,validateName:me,ValidationError:ve,opts:Ee}=q;ue.$async?Q.if((0,p._)`${g.default.errors} === 0`,()=>Q.return(g.default.data),()=>Q.throw((0,p._)`new ${ve}(${g.default.vErrors})`)):(Q.assign((0,p._)`${me}.errors`,g.default.vErrors),Ee.unevaluated&&_e(q),Q.return((0,p._)`${g.default.errors} === 0`))}function _e({gen:q,evaluated:Q,props:ue,items:me}){ue instanceof p.Name&&q.assign((0,p._)`${Q}.props`,ue),me instanceof p.Name&&q.assign((0,p._)`${Q}.items`,me)}function ae(q,Q,ue,me){const{gen:ve,schema:Ee,data:Et,allErrors:ea,opts:Ct,self:Tt}=q,{RULES:ht}=Tt;if(Ee.$ref&&(Ct.ignoreKeywordsWithRef||!(0,y.schemaHasRulesButRef)(Ee,ht))){ve.block(()=>pe(q,"$ref",ht.all.$ref.definition));return}Ct.jtd||ge(q,Q),ve.block(()=>{for(const ta of ht.rules)_n(ta);_n(ht.post)});function _n(ta){(0,o.shouldUseGroup)(Ee,ta)&&(ta.type?(ve.if((0,l.checkDataType)(ta.type,Et,Ct.strictNumbers)),fe(q,ta),Q.length===1&&Q[0]===ta.type&&ue&&(ve.else(),(0,l.reportTypeError)(q)),ve.endIf()):fe(q,ta),ea||ve.if((0,p._)`${g.default.errors} === ${me||0}`))}}function fe(q,Q){const{gen:ue,schema:me,opts:{useDefaults:ve}}=q;ve&&(0,c.assignDefaults)(q,Q.type),ue.block(()=>{for(const Ee of Q.rules)(0,o.shouldUseRule)(me,Ee)&&pe(q,Ee.keyword,Ee.definition,Q.type)})}function ge(q,Q){q.schemaEnv.meta||!q.opts.strictTypes||(ke(q,Q),q.opts.allowUnionTypes||re(q,Q),T(q,q.dataTypes))}function ke(q,Q){if(Q.length){if(!q.dataTypes.length){q.dataTypes=Q;return}Q.forEach(ue=>{B(q.dataTypes,ue)||A(q,`type "${ue}" not allowed by context "${q.dataTypes.join(",")}"`)}),O(q,Q)}}function re(q,Q){Q.length>1&&!(Q.length===2&&Q.includes("null"))&&A(q,"use allowUnionTypes to allow union type keyword")}function T(q,Q){const ue=q.self.RULES.all;for(const me in ue){const ve=ue[me];if(typeof ve=="object"&&(0,o.shouldUseRule)(q.schema,ve)){const{type:Ee}=ve.definition;Ee.length&&!Ee.some(Et=>L(Q,Et))&&A(q,`missing type "${Ee.join(",")}" for keyword "${me}"`)}}}function L(q,Q){return q.includes(Q)||Q==="number"&&q.includes("integer")}function B(q,Q){return q.includes(Q)||Q==="integer"&&q.includes("number")}function O(q,Q){const ue=[];for(const me of q.dataTypes)B(Q,me)?ue.push(me):Q.includes("integer")&&me==="number"&&ue.push("integer");q.dataTypes=ue}function A(q,Q){const ue=q.schemaEnv.baseId+q.errSchemaPath;Q+=` at "${ue}" (strictTypes)`,(0,y.checkStrictMode)(q,Q,q.opts.strictTypes)}class J{constructor(Q,ue,me){if((0,u.validateKeywordUsage)(Q,ue,me),this.gen=Q.gen,this.allErrors=Q.allErrors,this.keyword=me,this.data=Q.data,this.schema=Q.schema[me],this.$data=ue.$data&&Q.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,y.schemaRefOrVal)(Q,this.schema,me,this.$data),this.schemaType=ue.schemaType,this.parentSchema=Q.schema,this.params={},this.it=Q,this.def=ue,this.$data)this.schemaCode=Q.gen.const("vSchema",Te(this.$data,Q));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=Q.gen.const("_errs",g.default.errors))}result(Q,ue,me){this.failResult((0,p.not)(Q),ue,me)}failResult(Q,ue,me){this.gen.if(Q),me?me():this.error(),ue?(this.gen.else(),ue(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(Q,ue){this.failResult((0,p.not)(Q),void 0,ue)}fail(Q){if(Q===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(Q),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(Q){if(!this.$data)return this.fail(Q);const{schemaCode:ue}=this;this.fail((0,p._)`${ue} !== undefined && (${(0,p.or)(this.invalid$data(),Q)})`)}error(Q,ue,me){if(ue){this.setParams(ue),this._error(Q,me),this.setParams({});return}this._error(Q,me)}_error(Q,ue){(Q?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(Q){this.allErrors||this.gen.if(Q)}setParams(Q,ue){ue?Object.assign(this.params,Q):this.params=Q}block$data(Q,ue,me=p.nil){this.gen.block(()=>{this.check$data(Q,me),ue()})}check$data(Q=p.nil,ue=p.nil){if(!this.$data)return;const{gen:me,schemaCode:ve,schemaType:Ee,def:Et}=this;me.if((0,p.or)((0,p._)`${ve} === undefined`,ue)),Q!==p.nil&&me.assign(Q,!0),(Ee.length||Et.validateSchema)&&(me.elseIf(this.invalid$data()),this.$dataError(),Q!==p.nil&&me.assign(Q,!1)),me.else()}invalid$data(){const{gen:Q,schemaCode:ue,schemaType:me,def:ve,it:Ee}=this;return(0,p.or)(Et(),ea());function Et(){if(me.length){if(!(ue instanceof p.Name))throw new Error("ajv implementation error");const Ct=Array.isArray(me)?me:[me];return(0,p._)`${(0,l.checkDataTypes)(Ct,ue,Ee.opts.strictNumbers,l.DataType.Wrong)}`}return p.nil}function ea(){if(ve.validateSchema){const Ct=Q.scopeValue("validate$data",{ref:ve.validateSchema});return(0,p._)`!${Ct}(${ue})`}return p.nil}}subschema(Q,ue){const me=(0,d.getSubschema)(this.it,Q);(0,d.extendSubschemaData)(me,this.it,Q),(0,d.extendSubschemaMode)(me,Q);const ve={...this.it,...me,items:void 0,props:void 0};return N(ve,ue),ve}mergeEvaluated(Q,ue){const{it:me,gen:ve}=this;me.opts.unevaluated&&(me.props!==!0&&Q.props!==void 0&&(me.props=y.mergeEvaluated.props(ve,Q.props,me.props,ue)),me.items!==!0&&Q.items!==void 0&&(me.items=y.mergeEvaluated.items(ve,Q.items,me.items,ue)))}mergeValidEvaluated(Q,ue){const{it:me,gen:ve}=this;if(me.opts.unevaluated&&(me.props!==!0||me.items!==!0))return ve.if(ue,()=>this.mergeEvaluated(Q,p.Name)),!0}}mn.KeywordCxt=J;function pe(q,Q,ue,me){const ve=new J(q,ue,Q);"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(q,{dataLevel:Q,dataNames:ue,dataPathArr:me}){let ve,Ee;if(q==="")return g.default.rootData;if(q[0]==="/"){if(!he.test(q))throw new Error(`Invalid JSON-pointer: ${q}`);ve=q,Ee=g.default.rootData}else{const Tt=Se.exec(q);if(!Tt)throw new Error(`Invalid JSON-pointer: ${q}`);const ht=+Tt[1];if(ve=Tt[2],ve==="#"){if(ht>=Q)throw new Error(Ct("property/index",ht));return me[Q-ht]}if(ht>Q)throw new Error(Ct("data",ht));if(Ee=ue[Q-ht],!ve)return Ee}let Et=Ee;const ea=ve.split("/");for(const Tt of ea)Tt&&(Ee=(0,p._)`${Ee}${(0,p.getProperty)((0,y.unescapeJsonPointer)(Tt))}`,Et=(0,p._)`${Et} && ${Ee}`);return Et;function Ct(Tt,ht){return`Cannot access ${Tt} ${ht} levels up, current level is ${Q}`}}return mn.getData=Te,mn}var Os={},by;function ap(){if(by)return Os;by=1,Object.defineProperty(Os,"__esModule",{value:!0});class e extends Error{constructor(o){super("validation failed"),this.errors=o,this.ajv=this.validation=!0}}return Os.default=e,Os}var Rs={},xy;function Ac(){if(xy)return Rs;xy=1,Object.defineProperty(Rs,"__esModule",{value:!0});const e=Oc();class n extends Error{constructor(l,c,u,d){super(d||`can't resolve reference ${u} from id ${c}`),this.missingRef=(0,e.resolveUrl)(l,c,u),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(l,this.missingRef))}}return Rs.default=n,Rs}var ba={},_y;function np(){if(_y)return ba;_y=1,Object.defineProperty(ba,"__esModule",{value:!0}),ba.resolveSchema=ba.getCompilingSchema=ba.resolveRef=ba.compileSchema=ba.SchemaEnv=void 0;const e=Re(),n=ap(),o=br(),l=Oc(),c=He(),u=Rc();class d{constructor(w){var $;this.refs={},this.dynamicAnchors={};let N;typeof w.schema=="object"&&(N=w.schema),this.schema=w.schema,this.schemaId=w.schemaId,this.root=w.root||this,this.baseId=($=w.baseId)!==null&&$!==void 0?$:(0,l.normalizeId)(N==null?void 0:N[w.schemaId||"$id"]),this.schemaPath=w.schemaPath,this.localRefs=w.localRefs,this.meta=w.meta,this.$async=N==null?void 0:N.$async,this.refs={}}}ba.SchemaEnv=d;function p(E){const w=y.call(this,E);if(w)return w;const $=(0,l.getFullPath)(this.opts.uriResolver,E.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;E.$async&&(C=S.scopeValue("Error",{ref:n.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const U=S.scopeName("validate");E.validateName=U;const te={gen:S,allErrors:this.opts.allErrors,data:o.default.data,parentData:o.default.parentData,parentDataProperty:o.default.parentDataProperty,dataNames:[o.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:S.scopeValue("schema",this.opts.code.source===!0?{ref:E.schema,code:(0,e.stringify)(E.schema)}:{ref:E.schema}),validateName:U,ValidationError:C,schema:E.schema,schemaEnv:E,rootId:$,baseId:E.baseId||$,schemaPath:e.nil,errSchemaPath:E.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let Z;try{this._compilations.add(E),(0,u.validateFunctionCode)(te),S.optimize(this.opts.code.optimize);const V=S.toString();Z=`${S.scopeRefs(o.default.scope)}return ${V}`,this.opts.code.process&&(Z=this.opts.code.process(Z,E));const G=new Function(`${o.default.self}`,`${o.default.scope}`,Z)(this,this.scope.get());if(this.scope.value(U,{ref:G}),G.errors=null,G.schema=E.schema,G.schemaEnv=E,E.$async&&(G.$async=!0),this.opts.code.source===!0&&(G.source={validateName:U,validateCode:V,scopeValues:S._values}),this.opts.unevaluated){const{props:ie,items:_e}=te;G.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},G.source&&(G.source.evaluated=(0,e.stringify)(G.evaluated))}return E.validate=G,E}catch(V){throw delete E.validate,delete E.validateName,Z&&this.logger.error("Error compiling schema, function code:",Z),V}finally{this._compilations.delete(E)}}ba.compileSchema=p;function g(E,w,$){var N;$=(0,l.resolveUrl)(this.opts.uriResolver,w,$);const R=E.refs[$];if(R)return R;let _=j.call(this,E,$);if(_===void 0){const S=(N=E.localRefs)===null||N===void 0?void 0:N[$],{schemaId:C}=this.opts;S&&(_=new d({schema:S,schemaId:C,root:E,baseId:w}))}if(_!==void 0)return E.refs[$]=h.call(this,_)}ba.resolveRef=g;function h(E){return(0,l.inlineRef)(E.schema,this.opts.inlineRefs)?E.schema:E.validate?E:p.call(this,E)}function y(E){for(const w of this._compilations)if(v(w,E))return w}ba.getCompilingSchema=y;function v(E,w){return E.schema===w.schema&&E.root===w.root&&E.baseId===w.baseId}function j(E,w){let $;for(;typeof($=this.refs[w])=="string";)w=$;return $||this.schemas[w]||k.call(this,E,w)}function k(E,w){const $=this.opts.uriResolver.parse(w),N=(0,l._getFullPath)(this.opts.uriResolver,$);let R=(0,l.getFullPath)(this.opts.uriResolver,E.baseId,void 0);if(Object.keys(E.schema).length>0&&N===R)return z.call(this,$,E);const _=(0,l.normalizeId)(N),S=this.refs[_]||this.schemas[_];if(typeof S=="string"){const C=k.call(this,E,S);return typeof(C==null?void 0:C.schema)!="object"?void 0:z.call(this,$,C)}if(typeof(S==null?void 0:S.schema)=="object"){if(S.validate||p.call(this,S),_===(0,l.normalizeId)(w)){const{schema:C}=S,{schemaId:U}=this.opts,te=C[U];return te&&(R=(0,l.resolveUrl)(this.opts.uriResolver,R,te)),new d({schema:C,schemaId:U,root:E,baseId:R})}return z.call(this,$,S)}}ba.resolveSchema=k;const x=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function z(E,{baseId:w,schema:$,root:N}){var R;if(((R=E.fragment)===null||R===void 0?void 0:R[0])!=="/")return;for(const C of E.fragment.slice(1).split("/")){if(typeof $=="boolean")return;const U=$[(0,c.unescapeFragment)(C)];if(U===void 0)return;$=U;const te=typeof $=="object"&&$[this.opts.schemaId];!x.has(C)&&te&&(w=(0,l.resolveUrl)(this.opts.uriResolver,w,te))}let _;if(typeof $!="boolean"&&$.$ref&&!(0,c.schemaHasRulesButRef)($,this.RULES)){const C=(0,l.resolveUrl)(this.opts.uriResolver,w,$.$ref);_=k.call(this,N,C)}const{schemaId:S}=this.opts;if(_=_||new d({schema:$,schemaId:S,root:N,baseId:w}),_.schema!==_.root.schema)return _}return ba}const Q3="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",e6="Meta-schema for $data reference (JSON AnySchema extension proposal)",t6="object",a6=["$data"],n6={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},r6=!1,i6={$id:Q3,description:e6,type:t6,required:a6,properties:n6,additionalProperties:r6};var As={},Zo={exports:{}},xf,jy;function R$(){if(jy)return xf;jy=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),n=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),o=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),l=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),c=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function u(_){let S="",C=0,U=0;for(U=0;U<_.length;U++)if(C=_[U].charCodeAt(0),C!==48){if(!(C>=48&&C<=57||C>=65&&C<=70||C>=97&&C<=102))return"";S+=_[U];break}for(U+=1;U<_.length;U++){if(C=_[U].charCodeAt(0),!(C>=48&&C<=57||C>=65&&C<=70||C>=97&&C<=102))return"";S+=_[U]}return S}const d=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function p(_){return _.length=0,!0}function g(_,S,C){if(_.length){const U=u(_);if(U!=="")S.push(U);else return C.error=!0,!1;_.length=0}return!0}function h(_){let S=0;const C={error:!1,address:"",zone:""},U=[],te=[];let Z=!1,V=!1,Y=g;for(let G=0;G<_.length;G++){const ie=_[G];if(!(ie==="["||ie==="]"))if(ie===":"){if(Z===!0&&(V=!0),!Y(te,U,C))break;if(++S>7){C.error=!0;break}G>0&&_[G-1]===":"&&(Z=!0),U.push(":");continue}else if(ie==="%"){if(!Y(te,U,C))break;Y=p}else{te.push(ie);continue}}return te.length&&(Y===p?C.zone=te.join(""):V?U.push(te.join("")):U.push(u(te))),C.address=U.join(""),C}function y(_){if(v(_,":")<2)return{host:_,isIPV6:!1};const S=h(_);if(S.error)return{host:_,isIPV6:!1};{let C=S.address,U=S.address;return S.zone&&(C+="%"+S.zone,U+="%25"+S.zone),{host:C,isIPV6:!0,escapedHost:U}}}function v(_,S){let C=0;for(let U=0;U<_.length;U++)_[U]===S&&C++;return C}function j(_){let S=_;const C=[];let U=-1,te=0;for(;te=S.length;){if(te===1){if(S===".")break;if(S==="/"){C.push("/");break}else{C.push(S);break}}else if(te===2){if(S[0]==="."){if(S[1]===".")break;if(S[1]==="/"){S=S.slice(2);continue}}else if(S[0]==="/"&&(S[1]==="."||S[1]==="/")){C.push("/");break}}else if(te===3&&S==="/.."){C.length!==0&&C.pop(),C.push("/");break}if(S[0]==="."){if(S[1]==="."){if(S[2]==="/"){S=S.slice(3);continue}}else if(S[1]==="/"){S=S.slice(2);continue}}else if(S[0]==="/"&&S[1]==="."){if(S[2]==="/"){S=S.slice(2);continue}else if(S[2]==="."&&S[3]==="/"){S=S.slice(3),C.length!==0&&C.pop();continue}}if((U=S.indexOf("/",1))===-1){C.push(S);break}else C.push(S.slice(0,U)),S=S.slice(U)}return C.join("")}const k={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},x=/[@/?#:]/g,z=/[@/?#]/g;function E(_,S){const C=S?z:x;return C.lastIndex=0,_.replace(C,U=>k[U])}function w(_,S=!1){if(_.indexOf("%")===-1)return _;let C="";for(let U=0;U<_.length;U++){if(_[U]==="%"&&U+2<_.length){const te=_.slice(U+1,U+3);if(o(te)){const Z=te.toUpperCase(),V=String.fromCharCode(parseInt(Z,16));S&&l(V)?C+=V:C+="%"+Z,U+=2;continue}}C+=_[U]}return C}function $(_){let S="";for(let C=0;C<_.length;C++){if(_[C]==="%"&&C+2<_.length){const U=_.slice(C+1,C+3);if(o(U)){const te=U.toUpperCase(),Z=String.fromCharCode(parseInt(te,16));Z!=="."&&l(Z)?S+=Z:S+="%"+te,C+=2;continue}}c(_[C])?S+=_[C]:S+=escape(_[C])}return S}function N(_){let S="";for(let C=0;C<_.length;C++){if(_[C]==="%"&&C+2<_.length){const U=_.slice(C+1,C+3);if(o(U)){S+="%"+U.toUpperCase(),C+=2;continue}}S+=escape(_[C])}return S}function R(_){const S=[];if(_.userinfo!==void 0&&(S.push(_.userinfo),S.push("@")),_.host!==void 0){let C=unescape(_.host);if(!n(C)){const U=y(C);U.isIPV6===!0?C=`[${U.escapedHost}]`:C=E(C,!1)}S.push(C)}return(typeof _.port=="number"||typeof _.port=="string")&&(S.push(":"),S.push(String(_.port))),S.length?S.join(""):void 0}return xf={nonSimpleDomain:d,recomposeAuthority:R,reescapeHostDelimiters:E,normalizePercentEncoding:w,normalizePathEncoding:$,escapePreservingEscapes:N,removeDotSegments:j,isIPv4:n,isUUID:e,normalizeIPv6:y,stringArrayToHexStripped:u},xf}var _f,Sy;function o6(){if(Sy)return _f;Sy=1;const{isUUID:e}=R$(),n=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,o=["http","https","ws","wss","urn","urn:uuid"];function l(_){return o.indexOf(_)!==-1}function c(_){return _.secure===!0?!0:_.secure===!1?!1:_.scheme?_.scheme.length===3&&(_.scheme[0]==="w"||_.scheme[0]==="W")&&(_.scheme[1]==="s"||_.scheme[1]==="S")&&(_.scheme[2]==="s"||_.scheme[2]==="S"):!1}function u(_){return _.host||(_.error=_.error||"HTTP URIs must have a host."),_}function d(_){const S=String(_.scheme).toLowerCase()==="https";return(_.port===(S?443:80)||_.port==="")&&(_.port=void 0),_.path||(_.path="/"),_}function p(_){return _.secure=c(_),_.resourceName=(_.path||"/")+(_.query?"?"+_.query:""),_.path=void 0,_.query=void 0,_}function g(_){if((_.port===(c(_)?443:80)||_.port==="")&&(_.port=void 0),typeof _.secure=="boolean"&&(_.scheme=_.secure?"wss":"ws",_.secure=void 0),_.resourceName){const[S,C]=_.resourceName.split("?");_.path=S&&S!=="/"?S:void 0,_.query=C,_.resourceName=void 0}return _.fragment=void 0,_}function h(_,S){if(!_.path)return _.error="URN can not be parsed",_;const C=_.path.match(n);if(C){const U=S.scheme||_.scheme||"urn";_.nid=C[1].toLowerCase(),_.nss=C[2];const te=`${U}:${S.nid||_.nid}`,Z=R(te);_.path=void 0,Z&&(_=Z.parse(_,S))}else _.error=_.error||"URN can not be parsed.";return _}function y(_,S){if(_.nid===void 0)throw new Error("URN without nid cannot be serialized");const C=S.scheme||_.scheme||"urn",U=_.nid.toLowerCase(),te=`${C}:${S.nid||U}`,Z=R(te);Z&&(_=Z.serialize(_,S));const V=_,Y=_.nss;return V.path=`${U||S.nid}:${Y}`,S.skipEscape=!0,V}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},z={scheme:"ws",domainHost:!0,parse:p,serialize:g},E={scheme:"wss",domainHost:z.domainHost,parse:z.parse,serialize:z.serialize},N={http:k,https:x,ws:z,wss:E,urn:{scheme:"urn",parse:h,serialize:y,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:v,serialize:j,skipNormalize:!0}};Object.setPrototypeOf(N,null);function R(_){return _&&(N[_]||N[_.toLowerCase()])||void 0}return _f={wsIsSecure:c,SCHEMES:N,isValidSchemeName:l,getSchemeHandler:R},_f}var wy;function l6(){if(wy)return Zo.exports;wy=1;const{normalizeIPv6:e,removeDotSegments:n,recomposeAuthority:o,normalizePercentEncoding:l,normalizePathEncoding:c,escapePreservingEscapes:u,reescapeHostDelimiters:d,isIPv4:p,nonSimpleDomain:g}=R$(),{SCHEMES:h,getSchemeHandler:y}=o6();function v(Z,V){return typeof Z=="string"?Z=S(Z,V):typeof Z=="object"&&(Z=_(z(Z,V),V)),Z}function j(Z,V,Y){const G=Y?Object.assign({scheme:"null"},Y):{scheme:"null"},{parsed:ie,malformedAuthorityOrPort:_e}=R(Z,G),{parsed:ae,malformedAuthorityOrPort:fe}=R(V,G);if(_e||fe)throw new Error(ie.error||ae.error||"URI is malformed.");const ge=k(ie,ae,G,!0);return G.skipEscape=!0,z(ge,G)}function k(Z,V,Y,G){const ie={};return G||(Z=_(z(Z,Y),Y),V=_(z(V,Y),Y)),Y=Y||{},!Y.tolerant&&V.scheme?(ie.scheme=V.scheme,ie.userinfo=V.userinfo,ie.host=V.host,ie.port=V.port,ie.path=n(V.path||""),ie.query=V.query):(V.userinfo!==void 0||V.host!==void 0||V.port!==void 0?(ie.userinfo=V.userinfo,ie.host=V.host,ie.port=V.port,ie.path=n(V.path||""),ie.query=V.query):(V.path?(V.path[0]==="/"?ie.path=n(V.path):((Z.userinfo!==void 0||Z.host!==void 0||Z.port!==void 0)&&!Z.path?ie.path="/"+V.path:Z.path?ie.path=Z.path.slice(0,Z.path.lastIndexOf("/")+1)+V.path:ie.path=V.path,ie.path=n(ie.path)),ie.query=V.query):(ie.path=Z.path,V.query!==void 0?ie.query=V.query:ie.query=Z.query),ie.userinfo=Z.userinfo,ie.host=Z.host,ie.port=Z.port),ie.scheme=Z.scheme),ie.fragment=V.fragment,ie}function x(Z,V,Y){const G=U(Z,Y),ie=U(V,Y);return G!==void 0&&ie!==void 0&&G.toLowerCase()===ie.toLowerCase()}function z(Z,V){const Y={host:Z.host,scheme:Z.scheme,userinfo:Z.userinfo,port:Z.port,path:Z.path,query:Z.query,nid:Z.nid,nss:Z.nss,uuid:Z.uuid,fragment:Z.fragment,reference:Z.reference,resourceName:Z.resourceName,secure:Z.secure,error:""},G=Object.assign({},V),ie=[],_e=y(G.scheme||Y.scheme);_e&&_e.serialize&&_e.serialize(Y,G),Y.path!==void 0&&(G.skipEscape?Y.path=l(Y.path):(Y.path=u(Y.path),Y.scheme!==void 0&&(Y.path=Y.path.split("%3A").join(":")))),G.reference!=="suffix"&&Y.scheme&&ie.push(Y.scheme,":");const ae=o(Y);if(ae!==void 0&&(G.reference!=="suffix"&&ie.push("//"),ie.push(ae),Y.path&&Y.path[0]!=="/"&&ie.push("/")),Y.path!==void 0){let fe=Y.path;!G.absolutePath&&(!_e||!_e.absolutePath)&&(fe=n(fe)),ae===void 0&&fe[0]==="/"&&fe[1]==="/"&&(fe="/%2F"+fe.slice(2)),ie.push(fe)}return Y.query!==void 0&&ie.push("?",Y.query),Y.fragment!==void 0&&ie.push("#",Y.fragment),ie.join("")}const E=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,w=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,$=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function N(Z,V){if(V[2]!==void 0&&Z.path&&Z.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof Z.port=="number"&&(Z.port<0||Z.port>65535))return"URI port is malformed."}function R(Z,V){const Y=Object.assign({},V),G={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?Z=Y.scheme+":"+Z:Z="//"+Z);const ae=Z.match(w);ae!==null&&ae[1].indexOf("\\")!==-1&&(G.error="URI authority must not contain a literal backslash.",ie=!0);const fe=Z.match($);if(fe!==null){const ke=fe[1],re=ke.replace(/[\t\n\r]/g,"");re.length>=2&&(re.slice(0,2)!=="//"?(G.error=G.error||"URI authority must not contain a literal backslash.",ie=!0):ke.length!==re.length&&(G.error=G.error||"URI authority introducer must not contain whitespace.",ie=!0))}const ge=Z.match(E);if(ge){G.scheme=ge[1],G.userinfo=ge[3],G.host=ge[4],G.port=parseInt(ge[5],10),G.path=ge[6]||"",G.query=ge[7],G.fragment=ge[8],isNaN(G.port)&&(G.port=ge[5]);const ke=N(G,ge);if(ke!==void 0&&(G.error=G.error||ke,ie=!0),G.host)if(p(G.host)===!1){const L=e(G.host);G.host=L.host.toLowerCase(),_e=L.isIPV6}else _e=!0;G.scheme===void 0&&G.userinfo===void 0&&G.host===void 0&&G.port===void 0&&G.query===void 0&&!G.path?G.reference="same-document":G.scheme===void 0?G.reference="relative":G.fragment===void 0?G.reference="absolute":G.reference="uri",Y.reference&&Y.reference!=="suffix"&&Y.reference!==G.reference&&(G.error=G.error||"URI is not a "+Y.reference+" reference.");const re=y(Y.scheme||G.scheme);if(!Y.unicodeSupport&&(!re||!re.unicodeSupport)&&G.host&&(Y.domainHost||re&&re.domainHost)&&_e===!1&&g(G.host))try{G.host=new URL("http://"+G.host).hostname}catch(T){G.error=G.error||"Host's domain name can not be converted to ASCII: "+T}if((!re||re&&!re.skipNormalize)&&(Z.indexOf("%")!==-1&&(G.scheme!==void 0&&(G.scheme=unescape(G.scheme)),G.host!==void 0&&(G.host=d(unescape(G.host),_e))),G.path&&(G.path=c(G.path)),G.fragment))try{G.fragment=encodeURI(decodeURIComponent(G.fragment))}catch{G.error=G.error||"URI malformed"}re&&re.parse&&re.parse(G,Y)}else G.error=G.error||"URI can not be parsed.";return{parsed:G,malformedAuthorityOrPort:ie}}function _(Z,V){return R(Z,V).parsed}function S(Z,V){return C(Z,V).normalized}function C(Z,V){const{parsed:Y,malformedAuthorityOrPort:G}=R(Z,V);return{normalized:G?Z:z(Y,V),malformedAuthorityOrPort:G}}function U(Z,V){if(typeof Z=="string"){const{normalized:Y,malformedAuthorityOrPort:G}=C(Z,V);return G?void 0:Y}if(typeof Z=="object")return z(Z,V)}const te={SCHEMES:h,normalize:v,resolve:j,resolveComponent:k,equal:x,serialize:z,parse:_};return Zo.exports=te,Zo.exports.default=te,Zo.exports.fastUri=te,Zo.exports}var ky;function s6(){if(ky)return As;ky=1,Object.defineProperty(As,"__esModule",{value:!0});const e=l6();return e.code='require("ajv/dist/runtime/uri").default',As.default=e,As}var Ny;function c6(){return Ny||(Ny=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var n=Rc();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return n.KeywordCxt}});var o=Re();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return o._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return o.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return o.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return o.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return o.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return o.CodeGen}});const l=ap(),c=Ac(),u=T$(),d=np(),p=Re(),g=Oc(),h=kc(),y=He(),v=i6,j=s6(),k=(re,T)=>new RegExp(re,T);k.code="new RegExp";const x=["removeAdditional","useDefaults","coerceTypes"],z=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),E={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,L,B,O,A,J,pe,he,Se,Te,q,Q,ue,me,ve,Ee,Et,ea,Ct,Tt,ht,_n,ta,Dt,Ki;const jn=re.strict,Gr=(T=re.code)===null||T===void 0?void 0:T.optimize,xr=Gr===!0||Gr===void 0?1:Gr||0,sl=(B=(L=re.code)===null||L===void 0?void 0:L.regExp)!==null&&B!==void 0?B:k,cl=(O=re.uriResolver)!==null&&O!==void 0?O:j.default;return{strictSchema:(J=(A=re.strictSchema)!==null&&A!==void 0?A:jn)!==null&&J!==void 0?J:!0,strictNumbers:(he=(pe=re.strictNumbers)!==null&&pe!==void 0?pe:jn)!==null&&he!==void 0?he:!0,strictTypes:(Te=(Se=re.strictTypes)!==null&&Se!==void 0?Se:jn)!==null&&Te!==void 0?Te:"log",strictTuples:(Q=(q=re.strictTuples)!==null&&q!==void 0?q:jn)!==null&&Q!==void 0?Q:"log",strictRequired:(me=(ue=re.strictRequired)!==null&&ue!==void 0?ue:jn)!==null&&me!==void 0?me:!1,code:re.code?{...re.code,optimize:xr,regExp:sl}:{optimize:xr,regExp:sl},loopRequired:(ve=re.loopRequired)!==null&&ve!==void 0?ve:$,loopEnum:(Ee=re.loopEnum)!==null&&Ee!==void 0?Ee:$,meta:(Et=re.meta)!==null&&Et!==void 0?Et:!0,messages:(ea=re.messages)!==null&&ea!==void 0?ea:!0,inlineRefs:(Ct=re.inlineRefs)!==null&&Ct!==void 0?Ct:!0,schemaId:(Tt=re.schemaId)!==null&&Tt!==void 0?Tt:"$id",addUsedSchema:(ht=re.addUsedSchema)!==null&&ht!==void 0?ht:!0,validateSchema:(_n=re.validateSchema)!==null&&_n!==void 0?_n:!0,validateFormats:(ta=re.validateFormats)!==null&&ta!==void 0?ta:!0,unicodeRegExp:(Dt=re.unicodeRegExp)!==null&&Dt!==void 0?Dt:!0,int32range:(Ki=re.int32range)!==null&&Ki!==void 0?Ki:!0,uriResolver:cl}}class R{constructor(T={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,T=this.opts={...T,...N(T)};const{es5:L,lines:B}=this.opts.code;this.scope=new p.ValueScope({scope:{},prefixes:z,es5:L,lines:B}),this.logger=Y(T.logger);const O=T.validateFormats;T.validateFormats=!1,this.RULES=(0,u.getRules)(),_.call(this,E,T,"NOT SUPPORTED"),_.call(this,w,T,"DEPRECATED","warn"),this._metaOpts=Z.call(this),T.formats&&U.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),T.keywords&&te.call(this,T.keywords),typeof T.meta=="object"&&this.addMetaSchema(T.meta),C.call(this),T.validateFormats=O}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:T,meta:L,schemaId:B}=this.opts;let O=v;B==="id"&&(O={...v},O.id=O.$id,delete O.$id),L&&T&&this.addMetaSchema(O,O[B],!1)}defaultMeta(){const{meta:T,schemaId:L}=this.opts;return this.opts.defaultMeta=typeof T=="object"?T[L]||T:void 0}validate(T,L){let B;if(typeof T=="string"){if(B=this.getSchema(T),!B)throw new Error(`no schema with key or ref "${T}"`)}else B=this.compile(T);const O=B(L);return"$async"in B||(this.errors=B.errors),O}compile(T,L){const B=this._addSchema(T,L);return B.validate||this._compileSchemaEnv(B)}compileAsync(T,L){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:B}=this.opts;return O.call(this,T,L);async function O(Te,q){await A.call(this,Te.$schema);const Q=this._addSchema(Te,q);return Q.validate||J.call(this,Q)}async function A(Te){Te&&!this.getSchema(Te)&&await O.call(this,{$ref:Te},!0)}async function J(Te){try{return this._compileSchemaEnv(Te)}catch(q){if(!(q instanceof c.default))throw q;return pe.call(this,q),await he.call(this,q.missingSchema),J.call(this,Te)}}function pe({missingSchema:Te,missingRef:q}){if(this.refs[Te])throw new Error(`AnySchema ${Te} is loaded but ${q} cannot be resolved`)}async function he(Te){const q=await Se.call(this,Te);this.refs[Te]||await A.call(this,q.$schema),this.refs[Te]||this.addSchema(q,Te,L)}async function Se(Te){const q=this._loading[Te];if(q)return q;try{return await(this._loading[Te]=B(Te))}finally{delete this._loading[Te]}}}addSchema(T,L,B,O=this.opts.validateSchema){if(Array.isArray(T)){for(const J of T)this.addSchema(J,void 0,B,O);return this}let A;if(typeof T=="object"){const{schemaId:J}=this.opts;if(A=T[J],A!==void 0&&typeof A!="string")throw new Error(`schema ${J} must be string`)}return L=(0,g.normalizeId)(L||A),this._checkUnique(L),this.schemas[L]=this._addSchema(T,B,L,O,!0),this}addMetaSchema(T,L,B=this.opts.validateSchema){return this.addSchema(T,L,!0,B),this}validateSchema(T,L){if(typeof T=="boolean")return!0;let B;if(B=T.$schema,B!==void 0&&typeof B!="string")throw new Error("$schema must be a string");if(B=B||this.opts.defaultMeta||this.defaultMeta(),!B)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const O=this.validate(B,T);if(!O&&L){const A="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(A);else throw new Error(A)}return O}getSchema(T){let L;for(;typeof(L=S.call(this,T))=="string";)T=L;if(L===void 0){const{schemaId:B}=this.opts,O=new d.SchemaEnv({schema:{},schemaId:B});if(L=d.resolveSchema.call(this,O,T),!L)return;this.refs[T]=L}return L.validate||this._compileSchemaEnv(L)}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 L=S.call(this,T);return typeof L=="object"&&this._cache.delete(L.schema),delete this.schemas[T],delete this.refs[T],this}case"object":{const L=T;this._cache.delete(L);let B=T[this.opts.schemaId];return B&&(B=(0,g.normalizeId)(B),delete this.schemas[B],delete this.refs[B]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(T){for(const L of T)this.addKeyword(L);return this}addKeyword(T,L){let B;if(typeof T=="string")B=T,typeof L=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),L.keyword=B);else if(typeof T=="object"&&L===void 0){if(L=T,B=L.keyword,Array.isArray(B)&&!B.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(ie.call(this,B,L),!L)return(0,y.eachItem)(B,A=>_e.call(this,A)),this;fe.call(this,L);const O={...L,type:(0,h.getJSONTypes)(L.type),schemaType:(0,h.getJSONTypes)(L.schemaType)};return(0,y.eachItem)(B,O.type.length===0?A=>_e.call(this,A,O):A=>O.type.forEach(J=>_e.call(this,A,O,J))),this}getKeyword(T){const L=this.RULES.all[T];return typeof L=="object"?L.definition:!!L}removeKeyword(T){const{RULES:L}=this;delete L.keywords[T],delete L.all[T];for(const B of L.rules){const O=B.rules.findIndex(A=>A.keyword===T);O>=0&&B.rules.splice(O,1)}return this}addFormat(T,L){return typeof L=="string"&&(L=new RegExp(L)),this.formats[T]=L,this}errorsText(T=this.errors,{separator:L=", ",dataVar:B="data"}={}){return!T||T.length===0?"No errors":T.map(O=>`${B}${O.instancePath} ${O.message}`).reduce((O,A)=>O+L+A)}$dataMetaSchema(T,L){const B=this.RULES.all;T=JSON.parse(JSON.stringify(T));for(const O of L){const A=O.split("/").slice(1);let J=T;for(const pe of A)J=J[pe];for(const pe in B){const he=B[pe];if(typeof he!="object")continue;const{$data:Se}=he.definition,Te=J[pe];Se&&Te&&(J[pe]=ke(Te))}}return T}_removeAllSchemas(T,L){for(const B in T){const O=T[B];(!L||L.test(B))&&(typeof O=="string"?delete T[B]:O&&!O.meta&&(this._cache.delete(O.schema),delete T[B]))}}_addSchema(T,L,B,O=this.opts.validateSchema,A=this.opts.addUsedSchema){let J;const{schemaId:pe}=this.opts;if(typeof T=="object")J=T[pe];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof T!="boolean")throw new Error("schema must be object or boolean")}let he=this._cache.get(T);if(he!==void 0)return he;B=(0,g.normalizeId)(J||B);const Se=g.getSchemaRefs.call(this,T,B);return he=new d.SchemaEnv({schema:T,schemaId:pe,meta:L,baseId:B,localRefs:Se}),this._cache.set(he.schema,he),A&&!B.startsWith("#")&&(B&&this._checkUnique(B),this.refs[B]=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 L=this.opts;this.opts=this._metaOpts;try{d.compileSchema.call(this,T)}finally{this.opts=L}}}R.ValidationError=l.default,R.MissingRefError=c.default,e.default=R;function _(re,T,L,B="error"){for(const O in re){const A=O;A in T&&this.logger[B](`${L}: option ${O}. ${re[A]}`)}}function S(re){return re=(0,g.normalizeId)(re),this.schemas[re]||this.refs[re]}function C(){const re=this.opts.schemas;if(re)if(Array.isArray(re))this.addSchema(re);else for(const T in re)this.addSchema(re[T],T)}function U(){for(const re in this.opts.formats){const T=this.opts.formats[re];T&&this.addFormat(re,T)}}function te(re){if(Array.isArray(re)){this.addVocabulary(re);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const T in re){const L=re[T];L.keyword||(L.keyword=T),this.addKeyword(L)}}function Z(){const re={...this.opts};for(const T of x)delete re[T];return re}const V={log(){},warn(){},error(){}};function Y(re){if(re===!1)return V;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 G=/^[a-z_$][a-z0-9_$:-]*$/i;function ie(re,T){const{RULES:L}=this;if((0,y.eachItem)(re,B=>{if(L.keywords[B])throw new Error(`Keyword ${B} is already defined`);if(!G.test(B))throw new Error(`Keyword ${B} 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,L){var B;const O=T==null?void 0:T.post;if(L&&O)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:A}=this;let J=O?A.post:A.rules.find(({type:he})=>he===L);if(J||(J={type:L,rules:[]},A.rules.push(J)),A.keywords[re]=!0,!T)return;const pe={keyword:re,definition:{...T,type:(0,h.getJSONTypes)(T.type),schemaType:(0,h.getJSONTypes)(T.schemaType)}};T.before?ae.call(this,J,pe,T.before):J.rules.push(pe),A.all[re]=pe,(B=T.implements)===null||B===void 0||B.forEach(he=>this.addKeyword(he))}function ae(re,T,L){const B=re.rules.findIndex(O=>O.keyword===L);B>=0?re.rules.splice(B,0,T):(re.rules.push(T),this.logger.warn(`rule ${L} is not defined`))}function fe(re){let{metaSchema:T}=re;T!==void 0&&(re.$data&&this.opts.$data&&(T=ke(T)),re.validateSchema=this.compile(T,!0))}const ge={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ke(re){return{anyOf:[re,ge]}}})(gf)),gf}var Ds={},Us={},Is={},Ey;function u6(){if(Ey)return Is;Ey=1,Object.defineProperty(Is,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return Is.default=e,Is}var Kn={},zy;function d6(){if(zy)return Kn;zy=1,Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.callRef=Kn.getValidate=void 0;const e=Ac(),n=Ba(),o=Re(),l=br(),c=np(),u=He(),d={keyword:"$ref",schemaType:"string",code(h){const{gen:y,schema:v,it:j}=h,{baseId:k,schemaEnv:x,validateName:z,opts:E,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,z,x,x.$async);const C=y.scopeValue("root",{ref:$});return g(h,(0,o._)`${C}.validate`,$,$.$async)}function _(C){const U=p(h,C);g(h,U,C,C.$async)}function S(C){const U=y.scopeValue("schema",E.code.source===!0?{ref:C,code:(0,o.stringify)(C)}:{ref:C}),te=y.name("valid"),Z=h.subschema({schema:C,dataTypes:[],schemaPath:o.nil,topSchemaRef:U,errSchemaPath:v},te);h.mergeEvaluated(Z),h.ok(te)}}};function p(h,y){const{gen:v}=h;return y.validate?v.scopeValue("validate",{ref:y.validate}):(0,o._)`${v.scopeValue("wrapper",{ref:y})}.validate`}Kn.getValidate=p;function g(h,y,v,j){const{gen:k,it:x}=h,{allErrors:z,schemaEnv:E,opts:w}=x,$=w.passContext?l.default.this:o.nil;j?N():R();function N(){if(!E.$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),z||k.assign(C,!0)},U=>{k.if((0,o._)`!(${U} instanceof ${x.ValidationError})`,()=>k.throw(U)),_(U),z||k.assign(C,!1)}),h.ok(C)}function R(){h.result((0,n.callValidateCode)(h,y,$),()=>S(y),()=>_(y))}function _(C){const U=(0,o._)`${C}.errors`;k.assign(l.default.vErrors,(0,o._)`${l.default.vErrors} === null ? ${U} : ${l.default.vErrors}.concat(${U})`),k.assign(l.default.errors,(0,o._)`${l.default.vErrors}.length`)}function S(C){var U;if(!x.opts.unevaluated)return;const te=(U=v==null?void 0:v.validate)===null||U===void 0?void 0:U.evaluated;if(x.props!==!0)if(te&&!te.dynamicProps)te.props!==void 0&&(x.props=u.mergeEvaluated.props(k,te.props,x.props));else{const Z=k.var("props",(0,o._)`${C}.evaluated.props`);x.props=u.mergeEvaluated.props(k,Z,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 Z=k.var("items",(0,o._)`${C}.evaluated.items`);x.items=u.mergeEvaluated.items(k,Z,x.items,o.Name)}}}return Kn.callRef=g,Kn.default=d,Kn}var Cy;function f6(){if(Cy)return Us;Cy=1,Object.defineProperty(Us,"__esModule",{value:!0});const e=u6(),n=d6(),o=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,n.default];return Us.default=o,Us}var Bs={},Ls={},Ty;function p6(){if(Ty)return Ls;Ty=1,Object.defineProperty(Ls,"__esModule",{value:!0});const e=Re(),n=e.operators,o={maximum:{okStr:"<=",ok:n.LTE,fail:n.GT},minimum:{okStr:">=",ok:n.GTE,fail:n.LT},exclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},exclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}},l={message:({keyword:u,schemaCode:d})=>(0,e.str)`must be ${o[u].okStr} ${d}`,params:({keyword:u,schemaCode:d})=>(0,e._)`{comparison: ${o[u].okStr}, limit: ${d}}`},c={keyword:Object.keys(o),type:"number",schemaType:"number",$data:!0,error:l,code(u){const{keyword:d,data:p,schemaCode:g}=u;u.fail$data((0,e._)`${p} ${o[d].fail} ${g} || isNaN(${p})`)}};return Ls.default=c,Ls}var Fs={},My;function g6(){if(My)return Fs;My=1,Object.defineProperty(Fs,"__esModule",{value:!0});const e=Re(),o={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:l})=>(0,e.str)`must be multiple of ${l}`,params:({schemaCode:l})=>(0,e._)`{multipleOf: ${l}}`},code(l){const{gen:c,data:u,schemaCode:d,it:p}=l,g=p.opts.multipleOfPrecision,h=c.let("res"),y=g?(0,e._)`Math.abs(Math.round(${h}) - ${h}) > 1e-${g}`:(0,e._)`${h} !== parseInt(${h})`;l.fail$data((0,e._)`(${d} === 0 || (${h} = ${u}/${d}, ${y}))`)}};return Fs.default=o,Fs}var Vs={},Hs={},Oy;function A$(){if(Oy)return Hs;Oy=1,Object.defineProperty(Hs,"__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 Hs.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',Hs}var Ry;function m6(){if(Ry)return Vs;Ry=1,Object.defineProperty(Vs,"__esModule",{value:!0});const e=Re(),n=He(),o=A$(),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 Vs.default=c,Vs}var qs={},Ay;function h6(){if(Ay)return qs;Ay=1,Object.defineProperty(qs,"__esModule",{value:!0});const e=Ba(),n=He(),o=Re(),c={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:u})=>(0,o.str)`must match pattern "${u}"`,params:({schemaCode:u})=>(0,o._)`{pattern: ${u}}`},code(u){const{gen:d,data:p,$data:g,schema:h,schemaCode:y,it:v}=u,j=v.opts.unicodeRegExp?"u":"";if(g){const{regExp:k}=v.opts.code,x=k.code==="new RegExp"?(0,o._)`new RegExp`:(0,n.useFunc)(d,k),z=d.let("valid");d.try(()=>d.assign(z,(0,o._)`${x}(${y}, ${j}).test(${p})`),()=>d.assign(z,!1)),u.fail$data((0,o._)`!${z}`)}else{const k=(0,e.usePattern)(u,h);u.fail$data((0,o._)`!${k}.test(${p})`)}}};return qs.default=c,qs}var Ps={},Dy;function y6(){if(Dy)return Ps;Dy=1,Object.defineProperty(Ps,"__esModule",{value:!0});const e=Re(),o={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:l,schemaCode:c}){const u=l==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${u} than ${c} properties`},params:({schemaCode:l})=>(0,e._)`{limit: ${l}}`},code(l){const{keyword:c,data:u,schemaCode:d}=l,p=c==="maxProperties"?e.operators.GT:e.operators.LT;l.fail$data((0,e._)`Object.keys(${u}).length ${p} ${d}`)}};return Ps.default=o,Ps}var Zs={},Uy;function v6(){if(Uy)return Zs;Uy=1,Object.defineProperty(Zs,"__esModule",{value:!0});const e=Ba(),n=Re(),o=He(),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():z(),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,E);else for(const $ of p)(0,e.checkReportMissingProp)(u,$)}function z(){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 E(){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 Zs.default=c,Zs}var Gs={},Iy;function $6(){if(Iy)return Gs;Iy=1,Object.defineProperty(Gs,"__esModule",{value:!0});const e=Re(),o={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:l,schemaCode:c}){const u=l==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${u} than ${c} items`},params:({schemaCode:l})=>(0,e._)`{limit: ${l}}`},code(l){const{keyword:c,data:u,schemaCode:d}=l,p=c==="maxItems"?e.operators.GT:e.operators.LT;l.fail$data((0,e._)`${u}.length ${p} ${d}`)}};return Gs.default=o,Gs}var Ys={},Ks={},By;function Dc(){if(By)return Ks;By=1,Object.defineProperty(Ks,"__esModule",{value:!0});const e=O$();return e.code='require("ajv/dist/runtime/equal").default',Ks.default=e,Ks}var Ly;function b6(){if(Ly)return Ys;Ly=1,Object.defineProperty(Ys,"__esModule",{value:!0});const e=kc(),n=Re(),o=He(),l=Dc(),u={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:d,j:p}})=>(0,n.str)`must NOT have duplicate items (items ## ${p} and ${d} are identical)`,params:({params:{i:d,j:p}})=>(0,n._)`{i: ${d}, j: ${p}}`},code(d){const{gen:p,data:g,$data:h,schema:y,parentSchema:v,schemaCode:j,it:k}=d;if(!h&&!y)return;const x=p.let("valid"),z=v.items?(0,e.getSchemaTypes)(v.items):[];d.block$data(x,E,(0,n._)`${j} === false`),d.ok(x);function E(){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 z.length>0&&!z.some(R=>R==="object"||R==="array")}function $(R,_){const S=p.name("item"),C=(0,e.checkDataTypes)(z,S,k.opts.strictNumbers,e.DataType.Wrong),U=p.const("indices",(0,n._)`{}`);p.for((0,n._)`;${R}--;`,()=>{p.let(S,(0,n._)`${g}[${R}]`),p.if(C,(0,n._)`continue`),z.length>1&&p.if((0,n._)`typeof ${S} == "string"`,(0,n._)`${S} += "_"`),p.if((0,n._)`typeof ${U}[${S}] == "number"`,()=>{p.assign(_,(0,n._)`${U}[${S}]`),d.error(),p.assign(x,!1).break()}).code((0,n._)`${U}[${S}] = ${R}`)})}function N(R,_){const S=(0,o.useFunc)(p,l.default),C=p.name("outer");p.label(C).for((0,n._)`;${R}--;`,()=>p.for((0,n._)`${_} = ${R}; ${_}--;`,()=>p.if((0,n._)`${S}(${g}[${R}], ${g}[${_}])`,()=>{d.error(),p.assign(x,!1).break(C)})))}}};return Ys.default=u,Ys}var Js={},Fy;function x6(){if(Fy)return Js;Fy=1,Object.defineProperty(Js,"__esModule",{value:!0});const e=Re(),n=He(),o=Dc(),c={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:u})=>(0,e._)`{allowedValue: ${u}}`},code(u){const{gen:d,data:p,$data:g,schemaCode:h,schema:y}=u;g||y&&typeof y=="object"?u.fail$data((0,e._)`!${(0,n.useFunc)(d,o.default)}(${p}, ${h})`):u.fail((0,e._)`${y} !== ${p}`)}};return Js.default=c,Js}var Xs={},Vy;function _6(){if(Vy)return Xs;Vy=1,Object.defineProperty(Xs,"__esModule",{value:!0});const e=Re(),n=He(),o=Dc(),c={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:u})=>(0,e._)`{allowedValues: ${u}}`},code(u){const{gen:d,data:p,$data:g,schema:h,schemaCode:y,it:v}=u;if(!g&&h.length===0)throw new Error("enum must have non-empty array");const j=h.length>=v.opts.loopEnum;let k;const x=()=>k??(k=(0,n.useFunc)(d,o.default));let z;if(j||g)z=d.let("valid"),u.block$data(z,E);else{if(!Array.isArray(h))throw new Error("ajv implementation error");const $=d.const("vSchema",y);z=(0,e.or)(...h.map((N,R)=>w($,R)))}u.pass(z);function E(){d.assign(z,!1),d.forOf("v",y,$=>d.if((0,e._)`${x()}(${p}, ${$})`,()=>d.assign(z,!0).break()))}function w($,N){const R=h[N];return typeof R=="object"&&R!==null?(0,e._)`${x()}(${p}, ${$}[${N}])`:(0,e._)`${p} === ${R}`}}};return Xs.default=c,Xs}var Hy;function j6(){if(Hy)return Bs;Hy=1,Object.defineProperty(Bs,"__esModule",{value:!0});const e=p6(),n=g6(),o=m6(),l=h6(),c=y6(),u=v6(),d=$6(),p=b6(),g=x6(),h=_6(),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 Bs.default=y,Bs}var Ws={},Oi={},qy;function D$(){if(qy)return Oi;qy=1,Object.defineProperty(Oi,"__esModule",{value:!0}),Oi.validateAdditionalItems=void 0;const e=Re(),n=He(),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,z=>{u.subschema({keyword:y,dataProp:z,dataPropType:n.Type.Num},x),v.allErrors||p.if((0,e.not)(x),()=>p.break())})}}return Oi.validateAdditionalItems=c,Oi.default=l,Oi}var Qs={},Ri={},Py;function U$(){if(Py)return Ri;Py=1,Object.defineProperty(Ri,"__esModule",{value:!0}),Ri.validateTuple=void 0;const e=Re(),n=He(),o=Ba(),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;z(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((E,w)=>{(0,n.alwaysValidSchema)(j,E)||(g.if((0,e._)`${x} > ${w}`,()=>u.subschema({keyword:v,schemaProp:w,dataProp:w},k)),u.ok(k))});function z(E){const{opts:w,errSchemaPath:$}=j,N=p.length,R=N===E.minItems&&(N===E.maxItems||E[d]===!1);if(w.strictTuples&&!R){const _=`"${v}" is ${N}-tuple, but minItems or maxItems/${d} are not specified or different at path "${$}"`;(0,n.checkStrictMode)(j,_,w.strictTuples)}}}return Ri.validateTuple=c,Ri.default=l,Ri}var Zy;function S6(){if(Zy)return Qs;Zy=1,Object.defineProperty(Qs,"__esModule",{value:!0});const e=U$(),n={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:o=>(0,e.validateTuple)(o,"items")};return Qs.default=n,Qs}var ec={},Gy;function w6(){if(Gy)return ec;Gy=1,Object.defineProperty(ec,"__esModule",{value:!0});const e=Re(),n=He(),o=Ba(),l=D$(),u={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:d}})=>(0,e.str)`must NOT have more than ${d} items`,params:({params:{len:d}})=>(0,e._)`{limit: ${d}}`},code(d){const{schema:p,parentSchema:g,it:h}=d,{prefixItems:y}=g;h.items=!0,!(0,n.alwaysValidSchema)(h,p)&&(y?(0,l.validateAdditionalItems)(d,y):d.ok((0,o.validateArray)(d)))}};return ec.default=u,ec}var tc={},Yy;function k6(){if(Yy)return tc;Yy=1,Object.defineProperty(tc,"__esModule",{value:!0});const e=Re(),n=He(),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 z=u.name("valid");v===void 0&&y===1?w(z,()=>u.if(z,()=>u.break())):y===0?(u.let(z,!0),v!==void 0&&u.if((0,e._)`${g}.length > 0`,E)):(u.let(z,!1),E()),c.result(z,()=>c.reset());function E(){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(z,!0).break()):(u.if((0,e._)`${N} > ${v}`,()=>u.assign(z,!1).break()),y===1?u.assign(z,!0):u.if((0,e._)`${N} >= ${y}`,()=>u.assign(z,!0)))}}};return tc.default=l,tc}var jf={},Ky;function N6(){return Ky||(Ky=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const n=Re(),o=He(),l=Ba();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 z=h[x];if(z.length===0)continue;const E=(0,l.propertyInData)(y,v,x,j.opts.ownProperties);g.setParams({property:x,depsCount:z.length,deps:z.join(", ")}),j.allErrors?y.if(E,()=>{for(const w of z)(0,l.checkReportMissingProp)(g,w)}):(y.if((0,n._)`${E} && (${(0,l.checkMissingProp)(g,z,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 z in h)(0,o.alwaysValidSchema)(k,h[z])||(y.if((0,l.propertyInData)(y,v,z,k.opts.ownProperties),()=>{const E=g.subschema({keyword:j,schemaProp:z},x);g.mergeValidEvaluated(E,x)},()=>y.var(x,!0)),g.ok(x))}e.validateSchemaDeps=p,e.default=c})(jf)),jf}var ac={},Jy;function E6(){if(Jy)return ac;Jy=1,Object.defineProperty(ac,"__esModule",{value:!0});const e=Re(),n=He(),l={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:c})=>(0,e._)`{propertyName: ${c.propertyName}}`},code(c){const{gen:u,schema:d,data:p,it:g}=c;if((0,n.alwaysValidSchema)(g,d))return;const h=u.name("valid");u.forIn("key",p,y=>{c.setParams({propertyName:y}),c.subschema({keyword:"propertyNames",data:y,dataTypes:["string"],propertyName:y,compositeRule:!0},h),u.if((0,e.not)(h),()=>{c.error(!0),g.allErrors||u.break()})}),c.ok(h)}};return ac.default=l,ac}var nc={},Xy;function I$(){if(Xy)return nc;Xy=1,Object.defineProperty(nc,"__esModule",{value:!0});const e=Ba(),n=Re(),o=br(),l=He(),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 z=(0,e.allSchemaProperties)(h.properties),E=(0,e.allSchemaProperties)(h.patternProperties);w(),d.ok((0,n._)`${v} === ${o.default.errors}`);function w(){p.forIn("key",y,S=>{!z.length&&!E.length?R(S):p.if($(S),()=>R(S))})}function $(S){let C;if(z.length>8){const U=(0,l.schemaRefOrVal)(j,h.properties,"properties");C=(0,e.isOwnProperty)(p,U,S)}else z.length?C=(0,n.or)(...z.map(U=>(0,n._)`${S} === ${U}`)):C=n.nil;return E.length&&(C=(0,n.or)(C,...E.map(U=>(0,n._)`${(0,e.usePattern)(d,U)}.test(${S})`))),(0,n.not)(C)}function N(S){p.code((0,n._)`delete ${y}[${S}]`)}function R(S){if(x.removeAdditional==="all"||x.removeAdditional&&g===!1){N(S);return}if(g===!1){d.setParams({additionalProperty:S}),d.error(),k||p.break();return}if(typeof g=="object"&&!(0,l.alwaysValidSchema)(j,g)){const C=p.name("valid");x.removeAdditional==="failing"?(_(S,C,!1),p.if((0,n.not)(C),()=>{d.reset(),N(S)})):(_(S,C),k||p.if((0,n.not)(C),()=>p.break()))}}function _(S,C,U){const te={keyword:"additionalProperties",dataProp:S,dataPropType:l.Type.Str};U===!1&&Object.assign(te,{compositeRule:!0,createErrors:!1,allErrors:!1}),d.subschema(te,C)}}};return nc.default=u,nc}var rc={},Wy;function z6(){if(Wy)return rc;Wy=1,Object.defineProperty(rc,"__esModule",{value:!0});const e=Rc(),n=Ba(),o=He(),l=I$(),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 E of v)y.definedProperties.add(E);y.opts.unevaluated&&v.length&&y.props!==!0&&(y.props=o.mergeEvaluated.props(d,(0,o.toHash)(v),y.props));const j=v.filter(E=>!(0,o.alwaysValidSchema)(y,p[E]));if(j.length===0)return;const k=d.name("valid");for(const E of j)x(E)?z(E):(d.if((0,n.propertyInData)(d,h,E,y.opts.ownProperties)),z(E),y.allErrors||d.else().var(k,!0),d.endIf()),u.it.definedProperties.add(E),u.ok(k);function x(E){return y.opts.useDefaults&&!y.compositeRule&&p[E].default!==void 0}function z(E){u.subschema({keyword:"properties",schemaProp:E,dataProp:E},k)}}};return rc.default=c,rc}var ic={},Qy;function C6(){if(Qy)return ic;Qy=1,Object.defineProperty(ic,"__esModule",{value:!0});const e=Ba(),n=Re(),o=He(),l=He(),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,z=d.name("valid");y.props!==!0&&!(y.props instanceof n.Name)&&(y.props=(0,l.evaluatedPropsToName)(d,y.props));const{props:E}=y;w();function w(){for(const R of j)x&&$(R),y.allErrors?N(R):(d.var(z,!0),N(R),d.if(z))}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},z),y.opts.unevaluated&&E!==!0?d.assign((0,n._)`${E}[${_}]`,!0):!S&&!y.allErrors&&d.if((0,n.not)(z),()=>d.break())})})}}};return ic.default=c,ic}var oc={},ev;function T6(){if(ev)return oc;ev=1,Object.defineProperty(oc,"__esModule",{value:!0});const e=He(),n={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(o){const{gen:l,schema:c,it:u}=o;if((0,e.alwaysValidSchema)(u,c)){o.fail();return}const d=l.name("valid");o.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},d),o.failResult(d,()=>o.reset(),()=>o.error())},error:{message:"must NOT be valid"}};return oc.default=n,oc}var lc={},tv;function M6(){if(tv)return lc;tv=1,Object.defineProperty(lc,"__esModule",{value:!0});const n={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Ba().validateUnion,error:{message:"must match a schema in anyOf"}};return lc.default=n,lc}var sc={},av;function O6(){if(av)return sc;av=1,Object.defineProperty(sc,"__esModule",{value:!0});const e=Re(),n=He(),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,z)=>{let E;(0,n.alwaysValidSchema)(g,x)?u.var(j,!0):E=c.subschema({keyword:"oneOf",schemaProp:z,compositeRule:!0},j),z>0&&u.if((0,e._)`${j} && ${y}`).assign(y,!1).assign(v,(0,e._)`[${v}, ${z}]`).else(),u.if(j,()=>{u.assign(y,!0),u.assign(v,z),E&&c.mergeEvaluated(E,e.Name)})})}}};return sc.default=l,sc}var cc={},nv;function R6(){if(nv)return cc;nv=1,Object.defineProperty(cc,"__esModule",{value:!0});const e=He(),n={keyword:"allOf",schemaType:"array",code(o){const{gen:l,schema:c,it:u}=o;if(!Array.isArray(c))throw new Error("ajv implementation error");const d=l.name("valid");c.forEach((p,g)=>{if((0,e.alwaysValidSchema)(u,p))return;const h=o.subschema({keyword:"allOf",schemaProp:g},d);o.ok(d),o.mergeEvaluated(h)})}};return cc.default=n,cc}var uc={},rv;function A6(){if(rv)return uc;rv=1,Object.defineProperty(uc,"__esModule",{value:!0});const e=Re(),n=He(),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 z=d.let("ifClause");u.setParams({ifClause:z}),d.if(j,x("then",z),x("else",z))}else h?d.if(j,x("then")):d.if((0,e.not)(j),x("else"));u.pass(v,()=>u.error(!0));function k(){const z=u.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},j);u.mergeEvaluated(z)}function x(z,E){return()=>{const w=u.subschema({keyword:z},j);d.assign(v,j),u.mergeValidEvaluated(w,v),E?d.assign(E,(0,e._)`${z}`):u.setParams({ifClause:z})}}}};function c(u,d){const p=u.schema[d];return p!==void 0&&!(0,n.alwaysValidSchema)(u,p)}return uc.default=l,uc}var dc={},iv;function D6(){if(iv)return dc;iv=1,Object.defineProperty(dc,"__esModule",{value:!0});const e=He(),n={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:o,parentSchema:l,it:c}){l.if===void 0&&(0,e.checkStrictMode)(c,`"${o}" without "if" is ignored`)}};return dc.default=n,dc}var ov;function U6(){if(ov)return Ws;ov=1,Object.defineProperty(Ws,"__esModule",{value:!0});const e=D$(),n=S6(),o=U$(),l=w6(),c=k6(),u=N6(),d=E6(),p=I$(),g=z6(),h=C6(),y=T6(),v=M6(),j=O6(),k=R6(),x=A6(),z=D6();function E(w=!1){const $=[y.default,v.default,j.default,k.default,x.default,z.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 Ws.default=E,Ws}var fc={},pc={},lv;function I6(){if(lv)return pc;lv=1,Object.defineProperty(pc,"__esModule",{value:!0});const e=Re(),o={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:l})=>(0,e.str)`must match format "${l}"`,params:({schemaCode:l})=>(0,e._)`{format: ${l}}`},code(l,c){const{gen:u,data:d,$data:p,schema:g,schemaCode:h,it:y}=l,{opts:v,errSchemaPath:j,schemaEnv:k,self:x}=y;if(!v.validateFormats)return;p?z():E();function z(){const w=u.scopeValue("formats",{ref:x.formats,code:v.code.formats}),$=u.const("fDef",(0,e._)`${w}[${h}]`),N=u.let("fType"),R=u.let("format");u.if((0,e._)`typeof ${$} == "object" && !(${$} instanceof RegExp)`,()=>u.assign(N,(0,e._)`${$}.type || "string"`).assign(R,(0,e._)`${$}.validate`),()=>u.assign(N,(0,e._)`"string"`).assign(R,$)),l.fail$data((0,e.or)(_(),S()));function _(){return v.strictSchema===!1?e.nil:(0,e._)`${h} && !${R}`}function S(){const C=k.$async?(0,e._)`(${$}.async ? await ${R}(${d}) : ${R}(${d}))`:(0,e._)`${R}(${d})`,U=(0,e._)`(typeof ${R} == "function" ? ${C} : ${R}.test(${d}))`;return(0,e._)`${R} && ${R} !== true && ${N} === ${c} && !${U}`}}function E(){const w=x.formats[g];if(!w){_();return}if(w===!0)return;const[$,N,R]=S(w);$===c&&l.pass(C());function _(){if(v.strictSchema===!1){x.logger.warn(U());return}throw new Error(U());function U(){return`unknown format "${g}" ignored in schema at path "${j}"`}}function S(U){const te=U instanceof RegExp?(0,e.regexpCode)(U):v.code.formats?(0,e._)`${v.code.formats}${(0,e.getProperty)(g)}`:void 0,Z=u.scopeValue("formats",{key:g,ref:U,code:te});return typeof U=="object"&&!(U instanceof RegExp)?[U.type||"string",U.validate,(0,e._)`${Z}.validate`]:["string",U,Z]}function C(){if(typeof w=="object"&&!(w instanceof RegExp)&&w.async){if(!k.$async)throw new Error("async format in sync schema");return(0,e._)`await ${R}(${d})`}return typeof N=="function"?(0,e._)`${R}(${d})`:(0,e._)`${R}.test(${d})`}}}};return pc.default=o,pc}var sv;function B6(){if(sv)return fc;sv=1,Object.defineProperty(fc,"__esModule",{value:!0});const n=[I6().default];return fc.default=n,fc}var Vr={},cv;function L6(){return cv||(cv=1,Object.defineProperty(Vr,"__esModule",{value:!0}),Vr.contentVocabulary=Vr.metadataVocabulary=void 0,Vr.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Vr.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Vr}var uv;function F6(){if(uv)return Ds;uv=1,Object.defineProperty(Ds,"__esModule",{value:!0});const e=f6(),n=j6(),o=U6(),l=B6(),c=L6(),u=[e.default,n.default,(0,o.default)(),l.default,c.metadataVocabulary,c.contentVocabulary];return Ds.default=u,Ds}var gc={},Go={},dv;function V6(){if(dv)return Go;dv=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.DiscrError=void 0;var e;return(function(n){n.Tag="tag",n.Mapping="mapping"})(e||(Go.DiscrError=e={})),Go}var fv;function H6(){if(fv)return gc;fv=1,Object.defineProperty(gc,"__esModule",{value:!0});const e=Re(),n=V6(),o=np(),l=Ac(),c=He(),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 z=g.let("valid",!1),E=g.const("tag",(0,e._)`${h}${(0,e.getProperty)(x)}`);g.if((0,e._)`typeof ${E} == "string"`,()=>w(),()=>p.error(!1,{discrError:n.DiscrError.Tag,tag:E,tagName:x})),p.ok(z);function w(){const R=N();g.if(!1);for(const _ in R)g.elseIf((0,e._)`${E} === ${_}`),g.assign(z,$(R[_]));g.else(),p.error(!1,{discrError:n.DiscrError.Mapping,tag:E,tagName:x}),g.endIf()}function $(R){const _=g.name("valid"),S=p.subschema({keyword:"oneOf",schemaProp:R},_);return p.mergeEvaluated(S,e.Name),_}function N(){var R;const _={},S=U(v);let C=!0;for(let V=0;V<k.length;V++){let Y=k[V];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 G=(R=Y==null?void 0:Y.properties)===null||R===void 0?void 0:R[x];if(typeof G!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${x}"`);C=C&&(S||U(Y)),te(G,V)}if(!C)throw new Error(`discriminator: "${x}" must be required`);return _;function U({required:V}){return Array.isArray(V)&&V.includes(x)}function te(V,Y){if(V.const)Z(V.const,Y);else if(V.enum)for(const G of V.enum)Z(G,Y);else throw new Error(`discriminator: "properties/${x}" must have "const" or "enum"`)}function Z(V,Y){if(typeof V!="string"||V in _)throw new Error(`discriminator: "${x}" values must be unique strings`);_[V]=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:[]}},Y6=["object","boolean"],K6={$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:"#"}},J6={$schema:q6,$id:P6,title:Z6,definitions:G6,type:Y6,properties:K6,default:!0};var pv;function B$(){return pv||(pv=1,(function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.MissingRefError=n.ValidationError=n.CodeGen=n.Name=n.nil=n.stringify=n.str=n._=n.KeywordCxt=n.Ajv=void 0;const o=c6(),l=F6(),c=H6(),u=J6,d=["/properties"],p="http://json-schema.org/draft-07/schema";class g extends o.default{_addVocabularies(){super._addVocabularies(),l.default.forEach(x=>this.addVocabulary(x)),this.opts.discriminator&&this.addKeyword(c.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const x=this.opts.$data?this.$dataMetaSchema(u,d):u;this.addMetaSchema(x,p,!1),this.refs["http://json-schema.org/schema"]=p}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(p)?p:void 0)}}n.Ajv=g,e.exports=n=g,e.exports.Ajv=g,Object.defineProperty(n,"__esModule",{value:!0}),n.default=g;var h=Rc();Object.defineProperty(n,"KeywordCxt",{enumerable:!0,get:function(){return h.KeywordCxt}});var y=Re();Object.defineProperty(n,"_",{enumerable:!0,get:function(){return y._}}),Object.defineProperty(n,"str",{enumerable:!0,get:function(){return y.str}}),Object.defineProperty(n,"stringify",{enumerable:!0,get:function(){return y.stringify}}),Object.defineProperty(n,"nil",{enumerable:!0,get:function(){return y.nil}}),Object.defineProperty(n,"Name",{enumerable:!0,get:function(){return y.Name}}),Object.defineProperty(n,"CodeGen",{enumerable:!0,get:function(){return y.CodeGen}});var v=ap();Object.defineProperty(n,"ValidationError",{enumerable:!0,get:function(){return v.default}});var j=Ac();Object.defineProperty(n,"MissingRefError",{enumerable:!0,get:function(){return j.default}})})(Ts,Ts.exports)),Ts.exports}var X6=B$();const rp=al(X6);var mc={exports:{}},Sf={},gv;function W6(){return gv||(gv=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function n(V,Y){return{validate:V,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:Z,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:N,int32:{type:"number",validate:S},int64:{type:"number",validate:C},float:{type:"number",validate:U},double:{type:"number",validate:U},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:n(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,d),time:n(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,h),"date-time":n(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,k),"iso-time":n(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,y),"iso-date-time":n(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,x),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function o(V){return V%4===0&&(V%100!==0||V%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(V){const Y=l.exec(V);if(!Y)return!1;const G=+Y[1],ie=+Y[2],_e=+Y[3];return ie>=1&&ie<=12&&_e>=1&&_e<=(ie===2&&o(G)?29:c[ie])}function d(V,Y){if(V&&Y)return V>Y?1:V<Y?-1:0}const p=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function g(V){return function(G){const ie=p.exec(G);if(!ie)return!1;const _e=+ie[1],ae=+ie[2],fe=+ie[3],ge=ie[4],ke=ie[5]==="-"?-1:1,re=+(ie[6]||0),T=+(ie[7]||0);if(re>23||T>59||V&&!ge)return!1;if(_e<=23&&ae<=59&&fe<60)return!0;const L=ae-T*ke,B=_e-re*ke-(L<0?1:0);return(B===23||B===-1)&&(L===59||L===-1)&&fe<61}}function h(V,Y){if(!(V&&Y))return;const G=new Date("2020-01-01T"+V).valueOf(),ie=new Date("2020-01-01T"+Y).valueOf();if(G&&ie)return G-ie}function y(V,Y){if(!(V&&Y))return;const G=p.exec(V),ie=p.exec(Y);if(G&&ie)return V=G[1]+G[2]+G[3],Y=ie[1]+ie[2]+ie[3],V>Y?1:V<Y?-1:0}const v=/t|\s/i;function j(V){const Y=g(V);return function(ie){const _e=ie.split(v);return _e.length===2&&u(_e[0])&&Y(_e[1])}}function k(V,Y){if(!(V&&Y))return;const G=new Date(V).valueOf(),ie=new Date(Y).valueOf();if(G&&ie)return G-ie}function x(V,Y){if(!(V&&Y))return;const[G,ie]=V.split(v),[_e,ae]=Y.split(v),fe=d(G,_e);if(fe!==void 0)return fe||h(ie,ae)}const z=/\/|:/,E=/^(?:[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(V){return z.test(V)&&E.test(V)}const $=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function N(V){return $.lastIndex=0,$.test(V)}const R=-2147483648,_=2**31-1;function S(V){return Number.isInteger(V)&&V<=_&&V>=R}function C(V){return Number.isInteger(V)}function U(){return!0}const te=/[^\\]\\Z/;function Z(V){if(te.test(V))return!1;try{return new RegExp(V),!0}catch{return!1}}})(Sf)),Sf}var wf={},mv;function Q6(){return mv||(mv=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const n=B$(),o=Re(),l=o.operators,c={formatMaximum:{okStr:"<=",ok:l.LTE,fail:l.GT},formatMinimum:{okStr:">=",ok:l.GTE,fail:l.LT},formatExclusiveMaximum:{okStr:"<",ok:l.LT,fail:l.GTE},formatExclusiveMinimum:{okStr:">",ok:l.GT,fail:l.LTE}},u={message:({keyword:p,schemaCode:g})=>(0,o.str)`should be ${c[p].okStr} ${g}`,params:({keyword:p,schemaCode:g})=>(0,o._)`{comparison: ${c[p].okStr}, limit: ${g}}`};e.formatLimitDefinition={keyword:Object.keys(c),type:"string",schemaType:"string",$data:!0,error:u,code(p){const{gen:g,data:h,schemaCode:y,keyword:v,it:j}=p,{opts:k,self:x}=j;if(!k.validateFormats)return;const z=new n.KeywordCxt(j,x.RULES.all.format.definition,"format");z.$data?E():w();function E(){const N=g.scopeValue("formats",{ref:x.formats,code:k.code.formats}),R=g.const("fmt",(0,o._)`${N}[${z.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=z.schema,R=x.formats[N];if(!R||R===!0)return;if(typeof R!="object"||R instanceof RegExp||typeof R.compare!="function")throw new Error(`"${v}": format "${N}" does not define "compare" function`);const _=g.scopeValue("formats",{key:N,ref:R,code:k.code.formats?(0,o._)`${k.code.formats}${(0,o.getProperty)(N)}`:void 0});p.fail$data($(_))}function $(N){return(0,o._)`${N}.compare(${h}, ${y}) ${c[v].fail} 0`}},dependencies:["format"]};const d=p=>(p.addKeyword(e.formatLimitDefinition),p);e.default=d})(wf)),wf}var hv;function e8(){return hv||(hv=1,(function(e,n){Object.defineProperty(n,"__esModule",{value:!0});const o=W6(),l=Q6(),c=Re(),u=new c.Name("fullFormats"),d=new c.Name("fastFormats"),p=(h,y={keywords:!0})=>{if(Array.isArray(y))return g(h,y,o.fullFormats,u),h;const[v,j]=y.mode==="fast"?[o.fastFormats,d]:[o.fullFormats,u],k=y.formats||o.formatNames;return g(h,k,v,j),y.keywords&&(0,l.default)(h),h};p.get=(h,y="full")=>{const j=(y==="fast"?o.fastFormats:o.fullFormats)[h];if(!j)throw new Error(`Unknown format "${h}"`);return j};function g(h,y,v,j){var k,x;(k=(x=h.opts.code).formats)!==null&&k!==void 0||(x.formats=(0,c._)`require("ajv-formats/dist/formats").${j}`);for(const z of y)h.addFormat(z,v[z])}e.exports=n=p,Object.defineProperty(n,"__esModule",{value:!0}),n.default=p})(mc,mc.exports)),mc.exports}var t8=e8();const ip=al(t8);var a8=Dc();const n8=al(a8);var r8=A$();const i8=al(r8);function L$(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")}L$(n8).toString();L$(i8).toString();const op={strict:!0,allErrors:!0,useDefaults:!1,coerceTypes:!1,removeAdditional:!1,verbose:!0},Hi=new rp({...op});ip(Hi);Hi.getKeyword("example")||Hi.addKeyword({keyword:"example"});Hi.getKeyword("nullable")||Hi.addKeyword({keyword:"nullable"});const Qo=new rp({...op,code:{source:!0,esm:!0}});ip(Qo);Qo.getKeyword("example")||Qo.addKeyword({keyword:"example"});Qo.getKeyword("nullable")||Qo.addKeyword({keyword:"nullable"});const el=new rp({...op,code:{source:!0}});ip(el);el.getKeyword("example")||el.addKeyword({keyword:"example"});el.getKeyword("nullable")||el.addKeyword({keyword:"nullable"});function Qn(e){const n=new Set(Array.isArray(e.type)?e.type:e.type?[e.type]:[]);if(n.has("object")||e.properties!==void 0){const l={...e};if(l.properties){const c={};for(const[u,d]of Object.entries(l.properties))c[u]=Qn(d);l.properties=c}return l.additionalProperties===void 0?l.additionalProperties=!1:typeof l.additionalProperties!="boolean"&&(l.additionalProperties=Qn(l.additionalProperties)),l.oneOf&&(l.oneOf=l.oneOf.map(Qn)),l.anyOf&&(l.anyOf=l.anyOf.map(Qn)),l}if(n.has("array")&&e.items)return{...e,items:Qn(e.items)};if(e.oneOf||e.anyOf){const l={...e};return l.oneOf&&(l.oneOf=l.oneOf.map(Qn)),l.anyOf&&(l.anyOf=l.anyOf.map(Qn)),l}return e}function lp(e){const n=Qn(e);return Hi.compile(n)}function sp(e,n){return e?e.map(o=>({...o8(o,n),...o.keyword?{keyword:o.keyword}:{}})):[]}function F$(e,n){return n?e.map(o=>({...o,field:o.field?`${n}.${o.field}`:n})):e}function o8(e,n){const o=l8(e.instancePath);switch(e.keyword){case"additionalProperties":{const c=e.params.additionalProperty??"<unknown>",u=o?`${o}.${c}`:c,d=e.parentSchema,p=d!=null&&d.properties?Object.keys(d.properties):[],g=Yo(n,`${e.instancePath}/${c}`),h=p.length>0?` Declared keys: [${p.join(", ")}].`:" Declared keys: [(none)].";return{field:u,message:`Undeclared field '${c}'${o?` at '${o}'`:""}.${h}`,expected:"<declared key>",received:yv(g)}}case"required":{const c=e.params.missingProperty??"<unknown>";return{field:o?`${o}.${c}`:c,message:`Required field '${c}' missing${o?` at '${o}'`:""}`,expected:"present",received:"undefined"}}case"type":{const l=e.params,c=Array.isArray(l.type)?l.type.join("|"):l.type??"unknown",u=yv(Yo(n,e.instancePath));return{field:o,message:e.message??`Type mismatch at '${o||"<root>"}'`,expected:c,received:u}}case"enum":{const c=e.params.allowedValues??[],u=Yo(n,e.instancePath);return{field:o,message:e.message??`Enum mismatch at '${o||"<root>"}'`,expected:c.map(d=>JSON.stringify(d)).join("|"),received:JSON.stringify(u)}}case"const":{const l=e.params,c=Yo(n,e.instancePath);return{field:o,message:e.message??`Const mismatch at '${o||"<root>"}'`,expected:JSON.stringify(l.allowedValue),received:JSON.stringify(c)}}case"pattern":{const l=e.params,c=Yo(n,e.instancePath);return{field:o,message:e.message??`Pattern mismatch at '${o||"<root>"}'`,expected:l.pattern??"<pattern>",received:typeof c=="string"?c:JSON.stringify(c)}}default:return{field:o,message:e.message??`Validation failed${o?` at '${o}'`:""} (${e.keyword})`}}}function l8(e){if(!e)return"";const n=e.slice(1).split("/");let o="";for(const l of n)/^\d+$/.test(l)?o+=`[${l}]`:o===""?o=l:o+=`.${l}`;return o}function Yo(e,n){if(!n)return e;const o=n.slice(1).split("/");let l=e;for(const c of o){if(l==null)return;if(Array.isArray(l)){const u=Number(c);if(!Number.isInteger(u))return;l=l[u]}else if(Pf(l))l=l[c];else return}return l}function yv(e){return e===null?"null":Array.isArray(e)?"array":typeof e}const vv="_ggui:",s8="_ggui:preview",cp="_ggui:lifecycle",c8=new Set([s8,cp]);function V$(e){return c8.has(e)}const u8=new Map([[cp,d8]]);function d8(e){const n=[];if(!Pf(e))return{valid:!1,violations:[{field:"payload",message:`${cp} payload must be a non-null object`,expected:"object",received:e===null?"null":Array.isArray(e)?"array":typeof e}]};const o=e;if(typeof o.kind!="string")return{valid:!1,violations:[{field:"kind",message:"Required field 'kind' must be a string",expected:"string",received:o.kind===void 0?"undefined":typeof o.kind}]};const l=c=>{typeof o[c]!="string"&&n.push({field:c,message:`Required field '${c}' must be a string`,expected:"string",received:o[c]===void 0?"undefined":typeof o[c]})};switch(o.kind){case"handshake_started":l("handshakeId"),l("intent");break;case"handshake_completed":l("handshakeId"),o.outcome!=="accepted"&&o.outcome!=="amended"&&o.outcome!=="declined"&&o.outcome!=="cached"&&n.push({field:"outcome",message:"Required field 'outcome' must be 'accepted' | 'amended' | 'declined' | 'cached'",expected:"'accepted' | 'amended' | 'declined' | 'cached'",received:o.outcome===void 0?"undefined":String(o.outcome)}),typeof o.genExpected!="boolean"&&n.push({field:"genExpected",message:"Required field 'genExpected' must be a boolean",expected:"boolean",received:o.genExpected===void 0?"undefined":typeof o.genExpected});break;case"render_started":l("sessionId"),l("intent");break;case"consume_polling":l("sessionId"),o.state!=="open"&&n.push({field:"state",message:"Required field 'state' must be 'open'",expected:"'open'",received:o.state===void 0?"undefined":String(o.state)});break;default:n.push({field:"kind",message:`Unknown lifecycle kind '${o.kind}'. Closed union; new kinds bump protocol version.`,expected:"'handshake_started' | 'handshake_completed' | 'render_started' | 'consume_polling'",received:o.kind})}return{valid:n.length===0,violations:n}}function f8(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 p8(e,n,o){const l=lp(f8(n));return l(e)?{valid:!0,violations:[]}:{valid:!1,violations:sp(l.errors,e)}}function $v(e,n,o,l,c){if(V$(e)){const p=l==null?void 0:l.get(e);if(p)return p(n);const g=u8.get(e);return g?g(n):{valid:!0,violations:[]}}const u=[],d=o[e];if(!d)return u.push({field:"channel",message:`Unknown stream channel '${e}'. Declared channels: ${Object.keys(o).join(", ")}`,expected:Object.keys(o).join(" | "),received:e}),{valid:!1,violations:u};if(d.schema&&n!==void 0){const p=lp(d.schema);if(!p(n))for(const h of F$(sp(p.errors,n),`${e}.payload`))u.push(h)}return{valid:u.length===0,violations:u}}function H$(e,n,o){const l=[];if(!Pf(e))return l.push({field:"value",message:"Action payload must be an object with an `action` field",expected:"object",received:bv(e)}),{valid:!1,violations:l};const c=e,u=c.action;if(typeof u!="string"||u.length===0)return l.push({field:"action",message:"Missing or empty `action` identifier",expected:"string",received:bv(u)}),{valid:!1,violations:l};const d=n[u];if(!d)return l.push({field:"action",message:`Unknown action '${u}'. Declared actions: ${Object.keys(n).join(", ")||"(none)"}`,expected:Object.keys(n).join(" | ")||"(none)",received:u}),{valid:!1,violations:l};if(d.schema){const p=lp(d.schema);if(!p(c.data))for(const h of F$(sp(p.errors,c.data),`${u}.data`))l.push(h)}return{valid:l.length===0,violations:l}}function bv(e){return e===null?"null":Array.isArray(e)?"array":typeof e}function g8(e,n,o){return e.type!=="data:submit"?{valid:!0,violations:[]}:n?H$(e.payload,n):{valid:!0,violations:[]}}de({appId:P().min(1).optional().describe("Target app for this curation call. Defaults to the caller's bound app identity; callers not bound to an app must provide it. The deployment's authorization policy decides whether the caller may curate the named app."),contract:il,generator:P().min(1).optional().describe("Generator slug (e.g. `ui-gen-default-haiku-4-5`). When omitted, dispatches through `GeneratorRegistry.defaultGenerator()`."),persona:P().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:P().optional().describe("Free-form aesthetic tag (e.g. 'glassmorphic', 'brutalist', 'editorial'). Persisted on `Blueprint.variance.aesthetic`. Distinct from persona — persona names the user mental model; aesthetic names the visual treatment."),context:mt(P(),bt).optional().describe("Small structured signal carried alongside the persona. Persisted on `Blueprint.variance.context`."),seedPrompt:P().optional().describe("The raw operator prompt that produced this variant. Round-trip input for the variant-selector + audit trail."),setAsOperatorDefault:qt().optional().describe("When true, pins the new blueprint as the operator default for its `(appId, contractHash)` group, clearing any prior default in the same group.")}).strict();de({blueprintId:P().min(1),codeHash:P().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:Ve().min(0).max(1).optional().describe("Advanced generator's iterative-loop validator score (0-1). Absent for default-generator output."),source:N$.describe("Provenance stamped on the persisted `Blueprint.source` — always the `llm` arm on this path: `generator` is the engine slug the dispatch resolved to (stamped from the engine's own metadata claim); `model` is the LLM model id the engine called.")}).strict();de({appId:P().min(1).optional().describe("Target app for this curation call. Defaults to the caller's bound app identity; callers not bound to an app must provide it. The deployment's authorization policy decides whether the caller may curate the named app."),contract:il,componentCode:P().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:P().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:P().optional().describe("Free-form aesthetic tag. Persisted on `Blueprint.variance.aesthetic`."),context:mt(P(),bt).optional().describe("Small structured signal carried alongside the persona. Persisted on `Blueprint.variance.context`."),seedPrompt:P().optional().describe("Optional originating prompt for audit + round-tripping (e.g. the prose the operator originally fed into `*_generate_*` before exporting)."),setAsOperatorDefault:qt().optional().describe("When true, pins the new blueprint as the operator default for its `(appId, contractHash)` group, clearing any prior default in the same group.")}).strict();de({blueprintId:P().min(1),codeHash:P().min(1).describe("Content hash of the persisted code body (full sha256 hex)."),source:E$.describe('Provenance stamped on the persisted `Blueprint.source` — always `{kind: "user"}` on this path: operator-supplied bytes, no LLM dispatch, no engine claim to record.')}).strict();de({appId:P().min(1).optional().describe("Target app for this curation call. Defaults to the caller's bound app identity; callers not bound to an app must provide it. The deployment's authorization policy decides whether the caller may curate the named app."),contractHash:P().min(1).optional().describe("Filter to a single `(appId, contractHash)` group. Combine with `generator` / `persona` to narrow within the group."),generator:P().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:P().optional().describe("Filter on `variance.persona`. Normalized to match persisted form (lowercase+trim)."),intentKeywords:At(P().min(1)).optional().describe("Semantic-search tokens. When set, dispatches through `BlueprintSearch.search()` rather than indexed `list()`.")}).strict();de({blueprints:At(JS)}).strict();de({appId:P().min(1).optional().describe("Target app for this curation call. Defaults to the caller's bound app identity; callers not bound to an app must provide it. The deployment's authorization policy decides whether the caller may curate the named app. Must match the app the addressed blueprint belongs to."),blueprintId:P().min(1),isOperatorDefault:Ge(!0).optional().describe("When `true`, pins this blueprint as the operator default for its `(appId, contractHash)` group. Clears any prior default. Cannot set to `false` — to unpin, set another blueprint in the same group as default, or delete this one."),variance:ol.optional().describe('Partial-merge into the existing variance. Supplied keys overwrite; omitted keys preserve. Pass `{persona: ""}` to clear a persona (handler treats empty string as removal).')}).strict();de({blueprintId:P().min(1),updatedAt:P().min(1)}).strict();de({appId:P().min(1).optional().describe("Target app for this curation call. Defaults to the caller's bound app identity; callers not bound to an app must provide it. The deployment's authorization policy decides whether the caller may curate the named app. Must match the app the addressed blueprint belongs to."),blueprintId:P().min(1)}).strict();de({deleted:Ge(!0)}).strict();function m8(e){return"schemaVersion"in e?e.schemaVersion:Ux}function h8(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=m8(e);return o!==void 0&&(n.schemaVersion=o),n}const q$=D.createContext(null);function Zr(){const e=D.useContext(q$);if(!e)throw new Error("useWireContext must be used within a WireProvider. Ensure the component is rendered inside a GguiWireProvider.");return e}function P$({config:e,children:n}){return i.jsx(q$.Provider,{value:e,children:n})}const kf=new Set;let Nf=!1;function y8(e,n){try{return`${e}::${JSON.stringify(n??null)}`}catch{return null}}function v8(e,n){const o=y8(e,n);return o===null?{suppressed:!1,signature:o}:kf.has(o)?{suppressed:!0,signature:o}:(kf.add(o),Nf||(Nf=!0,queueMicrotask(()=>{kf.clear(),Nf=!1})),{suppressed:!1,signature:o})}function Z$(e){const{dispatch:n,onDispatchSuppressed:o}=Zr();return D.useCallback(l=>{const c=v8(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 $8(e){var c;const n=e.length===0?"Context":e.charAt(0).toUpperCase()+e.slice(1)+"Context",o=(c=globalThis.__ggui__)==null?void 0:c.contexts,l=o==null?void 0:o[n];if(!l)throw new Error(`[ggui] useGguiContext('${e}'): no Context registered. The contract must declare 'contextSpec.${e}' AND the runtime must have synthesized the per-slot React Context at boot. If you see this in production code generated by the LLM, the boilerplate's destructure line drifted from the contract.`);return D.useContext(l)}function G$(e){const{subscribe:n}=Zr(),[o,l]=D.useState(null),[c,u]=D.useState([]),[d,p]=D.useState(!1),g=D.useRef(c);return g.current=c,D.useEffect(()=>n(e,h=>{const y=h.payload;l(y),h.mode==="replace"?u([y]):u([...g.current,y]),h.complete&&p(!0)}),[e,n]),{latest:o,all:c,isComplete:d}}function b8(e){return{useAction:n=>Z$(n),useStream:n=>G$(n)}}function x8(){const{auth:e}=Zr();return e}function _8(){const{app:e}=Zr();return e}function j8(){const{render:e}=Zr();return e}class Y$ extends Error{constructor(o,l,c){super(c?`Client contract violation (${o}): ${c}`:`Client contract violation (${o})`);pn(this,"direction");pn(this,"violations");this.name="ClientContractViolationError",this.direction=o,this.violations=l}}function S8(e,n,o){return e?H$({action:n,data:o},e):{valid:!0,violations:[]}}function w8(e,n,o,l){return V$(n)?$v(n,o,e??{},l):e?$v(n,o,e,l):{valid:!0,violations:[]}}function K$(e){return h8(e)}function J$(e,n){return g8(n,e)}function k8(e,n){return e?p8(n,e):{valid:!0,violations:[]}}const X$=256;class N8{constructor(){pn(this,"listeners",new Map);pn(this,"reservedReplay",new Map)}subscribe(n,o){let l=this.listeners.get(n);if(l===void 0&&(l=new Set,this.listeners.set(n,l)),l.add(o),n.startsWith(vv)){const c=this.reservedReplay.get(n);if(c!==void 0)for(const u of c)o(u)}return()=>{const c=this.listeners.get(n);c!==void 0&&(c.delete(o),c.size===0&&this.listeners.delete(n))}}emit(n){if(n.channel.startsWith(vv)){let l=this.reservedReplay.get(n.channel);l===void 0&&(l=[],this.reservedReplay.set(n.channel,l)),l.push(n),l.length>X$&&l.shift()}const o=this.listeners.get(n.channel);if(o!==void 0)for(const l of o)l(n)}}function E8(e){let n=0;const o=e.nextClientSeq??(()=>(n+=1,n)),l=e.validateEnvelope??J$;return{app:e.app,render:e.render,auth:e.auth,dispatch:(c,u)=>{const d=K$({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 Y$("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 z8=Object.freeze(Object.defineProperty({__proto__:null,ClientContractViolationError:Y$,GguiWireProvider:P$,RESERVED_CHANNEL_REPLAY_MAX:X$,StreamBus:N8,buildActionEnvelope:K$,buildWireConfig:E8,useAction:Z$,useApp:_8,useAuth:x8,useContract:b8,useGguiContext:$8,useRender:j8,useStream:G$,useWireContext:Zr,validateInboundPropsPayload:k8,validateInboundStreamPayload:w8,validateOutboundActionEnvelope:J$,validateOutboundActionPayload:S8},Symbol.toStringTag,{value:"Module"}));D.createContext(null);new Set(tp);var Af={};Nc(Af,{Accordion:()=>kw,Alert:()=>cw,Avatar:()=>Ic,Badge:()=>rw,Box:()=>V8,Button:()=>ca,Card:()=>D8,Checkbox:()=>Uf,Container:()=>M8,Divider:()=>Df,Grid:()=>F8,Heading:()=>Uc,Icon:()=>wt,Image:()=>fw,Input:()=>t1,Link:()=>fp,MotionKeyframes:()=>Nw,Progress:()=>a1,RadioGroup:()=>ew,Row:()=>Bi,Select:()=>X8,Skeleton:()=>iw,Slider:()=>tw,Spacer:()=>H8,Spinner:()=>Ga,Stack:()=>qi,Table:()=>yw,Tabs:()=>$w,Text:()=>hr,TextArea:()=>up,Toast:()=>Sw,Toggle:()=>Q8,Tooltip:()=>mw,useAnimationKey:()=>zw,useMotion:()=>Ew});var Jn={xs:"320px",sm:"480px",md:"640px",lg:"768px",xl:"1024px","2xl":"1280px","3xl":"1536px",full:"100%"},Xt={sm:"4px",md:"6px",lg:"8px",xl:"12px",full:"9999px"},ll={sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)"},Zi={dropdown:1e3,sticky:1100,modal:1400,tooltip:1800},W$={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)"},C8=new Set(Object.keys(W$));function Pa(e){if(e!==void 0)return typeof e=="number"?`${e}px`:C8.has(e)?W$[e]:e}var T8={xs:Jn.xs,sm:Jn.sm,md:Jn.md,lg:Jn.lg,xl:Jn.xl,"2xl":Jn["2xl"],"3xl":Jn["3xl"],full:Jn.full};function M8({children:e,maxWidth:n="lg",center:o=!0,padding:l,style:c,className:u}){const d=T8[n]||n,p=Pa(l);return i.jsx("div",{className:u,style:{maxWidth:d,margin:o?"0 auto":void 0,padding:p,width:"100%",...c},children:e})}function Ii(e,n,o,l){return e===void 0?D.createElement("div",{className:o.className,style:o.style},l):D.createElement(e,{...n,className:o.className,style:o.style},l)}function Gi(e){switch(e){case"default":return"var(--ggui-color-onSurface, #18181b)";case"muted":return"var(--ggui-color-onSurfaceVariant, #52525b)";case"subtle":return"var(--ggui-color-neutral-500, #71717a)";case"emphasized":return"var(--ggui-color-primary-700, #0369a1)";case"loud":return"var(--ggui-color-primary-500, #0ea5e9)";case"success":case"warning":case"error":case"info":return`var(--ggui-color-${e}-500, ${O8[e]})`;case"inverse":return"var(--ggui-color-surface, #ffffff)";case"inherit":return"inherit"}}var O8={success:"#15803d",warning:"#b45309",error:"#b91c1c",info:"#0e7490"};function Q$(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 e1={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)"},R8=new Set(Object.keys(e1));function tl(e){if(e!==void 0)return typeof e=="number"?`${e}px`:R8.has(e)?e1[e]:e}var A8={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 D8(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=Pa(o),k={backgroundColor:Q$(d??"default"),borderRadius:tl(u),padding:v,boxShadow:A8[l]||l,border:c?"1px solid var(--ggui-color-outlineVariant, #e4e4e7)":void 0,...p};return Ii(h,y,{className:g,style:k},n)}var U8={start:"flex-start",center:"center",end:"flex-end",between:"space-between",around:"space-around",evenly:"space-evenly"},I8={start:"flex-start",center:"center",end:"flex-end",stretch:"stretch"};function qi(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=Pa(l),j={display:"flex",flexDirection:o==="vertical"?"column":"row",gap:v,alignItems:I8[c]||c,justifyContent:U8[u]||u,flexWrap:d?"wrap":"nowrap",...p};return Ii(h,y,{className:g,style:j},n)}function Bi(e){return D.createElement(qi,{...e,direction:"horizontal"})}var B8=[["sm",640],["md",768],["lg",1024],["xl",1280]],Ef=e=>`repeat(${e}, minmax(0, 1fr))`;function L8(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 F8(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:Pa(l),...u};return Ii(p,g,{className:d,style:v},n)}if(typeof o=="object"){const v=`ggui-grid-${L8(o)}`,j=[`.${v}{grid-template-columns:${Ef(o.base??1)}}`];for(const[x,z]of B8){const E=o[x];typeof E=="number"&&j.push(`@media (min-width:${z}px){.${v}{grid-template-columns:${Ef(E)}}}`)}const k={display:"grid",gap:Pa(l),...u};return Ii(p,g,{className:d?`${d} ${v}`:v,style:k},i.jsxs(i.Fragment,{children:[i.jsx("style",{children:j.join("")}),n]}))}const y={display:"grid",gridTemplateColumns:Ef(o),gap:Pa(l),...u};return Ii(p,g,{className:d,style:y},n)}function V8(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 $=Pa(l)||"0";x=`${Pa(c)||"0"} ${$}`}else x=Pa(o);const z=p!==void 0&&typeof g=="string"&&g.length>0?p:void 0,E=z||(d?Q$(d):void 0),w={padding:x,margin:Pa(u),background:E,borderRadius:tl(h),...y};return Ii(j,k,{className:v,style:w},n)}function Df({orientation:e="horizontal",margin:n="var(--ggui-spacing-md, 16px)",tone:o,style:l,className:c}){const u=typeof n=="number"?`${n}px`:n,d=o?Gi(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 H8({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 q8={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)"},P8={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)"},Z8={xs:1.5,sm:1.5,base:1.5,lg:1.625,xl:1.375,"2xl":1.25,"3xl":1.25,"4xl":1.25};function hr({children:e,size:n="base",weight:o="normal",caps:l=!1,tone:c,align:u,truncate:d,is:p="p",id:g,htmlFor:h,style:y,className:v}){const j=c?Gi(c):"var(--ggui-color-onSurface, #18181b)",k={fontSize:q8[n],fontWeight:P8[o],lineHeight:Z8[n],color:j,textAlign:u,margin:0,...l&&{textTransform:"uppercase",letterSpacing:"0.05em"},...d&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},...y},x={id:g,htmlFor:h,className:v,style:k};return D.createElement(p,x,e)}var be={xs:"12px",sm:"14px",base:"16px",lg:"18px",xl:"20px","2xl":"24px","3xl":"30px","4xl":"36px","5xl":"48px"},Xe={normal:400,medium:500,semibold:600,bold:700},xa={tight:1.25,snug:1.375,normal:1.5,relaxed:1.625},qr={tight:"-0.025em",normal:"0em"},xv={h1:{fontSize:be["4xl"],fontWeight:Xe.bold,lineHeight:xa.tight,letterSpacing:qr.tight},h2:{fontSize:be["3xl"],fontWeight:Xe.bold,lineHeight:xa.tight,letterSpacing:qr.tight},h3:{fontSize:be["2xl"],fontWeight:Xe.semibold,lineHeight:xa.snug,letterSpacing:qr.normal},h4:{fontSize:be.xl,fontWeight:Xe.semibold,lineHeight:xa.snug,letterSpacing:qr.normal},h5:{fontSize:be.lg,fontWeight:Xe.semibold,lineHeight:xa.normal,letterSpacing:qr.normal},h6:{fontSize:be.base,fontWeight:Xe.semibold,lineHeight:xa.normal,letterSpacing:qr.normal}};function Uc({children:e,level:n=2,tone:o,align:l,style:c,className:u}){const d=`h${n}`,p=xv[d]||xv.h2,g=o?Gi(o):"var(--ggui-color-onSurface, #18181b)";return D.createElement(d,{className:u,style:{...p,color:g,textAlign:l,margin:0,...c}},e)}function Ga({size:e=24,tone:n,style:o,className:l}){const c=n==="inherit"?"currentColor":n?Gi(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)"},G8={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"}},Y8={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 ca({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,z=h??y;return i.jsx("button",{type:g,onClick:x?void 0:z,disabled:x,className:j,style:{...G8[o],...Y8[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(Ga,{size:16,tone:"inherit"}):i.jsxs(i.Fragment,{children:[d,e,p]})})}var K8={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 t1({label:e,placeholder:n,value:o,onChange:l,type:c="text",error:u,helperText:d,required:p,disabled:g,size:h="md",style:y,className:v,...j}){const k=D.useId(),x=`${k}-input`,z=`${k}-message`,E=!!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":E||void 0,"aria-describedby":w?z:void 0,style:{...K8[h],width:"100%",borderRadius:"var(--ggui-shape-radius-md, 8px)",border:`1px solid ${E?"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:z,role:E?"alert":void 0,style:{fontSize:"var(--ggui-font-size-xs, 12px)",color:E?"var(--ggui-color-error-500, #ef4444)":"var(--ggui-color-onSurfaceVariant, #52525b)"},children:u||d})]})}function up({label:e,placeholder:n,value:o,onChange:l,rows:c=4,error:u,helperText:d,required:p,disabled:g,maxLength:h,showCount:y,autoResize:v,style:j,className:k,...x}){const z=D.useId(),E=`${z}-textarea`,w=`${z}-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:E,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:E,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 J8={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 X8({label:e,value:n,onChange:o,options:l,placeholder:c,error:u,helperText:d,required:p,disabled:g,size:h="md",style:y,className:v,...j}){const k=D.useId(),x=`${k}-select`,z=`${k}-message`,E=!!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":E||void 0,"aria-describedby":w?z:void 0,style:{...J8[h],width:"100%",borderRadius:"var(--ggui-shape-radius-md, 8px)",border:`1px solid ${E?"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:z,role:E?"alert":void 0,style:{fontSize:"var(--ggui-font-size-xs, 12px)",color:E?"var(--ggui-color-error-500, #ef4444)":"var(--ggui-color-onSurfaceVariant, #52525b)"},children:u||d})]})}function Uf({label:e,checked:n,onChange:o,disabled:l,description:c,indeterminate:u,style:d,className:p}){return i.jsxs("label",{className:p,style:{display:"flex",alignItems:"flex-start",gap:"var(--ggui-spacing-2, 8px)",cursor:l?"not-allowed":"pointer",opacity:l?.5:1,...d},children:[i.jsxs("div",{style:{position:"relative",width:"18px",height:"18px",flexShrink:0,marginTop:"2px"},children:[i.jsx("input",{type:"checkbox",checked:n,onChange:g=>o==null?void 0:o(g.target.checked),disabled:l,ref:g=>{g&&(g.indeterminate=u||!1)},style:{position:"absolute",width:"18px",height:"18px",margin:0,opacity:0,cursor:l?"not-allowed":"pointer"}}),i.jsx("div",{style:{width:"18px",height:"18px",borderRadius:"var(--ggui-shape-radius-sm, 4px)",border:`2px solid ${n||u?"var(--ggui-color-primary-600, #0284c7)":"var(--ggui-color-outline, #d4d4d8)"}`,backgroundColor:n||u?"var(--ggui-color-primary-600, #0284c7)":"var(--ggui-color-surface, #ffffff)",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s"},children:(n||u)&&i.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",style:{color:"#ffffff"},children:u?i.jsx("path",{d:"M2.5 6H9.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}):i.jsx("path",{d:"M2.5 6L5 8.5L9.5 3.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),(e||c)&&i.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"2px"},children:[e&&i.jsx("span",{style:{fontSize:"var(--ggui-font-size-sm, 14px)",fontWeight:"var(--ggui-font-weight-medium, 500)",color:"var(--ggui-color-onSurfaceVariant, #52525b)"},children:e}),c&&i.jsx("span",{style:{fontSize:"var(--ggui-font-size-xs, 12px)",color:"var(--ggui-color-onSurfaceVariant, #52525b)"},children:c})]})]})}var W8={sm:{width:36,height:20,knob:16},md:{width:44,height:24,knob:20},lg:{width:52,height:28,knob:24}};function Q8({label:e,checked:n,onChange:o,disabled:l,size:c="md",style:u,className:d}){const p=W8[c],[g,h]=D.useState(!1);return i.jsxs("label",{className:d,style:{display:"flex",alignItems:"center",gap:"var(--ggui-spacing-2, 8px)",cursor:l?"not-allowed":"pointer",opacity:l?.5:1,...u},children:[i.jsx("div",{role:"switch","aria-checked":n,"aria-label":e,tabIndex:l?-1:0,onClick:()=>!l&&(o==null?void 0:o(!n)),onKeyDown:y=>{l||(y.key===" "||y.key==="Enter")&&(y.preventDefault(),o==null||o(!n))},onFocus:()=>h(!0),onBlur:()=>h(!1),style:{width:p.width,height:p.height,borderRadius:"9999px",backgroundColor:n?"var(--ggui-color-primary-600, #0284c7)":"var(--ggui-color-outline, #d4d4d8)",position:"relative",transition:`background-color ${kt.normal} ${Nt.easeInOut}, box-shadow ${kt.normal} ${Nt.easeInOut}`,flexShrink:0,outline:"none",boxShadow:g?"0 0 0 3px var(--ggui-color-primary-200, #bae6fd)":void 0},children:i.jsx("div",{style:{width:p.knob,height:p.knob,borderRadius:"50%",backgroundColor:"#ffffff",position:"absolute",top:(p.height-p.knob)/2,left:n?p.width-p.knob-(p.height-p.knob)/2:(p.height-p.knob)/2,transition:`left ${kt.normal} ${Nt.easeInOut}`,boxShadow:"var(--ggui-shape-shadow-sm, 0 1px 2px rgba(0,0,0,0.05))"}})}),e&&i.jsx("span",{style:{fontSize:"var(--ggui-font-size-sm, 14px)",fontWeight:"var(--ggui-font-weight-medium, 500)",color:"var(--ggui-color-onSurfaceVariant, #52525b)"},children:e})]})}function ew({label:e,value:n,onChange:o,options:l,direction:c="vertical",disabled:u,error:d,style:p,className:g}){const h=D.useId(),y=`${h}-label`,v=`${h}-error`,j=`${h}-radio`,k=!!d;return i.jsxs("div",{role:"radiogroup","aria-labelledby":e?y:void 0,"aria-describedby":k?v:void 0,className:g,style:{display:"flex",flexDirection:"column",gap:"var(--ggui-spacing-2, 8px)",...p},children:[e&&i.jsx("span",{id:y,style:{fontSize:"var(--ggui-font-size-sm, 14px)",fontWeight:"var(--ggui-font-weight-medium, 500)",color:"var(--ggui-color-onSurfaceVariant, #52525b)"},children:e}),i.jsx("div",{style:{display:"flex",flexDirection:c==="vertical"?"column":"row",gap:c==="vertical"?"var(--ggui-spacing-2, 8px)":"var(--ggui-spacing-4, 16px)",flexWrap:"wrap"},children:l.map(x=>{const z=n===x.value,E=u||x.disabled;return i.jsxs("label",{style:{display:"flex",alignItems:"flex-start",gap:"var(--ggui-spacing-2, 8px)",cursor:E?"not-allowed":"pointer",opacity:E?.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:z,onChange:()=>o==null?void 0:o(x.value),disabled:E,style:{position:"absolute",width:"18px",height:"18px",margin:0,opacity:0,cursor:E?"not-allowed":"pointer"}}),i.jsx("div",{style:{width:"18px",height:"18px",borderRadius:"var(--ggui-shape-radius-full, 9999px)",border:`2px solid ${z?"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:z&&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 tw({label:e,value:n=0,onChange:o,min:l=0,max:c=100,step:u=1,disabled:d,showValue:p,style:g,className:h}){const y=D.useId(),v=`${y}-slider`,j=`${y}-label`,k=(n-l)/(c-l)*100;return i.jsxs("div",{className:h,style:{display:"flex",flexDirection:"column",gap:"var(--ggui-spacing-2, 8px)",...g},children:[(e||p)&&i.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e&&i.jsx("span",{id:j,style:{fontSize:"var(--ggui-font-size-sm, 14px)",fontWeight:"var(--ggui-font-weight-medium, 500)",color:"var(--ggui-color-onSurfaceVariant, #52525b)"},children:e}),p&&i.jsx("span",{style:{fontSize:"var(--ggui-font-size-sm, 14px)",fontWeight:"var(--ggui-font-weight-medium, 500)",color:"var(--ggui-color-primary-600, #0284c7)"},children:n})]}),i.jsxs("div",{style:{position:"relative",height:"20px",display:"flex",alignItems:"center"},children:[i.jsx("div",{style:{position:"absolute",width:"100%",height:"6px",borderRadius:"3px",backgroundColor:"var(--ggui-color-outlineVariant, #e4e4e7)"}}),i.jsx("div",{style:{position:"absolute",width:`${k}%`,height:"6px",borderRadius:"3px",backgroundColor:d?"var(--ggui-color-outline, #d4d4d8)":"var(--ggui-color-primary-600, #0284c7)",transition:"width 0.1s"}}),i.jsx("input",{id:v,type:"range",min:l,max:c,step:u,value:n,onChange:x=>o==null?void 0:o(Number(x.target.value)),disabled:d,"aria-labelledby":e?j:void 0,"aria-label":e?void 0:"Slider","aria-valuenow":n,"aria-valuemin":l,"aria-valuemax":c,style:{position:"absolute",width:"100%",height:"20px",margin:0,opacity:0,cursor:d?"not-allowed":"pointer",zIndex:1}}),i.jsx("div",{style:{position:"absolute",left:`calc(${k}% - 10px)`,width:"20px",height:"20px",borderRadius:"50%",backgroundColor:"#ffffff",border:`2px solid ${d?"var(--ggui-color-outline, #d4d4d8)":"var(--ggui-color-primary-600, #0284c7)"}`,boxShadow:"var(--ggui-shape-shadow-sm, 0 1px 2px rgba(0,0,0,0.05))",transition:"left 0.1s",pointerEvents:"none"}})]})]})}var aw={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)"}},nw={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 rw({children:e,variant:n="default",size:o="md",pill:l=!0,style:c,className:u}){return i.jsx("span",{className:u,style:{...aw[n],...nw[o],display:"inline-flex",alignItems:"center",justifyContent:"center",fontWeight:"var(--ggui-font-weight-medium, 500)",borderRadius:l?"9999px":"var(--ggui-shape-radius-sm, 4px)",whiteSpace:"nowrap",...c},children:e})}var _v=e=>e===void 0?void 0:typeof e=="number"?`${e}px`:e;function iw({variant:e="rect",width:n,height:o,radius:l="sm",style:c,className:u}){const d=e==="circle",p=e==="text",g=_v(n)??(d?"2.5rem":"100%"),h=_v(o)??(p?"1em":d?g:"1.25rem"),y={display:"block",width:g,height:h,borderRadius:d?"9999px":tl(l),backgroundColor:"var(--ggui-color-surfaceVariant, #f4f4f5)",animation:"ggui-skeleton-pulse 1.5s ease-in-out infinite",...c};return i.jsx("div",{className:u,style:y,"aria-hidden":"true",children:i.jsx("style",{children:"@keyframes ggui-skeleton-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }"})})}var ow={xs:24,sm:32,md:40,lg:48,xl:64},jv=["var(--ggui-color-primary-500, #0ea5e9)","var(--ggui-color-success-500, #22c55e)","var(--ggui-color-warning-500, #f59e0b)","var(--ggui-color-error-500, #ef4444)","var(--ggui-color-info-500, #06b6d4)"];function Ic({src:e,name:n,size:o="md",shape:l="circle",style:c,className:u}){const[d,p]=D.useState(!1),g=typeof o=="number"?o:ow[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,z)=>x+z.charCodeAt(0),0);return jv[k%jv.length]},v=!e||d;return i.jsx("div",{role:"img","aria-label":n||"Avatar",className:u,style:{width:g,height:g,borderRadius:l==="circle"?"50%":"var(--ggui-shape-radius-md, 8px)",backgroundColor:v?y(n):"transparent",color:"#ffffff",display:"flex",alignItems:"center",justifyContent:"center",fontSize:g*.4,fontWeight:"var(--ggui-font-weight-semibold, 600)",overflow:"hidden",flexShrink:0,...c},children:v?h:i.jsx("img",{src:e,alt:n||"Avatar",onError:()=>p(!0),style:{width:"100%",height:"100%",objectFit:"cover"}})})}var lw={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)"}},sw={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 cw({children:e,variant:n="info",title:o,closable:l,onClose:c,icon:u,style:d,className:p}){const g=lw[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||sw[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 uw={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)"},dw={sm:4,md:8,lg:12};function a1({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=dw[l],v=uw[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 fw({src:e,alt:n,width:o,height:l,objectFit:c="cover",radius:u,fallback:d,style:p,className:g}){const[h,y]=D.useState(!1),v=j=>{if(j!==void 0)return typeof j=="number"?`${j}px`:j};return h&&d?i.jsx(i.Fragment,{children:d}):h?i.jsx("div",{role:"img","aria-label":`${n} (failed to load)`,className:g,style:{width:v(o)||"100%",height:v(l)||"auto",borderRadius:tl(u),backgroundColor:"var(--ggui-color-surfaceVariant, #f4f4f5)",display:"flex",alignItems:"center",justifyContent:"center",color:"var(--ggui-color-outline, #d4d4d8)",...p},children:i.jsx("svg",{width:"48",height:"48",viewBox:"0 0 24 24",fill:"currentColor",children:i.jsx("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"})})}):i.jsx("img",{src:e,alt:n,onError:()=>y(!0),className:g,style:{width:v(o)||"100%",height:v(l)||"auto",objectFit:c,borderRadius:tl(u),display:"block",...p}})}var dp={Sun:[["circle",{cx:"12",cy:"12",r:"4"}],["path",{d:"M12 2v2"}],["path",{d:"M12 20v2"}],["path",{d:"m4.93 4.93 1.41 1.41"}],["path",{d:"m17.66 17.66 1.41 1.41"}],["path",{d:"M2 12h2"}],["path",{d:"M20 12h2"}],["path",{d:"m6.34 17.66-1.41 1.41"}],["path",{d:"m19.07 4.93-1.41 1.41"}]],Moon:[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401"}]],Cloud:[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z"}]],CloudRain:[["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242"}],["path",{d:"M16 14v6"}],["path",{d:"M8 14v6"}],["path",{d:"M12 16v6"}]],CloudSnow:[["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242"}],["path",{d:"M8 15h.01"}],["path",{d:"M8 19h.01"}],["path",{d:"M12 17h.01"}],["path",{d:"M12 21h.01"}],["path",{d:"M16 15h.01"}],["path",{d:"M16 19h.01"}]],CloudLightning:[["path",{d:"M6 16.326A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 .5 8.973"}],["path",{d:"m13 12-3 5h4l-3 5"}]],CloudDrizzle:[["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242"}],["path",{d:"M8 19v1"}],["path",{d:"M8 14v1"}],["path",{d:"M16 19v1"}],["path",{d:"M16 14v1"}],["path",{d:"M12 21v1"}],["path",{d:"M12 16v1"}]],CloudSun:[["path",{d:"M12 2v2"}],["path",{d:"m4.93 4.93 1.41 1.41"}],["path",{d:"M20 12h2"}],["path",{d:"m19.07 4.93-1.41 1.41"}],["path",{d:"M15.947 12.65a4 4 0 0 0-5.925-4.128"}],["path",{d:"M13 22H7a5 5 0 1 1 4.9-6H13a3 3 0 0 1 0 6Z"}]],CloudMoon:[["path",{d:"M13 16a3 3 0 0 1 0 6H7a5 5 0 1 1 4.9-6z"}],["path",{d:"M18.376 14.512a6 6 0 0 0 3.461-4.127c.148-.625-.659-.97-1.248-.714a4 4 0 0 1-5.259-5.26c.255-.589-.09-1.395-.716-1.248a6 6 0 0 0-4.594 5.36"}]],CloudFog:[["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242"}],["path",{d:"M16 17H7"}],["path",{d:"M17 21H9"}]],Wind:[["path",{d:"M12.8 19.6A2 2 0 1 0 14 16H2"}],["path",{d:"M17.5 8a2.5 2.5 0 1 1 2 4H2"}],["path",{d:"M9.8 4.4A2 2 0 1 1 11 8H2"}]],Thermometer:[["path",{d:"M14 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0Z"}]],Droplets:[["path",{d:"M7 16.3c2.2 0 4-1.83 4-4.05 0-1.16-.57-2.26-1.71-3.19S7.29 6.75 7 5.3c-.29 1.45-1.14 2.84-2.29 3.76S3 11.1 3 12.25c0 2.22 1.8 4.05 4 4.05z"}],["path",{d:"M12.56 6.6A10.97 10.97 0 0 0 14 3.02c.5 2.5 2 4.9 4 6.5s3 3.5 3 5.5a6.98 6.98 0 0 1-11.91 4.97"}]],Umbrella:[["path",{d:"M12 13v7a2 2 0 0 0 4 0"}],["path",{d:"M12 2v2"}],["path",{d:"M20.992 13a1 1 0 0 0 .97-1.274 10.284 10.284 0 0 0-19.923 0A1 1 0 0 0 3 13z"}]],Snowflake:[["path",{d:"m10 20-1.25-2.5L6 18"}],["path",{d:"M10 4 8.75 6.5 6 6"}],["path",{d:"m14 20 1.25-2.5L18 18"}],["path",{d:"m14 4 1.25 2.5L18 6"}],["path",{d:"m17 21-3-6h-4"}],["path",{d:"m17 3-3 6 1.5 3"}],["path",{d:"M2 12h6.5L10 9"}],["path",{d:"m20 10-1.5 2 1.5 2"}],["path",{d:"M22 12h-6.5L14 15"}],["path",{d:"m4 10 1.5 2L4 14"}],["path",{d:"m7 21 3-6-1.5-3"}],["path",{d:"m7 3 3 6h4"}]],Rainbow:[["path",{d:"M22 17a10 10 0 0 0-20 0"}],["path",{d:"M6 17a6 6 0 0 1 12 0"}],["path",{d:"M10 17a2 2 0 0 1 4 0"}]],Home:[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}]],ArrowLeft:[["path",{d:"m12 19-7-7 7-7"}],["path",{d:"M19 12H5"}]],ArrowRight:[["path",{d:"M5 12h14"}],["path",{d:"m12 5 7 7-7 7"}]],ArrowUp:[["path",{d:"m5 12 7-7 7 7"}],["path",{d:"M12 19V5"}]],ArrowDown:[["path",{d:"M12 5v14"}],["path",{d:"m19 12-7 7-7-7"}]],ChevronLeft:[["path",{d:"m15 18-6-6 6-6"}]],ChevronRight:[["path",{d:"m9 18 6-6-6-6"}]],ChevronUp:[["path",{d:"m18 15-6-6-6 6"}]],ChevronDown:[["path",{d:"m6 9 6 6 6-6"}]],ChevronsLeft:[["path",{d:"m11 17-5-5 5-5"}],["path",{d:"m18 17-5-5 5-5"}]],ChevronsRight:[["path",{d:"m6 17 5-5-5-5"}],["path",{d:"m13 17 5-5-5-5"}]],ChevronsUp:[["path",{d:"m17 11-5-5-5 5"}],["path",{d:"m17 18-5-5-5 5"}]],ChevronsDown:[["path",{d:"m7 6 5 5 5-5"}],["path",{d:"m7 13 5 5 5-5"}]],ExternalLink:[["path",{d:"M15 3h6v6"}],["path",{d:"M10 14 21 3"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}]],CornerDownLeft:[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4"}],["path",{d:"m9 10-5 5 5 5"}]],CornerDownRight:[["path",{d:"m15 10 5 5-5 5"}],["path",{d:"M4 4v7a4 4 0 0 0 4 4h12"}]],MoveHorizontal:[["path",{d:"m18 8 4 4-4 4"}],["path",{d:"M2 12h20"}],["path",{d:"m6 8-4 4 4 4"}]],MoveVertical:[["path",{d:"M12 2v20"}],["path",{d:"m8 18 4 4 4-4"}],["path",{d:"m8 6 4-4 4 4"}]],Plus:[["path",{d:"M5 12h14"}],["path",{d:"M12 5v14"}]],Minus:[["path",{d:"M5 12h14"}]],X:[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]],Check:[["path",{d:"M20 6 9 17l-5-5"}]],Search:[["path",{d:"m21 21-4.34-4.34"}],["circle",{cx:"11",cy:"11",r:"8"}]],Edit:[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z"}]],Trash2:[["path",{d:"M10 11v6"}],["path",{d:"M14 11v6"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"}],["path",{d:"M3 6h18"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"}]],Save:[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7"}]],Download:[["path",{d:"M12 15V3"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}],["path",{d:"m7 10 5 5 5-5"}]],Upload:[["path",{d:"M12 3v12"}],["path",{d:"m17 8-5-5-5 5"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}]],Share2:[["circle",{cx:"18",cy:"5",r:"3"}],["circle",{cx:"6",cy:"12",r:"3"}],["circle",{cx:"18",cy:"19",r:"3"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49"}]],Copy:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}]],Clipboard:[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"}]],RotateCcw:[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}],["path",{d:"M3 3v5h5"}]],RotateCw:[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8"}],["path",{d:"M21 3v5h-5"}]],RefreshCw:[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"}],["path",{d:"M21 3v5h-5"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"}],["path",{d:"M8 16H3v5"}]],Undo2:[["path",{d:"M9 14 4 9l5-5"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11"}]],Redo2:[["path",{d:"m15 14 5-5-5-5"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13"}]],Maximize2:[["path",{d:"M15 3h6v6"}],["path",{d:"m21 3-7 7"}],["path",{d:"m3 21 7-7"}],["path",{d:"M9 21H3v-6"}]],Minimize2:[["path",{d:"m14 10 7-7"}],["path",{d:"M20 10h-6V4"}],["path",{d:"m3 21 7-7"}],["path",{d:"M4 14h6v6"}]],ZoomIn:[["circle",{cx:"11",cy:"11",r:"8"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11"}]],ZoomOut:[["circle",{cx:"11",cy:"11",r:"8"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11"}]],Send:[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z"}],["path",{d:"m21.854 2.147-10.94 10.939"}]],LogIn:[["path",{d:"m10 17 5-5-5-5"}],["path",{d:"M15 12H3"}],["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"}]],LogOut:[["path",{d:"m16 17 5-5-5-5"}],["path",{d:"M21 12H9"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"}]],Heart:[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5"}]],Star:[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z"}]],ThumbsUp:[["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z"}],["path",{d:"M7 10v12"}]],ThumbsDown:[["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z"}],["path",{d:"M17 14V2"}]],MessageCircle:[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719"}]],MessageSquare:[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z"}]],Bell:[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326"}]],BellOff:[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0"}],["path",{d:"M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742"}],["path",{d:"m2 2 20 20"}],["path",{d:"M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05"}]],Mail:[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2"}]],Phone:[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384"}]],PhoneCall:[["path",{d:"M13 2a9 9 0 0 1 9 9"}],["path",{d:"M13 6a5 5 0 0 1 5 5"}],["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384"}]],Video:[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2"}]],AtSign:[["circle",{cx:"12",cy:"12",r:"4"}],["path",{d:"M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8"}]],Users:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87"}],["circle",{cx:"9",cy:"7",r:"4"}]],UserPlus:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"}],["circle",{cx:"9",cy:"7",r:"4"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11"}]],ShoppingCart:[["circle",{cx:"8",cy:"21",r:"1"}],["circle",{cx:"19",cy:"21",r:"1"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12"}]],ShoppingBag:[["path",{d:"M16 10a4 4 0 0 1-8 0"}],["path",{d:"M3.103 6.034h17.794"}],["path",{d:"M3.4 5.467a2 2 0 0 0-.4 1.2V20a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6.667a2 2 0 0 0-.4-1.2l-2-2.667A2 2 0 0 0 17 2H7a2 2 0 0 0-1.6.8z"}]],CreditCard:[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10"}]],DollarSign:[["line",{x1:"12",x2:"12",y1:"2",y2:"22"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"}]],Package:[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z"}],["path",{d:"M12 22V12"}],["polyline",{points:"3.29 7 12 12 20.71 7"}],["path",{d:"m7.5 4.27 9 5.15"}]],Tag:[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor"}]],Receipt:[["path",{d:"M12 17V7"}],["path",{d:"M16 8h-6a2 2 0 0 0 0 4h4a2 2 0 0 1 0 4H8"}],["path",{d:"M4 3a1 1 0 0 1 1-1 1.3 1.3 0 0 1 .7.2l.933.6a1.3 1.3 0 0 0 1.4 0l.934-.6a1.3 1.3 0 0 1 1.4 0l.933.6a1.3 1.3 0 0 0 1.4 0l.933-.6a1.3 1.3 0 0 1 1.4 0l.934.6a1.3 1.3 0 0 0 1.4 0l.933-.6A1.3 1.3 0 0 1 19 2a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1 1.3 1.3 0 0 1-.7-.2l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.934.6a1.3 1.3 0 0 1-1.4 0l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-1.4 0l-.934-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-.7.2 1 1 0 0 1-1-1z"}]],Wallet:[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4"}]],Banknote:[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"2"}],["circle",{cx:"12",cy:"12",r:"2"}],["path",{d:"M6 12h.01M18 12h.01"}]],Percent:[["line",{x1:"19",x2:"5",y1:"5",y2:"19"}],["circle",{cx:"6.5",cy:"6.5",r:"2.5"}],["circle",{cx:"17.5",cy:"17.5",r:"2.5"}]],Gift:[["path",{d:"M12 7v14"}],["path",{d:"M20 11v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8"}],["path",{d:"M7.5 7a1 1 0 0 1 0-5A4.8 8 0 0 1 12 7a4.8 8 0 0 1 4.5-5 1 1 0 0 1 0 5"}],["rect",{x:"3",y:"7",width:"18",height:"4",rx:"1"}]],Store:[["path",{d:"M15 21v-5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v5"}],["path",{d:"M17.774 10.31a1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.451 0 1.12 1.12 0 0 0-1.548 0 2.5 2.5 0 0 1-3.452 0 1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.77-3.248l2.889-4.184A2 2 0 0 1 7 2h10a2 2 0 0 1 1.653.873l2.895 4.192a2.5 2.5 0 0 1-3.774 3.244"}],["path",{d:"M4 10.95V19a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8.05"}]],Truck:[["path",{d:"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2"}],["path",{d:"M15 18H9"}],["path",{d:"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14"}],["circle",{cx:"17",cy:"18",r:"2"}],["circle",{cx:"7",cy:"18",r:"2"}]],AlertCircle:[["circle",{cx:"12",cy:"12",r:"10"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16"}]],AlertTriangle:[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"}],["path",{d:"M12 9v4"}],["path",{d:"M12 17h.01"}]],Info:[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 16v-4"}],["path",{d:"M12 8h.01"}]],HelpCircle:[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"}],["path",{d:"M12 17h.01"}]],CheckCircle:[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335"}],["path",{d:"m9 11 3 3L22 4"}]],XCircle:[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m15 9-6 6"}],["path",{d:"m9 9 6 6"}]],Loader:[["path",{d:"M12 2v4"}],["path",{d:"m16.2 7.8 2.9-2.9"}],["path",{d:"M18 12h4"}],["path",{d:"m16.2 16.2 2.9 2.9"}],["path",{d:"M12 18v4"}],["path",{d:"m4.9 19.1 2.9-2.9"}],["path",{d:"M2 12h4"}],["path",{d:"m4.9 4.9 2.9 2.9"}]],Loader2:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56"}]],CircleDot:[["circle",{cx:"12",cy:"12",r:"10"}],["circle",{cx:"12",cy:"12",r:"1"}]],ShieldCheck:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"}],["path",{d:"m9 12 2 2 4-4"}]],ShieldAlert:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"}],["path",{d:"M12 8v4"}],["path",{d:"M12 16h.01"}]],Ban:[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M4.929 4.929 19.07 19.071"}]],Play:[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z"}]],Pause:[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1"}]],Square:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}]],SkipBack:[["path",{d:"M17.971 4.285A2 2 0 0 1 21 6v12a2 2 0 0 1-3.029 1.715l-9.997-5.998a2 2 0 0 1-.003-3.432z"}],["path",{d:"M3 20V4"}]],SkipForward:[["path",{d:"M21 4v16"}],["path",{d:"M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z"}]],Volume2:[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z"}],["path",{d:"M16 9a5 5 0 0 1 0 6"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728"}]],VolumeX:[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15"}]],Camera:[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z"}],["circle",{cx:"12",cy:"13",r:"3"}]],Image:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2"}],["circle",{cx:"9",cy:"9",r:"2"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"}]],Film:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M7 3v18"}],["path",{d:"M3 7.5h4"}],["path",{d:"M3 12h18"}],["path",{d:"M3 16.5h4"}],["path",{d:"M17 3v18"}],["path",{d:"M17 7.5h4"}],["path",{d:"M17 16.5h4"}]],Music:[["path",{d:"M9 18V5l12-2v13"}],["circle",{cx:"6",cy:"18",r:"3"}],["circle",{cx:"18",cy:"16",r:"3"}]],Mic:[["path",{d:"M12 19v3"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3"}]],MicOff:[["path",{d:"M12 19v3"}],["path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33"}],["path",{d:"M16.95 16.95A7 7 0 0 1 5 12v-2"}],["path",{d:"M18.89 13.23A7 7 0 0 0 19 12v-2"}],["path",{d:"m2 2 20 20"}],["path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12"}]],Headphones:[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3"}]],File:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5"}]],FileText:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5"}],["path",{d:"M10 9H8"}],["path",{d:"M16 13H8"}],["path",{d:"M16 17H8"}]],Folder:[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"}]],FolderOpen:[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"}]],Database:[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5"}],["path",{d:"M3 12A9 3 0 0 0 21 12"}]],HardDrive:[["path",{d:"M10 16h.01"}],["path",{d:"M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"}],["path",{d:"M21.946 12.013H2.054"}],["path",{d:"M6 16h.01"}]],Server:[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18"}]],PieChart:[["path",{d:"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z"}],["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83"}]],BarChart3:[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16"}],["path",{d:"M18 17V9"}],["path",{d:"M13 17V5"}],["path",{d:"M8 17v-3"}]],LineChart:[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16"}],["path",{d:"m19 9-5 5-4-4-3 3"}]],TrendingUp:[["path",{d:"M16 7h6v6"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17"}]],TrendingDown:[["path",{d:"M16 17h6v-6"}],["path",{d:"m22 17-8.5-8.5-5 5L2 7"}]],Activity:[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2"}]],Menu:[["path",{d:"M4 5h16"}],["path",{d:"M4 12h16"}],["path",{d:"M4 19h16"}]],MoreHorizontal:[["circle",{cx:"12",cy:"12",r:"1"}],["circle",{cx:"19",cy:"12",r:"1"}],["circle",{cx:"5",cy:"12",r:"1"}]],MoreVertical:[["circle",{cx:"12",cy:"12",r:"1"}],["circle",{cx:"12",cy:"5",r:"1"}],["circle",{cx:"12",cy:"19",r:"1"}]],Grid:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M3 9h18"}],["path",{d:"M3 15h18"}],["path",{d:"M9 3v18"}],["path",{d:"M15 3v18"}]],List:[["path",{d:"M3 5h.01"}],["path",{d:"M3 12h.01"}],["path",{d:"M3 19h.01"}],["path",{d:"M8 5h13"}],["path",{d:"M8 12h13"}],["path",{d:"M8 19h13"}]],Columns:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M12 3v18"}]],Layout:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M3 9h18"}],["path",{d:"M9 21V9"}]],Sidebar:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M9 3v18"}]],PanelLeft:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M9 3v18"}]],PanelRight:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M15 3v18"}]],SlidersHorizontal:[["path",{d:"M10 5H3"}],["path",{d:"M12 19H3"}],["path",{d:"M14 3v4"}],["path",{d:"M16 17v4"}],["path",{d:"M21 12h-9"}],["path",{d:"M21 19h-5"}],["path",{d:"M21 5h-7"}],["path",{d:"M8 10v4"}],["path",{d:"M8 12H3"}]],Filter:[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z"}]],SortAsc:[["path",{d:"m3 8 4-4 4 4"}],["path",{d:"M7 4v16"}],["path",{d:"M11 12h4"}],["path",{d:"M11 16h7"}],["path",{d:"M11 20h10"}]],SortDesc:[["path",{d:"m3 16 4 4 4-4"}],["path",{d:"M7 20V4"}],["path",{d:"M11 4h10"}],["path",{d:"M11 8h7"}],["path",{d:"M11 12h4"}]],Table:[["path",{d:"M12 3v18"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M3 9h18"}],["path",{d:"M3 15h18"}]],Calendar:[["path",{d:"M8 2v4"}],["path",{d:"M16 2v4"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2"}],["path",{d:"M3 10h18"}]],Clock:[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 6v6l4 2"}]],Timer:[["line",{x1:"10",x2:"14",y1:"2",y2:"2"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11"}],["circle",{cx:"12",cy:"14",r:"8"}]],Hourglass:[["path",{d:"M5 22h14"}],["path",{d:"M5 2h14"}],["path",{d:"M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22"}],["path",{d:"M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2"}]],User:[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"}],["circle",{cx:"12",cy:"7",r:"4"}]],UserCheck:[["path",{d:"m16 11 2 2 4-4"}],["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"}],["circle",{cx:"9",cy:"7",r:"4"}]],Settings:[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915"}],["circle",{cx:"12",cy:"12",r:"3"}]],Sliders:[["path",{d:"M10 8h4"}],["path",{d:"M12 21v-9"}],["path",{d:"M12 8V3"}],["path",{d:"M17 16h4"}],["path",{d:"M19 12V3"}],["path",{d:"M19 21v-5"}],["path",{d:"M3 14h4"}],["path",{d:"M5 10V3"}],["path",{d:"M5 21v-7"}]],Cog:[["path",{d:"M11 10.27 7 3.34"}],["path",{d:"m11 13.73-4 6.93"}],["path",{d:"M12 22v-2"}],["path",{d:"M12 2v2"}],["path",{d:"M14 12h8"}],["path",{d:"m17 20.66-1-1.73"}],["path",{d:"m17 3.34-1 1.73"}],["path",{d:"M2 12h2"}],["path",{d:"m20.66 17-1.73-1"}],["path",{d:"m20.66 7-1.73 1"}],["path",{d:"m3.34 17 1.73-1"}],["path",{d:"m3.34 7 1.73 1"}],["circle",{cx:"12",cy:"12",r:"2"}],["circle",{cx:"12",cy:"12",r:"8"}]],MapPin:[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0"}],["circle",{cx:"12",cy:"10",r:"3"}]],Map:[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z"}],["path",{d:"M15 5.764v15"}],["path",{d:"M9 3.236v15"}]],Globe:[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"}],["path",{d:"M2 12h20"}]],Compass:[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z"}]],Link:[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"}]],Lock:[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4"}]],Unlock:[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1"}]],Key:[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4"}],["path",{d:"m21 2-9.6 9.6"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5"}]],Shield:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"}]],Eye:[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"}],["circle",{cx:"12",cy:"12",r:"3"}]],EyeOff:[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"}],["path",{d:"m2 2 20 20"}]],Bookmark:[["path",{d:"M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z"}]],Flag:[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528"}]],Award:[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526"}],["circle",{cx:"12",cy:"8",r:"6"}]],Target:[["circle",{cx:"12",cy:"12",r:"10"}],["circle",{cx:"12",cy:"12",r:"6"}],["circle",{cx:"12",cy:"12",r:"2"}]],Zap:[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z"}]],Flame:[["path",{d:"M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4"}]],Coffee:[["path",{d:"M10 2v2"}],["path",{d:"M14 2v2"}],["path",{d:"M16 8a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1"}],["path",{d:"M6 2v2"}]],Lightbulb:[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5"}],["path",{d:"M9 18h6"}],["path",{d:"M10 22h4"}]],Puzzle:[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z"}]],Rocket:[["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5"}],["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09"}],["path",{d:"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05"}]],Code:[["path",{d:"m16 18 6-6-6-6"}],["path",{d:"m8 6-6 6 6 6"}]],Terminal:[["path",{d:"M12 19h8"}],["path",{d:"m4 17 6-6-6-6"}]],Braces:[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1"}]],Hash:[["line",{x1:"4",x2:"20",y1:"9",y2:"9"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21"}]],Wifi:[["path",{d:"M12 20h.01"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0"}]],WifiOff:[["path",{d:"M12 20h.01"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764"}],["path",{d:"m2 2 20 20"}]],Bluetooth:[["path",{d:"m7 7 10 10-5 5V2l5 5L7 17"}]],Battery:[["path",{d:"M 22 14 L 22 10"}],["rect",{x:"2",y:"6",width:"16",height:"12",rx:"2"}]],BatteryCharging:[["path",{d:"m11 7-3 5h4l-3 5"}],["path",{d:"M14.856 6H16a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.935"}],["path",{d:"M22 14v-4"}],["path",{d:"M5.14 18H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h2.936"}]],Power:[["path",{d:"M12 2v10"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04"}]],Printer:[["path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2"}],["path",{d:"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6"}],["rect",{x:"6",y:"14",width:"12",height:"8",rx:"1"}]],QrCode:[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3"}],["path",{d:"M21 21v.01"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7"}],["path",{d:"M3 12h.01"}],["path",{d:"M12 3h.01"}],["path",{d:"M12 16v.01"}],["path",{d:"M16 12h1"}],["path",{d:"M21 12v.01"}],["path",{d:"M12 21v-1"}]],Fingerprint:[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02"}],["path",{d:"M2 12a10 10 0 0 1 18-6"}],["path",{d:"M2 16h.01"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2"}]],Gauge:[["path",{d:"m12 14 4-4"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0"}]]},n1=new Map;for(const e of Object.keys(dp))n1.set(e.toLowerCase(),e);function pw(e){if(dp[e])return e;const n=e.replace(/[-_]/g,"").toLowerCase();return n1.get(n)}function gw(e,n,o){return i.jsx("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:o,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.map(([l,c],u)=>xc.createElement(l,{key:u,...c}))})}function wt({name:e,size:n=24,tone:o,children:l,style:c,className:u,"aria-label":d}){const p=o?Gi(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=pw(e);if(y)return i.jsx("span",{className:u,style:h,...g,children:gw(dp[y],n,p)})}return e&&/[^\x00-\x7F]/.test(e)?i.jsx("span",{className:u,...g,style:{...h,fontSize:n*.75,lineHeight:1},children:e}):i.jsx("span",{className:u,...g,style:{...h,backgroundColor:"var(--ggui-color-outlineVariant, #e4e4e7)",borderRadius:"var(--ggui-shape-radius-sm, 4px)",color:"var(--ggui-color-outline, #d4d4d8)",fontSize:n*.5},children:"?"})}function fp({children:e,href:n,external:o,tone:l,underline:c="hover",style:u,className:d,...p}){const g=l?Gi(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 mw({children:e,content:n,position:o="top",delay:l=200,style:c,className:u}){const[d,p]=D.useState(!1),[g,h]=D.useState({top:0,left:0}),y=D.useRef(null),v=D.useRef(null),j=()=>{v.current=setTimeout(()=>{p(!0)},l)},k=()=>{v.current&&clearTimeout(v.current),p(!1)};D.useEffect(()=>{if(d&&y.current){const z=y.current.getBoundingClientRect(),E=8;let w=0,$=0;switch(o){case"top":w=z.top-E,$=z.left+z.width/2;break;case"bottom":w=z.bottom+E,$=z.left+z.width/2;break;case"left":w=z.top+z.height/2,$=z.left-E;break;case"right":w=z.top+z.height/2,$=z.right+E;break}h({top:w,left:$})}},[d,o]),D.useEffect(()=>()=>{v.current&&clearTimeout(v.current)},[]);const x=()=>{switch(o){case"top":return"translateX(-50%) translateY(-100%)";case"bottom":return"translateX(-50%)";case"left":return"translateX(-100%) translateY(-50%)";case"right":return"translateY(-50%)"}};return i.jsxs(i.Fragment,{children:[i.jsx("div",{ref:y,onMouseEnter:j,onMouseLeave:k,onFocus:j,onBlur:k,className:u,style:{display:"inline-block",...c},children:e}),d&&i.jsx("div",{role:"tooltip",style:{position:"fixed",top:g.top,left:g.left,transform:x(),backgroundColor:"var(--ggui-color-onSurface, #18181b)",color:"#ffffff",padding:"6px 10px",borderRadius:"var(--ggui-shape-radius-md, 8px)",fontSize:"var(--ggui-font-size-xs, 12px)",zIndex:Zi.tooltip,maxWidth:"200px",pointerEvents:"none",whiteSpace:"nowrap"},children:n})]})}var hw=(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 yw({columns:e,data:n,sortKey:o,sortDirection:l="asc",onSort:c,striped:u=!1,hoverable:d=!0,compact:p=!1,bordered:g=!1,caption:h,style:y,className:v}){const[j,k]=D.useState(null),x=p?"var(--ggui-spacing-1, 4px) var(--ggui-spacing-2, 8px)":"var(--ggui-spacing-2, 8px) var(--ggui-spacing-4, 16px)",z=w=>{if(!c)return;c(w,o===w&&l==="asc"?"desc":"asc")},E={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?()=>z(w.key):void 0,onKeyDown:w.sortable?$=>{($.key==="Enter"||$.key===" ")&&($.preventDefault(),z(w.key))}:void 0,tabIndex:w.sortable?0:void 0,style:{...E,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&&hw(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 vw={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 $w({items:e,activeKey:n,onChange:o,variant:l="line",size:c="md",fullWidth:u=!1,style:d,className:p}){var $;const g=D.useId(),[h,y]=D.useState(($=e[0])==null?void 0:$.key),v=n??h,j=D.useCallback(N=>{o?o(N):y(N)},[o]),k=e.find(N=>N.key===v),x=D.useRef(null),z=D.useCallback(N=>{var C;const R=e.filter(U=>!U.disabled),_=R.findIndex(U=>U.key===v);let S;if(N.key==="ArrowRight"||N.key==="ArrowDown"?(N.preventDefault(),S=(_+1)%R.length):N.key==="ArrowLeft"||N.key==="ArrowUp"?(N.preventDefault(),S=(_-1+R.length)%R.length):N.key==="Home"?(N.preventDefault(),S=0):N.key==="End"&&(N.preventDefault(),S=R.length-1),S!==void 0){const U=R[S];j(U.key);const te=(C=x.current)==null?void 0:C.querySelector(`#${CSS.escape(`${g}-tab-${U.key}`)}`);te==null||te.focus()}},[e,v,g,j]),E=(N,R)=>{const _={...vw[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:z,style:E(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 bw={fadeIn:`@keyframes ggui-fadeIn {
|
|
123
|
-
from { opacity: 0; }
|
|
124
|
-
to { opacity: 1; }
|
|
125
|
-
}`,fadeOut:`@keyframes ggui-fadeOut {
|
|
126
|
-
from { opacity: 1; }
|
|
127
|
-
to { opacity: 0; }
|
|
128
|
-
}`,slideInUp:`@keyframes ggui-slideInUp {
|
|
129
|
-
from { opacity: 0; transform: translateY(8px); }
|
|
130
|
-
to { opacity: 1; transform: translateY(0); }
|
|
131
|
-
}`,slideInDown:`@keyframes ggui-slideInDown {
|
|
132
|
-
from { opacity: 0; transform: translateY(-8px); }
|
|
133
|
-
to { opacity: 1; transform: translateY(0); }
|
|
134
|
-
}`,scaleIn:`@keyframes ggui-scaleIn {
|
|
135
|
-
from { opacity: 0; transform: scale(0.95); }
|
|
136
|
-
to { opacity: 1; transform: scale(1); }
|
|
137
|
-
}`,scaleOut:`@keyframes ggui-scaleOut {
|
|
138
|
-
from { opacity: 1; transform: scale(1); }
|
|
139
|
-
to { opacity: 0; transform: scale(0.95); }
|
|
140
|
-
}`,flash:`@keyframes ggui-flash {
|
|
141
|
-
0%, 15% { background-color: var(--ggui-flash-color, var(--ggui-color-primary-100)); }
|
|
142
|
-
100% { background-color: transparent; }
|
|
143
|
-
}`,pulse:`@keyframes ggui-pulse {
|
|
144
|
-
0%, 100% { opacity: 1; }
|
|
145
|
-
50% { opacity: 0.6; }
|
|
146
|
-
}`,bounce:`@keyframes ggui-bounce {
|
|
147
|
-
0% { transform: scale(1); }
|
|
148
|
-
40% { transform: scale(1.06); }
|
|
149
|
-
70% { transform: scale(0.98); }
|
|
150
|
-
100% { transform: scale(1); }
|
|
151
|
-
}`},If={fadeIn:`ggui-fadeIn ${kt.normal} ${Nt.easeOut} both`,slideInUp:`ggui-slideInUp ${kt.normal} ${Nt.easeOut} both`,scaleIn:`ggui-scaleIn ${kt.normal} ${Nt.easeOut} both`},xw=`@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
|
-
}`,_w={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)"}},jw={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 Sw({message:e,variant:n="info",title:o,duration:l=5e3,onClose:c,visible:u=!0,style:d,className:p}){if(D.useEffect(()=>{if(!u||l===0||!c)return;const y=setTimeout(c,l);return()=>clearTimeout(y)},[u,l,c]),!u)return i.jsx("div",{role:"alert","aria-live":"assertive",className:p,style:{position:"absolute",width:"1px",height:"1px",overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap"}});const g=_w[n],h={display:"flex",alignItems:"flex-start",gap:"var(--ggui-spacing-2, 8px)",padding:"var(--ggui-spacing-2, 12px) var(--ggui-spacing-4, 16px)",borderRadius:"var(--ggui-shape-radius-lg, 8px)",backgroundColor:g.bg,border:`1px solid ${g.border}`,color:g.text,boxShadow:"var(--ggui-shape-shadow-lg, 0 10px 15px -3px rgba(0,0,0,0.1))",minWidth:"280px",maxWidth:"420px",animation:If.slideInUp,...d};return i.jsxs("div",{role:"alert","aria-live":"assertive",className:p,style:h,children:[i.jsx("div",{style:{color:g.icon,flexShrink:0,marginTop:"2px"},children:jw[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 ww=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 kw({items:e,expandedKeys:n,onChange:o,multiple:l=!1,variant:c="default",style:u,className:d}){const p=D.useId(),[g,h]=D.useState([]),y=n??g,v=x=>{let z;y.includes(x)?z=y.filter(E=>E!==x):l?z=[...y,x]:z=[x],o?o(z):h(z)},j={display:"flex",flexDirection:"column",gap:c==="separated"?"var(--ggui-spacing-2, 8px)":"0",...u},k=(x,z)=>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:z?"var(--ggui-shape-radius-lg, 8px)":void 0,borderBottomRightRadius:z?"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,z)=>{const E=y.includes(x.key),w=!!x.disabled,$=z===0,N=z===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":E,"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}),ww(E)]})}),i.jsx("div",{id:`${p}-panel-${x.key}`,role:"region","aria-labelledby":`${p}-header-${x.key}`,hidden:!E,style:{overflow:"hidden"},children:E&&i.jsx("div",{style:{padding:"0 var(--ggui-spacing-4, 16px) var(--ggui-spacing-4, 16px)",fontSize:"var(--ggui-font-size-sm, 14px)",color:"var(--ggui-color-onSurfaceVariant, #52525b)",lineHeight:"var(--ggui-font-lineHeight-normal, 1.5)"},children:x.content})})]},x.key)})})}var Sv="ggui-motion-keyframes";function Nw(){return D.useEffect(()=>{if(document.getElementById(Sv))return;const e=document.createElement("style");return e.id=Sv,e.textContent=[...Object.values(bw),xw].join(`
|
|
158
|
-
|
|
159
|
-
`),document.head.appendChild(e),()=>{e.remove()}},[]),null}function Ew(){const[e,n]=D.useState(()=>typeof window>"u"?!0:!window.matchMedia("(prefers-reduced-motion: reduce)").matches);return D.useEffect(()=>{const o=window.matchMedia("(prefers-reduced-motion: reduce)"),l=c=>n(!c.matches);return o.addEventListener("change",l),()=>o.removeEventListener("change",l)},[]),{motionEnabled:e}}function zw(e){const[n,o]=D.useState(0),l=D.useRef(!0);return D.useEffect(()=>{if(l.current){l.current=!1;return}o(c=>c+1)},[e]),n}var Bf={};Nc(Bf,{Autocomplete:()=>Vw,Breadcrumb:()=>Hw,Dropdown:()=>Fw,EmptyState:()=>Pw,FormField:()=>Uw,Markdown:()=>mk,MarkdownInline:()=>hk,MenuItem:()=>r1,Pagination:()=>qw,SearchField:()=>Dw,Stat:()=>Zw,Stepper:()=>Xw,Tag:()=>Lw,renderRichTextInlines:()=>yr});var Cw={50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",400:"#38bdf8",600:"#0284c7",700:"#0369a1"},Tw={50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",900:"#111827"},Mw={50:"#f0fdf4",200:"#bbf7d0",500:"#22c55e",700:"#15803d"},Ow={50:"#fffbeb",200:"#fde68a",500:"#f59e0b",700:"#b45309"},Rw={50:"#fef2f2",100:"#fee2e2",200:"#fecaca",500:"#ef4444",600:"#dc2626",700:"#b91c1c"},Aw={50:"#ecfeff",200:"#a5f3fc",500:"#06b6d4",700:"#0e7490"},W={primary:Cw,gray:Tw,success:Mw,warning:Ow,error:Rw,info:Aw,white:"#ffffff"};function Dw({value:e,onChange:n,onSearch:o,placeholder:l="Search...",showButton:c=!1,buttonText:u="Search",loading:d,disabled:p,size:g="md",style:h,className:y}){const[v,j]=D.useState(""),k=e!==void 0?e:v,x=$=>{e===void 0&&j($),n==null||n($)},z=()=>{o==null||o(k)},E=$=>{$.key==="Enter"&&!p&&z()},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:W.gray[400],pointerEvents:"none",display:"flex",alignItems:"center"},children:d?i.jsx(Ga,{size:16}):i.jsx(wt,{name:"search",size:16})}),i.jsx("input",{type:"search",value:k,onChange:$=>x($.target.value),onKeyDown:E,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 ${W.gray[300]}`,backgroundColor:p?W.gray[50]:W.white,color:W.gray[900],outline:"none",boxSizing:"border-box"}})]}),c&&i.jsx(ca,{onClick:z,disabled:p||d,size:w[g],loading:d,children:u})]})}function Uw({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:W.gray[700]},children:[e,c&&i.jsx("span",{style:{color:W.error[500],marginLeft:"2px"},children:"*"})]}),u&&i.jsx("span",{style:{fontSize:be.xs,color:W.gray[500],marginBottom:"4px"},children:u}),n,(o||l)&&i.jsx("span",{style:{fontSize:be.xs,color:g?W.error[500]:W.gray[500]},children:o||l})]})}function r1({label:e,icon:n,rightElement:o,onClick:l,disabled:c,active:u,danger:d,style:p,className:g}){const h=d?W.error[600]:W.gray[700],y=d?W.error[50]:W.gray[100],v=d?W.error[100]:W.primary[50];return i.jsxs("button",{onClick:c?void 0:l,disabled:c,className:g,style:{display:"flex",alignItems:"center",gap:"8px",width:"100%",padding:"8px 12px",border:"none",borderRadius:Xt.md,backgroundColor:u?v:"transparent",color:c?W.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:W.gray[400]},children:o})]})}var Iw={default:{backgroundColor:W.gray[100],color:W.gray[700],border:`1px solid ${W.gray[200]}`},primary:{backgroundColor:W.primary[50],color:W.primary[700],border:`1px solid ${W.primary[200]}`},success:{backgroundColor:W.success[50],color:W.success[700],border:`1px solid ${W.success[200]}`},warning:{backgroundColor:W.warning[50],color:W.warning[700],border:`1px solid ${W.warning[200]}`},error:{backgroundColor:W.error[50],color:W.error[700],border:`1px solid ${W.error[200]}`},info:{backgroundColor:W.info[50],color:W.info[700],border:`1px solid ${W.info[200]}`}},Bw={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 Lw({children:e,variant:n="default",size:o="md",closable:l,onClose:c,icon:u,style:d,className:p}){const g=Bw[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",...Iw[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 Fw({trigger:e,options:n,value:o,onChange:l,placement:c="bottom-start",disabled:u,style:d,className:p}){const[g,h]=D.useState(!1),y=D.useRef(null);D.useEffect(()=>{const k=x=>{y.current&&!y.current.contains(x.target)&&h(!1)};if(g)return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[g]),D.useEffect(()=>{const k=x=>{x.key==="Escape"&&h(!1)};if(g)return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[g]);const v=k=>{l==null||l(k),h(!1)},j=()=>{switch(c){case"bottom-start":return{top:"100%",left:0,marginTop:"4px"};case"bottom-end":return{top:"100%",right:0,marginTop:"4px"};case"top-start":return{bottom:"100%",left:0,marginBottom:"4px"};case"top-end":return{bottom:"100%",right:0,marginBottom:"4px"};default:return{top:"100%",left:0,marginTop:"4px"}}};return i.jsxs("div",{ref:y,className:p,style:{position:"relative",display:"inline-block",...d},children:[i.jsx("div",{onClick:()=>!u&&h(!g),style:{cursor:u?"not-allowed":"pointer"},children:e}),g&&i.jsx("div",{style:{position:"absolute",...j(),minWidth:"160px",backgroundColor:W.white,border:`1px solid ${W.gray[200]}`,borderRadius:Xt.lg,boxShadow:ll.lg,zIndex:Zi.dropdown,padding:"4px"},children:n.map(k=>i.jsx(r1,{label:k.label,icon:k.icon,onClick:()=>v(k.value),disabled:k.disabled,active:o===k.value,danger:k.danger},k.value))})]})}function Vw({value:e="",onChange:n,onSelect:o,options:l,placeholder:c,label:u,loading:d,disabled:p,error:g,noResultsText:h="No results found",style:y,className:v}){const[j,k]=D.useState(!1),[x,z]=D.useState(-1),E=D.useRef(null),w=D.useMemo(()=>{if(!e)return l;const _=e.toLowerCase();return l.filter(S=>S.label.toLowerCase().includes(_)||S.value.toLowerCase().includes(_))},[l,e]);D.useEffect(()=>{const _=S=>{E.current&&!E.current.contains(S.target)&&k(!1)};return document.addEventListener("mousedown",_),()=>document.removeEventListener("mousedown",_)},[]);const $=_=>{n==null||n(_),k(!0),z(-1)},N=_=>{n==null||n(_.label),o==null||o(_),k(!1),z(-1)},R=_=>{if(!j){(_.key==="ArrowDown"||_.key==="ArrowUp")&&k(!0);return}switch(_.key){case"ArrowDown":_.preventDefault(),z(S=>S<w.length-1?S+1:S);break;case"ArrowUp":_.preventDefault(),z(S=>S>0?S-1:S);break;case"Enter":_.preventDefault(),x>=0&&w[x]&&N(w[x]);break;case"Escape":k(!1),z(-1);break}};return i.jsxs("div",{ref:E,className:v,style:{position:"relative",...y},children:[i.jsx("div",{onKeyDown:R,children:i.jsx(t1,{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:W.white,border:`1px solid ${W.gray[200]}`,borderRadius:Xt.lg,boxShadow:ll.lg,zIndex:Zi.dropdown,maxHeight:"240px",overflow:"auto"},children:d?i.jsx("div",{style:{padding:"12px",display:"flex",justifyContent:"center"},children:i.jsx(Ga,{size:20})}):w.length===0?i.jsx("div",{style:{padding:"12px",textAlign:"center",color:W.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?W.gray[100]:"transparent",color:_.disabled?W.gray[400]:W.gray[900],fontSize:be.sm,display:"flex",alignItems:"center",gap:"8px"},onMouseEnter:()=>z(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:W.gray[500]},children:_.description})]})]},_.value))})]})}function Hw({items:e,separator:n="/",onItemClick:o,style:l,className:c}){return i.jsx("nav",{"aria-label":"Breadcrumb",className:c,style:{display:"flex",alignItems:"center",gap:"8px",fontSize:be.sm,...l},children:e.map((u,d)=>{const p=d===e.length-1;return i.jsxs(D.Fragment,{children:[d>0&&i.jsx("span",{style:{color:W.gray[400]},children:n}),u.icon&&i.jsx("span",{style:{display:"flex",alignItems:"center",color:p?W.gray[900]:W.gray[500]},children:u.icon}),p?i.jsx("span",{style:{color:W.gray[900],fontWeight:500},"aria-current":"page",children:u.label}):u.href?i.jsx(fp,{href:u.href,tone:"muted",underline:"hover",onClick:g=>{o&&(g.preventDefault(),o(u,d))},children:u.label}):i.jsx("button",{onClick:()=>o==null?void 0:o(u,d),style:{background:"none",border:"none",padding:0,color:W.gray[500],cursor:"pointer",fontSize:"inherit"},children:u.label})]},d)})})}function qw({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 z=Math.max(2,e-x),E=Math.min(n-1,e+x);e<=x+2&&(E=Math.min(n-1,c-2)),e>=n-x-1&&(z=Math.max(2,n-c+3)),z>2&&k.push("ellipsis");for(let w=z;w<=E;w++)k.push(w);E<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?W.primary[600]:"transparent",color:x?W.white:W.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(ca,{variant:"ghost",size:y,onClick:()=>o==null?void 0:o(1),disabled:d||e===1,"aria-label":"First page",children:[i.jsx(wt,{name:"chevron-left",size:v}),i.jsx(wt,{name:"chevron-left",size:v,style:{marginLeft:"-8px"}})]}),i.jsx(ca,{variant:"ghost",size:y,onClick:()=>o==null?void 0:o(e-1),disabled:d||e===1,"aria-label":"Previous page",children:i.jsx(wt,{name:"chevron-left",size:v})}),h().map((k,x)=>k==="ellipsis"?i.jsx("span",{style:{padding:"0 4px",color:W.gray[400]},children:"..."},`ellipsis-${x}`):i.jsx(j,{page:k,active:k===e},k)),i.jsx(ca,{variant:"ghost",size:y,onClick:()=>o==null?void 0:o(e+1),disabled:d||e===n,"aria-label":"Next page",children:i.jsx(wt,{name:"chevron-right",size:v})}),l&&i.jsxs(ca,{variant:"ghost",size:y,onClick:()=>o==null?void 0:o(n),disabled:d||e===n,"aria-label":"Last page",children:[i.jsx(wt,{name:"chevron-right",size:v}),i.jsx(wt,{name:"chevron-right",size:v,style:{marginLeft:"-8px"}})]})]})}function Pw({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(qi,{align:"center",gap:"sm",className:u,style:d,children:[e!==void 0&&(typeof e=="string"?i.jsx(wt,{name:e,size:40,tone:"subtle"}):e),i.jsx(Uc,{level:3,children:n}),o!==void 0&&i.jsx(hr,{tone:"muted",children:o}),l!==void 0&&i.jsx("div",{style:{marginTop:"var(--ggui-spacing-sm, 8px)"},children:l})]})}function Zw({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(qi,{gap:"xs",className:d,style:u,children:[i.jsxs(Bi,{gap:"xs",align:"center",children:[c!==void 0&&(typeof c=="string"?i.jsx(wt,{name:c,size:16,tone:"muted"}):c),i.jsx(hr,{size:"xs",weight:"semibold",caps:!0,tone:"muted",children:e})]}),i.jsxs(Bi,{gap:"sm",align:"end",children:[i.jsx(hr,{size:"3xl",weight:"bold",children:n}),o!==void 0&&i.jsx(hr,{size:"sm",weight:"semibold",tone:p,children:o})]})]})}var Lf=28;function Gw(e,n){return e<n?"completed":e===n?"current":"upcoming"}var Yw={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 Kw({index:e,state:n}){return i.jsx("span",{"aria-hidden":"true",style:{width:Lf,height:Lf,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",...Yw[n]},children:n==="completed"?i.jsx(wt,{name:"check",size:16,tone:"inherit"}):i.jsx(hr,{is:"span",size:"sm",weight:"semibold",tone:"inherit",children:e+1})})}function Jw({label:e,state:n}){return i.jsx(hr,{is:"span",size:"sm",weight:n==="current"?"semibold":"normal",tone:n==="upcoming"?"muted":"default",children:e})}function Xw({steps:e,current:n,orientation:o="horizontal",onStepClick:l,style:c,className:u}){const d=(p,g)=>{const h=Gw(g,n),y=i.jsxs(Bi,{gap:"sm",align:"center",children:[i.jsx(Kw,{index:g,state:h}),i.jsx(Jw,{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(qi,{gap:"none",align:"start",children:e.map((p,g)=>i.jsxs(qi,{gap:"none",align:"start",children:[g>0&&i.jsx("span",{style:{width:Lf,height:16,display:"inline-flex",justifyContent:"center"},children:i.jsx(Df,{orientation:"vertical",margin:0})}),d(p,g)]},g))})}):i.jsx("nav",{"aria-label":"Progress",className:u,style:c,children:i.jsx(Bi,{gap:"sm",align:"center",children:e.map((p,g)=>i.jsxs(Bi,{gap:"sm",align:"center",style:g>0?{flex:1}:void 0,children:[g>0&&i.jsx(Df,{style:{flex:1,minWidth:16,margin:0}}),d(p,g)]},g))})})}var Ww=/^(?:https?:\/\/|mailto:)[^\s\x00-\x1f]+$/i;function Qw(e){return Ww.test(e)?e:void 0}function ek(e){const n=new Set;for(const o of e)o>0&&n.add(o-1);return n}function i1(e){return e===void 0||e===" "||e===" "||e===`
|
|
160
|
-
`}function o1(e){return e!==void 0&&/[A-Za-z0-9]/.test(e)}function tk(e,n,o){return i1(o)?!1:e==="_"||e==="__"?!o1(n):!0}function ak(e,n,o){return i1(n)?!1:e==="_"||e==="__"?!o1(o):!0}var nk=new Set("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~");function Li(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&&nk.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("]"),z=x===-1?o.length-1:x-1,E=new Set;let w=j;for(let R=z;R>=0;R--){const _=o[R];if(!(_===void 0||_[0]!==p)&&!(_.length>w)&&ak(_,v,k)&&(E.add(R),w-=_.length,w===0))break}if(E.size>0)return u(),{children:l,closedBy:Math.max(...E),closedIdxs:E,runConsumed:j-w,pos:d};const $=h??y,N=e[d+$.length];if(tk($,v,N)){u();const R=Li(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:ek(R.closedIdxs),runConsumed:R.runConsumed,pos:R.pos}}c+=$,d+=$.length;continue}if(p==="["){const g=Li(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:Qw(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 rk(e){return Li(e,0,[]).children}var ik=/^```+\s*(\S*)\s*$/,ok=/^```+\s*$/,lk=/^(#{1,6})\s+(.*)$/,sk=/^\s*[-*+]\s+(.*)$/,ck=/^\s*(\d{1,9})[.)]\s+(.*)$/;function uk(e){const n=[],o=e.split(`
|
|
162
|
-
`);let l=[],c;const u=()=>{l.length>0&&(n.push({type:"paragraph",children:Li(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(ik);if(h!==null){u(),d();const k=h[1]!==void 0&&h[1].length>0?h[1]:void 0,x=[];let z=!1,E=p+1;for(;E<o.length;E++){const w=o[E];if(w!==void 0&&ok.test(w)){z=!0;break}x.push(w??"")}n.push({type:"code-fence",code:x.join(`
|
|
164
|
-
`),lang:k,closed:z}),p=E;continue}if(g.trim().length===0){u(),d();continue}const y=g.match(lk);if(y!==null&&y[1]!==void 0){u(),d();const k=y[1].length;n.push({type:"heading",level:k,children:Li(y[2]??"",0,[]).children});continue}const v=g.match(ck),j=v===null?g.match(sk):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:Li(x,0,[]).children});continue}d(),l.push(g)}return u(),d(),n}var dk={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"},fk={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},pk={color:"var(--ggui-color-primary, #4f46e5)",textDecoration:"none"},wv={margin:0,paddingInlineStart:"var(--ggui-spacing-lg, 24px)"};function yr(e){return e.map((n,o)=>{switch(n.type){case"text":return n.text;case"break":return i.jsx("br",{},o);case"strong":return i.jsx("strong",{children:yr(n.children)},o);case"em":return i.jsx("em",{children:yr(n.children)},o);case"code":return i.jsx("code",{style:dk,children:n.code},o);case"link":{const l=yr(n.children);return n.href!==void 0?i.jsx(fp,{href:n.href,external:!0,children:l},o):i.jsx("span",{style:pk,children:l},o)}}})}function gk(e,n){switch(e.type){case"paragraph":return i.jsx(hr,{children:yr(e.children)},n);case"heading":return i.jsx(Uc,{level:e.level,children:yr(e.children)},n);case"code-fence":return i.jsx("pre",{style:fk,"data-lang":e.lang,children:i.jsx("code",{children:e.code})},n);case"list":{const o=e.items.map((l,c)=>i.jsx("li",{children:yr(l.children)},c));return e.ordered?i.jsx("ol",{start:e.start,style:wv,children:o},n):i.jsx("ul",{style:wv,children:o},n)}}}function mk({markdown:e,className:n,style:o}){const l=uk(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(gk)})}function hk({markdown:e}){return i.jsx(i.Fragment,{children:yr(rk(e))})}var Ff={};Nc(Ff,{CardGrid:()=>$k,ChatWindow:()=>_k,CommandPalette:()=>Ck,CommentThread:()=>bk,DataTable:()=>xk,FileUploader:()=>Sk,Footer:()=>Tk,Header:()=>yk,Hero:()=>Mk,Modal:()=>zk,NavigationBar:()=>jk,NotificationCenter:()=>Nk,Sidebar:()=>vk});function yk({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||W.white,borderBottom:u?`1px solid ${W.gray[200]}`:void 0,...l&&{position:"sticky",top:0,zIndex:Zi.sticky,boxShadow:ll.sm},...d},children:[e&&i.jsx("div",{style:{flexShrink:0},children:e}),n&&i.jsx("nav",{style:{display:"flex",alignItems:"center",flex:1,marginLeft:"32px"},children:n}),o&&i.jsx("div",{style:{display:"flex",alignItems:"center",gap:"12px",flexShrink:0},children:o})]})}function l1({item:e,activeId:n,onItemClick:o,collapsed:l,depth:c=0}){const[u,d]=D.useState(!1),p=e.children&&e.children.length>0,g=n===e.id,h=()=>{p&&!l&&d(!u),o==null||o(e)};return i.jsxs("div",{children:[i.jsxs("button",{onClick:h,disabled:e.disabled,style:{display:"flex",alignItems:"center",gap:"12px",width:"100%",padding:l?"10px":"10px 12px",paddingLeft:l?"10px":`${12+c*16}px`,border:"none",borderRadius:Xt.md,backgroundColor:g?W.primary[50]:"transparent",color:e.disabled?W.gray[400]:g?W.primary[700]:W.gray[700],fontSize:be.sm,fontWeight:g?Xe.medium:Xe.normal,textAlign:"left",cursor:e.disabled?"not-allowed":"pointer",transition:"all 0.15s",justifyContent:l?"center":"flex-start"},children:[e.icon&&i.jsx("span",{style:{display:"flex",flexShrink:0},children:e.icon}),!l&&i.jsxs(i.Fragment,{children:[i.jsx("span",{style:{flex:1},children:e.label}),e.badge&&i.jsx("span",{children:e.badge}),p&&i.jsx(wt,{name:u?"chevron-down":"chevron-right",size:14,tone:"subtle"})]})]}),p&&u&&!l&&i.jsx("div",{style:{marginTop:"4px"},children:e.children.map(y=>i.jsx(l1,{item:y,activeId:n,onItemClick:o,collapsed:l,depth:c+1},y.id))})]})}function vk({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:W.white,borderRight:`1px solid ${W.gray[200]}`,transition:"width 0.2s",overflow:"hidden",...g},children:[c&&i.jsx("div",{style:{padding:l?"16px 8px":"16px",borderBottom:`1px solid ${W.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(l1,{item:v,activeId:n,onItemClick:o,collapsed:l},v.id))})}),u&&i.jsx("div",{style:{padding:l?"16px 8px":"16px",borderTop:`1px solid ${W.gray[200]}`},children:u})]})}function $k({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 s1({comment:e,onReply:n,onReaction:o,depth:l=0}){var y,v;const[c,u]=D.useState(!1),[d,p]=D.useState(""),g=()=>{d.trim()&&(n==null||n(e.id,d),p(""),u(!1))},h=e.timestamp instanceof Date?e.timestamp.toLocaleString():e.timestamp;return i.jsxs("div",{style:{marginLeft:l>0?"40px":0},children:[i.jsxs("div",{style:{display:"flex",gap:"12px"},children:[i.jsx(Ic,{name:e.author.name,src:e.author.avatar,size:"sm"}),i.jsxs("div",{style:{flex:1},children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[i.jsx("span",{style:{fontWeight:500,fontSize:be.sm},children:e.author.name}),i.jsx("span",{style:{color:W.gray[500],fontSize:be.xs},children:h})]}),i.jsx("p",{style:{margin:"4px 0 8px",fontSize:be.sm,color:W.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 ${W.gray[200]}`,borderRadius:"12px",backgroundColor:W.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:W.gray[500],fontSize:be.xs,cursor:"pointer"},children:"Reply"})]}),c&&i.jsxs("div",{style:{marginTop:"12px"},children:[i.jsx(up,{value:d,onChange:p,placeholder:"Write a reply...",rows:2}),i.jsxs("div",{style:{display:"flex",gap:"8px",marginTop:"8px"},children:[i.jsx(ca,{size:"sm",onClick:g,children:"Reply"}),i.jsx(ca,{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(s1,{comment:j,onReply:n,onReaction:o,depth:l+1})},j.id))]})}function bk({comments:e,currentUser:n,onAddComment:o,onReply:l,onReaction:c,loading:u,style:d,className:p}){const[g,h]=D.useState(""),y=()=>{g.trim()&&(o==null||o(g),h(""))};return i.jsxs("div",{className:p,style:{...d},children:[n&&i.jsxs("div",{style:{display:"flex",gap:"12px",marginBottom:"24px"},children:[i.jsx(Ic,{name:n.name,src:n.avatar,size:"sm"}),i.jsxs("div",{style:{flex:1},children:[i.jsx(up,{value:g,onChange:h,placeholder:"Write a comment...",rows:3}),i.jsx("div",{style:{marginTop:"8px",display:"flex",justifyContent:"flex-end"},children:i.jsx(ca,{onClick:y,disabled:!g.trim(),children:"Comment"})})]})]}),u?i.jsx("div",{style:{display:"flex",justifyContent:"center",padding:"24px"},children:i.jsx(Ga,{size:24})}):i.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"20px"},children:e.map(v=>i.jsx(s1,{comment:v,onReply:l,onReaction:c},v.id))})]})}function xk({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),z=N=>{N?v==null||v(n.map((R,_)=>x(R,_))):v==null||v([])},E=(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 ${W.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:W.gray[50]},children:[h&&i.jsx("th",{style:{width:"40px",padding:"12px"},children:i.jsx(Uf,{checked:w,indeterminate:$,onChange:z})}),e.map(N=>i.jsx("th",{style:{padding:"12px 16px",textAlign:N.align||"left",fontWeight:Xe.semibold,color:W.gray[700],borderBottom:`1px solid ${W.gray[200]}`,cursor:N.sortable?"pointer":void 0,width:N.width},onClick:()=>N.sortable&&(u==null?void 0:u(N.key,d===N.key&&p==="asc"?"desc":"asc")),children:i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[N.header,N.sortable&&d===N.key&&i.jsx(wt,{name:p==="asc"?"chevron-up":"chevron-down",size:14})]})},N.key))]})}),i.jsx("tbody",{children:l?i.jsx("tr",{children:i.jsx("td",{colSpan:e.length+(h?1:0),style:{padding:"48px",textAlign:"center"},children:i.jsx(Ga,{size:24})})}):n.length===0?i.jsx("tr",{children:i.jsx("td",{colSpan:e.length+(h?1:0),style:{padding:"48px",textAlign:"center",color:W.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?W.primary[50]:void 0,cursor:g?"pointer":void 0,transition:"background-color 0.15s"},children:[h&&i.jsx("td",{style:{padding:"12px"},children:i.jsx(Uf,{checked:S,onChange:C=>E(_,C)})}),e.map(C=>i.jsx("td",{style:{padding:"12px 16px",textAlign:C.align||"left",color:W.gray[900],borderBottom:`1px solid ${W.gray[100]}`},children:C.render?C.render(N[C.key],N,R):String(N[C.key]??"")},C.key))]},_)})})]})})}function _k({messages:e,currentUserId:n,onSendMessage:o,loading:l,typing:c,placeholder:u="Type a message...",header:d,style:p,className:g}){const[h,y]=D.useState(""),v=D.useRef(null);D.useEffect(()=>{var x;(x=v.current)==null||x.scrollIntoView({behavior:"smooth"})},[e]);const j=()=>{h.trim()&&(o==null||o(h),y(""))},k=x=>{x.key==="Enter"&&!x.shiftKey&&(x.preventDefault(),j())};return i.jsxs("div",{className:g,style:{display:"flex",flexDirection:"column",height:"100%",border:`1px solid ${W.gray[200]}`,borderRadius:Xt.lg,backgroundColor:W.white,overflow:"hidden",...p},children:[d&&i.jsx("div",{style:{padding:"12px 16px",borderBottom:`1px solid ${W.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(Ga,{size:24})}):e.map(x=>{const z=x.sender.id===n,E=x.timestamp instanceof Date?x.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):x.timestamp;return i.jsxs("div",{style:{display:"flex",flexDirection:z?"row-reverse":"row",alignItems:"flex-end",gap:"8px"},children:[!z&&i.jsx(Ic,{name:x.sender.name,src:x.sender.avatar,size:"xs"}),i.jsxs("div",{style:{maxWidth:"70%",padding:"10px 14px",borderRadius:Xt.lg,backgroundColor:z?W.primary[600]:W.gray[100],color:z?W.white:W.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:E}),z&&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:W.gray[500]},children:[c.name," is typing..."]})}),i.jsx("div",{ref:v})]}),i.jsxs("div",{style:{padding:"12px 16px",borderTop:`1px solid ${W.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 ${W.gray[300]}`,borderRadius:Xt.full,fontSize:be.sm,outline:"none"}}),i.jsx(ca,{onClick:j,disabled:!h.trim(),children:i.jsx(wt,{name:"chevron-right",size:18})})]})]})}function jk({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?W.primary[600]:W.gray[600]},pills:{borderRadius:Xt.full,backgroundColor:h?W.primary[100]:"transparent",color:h?W.primary[700]:W.gray[600],fontWeight:h?Xe.medium:Xe.normal},underline:{borderBottom:h?`2px solid ${W.primary[600]}`:"2px solid transparent",color:h?W.primary[600]:W.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 ${W.gray[200]}`},...u},children:e.map(p)})}function kv(e){if(e===0)return"0 B";const n=1024,o=["B","KB","MB","GB"],l=Math.floor(Math.log(e)/Math.log(n));return`${parseFloat((e/Math.pow(n,l)).toFixed(1))} ${o[l]}`}function Sk({files:e=[],onFilesSelected:n,onFileRemove:o,accept:l,multiple:c=!0,maxSize:u,maxFiles:d,disabled:p,dragDrop:g=!0,style:h,className:y}){const[v,j]=D.useState(!1),k=D.useRef(null),x=$=>{if(!$)return;let N=Array.from($);d&&(N=N.slice(0,d-e.length)),u&&(N=N.filter(R=>R.size<=u)),n==null||n(N)},z=$=>{$.preventDefault(),j(!1),!p&&g&&x($.dataTransfer.files)},E=$=>{$.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:z,onDragOver:E,onDragLeave:w,style:{border:`2px dashed ${v?W.primary[400]:W.gray[300]}`,borderRadius:Xt.lg,padding:"32px",textAlign:"center",backgroundColor:v?W.primary[50]:W.gray[50],cursor:p?"not-allowed":"pointer",transition:"all 0.2s",opacity:p?.5:1},children:[i.jsx("input",{ref:k,type:"file",accept:l,multiple:c,onChange:$=>x($.target.files),disabled:p,style:{display:"none"}}),i.jsx(wt,{name:"plus",size:32,tone:"subtle"}),i.jsx("p",{style:{margin:"12px 0 4px",color:W.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:W.gray[500],fontSize:be.xs},children:[l&&`Accepted: ${l}`,u&&` • Max size: ${kv(u)}`,d&&` • Max files: ${d}`]})]}),e.length>0&&i.jsx("div",{style:{marginTop:"16px",display:"flex",flexDirection:"column",gap:"8px"},children:e.map($=>i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",padding:"12px",border:`1px solid ${W.gray[200]}`,borderRadius:Xt.md,backgroundColor:W.white},children:[i.jsx(wt,{name:"menu",size:20,tone:"subtle"}),i.jsxs("div",{style:{flex:1,minWidth:0},children:[i.jsx("p",{style:{margin:0,fontSize:be.sm,color:W.gray[900],whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:$.name}),i.jsxs("p",{style:{margin:"2px 0 0",fontSize:be.xs,color:W.gray[500]},children:[kv($.size),$.error&&i.jsx("span",{style:{color:W.error[500],marginLeft:"8px"},children:$.error})]}),$.status==="uploading"&&$.progress!==void 0&&i.jsx(a1,{value:$.progress,size:"sm",style:{marginTop:"8px"}})]}),i.jsx(ca,{variant:"ghost",size:"sm",onClick:()=>o==null?void 0:o($.id),children:i.jsx(wt,{name:"x",size:16})})]},$.id))})]})}var wk={info:W.info[500],success:W.success[500],warning:W.warning[500],error:W.error[500]};function kk({notification:e,onMarkAsRead:n,onDismiss:o}){const l=e.timestamp instanceof Date?e.timestamp.toLocaleString():e.timestamp,c=wk[e.type||"info"];return i.jsxs("div",{style:{display:"flex",gap:"12px",padding:"12px",backgroundColor:e.read?"transparent":W.primary[50],borderRadius:Xt.md,transition:"background-color 0.15s"},children:[i.jsx("div",{style:{width:"8px",height:"8px",borderRadius:"50%",backgroundColor:e.read?"transparent":c,flexShrink:0,marginTop:"6px"}}),i.jsxs("div",{style:{flex:1,minWidth:0},children:[i.jsxs("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:"8px"},children:[i.jsx("p",{style:{margin:0,fontWeight:Xe.medium,color:W.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:W.gray[400],flexShrink:0},children:i.jsx(wt,{name:"x",size:14})})]}),e.message&&i.jsx("p",{style:{margin:"4px 0 0",color:W.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:W.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:W.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:W.primary[600],fontSize:be.xs,cursor:"pointer"},children:e.action.label})]})]})]})}function Nk({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 ${W.gray[200]}`},children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[i.jsx("span",{style:{fontWeight:Xe.semibold,color:W.gray[900]},children:"Notifications"}),h>0&&i.jsx("span",{style:{padding:"2px 8px",borderRadius:"12px",backgroundColor:W.primary[100],color:W.primary[700],fontSize:be.xs,fontWeight:Xe.medium},children:h})]}),i.jsxs("div",{style:{display:"flex",gap:"8px"},children:[h>0&&i.jsx(ca,{variant:"ghost",size:"sm",onClick:o,children:"Mark all read"}),e.length>0&&i.jsx(ca,{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(Ga,{size:24})}):e.length===0?i.jsx("div",{style:{textAlign:"center",padding:"32px",color:W.gray[500]},children:u}):i.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:e.map(y=>i.jsx(kk,{notification:y,onMarkAsRead:n,onDismiss:l},y.id))})})]})}var Ek={sm:"400px",md:"500px",lg:"640px",xl:"800px",full:"100vw"};function zk({open:e,onClose:n,title:o,children:l,footer:c,size:u="md",closeOnOverlayClick:d=!0,closeOnEscape:p=!0,showCloseButton:g=!0,style:h,className:y}){const v=D.useCallback(x=>{x.key==="Escape"&&p&&n()},[p,n]);if(D.useEffect(()=>{if(e)return document.addEventListener("keydown",v),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",v),document.body.style.overflow=""}},[e,v]),!e)return null;const j=x=>{x.target===x.currentTarget&&d&&n()},k=u==="full";return i.jsxs("div",{style:{position:"fixed",inset:0,zIndex:Zi.modal,display:"flex",alignItems:k?"stretch":"center",justifyContent:"center",padding:k?0:"24px"},children:[i.jsx("div",{onClick:j,style:{position:"absolute",inset:0,backgroundColor:"rgba(0, 0, 0, 0.5)",animation:If.fadeIn}}),i.jsxs("div",{role:"dialog","aria-modal":"true",className:y,style:{position:"relative",width:Ek[u],maxWidth:k?"100%":"calc(100vw - 48px)",maxHeight:k?"100%":"calc(100vh - 48px)",backgroundColor:W.white,borderRadius:k?0:Xt.xl,boxShadow:ll["2xl"],display:"flex",flexDirection:"column",overflow:"hidden",animation:If.scaleIn,...h},children:[(o||g)&&i.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px 20px",borderBottom:`1px solid ${W.gray[200]}`},children:[o&&i.jsx(Uc,{level:4,children:o}),g&&i.jsx(ca,{variant:"ghost",size:"sm",onClick:n,"aria-label":"Close modal",style:{marginLeft:"auto"},children:i.jsx(wt,{name:"x",size:20})})]}),i.jsx("div",{style:{flex:1,padding:"20px",overflowY:"auto"},children:l}),c&&i.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:"8px",padding:"16px 20px",borderTop:`1px solid ${W.gray[200]}`},children:c})]})]})}function Ck({open:e,onClose:n,commands:o,onSelect:l,placeholder:c="Search commands...",recentIds:u=[],loading:d,style:p,className:g}){const[h,y]=D.useState(""),[v,j]=D.useState(0),k=D.useMemo(()=>{const w=h?o.filter(N=>{var R;return N.label.toLowerCase().includes(h.toLowerCase())||((R=N.description)==null?void 0:R.toLowerCase().includes(h.toLowerCase()))}):o,$=new Map;if(!h&&u.length>0){const N=u.map(R=>o.find(_=>_.id===R)).filter(Boolean);N.length>0&&$.set("Recent",N)}return w.forEach(N=>{const R=N.group||"Commands";$.has(R)||$.set(R,[]),!(!h&&u.includes(N.id)&&$.has("Recent"))&&$.get(R).push(N)}),$},[o,h,u]),x=D.useMemo(()=>{const w=[];return k.forEach($=>w.push(...$)),w},[k]);D.useEffect(()=>{j(0)},[h]),D.useEffect(()=>{e&&(y(""),j(0))},[e]);const z=D.useCallback(w=>{if(w.key==="Escape"){n();return}if(w.key==="ArrowDown")w.preventDefault(),j($=>Math.min($+1,x.length-1));else if(w.key==="ArrowUp")w.preventDefault(),j($=>Math.max($-1,0));else if(w.key==="Enter"){w.preventDefault();const $=x[v];$&&!$.disabled&&(l($),n())}},[x,v,l,n]);if(D.useEffect(()=>{if(e)return document.addEventListener("keydown",z),()=>document.removeEventListener("keydown",z)},[e,z]),!e)return null;let E=0;return i.jsxs("div",{style:{position:"fixed",inset:0,zIndex:Zi.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:W.white,borderRadius:Xt.xl,boxShadow:ll["2xl"],overflow:"hidden",display:"flex",flexDirection:"column",...p},children:[i.jsx("div",{style:{padding:"12px",borderBottom:`1px solid ${W.gray[200]}`},children:i.jsxs("div",{style:{position:"relative"},children:[i.jsx(wt,{name:"search",size:18,tone:"subtle",style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)"}}),i.jsx("input",{type:"text",value:h,onChange:w=>y(w.target.value),placeholder:c,autoFocus:!0,style:{width:"100%",padding:"12px 12px 12px 42px",border:"none",fontSize:be.base,outline:"none",backgroundColor:"transparent"}})]})}),i.jsx("div",{style:{flex:1,overflowY:"auto",padding:"8px"},children:d?i.jsx("div",{style:{display:"flex",justifyContent:"center",padding:"32px"},children:i.jsx(Ga,{size:24})}):x.length===0?i.jsx("div",{style:{textAlign:"center",padding:"32px",color:W.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:W.gray[500],textTransform:"uppercase",letterSpacing:"0.05em"},children:w}),$.map(N=>{const _=E++===v;return i.jsxs("button",{onClick:()=>{N.disabled||(l(N),n())},disabled:N.disabled,style:{display:"flex",alignItems:"center",gap:"12px",width:"100%",padding:"10px 12px",border:"none",borderRadius:Xt.md,backgroundColor:_?W.gray[100]:"transparent",color:N.disabled?W.gray[400]:W.gray[900],textAlign:"left",cursor:N.disabled?"not-allowed":"pointer"},children:[N.icon&&i.jsx("span",{style:{display:"flex",color:W.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:W.gray[500]},children:N.description})]}),N.shortcut&&i.jsx("kbd",{style:{padding:"2px 6px",backgroundColor:W.gray[100],borderRadius:Xt.sm,fontSize:be.xs,color:W.gray[500],fontFamily:"inherit"},children:N.shortcut})]},N.id)})]},w))}),i.jsxs("div",{style:{padding:"8px 12px",borderTop:`1px solid ${W.gray[200]}`,display:"flex",alignItems:"center",gap:"16px",fontSize:be.xs,color:W.gray[500]},children:[i.jsx("span",{children:"↑↓ Navigate"}),i.jsx("span",{children:"↵ Select"}),i.jsx("span",{children:"Esc Close"})]})]})]})}function Tk({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||W.gray[50],borderTop:d?`1px solid ${W.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:W.gray[900],lineHeight:xa.normal,margin:"0 0 16px 0",padding:0},children:h.title}),i.jsx("ul",{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",gap:"10px"},children:h.links.map((v,j)=>i.jsx("li",{children:i.jsx("a",{href:v.href,onClick:v.onClick?k=>{var x;k.preventDefault(),(x=v.onClick)==null||x.call(v)}:void 0,style:{fontSize:be.sm,color:W.gray[600],textDecoration:"none",transition:"color 0.15s",lineHeight:xa.normal},"aria-label":v.label,children:v.label})},j))})]},y))]}),(l||c||o)&&i.jsxs("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",justifyContent:"space-between",gap:"16px",padding:"20px 24px",maxWidth:"1280px",margin:"0 auto",borderTop:`1px solid ${W.gray[200]}`},children:[l&&i.jsx("span",{style:{fontSize:be.sm,color:W.gray[500],lineHeight:xa.normal},children:l}),i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"20px"},children:[o==null?void 0:o.map((h,y)=>i.jsx("a",{href:h.href,"aria-label":h.label,style:{display:"flex",alignItems:"center",justifyContent:"center",color:W.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:W.gray[500],textDecoration:"none",transition:"color 0.15s"},children:h.label},y))]})]})]})}function Mk({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,z=x&&h;return i.jsxs("section",{className:v,style:{position:"relative",backgroundColor:p||(x?void 0:W.white),...x&&{backgroundImage:`url(${g})`,backgroundSize:"cover",backgroundPosition:"center"},overflow:"hidden",...y},children:[z&&i.jsx("div",{"aria-hidden":"true",style:{position:"absolute",inset:0,backgroundColor:"rgba(0, 0, 0, 0.5)"}}),i.jsxs("div",{style:{position:"relative",maxWidth:"1280px",margin:"0 auto",padding:k.padding,display:"flex",flexDirection:u==="center"?"column":"row",alignItems:"center",gap:"48px",textAlign:u==="center"?"center":"left"},children:[i.jsxs("div",{style:{flex:u==="left"&&c?"1 1 50%":void 0,maxWidth:u==="center"?"800px":void 0},children:[e&&i.jsx("h1",{style:{fontSize:k.headingSize,fontWeight:Xe.bold,lineHeight:xa.tight,letterSpacing:qr.tight,color:z?W.white:W.gray[900],margin:"0 0 16px 0",padding:0},children:e}),n&&i.jsx("p",{style:{fontSize:k.descSize,lineHeight:xa.relaxed,color:z?"rgba(255,255,255,0.9)":W.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:W.white,backgroundColor:W.primary[600],border:"none",borderRadius:"8px",cursor:"pointer",transition:"background-color 0.15s",lineHeight:xa.normal},children:o.label}),l&&i.jsx("button",{onClick:l.onClick,style:{padding:"12px 28px",fontSize:be.base,fontWeight:Xe.semibold,color:z?W.white:W.gray[700],backgroundColor:"transparent",border:`1px solid ${z?"rgba(255,255,255,0.3)":W.gray[300]}`,borderRadius:"8px",cursor:"pointer",transition:"all 0.15s",lineHeight:xa.normal},children:l.label})]})]}),c&&i.jsx("div",{style:{flex:u==="left"?"1 1 50%":void 0,display:"flex",justifyContent:"center",alignItems:"center",...u==="center"&&{marginTop:"16px"}},children:c})]})]})}var Vf={};Nc(Vf,{Clickable:()=>Ok,Hoverable:()=>Rk,Pressable:()=>Ak});var Ok=D.forwardRef(function({children:n,onClick:o,onDoubleClick:l,hoverStyle:c,activeStyle:u,cursor:d,transition:p="all 200ms ease",disabled:g=!1,role:h,"aria-label":y,tabIndex:v,style:j,className:k,...x},z){const[E,w]=D.useState(!1),[$,N]=D.useState(!1),R=!!o,_=g?"not-allowed":d??(R?"pointer":void 0),S=h??(R?"button":void 0),C=v??(R?0:void 0),U=Z=>{g||!o||(Z.key==="Enter"||Z.key===" ")&&(Z.preventDefault(),o(Z))},te={...j,cursor:_,transition:p,opacity:g?.5:void 0,...E&&!g?c:{},...$&&!g?u:{}};return i.jsx("div",{ref:z,className:k,style:te,onClick:g?void 0:o,onDoubleClick:g?void 0:l,onMouseEnter:()=>w(!0),onMouseLeave:()=>{w(!1),N(!1)},onMouseDown:()=>N(!0),onMouseUp:()=>N(!1),onKeyDown:U,role:S,"aria-label":y,"aria-disabled":g||void 0,tabIndex:C,...x,children:n})}),Rk=D.forwardRef(function({children:n,hoverStyle:o,onHoverChange:l,transition:c="all 200ms ease",style:u,className:d,...p},g){const[h,y]=D.useState(!1),v={...u,transition:c,...h?o:{}};return i.jsx("div",{ref:g,className:d,style:v,onMouseEnter:()=>{y(!0),l==null||l(!0)},onMouseLeave:()=>{y(!1),l==null||l(!1)},...p,children:n})}),Ak=D.forwardRef(function({children:n,onPress:o,onLongPress:l,longPressDelay:c=500,hoverStyle:u,pressStyle:d,disabled:p=!1,transition:g="all 150ms ease",role:h,"aria-label":y,tabIndex:v,style:j,className:k,...x},z){const[E,w]=D.useState(!1),[$,N]=D.useState(!1),[R,_]=D.useState(null),S=!!o||!!l,C=Y=>{if(!p&&(N(!0),l)){const G=setTimeout(()=>{l(Y)},c);_(G)}},U=Y=>{p||(N(!1),R?(clearTimeout(R),_(null),o==null||o(Y)):l||o==null||o(Y))},te=Y=>{p||!o||(Y.key==="Enter"||Y.key===" ")&&(Y.preventDefault(),o(Y))},Z={...j,cursor:p?"not-allowed":S?"pointer":void 0,transition:g,opacity:p?.5:void 0,userSelect:S?"none":void 0,...E&&!p?u:{},...$&&!p?d:{}},V=typeof n=="function"?n({pressed:$,hovered:E}):n;return i.jsx("div",{ref:z,className:k,style:Z,onMouseDown:C,onMouseUp:U,onMouseEnter:()=>w(!0),onMouseLeave:()=>{w(!1),N(!1),R&&clearTimeout(R)},onKeyDown:te,role:h??(S?"button":void 0),"aria-label":y,"aria-disabled":p||void 0,tabIndex:v??(S?0:void 0),...x,children:V})});function Dk(e){return e.replace(/__GGUI_META__[\s\S]*?__GGUI_META_END__/g,"").replace(/__GGUI_STREAM_SPEC__[\s\S]*?__GGUI_STREAM_SPEC_END__/g,"")}function Uk(e){const n=e.$value;if(Array.isArray(n))return n.join(", ");if(n!==null&&typeof n=="object"){const o=n;if(e.$type==="shadow"&&"offsetX"in o)return`${o.offsetX} ${o.offsetY} ${o.blur} ${o.spread} ${o.color}`;if(e.$type==="transition"&&"duration"in o&&"timingFunction"in o)return`${typeof o.property=="string"&&o.property?`${o.property} `:""}${o.duration} ${o.timingFunction}`}return String(n)}function er(e,n,o){for(const[l,c]of Object.entries(e))l.startsWith("$")||(c!==null&&typeof c=="object"&&"$value"in c?o.push(` --ggui-${n}-${l}: ${Uk(c)};`):c!==null&&typeof c=="object"&&er(c,`${n}-${l}`,o))}function Ik(e){const n=[];return er(e.color,"color",n),er(e.font,"font",n),er(e.spacing,"spacing",n),er(e.shape,"shape",n),er({duration:e.motion.duration,easing:e.motion.easing,transition:e.motion.transition},"motion",n),er(e.accessibility,"accessibility",n),er(e.zIndex,"zIndex",n),n.join(`
|
|
165
|
-
`)}function Bk(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 Lk(e){const n=[];for(const[o,l]of Object.entries(e.motion.keyframes))o.startsWith("$")||n.push(Bk(o,String(l.$value)));return n.join(`
|
|
169
|
-
|
|
170
|
-
`)}function Fk(e,n){const l=`:root {
|
|
171
|
-
${Ik(n)}
|
|
172
|
-
}`,c=Lk(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"}}}},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"}}}},Wt={hide:{$type:"number",$value:-1},base:{$type:"number",$value:0},docked:{$type:"number",$value:10},dropdown:{$type:"number",$value:1e3},sticky:{$type:"number",$value:1100},banner:{$type:"number",$value:1200},overlay:{$type:"number",$value:1300},modal:{$type:"number",$value:1400},popover:{$type:"number",$value:1500},skipLink:{$type:"number",$value:1600},toast:{$type:"number",$value:1700},tooltip:{$type:"number",$value:1800}},Bc={fast:{$type:"transition",$value:"100ms cubic-bezier(0.4, 0, 0.2, 1)"},normal:{$type:"transition",$value:"200ms cubic-bezier(0.4, 0, 0.2, 1)"},slow:{$type:"transition",$value:"300ms cubic-bezier(0.4, 0, 0.2, 1)"},colors:{$type:"transition",$value:"color 200ms cubic-bezier(0.4, 0, 0.2, 1), background-color 200ms cubic-bezier(0.4, 0, 0.2, 1), border-color 200ms cubic-bezier(0.4, 0, 0.2, 1)"},opacity:{$type:"transition",$value:"opacity 200ms cubic-bezier(0.4, 0, 0.2, 1)"},transform:{$type:"transition",$value:"transform 200ms cubic-bezier(0, 0, 0.2, 1)"}},ar={font:{family:{sans:{$value:'"Inter", system-ui, -apple-system, sans-serif',$type:"fontFamily"},mono:{$value:'"Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace',$type:"fontFamily"}},size:{sm:{$value:"0.8125rem",$type:"dimension"},base:{$value:"0.875rem",$type:"dimension"},lg:{$value:"1rem",$type:"dimension"},xl:{$value:"1.125rem",$type:"dimension"},"2xl":{$value:"1.375rem",$type:"dimension"}},weight:{normal:{$value:"400",$type:"fontWeight"},medium:{$value:"500",$type:"fontWeight"},semibold:{$value:"600",$type:"fontWeight"},bold:{$value:"700",$type:"fontWeight"}},lineHeight:{tight:{$value:"1.2",$type:"number"},normal:{$value:"1.5",$type:"number"},relaxed:{$value:"1.6",$type:"number"}}},spacing:{1:{$value:"0.25rem",$type:"dimension"},2:{$value:"0.5rem",$type:"dimension"},3:{$value:"0.75rem",$type:"dimension"},4:{$value:"1rem",$type:"dimension"},5:{$value:"1.25rem",$type:"dimension"},6:{$value:"1.5rem",$type:"dimension"},8:{$value:"2rem",$type:"dimension"},10:{$value:"2.5rem",$type:"dimension"},12:{$value:"3rem",$type:"dimension"},xs:{$value:"0.25rem",$type:"dimension"},sm:{$value:"0.5rem",$type:"dimension"},md:{$value:"1rem",$type:"dimension"},lg:{$value:"1.5rem",$type:"dimension"},xl:{$value:"2rem",$type:"dimension"},"2xl":{$value:"3rem",$type:"dimension"}},shape:{radius:{sm:{$value:"2px",$type:"dimension"},md:{$value:"2px",$type:"dimension"},lg:{$value:"4px",$type:"dimension"},xl:{$value:"6px",$type:"dimension"},full:{$value:"9999px",$type:"dimension"}},shadow:{sm:{$value:"none",$type:"shadow"},md:{$value:"0 1px 2px rgba(41, 41, 41, 0.06)",$type:"shadow"},lg:{$value:"0 2px 6px rgba(41, 41, 41, 0.08)",$type:"shadow"},xl:{$value:"0 4px 12px rgba(41, 41, 41, 0.10)",$type:"shadow"}}},motion:{duration:{fast:{$value:"120ms",$type:"duration"},normal:{$value:"200ms",$type:"duration"},slow:{$value:"400ms",$type:"duration"},ambient:{$value:"2000ms",$type:"duration"}},easing:{default:{$value:"cubic-bezier(0.4, 0, 0.2, 1)",$type:"cubicBezier"},bounce:{$value:"cubic-bezier(0.34, 1.56, 0.64, 1)",$type:"cubicBezier"},spring:{$value:"cubic-bezier(0.22, 1, 0.36, 1)",$type:"cubicBezier"}},transition:Bc,keyframes:{"accent-pulse":{$value:"0%{opacity:1}50%{opacity:0.7}100%{opacity:1}",$type:"keyframes"},entrance:{$value:"0%{opacity:0;transform:translateY(4px)}100%{opacity:1;transform:none}",$type:"keyframes"},shimmer:{$value:"0%{background-position:-200% 0}100%{background-position:200% 0}",$type:"keyframes"}}}},Vk={$name:"GGUI",$description:"The default ggui theme — monochrome paper + ink, architectural, no decorative flourish.",$metadata:{font:"Inter",fontUrl:"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Geist+Mono:wght@400;500;700&display=swap",philosophy:"The interface is the artifact, not the chrome around it."},color:{primary:{50:{$value:"#f4f3ed",$type:"color"},100:{$value:"#ebe9e1",$type:"color"},200:{$value:"#e4e4e2",$type:"color"},300:{$value:"#d9d9d9",$type:"color"},400:{$value:"#8c8c93",$type:"color"},500:{$value:"#292929",$type:"color"},600:{$value:"#1f1f1f",$type:"color"},700:{$value:"#171717",$type:"color"},800:{$value:"#0e0e0e",$type:"color"},900:{$value:"#000000",$type:"color"}},neutral:{50:{$value:"#f4f3ed",$type:"color"},100:{$value:"#ebe9e1",$type:"color"},200:{$value:"#e4e4e2",$type:"color"},300:{$value:"#d9d9d9",$type:"color"},400:{$value:"#8c8c93",$type:"color"},500:{$value:"#5a5a5a",$type:"color"},600:{$value:"#3d3d3d",$type:"color"},700:{$value:"#292929",$type:"color"},800:{$value:"#24242c",$type:"color"},900:{$value:"#0e0e0e",$type:"color"}},success:{50:{$value:"#e8f5ec",$type:"color"},100:{$value:"#c5e6cd",$type:"color"},200:{$value:"#8fcca0",$type:"color"},500:{$value:"#1b7a37",$type:"color"},600:{$value:"#15622c",$type:"color"},700:{$value:"#0f4a21",$type:"color"},800:{$value:"#093116",$type:"color"}},warning:{50:{$value:"#fbf3e0",$type:"color"},100:{$value:"#f3e1b0",$type:"color"},200:{$value:"#e6c46e",$type:"color"},500:{$value:"#a87b0e",$type:"color"},600:{$value:"#86620b",$type:"color"},700:{$value:"#654a08",$type:"color"},800:{$value:"#433105",$type:"color"}},error:{50:{$value:"#fbe7e3",$type:"color"},100:{$value:"#f4bbb1",$type:"color"},200:{$value:"#ea8a7a",$type:"color"},500:{$value:"#d93822",$type:"color"},600:{$value:"#ae2d1b",$type:"color"},700:{$value:"#822214",$type:"color"},800:{$value:"#57160d",$type:"color"}},info:{50:{$value:"#e1e1e1",$type:"color"},100:{$value:"#bababa",$type:"color"},200:{$value:"#8e8e8e",$type:"color"},500:{$value:"#3d3d3d",$type:"color"},600:{$value:"#313131",$type:"color"},700:{$value:"#252525",$type:"color"},800:{$value:"#181818",$type:"color"}},surface:{$value:"#f4f3ed",$type:"color"},onSurface:{$value:"#292929",$type:"color"},surfaceVariant:{$value:"#ebe9e1",$type:"color"},onSurfaceVariant:{$value:"#5a5a5a",$type:"color"},container:{$value:"#ebe9e1",$type:"color"},onContainer:{$value:"#292929",$type:"color"},outline:{$value:"#d6d4cb",$type:"color"},outlineVariant:{$value:"#e4e4e2",$type:"color"},onPrimary:{$value:"#f4f3ed",$type:"color"},primaryContainer:{$value:"#ebe9e1",$type:"color"},onPrimaryContainer:{$value:"#292929",$type:"color"},onError:{$value:"#f4f3ed",$type:"color"},errorContainer:{$value:"#fbe7e3",$type:"color"},onErrorContainer:{$value:"#57160d",$type:"color"},tertiary:{$value:"#1b7a37",$type:"color"},onTertiary:{$value:"#f4f3ed",$type:"color"},tertiaryContainer:{$value:"#e8f5ec",$type:"color"},onTertiaryContainer:{$value:"#093116",$type:"color"}},font:ar.font,spacing:ar.spacing,shape:ar.shape,motion:ar.motion,accessibility:{...tt.light,focusRing:{...tt.light.focusRing,color:{$type:"color",$value:"#292929"}}},zIndex:Wt},Hk={$name:"GGUI",$description:"The default ggui theme (dark) — ink canvas, paper text, architectural and flat.",$metadata:{font:"Inter",fontUrl:"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Geist+Mono:wght@400;500;700&display=swap",philosophy:"The interface is the artifact, not the chrome around it."},color:{primary:{50:{$value:"#0e0e0e",$type:"color"},100:{$value:"#1f1f1f",$type:"color"},200:{$value:"#292929",$type:"color"},300:{$value:"#3d3d3d",$type:"color"},400:{$value:"#5a5a5a",$type:"color"},500:{$value:"#f4f3ed",$type:"color"},600:{$value:"#ebe9e1",$type:"color"},700:{$value:"#e4e4e2",$type:"color"},800:{$value:"#d9d9d9",$type:"color"},900:{$value:"#ffffff",$type:"color"}},neutral:{50:{$value:"#0e0e0e",$type:"color"},100:{$value:"#1f1f1f",$type:"color"},200:{$value:"#292929",$type:"color"},300:{$value:"#3d3d3d",$type:"color"},400:{$value:"#5a5a5a",$type:"color"},500:{$value:"#8c8c93",$type:"color"},600:{$value:"#d9d9d9",$type:"color"},700:{$value:"#e4e4e2",$type:"color"},800:{$value:"#ebe9e1",$type:"color"},900:{$value:"#f4f3ed",$type:"color"}},success:{50:{$value:"#0d2918",$type:"color"},100:{$value:"#174f2a",$type:"color"},200:{$value:"#286b3d",$type:"color"},500:{$value:"#3da85b",$type:"color"},600:{$value:"#6dbf83",$type:"color"},700:{$value:"#9dd5ab",$type:"color"},800:{$value:"#cdead3",$type:"color"}},warning:{50:{$value:"#332608",$type:"color"},100:{$value:"#5e4612",$type:"color"},200:{$value:"#896720",$type:"color"},500:{$value:"#d4a02e",$type:"color"},600:{$value:"#dfb55c",$type:"color"},700:{$value:"#eaca8a",$type:"color"},800:{$value:"#f5deb8",$type:"color"}},error:{50:{$value:"#3d130d",$type:"color"},100:{$value:"#702419",$type:"color"},200:{$value:"#a33828",$type:"color"},500:{$value:"#ff5b46",$type:"color"},600:{$value:"#ff7d6c",$type:"color"},700:{$value:"#ff9f93",$type:"color"},800:{$value:"#ffc2ba",$type:"color"}},info:{50:{$value:"#363636",$type:"color"},100:{$value:"#5a5a5a",$type:"color"},200:{$value:"#8c8c8c",$type:"color"},500:{$value:"#d9d9d9",$type:"color"},600:{$value:"#e0e0e0",$type:"color"},700:{$value:"#e8e8e8",$type:"color"},800:{$value:"#f0f0f0",$type:"color"}},surface:{$value:"#1f1f1f",$type:"color"},onSurface:{$value:"#f4f3ed",$type:"color"},surfaceVariant:{$value:"#292929",$type:"color"},onSurfaceVariant:{$value:"#d9d9d9",$type:"color"},container:{$value:"#292929",$type:"color"},onContainer:{$value:"#f4f3ed",$type:"color"},outline:{$value:"#3d3d3d",$type:"color"},outlineVariant:{$value:"#292929",$type:"color"},onPrimary:{$value:"#292929",$type:"color"},primaryContainer:{$value:"#3d3d3d",$type:"color"},onPrimaryContainer:{$value:"#f4f3ed",$type:"color"},onError:{$value:"#3d130d",$type:"color"},errorContainer:{$value:"#702419",$type:"color"},onErrorContainer:{$value:"#ffc2ba",$type:"color"},tertiary:{$value:"#3da85b",$type:"color"},onTertiary:{$value:"#0d2918",$type:"color"},tertiaryContainer:{$value:"#174f2a",$type:"color"},onTertiaryContainer:{$value:"#cdead3",$type:"color"}},font:ar.font,spacing:ar.spacing,shape:ar.shape,motion:ar.motion,accessibility:{...tt.dark,focusRing:{...tt.dark.focusRing,color:{$type:"color",$value:"#f4f3ed"}}},zIndex:Wt},qk={light:Vk,dark:Hk},nr={font:{family:{sans:{$value:'"Orbitron", "Rajdhani", system-ui, sans-serif',$type:"fontFamily"},mono:{$value:'"Share Tech Mono", "Fira Code", monospace',$type:"fontFamily"}},size:{sm:{$value:"0.8rem",$type:"dimension"},base:{$value:"0.95rem",$type:"dimension"},lg:{$value:"1.1rem",$type:"dimension"},xl:{$value:"1.3rem",$type:"dimension"},"2xl":{$value:"1.6rem",$type:"dimension"}},weight:{normal:{$value:"400",$type:"fontWeight"},medium:{$value:"500",$type:"fontWeight"},semibold:{$value:"600",$type:"fontWeight"},bold:{$value:"700",$type:"fontWeight"}},lineHeight:{tight:{$value:"1.2",$type:"number"},normal:{$value:"1.5",$type:"number"},relaxed:{$value:"1.7",$type:"number"}}},spacing:{1:{$value:"0.25rem",$type:"dimension"},2:{$value:"0.5rem",$type:"dimension"},3:{$value:"0.75rem",$type:"dimension"},4:{$value:"1rem",$type:"dimension"},5:{$value:"1.25rem",$type:"dimension"},6:{$value:"1.5rem",$type:"dimension"},8:{$value:"2rem",$type:"dimension"},10:{$value:"2.5rem",$type:"dimension"},12:{$value:"3rem",$type:"dimension"}},shape:{radius:{sm:{$value:"2px",$type:"dimension"},md:{$value:"4px",$type:"dimension"},lg:{$value:"6px",$type:"dimension"},xl:{$value:"8px",$type:"dimension"},full:{$value:"9999px",$type:"dimension"}},shadow:{sm:{$value:"0 0 4px rgba(6, 182, 212, 0.3)",$type:"shadow"},md:{$value:"0 0 8px rgba(6, 182, 212, 0.4)",$type:"shadow"},lg:{$value:"0 0 16px rgba(6, 182, 212, 0.5)",$type:"shadow"},xl:{$value:"0 0 24px rgba(6, 182, 212, 0.6), 0 0 48px rgba(6, 182, 212, 0.2)",$type:"shadow"}}},motion:{duration:{fast:{$value:"100ms",$type:"duration"},normal:{$value:"200ms",$type:"duration"},slow:{$value:"600ms",$type:"duration"},ambient:{$value:"2000ms",$type:"duration"}},easing:{default:{$value:"cubic-bezier(0.4, 0, 0.2, 1)",$type:"cubicBezier"},bounce:{$value:"cubic-bezier(0.68, -0.55, 0.27, 1.55)",$type:"cubicBezier"},spring:{$value:"cubic-bezier(0.22, 1, 0.36, 1)",$type:"cubicBezier"}},keyframes:{"glitch-flicker":{$value:"0%{opacity:1;transform:none}7%{opacity:0.8;transform:translateX(-2px) skewX(-1deg)}10%{opacity:1;transform:none}47%{opacity:1;transform:none}50%{opacity:0.6;transform:translateX(3px) skewX(2deg)}53%{opacity:1;transform:none}100%{opacity:1;transform:none}",$type:"keyframes"},"scan-line":{$value:"0%{transform:translateY(-100%)}100%{transform:translateY(100%)}",$type:"keyframes"},"neon-pulse":{$value:"0%{box-shadow:0 0 4px rgba(6,182,212,0.4)}50%{box-shadow:0 0 16px rgba(6,182,212,0.8)}100%{box-shadow:0 0 4px rgba(6,182,212,0.4)}",$type:"keyframes"}},transition:{fast:{$type:"transition",$value:"100ms cubic-bezier(0.4, 0, 0.2, 1)"},normal:{$type:"transition",$value:"200ms cubic-bezier(0.4, 0, 0.2, 1)"},slow:{$type:"transition",$value:"600ms cubic-bezier(0.4, 0, 0.2, 1)"},colors:{$type:"transition",$value:"color 200ms cubic-bezier(0.4, 0, 0.2, 1), background-color 200ms cubic-bezier(0.4, 0, 0.2, 1), border-color 200ms cubic-bezier(0.4, 0, 0.2, 1)"},opacity:{$type:"transition",$value:"opacity 200ms cubic-bezier(0.4, 0, 0.2, 1)"},transform:{$type:"transition",$value:"transform 200ms cubic-bezier(0, 0, 0.2, 1)"}}}},Pk={$name:"Cyberpunk",$description:"Neon-lit dystopian tech — cyan neon on dark chrome with glitch animations.",$metadata:{font:"Orbitron",fontUrl:"https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700&display=swap",philosophy:"Chromatic noise, electric tension, digital rebellion."},color:{primary:{50:{$value:"#ecfeff",$type:"color"},100:{$value:"#cffafe",$type:"color"},200:{$value:"#a5f3fc",$type:"color"},300:{$value:"#67e8f9",$type:"color"},400:{$value:"#22d3ee",$type:"color"},500:{$value:"#06b6d4",$type:"color"},600:{$value:"#0891b2",$type:"color"},700:{$value:"#0e7490",$type:"color"},800:{$value:"#155e75",$type:"color"},900:{$value:"#164e63",$type:"color"}},neutral:{50:{$value:"#0a0a0f",$type:"color"},100:{$value:"#111118",$type:"color"},200:{$value:"#1a1a24",$type:"color"},300:{$value:"#25252f",$type:"color"},400:{$value:"#3a3a48",$type:"color"},500:{$value:"#55556a",$type:"color"},600:{$value:"#8888a0",$type:"color"},700:{$value:"#aaaabe",$type:"color"},800:{$value:"#d0d0e0",$type:"color"},900:{$value:"#e8e8f0",$type:"color"}},success:{50:{$value:"#e0fff1",$type:"color"},100:{$value:"#b3ffd9",$type:"color"},200:{$value:"#66ffb3",$type:"color"},500:{$value:"#00ff88",$type:"color"},600:{$value:"#00cc6e",$type:"color"},700:{$value:"#009955",$type:"color"},800:{$value:"#006638",$type:"color"}},warning:{50:{$value:"#fff5e0",$type:"color"},100:{$value:"#ffe5b3",$type:"color"},200:{$value:"#ffcc66",$type:"color"},500:{$value:"#ffaa00",$type:"color"},600:{$value:"#cc8800",$type:"color"},700:{$value:"#996600",$type:"color"},800:{$value:"#664400",$type:"color"}},error:{50:{$value:"#ffe0e8",$type:"color"},100:{$value:"#ffb3c4",$type:"color"},200:{$value:"#ff6688",$type:"color"},500:{$value:"#ff2255",$type:"color"},600:{$value:"#cc1a44",$type:"color"},700:{$value:"#991333",$type:"color"},800:{$value:"#660d22",$type:"color"}},info:{50:{$value:"#e0f9ff",$type:"color"},100:{$value:"#b3edff",$type:"color"},200:{$value:"#66dbff",$type:"color"},500:{$value:"#00ccff",$type:"color"},600:{$value:"#00a3cc",$type:"color"},700:{$value:"#007a99",$type:"color"},800:{$value:"#005266",$type:"color"}},surface:{$value:"#0a0a0f",$type:"color"},onSurface:{$value:"#e8e8f0",$type:"color"},surfaceVariant:{$value:"#111118",$type:"color"},onSurfaceVariant:{$value:"#8888a0",$type:"color"},container:{$value:"#155e75",$type:"color"},onContainer:{$value:"#cffafe",$type:"color"},outline:{$value:"#3a3a48",$type:"color"},outlineVariant:{$value:"#25252f",$type:"color"},onPrimary:{$value:"#0a0a0f",$type:"color"},primaryContainer:{$value:"#155e75",$type:"color"},onPrimaryContainer:{$value:"#cffafe",$type:"color"},onError:{$value:"#0a0a0f",$type:"color"},errorContainer:{$value:"#660d22",$type:"color"},onErrorContainer:{$value:"#ffe0e8",$type:"color"},tertiary:{$value:"#00ff88",$type:"color"},onTertiary:{$value:"#0a0a0f",$type:"color"},tertiaryContainer:{$value:"#006638",$type:"color"},onTertiaryContainer:{$value:"#e0fff1",$type:"color"}},font:nr.font,spacing:nr.spacing,shape:nr.shape,motion:nr.motion,accessibility:{...tt.light,focusRing:{...tt.light.focusRing,color:{$type:"color",$value:"#06b6d4"}}},zIndex:Wt},Zk={$name:"Cyberpunk",$description:"Neon-lit dystopian tech (dark) — brighter cyan on pure-black chrome, cranked neon contrast.",$metadata:{font:"Orbitron",fontUrl:"https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700&display=swap",philosophy:"Chromatic noise, electric tension, digital rebellion."},color:{primary:{50:{$value:"#164e63",$type:"color"},100:{$value:"#155e75",$type:"color"},200:{$value:"#0e7490",$type:"color"},300:{$value:"#0891b2",$type:"color"},400:{$value:"#06b6d4",$type:"color"},500:{$value:"#22d3ee",$type:"color"},600:{$value:"#67e8f9",$type:"color"},700:{$value:"#a5f3fc",$type:"color"},800:{$value:"#cffafe",$type:"color"},900:{$value:"#ecfeff",$type:"color"}},neutral:{50:{$value:"#000005",$type:"color"},100:{$value:"#0a0a0f",$type:"color"},200:{$value:"#111118",$type:"color"},300:{$value:"#1a1a24",$type:"color"},400:{$value:"#3a3a48",$type:"color"},500:{$value:"#55556a",$type:"color"},600:{$value:"#8888a0",$type:"color"},700:{$value:"#aaaabe",$type:"color"},800:{$value:"#d0d0e0",$type:"color"},900:{$value:"#e8e8f0",$type:"color"}},success:{50:{$value:"#003319",$type:"color"},100:{$value:"#006633",$type:"color"},200:{$value:"#00994d",$type:"color"},500:{$value:"#33ffaa",$type:"color"},600:{$value:"#66ffbf",$type:"color"},700:{$value:"#99ffd4",$type:"color"},800:{$value:"#ccffea",$type:"color"}},warning:{50:{$value:"#332200",$type:"color"},100:{$value:"#664400",$type:"color"},200:{$value:"#996600",$type:"color"},500:{$value:"#ffbe33",$type:"color"},600:{$value:"#ffcb5c",$type:"color"},700:{$value:"#ffd985",$type:"color"},800:{$value:"#ffe7ad",$type:"color"}},error:{50:{$value:"#330a17",$type:"color"},100:{$value:"#66142e",$type:"color"},200:{$value:"#991e45",$type:"color"},500:{$value:"#ff4477",$type:"color"},600:{$value:"#ff6e94",$type:"color"},700:{$value:"#ff97b1",$type:"color"},800:{$value:"#ffc1cf",$type:"color"}},info:{50:{$value:"#002b33",$type:"color"},100:{$value:"#005566",$type:"color"},200:{$value:"#008099",$type:"color"},500:{$value:"#33d6ff",$type:"color"},600:{$value:"#5cdeff",$type:"color"},700:{$value:"#85e6ff",$type:"color"},800:{$value:"#adeeff",$type:"color"}},surface:{$value:"#000005",$type:"color"},onSurface:{$value:"#e8e8f0",$type:"color"},surfaceVariant:{$value:"#0a0a0f",$type:"color"},onSurfaceVariant:{$value:"#aaaabe",$type:"color"},container:{$value:"#0e7490",$type:"color"},onContainer:{$value:"#cffafe",$type:"color"},outline:{$value:"#1a1a24",$type:"color"},outlineVariant:{$value:"#111118",$type:"color"},onPrimary:{$value:"#000005",$type:"color"},primaryContainer:{$value:"#0e7490",$type:"color"},onPrimaryContainer:{$value:"#cffafe",$type:"color"},onError:{$value:"#000005",$type:"color"},errorContainer:{$value:"#991e45",$type:"color"},onErrorContainer:{$value:"#ffc1cf",$type:"color"},tertiary:{$value:"#33ffaa",$type:"color"},onTertiary:{$value:"#000005",$type:"color"},tertiaryContainer:{$value:"#006633",$type:"color"},onTertiaryContainer:{$value:"#ccffea",$type:"color"}},font:nr.font,spacing:nr.spacing,shape:nr.shape,motion:nr.motion,accessibility:{...tt.dark,focusRing:{...tt.dark.focusRing,color:{$type:"color",$value:"#22d3ee"}}},zIndex:Wt},Gk={light:Pk,dark:Zk},rr={font:{family:{sans:{$value:'"Noto Serif JP", "Georgia", serif',$type:"fontFamily"},mono:{$value:'"Noto Sans Mono", "Courier New", monospace',$type:"fontFamily"}},size:{sm:{$value:"0.875rem",$type:"dimension"},base:{$value:"1rem",$type:"dimension"},lg:{$value:"1.125rem",$type:"dimension"},xl:{$value:"1.3rem",$type:"dimension"},"2xl":{$value:"1.6rem",$type:"dimension"}},weight:{normal:{$value:"400",$type:"fontWeight"},medium:{$value:"500",$type:"fontWeight"},semibold:{$value:"600",$type:"fontWeight"},bold:{$value:"700",$type:"fontWeight"}},lineHeight:{tight:{$value:"1.3",$type:"number"},normal:{$value:"1.6",$type:"number"},relaxed:{$value:"1.9",$type:"number"}}},spacing:{1:{$value:"0.25rem",$type:"dimension"},2:{$value:"0.5rem",$type:"dimension"},3:{$value:"0.75rem",$type:"dimension"},4:{$value:"1rem",$type:"dimension"},5:{$value:"1.25rem",$type:"dimension"},6:{$value:"1.5rem",$type:"dimension"},8:{$value:"2rem",$type:"dimension"},10:{$value:"2.5rem",$type:"dimension"},12:{$value:"3rem",$type:"dimension"}},shape:{radius:{sm:{$value:"0.125rem",$type:"dimension"},md:{$value:"0.25rem",$type:"dimension"},lg:{$value:"0.5rem",$type:"dimension"},xl:{$value:"0.75rem",$type:"dimension"},full:{$value:"9999px",$type:"dimension"}},shadow:{sm:{$value:"0 1px 3px rgba(42, 39, 36, 0.06)",$type:"shadow"},md:{$value:"0 3px 8px rgba(42, 39, 36, 0.08)",$type:"shadow"},lg:{$value:"0 8px 20px rgba(42, 39, 36, 0.10)",$type:"shadow"},xl:{$value:"0 16px 40px rgba(42, 39, 36, 0.12)",$type:"shadow"}}},motion:{duration:{fast:{$value:"200ms",$type:"duration"},normal:{$value:"500ms",$type:"duration"},slow:{$value:"1500ms",$type:"duration"},ambient:{$value:"6000ms",$type:"duration"}},easing:{default:{$value:"cubic-bezier(0.33, 0, 0.67, 1)",$type:"cubicBezier"},bounce:{$value:"cubic-bezier(0.34, 1.2, 0.64, 1)",$type:"cubicBezier"},spring:{$value:"cubic-bezier(0.22, 1, 0.36, 1)",$type:"cubicBezier"}},keyframes:{"slow-breathe":{$value:"0%{opacity:0.85}50%{opacity:1}100%{opacity:0.85}",$type:"keyframes"},"gentle-fade":{$value:"0%{opacity:0}100%{opacity:1}",$type:"keyframes"},"ink-ripple":{$value:"0%{transform:scale(0.95);opacity:0.5}50%{transform:scale(1);opacity:0.8}100%{transform:scale(0.95);opacity:0.5}",$type:"keyframes"}},transition:{fast:{$type:"transition",$value:"200ms cubic-bezier(0.33, 0, 0.67, 1)"},normal:{$type:"transition",$value:"500ms cubic-bezier(0.33, 0, 0.67, 1)"},slow:{$type:"transition",$value:"1500ms cubic-bezier(0.33, 0, 0.67, 1)"},colors:{$type:"transition",$value:"color 500ms cubic-bezier(0.33, 0, 0.67, 1), background-color 500ms cubic-bezier(0.33, 0, 0.67, 1), border-color 500ms cubic-bezier(0.33, 0, 0.67, 1)"},opacity:{$type:"transition",$value:"opacity 500ms cubic-bezier(0.33, 0, 0.67, 1)"},transform:{$type:"transition",$value:"transform 500ms cubic-bezier(0.22, 1, 0.36, 1)"}}}},Yk={$name:"Zen",$description:"Minimalist Japanese aesthetic — warm stone tones, deliberate space, and unhurried motion.",$metadata:{font:"Noto Serif JP",fontUrl:"https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@400;500;600;700&display=swap",philosophy:"Beauty in imperfection. Stillness as presence."},color:{primary:{50:{$value:"#f6f7f4",$type:"color"},100:{$value:"#e8ebe2",$type:"color"},200:{$value:"#d1d7c5",$type:"color"},300:{$value:"#b3bda1",$type:"color"},400:{$value:"#93a17c",$type:"color"},500:{$value:"#748660",$type:"color"},600:{$value:"#5c6b4c",$type:"color"},700:{$value:"#48543d",$type:"color"},800:{$value:"#3b4434",$type:"color"},900:{$value:"#33392e",$type:"color"}},neutral:{50:{$value:"#faf9f7",$type:"color"},100:{$value:"#f3f1ed",$type:"color"},200:{$value:"#e7e4de",$type:"color"},300:{$value:"#d5d0c8",$type:"color"},400:{$value:"#b8b0a4",$type:"color"},500:{$value:"#9a9084",$type:"color"},600:{$value:"#7a7068",$type:"color"},700:{$value:"#5e5650",$type:"color"},800:{$value:"#3e3a36",$type:"color"},900:{$value:"#2a2724",$type:"color"}},success:{50:{$type:"color",$value:"#f0f4ee"},100:{$type:"color",$value:"#dde6d8"},200:{$type:"color",$value:"#c6d4be"},500:{$type:"color",$value:"#6b8f5e"},600:{$type:"color",$value:"#58754d"},700:{$type:"color",$value:"#43583a"},800:{$type:"color",$value:"#2f3e29"}},warning:{50:{$type:"color",$value:"#faf6ea"},100:{$type:"color",$value:"#f4ebcb"},200:{$type:"color",$value:"#ecdda4"},500:{$type:"color",$value:"#c9a84c"},600:{$type:"color",$value:"#a88a3a"},700:{$type:"color",$value:"#7e672c"},800:{$type:"color",$value:"#59481f"}},error:{50:{$type:"color",$value:"#f8edec"},100:{$type:"color",$value:"#efd0ce"},200:{$type:"color",$value:"#e3aba8"},500:{$type:"color",$value:"#b85450"},600:{$type:"color",$value:"#9a4340"},700:{$type:"color",$value:"#743330"},800:{$type:"color",$value:"#522423"}},info:{50:{$type:"color",$value:"#eef3f5"},100:{$type:"color",$value:"#d7e2e7"},200:{$type:"color",$value:"#b9cdd5"},500:{$type:"color",$value:"#6a8fa0"},600:{$type:"color",$value:"#557585"},700:{$type:"color",$value:"#405864"},800:{$type:"color",$value:"#2c3d46"}},surface:{$value:"#faf9f7",$type:"color"},onSurface:{$value:"#2a2724",$type:"color"},surfaceVariant:{$value:"#f3f1ed",$type:"color"},onSurfaceVariant:{$value:"#6b635b",$type:"color"},container:{$value:"#e8ebe2",$type:"color"},onContainer:{$value:"#33392e",$type:"color"},outline:{$value:"#d5d0c8",$type:"color"},outlineVariant:{$value:"#e7e4de",$type:"color"},onPrimary:{$value:"#faf9f7",$type:"color"},primaryContainer:{$value:"#e8ebe2",$type:"color"},onPrimaryContainer:{$value:"#33392e",$type:"color"},onError:{$value:"#faf9f7",$type:"color"},errorContainer:{$value:"#f8edec",$type:"color"},onErrorContainer:{$value:"#522423",$type:"color"},tertiary:{$value:"#7d5e6e",$type:"color"},onTertiary:{$value:"#faf9f7",$type:"color"},tertiaryContainer:{$value:"#ebe2e6",$type:"color"},onTertiaryContainer:{$value:"#3a2a32",$type:"color"}},font:rr.font,spacing:rr.spacing,shape:rr.shape,motion:rr.motion,accessibility:{...tt.light,focusRing:{...tt.light.focusRing,color:{$type:"color",$value:"#748660"}}},zIndex:Wt},Kk={$name:"Zen",$description:"Minimalist Japanese aesthetic (dark) — dusk stone surfaces with restrained moss accents and unhurried motion.",$metadata:{font:"Noto Serif JP",fontUrl:"https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@400;500;600;700&display=swap",philosophy:"Beauty in imperfection. Stillness as presence."},color:{primary:{50:{$value:"#33392e",$type:"color"},100:{$value:"#3b4434",$type:"color"},200:{$value:"#48543d",$type:"color"},300:{$value:"#5c6b4c",$type:"color"},400:{$value:"#748660",$type:"color"},500:{$value:"#93a17c",$type:"color"},600:{$value:"#b3bda1",$type:"color"},700:{$value:"#d1d7c5",$type:"color"},800:{$value:"#e8ebe2",$type:"color"},900:{$value:"#f6f7f4",$type:"color"}},neutral:{50:{$value:"#1a1816",$type:"color"},100:{$value:"#2a2724",$type:"color"},200:{$value:"#3e3a36",$type:"color"},300:{$value:"#5e5650",$type:"color"},400:{$value:"#7a7068",$type:"color"},500:{$value:"#9a9084",$type:"color"},600:{$value:"#b8b0a4",$type:"color"},700:{$value:"#d5d0c8",$type:"color"},800:{$value:"#e7e4de",$type:"color"},900:{$value:"#faf9f7",$type:"color"}},success:{50:{$type:"color",$value:"#f1f6ee"},100:{$type:"color",$value:"#dceacc"},200:{$type:"color",$value:"#c4dab1"},500:{$type:"color",$value:"#8aab7a"},600:{$type:"color",$value:"#6f8d62"},700:{$type:"color",$value:"#546b4a"},800:{$type:"color",$value:"#3a4b34"}},warning:{50:{$type:"color",$value:"#fbf6e9"},100:{$type:"color",$value:"#f4e9c1"},200:{$type:"color",$value:"#ecdda4"},500:{$type:"color",$value:"#d8b96a"},600:{$type:"color",$value:"#b09553"},700:{$type:"color",$value:"#84703d"},800:{$type:"color",$value:"#5a4c2a"}},error:{50:{$type:"color",$value:"#faeae9"},100:{$type:"color",$value:"#f1cac8"},200:{$type:"color",$value:"#e4a5a1"},500:{$type:"color",$value:"#cf6f6a"},600:{$type:"color",$value:"#a85753"},700:{$type:"color",$value:"#7d403c"},800:{$type:"color",$value:"#552a27"}},info:{50:{$type:"color",$value:"#f0f4f6"},100:{$type:"color",$value:"#d7e0e5"},200:{$type:"color",$value:"#bccbd2"},500:{$type:"color",$value:"#8eaab8"},600:{$type:"color",$value:"#708995"},700:{$type:"color",$value:"#546771"},800:{$type:"color",$value:"#38454d"}},surface:{$value:"#2a2724",$type:"color"},onSurface:{$value:"#f3f1ed",$type:"color"},surfaceVariant:{$value:"#3e3a36",$type:"color"},onSurfaceVariant:{$value:"#b8b0a4",$type:"color"},container:{$value:"#48543d",$type:"color"},onContainer:{$value:"#e8ebe2",$type:"color"},outline:{$value:"#5e5650",$type:"color"},outlineVariant:{$value:"#3e3a36",$type:"color"},onPrimary:{$value:"#1a1816",$type:"color"},primaryContainer:{$value:"#3b4434",$type:"color"},onPrimaryContainer:{$value:"#e8ebe2",$type:"color"},onError:{$value:"#1a1816",$type:"color"},errorContainer:{$value:"#552a27",$type:"color"},onErrorContainer:{$value:"#f1cac8",$type:"color"},tertiary:{$value:"#a98899",$type:"color"},onTertiary:{$value:"#1a1816",$type:"color"},tertiaryContainer:{$value:"#4e3a44",$type:"color"},onTertiaryContainer:{$value:"#ebe2e6",$type:"color"}},font:rr.font,spacing:rr.spacing,shape:rr.shape,motion:rr.motion,accessibility:{...tt.dark,focusRing:{...tt.dark.focusRing,color:{$type:"color",$value:"#93a17c"}}},zIndex:Wt},Jk={light:Yk,dark:Kk},ir={font:{family:{sans:{$value:'"Outfit", system-ui, -apple-system, sans-serif',$type:"fontFamily"},mono:{$value:'"Fira Code", "JetBrains Mono", monospace',$type:"fontFamily"}},size:{sm:{$value:"0.875rem",$type:"dimension"},base:{$value:"1rem",$type:"dimension"},lg:{$value:"1.125rem",$type:"dimension"},xl:{$value:"1.25rem",$type:"dimension"},"2xl":{$value:"1.5rem",$type:"dimension"}},weight:{normal:{$value:"400",$type:"fontWeight"},medium:{$value:"500",$type:"fontWeight"},semibold:{$value:"600",$type:"fontWeight"},bold:{$value:"700",$type:"fontWeight"}},lineHeight:{tight:{$value:"1.25",$type:"number"},normal:{$value:"1.5",$type:"number"},relaxed:{$value:"1.75",$type:"number"}}},spacing:{1:{$value:"0.25rem",$type:"dimension"},2:{$value:"0.5rem",$type:"dimension"},3:{$value:"0.75rem",$type:"dimension"},4:{$value:"1rem",$type:"dimension"},5:{$value:"1.25rem",$type:"dimension"},6:{$value:"1.5rem",$type:"dimension"},8:{$value:"2rem",$type:"dimension"},10:{$value:"2.5rem",$type:"dimension"},12:{$value:"3rem",$type:"dimension"}},shape:{radius:{sm:{$value:"0.25rem",$type:"dimension"},md:{$value:"0.5rem",$type:"dimension"},lg:{$value:"0.75rem",$type:"dimension"},xl:{$value:"1rem",$type:"dimension"},full:{$value:"9999px",$type:"dimension"}},shadow:{sm:{$value:"0 0 6px rgba(236, 72, 153, 0.25)",$type:"shadow"},md:{$value:"0 0 12px rgba(236, 72, 153, 0.35)",$type:"shadow"},lg:{$value:"0 0 20px rgba(236, 72, 153, 0.45)",$type:"shadow"},xl:{$value:"0 0 30px rgba(236, 72, 153, 0.55), 0 0 60px rgba(236, 72, 153, 0.2)",$type:"shadow"}}},motion:{duration:{fast:{$value:"120ms",$type:"duration"},normal:{$value:"250ms",$type:"duration"},slow:{$value:"800ms",$type:"duration"},ambient:{$value:"2500ms",$type:"duration"}},easing:{default:{$value:"cubic-bezier(0.4, 0, 0.2, 1)",$type:"cubicBezier"},bounce:{$value:"cubic-bezier(0.68, -0.55, 0.27, 1.55)",$type:"cubicBezier"},spring:{$value:"cubic-bezier(0.22, 1, 0.36, 1)",$type:"cubicBezier"}},transition:{fast:{$value:"120ms cubic-bezier(0.4, 0, 0.2, 1)",$type:"transition"},normal:{$value:"250ms cubic-bezier(0.4, 0, 0.2, 1)",$type:"transition"},slow:{$value:"800ms cubic-bezier(0.4, 0, 0.2, 1)",$type:"transition"},colors:{$value:"color 250ms cubic-bezier(0.4, 0, 0.2, 1), background-color 250ms cubic-bezier(0.4, 0, 0.2, 1), border-color 250ms cubic-bezier(0.4, 0, 0.2, 1)",$type:"transition"},opacity:{$value:"opacity 250ms cubic-bezier(0.4, 0, 0.2, 1)",$type:"transition"},transform:{$value:"transform 250ms cubic-bezier(0.22, 1, 0.36, 1)",$type:"transition"}},keyframes:{"neon-flicker":{$value:"0%{opacity:1}4%{opacity:0.7}8%{opacity:1}12%{opacity:0.85}16%{opacity:1}100%{opacity:1}",$type:"keyframes"},"glow-pulse":{$value:"0%{box-shadow:0 0 8px rgba(236,72,153,0.4)}50%{box-shadow:0 0 24px rgba(236,72,153,0.8)}100%{box-shadow:0 0 8px rgba(236,72,153,0.4)}",$type:"keyframes"},"electric-arc":{$value:"0%{clip-path:inset(0 100% 0 0)}50%{clip-path:inset(0 0 0 0)}100%{clip-path:inset(0 0 0 100%)}",$type:"keyframes"}}}},Xk={$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:ir.font,spacing:ir.spacing,shape:ir.shape,motion:ir.motion,accessibility:{...tt.dark,focusRing:{...tt.dark.focusRing,color:{$value:"#ec4899",$type:"color"}}},zIndex:Wt},Wk={$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:ir.font,spacing:ir.spacing,shape:ir.shape,motion:ir.motion,accessibility:{...tt.dark,focusRing:{...tt.dark.focusRing,color:{$value:"#f472b6",$type:"color"}}},zIndex:Wt},Qk={light:Xk,dark:Wk},or={font:{family:{sans:{$value:'"Lora", "Georgia", serif',$type:"fontFamily"},mono:{$value:'"IBM Plex Mono", "Courier New", monospace',$type:"fontFamily"}},size:{sm:{$value:"0.875rem",$type:"dimension"},base:{$value:"1rem",$type:"dimension"},lg:{$value:"1.15rem",$type:"dimension"},xl:{$value:"1.3rem",$type:"dimension"},"2xl":{$value:"1.625rem",$type:"dimension"}},weight:{normal:{$value:"400",$type:"fontWeight"},medium:{$value:"500",$type:"fontWeight"},semibold:{$value:"600",$type:"fontWeight"},bold:{$value:"700",$type:"fontWeight"}},lineHeight:{tight:{$value:"1.3",$type:"number"},normal:{$value:"1.6",$type:"number"},relaxed:{$value:"1.85",$type:"number"}}},spacing:{1:{$value:"0.25rem",$type:"dimension"},2:{$value:"0.5rem",$type:"dimension"},3:{$value:"0.75rem",$type:"dimension"},4:{$value:"1rem",$type:"dimension"},5:{$value:"1.25rem",$type:"dimension"},6:{$value:"1.5rem",$type:"dimension"},8:{$value:"2rem",$type:"dimension"},10:{$value:"2.5rem",$type:"dimension"},12:{$value:"3rem",$type:"dimension"}},shape:{radius:{sm:{$value:"0.375rem",$type:"dimension"},md:{$value:"0.625rem",$type:"dimension"},lg:{$value:"1rem",$type:"dimension"},xl:{$value:"1.5rem",$type:"dimension"},full:{$value:"9999px",$type:"dimension"}},shadow:{sm:{$value:"0 1px 3px rgba(53, 46, 32, 0.08)",$type:"shadow"},md:{$value:"0 4px 8px rgba(53, 46, 32, 0.10)",$type:"shadow"},lg:{$value:"0 8px 20px rgba(53, 46, 32, 0.12)",$type:"shadow"},xl:{$value:"0 16px 40px rgba(53, 46, 32, 0.14)",$type:"shadow"}}},motion:{duration:{fast:{$value:"200ms",$type:"duration"},normal:{$value:"400ms",$type:"duration"},slow:{$value:"1200ms",$type:"duration"},ambient:{$value:"5000ms",$type:"duration"}},easing:{default:{$value:"cubic-bezier(0.4, 0, 0.2, 1)",$type:"cubicBezier"},bounce:{$value:"cubic-bezier(0.34, 1.3, 0.64, 1)",$type:"cubicBezier"},spring:{$value:"cubic-bezier(0.22, 1, 0.36, 1)",$type:"cubicBezier"}},keyframes:{"leaf-float":{$value:"0%{transform:translateY(0) rotate(0deg);opacity:0.7}25%{transform:translateY(-6px) rotate(3deg)}50%{transform:translateY(-2px) rotate(-2deg);opacity:1}75%{transform:translateY(-8px) rotate(2deg)}100%{transform:translateY(0) rotate(0deg);opacity:0.7}",$type:"keyframes"},"vine-grow":{$value:"0%{transform:scaleY(0);transform-origin:bottom}100%{transform:scaleY(1);transform-origin:bottom}",$type:"keyframes"},"gentle-sway":{$value:"0%{transform:rotate(-1deg)}50%{transform:rotate(1deg)}100%{transform:rotate(-1deg)}",$type:"keyframes"}},transition:Bc}},e9={$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:or.font,spacing:or.spacing,shape:or.shape,motion:or.motion,accessibility:{...tt.light,focusRing:{...tt.light.focusRing,color:{$type:"color",$value:"#16a34a"}}},zIndex:Wt},t9={$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:or.font,spacing:or.spacing,shape:or.shape,motion:or.motion,accessibility:{...tt.dark,focusRing:{...tt.dark.focusRing,color:{$type:"color",$value:"#4ade80"}}},zIndex:Wt},a9={light:e9,dark:t9},n9={...Bc,fast:{$type:"transition",$value:"120ms cubic-bezier(0.4, 0, 0.2, 1)"},normal:{$type:"transition",$value:"240ms cubic-bezier(0.4, 0, 0.2, 1)"},slow:{$type:"transition",$value:"480ms cubic-bezier(0.4, 0, 0.2, 1)"}},lr={font:{family:{sans:{$value:'-apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif',$type:"fontFamily"},mono:{$value:'ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace',$type:"fontFamily"}},size:{sm:{$value:"0.875rem",$type:"dimension"},base:{$value:"1rem",$type:"dimension"},lg:{$value:"1.125rem",$type:"dimension"},xl:{$value:"1.25rem",$type:"dimension"},"2xl":{$value:"1.5rem",$type:"dimension"}},weight:{normal:{$value:"400",$type:"fontWeight"},medium:{$value:"500",$type:"fontWeight"},semibold:{$value:"600",$type:"fontWeight"},bold:{$value:"700",$type:"fontWeight"}},lineHeight:{tight:{$value:"1.25",$type:"number"},normal:{$value:"1.55",$type:"number"},relaxed:{$value:"1.75",$type:"number"}}},spacing:{1:{$value:"0.25rem",$type:"dimension"},2:{$value:"0.5rem",$type:"dimension"},3:{$value:"0.75rem",$type:"dimension"},4:{$value:"1rem",$type:"dimension"},5:{$value:"1.25rem",$type:"dimension"},6:{$value:"1.5rem",$type:"dimension"},8:{$value:"2rem",$type:"dimension"},10:{$value:"2.5rem",$type:"dimension"},12:{$value:"3rem",$type:"dimension"},xs:{$value:"0.25rem",$type:"dimension"},sm:{$value:"0.5rem",$type:"dimension"},md:{$value:"1rem",$type:"dimension"},lg:{$value:"1.5rem",$type:"dimension"},xl:{$value:"2rem",$type:"dimension"},"2xl":{$value:"3rem",$type:"dimension"}},shape:{radius:{sm:{$value:"0.5rem",$type:"dimension"},md:{$value:"0.75rem",$type:"dimension"},lg:{$value:"1rem",$type:"dimension"},xl:{$value:"1.5rem",$type:"dimension"},full:{$value:"9999px",$type:"dimension"}},shadow:{sm:{$value:"0 1px 3px color-mix(in srgb, var(--ggui-color-primary-500) 8%, transparent)",$type:"shadow"},md:{$value:"0 1px 2px rgba(20, 20, 19, 0.04), 0 8px 16px -4px color-mix(in srgb, var(--ggui-color-primary-500) 14%, transparent)",$type:"shadow"},lg:{$value:"0 2px 4px rgba(20, 20, 19, 0.04), 0 16px 32px -8px color-mix(in srgb, var(--ggui-color-primary-500) 20%, transparent)",$type:"shadow"},xl:{$value:"0 4px 8px rgba(20, 20, 19, 0.04), 0 24px 48px -12px color-mix(in srgb, var(--ggui-color-primary-500) 26%, transparent)",$type:"shadow"}}},motion:{duration:{fast:{$value:"120ms",$type:"duration"},normal:{$value:"240ms",$type:"duration"},slow:{$value:"480ms",$type:"duration"}},easing:{default:{$value:"cubic-bezier(0.4, 0, 0.2, 1)",$type:"cubicBezier"},spring:{$value:"cubic-bezier(0.22, 1, 0.36, 1)",$type:"cubicBezier"}},keyframes:{entrance:{$value:"0%{opacity:0;transform:translateY(4px)}100%{opacity:1;transform:none}",$type:"keyframes"}},transition:n9}},r9={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"}},i9={$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:{...r9},neutral:{50:{$value:"#faf9f5",$type:"color"},100:{$value:"#f5f4ee",$type:"color"},200:{$value:"#ebe9df",$type:"color"},300:{$value:"#dad8cc",$type:"color"},400:{$value:"#a8a59f",$type:"color"},500:{$value:"#7c7a76",$type:"color"},600:{$value:"#56544f",$type:"color"},700:{$value:"#3d3b39",$type:"color"},800:{$value:"#262624",$type:"color"},900:{$value:"#141413",$type:"color"}},success:{50:{$value:"#f4f7ec",$type:"color"},100:{$value:"#e3ecd0",$type:"color"},200:{$value:"#c8d8a5",$type:"color"},500:{$value:"#6b8e3d",$type:"color"},600:{$value:"#587634",$type:"color"},700:{$value:"#465c29",$type:"color"},800:{$value:"#33431e",$type:"color"}},warning:{50:{$value:"#fbf3e3",$type:"color"},100:{$value:"#f6e2bb",$type:"color"},200:{$value:"#eac786",$type:"color"},500:{$value:"#c98e2e",$type:"color"},600:{$value:"#a87725",$type:"color"},700:{$value:"#825c1d",$type:"color"},800:{$value:"#5d4214",$type:"color"}},error:{50:{$value:"#f9ebe7",$type:"color"},100:{$value:"#f1cec5",$type:"color"},200:{$value:"#e3a294",$type:"color"},500:{$value:"#bc4a3a",$type:"color"},600:{$value:"#9d3d30",$type:"color"},700:{$value:"#7a2f25",$type:"color"},800:{$value:"#57211a",$type:"color"}},info:{50:{$value:"#f1f0ee",$type:"color"},100:{$value:"#dedcd8",$type:"color"},200:{$value:"#bdbab4",$type:"color"},500:{$value:"#7c7a76",$type:"color"},600:{$value:"#65635f",$type:"color"},700:{$value:"#4d4b48",$type:"color"},800:{$value:"#363432",$type:"color"}},surface:{$value:"#faf9f5",$type:"color"},onSurface:{$value:"#141413",$type:"color"},surfaceVariant:{$value:"#f5f4ee",$type:"color"},onSurfaceVariant:{$value:"#56544f",$type:"color"},container:{$value:"#fbf2ee",$type:"color"},onContainer:{$value:"#4d2920",$type:"color"},outline:{$value:"#dad8cc",$type:"color"},outlineVariant:{$value:"#ebe9df",$type:"color"},onPrimary:{$value:"#faf9f5",$type:"color"},primaryContainer:{$value:"#fbf2ee",$type:"color"},onPrimaryContainer:{$value:"#4d2920",$type:"color"},onError:{$value:"#faf9f5",$type:"color"},errorContainer:{$value:"#f9ebe7",$type:"color"},onErrorContainer:{$value:"#57211a",$type:"color"},tertiary:{$value:"#6b8e3d",$type:"color"},onTertiary:{$value:"#faf9f5",$type:"color"},tertiaryContainer:{$value:"#f4f7ec",$type:"color"},onTertiaryContainer:{$value:"#33431e",$type:"color"}},font:lr.font,spacing:lr.spacing,shape:lr.shape,motion:lr.motion,accessibility:{...tt.light,focusRing:{...tt.light.focusRing,color:{$type:"color",$value:"#cc785c"}}},zIndex:Wt},o9={$name:"Claudic",$description:"Fits inside claude.ai (dark) — warm charcoal surfaces, terracotta accent, calm by design.",$metadata:{font:"system",philosophy:"Quiet, papery, conversational. Built to feel native when rendered inside claude.ai."},color:{primary:{50:{$value:"#4d2920",$type:"color"},100:{$value:"#723e30",$type:"color"},200:{$value:"#965240",$type:"color"},300:{$value:"#b8694f",$type:"color"},400:{$value:"#cc785c",$type:"color"},500:{$value:"#d6896c",$type:"color"},600:{$value:"#df9d80",$type:"color"},700:{$value:"#ecbfa9",$type:"color"},800:{$value:"#f5dfd4",$type:"color"},900:{$value:"#fbf2ee",$type:"color"}},neutral:{50:{$value:"#1a1917",$type:"color"},100:{$value:"#262624",$type:"color"},200:{$value:"#2d2c2a",$type:"color"},300:{$value:"#3d3b39",$type:"color"},400:{$value:"#56544f",$type:"color"},500:{$value:"#7c7a76",$type:"color"},600:{$value:"#a8a59f",$type:"color"},700:{$value:"#dad8cc",$type:"color"},800:{$value:"#ebe9df",$type:"color"},900:{$value:"#faf9f5",$type:"color"}},success:{50:{$value:"#1c2412",$type:"color"},100:{$value:"#34461e",$type:"color"},200:{$value:"#4a6029",$type:"color"},500:{$value:"#9bb56b",$type:"color"},600:{$value:"#b1c688",$type:"color"},700:{$value:"#c8d8a5",$type:"color"},800:{$value:"#e3ecd0",$type:"color"}},warning:{50:{$value:"#2a1e0c",$type:"color"},100:{$value:"#523915",$type:"color"},200:{$value:"#7a541f",$type:"color"},500:{$value:"#dba14a",$type:"color"},600:{$value:"#e4b46e",$type:"color"},700:{$value:"#eac786",$type:"color"},800:{$value:"#f6e2bb",$type:"color"}},error:{50:{$value:"#2a1410",$type:"color"},100:{$value:"#52271f",$type:"color"},200:{$value:"#7a3a2e",$type:"color"},500:{$value:"#d56b59",$type:"color"},600:{$value:"#df8576",$type:"color"},700:{$value:"#e3a294",$type:"color"},800:{$value:"#f1cec5",$type:"color"}},info:{50:{$value:"#222220",$type:"color"},100:{$value:"#3a3936",$type:"color"},200:{$value:"#56544f",$type:"color"},500:{$value:"#a8a59f",$type:"color"},600:{$value:"#bcbab5",$type:"color"},700:{$value:"#d1cfca",$type:"color"},800:{$value:"#e6e4e0",$type:"color"}},surface:{$value:"#262624",$type:"color"},onSurface:{$value:"#faf9f5",$type:"color"},surfaceVariant:{$value:"#2d2c2a",$type:"color"},onSurfaceVariant:{$value:"#a8a59f",$type:"color"},container:{$value:"#3d3b39",$type:"color"},onContainer:{$value:"#fbf2ee",$type:"color"},outline:{$value:"#3d3b39",$type:"color"},outlineVariant:{$value:"#2d2c2a",$type:"color"},onPrimary:{$value:"#262624",$type:"color"},primaryContainer:{$value:"#723e30",$type:"color"},onPrimaryContainer:{$value:"#f5dfd4",$type:"color"},onError:{$value:"#2a1410",$type:"color"},errorContainer:{$value:"#52271f",$type:"color"},onErrorContainer:{$value:"#f1cec5",$type:"color"},tertiary:{$value:"#9bb56b",$type:"color"},onTertiary:{$value:"#1c2412",$type:"color"},tertiaryContainer:{$value:"#34461e",$type:"color"},onTertiaryContainer:{$value:"#e3ecd0",$type:"color"}},font:lr.font,spacing:lr.spacing,shape:lr.shape,motion:lr.motion,accessibility:{...tt.dark,focusRing:{...tt.dark.focusRing,color:{$type:"color",$value:"#d6896c"}}},zIndex:Wt},l9={light:i9,dark:o9},sr={font:{family:{sans:{$value:'"Inter Variable", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',$type:"fontFamily"},mono:{$value:'"JetBrains Mono", "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace',$type:"fontFamily"}},size:{sm:{$value:"0.8125rem",$type:"dimension"},base:{$value:"0.9375rem",$type:"dimension"},lg:{$value:"1.0625rem",$type:"dimension"},xl:{$value:"1.3125rem",$type:"dimension"},"2xl":{$value:"1.75rem",$type:"dimension"}},weight:{normal:{$value:"400",$type:"fontWeight"},medium:{$value:"500",$type:"fontWeight"},semibold:{$value:"600",$type:"fontWeight"},bold:{$value:"680",$type:"fontWeight"}},lineHeight:{tight:{$value:"1.1",$type:"number"},normal:{$value:"1.55",$type:"number"},relaxed:{$value:"1.7",$type:"number"}}},spacing:{1:{$value:"0.25rem",$type:"dimension"},2:{$value:"0.5rem",$type:"dimension"},3:{$value:"0.75rem",$type:"dimension"},4:{$value:"1rem",$type:"dimension"},5:{$value:"1.25rem",$type:"dimension"},6:{$value:"1.5rem",$type:"dimension"},8:{$value:"2rem",$type:"dimension"},10:{$value:"2.5rem",$type:"dimension"},12:{$value:"3rem",$type:"dimension"},xs:{$value:"0.25rem",$type:"dimension"},sm:{$value:"0.5rem",$type:"dimension"},md:{$value:"1rem",$type:"dimension"},lg:{$value:"1.5rem",$type:"dimension"},xl:{$value:"2rem",$type:"dimension"},"2xl":{$value:"3rem",$type:"dimension"}},shape:{radius:{sm:{$value:"0.5rem",$type:"dimension"},md:{$value:"0.875rem",$type:"dimension"},lg:{$value:"1.125rem",$type:"dimension"},xl:{$value:"1.5rem",$type:"dimension"},full:{$value:"9999px",$type:"dimension"}},shadow:{sm:{$value:"0 1px 2px color-mix(in srgb, var(--ggui-color-primary-500) 6%, transparent)",$type:"shadow"},md:{$value:"0 1px 3px rgba(21, 19, 31, 0.06), 0 8px 24px -6px color-mix(in srgb, var(--ggui-color-primary-500) 16%, transparent)",$type:"shadow"},lg:{$value:"0 2px 6px rgba(21, 19, 31, 0.05), 0 20px 40px -10px color-mix(in srgb, var(--ggui-color-primary-500) 22%, transparent)",$type:"shadow"},xl:{$value:"0 4px 10px rgba(21, 19, 31, 0.04), 0 32px 64px -16px color-mix(in srgb, var(--ggui-color-primary-500) 28%, transparent)",$type:"shadow"}}},motion:{duration:{fast:{$value:"150ms",$type:"duration"},normal:{$value:"250ms",$type:"duration"},slow:{$value:"420ms",$type:"duration"},ambient:{$value:"8000ms",$type:"duration"}},easing:{default:{$value:"cubic-bezier(0.32, 0.72, 0, 1)",$type:"cubicBezier"},spring:{$value:"cubic-bezier(0.16, 1, 0.3, 1)",$type:"cubicBezier"}},keyframes:{entrance:{$value:"0%{opacity:0;transform:translateY(6px)}100%{opacity:1;transform:none}",$type:"keyframes"}},transition:Bc}},s9={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"}},c9={$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:{...s9},neutral:{50:{$value:"#fafaf7",$type:"color"},100:{$value:"#f4f4f0",$type:"color"},200:{$value:"#e8e7e3",$type:"color"},300:{$value:"#d4d3cf",$type:"color"},400:{$value:"#9c9ba0",$type:"color"},500:{$value:"#6e6d74",$type:"color"},600:{$value:"#4a4954",$type:"color"},700:{$value:"#322f3e",$type:"color"},800:{$value:"#211f2c",$type:"color"},900:{$value:"#15131f",$type:"color"}},success:{50:{$value:"#ecfdf5",$type:"color"},100:{$value:"#d1fae5",$type:"color"},200:{$value:"#a7f3d0",$type:"color"},500:{$value:"#0e9d6e",$type:"color"},600:{$value:"#0b8259",$type:"color"},700:{$value:"#086847",$type:"color"},800:{$value:"#064e36",$type:"color"}},warning:{50:{$value:"#fff8eb",$type:"color"},100:{$value:"#fdecc8",$type:"color"},200:{$value:"#fbd897",$type:"color"},500:{$value:"#e08515",$type:"color"},600:{$value:"#b86b0e",$type:"color"},700:{$value:"#90530a",$type:"color"},800:{$value:"#6b3d07",$type:"color"}},error:{50:{$value:"#fef2f4",$type:"color"},100:{$value:"#fde2e7",$type:"color"},200:{$value:"#fbc5cf",$type:"color"},500:{$value:"#dc2845",$type:"color"},600:{$value:"#b81f38",$type:"color"},700:{$value:"#94182d",$type:"color"},800:{$value:"#701222",$type:"color"}},info:{50:{$value:"#ecfeff",$type:"color"},100:{$value:"#cffafe",$type:"color"},200:{$value:"#a5f3fc",$type:"color"},500:{$value:"#0891b2",$type:"color"},600:{$value:"#0e7490",$type:"color"},700:{$value:"#155e75",$type:"color"},800:{$value:"#164e63",$type:"color"}},surface:{$value:"#fafaf7",$type:"color"},onSurface:{$value:"#15131f",$type:"color"},surfaceVariant:{$value:"#f4f4f0",$type:"color"},onSurfaceVariant:{$value:"#4a4954",$type:"color"},container:{$value:"#eef2ff",$type:"color"},onContainer:{$value:"#1e1b4b",$type:"color"},outline:{$value:"#d4d3cf",$type:"color"},outlineVariant:{$value:"#e8e7e3",$type:"color"},onPrimary:{$value:"#fafaf7",$type:"color"},primaryContainer:{$value:"#eef2ff",$type:"color"},onPrimaryContainer:{$value:"#1e1b4b",$type:"color"},onError:{$value:"#fafaf7",$type:"color"},errorContainer:{$value:"#fde2e7",$type:"color"},onErrorContainer:{$value:"#701222",$type:"color"},tertiary:{$value:"#7c3aed",$type:"color"},onTertiary:{$value:"#fafaf7",$type:"color"},tertiaryContainer:{$value:"#ede9fe",$type:"color"},onTertiaryContainer:{$value:"#4c1d95",$type:"color"}},font:sr.font,spacing:sr.spacing,shape:sr.shape,motion:sr.motion,accessibility:{...tt.light,focusRing:{...tt.light.focusRing,color:{$type:"color",$value:"#4f46e5"}}},zIndex:Wt},u9={$name:"Indigo",$description:"Flagship ggui preset (dark) — refined electric indigo on rich midnight. Premium, restrained, distinctive.",$metadata:{font:"inter",philosophy:"Looks like a deliberate aesthetic choice. Linear/Arc/Vercel-grade restraint with one confident accent."},color:{primary:{50:{$value:"#1e1b4b",$type:"color"},100:{$value:"#312e81",$type:"color"},200:{$value:"#3730a3",$type:"color"},300:{$value:"#4338ca",$type:"color"},400:{$value:"#4f46e5",$type:"color"},500:{$value:"#818cf8",$type:"color"},600:{$value:"#a5b4fc",$type:"color"},700:{$value:"#c7d2fe",$type:"color"},800:{$value:"#e0e7ff",$type:"color"},900:{$value:"#eef2ff",$type:"color"}},neutral:{50:{$value:"#0c0b14",$type:"color"},100:{$value:"#15131f",$type:"color"},200:{$value:"#1d1b29",$type:"color"},300:{$value:"#2a2839",$type:"color"},400:{$value:"#3e3c50",$type:"color"},500:{$value:"#5e5c70",$type:"color"},600:{$value:"#8b8898",$type:"color"},700:{$value:"#b8b6c2",$type:"color"},800:{$value:"#dcdbe2",$type:"color"},900:{$value:"#f5f4f9",$type:"color"}},success:{50:{$value:"#022c1d",$type:"color"},100:{$value:"#064e36",$type:"color"},200:{$value:"#086847",$type:"color"},500:{$value:"#34d399",$type:"color"},600:{$value:"#6ee7b7",$type:"color"},700:{$value:"#a7f3d0",$type:"color"},800:{$value:"#d1fae5",$type:"color"}},warning:{50:{$value:"#3a2104",$type:"color"},100:{$value:"#6b3d07",$type:"color"},200:{$value:"#90530a",$type:"color"},500:{$value:"#f59e0b",$type:"color"},600:{$value:"#fbbf24",$type:"color"},700:{$value:"#fcd34d",$type:"color"},800:{$value:"#fde68a",$type:"color"}},error:{50:{$value:"#3b0a14",$type:"color"},100:{$value:"#701222",$type:"color"},200:{$value:"#94182d",$type:"color"},500:{$value:"#fb7185",$type:"color"},600:{$value:"#fda4af",$type:"color"},700:{$value:"#fecdd3",$type:"color"},800:{$value:"#ffe4e6",$type:"color"}},info:{50:{$value:"#083344",$type:"color"},100:{$value:"#164e63",$type:"color"},200:{$value:"#155e75",$type:"color"},500:{$value:"#22d3ee",$type:"color"},600:{$value:"#67e8f9",$type:"color"},700:{$value:"#a5f3fc",$type:"color"},800:{$value:"#cffafe",$type:"color"}},surface:{$value:"#15131f",$type:"color"},onSurface:{$value:"#f5f4f9",$type:"color"},surfaceVariant:{$value:"#221e35",$type:"color"},onSurfaceVariant:{$value:"#c8c6d2",$type:"color"},container:{$value:"#312e81",$type:"color"},onContainer:{$value:"#eef2ff",$type:"color"},outline:{$value:"#3e3c50",$type:"color"},outlineVariant:{$value:"#2a2839",$type:"color"},onPrimary:{$value:"#0c0b14",$type:"color"},primaryContainer:{$value:"#312e81",$type:"color"},onPrimaryContainer:{$value:"#e0e7ff",$type:"color"},onError:{$value:"#3b0a14",$type:"color"},errorContainer:{$value:"#701222",$type:"color"},onErrorContainer:{$value:"#fecdd3",$type:"color"},tertiary:{$value:"#a78bfa",$type:"color"},onTertiary:{$value:"#2e1065",$type:"color"},tertiaryContainer:{$value:"#4c1d95",$type:"color"},onTertiaryContainer:{$value:"#ede9fe",$type:"color"}},font:sr.font,spacing:sr.spacing,shape:sr.shape,motion:sr.motion,accessibility:{...tt.dark,focusRing:{...tt.dark.focusRing,color:{$type:"color",$value:"#818cf8"}}},zIndex:Wt},d9={light:c9,dark:u9},c1={font:{family:{sans:{$value:'"DM Sans", system-ui, -apple-system, sans-serif',$type:"fontFamily"},mono:{$value:'"JetBrains Mono", ui-monospace, monospace',$type:"fontFamily"}},size:{sm:{$value:"0.875rem",$type:"dimension"},base:{$value:"1rem",$type:"dimension"},lg:{$value:"1.125rem",$type:"dimension"},xl:{$value:"1.25rem",$type:"dimension"},"2xl":{$value:"1.5rem",$type:"dimension"}},weight:{normal:{$value:"400",$type:"fontWeight"},medium:{$value:"500",$type:"fontWeight"},semibold:{$value:"600",$type:"fontWeight"},bold:{$value:"700",$type:"fontWeight"}},lineHeight:{tight:{$value:"1.25",$type:"number"},normal:{$value:"1.5",$type:"number"},relaxed:{$value:"1.75",$type:"number"}}},spacing:{1:{$value:"0.25rem",$type:"dimension"},2:{$value:"0.5rem",$type:"dimension"},3:{$value:"0.75rem",$type:"dimension"},4:{$value:"1rem",$type:"dimension"},5:{$value:"1.25rem",$type:"dimension"},6:{$value:"1.5rem",$type:"dimension"},8:{$value:"2rem",$type:"dimension"},10:{$value:"2.5rem",$type:"dimension"},12:{$value:"3rem",$type:"dimension"}},motion:{duration:{fast:{$value:"120ms",$type:"duration"},normal:{$value:"200ms",$type:"duration"},slow:{$value:"400ms",$type:"duration"},ambient:{$value:"2000ms",$type:"duration"}},easing:{default:{$value:"cubic-bezier(0.4, 0, 0.2, 1)",$type:"cubicBezier"},bounce:{$value:"cubic-bezier(0.68, -0.55, 0.27, 1.55)",$type:"cubicBezier"},spring:{$value:"cubic-bezier(0.22, 1, 0.36, 1)",$type:"cubicBezier"}},transition:{fast:{$value:"120ms cubic-bezier(0.4, 0, 0.2, 1)",$type:"transition"},normal:{$value:"200ms cubic-bezier(0.4, 0, 0.2, 1)",$type:"transition"},slow:{$value:"400ms cubic-bezier(0.4, 0, 0.2, 1)",$type:"transition"},colors:{$value:"color 200ms cubic-bezier(0.4, 0, 0.2, 1), background-color 200ms cubic-bezier(0.4, 0, 0.2, 1), border-color 200ms cubic-bezier(0.4, 0, 0.2, 1)",$type:"transition"},opacity:{$value:"opacity 200ms cubic-bezier(0.4, 0, 0.2, 1)",$type:"transition"},transform:{$value:"transform 200ms cubic-bezier(0.22, 1, 0.36, 1)",$type:"transition"}},keyframes:{"fade-in":{$value:"0%{opacity:0}100%{opacity:1}",$type:"keyframes"},"slide-up":{$value:"0%{opacity:0;transform:translateY(8px)}100%{opacity:1;transform:translateY(0)}",$type:"keyframes"},"pulse-soft":{$value:"0%{opacity:1}50%{opacity:0.65}100%{opacity:1}",$type:"keyframes"}}},accessibility:{focusRing:{color:{$value:"#B8FF3A",$type:"color"},width:{$value:"2px",$type:"dimension"},offset:{$value:"2px",$type:"dimension"}},reducedMotion:{duration:{$value:"0ms",$type:"duration"}},highContrast:{borderWidth:{$value:"2px",$type:"dimension"},textColor:{$value:"#FFFFFF",$type:"color"},backgroundColor:{$value:"#000000",$type:"color"},linkColor:{$value:"#CCFF66",$type:"color"}}},zIndex:Wt},u1={sm:{$value:"0.375rem",$type:"dimension"},md:{$value:"0.5rem",$type:"dimension"},lg:{$value:"0.75rem",$type:"dimension"},xl:{$value:"1rem",$type:"dimension"},full:{$value:"9999px",$type:"dimension"}},f9={sm:{$value:"0 1px 2px rgba(0, 0, 0, 0.2)",$type:"shadow"},md:{$value:"0 2px 8px rgba(0, 0, 0, 0.25)",$type:"shadow"},lg:{$value:"0 6px 16px rgba(0, 0, 0, 0.28)",$type:"shadow"},xl:{$value:"0 10px 24px rgba(0, 0, 0, 0.3)",$type:"shadow"}},p9={sm:{$value:"0 1px 2px rgba(26, 29, 36, 0.06)",$type:"shadow"},md:{$value:"0 2px 8px rgba(26, 29, 36, 0.08)",$type:"shadow"},lg:{$value:"0 6px 16px rgba(26, 29, 36, 0.1)",$type:"shadow"},xl:{$value:"0 12px 28px rgba(26, 29, 36, 0.12)",$type:"shadow"}},d1={$name:"guuey-brand-v1",$description:"The guuey product brand (dark) — slate-ink surfaces, slime #B8FF3A accent, DM Sans.",$metadata:{font:"DM Sans",fontUrl:"https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap",philosophy:"Agent-native. Slime on slate.",frameless:!0},color:{primary:{50:{$value:"#141D05",$type:"color"},100:{$value:"#28390B",$type:"color"},200:{$value:"#3F5A11",$type:"color"},300:{$value:"#5F8719",$type:"color"},400:{$value:"#8CC627",$type:"color"},500:{$value:"#B8FF3A",$type:"color"},600:{$value:"#CCFF66",$type:"color"},700:{$value:"#DBFF8F",$type:"color"},800:{$value:"#E9FFB8",$type:"color"},900:{$value:"#F6FFE0",$type:"color"}},neutral:{50:{$value:"#0E1014",$type:"color"},100:{$value:"#1A1D24",$type:"color"},200:{$value:"#232630",$type:"color"},300:{$value:"#242938",$type:"color"},400:{$value:"#3B4152",$type:"color"},500:{$value:"#878C99",$type:"color"},600:{$value:"#B7BAC4",$type:"color"},700:{$value:"#D5D6DC",$type:"color"},800:{$value:"#E8E7E2",$type:"color"},900:{$value:"#F6F5EE",$type:"color"}},success:{50:{$value:"#141D05",$type:"color"},100:{$value:"#28390B",$type:"color"},200:{$value:"#3F5A11",$type:"color"},500:{$value:"#B8FF3A",$type:"color"},600:{$value:"#CCFF66",$type:"color"},700:{$value:"#DBFF8F",$type:"color"},800:{$value:"#E9FFB8",$type:"color"}},warning:{50:{$value:"#33240A",$type:"color"},100:{$value:"#5C420F",$type:"color"},200:{$value:"#8A6318",$type:"color"},500:{$value:"#FFB020",$type:"color"},600:{$value:"#FFC24D",$type:"color"},700:{$value:"#FFD37D",$type:"color"},800:{$value:"#FFE5AE",$type:"color"}},error:{50:{$value:"#33110E",$type:"color"},100:{$value:"#5E1F1B",$type:"color"},200:{$value:"#8F2F2A",$type:"color"},500:{$value:"#FF5B5B",$type:"color"},600:{$value:"#FF7D7A",$type:"color"},700:{$value:"#FF9F9C",$type:"color"},800:{$value:"#FFC3C0",$type:"color"}},info:{50:{$value:"#0A2733",$type:"color"},100:{$value:"#12455C",$type:"color"},200:{$value:"#1E6A8A",$type:"color"},500:{$value:"#3AC8FF",$type:"color"},600:{$value:"#66D4FF",$type:"color"},700:{$value:"#92E0FF",$type:"color"},800:{$value:"#BFECFF",$type:"color"}},surface:{$value:"#1A1D24",$type:"color"},onSurface:{$value:"#F6F5EE",$type:"color"},surfaceVariant:{$value:"#242938",$type:"color"},onSurfaceVariant:{$value:"#B7BAC4",$type:"color"},container:{$value:"#232630",$type:"color"},onContainer:{$value:"#F6F5EE",$type:"color"},outline:{$value:"rgba(246, 245, 238, 0.14)",$type:"color"},outlineVariant:{$value:"rgba(246, 245, 238, 0.1)",$type:"color"},onPrimary:{$value:"#0E1014",$type:"color"},primaryContainer:{$value:"#242938",$type:"color"},onPrimaryContainer:{$value:"#CCFF66",$type:"color"},onError:{$value:"#33110E",$type:"color"},errorContainer:{$value:"#5E1F1B",$type:"color"},onErrorContainer:{$value:"#FFC3C0",$type:"color"},tertiary:{$value:"#FF4FB0",$type:"color"},onTertiary:{$value:"#0E1014",$type:"color"},tertiaryContainer:{$value:"#451A35",$type:"color"},onTertiaryContainer:{$value:"#FFC1E4",$type:"color"}},...c1,shape:{radius:u1,shadow:f9}},g9={$name:"guuey-brand-v1",$description:"The guuey product brand (light, provisional) — paper surfaces, slime accent held for fills, darkened slime for text emphasis.",$metadata:d1.$metadata,color:{primary:{50:{$value:"#F6FFE0",$type:"color"},100:{$value:"#E9FFB8",$type:"color"},200:{$value:"#DBFF8F",$type:"color"},300:{$value:"#CCFF66",$type:"color"},400:{$value:"#B8FF3A",$type:"color"},500:{$value:"#9FE01C",$type:"color"},600:{$value:"#7DB214",$type:"color"},700:{$value:"#5C850D",$type:"color"},800:{$value:"#3F5A11",$type:"color"},900:{$value:"#28390B",$type:"color"}},neutral:{50:{$value:"#FBFAF6",$type:"color"},100:{$value:"#F6F5EE",$type:"color"},200:{$value:"#E8E7E2",$type:"color"},300:{$value:"#D5D6DC",$type:"color"},400:{$value:"#B7BAC4",$type:"color"},500:{$value:"#6E7380",$type:"color"},600:{$value:"#4A4F5C",$type:"color"},700:{$value:"#333846",$type:"color"},800:{$value:"#242938",$type:"color"},900:{$value:"#1A1D24",$type:"color"}},success:{50:{$value:"#F6FFE0",$type:"color"},100:{$value:"#E9FFB8",$type:"color"},200:{$value:"#DBFF8F",$type:"color"},500:{$value:"#7DB214",$type:"color"},600:{$value:"#5C850D",$type:"color"},700:{$value:"#476809",$type:"color"},800:{$value:"#28390B",$type:"color"}},warning:{50:{$value:"#FFF4DD",$type:"color"},100:{$value:"#FFE5AE",$type:"color"},200:{$value:"#FFD37D",$type:"color"},500:{$value:"#D98A0A",$type:"color"},600:{$value:"#A96A06",$type:"color"},700:{$value:"#7C4D04",$type:"color"},800:{$value:"#523203",$type:"color"}},error:{50:{$value:"#FFE9E8",$type:"color"},100:{$value:"#FFC3C0",$type:"color"},200:{$value:"#FF9F9C",$type:"color"},500:{$value:"#E23B3B",$type:"color"},600:{$value:"#B62C2C",$type:"color"},700:{$value:"#8A1F1F",$type:"color"},800:{$value:"#5E1F1B",$type:"color"}},info:{50:{$value:"#E5F7FF",$type:"color"},100:{$value:"#BFECFF",$type:"color"},200:{$value:"#92E0FF",$type:"color"},500:{$value:"#0E93C9",$type:"color"},600:{$value:"#0B739E",$type:"color"},700:{$value:"#085572",$type:"color"},800:{$value:"#12455C",$type:"color"}},surface:{$value:"#FFFFFF",$type:"color"},onSurface:{$value:"#1A1D24",$type:"color"},surfaceVariant:{$value:"#F6F5EE",$type:"color"},onSurfaceVariant:{$value:"#4A4F5C",$type:"color"},container:{$value:"#FBFAF6",$type:"color"},onContainer:{$value:"#1A1D24",$type:"color"},outline:{$value:"rgba(26, 29, 36, 0.18)",$type:"color"},outlineVariant:{$value:"rgba(26, 29, 36, 0.10)",$type:"color"},onPrimary:{$value:"#0E1014",$type:"color"},primaryContainer:{$value:"#E9FFB8",$type:"color"},onPrimaryContainer:{$value:"#28390B",$type:"color"},onError:{$value:"#FFFFFF",$type:"color"},errorContainer:{$value:"#FFE9E8",$type:"color"},onErrorContainer:{$value:"#8A1F1F",$type:"color"},tertiary:{$value:"#D6247F",$type:"color"},onTertiary:{$value:"#FFFFFF",$type:"color"},tertiaryContainer:{$value:"#FFDCEE",$type:"color"},onTertiaryContainer:{$value:"#6B1240",$type:"color"}},...c1,shape:{radius:u1,shadow:p9}},m9={light:g9,dark:d1},h9=new Map([["ggui",qk],["indigo",d9],["claudic",l9],["premium-cyberpunk",Gk],["premium-zen",Jk],["premium-neon-noir",Qk],["premium-botanical",a9],["guuey-brand-v1",m9]]),Nv=new Map;function y9(e,n){return n==="dark"&&e.dark?"dark":"light"}function v9(e,n="light"){const o=h9.get(e);if(!o)return;const l=y9(o,n),c=`${e}:${l}`,u=Nv.get(c);if(u)return u;const d=l==="dark"?o.dark:o.light,p=Fk(e,d);return Nv.set(c,p),p}function f1(){return"ggui"}D.createContext(null);var p1="@supports (color: color-mix(in srgb, red, blue))";function $9(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 b9(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 Hf(e,n){const o=b9(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 x9(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 _9(e,n,o){if(!o||!e.includes("color-mix("))return e;const{base:l,colorMix:c}=x9(e);if(c.length===0)return e;const u=c.map(g=>Hf(g,o)),d=`${n} {
|
|
179
|
-
${u.join(`
|
|
180
|
-
`)}
|
|
181
|
-
}`,p=`${p1} {
|
|
182
|
-
${n} {
|
|
183
|
-
${c.join(`
|
|
184
|
-
`)}
|
|
185
|
-
}
|
|
186
|
-
}`;return`${l}
|
|
187
|
-
${d}
|
|
188
|
-
${p}`}function j9(e,n="light"){return pp(f1(),e,n)}function pp(e,n,o="light"){var h;const l=v9(e,o);if(!l){const y=f1();return e===y?"":pp(y,n,o)}const c=$9(l.cssVariables),u=_9(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=S9(n,c),g=((h=l.metadata)==null?void 0:h.frameless)===!0?`
|
|
193
|
-
.${n} > :where(:not(style)) { border: none !important; }`:"";return`${u}
|
|
194
|
-
${d}
|
|
195
|
-
${p}
|
|
196
|
-
${l.cssKeyframes}
|
|
197
|
-
.${n} *, .${n} *::before, .${n} *::after { box-sizing: border-box; }
|
|
198
|
-
.${n} h1, .${n} h2, .${n} h3, .${n} h4, .${n} h5, .${n} h6, .${n} button, .${n} input, .${n} textarea, .${n} select { font-family: inherit; }${g}`}function S9(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} {
|
|
199
|
-
${l}
|
|
200
|
-
${c}
|
|
201
|
-
${u}
|
|
202
|
-
${d}
|
|
203
|
-
}`;const p=" --ggui-color-surface-gradient: linear-gradient(180deg, var(--ggui-color-surface) 0%, var(--ggui-color-surface) 100%);",g=` --ggui-effect-glow-primary: ${Hf("0 0 0 4px color-mix(in srgb, var(--ggui-color-primary-500) 18%, transparent)",n)};`,h=` --ggui-effect-glow-primary-strong: ${Hf("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} {
|
|
204
|
-
${l}
|
|
205
|
-
${p}
|
|
206
|
-
${g}
|
|
207
|
-
${h}
|
|
208
|
-
}`,v=`${p1} {
|
|
209
|
-
${o} {
|
|
210
|
-
${c}
|
|
211
|
-
${u}
|
|
212
|
-
${d}
|
|
213
|
-
}
|
|
214
|
-
}`;return`${y}
|
|
215
|
-
${v}`}var w9=["useAction","useStream","useAuth","useApp","useRender","useGguiContext","useContract","useWireContext","GguiWireProvider"],k9=["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"],N9=["SearchField","FormField","MenuItem","Tag","Dropdown","Autocomplete","Breadcrumb","Pagination","EmptyState","Stat","Stepper","Markdown","MarkdownInline","renderRichTextInlines"],E9=["Header","Sidebar","CardGrid","CommentThread","DataTable","ChatWindow","NavigationBar","FileUploader","NotificationCenter","Modal","CommandPalette","Footer","Hero"],Ev=["Clickable","Hoverable","Pressable"],z9=["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"],C9=["animation","duration","easing","transition","keyframes","thinkingAnimation","thinkingKeyframes","thinkingPresets","THINKING_DEFAULT_STYLE","motionSafe","reducedMotion","reducedMotionCSS","colors","gray","primary","semantic","chartColors","success","warning","error","info","highContrast","typography","fontFamily","fontSize","fontSizeValues","fontWeight","lineHeight","letterSpacing","headingStyles","spacing","spacingValues","radius","shadow","elevation","maxWidth","zIndex","accessibility","focusRing","nativeTokens","tokens"];function Rt(e,n,o){return e=e.split(`from"${n}"`).join(`from"${o}"`),e=e.split(`from "${n}"`).join(`from "${o}"`),e=e.split(`from'${n}'`).join(`from'${o}'`),e=e.split(`from '${n}'`).join(`from '${o}'`),e=e.split(`import"${n}"`).join(`import"${o}"`),e=e.split(`import "${n}"`).join(`import "${o}"`),e=e.split(`import'${n}'`).join(`import'${o}'`),e=e.split(`import '${n}'`).join(`import '${o}'`),e}function gp(e,n){return`(globalThis.__ggui__&&globalThis.__ggui__["${e}"]||window["${n}"])`}function Yi(e){return`data:text/javascript,${encodeURIComponent(e)}`}function T9(e){const n=z9.map(l=>`export const ${l} = R.${l};`).join(" ");return`const R = ${gp("react",e)}; export default R; ${n}`}function M9(e){return Yi(T9(e))}function O9(){return`const D = globalThis.__ggui__["reactDom"]; export default D; ${["createPortal","flushSync","unstable_batchedUpdates"].map(o=>`export const ${o} = D.${o};`).join(" ")}`}function R9(){return Yi(O9())}function A9(e){return[`const R = ${gp("react",e)};`,"function jsx(t,p,k){","if(k!==undefined){p={...p,key:k}}","const c=p.children;","delete p.children;","return Array.isArray(c)?R.createElement(t,p,...c):c!==undefined?R.createElement(t,p,c):R.createElement(t,p)","}","export{jsx,jsx as jsxs,jsx as jsxDEV};","export const Fragment=R.Fragment;"].join("")}function D9(e){return Yi(A9(e))}function U9(e,n,o,l,c){if(o&&o.length>0){const d=[e,...l||[]],p=[n,...c||[]],g=d.map((v,j)=>`(globalThis.__ggui__&&globalThis.__ggui__["${p[j]}"]||window["${v}"]||{})`),h=g.join(","),y=o.map(v=>`export const ${v} = M["${v}"];`).join(" ");return g.length>1?`const M = Object.assign({}, ${h}); ${y} export default M;`:`const M = ${g[0]}; ${y} export default M;`}return`const M = ${gp(n,e)} || {}; const handler = { get(_, key) { return M[key]; } }; export default new Proxy({}, handler);`}function Xn(e,n,o,l,c){return Yi(U9(e,n,o,l,c))}function I9(){return`const w = globalThis.__ggui__.wire; ${w9.map(n=>`export const ${n} = w.${n};`).join(" ")} export default w;`}function B9(){return Yi(I9())}function L9(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];}});"),c.join("")}function V9(e,n){return Yi(F9(e,n))}function H9(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=M9(o),h=D9(o);e=Rt(e,"react/jsx-runtime",h),e=Rt(e,"react/jsx-dev-runtime",h);const y=R9();e=Rt(e,"react-dom",y),e=Rt(e,"react",g);const v=[...k9,...N9,...E9,...Ev];e=Rt(e,"@ggui-ai/design/primitives",Xn(l,"primitives",v,[c,u,d],["components","compositions","interact"])),e=Rt(e,"@ggui-ai/design/components",Xn(c,"components",v,[l,u,d],["primitives","compositions","interact"])),e=Rt(e,"@ggui-ai/design/compositions",Xn(u,"compositions",v,[l,c,d],["primitives","components","interact"])),e=Rt(e,"@ggui-ai/design/interact",Xn(d,"interact",[...Ev])),e=Rt(e,"@ggui-ai/design/templates",Xn(u,"compositions",v,[l,c],["primitives","components"])),e=Rt(e,"@ggui-ai/design/app-components",Xn(p,"appComponents")),e=Rt(e,"@ggui-ai/design/tokens",Xn("__GGUI_TOKENS","tokens",[...C9])),e=Rt(e,"@ggui-ai/design",Xn(l,"primitives",v,[c,u,d],["components","compositions","interact"])),e=Rt(e,"@ggui-ai/wire",B9());const j=[...new Set(["@ggui-ai/gadgets",...n.gadgetPackages??[]])];for(const k of j){const x=L9(e,k);e=Rt(e,k,V9(k,x))}return e}var q9={"react/jsx-runtime":"jsx-runtime","react/jsx-dev-runtime":"jsx-runtime","react-dom":"react-dom",react:"react","@ggui-ai/design/primitives":"primitives","@ggui-ai/design/components":"components","@ggui-ai/design/compositions":"compositions","@ggui-ai/design/interact":"interact","@ggui-ai/design/templates":"templates","@ggui-ai/design/app-components":"app-components","@ggui-ai/design/tokens":"tokens","@ggui-ai/design":"design","@ggui-ai/wire":"wire","@ggui-ai/gadgets":"gadgets"};function P9(e,n){const o=n.shimBaseUrl.replace(/\/$/,"");for(const[l,c]of Object.entries(q9))e=Rt(e,l,`${o}/${c}.js`);return e}function Z9(e,n){const o=n.reactBaseUrl??"https://esm.sh/react@18.2.0";return e=Rt(e,"react/jsx-runtime",`${o}/jsx-runtime`),e=Rt(e,"react/jsx-dev-runtime",`${o}/jsx-runtime`),e=Rt(e,"react",o),e}function G9(e,n){switch(n.mode){case"data-url":return H9(e,n);case"importmap":return Z9(e,n);case"asset-url":return P9(e,n)}}function Y9(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 K9(e){const n=new Blob([e],{type:"application/javascript"}),o=URL.createObjectURL(n);try{return await import(o)}finally{URL.revokeObjectURL(o)}}var J9=0;function X9(e){return`ggui-rcr-${e.replace(/[^a-z0-9]/gi,"")}`}var W9=1,Q9=500,eN=class extends xc.Component{constructor(){super(...arguments);pn(this,"state",{error:null,catchCount:0,autoRetrying:!1});pn(this,"retryTimer",null)}static getDerivedStateFromError(n){return{error:n}}componentDidCatch(n){var l,c;const o=this.state.catchCount+1;this.setState({catchCount:o}),o<=W9?(this.setState({autoRetrying:!0}),this.retryTimer=setTimeout(()=>{this.setState({error:null,autoRetrying:!1})},Q9)):(c=(l=this.props).onError)==null||c.call(l,n)}componentWillUnmount(){this.retryTimer&&clearTimeout(this.retryTimer)}render(){const{error:n,autoRetrying:o}=this.state;return n?o?i.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:24,minHeight:80,gap:8,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',fontSize:13,color:"var(--ggui-color-onSurface, inherit)",opacity:.6},children:[i.jsx("div",{style:{width:16,height:16,border:"2px solid rgba(128,128,128,0.25)",borderTopColor:"currentColor",borderRadius:"50%",animation:"ggui-err-spin 0.6s linear infinite"}}),"Retrying...",i.jsx("style",{children:"@keyframes ggui-err-spin { to { transform: rotate(360deg); } }"})]}):i.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"32px 24px",minHeight:120,gap:12,textAlign:"center",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',color:"var(--ggui-color-onSurface, inherit)"},children:[i.jsx("div",{style:{width:48,height:48,borderRadius:14,background:"rgba(239, 68, 68, 0.1)",color:"#ef4444",display:"flex",alignItems:"center",justifyContent:"center",fontSize:22},children:"!"}),i.jsx("div",{style:{fontSize:14,fontWeight:600,opacity:.9},children:"Something went wrong"}),i.jsx("div",{style:{fontSize:12,opacity:.6,maxWidth:280,lineHeight:1.4},children:"This component encountered an error. Try asking for a different view."}),i.jsx("button",{onClick:()=>this.setState({error:null,catchCount:0}),style:{marginTop:4,padding:"8px 20px",borderRadius:8,border:"1px solid currentColor",background:"transparent",color:"inherit",opacity:.75,fontSize:13,fontWeight:500,cursor:"pointer"},children:"Retry"}),i.jsxs("details",{style:{marginTop:8,maxWidth:320,width:"100%",textAlign:"left",opacity:.65},children:[i.jsx("summary",{style:{fontSize:11,cursor:"pointer"},children:"Error details"}),i.jsx("pre",{style:{fontSize:11,fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",whiteSpace:"pre-wrap",overflowWrap:"anywhere",margin:"6px 0 0",maxHeight:140,overflow:"auto"},children:n.message})]})]}):this.props.children}};function tN({code:e,props:n={},themeId:o,cssOverrides:l,fallback:c=i.jsx("div",{children:"Loading component..."}),onError:u}){const d=D.useId(),[p]=D.useState(()=>X9(d)||`ggui-rcr-${++J9}`),[g,h]=D.useState(null),[y,v]=D.useState(null),[j,k]=D.useState(!0);D.useEffect(()=>{if(!e||e.trim().length===0){h(null),k(!1);return}let z=!1;k(!0),v(null),h(null);async function E(){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 $=Dk(w),N=globalThis;let R={};try{R=await Rx(()=>import("./index-DkpU90HX.js").then(te=>te.i),[])}catch{}N.__ggui__={react:xc,reactDom:R,primitives:Af,components:Bf,compositions:Ff,interact:Vf,wire:z8},N.__REACT=xc,N.__GGUI_PRIMITIVES=Af,N.__GGUI_COMPONENTS=Bf,N.__GGUI_COMPOSITIONS=Ff,N.__GGUI_INTERACT=Vf;const _=Y9($),S=G9(_,{mode:"data-url"}),C=await K9(S);if(z)return;const U=C.default??Object.values(C).find(te=>typeof te=="function");if(!U)throw new Error("Module does not export a default component");h(()=>U),v(null)}catch(w){if(z)return;const $=w instanceof Error?w:new Error(String(w));v($),h(null),u==null||u($)}finally{z||k(!1)}}return E(),()=>{z=!0}},[e]);const x=o?pp(o,p):j9(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(eN,{onError:u,children:i.jsx(g,{...n})},e.length)]}):i.jsx("div",{children:c})}function aN(){return i.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:80},children:i.jsx(Ga,{})})}function nN({suspended:e=!1,fallback:n}={}){return e?null:i.jsx(i.Fragment,{children:n??i.jsx(aN,{})})}var rN="var(--ggui-font-family-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)",iN={display:"inline-flex",alignItems:"center",gap:4,fontFamily:rN,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"},oN={appearance:"none",background:"transparent",border:"none",padding:"2px 4px",fontFamily:"inherit",fontSize:"inherit",color:"var(--ggui-color-neutral-400, #9ca3af)",cursor:"pointer"},lN={display:"inline-flex",alignItems:"center",gap:4,margin:0},sN={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 cN({onUiFeedback:e,sessionId:n,toolName:o}){const[l,c]=D.useState("idle"),[u,d]=D.useState(""),p=D.useCallback((h,y)=>{if(!e)return;const v=y==null?void 0:y.trim();e({verdict:h,...v!==void 0&&v.length>0?{comment:v}:{},...n!==void 0?{sessionId:n}:{},...o!==void 0?{toolName:o}:{}}),c("sent")},[e,n,o]),g=D.useCallback(h=>{h.preventDefault(),p("other",u)},[p,u]);return!e||l==="dismissed"?null:i.jsxs("div",{"data-ggui-ui-feedback":!0,role:"group","aria-label":"Share feedback on this UI",style:iN,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:lN,"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:sN,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:oN,"aria-label":"Dismiss feedback","data-ggui-ui-feedback-dismiss":!0,onClick:()=>c("dismissed"),children:"×"})]})}function uN({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(zv,{children:i.jsx(nN,{fallback:n})}):i.jsxs(zv,{children:[i.jsx(tN,{code:e.componentCode,props:e.props,cssOverrides:l,themeId:c,onError:o,fallback:n}),u?i.jsx(cN,{onUiFeedback:u,...d!==void 0?{sessionId:d}:{},...p!==void 0?{toolName:p}:{}}):null]})}function zv({children:e}){return fN()?i.jsx(i.Fragment,{children:e}):i.jsx(P$,{config:dN,children:e})}var dN={app:{appId:"preview",appName:"preview"},render:{sessionId:"preview",isConnected:!1},auth:{isAuthenticated:!1},dispatch:()=>{},subscribe:()=>()=>{}};function fN(){try{return Zr()}catch{return null}}new TextDecoder;function Me({tone:e,children:n,dot:o=!0}){return i.jsxs("span",{className:`ggui-status ggui-status--${e}`,children:[o?i.jsx("span",{className:"ggui-status__dot","aria-hidden":!0}):null,n]})}function pN({blueprintId:e}){const[n,o]=D.useState({kind:"loading"});return D.useEffect(()=>{const l=new AbortController;return(async()=>{try{const c=await fetch(`/ggui/console/blueprint/${encodeURIComponent(e)}`,{signal:l.signal,headers:{accept:"application/json"}});if(c.status===404){o({kind:"not-found"});return}if(!c.ok){o({kind:"error",message:`server returned ${c.status}`});return}const u=await c.json();o({kind:"ready",blueprint:u})}catch(c){if(l.signal.aborted)return;o({kind:"error",message:String(c)})}})(),()=>l.abort()},[e]),i.jsxs("section",{className:"ggui-section",children:[i.jsx(ot,{num:"01 / blueprint",title:"Manifest-registered surface.",mute:i.jsx(i.Fragment,{children:i.jsxs("code",{className:"ggui-code",children:["/preview/",e]})}),intro:i.jsxs(i.Fragment,{children:["Reads the bundle via"," ",i.jsx("code",{className:"ggui-code",children:"LocalUiRegistry"}),". Same bytes an agent would get from"," ",i.jsx("code",{className:"ggui-code",children:"ggui_render_blueprint"}),"."]})}),n.kind==="loading"?i.jsx(Cv,{title:"loading",num:"BPR / 01",tone:"draft",children:"Loading blueprint…"}):n.kind==="not-found"?i.jsx(hN,{blueprintId:e}):n.kind==="error"?i.jsxs(Cv,{title:"error",num:"ERR / 01",tone:"signal",children:["Couldn't load blueprint — ",n.message,"."]}):i.jsx(gN,{blueprint:n.blueprint})]})}function gN({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(mN,{blueprintId:e.blueprintId})]}),i.jsx("div",{className:"ggui-pane__body",children:i.jsx(uN,{render:{componentCode:e.code},fallback:i.jsx("div",{"data-ggui-preview-state":"waiting",className:"ggui-muted",style:{padding:"16px 0"},children:"Loading component…"})})})]})}function mN({blueprintId:e}){const[n,o]=D.useState({kind:"idle"}),l=async()=>{o({kind:"pending"});try{const c=await fetch(`/ggui/console/blueprint/${encodeURIComponent(e)}/try`,{method:"POST",headers:{accept:"application/json"}});if(!c.ok){const u=await c.json().catch(()=>({}));o({kind:"error",message:u.message??`server returned ${c.status}`});return}o({kind:"ok"})}catch(c){o({kind:"error",message:String(c)})}};return i.jsxs("span",{className:"ggui-pane__actions",style:{marginLeft:"auto"},children:[n.kind==="error"?i.jsx("span",{className:"ggui-muted","data-ggui-try-live":"error",title:n.message,style:{marginRight:"8px",fontSize:"0.75rem"},children:"try-live failed"}):null,n.kind==="ok"?i.jsx("span",{className:"ggui-muted","data-ggui-try-live":"ok",style:{marginRight:"8px",fontSize:"0.75rem"},children:"try-live ok"}):null,i.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost","data-ggui-try-live":n.kind==="pending"?"pending":"idle","data-ggui-blueprint-id":e,disabled:n.kind==="pending",onClick:()=>{l()},children:n.kind==="pending"?"trying…":"Try live →"})]})}function hN({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:()=>Le("/"),children:"back to landing"})})]})]})}function Cv({title:e,num:n,tone:o,children:l}){return i.jsxs("div",{className:"ggui-card",children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:e}),i.jsx("span",{className:"ggui-card__num",children:n})]}),i.jsxs("div",{className:"ggui-card__body",children:[i.jsx("p",{className:"ggui-body",children:i.jsx(Me,{tone:o,children:e})}),i.jsx("p",{className:"ggui-muted",children:l})]})]})}function yN(){const[e,n]=D.useState({kind:"loading"}),[o,l]=D.useState({kind:"loading"}),[c,u]=D.useState(""),[d,p]=D.useState(!1);D.useEffect(()=>{const x=new AbortController;return(async()=>{try{const z=await fetch("/ggui/console/registry",{signal:x.signal,headers:{accept:"application/json"}});if(!z.ok){n({kind:"error",message:`server returned ${z.status}`});return}const E=await z.json();n({kind:"ready",data:E})}catch(z){if(x.signal.aborted)return;n({kind:"error",message:String(z)})}})(),()=>x.abort()},[]);const g=D.useCallback(async x=>{l({kind:"loading"});try{const z=await fetch("/ggui/console/blueprints/cached",{signal:x,headers:{accept:"application/json"}});if(z.status===501){const w=await z.json().catch(()=>({}));l({kind:"unsupported",message:w.message??"The configured vector store does not support enumeration."});return}if(!z.ok){l({kind:"error",message:`server returned ${z.status}`});return}const E=await z.json();l({kind:"ready",data:E})}catch(z){if(x!=null&&x.aborted)return;l({kind:"error",message:String(z)})}},[]);D.useEffect(()=>{const x=new AbortController;return g(x.signal),()=>x.abort()},[g]);const h=D.useCallback(async x=>{try{await fetch(`/ggui/console/blueprints/cached/${encodeURIComponent(x)}`,{method:"DELETE"})}catch(z){l({kind:"error",message:String(z)});return}await g()},[g]),y=D.useCallback(async()=>{try{await fetch("/ggui/console/blueprints/cached/clear",{method:"POST"})}catch(x){l({kind:"error",message:String(x)});return}await g()},[g]),v=c.trim().toLowerCase(),j=D.useMemo(()=>e.kind!=="ready"?null:v.length===0?e.data:{blueprints:e.data.blueprints.filter(x=>[x.id,x.name,x.description??"",x.category??""].join(" ").toLowerCase().includes(v)),primitives:e.data.primitives.filter(x=>[x.name,x.catalog,x.source].join(" ").toLowerCase().includes(v))},[e,v]),k=D.useMemo(()=>o.kind!=="ready"?null:v.length===0?o.data.entries:o.data.entries.filter(x=>[x.id,x.cachedIntent].join(" ").toLowerCase().includes(v)),[o,v]);return i.jsxs("section",{className:"ggui-section",children:[i.jsx(ot,{num:"01 / blueprints",title:"What can this server produce without generating?",mute:"Declared and cached.",intro:i.jsxs(i.Fragment,{children:["Two answers on one screen. ",i.jsx("strong",{children:"Declared"})," blueprints from ",i.jsx("code",{className:"ggui-code",children:"ggui.json#blueprints.include"}),";"," ",i.jsx("strong",{children:"cached"})," generations the render path has stored (contract-keyed, written by the blueprint registry on every successful cold-gen)."]})}),e.kind==="loading"||o.kind==="loading"?i.jsx(Mv,{title:"loading",num:"REG / 01",tone:"draft",children:"Loading…"}):e.kind==="error"?i.jsxs(Mv,{title:"error",num:"ERR / 01",tone:"signal",children:["Couldn't load registry — ",e.message,"."]}):i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"ggui-form",style:{marginBottom:20},children:[i.jsx("label",{className:"ggui-label",htmlFor:"ggui-registry-filter",children:"filter"}),i.jsx("div",{className:"ggui-field",children:i.jsx("input",{id:"ggui-registry-filter",name:"filter","aria-label":"filter registry entries",placeholder:"substring match over id, name, description, intent…",value:c,onChange:x=>u(x.target.value),autoCapitalize:"off",autoCorrect:"off",spellCheck:!1})})]}),i.jsxs("div",{className:"ggui-registry-grid",children:[i.jsx(vN,{all:e.data.blueprints,shown:(j==null?void 0:j.blueprints)??e.data.blueprints,filterActive:v.length>0}),i.jsx($N,{state:o,shown:k,filterActive:v.length>0,onInvalidate:h,onClearAll:y})]}),i.jsx(bN,{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 vN({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(xN,{}):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:()=>Le(`/preview/${encodeURIComponent(l.id)}`),children:"preview →"})})]},l.id))})]})}function $N({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(jN,{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(_N,{}):d.length===0?i.jsx("p",{className:"ggui-muted",style:{margin:0,padding:12},children:"No cached entries match the filter."}):i.jsx("ul",{className:"ggui-stack__list",children:d.map((p,g)=>i.jsxs("li",{"data-ggui-cached-item":!0,"data-ggui-cached-id":p.id,className:"ggui-stack__entry",children:[i.jsxs("div",{className:"ggui-stack__entry-head",children:[i.jsx("span",{className:"ggui-stack__entry-num",children:`CCH / ${String(g+1).padStart(2,"0")}`}),i.jsx("span",{className:"ggui-stack__entry-title",children:p.cachedIntent}),typeof p.hitCount=="number"?i.jsxs(Me,{tone:"ink",children:["hits ",p.hitCount]}):null]}),i.jsxs("div",{className:"ggui-stack__entry-meta",children:[i.jsx("code",{className:"ggui-code",children:p.id}),i.jsxs("span",{style:{marginLeft:12},children:["cached ",Tv(p.cachedAt)]}),p.lastHitAt?i.jsxs("span",{style:{marginLeft:12},children:["last hit ",Tv(p.lastHitAt)]}):null]}),i.jsx("div",{style:{marginTop:12},children:i.jsx("button",{type:"button","data-ggui-cached-invalidate":!0,className:"ggui-btn ggui-btn--ghost",onClick:()=>{l(p.id)},children:"invalidate ✕"})})]},p.id))})]})}function Tv(e){if(!e)return"—";try{const n=new Date(e);return Number.isNaN(n.getTime())?e:n.toISOString().replace("T"," ").replace(/\.\d+Z$/,"Z")}catch{return e}}function bN({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(SN,{}):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 xN(){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 _N(){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 jN({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 SN(){return i.jsxs("div",{className:"ggui-card__body",style:{padding:"16px 12px"},children:[i.jsx("p",{className:"ggui-body",style:{margin:0},children:"No primitives declared."}),i.jsxs("p",{className:"ggui-muted",style:{margin:"8px 0 0"},children:["Declare packages or local catalogs in"," ",i.jsx("code",{className:"ggui-code",children:"ggui.json#primitives"}),"."]})]})}function Mv({title:e,num:n,tone:o,children:l}){return i.jsxs("div",{className:"ggui-card",children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:e}),i.jsx("span",{className:"ggui-card__num",children:n})]}),i.jsxs("div",{className:"ggui-card__body",children:[i.jsx("p",{className:"ggui-body",children:i.jsx(Me,{tone:o,children:e})}),i.jsx("p",{className:"ggui-muted",children:l})]})]})}function g1({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 wN({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(g1,{blueprint:o,height:n,title:o.variance.persona??o.blueprintId.slice(0,12)},o.blueprintId))})}const m1=["ui-gen-default-haiku-4-5","ui-gen-advanced-opus-4-7"],mp=.8,kN={persona:"",generator:"",draftsOnly:!1};function NN({filters:e,onChange:n,generatorSlugs:o}){const l=o??m1,c=p=>{n({...e,persona:p.target.value})},u=p=>{n({...e,generator:p.target.value})},d=p=>{n({...e,draftsOnly:p.target.checked})};return i.jsxs("form",{"data-ggui-variants-filter-bar":!0,className:"ggui-form",onSubmit:p=>p.preventDefault(),style:{display:"flex",flexWrap:"wrap",gap:16,alignItems:"flex-end",marginBottom:20},children:[i.jsxs("div",{className:"ggui-field",style:{flex:1,minWidth:200},children:[i.jsx("label",{className:"ggui-label",htmlFor:"ggui-variants-filter-persona",children:"persona"}),i.jsx("input",{id:"ggui-variants-filter-persona","data-ggui-variants-filter-persona":!0,"aria-label":"filter by persona",placeholder:"e.g. minimalist, data-dense",value:e.persona,onChange:c,autoCapitalize:"off",autoCorrect:"off",spellCheck:!1})]}),i.jsxs("div",{className:"ggui-field",style:{minWidth:220},children:[i.jsx("label",{className:"ggui-label",htmlFor:"ggui-variants-filter-generator",children:"generator"}),i.jsxs("select",{id:"ggui-variants-filter-generator","data-ggui-variants-filter-generator":!0,"aria-label":"filter by generator",value:e.generator,onChange:u,children:[i.jsx("option",{value:"",children:"any"}),l.map(p=>i.jsx("option",{value:p,children:p},p))]})]}),i.jsxs("label",{className:"ggui-field",htmlFor:"ggui-variants-filter-drafts-only",style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer"},children:[i.jsx("input",{id:"ggui-variants-filter-drafts-only","data-ggui-variants-filter-drafts-only":!0,type:"checkbox","aria-label":"show drafts only",checked:e.draftsOnly,onChange:d}),i.jsxs("span",{className:"ggui-label",style:{margin:0},children:["drafts only (score < ",mp.toFixed(2),")"]})]})]})}function EN(e,n){var l;const o=n.persona.trim().toLowerCase();return!(o.length>0&&!(((l=e.variance.persona)==null?void 0:l.toLowerCase())??"").includes(o)||n.generator.length>0&&(e.source.kind!=="llm"||e.source.generator!==n.generator)||n.draftsOnly&&(e.validatorScore===void 0||e.validatorScore>=mp))}function zN(e){return e>=mp?"live":e>=.5?"draft":"signal"}function CN(e){return e.kind==="llm"?e.generator:e.kind}function h1({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:CN(e.source)}),typeof h=="number"?i.jsxs(Me,{tone:zN(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 ",TN(e.createdAt)]}),e.codeHash?i.jsxs("span",{style:{marginLeft:12},children:["hash ",i.jsx("code",{className:"ggui-code",children:MN(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 TN(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 MN(e){return e.length<=12?e:`${e.slice(0,8)}…${e.slice(-4)}`}class _a extends Error{constructor(o,l,c){super(o);pn(this,"code");pn(this,"status");this.name="OpsCallError",this.code=l,c!==void 0&&(this.status=c)}}let ON=1;async function RN(e){if((e.headers.get("content-type")??"").includes("text/event-stream")){const o=await e.text(),l=/^data:\s*(.+)$/m.exec(o);if(!l||!l[1])throw new _a("Malformed SSE response from /control — no data line",-32700,e.status);return JSON.parse(l[1])}return await e.json()}async function Lc(e,n,o){var y,v,j,k;const l=ON++,c=JSON.stringify({jsonrpc:"2.0",id:l,method:"tools/call",params:{name:e,arguments:n}}),u={method:"POST",headers:{"content-type":"application/json",accept:"application/json, text/event-stream"},body:c};o!==void 0&&(u.signal=o);const d=await fetch("/control",u);if(!d.ok&&d.status!==200){const x=await d.text().catch(()=>"");throw new _a(`/control returned HTTP ${d.status}${x?` — ${x}`:""}`,-32e3,d.status)}const p=await RN(d);if("error"in p)throw new _a(p.error.message,p.error.code);const g=p.result;if(g.isError){const x=((v=(y=g.content)==null?void 0:y[0])==null?void 0:v.text)??"tool reported error";throw new _a(x,-32e3)}if(g.structuredContent!==void 0)return g.structuredContent;const h=(k=(j=g.content)==null?void 0:j[0])==null?void 0:k.text;if(typeof h=="string"&&h.length>0)return JSON.parse(h);throw new _a(`tool ${e} returned empty result`,-32e3)}function AN(e,n){return Lc("ggui_ops_generate_blueprint",{...e,confirm:!0},n)}function hp(e,n){return Lc("ggui_ops_list_blueprints",e,n)}function y1(e,n){return Lc("ggui_ops_update_blueprint",{...e,confirm:!0},n)}function v1(e,n){return Lc("ggui_ops_delete_blueprint",{...e,confirm:!0},n)}function DN({contractHash:e}){var z;const[n,o]=D.useState({kind:"loading"}),[l,c]=D.useState([]),[u,d]=D.useState(!1),p=D.useCallback(async E=>{o({kind:"loading"});try{const w=await hp({contractHash:e},E);o({kind:"ready",blueprints:w.blueprints})}catch(w){if(E!=null&&E.aborted)return;const $=w instanceof _a||w instanceof Error?w.message:String(w);o({kind:"error",message:$})}},[e]);D.useEffect(()=>{const E=new AbortController;return p(E.signal),()=>E.abort()},[p]);const g=D.useMemo(()=>n.kind!=="ready"?[]:[...n.blueprints].sort((E,w)=>{const $=E.isOperatorDefault===!0?1:0,N=w.isOperatorDefault===!0?1:0;if($!==N)return N-$;const R=E.validatorScore??-1,_=w.validatorScore??-1;return R!==_?_-R:w.createdAt.localeCompare(E.createdAt)}),[n]),h=(z=g[0])==null?void 0:z.contract,y=D.useMemo(()=>u?g.filter(E=>l.includes(E.blueprintId)):[],[g,l,u]),v=D.useCallback(E=>{Le(`/preview/${encodeURIComponent(E)}`)},[]),j=D.useCallback(async E=>{try{await y1({blueprintId:E,isOperatorDefault:!0}),await p()}catch(w){const $=w instanceof _a||w instanceof Error?w.message:String(w);o({kind:"error",message:$})}},[p]),k=D.useCallback(async E=>{try{await v1({blueprintId:E}),c(w=>w.filter($=>$!==E)),await p()}catch(w){const $=w instanceof _a||w instanceof Error?w.message:String(w);o({kind:"error",message:$})}},[p]),x=D.useCallback(E=>{c(w=>w.includes(E)?w.filter($=>$!==E):[...w,E])},[]);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:()=>Le("/admin/variants"),children:"← all variants"})," ",i.jsx("button",{type:"button",className:"ggui-btn","data-ggui-variant-detail-generate":!0,onClick:()=>Le(`/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(wN,{blueprints:y,height:420})}):i.jsx("div",{className:"ggui-stack",style:{marginBottom:24},"aria-label":"variants and preview",children:g.map((E,w)=>i.jsxs("article",{"data-ggui-variant-detail-row":!0,"data-ggui-variant-detail-row-id":E.blueprintId,style:{display:"grid",gridTemplateColumns:"minmax(0, 1fr) minmax(0, 1fr)",gap:16,padding:12,borderBottom:"1px solid var(--ggui-line2, #d6d4cb)"},children:[i.jsx("ul",{className:"ggui-stack__list",style:{listStyle:"none",margin:0,padding:0},children:i.jsx(h1,{blueprint:E,index:w,onPreview:v,onSetDefault:$=>{j($)},onDelete:$=>{k($)},compareSelected:l.includes(E.blueprintId),onCompareToggle:x})}),i.jsx(g1,{blueprint:E,height:240})]},E.blueprintId))})]})]})}function UN({contract:e,contractHash:n,onSubmit:o,onCancel:l,generatorSlugs:c}){const[u,d]=D.useState(""),[p,g]=D.useState(""),[h,y]=D.useState(""),[v,j]=D.useState(""),[k,x]=D.useState(!1),[z,E]=D.useState({kind:"idle"}),w=async N=>{N.preventDefault();let R;if(v.trim().length>0)try{const S=JSON.parse(v);if(typeof S!="object"||S===null||Array.isArray(S)){E({kind:"error",message:'context must be a JSON object (e.g. {"foo": "bar"})'});return}R=S}catch(S){E({kind:"error",message:`context JSON parse failed — ${S instanceof Error?S.message:String(S)}`});return}E({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&&E({kind:"error",message:S.error})}catch(S){E({kind:"error",message:S instanceof Error?S.message:String(S)})}},$=c??m1;return i.jsxs("form",{"data-ggui-variant-generate-form":!0,"data-ggui-variant-generate-state":z.kind,className:"ggui-form",onSubmit:w,children:[i.jsxs(zf,{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(zf,{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(zf,{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"})]})]}),z.kind==="error"?i.jsxs("p",{className:"ggui-body",children:[i.jsx(Me,{tone:"signal",children:"error"})," ",z.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:z.kind==="pending",children:z.kind==="pending"?"generating…":"generate →"}),l?i.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:l,disabled:z.kind==="pending",children:"cancel"}):null]})]})}function zf({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 IN({contractHash:e}){const[n,o]=D.useState({kind:"loading"});return D.useEffect(()=>{const l=new AbortController;return(async()=>{try{const c=await hp({contractHash:e},l.signal);if(l.signal.aborted)return;if(c.blueprints.length===0){o({kind:"empty"});return}const u=c.blueprints[0];o({kind:"ready",contract:u.contract,variantCount:c.blueprints.length})}catch(c){if(l.signal.aborted)return;const u=c instanceof _a||c instanceof Error?c.message:String(c);o({kind:"error",message:u})}})(),()=>l.abort()},[e]),i.jsxs("section",{className:"ggui-section",children:[i.jsx(ot,{num:"01 / generate",title:"Author a new variant.",mute:`hash ${e.slice(0,16)}…`,intro:i.jsxs(i.Fragment,{children:["Forks the contract from an existing variant in this group and dispatches it through"," ",i.jsx("code",{className:"ggui-code",children:"ggui_ops_generate_blueprint"})," ","with your persona + context + seed prompt. The new blueprint persists under the same"," ",i.jsx("code",{className:"ggui-code",children:"contractHash"}),"."]})}),i.jsx("div",{style:{marginBottom:16},children:i.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:()=>Le(`/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:()=>Le("/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:()=>Le("/admin/variants"),children:"← all variants"})]})]}):i.jsx(UN,{contract:n.contract,contractHash:e,onSubmit:async l=>{try{const c=await AN(l);return Le(`/preview/${encodeURIComponent(c.blueprintId)}`),{blueprintId:c.blueprintId}}catch(c){return{error:c instanceof _a||c instanceof Error?c.message:String(c)}}},onCancel:()=>Le(`/admin/variants/${encodeURIComponent(e)}`)})]})}function BN(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 LN({blueprints:e,filters:n,onPreview:o,onSetDefault:l,onDelete:c,onOpenContract:u,onGenerate:d}){const p=D.useMemo(()=>BN(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(FN,{group:g,filters:n,onPreview:o,onSetDefault:l,onDelete:c,onOpenContract:u,onGenerate:d},g.contractHash))})}function FN({group:e,filters:n,onPreview:o,onSetDefault:l,onDelete:c,onOpenContract:u,onGenerate:d}){const[p,g]=D.useState(!0),h=e.blueprints.filter(y=>EN(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(h1,{blueprint:y,index:v,onPreview:o,onSetDefault:l,onDelete:c},y.blueprintId))}):null]})}function VN(){const[e,n]=D.useState({kind:"loading"}),[o,l]=D.useState(kN),c=D.useCallback(async y=>{n({kind:"loading"});try{const v=await hp({},y);n({kind:"ready",blueprints:v.blueprints})}catch(v){if(y!=null&&y.aborted)return;const j=v instanceof _a||v instanceof Error?v.message:String(v);n({kind:"error",message:j})}},[]);D.useEffect(()=>{const y=new AbortController;return c(y.signal),()=>y.abort()},[c]);const u=D.useCallback(y=>{Le(`/preview/${encodeURIComponent(y)}`)},[]),d=D.useCallback(async y=>{try{await y1({blueprintId:y,isOperatorDefault:!0}),await c()}catch(v){const j=v instanceof _a||v instanceof Error?v.message:String(v);n({kind:"error",message:j})}},[c]),p=D.useCallback(async y=>{try{await v1({blueprintId:y}),await c()}catch(v){const j=v instanceof _a||v instanceof Error?v.message:String(v);n({kind:"error",message:j})}},[c]),g=D.useCallback(y=>{Le(`/admin/variants/${encodeURIComponent(y)}`)},[]),h=D.useCallback(y=>{Le(`/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(NN,{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(LN,{blueprints:e.blueprints,filters:o,onPreview:u,onSetDefault:y=>{d(y)},onDelete:y=>{p(y)},onOpenContract:g,onGenerate:h}):null]})}function HN(){const[e,n]=D.useState({kind:"loading"}),[o,l]=D.useState(null),[c,u]=D.useState(null),d=async()=>{n({kind:"loading"});try{const g=await fetch("/ggui/console/oauth-clients",{headers:{accept:"application/json"}});if(!g.ok){if(g.status===404){n({kind:"error",message:"OAuth not enabled on this server — re-run `ggui serve --oauth` to mount the management routes."});return}n({kind:"error",message:`server returned ${g.status}`});return}const h=await g.json();n({kind:"ready",data:h})}catch(g){n({kind:"error",message:String(g)})}};D.useEffect(()=>{d()},[]);const p=async g=>{l(g);try{const h=await fetch(`/ggui/console/oauth-clients/${encodeURIComponent(g)}`,{method:"DELETE"});if(h.status!==204){n({kind:"error",message:`revoke failed — server returned ${h.status}`});return}u(null),await d()}catch(h){n({kind:"error",message:`revoke failed — ${String(h)}`})}finally{l(null)}};return i.jsxs("section",{className:"ggui-section",children:[i.jsx(ot,{num:"01 / clients",title:"Connected apps.",mute:"OAuth clients that have registered against this server.",intro:i.jsxs(i.Fragment,{children:["Each row is an OAuth client (typically an MCP custom-connector host like claude.ai) that completed"," ",i.jsx("code",{className:"ggui-code",children:"/oauth/register"})," against this server. Revoke removes the registration so future re-discovery fails — Phase 1 caveat:"," ",i.jsx("strong",{children:"existing bearers keep working"})," until they expire or you re-pair."]})}),e.kind==="loading"?i.jsx("p",{className:"ggui-muted",style:{margin:0,padding:12},children:"Loading clients…"}):e.kind==="error"?i.jsxs("p",{className:"ggui-muted",style:{margin:0,padding:12},"data-ggui-clients-error":!0,children:["Couldn't load clients — ",e.message]}):i.jsx(qN,{clients:e.data.clients,revokingId:o,pendingConfirm:c,onRevokeRequest:g=>u(g),onRevokeCancel:()=>u(null),onRevokeConfirm:g=>{p(g)},onRefresh:()=>{d()}})]})}function qN({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(PN,{client:p,index:g+1,isRevoking:n===p.clientId,isPendingConfirm:o===p.clientId,onRevokeRequest:l,onRevokeCancel:c,onRevokeConfirm:u},p.clientId))})]})}function PN({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:ZN(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 ZN(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 GN=new Set(["theme"]),YN={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 KN(){const[e,n]=D.useState({kind:"loading"});return D.useEffect(()=>{const o=new AbortController;return(async()=>{try{const l=await fetch("/ggui/console/config",{signal:o.signal,headers:{accept:"application/json"}});if(!l.ok){n({kind:"error",message:`server returned ${l.status}`});return}const c=await l.json();n({kind:"ready",data:c})}catch(l){if(o.signal.aborted)return;n({kind:"error",message:String(l)})}})(),()=>o.abort()},[]),e.kind==="loading"?i.jsxs("section",{className:"ggui-section",children:[i.jsx(ot,{num:"01 / config",title:"ggui.json viewer.",mute:"Probing project root."}),i.jsx(Ov,{title:"loading",num:"CFG / 01",tone:"draft",children:"Loading config…"})]}):e.kind==="error"?i.jsxs("section",{className:"ggui-section",children:[i.jsx(ot,{num:"01 / config",title:"ggui.json viewer.",mute:"Endpoint unreachable."}),i.jsxs(Ov,{title:"error",num:"ERR / 01",tone:"signal",children:["Couldn't load config — ",e.message,"."]})]}):i.jsx(JN,{data:e.data})}function JN({data:e}){const n=D.useMemo(()=>Object.keys(e.schema.properties??{}).filter(u=>!GN.has(u)),[e.schema]),[o,l]=D.useState(n[0]??""),c=e.source.found?e.source.error?"found-invalid":"found-valid":"missing";return i.jsxs("section",{className:"ggui-section","data-ggui-config-source":c,children:[i.jsx(ot,{num:"01 / admin / config",title:"ggui.json — read-only manifest view.",mute:XN(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(WN,{data:e}),c==="found-invalid"?null:i.jsxs("div",{className:"ggui-config-stack",children:[i.jsx(QN,{sections:n,active:o,onSelect:l}),i.jsx(e7,{data:e,active:o})]}),e.source.found&&"raw"in e&&e.raw?i.jsx(n7,{raw:e.raw}):null]})}function XN(e){return e.source.found?e.source.error?"Validation failed.":"Loaded from disk.":"No ggui.json reachable."}function WN({data:e}){return e.source.found?e.source.error?i.jsxs("div",{className:"ggui-card",children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:"validation failed"}),i.jsx("span",{className:"ggui-card__num",children:"SRC / 01"})]}),i.jsxs("div",{className:"ggui-card__body",children:[i.jsx("p",{className:"ggui-body",children:i.jsx(Me,{tone:"signal",children:"invalid"})}),i.jsx("p",{className:"ggui-muted",children:i.jsx("code",{className:"ggui-code",children:e.source.path})}),i.jsx("pre",{className:"ggui-config-error",children:e.source.error.message})]})]}):i.jsxs("div",{className:"ggui-card",children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:"source"}),i.jsx("span",{className:"ggui-card__num",children:"SRC / 01"})]}),i.jsxs("div",{className:"ggui-card__body",children:[i.jsx("p",{className:"ggui-body",children:i.jsx(Me,{tone:"live",children:"loaded"})}),i.jsx("p",{className:"ggui-muted",children:i.jsx("code",{className:"ggui-code",children:e.source.path})})]})]}):i.jsxs("div",{className:"ggui-card",children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:"no manifest"}),i.jsx("span",{className:"ggui-card__num",children:"SRC / 01"})]}),i.jsxs("div",{className:"ggui-card__body",children:[i.jsx("p",{className:"ggui-body",children:i.jsx(Me,{tone:"ink",children:"missing"})}),i.jsxs("p",{className:"ggui-muted",children:["No ",i.jsx("code",{className:"ggui-code",children:"ggui.json"})," walked up from"," ",i.jsx("code",{className:"ggui-code",children:e.source.searchedFrom}),". The schema below shows what would be configurable; create a"," ",i.jsx("code",{className:"ggui-code",children:"ggui.json"})," at the project root and reload."]})]})]})}function QN({sections:e,active:n,onSelect:o}){return i.jsx("nav",{"aria-label":"config sections","data-ggui-config-active-section":n,children:i.jsx("ul",{className:"ggui-config-tabs",role:"tablist",children:e.map(l=>i.jsx("li",{"data-ggui-config-section":l,role:"presentation",children:i.jsx("button",{type:"button",role:"tab",onClick:()=>o(l),"aria-selected":l===n?"true":"false","aria-current":l===n?"true":void 0,className:`ggui-config-tabs__btn${l===n?" is-active":""}`,children:l})},l))})})}function e7({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=YN[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:t7(o)})]}),u?i.jsx(a7,{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 t7(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 a7({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:()=>Le(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 n7({raw:e}){const[n,o]=D.useState(!1);return i.jsxs("div",{className:"ggui-card",style:{marginTop:24},children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:"raw ggui.json"}),i.jsx("span",{className:"ggui-card__num",children:"RAW / 01"})]}),i.jsxs("div",{className:"ggui-card__body",children:[i.jsxs("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:()=>o(l=>!l),"aria-expanded":n,children:[n?"hide":"show"," raw bytes"]}),n?i.jsx("pre",{className:"ggui-config-raw","data-ggui-config-raw":!0,children:e}):null]})]})}function Ov({title:e,num:n,tone:o,children:l}){return i.jsxs("div",{className:"ggui-card",children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:e}),i.jsx("span",{className:"ggui-card__num",children:n})]}),i.jsxs("div",{className:"ggui-card__body",children:[i.jsx("p",{className:"ggui-body",children:i.jsx(Me,{tone:o,children:e})}),i.jsx("p",{className:"ggui-muted",children:l})]})]})}function r7(){const[e,n]=D.useState([]),[o,l]=D.useState("loading"),[c,u]=D.useState(null),[d,p]=D.useState(new Set),g=D.useRef(new Set);D.useEffect(()=>{let y=!1,v=null;const j=x=>{g.current.has(x.id)||(g.current.add(x.id),n(z=>[x,...z].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 z=await x.json();if(y)return;const E=[...z.events].reverse();for(const w of E)g.current.add(w.id);n(E),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 z=JSON.parse(x.data);j(z)}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(i7,{event:y,expanded:d.has(y.id),onToggle:()=>h(y.id)},y.id))})]})]})]})}function i7({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(o7,{event:e}):null]})}function o7({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(Hr,{label:"error",children:i.jsx("pre",{style:Ko,children:e.error.message})}):null,e.systemPrompt?i.jsx(Hr,{label:"system prompt",children:i.jsx("pre",{style:Ko,children:e.systemPrompt})}):null,e.userPrompt?i.jsx(Hr,{label:"user prompt",children:i.jsx("pre",{style:Ko,children:e.userPrompt})}):null,e.tools&&e.tools.length>0?i.jsx(Hr,{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(Hr,{label:"completion text",children:i.jsx("pre",{style:Ko,children:e.result.text})}):null,(o=e.result)!=null&&o.toolCalls&&e.result.toolCalls.length>0?i.jsx(Hr,{label:`tool calls (${e.result.toolCalls.length})`,children:i.jsx("pre",{style:Ko,children:JSON.stringify(e.result.toolCalls,null,2)})}):null,(l=e.result)!=null&&l.turnsUsed?i.jsx(Hr,{label:"agentic turns",children:i.jsx("span",{className:"ggui-muted",children:e.result.turnsUsed})}):null]})}function Hr({label:e,children:n}){return i.jsxs("div",{children:[i.jsx("div",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)",textTransform:"uppercase",marginBottom:4},children:e}),n]})}const Ko={margin:0,padding:8,background:"var(--ggui-paper-2, #efeee8)",border:"1px solid var(--ggui-rule)",fontFamily:"var(--ggui-font-mono)",fontSize:12,whiteSpace:"pre-wrap",wordBreak:"break-word",maxHeight:360,overflow:"auto"};function l7(){const[e,n]=D.useState([]),[o,l]=D.useState("loading"),[c,u]=D.useState(null),[d,p]=D.useState(new Set),g=D.useRef(new Set);D.useEffect(()=>{let y=!1,v=null;const j=x=>{g.current.has(x.id)||(g.current.add(x.id),n(z=>[x,...z].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 z=await x.json();if(y)return;const E=[...z.events].reverse();for(const w of E)g.current.add(w.id);n(E),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 z=JSON.parse(x.data);j(z)}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(s7,{event:y,expanded:d.has(y.id),onToggle:()=>h(y.id)},y.id))})]})]})]})}function s7({event:e,expanded:n,onToggle:o}){const c=new Date(e.at).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}),u=e.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(c7,{outcome:p,fails:u,warns:d})]}),n?i.jsx(u7,{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 c7({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 u7({event:e}){const n=d7(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(qa,{label:"error",children:i.jsx("pre",{style:bc,children:e.error.message})}):null,i.jsx(qa,{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(qa,{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(qa,{label:`fired check ids (${e.summary.firedCheckIds.length})`,children:i.jsx("pre",{style:bc,children:e.summary.firedCheckIds.join(`
|
|
216
|
-
`)})}):null,n.axis.length>0?i.jsx(qa,{label:`axis issues (${n.axis.length})`,children:i.jsx($c,{issues:n.axis})}):null,n.tier0.length>0?i.jsx(qa,{label:`tier-0 issues (${n.tier0.length})`,children:i.jsx($c,{issues:n.tier0})}):null,n.tier1.length>0?i.jsx(qa,{label:`tier-1 issues (${n.tier1.length})`,children:i.jsx($c,{issues:n.tier1})}):null,n.tier2.length>0?i.jsx(qa,{label:`tier-2 issues (${n.tier2.length})`,children:i.jsx($c,{issues:n.tier2})}):null,e.prompt?i.jsx(qa,{label:"prompt",children:i.jsx("pre",{style:bc,children:e.prompt})}):null,e.sourceCode?i.jsx(qa,{label:"source under check",children:i.jsx("pre",{style:bc,children:e.sourceCode})}):null]})}function d7(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 qa({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 f7(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 p7(){const[e,n]=D.useState([]),[o,l]=D.useState("loading"),[c,u]=D.useState(null),[d,p]=D.useState(new Set),[g,h]=D.useState("all"),[y,v]=D.useState("all"),j=D.useRef(new Set);D.useEffect(()=>{let $=!1,N=null;const R=S=>{j.current.has(S.id)||(j.current.add(S.id),n(C=>[S,...C].slice(0,500)))};return(async()=>{try{const S=await fetch("/ggui/console/cache/recent?limit=100",{credentials:"same-origin",headers:{accept:"application/json"}});if(!S.ok)throw new Error(`recent fetch returned ${S.status}`);const C=await S.json();if($)return;const U=[...C.events].reverse();for(const te of U)j.current.add(te.id);n(U),l("live")}catch(S){if($)return;l("error"),u(S instanceof Error?S.message:"Could not load recent cache trace.");return}N=new EventSource("/ggui/console/cache/stream",{withCredentials:!0}),N.onmessage=S=>{try{const C=JSON.parse(S.data);R(C)}catch{}},N.onerror=()=>{l("reconnecting")},N.onopen=()=>{l("live")}})(),()=>{$=!0,N&&N.close()}},[]);const k=$=>{p(N=>{const R=new Set(N);return R.has($)?R.delete($):R.add($),R})},x=g7(e),z=m7(e),E=g==="all"?e:g==="no-strategy"?e.filter($=>$.strategy===void 0):e.filter($=>$.strategy===g),w=y==="all"?E:E.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(h7,{filter:g,onFilter:h,counts:x}),i.jsx(y7,{filter:y,onFilter:v,counts:z}),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(v7,{event:$,expanded:d.has($.id),onToggle:()=>k($.id)},$.id))})]})]})]})}function g7(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 m7(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 h7({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 y7({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 v7({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=f7(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($7,{outcome:u}),e.strategy?i.jsx(b7,{strategy:e.strategy}):null,e.agentClassification?i.jsx($1,{classification:e.agentClassification}):null,e.validatorFindings&&e.validatorFindings.length>0?i.jsx(b1,{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(x7,{event:e}):null]})}function $7({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 b7({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 $1({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 b1({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 x7({event:e}){return i.jsxs("div",{style:{marginTop:10,paddingTop:10,borderTop:"1px solid var(--ggui-rule)",display:"grid",gap:12},children:[i.jsx(Wn,{label:"reason",children:i.jsx("p",{style:{margin:0,fontSize:13},children:e.reason})}),i.jsx(Wn,{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(Wn,{label:"agent classification",children:i.jsxs("div",{style:{display:"flex",gap:8,alignItems:"baseline",fontFamily:"var(--ggui-font-mono)",fontSize:12},children:[i.jsx($1,{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(Wn,{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(Wn,{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(b1,{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(Wn,{label:"intent",children:i.jsx("pre",{style:_7,children:e.intent||"(empty)"})}),i.jsx(Wn,{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(Wn,{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 Wn({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 _7={margin:0,padding:8,background:"var(--ggui-paper-2, #efeee8)",border:"1px solid var(--ggui-rule)",fontFamily:"var(--ggui-font-mono)",fontSize:12,whiteSpace:"pre-wrap",wordBreak:"break-word",maxHeight:360,overflow:"auto"};function j7(){const[e,n]=D.useState({kind:"loading"}),[o,l]=D.useState({kind:"idle"}),[c,u]=D.useState(null),[d,p]=D.useState(0);D.useEffect(()=>{const h=new AbortController;return(async()=>{try{const y=await fetch("/ggui/console/timeline/renders",{signal:h.signal,headers:{accept:"application/json"},credentials:"same-origin"});if(!y.ok){n({kind:"error",message:`server returned ${y.status}`});return}const v=await y.json();n({kind:"ready",data:v})}catch(y){if(h.signal.aborted)return;n({kind:"error",message:y instanceof Error?y.message:String(y)})}})(),()=>h.abort()},[]);const g=D.useCallback(h=>{u(h),p(0),l({kind:"loading",sessionId:h})},[]);return D.useEffect(()=>{if(!c)return;const h=new AbortController;return(async()=>{try{const y=await fetch(`/ggui/console/timeline/${encodeURIComponent(c)}/events`,{signal:h.signal,headers:{accept:"application/json"},credentials:"same-origin"}),v=await y.json();if(!y.ok&&y.status!==404){l({kind:"error",sessionId:c,message:`server returned ${y.status}`});return}l({kind:"ready",sessionId:c,data:v}),p(Math.max(0,v.events.length-1))}catch(y){if(h.signal.aborted)return;l({kind:"error",sessionId:c,message:y instanceof Error?y.message:String(y)})}})(),()=>h.abort()},[c]),i.jsxs("section",{className:"ggui-section",children:[i.jsx(ot,{num:"DEVTOOLS / 7D",title:"Render timeline.",mute:"Snapshot.",intro:i.jsxs(i.Fragment,{children:["Pick a render, then step through its event log chronologically. Each event carries the full",i.jsx("code",{className:"ggui-code",children:" GguiSessionEvent.data "}),"payload — useful for answering “what was the UI state at event N?” without a live tail."]})}),i.jsxs("div",{style:{display:"grid",gridTemplateColumns:"minmax(260px, 320px) 1fr",gap:16,alignItems:"start"},children:[i.jsx(S7,{state:e,pickedSessionId:c,onPick:g}),i.jsx(k7,{state:o,scrubIndex:d,onScrub:p})]})]})}function S7({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(w7,{render:l,selected:l.sessionId===n,onClick:()=>o(l.sessionId)},l.sessionId))})})]})}function w7({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 ",T7(e.lastActivityAt)]})]})})}function k7({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:x1(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(N7,{state:e,scrubIndex:n,onScrub:o})}function N7({state:e,scrubIndex:n,onScrub:o}){const{events:l,status:c,streamSeq:u}=e.data,d=l.length,p=D.useMemo(()=>d===0?0:Math.max(0,Math.min(n,d-1)),[n,d]),g=d>0?l[p]:null,h=D.useCallback(()=>{d!==0&&o(Math.max(0,p-1))},[o,p,d]),y=D.useCallback(()=>{d!==0&&o(Math.min(d-1,p+1))},[o,p,d]),v=D.useCallback(()=>o(0),[o]),j=D.useCallback(()=>{d!==0&&o(d-1)},[o,d]);return i.jsxs("div",{className:"ggui-card","data-ggui-timeline-pane":"events",children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:i.jsx("code",{className:"ggui-code",children:x1(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(E7,{event:g}):null]})]})]})}function E7({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:C7(e.timestamp)})]}),i.jsx("pre",{style:z7,children:M7(e.data)})]})}const z7={margin:0,padding:8,background:"var(--ggui-paper-2, #efeee8)",border:"1px solid var(--ggui-rule)",fontFamily:"var(--ggui-font-mono)",fontSize:12,whiteSpace:"pre-wrap",wordBreak:"break-word",maxHeight:420,overflow:"auto"};function x1(e){return e.length>16?`${e.slice(0,16)}…`:e}function C7(e){try{return(typeof e=="number"?new Date(e):new Date(e)).toISOString().slice(11,23)}catch{return String(e)}}function T7(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 M7(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}function O7(){const[e,n]=D.useState([]),[o,l]=D.useState("loading"),[c,u]=D.useState(null),[d,p]=D.useState(new Set),g=D.useRef(new Set);D.useEffect(()=>{let y=!1,v=null;const j=x=>{g.current.has(x.id)||(g.current.add(x.id),n(z=>[x,...z].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 z=await x.json();if(y)return;const E=[...z.events].reverse();for(const w of E)g.current.add(w.id);n(E),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 z=JSON.parse(x.data);j(z)}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(R7,{event:y,expanded:d.has(y.id),onToggle:()=>h(y.id)},y.id))})]})]})]})}function R7({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:U7(e.byteSize)})]}),n?i.jsx(A7,{event:e}):null]})}function A7({event:e}){const n=D7(e.payload);return i.jsxs("div",{style:{marginTop:10,paddingTop:10,borderTop:"1px solid var(--ggui-rule)",display:"grid",gap:12},children:[i.jsx(Rv,{label:"session",children:i.jsxs("span",{className:"ggui-muted",style:{fontFamily:"var(--ggui-font-mono)",fontSize:12},children:[e.sessionId," · app ",e.appId]})}),i.jsx(Rv,{label:"payload",children:i.jsx("pre",{style:I7,children:n})})]})}function Rv({label:e,children:n}){return i.jsxs("div",{children:[i.jsx("div",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)",textTransform:"uppercase",marginBottom:4},children:e}),n]})}function D7(e){try{return JSON.stringify(e,null,2)??"undefined"}catch{return"[unstringifiable]"}}function U7(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 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:400,overflow:"auto"},Cf="ggui-console:benchmark-dashboard-url",B7="https://benchmarks.ggui.ai";function L7(){const[e,n]=D.useState(""),[o,l]=D.useState("");D.useEffect(()=>{const u=localStorage.getItem(Cf);u&&(n(u),l(u))},[]);const c=u=>{const d=u.trim();n(d),d?localStorage.setItem(Cf,d):localStorage.removeItem(Cf)};return i.jsxs("section",{className:"ggui-section",children:[i.jsx(ot,{num:"DEVTOOLS / 06",title:"Benchmarks dashboard.",mute:"GGUI_MODE=dev",intro:i.jsxs(i.Fragment,{children:["Embed a ",i.jsx("code",{className:"ggui-code",children:"@ggui-ai/benchmark"})," ","dashboard. Default points at"," ",i.jsx("code",{className:"ggui-code",children:"benchmarks.ggui.ai"})," (the public ggui-protocol leaderboard); paste any URL serving the same shape to view your own runs."]})}),i.jsxs("div",{className:"ggui-card",children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:"dashboard URL"}),i.jsx("span",{className:"ggui-card__num",children:"DEV / 06"})]}),i.jsxs("div",{className:"ggui-card__body",children:[i.jsxs("form",{onSubmit:u=>{u.preventDefault(),c(o)},style:{display:"flex",gap:8},children:[i.jsx("input",{type:"url",value:o,onChange:u=>l(u.target.value),placeholder:B7,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 F7={"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 V7({route:e}){return e.kind==="devtools-index"?i.jsx(Av,{}):e.kind==="devtools-llm-trace"?i.jsx(r7,{}):e.kind==="devtools-validator"?i.jsx(l7,{}):e.kind==="devtools-cache"?i.jsx(p7,{}):e.kind==="devtools-timeline"?i.jsx(j7,{}):e.kind==="devtools-payloads"?i.jsx(O7,{}):e.kind==="devtools-benchmarks"?i.jsx(L7,{}):i.jsx(Av,{})}function Av(){return i.jsxs("section",{className:"ggui-section",children:[i.jsx(ot,{num:"DEVTOOLS / 00",title:"Dev-mode debug surfaces.",mute:"GGUI_MODE=dev",intro:i.jsxs(i.Fragment,{children:["Default for ",i.jsx("code",{className:"ggui-code",children:"ggui dev"}),". Each surface answers a different question about the last generation; sub-slices ship one at a time."]})}),i.jsxs("div",{className:"ggui-card",children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:"surfaces"}),i.jsx("span",{className:"ggui-card__num",children:"DEV / 01"})]}),i.jsx("div",{className:"ggui-card__body",children:i.jsx("ul",{style:{listStyle:"none",padding:0,margin:0,display:"grid",gap:12},children:Object.entries(F7).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 H7(){const[e,n]=D.useState({kind:"loading"}),[o,l]=D.useState(null),[c,u]=D.useState(null),[d,p]=D.useState(""),[g,h]=D.useState(!1),[y,v]=D.useState(null),[j,k]=D.useState(null),x=async()=>{n({kind:"loading"});try{const w=await fetch("/ggui/console/keys",{headers:{accept:"application/json"}});if(w.status===401){Le(`/admin-login?next=${encodeURIComponent("/admin/connector-keys")}`);return}if(!w.ok){if(w.status===404){n({kind:"error",message:"Pairing not enabled on this server — re-run `ggui serve` (pairing is on by default for the OSS bundle)."});return}n({kind:"error",message:`server returned ${w.status}`});return}const $=await w.json();n({kind:"ready",data:$})}catch(w){n({kind:"error",message:String(w)})}};D.useEffect(()=>{x()},[]);const z=async w=>{l(w);try{const $=await fetch(`/ggui/console/keys/${encodeURIComponent(w)}`,{method:"DELETE"});if($.status===401){Le(`/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)}},E=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){Le(`/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(q7,{deviceName:d,onDeviceName:p,minting:g,error:y,result:j,onSubmit:w=>{E(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(Z7,{keys:e.data.keys,revokingId:o,pendingConfirm:c,onRevokeRequest:w=>u(w),onRevokeCancel:()=>u(null),onRevokeConfirm:w=>{z(w)},onRefresh:()=>{x()}})]})}function q7({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(P7,{result:c,onDismiss:d}):null]})]})}function P7({result:e,onDismiss:n}){const[o,l]=D.useState(!1),c=async()=>{try{await navigator.clipboard.writeText(e.token),l(!0),window.setTimeout(()=>l(!1),2e3)}catch{}};return i.jsxs("div",{className:"ggui-card",style:{marginTop:16},"data-ggui-key-mint-result":!0,children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:"new bearer minted — copy it now"}),i.jsx("span",{className:"ggui-card__num",children:"KEY / FRESH"})]}),i.jsxs("div",{className:"ggui-card__body",children:[i.jsxs("p",{className:"ggui-muted",style:{marginTop:0},children:["Paste this into your MCP client's"," ",i.jsx("code",{className:"ggui-code",children:"Authorization: Bearer"})," ","header. The plaintext stays visible until you dismiss this card — there's no second-fetch path; close the page and you'll need to copy it from the table below or mint a fresh one."]}),i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,marginTop:12},children:[i.jsx("code",{className:"ggui-code",style:{flex:1,padding:10,wordBreak:"break-all",userSelect:"all"},children:e.token}),i.jsxs("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:()=>{c()},children:[i.jsx("span",{className:"ggui-btn__dot","aria-hidden":!0}),o?"copied":"copy"]})]}),i.jsxs("div",{className:"ggui-stack__entry-meta",style:{marginTop:12},children:[i.jsxs("span",{children:["device ",i.jsx("code",{className:"ggui-code",children:e.deviceName})]}),i.jsxs("span",{style:{marginLeft:12},children:["id ",i.jsx("code",{className:"ggui-code",children:e.pairingId})]})]}),i.jsx("div",{style:{marginTop:14},children:i.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:n,children:"dismiss"})})]})]})}function Z7({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(G7,{entry:p,index:g+1,isRevoking:n===p.pairingId,isPendingConfirm:o===p.pairingId,onRevokeRequest:l,onRevokeCancel:c,onRevokeConfirm:u},p.pairingId))})]})}function G7({entry:e,index:n,isRevoking:o,isPendingConfirm:l,onRevokeRequest:c,onRevokeCancel:u,onRevokeConfirm:d}){return i.jsxs("li",{"data-ggui-key-id":e.pairingId,className:"ggui-stack__entry",style:{opacity:o?.5:1},children:[i.jsxs("div",{className:"ggui-stack__entry-head",children:[i.jsx("span",{className:"ggui-stack__entry-num",children:`KEY / ${String(n).padStart(2,"0")}`}),i.jsx("span",{className:"ggui-stack__entry-title",children:e.deviceName})]}),i.jsxs("div",{className:"ggui-stack__entry-meta",children:[i.jsxs("span",{children:["id ",i.jsx("code",{className:"ggui-code",children:e.pairingId})]}),i.jsxs("span",{style:{marginLeft:12},children:["minted"," ",i.jsx("code",{className:"ggui-code",children:Dv(e.createdAt)})]}),e.lastUsedAt!==void 0?i.jsxs("span",{style:{marginLeft:12},children:["used"," ",i.jsx("code",{className:"ggui-code",children:Dv(e.lastUsedAt)})]}):null]}),i.jsx("div",{className:"ggui-stack__entry-meta",style:{marginTop:6},children:i.jsxs("span",{style:{display:"flex",alignItems:"center",gap:8},children:["token"," ",e.token===null?i.jsx("code",{className:"ggui-code",children:"— rotated, re-pair to recover"}):i.jsx("code",{className:"ggui-code",style:{wordBreak:"break-all",userSelect:"all"},children:e.token})]})}),i.jsx("div",{style:{marginTop:12,display:"flex",gap:10,alignItems:"center"},children:l?i.jsxs(i.Fragment,{children:[i.jsx("button",{type:"button",className:"ggui-btn","data-ggui-key-revoke":!0,disabled:o,onClick:()=>d(e.pairingId),children:o?"revoking…":"confirm revoke"}),i.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",disabled:o,onClick:u,children:"cancel"})]}):i.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost","data-ggui-key-revoke":!0,disabled:o,onClick:()=>c(e.pairingId),children:"revoke"})})]})}function Dv(e){const n=Date.now()-e;if(n<0)return"just now";const o=Math.floor(n/1e3);if(o<60)return`${o}s ago`;const l=Math.floor(o/60);if(l<60)return`${l}m ago`;const c=Math.floor(l/60);return c<24?`${c}h ago`:`${Math.floor(c/24)}d ago`}function Y7(){const[e,n]=D.useState({kind:"loading"}),[o,l]=D.useState("");D.useEffect(()=>{const d=new AbortController;return(async()=>{try{const p=await fetch("/ggui/console/mcp/tools",{signal:d.signal,headers:{accept:"application/json"}});if(!p.ok){n({kind:"error",message:`server returned ${p.status}`});return}const g=await p.json();n({kind:"ready",data:g})}catch(p){if(d.signal.aborted)return;n({kind:"error",message:String(p)})}})(),()=>d.abort()},[]);const c=o.trim().toLowerCase(),u=D.useMemo(()=>e.kind!=="ready"?null:c.length===0?e.data.tools:e.data.tools.filter(d=>[d.name,d.title??"",d.description].join(" ").toLowerCase().includes(c)),[e,c]);return i.jsxs("section",{className:"ggui-section",children:[i.jsx(ot,{num:"01 / mcp",title:"Registered MCP tools.",mute:"Read-only inventory.",intro:i.jsxs(i.Fragment,{children:["Every tool this server registered with the MCP runtime — same set ",i.jsx("code",{className:"ggui-code",children:"tools/list"})," ","returns over JSON-RPC, rendered as expandable cards. Click a row to see its input + output JSON Schema."," ",i.jsx("span",{className:"ggui-muted",children:"Test-invoke from the browser is deferred — for now, exercise tools via your paired MCP client."})]})}),e.kind==="loading"?i.jsx(Iv,{title:"loading",num:"MCP / 01",tone:"draft",children:"Loading tool inventory…"}):e.kind==="error"?i.jsxs(Iv,{title:"error",num:"ERR / 01",tone:"signal",children:["Couldn't load tools — ",e.message,"."]}):i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"ggui-form",style:{marginBottom:20},children:[i.jsx("label",{className:"ggui-label",htmlFor:"ggui-mcp-filter",children:"filter"}),i.jsx("div",{className:"ggui-field",children:i.jsx("input",{id:"ggui-mcp-filter",name:"filter","aria-label":"filter tools",placeholder:"substring match over name, title, description…",value:o,onChange:d=>l(d.target.value),autoCapitalize:"off",autoCorrect:"off",spellCheck:!1})})]}),i.jsx(K7,{all:e.data.tools,shown:u??e.data.tools,filterActive:c.length>0})]})]})}function K7({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(J7,{tool:l,index:c+1},l.name))})]})}function J7({tool:e,index:n}){const[o,l]=D.useState(!1);return i.jsxs("li",{"data-ggui-mcp-tool-name":e.name,"data-ggui-mcp-tool-expanded":o?"true":"false",className:"ggui-stack__entry",children:[i.jsxs("button",{type:"button",onClick:()=>l(c=>!c),"aria-expanded":o,style:{background:"transparent",border:0,padding:0,width:"100%",textAlign:"left",cursor:"pointer",color:"inherit",font:"inherit"},children:[i.jsxs("div",{className:"ggui-stack__entry-head",children:[i.jsx("span",{className:"ggui-stack__entry-num",children:`MCP / ${String(n).padStart(2,"0")}`}),i.jsx("span",{className:"ggui-stack__entry-title",children:i.jsx("code",{className:"ggui-code",children:e.name})}),e.title?i.jsx(Me,{tone:"ink",children:e.title}):null,i.jsx("span",{className:"ggui-muted",style:{marginLeft:"auto",fontFamily:"var(--ggui-mono)",fontSize:11},children:o?"−":"+"})]}),e.description?i.jsx("p",{className:"ggui-body",style:{margin:"8px 0 0"},children:e.description}):null]}),o?i.jsxs("div",{style:{marginTop:12,display:"grid",gap:12},children:[i.jsx(Uv,{label:"input",schema:e.inputSchema}),i.jsx(Uv,{label:"output",schema:e.outputSchema})]}):null]})}function Uv({label:e,schema:n}){return i.jsxs("div",{children:[i.jsx("div",{className:"ggui-stack__entry-meta",style:{marginBottom:6,textTransform:"uppercase",letterSpacing:"0.12em"},children:e}),i.jsx("pre",{"data-ggui-mcp-schema":e,style:{margin:0,padding:12,background:"var(--ggui-paper-2)",border:"1px solid var(--ggui-line-2)",borderRadius:2,fontFamily:"var(--ggui-mono)",fontSize:11,lineHeight:1.5,overflow:"auto",maxHeight:320,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:JSON.stringify(n,null,2)})]})}function Iv({title:e,num:n,tone:o,children:l}){return i.jsxs("div",{className:"ggui-card",children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:e}),i.jsx("span",{className:"ggui-card__num",children:n})]}),i.jsxs("div",{className:"ggui-card__body",children:[i.jsx("p",{className:"ggui-body",children:i.jsx(Me,{tone:o,children:e})}),i.jsx("p",{className:"ggui-muted",children:l})]})]})}function X7(){const[e,n]=D.useState({kind:"loading"}),[o,l]=D.useState("");D.useEffect(()=>{const d=new AbortController;return(async()=>{try{const p=await fetch("/ggui/console/sessions",{signal:d.signal,headers:{accept:"application/json"}});if(!p.ok){n({kind:"error",message:`server returned ${p.status}`});return}const g=await p.json();n({kind:"ready",data:g})}catch(p){if(d.signal.aborted)return;n({kind:"error",message:String(p)})}})(),()=>d.abort()},[]);const c=o.trim().toLowerCase(),u=D.useMemo(()=>e.kind!=="ready"?null:c.length===0?e.data.sessions:e.data.sessions.filter(d=>[d.sessionId,d.shortCode??"",d.appId].join(" ").toLowerCase().includes(c)),[e,c]);return i.jsxs("section",{className:"ggui-section",children:[i.jsx(ot,{num:"01 / sessions",title:"Live sessions.",mute:"Active only — render from an agent to create one.",intro:i.jsxs(i.Fragment,{children:["Every row is an active GguiSession on this server. A session has a"," ",i.jsx("code",{className:"ggui-code",children:"shortCode"})," once one is minted by ",i.jsx("code",{className:"ggui-code",children:"ggui_render"}),"."]})}),e.kind==="loading"?i.jsx(Bv,{title:"loading",num:"SES / 01",tone:"draft",children:"Loading sessions…"}):e.kind==="error"?i.jsxs(Bv,{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(W7,{all:e.data.sessions,shown:u??e.data.sessions,filterActive:c.length>0})]})]})}function W7({all:e,shown:n,filterActive:o}){return e.length===0?i.jsx(tE,{}):i.jsxs("div",{"data-ggui-sessions-list":!0,className:"ggui-stack","aria-label":"active sessions",children:[i.jsxs("div",{className:"ggui-stack__head",children:[i.jsx("span",{className:"ggui-stack__num",children:"SES"}),i.jsx("span",{className:"ggui-stack__label",children:"live sessions"}),i.jsxs("span",{className:"ggui-stack__count",children:[n.length,o&&n.length!==e.length?` / ${e.length}`:""]})]}),n.length===0?i.jsx("p",{className:"ggui-muted",style:{margin:0,padding:12},children:"No sessions match the filter."}):i.jsx("ul",{className:"ggui-stack__list",children:n.map((l,c)=>i.jsx(Q7,{render:l,index:c+1},l.sessionId))})]})}function Q7({render:e,index:n}){const o=e.sessionId.slice(0,8),l=e.status==="active"?"live":e.status==="expired"?"signal":"ink";return i.jsxs("li",{"data-ggui-session-id":e.sessionId,"data-ggui-session-status":e.status,className:"ggui-stack__entry",children:[i.jsxs("div",{className:"ggui-stack__entry-head",children:[i.jsx("span",{className:"ggui-stack__entry-num",children:`SES / ${String(n).padStart(2,"0")}`}),i.jsxs("span",{className:"ggui-stack__entry-title",children:[i.jsx("code",{className:"ggui-code",children:o}),"…"]}),i.jsx(Me,{tone:l,children:e.status})]}),i.jsxs("div",{className:"ggui-stack__entry-meta",children:[i.jsxs("span",{children:["app ",i.jsx("code",{className:"ggui-code",children:e.appId})]}),i.jsxs("span",{style:{marginLeft:12},children:["last active"," ",i.jsx("code",{className:"ggui-code",children:eE(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 eE(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 tE(){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 Bv({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 aE(){const[e,n]=D.useState({kind:"loading"}),[o,l]=D.useState({kind:"loading"});return D.useEffect(()=>{const c=new AbortController;return(async()=>{try{const u=await fetch("/ggui/console/info",{signal:c.signal,headers:{accept:"application/json"}});if(!u.ok){n({kind:"error",message:`server returned ${u.status}`});return}const d=await u.json();n({kind:"ok",info:d})}catch(u){if(c.signal.aborted)return;n({kind:"error",message:String(u)})}})(),(async()=>{try{const u=await fetch("/ggui/console/sessions?limit=3",{signal:c.signal,headers:{accept:"application/json"}});if(!u.ok){l({kind:"error"});return}const d=await u.json();l({kind:"ok",data:d})}catch{c.signal.aborted||l({kind:"error"})}})(),()=>c.abort()},[]),i.jsxs("section",{className:"ggui-section","data-ggui-status-dashboard":!0,children:[i.jsx(ot,{num:"01 / status",title:"What's this server doing right now?",mute:"Every card reads a local endpoint. No hosted calls.",intro:i.jsxs(i.Fragment,{children:["Reloads on demand — console is an operator surface, not a live feed. Nav above points at the other pages:"," ",i.jsx("code",{className:"ggui-code",children:"playground"}),","," ",i.jsx("code",{className:"ggui-code",children:"blueprints"}),","," ",i.jsx("code",{className:"ggui-code",children:"tools"}),","," ",i.jsx("code",{className:"ggui-code",children:"config"}),"."]})}),i.jsx(sE,{state:o}),i.jsxs("div",{className:"ggui-status-grid",children:[i.jsx(nE,{state:e}),i.jsx(rE,{state:e}),i.jsx(iE,{state:e}),i.jsx(lE,{state:e})]})]})}function nE({state:e}){return i.jsx(vn,{num:"SRV / 01",title:"server",children:e.kind==="ok"?i.jsx(i.Fragment,{children:i.jsxs("dl",{className:"ggui-kv",children:[i.jsxs("div",{children:[i.jsx("dt",{children:"name"}),i.jsx("dd",{children:e.info.server})]}),i.jsxs("div",{children:[i.jsx("dt",{children:"version"}),i.jsx("dd",{children:i.jsx("code",{className:"ggui-code",children:e.info.version})})]}),e.info.description?i.jsxs("div",{children:[i.jsx("dt",{children:"description"}),i.jsx("dd",{children:e.info.description})]}):null]})}):e.kind==="loading"?i.jsx("p",{className:"ggui-muted",children:"Loading server identity…"}):i.jsxs("p",{className:"ggui-muted",children:["Couldn't reach ",i.jsx("code",{className:"ggui-code",children:"/ggui/console/info"})," ","— ",e.message,"."]})})}function rE({state:e}){if(e.kind!=="ok")return i.jsx(vn,{num:"PAR / 01",title:"pairing",children:i.jsx("p",{className:"ggui-muted",children:e.kind==="loading"?"Loading…":"Unavailable."})});const{enabled:n,pending:o}=e.info.pairing;if(!n)return i.jsxs(vn,{num:"PAR / 01",title:"pairing",children:[i.jsx("p",{className:"ggui-body",children:i.jsx(Me,{tone:"ink",children:"disabled"})}),i.jsxs("p",{className:"ggui-muted",children:["This server was composed with"," ",i.jsx("code",{className:"ggui-code",children:"pairing: false"}),". Pass"," ",i.jsx("code",{className:"ggui-code",children:"pairing: true"})," at boot to enable per-device auth."]})]});if(!o)return i.jsxs(vn,{num:"PAR / 01",title:"pairing",children:[i.jsx("p",{className:"ggui-body",children:i.jsx(Me,{tone:"live",children:"idle"})}),i.jsxs("p",{className:"ggui-muted",children:["Pairing is enabled. No pair code is pending — mint one via the CLI (",i.jsx("code",{className:"ggui-code",children:"ggui pair"}),") or the admin route."]})]});const l=Math.max(0,Math.round((o.codeExpiresAt-Date.now())/1e3));return i.jsxs(vn,{num:"PAR / 01",title:"pairing",children:[i.jsx("p",{className:"ggui-body",children:i.jsx(Me,{tone:"draft",children:"pending"})}),i.jsx("p",{className:"ggui-code",style:{fontSize:24,letterSpacing:"0.08em",margin:"8px 0"},children:o.code}),i.jsxs("p",{className:"ggui-muted",children:["Valid for ",i.jsxs("code",{className:"ggui-code",children:[l,"s"]}),". Paste into a paired client or"," ",i.jsx("code",{className:"ggui-code",children:"POST /pair"})," with the bearer."]})]})}function iE({state:e}){if(e.kind!=="ok")return i.jsx(vn,{num:"CAP / 01",title:"capabilities",children:i.jsx("p",{className:"ggui-muted",children:e.kind==="loading"?"Loading…":"Unavailable."})});const n=e.info.capabilities;return i.jsx(vn,{num:"CAP / 01",title:"capabilities",children:i.jsxs("dl",{className:"ggui-kv",children:[i.jsxs("div",{children:[i.jsx("dt",{children:"tools"}),i.jsx("dd",{children:i.jsx("code",{className:"ggui-code",children:n.toolCount})})]}),i.jsxs("div",{children:[i.jsx("dt",{children:"blueprints"}),i.jsx("dd",{children:i.jsx("code",{className:"ggui-code",children:n.blueprintCount})})]}),i.jsxs("div",{children:[i.jsx("dt",{children:"primitives"}),i.jsx("dd",{children:i.jsx("code",{className:"ggui-code",children:n.primitiveCount})})]}),i.jsxs("div",{children:[i.jsx("dt",{children:"agent"}),i.jsx("dd",{children:i.jsx(Me,{tone:n.agentWired?"live":"ink",children:n.agentWired?"wired":"off"})})]}),i.jsxs("div",{children:[i.jsx("dt",{children:"generation"}),i.jsx("dd",{children:oE(n.generation)})]})]})})}function oE(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 lE({state:e}){if(e.kind!=="ok")return i.jsx(vn,{num:"STG / 01",title:"storage",children:i.jsx("p",{className:"ggui-muted",children:e.kind==="loading"?"Loading…":"Unavailable."})});const n=e.info.storage,o=l=>l==="custom"?"live":"draft";return i.jsxs(vn,{num:"STG / 01",title:"storage",children:[i.jsxs("dl",{className:"ggui-kv",children:[i.jsxs("div",{children:[i.jsx("dt",{children:"renders"}),i.jsx("dd",{children:i.jsx(Me,{tone:o(n.renderStore),children:n.renderStore})})]}),i.jsxs("div",{children:[i.jsx("dt",{children:"vectors"}),i.jsx("dd",{children:i.jsx(Me,{tone:o(n.vectorStore),children:n.vectorStore})})]})]}),i.jsxs("p",{className:"ggui-muted",style:{marginTop:12},children:[i.jsx("code",{className:"ggui-code",children:"memory"})," = in-process default (loss on restart). ",i.jsx("code",{className:"ggui-code",children:"custom"})," = operator-wired store."]})]})}function sE({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:()=>Le("/"),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:cE(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:()=>Le("/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:()=>Le("/admin/sessions"),children:"view all →"})})]})}function cE(e){const n=Date.now()-e;if(n<0)return"just now";const o=Math.floor(n/1e3);if(o<5)return"just now";if(o<60)return`${o}s ago`;const l=Math.floor(o/60);if(l<60)return`${l}m ago`;const c=Math.floor(l/60);if(c<24)return`${c}h ago`;const u=new Date(e),d=p=>p<10?`0${p}`:String(p);return`${u.getFullYear()}-${d(u.getMonth()+1)}-${d(u.getDate())}`}function vn({num:e,title:n,children:o}){return i.jsxs("div",{className:"ggui-card",children:[i.jsxs("div",{className:"ggui-card__head",children:[i.jsx("span",{className:"ggui-card__title",children:n}),i.jsx("span",{className:"ggui-card__num",children:e})]}),i.jsx("div",{className:"ggui-card__body",children:o})]})}function uE(e){const n=e.$value;if(Array.isArray(n))return n.join(", ");if(n!==null&&typeof n=="object"){const o=n;if(e.$type==="shadow"&&"offsetX"in o)return`${o.offsetX} ${o.offsetY} ${o.blur} ${o.spread} ${o.color}`;if(e.$type==="transition"&&"duration"in o&&"timingFunction"in o)return`${typeof o.property=="string"&&o.property?`${o.property} `:""}${o.duration} ${o.timingFunction}`}return String(n)}function tr(e,n,o){for(const[l,c]of Object.entries(e))l.startsWith("$")||(c!==null&&typeof c=="object"&&"$value"in c?o.push(` --ggui-${n}-${l}: ${uE(c)};`):c!==null&&typeof c=="object"&&tr(c,`${n}-${l}`,o))}function dE(e){const n=[];return tr(e.color,"color",n),tr(e.font,"font",n),tr(e.spacing,"spacing",n),tr(e.shape,"shape",n),tr({duration:e.motion.duration,easing:e.motion.easing,transition:e.motion.transition},"motion",n),tr(e.accessibility,"accessibility",n),tr(e.zIndex,"zIndex",n),n.join(`
|
|
217
|
-
`)}function fE(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} {
|
|
218
|
-
${l.join(`
|
|
219
|
-
`)}
|
|
220
|
-
}`}function pE(e){const n=[];for(const[o,l]of Object.entries(e.motion.keyframes))o.startsWith("$")||n.push(fE(o,String(l.$value)));return n.join(`
|
|
221
|
-
|
|
222
|
-
`)}function gE(e,n){const l=`:root {
|
|
223
|
-
${dE(n)}
|
|
224
|
-
}`,c=pE(n),u=c?`${l}
|
|
225
|
-
|
|
226
|
-
${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"}}}},at={light:{focusRing:{color:{$type:"color",$value:"#0284c7"},width:{$type:"dimension",$value:"2px"},offset:{$type:"dimension",$value:"2px"}},reducedMotion:{duration:{$type:"duration",$value:"0ms"}},highContrast:{borderWidth:{$type:"dimension",$value:"2px"},textColor:{$type:"color",$value:"#000000"},backgroundColor:{$type:"color",$value:"#ffffff"},linkColor:{$type:"color",$value:"#0369a1"}}},dark:{focusRing:{color:{$type:"color",$value:"#38bdf8"},width:{$type:"dimension",$value:"2px"},offset:{$type:"dimension",$value:"2px"}},reducedMotion:{duration:{$type:"duration",$value:"0ms"}},highContrast:{borderWidth:{$type:"dimension",$value:"2px"},textColor:{$type:"color",$value:"#f1f5f9"},backgroundColor:{$type:"color",$value:"#0f172a"},linkColor:{$type:"color",$value:"#7dd3fc"}}}},Qt={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}},Fc={fast:{$type:"transition",$value:"100ms cubic-bezier(0.4, 0, 0.2, 1)"},normal:{$type:"transition",$value:"200ms cubic-bezier(0.4, 0, 0.2, 1)"},slow:{$type:"transition",$value:"300ms cubic-bezier(0.4, 0, 0.2, 1)"},colors:{$type:"transition",$value:"color 200ms cubic-bezier(0.4, 0, 0.2, 1), background-color 200ms cubic-bezier(0.4, 0, 0.2, 1), border-color 200ms cubic-bezier(0.4, 0, 0.2, 1)"},opacity:{$type:"transition",$value:"opacity 200ms cubic-bezier(0.4, 0, 0.2, 1)"},transform:{$type:"transition",$value:"transform 200ms cubic-bezier(0, 0, 0.2, 1)"}},cr={font:{family:{sans:{$value:'"Inter", system-ui, -apple-system, sans-serif',$type:"fontFamily"},mono:{$value:'"Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace',$type:"fontFamily"}},size:{sm:{$value:"0.8125rem",$type:"dimension"},base:{$value:"0.875rem",$type:"dimension"},lg:{$value:"1rem",$type:"dimension"},xl:{$value:"1.125rem",$type:"dimension"},"2xl":{$value:"1.375rem",$type:"dimension"}},weight:{normal:{$value:"400",$type:"fontWeight"},medium:{$value:"500",$type:"fontWeight"},semibold:{$value:"600",$type:"fontWeight"},bold:{$value:"700",$type:"fontWeight"}},lineHeight:{tight:{$value:"1.2",$type:"number"},normal:{$value:"1.5",$type:"number"},relaxed:{$value:"1.6",$type:"number"}}},spacing:{1:{$value:"0.25rem",$type:"dimension"},2:{$value:"0.5rem",$type:"dimension"},3:{$value:"0.75rem",$type:"dimension"},4:{$value:"1rem",$type:"dimension"},5:{$value:"1.25rem",$type:"dimension"},6:{$value:"1.5rem",$type:"dimension"},8:{$value:"2rem",$type:"dimension"},10:{$value:"2.5rem",$type:"dimension"},12:{$value:"3rem",$type:"dimension"},xs:{$value:"0.25rem",$type:"dimension"},sm:{$value:"0.5rem",$type:"dimension"},md:{$value:"1rem",$type:"dimension"},lg:{$value:"1.5rem",$type:"dimension"},xl:{$value:"2rem",$type:"dimension"},"2xl":{$value:"3rem",$type:"dimension"}},shape:{radius:{sm:{$value:"2px",$type:"dimension"},md:{$value:"2px",$type:"dimension"},lg:{$value:"4px",$type:"dimension"},xl:{$value:"6px",$type:"dimension"},full:{$value:"9999px",$type:"dimension"}},shadow:{sm:{$value:"none",$type:"shadow"},md:{$value:"0 1px 2px rgba(41, 41, 41, 0.06)",$type:"shadow"},lg:{$value:"0 2px 6px rgba(41, 41, 41, 0.08)",$type:"shadow"},xl:{$value:"0 4px 12px rgba(41, 41, 41, 0.10)",$type:"shadow"}}},motion:{duration:{fast:{$value:"120ms",$type:"duration"},normal:{$value:"200ms",$type:"duration"},slow:{$value:"400ms",$type:"duration"},ambient:{$value:"2000ms",$type:"duration"}},easing:{default:{$value:"cubic-bezier(0.4, 0, 0.2, 1)",$type:"cubicBezier"},bounce:{$value:"cubic-bezier(0.34, 1.56, 0.64, 1)",$type:"cubicBezier"},spring:{$value:"cubic-bezier(0.22, 1, 0.36, 1)",$type:"cubicBezier"}},transition:Fc,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"}}}},mE={$name:"GGUI",$description:"The default ggui theme — monochrome paper + ink, architectural, no decorative flourish.",$metadata:{font:"Inter",fontUrl:"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Geist+Mono:wght@400;500;700&display=swap",philosophy:"The interface is the artifact, not the chrome around it."},color:{primary:{50:{$value:"#f4f3ed",$type:"color"},100:{$value:"#ebe9e1",$type:"color"},200:{$value:"#e4e4e2",$type:"color"},300:{$value:"#d9d9d9",$type:"color"},400:{$value:"#8c8c93",$type:"color"},500:{$value:"#292929",$type:"color"},600:{$value:"#1f1f1f",$type:"color"},700:{$value:"#171717",$type:"color"},800:{$value:"#0e0e0e",$type:"color"},900:{$value:"#000000",$type:"color"}},neutral:{50:{$value:"#f4f3ed",$type:"color"},100:{$value:"#ebe9e1",$type:"color"},200:{$value:"#e4e4e2",$type:"color"},300:{$value:"#d9d9d9",$type:"color"},400:{$value:"#8c8c93",$type:"color"},500:{$value:"#5a5a5a",$type:"color"},600:{$value:"#3d3d3d",$type:"color"},700:{$value:"#292929",$type:"color"},800:{$value:"#24242c",$type:"color"},900:{$value:"#0e0e0e",$type:"color"}},success:{50:{$value:"#e8f5ec",$type:"color"},100:{$value:"#c5e6cd",$type:"color"},200:{$value:"#8fcca0",$type:"color"},500:{$value:"#1b7a37",$type:"color"},600:{$value:"#15622c",$type:"color"},700:{$value:"#0f4a21",$type:"color"},800:{$value:"#093116",$type:"color"}},warning:{50:{$value:"#fbf3e0",$type:"color"},100:{$value:"#f3e1b0",$type:"color"},200:{$value:"#e6c46e",$type:"color"},500:{$value:"#a87b0e",$type:"color"},600:{$value:"#86620b",$type:"color"},700:{$value:"#654a08",$type:"color"},800:{$value:"#433105",$type:"color"}},error:{50:{$value:"#fbe7e3",$type:"color"},100:{$value:"#f4bbb1",$type:"color"},200:{$value:"#ea8a7a",$type:"color"},500:{$value:"#d93822",$type:"color"},600:{$value:"#ae2d1b",$type:"color"},700:{$value:"#822214",$type:"color"},800:{$value:"#57160d",$type:"color"}},info:{50:{$value:"#e1e1e1",$type:"color"},100:{$value:"#bababa",$type:"color"},200:{$value:"#8e8e8e",$type:"color"},500:{$value:"#3d3d3d",$type:"color"},600:{$value:"#313131",$type:"color"},700:{$value:"#252525",$type:"color"},800:{$value:"#181818",$type:"color"}},surface:{$value:"#f4f3ed",$type:"color"},onSurface:{$value:"#292929",$type:"color"},surfaceVariant:{$value:"#ebe9e1",$type:"color"},onSurfaceVariant:{$value:"#5a5a5a",$type:"color"},container:{$value:"#ebe9e1",$type:"color"},onContainer:{$value:"#292929",$type:"color"},outline:{$value:"#d6d4cb",$type:"color"},outlineVariant:{$value:"#e4e4e2",$type:"color"},onPrimary:{$value:"#f4f3ed",$type:"color"},primaryContainer:{$value:"#ebe9e1",$type:"color"},onPrimaryContainer:{$value:"#292929",$type:"color"},onError:{$value:"#f4f3ed",$type:"color"},errorContainer:{$value:"#fbe7e3",$type:"color"},onErrorContainer:{$value:"#57160d",$type:"color"},tertiary:{$value:"#1b7a37",$type:"color"},onTertiary:{$value:"#f4f3ed",$type:"color"},tertiaryContainer:{$value:"#e8f5ec",$type:"color"},onTertiaryContainer:{$value:"#093116",$type:"color"}},font:cr.font,spacing:cr.spacing,shape:cr.shape,motion:cr.motion,accessibility:{...at.light,focusRing:{...at.light.focusRing,color:{$type:"color",$value:"#292929"}}},zIndex:Qt},hE={$name:"GGUI",$description:"The default ggui theme (dark) — ink canvas, paper text, architectural and flat.",$metadata:{font:"Inter",fontUrl:"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Geist+Mono:wght@400;500;700&display=swap",philosophy:"The interface is the artifact, not the chrome around it."},color:{primary:{50:{$value:"#0e0e0e",$type:"color"},100:{$value:"#1f1f1f",$type:"color"},200:{$value:"#292929",$type:"color"},300:{$value:"#3d3d3d",$type:"color"},400:{$value:"#5a5a5a",$type:"color"},500:{$value:"#f4f3ed",$type:"color"},600:{$value:"#ebe9e1",$type:"color"},700:{$value:"#e4e4e2",$type:"color"},800:{$value:"#d9d9d9",$type:"color"},900:{$value:"#ffffff",$type:"color"}},neutral:{50:{$value:"#0e0e0e",$type:"color"},100:{$value:"#1f1f1f",$type:"color"},200:{$value:"#292929",$type:"color"},300:{$value:"#3d3d3d",$type:"color"},400:{$value:"#5a5a5a",$type:"color"},500:{$value:"#8c8c93",$type:"color"},600:{$value:"#d9d9d9",$type:"color"},700:{$value:"#e4e4e2",$type:"color"},800:{$value:"#ebe9e1",$type:"color"},900:{$value:"#f4f3ed",$type:"color"}},success:{50:{$value:"#0d2918",$type:"color"},100:{$value:"#174f2a",$type:"color"},200:{$value:"#286b3d",$type:"color"},500:{$value:"#3da85b",$type:"color"},600:{$value:"#6dbf83",$type:"color"},700:{$value:"#9dd5ab",$type:"color"},800:{$value:"#cdead3",$type:"color"}},warning:{50:{$value:"#332608",$type:"color"},100:{$value:"#5e4612",$type:"color"},200:{$value:"#896720",$type:"color"},500:{$value:"#d4a02e",$type:"color"},600:{$value:"#dfb55c",$type:"color"},700:{$value:"#eaca8a",$type:"color"},800:{$value:"#f5deb8",$type:"color"}},error:{50:{$value:"#3d130d",$type:"color"},100:{$value:"#702419",$type:"color"},200:{$value:"#a33828",$type:"color"},500:{$value:"#ff5b46",$type:"color"},600:{$value:"#ff7d6c",$type:"color"},700:{$value:"#ff9f93",$type:"color"},800:{$value:"#ffc2ba",$type:"color"}},info:{50:{$value:"#363636",$type:"color"},100:{$value:"#5a5a5a",$type:"color"},200:{$value:"#8c8c8c",$type:"color"},500:{$value:"#d9d9d9",$type:"color"},600:{$value:"#e0e0e0",$type:"color"},700:{$value:"#e8e8e8",$type:"color"},800:{$value:"#f0f0f0",$type:"color"}},surface:{$value:"#1f1f1f",$type:"color"},onSurface:{$value:"#f4f3ed",$type:"color"},surfaceVariant:{$value:"#292929",$type:"color"},onSurfaceVariant:{$value:"#d9d9d9",$type:"color"},container:{$value:"#292929",$type:"color"},onContainer:{$value:"#f4f3ed",$type:"color"},outline:{$value:"#3d3d3d",$type:"color"},outlineVariant:{$value:"#292929",$type:"color"},onPrimary:{$value:"#292929",$type:"color"},primaryContainer:{$value:"#3d3d3d",$type:"color"},onPrimaryContainer:{$value:"#f4f3ed",$type:"color"},onError:{$value:"#3d130d",$type:"color"},errorContainer:{$value:"#702419",$type:"color"},onErrorContainer:{$value:"#ffc2ba",$type:"color"},tertiary:{$value:"#3da85b",$type:"color"},onTertiary:{$value:"#0d2918",$type:"color"},tertiaryContainer:{$value:"#174f2a",$type:"color"},onTertiaryContainer:{$value:"#cdead3",$type:"color"}},font:cr.font,spacing:cr.spacing,shape:cr.shape,motion:cr.motion,accessibility:{...at.dark,focusRing:{...at.dark.focusRing,color:{$type:"color",$value:"#f4f3ed"}}},zIndex:Qt},yE={light:mE,dark:hE},ur={font:{family:{sans:{$value:'"Orbitron", "Rajdhani", system-ui, sans-serif',$type:"fontFamily"},mono:{$value:'"Share Tech Mono", "Fira Code", monospace',$type:"fontFamily"}},size:{sm:{$value:"0.8rem",$type:"dimension"},base:{$value:"0.95rem",$type:"dimension"},lg:{$value:"1.1rem",$type:"dimension"},xl:{$value:"1.3rem",$type:"dimension"},"2xl":{$value:"1.6rem",$type:"dimension"}},weight:{normal:{$value:"400",$type:"fontWeight"},medium:{$value:"500",$type:"fontWeight"},semibold:{$value:"600",$type:"fontWeight"},bold:{$value:"700",$type:"fontWeight"}},lineHeight:{tight:{$value:"1.2",$type:"number"},normal:{$value:"1.5",$type:"number"},relaxed:{$value:"1.7",$type:"number"}}},spacing:{1:{$value:"0.25rem",$type:"dimension"},2:{$value:"0.5rem",$type:"dimension"},3:{$value:"0.75rem",$type:"dimension"},4:{$value:"1rem",$type:"dimension"},5:{$value:"1.25rem",$type:"dimension"},6:{$value:"1.5rem",$type:"dimension"},8:{$value:"2rem",$type:"dimension"},10:{$value:"2.5rem",$type:"dimension"},12:{$value:"3rem",$type:"dimension"}},shape:{radius:{sm:{$value:"2px",$type:"dimension"},md:{$value:"4px",$type:"dimension"},lg:{$value:"6px",$type:"dimension"},xl:{$value:"8px",$type:"dimension"},full:{$value:"9999px",$type:"dimension"}},shadow:{sm:{$value:"0 0 4px rgba(6, 182, 212, 0.3)",$type:"shadow"},md:{$value:"0 0 8px rgba(6, 182, 212, 0.4)",$type:"shadow"},lg:{$value:"0 0 16px rgba(6, 182, 212, 0.5)",$type:"shadow"},xl:{$value:"0 0 24px rgba(6, 182, 212, 0.6), 0 0 48px rgba(6, 182, 212, 0.2)",$type:"shadow"}}},motion:{duration:{fast:{$value:"100ms",$type:"duration"},normal:{$value:"200ms",$type:"duration"},slow:{$value:"600ms",$type:"duration"},ambient:{$value:"2000ms",$type:"duration"}},easing:{default:{$value:"cubic-bezier(0.4, 0, 0.2, 1)",$type:"cubicBezier"},bounce:{$value:"cubic-bezier(0.68, -0.55, 0.27, 1.55)",$type:"cubicBezier"},spring:{$value:"cubic-bezier(0.22, 1, 0.36, 1)",$type:"cubicBezier"}},keyframes:{"glitch-flicker":{$value:"0%{opacity:1;transform:none}7%{opacity:0.8;transform:translateX(-2px) skewX(-1deg)}10%{opacity:1;transform:none}47%{opacity:1;transform:none}50%{opacity:0.6;transform:translateX(3px) skewX(2deg)}53%{opacity:1;transform:none}100%{opacity:1;transform:none}",$type:"keyframes"},"scan-line":{$value:"0%{transform:translateY(-100%)}100%{transform:translateY(100%)}",$type:"keyframes"},"neon-pulse":{$value:"0%{box-shadow:0 0 4px rgba(6,182,212,0.4)}50%{box-shadow:0 0 16px rgba(6,182,212,0.8)}100%{box-shadow:0 0 4px rgba(6,182,212,0.4)}",$type:"keyframes"}},transition:{fast:{$type:"transition",$value:"100ms cubic-bezier(0.4, 0, 0.2, 1)"},normal:{$type:"transition",$value:"200ms cubic-bezier(0.4, 0, 0.2, 1)"},slow:{$type:"transition",$value:"600ms cubic-bezier(0.4, 0, 0.2, 1)"},colors:{$type:"transition",$value:"color 200ms cubic-bezier(0.4, 0, 0.2, 1), background-color 200ms cubic-bezier(0.4, 0, 0.2, 1), border-color 200ms cubic-bezier(0.4, 0, 0.2, 1)"},opacity:{$type:"transition",$value:"opacity 200ms cubic-bezier(0.4, 0, 0.2, 1)"},transform:{$type:"transition",$value:"transform 200ms cubic-bezier(0, 0, 0.2, 1)"}}}},vE={$name:"Cyberpunk",$description:"Neon-lit dystopian tech — cyan neon on dark chrome with glitch animations.",$metadata:{font:"Orbitron",fontUrl:"https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700&display=swap",philosophy:"Chromatic noise, electric tension, digital rebellion."},color:{primary:{50:{$value:"#ecfeff",$type:"color"},100:{$value:"#cffafe",$type:"color"},200:{$value:"#a5f3fc",$type:"color"},300:{$value:"#67e8f9",$type:"color"},400:{$value:"#22d3ee",$type:"color"},500:{$value:"#06b6d4",$type:"color"},600:{$value:"#0891b2",$type:"color"},700:{$value:"#0e7490",$type:"color"},800:{$value:"#155e75",$type:"color"},900:{$value:"#164e63",$type:"color"}},neutral:{50:{$value:"#0a0a0f",$type:"color"},100:{$value:"#111118",$type:"color"},200:{$value:"#1a1a24",$type:"color"},300:{$value:"#25252f",$type:"color"},400:{$value:"#3a3a48",$type:"color"},500:{$value:"#55556a",$type:"color"},600:{$value:"#8888a0",$type:"color"},700:{$value:"#aaaabe",$type:"color"},800:{$value:"#d0d0e0",$type:"color"},900:{$value:"#e8e8f0",$type:"color"}},success:{50:{$value:"#e0fff1",$type:"color"},100:{$value:"#b3ffd9",$type:"color"},200:{$value:"#66ffb3",$type:"color"},500:{$value:"#00ff88",$type:"color"},600:{$value:"#00cc6e",$type:"color"},700:{$value:"#009955",$type:"color"},800:{$value:"#006638",$type:"color"}},warning:{50:{$value:"#fff5e0",$type:"color"},100:{$value:"#ffe5b3",$type:"color"},200:{$value:"#ffcc66",$type:"color"},500:{$value:"#ffaa00",$type:"color"},600:{$value:"#cc8800",$type:"color"},700:{$value:"#996600",$type:"color"},800:{$value:"#664400",$type:"color"}},error:{50:{$value:"#ffe0e8",$type:"color"},100:{$value:"#ffb3c4",$type:"color"},200:{$value:"#ff6688",$type:"color"},500:{$value:"#ff2255",$type:"color"},600:{$value:"#cc1a44",$type:"color"},700:{$value:"#991333",$type:"color"},800:{$value:"#660d22",$type:"color"}},info:{50:{$value:"#e0f9ff",$type:"color"},100:{$value:"#b3edff",$type:"color"},200:{$value:"#66dbff",$type:"color"},500:{$value:"#00ccff",$type:"color"},600:{$value:"#00a3cc",$type:"color"},700:{$value:"#007a99",$type:"color"},800:{$value:"#005266",$type:"color"}},surface:{$value:"#0a0a0f",$type:"color"},onSurface:{$value:"#e8e8f0",$type:"color"},surfaceVariant:{$value:"#111118",$type:"color"},onSurfaceVariant:{$value:"#8888a0",$type:"color"},container:{$value:"#155e75",$type:"color"},onContainer:{$value:"#cffafe",$type:"color"},outline:{$value:"#3a3a48",$type:"color"},outlineVariant:{$value:"#25252f",$type:"color"},onPrimary:{$value:"#0a0a0f",$type:"color"},primaryContainer:{$value:"#155e75",$type:"color"},onPrimaryContainer:{$value:"#cffafe",$type:"color"},onError:{$value:"#0a0a0f",$type:"color"},errorContainer:{$value:"#660d22",$type:"color"},onErrorContainer:{$value:"#ffe0e8",$type:"color"},tertiary:{$value:"#00ff88",$type:"color"},onTertiary:{$value:"#0a0a0f",$type:"color"},tertiaryContainer:{$value:"#006638",$type:"color"},onTertiaryContainer:{$value:"#e0fff1",$type:"color"}},font:ur.font,spacing:ur.spacing,shape:ur.shape,motion:ur.motion,accessibility:{...at.light,focusRing:{...at.light.focusRing,color:{$type:"color",$value:"#06b6d4"}}},zIndex:Qt},$E={$name:"Cyberpunk",$description:"Neon-lit dystopian tech (dark) — brighter cyan on pure-black chrome, cranked neon contrast.",$metadata:{font:"Orbitron",fontUrl:"https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700&display=swap",philosophy:"Chromatic noise, electric tension, digital rebellion."},color:{primary:{50:{$value:"#164e63",$type:"color"},100:{$value:"#155e75",$type:"color"},200:{$value:"#0e7490",$type:"color"},300:{$value:"#0891b2",$type:"color"},400:{$value:"#06b6d4",$type:"color"},500:{$value:"#22d3ee",$type:"color"},600:{$value:"#67e8f9",$type:"color"},700:{$value:"#a5f3fc",$type:"color"},800:{$value:"#cffafe",$type:"color"},900:{$value:"#ecfeff",$type:"color"}},neutral:{50:{$value:"#000005",$type:"color"},100:{$value:"#0a0a0f",$type:"color"},200:{$value:"#111118",$type:"color"},300:{$value:"#1a1a24",$type:"color"},400:{$value:"#3a3a48",$type:"color"},500:{$value:"#55556a",$type:"color"},600:{$value:"#8888a0",$type:"color"},700:{$value:"#aaaabe",$type:"color"},800:{$value:"#d0d0e0",$type:"color"},900:{$value:"#e8e8f0",$type:"color"}},success:{50:{$value:"#003319",$type:"color"},100:{$value:"#006633",$type:"color"},200:{$value:"#00994d",$type:"color"},500:{$value:"#33ffaa",$type:"color"},600:{$value:"#66ffbf",$type:"color"},700:{$value:"#99ffd4",$type:"color"},800:{$value:"#ccffea",$type:"color"}},warning:{50:{$value:"#332200",$type:"color"},100:{$value:"#664400",$type:"color"},200:{$value:"#996600",$type:"color"},500:{$value:"#ffbe33",$type:"color"},600:{$value:"#ffcb5c",$type:"color"},700:{$value:"#ffd985",$type:"color"},800:{$value:"#ffe7ad",$type:"color"}},error:{50:{$value:"#330a17",$type:"color"},100:{$value:"#66142e",$type:"color"},200:{$value:"#991e45",$type:"color"},500:{$value:"#ff4477",$type:"color"},600:{$value:"#ff6e94",$type:"color"},700:{$value:"#ff97b1",$type:"color"},800:{$value:"#ffc1cf",$type:"color"}},info:{50:{$value:"#002b33",$type:"color"},100:{$value:"#005566",$type:"color"},200:{$value:"#008099",$type:"color"},500:{$value:"#33d6ff",$type:"color"},600:{$value:"#5cdeff",$type:"color"},700:{$value:"#85e6ff",$type:"color"},800:{$value:"#adeeff",$type:"color"}},surface:{$value:"#000005",$type:"color"},onSurface:{$value:"#e8e8f0",$type:"color"},surfaceVariant:{$value:"#0a0a0f",$type:"color"},onSurfaceVariant:{$value:"#aaaabe",$type:"color"},container:{$value:"#0e7490",$type:"color"},onContainer:{$value:"#cffafe",$type:"color"},outline:{$value:"#1a1a24",$type:"color"},outlineVariant:{$value:"#111118",$type:"color"},onPrimary:{$value:"#000005",$type:"color"},primaryContainer:{$value:"#0e7490",$type:"color"},onPrimaryContainer:{$value:"#cffafe",$type:"color"},onError:{$value:"#000005",$type:"color"},errorContainer:{$value:"#991e45",$type:"color"},onErrorContainer:{$value:"#ffc1cf",$type:"color"},tertiary:{$value:"#33ffaa",$type:"color"},onTertiary:{$value:"#000005",$type:"color"},tertiaryContainer:{$value:"#006633",$type:"color"},onTertiaryContainer:{$value:"#ccffea",$type:"color"}},font:ur.font,spacing:ur.spacing,shape:ur.shape,motion:ur.motion,accessibility:{...at.dark,focusRing:{...at.dark.focusRing,color:{$type:"color",$value:"#22d3ee"}}},zIndex:Qt},bE={light:vE,dark:$E},dr={font:{family:{sans:{$value:'"Noto Serif JP", "Georgia", serif',$type:"fontFamily"},mono:{$value:'"Noto Sans Mono", "Courier New", monospace',$type:"fontFamily"}},size:{sm:{$value:"0.875rem",$type:"dimension"},base:{$value:"1rem",$type:"dimension"},lg:{$value:"1.125rem",$type:"dimension"},xl:{$value:"1.3rem",$type:"dimension"},"2xl":{$value:"1.6rem",$type:"dimension"}},weight:{normal:{$value:"400",$type:"fontWeight"},medium:{$value:"500",$type:"fontWeight"},semibold:{$value:"600",$type:"fontWeight"},bold:{$value:"700",$type:"fontWeight"}},lineHeight:{tight:{$value:"1.3",$type:"number"},normal:{$value:"1.6",$type:"number"},relaxed:{$value:"1.9",$type:"number"}}},spacing:{1:{$value:"0.25rem",$type:"dimension"},2:{$value:"0.5rem",$type:"dimension"},3:{$value:"0.75rem",$type:"dimension"},4:{$value:"1rem",$type:"dimension"},5:{$value:"1.25rem",$type:"dimension"},6:{$value:"1.5rem",$type:"dimension"},8:{$value:"2rem",$type:"dimension"},10:{$value:"2.5rem",$type:"dimension"},12:{$value:"3rem",$type:"dimension"}},shape:{radius:{sm:{$value:"0.125rem",$type:"dimension"},md:{$value:"0.25rem",$type:"dimension"},lg:{$value:"0.5rem",$type:"dimension"},xl:{$value:"0.75rem",$type:"dimension"},full:{$value:"9999px",$type:"dimension"}},shadow:{sm:{$value:"0 1px 3px rgba(42, 39, 36, 0.06)",$type:"shadow"},md:{$value:"0 3px 8px rgba(42, 39, 36, 0.08)",$type:"shadow"},lg:{$value:"0 8px 20px rgba(42, 39, 36, 0.10)",$type:"shadow"},xl:{$value:"0 16px 40px rgba(42, 39, 36, 0.12)",$type:"shadow"}}},motion:{duration:{fast:{$value:"200ms",$type:"duration"},normal:{$value:"500ms",$type:"duration"},slow:{$value:"1500ms",$type:"duration"},ambient:{$value:"6000ms",$type:"duration"}},easing:{default:{$value:"cubic-bezier(0.33, 0, 0.67, 1)",$type:"cubicBezier"},bounce:{$value:"cubic-bezier(0.34, 1.2, 0.64, 1)",$type:"cubicBezier"},spring:{$value:"cubic-bezier(0.22, 1, 0.36, 1)",$type:"cubicBezier"}},keyframes:{"slow-breathe":{$value:"0%{opacity:0.85}50%{opacity:1}100%{opacity:0.85}",$type:"keyframes"},"gentle-fade":{$value:"0%{opacity:0}100%{opacity:1}",$type:"keyframes"},"ink-ripple":{$value:"0%{transform:scale(0.95);opacity:0.5}50%{transform:scale(1);opacity:0.8}100%{transform:scale(0.95);opacity:0.5}",$type:"keyframes"}},transition:{fast:{$type:"transition",$value:"200ms cubic-bezier(0.33, 0, 0.67, 1)"},normal:{$type:"transition",$value:"500ms cubic-bezier(0.33, 0, 0.67, 1)"},slow:{$type:"transition",$value:"1500ms cubic-bezier(0.33, 0, 0.67, 1)"},colors:{$type:"transition",$value:"color 500ms cubic-bezier(0.33, 0, 0.67, 1), background-color 500ms cubic-bezier(0.33, 0, 0.67, 1), border-color 500ms cubic-bezier(0.33, 0, 0.67, 1)"},opacity:{$type:"transition",$value:"opacity 500ms cubic-bezier(0.33, 0, 0.67, 1)"},transform:{$type:"transition",$value:"transform 500ms cubic-bezier(0.22, 1, 0.36, 1)"}}}},xE={$name:"Zen",$description:"Minimalist Japanese aesthetic — warm stone tones, deliberate space, and unhurried motion.",$metadata:{font:"Noto Serif JP",fontUrl:"https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@400;500;600;700&display=swap",philosophy:"Beauty in imperfection. Stillness as presence."},color:{primary:{50:{$value:"#f6f7f4",$type:"color"},100:{$value:"#e8ebe2",$type:"color"},200:{$value:"#d1d7c5",$type:"color"},300:{$value:"#b3bda1",$type:"color"},400:{$value:"#93a17c",$type:"color"},500:{$value:"#748660",$type:"color"},600:{$value:"#5c6b4c",$type:"color"},700:{$value:"#48543d",$type:"color"},800:{$value:"#3b4434",$type:"color"},900:{$value:"#33392e",$type:"color"}},neutral:{50:{$value:"#faf9f7",$type:"color"},100:{$value:"#f3f1ed",$type:"color"},200:{$value:"#e7e4de",$type:"color"},300:{$value:"#d5d0c8",$type:"color"},400:{$value:"#b8b0a4",$type:"color"},500:{$value:"#9a9084",$type:"color"},600:{$value:"#7a7068",$type:"color"},700:{$value:"#5e5650",$type:"color"},800:{$value:"#3e3a36",$type:"color"},900:{$value:"#2a2724",$type:"color"}},success:{50:{$type:"color",$value:"#f0f4ee"},100:{$type:"color",$value:"#dde6d8"},200:{$type:"color",$value:"#c6d4be"},500:{$type:"color",$value:"#6b8f5e"},600:{$type:"color",$value:"#58754d"},700:{$type:"color",$value:"#43583a"},800:{$type:"color",$value:"#2f3e29"}},warning:{50:{$type:"color",$value:"#faf6ea"},100:{$type:"color",$value:"#f4ebcb"},200:{$type:"color",$value:"#ecdda4"},500:{$type:"color",$value:"#c9a84c"},600:{$type:"color",$value:"#a88a3a"},700:{$type:"color",$value:"#7e672c"},800:{$type:"color",$value:"#59481f"}},error:{50:{$type:"color",$value:"#f8edec"},100:{$type:"color",$value:"#efd0ce"},200:{$type:"color",$value:"#e3aba8"},500:{$type:"color",$value:"#b85450"},600:{$type:"color",$value:"#9a4340"},700:{$type:"color",$value:"#743330"},800:{$type:"color",$value:"#522423"}},info:{50:{$type:"color",$value:"#eef3f5"},100:{$type:"color",$value:"#d7e2e7"},200:{$type:"color",$value:"#b9cdd5"},500:{$type:"color",$value:"#6a8fa0"},600:{$type:"color",$value:"#557585"},700:{$type:"color",$value:"#405864"},800:{$type:"color",$value:"#2c3d46"}},surface:{$value:"#faf9f7",$type:"color"},onSurface:{$value:"#2a2724",$type:"color"},surfaceVariant:{$value:"#f3f1ed",$type:"color"},onSurfaceVariant:{$value:"#6b635b",$type:"color"},container:{$value:"#e8ebe2",$type:"color"},onContainer:{$value:"#33392e",$type:"color"},outline:{$value:"#d5d0c8",$type:"color"},outlineVariant:{$value:"#e7e4de",$type:"color"},onPrimary:{$value:"#faf9f7",$type:"color"},primaryContainer:{$value:"#e8ebe2",$type:"color"},onPrimaryContainer:{$value:"#33392e",$type:"color"},onError:{$value:"#faf9f7",$type:"color"},errorContainer:{$value:"#f8edec",$type:"color"},onErrorContainer:{$value:"#522423",$type:"color"},tertiary:{$value:"#7d5e6e",$type:"color"},onTertiary:{$value:"#faf9f7",$type:"color"},tertiaryContainer:{$value:"#ebe2e6",$type:"color"},onTertiaryContainer:{$value:"#3a2a32",$type:"color"}},font:dr.font,spacing:dr.spacing,shape:dr.shape,motion:dr.motion,accessibility:{...at.light,focusRing:{...at.light.focusRing,color:{$type:"color",$value:"#748660"}}},zIndex:Qt},_E={$name:"Zen",$description:"Minimalist Japanese aesthetic (dark) — dusk stone surfaces with restrained moss accents and unhurried motion.",$metadata:{font:"Noto Serif JP",fontUrl:"https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@400;500;600;700&display=swap",philosophy:"Beauty in imperfection. Stillness as presence."},color:{primary:{50:{$value:"#33392e",$type:"color"},100:{$value:"#3b4434",$type:"color"},200:{$value:"#48543d",$type:"color"},300:{$value:"#5c6b4c",$type:"color"},400:{$value:"#748660",$type:"color"},500:{$value:"#93a17c",$type:"color"},600:{$value:"#b3bda1",$type:"color"},700:{$value:"#d1d7c5",$type:"color"},800:{$value:"#e8ebe2",$type:"color"},900:{$value:"#f6f7f4",$type:"color"}},neutral:{50:{$value:"#1a1816",$type:"color"},100:{$value:"#2a2724",$type:"color"},200:{$value:"#3e3a36",$type:"color"},300:{$value:"#5e5650",$type:"color"},400:{$value:"#7a7068",$type:"color"},500:{$value:"#9a9084",$type:"color"},600:{$value:"#b8b0a4",$type:"color"},700:{$value:"#d5d0c8",$type:"color"},800:{$value:"#e7e4de",$type:"color"},900:{$value:"#faf9f7",$type:"color"}},success:{50:{$type:"color",$value:"#f1f6ee"},100:{$type:"color",$value:"#dceacc"},200:{$type:"color",$value:"#c4dab1"},500:{$type:"color",$value:"#8aab7a"},600:{$type:"color",$value:"#6f8d62"},700:{$type:"color",$value:"#546b4a"},800:{$type:"color",$value:"#3a4b34"}},warning:{50:{$type:"color",$value:"#fbf6e9"},100:{$type:"color",$value:"#f4e9c1"},200:{$type:"color",$value:"#ecdda4"},500:{$type:"color",$value:"#d8b96a"},600:{$type:"color",$value:"#b09553"},700:{$type:"color",$value:"#84703d"},800:{$type:"color",$value:"#5a4c2a"}},error:{50:{$type:"color",$value:"#faeae9"},100:{$type:"color",$value:"#f1cac8"},200:{$type:"color",$value:"#e4a5a1"},500:{$type:"color",$value:"#cf6f6a"},600:{$type:"color",$value:"#a85753"},700:{$type:"color",$value:"#7d403c"},800:{$type:"color",$value:"#552a27"}},info:{50:{$type:"color",$value:"#f0f4f6"},100:{$type:"color",$value:"#d7e0e5"},200:{$type:"color",$value:"#bccbd2"},500:{$type:"color",$value:"#8eaab8"},600:{$type:"color",$value:"#708995"},700:{$type:"color",$value:"#546771"},800:{$type:"color",$value:"#38454d"}},surface:{$value:"#2a2724",$type:"color"},onSurface:{$value:"#f3f1ed",$type:"color"},surfaceVariant:{$value:"#3e3a36",$type:"color"},onSurfaceVariant:{$value:"#b8b0a4",$type:"color"},container:{$value:"#48543d",$type:"color"},onContainer:{$value:"#e8ebe2",$type:"color"},outline:{$value:"#5e5650",$type:"color"},outlineVariant:{$value:"#3e3a36",$type:"color"},onPrimary:{$value:"#1a1816",$type:"color"},primaryContainer:{$value:"#3b4434",$type:"color"},onPrimaryContainer:{$value:"#e8ebe2",$type:"color"},onError:{$value:"#1a1816",$type:"color"},errorContainer:{$value:"#552a27",$type:"color"},onErrorContainer:{$value:"#f1cac8",$type:"color"},tertiary:{$value:"#a98899",$type:"color"},onTertiary:{$value:"#1a1816",$type:"color"},tertiaryContainer:{$value:"#4e3a44",$type:"color"},onTertiaryContainer:{$value:"#ebe2e6",$type:"color"}},font:dr.font,spacing:dr.spacing,shape:dr.shape,motion:dr.motion,accessibility:{...at.dark,focusRing:{...at.dark.focusRing,color:{$type:"color",$value:"#93a17c"}}},zIndex:Qt},jE={light:xE,dark:_E},fr={font:{family:{sans:{$value:'"Outfit", system-ui, -apple-system, sans-serif',$type:"fontFamily"},mono:{$value:'"Fira Code", "JetBrains Mono", monospace',$type:"fontFamily"}},size:{sm:{$value:"0.875rem",$type:"dimension"},base:{$value:"1rem",$type:"dimension"},lg:{$value:"1.125rem",$type:"dimension"},xl:{$value:"1.25rem",$type:"dimension"},"2xl":{$value:"1.5rem",$type:"dimension"}},weight:{normal:{$value:"400",$type:"fontWeight"},medium:{$value:"500",$type:"fontWeight"},semibold:{$value:"600",$type:"fontWeight"},bold:{$value:"700",$type:"fontWeight"}},lineHeight:{tight:{$value:"1.25",$type:"number"},normal:{$value:"1.5",$type:"number"},relaxed:{$value:"1.75",$type:"number"}}},spacing:{1:{$value:"0.25rem",$type:"dimension"},2:{$value:"0.5rem",$type:"dimension"},3:{$value:"0.75rem",$type:"dimension"},4:{$value:"1rem",$type:"dimension"},5:{$value:"1.25rem",$type:"dimension"},6:{$value:"1.5rem",$type:"dimension"},8:{$value:"2rem",$type:"dimension"},10:{$value:"2.5rem",$type:"dimension"},12:{$value:"3rem",$type:"dimension"}},shape:{radius:{sm:{$value:"0.25rem",$type:"dimension"},md:{$value:"0.5rem",$type:"dimension"},lg:{$value:"0.75rem",$type:"dimension"},xl:{$value:"1rem",$type:"dimension"},full:{$value:"9999px",$type:"dimension"}},shadow:{sm:{$value:"0 0 6px rgba(236, 72, 153, 0.25)",$type:"shadow"},md:{$value:"0 0 12px rgba(236, 72, 153, 0.35)",$type:"shadow"},lg:{$value:"0 0 20px rgba(236, 72, 153, 0.45)",$type:"shadow"},xl:{$value:"0 0 30px rgba(236, 72, 153, 0.55), 0 0 60px rgba(236, 72, 153, 0.2)",$type:"shadow"}}},motion:{duration:{fast:{$value:"120ms",$type:"duration"},normal:{$value:"250ms",$type:"duration"},slow:{$value:"800ms",$type:"duration"},ambient:{$value:"2500ms",$type:"duration"}},easing:{default:{$value:"cubic-bezier(0.4, 0, 0.2, 1)",$type:"cubicBezier"},bounce:{$value:"cubic-bezier(0.68, -0.55, 0.27, 1.55)",$type:"cubicBezier"},spring:{$value:"cubic-bezier(0.22, 1, 0.36, 1)",$type:"cubicBezier"}},transition:{fast:{$value:"120ms cubic-bezier(0.4, 0, 0.2, 1)",$type:"transition"},normal:{$value:"250ms cubic-bezier(0.4, 0, 0.2, 1)",$type:"transition"},slow:{$value:"800ms cubic-bezier(0.4, 0, 0.2, 1)",$type:"transition"},colors:{$value:"color 250ms cubic-bezier(0.4, 0, 0.2, 1), background-color 250ms cubic-bezier(0.4, 0, 0.2, 1), border-color 250ms cubic-bezier(0.4, 0, 0.2, 1)",$type:"transition"},opacity:{$value:"opacity 250ms cubic-bezier(0.4, 0, 0.2, 1)",$type:"transition"},transform:{$value:"transform 250ms cubic-bezier(0.22, 1, 0.36, 1)",$type:"transition"}},keyframes:{"neon-flicker":{$value:"0%{opacity:1}4%{opacity:0.7}8%{opacity:1}12%{opacity:0.85}16%{opacity:1}100%{opacity:1}",$type:"keyframes"},"glow-pulse":{$value:"0%{box-shadow:0 0 8px rgba(236,72,153,0.4)}50%{box-shadow:0 0 24px rgba(236,72,153,0.8)}100%{box-shadow:0 0 8px rgba(236,72,153,0.4)}",$type:"keyframes"},"electric-arc":{$value:"0%{clip-path:inset(0 100% 0 0)}50%{clip-path:inset(0 0 0 0)}100%{clip-path:inset(0 0 0 100%)}",$type:"keyframes"}}}},SE={$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:fr.font,spacing:fr.spacing,shape:fr.shape,motion:fr.motion,accessibility:{...at.dark,focusRing:{...at.dark.focusRing,color:{$value:"#ec4899",$type:"color"}}},zIndex:Qt},wE={$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:fr.font,spacing:fr.spacing,shape:fr.shape,motion:fr.motion,accessibility:{...at.dark,focusRing:{...at.dark.focusRing,color:{$value:"#f472b6",$type:"color"}}},zIndex:Qt},kE={light:SE,dark:wE},pr={font:{family:{sans:{$value:'"Lora", "Georgia", serif',$type:"fontFamily"},mono:{$value:'"IBM Plex Mono", "Courier New", monospace',$type:"fontFamily"}},size:{sm:{$value:"0.875rem",$type:"dimension"},base:{$value:"1rem",$type:"dimension"},lg:{$value:"1.15rem",$type:"dimension"},xl:{$value:"1.3rem",$type:"dimension"},"2xl":{$value:"1.625rem",$type:"dimension"}},weight:{normal:{$value:"400",$type:"fontWeight"},medium:{$value:"500",$type:"fontWeight"},semibold:{$value:"600",$type:"fontWeight"},bold:{$value:"700",$type:"fontWeight"}},lineHeight:{tight:{$value:"1.3",$type:"number"},normal:{$value:"1.6",$type:"number"},relaxed:{$value:"1.85",$type:"number"}}},spacing:{1:{$value:"0.25rem",$type:"dimension"},2:{$value:"0.5rem",$type:"dimension"},3:{$value:"0.75rem",$type:"dimension"},4:{$value:"1rem",$type:"dimension"},5:{$value:"1.25rem",$type:"dimension"},6:{$value:"1.5rem",$type:"dimension"},8:{$value:"2rem",$type:"dimension"},10:{$value:"2.5rem",$type:"dimension"},12:{$value:"3rem",$type:"dimension"}},shape:{radius:{sm:{$value:"0.375rem",$type:"dimension"},md:{$value:"0.625rem",$type:"dimension"},lg:{$value:"1rem",$type:"dimension"},xl:{$value:"1.5rem",$type:"dimension"},full:{$value:"9999px",$type:"dimension"}},shadow:{sm:{$value:"0 1px 3px rgba(53, 46, 32, 0.08)",$type:"shadow"},md:{$value:"0 4px 8px rgba(53, 46, 32, 0.10)",$type:"shadow"},lg:{$value:"0 8px 20px rgba(53, 46, 32, 0.12)",$type:"shadow"},xl:{$value:"0 16px 40px rgba(53, 46, 32, 0.14)",$type:"shadow"}}},motion:{duration:{fast:{$value:"200ms",$type:"duration"},normal:{$value:"400ms",$type:"duration"},slow:{$value:"1200ms",$type:"duration"},ambient:{$value:"5000ms",$type:"duration"}},easing:{default:{$value:"cubic-bezier(0.4, 0, 0.2, 1)",$type:"cubicBezier"},bounce:{$value:"cubic-bezier(0.34, 1.3, 0.64, 1)",$type:"cubicBezier"},spring:{$value:"cubic-bezier(0.22, 1, 0.36, 1)",$type:"cubicBezier"}},keyframes:{"leaf-float":{$value:"0%{transform:translateY(0) rotate(0deg);opacity:0.7}25%{transform:translateY(-6px) rotate(3deg)}50%{transform:translateY(-2px) rotate(-2deg);opacity:1}75%{transform:translateY(-8px) rotate(2deg)}100%{transform:translateY(0) rotate(0deg);opacity:0.7}",$type:"keyframes"},"vine-grow":{$value:"0%{transform:scaleY(0);transform-origin:bottom}100%{transform:scaleY(1);transform-origin:bottom}",$type:"keyframes"},"gentle-sway":{$value:"0%{transform:rotate(-1deg)}50%{transform:rotate(1deg)}100%{transform:rotate(-1deg)}",$type:"keyframes"}},transition:Fc}},NE={$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:pr.font,spacing:pr.spacing,shape:pr.shape,motion:pr.motion,accessibility:{...at.light,focusRing:{...at.light.focusRing,color:{$type:"color",$value:"#16a34a"}}},zIndex:Qt},EE={$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:pr.font,spacing:pr.spacing,shape:pr.shape,motion:pr.motion,accessibility:{...at.dark,focusRing:{...at.dark.focusRing,color:{$type:"color",$value:"#4ade80"}}},zIndex:Qt},zE={light:NE,dark:EE},CE={...Fc,fast:{$type:"transition",$value:"120ms cubic-bezier(0.4, 0, 0.2, 1)"},normal:{$type:"transition",$value:"240ms cubic-bezier(0.4, 0, 0.2, 1)"},slow:{$type:"transition",$value:"480ms cubic-bezier(0.4, 0, 0.2, 1)"}},gr={font:{family:{sans:{$value:'-apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif',$type:"fontFamily"},mono:{$value:'ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace',$type:"fontFamily"}},size:{sm:{$value:"0.875rem",$type:"dimension"},base:{$value:"1rem",$type:"dimension"},lg:{$value:"1.125rem",$type:"dimension"},xl:{$value:"1.25rem",$type:"dimension"},"2xl":{$value:"1.5rem",$type:"dimension"}},weight:{normal:{$value:"400",$type:"fontWeight"},medium:{$value:"500",$type:"fontWeight"},semibold:{$value:"600",$type:"fontWeight"},bold:{$value:"700",$type:"fontWeight"}},lineHeight:{tight:{$value:"1.25",$type:"number"},normal:{$value:"1.55",$type:"number"},relaxed:{$value:"1.75",$type:"number"}}},spacing:{1:{$value:"0.25rem",$type:"dimension"},2:{$value:"0.5rem",$type:"dimension"},3:{$value:"0.75rem",$type:"dimension"},4:{$value:"1rem",$type:"dimension"},5:{$value:"1.25rem",$type:"dimension"},6:{$value:"1.5rem",$type:"dimension"},8:{$value:"2rem",$type:"dimension"},10:{$value:"2.5rem",$type:"dimension"},12:{$value:"3rem",$type:"dimension"},xs:{$value:"0.25rem",$type:"dimension"},sm:{$value:"0.5rem",$type:"dimension"},md:{$value:"1rem",$type:"dimension"},lg:{$value:"1.5rem",$type:"dimension"},xl:{$value:"2rem",$type:"dimension"},"2xl":{$value:"3rem",$type:"dimension"}},shape:{radius:{sm:{$value:"0.5rem",$type:"dimension"},md:{$value:"0.75rem",$type:"dimension"},lg:{$value:"1rem",$type:"dimension"},xl:{$value:"1.5rem",$type:"dimension"},full:{$value:"9999px",$type:"dimension"}},shadow:{sm:{$value:"0 1px 3px color-mix(in srgb, var(--ggui-color-primary-500) 8%, transparent)",$type:"shadow"},md:{$value:"0 1px 2px rgba(20, 20, 19, 0.04), 0 8px 16px -4px color-mix(in srgb, var(--ggui-color-primary-500) 14%, transparent)",$type:"shadow"},lg:{$value:"0 2px 4px rgba(20, 20, 19, 0.04), 0 16px 32px -8px color-mix(in srgb, var(--ggui-color-primary-500) 20%, transparent)",$type:"shadow"},xl:{$value:"0 4px 8px rgba(20, 20, 19, 0.04), 0 24px 48px -12px color-mix(in srgb, var(--ggui-color-primary-500) 26%, transparent)",$type:"shadow"}}},motion:{duration:{fast:{$value:"120ms",$type:"duration"},normal:{$value:"240ms",$type:"duration"},slow:{$value:"480ms",$type:"duration"}},easing:{default:{$value:"cubic-bezier(0.4, 0, 0.2, 1)",$type:"cubicBezier"},spring:{$value:"cubic-bezier(0.22, 1, 0.36, 1)",$type:"cubicBezier"}},keyframes:{entrance:{$value:"0%{opacity:0;transform:translateY(4px)}100%{opacity:1;transform:none}",$type:"keyframes"}},transition:CE}},TE={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"}},ME={$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:{...TE},neutral:{50:{$value:"#faf9f5",$type:"color"},100:{$value:"#f5f4ee",$type:"color"},200:{$value:"#ebe9df",$type:"color"},300:{$value:"#dad8cc",$type:"color"},400:{$value:"#a8a59f",$type:"color"},500:{$value:"#7c7a76",$type:"color"},600:{$value:"#56544f",$type:"color"},700:{$value:"#3d3b39",$type:"color"},800:{$value:"#262624",$type:"color"},900:{$value:"#141413",$type:"color"}},success:{50:{$value:"#f4f7ec",$type:"color"},100:{$value:"#e3ecd0",$type:"color"},200:{$value:"#c8d8a5",$type:"color"},500:{$value:"#6b8e3d",$type:"color"},600:{$value:"#587634",$type:"color"},700:{$value:"#465c29",$type:"color"},800:{$value:"#33431e",$type:"color"}},warning:{50:{$value:"#fbf3e3",$type:"color"},100:{$value:"#f6e2bb",$type:"color"},200:{$value:"#eac786",$type:"color"},500:{$value:"#c98e2e",$type:"color"},600:{$value:"#a87725",$type:"color"},700:{$value:"#825c1d",$type:"color"},800:{$value:"#5d4214",$type:"color"}},error:{50:{$value:"#f9ebe7",$type:"color"},100:{$value:"#f1cec5",$type:"color"},200:{$value:"#e3a294",$type:"color"},500:{$value:"#bc4a3a",$type:"color"},600:{$value:"#9d3d30",$type:"color"},700:{$value:"#7a2f25",$type:"color"},800:{$value:"#57211a",$type:"color"}},info:{50:{$value:"#f1f0ee",$type:"color"},100:{$value:"#dedcd8",$type:"color"},200:{$value:"#bdbab4",$type:"color"},500:{$value:"#7c7a76",$type:"color"},600:{$value:"#65635f",$type:"color"},700:{$value:"#4d4b48",$type:"color"},800:{$value:"#363432",$type:"color"}},surface:{$value:"#faf9f5",$type:"color"},onSurface:{$value:"#141413",$type:"color"},surfaceVariant:{$value:"#f5f4ee",$type:"color"},onSurfaceVariant:{$value:"#56544f",$type:"color"},container:{$value:"#fbf2ee",$type:"color"},onContainer:{$value:"#4d2920",$type:"color"},outline:{$value:"#dad8cc",$type:"color"},outlineVariant:{$value:"#ebe9df",$type:"color"},onPrimary:{$value:"#faf9f5",$type:"color"},primaryContainer:{$value:"#fbf2ee",$type:"color"},onPrimaryContainer:{$value:"#4d2920",$type:"color"},onError:{$value:"#faf9f5",$type:"color"},errorContainer:{$value:"#f9ebe7",$type:"color"},onErrorContainer:{$value:"#57211a",$type:"color"},tertiary:{$value:"#6b8e3d",$type:"color"},onTertiary:{$value:"#faf9f5",$type:"color"},tertiaryContainer:{$value:"#f4f7ec",$type:"color"},onTertiaryContainer:{$value:"#33431e",$type:"color"}},font:gr.font,spacing:gr.spacing,shape:gr.shape,motion:gr.motion,accessibility:{...at.light,focusRing:{...at.light.focusRing,color:{$type:"color",$value:"#cc785c"}}},zIndex:Qt},OE={$name:"Claudic",$description:"Fits inside claude.ai (dark) — warm charcoal surfaces, terracotta accent, calm by design.",$metadata:{font:"system",philosophy:"Quiet, papery, conversational. Built to feel native when rendered inside claude.ai."},color:{primary:{50:{$value:"#4d2920",$type:"color"},100:{$value:"#723e30",$type:"color"},200:{$value:"#965240",$type:"color"},300:{$value:"#b8694f",$type:"color"},400:{$value:"#cc785c",$type:"color"},500:{$value:"#d6896c",$type:"color"},600:{$value:"#df9d80",$type:"color"},700:{$value:"#ecbfa9",$type:"color"},800:{$value:"#f5dfd4",$type:"color"},900:{$value:"#fbf2ee",$type:"color"}},neutral:{50:{$value:"#1a1917",$type:"color"},100:{$value:"#262624",$type:"color"},200:{$value:"#2d2c2a",$type:"color"},300:{$value:"#3d3b39",$type:"color"},400:{$value:"#56544f",$type:"color"},500:{$value:"#7c7a76",$type:"color"},600:{$value:"#a8a59f",$type:"color"},700:{$value:"#dad8cc",$type:"color"},800:{$value:"#ebe9df",$type:"color"},900:{$value:"#faf9f5",$type:"color"}},success:{50:{$value:"#1c2412",$type:"color"},100:{$value:"#34461e",$type:"color"},200:{$value:"#4a6029",$type:"color"},500:{$value:"#9bb56b",$type:"color"},600:{$value:"#b1c688",$type:"color"},700:{$value:"#c8d8a5",$type:"color"},800:{$value:"#e3ecd0",$type:"color"}},warning:{50:{$value:"#2a1e0c",$type:"color"},100:{$value:"#523915",$type:"color"},200:{$value:"#7a541f",$type:"color"},500:{$value:"#dba14a",$type:"color"},600:{$value:"#e4b46e",$type:"color"},700:{$value:"#eac786",$type:"color"},800:{$value:"#f6e2bb",$type:"color"}},error:{50:{$value:"#2a1410",$type:"color"},100:{$value:"#52271f",$type:"color"},200:{$value:"#7a3a2e",$type:"color"},500:{$value:"#d56b59",$type:"color"},600:{$value:"#df8576",$type:"color"},700:{$value:"#e3a294",$type:"color"},800:{$value:"#f1cec5",$type:"color"}},info:{50:{$value:"#222220",$type:"color"},100:{$value:"#3a3936",$type:"color"},200:{$value:"#56544f",$type:"color"},500:{$value:"#a8a59f",$type:"color"},600:{$value:"#bcbab5",$type:"color"},700:{$value:"#d1cfca",$type:"color"},800:{$value:"#e6e4e0",$type:"color"}},surface:{$value:"#262624",$type:"color"},onSurface:{$value:"#faf9f5",$type:"color"},surfaceVariant:{$value:"#2d2c2a",$type:"color"},onSurfaceVariant:{$value:"#a8a59f",$type:"color"},container:{$value:"#3d3b39",$type:"color"},onContainer:{$value:"#fbf2ee",$type:"color"},outline:{$value:"#3d3b39",$type:"color"},outlineVariant:{$value:"#2d2c2a",$type:"color"},onPrimary:{$value:"#262624",$type:"color"},primaryContainer:{$value:"#723e30",$type:"color"},onPrimaryContainer:{$value:"#f5dfd4",$type:"color"},onError:{$value:"#2a1410",$type:"color"},errorContainer:{$value:"#52271f",$type:"color"},onErrorContainer:{$value:"#f1cec5",$type:"color"},tertiary:{$value:"#9bb56b",$type:"color"},onTertiary:{$value:"#1c2412",$type:"color"},tertiaryContainer:{$value:"#34461e",$type:"color"},onTertiaryContainer:{$value:"#e3ecd0",$type:"color"}},font:gr.font,spacing:gr.spacing,shape:gr.shape,motion:gr.motion,accessibility:{...at.dark,focusRing:{...at.dark.focusRing,color:{$type:"color",$value:"#d6896c"}}},zIndex:Qt},RE={light:ME,dark:OE},mr={font:{family:{sans:{$value:'"Inter Variable", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',$type:"fontFamily"},mono:{$value:'"JetBrains Mono", "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace',$type:"fontFamily"}},size:{sm:{$value:"0.8125rem",$type:"dimension"},base:{$value:"0.9375rem",$type:"dimension"},lg:{$value:"1.0625rem",$type:"dimension"},xl:{$value:"1.3125rem",$type:"dimension"},"2xl":{$value:"1.75rem",$type:"dimension"}},weight:{normal:{$value:"400",$type:"fontWeight"},medium:{$value:"500",$type:"fontWeight"},semibold:{$value:"600",$type:"fontWeight"},bold:{$value:"680",$type:"fontWeight"}},lineHeight:{tight:{$value:"1.1",$type:"number"},normal:{$value:"1.55",$type:"number"},relaxed:{$value:"1.7",$type:"number"}}},spacing:{1:{$value:"0.25rem",$type:"dimension"},2:{$value:"0.5rem",$type:"dimension"},3:{$value:"0.75rem",$type:"dimension"},4:{$value:"1rem",$type:"dimension"},5:{$value:"1.25rem",$type:"dimension"},6:{$value:"1.5rem",$type:"dimension"},8:{$value:"2rem",$type:"dimension"},10:{$value:"2.5rem",$type:"dimension"},12:{$value:"3rem",$type:"dimension"},xs:{$value:"0.25rem",$type:"dimension"},sm:{$value:"0.5rem",$type:"dimension"},md:{$value:"1rem",$type:"dimension"},lg:{$value:"1.5rem",$type:"dimension"},xl:{$value:"2rem",$type:"dimension"},"2xl":{$value:"3rem",$type:"dimension"}},shape:{radius:{sm:{$value:"0.5rem",$type:"dimension"},md:{$value:"0.875rem",$type:"dimension"},lg:{$value:"1.125rem",$type:"dimension"},xl:{$value:"1.5rem",$type:"dimension"},full:{$value:"9999px",$type:"dimension"}},shadow:{sm:{$value:"0 1px 2px color-mix(in srgb, var(--ggui-color-primary-500) 6%, transparent)",$type:"shadow"},md:{$value:"0 1px 3px rgba(21, 19, 31, 0.06), 0 8px 24px -6px color-mix(in srgb, var(--ggui-color-primary-500) 16%, transparent)",$type:"shadow"},lg:{$value:"0 2px 6px rgba(21, 19, 31, 0.05), 0 20px 40px -10px color-mix(in srgb, var(--ggui-color-primary-500) 22%, transparent)",$type:"shadow"},xl:{$value:"0 4px 10px rgba(21, 19, 31, 0.04), 0 32px 64px -16px color-mix(in srgb, var(--ggui-color-primary-500) 28%, transparent)",$type:"shadow"}}},motion:{duration:{fast:{$value:"150ms",$type:"duration"},normal:{$value:"250ms",$type:"duration"},slow:{$value:"420ms",$type:"duration"},ambient:{$value:"8000ms",$type:"duration"}},easing:{default:{$value:"cubic-bezier(0.32, 0.72, 0, 1)",$type:"cubicBezier"},spring:{$value:"cubic-bezier(0.16, 1, 0.3, 1)",$type:"cubicBezier"}},keyframes:{entrance:{$value:"0%{opacity:0;transform:translateY(6px)}100%{opacity:1;transform:none}",$type:"keyframes"}},transition:Fc}},AE={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"}},DE={$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:{...AE},neutral:{50:{$value:"#fafaf7",$type:"color"},100:{$value:"#f4f4f0",$type:"color"},200:{$value:"#e8e7e3",$type:"color"},300:{$value:"#d4d3cf",$type:"color"},400:{$value:"#9c9ba0",$type:"color"},500:{$value:"#6e6d74",$type:"color"},600:{$value:"#4a4954",$type:"color"},700:{$value:"#322f3e",$type:"color"},800:{$value:"#211f2c",$type:"color"},900:{$value:"#15131f",$type:"color"}},success:{50:{$value:"#ecfdf5",$type:"color"},100:{$value:"#d1fae5",$type:"color"},200:{$value:"#a7f3d0",$type:"color"},500:{$value:"#0e9d6e",$type:"color"},600:{$value:"#0b8259",$type:"color"},700:{$value:"#086847",$type:"color"},800:{$value:"#064e36",$type:"color"}},warning:{50:{$value:"#fff8eb",$type:"color"},100:{$value:"#fdecc8",$type:"color"},200:{$value:"#fbd897",$type:"color"},500:{$value:"#e08515",$type:"color"},600:{$value:"#b86b0e",$type:"color"},700:{$value:"#90530a",$type:"color"},800:{$value:"#6b3d07",$type:"color"}},error:{50:{$value:"#fef2f4",$type:"color"},100:{$value:"#fde2e7",$type:"color"},200:{$value:"#fbc5cf",$type:"color"},500:{$value:"#dc2845",$type:"color"},600:{$value:"#b81f38",$type:"color"},700:{$value:"#94182d",$type:"color"},800:{$value:"#701222",$type:"color"}},info:{50:{$value:"#ecfeff",$type:"color"},100:{$value:"#cffafe",$type:"color"},200:{$value:"#a5f3fc",$type:"color"},500:{$value:"#0891b2",$type:"color"},600:{$value:"#0e7490",$type:"color"},700:{$value:"#155e75",$type:"color"},800:{$value:"#164e63",$type:"color"}},surface:{$value:"#fafaf7",$type:"color"},onSurface:{$value:"#15131f",$type:"color"},surfaceVariant:{$value:"#f4f4f0",$type:"color"},onSurfaceVariant:{$value:"#4a4954",$type:"color"},container:{$value:"#eef2ff",$type:"color"},onContainer:{$value:"#1e1b4b",$type:"color"},outline:{$value:"#d4d3cf",$type:"color"},outlineVariant:{$value:"#e8e7e3",$type:"color"},onPrimary:{$value:"#fafaf7",$type:"color"},primaryContainer:{$value:"#eef2ff",$type:"color"},onPrimaryContainer:{$value:"#1e1b4b",$type:"color"},onError:{$value:"#fafaf7",$type:"color"},errorContainer:{$value:"#fde2e7",$type:"color"},onErrorContainer:{$value:"#701222",$type:"color"},tertiary:{$value:"#7c3aed",$type:"color"},onTertiary:{$value:"#fafaf7",$type:"color"},tertiaryContainer:{$value:"#ede9fe",$type:"color"},onTertiaryContainer:{$value:"#4c1d95",$type:"color"}},font:mr.font,spacing:mr.spacing,shape:mr.shape,motion:mr.motion,accessibility:{...at.light,focusRing:{...at.light.focusRing,color:{$type:"color",$value:"#4f46e5"}}},zIndex:Qt},UE={$name:"Indigo",$description:"Flagship ggui preset (dark) — refined electric indigo on rich midnight. Premium, restrained, distinctive.",$metadata:{font:"inter",philosophy:"Looks like a deliberate aesthetic choice. Linear/Arc/Vercel-grade restraint with one confident accent."},color:{primary:{50:{$value:"#1e1b4b",$type:"color"},100:{$value:"#312e81",$type:"color"},200:{$value:"#3730a3",$type:"color"},300:{$value:"#4338ca",$type:"color"},400:{$value:"#4f46e5",$type:"color"},500:{$value:"#818cf8",$type:"color"},600:{$value:"#a5b4fc",$type:"color"},700:{$value:"#c7d2fe",$type:"color"},800:{$value:"#e0e7ff",$type:"color"},900:{$value:"#eef2ff",$type:"color"}},neutral:{50:{$value:"#0c0b14",$type:"color"},100:{$value:"#15131f",$type:"color"},200:{$value:"#1d1b29",$type:"color"},300:{$value:"#2a2839",$type:"color"},400:{$value:"#3e3c50",$type:"color"},500:{$value:"#5e5c70",$type:"color"},600:{$value:"#8b8898",$type:"color"},700:{$value:"#b8b6c2",$type:"color"},800:{$value:"#dcdbe2",$type:"color"},900:{$value:"#f5f4f9",$type:"color"}},success:{50:{$value:"#022c1d",$type:"color"},100:{$value:"#064e36",$type:"color"},200:{$value:"#086847",$type:"color"},500:{$value:"#34d399",$type:"color"},600:{$value:"#6ee7b7",$type:"color"},700:{$value:"#a7f3d0",$type:"color"},800:{$value:"#d1fae5",$type:"color"}},warning:{50:{$value:"#3a2104",$type:"color"},100:{$value:"#6b3d07",$type:"color"},200:{$value:"#90530a",$type:"color"},500:{$value:"#f59e0b",$type:"color"},600:{$value:"#fbbf24",$type:"color"},700:{$value:"#fcd34d",$type:"color"},800:{$value:"#fde68a",$type:"color"}},error:{50:{$value:"#3b0a14",$type:"color"},100:{$value:"#701222",$type:"color"},200:{$value:"#94182d",$type:"color"},500:{$value:"#fb7185",$type:"color"},600:{$value:"#fda4af",$type:"color"},700:{$value:"#fecdd3",$type:"color"},800:{$value:"#ffe4e6",$type:"color"}},info:{50:{$value:"#083344",$type:"color"},100:{$value:"#164e63",$type:"color"},200:{$value:"#155e75",$type:"color"},500:{$value:"#22d3ee",$type:"color"},600:{$value:"#67e8f9",$type:"color"},700:{$value:"#a5f3fc",$type:"color"},800:{$value:"#cffafe",$type:"color"}},surface:{$value:"#15131f",$type:"color"},onSurface:{$value:"#f5f4f9",$type:"color"},surfaceVariant:{$value:"#221e35",$type:"color"},onSurfaceVariant:{$value:"#c8c6d2",$type:"color"},container:{$value:"#312e81",$type:"color"},onContainer:{$value:"#eef2ff",$type:"color"},outline:{$value:"#3e3c50",$type:"color"},outlineVariant:{$value:"#2a2839",$type:"color"},onPrimary:{$value:"#0c0b14",$type:"color"},primaryContainer:{$value:"#312e81",$type:"color"},onPrimaryContainer:{$value:"#e0e7ff",$type:"color"},onError:{$value:"#3b0a14",$type:"color"},errorContainer:{$value:"#701222",$type:"color"},onErrorContainer:{$value:"#fecdd3",$type:"color"},tertiary:{$value:"#a78bfa",$type:"color"},onTertiary:{$value:"#2e1065",$type:"color"},tertiaryContainer:{$value:"#4c1d95",$type:"color"},onTertiaryContainer:{$value:"#ede9fe",$type:"color"}},font:mr.font,spacing:mr.spacing,shape:mr.shape,motion:mr.motion,accessibility:{...at.dark,focusRing:{...at.dark.focusRing,color:{$type:"color",$value:"#818cf8"}}},zIndex:Qt},IE={light:DE,dark:UE},_1={font:{family:{sans:{$value:'"DM Sans", system-ui, -apple-system, sans-serif',$type:"fontFamily"},mono:{$value:'"JetBrains Mono", ui-monospace, monospace',$type:"fontFamily"}},size:{sm:{$value:"0.875rem",$type:"dimension"},base:{$value:"1rem",$type:"dimension"},lg:{$value:"1.125rem",$type:"dimension"},xl:{$value:"1.25rem",$type:"dimension"},"2xl":{$value:"1.5rem",$type:"dimension"}},weight:{normal:{$value:"400",$type:"fontWeight"},medium:{$value:"500",$type:"fontWeight"},semibold:{$value:"600",$type:"fontWeight"},bold:{$value:"700",$type:"fontWeight"}},lineHeight:{tight:{$value:"1.25",$type:"number"},normal:{$value:"1.5",$type:"number"},relaxed:{$value:"1.75",$type:"number"}}},spacing:{1:{$value:"0.25rem",$type:"dimension"},2:{$value:"0.5rem",$type:"dimension"},3:{$value:"0.75rem",$type:"dimension"},4:{$value:"1rem",$type:"dimension"},5:{$value:"1.25rem",$type:"dimension"},6:{$value:"1.5rem",$type:"dimension"},8:{$value:"2rem",$type:"dimension"},10:{$value:"2.5rem",$type:"dimension"},12:{$value:"3rem",$type:"dimension"}},motion:{duration:{fast:{$value:"120ms",$type:"duration"},normal:{$value:"200ms",$type:"duration"},slow:{$value:"400ms",$type:"duration"},ambient:{$value:"2000ms",$type:"duration"}},easing:{default:{$value:"cubic-bezier(0.4, 0, 0.2, 1)",$type:"cubicBezier"},bounce:{$value:"cubic-bezier(0.68, -0.55, 0.27, 1.55)",$type:"cubicBezier"},spring:{$value:"cubic-bezier(0.22, 1, 0.36, 1)",$type:"cubicBezier"}},transition:{fast:{$value:"120ms cubic-bezier(0.4, 0, 0.2, 1)",$type:"transition"},normal:{$value:"200ms cubic-bezier(0.4, 0, 0.2, 1)",$type:"transition"},slow:{$value:"400ms cubic-bezier(0.4, 0, 0.2, 1)",$type:"transition"},colors:{$value:"color 200ms cubic-bezier(0.4, 0, 0.2, 1), background-color 200ms cubic-bezier(0.4, 0, 0.2, 1), border-color 200ms cubic-bezier(0.4, 0, 0.2, 1)",$type:"transition"},opacity:{$value:"opacity 200ms cubic-bezier(0.4, 0, 0.2, 1)",$type:"transition"},transform:{$value:"transform 200ms cubic-bezier(0.22, 1, 0.36, 1)",$type:"transition"}},keyframes:{"fade-in":{$value:"0%{opacity:0}100%{opacity:1}",$type:"keyframes"},"slide-up":{$value:"0%{opacity:0;transform:translateY(8px)}100%{opacity:1;transform:translateY(0)}",$type:"keyframes"},"pulse-soft":{$value:"0%{opacity:1}50%{opacity:0.65}100%{opacity:1}",$type:"keyframes"}}},accessibility:{focusRing:{color:{$value:"#B8FF3A",$type:"color"},width:{$value:"2px",$type:"dimension"},offset:{$value:"2px",$type:"dimension"}},reducedMotion:{duration:{$value:"0ms",$type:"duration"}},highContrast:{borderWidth:{$value:"2px",$type:"dimension"},textColor:{$value:"#FFFFFF",$type:"color"},backgroundColor:{$value:"#000000",$type:"color"},linkColor:{$value:"#CCFF66",$type:"color"}}},zIndex:Qt},j1={sm:{$value:"0.375rem",$type:"dimension"},md:{$value:"0.5rem",$type:"dimension"},lg:{$value:"0.75rem",$type:"dimension"},xl:{$value:"1rem",$type:"dimension"},full:{$value:"9999px",$type:"dimension"}},BE={sm:{$value:"0 1px 2px rgba(0, 0, 0, 0.2)",$type:"shadow"},md:{$value:"0 2px 8px rgba(0, 0, 0, 0.25)",$type:"shadow"},lg:{$value:"0 6px 16px rgba(0, 0, 0, 0.28)",$type:"shadow"},xl:{$value:"0 10px 24px rgba(0, 0, 0, 0.3)",$type:"shadow"}},LE={sm:{$value:"0 1px 2px rgba(26, 29, 36, 0.06)",$type:"shadow"},md:{$value:"0 2px 8px rgba(26, 29, 36, 0.08)",$type:"shadow"},lg:{$value:"0 6px 16px rgba(26, 29, 36, 0.1)",$type:"shadow"},xl:{$value:"0 12px 28px rgba(26, 29, 36, 0.12)",$type:"shadow"}},S1={$name:"guuey-brand-v1",$description:"The guuey product brand (dark) — slate-ink surfaces, slime #B8FF3A accent, DM Sans.",$metadata:{font:"DM Sans",fontUrl:"https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap",philosophy:"Agent-native. Slime on slate.",frameless:!0},color:{primary:{50:{$value:"#141D05",$type:"color"},100:{$value:"#28390B",$type:"color"},200:{$value:"#3F5A11",$type:"color"},300:{$value:"#5F8719",$type:"color"},400:{$value:"#8CC627",$type:"color"},500:{$value:"#B8FF3A",$type:"color"},600:{$value:"#CCFF66",$type:"color"},700:{$value:"#DBFF8F",$type:"color"},800:{$value:"#E9FFB8",$type:"color"},900:{$value:"#F6FFE0",$type:"color"}},neutral:{50:{$value:"#0E1014",$type:"color"},100:{$value:"#1A1D24",$type:"color"},200:{$value:"#232630",$type:"color"},300:{$value:"#242938",$type:"color"},400:{$value:"#3B4152",$type:"color"},500:{$value:"#878C99",$type:"color"},600:{$value:"#B7BAC4",$type:"color"},700:{$value:"#D5D6DC",$type:"color"},800:{$value:"#E8E7E2",$type:"color"},900:{$value:"#F6F5EE",$type:"color"}},success:{50:{$value:"#141D05",$type:"color"},100:{$value:"#28390B",$type:"color"},200:{$value:"#3F5A11",$type:"color"},500:{$value:"#B8FF3A",$type:"color"},600:{$value:"#CCFF66",$type:"color"},700:{$value:"#DBFF8F",$type:"color"},800:{$value:"#E9FFB8",$type:"color"}},warning:{50:{$value:"#33240A",$type:"color"},100:{$value:"#5C420F",$type:"color"},200:{$value:"#8A6318",$type:"color"},500:{$value:"#FFB020",$type:"color"},600:{$value:"#FFC24D",$type:"color"},700:{$value:"#FFD37D",$type:"color"},800:{$value:"#FFE5AE",$type:"color"}},error:{50:{$value:"#33110E",$type:"color"},100:{$value:"#5E1F1B",$type:"color"},200:{$value:"#8F2F2A",$type:"color"},500:{$value:"#FF5B5B",$type:"color"},600:{$value:"#FF7D7A",$type:"color"},700:{$value:"#FF9F9C",$type:"color"},800:{$value:"#FFC3C0",$type:"color"}},info:{50:{$value:"#0A2733",$type:"color"},100:{$value:"#12455C",$type:"color"},200:{$value:"#1E6A8A",$type:"color"},500:{$value:"#3AC8FF",$type:"color"},600:{$value:"#66D4FF",$type:"color"},700:{$value:"#92E0FF",$type:"color"},800:{$value:"#BFECFF",$type:"color"}},surface:{$value:"#1A1D24",$type:"color"},onSurface:{$value:"#F6F5EE",$type:"color"},surfaceVariant:{$value:"#242938",$type:"color"},onSurfaceVariant:{$value:"#B7BAC4",$type:"color"},container:{$value:"#232630",$type:"color"},onContainer:{$value:"#F6F5EE",$type:"color"},outline:{$value:"rgba(246, 245, 238, 0.14)",$type:"color"},outlineVariant:{$value:"rgba(246, 245, 238, 0.1)",$type:"color"},onPrimary:{$value:"#0E1014",$type:"color"},primaryContainer:{$value:"#242938",$type:"color"},onPrimaryContainer:{$value:"#CCFF66",$type:"color"},onError:{$value:"#33110E",$type:"color"},errorContainer:{$value:"#5E1F1B",$type:"color"},onErrorContainer:{$value:"#FFC3C0",$type:"color"},tertiary:{$value:"#FF4FB0",$type:"color"},onTertiary:{$value:"#0E1014",$type:"color"},tertiaryContainer:{$value:"#451A35",$type:"color"},onTertiaryContainer:{$value:"#FFC1E4",$type:"color"}},..._1,shape:{radius:j1,shadow:BE}},FE={$name:"guuey-brand-v1",$description:"The guuey product brand (light, provisional) — paper surfaces, slime accent held for fills, darkened slime for text emphasis.",$metadata:S1.$metadata,color:{primary:{50:{$value:"#F6FFE0",$type:"color"},100:{$value:"#E9FFB8",$type:"color"},200:{$value:"#DBFF8F",$type:"color"},300:{$value:"#CCFF66",$type:"color"},400:{$value:"#B8FF3A",$type:"color"},500:{$value:"#9FE01C",$type:"color"},600:{$value:"#7DB214",$type:"color"},700:{$value:"#5C850D",$type:"color"},800:{$value:"#3F5A11",$type:"color"},900:{$value:"#28390B",$type:"color"}},neutral:{50:{$value:"#FBFAF6",$type:"color"},100:{$value:"#F6F5EE",$type:"color"},200:{$value:"#E8E7E2",$type:"color"},300:{$value:"#D5D6DC",$type:"color"},400:{$value:"#B7BAC4",$type:"color"},500:{$value:"#6E7380",$type:"color"},600:{$value:"#4A4F5C",$type:"color"},700:{$value:"#333846",$type:"color"},800:{$value:"#242938",$type:"color"},900:{$value:"#1A1D24",$type:"color"}},success:{50:{$value:"#F6FFE0",$type:"color"},100:{$value:"#E9FFB8",$type:"color"},200:{$value:"#DBFF8F",$type:"color"},500:{$value:"#7DB214",$type:"color"},600:{$value:"#5C850D",$type:"color"},700:{$value:"#476809",$type:"color"},800:{$value:"#28390B",$type:"color"}},warning:{50:{$value:"#FFF4DD",$type:"color"},100:{$value:"#FFE5AE",$type:"color"},200:{$value:"#FFD37D",$type:"color"},500:{$value:"#D98A0A",$type:"color"},600:{$value:"#A96A06",$type:"color"},700:{$value:"#7C4D04",$type:"color"},800:{$value:"#523203",$type:"color"}},error:{50:{$value:"#FFE9E8",$type:"color"},100:{$value:"#FFC3C0",$type:"color"},200:{$value:"#FF9F9C",$type:"color"},500:{$value:"#E23B3B",$type:"color"},600:{$value:"#B62C2C",$type:"color"},700:{$value:"#8A1F1F",$type:"color"},800:{$value:"#5E1F1B",$type:"color"}},info:{50:{$value:"#E5F7FF",$type:"color"},100:{$value:"#BFECFF",$type:"color"},200:{$value:"#92E0FF",$type:"color"},500:{$value:"#0E93C9",$type:"color"},600:{$value:"#0B739E",$type:"color"},700:{$value:"#085572",$type:"color"},800:{$value:"#12455C",$type:"color"}},surface:{$value:"#FFFFFF",$type:"color"},onSurface:{$value:"#1A1D24",$type:"color"},surfaceVariant:{$value:"#F6F5EE",$type:"color"},onSurfaceVariant:{$value:"#4A4F5C",$type:"color"},container:{$value:"#FBFAF6",$type:"color"},onContainer:{$value:"#1A1D24",$type:"color"},outline:{$value:"rgba(26, 29, 36, 0.18)",$type:"color"},outlineVariant:{$value:"rgba(26, 29, 36, 0.10)",$type:"color"},onPrimary:{$value:"#0E1014",$type:"color"},primaryContainer:{$value:"#E9FFB8",$type:"color"},onPrimaryContainer:{$value:"#28390B",$type:"color"},onError:{$value:"#FFFFFF",$type:"color"},errorContainer:{$value:"#FFE9E8",$type:"color"},onErrorContainer:{$value:"#8A1F1F",$type:"color"},tertiary:{$value:"#D6247F",$type:"color"},onTertiary:{$value:"#FFFFFF",$type:"color"},tertiaryContainer:{$value:"#FFDCEE",$type:"color"},onTertiaryContainer:{$value:"#6B1240",$type:"color"}},..._1,shape:{radius:j1,shadow:LE}},VE={light:FE,dark:S1},w1=new Map([["ggui",yE],["indigo",IE],["claudic",RE],["premium-cyberpunk",bE],["premium-zen",jE],["premium-neon-noir",kE],["premium-botanical",zE],["guuey-brand-v1",VE]]);function HE(e,n){return n==="dark"&&e.dark?"dark":"light"}function k1(e,n="light"){const o=w1.get(e);return o?HE(o,n)==="dark"?o.dark:o.light:void 0}function qE(){const e=[];for(const[n,o]of w1){const l=o.dark?["light","dark"]:["light"];e.push({id:n,name:o.light.$name,description:o.light.$description,metadata:o.light.$metadata,modes:l})}return e}D.createContext(null);function PE(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 ZE(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 GE(){var _;const e=D.useMemo(()=>qE(),[]),n=((_=e[0])==null?void 0:_.id)??"ggui",[o,l]=D.useState({kind:"loading"}),[c,u]=D.useState(n),[d,p]=D.useState("light"),[g,h]=D.useState(!1),[y,v]=D.useState(null),[j,k]=D.useState(!1),[x,z]=D.useState({}),E=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){Le(`/admin-login?next=${encodeURIComponent("/admin/theme")}`);return}if(!S.ok){l({kind:"error",message:`server returned ${S.status}`});return}const C=await S.json();l({kind:"ready",data:C});const U=PE(C.current,n);u(U.presetId),p(U.mode),k(U.fromFile),z({...U.overrides})}catch(S){l({kind:"error",message:String(S)})}};D.useEffect(()=>{E()},[]);const w=(S,C)=>{z(U=>{const te={...U};return C===null||C===""?delete te[S]:te[S]=C,te})},$=()=>{z({})},N=async S=>{if(o.kind==="ready"){v(null),h(!0);try{const C=await S.text();let U;try{U=JSON.parse(C)}catch(Y){v(`upload failed — file is not valid JSON: ${String(Y)}`);return}const te=S.name.replace(/[^a-zA-Z0-9._-]/g,"-"),Z=/\.json$/i.test(te)?te:`${te}.json`,V=await fetch("/ggui/console/theme/upload",{method:"POST",credentials:"include",headers:{"content-type":"application/json",accept:"application/json"},body:JSON.stringify({filename:Z,content:U,mode:d})});if(V.status===401){Le(`/admin-login?next=${encodeURIComponent("/admin/theme")}`);return}if(V.status===400){const Y=await V.json();v(Y.message??`upload rejected — ${Y.error??"invalid_content"}: ${JSON.stringify(Y.issue)}`);return}if(V.status===501){const Y=await V.json();v(Y.message??"Theme uploads need the CLI’s themeFileUploader — launch via `ggui serve`.");return}if(!V.ok){v(`upload failed — server returned ${V.status}`);return}await E()}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(ZE(c,d,x))});if(S.status===401){Le(`/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 E()}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(YE,{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 YE({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 z=e.find(N=>N.id===n),E=(z==null?void 0:z.modes.includes("dark"))??!1,w=o==="dark"&&!E?"light":o,$=k1(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:!E,title:E?"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(ez,{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(XE,{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(WE,{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(tz,{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 KE(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 JE="https://github.com/ggui-ai/ggui/blob/main/design/CUSTOM_THEMES.md";function XE({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:JE,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 WE({rawTheme:e,overrides:n,onSetOverride:o,onClearAll:l}){const c=D.useMemo(()=>KE(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(QE,{path:p.path,presetValue:p.value,overrideValue:n[p.path]??null,onChange:o},p.path))})]},d.prefix))]})}function QE({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 ez({preset:e,selected:n,mode:o,onSelect:l}){var g;const c=e.modes.includes("dark"),u=k1(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 N1(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 tz({presetId:e,mode:n,rawTheme:o,overrides:l}){const c=D.useMemo(()=>`ggui-theme-preview-${e}-${n}`,[e,n]),u=D.useMemo(()=>{const d=N1(o,l),p=gE(e,d);return`${p.cssVariables.replace(/^:root\s*\{/,`.${c} {`)}
|
|
227
|
-
${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(az,{presetName:o.$name,mode:n}),i.jsx(nz,{}),i.jsx(rz,{}),i.jsx(iz,{}),i.jsx(oz,{theme:o,overrides:l}),i.jsx(lz,{})]})]})}function az({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 nz(){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 rz(){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 iz(){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 oz({theme:e,overrides:n}){const o=D.useMemo(()=>N1(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 lz(){const e=(n,o)=>i.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:"var(--ggui-font-size-sm, 0.875rem)"},children:[i.jsx("span",{"aria-hidden":!0,style:{width:12,height:12,borderRadius:"50%",background:n,border:"1px solid var(--ggui-color-outline)"}}),i.jsx("span",{style:{color:"var(--ggui-color-onSurfaceVariant)"},children:o})]});return i.jsxs("section",{style:{display:"flex",gap:16,flexWrap:"wrap"},children:[e("var(--ggui-color-success-500)","success"),e("var(--ggui-color-warning-500)","warning"),e("var(--ggui-color-error-500)","error"),e("var(--ggui-color-info-500)","info")]})}const E1={kind:"admin-index"};function sz(){return typeof window>"u"?E1:lx(window.location.pathname)}function cz(){return E1}function uz(){const e=D.useSyncExternalStore(sx,sz,cz);return e.kind==="blueprint"?i.jsx(Vt,{route:e,variant:"narrow",children:i.jsx(pN,{blueprintId:e.blueprintId})}):e.kind==="admin-index"||e.kind==="admin-status"?i.jsx(Vt,{route:e,variant:"admin",children:i.jsx(aE,{})}):e.kind==="admin-sessions"?i.jsx(Vt,{route:e,variant:"admin",children:i.jsx(X7,{})}):e.kind==="admin-blueprints"?i.jsx(Vt,{route:e,variant:"admin",children:i.jsx(yN,{})}):e.kind==="admin-variants"?i.jsx(Vt,{route:e,variant:"admin",children:i.jsx(VN,{})}):e.kind==="admin-variant-detail"?i.jsx(Vt,{route:e,variant:"admin",children:i.jsx(DN,{contractHash:e.contractHash})}):e.kind==="admin-variant-generate"?i.jsx(Vt,{route:e,variant:"admin",children:i.jsx(IN,{contractHash:e.contractHash})}):e.kind==="admin-config"?i.jsx(Vt,{route:e,variant:"admin",children:i.jsx(KN,{})}):e.kind==="admin-tools"?i.jsx(Vt,{route:e,variant:"admin",children:i.jsx(Y7,{})}):e.kind==="admin-llm-keys"?i.jsx(Vt,{route:e,variant:"admin",children:i.jsx(wx,{})}):e.kind==="admin-connector-keys"?i.jsx(Vt,{route:e,variant:"admin",children:i.jsx(H7,{})}):e.kind==="admin-oauth-providers"?i.jsx(Vt,{route:e,variant:"admin",children:i.jsx(zx,{})}):e.kind==="admin-clients"?i.jsx(Vt,{route:e,variant:"admin",children:i.jsx(HN,{})}):e.kind==="admin-theme"?i.jsx(Vt,{route:e,variant:"admin",children:i.jsx(GE,{})}):e.kind==="admin-login"?i.jsx(Vt,{route:e,variant:"narrow",children:i.jsx(_x,{})}):Lv(e)?i.jsx(Vt,{route:e,variant:"devtools",children:i.jsx(V7,{route:e})}):i.jsx(Vt,{route:e,variant:"narrow",children:i.jsx(dz,{pathname:e.pathname})})}function dz({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:()=>Le("/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:()=>Le("/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 z1=document.getElementById("root");if(!z1)throw new Error("console: #root element missing from index.html");ix.createRoot(z1).render(i.jsx(D.StrictMode,{children:i.jsx(uz,{})}));export{al as g,ax as r};
|