ai-zero-token 1.0.10 → 2.0.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,1745 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var ee=Array.isArray;function S(){}var C={H:null,A:null,T:null,S:null},te=Object.prototype.hasOwnProperty;function ne(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function re(e,t){return ne(e.type,t,e.props)}function ie(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function w(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var ae=/\/+/g;function oe(e,t){return typeof e==`object`&&e&&e.key!=null?w(``+e.key):t.toString(36)}function se(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(S,S):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function ce(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,ce(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+oe(e,0):a,ee(o)?(i=``,c!=null&&(i=c.replace(ae,`$&/`)+`/`),ce(o,r,i,``,function(e){return e})):o!=null&&(ie(o)&&(o=re(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(ae,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(ee(e))for(var u=0;u<e.length;u++)a=e[u],s=l+oe(a,u),c+=ce(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+oe(a,u++),c+=ce(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return ce(se(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function le(e,t,n){if(e==null)return e;var r=[],i=0;return ce(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ue(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var T=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},E={map:le,forEach:function(e,t,n){le(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return le(e,function(){t++}),t},toArray:function(e){return le(e,function(e){return e})||[]},only:function(e){if(!ie(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=E,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=C,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return C.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!te.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return ne(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)te.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return ne(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=ie,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ue}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=C.T,n={};C.T=n;try{var r=e(),i=C.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(S,T)}catch(e){T(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),C.T=t}},e.unstable_useCacheRefresh=function(){return C.H.useCacheRefresh()},e.use=function(e){return C.H.use(e)},e.useActionState=function(e,t,n){return C.H.useActionState(e,t,n)},e.useCallback=function(e,t){return C.H.useCallback(e,t)},e.useContext=function(e){return C.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return C.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return C.H.useEffect(e,t)},e.useEffectEvent=function(e){return C.H.useEffectEvent(e)},e.useId=function(){return C.H.useId()},e.useImperativeHandle=function(e,t,n){return C.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return C.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return C.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return C.H.useMemo(e,t)},e.useOptimistic=function(e,t){return C.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return C.H.useReducer(e,t,n)},e.useRef=function(e){return C.H.useRef(e)},e.useState=function(e){return C.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return C.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return C.H.useTransition()},e.version=`19.2.5`})),u=o(((e,t)=>{t.exports=l()})),d=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,ee||(ee=!0,ie());else{var t=n(l);t!==null&&oe(x,t.startTime-e)}}var ee=!1,S=-1,C=5,te=-1;function ne(){return g?!0:!(e.unstable_now()-te<C)}function re(){if(g=!1,ee){var t=e.unstable_now();te=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(S),S=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&ne());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&oe(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?ie():ee=!1}}}var ie;if(typeof y==`function`)ie=function(){y(re)};else if(typeof MessageChannel<`u`){var w=new MessageChannel,ae=w.port2;w.port1.onmessage=re,ie=function(){ae.postMessage(null)}}else ie=function(){_(re,0)};function oe(t,n){S=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):C=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(S),S=-1):h=!0,oe(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,ee||(ee=!0,ie()))),r},e.unstable_shouldYield=ne,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),f=o(((e,t)=>{t.exports=d()})),p=o((e=>{var t=u();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.5`})),m=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=p()})),h=o((e=>{var t=f(),n=u(),r=m();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function d(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function p(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=p(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),ee=Symbol.for(`react.consumer`),S=Symbol.for(`react.context`),C=Symbol.for(`react.forward_ref`),te=Symbol.for(`react.suspense`),ne=Symbol.for(`react.suspense_list`),re=Symbol.for(`react.memo`),ie=Symbol.for(`react.lazy`),w=Symbol.for(`react.activity`),ae=Symbol.for(`react.memo_cache_sentinel`),oe=Symbol.iterator;function se(e){return typeof e!=`object`||!e?null:(e=oe&&e[oe]||e[`@@iterator`],typeof e==`function`?e:null)}var ce=Symbol.for(`react.client.reference`);function le(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ce?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case te:return`Suspense`;case ne:return`SuspenseList`;case w:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case S:return e.displayName||`Context`;case ee:return(e._context.displayName||`Context`)+`.Consumer`;case C:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case re:return t=e.displayName||null,t===null?le(e.type)||`Memo`:t;case ie:t=e._payload,e=e._init;try{return le(e(t))}catch{}}return null}var ue=Array.isArray,T=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,E=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,de={pending:!1,data:null,method:null,action:null},fe=[],pe=-1;function me(e){return{current:e}}function he(e){0>pe||(e.current=fe[pe],fe[pe]=null,pe--)}function D(e,t){pe++,fe[pe]=e.current,e.current=t}var ge=me(null),_e=me(null),ve=me(null),ye=me(null);function be(e,t){switch(D(ve,t),D(_e,e),D(ge,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}he(ge),D(ge,e)}function xe(){he(ge),he(_e),he(ve)}function Se(e){e.memoizedState!==null&&D(ye,e);var t=ge.current,n=Hd(t,e.type);t!==n&&(D(_e,e),D(ge,n))}function Ce(e){_e.current===e&&(he(ge),he(_e)),ye.current===e&&(he(ye),Qf._currentValue=de)}var we,Te;function Ee(e){if(we===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);we=t&&t[1]||``,Te=-1<e.stack.indexOf(`
2
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
3
+ `+we+e+Te}var De=!1;function Oe(e,t){if(!e||De)return``;De=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
4
+ `),l=s.split(`
5
+ `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
6
+ `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{De=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Ee(n):``}function ke(e,t){switch(e.tag){case 26:case 27:case 5:return Ee(e.type);case 16:return Ee(`Lazy`);case 13:return e.child!==t&&t!==null?Ee(`Suspense Fallback`):Ee(`Suspense`);case 19:return Ee(`SuspenseList`);case 0:case 15:return Oe(e.type,!1);case 11:return Oe(e.type.render,!1);case 1:return Oe(e.type,!0);case 31:return Ee(`Activity`);default:return``}}function Ae(e){try{var t=``,n=null;do t+=ke(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
7
+ Error generating stack: `+e.message+`
8
+ `+e.stack}}var je=Object.prototype.hasOwnProperty,O=t.unstable_scheduleCallback,Me=t.unstable_cancelCallback,Ne=t.unstable_shouldYield,Pe=t.unstable_requestPaint,Fe=t.unstable_now,Ie=t.unstable_getCurrentPriorityLevel,Le=t.unstable_ImmediatePriority,Re=t.unstable_UserBlockingPriority,ze=t.unstable_NormalPriority,Be=t.unstable_LowPriority,Ve=t.unstable_IdlePriority,He=t.log,Ue=t.unstable_setDisableYieldValue,We=null,Ge=null;function Ke(e){if(typeof He==`function`&&Ue(e),Ge&&typeof Ge.setStrictMode==`function`)try{Ge.setStrictMode(We,e)}catch{}}var qe=Math.clz32?Math.clz32:Xe,Je=Math.log,Ye=Math.LN2;function Xe(e){return e>>>=0,e===0?32:31-(Je(e)/Ye|0)|0}var Ze=256,Qe=262144,$e=4194304;function et(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function tt(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=et(n))):i=et(o):i=et(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=et(n))):i=et(o)):i=et(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function nt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function rt(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function it(){var e=$e;return $e<<=1,!($e&62914560)&&($e=4194304),e}function at(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ot(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function st(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-qe(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&ct(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function ct(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-qe(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function lt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-qe(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function ut(e,t){var n=t&-t;return n=n&42?1:dt(n),(n&(e.suspendedLanes|t))===0?n:0}function dt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function ft(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function pt(){var e=E.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function mt(e,t){var n=E.p;try{return E.p=e,t()}finally{E.p=n}}var ht=Math.random().toString(36).slice(2),k=`__reactFiber$`+ht,gt=`__reactProps$`+ht,_t=`__reactContainer$`+ht,vt=`__reactEvents$`+ht,yt=`__reactListeners$`+ht,bt=`__reactHandles$`+ht,xt=`__reactResources$`+ht,St=`__reactMarker$`+ht;function Ct(e){delete e[k],delete e[gt],delete e[vt],delete e[yt],delete e[bt]}function wt(e){var t=e[k];if(t)return t;for(var n=e.parentNode;n;){if(t=n[_t]||n[k]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[k])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function Tt(e){if(e=e[k]||e[_t]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Et(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Dt(e){var t=e[xt];return t||=e[xt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function A(e){e[St]=!0}var Ot=new Set,j={};function kt(e,t){At(e,t),At(e+`Capture`,t)}function At(e,t){for(j[e]=t,e=0;e<t.length;e++)Ot.add(t[e])}var jt=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]*$`),Mt={},Nt={};function Pt(e){return je.call(Nt,e)?!0:je.call(Mt,e)?!1:jt.test(e)?Nt[e]=!0:(Mt[e]=!0,!1)}function Ft(e,t,n){if(Pt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function It(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Lt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Rt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function zt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Bt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Vt(e){if(!e._valueTracker){var t=zt(e)?`checked`:`value`;e._valueTracker=Bt(e,t,``+e[t])}}function Ht(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=zt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Ut(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Wt=/[\n"\\]/g;function Gt(e){return e.replace(Wt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Kt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Rt(t)):e.value!==``+Rt(t)&&(e.value=``+Rt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Jt(e,o,Rt(n)):Jt(e,o,Rt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Rt(s):e.removeAttribute(`name`)}function qt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Vt(e);return}n=n==null?``:``+Rt(n),t=t==null?n:``+Rt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Vt(e)}function Jt(e,t,n){t===`number`&&Ut(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Yt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Rt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Xt(e,t,n){if(t!=null&&(t=``+Rt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Rt(n)}function Zt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(ue(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Rt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Vt(e)}function Qt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var $t=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 en(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||$t.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function tn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&en(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&en(e,o,t[o])}function nn(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var rn=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`]]),an=/^[\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 on(e){return an.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function sn(){}var cn=null;function ln(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var un=null,dn=null;function fn(e){var t=Tt(e);if(t&&(e=t.stateNode)){var n=e[gt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Kt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Gt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[gt]||null;if(!a)throw Error(i(90));Kt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Ht(r)}break a;case`textarea`:Xt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Yt(e,!!n.multiple,t,!1)}}}var pn=!1;function mn(e,t,n){if(pn)return e(t,n);pn=!0;try{return e(t)}finally{if(pn=!1,(un!==null||dn!==null)&&(bu(),un&&(t=un,e=dn,dn=un=null,fn(t),e)))for(t=0;t<e.length;t++)fn(e[t])}}function hn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[gt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var gn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),_n=!1;if(gn)try{var vn={};Object.defineProperty(vn,`passive`,{get:function(){_n=!0}}),window.addEventListener(`test`,vn,vn),window.removeEventListener(`test`,vn,vn)}catch{_n=!1}var yn=null,bn=null,xn=null;function Sn(){if(xn)return xn;var e,t=bn,n=t.length,r,i=`value`in yn?yn.value:yn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return xn=i.slice(e,1<r?1-r:void 0)}function Cn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function wn(){return!0}function Tn(){return!1}function En(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?wn:Tn,this.isPropagationStopped=Tn,this}return h(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=wn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=wn)},persist:function(){},isPersistent:wn}),t}var Dn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},On=En(Dn),kn=h({},Dn,{view:0,detail:0}),An=En(kn),jn,Mn,Nn,Pn=h({},kn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Gn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Nn&&(Nn&&e.type===`mousemove`?(jn=e.screenX-Nn.screenX,Mn=e.screenY-Nn.screenY):Mn=jn=0,Nn=e),jn)},movementY:function(e){return`movementY`in e?e.movementY:Mn}}),Fn=En(Pn),In=En(h({},Pn,{dataTransfer:0})),Ln=En(h({},kn,{relatedTarget:0})),Rn=En(h({},Dn,{animationName:0,elapsedTime:0,pseudoElement:0})),zn=En(h({},Dn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Bn=En(h({},Dn,{data:0})),Vn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Hn={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`},Un={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Wn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Un[e])?!!t[e]:!1}function Gn(){return Wn}var Kn=En(h({},kn,{key:function(e){if(e.key){var t=Vn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Cn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Hn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Gn,charCode:function(e){return e.type===`keypress`?Cn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Cn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),qn=En(h({},Pn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Jn=En(h({},kn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Gn})),Yn=En(h({},Dn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Xn=En(h({},Pn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Zn=En(h({},Dn,{newState:0,oldState:0})),Qn=[9,13,27,32],$n=gn&&`CompositionEvent`in window,er=null;gn&&`documentMode`in document&&(er=document.documentMode);var tr=gn&&`TextEvent`in window&&!er,nr=gn&&(!$n||er&&8<er&&11>=er),rr=` `,ir=!1;function ar(e,t){switch(e){case`keyup`:return Qn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function or(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var sr=!1;function cr(e,t){switch(e){case`compositionend`:return or(t);case`keypress`:return t.which===32?(ir=!0,rr):null;case`textInput`:return e=t.data,e===rr&&ir?null:e;default:return null}}function lr(e,t){if(sr)return e===`compositionend`||!$n&&ar(e,t)?(e=Sn(),xn=bn=yn=null,sr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return nr&&t.locale!==`ko`?null:t.data;default:return null}}var ur={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 dr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!ur[e.type]:t===`textarea`}function fr(e,t,n,r){un?dn?dn.push(r):dn=[r]:un=r,t=Ed(t,`onChange`),0<t.length&&(n=new On(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var pr=null,mr=null;function hr(e){yd(e,0)}function gr(e){if(Ht(Et(e)))return e}function _r(e,t){if(e===`change`)return t}var vr=!1;if(gn){var yr;if(gn){var br=`oninput`in document;if(!br){var xr=document.createElement(`div`);xr.setAttribute(`oninput`,`return;`),br=typeof xr.oninput==`function`}yr=br}else yr=!1;vr=yr&&(!document.documentMode||9<document.documentMode)}function Sr(){pr&&(pr.detachEvent(`onpropertychange`,Cr),mr=pr=null)}function Cr(e){if(e.propertyName===`value`&&gr(mr)){var t=[];fr(t,mr,e,ln(e)),mn(hr,t)}}function wr(e,t,n){e===`focusin`?(Sr(),pr=t,mr=n,pr.attachEvent(`onpropertychange`,Cr)):e===`focusout`&&Sr()}function Tr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return gr(mr)}function Er(e,t){if(e===`click`)return gr(t)}function Dr(e,t){if(e===`input`||e===`change`)return gr(t)}function Or(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var kr=typeof Object.is==`function`?Object.is:Or;function Ar(e,t){if(kr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!je.call(t,i)||!kr(e[i],t[i]))return!1}return!0}function jr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Mr(e,t){var n=jr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=jr(n)}}function Nr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Nr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Pr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ut(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ut(e.document)}return t}function Fr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Ir=gn&&`documentMode`in document&&11>=document.documentMode,Lr=null,Rr=null,zr=null,Br=!1;function Vr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Br||Lr==null||Lr!==Ut(r)||(r=Lr,`selectionStart`in r&&Fr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),zr&&Ar(zr,r)||(zr=r,r=Ed(Rr,`onSelect`),0<r.length&&(t=new On(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Lr)))}function Hr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Ur={animationend:Hr(`Animation`,`AnimationEnd`),animationiteration:Hr(`Animation`,`AnimationIteration`),animationstart:Hr(`Animation`,`AnimationStart`),transitionrun:Hr(`Transition`,`TransitionRun`),transitionstart:Hr(`Transition`,`TransitionStart`),transitioncancel:Hr(`Transition`,`TransitionCancel`),transitionend:Hr(`Transition`,`TransitionEnd`)},Wr={},Gr={};gn&&(Gr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Ur.animationend.animation,delete Ur.animationiteration.animation,delete Ur.animationstart.animation),`TransitionEvent`in window||delete Ur.transitionend.transition);function Kr(e){if(Wr[e])return Wr[e];if(!Ur[e])return e;var t=Ur[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Gr)return Wr[e]=t[n];return e}var qr=Kr(`animationend`),Jr=Kr(`animationiteration`),Yr=Kr(`animationstart`),Xr=Kr(`transitionrun`),Zr=Kr(`transitionstart`),Qr=Kr(`transitioncancel`),$r=Kr(`transitionend`),ei=new Map,ti=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);ti.push(`scrollEnd`);function ni(e,t){ei.set(e,t),kt(t,[e])}var ri=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},ii=[],ai=0,oi=0;function si(){for(var e=ai,t=oi=ai=0;t<e;){var n=ii[t];ii[t++]=null;var r=ii[t];ii[t++]=null;var i=ii[t];ii[t++]=null;var a=ii[t];if(ii[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&di(n,i,a)}}function ci(e,t,n,r){ii[ai++]=e,ii[ai++]=t,ii[ai++]=n,ii[ai++]=r,oi|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function li(e,t,n,r){return ci(e,t,n,r),fi(e)}function ui(e,t){return ci(e,null,null,t),fi(e)}function di(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-qe(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function fi(e){if(50<du)throw du=0,fu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var pi={};function mi(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function hi(e,t,n,r){return new mi(e,t,n,r)}function gi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function _i(e,t){var n=e.alternate;return n===null?(n=hi(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function vi(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function yi(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)gi(e)&&(s=1);else if(typeof e==`string`)s=Uf(e,n,ge.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case w:return e=hi(31,n,t,a),e.elementType=w,e.lanes=o,e;case y:return bi(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=hi(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case te:return e=hi(13,n,t,a),e.elementType=te,e.lanes=o,e;case ne:return e=hi(19,n,t,a),e.elementType=ne,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case S:s=10;break a;case ee:s=9;break a;case C:s=11;break a;case re:s=14;break a;case ie:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=hi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function bi(e,t,n,r){return e=hi(7,e,r,t),e.lanes=n,e}function xi(e,t,n){return e=hi(6,e,null,t),e.lanes=n,e}function Si(e){var t=hi(18,null,null,0);return t.stateNode=e,t}function Ci(e,t,n){return t=hi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var wi=new WeakMap;function Ti(e,t){if(typeof e==`object`&&e){var n=wi.get(e);return n===void 0?(t={value:e,source:t,stack:Ae(t)},wi.set(e,t),t):n}return{value:e,source:t,stack:Ae(t)}}var Ei=[],Di=0,Oi=null,ki=0,Ai=[],ji=0,Mi=null,Ni=1,Pi=``;function Fi(e,t){Ei[Di++]=ki,Ei[Di++]=Oi,Oi=e,ki=t}function Ii(e,t,n){Ai[ji++]=Ni,Ai[ji++]=Pi,Ai[ji++]=Mi,Mi=e;var r=Ni;e=Pi;var i=32-qe(r)-1;r&=~(1<<i),n+=1;var a=32-qe(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ni=1<<32-qe(t)+i|n<<i|r,Pi=a+e}else Ni=1<<a|n<<i|r,Pi=e}function Li(e){e.return!==null&&(Fi(e,1),Ii(e,1,0))}function Ri(e){for(;e===Oi;)Oi=Ei[--Di],Ei[Di]=null,ki=Ei[--Di],Ei[Di]=null;for(;e===Mi;)Mi=Ai[--ji],Ai[ji]=null,Pi=Ai[--ji],Ai[ji]=null,Ni=Ai[--ji],Ai[ji]=null}function zi(e,t){Ai[ji++]=Ni,Ai[ji++]=Pi,Ai[ji++]=Mi,Ni=t.id,Pi=t.overflow,Mi=e}var Bi=null,M=null,N=!1,Vi=null,Hi=!1,Ui=Error(i(519));function Wi(e){throw Xi(Ti(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Ui}function Gi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[k]=e,t[gt]=r,n){case`dialog`:Q(`cancel`,t),Q(`close`,t);break;case`iframe`:case`object`:case`embed`:Q(`load`,t);break;case`video`:case`audio`:for(n=0;n<_d.length;n++)Q(_d[n],t);break;case`source`:Q(`error`,t);break;case`img`:case`image`:case`link`:Q(`error`,t),Q(`load`,t);break;case`details`:Q(`toggle`,t);break;case`input`:Q(`invalid`,t),qt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Q(`invalid`,t);break;case`textarea`:Q(`invalid`,t),Zt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Md(t.textContent,n)?(r.popover!=null&&(Q(`beforetoggle`,t),Q(`toggle`,t)),r.onScroll!=null&&Q(`scroll`,t),r.onScrollEnd!=null&&Q(`scrollend`,t),r.onClick!=null&&(t.onclick=sn),t=!0):t=!1,t||Wi(e,!0)}function Ki(e){for(Bi=e.return;Bi;)switch(Bi.tag){case 5:case 31:case 13:Hi=!1;return;case 27:case 3:Hi=!0;return;default:Bi=Bi.return}}function qi(e){if(e!==Bi)return!1;if(!N)return Ki(e),N=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Ud(e.type,e.memoizedProps)),n=!n),n&&M&&Wi(e),Ki(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));M=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));M=uf(e)}else t===27?(t=M,Zd(e.type)?(e=lf,lf=null,M=e):M=t):M=Bi?cf(e.stateNode.nextSibling):null;return!0}function Ji(){M=Bi=null,N=!1}function Yi(){var e=Vi;return e!==null&&(Zl===null?Zl=e:Zl.push.apply(Zl,e),Vi=null),e}function Xi(e){Vi===null?Vi=[e]:Vi.push(e)}var Zi=me(null),Qi=null,$i=null;function ea(e,t,n){D(Zi,t._currentValue),t._currentValue=n}function ta(e){e._currentValue=Zi.current,he(Zi)}function na(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function ra(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),na(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),na(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function ia(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;kr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===ye.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}a=a.return}e!==null&&ra(t,e,n,r),t.flags|=262144}function aa(e){for(e=e.firstContext;e!==null;){if(!kr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function oa(e){Qi=e,$i=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function sa(e){return la(Qi,e)}function ca(e,t){return Qi===null&&oa(e),la(e,t)}function la(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},$i===null){if(e===null)throw Error(i(308));$i=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else $i=$i.next=t;return n}var ua=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},da=t.unstable_scheduleCallback,fa=t.unstable_NormalPriority,P={$$typeof:S,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function pa(){return{controller:new ua,data:new Map,refCount:0}}function ma(e){e.refCount--,e.refCount===0&&da(fa,function(){e.controller.abort()})}var ha=null,ga=0,_a=0,va=null;function ya(e,t){if(ha===null){var n=ha=[];ga=0,_a=dd(),va={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ga++,t.then(ba,ba),t}function ba(){if(--ga===0&&ha!==null){va!==null&&(va.status=`fulfilled`);var e=ha;ha=null,_a=0,va=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function xa(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var Sa=T.S;T.S=function(e,t){eu=Fe(),typeof t==`object`&&t&&typeof t.then==`function`&&ya(e,t),Sa!==null&&Sa(e,t)};var Ca=me(null);function wa(){var e=Ca.current;return e===null?K.pooledCache:e}function Ta(e,t){t===null?D(Ca,Ca.current):D(Ca,t.pool)}function Ea(){var e=wa();return e===null?null:{parent:P._currentValue,pool:e}}var Da=Error(i(460)),Oa=Error(i(474)),ka=Error(i(542)),Aa={then:function(){}};function ja(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Ma(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(sn,sn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ia(e),e;default:if(typeof t.status==`string`)t.then(sn,sn);else{if(e=K,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ia(e),e}throw Pa=t,Da}}function Na(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Pa=e,Da):e}}var Pa=null;function Fa(){if(Pa===null)throw Error(i(459));var e=Pa;return Pa=null,e}function Ia(e){if(e===Da||e===ka)throw Error(i(483))}var La=null,Ra=0;function za(e){var t=Ra;return Ra+=1,La===null&&(La=[]),Ma(La,e,t)}function Ba(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Va(e,t){throw t.$$typeof===g?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Ha(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=_i(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=xi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===ie&&Na(i)===t.type)?(t=a(t,n.props),Ba(t,n),t.return=e,t):(t=yi(n.type,n.key,n.props,null,e.mode,r),Ba(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=Ci(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=bi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=xi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=yi(t.type,t.key,t.props,null,e.mode,n),Ba(n,t),n.return=e,n;case v:return t=Ci(t,e.mode,n),t.return=e,t;case ie:return t=Na(t),f(e,t,n)}if(ue(t)||se(t))return t=bi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,za(t),n);if(t.$$typeof===S)return f(e,ca(e,t),n);Va(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case _:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case ie:return n=Na(n),p(e,t,n,r)}if(ue(n)||se(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,za(n),r);if(n.$$typeof===S)return p(e,t,ca(e,n),r);Va(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case _:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case ie:return r=Na(r),m(e,t,n,r,i)}if(ue(r)||se(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,za(r),i);if(r.$$typeof===S)return m(e,t,n,ca(t,r),i);Va(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),N&&Fi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return N&&Fi(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),N&&Fi(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),N&&Fi(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return N&&Fi(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),N&&Fi(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===ie&&Na(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ba(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=bi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=yi(o.type,o.key,o.props,null,e.mode,c),Ba(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=Ci(o,e.mode,c),c.return=e,e=c}return s(e);case ie:return o=Na(o),b(e,r,o,c)}if(ue(o))return h(e,r,o,c);if(se(o)){if(l=se(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,za(o),c);if(o.$$typeof===S)return b(e,r,ca(e,o),c);Va(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=xi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ra=0;var i=b(e,t,n,r);return La=null,i}catch(t){if(t===Da||t===ka)throw t;var a=hi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ua=Ha(!0),Wa=Ha(!1),Ga=!1;function Ka(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function qa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ja(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ya(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,G&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=fi(e),di(e,null,n),t}return ci(e,r,t,n),fi(e)}function Xa(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,lt(e,n)}}function Za(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Qa=!1;function $a(){if(Qa){var e=va;if(e!==null)throw e}}function eo(e,t,n,r){Qa=!1;var i=e.updateQueue;Ga=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(J&f)===f:(r&f)===f){f!==0&&f===_a&&(Qa=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(m=g.payload,typeof m==`function`){d=m.call(_,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m==`function`?m.call(_,d,f):m,f==null)break a;d=h({},d,f);break a;case 2:Ga=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Gl|=o,e.lanes=o,e.memoizedState=d}}function to(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function no(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)to(n[e],t)}var ro=me(null),io=me(0);function ao(e,t){e=Wl,D(io,e),D(ro,t),Wl=e|t.baseLanes}function oo(){D(io,Wl),D(ro,ro.current)}function so(){Wl=io.current,he(ro),he(io)}var co=me(null),lo=null;function uo(e){var t=e.alternate;D(F,F.current&1),D(co,e),lo===null&&(t===null||ro.current!==null||t.memoizedState!==null)&&(lo=e)}function fo(e){D(F,F.current),D(co,e),lo===null&&(lo=e)}function po(e){e.tag===22?(D(F,F.current),D(co,e),lo===null&&(lo=e)):mo(e)}function mo(){D(F,F.current),D(co,co.current)}function ho(e){he(co),lo===e&&(lo=null),he(F)}var F=me(0);function go(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||af(n)||of(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var _o=0,I=null,L=null,R=null,vo=!1,yo=!1,bo=!1,xo=0,So=0,Co=null,wo=0;function z(){throw Error(i(321))}function To(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!kr(e[n],t[n]))return!1;return!0}function Eo(e,t,n,r,i,a){return _o=a,I=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,T.H=e===null||e.memoizedState===null?Hs:Us,bo=!1,a=n(r,i),bo=!1,yo&&(a=Oo(t,n,r,i)),Do(e),a}function Do(e){T.H=Vs;var t=L!==null&&L.next!==null;if(_o=0,R=L=I=null,vo=!1,So=0,Co=null,t)throw Error(i(300));e===null||V||(e=e.dependencies,e!==null&&aa(e)&&(V=!0))}function Oo(e,t,n,r){I=e;var a=0;do{if(yo&&(Co=null),So=0,yo=!1,25<=a)throw Error(i(301));if(a+=1,R=L=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}T.H=Ws,o=t(n,r)}while(yo);return o}function ko(){var e=T.H,t=e.useState()[0];return t=typeof t.then==`function`?Fo(t):t,e=e.useState()[0],(L===null?null:L.memoizedState)!==e&&(I.flags|=1024),t}function Ao(){var e=xo!==0;return xo=0,e}function jo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Mo(e){if(vo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}vo=!1}_o=0,R=L=I=null,yo=!1,So=xo=0,Co=null}function No(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return R===null?I.memoizedState=R=e:R=R.next=e,R}function B(){if(L===null){var e=I.alternate;e=e===null?null:e.memoizedState}else e=L.next;var t=R===null?I.memoizedState:R.next;if(t!==null)R=t,L=e;else{if(e===null)throw I.alternate===null?Error(i(467)):Error(i(310));L=e,e={memoizedState:L.memoizedState,baseState:L.baseState,baseQueue:L.baseQueue,queue:L.queue,next:null},R===null?I.memoizedState=R=e:R=R.next=e}return R}function Po(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Fo(e){var t=So;return So+=1,Co===null&&(Co=[]),e=Ma(Co,e,t),t=I,(R===null?t.memoizedState:R.next)===null&&(t=t.alternate,T.H=t===null||t.memoizedState===null?Hs:Us),e}function Io(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Fo(e);if(e.$$typeof===S)return sa(e)}throw Error(i(438,String(e)))}function Lo(e){var t=null,n=I.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=I.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Po(),I.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=ae;return t.index++,n}function Ro(e,t){return typeof t==`function`?t(e):t}function zo(e){return Bo(B(),L,e)}function Bo(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(_o&f)===f:(J&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===_a&&(d=!0);else if((_o&p)===p){u=u.next,p===_a&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,I.lanes|=p,Gl|=p;f=u.action,bo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,I.lanes|=f,Gl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!kr(o,e.memoizedState)&&(V=!0,d&&(n=va,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Vo(e){var t=B(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);kr(o,t.memoizedState)||(V=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Ho(e,t,n){var r=I,a=B(),o=N;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!kr((L||a).memoizedState,n);if(s&&(a.memoizedState=n,V=!0),a=a.queue,ps(Go.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||R!==null&&R.memoizedState.tag&1){if(r.flags|=2048,cs(9,{destroy:void 0},Wo.bind(null,r,a,n,t),null),K===null)throw Error(i(349));o||_o&127||Uo(r,t,n)}return n}function Uo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=I.updateQueue,t===null?(t=Po(),I.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Wo(e,t,n,r){t.value=n,t.getSnapshot=r,Ko(t)&&qo(e)}function Go(e,t,n){return n(function(){Ko(t)&&qo(e)})}function Ko(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!kr(e,n)}catch{return!0}}function qo(e){var t=ui(e,2);t!==null&&hu(t,e,2)}function Jo(e){var t=No();if(typeof e==`function`){var n=e;if(e=n(),bo){Ke(!0);try{n()}finally{Ke(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ro,lastRenderedState:e},t}function Yo(e,t,n,r){return e.baseState=n,Bo(e,L,typeof r==`function`?r:Ro)}function Xo(e,t,n,r,a){if(Rs(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};T.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Zo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Zo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=T.T,o={};T.T=o;try{var s=n(i,r),c=T.S;c!==null&&c(o,s),Qo(e,t,s)}catch(n){es(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),T.T=a}}else try{a=n(i,r),Qo(e,t,a)}catch(n){es(e,t,n)}}function Qo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){$o(e,t,n)},function(n){return es(e,t,n)}):$o(e,t,n)}function $o(e,t,n){t.status=`fulfilled`,t.value=n,ts(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Zo(e,n)))}function es(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,ts(t),t=t.next;while(t!==r)}e.action=null}function ts(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ns(e,t){return t}function rs(e,t){if(N){var n=K.formState;if(n!==null){a:{var r=I;if(N){if(M){b:{for(var i=M,a=Hi;i.nodeType!==8;){if(!a){i=null;break b}if(i=cf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){M=cf(i.nextSibling),r=i.data===`F!`;break a}}Wi(r)}r=!1}r&&(t=n[0])}}return n=No(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ns,lastRenderedState:t},n.queue=r,n=Fs.bind(null,I,r),r.dispatch=n,r=Jo(!1),a=Ls.bind(null,I,!1,r.queue),r=No(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Xo.bind(null,I,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function is(e){return as(B(),L,e)}function as(e,t,n){if(t=Bo(e,t,ns)[0],e=zo(Ro)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Fo(t)}catch(e){throw e===Da?ka:e}else r=t;t=B();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(I.flags|=2048,cs(9,{destroy:void 0},os.bind(null,i,n),null)),[r,a,e]}function os(e,t){e.action=t}function ss(e){var t=B(),n=L;if(n!==null)return as(t,n,e);B(),t=t.memoizedState,n=B();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function cs(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=I.updateQueue,t===null&&(t=Po(),I.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ls(){return B().memoizedState}function us(e,t,n,r){var i=No();I.flags|=e,i.memoizedState=cs(1|t,{destroy:void 0},n,r===void 0?null:r)}function ds(e,t,n,r){var i=B();r=r===void 0?null:r;var a=i.memoizedState.inst;L!==null&&r!==null&&To(r,L.memoizedState.deps)?i.memoizedState=cs(t,a,n,r):(I.flags|=e,i.memoizedState=cs(1|t,a,n,r))}function fs(e,t){us(8390656,8,e,t)}function ps(e,t){ds(2048,8,e,t)}function ms(e){I.flags|=4;var t=I.updateQueue;if(t===null)t=Po(),I.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function hs(e){var t=B().memoizedState;return ms({ref:t,nextImpl:e}),function(){if(G&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function gs(e,t){return ds(4,2,e,t)}function _s(e,t){return ds(4,4,e,t)}function vs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ys(e,t,n){n=n==null?null:n.concat([e]),ds(4,4,vs.bind(null,t,e),n)}function bs(){}function xs(e,t){var n=B();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&To(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ss(e,t){var n=B();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&To(t,r[1]))return r[0];if(r=e(),bo){Ke(!0);try{e()}finally{Ke(!1)}}return n.memoizedState=[r,t],r}function Cs(e,t,n){return n===void 0||_o&1073741824&&!(J&261930)?e.memoizedState=t:(e.memoizedState=n,e=mu(),I.lanes|=e,Gl|=e,n)}function ws(e,t,n,r){return kr(n,t)?n:ro.current===null?!(_o&42)||_o&1073741824&&!(J&261930)?(V=!0,e.memoizedState=n):(e=mu(),I.lanes|=e,Gl|=e,t):(e=Cs(e,n,r),kr(e,t)||(V=!0),e)}function Ts(e,t,n,r,i){var a=E.p;E.p=a!==0&&8>a?a:8;var o=T.T,s={};T.T=s,Ls(e,!1,t,n);try{var c=i(),l=T.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Is(e,t,xa(c,r),pu(e)):Is(e,t,r,pu(e))}catch(n){Is(e,t,{then:function(){},status:`rejected`,reason:n},pu())}finally{E.p=a,o!==null&&s.types!==null&&(o.types=s.types),T.T=o}}function Es(){}function Ds(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Os(e).queue;Ts(e,a,t,de,n===null?Es:function(){return ks(e),n(r)})}function Os(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:de,baseState:de,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ro,lastRenderedState:de},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ro,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ks(e){var t=Os(e);t.next===null&&(t=e.alternate.memoizedState),Is(e,t.next.queue,{},pu())}function As(){return sa(Qf)}function js(){return B().memoizedState}function Ms(){return B().memoizedState}function Ns(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=pu();e=Ja(n);var r=Ya(t,e,n);r!==null&&(hu(r,t,n),Xa(r,t,n)),t={cache:pa()},e.payload=t;return}t=t.return}}function Ps(e,t,n){var r=pu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Rs(e)?zs(t,n):(n=li(e,t,n,r),n!==null&&(hu(n,e,r),Bs(n,t,r)))}function Fs(e,t,n){Is(e,t,n,pu())}function Is(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Rs(e))zs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,kr(s,o))return ci(e,t,i,0),K===null&&si(),!1}catch{}if(n=li(e,t,i,r),n!==null)return hu(n,e,r),Bs(n,t,r),!0}return!1}function Ls(e,t,n,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Rs(e)){if(t)throw Error(i(479))}else t=li(e,n,r,2),t!==null&&hu(t,e,2)}function Rs(e){var t=e.alternate;return e===I||t!==null&&t===I}function zs(e,t){yo=vo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Bs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,lt(e,n)}}var Vs={readContext:sa,use:Io,useCallback:z,useContext:z,useEffect:z,useImperativeHandle:z,useLayoutEffect:z,useInsertionEffect:z,useMemo:z,useReducer:z,useRef:z,useState:z,useDebugValue:z,useDeferredValue:z,useTransition:z,useSyncExternalStore:z,useId:z,useHostTransitionStatus:z,useFormState:z,useActionState:z,useOptimistic:z,useMemoCache:z,useCacheRefresh:z};Vs.useEffectEvent=z;var Hs={readContext:sa,use:Io,useCallback:function(e,t){return No().memoizedState=[e,t===void 0?null:t],e},useContext:sa,useEffect:fs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),us(4194308,4,vs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return us(4194308,4,e,t)},useInsertionEffect:function(e,t){us(4,2,e,t)},useMemo:function(e,t){var n=No();t=t===void 0?null:t;var r=e();if(bo){Ke(!0);try{e()}finally{Ke(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=No();if(n!==void 0){var i=n(t);if(bo){Ke(!0);try{n(t)}finally{Ke(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ps.bind(null,I,e),[r.memoizedState,e]},useRef:function(e){var t=No();return e={current:e},t.memoizedState=e},useState:function(e){e=Jo(e);var t=e.queue,n=Fs.bind(null,I,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:bs,useDeferredValue:function(e,t){return Cs(No(),e,t)},useTransition:function(){var e=Jo(!1);return e=Ts.bind(null,I,e.queue,!0,!1),No().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=I,a=No();if(N){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),K===null)throw Error(i(349));J&127||Uo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,fs(Go.bind(null,r,o,e),[e]),r.flags|=2048,cs(9,{destroy:void 0},Wo.bind(null,r,o,n,t),null),n},useId:function(){var e=No(),t=K.identifierPrefix;if(N){var n=Pi,r=Ni;n=(r&~(1<<32-qe(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=xo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=wo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:As,useFormState:rs,useActionState:rs,useOptimistic:function(e){var t=No();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ls.bind(null,I,!0,n),n.dispatch=t,[e,t]},useMemoCache:Lo,useCacheRefresh:function(){return No().memoizedState=Ns.bind(null,I)},useEffectEvent:function(e){var t=No(),n={impl:e};return t.memoizedState=n,function(){if(G&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Us={readContext:sa,use:Io,useCallback:xs,useContext:sa,useEffect:ps,useImperativeHandle:ys,useInsertionEffect:gs,useLayoutEffect:_s,useMemo:Ss,useReducer:zo,useRef:ls,useState:function(){return zo(Ro)},useDebugValue:bs,useDeferredValue:function(e,t){return ws(B(),L.memoizedState,e,t)},useTransition:function(){var e=zo(Ro)[0],t=B().memoizedState;return[typeof e==`boolean`?e:Fo(e),t]},useSyncExternalStore:Ho,useId:js,useHostTransitionStatus:As,useFormState:is,useActionState:is,useOptimistic:function(e,t){return Yo(B(),L,e,t)},useMemoCache:Lo,useCacheRefresh:Ms};Us.useEffectEvent=hs;var Ws={readContext:sa,use:Io,useCallback:xs,useContext:sa,useEffect:ps,useImperativeHandle:ys,useInsertionEffect:gs,useLayoutEffect:_s,useMemo:Ss,useReducer:Vo,useRef:ls,useState:function(){return Vo(Ro)},useDebugValue:bs,useDeferredValue:function(e,t){var n=B();return L===null?Cs(n,e,t):ws(n,L.memoizedState,e,t)},useTransition:function(){var e=Vo(Ro)[0],t=B().memoizedState;return[typeof e==`boolean`?e:Fo(e),t]},useSyncExternalStore:Ho,useId:js,useHostTransitionStatus:As,useFormState:ss,useActionState:ss,useOptimistic:function(e,t){var n=B();return L===null?(n.baseState=e,[e,n.queue.dispatch]):Yo(n,L,e,t)},useMemoCache:Lo,useCacheRefresh:Ms};Ws.useEffectEvent=hs;function Gs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:h({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ks={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=pu(),i=Ja(r);i.payload=t,n!=null&&(i.callback=n),t=Ya(e,i,r),t!==null&&(hu(t,e,r),Xa(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=pu(),i=Ja(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ya(e,i,r),t!==null&&(hu(t,e,r),Xa(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=pu(),r=Ja(n);r.tag=2,t!=null&&(r.callback=t),t=Ya(e,r,n),t!==null&&(hu(t,e,n),Xa(t,e,n))}};function qs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Ar(n,r)||!Ar(i,a):!0}function Js(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ks.enqueueReplaceState(t,t.state,null)}function Ys(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=h({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Xs(e){ri(e)}function Zs(e){console.error(e)}function Qs(e){ri(e)}function $s(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function ec(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function tc(e,t,n){return n=Ja(n),n.tag=3,n.payload={element:null},n.callback=function(){$s(e,t)},n}function nc(e){return e=Ja(e),e.tag=3,e}function rc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){ec(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){ec(t,n,r),typeof i!=`function`&&(ru===null?ru=new Set([this]):ru.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function ic(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&ia(t,n,a,!0),n=co.current,n!==null){switch(n.tag){case 31:case 13:return lo===null?Du():n.alternate===null&&X===0&&(X=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Aa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Gu(e,r,a)),!1;case 22:return n.flags|=65536,r===Aa?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Gu(e,r,a)),!1}throw Error(i(435,n.tag))}return Gu(e,r,a),Du(),!1}if(N)return t=co.current,t===null?(r!==Ui&&(t=Error(i(423),{cause:r}),Xi(Ti(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Ti(r,n),a=tc(e.stateNode,r,a),Za(e,a),X!==4&&(X=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Ui&&(e=Error(i(422),{cause:r}),Xi(Ti(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Ti(o,n),Xl===null?Xl=[o]:Xl.push(o),X!==4&&(X=2),t===null)return!0;r=Ti(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=tc(n.stateNode,r,e),Za(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(ru===null||!ru.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=nc(a),rc(a,e,n,r),Za(n,a),!1}n=n.return}while(n!==null);return!1}var ac=Error(i(461)),V=!1;function oc(e,t,n,r){t.child=e===null?Wa(t,null,n,r):Ua(t,e.child,n,r)}function sc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return oa(t),r=Eo(e,t,n,o,a,i),s=Ao(),e!==null&&!V?(jo(e,t,i),jc(e,t,i)):(N&&s&&Li(t),t.flags|=1,oc(e,t,r,i),t.child)}function cc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!gi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,lc(e,t,a,r,i)):(e=yi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Mc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Ar:n,n(o,r)&&e.ref===t.ref)return jc(e,t,i)}return t.flags|=1,e=_i(a,r),e.ref=t.ref,e.return=t,t.child=e}function lc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Ar(a,r)&&e.ref===t.ref)if(V=!1,t.pendingProps=r=a,Mc(e,i))e.flags&131072&&(V=!0);else return t.lanes=e.lanes,jc(e,t,i)}return _c(e,t,n,r,i)}function uc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return fc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ta(t,a===null?null:a.cachePool),a===null?oo():ao(t,a),po(t);else return r=t.lanes=536870912,fc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ta(t,null),oo(),mo(t)):(Ta(t,a.cachePool),ao(t,a),mo(t),t.memoizedState=null);return oc(e,t,i,n),t.child}function dc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function fc(e,t,n,r,i){var a=wa();return a=a===null?null:{parent:P._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ta(t,null),oo(),po(t),e!==null&&ia(e,t,r,!0),t.childLanes=i,null}function pc(e,t){return t=Ec({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function mc(e,t,n){return Ua(t,e.child,null,n),e=pc(t,t.pendingProps),e.flags|=2,ho(t),t.memoizedState=null,e}function hc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(N){if(r.mode===`hidden`)return e=pc(t,r),t.lanes=536870912,dc(null,e);if(fo(t),(e=M)?(e=rf(e,Hi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Mi===null?null:{id:Ni,overflow:Pi},retryLane:536870912,hydrationErrors:null},n=Si(e),n.return=t,t.child=n,Bi=t,M=null)):e=null,e===null)throw Wi(t);return t.lanes=536870912,null}return pc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(fo(t),a)if(t.flags&256)t.flags&=-257,t=mc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(V||ia(e,t,n,!1),a=(n&e.childLanes)!==0,V||a){if(r=K,r!==null&&(s=ut(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ui(e,s),hu(r,e,s),ac;Du(),t=mc(e,t,n)}else e=o.treeContext,M=cf(s.nextSibling),Bi=t,N=!0,Vi=null,Hi=!1,e!==null&&zi(t,e),t=pc(t,r),t.flags|=4096;return t}return e=_i(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function gc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function _c(e,t,n,r,i){return oa(t),n=Eo(e,t,n,r,void 0,i),r=Ao(),e!==null&&!V?(jo(e,t,i),jc(e,t,i)):(N&&r&&Li(t),t.flags|=1,oc(e,t,n,i),t.child)}function vc(e,t,n,r,i,a){return oa(t),t.updateQueue=null,n=Oo(t,r,n,i),Do(e),r=Ao(),e!==null&&!V?(jo(e,t,a),jc(e,t,a)):(N&&r&&Li(t),t.flags|=1,oc(e,t,n,a),t.child)}function yc(e,t,n,r,i){if(oa(t),t.stateNode===null){var a=pi,o=n.contextType;typeof o==`object`&&o&&(a=sa(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Ks,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ka(t),o=n.contextType,a.context=typeof o==`object`&&o?sa(o):pi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Gs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Ks.enqueueReplaceState(a,a.state,null),eo(t,r,a,i),$a(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Ys(n,s);a.props=c;var l=a.context,u=n.contextType;o=pi,typeof u==`object`&&u&&(o=sa(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Js(t,a,r,o),Ga=!1;var f=t.memoizedState;a.state=f,eo(t,r,a,i),$a(),l=t.memoizedState,s||f!==l||Ga?(typeof d==`function`&&(Gs(t,n,d,r),l=t.memoizedState),(c=Ga||qs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,qa(e,t),o=t.memoizedProps,u=Ys(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=pi,typeof l==`object`&&l&&(c=sa(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Js(t,a,r,c),Ga=!1,f=t.memoizedState,a.state=f,eo(t,r,a,i),$a();var p=t.memoizedState;o!==d||f!==p||Ga||e!==null&&e.dependencies!==null&&aa(e.dependencies)?(typeof s==`function`&&(Gs(t,n,s,r),p=t.memoizedState),(u=Ga||qs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&aa(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,gc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Ua(t,e.child,null,i),t.child=Ua(t,null,n,i)):oc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=jc(e,t,i),e}function bc(e,t,n,r){return Ji(),t.flags|=256,oc(e,t,n,r),t.child}var xc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Sc(e){return{baseLanes:e,cachePool:Ea()}}function Cc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Jl),e}function wc(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(F.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(N){if(a?uo(t):mo(t),(e=M)?(e=rf(e,Hi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Mi===null?null:{id:Ni,overflow:Pi},retryLane:536870912,hydrationErrors:null},n=Si(e),n.return=t,t.child=n,Bi=t,M=null)):e=null,e===null)throw Wi(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(mo(t),a=t.mode,c=Ec({mode:`hidden`,children:c},a),r=bi(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=Sc(n),r.childLanes=Cc(e,s,n),t.memoizedState=xc,dc(null,r)):(uo(t),Tc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(uo(t),t.flags&=-257,t=Dc(e,t,n)):t.memoizedState===null?(mo(t),c=r.fallback,a=t.mode,r=Ec({mode:`visible`,children:r.children},a),c=bi(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ua(t,e.child,null,n),r=t.child,r.memoizedState=Sc(n),r.childLanes=Cc(e,s,n),t.memoizedState=xc,t=dc(null,r)):(mo(t),t.child=e.child,t.flags|=128,t=null);else if(uo(t),of(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Xi({value:r,source:null,stack:null}),t=Dc(e,t,n)}else if(V||ia(e,t,n,!1),s=(n&e.childLanes)!==0,V||s){if(s=K,s!==null&&(r=ut(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ui(e,r),hu(s,e,r),ac;af(c)||Du(),t=Dc(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,M=cf(c.nextSibling),Bi=t,N=!0,Vi=null,Hi=!1,e!==null&&zi(t,e),t=Tc(t,r.children),t.flags|=4096);return t}return a?(mo(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=_i(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=bi(c,a,n,null),c.flags|=2):c=_i(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,dc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=Sc(n):(a=c.cachePool,a===null?a=Ea():(l=P._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=Cc(e,s,n),t.memoizedState=xc,dc(e.child,r)):(uo(t),n=e.child,e=n.sibling,n=_i(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Tc(e,t){return t=Ec({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Ec(e,t){return e=hi(22,e,null,t),e.lanes=0,e}function Dc(e,t,n){return Ua(t,e.child,null,n),e=Tc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Oc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),na(e.return,t,n)}function kc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Ac(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=F.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,D(F,o),oc(e,t,r,n),r=N?ki:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Oc(e,n,t);else if(e.tag===19)Oc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&go(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),kc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&go(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}kc(t,!0,n,null,a,r);break;case`together`:kc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function jc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Gl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(ia(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=_i(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=_i(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Mc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&aa(e))):!0}function Nc(e,t,n){switch(t.tag){case 3:be(t,t.stateNode.containerInfo),ea(t,P,e.memoizedState.cache),Ji();break;case 27:case 5:Se(t);break;case 4:be(t,t.stateNode.containerInfo);break;case 10:ea(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,fo(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(uo(t),e=jc(e,t,n),e===null?null:e.sibling):wc(e,t,n):(uo(t),t.flags|=128,null);uo(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(ia(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Ac(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),D(F,F.current),r)break;return null;case 22:return t.lanes=0,uc(e,t,n,t.pendingProps);case 24:ea(t,P,e.memoizedState.cache)}return jc(e,t,n)}function Pc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)V=!0;else{if(!Mc(e,n)&&!(t.flags&128))return V=!1,Nc(e,t,n);V=!!(e.flags&131072)}else V=!1,N&&t.flags&1048576&&Ii(t,ki,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Na(t.elementType),t.type=e,typeof e==`function`)gi(e)?(r=Ys(e,r),t.tag=1,t=yc(null,t,e,r,n)):(t.tag=0,t=_c(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===C){t.tag=11,t=sc(null,t,e,r,n);break a}else if(a===re){t.tag=14,t=cc(null,t,e,r,n);break a}}throw t=le(e)||e,Error(i(306,t,``))}}return t;case 0:return _c(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Ys(r,t.pendingProps),yc(e,t,r,a,n);case 3:a:{if(be(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,qa(e,t),eo(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ea(t,P,r),r!==o.cache&&ra(t,[P],n,!0),$a(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=bc(e,t,r,n);break a}else if(r!==a){a=Ti(Error(i(424)),t),Xi(a),t=bc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(M=cf(e.firstChild),Bi=t,N=!0,Vi=null,Hi=!0,n=Wa(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Ji(),r===a){t=jc(e,t,n);break a}oc(e,t,r,n)}t=t.child}return t;case 26:return gc(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:N||(n=t.type,e=t.pendingProps,r=Bd(ve.current).createElement(n),r[k]=t,r[gt]=e,Pd(r,n,e),A(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Se(t),e===null&&N&&(r=t.stateNode=ff(t.type,t.pendingProps,ve.current),Bi=t,Hi=!0,a=M,Zd(t.type)?(lf=a,M=cf(r.firstChild)):M=a),oc(e,t,t.pendingProps.children,n),gc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&N&&((a=r=M)&&(r=tf(r,t.type,t.pendingProps,Hi),r===null?a=!1:(t.stateNode=r,Bi=t,M=cf(r.firstChild),Hi=!1,a=!0)),a||Wi(t)),Se(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Ud(a,o)?r=null:s!==null&&Ud(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Eo(e,t,ko,null,null,n),Qf._currentValue=a),gc(e,t),oc(e,t,r,n),t.child;case 6:return e===null&&N&&((e=n=M)&&(n=nf(n,t.pendingProps,Hi),n===null?e=!1:(t.stateNode=n,Bi=t,M=null,e=!0)),e||Wi(t)),null;case 13:return wc(e,t,n);case 4:return be(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ua(t,null,r,n):oc(e,t,r,n),t.child;case 11:return sc(e,t,t.type,t.pendingProps,n);case 7:return oc(e,t,t.pendingProps,n),t.child;case 8:return oc(e,t,t.pendingProps.children,n),t.child;case 12:return oc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,ea(t,t.type,r.value),oc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,oa(t),a=sa(a),r=r(a),t.flags|=1,oc(e,t,r,n),t.child;case 14:return cc(e,t,t.type,t.pendingProps,n);case 15:return lc(e,t,t.type,t.pendingProps,n);case 19:return Ac(e,t,n);case 31:return hc(e,t,n);case 22:return uc(e,t,n,t.pendingProps);case 24:return oa(t),r=sa(P),e===null?(a=wa(),a===null&&(a=K,o=pa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Ka(t),ea(t,P,a)):((e.lanes&n)!==0&&(qa(e,t),eo(t,null,null,n),$a()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,ea(t,P,r),r!==a.cache&&ra(t,[P],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),ea(t,P,r))),oc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Fc(e){e.flags|=4}function Ic(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(wu())e.flags|=8192;else throw Pa=Aa,Oa}else e.flags&=-16777217}function Lc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t))if(wu())e.flags|=8192;else throw Pa=Aa,Oa}function Rc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:it(),e.lanes|=t,Yl|=t)}function zc(e,t){if(!N)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function H(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Bc(e,t,n){var r=t.pendingProps;switch(Ri(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return H(t),null;case 1:return H(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ta(P),xe(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(qi(t)?Fc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Yi())),H(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Fc(t),o===null?(H(t),Ic(t,a,null,r,n)):(H(t),Lc(t,o))):o?o===e.memoizedState?(H(t),t.flags&=-16777217):(Fc(t),H(t),Lc(t,o)):(e=e.memoizedProps,e!==r&&Fc(t),H(t),Ic(t,a,e,r,n)),null;case 27:if(Ce(t),n=ve.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Fc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return H(t),null}e=ge.current,qi(t)?Gi(t,e):(e=ff(a,r,n),t.stateNode=e,Fc(t))}return H(t),null;case 5:if(Ce(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Fc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return H(t),null}if(o=ge.current,qi(t))Gi(t,o);else{var s=Bd(ve.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[k]=t,o[gt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Pd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Fc(t)}}return H(t),Ic(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Fc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=ve.current,qi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Bi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[k]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Md(e.nodeValue,n)),e||Wi(t,!0)}else e=Bd(e).createTextNode(r),e[k]=t,t.stateNode=e}return H(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=qi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[k]=t}else Ji(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;H(t),e=!1}else n=Yi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(ho(t),t):(ho(t),null);if(t.flags&128)throw Error(i(558))}return H(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=qi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[k]=t}else Ji(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;H(t),a=!1}else a=Yi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(ho(t),t):(ho(t),null)}return ho(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Rc(t,t.updateQueue),H(t),null);case 4:return xe(),e===null&&Sd(t.stateNode.containerInfo),H(t),null;case 10:return ta(t.type),H(t),null;case 19:if(he(F),r=t.memoizedState,r===null)return H(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)zc(r,!1);else{if(X!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=go(e),o!==null){for(t.flags|=128,zc(r,!1),e=o.updateQueue,t.updateQueue=e,Rc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)vi(n,e),n=n.sibling;return D(F,F.current&1|2),N&&Fi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Fe()>tu&&(t.flags|=128,a=!0,zc(r,!1),t.lanes=4194304)}else{if(!a)if(e=go(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Rc(t,e),zc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!N)return H(t),null}else 2*Fe()-r.renderingStartTime>tu&&n!==536870912&&(t.flags|=128,a=!0,zc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(H(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Fe(),e.sibling=null,n=F.current,D(F,a?n&1|2:n&1),N&&Fi(t,r.treeForkCount),e);case 22:case 23:return ho(t),so(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(H(t),t.subtreeFlags&6&&(t.flags|=8192)):H(t),n=t.updateQueue,n!==null&&Rc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&he(Ca),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ta(P),H(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Vc(e,t){switch(Ri(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ta(P),xe(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ce(t),null;case 31:if(t.memoizedState!==null){if(ho(t),t.alternate===null)throw Error(i(340));Ji()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ho(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Ji()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return he(F),null;case 4:return xe(),null;case 10:return ta(t.type),null;case 22:case 23:return ho(t),so(),e!==null&&he(Ca),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ta(P),null;case 25:return null;default:return null}}function Hc(e,t){switch(Ri(t),t.tag){case 3:ta(P),xe();break;case 26:case 27:case 5:Ce(t);break;case 4:xe();break;case 31:t.memoizedState!==null&&ho(t);break;case 13:ho(t);break;case 19:he(F);break;case 10:ta(t.type);break;case 22:case 23:ho(t),so(),e!==null&&he(Ca);break;case 24:ta(P)}}function Uc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Z(t,t.return,e)}}function Wc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function Gc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{no(t,n)}catch(t){Z(e,e.return,t)}}}function Kc(e,t,n){n.props=Ys(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function qc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Z(e,t,n)}}function Jc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Z(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Z(e,t,n)}else n.current=null}function Yc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Z(e,e.return,t)}}function Xc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[gt]=t}catch(t){Z(e,e.return,t)}}function Zc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Qc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Zc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Zd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function $c(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=sn));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for($c(e,t,n),e=e.sibling;e!==null;)$c(e,t,n),e=e.sibling}function el(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(el(e,t,n),e=e.sibling;e!==null;)el(e,t,n),e=e.sibling}function tl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[k]=e,t[gt]=n}catch(t){Z(e,e.return,t)}}var nl=!1,U=!1,rl=!1,il=typeof WeakSet==`function`?WeakSet:Set,al=null;function ol(e,t){if(e=e.containerInfo,Rd=sp,e=Pr(e),Fr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,al=t;al!==null;)if(t=al,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,al=e;else for(;al!==null;){switch(t=al,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Ys(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Z(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ef(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:ef(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,al=e;break}al=t.return}}function sl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:xl(e,n),r&4&&Uc(5,n);break;case 1:if(xl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Z(n,n.return,e)}else{var i=Ys(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Z(n,n.return,e)}}r&64&&Gc(n),r&512&&qc(n,n.return);break;case 3:if(xl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{no(e,t)}catch(e){Z(n,n.return,e)}}break;case 27:t===null&&r&4&&tl(n);case 26:case 5:xl(e,n),t===null&&r&4&&Yc(n),r&512&&qc(n,n.return);break;case 12:xl(e,n);break;case 31:xl(e,n),r&4&&fl(e,n);break;case 13:xl(e,n),r&4&&pl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Ju.bind(null,n),sf(e,n))));break;case 22:if(r=n.memoizedState!==null||nl,!r){t=t!==null&&t.memoizedState!==null||U,i=nl;var a=U;nl=r,(U=t)&&!a?Cl(e,n,(n.subtreeFlags&8772)!=0):xl(e,n),nl=i,U=a}break;case 30:break;default:xl(e,n)}}function cl(e){var t=e.alternate;t!==null&&(e.alternate=null,cl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ct(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var W=null,ll=!1;function ul(e,t,n){for(n=n.child;n!==null;)dl(e,t,n),n=n.sibling}function dl(e,t,n){if(Ge&&typeof Ge.onCommitFiberUnmount==`function`)try{Ge.onCommitFiberUnmount(We,n)}catch{}switch(n.tag){case 26:U||Jc(n,t),ul(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:U||Jc(n,t);var r=W,i=ll;Zd(n.type)&&(W=n.stateNode,ll=!1),ul(e,t,n),pf(n.stateNode),W=r,ll=i;break;case 5:U||Jc(n,t);case 6:if(r=W,i=ll,W=null,ul(e,t,n),W=r,ll=i,W!==null)if(ll)try{(W.nodeType===9?W.body:W.nodeName===`HTML`?W.ownerDocument.body:W).removeChild(n.stateNode)}catch(e){Z(n,t,e)}else try{W.removeChild(n.stateNode)}catch(e){Z(n,t,e)}break;case 18:W!==null&&(ll?(e=W,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd(W,n.stateNode));break;case 4:r=W,i=ll,W=n.stateNode.containerInfo,ll=!0,ul(e,t,n),W=r,ll=i;break;case 0:case 11:case 14:case 15:Wc(2,n,t),U||Wc(4,n,t),ul(e,t,n);break;case 1:U||(Jc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Kc(n,t,r)),ul(e,t,n);break;case 21:ul(e,t,n);break;case 22:U=(r=U)||n.memoizedState!==null,ul(e,t,n),U=r;break;default:ul(e,t,n)}}function fl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Z(t,t.return,e)}}}function pl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Np(e)}catch(e){Z(t,t.return,e)}}function ml(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new il),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new il),t;default:throw Error(i(435,e.tag))}}function hl(e,t){var n=ml(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Yu.bind(null,e,t);t.then(r,r)}})}function gl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(Zd(c.type)){W=c.stateNode,ll=!1;break a}break;case 5:W=c.stateNode,ll=!1;break a;case 3:case 4:W=c.stateNode.containerInfo,ll=!0;break a}c=c.return}if(W===null)throw Error(i(160));dl(o,s,a),W=null,ll=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)vl(t,e),t=t.sibling}var _l=null;function vl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:gl(t,e),yl(e),r&4&&(Wc(3,e,e.return),Uc(3,e),Wc(5,e,e.return));break;case 1:gl(t,e),yl(e),r&512&&(U||n===null||Jc(n,n.return)),r&64&&nl&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=_l;if(gl(t,e),yl(e),r&512&&(U||n===null||Jc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[St]||o[k]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Pd(o,r,n),o[k]=e,A(o),r=o;break a;case`link`:var s=Vf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Pd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Vf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Pd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[k]=e,A(o),r=o}e.stateNode=r}else Hf(a,e.type,e.stateNode);else e.stateNode=If(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Xc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Hf(a,e.type,e.stateNode):If(a,r,e.memoizedProps))}break;case 27:gl(t,e),yl(e),r&512&&(U||n===null||Jc(n,n.return)),n!==null&&r&4&&Xc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(gl(t,e),yl(e),r&512&&(U||n===null||Jc(n,n.return)),e.flags&32){a=e.stateNode;try{Qt(a,``)}catch(t){Z(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Xc(e,a,n===null?a:n.memoizedProps)),r&1024&&(rl=!0);break;case 6:if(gl(t,e),yl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Z(e,e.return,t)}}break;case 3:if(Bf=null,a=_l,_l=gf(t.containerInfo),gl(t,e),_l=a,yl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Z(e,e.return,t)}rl&&(rl=!1,bl(e));break;case 4:r=_l,_l=gf(e.stateNode.containerInfo),gl(t,e),yl(e),_l=r;break;case 12:gl(t,e),yl(e);break;case 31:gl(t,e),yl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,hl(e,r)));break;case 13:gl(t,e),yl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&($l=Fe()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,hl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=nl,d=U;if(nl=u||a,U=d||l,gl(t,e),U=d,nl=u,yl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||nl||U||Sl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Z(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Z(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?$d(m,!0):$d(l.stateNode,!1)}catch(e){Z(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,hl(e,n))));break;case 19:gl(t,e),yl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,hl(e,r)));break;case 30:break;case 21:break;default:gl(t,e),yl(e)}}function yl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Zc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;el(e,Qc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Qt(o,``),n.flags&=-33),el(e,Qc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;$c(e,Qc(e),s);break;default:throw Error(i(161))}}catch(t){Z(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function bl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;bl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function xl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)sl(e,t.alternate,t),t=t.sibling}function Sl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Wc(4,t,t.return),Sl(t);break;case 1:Jc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Kc(t,t.return,n),Sl(t);break;case 27:pf(t.stateNode);case 26:case 5:Jc(t,t.return),Sl(t);break;case 22:t.memoizedState===null&&Sl(t);break;case 30:Sl(t);break;default:Sl(t)}e=e.sibling}}function Cl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:Cl(i,a,n),Uc(4,a);break;case 1:if(Cl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Z(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)to(c[i],s)}catch(e){Z(r,r.return,e)}}n&&o&64&&Gc(a),qc(a,a.return);break;case 27:tl(a);case 26:case 5:Cl(i,a,n),n&&r===null&&o&4&&Yc(a),qc(a,a.return);break;case 12:Cl(i,a,n);break;case 31:Cl(i,a,n),n&&o&4&&fl(i,a);break;case 13:Cl(i,a,n),n&&o&4&&pl(i,a);break;case 22:a.memoizedState===null&&Cl(i,a,n),qc(a,a.return);break;case 30:break;default:Cl(i,a,n)}t=t.sibling}}function wl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ma(n))}function Tl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ma(e))}function El(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Dl(e,t,n,r),t=t.sibling}function Dl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:El(e,t,n,r),i&2048&&Uc(9,t);break;case 1:El(e,t,n,r);break;case 3:El(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ma(e)));break;case 12:if(i&2048){El(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Z(t,t.return,e)}}else El(e,t,n,r);break;case 31:El(e,t,n,r);break;case 13:El(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?El(e,t,n,r):(a._visibility|=2,Ol(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?El(e,t,n,r):kl(e,t),i&2048&&wl(o,t);break;case 24:El(e,t,n,r),i&2048&&Tl(t.alternate,t);break;default:El(e,t,n,r)}}function Ol(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Ol(a,o,s,c,i),Uc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Ol(a,o,s,c,i)):u._visibility&2?Ol(a,o,s,c,i):kl(a,o),i&&l&2048&&wl(o.alternate,o);break;case 24:Ol(a,o,s,c,i),i&&l&2048&&Tl(o.alternate,o);break;default:Ol(a,o,s,c,i)}t=t.sibling}}function kl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:kl(n,r),i&2048&&wl(r.alternate,r);break;case 24:kl(n,r),i&2048&&Tl(r.alternate,r);break;default:kl(n,r)}t=t.sibling}}var Al=8192;function jl(e,t,n){if(e.subtreeFlags&Al)for(e=e.child;e!==null;)Ml(e,t,n),e=e.sibling}function Ml(e,t,n){switch(e.tag){case 26:jl(e,t,n),e.flags&Al&&e.memoizedState!==null&&Gf(n,_l,e.memoizedState,e.memoizedProps);break;case 5:jl(e,t,n);break;case 3:case 4:var r=_l;_l=gf(e.stateNode.containerInfo),jl(e,t,n),_l=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Al,Al=16777216,jl(e,t,n),Al=r):jl(e,t,n));break;default:jl(e,t,n)}}function Nl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Pl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];al=r,Ll(r,e)}Nl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Fl(e),e=e.sibling}function Fl(e){switch(e.tag){case 0:case 11:case 15:Pl(e),e.flags&2048&&Wc(9,e,e.return);break;case 3:Pl(e);break;case 12:Pl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Il(e)):Pl(e);break;default:Pl(e)}}function Il(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];al=r,Ll(r,e)}Nl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Wc(8,t,t.return),Il(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Il(t));break;default:Il(t)}e=e.sibling}}function Ll(e,t){for(;al!==null;){var n=al;switch(n.tag){case 0:case 11:case 15:Wc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:ma(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,al=r;else a:for(n=e;al!==null;){r=al;var i=r.sibling,a=r.return;if(cl(r),r===n){al=null;break a}if(i!==null){i.return=a,al=i;break a}al=a}}}var Rl={getCacheForType:function(e){var t=sa(P),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return sa(P).controller.signal}},zl=typeof WeakMap==`function`?WeakMap:Map,G=0,K=null,q=null,J=0,Y=0,Bl=null,Vl=!1,Hl=!1,Ul=!1,Wl=0,X=0,Gl=0,Kl=0,ql=0,Jl=0,Yl=0,Xl=null,Zl=null,Ql=!1,$l=0,eu=0,tu=1/0,nu=null,ru=null,iu=0,au=null,ou=null,su=0,cu=0,lu=null,uu=null,du=0,fu=null;function pu(){return G&2&&J!==0?J&-J:T.T===null?pt():dd()}function mu(){if(Jl===0)if(!(J&536870912)||N){var e=Qe;Qe<<=1,!(Qe&3932160)&&(Qe=262144),Jl=e}else Jl=536870912;return e=co.current,e!==null&&(e.flags|=32),Jl}function hu(e,t,n){(e===K&&(Y===2||Y===9)||e.cancelPendingCommit!==null)&&(Su(e,0),yu(e,J,Jl,!1)),ot(e,n),(!(G&2)||e!==K)&&(e===K&&(!(G&2)&&(Kl|=n),X===4&&yu(e,J,Jl,!1)),rd(e))}function gu(e,t,n){if(G&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||nt(e,t),a=r?Au(e,t):Ou(e,t,!0),o=r;do{if(a===0){Hl&&!r&&yu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!vu(n)){a=Ou(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=Xl;var l=c.current.memoizedState.isDehydrated;if(l&&(Su(c,s).flags|=256),s=Ou(c,s,!1),s!==2){if(Ul&&!l){c.errorRecoveryDisabledLanes|=o,Kl|=o,a=4;break a}o=Zl,Zl=a,o!==null&&(Zl===null?Zl=o:Zl.push.apply(Zl,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Su(e,0),yu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:yu(r,t,Jl,!Vl);break a;case 2:Zl=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=$l+300-Fe(),10<a)){if(yu(r,t,Jl,!Vl),tt(r,0,!0)!==0)break a;su=t,r.timeoutHandle=Kd(_u.bind(null,r,n,Zl,nu,Ql,t,Jl,Kl,Yl,Vl,o,`Throttled`,-0,0),a);break a}_u(r,n,Zl,nu,Ql,t,Jl,Kl,Yl,Vl,o,null,-0,0)}}break}while(1);rd(e)}function _u(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:sn},Ml(t,a,d);var m=(a&62914560)===a?$l-Fe():(a&4194048)===a?eu-Fe():0;if(m=qf(d,m),m!==null){su=a,e.cancelPendingCommit=m(Lu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),yu(e,a,o,!l);return}}Lu(e,t,a,n,r,i,o,s,c)}function vu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!kr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function yu(e,t,n,r){t&=~ql,t&=~Kl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-qe(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&ct(e,n,t)}function bu(){return G&6?!0:(id(0,!1),!1)}function xu(){if(q!==null){if(Y===0)var e=q.return;else e=q,$i=Qi=null,Mo(e),La=null,Ra=0,e=q;for(;e!==null;)Hc(e.alternate,e),e=e.return;q=null}}function Su(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),su=0,xu(),K=e,q=n=_i(e.current,null),J=t,Y=0,Bl=null,Vl=!1,Hl=nt(e,t),Ul=!1,Yl=Jl=ql=Kl=Gl=X=0,Zl=Xl=null,Ql=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-qe(r),a=1<<i;t|=e[i],r&=~a}return Wl=t,si(),n}function Cu(e,t){I=null,T.H=Vs,t===Da||t===ka?(t=Fa(),Y=3):t===Oa?(t=Fa(),Y=4):Y=t===ac?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Bl=t,q===null&&(X=1,$s(e,Ti(t,e.current)))}function wu(){var e=co.current;return e===null?!0:(J&4194048)===J?lo===null:(J&62914560)===J||J&536870912?e===lo:!1}function Tu(){var e=T.H;return T.H=Vs,e===null?Vs:e}function Eu(){var e=T.A;return T.A=Rl,e}function Du(){X=4,Vl||(J&4194048)!==J&&co.current!==null||(Hl=!0),!(Gl&134217727)&&!(Kl&134217727)||K===null||yu(K,J,Jl,!1)}function Ou(e,t,n){var r=G;G|=2;var i=Tu(),a=Eu();(K!==e||J!==t)&&(nu=null,Su(e,t)),t=!1;var o=X;a:do try{if(Y!==0&&q!==null){var s=q,c=Bl;switch(Y){case 8:xu(),o=6;break a;case 3:case 2:case 9:case 6:co.current===null&&(t=!0);var l=Y;if(Y=0,Bl=null,Pu(e,s,c,l),n&&Hl){o=0;break a}break;default:l=Y,Y=0,Bl=null,Pu(e,s,c,l)}}ku(),o=X;break}catch(t){Cu(e,t)}while(1);return t&&e.shellSuspendCounter++,$i=Qi=null,G=r,T.H=i,T.A=a,q===null&&(K=null,J=0,si()),o}function ku(){for(;q!==null;)Mu(q)}function Au(e,t){var n=G;G|=2;var r=Tu(),a=Eu();K!==e||J!==t?(nu=null,tu=Fe()+500,Su(e,t)):Hl=nt(e,t);a:do try{if(Y!==0&&q!==null){t=q;var o=Bl;b:switch(Y){case 1:Y=0,Bl=null,Pu(e,t,o,1);break;case 2:case 9:if(ja(o)){Y=0,Bl=null,Nu(t);break}t=function(){Y!==2&&Y!==9||K!==e||(Y=7),rd(e)},o.then(t,t);break a;case 3:Y=7;break a;case 4:Y=5;break a;case 7:ja(o)?(Y=0,Bl=null,Nu(t)):(Y=0,Bl=null,Pu(e,t,o,7));break;case 5:var s=null;switch(q.tag){case 26:s=q.memoizedState;case 5:case 27:var c=q;if(s?Wf(s):c.stateNode.complete){Y=0,Bl=null;var l=c.sibling;if(l!==null)q=l;else{var u=c.return;u===null?q=null:(q=u,Fu(u))}break b}}Y=0,Bl=null,Pu(e,t,o,5);break;case 6:Y=0,Bl=null,Pu(e,t,o,6);break;case 8:xu(),X=6;break a;default:throw Error(i(462))}}ju();break}catch(t){Cu(e,t)}while(1);return $i=Qi=null,T.H=r,T.A=a,G=n,q===null?(K=null,J=0,si(),X):0}function ju(){for(;q!==null&&!Ne();)Mu(q)}function Mu(e){var t=Pc(e.alternate,e,Wl);e.memoizedProps=e.pendingProps,t===null?Fu(e):q=t}function Nu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=vc(n,t,t.pendingProps,t.type,void 0,J);break;case 11:t=vc(n,t,t.pendingProps,t.type.render,t.ref,J);break;case 5:Mo(t);default:Hc(n,t),t=q=vi(t,Wl),t=Pc(n,t,Wl)}e.memoizedProps=e.pendingProps,t===null?Fu(e):q=t}function Pu(e,t,n,r){$i=Qi=null,Mo(t),La=null,Ra=0;var i=t.return;try{if(ic(e,i,t,n,J)){X=1,$s(e,Ti(n,e.current)),q=null;return}}catch(t){if(i!==null)throw q=i,t;X=1,$s(e,Ti(n,e.current)),q=null;return}t.flags&32768?(N||r===1?e=!0:Hl||J&536870912?e=!1:(Vl=e=!0,(r===2||r===9||r===3||r===6)&&(r=co.current,r!==null&&r.tag===13&&(r.flags|=16384))),Iu(t,e)):Fu(t)}function Fu(e){var t=e;do{if(t.flags&32768){Iu(t,Vl);return}e=t.return;var n=Bc(t.alternate,t,Wl);if(n!==null){q=n;return}if(t=t.sibling,t!==null){q=t;return}q=t=e}while(t!==null);X===0&&(X=5)}function Iu(e,t){do{var n=Vc(e.alternate,e);if(n!==null){n.flags&=32767,q=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){q=e;return}q=e=n}while(e!==null);X=6,q=null}function Lu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Hu();while(iu!==0);if(G&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=oi,st(e,n,o,s,c,l),e===K&&(q=K=null,J=0),ou=t,au=e,su=n,cu=o,lu=a,uu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Xu(ze,function(){return Uu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=T.T,T.T=null,a=E.p,E.p=2,s=G,G|=4;try{ol(e,t,n)}finally{G=s,E.p=a,T.T=r}}iu=1,Ru(),zu(),Bu()}}function Ru(){if(iu===1){iu=0;var e=au,t=ou,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=T.T,T.T=null;var r=E.p;E.p=2;var i=G;G|=4;try{vl(t,e);var a=zd,o=Pr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Nr(s.ownerDocument.documentElement,s)){if(c!==null&&Fr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Mr(s,h),v=Mr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}sp=!!Rd,zd=Rd=null}finally{G=i,E.p=r,T.T=n}}e.current=t,iu=2}}function zu(){if(iu===2){iu=0;var e=au,t=ou,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=T.T,T.T=null;var r=E.p;E.p=2;var i=G;G|=4;try{sl(e,t.alternate,t)}finally{G=i,E.p=r,T.T=n}}iu=3}}function Bu(){if(iu===4||iu===3){iu=0,Pe();var e=au,t=ou,n=su,r=uu;t.subtreeFlags&10256||t.flags&10256?iu=5:(iu=0,ou=au=null,Vu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(ru=null),ft(n),t=t.stateNode,Ge&&typeof Ge.onCommitFiberRoot==`function`)try{Ge.onCommitFiberRoot(We,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=T.T,i=E.p,E.p=2,T.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{T.T=t,E.p=i}}su&3&&Hu(),rd(e),i=e.pendingLanes,n&261930&&i&42?e===fu?du++:(du=0,fu=e):du=0,id(0,!1)}}function Vu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ma(t)))}function Hu(){return Ru(),zu(),Bu(),Uu()}function Uu(){if(iu!==5)return!1;var e=au,t=cu;cu=0;var n=ft(su),r=T.T,a=E.p;try{E.p=32>n?32:n,T.T=null,n=lu,lu=null;var o=au,s=su;if(iu=0,ou=au=null,su=0,G&6)throw Error(i(331));var c=G;if(G|=4,Fl(o.current),Dl(o,o.current,s,n),G=c,id(0,!1),Ge&&typeof Ge.onPostCommitFiberRoot==`function`)try{Ge.onPostCommitFiberRoot(We,o)}catch{}return!0}finally{E.p=a,T.T=r,Vu(e,t)}}function Wu(e,t,n){t=Ti(n,t),t=tc(e.stateNode,t,2),e=Ya(e,t,2),e!==null&&(ot(e,2),rd(e))}function Z(e,t,n){if(e.tag===3)Wu(e,e,n);else for(;t!==null;){if(t.tag===3){Wu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ru===null||!ru.has(r))){e=Ti(n,e),n=nc(2),r=Ya(t,n,2),r!==null&&(rc(n,r,t,e),ot(r,2),rd(r));break}}t=t.return}}function Gu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new zl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Ul=!0,i.add(n),e=Ku.bind(null,e,t,n),t.then(e,e))}function Ku(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,K===e&&(J&n)===n&&(X===4||X===3&&(J&62914560)===J&&300>Fe()-$l?!(G&2)&&Su(e,0):ql|=n,Yl===J&&(Yl=0)),rd(e)}function qu(e,t){t===0&&(t=it()),e=ui(e,t),e!==null&&(ot(e,t),rd(e))}function Ju(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qu(e,n)}function Yu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),qu(e,n)}function Xu(e,t){return O(e,t)}var Zu=null,Qu=null,$u=!1,ed=!1,td=!1,nd=0;function rd(e){e!==Qu&&e.next===null&&(Qu===null?Zu=Qu=e:Qu=Qu.next=e),ed=!0,$u||($u=!0,ud())}function id(e,t){if(!td&&ed){td=!0;do for(var n=!1,r=Zu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-qe(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ld(r,a))}else a=J,a=tt(r,r===K?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||nt(r,a)||(n=!0,ld(r,a));r=r.next}while(n);td=!1}}function ad(){od()}function od(){ed=$u=!1;var e=0;nd!==0&&Gd()&&(e=nd);for(var t=Fe(),n=null,r=Zu;r!==null;){var i=r.next,a=sd(r,t);a===0?(r.next=null,n===null?Zu=i:n.next=i,i===null&&(Qu=n)):(n=r,(e!==0||a&3)&&(ed=!0)),r=i}iu!==0&&iu!==5||id(e,!1),nd!==0&&(nd=0)}function sd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-qe(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=rt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=K,n=J,n=tt(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Y===2||Y===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Me(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||nt(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Me(r),ft(n)){case 2:case 8:n=Re;break;case 32:n=ze;break;case 268435456:n=Ve;break;default:n=ze}return r=cd.bind(null,e),n=O(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Me(r),e.callbackPriority=2,e.callbackNode=null,2}function cd(e,t){if(iu!==0&&iu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Hu()&&e.callbackNode!==n)return null;var r=J;return r=tt(e,e===K?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(gu(e,r,t),sd(e,Fe()),e.callbackNode!=null&&e.callbackNode===n?cd.bind(null,e):null)}function ld(e,t){if(Hu())return null;gu(e,t,!0)}function ud(){Yd(function(){G&6?O(Le,ad):od()})}function dd(){if(nd===0){var e=_a;e===0&&(e=Ze,Ze<<=1,!(Ze&261888)&&(Ze=256)),nd=e}return nd}function fd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:on(``+e)}function pd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function md(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=fd((i[gt]||null).action),o=r.submitter;o&&(t=(t=o[gt]||null)?fd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new On(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(nd!==0){var e=o?pd(i,o):new FormData(i);Ds(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?pd(i,o):new FormData(i),Ds(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var hd=0;hd<ti.length;hd++){var gd=ti[hd];ni(gd.toLowerCase(),`on`+(gd[0].toUpperCase()+gd.slice(1)))}ni(qr,`onAnimationEnd`),ni(Jr,`onAnimationIteration`),ni(Yr,`onAnimationStart`),ni(`dblclick`,`onDoubleClick`),ni(`focusin`,`onFocus`),ni(`focusout`,`onBlur`),ni(Xr,`onTransitionRun`),ni(Zr,`onTransitionStart`),ni(Qr,`onTransitionCancel`),ni($r,`onTransitionEnd`),At(`onMouseEnter`,[`mouseout`,`mouseover`]),At(`onMouseLeave`,[`mouseout`,`mouseover`]),At(`onPointerEnter`,[`pointerout`,`pointerover`]),At(`onPointerLeave`,[`pointerout`,`pointerover`]),kt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),kt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),kt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),kt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),kt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),kt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var _d=`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(` `),vd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(_d));function yd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){ri(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){ri(e)}i.currentTarget=null,a=c}}}}function Q(e,t){var n=t[vt];n===void 0&&(n=t[vt]=new Set);var r=e+`__bubble`;n.has(r)||(Cd(t,e,2,!1),n.add(r))}function bd(e,t,n){var r=0;t&&(r|=4),Cd(n,e,r,t)}var xd=`_reactListening`+Math.random().toString(36).slice(2);function Sd(e){if(!e[xd]){e[xd]=!0,Ot.forEach(function(t){t!==`selectionchange`&&(vd.has(t)||bd(t,!1,e),bd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[xd]||(t[xd]=!0,bd(`selectionchange`,!1,t))}}function Cd(e,t,n,r){switch(mp(t)){case 2:var i=cp;break;case 8:i=lp;break;default:i=up}n=i.bind(null,t,n,e),i=void 0,!_n||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function wd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=wt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}mn(function(){var r=a,i=ln(n),s=[];a:{var c=ei.get(e);if(c!==void 0){var l=On,u=e;switch(e){case`keypress`:if(Cn(n)===0)break a;case`keydown`:case`keyup`:l=Kn;break;case`focusin`:u=`focus`,l=Ln;break;case`focusout`:u=`blur`,l=Ln;break;case`beforeblur`:case`afterblur`:l=Ln;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Fn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=In;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Jn;break;case qr:case Jr:case Yr:l=Rn;break;case $r:l=Yn;break;case`scroll`:case`scrollend`:l=An;break;case`wheel`:l=Xn;break;case`copy`:case`cut`:case`paste`:l=zn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=qn;break;case`toggle`:case`beforetoggle`:l=Zn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=hn(m,p),g!=null&&d.push(Td(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==cn&&(u=n.relatedTarget||n.fromElement)&&(wt(u)||u[_t]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?wt(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=Fn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=qn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:Et(l),h=u==null?c:Et(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,wt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Dd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Od(s,c,l,d,!1),u!==null&&f!==null&&Od(s,f,u,d,!0)}}a:{if(c=r?Et(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=_r;else if(dr(c))if(vr)v=Dr;else{v=Tr;var y=wr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&nn(r.elementType)&&(v=_r):v=Er;if(v&&=v(e,r)){fr(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Jt(c,`number`,c.value)}switch(y=r?Et(r):window,e){case`focusin`:(dr(y)||y.contentEditable===`true`)&&(Lr=y,Rr=r,zr=null);break;case`focusout`:zr=Rr=Lr=null;break;case`mousedown`:Br=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Br=!1,Vr(s,n,i);break;case`selectionchange`:if(Ir)break;case`keydown`:case`keyup`:Vr(s,n,i)}var b;if($n)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else sr?ar(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(nr&&n.locale!==`ko`&&(sr||x!==`onCompositionStart`?x===`onCompositionEnd`&&sr&&(b=Sn()):(yn=i,bn=`value`in yn?yn.value:yn.textContent,sr=!0)),y=Ed(r,x),0<y.length&&(x=new Bn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=or(n),b!==null&&(x.data=b)))),(b=tr?cr(e,n):lr(e,n))&&(x=Ed(r,`onBeforeInput`),0<x.length&&(y=new Bn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),md(s,e,r,n,i)}yd(s,t)})}function Td(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ed(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=hn(e,n),i!=null&&r.unshift(Td(e,i,a)),i=hn(e,t),i!=null&&r.push(Td(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Dd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Od(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=hn(n,a),l!=null&&o.unshift(Td(n,l,c))):i||(l=hn(n,a),l!=null&&o.push(Td(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var kd=/\r\n?/g,Ad=/\u0000|\uFFFD/g;function jd(e){return(typeof e==`string`?e:``+e).replace(kd,`
9
+ `).replace(Ad,``)}function Md(e,t){return t=jd(t),jd(e)===t}function $(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Qt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Qt(e,``+r);break;case`className`:It(e,`class`,r);break;case`tabIndex`:It(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:It(e,n,r);break;case`style`:tn(e,r,o);break;case`data`:if(t!==`object`){It(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=on(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&$(e,t,`name`,a.name,a,null),$(e,t,`formEncType`,a.formEncType,a,null),$(e,t,`formMethod`,a.formMethod,a,null),$(e,t,`formTarget`,a.formTarget,a,null)):($(e,t,`encType`,a.encType,a,null),$(e,t,`method`,a.method,a,null),$(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=on(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=sn);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=on(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Q(`beforetoggle`,e),Q(`toggle`,e),Ft(e,`popover`,r);break;case`xlinkActuate`:Lt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Lt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Lt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Lt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Lt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Lt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Lt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Lt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Lt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Ft(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=rn.get(n)||n,Ft(e,n,r))}}function Nd(e,t,n,r,a,o){switch(n){case`style`:tn(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Qt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Qt(e,``+r);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=sn);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!j.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[gt]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Ft(e,n,r)}}}function Pd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Q(`error`,e),Q(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:$(e,t,o,s,n,null)}}a&&$(e,t,`srcSet`,n.srcSet,n,null),r&&$(e,t,`src`,n.src,n,null);return;case`input`:Q(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:$(e,t,r,d,n,null)}}qt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Q(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:$(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Yt(e,!!r,n,!0):Yt(e,!!r,t,!1);return;case`textarea`:for(s in Q(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:$(e,t,s,c,n,null)}Zt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:$(e,t,l,r,n,null)}return;case`dialog`:Q(`beforetoggle`,e),Q(`toggle`,e),Q(`cancel`,e),Q(`close`,e);break;case`iframe`:case`object`:Q(`load`,e);break;case`video`:case`audio`:for(r=0;r<_d.length;r++)Q(_d[r],e);break;case`image`:Q(`error`,e),Q(`load`,e);break;case`details`:Q(`toggle`,e);break;case`embed`:case`source`:case`link`:Q(`error`,e),Q(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:$(e,t,u,r,n,null)}return;default:if(nn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Nd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&$(e,t,c,r,n,null))}function Fd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||$(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&$(e,t,p,m,r,f)}}Kt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||$(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&$(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Yt(e,!!n,n?[]:``,!1):Yt(e,!!n,t,!0)):Yt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:$(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&$(e,t,s,a,r,o)}Xt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:$(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:$(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&$(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:$(e,t,u,p,r,m)}return;default:if(nn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Nd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Nd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&$(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||$(e,t,f,p,r,m)}function Id(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ld(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Id(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Rd=null,zd=null;function Bd(e){return e.nodeType===9?e:e.ownerDocument}function Vd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Hd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Ud(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Wd=null;function Gd(){var e=window.event;return e&&e.type===`popstate`?e===Wd?!1:(Wd=e,!0):(Wd=null,!1)}var Kd=typeof setTimeout==`function`?setTimeout:void 0,qd=typeof clearTimeout==`function`?clearTimeout:void 0,Jd=typeof Promise==`function`?Promise:void 0,Yd=typeof queueMicrotask==`function`?queueMicrotask:Jd===void 0?Kd:function(e){return Jd.resolve(null).then(e).catch(Xd)};function Xd(e){setTimeout(function(){throw e})}function Zd(e){return e===`head`}function Qd(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)pf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,pf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[St]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&pf(e.ownerDocument.body);n=i}while(n);Np(t)}function $d(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function ef(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:ef(n),Ct(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function tf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[St])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=cf(e.nextSibling),e===null)break}return null}function nf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=cf(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=cf(e.nextSibling),e===null))return null;return e}function af(e){return e.data===`$?`||e.data===`$~`}function of(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function sf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function cf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var lf=null;function uf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function df(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function ff(e,t,n){switch(t=Bd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ct(e)}var mf=new Map,hf=new Set;function gf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _f=E.d;E.d={f:vf,r:yf,D:Sf,C:Cf,L:wf,m:Tf,X:Df,S:Ef,M:Of};function vf(){var e=_f.f(),t=bu();return e||t}function yf(e){var t=Tt(e);t!==null&&t.tag===5&&t.type===`form`?ks(t):_f.r(e)}var bf=typeof document>`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Gt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),A(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Gt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Gt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Gt(n.imageSizes)+`"]`)):i+=`[href="`+Gt(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=h({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),A(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Gt(r)+`"][href="`+Gt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=h({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),A(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=Dt(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=h({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);A(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=Dt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),A(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=Dt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),A(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var a=(a=ve.current)?gf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=Dt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var o=Dt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),o||Nf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=Dt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Af(e){return`href="`+Gt(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),A(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Gt(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Gt(n.href)+`"]`);if(r)return t.instance=r,A(r),r;var a=h({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),A(r),Pd(r,`style`,a),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Af(n.href);var o=e.querySelector(jf(a));if(o)return t.state.loading|=4,t.instance=o,A(o),o;r=Mf(n),(a=mf.get(a))&&Rf(r,a),o=(e.ownerDocument||e).createElement(`link`),A(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(a=e.querySelector(Ff(o)))?(t.instance=a,A(a),a):(r=n,(a=mf.get(o))&&(r=h({},n),zf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),A(a),Pd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Bf=null;function Vf(e,t,n){if(Bf===null){var r=new Map,i=Bf=new Map;i.set(n,r)}else i=Bf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[St]||a[k]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Hf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,A(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),A(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*Ld());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Jf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Qf={$$typeof:S,Provider:null,Consumer:null,_currentValue:de,_currentValue2:de,_threadCount:0};function $f(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=at(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=at(0),this.hiddenUpdates=at(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=hi(3,null,null,t),e.current=a,a.stateNode=e,t=pa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ka(a),e}function tp(e){return e?(e=pi,e):pi}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ja(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ya(e,r,t),n!==null&&(hu(n,e,t),Xa(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=ui(e,67108864);t!==null&&hu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=pu();t=dt(t);var n=ui(e,t);n!==null&&hu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=T.T;T.T=null;var a=E.p;try{E.p=2,up(e,t,n,r)}finally{E.p=a,T.T=i}}function lp(e,t,n,r){var i=T.T;T.T=null;var a=E.p;try{E.p=8,up(e,t,n,r)}finally{E.p=a,T.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)wd(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=Tt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=et(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-qe(o);s.entanglements[1]|=c,o&=~c}rd(a),!(G&6)&&(tu=Fe()+500,id(0,!1))}}break;case 31:case 13:s=ui(a,2),s!==null&&hu(s,a,2),bu(),ip(a,2)}if(a=dp(r),a===null&&wd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else wd(e,t,r,null,n)}}function dp(e){return e=ln(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=wt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return fp=e,null}function mp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Ie()){case Le:return 2;case Re:return 8;case ze:case Be:return 32;case Ve:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`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 Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Tt(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=wt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,mt(e.priority,function(){op(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,mt(e.priority,function(){op(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);cn=r,n.target.dispatchEvent(r),cn=null}else return t=Tt(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,n){e.blockedOn===n&&(e.blockedOn=null,hp||(hp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){jp===e&&(jp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(pp(r||n)===null)continue;break}var a=Tt(n);a!==null&&(e.splice(t,3),t-=3,Ds(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[gt]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[gt]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;np(n,pu(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),bu(),t[_t]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=pt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=n.version;if(Lp!==`19.2.5`)throw Error(i(527,Lp,`19.2.5`));E.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=d(t),e=e===null?null:p(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.5`,rendererPackageName:`react-dom`,currentDispatcherRef:T,reconcilerVersion:`19.2.5`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{We=zp.inject(Rp),Ge=zp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Xs,s=Zs,c=Qs;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ep(e,1,!1,null,null,n,r,null,o,s,c,Pp),e[_t]=t.current,Sd(e),new Fp(t)}})),g=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=h()})),_=c(u(),1),v=g(),y=`/assets/app-mark-Gd2QnHMO.svg`,b=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),x=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),ee=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),S=e=>{let t=ee(e);return t.charAt(0).toUpperCase()+t.slice(1)},C={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},te=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},ne=(0,_.createContext)({}),re=()=>(0,_.useContext)(ne),ie=(0,_.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=re()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,_.createElement)(`svg`,{ref:c,...C,width:t??l??C.width,height:t??l??C.height,stroke:e??f,strokeWidth:m,className:b(`lucide`,p,i),...!a&&!te(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,_.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),w=(e,t)=>{let n=(0,_.forwardRef)(({className:n,...r},i)=>(0,_.createElement)(ie,{ref:i,iconNode:t,className:b(`lucide-${x(S(e))}`,`lucide-${e}`,n),...r}));return n.displayName=S(e),n},ae=w(`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`,key:`169zse`}]]),oe=w(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),se=w(`book-open-text`,[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M16 12h2`,key:`7q9ll5`}],[`path`,{d:`M16 8h2`,key:`msurwy`}],[`path`,{d:`M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z`,key:`ruj8y`}],[`path`,{d:`M6 12h2`,key:`32wvfc`}],[`path`,{d:`M6 8h2`,key:`30oboj`}]]),ce=w(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),le=w(`clock-3`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6h4`,key:`135r8i`}]]),ue=w(`code-xml`,[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]]),T=w(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),E=w(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),de=w(`earth`,[[`path`,{d:`M21.54 15H17a2 2 0 0 0-2 2v4.54`,key:`1djwo0`}],[`path`,{d:`M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17`,key:`1tzkfa`}],[`path`,{d:`M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05`,key:`14pb5j`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),fe=w(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),pe=w(`funnel`,[[`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`,key:`sc7q7i`}]]),me=w(`house`,[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`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`,key:`r6nss1`}]]),he=w(`layout-dashboard`,[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]),D=w(`list-checks`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]),ge=w(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),_e=w(`log-in`,[[`path`,{d:`m10 17 5-5-5-5`,key:`1bsop3`}],[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4`,key:`u53s6r`}]]),ve=w(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),ye=w(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),be=w(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),xe=w(`server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]),Se=w(`settings-2`,[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]),Ce=w(`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`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),we=w(`shield-check`,[[`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`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),Te=w(`triangle-alert`,[[`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`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),Ee=w(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]),De=w(`users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),Oe=w(`wifi`,[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M2 8.82a15 15 0 0 1 20 0`,key:`dnpr2z`}],[`path`,{d:`M5 12.859a10 10 0 0 1 14 0`,key:`1x1e6c`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}]]),ke=w(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),Ae=w(`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`,key:`1xq2db`}]]),je=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),O=o(((e,t)=>{t.exports=je()}))(),Me=`https://github.com/fchangjun/AI-Zero-Token/releases`;function Ne({workspace:e}){let{routes:t,activeRoute:n,goRoute:r,config:i,copyBaseUrl:a,setContactOpen:o}=e,s=!!i?.status.loggedIn,c=i?.versionStatus,l=c?.status===`update-available`?`orange`:c?.status===`error`?`red`:`green`,u=c?.status===`update-available`?`可更新`:c?.status===`error`?`检查失败`:c?.status===`ok`?`已是最新`:`未检查`;return(0,O.jsxs)(`aside`,{className:`sidebar`,children:[(0,O.jsxs)(`div`,{className:`brand`,children:[(0,O.jsx)(`div`,{className:`brand-mark`,children:(0,O.jsx)(`img`,{src:y,alt:``})}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`strong`,{children:`AI Zero Token`}),(0,O.jsx)(`span`,{children:`本地 AI 网关工作台`})]})]}),(0,O.jsx)(`nav`,{className:`nav`,"aria-label":`主导航`,children:t.map(e=>{let t=e.icon;return(0,O.jsxs)(`button`,{className:`nav-item ${n===e.id?`is-active`:``}`,type:`button`,onClick:()=>r(e.id),children:[(0,O.jsx)(t,{size:16}),(0,O.jsx)(`span`,{children:e.label})]},e.id)})}),(0,O.jsxs)(`section`,{className:`service-card sidebar-status tone-${l}`,children:[(0,O.jsxs)(`div`,{className:`service-head`,children:[(0,O.jsx)(`strong`,{children:`服务与版本`}),(0,O.jsx)(`span`,{children:u})]}),(0,O.jsxs)(`div`,{className:`sidebar-status-summary`,children:[(0,O.jsx)(`span`,{className:`status-dot ${s?``:`offline`}`}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`strong`,{children:s?`服务运行中`:`等待登录`}),(0,O.jsx)(`span`,{children:i?.status.activeProvider||`openai-codex`})]})]}),(0,O.jsxs)(`button`,{className:`sidebar-base-url`,type:`button`,onClick:a,title:`复制 Base URL`,children:[(0,O.jsx)(`span`,{children:`Base URL`}),(0,O.jsx)(`code`,{children:i?.baseUrl||`http://127.0.0.1:8787/v1`})]}),(0,O.jsxs)(`div`,{className:`sidebar-meta-grid`,children:[(0,O.jsxs)(`div`,{className:`sidebar-meta`,children:[(0,O.jsx)(`span`,{children:`当前版本`}),(0,O.jsx)(`strong`,{children:c?.currentVersion||`—`})]}),(0,O.jsxs)(`div`,{className:`sidebar-meta`,children:[(0,O.jsx)(`span`,{children:`最新版本`}),(0,O.jsx)(`strong`,{children:c?.latestVersion||`—`})]})]})]}),(0,O.jsxs)(`section`,{className:`service-card sidebar-links`,children:[(0,O.jsx)(`div`,{className:`service-head`,children:(0,O.jsx)(`strong`,{children:`联系我`})}),(0,O.jsxs)(`div`,{className:`sidebar-link-list`,children:[(0,O.jsxs)(`a`,{className:`sidebar-link`,href:`https://github.com/fchangjun/AI-Zero-Token`,target:`_blank`,rel:`noreferrer`,children:[(0,O.jsx)(ue,{size:14}),`GitHub 仓库`]}),(0,O.jsxs)(`a`,{className:`sidebar-link`,href:Me,target:`_blank`,rel:`noreferrer`,children:[(0,O.jsx)(E,{size:14}),`桌面版下载`]}),(0,O.jsxs)(`button`,{className:`sidebar-link`,type:`button`,onClick:()=>o(!0),children:[(0,O.jsx)(fe,{size:14}),`交流反馈`]}),(0,O.jsxs)(`button`,{className:`sidebar-link`,type:`button`,onClick:a,children:[(0,O.jsx)(T,{size:14}),`复制 Base URL`]})]})]})]})}function Pe({workspace:e}){let{activeRoute:t,activeRouteMeta:n,pageDescriptions:r}=e;return(0,O.jsx)(`header`,{className:`topbar`,children:(0,O.jsxs)(`div`,{className:`page-title`,children:[(0,O.jsx)(`span`,{className:`page-kicker`,children:n.label}),(0,O.jsx)(`h1`,{children:t===`launch`?`启动页`:n.label}),(0,O.jsx)(`p`,{children:r[t]})]})})}function Fe(e){return(0,O.jsx)(`div`,{className:`modal-backdrop`,onMouseDown:t=>t.target===t.currentTarget&&e.onClose(),children:(0,O.jsxs)(`section`,{className:`modal-card ${e.wide?`wide`:``}`,role:`dialog`,"aria-modal":`true`,children:[(0,O.jsxs)(`div`,{className:`modal-head`,children:[(0,O.jsx)(`h3`,{children:e.title}),(0,O.jsx)(`button`,{className:`btn-secondary icon-only`,type:`button`,onClick:e.onClose,"aria-label":`关闭`,children:(0,O.jsx)(ke,{size:16})})]}),(0,O.jsx)(`div`,{className:`modal-body`,children:e.children})]})})}var Ie=`/assets/wechat-contact-Dlaib1YP.png`;function Le(e){return(0,O.jsx)(Fe,{title:`交流反馈`,onClose:e.onClose,children:(0,O.jsxs)(`div`,{className:`contact-notes`,children:[(0,O.jsxs)(`div`,{className:`contact-note`,children:[(0,O.jsx)(`strong`,{children:`作者微信`}),(0,O.jsx)(`span`,{children:`扫码备注 AI-Zero-Token,可反馈安装问题、账号切换、生图异常和接口兼容需求。`})]}),(0,O.jsxs)(`div`,{className:`contact-note`,children:[(0,O.jsx)(`strong`,{children:`GitHub Issues`}),(0,O.jsx)(`span`,{children:`更适合提交可复现的问题、日志片段和功能建议。`}),(0,O.jsx)(`a`,{href:`https://github.com/fchangjun/AI-Zero-Token/issues`,target:`_blank`,rel:`noreferrer`,children:`https://github.com/fchangjun/AI-Zero-Token/issues`})]}),(0,O.jsxs)(`div`,{className:`contact-note`,children:[(0,O.jsx)(`strong`,{children:`反馈入口`}),(0,O.jsx)(`span`,{children:`当前本地管理页、CLI 与桌面端共用同一套账号池,反馈时建议附上管理页状态和接口路径。`})]}),(0,O.jsxs)(`div`,{className:`contact-qr`,children:[(0,O.jsx)(`img`,{src:Ie,alt:`作者微信二维码`}),(0,O.jsx)(`span`,{children:`微信二维码仅用于交流反馈;代码问题优先建议走 GitHub Issues,便于追踪。`})]})]})})}function Re(e){return(0,O.jsxs)(Fe,{title:`图片预览`,onClose:e.onClose,wide:!0,children:[(0,O.jsx)(`div`,{className:`image-preview-stage`,children:(0,O.jsx)(`img`,{src:e.image.src,alt:`生成图片预览`})}),(0,O.jsxs)(`div`,{className:`preview-modal-meta`,children:[(0,O.jsx)(`span`,{children:e.image.meta}),(0,O.jsxs)(`a`,{className:`btn-secondary`,href:e.image.src,download:e.image.filename||`generated-image.png`,children:[(0,O.jsx)(E,{size:16}),`下载图片`]})]})]})}async function ze(e,t){let n=await fetch(e,t),r=await n.text(),i=null;if(r)try{i=JSON.parse(r)}catch{i=r}if(!n.ok){let e=typeof i==`object`&&i&&`error`in i&&typeof i.error?.message==`string`?i.error.message:typeof i==`string`?i:`${n.status} ${n.statusText}`;throw Error(e)}return i}function Be(e,t){let n=new Blob([`${JSON.stringify(t,null,2)}\n`],{type:`application/json;charset=utf-8`}),r=URL.createObjectURL(n),i=document.createElement(`a`);i.href=r,i.download=e,document.body.appendChild(i),i.click(),i.remove(),URL.revokeObjectURL(r)}function Ve(e,t,n=`text/plain;charset=utf-8`){let r=new Blob([t],{type:n}),i=URL.createObjectURL(r),a=document.createElement(`a`);a.href=i,a.download=e,document.body.appendChild(a),a.click(),a.remove(),URL.revokeObjectURL(i)}function He(e){return JSON.stringify(e,null,2)}function Ue(e){return e?new Intl.DateTimeFormat(`zh-CN`,{month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`}).format(new Date(e)):`-`}function We(e){if(!(typeof e!=`number`||!Number.isFinite(e)||e<=0))return e<0xe8d4a51000?e*1e3:e}function Ge(e){return e?new Intl.DateTimeFormat(`zh-CN`,{year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`}).format(new Date(e)):`-`}function Ke(e){return Number.isFinite(e)?e<1e3?`${Math.round(e)} ms`:`${(e/1e3).toFixed(e<1e4?2:1)} s`:`-`}function qe(e){if(!Number.isFinite(e)||e<=0)return`0 B`;let t=[`B`,`KiB`,`MiB`,`GiB`],n=Math.min(Math.floor(Math.log(e)/Math.log(1024)),t.length-1),r=e/1024**n;return`${r.toFixed(n===0?0:r>=10?1:2)} ${t[n]}`}var Je=[`/v1/chat/completions`,`/v1/images/generations`,`/v1/images/edits`,`/v1/responses`,`/v1/models`],Ye={"/v1/chat/completions":`Chat`,"/v1/images/generations":`Images`,"/v1/images/edits":`Edits`,"/v1/responses":`Responses`,"/v1/models":`Models`};function Xe(e,t){return Je.indexOf(e.path)-Je.indexOf(t.path)}function Ze(e){return typeof e!=`number`||!Number.isFinite(e)?0:Math.max(0,Math.min(100,Math.round(e)))}function Qe(e){return e?.quota?.planType||`unknown`}function $e(e){let t=Qe(e).toLowerCase();return t.includes(`enterprise`)||t.includes(`business`)?60:t.includes(`team`)?50:t.includes(`pro`)||t.includes(`premium`)?40:t.includes(`plus`)?30:t.includes(`free`)?10:0}function et(e){let t=Qe(e).toLowerCase();return t.includes(`plus`)?`plus`:t.includes(`pro`)?`pro`:t.includes(`enterprise`)||t.includes(`business`)?`enterprise`:t.includes(`team`)?`team`:t.includes(`free`)?`free`:t.includes(`premium`)?`premium`:`unknown`}function tt(e){let[t,n]=e.split(`@`);return n?`${t.slice(0,2)}${`*`.repeat(Math.max(3,Math.min(5,t.length)))}@${n}`:nt(e)}function nt(e){return e?e.length<=10?e:`${e.slice(0,4)}...${e.slice(-4)}`:`未提供`}function rt(e,t){return e?e.email?t?e.email:tt(e.email):t?e.accountId||e.profileId:nt(e.accountId||e.profileId):`未登录`}function it(e){return(e.email||e.accountId||e.profileId||`A`).trim().slice(0,1).toUpperCase()}function at(e){return Ze(e.quota?.primaryUsedPercent)}function ot(e){return 100-at(e)}function st(e){return Ze(e.quota?.secondaryUsedPercent)}function ct(e){return e>=95?`red`:e>=75?`orange`:`blue`}function lt(e,t){return e.isActive&&t?{className:`dual`,label:`API + Codex`}:e.isActive?{className:`api-only`,label:`API`}:t?{className:`codex-only`,label:`Codex`}:null}function ut(e){return at(e)>=100||st(e)>=100}function dt(e){return e.authStatus?.state===`token_invalidated`||e.authStatus?.state===`auth_error`}function ft(e){return dt(e)||!!(e.expiresAt&&e.expiresAt<=Date.now())}function pt(e,t){return e.isActive||t&&e.accountId===t?0:ft(e)?2:1}function mt(e){let t=e.authStatus;return!t||t.state===`ok`?t?.checkedAt?`正常 · ${Ge(t.checkedAt)}`:`正常`:`${t.state===`token_invalidated`?`登录失效`:`认证异常`}${t.code||t.httpStatus?` (${t.code||t.httpStatus})`:``} · ${Ge(t.checkedAt)}`}function ht(e){return e.authStatus?.state===`token_invalidated`?{key:`invalid`,label:`登录失效`,tone:`red`}:e.authStatus?.state===`auth_error`?{key:`invalid`,label:`认证异常`,tone:`red`}:e.expiresAt&&e.expiresAt<=Date.now()?{key:`expired`,label:`已过期`,tone:`red`}:ut(e)?{key:`exhausted`,label:`额度耗尽`,tone:`orange`}:at(e)>=75||st(e)>=75?{key:`warning`,label:`即将耗尽`,tone:`orange`}:{key:`healthy`,label:`健康`,tone:`green`}}function k(e,t){let n=t===`primary`?e.quota?.primaryWindowMinutes:e.quota?.secondaryWindowMinutes;return n?n<60?`${n} 分钟重置`:n<1440?`${Math.round(n/60)} 小时重置`:`${Math.round(n/60/24)} 天重置`:t===`primary`?`主额度重置`:`周重置`}function gt(e,t){let n=t===`primary`?e.quota?.primaryResetAt:e.quota?.secondaryResetAt,r=t===`primary`?e.quota?.primaryResetAfterSeconds:e.quota?.secondaryResetAfterSeconds,i=We(n);return i?Ue(i):typeof r==`number`&&r>0?Ue((We(e.quota?.capturedAt)||Date.now())+r*1e3):`-`}function _t(e){return e?e.authStatus?.state===`token_invalidated`||e.authStatus?.state===`auth_error`?{ok:!1,detail:`账号认证已失效,请重新登录后再测试图片接口。`}:ut(e)?{ok:!0,detail:`账号额度可能不足,实际以接口返回为准。`}:{ok:!0,detail:`当前账号可使用图片生成接口。`}:{ok:!1,detail:`登录后可测试图片接口。`}}function vt(e){return e instanceof Error?e.message:String(e)}async function yt(e){try{return await navigator.clipboard.writeText(e),!0}catch{return!1}}function bt(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function xt(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>{if(typeof r.result==`string`){t(r.result);return}n(Error(`图片读取结果不是字符串。`))},r.onerror=()=>n(r.error||Error(`图片读取失败。`)),r.readAsDataURL(e)})}function St(e,t,n){let r=e.trim()?JSON.parse(e):JSON.parse(wt(`/v1/images/edits`,n));if(!bt(r))throw Error(`请求体必须是 JSON 对象。`);let i={image_url:t};if(Array.isArray(r.images)){let e=r.images.length>0?[...r.images]:[i],n=bt(e[0])?{...e[0],image_url:t}:i;delete n.file_id,e[0]=n,r.images=e}else if(Array.isArray(r.image)){let e=r.image.length>0?[...r.image]:[i],n=bt(e[0])?{...e[0],image_url:t}:i;delete n.file_id,e[0]=n,r.image=e}else `image`in r&&r.image!==void 0?r.image=i:r.images=[i];return He(r)}function Ct(e,t=0){return typeof e==`string`?e.length>280&&/^[A-Za-z0-9+/=_-]+$/.test(e)?`[base64 ${e.length} chars]`:e.length>1200?`${e.slice(0,1200)}...`:e:!e||typeof e!=`object`?e:t>4?`[Object]`:Array.isArray(e)?e.map(e=>Ct(e,t+1)):Object.fromEntries(Object.entries(e).map(([e,n])=>[e,e===`b64_json`&&typeof n==`string`?`[base64 ${n.length} chars]`:Ct(n,t+1)]))}function wt(e,t){return e===`/v1/models`?``:e===`/v1/responses`?He({model:t,input:`请只回复 OK`}):e===`/v1/chat/completions`?He({model:t,messages:[{role:`user`,content:`请只回复 OK`}]}):e===`/v1/images/generations`?He({model:`gpt-image-2`,prompt:`生成一张白底红苹果商品图,构图简洁,光线干净。`,size:`1024x1024`,quality:`low`,response_format:`b64_json`}):e===`/v1/images/edits`?He({model:`gpt-image-2`,prompt:`参考这张图,生成一张更适合科技产品广告的版本。`,images:[{image_url:`data:image/png;base64,REPLACE_WITH_IMAGE_BASE64`}],size:`1024x1024`,quality:`low`,response_format:`b64_json`}):`{}`}function Tt(e,t){let n=Array.isArray(e.profiles)?e.profiles:[],r=Date.now();return n.slice(0,5).map((n,i)=>{let a=Je[i%Je.length],o=e.supportedEndpoints.find(e=>e.path===a)||{method:a===`/v1/models`?`GET`:`POST`,path:a};return{id:`seed-${n.profileId}-${i}`,time:r-i*15*60*1e3,method:o.method,endpoint:a,account:rt(n,t),model:a.startsWith(`/v1/images/`)?`gpt-image-2`:e.settings.defaultModel,statusCode:200,durationMs:860+i*230+at(n)*8,source:i%2==0?`管理页`:`CLI`}})}function Et(e){return!e||typeof e!=`object`||!(`data`in e)||!Array.isArray(e.data)?[]:(e.data||[]).map((t,n)=>{let r=typeof t.b64_json==`string`?t.b64_json:``;if(!r)return null;let i=e.output_format,a=typeof i==`string`?i:`png`;return{src:`data:image/${a};base64,${r}`,filename:`generated-${n+1}.${a}`,meta:`${a.toUpperCase()} · ${r.length} chars`}}).filter(Boolean)}function Dt(e){let[t,n]=(0,_.useState)(``);async function r(){e.setBusy(`import`),e.setStatus(`正在导入账号...`);try{let r=await ze(`/_gateway/admin/profiles/import`,{method:`POST`,headers:{"Content-Type":`application/json`},body:He({profile:JSON.parse(t)})});e.setConfig(r),n(``),e.setAccountModalOpen(!1),e.setStatus(`已导入 ${r.importedProfileCount||1} 个账号。`)}catch(t){e.setStatus(vt(t))}finally{e.setBusy(null)}}async function i(){e.setBusy(`template`);try{n(He((await ze(`/_gateway/admin/profiles/import-template`)).profile)),e.setStatus(`已填入参考格式。`)}catch(t){e.setStatus(vt(t))}finally{e.setBusy(null)}}return(0,O.jsx)(Fe,{title:`新增账号`,onClose:()=>e.setAccountModalOpen(!1),children:(0,O.jsxs)(`div`,{className:`modal-grid`,children:[(0,O.jsxs)(`section`,{className:`modal-section`,children:[(0,O.jsx)(`h4`,{children:`OAuth 登录`}),(0,O.jsx)(`p`,{children:`使用浏览器完成 Codex OAuth 授权,完成后会自动写入本地账号池。`}),(0,O.jsxs)(`button`,{className:`btn-primary`,type:`button`,onClick:e.login,disabled:e.busy===`login`,children:[e.busy===`login`?(0,O.jsx)(ge,{className:`spin`,size:16}):(0,O.jsx)(_e,{size:16}),`登录`]})]}),(0,O.jsxs)(`section`,{className:`modal-section`,children:[(0,O.jsx)(`h4`,{children:`导入账号 JSON`}),(0,O.jsx)(`p`,{children:`支持单个对象、对象数组,或包含 profiles 数组的对象。导入后最后一个账号会成为当前账号。`}),(0,O.jsxs)(`div`,{className:`button-row`,children:[(0,O.jsx)(`button`,{className:`btn-secondary`,type:`button`,onClick:i,disabled:e.busy===`template`,children:`填入参考格式`}),(0,O.jsx)(`button`,{className:`btn-primary`,type:`button`,onClick:r,disabled:e.busy===`import`||!t.trim(),children:`导入`})]}),(0,O.jsx)(`textarea`,{className:`textarea import-textarea`,value:t,onChange:e=>n(e.target.value),placeholder:`粘贴账号 JSON,支持 { "profiles": [...] } 批量导入`,spellCheck:!1})]})]})})}function A({workspace:e}){return(0,O.jsxs)(O.Fragment,{children:[e.isLoading&&(0,O.jsxs)(`div`,{className:`loading-cover`,children:[(0,O.jsx)(ge,{className:`spin`,size:28}),(0,O.jsx)(`span`,{children:`正在加载本地网关...`})]}),e.accountModalOpen&&(0,O.jsx)(Dt,{busy:e.busy,login:e.login,setBusy:e.setBusy,setConfig:e.setConfig,setStatus:e.setStatus,setAccountModalOpen:e.setAccountModalOpen}),e.contactOpen&&(0,O.jsx)(Le,{onClose:()=>e.setContactOpen(!1)}),e.previewImage&&(0,O.jsx)(Re,{image:e.previewImage,onClose:()=>e.setPreviewImage(null)})]})}var Ot=`data:image/svg+xml,%3csvg%20width='920'%20height='600'%20viewBox='0%200%20920%20600'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='920'%20height='600'%20rx='36'%20fill='%23F8FAFC'/%3e%3crect%20x='56'%20y='54'%20width='808'%20height='492'%20rx='24'%20fill='%23FFFFFF'%20stroke='%23D8E0EA'/%3e%3crect%20x='56'%20y='54'%20width='190'%20height='492'%20rx='24'%20fill='%23111827'/%3e%3cpath%20d='M246%2054h594c13.255%200%2024%2010.745%2024%2024v40H246V54Z'%20fill='%23F8FAFC'/%3e%3ccircle%20cx='88'%20cy='86'%20r='7'%20fill='%23EF4444'/%3e%3ccircle%20cx='112'%20cy='86'%20r='7'%20fill='%23F59E0B'/%3e%3ccircle%20cx='136'%20cy='86'%20r='7'%20fill='%2322C55E'/%3e%3crect%20x='86'%20y='148'%20width='108'%20height='14'%20rx='7'%20fill='%23E5E7EB'%20fill-opacity='.75'/%3e%3crect%20x='86'%20y='194'%20width='128'%20height='34'%20rx='10'%20fill='%232563EB'/%3e%3crect%20x='86'%20y='244'%20width='112'%20height='34'%20rx='10'%20fill='%231F2937'/%3e%3crect%20x='86'%20y='294'%20width='124'%20height='34'%20rx='10'%20fill='%231F2937'/%3e%3crect%20x='86'%20y='344'%20width='98'%20height='34'%20rx='10'%20fill='%231F2937'/%3e%3crect%20x='278'%20y='150'%20width='250'%20height='96'%20rx='18'%20fill='%23EFF6FF'%20stroke='%23BFDBFE'/%3e%3crect%20x='558'%20y='150'%20width='250'%20height='96'%20rx='18'%20fill='%23F0FDF4'%20stroke='%23BBF7D0'/%3e%3crect%20x='278'%20y='280'%20width='530'%20height='210'%20rx='18'%20fill='%23FFFFFF'%20stroke='%23D8E0EA'/%3e%3cpath%20d='M318%20430c43-68%2089-70%20137-8%2039%2049%2081%2037%20126-36%2038-62%2081-79%20129-21'%20stroke='%232563EB'%20stroke-width='8'%20stroke-linecap='round'/%3e%3cpath%20d='M318%20386c42-35%2083-33%20123%206%2045%2045%2092%2040%20141-16%2038-43%2080-49%20126-18'%20stroke='%2322C55E'%20stroke-width='8'%20stroke-linecap='round'/%3e%3crect%20x='318'%20y='316'%20width='118'%20height='13'%20rx='6.5'%20fill='%23111827'/%3e%3crect%20x='318'%20y='342'%20width='194'%20height='10'%20rx='5'%20fill='%23CBD5E1'/%3e%3crect%20x='596'%20y='182'%20width='80'%20height='12'%20rx='6'%20fill='%23111827'/%3e%3crect%20x='596'%20y='207'%20width='150'%20height='10'%20rx='5'%20fill='%2386EFAC'/%3e%3crect%20x='316'%20y='182'%20width='80'%20height='12'%20rx='6'%20fill='%23111827'/%3e%3crect%20x='316'%20y='207'%20width='150'%20height='10'%20rx='5'%20fill='%2393C5FD'/%3e%3ccircle%20cx='776'%20cy='198'%20r='16'%20fill='%2322C55E'/%3e%3cpath%20d='M768%20198l6%206%2011-13'%20stroke='%23FFFFFF'%20stroke-width='5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M478%20186l15%2020-15%2020-15-20%2015-20Z'%20fill='%232563EB'/%3e%3c/svg%3e`;function j(e){return(0,O.jsxs)(`div`,{className:`service-row`,children:[(0,O.jsx)(`label`,{children:e.label}),e.code?(0,O.jsx)(`code`,{children:e.value}):(0,O.jsx)(`strong`,{children:e.value})]})}function kt(e){let t=e.config?.codex?.accountId,n=e.profiles.length<=0?``:e.profiles.length===1?`profile-count-1`:e.profiles.length===2?`profile-count-2`:e.profiles.length===3?`profile-count-3`:`profile-count-many`;return(0,O.jsxs)(`section`,{className:`card`,id:`accounts`,children:[(0,O.jsxs)(`div`,{className:`section-head`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`h2`,{children:`账号额度预览`}),(0,O.jsx)(`p`,{children:`账号信息采用卡片式布局展示,支持搜索、状态筛选和额度排序。`})]}),(0,O.jsxs)(`div`,{className:`section-actions`,children:[(0,O.jsx)(`button`,{className:`btn-secondary`,type:`button`,onClick:e.onLocate,children:`定位当前账号`}),(0,O.jsx)(`button`,{className:`btn-secondary`,type:`button`,onClick:e.onExportSelected,children:`导出所选`}),(0,O.jsx)(`button`,{className:`btn-primary`,type:`button`,onClick:e.onAddAccount,children:`新增账号`}),(0,O.jsx)(`button`,{className:`btn-secondary`,type:`button`,onClick:e.onRefreshStatus,children:`刷新状态`}),(0,O.jsx)(`button`,{className:`btn-danger`,type:`button`,onClick:e.onClearAccounts,children:`清空账号`})]})]}),(0,O.jsxs)(`div`,{className:`filter-row`,children:[(0,O.jsxs)(`label`,{className:`search-box`,children:[(0,O.jsx)(be,{size:16}),(0,O.jsx)(`input`,{value:e.filter.search,onChange:t=>e.onFilter({...e.filter,search:t.target.value}),placeholder:`搜索邮箱、账号 ID 或 Profile ID`})]}),(0,O.jsxs)(`select`,{className:`control`,value:e.filter.status,onChange:t=>e.onFilter({...e.filter,status:t.target.value}),children:[(0,O.jsx)(`option`,{value:`all`,children:`全部状态`}),(0,O.jsx)(`option`,{value:`active`,children:`使用中`}),(0,O.jsx)(`option`,{value:`healthy`,children:`健康`}),(0,O.jsx)(`option`,{value:`warning`,children:`即将耗尽`}),(0,O.jsx)(`option`,{value:`exhausted`,children:`额度耗尽`}),(0,O.jsx)(`option`,{value:`invalid`,children:`登录失效`}),(0,O.jsx)(`option`,{value:`expired`,children:`已过期`})]}),(0,O.jsxs)(`select`,{className:`control`,value:e.filter.sort,onChange:t=>e.onFilter({...e.filter,sort:t.target.value}),children:[(0,O.jsx)(`option`,{value:`quota-desc`,children:`默认排序`}),(0,O.jsx)(`option`,{value:`latency-asc`,children:`按额度更新时间`}),(0,O.jsx)(`option`,{value:`expiry-asc`,children:`按过期时间`}),(0,O.jsx)(`option`,{value:`name-asc`,children:`按名称排序`}),(0,O.jsx)(`option`,{value:`quota-asc`,children:`按剩余额度升序`}),(0,O.jsx)(`option`,{value:`plan-desc`,children:`按套餐排序`}),(0,O.jsx)(`option`,{value:`email-asc`,children:`按邮箱排序`})]}),(0,O.jsxs)(`span`,{className:`account-selected-count`,children:[`已选择 `,e.selectedCount,` 个`]})]}),(0,O.jsx)(`div`,{className:`account-grid ${n}`,children:e.profiles.length===0?(0,O.jsx)(`div`,{className:`empty-state`,children:`还没有匹配的账号。可以新增账号或调整筛选条件。`}):e.profiles.map(n=>{let r=ht(n),i=at(n),a=st(n),o=!!e.expandedProfiles[n.profileId],s=!!(t&&n.accountId===t),c=lt(n,s),l=dt(n),u=_t(n),d=typeof e.busy==`string`&&e.busy.startsWith(`profile:`)&&e.busy.endsWith(n.profileId),f=e.busy===`profile:sync-quota:${n.profileId}`;return(0,O.jsxs)(`article`,{className:`account-card plan-${et(n)} ${l?`is-auth-invalid`:``}`,"data-profile-card":n.profileId,title:l?mt(n):void 0,children:[c&&(0,O.jsx)(`span`,{className:`usage-corner ${c.className}`,children:(0,O.jsx)(`span`,{children:c.label})}),(0,O.jsxs)(`div`,{className:`account-head`,children:[(0,O.jsxs)(`div`,{className:`account-title`,children:[(0,O.jsxs)(`div`,{className:`account-name`,children:[(0,O.jsx)(`span`,{className:`avatar`,children:it(n)}),(0,O.jsx)(`strong`,{children:rt(n,e.showEmails)}),(0,O.jsx)(`button`,{"aria-label":`刷新额度`,className:`account-icon-btn`,disabled:d,onClick:()=>e.onAction(`sync-quota`,n),title:`刷新额度`,type:`button`,children:f?(0,O.jsx)(ge,{className:`spin`,size:14}):(0,O.jsx)(ve,{size:14})})]}),(0,O.jsxs)(`div`,{className:`badge-row`,children:[(0,O.jsx)(`span`,{className:`badge brand`,children:Qe(n)}),(0,O.jsx)(`span`,{className:`badge ${r.tone}`,children:r.label}),(0,O.jsx)(`span`,{className:`badge ${u.ok?`green`:`orange`}`,children:`gpt-image-2`})]})]}),(0,O.jsxs)(`label`,{className:`account-select`,children:[(0,O.jsx)(`input`,{type:`checkbox`,checked:!!e.selectedProfiles[n.profileId],onChange:t=>e.onSelect(n.profileId,t.target.checked)}),(0,O.jsx)(`span`,{children:`选择`})]})]}),(0,O.jsxs)(`div`,{className:`account-metrics`,children:[(0,O.jsx)(jt,{label:k(n,`primary`),value:i,tone:ct(i)}),(0,O.jsx)(jt,{label:k(n,`secondary`),value:a,tone:ct(a)})]}),(0,O.jsxs)(`div`,{className:`usage-status-row`,children:[(0,O.jsxs)(`span`,{className:`usage-status ${n.isActive?`is-active`:``}`,children:[(0,O.jsx)(de,{size:14}),(0,O.jsx)(`span`,{children:`API`}),(0,O.jsx)(`span`,{className:`usage-dot ${n.isActive?`active`:``}`}),(0,O.jsx)(`span`,{className:`usage-state-text`,children:n.isActive?`使用中`:`未使用`})]}),(0,O.jsxs)(`span`,{className:`usage-status ${s?`is-active`:``}`,children:[(0,O.jsx)(ue,{size:14}),(0,O.jsx)(`span`,{children:`Codex`}),(0,O.jsx)(`span`,{className:`usage-dot ${s?`active`:``}`}),(0,O.jsx)(`span`,{className:`usage-state-text`,children:s?`使用中`:`未使用`})]})]}),(0,O.jsxs)(`div`,{className:`compact-meta-row`,children:[(0,O.jsxs)(`div`,{className:`compact-reset-list`,children:[(0,O.jsxs)(`div`,{className:`compact-meta-item`,children:[(0,O.jsx)(`label`,{children:k(n,`primary`)}),(0,O.jsx)(`strong`,{children:gt(n,`primary`)})]}),(0,O.jsxs)(`div`,{className:`compact-meta-item`,children:[(0,O.jsx)(`label`,{children:k(n,`secondary`)}),(0,O.jsx)(`strong`,{children:gt(n,`secondary`)})]})]}),(0,O.jsx)(`div`,{className:`compact-meta-actions`,children:(0,O.jsxs)(`button`,{className:`details-toggle ${o?`is-expanded`:``}`,type:`button`,onClick:()=>e.onToggle(n.profileId),children:[(0,O.jsx)(`span`,{children:o?`收起详情`:`查看详情`}),(0,O.jsx)(At,{})]})})]}),o&&(0,O.jsxs)(`div`,{className:`meta-grid`,children:[(0,O.jsx)(j,{label:`套餐`,value:Qe(n)}),(0,O.jsx)(j,{label:`Account ID`,value:(e.showEmails,n.accountId),code:!0}),(0,O.jsx)(j,{label:`Profile ID`,value:(e.showEmails,n.profileId),code:!0}),(0,O.jsx)(j,{label:`认证状态`,value:mt(n)}),(0,O.jsx)(j,{label:`生图能力`,value:u.ok?`gpt-image-2 可用`:u.detail}),(0,O.jsx)(j,{label:`过期时间`,value:n.expiresAt?new Date(n.expiresAt).toLocaleString(`zh-CN`):`-`}),(0,O.jsx)(j,{label:`额度快照`,value:n.quota?.capturedAt?new Date(n.quota.capturedAt).toLocaleString(`zh-CN`):`-`})]}),(0,O.jsxs)(`div`,{className:`account-actions`,children:[(0,O.jsx)(`button`,{className:`btn-secondary ${n.isActive?`is-current`:``}`,type:`button`,onClick:()=>e.onAction(`activate`,n),disabled:n.isActive||d||l,children:l?`网关不可用`:n.isActive?`网关使用中`:`应用网关`}),(0,O.jsx)(`button`,{className:`btn-secondary ${s?`is-current codex`:``}`,type:`button`,onClick:()=>e.onAction(`apply-codex`,n),disabled:s||d||l,children:l?`Codex 不可用`:s?`Codex 使用中`:`应用 Codex`}),(0,O.jsx)(`button`,{className:`btn-secondary`,type:`button`,onClick:()=>e.onAction(`export`,n),disabled:d,children:`导出`}),(0,O.jsx)(`button`,{className:`btn-danger`,type:`button`,onClick:()=>e.onAction(`remove`,n),disabled:d,children:`删除`})]})]},n.profileId)})})]})}function At(){return(0,O.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,"aria-hidden":`true`,children:(0,O.jsx)(`path`,{d:`m6 9 6 6 6-6`})})}function jt(e){return(0,O.jsxs)(`div`,{className:`quota-row`,children:[(0,O.jsxs)(`div`,{className:`quota-line`,children:[(0,O.jsxs)(`span`,{children:[e.label,` · 已用 `,e.value,`% / 剩余 `,100-e.value,`%`]}),(0,O.jsxs)(`strong`,{children:[`剩余 `,100-e.value,`%`]})]}),(0,O.jsx)(`div`,{className:`progress-track`,children:(0,O.jsx)(`div`,{className:`progress-bar ${e.tone}`,style:{width:`${e.value}%`}})})]})}function Mt(e){let[t,n]=(0,_.useState)({}),[r,i]=(0,_.useState)({}),[a,o]=(0,_.useState)({search:``,status:`all`,sort:`quota-desc`}),s=(0,_.useMemo)(()=>{let t=e.config?.profiles?[...e.config.profiles]:[],n=a.search.trim().toLowerCase(),r=t.filter(t=>{let r=[rt(t,!0).toLowerCase(),t.accountId,t.profileId,t.email||``].join(` `).toLowerCase(),i=ht(t),o=!!(e.codexAccountId&&t.accountId===e.codexAccountId);return n&&!r.includes(n)?!1:a.status===`active`?t.isActive||o:a.status===`healthy`?i.key===`healthy`:a.status===`warning`?i.key===`warning`:a.status===`exhausted`?i.key===`exhausted`:a.status===`expired`?i.key===`expired`:a.status===`invalid`?i.key===`invalid`:!0});return r.sort((t,n)=>{let r=pt(t,e.codexAccountId)-pt(n,e.codexAccountId);if(r!==0)return r;let i=$e(n)-$e(t);if(i!==0)return i;let o=ot(n)-ot(t);return o===0?a.sort===`latency-asc`?(n.quota?.capturedAt||0)-(t.quota?.capturedAt||0):a.sort===`expiry-asc`?(t.expiresAt||2**53-1)-(n.expiresAt||2**53-1):a.sort===`name-asc`?rt(t,!0).localeCompare(rt(n,!0),`zh-CN`):a.sort===`quota-asc`?100-at(n)-(100-at(t)):a.sort===`plan-desc`?$e(n)-$e(t):a.sort===`email-asc`?rt(t,!0).localeCompare(rt(n,!0)):at(n)-at(t):o}),r},[a,e.codexAccountId,e.config?.profiles]),c=Object.values(t).filter(Boolean).length;async function l(t,n){let r=await ze(`/_gateway/admin/profiles/export`,{method:`POST`,headers:{"Content-Type":`application/json`},body:He(n?{profileIds:n}:{profileId:t})});Be(`ai-zero-token-${n?`profiles-${n.length}`:t||`active`}.json`,r.profile),e.setStatus(n?`已导出 ${n.length} 个账号。`:`账号配置已导出。`)}async function u(t,n){if(!(t===`remove`&&!window.confirm(`确认删除 ${rt(n,e.showEmails)}?`))){if((t===`activate`||t===`apply-codex`)&&dt(n)){e.setStatus(`${rt(n,e.showEmails)} 登录已失效,不能应用到${t===`activate`?`网关`:`Codex`}。`);return}if((t===`activate`||t===`apply-codex`)&&ut(n)){let r=t===`activate`?`网关`:`Codex`;if(!window.confirm(`${rt(n,e.showEmails)} 的额度看起来已耗尽,仍要应用到${r}吗?`))return}if(t===`export`){await l(n.profileId);return}e.setBusy(`profile:${t}:${n.profileId}`);try{let r=await ze({activate:`/_gateway/admin/profiles/activate`,"apply-codex":`/_gateway/admin/codex/apply`,"sync-quota":`/_gateway/admin/profiles/sync-quota`,remove:`/_gateway/admin/profiles/remove`}[t],{method:`POST`,headers:{"Content-Type":`application/json`},body:He({profileId:n.profileId})});e.setConfig(`config`in r?r.config:r),e.setStatus(t===`activate`?`已应用到网关。`:t===`apply-codex`?`已应用到本机 Codex。`:t===`sync-quota`?`额度信息已同步。`:`账号已删除。`)}catch(t){e.setStatus(vt(t))}finally{e.setBusy(null)}}}return(0,O.jsx)(kt,{config:e.config,profiles:s,showEmails:e.showEmails,filter:a,selectedProfiles:t,expandedProfiles:r,selectedCount:c,busy:e.busy,onFilter:o,onSelect:(e,t)=>n(n=>({...n,[e]:t})),onToggle:e=>i(t=>({...t,[e]:!t[e]})),onAction:u,onLocate:()=>e.activeProfile&&document.querySelector(`[data-profile-card="${e.activeProfile.profileId}"]`)?.scrollIntoView({behavior:`smooth`,block:`center`}),onExportSelected:()=>{let n=Object.keys(t).filter(e=>t[e]);if(n.length===0){e.setStatus(`请先勾选要导出的账号。`);return}l(void 0,n).catch(t=>e.setStatus(t instanceof Error?t.message:String(t)))},onAddAccount:()=>e.setAccountModalOpen(!0),onRefreshStatus:()=>e.refreshConfig({runtime:!0}),onClearAccounts:()=>e.logout()})}function Nt(e){let[t,n]=(0,_.useState)(``),[r,i]=(0,_.useState)(`all`),[a,o]=(0,_.useState)(`all`),[s,c]=(0,_.useState)(`all`),[l,u]=(0,_.useState)(null);(0,_.useEffect)(()=>{if(e.logs.length===0){u(null);return}(!l||!e.logs.some(e=>e.id===l))&&u(e.logs[0].id)},[e.logs,l]);let d=(0,_.useMemo)(()=>Array.from(new Set(e.logs.map(e=>e.source||`管理页`))),[e.logs]),f=(0,_.useMemo)(()=>Array.from(new Set(e.logs.map(e=>e.method))),[e.logs]),p=(0,_.useMemo)(()=>{let n=t.trim().toLowerCase();return e.logs.filter(e=>{let t=[e.time,e.method,e.endpoint,e.account,e.model,e.statusCode,e.durationMs,e.source].join(` `).toLowerCase();return!(n&&!t.includes(n)||r!==`all`&&e.method!==r||a!==`all`&&(e.source||`管理页`)!==a||s===`ok`&&e.statusCode>=400||s===`error`&&e.statusCode<400)})},[r,e.logs,t,a,s]),m=p.find(e=>e.id===l)||p[0]||null;function h(){m&&yt(He(m)).then(e=>{}).catch(()=>void 0)}return(0,O.jsxs)(`section`,{className:`log-table-wrap`,id:`logs`,children:[(0,O.jsx)(`div`,{className:`section-head compact`,children:(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`h2`,{children:`请求日志`}),(0,O.jsx)(`p`,{children:`记录本页快速测试产生的最近请求。`})]})}),(0,O.jsxs)(`div`,{className:`log-toolbar`,children:[(0,O.jsxs)(`label`,{className:`search-box log-search`,children:[(0,O.jsx)(be,{size:16}),(0,O.jsx)(`input`,{value:t,onChange:e=>n(e.target.value),placeholder:`搜索时间、接口、账号、模型或状态`})]}),(0,O.jsxs)(`label`,{className:`filter-chip`,children:[(0,O.jsx)(pe,{size:14}),(0,O.jsxs)(`select`,{value:r,onChange:e=>i(e.target.value),children:[(0,O.jsx)(`option`,{value:`all`,children:`全部方法`}),f.map(e=>(0,O.jsx)(`option`,{value:e,children:e},e))]})]}),(0,O.jsx)(`label`,{className:`filter-chip`,children:(0,O.jsxs)(`select`,{value:a,onChange:e=>o(e.target.value),children:[(0,O.jsx)(`option`,{value:`all`,children:`全部来源`}),d.map(e=>(0,O.jsx)(`option`,{value:e,children:e},e))]})}),(0,O.jsx)(`label`,{className:`filter-chip`,children:(0,O.jsxs)(`select`,{value:s,onChange:e=>c(e.target.value),children:[(0,O.jsx)(`option`,{value:`all`,children:`全部状态`}),(0,O.jsx)(`option`,{value:`ok`,children:`成功`}),(0,O.jsx)(`option`,{value:`error`,children:`失败`})]})})]}),(0,O.jsx)(`div`,{className:`table-scroller`,children:(0,O.jsxs)(`table`,{children:[(0,O.jsx)(`thead`,{children:(0,O.jsxs)(`tr`,{children:[(0,O.jsx)(`th`,{children:`时间`}),(0,O.jsx)(`th`,{children:`方法`}),(0,O.jsx)(`th`,{children:`接口`}),(0,O.jsx)(`th`,{children:`账号`}),(0,O.jsx)(`th`,{children:`模型`}),(0,O.jsx)(`th`,{children:`状态`}),(0,O.jsx)(`th`,{children:`耗时`}),(0,O.jsx)(`th`,{children:`来源`})]})}),(0,O.jsx)(`tbody`,{children:p.length===0?(0,O.jsx)(`tr`,{children:(0,O.jsx)(`td`,{colSpan:8,children:`最近请求会在你使用调试面板后持续追加到这里。`})}):p.map(e=>(0,O.jsxs)(`tr`,{className:e.id===m?.id?`is-selected`:``,onClick:()=>u(e.id),children:[(0,O.jsx)(`td`,{children:Ue(e.time)}),(0,O.jsx)(`td`,{children:(0,O.jsx)(`span`,{className:`method-pill method-${e.method.toLowerCase()}`,children:e.method})}),(0,O.jsx)(`td`,{children:(0,O.jsx)(`code`,{children:e.endpoint})}),(0,O.jsx)(`td`,{children:e.account}),(0,O.jsx)(`td`,{children:e.model}),(0,O.jsx)(`td`,{children:(0,O.jsx)(`span`,{className:`status-pill ${e.statusCode>=400?`is-error`:`is-ok`}`,children:e.statusCode})}),(0,O.jsx)(`td`,{children:Ke(e.durationMs)}),(0,O.jsx)(`td`,{children:e.source||`管理页`})]},e.id))})]})}),(0,O.jsxs)(`div`,{className:`table-footer`,children:[`当前展示 `,p.length,` 条请求记录,最近总计 `,e.logs.length,` 条。`]}),m&&(0,O.jsxs)(`div`,{className:`log-detail-panel`,children:[(0,O.jsxs)(`div`,{className:`log-detail-head`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`h3`,{children:`日志详情`}),(0,O.jsxs)(`p`,{children:[Ue(m.time),` · `,m.method,` `,m.endpoint]})]}),(0,O.jsxs)(`button`,{className:`btn-secondary`,type:`button`,onClick:h,children:[(0,O.jsx)(T,{size:16}),`复制详情`]})]}),(0,O.jsxs)(`div`,{className:`log-detail-grid`,children:[(0,O.jsxs)(`div`,{className:`log-detail-meta`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`span`,{children:`账号`}),(0,O.jsx)(`strong`,{children:m.account})]}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`span`,{children:`模型`}),(0,O.jsx)(`strong`,{children:m.model})]}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`span`,{children:`状态`}),(0,O.jsx)(`strong`,{children:m.statusCode})]}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`span`,{children:`耗时`}),(0,O.jsx)(`strong`,{children:Ke(m.durationMs)})]}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`span`,{children:`来源`}),(0,O.jsx)(`strong`,{children:m.source||`管理页`})]})]}),(0,O.jsx)(`pre`,{className:`pre log-detail-pre`,children:He(m)})]})]})]})}function Pt(e){return(0,O.jsx)(Nt,{logs:e.logs})}function Ft(e){let t=e.icon;return(0,O.jsxs)(`article`,{className:`summary-card tone-${e.tone||`brand`} ${e.compact?`compact-value`:``}`,children:[(0,O.jsx)(`div`,{className:`summary-icon ${e.tone||`brand`}`,children:(0,O.jsx)(t,{size:16})}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`span`,{children:e.label}),(0,O.jsx)(`strong`,{children:e.value}),(0,O.jsx)(`p`,{children:e.detail})]})]})}function It(e){let t=rt(e.apiProfile,e.showEmails),n=e.codexProfile?rt(e.codexProfile,e.showEmails):e.codexEmail?e.showEmails?e.codexEmail:tt(e.codexEmail):e.codexAccountId?e.showEmails?e.codexAccountId:nt(e.codexAccountId):`未应用`;return(0,O.jsxs)(`div`,{className:`usage-summary`,children:[(0,O.jsxs)(`div`,{className:`usage-summary-row`,children:[(0,O.jsx)(`span`,{children:`网关:`}),(0,O.jsx)(`strong`,{children:t})]}),(0,O.jsxs)(`div`,{className:`usage-summary-row`,children:[(0,O.jsx)(`span`,{children:`Codex:`}),(0,O.jsx)(`strong`,{children:n})]})]})}function Lt(e){let t=e?.quota?.primaryUsedPercent;return typeof t!=`number`||!Number.isFinite(t)?0:Math.max(0,Math.min(100,Math.round(t)))}function Rt(e,t,n,r){let i=Array.isArray(e?.profiles)?e.profiles:[],a=620+(e?.profile?Lt(e.profile):42)*7+n*90,o=i.reduce((e,t,n)=>e+Lt(t)*(n+1),0),s=Math.max(1,r/60);return Array.from({length:12},(e,r)=>{let i=Math.sin((r+1+n)*(.65+s*.08))*(120+s*18),c=Math.cos((r+1)*(1.05+s*.06)+n)*(72+s*10),l=t[r]?t[r].durationMs*(n===0?.24:.12):0,u=a+i+c+l+o%280;return Math.max(220,Math.min(2200,Math.round(u)))})}function zt(e,t,n,r){return e.map((i,a)=>{let o=t/(e.length-1)*a,s=n-i/r*(n-16)-8;return`${a===0?`M`:`L`}${o.toFixed(2)} ${s.toFixed(2)}`}).join(` `)}function Bt(e){let t=Rt(e.config,e.requestLogs,0,e.windowMinutes),n=Rt(e.config,e.requestLogs,1,e.windowMinutes).map(e=>Math.max(180,e-260)),r=Math.max(...t,...n,2e3),i=zt(t,720,210,r),a=zt(n,720,210,r),o=Date.now(),s=Math.max(10,Math.round(e.windowMinutes/6)),c=Array.from({length:6},(e,t)=>new Date(o-(5-t)*s*60*1e3).toLocaleTimeString(`zh-CN`,{hour12:!1,hour:`2-digit`,minute:`2-digit`}));return(0,O.jsxs)(`section`,{className:`trend-card`,"aria-label":`请求耗时趋势`,children:[(0,O.jsxs)(`div`,{className:`section-head compact`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`h3`,{children:`请求耗时趋势`}),(0,O.jsx)(`p`,{children:`基于最近调试请求和账号额度状态生成的本地趋势视图。`})]}),(0,O.jsxs)(`select`,{className:`control`,value:e.windowMinutes,onChange:t=>e.onWindow(Number(t.target.value)),children:[(0,O.jsx)(`option`,{value:60,children:`近 1 小时`}),(0,O.jsx)(`option`,{value:180,children:`近 3 小时`}),(0,O.jsx)(`option`,{value:720,children:`近 12 小时`})]})]}),(0,O.jsxs)(`div`,{className:`chart-wrap`,children:[(0,O.jsxs)(`div`,{className:`chart-legend`,children:[(0,O.jsxs)(`span`,{className:`legend-item`,children:[(0,O.jsx)(`span`,{className:`legend-swatch purple`}),`网关响应`]}),(0,O.jsxs)(`span`,{className:`legend-item`,children:[(0,O.jsx)(`span`,{className:`legend-swatch blue`}),`上游响应`]})]}),(0,O.jsxs)(`svg`,{className:`trend-svg`,viewBox:`0 0 720 210`,role:`img`,"aria-label":`请求耗时趋势折线图`,children:[(0,O.jsxs)(`defs`,{children:[(0,O.jsxs)(`linearGradient`,{id:`areaA`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,O.jsx)(`stop`,{offset:`0%`,stopColor:`rgba(99,91,255,0.18)`}),(0,O.jsx)(`stop`,{offset:`100%`,stopColor:`rgba(99,91,255,0.02)`})]}),(0,O.jsxs)(`linearGradient`,{id:`areaB`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,O.jsx)(`stop`,{offset:`0%`,stopColor:`rgba(59,130,246,0.16)`}),(0,O.jsx)(`stop`,{offset:`100%`,stopColor:`rgba(59,130,246,0.02)`})]})]}),[1,2,3,4].map(e=>(0,O.jsx)(`line`,{x1:`0`,y1:e*42,x2:720,y2:e*42,stroke:`#e2e8f0`,strokeWidth:`1`},e)),(0,O.jsx)(`path`,{d:`${i} L 720 210 L 0 210 Z`,fill:`url(#areaA)`,stroke:`none`}),(0,O.jsx)(`path`,{d:`${a} L 720 210 L 0 210 Z`,fill:`url(#areaB)`,stroke:`none`}),(0,O.jsx)(`path`,{d:i,fill:`none`,stroke:`#635bff`,strokeWidth:`2.4`,strokeLinecap:`round`}),(0,O.jsx)(`path`,{d:a,fill:`none`,stroke:`#3b82f6`,strokeWidth:`2.4`,strokeLinecap:`round`})]}),(0,O.jsx)(`div`,{className:`trend-labels`,children:c.map((e,t)=>(0,O.jsx)(`span`,{children:e},`${e}-${t}`))})]})]})}function Vt(e){return(0,O.jsxs)(`section`,{className:`card service-card endpoint-card`,children:[(0,O.jsx)(`div`,{className:`section-head compact`,children:(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`h3`,{children:`网关信息`}),(0,O.jsx)(`p`,{children:`桌面端与 CLI 共享同一套本地服务。`})]})}),(0,O.jsxs)(`div`,{className:`service-list compact-grid`,children:[(0,O.jsx)(j,{label:`管理页`,value:e.config?.adminUrl||`-`,code:!0}),(0,O.jsx)(j,{label:`Base URL`,value:e.config?.baseUrl||`-`,code:!0}),(0,O.jsx)(j,{label:`默认模型`,value:e.config?.settings.defaultModel||`-`}),(0,O.jsx)(j,{label:`生图模型`,value:`gpt-image-2`}),(0,O.jsx)(j,{label:`兼容接口`,value:e.config?.supportedEndpoints.map(e=>e.path).join(`,`)||`-`}),(0,O.jsx)(j,{label:`令牌预览`,value:e.config?.profile?.accessTokenPreview||`未登录`,code:!0}),(0,O.jsx)(j,{label:`模型来源`,value:e.config?.modelCatalog.source||`-`})]})]})}function Ht(e){let[t,n]=(0,_.useState)(60),r=e.requestLogs.length?e.requestLogs.reduce((e,t)=>e+t.durationMs,0)/e.requestLogs.length:0;return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`section`,{className:`summary-grid desktop-summary-grid overview-summary-grid`,children:[(0,O.jsx)(Ft,{icon:De,label:`账号总数`,value:String(e.config?.status.profileCount||0),detail:`已保存到本地账号池`,tone:`blue`}),(0,O.jsx)(Ft,{icon:de,label:`当前账号状态`,value:(0,O.jsx)(It,{apiProfile:e.activeProfile,codexProfile:e.codexProfile,codexEmail:e.codexEmail,codexAccountId:e.codexAccountId,showEmails:e.showEmails}),detail:e.config?.status.loggedIn||e.codexProfile?``:`需要先登录或导入账号`,tone:e.config?.status.loggedIn||e.codexProfile?`green`:`orange`,compact:!0}),(0,O.jsx)(Ft,{icon:Ae,label:`今日请求数`,value:String(e.requestLogs.length),detail:`基于本页最近测试记录`,tone:`blue`}),(0,O.jsx)(Ft,{icon:le,label:`平均耗时`,value:e.requestLogs.length?Ke(r):`-`,detail:`统计最近 ${e.requestLogs.length} 次`,tone:`orange`}),(0,O.jsx)(Ft,{icon:we,label:`服务状态`,value:e.config?.status.loggedIn?`运行中`:`等待登录`,detail:`网关可转发请求`,tone:e.config?.status.loggedIn?`green`:`orange`}),(0,O.jsx)(Ft,{icon:ce,label:`默认模型`,value:e.config?.settings.defaultModel||`-`,detail:`未显式指定 model 时生效`,tone:`green`})]}),(0,O.jsxs)(`section`,{className:`overview-grid`,children:[(0,O.jsx)(Bt,{config:e.config,requestLogs:e.requestLogs,windowMinutes:t,onWindow:n}),(0,O.jsx)(Vt,{config:e.config})]})]})}var Ut=`# AI-Zero-Token Local Gateway Skill
10
+
11
+ ## Purpose
12
+
13
+ This skill tells the LLM how to integrate a webpage, local tool, or Vibe Coding project with the local AI-Zero-Token gateway.
14
+
15
+ AI-Zero-Token is a local-first personal AI gateway. It exposes OpenAI-style local HTTP APIs so that a frontend page, script, or local automation tool can call available ChatGPT / Codex account capabilities through a local endpoint.
16
+
17
+ Use this skill when the user wants to build:
18
+
19
+ - AI chat assistant
20
+ - text generation tool
21
+ - copywriting generator
22
+ - prompt generator
23
+ - image generation tool
24
+ - image editing / image-to-image tool
25
+ - poster generator
26
+ - product image generator
27
+ - social media cover generator
28
+ - icon or logo inspiration generator
29
+ - UI inspiration generator
30
+ - Vibe Coding webpage that needs AI capability
31
+ - local automation workflow that needs LLM or image generation
32
+
33
+ ---
34
+
35
+ ## Local Gateway Assumptions
36
+
37
+ Assume the user has already started AI-Zero-Token locally.
38
+
39
+ Default local management page:
40
+
41
+ \`\`\`text
42
+ http://127.0.0.1:8787
43
+ \`\`\`
44
+
45
+ OpenAI-compatible Base URL:
46
+
47
+ \`\`\`text
48
+ http://127.0.0.1:8787/v1
49
+ \`\`\`
50
+
51
+ When using OpenAI-compatible SDKs or API clients, set:
52
+
53
+ \`\`\`text
54
+ baseURL = "http://127.0.0.1:8787/v1"
55
+ apiKey = "local"
56
+ \`\`\`
57
+
58
+ The API key can be any non-empty placeholder string because the real authentication is handled by the local AI-Zero-Token gateway.
59
+
60
+ Do not ask the user to provide a real OpenAI API key unless the user explicitly wants to use the official OpenAI API instead of the local gateway.
61
+
62
+ ---
63
+
64
+ ## Startup Command Reference
65
+
66
+ If the generated project includes user instructions, mention the user can start AI-Zero-Token with:
67
+
68
+ \`\`\`bash
69
+ npx ai-zero-token start
70
+ \`\`\`
71
+
72
+ or install globally:
73
+
74
+ \`\`\`bash
75
+ npm install -g ai-zero-token
76
+ azt start
77
+ \`\`\`
78
+
79
+ After startup, the local management page is usually available at:
80
+
81
+ \`\`\`text
82
+ http://127.0.0.1:8787
83
+ \`\`\`
84
+
85
+ The OpenAI-compatible API Base URL is:
86
+
87
+ \`\`\`text
88
+ http://127.0.0.1:8787/v1
89
+ \`\`\`
90
+
91
+ If global npm installation fails with \`EACCES permission denied\`, recommend using:
92
+
93
+ \`\`\`bash
94
+ npx ai-zero-token start
95
+ \`\`\`
96
+
97
+ ---
98
+
99
+ ## Available Interfaces
100
+
101
+ ### 1. List Models
102
+
103
+ Use this endpoint when the app needs to show available models.
104
+
105
+ \`\`\`http
106
+ GET http://127.0.0.1:8787/v1/models
107
+ \`\`\`
108
+
109
+ Example JavaScript:
110
+
111
+ \`\`\`js
112
+ async function listModels() {
113
+ const res = await fetch("http://127.0.0.1:8787/v1/models", {
114
+ method: "GET",
115
+ headers: {
116
+ "Authorization": "Bearer local"
117
+ }
118
+ });
119
+
120
+ if (!res.ok) {
121
+ throw new Error(\`Failed to list models: \${res.status}\`);
122
+ }
123
+
124
+ return await res.json();
125
+ }
126
+ \`\`\`
127
+
128
+ ---
129
+
130
+ ### 2. Text / Reasoning / Coding Generation
131
+
132
+ Preferred endpoint:
133
+
134
+ \`\`\`http
135
+ POST http://127.0.0.1:8787/v1/responses
136
+ \`\`\`
137
+
138
+ Use this endpoint for:
139
+
140
+ - AI assistant replies
141
+ - text generation
142
+ - copywriting
143
+ - prompt optimization
144
+ - coding assistance
145
+ - reasoning tasks
146
+ - content rewriting
147
+ - document drafting
148
+
149
+ Default recommended model:
150
+
151
+ \`\`\`text
152
+ gpt-5.5
153
+ \`\`\`
154
+
155
+ If \`gpt-5.5\` is not available, allow the user or UI to switch models.
156
+
157
+ Example request:
158
+
159
+ \`\`\`js
160
+ async function generateText(input) {
161
+ const res = await fetch("http://127.0.0.1:8787/v1/responses", {
162
+ method: "POST",
163
+ headers: {
164
+ "Content-Type": "application/json",
165
+ "Authorization": "Bearer local"
166
+ },
167
+ body: JSON.stringify({
168
+ model: "gpt-5.5",
169
+ input
170
+ })
171
+ });
172
+
173
+ if (!res.ok) {
174
+ const errText = await res.text();
175
+ throw new Error(\`Text generation failed: \${res.status} \${errText}\`);
176
+ }
177
+
178
+ const data = await res.json();
179
+
180
+ return (
181
+ data.output_text ||
182
+ data.text ||
183
+ data.content ||
184
+ data.choices?.[0]?.message?.content ||
185
+ JSON.stringify(data, null, 2)
186
+ );
187
+ }
188
+ \`\`\`
189
+
190
+ When building a frontend app, show loading state while the request is pending and display a readable error message if the request fails.
191
+
192
+ ---
193
+
194
+ ### 3. Chat Completions Compatibility
195
+
196
+ Use this endpoint when the user asks for an OpenAI-compatible chat app or when a template already uses \`/v1/chat/completions\`.
197
+
198
+ \`\`\`http
199
+ POST http://127.0.0.1:8787/v1/chat/completions
200
+ \`\`\`
201
+
202
+ Example request:
203
+
204
+ \`\`\`js
205
+ async function chat(messages) {
206
+ const res = await fetch("http://127.0.0.1:8787/v1/chat/completions", {
207
+ method: "POST",
208
+ headers: {
209
+ "Content-Type": "application/json",
210
+ "Authorization": "Bearer local"
211
+ },
212
+ body: JSON.stringify({
213
+ model: "gpt-5.5",
214
+ messages
215
+ })
216
+ });
217
+
218
+ if (!res.ok) {
219
+ const errText = await res.text();
220
+ throw new Error(\`Chat completion failed: \${res.status} \${errText}\`);
221
+ }
222
+
223
+ const data = await res.json();
224
+
225
+ return (
226
+ data.choices?.[0]?.message?.content ||
227
+ data.output_text ||
228
+ JSON.stringify(data, null, 2)
229
+ );
230
+ }
231
+ \`\`\`
232
+
233
+ Use this for chat UI components, OpenAI-compatible templates, or existing chat SDK style code.
234
+
235
+ ---
236
+
237
+ ### 4. Image Generation
238
+
239
+ Use this endpoint when the user wants image generation.
240
+
241
+ \`\`\`http
242
+ POST http://127.0.0.1:8787/v1/images/generations
243
+ \`\`\`
244
+
245
+ Use this endpoint for:
246
+
247
+ - poster generation
248
+ - product image generation
249
+ - social media image generation
250
+ - cover image generation
251
+ - icon inspiration
252
+ - logo inspiration
253
+ - UI visual inspiration
254
+ - marketing image generation
255
+ - illustration generation
256
+
257
+ Default recommended image model:
258
+
259
+ \`\`\`text
260
+ gpt-image-2
261
+ \`\`\`
262
+
263
+ Example request:
264
+
265
+ \`\`\`js
266
+ async function generateImage(prompt, size = "1024x1024") {
267
+ const res = await fetch("http://127.0.0.1:8787/v1/images/generations", {
268
+ method: "POST",
269
+ headers: {
270
+ "Content-Type": "application/json",
271
+ "Authorization": "Bearer local"
272
+ },
273
+ body: JSON.stringify({
274
+ model: "gpt-image-2",
275
+ prompt,
276
+ size,
277
+ n: 1
278
+ })
279
+ });
280
+
281
+ if (!res.ok) {
282
+ const errText = await res.text();
283
+ throw new Error(\`Image generation failed: \${res.status} \${errText}\`);
284
+ }
285
+
286
+ const data = await res.json();
287
+
288
+ const image =
289
+ data.data?.[0]?.url ||
290
+ data.data?.[0]?.b64_json ||
291
+ data.output?.[0]?.url ||
292
+ data.url ||
293
+ data.image;
294
+
295
+ return {
296
+ raw: data,
297
+ image
298
+ };
299
+ }
300
+ \`\`\`
301
+
302
+ When displaying generated images:
303
+
304
+ - If the response contains a URL, use it directly as the \`src\`.
305
+ - If the response contains \`b64_json\`, convert it to a data URL:
306
+
307
+ \`\`\`js
308
+ const src = \`data:image/png;base64,\${b64_json}\`;
309
+ \`\`\`
310
+
311
+ - Always show the raw response in a collapsible debug panel if this is a prototype or developer-facing tool.
312
+ - Show a helpful error if no image URL or base64 data is found.
313
+
314
+ ---
315
+
316
+ ### 5. Image Editing / Image-to-Image
317
+
318
+ Use this endpoint when the user wants to edit an existing image or use one or more reference images.
319
+
320
+ \`\`\`http
321
+ POST http://127.0.0.1:8787/v1/images/edits
322
+ \`\`\`
323
+
324
+ AI-Zero-Token currently supports the JSON version of this endpoint. Use \`images[].image_url\` with either:
325
+
326
+ - an \`https://...\` image URL
327
+ - a \`data:image/...;base64,...\` data URL
328
+ - a bare base64 string, which the gateway treats as a PNG data URL
329
+
330
+ Do not use \`multipart/form-data\`, \`mask\`, or \`file_id\` unless the user explicitly says their installed AI-Zero-Token version supports them.
331
+
332
+ Example request:
333
+
334
+ \`\`\`js
335
+ async function editImage(prompt, imageUrlOrBase64, size = "1024x1024") {
336
+ const res = await fetch("http://127.0.0.1:8787/v1/images/edits", {
337
+ method: "POST",
338
+ headers: {
339
+ "Content-Type": "application/json",
340
+ "Authorization": "Bearer local"
341
+ },
342
+ body: JSON.stringify({
343
+ model: "gpt-image-2",
344
+ prompt,
345
+ images: [
346
+ {
347
+ image_url: imageUrlOrBase64
348
+ }
349
+ ],
350
+ size,
351
+ quality: "low",
352
+ response_format: "b64_json"
353
+ })
354
+ });
355
+
356
+ if (!res.ok) {
357
+ const errText = await res.text();
358
+ throw new Error(\`Image edit failed: \${res.status} \${errText}\`);
359
+ }
360
+
361
+ const data = await res.json();
362
+ const image = data.data?.[0]?.b64_json || data.data?.[0]?.url || data.image;
363
+
364
+ return {
365
+ raw: data,
366
+ image
367
+ };
368
+ }
369
+ \`\`\`
370
+
371
+ When building a frontend for image editing:
372
+
373
+ - Let the user paste an image URL.
374
+ - Optionally support local file upload by converting the file to a base64 data URL in the browser, then send it as \`images[].image_url\`.
375
+ - Show the edited image using \`data:image/png;base64,...\` when the response contains \`b64_json\`.
376
+ - Mention that mask/inpainting is not supported by this JSON integration yet.
377
+
378
+ ---
379
+
380
+ ## Frontend Integration Rules
381
+
382
+ When generating a web app that uses AI-Zero-Token:
383
+
384
+ 1. Use \`http://127.0.0.1:8787/v1\` as the default Base URL.
385
+ 2. Use \`local\` as the default API Key placeholder.
386
+ 3. Do not hardcode a real OpenAI API key.
387
+ 4. Provide editable fields for:
388
+ - Base URL
389
+ - text model name
390
+ - image model name
391
+ - prompt / input
392
+ 5. Use \`gpt-5.5\` as the default text model.
393
+ 6. Use \`gpt-image-2\` as the default image model.
394
+ 7. Add loading states.
395
+ 8. Add error display.
396
+ 9. Add a clear result area.
397
+ 10. Add a copy button for text outputs.
398
+ 11. Add an image preview area for image outputs.
399
+ 12. For image editing tools, accept either pasted image URLs or local files converted to base64 data URLs.
400
+ 13. Add a download button for generated or edited images when possible.
401
+ 14. Keep all calls client-side for local prototype projects unless the user asks for a backend.
402
+ 15. If the browser reports a CORS error, tell the user to check whether AI-Zero-Token is running and whether the gateway allows browser requests.
403
+
404
+ ---
405
+
406
+ ## Recommended UI Patterns
407
+
408
+ For a simple Vibe Coding webpage, create:
409
+
410
+ - A settings panel:
411
+ - Base URL
412
+ - Text model
413
+ - Image model
414
+ - A text generation panel:
415
+ - textarea for input
416
+ - button: Generate Text
417
+ - output area
418
+ - An image generation panel:
419
+ - textarea for prompt
420
+ - size selector
421
+ - button: Generate Image
422
+ - image preview area
423
+ - For image editing tools:
424
+ - image URL input or file picker
425
+ - textarea for edit instruction
426
+ - button: Edit Image
427
+ - before / after image preview
428
+ - A debug panel:
429
+ - raw JSON response
430
+ - error message
431
+
432
+ Use a clean layout that is easy for non-developers to understand.
433
+
434
+ ---
435
+
436
+ ## Default Models
437
+
438
+ Use these defaults unless the user says otherwise:
439
+
440
+ \`\`\`text
441
+ Text model: gpt-5.5
442
+ Image model: gpt-image-2
443
+ \`\`\`
444
+
445
+ If a model call fails, suggest:
446
+
447
+ 1. Check whether AI-Zero-Token is running.
448
+ 2. Open \`http://127.0.0.1:8787\`.
449
+ 3. Check whether the account is logged in.
450
+ 4. Check whether the current account supports the requested model.
451
+ 5. Try calling \`GET /v1/models\`.
452
+
453
+ ---
454
+
455
+ ## Example Prompt for Building a Vibe Coding Tool
456
+
457
+ When the user asks to build a webpage using this skill, generate something like:
458
+
459
+ \`\`\`text
460
+ Build a local AI tool webpage that connects to AI-Zero-Token.
461
+
462
+ Use:
463
+ Base URL: http://127.0.0.1:8787/v1
464
+ API Key: local
465
+
466
+ Features:
467
+ 1. A text input area for user requirements.
468
+ 2. A "Generate Text" button that calls POST /v1/responses with model gpt-5.5.
469
+ 3. A "Generate Image" button that calls POST /v1/images/generations with model gpt-image-2.
470
+ 4. If the tool needs image editing, call POST /v1/images/edits with images[].image_url.
471
+ 5. Show loading states.
472
+ 6. Show text output in a result panel.
473
+ 7. Show generated or edited image in an image preview panel.
474
+ 8. Provide a copy button for text.
475
+ 9. Provide a download button for image if possible.
476
+ 10. Show readable errors if the local gateway is not running.
477
+ 11. Keep the UI simple and friendly for designers.
478
+ \`\`\`
479
+
480
+ ---
481
+
482
+ ## Common Error Handling
483
+
484
+ ### Gateway not running
485
+
486
+ If request fails with network error, show:
487
+
488
+ \`\`\`text
489
+ AI-Zero-Token 本地网关未连接,请先运行 npx ai-zero-token start 或 azt start,然后访问 http://127.0.0.1:8787 检查状态。
490
+ \`\`\`
491
+
492
+ ### CORS error
493
+
494
+ If browser blocks the request, show:
495
+
496
+ \`\`\`text
497
+ 浏览器跨域请求失败,请确认 AI-Zero-Token 网关已开启浏览器访问支持,或改用本地代理 / 后端转发。
498
+ \`\`\`
499
+
500
+ ### Model unavailable
501
+
502
+ If the model is unavailable, show:
503
+
504
+ \`\`\`text
505
+ 当前账号可能不支持该模型,请打开 AI-Zero-Token 管理页检查账号状态和可用模型。
506
+ \`\`\`
507
+
508
+ ### Image result not found
509
+
510
+ If the image response does not contain \`url\` or \`b64_json\`, show:
511
+
512
+ \`\`\`text
513
+ 接口已返回,但没有找到可展示的图片地址或 base64 数据,请查看调试面板中的原始返回结果。
514
+ \`\`\`
515
+
516
+ ### Image edit unsupported input
517
+
518
+ If image editing fails because of unsupported input, show:
519
+
520
+ \`\`\`text
521
+ 当前 AI-Zero-Token 的图片编辑接口只支持 JSON 请求中的 image_url。请使用图片 URL,或把本地图片转换成 base64 data URL 后再提交。
522
+ \`\`\`
523
+
524
+ ### npm global install permission error
525
+
526
+ If the user gets an error like \`EACCES permission denied\` during global installation, suggest:
527
+
528
+ \`\`\`bash
529
+ npx ai-zero-token start
530
+ \`\`\`
531
+
532
+ or explain that global npm installation may require changing the npm global prefix or using a Node version manager.
533
+
534
+ ---
535
+
536
+ ## Important Boundaries
537
+
538
+ AI-Zero-Token is best for:
539
+
540
+ - personal experiments
541
+ - local prototypes
542
+ - Vibe Coding projects
543
+ - designer-facing demos
544
+ - learning local gateway integration
545
+ - low-cost local workflow validation
546
+
547
+ AI-Zero-Token management page can also manage local account state, including:
548
+
549
+ - login and import multiple Codex accounts
550
+ - switch the active gateway account
551
+ - export selected accounts
552
+ - apply a saved account to local Codex by updating \`~/.codex/auth.json\` with an automatic backup
553
+
554
+ AI-Zero-Token should not be described as:
555
+
556
+ - a production-grade API gateway
557
+ - an official OpenAI API replacement
558
+ - a commercial proxy platform
559
+ - a multi-user billing platform
560
+
561
+ For production systems, recommend official APIs or a properly managed backend gateway.
562
+
563
+ ---
564
+
565
+ ## Short Usage Instruction for Designers
566
+
567
+ Designers do not need to understand this skill document.
568
+
569
+ They can give this file to a Vibe Coding LLM and say:
570
+
571
+ \`\`\`text
572
+ 请根据这个 Skill,帮我做一个 AI 生图网页。
573
+ 要求:
574
+ 1. 输入一句图片需求;
575
+ 2. 点击按钮调用本地 AI-Zero-Token;
576
+ 3. 使用 gpt-image-2 生成图片;
577
+ 4. 图片生成后展示在页面中;
578
+ 5. 页面要好看,适合设计师使用。
579
+ \`\`\`
580
+
581
+ Or:
582
+
583
+ \`\`\`text
584
+ 请根据这个 Skill,帮我做一个 AI 文案 + 生图工具。
585
+ 左侧输入需求,右侧显示 GPT-5.5 生成的文案和 GPT-Image-2 生成的图片。
586
+ \`\`\`
587
+ `;function Wt({title:e,description:t,code:n,onCopy:r}){return(0,O.jsxs)(`section`,{className:`docs-snippet`,children:[(0,O.jsxs)(`div`,{className:`docs-snippet-head`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`strong`,{children:e}),(0,O.jsx)(`p`,{children:t})]}),(0,O.jsx)(`button`,{className:`btn-secondary icon-only`,type:`button`,onClick:r,title:`复制代码`,children:(0,O.jsx)(T,{size:16})})]}),(0,O.jsx)(`pre`,{children:(0,O.jsx)(`code`,{children:n})})]})}function Gt({config:e,onRoute:t,copyBaseUrl:n,setStatus:r}){let[i,a]=(0,_.useState)(`quick-start`),o=e?.baseUrl||`http://127.0.0.1:8787/v1`,s=`local`,c=`azt start`,l=Ut.split(/\r?\n/).length,u=(0,_.useMemo)(()=>({lines:Ut.split(/\r?\n/).length,codeBlocks:(`# AI-Zero-Token Local Gateway Skill
588
+
589
+ ## Purpose
590
+
591
+ This skill tells the LLM how to integrate a webpage, local tool, or Vibe Coding project with the local AI-Zero-Token gateway.
592
+
593
+ AI-Zero-Token is a local-first personal AI gateway. It exposes OpenAI-style local HTTP APIs so that a frontend page, script, or local automation tool can call available ChatGPT / Codex account capabilities through a local endpoint.
594
+
595
+ Use this skill when the user wants to build:
596
+
597
+ - AI chat assistant
598
+ - text generation tool
599
+ - copywriting generator
600
+ - prompt generator
601
+ - image generation tool
602
+ - image editing / image-to-image tool
603
+ - poster generator
604
+ - product image generator
605
+ - social media cover generator
606
+ - icon or logo inspiration generator
607
+ - UI inspiration generator
608
+ - Vibe Coding webpage that needs AI capability
609
+ - local automation workflow that needs LLM or image generation
610
+
611
+ ---
612
+
613
+ ## Local Gateway Assumptions
614
+
615
+ Assume the user has already started AI-Zero-Token locally.
616
+
617
+ Default local management page:
618
+
619
+ \`\`\`text
620
+ http://127.0.0.1:8787
621
+ \`\`\`
622
+
623
+ OpenAI-compatible Base URL:
624
+
625
+ \`\`\`text
626
+ http://127.0.0.1:8787/v1
627
+ \`\`\`
628
+
629
+ When using OpenAI-compatible SDKs or API clients, set:
630
+
631
+ \`\`\`text
632
+ baseURL = "http://127.0.0.1:8787/v1"
633
+ apiKey = "local"
634
+ \`\`\`
635
+
636
+ The API key can be any non-empty placeholder string because the real authentication is handled by the local AI-Zero-Token gateway.
637
+
638
+ Do not ask the user to provide a real OpenAI API key unless the user explicitly wants to use the official OpenAI API instead of the local gateway.
639
+
640
+ ---
641
+
642
+ ## Startup Command Reference
643
+
644
+ If the generated project includes user instructions, mention the user can start AI-Zero-Token with:
645
+
646
+ \`\`\`bash
647
+ npx ai-zero-token start
648
+ \`\`\`
649
+
650
+ or install globally:
651
+
652
+ \`\`\`bash
653
+ npm install -g ai-zero-token
654
+ azt start
655
+ \`\`\`
656
+
657
+ After startup, the local management page is usually available at:
658
+
659
+ \`\`\`text
660
+ http://127.0.0.1:8787
661
+ \`\`\`
662
+
663
+ The OpenAI-compatible API Base URL is:
664
+
665
+ \`\`\`text
666
+ http://127.0.0.1:8787/v1
667
+ \`\`\`
668
+
669
+ If global npm installation fails with \`EACCES permission denied\`, recommend using:
670
+
671
+ \`\`\`bash
672
+ npx ai-zero-token start
673
+ \`\`\`
674
+
675
+ ---
676
+
677
+ ## Available Interfaces
678
+
679
+ ### 1. List Models
680
+
681
+ Use this endpoint when the app needs to show available models.
682
+
683
+ \`\`\`http
684
+ GET http://127.0.0.1:8787/v1/models
685
+ \`\`\`
686
+
687
+ Example JavaScript:
688
+
689
+ \`\`\`js
690
+ async function listModels() {
691
+ const res = await fetch("http://127.0.0.1:8787/v1/models", {
692
+ method: "GET",
693
+ headers: {
694
+ "Authorization": "Bearer local"
695
+ }
696
+ });
697
+
698
+ if (!res.ok) {
699
+ throw new Error(\`Failed to list models: \${res.status}\`);
700
+ }
701
+
702
+ return await res.json();
703
+ }
704
+ \`\`\`
705
+
706
+ ---
707
+
708
+ ### 2. Text / Reasoning / Coding Generation
709
+
710
+ Preferred endpoint:
711
+
712
+ \`\`\`http
713
+ POST http://127.0.0.1:8787/v1/responses
714
+ \`\`\`
715
+
716
+ Use this endpoint for:
717
+
718
+ - AI assistant replies
719
+ - text generation
720
+ - copywriting
721
+ - prompt optimization
722
+ - coding assistance
723
+ - reasoning tasks
724
+ - content rewriting
725
+ - document drafting
726
+
727
+ Default recommended model:
728
+
729
+ \`\`\`text
730
+ gpt-5.5
731
+ \`\`\`
732
+
733
+ If \`gpt-5.5\` is not available, allow the user or UI to switch models.
734
+
735
+ Example request:
736
+
737
+ \`\`\`js
738
+ async function generateText(input) {
739
+ const res = await fetch("http://127.0.0.1:8787/v1/responses", {
740
+ method: "POST",
741
+ headers: {
742
+ "Content-Type": "application/json",
743
+ "Authorization": "Bearer local"
744
+ },
745
+ body: JSON.stringify({
746
+ model: "gpt-5.5",
747
+ input
748
+ })
749
+ });
750
+
751
+ if (!res.ok) {
752
+ const errText = await res.text();
753
+ throw new Error(\`Text generation failed: \${res.status} \${errText}\`);
754
+ }
755
+
756
+ const data = await res.json();
757
+
758
+ return (
759
+ data.output_text ||
760
+ data.text ||
761
+ data.content ||
762
+ data.choices?.[0]?.message?.content ||
763
+ JSON.stringify(data, null, 2)
764
+ );
765
+ }
766
+ \`\`\`
767
+
768
+ When building a frontend app, show loading state while the request is pending and display a readable error message if the request fails.
769
+
770
+ ---
771
+
772
+ ### 3. Chat Completions Compatibility
773
+
774
+ Use this endpoint when the user asks for an OpenAI-compatible chat app or when a template already uses \`/v1/chat/completions\`.
775
+
776
+ \`\`\`http
777
+ POST http://127.0.0.1:8787/v1/chat/completions
778
+ \`\`\`
779
+
780
+ Example request:
781
+
782
+ \`\`\`js
783
+ async function chat(messages) {
784
+ const res = await fetch("http://127.0.0.1:8787/v1/chat/completions", {
785
+ method: "POST",
786
+ headers: {
787
+ "Content-Type": "application/json",
788
+ "Authorization": "Bearer local"
789
+ },
790
+ body: JSON.stringify({
791
+ model: "gpt-5.5",
792
+ messages
793
+ })
794
+ });
795
+
796
+ if (!res.ok) {
797
+ const errText = await res.text();
798
+ throw new Error(\`Chat completion failed: \${res.status} \${errText}\`);
799
+ }
800
+
801
+ const data = await res.json();
802
+
803
+ return (
804
+ data.choices?.[0]?.message?.content ||
805
+ data.output_text ||
806
+ JSON.stringify(data, null, 2)
807
+ );
808
+ }
809
+ \`\`\`
810
+
811
+ Use this for chat UI components, OpenAI-compatible templates, or existing chat SDK style code.
812
+
813
+ ---
814
+
815
+ ### 4. Image Generation
816
+
817
+ Use this endpoint when the user wants image generation.
818
+
819
+ \`\`\`http
820
+ POST http://127.0.0.1:8787/v1/images/generations
821
+ \`\`\`
822
+
823
+ Use this endpoint for:
824
+
825
+ - poster generation
826
+ - product image generation
827
+ - social media image generation
828
+ - cover image generation
829
+ - icon inspiration
830
+ - logo inspiration
831
+ - UI visual inspiration
832
+ - marketing image generation
833
+ - illustration generation
834
+
835
+ Default recommended image model:
836
+
837
+ \`\`\`text
838
+ gpt-image-2
839
+ \`\`\`
840
+
841
+ Example request:
842
+
843
+ \`\`\`js
844
+ async function generateImage(prompt, size = "1024x1024") {
845
+ const res = await fetch("http://127.0.0.1:8787/v1/images/generations", {
846
+ method: "POST",
847
+ headers: {
848
+ "Content-Type": "application/json",
849
+ "Authorization": "Bearer local"
850
+ },
851
+ body: JSON.stringify({
852
+ model: "gpt-image-2",
853
+ prompt,
854
+ size,
855
+ n: 1
856
+ })
857
+ });
858
+
859
+ if (!res.ok) {
860
+ const errText = await res.text();
861
+ throw new Error(\`Image generation failed: \${res.status} \${errText}\`);
862
+ }
863
+
864
+ const data = await res.json();
865
+
866
+ const image =
867
+ data.data?.[0]?.url ||
868
+ data.data?.[0]?.b64_json ||
869
+ data.output?.[0]?.url ||
870
+ data.url ||
871
+ data.image;
872
+
873
+ return {
874
+ raw: data,
875
+ image
876
+ };
877
+ }
878
+ \`\`\`
879
+
880
+ When displaying generated images:
881
+
882
+ - If the response contains a URL, use it directly as the \`src\`.
883
+ - If the response contains \`b64_json\`, convert it to a data URL:
884
+
885
+ \`\`\`js
886
+ const src = \`data:image/png;base64,\${b64_json}\`;
887
+ \`\`\`
888
+
889
+ - Always show the raw response in a collapsible debug panel if this is a prototype or developer-facing tool.
890
+ - Show a helpful error if no image URL or base64 data is found.
891
+
892
+ ---
893
+
894
+ ### 5. Image Editing / Image-to-Image
895
+
896
+ Use this endpoint when the user wants to edit an existing image or use one or more reference images.
897
+
898
+ \`\`\`http
899
+ POST http://127.0.0.1:8787/v1/images/edits
900
+ \`\`\`
901
+
902
+ AI-Zero-Token currently supports the JSON version of this endpoint. Use \`images[].image_url\` with either:
903
+
904
+ - an \`https://...\` image URL
905
+ - a \`data:image/...;base64,...\` data URL
906
+ - a bare base64 string, which the gateway treats as a PNG data URL
907
+
908
+ Do not use \`multipart/form-data\`, \`mask\`, or \`file_id\` unless the user explicitly says their installed AI-Zero-Token version supports them.
909
+
910
+ Example request:
911
+
912
+ \`\`\`js
913
+ async function editImage(prompt, imageUrlOrBase64, size = "1024x1024") {
914
+ const res = await fetch("http://127.0.0.1:8787/v1/images/edits", {
915
+ method: "POST",
916
+ headers: {
917
+ "Content-Type": "application/json",
918
+ "Authorization": "Bearer local"
919
+ },
920
+ body: JSON.stringify({
921
+ model: "gpt-image-2",
922
+ prompt,
923
+ images: [
924
+ {
925
+ image_url: imageUrlOrBase64
926
+ }
927
+ ],
928
+ size,
929
+ quality: "low",
930
+ response_format: "b64_json"
931
+ })
932
+ });
933
+
934
+ if (!res.ok) {
935
+ const errText = await res.text();
936
+ throw new Error(\`Image edit failed: \${res.status} \${errText}\`);
937
+ }
938
+
939
+ const data = await res.json();
940
+ const image = data.data?.[0]?.b64_json || data.data?.[0]?.url || data.image;
941
+
942
+ return {
943
+ raw: data,
944
+ image
945
+ };
946
+ }
947
+ \`\`\`
948
+
949
+ When building a frontend for image editing:
950
+
951
+ - Let the user paste an image URL.
952
+ - Optionally support local file upload by converting the file to a base64 data URL in the browser, then send it as \`images[].image_url\`.
953
+ - Show the edited image using \`data:image/png;base64,...\` when the response contains \`b64_json\`.
954
+ - Mention that mask/inpainting is not supported by this JSON integration yet.
955
+
956
+ ---
957
+
958
+ ## Frontend Integration Rules
959
+
960
+ When generating a web app that uses AI-Zero-Token:
961
+
962
+ 1. Use \`http://127.0.0.1:8787/v1\` as the default Base URL.
963
+ 2. Use \`local\` as the default API Key placeholder.
964
+ 3. Do not hardcode a real OpenAI API key.
965
+ 4. Provide editable fields for:
966
+ - Base URL
967
+ - text model name
968
+ - image model name
969
+ - prompt / input
970
+ 5. Use \`gpt-5.5\` as the default text model.
971
+ 6. Use \`gpt-image-2\` as the default image model.
972
+ 7. Add loading states.
973
+ 8. Add error display.
974
+ 9. Add a clear result area.
975
+ 10. Add a copy button for text outputs.
976
+ 11. Add an image preview area for image outputs.
977
+ 12. For image editing tools, accept either pasted image URLs or local files converted to base64 data URLs.
978
+ 13. Add a download button for generated or edited images when possible.
979
+ 14. Keep all calls client-side for local prototype projects unless the user asks for a backend.
980
+ 15. If the browser reports a CORS error, tell the user to check whether AI-Zero-Token is running and whether the gateway allows browser requests.
981
+
982
+ ---
983
+
984
+ ## Recommended UI Patterns
985
+
986
+ For a simple Vibe Coding webpage, create:
987
+
988
+ - A settings panel:
989
+ - Base URL
990
+ - Text model
991
+ - Image model
992
+ - A text generation panel:
993
+ - textarea for input
994
+ - button: Generate Text
995
+ - output area
996
+ - An image generation panel:
997
+ - textarea for prompt
998
+ - size selector
999
+ - button: Generate Image
1000
+ - image preview area
1001
+ - For image editing tools:
1002
+ - image URL input or file picker
1003
+ - textarea for edit instruction
1004
+ - button: Edit Image
1005
+ - before / after image preview
1006
+ - A debug panel:
1007
+ - raw JSON response
1008
+ - error message
1009
+
1010
+ Use a clean layout that is easy for non-developers to understand.
1011
+
1012
+ ---
1013
+
1014
+ ## Default Models
1015
+
1016
+ Use these defaults unless the user says otherwise:
1017
+
1018
+ \`\`\`text
1019
+ Text model: gpt-5.5
1020
+ Image model: gpt-image-2
1021
+ \`\`\`
1022
+
1023
+ If a model call fails, suggest:
1024
+
1025
+ 1. Check whether AI-Zero-Token is running.
1026
+ 2. Open \`http://127.0.0.1:8787\`.
1027
+ 3. Check whether the account is logged in.
1028
+ 4. Check whether the current account supports the requested model.
1029
+ 5. Try calling \`GET /v1/models\`.
1030
+
1031
+ ---
1032
+
1033
+ ## Example Prompt for Building a Vibe Coding Tool
1034
+
1035
+ When the user asks to build a webpage using this skill, generate something like:
1036
+
1037
+ \`\`\`text
1038
+ Build a local AI tool webpage that connects to AI-Zero-Token.
1039
+
1040
+ Use:
1041
+ Base URL: http://127.0.0.1:8787/v1
1042
+ API Key: local
1043
+
1044
+ Features:
1045
+ 1. A text input area for user requirements.
1046
+ 2. A "Generate Text" button that calls POST /v1/responses with model gpt-5.5.
1047
+ 3. A "Generate Image" button that calls POST /v1/images/generations with model gpt-image-2.
1048
+ 4. If the tool needs image editing, call POST /v1/images/edits with images[].image_url.
1049
+ 5. Show loading states.
1050
+ 6. Show text output in a result panel.
1051
+ 7. Show generated or edited image in an image preview panel.
1052
+ 8. Provide a copy button for text.
1053
+ 9. Provide a download button for image if possible.
1054
+ 10. Show readable errors if the local gateway is not running.
1055
+ 11. Keep the UI simple and friendly for designers.
1056
+ \`\`\`
1057
+
1058
+ ---
1059
+
1060
+ ## Common Error Handling
1061
+
1062
+ ### Gateway not running
1063
+
1064
+ If request fails with network error, show:
1065
+
1066
+ \`\`\`text
1067
+ AI-Zero-Token 本地网关未连接,请先运行 npx ai-zero-token start 或 azt start,然后访问 http://127.0.0.1:8787 检查状态。
1068
+ \`\`\`
1069
+
1070
+ ### CORS error
1071
+
1072
+ If browser blocks the request, show:
1073
+
1074
+ \`\`\`text
1075
+ 浏览器跨域请求失败,请确认 AI-Zero-Token 网关已开启浏览器访问支持,或改用本地代理 / 后端转发。
1076
+ \`\`\`
1077
+
1078
+ ### Model unavailable
1079
+
1080
+ If the model is unavailable, show:
1081
+
1082
+ \`\`\`text
1083
+ 当前账号可能不支持该模型,请打开 AI-Zero-Token 管理页检查账号状态和可用模型。
1084
+ \`\`\`
1085
+
1086
+ ### Image result not found
1087
+
1088
+ If the image response does not contain \`url\` or \`b64_json\`, show:
1089
+
1090
+ \`\`\`text
1091
+ 接口已返回,但没有找到可展示的图片地址或 base64 数据,请查看调试面板中的原始返回结果。
1092
+ \`\`\`
1093
+
1094
+ ### Image edit unsupported input
1095
+
1096
+ If image editing fails because of unsupported input, show:
1097
+
1098
+ \`\`\`text
1099
+ 当前 AI-Zero-Token 的图片编辑接口只支持 JSON 请求中的 image_url。请使用图片 URL,或把本地图片转换成 base64 data URL 后再提交。
1100
+ \`\`\`
1101
+
1102
+ ### npm global install permission error
1103
+
1104
+ If the user gets an error like \`EACCES permission denied\` during global installation, suggest:
1105
+
1106
+ \`\`\`bash
1107
+ npx ai-zero-token start
1108
+ \`\`\`
1109
+
1110
+ or explain that global npm installation may require changing the npm global prefix or using a Node version manager.
1111
+
1112
+ ---
1113
+
1114
+ ## Important Boundaries
1115
+
1116
+ AI-Zero-Token is best for:
1117
+
1118
+ - personal experiments
1119
+ - local prototypes
1120
+ - Vibe Coding projects
1121
+ - designer-facing demos
1122
+ - learning local gateway integration
1123
+ - low-cost local workflow validation
1124
+
1125
+ AI-Zero-Token management page can also manage local account state, including:
1126
+
1127
+ - login and import multiple Codex accounts
1128
+ - switch the active gateway account
1129
+ - export selected accounts
1130
+ - apply a saved account to local Codex by updating \`~/.codex/auth.json\` with an automatic backup
1131
+
1132
+ AI-Zero-Token should not be described as:
1133
+
1134
+ - a production-grade API gateway
1135
+ - an official OpenAI API replacement
1136
+ - a commercial proxy platform
1137
+ - a multi-user billing platform
1138
+
1139
+ For production systems, recommend official APIs or a properly managed backend gateway.
1140
+
1141
+ ---
1142
+
1143
+ ## Short Usage Instruction for Designers
1144
+
1145
+ Designers do not need to understand this skill document.
1146
+
1147
+ They can give this file to a Vibe Coding LLM and say:
1148
+
1149
+ \`\`\`text
1150
+ 请根据这个 Skill,帮我做一个 AI 生图网页。
1151
+ 要求:
1152
+ 1. 输入一句图片需求;
1153
+ 2. 点击按钮调用本地 AI-Zero-Token;
1154
+ 3. 使用 gpt-image-2 生成图片;
1155
+ 4. 图片生成后展示在页面中;
1156
+ 5. 页面要好看,适合设计师使用。
1157
+ \`\`\`
1158
+
1159
+ Or:
1160
+
1161
+ \`\`\`text
1162
+ 请根据这个 Skill,帮我做一个 AI 文案 + 生图工具。
1163
+ 左侧输入需求,右侧显示 GPT-5.5 生成的文案和 GPT-Image-2 生成的图片。
1164
+ \`\`\`
1165
+ `.match(/```/g)?.length||0)/2,headings:Ut.split(/\r?\n/).filter(e=>/^#{1,6}\s+/.test(e)).length}),[]),d=[{label:`用途`,value:`本地网关接入说明`},{label:`接入参数`,value:`baseURL + apiKey = ${o} / ${s}`},{label:`启动命令`,value:`azt start / npx ai-zero-token start`},{label:`常用接口`,value:`/v1/models · /v1/responses · /v1/chat/completions · /v1/images/generations`}],f=`baseURL = "${o}"\napiKey = "${s}"`,p=`import OpenAI from "openai";\n\nconst client = new OpenAI({\n apiKey: "${s}",\n baseURL: "${o}",\n});`,m=`curl ${o}/chat/completions \\\n -H "Content-Type: application/json" \\\n -d '{\n "model": "${e?.settings.defaultModel||`gpt-5.4`}",\n "messages": [{ "role": "user", "content": "Reply with OK only." }]\n }'`,h=`curl ${o}/responses \\\n -H "Content-Type: application/json" \\\n -d '{\n "model": "${e?.settings.defaultModel||`gpt-5.4`}",\n "input": "Reply with OK only."\n }'`;async function g(){r(await yt(`# AI-Zero-Token Local Gateway Skill
1166
+
1167
+ ## Purpose
1168
+
1169
+ This skill tells the LLM how to integrate a webpage, local tool, or Vibe Coding project with the local AI-Zero-Token gateway.
1170
+
1171
+ AI-Zero-Token is a local-first personal AI gateway. It exposes OpenAI-style local HTTP APIs so that a frontend page, script, or local automation tool can call available ChatGPT / Codex account capabilities through a local endpoint.
1172
+
1173
+ Use this skill when the user wants to build:
1174
+
1175
+ - AI chat assistant
1176
+ - text generation tool
1177
+ - copywriting generator
1178
+ - prompt generator
1179
+ - image generation tool
1180
+ - image editing / image-to-image tool
1181
+ - poster generator
1182
+ - product image generator
1183
+ - social media cover generator
1184
+ - icon or logo inspiration generator
1185
+ - UI inspiration generator
1186
+ - Vibe Coding webpage that needs AI capability
1187
+ - local automation workflow that needs LLM or image generation
1188
+
1189
+ ---
1190
+
1191
+ ## Local Gateway Assumptions
1192
+
1193
+ Assume the user has already started AI-Zero-Token locally.
1194
+
1195
+ Default local management page:
1196
+
1197
+ \`\`\`text
1198
+ http://127.0.0.1:8787
1199
+ \`\`\`
1200
+
1201
+ OpenAI-compatible Base URL:
1202
+
1203
+ \`\`\`text
1204
+ http://127.0.0.1:8787/v1
1205
+ \`\`\`
1206
+
1207
+ When using OpenAI-compatible SDKs or API clients, set:
1208
+
1209
+ \`\`\`text
1210
+ baseURL = "http://127.0.0.1:8787/v1"
1211
+ apiKey = "local"
1212
+ \`\`\`
1213
+
1214
+ The API key can be any non-empty placeholder string because the real authentication is handled by the local AI-Zero-Token gateway.
1215
+
1216
+ Do not ask the user to provide a real OpenAI API key unless the user explicitly wants to use the official OpenAI API instead of the local gateway.
1217
+
1218
+ ---
1219
+
1220
+ ## Startup Command Reference
1221
+
1222
+ If the generated project includes user instructions, mention the user can start AI-Zero-Token with:
1223
+
1224
+ \`\`\`bash
1225
+ npx ai-zero-token start
1226
+ \`\`\`
1227
+
1228
+ or install globally:
1229
+
1230
+ \`\`\`bash
1231
+ npm install -g ai-zero-token
1232
+ azt start
1233
+ \`\`\`
1234
+
1235
+ After startup, the local management page is usually available at:
1236
+
1237
+ \`\`\`text
1238
+ http://127.0.0.1:8787
1239
+ \`\`\`
1240
+
1241
+ The OpenAI-compatible API Base URL is:
1242
+
1243
+ \`\`\`text
1244
+ http://127.0.0.1:8787/v1
1245
+ \`\`\`
1246
+
1247
+ If global npm installation fails with \`EACCES permission denied\`, recommend using:
1248
+
1249
+ \`\`\`bash
1250
+ npx ai-zero-token start
1251
+ \`\`\`
1252
+
1253
+ ---
1254
+
1255
+ ## Available Interfaces
1256
+
1257
+ ### 1. List Models
1258
+
1259
+ Use this endpoint when the app needs to show available models.
1260
+
1261
+ \`\`\`http
1262
+ GET http://127.0.0.1:8787/v1/models
1263
+ \`\`\`
1264
+
1265
+ Example JavaScript:
1266
+
1267
+ \`\`\`js
1268
+ async function listModels() {
1269
+ const res = await fetch("http://127.0.0.1:8787/v1/models", {
1270
+ method: "GET",
1271
+ headers: {
1272
+ "Authorization": "Bearer local"
1273
+ }
1274
+ });
1275
+
1276
+ if (!res.ok) {
1277
+ throw new Error(\`Failed to list models: \${res.status}\`);
1278
+ }
1279
+
1280
+ return await res.json();
1281
+ }
1282
+ \`\`\`
1283
+
1284
+ ---
1285
+
1286
+ ### 2. Text / Reasoning / Coding Generation
1287
+
1288
+ Preferred endpoint:
1289
+
1290
+ \`\`\`http
1291
+ POST http://127.0.0.1:8787/v1/responses
1292
+ \`\`\`
1293
+
1294
+ Use this endpoint for:
1295
+
1296
+ - AI assistant replies
1297
+ - text generation
1298
+ - copywriting
1299
+ - prompt optimization
1300
+ - coding assistance
1301
+ - reasoning tasks
1302
+ - content rewriting
1303
+ - document drafting
1304
+
1305
+ Default recommended model:
1306
+
1307
+ \`\`\`text
1308
+ gpt-5.5
1309
+ \`\`\`
1310
+
1311
+ If \`gpt-5.5\` is not available, allow the user or UI to switch models.
1312
+
1313
+ Example request:
1314
+
1315
+ \`\`\`js
1316
+ async function generateText(input) {
1317
+ const res = await fetch("http://127.0.0.1:8787/v1/responses", {
1318
+ method: "POST",
1319
+ headers: {
1320
+ "Content-Type": "application/json",
1321
+ "Authorization": "Bearer local"
1322
+ },
1323
+ body: JSON.stringify({
1324
+ model: "gpt-5.5",
1325
+ input
1326
+ })
1327
+ });
1328
+
1329
+ if (!res.ok) {
1330
+ const errText = await res.text();
1331
+ throw new Error(\`Text generation failed: \${res.status} \${errText}\`);
1332
+ }
1333
+
1334
+ const data = await res.json();
1335
+
1336
+ return (
1337
+ data.output_text ||
1338
+ data.text ||
1339
+ data.content ||
1340
+ data.choices?.[0]?.message?.content ||
1341
+ JSON.stringify(data, null, 2)
1342
+ );
1343
+ }
1344
+ \`\`\`
1345
+
1346
+ When building a frontend app, show loading state while the request is pending and display a readable error message if the request fails.
1347
+
1348
+ ---
1349
+
1350
+ ### 3. Chat Completions Compatibility
1351
+
1352
+ Use this endpoint when the user asks for an OpenAI-compatible chat app or when a template already uses \`/v1/chat/completions\`.
1353
+
1354
+ \`\`\`http
1355
+ POST http://127.0.0.1:8787/v1/chat/completions
1356
+ \`\`\`
1357
+
1358
+ Example request:
1359
+
1360
+ \`\`\`js
1361
+ async function chat(messages) {
1362
+ const res = await fetch("http://127.0.0.1:8787/v1/chat/completions", {
1363
+ method: "POST",
1364
+ headers: {
1365
+ "Content-Type": "application/json",
1366
+ "Authorization": "Bearer local"
1367
+ },
1368
+ body: JSON.stringify({
1369
+ model: "gpt-5.5",
1370
+ messages
1371
+ })
1372
+ });
1373
+
1374
+ if (!res.ok) {
1375
+ const errText = await res.text();
1376
+ throw new Error(\`Chat completion failed: \${res.status} \${errText}\`);
1377
+ }
1378
+
1379
+ const data = await res.json();
1380
+
1381
+ return (
1382
+ data.choices?.[0]?.message?.content ||
1383
+ data.output_text ||
1384
+ JSON.stringify(data, null, 2)
1385
+ );
1386
+ }
1387
+ \`\`\`
1388
+
1389
+ Use this for chat UI components, OpenAI-compatible templates, or existing chat SDK style code.
1390
+
1391
+ ---
1392
+
1393
+ ### 4. Image Generation
1394
+
1395
+ Use this endpoint when the user wants image generation.
1396
+
1397
+ \`\`\`http
1398
+ POST http://127.0.0.1:8787/v1/images/generations
1399
+ \`\`\`
1400
+
1401
+ Use this endpoint for:
1402
+
1403
+ - poster generation
1404
+ - product image generation
1405
+ - social media image generation
1406
+ - cover image generation
1407
+ - icon inspiration
1408
+ - logo inspiration
1409
+ - UI visual inspiration
1410
+ - marketing image generation
1411
+ - illustration generation
1412
+
1413
+ Default recommended image model:
1414
+
1415
+ \`\`\`text
1416
+ gpt-image-2
1417
+ \`\`\`
1418
+
1419
+ Example request:
1420
+
1421
+ \`\`\`js
1422
+ async function generateImage(prompt, size = "1024x1024") {
1423
+ const res = await fetch("http://127.0.0.1:8787/v1/images/generations", {
1424
+ method: "POST",
1425
+ headers: {
1426
+ "Content-Type": "application/json",
1427
+ "Authorization": "Bearer local"
1428
+ },
1429
+ body: JSON.stringify({
1430
+ model: "gpt-image-2",
1431
+ prompt,
1432
+ size,
1433
+ n: 1
1434
+ })
1435
+ });
1436
+
1437
+ if (!res.ok) {
1438
+ const errText = await res.text();
1439
+ throw new Error(\`Image generation failed: \${res.status} \${errText}\`);
1440
+ }
1441
+
1442
+ const data = await res.json();
1443
+
1444
+ const image =
1445
+ data.data?.[0]?.url ||
1446
+ data.data?.[0]?.b64_json ||
1447
+ data.output?.[0]?.url ||
1448
+ data.url ||
1449
+ data.image;
1450
+
1451
+ return {
1452
+ raw: data,
1453
+ image
1454
+ };
1455
+ }
1456
+ \`\`\`
1457
+
1458
+ When displaying generated images:
1459
+
1460
+ - If the response contains a URL, use it directly as the \`src\`.
1461
+ - If the response contains \`b64_json\`, convert it to a data URL:
1462
+
1463
+ \`\`\`js
1464
+ const src = \`data:image/png;base64,\${b64_json}\`;
1465
+ \`\`\`
1466
+
1467
+ - Always show the raw response in a collapsible debug panel if this is a prototype or developer-facing tool.
1468
+ - Show a helpful error if no image URL or base64 data is found.
1469
+
1470
+ ---
1471
+
1472
+ ### 5. Image Editing / Image-to-Image
1473
+
1474
+ Use this endpoint when the user wants to edit an existing image or use one or more reference images.
1475
+
1476
+ \`\`\`http
1477
+ POST http://127.0.0.1:8787/v1/images/edits
1478
+ \`\`\`
1479
+
1480
+ AI-Zero-Token currently supports the JSON version of this endpoint. Use \`images[].image_url\` with either:
1481
+
1482
+ - an \`https://...\` image URL
1483
+ - a \`data:image/...;base64,...\` data URL
1484
+ - a bare base64 string, which the gateway treats as a PNG data URL
1485
+
1486
+ Do not use \`multipart/form-data\`, \`mask\`, or \`file_id\` unless the user explicitly says their installed AI-Zero-Token version supports them.
1487
+
1488
+ Example request:
1489
+
1490
+ \`\`\`js
1491
+ async function editImage(prompt, imageUrlOrBase64, size = "1024x1024") {
1492
+ const res = await fetch("http://127.0.0.1:8787/v1/images/edits", {
1493
+ method: "POST",
1494
+ headers: {
1495
+ "Content-Type": "application/json",
1496
+ "Authorization": "Bearer local"
1497
+ },
1498
+ body: JSON.stringify({
1499
+ model: "gpt-image-2",
1500
+ prompt,
1501
+ images: [
1502
+ {
1503
+ image_url: imageUrlOrBase64
1504
+ }
1505
+ ],
1506
+ size,
1507
+ quality: "low",
1508
+ response_format: "b64_json"
1509
+ })
1510
+ });
1511
+
1512
+ if (!res.ok) {
1513
+ const errText = await res.text();
1514
+ throw new Error(\`Image edit failed: \${res.status} \${errText}\`);
1515
+ }
1516
+
1517
+ const data = await res.json();
1518
+ const image = data.data?.[0]?.b64_json || data.data?.[0]?.url || data.image;
1519
+
1520
+ return {
1521
+ raw: data,
1522
+ image
1523
+ };
1524
+ }
1525
+ \`\`\`
1526
+
1527
+ When building a frontend for image editing:
1528
+
1529
+ - Let the user paste an image URL.
1530
+ - Optionally support local file upload by converting the file to a base64 data URL in the browser, then send it as \`images[].image_url\`.
1531
+ - Show the edited image using \`data:image/png;base64,...\` when the response contains \`b64_json\`.
1532
+ - Mention that mask/inpainting is not supported by this JSON integration yet.
1533
+
1534
+ ---
1535
+
1536
+ ## Frontend Integration Rules
1537
+
1538
+ When generating a web app that uses AI-Zero-Token:
1539
+
1540
+ 1. Use \`http://127.0.0.1:8787/v1\` as the default Base URL.
1541
+ 2. Use \`local\` as the default API Key placeholder.
1542
+ 3. Do not hardcode a real OpenAI API key.
1543
+ 4. Provide editable fields for:
1544
+ - Base URL
1545
+ - text model name
1546
+ - image model name
1547
+ - prompt / input
1548
+ 5. Use \`gpt-5.5\` as the default text model.
1549
+ 6. Use \`gpt-image-2\` as the default image model.
1550
+ 7. Add loading states.
1551
+ 8. Add error display.
1552
+ 9. Add a clear result area.
1553
+ 10. Add a copy button for text outputs.
1554
+ 11. Add an image preview area for image outputs.
1555
+ 12. For image editing tools, accept either pasted image URLs or local files converted to base64 data URLs.
1556
+ 13. Add a download button for generated or edited images when possible.
1557
+ 14. Keep all calls client-side for local prototype projects unless the user asks for a backend.
1558
+ 15. If the browser reports a CORS error, tell the user to check whether AI-Zero-Token is running and whether the gateway allows browser requests.
1559
+
1560
+ ---
1561
+
1562
+ ## Recommended UI Patterns
1563
+
1564
+ For a simple Vibe Coding webpage, create:
1565
+
1566
+ - A settings panel:
1567
+ - Base URL
1568
+ - Text model
1569
+ - Image model
1570
+ - A text generation panel:
1571
+ - textarea for input
1572
+ - button: Generate Text
1573
+ - output area
1574
+ - An image generation panel:
1575
+ - textarea for prompt
1576
+ - size selector
1577
+ - button: Generate Image
1578
+ - image preview area
1579
+ - For image editing tools:
1580
+ - image URL input or file picker
1581
+ - textarea for edit instruction
1582
+ - button: Edit Image
1583
+ - before / after image preview
1584
+ - A debug panel:
1585
+ - raw JSON response
1586
+ - error message
1587
+
1588
+ Use a clean layout that is easy for non-developers to understand.
1589
+
1590
+ ---
1591
+
1592
+ ## Default Models
1593
+
1594
+ Use these defaults unless the user says otherwise:
1595
+
1596
+ \`\`\`text
1597
+ Text model: gpt-5.5
1598
+ Image model: gpt-image-2
1599
+ \`\`\`
1600
+
1601
+ If a model call fails, suggest:
1602
+
1603
+ 1. Check whether AI-Zero-Token is running.
1604
+ 2. Open \`http://127.0.0.1:8787\`.
1605
+ 3. Check whether the account is logged in.
1606
+ 4. Check whether the current account supports the requested model.
1607
+ 5. Try calling \`GET /v1/models\`.
1608
+
1609
+ ---
1610
+
1611
+ ## Example Prompt for Building a Vibe Coding Tool
1612
+
1613
+ When the user asks to build a webpage using this skill, generate something like:
1614
+
1615
+ \`\`\`text
1616
+ Build a local AI tool webpage that connects to AI-Zero-Token.
1617
+
1618
+ Use:
1619
+ Base URL: http://127.0.0.1:8787/v1
1620
+ API Key: local
1621
+
1622
+ Features:
1623
+ 1. A text input area for user requirements.
1624
+ 2. A "Generate Text" button that calls POST /v1/responses with model gpt-5.5.
1625
+ 3. A "Generate Image" button that calls POST /v1/images/generations with model gpt-image-2.
1626
+ 4. If the tool needs image editing, call POST /v1/images/edits with images[].image_url.
1627
+ 5. Show loading states.
1628
+ 6. Show text output in a result panel.
1629
+ 7. Show generated or edited image in an image preview panel.
1630
+ 8. Provide a copy button for text.
1631
+ 9. Provide a download button for image if possible.
1632
+ 10. Show readable errors if the local gateway is not running.
1633
+ 11. Keep the UI simple and friendly for designers.
1634
+ \`\`\`
1635
+
1636
+ ---
1637
+
1638
+ ## Common Error Handling
1639
+
1640
+ ### Gateway not running
1641
+
1642
+ If request fails with network error, show:
1643
+
1644
+ \`\`\`text
1645
+ AI-Zero-Token 本地网关未连接,请先运行 npx ai-zero-token start 或 azt start,然后访问 http://127.0.0.1:8787 检查状态。
1646
+ \`\`\`
1647
+
1648
+ ### CORS error
1649
+
1650
+ If browser blocks the request, show:
1651
+
1652
+ \`\`\`text
1653
+ 浏览器跨域请求失败,请确认 AI-Zero-Token 网关已开启浏览器访问支持,或改用本地代理 / 后端转发。
1654
+ \`\`\`
1655
+
1656
+ ### Model unavailable
1657
+
1658
+ If the model is unavailable, show:
1659
+
1660
+ \`\`\`text
1661
+ 当前账号可能不支持该模型,请打开 AI-Zero-Token 管理页检查账号状态和可用模型。
1662
+ \`\`\`
1663
+
1664
+ ### Image result not found
1665
+
1666
+ If the image response does not contain \`url\` or \`b64_json\`, show:
1667
+
1668
+ \`\`\`text
1669
+ 接口已返回,但没有找到可展示的图片地址或 base64 数据,请查看调试面板中的原始返回结果。
1670
+ \`\`\`
1671
+
1672
+ ### Image edit unsupported input
1673
+
1674
+ If image editing fails because of unsupported input, show:
1675
+
1676
+ \`\`\`text
1677
+ 当前 AI-Zero-Token 的图片编辑接口只支持 JSON 请求中的 image_url。请使用图片 URL,或把本地图片转换成 base64 data URL 后再提交。
1678
+ \`\`\`
1679
+
1680
+ ### npm global install permission error
1681
+
1682
+ If the user gets an error like \`EACCES permission denied\` during global installation, suggest:
1683
+
1684
+ \`\`\`bash
1685
+ npx ai-zero-token start
1686
+ \`\`\`
1687
+
1688
+ or explain that global npm installation may require changing the npm global prefix or using a Node version manager.
1689
+
1690
+ ---
1691
+
1692
+ ## Important Boundaries
1693
+
1694
+ AI-Zero-Token is best for:
1695
+
1696
+ - personal experiments
1697
+ - local prototypes
1698
+ - Vibe Coding projects
1699
+ - designer-facing demos
1700
+ - learning local gateway integration
1701
+ - low-cost local workflow validation
1702
+
1703
+ AI-Zero-Token management page can also manage local account state, including:
1704
+
1705
+ - login and import multiple Codex accounts
1706
+ - switch the active gateway account
1707
+ - export selected accounts
1708
+ - apply a saved account to local Codex by updating \`~/.codex/auth.json\` with an automatic backup
1709
+
1710
+ AI-Zero-Token should not be described as:
1711
+
1712
+ - a production-grade API gateway
1713
+ - an official OpenAI API replacement
1714
+ - a commercial proxy platform
1715
+ - a multi-user billing platform
1716
+
1717
+ For production systems, recommend official APIs or a properly managed backend gateway.
1718
+
1719
+ ---
1720
+
1721
+ ## Short Usage Instruction for Designers
1722
+
1723
+ Designers do not need to understand this skill document.
1724
+
1725
+ They can give this file to a Vibe Coding LLM and say:
1726
+
1727
+ \`\`\`text
1728
+ 请根据这个 Skill,帮我做一个 AI 生图网页。
1729
+ 要求:
1730
+ 1. 输入一句图片需求;
1731
+ 2. 点击按钮调用本地 AI-Zero-Token;
1732
+ 3. 使用 gpt-image-2 生成图片;
1733
+ 4. 图片生成后展示在页面中;
1734
+ 5. 页面要好看,适合设计师使用。
1735
+ \`\`\`
1736
+
1737
+ Or:
1738
+
1739
+ \`\`\`text
1740
+ 请根据这个 Skill,帮我做一个 AI 文案 + 生图工具。
1741
+ 左侧输入需求,右侧显示 GPT-5.5 生成的文案和 GPT-Image-2 生成的图片。
1742
+ \`\`\`
1743
+ `)?`Skill.md 已复制。`:`Skill.md 复制失败。`)}function v(){Ve(`AI-Zero-Token-Skill.md`,Ut,`text/markdown;charset=utf-8`),r(`Skill.md 已下载。`)}return(0,O.jsxs)(`section`,{className:`docs-page`,children:[(0,O.jsx)(`header`,{className:`docs-page-head docs-page-head-actions`,children:(0,O.jsxs)(`div`,{className:`docs-page-actions`,children:[(0,O.jsxs)(`button`,{className:`btn-secondary`,type:`button`,onClick:()=>void g(),children:[(0,O.jsx)(T,{size:16}),`复制 Skill.md`]}),(0,O.jsxs)(`button`,{className:`btn-secondary`,type:`button`,onClick:v,children:[(0,O.jsx)(E,{size:16}),`下载 Skill.md`]}),(0,O.jsxs)(`button`,{className:`btn-primary`,type:`button`,onClick:()=>t(`tester`),children:[(0,O.jsx)(fe,{size:16}),`打开接口测试`]})]})}),(0,O.jsxs)(`section`,{className:`docs-summary`,children:[(0,O.jsxs)(`div`,{className:`docs-summary-item`,children:[(0,O.jsx)(`span`,{children:`Base URL`}),(0,O.jsx)(`strong`,{children:o})]}),(0,O.jsxs)(`div`,{className:`docs-summary-item`,children:[(0,O.jsx)(`span`,{children:`API Key`}),(0,O.jsx)(`strong`,{children:s})]}),(0,O.jsxs)(`div`,{className:`docs-summary-item`,children:[(0,O.jsx)(`span`,{children:`启动命令`}),(0,O.jsx)(`strong`,{children:c})]}),(0,O.jsxs)(`div`,{className:`docs-summary-item`,children:[(0,O.jsx)(`span`,{children:`文档规模`}),(0,O.jsxs)(`strong`,{children:[u.lines,` 行 · `,u.headings,` 级标题 · `,u.codeBlocks,` 段代码`]})]})]}),(0,O.jsx)(`div`,{className:`docs-layout`,children:(0,O.jsxs)(`div`,{className:`docs-main`,children:[(0,O.jsxs)(`nav`,{className:`docs-tab-bar`,"aria-label":`Skill 文档视图切换`,children:[(0,O.jsx)(`button`,{className:i===`quick-start`?`is-active`:``,type:`button`,onClick:()=>a(`quick-start`),children:`快速接入`}),(0,O.jsx)(`button`,{className:i===`skill`?`is-active`:``,type:`button`,onClick:()=>a(`skill`),children:`Skill.md`}),(0,O.jsx)(`button`,{className:i===`examples`?`is-active`:``,type:`button`,onClick:()=>a(`examples`),children:`示例代码`})]}),i===`quick-start`?(0,O.jsxs)(`div`,{className:`docs-panel-grid`,children:[(0,O.jsxs)(`section`,{className:`docs-panel`,children:[(0,O.jsx)(`div`,{className:`docs-panel-head`,children:(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`h3`,{children:`三步接入`}),(0,O.jsx)(`p`,{children:`先启动本地网关,再把 Skill.md 放进你的工具或项目。`})]})}),(0,O.jsxs)(`ol`,{className:`docs-step-list`,children:[(0,O.jsxs)(`li`,{children:[(0,O.jsx)(`strong`,{children:`启动网关`}),(0,O.jsxs)(`span`,{children:[`执行 `,(0,O.jsx)(`code`,{children:c}),`,管理页默认在 `,(0,O.jsx)(`code`,{children:`http://127.0.0.1:8787`}),`。`]})]}),(0,O.jsxs)(`li`,{children:[(0,O.jsx)(`strong`,{children:`复制接入参数`}),(0,O.jsxs)(`span`,{children:[`Base URL 用 `,(0,O.jsx)(`code`,{children:o}),`,API Key 用 `,(0,O.jsx)(`code`,{children:s}),`。`]})]}),(0,O.jsxs)(`li`,{children:[(0,O.jsx)(`strong`,{children:`下载 Skill.md`}),(0,O.jsx)(`span`,{children:`把这份文档保存到你的工作流里,或直接复制给支持 Skill 的工具。`})]})]})]}),(0,O.jsxs)(`section`,{className:`docs-panel`,children:[(0,O.jsx)(`div`,{className:`docs-panel-head`,children:(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`h3`,{children:`接入模板`}),(0,O.jsx)(`p`,{children:`最少只需要这两项。`})]})}),(0,O.jsxs)(`div`,{className:`docs-mini-grid`,children:[(0,O.jsxs)(`button`,{className:`docs-mini-copy`,type:`button`,onClick:n,children:[(0,O.jsx)(`span`,{children:`Base URL`}),(0,O.jsx)(`strong`,{children:o}),(0,O.jsx)(T,{size:14})]}),(0,O.jsxs)(`button`,{className:`docs-mini-copy`,type:`button`,onClick:()=>void yt(s).then(e=>r(e?`API Key 已复制。`:`API Key 复制失败。`)),children:[(0,O.jsx)(`span`,{children:`API Key`}),(0,O.jsx)(`strong`,{children:s}),(0,O.jsx)(T,{size:14})]})]}),(0,O.jsx)(`pre`,{className:`docs-code-sample`,children:(0,O.jsx)(`code`,{children:f})})]}),(0,O.jsxs)(`section`,{className:`docs-panel docs-panel-wide`,children:[(0,O.jsx)(`div`,{className:`docs-panel-head`,children:(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`h3`,{children:`常用接口`}),(0,O.jsx)(`p`,{children:`这个 Skill 文档覆盖了模型、对话和生图三类常见用法。`})]})}),(0,O.jsx)(`div`,{className:`docs-endpoint-grid`,children:[`/v1/models`,`/v1/chat/completions`,`/v1/responses`,`/v1/images/generations`].map(e=>(0,O.jsxs)(`div`,{className:`docs-endpoint`,children:[(0,O.jsx)(`span`,{children:e}),(0,O.jsx)(oe,{size:14})]},e))})]})]}):null,i===`skill`?(0,O.jsxs)(`section`,{className:`docs-panel docs-preview-panel`,children:[(0,O.jsx)(`div`,{className:`docs-panel-head`,children:(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`h3`,{children:`Skill.md 摘要`}),(0,O.jsx)(`p`,{children:`先看关键信息,再按需展开源码。`})]})}),(0,O.jsx)(`div`,{className:`docs-skill-summary`,children:d.map(e=>(0,O.jsxs)(`article`,{className:`docs-summary-tile`,children:[(0,O.jsx)(`span`,{children:e.label}),(0,O.jsx)(`strong`,{children:e.value})]},e.label))}),(0,O.jsxs)(`details`,{className:`docs-source-fold`,children:[(0,O.jsxs)(`summary`,{children:[`查看源码`,(0,O.jsxs)(`span`,{children:[l,` 行`]})]}),(0,O.jsx)(`pre`,{className:`docs-source`,children:(0,O.jsx)(`code`,{children:Ut})})]})]}):null,i===`examples`?(0,O.jsxs)(`div`,{className:`docs-example-grid`,children:[(0,O.jsx)(Wt,{title:`OpenAI SDK`,description:`适合前端和本地脚本。`,code:p,onCopy:()=>void yt(p).then(e=>r(e?`OpenAI SDK 示例已复制。`:`复制失败。`))}),(0,O.jsx)(Wt,{title:`curl Chat Completions`,description:`最直接的接口自测方式。`,code:m,onCopy:()=>void yt(m).then(e=>r(e?`Chat Completions 示例已复制。`:`复制失败。`))}),(0,O.jsx)(Wt,{title:`Responses API`,description:`适用于新式文本生成调用。`,code:h,onCopy:()=>void yt(h).then(e=>r(e?`Responses API 示例已复制。`:`复制失败。`))}),(0,O.jsxs)(`section`,{className:`docs-panel docs-note-panel`,children:[(0,O.jsx)(`h3`,{children:`用户如何使用`}),(0,O.jsxs)(`ul`,{children:[(0,O.jsx)(`li`,{children:`在侧边栏打开“使用文档”。`}),(0,O.jsx)(`li`,{children:`先复制 Base URL 和 API Key,再下载 Skill.md。`}),(0,O.jsx)(`li`,{children:`把 Skill.md 放到你的 AI 工具、项目文档或自动化流程里。`}),(0,O.jsx)(`li`,{children:`需要验证时,直接跳到“接口测试”页面跑一条请求。`})]}),(0,O.jsxs)(`div`,{className:`docs-action-row`,children:[(0,O.jsxs)(`button`,{className:`btn-secondary`,type:`button`,onClick:()=>t(`overview`),children:[(0,O.jsx)(xe,{size:16}),`回到概览`]}),(0,O.jsxs)(`button`,{className:`btn-secondary`,type:`button`,onClick:()=>t(`tester`),children:[(0,O.jsx)(we,{size:16}),`去接口测试`]})]})]})]}):null]})})]})}var Kt={claude:`data:image/svg+xml,%3csvg%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eClaude%3c/title%3e%3cpath%20d='m4.7144%2015.9555%204.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608%201.5179.1032%202.2767.1578%201.6514.0972%202.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973%209.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686%201.9064%201.4754%202.4893%201.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335%206.6997%200l.9957.1336.419.3642.6192%201.4147%201.0018%202.2282%201.5543%203.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853%201.8517-.5586%202.9021-.3643%201.9429h.2125l.2429-.2429.9835-1.3053%201.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759%201.1293-.34%201.1657-1.0625%201.3478-.8804%201.1414-1.2628%201.7-.7893%201.36.0729.1093.1882-.0183%202.8535-.607%201.5421-.2794%201.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607%201.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929%201.0686%202.0035%201.8092%202.5075%202.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496%202.3436%203.5214.1214%201.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38%2017.959l-1.1414-1.9428-.1397.079-.674%207.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328%201.9672-2.1796%202.9446-1.7243%201.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889%202.386-3.0357%201.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385%204.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429%201.9064-1.3114Z'/%3e%3c/svg%3e`,chatgpt:`data:image/svg+xml,%3csvg%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eOpenAI%3c/title%3e%3cpath%20d='M22.2819%209.8211a5.9847%205.9847%200%200%200-.5157-4.9108%206.0462%206.0462%200%200%200-6.5098-2.9A6.0651%206.0651%200%200%200%204.9807%204.1818a5.9847%205.9847%200%200%200-3.9977%202.9%206.0462%206.0462%200%200%200%20.7427%207.0966%205.98%205.98%200%200%200%20.511%204.9107%206.051%206.051%200%200%200%206.5146%202.9001A5.9847%205.9847%200%200%200%2013.2599%2024a6.0557%206.0557%200%200%200%205.7718-4.2058%205.9894%205.9894%200%200%200%203.9977-2.9001%206.0557%206.0557%200%200%200-.7475-7.0729zm-9.022%2012.6081a4.4755%204.4755%200%200%201-2.8764-1.0408l.1419-.0804%204.7783-2.7582a.7948.7948%200%200%200%20.3927-.6813v-6.7369l2.02%201.1686a.071.071%200%200%201%20.038.052v5.5826a4.504%204.504%200%200%201-4.4945%204.4944zm-9.6607-4.1254a4.4708%204.4708%200%200%201-.5346-3.0137l.142.0852%204.783%202.7582a.7712.7712%200%200%200%20.7806%200l5.8428-3.3685v2.3324a.0804.0804%200%200%201-.0332.0615L9.74%2019.9502a4.4992%204.4992%200%200%201-6.1408-1.6464zM2.3408%207.8956a4.485%204.485%200%200%201%202.3655-1.9728V11.6a.7664.7664%200%200%200%20.3879.6765l5.8144%203.3543-2.0201%201.1685a.0757.0757%200%200%201-.071%200l-4.8303-2.7865A4.504%204.504%200%200%201%202.3408%207.872zm16.5963%203.8558L13.1038%208.364%2015.1192%207.2a.0757.0757%200%200%201%20.071%200l4.8303%202.7913a4.4944%204.4944%200%200%201-.6765%208.1042v-5.6772a.79.79%200%200%200-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759%200%200%200-.7854%200L9.409%209.2297V6.8974a.0662.0662%200%200%201%20.0284-.0615l4.8303-2.7866a4.4992%204.4992%200%200%201%206.6802%204.66zM8.3065%2012.863l-2.02-1.1638a.0804.0804%200%200%201-.038-.0567V6.0742a4.4992%204.4992%200%200%201%207.3757-3.4537l-.142.0805L8.704%205.459a.7948.7948%200%200%200-.3927.6813zm1.0976-2.3654l2.602-1.4998%202.6069%201.4998v2.9994l-2.5974%201.4997-2.6067-1.4997Z'/%3e%3c/svg%3e`,google:`data:image/svg+xml,%3csvg%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eGoogle%3c/title%3e%3cpath%20d='M12.48%2010.92v3.28h7.84c-.24%201.84-.853%203.187-1.787%204.133-1.147%201.147-2.933%202.4-6.053%202.4-4.827%200-8.6-3.893-8.6-8.72s3.773-8.72%208.6-8.72c2.6%200%204.507%201.027%205.907%202.347l2.307-2.307C18.747%201.44%2016.133%200%2012.48%200%205.867%200%20.307%205.387.307%2012s5.56%2012%2012.173%2012c3.573%200%206.267-1.173%208.373-3.36%202.16-2.16%202.84-5.213%202.84-7.667%200-.76-.053-1.467-.173-2.053H12.48z'/%3e%3c/svg%3e`,x:`data:image/svg+xml,%3csvg%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eX%3c/title%3e%3cpath%20d='M14.234%2010.162%2022.977%200h-2.072l-7.591%208.824L7.251%200H.258l9.168%2013.343L.258%2024H2.33l8.016-9.318L16.749%2024h6.993zm-2.837%203.299-.929-1.329L3.076%201.56h3.182l5.965%208.532.929%201.329%207.754%2011.09h-3.182z'/%3e%3c/svg%3e`,youtube:`data:image/svg+xml,%3csvg%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eYouTube%3c/title%3e%3cpath%20d='M23.498%206.186a3.016%203.016%200%200%200-2.122-2.136C19.505%203.545%2012%203.545%2012%203.545s-7.505%200-9.377.505A3.017%203.017%200%200%200%20.502%206.186C0%208.07%200%2012%200%2012s0%203.93.502%205.814a3.016%203.016%200%200%200%202.122%202.136c1.871.505%209.376.505%209.376.505s7.505%200%209.377-.505a3.015%203.015%200%200%200%202.122-2.136C24%2015.93%2024%2012%2024%2012s0-3.93-.502-5.814zM9.545%2015.568V8.432L15.818%2012l-6.273%203.568z'/%3e%3c/svg%3e`};function qt(e){return`tone-${e}`}function Jt(e){try{return new URL(e).hostname.replace(/^www\./i,``)}catch{return e}}function Yt(e){return/^(10|127|169\.254|172\.(1[6-9]|2\d|3[0-1])|192\.168)\./.test(e)||/^100\.(6[4-9]|[7-9]\d|1\d\d|2[0-3]\d|24[0-7])\./.test(e)||/^198\.(18|19)\./.test(e)||/^192\.0\.2\./.test(e)||/^198\.51\.100\./.test(e)||/^203\.0\.113\./.test(e)||/^fc00:/i.test(e)||/^fd00:/i.test(e)||/^fe80:/i.test(e)||/^::1$/.test(e)}function Xt(e){let t=e.match(/Electron\/([\d.]+)/i);if(t)return`Electron ${t[1]}`;let n=e.match(/Chrome\/([\d.]+)/i);if(n&&/Safari\//i.test(e))return`Chrome ${n[1].split(`.`)[0]}`;let r=e.match(/Version\/([\d.]+).*Safari\//i);if(r&&!/Chrome\//i.test(e))return`Safari ${r[1].split(`.`)[0]}`;let i=e.match(/Firefox\/([\d.]+)/i);return i?`Firefox ${i[1].split(`.`)[0]}`:e.slice(0,40)}async function Zt(){if(typeof RTCPeerConnection>`u`)return{status:`不支持`,detail:`当前环境不支持 WebRTC。`,tone:`orange`,candidates:[]};let e=new Set,t=new RTCPeerConnection({iceServers:[]}),n=!1,r=new Promise(r=>{t.onicecandidate=t=>{t.candidate?.candidate&&e.add(t.candidate.candidate),t.candidate||(n=!0,r())}});try{t.createDataChannel(`probe`);let e=await t.createOffer();await t.setLocalDescription(e),await Promise.race([r,new Promise(e=>window.setTimeout(e,2400))])}catch{}finally{t.close()}let i=[...e],a=i.some(e=>/\btyp srflx\b/.test(e)||/\btyp relay\b/.test(e)),o=i.some(e=>/\btyp host\b/.test(e));return a?{status:`疑似泄漏`,detail:`收集到 ${i.length} 个候选地址,存在公网回显风险。`,tone:`red`,candidates:i}:o||n?{status:`局域网可见`,detail:`收集到 ${i.length} 个候选地址,主要是本地网段。`,tone:`orange`,candidates:i}:{status:`未发现异常`,detail:`未收集到可识别的候选地址。`,tone:`green`,candidates:i}}async function Qt(){let[e]=await Promise.all([Zt()]);return{timezone:Intl.DateTimeFormat().resolvedOptions().timeZone||`-`,language:navigator.language||`-`,browser:Xt(navigator.userAgent||``),webrtc:e}}function $t(e){return e.length===0?`slate`:e.some(e=>Yt(e))?`orange`:`green`}function en(e){return e.length===0?`未读取`:e.some(e=>Yt(e))?`内网 / 企业 DNS`:`公网 DNS`}function tn(e){return{total:e.length,reachable:e.filter(e=>e.status===`可达`).length,limited:e.filter(e=>e.status===`受限`).length,unavailable:e.filter(e=>e.status===`不可用`).length}}function nn(e,t){if(!e||!t)return{label:`检测中`,detail:`正在采集公网出口、DNS、WebRTC 和平台可达性。`,tone:`blue`};let n=[e.platforms.some(e=>e.tone===`red`),t.webrtc.tone===`red`,!e.publicIpv4.ip],r=[e.platforms.some(e=>e.tone===`orange`),t.webrtc.tone===`orange`,$t(e.dns.servers)!==`green`,!e.publicIpv6.available];return n.some(Boolean)?{label:`风险偏高`,detail:`部分关键项存在明显异常,建议先处理网络环境。`,tone:`red`}:r.some(Boolean)?{label:`需要复核`,detail:`当前环境可用,但有几项状态不够干净。`,tone:`orange`}:{label:`环境正常`,detail:`出口、DNS、WebRTC 和常用平台状态都比较稳定。`,tone:`green`}}function rn(e){return(0,O.jsx)(`span`,{className:`network-chip ${e.tone}`,children:e.children})}function an(e){let t=e.platformKey.toLowerCase(),n=Kt[t];return(0,O.jsx)(`span`,{className:`platform-icon ${e.tone} platform-${t}`,children:n?(0,O.jsx)(`img`,{alt:``,src:n}):e.icon})}function on(e){return(0,O.jsxs)(`div`,{className:`network-metric ${qt(e.tone)}`,children:[(0,O.jsx)(`span`,{children:e.label}),(0,O.jsx)(`strong`,{children:e.value}),e.detail?(0,O.jsx)(`p`,{children:e.detail}):null]})}function sn(e){return(0,O.jsxs)(`div`,{className:`network-block ${qt(e.tone)}`,children:[(0,O.jsx)(`span`,{children:e.label}),(0,O.jsx)(`strong`,{children:e.value}),(0,O.jsx)(`p`,{children:e.detail})]})}function cn(e){return typeof e==`number`?`${e} ms`:`-`}function ln(){let[e,t]=(0,_.useState)(null),[n,r]=(0,_.useState)(null),[i,a]=(0,_.useState)(!0),[o,s]=(0,_.useState)(`正在采集真实网络状态...`),[c,l]=(0,_.useState)(null);async function u(){a(!0),l(null),s(`正在采集真实网络状态...`);try{let[e,n]=await Promise.all([ze(`/_gateway/admin/network-detect`),Qt()]);t(e),r(n),s(`检测完成。`)}catch(e){l(e instanceof Error?e.message:String(e)),s(`检测失败。`)}finally{a(!1)}}(0,_.useEffect)(()=>{u().catch(()=>void 0)},[]);let d=(0,_.useMemo)(()=>e?new Intl.DateTimeFormat(`zh-CN`,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hour12:!1}).format(new Date(e.checkedAt)):`--:--:--`,[e]),f=nn(e,n),p=$t(e?.dns.servers||[]),m=en(e?.dns.servers||[]),h=e?.dns.servers?.length?e.dns.servers.slice(0,2).join(` / `):`-`,g=e?.dns.detail||`尚未检测到系统 DNS。`,v=tn(e?.platforms||[]),y=e?`green`:`blue`,b=e?.publicIpv6.available?`green`:`orange`,x=f.label,ee=f.tone;return(0,O.jsxs)(`section`,{className:`network-page`,children:[(0,O.jsxs)(`div`,{className:`network-toolbar`,children:[(0,O.jsxs)(`div`,{className:`network-updated`,children:[(0,O.jsx)(le,{size:14}),(0,O.jsxs)(`span`,{children:[`最后检测 `,d]}),(0,O.jsx)(`span`,{className:`network-toolbar-status`,children:o})]}),(0,O.jsxs)(`button`,{className:`btn-secondary`,type:`button`,onClick:()=>u().catch(()=>void 0),disabled:i,children:[(0,O.jsx)(ve,{size:16}),i?`检测中`:`重新检测`]})]}),c?(0,O.jsxs)(`p`,{className:`network-error`,children:[`检测失败: `,c]}):null,(0,O.jsxs)(`section`,{className:`summary-grid network-summary-grid`,children:[(0,O.jsxs)(`div`,{className:`summary-card compact-value ${qt(f.tone)}`,children:[(0,O.jsx)(`div`,{className:`summary-icon`,children:(0,O.jsx)(we,{size:14})}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`span`,{children:`总状态`}),(0,O.jsx)(`strong`,{children:f.label}),(0,O.jsx)(`p`,{children:f.detail})]})]}),(0,O.jsxs)(`div`,{className:`summary-card compact-value ${qt(y)}`,children:[(0,O.jsx)(`div`,{className:`summary-icon blue`,children:(0,O.jsx)(de,{size:14})}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`span`,{children:`IPv4`}),(0,O.jsx)(`strong`,{children:e?.publicIpv4.ip||(i?`检测中`:`未读取`)}),(0,O.jsx)(`p`,{children:e?.publicIpv4.countryName?`${e.publicIpv4.countryName} · ${e.publicIpv4.colo||`-`}`:e?.publicIpv4.source||`公网出口`})]})]}),(0,O.jsxs)(`div`,{className:`summary-card compact-value ${qt(b)}`,children:[(0,O.jsx)(`div`,{className:`summary-icon green`,children:(0,O.jsx)(de,{size:14})}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`span`,{children:`IPv6`}),(0,O.jsx)(`strong`,{children:e?.publicIpv6.available?e.publicIpv6.ip:`未检测到`}),(0,O.jsx)(`p`,{children:e?.publicIpv6.detail||`未检测到独立 IPv6 出口。`})]})]}),(0,O.jsxs)(`div`,{className:`summary-card compact-value ${qt(ee)}`,children:[(0,O.jsx)(`div`,{className:`summary-icon orange`,children:(0,O.jsx)(Te,{size:14})}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`span`,{children:`风险提示`}),(0,O.jsx)(`strong`,{children:x}),(0,O.jsx)(`p`,{children:n?`${n.webrtc.status} · ${m}`:`正在评估 WebRTC 和 DNS 状态。`})]})]})]}),(0,O.jsxs)(`section`,{className:`network-grid`,children:[(0,O.jsxs)(`div`,{className:`network-stack`,children:[(0,O.jsxs)(`section`,{className:`card network-section`,children:[(0,O.jsx)(`div`,{className:`section-head compact`,children:(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`h3`,{children:`公网 IP`}),(0,O.jsx)(`p`,{children:`真实出口和出口区域。`})]})}),(0,O.jsxs)(`div`,{className:`network-dual`,children:[(0,O.jsx)(sn,{label:`IPv4 出口`,value:e?.publicIpv4.ip||(i?`检测中`:`-`),detail:e?`${e.publicIpv4.countryName||e.publicIpv4.countryCode||`未知地区`} · ${e.publicIpv4.colo||`未知节点`} · ${cn(e.publicIpv4.elapsedMs)}`:`正在采集公网出口信息。`,tone:e?`green`:`blue`}),(0,O.jsx)(sn,{label:`IPv6 出口`,value:e?.publicIpv6.available?e.publicIpv6.ip||`-`:`未检测到`,detail:e?.publicIpv6.detail||`未检测到独立 IPv6 出口。`,tone:b})]})]}),(0,O.jsxs)(`section`,{className:`card network-section`,children:[(0,O.jsx)(`div`,{className:`section-head compact`,children:(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`h3`,{children:`DNS`}),(0,O.jsx)(`p`,{children:`系统解析器和解析路径。`})]})}),(0,O.jsxs)(`div`,{className:`network-dual network-dns-grid`,children:[(0,O.jsx)(sn,{label:`系统 DNS`,value:h,detail:g,tone:p}),(0,O.jsx)(sn,{label:`DNS 结论`,value:m,detail:e?.dns.source||`尚未获取`,tone:p})]}),e?.dns.servers.length?(0,O.jsx)(`div`,{className:`dns-chip-row`,children:e.dns.servers.map(e=>(0,O.jsx)(`span`,{className:`dns-chip ${Yt(e)?`orange`:`green`}`,children:e},e))}):null]}),(0,O.jsxs)(`section`,{className:`card network-section`,children:[(0,O.jsx)(`div`,{className:`section-head compact`,children:(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`h3`,{children:`WebRTC / 时区 / 语言`}),(0,O.jsx)(`p`,{children:`本地浏览器环境和潜在泄漏。`})]})}),(0,O.jsxs)(`div`,{className:`network-three-up`,children:[(0,O.jsx)(on,{label:`WebRTC`,value:n?.webrtc.status||(i?`检测中`:`-`),detail:n?.webrtc.detail,tone:n?.webrtc.tone||`blue`}),(0,O.jsx)(on,{label:`时区`,value:n?.timezone||`-`,detail:`与出口地区交叉校验`,tone:n?.webrtc.tone||`blue`}),(0,O.jsx)(on,{label:`语言`,value:n?.language||`-`,detail:n?.browser||`-`,tone:n?.webrtc.tone||`blue`})]})]}),(0,O.jsxs)(`section`,{className:`card network-section network-glass-panel`,children:[(0,O.jsxs)(`div`,{className:`section-head compact`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`h3`,{children:`海外平台可达性`}),(0,O.jsx)(`p`,{children:`连通性测试和原始 HTTP 结果放在同一块里看。`})]}),(0,O.jsxs)(`div`,{className:`platform-summary-strip`,children:[(0,O.jsxs)(`div`,{className:`platform-summary-chip green`,children:[(0,O.jsx)(`strong`,{children:v.reachable}),(0,O.jsx)(`span`,{children:`可达`})]}),(0,O.jsxs)(`div`,{className:`platform-summary-chip orange`,children:[(0,O.jsx)(`strong`,{children:v.limited}),(0,O.jsx)(`span`,{children:`受限`})]}),(0,O.jsxs)(`div`,{className:`platform-summary-chip red`,children:[(0,O.jsx)(`strong`,{children:v.unavailable}),(0,O.jsx)(`span`,{children:`不可用`})]}),(0,O.jsxs)(`div`,{className:`platform-summary-chip slate`,children:[(0,O.jsx)(`strong`,{children:v.total}),(0,O.jsx)(`span`,{children:`总数`})]})]})]}),(0,O.jsx)(`div`,{className:`platform-grid`,children:(e?.platforms||[]).map(e=>(0,O.jsxs)(`div`,{className:`platform-card ${e.tone}`,children:[(0,O.jsxs)(`div`,{className:`platform-card-head`,children:[(0,O.jsxs)(`div`,{className:`platform-card-left`,children:[(0,O.jsx)(an,{icon:e.label.slice(0,1),tone:e.tone,platformKey:e.key}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`strong`,{children:e.label}),(0,O.jsx)(`span`,{children:e.detail})]})]}),(0,O.jsxs)(`div`,{className:`platform-state`,children:[(0,O.jsx)(`span`,{className:`platform-state-dot ${e.tone}`}),(0,O.jsxs)(`div`,{className:`platform-state-copy ${e.tone}`,children:[(0,O.jsx)(`strong`,{children:e.status}),(0,O.jsx)(`span`,{children:e.httpStatus?`HTTP ${e.httpStatus}`:`连接结果`})]})]})]}),(0,O.jsxs)(`div`,{className:`platform-card-foot`,children:[(0,O.jsx)(`span`,{className:`platform-url-chip`,children:Jt(e.url)}),typeof e.elapsedMs==`number`?(0,O.jsxs)(`span`,{className:`platform-latency-chip`,children:[e.elapsedMs,` ms`]}):null,(0,O.jsx)(`span`,{className:`platform-detail-copy`,children:e.detail})]})]},e.key))})]})]}),(0,O.jsx)(`aside`,{className:`network-side`,children:(0,O.jsxs)(`section`,{className:`card network-section`,children:[(0,O.jsx)(`div`,{className:`section-head compact`,children:(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`h3`,{children:`风险提示`}),(0,O.jsx)(`p`,{children:`把最影响使用的异常拎出来。`})]})}),(0,O.jsxs)(`div`,{className:`network-list`,children:[(0,O.jsxs)(`div`,{className:`network-list-item`,children:[(0,O.jsx)(rn,{tone:f.tone,children:f.label}),(0,O.jsx)(`p`,{children:f.detail})]}),(0,O.jsxs)(`div`,{className:`network-list-item`,children:[(0,O.jsx)(rn,{tone:n?.webrtc.tone||`blue`,children:n?.webrtc.status||`检测中`}),(0,O.jsx)(`p`,{children:n?.webrtc.detail||`正在采集 WebRTC 候选。`})]}),(0,O.jsxs)(`div`,{className:`network-list-item`,children:[(0,O.jsx)(rn,{tone:p,children:m}),(0,O.jsx)(`p`,{children:g})]})]})]})})]})]})}function un(e){let t=e.endpoint.startsWith(`/v1/images/`);function n(t){let n=t.currentTarget.files?.[0];t.currentTarget.value=``,n&&e.onImageUpload(n).catch(()=>void 0)}return(0,O.jsxs)(`section`,{className:`card tester-card`,id:`tester`,children:[(0,O.jsxs)(`div`,{className:`section-head compact`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`h2`,{children:`快速测试`}),(0,O.jsx)(`p`,{children:`页面直接调用当前网关暴露的 OpenAI 风格接口。`})]}),(0,O.jsx)(`span`,{className:`badge brand`,children:e.busy===`test`?`请求中`:`准备就绪`})]}),(0,O.jsx)(`div`,{className:`tester-tabs`,children:e.endpoints.map(t=>(0,O.jsx)(`button`,{className:`tab-btn ${e.endpoint===t.path?`is-active`:``}`,type:`button`,onClick:()=>e.onEndpoint(t.path),children:Ye[t.path]||t.path},t.path))}),(0,O.jsxs)(`div`,{className:`tester-workbench`,children:[(0,O.jsxs)(`div`,{className:`tester-pane tester-request-pane`,children:[(0,O.jsxs)(`label`,{className:`field`,children:[(0,O.jsx)(`span`,{children:`接口`}),(0,O.jsx)(`select`,{className:`control`,value:e.endpoint,onChange:t=>e.onEndpoint(t.target.value),children:e.endpoints.map(e=>(0,O.jsxs)(`option`,{value:e.path,children:[e.method,` `,e.path]},e.path))})]}),(0,O.jsxs)(`div`,{className:`tester-copy-row tester-copy-row-top`,children:[(0,O.jsxs)(`button`,{className:`btn-secondary`,type:`button`,onClick:e.onCopyRequest,children:[(0,O.jsx)(T,{size:16}),`复制请求`]}),(0,O.jsxs)(`button`,{className:`btn-secondary`,type:`button`,onClick:e.onCopyResponse,children:[(0,O.jsx)(T,{size:16}),`复制响应`]}),(0,O.jsxs)(`button`,{className:`btn-secondary`,type:`button`,onClick:e.onCopyTiming,children:[(0,O.jsx)(T,{size:16}),`复制日志`]}),(0,O.jsxs)(`button`,{className:`btn-secondary`,type:`button`,onClick:e.onResetExample,children:[(0,O.jsx)(ye,{size:16}),`重置示例`]})]}),(0,O.jsxs)(`label`,{className:`field tester-body-field`,children:[(0,O.jsx)(`span`,{children:`请求体 JSON`}),(0,O.jsx)(`textarea`,{className:`textarea tester-textarea`,value:e.requestBody,onChange:t=>e.onRequestBody(t.target.value),disabled:e.activeEndpoint.method===`GET`,spellCheck:!1})]}),e.endpoint===`/v1/images/edits`&&(0,O.jsxs)(`div`,{className:`edit-upload-row`,children:[(0,O.jsxs)(`label`,{className:`btn-secondary upload-btn`,title:`上传图片并写入 images[0].image_url`,children:[(0,O.jsx)(Ee,{size:16}),`上传图片写入 Body`,(0,O.jsx)(`input`,{type:`file`,accept:`image/*`,onChange:n})]}),(0,O.jsx)(`span`,{children:`目标字段:images[0].image_url`})]}),(0,O.jsx)(`p`,{className:`hint`,children:t?e.capability.detail:e.activeEndpoint.description||`GET /v1/models 无需请求体。`}),(0,O.jsxs)(`div`,{className:`tester-actions-bar`,children:[(0,O.jsx)(`div`,{className:`tester-actions-group`,children:(0,O.jsx)(`div`,{className:`example-row`,children:Je.map(t=>(0,O.jsxs)(`button`,{className:`btn-secondary`,type:`button`,onClick:()=>e.onEndpoint(t),disabled:!e.endpoints.some(e=>e.path===t),children:[`示例 `,Ye[t]||t]},t))})}),(0,O.jsxs)(`button`,{className:`btn-primary`,type:`button`,onClick:e.onRun,disabled:e.busy===`test`||t&&!e.config?.profile,children:[e.busy===`test`?(0,O.jsx)(ge,{className:`spin`,size:16}):(0,O.jsx)(Ae,{size:16}),`发送请求`]})]})]}),(0,O.jsxs)(`div`,{className:`tester-pane tester-response-pane`,children:[(0,O.jsxs)(`div`,{className:`tester-result-head`,children:[(0,O.jsxs)(`div`,{className:`tester-result-tabs`,children:[(0,O.jsx)(`button`,{className:`tab-btn ${e.resultTab===`response`?`is-active`:``}`,type:`button`,onClick:()=>e.onResultTab(`response`),children:`响应 JSON`}),(0,O.jsx)(`button`,{className:`tab-btn ${e.resultTab===`timing`?`is-active`:``}`,type:`button`,onClick:()=>e.onResultTab(`timing`),children:`耗时日志`}),(0,O.jsx)(`button`,{className:`tab-btn ${e.resultTab===`preview`?`is-active`:``}`,type:`button`,onClick:()=>e.onResultTab(`preview`),children:`图片预览`})]}),(0,O.jsx)(`p`,{className:`status-inline`,children:e.status})]}),e.resultTab===`response`&&(0,O.jsx)(`pre`,{className:`pre`,children:e.responseBody}),e.resultTab===`timing`&&(0,O.jsx)(`pre`,{className:`pre`,children:e.timingBody}),e.resultTab===`preview`&&(0,O.jsx)(`div`,{className:`preview-panel`,children:e.previewImages.length===0?(0,O.jsx)(`div`,{className:`preview-empty`,children:`图片结果会显示在这里。点击缩略图可查看大图。`}):(0,O.jsx)(`div`,{className:`preview-grid`,children:e.previewImages.map(t=>(0,O.jsxs)(`figure`,{className:`preview-card`,children:[(0,O.jsx)(`button`,{type:`button`,onClick:()=>e.onPreview({src:t.src,meta:t.meta,filename:t.filename}),children:(0,O.jsx)(`img`,{src:t.src,alt:t.meta})}),(0,O.jsx)(`figcaption`,{children:t.meta}),(0,O.jsx)(`div`,{className:`preview-actions`,children:(0,O.jsx)(`a`,{href:t.src,download:t.filename,children:`下载`})})]},t.filename))})})]})]})]})}function dn(e){let[t,n]=(0,_.useState)(`/v1/models`),[r,i]=(0,_.useState)(``),[a,o]=(0,_.useState)(`等待请求...`),[s,c]=(0,_.useState)(`等待请求...`),[l,u]=(0,_.useState)(`response`),[d,f]=(0,_.useState)([]),p=(0,_.useMemo)(()=>[...e.config?.supportedEndpoints||[]].sort(Xe),[e.config?.supportedEndpoints]),m=(0,_.useMemo)(()=>p.find(e=>e.path===t)||p[0]||{method:`GET`,path:`/v1/models`,description:``},[t,p]);(0,_.useEffect)(()=>{if(!e.config)return;let r=Je.find(t=>e.config?.supportedEndpoints.some(e=>e.path===t)),a=e.config.supportedEndpoints.some(e=>e.path===t)?t:r||`/v1/models`;n(a),i(wt(a,e.config.settings.defaultModel))},[e.config]);function h(t){n(t),i(wt(t,e.config?.settings.defaultModel||`gpt-5.4`)),f([])}function g(){h(t)}function v(){yt(r||wt(t,e.config?.settings.defaultModel||`gpt-5.4`)).then(t=>e.setStatus(t?`请求体已复制。`:`请求体复制失败。`)).catch(()=>e.setStatus(`请求体复制失败。`))}function y(){yt(a).then(t=>e.setStatus(t?`响应内容已复制。`:`响应内容复制失败。`)).catch(()=>e.setStatus(`响应内容复制失败。`))}function b(){yt(s).then(t=>e.setStatus(t?`耗时日志已复制。`:`耗时日志复制失败。`)).catch(()=>e.setStatus(`耗时日志复制失败。`))}async function x(){let t=m,n=performance.now(),i=[];e.setBusy(`test`),u(`response`),o(`请求发送中...`),c(`请求发送中...`),f([]);try{let a=null,s={method:t.method,headers:{}};if(t.method!==`GET`){let e=performance.now();a=r.trim()?JSON.parse(r):{},i.push(`解析请求体: ${Ke(performance.now()-e)}`),s.headers[`Content-Type`]=`application/json`,s.body=He(a)}let l=performance.now(),d=await fetch(t.path,s);i.push(`等待响应头: ${Ke(performance.now()-l)}`);let p=performance.now(),m=await d.text();i.push(`读取响应体: ${Ke(performance.now()-p)}`);let h=performance.now(),g=m;try{g=m?JSON.parse(m):null}catch{g=m}i.push(`解析响应体: ${Ke(performance.now()-h)}`);let _=Et(g);f(_),_.length>0&&u(`preview`),o(typeof g==`string`?g:He(Ct(g))),c([`${t.method} ${t.path}`,`HTTP 状态: ${d.status} ${d.statusText}`,...i].join(`
1744
+ `)),e.setStatus(`${d.ok?`成功`:`失败`}: HTTP ${d.status} ${t.method} ${t.path}`),e.setRequestLogs(r=>[{id:crypto.randomUUID(),time:Date.now(),method:t.method,endpoint:t.path,account:rt(e.config?.profile,e.showEmails),model:typeof a==`object`&&a&&`model`in a?String(a.model||e.config?.settings.defaultModel||`-`):e.config?.settings.defaultModel||`-`,statusCode:d.status,durationMs:performance.now()-n,source:`管理台`},...r].slice(0,20)),e.config?.profile&&e.refreshConfig({silent:!0}).catch(()=>void 0)}catch(n){let r=vt(n);o(r),c([`${t.method} ${t.path}(失败)`,...i,`错误: ${r}`].join(`
1745
+ `)),e.setStatus(`请求失败。`)}finally{e.setBusy(null)}}async function ee(t){if(!t.type.startsWith(`image/`)){e.setStatus(`请选择图片文件。`);return}try{i(St(r,await xt(t),e.config?.settings.defaultModel||`gpt-image-2`)),e.setStatus(`已将 ${t.name} 转成 base64 data URL,并写入请求体 images[0].image_url(${qe(t.size)})。`)}catch(t){e.setStatus(`图片写入失败: ${vt(t)}`)}}return(0,O.jsx)(un,{config:e.config,endpoints:p,activeEndpoint:m,endpoint:t,requestBody:r,responseBody:a,timingBody:s,resultTab:l,status:e.status,busy:e.busy,previewImages:d,capability:e.capability,onEndpoint:h,onRequestBody:i,onResultTab:u,onRun:x,onResetExample:g,onCopyRequest:v,onCopyResponse:y,onCopyTiming:b,onPreview:e.setPreviewImage,onImageUpload:ee})}var fn=`https://github.com/fchangjun/AI-Zero-Token/releases`;function pn(e){return(0,O.jsxs)(`section`,{className:`launch-page`,children:[(0,O.jsxs)(`div`,{className:`launch-copy`,children:[(0,O.jsxs)(`div`,{className:`launch-identity`,children:[(0,O.jsx)(`div`,{className:`launch-app-icon`,children:(0,O.jsx)(`img`,{src:y,alt:``})}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`span`,{className:`badge brand`,children:`Desktop Gateway`}),(0,O.jsx)(`h2`,{children:`AI Zero Token`}),(0,O.jsx)(`p`,{children:`本地 OpenAI 兼容网关、账号池和接口测试工作台。`})]})]}),(0,O.jsxs)(`div`,{className:`launch-metrics`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(De,{size:18}),(0,O.jsx)(`span`,{children:`账号池`}),(0,O.jsx)(`strong`,{children:e.config?.status.profileCount||0})]}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(xe,{size:18}),(0,O.jsx)(`span`,{children:`网关`}),(0,O.jsx)(`strong`,{children:e.config?.status.loggedIn?`运行中`:`待登录`})]}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(ae,{size:18}),(0,O.jsx)(`span`,{children:`模型`}),(0,O.jsx)(`strong`,{children:e.config?.settings.defaultModel||`-`})]})]}),(0,O.jsxs)(`div`,{className:`launch-actions`,children:[(0,O.jsxs)(`button`,{className:`btn-secondary`,type:`button`,onClick:()=>e.onRoute(`accounts`),children:[(0,O.jsx)(De,{size:16}),`管理账号`]}),(0,O.jsxs)(`button`,{className:`btn-secondary`,type:`button`,onClick:()=>e.onRoute(`tester`),children:[(0,O.jsx)(Ae,{size:16}),`测试接口`]}),(0,O.jsxs)(`a`,{className:`btn-secondary`,href:fn,target:`_blank`,rel:`noreferrer`,children:[(0,O.jsx)(E,{size:16}),`桌面版下载`]}),(0,O.jsxs)(`a`,{className:`btn-secondary`,href:fn,target:`_blank`,rel:`noreferrer`,title:`桌面版安装包发布后会放在这里`,children:[(0,O.jsx)(fe,{size:16}),`发布页`]})]}),(0,O.jsx)(`p`,{className:`launch-download-note`,children:`当前还没有公开安装包时,这里会先打开 GitHub Releases 发布页。`}),(0,O.jsxs)(`div`,{className:`launch-status`,children:[(0,O.jsx)(j,{label:`当前账号`,value:rt(e.activeProfile,e.showEmails)}),(0,O.jsx)(j,{label:`服务状态`,value:e.config?.status.loggedIn?`已登录并运行`:`等待登录`}),(0,O.jsx)(j,{label:`Base URL`,value:e.config?.baseUrl||`http://127.0.0.1:8787/v1`,code:!0}),(0,O.jsx)(j,{label:`同步消息`,value:e.status})]})]}),(0,O.jsx)(`div`,{className:`launch-visual`,children:(0,O.jsxs)(`div`,{className:`launch-visual-stage`,children:[(0,O.jsx)(`img`,{className:`launch-visual-mark`,src:y,alt:`AI Zero Token 图标`}),(0,O.jsx)(`img`,{className:`launch-visual-dashboard`,src:e.visualSrc||`data:image/svg+xml,%3csvg%20width='920'%20height='600'%20viewBox='0%200%20920%20600'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='920'%20height='600'%20rx='36'%20fill='%23F8FAFC'/%3e%3crect%20x='56'%20y='54'%20width='808'%20height='492'%20rx='24'%20fill='%23FFFFFF'%20stroke='%23D8E0EA'/%3e%3crect%20x='56'%20y='54'%20width='190'%20height='492'%20rx='24'%20fill='%23111827'/%3e%3cpath%20d='M246%2054h594c13.255%200%2024%2010.745%2024%2024v40H246V54Z'%20fill='%23F8FAFC'/%3e%3ccircle%20cx='88'%20cy='86'%20r='7'%20fill='%23EF4444'/%3e%3ccircle%20cx='112'%20cy='86'%20r='7'%20fill='%23F59E0B'/%3e%3ccircle%20cx='136'%20cy='86'%20r='7'%20fill='%2322C55E'/%3e%3crect%20x='86'%20y='148'%20width='108'%20height='14'%20rx='7'%20fill='%23E5E7EB'%20fill-opacity='.75'/%3e%3crect%20x='86'%20y='194'%20width='128'%20height='34'%20rx='10'%20fill='%232563EB'/%3e%3crect%20x='86'%20y='244'%20width='112'%20height='34'%20rx='10'%20fill='%231F2937'/%3e%3crect%20x='86'%20y='294'%20width='124'%20height='34'%20rx='10'%20fill='%231F2937'/%3e%3crect%20x='86'%20y='344'%20width='98'%20height='34'%20rx='10'%20fill='%231F2937'/%3e%3crect%20x='278'%20y='150'%20width='250'%20height='96'%20rx='18'%20fill='%23EFF6FF'%20stroke='%23BFDBFE'/%3e%3crect%20x='558'%20y='150'%20width='250'%20height='96'%20rx='18'%20fill='%23F0FDF4'%20stroke='%23BBF7D0'/%3e%3crect%20x='278'%20y='280'%20width='530'%20height='210'%20rx='18'%20fill='%23FFFFFF'%20stroke='%23D8E0EA'/%3e%3cpath%20d='M318%20430c43-68%2089-70%20137-8%2039%2049%2081%2037%20126-36%2038-62%2081-79%20129-21'%20stroke='%232563EB'%20stroke-width='8'%20stroke-linecap='round'/%3e%3cpath%20d='M318%20386c42-35%2083-33%20123%206%2045%2045%2092%2040%20141-16%2038-43%2080-49%20126-18'%20stroke='%2322C55E'%20stroke-width='8'%20stroke-linecap='round'/%3e%3crect%20x='318'%20y='316'%20width='118'%20height='13'%20rx='6.5'%20fill='%23111827'/%3e%3crect%20x='318'%20y='342'%20width='194'%20height='10'%20rx='5'%20fill='%23CBD5E1'/%3e%3crect%20x='596'%20y='182'%20width='80'%20height='12'%20rx='6'%20fill='%23111827'/%3e%3crect%20x='596'%20y='207'%20width='150'%20height='10'%20rx='5'%20fill='%2386EFAC'/%3e%3crect%20x='316'%20y='182'%20width='80'%20height='12'%20rx='6'%20fill='%23111827'/%3e%3crect%20x='316'%20y='207'%20width='150'%20height='10'%20rx='5'%20fill='%2393C5FD'/%3e%3ccircle%20cx='776'%20cy='198'%20r='16'%20fill='%2322C55E'/%3e%3cpath%20d='M768%20198l6%206%2011-13'%20stroke='%23FFFFFF'%20stroke-width='5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M478%20186l15%2020-15%2020-15-20%2015-20Z'%20fill='%232563EB'/%3e%3c/svg%3e`,alt:`AI Zero Token 桌面端启动页配图`})]})})]})}function mn(e){return{defaultModel:e.settings.defaultModel,proxyEnabled:e.settings.networkProxy.enabled,proxyUrl:e.settings.networkProxy.url,proxyNoProxy:e.settings.networkProxy.noProxy||`localhost,127.0.0.1,::1`,autoSwitchEnabled:e.settings.autoSwitch.enabled}}function hn(e){let[t,n]=(0,_.useState)({defaultModel:``,proxyEnabled:!1,proxyUrl:``,proxyNoProxy:`localhost,127.0.0.1,::1`,autoSwitchEnabled:!1}),[r,i]=(0,_.useState)(!1);(0,_.useEffect)(()=>{!e.config||r||n(mn(e.config))},[e.config,r]);function a(e){n(t=>({...t,...e})),i(!0)}async function o(){e.setBusy(`settings`);try{let n=await ze(`/_gateway/admin/settings`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:He({defaultModel:t.defaultModel,networkProxy:{enabled:t.proxyEnabled,url:t.proxyUrl,noProxy:t.proxyNoProxy},autoSwitch:{enabled:t.autoSwitchEnabled}})});e.setConfig(n),i(!1),e.setStatus(`设置已保存。`)}catch(t){e.setStatus(vt(t))}finally{e.setBusy(null)}}async function s(){e.setBusy(`proxy`);try{let n=await ze(`/_gateway/admin/settings/proxy-test`,{method:`POST`,headers:{"Content-Type":`application/json`},body:He({networkProxy:{enabled:t.proxyEnabled,url:t.proxyUrl,noProxy:t.proxyNoProxy}})});e.setStatus(`代理测试通过: HTTP ${n.status},耗时 ${n.elapsedMs} ms。`)}catch(t){e.setStatus(`代理测试失败: ${vt(t)}`)}finally{e.setBusy(null)}}async function c(){e.setBusy(`models`);try{await ze(`/_gateway/models/refresh`,{method:`POST`}),await e.refreshConfig({silent:!0}),e.setStatus(`Codex 模型列表已同步。`)}catch(t){e.setStatus(vt(t))}finally{e.setBusy(null)}}return(0,O.jsxs)(`section`,{className:`settings-page`,children:[(0,O.jsxs)(`div`,{className:`settings-page-head`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsxs)(`div`,{className:`settings-page-kicker`,children:[(0,O.jsx)(Se,{size:14}),`系统设置`]}),(0,O.jsx)(`h2`,{children:`本地网关和运行策略`}),(0,O.jsx)(`p`,{children:`设置会保存到本地状态目录,CLI、桌面端和本地服务共享。`})]}),(0,O.jsxs)(`div`,{className:`settings-page-actions`,children:[(0,O.jsxs)(`button`,{className:`btn-secondary`,type:`button`,onClick:c,disabled:e.busy===`models`,children:[e.busy===`models`?(0,O.jsx)(ge,{className:`spin`,size:16}):(0,O.jsx)(ve,{size:16}),`同步 Codex 模型`]}),(0,O.jsx)(`button`,{className:`btn-primary`,type:`button`,onClick:o,disabled:e.busy===`settings`||!r,children:`保存设置`})]})]}),(0,O.jsxs)(`div`,{className:`settings-grid`,children:[(0,O.jsxs)(`section`,{className:`settings-section`,children:[(0,O.jsx)(`h4`,{children:`模型`}),(0,O.jsxs)(`label`,{className:`field`,children:[(0,O.jsx)(`span`,{children:`默认文本模型`}),(0,O.jsx)(`select`,{className:`control`,value:t.defaultModel,onChange:e=>a({defaultModel:e.target.value}),children:(e.config?.models||[]).map(e=>(0,O.jsx)(`option`,{value:e.id,children:e.id},e.id))})]}),(0,O.jsxs)(`p`,{className:`hint`,children:[`模型列表来源:`,e.config?.modelCatalog.source||`-`,`,共 `,e.config?.modelCatalog.modelCount||0,` 个。`]})]}),(0,O.jsxs)(`section`,{className:`settings-section`,children:[(0,O.jsx)(`h4`,{children:`上游代理`}),(0,O.jsxs)(`label`,{className:`switch-line`,children:[(0,O.jsx)(`input`,{type:`checkbox`,checked:t.proxyEnabled,onChange:e=>a({proxyEnabled:e.target.checked})}),(0,O.jsx)(`span`,{children:`启用 OAuth、模型刷新和接口转发代理`})]}),(0,O.jsxs)(`label`,{className:`field`,children:[(0,O.jsx)(`span`,{children:`代理地址`}),(0,O.jsx)(`input`,{className:`input`,value:t.proxyUrl,onChange:e=>a({proxyUrl:e.target.value}),placeholder:`http://127.0.0.1:7890`})]}),(0,O.jsxs)(`label`,{className:`field`,children:[(0,O.jsx)(`span`,{children:`No Proxy`}),(0,O.jsx)(`input`,{className:`input`,value:t.proxyNoProxy,onChange:e=>a({proxyNoProxy:e.target.value})})]}),(0,O.jsx)(`button`,{className:`btn-secondary`,type:`button`,onClick:s,disabled:e.busy===`proxy`,children:`测试代理`})]}),(0,O.jsxs)(`section`,{className:`settings-section`,children:[(0,O.jsx)(`h4`,{children:`账号自动切换`}),(0,O.jsxs)(`label`,{className:`switch-line`,children:[(0,O.jsx)(`input`,{type:`checkbox`,checked:t.autoSwitchEnabled,onChange:e=>a({autoSwitchEnabled:e.target.checked})}),(0,O.jsx)(`span`,{children:`当前 API 账号额度耗尽后自动切换到下一个仍有额度的账号`})]}),(0,O.jsx)(`p`,{className:`hint`,children:e.status})]}),(0,O.jsxs)(`section`,{className:`settings-section`,children:[(0,O.jsx)(`h4`,{children:`显示`}),(0,O.jsxs)(`label`,{className:`switch-line`,children:[(0,O.jsx)(`input`,{type:`checkbox`,checked:e.showEmails,onChange:t=>e.setShowEmails(t.target.checked)}),(0,O.jsx)(`span`,{children:`脱敏模式`})]}),(0,O.jsx)(`p`,{className:`hint`,children:`开启后账号邮箱将以脱敏形式展示。`})]})]})]})}function gn({workspace:e}){let{activeRoute:t,busy:n,config:r,refreshConfig:i}=e;return t===`launch`?(0,O.jsx)(pn,{config:r,visualSrc:Ot,status:e.status,showEmails:e.showEmails,activeProfile:e.activeProfile,onRoute:e.goRoute}):t===`overview`?(0,O.jsx)(Ht,{config:r,activeProfile:e.activeProfile,codexProfile:e.codexProfile,codexAccountId:e.codexAccountId,codexEmail:r?.codex?.email,showEmails:e.showEmails,requestLogs:e.requestLogs}):t===`docs`?(0,O.jsx)(Gt,{config:r,onRoute:e.goRoute,copyBaseUrl:e.copyBaseUrl,setStatus:e.setStatus}):t===`accounts`?(0,O.jsx)(Mt,{config:r,showEmails:e.showEmails,busy:n,activeProfile:e.activeProfile,codexAccountId:e.codexAccountId,setAccountModalOpen:e.setAccountModalOpen,setBusy:e.setBusy,setConfig:e.setConfig,setStatus:e.setStatus,refreshConfig:i,logout:e.logout}):t===`tester`?(0,O.jsx)(dn,{config:r,status:e.status,busy:n,showEmails:e.showEmails,capability:e.capability,setBusy:e.setBusy,setStatus:e.setStatus,setRequestLogs:e.setRequestLogs,refreshConfig:i,setPreviewImage:e.setPreviewImage}):t===`network`?(0,O.jsx)(ln,{}):t===`settings`?(0,O.jsx)(hn,{showEmails:e.showEmails,setShowEmails:e.setShowEmails,config:r,busy:n,status:e.status,setBusy:e.setBusy,setConfig:e.setConfig,setStatus:e.setStatus,refreshConfig:i}):(0,O.jsx)(Pt,{logs:e.requestLogs})}function _n({workspace:e}){return(0,O.jsxs)(`div`,{className:`app-shell`,children:[(0,O.jsx)(Ne,{workspace:e}),(0,O.jsxs)(`main`,{className:`main`,children:[(0,O.jsx)(Pe,{workspace:e}),(0,O.jsx)(gn,{workspace:e})]}),(0,O.jsx)(A,{workspace:e})]})}function vn(e){return{login:(0,_.useCallback)(async()=>{e.setBusy(`login`),e.setStatus(`正在打开 OAuth 登录...`);try{let t=await ze(`/_gateway/admin/login`,{method:`POST`});e.setConfig(t),e.setAccountModalOpen(!1),e.setStatus(`登录完成,账号状态已同步。`)}catch(t){e.setStatus(vt(t))}finally{e.setBusy(null)}},[e]),logout:(0,_.useCallback)(async()=>{if(window.confirm(`确认清空本地保存的所有账号?`)){e.setBusy(`logout`),e.setStatus(`正在清空账号...`);try{let t=await ze(`/_gateway/admin/logout`,{method:`POST`});e.setConfig(t),e.setRequestLogs([]),e.setStatus(`账号已清空。`)}catch(t){e.setStatus(vt(t))}finally{e.setBusy(null)}}},[e]),goRoute:(0,_.useCallback)(t=>{e.setActiveRoute(t),window.location.hash=t},[e]),copyBaseUrl:(0,_.useCallback)(()=>{let t=e.config?.baseUrl||`http://127.0.0.1:8787/v1`;navigator.clipboard.writeText(t).then(()=>e.setStatus(`Base URL 已复制。`),()=>e.setStatus(t))},[e])}}var yn=[{id:`launch`,label:`启动页`,icon:me},{id:`overview`,label:`概览`,icon:he},{id:`accounts`,label:`账号管理`,icon:De},{id:`tester`,label:`接口测试`,icon:we},{id:`docs`,label:`使用文档`,icon:se},{id:`network`,label:`网络检测`,icon:Oe},{id:`logs`,label:`请求日志`,icon:D},{id:`settings`,label:`系统设置`,icon:Ce}];function bn(){let e=window.location.hash.replace(/^#\/?/,``);return yn.some(t=>t.id===e)?e:`overview`}function xn(e){let t=e.config?.profile||null,n=_t(t),r=e.config?.codex?.accountId,i=(0,_.useMemo)(()=>e.config?.profiles.find(e=>r&&e.accountId===r)||null,[r,e.config?.profiles]);return{routes:yn,activeRouteMeta:yn.find(t=>t.id===e.activeRoute)||yn[0],pageDescriptions:{launch:`面向桌面端的启动入口,聚合服务状态、快捷操作和产品视觉。`,overview:t?`当前账号为 ${rt(t,e.showEmails)},套餐 ${Qe(t)},可查看网关状态和运行摘要。`:`还没有激活账号。你可以新增账号、导入账号 JSON,或先查看本地 API 信息。`,accounts:`账号池、额度、套餐、Codex 应用状态集中管理,适合横向比较多个账号。`,tester:`独立接口测试工作区,支持 Chat、Responses、Models 和 gpt-image-2 图片接口。`,docs:`查看 AI-Zero-Token Skill.md,复制 Base URL、下载文档,并按步骤接入本地网关。`,network:`单页总览 IPv4、IPv6、DNS、WebRTC、常用平台和版本状态。`,logs:`查看本页快速测试产生的最近请求,包含接口、模型、状态和耗时。`,settings:`调整本地网关、默认模型、代理和自动切换策略的桌面设置页。`},activeProfile:t,codexProfile:i,codexAccountId:r,capability:n,isLoading:e.busy===`initial`&&!e.config}}var Sn=300*1e3,Cn=15*1e3;function wn(){let[e,t]=(0,_.useState)(null),[n,r]=(0,_.useState)(`initial`),[i,a]=(0,_.useState)(`正在读取本地网关状态...`),[o,s]=(0,_.useState)(!1),[c,l]=(0,_.useState)(!1),[u,d]=(0,_.useState)(!1),[f,p]=(0,_.useState)(null),[m,h]=(0,_.useState)(()=>bn()),[g,v]=(0,_.useState)([]),y=(0,_.useCallback)(async e=>{e?.silent||r(e?.runtime?`runtime-refresh`:`refresh`);try{let n=await ze(e?.runtime?`/_gateway/admin/runtime-refresh`:`/_gateway/admin/config`,e?.runtime?{method:`POST`}:void 0);t(n);let r=n.quotaSync;return a(e?.runtime&&r?`状态和额度已刷新:${r.synced}/${r.total} 个账号成功${r.failed?`,${r.failed} 个失败`:``}${r.skipped?`,${r.skipped} 个登录失效已跳过`:``}。`:e?.runtime?`状态和额度已刷新。`:`网关状态已同步。`),n}catch(e){throw a(vt(e)),e}finally{e?.silent||r(null)}},[]);return(0,_.useEffect)(()=>{y().catch(()=>void 0);let e=window.setInterval(()=>{y({silent:!0}).catch(()=>void 0)},6e4);return()=>window.clearInterval(e)},[y]),(0,_.useEffect)(()=>{let e=()=>h(bn());return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},[]),(0,_.useEffect)(()=>{let e=window.setInterval(()=>{document.hidden||y({runtime:!0,silent:!0}).catch(()=>void 0)},Sn);return()=>window.clearInterval(e)},[y]),(0,_.useEffect)(()=>{let t=window.setInterval(()=>{!document.hidden&&e?.settings.autoSwitch.enabled&&y({silent:!0}).catch(()=>void 0)},Cn);return()=>window.clearInterval(t)},[e?.settings.autoSwitch.enabled,y]),(0,_.useEffect)(()=>{let e=e=>{e.key===`Escape`&&(p(null),d(!1),l(!1))};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[]),(0,_.useEffect)(()=>{e&&g.length===0&&v(Tt(e,o))},[e,g.length,o]),{config:e,setConfig:t,busy:n,setBusy:r,status:i,setStatus:a,showEmails:o,setShowEmails:s,accountModalOpen:c,setAccountModalOpen:l,contactOpen:u,setContactOpen:d,previewImage:f,setPreviewImage:p,activeRoute:m,setActiveRoute:h,requestLogs:g,setRequestLogs:v,refreshConfig:y}}function Tn(){let e=wn(),t=xn({config:e.config,busy:e.busy,activeRoute:e.activeRoute,showEmails:e.showEmails}),n=vn(e);return{...e,...t,...n}}function En(){return(0,O.jsx)(_n,{workspace:Tn()})}(0,v.createRoot)(document.getElementById(`root`)).render((0,O.jsx)(_.StrictMode,{children:(0,O.jsx)(En,{})}));