@ggui-ai/console 0.2.0-alpha.4 → 0.4.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,221 @@
1
+ var bb=Object.defineProperty;var xb=(e,n,o)=>n in e?bb(e,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[n]=o;var cn=(e,n,o)=>xb(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 f of u.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&l(f)}).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 el(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ld={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 Mm;function _b(){if(Mm)return Ho;Mm=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function o(l,c,u){var f=null;if(u!==void 0&&(f=""+u),c.key!==void 0&&(f=""+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:f,ref:c!==void 0?c:null,props:u}}return Ho.Fragment=n,Ho.jsx=o,Ho.jsxs=o,Ho}var Rm;function jb(){return Rm||(Rm=1,Ld.exports=_b()),Ld.exports}var r=jb(),Vd={exports:{}},Ee={};/**
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 Om;function Sb(){if(Om)return Ee;Om=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"),f=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.iterator;function S(A){return A===null||typeof A!="object"?null:(A=v&&A[v]||A["@@iterator"],typeof A=="function"?A:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,E={};function z(A,D,ee){this.props=A,this.context=D,this.refs=E,this.updater=ee||N}z.prototype.isReactComponent={},z.prototype.setState=function(A,D){if(typeof A!="object"&&typeof A!="function"&&A!=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,A,D,"setState")},z.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function k(){}k.prototype=z.prototype;function $(A,D,ee){this.props=A,this.context=D,this.refs=E,this.updater=ee||N}var w=$.prototype=new k;w.constructor=$,x(w,z.prototype),w.isPureReactComponent=!0;var R=Array.isArray,b={H:null,A:null,T:null,S:null},j=Object.prototype.hasOwnProperty;function T(A,D,ee,B,C,L){return ee=L.ref,{$$typeof:e,type:A,key:D,ref:ee!==void 0?ee:null,props:L}}function O(A,D){return T(A.type,D,void 0,void 0,void 0,A.props)}function V(A){return typeof A=="object"&&A!==null&&A.$$typeof===e}function F(A){var D={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(ee){return D[ee]})}var H=/\/+/g;function Q(A,D){return typeof A=="object"&&A!==null&&A.key!=null?F(""+A.key):D.toString(36)}function ue(){}function de(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(ue,ue):(A.status="pending",A.then(function(D){A.status==="pending"&&(A.status="fulfilled",A.value=D)},function(D){A.status==="pending"&&(A.status="rejected",A.reason=D)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function je(A,D,ee,B,C){var L=typeof A;(L==="undefined"||L==="boolean")&&(A=null);var W=!1;if(A===null)W=!0;else switch(L){case"bigint":case"string":case"number":W=!0;break;case"object":switch(A.$$typeof){case e:case n:W=!0;break;case y:return W=A._init,je(W(A._payload),D,ee,B,C)}}if(W)return C=C(A),W=B===""?"."+Q(A,0):B,R(C)?(ee="",W!=null&&(ee=W.replace(H,"$&/")+"/"),je(C,D,ee,"",function(we){return we})):C!=null&&(V(C)&&(C=O(C,ee+(C.key==null||A&&A.key===C.key?"":(""+C.key).replace(H,"$&/")+"/")+W)),D.push(C)),1;W=0;var me=B===""?".":B+":";if(R(A))for(var fe=0;fe<A.length;fe++)B=A[fe],L=me+Q(B,fe),W+=je(B,D,ee,L,C);else if(fe=S(A),typeof fe=="function")for(A=fe.call(A),fe=0;!(B=A.next()).done;)B=B.value,L=me+Q(B,fe++),W+=je(B,D,ee,L,C);else if(L==="object"){if(typeof A.then=="function")return je(de(A),D,ee,B,C);throw D=String(A),Error("Objects are not valid as a React child (found: "+(D==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":D)+"). If you meant to render a collection of children, use an array instead.")}return W}function ce(A,D,ee){if(A==null)return A;var B=[],C=0;return je(A,B,"","",function(L){return D.call(ee,L,C++)}),B}function $e(A){if(A._status===-1){var D=A._result;D=D(),D.then(function(ee){(A._status===0||A._status===-1)&&(A._status=1,A._result=ee)},function(ee){(A._status===0||A._status===-1)&&(A._status=2,A._result=ee)}),A._status===-1&&(A._status=0,A._result=D)}if(A._status===1)return A._result.default;throw A._result}var ge=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var D=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(D))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)};function Ae(){}return Ee.Children={map:ce,forEach:function(A,D,ee){ce(A,function(){D.apply(this,arguments)},ee)},count:function(A){var D=0;return ce(A,function(){D++}),D},toArray:function(A){return ce(A,function(D){return D})||[]},only:function(A){if(!V(A))throw Error("React.Children.only expected to receive a single React element child.");return A}},Ee.Component=z,Ee.Fragment=o,Ee.Profiler=c,Ee.PureComponent=$,Ee.StrictMode=l,Ee.Suspense=g,Ee.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=b,Ee.act=function(){throw Error("act(...) is not supported in production builds of React.")},Ee.cache=function(A){return function(){return A.apply(null,arguments)}},Ee.cloneElement=function(A,D,ee){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var B=x({},A.props),C=A.key,L=void 0;if(D!=null)for(W in D.ref!==void 0&&(L=void 0),D.key!==void 0&&(C=""+D.key),D)!j.call(D,W)||W==="key"||W==="__self"||W==="__source"||W==="ref"&&D.ref===void 0||(B[W]=D[W]);var W=arguments.length-2;if(W===1)B.children=ee;else if(1<W){for(var me=Array(W),fe=0;fe<W;fe++)me[fe]=arguments[fe+2];B.children=me}return T(A.type,C,void 0,void 0,L,B)},Ee.createContext=function(A){return A={$$typeof:f,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:u,_context:A},A},Ee.createElement=function(A,D,ee){var B,C={},L=null;if(D!=null)for(B in D.key!==void 0&&(L=""+D.key),D)j.call(D,B)&&B!=="key"&&B!=="__self"&&B!=="__source"&&(C[B]=D[B]);var W=arguments.length-2;if(W===1)C.children=ee;else if(1<W){for(var me=Array(W),fe=0;fe<W;fe++)me[fe]=arguments[fe+2];C.children=me}if(A&&A.defaultProps)for(B in W=A.defaultProps,W)C[B]===void 0&&(C[B]=W[B]);return T(A,L,void 0,void 0,null,C)},Ee.createRef=function(){return{current:null}},Ee.forwardRef=function(A){return{$$typeof:p,render:A}},Ee.isValidElement=V,Ee.lazy=function(A){return{$$typeof:y,_payload:{_status:-1,_result:A},_init:$e}},Ee.memo=function(A,D){return{$$typeof:h,type:A,compare:D===void 0?null:D}},Ee.startTransition=function(A){var D=b.T,ee={};b.T=ee;try{var B=A(),C=b.S;C!==null&&C(ee,B),typeof B=="object"&&B!==null&&typeof B.then=="function"&&B.then(Ae,ge)}catch(L){ge(L)}finally{b.T=D}},Ee.unstable_useCacheRefresh=function(){return b.H.useCacheRefresh()},Ee.use=function(A){return b.H.use(A)},Ee.useActionState=function(A,D,ee){return b.H.useActionState(A,D,ee)},Ee.useCallback=function(A,D){return b.H.useCallback(A,D)},Ee.useContext=function(A){return b.H.useContext(A)},Ee.useDebugValue=function(){},Ee.useDeferredValue=function(A,D){return b.H.useDeferredValue(A,D)},Ee.useEffect=function(A,D){return b.H.useEffect(A,D)},Ee.useId=function(){return b.H.useId()},Ee.useImperativeHandle=function(A,D,ee){return b.H.useImperativeHandle(A,D,ee)},Ee.useInsertionEffect=function(A,D){return b.H.useInsertionEffect(A,D)},Ee.useLayoutEffect=function(A,D){return b.H.useLayoutEffect(A,D)},Ee.useMemo=function(A,D){return b.H.useMemo(A,D)},Ee.useOptimistic=function(A,D){return b.H.useOptimistic(A,D)},Ee.useReducer=function(A,D,ee){return b.H.useReducer(A,D,ee)},Ee.useRef=function(A){return b.H.useRef(A)},Ee.useState=function(A){return b.H.useState(A)},Ee.useSyncExternalStore=function(A,D,ee){return b.H.useSyncExternalStore(A,D,ee)},Ee.useTransition=function(){return b.H.useTransition()},Ee.version="19.0.0",Ee}var Am;function zf(){return Am||(Am=1,Vd.exports=Sb()),Vd.exports}var I=zf();const uc=el(I);var Hd={exports:{}},Bo={},Bd={exports:{}},qd={};/**
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 Dm;function wb(){return Dm||(Dm=1,(function(e){function n(ce,$e){var ge=ce.length;ce.push($e);e:for(;0<ge;){var Ae=ge-1>>>1,A=ce[Ae];if(0<c(A,$e))ce[Ae]=$e,ce[ge]=A,ge=Ae;else break e}}function o(ce){return ce.length===0?null:ce[0]}function l(ce){if(ce.length===0)return null;var $e=ce[0],ge=ce.pop();if(ge!==$e){ce[0]=ge;e:for(var Ae=0,A=ce.length,D=A>>>1;Ae<D;){var ee=2*(Ae+1)-1,B=ce[ee],C=ee+1,L=ce[C];if(0>c(B,ge))C<A&&0>c(L,B)?(ce[Ae]=L,ce[C]=ge,Ae=C):(ce[Ae]=B,ce[ee]=ge,Ae=ee);else if(C<A&&0>c(L,ge))ce[Ae]=L,ce[C]=ge,Ae=C;else break e}}return $e}function c(ce,$e){var ge=ce.sortIndex-$e.sortIndex;return ge!==0?ge:ce.id-$e.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 f=Date,p=f.now();e.unstable_now=function(){return f.now()-p}}var g=[],h=[],y=1,v=null,S=3,N=!1,x=!1,E=!1,z=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,$=typeof setImmediate<"u"?setImmediate:null;function w(ce){for(var $e=o(h);$e!==null;){if($e.callback===null)l(h);else if($e.startTime<=ce)l(h),$e.sortIndex=$e.expirationTime,n(g,$e);else break;$e=o(h)}}function R(ce){if(E=!1,w(ce),!x)if(o(g)!==null)x=!0,de();else{var $e=o(h);$e!==null&&je(R,$e.startTime-ce)}}var b=!1,j=-1,T=5,O=-1;function V(){return!(e.unstable_now()-O<T)}function F(){if(b){var ce=e.unstable_now();O=ce;var $e=!0;try{e:{x=!1,E&&(E=!1,k(j),j=-1),N=!0;var ge=S;try{t:{for(w(ce),v=o(g);v!==null&&!(v.expirationTime>ce&&V());){var Ae=v.callback;if(typeof Ae=="function"){v.callback=null,S=v.priorityLevel;var A=Ae(v.expirationTime<=ce);if(ce=e.unstable_now(),typeof A=="function"){v.callback=A,w(ce),$e=!0;break t}v===o(g)&&l(g),w(ce)}else l(g);v=o(g)}if(v!==null)$e=!0;else{var D=o(h);D!==null&&je(R,D.startTime-ce),$e=!1}}break e}finally{v=null,S=ge,N=!1}$e=void 0}}finally{$e?H():b=!1}}}var H;if(typeof $=="function")H=function(){$(F)};else if(typeof MessageChannel<"u"){var Q=new MessageChannel,ue=Q.port2;Q.port1.onmessage=F,H=function(){ue.postMessage(null)}}else H=function(){z(F,0)};function de(){b||(b=!0,H())}function je(ce,$e){j=z(function(){ce(e.unstable_now())},$e)}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(ce){ce.callback=null},e.unstable_continueExecution=function(){x||N||(x=!0,de())},e.unstable_forceFrameRate=function(ce){0>ce||125<ce?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<ce?Math.floor(1e3/ce):5},e.unstable_getCurrentPriorityLevel=function(){return S},e.unstable_getFirstCallbackNode=function(){return o(g)},e.unstable_next=function(ce){switch(S){case 1:case 2:case 3:var $e=3;break;default:$e=S}var ge=S;S=$e;try{return ce()}finally{S=ge}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(ce,$e){switch(ce){case 1:case 2:case 3:case 4:case 5:break;default:ce=3}var ge=S;S=ce;try{return $e()}finally{S=ge}},e.unstable_scheduleCallback=function(ce,$e,ge){var Ae=e.unstable_now();switch(typeof ge=="object"&&ge!==null?(ge=ge.delay,ge=typeof ge=="number"&&0<ge?Ae+ge:Ae):ge=Ae,ce){case 1:var A=-1;break;case 2:A=250;break;case 5:A=1073741823;break;case 4:A=1e4;break;default:A=5e3}return A=ge+A,ce={id:y++,callback:$e,priorityLevel:ce,startTime:ge,expirationTime:A,sortIndex:-1},ge>Ae?(ce.sortIndex=ge,n(h,ce),o(g)===null&&ce===o(h)&&(E?(k(j),j=-1):E=!0,je(R,ge-Ae))):(ce.sortIndex=A,n(g,ce),x||N||(x=!0,de())),ce},e.unstable_shouldYield=V,e.unstable_wrapCallback=function(ce){var $e=S;return function(){var ge=S;S=$e;try{return ce.apply(this,arguments)}finally{S=ge}}}})(qd)),qd}var Um;function kb(){return Um||(Um=1,Bd.exports=wb()),Bd.exports}var Pd={exports:{}},qt={};/**
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 Im;function Nb(){if(Im)return qt;Im=1;var e=zf();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 f=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 qt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=l,qt.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)},qt.flushSync=function(g){var h=f.T,y=l.p;try{if(f.T=null,l.p=2,g)return g()}finally{f.T=h,l.p=y,l.d.f()}},qt.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))},qt.prefetchDNS=function(g){typeof g=="string"&&l.d.D(g)},qt.preinit=function(g,h){if(typeof g=="string"&&h&&typeof h.as=="string"){var y=h.as,v=p(y,h.crossOrigin),S=typeof h.integrity=="string"?h.integrity:void 0,N=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:S,fetchPriority:N}):y==="script"&&l.d.X(g,{crossOrigin:v,integrity:S,fetchPriority:N,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},qt.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)},qt.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})}},qt.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)},qt.requestFormReset=function(g){l.d.r(g)},qt.unstable_batchedUpdates=function(g,h){return g(h)},qt.useFormState=function(g,h,y){return f.H.useFormState(g,h,y)},qt.useFormStatus=function(){return f.H.useHostTransitionStatus()},qt.version="19.0.0",qt}var Lm;function zb(){if(Lm)return Pd.exports;Lm=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(),Pd.exports=Nb(),Pd.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 Vm;function Eb(){if(Vm)return Bo;Vm=1;var e=kb(),n=zf(),o=zb();function l(t){var a="https://react.dev/errors/"+t;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)a+="&args[]="+encodeURIComponent(arguments[i])}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)}var u=Symbol.for("react.element"),f=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),h=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),v=Symbol.for("react.provider"),S=Symbol.for("react.consumer"),N=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),z=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),w=Symbol.for("react.offscreen"),R=Symbol.for("react.memo_cache_sentinel"),b=Symbol.iterator;function j(t){return t===null||typeof t!="object"?null:(t=b&&t[b]||t["@@iterator"],typeof t=="function"?t:null)}var T=Symbol.for("react.client.reference");function O(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===T?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case g:return"Fragment";case p:return"Portal";case y:return"Profiler";case h:return"StrictMode";case E:return"Suspense";case z:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case N:return(t.displayName||"Context")+".Provider";case S:return(t._context.displayName||"Context")+".Consumer";case x:var a=t.render;return t=t.displayName,t||(t=a.displayName||a.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case k:return a=t.displayName||null,a!==null?a:O(t.type)||"Memo";case $:a=t._payload,t=t._init;try{return O(t(a))}catch{}}return null}var V=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=Object.assign,H,Q;function ue(t){if(H===void 0)try{throw Error()}catch(i){var a=i.stack.trim().match(/\n( *(at )?)/);H=a&&a[1]||"",Q=-1<i.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+H+t+Q}var de=!1;function je(t,a){if(!t||de)return"";de=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(a){var le=function(){throw Error()};if(Object.defineProperty(le.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(le,[])}catch(ae){var te=ae}Reflect.construct(t,[],le)}else{try{le.call()}catch(ae){te=ae}t.call(le.prototype)}}else{try{throw Error()}catch(ae){te=ae}(le=t())&&typeof le.catch=="function"&&le.catch(function(){})}}catch(ae){if(ae&&te&&typeof ae.stack=="string")return[ae.stack,te.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=s.DetermineComponentFrameRoot(),_=m[0],M=m[1];if(_&&M){var U=_.split(`
44
+ `),P=M.split(`
45
+ `);for(d=s=0;s<U.length&&!U[s].includes("DetermineComponentFrameRoot");)s++;for(;d<P.length&&!P[d].includes("DetermineComponentFrameRoot");)d++;if(s===U.length||d===P.length)for(s=U.length-1,d=P.length-1;1<=s&&0<=d&&U[s]!==P[d];)d--;for(;1<=s&&0<=d;s--,d--)if(U[s]!==P[d]){if(s!==1||d!==1)do if(s--,d--,0>d||U[s]!==P[d]){var re=`
46
+ `+U[s].replace(" at new "," at ");return t.displayName&&re.includes("<anonymous>")&&(re=re.replace("<anonymous>",t.displayName)),re}while(1<=s&&0<=d);break}}}finally{de=!1,Error.prepareStackTrace=i}return(i=t?t.displayName||t.name:"")?ue(i):""}function ce(t){switch(t.tag){case 26:case 27:case 5:return ue(t.type);case 16:return ue("Lazy");case 13:return ue("Suspense");case 19:return ue("SuspenseList");case 0:case 15:return t=je(t.type,!1),t;case 11:return t=je(t.type.render,!1),t;case 1:return t=je(t.type,!0),t;default:return""}}function $e(t){try{var a="";do a+=ce(t),t=t.return;while(t);return a}catch(i){return`
47
+ Error generating stack: `+i.message+`
48
+ `+i.stack}}function ge(t){var a=t,i=t;if(t.alternate)for(;a.return;)a=a.return;else{t=a;do a=t,(a.flags&4098)!==0&&(i=a.return),t=a.return;while(t)}return a.tag===3?i:null}function Ae(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 A(t){if(ge(t)!==t)throw Error(l(188))}function D(t){var a=t.alternate;if(!a){if(a=ge(t),a===null)throw Error(l(188));return a!==t?null:t}for(var i=t,s=a;;){var d=i.return;if(d===null)break;var m=d.alternate;if(m===null){if(s=d.return,s!==null){i=s;continue}break}if(d.child===m.child){for(m=d.child;m;){if(m===i)return A(d),t;if(m===s)return A(d),a;m=m.sibling}throw Error(l(188))}if(i.return!==s.return)i=d,s=m;else{for(var _=!1,M=d.child;M;){if(M===i){_=!0,i=d,s=m;break}if(M===s){_=!0,s=d,i=m;break}M=M.sibling}if(!_){for(M=m.child;M;){if(M===i){_=!0,i=m,s=d;break}if(M===s){_=!0,s=m,i=d;break}M=M.sibling}if(!_)throw Error(l(189))}}if(i.alternate!==s)throw Error(l(190))}if(i.tag!==3)throw Error(l(188));return i.stateNode.current===i?t:a}function ee(t){var a=t.tag;if(a===5||a===26||a===27||a===6)return t;for(t=t.child;t!==null;){if(a=ee(t),a!==null)return a;t=t.sibling}return null}var B=Array.isArray,C=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L={pending:!1,data:null,method:null,action:null},W=[],me=-1;function fe(t){return{current:t}}function we(t){0>me||(t.current=W[me],W[me]=null,me--)}function be(t,a){me++,W[me]=t.current,t.current=a}var Z=fe(null),J=fe(null),ie=fe(null),pe=fe(null);function ve(t,a){switch(be(ie,a),be(J,t),be(Z,null),t=a.nodeType,t){case 9:case 11:a=(a=a.documentElement)&&(a=a.namespaceURI)?lm(a):0;break;default:if(t=t===8?a.parentNode:a,a=t.tagName,t=t.namespaceURI)t=lm(t),a=sm(t,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}we(Z),be(Z,a)}function Ne(){we(Z),we(J),we(ie)}function pt(t){t.memoizedState!==null&&be(pe,t);var a=Z.current,i=sm(a,t.type);a!==i&&(be(J,t),be(Z,i))}function Vt(t){J.current===t&&(we(Z),we(J)),pe.current===t&&(we(pe),Do._currentValue=L)}var zt=Object.prototype.hasOwnProperty,Et=e.unstable_scheduleCallback,gt=e.unstable_cancelCallback,yn=e.unstable_shouldYield,Qt=e.unstable_requestPaint,ea=e.unstable_now,qi=e.unstable_getCurrentPriorityLevel,vn=e.unstable_ImmediatePriority,Gr=e.unstable_UserBlockingPriority,hr=e.unstable_NormalPriority,rl=e.unstable_LowPriority,il=e.unstable_IdlePriority,a$=e.log,n$=e.unstable_setDisableYieldValue,Pi=null,sa=null;function r$(t){if(sa&&typeof sa.onCommitFiberRoot=="function")try{sa.onCommitFiberRoot(Pi,t,void 0,(t.current.flags&128)===128)}catch{}}function $n(t){if(typeof a$=="function"&&n$(t),sa&&typeof sa.setStrictMode=="function")try{sa.setStrictMode(Pi,t)}catch{}}var ca=Math.clz32?Math.clz32:l$,i$=Math.log,o$=Math.LN2;function l$(t){return t>>>=0,t===0?32:31-(i$(t)/o$|0)|0}var ol=128,ll=4194304;function yr(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:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194176;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 sl(t,a){var i=t.pendingLanes;if(i===0)return 0;var s=0,d=t.suspendedLanes,m=t.pingedLanes,_=t.warmLanes;t=t.finishedLanes!==0;var M=i&134217727;return M!==0?(i=M&~d,i!==0?s=yr(i):(m&=M,m!==0?s=yr(m):t||(_=M&~_,_!==0&&(s=yr(_))))):(M=i&~d,M!==0?s=yr(M):m!==0?s=yr(m):t||(_=i&~_,_!==0&&(s=yr(_)))),s===0?0:a!==0&&a!==s&&(a&d)===0&&(d=s&-s,_=a&-a,d>=_||d===32&&(_&4194176)!==0)?a:s}function Zi(t,a){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&a)===0}function s$(t,a){switch(t){case 1:case 2:case 4:case 8:return a+250;case 16:case 32:case 64: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 Qf(){var t=ol;return ol<<=1,(ol&4194176)===0&&(ol=128),t}function ep(){var t=ll;return ll<<=1,(ll&62914560)===0&&(ll=4194304),t}function Oc(t){for(var a=[],i=0;31>i;i++)a.push(t);return a}function Gi(t,a){t.pendingLanes|=a,a!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function c$(t,a,i,s,d,m){var _=t.pendingLanes;t.pendingLanes=i,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=i,t.entangledLanes&=i,t.errorRecoveryDisabledLanes&=i,t.shellSuspendCounter=0;var M=t.entanglements,U=t.expirationTimes,P=t.hiddenUpdates;for(i=_&~i;0<i;){var re=31-ca(i),le=1<<re;M[re]=0,U[re]=-1;var te=P[re];if(te!==null)for(P[re]=null,re=0;re<te.length;re++){var ae=te[re];ae!==null&&(ae.lane&=-536870913)}i&=~le}s!==0&&tp(t,s,0),m!==0&&d===0&&t.tag!==0&&(t.suspendedLanes|=m&~(_&~a))}function tp(t,a,i){t.pendingLanes|=a,t.suspendedLanes&=~a;var s=31-ca(a);t.entangledLanes|=a,t.entanglements[s]=t.entanglements[s]|1073741824|i&4194218}function ap(t,a){var i=t.entangledLanes|=a;for(t=t.entanglements;i;){var s=31-ca(i),d=1<<s;d&a|t[s]&a&&(t[s]|=a),i&=~d}}function np(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function rp(){var t=C.p;return t!==0?t:(t=window.event,t===void 0?32:km(t.type))}function u$(t,a){var i=C.p;try{return C.p=t,a()}finally{C.p=i}}var bn=Math.random().toString(36).slice(2),Ht="__reactFiber$"+bn,ta="__reactProps$"+bn,Fr="__reactContainer$"+bn,Ac="__reactEvents$"+bn,d$="__reactListeners$"+bn,f$="__reactHandles$"+bn,ip="__reactResources$"+bn,Fi="__reactMarker$"+bn;function Dc(t){delete t[Ht],delete t[ta],delete t[Ac],delete t[d$],delete t[f$]}function vr(t){var a=t[Ht];if(a)return a;for(var i=t.parentNode;i;){if(a=i[Fr]||i[Ht]){if(i=a.alternate,a.child!==null||i!==null&&i.child!==null)for(t=dm(t);t!==null;){if(i=t[Ht])return i;t=dm(t)}return a}t=i,i=t.parentNode}return null}function Yr(t){if(t=t[Ht]||t[Fr]){var a=t.tag;if(a===5||a===6||a===13||a===26||a===27||a===3)return t}return null}function Yi(t){var a=t.tag;if(a===5||a===26||a===27||a===6)return t.stateNode;throw Error(l(33))}function Kr(t){var a=t[ip];return a||(a=t[ip]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function Ct(t){t[Fi]=!0}var op=new Set,lp={};function $r(t,a){Wr(t,a),Wr(t+"Capture",a)}function Wr(t,a){for(lp[t]=a,t=0;t<a.length;t++)op.add(a[t])}var Za=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p$=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]*$"),sp={},cp={};function g$(t){return zt.call(cp,t)?!0:zt.call(sp,t)?!1:p$.test(t)?cp[t]=!0:(sp[t]=!0,!1)}function cl(t,a,i){if(g$(a))if(i===null)t.removeAttribute(a);else{switch(typeof i){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,""+i)}}function ul(t,a,i){if(i===null)t.removeAttribute(a);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}t.setAttribute(a,""+i)}}function Ga(t,a,i,s){if(s===null)t.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(i);return}t.setAttributeNS(a,i,""+s)}}function ya(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function up(t){var a=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function m$(t){var a=up(t)?"checked":"value",i=Object.getOwnPropertyDescriptor(t.constructor.prototype,a),s=""+t[a];if(!t.hasOwnProperty(a)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var d=i.get,m=i.set;return Object.defineProperty(t,a,{configurable:!0,get:function(){return d.call(this)},set:function(_){s=""+_,m.call(this,_)}}),Object.defineProperty(t,a,{enumerable:i.enumerable}),{getValue:function(){return s},setValue:function(_){s=""+_},stopTracking:function(){t._valueTracker=null,delete t[a]}}}}function dl(t){t._valueTracker||(t._valueTracker=m$(t))}function dp(t){if(!t)return!1;var a=t._valueTracker;if(!a)return!0;var i=a.getValue(),s="";return t&&(s=up(t)?t.checked?"true":"false":t.value),t=s,t!==i?(a.setValue(t),!0):!1}function fl(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 h$=/[\n"\\]/g;function va(t){return t.replace(h$,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function Uc(t,a,i,s,d,m,_,M){t.name="",_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?t.type=_:t.removeAttribute("type"),a!=null?_==="number"?(a===0&&t.value===""||t.value!=a)&&(t.value=""+ya(a)):t.value!==""+ya(a)&&(t.value=""+ya(a)):_!=="submit"&&_!=="reset"||t.removeAttribute("value"),a!=null?Ic(t,_,ya(a)):i!=null?Ic(t,_,ya(i)):s!=null&&t.removeAttribute("value"),d==null&&m!=null&&(t.defaultChecked=!!m),d!=null&&(t.checked=d&&typeof d!="function"&&typeof d!="symbol"),M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?t.name=""+ya(M):t.removeAttribute("name")}function fp(t,a,i,s,d,m,_,M){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(t.type=m),a!=null||i!=null){if(!(m!=="submit"&&m!=="reset"||a!=null))return;i=i!=null?""+ya(i):"",a=a!=null?""+ya(a):i,M||a===t.value||(t.value=a),t.defaultValue=a}s=s??d,s=typeof s!="function"&&typeof s!="symbol"&&!!s,t.checked=M?t.checked:!!s,t.defaultChecked=!!s,_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(t.name=_)}function Ic(t,a,i){a==="number"&&fl(t.ownerDocument)===t||t.defaultValue===""+i||(t.defaultValue=""+i)}function Xr(t,a,i,s){if(t=t.options,a){a={};for(var d=0;d<i.length;d++)a["$"+i[d]]=!0;for(i=0;i<t.length;i++)d=a.hasOwnProperty("$"+t[i].value),t[i].selected!==d&&(t[i].selected=d),d&&s&&(t[i].defaultSelected=!0)}else{for(i=""+ya(i),a=null,d=0;d<t.length;d++){if(t[d].value===i){t[d].selected=!0,s&&(t[d].defaultSelected=!0);return}a!==null||t[d].disabled||(a=t[d])}a!==null&&(a.selected=!0)}}function pp(t,a,i){if(a!=null&&(a=""+ya(a),a!==t.value&&(t.value=a),i==null)){t.defaultValue!==a&&(t.defaultValue=a);return}t.defaultValue=i!=null?""+ya(i):""}function gp(t,a,i,s){if(a==null){if(s!=null){if(i!=null)throw Error(l(92));if(B(s)){if(1<s.length)throw Error(l(93));s=s[0]}i=s}i==null&&(i=""),a=i}i=ya(a),t.defaultValue=i,s=t.textContent,s===i&&s!==""&&s!==null&&(t.value=s)}function Jr(t,a){if(a){var i=t.firstChild;if(i&&i===t.lastChild&&i.nodeType===3){i.nodeValue=a;return}}t.textContent=a}var y$=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 mp(t,a,i){var s=a.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?s?t.setProperty(a,""):a==="float"?t.cssFloat="":t[a]="":s?t.setProperty(a,i):typeof i!="number"||i===0||y$.has(a)?a==="float"?t.cssFloat=i:t[a]=(""+i).trim():t[a]=i+"px"}function hp(t,a,i){if(a!=null&&typeof a!="object")throw Error(l(62));if(t=t.style,i!=null){for(var s in i)!i.hasOwnProperty(s)||a!=null&&a.hasOwnProperty(s)||(s.indexOf("--")===0?t.setProperty(s,""):s==="float"?t.cssFloat="":t[s]="");for(var d in a)s=a[d],a.hasOwnProperty(d)&&i[d]!==s&&mp(t,d,s)}else for(var m in a)a.hasOwnProperty(m)&&mp(t,m,a[m])}function Lc(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 v$=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"]]),$$=/^[\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 pl(t){return $$.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}var Vc=null;function Hc(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Qr=null,ei=null;function yp(t){var a=Yr(t);if(a&&(t=a.stateNode)){var i=t[ta]||null;e:switch(t=a.stateNode,a.type){case"input":if(Uc(t,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),a=i.name,i.type==="radio"&&a!=null){for(i=t;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+va(""+a)+'"][type="radio"]'),a=0;a<i.length;a++){var s=i[a];if(s!==t&&s.form===t.form){var d=s[ta]||null;if(!d)throw Error(l(90));Uc(s,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(a=0;a<i.length;a++)s=i[a],s.form===t.form&&dp(s)}break e;case"textarea":pp(t,i.value,i.defaultValue);break e;case"select":a=i.value,a!=null&&Xr(t,!!i.multiple,a,!1)}}}var Bc=!1;function vp(t,a,i){if(Bc)return t(a,i);Bc=!0;try{var s=t(a);return s}finally{if(Bc=!1,(Qr!==null||ei!==null)&&(Wl(),Qr&&(a=Qr,t=ei,ei=Qr=null,yp(a),t)))for(a=0;a<t.length;a++)yp(t[a])}}function Ki(t,a){var i=t.stateNode;if(i===null)return null;var s=i[ta]||null;if(s===null)return null;i=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(i&&typeof i!="function")throw Error(l(231,a,typeof i));return i}var qc=!1;if(Za)try{var Wi={};Object.defineProperty(Wi,"passive",{get:function(){qc=!0}}),window.addEventListener("test",Wi,Wi),window.removeEventListener("test",Wi,Wi)}catch{qc=!1}var xn=null,Pc=null,gl=null;function $p(){if(gl)return gl;var t,a=Pc,i=a.length,s,d="value"in xn?xn.value:xn.textContent,m=d.length;for(t=0;t<i&&a[t]===d[t];t++);var _=i-t;for(s=1;s<=_&&a[i-s]===d[m-s];s++);return gl=d.slice(t,1<s?1-s:void 0)}function ml(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 hl(){return!0}function bp(){return!1}function aa(t){function a(i,s,d,m,_){this._reactName=i,this._targetInst=d,this.type=s,this.nativeEvent=m,this.target=_,this.currentTarget=null;for(var M in t)t.hasOwnProperty(M)&&(i=t[M],this[M]=i?i(m):m[M]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?hl:bp,this.isPropagationStopped=bp,this}return F(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=hl)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=hl)},persist:function(){},isPersistent:hl}),a}var br={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},yl=aa(br),Xi=F({},br,{view:0,detail:0}),b$=aa(Xi),Zc,Gc,Ji,vl=F({},Xi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Yc,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!==Ji&&(Ji&&t.type==="mousemove"?(Zc=t.screenX-Ji.screenX,Gc=t.screenY-Ji.screenY):Gc=Zc=0,Ji=t),Zc)},movementY:function(t){return"movementY"in t?t.movementY:Gc}}),xp=aa(vl),x$=F({},vl,{dataTransfer:0}),_$=aa(x$),j$=F({},Xi,{relatedTarget:0}),Fc=aa(j$),S$=F({},br,{animationName:0,elapsedTime:0,pseudoElement:0}),w$=aa(S$),k$=F({},br,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),N$=aa(k$),z$=F({},br,{data:0}),_p=aa(z$),E$={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},C$={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"},T$={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function M$(t){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(t):(t=T$[t])?!!a[t]:!1}function Yc(){return M$}var R$=F({},Xi,{key:function(t){if(t.key){var a=E$[t.key]||t.key;if(a!=="Unidentified")return a}return t.type==="keypress"?(t=ml(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?C$[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Yc,charCode:function(t){return t.type==="keypress"?ml(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?ml(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),O$=aa(R$),A$=F({},vl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),jp=aa(A$),D$=F({},Xi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Yc}),U$=aa(D$),I$=F({},br,{propertyName:0,elapsedTime:0,pseudoElement:0}),L$=aa(I$),V$=F({},vl,{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}),H$=aa(V$),B$=F({},br,{newState:0,oldState:0}),q$=aa(B$),P$=[9,13,27,32],Kc=Za&&"CompositionEvent"in window,Qi=null;Za&&"documentMode"in document&&(Qi=document.documentMode);var Z$=Za&&"TextEvent"in window&&!Qi,Sp=Za&&(!Kc||Qi&&8<Qi&&11>=Qi),wp=" ",kp=!1;function Np(t,a){switch(t){case"keyup":return P$.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 ti=!1;function G$(t,a){switch(t){case"compositionend":return zp(a);case"keypress":return a.which!==32?null:(kp=!0,wp);case"textInput":return t=a.data,t===wp&&kp?null:t;default:return null}}function F$(t,a){if(ti)return t==="compositionend"||!Kc&&Np(t,a)?(t=$p(),gl=Pc=xn=null,ti=!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 Sp&&a.locale!=="ko"?null:a.data;default:return null}}var Y$={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 Ep(t){var a=t&&t.nodeName&&t.nodeName.toLowerCase();return a==="input"?!!Y$[t.type]:a==="textarea"}function Cp(t,a,i,s){Qr?ei?ei.push(s):ei=[s]:Qr=s,a=ts(a,"onChange"),0<a.length&&(i=new yl("onChange","change",null,i,s),t.push({event:i,listeners:a}))}var eo=null,to=null;function K$(t){am(t,0)}function $l(t){var a=Yi(t);if(dp(a))return t}function Tp(t,a){if(t==="change")return a}var Mp=!1;if(Za){var Wc;if(Za){var Xc="oninput"in document;if(!Xc){var Rp=document.createElement("div");Rp.setAttribute("oninput","return;"),Xc=typeof Rp.oninput=="function"}Wc=Xc}else Wc=!1;Mp=Wc&&(!document.documentMode||9<document.documentMode)}function Op(){eo&&(eo.detachEvent("onpropertychange",Ap),to=eo=null)}function Ap(t){if(t.propertyName==="value"&&$l(to)){var a=[];Cp(a,to,t,Hc(t)),vp(K$,a)}}function W$(t,a,i){t==="focusin"?(Op(),eo=a,to=i,eo.attachEvent("onpropertychange",Ap)):t==="focusout"&&Op()}function X$(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return $l(to)}function J$(t,a){if(t==="click")return $l(a)}function Q$(t,a){if(t==="input"||t==="change")return $l(a)}function e2(t,a){return t===a&&(t!==0||1/t===1/a)||t!==t&&a!==a}var ua=typeof Object.is=="function"?Object.is:e2;function ao(t,a){if(ua(t,a))return!0;if(typeof t!="object"||t===null||typeof a!="object"||a===null)return!1;var i=Object.keys(t),s=Object.keys(a);if(i.length!==s.length)return!1;for(s=0;s<i.length;s++){var d=i[s];if(!zt.call(a,d)||!ua(t[d],a[d]))return!1}return!0}function Dp(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Up(t,a){var i=Dp(t);t=0;for(var s;i;){if(i.nodeType===3){if(s=t+i.textContent.length,t<=a&&s>=a)return{node:i,offset:a-t};t=s}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Dp(i)}}function Ip(t,a){return t&&a?t===a?!0:t&&t.nodeType===3?!1:a&&a.nodeType===3?Ip(t,a.parentNode):"contains"in t?t.contains(a):t.compareDocumentPosition?!!(t.compareDocumentPosition(a)&16):!1:!1}function Lp(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var a=fl(t.document);a instanceof t.HTMLIFrameElement;){try{var i=typeof a.contentWindow.location.href=="string"}catch{i=!1}if(i)t=a.contentWindow;else break;a=fl(t.document)}return a}function Jc(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")}function t2(t,a){var i=Lp(a);a=t.focusedElem;var s=t.selectionRange;if(i!==a&&a&&a.ownerDocument&&Ip(a.ownerDocument.documentElement,a)){if(s!==null&&Jc(a)){if(t=s.start,i=s.end,i===void 0&&(i=t),"selectionStart"in a)a.selectionStart=t,a.selectionEnd=Math.min(i,a.value.length);else if(i=(t=a.ownerDocument||document)&&t.defaultView||window,i.getSelection){i=i.getSelection();var d=a.textContent.length,m=Math.min(s.start,d);s=s.end===void 0?m:Math.min(s.end,d),!i.extend&&m>s&&(d=s,s=m,m=d),d=Up(a,m);var _=Up(a,s);d&&_&&(i.rangeCount!==1||i.anchorNode!==d.node||i.anchorOffset!==d.offset||i.focusNode!==_.node||i.focusOffset!==_.offset)&&(t=t.createRange(),t.setStart(d.node,d.offset),i.removeAllRanges(),m>s?(i.addRange(t),i.extend(_.node,_.offset)):(t.setEnd(_.node,_.offset),i.addRange(t)))}}for(t=[],i=a;i=i.parentNode;)i.nodeType===1&&t.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a<t.length;a++)i=t[a],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var a2=Za&&"documentMode"in document&&11>=document.documentMode,ai=null,Qc=null,no=null,eu=!1;function Vp(t,a,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;eu||ai==null||ai!==fl(s)||(s=ai,"selectionStart"in s&&Jc(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}),no&&ao(no,s)||(no=s,s=ts(Qc,"onSelect"),0<s.length&&(a=new yl("onSelect","select",null,a,i),t.push({event:a,listeners:s}),a.target=ai)))}function xr(t,a){var i={};return i[t.toLowerCase()]=a.toLowerCase(),i["Webkit"+t]="webkit"+a,i["Moz"+t]="moz"+a,i}var ni={animationend:xr("Animation","AnimationEnd"),animationiteration:xr("Animation","AnimationIteration"),animationstart:xr("Animation","AnimationStart"),transitionrun:xr("Transition","TransitionRun"),transitionstart:xr("Transition","TransitionStart"),transitioncancel:xr("Transition","TransitionCancel"),transitionend:xr("Transition","TransitionEnd")},tu={},Hp={};Za&&(Hp=document.createElement("div").style,"AnimationEvent"in window||(delete ni.animationend.animation,delete ni.animationiteration.animation,delete ni.animationstart.animation),"TransitionEvent"in window||delete ni.transitionend.transition);function _r(t){if(tu[t])return tu[t];if(!ni[t])return t;var a=ni[t],i;for(i in a)if(a.hasOwnProperty(i)&&i in Hp)return tu[t]=a[i];return t}var Bp=_r("animationend"),qp=_r("animationiteration"),Pp=_r("animationstart"),n2=_r("transitionrun"),r2=_r("transitionstart"),i2=_r("transitioncancel"),Zp=_r("transitionend"),Gp=new Map,Fp="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 scrollEnd toggle touchMove waiting wheel".split(" ");function Ta(t,a){Gp.set(t,a),$r(a,[t])}var $a=[],ri=0,au=0;function bl(){for(var t=ri,a=au=ri=0;a<t;){var i=$a[a];$a[a++]=null;var s=$a[a];$a[a++]=null;var d=$a[a];$a[a++]=null;var m=$a[a];if($a[a++]=null,s!==null&&d!==null){var _=s.pending;_===null?d.next=d:(d.next=_.next,_.next=d),s.pending=d}m!==0&&Yp(i,d,m)}}function xl(t,a,i,s){$a[ri++]=t,$a[ri++]=a,$a[ri++]=i,$a[ri++]=s,au|=s,t.lanes|=s,t=t.alternate,t!==null&&(t.lanes|=s)}function nu(t,a,i,s){return xl(t,a,i,s),_l(t)}function _n(t,a){return xl(t,null,null,a),_l(t)}function Yp(t,a,i){t.lanes|=i;var s=t.alternate;s!==null&&(s.lanes|=i);for(var d=!1,m=t.return;m!==null;)m.childLanes|=i,s=m.alternate,s!==null&&(s.childLanes|=i),m.tag===22&&(t=m.stateNode,t===null||t._visibility&1||(d=!0)),t=m,m=m.return;d&&a!==null&&t.tag===3&&(m=t.stateNode,d=31-ca(i),m=m.hiddenUpdates,t=m[d],t===null?m[d]=[a]:t.push(a),a.lane=i|536870912)}function _l(t){if(50<Eo)throw Eo=0,cd=null,Error(l(185));for(var a=t.return;a!==null;)t=a,a=t.return;return t.tag===3?t.stateNode:null}var ii={},Kp=new WeakMap;function ba(t,a){if(typeof t=="object"&&t!==null){var i=Kp.get(t);return i!==void 0?i:(a={value:t,source:a,stack:$e(a)},Kp.set(t,a),a)}return{value:t,source:a,stack:$e(a)}}var oi=[],li=0,jl=null,Sl=0,xa=[],_a=0,jr=null,Fa=1,Ya="";function Sr(t,a){oi[li++]=Sl,oi[li++]=jl,jl=t,Sl=a}function Wp(t,a,i){xa[_a++]=Fa,xa[_a++]=Ya,xa[_a++]=jr,jr=t;var s=Fa;t=Ya;var d=32-ca(s)-1;s&=~(1<<d),i+=1;var m=32-ca(a)+d;if(30<m){var _=d-d%5;m=(s&(1<<_)-1).toString(32),s>>=_,d-=_,Fa=1<<32-ca(a)+d|i<<d|s,Ya=m+t}else Fa=1<<m|i<<d|s,Ya=t}function ru(t){t.return!==null&&(Sr(t,1),Wp(t,1,0))}function iu(t){for(;t===jl;)jl=oi[--li],oi[li]=null,Sl=oi[--li],oi[li]=null;for(;t===jr;)jr=xa[--_a],xa[_a]=null,Ya=xa[--_a],xa[_a]=null,Fa=xa[--_a],xa[_a]=null}var Ft=null,Ot=null,Pe=!1,Ma=null,Ua=!1,ou=Error(l(519));function wr(t){var a=Error(l(418,""));throw oo(ba(a,t)),ou}function Xp(t){var a=t.stateNode,i=t.type,s=t.memoizedProps;switch(a[Ht]=t,a[ta]=s,i){case"dialog":Le("cancel",a),Le("close",a);break;case"iframe":case"object":case"embed":Le("load",a);break;case"video":case"audio":for(i=0;i<To.length;i++)Le(To[i],a);break;case"source":Le("error",a);break;case"img":case"image":case"link":Le("error",a),Le("load",a);break;case"details":Le("toggle",a);break;case"input":Le("invalid",a),fp(a,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0),dl(a);break;case"select":Le("invalid",a);break;case"textarea":Le("invalid",a),gp(a,s.value,s.defaultValue,s.children),dl(a)}i=s.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||a.textContent===""+i||s.suppressHydrationWarning===!0||om(a.textContent,i)?(s.popover!=null&&(Le("beforetoggle",a),Le("toggle",a)),s.onScroll!=null&&Le("scroll",a),s.onScrollEnd!=null&&Le("scrollend",a),s.onClick!=null&&(a.onclick=as),a=!0):a=!1,a||wr(t)}function Jp(t){for(Ft=t.return;Ft;)switch(Ft.tag){case 3:case 27:Ua=!0;return;case 5:case 13:Ua=!1;return;default:Ft=Ft.return}}function ro(t){if(t!==Ft)return!1;if(!Pe)return Jp(t),Pe=!0,!1;var a=!1,i;if((i=t.tag!==3&&t.tag!==27)&&((i=t.tag===5)&&(i=t.type,i=!(i!=="form"&&i!=="button")||kd(t.type,t.memoizedProps)),i=!i),i&&(a=!0),a&&Ot&&wr(t),Jp(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(317));e:{for(t=t.nextSibling,a=0;t;){if(t.nodeType===8)if(i=t.data,i==="/$"){if(a===0){Ot=Oa(t.nextSibling);break e}a--}else i!=="$"&&i!=="$!"&&i!=="$?"||a++;t=t.nextSibling}Ot=null}}else Ot=Ft?Oa(t.stateNode.nextSibling):null;return!0}function io(){Ot=Ft=null,Pe=!1}function oo(t){Ma===null?Ma=[t]:Ma.push(t)}var lo=Error(l(460)),Qp=Error(l(474)),lu={then:function(){}};function e0(t){return t=t.status,t==="fulfilled"||t==="rejected"}function wl(){}function t0(t,a,i){switch(i=t[i],i===void 0?t.push(a):i!==a&&(a.then(wl,wl),a=i),a.status){case"fulfilled":return a.value;case"rejected":throw t=a.reason,t===lo?Error(l(483)):t;default:if(typeof a.status=="string")a.then(wl,wl);else{if(t=Je,t!==null&&100<t.shellSuspendCounter)throw Error(l(482));t=a,t.status="pending",t.then(function(s){if(a.status==="pending"){var d=a;d.status="fulfilled",d.value=s}},function(s){if(a.status==="pending"){var d=a;d.status="rejected",d.reason=s}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw t=a.reason,t===lo?Error(l(483)):t}throw so=a,lo}}var so=null;function a0(){if(so===null)throw Error(l(459));var t=so;return so=null,t}var si=null,co=0;function kl(t){var a=co;return co+=1,si===null&&(si=[]),t0(si,t,a)}function uo(t,a){a=a.props.ref,t.ref=a!==void 0?a:null}function Nl(t,a){throw a.$$typeof===u?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){var a=t._init;return a(t._payload)}function r0(t){function a(Y,q){if(t){var X=Y.deletions;X===null?(Y.deletions=[q],Y.flags|=16):X.push(q)}}function i(Y,q){if(!t)return null;for(;q!==null;)a(Y,q),q=q.sibling;return null}function s(Y){for(var q=new Map;Y!==null;)Y.key!==null?q.set(Y.key,Y):q.set(Y.index,Y),Y=Y.sibling;return q}function d(Y,q){return Y=On(Y,q),Y.index=0,Y.sibling=null,Y}function m(Y,q,X){return Y.index=X,t?(X=Y.alternate,X!==null?(X=X.index,X<q?(Y.flags|=33554434,q):X):(Y.flags|=33554434,q)):(Y.flags|=1048576,q)}function _(Y){return t&&Y.alternate===null&&(Y.flags|=33554434),Y}function M(Y,q,X,oe){return q===null||q.tag!==6?(q=td(X,Y.mode,oe),q.return=Y,q):(q=d(q,X),q.return=Y,q)}function U(Y,q,X,oe){var ye=X.type;return ye===g?re(Y,q,X.props.children,oe,X.key):q!==null&&(q.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===$&&n0(ye)===q.type)?(q=d(q,X.props),uo(q,X),q.return=Y,q):(q=Zl(X.type,X.key,X.props,null,Y.mode,oe),uo(q,X),q.return=Y,q)}function P(Y,q,X,oe){return q===null||q.tag!==4||q.stateNode.containerInfo!==X.containerInfo||q.stateNode.implementation!==X.implementation?(q=ad(X,Y.mode,oe),q.return=Y,q):(q=d(q,X.children||[]),q.return=Y,q)}function re(Y,q,X,oe,ye){return q===null||q.tag!==7?(q=Ar(X,Y.mode,oe,ye),q.return=Y,q):(q=d(q,X),q.return=Y,q)}function le(Y,q,X){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return q=td(""+q,Y.mode,X),q.return=Y,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case f:return X=Zl(q.type,q.key,q.props,null,Y.mode,X),uo(X,q),X.return=Y,X;case p:return q=ad(q,Y.mode,X),q.return=Y,q;case $:var oe=q._init;return q=oe(q._payload),le(Y,q,X)}if(B(q)||j(q))return q=Ar(q,Y.mode,X,null),q.return=Y,q;if(typeof q.then=="function")return le(Y,kl(q),X);if(q.$$typeof===N)return le(Y,Bl(Y,q),X);Nl(Y,q)}return null}function te(Y,q,X,oe){var ye=q!==null?q.key:null;if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return ye!==null?null:M(Y,q,""+X,oe);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case f:return X.key===ye?U(Y,q,X,oe):null;case p:return X.key===ye?P(Y,q,X,oe):null;case $:return ye=X._init,X=ye(X._payload),te(Y,q,X,oe)}if(B(X)||j(X))return ye!==null?null:re(Y,q,X,oe,null);if(typeof X.then=="function")return te(Y,q,kl(X),oe);if(X.$$typeof===N)return te(Y,q,Bl(Y,X),oe);Nl(Y,X)}return null}function ae(Y,q,X,oe,ye){if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return Y=Y.get(X)||null,M(q,Y,""+oe,ye);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case f:return Y=Y.get(oe.key===null?X:oe.key)||null,U(q,Y,oe,ye);case p:return Y=Y.get(oe.key===null?X:oe.key)||null,P(q,Y,oe,ye);case $:var De=oe._init;return oe=De(oe._payload),ae(Y,q,X,oe,ye)}if(B(oe)||j(oe))return Y=Y.get(X)||null,re(q,Y,oe,ye,null);if(typeof oe.then=="function")return ae(Y,q,X,kl(oe),ye);if(oe.$$typeof===N)return ae(Y,q,X,Bl(q,oe),ye);Nl(q,oe)}return null}function xe(Y,q,X,oe){for(var ye=null,De=null,Se=q,ke=q=0,Rt=null;Se!==null&&ke<X.length;ke++){Se.index>ke?(Rt=Se,Se=null):Rt=Se.sibling;var Ze=te(Y,Se,X[ke],oe);if(Ze===null){Se===null&&(Se=Rt);break}t&&Se&&Ze.alternate===null&&a(Y,Se),q=m(Ze,q,ke),De===null?ye=Ze:De.sibling=Ze,De=Ze,Se=Rt}if(ke===X.length)return i(Y,Se),Pe&&Sr(Y,ke),ye;if(Se===null){for(;ke<X.length;ke++)Se=le(Y,X[ke],oe),Se!==null&&(q=m(Se,q,ke),De===null?ye=Se:De.sibling=Se,De=Se);return Pe&&Sr(Y,ke),ye}for(Se=s(Se);ke<X.length;ke++)Rt=ae(Se,Y,ke,X[ke],oe),Rt!==null&&(t&&Rt.alternate!==null&&Se.delete(Rt.key===null?ke:Rt.key),q=m(Rt,q,ke),De===null?ye=Rt:De.sibling=Rt,De=Rt);return t&&Se.forEach(function(Hn){return a(Y,Hn)}),Pe&&Sr(Y,ke),ye}function ze(Y,q,X,oe){if(X==null)throw Error(l(151));for(var ye=null,De=null,Se=q,ke=q=0,Rt=null,Ze=X.next();Se!==null&&!Ze.done;ke++,Ze=X.next()){Se.index>ke?(Rt=Se,Se=null):Rt=Se.sibling;var Hn=te(Y,Se,Ze.value,oe);if(Hn===null){Se===null&&(Se=Rt);break}t&&Se&&Hn.alternate===null&&a(Y,Se),q=m(Hn,q,ke),De===null?ye=Hn:De.sibling=Hn,De=Hn,Se=Rt}if(Ze.done)return i(Y,Se),Pe&&Sr(Y,ke),ye;if(Se===null){for(;!Ze.done;ke++,Ze=X.next())Ze=le(Y,Ze.value,oe),Ze!==null&&(q=m(Ze,q,ke),De===null?ye=Ze:De.sibling=Ze,De=Ze);return Pe&&Sr(Y,ke),ye}for(Se=s(Se);!Ze.done;ke++,Ze=X.next())Ze=ae(Se,Y,ke,Ze.value,oe),Ze!==null&&(t&&Ze.alternate!==null&&Se.delete(Ze.key===null?ke:Ze.key),q=m(Ze,q,ke),De===null?ye=Ze:De.sibling=Ze,De=Ze);return t&&Se.forEach(function($b){return a(Y,$b)}),Pe&&Sr(Y,ke),ye}function dt(Y,q,X,oe){if(typeof X=="object"&&X!==null&&X.type===g&&X.key===null&&(X=X.props.children),typeof X=="object"&&X!==null){switch(X.$$typeof){case f:e:{for(var ye=X.key;q!==null;){if(q.key===ye){if(ye=X.type,ye===g){if(q.tag===7){i(Y,q.sibling),oe=d(q,X.props.children),oe.return=Y,Y=oe;break e}}else if(q.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===$&&n0(ye)===q.type){i(Y,q.sibling),oe=d(q,X.props),uo(oe,X),oe.return=Y,Y=oe;break e}i(Y,q);break}else a(Y,q);q=q.sibling}X.type===g?(oe=Ar(X.props.children,Y.mode,oe,X.key),oe.return=Y,Y=oe):(oe=Zl(X.type,X.key,X.props,null,Y.mode,oe),uo(oe,X),oe.return=Y,Y=oe)}return _(Y);case p:e:{for(ye=X.key;q!==null;){if(q.key===ye)if(q.tag===4&&q.stateNode.containerInfo===X.containerInfo&&q.stateNode.implementation===X.implementation){i(Y,q.sibling),oe=d(q,X.children||[]),oe.return=Y,Y=oe;break e}else{i(Y,q);break}else a(Y,q);q=q.sibling}oe=ad(X,Y.mode,oe),oe.return=Y,Y=oe}return _(Y);case $:return ye=X._init,X=ye(X._payload),dt(Y,q,X,oe)}if(B(X))return xe(Y,q,X,oe);if(j(X)){if(ye=j(X),typeof ye!="function")throw Error(l(150));return X=ye.call(X),ze(Y,q,X,oe)}if(typeof X.then=="function")return dt(Y,q,kl(X),oe);if(X.$$typeof===N)return dt(Y,q,Bl(Y,X),oe);Nl(Y,X)}return typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint"?(X=""+X,q!==null&&q.tag===6?(i(Y,q.sibling),oe=d(q,X),oe.return=Y,Y=oe):(i(Y,q),oe=td(X,Y.mode,oe),oe.return=Y,Y=oe),_(Y)):i(Y,q)}return function(Y,q,X,oe){try{co=0;var ye=dt(Y,q,X,oe);return si=null,ye}catch(Se){if(Se===lo)throw Se;var De=ka(29,Se,null,Y.mode);return De.lanes=oe,De.return=Y,De}finally{}}}var kr=r0(!0),i0=r0(!1),ci=fe(null),zl=fe(0);function o0(t,a){t=on,be(zl,t),be(ci,a),on=t|a.baseLanes}function su(){be(zl,on),be(ci,ci.current)}function cu(){on=zl.current,we(ci),we(zl)}var ja=fe(null),Ia=null;function jn(t){var a=t.alternate;be(wt,wt.current&1),be(ja,t),Ia===null&&(a===null||ci.current!==null||a.memoizedState!==null)&&(Ia=t)}function l0(t){if(t.tag===22){if(be(wt,wt.current),be(ja,t),Ia===null){var a=t.alternate;a!==null&&a.memoizedState!==null&&(Ia=t)}}else Sn()}function Sn(){be(wt,wt.current),be(ja,ja.current)}function Ka(t){we(ja),Ia===t&&(Ia=null),we(wt)}var wt=fe(0);function El(t){for(var a=t;a!==null;){if(a.tag===13){var i=a.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||i.data==="$?"||i.data==="$!"))return a}else if(a.tag===19&&a.memoizedProps.revealOrder!==void 0){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 o2=typeof AbortController<"u"?AbortController:function(){var t=[],a=this.signal={aborted:!1,addEventListener:function(i,s){t.push(s)}};this.abort=function(){a.aborted=!0,t.forEach(function(i){return i()})}},l2=e.unstable_scheduleCallback,s2=e.unstable_NormalPriority,kt={$$typeof:N,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function uu(){return{controller:new o2,data:new Map,refCount:0}}function fo(t){t.refCount--,t.refCount===0&&l2(s2,function(){t.controller.abort()})}var po=null,du=0,ui=0,di=null;function c2(t,a){if(po===null){var i=po=[];du=0,ui=yd(),di={status:"pending",value:void 0,then:function(s){i.push(s)}}}return du++,a.then(s0,s0),a}function s0(){if(--du===0&&po!==null){di!==null&&(di.status="fulfilled");var t=po;po=null,ui=0,di=null;for(var a=0;a<t.length;a++)(0,t[a])()}}function u2(t,a){var i=[],s={status:"pending",value:null,reason:null,then:function(d){i.push(d)}};return t.then(function(){s.status="fulfilled",s.value=a;for(var d=0;d<i.length;d++)(0,i[d])(a)},function(d){for(s.status="rejected",s.reason=d,d=0;d<i.length;d++)(0,i[d])(void 0)}),s}var c0=V.S;V.S=function(t,a){typeof a=="object"&&a!==null&&typeof a.then=="function"&&c2(t,a),c0!==null&&c0(t,a)};var Nr=fe(null);function fu(){var t=Nr.current;return t!==null?t:Je.pooledCache}function Cl(t,a){a===null?be(Nr,Nr.current):be(Nr,a.pool)}function u0(){var t=fu();return t===null?null:{parent:kt._currentValue,pool:t}}var wn=0,Me=null,Fe=null,vt=null,Tl=!1,fi=!1,zr=!1,Ml=0,go=0,pi=null,d2=0;function mt(){throw Error(l(321))}function pu(t,a){if(a===null)return!1;for(var i=0;i<a.length&&i<t.length;i++)if(!ua(t[i],a[i]))return!1;return!0}function gu(t,a,i,s,d,m){return wn=m,Me=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,V.H=t===null||t.memoizedState===null?Er:kn,zr=!1,m=i(s,d),zr=!1,fi&&(m=f0(a,i,s,d)),d0(t),m}function d0(t){V.H=La;var a=Fe!==null&&Fe.next!==null;if(wn=0,vt=Fe=Me=null,Tl=!1,go=0,pi=null,a)throw Error(l(300));t===null||Tt||(t=t.dependencies,t!==null&&Hl(t)&&(Tt=!0))}function f0(t,a,i,s){Me=t;var d=0;do{if(fi&&(pi=null),go=0,fi=!1,25<=d)throw Error(l(301));if(d+=1,vt=Fe=null,t.updateQueue!=null){var m=t.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}V.H=Cr,m=a(i,s)}while(fi);return m}function f2(){var t=V.H,a=t.useState()[0];return a=typeof a.then=="function"?mo(a):a,t=t.useState()[0],(Fe!==null?Fe.memoizedState:null)!==t&&(Me.flags|=1024),a}function mu(){var t=Ml!==0;return Ml=0,t}function hu(t,a,i){a.updateQueue=t.updateQueue,a.flags&=-2053,t.lanes&=~i}function yu(t){if(Tl){for(t=t.memoizedState;t!==null;){var a=t.queue;a!==null&&(a.pending=null),t=t.next}Tl=!1}wn=0,vt=Fe=Me=null,fi=!1,go=Ml=0,pi=null}function na(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return vt===null?Me.memoizedState=vt=t:vt=vt.next=t,vt}function $t(){if(Fe===null){var t=Me.alternate;t=t!==null?t.memoizedState:null}else t=Fe.next;var a=vt===null?Me.memoizedState:vt.next;if(a!==null)vt=a,Fe=t;else{if(t===null)throw Me.alternate===null?Error(l(467)):Error(l(310));Fe=t,t={memoizedState:Fe.memoizedState,baseState:Fe.baseState,baseQueue:Fe.baseQueue,queue:Fe.queue,next:null},vt===null?Me.memoizedState=vt=t:vt=vt.next=t}return vt}var Rl;Rl=function(){return{lastEffect:null,events:null,stores:null,memoCache:null}};function mo(t){var a=go;return go+=1,pi===null&&(pi=[]),t=t0(pi,t,a),a=Me,(vt===null?a.memoizedState:vt.next)===null&&(a=a.alternate,V.H=a===null||a.memoizedState===null?Er:kn),t}function Ol(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return mo(t);if(t.$$typeof===N)return Bt(t)}throw Error(l(438,String(t)))}function vu(t){var a=null,i=Me.updateQueue;if(i!==null&&(a=i.memoCache),a==null){var s=Me.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(a={data:s.data.map(function(d){return d.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),i===null&&(i=Rl(),Me.updateQueue=i),i.memoCache=a,i=a.data[a.index],i===void 0)for(i=a.data[a.index]=Array(t),s=0;s<t;s++)i[s]=R;return a.index++,i}function Wa(t,a){return typeof a=="function"?a(t):a}function Al(t){var a=$t();return $u(a,Fe,t)}function $u(t,a,i){var s=t.queue;if(s===null)throw Error(l(311));s.lastRenderedReducer=i;var d=t.baseQueue,m=s.pending;if(m!==null){if(d!==null){var _=d.next;d.next=m.next,m.next=_}a.baseQueue=d=m,s.pending=null}if(m=t.baseState,d===null)t.memoizedState=m;else{a=d.next;var M=_=null,U=null,P=a,re=!1;do{var le=P.lane&-536870913;if(le!==P.lane?(Be&le)===le:(wn&le)===le){var te=P.revertLane;if(te===0)U!==null&&(U=U.next={lane:0,revertLane:0,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null}),le===ui&&(re=!0);else if((wn&te)===te){P=P.next,te===ui&&(re=!0);continue}else le={lane:0,revertLane:P.revertLane,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null},U===null?(M=U=le,_=m):U=U.next=le,Me.lanes|=te,An|=te;le=P.action,zr&&i(m,le),m=P.hasEagerState?P.eagerState:i(m,le)}else te={lane:le,revertLane:P.revertLane,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null},U===null?(M=U=te,_=m):U=U.next=te,Me.lanes|=le,An|=le;P=P.next}while(P!==null&&P!==a);if(U===null?_=m:U.next=M,!ua(m,t.memoizedState)&&(Tt=!0,re&&(i=di,i!==null)))throw i;t.memoizedState=m,t.baseState=_,t.baseQueue=U,s.lastRenderedState=m}return d===null&&(s.lanes=0),[t.memoizedState,s.dispatch]}function bu(t){var a=$t(),i=a.queue;if(i===null)throw Error(l(311));i.lastRenderedReducer=t;var s=i.dispatch,d=i.pending,m=a.memoizedState;if(d!==null){i.pending=null;var _=d=d.next;do m=t(m,_.action),_=_.next;while(_!==d);ua(m,a.memoizedState)||(Tt=!0),a.memoizedState=m,a.baseQueue===null&&(a.baseState=m),i.lastRenderedState=m}return[m,s]}function p0(t,a,i){var s=Me,d=$t(),m=Pe;if(m){if(i===void 0)throw Error(l(407));i=i()}else i=a();var _=!ua((Fe||d).memoizedState,i);if(_&&(d.memoizedState=i,Tt=!0),d=d.queue,ju(h0.bind(null,s,d,t),[t]),d.getSnapshot!==a||_||vt!==null&&vt.memoizedState.tag&1){if(s.flags|=2048,gi(9,m0.bind(null,s,d,i,a),{destroy:void 0},null),Je===null)throw Error(l(349));m||(wn&60)!==0||g0(s,a,i)}return i}function g0(t,a,i){t.flags|=16384,t={getSnapshot:a,value:i},a=Me.updateQueue,a===null?(a=Rl(),Me.updateQueue=a,a.stores=[t]):(i=a.stores,i===null?a.stores=[t]:i.push(t))}function m0(t,a,i,s){a.value=i,a.getSnapshot=s,y0(a)&&v0(t)}function h0(t,a,i){return i(function(){y0(a)&&v0(t)})}function y0(t){var a=t.getSnapshot;t=t.value;try{var i=a();return!ua(t,i)}catch{return!0}}function v0(t){var a=_n(t,2);a!==null&&Yt(a,t,2)}function xu(t){var a=na();if(typeof t=="function"){var i=t;if(t=i(),zr){$n(!0);try{i()}finally{$n(!1)}}}return a.memoizedState=a.baseState=t,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wa,lastRenderedState:t},a}function $0(t,a,i,s){return t.baseState=i,$u(t,Fe,typeof s=="function"?s:Wa)}function p2(t,a,i,s,d){if(Il(t))throw Error(l(485));if(t=a.action,t!==null){var m={payload:d,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(_){m.listeners.push(_)}};V.T!==null?i(!0):m.isTransition=!1,s(m),i=a.pending,i===null?(m.next=a.pending=m,b0(a,m)):(m.next=i.next,a.pending=i.next=m)}}function b0(t,a){var i=a.action,s=a.payload,d=t.state;if(a.isTransition){var m=V.T,_={};V.T=_;try{var M=i(d,s),U=V.S;U!==null&&U(_,M),x0(t,a,M)}catch(P){_u(t,a,P)}finally{V.T=m}}else try{m=i(d,s),x0(t,a,m)}catch(P){_u(t,a,P)}}function x0(t,a,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(s){_0(t,a,s)},function(s){return _u(t,a,s)}):_0(t,a,i)}function _0(t,a,i){a.status="fulfilled",a.value=i,j0(a),t.state=i,a=t.pending,a!==null&&(i=a.next,i===a?t.pending=null:(i=i.next,a.next=i,b0(t,i)))}function _u(t,a,i){var s=t.pending;if(t.pending=null,s!==null){s=s.next;do a.status="rejected",a.reason=i,j0(a),a=a.next;while(a!==s)}t.action=null}function j0(t){t=t.listeners;for(var a=0;a<t.length;a++)(0,t[a])()}function S0(t,a){return a}function w0(t,a){if(Pe){var i=Je.formState;if(i!==null){e:{var s=Me;if(Pe){if(Ot){t:{for(var d=Ot,m=Ua;d.nodeType!==8;){if(!m){d=null;break t}if(d=Oa(d.nextSibling),d===null){d=null;break t}}m=d.data,d=m==="F!"||m==="F"?d:null}if(d){Ot=Oa(d.nextSibling),s=d.data==="F!";break e}}wr(s)}s=!1}s&&(a=i[0])}}return i=na(),i.memoizedState=i.baseState=a,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:S0,lastRenderedState:a},i.queue=s,i=q0.bind(null,Me,s),s.dispatch=i,s=xu(!1),m=zu.bind(null,Me,!1,s.queue),s=na(),d={state:a,dispatch:null,action:t,pending:null},s.queue=d,i=p2.bind(null,Me,d,m,i),d.dispatch=i,s.memoizedState=t,[a,i,!1]}function k0(t){var a=$t();return N0(a,Fe,t)}function N0(t,a,i){a=$u(t,a,S0)[0],t=Al(Wa)[0],a=typeof a=="object"&&a!==null&&typeof a.then=="function"?mo(a):a;var s=$t(),d=s.queue,m=d.dispatch;return i!==s.memoizedState&&(Me.flags|=2048,gi(9,g2.bind(null,d,i),{destroy:void 0},null)),[a,m,t]}function g2(t,a){t.action=a}function z0(t){var a=$t(),i=Fe;if(i!==null)return N0(a,i,t);$t(),a=a.memoizedState,i=$t();var s=i.queue.dispatch;return i.memoizedState=t,[a,s,!1]}function gi(t,a,i,s){return t={tag:t,create:a,inst:i,deps:s,next:null},a=Me.updateQueue,a===null&&(a=Rl(),Me.updateQueue=a),i=a.lastEffect,i===null?a.lastEffect=t.next=t:(s=i.next,i.next=t,t.next=s,a.lastEffect=t),t}function E0(){return $t().memoizedState}function Dl(t,a,i,s){var d=na();Me.flags|=t,d.memoizedState=gi(1|a,i,{destroy:void 0},s===void 0?null:s)}function Ul(t,a,i,s){var d=$t();s=s===void 0?null:s;var m=d.memoizedState.inst;Fe!==null&&s!==null&&pu(s,Fe.memoizedState.deps)?d.memoizedState=gi(a,i,m,s):(Me.flags|=t,d.memoizedState=gi(1|a,i,m,s))}function C0(t,a){Dl(8390656,8,t,a)}function ju(t,a){Ul(2048,8,t,a)}function T0(t,a){return Ul(4,2,t,a)}function M0(t,a){return Ul(4,4,t,a)}function R0(t,a){if(typeof a=="function"){t=t();var i=a(t);return function(){typeof i=="function"?i():a(null)}}if(a!=null)return t=t(),a.current=t,function(){a.current=null}}function O0(t,a,i){i=i!=null?i.concat([t]):null,Ul(4,4,R0.bind(null,a,t),i)}function Su(){}function A0(t,a){var i=$t();a=a===void 0?null:a;var s=i.memoizedState;return a!==null&&pu(a,s[1])?s[0]:(i.memoizedState=[t,a],t)}function D0(t,a){var i=$t();a=a===void 0?null:a;var s=i.memoizedState;if(a!==null&&pu(a,s[1]))return s[0];if(s=t(),zr){$n(!0);try{t()}finally{$n(!1)}}return i.memoizedState=[s,a],s}function wu(t,a,i){return i===void 0||(wn&1073741824)!==0?t.memoizedState=a:(t.memoizedState=i,t=Ig(),Me.lanes|=t,An|=t,i)}function U0(t,a,i,s){return ua(i,a)?i:ci.current!==null?(t=wu(t,i,s),ua(t,a)||(Tt=!0),t):(wn&42)===0?(Tt=!0,t.memoizedState=i):(t=Ig(),Me.lanes|=t,An|=t,a)}function I0(t,a,i,s,d){var m=C.p;C.p=m!==0&&8>m?m:8;var _=V.T,M={};V.T=M,zu(t,!1,a,i);try{var U=d(),P=V.S;if(P!==null&&P(M,U),U!==null&&typeof U=="object"&&typeof U.then=="function"){var re=u2(U,s);ho(t,a,re,ga(t))}else ho(t,a,s,ga(t))}catch(le){ho(t,a,{then:function(){},status:"rejected",reason:le},ga())}finally{C.p=m,V.T=_}}function m2(){}function ku(t,a,i,s){if(t.tag!==5)throw Error(l(476));var d=L0(t).queue;I0(t,d,a,L,i===null?m2:function(){return V0(t),i(s)})}function L0(t){var a=t.memoizedState;if(a!==null)return a;a={memoizedState:L,baseState:L,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wa,lastRenderedState:L},next:null};var i={};return a.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wa,lastRenderedState:i},next:null},t.memoizedState=a,t=t.alternate,t!==null&&(t.memoizedState=a),a}function V0(t){var a=L0(t).next.queue;ho(t,a,{},ga())}function Nu(){return Bt(Do)}function H0(){return $t().memoizedState}function B0(){return $t().memoizedState}function h2(t){for(var a=t.return;a!==null;){switch(a.tag){case 24:case 3:var i=ga();t=En(i);var s=Cn(a,t,i);s!==null&&(Yt(s,a,i),$o(s,a,i)),a={cache:uu()},t.payload=a;return}a=a.return}}function y2(t,a,i){var s=ga();i={lane:s,revertLane:0,action:i,hasEagerState:!1,eagerState:null,next:null},Il(t)?P0(a,i):(i=nu(t,a,i,s),i!==null&&(Yt(i,t,s),Z0(i,a,s)))}function q0(t,a,i){var s=ga();ho(t,a,i,s)}function ho(t,a,i,s){var d={lane:s,revertLane:0,action:i,hasEagerState:!1,eagerState:null,next:null};if(Il(t))P0(a,d);else{var m=t.alternate;if(t.lanes===0&&(m===null||m.lanes===0)&&(m=a.lastRenderedReducer,m!==null))try{var _=a.lastRenderedState,M=m(_,i);if(d.hasEagerState=!0,d.eagerState=M,ua(M,_))return xl(t,a,d,0),Je===null&&bl(),!1}catch{}finally{}if(i=nu(t,a,d,s),i!==null)return Yt(i,t,s),Z0(i,a,s),!0}return!1}function zu(t,a,i,s){if(s={lane:2,revertLane:yd(),action:s,hasEagerState:!1,eagerState:null,next:null},Il(t)){if(a)throw Error(l(479))}else a=nu(t,i,s,2),a!==null&&Yt(a,t,2)}function Il(t){var a=t.alternate;return t===Me||a!==null&&a===Me}function P0(t,a){fi=Tl=!0;var i=t.pending;i===null?a.next=a:(a.next=i.next,i.next=a),t.pending=a}function Z0(t,a,i){if((i&4194176)!==0){var s=a.lanes;s&=t.pendingLanes,i|=s,a.lanes=i,ap(t,i)}}var La={readContext:Bt,use:Ol,useCallback:mt,useContext:mt,useEffect:mt,useImperativeHandle:mt,useLayoutEffect:mt,useInsertionEffect:mt,useMemo:mt,useReducer:mt,useRef:mt,useState:mt,useDebugValue:mt,useDeferredValue:mt,useTransition:mt,useSyncExternalStore:mt,useId:mt};La.useCacheRefresh=mt,La.useMemoCache=mt,La.useHostTransitionStatus=mt,La.useFormState=mt,La.useActionState=mt,La.useOptimistic=mt;var Er={readContext:Bt,use:Ol,useCallback:function(t,a){return na().memoizedState=[t,a===void 0?null:a],t},useContext:Bt,useEffect:C0,useImperativeHandle:function(t,a,i){i=i!=null?i.concat([t]):null,Dl(4194308,4,R0.bind(null,a,t),i)},useLayoutEffect:function(t,a){return Dl(4194308,4,t,a)},useInsertionEffect:function(t,a){Dl(4,2,t,a)},useMemo:function(t,a){var i=na();a=a===void 0?null:a;var s=t();if(zr){$n(!0);try{t()}finally{$n(!1)}}return i.memoizedState=[s,a],s},useReducer:function(t,a,i){var s=na();if(i!==void 0){var d=i(a);if(zr){$n(!0);try{i(a)}finally{$n(!1)}}}else d=a;return s.memoizedState=s.baseState=d,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:d},s.queue=t,t=t.dispatch=y2.bind(null,Me,t),[s.memoizedState,t]},useRef:function(t){var a=na();return t={current:t},a.memoizedState=t},useState:function(t){t=xu(t);var a=t.queue,i=q0.bind(null,Me,a);return a.dispatch=i,[t.memoizedState,i]},useDebugValue:Su,useDeferredValue:function(t,a){var i=na();return wu(i,t,a)},useTransition:function(){var t=xu(!1);return t=I0.bind(null,Me,t.queue,!0,!1),na().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,a,i){var s=Me,d=na();if(Pe){if(i===void 0)throw Error(l(407));i=i()}else{if(i=a(),Je===null)throw Error(l(349));(Be&60)!==0||g0(s,a,i)}d.memoizedState=i;var m={value:i,getSnapshot:a};return d.queue=m,C0(h0.bind(null,s,m,t),[t]),s.flags|=2048,gi(9,m0.bind(null,s,m,i,a),{destroy:void 0},null),i},useId:function(){var t=na(),a=Je.identifierPrefix;if(Pe){var i=Ya,s=Fa;i=(s&~(1<<32-ca(s)-1)).toString(32)+i,a=":"+a+"R"+i,i=Ml++,0<i&&(a+="H"+i.toString(32)),a+=":"}else i=d2++,a=":"+a+"r"+i.toString(32)+":";return t.memoizedState=a},useCacheRefresh:function(){return na().memoizedState=h2.bind(null,Me)}};Er.useMemoCache=vu,Er.useHostTransitionStatus=Nu,Er.useFormState=w0,Er.useActionState=w0,Er.useOptimistic=function(t){var a=na();a.memoizedState=a.baseState=t;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=i,a=zu.bind(null,Me,!0,i),i.dispatch=a,[t,a]};var kn={readContext:Bt,use:Ol,useCallback:A0,useContext:Bt,useEffect:ju,useImperativeHandle:O0,useInsertionEffect:T0,useLayoutEffect:M0,useMemo:D0,useReducer:Al,useRef:E0,useState:function(){return Al(Wa)},useDebugValue:Su,useDeferredValue:function(t,a){var i=$t();return U0(i,Fe.memoizedState,t,a)},useTransition:function(){var t=Al(Wa)[0],a=$t().memoizedState;return[typeof t=="boolean"?t:mo(t),a]},useSyncExternalStore:p0,useId:H0};kn.useCacheRefresh=B0,kn.useMemoCache=vu,kn.useHostTransitionStatus=Nu,kn.useFormState=k0,kn.useActionState=k0,kn.useOptimistic=function(t,a){var i=$t();return $0(i,Fe,t,a)};var Cr={readContext:Bt,use:Ol,useCallback:A0,useContext:Bt,useEffect:ju,useImperativeHandle:O0,useInsertionEffect:T0,useLayoutEffect:M0,useMemo:D0,useReducer:bu,useRef:E0,useState:function(){return bu(Wa)},useDebugValue:Su,useDeferredValue:function(t,a){var i=$t();return Fe===null?wu(i,t,a):U0(i,Fe.memoizedState,t,a)},useTransition:function(){var t=bu(Wa)[0],a=$t().memoizedState;return[typeof t=="boolean"?t:mo(t),a]},useSyncExternalStore:p0,useId:H0};Cr.useCacheRefresh=B0,Cr.useMemoCache=vu,Cr.useHostTransitionStatus=Nu,Cr.useFormState=z0,Cr.useActionState=z0,Cr.useOptimistic=function(t,a){var i=$t();return Fe!==null?$0(i,Fe,t,a):(i.baseState=t,[t,i.queue.dispatch])};function Eu(t,a,i,s){a=t.memoizedState,i=i(s,a),i=i==null?a:F({},a,i),t.memoizedState=i,t.lanes===0&&(t.updateQueue.baseState=i)}var Cu={isMounted:function(t){return(t=t._reactInternals)?ge(t)===t:!1},enqueueSetState:function(t,a,i){t=t._reactInternals;var s=ga(),d=En(s);d.payload=a,i!=null&&(d.callback=i),a=Cn(t,d,s),a!==null&&(Yt(a,t,s),$o(a,t,s))},enqueueReplaceState:function(t,a,i){t=t._reactInternals;var s=ga(),d=En(s);d.tag=1,d.payload=a,i!=null&&(d.callback=i),a=Cn(t,d,s),a!==null&&(Yt(a,t,s),$o(a,t,s))},enqueueForceUpdate:function(t,a){t=t._reactInternals;var i=ga(),s=En(i);s.tag=2,a!=null&&(s.callback=a),a=Cn(t,s,i),a!==null&&(Yt(a,t,i),$o(a,t,i))}};function G0(t,a,i,s,d,m,_){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(s,m,_):a.prototype&&a.prototype.isPureReactComponent?!ao(i,s)||!ao(d,m):!0}function F0(t,a,i,s){t=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(i,s),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(i,s),a.state!==t&&Cu.enqueueReplaceState(a,a.state,null)}function Tr(t,a){var i=a;if("ref"in a){i={};for(var s in a)s!=="ref"&&(i[s]=a[s])}if(t=t.defaultProps){i===a&&(i=F({},i));for(var d in t)i[d]===void 0&&(i[d]=t[d])}return i}var Ll=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)};function Y0(t){Ll(t)}function K0(t){console.error(t)}function W0(t){Ll(t)}function Vl(t,a){try{var i=t.onUncaughtError;i(a.value,{componentStack:a.stack})}catch(s){setTimeout(function(){throw s})}}function X0(t,a,i){try{var s=t.onCaughtError;s(i.value,{componentStack:i.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function Tu(t,a,i){return i=En(i),i.tag=3,i.payload={element:null},i.callback=function(){Vl(t,a)},i}function J0(t){return t=En(t),t.tag=3,t}function Q0(t,a,i,s){var d=i.type.getDerivedStateFromError;if(typeof d=="function"){var m=s.value;t.payload=function(){return d(m)},t.callback=function(){X0(a,i,s)}}var _=i.stateNode;_!==null&&typeof _.componentDidCatch=="function"&&(t.callback=function(){X0(a,i,s),typeof d!="function"&&(Dn===null?Dn=new Set([this]):Dn.add(this));var M=s.stack;this.componentDidCatch(s.value,{componentStack:M!==null?M:""})})}function v2(t,a,i,s,d){if(i.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(a=i.alternate,a!==null&&vo(a,i,d,!0),i=ja.current,i!==null){switch(i.tag){case 13:return Ia===null?fd():i.alternate===null&&ut===0&&(ut=3),i.flags&=-257,i.flags|=65536,i.lanes=d,s===lu?i.flags|=16384:(a=i.updateQueue,a===null?i.updateQueue=new Set([s]):a.add(s),gd(t,s,d)),!1;case 22:return i.flags|=65536,s===lu?i.flags|=16384:(a=i.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([s])},i.updateQueue=a):(i=a.retryQueue,i===null?a.retryQueue=new Set([s]):i.add(s)),gd(t,s,d)),!1}throw Error(l(435,i.tag))}return gd(t,s,d),fd(),!1}if(Pe)return a=ja.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=d,s!==ou&&(t=Error(l(422),{cause:s}),oo(ba(t,i)))):(s!==ou&&(a=Error(l(423),{cause:s}),oo(ba(a,i))),t=t.current.alternate,t.flags|=65536,d&=-d,t.lanes|=d,s=ba(s,i),d=Tu(t.stateNode,s,d),Gu(t,d),ut!==4&&(ut=2)),!1;var m=Error(l(520),{cause:s});if(m=ba(m,i),No===null?No=[m]:No.push(m),ut!==4&&(ut=2),a===null)return!0;s=ba(s,i),i=a;do{switch(i.tag){case 3:return i.flags|=65536,t=d&-d,i.lanes|=t,t=Tu(i.stateNode,s,t),Gu(i,t),!1;case 1:if(a=i.type,m=i.stateNode,(i.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(Dn===null||!Dn.has(m))))return i.flags|=65536,d&=-d,i.lanes|=d,d=J0(d),Q0(d,t,i,s),Gu(i,d),!1}i=i.return}while(i!==null);return!1}var eg=Error(l(461)),Tt=!1;function At(t,a,i,s){a.child=t===null?i0(a,null,i,s):kr(a,t.child,i,s)}function tg(t,a,i,s,d){i=i.render;var m=a.ref;if("ref"in s){var _={};for(var M in s)M!=="ref"&&(_[M]=s[M])}else _=s;return Rr(a),s=gu(t,a,i,_,m,d),M=mu(),t!==null&&!Tt?(hu(t,a,d),Xa(t,a,d)):(Pe&&M&&ru(a),a.flags|=1,At(t,a,s,d),a.child)}function ag(t,a,i,s,d){if(t===null){var m=i.type;return typeof m=="function"&&!ed(m)&&m.defaultProps===void 0&&i.compare===null?(a.tag=15,a.type=m,ng(t,a,m,s,d)):(t=Zl(i.type,null,s,a,a.mode,d),t.ref=a.ref,t.return=a,a.child=t)}if(m=t.child,!Vu(t,d)){var _=m.memoizedProps;if(i=i.compare,i=i!==null?i:ao,i(_,s)&&t.ref===a.ref)return Xa(t,a,d)}return a.flags|=1,t=On(m,s),t.ref=a.ref,t.return=a,a.child=t}function ng(t,a,i,s,d){if(t!==null){var m=t.memoizedProps;if(ao(m,s)&&t.ref===a.ref)if(Tt=!1,a.pendingProps=s=m,Vu(t,d))(t.flags&131072)!==0&&(Tt=!0);else return a.lanes=t.lanes,Xa(t,a,d)}return Mu(t,a,i,s,d)}function rg(t,a,i){var s=a.pendingProps,d=s.children,m=(a.stateNode._pendingVisibility&2)!==0,_=t!==null?t.memoizedState:null;if(yo(t,a),s.mode==="hidden"||m){if((a.flags&128)!==0){if(s=_!==null?_.baseLanes|i:i,t!==null){for(d=a.child=t.child,m=0;d!==null;)m=m|d.lanes|d.childLanes,d=d.sibling;a.childLanes=m&~s}else a.childLanes=0,a.child=null;return ig(t,a,s,i)}if((i&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},t!==null&&Cl(a,_!==null?_.cachePool:null),_!==null?o0(a,_):su(),l0(a);else return a.lanes=a.childLanes=536870912,ig(t,a,_!==null?_.baseLanes|i:i,i)}else _!==null?(Cl(a,_.cachePool),o0(a,_),Sn(),a.memoizedState=null):(t!==null&&Cl(a,null),su(),Sn());return At(t,a,d,i),a.child}function ig(t,a,i,s){var d=fu();return d=d===null?null:{parent:kt._currentValue,pool:d},a.memoizedState={baseLanes:i,cachePool:d},t!==null&&Cl(a,null),su(),l0(a),t!==null&&vo(t,a,s,!0),null}function yo(t,a){var i=a.ref;if(i===null)t!==null&&t.ref!==null&&(a.flags|=2097664);else{if(typeof i!="function"&&typeof i!="object")throw Error(l(284));(t===null||t.ref!==i)&&(a.flags|=2097664)}}function Mu(t,a,i,s,d){return Rr(a),i=gu(t,a,i,s,void 0,d),s=mu(),t!==null&&!Tt?(hu(t,a,d),Xa(t,a,d)):(Pe&&s&&ru(a),a.flags|=1,At(t,a,i,d),a.child)}function og(t,a,i,s,d,m){return Rr(a),a.updateQueue=null,i=f0(a,s,i,d),d0(t),s=mu(),t!==null&&!Tt?(hu(t,a,m),Xa(t,a,m)):(Pe&&s&&ru(a),a.flags|=1,At(t,a,i,m),a.child)}function lg(t,a,i,s,d){if(Rr(a),a.stateNode===null){var m=ii,_=i.contextType;typeof _=="object"&&_!==null&&(m=Bt(_)),m=new i(s,m),a.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=Cu,a.stateNode=m,m._reactInternals=a,m=a.stateNode,m.props=s,m.state=a.memoizedState,m.refs={},Pu(a),_=i.contextType,m.context=typeof _=="object"&&_!==null?Bt(_):ii,m.state=a.memoizedState,_=i.getDerivedStateFromProps,typeof _=="function"&&(Eu(a,i,_,s),m.state=a.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(_=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),_!==m.state&&Cu.enqueueReplaceState(m,m.state,null),xo(a,s,m,d),bo(),m.state=a.memoizedState),typeof m.componentDidMount=="function"&&(a.flags|=4194308),s=!0}else if(t===null){m=a.stateNode;var M=a.memoizedProps,U=Tr(i,M);m.props=U;var P=m.context,re=i.contextType;_=ii,typeof re=="object"&&re!==null&&(_=Bt(re));var le=i.getDerivedStateFromProps;re=typeof le=="function"||typeof m.getSnapshotBeforeUpdate=="function",M=a.pendingProps!==M,re||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(M||P!==_)&&F0(a,m,s,_),zn=!1;var te=a.memoizedState;m.state=te,xo(a,s,m,d),bo(),P=a.memoizedState,M||te!==P||zn?(typeof le=="function"&&(Eu(a,i,le,s),P=a.memoizedState),(U=zn||G0(a,i,U,s,te,P,_))?(re||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=P),m.props=s,m.state=P,m.context=_,s=U):(typeof m.componentDidMount=="function"&&(a.flags|=4194308),s=!1)}else{m=a.stateNode,Zu(t,a),_=a.memoizedProps,re=Tr(i,_),m.props=re,le=a.pendingProps,te=m.context,P=i.contextType,U=ii,typeof P=="object"&&P!==null&&(U=Bt(P)),M=i.getDerivedStateFromProps,(P=typeof M=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(_!==le||te!==U)&&F0(a,m,s,U),zn=!1,te=a.memoizedState,m.state=te,xo(a,s,m,d),bo();var ae=a.memoizedState;_!==le||te!==ae||zn||t!==null&&t.dependencies!==null&&Hl(t.dependencies)?(typeof M=="function"&&(Eu(a,i,M,s),ae=a.memoizedState),(re=zn||G0(a,i,re,s,te,ae,U)||t!==null&&t.dependencies!==null&&Hl(t.dependencies))?(P||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(s,ae,U),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(s,ae,U)),typeof m.componentDidUpdate=="function"&&(a.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof m.componentDidUpdate!="function"||_===t.memoizedProps&&te===t.memoizedState||(a.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||_===t.memoizedProps&&te===t.memoizedState||(a.flags|=1024),a.memoizedProps=s,a.memoizedState=ae),m.props=s,m.state=ae,m.context=U,s=re):(typeof m.componentDidUpdate!="function"||_===t.memoizedProps&&te===t.memoizedState||(a.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||_===t.memoizedProps&&te===t.memoizedState||(a.flags|=1024),s=!1)}return m=s,yo(t,a),s=(a.flags&128)!==0,m||s?(m=a.stateNode,i=s&&typeof i.getDerivedStateFromError!="function"?null:m.render(),a.flags|=1,t!==null&&s?(a.child=kr(a,t.child,null,d),a.child=kr(a,null,i,d)):At(t,a,i,d),a.memoizedState=m.state,t=a.child):t=Xa(t,a,d),t}function sg(t,a,i,s){return io(),a.flags|=256,At(t,a,i,s),a.child}var Ru={dehydrated:null,treeContext:null,retryLane:0};function Ou(t){return{baseLanes:t,cachePool:u0()}}function Au(t,a,i){return t=t!==null?t.childLanes&~i:0,a&&(t|=Na),t}function cg(t,a,i){var s=a.pendingProps,d=!1,m=(a.flags&128)!==0,_;if((_=m)||(_=t!==null&&t.memoizedState===null?!1:(wt.current&2)!==0),_&&(d=!0,a.flags&=-129),_=(a.flags&32)!==0,a.flags&=-33,t===null){if(Pe){if(d?jn(a):Sn(),Pe){var M=Ot,U;if(U=M){e:{for(U=M,M=Ua;U.nodeType!==8;){if(!M){M=null;break e}if(U=Oa(U.nextSibling),U===null){M=null;break e}}M=U}M!==null?(a.memoizedState={dehydrated:M,treeContext:jr!==null?{id:Fa,overflow:Ya}:null,retryLane:536870912},U=ka(18,null,null,0),U.stateNode=M,U.return=a,a.child=U,Ft=a,Ot=null,U=!0):U=!1}U||wr(a)}if(M=a.memoizedState,M!==null&&(M=M.dehydrated,M!==null))return M.data==="$!"?a.lanes=16:a.lanes=536870912,null;Ka(a)}return M=s.children,s=s.fallback,d?(Sn(),d=a.mode,M=Uu({mode:"hidden",children:M},d),s=Ar(s,d,i,null),M.return=a,s.return=a,M.sibling=s,a.child=M,d=a.child,d.memoizedState=Ou(i),d.childLanes=Au(t,_,i),a.memoizedState=Ru,s):(jn(a),Du(a,M))}if(U=t.memoizedState,U!==null&&(M=U.dehydrated,M!==null)){if(m)a.flags&256?(jn(a),a.flags&=-257,a=Iu(t,a,i)):a.memoizedState!==null?(Sn(),a.child=t.child,a.flags|=128,a=null):(Sn(),d=s.fallback,M=a.mode,s=Uu({mode:"visible",children:s.children},M),d=Ar(d,M,i,null),d.flags|=2,s.return=a,d.return=a,s.sibling=d,a.child=s,kr(a,t.child,null,i),s=a.child,s.memoizedState=Ou(i),s.childLanes=Au(t,_,i),a.memoizedState=Ru,a=d);else if(jn(a),M.data==="$!"){if(_=M.nextSibling&&M.nextSibling.dataset,_)var P=_.dgst;_=P,s=Error(l(419)),s.stack="",s.digest=_,oo({value:s,source:null,stack:null}),a=Iu(t,a,i)}else if(Tt||vo(t,a,i,!1),_=(i&t.childLanes)!==0,Tt||_){if(_=Je,_!==null){if(s=i&-i,(s&42)!==0)s=1;else switch(s){case 2:s=1;break;case 8:s=4;break;case 32:s=16;break;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:case 4194304:case 8388608:case 16777216:case 33554432:s=64;break;case 268435456:s=134217728;break;default:s=0}if(s=(s&(_.suspendedLanes|i))!==0?0:s,s!==0&&s!==U.retryLane)throw U.retryLane=s,_n(t,s),Yt(_,t,s),eg}M.data==="$?"||fd(),a=Iu(t,a,i)}else M.data==="$?"?(a.flags|=128,a.child=t.child,a=R2.bind(null,t),M._reactRetry=a,a=null):(t=U.treeContext,Ot=Oa(M.nextSibling),Ft=a,Pe=!0,Ma=null,Ua=!1,t!==null&&(xa[_a++]=Fa,xa[_a++]=Ya,xa[_a++]=jr,Fa=t.id,Ya=t.overflow,jr=a),a=Du(a,s.children),a.flags|=4096);return a}return d?(Sn(),d=s.fallback,M=a.mode,U=t.child,P=U.sibling,s=On(U,{mode:"hidden",children:s.children}),s.subtreeFlags=U.subtreeFlags&31457280,P!==null?d=On(P,d):(d=Ar(d,M,i,null),d.flags|=2),d.return=a,s.return=a,s.sibling=d,a.child=s,s=d,d=a.child,M=t.child.memoizedState,M===null?M=Ou(i):(U=M.cachePool,U!==null?(P=kt._currentValue,U=U.parent!==P?{parent:P,pool:P}:U):U=u0(),M={baseLanes:M.baseLanes|i,cachePool:U}),d.memoizedState=M,d.childLanes=Au(t,_,i),a.memoizedState=Ru,s):(jn(a),i=t.child,t=i.sibling,i=On(i,{mode:"visible",children:s.children}),i.return=a,i.sibling=null,t!==null&&(_=a.deletions,_===null?(a.deletions=[t],a.flags|=16):_.push(t)),a.child=i,a.memoizedState=null,i)}function Du(t,a){return a=Uu({mode:"visible",children:a},t.mode),a.return=t,t.child=a}function Uu(t,a){return Ag(t,a,0,null)}function Iu(t,a,i){return kr(a,t.child,null,i),t=Du(a,a.pendingProps.children),t.flags|=2,a.memoizedState=null,t}function ug(t,a,i){t.lanes|=a;var s=t.alternate;s!==null&&(s.lanes|=a),Bu(t.return,a,i)}function Lu(t,a,i,s,d){var m=t.memoizedState;m===null?t.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:d}:(m.isBackwards=a,m.rendering=null,m.renderingStartTime=0,m.last=s,m.tail=i,m.tailMode=d)}function dg(t,a,i){var s=a.pendingProps,d=s.revealOrder,m=s.tail;if(At(t,a,s.children,i),s=wt.current,(s&2)!==0)s=s&1|2,a.flags|=128;else{if(t!==null&&(t.flags&128)!==0)e:for(t=a.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&ug(t,i,a);else if(t.tag===19)ug(t,i,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}s&=1}switch(be(wt,s),d){case"forwards":for(i=a.child,d=null;i!==null;)t=i.alternate,t!==null&&El(t)===null&&(d=i),i=i.sibling;i=d,i===null?(d=a.child,a.child=null):(d=i.sibling,i.sibling=null),Lu(a,!1,d,i,m);break;case"backwards":for(i=null,d=a.child,a.child=null;d!==null;){if(t=d.alternate,t!==null&&El(t)===null){a.child=d;break}t=d.sibling,d.sibling=i,i=d,d=t}Lu(a,!0,i,null,m);break;case"together":Lu(a,!1,null,null,void 0);break;default:a.memoizedState=null}return a.child}function Xa(t,a,i){if(t!==null&&(a.dependencies=t.dependencies),An|=a.lanes,(i&a.childLanes)===0)if(t!==null){if(vo(t,a,i,!1),(i&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,i=On(t,t.pendingProps),a.child=i,i.return=a;t.sibling!==null;)t=t.sibling,i=i.sibling=On(t,t.pendingProps),i.return=a;i.sibling=null}return a.child}function Vu(t,a){return(t.lanes&a)!==0?!0:(t=t.dependencies,!!(t!==null&&Hl(t)))}function $2(t,a,i){switch(a.tag){case 3:ve(a,a.stateNode.containerInfo),Nn(a,kt,t.memoizedState.cache),io();break;case 27:case 5:pt(a);break;case 4:ve(a,a.stateNode.containerInfo);break;case 10:Nn(a,a.type,a.memoizedProps.value);break;case 13:var s=a.memoizedState;if(s!==null)return s.dehydrated!==null?(jn(a),a.flags|=128,null):(i&a.child.childLanes)!==0?cg(t,a,i):(jn(a),t=Xa(t,a,i),t!==null?t.sibling:null);jn(a);break;case 19:var d=(t.flags&128)!==0;if(s=(i&a.childLanes)!==0,s||(vo(t,a,i,!1),s=(i&a.childLanes)!==0),d){if(s)return dg(t,a,i);a.flags|=128}if(d=a.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),be(wt,wt.current),s)break;return null;case 22:case 23:return a.lanes=0,rg(t,a,i);case 24:Nn(a,kt,t.memoizedState.cache)}return Xa(t,a,i)}function fg(t,a,i){if(t!==null)if(t.memoizedProps!==a.pendingProps)Tt=!0;else{if(!Vu(t,i)&&(a.flags&128)===0)return Tt=!1,$2(t,a,i);Tt=(t.flags&131072)!==0}else Tt=!1,Pe&&(a.flags&1048576)!==0&&Wp(a,Sl,a.index);switch(a.lanes=0,a.tag){case 16:e:{t=a.pendingProps;var s=a.elementType,d=s._init;if(s=d(s._payload),a.type=s,typeof s=="function")ed(s)?(t=Tr(s,t),a.tag=1,a=lg(null,a,s,t,i)):(a.tag=0,a=Mu(null,a,s,t,i));else{if(s!=null){if(d=s.$$typeof,d===x){a.tag=11,a=tg(null,a,s,t,i);break e}else if(d===k){a.tag=14,a=ag(null,a,s,t,i);break e}}throw a=O(s)||s,Error(l(306,a,""))}}return a;case 0:return Mu(t,a,a.type,a.pendingProps,i);case 1:return s=a.type,d=Tr(s,a.pendingProps),lg(t,a,s,d,i);case 3:e:{if(ve(a,a.stateNode.containerInfo),t===null)throw Error(l(387));var m=a.pendingProps;d=a.memoizedState,s=d.element,Zu(t,a),xo(a,m,null,i);var _=a.memoizedState;if(m=_.cache,Nn(a,kt,m),m!==d.cache&&qu(a,[kt],i,!0),bo(),m=_.element,d.isDehydrated)if(d={element:m,isDehydrated:!1,cache:_.cache},a.updateQueue.baseState=d,a.memoizedState=d,a.flags&256){a=sg(t,a,m,i);break e}else if(m!==s){s=ba(Error(l(424)),a),oo(s),a=sg(t,a,m,i);break e}else for(Ot=Oa(a.stateNode.containerInfo.firstChild),Ft=a,Pe=!0,Ma=null,Ua=!0,i=i0(a,null,m,i),a.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(io(),m===s){a=Xa(t,a,i);break e}At(t,a,m,i)}a=a.child}return a;case 26:return yo(t,a),t===null?(i=mm(a.type,null,a.pendingProps,null))?a.memoizedState=i:Pe||(i=a.type,t=a.pendingProps,s=ns(ie.current).createElement(i),s[Ht]=a,s[ta]=t,Dt(s,i,t),Ct(s),a.stateNode=s):a.memoizedState=mm(a.type,t.memoizedProps,a.pendingProps,t.memoizedState),null;case 27:return pt(a),t===null&&Pe&&(s=a.stateNode=fm(a.type,a.pendingProps,ie.current),Ft=a,Ua=!0,Ot=Oa(s.firstChild)),s=a.pendingProps.children,t!==null||Pe?At(t,a,s,i):a.child=kr(a,null,s,i),yo(t,a),a.child;case 5:return t===null&&Pe&&((d=s=Ot)&&(s=K2(s,a.type,a.pendingProps,Ua),s!==null?(a.stateNode=s,Ft=a,Ot=Oa(s.firstChild),Ua=!1,d=!0):d=!1),d||wr(a)),pt(a),d=a.type,m=a.pendingProps,_=t!==null?t.memoizedProps:null,s=m.children,kd(d,m)?s=null:_!==null&&kd(d,_)&&(a.flags|=32),a.memoizedState!==null&&(d=gu(t,a,f2,null,null,i),Do._currentValue=d),yo(t,a),At(t,a,s,i),a.child;case 6:return t===null&&Pe&&((t=i=Ot)&&(i=W2(i,a.pendingProps,Ua),i!==null?(a.stateNode=i,Ft=a,Ot=null,t=!0):t=!1),t||wr(a)),null;case 13:return cg(t,a,i);case 4:return ve(a,a.stateNode.containerInfo),s=a.pendingProps,t===null?a.child=kr(a,null,s,i):At(t,a,s,i),a.child;case 11:return tg(t,a,a.type,a.pendingProps,i);case 7:return At(t,a,a.pendingProps,i),a.child;case 8:return At(t,a,a.pendingProps.children,i),a.child;case 12:return At(t,a,a.pendingProps.children,i),a.child;case 10:return s=a.pendingProps,Nn(a,a.type,s.value),At(t,a,s.children,i),a.child;case 9:return d=a.type._context,s=a.pendingProps.children,Rr(a),d=Bt(d),s=s(d),a.flags|=1,At(t,a,s,i),a.child;case 14:return ag(t,a,a.type,a.pendingProps,i);case 15:return ng(t,a,a.type,a.pendingProps,i);case 19:return dg(t,a,i);case 22:return rg(t,a,i);case 24:return Rr(a),s=Bt(kt),t===null?(d=fu(),d===null&&(d=Je,m=uu(),d.pooledCache=m,m.refCount++,m!==null&&(d.pooledCacheLanes|=i),d=m),a.memoizedState={parent:s,cache:d},Pu(a),Nn(a,kt,d)):((t.lanes&i)!==0&&(Zu(t,a),xo(a,null,null,i),bo()),d=t.memoizedState,m=a.memoizedState,d.parent!==s?(d={parent:s,cache:s},a.memoizedState=d,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=d),Nn(a,kt,s)):(s=m.cache,Nn(a,kt,s),s!==d.cache&&qu(a,[kt],i,!0))),At(t,a,a.pendingProps.children,i),a.child;case 29:throw a.pendingProps}throw Error(l(156,a.tag))}var Hu=fe(null),Mr=null,Ja=null;function Nn(t,a,i){be(Hu,a._currentValue),a._currentValue=i}function Qa(t){t._currentValue=Hu.current,we(Hu)}function Bu(t,a,i){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===i)break;t=t.return}}function qu(t,a,i,s){var d=t.child;for(d!==null&&(d.return=t);d!==null;){var m=d.dependencies;if(m!==null){var _=d.child;m=m.firstContext;e:for(;m!==null;){var M=m;m=d;for(var U=0;U<a.length;U++)if(M.context===a[U]){m.lanes|=i,M=m.alternate,M!==null&&(M.lanes|=i),Bu(m.return,i,t),s||(_=null);break e}m=M.next}}else if(d.tag===18){if(_=d.return,_===null)throw Error(l(341));_.lanes|=i,m=_.alternate,m!==null&&(m.lanes|=i),Bu(_,i,t),_=null}else _=d.child;if(_!==null)_.return=d;else for(_=d;_!==null;){if(_===t){_=null;break}if(d=_.sibling,d!==null){d.return=_.return,_=d;break}_=_.return}d=_}}function vo(t,a,i,s){t=null;for(var d=a,m=!1;d!==null;){if(!m){if((d.flags&524288)!==0)m=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var _=d.alternate;if(_===null)throw Error(l(387));if(_=_.memoizedProps,_!==null){var M=d.type;ua(d.pendingProps.value,_.value)||(t!==null?t.push(M):t=[M])}}else if(d===pe.current){if(_=d.alternate,_===null)throw Error(l(387));_.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(t!==null?t.push(Do):t=[Do])}d=d.return}t!==null&&qu(a,t,i,s),a.flags|=262144}function Hl(t){for(t=t.firstContext;t!==null;){if(!ua(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Rr(t){Mr=t,Ja=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Bt(t){return pg(Mr,t)}function Bl(t,a){return Mr===null&&Rr(t),pg(t,a)}function pg(t,a){var i=a._currentValue;if(a={context:a,memoizedValue:i,next:null},Ja===null){if(t===null)throw Error(l(308));Ja=a,t.dependencies={lanes:0,firstContext:a},t.flags|=524288}else Ja=Ja.next=a;return i}var zn=!1;function Pu(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Zu(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 En(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Cn(t,a,i){var s=t.updateQueue;if(s===null)return null;if(s=s.shared,(lt&2)!==0){var d=s.pending;return d===null?a.next=a:(a.next=d.next,d.next=a),s.pending=a,a=_l(t),Yp(t,null,i),a}return xl(t,s,a,i),_l(t)}function $o(t,a,i){if(a=a.updateQueue,a!==null&&(a=a.shared,(i&4194176)!==0)){var s=a.lanes;s&=t.pendingLanes,i|=s,a.lanes=i,ap(t,i)}}function Gu(t,a){var i=t.updateQueue,s=t.alternate;if(s!==null&&(s=s.updateQueue,i===s)){var d=null,m=null;if(i=i.firstBaseUpdate,i!==null){do{var _={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};m===null?d=m=_:m=m.next=_,i=i.next}while(i!==null);m===null?d=m=a:m=m.next=a}else d=m=a;i={baseState:s.baseState,firstBaseUpdate:d,lastBaseUpdate:m,shared:s.shared,callbacks:s.callbacks},t.updateQueue=i;return}t=i.lastBaseUpdate,t===null?i.firstBaseUpdate=a:t.next=a,i.lastBaseUpdate=a}var Fu=!1;function bo(){if(Fu){var t=di;if(t!==null)throw t}}function xo(t,a,i,s){Fu=!1;var d=t.updateQueue;zn=!1;var m=d.firstBaseUpdate,_=d.lastBaseUpdate,M=d.shared.pending;if(M!==null){d.shared.pending=null;var U=M,P=U.next;U.next=null,_===null?m=P:_.next=P,_=U;var re=t.alternate;re!==null&&(re=re.updateQueue,M=re.lastBaseUpdate,M!==_&&(M===null?re.firstBaseUpdate=P:M.next=P,re.lastBaseUpdate=U))}if(m!==null){var le=d.baseState;_=0,re=P=U=null,M=m;do{var te=M.lane&-536870913,ae=te!==M.lane;if(ae?(Be&te)===te:(s&te)===te){te!==0&&te===ui&&(Fu=!0),re!==null&&(re=re.next={lane:0,tag:M.tag,payload:M.payload,callback:null,next:null});e:{var xe=t,ze=M;te=a;var dt=i;switch(ze.tag){case 1:if(xe=ze.payload,typeof xe=="function"){le=xe.call(dt,le,te);break e}le=xe;break e;case 3:xe.flags=xe.flags&-65537|128;case 0:if(xe=ze.payload,te=typeof xe=="function"?xe.call(dt,le,te):xe,te==null)break e;le=F({},le,te);break e;case 2:zn=!0}}te=M.callback,te!==null&&(t.flags|=64,ae&&(t.flags|=8192),ae=d.callbacks,ae===null?d.callbacks=[te]:ae.push(te))}else ae={lane:te,tag:M.tag,payload:M.payload,callback:M.callback,next:null},re===null?(P=re=ae,U=le):re=re.next=ae,_|=te;if(M=M.next,M===null){if(M=d.shared.pending,M===null)break;ae=M,M=ae.next,ae.next=null,d.lastBaseUpdate=ae,d.shared.pending=null}}while(!0);re===null&&(U=le),d.baseState=U,d.firstBaseUpdate=P,d.lastBaseUpdate=re,m===null&&(d.shared.lanes=0),An|=_,t.lanes=_,t.memoizedState=le}}function gg(t,a){if(typeof t!="function")throw Error(l(191,t));t.call(a)}function mg(t,a){var i=t.callbacks;if(i!==null)for(t.callbacks=null,t=0;t<i.length;t++)gg(i[t],a)}function _o(t,a){try{var i=a.updateQueue,s=i!==null?i.lastEffect:null;if(s!==null){var d=s.next;i=d;do{if((i.tag&t)===t){s=void 0;var m=i.create,_=i.inst;s=m(),_.destroy=s}i=i.next}while(i!==d)}}catch(M){Xe(a,a.return,M)}}function Tn(t,a,i){try{var s=a.updateQueue,d=s!==null?s.lastEffect:null;if(d!==null){var m=d.next;s=m;do{if((s.tag&t)===t){var _=s.inst,M=_.destroy;if(M!==void 0){_.destroy=void 0,d=a;var U=i;try{M()}catch(P){Xe(d,U,P)}}}s=s.next}while(s!==m)}}catch(P){Xe(a,a.return,P)}}function hg(t){var a=t.updateQueue;if(a!==null){var i=t.stateNode;try{mg(a,i)}catch(s){Xe(t,t.return,s)}}}function yg(t,a,i){i.props=Tr(t.type,t.memoizedProps),i.state=t.memoizedState;try{i.componentWillUnmount()}catch(s){Xe(t,a,s)}}function Or(t,a){try{var i=t.ref;if(i!==null){var s=t.stateNode;switch(t.tag){case 26:case 27:case 5:var d=s;break;default:d=s}typeof i=="function"?t.refCleanup=i(d):i.current=d}}catch(m){Xe(t,a,m)}}function da(t,a){var i=t.ref,s=t.refCleanup;if(i!==null)if(typeof s=="function")try{s()}catch(d){Xe(t,a,d)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(d){Xe(t,a,d)}else i.current=null}function vg(t){var a=t.type,i=t.memoizedProps,s=t.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":i.autoFocus&&s.focus();break e;case"img":i.src?s.src=i.src:i.srcSet&&(s.srcset=i.srcSet)}}catch(d){Xe(t,t.return,d)}}function $g(t,a,i){try{var s=t.stateNode;P2(s,t.type,i,a),s[ta]=a}catch(d){Xe(t,t.return,d)}}function bg(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27||t.tag===4}function Yu(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||bg(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==27&&t.tag!==18;){if(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 Ku(t,a,i){var s=t.tag;if(s===5||s===6)t=t.stateNode,a?i.nodeType===8?i.parentNode.insertBefore(t,a):i.insertBefore(t,a):(i.nodeType===8?(a=i.parentNode,a.insertBefore(t,i)):(a=i,a.appendChild(t)),i=i._reactRootContainer,i!=null||a.onclick!==null||(a.onclick=as));else if(s!==4&&s!==27&&(t=t.child,t!==null))for(Ku(t,a,i),t=t.sibling;t!==null;)Ku(t,a,i),t=t.sibling}function ql(t,a,i){var s=t.tag;if(s===5||s===6)t=t.stateNode,a?i.insertBefore(t,a):i.appendChild(t);else if(s!==4&&s!==27&&(t=t.child,t!==null))for(ql(t,a,i),t=t.sibling;t!==null;)ql(t,a,i),t=t.sibling}var en=!1,ct=!1,Wu=!1,xg=typeof WeakSet=="function"?WeakSet:Set,Mt=null,_g=!1;function b2(t,a){if(t=t.containerInfo,Sd=cs,t=Lp(t),Jc(t)){if("selectionStart"in t)var i={start:t.selectionStart,end:t.selectionEnd};else e:{i=(i=t.ownerDocument)&&i.defaultView||window;var s=i.getSelection&&i.getSelection();if(s&&s.rangeCount!==0){i=s.anchorNode;var d=s.anchorOffset,m=s.focusNode;s=s.focusOffset;try{i.nodeType,m.nodeType}catch{i=null;break e}var _=0,M=-1,U=-1,P=0,re=0,le=t,te=null;t:for(;;){for(var ae;le!==i||d!==0&&le.nodeType!==3||(M=_+d),le!==m||s!==0&&le.nodeType!==3||(U=_+s),le.nodeType===3&&(_+=le.nodeValue.length),(ae=le.firstChild)!==null;)te=le,le=ae;for(;;){if(le===t)break t;if(te===i&&++P===d&&(M=_),te===m&&++re===s&&(U=_),(ae=le.nextSibling)!==null)break;le=te,te=le.parentNode}le=ae}i=M===-1||U===-1?null:{start:M,end:U}}else i=null}i=i||{start:0,end:0}}else i=null;for(wd={focusedElem:t,selectionRange:i},cs=!1,Mt=a;Mt!==null;)if(a=Mt,t=a.child,(a.subtreeFlags&1028)!==0&&t!==null)t.return=a,Mt=t;else for(;Mt!==null;){switch(a=Mt,m=a.alternate,t=a.flags,a.tag){case 0:break;case 11:case 15:break;case 1:if((t&1024)!==0&&m!==null){t=void 0,i=a,d=m.memoizedProps,m=m.memoizedState,s=i.stateNode;try{var xe=Tr(i.type,d,i.elementType===i.type);t=s.getSnapshotBeforeUpdate(xe,m),s.__reactInternalSnapshotBeforeUpdate=t}catch(ze){Xe(i,i.return,ze)}}break;case 3:if((t&1024)!==0){if(t=a.stateNode.containerInfo,i=t.nodeType,i===9)Ed(t);else if(i===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Ed(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,Mt=t;break}Mt=a.return}return xe=_g,_g=!1,xe}function jg(t,a,i){var s=i.flags;switch(i.tag){case 0:case 11:case 15:an(t,i),s&4&&_o(5,i);break;case 1:if(an(t,i),s&4)if(t=i.stateNode,a===null)try{t.componentDidMount()}catch(M){Xe(i,i.return,M)}else{var d=Tr(i.type,a.memoizedProps);a=a.memoizedState;try{t.componentDidUpdate(d,a,t.__reactInternalSnapshotBeforeUpdate)}catch(M){Xe(i,i.return,M)}}s&64&&hg(i),s&512&&Or(i,i.return);break;case 3:if(an(t,i),s&64&&(s=i.updateQueue,s!==null)){if(t=null,i.child!==null)switch(i.child.tag){case 27:case 5:t=i.child.stateNode;break;case 1:t=i.child.stateNode}try{mg(s,t)}catch(M){Xe(i,i.return,M)}}break;case 26:an(t,i),s&512&&Or(i,i.return);break;case 27:case 5:an(t,i),a===null&&s&4&&vg(i),s&512&&Or(i,i.return);break;case 12:an(t,i);break;case 13:an(t,i),s&4&&kg(t,i);break;case 22:if(d=i.memoizedState!==null||en,!d){a=a!==null&&a.memoizedState!==null||ct;var m=en,_=ct;en=d,(ct=a)&&!_?Mn(t,i,(i.subtreeFlags&8772)!==0):an(t,i),en=m,ct=_}s&512&&(i.memoizedProps.mode==="manual"?Or(i,i.return):da(i,i.return));break;default:an(t,i)}}function Sg(t){var a=t.alternate;a!==null&&(t.alternate=null,Sg(a)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(a=t.stateNode,a!==null&&Dc(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 bt=null,fa=!1;function tn(t,a,i){for(i=i.child;i!==null;)wg(t,a,i),i=i.sibling}function wg(t,a,i){if(sa&&typeof sa.onCommitFiberUnmount=="function")try{sa.onCommitFiberUnmount(Pi,i)}catch{}switch(i.tag){case 26:ct||da(i,a),tn(t,a,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:ct||da(i,a);var s=bt,d=fa;for(bt=i.stateNode,tn(t,a,i),i=i.stateNode,a=i.attributes;a.length;)i.removeAttributeNode(a[0]);Dc(i),bt=s,fa=d;break;case 5:ct||da(i,a);case 6:d=bt;var m=fa;if(bt=null,tn(t,a,i),bt=d,fa=m,bt!==null)if(fa)try{t=bt,s=i.stateNode,t.nodeType===8?t.parentNode.removeChild(s):t.removeChild(s)}catch(_){Xe(i,a,_)}else try{bt.removeChild(i.stateNode)}catch(_){Xe(i,a,_)}break;case 18:bt!==null&&(fa?(a=bt,i=i.stateNode,a.nodeType===8?zd(a.parentNode,i):a.nodeType===1&&zd(a,i),Vo(a)):zd(bt,i.stateNode));break;case 4:s=bt,d=fa,bt=i.stateNode.containerInfo,fa=!0,tn(t,a,i),bt=s,fa=d;break;case 0:case 11:case 14:case 15:ct||Tn(2,i,a),ct||Tn(4,i,a),tn(t,a,i);break;case 1:ct||(da(i,a),s=i.stateNode,typeof s.componentWillUnmount=="function"&&yg(i,a,s)),tn(t,a,i);break;case 21:tn(t,a,i);break;case 22:ct||da(i,a),ct=(s=ct)||i.memoizedState!==null,tn(t,a,i),ct=s;break;default:tn(t,a,i)}}function kg(t,a){if(a.memoizedState===null&&(t=a.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Vo(t)}catch(i){Xe(a,a.return,i)}}function x2(t){switch(t.tag){case 13:case 19:var a=t.stateNode;return a===null&&(a=t.stateNode=new xg),a;case 22:return t=t.stateNode,a=t._retryCache,a===null&&(a=t._retryCache=new xg),a;default:throw Error(l(435,t.tag))}}function Xu(t,a){var i=x2(t);a.forEach(function(s){var d=O2.bind(null,t,s);i.has(s)||(i.add(s),s.then(d,d))})}function Sa(t,a){var i=a.deletions;if(i!==null)for(var s=0;s<i.length;s++){var d=i[s],m=t,_=a,M=_;e:for(;M!==null;){switch(M.tag){case 27:case 5:bt=M.stateNode,fa=!1;break e;case 3:bt=M.stateNode.containerInfo,fa=!0;break e;case 4:bt=M.stateNode.containerInfo,fa=!0;break e}M=M.return}if(bt===null)throw Error(l(160));wg(m,_,d),bt=null,fa=!1,m=d.alternate,m!==null&&(m.return=null),d.return=null}if(a.subtreeFlags&13878)for(a=a.child;a!==null;)Ng(a,t),a=a.sibling}var Ra=null;function Ng(t,a){var i=t.alternate,s=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:Sa(a,t),wa(t),s&4&&(Tn(3,t,t.return),_o(3,t),Tn(5,t,t.return));break;case 1:Sa(a,t),wa(t),s&512&&(ct||i===null||da(i,i.return)),s&64&&en&&(t=t.updateQueue,t!==null&&(s=t.callbacks,s!==null&&(i=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=i===null?s:i.concat(s))));break;case 26:var d=Ra;if(Sa(a,t),wa(t),s&512&&(ct||i===null||da(i,i.return)),s&4){var m=i!==null?i.memoizedState:null;if(s=t.memoizedState,i===null)if(s===null)if(t.stateNode===null){e:{s=t.type,i=t.memoizedProps,d=d.ownerDocument||d;t:switch(s){case"title":m=d.getElementsByTagName("title")[0],(!m||m[Fi]||m[Ht]||m.namespaceURI==="http://www.w3.org/2000/svg"||m.hasAttribute("itemprop"))&&(m=d.createElement(s),d.head.insertBefore(m,d.querySelector("head > title"))),Dt(m,s,i),m[Ht]=t,Ct(m),s=m;break e;case"link":var _=vm("link","href",d).get(s+(i.href||""));if(_){for(var M=0;M<_.length;M++)if(m=_[M],m.getAttribute("href")===(i.href==null?null:i.href)&&m.getAttribute("rel")===(i.rel==null?null:i.rel)&&m.getAttribute("title")===(i.title==null?null:i.title)&&m.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){_.splice(M,1);break t}}m=d.createElement(s),Dt(m,s,i),d.head.appendChild(m);break;case"meta":if(_=vm("meta","content",d).get(s+(i.content||""))){for(M=0;M<_.length;M++)if(m=_[M],m.getAttribute("content")===(i.content==null?null:""+i.content)&&m.getAttribute("name")===(i.name==null?null:i.name)&&m.getAttribute("property")===(i.property==null?null:i.property)&&m.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&m.getAttribute("charset")===(i.charSet==null?null:i.charSet)){_.splice(M,1);break t}}m=d.createElement(s),Dt(m,s,i),d.head.appendChild(m);break;default:throw Error(l(468,s))}m[Ht]=t,Ct(m),s=m}t.stateNode=s}else $m(d,t.type,t.stateNode);else t.stateNode=ym(d,s,t.memoizedProps);else m!==s?(m===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):m.count--,s===null?$m(d,t.type,t.stateNode):ym(d,s,t.memoizedProps)):s===null&&t.stateNode!==null&&$g(t,t.memoizedProps,i.memoizedProps)}break;case 27:if(s&4&&t.alternate===null){d=t.stateNode,m=t.memoizedProps;try{for(var U=d.firstChild;U;){var P=U.nextSibling,re=U.nodeName;U[Fi]||re==="HEAD"||re==="BODY"||re==="SCRIPT"||re==="STYLE"||re==="LINK"&&U.rel.toLowerCase()==="stylesheet"||d.removeChild(U),U=P}for(var le=t.type,te=d.attributes;te.length;)d.removeAttributeNode(te[0]);Dt(d,le,m),d[Ht]=t,d[ta]=m}catch(xe){Xe(t,t.return,xe)}}case 5:if(Sa(a,t),wa(t),s&512&&(ct||i===null||da(i,i.return)),t.flags&32){d=t.stateNode;try{Jr(d,"")}catch(xe){Xe(t,t.return,xe)}}s&4&&t.stateNode!=null&&(d=t.memoizedProps,$g(t,d,i!==null?i.memoizedProps:d)),s&1024&&(Wu=!0);break;case 6:if(Sa(a,t),wa(t),s&4){if(t.stateNode===null)throw Error(l(162));s=t.memoizedProps,i=t.stateNode;try{i.nodeValue=s}catch(xe){Xe(t,t.return,xe)}}break;case 3:if(os=null,d=Ra,Ra=rs(a.containerInfo),Sa(a,t),Ra=d,wa(t),s&4&&i!==null&&i.memoizedState.isDehydrated)try{Vo(a.containerInfo)}catch(xe){Xe(t,t.return,xe)}Wu&&(Wu=!1,zg(t));break;case 4:s=Ra,Ra=rs(t.stateNode.containerInfo),Sa(a,t),wa(t),Ra=s;break;case 12:Sa(a,t),wa(t);break;case 13:Sa(a,t),wa(t),t.child.flags&8192&&t.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(od=ea()),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,Xu(t,s)));break;case 22:if(s&512&&(ct||i===null||da(i,i.return)),U=t.memoizedState!==null,P=i!==null&&i.memoizedState!==null,re=en,le=ct,en=re||U,ct=le||P,Sa(a,t),ct=le,en=re,wa(t),a=t.stateNode,a._current=t,a._visibility&=-3,a._visibility|=a._pendingVisibility&2,s&8192&&(a._visibility=U?a._visibility&-2:a._visibility|1,U&&(a=en||ct,i===null||P||a||mi(t)),t.memoizedProps===null||t.memoizedProps.mode!=="manual"))e:for(i=null,a=t;;){if(a.tag===5||a.tag===26||a.tag===27){if(i===null){P=i=a;try{if(d=P.stateNode,U)m=d.style,typeof m.setProperty=="function"?m.setProperty("display","none","important"):m.display="none";else{_=P.stateNode,M=P.memoizedProps.style;var ae=M!=null&&M.hasOwnProperty("display")?M.display:null;_.style.display=ae==null||typeof ae=="boolean"?"":(""+ae).trim()}}catch(xe){Xe(P,P.return,xe)}}}else if(a.tag===6){if(i===null){P=a;try{P.stateNode.nodeValue=U?"":P.memoizedProps}catch(xe){Xe(P,P.return,xe)}}}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;i===a&&(i=null),a=a.return}i===a&&(i=null),a.sibling.return=a.return,a=a.sibling}s&4&&(s=t.updateQueue,s!==null&&(i=s.retryQueue,i!==null&&(s.retryQueue=null,Xu(t,i))));break;case 19:Sa(a,t),wa(t),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,Xu(t,s)));break;case 21:break;default:Sa(a,t),wa(t)}}function wa(t){var a=t.flags;if(a&2){try{if(t.tag!==27){e:{for(var i=t.return;i!==null;){if(bg(i)){var s=i;break e}i=i.return}throw Error(l(160))}switch(s.tag){case 27:var d=s.stateNode,m=Yu(t);ql(t,m,d);break;case 5:var _=s.stateNode;s.flags&32&&(Jr(_,""),s.flags&=-33);var M=Yu(t);ql(t,M,_);break;case 3:case 4:var U=s.stateNode.containerInfo,P=Yu(t);Ku(t,P,U);break;default:throw Error(l(161))}}}catch(re){Xe(t,t.return,re)}t.flags&=-3}a&4096&&(t.flags&=-4097)}function zg(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var a=t;zg(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),t=t.sibling}}function an(t,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)jg(t,a.alternate,a),a=a.sibling}function mi(t){for(t=t.child;t!==null;){var a=t;switch(a.tag){case 0:case 11:case 14:case 15:Tn(4,a,a.return),mi(a);break;case 1:da(a,a.return);var i=a.stateNode;typeof i.componentWillUnmount=="function"&&yg(a,a.return,i),mi(a);break;case 26:case 27:case 5:da(a,a.return),mi(a);break;case 22:da(a,a.return),a.memoizedState===null&&mi(a);break;default:mi(a)}t=t.sibling}}function Mn(t,a,i){for(i=i&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var s=a.alternate,d=t,m=a,_=m.flags;switch(m.tag){case 0:case 11:case 15:Mn(d,m,i),_o(4,m);break;case 1:if(Mn(d,m,i),s=m,d=s.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(P){Xe(s,s.return,P)}if(s=m,d=s.updateQueue,d!==null){var M=s.stateNode;try{var U=d.shared.hiddenCallbacks;if(U!==null)for(d.shared.hiddenCallbacks=null,d=0;d<U.length;d++)gg(U[d],M)}catch(P){Xe(s,s.return,P)}}i&&_&64&&hg(m),Or(m,m.return);break;case 26:case 27:case 5:Mn(d,m,i),i&&s===null&&_&4&&vg(m),Or(m,m.return);break;case 12:Mn(d,m,i);break;case 13:Mn(d,m,i),i&&_&4&&kg(d,m);break;case 22:m.memoizedState===null&&Mn(d,m,i),Or(m,m.return);break;default:Mn(d,m,i)}a=a.sibling}}function Ju(t,a){var i=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),t=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(t=a.memoizedState.cachePool.pool),t!==i&&(t!=null&&t.refCount++,i!=null&&fo(i))}function Qu(t,a){t=null,a.alternate!==null&&(t=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==t&&(a.refCount++,t!=null&&fo(t))}function Rn(t,a,i,s){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)Eg(t,a,i,s),a=a.sibling}function Eg(t,a,i,s){var d=a.flags;switch(a.tag){case 0:case 11:case 15:Rn(t,a,i,s),d&2048&&_o(9,a);break;case 3:Rn(t,a,i,s),d&2048&&(t=null,a.alternate!==null&&(t=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==t&&(a.refCount++,t!=null&&fo(t)));break;case 12:if(d&2048){Rn(t,a,i,s),t=a.stateNode;try{var m=a.memoizedProps,_=m.id,M=m.onPostCommit;typeof M=="function"&&M(_,a.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(U){Xe(a,a.return,U)}}else Rn(t,a,i,s);break;case 23:break;case 22:m=a.stateNode,a.memoizedState!==null?m._visibility&4?Rn(t,a,i,s):jo(t,a):m._visibility&4?Rn(t,a,i,s):(m._visibility|=4,hi(t,a,i,s,(a.subtreeFlags&10256)!==0)),d&2048&&Ju(a.alternate,a);break;case 24:Rn(t,a,i,s),d&2048&&Qu(a.alternate,a);break;default:Rn(t,a,i,s)}}function hi(t,a,i,s,d){for(d=d&&(a.subtreeFlags&10256)!==0,a=a.child;a!==null;){var m=t,_=a,M=i,U=s,P=_.flags;switch(_.tag){case 0:case 11:case 15:hi(m,_,M,U,d),_o(8,_);break;case 23:break;case 22:var re=_.stateNode;_.memoizedState!==null?re._visibility&4?hi(m,_,M,U,d):jo(m,_):(re._visibility|=4,hi(m,_,M,U,d)),d&&P&2048&&Ju(_.alternate,_);break;case 24:hi(m,_,M,U,d),d&&P&2048&&Qu(_.alternate,_);break;default:hi(m,_,M,U,d)}a=a.sibling}}function jo(t,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var i=t,s=a,d=s.flags;switch(s.tag){case 22:jo(i,s),d&2048&&Ju(s.alternate,s);break;case 24:jo(i,s),d&2048&&Qu(s.alternate,s);break;default:jo(i,s)}a=a.sibling}}var So=8192;function yi(t){if(t.subtreeFlags&So)for(t=t.child;t!==null;)Cg(t),t=t.sibling}function Cg(t){switch(t.tag){case 26:yi(t),t.flags&So&&t.memoizedState!==null&&cb(Ra,t.memoizedState,t.memoizedProps);break;case 5:yi(t);break;case 3:case 4:var a=Ra;Ra=rs(t.stateNode.containerInfo),yi(t),Ra=a;break;case 22:t.memoizedState===null&&(a=t.alternate,a!==null&&a.memoizedState!==null?(a=So,So=16777216,yi(t),So=a):yi(t));break;default:yi(t)}}function Tg(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 wo(t){var a=t.deletions;if((t.flags&16)!==0){if(a!==null)for(var i=0;i<a.length;i++){var s=a[i];Mt=s,Rg(s,t)}Tg(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Mg(t),t=t.sibling}function Mg(t){switch(t.tag){case 0:case 11:case 15:wo(t),t.flags&2048&&Tn(9,t,t.return);break;case 3:wo(t);break;case 12:wo(t);break;case 22:var a=t.stateNode;t.memoizedState!==null&&a._visibility&4&&(t.return===null||t.return.tag!==13)?(a._visibility&=-5,Pl(t)):wo(t);break;default:wo(t)}}function Pl(t){var a=t.deletions;if((t.flags&16)!==0){if(a!==null)for(var i=0;i<a.length;i++){var s=a[i];Mt=s,Rg(s,t)}Tg(t)}for(t=t.child;t!==null;){switch(a=t,a.tag){case 0:case 11:case 15:Tn(8,a,a.return),Pl(a);break;case 22:i=a.stateNode,i._visibility&4&&(i._visibility&=-5,Pl(a));break;default:Pl(a)}t=t.sibling}}function Rg(t,a){for(;Mt!==null;){var i=Mt;switch(i.tag){case 0:case 11:case 15:Tn(8,i,a);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var s=i.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:fo(i.memoizedState.cache)}if(s=i.child,s!==null)s.return=i,Mt=s;else e:for(i=t;Mt!==null;){s=Mt;var d=s.sibling,m=s.return;if(Sg(s),s===i){Mt=null;break e}if(d!==null){d.return=m,Mt=d;break e}Mt=m}}}function _2(t,a,i,s){this.tag=t,this.key=i,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 ka(t,a,i,s){return new _2(t,a,i,s)}function ed(t){return t=t.prototype,!(!t||!t.isReactComponent)}function On(t,a){var i=t.alternate;return i===null?(i=ka(t.tag,a,t.key,t.mode),i.elementType=t.elementType,i.type=t.type,i.stateNode=t.stateNode,i.alternate=t,t.alternate=i):(i.pendingProps=a,i.type=t.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=t.flags&31457280,i.childLanes=t.childLanes,i.lanes=t.lanes,i.child=t.child,i.memoizedProps=t.memoizedProps,i.memoizedState=t.memoizedState,i.updateQueue=t.updateQueue,a=t.dependencies,i.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},i.sibling=t.sibling,i.index=t.index,i.ref=t.ref,i.refCleanup=t.refCleanup,i}function Og(t,a){t.flags&=31457282;var i=t.alternate;return i===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=i.childLanes,t.lanes=i.lanes,t.child=i.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=i.memoizedProps,t.memoizedState=i.memoizedState,t.updateQueue=i.updateQueue,t.type=i.type,a=i.dependencies,t.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),t}function Zl(t,a,i,s,d,m){var _=0;if(s=t,typeof t=="function")ed(t)&&(_=1);else if(typeof t=="string")_=lb(t,i,Z.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case g:return Ar(i.children,d,m,a);case h:_=8,d|=24;break;case y:return t=ka(12,i,a,d|2),t.elementType=y,t.lanes=m,t;case E:return t=ka(13,i,a,d),t.elementType=E,t.lanes=m,t;case z:return t=ka(19,i,a,d),t.elementType=z,t.lanes=m,t;case w:return Ag(i,d,m,a);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case v:case N:_=10;break e;case S:_=9;break e;case x:_=11;break e;case k:_=14;break e;case $:_=16,s=null;break e}_=29,i=Error(l(130,t===null?"null":typeof t,"")),s=null}return a=ka(_,i,a,d),a.elementType=t,a.type=s,a.lanes=m,a}function Ar(t,a,i,s){return t=ka(7,t,s,a),t.lanes=i,t}function Ag(t,a,i,s){t=ka(22,t,s,a),t.elementType=w,t.lanes=i;var d={_visibility:1,_pendingVisibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null,_current:null,detach:function(){var m=d._current;if(m===null)throw Error(l(456));if((d._pendingVisibility&2)===0){var _=_n(m,2);_!==null&&(d._pendingVisibility|=2,Yt(_,m,2))}},attach:function(){var m=d._current;if(m===null)throw Error(l(456));if((d._pendingVisibility&2)!==0){var _=_n(m,2);_!==null&&(d._pendingVisibility&=-3,Yt(_,m,2))}}};return t.stateNode=d,t}function td(t,a,i){return t=ka(6,t,null,a),t.lanes=i,t}function ad(t,a,i){return a=ka(4,t.children!==null?t.children:[],t.key,a),a.lanes=i,a.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},a}function nn(t){t.flags|=4}function Dg(t,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!bm(a)){if(a=ja.current,a!==null&&((Be&4194176)===Be?Ia!==null:(Be&62914560)!==Be&&(Be&536870912)===0||a!==Ia))throw so=lu,Qp;t.flags|=8192}}function Gl(t,a){a!==null&&(t.flags|=4),t.flags&16384&&(a=t.tag!==22?ep():536870912,t.lanes|=a,$i|=a)}function ko(t,a){if(!Pe)switch(t.tailMode){case"hidden":a=t.tail;for(var i=null;a!==null;)a.alternate!==null&&(i=a),a=a.sibling;i===null?t.tail=null:i.sibling=null;break;case"collapsed":i=t.tail;for(var s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?a||t.tail===null?t.tail=null:t.tail.sibling=null:s.sibling=null}}function ot(t){var a=t.alternate!==null&&t.alternate.child===t.child,i=0,s=0;if(a)for(var d=t.child;d!==null;)i|=d.lanes|d.childLanes,s|=d.subtreeFlags&31457280,s|=d.flags&31457280,d.return=t,d=d.sibling;else for(d=t.child;d!==null;)i|=d.lanes|d.childLanes,s|=d.subtreeFlags,s|=d.flags,d.return=t,d=d.sibling;return t.subtreeFlags|=s,t.childLanes=i,a}function j2(t,a,i){var s=a.pendingProps;switch(iu(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ot(a),null;case 1:return ot(a),null;case 3:return i=a.stateNode,s=null,t!==null&&(s=t.memoizedState.cache),a.memoizedState.cache!==s&&(a.flags|=2048),Qa(kt),Ne(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(t===null||t.child===null)&&(ro(a)?nn(a):t===null||t.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Ma!==null&&(ud(Ma),Ma=null))),ot(a),null;case 26:return i=a.memoizedState,t===null?(nn(a),i!==null?(ot(a),Dg(a,i)):(ot(a),a.flags&=-16777217)):i?i!==t.memoizedState?(nn(a),ot(a),Dg(a,i)):(ot(a),a.flags&=-16777217):(t.memoizedProps!==s&&nn(a),ot(a),a.flags&=-16777217),null;case 27:Vt(a),i=ie.current;var d=a.type;if(t!==null&&a.stateNode!=null)t.memoizedProps!==s&&nn(a);else{if(!s){if(a.stateNode===null)throw Error(l(166));return ot(a),null}t=Z.current,ro(a)?Xp(a):(t=fm(d,s,i),a.stateNode=t,nn(a))}return ot(a),null;case 5:if(Vt(a),i=a.type,t!==null&&a.stateNode!=null)t.memoizedProps!==s&&nn(a);else{if(!s){if(a.stateNode===null)throw Error(l(166));return ot(a),null}if(t=Z.current,ro(a))Xp(a);else{switch(d=ns(ie.current),t){case 1:t=d.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:t=d.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":t=d.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":t=d.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":t=d.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild);break;case"select":t=typeof s.is=="string"?d.createElement("select",{is:s.is}):d.createElement("select"),s.multiple?t.multiple=!0:s.size&&(t.size=s.size);break;default:t=typeof s.is=="string"?d.createElement(i,{is:s.is}):d.createElement(i)}}t[Ht]=a,t[ta]=s;e:for(d=a.child;d!==null;){if(d.tag===5||d.tag===6)t.appendChild(d.stateNode);else if(d.tag!==4&&d.tag!==27&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===a)break e;for(;d.sibling===null;){if(d.return===null||d.return===a)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}a.stateNode=t;e:switch(Dt(t,i,s),i){case"button":case"input":case"select":case"textarea":t=!!s.autoFocus;break e;case"img":t=!0;break e;default:t=!1}t&&nn(a)}}return ot(a),a.flags&=-16777217,null;case 6:if(t&&a.stateNode!=null)t.memoizedProps!==s&&nn(a);else{if(typeof s!="string"&&a.stateNode===null)throw Error(l(166));if(t=ie.current,ro(a)){if(t=a.stateNode,i=a.memoizedProps,s=null,d=Ft,d!==null)switch(d.tag){case 27:case 5:s=d.memoizedProps}t[Ht]=a,t=!!(t.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||om(t.nodeValue,i)),t||wr(a)}else t=ns(t).createTextNode(s),t[Ht]=a,a.stateNode=t}return ot(a),null;case 13:if(s=a.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(d=ro(a),s!==null&&s.dehydrated!==null){if(t===null){if(!d)throw Error(l(318));if(d=a.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(l(317));d[Ht]=a}else io(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;ot(a),d=!1}else Ma!==null&&(ud(Ma),Ma=null),d=!0;if(!d)return a.flags&256?(Ka(a),a):(Ka(a),null)}if(Ka(a),(a.flags&128)!==0)return a.lanes=i,a;if(i=s!==null,t=t!==null&&t.memoizedState!==null,i){s=a.child,d=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(d=s.alternate.memoizedState.cachePool.pool);var m=null;s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(m=s.memoizedState.cachePool.pool),m!==d&&(s.flags|=2048)}return i!==t&&i&&(a.child.flags|=8192),Gl(a,a.updateQueue),ot(a),null;case 4:return Ne(),t===null&&xd(a.stateNode.containerInfo),ot(a),null;case 10:return Qa(a.type),ot(a),null;case 19:if(we(wt),d=a.memoizedState,d===null)return ot(a),null;if(s=(a.flags&128)!==0,m=d.rendering,m===null)if(s)ko(d,!1);else{if(ut!==0||t!==null&&(t.flags&128)!==0)for(t=a.child;t!==null;){if(m=El(t),m!==null){for(a.flags|=128,ko(d,!1),t=m.updateQueue,a.updateQueue=t,Gl(a,t),a.subtreeFlags=0,t=i,i=a.child;i!==null;)Og(i,t),i=i.sibling;return be(wt,wt.current&1|2),a.child}t=t.sibling}d.tail!==null&&ea()>Fl&&(a.flags|=128,s=!0,ko(d,!1),a.lanes=4194304)}else{if(!s)if(t=El(m),t!==null){if(a.flags|=128,s=!0,t=t.updateQueue,a.updateQueue=t,Gl(a,t),ko(d,!0),d.tail===null&&d.tailMode==="hidden"&&!m.alternate&&!Pe)return ot(a),null}else 2*ea()-d.renderingStartTime>Fl&&i!==536870912&&(a.flags|=128,s=!0,ko(d,!1),a.lanes=4194304);d.isBackwards?(m.sibling=a.child,a.child=m):(t=d.last,t!==null?t.sibling=m:a.child=m,d.last=m)}return d.tail!==null?(a=d.tail,d.rendering=a,d.tail=a.sibling,d.renderingStartTime=ea(),a.sibling=null,t=wt.current,be(wt,s?t&1|2:t&1),a):(ot(a),null);case 22:case 23:return Ka(a),cu(),s=a.memoizedState!==null,t!==null?t.memoizedState!==null!==s&&(a.flags|=8192):s&&(a.flags|=8192),s?(i&536870912)!==0&&(a.flags&128)===0&&(ot(a),a.subtreeFlags&6&&(a.flags|=8192)):ot(a),i=a.updateQueue,i!==null&&Gl(a,i.retryQueue),i=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),s=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(s=a.memoizedState.cachePool.pool),s!==i&&(a.flags|=2048),t!==null&&we(Nr),null;case 24:return i=null,t!==null&&(i=t.memoizedState.cache),a.memoizedState.cache!==i&&(a.flags|=2048),Qa(kt),ot(a),null;case 25:return null}throw Error(l(156,a.tag))}function S2(t,a){switch(iu(a),a.tag){case 1:return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 3:return Qa(kt),Ne(),t=a.flags,(t&65536)!==0&&(t&128)===0?(a.flags=t&-65537|128,a):null;case 26:case 27:case 5:return Vt(a),null;case 13:if(Ka(a),t=a.memoizedState,t!==null&&t.dehydrated!==null){if(a.alternate===null)throw Error(l(340));io()}return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 19:return we(wt),null;case 4:return Ne(),null;case 10:return Qa(a.type),null;case 22:case 23:return Ka(a),cu(),t!==null&&we(Nr),t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 24:return Qa(kt),null;case 25:return null;default:return null}}function Ug(t,a){switch(iu(a),a.tag){case 3:Qa(kt),Ne();break;case 26:case 27:case 5:Vt(a);break;case 4:Ne();break;case 13:Ka(a);break;case 19:we(wt);break;case 10:Qa(a.type);break;case 22:case 23:Ka(a),cu(),t!==null&&we(Nr);break;case 24:Qa(kt)}}var w2={getCacheForType:function(t){var a=Bt(kt),i=a.data.get(t);return i===void 0&&(i=t(),a.data.set(t,i)),i}},k2=typeof WeakMap=="function"?WeakMap:Map,lt=0,Je=null,Ie=null,Be=0,Qe=0,pa=null,rn=!1,vi=!1,nd=!1,on=0,ut=0,An=0,Dr=0,rd=0,Na=0,$i=0,No=null,Va=null,id=!1,od=0,Fl=1/0,Yl=null,Dn=null,Kl=!1,Ur=null,zo=0,ld=0,sd=null,Eo=0,cd=null;function ga(){if((lt&2)!==0&&Be!==0)return Be&-Be;if(V.T!==null){var t=ui;return t!==0?t:yd()}return rp()}function Ig(){Na===0&&(Na=(Be&536870912)===0||Pe?Qf():536870912);var t=ja.current;return t!==null&&(t.flags|=32),Na}function Yt(t,a,i){(t===Je&&Qe===2||t.cancelPendingCommit!==null)&&(bi(t,0),ln(t,Be,Na,!1)),Gi(t,i),((lt&2)===0||t!==Je)&&(t===Je&&((lt&2)===0&&(Dr|=i),ut===4&&ln(t,Be,Na,!1)),Ha(t))}function Lg(t,a,i){if((lt&6)!==0)throw Error(l(327));var s=!i&&(a&60)===0&&(a&t.expiredLanes)===0||Zi(t,a),d=s?E2(t,a):pd(t,a,!0),m=s;do{if(d===0){vi&&!s&&ln(t,a,0,!1);break}else if(d===6)ln(t,a,0,!rn);else{if(i=t.current.alternate,m&&!N2(i)){d=pd(t,a,!1),m=!1;continue}if(d===2){if(m=a,t.errorRecoveryDisabledLanes&m)var _=0;else _=t.pendingLanes&-536870913,_=_!==0?_:_&536870912?536870912:0;if(_!==0){a=_;e:{var M=t;d=No;var U=M.current.memoizedState.isDehydrated;if(U&&(bi(M,_).flags|=256),_=pd(M,_,!1),_!==2){if(nd&&!U){M.errorRecoveryDisabledLanes|=m,Dr|=m,d=4;break e}m=Va,Va=d,m!==null&&ud(m)}d=_}if(m=!1,d!==2)continue}}if(d===1){bi(t,0),ln(t,a,0,!0);break}e:{switch(s=t,d){case 0:case 1:throw Error(l(345));case 4:if((a&4194176)===a){ln(s,a,Na,!rn);break e}break;case 2:Va=null;break;case 3:case 5:break;default:throw Error(l(329))}if(s.finishedWork=i,s.finishedLanes=a,(a&62914560)===a&&(m=od+300-ea(),10<m)){if(ln(s,a,Na,!rn),sl(s,0)!==0)break e;s.timeoutHandle=cm(Vg.bind(null,s,i,Va,Yl,id,a,Na,Dr,$i,rn,2,-0,0),m);break e}Vg(s,i,Va,Yl,id,a,Na,Dr,$i,rn,0,-0,0)}}break}while(!0);Ha(t)}function ud(t){Va===null?Va=t:Va.push.apply(Va,t)}function Vg(t,a,i,s,d,m,_,M,U,P,re,le,te){var ae=a.subtreeFlags;if((ae&8192||(ae&16785408)===16785408)&&(Ao={stylesheets:null,count:0,unsuspend:sb},Cg(a),a=ub(),a!==null)){t.cancelPendingCommit=a(Fg.bind(null,t,i,s,d,_,M,U,1,le,te)),ln(t,m,_,!P);return}Fg(t,i,s,d,_,M,U,re,le,te)}function N2(t){for(var a=t;;){var i=a.tag;if((i===0||i===11||i===15)&&a.flags&16384&&(i=a.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var s=0;s<i.length;s++){var d=i[s],m=d.getSnapshot;d=d.value;try{if(!ua(m(),d))return!1}catch{return!1}}if(i=a.child,a.subtreeFlags&16384&&i!==null)i.return=a,a=i;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 ln(t,a,i,s){a&=~rd,a&=~Dr,t.suspendedLanes|=a,t.pingedLanes&=~a,s&&(t.warmLanes|=a),s=t.expirationTimes;for(var d=a;0<d;){var m=31-ca(d),_=1<<m;s[m]=-1,d&=~_}i!==0&&tp(t,i,a)}function Wl(){return(lt&6)===0?(Co(0),!1):!0}function dd(){if(Ie!==null){if(Qe===0)var t=Ie.return;else t=Ie,Ja=Mr=null,yu(t),si=null,co=0,t=Ie;for(;t!==null;)Ug(t.alternate,t),t=t.return;Ie=null}}function bi(t,a){t.finishedWork=null,t.finishedLanes=0;var i=t.timeoutHandle;i!==-1&&(t.timeoutHandle=-1,G2(i)),i=t.cancelPendingCommit,i!==null&&(t.cancelPendingCommit=null,i()),dd(),Je=t,Ie=i=On(t.current,null),Be=a,Qe=0,pa=null,rn=!1,vi=Zi(t,a),nd=!1,$i=Na=rd=Dr=An=ut=0,Va=No=null,id=!1,(a&8)!==0&&(a|=a&32);var s=t.entangledLanes;if(s!==0)for(t=t.entanglements,s&=a;0<s;){var d=31-ca(s),m=1<<d;a|=t[d],s&=~m}return on=a,bl(),i}function Hg(t,a){Me=null,V.H=La,a===lo?(a=a0(),Qe=3):a===Qp?(a=a0(),Qe=4):Qe=a===eg?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,pa=a,Ie===null&&(ut=1,Vl(t,ba(a,t.current)))}function Bg(){var t=V.H;return V.H=La,t===null?La:t}function qg(){var t=V.A;return V.A=w2,t}function fd(){ut=4,rn||(Be&4194176)!==Be&&ja.current!==null||(vi=!0),(An&134217727)===0&&(Dr&134217727)===0||Je===null||ln(Je,Be,Na,!1)}function pd(t,a,i){var s=lt;lt|=2;var d=Bg(),m=qg();(Je!==t||Be!==a)&&(Yl=null,bi(t,a)),a=!1;var _=ut;e:do try{if(Qe!==0&&Ie!==null){var M=Ie,U=pa;switch(Qe){case 8:dd(),_=6;break e;case 3:case 2:case 6:ja.current===null&&(a=!0);var P=Qe;if(Qe=0,pa=null,xi(t,M,U,P),i&&vi){_=0;break e}break;default:P=Qe,Qe=0,pa=null,xi(t,M,U,P)}}z2(),_=ut;break}catch(re){Hg(t,re)}while(!0);return a&&t.shellSuspendCounter++,Ja=Mr=null,lt=s,V.H=d,V.A=m,Ie===null&&(Je=null,Be=0,bl()),_}function z2(){for(;Ie!==null;)Pg(Ie)}function E2(t,a){var i=lt;lt|=2;var s=Bg(),d=qg();Je!==t||Be!==a?(Yl=null,Fl=ea()+500,bi(t,a)):vi=Zi(t,a);e:do try{if(Qe!==0&&Ie!==null){a=Ie;var m=pa;t:switch(Qe){case 1:Qe=0,pa=null,xi(t,a,m,1);break;case 2:if(e0(m)){Qe=0,pa=null,Zg(a);break}a=function(){Qe===2&&Je===t&&(Qe=7),Ha(t)},m.then(a,a);break e;case 3:Qe=7;break e;case 4:Qe=5;break e;case 7:e0(m)?(Qe=0,pa=null,Zg(a)):(Qe=0,pa=null,xi(t,a,m,7));break;case 5:var _=null;switch(Ie.tag){case 26:_=Ie.memoizedState;case 5:case 27:var M=Ie;if(!_||bm(_)){Qe=0,pa=null;var U=M.sibling;if(U!==null)Ie=U;else{var P=M.return;P!==null?(Ie=P,Xl(P)):Ie=null}break t}}Qe=0,pa=null,xi(t,a,m,5);break;case 6:Qe=0,pa=null,xi(t,a,m,6);break;case 8:dd(),ut=6;break e;default:throw Error(l(462))}}C2();break}catch(re){Hg(t,re)}while(!0);return Ja=Mr=null,V.H=s,V.A=d,lt=i,Ie!==null?0:(Je=null,Be=0,bl(),ut)}function C2(){for(;Ie!==null&&!yn();)Pg(Ie)}function Pg(t){var a=fg(t.alternate,t,on);t.memoizedProps=t.pendingProps,a===null?Xl(t):Ie=a}function Zg(t){var a=t,i=a.alternate;switch(a.tag){case 15:case 0:a=og(i,a,a.pendingProps,a.type,void 0,Be);break;case 11:a=og(i,a,a.pendingProps,a.type.render,a.ref,Be);break;case 5:yu(a);default:Ug(i,a),a=Ie=Og(a,on),a=fg(i,a,on)}t.memoizedProps=t.pendingProps,a===null?Xl(t):Ie=a}function xi(t,a,i,s){Ja=Mr=null,yu(a),si=null,co=0;var d=a.return;try{if(v2(t,d,a,i,Be)){ut=1,Vl(t,ba(i,t.current)),Ie=null;return}}catch(m){if(d!==null)throw Ie=d,m;ut=1,Vl(t,ba(i,t.current)),Ie=null;return}a.flags&32768?(Pe||s===1?t=!0:vi||(Be&536870912)!==0?t=!1:(rn=t=!0,(s===2||s===3||s===6)&&(s=ja.current,s!==null&&s.tag===13&&(s.flags|=16384))),Gg(a,t)):Xl(a)}function Xl(t){var a=t;do{if((a.flags&32768)!==0){Gg(a,rn);return}t=a.return;var i=j2(a.alternate,a,on);if(i!==null){Ie=i;return}if(a=a.sibling,a!==null){Ie=a;return}Ie=a=t}while(a!==null);ut===0&&(ut=5)}function Gg(t,a){do{var i=S2(t.alternate,t);if(i!==null){i.flags&=32767,Ie=i;return}if(i=t.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!a&&(t=t.sibling,t!==null)){Ie=t;return}Ie=t=i}while(t!==null);ut=6,Ie=null}function Fg(t,a,i,s,d,m,_,M,U,P){var re=V.T,le=C.p;try{C.p=2,V.T=null,T2(t,a,i,s,le,d,m,_,M,U,P)}finally{V.T=re,C.p=le}}function T2(t,a,i,s,d,m,_,M){do _i();while(Ur!==null);if((lt&6)!==0)throw Error(l(327));var U=t.finishedWork;if(s=t.finishedLanes,U===null)return null;if(t.finishedWork=null,t.finishedLanes=0,U===t.current)throw Error(l(177));t.callbackNode=null,t.callbackPriority=0,t.cancelPendingCommit=null;var P=U.lanes|U.childLanes;if(P|=au,c$(t,s,P,m,_,M),t===Je&&(Ie=Je=null,Be=0),(U.subtreeFlags&10256)===0&&(U.flags&10256)===0||Kl||(Kl=!0,ld=P,sd=i,A2(hr,function(){return _i(),null})),i=(U.flags&15990)!==0,(U.subtreeFlags&15990)!==0||i?(i=V.T,V.T=null,m=C.p,C.p=2,_=lt,lt|=4,b2(t,U),Ng(U,t),t2(wd,t.containerInfo),cs=!!Sd,wd=Sd=null,t.current=U,jg(t,U.alternate,U),Qt(),lt=_,C.p=m,V.T=i):t.current=U,Kl?(Kl=!1,Ur=t,zo=s):Yg(t,P),P=t.pendingLanes,P===0&&(Dn=null),r$(U.stateNode),Ha(t),a!==null)for(d=t.onRecoverableError,U=0;U<a.length;U++)P=a[U],d(P.value,{componentStack:P.stack});return(zo&3)!==0&&_i(),P=t.pendingLanes,(s&4194218)!==0&&(P&42)!==0?t===cd?Eo++:(Eo=0,cd=t):Eo=0,Co(0),null}function Yg(t,a){(t.pooledCacheLanes&=a)===0&&(a=t.pooledCache,a!=null&&(t.pooledCache=null,fo(a)))}function _i(){if(Ur!==null){var t=Ur,a=ld;ld=0;var i=np(zo),s=V.T,d=C.p;try{if(C.p=32>i?32:i,V.T=null,Ur===null)var m=!1;else{i=sd,sd=null;var _=Ur,M=zo;if(Ur=null,zo=0,(lt&6)!==0)throw Error(l(331));var U=lt;if(lt|=4,Mg(_.current),Eg(_,_.current,M,i),lt=U,Co(0,!1),sa&&typeof sa.onPostCommitFiberRoot=="function")try{sa.onPostCommitFiberRoot(Pi,_)}catch{}m=!0}return m}finally{C.p=d,V.T=s,Yg(t,a)}}return!1}function Kg(t,a,i){a=ba(i,a),a=Tu(t.stateNode,a,2),t=Cn(t,a,2),t!==null&&(Gi(t,2),Ha(t))}function Xe(t,a,i){if(t.tag===3)Kg(t,t,i);else for(;a!==null;){if(a.tag===3){Kg(a,t,i);break}else if(a.tag===1){var s=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Dn===null||!Dn.has(s))){t=ba(i,t),i=J0(2),s=Cn(a,i,2),s!==null&&(Q0(i,s,a,t),Gi(s,2),Ha(s));break}}a=a.return}}function gd(t,a,i){var s=t.pingCache;if(s===null){s=t.pingCache=new k2;var d=new Set;s.set(a,d)}else d=s.get(a),d===void 0&&(d=new Set,s.set(a,d));d.has(i)||(nd=!0,d.add(i),t=M2.bind(null,t,a,i),a.then(t,t))}function M2(t,a,i){var s=t.pingCache;s!==null&&s.delete(a),t.pingedLanes|=t.suspendedLanes&i,t.warmLanes&=~i,Je===t&&(Be&i)===i&&(ut===4||ut===3&&(Be&62914560)===Be&&300>ea()-od?(lt&2)===0&&bi(t,0):rd|=i,$i===Be&&($i=0)),Ha(t)}function Wg(t,a){a===0&&(a=ep()),t=_n(t,a),t!==null&&(Gi(t,a),Ha(t))}function R2(t){var a=t.memoizedState,i=0;a!==null&&(i=a.retryLane),Wg(t,i)}function O2(t,a){var i=0;switch(t.tag){case 13:var s=t.stateNode,d=t.memoizedState;d!==null&&(i=d.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),Wg(t,i)}function A2(t,a){return Et(t,a)}var Jl=null,ji=null,md=!1,Ql=!1,hd=!1,Ir=0;function Ha(t){t!==ji&&t.next===null&&(ji===null?Jl=ji=t:ji=ji.next=t),Ql=!0,md||(md=!0,U2(D2))}function Co(t,a){if(!hd&&Ql){hd=!0;do for(var i=!1,s=Jl;s!==null;){if(t!==0){var d=s.pendingLanes;if(d===0)var m=0;else{var _=s.suspendedLanes,M=s.pingedLanes;m=(1<<31-ca(42|t)+1)-1,m&=d&~(_&~M),m=m&201326677?m&201326677|1:m?m|2:0}m!==0&&(i=!0,Qg(s,m))}else m=Be,m=sl(s,s===Je?m:0),(m&3)===0||Zi(s,m)||(i=!0,Qg(s,m));s=s.next}while(i);hd=!1}}function D2(){Ql=md=!1;var t=0;Ir!==0&&(Z2()&&(t=Ir),Ir=0);for(var a=ea(),i=null,s=Jl;s!==null;){var d=s.next,m=Xg(s,a);m===0?(s.next=null,i===null?Jl=d:i.next=d,d===null&&(ji=i)):(i=s,(t!==0||(m&3)!==0)&&(Ql=!0)),s=d}Co(t)}function Xg(t,a){for(var i=t.suspendedLanes,s=t.pingedLanes,d=t.expirationTimes,m=t.pendingLanes&-62914561;0<m;){var _=31-ca(m),M=1<<_,U=d[_];U===-1?((M&i)===0||(M&s)!==0)&&(d[_]=s$(M,a)):U<=a&&(t.expiredLanes|=M),m&=~M}if(a=Je,i=Be,i=sl(t,t===a?i:0),s=t.callbackNode,i===0||t===a&&Qe===2||t.cancelPendingCommit!==null)return s!==null&&s!==null&&gt(s),t.callbackNode=null,t.callbackPriority=0;if((i&3)===0||Zi(t,i)){if(a=i&-i,a===t.callbackPriority)return a;switch(s!==null&&gt(s),np(i)){case 2:case 8:i=Gr;break;case 32:i=hr;break;case 268435456:i=il;break;default:i=hr}return s=Jg.bind(null,t),i=Et(i,s),t.callbackPriority=a,t.callbackNode=i,a}return s!==null&&s!==null&&gt(s),t.callbackPriority=2,t.callbackNode=null,2}function Jg(t,a){var i=t.callbackNode;if(_i()&&t.callbackNode!==i)return null;var s=Be;return s=sl(t,t===Je?s:0),s===0?null:(Lg(t,s,a),Xg(t,ea()),t.callbackNode!=null&&t.callbackNode===i?Jg.bind(null,t):null)}function Qg(t,a){if(_i())return null;Lg(t,a,!0)}function U2(t){F2(function(){(lt&6)!==0?Et(vn,t):t()})}function yd(){return Ir===0&&(Ir=Qf()),Ir}function em(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:pl(""+t)}function tm(t,a){var i=a.ownerDocument.createElement("input");return i.name=a.name,i.value=a.value,t.id&&i.setAttribute("form",t.id),a.parentNode.insertBefore(i,a),t=new FormData(t),i.parentNode.removeChild(i),t}function I2(t,a,i,s,d){if(a==="submit"&&i&&i.stateNode===d){var m=em((d[ta]||null).action),_=s.submitter;_&&(a=(a=_[ta]||null)?em(a.formAction):_.getAttribute("formAction"),a!==null&&(m=a,_=null));var M=new yl("action","action",null,s,d);t.push({event:M,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Ir!==0){var U=_?tm(d,_):new FormData(d);ku(i,{pending:!0,data:U,method:d.method,action:m},null,U)}}else typeof m=="function"&&(M.preventDefault(),U=_?tm(d,_):new FormData(d),ku(i,{pending:!0,data:U,method:d.method,action:m},m,U))},currentTarget:d}]})}}for(var vd=0;vd<Fp.length;vd++){var $d=Fp[vd],L2=$d.toLowerCase(),V2=$d[0].toUpperCase()+$d.slice(1);Ta(L2,"on"+V2)}Ta(Bp,"onAnimationEnd"),Ta(qp,"onAnimationIteration"),Ta(Pp,"onAnimationStart"),Ta("dblclick","onDoubleClick"),Ta("focusin","onFocus"),Ta("focusout","onBlur"),Ta(n2,"onTransitionRun"),Ta(r2,"onTransitionStart"),Ta(i2,"onTransitionCancel"),Ta(Zp,"onTransitionEnd"),Wr("onMouseEnter",["mouseout","mouseover"]),Wr("onMouseLeave",["mouseout","mouseover"]),Wr("onPointerEnter",["pointerout","pointerover"]),Wr("onPointerLeave",["pointerout","pointerover"]),$r("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),$r("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),$r("onBeforeInput",["compositionend","keypress","textInput","paste"]),$r("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),$r("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),$r("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var To="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(" "),H2=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(To));function am(t,a){a=(a&4)!==0;for(var i=0;i<t.length;i++){var s=t[i],d=s.event;s=s.listeners;e:{var m=void 0;if(a)for(var _=s.length-1;0<=_;_--){var M=s[_],U=M.instance,P=M.currentTarget;if(M=M.listener,U!==m&&d.isPropagationStopped())break e;m=M,d.currentTarget=P;try{m(d)}catch(re){Ll(re)}d.currentTarget=null,m=U}else for(_=0;_<s.length;_++){if(M=s[_],U=M.instance,P=M.currentTarget,M=M.listener,U!==m&&d.isPropagationStopped())break e;m=M,d.currentTarget=P;try{m(d)}catch(re){Ll(re)}d.currentTarget=null,m=U}}}}function Le(t,a){var i=a[Ac];i===void 0&&(i=a[Ac]=new Set);var s=t+"__bubble";i.has(s)||(nm(a,t,2,!1),i.add(s))}function bd(t,a,i){var s=0;a&&(s|=4),nm(i,t,s,a)}var es="_reactListening"+Math.random().toString(36).slice(2);function xd(t){if(!t[es]){t[es]=!0,op.forEach(function(i){i!=="selectionchange"&&(H2.has(i)||bd(i,!1,t),bd(i,!0,t))});var a=t.nodeType===9?t:t.ownerDocument;a===null||a[es]||(a[es]=!0,bd("selectionchange",!1,a))}}function nm(t,a,i,s){switch(km(a)){case 2:var d=pb;break;case 8:d=gb;break;default:d=Od}i=d.bind(null,a,i,t),d=void 0,!qc||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(d=!0),s?d!==void 0?t.addEventListener(a,i,{capture:!0,passive:d}):t.addEventListener(a,i,!0):d!==void 0?t.addEventListener(a,i,{passive:d}):t.addEventListener(a,i,!1)}function _d(t,a,i,s,d){var m=s;if((a&1)===0&&(a&2)===0&&s!==null)e:for(;;){if(s===null)return;var _=s.tag;if(_===3||_===4){var M=s.stateNode.containerInfo;if(M===d||M.nodeType===8&&M.parentNode===d)break;if(_===4)for(_=s.return;_!==null;){var U=_.tag;if((U===3||U===4)&&(U=_.stateNode.containerInfo,U===d||U.nodeType===8&&U.parentNode===d))return;_=_.return}for(;M!==null;){if(_=vr(M),_===null)return;if(U=_.tag,U===5||U===6||U===26||U===27){s=m=_;continue e}M=M.parentNode}}s=s.return}vp(function(){var P=m,re=Hc(i),le=[];e:{var te=Gp.get(t);if(te!==void 0){var ae=yl,xe=t;switch(t){case"keypress":if(ml(i)===0)break e;case"keydown":case"keyup":ae=O$;break;case"focusin":xe="focus",ae=Fc;break;case"focusout":xe="blur",ae=Fc;break;case"beforeblur":case"afterblur":ae=Fc;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ae=xp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ae=_$;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ae=U$;break;case Bp:case qp:case Pp:ae=w$;break;case Zp:ae=L$;break;case"scroll":case"scrollend":ae=b$;break;case"wheel":ae=H$;break;case"copy":case"cut":case"paste":ae=N$;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ae=jp;break;case"toggle":case"beforetoggle":ae=q$}var ze=(a&4)!==0,dt=!ze&&(t==="scroll"||t==="scrollend"),Y=ze?te!==null?te+"Capture":null:te;ze=[];for(var q=P,X;q!==null;){var oe=q;if(X=oe.stateNode,oe=oe.tag,oe!==5&&oe!==26&&oe!==27||X===null||Y===null||(oe=Ki(q,Y),oe!=null&&ze.push(Mo(q,oe,X))),dt)break;q=q.return}0<ze.length&&(te=new ae(te,xe,null,i,re),le.push({event:te,listeners:ze}))}}if((a&7)===0){e:{if(te=t==="mouseover"||t==="pointerover",ae=t==="mouseout"||t==="pointerout",te&&i!==Vc&&(xe=i.relatedTarget||i.fromElement)&&(vr(xe)||xe[Fr]))break e;if((ae||te)&&(te=re.window===re?re:(te=re.ownerDocument)?te.defaultView||te.parentWindow:window,ae?(xe=i.relatedTarget||i.toElement,ae=P,xe=xe?vr(xe):null,xe!==null&&(dt=ge(xe),ze=xe.tag,xe!==dt||ze!==5&&ze!==27&&ze!==6)&&(xe=null)):(ae=null,xe=P),ae!==xe)){if(ze=xp,oe="onMouseLeave",Y="onMouseEnter",q="mouse",(t==="pointerout"||t==="pointerover")&&(ze=jp,oe="onPointerLeave",Y="onPointerEnter",q="pointer"),dt=ae==null?te:Yi(ae),X=xe==null?te:Yi(xe),te=new ze(oe,q+"leave",ae,i,re),te.target=dt,te.relatedTarget=X,oe=null,vr(re)===P&&(ze=new ze(Y,q+"enter",xe,i,re),ze.target=X,ze.relatedTarget=dt,oe=ze),dt=oe,ae&&xe)t:{for(ze=ae,Y=xe,q=0,X=ze;X;X=Si(X))q++;for(X=0,oe=Y;oe;oe=Si(oe))X++;for(;0<q-X;)ze=Si(ze),q--;for(;0<X-q;)Y=Si(Y),X--;for(;q--;){if(ze===Y||Y!==null&&ze===Y.alternate)break t;ze=Si(ze),Y=Si(Y)}ze=null}else ze=null;ae!==null&&rm(le,te,ae,ze,!1),xe!==null&&dt!==null&&rm(le,dt,xe,ze,!0)}}e:{if(te=P?Yi(P):window,ae=te.nodeName&&te.nodeName.toLowerCase(),ae==="select"||ae==="input"&&te.type==="file")var ye=Tp;else if(Ep(te))if(Mp)ye=Q$;else{ye=X$;var De=W$}else ae=te.nodeName,!ae||ae.toLowerCase()!=="input"||te.type!=="checkbox"&&te.type!=="radio"?P&&Lc(P.elementType)&&(ye=Tp):ye=J$;if(ye&&(ye=ye(t,P))){Cp(le,ye,i,re);break e}De&&De(t,te,P),t==="focusout"&&P&&te.type==="number"&&P.memoizedProps.value!=null&&Ic(te,"number",te.value)}switch(De=P?Yi(P):window,t){case"focusin":(Ep(De)||De.contentEditable==="true")&&(ai=De,Qc=P,no=null);break;case"focusout":no=Qc=ai=null;break;case"mousedown":eu=!0;break;case"contextmenu":case"mouseup":case"dragend":eu=!1,Vp(le,i,re);break;case"selectionchange":if(a2)break;case"keydown":case"keyup":Vp(le,i,re)}var Se;if(Kc)e:{switch(t){case"compositionstart":var ke="onCompositionStart";break e;case"compositionend":ke="onCompositionEnd";break e;case"compositionupdate":ke="onCompositionUpdate";break e}ke=void 0}else ti?Np(t,i)&&(ke="onCompositionEnd"):t==="keydown"&&i.keyCode===229&&(ke="onCompositionStart");ke&&(Sp&&i.locale!=="ko"&&(ti||ke!=="onCompositionStart"?ke==="onCompositionEnd"&&ti&&(Se=$p()):(xn=re,Pc="value"in xn?xn.value:xn.textContent,ti=!0)),De=ts(P,ke),0<De.length&&(ke=new _p(ke,t,null,i,re),le.push({event:ke,listeners:De}),Se?ke.data=Se:(Se=zp(i),Se!==null&&(ke.data=Se)))),(Se=Z$?G$(t,i):F$(t,i))&&(ke=ts(P,"onBeforeInput"),0<ke.length&&(De=new _p("onBeforeInput","beforeinput",null,i,re),le.push({event:De,listeners:ke}),De.data=Se)),I2(le,t,P,i,re)}am(le,a)})}function Mo(t,a,i){return{instance:t,listener:a,currentTarget:i}}function ts(t,a){for(var i=a+"Capture",s=[];t!==null;){var d=t,m=d.stateNode;d=d.tag,d!==5&&d!==26&&d!==27||m===null||(d=Ki(t,i),d!=null&&s.unshift(Mo(t,d,m)),d=Ki(t,a),d!=null&&s.push(Mo(t,d,m))),t=t.return}return s}function Si(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function rm(t,a,i,s,d){for(var m=a._reactName,_=[];i!==null&&i!==s;){var M=i,U=M.alternate,P=M.stateNode;if(M=M.tag,U!==null&&U===s)break;M!==5&&M!==26&&M!==27||P===null||(U=P,d?(P=Ki(i,m),P!=null&&_.unshift(Mo(i,P,U))):d||(P=Ki(i,m),P!=null&&_.push(Mo(i,P,U)))),i=i.return}_.length!==0&&t.push({event:a,listeners:_})}var B2=/\r\n?/g,q2=/\u0000|\uFFFD/g;function im(t){return(typeof t=="string"?t:""+t).replace(B2,`
49
+ `).replace(q2,"")}function om(t,a){return a=im(a),im(t)===a}function as(){}function Ye(t,a,i,s,d,m){switch(i){case"children":typeof s=="string"?a==="body"||a==="textarea"&&s===""||Jr(t,s):(typeof s=="number"||typeof s=="bigint")&&a!=="body"&&Jr(t,""+s);break;case"className":ul(t,"class",s);break;case"tabIndex":ul(t,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":ul(t,i,s);break;case"style":hp(t,s,m);break;case"data":if(a!=="object"){ul(t,"data",s);break}case"src":case"href":if(s===""&&(a!=="a"||i!=="href")){t.removeAttribute(i);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){t.removeAttribute(i);break}s=pl(""+s),t.setAttribute(i,s);break;case"action":case"formAction":if(typeof s=="function"){t.setAttribute(i,"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"&&(i==="formAction"?(a!=="input"&&Ye(t,a,"name",d.name,d,null),Ye(t,a,"formEncType",d.formEncType,d,null),Ye(t,a,"formMethod",d.formMethod,d,null),Ye(t,a,"formTarget",d.formTarget,d,null)):(Ye(t,a,"encType",d.encType,d,null),Ye(t,a,"method",d.method,d,null),Ye(t,a,"target",d.target,d,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){t.removeAttribute(i);break}s=pl(""+s),t.setAttribute(i,s);break;case"onClick":s!=null&&(t.onclick=as);break;case"onScroll":s!=null&&Le("scroll",t);break;case"onScrollEnd":s!=null&&Le("scrollend",t);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(l(61));if(i=s.__html,i!=null){if(d.children!=null)throw Error(l(60));t.innerHTML=i}}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}i=pl(""+s),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);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(i,""+s):t.removeAttribute(i);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(i,""):t.removeAttribute(i);break;case"capture":case"download":s===!0?t.setAttribute(i,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(i,s):t.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?t.setAttribute(i,s):t.removeAttribute(i);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?t.removeAttribute(i):t.setAttribute(i,s);break;case"popover":Le("beforetoggle",t),Le("toggle",t),cl(t,"popover",s);break;case"xlinkActuate":Ga(t,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":Ga(t,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":Ga(t,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":Ga(t,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":Ga(t,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":Ga(t,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":Ga(t,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":Ga(t,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":Ga(t,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":cl(t,"is",s);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=v$.get(i)||i,cl(t,i,s))}}function jd(t,a,i,s,d,m){switch(i){case"style":hp(t,s,m);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(l(61));if(i=s.__html,i!=null){if(d.children!=null)throw Error(l(60));t.innerHTML=i}}break;case"children":typeof s=="string"?Jr(t,s):(typeof s=="number"||typeof s=="bigint")&&Jr(t,""+s);break;case"onScroll":s!=null&&Le("scroll",t);break;case"onScrollEnd":s!=null&&Le("scrollend",t);break;case"onClick":s!=null&&(t.onclick=as);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!lp.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(d=i.endsWith("Capture"),a=i.slice(2,d?i.length-7:void 0),m=t[ta]||null,m=m!=null?m[i]:null,typeof m=="function"&&t.removeEventListener(a,m,d),typeof s=="function")){typeof m!="function"&&m!==null&&(i in t?t[i]=null:t.hasAttribute(i)&&t.removeAttribute(i)),t.addEventListener(a,s,d);break e}i in t?t[i]=s:s===!0?t.setAttribute(i,""):cl(t,i,s)}}}function Dt(t,a,i){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Le("error",t),Le("load",t);var s=!1,d=!1,m;for(m in i)if(i.hasOwnProperty(m)){var _=i[m];if(_!=null)switch(m){case"src":s=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,a));default:Ye(t,a,m,_,i,null)}}d&&Ye(t,a,"srcSet",i.srcSet,i,null),s&&Ye(t,a,"src",i.src,i,null);return;case"input":Le("invalid",t);var M=m=_=d=null,U=null,P=null;for(s in i)if(i.hasOwnProperty(s)){var re=i[s];if(re!=null)switch(s){case"name":d=re;break;case"type":_=re;break;case"checked":U=re;break;case"defaultChecked":P=re;break;case"value":m=re;break;case"defaultValue":M=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(l(137,a));break;default:Ye(t,a,s,re,i,null)}}fp(t,m,M,U,P,_,d,!1),dl(t);return;case"select":Le("invalid",t),s=_=m=null;for(d in i)if(i.hasOwnProperty(d)&&(M=i[d],M!=null))switch(d){case"value":m=M;break;case"defaultValue":_=M;break;case"multiple":s=M;default:Ye(t,a,d,M,i,null)}a=m,i=_,t.multiple=!!s,a!=null?Xr(t,!!s,a,!1):i!=null&&Xr(t,!!s,i,!0);return;case"textarea":Le("invalid",t),m=d=s=null;for(_ in i)if(i.hasOwnProperty(_)&&(M=i[_],M!=null))switch(_){case"value":s=M;break;case"defaultValue":d=M;break;case"children":m=M;break;case"dangerouslySetInnerHTML":if(M!=null)throw Error(l(91));break;default:Ye(t,a,_,M,i,null)}gp(t,s,d,m),dl(t);return;case"option":for(U in i)if(i.hasOwnProperty(U)&&(s=i[U],s!=null))switch(U){case"selected":t.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:Ye(t,a,U,s,i,null)}return;case"dialog":Le("cancel",t),Le("close",t);break;case"iframe":case"object":Le("load",t);break;case"video":case"audio":for(s=0;s<To.length;s++)Le(To[s],t);break;case"image":Le("error",t),Le("load",t);break;case"details":Le("toggle",t);break;case"embed":case"source":case"link":Le("error",t),Le("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(P in i)if(i.hasOwnProperty(P)&&(s=i[P],s!=null))switch(P){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,a));default:Ye(t,a,P,s,i,null)}return;default:if(Lc(a)){for(re in i)i.hasOwnProperty(re)&&(s=i[re],s!==void 0&&jd(t,a,re,s,i,void 0));return}}for(M in i)i.hasOwnProperty(M)&&(s=i[M],s!=null&&Ye(t,a,M,s,i,null))}function P2(t,a,i,s){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,m=null,_=null,M=null,U=null,P=null,re=null;for(ae in i){var le=i[ae];if(i.hasOwnProperty(ae)&&le!=null)switch(ae){case"checked":break;case"value":break;case"defaultValue":U=le;default:s.hasOwnProperty(ae)||Ye(t,a,ae,null,s,le)}}for(var te in s){var ae=s[te];if(le=i[te],s.hasOwnProperty(te)&&(ae!=null||le!=null))switch(te){case"type":m=ae;break;case"name":d=ae;break;case"checked":P=ae;break;case"defaultChecked":re=ae;break;case"value":_=ae;break;case"defaultValue":M=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(l(137,a));break;default:ae!==le&&Ye(t,a,te,ae,s,le)}}Uc(t,_,M,U,P,re,m,d);return;case"select":ae=_=M=te=null;for(m in i)if(U=i[m],i.hasOwnProperty(m)&&U!=null)switch(m){case"value":break;case"multiple":ae=U;default:s.hasOwnProperty(m)||Ye(t,a,m,null,s,U)}for(d in s)if(m=s[d],U=i[d],s.hasOwnProperty(d)&&(m!=null||U!=null))switch(d){case"value":te=m;break;case"defaultValue":M=m;break;case"multiple":_=m;default:m!==U&&Ye(t,a,d,m,s,U)}a=M,i=_,s=ae,te!=null?Xr(t,!!i,te,!1):!!s!=!!i&&(a!=null?Xr(t,!!i,a,!0):Xr(t,!!i,i?[]:"",!1));return;case"textarea":ae=te=null;for(M in i)if(d=i[M],i.hasOwnProperty(M)&&d!=null&&!s.hasOwnProperty(M))switch(M){case"value":break;case"children":break;default:Ye(t,a,M,null,s,d)}for(_ in s)if(d=s[_],m=i[_],s.hasOwnProperty(_)&&(d!=null||m!=null))switch(_){case"value":te=d;break;case"defaultValue":ae=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(l(91));break;default:d!==m&&Ye(t,a,_,d,s,m)}pp(t,te,ae);return;case"option":for(var xe in i)if(te=i[xe],i.hasOwnProperty(xe)&&te!=null&&!s.hasOwnProperty(xe))switch(xe){case"selected":t.selected=!1;break;default:Ye(t,a,xe,null,s,te)}for(U in s)if(te=s[U],ae=i[U],s.hasOwnProperty(U)&&te!==ae&&(te!=null||ae!=null))switch(U){case"selected":t.selected=te&&typeof te!="function"&&typeof te!="symbol";break;default:Ye(t,a,U,te,s,ae)}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 ze in i)te=i[ze],i.hasOwnProperty(ze)&&te!=null&&!s.hasOwnProperty(ze)&&Ye(t,a,ze,null,s,te);for(P in s)if(te=s[P],ae=i[P],s.hasOwnProperty(P)&&te!==ae&&(te!=null||ae!=null))switch(P){case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(l(137,a));break;default:Ye(t,a,P,te,s,ae)}return;default:if(Lc(a)){for(var dt in i)te=i[dt],i.hasOwnProperty(dt)&&te!==void 0&&!s.hasOwnProperty(dt)&&jd(t,a,dt,void 0,s,te);for(re in s)te=s[re],ae=i[re],!s.hasOwnProperty(re)||te===ae||te===void 0&&ae===void 0||jd(t,a,re,te,s,ae);return}}for(var Y in i)te=i[Y],i.hasOwnProperty(Y)&&te!=null&&!s.hasOwnProperty(Y)&&Ye(t,a,Y,null,s,te);for(le in s)te=s[le],ae=i[le],!s.hasOwnProperty(le)||te===ae||te==null&&ae==null||Ye(t,a,le,te,s,ae)}var Sd=null,wd=null;function ns(t){return t.nodeType===9?t:t.ownerDocument}function lm(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function sm(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 kd(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 Nd=null;function Z2(){var t=window.event;return t&&t.type==="popstate"?t===Nd?!1:(Nd=t,!0):(Nd=null,!1)}var cm=typeof setTimeout=="function"?setTimeout:void 0,G2=typeof clearTimeout=="function"?clearTimeout:void 0,um=typeof Promise=="function"?Promise:void 0,F2=typeof queueMicrotask=="function"?queueMicrotask:typeof um<"u"?function(t){return um.resolve(null).then(t).catch(Y2)}:cm;function Y2(t){setTimeout(function(){throw t})}function zd(t,a){var i=a,s=0;do{var d=i.nextSibling;if(t.removeChild(i),d&&d.nodeType===8)if(i=d.data,i==="/$"){if(s===0){t.removeChild(d),Vo(a);return}s--}else i!=="$"&&i!=="$?"&&i!=="$!"||s++;i=d}while(i);Vo(a)}function Ed(t){var a=t.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var i=a;switch(a=a.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":Ed(i),Dc(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}t.removeChild(i)}}function K2(t,a,i,s){for(;t.nodeType===1;){var d=i;if(t.nodeName.toLowerCase()!==a.toLowerCase()){if(!s&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(s){if(!t[Fi])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!==d.rel||t.getAttribute("href")!==(d.href==null?null:d.href)||t.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||t.getAttribute("title")!==(d.title==null?null:d.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(m=t.getAttribute("src"),(m!==(d.src==null?null:d.src)||t.getAttribute("type")!==(d.type==null?null:d.type)||t.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&m&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(a==="input"&&t.type==="hidden"){var m=d.name==null?null:""+d.name;if(d.type==="hidden"&&t.getAttribute("name")===m)return t}else return t;if(t=Oa(t.nextSibling),t===null)break}return null}function W2(t,a,i){if(a==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!i||(t=Oa(t.nextSibling),t===null))return null;return t}function Oa(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==="F!"||a==="F")break;if(a==="/$")return null}}return t}function dm(t){t=t.previousSibling;for(var a=0;t;){if(t.nodeType===8){var i=t.data;if(i==="$"||i==="$!"||i==="$?"){if(a===0)return t;a--}else i==="/$"&&a++}t=t.previousSibling}return null}function fm(t,a,i){switch(a=ns(i),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))}}var za=new Map,pm=new Set;function rs(t){return typeof t.getRootNode=="function"?t.getRootNode():t.ownerDocument}var sn=C.d;C.d={f:X2,r:J2,D:Q2,C:eb,L:tb,m:ab,X:rb,S:nb,M:ib};function X2(){var t=sn.f(),a=Wl();return t||a}function J2(t){var a=Yr(t);a!==null&&a.tag===5&&a.type==="form"?V0(a):sn.r(t)}var wi=typeof document>"u"?null:document;function gm(t,a,i){var s=wi;if(s&&typeof a=="string"&&a){var d=va(a);d='link[rel="'+t+'"][href="'+d+'"]',typeof i=="string"&&(d+='[crossorigin="'+i+'"]'),pm.has(d)||(pm.add(d),t={rel:t,crossOrigin:i,href:a},s.querySelector(d)===null&&(a=s.createElement("link"),Dt(a,"link",t),Ct(a),s.head.appendChild(a)))}}function Q2(t){sn.D(t),gm("dns-prefetch",t,null)}function eb(t,a){sn.C(t,a),gm("preconnect",t,a)}function tb(t,a,i){sn.L(t,a,i);var s=wi;if(s&&t&&a){var d='link[rel="preload"][as="'+va(a)+'"]';a==="image"&&i&&i.imageSrcSet?(d+='[imagesrcset="'+va(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(d+='[imagesizes="'+va(i.imageSizes)+'"]')):d+='[href="'+va(t)+'"]';var m=d;switch(a){case"style":m=ki(t);break;case"script":m=Ni(t)}za.has(m)||(t=F({rel:"preload",href:a==="image"&&i&&i.imageSrcSet?void 0:t,as:a},i),za.set(m,t),s.querySelector(d)!==null||a==="style"&&s.querySelector(Ro(m))||a==="script"&&s.querySelector(Oo(m))||(a=s.createElement("link"),Dt(a,"link",t),Ct(a),s.head.appendChild(a)))}}function ab(t,a){sn.m(t,a);var i=wi;if(i&&t){var s=a&&typeof a.as=="string"?a.as:"script",d='link[rel="modulepreload"][as="'+va(s)+'"][href="'+va(t)+'"]',m=d;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=Ni(t)}if(!za.has(m)&&(t=F({rel:"modulepreload",href:t},a),za.set(m,t),i.querySelector(d)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Oo(m)))return}s=i.createElement("link"),Dt(s,"link",t),Ct(s),i.head.appendChild(s)}}}function nb(t,a,i){sn.S(t,a,i);var s=wi;if(s&&t){var d=Kr(s).hoistableStyles,m=ki(t);a=a||"default";var _=d.get(m);if(!_){var M={loading:0,preload:null};if(_=s.querySelector(Ro(m)))M.loading=5;else{t=F({rel:"stylesheet",href:t,"data-precedence":a},i),(i=za.get(m))&&Cd(t,i);var U=_=s.createElement("link");Ct(U),Dt(U,"link",t),U._p=new Promise(function(P,re){U.onload=P,U.onerror=re}),U.addEventListener("load",function(){M.loading|=1}),U.addEventListener("error",function(){M.loading|=2}),M.loading|=4,is(_,a,s)}_={type:"stylesheet",instance:_,count:1,state:M},d.set(m,_)}}}function rb(t,a){sn.X(t,a);var i=wi;if(i&&t){var s=Kr(i).hoistableScripts,d=Ni(t),m=s.get(d);m||(m=i.querySelector(Oo(d)),m||(t=F({src:t,async:!0},a),(a=za.get(d))&&Td(t,a),m=i.createElement("script"),Ct(m),Dt(m,"link",t),i.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},s.set(d,m))}}function ib(t,a){sn.M(t,a);var i=wi;if(i&&t){var s=Kr(i).hoistableScripts,d=Ni(t),m=s.get(d);m||(m=i.querySelector(Oo(d)),m||(t=F({src:t,async:!0,type:"module"},a),(a=za.get(d))&&Td(t,a),m=i.createElement("script"),Ct(m),Dt(m,"link",t),i.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},s.set(d,m))}}function mm(t,a,i,s){var d=(d=ie.current)?rs(d):null;if(!d)throw Error(l(446));switch(t){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(a=ki(i.href),i=Kr(d).hoistableStyles,s=i.get(a),s||(s={type:"style",instance:null,count:0,state:null},i.set(a,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){t=ki(i.href);var m=Kr(d).hoistableStyles,_=m.get(t);if(_||(d=d.ownerDocument||d,_={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(t,_),(m=d.querySelector(Ro(t)))&&!m._p&&(_.instance=m,_.state.loading=5),za.has(t)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},za.set(t,i),m||ob(d,t,i,_.state))),a&&s===null)throw Error(l(528,""));return _}if(a&&s!==null)throw Error(l(529,""));return null;case"script":return a=i.async,i=i.src,typeof i=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=Ni(i),i=Kr(d).hoistableScripts,s=i.get(a),s||(s={type:"script",instance:null,count:0,state:null},i.set(a,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,t))}}function ki(t){return'href="'+va(t)+'"'}function Ro(t){return'link[rel="stylesheet"]['+t+"]"}function hm(t){return F({},t,{"data-precedence":t.precedence,precedence:null})}function ob(t,a,i,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}),Dt(a,"link",i),Ct(a),t.head.appendChild(a))}function Ni(t){return'[src="'+va(t)+'"]'}function Oo(t){return"script[async]"+t}function ym(t,a,i){if(a.count++,a.instance===null)switch(a.type){case"style":var s=t.querySelector('style[data-href~="'+va(i.href)+'"]');if(s)return a.instance=s,Ct(s),s;var d=F({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return s=(t.ownerDocument||t).createElement("style"),Ct(s),Dt(s,"style",d),is(s,i.precedence,t),a.instance=s;case"stylesheet":d=ki(i.href);var m=t.querySelector(Ro(d));if(m)return a.state.loading|=4,a.instance=m,Ct(m),m;s=hm(i),(d=za.get(d))&&Cd(s,d),m=(t.ownerDocument||t).createElement("link"),Ct(m);var _=m;return _._p=new Promise(function(M,U){_.onload=M,_.onerror=U}),Dt(m,"link",s),a.state.loading|=4,is(m,i.precedence,t),a.instance=m;case"script":return m=Ni(i.src),(d=t.querySelector(Oo(m)))?(a.instance=d,Ct(d),d):(s=i,(d=za.get(m))&&(s=F({},i),Td(s,d)),t=t.ownerDocument||t,d=t.createElement("script"),Ct(d),Dt(d,"link",s),t.head.appendChild(d),a.instance=d);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,is(s,i.precedence,t));return a.instance}function is(t,a,i){for(var s=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=s.length?s[s.length-1]:null,m=d,_=0;_<s.length;_++){var M=s[_];if(M.dataset.precedence===a)m=M;else if(m!==d)break}m?m.parentNode.insertBefore(t,m.nextSibling):(a=i.nodeType===9?i.head:i,a.insertBefore(t,a.firstChild))}function Cd(t,a){t.crossOrigin==null&&(t.crossOrigin=a.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=a.referrerPolicy),t.title==null&&(t.title=a.title)}function Td(t,a){t.crossOrigin==null&&(t.crossOrigin=a.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=a.referrerPolicy),t.integrity==null&&(t.integrity=a.integrity)}var os=null;function vm(t,a,i){if(os===null){var s=new Map,d=os=new Map;d.set(i,s)}else d=os,s=d.get(i),s||(s=new Map,d.set(i,s));if(s.has(t))return s;for(s.set(t,null),i=i.getElementsByTagName(t),d=0;d<i.length;d++){var m=i[d];if(!(m[Fi]||m[Ht]||t==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var _=m.getAttribute(a)||"";_=t+_;var M=s.get(_);M?M.push(m):s.set(_,[m])}}return s}function $m(t,a,i){t=t.ownerDocument||t,t.head.insertBefore(i,a==="title"?t.querySelector("head > title"):null)}function lb(t,a,i){if(i===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 bm(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}var Ao=null;function sb(){}function cb(t,a,i){if(Ao===null)throw Error(l(475));var s=Ao;if(a.type==="stylesheet"&&(typeof i.media!="string"||matchMedia(i.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var d=ki(i.href),m=t.querySelector(Ro(d));if(m){t=m._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(s.count++,s=ls.bind(s),t.then(s,s)),a.state.loading|=4,a.instance=m,Ct(m);return}m=t.ownerDocument||t,i=hm(i),(d=za.get(d))&&Cd(i,d),m=m.createElement("link"),Ct(m);var _=m;_._p=new Promise(function(M,U){_.onload=M,_.onerror=U}),Dt(m,"link",i),a.instance=m}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(s.count++,a=ls.bind(s),t.addEventListener("load",a),t.addEventListener("error",a))}}function ub(){if(Ao===null)throw Error(l(475));var t=Ao;return t.stylesheets&&t.count===0&&Md(t,t.stylesheets),0<t.count?function(a){var i=setTimeout(function(){if(t.stylesheets&&Md(t,t.stylesheets),t.unsuspend){var s=t.unsuspend;t.unsuspend=null,s()}},6e4);return t.unsuspend=a,function(){t.unsuspend=null,clearTimeout(i)}}:null}function ls(){if(this.count--,this.count===0){if(this.stylesheets)Md(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var ss=null;function Md(t,a){t.stylesheets=null,t.unsuspend!==null&&(t.count++,ss=new Map,a.forEach(db,t),ss=null,ls.call(t))}function db(t,a){if(!(a.state.loading&4)){var i=ss.get(t);if(i)var s=i.get(null);else{i=new Map,ss.set(t,i);for(var d=t.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<d.length;m++){var _=d[m];(_.nodeName==="LINK"||_.getAttribute("media")!=="not all")&&(i.set(_.dataset.precedence,_),s=_)}s&&i.set(null,s)}d=a.instance,_=d.getAttribute("data-precedence"),m=i.get(_)||s,m===s&&i.set(null,d),i.set(_,d),this.count++,s=ls.bind(this),d.addEventListener("load",s),d.addEventListener("error",s),m?m.parentNode.insertBefore(d,m.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(d,t.firstChild)),a.state.loading|=4}}var Do={$$typeof:N,Provider:null,Consumer:null,_currentValue:L,_currentValue2:L,_threadCount:0};function fb(t,a,i,s,d,m,_,M){this.tag=1,this.containerInfo=t,this.finishedWork=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=Oc(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.finishedLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Oc(0),this.hiddenUpdates=Oc(null),this.identifierPrefix=s,this.onUncaughtError=d,this.onCaughtError=m,this.onRecoverableError=_,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=M,this.incompleteTransitions=new Map}function xm(t,a,i,s,d,m,_,M,U,P,re,le){return t=new fb(t,a,i,_,M,U,P,le),a=1,m===!0&&(a|=24),m=ka(3,null,null,a),t.current=m,m.stateNode=t,a=uu(),a.refCount++,t.pooledCache=a,a.refCount++,m.memoizedState={element:s,isDehydrated:i,cache:a},Pu(m),t}function _m(t){return t?(t=ii,t):ii}function jm(t,a,i,s,d,m){d=_m(d),s.context===null?s.context=d:s.pendingContext=d,s=En(a),s.payload={element:i},m=m===void 0?null:m,m!==null&&(s.callback=m),i=Cn(t,s,a),i!==null&&(Yt(i,t,a),$o(i,t,a))}function Sm(t,a){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var i=t.retryLane;t.retryLane=i!==0&&i<a?i:a}}function Rd(t,a){Sm(t,a),(t=t.alternate)&&Sm(t,a)}function wm(t){if(t.tag===13){var a=_n(t,67108864);a!==null&&Yt(a,t,67108864),Rd(t,67108864)}}var cs=!0;function pb(t,a,i,s){var d=V.T;V.T=null;var m=C.p;try{C.p=2,Od(t,a,i,s)}finally{C.p=m,V.T=d}}function gb(t,a,i,s){var d=V.T;V.T=null;var m=C.p;try{C.p=8,Od(t,a,i,s)}finally{C.p=m,V.T=d}}function Od(t,a,i,s){if(cs){var d=Ad(s);if(d===null)_d(t,a,s,us,i),Nm(t,s);else if(hb(d,t,a,i,s))s.stopPropagation();else if(Nm(t,s),a&4&&-1<mb.indexOf(t)){for(;d!==null;){var m=Yr(d);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var _=yr(m.pendingLanes);if(_!==0){var M=m;for(M.pendingLanes|=2,M.entangledLanes|=2;_;){var U=1<<31-ca(_);M.entanglements[1]|=U,_&=~U}Ha(m),(lt&6)===0&&(Fl=ea()+500,Co(0))}}break;case 13:M=_n(m,2),M!==null&&Yt(M,m,2),Wl(),Rd(m,2)}if(m=Ad(s),m===null&&_d(t,a,s,us,i),m===d)break;d=m}d!==null&&s.stopPropagation()}else _d(t,a,s,null,i)}}function Ad(t){return t=Hc(t),Dd(t)}var us=null;function Dd(t){if(us=null,t=vr(t),t!==null){var a=ge(t);if(a===null)t=null;else{var i=a.tag;if(i===13){if(t=Ae(a),t!==null)return t;t=null}else if(i===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;t=null}else a!==t&&(t=null)}}return us=t,null}function km(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(qi()){case vn:return 2;case Gr:return 8;case hr:case rl:return 32;case il:return 268435456;default:return 32}default:return 32}}var Ud=!1,Un=null,In=null,Ln=null,Uo=new Map,Io=new Map,Vn=[],mb="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 Nm(t,a){switch(t){case"focusin":case"focusout":Un=null;break;case"dragenter":case"dragleave":In=null;break;case"mouseover":case"mouseout":Ln=null;break;case"pointerover":case"pointerout":Uo.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":Io.delete(a.pointerId)}}function Lo(t,a,i,s,d,m){return t===null||t.nativeEvent!==m?(t={blockedOn:a,domEventName:i,eventSystemFlags:s,nativeEvent:m,targetContainers:[d]},a!==null&&(a=Yr(a),a!==null&&wm(a)),t):(t.eventSystemFlags|=s,a=t.targetContainers,d!==null&&a.indexOf(d)===-1&&a.push(d),t)}function hb(t,a,i,s,d){switch(a){case"focusin":return Un=Lo(Un,t,a,i,s,d),!0;case"dragenter":return In=Lo(In,t,a,i,s,d),!0;case"mouseover":return Ln=Lo(Ln,t,a,i,s,d),!0;case"pointerover":var m=d.pointerId;return Uo.set(m,Lo(Uo.get(m)||null,t,a,i,s,d)),!0;case"gotpointercapture":return m=d.pointerId,Io.set(m,Lo(Io.get(m)||null,t,a,i,s,d)),!0}return!1}function zm(t){var a=vr(t.target);if(a!==null){var i=ge(a);if(i!==null){if(a=i.tag,a===13){if(a=Ae(i),a!==null){t.blockedOn=a,u$(t.priority,function(){if(i.tag===13){var s=ga(),d=_n(i,s);d!==null&&Yt(d,i,s),Rd(i,s)}});return}}else if(a===3&&i.stateNode.current.memoizedState.isDehydrated){t.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}t.blockedOn=null}function ds(t){if(t.blockedOn!==null)return!1;for(var a=t.targetContainers;0<a.length;){var i=Ad(t.nativeEvent);if(i===null){i=t.nativeEvent;var s=new i.constructor(i.type,i);Vc=s,i.target.dispatchEvent(s),Vc=null}else return a=Yr(i),a!==null&&wm(a),t.blockedOn=i,!1;a.shift()}return!0}function Em(t,a,i){ds(t)&&i.delete(a)}function yb(){Ud=!1,Un!==null&&ds(Un)&&(Un=null),In!==null&&ds(In)&&(In=null),Ln!==null&&ds(Ln)&&(Ln=null),Uo.forEach(Em),Io.forEach(Em)}function fs(t,a){t.blockedOn===a&&(t.blockedOn=null,Ud||(Ud=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,yb)))}var ps=null;function Cm(t){ps!==t&&(ps=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){ps===t&&(ps=null);for(var a=0;a<t.length;a+=3){var i=t[a],s=t[a+1],d=t[a+2];if(typeof s!="function"){if(Dd(s||i)===null)continue;break}var m=Yr(i);m!==null&&(t.splice(a,3),a-=3,ku(m,{pending:!0,data:d,method:i.method,action:s},s,d))}}))}function Vo(t){function a(U){return fs(U,t)}Un!==null&&fs(Un,t),In!==null&&fs(In,t),Ln!==null&&fs(Ln,t),Uo.forEach(a),Io.forEach(a);for(var i=0;i<Vn.length;i++){var s=Vn[i];s.blockedOn===t&&(s.blockedOn=null)}for(;0<Vn.length&&(i=Vn[0],i.blockedOn===null);)zm(i),i.blockedOn===null&&Vn.shift();if(i=(t.ownerDocument||t).$$reactFormReplay,i!=null)for(s=0;s<i.length;s+=3){var d=i[s],m=i[s+1],_=d[ta]||null;if(typeof m=="function")_||Cm(i);else if(_){var M=null;if(m&&m.hasAttribute("formAction")){if(d=m,_=m[ta]||null)M=_.formAction;else if(Dd(d)!==null)continue}else M=_.action;typeof M=="function"?i[s+1]=M:(i.splice(s,3),s-=3),Cm(i)}}}function Id(t){this._internalRoot=t}gs.prototype.render=Id.prototype.render=function(t){var a=this._internalRoot;if(a===null)throw Error(l(409));var i=a.current,s=ga();jm(i,s,t,a,null,null)},gs.prototype.unmount=Id.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var a=t.containerInfo;t.tag===0&&_i(),jm(t.current,2,null,t,null,null),Wl(),a[Fr]=null}};function gs(t){this._internalRoot=t}gs.prototype.unstable_scheduleHydration=function(t){if(t){var a=rp();t={blockedOn:null,target:t,priority:a};for(var i=0;i<Vn.length&&a!==0&&a<Vn[i].priority;i++);Vn.splice(i,0,t),i===0&&zm(t)}};var Tm=n.version;if(Tm!=="19.0.0")throw Error(l(527,Tm,"19.0.0"));C.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=D(a),t=t!==null?ee(t):null,t=t===null?null:t.stateNode,t};var vb={bundleType:0,version:"19.0.0",rendererPackageName:"react-dom",currentDispatcherRef:V,findFiberByHostInstance:vr,reconcilerVersion:"19.0.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ms=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ms.isDisabled&&ms.supportsFiber)try{Pi=ms.inject(vb),sa=ms}catch{}}return Bo.createRoot=function(t,a){if(!c(t))throw Error(l(299));var i=!1,s="",d=Y0,m=K0,_=W0,M=null;return a!=null&&(a.unstable_strictMode===!0&&(i=!0),a.identifierPrefix!==void 0&&(s=a.identifierPrefix),a.onUncaughtError!==void 0&&(d=a.onUncaughtError),a.onCaughtError!==void 0&&(m=a.onCaughtError),a.onRecoverableError!==void 0&&(_=a.onRecoverableError),a.unstable_transitionCallbacks!==void 0&&(M=a.unstable_transitionCallbacks)),a=xm(t,1,!1,null,null,i,s,d,m,_,M,null),t[Fr]=a.current,xd(t.nodeType===8?t.parentNode:t),new Id(a)},Bo.hydrateRoot=function(t,a,i){if(!c(t))throw Error(l(299));var s=!1,d="",m=Y0,_=K0,M=W0,U=null,P=null;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(d=i.identifierPrefix),i.onUncaughtError!==void 0&&(m=i.onUncaughtError),i.onCaughtError!==void 0&&(_=i.onCaughtError),i.onRecoverableError!==void 0&&(M=i.onRecoverableError),i.unstable_transitionCallbacks!==void 0&&(U=i.unstable_transitionCallbacks),i.formState!==void 0&&(P=i.formState)),a=xm(t,1,!0,a,i??null,s,d,m,_,M,U,P),a.context=_m(null),i=a.current,s=ga(),d=En(s),d.callback=null,Cn(i,d,s),a.current.lanes=s,Gi(a,s),Ha(a),t[Fr]=a.current,xd(t),new gs(a)},Bo.version="19.0.0",Bo}var Hm;function Cb(){if(Hm)return Hd.exports;Hm=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(),Hd.exports=Eb(),Hd.exports}var Tb=Cb();function tt({num:e,title:n,mute:o,intro:l}){return r.jsxs("header",{className:"ggui-section__head",children:[r.jsx("div",{className:"ggui-section__num",children:e}),r.jsxs("div",{children:[r.jsxs("h2",{className:"ggui-section__title",children:[n,o?r.jsxs("span",{className:"ggui-mute",children:[" ",o]}):null]}),l?r.jsx("p",{className:"ggui-section__intro",children:l}):null]})]})}const yf="ggui-eui:navigate";function Mb(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 Bm=null,Zd=null;function Rb(e){return(e!==Bm||Zd===null)&&(Bm=e,Zd=Mb(e)),Zd}function Ve(e){typeof window>"u"||(window.history.pushState(null,"",e),window.dispatchEvent(new Event(yf)))}function Ob(e){return typeof window>"u"?()=>{}:(window.addEventListener("popstate",e),window.addEventListener(yf,e),()=>{window.removeEventListener("popstate",e),window.removeEventListener(yf,e)})}function Ab(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 Db=[{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 Ub({route:e,children:n}){return r.jsxs("div",{className:"ggui-config-grid","data-ggui-admin-shell":!0,children:[r.jsx(Ib,{route:e}),r.jsx("div",{className:"ggui-admin-pane",children:n})]})}function Ib({route:e}){return r.jsx("nav",{className:"ggui-config-rail","aria-label":"admin sections","data-ggui-admin-rail":!0,children:Db.map(n=>r.jsxs("div",{"data-ggui-admin-group":n.label,children:[r.jsx("div",{className:"ggui-stack__head",style:{padding:"10px 14px 6px",borderBottom:0},children:r.jsx("span",{className:"ggui-stack__label",style:{fontSize:11},children:n.label})}),r.jsx("ul",{style:{listStyle:"none",margin:0,padding:0},children:n.items.map(o=>{const l=e.kind===o.match;return r.jsx("li",{"data-ggui-admin-item":o.match,children:r.jsx("button",{type:"button",onClick:()=>Ve(o.path),"aria-current":l?"page":void 0,className:`ggui-config-rail__btn${l?" is-active":""}`,children:o.label})},o.path)})})]},n.label))})}const Lb=[{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 Vb({route:e,children:n}){return r.jsxs("div",{className:"ggui-config-grid","data-ggui-devtools-shell":!0,children:[r.jsx(Hb,{route:e}),r.jsx("div",{className:"ggui-admin-pane",children:n})]})}function Hb({route:e}){return r.jsx("nav",{className:"ggui-config-rail","aria-label":"devtools sections","data-ggui-devtools-rail":!0,children:Lb.map(n=>r.jsxs("div",{"data-ggui-devtools-group":n.label,children:[r.jsx("div",{className:"ggui-stack__head",style:{padding:"10px 14px 6px",borderBottom:0},children:r.jsx("span",{className:"ggui-stack__label",style:{fontSize:11},children:n.label})}),r.jsx("ul",{style:{listStyle:"none",margin:0,padding:0},children:n.items.map(o=>{const l=e.kind===o.match;return r.jsx("li",{"data-ggui-devtools-item":o.match,children:r.jsx("button",{type:"button",onClick:()=>Ve(o.path),"aria-current":l?"page":void 0,className:`ggui-config-rail__btn${l?" is-active":""}`,children:o.label})},o.path)})})]},n.label))})}const un="#292929",zi="#d9d9d9",Gd="#f4f3ed",Bb={mirror:{g1Outer:zi,g1Inner:un,g2Outer:un,g2Inner:zi,u:un,i:zi},"mono-ink":{g1Outer:un,g1Inner:un,g2Outer:un,g2Inner:un,u:un,i:un},reverse:{g1Outer:zi,g1Inner:Gd,g2Outer:Gd,g2Inner:zi,u:Gd,i:zi}};function sv({width:e,variant:n="mirror"}){const o=Math.round(e*50/224),l=Bb[n];return r.jsxs("svg",{viewBox:"0 0 224 50",width:e,height:o,"aria-label":"ggui",children:[r.jsx("path",{d:"M 0 0 H 50 V 25 H 25 V 50 H 0 Z",fill:l.g1Outer}),r.jsx("rect",{x:"33",y:"33",width:"17",height:"17",fill:l.g1Inner}),r.jsx("path",{d:"M 58 0 H 108 V 25 H 83 V 50 H 58 Z",fill:l.g2Outer}),r.jsx("rect",{x:"91",y:"33",width:"17",height:"17",fill:l.g2Inner}),r.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}),r.jsx("rect",{x:"174",y:"0",width:"50",height:"50",fill:l.i})]})}function qb(){return r.jsx("footer",{className:"ggui-footer",children:r.jsxs("div",{className:"ggui-footer__inner",children:[r.jsxs("div",{className:"ggui-footer__meta",children:[r.jsxs("div",{children:[r.jsx("strong",{children:"ggui"})," — generative graphical user interface"]}),r.jsx("div",{children:"@ggui-ai/console"}),r.jsx("div",{children:"served by your local ggui serve — same origin only"})]}),r.jsx("div",{className:"ggui-footer__mark",children:r.jsx(sv,{width:160})})]})})}const Pb="ggui-mode";let hs=null;function Zb(){if(hs!==null)return hs;if(typeof document>"u")return"prod";const e=document.querySelector(`meta[name="${Pb}"]`);return hs=(e==null?void 0:e.getAttribute("content"))==="dev"?"dev":"prod",hs}function Gb({route:e,rightSlot:n}){const o=Fb(e),l=Ab(e),c=lv(e),u=Zb()==="dev"&&!c;return r.jsx("nav",{className:"ggui-nav","aria-label":"console navigation",children:r.jsxs("div",{className:"ggui-nav__inner",children:[r.jsxs("div",{className:"ggui-nav__left",children:[r.jsx("button",{type:"button",className:"ggui-nav__link",onClick:()=>Ve("/admin/status"),"aria-label":"go to admin",style:{display:"flex",alignItems:"center"},children:r.jsx(sv,{width:84})}),r.jsx("span",{className:"ggui-nav__brand","aria-label":"ggui console",children:"console"}),r.jsx("span",{className:"ggui-nav__version",children:"v1"}),r.jsx("span",{className:"ggui-nav__version","aria-label":"community edition",children:"community"}),c?r.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?r.jsx("span",{className:"ggui-nav__crumb",children:o}):null]}),r.jsxs("ul",{className:"ggui-nav__links",children:[u?r.jsx("li",{children:r.jsx("button",{type:"button",className:"ggui-nav__link",onClick:()=>Ve("/devtools"),"data-ggui-nav-devtools":!0,children:"devtools →"})}):null,l?null:r.jsx("li",{children:r.jsx("button",{type:"button",className:"ggui-nav__link",onClick:()=>Ve("/admin/status"),children:"admin →"})}),n?r.jsx("li",{children:n}):null]})]})})}function Fb(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 Ut({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 f=n;return o==="admin"?f=r.jsx(Ub,{route:e,children:n}):o==="devtools"&&(f=r.jsx(Vb,{route:e,children:n})),r.jsxs("div",{className:"ggui-shell",children:[r.jsx(Gb,{route:e,rightSlot:c}),r.jsx("main",{className:u,children:f}),l?r.jsx(qb,{}):null]})}function Yb(){const[e,n]=I.useState(""),[o,l]=I.useState(!1),[c,u]=I.useState(null),f=(()=>{if(typeof window>"u")return"/admin";const g=new URLSearchParams(window.location.search).get("next");return g===null||g===""||!g.startsWith("/")||g.startsWith("//")?"/admin":g})(),p=async g=>{g.preventDefault(),u(null);const h=e.trim();if(h.length===0){u("Paste an admin token.");return}l(!0);try{const y=await fetch("/ggui/console/admin-login",{method:"POST",headers:{"content-type":"application/json",accept:"application/json"},body:JSON.stringify({token:h})});if(y.status===204){Ve(f);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 r.jsxs("section",{className:"ggui-section",children:[r.jsx(tt,{num:"01 / admin",title:"Sign in to the admin zone.",mute:"Admin token gates /admin and /devtools.",intro:r.jsxs(r.Fragment,{children:["Paste the admin token printed on your"," ",r.jsx("code",{className:"ggui-code",children:"ggui serve"})," boot banner. On success we set a same-origin"," ",r.jsx("code",{className:"ggui-code",children:"ggui_console_admin"})," ","HttpOnly cookie and bounce you to"," ",r.jsx("code",{className:"ggui-code",children:f}),"."]})}),r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"admin token"}),r.jsx("span",{className:"ggui-card__num",children:"ADM / IN"})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsx("form",{className:"ggui-form",onSubmit:p,"data-ggui-admin-login-form":!0,children:r.jsxs("div",{className:"ggui-form__row",children:[r.jsx("label",{className:"ggui-field","aria-label":"admin token",children:r.jsx("input",{type:"password",placeholder:"ggui_admin_...",value:e,onChange:g=>n(g.target.value),disabled:o,autoComplete:"off",spellCheck:!1,autoFocus:!0})}),r.jsxs("button",{type:"submit",className:"ggui-btn","data-ggui-admin-login-submit":!0,disabled:o||e.trim().length===0,children:[r.jsx("span",{className:"ggui-btn__dot","aria-hidden":!0}),o?"signing in…":"sign in"]})]})}),c?r.jsx("p",{className:"ggui-muted",style:{marginTop:12},"data-ggui-admin-login-error":!0,children:c}):null]})]})]})}const Kb={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 Fd(){if(typeof window>"u")return;const e=window.location.pathname+window.location.search;Ve(`/admin-login?next=${encodeURIComponent(e)}`)}function Wb(e){return e.replace(/\[[\d;]*[a-zA-Z]/g,"").replace(/\s+/g,"")}function Xb(){const[e,n]=I.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){Fd();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 f=await u.json();n({kind:"ready",data:f})}catch(u){n({kind:"error",message:String(u)})}};I.useEffect(()=>{o()},[]);const l=async(u,f)=>{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:f})});if(p.status===401){Fd();return}if(!p.ok)throw new Error(`server returned ${p.status}`);await o()},c=async u=>{const f=await fetch(`/ggui/console/llm-keys/${encodeURIComponent(u)}`,{method:"DELETE",credentials:"include"});if(f.status===401){Fd();return}if(f.status!==204)throw new Error(`server returned ${f.status}`);await o()};return r.jsxs("section",{className:"ggui-section",children:[r.jsx(tt,{num:"01 / admin / llm-keys",title:"Operator-side LLM keys.",mute:"Server-default keys for unpaired and operator generation.",intro:r.jsxs(r.Fragment,{children:["Each provider is checked against env vars first, then"," ",r.jsx("code",{className:"ggui-code",children:"~/.ggui/credentials.json"})," — env wins on collision. These are the keys"," ",r.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"," ",r.jsx("code",{className:"ggui-code",children:"/settings"}),"; the difference is which scope the writes land in."]})}),e.kind==="loading"?r.jsx("p",{className:"ggui-muted",style:{margin:0,padding:12},children:"Loading providers…"}):e.kind==="error"?r.jsxs("p",{className:"ggui-muted",style:{margin:0,padding:12},"data-ggui-admin-llm-error":!0,children:["Couldn't load providers — ",e.message]}):r.jsx(Jb,{rows:e.data.providers,scope:e.data.scope,onSet:l,onClear:c})]})}function Jb({rows:e,scope:n,onSet:o,onClear:l}){return r.jsxs("div",{"data-ggui-admin-llm-list":!0,children:[r.jsxs("p",{className:"ggui-muted",style:{marginTop:0,marginBottom:16,fontSize:12},children:["scope: ",r.jsx("code",{className:"ggui-code",children:n})]}),r.jsx("div",{style:{display:"grid",gap:14},children:e.map(c=>r.jsx(Qb,{row:c,onSet:o,onClear:l},c.name))})]})}function Qb({row:e,onSet:n,onClear:o}){const l=Kb[e.name],[c,u]=I.useState(""),[f,p]=I.useState(!1),[g,h]=I.useState(null),y=async S=>{S.preventDefault();const N=Wb(c);if(N){p(!0),h(null);try{await n(e.name,N),u("")}catch(x){h(String(x))}finally{p(!1)}}},v=async()=>{p(!0),h(null);try{await o(e.name)}catch(S){h(String(S))}finally{p(!1)}};return r.jsxs("div",{className:"ggui-card","data-ggui-admin-llm-row":e.name,children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:l.label}),r.jsx("span",{className:"ggui-card__num",children:e.configured?e.source??"—":"not set"})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsxs("p",{className:"ggui-muted",style:{margin:"0 0 10px",fontSize:13},children:[l.help,e.envNames.length>0?r.jsxs(r.Fragment,{children:[" ","Env:"," ",e.envNames.map((S,N)=>r.jsxs("span",{children:[r.jsx("code",{className:"ggui-code",children:S}),N<e.envNames.length-1?", ":""]},S)),"."]}):null]}),e.configured&&e.keyPreview?r.jsxs("p",{className:"ggui-muted",style:{margin:"0 0 10px",fontSize:12},children:["current: ",r.jsxs("code",{className:"ggui-code",children:[e.keyPreview,"…"]}),e.source==="env"&&e.envName?r.jsxs(r.Fragment,{children:[" (from ",r.jsx("code",{className:"ggui-code",children:e.envName}),")"]}):null]}):null,r.jsxs("form",{onSubmit:y,style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap"},children:[r.jsx("input",{type:"password",placeholder:`Paste ${l.label} key`,value:c,onChange:S=>u(S.target.value),disabled:f,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}}),r.jsx("button",{type:"submit","data-ggui-admin-llm-set":!0,className:"ggui-btn",disabled:f||!c.trim(),children:f?"saving…":"save"}),e.inFile?r.jsx("button",{type:"button","data-ggui-admin-llm-clear":!0,className:"ggui-btn ggui-btn--ghost",onClick:()=>void v(),disabled:f,children:"clear"}):null,r.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?r.jsxs("p",{className:"ggui-muted",style:{marginTop:8,marginBottom:0,fontSize:12},children:["File value present but env var"," ",r.jsx("code",{className:"ggui-code",children:e.envName})," overrides."]}):null,g?r.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"}],Yd="<redacted>";async function qm(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 f=await l();if(f===null)return u;const p=new Headers(n.headers??{});return p.set("X-Ggui-CSRF",f),fetch(e,{...n,headers:p,credentials:"include"})}function tx(){const[e,n]=I.useState({kind:"loading"}),[o,l]=I.useState(null),c=async()=>{try{const g=await fetch("/ggui/csrf-token",{headers:{accept:"application/json"},credentials:"include"});if(!g.ok)return null;const h=await g.json();return l(h.token),h.token}catch{return null}},u=async()=>{n(g=>g.kind==="ready"?g:{kind:"loading"});try{const g=await fetch("/ggui/admin/oauth-providers",{headers:{accept:"application/json"},credentials:"include"});if(g.status===401){Ve(`/admin-login?next=${encodeURIComponent("/admin/oauth-providers")}`);return}if(!g.ok){n({kind:"error",message:`server returned ${g.status}`});return}const h=await g.json();n({kind:"ready",data:h})}catch(g){n({kind:"error",message:String(g)})}};I.useEffect(()=>{c(),u()},[]);const f=async(g,h)=>{const y=await qm(`/ggui/admin/oauth-providers/${encodeURIComponent(g)}`,{method:"PUT",headers:{"content-type":"application/json",accept:"application/json"},body:JSON.stringify(h)},o,c);if(y.status===401){Ve(`/admin-login?next=${encodeURIComponent("/admin/oauth-providers")}`);return}if(!y.ok)throw new Error(`server returned ${y.status}`);await u()},p=async g=>{const h=await qm(`/ggui/admin/oauth-providers/${encodeURIComponent(g)}`,{method:"DELETE"},o,c);if(h.status===401){Ve(`/admin-login?next=${encodeURIComponent("/admin/oauth-providers")}`);return}if(h.status!==204)throw new Error(`server returned ${h.status}`);await u()};return r.jsxs("section",{className:"ggui-section",children:[r.jsx(tt,{num:"01 / oauth",title:"OAuth login providers.",mute:"Operator-only — end-user sign-in identity.",intro:r.jsxs(r.Fragment,{children:["Configure OAuth login providers so end-users can sign in with their existing identity. Operator-only — these credentials are stored at"," ",r.jsx("code",{className:"ggui-code",children:"~/.ggui/oauth-providers.json"})," ","(mode 0600). Set the"," ",r.jsx("code",{className:"ggui-code",children:"GGUI_OAUTH_<PROVIDERID>_CLIENT_ID"})," ","/"," ",r.jsx("code",{className:"ggui-code",children:"_CLIENT_SECRET"})," env vars to override per-deployment."]})}),e.kind==="loading"?r.jsx("p",{className:"ggui-muted",style:{margin:0,padding:12},children:"Loading providers…"}):e.kind==="error"?r.jsxs("p",{className:"ggui-muted",style:{margin:0,padding:12},"data-ggui-oauth-providers-error":!0,children:["Couldn't load providers — ",e.message]}):r.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 r.jsx(ax,{providerId:g.id,label:g.label,row:h,onSave:f,onDelete:p},g.id)})})]})}function ax({providerId:e,label:n,row:o,onSave:l,onDelete:c}){const u=(o==null?void 0:o.source)==="env",f=(o==null?void 0:o.source)==="file",p=(o==null?void 0:o.clientId)??"",g=(o==null?void 0:o.enabled)??!0,[h,y]=I.useState(p),[v,S]=I.useState(""),[N,x]=I.useState(g),[E,z]=I.useState(!1),[k,$]=I.useState(null);I.useEffect(()=>{y((o==null?void 0:o.clientId)??""),S(""),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 w=h!==p||v.trim().length>0||N!==g,R=async j=>{if(j.preventDefault(),$(null),h.trim().length===0){$("Client ID is required.");return}if(!f&&v.trim().length===0){$("Client Secret is required.");return}z(!0);try{await l(e,{clientId:h.trim(),clientSecret:v.trim(),enabled:N})}catch(T){$(`save failed — ${String(T)}`)}finally{z(!1)}},b=async()=>{if(window.confirm(`Delete ${n} OAuth config? End-users will no longer be able to sign in with ${n}.`)){$(null),z(!0);try{await c(e)}catch(j){$(`delete failed — ${String(j)}`)}finally{z(!1)}}};return r.jsxs("article",{"data-ggui-oauth-provider-card":e,className:"ggui-card",style:{opacity:E?.6:1},children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:n}),r.jsx("span",{style:{marginLeft:"auto"},children:r.jsx(nx,{row:o})})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsxs("form",{className:"ggui-form",onSubmit:j=>{R(j)},children:[r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[r.jsxs("label",{style:{display:"flex",flexDirection:"column",gap:4},"aria-label":`${n} client ID`,children:[r.jsx("span",{className:"ggui-muted",children:"Client ID"}),r.jsx("span",{className:"ggui-field",children:r.jsx("input",{type:"text",placeholder:o===void 0?`paste ${n} OAuth client ID`:"",value:h,onChange:j=>y(j.target.value),readOnly:u,disabled:E,autoComplete:"off",spellCheck:!1,"data-ggui-oauth-provider-client-id":!0})})]}),r.jsxs("label",{style:{display:"flex",flexDirection:"column",gap:4},"aria-label":`${n} client secret`,children:[r.jsx("span",{className:"ggui-muted",children:"Client Secret"}),r.jsx("span",{className:"ggui-field",children:r.jsx("input",{type:"password",placeholder:u?Yd:f?`${Yd} — leave blank to keep`:`paste ${n} OAuth client secret`,value:u?Yd:v,onChange:j=>S(j.target.value),readOnly:u,disabled:E,autoComplete:"off",spellCheck:!1,"data-ggui-oauth-provider-client-secret":!0})})]}),r.jsxs("label",{style:{display:"inline-flex",flexDirection:"row",alignItems:"center",gap:8},"aria-label":`${n} enabled`,children:[r.jsx("input",{type:"checkbox",checked:N,onChange:j=>x(j.target.checked),disabled:u||E,style:{flex:"none",width:"auto"},"data-ggui-oauth-provider-enabled":!0}),r.jsx("span",{children:"Enabled"}),u?r.jsx("span",{className:"ggui-muted",style:{marginLeft:8},children:"env-overrides are always-on"}):null]})]}),r.jsxs("div",{className:"ggui-form__row",style:{marginTop:12,gap:8},children:[r.jsxs("button",{type:"submit",className:"ggui-btn","data-ggui-oauth-provider-save":!0,disabled:u||E||!w,children:[r.jsx("span",{className:"ggui-btn__dot","aria-hidden":!0}),E?"saving…":"save"]}),f?r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost","data-ggui-oauth-provider-delete":!0,disabled:E,onClick:()=>{b()},style:{color:"crimson",borderColor:"crimson"},children:"delete"}):null]})]}),k?r.jsx("p",{className:"ggui-muted",style:{marginTop:8},"data-ggui-oauth-provider-error":!0,children:k}):null]})]})}function nx({row:e}){return e===void 0?r.jsx("span",{className:"ggui-tag",style:{opacity:.5},children:"not configured"}):e.source==="env"?r.jsx("span",{className:"ggui-tag",title:"set via GGUI_OAUTH_*_CLIENT_ID/_SECRET env vars",children:"configured (env)"}):r.jsx("span",{className:"ggui-tag",title:"set via this UI; persisted to ~/.ggui/oauth-providers.json",children:"configured (file)"})}const rx="modulepreload",ix=function(e){return"/"+e},Pm={},ox=function(n,o,l){let c=Promise.resolve();if(o&&o.length>0){let f=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=f(o.map(h=>{if(h=ix(h),h in Pm)return;Pm[h]=!0;const y=h.endsWith(".css"),v=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${v}`))return;const S=document.createElement("link");if(S.rel=y?"stylesheet":rx,y||(S.as="script"),S.crossOrigin="",S.href=h,g&&S.setAttribute("nonce",g),document.head.appendChild(S),y)return new Promise((N,x)=>{S.addEventListener("load",N),S.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${h}`)))})}))}function u(f){const p=new Event("vite:preloadError",{cancelable:!0});if(p.payload=f,window.dispatchEvent(p),!p.defaultPrevented)throw f}return c.then(f=>{for(const p of f||[])p.status==="rejected"&&u(p.reason);return n().catch(u)})},lx="draft-2026-06-12",sx=lx;function Ef(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function ne(e,n,o){function l(p,g){if(p._zod||Object.defineProperty(p,"_zod",{value:{def:g,constr:f,traits:new Set},enumerable:!1}),p._zod.traits.has(e))return;p._zod.traits.add(e),n(p,g);const h=f.prototype,y=Object.keys(h);for(let v=0;v<y.length;v++){const S=y[v];S in p||(p[S]=h[S].bind(p))}}const c=(o==null?void 0:o.Parent)??Object;class u extends c{}Object.defineProperty(u,"name",{value:e});function f(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(f,"init",{value:l}),Object.defineProperty(f,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(f,"name",{value:e}),f}class Ri extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class cv extends Error{constructor(n){super(`Encountered unidirectional transform during encode: ${n}`),this.name="ZodEncodeError"}}const uv={};function ur(e){return uv}function dv(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 vf(e,n){return typeof n=="bigint"?n.toString():n}function vc(e){return{get value(){{const n=e();return Object.defineProperty(this,"value",{value:n}),n}}}}function Cf(e){return e==null}function Tf(e){const n=e.startsWith("^")?1:0,o=e.endsWith("$")?e.length-1:e.length;return e.slice(n,o)}function cx(e,n){const o=(e.toString().split(".")[1]||"").length,l=n.toString();let c=(l.split(".")[1]||"").length;if(c===0&&/\d?e-\d?/.test(l)){const g=l.match(/\d?e-(\d?)/);g!=null&&g[1]&&(c=Number.parseInt(g[1]))}const u=o>c?o:c,f=Number.parseInt(e.toFixed(u).replace(".","")),p=Number.parseInt(n.toFixed(u).replace(".",""));return f%p/10**u}const Zm=Symbol("evaluating");function He(e,n,o){let l;Object.defineProperty(e,n,{get(){if(l!==Zm)return l===void 0&&(l=Zm,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 pr(...e){const n={};for(const o of e){const l=Object.getOwnPropertyDescriptors(o);Object.assign(n,l)}return Object.defineProperties({},n)}function Gm(e){return JSON.stringify(e)}function ux(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const fv="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ko(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const dx=vc(()=>{var e;if(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 Ai(e){if(Ko(e)===!1)return!1;const n=e.constructor;if(n===void 0||typeof n!="function")return!0;const o=n.prototype;return!(Ko(o)===!1||Object.prototype.hasOwnProperty.call(o,"isPrototypeOf")===!1)}function pv(e){return Ai(e)?{...e}:Array.isArray(e)?[...e]:e}const fx=new Set(["string","number","symbol"]);function Di(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function gr(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 _e(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 px(e){return Object.keys(e).filter(n=>e[n]._zod.optin==="optional"&&e[n]._zod.optout==="optional")}const gx={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 mx(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=pr(e._zod.def,{get shape(){const f={};for(const p in n){if(!(p in o.shape))throw new Error(`Unrecognized key: "${p}"`);n[p]&&(f[p]=o.shape[p])}return Pr(this,"shape",f),f},checks:[]});return gr(e,u)}function hx(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=pr(e._zod.def,{get shape(){const f={...e._zod.def.shape};for(const p in n){if(!(p in o.shape))throw new Error(`Unrecognized key: "${p}"`);n[p]&&delete f[p]}return Pr(this,"shape",f),f},checks:[]});return gr(e,u)}function yx(e,n){if(!Ai(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 f in n)if(Object.getOwnPropertyDescriptor(u,f)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const c=pr(e._zod.def,{get shape(){const u={...e._zod.def.shape,...n};return Pr(this,"shape",u),u}});return gr(e,c)}function vx(e,n){if(!Ai(n))throw new Error("Invalid input to safeExtend: expected a plain object");const o=pr(e._zod.def,{get shape(){const l={...e._zod.def.shape,...n};return Pr(this,"shape",l),l}});return gr(e,o)}function $x(e,n){const o=pr(e._zod.def,{get shape(){const l={...e._zod.def.shape,...n._zod.def.shape};return Pr(this,"shape",l),l},get catchall(){return n._zod.def.catchall},checks:[]});return gr(e,o)}function bx(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 f=pr(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 gr(n,f)}function xx(e,n,o){const l=pr(n._zod.def,{get shape(){const c=n._zod.def.shape,u={...c};if(o)for(const f in o){if(!(f in u))throw new Error(`Unrecognized key: "${f}"`);o[f]&&(u[f]=new e({type:"nonoptional",innerType:c[f]}))}else for(const f in c)u[f]=new e({type:"nonoptional",innerType:c[f]});return Pr(this,"shape",u),u}});return gr(n,l)}function Ti(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 Mi(e,n){return n.map(o=>{var l;return(l=o).path??(l.path=[]),o.path.unshift(e),o})}function ys(e){return typeof e=="string"?e:e==null?void 0:e.message}function dr(e,n,o){var c,u,f,p,g,h;const l={...e,path:e.path??[]};if(!e.message){const y=ys((f=(u=(c=e.inst)==null?void 0:c._zod.def)==null?void 0:u.error)==null?void 0:f.call(u,e))??ys((p=n==null?void 0:n.error)==null?void 0:p.call(n,e))??ys((g=o.customError)==null?void 0:g.call(o,e))??ys((h=o.localeError)==null?void 0:h.call(o,e))??"Invalid input";l.message=y}return delete l.inst,delete l.continue,n!=null&&n.reportInput||delete l.input,l}function Mf(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 gv=(e,n)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:n,enumerable:!1}),e.message=JSON.stringify(n,vf,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},mv=ne("$ZodError",gv),hv=ne("$ZodError",gv,{Parent:Error});function _x(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 jx(e,n=o=>o.message){const o={_errors:[]},l=c=>{for(const u of c.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(f=>l({issues:f}));else if(u.code==="invalid_key")l({issues:u.issues});else if(u.code==="invalid_element")l({issues:u.issues});else if(u.path.length===0)o._errors.push(n(u));else{let f=o,p=0;for(;p<u.path.length;){const g=u.path[p];p===u.path.length-1?(f[g]=f[g]||{_errors:[]},f[g]._errors.push(n(u))):f[g]=f[g]||{_errors:[]},f=f[g],p++}}};return l(e),o}const Rf=e=>(n,o,l,c)=>{const u=l?Object.assign(l,{async:!1}):{async:!1},f=n._zod.run({value:o,issues:[]},u);if(f instanceof Promise)throw new Ri;if(f.issues.length){const p=new((c==null?void 0:c.Err)??e)(f.issues.map(g=>dr(g,u,ur())));throw fv(p,c==null?void 0:c.callee),p}return f.value},Of=e=>async(n,o,l,c)=>{const u=l?Object.assign(l,{async:!0}):{async:!0};let f=n._zod.run({value:o,issues:[]},u);if(f instanceof Promise&&(f=await f),f.issues.length){const p=new((c==null?void 0:c.Err)??e)(f.issues.map(g=>dr(g,u,ur())));throw fv(p,c==null?void 0:c.callee),p}return f.value},$c=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 Ri;return u.issues.length?{success:!1,error:new(e??mv)(u.issues.map(f=>dr(f,c,ur())))}:{success:!0,data:u.value}},Sx=$c(hv),bc=e=>async(n,o,l)=>{const c=l?Object.assign(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(f=>dr(f,c,ur())))}:{success:!0,data:u.value}},wx=bc(hv),kx=e=>(n,o,l)=>{const c=l?Object.assign(l,{direction:"backward"}):{direction:"backward"};return Rf(e)(n,o,c)},Nx=e=>(n,o,l)=>Rf(e)(n,o,l),zx=e=>async(n,o,l)=>{const c=l?Object.assign(l,{direction:"backward"}):{direction:"backward"};return Of(e)(n,o,c)},Ex=e=>async(n,o,l)=>Of(e)(n,o,l),Cx=e=>(n,o,l)=>{const c=l?Object.assign(l,{direction:"backward"}):{direction:"backward"};return $c(e)(n,o,c)},Tx=e=>(n,o,l)=>$c(e)(n,o,l),Mx=e=>async(n,o,l)=>{const c=l?Object.assign(l,{direction:"backward"}):{direction:"backward"};return bc(e)(n,o,c)},Rx=e=>async(n,o,l)=>bc(e)(n,o,l),Ox=/^[cC][^\s-]{8,}$/,Ax=/^[0-9a-z]+$/,Dx=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ux=/^[0-9a-vA-V]{20}$/,Ix=/^[A-Za-z0-9]{27}$/,Lx=/^[a-zA-Z0-9_-]{21}$/,Vx=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Hx=/^([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})$/,Fm=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)$/,Bx=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,qx="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Px(){return new RegExp(qx,"u")}const Zx=/^(?:(?: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])$/,Gx=/^(([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}|:))$/,Fx=/^((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])$/,Yx=/^(([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])$/,Kx=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,yv=/^[A-Za-z0-9_-]*$/,Wx=/^\+[1-9]\d{6,14}$/,vv="(?:(?:\\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])))",Xx=new RegExp(`^${vv}$`);function $v(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 Jx(e){return new RegExp(`^${$v(e)}$`)}function Qx(e){const n=$v({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(`^${vv}T(?:${l})$`)}const e5=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}$`)},t5=/^-?\d+$/,bv=/^-?\d+(?:\.\d+)?$/,a5=/^(?:true|false)$/i,n5=/^null$/i,r5=/^[^A-Z]*$/,i5=/^[^a-z]*$/,ia=ne("$ZodCheck",(e,n)=>{var o;e._zod??(e._zod={}),e._zod.def=n,(o=e._zod).onattach??(o.onattach=[])}),xv={number:"number",bigint:"bigint",object:"date"},_v=ne("$ZodCheckLessThan",(e,n)=>{ia.init(e,n);const o=xv[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})}}),jv=ne("$ZodCheckGreaterThan",(e,n)=>{ia.init(e,n);const o=xv[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})}}),o5=ne("$ZodCheckMultipleOf",(e,n)=>{ia.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):cx(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})}}),l5=ne("$ZodCheckNumberFormat",(e,n)=>{var f;ia.init(e,n),n.format=n.format||"float64";const o=(f=n.format)==null?void 0:f.includes("int"),l=o?"int":"number",[c,u]=gx[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=t5)}),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})}}),s5=ne("$ZodCheckMaxLength",(e,n)=>{var o;ia.init(e,n),(o=e._zod.def).when??(o.when=l=>{const c=l.value;return!Cf(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 f=Mf(c);l.issues.push({origin:f,code:"too_big",maximum:n.maximum,inclusive:!0,input:c,inst:e,continue:!n.abort})}}),c5=ne("$ZodCheckMinLength",(e,n)=>{var o;ia.init(e,n),(o=e._zod.def).when??(o.when=l=>{const c=l.value;return!Cf(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 f=Mf(c);l.issues.push({origin:f,code:"too_small",minimum:n.minimum,inclusive:!0,input:c,inst:e,continue:!n.abort})}}),u5=ne("$ZodCheckLengthEquals",(e,n)=>{var o;ia.init(e,n),(o=e._zod.def).when??(o.when=l=>{const c=l.value;return!Cf(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 f=Mf(c),p=u>n.length;l.issues.push({origin:f,...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})}}),xc=ne("$ZodCheckStringFormat",(e,n)=>{var o,l;ia.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=()=>{})}),d5=ne("$ZodCheckRegex",(e,n)=>{xc.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})}}),f5=ne("$ZodCheckLowerCase",(e,n)=>{n.pattern??(n.pattern=r5),xc.init(e,n)}),p5=ne("$ZodCheckUpperCase",(e,n)=>{n.pattern??(n.pattern=i5),xc.init(e,n)}),g5=ne("$ZodCheckIncludes",(e,n)=>{ia.init(e,n);const o=Di(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})}}),m5=ne("$ZodCheckStartsWith",(e,n)=>{ia.init(e,n);const o=new RegExp(`^${Di(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})}}),h5=ne("$ZodCheckEndsWith",(e,n)=>{ia.init(e,n);const o=new RegExp(`.*${Di(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=ne("$ZodCheckOverwrite",(e,n)=>{ia.init(e,n),e._zod.check=o=>{o.value=n.tx(o.value)}});class v5{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(f=>f),c=Math.min(...l.map(f=>f.length-f.trimStart().length)),u=l.map(f=>f.slice(c)).map(f=>" ".repeat(this.indent*2)+f);for(const f of u)this.content.push(f)}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 $5={major:4,minor:3,patch:6},at=ne("$ZodType",(e,n)=>{var c;var o;e??(e={}),e._zod.def=n,e._zod.bag=e._zod.bag||{},e._zod.version=$5;const l=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&l.unshift(e);for(const u of l)for(const f of u._zod.onattach)f(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=Ti(p),v;for(const S of g){if(S._zod.def.when){if(!S._zod.def.when(p))continue}else if(y)continue;const N=p.issues.length,x=S._zod.check(p);if(x instanceof Promise&&(h==null?void 0:h.async)===!1)throw new Ri;if(v||x instanceof Promise)v=(v??Promise.resolve()).then(async()=>{await x,p.issues.length!==N&&(y||(y=Ti(p,N)))});else{if(p.issues.length===N)continue;y||(y=Ti(p,N))}}return v?v.then(()=>p):p},f=(p,g,h)=>{if(Ti(p))return p.aborted=!0,p;const y=u(g,l,h);if(y instanceof Promise){if(h.async===!1)throw new Ri;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=>f(v,p,g)):f(y,p,g)}const h=e._zod.parse(p,g);if(h instanceof Promise){if(g.async===!1)throw new Ri;return h.then(y=>u(y,l,g))}return u(h,l,g)}}He(e,"~standard",()=>({validate:u=>{var f;try{const p=Sx(e,u);return p.success?{value:p.data}:{issues:(f=p.error)==null?void 0:f.issues}}catch{return wx(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}))}),Af=ne("$ZodString",(e,n)=>{var o;at.init(e,n),e._zod.pattern=[...((o=e==null?void 0:e._zod.bag)==null?void 0:o.patterns)??[]].pop()??e5(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}}),it=ne("$ZodStringFormat",(e,n)=>{xc.init(e,n),Af.init(e,n)}),b5=ne("$ZodGUID",(e,n)=>{n.pattern??(n.pattern=Hx),it.init(e,n)}),x5=ne("$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=Fm(l))}else n.pattern??(n.pattern=Fm());it.init(e,n)}),_5=ne("$ZodEmail",(e,n)=>{n.pattern??(n.pattern=Bx),it.init(e,n)}),j5=ne("$ZodURL",(e,n)=>{it.init(e,n),e._zod.check=o=>{try{const l=o.value.trim(),c=new URL(l);n.hostname&&(n.hostname.lastIndex=0,n.hostname.test(c.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(c.protocol.endsWith(":")?c.protocol.slice(0,-1):c.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=c.href:o.value=l;return}catch{o.issues.push({code:"invalid_format",format:"url",input:o.value,inst:e,continue:!n.abort})}}}),S5=ne("$ZodEmoji",(e,n)=>{n.pattern??(n.pattern=Px()),it.init(e,n)}),w5=ne("$ZodNanoID",(e,n)=>{n.pattern??(n.pattern=Lx),it.init(e,n)}),k5=ne("$ZodCUID",(e,n)=>{n.pattern??(n.pattern=Ox),it.init(e,n)}),N5=ne("$ZodCUID2",(e,n)=>{n.pattern??(n.pattern=Ax),it.init(e,n)}),z5=ne("$ZodULID",(e,n)=>{n.pattern??(n.pattern=Dx),it.init(e,n)}),E5=ne("$ZodXID",(e,n)=>{n.pattern??(n.pattern=Ux),it.init(e,n)}),C5=ne("$ZodKSUID",(e,n)=>{n.pattern??(n.pattern=Ix),it.init(e,n)}),T5=ne("$ZodISODateTime",(e,n)=>{n.pattern??(n.pattern=Qx(n)),it.init(e,n)}),M5=ne("$ZodISODate",(e,n)=>{n.pattern??(n.pattern=Xx),it.init(e,n)}),R5=ne("$ZodISOTime",(e,n)=>{n.pattern??(n.pattern=Jx(n)),it.init(e,n)}),O5=ne("$ZodISODuration",(e,n)=>{n.pattern??(n.pattern=Vx),it.init(e,n)}),A5=ne("$ZodIPv4",(e,n)=>{n.pattern??(n.pattern=Zx),it.init(e,n),e._zod.bag.format="ipv4"}),D5=ne("$ZodIPv6",(e,n)=>{n.pattern??(n.pattern=Gx),it.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})}}}),U5=ne("$ZodCIDRv4",(e,n)=>{n.pattern??(n.pattern=Fx),it.init(e,n)}),I5=ne("$ZodCIDRv6",(e,n)=>{n.pattern??(n.pattern=Yx),it.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 f=Number(u);if(`${f}`!==u)throw new Error;if(f<0||f>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 Sv(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const L5=ne("$ZodBase64",(e,n)=>{n.pattern??(n.pattern=Kx),it.init(e,n),e._zod.bag.contentEncoding="base64",e._zod.check=o=>{Sv(o.value)||o.issues.push({code:"invalid_format",format:"base64",input:o.value,inst:e,continue:!n.abort})}});function V5(e){if(!yv.test(e))return!1;const n=e.replace(/[-_]/g,l=>l==="-"?"+":"/"),o=n.padEnd(Math.ceil(n.length/4)*4,"=");return Sv(o)}const H5=ne("$ZodBase64URL",(e,n)=>{n.pattern??(n.pattern=yv),it.init(e,n),e._zod.bag.contentEncoding="base64url",e._zod.check=o=>{V5(o.value)||o.issues.push({code:"invalid_format",format:"base64url",input:o.value,inst:e,continue:!n.abort})}}),B5=ne("$ZodE164",(e,n)=>{n.pattern??(n.pattern=Wx),it.init(e,n)});function q5(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 P5=ne("$ZodJWT",(e,n)=>{it.init(e,n),e._zod.check=o=>{q5(o.value,n.alg)||o.issues.push({code:"invalid_format",format:"jwt",input:o.value,inst:e,continue:!n.abort})}}),wv=ne("$ZodNumber",(e,n)=>{at.init(e,n),e._zod.pattern=e._zod.bag.pattern??bv,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}}),Z5=ne("$ZodNumberFormat",(e,n)=>{l5.init(e,n),wv.init(e,n)}),G5=ne("$ZodBoolean",(e,n)=>{at.init(e,n),e._zod.pattern=a5,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}}),F5=ne("$ZodNull",(e,n)=>{at.init(e,n),e._zod.pattern=n5,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}}),Y5=ne("$ZodUnknown",(e,n)=>{at.init(e,n),e._zod.parse=o=>o}),K5=ne("$ZodNever",(e,n)=>{at.init(e,n),e._zod.parse=(o,l)=>(o.issues.push({expected:"never",code:"invalid_type",input:o.value,inst:e}),o)});function Ym(e,n,o){e.issues.length&&n.issues.push(...Mi(o,e.issues)),n.value[o]=e.value}const W5=ne("$ZodArray",(e,n)=>{at.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 f=0;f<c.length;f++){const p=c[f],g=n.element._zod.run({value:p,issues:[]},l);g instanceof Promise?u.push(g.then(h=>Ym(h,o,f))):Ym(g,o,f)}return u.length?Promise.all(u).then(()=>o):o}});function dc(e,n,o,l,c){if(e.issues.length){if(c&&!(o in l))return;n.issues.push(...Mi(o,e.issues))}e.value===void 0?o in l&&(n.value[o]=void 0):n.value[o]=e.value}function kv(e){var l,c,u,f;const n=Object.keys(e.shape);for(const p of n)if(!((f=(u=(c=(l=e.shape)==null?void 0:l[p])==null?void 0:c._zod)==null?void 0:u.traits)!=null&&f.has("$ZodType")))throw new Error(`Invalid element at key "${p}": expected a Zod schema`);const o=px(e.shape);return{...e,keys:n,keySet:new Set(n),numKeys:n.length,optionalKeys:new Set(o)}}function Nv(e,n,o,l,c,u){const f=[],p=c.keySet,g=c.catchall._zod,h=g.def.type,y=g.optout==="optional";for(const v in n){if(p.has(v))continue;if(h==="never"){f.push(v);continue}const S=g.run({value:n[v],issues:[]},l);S instanceof Promise?e.push(S.then(N=>dc(N,o,v,n,y))):dc(S,o,v,n,y)}return f.length&&o.issues.push({code:"unrecognized_keys",keys:f,input:n,inst:u}),e.length?Promise.all(e).then(()=>o):o}const X5=ne("$ZodObject",(e,n)=>{at.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=vc(()=>kv(n));He(e._zod,"propValues",()=>{const p=n.shape,g={};for(const h in p){const y=p[h]._zod;if(y.values){g[h]??(g[h]=new Set);for(const v of y.values)g[h].add(v)}}return g});const c=Ko,u=n.catchall;let f;e._zod.parse=(p,g)=>{f??(f=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=f.shape;for(const S of f.keys){const N=v[S],x=N._zod.optout==="optional",E=N._zod.run({value:h[S],issues:[]},g);E instanceof Promise?y.push(E.then(z=>dc(z,p,S,h,x))):dc(E,p,S,h,x)}return u?Nv(y,h,p,g,l.value,e):y.length?Promise.all(y).then(()=>p):p}}),J5=ne("$ZodObjectJIT",(e,n)=>{X5.init(e,n);const o=e._zod.parse,l=vc(()=>kv(n)),c=S=>{var w;const N=new v5(["shape","payload","ctx"]),x=l.value,E=R=>{const b=Gm(R);return`shape[${b}]._zod.run({ value: input[${b}], issues: [] }, ctx)`};N.write("const input = payload.value;");const z=Object.create(null);let k=0;for(const R of x.keys)z[R]=`key_${k++}`;N.write("const newResult = {};");for(const R of x.keys){const b=z[R],j=Gm(R),T=S[R],O=((w=T==null?void 0:T._zod)==null?void 0:w.optout)==="optional";N.write(`const ${b} = ${E(R)};`),O?N.write(`
52
+ if (${b}.issues.length) {
53
+ if (${j} in input) {
54
+ payload.issues = payload.issues.concat(${b}.issues.map(iss => ({
55
+ ...iss,
56
+ path: iss.path ? [${j}, ...iss.path] : [${j}]
57
+ })));
58
+ }
59
+ }
60
+
61
+ if (${b}.value === undefined) {
62
+ if (${j} in input) {
63
+ newResult[${j}] = undefined;
64
+ }
65
+ } else {
66
+ newResult[${j}] = ${b}.value;
67
+ }
68
+
69
+ `):N.write(`
70
+ if (${b}.issues.length) {
71
+ payload.issues = payload.issues.concat(${b}.issues.map(iss => ({
72
+ ...iss,
73
+ path: iss.path ? [${j}, ...iss.path] : [${j}]
74
+ })));
75
+ }
76
+
77
+ if (${b}.value === undefined) {
78
+ if (${j} in input) {
79
+ newResult[${j}] = undefined;
80
+ }
81
+ } else {
82
+ newResult[${j}] = ${b}.value;
83
+ }
84
+
85
+ `)}N.write("payload.value = newResult;"),N.write("return payload;");const $=N.compile();return(R,b)=>$(S,R,b)};let u;const f=Ko,p=!uv.jitless,h=p&&dx.value,y=n.catchall;let v;e._zod.parse=(S,N)=>{v??(v=l.value);const x=S.value;return f(x)?p&&h&&(N==null?void 0:N.async)===!1&&N.jitless!==!0?(u||(u=c(n.shape)),S=u(S,N),y?Nv([],x,S,N,v,e):S):o(S,N):(S.issues.push({expected:"object",code:"invalid_type",input:x,inst:e}),S)}});function Km(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=>!Ti(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(f=>dr(f,l,ur())))}),n)}const zv=ne("$ZodUnion",(e,n)=>{at.init(e,n),He(e._zod,"optin",()=>n.options.some(c=>c._zod.optin==="optional")?"optional":void 0),He(e._zod,"optout",()=>n.options.some(c=>c._zod.optout==="optional")?"optional":void 0),He(e._zod,"values",()=>{if(n.options.every(c=>c._zod.values))return new Set(n.options.flatMap(c=>Array.from(c._zod.values)))}),He(e._zod,"pattern",()=>{if(n.options.every(c=>c._zod.pattern)){const c=n.options.map(u=>u._zod.pattern);return new RegExp(`^(${c.map(u=>Tf(u.source)).join("|")})$`)}});const o=n.options.length===1,l=n.options[0]._zod.run;e._zod.parse=(c,u)=>{if(o)return l(c,u);let f=!1;const p=[];for(const g of n.options){const h=g._zod.run({value:c.value,issues:[]},u);if(h instanceof Promise)p.push(h),f=!0;else{if(h.issues.length===0)return h;p.push(h)}}return f?Promise.all(p).then(g=>Km(g,c,e,u)):Km(p,c,e,u)}}),Q5=ne("$ZodDiscriminatedUnion",(e,n)=>{n.inclusive=!1,zv.init(e,n);const o=e._zod.parse;He(e._zod,"propValues",()=>{const c={};for(const u of n.options){const f=u._zod.propValues;if(!f||Object.keys(f).length===0)throw new Error(`Invalid discriminated union option at index "${n.options.indexOf(u)}"`);for(const[p,g]of Object.entries(f)){c[p]||(c[p]=new Set);for(const h of g)c[p].add(h)}}return c});const l=vc(()=>{var f;const c=n.options,u=new Map;for(const p of c){const g=(f=p._zod.propValues)==null?void 0:f[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 f=c.value;if(!Ko(f))return c.issues.push({code:"invalid_type",expected:"object",input:f,inst:e}),c;const p=l.value.get(f==null?void 0:f[n.discriminator]);return p?p._zod.run(c,u):n.unionFallback?o(c,u):(c.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:n.discriminator,input:f,path:[n.discriminator],inst:e}),c)}}),e4=ne("$ZodIntersection",(e,n)=>{at.init(e,n),e._zod.parse=(o,l)=>{const c=o.value,u=n.left._zod.run({value:c,issues:[]},l),f=n.right._zod.run({value:c,issues:[]},l);return u instanceof Promise||f instanceof Promise?Promise.all([u,f]).then(([g,h])=>Wm(o,g,h)):Wm(o,u,f)}});function $f(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(Ai(e)&&Ai(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 f=$f(e[u],n[u]);if(!f.valid)return{valid:!1,mergeErrorPath:[u,...f.mergeErrorPath]};c[u]=f.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],f=$f(c,u);if(!f.valid)return{valid:!1,mergeErrorPath:[l,...f.mergeErrorPath]};o.push(f.data)}return{valid:!0,data:o}}return{valid:!1,mergeErrorPath:[]}}function Wm(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}),Ti(e))return e;const f=$f(n.value,o.value);if(!f.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(f.mergeErrorPath)}`);return e.value=f.data,e}const t4=ne("$ZodRecord",(e,n)=>{at.init(e,n),e._zod.parse=(o,l)=>{const c=o.value;if(!Ai(c))return o.issues.push({expected:"record",code:"invalid_type",input:c,inst:e}),o;const u=[],f=n.keyType._zod.values;if(f){o.value={};const p=new Set;for(const h of f)if(typeof h=="string"||typeof h=="number"||typeof h=="symbol"){p.add(typeof h=="number"?h.toString():h);const y=n.valueType._zod.run({value:c[h],issues:[]},l);y instanceof Promise?u.push(y.then(v=>{v.issues.length&&o.issues.push(...Mi(h,v.issues)),o.value[h]=v.value})):(y.issues.length&&o.issues.push(...Mi(h,y.issues)),o.value[h]=y.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__")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"&&bv.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=>dr(v,l,ur())),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(...Mi(p,v.issues)),o.value[g.value]=v.value})):(y.issues.length&&o.issues.push(...Mi(p,y.issues)),o.value[g.value]=y.value)}}return u.length?Promise.all(u).then(()=>o):o}}),a4=ne("$ZodEnum",(e,n)=>{at.init(e,n);const o=dv(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"?Di(c):c.toString()).join("|")})$`),e._zod.parse=(c,u)=>{const f=c.value;return l.has(f)||c.issues.push({code:"invalid_value",values:o,input:f,inst:e}),c}}),n4=ne("$ZodLiteral",(e,n)=>{if(at.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"?Di(l):l?Di(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}}),r4=ne("$ZodTransform",(e,n)=>{at.init(e,n),e._zod.parse=(o,l)=>{if(l.direction==="backward")throw new cv(e.constructor.name);const c=n.transform(o.value,o);if(l.async)return(c instanceof Promise?c:Promise.resolve(c)).then(f=>(o.value=f,o));if(c instanceof Promise)throw new Ri;return o.value=c,o}});function Xm(e,n){return e.issues.length&&n===void 0?{issues:[],value:void 0}:e}const Ev=ne("$ZodOptional",(e,n)=>{at.init(e,n),e._zod.optin="optional",e._zod.optout="optional",He(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,void 0]):void 0),He(e._zod,"pattern",()=>{const o=n.innerType._zod.pattern;return o?new RegExp(`^(${Tf(o.source)})?$`):void 0}),e._zod.parse=(o,l)=>{if(n.innerType._zod.optin==="optional"){const c=n.innerType._zod.run(o,l);return c instanceof Promise?c.then(u=>Xm(u,o.value)):Xm(c,o.value)}return o.value===void 0?o:n.innerType._zod.run(o,l)}}),i4=ne("$ZodExactOptional",(e,n)=>{Ev.init(e,n),He(e._zod,"values",()=>n.innerType._zod.values),He(e._zod,"pattern",()=>n.innerType._zod.pattern),e._zod.parse=(o,l)=>n.innerType._zod.run(o,l)}),o4=ne("$ZodNullable",(e,n)=>{at.init(e,n),He(e._zod,"optin",()=>n.innerType._zod.optin),He(e._zod,"optout",()=>n.innerType._zod.optout),He(e._zod,"pattern",()=>{const o=n.innerType._zod.pattern;return o?new RegExp(`^(${Tf(o.source)}|null)$`):void 0}),He(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,null]):void 0),e._zod.parse=(o,l)=>o.value===null?o:n.innerType._zod.run(o,l)}),l4=ne("$ZodDefault",(e,n)=>{at.init(e,n),e._zod.optin="optional",He(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(o,l)=>{if(l.direction==="backward")return n.innerType._zod.run(o,l);if(o.value===void 0)return o.value=n.defaultValue,o;const c=n.innerType._zod.run(o,l);return c instanceof Promise?c.then(u=>Jm(u,n)):Jm(c,n)}});function Jm(e,n){return e.value===void 0&&(e.value=n.defaultValue),e}const s4=ne("$ZodPrefault",(e,n)=>{at.init(e,n),e._zod.optin="optional",He(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(o,l)=>(l.direction==="backward"||o.value===void 0&&(o.value=n.defaultValue),n.innerType._zod.run(o,l))}),c4=ne("$ZodNonOptional",(e,n)=>{at.init(e,n),He(e._zod,"values",()=>{const o=n.innerType._zod.values;return o?new Set([...o].filter(l=>l!==void 0)):void 0}),e._zod.parse=(o,l)=>{const c=n.innerType._zod.run(o,l);return c instanceof Promise?c.then(u=>Qm(u,e)):Qm(c,e)}});function Qm(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 u4=ne("$ZodCatch",(e,n)=>{at.init(e,n),He(e._zod,"optin",()=>n.innerType._zod.optin),He(e._zod,"optout",()=>n.innerType._zod.optout),He(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(o,l)=>{if(l.direction==="backward")return n.innerType._zod.run(o,l);const c=n.innerType._zod.run(o,l);return c instanceof Promise?c.then(u=>(o.value=u.value,u.issues.length&&(o.value=n.catchValue({...o,error:{issues:u.issues.map(f=>dr(f,l,ur()))},input:o.value}),o.issues=[]),o)):(o.value=c.value,c.issues.length&&(o.value=n.catchValue({...o,error:{issues:c.issues.map(u=>dr(u,l,ur()))},input:o.value}),o.issues=[]),o)}}),d4=ne("$ZodPipe",(e,n)=>{at.init(e,n),He(e._zod,"values",()=>n.in._zod.values),He(e._zod,"optin",()=>n.in._zod.optin),He(e._zod,"optout",()=>n.out._zod.optout),He(e._zod,"propValues",()=>n.in._zod.propValues),e._zod.parse=(o,l)=>{if(l.direction==="backward"){const u=n.out._zod.run(o,l);return u instanceof Promise?u.then(f=>vs(f,n.in,l)):vs(u,n.in,l)}const c=n.in._zod.run(o,l);return c instanceof Promise?c.then(u=>vs(u,n.out,l)):vs(c,n.out,l)}});function vs(e,n,o){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:e.value,issues:e.issues},o)}const f4=ne("$ZodReadonly",(e,n)=>{at.init(e,n),He(e._zod,"propValues",()=>n.innerType._zod.propValues),He(e._zod,"values",()=>n.innerType._zod.values),He(e._zod,"optin",()=>{var o,l;return(l=(o=n.innerType)==null?void 0:o._zod)==null?void 0:l.optin}),He(e._zod,"optout",()=>{var o,l;return(l=(o=n.innerType)==null?void 0:o._zod)==null?void 0:l.optout}),e._zod.parse=(o,l)=>{if(l.direction==="backward")return n.innerType._zod.run(o,l);const c=n.innerType._zod.run(o,l);return c instanceof Promise?c.then(eh):eh(c)}});function eh(e){return e.value=Object.freeze(e.value),e}const p4=ne("$ZodLazy",(e,n)=>{at.init(e,n),He(e._zod,"innerType",()=>n.getter()),He(e._zod,"pattern",()=>{var o,l;return(l=(o=e._zod.innerType)==null?void 0:o._zod)==null?void 0:l.pattern}),He(e._zod,"propValues",()=>{var o,l;return(l=(o=e._zod.innerType)==null?void 0:o._zod)==null?void 0:l.propValues}),He(e._zod,"optin",()=>{var o,l;return((l=(o=e._zod.innerType)==null?void 0:o._zod)==null?void 0:l.optin)??void 0}),He(e._zod,"optout",()=>{var o,l;return((l=(o=e._zod.innerType)==null?void 0:o._zod)==null?void 0:l.optout)??void 0}),e._zod.parse=(o,l)=>e._zod.innerType._zod.run(o,l)}),g4=ne("$ZodCustom",(e,n)=>{ia.init(e,n),at.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=>th(u,o,l,e));th(c,o,l,e)}});function th(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 ah;class m4{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 h4(){return new m4}(ah=globalThis).__zod_globalRegistry??(ah.__zod_globalRegistry=h4());const Yo=globalThis.__zod_globalRegistry;function y4(e,n){return new e({type:"string",..._e(n)})}function v4(e,n){return new e({type:"string",format:"email",check:"string_format",abort:!1,..._e(n)})}function nh(e,n){return new e({type:"string",format:"guid",check:"string_format",abort:!1,..._e(n)})}function $4(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,..._e(n)})}function b4(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",..._e(n)})}function x4(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",..._e(n)})}function _4(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",..._e(n)})}function Cv(e,n){return new e({type:"string",format:"url",check:"string_format",abort:!1,..._e(n)})}function j4(e,n){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,..._e(n)})}function S4(e,n){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,..._e(n)})}function w4(e,n){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,..._e(n)})}function k4(e,n){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,..._e(n)})}function N4(e,n){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,..._e(n)})}function z4(e,n){return new e({type:"string",format:"xid",check:"string_format",abort:!1,..._e(n)})}function E4(e,n){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,..._e(n)})}function C4(e,n){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,..._e(n)})}function T4(e,n){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,..._e(n)})}function M4(e,n){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,..._e(n)})}function R4(e,n){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,..._e(n)})}function O4(e,n){return new e({type:"string",format:"base64",check:"string_format",abort:!1,..._e(n)})}function A4(e,n){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,..._e(n)})}function D4(e,n){return new e({type:"string",format:"e164",check:"string_format",abort:!1,..._e(n)})}function U4(e,n){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,..._e(n)})}function I4(e,n){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,..._e(n)})}function L4(e,n){return new e({type:"string",format:"date",check:"string_format",..._e(n)})}function V4(e,n){return new e({type:"string",format:"time",check:"string_format",precision:null,..._e(n)})}function H4(e,n){return new e({type:"string",format:"duration",check:"string_format",..._e(n)})}function B4(e,n){return new e({type:"number",checks:[],..._e(n)})}function q4(e,n){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",..._e(n)})}function P4(e,n){return new e({type:"boolean",..._e(n)})}function Z4(e,n){return new e({type:"null",..._e(n)})}function G4(e){return new e({type:"unknown"})}function F4(e,n){return new e({type:"never",..._e(n)})}function rh(e,n){return new _v({check:"less_than",..._e(n),value:e,inclusive:!1})}function Kd(e,n){return new _v({check:"less_than",..._e(n),value:e,inclusive:!0})}function ih(e,n){return new jv({check:"greater_than",..._e(n),value:e,inclusive:!1})}function Wd(e,n){return new jv({check:"greater_than",..._e(n),value:e,inclusive:!0})}function oh(e,n){return new o5({check:"multiple_of",..._e(n),value:e})}function Tv(e,n){return new s5({check:"max_length",..._e(n),maximum:e})}function fc(e,n){return new c5({check:"min_length",..._e(n),minimum:e})}function Mv(e,n){return new u5({check:"length_equals",..._e(n),length:e})}function Y4(e,n){return new d5({check:"string_format",format:"regex",..._e(n),pattern:e})}function K4(e){return new f5({check:"string_format",format:"lowercase",..._e(e)})}function W4(e){return new p5({check:"string_format",format:"uppercase",..._e(e)})}function X4(e,n){return new g5({check:"string_format",format:"includes",..._e(n),includes:e})}function J4(e,n){return new m5({check:"string_format",format:"starts_with",..._e(n),prefix:e})}function Q4(e,n){return new h5({check:"string_format",format:"ends_with",..._e(n),suffix:e})}function Vi(e){return new y5({check:"overwrite",tx:e})}function e_(e){return Vi(n=>n.normalize(e))}function t_(){return Vi(e=>e.trim())}function a_(){return Vi(e=>e.toLowerCase())}function n_(){return Vi(e=>e.toUpperCase())}function r_(){return Vi(e=>ux(e))}function i_(e,n,o){return new e({type:"array",element:n,..._e(o)})}function o_(e,n,o){return new e({type:"custom",check:"custom",fn:n,..._e(o)})}function l_(e){const n=s_(o=>(o.addIssue=l=>{if(typeof l=="string")o.issues.push(Wo(l,o.value,n._zod.def));else{const c=l;c.fatal&&(c.continue=!1),c.code??(c.code="custom"),c.input??(c.input=o.value),c.inst??(c.inst=n),c.continue??(c.continue=!n._zod.def.abort),o.issues.push(Wo(c))}},e(o.value,o)));return n}function s_(e,n){const o=new ia({check:"custom",..._e(n)});return o._zod.check=e,o}function Rv(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)??Yo,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 ht(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 f={schema:{},count:1,cycle:void 0,path:o.path};n.seen.set(e,f);const p=(v=(y=e._zod).toJSONSchema)==null?void 0:v.call(y);if(p)f.schema=p;else{const S={...o,schemaPath:[...o.schemaPath,e],path:o.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(n,f.schema,S);else{const x=f.schema,E=n.processors[c.type];if(!E)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${c.type}`);E(e,n,x,S)}const N=e._zod.parent;N&&(f.ref||(f.ref=N),ht(N,n,S),n.seen.get(N).isParent=!0)}const g=n.metadataRegistry.get(e);return g&&Object.assign(f.schema,g),n.io==="input"&&Wt(e)&&(delete f.schema.examples,delete f.schema.default),n.io==="input"&&f.schema._prefault&&((l=f.schema).default??(l.default=f.schema._prefault)),delete f.schema._prefault,n.seen.get(e).schema}function Ov(e,n){var f,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=(f=e.metadataRegistry.get(y[0]))==null?void 0:f.id;if(v){const S=l.get(v);if(S&&S!==y[0])throw new Error(`Duplicate schema id "${v}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);l.set(v,y[0])}}const c=y=>{var E;const v=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const z=(E=e.external.registry.get(y[0]))==null?void 0:E.id,k=e.external.uri??(w=>w);if(z)return{ref:k(z)};const $=y[1].defId??y[1].schema.id??`schema${e.counter++}`;return y[1].defId=$,{defId:$,ref:`${k("__shared")}#/${v}/${$}`}}if(y[1]===o)return{ref:"#"};const N=`#/${v}/`,x=y[1].schema.id??`__schema${e.counter++}`;return{defId:x,ref:N+x}},u=y=>{if(y[1].schema.$ref)return;const v=y[1],{ref:S,defId:N}=c(y);v.def={...v.schema},N&&(v.defId=N);const x=v.schema;for(const E in x)delete x[E];x.$ref=S};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>
86
+
87
+ 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 N=(g=e.external.registry.get(y[0]))==null?void 0:g.id;if(n!==y[0]&&N){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 Av(e,n){var f,p,g;const o=e.seen.get(n);if(!o)throw new Error("Unprocessed schema. This is a bug in Zod.");const l=h=>{const y=e.seen.get(h);if(y.ref===null)return;const v=y.def??y.schema,S={...v},N=y.ref;if(y.ref=null,N){l(N);const E=e.seen.get(N),z=E.schema;if(z.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(v.allOf=v.allOf??[],v.allOf.push(z)):Object.assign(v,z),Object.assign(v,S),h._zod.parent===N)for(const $ in v)$==="$ref"||$==="allOf"||$ in S||delete v[$];if(z.$ref&&E.def)for(const $ in v)$==="$ref"||$==="allOf"||$ in E.def&&JSON.stringify(v[$])===JSON.stringify(E.def[$])&&delete v[$]}const x=h._zod.parent;if(x&&x!==N){l(x);const E=e.seen.get(x);if(E!=null&&E.schema.$ref&&(v.$ref=E.schema.$ref,E.def))for(const z in v)z==="$ref"||z==="allOf"||z in E.def&&JSON.stringify(v[z])===JSON.stringify(E.def[z])&&delete v[z]}e.override({zodSchema:h,jsonSchema:v,path:y.path??[]})};for(const h of[...e.seen.entries()].reverse())l(h[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,(f=e.external)!=null&&f.uri){const h=(p=e.external.registry.get(n))==null?void 0:p.id;if(!h)throw new Error("Schema is missing an `id` property");c.$id=e.external.uri(h)}Object.assign(c,o.def??o.schema);const u=((g=e.external)==null?void 0:g.defs)??{};for(const h of e.seen.entries()){const y=h[1];y.def&&y.defId&&(u[y.defId]=y.def)}e.external||Object.keys(u).length>0&&(e.target==="draft-2020-12"?c.$defs=u:c.definitions=u);try{const h=JSON.parse(JSON.stringify(c));return Object.defineProperty(h,"~standard",{value:{...n["~standard"],jsonSchema:{input:pc(n,"input",e.processors),output:pc(n,"output",e.processors)}},enumerable:!1,writable:!1}),h}catch{throw new Error("Error converting schema to JSON.")}}function Wt(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 Wt(l.element,o);if(l.type==="set")return Wt(l.valueType,o);if(l.type==="lazy")return Wt(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 Wt(l.innerType,o);if(l.type==="intersection")return Wt(l.left,o)||Wt(l.right,o);if(l.type==="record"||l.type==="map")return Wt(l.keyType,o)||Wt(l.valueType,o);if(l.type==="pipe")return Wt(l.in,o)||Wt(l.out,o);if(l.type==="object"){for(const c in l.shape)if(Wt(l.shape[c],o))return!0;return!1}if(l.type==="union"){for(const c of l.options)if(Wt(c,o))return!0;return!1}if(l.type==="tuple"){for(const c of l.items)if(Wt(c,o))return!0;return!!(l.rest&&Wt(l.rest,o))}return!1}const c_=(e,n={})=>o=>{const l=Rv({...o,processors:n});return ht(e,l),Ov(l,e),Av(l,e)},pc=(e,n,o={})=>l=>{const{libraryOptions:c,target:u}=l??{},f=Rv({...c??{},target:u,io:n,processors:o});return ht(e,f),Ov(f,e),Av(f,e)},u_={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},d_=(e,n,o,l)=>{const c=o;c.type="string";const{minimum:u,maximum:f,format:p,patterns:g,contentEncoding:h}=e._zod.bag;if(typeof u=="number"&&(c.minLength=u),typeof f=="number"&&(c.maxLength=f),p&&(c.format=u_[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}))])}},f_=(e,n,o,l)=>{const c=o,{minimum:u,maximum:f,format:p,multipleOf:g,exclusiveMaximum:h,exclusiveMinimum:y}=e._zod.bag;typeof p=="string"&&p.includes("int")?c.type="integer":c.type="number",typeof y=="number"&&(n.target==="draft-04"||n.target==="openapi-3.0"?(c.minimum=y,c.exclusiveMinimum=!0):c.exclusiveMinimum=y),typeof u=="number"&&(c.minimum=u,typeof y=="number"&&n.target!=="draft-04"&&(y>=u?delete c.minimum:delete c.exclusiveMinimum)),typeof h=="number"&&(n.target==="draft-04"||n.target==="openapi-3.0"?(c.maximum=h,c.exclusiveMaximum=!0):c.exclusiveMaximum=h),typeof f=="number"&&(c.maximum=f,typeof h=="number"&&n.target!=="draft-04"&&(h<=f?delete c.maximum:delete c.exclusiveMaximum)),typeof g=="number"&&(c.multipleOf=g)},p_=(e,n,o,l)=>{o.type="boolean"},g_=(e,n,o,l)=>{n.target==="openapi-3.0"?(o.type="string",o.nullable=!0,o.enum=[null]):o.type="null"},m_=(e,n,o,l)=>{o.not={}},h_=(e,n,o,l)=>{},y_=(e,n,o,l)=>{const c=e._zod.def,u=dv(c.entries);u.every(f=>typeof f=="number")&&(o.type="number"),u.every(f=>typeof f=="string")&&(o.type="string"),o.enum=u},v_=(e,n,o,l)=>{const c=e._zod.def,u=[];for(const f of c.values)if(f===void 0){if(n.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof f=="bigint"){if(n.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");u.push(Number(f))}else u.push(f);if(u.length!==0)if(u.length===1){const f=u[0];o.type=f===null?"null":typeof f,n.target==="draft-04"||n.target==="openapi-3.0"?o.enum=[f]:o.const=f}else u.every(f=>typeof f=="number")&&(o.type="number"),u.every(f=>typeof f=="string")&&(o.type="string"),u.every(f=>typeof f=="boolean")&&(o.type="boolean"),u.every(f=>f===null)&&(o.type="null"),o.enum=u},$_=(e,n,o,l)=>{if(n.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},b_=(e,n,o,l)=>{if(n.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},x_=(e,n,o,l)=>{const c=o,u=e._zod.def,{minimum:f,maximum:p}=e._zod.bag;typeof f=="number"&&(c.minItems=f),typeof p=="number"&&(c.maxItems=p),c.type="array",c.items=ht(u.element,n,{...l,path:[...l.path,"items"]})},__=(e,n,o,l)=>{var h;const c=o,u=e._zod.def;c.type="object",c.properties={};const f=u.shape;for(const y in f)c.properties[y]=ht(f[y],n,{...l,path:[...l.path,"properties",y]});const p=new Set(Object.keys(f)),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=ht(u.catchall,n,{...l,path:[...l.path,"additionalProperties"]})):n.io==="output"&&(c.additionalProperties=!1)},j_=(e,n,o,l)=>{const c=e._zod.def,u=c.inclusive===!1,f=c.options.map((p,g)=>ht(p,n,{...l,path:[...l.path,u?"oneOf":"anyOf",g]}));u?o.oneOf=f:o.anyOf=f},S_=(e,n,o,l)=>{const c=e._zod.def,u=ht(c.left,n,{...l,path:[...l.path,"allOf",0]}),f=ht(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(f)?f.allOf:[f]];o.allOf=g},w_=(e,n,o,l)=>{const c=o,u=e._zod.def;c.type="object";const f=u.keyType,p=f._zod.bag,g=p==null?void 0:p.patterns;if(u.mode==="loose"&&g&&g.size>0){const y=ht(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=ht(u.keyType,n,{...l,path:[...l.path,"propertyNames"]})),c.additionalProperties=ht(u.valueType,n,{...l,path:[...l.path,"additionalProperties"]});const h=f._zod.values;if(h){const y=[...h].filter(v=>typeof v=="string"||typeof v=="number");y.length>0&&(c.required=y)}},k_=(e,n,o,l)=>{const c=e._zod.def,u=ht(c.innerType,n,l),f=n.seen.get(e);n.target==="openapi-3.0"?(f.ref=c.innerType,o.nullable=!0):o.anyOf=[u,{type:"null"}]},N_=(e,n,o,l)=>{const c=e._zod.def;ht(c.innerType,n,l);const u=n.seen.get(e);u.ref=c.innerType},z_=(e,n,o,l)=>{const c=e._zod.def;ht(c.innerType,n,l);const u=n.seen.get(e);u.ref=c.innerType,o.default=JSON.parse(JSON.stringify(c.defaultValue))},E_=(e,n,o,l)=>{const c=e._zod.def;ht(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)))},C_=(e,n,o,l)=>{const c=e._zod.def;ht(c.innerType,n,l);const u=n.seen.get(e);u.ref=c.innerType;let f;try{f=c.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}o.default=f},T_=(e,n,o,l)=>{const c=e._zod.def,u=n.io==="input"?c.in._zod.def.type==="transform"?c.out:c.in:c.out;ht(u,n,l);const f=n.seen.get(e);f.ref=u},M_=(e,n,o,l)=>{const c=e._zod.def;ht(c.innerType,n,l);const u=n.seen.get(e);u.ref=c.innerType,o.readOnly=!0},Dv=(e,n,o,l)=>{const c=e._zod.def;ht(c.innerType,n,l);const u=n.seen.get(e);u.ref=c.innerType},R_=(e,n,o,l)=>{const c=e._zod.innerType;ht(c,n,l);const u=n.seen.get(e);u.ref=c},O_=ne("ZodISODateTime",(e,n)=>{T5.init(e,n),st.init(e,n)});function A_(e){return I4(O_,e)}const D_=ne("ZodISODate",(e,n)=>{M5.init(e,n),st.init(e,n)});function U_(e){return L4(D_,e)}const I_=ne("ZodISOTime",(e,n)=>{R5.init(e,n),st.init(e,n)});function L_(e){return V4(I_,e)}const V_=ne("ZodISODuration",(e,n)=>{O5.init(e,n),st.init(e,n)});function H_(e){return H4(V_,e)}const B_=(e,n)=>{mv.init(e,n),e.name="ZodError",Object.defineProperties(e,{format:{value:o=>jx(e,o)},flatten:{value:o=>_x(e,o)},addIssue:{value:o=>{e.issues.push(o),e.message=JSON.stringify(e.issues,vf,2)}},addIssues:{value:o=>{e.issues.push(...o),e.message=JSON.stringify(e.issues,vf,2)}},isEmpty:{get(){return e.issues.length===0}}})},Ea=ne("ZodError",B_,{Parent:Error}),q_=Rf(Ea),P_=Of(Ea),Z_=$c(Ea),G_=bc(Ea),F_=kx(Ea),Y_=Nx(Ea),K_=zx(Ea),W_=Ex(Ea),X_=Cx(Ea),J_=Tx(Ea),Q_=Mx(Ea),ej=Rx(Ea),nt=ne("ZodType",(e,n)=>(at.init(e,n),Object.assign(e["~standard"],{jsonSchema:{input:pc(e,"input"),output:pc(e,"output")}}),e.toJSONSchema=c_(e,{}),e.def=n,e.type=n.type,Object.defineProperty(e,"_def",{value:n}),e.check=(...o)=>e.clone(pr(n,{checks:[...n.checks??[],...o.map(l=>typeof l=="function"?{_zod:{check:l,def:{check:"custom"},onattach:[]}}:l)]}),{parent:!0}),e.with=e.check,e.clone=(o,l)=>gr(e,o,l),e.brand=()=>e,e.register=((o,l)=>(o.add(e,l),e)),e.parse=(o,l)=>q_(e,o,l,{callee:e.parse}),e.safeParse=(o,l)=>Z_(e,o,l),e.parseAsync=async(o,l)=>P_(e,o,l,{callee:e.parseAsync}),e.safeParseAsync=async(o,l)=>G_(e,o,l),e.spa=e.safeParseAsync,e.encode=(o,l)=>F_(e,o,l),e.decode=(o,l)=>Y_(e,o,l),e.encodeAsync=async(o,l)=>K_(e,o,l),e.decodeAsync=async(o,l)=>W_(e,o,l),e.safeEncode=(o,l)=>X_(e,o,l),e.safeDecode=(o,l)=>J_(e,o,l),e.safeEncodeAsync=async(o,l)=>Q_(e,o,l),e.safeDecodeAsync=async(o,l)=>ej(e,o,l),e.refine=(o,l)=>e.check(Kj(o,l)),e.superRefine=o=>e.check(Wj(o)),e.overwrite=o=>e.check(Vi(o)),e.optional=()=>ch(e),e.exactOptional=()=>Aj(e),e.nullable=()=>uh(e),e.nullish=()=>ch(uh(e)),e.nonoptional=o=>Hj(e,o),e.array=()=>St(e),e.or=o=>hn([e,o]),e.and=o=>Ej(e,o),e.transform=o=>dh(e,Rj(o)),e.default=o=>Ij(e,o),e.prefault=o=>Vj(e,o),e.catch=o=>qj(e,o),e.pipe=o=>dh(e,o),e.readonly=()=>Gj(e),e.describe=o=>{const l=e.clone();return Yo.add(l,{description:o}),l},Object.defineProperty(e,"description",{get(){var o;return(o=Yo.get(e))==null?void 0:o.description},configurable:!0}),e.meta=(...o)=>{if(o.length===0)return Yo.get(e);const l=e.clone();return Yo.add(l,o[0]),l},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=o=>o(e),e)),Uv=ne("_ZodString",(e,n)=>{Af.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(l,c,u)=>d_(e,l,c);const o=e._zod.bag;e.format=o.format??null,e.minLength=o.minimum??null,e.maxLength=o.maximum??null,e.regex=(...l)=>e.check(Y4(...l)),e.includes=(...l)=>e.check(X4(...l)),e.startsWith=(...l)=>e.check(J4(...l)),e.endsWith=(...l)=>e.check(Q4(...l)),e.min=(...l)=>e.check(fc(...l)),e.max=(...l)=>e.check(Tv(...l)),e.length=(...l)=>e.check(Mv(...l)),e.nonempty=(...l)=>e.check(fc(1,...l)),e.lowercase=l=>e.check(K4(l)),e.uppercase=l=>e.check(W4(l)),e.trim=()=>e.check(t_()),e.normalize=(...l)=>e.check(e_(...l)),e.toLowerCase=()=>e.check(a_()),e.toUpperCase=()=>e.check(n_()),e.slugify=()=>e.check(r_())}),tj=ne("ZodString",(e,n)=>{Af.init(e,n),Uv.init(e,n),e.email=o=>e.check(v4(aj,o)),e.url=o=>e.check(Cv(Iv,o)),e.jwt=o=>e.check(U4(yj,o)),e.emoji=o=>e.check(j4(nj,o)),e.guid=o=>e.check(nh(lh,o)),e.uuid=o=>e.check($4($s,o)),e.uuidv4=o=>e.check(b4($s,o)),e.uuidv6=o=>e.check(x4($s,o)),e.uuidv7=o=>e.check(_4($s,o)),e.nanoid=o=>e.check(S4(rj,o)),e.guid=o=>e.check(nh(lh,o)),e.cuid=o=>e.check(w4(ij,o)),e.cuid2=o=>e.check(k4(oj,o)),e.ulid=o=>e.check(N4(lj,o)),e.base64=o=>e.check(O4(gj,o)),e.base64url=o=>e.check(A4(mj,o)),e.xid=o=>e.check(z4(sj,o)),e.ksuid=o=>e.check(E4(cj,o)),e.ipv4=o=>e.check(C4(uj,o)),e.ipv6=o=>e.check(T4(dj,o)),e.cidrv4=o=>e.check(M4(fj,o)),e.cidrv6=o=>e.check(R4(pj,o)),e.e164=o=>e.check(D4(hj,o)),e.datetime=o=>e.check(A_(o)),e.date=o=>e.check(U_(o)),e.time=o=>e.check(L_(o)),e.duration=o=>e.check(H_(o))});function G(e){return y4(tj,e)}const st=ne("ZodStringFormat",(e,n)=>{it.init(e,n),Uv.init(e,n)}),aj=ne("ZodEmail",(e,n)=>{_5.init(e,n),st.init(e,n)}),lh=ne("ZodGUID",(e,n)=>{b5.init(e,n),st.init(e,n)}),$s=ne("ZodUUID",(e,n)=>{x5.init(e,n),st.init(e,n)}),Iv=ne("ZodURL",(e,n)=>{j5.init(e,n),st.init(e,n)});function bs(e){return Cv(Iv,e)}const nj=ne("ZodEmoji",(e,n)=>{S5.init(e,n),st.init(e,n)}),rj=ne("ZodNanoID",(e,n)=>{w5.init(e,n),st.init(e,n)}),ij=ne("ZodCUID",(e,n)=>{k5.init(e,n),st.init(e,n)}),oj=ne("ZodCUID2",(e,n)=>{N5.init(e,n),st.init(e,n)}),lj=ne("ZodULID",(e,n)=>{z5.init(e,n),st.init(e,n)}),sj=ne("ZodXID",(e,n)=>{E5.init(e,n),st.init(e,n)}),cj=ne("ZodKSUID",(e,n)=>{C5.init(e,n),st.init(e,n)}),uj=ne("ZodIPv4",(e,n)=>{A5.init(e,n),st.init(e,n)}),dj=ne("ZodIPv6",(e,n)=>{D5.init(e,n),st.init(e,n)}),fj=ne("ZodCIDRv4",(e,n)=>{U5.init(e,n),st.init(e,n)}),pj=ne("ZodCIDRv6",(e,n)=>{I5.init(e,n),st.init(e,n)}),gj=ne("ZodBase64",(e,n)=>{L5.init(e,n),st.init(e,n)}),mj=ne("ZodBase64URL",(e,n)=>{H5.init(e,n),st.init(e,n)}),hj=ne("ZodE164",(e,n)=>{B5.init(e,n),st.init(e,n)}),yj=ne("ZodJWT",(e,n)=>{P5.init(e,n),st.init(e,n)}),Lv=ne("ZodNumber",(e,n)=>{wv.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(l,c,u)=>f_(e,l,c),e.gt=(l,c)=>e.check(ih(l,c)),e.gte=(l,c)=>e.check(Wd(l,c)),e.min=(l,c)=>e.check(Wd(l,c)),e.lt=(l,c)=>e.check(rh(l,c)),e.lte=(l,c)=>e.check(Kd(l,c)),e.max=(l,c)=>e.check(Kd(l,c)),e.int=l=>e.check(sh(l)),e.safe=l=>e.check(sh(l)),e.positive=l=>e.check(ih(0,l)),e.nonnegative=l=>e.check(Wd(0,l)),e.negative=l=>e.check(rh(0,l)),e.nonpositive=l=>e.check(Kd(0,l)),e.multipleOf=(l,c)=>e.check(oh(l,c)),e.step=(l,c)=>e.check(oh(l,c)),e.finite=()=>e;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 et(e){return B4(Lv,e)}const vj=ne("ZodNumberFormat",(e,n)=>{Z5.init(e,n),Lv.init(e,n)});function sh(e){return q4(vj,e)}const $j=ne("ZodBoolean",(e,n)=>{G5.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(o,l,c)=>p_(e,o,l)});function Gt(e){return P4($j,e)}const bj=ne("ZodNull",(e,n)=>{F5.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(o,l,c)=>g_(e,o,l)});function xj(e){return Z4(bj,e)}const _j=ne("ZodUnknown",(e,n)=>{Y5.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(o,l,c)=>h_()});function fr(){return G4(_j)}const jj=ne("ZodNever",(e,n)=>{K5.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(o,l,c)=>m_(e,o,l)});function Sj(e){return F4(jj,e)}const wj=ne("ZodArray",(e,n)=>{W5.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(o,l,c)=>x_(e,o,l,c),e.element=n.element,e.min=(o,l)=>e.check(fc(o,l)),e.nonempty=o=>e.check(fc(1,o)),e.max=(o,l)=>e.check(Tv(o,l)),e.length=(o,l)=>e.check(Mv(o,l)),e.unwrap=()=>e.element});function St(e,n){return i_(wj,e,n)}const kj=ne("ZodObject",(e,n)=>{J5.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(o,l,c)=>__(e,o,l,c),He(e,"shape",()=>n.shape),e.keyof=()=>rt(Object.keys(e._zod.def.shape)),e.catchall=o=>e.clone({...e._zod.def,catchall:o}),e.passthrough=()=>e.clone({...e._zod.def,catchall:fr()}),e.loose=()=>e.clone({...e._zod.def,catchall:fr()}),e.strict=()=>e.clone({...e._zod.def,catchall:Sj()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=o=>yx(e,o),e.safeExtend=o=>vx(e,o),e.merge=o=>$x(e,o),e.pick=o=>mx(e,o),e.omit=o=>hx(e,o),e.partial=(...o)=>bx(Hv,e,o[0]),e.required=(...o)=>xx(Bv,e,o[0])});function se(e,n){const o={type:"object",shape:e??{},..._e(n)};return new kj(o)}const Vv=ne("ZodUnion",(e,n)=>{zv.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(o,l,c)=>j_(e,o,l,c),e.options=n.options});function hn(e,n){return new Vv({type:"union",options:e,..._e(n)})}const Nj=ne("ZodDiscriminatedUnion",(e,n)=>{Vv.init(e,n),Q5.init(e,n)});function tl(e,n,o){return new Nj({type:"union",options:n,discriminator:e,..._e(o)})}const zj=ne("ZodIntersection",(e,n)=>{e4.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(o,l,c)=>S_(e,o,l,c)});function Ej(e,n){return new zj({type:"intersection",left:e,right:n})}const Cj=ne("ZodRecord",(e,n)=>{t4.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(o,l,c)=>w_(e,o,l,c),e.keyType=n.keyType,e.valueType=n.valueType});function yt(e,n,o){return new Cj({type:"record",keyType:e,valueType:n,..._e(o)})}const bf=ne("ZodEnum",(e,n)=>{a4.init(e,n),nt.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 f of l)if(o.has(f))u[f]=n.entries[f];else throw new Error(`Key ${f} not found in enum`);return new bf({...n,checks:[],..._e(c),entries:u})},e.exclude=(l,c)=>{const u={...n.entries};for(const f of l)if(o.has(f))delete u[f];else throw new Error(`Key ${f} not found in enum`);return new bf({...n,checks:[],..._e(c),entries:u})}});function rt(e,n){const o=Array.isArray(e)?Object.fromEntries(e.map(l=>[l,l])):e;return new bf({type:"enum",entries:o,..._e(n)})}const Tj=ne("ZodLiteral",(e,n)=>{n4.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(o,l,c)=>v_(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 Te(e,n){return new Tj({type:"literal",values:Array.isArray(e)?e:[e],..._e(n)})}const Mj=ne("ZodTransform",(e,n)=>{r4.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(o,l,c)=>b_(e,o),e._zod.parse=(o,l)=>{if(l.direction==="backward")throw new cv(e.constructor.name);o.addIssue=u=>{if(typeof u=="string")o.issues.push(Wo(u,o.value,n));else{const f=u;f.fatal&&(f.continue=!1),f.code??(f.code="custom"),f.input??(f.input=o.value),f.inst??(f.inst=e),o.issues.push(Wo(f))}};const c=n.transform(o.value,o);return c instanceof Promise?c.then(u=>(o.value=u,o)):(o.value=c,o)}});function Rj(e){return new Mj({type:"transform",transform:e})}const Hv=ne("ZodOptional",(e,n)=>{Ev.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(o,l,c)=>Dv(e,o,l,c),e.unwrap=()=>e._zod.def.innerType});function ch(e){return new Hv({type:"optional",innerType:e})}const Oj=ne("ZodExactOptional",(e,n)=>{i4.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(o,l,c)=>Dv(e,o,l,c),e.unwrap=()=>e._zod.def.innerType});function Aj(e){return new Oj({type:"optional",innerType:e})}const Dj=ne("ZodNullable",(e,n)=>{o4.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(o,l,c)=>k_(e,o,l,c),e.unwrap=()=>e._zod.def.innerType});function uh(e){return new Dj({type:"nullable",innerType:e})}const Uj=ne("ZodDefault",(e,n)=>{l4.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(o,l,c)=>z_(e,o,l,c),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Ij(e,n){return new Uj({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():pv(n)}})}const Lj=ne("ZodPrefault",(e,n)=>{s4.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(o,l,c)=>E_(e,o,l,c),e.unwrap=()=>e._zod.def.innerType});function Vj(e,n){return new Lj({type:"prefault",innerType:e,get defaultValue(){return typeof n=="function"?n():pv(n)}})}const Bv=ne("ZodNonOptional",(e,n)=>{c4.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(o,l,c)=>N_(e,o,l,c),e.unwrap=()=>e._zod.def.innerType});function Hj(e,n){return new Bv({type:"nonoptional",innerType:e,..._e(n)})}const Bj=ne("ZodCatch",(e,n)=>{u4.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(o,l,c)=>C_(e,o,l,c),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function qj(e,n){return new Bj({type:"catch",innerType:e,catchValue:typeof n=="function"?n:()=>n})}const Pj=ne("ZodPipe",(e,n)=>{d4.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(o,l,c)=>T_(e,o,l,c),e.in=n.in,e.out=n.out});function dh(e,n){return new Pj({type:"pipe",in:e,out:n})}const Zj=ne("ZodReadonly",(e,n)=>{f4.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(o,l,c)=>M_(e,o,l,c),e.unwrap=()=>e._zod.def.innerType});function Gj(e){return new Zj({type:"readonly",innerType:e})}const Fj=ne("ZodLazy",(e,n)=>{p4.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(o,l,c)=>R_(e,o,l,c),e.unwrap=()=>e._zod.def.getter()});function qv(e){return new Fj({type:"lazy",getter:e})}const Yj=ne("ZodCustom",(e,n)=>{g4.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(o,l,c)=>$_(e,o)});function Kj(e,n={}){return o_(Yj,e,n)}function Wj(e){return l_(e)}const Pv="@ggui-ai/gadgets",Xj="0.4.0-rc.0",Jj=[{package:Pv,version:Xj,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(Jj.flatMap(e=>e.exports).map(e=>e.hook).filter(e=>e!==void 0)));const Df=/^use[A-Z][A-Za-z0-9]*$/,Uf=/^[A-Z][A-Za-z0-9]*$/,If=["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(If);const ft=qv(()=>hn([G(),et(),Gt(),xj(),St(ft),yt(G(),ft)])),mn=qv(()=>se({type:rt(["string","number","integer","boolean","array","object","null"]).optional(),description:G().optional(),enum:St(ft).optional(),default:ft.optional(),example:ft.optional(),items:mn.optional(),properties:yt(G(),mn).optional(),required:St(G()).optional(),additionalProperties:hn([mn,Gt()]).optional(),format:G().optional()}).passthrough()),Qj=se({description:G().optional(),schema:mn,required:Gt().optional(),default:ft.optional(),example:ft.optional(),sourceTool:G().optional()}).strict(),eS=se({description:G().optional(),properties:yt(G(),Qj)}).strict(),tS=se({description:G().optional(),label:G(),schema:mn.optional(),example:ft.optional(),icon:G().optional(),confirm:Gt().optional(),nextStep:G().min(1).optional()}).strict(),aS=yt(G(),tS),nS=se({description:G().optional(),schema:mn,example:ft.optional(),mode:rt(["append","replace"]).optional(),replay:rt(["latest","all","none"]).optional(),complete:Gt().optional(),source:se({tool:G(),args:yt(G(),ft).optional()}).strict().optional()}).strict(),rS=yt(G(),nS),iS=se({description:G().optional(),schema:mn,default:ft.optional(),debounceMs:et().int().nonnegative().optional(),example:ft.optional()}).strict(),oS=yt(G(),iS),lS=se({serverInfo:se({name:G(),version:G().optional()}).strict().optional(),toolInfo:se({inputSchema:mn,description:G().optional(),outputSchema:mn.optional()}).strict(),usage:G().optional(),example:se({input:ft,output:ft}).strict().optional()}).strict(),sS=se({tools:yt(G(),lS)}).passthrough(),Zv=/^GGUI_PUBLIC_APP_[A-Z0-9_]+$/,cS=St(G().regex(Zv)).readonly(),fh=/^sha384-[A-Za-z0-9+/]+=*$/,Gv=/^(?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*$/,uS=/^\d+\.\d+\.\d+(-[\w.]+)?(\+[\w.]+)?$/,dS=/^[a-z0-9.-]+(:\d+)?$/,Fv={gotchas:G().optional()},ph={...Fv,description:G().optional(),usage:G().optional(),example:ft.optional(),permission:G().optional()},gh={...Fv,description:G().min(1),usage:G().min(1),example:ft,permission:rt(If).optional()},Yv={version:G().regex(uS),package:G().regex(Gv),bundleUrl:bs().optional(),bundleHost:G().regex(dS).optional(),bundleSri:G().regex(fh).optional(),styleUrl:bs().optional(),connect:St(bs()).readonly().optional(),requires:cS.optional(),typesUrl:bs().optional(),typesSri:G().regex(fh).optional()},fS=hn([se({hook:G().regex(Df),...ph}).strict(),se({component:G().regex(Uf),...ph}).strict()]),pS=hn([se({hook:G().regex(Df),...gh}).strict(),se({component:G().regex(Uf),...gh}).strict()]);se({...Yv,exports:St(fS).min(1)}).strict();const gS=se({...Yv,exports:St(pS).min(1)}).strict();gS.refine(e=>e.package===Pv||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 mS=se({description:G().optional(),usage:G().optional()}).strict(),hS=yt(G().refine(e=>Df.test(e)||Uf.test(e),{message:"gadget export name must be a `use`-prefixed hook or a PascalCase component identifier"}),mS).refine(e=>Object.keys(e).length>0,{message:"a `clientCapabilities.gadgets` package entry must declare at least one export"}),yS=se({gadgets:yt(G().regex(Gv),hS)}).strict();yt(G().regex(Zv),G()).readonly();const al=se({propsSpec:eS.optional(),actionSpec:aS.optional(),streamSpec:rS.optional(),contextSpec:oS.optional(),agentCapabilities:sS.optional(),clientCapabilities:yS.optional()}).passthrough(),Kv=se({kind:Te("llm"),generator:G().min(1),model:G().min(1)}).strict(),Wv=se({kind:Te("user")}).strict(),vS=se({kind:Te("curated")}).strict(),Xv=hn([Kv,Wv,vS]),_c=se({persona:G().optional().describe('Design persona, e.g. "minimalist" / "data-dense". Part of cache identity.'),aesthetic:G().optional().describe('Visual aesthetic, e.g. "calm" / "ornate". Part of cache identity.'),context:yt(G(),ft).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:G().optional().describe("Generation seed directive. Part of cache identity.")}).strict(),$S=se({blueprintId:G().min(1),contractHash:G().min(1),appId:G().min(1),codeS3Url:G().optional(),codeHash:G().optional(),source:Xv,validatorScore:et().min(0).max(1).optional(),variance:_c,isOperatorDefault:Te(!0).optional(),createdAt:G().min(1),createdBy:rt(["agent","operator"]),contract:al,contractEmbedding:St(et()).optional()}).strict(),bS=se({hash:et().min(0).optional(),embed:et().min(0).optional(),struct:et().min(0).optional(),variance:et().min(0).optional(),intent:et().min(0).optional()}).strict();se({weights:bS.optional(),threshold:et().min(0).max(1).optional(),topK:et().int().min(1).optional()}).strict();const xS=rt(["cache","agent","synth"]),_S=hn([se({op:Te("add"),path:G(),value:ft}).strict(),se({op:Te("remove"),path:G()}).strict(),se({op:Te("replace"),path:G(),value:ft}).strict()]),jS=St(_S),SS=se({contract:al,variance:se({persona:G().optional(),aesthetic:G().optional(),context:yt(G(),ft).optional(),seedPrompt:G().optional()}).strict().optional(),generator:G().optional()}).strict(),wS=SS,kS=se({blueprintId:G().min(1).optional(),contractHash:G().min(1),codeHash:G().optional(),source:Xv.optional(),variance:_c,selectedReason:G().optional()}).strict(),NS=se({code:G().min(1),severity:rt(["error","warn"]),path:G(),message:G()}).strict(),zS=se({contractDiff:jS,reasoning:G()}).strict(),ES=se({origin:xS,rationale:G(),blueprintMeta:kS,proposedContractSummary:G().optional(),amendments:zS.optional(),validationFindings:St(NS).optional()}).strict(),CS=se({width:et(),height:et()}),TS=se({viewport:CS,platform:rt(["web","mobile","desktop"]),deviceType:rt(["phone","tablet","desktop"]),orientation:rt(["portrait","landscape"]),devicePixelRatio:et().optional(),touchPrimary:Gt().optional(),shellType:rt(["chat","fullscreen","spatial"]).optional(),colorScheme:rt(["light","dark"]).optional(),reducedMotion:Gt().optional()}).passthrough(),MS={sessionId:G().min(1).describe("Globally-unique sessionId to consume events from. Cross-tenant access surfaces uniformly as session_not_found."),timeout:et().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.")};se(MS);const RS={sessionId:G().min(1),channel:G().min(1),payload:fr(),complete:Gt().optional()};se(RS);const OS={sessionId:G().min(1).describe("GguiSession opaque id (UUID) — returned by ggui_render.")};se(OS);const AS={};se(AS);const DS={query:G().min(1).describe("Natural-language description of the UI you're looking for"),limit:et().int().min(1).max(100).optional()};se(DS);const US={blueprintId:G().min(1).describe("The stable blueprint id declared via ggui.ui.json#id. Must match an entry in this server's UI registry.")};se(US);const IS={};se(IS);const LS={serviceId:G().min(1),reason:G().optional(),sessionId:G().optional()};se(LS);se({intent:G().min(1).describe('Concise purpose — same intent = same component reused. e.g. "Gmail inbox for email triage"'),blueprintDraft:wS.describe("Agent's draft: contract (required) + optional variance + optional generator slug hint. The server combines this with cached blueprints + validator outcomes to produce a three-mode suggestion (cache / agent / synth)."),forceCreate:Gt().optional()}).strict();se({handshakeId:G().describe("Stable id — pass to ggui_render / ggui_update"),action:rt(["create","reuse","update","replace","declined"]),suggestion:ES.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:G().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:se({tool:Te("ggui_render"),description:G(),example:G()}).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 VS={handshakeId:G({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:yt(G(),fr()),themeId:G().min(1).optional().describe("Per-render theme override. Wins over App.defaultThemeId for THIS render. Omit to inherit the app theme."),infra:se({model:G().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:se({contract:al.optional().describe("STRICT full re-draft of the contract — must already conform; the server will not repair it."),variance:_c.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).")};se(VS);const HS=se({hit:Gt().describe("True when a stored component was served without generating new code."),similarity:et().optional().describe("Cosine similarity of the matched component to the request (semantic match only)."),cachedBlueprintId:G().optional().describe("The stored component id that was matched. Equals top-level blueprintId on a hit."),llmCallsAvoided:et().describe("Generation calls skipped by serving the stored component (0 on a fresh generation)."),kind:rt(["full-template","cold"]).optional().describe("full-template = a whole stored component was served; cold = freshly generated."),reason:G().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.")}),BS=rt(["PRODUCTION_FAILED","VALIDATION_ERROR","NO_PLATFORM_KEY","NO_CREDENTIALS"]),qS=se({code:BS.describe("Canonical failure class. PRODUCTION_FAILED: generation did not produce a component. VALIDATION_ERROR: a server-side precondition rejected the render before generation. NO_PLATFORM_KEY: the server's managed provider-key configuration has no key for the resolved route. NO_CREDENTIALS: no generation credentials are configured on the server."),message:G().describe("Human-readable failure detail — fold into the next attempt or surface to the operator.")});se({sessionId:G(),resourceUri:G().optional().describe("MCP-Apps mount URI (ui://ggui/render/{id}). Present iff the render is mountable; absent on a failed render."),action:rt(["create","reuse","update","replace","declined"]),contractHash:G().describe("Canonical hash of the rendered data contract (shape only — fields, types, specs). Same hash ⟺ same data flow."),blueprintId:G().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:G().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:HS.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:qS.optional().describe("Present iff the tool result is isError — canonical {code, message} for a failed/rejected generation. Absent on success."),nextStep:se({tool:Te("ggui_consume"),description:G(),example:G(),args:se({sessionId:G()})}).optional().describe("Recovery hint — when the rendered contract has actions, points the agent at ggui_consume({sessionId}) for the inbound action loop. Absent for pure-display renders.")});tl("kind",[se({sessionId:G().describe("GguiSession opaque id (UUID) — returned by ggui_render."),kind:Te("replace"),props:yt(G(),fr()).describe("Full replacement props map. New map IS the new state.")}).strict(),se({sessionId:G().describe("GguiSession opaque id (UUID) — returned by ggui_render."),kind:Te("merge"),patch:yt(G(),fr()).describe("RFC 7396 JSON Merge Patch — null deletes a key; arrays fully replace.")}).strict()]);se({sessionId:G(),updated:Gt(),resourceUri:G()});se({toolCatalog:yt(G(),se({name:G(),version:G().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();se({saved:Gt(),appId:G()}).strict();const PS=se({type:Te("text"),text:G()}),ZS=se({type:Te("tool_use"),id:G(),name:G(),input:yt(G(),fr())}),GS=se({type:Te("tool_result"),tool_use_id:G(),content:fr(),is_error:Gt().optional()}),Jv=tl("type",[PS,ZS,GS]),FS=se({type:Te("text_delta"),text:G()}),YS=se({type:Te("input_json_delta"),partial_json:G()}),KS=tl("type",[FS,YS]),WS=se({type:Te("message_start"),message:se({id:G(),role:Te("assistant"),model:G().optional()})}),XS=se({type:Te("content_block_start"),index:et().int().nonnegative(),content_block:Jv}),JS=se({type:Te("content_block_delta"),index:et().int().nonnegative(),delta:KS}),QS=se({type:Te("content_block_stop"),index:et().int().nonnegative()}),e3=se({type:Te("message_delta"),delta:se({stop_reason:rt(["end_turn","max_tokens","tool_use","error"]),stop_sequence:G().nullable().optional()}),usage:se({input_tokens:et().int().nonnegative(),output_tokens:et().int().nonnegative()})}),t3=se({type:Te("message_stop")}),a3=se({type:Te("ping")}),n3=rt(["invalid_request","unauthorized","rate_limited","invoke_in_progress","upstream_error","tool_error","internal"]),r3=se({type:Te("error"),error:se({code:n3,message:G(),retryAfterMs:et().int().nonnegative().optional()})});tl("type",[WS,XS,JS,QS,e3,t3,a3,r3]);const i3=se({role:rt(["user","assistant"]),content:hn([G(),St(Jv)])});se({message:G(),history:St(i3).optional(),interfaceContext:TS.optional(),requestId:G().optional()});const o3=/^--ggui-[a-zA-Z0-9-]+$/,l3=/^[^;{}<>@]*$/,s3=G().min(1).max(256).regex(l3,"css value contains a disallowed character").refine(e=>!e.includes("/*"),"css value may not contain a comment");se({mode:rt(["light","dark"]),cssVariables:yt(G().regex(o3,"css var key must be --ggui-*"),s3).refine(e=>Object.keys(e).length<=200,"too many css variables (max 200)"),name:G().min(1).max(64).optional()}).strict();se({contract:al,generator:G().min(1).optional().describe("Generator slug (e.g. `ui-gen-default-haiku-4-5`). When omitted, dispatches through `GeneratorRegistry.defaultGenerator()`."),persona:G().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:G().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:yt(G(),ft).optional().describe("Small structured signal carried alongside the persona. Persisted on `Blueprint.variance.context`."),seedPrompt:G().optional().describe("The raw operator prompt that produced this variant. Round-trip input for the variant-selector + audit trail."),setAsOperatorDefault:Gt().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();se({blueprintId:G().min(1),codeHash:G().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:et().min(0).max(1).optional().describe("Advanced generator's iterative-loop validator score (0-1). Absent for default-generator output."),source:Kv.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();se({contract:al,componentCode:G().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:G().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:G().optional().describe("Free-form aesthetic tag. Persisted on `Blueprint.variance.aesthetic`."),context:yt(G(),ft).optional().describe("Small structured signal carried alongside the persona. Persisted on `Blueprint.variance.context`."),seedPrompt:G().optional().describe("Optional originating prompt for audit + round-tripping (e.g. the prose the operator originally fed into `*_generate_*` before exporting)."),setAsOperatorDefault:Gt().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();se({blueprintId:G().min(1),codeHash:G().min(1).describe("Content hash of the persisted code body (full sha256 hex)."),source:Wv.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();se({contractHash:G().min(1).optional().describe("Filter to a single `(appId, contractHash)` group. Combine with `generator` / `persona` to narrow within the group."),generator:G().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:G().optional().describe("Filter on `variance.persona`. Normalized to match persisted form (lowercase+trim)."),intentKeywords:St(G().min(1)).optional().describe("Semantic-search tokens. When set, dispatches through `BlueprintSearch.search()` rather than indexed `list()`.")}).strict();se({blueprints:St($S)}).strict();se({blueprintId:G().min(1),isOperatorDefault:Te(!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:_c.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();se({blueprintId:G().min(1),updatedAt:G().min(1)}).strict();se({blueprintId:G().min(1)}).strict();se({deleted:Te(!0)}).strict();function c3(e){return"schemaVersion"in e?e.schemaVersion:sx}function u3(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=c3(e);return o!==void 0&&(n.schemaVersion=o),n}var xs={exports:{}},Xd={},dn={},Lr={},Jd={},Qd={},ef={},mh;function gc(){return mh||(mh=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((w,R)=>`${w}${R}`,"")}get names(){var $;return($=this._names)!==null&&$!==void 0?$:this._names=this._items.reduce((w,R)=>(R instanceof o&&(w[R.str]=(w[R.str]||0)+1),w),{})}}e._Code=l,e.nil=new l("");function c(k,...$){const w=[k[0]];let R=0;for(;R<$.length;)p(w,$[R]),w.push(k[++R]);return new l(w)}e._=c;const u=new l("+");function f(k,...$){const w=[N(k[0])];let R=0;for(;R<$.length;)w.push(u),p(w,$[R]),w.push(u,N(k[++R]));return g(w),new l(w)}e.str=f;function p(k,$){$ instanceof l?k.push(...$._items):$ instanceof o?k.push($):k.push(v($))}e.addCodeArg=p;function g(k){let $=1;for(;$<k.length-1;){if(k[$]===u){const w=h(k[$-1],k[$+1]);if(w!==void 0){k.splice($-1,3,w);continue}k[$++]="+"}$++}}function h(k,$){if($==='""')return k;if(k==='""')return $;if(typeof k=="string")return $ instanceof o||k[k.length-1]!=='"'?void 0:typeof $!="string"?`${k.slice(0,-1)}${$}"`:$[0]==='"'?k.slice(0,-1)+$.slice(1):void 0;if(typeof $=="string"&&$[0]==='"'&&!(k instanceof o))return`"${k}${$.slice(1)}`}function y(k,$){return $.emptyStr()?k:k.emptyStr()?$:f`${k}${$}`}e.strConcat=y;function v(k){return typeof k=="number"||typeof k=="boolean"||k===null?k:N(Array.isArray(k)?k.join(","):k)}function S(k){return new l(N(k))}e.stringify=S;function N(k){return JSON.stringify(k).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=N;function x(k){return typeof k=="string"&&e.IDENTIFIER.test(k)?new l(`.${k}`):c`[${k}]`}e.getProperty=x;function E(k){if(typeof k=="string"&&e.IDENTIFIER.test(k))return new l(`${k}`);throw new Error(`CodeGen: invalid export name: ${k}, use explicit $id name mapping`)}e.getEsmExportName=E;function z(k){return new l(k.toString())}e.regexpCode=z})(ef)),ef}var tf={},hh;function yh(){return hh||(hh=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const n=gc();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 f=(0,n._)`\n`;class p extends c{constructor(h){super(h),this._values={},this._scope=h.scope,this.opts={...h,_n:h.lines?f: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 S=this.toName(h),{prefix:N}=S,x=(v=y.key)!==null&&v!==void 0?v:y.ref;let E=this._values[N];if(E){const $=E.get(x);if($)return $}else E=this._values[N]=new Map;E.set(x,S);const z=this._scope[N]||(this._scope[N]=[]),k=z.length;return z[k]=y.ref,S.setValue(y,{property:N,itemIndex:k}),S}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,S=>{if(S.value===void 0)throw new Error(`CodeGen: name "${S}" has no value`);return S.value.code},y,v)}_reduceValues(h,y,v={},S){let N=n.nil;for(const x in h){const E=h[x];if(!E)continue;const z=v[x]=v[x]||new Map;E.forEach(k=>{if(z.has(k))return;z.set(k,l.Started);let $=y(k);if($){const w=this.opts.es5?e.varKinds.var:e.varKinds.const;N=(0,n._)`${N}${w} ${k} = ${$};${this.opts._n}`}else if($=S==null?void 0:S(k))N=(0,n._)`${N}${$}${this.opts._n}`;else throw new o(k);z.set(k,l.Completed)})}return N}}e.ValueScope=p})(tf)),tf}var vh;function Oe(){return vh||(vh=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=gc(),o=yh();var l=gc();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=yh();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(C,L){return this}}class f extends u{constructor(C,L,W){super(),this.varKind=C,this.name=L,this.rhs=W}render({es5:C,_n:L}){const W=C?o.varKinds.var:this.varKind,me=this.rhs===void 0?"":` = ${this.rhs}`;return`${W} ${this.name}${me};`+L}optimizeNames(C,L){if(C[this.name.str])return this.rhs&&(this.rhs=de(this.rhs,C,L)),this}get names(){return this.rhs instanceof n._CodeOrName?this.rhs.names:{}}}class p extends u{constructor(C,L,W){super(),this.lhs=C,this.rhs=L,this.sideEffects=W}render({_n:C}){return`${this.lhs} = ${this.rhs};`+C}optimizeNames(C,L){if(!(this.lhs instanceof n.Name&&!C[this.lhs.str]&&!this.sideEffects))return this.rhs=de(this.rhs,C,L),this}get names(){const C=this.lhs instanceof n.Name?{}:{...this.lhs.names};return ue(C,this.rhs)}}class g extends p{constructor(C,L,W,me){super(C,W,me),this.op=L}render({_n:C}){return`${this.lhs} ${this.op}= ${this.rhs};`+C}}class h extends u{constructor(C){super(),this.label=C,this.names={}}render({_n:C}){return`${this.label}:`+C}}class y extends u{constructor(C){super(),this.label=C,this.names={}}render({_n:C}){return`break${this.label?` ${this.label}`:""};`+C}}class v extends u{constructor(C){super(),this.error=C}render({_n:C}){return`throw ${this.error};`+C}get names(){return this.error.names}}class S extends u{constructor(C){super(),this.code=C}render({_n:C}){return`${this.code};`+C}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(C,L){return this.code=de(this.code,C,L),this}get names(){return this.code instanceof n._CodeOrName?this.code.names:{}}}class N extends u{constructor(C=[]){super(),this.nodes=C}render(C){return this.nodes.reduce((L,W)=>L+W.render(C),"")}optimizeNodes(){const{nodes:C}=this;let L=C.length;for(;L--;){const W=C[L].optimizeNodes();Array.isArray(W)?C.splice(L,1,...W):W?C[L]=W:C.splice(L,1)}return C.length>0?this:void 0}optimizeNames(C,L){const{nodes:W}=this;let me=W.length;for(;me--;){const fe=W[me];fe.optimizeNames(C,L)||(je(C,fe.names),W.splice(me,1))}return W.length>0?this:void 0}get names(){return this.nodes.reduce((C,L)=>Q(C,L.names),{})}}class x extends N{render(C){return"{"+C._n+super.render(C)+"}"+C._n}}class E extends N{}class z extends x{}z.kind="else";class k extends x{constructor(C,L){super(L),this.condition=C}render(C){let L=`if(${this.condition})`+super.render(C);return this.else&&(L+="else "+this.else.render(C)),L}optimizeNodes(){super.optimizeNodes();const C=this.condition;if(C===!0)return this.nodes;let L=this.else;if(L){const W=L.optimizeNodes();L=this.else=Array.isArray(W)?new z(W):W}if(L)return C===!1?L instanceof k?L:L.nodes:this.nodes.length?this:new k(ce(C),L instanceof k?[L]:L.nodes);if(!(C===!1||!this.nodes.length))return this}optimizeNames(C,L){var W;if(this.else=(W=this.else)===null||W===void 0?void 0:W.optimizeNames(C,L),!!(super.optimizeNames(C,L)||this.else))return this.condition=de(this.condition,C,L),this}get names(){const C=super.names;return ue(C,this.condition),this.else&&Q(C,this.else.names),C}}k.kind="if";class $ extends x{}$.kind="for";class w extends ${constructor(C){super(),this.iteration=C}render(C){return`for(${this.iteration})`+super.render(C)}optimizeNames(C,L){if(super.optimizeNames(C,L))return this.iteration=de(this.iteration,C,L),this}get names(){return Q(super.names,this.iteration.names)}}class R extends ${constructor(C,L,W,me){super(),this.varKind=C,this.name=L,this.from=W,this.to=me}render(C){const L=C.es5?o.varKinds.var:this.varKind,{name:W,from:me,to:fe}=this;return`for(${L} ${W}=${me}; ${W}<${fe}; ${W}++)`+super.render(C)}get names(){const C=ue(super.names,this.from);return ue(C,this.to)}}class b extends ${constructor(C,L,W,me){super(),this.loop=C,this.varKind=L,this.name=W,this.iterable=me}render(C){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(C)}optimizeNames(C,L){if(super.optimizeNames(C,L))return this.iterable=de(this.iterable,C,L),this}get names(){return Q(super.names,this.iterable.names)}}class j extends x{constructor(C,L,W){super(),this.name=C,this.args=L,this.async=W}render(C){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(C)}}j.kind="func";class T extends N{render(C){return"return "+super.render(C)}}T.kind="return";class O extends x{render(C){let L="try"+super.render(C);return this.catch&&(L+=this.catch.render(C)),this.finally&&(L+=this.finally.render(C)),L}optimizeNodes(){var C,L;return super.optimizeNodes(),(C=this.catch)===null||C===void 0||C.optimizeNodes(),(L=this.finally)===null||L===void 0||L.optimizeNodes(),this}optimizeNames(C,L){var W,me;return super.optimizeNames(C,L),(W=this.catch)===null||W===void 0||W.optimizeNames(C,L),(me=this.finally)===null||me===void 0||me.optimizeNames(C,L),this}get names(){const C=super.names;return this.catch&&Q(C,this.catch.names),this.finally&&Q(C,this.finally.names),C}}class V extends x{constructor(C){super(),this.error=C}render(C){return`catch(${this.error})`+super.render(C)}}V.kind="catch";class F extends x{render(C){return"finally"+super.render(C)}}F.kind="finally";class H{constructor(C,L={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...L,_n:L.lines?`
88
+ `:""},this._extScope=C,this._scope=new o.Scope({parent:C}),this._nodes=[new E]}toString(){return this._root.render(this.opts)}name(C){return this._scope.name(C)}scopeName(C){return this._extScope.name(C)}scopeValue(C,L){const W=this._extScope.value(C,L);return(this._values[W.prefix]||(this._values[W.prefix]=new Set)).add(W),W}getScopeValue(C,L){return this._extScope.getValue(C,L)}scopeRefs(C){return this._extScope.scopeRefs(C,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(C,L,W,me){const fe=this._scope.toName(L);return W!==void 0&&me&&(this._constants[fe.str]=W),this._leafNode(new f(C,fe,W)),fe}const(C,L,W){return this._def(o.varKinds.const,C,L,W)}let(C,L,W){return this._def(o.varKinds.let,C,L,W)}var(C,L,W){return this._def(o.varKinds.var,C,L,W)}assign(C,L,W){return this._leafNode(new p(C,L,W))}add(C,L){return this._leafNode(new g(C,e.operators.ADD,L))}code(C){return typeof C=="function"?C():C!==n.nil&&this._leafNode(new S(C)),this}object(...C){const L=["{"];for(const[W,me]of C)L.length>1&&L.push(","),L.push(W),(W!==me||this.opts.es5)&&(L.push(":"),(0,n.addCodeArg)(L,me));return L.push("}"),new n._Code(L)}if(C,L,W){if(this._blockNode(new k(C)),L&&W)this.code(L).else().code(W).endIf();else if(L)this.code(L).endIf();else if(W)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(C){return this._elseNode(new k(C))}else(){return this._elseNode(new z)}endIf(){return this._endBlockNode(k,z)}_for(C,L){return this._blockNode(C),L&&this.code(L).endFor(),this}for(C,L){return this._for(new w(C),L)}forRange(C,L,W,me,fe=this.opts.es5?o.varKinds.var:o.varKinds.let){const we=this._scope.toName(C);return this._for(new R(fe,we,L,W),()=>me(we))}forOf(C,L,W,me=o.varKinds.const){const fe=this._scope.toName(C);if(this.opts.es5){const we=L instanceof n.Name?L:this.var("_arr",L);return this.forRange("_i",0,(0,n._)`${we}.length`,be=>{this.var(fe,(0,n._)`${we}[${be}]`),W(fe)})}return this._for(new b("of",me,fe,L),()=>W(fe))}forIn(C,L,W,me=this.opts.es5?o.varKinds.var:o.varKinds.const){if(this.opts.ownProperties)return this.forOf(C,(0,n._)`Object.keys(${L})`,W);const fe=this._scope.toName(C);return this._for(new b("in",me,fe,L),()=>W(fe))}endFor(){return this._endBlockNode($)}label(C){return this._leafNode(new h(C))}break(C){return this._leafNode(new y(C))}return(C){const L=new T;if(this._blockNode(L),this.code(C),L.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(T)}try(C,L,W){if(!L&&!W)throw new Error('CodeGen: "try" without "catch" and "finally"');const me=new O;if(this._blockNode(me),this.code(C),L){const fe=this.name("e");this._currNode=me.catch=new V(fe),L(fe)}return W&&(this._currNode=me.finally=new F,this.code(W)),this._endBlockNode(V,F)}throw(C){return this._leafNode(new v(C))}block(C,L){return this._blockStarts.push(this._nodes.length),C&&this.code(C).endBlock(L),this}endBlock(C){const L=this._blockStarts.pop();if(L===void 0)throw new Error("CodeGen: not in self-balancing block");const W=this._nodes.length-L;if(W<0||C!==void 0&&W!==C)throw new Error(`CodeGen: wrong number of nodes: ${W} vs ${C} expected`);return this._nodes.length=L,this}func(C,L=n.nil,W,me){return this._blockNode(new j(C,L,W)),me&&this.code(me).endFunc(),this}endFunc(){return this._endBlockNode(j)}optimize(C=1){for(;C-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(C){return this._currNode.nodes.push(C),this}_blockNode(C){this._currNode.nodes.push(C),this._nodes.push(C)}_endBlockNode(C,L){const W=this._currNode;if(W instanceof C||L&&W instanceof L)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${L?`${C.kind}/${L.kind}`:C.kind}"`)}_elseNode(C){const L=this._currNode;if(!(L instanceof k))throw new Error('CodeGen: "else" without "if"');return this._currNode=L.else=C,this}get _root(){return this._nodes[0]}get _currNode(){const C=this._nodes;return C[C.length-1]}set _currNode(C){const L=this._nodes;L[L.length-1]=C}}e.CodeGen=H;function Q(B,C){for(const L in C)B[L]=(B[L]||0)+(C[L]||0);return B}function ue(B,C){return C instanceof n._CodeOrName?Q(B,C.names):B}function de(B,C,L){if(B instanceof n.Name)return W(B);if(!me(B))return B;return new n._Code(B._items.reduce((fe,we)=>(we instanceof n.Name&&(we=W(we)),we instanceof n._Code?fe.push(...we._items):fe.push(we),fe),[]));function W(fe){const we=L[fe.str];return we===void 0||C[fe.str]!==1?fe:(delete C[fe.str],we)}function me(fe){return fe instanceof n._Code&&fe._items.some(we=>we instanceof n.Name&&C[we.str]===1&&L[we.str]!==void 0)}}function je(B,C){for(const L in C)B[L]=(B[L]||0)-(C[L]||0)}function ce(B){return typeof B=="boolean"||typeof B=="number"||B===null?!B:(0,n._)`!${ee(B)}`}e.not=ce;const $e=D(e.operators.AND);function ge(...B){return B.reduce($e)}e.and=ge;const Ae=D(e.operators.OR);function A(...B){return B.reduce(Ae)}e.or=A;function D(B){return(C,L)=>C===n.nil?L:L===n.nil?C:(0,n._)`${ee(C)} ${B} ${ee(L)}`}function ee(B){return B instanceof n.Name?B:(0,n._)`(${B})`}})(Qd)),Qd}var Re={},$h;function qe(){if($h)return Re;$h=1,Object.defineProperty(Re,"__esModule",{value:!0}),Re.checkStrictMode=Re.getErrorPath=Re.Type=Re.useFunc=Re.setEvaluated=Re.evaluatedPropsToName=Re.mergeEvaluated=Re.eachItem=Re.unescapeJsonPointer=Re.escapeJsonPointer=Re.escapeFragment=Re.unescapeFragment=Re.schemaRefOrVal=Re.schemaHasRulesButRef=Re.schemaHasRules=Re.checkUnknownRules=Re.alwaysValidSchema=Re.toHash=void 0;const e=Oe(),n=gc();function o(b){const j={};for(const T of b)j[T]=!0;return j}Re.toHash=o;function l(b,j){return typeof j=="boolean"?j:Object.keys(j).length===0?!0:(c(b,j),!u(j,b.self.RULES.all))}Re.alwaysValidSchema=l;function c(b,j=b.schema){const{opts:T,self:O}=b;if(!T.strictSchema||typeof j=="boolean")return;const V=O.RULES.keywords;for(const F in j)V[F]||R(b,`unknown keyword: "${F}"`)}Re.checkUnknownRules=c;function u(b,j){if(typeof b=="boolean")return!b;for(const T in b)if(j[T])return!0;return!1}Re.schemaHasRules=u;function f(b,j){if(typeof b=="boolean")return!b;for(const T in b)if(T!=="$ref"&&j.all[T])return!0;return!1}Re.schemaHasRulesButRef=f;function p({topSchemaRef:b,schemaPath:j},T,O,V){if(!V){if(typeof T=="number"||typeof T=="boolean")return T;if(typeof T=="string")return(0,e._)`${T}`}return(0,e._)`${b}${j}${(0,e.getProperty)(O)}`}Re.schemaRefOrVal=p;function g(b){return v(decodeURIComponent(b))}Re.unescapeFragment=g;function h(b){return encodeURIComponent(y(b))}Re.escapeFragment=h;function y(b){return typeof b=="number"?`${b}`:b.replace(/~/g,"~0").replace(/\//g,"~1")}Re.escapeJsonPointer=y;function v(b){return b.replace(/~1/g,"/").replace(/~0/g,"~")}Re.unescapeJsonPointer=v;function S(b,j){if(Array.isArray(b))for(const T of b)j(T);else j(b)}Re.eachItem=S;function N({mergeNames:b,mergeToName:j,mergeValues:T,resultToName:O}){return(V,F,H,Q)=>{const ue=H===void 0?F:H instanceof e.Name?(F instanceof e.Name?b(V,F,H):j(V,F,H),H):F instanceof e.Name?(j(V,H,F),F):T(F,H);return Q===e.Name&&!(ue instanceof e.Name)?O(V,ue):ue}}Re.mergeEvaluated={props:N({mergeNames:(b,j,T)=>b.if((0,e._)`${T} !== true && ${j} !== undefined`,()=>{b.if((0,e._)`${j} === true`,()=>b.assign(T,!0),()=>b.assign(T,(0,e._)`${T} || {}`).code((0,e._)`Object.assign(${T}, ${j})`))}),mergeToName:(b,j,T)=>b.if((0,e._)`${T} !== true`,()=>{j===!0?b.assign(T,!0):(b.assign(T,(0,e._)`${T} || {}`),E(b,T,j))}),mergeValues:(b,j)=>b===!0?!0:{...b,...j},resultToName:x}),items:N({mergeNames:(b,j,T)=>b.if((0,e._)`${T} !== true && ${j} !== undefined`,()=>b.assign(T,(0,e._)`${j} === true ? true : ${T} > ${j} ? ${T} : ${j}`)),mergeToName:(b,j,T)=>b.if((0,e._)`${T} !== true`,()=>b.assign(T,j===!0?!0:(0,e._)`${T} > ${j} ? ${T} : ${j}`)),mergeValues:(b,j)=>b===!0?!0:Math.max(b,j),resultToName:(b,j)=>b.var("items",j)})};function x(b,j){if(j===!0)return b.var("props",!0);const T=b.var("props",(0,e._)`{}`);return j!==void 0&&E(b,T,j),T}Re.evaluatedPropsToName=x;function E(b,j,T){Object.keys(T).forEach(O=>b.assign((0,e._)`${j}${(0,e.getProperty)(O)}`,!0))}Re.setEvaluated=E;const z={};function k(b,j){return b.scopeValue("func",{ref:j,code:z[j.code]||(z[j.code]=new n._Code(j.code))})}Re.useFunc=k;var $;(function(b){b[b.Num=0]="Num",b[b.Str=1]="Str"})($||(Re.Type=$={}));function w(b,j,T){if(b instanceof e.Name){const O=j===$.Num;return T?O?(0,e._)`"[" + ${b} + "]"`:(0,e._)`"['" + ${b} + "']"`:O?(0,e._)`"/" + ${b}`:(0,e._)`"/" + ${b}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return T?(0,e.getProperty)(b).toString():"/"+y(b)}Re.getErrorPath=w;function R(b,j,T=b.opts.strictSchema){if(T){if(j=`strict mode: ${j}`,T===!0)throw new Error(j);b.self.logger.warn(j)}}return Re.checkStrictMode=R,Re}var _s={},bh;function mr(){if(bh)return _s;bh=1,Object.defineProperty(_s,"__esModule",{value:!0});const e=Oe(),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 _s.default=n,_s}var xh;function jc(){return xh||(xh=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=Oe(),o=qe(),l=mr();e.keywordError={message:({keyword:z})=>(0,n.str)`must pass "${z}" keyword validation`},e.keyword$DataError={message:({keyword:z,schemaType:k})=>k?(0,n.str)`"${z}" keyword must be ${k} ($data)`:(0,n.str)`"${z}" keyword is invalid ($data)`};function c(z,k=e.keywordError,$,w){const{it:R}=z,{gen:b,compositeRule:j,allErrors:T}=R,O=v(z,k,$);w??(j||T)?g(b,O):h(R,(0,n._)`[${O}]`)}e.reportError=c;function u(z,k=e.keywordError,$){const{it:w}=z,{gen:R,compositeRule:b,allErrors:j}=w,T=v(z,k,$);g(R,T),b||j||h(w,l.default.vErrors)}e.reportExtraError=u;function f(z,k){z.assign(l.default.errors,k),z.if((0,n._)`${l.default.vErrors} !== null`,()=>z.if(k,()=>z.assign((0,n._)`${l.default.vErrors}.length`,k),()=>z.assign(l.default.vErrors,null)))}e.resetErrorsCount=f;function p({gen:z,keyword:k,schemaValue:$,data:w,errsCount:R,it:b}){if(R===void 0)throw new Error("ajv implementation error");const j=z.name("err");z.forRange("i",R,l.default.errors,T=>{z.const(j,(0,n._)`${l.default.vErrors}[${T}]`),z.if((0,n._)`${j}.instancePath === undefined`,()=>z.assign((0,n._)`${j}.instancePath`,(0,n.strConcat)(l.default.instancePath,b.errorPath))),z.assign((0,n._)`${j}.schemaPath`,(0,n.str)`${b.errSchemaPath}/${k}`),b.opts.verbose&&(z.assign((0,n._)`${j}.schema`,$),z.assign((0,n._)`${j}.data`,w))})}e.extendErrors=p;function g(z,k){const $=z.const("err",k);z.if((0,n._)`${l.default.vErrors} === null`,()=>z.assign(l.default.vErrors,(0,n._)`[${$}]`),(0,n._)`${l.default.vErrors}.push(${$})`),z.code((0,n._)`${l.default.errors}++`)}function h(z,k){const{gen:$,validateName:w,schemaEnv:R}=z;R.$async?$.throw((0,n._)`new ${z.ValidationError}(${k})`):($.assign((0,n._)`${w}.errors`,k),$.return(!1))}const y={keyword:new n.Name("keyword"),schemaPath:new n.Name("schemaPath"),params:new n.Name("params"),propertyName:new n.Name("propertyName"),message:new n.Name("message"),schema:new n.Name("schema"),parentSchema:new n.Name("parentSchema")};function v(z,k,$){const{createErrors:w}=z.it;return w===!1?(0,n._)`{}`:S(z,k,$)}function S(z,k,$={}){const{gen:w,it:R}=z,b=[N(R,$),x(z,$)];return E(z,k,b),w.object(...b)}function N({errorPath:z},{instancePath:k}){const $=k?(0,n.str)`${z}${(0,o.getErrorPath)(k,o.Type.Str)}`:z;return[l.default.instancePath,(0,n.strConcat)(l.default.instancePath,$)]}function x({keyword:z,it:{errSchemaPath:k}},{schemaPath:$,parentSchema:w}){let R=w?k:(0,n.str)`${k}/${z}`;return $&&(R=(0,n.str)`${R}${(0,o.getErrorPath)($,o.Type.Str)}`),[y.schemaPath,R]}function E(z,{params:k,message:$},w){const{keyword:R,data:b,schemaValue:j,it:T}=z,{opts:O,propertyName:V,topSchemaRef:F,schemaPath:H}=T;w.push([y.keyword,R],[y.params,typeof k=="function"?k(z):k||(0,n._)`{}`]),O.messages&&w.push([y.message,typeof $=="function"?$(z):$]),O.verbose&&w.push([y.schema,j],[y.parentSchema,(0,n._)`${F}${H}`],[l.default.data,b]),V&&w.push([y.propertyName,V])}})(Jd)),Jd}var _h;function d3(){if(_h)return Lr;_h=1,Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.boolOrEmptySchema=Lr.topBoolOrEmptySchema=void 0;const e=jc(),n=Oe(),o=mr(),l={message:"boolean schema is false"};function c(p){const{gen:g,schema:h,validateName:y}=p;h===!1?f(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),f(p)):h.var(g,!0)}Lr.boolOrEmptySchema=u;function f(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 It={},Vr={},jh;function Qv(){if(jh)return Vr;jh=1,Object.defineProperty(Vr,"__esModule",{value:!0}),Vr.getRules=Vr.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)}Vr.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 Vr.getRules=l,Vr}var fn={},Sh;function e1(){if(Sh)return fn;Sh=1,Object.defineProperty(fn,"__esModule",{value:!0}),fn.shouldUseRule=fn.shouldUseGroup=fn.schemaHasRulesForType=void 0;function e({schema:l,self:c},u){const f=c.RULES.types[u];return f&&f!==!0&&n(l,f)}fn.schemaHasRulesForType=e;function n(l,c){return c.rules.some(u=>o(l,u))}fn.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(f=>l[f]!==void 0))}return fn.shouldUseRule=o,fn}var wh;function mc(){if(wh)return It;wh=1,Object.defineProperty(It,"__esModule",{value:!0}),It.reportTypeError=It.checkDataTypes=It.checkDataType=It.coerceAndCheckDataType=It.getJSONTypes=It.getSchemaTypes=It.DataType=void 0;const e=Qv(),n=e1(),o=jc(),l=Oe(),c=qe();var u;(function($){$[$.Correct=0]="Correct",$[$.Wrong=1]="Wrong"})(u||(It.DataType=u={}));function f($){const w=p($.type);if(w.includes("null")){if($.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!w.length&&$.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');$.nullable===!0&&w.push("null")}return w}It.getSchemaTypes=f;function p($){const w=Array.isArray($)?$:$?[$]:[];if(w.every(e.isJSONType))return w;throw new Error("type must be JSONType or JSONType[]: "+w.join(","))}It.getJSONTypes=p;function g($,w){const{gen:R,data:b,opts:j}=$,T=y(w,j.coerceTypes),O=w.length>0&&!(T.length===0&&w.length===1&&(0,n.schemaHasRulesForType)($,w[0]));if(O){const V=x(w,b,j.strictNumbers,u.Wrong);R.if(V,()=>{T.length?v($,w,T):z($)})}return O}It.coerceAndCheckDataType=g;const h=new Set(["string","number","integer","boolean","null"]);function y($,w){return w?$.filter(R=>h.has(R)||w==="array"&&R==="array"):[]}function v($,w,R){const{gen:b,data:j,opts:T}=$,O=b.let("dataType",(0,l._)`typeof ${j}`),V=b.let("coerced",(0,l._)`undefined`);T.coerceTypes==="array"&&b.if((0,l._)`${O} == 'object' && Array.isArray(${j}) && ${j}.length == 1`,()=>b.assign(j,(0,l._)`${j}[0]`).assign(O,(0,l._)`typeof ${j}`).if(x(w,j,T.strictNumbers),()=>b.assign(V,j))),b.if((0,l._)`${V} !== undefined`);for(const H of R)(h.has(H)||H==="array"&&T.coerceTypes==="array")&&F(H);b.else(),z($),b.endIf(),b.if((0,l._)`${V} !== undefined`,()=>{b.assign(j,V),S($,V)});function F(H){switch(H){case"string":b.elseIf((0,l._)`${O} == "number" || ${O} == "boolean"`).assign(V,(0,l._)`"" + ${j}`).elseIf((0,l._)`${j} === null`).assign(V,(0,l._)`""`);return;case"number":b.elseIf((0,l._)`${O} == "boolean" || ${j} === null
89
+ || (${O} == "string" && ${j} && ${j} == +${j})`).assign(V,(0,l._)`+${j}`);return;case"integer":b.elseIf((0,l._)`${O} === "boolean" || ${j} === null
90
+ || (${O} === "string" && ${j} && ${j} == +${j} && !(${j} % 1))`).assign(V,(0,l._)`+${j}`);return;case"boolean":b.elseIf((0,l._)`${j} === "false" || ${j} === 0 || ${j} === null`).assign(V,!1).elseIf((0,l._)`${j} === "true" || ${j} === 1`).assign(V,!0);return;case"null":b.elseIf((0,l._)`${j} === "" || ${j} === 0 || ${j} === false`),b.assign(V,null);return;case"array":b.elseIf((0,l._)`${O} === "string" || ${O} === "number"
91
+ || ${O} === "boolean" || ${j} === null`).assign(V,(0,l._)`[${j}]`)}}}function S({gen:$,parentData:w,parentDataProperty:R},b){$.if((0,l._)`${w} !== undefined`,()=>$.assign((0,l._)`${w}[${R}]`,b))}function N($,w,R,b=u.Correct){const j=b===u.Correct?l.operators.EQ:l.operators.NEQ;let T;switch($){case"null":return(0,l._)`${w} ${j} null`;case"array":T=(0,l._)`Array.isArray(${w})`;break;case"object":T=(0,l._)`${w} && typeof ${w} == "object" && !Array.isArray(${w})`;break;case"integer":T=O((0,l._)`!(${w} % 1) && !isNaN(${w})`);break;case"number":T=O();break;default:return(0,l._)`typeof ${w} ${j} ${$}`}return b===u.Correct?T:(0,l.not)(T);function O(V=l.nil){return(0,l.and)((0,l._)`typeof ${w} == "number"`,V,R?(0,l._)`isFinite(${w})`:l.nil)}}It.checkDataType=N;function x($,w,R,b){if($.length===1)return N($[0],w,R,b);let j;const T=(0,c.toHash)($);if(T.array&&T.object){const O=(0,l._)`typeof ${w} != "object"`;j=T.null?O:(0,l._)`!${w} || ${O}`,delete T.null,delete T.array,delete T.object}else j=l.nil;T.number&&delete T.integer;for(const O in T)j=(0,l.and)(j,N(O,w,R,b));return j}It.checkDataTypes=x;const E={message:({schema:$})=>`must be ${$}`,params:({schema:$,schemaValue:w})=>typeof $=="string"?(0,l._)`{type: ${$}}`:(0,l._)`{type: ${w}}`};function z($){const w=k($);(0,o.reportError)(w,E)}It.reportTypeError=z;function k($){const{gen:w,data:R,schema:b}=$,j=(0,c.schemaRefOrVal)($,b,"type");return{gen:w,keyword:"type",data:R,schema:b.type,schemaCode:j,schemaValue:j,parentSchema:b,params:{},it:$}}return It}var qo={},kh;function f3(){if(kh)return qo;kh=1,Object.defineProperty(qo,"__esModule",{value:!0}),qo.assignDefaults=void 0;const e=Oe(),n=qe();function o(c,u){const{properties:f,items:p}=c.schema;if(u==="object"&&f)for(const g in f)l(c,g,f[g].default);else u==="array"&&Array.isArray(p)&&p.forEach((g,h)=>l(c,h,g.default))}qo.assignDefaults=o;function l(c,u,f){const{gen:p,compositeRule:g,data:h,opts:y}=c;if(f===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 S=(0,e._)`${v} === undefined`;y.useDefaults==="empty"&&(S=(0,e._)`${S} || ${v} === null || ${v} === ""`),p.if(S,(0,e._)`${v} = ${(0,e.stringify)(f)}`)}return qo}var Aa={},Ge={},Nh;function Da(){if(Nh)return Ge;Nh=1,Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.validateUnion=Ge.validateArray=Ge.usePattern=Ge.callValidateCode=Ge.schemaProperties=Ge.allSchemaProperties=Ge.noPropertyInData=Ge.propertyInData=Ge.isOwnProperty=Ge.hasPropFunc=Ge.reportMissingProp=Ge.checkMissingProp=Ge.checkReportMissingProp=void 0;const e=Oe(),n=qe(),o=mr(),l=qe();function c($,w){const{gen:R,data:b,it:j}=$;R.if(y(R,b,w,j.opts.ownProperties),()=>{$.setParams({missingProperty:(0,e._)`${w}`},!0),$.error()})}Ge.checkReportMissingProp=c;function u({gen:$,data:w,it:{opts:R}},b,j){return(0,e.or)(...b.map(T=>(0,e.and)(y($,w,T,R.ownProperties),(0,e._)`${j} = ${T}`)))}Ge.checkMissingProp=u;function f($,w){$.setParams({missingProperty:w},!0),$.error()}Ge.reportMissingProp=f;function p($){return $.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}Ge.hasPropFunc=p;function g($,w,R){return(0,e._)`${p($)}.call(${w}, ${R})`}Ge.isOwnProperty=g;function h($,w,R,b){const j=(0,e._)`${w}${(0,e.getProperty)(R)} !== undefined`;return b?(0,e._)`${j} && ${g($,w,R)}`:j}Ge.propertyInData=h;function y($,w,R,b){const j=(0,e._)`${w}${(0,e.getProperty)(R)} === undefined`;return b?(0,e.or)(j,(0,e.not)(g($,w,R))):j}Ge.noPropertyInData=y;function v($){return $?Object.keys($).filter(w=>w!=="__proto__"):[]}Ge.allSchemaProperties=v;function S($,w){return v(w).filter(R=>!(0,n.alwaysValidSchema)($,w[R]))}Ge.schemaProperties=S;function N({schemaCode:$,data:w,it:{gen:R,topSchemaRef:b,schemaPath:j,errorPath:T},it:O},V,F,H){const Q=H?(0,e._)`${$}, ${w}, ${b}${j}`:w,ue=[[o.default.instancePath,(0,e.strConcat)(o.default.instancePath,T)],[o.default.parentData,O.parentData],[o.default.parentDataProperty,O.parentDataProperty],[o.default.rootData,o.default.rootData]];O.opts.dynamicRef&&ue.push([o.default.dynamicAnchors,o.default.dynamicAnchors]);const de=(0,e._)`${Q}, ${R.object(...ue)}`;return F!==e.nil?(0,e._)`${V}.call(${F}, ${de})`:(0,e._)`${V}(${de})`}Ge.callValidateCode=N;const x=(0,e._)`new RegExp`;function E({gen:$,it:{opts:w}},R){const b=w.unicodeRegExp?"u":"",{regExp:j}=w.code,T=j(R,b);return $.scopeValue("pattern",{key:T.toString(),ref:T,code:(0,e._)`${j.code==="new RegExp"?x:(0,l.useFunc)($,j)}(${R}, ${b})`})}Ge.usePattern=E;function z($){const{gen:w,data:R,keyword:b,it:j}=$,T=w.name("valid");if(j.allErrors){const V=w.let("valid",!0);return O(()=>w.assign(V,!1)),V}return w.var(T,!0),O(()=>w.break()),T;function O(V){const F=w.const("len",(0,e._)`${R}.length`);w.forRange("i",0,F,H=>{$.subschema({keyword:b,dataProp:H,dataPropType:n.Type.Num},T),w.if((0,e.not)(T),V)})}}Ge.validateArray=z;function k($){const{gen:w,schema:R,keyword:b,it:j}=$;if(!Array.isArray(R))throw new Error("ajv implementation error");if(R.some(F=>(0,n.alwaysValidSchema)(j,F))&&!j.opts.unevaluated)return;const O=w.let("valid",!1),V=w.name("_valid");w.block(()=>R.forEach((F,H)=>{const Q=$.subschema({keyword:b,schemaProp:H,compositeRule:!0},V);w.assign(O,(0,e._)`${O} || ${V}`),$.mergeValidEvaluated(Q,V)||w.if((0,e.not)(O))})),$.result(O,()=>$.reset(),()=>$.error(!0))}return Ge.validateUnion=k,Ge}var zh;function p3(){if(zh)return Aa;zh=1,Object.defineProperty(Aa,"__esModule",{value:!0}),Aa.validateKeywordUsage=Aa.validSchemaType=Aa.funcKeywordCode=Aa.macroKeywordCode=void 0;const e=Oe(),n=mr(),o=Da(),l=jc();function c(S,N){const{gen:x,keyword:E,schema:z,parentSchema:k,it:$}=S,w=N.macro.call($.self,z,k,$),R=h(x,E,w);$.opts.validateSchema!==!1&&$.self.validateSchema(w,!0);const b=x.name("valid");S.subschema({schema:w,schemaPath:e.nil,errSchemaPath:`${$.errSchemaPath}/${E}`,topSchemaRef:R,compositeRule:!0},b),S.pass(b,()=>S.error(!0))}Aa.macroKeywordCode=c;function u(S,N){var x;const{gen:E,keyword:z,schema:k,parentSchema:$,$data:w,it:R}=S;g(R,N);const b=!w&&N.compile?N.compile.call(R.self,k,$,R):N.validate,j=h(E,z,b),T=E.let("valid");S.block$data(T,O),S.ok((x=N.valid)!==null&&x!==void 0?x:T);function O(){if(N.errors===!1)H(),N.modifying&&f(S),Q(()=>S.error());else{const ue=N.async?V():F();N.modifying&&f(S),Q(()=>p(S,ue))}}function V(){const ue=E.let("ruleErrs",null);return E.try(()=>H((0,e._)`await `),de=>E.assign(T,!1).if((0,e._)`${de} instanceof ${R.ValidationError}`,()=>E.assign(ue,(0,e._)`${de}.errors`),()=>E.throw(de))),ue}function F(){const ue=(0,e._)`${j}.errors`;return E.assign(ue,null),H(e.nil),ue}function H(ue=N.async?(0,e._)`await `:e.nil){const de=R.opts.passContext?n.default.this:n.default.self,je=!("compile"in N&&!w||N.schema===!1);E.assign(T,(0,e._)`${ue}${(0,o.callValidateCode)(S,j,de,je)}`,N.modifying)}function Q(ue){var de;E.if((0,e.not)((de=N.valid)!==null&&de!==void 0?de:T),ue)}}Aa.funcKeywordCode=u;function f(S){const{gen:N,data:x,it:E}=S;N.if(E.parentData,()=>N.assign(x,(0,e._)`${E.parentData}[${E.parentDataProperty}]`))}function p(S,N){const{gen:x}=S;x.if((0,e._)`Array.isArray(${N})`,()=>{x.assign(n.default.vErrors,(0,e._)`${n.default.vErrors} === null ? ${N} : ${n.default.vErrors}.concat(${N})`).assign(n.default.errors,(0,e._)`${n.default.vErrors}.length`),(0,l.extendErrors)(S)},()=>S.error())}function g({schemaEnv:S},N){if(N.async&&!S.$async)throw new Error("async keyword in sync schema")}function h(S,N,x){if(x===void 0)throw new Error(`keyword "${N}" failed to compile`);return S.scopeValue("keyword",typeof x=="function"?{ref:x}:{ref:x,code:(0,e.stringify)(x)})}function y(S,N,x=!1){return!N.length||N.some(E=>E==="array"?Array.isArray(S):E==="object"?S&&typeof S=="object"&&!Array.isArray(S):typeof S==E||x&&typeof S>"u")}Aa.validSchemaType=y;function v({schema:S,opts:N,self:x,errSchemaPath:E},z,k){if(Array.isArray(z.keyword)?!z.keyword.includes(k):z.keyword!==k)throw new Error("ajv implementation error");const $=z.dependencies;if($!=null&&$.some(w=>!Object.prototype.hasOwnProperty.call(S,w)))throw new Error(`parent schema must have dependencies of ${k}: ${$.join(",")}`);if(z.validateSchema&&!z.validateSchema(S[k])){const R=`keyword "${k}" value is invalid at path "${E}": `+x.errorsText(z.validateSchema.errors);if(N.validateSchema==="log")x.logger.error(R);else throw new Error(R)}}return Aa.validateKeywordUsage=v,Aa}var pn={},Eh;function g3(){if(Eh)return pn;Eh=1,Object.defineProperty(pn,"__esModule",{value:!0}),pn.extendSubschemaMode=pn.extendSubschemaData=pn.getSubschema=void 0;const e=Oe(),n=qe();function o(u,{keyword:f,schemaProp:p,schema:g,schemaPath:h,errSchemaPath:y,topSchemaRef:v}){if(f!==void 0&&g!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(f!==void 0){const S=u.schema[f];return p===void 0?{schema:S,schemaPath:(0,e._)`${u.schemaPath}${(0,e.getProperty)(f)}`,errSchemaPath:`${u.errSchemaPath}/${f}`}:{schema:S[p],schemaPath:(0,e._)`${u.schemaPath}${(0,e.getProperty)(f)}${(0,e.getProperty)(p)}`,errSchemaPath:`${u.errSchemaPath}/${f}/${(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')}pn.getSubschema=o;function l(u,f,{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:S}=f;if(p!==void 0){const{errorPath:x,dataPathArr:E,opts:z}=f,k=S.let("data",(0,e._)`${f.data}${(0,e.getProperty)(p)}`,!0);N(k),u.errorPath=(0,e.str)`${x}${(0,n.getErrorPath)(p,g,z.jsPropertySyntax)}`,u.parentDataProperty=(0,e._)`${p}`,u.dataPathArr=[...E,u.parentDataProperty]}if(h!==void 0){const x=h instanceof e.Name?h:S.let("data",h,!0);N(x),v!==void 0&&(u.propertyName=v)}y&&(u.dataTypes=y);function N(x){u.data=x,u.dataLevel=f.dataLevel+1,u.dataTypes=[],f.definedProperties=new Set,u.parentData=f.data,u.dataNames=[...f.dataNames,x]}}pn.extendSubschemaData=l;function c(u,{jtdDiscriminator:f,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=f,u.jtdMetadata=p}return pn.extendSubschemaMode=c,pn}var Kt={},af,Ch;function t1(){return Ch||(Ch=1,af=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 f=u[c];if(!e(n[f],o[f]))return!1}return!0}return n!==n&&o!==o}),af}var nf={exports:{}},Th;function m3(){if(Th)return nf.exports;Th=1;var e=nf.exports=function(l,c,u){typeof c=="function"&&(u=c,c={}),u=c.cb||u;var f=typeof u=="function"?u:u.pre||function(){},p=u.post||function(){};n(c,f,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,f,p,g,h,y,v,S){if(f&&typeof f=="object"&&!Array.isArray(f)){c(f,p,g,h,y,v,S);for(var N in f){var x=f[N];if(Array.isArray(x)){if(N in e.arrayKeywords)for(var E=0;E<x.length;E++)n(l,c,u,x[E],p+"/"+N+"/"+E,g,p,N,f,E)}else if(N in e.propsKeywords){if(x&&typeof x=="object")for(var z in x)n(l,c,u,x[z],p+"/"+N+"/"+o(z),g,p,N,f,z)}else(N in e.keywords||l.allKeys&&!(N in e.skipKeywords))&&n(l,c,u,x,p+"/"+N,g,p,N,f)}u(f,p,g,h,y,v,S)}}function o(l){return l.replace(/~/g,"~0").replace(/\//g,"~1")}return nf.exports}var Mh;function Sc(){if(Mh)return Kt;Mh=1,Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.getSchemaRefs=Kt.resolveUrl=Kt.normalizeId=Kt._getFullPath=Kt.getFullPath=Kt.inlineRef=void 0;const e=qe(),n=t1(),o=m3(),l=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function c(E,z=!0){return typeof E=="boolean"?!0:z===!0?!f(E):z?p(E)<=z:!1}Kt.inlineRef=c;const u=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function f(E){for(const z in E){if(u.has(z))return!0;const k=E[z];if(Array.isArray(k)&&k.some(f)||typeof k=="object"&&f(k))return!0}return!1}function p(E){let z=0;for(const k in E){if(k==="$ref")return 1/0;if(z++,!l.has(k)&&(typeof E[k]=="object"&&(0,e.eachItem)(E[k],$=>z+=p($)),z===1/0))return 1/0}return z}function g(E,z="",k){k!==!1&&(z=v(z));const $=E.parse(z);return h(E,$)}Kt.getFullPath=g;function h(E,z){return E.serialize(z).split("#")[0]+"#"}Kt._getFullPath=h;const y=/#\/?$/;function v(E){return E?E.replace(y,""):""}Kt.normalizeId=v;function S(E,z,k){return k=v(k),E.resolve(z,k)}Kt.resolveUrl=S;const N=/^[a-z_][-a-z0-9._]*$/i;function x(E,z){if(typeof E=="boolean")return{};const{schemaId:k,uriResolver:$}=this.opts,w=v(E[k]||z),R={"":w},b=g($,w,!1),j={},T=new Set;return o(E,{allKeys:!0},(F,H,Q,ue)=>{if(ue===void 0)return;const de=b+H;let je=R[ue];typeof F[k]=="string"&&(je=ce.call(this,F[k])),$e.call(this,F.$anchor),$e.call(this,F.$dynamicAnchor),R[H]=je;function ce(ge){const Ae=this.opts.uriResolver.resolve;if(ge=v(je?Ae(je,ge):ge),T.has(ge))throw V(ge);T.add(ge);let A=this.refs[ge];return typeof A=="string"&&(A=this.refs[A]),typeof A=="object"?O(F,A.schema,ge):ge!==v(de)&&(ge[0]==="#"?(O(F,j[ge],ge),j[ge]=F):this.refs[ge]=de),ge}function $e(ge){if(typeof ge=="string"){if(!N.test(ge))throw new Error(`invalid anchor "${ge}"`);ce.call(this,`#${ge}`)}}}),j;function O(F,H,Q){if(H!==void 0&&!n(F,H))throw V(Q)}function V(F){return new Error(`reference "${F}" resolves to more than one schema`)}}return Kt.getSchemaRefs=x,Kt}var Rh;function wc(){if(Rh)return dn;Rh=1,Object.defineProperty(dn,"__esModule",{value:!0}),dn.getData=dn.KeywordCxt=dn.validateFunctionCode=void 0;const e=d3(),n=mc(),o=e1(),l=mc(),c=f3(),u=p3(),f=g3(),p=Oe(),g=mr(),h=Sc(),y=qe(),v=jc();function S(Z){if(b(Z)&&(T(Z),R(Z))){z(Z);return}N(Z,()=>(0,e.topBoolOrEmptySchema)(Z))}dn.validateFunctionCode=S;function N({gen:Z,validateName:J,schema:ie,schemaEnv:pe,opts:ve},Ne){ve.code.es5?Z.func(J,(0,p._)`${g.default.data}, ${g.default.valCxt}`,pe.$async,()=>{Z.code((0,p._)`"use strict"; ${$(ie,ve)}`),E(Z,ve),Z.code(Ne)}):Z.func(J,(0,p._)`${g.default.data}, ${x(ve)}`,pe.$async,()=>Z.code($(ie,ve)).code(Ne))}function x(Z){return(0,p._)`{${g.default.instancePath}="", ${g.default.parentData}, ${g.default.parentDataProperty}, ${g.default.rootData}=${g.default.data}${Z.dynamicRef?(0,p._)`, ${g.default.dynamicAnchors}={}`:p.nil}}={}`}function E(Z,J){Z.if(g.default.valCxt,()=>{Z.var(g.default.instancePath,(0,p._)`${g.default.valCxt}.${g.default.instancePath}`),Z.var(g.default.parentData,(0,p._)`${g.default.valCxt}.${g.default.parentData}`),Z.var(g.default.parentDataProperty,(0,p._)`${g.default.valCxt}.${g.default.parentDataProperty}`),Z.var(g.default.rootData,(0,p._)`${g.default.valCxt}.${g.default.rootData}`),J.dynamicRef&&Z.var(g.default.dynamicAnchors,(0,p._)`${g.default.valCxt}.${g.default.dynamicAnchors}`)},()=>{Z.var(g.default.instancePath,(0,p._)`""`),Z.var(g.default.parentData,(0,p._)`undefined`),Z.var(g.default.parentDataProperty,(0,p._)`undefined`),Z.var(g.default.rootData,g.default.data),J.dynamicRef&&Z.var(g.default.dynamicAnchors,(0,p._)`{}`)})}function z(Z){const{schema:J,opts:ie,gen:pe}=Z;N(Z,()=>{ie.$comment&&J.$comment&&ue(Z),F(Z),pe.let(g.default.vErrors,null),pe.let(g.default.errors,0),ie.unevaluated&&k(Z),O(Z),de(Z)})}function k(Z){const{gen:J,validateName:ie}=Z;Z.evaluated=J.const("evaluated",(0,p._)`${ie}.evaluated`),J.if((0,p._)`${Z.evaluated}.dynamicProps`,()=>J.assign((0,p._)`${Z.evaluated}.props`,(0,p._)`undefined`)),J.if((0,p._)`${Z.evaluated}.dynamicItems`,()=>J.assign((0,p._)`${Z.evaluated}.items`,(0,p._)`undefined`))}function $(Z,J){const ie=typeof Z=="object"&&Z[J.schemaId];return ie&&(J.code.source||J.code.process)?(0,p._)`/*# sourceURL=${ie} */`:p.nil}function w(Z,J){if(b(Z)&&(T(Z),R(Z))){j(Z,J);return}(0,e.boolOrEmptySchema)(Z,J)}function R({schema:Z,self:J}){if(typeof Z=="boolean")return!Z;for(const ie in Z)if(J.RULES.all[ie])return!0;return!1}function b(Z){return typeof Z.schema!="boolean"}function j(Z,J){const{schema:ie,gen:pe,opts:ve}=Z;ve.$comment&&ie.$comment&&ue(Z),H(Z),Q(Z);const Ne=pe.const("_errs",g.default.errors);O(Z,Ne),pe.var(J,(0,p._)`${Ne} === ${g.default.errors}`)}function T(Z){(0,y.checkUnknownRules)(Z),V(Z)}function O(Z,J){if(Z.opts.jtd)return ce(Z,[],!1,J);const ie=(0,n.getSchemaTypes)(Z.schema),pe=(0,n.coerceAndCheckDataType)(Z,ie);ce(Z,ie,!pe,J)}function V(Z){const{schema:J,errSchemaPath:ie,opts:pe,self:ve}=Z;J.$ref&&pe.ignoreKeywordsWithRef&&(0,y.schemaHasRulesButRef)(J,ve.RULES)&&ve.logger.warn(`$ref: keywords ignored in schema at path "${ie}"`)}function F(Z){const{schema:J,opts:ie}=Z;J.default!==void 0&&ie.useDefaults&&ie.strictSchema&&(0,y.checkStrictMode)(Z,"default is ignored in the schema root")}function H(Z){const J=Z.schema[Z.opts.schemaId];J&&(Z.baseId=(0,h.resolveUrl)(Z.opts.uriResolver,Z.baseId,J))}function Q(Z){if(Z.schema.$async&&!Z.schemaEnv.$async)throw new Error("async schema in sync schema")}function ue({gen:Z,schemaEnv:J,schema:ie,errSchemaPath:pe,opts:ve}){const Ne=ie.$comment;if(ve.$comment===!0)Z.code((0,p._)`${g.default.self}.logger.log(${Ne})`);else if(typeof ve.$comment=="function"){const pt=(0,p.str)`${pe}/$comment`,Vt=Z.scopeValue("root",{ref:J.root});Z.code((0,p._)`${g.default.self}.opts.$comment(${Ne}, ${pt}, ${Vt}.schema)`)}}function de(Z){const{gen:J,schemaEnv:ie,validateName:pe,ValidationError:ve,opts:Ne}=Z;ie.$async?J.if((0,p._)`${g.default.errors} === 0`,()=>J.return(g.default.data),()=>J.throw((0,p._)`new ${ve}(${g.default.vErrors})`)):(J.assign((0,p._)`${pe}.errors`,g.default.vErrors),Ne.unevaluated&&je(Z),J.return((0,p._)`${g.default.errors} === 0`))}function je({gen:Z,evaluated:J,props:ie,items:pe}){ie instanceof p.Name&&Z.assign((0,p._)`${J}.props`,ie),pe instanceof p.Name&&Z.assign((0,p._)`${J}.items`,pe)}function ce(Z,J,ie,pe){const{gen:ve,schema:Ne,data:pt,allErrors:Vt,opts:zt,self:Et}=Z,{RULES:gt}=Et;if(Ne.$ref&&(zt.ignoreKeywordsWithRef||!(0,y.schemaHasRulesButRef)(Ne,gt))){ve.block(()=>me(Z,"$ref",gt.all.$ref.definition));return}zt.jtd||ge(Z,J),ve.block(()=>{for(const Qt of gt.rules)yn(Qt);yn(gt.post)});function yn(Qt){(0,o.shouldUseGroup)(Ne,Qt)&&(Qt.type?(ve.if((0,l.checkDataType)(Qt.type,pt,zt.strictNumbers)),$e(Z,Qt),J.length===1&&J[0]===Qt.type&&ie&&(ve.else(),(0,l.reportTypeError)(Z)),ve.endIf()):$e(Z,Qt),Vt||ve.if((0,p._)`${g.default.errors} === ${pe||0}`))}}function $e(Z,J){const{gen:ie,schema:pe,opts:{useDefaults:ve}}=Z;ve&&(0,c.assignDefaults)(Z,J.type),ie.block(()=>{for(const Ne of J.rules)(0,o.shouldUseRule)(pe,Ne)&&me(Z,Ne.keyword,Ne.definition,J.type)})}function ge(Z,J){Z.schemaEnv.meta||!Z.opts.strictTypes||(Ae(Z,J),Z.opts.allowUnionTypes||A(Z,J),D(Z,Z.dataTypes))}function Ae(Z,J){if(J.length){if(!Z.dataTypes.length){Z.dataTypes=J;return}J.forEach(ie=>{B(Z.dataTypes,ie)||L(Z,`type "${ie}" not allowed by context "${Z.dataTypes.join(",")}"`)}),C(Z,J)}}function A(Z,J){J.length>1&&!(J.length===2&&J.includes("null"))&&L(Z,"use allowUnionTypes to allow union type keyword")}function D(Z,J){const ie=Z.self.RULES.all;for(const pe in ie){const ve=ie[pe];if(typeof ve=="object"&&(0,o.shouldUseRule)(Z.schema,ve)){const{type:Ne}=ve.definition;Ne.length&&!Ne.some(pt=>ee(J,pt))&&L(Z,`missing type "${Ne.join(",")}" for keyword "${pe}"`)}}}function ee(Z,J){return Z.includes(J)||J==="number"&&Z.includes("integer")}function B(Z,J){return Z.includes(J)||J==="integer"&&Z.includes("number")}function C(Z,J){const ie=[];for(const pe of Z.dataTypes)B(J,pe)?ie.push(pe):J.includes("integer")&&pe==="number"&&ie.push("integer");Z.dataTypes=ie}function L(Z,J){const ie=Z.schemaEnv.baseId+Z.errSchemaPath;J+=` at "${ie}" (strictTypes)`,(0,y.checkStrictMode)(Z,J,Z.opts.strictTypes)}class W{constructor(J,ie,pe){if((0,u.validateKeywordUsage)(J,ie,pe),this.gen=J.gen,this.allErrors=J.allErrors,this.keyword=pe,this.data=J.data,this.schema=J.schema[pe],this.$data=ie.$data&&J.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,y.schemaRefOrVal)(J,this.schema,pe,this.$data),this.schemaType=ie.schemaType,this.parentSchema=J.schema,this.params={},this.it=J,this.def=ie,this.$data)this.schemaCode=J.gen.const("vSchema",be(this.$data,J));else if(this.schemaCode=this.schemaValue,!(0,u.validSchemaType)(this.schema,ie.schemaType,ie.allowUndefined))throw new Error(`${pe} value must be ${JSON.stringify(ie.schemaType)}`);("code"in ie?ie.trackErrors:ie.errors!==!1)&&(this.errsCount=J.gen.const("_errs",g.default.errors))}result(J,ie,pe){this.failResult((0,p.not)(J),ie,pe)}failResult(J,ie,pe){this.gen.if(J),pe?pe():this.error(),ie?(this.gen.else(),ie(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(J,ie){this.failResult((0,p.not)(J),void 0,ie)}fail(J){if(J===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(J),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(J){if(!this.$data)return this.fail(J);const{schemaCode:ie}=this;this.fail((0,p._)`${ie} !== undefined && (${(0,p.or)(this.invalid$data(),J)})`)}error(J,ie,pe){if(ie){this.setParams(ie),this._error(J,pe),this.setParams({});return}this._error(J,pe)}_error(J,ie){(J?v.reportExtraError:v.reportError)(this,this.def.error,ie)}$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(J){this.allErrors||this.gen.if(J)}setParams(J,ie){ie?Object.assign(this.params,J):this.params=J}block$data(J,ie,pe=p.nil){this.gen.block(()=>{this.check$data(J,pe),ie()})}check$data(J=p.nil,ie=p.nil){if(!this.$data)return;const{gen:pe,schemaCode:ve,schemaType:Ne,def:pt}=this;pe.if((0,p.or)((0,p._)`${ve} === undefined`,ie)),J!==p.nil&&pe.assign(J,!0),(Ne.length||pt.validateSchema)&&(pe.elseIf(this.invalid$data()),this.$dataError(),J!==p.nil&&pe.assign(J,!1)),pe.else()}invalid$data(){const{gen:J,schemaCode:ie,schemaType:pe,def:ve,it:Ne}=this;return(0,p.or)(pt(),Vt());function pt(){if(pe.length){if(!(ie instanceof p.Name))throw new Error("ajv implementation error");const zt=Array.isArray(pe)?pe:[pe];return(0,p._)`${(0,l.checkDataTypes)(zt,ie,Ne.opts.strictNumbers,l.DataType.Wrong)}`}return p.nil}function Vt(){if(ve.validateSchema){const zt=J.scopeValue("validate$data",{ref:ve.validateSchema});return(0,p._)`!${zt}(${ie})`}return p.nil}}subschema(J,ie){const pe=(0,f.getSubschema)(this.it,J);(0,f.extendSubschemaData)(pe,this.it,J),(0,f.extendSubschemaMode)(pe,J);const ve={...this.it,...pe,items:void 0,props:void 0};return w(ve,ie),ve}mergeEvaluated(J,ie){const{it:pe,gen:ve}=this;pe.opts.unevaluated&&(pe.props!==!0&&J.props!==void 0&&(pe.props=y.mergeEvaluated.props(ve,J.props,pe.props,ie)),pe.items!==!0&&J.items!==void 0&&(pe.items=y.mergeEvaluated.items(ve,J.items,pe.items,ie)))}mergeValidEvaluated(J,ie){const{it:pe,gen:ve}=this;if(pe.opts.unevaluated&&(pe.props!==!0||pe.items!==!0))return ve.if(ie,()=>this.mergeEvaluated(J,p.Name)),!0}}dn.KeywordCxt=W;function me(Z,J,ie,pe){const ve=new W(Z,ie,J);"code"in ie?ie.code(ve,pe):ve.$data&&ie.validate?(0,u.funcKeywordCode)(ve,ie):"macro"in ie?(0,u.macroKeywordCode)(ve,ie):(ie.compile||ie.validate)&&(0,u.funcKeywordCode)(ve,ie)}const fe=/^\/(?:[^~]|~0|~1)*$/,we=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function be(Z,{dataLevel:J,dataNames:ie,dataPathArr:pe}){let ve,Ne;if(Z==="")return g.default.rootData;if(Z[0]==="/"){if(!fe.test(Z))throw new Error(`Invalid JSON-pointer: ${Z}`);ve=Z,Ne=g.default.rootData}else{const Et=we.exec(Z);if(!Et)throw new Error(`Invalid JSON-pointer: ${Z}`);const gt=+Et[1];if(ve=Et[2],ve==="#"){if(gt>=J)throw new Error(zt("property/index",gt));return pe[J-gt]}if(gt>J)throw new Error(zt("data",gt));if(Ne=ie[J-gt],!ve)return Ne}let pt=Ne;const Vt=ve.split("/");for(const Et of Vt)Et&&(Ne=(0,p._)`${Ne}${(0,p.getProperty)((0,y.unescapeJsonPointer)(Et))}`,pt=(0,p._)`${pt} && ${Ne}`);return pt;function zt(Et,gt){return`Cannot access ${Et} ${gt} levels up, current level is ${J}`}}return dn.getData=be,dn}var js={},Oh;function Lf(){if(Oh)return js;Oh=1,Object.defineProperty(js,"__esModule",{value:!0});class e extends Error{constructor(o){super("validation failed"),this.errors=o,this.ajv=this.validation=!0}}return js.default=e,js}var Ss={},Ah;function kc(){if(Ah)return Ss;Ah=1,Object.defineProperty(Ss,"__esModule",{value:!0});const e=Sc();class n extends Error{constructor(l,c,u,f){super(f||`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 Ss.default=n,Ss}var ma={},Dh;function Vf(){if(Dh)return ma;Dh=1,Object.defineProperty(ma,"__esModule",{value:!0}),ma.resolveSchema=ma.getCompilingSchema=ma.resolveRef=ma.compileSchema=ma.SchemaEnv=void 0;const e=Oe(),n=Lf(),o=mr(),l=Sc(),c=qe(),u=wc();class f{constructor(k){var $;this.refs={},this.dynamicAnchors={};let w;typeof k.schema=="object"&&(w=k.schema),this.schema=k.schema,this.schemaId=k.schemaId,this.root=k.root||this,this.baseId=($=k.baseId)!==null&&$!==void 0?$:(0,l.normalizeId)(w==null?void 0:w[k.schemaId||"$id"]),this.schemaPath=k.schemaPath,this.localRefs=k.localRefs,this.meta=k.meta,this.$async=w==null?void 0:w.$async,this.refs={}}}ma.SchemaEnv=f;function p(z){const k=y.call(this,z);if(k)return k;const $=(0,l.getFullPath)(this.opts.uriResolver,z.root.baseId),{es5:w,lines:R}=this.opts.code,{ownProperties:b}=this.opts,j=new e.CodeGen(this.scope,{es5:w,lines:R,ownProperties:b});let T;z.$async&&(T=j.scopeValue("Error",{ref:n.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const O=j.scopeName("validate");z.validateName=O;const V={gen:j,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:j.scopeValue("schema",this.opts.code.source===!0?{ref:z.schema,code:(0,e.stringify)(z.schema)}:{ref:z.schema}),validateName:O,ValidationError:T,schema:z.schema,schemaEnv:z,rootId:$,baseId:z.baseId||$,schemaPath:e.nil,errSchemaPath:z.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let F;try{this._compilations.add(z),(0,u.validateFunctionCode)(V),j.optimize(this.opts.code.optimize);const H=j.toString();F=`${j.scopeRefs(o.default.scope)}return ${H}`,this.opts.code.process&&(F=this.opts.code.process(F,z));const ue=new Function(`${o.default.self}`,`${o.default.scope}`,F)(this,this.scope.get());if(this.scope.value(O,{ref:ue}),ue.errors=null,ue.schema=z.schema,ue.schemaEnv=z,z.$async&&(ue.$async=!0),this.opts.code.source===!0&&(ue.source={validateName:O,validateCode:H,scopeValues:j._values}),this.opts.unevaluated){const{props:de,items:je}=V;ue.evaluated={props:de instanceof e.Name?void 0:de,items:je instanceof e.Name?void 0:je,dynamicProps:de instanceof e.Name,dynamicItems:je instanceof e.Name},ue.source&&(ue.source.evaluated=(0,e.stringify)(ue.evaluated))}return z.validate=ue,z}catch(H){throw delete z.validate,delete z.validateName,F&&this.logger.error("Error compiling schema, function code:",F),H}finally{this._compilations.delete(z)}}ma.compileSchema=p;function g(z,k,$){var w;$=(0,l.resolveUrl)(this.opts.uriResolver,k,$);const R=z.refs[$];if(R)return R;let b=S.call(this,z,$);if(b===void 0){const j=(w=z.localRefs)===null||w===void 0?void 0:w[$],{schemaId:T}=this.opts;j&&(b=new f({schema:j,schemaId:T,root:z,baseId:k}))}if(b!==void 0)return z.refs[$]=h.call(this,b)}ma.resolveRef=g;function h(z){return(0,l.inlineRef)(z.schema,this.opts.inlineRefs)?z.schema:z.validate?z:p.call(this,z)}function y(z){for(const k of this._compilations)if(v(k,z))return k}ma.getCompilingSchema=y;function v(z,k){return z.schema===k.schema&&z.root===k.root&&z.baseId===k.baseId}function S(z,k){let $;for(;typeof($=this.refs[k])=="string";)k=$;return $||this.schemas[k]||N.call(this,z,k)}function N(z,k){const $=this.opts.uriResolver.parse(k),w=(0,l._getFullPath)(this.opts.uriResolver,$);let R=(0,l.getFullPath)(this.opts.uriResolver,z.baseId,void 0);if(Object.keys(z.schema).length>0&&w===R)return E.call(this,$,z);const b=(0,l.normalizeId)(w),j=this.refs[b]||this.schemas[b];if(typeof j=="string"){const T=N.call(this,z,j);return typeof(T==null?void 0:T.schema)!="object"?void 0:E.call(this,$,T)}if(typeof(j==null?void 0:j.schema)=="object"){if(j.validate||p.call(this,j),b===(0,l.normalizeId)(k)){const{schema:T}=j,{schemaId:O}=this.opts,V=T[O];return V&&(R=(0,l.resolveUrl)(this.opts.uriResolver,R,V)),new f({schema:T,schemaId:O,root:z,baseId:R})}return E.call(this,$,j)}}ma.resolveSchema=N;const x=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function E(z,{baseId:k,schema:$,root:w}){var R;if(((R=z.fragment)===null||R===void 0?void 0:R[0])!=="/")return;for(const T of z.fragment.slice(1).split("/")){if(typeof $=="boolean")return;const O=$[(0,c.unescapeFragment)(T)];if(O===void 0)return;$=O;const V=typeof $=="object"&&$[this.opts.schemaId];!x.has(T)&&V&&(k=(0,l.resolveUrl)(this.opts.uriResolver,k,V))}let b;if(typeof $!="boolean"&&$.$ref&&!(0,c.schemaHasRulesButRef)($,this.RULES)){const T=(0,l.resolveUrl)(this.opts.uriResolver,k,$.$ref);b=N.call(this,w,T)}const{schemaId:j}=this.opts;if(b=b||new f({schema:$,schemaId:j,root:w,baseId:k}),b.schema!==b.root.schema)return b}return ma}const h3="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",y3="Meta-schema for $data reference (JSON AnySchema extension proposal)",v3="object",$3=["$data"],b3={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},x3=!1,_3={$id:h3,description:y3,type:v3,required:$3,properties:b3,additionalProperties:x3};var ws={},Po={exports:{}},rf,Uh;function a1(){if(Uh)return rf;Uh=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(b){let j="",T=0,O=0;for(O=0;O<b.length;O++)if(T=b[O].charCodeAt(0),T!==48){if(!(T>=48&&T<=57||T>=65&&T<=70||T>=97&&T<=102))return"";j+=b[O];break}for(O+=1;O<b.length;O++){if(T=b[O].charCodeAt(0),!(T>=48&&T<=57||T>=65&&T<=70||T>=97&&T<=102))return"";j+=b[O]}return j}const f=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function p(b){return b.length=0,!0}function g(b,j,T){if(b.length){const O=u(b);if(O!=="")j.push(O);else return T.error=!0,!1;b.length=0}return!0}function h(b){let j=0;const T={error:!1,address:"",zone:""},O=[],V=[];let F=!1,H=!1,Q=g;for(let ue=0;ue<b.length;ue++){const de=b[ue];if(!(de==="["||de==="]"))if(de===":"){if(F===!0&&(H=!0),!Q(V,O,T))break;if(++j>7){T.error=!0;break}ue>0&&b[ue-1]===":"&&(F=!0),O.push(":");continue}else if(de==="%"){if(!Q(V,O,T))break;Q=p}else{V.push(de);continue}}return V.length&&(Q===p?T.zone=V.join(""):H?O.push(V.join("")):O.push(u(V))),T.address=O.join(""),T}function y(b){if(v(b,":")<2)return{host:b,isIPV6:!1};const j=h(b);if(j.error)return{host:b,isIPV6:!1};{let T=j.address,O=j.address;return j.zone&&(T+="%"+j.zone,O+="%25"+j.zone),{host:T,isIPV6:!0,escapedHost:O}}}function v(b,j){let T=0;for(let O=0;O<b.length;O++)b[O]===j&&T++;return T}function S(b){let j=b;const T=[];let O=-1,V=0;for(;V=j.length;){if(V===1){if(j===".")break;if(j==="/"){T.push("/");break}else{T.push(j);break}}else if(V===2){if(j[0]==="."){if(j[1]===".")break;if(j[1]==="/"){j=j.slice(2);continue}}else if(j[0]==="/"&&(j[1]==="."||j[1]==="/")){T.push("/");break}}else if(V===3&&j==="/.."){T.length!==0&&T.pop(),T.push("/");break}if(j[0]==="."){if(j[1]==="."){if(j[2]==="/"){j=j.slice(3);continue}}else if(j[1]==="/"){j=j.slice(2);continue}}else if(j[0]==="/"&&j[1]==="."){if(j[2]==="/"){j=j.slice(2);continue}else if(j[2]==="."&&j[3]==="/"){j=j.slice(3),T.length!==0&&T.pop();continue}}if((O=j.indexOf("/",1))===-1){T.push(j);break}else T.push(j.slice(0,O)),j=j.slice(O)}return T.join("")}const N={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},x=/[@/?#:]/g,E=/[@/?#]/g;function z(b,j){const T=j?E:x;return T.lastIndex=0,b.replace(T,O=>N[O])}function k(b,j=!1){if(b.indexOf("%")===-1)return b;let T="";for(let O=0;O<b.length;O++){if(b[O]==="%"&&O+2<b.length){const V=b.slice(O+1,O+3);if(o(V)){const F=V.toUpperCase(),H=String.fromCharCode(parseInt(F,16));j&&l(H)?T+=H:T+="%"+F,O+=2;continue}}T+=b[O]}return T}function $(b){let j="";for(let T=0;T<b.length;T++){if(b[T]==="%"&&T+2<b.length){const O=b.slice(T+1,T+3);if(o(O)){const V=O.toUpperCase(),F=String.fromCharCode(parseInt(V,16));F!=="."&&l(F)?j+=F:j+="%"+V,T+=2;continue}}c(b[T])?j+=b[T]:j+=escape(b[T])}return j}function w(b){let j="";for(let T=0;T<b.length;T++){if(b[T]==="%"&&T+2<b.length){const O=b.slice(T+1,T+3);if(o(O)){j+="%"+O.toUpperCase(),T+=2;continue}}j+=escape(b[T])}return j}function R(b){const j=[];if(b.userinfo!==void 0&&(j.push(b.userinfo),j.push("@")),b.host!==void 0){let T=unescape(b.host);if(!n(T)){const O=y(T);O.isIPV6===!0?T=`[${O.escapedHost}]`:T=z(T,!1)}j.push(T)}return(typeof b.port=="number"||typeof b.port=="string")&&(j.push(":"),j.push(String(b.port))),j.length?j.join(""):void 0}return rf={nonSimpleDomain:f,recomposeAuthority:R,reescapeHostDelimiters:z,normalizePercentEncoding:k,normalizePathEncoding:$,escapePreservingEscapes:w,removeDotSegments:S,isIPv4:n,isUUID:e,normalizeIPv6:y,stringArrayToHexStripped:u},rf}var of,Ih;function j3(){if(Ih)return of;Ih=1;const{isUUID:e}=a1(),n=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,o=["http","https","ws","wss","urn","urn:uuid"];function l(b){return o.indexOf(b)!==-1}function c(b){return b.secure===!0?!0:b.secure===!1?!1:b.scheme?b.scheme.length===3&&(b.scheme[0]==="w"||b.scheme[0]==="W")&&(b.scheme[1]==="s"||b.scheme[1]==="S")&&(b.scheme[2]==="s"||b.scheme[2]==="S"):!1}function u(b){return b.host||(b.error=b.error||"HTTP URIs must have a host."),b}function f(b){const j=String(b.scheme).toLowerCase()==="https";return(b.port===(j?443:80)||b.port==="")&&(b.port=void 0),b.path||(b.path="/"),b}function p(b){return b.secure=c(b),b.resourceName=(b.path||"/")+(b.query?"?"+b.query:""),b.path=void 0,b.query=void 0,b}function g(b){if((b.port===(c(b)?443:80)||b.port==="")&&(b.port=void 0),typeof b.secure=="boolean"&&(b.scheme=b.secure?"wss":"ws",b.secure=void 0),b.resourceName){const[j,T]=b.resourceName.split("?");b.path=j&&j!=="/"?j:void 0,b.query=T,b.resourceName=void 0}return b.fragment=void 0,b}function h(b,j){if(!b.path)return b.error="URN can not be parsed",b;const T=b.path.match(n);if(T){const O=j.scheme||b.scheme||"urn";b.nid=T[1].toLowerCase(),b.nss=T[2];const V=`${O}:${j.nid||b.nid}`,F=R(V);b.path=void 0,F&&(b=F.parse(b,j))}else b.error=b.error||"URN can not be parsed.";return b}function y(b,j){if(b.nid===void 0)throw new Error("URN without nid cannot be serialized");const T=j.scheme||b.scheme||"urn",O=b.nid.toLowerCase(),V=`${T}:${j.nid||O}`,F=R(V);F&&(b=F.serialize(b,j));const H=b,Q=b.nss;return H.path=`${O||j.nid}:${Q}`,j.skipEscape=!0,H}function v(b,j){const T=b;return T.uuid=T.nss,T.nss=void 0,!j.tolerant&&(!T.uuid||!e(T.uuid))&&(T.error=T.error||"UUID is not valid."),T}function S(b){const j=b;return j.nss=(b.uuid||"").toLowerCase(),j}const N={scheme:"http",domainHost:!0,parse:u,serialize:f},x={scheme:"https",domainHost:N.domainHost,parse:u,serialize:f},E={scheme:"ws",domainHost:!0,parse:p,serialize:g},z={scheme:"wss",domainHost:E.domainHost,parse:E.parse,serialize:E.serialize},w={http:N,https:x,ws:E,wss:z,urn:{scheme:"urn",parse:h,serialize:y,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:v,serialize:S,skipNormalize:!0}};Object.setPrototypeOf(w,null);function R(b){return b&&(w[b]||w[b.toLowerCase()])||void 0}return of={wsIsSecure:c,SCHEMES:w,isValidSchemeName:l,getSchemeHandler:R},of}var Lh;function S3(){if(Lh)return Po.exports;Lh=1;const{normalizeIPv6:e,removeDotSegments:n,recomposeAuthority:o,normalizePercentEncoding:l,normalizePathEncoding:c,escapePreservingEscapes:u,reescapeHostDelimiters:f,isIPv4:p,nonSimpleDomain:g}=a1(),{SCHEMES:h,getSchemeHandler:y}=j3();function v(O,V){return typeof O=="string"?O=R(O,V):typeof O=="object"&&(O=w(E(O,V),V)),O}function S(O,V,F){const H=F?Object.assign({scheme:"null"},F):{scheme:"null"},Q=N(w(O,H),w(V,H),H,!0);return H.skipEscape=!0,E(Q,H)}function N(O,V,F,H){const Q={};return H||(O=w(E(O,F),F),V=w(E(V,F),F)),F=F||{},!F.tolerant&&V.scheme?(Q.scheme=V.scheme,Q.userinfo=V.userinfo,Q.host=V.host,Q.port=V.port,Q.path=n(V.path||""),Q.query=V.query):(V.userinfo!==void 0||V.host!==void 0||V.port!==void 0?(Q.userinfo=V.userinfo,Q.host=V.host,Q.port=V.port,Q.path=n(V.path||""),Q.query=V.query):(V.path?(V.path[0]==="/"?Q.path=n(V.path):((O.userinfo!==void 0||O.host!==void 0||O.port!==void 0)&&!O.path?Q.path="/"+V.path:O.path?Q.path=O.path.slice(0,O.path.lastIndexOf("/")+1)+V.path:Q.path=V.path,Q.path=n(Q.path)),Q.query=V.query):(Q.path=O.path,V.query!==void 0?Q.query=V.query:Q.query=O.query),Q.userinfo=O.userinfo,Q.host=O.host,Q.port=O.port),Q.scheme=O.scheme),Q.fragment=V.fragment,Q}function x(O,V,F){const H=j(O,F),Q=j(V,F);return H!==void 0&&Q!==void 0&&H.toLowerCase()===Q.toLowerCase()}function E(O,V){const F={host:O.host,scheme:O.scheme,userinfo:O.userinfo,port:O.port,path:O.path,query:O.query,nid:O.nid,nss:O.nss,uuid:O.uuid,fragment:O.fragment,reference:O.reference,resourceName:O.resourceName,secure:O.secure,error:""},H=Object.assign({},V),Q=[],ue=y(H.scheme||F.scheme);ue&&ue.serialize&&ue.serialize(F,H),F.path!==void 0&&(H.skipEscape?F.path=l(F.path):(F.path=u(F.path),F.scheme!==void 0&&(F.path=F.path.split("%3A").join(":")))),H.reference!=="suffix"&&F.scheme&&Q.push(F.scheme,":");const de=o(F);if(de!==void 0&&(H.reference!=="suffix"&&Q.push("//"),Q.push(de),F.path&&F.path[0]!=="/"&&Q.push("/")),F.path!==void 0){let je=F.path;!H.absolutePath&&(!ue||!ue.absolutePath)&&(je=n(je)),de===void 0&&je[0]==="/"&&je[1]==="/"&&(je="/%2F"+je.slice(2)),Q.push(je)}return F.query!==void 0&&Q.push("?",F.query),F.fragment!==void 0&&Q.push("#",F.fragment),Q.join("")}const z=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function k(O,V){if(V[2]!==void 0&&O.path&&O.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof O.port=="number"&&(O.port<0||O.port>65535))return"URI port is malformed."}function $(O,V){const F=Object.assign({},V),H={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let Q=!1,ue=!1;F.reference==="suffix"&&(F.scheme?O=F.scheme+":"+O:O="//"+O);const de=O.match(z);if(de){H.scheme=de[1],H.userinfo=de[3],H.host=de[4],H.port=parseInt(de[5],10),H.path=de[6]||"",H.query=de[7],H.fragment=de[8],isNaN(H.port)&&(H.port=de[5]);const je=k(H,de);if(je!==void 0&&(H.error=H.error||je,Q=!0),H.host)if(p(H.host)===!1){const ge=e(H.host);H.host=ge.host.toLowerCase(),ue=ge.isIPV6}else ue=!0;H.scheme===void 0&&H.userinfo===void 0&&H.host===void 0&&H.port===void 0&&H.query===void 0&&!H.path?H.reference="same-document":H.scheme===void 0?H.reference="relative":H.fragment===void 0?H.reference="absolute":H.reference="uri",F.reference&&F.reference!=="suffix"&&F.reference!==H.reference&&(H.error=H.error||"URI is not a "+F.reference+" reference.");const ce=y(F.scheme||H.scheme);if(!F.unicodeSupport&&(!ce||!ce.unicodeSupport)&&H.host&&(F.domainHost||ce&&ce.domainHost)&&ue===!1&&g(H.host))try{H.host=URL.domainToASCII(H.host.toLowerCase())}catch($e){H.error=H.error||"Host's domain name can not be converted to ASCII: "+$e}if((!ce||ce&&!ce.skipNormalize)&&(O.indexOf("%")!==-1&&(H.scheme!==void 0&&(H.scheme=unescape(H.scheme)),H.host!==void 0&&(H.host=f(unescape(H.host),ue))),H.path&&(H.path=c(H.path)),H.fragment))try{H.fragment=encodeURI(decodeURIComponent(H.fragment))}catch{H.error=H.error||"URI malformed"}ce&&ce.parse&&ce.parse(H,F)}else H.error=H.error||"URI can not be parsed.";return{parsed:H,malformedAuthorityOrPort:Q}}function w(O,V){return $(O,V).parsed}function R(O,V){return b(O,V).normalized}function b(O,V){const{parsed:F,malformedAuthorityOrPort:H}=$(O,V);return{normalized:H?O:E(F,V),malformedAuthorityOrPort:H}}function j(O,V){if(typeof O=="string"){const{normalized:F,malformedAuthorityOrPort:H}=b(O,V);return H?void 0:F}if(typeof O=="object")return E(O,V)}const T={SCHEMES:h,normalize:v,resolve:S,resolveComponent:N,equal:x,serialize:E,parse:w};return Po.exports=T,Po.exports.default=T,Po.exports.fastUri=T,Po.exports}var Vh;function w3(){if(Vh)return ws;Vh=1,Object.defineProperty(ws,"__esModule",{value:!0});const e=S3();return e.code='require("ajv/dist/runtime/uri").default',ws.default=e,ws}var Hh;function k3(){return Hh||(Hh=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=wc();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return n.KeywordCxt}});var o=Oe();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=Lf(),c=kc(),u=Qv(),f=Vf(),p=Oe(),g=Sc(),h=mc(),y=qe(),v=_3,S=w3(),N=(A,D)=>new RegExp(A,D);N.code="new RegExp";const x=["removeAdditional","useDefaults","coerceTypes"],E=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),z={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},k={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},$=200;function w(A){var D,ee,B,C,L,W,me,fe,we,be,Z,J,ie,pe,ve,Ne,pt,Vt,zt,Et,gt,yn,Qt,ea,qi;const vn=A.strict,Gr=(D=A.code)===null||D===void 0?void 0:D.optimize,hr=Gr===!0||Gr===void 0?1:Gr||0,rl=(B=(ee=A.code)===null||ee===void 0?void 0:ee.regExp)!==null&&B!==void 0?B:N,il=(C=A.uriResolver)!==null&&C!==void 0?C:S.default;return{strictSchema:(W=(L=A.strictSchema)!==null&&L!==void 0?L:vn)!==null&&W!==void 0?W:!0,strictNumbers:(fe=(me=A.strictNumbers)!==null&&me!==void 0?me:vn)!==null&&fe!==void 0?fe:!0,strictTypes:(be=(we=A.strictTypes)!==null&&we!==void 0?we:vn)!==null&&be!==void 0?be:"log",strictTuples:(J=(Z=A.strictTuples)!==null&&Z!==void 0?Z:vn)!==null&&J!==void 0?J:"log",strictRequired:(pe=(ie=A.strictRequired)!==null&&ie!==void 0?ie:vn)!==null&&pe!==void 0?pe:!1,code:A.code?{...A.code,optimize:hr,regExp:rl}:{optimize:hr,regExp:rl},loopRequired:(ve=A.loopRequired)!==null&&ve!==void 0?ve:$,loopEnum:(Ne=A.loopEnum)!==null&&Ne!==void 0?Ne:$,meta:(pt=A.meta)!==null&&pt!==void 0?pt:!0,messages:(Vt=A.messages)!==null&&Vt!==void 0?Vt:!0,inlineRefs:(zt=A.inlineRefs)!==null&&zt!==void 0?zt:!0,schemaId:(Et=A.schemaId)!==null&&Et!==void 0?Et:"$id",addUsedSchema:(gt=A.addUsedSchema)!==null&&gt!==void 0?gt:!0,validateSchema:(yn=A.validateSchema)!==null&&yn!==void 0?yn:!0,validateFormats:(Qt=A.validateFormats)!==null&&Qt!==void 0?Qt:!0,unicodeRegExp:(ea=A.unicodeRegExp)!==null&&ea!==void 0?ea:!0,int32range:(qi=A.int32range)!==null&&qi!==void 0?qi:!0,uriResolver:il}}class R{constructor(D={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,D=this.opts={...D,...w(D)};const{es5:ee,lines:B}=this.opts.code;this.scope=new p.ValueScope({scope:{},prefixes:E,es5:ee,lines:B}),this.logger=Q(D.logger);const C=D.validateFormats;D.validateFormats=!1,this.RULES=(0,u.getRules)(),b.call(this,z,D,"NOT SUPPORTED"),b.call(this,k,D,"DEPRECATED","warn"),this._metaOpts=F.call(this),D.formats&&O.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),D.keywords&&V.call(this,D.keywords),typeof D.meta=="object"&&this.addMetaSchema(D.meta),T.call(this),D.validateFormats=C}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:D,meta:ee,schemaId:B}=this.opts;let C=v;B==="id"&&(C={...v},C.id=C.$id,delete C.$id),ee&&D&&this.addMetaSchema(C,C[B],!1)}defaultMeta(){const{meta:D,schemaId:ee}=this.opts;return this.opts.defaultMeta=typeof D=="object"?D[ee]||D:void 0}validate(D,ee){let B;if(typeof D=="string"){if(B=this.getSchema(D),!B)throw new Error(`no schema with key or ref "${D}"`)}else B=this.compile(D);const C=B(ee);return"$async"in B||(this.errors=B.errors),C}compile(D,ee){const B=this._addSchema(D,ee);return B.validate||this._compileSchemaEnv(B)}compileAsync(D,ee){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:B}=this.opts;return C.call(this,D,ee);async function C(be,Z){await L.call(this,be.$schema);const J=this._addSchema(be,Z);return J.validate||W.call(this,J)}async function L(be){be&&!this.getSchema(be)&&await C.call(this,{$ref:be},!0)}async function W(be){try{return this._compileSchemaEnv(be)}catch(Z){if(!(Z instanceof c.default))throw Z;return me.call(this,Z),await fe.call(this,Z.missingSchema),W.call(this,be)}}function me({missingSchema:be,missingRef:Z}){if(this.refs[be])throw new Error(`AnySchema ${be} is loaded but ${Z} cannot be resolved`)}async function fe(be){const Z=await we.call(this,be);this.refs[be]||await L.call(this,Z.$schema),this.refs[be]||this.addSchema(Z,be,ee)}async function we(be){const Z=this._loading[be];if(Z)return Z;try{return await(this._loading[be]=B(be))}finally{delete this._loading[be]}}}addSchema(D,ee,B,C=this.opts.validateSchema){if(Array.isArray(D)){for(const W of D)this.addSchema(W,void 0,B,C);return this}let L;if(typeof D=="object"){const{schemaId:W}=this.opts;if(L=D[W],L!==void 0&&typeof L!="string")throw new Error(`schema ${W} must be string`)}return ee=(0,g.normalizeId)(ee||L),this._checkUnique(ee),this.schemas[ee]=this._addSchema(D,B,ee,C,!0),this}addMetaSchema(D,ee,B=this.opts.validateSchema){return this.addSchema(D,ee,!0,B),this}validateSchema(D,ee){if(typeof D=="boolean")return!0;let B;if(B=D.$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 C=this.validate(B,D);if(!C&&ee){const L="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(L);else throw new Error(L)}return C}getSchema(D){let ee;for(;typeof(ee=j.call(this,D))=="string";)D=ee;if(ee===void 0){const{schemaId:B}=this.opts,C=new f.SchemaEnv({schema:{},schemaId:B});if(ee=f.resolveSchema.call(this,C,D),!ee)return;this.refs[D]=ee}return ee.validate||this._compileSchemaEnv(ee)}removeSchema(D){if(D instanceof RegExp)return this._removeAllSchemas(this.schemas,D),this._removeAllSchemas(this.refs,D),this;switch(typeof D){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const ee=j.call(this,D);return typeof ee=="object"&&this._cache.delete(ee.schema),delete this.schemas[D],delete this.refs[D],this}case"object":{const ee=D;this._cache.delete(ee);let B=D[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(D){for(const ee of D)this.addKeyword(ee);return this}addKeyword(D,ee){let B;if(typeof D=="string")B=D,typeof ee=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),ee.keyword=B);else if(typeof D=="object"&&ee===void 0){if(ee=D,B=ee.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(de.call(this,B,ee),!ee)return(0,y.eachItem)(B,L=>je.call(this,L)),this;$e.call(this,ee);const C={...ee,type:(0,h.getJSONTypes)(ee.type),schemaType:(0,h.getJSONTypes)(ee.schemaType)};return(0,y.eachItem)(B,C.type.length===0?L=>je.call(this,L,C):L=>C.type.forEach(W=>je.call(this,L,C,W))),this}getKeyword(D){const ee=this.RULES.all[D];return typeof ee=="object"?ee.definition:!!ee}removeKeyword(D){const{RULES:ee}=this;delete ee.keywords[D],delete ee.all[D];for(const B of ee.rules){const C=B.rules.findIndex(L=>L.keyword===D);C>=0&&B.rules.splice(C,1)}return this}addFormat(D,ee){return typeof ee=="string"&&(ee=new RegExp(ee)),this.formats[D]=ee,this}errorsText(D=this.errors,{separator:ee=", ",dataVar:B="data"}={}){return!D||D.length===0?"No errors":D.map(C=>`${B}${C.instancePath} ${C.message}`).reduce((C,L)=>C+ee+L)}$dataMetaSchema(D,ee){const B=this.RULES.all;D=JSON.parse(JSON.stringify(D));for(const C of ee){const L=C.split("/").slice(1);let W=D;for(const me of L)W=W[me];for(const me in B){const fe=B[me];if(typeof fe!="object")continue;const{$data:we}=fe.definition,be=W[me];we&&be&&(W[me]=Ae(be))}}return D}_removeAllSchemas(D,ee){for(const B in D){const C=D[B];(!ee||ee.test(B))&&(typeof C=="string"?delete D[B]:C&&!C.meta&&(this._cache.delete(C.schema),delete D[B]))}}_addSchema(D,ee,B,C=this.opts.validateSchema,L=this.opts.addUsedSchema){let W;const{schemaId:me}=this.opts;if(typeof D=="object")W=D[me];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof D!="boolean")throw new Error("schema must be object or boolean")}let fe=this._cache.get(D);if(fe!==void 0)return fe;B=(0,g.normalizeId)(W||B);const we=g.getSchemaRefs.call(this,D,B);return fe=new f.SchemaEnv({schema:D,schemaId:me,meta:ee,baseId:B,localRefs:we}),this._cache.set(fe.schema,fe),L&&!B.startsWith("#")&&(B&&this._checkUnique(B),this.refs[B]=fe),C&&this.validateSchema(D,!0),fe}_checkUnique(D){if(this.schemas[D]||this.refs[D])throw new Error(`schema with key or id "${D}" already exists`)}_compileSchemaEnv(D){if(D.meta?this._compileMetaSchema(D):f.compileSchema.call(this,D),!D.validate)throw new Error("ajv implementation error");return D.validate}_compileMetaSchema(D){const ee=this.opts;this.opts=this._metaOpts;try{f.compileSchema.call(this,D)}finally{this.opts=ee}}}R.ValidationError=l.default,R.MissingRefError=c.default,e.default=R;function b(A,D,ee,B="error"){for(const C in A){const L=C;L in D&&this.logger[B](`${ee}: option ${C}. ${A[L]}`)}}function j(A){return A=(0,g.normalizeId)(A),this.schemas[A]||this.refs[A]}function T(){const A=this.opts.schemas;if(A)if(Array.isArray(A))this.addSchema(A);else for(const D in A)this.addSchema(A[D],D)}function O(){for(const A in this.opts.formats){const D=this.opts.formats[A];D&&this.addFormat(A,D)}}function V(A){if(Array.isArray(A)){this.addVocabulary(A);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const D in A){const ee=A[D];ee.keyword||(ee.keyword=D),this.addKeyword(ee)}}function F(){const A={...this.opts};for(const D of x)delete A[D];return A}const H={log(){},warn(){},error(){}};function Q(A){if(A===!1)return H;if(A===void 0)return console;if(A.log&&A.warn&&A.error)return A;throw new Error("logger must implement log, warn and error methods")}const ue=/^[a-z_$][a-z0-9_$:-]*$/i;function de(A,D){const{RULES:ee}=this;if((0,y.eachItem)(A,B=>{if(ee.keywords[B])throw new Error(`Keyword ${B} is already defined`);if(!ue.test(B))throw new Error(`Keyword ${B} has invalid name`)}),!!D&&D.$data&&!("code"in D||"validate"in D))throw new Error('$data keyword must have "code" or "validate" function')}function je(A,D,ee){var B;const C=D==null?void 0:D.post;if(ee&&C)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:L}=this;let W=C?L.post:L.rules.find(({type:fe})=>fe===ee);if(W||(W={type:ee,rules:[]},L.rules.push(W)),L.keywords[A]=!0,!D)return;const me={keyword:A,definition:{...D,type:(0,h.getJSONTypes)(D.type),schemaType:(0,h.getJSONTypes)(D.schemaType)}};D.before?ce.call(this,W,me,D.before):W.rules.push(me),L.all[A]=me,(B=D.implements)===null||B===void 0||B.forEach(fe=>this.addKeyword(fe))}function ce(A,D,ee){const B=A.rules.findIndex(C=>C.keyword===ee);B>=0?A.rules.splice(B,0,D):(A.rules.push(D),this.logger.warn(`rule ${ee} is not defined`))}function $e(A){let{metaSchema:D}=A;D!==void 0&&(A.$data&&this.opts.$data&&(D=Ae(D)),A.validateSchema=this.compile(D,!0))}const ge={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Ae(A){return{anyOf:[A,ge]}}})(Xd)),Xd}var ks={},Ns={},zs={},Bh;function N3(){if(Bh)return zs;Bh=1,Object.defineProperty(zs,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return zs.default=e,zs}var Bn={},qh;function z3(){if(qh)return Bn;qh=1,Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.callRef=Bn.getValidate=void 0;const e=kc(),n=Da(),o=Oe(),l=mr(),c=Vf(),u=qe(),f={keyword:"$ref",schemaType:"string",code(h){const{gen:y,schema:v,it:S}=h,{baseId:N,schemaEnv:x,validateName:E,opts:z,self:k}=S,{root:$}=x;if((v==="#"||v==="#/")&&N===$.baseId)return R();const w=c.resolveRef.call(k,$,N,v);if(w===void 0)throw new e.default(S.opts.uriResolver,N,v);if(w instanceof c.SchemaEnv)return b(w);return j(w);function R(){if(x===$)return g(h,E,x,x.$async);const T=y.scopeValue("root",{ref:$});return g(h,(0,o._)`${T}.validate`,$,$.$async)}function b(T){const O=p(h,T);g(h,O,T,T.$async)}function j(T){const O=y.scopeValue("schema",z.code.source===!0?{ref:T,code:(0,o.stringify)(T)}:{ref:T}),V=y.name("valid"),F=h.subschema({schema:T,dataTypes:[],schemaPath:o.nil,topSchemaRef:O,errSchemaPath:v},V);h.mergeEvaluated(F),h.ok(V)}}};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`}Bn.getValidate=p;function g(h,y,v,S){const{gen:N,it:x}=h,{allErrors:E,schemaEnv:z,opts:k}=x,$=k.passContext?l.default.this:o.nil;S?w():R();function w(){if(!z.$async)throw new Error("async schema referenced by sync schema");const T=N.let("valid");N.try(()=>{N.code((0,o._)`await ${(0,n.callValidateCode)(h,y,$)}`),j(y),E||N.assign(T,!0)},O=>{N.if((0,o._)`!(${O} instanceof ${x.ValidationError})`,()=>N.throw(O)),b(O),E||N.assign(T,!1)}),h.ok(T)}function R(){h.result((0,n.callValidateCode)(h,y,$),()=>j(y),()=>b(y))}function b(T){const O=(0,o._)`${T}.errors`;N.assign(l.default.vErrors,(0,o._)`${l.default.vErrors} === null ? ${O} : ${l.default.vErrors}.concat(${O})`),N.assign(l.default.errors,(0,o._)`${l.default.vErrors}.length`)}function j(T){var O;if(!x.opts.unevaluated)return;const V=(O=v==null?void 0:v.validate)===null||O===void 0?void 0:O.evaluated;if(x.props!==!0)if(V&&!V.dynamicProps)V.props!==void 0&&(x.props=u.mergeEvaluated.props(N,V.props,x.props));else{const F=N.var("props",(0,o._)`${T}.evaluated.props`);x.props=u.mergeEvaluated.props(N,F,x.props,o.Name)}if(x.items!==!0)if(V&&!V.dynamicItems)V.items!==void 0&&(x.items=u.mergeEvaluated.items(N,V.items,x.items));else{const F=N.var("items",(0,o._)`${T}.evaluated.items`);x.items=u.mergeEvaluated.items(N,F,x.items,o.Name)}}}return Bn.callRef=g,Bn.default=f,Bn}var Ph;function E3(){if(Ph)return Ns;Ph=1,Object.defineProperty(Ns,"__esModule",{value:!0});const e=N3(),n=z3(),o=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,n.default];return Ns.default=o,Ns}var Es={},Cs={},Zh;function C3(){if(Zh)return Cs;Zh=1,Object.defineProperty(Cs,"__esModule",{value:!0});const e=Oe(),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:f})=>(0,e.str)`must be ${o[u].okStr} ${f}`,params:({keyword:u,schemaCode:f})=>(0,e._)`{comparison: ${o[u].okStr}, limit: ${f}}`},c={keyword:Object.keys(o),type:"number",schemaType:"number",$data:!0,error:l,code(u){const{keyword:f,data:p,schemaCode:g}=u;u.fail$data((0,e._)`${p} ${o[f].fail} ${g} || isNaN(${p})`)}};return Cs.default=c,Cs}var Ts={},Gh;function T3(){if(Gh)return Ts;Gh=1,Object.defineProperty(Ts,"__esModule",{value:!0});const e=Oe(),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:f,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._)`(${f} === 0 || (${h} = ${u}/${f}, ${y}))`)}};return Ts.default=o,Ts}var Ms={},Rs={},Fh;function n1(){if(Fh)return Rs;Fh=1,Object.defineProperty(Rs,"__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 Rs.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',Rs}var Yh;function M3(){if(Yh)return Ms;Yh=1,Object.defineProperty(Ms,"__esModule",{value:!0});const e=Oe(),n=qe(),o=n1(),c={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:u,schemaCode:f}){const p=u==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${p} than ${f} characters`},params:({schemaCode:u})=>(0,e._)`{limit: ${u}}`},code(u){const{keyword:f,data:p,schemaCode:g,it:h}=u,y=f==="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 Ms.default=c,Ms}var Os={},Kh;function R3(){if(Kh)return Os;Kh=1,Object.defineProperty(Os,"__esModule",{value:!0});const e=Da(),n=qe(),o=Oe(),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:f,data:p,$data:g,schema:h,schemaCode:y,it:v}=u,S=v.opts.unicodeRegExp?"u":"";if(g){const{regExp:N}=v.opts.code,x=N.code==="new RegExp"?(0,o._)`new RegExp`:(0,n.useFunc)(f,N),E=f.let("valid");f.try(()=>f.assign(E,(0,o._)`${x}(${y}, ${S}).test(${p})`),()=>f.assign(E,!1)),u.fail$data((0,o._)`!${E}`)}else{const N=(0,e.usePattern)(u,h);u.fail$data((0,o._)`!${N}.test(${p})`)}}};return Os.default=c,Os}var As={},Wh;function O3(){if(Wh)return As;Wh=1,Object.defineProperty(As,"__esModule",{value:!0});const e=Oe(),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:f}=l,p=c==="maxProperties"?e.operators.GT:e.operators.LT;l.fail$data((0,e._)`Object.keys(${u}).length ${p} ${f}`)}};return As.default=o,As}var Ds={},Xh;function A3(){if(Xh)return Ds;Xh=1,Object.defineProperty(Ds,"__esModule",{value:!0});const e=Da(),n=Oe(),o=qe(),c={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:u}})=>(0,n.str)`must have required property '${u}'`,params:({params:{missingProperty:u}})=>(0,n._)`{missingProperty: ${u}}`},code(u){const{gen:f,schema:p,schemaCode:g,data:h,$data:y,it:v}=u,{opts:S}=v;if(!y&&p.length===0)return;const N=p.length>=S.loopRequired;if(v.allErrors?x():E(),S.strictRequired){const $=u.parentSchema.properties,{definedProperties:w}=u.it;for(const R of p)if(($==null?void 0:$[R])===void 0&&!w.has(R)){const b=v.schemaEnv.baseId+v.errSchemaPath,j=`required property "${R}" is not defined at "${b}" (strictRequired)`;(0,o.checkStrictMode)(v,j,v.opts.strictRequired)}}function x(){if(N||y)u.block$data(n.nil,z);else for(const $ of p)(0,e.checkReportMissingProp)(u,$)}function E(){const $=f.let("missing");if(N||y){const w=f.let("valid",!0);u.block$data(w,()=>k($,w)),u.ok(w)}else f.if((0,e.checkMissingProp)(u,p,$)),(0,e.reportMissingProp)(u,$),f.else()}function z(){f.forOf("prop",g,$=>{u.setParams({missingProperty:$}),f.if((0,e.noPropertyInData)(f,h,$,S.ownProperties),()=>u.error())})}function k($,w){u.setParams({missingProperty:$}),f.forOf($,g,()=>{f.assign(w,(0,e.propertyInData)(f,h,$,S.ownProperties)),f.if((0,n.not)(w),()=>{u.error(),f.break()})},n.nil)}}};return Ds.default=c,Ds}var Us={},Jh;function D3(){if(Jh)return Us;Jh=1,Object.defineProperty(Us,"__esModule",{value:!0});const e=Oe(),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:f}=l,p=c==="maxItems"?e.operators.GT:e.operators.LT;l.fail$data((0,e._)`${u}.length ${p} ${f}`)}};return Us.default=o,Us}var Is={},Ls={},Qh;function Nc(){if(Qh)return Ls;Qh=1,Object.defineProperty(Ls,"__esModule",{value:!0});const e=t1();return e.code='require("ajv/dist/runtime/equal").default',Ls.default=e,Ls}var ey;function U3(){if(ey)return Is;ey=1,Object.defineProperty(Is,"__esModule",{value:!0});const e=mc(),n=Oe(),o=qe(),l=Nc(),u={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:f,j:p}})=>(0,n.str)`must NOT have duplicate items (items ## ${p} and ${f} are identical)`,params:({params:{i:f,j:p}})=>(0,n._)`{i: ${f}, j: ${p}}`},code(f){const{gen:p,data:g,$data:h,schema:y,parentSchema:v,schemaCode:S,it:N}=f;if(!h&&!y)return;const x=p.let("valid"),E=v.items?(0,e.getSchemaTypes)(v.items):[];f.block$data(x,z,(0,n._)`${S} === false`),f.ok(x);function z(){const R=p.let("i",(0,n._)`${g}.length`),b=p.let("j");f.setParams({i:R,j:b}),p.assign(x,!0),p.if((0,n._)`${R} > 1`,()=>(k()?$:w)(R,b))}function k(){return E.length>0&&!E.some(R=>R==="object"||R==="array")}function $(R,b){const j=p.name("item"),T=(0,e.checkDataTypes)(E,j,N.opts.strictNumbers,e.DataType.Wrong),O=p.const("indices",(0,n._)`{}`);p.for((0,n._)`;${R}--;`,()=>{p.let(j,(0,n._)`${g}[${R}]`),p.if(T,(0,n._)`continue`),E.length>1&&p.if((0,n._)`typeof ${j} == "string"`,(0,n._)`${j} += "_"`),p.if((0,n._)`typeof ${O}[${j}] == "number"`,()=>{p.assign(b,(0,n._)`${O}[${j}]`),f.error(),p.assign(x,!1).break()}).code((0,n._)`${O}[${j}] = ${R}`)})}function w(R,b){const j=(0,o.useFunc)(p,l.default),T=p.name("outer");p.label(T).for((0,n._)`;${R}--;`,()=>p.for((0,n._)`${b} = ${R}; ${b}--;`,()=>p.if((0,n._)`${j}(${g}[${R}], ${g}[${b}])`,()=>{f.error(),p.assign(x,!1).break(T)})))}}};return Is.default=u,Is}var Vs={},ty;function I3(){if(ty)return Vs;ty=1,Object.defineProperty(Vs,"__esModule",{value:!0});const e=Oe(),n=qe(),o=Nc(),c={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:u})=>(0,e._)`{allowedValue: ${u}}`},code(u){const{gen:f,data:p,$data:g,schemaCode:h,schema:y}=u;g||y&&typeof y=="object"?u.fail$data((0,e._)`!${(0,n.useFunc)(f,o.default)}(${p}, ${h})`):u.fail((0,e._)`${y} !== ${p}`)}};return Vs.default=c,Vs}var Hs={},ay;function L3(){if(ay)return Hs;ay=1,Object.defineProperty(Hs,"__esModule",{value:!0});const e=Oe(),n=qe(),o=Nc(),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:f,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 S=h.length>=v.opts.loopEnum;let N;const x=()=>N??(N=(0,n.useFunc)(f,o.default));let E;if(S||g)E=f.let("valid"),u.block$data(E,z);else{if(!Array.isArray(h))throw new Error("ajv implementation error");const $=f.const("vSchema",y);E=(0,e.or)(...h.map((w,R)=>k($,R)))}u.pass(E);function z(){f.assign(E,!1),f.forOf("v",y,$=>f.if((0,e._)`${x()}(${p}, ${$})`,()=>f.assign(E,!0).break()))}function k($,w){const R=h[w];return typeof R=="object"&&R!==null?(0,e._)`${x()}(${p}, ${$}[${w}])`:(0,e._)`${p} === ${R}`}}};return Hs.default=c,Hs}var ny;function V3(){if(ny)return Es;ny=1,Object.defineProperty(Es,"__esModule",{value:!0});const e=C3(),n=T3(),o=M3(),l=R3(),c=O3(),u=A3(),f=D3(),p=U3(),g=I3(),h=L3(),y=[e.default,n.default,o.default,l.default,c.default,u.default,f.default,p.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},g.default,h.default];return Es.default=y,Es}var Bs={},Ei={},ry;function r1(){if(ry)return Ei;ry=1,Object.defineProperty(Ei,"__esModule",{value:!0}),Ei.validateAdditionalItems=void 0;const e=Oe(),n=qe(),l={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:u}})=>(0,e.str)`must NOT have more than ${u} items`,params:({params:{len:u}})=>(0,e._)`{limit: ${u}}`},code(u){const{parentSchema:f,it:p}=u,{items:g}=f;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,f){const{gen:p,schema:g,data:h,keyword:y,it:v}=u;v.items=!0;const S=p.const("len",(0,e._)`${h}.length`);if(g===!1)u.setParams({len:f.length}),u.pass((0,e._)`${S} <= ${f.length}`);else if(typeof g=="object"&&!(0,n.alwaysValidSchema)(v,g)){const x=p.var("valid",(0,e._)`${S} <= ${f.length}`);p.if((0,e.not)(x),()=>N(x)),u.ok(x)}function N(x){p.forRange("i",f.length,S,E=>{u.subschema({keyword:y,dataProp:E,dataPropType:n.Type.Num},x),v.allErrors||p.if((0,e.not)(x),()=>p.break())})}}return Ei.validateAdditionalItems=c,Ei.default=l,Ei}var qs={},Ci={},iy;function i1(){if(iy)return Ci;iy=1,Object.defineProperty(Ci,"__esModule",{value:!0}),Ci.validateTuple=void 0;const e=Oe(),n=qe(),o=Da(),l={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(u){const{schema:f,it:p}=u;if(Array.isArray(f))return c(u,"additionalItems",f);p.items=!0,!(0,n.alwaysValidSchema)(p,f)&&u.ok((0,o.validateArray)(u))}};function c(u,f,p=u.schema){const{gen:g,parentSchema:h,data:y,keyword:v,it:S}=u;E(h),S.opts.unevaluated&&p.length&&S.items!==!0&&(S.items=n.mergeEvaluated.items(g,p.length,S.items));const N=g.name("valid"),x=g.const("len",(0,e._)`${y}.length`);p.forEach((z,k)=>{(0,n.alwaysValidSchema)(S,z)||(g.if((0,e._)`${x} > ${k}`,()=>u.subschema({keyword:v,schemaProp:k,dataProp:k},N)),u.ok(N))});function E(z){const{opts:k,errSchemaPath:$}=S,w=p.length,R=w===z.minItems&&(w===z.maxItems||z[f]===!1);if(k.strictTuples&&!R){const b=`"${v}" is ${w}-tuple, but minItems or maxItems/${f} are not specified or different at path "${$}"`;(0,n.checkStrictMode)(S,b,k.strictTuples)}}}return Ci.validateTuple=c,Ci.default=l,Ci}var oy;function H3(){if(oy)return qs;oy=1,Object.defineProperty(qs,"__esModule",{value:!0});const e=i1(),n={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:o=>(0,e.validateTuple)(o,"items")};return qs.default=n,qs}var Ps={},ly;function B3(){if(ly)return Ps;ly=1,Object.defineProperty(Ps,"__esModule",{value:!0});const e=Oe(),n=qe(),o=Da(),l=r1(),u={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:f}})=>(0,e.str)`must NOT have more than ${f} items`,params:({params:{len:f}})=>(0,e._)`{limit: ${f}}`},code(f){const{schema:p,parentSchema:g,it:h}=f,{prefixItems:y}=g;h.items=!0,!(0,n.alwaysValidSchema)(h,p)&&(y?(0,l.validateAdditionalItems)(f,y):f.ok((0,o.validateArray)(f)))}};return Ps.default=u,Ps}var Zs={},sy;function q3(){if(sy)return Zs;sy=1,Object.defineProperty(Zs,"__esModule",{value:!0});const e=Oe(),n=qe(),l={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:c,max:u}})=>u===void 0?(0,e.str)`must contain at least ${c} valid item(s)`:(0,e.str)`must contain at least ${c} and no more than ${u} valid item(s)`,params:({params:{min:c,max:u}})=>u===void 0?(0,e._)`{minContains: ${c}}`:(0,e._)`{minContains: ${c}, maxContains: ${u}}`},code(c){const{gen:u,schema:f,parentSchema:p,data:g,it:h}=c;let y,v;const{minContains:S,maxContains:N}=p;h.opts.next?(y=S===void 0?1:S,v=N):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,f)){let w=(0,e._)`${x} >= ${y}`;v!==void 0&&(w=(0,e._)`${w} && ${x} <= ${v}`),c.pass(w);return}h.items=!0;const E=u.name("valid");v===void 0&&y===1?k(E,()=>u.if(E,()=>u.break())):y===0?(u.let(E,!0),v!==void 0&&u.if((0,e._)`${g}.length > 0`,z)):(u.let(E,!1),z()),c.result(E,()=>c.reset());function z(){const w=u.name("_valid"),R=u.let("count",0);k(w,()=>u.if(w,()=>$(R)))}function k(w,R){u.forRange("i",0,x,b=>{c.subschema({keyword:"contains",dataProp:b,dataPropType:n.Type.Num,compositeRule:!0},w),R()})}function $(w){u.code((0,e._)`${w}++`),v===void 0?u.if((0,e._)`${w} >= ${y}`,()=>u.assign(E,!0).break()):(u.if((0,e._)`${w} > ${v}`,()=>u.assign(E,!1).break()),y===1?u.assign(E,!0):u.if((0,e._)`${w} >= ${y}`,()=>u.assign(E,!0)))}}};return Zs.default=l,Zs}var lf={},cy;function P3(){return cy||(cy=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const n=Oe(),o=qe(),l=Da();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},
92
+ missingProperty: ${v},
93
+ depsCount: ${h},
94
+ deps: ${y}}`};const c={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(g){const[h,y]=u(g);f(g,h),p(g,y)}};function u({schema:g}){const h={},y={};for(const v in g){if(v==="__proto__")continue;const S=Array.isArray(g[v])?h:y;S[v]=g[v]}return[h,y]}function f(g,h=g.schema){const{gen:y,data:v,it:S}=g;if(Object.keys(h).length===0)return;const N=y.let("missing");for(const x in h){const E=h[x];if(E.length===0)continue;const z=(0,l.propertyInData)(y,v,x,S.opts.ownProperties);g.setParams({property:x,depsCount:E.length,deps:E.join(", ")}),S.allErrors?y.if(z,()=>{for(const k of E)(0,l.checkReportMissingProp)(g,k)}):(y.if((0,n._)`${z} && (${(0,l.checkMissingProp)(g,E,N)})`),(0,l.reportMissingProp)(g,N),y.else())}}e.validatePropertyDeps=f;function p(g,h=g.schema){const{gen:y,data:v,keyword:S,it:N}=g,x=y.name("valid");for(const E in h)(0,o.alwaysValidSchema)(N,h[E])||(y.if((0,l.propertyInData)(y,v,E,N.opts.ownProperties),()=>{const z=g.subschema({keyword:S,schemaProp:E},x);g.mergeValidEvaluated(z,x)},()=>y.var(x,!0)),g.ok(x))}e.validateSchemaDeps=p,e.default=c})(lf)),lf}var Gs={},uy;function Z3(){if(uy)return Gs;uy=1,Object.defineProperty(Gs,"__esModule",{value:!0});const e=Oe(),n=qe(),l={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:c})=>(0,e._)`{propertyName: ${c.propertyName}}`},code(c){const{gen:u,schema:f,data:p,it:g}=c;if((0,n.alwaysValidSchema)(g,f))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 Gs.default=l,Gs}var Fs={},dy;function o1(){if(dy)return Fs;dy=1,Object.defineProperty(Fs,"__esModule",{value:!0});const e=Da(),n=Oe(),o=mr(),l=qe(),u={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:f})=>(0,n._)`{additionalProperty: ${f.additionalProperty}}`},code(f){const{gen:p,schema:g,parentSchema:h,data:y,errsCount:v,it:S}=f;if(!v)throw new Error("ajv implementation error");const{allErrors:N,opts:x}=S;if(S.props=!0,x.removeAdditional!=="all"&&(0,l.alwaysValidSchema)(S,g))return;const E=(0,e.allSchemaProperties)(h.properties),z=(0,e.allSchemaProperties)(h.patternProperties);k(),f.ok((0,n._)`${v} === ${o.default.errors}`);function k(){p.forIn("key",y,j=>{!E.length&&!z.length?R(j):p.if($(j),()=>R(j))})}function $(j){let T;if(E.length>8){const O=(0,l.schemaRefOrVal)(S,h.properties,"properties");T=(0,e.isOwnProperty)(p,O,j)}else E.length?T=(0,n.or)(...E.map(O=>(0,n._)`${j} === ${O}`)):T=n.nil;return z.length&&(T=(0,n.or)(T,...z.map(O=>(0,n._)`${(0,e.usePattern)(f,O)}.test(${j})`))),(0,n.not)(T)}function w(j){p.code((0,n._)`delete ${y}[${j}]`)}function R(j){if(x.removeAdditional==="all"||x.removeAdditional&&g===!1){w(j);return}if(g===!1){f.setParams({additionalProperty:j}),f.error(),N||p.break();return}if(typeof g=="object"&&!(0,l.alwaysValidSchema)(S,g)){const T=p.name("valid");x.removeAdditional==="failing"?(b(j,T,!1),p.if((0,n.not)(T),()=>{f.reset(),w(j)})):(b(j,T),N||p.if((0,n.not)(T),()=>p.break()))}}function b(j,T,O){const V={keyword:"additionalProperties",dataProp:j,dataPropType:l.Type.Str};O===!1&&Object.assign(V,{compositeRule:!0,createErrors:!1,allErrors:!1}),f.subschema(V,T)}}};return Fs.default=u,Fs}var Ys={},fy;function G3(){if(fy)return Ys;fy=1,Object.defineProperty(Ys,"__esModule",{value:!0});const e=wc(),n=Da(),o=qe(),l=o1(),c={keyword:"properties",type:"object",schemaType:"object",code(u){const{gen:f,schema:p,parentSchema:g,data:h,it:y}=u;y.opts.removeAdditional==="all"&&g.additionalProperties===void 0&&l.default.code(new e.KeywordCxt(y,l.default,"additionalProperties"));const v=(0,n.allSchemaProperties)(p);for(const z of v)y.definedProperties.add(z);y.opts.unevaluated&&v.length&&y.props!==!0&&(y.props=o.mergeEvaluated.props(f,(0,o.toHash)(v),y.props));const S=v.filter(z=>!(0,o.alwaysValidSchema)(y,p[z]));if(S.length===0)return;const N=f.name("valid");for(const z of S)x(z)?E(z):(f.if((0,n.propertyInData)(f,h,z,y.opts.ownProperties)),E(z),y.allErrors||f.else().var(N,!0),f.endIf()),u.it.definedProperties.add(z),u.ok(N);function x(z){return y.opts.useDefaults&&!y.compositeRule&&p[z].default!==void 0}function E(z){u.subschema({keyword:"properties",schemaProp:z,dataProp:z},N)}}};return Ys.default=c,Ys}var Ks={},py;function F3(){if(py)return Ks;py=1,Object.defineProperty(Ks,"__esModule",{value:!0});const e=Da(),n=Oe(),o=qe(),l=qe(),c={keyword:"patternProperties",type:"object",schemaType:"object",code(u){const{gen:f,schema:p,data:g,parentSchema:h,it:y}=u,{opts:v}=y,S=(0,e.allSchemaProperties)(p),N=S.filter(R=>(0,o.alwaysValidSchema)(y,p[R]));if(S.length===0||N.length===S.length&&(!y.opts.unevaluated||y.props===!0))return;const x=v.strictSchema&&!v.allowMatchingProperties&&h.properties,E=f.name("valid");y.props!==!0&&!(y.props instanceof n.Name)&&(y.props=(0,l.evaluatedPropsToName)(f,y.props));const{props:z}=y;k();function k(){for(const R of S)x&&$(R),y.allErrors?w(R):(f.var(E,!0),w(R),f.if(E))}function $(R){for(const b in x)new RegExp(R).test(b)&&(0,o.checkStrictMode)(y,`property ${b} matches pattern ${R} (use allowMatchingProperties)`)}function w(R){f.forIn("key",g,b=>{f.if((0,n._)`${(0,e.usePattern)(u,R)}.test(${b})`,()=>{const j=N.includes(R);j||u.subschema({keyword:"patternProperties",schemaProp:R,dataProp:b,dataPropType:l.Type.Str},E),y.opts.unevaluated&&z!==!0?f.assign((0,n._)`${z}[${b}]`,!0):!j&&!y.allErrors&&f.if((0,n.not)(E),()=>f.break())})})}}};return Ks.default=c,Ks}var Ws={},gy;function Y3(){if(gy)return Ws;gy=1,Object.defineProperty(Ws,"__esModule",{value:!0});const e=qe(),n={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(o){const{gen:l,schema:c,it:u}=o;if((0,e.alwaysValidSchema)(u,c)){o.fail();return}const f=l.name("valid");o.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},f),o.failResult(f,()=>o.reset(),()=>o.error())},error:{message:"must NOT be valid"}};return Ws.default=n,Ws}var Xs={},my;function K3(){if(my)return Xs;my=1,Object.defineProperty(Xs,"__esModule",{value:!0});const n={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Da().validateUnion,error:{message:"must match a schema in anyOf"}};return Xs.default=n,Xs}var Js={},hy;function W3(){if(hy)return Js;hy=1,Object.defineProperty(Js,"__esModule",{value:!0});const e=Oe(),n=qe(),l={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:c})=>(0,e._)`{passingSchemas: ${c.passing}}`},code(c){const{gen:u,schema:f,parentSchema:p,it:g}=c;if(!Array.isArray(f))throw new Error("ajv implementation error");if(g.opts.discriminator&&p.discriminator)return;const h=f,y=u.let("valid",!1),v=u.let("passing",null),S=u.name("_valid");c.setParams({passing:v}),u.block(N),c.result(y,()=>c.reset(),()=>c.error(!0));function N(){h.forEach((x,E)=>{let z;(0,n.alwaysValidSchema)(g,x)?u.var(S,!0):z=c.subschema({keyword:"oneOf",schemaProp:E,compositeRule:!0},S),E>0&&u.if((0,e._)`${S} && ${y}`).assign(y,!1).assign(v,(0,e._)`[${v}, ${E}]`).else(),u.if(S,()=>{u.assign(y,!0),u.assign(v,E),z&&c.mergeEvaluated(z,e.Name)})})}}};return Js.default=l,Js}var Qs={},yy;function X3(){if(yy)return Qs;yy=1,Object.defineProperty(Qs,"__esModule",{value:!0});const e=qe(),n={keyword:"allOf",schemaType:"array",code(o){const{gen:l,schema:c,it:u}=o;if(!Array.isArray(c))throw new Error("ajv implementation error");const f=l.name("valid");c.forEach((p,g)=>{if((0,e.alwaysValidSchema)(u,p))return;const h=o.subschema({keyword:"allOf",schemaProp:g},f);o.ok(f),o.mergeEvaluated(h)})}};return Qs.default=n,Qs}var ec={},vy;function J3(){if(vy)return ec;vy=1,Object.defineProperty(ec,"__esModule",{value:!0});const e=Oe(),n=qe(),l={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:u})=>(0,e.str)`must match "${u.ifClause}" schema`,params:({params:u})=>(0,e._)`{failingKeyword: ${u.ifClause}}`},code(u){const{gen:f,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=f.let("valid",!0),S=f.name("_valid");if(N(),u.reset(),h&&y){const E=f.let("ifClause");u.setParams({ifClause:E}),f.if(S,x("then",E),x("else",E))}else h?f.if(S,x("then")):f.if((0,e.not)(S),x("else"));u.pass(v,()=>u.error(!0));function N(){const E=u.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},S);u.mergeEvaluated(E)}function x(E,z){return()=>{const k=u.subschema({keyword:E},S);f.assign(v,S),u.mergeValidEvaluated(k,v),z?f.assign(z,(0,e._)`${E}`):u.setParams({ifClause:E})}}}};function c(u,f){const p=u.schema[f];return p!==void 0&&!(0,n.alwaysValidSchema)(u,p)}return ec.default=l,ec}var tc={},$y;function Q3(){if($y)return tc;$y=1,Object.defineProperty(tc,"__esModule",{value:!0});const e=qe(),n={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:o,parentSchema:l,it:c}){l.if===void 0&&(0,e.checkStrictMode)(c,`"${o}" without "if" is ignored`)}};return tc.default=n,tc}var by;function e6(){if(by)return Bs;by=1,Object.defineProperty(Bs,"__esModule",{value:!0});const e=r1(),n=H3(),o=i1(),l=B3(),c=q3(),u=P3(),f=Z3(),p=o1(),g=G3(),h=F3(),y=Y3(),v=K3(),S=W3(),N=X3(),x=J3(),E=Q3();function z(k=!1){const $=[y.default,v.default,S.default,N.default,x.default,E.default,f.default,p.default,u.default,g.default,h.default];return k?$.push(n.default,l.default):$.push(e.default,o.default),$.push(c.default),$}return Bs.default=z,Bs}var ac={},nc={},xy;function t6(){if(xy)return nc;xy=1,Object.defineProperty(nc,"__esModule",{value:!0});const e=Oe(),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:f,$data:p,schema:g,schemaCode:h,it:y}=l,{opts:v,errSchemaPath:S,schemaEnv:N,self:x}=y;if(!v.validateFormats)return;p?E():z();function E(){const k=u.scopeValue("formats",{ref:x.formats,code:v.code.formats}),$=u.const("fDef",(0,e._)`${k}[${h}]`),w=u.let("fType"),R=u.let("format");u.if((0,e._)`typeof ${$} == "object" && !(${$} instanceof RegExp)`,()=>u.assign(w,(0,e._)`${$}.type || "string"`).assign(R,(0,e._)`${$}.validate`),()=>u.assign(w,(0,e._)`"string"`).assign(R,$)),l.fail$data((0,e.or)(b(),j()));function b(){return v.strictSchema===!1?e.nil:(0,e._)`${h} && !${R}`}function j(){const T=N.$async?(0,e._)`(${$}.async ? await ${R}(${f}) : ${R}(${f}))`:(0,e._)`${R}(${f})`,O=(0,e._)`(typeof ${R} == "function" ? ${T} : ${R}.test(${f}))`;return(0,e._)`${R} && ${R} !== true && ${w} === ${c} && !${O}`}}function z(){const k=x.formats[g];if(!k){b();return}if(k===!0)return;const[$,w,R]=j(k);$===c&&l.pass(T());function b(){if(v.strictSchema===!1){x.logger.warn(O());return}throw new Error(O());function O(){return`unknown format "${g}" ignored in schema at path "${S}"`}}function j(O){const V=O instanceof RegExp?(0,e.regexpCode)(O):v.code.formats?(0,e._)`${v.code.formats}${(0,e.getProperty)(g)}`:void 0,F=u.scopeValue("formats",{key:g,ref:O,code:V});return typeof O=="object"&&!(O instanceof RegExp)?[O.type||"string",O.validate,(0,e._)`${F}.validate`]:["string",O,F]}function T(){if(typeof k=="object"&&!(k instanceof RegExp)&&k.async){if(!N.$async)throw new Error("async format in sync schema");return(0,e._)`await ${R}(${f})`}return typeof w=="function"?(0,e._)`${R}(${f})`:(0,e._)`${R}.test(${f})`}}}};return nc.default=o,nc}var _y;function a6(){if(_y)return ac;_y=1,Object.defineProperty(ac,"__esModule",{value:!0});const n=[t6().default];return ac.default=n,ac}var Hr={},jy;function n6(){return jy||(jy=1,Object.defineProperty(Hr,"__esModule",{value:!0}),Hr.contentVocabulary=Hr.metadataVocabulary=void 0,Hr.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Hr.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Hr}var Sy;function r6(){if(Sy)return ks;Sy=1,Object.defineProperty(ks,"__esModule",{value:!0});const e=E3(),n=V3(),o=e6(),l=a6(),c=n6(),u=[e.default,n.default,(0,o.default)(),l.default,c.metadataVocabulary,c.contentVocabulary];return ks.default=u,ks}var rc={},Zo={},wy;function i6(){if(wy)return Zo;wy=1,Object.defineProperty(Zo,"__esModule",{value:!0}),Zo.DiscrError=void 0;var e;return(function(n){n.Tag="tag",n.Mapping="mapping"})(e||(Zo.DiscrError=e={})),Zo}var ky;function o6(){if(ky)return rc;ky=1,Object.defineProperty(rc,"__esModule",{value:!0});const e=Oe(),n=i6(),o=Vf(),l=kc(),c=qe(),f={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:S}=p,{oneOf:N}=v;if(!S.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(!N)throw new Error("discriminator: requires oneOf keyword");const E=g.let("valid",!1),z=g.const("tag",(0,e._)`${h}${(0,e.getProperty)(x)}`);g.if((0,e._)`typeof ${z} == "string"`,()=>k(),()=>p.error(!1,{discrError:n.DiscrError.Tag,tag:z,tagName:x})),p.ok(E);function k(){const R=w();g.if(!1);for(const b in R)g.elseIf((0,e._)`${z} === ${b}`),g.assign(E,$(R[b]));g.else(),p.error(!1,{discrError:n.DiscrError.Mapping,tag:z,tagName:x}),g.endIf()}function $(R){const b=g.name("valid"),j=p.subschema({keyword:"oneOf",schemaProp:R},b);return p.mergeEvaluated(j,e.Name),b}function w(){var R;const b={},j=O(v);let T=!0;for(let H=0;H<N.length;H++){let Q=N[H];if(Q!=null&&Q.$ref&&!(0,c.schemaHasRulesButRef)(Q,S.self.RULES)){const de=Q.$ref;if(Q=o.resolveRef.call(S.self,S.schemaEnv.root,S.baseId,de),Q instanceof o.SchemaEnv&&(Q=Q.schema),Q===void 0)throw new l.default(S.opts.uriResolver,S.baseId,de)}const ue=(R=Q==null?void 0:Q.properties)===null||R===void 0?void 0:R[x];if(typeof ue!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${x}"`);T=T&&(j||O(Q)),V(ue,H)}if(!T)throw new Error(`discriminator: "${x}" must be required`);return b;function O({required:H}){return Array.isArray(H)&&H.includes(x)}function V(H,Q){if(H.const)F(H.const,Q);else if(H.enum)for(const ue of H.enum)F(ue,Q);else throw new Error(`discriminator: "properties/${x}" must have "const" or "enum"`)}function F(H,Q){if(typeof H!="string"||H in b)throw new Error(`discriminator: "${x}" values must be unique strings`);b[H]=Q}}}};return rc.default=f,rc}const l6="http://json-schema.org/draft-07/schema#",s6="http://json-schema.org/draft-07/schema#",c6="Core schema meta-schema",u6={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:[]}},d6=["object","boolean"],f6={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},p6={$schema:l6,$id:s6,title:c6,definitions:u6,type:d6,properties:f6,default:!0};var Ny;function l1(){return Ny||(Ny=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=k3(),l=r6(),c=o6(),u=p6,f=["/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,f):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=wc();Object.defineProperty(n,"KeywordCxt",{enumerable:!0,get:function(){return h.KeywordCxt}});var y=Oe();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=Lf();Object.defineProperty(n,"ValidationError",{enumerable:!0,get:function(){return v.default}});var S=kc();Object.defineProperty(n,"MissingRefError",{enumerable:!0,get:function(){return S.default}})})(xs,xs.exports)),xs.exports}var g6=l1();const s1=el(g6);var ic={exports:{}},sf={},zy;function m6(){return zy||(zy=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function n(H,Q){return{validate:H,compare:Q}}e.fullFormats={date:n(u,f),time:n(g(!0),h),"date-time":n(S(!0),N),"iso-time":n(g(),y),"iso-date-time":n(S(),x),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:k,"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:F,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:w,int32:{type:"number",validate:j},int64:{type:"number",validate:T},float:{type:"number",validate:O},double:{type:"number",validate:O},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:n(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,f),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,N),"iso-time":n(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,y),"iso-date-time":n(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,x),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function o(H){return H%4===0&&(H%100!==0||H%400===0)}const l=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,c=[0,31,28,31,30,31,30,31,31,30,31,30,31];function u(H){const Q=l.exec(H);if(!Q)return!1;const ue=+Q[1],de=+Q[2],je=+Q[3];return de>=1&&de<=12&&je>=1&&je<=(de===2&&o(ue)?29:c[de])}function f(H,Q){if(H&&Q)return H>Q?1:H<Q?-1:0}const p=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function g(H){return function(ue){const de=p.exec(ue);if(!de)return!1;const je=+de[1],ce=+de[2],$e=+de[3],ge=de[4],Ae=de[5]==="-"?-1:1,A=+(de[6]||0),D=+(de[7]||0);if(A>23||D>59||H&&!ge)return!1;if(je<=23&&ce<=59&&$e<60)return!0;const ee=ce-D*Ae,B=je-A*Ae-(ee<0?1:0);return(B===23||B===-1)&&(ee===59||ee===-1)&&$e<61}}function h(H,Q){if(!(H&&Q))return;const ue=new Date("2020-01-01T"+H).valueOf(),de=new Date("2020-01-01T"+Q).valueOf();if(ue&&de)return ue-de}function y(H,Q){if(!(H&&Q))return;const ue=p.exec(H),de=p.exec(Q);if(ue&&de)return H=ue[1]+ue[2]+ue[3],Q=de[1]+de[2]+de[3],H>Q?1:H<Q?-1:0}const v=/t|\s/i;function S(H){const Q=g(H);return function(de){const je=de.split(v);return je.length===2&&u(je[0])&&Q(je[1])}}function N(H,Q){if(!(H&&Q))return;const ue=new Date(H).valueOf(),de=new Date(Q).valueOf();if(ue&&de)return ue-de}function x(H,Q){if(!(H&&Q))return;const[ue,de]=H.split(v),[je,ce]=Q.split(v),$e=f(ue,je);if($e!==void 0)return $e||h(de,ce)}const E=/\/|:/,z=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function k(H){return E.test(H)&&z.test(H)}const $=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function w(H){return $.lastIndex=0,$.test(H)}const R=-2147483648,b=2**31-1;function j(H){return Number.isInteger(H)&&H<=b&&H>=R}function T(H){return Number.isInteger(H)}function O(){return!0}const V=/[^\\]\\Z/;function F(H){if(V.test(H))return!1;try{return new RegExp(H),!0}catch{return!1}}})(sf)),sf}var cf={},Ey;function h6(){return Ey||(Ey=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const n=l1(),o=Oe(),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:S}=p,{opts:N,self:x}=S;if(!N.validateFormats)return;const E=new n.KeywordCxt(S,x.RULES.all.format.definition,"format");E.$data?z():k();function z(){const w=g.scopeValue("formats",{ref:x.formats,code:N.code.formats}),R=g.const("fmt",(0,o._)`${w}[${E.schemaCode}]`);p.fail$data((0,o.or)((0,o._)`typeof ${R} != "object"`,(0,o._)`${R} instanceof RegExp`,(0,o._)`typeof ${R}.compare != "function"`,$(R)))}function k(){const w=E.schema,R=x.formats[w];if(!R||R===!0)return;if(typeof R!="object"||R instanceof RegExp||typeof R.compare!="function")throw new Error(`"${v}": format "${w}" does not define "compare" function`);const b=g.scopeValue("formats",{key:w,ref:R,code:N.code.formats?(0,o._)`${N.code.formats}${(0,o.getProperty)(w)}`:void 0});p.fail$data($(b))}function $(w){return(0,o._)`${w}.compare(${h}, ${y}) ${c[v].fail} 0`}},dependencies:["format"]};const f=p=>(p.addKeyword(e.formatLimitDefinition),p);e.default=f})(cf)),cf}var Cy;function y6(){return Cy||(Cy=1,(function(e,n){Object.defineProperty(n,"__esModule",{value:!0});const o=m6(),l=h6(),c=Oe(),u=new c.Name("fullFormats"),f=new c.Name("fastFormats"),p=(h,y={keywords:!0})=>{if(Array.isArray(y))return g(h,y,o.fullFormats,u),h;const[v,S]=y.mode==="fast"?[o.fastFormats,f]:[o.fullFormats,u],N=y.formats||o.formatNames;return g(h,N,v,S),y.keywords&&(0,l.default)(h),h};p.get=(h,y="full")=>{const S=(y==="fast"?o.fastFormats:o.fullFormats)[h];if(!S)throw new Error(`Unknown format "${h}"`);return S};function g(h,y,v,S){var N,x;(N=(x=h.opts.code).formats)!==null&&N!==void 0||(x.formats=(0,c._)`require("ajv-formats/dist/formats").${S}`);for(const E of y)h.addFormat(E,v[E])}e.exports=n=p,Object.defineProperty(n,"__esModule",{value:!0}),n.default=p})(ic,ic.exports)),ic.exports}var v6=y6();const c1=el(v6);var $6=Nc();const b6=el($6);var x6=n1();const _6=el(x6);function u1(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")}u1(b6).toString();u1(_6).toString();const d1={strict:!0,allErrors:!0,useDefaults:!1,coerceTypes:!1,removeAdditional:!1,verbose:!0},Ui=new s1({...d1});c1(Ui);Ui.getKeyword("example")||Ui.addKeyword({keyword:"example"});Ui.getKeyword("nullable")||Ui.addKeyword({keyword:"nullable"});const Xo=new s1({...d1,code:{source:!0,esm:!0}});c1(Xo);Xo.getKeyword("example")||Xo.addKeyword({keyword:"example"});Xo.getKeyword("nullable")||Xo.addKeyword({keyword:"nullable"});function Gn(e){if(e.type==="object"||e.properties!==void 0){const o={...e};if(o.properties){const l={};for(const[c,u]of Object.entries(o.properties))l[c]=Gn(u);o.properties=l}return o.additionalProperties===void 0?o.additionalProperties=!1:typeof o.additionalProperties!="boolean"&&(o.additionalProperties=Gn(o.additionalProperties)),o.oneOf&&(o.oneOf=o.oneOf.map(Gn)),o.anyOf&&(o.anyOf=o.anyOf.map(Gn)),o}if(e.type==="array"&&e.items)return{...e,items:Gn(e.items)};if(e.oneOf||e.anyOf){const o={...e};return o.oneOf&&(o.oneOf=o.oneOf.map(Gn)),o.anyOf&&(o.anyOf=o.anyOf.map(Gn)),o}return e}function Hf(e){const n=Gn(e);return Ui.compile(n)}function Bf(e,n){return e?e.map(o=>j6(o,n)):[]}function f1(e,n){return n?e.map(o=>({...o,field:o.field?`${n}.${o.field}`:n})):e}function j6(e,n){const o=S6(e.instancePath);switch(e.keyword){case"additionalProperties":{const c=e.params.additionalProperty??"<unknown>",u=o?`${o}.${c}`:c,f=e.parentSchema,p=f!=null&&f.properties?Object.keys(f.properties):[],g=Go(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:Ty(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=Ty(Go(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=Go(n,e.instancePath);return{field:o,message:e.message??`Enum mismatch at '${o||"<root>"}'`,expected:c.map(f=>JSON.stringify(f)).join("|"),received:JSON.stringify(u)}}case"const":{const l=e.params,c=Go(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=Go(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 S6(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 Go(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(Ef(l))l=l[c];else return}return l}function Ty(e){return e===null?"null":Array.isArray(e)?"array":typeof e}const My="_ggui:",p1="_ggui:preview",qf="_ggui:lifecycle",w6=new Set([p1,qf]);function g1(e){return w6.has(e)}const k6=new Map([[qf,N6]]);function N6(e){const n=[];if(!Ef(e))return{valid:!1,violations:[{field:"payload",message:`${qf} 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 z6(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 E6(e,n,o){const l=Hf(z6(n));return l(e)?{valid:!0,violations:[]}:{valid:!1,violations:Bf(l.errors,e)}}function Ry(e,n,o,l,c){if(g1(e)){const p=l==null?void 0:l.get(e);if(p)return p(n);const g=k6.get(e);return g?g(n):{valid:!0,violations:[]}}const u=[],f=o[e];if(!f)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(f.schema&&n!==void 0){const p=Hf(f.schema);if(!p(n))for(const h of f1(Bf(p.errors,n),`${e}.payload`))u.push(h)}return{valid:u.length===0,violations:u}}function m1(e,n,o){const l=[];if(!Ef(e))return l.push({field:"value",message:"Action payload must be an object with an `action` field",expected:"object",received:Oy(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:Oy(u)}),{valid:!1,violations:l};const f=n[u];if(!f)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(f.schema){const p=Hf(f.schema);if(!p(c.data))for(const h of f1(Bf(p.errors,c.data),`${u}.data`))l.push(h)}return{valid:l.length===0,violations:l}}function Oy(e){return e===null?"null":Array.isArray(e)?"array":typeof e}function C6(e,n,o){return e.type!=="data:submit"?{valid:!0,violations:[]}:n?m1(e.payload,n):{valid:!0,violations:[]}}I.createContext(null);new Set(If);new TextDecoder;var T6=Object.defineProperty,zc=(e,n)=>{for(var o in n)T6(e,o,{get:n[o],enumerable:!0})};const h1=I.createContext(null);function Zr(){const e=I.useContext(h1);if(!e)throw new Error("useWireContext must be used within a WireProvider. Ensure the component is rendered inside a GguiWireProvider.");return e}function y1({config:e,children:n}){return r.jsx(h1.Provider,{value:e,children:n})}const uf=new Set;let df=!1;function M6(e,n){try{return`${e}::${JSON.stringify(n??null)}`}catch{return null}}function R6(e,n){const o=M6(e,n);return o===null?{suppressed:!1,signature:o}:uf.has(o)?{suppressed:!0,signature:o}:(uf.add(o),df||(df=!0,queueMicrotask(()=>{uf.clear(),df=!1})),{suppressed:!1,signature:o})}function v1(e){const{dispatch:n,onDispatchSuppressed:o}=Zr();return I.useCallback(l=>{const c=R6(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 O6(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 I.useContext(l)}function $1(e){const{subscribe:n}=Zr(),[o,l]=I.useState(null),[c,u]=I.useState([]),[f,p]=I.useState(!1),g=I.useRef(c);return g.current=c,I.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:f}}function A6(e){return{useAction:n=>v1(n),useStream:n=>$1(n)}}function D6(){const{auth:e}=Zr();return e}function U6(){const{app:e}=Zr();return e}function I6(){const{render:e}=Zr();return e}class b1 extends Error{constructor(o,l,c){super(c?`Client contract violation (${o}): ${c}`:`Client contract violation (${o})`);cn(this,"direction");cn(this,"violations");this.name="ClientContractViolationError",this.direction=o,this.violations=l}}function L6(e,n,o){return e?m1({action:n,data:o},e):{valid:!0,violations:[]}}function V6(e,n,o,l){return g1(n)?Ry(n,o,e??{},l):e?Ry(n,o,e,l):{valid:!0,violations:[]}}function x1(e){return u3(e)}function _1(e,n){return C6(n,e)}function H6(e,n){return e?E6(n,e):{valid:!0,violations:[]}}const j1=256;class B6{constructor(){cn(this,"listeners",new Map);cn(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(My)){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(My)){let l=this.reservedReplay.get(n.channel);l===void 0&&(l=[],this.reservedReplay.set(n.channel,l)),l.push(n),l.length>j1&&l.shift()}const o=this.listeners.get(n.channel);if(o!==void 0)for(const l of o)l(n)}}function q6(e){let n=0;const o=e.nextClientSeq??(()=>(n+=1,n)),l=e.validateEnvelope??_1;return{app:e.app,render:e.render,auth:e.auth,dispatch:(c,u)=>{const f=x1({sessionId:e.render.sessionId,type:"data:submit",payload:{action:c,data:u},clientSeq:o()}),p=l(e.getActiveActionSpec(),f);if(!p.valid){e.onViolation(new b1("outbound-action",p.violations));return}e.emitEnvelope(f)},subscribe:(c,u)=>e.streamBus.subscribe(c,f=>{u({payload:f.payload,mode:f.mode,...f.complete!==void 0?{complete:f.complete}:{}})})}}const P6=Object.freeze(Object.defineProperty({__proto__:null,ClientContractViolationError:b1,GguiWireProvider:y1,RESERVED_CHANNEL_REPLAY_MAX:j1,StreamBus:B6,buildActionEnvelope:x1,buildWireConfig:q6,useAction:v1,useApp:U6,useAuth:D6,useContract:A6,useGguiContext:O6,useRender:I6,useStream:$1,useWireContext:Zr,validateInboundPropsPayload:H6,validateInboundStreamPayload:V6,validateOutboundActionEnvelope:_1,validateOutboundActionPayload:L6},Symbol.toStringTag,{value:"Module"})),Ca=se({id:G().min(1)}),Ec=G().min(1),S1=rt(["start","center","end","stretch"]),w1=rt(["start","center","end","between","around","evenly"]),Z6=Ca.extend({component:Te("Row"),children:St(Ec).optional(),gap:G().optional(),align:S1.optional(),justify:w1.optional()}),G6=Ca.extend({component:Te("Column"),children:St(Ec).optional(),gap:G().optional(),align:S1.optional(),justify:w1.optional()}),F6=Ca.extend({component:Te("Card"),child:Ec.optional()}),Y6=Ca.extend({component:Te("List"),children:St(Ec).optional()}),K6=Ca.extend({component:Te("Divider"),orientation:rt(["horizontal","vertical"]).optional()}),W6=Ca.extend({component:Te("Text"),text:G(),variant:G().optional()}),X6=Ca.extend({component:Te("Image"),src:G().min(1),alt:G().optional()}),J6=Ca.extend({component:Te("Icon"),name:G().min(1)}),Q6=Ca.extend({component:Te("Button"),label:G()}),ew=Ca.extend({component:Te("TextField"),label:G().optional(),placeholder:G().optional(),value:G().optional()}),tw=Ca.extend({component:Te("CheckBox"),label:G().optional(),checked:Gt().optional()}),aw=se({label:G(),value:G()}),nw=Ca.extend({component:Te("ChoicePicker"),label:G().optional(),options:St(aw).optional(),value:G().optional()}),rw=tl("component",[Z6,G6,F6,Y6,K6,W6,X6,J6,Q6,ew,tw,nw]),iw="v0.9",Pf=Te(iw),Zf=G().min(1),ow=se({version:Pf,createSurface:se({surfaceId:Zf,catalogId:G().min(1)})}),lw=se({version:Pf,updateComponents:se({surfaceId:Zf,components:St(rw)})}),sw=se({version:Pf,deleteSurface:se({surfaceId:Zf})}),cw=hn([ow,lw,sw]);function uw(e){const n=cw.safeParse(e);return n.success?{ok:!0,value:n.data}:{ok:!1,issues:n.error.issues.map(o=>({path:o.path,message:o.message}))}}var dw=I.createContext(null),xf={};zc(xf,{Accordion:()=>r8,Alert:()=>Bw,Avatar:()=>Li,Badge:()=>Uw,Box:()=>jw,Button:()=>Xt,Card:()=>Qo,Checkbox:()=>yc,Container:()=>gw,Divider:()=>E1,Grid:()=>_w,Heading:()=>Cc,Icon:()=>xt,Image:()=>M1,Input:()=>Gf,Link:()=>O1,MotionKeyframes:()=>i8,Progress:()=>T1,RadioGroup:()=>Rw,Row:()=>hc,Select:()=>C1,Skeleton:()=>Iw,Slider:()=>Ow,Spacer:()=>Sw,Spinner:()=>Pa,Stack:()=>Ii,Table:()=>Kw,Tabs:()=>Xw,Text:()=>qr,TextArea:()=>Ff,Toast:()=>a8,Toggle:()=>Mw,Tooltip:()=>Fw,useAnimationKey:()=>l8,useMotion:()=>o8});var qn={xs:"320px",sm:"480px",md:"640px",lg:"768px",xl:"1024px","2xl":"1280px","3xl":"1536px",full:"100%"},Jt={sm:"4px",md:"6px",lg:"8px",xl:"12px",full:"9999px"},nl={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)"},Hi={dropdown:1e3,sticky:1100,modal:1400,tooltip:1800},k1={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)"},fw=new Set(Object.keys(k1));function qa(e){if(e!==void 0)return typeof e=="number"?`${e}px`:fw.has(e)?k1[e]:e}var pw={xs:qn.xs,sm:qn.sm,md:qn.md,lg:qn.lg,xl:qn.xl,"2xl":qn["2xl"],"3xl":qn["3xl"],full:qn.full};function gw({children:e,maxWidth:n="lg",center:o=!0,padding:l,style:c,className:u}){const f=pw[n]||n,p=qa(l);return r.jsx("div",{className:u,style:{maxWidth:f,margin:o?"0 auto":void 0,padding:p,width:"100%",...c},children:e})}function Oi(e,n,o,l){return e===void 0?I.createElement("div",{className:o.className,style:o.style},l):I.createElement(e,{...n,className:o.className,style:o.style},l)}function Bi(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}, ${mw[e]})`;case"inverse":return"var(--ggui-color-surface, #ffffff)";case"inherit":return"inherit"}}var mw={success:"#15803d",warning:"#b45309",error:"#b91c1c",info:"#0e7490"};function N1(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 z1={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)"},hw=new Set(Object.keys(z1));function Jo(e){if(e!==void 0)return typeof e=="number"?`${e}px`:hw.has(e)?z1[e]:e}var yw={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 Qo(e){const{children:n,padding:o="lg",shadow:l="sm",border:c=!0,radius:u="lg",surface:f,style:p,className:g,as:h,...y}=e,v=qa(o),N={backgroundColor:N1(f??"default"),borderRadius:Jo(u),padding:v,boxShadow:yw[l]||l,border:c?"1px solid var(--ggui-color-outlineVariant, #e4e4e7)":void 0,...p};return Oi(h,y,{className:g,style:N},n)}var vw={start:"flex-start",center:"center",end:"flex-end",between:"space-between",around:"space-around",evenly:"space-evenly"},$w={start:"flex-start",center:"center",end:"flex-end",stretch:"stretch"};function Ii(e){const{children:n,direction:o="vertical",gap:l="sm",align:c="stretch",justify:u="start",wrap:f=!1,style:p,className:g,as:h,...y}=e,v=qa(l),S={display:"flex",flexDirection:o==="vertical"?"column":"row",gap:v,alignItems:$w[c]||c,justifyContent:vw[u]||u,flexWrap:f?"wrap":"nowrap",...p};return Oi(h,y,{className:g,style:S},n)}function hc(e){return I.createElement(Ii,{...e,direction:"horizontal"})}var bw=[["sm",640],["md",768],["lg",1024],["xl",1280]],ff=e=>`repeat(${e}, minmax(0, 1fr))`;function xw(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 _w(e){const{children:n,columns:o=2,gap:l="md",minColumnWidth:c,style:u,className:f,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:qa(l),...u};return Oi(p,g,{className:f,style:v},n)}if(typeof o=="object"){const v=`ggui-grid-${xw(o)}`,S=[`.${v}{grid-template-columns:${ff(o.base??1)}}`];for(const[x,E]of bw){const z=o[x];typeof z=="number"&&S.push(`@media (min-width:${E}px){.${v}{grid-template-columns:${ff(z)}}}`)}const N={display:"grid",gap:qa(l),...u};return Oi(p,g,{className:f?`${f} ${v}`:v,style:N},r.jsxs(r.Fragment,{children:[r.jsx("style",{children:S.join("")}),n]}))}const y={display:"grid",gridTemplateColumns:ff(o),gap:qa(l),...u};return Oi(p,g,{className:f,style:y},n)}function jw(e){const{children:n,padding:o,paddingX:l,paddingY:c,margin:u,surface:f,assetColor:p,assetSemantic:g,radius:h,style:y,className:v,as:S,...N}=e;let x;if(l!==void 0||c!==void 0){const $=qa(l)||"0";x=`${qa(c)||"0"} ${$}`}else x=qa(o);const E=p!==void 0&&typeof g=="string"&&g.length>0?p:void 0,z=E||(f?N1(f):void 0),k={padding:x,margin:qa(u),background:z,borderRadius:Jo(h),...y};return Oi(S,N,{className:v,style:k},n)}function E1({orientation:e="horizontal",margin:n="var(--ggui-spacing-md, 16px)",tone:o,style:l,className:c}){const u=typeof n=="number"?`${n}px`:n,f=o?Bi(o):"var(--ggui-color-outlineVariant, #e4e4e7)";return e==="vertical"?r.jsx("div",{role:"separator","aria-orientation":"vertical",className:c,style:{width:"1px",backgroundColor:f,margin:`0 ${u}`,alignSelf:"stretch",...l}}):r.jsx("hr",{role:"separator","aria-orientation":"horizontal",className:c,style:{border:"none",height:"1px",backgroundColor:f,margin:`${u} 0`,...l}})}function Sw({size:e=16,style:n,className:o}){return e==="flex"?r.jsx("div",{className:o,style:{flex:1,...n}}):r.jsx("div",{className:o,style:{width:`${e}px`,height:`${e}px`,flexShrink:0,...n}})}var he={xs:"12px",sm:"14px",base:"16px",lg:"18px",xl:"20px","2xl":"24px","3xl":"30px","4xl":"36px","5xl":"48px"},Ue={normal:400,medium:500,semibold:600,bold:700},Nt={tight:1.25,snug:1.375,normal:1.5,relaxed:1.625},Kn={tight:"-0.025em",normal:"0em",wider:"0.05em"},Ay={h1:{fontSize:he["4xl"],fontWeight:Ue.bold,lineHeight:Nt.tight,letterSpacing:Kn.tight},h2:{fontSize:he["3xl"],fontWeight:Ue.bold,lineHeight:Nt.tight,letterSpacing:Kn.tight},h3:{fontSize:he["2xl"],fontWeight:Ue.semibold,lineHeight:Nt.snug,letterSpacing:Kn.normal},h4:{fontSize:he.xl,fontWeight:Ue.semibold,lineHeight:Nt.snug,letterSpacing:Kn.normal},h5:{fontSize:he.lg,fontWeight:Ue.semibold,lineHeight:Nt.normal,letterSpacing:Kn.normal},h6:{fontSize:he.base,fontWeight:Ue.semibold,lineHeight:Nt.normal,letterSpacing:Kn.normal}},Dy={body:{fontSize:he.base,fontWeight:Ue.normal,lineHeight:Nt.normal},bodySmall:{fontSize:he.sm,fontWeight:Ue.normal,lineHeight:Nt.normal},bodyLarge:{fontSize:he.lg,fontWeight:Ue.normal,lineHeight:Nt.relaxed},caption:{fontSize:he.xs,fontWeight:Ue.normal,lineHeight:Nt.normal},label:{fontSize:he.sm,fontWeight:Ue.medium,lineHeight:Nt.normal},overline:{fontSize:he.xs,fontWeight:Ue.semibold,lineHeight:Nt.normal,letterSpacing:Kn.wider,textTransform:"uppercase"}},ww={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)"},kw={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)"};function qr({children:e,variant:n="body",size:o,weight:l,tone:c,align:u,truncate:f,is:p="p",id:g,htmlFor:h,style:y,className:v}){const S=Dy[n]||Dy.body,N=c?Bi(c):"var(--ggui-color-onSurface, #18181b)",x={...S,fontSize:o?ww[o]||o:void 0,fontWeight:l?kw[l]:void 0,color:N,textAlign:u,margin:0,...f&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},...y},E={id:g,htmlFor:h,className:v,style:x};return I.createElement(p,E,e)}function Cc({children:e,level:n=2,tone:o,align:l,style:c,className:u}){const f=`h${n}`,p=Ay[f]||Ay.h2,g=o?Bi(o):"var(--ggui-color-onSurface, #18181b)";return I.createElement(f,{className:u,style:{...p,color:g,textAlign:l,margin:0,...c}},e)}function Pa({size:e=24,tone:n,style:o,className:l}){const c=n==="inherit"?"currentColor":n?Bi(n):"var(--ggui-color-primary-600, #0284c7)";return r.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:[r.jsx("style",{children:"@keyframes ggui-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }"}),r.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"var(--ggui-color-outlineVariant, #e4e4e7)",strokeWidth:"3",fill:"none"}),r.jsx("path",{d:"M12 2a10 10 0 0 1 10 10",stroke:c,strokeWidth:"3",strokeLinecap:"round",fill:"none"})]})}var _t={fast:"100ms",normal:"200ms"},jt={easeOut:"cubic-bezier(0, 0, 0.2, 1)",easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)"},Nw={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"}},zw={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 Xt({children:e,variant:n="primary",size:o="md",fullWidth:l,loading:c,disabled:u,leftIcon:f,rightIcon:p,type:g="button",onClick:h,onPress:y,style:v,className:S,...N}){const x=u||c,E=h??y;return r.jsx("button",{type:g,onClick:x?void 0:E,disabled:x,className:S,style:{...Nw[o],...zw[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 ${_t.normal} ${jt.easeInOut}, box-shadow ${_t.normal} ${jt.easeInOut}, opacity ${_t.normal} ${jt.easeInOut}`,boxShadow:"var(--ggui-shape-shadow-sm, 0 1px 2px rgba(0,0,0,0.05))",...v},...N,children:c?r.jsx(Pa,{size:16,tone:"inherit"}):r.jsxs(r.Fragment,{children:[f,e,p]})})}var Ew={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 Gf({label:e,placeholder:n,value:o,onChange:l,type:c="text",error:u,helperText:f,required:p,disabled:g,size:h="md",style:y,className:v,...S}){const N=I.useId(),x=`${N}-input`,E=`${N}-message`,z=!!u,k=!!(u||f);return r.jsxs("div",{className:v,style:{display:"flex",flexDirection:"column",gap:"var(--ggui-spacing-1, 4px)",...y},children:[e&&r.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&&r.jsx("span",{"aria-hidden":"true",style:{color:"var(--ggui-color-error-500, #ef4444)",marginLeft:"2px"},children:"*"})]}),r.jsx("input",{id:x,type:c,placeholder:n,value:o,onChange:$=>l==null?void 0:l($.target.value),disabled:g,required:p,"aria-invalid":z||void 0,"aria-describedby":k?E:void 0,style:{...Ew[h],width:"100%",borderRadius:"var(--ggui-shape-radius-md, 8px)",border:`1px solid ${z?"var(--ggui-color-error-500, #ef4444)":"var(--ggui-color-outline, #d4d4d8)"}`,backgroundColor:g?"var(--ggui-color-surface, #fafafa)":"var(--ggui-color-surface, #ffffff)",color:"var(--ggui-color-onSurface, #18181b)",transition:`border-color ${_t.normal} ${jt.easeInOut}, box-shadow ${_t.normal} ${jt.easeInOut}`,boxSizing:"border-box"},...S}),k&&r.jsx("span",{id:E,role:z?"alert":void 0,style:{fontSize:"var(--ggui-font-size-xs, 12px)",color:z?"var(--ggui-color-error-500, #ef4444)":"var(--ggui-color-onSurfaceVariant, #52525b)"},children:u||f})]})}function Ff({label:e,placeholder:n,value:o,onChange:l,rows:c=4,error:u,helperText:f,required:p,disabled:g,maxLength:h,showCount:y,autoResize:v,style:S,className:N,...x}){const E=I.useId(),z=`${E}-textarea`,k=`${E}-message`,$=!!u,w=!!(u||f),R=(o==null?void 0:o.length)||0;return r.jsxs("div",{className:N,style:{display:"flex",flexDirection:"column",gap:"var(--ggui-spacing-1, 4px)",...S},children:[e&&r.jsxs("label",{htmlFor:z,style:{fontSize:"var(--ggui-font-size-sm, 14px)",fontWeight:"var(--ggui-font-weight-medium, 500)",color:"var(--ggui-color-onSurfaceVariant, #52525b)"},children:[e,p&&r.jsx("span",{"aria-hidden":"true",style:{color:"var(--ggui-color-error-500, #ef4444)",marginLeft:"2px"},children:"*"})]}),r.jsx("textarea",{id:z,placeholder:n,value:o,onChange:b=>l==null?void 0:l(b.target.value),rows:c,disabled:g,required:p,maxLength:h,"aria-invalid":$||void 0,"aria-describedby":w?k: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 ${_t.normal} ${jt.easeInOut}, box-shadow ${_t.normal} ${jt.easeInOut}`,boxSizing:"border-box",resize:v?"none":"vertical"},...x}),r.jsxs("div",{style:{display:"flex",justifyContent:"space-between"},children:[w&&r.jsx("span",{id:k,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||f}),y&&h&&r.jsxs("span",{style:{fontSize:"var(--ggui-font-size-xs, 12px)",color:"var(--ggui-color-onSurfaceVariant, #52525b)",marginLeft:"auto"},children:[R,"/",h]})]})]})}var Cw={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 C1({label:e,value:n,onChange:o,options:l,placeholder:c,error:u,helperText:f,required:p,disabled:g,size:h="md",style:y,className:v,...S}){const N=I.useId(),x=`${N}-select`,E=`${N}-message`,z=!!u,k=!!(u||f);return r.jsxs("div",{className:v,style:{display:"flex",flexDirection:"column",gap:"var(--ggui-spacing-1, 4px)",...y},children:[e&&r.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&&r.jsx("span",{"aria-hidden":"true",style:{color:"var(--ggui-color-error-500, #ef4444)",marginLeft:"2px"},children:"*"})]}),r.jsxs("select",{id:x,value:n,onChange:$=>o==null?void 0:o($.target.value),disabled:g,required:p,"aria-invalid":z||void 0,"aria-describedby":k?E:void 0,style:{...Cw[h],width:"100%",borderRadius:"var(--ggui-shape-radius-md, 8px)",border:`1px solid ${z?"var(--ggui-color-error-500, #ef4444)":"var(--ggui-color-outline, #d4d4d8)"}`,backgroundColor:g?"var(--ggui-color-surface, #fafafa)":"var(--ggui-color-surface, #ffffff)",color:n?"var(--ggui-color-onSurface, #18181b)":"var(--ggui-color-onSurfaceVariant, #52525b)",cursor:g?"not-allowed":"pointer",appearance:"none",backgroundImage:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M3 4.5L6 7.5L9 4.5'/%3E%3C/svg%3E")`,backgroundRepeat:"no-repeat",backgroundPosition:"right 12px center",paddingRight:"36px",boxSizing:"border-box",transition:`border-color ${_t.normal} ${jt.easeInOut}, box-shadow ${_t.normal} ${jt.easeInOut}`},...S,children:[c&&r.jsx("option",{value:"",disabled:!0,children:c}),l.map($=>r.jsx("option",{value:$.value,disabled:$.disabled,children:$.label},$.value))]}),k&&r.jsx("span",{id:E,role:z?"alert":void 0,style:{fontSize:"var(--ggui-font-size-xs, 12px)",color:z?"var(--ggui-color-error-500, #ef4444)":"var(--ggui-color-onSurfaceVariant, #52525b)"},children:u||f})]})}function yc({label:e,checked:n,onChange:o,disabled:l,description:c,indeterminate:u,style:f,className:p}){return r.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,...f},children:[r.jsxs("div",{style:{position:"relative",width:"18px",height:"18px",flexShrink:0,marginTop:"2px"},children:[r.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"}}),r.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)&&r.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",style:{color:"#ffffff"},children:u?r.jsx("path",{d:"M2.5 6H9.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}):r.jsx("path",{d:"M2.5 6L5 8.5L9.5 3.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),(e||c)&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"2px"},children:[e&&r.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&&r.jsx("span",{style:{fontSize:"var(--ggui-font-size-xs, 12px)",color:"var(--ggui-color-onSurfaceVariant, #52525b)"},children:c})]})]})}var Tw={sm:{width:36,height:20,knob:16},md:{width:44,height:24,knob:20},lg:{width:52,height:28,knob:24}};function Mw({label:e,checked:n,onChange:o,disabled:l,size:c="md",style:u,className:f}){const p=Tw[c],[g,h]=I.useState(!1);return r.jsxs("label",{className:f,style:{display:"flex",alignItems:"center",gap:"var(--ggui-spacing-2, 8px)",cursor:l?"not-allowed":"pointer",opacity:l?.5:1,...u},children:[r.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 ${_t.normal} ${jt.easeInOut}, box-shadow ${_t.normal} ${jt.easeInOut}`,flexShrink:0,outline:"none",boxShadow:g?"0 0 0 3px var(--ggui-color-primary-200, #bae6fd)":void 0},children:r.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 ${_t.normal} ${jt.easeInOut}`,boxShadow:"var(--ggui-shape-shadow-sm, 0 1px 2px rgba(0,0,0,0.05))"}})}),e&&r.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 Rw({label:e,value:n,onChange:o,options:l,direction:c="vertical",disabled:u,error:f,style:p,className:g}){const h=I.useId(),y=`${h}-label`,v=`${h}-error`,S=`${h}-radio`,N=!!f;return r.jsxs("div",{role:"radiogroup","aria-labelledby":e?y:void 0,"aria-describedby":N?v:void 0,className:g,style:{display:"flex",flexDirection:"column",gap:"var(--ggui-spacing-2, 8px)",...p},children:[e&&r.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}),r.jsx("div",{style:{display:"flex",flexDirection:c==="vertical"?"column":"row",gap:c==="vertical"?"var(--ggui-spacing-2, 8px)":"var(--ggui-spacing-4, 16px)",flexWrap:"wrap"},children:l.map(x=>{const E=n===x.value,z=u||x.disabled;return r.jsxs("label",{style:{display:"flex",alignItems:"flex-start",gap:"var(--ggui-spacing-2, 8px)",cursor:z?"not-allowed":"pointer",opacity:z?.5:1},children:[r.jsxs("div",{style:{position:"relative",width:"18px",height:"18px",flexShrink:0,marginTop:"2px"},children:[r.jsx("input",{type:"radio",name:S,value:x.value,checked:E,onChange:()=>o==null?void 0:o(x.value),disabled:z,style:{position:"absolute",width:"18px",height:"18px",margin:0,opacity:0,cursor:z?"not-allowed":"pointer"}}),r.jsx("div",{style:{width:"18px",height:"18px",borderRadius:"var(--ggui-shape-radius-full, 9999px)",border:`2px solid ${E?"var(--ggui-color-primary-600, #0284c7)":"var(--ggui-color-outline, #d4d4d8)"}`,backgroundColor:"var(--ggui-color-surface, #ffffff)",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s"},children:E&&r.jsx("div",{style:{width:"8px",height:"8px",borderRadius:"var(--ggui-shape-radius-full, 9999px)",backgroundColor:"var(--ggui-color-primary-600, #0284c7)"}})})]}),r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"2px"},children:[r.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&&r.jsx("span",{style:{fontSize:"var(--ggui-font-size-xs, 12px)",color:"var(--ggui-color-onSurfaceVariant, #52525b)"},children:x.description})]})]},x.value)})}),f&&r.jsx("span",{id:v,role:"alert",style:{fontSize:"var(--ggui-font-size-xs, 12px)",color:"var(--ggui-color-error-500, #ef4444)"},children:f})]})}function Ow({label:e,value:n=0,onChange:o,min:l=0,max:c=100,step:u=1,disabled:f,showValue:p,style:g,className:h}){const y=I.useId(),v=`${y}-slider`,S=`${y}-label`,N=(n-l)/(c-l)*100;return r.jsxs("div",{className:h,style:{display:"flex",flexDirection:"column",gap:"var(--ggui-spacing-2, 8px)",...g},children:[(e||p)&&r.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e&&r.jsx("span",{id:S,style:{fontSize:"var(--ggui-font-size-sm, 14px)",fontWeight:"var(--ggui-font-weight-medium, 500)",color:"var(--ggui-color-onSurfaceVariant, #52525b)"},children:e}),p&&r.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})]}),r.jsxs("div",{style:{position:"relative",height:"20px",display:"flex",alignItems:"center"},children:[r.jsx("div",{style:{position:"absolute",width:"100%",height:"6px",borderRadius:"3px",backgroundColor:"var(--ggui-color-outlineVariant, #e4e4e7)"}}),r.jsx("div",{style:{position:"absolute",width:`${N}%`,height:"6px",borderRadius:"3px",backgroundColor:f?"var(--ggui-color-outline, #d4d4d8)":"var(--ggui-color-primary-600, #0284c7)",transition:"width 0.1s"}}),r.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:f,"aria-labelledby":e?S: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:f?"not-allowed":"pointer",zIndex:1}}),r.jsx("div",{style:{position:"absolute",left:`calc(${N}% - 10px)`,width:"20px",height:"20px",borderRadius:"50%",backgroundColor:"#ffffff",border:`2px solid ${f?"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)"}},Dw={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 Uw({children:e,variant:n="default",size:o="md",pill:l=!0,style:c,className:u}){return r.jsx("span",{className:u,style:{...Aw[n],...Dw[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 Uy=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 f=e==="circle",p=e==="text",g=Uy(n)??(f?"2.5rem":"100%"),h=Uy(o)??(p?"1em":f?g:"1.25rem"),y={display:"block",width:g,height:h,borderRadius:f?"9999px":Jo(l),backgroundColor:"var(--ggui-color-surfaceVariant, #f4f4f5)",animation:"ggui-skeleton-pulse 1.5s ease-in-out infinite",...c};return r.jsx("div",{className:u,style:y,"aria-hidden":"true",children:r.jsx("style",{children:"@keyframes ggui-skeleton-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }"})})}var Lw={xs:24,sm:32,md:40,lg:48,xl:64},Iy=["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 Li({src:e,name:n,size:o="md",shape:l="circle",style:c,className:u}){const[f,p]=I.useState(!1),g=typeof o=="number"?o:Lw[o]||40,h=n?n.split(" ").map(S=>S[0]).join("").toUpperCase().slice(0,2):"?",y=S=>{if(!S)return"var(--ggui-color-outline, #d4d4d8)";const N=S.split("").reduce((x,E)=>x+E.charCodeAt(0),0);return Iy[N%Iy.length]},v=!e||f;return r.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:r.jsx("img",{src:e,alt:n||"Avatar",onError:()=>p(!0),style:{width:"100%",height:"100%",objectFit:"cover"}})})}var Vw={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)"}},Hw={info:r.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",children:r.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:r.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",children:r.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:r.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",children:r.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:r.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",children:r.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 Bw({children:e,variant:n="info",title:o,closable:l,onClose:c,icon:u,style:f,className:p}){const g=Vw[n];return r.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,...f},children:[r.jsx("div",{style:{color:g.icon,flexShrink:0},children:u||Hw[n]}),r.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:"var(--ggui-spacing-1, 4px)"},children:[o&&r.jsx("div",{style:{fontWeight:"var(--ggui-font-weight-semibold, 600)",fontSize:"var(--ggui-font-size-sm, 14px)"},children:o}),r.jsx("div",{style:{fontSize:"var(--ggui-font-size-sm, 14px)"},children:e})]}),l&&r.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:r.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",children:r.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 qw={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)"},Pw={sm:4,md:8,lg:12};function T1({value:e,max:n=100,variant:o="default",size:l="md",label:c,showLabel:u,indeterminate:f,style:p,className:g}){const h=Math.min(100,Math.max(0,e/n*100)),y=Pw[l],v=qw[o],S=c??"Progress";return r.jsxs("div",{className:g,style:{display:"flex",flexDirection:"column",gap:"var(--ggui-spacing-1, 4px)",...p},children:[u&&r.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[r.jsx("span",{style:{fontSize:"var(--ggui-font-size-sm, 14px)",color:"var(--ggui-color-onSurfaceVariant, #52525b)"},children:S}),r.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),"%"]})]}),r.jsxs("div",{role:"progressbar","aria-valuenow":f?void 0:e,"aria-valuemin":0,"aria-valuemax":n,"aria-label":S,style:{width:"100%",height:y,borderRadius:y/2,backgroundColor:"var(--ggui-color-outlineVariant, #e4e4e7)",overflow:"hidden"},children:[r.jsx("div",{style:{height:"100%",borderRadius:y/2,backgroundColor:v,transition:f?"none":"width 0.3s ease",...f?{width:"30%",animation:"ggui-progress-indeterminate 1.5s ease-in-out infinite"}:{width:`${h}%`}}}),f&&r.jsx("style",{children:`@keyframes ggui-progress-indeterminate {
95
+ 0% { transform: translateX(-100%); }
96
+ 100% { transform: translateX(400%); }
97
+ }`})]})]})}function M1({src:e,alt:n,width:o,height:l,objectFit:c="cover",radius:u,fallback:f,style:p,className:g}){const[h,y]=I.useState(!1),v=S=>{if(S!==void 0)return typeof S=="number"?`${S}px`:S};return h&&f?r.jsx(r.Fragment,{children:f}):h?r.jsx("div",{role:"img","aria-label":`${n} (failed to load)`,className:g,style:{width:v(o)||"100%",height:v(l)||"auto",borderRadius:Jo(u),backgroundColor:"var(--ggui-color-surfaceVariant, #f4f4f5)",display:"flex",alignItems:"center",justifyContent:"center",color:"var(--ggui-color-outline, #d4d4d8)",...p},children:r.jsx("svg",{width:"48",height:"48",viewBox:"0 0 24 24",fill:"currentColor",children:r.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"})})}):r.jsx("img",{src:e,alt:n,onError:()=>y(!0),className:g,style:{width:v(o)||"100%",height:v(l)||"auto",objectFit:c,borderRadius:Jo(u),display:"block",...p}})}var Yf={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"}]]},R1=new Map;for(const e of Object.keys(Yf))R1.set(e.toLowerCase(),e);function Zw(e){if(Yf[e])return e;const n=e.replace(/[-_]/g,"").toLowerCase();return R1.get(n)}function Gw(e,n,o){return r.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)=>uc.createElement(l,{key:u,...c}))})}function xt({name:e,size:n=24,tone:o,children:l,style:c,className:u,"aria-label":f}){const p=o?Bi(o):"currentColor",g=f?{role:"img","aria-label":f}:{"aria-hidden":!0},h={display:"inline-flex",alignItems:"center",justifyContent:"center",width:n,height:n,color:p,...c};if(l)return r.jsx("span",{className:u,style:h,...g,children:l});if(e){const y=Zw(e);if(y)return r.jsx("span",{className:u,style:h,...g,children:Gw(Yf[y],n,p)})}return e&&/[^\x00-\x7F]/.test(e)?r.jsx("span",{className:u,...g,style:{...h,fontSize:n*.75,lineHeight:1},children:e}):r.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 O1({children:e,href:n,external:o,tone:l,underline:c="hover",style:u,className:f,...p}){const g=l?Bi(l):"var(--ggui-color-primary-600, #0284c7)",h={always:"underline",hover:"none",none:"none"}[c];return r.jsxs("a",{href:n,target:o?"_blank":void 0,rel:o?"noopener noreferrer":void 0,className:f,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&&r.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:[r.jsx("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),r.jsx("polyline",{points:"15 3 21 3 21 9"}),r.jsx("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]})]})}function Fw({children:e,content:n,position:o="top",delay:l=200,style:c,className:u}){const[f,p]=I.useState(!1),[g,h]=I.useState({top:0,left:0}),y=I.useRef(null),v=I.useRef(null),S=()=>{v.current=setTimeout(()=>{p(!0)},l)},N=()=>{v.current&&clearTimeout(v.current),p(!1)};I.useEffect(()=>{if(f&&y.current){const E=y.current.getBoundingClientRect(),z=8;let k=0,$=0;switch(o){case"top":k=E.top-z,$=E.left+E.width/2;break;case"bottom":k=E.bottom+z,$=E.left+E.width/2;break;case"left":k=E.top+E.height/2,$=E.left-z;break;case"right":k=E.top+E.height/2,$=E.right+z;break}h({top:k,left:$})}},[f,o]),I.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 r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:y,onMouseEnter:S,onMouseLeave:N,onFocus:S,onBlur:N,className:u,style:{display:"inline-block",...c},children:e}),f&&r.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:Hi.tooltip,maxWidth:"200px",pointerEvents:"none",whiteSpace:"nowrap"},children:n})]})}var Yw=(e,n)=>r.jsxs("span",{"aria-hidden":"true",style:{display:"inline-flex",flexDirection:"column",marginLeft:"4px",fontSize:"10px",lineHeight:1,opacity:e?1:.3},children:[r.jsx("span",{style:{opacity:e&&n==="asc"?1:.4},children:"▲"}),r.jsx("span",{style:{opacity:e&&n==="desc"?1:.4},children:"▼"})]});function Kw({columns:e,data:n,sortKey:o,sortDirection:l="asc",onSort:c,striped:u=!1,hoverable:f=!0,compact:p=!1,bordered:g=!1,caption:h,style:y,className:v}){const[S,N]=I.useState(null),x=p?"var(--ggui-spacing-1, 4px) var(--ggui-spacing-2, 8px)":"var(--ggui-spacing-2, 8px) var(--ggui-spacing-4, 16px)",E=k=>{if(!c)return;c(k,o===k&&l==="asc"?"desc":"asc")},z={padding:x,textAlign:"left",fontWeight:"var(--ggui-font-weight-semibold, 600)",fontSize:"var(--ggui-font-size-xs, 12px)",color:"var(--ggui-color-onSurfaceVariant, #52525b)",textTransform:"uppercase",letterSpacing:"0.05em",borderBottom:"2px solid var(--ggui-color-outlineVariant, #e4e4e7)",whiteSpace:"nowrap",userSelect:"none"};return r.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:r.jsxs("table",{role:"table",style:{width:"100%",borderCollapse:"collapse",fontSize:"var(--ggui-font-size-sm, 14px)",color:"var(--ggui-color-onSurfaceVariant, #52525b)"},children:[h&&r.jsx("caption",{style:{padding:x,fontSize:"var(--ggui-font-size-sm, 14px)",color:"var(--ggui-color-onSurfaceVariant, #52525b)",textAlign:"left",captionSide:"top"},children:h}),r.jsx("thead",{children:r.jsx("tr",{children:e.map(k=>r.jsx("th",{scope:"col","aria-sort":o===k.key?l==="asc"?"ascending":"descending":void 0,onClick:k.sortable?()=>E(k.key):void 0,onKeyDown:k.sortable?$=>{($.key==="Enter"||$.key===" ")&&($.preventDefault(),E(k.key))}:void 0,tabIndex:k.sortable?0:void 0,style:{...z,textAlign:k.align||"left",width:k.width,cursor:k.sortable?"pointer":"default"},children:r.jsxs("span",{style:{display:"inline-flex",alignItems:"center"},children:[k.header,k.sortable&&Yw(o===k.key,l)]})},k.key))})}),r.jsx("tbody",{children:n.map((k,$)=>r.jsx("tr",{onMouseEnter:f?()=>N($):void 0,onMouseLeave:f?()=>N(null):void 0,style:{backgroundColor:f&&S===$||u&&$%2===1?"var(--ggui-color-surface, #fafafa)":"transparent",transition:"background-color 0.15s ease"},children:e.map(w=>r.jsx("td",{style:{padding:x,textAlign:w.align||"left",borderBottom:"1px solid var(--ggui-color-surfaceVariant, #f4f4f5)",borderRight:g?"1px solid var(--ggui-color-surfaceVariant, #f4f4f5)":void 0},children:w.render?w.render(k[w.key],k,$):k[w.key]},w.key))},$))})]})})}var Ww={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 Xw({items:e,activeKey:n,onChange:o,variant:l="line",size:c="md",fullWidth:u=!1,style:f,className:p}){var $;const g=I.useId(),[h,y]=I.useState(($=e[0])==null?void 0:$.key),v=n??h,S=I.useCallback(w=>{o?o(w):y(w)},[o]),N=e.find(w=>w.key===v),x=I.useRef(null),E=I.useCallback(w=>{var T;const R=e.filter(O=>!O.disabled),b=R.findIndex(O=>O.key===v);let j;if(w.key==="ArrowRight"||w.key==="ArrowDown"?(w.preventDefault(),j=(b+1)%R.length):w.key==="ArrowLeft"||w.key==="ArrowUp"?(w.preventDefault(),j=(b-1+R.length)%R.length):w.key==="Home"?(w.preventDefault(),j=0):w.key==="End"&&(w.preventDefault(),j=R.length-1),j!==void 0){const O=R[j];S(O.key);const V=(T=x.current)==null?void 0:T.querySelector(`#${CSS.escape(`${g}-tab-${O.key}`)}`);V==null||V.focus()}},[e,v,g,S]),z=(w,R)=>{const b={...Ww[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:w?"var(--ggui-font-weight-semibold, 600)":"var(--ggui-font-weight-medium, 500)",transition:`color ${_t.normal} ${jt.easeInOut}, background-color ${_t.normal} ${jt.easeInOut}, border-color ${_t.normal} ${jt.easeInOut}`,whiteSpace:"nowrap",flex:u?1:void 0,justifyContent:u?"center":void 0};return l==="line"?{...b,color:w?"var(--ggui-color-primary-600, #0284c7)":"var(--ggui-color-onSurfaceVariant, #52525b)",borderBottom:w?"2px solid var(--ggui-color-primary-600, #0284c7)":"2px solid transparent",marginBottom:"-1px"}:l==="pills"?{...b,color:w?"#ffffff":"var(--ggui-color-onSurfaceVariant, #52525b)",backgroundColor:w?"var(--ggui-color-primary-600, #0284c7)":"transparent",borderRadius:"var(--ggui-shape-radius-md, 6px)"}:{...b,color:w?"var(--ggui-color-primary-600, #0284c7)":"var(--ggui-color-onSurfaceVariant, #52525b)",backgroundColor:w?"var(--ggui-color-surface, #ffffff)":"transparent",border:w?"1px solid var(--ggui-color-outlineVariant, #e4e4e7)":"1px solid transparent",borderBottom:w?"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"}},k={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 r.jsxs("div",{className:p,style:f,children:[r.jsx("div",{ref:x,role:"tablist","aria-orientation":"horizontal",style:k,children:e.map(w=>{const R=w.key===v,b=!!w.disabled;return r.jsxs("button",{role:"tab",id:`${g}-tab-${w.key}`,"aria-selected":R,"aria-controls":`${g}-panel-${w.key}`,"aria-disabled":b,tabIndex:R?0:-1,onClick:b?void 0:()=>S(w.key),onKeyDown:b?void 0:E,style:z(R,b),children:[w.icon,w.label]},w.key)})}),N&&r.jsx("div",{role:"tabpanel",id:`${g}-panel-${N.key}`,"aria-labelledby":`${g}-tab-${N.key}`,tabIndex:0,style:{padding:"var(--ggui-spacing-4, 16px) 0"},children:N.content})]})}var Jw={fadeIn:`@keyframes ggui-fadeIn {
98
+ from { opacity: 0; }
99
+ to { opacity: 1; }
100
+ }`,fadeOut:`@keyframes ggui-fadeOut {
101
+ from { opacity: 1; }
102
+ to { opacity: 0; }
103
+ }`,slideInUp:`@keyframes ggui-slideInUp {
104
+ from { opacity: 0; transform: translateY(8px); }
105
+ to { opacity: 1; transform: translateY(0); }
106
+ }`,slideInDown:`@keyframes ggui-slideInDown {
107
+ from { opacity: 0; transform: translateY(-8px); }
108
+ to { opacity: 1; transform: translateY(0); }
109
+ }`,scaleIn:`@keyframes ggui-scaleIn {
110
+ from { opacity: 0; transform: scale(0.95); }
111
+ to { opacity: 1; transform: scale(1); }
112
+ }`,scaleOut:`@keyframes ggui-scaleOut {
113
+ from { opacity: 1; transform: scale(1); }
114
+ to { opacity: 0; transform: scale(0.95); }
115
+ }`,flash:`@keyframes ggui-flash {
116
+ 0%, 15% { background-color: var(--ggui-flash-color, var(--ggui-color-primary-100)); }
117
+ 100% { background-color: transparent; }
118
+ }`,pulse:`@keyframes ggui-pulse {
119
+ 0%, 100% { opacity: 1; }
120
+ 50% { opacity: 0.6; }
121
+ }`,bounce:`@keyframes ggui-bounce {
122
+ 0% { transform: scale(1); }
123
+ 40% { transform: scale(1.06); }
124
+ 70% { transform: scale(0.98); }
125
+ 100% { transform: scale(1); }
126
+ }`},_f={fadeIn:`ggui-fadeIn ${_t.normal} ${jt.easeOut} both`,slideInUp:`ggui-slideInUp ${_t.normal} ${jt.easeOut} both`,scaleIn:`ggui-scaleIn ${_t.normal} ${jt.easeOut} both`},Qw=`@media (prefers-reduced-motion: reduce) {
127
+ *, *::before, *::after {
128
+ animation-duration: 0.01ms !important;
129
+ animation-iteration-count: 1 !important;
130
+ transition-duration: 0.01ms !important;
131
+ }
132
+ }`,e8={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)"}},t8={info:r.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",children:r.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:r.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",children:r.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:r.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",children:r.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:r.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",children:r.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 a8({message:e,variant:n="info",title:o,duration:l=5e3,onClose:c,visible:u=!0,style:f,className:p}){if(I.useEffect(()=>{if(!u||l===0||!c)return;const y=setTimeout(c,l);return()=>clearTimeout(y)},[u,l,c]),!u)return null;const g=e8[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:_f.slideInUp,...f};return r.jsxs("div",{role:"alert","aria-live":"assertive",className:p,style:h,children:[r.jsx("div",{style:{color:g.icon,flexShrink:0,marginTop:"2px"},children:t8[n]}),r.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:"2px"},children:[o&&r.jsx("div",{style:{fontWeight:"var(--ggui-font-weight-semibold, 600)",fontSize:"var(--ggui-font-size-sm, 14px)"},children:o}),r.jsx("div",{style:{fontSize:"var(--ggui-font-size-sm, 14px)"},children:e})]}),c&&r.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:r.jsx("svg",{width:"16",height:"16",viewBox:"0 0 20 20",fill:"currentColor",children:r.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 n8=e=>r.jsx("svg",{width:"16",height:"16",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",style:{transition:`transform ${_t.normal} ${jt.easeInOut}`,transform:e?"rotate(180deg)":"rotate(0deg)",flexShrink:0},children:r.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 r8({items:e,expandedKeys:n,onChange:o,multiple:l=!1,variant:c="default",style:u,className:f}){const p=I.useId(),[g,h]=I.useState([]),y=n??g,v=x=>{let E;y.includes(x)?E=y.filter(z=>z!==x):l?E=[...y,x]:E=[x],o?o(E):h(E)},S={display:"flex",flexDirection:"column",gap:c==="separated"?"var(--ggui-spacing-2, 8px)":"0",...u},N=(x,E)=>c==="separated"?{border:"1px solid var(--ggui-color-outlineVariant, #e4e4e7)",borderRadius:"var(--ggui-shape-radius-lg, 8px)",overflow:"hidden"}:c==="bordered"?{borderLeft:"1px solid var(--ggui-color-outlineVariant, #e4e4e7)",borderRight:"1px solid var(--ggui-color-outlineVariant, #e4e4e7)",borderTop:x?"1px solid var(--ggui-color-outlineVariant, #e4e4e7)":void 0,borderBottom:"1px solid var(--ggui-color-outlineVariant, #e4e4e7)",borderTopLeftRadius:x?"var(--ggui-shape-radius-lg, 8px)":void 0,borderTopRightRadius:x?"var(--ggui-shape-radius-lg, 8px)":void 0,borderBottomLeftRadius:E?"var(--ggui-shape-radius-lg, 8px)":void 0,borderBottomRightRadius:E?"var(--ggui-shape-radius-lg, 8px)":void 0}:{borderBottom:"1px solid var(--ggui-color-outlineVariant, #e4e4e7)",borderTop:x?"1px solid var(--ggui-color-outlineVariant, #e4e4e7)":void 0};return r.jsx("div",{className:f,style:S,children:e.map((x,E)=>{const z=y.includes(x.key),k=!!x.disabled,$=E===0,w=E===e.length-1;return r.jsxs("div",{style:N($,w),children:[r.jsx("h3",{style:{margin:0},children:r.jsxs("button",{id:`${p}-header-${x.key}`,"aria-expanded":z,"aria-controls":`${p}-panel-${x.key}`,"aria-disabled":k,onClick:k?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:k?"not-allowed":"pointer",opacity:k?.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 ${_t.fast} ${jt.easeInOut}`},children:[r.jsx("span",{children:x.title}),n8(z)]})}),r.jsx("div",{id:`${p}-panel-${x.key}`,role:"region","aria-labelledby":`${p}-header-${x.key}`,hidden:!z,style:{overflow:"hidden"},children:z&&r.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 Ly="ggui-motion-keyframes";function i8(){return I.useEffect(()=>{if(document.getElementById(Ly))return;const e=document.createElement("style");return e.id=Ly,e.textContent=[...Object.values(Jw),Qw].join(`
133
+
134
+ `),document.head.appendChild(e),()=>{e.remove()}},[]),null}function o8(){const[e,n]=I.useState(()=>typeof window>"u"?!0:!window.matchMedia("(prefers-reduced-motion: reduce)").matches);return I.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 l8(e){const[n,o]=I.useState(0),l=I.useRef(!0);return I.useEffect(()=>{if(l.current){l.current=!1;return}o(c=>c+1)},[e]),n}var jf={};zc(jf,{Autocomplete:()=>b8,Breadcrumb:()=>x8,Dropdown:()=>$8,EmptyState:()=>j8,FormField:()=>m8,MenuItem:()=>A1,Pagination:()=>_8,SearchField:()=>g8,Stat:()=>S8,Tag:()=>v8});var s8={50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",400:"#38bdf8",600:"#0284c7",700:"#0369a1"},c8={50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",900:"#111827"},u8={50:"#f0fdf4",200:"#bbf7d0",500:"#22c55e",700:"#15803d"},d8={50:"#fffbeb",200:"#fde68a",500:"#f59e0b",700:"#b45309"},f8={50:"#fef2f2",100:"#fee2e2",200:"#fecaca",500:"#ef4444",600:"#dc2626",700:"#b91c1c"},p8={50:"#ecfeff",200:"#a5f3fc",500:"#06b6d4",700:"#0e7490"},K={primary:s8,gray:c8,success:u8,warning:d8,error:f8,info:p8,white:"#ffffff"};function g8({value:e,onChange:n,onSearch:o,placeholder:l="Search...",showButton:c=!1,buttonText:u="Search",loading:f,disabled:p,size:g="md",style:h,className:y}){const[v,S]=I.useState(""),N=e!==void 0?e:v,x=$=>{e===void 0&&S($),n==null||n($)},E=()=>{o==null||o(N)},z=$=>{$.key==="Enter"&&!p&&E()},k={sm:"sm",md:"md",lg:"md"};return r.jsxs("div",{className:y,style:{display:"flex",gap:"8px",alignItems:"flex-end",...h},children:[r.jsxs("div",{style:{position:"relative",flex:1},children:[r.jsx("div",{style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",color:K.gray[400],pointerEvents:"none",display:"flex",alignItems:"center"},children:f?r.jsx(Pa,{size:16}):r.jsx(xt,{name:"search",size:16})}),r.jsx("input",{type:"search",value:N,onChange:$=>x($.target.value),onKeyDown:z,placeholder:l,disabled:p||f,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 ${K.gray[300]}`,backgroundColor:p?K.gray[50]:K.white,color:K.gray[900],outline:"none",boxSizing:"border-box"}})]}),c&&r.jsx(Xt,{onClick:E,disabled:p||f,size:k[g],loading:f,children:u})]})}function m8({label:e,children:n,error:o,helperText:l,required:c,description:u,style:f,className:p}){const g=!!o;return r.jsxs("div",{className:p,style:{display:"flex",flexDirection:"column",gap:"4px",...f},children:[r.jsxs("label",{style:{fontSize:he.sm,fontWeight:Ue.medium,color:K.gray[700]},children:[e,c&&r.jsx("span",{style:{color:K.error[500],marginLeft:"2px"},children:"*"})]}),u&&r.jsx("span",{style:{fontSize:he.xs,color:K.gray[500],marginBottom:"4px"},children:u}),n,(o||l)&&r.jsx("span",{style:{fontSize:he.xs,color:g?K.error[500]:K.gray[500]},children:o||l})]})}function A1({label:e,icon:n,rightElement:o,onClick:l,disabled:c,active:u,danger:f,style:p,className:g}){const h=f?K.error[600]:K.gray[700],y=f?K.error[50]:K.gray[100],v=f?K.error[100]:K.primary[50];return r.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:Jt.md,backgroundColor:u?v:"transparent",color:c?K.gray[400]:h,fontSize:he.sm,fontWeight:u?Ue.medium:Ue.normal,textAlign:"left",cursor:c?"not-allowed":"pointer",transition:"background-color 0.15s",...p},onMouseEnter:S=>{!c&&!u&&(S.target.style.backgroundColor=y)},onMouseLeave:S=>{!c&&!u&&(S.target.style.backgroundColor="transparent")},children:[n&&r.jsx("span",{style:{display:"flex",flexShrink:0},children:n}),r.jsx("span",{style:{flex:1},children:e}),o&&r.jsx("span",{style:{display:"flex",flexShrink:0,color:K.gray[400]},children:o})]})}var h8={default:{backgroundColor:K.gray[100],color:K.gray[700],border:`1px solid ${K.gray[200]}`},primary:{backgroundColor:K.primary[50],color:K.primary[700],border:`1px solid ${K.primary[200]}`},success:{backgroundColor:K.success[50],color:K.success[700],border:`1px solid ${K.success[200]}`},warning:{backgroundColor:K.warning[50],color:K.warning[700],border:`1px solid ${K.warning[200]}`},error:{backgroundColor:K.error[50],color:K.error[700],border:`1px solid ${K.error[200]}`},info:{backgroundColor:K.info[50],color:K.info[700],border:`1px solid ${K.info[200]}`}},y8={sm:{padding:"2px 6px",fontSize:he.xs,gap:"4px"},md:{padding:"4px 8px",fontSize:he.xs,gap:"6px"},lg:{padding:"6px 10px",fontSize:he.sm,gap:"6px"}};function v8({children:e,variant:n="default",size:o="md",closable:l,onClose:c,icon:u,style:f,className:p}){const g=y8[o];return r.jsxs("span",{className:p,style:{display:"inline-flex",alignItems:"center",gap:g.gap,padding:g.padding,fontSize:g.fontSize,fontWeight:Ue.medium,borderRadius:"6px",...h8[n],...f},children:[u&&r.jsx("span",{style:{display:"flex"},children:u}),e,l&&r.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:r.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"currentColor",children:r.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 $8({trigger:e,options:n,value:o,onChange:l,placement:c="bottom-start",disabled:u,style:f,className:p}){const[g,h]=I.useState(!1),y=I.useRef(null);I.useEffect(()=>{const N=x=>{y.current&&!y.current.contains(x.target)&&h(!1)};if(g)return document.addEventListener("mousedown",N),()=>document.removeEventListener("mousedown",N)},[g]),I.useEffect(()=>{const N=x=>{x.key==="Escape"&&h(!1)};if(g)return document.addEventListener("keydown",N),()=>document.removeEventListener("keydown",N)},[g]);const v=N=>{l==null||l(N),h(!1)},S=()=>{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 r.jsxs("div",{ref:y,className:p,style:{position:"relative",display:"inline-block",...f},children:[r.jsx("div",{onClick:()=>!u&&h(!g),style:{cursor:u?"not-allowed":"pointer"},children:e}),g&&r.jsx("div",{style:{position:"absolute",...S(),minWidth:"160px",backgroundColor:K.white,border:`1px solid ${K.gray[200]}`,borderRadius:Jt.lg,boxShadow:nl.lg,zIndex:Hi.dropdown,padding:"4px"},children:n.map(N=>r.jsx(A1,{label:N.label,icon:N.icon,onClick:()=>v(N.value),disabled:N.disabled,active:o===N.value,danger:N.danger},N.value))})]})}function b8({value:e="",onChange:n,onSelect:o,options:l,placeholder:c,label:u,loading:f,disabled:p,error:g,noResultsText:h="No results found",style:y,className:v}){const[S,N]=I.useState(!1),[x,E]=I.useState(-1),z=I.useRef(null),k=I.useMemo(()=>{if(!e)return l;const b=e.toLowerCase();return l.filter(j=>j.label.toLowerCase().includes(b)||j.value.toLowerCase().includes(b))},[l,e]);I.useEffect(()=>{const b=j=>{z.current&&!z.current.contains(j.target)&&N(!1)};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[]);const $=b=>{n==null||n(b),N(!0),E(-1)},w=b=>{n==null||n(b.label),o==null||o(b),N(!1),E(-1)},R=b=>{if(!S){(b.key==="ArrowDown"||b.key==="ArrowUp")&&N(!0);return}switch(b.key){case"ArrowDown":b.preventDefault(),E(j=>j<k.length-1?j+1:j);break;case"ArrowUp":b.preventDefault(),E(j=>j>0?j-1:j);break;case"Enter":b.preventDefault(),x>=0&&k[x]&&w(k[x]);break;case"Escape":N(!1),E(-1);break}};return r.jsxs("div",{ref:z,className:v,style:{position:"relative",...y},children:[r.jsx("div",{onKeyDown:R,children:r.jsx(Gf,{label:u,value:e,onChange:$,onFocus:()=>N(!0),placeholder:c,disabled:p,error:g})}),S&&r.jsx("div",{style:{position:"absolute",top:"100%",left:0,right:0,marginTop:"4px",backgroundColor:K.white,border:`1px solid ${K.gray[200]}`,borderRadius:Jt.lg,boxShadow:nl.lg,zIndex:Hi.dropdown,maxHeight:"240px",overflow:"auto"},children:f?r.jsx("div",{style:{padding:"12px",display:"flex",justifyContent:"center"},children:r.jsx(Pa,{size:20})}):k.length===0?r.jsx("div",{style:{padding:"12px",textAlign:"center",color:K.gray[500],fontSize:he.sm},children:h}):k.map((b,j)=>r.jsxs("div",{onClick:()=>!b.disabled&&w(b),style:{padding:"8px 12px",cursor:b.disabled?"not-allowed":"pointer",backgroundColor:x===j?K.gray[100]:"transparent",color:b.disabled?K.gray[400]:K.gray[900],fontSize:he.sm,display:"flex",alignItems:"center",gap:"8px"},onMouseEnter:()=>E(j),children:[b.icon&&r.jsx("span",{style:{flexShrink:0},children:b.icon}),r.jsxs("div",{style:{flex:1},children:[r.jsx("div",{children:b.label}),b.description&&r.jsx("div",{style:{fontSize:he.xs,color:K.gray[500]},children:b.description})]})]},b.value))})]})}function x8({items:e,separator:n="/",onItemClick:o,style:l,className:c}){return r.jsx("nav",{"aria-label":"Breadcrumb",className:c,style:{display:"flex",alignItems:"center",gap:"8px",fontSize:he.sm,...l},children:e.map((u,f)=>{const p=f===e.length-1;return r.jsxs(I.Fragment,{children:[f>0&&r.jsx("span",{style:{color:K.gray[400]},children:n}),u.icon&&r.jsx("span",{style:{display:"flex",alignItems:"center",color:p?K.gray[900]:K.gray[500]},children:u.icon}),p?r.jsx("span",{style:{color:K.gray[900],fontWeight:500},"aria-current":"page",children:u.label}):u.href?r.jsx(O1,{href:u.href,tone:"muted",underline:"hover",onClick:g=>{o&&(g.preventDefault(),o(u,f))},children:u.label}):r.jsx("button",{onClick:()=>o==null?void 0:o(u,f),style:{background:"none",border:"none",padding:0,color:K.gray[500],cursor:"pointer",fontSize:"inherit"},children:u.label})]},f)})})}function _8({currentPage:e,totalPages:n,onPageChange:o,showFirstLast:l=!0,maxVisible:c=5,size:u="md",disabled:f,style:p,className:g}){const h=()=>{const N=[];if(n<=c)for(let x=1;x<=n;x++)N.push(x);else{N.push(1);const x=Math.floor((c-3)/2);let E=Math.max(2,e-x),z=Math.min(n-1,e+x);e<=x+2&&(z=Math.min(n-1,c-2)),e>=n-x-1&&(E=Math.max(2,n-c+3)),E>2&&N.push("ellipsis");for(let k=E;k<=z;k++)N.push(k);z<n-1&&N.push("ellipsis"),N.push(n)}return N},y=u==="sm"?"xs":u==="lg"?"md":"sm",v=u==="sm"?14:u==="lg"?20:16,S=({page:N,active:x})=>r.jsx("button",{onClick:()=>!f&&(o==null?void 0:o(N)),disabled:f,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?K.primary[600]:"transparent",color:x?K.white:K.gray[700],fontSize:u==="sm"?he.xs:he.sm,fontWeight:x?Ue.medium:Ue.normal,cursor:f?"not-allowed":"pointer",opacity:f?.5:1,transition:"all 0.15s"},children:N});return r.jsxs("nav",{"aria-label":"Pagination",className:g,style:{display:"flex",alignItems:"center",gap:"4px",...p},children:[l&&r.jsxs(Xt,{variant:"ghost",size:y,onClick:()=>o==null?void 0:o(1),disabled:f||e===1,"aria-label":"First page",children:[r.jsx(xt,{name:"chevron-left",size:v}),r.jsx(xt,{name:"chevron-left",size:v,style:{marginLeft:"-8px"}})]}),r.jsx(Xt,{variant:"ghost",size:y,onClick:()=>o==null?void 0:o(e-1),disabled:f||e===1,"aria-label":"Previous page",children:r.jsx(xt,{name:"chevron-left",size:v})}),h().map((N,x)=>N==="ellipsis"?r.jsx("span",{style:{padding:"0 4px",color:K.gray[400]},children:"..."},`ellipsis-${x}`):r.jsx(S,{page:N,active:N===e},N)),r.jsx(Xt,{variant:"ghost",size:y,onClick:()=>o==null?void 0:o(e+1),disabled:f||e===n,"aria-label":"Next page",children:r.jsx(xt,{name:"chevron-right",size:v})}),l&&r.jsxs(Xt,{variant:"ghost",size:y,onClick:()=>o==null?void 0:o(n),disabled:f||e===n,"aria-label":"Last page",children:[r.jsx(xt,{name:"chevron-right",size:v}),r.jsx(xt,{name:"chevron-right",size:v,style:{marginLeft:"-8px"}})]})]})}function j8({icon:e,title:n,description:o,action:l,style:c,className:u}){const f={textAlign:"center",padding:"var(--ggui-spacing-xl, 32px)",...c};return r.jsxs(Ii,{align:"center",gap:"sm",className:u,style:f,children:[e!==void 0&&(typeof e=="string"?r.jsx(xt,{name:e,size:40,tone:"subtle"}):e),r.jsx(Cc,{level:3,children:n}),o!==void 0&&r.jsx(qr,{tone:"muted",children:o}),l!==void 0&&r.jsx("div",{style:{marginTop:"var(--ggui-spacing-sm, 8px)"},children:l})]})}function S8({label:e,value:n,delta:o,trend:l="neutral",icon:c,style:u,className:f}){const p=l==="up"?"success":l==="down"?"error":"muted";return r.jsxs(Ii,{gap:"xs",className:f,style:u,children:[r.jsxs(hc,{gap:"xs",align:"center",children:[c!==void 0&&(typeof c=="string"?r.jsx(xt,{name:c,size:16,tone:"muted"}):c),r.jsx(qr,{variant:"overline",tone:"muted",children:e})]}),r.jsxs(hc,{gap:"sm",align:"end",children:[r.jsx(qr,{size:"3xl",weight:"bold",children:n}),o!==void 0&&r.jsx(qr,{size:"sm",weight:"semibold",tone:p,children:o})]})]})}var Sf={};zc(Sf,{CardGrid:()=>N8,ChatWindow:()=>C8,CommandPalette:()=>L8,CommentThread:()=>z8,DataTable:()=>E8,FileUploader:()=>M8,Footer:()=>V8,Header:()=>w8,Hero:()=>H8,IncidentTimeline:()=>F8,MakeTabLayout:()=>Y8,MarketingCTA:()=>J8,MarketingFeatures:()=>W8,MarketingHero:()=>K8,Modal:()=>I8,NavigationBar:()=>T8,NotificationCenter:()=>D8,Sidebar:()=>k8,UserProfileCard:()=>R8});function w8({logo:e,navigation:n,actions:o,sticky:l=!1,background:c,bordered:u=!0,style:f,className:p}){return r.jsxs("header",{className:p,style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 24px",backgroundColor:c||K.white,borderBottom:u?`1px solid ${K.gray[200]}`:void 0,...l&&{position:"sticky",top:0,zIndex:Hi.sticky,boxShadow:nl.sm},...f},children:[e&&r.jsx("div",{style:{flexShrink:0},children:e}),n&&r.jsx("nav",{style:{display:"flex",alignItems:"center",flex:1,marginLeft:"32px"},children:n}),o&&r.jsx("div",{style:{display:"flex",alignItems:"center",gap:"12px",flexShrink:0},children:o})]})}function D1({item:e,activeId:n,onItemClick:o,collapsed:l,depth:c=0}){const[u,f]=I.useState(!1),p=e.children&&e.children.length>0,g=n===e.id,h=()=>{p&&!l&&f(!u),o==null||o(e)};return r.jsxs("div",{children:[r.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:Jt.md,backgroundColor:g?K.primary[50]:"transparent",color:e.disabled?K.gray[400]:g?K.primary[700]:K.gray[700],fontSize:he.sm,fontWeight:g?Ue.medium:Ue.normal,textAlign:"left",cursor:e.disabled?"not-allowed":"pointer",transition:"all 0.15s",justifyContent:l?"center":"flex-start"},children:[e.icon&&r.jsx("span",{style:{display:"flex",flexShrink:0},children:e.icon}),!l&&r.jsxs(r.Fragment,{children:[r.jsx("span",{style:{flex:1},children:e.label}),e.badge&&r.jsx("span",{children:e.badge}),p&&r.jsx(xt,{name:u?"chevron-down":"chevron-right",size:14,tone:"subtle"})]})]}),p&&u&&!l&&r.jsx("div",{style:{marginTop:"4px"},children:e.children.map(y=>r.jsx(D1,{item:y,activeId:n,onItemClick:o,collapsed:l,depth:c+1},y.id))})]})}function k8({items:e,activeId:n,onItemClick:o,collapsed:l=!1,header:c,footer:u,width:f=256,collapsedWidth:p=64,style:g,className:h}){const y=l?p:f;return r.jsxs("aside",{className:h,style:{width:y,minWidth:y,height:"100%",display:"flex",flexDirection:"column",backgroundColor:K.white,borderRight:`1px solid ${K.gray[200]}`,transition:"width 0.2s",overflow:"hidden",...g},children:[c&&r.jsx("div",{style:{padding:l?"16px 8px":"16px",borderBottom:`1px solid ${K.gray[200]}`},children:c}),r.jsx("nav",{style:{flex:1,padding:"8px",overflowY:"auto",overflowX:"hidden"},children:r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"2px"},children:e.map(v=>r.jsx(D1,{item:v,activeId:n,onItemClick:o,collapsed:l},v.id))})}),u&&r.jsx("div",{style:{padding:l?"16px 8px":"16px",borderTop:`1px solid ${K.gray[200]}`},children:u})]})}function N8({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 r.jsx("div",{className:c,style:{display:"grid",gridTemplateColumns:u(),gap:`${o}px`,...l},children:e})}function U1({comment:e,onReply:n,onReaction:o,depth:l=0}){var y,v;const[c,u]=I.useState(!1),[f,p]=I.useState(""),g=()=>{f.trim()&&(n==null||n(e.id,f),p(""),u(!1))},h=e.timestamp instanceof Date?e.timestamp.toLocaleString():e.timestamp;return r.jsxs("div",{style:{marginLeft:l>0?"40px":0},children:[r.jsxs("div",{style:{display:"flex",gap:"12px"},children:[r.jsx(Li,{name:e.author.name,src:e.author.avatar,size:"sm"}),r.jsxs("div",{style:{flex:1},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[r.jsx("span",{style:{fontWeight:500,fontSize:he.sm},children:e.author.name}),r.jsx("span",{style:{color:K.gray[500],fontSize:he.xs},children:h})]}),r.jsx("p",{style:{margin:"4px 0 8px",fontSize:he.sm,color:K.gray[700]},children:e.content}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[(y=e.reactions)==null?void 0:y.map(S=>r.jsxs("button",{onClick:()=>o==null?void 0:o(e.id,S.emoji),style:{padding:"2px 8px",border:`1px solid ${K.gray[200]}`,borderRadius:"12px",backgroundColor:K.gray[50],fontSize:he.xs,cursor:"pointer"},children:[S.emoji," ",S.count]},S.emoji)),r.jsx("button",{onClick:()=>u(!c),style:{background:"none",border:"none",color:K.gray[500],fontSize:he.xs,cursor:"pointer"},children:"Reply"})]}),c&&r.jsxs("div",{style:{marginTop:"12px"},children:[r.jsx(Ff,{value:f,onChange:p,placeholder:"Write a reply...",rows:2}),r.jsxs("div",{style:{display:"flex",gap:"8px",marginTop:"8px"},children:[r.jsx(Xt,{size:"sm",onClick:g,children:"Reply"}),r.jsx(Xt,{size:"sm",variant:"ghost",onClick:()=>u(!1),children:"Cancel"})]})]})]})]}),(v=e.replies)==null?void 0:v.map(S=>r.jsx("div",{style:{marginTop:"16px"},children:r.jsx(U1,{comment:S,onReply:n,onReaction:o,depth:l+1})},S.id))]})}function z8({comments:e,currentUser:n,onAddComment:o,onReply:l,onReaction:c,loading:u,style:f,className:p}){const[g,h]=I.useState(""),y=()=>{g.trim()&&(o==null||o(g),h(""))};return r.jsxs("div",{className:p,style:{...f},children:[n&&r.jsxs("div",{style:{display:"flex",gap:"12px",marginBottom:"24px"},children:[r.jsx(Li,{name:n.name,src:n.avatar,size:"sm"}),r.jsxs("div",{style:{flex:1},children:[r.jsx(Ff,{value:g,onChange:h,placeholder:"Write a comment...",rows:3}),r.jsx("div",{style:{marginTop:"8px",display:"flex",justifyContent:"flex-end"},children:r.jsx(Xt,{onClick:y,disabled:!g.trim(),children:"Comment"})})]})]}),u?r.jsx("div",{style:{display:"flex",justifyContent:"center",padding:"24px"},children:r.jsx(Pa,{size:24})}):r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"20px"},children:e.map(v=>r.jsx(U1,{comment:v,onReply:l,onReaction:c},v.id))})]})}function E8({columns:e,data:n,rowKey:o="id",loading:l,emptyText:c="No data",onSort:u,sortKey:f,sortDirection:p,onRowClick:g,selectable:h,selectedKeys:y=[],onSelectionChange:v,style:S,className:N}){const x=(w,R)=>typeof o=="function"?o(w):String(w[o]??R),E=w=>{w?v==null||v(n.map((R,b)=>x(R,b))):v==null||v([])},z=(w,R)=>{R?v==null||v([...y,w]):v==null||v(y.filter(b=>b!==w))},k=n.length>0&&y.length===n.length,$=y.length>0&&y.length<n.length;return r.jsx("div",{className:N,style:{border:`1px solid ${K.gray[200]}`,borderRadius:"8px",overflow:"hidden",...S},children:r.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:he.sm},children:[r.jsx("thead",{children:r.jsxs("tr",{style:{backgroundColor:K.gray[50]},children:[h&&r.jsx("th",{style:{width:"40px",padding:"12px"},children:r.jsx(yc,{checked:k,indeterminate:$,onChange:E})}),e.map(w=>r.jsx("th",{style:{padding:"12px 16px",textAlign:w.align||"left",fontWeight:Ue.semibold,color:K.gray[700],borderBottom:`1px solid ${K.gray[200]}`,cursor:w.sortable?"pointer":void 0,width:w.width},onClick:()=>w.sortable&&(u==null?void 0:u(w.key,f===w.key&&p==="asc"?"desc":"asc")),children:r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[w.header,w.sortable&&f===w.key&&r.jsx(xt,{name:p==="asc"?"chevron-up":"chevron-down",size:14})]})},w.key))]})}),r.jsx("tbody",{children:l?r.jsx("tr",{children:r.jsx("td",{colSpan:e.length+(h?1:0),style:{padding:"48px",textAlign:"center"},children:r.jsx(Pa,{size:24})})}):n.length===0?r.jsx("tr",{children:r.jsx("td",{colSpan:e.length+(h?1:0),style:{padding:"48px",textAlign:"center",color:K.gray[500]},children:c})}):n.map((w,R)=>{const b=x(w,R),j=y.includes(b);return r.jsxs("tr",{onClick:()=>g==null?void 0:g(w,R),style:{backgroundColor:j?K.primary[50]:void 0,cursor:g?"pointer":void 0,transition:"background-color 0.15s"},children:[h&&r.jsx("td",{style:{padding:"12px"},children:r.jsx(yc,{checked:j,onChange:T=>z(b,T)})}),e.map(T=>r.jsx("td",{style:{padding:"12px 16px",textAlign:T.align||"left",color:K.gray[900],borderBottom:`1px solid ${K.gray[100]}`},children:T.render?T.render(w[T.key],w,R):String(w[T.key]??"")},T.key))]},b)})})]})})}function C8({messages:e,currentUserId:n,onSendMessage:o,loading:l,typing:c,placeholder:u="Type a message...",header:f,style:p,className:g}){const[h,y]=I.useState(""),v=I.useRef(null);I.useEffect(()=>{var x;(x=v.current)==null||x.scrollIntoView({behavior:"smooth"})},[e]);const S=()=>{h.trim()&&(o==null||o(h),y(""))},N=x=>{x.key==="Enter"&&!x.shiftKey&&(x.preventDefault(),S())};return r.jsxs("div",{className:g,style:{display:"flex",flexDirection:"column",height:"100%",border:`1px solid ${K.gray[200]}`,borderRadius:Jt.lg,backgroundColor:K.white,overflow:"hidden",...p},children:[f&&r.jsx("div",{style:{padding:"12px 16px",borderBottom:`1px solid ${K.gray[200]}`},children:f}),r.jsxs("div",{style:{flex:1,padding:"16px",overflowY:"auto",display:"flex",flexDirection:"column",gap:"12px"},children:[l?r.jsx("div",{style:{display:"flex",justifyContent:"center",padding:"24px"},children:r.jsx(Pa,{size:24})}):e.map(x=>{const E=x.sender.id===n,z=x.timestamp instanceof Date?x.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):x.timestamp;return r.jsxs("div",{style:{display:"flex",flexDirection:E?"row-reverse":"row",alignItems:"flex-end",gap:"8px"},children:[!E&&r.jsx(Li,{name:x.sender.name,src:x.sender.avatar,size:"xs"}),r.jsxs("div",{style:{maxWidth:"70%",padding:"10px 14px",borderRadius:Jt.lg,backgroundColor:E?K.primary[600]:K.gray[100],color:E?K.white:K.gray[900]},children:[r.jsx("p",{style:{margin:0,fontSize:he.sm},children:x.content}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px",marginTop:"4px",fontSize:he.xs,opacity:.7},children:[r.jsx("span",{children:z}),E&&x.status&&r.jsxs("span",{children:[x.status==="sending"&&"•",x.status==="sent"&&"✓",x.status==="delivered"&&"✓✓",x.status==="read"&&"✓✓",x.status==="error"&&"!"]})]})]})]},x.id)}),c&&r.jsx("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:r.jsxs("span",{style:{fontSize:he.xs,color:K.gray[500]},children:[c.name," is typing..."]})}),r.jsx("div",{ref:v})]}),r.jsxs("div",{style:{padding:"12px 16px",borderTop:`1px solid ${K.gray[200]}`,display:"flex",gap:"8px"},children:[r.jsx("input",{type:"text",value:h,onChange:x=>y(x.target.value),onKeyDown:N,placeholder:u,style:{flex:1,padding:"10px 14px",border:`1px solid ${K.gray[300]}`,borderRadius:Jt.full,fontSize:he.sm,outline:"none"}}),r.jsx(Xt,{onClick:S,disabled:!h.trim(),children:r.jsx(xt,{name:"chevron-right",size:18})})]})]})}function T8({items:e,activeId:n,onItemClick:o,orientation:l="horizontal",variant:c="default",style:u,className:f}){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:he.sm,cursor:g.disabled?"not-allowed":"pointer",opacity:g.disabled?.5:1,transition:"all 0.15s",textDecoration:"none",color:"inherit"},v={default:{fontWeight:h?Ue.medium:Ue.normal,color:h?K.primary[600]:K.gray[600]},pills:{borderRadius:Jt.full,backgroundColor:h?K.primary[100]:"transparent",color:h?K.primary[700]:K.gray[600],fontWeight:h?Ue.medium:Ue.normal},underline:{borderBottom:h?`2px solid ${K.primary[600]}`:"2px solid transparent",color:h?K.primary[600]:K.gray[600],fontWeight:h?Ue.medium:Ue.normal,borderRadius:0}},S=()=>{g.disabled||o==null||o(g)},N=r.jsxs(r.Fragment,{children:[g.icon&&r.jsx("span",{style:{display:"flex"},children:g.icon}),r.jsx("span",{children:g.label})]});return g.href?r.jsx("a",{href:g.href,onClick:x=>{x.preventDefault(),S()},style:{...y,...v[c]},children:N},g.id):r.jsx("button",{onClick:S,disabled:g.disabled,style:{...y,...v[c]},children:N},g.id)};return r.jsx("nav",{className:f,style:{display:"flex",flexDirection:l==="horizontal"?"row":"column",gap:l==="horizontal"?"4px":"2px",...c==="underline"&&l==="horizontal"&&{borderBottom:`1px solid ${K.gray[200]}`},...u},children:e.map(p)})}function Vy(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 M8({files:e=[],onFilesSelected:n,onFileRemove:o,accept:l,multiple:c=!0,maxSize:u,maxFiles:f,disabled:p,dragDrop:g=!0,style:h,className:y}){const[v,S]=I.useState(!1),N=I.useRef(null),x=$=>{if(!$)return;let w=Array.from($);f&&(w=w.slice(0,f-e.length)),u&&(w=w.filter(R=>R.size<=u)),n==null||n(w)},E=$=>{$.preventDefault(),S(!1),!p&&g&&x($.dataTransfer.files)},z=$=>{$.preventDefault(),!p&&g&&S(!0)},k=()=>{S(!1)};return r.jsxs("div",{className:y,style:{...h},children:[r.jsxs("div",{onClick:()=>{var $;return!p&&(($=N.current)==null?void 0:$.click())},onDrop:E,onDragOver:z,onDragLeave:k,style:{border:`2px dashed ${v?K.primary[400]:K.gray[300]}`,borderRadius:Jt.lg,padding:"32px",textAlign:"center",backgroundColor:v?K.primary[50]:K.gray[50],cursor:p?"not-allowed":"pointer",transition:"all 0.2s",opacity:p?.5:1},children:[r.jsx("input",{ref:N,type:"file",accept:l,multiple:c,onChange:$=>x($.target.files),disabled:p,style:{display:"none"}}),r.jsx(xt,{name:"plus",size:32,tone:"subtle"}),r.jsx("p",{style:{margin:"12px 0 4px",color:K.gray[700],fontSize:he.sm},children:g?"Drag and drop files here, or click to browse":"Click to browse files"}),r.jsxs("p",{style:{margin:0,color:K.gray[500],fontSize:he.xs},children:[l&&`Accepted: ${l}`,u&&` • Max size: ${Vy(u)}`,f&&` • Max files: ${f}`]})]}),e.length>0&&r.jsx("div",{style:{marginTop:"16px",display:"flex",flexDirection:"column",gap:"8px"},children:e.map($=>r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",padding:"12px",border:`1px solid ${K.gray[200]}`,borderRadius:Jt.md,backgroundColor:K.white},children:[r.jsx(xt,{name:"menu",size:20,tone:"subtle"}),r.jsxs("div",{style:{flex:1,minWidth:0},children:[r.jsx("p",{style:{margin:0,fontSize:he.sm,color:K.gray[900],whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:$.name}),r.jsxs("p",{style:{margin:"2px 0 0",fontSize:he.xs,color:K.gray[500]},children:[Vy($.size),$.error&&r.jsx("span",{style:{color:K.error[500],marginLeft:"8px"},children:$.error})]}),$.status==="uploading"&&$.progress!==void 0&&r.jsx(T1,{value:$.progress,size:"sm",style:{marginTop:"8px"}})]}),r.jsx(Xt,{variant:"ghost",size:"sm",onClick:()=>o==null?void 0:o($.id),children:r.jsx(xt,{name:"x",size:16})})]},$.id))})]})}function R8({name:e,subtitle:n,avatar:o,coverImage:l,bio:c,stats:u,actions:f,compact:p,style:g,className:h}){return p?r.jsx(Qo,{className:h,style:{padding:"16px",...g},children:r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[r.jsx(Li,{name:e,src:o,size:"md"}),r.jsxs("div",{style:{flex:1,minWidth:0},children:[r.jsx("p",{style:{margin:0,fontWeight:Ue.semibold,color:K.gray[900],fontSize:he.sm},children:e}),n&&r.jsx("p",{style:{margin:"2px 0 0",color:K.gray[500],fontSize:he.xs},children:n})]}),f]})}):r.jsxs(Qo,{className:h,style:{padding:0,overflow:"hidden",...g},children:[l&&r.jsx("div",{style:{height:"120px",backgroundImage:`url(${l})`,backgroundSize:"cover",backgroundPosition:"center"}}),r.jsxs("div",{style:{padding:"16px",paddingTop:l?"0":"16px",textAlign:"center"},children:[r.jsx("div",{style:{marginTop:l?"-40px":"0",marginBottom:"12px"},children:r.jsx(Li,{name:e,src:o,size:"xl",style:{border:`4px solid ${K.white}`,margin:"0 auto"}})}),r.jsx("p",{style:{margin:0,fontWeight:Ue.semibold,color:K.gray[900],fontSize:he.lg},children:e}),n&&r.jsx("p",{style:{margin:"4px 0 0",color:K.gray[500],fontSize:he.sm},children:n}),c&&r.jsx("p",{style:{margin:"12px 0 0",color:K.gray[600],fontSize:he.sm,lineHeight:1.5},children:c}),u&&u.length>0&&r.jsx("div",{style:{display:"flex",justifyContent:"center",gap:"24px",marginTop:"16px",paddingTop:"16px",borderTop:`1px solid ${K.gray[200]}`},children:u.map((y,v)=>r.jsxs("div",{style:{textAlign:"center"},children:[r.jsx("p",{style:{margin:0,fontWeight:Ue.semibold,color:K.gray[900],fontSize:he.lg},children:y.value}),r.jsx("p",{style:{margin:"2px 0 0",color:K.gray[500],fontSize:he.xs},children:y.label})]},v))}),f&&r.jsx("div",{style:{marginTop:"16px",display:"flex",justifyContent:"center",gap:"8px"},children:f})]})]})}var O8={info:K.info[500],success:K.success[500],warning:K.warning[500],error:K.error[500]};function A8({notification:e,onMarkAsRead:n,onDismiss:o}){const l=e.timestamp instanceof Date?e.timestamp.toLocaleString():e.timestamp,c=O8[e.type||"info"];return r.jsxs("div",{style:{display:"flex",gap:"12px",padding:"12px",backgroundColor:e.read?"transparent":K.primary[50],borderRadius:Jt.md,transition:"background-color 0.15s"},children:[r.jsx("div",{style:{width:"8px",height:"8px",borderRadius:"50%",backgroundColor:e.read?"transparent":c,flexShrink:0,marginTop:"6px"}}),r.jsxs("div",{style:{flex:1,minWidth:0},children:[r.jsxs("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:"8px"},children:[r.jsx("p",{style:{margin:0,fontWeight:Ue.medium,color:K.gray[900],fontSize:he.sm},children:e.title}),r.jsx("button",{onClick:()=>o==null?void 0:o(e.id),style:{background:"none",border:"none",padding:"2px",cursor:"pointer",color:K.gray[400],flexShrink:0},children:r.jsx(xt,{name:"x",size:14})})]}),e.message&&r.jsx("p",{style:{margin:"4px 0 0",color:K.gray[600],fontSize:he.xs},children:e.message}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",marginTop:"8px"},children:[r.jsx("span",{style:{color:K.gray[400],fontSize:he.xs},children:l}),!e.read&&r.jsx("button",{onClick:()=>n==null?void 0:n(e.id),style:{background:"none",border:"none",padding:0,color:K.primary[600],fontSize:he.xs,cursor:"pointer"},children:"Mark as read"}),e.action&&r.jsx("button",{onClick:e.action.onClick,style:{background:"none",border:"none",padding:0,color:K.primary[600],fontSize:he.xs,cursor:"pointer"},children:e.action.label})]})]})]})}function D8({notifications:e,onMarkAsRead:n,onMarkAllAsRead:o,onDismiss:l,onClearAll:c,emptyText:u="No notifications",loading:f,style:p,className:g}){const h=e.filter(y=>!y.read).length;return r.jsxs("div",{className:g,style:{display:"flex",flexDirection:"column",...p},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",borderBottom:`1px solid ${K.gray[200]}`},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[r.jsx("span",{style:{fontWeight:Ue.semibold,color:K.gray[900]},children:"Notifications"}),h>0&&r.jsx("span",{style:{padding:"2px 8px",borderRadius:"12px",backgroundColor:K.primary[100],color:K.primary[700],fontSize:he.xs,fontWeight:Ue.medium},children:h})]}),r.jsxs("div",{style:{display:"flex",gap:"8px"},children:[h>0&&r.jsx(Xt,{variant:"ghost",size:"sm",onClick:o,children:"Mark all read"}),e.length>0&&r.jsx(Xt,{variant:"ghost",size:"sm",onClick:c,children:"Clear all"})]})]}),r.jsx("div",{style:{flex:1,overflowY:"auto",padding:"8px"},children:f?r.jsx("div",{style:{display:"flex",justifyContent:"center",padding:"32px"},children:r.jsx(Pa,{size:24})}):e.length===0?r.jsx("div",{style:{textAlign:"center",padding:"32px",color:K.gray[500]},children:u}):r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:e.map(y=>r.jsx(A8,{notification:y,onMarkAsRead:n,onDismiss:l},y.id))})})]})}var U8={sm:"400px",md:"500px",lg:"640px",xl:"800px",full:"100vw"};function I8({open:e,onClose:n,title:o,children:l,footer:c,size:u="md",closeOnOverlayClick:f=!0,closeOnEscape:p=!0,showCloseButton:g=!0,style:h,className:y}){const v=I.useCallback(x=>{x.key==="Escape"&&p&&n()},[p,n]);if(I.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 S=x=>{x.target===x.currentTarget&&f&&n()},N=u==="full";return r.jsxs("div",{style:{position:"fixed",inset:0,zIndex:Hi.modal,display:"flex",alignItems:N?"stretch":"center",justifyContent:"center",padding:N?0:"24px"},children:[r.jsx("div",{onClick:S,style:{position:"absolute",inset:0,backgroundColor:"rgba(0, 0, 0, 0.5)",animation:_f.fadeIn}}),r.jsxs("div",{role:"dialog","aria-modal":"true",className:y,style:{position:"relative",width:U8[u],maxWidth:N?"100%":"calc(100vw - 48px)",maxHeight:N?"100%":"calc(100vh - 48px)",backgroundColor:K.white,borderRadius:N?0:Jt.xl,boxShadow:nl["2xl"],display:"flex",flexDirection:"column",overflow:"hidden",animation:_f.scaleIn,...h},children:[(o||g)&&r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px 20px",borderBottom:`1px solid ${K.gray[200]}`},children:[o&&r.jsx(Cc,{level:4,children:o}),g&&r.jsx(Xt,{variant:"ghost",size:"sm",onClick:n,"aria-label":"Close modal",style:{marginLeft:"auto"},children:r.jsx(xt,{name:"x",size:20})})]}),r.jsx("div",{style:{flex:1,padding:"20px",overflowY:"auto"},children:l}),c&&r.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:"8px",padding:"16px 20px",borderTop:`1px solid ${K.gray[200]}`},children:c})]})]})}function L8({open:e,onClose:n,commands:o,onSelect:l,placeholder:c="Search commands...",recentIds:u=[],loading:f,style:p,className:g}){const[h,y]=I.useState(""),[v,S]=I.useState(0),N=I.useMemo(()=>{const k=h?o.filter(w=>{var R;return w.label.toLowerCase().includes(h.toLowerCase())||((R=w.description)==null?void 0:R.toLowerCase().includes(h.toLowerCase()))}):o,$=new Map;if(!h&&u.length>0){const w=u.map(R=>o.find(b=>b.id===R)).filter(Boolean);w.length>0&&$.set("Recent",w)}return k.forEach(w=>{const R=w.group||"Commands";$.has(R)||$.set(R,[]),!(!h&&u.includes(w.id)&&$.has("Recent"))&&$.get(R).push(w)}),$},[o,h,u]),x=I.useMemo(()=>{const k=[];return N.forEach($=>k.push(...$)),k},[N]);I.useEffect(()=>{S(0)},[h]),I.useEffect(()=>{e&&(y(""),S(0))},[e]);const E=I.useCallback(k=>{if(k.key==="Escape"){n();return}if(k.key==="ArrowDown")k.preventDefault(),S($=>Math.min($+1,x.length-1));else if(k.key==="ArrowUp")k.preventDefault(),S($=>Math.max($-1,0));else if(k.key==="Enter"){k.preventDefault();const $=x[v];$&&!$.disabled&&(l($),n())}},[x,v,l,n]);if(I.useEffect(()=>{if(e)return document.addEventListener("keydown",E),()=>document.removeEventListener("keydown",E)},[e,E]),!e)return null;let z=0;return r.jsxs("div",{style:{position:"fixed",inset:0,zIndex:Hi.modal,display:"flex",alignItems:"flex-start",justifyContent:"center",paddingTop:"15vh"},children:[r.jsx("div",{onClick:n,style:{position:"absolute",inset:0,backgroundColor:"rgba(0, 0, 0, 0.5)"}}),r.jsxs("div",{role:"dialog",className:g,style:{position:"relative",width:"560px",maxWidth:"calc(100vw - 48px)",maxHeight:"60vh",backgroundColor:K.white,borderRadius:Jt.xl,boxShadow:nl["2xl"],overflow:"hidden",display:"flex",flexDirection:"column",...p},children:[r.jsx("div",{style:{padding:"12px",borderBottom:`1px solid ${K.gray[200]}`},children:r.jsxs("div",{style:{position:"relative"},children:[r.jsx(xt,{name:"search",size:18,tone:"subtle",style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)"}}),r.jsx("input",{type:"text",value:h,onChange:k=>y(k.target.value),placeholder:c,autoFocus:!0,style:{width:"100%",padding:"12px 12px 12px 42px",border:"none",fontSize:he.base,outline:"none",backgroundColor:"transparent"}})]})}),r.jsx("div",{style:{flex:1,overflowY:"auto",padding:"8px"},children:f?r.jsx("div",{style:{display:"flex",justifyContent:"center",padding:"32px"},children:r.jsx(Pa,{size:24})}):x.length===0?r.jsx("div",{style:{textAlign:"center",padding:"32px",color:K.gray[500]},children:"No commands found"}):Array.from(N.entries()).map(([k,$])=>r.jsxs("div",{style:{marginBottom:"8px"},children:[r.jsx("div",{style:{padding:"8px 12px",fontSize:he.xs,fontWeight:Ue.semibold,color:K.gray[500],textTransform:"uppercase",letterSpacing:"0.05em"},children:k}),$.map(w=>{const b=z++===v;return r.jsxs("button",{onClick:()=>{w.disabled||(l(w),n())},disabled:w.disabled,style:{display:"flex",alignItems:"center",gap:"12px",width:"100%",padding:"10px 12px",border:"none",borderRadius:Jt.md,backgroundColor:b?K.gray[100]:"transparent",color:w.disabled?K.gray[400]:K.gray[900],textAlign:"left",cursor:w.disabled?"not-allowed":"pointer"},children:[w.icon&&r.jsx("span",{style:{display:"flex",color:K.gray[500]},children:w.icon}),r.jsxs("div",{style:{flex:1},children:[r.jsx("div",{style:{fontSize:he.sm},children:w.label}),w.description&&r.jsx("div",{style:{fontSize:he.xs,color:K.gray[500]},children:w.description})]}),w.shortcut&&r.jsx("kbd",{style:{padding:"2px 6px",backgroundColor:K.gray[100],borderRadius:Jt.sm,fontSize:he.xs,color:K.gray[500],fontFamily:"inherit"},children:w.shortcut})]},w.id)})]},k))}),r.jsxs("div",{style:{padding:"8px 12px",borderTop:`1px solid ${K.gray[200]}`,display:"flex",alignItems:"center",gap:"16px",fontSize:he.xs,color:K.gray[500]},children:[r.jsx("span",{children:"↑↓ Navigate"}),r.jsx("span",{children:"↵ Select"}),r.jsx("span",{children:"Esc Close"})]})]})]})}function V8({brand:e,columns:n,socialLinks:o,bottomText:l,bottomLinks:c,background:u,bordered:f=!0,style:p,className:g}){return r.jsxs("footer",{className:g,role:"contentinfo",style:{backgroundColor:u||K.gray[50],borderTop:f?`1px solid ${K.gray[200]}`:void 0,...p},children:[r.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"48px",padding:"48px 24px",maxWidth:"1280px",margin:"0 auto"},children:[e&&r.jsx("div",{style:{flex:"1 1 280px",minWidth:"200px"},children:e}),n==null?void 0:n.map((h,y)=>r.jsxs("div",{style:{flex:"0 1 180px",minWidth:"140px"},children:[h.title&&r.jsx("h4",{style:{fontSize:he.sm,fontWeight:Ue.semibold,color:K.gray[900],lineHeight:Nt.normal,margin:"0 0 16px 0",padding:0},children:h.title}),r.jsx("ul",{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",gap:"10px"},children:h.links.map((v,S)=>r.jsx("li",{children:r.jsx("a",{href:v.href,onClick:v.onClick?N=>{var x;N.preventDefault(),(x=v.onClick)==null||x.call(v)}:void 0,style:{fontSize:he.sm,color:K.gray[600],textDecoration:"none",transition:"color 0.15s",lineHeight:Nt.normal},"aria-label":v.label,children:v.label})},S))})]},y))]}),(l||c||o)&&r.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 ${K.gray[200]}`},children:[l&&r.jsx("span",{style:{fontSize:he.sm,color:K.gray[500],lineHeight:Nt.normal},children:l}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"20px"},children:[o==null?void 0:o.map((h,y)=>r.jsx("a",{href:h.href,"aria-label":h.label,style:{display:"flex",alignItems:"center",justifyContent:"center",color:K.gray[500],transition:"color 0.15s"},children:h.icon},y)),c==null?void 0:c.map((h,y)=>r.jsx("a",{href:h.href,onClick:h.onClick?v=>{var S;v.preventDefault(),(S=h.onClick)==null||S.call(h)}:void 0,style:{fontSize:he.sm,color:K.gray[500],textDecoration:"none",transition:"color 0.15s"},children:h.label},y))]})]})]})}function H8({heading:e,description:n,primaryAction:o,secondaryAction:l,media:c,align:u="center",size:f="md",background:p,backgroundImage:g,overlay:h=!1,style:y,className:v}){const S={sm:{padding:"48px 24px",headingSize:he["3xl"],descSize:he.lg},md:{padding:"80px 24px",headingSize:he["4xl"],descSize:he.xl},lg:{padding:"120px 24px",headingSize:he["5xl"],descSize:he.xl}},N=S[f]||S.md,x=!!g,E=x&&h;return r.jsxs("section",{className:v,style:{position:"relative",backgroundColor:p||(x?void 0:K.white),...x&&{backgroundImage:`url(${g})`,backgroundSize:"cover",backgroundPosition:"center"},overflow:"hidden",...y},children:[E&&r.jsx("div",{"aria-hidden":"true",style:{position:"absolute",inset:0,backgroundColor:"rgba(0, 0, 0, 0.5)"}}),r.jsxs("div",{style:{position:"relative",maxWidth:"1280px",margin:"0 auto",padding:N.padding,display:"flex",flexDirection:u==="center"?"column":"row",alignItems:"center",gap:"48px",textAlign:u==="center"?"center":"left"},children:[r.jsxs("div",{style:{flex:u==="left"&&c?"1 1 50%":void 0,maxWidth:u==="center"?"800px":void 0},children:[e&&r.jsx("h1",{style:{fontSize:N.headingSize,fontWeight:Ue.bold,lineHeight:Nt.tight,letterSpacing:Kn.tight,color:E?K.white:K.gray[900],margin:"0 0 16px 0",padding:0},children:e}),n&&r.jsx("p",{style:{fontSize:N.descSize,lineHeight:Nt.relaxed,color:E?"rgba(255,255,255,0.9)":K.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)&&r.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"12px",justifyContent:u==="center"?"center":"flex-start"},children:[o&&r.jsx("button",{onClick:o.onClick,style:{padding:"12px 28px",fontSize:he.base,fontWeight:Ue.semibold,color:K.white,backgroundColor:K.primary[600],border:"none",borderRadius:"8px",cursor:"pointer",transition:"background-color 0.15s",lineHeight:Nt.normal},children:o.label}),l&&r.jsx("button",{onClick:l.onClick,style:{padding:"12px 28px",fontSize:he.base,fontWeight:Ue.semibold,color:E?K.white:K.gray[700],backgroundColor:"transparent",border:`1px solid ${E?"rgba(255,255,255,0.3)":K.gray[300]}`,borderRadius:"8px",cursor:"pointer",transition:"all 0.15s",lineHeight:Nt.normal},children:l.label})]})]}),c&&r.jsx("div",{style:{flex:u==="left"?"1 1 50%":void 0,display:"flex",justifyContent:"center",alignItems:"center",...u==="center"&&{marginTop:"16px"}},children:c})]})]})}var I1={minor:{bg:"var(--ggui-color-warning-50, #fffbeb)",text:"var(--ggui-color-warning-700, #b45309)",dot:"var(--ggui-color-warning-500, #f59e0b)"},major:{bg:"var(--ggui-color-error-50, #fef2f2)",text:"var(--ggui-color-error-700, #b91c1c)",dot:"var(--ggui-color-error-500, #ef4444)"},critical:{bg:"var(--ggui-color-error-100, #fee2e2)",text:"var(--ggui-color-error-800, #991b1b)",dot:"var(--ggui-color-error-700, #b91c1c)"}},L1={investigating:"Investigating",identified:"Identified",monitoring:"Monitoring",resolved:"Resolved"};function Hy(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function pf(e){return e.toLocaleDateString("en-US",{month:"short",day:"numeric"})}function B8(e){return new Date(e).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"})}function q8(e){return e.some(n=>n.severity==="critical")?"critical":e.some(n=>n.severity==="major")?"major":e.some(n=>n.severity==="minor")?"minor":null}function By({severity:e}){const o={width:"12px",height:"12px",borderRadius:"var(--ggui-shape-radius-sm, 4px)",backgroundColor:e?I1[e].dot:"var(--ggui-color-success-500, #22c55e)",flexShrink:0};return r.jsx("div",{style:o})}function P8({severity:e}){const n=I1[e],o={display:"inline-flex",alignItems:"center",gap:"4px",fontSize:"var(--ggui-font-size-xs, 12px)",fontWeight:500,padding:"2px 8px",borderRadius:"var(--ggui-shape-radius-full, 9999px)",backgroundColor:n.bg,color:n.text,textTransform:"capitalize"};return r.jsx("span",{style:o,children:e})}function Z8({status:e}){const n=e==="resolved",o={fontSize:"var(--ggui-font-size-xs, 12px)",color:n?"var(--ggui-color-success-600, #16a34a)":"var(--ggui-color-onSurfaceVariant, #52525b)",fontWeight:n?500:400};return r.jsx("span",{style:o,children:L1[e]})}function G8({incident:e,compact:n}){const[o,l]=I.useState(!1),c={border:"1px solid var(--ggui-color-outlineVariant, #e4e4e7)",borderRadius:"var(--ggui-shape-radius-md, 8px)",overflow:"hidden",backgroundColor:"var(--ggui-color-surface, #ffffff)"},u={display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",cursor:n?"default":"pointer",gap:"8px"},f={fontSize:"var(--ggui-font-size-sm, 14px)",fontWeight:500,color:"var(--ggui-color-onSurface, #18181b)",margin:0,flex:1,minWidth:0};return r.jsxs("div",{style:c,children:[r.jsxs("div",{style:u,onClick:n?void 0:()=>l(!o),role:n?void 0:"button",tabIndex:n?void 0:0,onKeyDown:n?void 0:p=>{(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),l(!o))},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",flex:1,minWidth:0},children:[r.jsx(P8,{severity:e.severity}),r.jsx("p",{style:f,children:e.title})]}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",flexShrink:0},children:[r.jsx(Z8,{status:e.status}),!n&&r.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--ggui-color-outline, #d4d4d8)",strokeWidth:"2",style:{transform:o?"rotate(180deg)":"none",transition:"transform 200ms cubic-bezier(0.4, 0, 0.2, 1)"},children:r.jsx("path",{d:"M6 9l6 6 6-6"})})]})]}),e.affectedServices&&e.affectedServices.length>0&&r.jsx("div",{style:{padding:"0 16px 8px",display:"flex",gap:"4px",flexWrap:"wrap"},children:e.affectedServices.map(p=>r.jsx("span",{style:{fontSize:"11px",padding:"1px 6px",borderRadius:"var(--ggui-shape-radius-sm, 4px)",backgroundColor:"var(--ggui-color-surfaceVariant, #f4f4f5)",color:"var(--ggui-color-onSurfaceVariant, #52525b)"},children:p},p))}),!n&&o&&e.updates.length>0&&r.jsx("div",{style:{borderTop:"1px solid var(--ggui-color-outlineVariant, #e4e4e7)",padding:"12px 16px"},children:r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:e.updates.map(p=>r.jsxs("div",{style:{display:"flex",gap:"8px",fontSize:"12px"},children:[r.jsx("span",{style:{color:"var(--ggui-color-outline, #d4d4d8)",flexShrink:0,fontVariantNumeric:"tabular-nums"},children:B8(p.timestamp)}),r.jsx("span",{style:{fontWeight:500,color:"var(--ggui-color-onSurfaceVariant, #52525b)",flexShrink:0,textTransform:"capitalize"},children:L1[p.status]}),r.jsx("span",{style:{color:"var(--ggui-color-onSurface, #18181b)"},children:p.message})]},p.id))})})]})}function F8({incidents:e,days:n=14,emptyText:o="All systems operational",compact:l=!1,style:c,className:u}){var y;const f=new Date,p=[];for(let v=0;v<n;v++){const S=new Date(f);S.setDate(S.getDate()-v);const N=Hy(S),x=e.filter(E=>{const z=new Date(E.createdAt);return Hy(z)===N});p.push({date:S,key:N,incidents:x})}const g=e.length>0,h={fontFamily:"var(--ggui-font-family-sans, Inter, system-ui, sans-serif)",...c};return r.jsxs("div",{style:h,className:u,children:[r.jsxs("div",{style:{marginBottom:"24px"},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"8px"},children:[r.jsxs("span",{style:{fontSize:"var(--ggui-font-size-sm, 14px)",fontWeight:500,color:"var(--ggui-color-onSurface, #18181b)"},children:[n,"-Day History"]}),!g&&r.jsxs("span",{style:{fontSize:"var(--ggui-font-size-xs, 12px)",color:"var(--ggui-color-success-600, #16a34a)",display:"flex",alignItems:"center",gap:"4px"},children:[r.jsx(By,{severity:null}),o]})]}),r.jsx("div",{style:{display:"flex",gap:"3px",flexDirection:"row-reverse",justifyContent:"flex-end"},children:p.map(v=>{const S=q8(v.incidents);return r.jsx("div",{title:`${pf(v.date)}: ${v.incidents.length===0?"No incidents":`${v.incidents.length} incident(s)`}`,children:r.jsx(By,{severity:S})},v.key)})}),r.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginTop:"4px",fontSize:"10px",color:"var(--ggui-color-outline, #d4d4d8)"},children:[r.jsx("span",{children:pf(((y=p[p.length-1])==null?void 0:y.date)??f)}),r.jsx("span",{children:"Today"})]})]}),g&&r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:p.filter(v=>v.incidents.length>0).map(v=>r.jsxs("div",{children:[r.jsx("div",{style:{fontSize:"var(--ggui-font-size-xs, 12px)",fontWeight:500,color:"var(--ggui-color-onSurfaceVariant, #52525b)",marginBottom:"8px",textTransform:"uppercase",letterSpacing:"0.05em"},children:pf(v.date)}),r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:v.incidents.map(S=>r.jsx(G8,{incident:S,compact:l},S.id))})]},v.key))})]})}function Y8({chat:e,canvas:n,chatWidth:o="400px",style:l,className:c}){return r.jsxs("div",{className:c,style:{display:"flex",height:"100%",minHeight:0,...l},children:[r.jsx("div",{style:{width:o,minWidth:"320px",maxWidth:"50%",flexShrink:0,borderRight:"1px solid var(--ggui-color-outlineVariant, #e4e4e7)",display:"flex",flexDirection:"column",overflow:"hidden"},children:e}),r.jsx("div",{style:{flex:1,minWidth:0,display:"flex",flexDirection:"column",overflow:"hidden"},children:n})]})}function K8({headline:e,subheadline:n,primaryAction:o,secondaryAction:l,variant:c="default",media:u,style:f,className:p}){const g={default:{backgroundColor:"var(--ggui-color-surface, #ffffff)"},gradient:{background:"linear-gradient(135deg, var(--ggui-color-primary-50, #f0f9ff) 0%, var(--ggui-color-surface, #ffffff) 50%, var(--ggui-color-primary-100, #e0f2fe) 100%)"},pattern:{backgroundColor:"var(--ggui-color-primary-900, #0c4a6e)",backgroundImage:"radial-gradient(circle at 20% 50%, rgba(255,255,255,0.08) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgba(255,255,255,0.06) 0%, transparent 40%)"}},h=c==="pattern";return r.jsx("section",{className:p,style:{position:"relative",overflow:"hidden",...g[c],...f},children:r.jsxs("div",{style:{maxWidth:"1280px",margin:"0 auto",padding:"96px 24px",display:"flex",alignItems:"center",gap:"64px",flexWrap:"wrap"},children:[r.jsxs("div",{style:{flex:"1 1 480px",minWidth:0},children:[r.jsx("h1",{style:{fontSize:"var(--ggui-font-size-5xl, 48px)",fontWeight:"var(--ggui-font-weight-bold, 700)",lineHeight:1.1,letterSpacing:"-0.025em",color:h?"#ffffff":"var(--ggui-color-onSurface, #18181b)",margin:"0 0 24px 0"},children:e}),n&&r.jsx("p",{style:{fontSize:"var(--ggui-font-size-xl, 20px)",lineHeight:1.6,color:h?"rgba(255, 255, 255, 0.85)":"var(--ggui-color-onSurfaceVariant, #52525b)",margin:"0 0 40px 0",maxWidth:"560px"},children:n}),(o||l)&&r.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"16px"},children:[o&&r.jsx(qy,{action:o,variant:"primary",dark:h}),l&&r.jsx(qy,{action:l,variant:"secondary",dark:h})]})]}),u&&r.jsx("div",{style:{flex:"1 1 400px",display:"flex",justifyContent:"center",alignItems:"center",minWidth:0},children:u})]})})}function qy({action:e,variant:n,dark:o}){const p={...{display:"inline-flex",alignItems:"center",justifyContent:"center",padding:"14px 32px",fontSize:"var(--ggui-font-size-lg, 18px)",fontWeight:600,borderRadius:"var(--ggui-shape-radius-lg, 12px)",cursor:"pointer",transition:"all 0.2s ease",textDecoration:"none",border:"none",lineHeight:"1.5"},...n==="primary"?o?{backgroundColor:"#ffffff",color:"var(--ggui-color-primary-900, #0c4a6e)"}:{backgroundColor:"var(--ggui-color-primary-600, #0284c7)",color:"#ffffff"}:o?{backgroundColor:"transparent",color:"#ffffff",border:"2px solid rgba(255, 255, 255, 0.3)"}:{backgroundColor:"transparent",color:"var(--ggui-color-onSurface, #18181b)",border:"2px solid var(--ggui-color-outline, #d4d4d8)"}};return e.href?r.jsx("a",{href:e.href,onClick:e.onClick,style:p,role:"button",children:e.label}):r.jsx("button",{type:"button",onClick:e.onClick,style:p,children:e.label})}function W8({heading:e,subheading:n,features:o,columns:l=3,style:c,className:u}){return r.jsxs("section",{className:u,style:{backgroundColor:"var(--ggui-color-surface, #ffffff)",...c},children:[r.jsxs("div",{style:{maxWidth:"1280px",margin:"0 auto",padding:"80px 24px"},children:[(e||n)&&r.jsxs("div",{style:{textAlign:"center",marginBottom:"64px"},children:[e&&r.jsx("h2",{style:{fontSize:"var(--ggui-font-size-3xl, 30px)",fontWeight:"var(--ggui-font-weight-bold, 700)",lineHeight:1.2,color:"var(--ggui-color-onSurface, #18181b)",margin:"0 0 16px 0"},children:e}),n&&r.jsx("p",{style:{fontSize:"var(--ggui-font-size-lg, 18px)",lineHeight:1.6,color:"var(--ggui-color-onSurfaceVariant, #52525b)",margin:0,maxWidth:"640px",marginLeft:"auto",marginRight:"auto"},children:n})]}),r.jsx("div",{className:"ggui-features-grid",style:{display:"grid",gridTemplateColumns:`repeat(${l}, 1fr)`,gap:"32px"},children:o.map((f,p)=>r.jsx(X8,{feature:f},p))})]}),r.jsx("style",{children:`
135
+ @media (max-width: 768px) {
136
+ .ggui-features-grid {
137
+ grid-template-columns: 1fr !important;
138
+ }
139
+ }
140
+ `})]})}function X8({feature:e}){return r.jsxs("div",{style:{padding:"var(--ggui-spacing-6, 24px)",borderRadius:"var(--ggui-shape-radius-xl, 16px)",backgroundColor:"var(--ggui-color-surface, #ffffff)",border:"1px solid var(--ggui-color-outlineVariant, #e4e4e7)",transition:"box-shadow 0.2s ease, transform 0.2s ease",cursor:"default"},onMouseEnter:n=>{n.currentTarget.style.boxShadow="var(--ggui-shape-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1))",n.currentTarget.style.transform="translateY(-2px)"},onMouseLeave:n=>{n.currentTarget.style.boxShadow="none",n.currentTarget.style.transform="translateY(0)"},children:[e.icon&&r.jsx("div",{style:{fontSize:"32px",marginBottom:"var(--ggui-spacing-4, 16px)",lineHeight:1},children:e.icon}),r.jsx("h3",{style:{fontSize:"var(--ggui-font-size-xl, 20px)",fontWeight:"var(--ggui-font-weight-semibold, 600)",lineHeight:1.3,color:"var(--ggui-color-onSurface, #18181b)",margin:"0 0 8px 0"},children:e.title}),r.jsx("p",{style:{fontSize:"var(--ggui-font-size-base, 16px)",lineHeight:1.6,color:"var(--ggui-color-onSurfaceVariant, #52525b)",margin:0},children:e.description})]})}function J8({headline:e,description:n,action:o,variant:l="filled",style:c,className:u}){const f=l==="filled";return r.jsx("section",{className:u,style:{backgroundColor:f?"var(--ggui-color-primary-600, #0284c7)":"var(--ggui-color-surface, #ffffff)",...f?{}:{borderTop:"1px solid var(--ggui-color-outlineVariant, #e4e4e7)",borderBottom:"1px solid var(--ggui-color-outlineVariant, #e4e4e7)"},...c},children:r.jsxs("div",{style:{maxWidth:"800px",margin:"0 auto",padding:"80px 24px",textAlign:"center"},children:[r.jsx("h2",{style:{fontSize:"var(--ggui-font-size-3xl, 30px)",fontWeight:"var(--ggui-font-weight-bold, 700)",lineHeight:1.2,color:f?"#ffffff":"var(--ggui-color-onSurface, #18181b)",margin:"0 0 16px 0"},children:e}),n&&r.jsx("p",{style:{fontSize:"var(--ggui-font-size-lg, 18px)",lineHeight:1.6,color:f?"rgba(255, 255, 255, 0.85)":"var(--ggui-color-onSurfaceVariant, #52525b)",margin:"0 0 32px 0",maxWidth:"560px",marginLeft:"auto",marginRight:"auto"},children:n}),r.jsx(Q8,{action:o,filled:f})]})})}function Q8({action:e,filled:n}){const o={display:"inline-flex",alignItems:"center",justifyContent:"center",padding:"14px 36px",fontSize:"var(--ggui-font-size-lg, 18px)",fontWeight:600,borderRadius:"var(--ggui-shape-radius-lg, 12px)",cursor:"pointer",transition:"all 0.2s ease",textDecoration:"none",border:"none",lineHeight:"1.5",...n?{backgroundColor:"#ffffff",color:"var(--ggui-color-primary-700, #0369a1)"}:{backgroundColor:"var(--ggui-color-primary-600, #0284c7)",color:"#ffffff"}};return e.href?r.jsx("a",{href:e.href,onClick:e.onClick,style:o,role:"button",children:e.label}):r.jsx("button",{type:"button",onClick:e.onClick,style:o,children:e.label})}var wf={};zc(wf,{Clickable:()=>ek,Hoverable:()=>tk,Pressable:()=>ak});var ek=I.forwardRef(function({children:n,onClick:o,onDoubleClick:l,hoverStyle:c,activeStyle:u,cursor:f,transition:p="all 200ms ease",disabled:g=!1,role:h,"aria-label":y,tabIndex:v,style:S,className:N,...x},E){const[z,k]=I.useState(!1),[$,w]=I.useState(!1),R=!!o,b=g?"not-allowed":f??(R?"pointer":void 0),j=h??(R?"button":void 0),T=v??(R?0:void 0),O=F=>{g||!o||(F.key==="Enter"||F.key===" ")&&(F.preventDefault(),o(F))},V={...S,cursor:b,transition:p,opacity:g?.5:void 0,...z&&!g?c:{},...$&&!g?u:{}};return r.jsx("div",{ref:E,className:N,style:V,onClick:g?void 0:o,onDoubleClick:g?void 0:l,onMouseEnter:()=>k(!0),onMouseLeave:()=>{k(!1),w(!1)},onMouseDown:()=>w(!0),onMouseUp:()=>w(!1),onKeyDown:O,role:j,"aria-label":y,"aria-disabled":g||void 0,tabIndex:T,...x,children:n})}),tk=I.forwardRef(function({children:n,hoverStyle:o,onHoverChange:l,transition:c="all 200ms ease",style:u,className:f,...p},g){const[h,y]=I.useState(!1),v={...u,transition:c,...h?o:{}};return r.jsx("div",{ref:g,className:f,style:v,onMouseEnter:()=>{y(!0),l==null||l(!0)},onMouseLeave:()=>{y(!1),l==null||l(!1)},...p,children:n})}),ak=I.forwardRef(function({children:n,onPress:o,onLongPress:l,longPressDelay:c=500,hoverStyle:u,pressStyle:f,disabled:p=!1,transition:g="all 150ms ease",role:h,"aria-label":y,tabIndex:v,style:S,className:N,...x},E){const[z,k]=I.useState(!1),[$,w]=I.useState(!1),[R,b]=I.useState(null),j=!!o||!!l,T=Q=>{if(!p&&(w(!0),l)){const ue=setTimeout(()=>{l(Q)},c);b(ue)}},O=Q=>{p||(w(!1),R?(clearTimeout(R),b(null),o==null||o(Q)):l||o==null||o(Q))},V=Q=>{p||!o||(Q.key==="Enter"||Q.key===" ")&&(Q.preventDefault(),o(Q))},F={...S,cursor:p?"not-allowed":j?"pointer":void 0,transition:g,opacity:p?.5:void 0,userSelect:j?"none":void 0,...z&&!p?u:{},...$&&!p?f:{}},H=typeof n=="function"?n({pressed:$,hovered:z}):n;return r.jsx("div",{ref:E,className:N,style:F,onMouseDown:T,onMouseUp:O,onMouseEnter:()=>k(!0),onMouseLeave:()=>{k(!1),w(!1),R&&clearTimeout(R)},onKeyDown:V,role:h??(j?"button":void 0),"aria-label":y,"aria-disabled":p||void 0,tabIndex:v??(j?0:void 0),...x,children:H})});function nk(e){return e.replace(/__GGUI_META__[\s\S]*?__GGUI_META_END__/g,"").replace(/__GGUI_STREAM_SPEC__[\s\S]*?__GGUI_STREAM_SPEC_END__/g,"")}function rk(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 Fn(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}: ${rk(c)};`):c!==null&&typeof c=="object"&&Fn(c,`${n}-${l}`,o))}function ik(e){const n=[];return Fn(e.color,"color",n),Fn(e.font,"font",n),Fn(e.spacing,"spacing",n),Fn(e.shape,"shape",n),Fn({duration:e.motion.duration,easing:e.motion.easing,transition:e.motion.transition},"motion",n),Fn(e.accessibility,"accessibility",n),Fn(e.zIndex,"zIndex",n),n.join(`
141
+ `)}function ok(e,n){const o=/([\d.]+%|from|to)\s*\{([^}]*)\}/g,l=[];let c;for(;(c=o.exec(n))!==null;){const u=c[1],p=c[2].trim().split(";").map(g=>g.trim()).filter(Boolean).map(g=>g.endsWith(";")?g:`${g};`).join(" ");l.push(` ${u} { ${p} }`)}return`@keyframes ggui-${e} {
142
+ ${l.join(`
143
+ `)}
144
+ }`}function lk(e){const n=[];for(const[o,l]of Object.entries(e.motion.keyframes))o.startsWith("$")||n.push(ok(o,String(l.$value)));return n.join(`
145
+
146
+ `)}function sk(e,n){const l=`:root {
147
+ ${ik(n)}
148
+ }`,c=lk(n),u=c?`${l}
149
+
150
+ ${c}`:l;return{id:e,name:n.$name,description:n.$description,metadata:n.$metadata,cssVariables:l,cssKeyframes:c,css:u}}var Pt={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"}}}},Ke={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"}}}},oa={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}},Tc={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)"}},Wn={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:Tc,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"}}}},ck={$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:Wn.font,spacing:Wn.spacing,shape:Wn.shape,motion:Wn.motion,accessibility:{...Ke.light,focusRing:{...Ke.light.focusRing,color:{$type:"color",$value:"#292929"}}},zIndex:oa},uk={$name:"GGUI",$description:"The default ggui theme (dark) — ink canvas, paper text, architectural and flat.",$metadata:{font:"Inter",fontUrl:"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Geist+Mono:wght@400;500;700&display=swap",philosophy:"The interface is the artifact, not the chrome around it."},color:{primary:{50:{$value:"#0e0e0e",$type:"color"},100:{$value:"#1f1f1f",$type:"color"},200:{$value:"#292929",$type:"color"},300:{$value:"#3d3d3d",$type:"color"},400:{$value:"#5a5a5a",$type:"color"},500:{$value:"#f4f3ed",$type:"color"},600:{$value:"#ebe9e1",$type:"color"},700:{$value:"#e4e4e2",$type:"color"},800:{$value:"#d9d9d9",$type:"color"},900:{$value:"#ffffff",$type:"color"}},neutral:{50:{$value:"#0e0e0e",$type:"color"},100:{$value:"#1f1f1f",$type:"color"},200:{$value:"#292929",$type:"color"},300:{$value:"#3d3d3d",$type:"color"},400:{$value:"#5a5a5a",$type:"color"},500:{$value:"#8c8c93",$type:"color"},600:{$value:"#d9d9d9",$type:"color"},700:{$value:"#e4e4e2",$type:"color"},800:{$value:"#ebe9e1",$type:"color"},900:{$value:"#f4f3ed",$type:"color"}},success:{50:{$value:"#0d2918",$type:"color"},100:{$value:"#174f2a",$type:"color"},200:{$value:"#286b3d",$type:"color"},500:{$value:"#3da85b",$type:"color"},600:{$value:"#6dbf83",$type:"color"},700:{$value:"#9dd5ab",$type:"color"},800:{$value:"#cdead3",$type:"color"}},warning:{50:{$value:"#332608",$type:"color"},100:{$value:"#5e4612",$type:"color"},200:{$value:"#896720",$type:"color"},500:{$value:"#d4a02e",$type:"color"},600:{$value:"#dfb55c",$type:"color"},700:{$value:"#eaca8a",$type:"color"},800:{$value:"#f5deb8",$type:"color"}},error:{50:{$value:"#3d130d",$type:"color"},100:{$value:"#702419",$type:"color"},200:{$value:"#a33828",$type:"color"},500:{$value:"#ff5b46",$type:"color"},600:{$value:"#ff7d6c",$type:"color"},700:{$value:"#ff9f93",$type:"color"},800:{$value:"#ffc2ba",$type:"color"}},info:{50:{$value:"#363636",$type:"color"},100:{$value:"#5a5a5a",$type:"color"},200:{$value:"#8c8c8c",$type:"color"},500:{$value:"#d9d9d9",$type:"color"},600:{$value:"#e0e0e0",$type:"color"},700:{$value:"#e8e8e8",$type:"color"},800:{$value:"#f0f0f0",$type:"color"}},surface:{$value:"#1f1f1f",$type:"color"},onSurface:{$value:"#f4f3ed",$type:"color"},surfaceVariant:{$value:"#292929",$type:"color"},onSurfaceVariant:{$value:"#d9d9d9",$type:"color"},container:{$value:"#292929",$type:"color"},onContainer:{$value:"#f4f3ed",$type:"color"},outline:{$value:"#3d3d3d",$type:"color"},outlineVariant:{$value:"#292929",$type:"color"},onPrimary:{$value:"#292929",$type:"color"},primaryContainer:{$value:"#3d3d3d",$type:"color"},onPrimaryContainer:{$value:"#f4f3ed",$type:"color"},onError:{$value:"#3d130d",$type:"color"},errorContainer:{$value:"#702419",$type:"color"},onErrorContainer:{$value:"#ffc2ba",$type:"color"},tertiary:{$value:"#3da85b",$type:"color"},onTertiary:{$value:"#0d2918",$type:"color"},tertiaryContainer:{$value:"#174f2a",$type:"color"},onTertiaryContainer:{$value:"#cdead3",$type:"color"}},font:Wn.font,spacing:Wn.spacing,shape:Wn.shape,motion:Wn.motion,accessibility:{...Ke.dark,focusRing:{...Ke.dark.focusRing,color:{$type:"color",$value:"#f4f3ed"}}},zIndex:oa},dk={light:ck,dark:uk},Xn={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)"}}}},fk={$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:Xn.font,spacing:Xn.spacing,shape:Xn.shape,motion:Xn.motion,accessibility:{...Ke.light,focusRing:{...Ke.light.focusRing,color:{$type:"color",$value:"#06b6d4"}}},zIndex:oa},pk={$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:Xn.font,spacing:Xn.spacing,shape:Xn.shape,motion:Xn.motion,accessibility:{...Ke.dark,focusRing:{...Ke.dark.focusRing,color:{$type:"color",$value:"#22d3ee"}}},zIndex:oa},gk={light:fk,dark:pk},Jn={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)"}}}},mk={$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:Jn.font,spacing:Jn.spacing,shape:Jn.shape,motion:Jn.motion,accessibility:{...Ke.light,focusRing:{...Ke.light.focusRing,color:{$type:"color",$value:"#748660"}}},zIndex:oa},hk={$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:Jn.font,spacing:Jn.spacing,shape:Jn.shape,motion:Jn.motion,accessibility:{...Ke.dark,focusRing:{...Ke.dark.focusRing,color:{$type:"color",$value:"#93a17c"}}},zIndex:oa},yk={light:mk,dark:hk},Qn={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"}}}},vk={$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:{...Pt.dark.success,500:{$value:"#34d399",$type:"color"}},warning:{...Pt.dark.warning,500:{$value:"#fbbf24",$type:"color"}},error:{...Pt.dark.error,500:{$value:"#f87171",$type:"color"}},info:{...Pt.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:Qn.font,spacing:Qn.spacing,shape:Qn.shape,motion:Qn.motion,accessibility:{...Ke.dark,focusRing:{...Ke.dark.focusRing,color:{$value:"#ec4899",$type:"color"}}},zIndex:oa},$k={$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:{...Pt.dark.success,500:{$value:"#5ee0ad",$type:"color"}},warning:{...Pt.dark.warning,500:{$value:"#ffd24a",$type:"color"}},error:{...Pt.dark.error,500:{$value:"#ff8a8a",$type:"color"}},info:{...Pt.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:Qn.font,spacing:Qn.spacing,shape:Qn.shape,motion:Qn.motion,accessibility:{...Ke.dark,focusRing:{...Ke.dark.focusRing,color:{$value:"#f472b6",$type:"color"}}},zIndex:oa},bk={light:vk,dark:$k},er={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:Tc}},xk={$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:Pt.light.success,warning:Pt.light.warning,error:Pt.light.error,info:Pt.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:er.font,spacing:er.spacing,shape:er.shape,motion:er.motion,accessibility:{...Ke.light,focusRing:{...Ke.light.focusRing,color:{$type:"color",$value:"#16a34a"}}},zIndex:oa},_k={$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:Pt.dark.success,warning:Pt.dark.warning,error:Pt.dark.error,info:Pt.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:er.font,spacing:er.spacing,shape:er.shape,motion:er.motion,accessibility:{...Ke.dark,focusRing:{...Ke.dark.focusRing,color:{$type:"color",$value:"#4ade80"}}},zIndex:oa},jk={light:xk,dark:_k},Sk={...Tc,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)"}},tr={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:Sk}},wk={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"}},kk={$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:{...wk},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:tr.font,spacing:tr.spacing,shape:tr.shape,motion:tr.motion,accessibility:{...Ke.light,focusRing:{...Ke.light.focusRing,color:{$type:"color",$value:"#cc785c"}}},zIndex:oa},Nk={$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:tr.font,spacing:tr.spacing,shape:tr.shape,motion:tr.motion,accessibility:{...Ke.dark,focusRing:{...Ke.dark.focusRing,color:{$type:"color",$value:"#d6896c"}}},zIndex:oa},zk={light:kk,dark:Nk},ar={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:Tc}},Ek={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"}},Ck={$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:{...Ek},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:ar.font,spacing:ar.spacing,shape:ar.shape,motion:ar.motion,accessibility:{...Ke.light,focusRing:{...Ke.light.focusRing,color:{$type:"color",$value:"#4f46e5"}}},zIndex:oa},Tk={$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:ar.font,spacing:ar.spacing,shape:ar.shape,motion:ar.motion,accessibility:{...Ke.dark,focusRing:{...Ke.dark.focusRing,color:{$type:"color",$value:"#818cf8"}}},zIndex:oa},Mk={light:Ck,dark:Tk},Rk=new Map([["ggui",dk],["indigo",Mk],["claudic",zk],["premium-cyberpunk",gk],["premium-zen",yk],["premium-neon-noir",bk],["premium-botanical",jk]]),Py=new Map;function Ok(e,n){return n==="dark"&&e.dark?"dark":"light"}function Ak(e,n="light"){const o=Rk.get(e);if(!o)return;const l=Ok(o,n),c=`${e}:${l}`,u=Py.get(c);if(u)return u;const f=l==="dark"?o.dark:o.light,p=sk(e,f);return Py.set(c,p),p}function V1(){return"ggui"}I.createContext(null);var H1="@supports (color: color-mix(in srgb, red, blue))";function Dk(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 Uk(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 kf(e,n){const o=Uk(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,f=Number(u.toFixed(4)).toString();return`rgba(${o.r}, ${o.g}, ${o.b}, ${f})`}):e}function Ik(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=[],f=[];for(const p of c.split(`
151
+ `))p.trim()!==""&&(p.includes("color-mix(")?f.push(p):u.push(p));return{base:`${l}
152
+ ${u.join(`
153
+ `)}
154
+ }`,colorMix:f}}function Lk(e,n,o){if(!o||!e.includes("color-mix("))return e;const{base:l,colorMix:c}=Ik(e);if(c.length===0)return e;const u=c.map(g=>kf(g,o)),f=`${n} {
155
+ ${u.join(`
156
+ `)}
157
+ }`,p=`${H1} {
158
+ ${n} {
159
+ ${c.join(`
160
+ `)}
161
+ }
162
+ }`;return`${l}
163
+ ${f}
164
+ ${p}`}function Vk(e,n="light"){return Kf(V1(),e,n)}function Kf(e,n,o="light"){const l=Ak(e,o);if(!l){const g=V1();return e===g?"":Kf(g,n,o)}const c=Dk(l.cssVariables),u=Lk(l.cssVariables.replace(/^:root\s*\{/,`.${n} {`),`.${n}`,c),f=`.${n} {
165
+ font-family: var(--ggui-font-family-sans);
166
+ color: var(--ggui-color-onSurface);
167
+ background-color: transparent;
168
+ }`,p=Hk(n,c);return`${u}
169
+ ${f}
170
+ ${p}
171
+ ${l.cssKeyframes}
172
+ .${n} *, .${n} *::before, .${n} *::after { box-sizing: border-box; }
173
+ .${n} h1, .${n} h2, .${n} h3, .${n} h4, .${n} h5, .${n} h6, .${n} button, .${n} input, .${n} textarea, .${n} select { font-family: inherit; }`}function Hk(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);",f=" --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} {
174
+ ${l}
175
+ ${c}
176
+ ${u}
177
+ ${f}
178
+ }`;const p=" --ggui-color-surface-gradient: linear-gradient(180deg, var(--ggui-color-surface) 0%, var(--ggui-color-surface) 100%);",g=` --ggui-effect-glow-primary: ${kf("0 0 0 4px color-mix(in srgb, var(--ggui-color-primary-500) 18%, transparent)",n)};`,h=` --ggui-effect-glow-primary-strong: ${kf("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} {
179
+ ${l}
180
+ ${p}
181
+ ${g}
182
+ ${h}
183
+ }`,v=`${H1} {
184
+ ${o} {
185
+ ${c}
186
+ ${u}
187
+ ${f}
188
+ }
189
+ }`;return`${y}
190
+ ${v}`}var Bk=["useAction","useStream","useAuth","useApp","useRender","useGguiContext","useContract","useWireContext","GguiWireProvider"],qk=["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"],Pk=["SearchField","FormField","MenuItem","Tag","Dropdown","Autocomplete","Breadcrumb","Pagination","EmptyState","Stat"],Zk=["Header","Sidebar","CardGrid","CommentThread","DataTable","ChatWindow","NavigationBar","FileUploader","UserProfileCard","NotificationCenter","Modal","CommandPalette","Footer","Hero","IncidentTimeline","MakeTabLayout","MarketingHero","MarketingCTA","MarketingFeatures"],Zy=["Clickable","Hoverable","Pressable"],Gk=["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"],Fk=["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","textStyles","spacing","spacingValues","radius","shadow","elevation","maxWidth","zIndex","accessibility","focusRing","nativeTokens","tokens"];function Lt(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 Wf(e,n){return`(globalThis.__ggui__&&globalThis.__ggui__["${e}"]||window["${n}"])`}function Yk(e){const n=Gk.map(c=>`export const ${c} = R.${c};`).join(" "),l=`const R = ${Wf("react",e)}; export default R; ${n}`;return`data:text/javascript,${encodeURIComponent(l)}`}function Kk(){const o=`const D = globalThis.__ggui__["reactDom"]; export default D; ${["createPortal","flushSync","unstable_batchedUpdates"].map(l=>`export const ${l} = D.${l};`).join(" ")}`;return`data:text/javascript,${encodeURIComponent(o)}`}function Wk(e){const o=[`const R = ${Wf("react",e)};`,"function jsx(t,p,k){","if(k!==undefined){p={...p,key:k}}","const c=p.children;","delete p.children;","return Array.isArray(c)?R.createElement(t,p,...c):c!==undefined?R.createElement(t,p,c):R.createElement(t,p)","}","export{jsx,jsx as jsxs,jsx as jsxDEV};","export const Fragment=R.Fragment;"].join("");return`data:text/javascript,${encodeURIComponent(o)}`}function Pn(e,n,o,l,c){if(o&&o.length>0){const p=[e,...l||[]],g=[n,...c||[]],h=p.map((N,x)=>`(globalThis.__ggui__&&globalThis.__ggui__["${g[x]}"]||window["${N}"]||{})`),y=h.join(","),v=o.map(N=>`export const ${N} = M["${N}"];`).join(" "),S=h.length>1?`const M = Object.assign({}, ${y}); ${v} export default M;`:`const M = ${h[0]}; ${v} export default M;`;return`data:text/javascript,${encodeURIComponent(S)}`}const f=`const M = ${Wf(n,e)} || {}; const handler = { get(_, key) { return M[key]; } }; export default new Proxy({}, handler);`;return`data:text/javascript,${encodeURIComponent(f)}`}function Xk(){const n=`const w = globalThis.__ggui__.wire; ${Bk.map(o=>`export const ${o} = w.${o};`).join(" ")} export default w;`;return`data:text/javascript,${encodeURIComponent(n)}`}function Jk(e,n){var f;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=(f=p.trim().split(/\s+as\s+/)[0])==null?void 0:f.trim();g!==void 0&&/^[A-Za-z_$][\w$]*$/.test(g)&&c.add(g)}return[...c]}function Qk(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 f=/^[A-Z]/.test(u)?"C":"H";c.push(`export const ${u}=${f}(${JSON.stringify(u)});`)}return c.push("export default new Proxy({},{get:function(_,k){return NS()[k];}});"),`data:text/javascript,${encodeURIComponent(c.join(""))}`}function e9(e,n){const o=n.reactGlobal??"__REACT",l=n.primitivesGlobal??"__GGUI_PRIMITIVES",c=n.componentsGlobal??"__GGUI_COMPONENTS",u=n.compositionsGlobal??"__GGUI_COMPOSITIONS",f=n.interactGlobal??"__GGUI_INTERACT",p=n.appComponentsGlobal??"__GGUI_APP_COMPONENTS",g=Yk(o),h=Wk(o);e=Lt(e,"react/jsx-runtime",h),e=Lt(e,"react/jsx-dev-runtime",h);const y=Kk();e=Lt(e,"react-dom",y),e=Lt(e,"react",g);const v=[...qk,...Pk,...Zk,...Zy];e=Lt(e,"@ggui-ai/design/primitives",Pn(l,"primitives",v,[c,u,f],["components","compositions","interact"])),e=Lt(e,"@ggui-ai/design/components",Pn(c,"components",v,[l,u,f],["primitives","compositions","interact"])),e=Lt(e,"@ggui-ai/design/compositions",Pn(u,"compositions",v,[l,c,f],["primitives","components","interact"])),e=Lt(e,"@ggui-ai/design/interact",Pn(f,"interact",[...Zy])),e=Lt(e,"@ggui-ai/design/templates",Pn(u,"compositions",v,[l,c],["primitives","components"])),e=Lt(e,"@ggui-ai/design/app-components",Pn(p,"appComponents")),e=Lt(e,"@ggui-ai/design/tokens",Pn("__GGUI_TOKENS","tokens",[...Fk])),e=Lt(e,"@ggui-ai/design",Pn(l,"primitives",v,[c,u,f],["components","compositions","interact"])),e=Lt(e,"@ggui-ai/wire",Xk());const S=[...new Set(["@ggui-ai/gadgets",...n.gadgetPackages??[]])];for(const N of S){const x=Jk(e,N);e=Lt(e,N,Qk(N,x))}return e}function t9(e,n){const o=n.reactBaseUrl??"https://esm.sh/react@18.2.0";return e=Lt(e,"react/jsx-runtime",`${o}/jsx-runtime`),e=Lt(e,"react/jsx-dev-runtime",`${o}/jsx-runtime`),e=Lt(e,"react",o),e}function a9(e,n){switch(n.mode){case"data-url":return e9(e,n);case"importmap":return t9(e,n)}}function n9(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 r9(e){const n=new Blob([e],{type:"application/javascript"}),o=URL.createObjectURL(n);try{return await import(o)}finally{URL.revokeObjectURL(o)}}var i9=0;function o9(e){return`ggui-rcr-${e.replace(/[^a-z0-9]/gi,"")}`}var l9=1,s9=500,c9=class extends uc.Component{constructor(){super(...arguments);cn(this,"state",{error:null,catchCount:0,autoRetrying:!1});cn(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<=l9?(this.setState({autoRetrying:!0}),this.retryTimer=setTimeout(()=>{this.setState({error:null,autoRetrying:!1})},s9)):(c=(l=this.props).onError)==null||c.call(l,n)}componentWillUnmount(){this.retryTimer&&clearTimeout(this.retryTimer)}render(){const{error:n,autoRetrying:o,catchCount:l}=this.state;return n?o?r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:24,minHeight:80,gap:8,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',fontSize:13,color:"rgba(255,255,255,0.4)"},children:[r.jsx("div",{style:{width:16,height:16,border:"2px solid rgba(255,255,255,0.15)",borderTopColor:"rgba(255,255,255,0.5)",borderRadius:"50%",animation:"ggui-err-spin 0.6s linear infinite"}}),"Retrying...",r.jsx("style",{children:"@keyframes ggui-err-spin { to { transform: rotate(360deg); } }"})]}):r.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:[r.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:"!"}),r.jsx("div",{style:{fontSize:14,fontWeight:600,color:"rgba(255,255,255,0.8)"},children:"Something went wrong"}),r.jsx("div",{style:{fontSize:12,color:"rgba(255,255,255,0.4)",maxWidth:280,lineHeight:1.4},children:"This component encountered an error. Try asking for a different view."}),r.jsx("button",{onClick:()=>this.setState({error:null,catchCount:0}),style:{marginTop:4,padding:"8px 20px",borderRadius:8,border:"1px solid rgba(255,255,255,0.15)",background:"rgba(255,255,255,0.08)",color:"rgba(255,255,255,0.7)",fontSize:13,fontWeight:500,cursor:"pointer"},children:"Retry"}),l>1&&r.jsx("div",{style:{fontSize:11,color:"rgba(255,255,255,0.2)"},children:n.message})]}):this.props.children}};function u9({code:e,props:n={},themeId:o,cssOverrides:l,fallback:c=r.jsx("div",{children:"Loading component..."}),onError:u}){const f=I.useId(),[p]=I.useState(()=>o9(f)||`ggui-rcr-${++i9}`),[g,h]=I.useState(null),[y,v]=I.useState(null),[S,N]=I.useState(!0);I.useEffect(()=>{if(!e||e.trim().length===0){h(null),N(!1);return}let E=!1;N(!0),v(null),h(null);async function z(){try{let k=e;if(e.startsWith("https://")){const V=await fetch(e);if(!V.ok)throw new Error(`Failed to fetch component code: ${V.status}`);k=await V.text()}const $=nk(k),w=globalThis;let R={};try{R=await ox(()=>import("./index-plZmfr7T.js").then(V=>V.i),[])}catch{}w.__ggui__={react:uc,reactDom:R,primitives:xf,components:jf,compositions:Sf,interact:wf,wire:P6},w.__REACT=uc,w.__GGUI_PRIMITIVES=xf,w.__GGUI_COMPONENTS=jf,w.__GGUI_COMPOSITIONS=Sf,w.__GGUI_INTERACT=wf;const b=n9($),j=a9(b,{mode:"data-url"}),T=await r9(j);if(E)return;const O=T.default??Object.values(T).find(V=>typeof V=="function");if(!O)throw new Error("Module does not export a default component");h(()=>O),v(null)}catch(k){if(E)return;const $=k instanceof Error?k:new Error(String(k));v($),h(null),u==null||u($)}finally{E||N(!1)}}return z(),()=>{E=!0}},[e]);const x=o?Kf(o,p):Vk(p);return!e||e.trim().length===0?r.jsx("div",{children:c}):S?r.jsx("div",{children:c}):y?r.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:[r.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:"!"}),r.jsx("div",{style:{fontSize:14,fontWeight:600,color:"rgba(255,255,255,0.8)"},children:"Failed to load component"}),r.jsx("div",{style:{fontSize:12,color:"rgba(255,255,255,0.4)",maxWidth:280,lineHeight:1.4},children:y.message})]}):g?r.jsxs("div",{className:p,children:[r.jsxs("style",{children:[x,l??""]}),r.jsx(c9,{onError:u,children:r.jsx(g,{...n})},e.length)]}):r.jsx("div",{children:c})}var Gy="ggui-preview-keyframes",d9=`@keyframes ggui-preview-shimmer {
191
+ 0% { transform: translateX(-100%); }
192
+ 100% { transform: translateX(100%); }
193
+ }`,f9=`@keyframes ggui-preview-caret {
194
+ 0%, 45% { opacity: 1; }
195
+ 55%, 100% { opacity: 0; }
196
+ }`,p9=`@keyframes ggui-preview-fragment-enter {
197
+ from { opacity: 0; transform: scale(0.97); }
198
+ to { opacity: 1; transform: scale(1); }
199
+ }`,g9=`@media (prefers-reduced-motion: reduce) {
200
+ [data-ggui-preview] *,
201
+ [data-ggui-preview]::before,
202
+ [data-ggui-preview]::after {
203
+ animation-duration: 0.01ms !important;
204
+ animation-iteration-count: 1 !important;
205
+ transition-duration: 0.01ms !important;
206
+ }
207
+ }`,m9=[d9,f9,p9,g9].join(`
208
+
209
+ `);function h9(){if(typeof document>"u"||document.getElementById(Gy))return;const e=document.createElement("style");e.id=Gy,e.textContent=m9,document.head.appendChild(e)}function y9({children:e,frozen:n=!1,className:o,style:l}){I.useEffect(()=>{h9()},[]);const c={position:"relative",cursor:"progress",backgroundColor:"var(--ggui-color-surface-subtle, rgba(148, 163, 184, 0.08))",borderRadius:"var(--ggui-shape-radius-md, 8px)",overflow:"hidden",...l},u={position:"absolute",inset:0,backgroundImage:"linear-gradient(110deg, transparent 0%, transparent 40%, rgba(255, 255, 255, 0.22) 50%, transparent 60%, transparent 100%)",backgroundSize:"200% 100%",animation:n?"none":"ggui-preview-shimmer 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite",pointerEvents:"none",mixBlendMode:"overlay"},f={position:"relative",pointerEvents:"none"};return r.jsxs("div",{"data-ggui-preview":"","data-ggui-preview-frozen":n?"":void 0,className:o,style:c,"aria-busy":"true",children:[r.jsx("div",{style:f,children:e}),r.jsx("div",{"aria-hidden":"true",style:u})]})}function ra({children:e,delayMs:n=0,className:o,style:l}){const c={animation:"ggui-preview-fragment-enter 220ms cubic-bezier(0, 0, 0.2, 1) both",animationDelay:`${Math.max(0,n)}ms`,...l};return r.jsx("div",{className:o,style:c,children:e})}function Fy({children:e,streaming:n=!1,className:o,style:l}){const c={display:"inline",...l},u={display:"inline-block",width:"0.5ch",height:"1em",marginLeft:"0.1em",verticalAlign:"text-bottom",borderRight:"0.08em solid currentColor",animation:"ggui-preview-caret 900ms steps(1, end) infinite"};return r.jsxs("span",{className:o,"data-ggui-preview-streaming":n?"":void 0,style:c,children:[e,n?r.jsx("span",{"aria-hidden":"true",style:u}):null]})}var Yy={envelopes:[],complete:!1};function v9(e){const n=I.useContext(dw),[o,l]=I.useState(Yy);return I.useEffect(()=>{if(l(Yy),n!==null)return n.subscribe(e,c=>{l(u=>({envelopes:[...u.envelopes,c],complete:u.complete||c.complete===!0}))})},[n,e]),o}var $9="root",B1={surfaceId:null,fragments:new Map};function b9(e,n){if("createSurface"in n)return{surfaceId:n.createSurface.surfaceId,fragments:new Map};if("updateComponents"in n){if(e.surfaceId!==n.updateComponents.surfaceId)return e;const o=new Map(e.fragments);for(const l of n.updateComponents.components)o.set(l.id,l);return{...e,fragments:o}}return"deleteSurface"in n?e.surfaceId!==n.deleteSurface.surfaceId?e:B1:e}function x9(e){let n=B1;for(const o of e){const l=uw(o.payload);l.ok&&(n=b9(n,l.value))}return n}function Ky(){return r.jsx("div",{style:{minHeight:24,minWidth:32,borderRadius:"var(--ggui-shape-radius-sm, 4px)",backgroundColor:"var(--ggui-color-outlineVariant, rgba(148, 163, 184, 0.18))"},"aria-hidden":"true"})}function _9({name:e}){return r.jsx(Qo,{padding:12,shadow:"none",border:!0,children:r.jsx(qr,{variant:"caption",children:`[${e}]`})})}function Nf(e,n){const o=c=>c?c.map(u=>{const f=n.get(u);return f?Nf(f,n):r.jsx(Ky,{},u)}):[],{id:l}=e;switch(e.component){case"Row":return r.jsx(ra,{children:r.jsx(hc,{gap:e.gap,align:e.align??"stretch",justify:e.justify??"start",children:o(e.children)})},l);case"Column":return r.jsx(ra,{children:r.jsx(Ii,{direction:"vertical",gap:e.gap,align:e.align??"stretch",justify:e.justify??"start",children:o(e.children)})},l);case"List":return r.jsx(ra,{children:r.jsx(Ii,{direction:"vertical",gap:8,children:o(e.children)})},l);case"Card":{const c=e.child?n.get(e.child):void 0;return r.jsx(ra,{children:r.jsx(Qo,{padding:16,shadow:"sm",children:e.child&&!c?r.jsx(Ky,{}):c?Nf(c,n):null})},l)}case"Divider":return r.jsx(ra,{children:r.jsx(E1,{orientation:e.orientation??"horizontal"})},l);case"Text":{const c=e.variant??"body",u=/^h([1-6])$/.exec(c);if(u){const p=Number(u[1]);return r.jsx(ra,{children:r.jsx(Cc,{level:p,children:r.jsx(Fy,{children:e.text})})},l)}const f=c==="label"||c==="caption"?c:"body";return r.jsx(ra,{children:r.jsx(qr,{variant:f,children:r.jsx(Fy,{children:e.text})})},l)}case"Image":return r.jsx(ra,{children:r.jsx(M1,{src:e.src,alt:e.alt??""})},l);case"Icon":return r.jsx(ra,{children:r.jsx(xt,{name:e.name})},l);case"Button":return r.jsx(ra,{children:r.jsx(Xt,{disabled:!0,children:e.label})},l);case"TextField":return r.jsx(ra,{children:r.jsx(Gf,{disabled:!0,label:e.label,placeholder:e.placeholder,value:e.value??"",onChange:gf})},l);case"CheckBox":return r.jsx(ra,{children:r.jsx(yc,{disabled:!0,label:e.label??"",checked:e.checked??!1,onChange:gf})},l);case"ChoicePicker":{const c=e.options??[];return r.jsx(ra,{children:r.jsx(C1,{disabled:!0,label:e.label,value:e.value??"",options:c,onChange:gf})},l)}default:{const c=e;return r.jsx(ra,{children:r.jsx(_9,{name:c.component})},l)}}}function gf(){}function j9(){return r.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:80},children:r.jsx(Pa,{})})}function S9({suspended:e=!1,fallback:n}={}){const{envelopes:o}=v9(p1),l=I.useMemo(()=>x9(o),[o]);if(e)return null;const c=l.fragments.get($9);return c?r.jsx(y9,{children:Nf(c,l.fragments)}):r.jsx(r.Fragment,{children:n??r.jsx(j9,{})})}function w9({render:e,fallback:n,onError:o,cssOverrides:l,themeId:c}){return!e.componentCode||e.componentCode.length===0?r.jsx(Wy,{children:r.jsx(S9,{fallback:n})}):r.jsx(Wy,{children:r.jsx(u9,{code:e.componentCode,props:e.props,cssOverrides:l,themeId:c,onError:o,fallback:n})})}function Wy({children:e}){return N9()?r.jsx(r.Fragment,{children:e}):r.jsx(y1,{config:k9,children:e})}var k9={app:{appId:"preview",appName:"preview"},render:{sessionId:"preview",isConnected:!1},auth:{isAuthenticated:!1},dispatch:()=>{},subscribe:()=>()=>{}};function N9(){try{return Zr()}catch{return null}}function Ce({tone:e,children:n,dot:o=!0}){return r.jsxs("span",{className:`ggui-status ggui-status--${e}`,children:[o?r.jsx("span",{className:"ggui-status__dot","aria-hidden":!0}):null,n]})}function z9({blueprintId:e}){const[n,o]=I.useState({kind:"loading"});return I.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]),r.jsxs("section",{className:"ggui-section",children:[r.jsx(tt,{num:"01 / blueprint",title:"Manifest-registered surface.",mute:r.jsx(r.Fragment,{children:r.jsxs("code",{className:"ggui-code",children:["/preview/",e]})}),intro:r.jsxs(r.Fragment,{children:["Reads the bundle via"," ",r.jsx("code",{className:"ggui-code",children:"LocalUiRegistry"}),". Same bytes an agent would get from"," ",r.jsx("code",{className:"ggui-code",children:"ggui_render_blueprint"}),"."]})}),n.kind==="loading"?r.jsx(Xy,{title:"loading",num:"BPR / 01",tone:"draft",children:"Loading blueprint…"}):n.kind==="not-found"?r.jsx(T9,{blueprintId:e}):n.kind==="error"?r.jsxs(Xy,{title:"error",num:"ERR / 01",tone:"signal",children:["Couldn't load blueprint — ",n.message,"."]}):r.jsx(E9,{blueprint:n.blueprint})]})}function E9({blueprint:e}){return r.jsxs("section",{"data-ggui-session-entry":"component","data-ggui-code-ready":"true","data-ggui-blueprint-id":e.blueprintId,className:"ggui-pane",children:[r.jsxs("div",{className:"ggui-pane__head",children:[r.jsxs("div",{className:"ggui-pane__traffic","aria-hidden":!0,children:[r.jsx("span",{}),r.jsx("span",{}),r.jsx("span",{})]}),r.jsx("span",{className:"ggui-pane__title",children:e.blueprintName}),r.jsx("span",{className:"ggui-pane__meta",children:e.contentType}),r.jsx(C9,{blueprintId:e.blueprintId})]}),r.jsx("div",{className:"ggui-pane__body",children:r.jsx(w9,{render:{componentCode:e.code},fallback:r.jsx("div",{"data-ggui-preview-state":"waiting",className:"ggui-muted",style:{padding:"16px 0"},children:"Loading component…"})})})]})}function C9({blueprintId:e}){const[n,o]=I.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 r.jsxs("span",{className:"ggui-pane__actions",style:{marginLeft:"auto"},children:[n.kind==="error"?r.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"?r.jsx("span",{className:"ggui-muted","data-ggui-try-live":"ok",style:{marginRight:"8px",fontSize:"0.75rem"},children:"try-live ok"}):null,r.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 T9({blueprintId:e}){return r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"not found"}),r.jsx("span",{className:"ggui-card__num",children:"ERR / 01"})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsx("h2",{className:"ggui-h2",children:"Blueprint not found"}),r.jsxs("p",{className:"ggui-body",children:["No blueprint registered with id"," ",r.jsx("code",{className:"ggui-code",children:e}),". Check"," ",r.jsx("code",{className:"ggui-code",children:"ggui.json#blueprints.include"})," ","and the blueprint's"," ",r.jsx("code",{className:"ggui-code",children:"ggui.ui.json#id"}),"."]}),r.jsx("div",{children:r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:()=>Ve("/"),children:"back to landing"})})]})]})}function Xy({title:e,num:n,tone:o,children:l}){return r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:e}),r.jsx("span",{className:"ggui-card__num",children:n})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsx("p",{className:"ggui-body",children:r.jsx(Ce,{tone:o,children:e})}),r.jsx("p",{className:"ggui-muted",children:l})]})]})}function M9(){const[e,n]=I.useState({kind:"loading"}),[o,l]=I.useState({kind:"loading"}),[c,u]=I.useState(""),[f,p]=I.useState(!1);I.useEffect(()=>{const x=new AbortController;return(async()=>{try{const E=await fetch("/ggui/console/registry",{signal:x.signal,headers:{accept:"application/json"}});if(!E.ok){n({kind:"error",message:`server returned ${E.status}`});return}const z=await E.json();n({kind:"ready",data:z})}catch(E){if(x.signal.aborted)return;n({kind:"error",message:String(E)})}})(),()=>x.abort()},[]);const g=I.useCallback(async x=>{l({kind:"loading"});try{const E=await fetch("/ggui/console/blueprints/cached",{signal:x,headers:{accept:"application/json"}});if(E.status===501){const k=await E.json().catch(()=>({}));l({kind:"unsupported",message:k.message??"The configured vector store does not support enumeration."});return}if(!E.ok){l({kind:"error",message:`server returned ${E.status}`});return}const z=await E.json();l({kind:"ready",data:z})}catch(E){if(x!=null&&x.aborted)return;l({kind:"error",message:String(E)})}},[]);I.useEffect(()=>{const x=new AbortController;return g(x.signal),()=>x.abort()},[g]);const h=I.useCallback(async x=>{try{await fetch(`/ggui/console/blueprints/cached/${encodeURIComponent(x)}`,{method:"DELETE"})}catch(E){l({kind:"error",message:String(E)});return}await g()},[g]),y=I.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(),S=I.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]),N=I.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 r.jsxs("section",{className:"ggui-section",children:[r.jsx(tt,{num:"01 / blueprints",title:"What can this server produce without generating?",mute:"Declared and cached.",intro:r.jsxs(r.Fragment,{children:["Two answers on one screen. ",r.jsx("strong",{children:"Declared"})," blueprints from ",r.jsx("code",{className:"ggui-code",children:"ggui.json#blueprints.include"}),";"," ",r.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"?r.jsx(Qy,{title:"loading",num:"REG / 01",tone:"draft",children:"Loading…"}):e.kind==="error"?r.jsxs(Qy,{title:"error",num:"ERR / 01",tone:"signal",children:["Couldn't load registry — ",e.message,"."]}):r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"ggui-form",style:{marginBottom:20},children:[r.jsx("label",{className:"ggui-label",htmlFor:"ggui-registry-filter",children:"filter"}),r.jsx("div",{className:"ggui-field",children:r.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})})]}),r.jsxs("div",{className:"ggui-registry-grid",children:[r.jsx(R9,{all:e.data.blueprints,shown:(S==null?void 0:S.blueprints)??e.data.blueprints,filterActive:v.length>0}),r.jsx(O9,{state:o,shown:N,filterActive:v.length>0,onInvalidate:h,onClearAll:y})]}),r.jsx(A9,{all:e.data.primitives,shown:(S==null?void 0:S.primitives)??e.data.primitives,filterActive:v.length>0,expanded:f,onToggle:()=>p(x=>!x)})]})]})}function R9({all:e,shown:n,filterActive:o}){return r.jsxs("div",{"data-ggui-registry-list":"blueprints",className:"ggui-stack","aria-label":"declared blueprints",children:[r.jsxs("div",{className:"ggui-stack__head",children:[r.jsx("span",{className:"ggui-stack__num",children:"BPR"}),r.jsx("span",{className:"ggui-stack__label",children:"declared"}),r.jsxs("span",{className:"ggui-stack__count",children:[n.length,o&&n.length!==e.length?` / ${e.length}`:""]})]}),e.length===0?r.jsx(D9,{}):n.length===0?r.jsx("p",{className:"ggui-muted",style:{margin:0,padding:12},children:"No declared blueprints match the filter."}):r.jsx("ul",{className:"ggui-stack__list",children:n.map((l,c)=>r.jsxs("li",{"data-ggui-registry-item":"blueprint","data-ggui-registry-id":l.id,className:"ggui-stack__entry",children:[r.jsxs("div",{className:"ggui-stack__entry-head",children:[r.jsx("span",{className:"ggui-stack__entry-num",children:`BPR / ${String(c+1).padStart(2,"0")}`}),r.jsx("span",{className:"ggui-stack__entry-title",children:l.name}),l.category?r.jsx(Ce,{tone:"ink",children:l.category}):null]}),r.jsx("div",{className:"ggui-stack__entry-meta",children:r.jsx("code",{className:"ggui-code",children:l.id})}),l.description?r.jsx("p",{className:"ggui-body",style:{margin:"8px 0 0"},children:l.description}):null,r.jsx("div",{style:{marginTop:12},children:r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:()=>Ve(`/preview/${encodeURIComponent(l.id)}`),children:"preview →"})})]},l.id))})]})}function O9({state:e,shown:n,filterActive:o,onInvalidate:l,onClearAll:c}){const u=e.kind==="ready"?e.data.entries:[],f=n??u;return r.jsxs("div",{"data-ggui-cached-list":!0,className:"ggui-stack","aria-label":"cached blueprints",children:[r.jsxs("div",{className:"ggui-stack__head",children:[r.jsx("span",{className:"ggui-stack__num",children:"CCH"}),r.jsx("span",{className:"ggui-stack__label",children:"cached"}),r.jsx("span",{className:"ggui-stack__count",children:e.kind==="ready"?`${f.length}${o&&f.length!==u.length?` / ${u.length}`:""}`:"—"}),e.kind==="ready"&&u.length>0?r.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"?r.jsx(I9,{message:e.message}):e.kind==="error"?r.jsxs("p",{className:"ggui-muted",style:{margin:0,padding:12},children:["Couldn't load cache — ",e.message,"."]}):u.length===0?r.jsx(U9,{}):f.length===0?r.jsx("p",{className:"ggui-muted",style:{margin:0,padding:12},children:"No cached entries match the filter."}):r.jsx("ul",{className:"ggui-stack__list",children:f.map((p,g)=>r.jsxs("li",{"data-ggui-cached-item":!0,"data-ggui-cached-id":p.id,className:"ggui-stack__entry",children:[r.jsxs("div",{className:"ggui-stack__entry-head",children:[r.jsx("span",{className:"ggui-stack__entry-num",children:`CCH / ${String(g+1).padStart(2,"0")}`}),r.jsx("span",{className:"ggui-stack__entry-title",children:p.cachedIntent}),typeof p.hitCount=="number"?r.jsxs(Ce,{tone:"ink",children:["hits ",p.hitCount]}):null]}),r.jsxs("div",{className:"ggui-stack__entry-meta",children:[r.jsx("code",{className:"ggui-code",children:p.id}),r.jsxs("span",{style:{marginLeft:12},children:["cached ",Jy(p.cachedAt)]}),p.lastHitAt?r.jsxs("span",{style:{marginLeft:12},children:["last hit ",Jy(p.lastHitAt)]}):null]}),r.jsx("div",{style:{marginTop:12},children:r.jsx("button",{type:"button","data-ggui-cached-invalidate":!0,className:"ggui-btn ggui-btn--ghost",onClick:()=>{l(p.id)},children:"invalidate ✕"})})]},p.id))})]})}function Jy(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 A9({all:e,shown:n,filterActive:o,expanded:l,onToggle:c}){return r.jsxs("div",{"data-ggui-registry-list":"primitives",className:"ggui-card","aria-label":"primitives",style:{marginTop:24},children:[r.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:[r.jsxs("span",{className:"ggui-card__title",children:[l?"▾":"▸"," primitives"]}),r.jsxs("span",{className:"ggui-card__num",children:[n.length,o&&n.length!==e.length?` / ${e.length}`:""," available — fyi"]})]}),l?e.length===0?r.jsx(L9,{}):n.length===0?r.jsx("p",{className:"ggui-muted",style:{margin:0,padding:12},children:"No primitives match the filter."}):r.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=>r.jsxs("li",{"data-ggui-registry-item":"primitive","data-ggui-registry-name":u.name,style:{display:"inline-flex",alignItems:"center",gap:6},children:[r.jsx("code",{className:"ggui-code",children:u.name}),r.jsx(Ce,{tone:u.source==="package"?"ink":"draft",children:u.source})]},`${u.catalog}::${u.name}`))}):null]})}function D9(){return r.jsxs("div",{className:"ggui-card__body",style:{padding:"16px 12px"},children:[r.jsx("p",{className:"ggui-body",style:{margin:0},children:"No declared blueprints."}),r.jsxs("p",{className:"ggui-muted",style:{margin:"8px 0 0"},children:["Add include globs to"," ",r.jsx("code",{className:"ggui-code",children:"ggui.json#blueprints.include"})," and colocate each UI with a"," ",r.jsx("code",{className:"ggui-code",children:"ggui.ui.json"}),"."]})]})}function U9(){return r.jsxs("div",{className:"ggui-card__body",style:{padding:"16px 12px"},children:[r.jsx("p",{className:"ggui-body",style:{margin:0},children:"No cached generations yet."}),r.jsxs("p",{className:"ggui-muted",style:{margin:"8px 0 0"},children:["Generate a UI from ",r.jsx("code",{className:"ggui-code",children:"/"})," (the playground) and the result will land here for future cache hits."]})]})}function I9({message:e}){return r.jsxs("div",{className:"ggui-card__body",style:{padding:"16px 12px"},children:[r.jsxs("p",{className:"ggui-body",style:{margin:0},children:[r.jsx(Ce,{tone:"signal",children:"unsupported"})," Vector store doesn't support enumeration."]}),r.jsx("p",{className:"ggui-muted",style:{margin:"8px 0 0"},children:e})]})}function L9(){return r.jsxs("div",{className:"ggui-card__body",style:{padding:"16px 12px"},children:[r.jsx("p",{className:"ggui-body",style:{margin:0},children:"No primitives declared."}),r.jsxs("p",{className:"ggui-muted",style:{margin:"8px 0 0"},children:["Declare packages or local catalogs in"," ",r.jsx("code",{className:"ggui-code",children:"ggui.json#primitives"}),"."]})]})}function Qy({title:e,num:n,tone:o,children:l}){return r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:e}),r.jsx("span",{className:"ggui-card__num",children:n})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsx("p",{className:"ggui-body",children:r.jsx(Ce,{tone:o,children:e})}),r.jsx("p",{className:"ggui-muted",children:l})]})]})}function q1({blueprint:e,height:n,title:o}){var f;const l=typeof e.codeHash=="string",c=o??e.variance.persona??`variant ${e.blueprintId.slice(0,8)}`;if(!l)return r.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:r.jsxs("div",{style:{textAlign:"center"},children:[r.jsx("p",{className:"ggui-body",style:{margin:0},children:r.jsx(Ce,{tone:"draft",children:"pending"})}),r.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"," ",r.jsx("code",{className:"ggui-code",children:e.blueprintId}),"."]})]})});const u=`/preview/${encodeURIComponent(e.blueprintId)}`;return r.jsxs("div",{"data-ggui-variant-preview":!0,"data-ggui-variant-preview-id":e.blueprintId,"data-ggui-variant-preview-state":"ready",className:"ggui-pane",children:[r.jsxs("div",{className:"ggui-pane__head",children:[r.jsxs("div",{className:"ggui-pane__traffic","aria-hidden":!0,children:[r.jsx("span",{}),r.jsx("span",{}),r.jsx("span",{})]}),r.jsx("span",{className:"ggui-pane__title",children:c}),r.jsx("span",{className:"ggui-pane__meta",children:r.jsxs("code",{className:"ggui-code",children:[(f=e.codeHash)==null?void 0:f.slice(0,12),"…"]})})]}),r.jsx("div",{className:"ggui-pane__body",style:{padding:0},children:r.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 V9({blueprints:e,height:n}){return r.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=>r.jsx(q1,{blueprint:o,height:n,title:o.variance.persona??o.blueprintId.slice(0,12)},o.blueprintId))})}const P1=["ui-gen-default-haiku-4-5","ui-gen-advanced-opus-4-7"],Xf=.8,H9={persona:"",generator:"",draftsOnly:!1};function B9({filters:e,onChange:n,generatorSlugs:o}){const l=o??P1,c=p=>{n({...e,persona:p.target.value})},u=p=>{n({...e,generator:p.target.value})},f=p=>{n({...e,draftsOnly:p.target.checked})};return r.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:[r.jsxs("div",{className:"ggui-field",style:{flex:1,minWidth:200},children:[r.jsx("label",{className:"ggui-label",htmlFor:"ggui-variants-filter-persona",children:"persona"}),r.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})]}),r.jsxs("div",{className:"ggui-field",style:{minWidth:220},children:[r.jsx("label",{className:"ggui-label",htmlFor:"ggui-variants-filter-generator",children:"generator"}),r.jsxs("select",{id:"ggui-variants-filter-generator","data-ggui-variants-filter-generator":!0,"aria-label":"filter by generator",value:e.generator,onChange:u,children:[r.jsx("option",{value:"",children:"any"}),l.map(p=>r.jsx("option",{value:p,children:p},p))]})]}),r.jsxs("label",{className:"ggui-field",htmlFor:"ggui-variants-filter-drafts-only",style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer"},children:[r.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:f}),r.jsxs("span",{className:"ggui-label",style:{margin:0},children:["drafts only (score < ",Xf.toFixed(2),")"]})]})]})}function q9(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>=Xf))}function P9(e){return e>=Xf?"live":e>=.5?"draft":"signal"}function Z9(e){return e.kind==="llm"?e.generator:e.kind}function Z1({blueprint:e,index:n,onPreview:o,onSetDefault:l,onDelete:c,compareSelected:u,onCompareToggle:f}){const p=e.isOperatorDefault===!0,g=e.variance.persona,h=e.validatorScore;return r.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:[r.jsxs("div",{className:"ggui-stack__entry-head",children:[r.jsx("span",{className:"ggui-stack__entry-num",children:`VAR / ${String(n+1).padStart(2,"0")}`}),r.jsxs("span",{className:"ggui-stack__entry-title",children:[p?r.jsx("span",{"aria-label":"operator default",children:"★ "}):null,g&&g.length>0?g:"(no persona)"]}),g?r.jsxs(Ce,{tone:"ink",children:["persona: ",g]}):null,r.jsx(Ce,{tone:"ink",children:Z9(e.source)}),typeof h=="number"?r.jsxs(Ce,{tone:P9(h),children:["score ",h.toFixed(2)]}):null,r.jsxs(Ce,{tone:e.createdBy==="operator"?"live":"draft",children:["by ",e.createdBy]})]}),r.jsxs("div",{className:"ggui-stack__entry-meta",children:[r.jsx("code",{className:"ggui-code",children:e.blueprintId}),r.jsxs("span",{style:{marginLeft:12},children:["created ",G9(e.createdAt)]}),e.codeHash?r.jsxs("span",{style:{marginLeft:12},children:["hash ",r.jsx("code",{className:"ggui-code",children:F9(e.codeHash)})]}):r.jsx("span",{style:{marginLeft:12},children:r.jsx(Ce,{tone:"signal",children:"no code"})})]}),e.variance.seedPrompt?r.jsxs("p",{className:"ggui-muted",style:{margin:"8px 0 0",fontStyle:"italic"},children:["“",e.variance.seedPrompt,"”"]}):null,r.jsxs("div",{style:{display:"flex",gap:8,marginTop:12,flexWrap:"wrap"},children:[r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost","data-ggui-variant-action":"preview",onClick:()=>o(e.blueprintId),children:"preview →"}),r.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"}),f?r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost","data-ggui-variant-action":"compare-toggle",onClick:()=>f(e.blueprintId),children:u?"✓ in compare":"add to compare"}):null,r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost","data-ggui-variant-action":"delete",onClick:()=>c(e.blueprintId),children:"delete ✕"})]})]})}function G9(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 F9(e){return e.length<=12?e:`${e.slice(0,8)}…${e.slice(-4)}`}class ha extends Error{constructor(o,l,c){super(o);cn(this,"code");cn(this,"status");this.name="OpsCallError",this.code=l,c!==void 0&&(this.status=c)}}let Y9=1;async function K9(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 ha("Malformed SSE response from /ops — no data line",-32700,e.status);return JSON.parse(l[1])}return await e.json()}async function Mc(e,n,o){var y,v,S,N;const l=Y9++,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 f=await fetch("/ops",u);if(!f.ok&&f.status!==200){const x=await f.text().catch(()=>"");throw new ha(`/ops returned HTTP ${f.status}${x?` — ${x}`:""}`,-32e3,f.status)}const p=await K9(f);if("error"in p)throw new ha(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 ha(x,-32e3)}if(g.structuredContent!==void 0)return g.structuredContent;const h=(N=(S=g.content)==null?void 0:S[0])==null?void 0:N.text;if(typeof h=="string"&&h.length>0)return JSON.parse(h);throw new ha(`tool ${e} returned empty result`,-32e3)}function W9(e,n){return Mc("ggui_ops_generate_blueprint",e,n)}function Jf(e,n){return Mc("ggui_ops_list_blueprints",e,n)}function G1(e,n){return Mc("ggui_ops_update_blueprint",e,n)}function F1(e,n){return Mc("ggui_ops_delete_blueprint",e,n)}function X9({contractHash:e}){var E;const[n,o]=I.useState({kind:"loading"}),[l,c]=I.useState([]),[u,f]=I.useState(!1),p=I.useCallback(async z=>{o({kind:"loading"});try{const k=await Jf({contractHash:e},z);o({kind:"ready",blueprints:k.blueprints})}catch(k){if(z!=null&&z.aborted)return;const $=k instanceof ha||k instanceof Error?k.message:String(k);o({kind:"error",message:$})}},[e]);I.useEffect(()=>{const z=new AbortController;return p(z.signal),()=>z.abort()},[p]);const g=I.useMemo(()=>n.kind!=="ready"?[]:[...n.blueprints].sort((z,k)=>{const $=z.isOperatorDefault===!0?1:0,w=k.isOperatorDefault===!0?1:0;if($!==w)return w-$;const R=z.validatorScore??-1,b=k.validatorScore??-1;return R!==b?b-R:k.createdAt.localeCompare(z.createdAt)}),[n]),h=(E=g[0])==null?void 0:E.contract,y=I.useMemo(()=>u?g.filter(z=>l.includes(z.blueprintId)):[],[g,l,u]),v=I.useCallback(z=>{Ve(`/preview/${encodeURIComponent(z)}`)},[]),S=I.useCallback(async z=>{try{await G1({blueprintId:z,isOperatorDefault:!0}),await p()}catch(k){const $=k instanceof ha||k instanceof Error?k.message:String(k);o({kind:"error",message:$})}},[p]),N=I.useCallback(async z=>{try{await F1({blueprintId:z}),c(k=>k.filter($=>$!==z)),await p()}catch(k){const $=k instanceof ha||k instanceof Error?k.message:String(k);o({kind:"error",message:$})}},[p]),x=I.useCallback(z=>{c(k=>k.includes(z)?k.filter($=>$!==z):[...k,z])},[]);return r.jsxs("section",{className:"ggui-section","data-ggui-variant-detail":!0,"data-ggui-variant-detail-hash":e,children:[r.jsx(tt,{num:"01 / contract",title:"One contract — many variants.",mute:`hash ${e.slice(0,16)}…`,intro:r.jsxs(r.Fragment,{children:["Every variant the server has for this contract, grouped under the canonical"," ",r.jsx("code",{className:"ggui-code",children:"contractHash"}),'. Pick two with the "add to compare" toggle, hit Compare selected, and read aesthetics side-by-side.']})}),r.jsxs("div",{style:{marginBottom:16},children:[r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:()=>Ve("/admin/variants"),children:"← all variants"})," ",r.jsx("button",{type:"button",className:"ggui-btn","data-ggui-variant-detail-generate":!0,onClick:()=>Ve(`/admin/variants/${encodeURIComponent(e)}/generate`),children:"generate new variant +"})]}),n.kind==="error"?r.jsxs("div",{className:"ggui-card",style:{marginBottom:20},children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"error"}),r.jsx("span",{className:"ggui-card__num",children:"ERR / 01"})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsxs("p",{className:"ggui-body",children:[r.jsx(Ce,{tone:"signal",children:"error"})," Couldn't load variants — ",n.message,"."]}),r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:()=>{p()},children:"retry →"})]})]}):null,h?r.jsxs("div",{className:"ggui-card",style:{marginBottom:20},children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"contract"}),r.jsx("span",{className:"ggui-card__num",children:"CTR / 01"})]}),r.jsx("div",{className:"ggui-card__body",children:r.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"?r.jsx("p",{className:"ggui-body",children:"Loading variants…"}):g.length===0?r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"empty"}),r.jsx("span",{className:"ggui-card__num",children:"VAR / 00"})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsx("p",{className:"ggui-body",children:"No variants registered for this contract."}),r.jsx("p",{className:"ggui-muted",children:'Click "generate new variant" above to author the first one.'})]})]}):r.jsxs(r.Fragment,{children:[r.jsxs("div",{"data-ggui-variant-compare-controls":!0,style:{display:"flex",gap:12,alignItems:"center",marginBottom:16},children:[r.jsxs(Ce,{tone:"ink",children:[l.length," selected"]}),r.jsx("button",{type:"button",className:"ggui-btn","data-ggui-variant-compare-run":!0,disabled:l.length<2,onClick:()=>f(!0),children:"compare selected →"}),u?r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost","data-ggui-variant-compare-clear":!0,onClick:()=>{f(!1),c([])},children:"exit compare"}):null]}),u&&y.length>=2?r.jsx("div",{"data-ggui-variant-compare-set":y.length,style:{marginBottom:24},children:r.jsx(V9,{blueprints:y,height:420})}):r.jsx("div",{className:"ggui-stack",style:{marginBottom:24},"aria-label":"variants and preview",children:g.map((z,k)=>r.jsxs("article",{"data-ggui-variant-detail-row":!0,"data-ggui-variant-detail-row-id":z.blueprintId,style:{display:"grid",gridTemplateColumns:"minmax(0, 1fr) minmax(0, 1fr)",gap:16,padding:12,borderBottom:"1px solid var(--ggui-line2, #d6d4cb)"},children:[r.jsx("ul",{className:"ggui-stack__list",style:{listStyle:"none",margin:0,padding:0},children:r.jsx(Z1,{blueprint:z,index:k,onPreview:v,onSetDefault:$=>{S($)},onDelete:$=>{N($)},compareSelected:l.includes(z.blueprintId),onCompareToggle:x})}),r.jsx(q1,{blueprint:z,height:240})]},z.blueprintId))})]})]})}function J9({contract:e,contractHash:n,onSubmit:o,onCancel:l,generatorSlugs:c}){const[u,f]=I.useState(""),[p,g]=I.useState(""),[h,y]=I.useState(""),[v,S]=I.useState(""),[N,x]=I.useState(!1),[E,z]=I.useState({kind:"idle"}),k=async w=>{w.preventDefault();let R;if(v.trim().length>0)try{const j=JSON.parse(v);if(typeof j!="object"||j===null||Array.isArray(j)){z({kind:"error",message:'context must be a JSON object (e.g. {"foo": "bar"})'});return}R=j}catch(j){z({kind:"error",message:`context JSON parse failed — ${j instanceof Error?j.message:String(j)}`});return}z({kind:"pending"});const b={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()}:{},...N?{setAsOperatorDefault:!0}:{}};try{const j=await o(b);"error"in j&&z({kind:"error",message:j.error})}catch(j){z({kind:"error",message:j instanceof Error?j.message:String(j)})}},$=c??P1;return r.jsxs("form",{"data-ggui-variant-generate-form":!0,"data-ggui-variant-generate-state":E.kind,className:"ggui-form",onSubmit:k,children:[r.jsxs(mf,{title:"contract",num:"GEN / 01",children:[r.jsxs("p",{className:"ggui-muted",style:{margin:"0 0 8px"},children:["Contract hash"," ",r.jsxs("code",{className:"ggui-code",children:[n.slice(0,16),"…"]})," ","— read-only; create variants for the same contract here."]}),r.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)})]}),r.jsxs(mf,{title:"variance",num:"GEN / 02",children:[r.jsxs("div",{className:"ggui-field",children:[r.jsx("label",{className:"ggui-label",htmlFor:"ggui-gen-persona",children:"persona"}),r.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:w=>f(w.target.value),autoCapitalize:"off",autoCorrect:"off",spellCheck:!1})]}),r.jsxs("div",{className:"ggui-field",children:[r.jsx("label",{className:"ggui-label",htmlFor:"ggui-gen-seed",children:"seed prompt"}),r.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:w=>g(w.target.value),rows:3})]}),r.jsxs("div",{className:"ggui-field",children:[r.jsx("label",{className:"ggui-label",htmlFor:"ggui-gen-context",children:"context (JSON object, optional)"}),r.jsx("textarea",{id:"ggui-gen-context",name:"context","data-ggui-variant-generate-context":!0,placeholder:'{"locale": "en", "density": "compact"}',value:v,onChange:w=>S(w.target.value),rows:3,spellCheck:!1,style:{fontFamily:"var(--ggui-font-mono, monospace)"}})]})]}),r.jsxs(mf,{title:"dispatch",num:"GEN / 03",children:[r.jsxs("div",{className:"ggui-field",children:[r.jsx("label",{className:"ggui-label",htmlFor:"ggui-gen-generator",children:"generator"}),r.jsxs("select",{id:"ggui-gen-generator",name:"generator","data-ggui-variant-generate-generator":!0,value:h,onChange:w=>y(w.target.value),children:[r.jsx("option",{value:"",children:"(registry default)"}),$.map(w=>r.jsx("option",{value:w,children:w},w))]})]}),r.jsxs("label",{className:"ggui-field",htmlFor:"ggui-gen-set-default",style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer"},children:[r.jsx("input",{id:"ggui-gen-set-default","data-ggui-variant-generate-set-default":!0,type:"checkbox",checked:N,onChange:w=>x(w.target.checked)}),r.jsx("span",{className:"ggui-label",style:{margin:0},children:"pin as operator default for this contract"})]})]}),E.kind==="error"?r.jsxs("p",{className:"ggui-body",children:[r.jsx(Ce,{tone:"signal",children:"error"})," ",E.message]}):null,r.jsxs("div",{style:{display:"flex",gap:12,marginTop:16},children:[r.jsx("button",{type:"submit",className:"ggui-btn","data-ggui-variant-generate-submit":!0,disabled:E.kind==="pending",children:E.kind==="pending"?"generating…":"generate →"}),l?r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:l,disabled:E.kind==="pending",children:"cancel"}):null]})]})}function mf({title:e,num:n,children:o}){return r.jsxs("div",{className:"ggui-card",style:{marginBottom:16},children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:e}),r.jsx("span",{className:"ggui-card__num",children:n})]}),r.jsx("div",{className:"ggui-card__body",children:o})]})}function Q9({contractHash:e}){const[n,o]=I.useState({kind:"loading"});return I.useEffect(()=>{const l=new AbortController;return(async()=>{try{const c=await Jf({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 ha||c instanceof Error?c.message:String(c);o({kind:"error",message:u})}})(),()=>l.abort()},[e]),r.jsxs("section",{className:"ggui-section",children:[r.jsx(tt,{num:"01 / generate",title:"Author a new variant.",mute:`hash ${e.slice(0,16)}…`,intro:r.jsxs(r.Fragment,{children:["Forks the contract from an existing variant in this group and dispatches it through"," ",r.jsx("code",{className:"ggui-code",children:"ggui_ops_generate_blueprint"})," ","with your persona + context + seed prompt. The new blueprint persists under the same"," ",r.jsx("code",{className:"ggui-code",children:"contractHash"}),"."]})}),r.jsx("div",{style:{marginBottom:16},children:r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:()=>Ve(`/admin/variants/${encodeURIComponent(e)}`),children:"← contract detail"})}),n.kind==="loading"?r.jsx("p",{className:"ggui-body",children:"Loading contract…"}):n.kind==="error"?r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"error"}),r.jsx("span",{className:"ggui-card__num",children:"ERR / 01"})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsxs("p",{className:"ggui-body",children:[r.jsx(Ce,{tone:"signal",children:"error"})," ","Couldn't load contract — ",n.message,"."]}),r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:()=>Ve("/admin/variants"),children:"← all variants"})]})]}):n.kind==="empty"?r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"empty"}),r.jsx("span",{className:"ggui-card__num",children:"VAR / 00"})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsxs("p",{className:"ggui-body",children:["No variant exists for hash"," ",r.jsx("code",{className:"ggui-code",children:e})," yet."]}),r.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."}),r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:()=>Ve("/admin/variants"),children:"← all variants"})]})]}):r.jsx(J9,{contract:n.contract,contractHash:e,onSubmit:async l=>{try{const c=await W9(l);return Ve(`/preview/${encodeURIComponent(c.blueprintId)}`),{blueprintId:c.blueprintId}}catch(c){return{error:c instanceof ha||c instanceof Error?c.message:String(c)}}},onCancel:()=>Ve(`/admin/variants/${encodeURIComponent(e)}`)})]})}function eN(e){const n=new Map;for(const o of e){const l=n.get(o.contractHash);l?l.push(o):n.set(o.contractHash,[o])}return Array.from(n.entries()).map(([o,l])=>{const c=[...l].sort((p,g)=>{const h=p.isOperatorDefault===!0?1:0,y=g.isOperatorDefault===!0?1:0;if(h!==y)return y-h;const v=p.validatorScore??-1,S=g.validatorScore??-1;return v!==S?S-v:g.createdAt.localeCompare(p.createdAt)}),u=c[0],f=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:f,blueprints:c}}).sort((o,l)=>{var f,p;const c=((f=o.blueprints[0])==null?void 0:f.createdAt)??"";return(((p=l.blueprints[0])==null?void 0:p.createdAt)??"").localeCompare(c)})}function tN({blueprints:e,filters:n,onPreview:o,onSetDefault:l,onDelete:c,onOpenContract:u,onGenerate:f}){const p=I.useMemo(()=>eN(e),[e]);return e.length===0?r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"empty"}),r.jsx("span",{className:"ggui-card__num",children:"VAR / 00"})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsx("p",{className:"ggui-body",style:{margin:0},children:"No blueprints for this app yet."}),r.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"," ",r.jsx("code",{className:"ggui-code",children:"ggui_handshake"}),"."]})]})]}):r.jsx("div",{"data-ggui-variants-list":!0,"aria-label":"blueprint variants",children:p.map(g=>r.jsx(aN,{group:g,filters:n,onPreview:o,onSetDefault:l,onDelete:c,onOpenContract:u,onGenerate:f},g.contractHash))})}function aN({group:e,filters:n,onPreview:o,onSetDefault:l,onDelete:c,onOpenContract:u,onGenerate:f}){const[p,g]=I.useState(!0),h=e.blueprints.filter(y=>q9(y,n));return r.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:[r.jsxs("header",{className:"ggui-stack__head",style:{alignItems:"center",gap:12},children:[r.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"]}),r.jsx("span",{className:"ggui-stack__label",children:e.intent}),r.jsxs(Ce,{tone:"ink",children:[h.length,h.length!==e.blueprints.length?` / ${e.blueprints.length}`:""," ","variant",h.length===1?"":"s"]}),r.jsxs("code",{className:"ggui-code",style:{marginLeft:"auto",fontSize:"0.75rem"},children:[e.contractHash.slice(0,16),"…"]}),r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost","data-ggui-variants-group-open":!0,onClick:()=>u(e.contractHash),children:"open →"}),r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost","data-ggui-variants-group-generate":!0,onClick:()=>f(e.contractHash),children:"generate variant +"})]}),p?h.length===0?r.jsx("p",{className:"ggui-muted",style:{margin:0,padding:12},children:"No variants in this group match the active filters."}):r.jsx("ul",{className:"ggui-stack__list",children:h.map((y,v)=>r.jsx(Z1,{blueprint:y,index:v,onPreview:o,onSetDefault:l,onDelete:c},y.blueprintId))}):null]})}function nN(){const[e,n]=I.useState({kind:"loading"}),[o,l]=I.useState(H9),c=I.useCallback(async y=>{n({kind:"loading"});try{const v=await Jf({},y);n({kind:"ready",blueprints:v.blueprints})}catch(v){if(y!=null&&y.aborted)return;const S=v instanceof ha||v instanceof Error?v.message:String(v);n({kind:"error",message:S})}},[]);I.useEffect(()=>{const y=new AbortController;return c(y.signal),()=>y.abort()},[c]);const u=I.useCallback(y=>{Ve(`/preview/${encodeURIComponent(y)}`)},[]),f=I.useCallback(async y=>{try{await G1({blueprintId:y,isOperatorDefault:!0}),await c()}catch(v){const S=v instanceof ha||v instanceof Error?v.message:String(v);n({kind:"error",message:S})}},[c]),p=I.useCallback(async y=>{try{await F1({blueprintId:y}),await c()}catch(v){const S=v instanceof ha||v instanceof Error?v.message:String(v);n({kind:"error",message:S})}},[c]),g=I.useCallback(y=>{Ve(`/admin/variants/${encodeURIComponent(y)}`)},[]),h=I.useCallback(y=>{Ve(`/admin/variants/${encodeURIComponent(y)}/generate`)},[]);return r.jsxs("section",{className:"ggui-section",children:[r.jsx(tt,{num:"01 / variants",title:"Blueprint variants — N codes per contract.",mute:"Operator-pinned defaults · validatorScore · personas.",intro:r.jsx(r.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"?r.jsxs("div",{className:"ggui-card",style:{marginBottom:20},children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"error"}),r.jsx("span",{className:"ggui-card__num",children:"ERR / 01"})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsxs("p",{className:"ggui-body",children:[r.jsx(Ce,{tone:"signal",children:"error"})," Couldn't load variants — ",e.message,"."]}),r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:()=>{c()},children:"retry →"})]})]}):null,r.jsx(B9,{filters:o,onChange:l}),e.kind==="loading"?r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"loading"}),r.jsx("span",{className:"ggui-card__num",children:"VAR / 01"})]}),r.jsx("div",{className:"ggui-card__body",children:r.jsx("p",{className:"ggui-body",children:"Loading variants…"})})]}):e.kind==="ready"?r.jsx(tN,{blueprints:e.blueprints,filters:o,onPreview:u,onSetDefault:y=>{f(y)},onDelete:y=>{p(y)},onOpenContract:g,onGenerate:h}):null]})}function rN(){const[e,n]=I.useState({kind:"loading"}),[o,l]=I.useState(null),[c,u]=I.useState(null),f=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)})}};I.useEffect(()=>{f()},[]);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 f()}catch(h){n({kind:"error",message:`revoke failed — ${String(h)}`})}finally{l(null)}};return r.jsxs("section",{className:"ggui-section",children:[r.jsx(tt,{num:"01 / clients",title:"Connected apps.",mute:"OAuth clients that have registered against this server.",intro:r.jsxs(r.Fragment,{children:["Each row is an OAuth client (typically an MCP custom-connector host like claude.ai) that completed"," ",r.jsx("code",{className:"ggui-code",children:"/oauth/register"})," against this server. Revoke removes the registration so future re-discovery fails — Phase 1 caveat:"," ",r.jsx("strong",{children:"existing bearers keep working"})," until they expire or you re-pair."]})}),e.kind==="loading"?r.jsx("p",{className:"ggui-muted",style:{margin:0,padding:12},children:"Loading clients…"}):e.kind==="error"?r.jsxs("p",{className:"ggui-muted",style:{margin:0,padding:12},"data-ggui-clients-error":!0,children:["Couldn't load clients — ",e.message]}):r.jsx(iN,{clients:e.data.clients,revokingId:o,pendingConfirm:c,onRevokeRequest:g=>u(g),onRevokeCancel:()=>u(null),onRevokeConfirm:g=>{p(g)},onRefresh:()=>{f()}})]})}function iN({clients:e,revokingId:n,pendingConfirm:o,onRevokeRequest:l,onRevokeCancel:c,onRevokeConfirm:u,onRefresh:f}){return e.length===0?r.jsxs("div",{className:"ggui-stack","data-ggui-clients-list":!0,"aria-label":"connected apps (empty)",children:[r.jsxs("div",{className:"ggui-stack__head",children:[r.jsx("span",{className:"ggui-stack__num",children:"CON"}),r.jsx("span",{className:"ggui-stack__label",children:"connected apps"}),r.jsx("span",{className:"ggui-stack__count",children:"0"})]}),r.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."})]}):r.jsxs("div",{"data-ggui-clients-list":!0,className:"ggui-stack","aria-label":"connected apps",children:[r.jsxs("div",{className:"ggui-stack__head",children:[r.jsx("span",{className:"ggui-stack__num",children:"CON"}),r.jsx("span",{className:"ggui-stack__label",children:"connected apps"}),r.jsx("span",{className:"ggui-stack__count",children:e.length}),r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:f,style:{marginLeft:"auto"},children:"refresh"})]}),r.jsx("ul",{className:"ggui-stack__list",children:e.map((p,g)=>r.jsx(oN,{client:p,index:g+1,isRevoking:n===p.clientId,isPendingConfirm:o===p.clientId,onRevokeRequest:l,onRevokeCancel:c,onRevokeConfirm:u},p.clientId))})]})}function oN({client:e,index:n,isRevoking:o,isPendingConfirm:l,onRevokeRequest:c,onRevokeCancel:u,onRevokeConfirm:f}){const p=e.clientId.slice(0,12),g=e.clientName??p;return r.jsxs("li",{"data-ggui-client-id":e.clientId,className:"ggui-stack__entry",style:{opacity:o?.5:1},children:[r.jsxs("div",{className:"ggui-stack__entry-head",children:[r.jsx("span",{className:"ggui-stack__entry-num",children:`CON / ${String(n).padStart(2,"0")}`}),r.jsx("span",{className:"ggui-stack__entry-title",children:g})]}),r.jsxs("div",{className:"ggui-stack__entry-meta",children:[r.jsxs("span",{children:["id ",r.jsxs("code",{className:"ggui-code",children:[p,"…"]})]}),r.jsxs("span",{style:{marginLeft:12},children:["registered"," ",r.jsx("code",{className:"ggui-code",children:lN(e.createdAt)})]})]}),e.redirectUris.length>0?r.jsx("div",{className:"ggui-stack__entry-meta",style:{marginTop:4},children:r.jsxs("span",{children:["redirect"," ",r.jsx("code",{className:"ggui-code",children:e.redirectUris[0]}),e.redirectUris.length>1?` (+${e.redirectUris.length-1} more)`:""]})}):null,r.jsx("div",{style:{marginTop:12,display:"flex",gap:10,alignItems:"center"},children:l?r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button",className:"ggui-btn","data-ggui-client-revoke":!0,disabled:o,onClick:()=>f(e.clientId),children:o?"revoking…":"confirm revoke"}),r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",disabled:o,onClick:u,children:"cancel"})]}):r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost","data-ggui-client-revoke":!0,disabled:o,onClick:()=>c(e.clientId),children:"revoke"})})]})}function lN(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 sN=new Set(["theme"]),cN={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 uN(){const[e,n]=I.useState({kind:"loading"});return I.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"?r.jsxs("section",{className:"ggui-section",children:[r.jsx(tt,{num:"01 / config",title:"ggui.json viewer.",mute:"Probing project root."}),r.jsx(ev,{title:"loading",num:"CFG / 01",tone:"draft",children:"Loading config…"})]}):e.kind==="error"?r.jsxs("section",{className:"ggui-section",children:[r.jsx(tt,{num:"01 / config",title:"ggui.json viewer.",mute:"Endpoint unreachable."}),r.jsxs(ev,{title:"error",num:"ERR / 01",tone:"signal",children:["Couldn't load config — ",e.message,"."]})]}):r.jsx(dN,{data:e.data})}function dN({data:e}){const n=I.useMemo(()=>Object.keys(e.schema.properties??{}).filter(u=>!sN.has(u)),[e.schema]),[o,l]=I.useState(n[0]??""),c=e.source.found?e.source.error?"found-invalid":"found-valid":"missing";return r.jsxs("section",{className:"ggui-section","data-ggui-config-source":c,children:[r.jsx(tt,{num:"01 / admin / config",title:"ggui.json — read-only manifest view.",mute:fN(e),intro:r.jsxs(r.Fragment,{children:["Debug view of every top-level field your"," ",r.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 ",r.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."]})}),r.jsx(pN,{data:e}),c==="found-invalid"?null:r.jsxs("div",{className:"ggui-config-stack",children:[r.jsx(gN,{sections:n,active:o,onSelect:l}),r.jsx(mN,{data:e,active:o})]}),e.source.found&&"raw"in e&&e.raw?r.jsx(vN,{raw:e.raw}):null]})}function fN(e){return e.source.found?e.source.error?"Validation failed.":"Loaded from disk.":"No ggui.json reachable."}function pN({data:e}){return e.source.found?e.source.error?r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"validation failed"}),r.jsx("span",{className:"ggui-card__num",children:"SRC / 01"})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsx("p",{className:"ggui-body",children:r.jsx(Ce,{tone:"signal",children:"invalid"})}),r.jsx("p",{className:"ggui-muted",children:r.jsx("code",{className:"ggui-code",children:e.source.path})}),r.jsx("pre",{className:"ggui-config-error",children:e.source.error.message})]})]}):r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"source"}),r.jsx("span",{className:"ggui-card__num",children:"SRC / 01"})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsx("p",{className:"ggui-body",children:r.jsx(Ce,{tone:"live",children:"loaded"})}),r.jsx("p",{className:"ggui-muted",children:r.jsx("code",{className:"ggui-code",children:e.source.path})})]})]}):r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"no manifest"}),r.jsx("span",{className:"ggui-card__num",children:"SRC / 01"})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsx("p",{className:"ggui-body",children:r.jsx(Ce,{tone:"ink",children:"missing"})}),r.jsxs("p",{className:"ggui-muted",children:["No ",r.jsx("code",{className:"ggui-code",children:"ggui.json"})," walked up from"," ",r.jsx("code",{className:"ggui-code",children:e.source.searchedFrom}),". The schema below shows what would be configurable; create a"," ",r.jsx("code",{className:"ggui-code",children:"ggui.json"})," at the project root and reload."]})]})]})}function gN({sections:e,active:n,onSelect:o}){return r.jsx("nav",{"aria-label":"config sections","data-ggui-config-active-section":n,children:r.jsx("ul",{className:"ggui-config-tabs",role:"tablist",children:e.map(l=>r.jsx("li",{"data-ggui-config-section":l,role:"presentation",children:r.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 mN({data:e,active:n}){var f,p;const o=(f=e.schema.properties)==null?void 0:f[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 r.jsx("div",{className:"ggui-config-panel",children:r.jsxs("p",{className:"ggui-muted",children:['No schema for "',n,'".']})});const u=cN[n];return r.jsxs("div",{className:"ggui-config-panel","data-ggui-config-section":n,children:[r.jsxs("div",{className:"ggui-config-panel__head",children:[r.jsx("span",{className:"ggui-config-panel__name",children:r.jsx("code",{className:"ggui-code",children:n})}),c?r.jsx(Ce,{tone:"signal",children:"required"}):r.jsx(Ce,{tone:"ink",children:"optional"}),r.jsx("span",{className:"ggui-config-panel__type",children:hN(o)})]}),u?r.jsx(yN,{link:u}):null,o.description?r.jsx("p",{className:"ggui-body",style:{margin:"12px 0"},children:o.description}):r.jsx("p",{className:"ggui-muted",children:"No description on the schema — file a bug if this is a known field."}),r.jsx(oc,{label:"current",value:l,absentNote:"not set in your manifest — schema default applies"}),o.default!==void 0?r.jsx(oc,{label:"default",value:o.default}):r.jsx(oc,{label:"default",value:void 0,absentNote:"no default — must be set explicitly when used"}),o.enum?r.jsx(oc,{label:"allowed",value:o.enum}):null,r.jsxs("div",{style:{marginTop:16},children:[r.jsx("div",{className:"ggui-stack__entry-meta",style:{marginBottom:6,textTransform:"uppercase",letterSpacing:"0.12em"},children:"schema"}),r.jsx("pre",{className:"ggui-config-schema",children:JSON.stringify(o,null,2)})]})]})}function hN(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 yN({link:e}){return r.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:[r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:()=>Ve(e.path),style:{fontSize:12},children:e.label}),r.jsx("span",{className:"ggui-muted",style:{fontSize:12,flex:1},children:e.mute})]})}function oc({label:e,value:n,absentNote:o}){return r.jsxs("div",{className:"ggui-config-value-row",children:[r.jsx("div",{className:"ggui-stack__entry-meta",style:{marginBottom:4,textTransform:"uppercase",letterSpacing:"0.12em"},children:e}),n===void 0?r.jsx("p",{className:"ggui-muted",style:{margin:0},children:o??"—"}):r.jsx("pre",{className:"ggui-config-value",children:JSON.stringify(n,null,2)})]})}function vN({raw:e}){const[n,o]=I.useState(!1);return r.jsxs("div",{className:"ggui-card",style:{marginTop:24},children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"raw ggui.json"}),r.jsx("span",{className:"ggui-card__num",children:"RAW / 01"})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsxs("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:()=>o(l=>!l),"aria-expanded":n,children:[n?"hide":"show"," raw bytes"]}),n?r.jsx("pre",{className:"ggui-config-raw","data-ggui-config-raw":!0,children:e}):null]})]})}function ev({title:e,num:n,tone:o,children:l}){return r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:e}),r.jsx("span",{className:"ggui-card__num",children:n})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsx("p",{className:"ggui-body",children:r.jsx(Ce,{tone:o,children:e})}),r.jsx("p",{className:"ggui-muted",children:l})]})]})}function $N(){const[e,n]=I.useState([]),[o,l]=I.useState("loading"),[c,u]=I.useState(null),[f,p]=I.useState(new Set),g=I.useRef(new Set);I.useEffect(()=>{let y=!1,v=null;const S=x=>{g.current.has(x.id)||(g.current.add(x.id),n(E=>[x,...E].slice(0,500)))};return(async()=>{try{const x=await fetch("/ggui/console/llm-trace/recent?limit=100",{credentials:"same-origin",headers:{accept:"application/json"}});if(!x.ok)throw new Error(`recent fetch returned ${x.status}`);const E=await x.json();if(y)return;const z=[...E.events].reverse();for(const k of z)g.current.add(k.id);n(z),l("live")}catch(x){if(y)return;l("error"),u(x instanceof Error?x.message:"Could not load recent LLM trace.");return}v=new EventSource("/ggui/console/llm-trace/stream",{withCredentials:!0}),v.onmessage=x=>{try{const E=JSON.parse(x.data);S(E)}catch{}},v.onerror=()=>{l("reconnecting")},v.onopen=()=>{l("live")}})(),()=>{y=!0,v&&v.close()}},[]);const h=y=>{p(v=>{const S=new Set(v);return S.has(y)?S.delete(y):S.add(y),S})};return r.jsxs("section",{className:"ggui-section",children:[r.jsx(tt,{num:"DEVTOOLS / 7A",title:"LLM trace.",mute:"Live.",intro:r.jsx(r.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."})}),r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"events"}),r.jsx("span",{className:"ggui-card__num",children:o==="loading"?"connecting…":o==="live"?`live · ${e.length}`:o==="reconnecting"?"reconnecting…":"error"})]}),r.jsxs("div",{className:"ggui-card__body",children:[c?r.jsx("p",{className:"ggui-muted","data-ggui-llm-trace-error":!0,children:c}):null,e.length===0&&o!=="error"?r.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,r.jsx("ul",{style:{listStyle:"none",padding:0,margin:0,display:"grid",gap:12},"data-ggui-llm-trace-list":!0,children:e.map(y=>r.jsx(bN,{event:y,expanded:f.has(y.id),onToggle:()=>h(y.id)},y.id))})]})]})]})}function bN({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`:""):"—",f=e.error?"error":"ok";return r.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":f,children:[r.jsxs("button",{type:"button",onClick:o,style:{all:"unset",cursor:"pointer",display:"flex",gap:12,alignItems:"baseline",width:"100%"},children:[r.jsx("span",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)"},children:c}),r.jsxs("span",{style:{fontFamily:"var(--ggui-font-mono)",fontSize:12},children:[e.provider,"/",e.model]}),r.jsx("span",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)"},children:e.kind}),r.jsx("span",{style:{flex:1}}),r.jsxs("span",{className:"ggui-muted",style:{fontSize:11},children:[e.durationMs,"ms"]}),r.jsx("span",{className:"ggui-muted",style:{fontSize:11},children:u}),e.error?r.jsx("span",{style:{fontSize:11,padding:"0 6px",border:"1px solid var(--ggui-rule)"},children:"error"}):null]}),n?r.jsx(xN,{event:e}):null]})}function xN({event:e}){var n,o,l;return r.jsxs("div",{style:{marginTop:10,paddingTop:10,borderTop:"1px solid var(--ggui-rule)",display:"grid",gap:12},children:[e.error?r.jsx(Br,{label:"error",children:r.jsx("pre",{style:Fo,children:e.error.message})}):null,e.systemPrompt?r.jsx(Br,{label:"system prompt",children:r.jsx("pre",{style:Fo,children:e.systemPrompt})}):null,e.userPrompt?r.jsx(Br,{label:"user prompt",children:r.jsx("pre",{style:Fo,children:e.userPrompt})}):null,e.tools&&e.tools.length>0?r.jsx(Br,{label:`tools (${e.tools.length})`,children:r.jsx("ul",{style:{listStyle:"none",padding:0,margin:0},children:e.tools.map(c=>r.jsxs("li",{style:{fontFamily:"var(--ggui-font-mono)",fontSize:12,padding:"2px 0"},children:[r.jsx("strong",{children:c.name}),r.jsxs("span",{className:"ggui-muted",children:[" — ",c.description]})]},c.name))})}):null,(n=e.result)!=null&&n.text?r.jsx(Br,{label:"completion text",children:r.jsx("pre",{style:Fo,children:e.result.text})}):null,(o=e.result)!=null&&o.toolCalls&&e.result.toolCalls.length>0?r.jsx(Br,{label:`tool calls (${e.result.toolCalls.length})`,children:r.jsx("pre",{style:Fo,children:JSON.stringify(e.result.toolCalls,null,2)})}):null,(l=e.result)!=null&&l.turnsUsed?r.jsx(Br,{label:"agentic turns",children:r.jsx("span",{className:"ggui-muted",children:e.result.turnsUsed})}):null]})}function Br({label:e,children:n}){return r.jsxs("div",{children:[r.jsx("div",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)",textTransform:"uppercase",marginBottom:4},children:e}),n]})}const Fo={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 _N(){const[e,n]=I.useState([]),[o,l]=I.useState("loading"),[c,u]=I.useState(null),[f,p]=I.useState(new Set),g=I.useRef(new Set);I.useEffect(()=>{let y=!1,v=null;const S=x=>{g.current.has(x.id)||(g.current.add(x.id),n(E=>[x,...E].slice(0,500)))};return(async()=>{try{const x=await fetch("/ggui/console/validator/recent?limit=100",{credentials:"same-origin",headers:{accept:"application/json"}});if(!x.ok)throw new Error(`recent fetch returned ${x.status}`);const E=await x.json();if(y)return;const z=[...E.events].reverse();for(const k of z)g.current.add(k.id);n(z),l("live")}catch(x){if(y)return;l("error"),u(x instanceof Error?x.message:"Could not load recent validator trace.");return}v=new EventSource("/ggui/console/validator/stream",{withCredentials:!0}),v.onmessage=x=>{try{const E=JSON.parse(x.data);S(E)}catch{}},v.onerror=()=>{l("reconnecting")},v.onopen=()=>{l("live")}})(),()=>{y=!0,v&&v.close()}},[]);const h=y=>{p(v=>{const S=new Set(v);return S.has(y)?S.delete(y):S.add(y),S})};return r.jsxs("section",{className:"ggui-section",children:[r.jsx(tt,{num:"DEVTOOLS / 7B",title:"Validator tier results.",mute:"Live.",intro:r.jsxs(r.Fragment,{children:["Every ",r.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."]})}),r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"events"}),r.jsx("span",{className:"ggui-card__num",children:o==="loading"?"connecting…":o==="live"?`live · ${e.length}`:o==="reconnecting"?"reconnecting…":"error"})]}),r.jsxs("div",{className:"ggui-card__body",children:[c?r.jsx("p",{className:"ggui-muted","data-ggui-validator-error":!0,children:c}):null,e.length===0&&o!=="error"?r.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,r.jsx("ul",{style:{listStyle:"none",padding:0,margin:0,display:"grid",gap:12},"data-ggui-validator-list":!0,children:e.map(y=>r.jsx(jN,{event:y,expanded:f.has(y.id),onToggle:()=>h(y.id)},y.id))})]})]})]})}function jN({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,f=e.issues.filter(h=>h.result==="warn").length,p=u>0?"fail":f>0?"warn":"pass",g=e.harnessId.length>12?e.harnessId.slice(0,12)+"…":e.harnessId;return r.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:[r.jsxs("button",{type:"button",onClick:o,style:{all:"unset",cursor:"pointer",display:"flex",gap:12,alignItems:"baseline",width:"100%",flexWrap:"wrap"},children:[r.jsx("span",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)"},children:c}),r.jsx("span",{style:{fontFamily:"var(--ggui-font-mono)",fontSize:12},title:e.harnessId,children:g}),r.jsx("span",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)"},children:e.workflowId}),r.jsx(lc,{label:"axis",count:e.summary.axisIssues}),r.jsx(lc,{label:"tier-0",count:e.summary.tierIssues}),r.jsx(lc,{label:"probe",count:e.summary.runtimeRenderIssues,dimmed:e.skippedRuntimeRender}),r.jsx(lc,{label:"llm",count:e.summary.llmIssues}),r.jsx("span",{style:{flex:1}}),r.jsxs("span",{className:"ggui-muted",style:{fontSize:11},children:[e.durationMs,"ms"]}),r.jsx(SN,{outcome:p,fails:u,warns:f})]}),n?r.jsx(wN,{event:e}):null]})}function lc({label:e,count:n,dimmed:o}){const l=n>0;return r.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 SN({outcome:e,fails:n,warns:o}){const l=e==="pass"?"pass":e==="warn"?`${o} warn`:`${n} fail`;return r.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 wN({event:e}){const n=kN(e.issues);return r.jsxs("div",{style:{marginTop:10,paddingTop:10,borderTop:"1px solid var(--ggui-rule)",display:"grid",gap:12},children:[e.error?r.jsx(Ba,{label:"error",children:r.jsx("pre",{style:cc,children:e.error.message})}):null,r.jsx(Ba,{label:"harness",children:r.jsxs("div",{style:{fontFamily:"var(--ggui-font-mono)",fontSize:12},children:[r.jsxs("div",{children:["id: ",e.harnessId]}),r.jsxs("div",{children:["workflow: ",e.workflowId]}),r.jsxs("div",{children:["compiled: ",e.hadCompiledCode?"yes":"no — checks skipped"]}),r.jsxs("div",{children:["runtime-render: ",e.skippedRuntimeRender?"skipped":"ran"]})]})}),r.jsx(Ba,{label:"classification",children:r.jsx("div",{style:{fontFamily:"var(--ggui-font-mono)",fontSize:12},children:Object.entries(e.classification).map(([o,l])=>r.jsxs("div",{children:[o,": ",String(l)]},o))})}),e.summary.firedCheckIds.length>0?r.jsx(Ba,{label:`fired check ids (${e.summary.firedCheckIds.length})`,children:r.jsx("pre",{style:cc,children:e.summary.firedCheckIds.join(`
210
+ `)})}):null,n.axis.length>0?r.jsx(Ba,{label:`axis issues (${n.axis.length})`,children:r.jsx(sc,{issues:n.axis})}):null,n.tier0.length>0?r.jsx(Ba,{label:`tier-0 issues (${n.tier0.length})`,children:r.jsx(sc,{issues:n.tier0})}):null,n.tier1.length>0?r.jsx(Ba,{label:`tier-1 issues (${n.tier1.length})`,children:r.jsx(sc,{issues:n.tier1})}):null,n.tier2.length>0?r.jsx(Ba,{label:`tier-2 issues (${n.tier2.length})`,children:r.jsx(sc,{issues:n.tier2})}):null,e.prompt?r.jsx(Ba,{label:"prompt",children:r.jsx("pre",{style:cc,children:e.prompt})}):null,e.sourceCode?r.jsx(Ba,{label:"source under check",children:r.jsx("pre",{style:cc,children:e.sourceCode})}):null]})}function kN(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 sc({issues:e}){return r.jsx("ul",{style:{listStyle:"none",padding:0,margin:0,display:"grid",gap:8},children:e.map((n,o)=>r.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:[r.jsxs("div",{style:{display:"flex",gap:8,alignItems:"baseline",flexWrap:"wrap",fontSize:11,fontFamily:"var(--ggui-font-mono)"},children:[r.jsx("span",{style:{padding:"0 4px",border:"1px solid var(--ggui-rule)"},children:n.result}),r.jsx("span",{style:{fontWeight:500},children:n.category}),n.subcategory?r.jsx("span",{className:"ggui-muted",children:n.subcategory}):null,n.priority?r.jsx("span",{className:"ggui-muted",children:n.priority}):null,n.severity?r.jsx("span",{className:"ggui-muted",children:n.severity}):null,typeof n.line=="number"?r.jsxs("span",{className:"ggui-muted",children:["line ",n.line]}):null]}),r.jsx("div",{style:{fontSize:12,marginTop:4},children:n.description}),n.fix?r.jsxs("div",{className:"ggui-muted",style:{fontSize:12,marginTop:2},children:["fix: ",n.fix]}):null]},o))})}function Ba({label:e,children:n}){return r.jsxs("div",{children:[r.jsx("div",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)",textTransform:"uppercase",marginBottom:4},children:e}),n]})}const cc={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 NN(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 zN(){const[e,n]=I.useState([]),[o,l]=I.useState("loading"),[c,u]=I.useState(null),[f,p]=I.useState(new Set),[g,h]=I.useState("all"),[y,v]=I.useState("all"),S=I.useRef(new Set);I.useEffect(()=>{let $=!1,w=null;const R=j=>{S.current.has(j.id)||(S.current.add(j.id),n(T=>[j,...T].slice(0,500)))};return(async()=>{try{const j=await fetch("/ggui/console/cache/recent?limit=100",{credentials:"same-origin",headers:{accept:"application/json"}});if(!j.ok)throw new Error(`recent fetch returned ${j.status}`);const T=await j.json();if($)return;const O=[...T.events].reverse();for(const V of O)S.current.add(V.id);n(O),l("live")}catch(j){if($)return;l("error"),u(j instanceof Error?j.message:"Could not load recent cache trace.");return}w=new EventSource("/ggui/console/cache/stream",{withCredentials:!0}),w.onmessage=j=>{try{const T=JSON.parse(j.data);R(T)}catch{}},w.onerror=()=>{l("reconnecting")},w.onopen=()=>{l("live")}})(),()=>{$=!0,w&&w.close()}},[]);const N=$=>{p(w=>{const R=new Set(w);return R.has($)?R.delete($):R.add($),R})},x=EN(e),E=CN(e),z=g==="all"?e:g==="no-strategy"?e.filter($=>$.strategy===void 0):e.filter($=>$.strategy===g),k=y==="all"?z:z.filter($=>$.agentClassification===y);return r.jsxs("section",{className:"ggui-section",children:[r.jsx(tt,{num:"DEVTOOLS / 7C",title:"Cache decisions.",mute:"Live.",intro:r.jsx(r.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."})}),r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"events"}),r.jsx("span",{className:"ggui-card__num",children:o==="loading"?"connecting…":o==="live"?`live · ${e.length}`:o==="reconnecting"?"reconnecting…":"error"})]}),r.jsxs("div",{className:"ggui-card__body",children:[c?r.jsx("p",{className:"ggui-muted","data-ggui-cache-trace-error":!0,children:c}):null,r.jsx(TN,{filter:g,onFilter:h,counts:x}),r.jsx(MN,{filter:y,onFilter:v,counts:E}),e.length===0&&o!=="error"?r.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&&k.length===0?r.jsx("p",{className:"ggui-muted",children:"No events for this strategy. Try a different filter."}):null,r.jsx("ul",{style:{listStyle:"none",padding:0,margin:0,display:"grid",gap:12},"data-ggui-cache-trace-list":!0,children:k.map($=>r.jsx(RN,{event:$,expanded:f.has($.id),onToggle:()=>N($.id)},$.id))})]})]})]})}function EN(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 CN(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 TN({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 r.jsxs("div",{style:{display:"flex",gap:6,alignItems:"center",marginBottom:12,flexWrap:"wrap"},"data-ggui-cache-trace-filter":!0,children:[r.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,f=o[c.key];return r.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," · ",f]},c.key)})]})}function MN({filter:e,onFilter:n,counts:o}){const l=[{key:"all",label:"all"},{key:"confirm",label:"confirm"},{key:"override",label:"override"}];return r.jsxs("div",{style:{display:"flex",gap:6,alignItems:"center",marginBottom:12,flexWrap:"wrap"},"data-ggui-cache-trace-classification-filter":!0,children:[r.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,f=o[c.key];return r.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," · ",f]},c.key)})]})}function RN({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=NN(e.decision),f=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 r.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:[r.jsxs("button",{type:"button",onClick:o,style:{all:"unset",cursor:"pointer",display:"flex",gap:12,alignItems:"baseline",width:"100%"},children:[r.jsx("span",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)"},children:c}),r.jsx(ON,{outcome:u}),e.strategy?r.jsx(AN,{strategy:e.strategy}):null,e.agentClassification?r.jsx(Y1,{classification:e.agentClassification}):null,e.validatorFindings&&e.validatorFindings.length>0?r.jsx(K1,{count:e.validatorFindings.length,severity:e.validatorFindings.some(y=>y.severity==="error")?"error":"warn"}):null,r.jsx("span",{style:{fontFamily:"var(--ggui-font-mono)",fontSize:12,flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h||r.jsx("span",{className:"ggui-muted",children:"(empty intent)"})}),r.jsxs("span",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)"},children:["top ",g]}),r.jsxs("span",{className:"ggui-muted",style:{fontSize:11},children:[e.durationMs,"ms"]}),f?r.jsx("span",{style:{fontFamily:"var(--ggui-font-mono)",fontSize:11,padding:"0 6px",border:"1px solid var(--ggui-rule)"},children:e.winningBlueprintId}):null]}),n?r.jsx(DN,{event:e}):null]})}function ON({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 r.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 AN({strategy:e}){return r.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 Y1({classification:e}){const n=e==="confirm";return r.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 K1({count:e,severity:n}){return r.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 DN({event:e}){return r.jsxs("div",{style:{marginTop:10,paddingTop:10,borderTop:"1px solid var(--ggui-rule)",display:"grid",gap:12},children:[r.jsx(Zn,{label:"reason",children:r.jsx("p",{style:{margin:0,fontSize:13},children:e.reason})}),r.jsx(Zn,{label:"decision class",children:r.jsxs("div",{style:{display:"flex",gap:8,alignItems:"baseline",fontFamily:"var(--ggui-font-mono)",fontSize:12},children:[r.jsx("span",{children:e.decision}),e.strategy?r.jsxs("span",{className:"ggui-muted",children:["· strategy = ",e.strategy]}):null,e.agentClassification?r.jsxs("span",{className:"ggui-muted",children:["· classification = ",e.agentClassification]}):null]})}),e.agentClassification?r.jsx(Zn,{label:"agent classification",children:r.jsxs("div",{style:{display:"flex",gap:8,alignItems:"baseline",fontFamily:"var(--ggui-font-mono)",fontSize:12},children:[r.jsx(Y1,{classification:e.agentClassification}),r.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?r.jsx(Zn,{label:"cosine novelty distance",children:r.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?r.jsx(Zn,{label:`validator findings (${e.validatorFindings.length})`,children:r.jsx("ul",{style:{listStyle:"none",padding:0,margin:0},children:e.validatorFindings.map((n,o)=>{var l;return r.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:[r.jsxs("div",{style:{display:"flex",gap:8,alignItems:"baseline"},children:[r.jsx(K1,{count:1,severity:n.severity}),r.jsx("span",{style:{fontFamily:"var(--ggui-font-mono)",fontSize:12},children:n.kind})]}),r.jsx("div",{style:{fontSize:12},children:n.hint})]},`${n.kind}-${o}`)})})}):null,r.jsx(Zn,{label:"intent",children:r.jsx("pre",{style:UN,children:e.intent||"(empty)"})}),r.jsx(Zn,{label:"scope / threshold",children:r.jsxs("div",{style:{fontFamily:"var(--ggui-font-mono)",fontSize:12},children:[r.jsxs("div",{children:["scope = ",r.jsx("strong",{children:e.scope})]}),r.jsxs("div",{children:["threshold = ",r.jsx("strong",{children:e.threshold})]}),r.jsxs("div",{children:["expectedKey = ",r.jsx("strong",{children:e.expectedKey||"(none)"})]}),e.winningBlueprintId?r.jsxs("div",{children:["winningBlueprintId = ",r.jsx("strong",{children:e.winningBlueprintId})]}):null]})}),r.jsx(Zn,{label:`candidates (${e.candidates.length})`,children:e.candidates.length===0?r.jsx("p",{className:"ggui-muted",style:{margin:0,fontSize:12},children:"No candidates returned by the vector store."}):r.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 r.jsxs("li",{style:{padding:"4px 0",borderBottom:o<e.candidates.length-1?"1px solid var(--ggui-rule)":"none",display:"grid",gap:4},children:[r.jsxs("div",{style:{display:"flex",gap:8,alignItems:"baseline"},children:[r.jsx("span",{style:{fontFamily:"var(--ggui-font-mono)",fontSize:12,fontWeight:l?600:400},children:n.key}),l?r.jsx("span",{className:"ggui-muted",style:{fontSize:10},children:"(winner)"}):null,r.jsx("span",{style:{flex:1}}),r.jsx("span",{style:{fontFamily:"var(--ggui-font-mono)",fontSize:12},children:n.score.toFixed(3)})]}),n.cachedIntent?r.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 Zn({label:e,children:n}){return r.jsxs("div",{children:[r.jsx("div",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)",textTransform:"uppercase",marginBottom:4},children:e}),n]})}const UN={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 IN(){const[e,n]=I.useState({kind:"loading"}),[o,l]=I.useState({kind:"idle"}),[c,u]=I.useState(null),[f,p]=I.useState(0);I.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=I.useCallback(h=>{u(h),p(0),l({kind:"loading",sessionId:h})},[]);return I.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]),r.jsxs("section",{className:"ggui-section",children:[r.jsx(tt,{num:"DEVTOOLS / 7D",title:"Render timeline.",mute:"Snapshot.",intro:r.jsxs(r.Fragment,{children:["Pick a render, then step through its event log chronologically. Each event carries the full",r.jsx("code",{className:"ggui-code",children:" GguiSessionEvent.data "}),"payload — useful for answering “what was the UI state at event N?” without a live tail."]})}),r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"minmax(260px, 320px) 1fr",gap:16,alignItems:"start"},children:[r.jsx(LN,{state:e,pickedSessionId:c,onPick:g}),r.jsx(HN,{state:o,scrubIndex:f,onScrub:p})]})]})}function LN({state:e,pickedSessionId:n,onPick:o}){return r.jsxs("div",{className:"ggui-card","data-ggui-timeline-pane":"renders",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"renders"}),r.jsx("span",{className:"ggui-card__num",children:e.kind==="loading"?"loading…":e.kind==="error"?"error":`${e.data.sessions.length} / ${e.data.total}`})]}),r.jsx("div",{className:"ggui-card__body",style:{padding:0},children:e.kind==="loading"?r.jsx("p",{className:"ggui-muted",style:{margin:0,padding:12},children:"Loading renders…"}):e.kind==="error"?r.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?r.jsxs("p",{className:"ggui-muted",style:{margin:0,padding:12},children:["No renders yet. Render from an agent (",r.jsx("code",{className:"ggui-code",children:"ggui_render"}),") to create one."]}):r.jsx("ul",{style:{listStyle:"none",padding:0,margin:0,maxHeight:520,overflowY:"auto"},children:e.data.sessions.map(l=>r.jsx(VN,{render:l,selected:l.sessionId===n,onClick:()=>o(l.sessionId)},l.sessionId))})})]})}function VN({render:e,selected:n,onClick:o}){const l=e.sessionId.slice(0,12),c=e.status==="active"?"live":e.status==="expired"?"signal":"ink";return r.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:r.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:[r.jsxs("div",{style:{display:"flex",gap:8,alignItems:"baseline",marginBottom:4},children:[r.jsxs("code",{className:"ggui-code",style:{fontSize:12,fontFamily:"var(--ggui-font-mono)"},children:[l,"…"]}),r.jsx(Ce,{tone:c,children:e.status})]}),r.jsxs("div",{className:"ggui-muted",style:{fontSize:11},children:["app ",r.jsx("code",{className:"ggui-code",children:e.appId})," · stream"," ",e.streamSeq]}),r.jsxs("div",{className:"ggui-muted",style:{fontSize:11,marginTop:2},children:["last ",GN(e.lastActivityAt)]})]})})}function HN({state:e,scrubIndex:n,onScrub:o}){return e.kind==="idle"?r.jsxs("div",{className:"ggui-card","data-ggui-timeline-pane":"events",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"timeline"}),r.jsx("span",{className:"ggui-card__num",children:"DEV / 7D"})]}),r.jsx("div",{className:"ggui-card__body",children:r.jsx("p",{className:"ggui-muted",children:"Pick a render on the left to load its event log."})})]}):e.kind==="loading"?r.jsxs("div",{className:"ggui-card","data-ggui-timeline-pane":"events",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"timeline"}),r.jsx("span",{className:"ggui-card__num",children:"loading…"})]}),r.jsx("div",{className:"ggui-card__body",children:r.jsxs("p",{className:"ggui-muted",children:["Loading events for"," ",r.jsx("code",{className:"ggui-code",children:W1(e.sessionId)}),"…"]})})]}):e.kind==="error"?r.jsxs("div",{className:"ggui-card","data-ggui-timeline-pane":"events",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"timeline"}),r.jsx("span",{className:"ggui-card__num",children:"error"})]}),r.jsx("div",{className:"ggui-card__body",children:r.jsxs("p",{className:"ggui-muted","data-ggui-timeline-events-error":!0,children:["Couldn't load events — ",e.message,"."]})})]}):r.jsx(BN,{state:e,scrubIndex:n,onScrub:o})}function BN({state:e,scrubIndex:n,onScrub:o}){const{events:l,status:c,streamSeq:u}=e.data,f=l.length,p=I.useMemo(()=>f===0?0:Math.max(0,Math.min(n,f-1)),[n,f]),g=f>0?l[p]:null,h=I.useCallback(()=>{f!==0&&o(Math.max(0,p-1))},[o,p,f]),y=I.useCallback(()=>{f!==0&&o(Math.min(f-1,p+1))},[o,p,f]),v=I.useCallback(()=>o(0),[o]),S=I.useCallback(()=>{f!==0&&o(f-1)},[o,f]);return r.jsxs("div",{className:"ggui-card","data-ggui-timeline-pane":"events",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:r.jsx("code",{className:"ggui-code",children:W1(e.sessionId)})}),r.jsx("span",{className:"ggui-card__num",children:f===0?"no events":`${p+1} / ${f}`})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center",marginBottom:12,flexWrap:"wrap"},children:[r.jsxs("span",{className:"ggui-muted",style:{fontSize:12},children:["status"," ",r.jsx("code",{className:"ggui-code",children:c})]}),r.jsxs("span",{className:"ggui-muted",style:{fontSize:12},children:["stream cursor"," ",r.jsx("code",{className:"ggui-code",children:u})]}),r.jsxs("span",{className:"ggui-muted",style:{fontSize:12},children:["inbound events"," ",r.jsx("code",{className:"ggui-code",children:f})]})]}),f===0?r.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."}):r.jsxs(r.Fragment,{children:[r.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center",marginBottom:12,flexWrap:"wrap"},children:[r.jsx("button",{type:"button",onClick:v,disabled:p===0,className:"ggui-btn ggui-btn--ghost","data-ggui-timeline-jump":"start",children:"⟪ start"}),r.jsx("button",{type:"button",onClick:h,disabled:p===0,className:"ggui-btn ggui-btn--ghost","data-ggui-timeline-jump":"prev",children:"‹ prev"}),r.jsx("input",{type:"range",min:0,max:f-1,value:p,onChange:N=>o(Number(N.target.value)),"aria-label":"event scrubber","data-ggui-timeline-scrubber":!0,style:{flex:1,minWidth:160}}),r.jsx("button",{type:"button",onClick:y,disabled:p>=f-1,className:"ggui-btn ggui-btn--ghost","data-ggui-timeline-jump":"next",children:"next ›"}),r.jsx("button",{type:"button",onClick:S,disabled:p>=f-1,className:"ggui-btn ggui-btn--ghost","data-ggui-timeline-jump":"end",children:"end ⟫"})]}),g?r.jsx(qN,{event:g}):null]})]})]})}function qN({event:e}){return r.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:[r.jsxs("div",{style:{display:"flex",gap:12,alignItems:"baseline",marginBottom:8},children:[r.jsxs("span",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)"},children:["seq ",e.seq]}),r.jsx("span",{style:{fontFamily:"var(--ggui-font-mono)",fontSize:12},children:e.type}),r.jsx("span",{style:{flex:1}}),r.jsx("span",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)"},children:ZN(e.timestamp)})]}),r.jsx("pre",{style:PN,children:FN(e.data)})]})}const PN={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 W1(e){return e.length>16?`${e.slice(0,16)}…`:e}function ZN(e){try{return(typeof e=="number"?new Date(e):new Date(e)).toISOString().slice(11,23)}catch{return String(e)}}function GN(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),f=p=>p<10?`0${p}`:String(p);return`${u.getFullYear()}-${f(u.getMonth()+1)}-${f(u.getDate())}`}function FN(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}function YN(){const[e,n]=I.useState([]),[o,l]=I.useState("loading"),[c,u]=I.useState(null),[f,p]=I.useState(new Set),g=I.useRef(new Set);I.useEffect(()=>{let y=!1,v=null;const S=x=>{g.current.has(x.id)||(g.current.add(x.id),n(E=>[x,...E].slice(0,500)))};return(async()=>{try{const x=await fetch("/ggui/console/payloads/recent?limit=100",{credentials:"same-origin",headers:{accept:"application/json"}});if(!x.ok)throw new Error(`recent fetch returned ${x.status}`);const E=await x.json();if(y)return;const z=[...E.events].reverse();for(const k of z)g.current.add(k.id);n(z),l("live")}catch(x){if(y)return;l("error"),u(x instanceof Error?x.message:"Could not load recent payloads.");return}v=new EventSource("/ggui/console/payloads/stream",{withCredentials:!0}),v.onmessage=x=>{try{const E=JSON.parse(x.data);S(E)}catch{}},v.onerror=()=>{l("reconnecting")},v.onopen=()=>{l("live")}})(),()=>{y=!0,v&&v.close()}},[]);const h=y=>{p(v=>{const S=new Set(v);return S.has(y)?S.delete(y):S.add(y),S})};return r.jsxs("section",{className:"ggui-section",children:[r.jsx(tt,{num:"DEVTOOLS / 7E",title:"Payloads.",mute:"Live.",intro:r.jsxs(r.Fragment,{children:["Every ",r.jsx("code",{className:"ggui-code",children:"ggui_render"})," and"," ",r.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."]})}),r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"events"}),r.jsx("span",{className:"ggui-card__num",children:o==="loading"?"connecting…":o==="live"?`live · ${e.length}`:o==="reconnecting"?"reconnecting…":"error"})]}),r.jsxs("div",{className:"ggui-card__body",children:[c?r.jsx("p",{className:"ggui-muted","data-ggui-payloads-error":!0,children:c}):null,e.length===0&&o!=="error"?r.jsxs("p",{className:"ggui-muted",children:["No payloads yet. Trigger a"," ",r.jsx("code",{className:"ggui-code",children:"ggui_render"})," from your MCP client and it'll appear here as it lands."]}):null,r.jsx("ul",{style:{listStyle:"none",padding:0,margin:0,display:"grid",gap:12},"data-ggui-payloads-list":!0,children:e.map(y=>r.jsx(KN,{event:y,expanded:f.has(y.id),onToggle:()=>h(y.id)},y.id))})]})]})]})}function KN({event:e,expanded:n,onToggle:o}){const c=new Date(e.at).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}),u=e.sessionId.length>8?`${e.sessionId.slice(0,8)}…`:e.sessionId,f=e.direction==="inbound-render"?"inbound":"outbound";return r.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:[r.jsxs("button",{type:"button",onClick:o,style:{all:"unset",cursor:"pointer",display:"flex",gap:12,alignItems:"baseline",width:"100%"},children:[r.jsx("span",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)"},children:c}),r.jsx("span",{style:{fontSize:11,padding:"0 6px",border:"1px solid var(--ggui-rule)",fontFamily:"var(--ggui-font-mono)"},children:f}),r.jsx("span",{style:{fontFamily:"var(--ggui-font-mono)",fontSize:12},children:e.tool}),r.jsx("span",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)"},children:u}),r.jsx("span",{style:{flex:1}}),r.jsx("span",{className:"ggui-muted",style:{fontSize:11},children:JN(e.byteSize)})]}),n?r.jsx(WN,{event:e}):null]})}function WN({event:e}){const n=XN(e.payload);return r.jsxs("div",{style:{marginTop:10,paddingTop:10,borderTop:"1px solid var(--ggui-rule)",display:"grid",gap:12},children:[r.jsx(tv,{label:"session",children:r.jsxs("span",{className:"ggui-muted",style:{fontFamily:"var(--ggui-font-mono)",fontSize:12},children:[e.sessionId," · app ",e.appId]})}),r.jsx(tv,{label:"payload",children:r.jsx("pre",{style:QN,children:n})})]})}function tv({label:e,children:n}){return r.jsxs("div",{children:[r.jsx("div",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)",textTransform:"uppercase",marginBottom:4},children:e}),n]})}function XN(e){try{return JSON.stringify(e,null,2)??"undefined"}catch{return"[unstringifiable]"}}function JN(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 QN={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"},hf="ggui-console:benchmark-dashboard-url",e7="https://benchmarks.ggui.ai";function t7(){const[e,n]=I.useState(""),[o,l]=I.useState("");I.useEffect(()=>{const u=localStorage.getItem(hf);u&&(n(u),l(u))},[]);const c=u=>{const f=u.trim();n(f),f?localStorage.setItem(hf,f):localStorage.removeItem(hf)};return r.jsxs("section",{className:"ggui-section",children:[r.jsx(tt,{num:"DEVTOOLS / 06",title:"Benchmarks dashboard.",mute:"GGUI_MODE=dev",intro:r.jsxs(r.Fragment,{children:["Embed a ",r.jsx("code",{className:"ggui-code",children:"@ggui-ai/benchmark"})," ","dashboard. Default points at"," ",r.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."]})}),r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"dashboard URL"}),r.jsx("span",{className:"ggui-card__num",children:"DEV / 06"})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsxs("form",{onSubmit:u=>{u.preventDefault(),c(o)},style:{display:"flex",gap:8},children:[r.jsx("input",{type:"url",value:o,onChange:u=>l(u.target.value),placeholder:e7,spellCheck:!1,autoComplete:"off",style:{flex:1,padding:"8px 10px",fontFamily:"var(--ggui-font-mono, ui-monospace, monospace)",fontSize:13,border:"1px solid var(--ggui-rule)",background:"var(--ggui-paper)",color:"var(--ggui-ink)"}}),r.jsx("button",{type:"submit",className:"ggui-btn",disabled:o.trim()===e.trim(),children:"load"}),e&&r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--muted",onClick:()=>{l(""),c("")},children:"clear"})]}),r.jsxs("p",{className:"ggui-muted",style:{marginTop:12,fontSize:13,lineHeight:1.5},children:["URL persists across reloads. Local dev:"," ",r.jsx("code",{className:"ggui-code",children:"npx serve ./bench-results"})," then paste ",r.jsx("code",{className:"ggui-code",children:"http://localhost:3000"}),"."]})]})]}),e&&r.jsxs("div",{className:"ggui-card",style:{marginTop:16},children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:e}),r.jsx("span",{className:"ggui-card__num",children:"DEV / 06.1"})]}),r.jsx("div",{className:"ggui-card__body",style:{padding:0},children:r.jsx("iframe",{src:e,title:"Benchmarks dashboard",style:{width:"100%",height:"78vh",border:"none",background:"var(--ggui-paper)"}})})]})]})}const a7={"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 n7({route:e}){return e.kind==="devtools-index"?r.jsx(av,{}):e.kind==="devtools-llm-trace"?r.jsx($N,{}):e.kind==="devtools-validator"?r.jsx(_N,{}):e.kind==="devtools-cache"?r.jsx(zN,{}):e.kind==="devtools-timeline"?r.jsx(IN,{}):e.kind==="devtools-payloads"?r.jsx(YN,{}):e.kind==="devtools-benchmarks"?r.jsx(t7,{}):r.jsx(av,{})}function av(){return r.jsxs("section",{className:"ggui-section",children:[r.jsx(tt,{num:"DEVTOOLS / 00",title:"Dev-mode debug surfaces.",mute:"GGUI_MODE=dev",intro:r.jsxs(r.Fragment,{children:["Default for ",r.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."]})}),r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"surfaces"}),r.jsx("span",{className:"ggui-card__num",children:"DEV / 01"})]}),r.jsx("div",{className:"ggui-card__body",children:r.jsx("ul",{style:{listStyle:"none",padding:0,margin:0,display:"grid",gap:12},children:Object.entries(a7).map(([e,n])=>r.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:[r.jsxs("div",{style:{minWidth:0},children:[r.jsx("div",{style:{fontWeight:500},children:n.title}),r.jsx("div",{className:"ggui-muted",style:{fontSize:13},children:n.answers})]}),r.jsxs("span",{className:"ggui-muted",style:{fontSize:12,whiteSpace:"nowrap"},children:["Slice ",n.slice]})]},e))})})]})]})}function r7(){const[e,n]=I.useState({kind:"loading"}),[o,l]=I.useState(null),[c,u]=I.useState(null),[f,p]=I.useState(""),[g,h]=I.useState(!1),[y,v]=I.useState(null),[S,N]=I.useState(null),x=async()=>{n({kind:"loading"});try{const k=await fetch("/ggui/console/keys",{headers:{accept:"application/json"}});if(k.status===401){Ve(`/admin-login?next=${encodeURIComponent("/admin/connector-keys")}`);return}if(!k.ok){if(k.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 ${k.status}`});return}const $=await k.json();n({kind:"ready",data:$})}catch(k){n({kind:"error",message:String(k)})}};I.useEffect(()=>{x()},[]);const E=async k=>{l(k);try{const $=await fetch(`/ggui/console/keys/${encodeURIComponent(k)}`,{method:"DELETE"});if($.status===401){Ve(`/admin-login?next=${encodeURIComponent("/admin/connector-keys")}`);return}if($.status!==204){n({kind:"error",message:`revoke failed — server returned ${$.status}`});return}u(null),await x()}catch($){n({kind:"error",message:`revoke failed — ${String($)}`})}finally{l(null)}},z=async k=>{k.preventDefault(),v(null);const $=f.trim();if($.length===0){v("Device name is required.");return}h(!0);try{const w=await fetch("/ggui/console/keys",{method:"POST",headers:{"content-type":"application/json",accept:"application/json"},body:JSON.stringify({deviceName:$})});if(w.status===401){Ve(`/admin-login?next=${encodeURIComponent("/admin/connector-keys")}`);return}if(!w.ok){v(`mint failed — server returned ${w.status}`);return}const R=await w.json();N(R),p(""),await x()}catch(w){v(`mint failed — ${String(w)}`)}finally{h(!1)}};return r.jsxs("section",{className:"ggui-section",children:[r.jsx(tt,{num:"01 / keys",title:"Paired bearer tokens.",mute:"Personal-mode bearers minted by /pair.",intro:r.jsxs(r.Fragment,{children:["Each row is a paired bearer minted by the pairing service — paste these into MCP clients (Claude Desktop, claude.ai) as the ",r.jsx("code",{className:"ggui-code",children:"Authorization: Bearer"})," ","header. Tokens are stored in plaintext on disk (",r.jsx("code",{className:"ggui-code",children:"~/.ggui/keys.json"})," by default); treat this page like"," ",r.jsx("code",{className:"ggui-code",children:"~/.ssh/"})," — anyone with view access can copy a bearer."]})}),r.jsx(i7,{deviceName:f,onDeviceName:p,minting:g,error:y,result:S,onSubmit:k=>{z(k)},onDismissResult:()=>N(null)}),e.kind==="loading"?r.jsx("p",{className:"ggui-muted",style:{margin:0,padding:12},children:"Loading keys…"}):e.kind==="error"?r.jsxs("p",{className:"ggui-muted",style:{margin:0,padding:12},"data-ggui-keys-error":!0,children:["Couldn't load keys — ",e.message]}):r.jsx(l7,{keys:e.data.keys,revokingId:o,pendingConfirm:c,onRevokeRequest:k=>u(k),onRevokeCancel:()=>u(null),onRevokeConfirm:k=>{E(k)},onRefresh:()=>{x()}})]})}function i7({deviceName:e,onDeviceName:n,minting:o,error:l,result:c,onSubmit:u,onDismissResult:f}){return r.jsxs("div",{className:"ggui-card",style:{marginBottom:20},children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"mint a new key"}),r.jsx("span",{className:"ggui-card__num",children:"KEY / NEW"})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsx("form",{className:"ggui-form",onSubmit:u,children:r.jsxs("div",{className:"ggui-form__row",children:[r.jsx("label",{className:"ggui-field","aria-label":"device name for the new key",children:r.jsx("input",{type:"text",placeholder:"device name (e.g. Claude Desktop, iPhone)",value:e,onChange:p=>n(p.target.value),disabled:o,maxLength:256})}),r.jsxs("button",{type:"submit",className:"ggui-btn","data-ggui-key-mint":!0,disabled:o||e.trim().length===0,children:[r.jsx("span",{className:"ggui-btn__dot","aria-hidden":!0}),o?"minting…":"mint"]})]})}),l?r.jsx("p",{className:"ggui-muted",style:{marginTop:10},children:l}):null,c?r.jsx(o7,{result:c,onDismiss:f}):null]})]})}function o7({result:e,onDismiss:n}){const[o,l]=I.useState(!1),c=async()=>{try{await navigator.clipboard.writeText(e.token),l(!0),window.setTimeout(()=>l(!1),2e3)}catch{}};return r.jsxs("div",{className:"ggui-card",style:{marginTop:16},"data-ggui-key-mint-result":!0,children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"new bearer minted — copy it now"}),r.jsx("span",{className:"ggui-card__num",children:"KEY / FRESH"})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsxs("p",{className:"ggui-muted",style:{marginTop:0},children:["Paste this into your MCP client's"," ",r.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."]}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,marginTop:12},children:[r.jsx("code",{className:"ggui-code",style:{flex:1,padding:10,wordBreak:"break-all",userSelect:"all"},children:e.token}),r.jsxs("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:()=>{c()},children:[r.jsx("span",{className:"ggui-btn__dot","aria-hidden":!0}),o?"copied":"copy"]})]}),r.jsxs("div",{className:"ggui-stack__entry-meta",style:{marginTop:12},children:[r.jsxs("span",{children:["device ",r.jsx("code",{className:"ggui-code",children:e.deviceName})]}),r.jsxs("span",{style:{marginLeft:12},children:["id ",r.jsx("code",{className:"ggui-code",children:e.pairingId})]})]}),r.jsx("div",{style:{marginTop:14},children:r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:n,children:"dismiss"})})]})]})}function l7({keys:e,revokingId:n,pendingConfirm:o,onRevokeRequest:l,onRevokeCancel:c,onRevokeConfirm:u,onRefresh:f}){return e.length===0?r.jsxs("div",{className:"ggui-stack","data-ggui-keys-list":!0,"aria-label":"paired keys (empty)",children:[r.jsxs("div",{className:"ggui-stack__head",children:[r.jsx("span",{className:"ggui-stack__num",children:"KEY"}),r.jsx("span",{className:"ggui-stack__label",children:"paired keys"}),r.jsx("span",{className:"ggui-stack__count",children:"0"})]}),r.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 ",r.jsx("code",{className:"ggui-code",children:"POST /pair"})," from a viewer client to land a row here."]})]}):r.jsxs("div",{"data-ggui-keys-list":!0,className:"ggui-stack","aria-label":"paired keys",children:[r.jsxs("div",{className:"ggui-stack__head",children:[r.jsx("span",{className:"ggui-stack__num",children:"KEY"}),r.jsx("span",{className:"ggui-stack__label",children:"paired keys"}),r.jsx("span",{className:"ggui-stack__count",children:e.length}),r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:f,style:{marginLeft:"auto"},children:"refresh"})]}),r.jsx("ul",{className:"ggui-stack__list",children:e.map((p,g)=>r.jsx(s7,{entry:p,index:g+1,isRevoking:n===p.pairingId,isPendingConfirm:o===p.pairingId,onRevokeRequest:l,onRevokeCancel:c,onRevokeConfirm:u},p.pairingId))})]})}function s7({entry:e,index:n,isRevoking:o,isPendingConfirm:l,onRevokeRequest:c,onRevokeCancel:u,onRevokeConfirm:f}){return r.jsxs("li",{"data-ggui-key-id":e.pairingId,className:"ggui-stack__entry",style:{opacity:o?.5:1},children:[r.jsxs("div",{className:"ggui-stack__entry-head",children:[r.jsx("span",{className:"ggui-stack__entry-num",children:`KEY / ${String(n).padStart(2,"0")}`}),r.jsx("span",{className:"ggui-stack__entry-title",children:e.deviceName})]}),r.jsxs("div",{className:"ggui-stack__entry-meta",children:[r.jsxs("span",{children:["id ",r.jsx("code",{className:"ggui-code",children:e.pairingId})]}),r.jsxs("span",{style:{marginLeft:12},children:["minted"," ",r.jsx("code",{className:"ggui-code",children:nv(e.createdAt)})]}),e.lastUsedAt!==void 0?r.jsxs("span",{style:{marginLeft:12},children:["used"," ",r.jsx("code",{className:"ggui-code",children:nv(e.lastUsedAt)})]}):null]}),r.jsx("div",{className:"ggui-stack__entry-meta",style:{marginTop:6},children:r.jsxs("span",{style:{display:"flex",alignItems:"center",gap:8},children:["token"," ",e.token===null?r.jsx("code",{className:"ggui-code",children:"— rotated, re-pair to recover"}):r.jsx("code",{className:"ggui-code",style:{wordBreak:"break-all",userSelect:"all"},children:e.token})]})}),r.jsx("div",{style:{marginTop:12,display:"flex",gap:10,alignItems:"center"},children:l?r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button",className:"ggui-btn","data-ggui-key-revoke":!0,disabled:o,onClick:()=>f(e.pairingId),children:o?"revoking…":"confirm revoke"}),r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",disabled:o,onClick:u,children:"cancel"})]}):r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost","data-ggui-key-revoke":!0,disabled:o,onClick:()=>c(e.pairingId),children:"revoke"})})]})}function nv(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 c7(){const[e,n]=I.useState({kind:"loading"}),[o,l]=I.useState("");I.useEffect(()=>{const f=new AbortController;return(async()=>{try{const p=await fetch("/ggui/console/mcp/tools",{signal:f.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(f.signal.aborted)return;n({kind:"error",message:String(p)})}})(),()=>f.abort()},[]);const c=o.trim().toLowerCase(),u=I.useMemo(()=>e.kind!=="ready"?null:c.length===0?e.data.tools:e.data.tools.filter(f=>[f.name,f.title??"",f.description].join(" ").toLowerCase().includes(c)),[e,c]);return r.jsxs("section",{className:"ggui-section",children:[r.jsx(tt,{num:"01 / mcp",title:"Registered MCP tools.",mute:"Read-only inventory.",intro:r.jsxs(r.Fragment,{children:["Every tool this server registered with the MCP runtime — same set ",r.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."," ",r.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"?r.jsx(iv,{title:"loading",num:"MCP / 01",tone:"draft",children:"Loading tool inventory…"}):e.kind==="error"?r.jsxs(iv,{title:"error",num:"ERR / 01",tone:"signal",children:["Couldn't load tools — ",e.message,"."]}):r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"ggui-form",style:{marginBottom:20},children:[r.jsx("label",{className:"ggui-label",htmlFor:"ggui-mcp-filter",children:"filter"}),r.jsx("div",{className:"ggui-field",children:r.jsx("input",{id:"ggui-mcp-filter",name:"filter","aria-label":"filter tools",placeholder:"substring match over name, title, description…",value:o,onChange:f=>l(f.target.value),autoCapitalize:"off",autoCorrect:"off",spellCheck:!1})})]}),r.jsx(u7,{all:e.data.tools,shown:u??e.data.tools,filterActive:c.length>0})]})]})}function u7({all:e,shown:n,filterActive:o}){return e.length===0?r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"empty"}),r.jsx("span",{className:"ggui-card__num",children:"MCP / 00"})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsx("p",{className:"ggui-body",children:"No tools registered."}),r.jsxs("p",{className:"ggui-muted",children:["This server booted without any handlers — unusual for a full ",r.jsx("code",{className:"ggui-code",children:"ggui serve"}),". Check the boot config."]})]})]}):r.jsxs("div",{"data-ggui-mcp-list":!0,className:"ggui-stack","aria-label":"mcp tools",children:[r.jsxs("div",{className:"ggui-stack__head",children:[r.jsx("span",{className:"ggui-stack__num",children:"MCP"}),r.jsx("span",{className:"ggui-stack__label",children:"registered tools"}),r.jsxs("span",{className:"ggui-stack__count",children:[n.length,o&&n.length!==e.length?` / ${e.length}`:""]})]}),n.length===0?r.jsx("p",{className:"ggui-muted",style:{margin:0,padding:12},children:"No tools match the filter."}):r.jsx("ul",{className:"ggui-stack__list",children:n.map((l,c)=>r.jsx(d7,{tool:l,index:c+1},l.name))})]})}function d7({tool:e,index:n}){const[o,l]=I.useState(!1);return r.jsxs("li",{"data-ggui-mcp-tool-name":e.name,"data-ggui-mcp-tool-expanded":o?"true":"false",className:"ggui-stack__entry",children:[r.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:[r.jsxs("div",{className:"ggui-stack__entry-head",children:[r.jsx("span",{className:"ggui-stack__entry-num",children:`MCP / ${String(n).padStart(2,"0")}`}),r.jsx("span",{className:"ggui-stack__entry-title",children:r.jsx("code",{className:"ggui-code",children:e.name})}),e.title?r.jsx(Ce,{tone:"ink",children:e.title}):null,r.jsx("span",{className:"ggui-muted",style:{marginLeft:"auto",fontFamily:"var(--ggui-mono)",fontSize:11},children:o?"−":"+"})]}),e.description?r.jsx("p",{className:"ggui-body",style:{margin:"8px 0 0"},children:e.description}):null]}),o?r.jsxs("div",{style:{marginTop:12,display:"grid",gap:12},children:[r.jsx(rv,{label:"input",schema:e.inputSchema}),r.jsx(rv,{label:"output",schema:e.outputSchema})]}):null]})}function rv({label:e,schema:n}){return r.jsxs("div",{children:[r.jsx("div",{className:"ggui-stack__entry-meta",style:{marginBottom:6,textTransform:"uppercase",letterSpacing:"0.12em"},children:e}),r.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 r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:e}),r.jsx("span",{className:"ggui-card__num",children:n})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsx("p",{className:"ggui-body",children:r.jsx(Ce,{tone:o,children:e})}),r.jsx("p",{className:"ggui-muted",children:l})]})]})}function f7(){const[e,n]=I.useState({kind:"loading"}),[o,l]=I.useState("");I.useEffect(()=>{const f=new AbortController;return(async()=>{try{const p=await fetch("/ggui/console/sessions",{signal:f.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(f.signal.aborted)return;n({kind:"error",message:String(p)})}})(),()=>f.abort()},[]);const c=o.trim().toLowerCase(),u=I.useMemo(()=>e.kind!=="ready"?null:c.length===0?e.data.sessions:e.data.sessions.filter(f=>[f.sessionId,f.shortCode??"",f.appId].join(" ").toLowerCase().includes(c)),[e,c]);return r.jsxs("section",{className:"ggui-section",children:[r.jsx(tt,{num:"01 / sessions",title:"Live sessions.",mute:"Active only — render from an agent to create one.",intro:r.jsxs(r.Fragment,{children:["Every row is an active GguiSession on this server. A session has a"," ",r.jsx("code",{className:"ggui-code",children:"shortCode"})," once one is minted by ",r.jsx("code",{className:"ggui-code",children:"ggui_render"}),"."]})}),e.kind==="loading"?r.jsx(ov,{title:"loading",num:"SES / 01",tone:"draft",children:"Loading sessions…"}):e.kind==="error"?r.jsxs(ov,{title:"error",num:"ERR / 01",tone:"signal",children:["Couldn't load sessions — ",e.message,"."]}):r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"ggui-form",style:{marginBottom:20},children:[r.jsx("label",{className:"ggui-label",htmlFor:"ggui-sessions-filter",children:"filter"}),r.jsx("div",{className:"ggui-field",children:r.jsx("input",{id:"ggui-sessions-filter",name:"filter","aria-label":"filter session entries",placeholder:"substring match over sessionId, shortCode, appId…",value:o,onChange:f=>l(f.target.value),autoCapitalize:"off",autoCorrect:"off",spellCheck:!1})})]}),r.jsx(p7,{all:e.data.sessions,shown:u??e.data.sessions,filterActive:c.length>0})]})]})}function p7({all:e,shown:n,filterActive:o}){return e.length===0?r.jsx(h7,{}):r.jsxs("div",{"data-ggui-sessions-list":!0,className:"ggui-stack","aria-label":"active sessions",children:[r.jsxs("div",{className:"ggui-stack__head",children:[r.jsx("span",{className:"ggui-stack__num",children:"SES"}),r.jsx("span",{className:"ggui-stack__label",children:"live sessions"}),r.jsxs("span",{className:"ggui-stack__count",children:[n.length,o&&n.length!==e.length?` / ${e.length}`:""]})]}),n.length===0?r.jsx("p",{className:"ggui-muted",style:{margin:0,padding:12},children:"No sessions match the filter."}):r.jsx("ul",{className:"ggui-stack__list",children:n.map((l,c)=>r.jsx(g7,{render:l,index:c+1},l.sessionId))})]})}function g7({render:e,index:n}){const o=e.sessionId.slice(0,8),l=e.status==="active"?"live":e.status==="expired"?"signal":"ink";return r.jsxs("li",{"data-ggui-session-id":e.sessionId,"data-ggui-session-status":e.status,className:"ggui-stack__entry",children:[r.jsxs("div",{className:"ggui-stack__entry-head",children:[r.jsx("span",{className:"ggui-stack__entry-num",children:`SES / ${String(n).padStart(2,"0")}`}),r.jsxs("span",{className:"ggui-stack__entry-title",children:[r.jsx("code",{className:"ggui-code",children:o}),"…"]}),r.jsx(Ce,{tone:l,children:e.status})]}),r.jsxs("div",{className:"ggui-stack__entry-meta",children:[r.jsxs("span",{children:["app ",r.jsx("code",{className:"ggui-code",children:e.appId})]}),r.jsxs("span",{style:{marginLeft:12},children:["last active"," ",r.jsx("code",{className:"ggui-code",children:m7(e.lastActivityAt)})]})]}),r.jsx("div",{style:{marginTop:12,display:"flex",gap:10,alignItems:"center"},children:e.shortCode?r.jsxs("span",{children:["shortCode"," ",r.jsx("code",{className:"ggui-code",children:e.shortCode})]}):r.jsxs("span",{className:"ggui-muted",children:["No shortCode — render via"," ",r.jsx("code",{className:"ggui-code",children:"ggui_render"})," to mint one."]})})]})}function m7(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),f=p=>p<10?`0${p}`:String(p);return`${u.getFullYear()}-${f(u.getMonth()+1)}-${f(u.getDate())}`}function h7(){return r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"empty"}),r.jsx("span",{className:"ggui-card__num",children:"SES / 00"})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsx("p",{className:"ggui-body",children:"No sessions yet."}),r.jsxs("p",{className:"ggui-muted",children:["Render from an agent (",r.jsx("code",{className:"ggui-code",children:"ggui_render"}),") to start a generation — new sessions appear here on reload."]})]})]})}function ov({title:e,num:n,tone:o,children:l}){return r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:e}),r.jsx("span",{className:"ggui-card__num",children:n})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsx("p",{className:"ggui-body",children:r.jsx(Ce,{tone:o,children:e})}),r.jsx("p",{className:"ggui-muted",children:l})]})]})}function y7(){const[e,n]=I.useState({kind:"loading"}),[o,l]=I.useState({kind:"loading"});return I.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 f=await u.json();n({kind:"ok",info:f})}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 f=await u.json();l({kind:"ok",data:f})}catch{c.signal.aborted||l({kind:"error"})}})(),()=>c.abort()},[]),r.jsxs("section",{className:"ggui-section","data-ggui-status-dashboard":!0,children:[r.jsx(tt,{num:"01 / status",title:"What's this server doing right now?",mute:"Every card reads a local endpoint. No hosted calls.",intro:r.jsxs(r.Fragment,{children:["Reloads on demand — console is an operator surface, not a live feed. Nav above points at the other pages:"," ",r.jsx("code",{className:"ggui-code",children:"playground"}),","," ",r.jsx("code",{className:"ggui-code",children:"blueprints"}),","," ",r.jsx("code",{className:"ggui-code",children:"tools"}),","," ",r.jsx("code",{className:"ggui-code",children:"config"}),"."]})}),r.jsx(j7,{state:o}),r.jsxs("div",{className:"ggui-status-grid",children:[r.jsx(v7,{state:e}),r.jsx($7,{state:e}),r.jsx(b7,{state:e}),r.jsx(_7,{state:e})]})]})}function v7({state:e}){return r.jsx(gn,{num:"SRV / 01",title:"server",children:e.kind==="ok"?r.jsx(r.Fragment,{children:r.jsxs("dl",{className:"ggui-kv",children:[r.jsxs("div",{children:[r.jsx("dt",{children:"name"}),r.jsx("dd",{children:e.info.server})]}),r.jsxs("div",{children:[r.jsx("dt",{children:"version"}),r.jsx("dd",{children:r.jsx("code",{className:"ggui-code",children:e.info.version})})]}),e.info.description?r.jsxs("div",{children:[r.jsx("dt",{children:"description"}),r.jsx("dd",{children:e.info.description})]}):null]})}):e.kind==="loading"?r.jsx("p",{className:"ggui-muted",children:"Loading server identity…"}):r.jsxs("p",{className:"ggui-muted",children:["Couldn't reach ",r.jsx("code",{className:"ggui-code",children:"/ggui/console/info"})," ","— ",e.message,"."]})})}function $7({state:e}){if(e.kind!=="ok")return r.jsx(gn,{num:"PAR / 01",title:"pairing",children:r.jsx("p",{className:"ggui-muted",children:e.kind==="loading"?"Loading…":"Unavailable."})});const{enabled:n,pending:o}=e.info.pairing;if(!n)return r.jsxs(gn,{num:"PAR / 01",title:"pairing",children:[r.jsx("p",{className:"ggui-body",children:r.jsx(Ce,{tone:"ink",children:"disabled"})}),r.jsxs("p",{className:"ggui-muted",children:["This server was composed with"," ",r.jsx("code",{className:"ggui-code",children:"pairing: false"}),". Pass"," ",r.jsx("code",{className:"ggui-code",children:"pairing: true"})," at boot to enable per-device auth."]})]});if(!o)return r.jsxs(gn,{num:"PAR / 01",title:"pairing",children:[r.jsx("p",{className:"ggui-body",children:r.jsx(Ce,{tone:"live",children:"idle"})}),r.jsxs("p",{className:"ggui-muted",children:["Pairing is enabled. No pair code is pending — mint one via the CLI (",r.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 r.jsxs(gn,{num:"PAR / 01",title:"pairing",children:[r.jsx("p",{className:"ggui-body",children:r.jsx(Ce,{tone:"draft",children:"pending"})}),r.jsx("p",{className:"ggui-code",style:{fontSize:24,letterSpacing:"0.08em",margin:"8px 0"},children:o.code}),r.jsxs("p",{className:"ggui-muted",children:["Valid for ",r.jsxs("code",{className:"ggui-code",children:[l,"s"]}),". Paste into a paired client or"," ",r.jsx("code",{className:"ggui-code",children:"POST /pair"})," with the bearer."]})]})}function b7({state:e}){if(e.kind!=="ok")return r.jsx(gn,{num:"CAP / 01",title:"capabilities",children:r.jsx("p",{className:"ggui-muted",children:e.kind==="loading"?"Loading…":"Unavailable."})});const n=e.info.capabilities;return r.jsx(gn,{num:"CAP / 01",title:"capabilities",children:r.jsxs("dl",{className:"ggui-kv",children:[r.jsxs("div",{children:[r.jsx("dt",{children:"tools"}),r.jsx("dd",{children:r.jsx("code",{className:"ggui-code",children:n.toolCount})})]}),r.jsxs("div",{children:[r.jsx("dt",{children:"blueprints"}),r.jsx("dd",{children:r.jsx("code",{className:"ggui-code",children:n.blueprintCount})})]}),r.jsxs("div",{children:[r.jsx("dt",{children:"primitives"}),r.jsx("dd",{children:r.jsx("code",{className:"ggui-code",children:n.primitiveCount})})]}),r.jsxs("div",{children:[r.jsx("dt",{children:"agent"}),r.jsx("dd",{children:r.jsx(Ce,{tone:n.agentWired?"live":"ink",children:n.agentWired?"wired":"off"})})]}),r.jsxs("div",{children:[r.jsx("dt",{children:"generation"}),r.jsx("dd",{children:x7(n.generation)})]})]})})}function x7(e){return e.wired?e.hasCredentials?r.jsx(Ce,{tone:"live",children:"ready"}):r.jsx(Ce,{tone:"draft",children:"needs key"}):r.jsx(Ce,{tone:"ink",children:"off"})}function _7({state:e}){if(e.kind!=="ok")return r.jsx(gn,{num:"STG / 01",title:"storage",children:r.jsx("p",{className:"ggui-muted",children:e.kind==="loading"?"Loading…":"Unavailable."})});const n=e.info.storage,o=l=>l==="custom"?"live":"draft";return r.jsxs(gn,{num:"STG / 01",title:"storage",children:[r.jsxs("dl",{className:"ggui-kv",children:[r.jsxs("div",{children:[r.jsx("dt",{children:"renders"}),r.jsx("dd",{children:r.jsx(Ce,{tone:o(n.renderStore),children:n.renderStore})})]}),r.jsxs("div",{children:[r.jsx("dt",{children:"vectors"}),r.jsx("dd",{children:r.jsx(Ce,{tone:o(n.vectorStore),children:n.vectorStore})})]})]}),r.jsxs("p",{className:"ggui-muted",style:{marginTop:12},children:[r.jsx("code",{className:"ggui-code",children:"memory"})," = in-process default (loss on restart). ",r.jsx("code",{className:"ggui-code",children:"custom"})," = operator-wired store."]})]})}function j7({state:e}){if(e.kind==="loading")return r.jsx("div",{className:"ggui-status-hero","data-ggui-status-hero":"loading",children:r.jsx("p",{className:"ggui-muted",children:"Loading live sessions…"})});if(e.kind==="error")return r.jsx("div",{className:"ggui-status-hero","data-ggui-status-hero":"error",children:r.jsxs("p",{className:"ggui-muted",children:["Couldn't reach ",r.jsx("code",{className:"ggui-code",children:"/ggui/console/sessions"}),"."]})});if(e.data.sessions.length===0)return r.jsxs("div",{className:"ggui-status-hero ggui-status-hero--empty","data-ggui-status-hero":"empty",children:[r.jsx("div",{className:"ggui-status-hero__head",children:r.jsxs("span",{className:"ggui-status-hero__eyebrow",children:[r.jsx(Ce,{tone:"ink",children:"idle"}),r.jsx("span",{children:"live sessions"})]})}),r.jsxs("p",{className:"ggui-muted",style:{margin:0},children:["No sessions yet. Open"," ",r.jsx("button",{type:"button",className:"ggui-link",onClick:()=>Ve("/"),children:"playground"})," ","to start one, or point an agent at"," ",r.jsx("code",{className:"ggui-code",children:"ggui_render"}),"."]})]});const n=e.data.sessions,o=n.slice(0,3);return r.jsxs("div",{className:"ggui-status-hero ggui-status-hero--active","data-ggui-status-hero":"active","data-ggui-live-session-count":String(n.length),children:[r.jsx("div",{className:"ggui-status-hero__head",children:r.jsxs("span",{className:"ggui-status-hero__eyebrow",children:[r.jsx(Ce,{tone:"live",children:"live"}),r.jsxs("span",{children:[n.length," ",n.length===1?"session":"sessions"]})]})}),r.jsx("ul",{className:"ggui-status-hero__list",children:o.map(l=>r.jsx("li",{className:"ggui-status-hero__row","data-ggui-dashboard-session-id":l.sessionId,children:r.jsxs("div",{className:"ggui-status-hero__row-main",children:[l.shortCode?r.jsx("code",{className:"ggui-code","data-ggui-status-hero-shortcode":l.shortCode,children:l.shortCode}):r.jsxs("code",{className:"ggui-code",children:[l.sessionId.slice(0,8),"…"]}),r.jsx("span",{className:"ggui-muted",children:S7(l.lastActivityAt)})]})},l.sessionId))}),n.length>o.length?r.jsx("div",{className:"ggui-status-hero__foot",children:r.jsxs("button",{type:"button",className:"ggui-link",onClick:()=>Ve("/admin/sessions"),children:["view all ",n.length," →"]})}):r.jsx("div",{className:"ggui-status-hero__foot",children:r.jsx("button",{type:"button",className:"ggui-link",onClick:()=>Ve("/admin/sessions"),children:"view all →"})})]})}function S7(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),f=p=>p<10?`0${p}`:String(p);return`${u.getFullYear()}-${f(u.getMonth()+1)}-${f(u.getDate())}`}function gn({num:e,title:n,children:o}){return r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:n}),r.jsx("span",{className:"ggui-card__num",children:e})]}),r.jsx("div",{className:"ggui-card__body",children:o})]})}function w7(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 Yn(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}: ${w7(c)};`):c!==null&&typeof c=="object"&&Yn(c,`${n}-${l}`,o))}function k7(e){const n=[];return Yn(e.color,"color",n),Yn(e.font,"font",n),Yn(e.spacing,"spacing",n),Yn(e.shape,"shape",n),Yn({duration:e.motion.duration,easing:e.motion.easing,transition:e.motion.transition},"motion",n),Yn(e.accessibility,"accessibility",n),Yn(e.zIndex,"zIndex",n),n.join(`
211
+ `)}function N7(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} {
212
+ ${l.join(`
213
+ `)}
214
+ }`}function z7(e){const n=[];for(const[o,l]of Object.entries(e.motion.keyframes))o.startsWith("$")||n.push(N7(o,String(l.$value)));return n.join(`
215
+
216
+ `)}function E7(e,n){const l=`:root {
217
+ ${k7(n)}
218
+ }`,c=z7(n),u=c?`${l}
219
+
220
+ ${c}`:l;return{id:e,name:n.$name,description:n.$description,metadata:n.$metadata,cssVariables:l,cssKeyframes:c,css:u}}const 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"}}}},We={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"}}}},la={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}},Rc={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)"}},nr={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:Rc,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"}}}},C7={$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:nr.font,spacing:nr.spacing,shape:nr.shape,motion:nr.motion,accessibility:{...We.light,focusRing:{...We.light.focusRing,color:{$type:"color",$value:"#292929"}}},zIndex:la},T7={$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:nr.font,spacing:nr.spacing,shape:nr.shape,motion:nr.motion,accessibility:{...We.dark,focusRing:{...We.dark.focusRing,color:{$type:"color",$value:"#f4f3ed"}}},zIndex:la},M7={light:C7,dark:T7},rr={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)"}}}},R7={$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:rr.font,spacing:rr.spacing,shape:rr.shape,motion:rr.motion,accessibility:{...We.light,focusRing:{...We.light.focusRing,color:{$type:"color",$value:"#06b6d4"}}},zIndex:la},O7={$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:rr.font,spacing:rr.spacing,shape:rr.shape,motion:rr.motion,accessibility:{...We.dark,focusRing:{...We.dark.focusRing,color:{$type:"color",$value:"#22d3ee"}}},zIndex:la},A7={light:R7,dark:O7},ir={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)"}}}},D7={$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:ir.font,spacing:ir.spacing,shape:ir.shape,motion:ir.motion,accessibility:{...We.light,focusRing:{...We.light.focusRing,color:{$type:"color",$value:"#748660"}}},zIndex:la},U7={$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:ir.font,spacing:ir.spacing,shape:ir.shape,motion:ir.motion,accessibility:{...We.dark,focusRing:{...We.dark.focusRing,color:{$type:"color",$value:"#93a17c"}}},zIndex:la},I7={light:D7,dark:U7},or={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"}}}},L7={$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:or.font,spacing:or.spacing,shape:or.shape,motion:or.motion,accessibility:{...We.dark,focusRing:{...We.dark.focusRing,color:{$value:"#ec4899",$type:"color"}}},zIndex:la},V7={$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:or.font,spacing:or.spacing,shape:or.shape,motion:or.motion,accessibility:{...We.dark,focusRing:{...We.dark.focusRing,color:{$value:"#f472b6",$type:"color"}}},zIndex:la},H7={light:L7,dark:V7},lr={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:Rc}},B7={$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:lr.font,spacing:lr.spacing,shape:lr.shape,motion:lr.motion,accessibility:{...We.light,focusRing:{...We.light.focusRing,color:{$type:"color",$value:"#16a34a"}}},zIndex:la},q7={$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:lr.font,spacing:lr.spacing,shape:lr.shape,motion:lr.motion,accessibility:{...We.dark,focusRing:{...We.dark.focusRing,color:{$type:"color",$value:"#4ade80"}}},zIndex:la},P7={light:B7,dark:q7},Z7={...Rc,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)"}},sr={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:Z7}},G7={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"}},F7={$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:{...G7},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:sr.font,spacing:sr.spacing,shape:sr.shape,motion:sr.motion,accessibility:{...We.light,focusRing:{...We.light.focusRing,color:{$type:"color",$value:"#cc785c"}}},zIndex:la},Y7={$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:sr.font,spacing:sr.spacing,shape:sr.shape,motion:sr.motion,accessibility:{...We.dark,focusRing:{...We.dark.focusRing,color:{$type:"color",$value:"#d6896c"}}},zIndex:la},K7={light:F7,dark:Y7},cr={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:Rc}},W7={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"}},X7={$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:{...W7},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:cr.font,spacing:cr.spacing,shape:cr.shape,motion:cr.motion,accessibility:{...We.light,focusRing:{...We.light.focusRing,color:{$type:"color",$value:"#4f46e5"}}},zIndex:la},J7={$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:cr.font,spacing:cr.spacing,shape:cr.shape,motion:cr.motion,accessibility:{...We.dark,focusRing:{...We.dark.focusRing,color:{$type:"color",$value:"#818cf8"}}},zIndex:la},Q7={light:X7,dark:J7},X1=new Map([["ggui",M7],["indigo",Q7],["claudic",K7],["premium-cyberpunk",A7],["premium-zen",I7],["premium-neon-noir",H7],["premium-botanical",P7]]);function ez(e,n){return n==="dark"&&e.dark?"dark":"light"}function J1(e,n="light"){const o=X1.get(e);return o?ez(o,n)==="dark"?o.dark:o.light:void 0}function tz(){const e=[];for(const[n,o]of X1){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}I.createContext(null);function az(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 nz(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 rz(){var b;const e=I.useMemo(()=>tz(),[]),n=((b=e[0])==null?void 0:b.id)??"ggui",[o,l]=I.useState({kind:"loading"}),[c,u]=I.useState(n),[f,p]=I.useState("light"),[g,h]=I.useState(!1),[y,v]=I.useState(null),[S,N]=I.useState(!1),[x,E]=I.useState({}),z=async()=>{l(j=>j.kind==="ready"?j:{kind:"loading"});try{const j=await fetch("/ggui/console/theme",{credentials:"include",headers:{accept:"application/json"}});if(j.status===401){Ve(`/admin-login?next=${encodeURIComponent("/admin/theme")}`);return}if(!j.ok){l({kind:"error",message:`server returned ${j.status}`});return}const T=await j.json();l({kind:"ready",data:T});const O=az(T.current,n);u(O.presetId),p(O.mode),N(O.fromFile),E({...O.overrides})}catch(j){l({kind:"error",message:String(j)})}};I.useEffect(()=>{z()},[]);const k=(j,T)=>{E(O=>{const V={...O};return T===null||T===""?delete V[j]:V[j]=T,V})},$=()=>{E({})},w=async j=>{if(o.kind==="ready"){v(null),h(!0);try{const T=await j.text();let O;try{O=JSON.parse(T)}catch(Q){v(`upload failed — file is not valid JSON: ${String(Q)}`);return}const V=j.name.replace(/[^a-zA-Z0-9._-]/g,"-"),F=/\.json$/i.test(V)?V:`${V}.json`,H=await fetch("/ggui/console/theme/upload",{method:"POST",credentials:"include",headers:{"content-type":"application/json",accept:"application/json"},body:JSON.stringify({filename:F,content:O,mode:f})});if(H.status===401){Ve(`/admin-login?next=${encodeURIComponent("/admin/theme")}`);return}if(H.status===400){const Q=await H.json();v(Q.message??`upload rejected — ${Q.error??"invalid_content"}: ${JSON.stringify(Q.issue)}`);return}if(H.status===501){const Q=await H.json();v(Q.message??"Theme uploads need the CLI’s themeFileUploader — launch via `ggui serve`.");return}if(!H.ok){v(`upload failed — server returned ${H.status}`);return}await z()}catch(T){v(`upload failed — ${String(T)}`)}finally{h(!1)}}},R=async()=>{if(o.kind==="ready"){v(null),h(!0);try{const j=await fetch("/ggui/console/theme",{method:"POST",credentials:"include",headers:{"content-type":"application/json",accept:"application/json"},body:JSON.stringify(nz(c,f,x))});if(j.status===401){Ve(`/admin-login?next=${encodeURIComponent("/admin/theme")}`);return}if(j.status===501){const T=await j.json();v(T.message??"Theme writes need the CLI’s themeWriter — launch via `ggui serve`.");return}if(!j.ok){v(`save failed — server returned ${j.status}`);return}await z()}catch(j){v(`save failed — ${String(j)}`)}finally{h(!1)}}};return r.jsxs("section",{className:"ggui-section",children:[r.jsx(tt,{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:r.jsxs(r.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"," ",r.jsx("code",{className:"ggui-code",children:"ggui.json"})," and takes effect on the next generation."]})}),o.kind==="loading"?r.jsx("p",{className:"ggui-muted",style:{margin:0,padding:12},children:"Loading themes…"}):o.kind==="error"?r.jsxs("p",{className:"ggui-muted",style:{margin:0,padding:12},"data-ggui-theme-error":!0,children:["Couldn’t load theme state — ",o.message]}):r.jsx(iz,{presets:e,selectedPresetId:c,mode:f,writerEnabled:o.data.writerEnabled,uploadEnabled:o.data.uploadEnabled??!1,fromFile:S,busy:g,err:y,overrides:x,onSelectPreset:u,onSelectMode:p,onSetOverride:k,onClearAllOverrides:$,onSave:()=>{R()},onUploadFile:j=>{w(j)}})]})}function iz({presets:e,selectedPresetId:n,mode:o,writerEnabled:l,uploadEnabled:c,fromFile:u,busy:f,err:p,overrides:g,onSelectPreset:h,onSelectMode:y,onSetOverride:v,onClearAllOverrides:S,onSave:N,onUploadFile:x}){const E=e.find(w=>w.id===n),z=(E==null?void 0:E.modes.includes("dark"))??!1,k=o==="dark"&&!z?"light":o,$=J1(n,k);return r.jsxs("div",{"data-ggui-theme-layout":!0,style:{display:"flex",gap:16,alignItems:"flex-start"},children:[r.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:[r.jsxs("div",{className:"ggui-stack__head",style:{display:"flex",alignItems:"center",gap:8},children:[r.jsx("span",{className:"ggui-stack__num",children:"THM"}),r.jsx("span",{className:"ggui-stack__label",children:"mode"}),r.jsxs("span",{style:{marginLeft:"auto",display:"inline-flex",gap:8},children:[r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost","data-ggui-theme-mode":"light",onClick:()=>y("light"),...k==="light"?{"aria-pressed":!0}:{},style:k==="light"?{fontWeight:600}:void 0,children:"◐ Light"}),r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost","data-ggui-theme-mode":"dark",onClick:()=>y("dark"),disabled:!z,title:z?"Switch to dark variant":"This preset hasn’t shipped a dark variant yet",...k==="dark"?{"aria-pressed":!0}:{},style:k==="dark"?{fontWeight:600}:void 0,children:"◑ Dark"})]})]}),u?r.jsxs("p",{className:"ggui-muted",style:{margin:0,fontSize:12},children:["⚠ Current selection is a file-form theme (",r.jsx("code",{className:"ggui-code",children:'{ file: "..." }'}),"). Saving a preset below will replace it."]}):null,l?null:r.jsxs("p",{className:"ggui-muted",style:{margin:0,fontSize:12},children:["Read-only — launch via ",r.jsx("code",{className:"ggui-code",children:"ggui serve"})," ","to enable saves."]}),r.jsx("div",{"data-ggui-theme-grid":!0,style:{display:"flex",flexDirection:"column",gap:6},children:e.map(w=>r.jsx(dz,{preset:w,selected:w.id===n,mode:k,onSelect:()=>h(w.id)},w.id))}),r.jsx("div",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap",paddingTop:4,borderTop:"1px solid currentColor",marginTop:4,opacity:.95},children:r.jsxs("button",{type:"button",className:"ggui-btn","data-ggui-theme-save":!0,disabled:f||!l,onClick:N,style:{flex:1},children:[r.jsx("span",{className:"ggui-btn__dot","aria-hidden":!0}),f?"saving…":"Save to ggui.json"]})}),r.jsxs("p",{className:"ggui-muted",style:{margin:0,fontSize:11,lineHeight:1.4},children:[r.jsx("code",{className:"ggui-code",children:n})," ","· ",r.jsx("code",{className:"ggui-code",children:k}),Object.keys(g).length>0?r.jsxs(r.Fragment,{children:[" ","· ",r.jsxs("code",{className:"ggui-code",children:["+",Object.keys(g).length," override",Object.keys(g).length===1?"":"s"]})]}):null,k!==o?r.jsxs(r.Fragment,{children:[" ","· requested ",r.jsx("code",{className:"ggui-code",children:o}),", fell back"]}):null]}),r.jsx(sz,{uploadEnabled:c,busy:f,onUploadFile:x}),p?r.jsx("p",{className:"ggui-muted",style:{margin:0,color:"#c0392b",fontSize:12},"data-ggui-theme-error":!0,children:p}):null,$?r.jsx(cz,{rawTheme:$,overrides:g,onSetOverride:v,onClearAll:S}):r.jsxs("p",{className:"ggui-muted",style:{margin:0,fontSize:12},children:["⚠ ",r.jsx("code",{className:"ggui-code",children:n})," isn’t registered on this build. Saving still writes the manifest; overrides require a recognised preset."]})]}),r.jsx("main",{"aria-label":"theme preview",style:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:12},children:$?r.jsx(fz,{presetId:n,mode:k,rawTheme:$,overrides:g}):r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"preview unavailable"}),r.jsx("span",{className:"ggui-card__num",children:"PRV / 00"})]}),r.jsx("div",{className:"ggui-card__body",children:r.jsxs("p",{className:"ggui-muted",style:{margin:0},children:[r.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 oz(e){const n=u=>{const f=u.$value;return typeof f=="string"?f:JSON.stringify(f)},o=(u,f)=>Object.keys(f).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(f[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 lz="https://github.com/ggui-ai/ggui/blob/main/design/CUSTOM_THEMES.md";function sz({uploadEnabled:e,busy:n,onUploadFile:o}){return r.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?r.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:[r.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,r.jsx("a",{href:lz,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 cz({rawTheme:e,overrides:n,onSetOverride:o,onClearAll:l}){const c=I.useMemo(()=>oz(e),[e]),u=Object.keys(n).length;return r.jsxs("div",{"data-ggui-theme-overrides":!0,className:"ggui-stack",style:{marginTop:16},"aria-label":"theme token overrides",children:[r.jsxs("div",{className:"ggui-stack__head",children:[r.jsx("span",{className:"ggui-stack__num",children:"DTCG"}),r.jsx("span",{className:"ggui-stack__label",children:"overrides"}),r.jsxs("span",{className:"ggui-stack__count",children:[u," ",u===1?"override":"overrides"]}),u>0?r.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]}),r.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 ",r.jsx("code",{className:"ggui-code",children:"$value"}),"; type a CSS-valid replacement to override it. Per-leaf"," ",r.jsx("em",{children:"reset"})," clears that path; saving with no overrides writes the bare ",r.jsx("code",{className:"ggui-code",children:"{ preset, mode }"})," ","shape (no ",r.jsx("code",{className:"ggui-code",children:"overrides"})," field)."]}),c.map(f=>r.jsxs("details",{...f.prefix==="color.primary"?{open:!0}:{},style:{marginTop:8},children:[r.jsxs("summary",{style:{cursor:"pointer",padding:"6px 0",fontSize:13,fontWeight:500,userSelect:"none"},children:[f.label," ",r.jsxs("span",{className:"ggui-muted",style:{fontSize:11},children:["(",f.leaves.length,f.leaves.some(p=>p.path in n)?`, +${f.leaves.filter(p=>p.path in n).length} overridden`:"",")"]})]}),r.jsx("div",{style:{display:"grid",gap:6,gridTemplateColumns:"auto 1fr auto",padding:"8px 0 8px 12px",alignItems:"center",fontSize:12},children:f.leaves.map(p=>r.jsx(uz,{path:p.path,presetValue:p.value,overrideValue:n[p.path]??null,onChange:o},p.path))})]},f.prefix))]})}function uz({path:e,presetValue:n,overrideValue:o,onChange:l}){const c=o!==null,u=o??"";return r.jsxs("div",{"data-ggui-theme-override-leaf":e,style:{display:"contents"},children:[r.jsx("code",{className:"ggui-code",style:{fontSize:11,opacity:.85,padding:"2px 6px"},children:e}),r.jsx("input",{type:"text","data-ggui-theme-override-input":!0,value:u,placeholder:n,onChange:f=>{const p=f.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}`}),r.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 dz({preset:e,selected:n,mode:o,onSelect:l}){var g;const c=e.modes.includes("dark"),u=J1(e.id,o),f=(g=u==null?void 0:u.color.primary["500"])==null?void 0:g.$value,p=u==null?void 0:u.color.surface.$value;return r.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:[r.jsxs("span",{"aria-hidden":!0,style:{display:"inline-flex",flexShrink:0,width:28,height:28,borderRadius:4,overflow:"hidden",border:"1px solid currentColor"},children:[r.jsx("span",{style:{flex:1,background:f??"#ccc"}}),r.jsx("span",{style:{flex:1,background:p??"#fff"}})]}),r.jsxs("span",{style:{flex:1,minWidth:0},children:[r.jsx("span",{style:{display:"block",fontSize:13,fontWeight:n?600:500},children:e.name}),r.jsxs("span",{className:"ggui-muted",style:{display:"block",fontSize:11,opacity:.75},children:[e.id==="claudic"?"claude.ai · ":"",c?"Light · Dark":"Light only"]})]})]})}function Q1(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 f=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 S=f[v];if(S==null||typeof S!="object"){p=!1;break}f=S}if(!p)continue;const g=u[u.length-1];if(g===void 0)continue;const h=f[g];h===null||typeof h!="object"||(h.$value=c)}return o}function fz({presetId:e,mode:n,rawTheme:o,overrides:l}){const c=I.useMemo(()=>`ggui-theme-preview-${e}-${n}`,[e,n]),u=I.useMemo(()=>{const f=Q1(o,l),p=E7(e,f);return`${p.cssVariables.replace(/^:root\s*\{/,`.${c} {`)}
221
+ ${p.cssKeyframes}`},[o,l,e,c]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{"data-ggui-theme-preview-style":c,children:u}),r.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:[r.jsx(pz,{presetName:o.$name,mode:n}),r.jsx(gz,{}),r.jsx(mz,{}),r.jsx(hz,{}),r.jsx(yz,{theme:o,overrides:l}),r.jsx(vz,{})]})]})}function pz({presetName:e,mode:n}){return r.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:[r.jsx("span",{style:{fontSize:"var(--ggui-font-size-2xl, 1.5rem)",fontWeight:"var(--ggui-font-weight-semibold, 600)"},children:e}),r.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 gz(){return r.jsxs("section",{style:{display:"flex",flexDirection:"column",gap:8},children:[r.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"}),r.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"," ",r.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"," ",r.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."]}),r.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 mz(){return r.jsxs("section",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:[r.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"}),r.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"}),r.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 hz(){return r.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:[r.jsx("strong",{style:{fontSize:"var(--ggui-font-size-lg, 1.125rem)",fontWeight:"var(--ggui-font-weight-semibold, 600)"},children:"Container card"}),r.jsxs("span",{style:{fontSize:"var(--ggui-font-size-sm, 0.875rem)"},children:["Painted with ",r.jsx("code",{style:{fontFamily:"var(--ggui-font-family-mono)"},children:"color.container"})," ","+ ",r.jsx("code",{style:{fontFamily:"var(--ggui-font-family-mono)"},children:"color.onContainer"})," ","— the role pair generated UIs reach for to highlight primary-tinted content."]}),r.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 yz({theme:e,overrides:n}){const o=I.useMemo(()=>Q1(e,n),[e,n]),l=(c,u,f)=>{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 r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[r.jsx("span",{style:{width:64,fontSize:"var(--ggui-font-size-sm, 0.875rem)",color:"var(--ggui-color-onSurfaceVariant)"},children:c}),r.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?r.jsx("span",{title:`${c.toLowerCase()}.${g} · ${h.$value}`,style:{flex:1,height:24,background:h.$value}},g):null})})]})};return r.jsxs("section",{style:{display:"flex",flexDirection:"column",gap:8},children:[r.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 vz(){const e=(n,o)=>r.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:"var(--ggui-font-size-sm, 0.875rem)"},children:[r.jsx("span",{"aria-hidden":!0,style:{width:12,height:12,borderRadius:"50%",background:n,border:"1px solid var(--ggui-color-outline)"}}),r.jsx("span",{style:{color:"var(--ggui-color-onSurfaceVariant)"},children:o})]});return r.jsxs("section",{style:{display:"flex",gap:16,flexWrap:"wrap"},children:[e("var(--ggui-color-success)","success"),e("var(--ggui-color-warning)","warning"),e("var(--ggui-color-error)","error"),e("var(--ggui-color-info)","info")]})}const e$={kind:"admin-index"};function $z(){return typeof window>"u"?e$:Rb(window.location.pathname)}function bz(){return e$}function xz(){const e=I.useSyncExternalStore(Ob,$z,bz);return e.kind==="blueprint"?r.jsx(Ut,{route:e,variant:"narrow",children:r.jsx(z9,{blueprintId:e.blueprintId})}):e.kind==="admin-index"||e.kind==="admin-status"?r.jsx(Ut,{route:e,variant:"admin",children:r.jsx(y7,{})}):e.kind==="admin-sessions"?r.jsx(Ut,{route:e,variant:"admin",children:r.jsx(f7,{})}):e.kind==="admin-blueprints"?r.jsx(Ut,{route:e,variant:"admin",children:r.jsx(M9,{})}):e.kind==="admin-variants"?r.jsx(Ut,{route:e,variant:"admin",children:r.jsx(nN,{})}):e.kind==="admin-variant-detail"?r.jsx(Ut,{route:e,variant:"admin",children:r.jsx(X9,{contractHash:e.contractHash})}):e.kind==="admin-variant-generate"?r.jsx(Ut,{route:e,variant:"admin",children:r.jsx(Q9,{contractHash:e.contractHash})}):e.kind==="admin-config"?r.jsx(Ut,{route:e,variant:"admin",children:r.jsx(uN,{})}):e.kind==="admin-tools"?r.jsx(Ut,{route:e,variant:"admin",children:r.jsx(c7,{})}):e.kind==="admin-llm-keys"?r.jsx(Ut,{route:e,variant:"admin",children:r.jsx(Xb,{})}):e.kind==="admin-connector-keys"?r.jsx(Ut,{route:e,variant:"admin",children:r.jsx(r7,{})}):e.kind==="admin-oauth-providers"?r.jsx(Ut,{route:e,variant:"admin",children:r.jsx(tx,{})}):e.kind==="admin-clients"?r.jsx(Ut,{route:e,variant:"admin",children:r.jsx(rN,{})}):e.kind==="admin-theme"?r.jsx(Ut,{route:e,variant:"admin",children:r.jsx(rz,{})}):e.kind==="admin-login"?r.jsx(Ut,{route:e,variant:"narrow",children:r.jsx(Yb,{})}):lv(e)?r.jsx(Ut,{route:e,variant:"devtools",children:r.jsx(n7,{route:e})}):r.jsx(Ut,{route:e,variant:"narrow",children:r.jsx(_z,{pathname:e.pathname})})}function _z({pathname:e}){return r.jsxs("section",{className:"ggui-section",children:[r.jsx(tt,{num:"404 / not found",title:"Nothing lives here.",mute:"This is an operator-only server.",intro:r.jsxs(r.Fragment,{children:[r.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."]})}),r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"routes"}),r.jsx("span",{className:"ggui-card__num",children:"RTE / 01"})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsxs("ul",{style:{listStyle:"none",padding:0,margin:0,display:"grid",gap:10},children:[r.jsx("li",{children:r.jsxs("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:()=>Ve("/admin/status"),children:[r.jsx("span",{className:"ggui-btn__dot","aria-hidden":!0}),"/ admin"]})}),r.jsx("li",{children:r.jsxs("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:()=>Ve("/admin-login"),children:[r.jsx("span",{className:"ggui-btn__dot","aria-hidden":!0}),"/ admin-login"]})})]}),r.jsxs("p",{className:"ggui-muted",children:["The"," ",r.jsx("code",{className:"ggui-code",children:"/preview/<blueprintId>"})," ","route requires a real id — paste a blueprint id registered in ",r.jsx("code",{className:"ggui-code",children:"ggui.json"}),"."]})]})]})]})}const t$=document.getElementById("root");if(!t$)throw new Error("console: #root element missing from index.html");Tb.createRoot(t$).render(r.jsx(I.StrictMode,{children:r.jsx(xz,{})}));export{el as g,zb as r};