@bitkyc08/opencodex 2.7.27 → 2.7.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,40 +0,0 @@
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 S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(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 N(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,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(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+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(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 P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ee(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 F=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)},I={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=I,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=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.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)!T.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 E(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)T.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 E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ee}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,F)}catch(e){F(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.7`})),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,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){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&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(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`):w=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(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,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.7`})),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`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),k=Symbol.for(`react.activity`),A=Symbol.for(`react.memo_cache_sentinel`),j=Symbol.iterator;function M(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var N=Symbol.for(`react.client.reference`);function P(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===N?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 T:return`Suspense`;case E:return`SuspenseList`;case k:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?P(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return P(e(t))}catch{}}return null}var ee=Array.isArray,F=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L={pending:!1,data:null,method:null,action:null},te=[],ne=-1;function R(e){return{current:e}}function z(e){0>ne||(e.current=te[ne],te[ne]=null,ne--)}function B(e,t){ne++,te[ne]=e.current,e.current=t}var re=R(null),ie=R(null),ae=R(null),oe=R(null);function se(e,t){switch(B(ae,t),B(ie,e),B(re,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}}z(re),B(re,e)}function ce(){z(re),z(ie),z(ae)}function le(e){e.memoizedState!==null&&B(oe,e);var t=re.current,n=Hd(t,e.type);t!==n&&(B(ie,e),B(re,n))}function V(e){ie.current===e&&(z(re),z(ie)),oe.current===e&&(z(oe),Qf._currentValue=L)}var ue,de;function fe(e){if(ue===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ue=t&&t[1]||``,de=-1<e.stack.indexOf(`
2
- at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
3
- `+ue+e+de}var pe=!1;function me(e,t){if(!e||pe)return``;pe=!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{pe=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?fe(n):``}function he(e,t){switch(e.tag){case 26:case 27:case 5:return fe(e.type);case 16:return fe(`Lazy`);case 13:return e.child!==t&&t!==null?fe(`Suspense Fallback`):fe(`Suspense`);case 19:return fe(`SuspenseList`);case 0:case 15:return me(e.type,!1);case 11:return me(e.type.render,!1);case 1:return me(e.type,!0);case 31:return fe(`Activity`);default:return``}}function ge(e){try{var t=``,n=null;do t+=he(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
7
- Error generating stack: `+e.message+`
8
- `+e.stack}}var _e=Object.prototype.hasOwnProperty,ve=t.unstable_scheduleCallback,ye=t.unstable_cancelCallback,be=t.unstable_shouldYield,xe=t.unstable_requestPaint,Se=t.unstable_now,Ce=t.unstable_getCurrentPriorityLevel,H=t.unstable_ImmediatePriority,U=t.unstable_UserBlockingPriority,we=t.unstable_NormalPriority,Te=t.unstable_LowPriority,Ee=t.unstable_IdlePriority,De=t.log,Oe=t.unstable_setDisableYieldValue,ke=null,W=null;function G(e){if(typeof De==`function`&&Oe(e),W&&typeof W.setStrictMode==`function`)try{W.setStrictMode(ke,e)}catch{}}var Ae=Math.clz32?Math.clz32:Ne,je=Math.log,Me=Math.LN2;function Ne(e){return e>>>=0,e===0?32:31-(je(e)/Me|0)|0}var Pe=256,Fe=262144,Ie=4194304;function Le(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 Re(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=Le(n))):i=Le(o):i=Le(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Le(n))):i=Le(o)):i=Le(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 ze(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Be(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 Ve(){var e=Ie;return Ie<<=1,!(Ie&62914560)&&(Ie=4194304),e}function He(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ue(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function We(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-Ae(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&&Ge(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Ge(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ae(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Ke(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ae(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function qe(e,t){var n=t&-t;return n=n&42?1:Je(n),(n&(e.suspendedLanes|t))===0?n:0}function Je(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 Ye(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Xe(){var e=I.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function Ze(e,t){var n=I.p;try{return I.p=e,t()}finally{I.p=n}}var Qe=Math.random().toString(36).slice(2),$e=`__reactFiber$`+Qe,et=`__reactProps$`+Qe,tt=`__reactContainer$`+Qe,nt=`__reactEvents$`+Qe,rt=`__reactListeners$`+Qe,it=`__reactHandles$`+Qe,at=`__reactResources$`+Qe,ot=`__reactMarker$`+Qe;function st(e){delete e[$e],delete e[et],delete e[nt],delete e[rt],delete e[it]}function ct(e){var t=e[$e];if(t)return t;for(var n=e.parentNode;n;){if(t=n[tt]||n[$e]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[$e])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function lt(e){if(e=e[$e]||e[tt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ut(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[at];return t||=e[at]={hoistableStyles:new Map,hoistableScripts:new Map},t}function ft(e){e[ot]=!0}var pt=new Set,mt={};function ht(e,t){gt(e,t),gt(e+`Capture`,t)}function gt(e,t){for(mt[e]=t,e=0;e<t.length;e++)pt.add(t[e])}var _t=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]*$`),vt={},yt={};function bt(e){return _e.call(yt,e)?!0:_e.call(vt,e)?!1:_t.test(e)?yt[e]=!0:(vt[e]=!0,!1)}function xt(e,t,n){if(bt(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 St(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 Ct(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 wt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Tt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Et(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 Dt(e){if(!e._valueTracker){var t=Tt(e)?`checked`:`value`;e._valueTracker=Et(e,t,``+e[t])}}function Ot(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Tt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function kt(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 At=/[\n"\\]/g;function jt(e){return e.replace(At,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Mt(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=``+wt(t)):e.value!==``+wt(t)&&(e.value=``+wt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Pt(e,o,wt(n)):Pt(e,o,wt(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=``+wt(s):e.removeAttribute(`name`)}function Nt(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)){Dt(e);return}n=n==null?``:``+wt(n),t=t==null?n:``+wt(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),Dt(e)}function Pt(e,t,n){t===`number`&&kt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Ft(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=``+wt(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 It(e,t,n){if(t!=null&&(t=``+wt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+wt(n)}function Lt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(ee(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=wt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Dt(e)}function Rt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var zt=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 Bt(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||zt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Vt(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&&Bt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Bt(e,o,t[o])}function Ht(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 Ut=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`]]),Wt=/^[\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 Gt(e){return Wt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Kt(){}var qt=null;function Jt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Yt=null,Xt=null;function Zt(e){var t=lt(e);if(t&&(e=t.stateNode)){var n=e[et]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Mt(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="`+jt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[et]||null;if(!a)throw Error(i(90));Mt(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&&Ot(r)}break a;case`textarea`:It(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Ft(e,!!n.multiple,t,!1)}}}var Qt=!1;function $t(e,t,n){if(Qt)return e(t,n);Qt=!0;try{return e(t)}finally{if(Qt=!1,(Yt!==null||Xt!==null)&&(yu(),Yt&&(t=Yt,e=Xt,Xt=Yt=null,Zt(t),e)))for(t=0;t<e.length;t++)Zt(e[t])}}function en(e,t){var n=e.stateNode;if(n===null)return null;var r=n[et]||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 tn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),nn=!1;if(tn)try{var rn={};Object.defineProperty(rn,"passive",{get:function(){nn=!0}}),window.addEventListener(`test`,rn,rn),window.removeEventListener(`test`,rn,rn)}catch{nn=!1}var an=null,on=null,sn=null;function cn(){if(sn)return sn;var e,t=on,n=t.length,r,i=`value`in an?an.value:an.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 sn=i.slice(e,1<r?1-r:void 0)}function ln(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 un(){return!0}function dn(){return!1}function fn(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)?un:dn,this.isPropagationStopped=dn,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=un)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=un)},persist:function(){},isPersistent:un}),t}var pn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mn=fn(pn),hn=h({},pn,{view:0,detail:0}),gn=fn(hn),_n,vn,yn,bn=h({},hn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:jn,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!==yn&&(yn&&e.type===`mousemove`?(_n=e.screenX-yn.screenX,vn=e.screenY-yn.screenY):vn=_n=0,yn=e),_n)},movementY:function(e){return`movementY`in e?e.movementY:vn}}),xn=fn(bn),Sn=fn(h({},bn,{dataTransfer:0})),Cn=fn(h({},hn,{relatedTarget:0})),wn=fn(h({},pn,{animationName:0,elapsedTime:0,pseudoElement:0})),Tn=fn(h({},pn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),En=fn(h({},pn,{data:0})),Dn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},On={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`},kn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function An(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=kn[e])?!!t[e]:!1}function jn(){return An}var Mn=fn(h({},hn,{key:function(e){if(e.key){var t=Dn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=ln(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?On[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:jn,charCode:function(e){return e.type===`keypress`?ln(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?ln(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Nn=fn(h({},bn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Pn=fn(h({},hn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:jn})),Fn=fn(h({},pn,{propertyName:0,elapsedTime:0,pseudoElement:0})),In=fn(h({},bn,{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})),Ln=fn(h({},pn,{newState:0,oldState:0})),Rn=[9,13,27,32],zn=tn&&`CompositionEvent`in window,Bn=null;tn&&`documentMode`in document&&(Bn=document.documentMode);var Vn=tn&&`TextEvent`in window&&!Bn,Hn=tn&&(!zn||Bn&&8<Bn&&11>=Bn),Un=` `,Wn=!1;function Gn(e,t){switch(e){case`keyup`:return Rn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Kn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var qn=!1;function Jn(e,t){switch(e){case`compositionend`:return Kn(t);case`keypress`:return t.which===32?(Wn=!0,Un):null;case`textInput`:return e=t.data,e===Un&&Wn?null:e;default:return null}}function Yn(e,t){if(qn)return e===`compositionend`||!zn&&Gn(e,t)?(e=cn(),sn=on=an=null,qn=!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 Hn&&t.locale!==`ko`?null:t.data;default:return null}}var Xn={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 Zn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Xn[e.type]:t===`textarea`}function Qn(e,t,n,r){Yt?Xt?Xt.push(r):Xt=[r]:Yt=r,t=Td(t,`onChange`),0<t.length&&(n=new mn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var $n=null,er=null;function tr(e){vd(e,0)}function nr(e){if(Ot(ut(e)))return e}function rr(e,t){if(e===`change`)return t}var ir=!1;if(tn){var ar;if(tn){var or=`oninput`in document;if(!or){var sr=document.createElement(`div`);sr.setAttribute(`oninput`,`return;`),or=typeof sr.oninput==`function`}ar=or}else ar=!1;ir=ar&&(!document.documentMode||9<document.documentMode)}function cr(){$n&&($n.detachEvent(`onpropertychange`,lr),er=$n=null)}function lr(e){if(e.propertyName===`value`&&nr(er)){var t=[];Qn(t,er,e,Jt(e)),$t(tr,t)}}function ur(e,t,n){e===`focusin`?(cr(),$n=t,er=n,$n.attachEvent(`onpropertychange`,lr)):e===`focusout`&&cr()}function dr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return nr(er)}function fr(e,t){if(e===`click`)return nr(t)}function pr(e,t){if(e===`input`||e===`change`)return nr(t)}function mr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var hr=typeof Object.is==`function`?Object.is:mr;function gr(e,t){if(hr(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(!_e.call(t,i)||!hr(e[i],t[i]))return!1}return!0}function _r(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function vr(e,t){var n=_r(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=_r(n)}}function yr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?yr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function br(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=kt(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=kt(e.document)}return t}function xr(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 Sr=tn&&`documentMode`in document&&11>=document.documentMode,Cr=null,wr=null,Tr=null,Er=!1;function Dr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Er||Cr==null||Cr!==kt(r)||(r=Cr,`selectionStart`in r&&xr(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}),Tr&&gr(Tr,r)||(Tr=r,r=Td(wr,`onSelect`),0<r.length&&(t=new mn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Cr)))}function Or(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var kr={animationend:Or(`Animation`,`AnimationEnd`),animationiteration:Or(`Animation`,`AnimationIteration`),animationstart:Or(`Animation`,`AnimationStart`),transitionrun:Or(`Transition`,`TransitionRun`),transitionstart:Or(`Transition`,`TransitionStart`),transitioncancel:Or(`Transition`,`TransitionCancel`),transitionend:Or(`Transition`,`TransitionEnd`)},Ar={},jr={};tn&&(jr=document.createElement(`div`).style,`AnimationEvent`in window||(delete kr.animationend.animation,delete kr.animationiteration.animation,delete kr.animationstart.animation),`TransitionEvent`in window||delete kr.transitionend.transition);function Mr(e){if(Ar[e])return Ar[e];if(!kr[e])return e;var t=kr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in jr)return Ar[e]=t[n];return e}var Nr=Mr(`animationend`),Pr=Mr(`animationiteration`),Fr=Mr(`animationstart`),Ir=Mr(`transitionrun`),Lr=Mr(`transitionstart`),Rr=Mr(`transitioncancel`),zr=Mr(`transitionend`),Br=new Map,Vr=`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(` `);Vr.push(`scrollEnd`);function Hr(e,t){Br.set(e,t),ht(t,[e])}var Ur=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)},Wr=[],Gr=0,Kr=0;function qr(){for(var e=Gr,t=Kr=Gr=0;t<e;){var n=Wr[t];Wr[t++]=null;var r=Wr[t];Wr[t++]=null;var i=Wr[t];Wr[t++]=null;var a=Wr[t];if(Wr[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&&Zr(n,i,a)}}function Jr(e,t,n,r){Wr[Gr++]=e,Wr[Gr++]=t,Wr[Gr++]=n,Wr[Gr++]=r,Kr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Yr(e,t,n,r){return Jr(e,t,n,r),Qr(e)}function Xr(e,t){return Jr(e,null,null,t),Qr(e)}function Zr(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-Ae(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Qr(e){if(50<uu)throw uu=0,du=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var $r={};function ei(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 ti(e,t,n,r){return new ei(e,t,n,r)}function ni(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ri(e,t){var n=e.alternate;return n===null?(n=ti(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 ii(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 ai(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)ni(e)&&(s=1);else if(typeof e==`string`)s=Uf(e,n,re.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case k:return e=ti(31,n,t,a),e.elementType=k,e.lanes=o,e;case y:return oi(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=ti(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=ti(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=ti(19,n,t,a),e.elementType=E,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case D:s=14;break a;case O:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=ti(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function oi(e,t,n,r){return e=ti(7,e,r,t),e.lanes=n,e}function si(e,t,n){return e=ti(6,e,null,t),e.lanes=n,e}function ci(e){var t=ti(18,null,null,0);return t.stateNode=e,t}function li(e,t,n){return t=ti(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ui=new WeakMap;function di(e,t){if(typeof e==`object`&&e){var n=ui.get(e);return n===void 0?(t={value:e,source:t,stack:ge(t)},ui.set(e,t),t):n}return{value:e,source:t,stack:ge(t)}}var fi=[],pi=0,mi=null,hi=0,gi=[],_i=0,vi=null,yi=1,bi=``;function xi(e,t){fi[pi++]=hi,fi[pi++]=mi,mi=e,hi=t}function Si(e,t,n){gi[_i++]=yi,gi[_i++]=bi,gi[_i++]=vi,vi=e;var r=yi;e=bi;var i=32-Ae(r)-1;r&=~(1<<i),n+=1;var a=32-Ae(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,yi=1<<32-Ae(t)+i|n<<i|r,bi=a+e}else yi=1<<a|n<<i|r,bi=e}function Ci(e){e.return!==null&&(xi(e,1),Si(e,1,0))}function wi(e){for(;e===mi;)mi=fi[--pi],fi[pi]=null,hi=fi[--pi],fi[pi]=null;for(;e===vi;)vi=gi[--_i],gi[_i]=null,bi=gi[--_i],gi[_i]=null,yi=gi[--_i],gi[_i]=null}function Ti(e,t){gi[_i++]=yi,gi[_i++]=bi,gi[_i++]=vi,yi=t.id,bi=t.overflow,vi=e}var Ei=null,Di=null,K=!1,Oi=null,ki=!1,Ai=Error(i(519));function ji(e){throw Li(di(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Ai}function Mi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[$e]=e,t[et]=r,n){case`dialog`:$(`cancel`,t),$(`close`,t);break;case`iframe`:case`object`:case`embed`:$(`load`,t);break;case`video`:case`audio`:for(n=0;n<gd.length;n++)$(gd[n],t);break;case`source`:$(`error`,t);break;case`img`:case`image`:case`link`:$(`error`,t),$(`load`,t);break;case`details`:$(`toggle`,t);break;case`input`:$(`invalid`,t),Nt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:$(`invalid`,t);break;case`textarea`:$(`invalid`,t),Lt(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||jd(t.textContent,n)?(r.popover!=null&&($(`beforetoggle`,t),$(`toggle`,t)),r.onScroll!=null&&$(`scroll`,t),r.onScrollEnd!=null&&$(`scrollend`,t),r.onClick!=null&&(t.onclick=Kt),t=!0):t=!1,t||ji(e,!0)}function Ni(e){for(Ei=e.return;Ei;)switch(Ei.tag){case 5:case 31:case 13:ki=!1;return;case 27:case 3:ki=!0;return;default:Ei=Ei.return}}function Pi(e){if(e!==Ei)return!1;if(!K)return Ni(e),K=!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&&Di&&ji(e),Ni(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Di=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Di=uf(e)}else t===27?(t=Di,Zd(e.type)?(e=lf,lf=null,Di=e):Di=t):Di=Ei?cf(e.stateNode.nextSibling):null;return!0}function Fi(){Di=Ei=null,K=!1}function Ii(){var e=Oi;return e!==null&&(Xl===null?Xl=e:Xl.push.apply(Xl,e),Oi=null),e}function Li(e){Oi===null?Oi=[e]:Oi.push(e)}var Ri=R(null),zi=null,Bi=null;function Vi(e,t,n){B(Ri,t._currentValue),t._currentValue=n}function Hi(e){e._currentValue=Ri.current,z(Ri)}function Ui(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 Wi(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),Ui(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),Ui(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 Gi(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;hr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===oe.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&&Wi(t,e,n,r),t.flags|=262144}function Ki(e){for(e=e.firstContext;e!==null;){if(!hr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function qi(e){zi=e,Bi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ji(e){return Xi(zi,e)}function Yi(e,t){return zi===null&&qi(e),Xi(e,t)}function Xi(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Bi===null){if(e===null)throw Error(i(308));Bi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Bi=Bi.next=t;return n}var Zi=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()})}},Qi=t.unstable_scheduleCallback,$i=t.unstable_NormalPriority,ea={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ta(){return{controller:new Zi,data:new Map,refCount:0}}function na(e){e.refCount--,e.refCount===0&&Qi($i,function(){e.controller.abort()})}var ra=null,ia=0,aa=0,oa=null;function sa(e,t){if(ra===null){var n=ra=[];ia=0,aa=ud(),oa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ia++,t.then(ca,ca),t}function ca(){if(--ia===0&&ra!==null){oa!==null&&(oa.status=`fulfilled`);var e=ra;ra=null,aa=0,oa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function la(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 ua=F.S;F.S=function(e,t){$l=Se(),typeof t==`object`&&t&&typeof t.then==`function`&&sa(e,t),ua!==null&&ua(e,t)};var da=R(null);function fa(){var e=da.current;return e===null?Ll.pooledCache:e}function pa(e,t){t===null?B(da,da.current):B(da,t.pool)}function ma(){var e=fa();return e===null?null:{parent:ea._currentValue,pool:e}}var ha=Error(i(460)),ga=Error(i(474)),_a=Error(i(542)),va={then:function(){}};function ya(e){return e=e.status,e===`fulfilled`||e===`rejected`}function ba(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Kt,Kt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,wa(e),e;default:if(typeof t.status==`string`)t.then(Kt,Kt);else{if(e=Ll,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,wa(e),e}throw Sa=t,ha}}function xa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Sa=e,ha):e}}var Sa=null;function Ca(){if(Sa===null)throw Error(i(459));var e=Sa;return Sa=null,e}function wa(e){if(e===ha||e===_a)throw Error(i(483))}var Ta=null,Ea=0;function Da(e){var t=Ea;return Ea+=1,Ta===null&&(Ta=[]),ba(Ta,e,t)}function Oa(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function ka(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 Aa(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=ri(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=si(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===O&&xa(i)===t.type)?(t=a(t,n.props),Oa(t,n),t.return=e,t):(t=ai(n.type,n.key,n.props,null,e.mode,r),Oa(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=li(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=oi(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=si(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=ai(t.type,t.key,t.props,null,e.mode,n),Oa(n,t),n.return=e,n;case v:return t=li(t,e.mode,n),t.return=e,t;case O:return t=xa(t),f(e,t,n)}if(ee(t)||M(t))return t=oi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Da(t),n);if(t.$$typeof===C)return f(e,Yi(e,t),n);ka(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 O:return n=xa(n),p(e,t,n,r)}if(ee(n)||M(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Da(n),r);if(n.$$typeof===C)return p(e,t,Yi(e,n),r);ka(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 O:return r=xa(r),m(e,t,n,r,i)}if(ee(r)||M(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Da(r),i);if(r.$$typeof===C)return m(e,t,n,Yi(t,r),i);ka(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),K&&xi(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 K&&xi(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)}),K&&xi(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),K&&xi(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 K&&xi(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)}),K&&xi(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===O&&xa(l)===r.type){n(e,r.sibling),c=a(r,o.props),Oa(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=oi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ai(o.type,o.key,o.props,null,e.mode,c),Oa(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=li(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=xa(o),b(e,r,o,c)}if(ee(o))return h(e,r,o,c);if(M(o)){if(l=M(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,Da(o),c);if(o.$$typeof===C)return b(e,r,Yi(e,o),c);ka(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=si(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ea=0;var i=b(e,t,n,r);return Ta=null,i}catch(t){if(t===ha||t===_a)throw t;var a=ti(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var ja=Aa(!0),Ma=Aa(!1),Na=!1;function Pa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Fa(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 Ia(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function La(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,J&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Qr(e),Zr(e,null,n),t}return Jr(e,r,t,n),Qr(e)}function Ra(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,Ke(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 Ba=!1;function Va(){if(Ba){var e=oa;if(e!==null)throw e}}function Ha(e,t,n,r){Ba=!1;var i=e.updateQueue;Na=!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?(X&f)===f:(r&f)===f){f!==0&&f===aa&&(Ba=!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:Na=!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),Wl|=o,e.lanes=o,e.memoizedState=d}}function Ua(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Wa(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ua(n[e],t)}var Ga=R(null),Ka=R(0);function qa(e,t){e=Hl,B(Ka,e),B(Ga,t),Hl=e|t.baseLanes}function Ja(){B(Ka,Hl),B(Ga,Ga.current)}function Ya(){Hl=Ka.current,z(Ga),z(Ka)}var Xa=R(null),Za=null;function Qa(e){var t=e.alternate;B(ro,ro.current&1),B(Xa,e),Za===null&&(t===null||Ga.current!==null||t.memoizedState!==null)&&(Za=e)}function $a(e){B(ro,ro.current),B(Xa,e),Za===null&&(Za=e)}function eo(e){e.tag===22?(B(ro,ro.current),B(Xa,e),Za===null&&(Za=e)):to(e)}function to(){B(ro,ro.current),B(Xa,Xa.current)}function no(e){z(Xa),Za===e&&(Za=null),z(ro)}var ro=R(0);function io(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 ao=0,q=null,oo=null,so=null,co=!1,lo=!1,uo=!1,fo=0,po=0,mo=null,ho=0;function go(){throw Error(i(321))}function _o(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!hr(e[n],t[n]))return!1;return!0}function vo(e,t,n,r,i,a){return ao=a,q=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,F.H=e===null||e.memoizedState===null?Fs:Is,uo=!1,a=n(r,i),uo=!1,lo&&(a=bo(t,n,r,i)),yo(e),a}function yo(e){F.H=Ps;var t=oo!==null&&oo.next!==null;if(ao=0,so=oo=q=null,co=!1,po=0,mo=null,t)throw Error(i(300));e===null||$s||(e=e.dependencies,e!==null&&Ki(e)&&($s=!0))}function bo(e,t,n,r){q=e;var a=0;do{if(lo&&(mo=null),po=0,lo=!1,25<=a)throw Error(i(301));if(a+=1,so=oo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}F.H=Ls,o=t(n,r)}while(lo);return o}function xo(){var e=F.H,t=e.useState()[0];return t=typeof t.then==`function`?Oo(t):t,e=e.useState()[0],(oo===null?null:oo.memoizedState)!==e&&(q.flags|=1024),t}function So(){var e=fo!==0;return fo=0,e}function Co(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function wo(e){if(co){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}co=!1}ao=0,so=oo=q=null,lo=!1,po=fo=0,mo=null}function To(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return so===null?q.memoizedState=so=e:so=so.next=e,so}function Eo(){if(oo===null){var e=q.alternate;e=e===null?null:e.memoizedState}else e=oo.next;var t=so===null?q.memoizedState:so.next;if(t!==null)so=t,oo=e;else{if(e===null)throw q.alternate===null?Error(i(467)):Error(i(310));oo=e,e={memoizedState:oo.memoizedState,baseState:oo.baseState,baseQueue:oo.baseQueue,queue:oo.queue,next:null},so===null?q.memoizedState=so=e:so=so.next=e}return so}function Do(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Oo(e){var t=po;return po+=1,mo===null&&(mo=[]),e=ba(mo,e,t),t=q,(so===null?t.memoizedState:so.next)===null&&(t=t.alternate,F.H=t===null||t.memoizedState===null?Fs:Is),e}function ko(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Oo(e);if(e.$$typeof===C)return Ji(e)}throw Error(i(438,String(e)))}function Ao(e){var t=null,n=q.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=q.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=Do(),q.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]=A;return t.index++,n}function jo(e,t){return typeof t==`function`?t(e):t}function Mo(e){return No(Eo(),oo,e)}function No(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?(ao&f)===f:(X&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===aa&&(d=!0);else if((ao&p)===p){u=u.next,p===aa&&(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,q.lanes|=p,Wl|=p;f=u.action,uo&&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,q.lanes|=f,Wl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!hr(o,e.memoizedState)&&($s=!0,d&&(n=oa,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 Po(e){var t=Eo(),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);hr(o,t.memoizedState)||($s=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Fo(e,t,n){var r=q,a=Eo(),o=K;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!hr((oo||a).memoizedState,n);if(s&&(a.memoizedState=n,$s=!0),a=a.queue,os(Ro.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||so!==null&&so.memoizedState.tag&1){if(r.flags|=2048,ts(9,{destroy:void 0},Lo.bind(null,r,a,n,t),null),Ll===null)throw Error(i(349));o||ao&127||Io(r,t,n)}return n}function Io(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=q.updateQueue,t===null?(t=Do(),q.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Lo(e,t,n,r){t.value=n,t.getSnapshot=r,zo(t)&&Bo(e)}function Ro(e,t,n){return n(function(){zo(t)&&Bo(e)})}function zo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!hr(e,n)}catch{return!0}}function Bo(e){var t=Xr(e,2);t!==null&&mu(t,e,2)}function Vo(e){var t=To();if(typeof e==`function`){var n=e;if(e=n(),uo){G(!0);try{n()}finally{G(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:e},t}function Ho(e,t,n,r){return e.baseState=n,No(e,oo,typeof r==`function`?r:jo)}function Uo(e,t,n,r,a){if(js(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)}};F.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Wo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Wo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=F.T,o={};F.T=o;try{var s=n(i,r),c=F.S;c!==null&&c(o,s),Go(e,t,s)}catch(n){qo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),F.T=a}}else try{a=n(i,r),Go(e,t,a)}catch(n){qo(e,t,n)}}function Go(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Ko(e,t,n)},function(n){return qo(e,t,n)}):Ko(e,t,n)}function Ko(e,t,n){t.status=`fulfilled`,t.value=n,Jo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Wo(e,n)))}function qo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Jo(t),t=t.next;while(t!==r)}e.action=null}function Jo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Yo(e,t){return t}function Xo(e,t){if(K){var n=Ll.formState;if(n!==null){a:{var r=q;if(K){if(Di){b:{for(var i=Di,a=ki;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){Di=cf(i.nextSibling),r=i.data===`F!`;break a}}ji(r)}r=!1}r&&(t=n[0])}}return n=To(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yo,lastRenderedState:t},n.queue=r,n=Os.bind(null,q,r),r.dispatch=n,r=Vo(!1),a=As.bind(null,q,!1,r.queue),r=To(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Uo.bind(null,q,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Zo(e){return Qo(Eo(),oo,e)}function Qo(e,t,n){if(t=No(e,t,Yo)[0],e=Mo(jo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Oo(t)}catch(e){throw e===ha?_a:e}else r=t;t=Eo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(q.flags|=2048,ts(9,{destroy:void 0},$o.bind(null,i,n),null)),[r,a,e]}function $o(e,t){e.action=t}function es(e){var t=Eo(),n=oo;if(n!==null)return Qo(t,n,e);Eo(),t=t.memoizedState,n=Eo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ts(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=q.updateQueue,t===null&&(t=Do(),q.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 ns(){return Eo().memoizedState}function rs(e,t,n,r){var i=To();q.flags|=e,i.memoizedState=ts(1|t,{destroy:void 0},n,r===void 0?null:r)}function is(e,t,n,r){var i=Eo();r=r===void 0?null:r;var a=i.memoizedState.inst;oo!==null&&r!==null&&_o(r,oo.memoizedState.deps)?i.memoizedState=ts(t,a,n,r):(q.flags|=e,i.memoizedState=ts(1|t,a,n,r))}function as(e,t){rs(8390656,8,e,t)}function os(e,t){is(2048,8,e,t)}function ss(e){q.flags|=4;var t=q.updateQueue;if(t===null)t=Do(),q.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function cs(e){var t=Eo().memoizedState;return ss({ref:t,nextImpl:e}),function(){if(J&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function ls(e,t){return is(4,2,e,t)}function us(e,t){return is(4,4,e,t)}function ds(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 fs(e,t,n){n=n==null?null:n.concat([e]),is(4,4,ds.bind(null,t,e),n)}function ps(){}function ms(e,t){var n=Eo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&_o(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function hs(e,t){var n=Eo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&_o(t,r[1]))return r[0];if(r=e(),uo){G(!0);try{e()}finally{G(!1)}}return n.memoizedState=[r,t],r}function gs(e,t,n){return n===void 0||ao&1073741824&&!(X&261930)?e.memoizedState=t:(e.memoizedState=n,e=pu(),q.lanes|=e,Wl|=e,n)}function _s(e,t,n,r){return hr(n,t)?n:Ga.current===null?!(ao&42)||ao&1073741824&&!(X&261930)?($s=!0,e.memoizedState=n):(e=pu(),q.lanes|=e,Wl|=e,t):(e=gs(e,n,r),hr(e,t)||($s=!0),e)}function vs(e,t,n,r,i){var a=I.p;I.p=a!==0&&8>a?a:8;var o=F.T,s={};F.T=s,As(e,!1,t,n);try{var c=i(),l=F.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?ks(e,t,la(c,r),fu(e)):ks(e,t,r,fu(e))}catch(n){ks(e,t,{then:function(){},status:`rejected`,reason:n},fu())}finally{I.p=a,o!==null&&s.types!==null&&(o.types=s.types),F.T=o}}function ys(){}function bs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=xs(e).queue;vs(e,a,t,L,n===null?ys:function(){return Ss(e),n(r)})}function xs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:L,baseState:L,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:L},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ss(e){var t=xs(e);t.next===null&&(t=e.alternate.memoizedState),ks(e,t.next.queue,{},fu())}function Cs(){return Ji(Qf)}function ws(){return Eo().memoizedState}function Ts(){return Eo().memoizedState}function Es(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=fu();e=Ia(n);var r=La(t,e,n);r!==null&&(mu(r,t,n),Ra(r,t,n)),t={cache:ta()},e.payload=t;return}t=t.return}}function Ds(e,t,n){var r=fu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},js(e)?Ms(t,n):(n=Yr(e,t,n,r),n!==null&&(mu(n,e,r),Ns(n,t,r)))}function Os(e,t,n){ks(e,t,n,fu())}function ks(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(js(e))Ms(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,hr(s,o))return Jr(e,t,i,0),Ll===null&&qr(),!1}catch{}if(n=Yr(e,t,i,r),n!==null)return mu(n,e,r),Ns(n,t,r),!0}return!1}function As(e,t,n,r){if(r={lane:2,revertLane:ud(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},js(e)){if(t)throw Error(i(479))}else t=Yr(e,n,r,2),t!==null&&mu(t,e,2)}function js(e){var t=e.alternate;return e===q||t!==null&&t===q}function Ms(e,t){lo=co=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ns(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ke(e,n)}}var Ps={readContext:Ji,use:ko,useCallback:go,useContext:go,useEffect:go,useImperativeHandle:go,useLayoutEffect:go,useInsertionEffect:go,useMemo:go,useReducer:go,useRef:go,useState:go,useDebugValue:go,useDeferredValue:go,useTransition:go,useSyncExternalStore:go,useId:go,useHostTransitionStatus:go,useFormState:go,useActionState:go,useOptimistic:go,useMemoCache:go,useCacheRefresh:go};Ps.useEffectEvent=go;var Fs={readContext:Ji,use:ko,useCallback:function(e,t){return To().memoizedState=[e,t===void 0?null:t],e},useContext:Ji,useEffect:as,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),rs(4194308,4,ds.bind(null,t,e),n)},useLayoutEffect:function(e,t){return rs(4194308,4,e,t)},useInsertionEffect:function(e,t){rs(4,2,e,t)},useMemo:function(e,t){var n=To();t=t===void 0?null:t;var r=e();if(uo){G(!0);try{e()}finally{G(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=To();if(n!==void 0){var i=n(t);if(uo){G(!0);try{n(t)}finally{G(!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=Ds.bind(null,q,e),[r.memoizedState,e]},useRef:function(e){var t=To();return e={current:e},t.memoizedState=e},useState:function(e){e=Vo(e);var t=e.queue,n=Os.bind(null,q,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ps,useDeferredValue:function(e,t){return gs(To(),e,t)},useTransition:function(){var e=Vo(!1);return e=vs.bind(null,q,e.queue,!0,!1),To().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=q,a=To();if(K){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Ll===null)throw Error(i(349));X&127||Io(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,as(Ro.bind(null,r,o,e),[e]),r.flags|=2048,ts(9,{destroy:void 0},Lo.bind(null,r,o,n,t),null),n},useId:function(){var e=To(),t=Ll.identifierPrefix;if(K){var n=bi,r=yi;n=(r&~(1<<32-Ae(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=fo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=ho++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Cs,useFormState:Xo,useActionState:Xo,useOptimistic:function(e){var t=To();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=As.bind(null,q,!0,n),n.dispatch=t,[e,t]},useMemoCache:Ao,useCacheRefresh:function(){return To().memoizedState=Es.bind(null,q)},useEffectEvent:function(e){var t=To(),n={impl:e};return t.memoizedState=n,function(){if(J&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Is={readContext:Ji,use:ko,useCallback:ms,useContext:Ji,useEffect:os,useImperativeHandle:fs,useInsertionEffect:ls,useLayoutEffect:us,useMemo:hs,useReducer:Mo,useRef:ns,useState:function(){return Mo(jo)},useDebugValue:ps,useDeferredValue:function(e,t){return _s(Eo(),oo.memoizedState,e,t)},useTransition:function(){var e=Mo(jo)[0],t=Eo().memoizedState;return[typeof e==`boolean`?e:Oo(e),t]},useSyncExternalStore:Fo,useId:ws,useHostTransitionStatus:Cs,useFormState:Zo,useActionState:Zo,useOptimistic:function(e,t){return Ho(Eo(),oo,e,t)},useMemoCache:Ao,useCacheRefresh:Ts};Is.useEffectEvent=cs;var Ls={readContext:Ji,use:ko,useCallback:ms,useContext:Ji,useEffect:os,useImperativeHandle:fs,useInsertionEffect:ls,useLayoutEffect:us,useMemo:hs,useReducer:Po,useRef:ns,useState:function(){return Po(jo)},useDebugValue:ps,useDeferredValue:function(e,t){var n=Eo();return oo===null?gs(n,e,t):_s(n,oo.memoizedState,e,t)},useTransition:function(){var e=Po(jo)[0],t=Eo().memoizedState;return[typeof e==`boolean`?e:Oo(e),t]},useSyncExternalStore:Fo,useId:ws,useHostTransitionStatus:Cs,useFormState:es,useActionState:es,useOptimistic:function(e,t){var n=Eo();return oo===null?(n.baseState=e,[e,n.queue.dispatch]):Ho(n,oo,e,t)},useMemoCache:Ao,useCacheRefresh:Ts};Ls.useEffectEvent=cs;function Rs(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 zs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=fu(),i=Ia(r);i.payload=t,n!=null&&(i.callback=n),t=La(e,i,r),t!==null&&(mu(t,e,r),Ra(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=fu(),i=Ia(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=La(e,i,r),t!==null&&(mu(t,e,r),Ra(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=fu(),r=Ia(n);r.tag=2,t!=null&&(r.callback=t),t=La(e,r,n),t!==null&&(mu(t,e,n),Ra(t,e,n))}};function Bs(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?!gr(n,r)||!gr(i,a):!0}function Vs(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&&zs.enqueueReplaceState(t,t.state,null)}function Hs(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 Us(e){Ur(e)}function Ws(e){console.error(e)}function Gs(e){Ur(e)}function Ks(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function qs(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 Js(e,t,n){return n=Ia(n),n.tag=3,n.payload={element:null},n.callback=function(){Ks(e,t)},n}function Ys(e){return e=Ia(e),e.tag=3,e}function Xs(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(){qs(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){qs(t,n,r),typeof i!=`function`&&(nu===null?nu=new Set([this]):nu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Zs(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Gi(t,n,a,!0),n=Xa.current,n!==null){switch(n.tag){case 31:case 13:return Za===null?Eu():n.alternate===null&&Ul===0&&(Ul=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===va?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Wu(e,r,a)),!1;case 22:return n.flags|=65536,r===va?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)),Wu(e,r,a)),!1}throw Error(i(435,n.tag))}return Wu(e,r,a),Eu(),!1}if(K)return t=Xa.current,t===null?(r!==Ai&&(t=Error(i(423),{cause:r}),Li(di(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=di(r,n),a=Js(e.stateNode,r,a),za(e,a),Ul!==4&&(Ul=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Ai&&(e=Error(i(422),{cause:r}),Li(di(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=di(o,n),Yl===null?Yl=[o]:Yl.push(o),Ul!==4&&(Ul=2),t===null)return!0;r=di(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Js(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`&&(nu===null||!nu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Ys(a),Xs(a,e,n,r),za(n,a),!1}n=n.return}while(n!==null);return!1}var Qs=Error(i(461)),$s=!1;function ec(e,t,n,r){t.child=e===null?Ma(t,null,n,r):ja(t,e.child,n,r)}function tc(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 qi(t),r=vo(e,t,n,o,a,i),s=So(),e!==null&&!$s?(Co(e,t,i),Tc(e,t,i)):(K&&s&&Ci(t),t.flags|=1,ec(e,t,r,i),t.child)}function nc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ni(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,rc(e,t,a,r,i)):(e=ai(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Ec(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?gr:n,n(o,r)&&e.ref===t.ref)return Tc(e,t,i)}return t.flags|=1,e=ri(a,r),e.ref=t.ref,e.return=t,t.child=e}function rc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(gr(a,r)&&e.ref===t.ref)if($s=!1,t.pendingProps=r=a,Ec(e,i))e.flags&131072&&($s=!0);else return t.lanes=e.lanes,Tc(e,t,i)}return dc(e,t,n,r,i)}function ic(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 oc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&pa(t,a===null?null:a.cachePool),a===null?Ja():qa(t,a),eo(t);else return r=t.lanes=536870912,oc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&pa(t,null),Ja(),to(t)):(pa(t,a.cachePool),qa(t,a),to(t),t.memoizedState=null);return ec(e,t,i,n),t.child}function ac(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function oc(e,t,n,r,i){var a=fa();return a=a===null?null:{parent:ea._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&pa(t,null),Ja(),eo(t),e!==null&&Gi(e,t,r,!0),t.childLanes=i,null}function sc(e,t){return t=bc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function cc(e,t,n){return ja(t,e.child,null,n),e=sc(t,t.pendingProps),e.flags|=2,no(t),t.memoizedState=null,e}function lc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(K){if(r.mode===`hidden`)return e=sc(t,r),t.lanes=536870912,ac(null,e);if($a(t),(e=Di)?(e=rf(e,ki),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:vi===null?null:{id:yi,overflow:bi},retryLane:536870912,hydrationErrors:null},n=ci(e),n.return=t,t.child=n,Ei=t,Di=null)):e=null,e===null)throw ji(t);return t.lanes=536870912,null}return sc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if($a(t),a)if(t.flags&256)t.flags&=-257,t=cc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if($s||Gi(e,t,n,!1),a=(n&e.childLanes)!==0,$s||a){if(r=Ll,r!==null&&(s=qe(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Xr(e,s),mu(r,e,s),Qs;Eu(),t=cc(e,t,n)}else e=o.treeContext,Di=cf(s.nextSibling),Ei=t,K=!0,Oi=null,ki=!1,e!==null&&Ti(t,e),t=sc(t,r),t.flags|=4096;return t}return e=ri(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function uc(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 dc(e,t,n,r,i){return qi(t),n=vo(e,t,n,r,void 0,i),r=So(),e!==null&&!$s?(Co(e,t,i),Tc(e,t,i)):(K&&r&&Ci(t),t.flags|=1,ec(e,t,n,i),t.child)}function fc(e,t,n,r,i,a){return qi(t),t.updateQueue=null,n=bo(t,r,n,i),yo(e),r=So(),e!==null&&!$s?(Co(e,t,a),Tc(e,t,a)):(K&&r&&Ci(t),t.flags|=1,ec(e,t,n,a),t.child)}function pc(e,t,n,r,i){if(qi(t),t.stateNode===null){var a=$r,o=n.contextType;typeof o==`object`&&o&&(a=Ji(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=zs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Pa(t),o=n.contextType,a.context=typeof o==`object`&&o?Ji(o):$r,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Rs(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&&zs.enqueueReplaceState(a,a.state,null),Ha(t,r,a,i),Va(),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=Hs(n,s);a.props=c;var l=a.context,u=n.contextType;o=$r,typeof u==`object`&&u&&(o=Ji(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)&&Vs(t,a,r,o),Na=!1;var f=t.memoizedState;a.state=f,Ha(t,r,a,i),Va(),l=t.memoizedState,s||f!==l||Na?(typeof d==`function`&&(Rs(t,n,d,r),l=t.memoizedState),(c=Na||Bs(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,Fa(e,t),o=t.memoizedProps,u=Hs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=$r,typeof l==`object`&&l&&(c=Ji(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)&&Vs(t,a,r,c),Na=!1,f=t.memoizedState,a.state=f,Ha(t,r,a,i),Va();var p=t.memoizedState;o!==d||f!==p||Na||e!==null&&e.dependencies!==null&&Ki(e.dependencies)?(typeof s==`function`&&(Rs(t,n,s,r),p=t.memoizedState),(u=Na||Bs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Ki(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,uc(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=ja(t,e.child,null,i),t.child=ja(t,null,n,i)):ec(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Tc(e,t,i),e}function mc(e,t,n,r){return Fi(),t.flags|=256,ec(e,t,n,r),t.child}var hc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function gc(e){return{baseLanes:e,cachePool:ma()}}function _c(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=ql),e}function vc(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:(ro.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(K){if(a?Qa(t):to(t),(e=Di)?(e=rf(e,ki),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:vi===null?null:{id:yi,overflow:bi},retryLane:536870912,hydrationErrors:null},n=ci(e),n.return=t,t.child=n,Ei=t,Di=null)):e=null,e===null)throw ji(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(to(t),a=t.mode,c=bc({mode:`hidden`,children:c},a),r=oi(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=gc(n),r.childLanes=_c(e,s,n),t.memoizedState=hc,ac(null,r)):(Qa(t),yc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(Qa(t),t.flags&=-257,t=xc(e,t,n)):t.memoizedState===null?(to(t),c=r.fallback,a=t.mode,r=bc({mode:`visible`,children:r.children},a),c=oi(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,ja(t,e.child,null,n),r=t.child,r.memoizedState=gc(n),r.childLanes=_c(e,s,n),t.memoizedState=hc,t=ac(null,r)):(to(t),t.child=e.child,t.flags|=128,t=null);else if(Qa(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,Li({value:r,source:null,stack:null}),t=xc(e,t,n)}else if($s||Gi(e,t,n,!1),s=(n&e.childLanes)!==0,$s||s){if(s=Ll,s!==null&&(r=qe(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,Xr(e,r),mu(s,e,r),Qs;af(c)||Eu(),t=xc(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Di=cf(c.nextSibling),Ei=t,K=!0,Oi=null,ki=!1,e!==null&&Ti(t,e),t=yc(t,r.children),t.flags|=4096);return t}return a?(to(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=ri(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=oi(c,a,n,null),c.flags|=2):c=ri(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,ac(null,r),r=t.child,c=e.child.memoizedState,c===null?c=gc(n):(a=c.cachePool,a===null?a=ma():(l=ea._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=_c(e,s,n),t.memoizedState=hc,ac(e.child,r)):(Qa(t),n=e.child,e=n.sibling,n=ri(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 yc(e,t){return t=bc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function bc(e,t){return e=ti(22,e,null,t),e.lanes=0,e}function xc(e,t,n){return ja(t,e.child,null,n),e=yc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Sc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ui(e.return,t,n)}function Cc(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 wc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=ro.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,B(ro,o),ec(e,t,r,n),r=K?hi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Sc(e,n,t);else if(e.tag===19)Sc(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&&io(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Cc(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&&io(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Cc(t,!0,n,null,a,r);break;case`together`:Cc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Tc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Wl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Gi(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=ri(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ri(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ec(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Ki(e))):!0}function Dc(e,t,n){switch(t.tag){case 3:se(t,t.stateNode.containerInfo),Vi(t,ea,e.memoizedState.cache),Fi();break;case 27:case 5:le(t);break;case 4:se(t,t.stateNode.containerInfo);break;case 10:Vi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,$a(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(Qa(t),e=Tc(e,t,n),e===null?null:e.sibling):vc(e,t,n):(Qa(t),t.flags|=128,null);Qa(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Gi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return wc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),B(ro,ro.current),r)break;return null;case 22:return t.lanes=0,ic(e,t,n,t.pendingProps);case 24:Vi(t,ea,e.memoizedState.cache)}return Tc(e,t,n)}function Oc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)$s=!0;else{if(!Ec(e,n)&&!(t.flags&128))return $s=!1,Dc(e,t,n);$s=!!(e.flags&131072)}else $s=!1,K&&t.flags&1048576&&Si(t,hi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=xa(t.elementType),t.type=e,typeof e==`function`)ni(e)?(r=Hs(e,r),t.tag=1,t=pc(null,t,e,r,n)):(t.tag=0,t=dc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=tc(null,t,e,r,n);break a}else if(a===D){t.tag=14,t=nc(null,t,e,r,n);break a}}throw t=P(e)||e,Error(i(306,t,``))}}return t;case 0:return dc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Hs(r,t.pendingProps),pc(e,t,r,a,n);case 3:a:{if(se(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Fa(e,t),Ha(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Vi(t,ea,r),r!==o.cache&&Wi(t,[ea],n,!0),Va(),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=mc(e,t,r,n);break a}else if(r!==a){a=di(Error(i(424)),t),Li(a),t=mc(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(Di=cf(e.firstChild),Ei=t,K=!0,Oi=null,ki=!0,n=Ma(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Fi(),r===a){t=Tc(e,t,n);break a}ec(e,t,r,n)}t=t.child}return t;case 26:return uc(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:K||(n=t.type,e=t.pendingProps,r=Bd(ae.current).createElement(n),r[$e]=t,r[et]=e,Pd(r,n,e),ft(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return le(t),e===null&&K&&(r=t.stateNode=ff(t.type,t.pendingProps,ae.current),Ei=t,ki=!0,a=Di,Zd(t.type)?(lf=a,Di=cf(r.firstChild)):Di=a),ec(e,t,t.pendingProps.children,n),uc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&K&&((a=r=Di)&&(r=tf(r,t.type,t.pendingProps,ki),r===null?a=!1:(t.stateNode=r,Ei=t,Di=cf(r.firstChild),ki=!1,a=!0)),a||ji(t)),le(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=vo(e,t,xo,null,null,n),Qf._currentValue=a),uc(e,t),ec(e,t,r,n),t.child;case 6:return e===null&&K&&((e=n=Di)&&(n=nf(n,t.pendingProps,ki),n===null?e=!1:(t.stateNode=n,Ei=t,Di=null,e=!0)),e||ji(t)),null;case 13:return vc(e,t,n);case 4:return se(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ja(t,null,r,n):ec(e,t,r,n),t.child;case 11:return tc(e,t,t.type,t.pendingProps,n);case 7:return ec(e,t,t.pendingProps,n),t.child;case 8:return ec(e,t,t.pendingProps.children,n),t.child;case 12:return ec(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Vi(t,t.type,r.value),ec(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,qi(t),a=Ji(a),r=r(a),t.flags|=1,ec(e,t,r,n),t.child;case 14:return nc(e,t,t.type,t.pendingProps,n);case 15:return rc(e,t,t.type,t.pendingProps,n);case 19:return wc(e,t,n);case 31:return lc(e,t,n);case 22:return ic(e,t,n,t.pendingProps);case 24:return qi(t),r=Ji(ea),e===null?(a=fa(),a===null&&(a=Ll,o=ta(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Pa(t),Vi(t,ea,a)):((e.lanes&n)!==0&&(Fa(e,t),Ha(t,null,null,n),Va()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Vi(t,ea,r),r!==a.cache&&Wi(t,[ea],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Vi(t,ea,r))),ec(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function kc(e){e.flags|=4}function Ac(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(Cu())e.flags|=8192;else throw Sa=va,ga}else e.flags&=-16777217}function jc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t))if(Cu())e.flags|=8192;else throw Sa=va,ga}function Mc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Ve(),e.lanes|=t,Jl|=t)}function Nc(e,t){if(!K)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 Pc(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 Fc(e,t,n){var r=t.pendingProps;switch(wi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Pc(t),null;case 1:return Pc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Hi(ea),ce(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Pi(t)?kc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ii())),Pc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(kc(t),o===null?(Pc(t),Ac(t,a,null,r,n)):(Pc(t),jc(t,o))):o?o===e.memoizedState?(Pc(t),t.flags&=-16777217):(kc(t),Pc(t),jc(t,o)):(e=e.memoizedProps,e!==r&&kc(t),Pc(t),Ac(t,a,e,r,n)),null;case 27:if(V(t),n=ae.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&kc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Pc(t),null}e=re.current,Pi(t)?Mi(t,e):(e=ff(a,r,n),t.stateNode=e,kc(t))}return Pc(t),null;case 5:if(V(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&kc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Pc(t),null}if(o=re.current,Pi(t))Mi(t,o);else{var s=Bd(ae.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[$e]=t,o[et]=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&&kc(t)}}return Pc(t),Ac(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&kc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=ae.current,Pi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ei,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[$e]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||jd(e.nodeValue,n)),e||ji(t,!0)}else e=Bd(e).createTextNode(r),e[$e]=t,t.stateNode=e}return Pc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Pi(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[$e]=t}else Fi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Pc(t),e=!1}else n=Ii(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(no(t),t):(no(t),null);if(t.flags&128)throw Error(i(558))}return Pc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Pi(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[$e]=t}else Fi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Pc(t),a=!1}else a=Ii(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(no(t),t):(no(t),null)}return no(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),Mc(t,t.updateQueue),Pc(t),null);case 4:return ce(),e===null&&xd(t.stateNode.containerInfo),Pc(t),null;case 10:return Hi(t.type),Pc(t),null;case 19:if(z(ro),r=t.memoizedState,r===null)return Pc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Nc(r,!1);else{if(Ul!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=io(e),o!==null){for(t.flags|=128,Nc(r,!1),e=o.updateQueue,t.updateQueue=e,Mc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ii(n,e),n=n.sibling;return B(ro,ro.current&1|2),K&&xi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Se()>eu&&(t.flags|=128,a=!0,Nc(r,!1),t.lanes=4194304)}else{if(!a)if(e=io(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Mc(t,e),Nc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!K)return Pc(t),null}else 2*Se()-r.renderingStartTime>eu&&n!==536870912&&(t.flags|=128,a=!0,Nc(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?(Pc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Se(),e.sibling=null,n=ro.current,B(ro,a?n&1|2:n&1),K&&xi(t,r.treeForkCount),e);case 22:case 23:return no(t),Ya(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Pc(t),t.subtreeFlags&6&&(t.flags|=8192)):Pc(t),n=t.updateQueue,n!==null&&Mc(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&&z(da),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Hi(ea),Pc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Ic(e,t){switch(wi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Hi(ea),ce(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return V(t),null;case 31:if(t.memoizedState!==null){if(no(t),t.alternate===null)throw Error(i(340));Fi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(no(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Fi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return z(ro),null;case 4:return ce(),null;case 10:return Hi(t.type),null;case 22:case 23:return no(t),Ya(),e!==null&&z(da),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Hi(ea),null;case 25:return null;default:return null}}function Lc(e,t){switch(wi(t),t.tag){case 3:Hi(ea),ce();break;case 26:case 27:case 5:V(t);break;case 4:ce();break;case 31:t.memoizedState!==null&&no(t);break;case 13:no(t);break;case 19:z(ro);break;case 10:Hi(t.type);break;case 22:case 23:no(t),Ya(),e!==null&&z(da);break;case 24:Hi(ea)}}function Rc(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){Q(t,t.return,e)}}function zc(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){Q(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Q(t,t.return,e)}}function Bc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Wa(t,n)}catch(t){Q(e,e.return,t)}}}function Vc(e,t,n){n.props=Hs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Q(e,t,n)}}function Hc(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){Q(e,t,n)}}function Uc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Q(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){Q(e,t,n)}else n.current=null}function Wc(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){Q(e,e.return,t)}}function Gc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[et]=t}catch(t){Q(e,e.return,t)}}function Kc(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||Kc(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 Jc(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=Kt));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Jc(e,t,n),e=e.sibling;e!==null;)Jc(e,t,n),e=e.sibling}function Yc(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(Yc(e,t,n),e=e.sibling;e!==null;)Yc(e,t,n),e=e.sibling}function Xc(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[$e]=e,t[et]=n}catch(t){Q(e,e.return,t)}}var Zc=!1,Qc=!1,$c=!1,el=typeof WeakSet==`function`?WeakSet:Set,tl=null;function nl(e,t){if(e=e.containerInfo,Rd=sp,e=br(e),xr(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,tl=t;tl!==null;)if(t=tl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,tl=e;else for(;tl!==null;){switch(t=tl,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=Hs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Q(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,tl=e;break}tl=t.return}}function rl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:vl(e,n),r&4&&Rc(5,n);break;case 1:if(vl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Q(n,n.return,e)}else{var i=Hs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Q(n,n.return,e)}}r&64&&Bc(n),r&512&&Hc(n,n.return);break;case 3:if(vl(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{Wa(e,t)}catch(e){Q(n,n.return,e)}}break;case 27:t===null&&r&4&&Xc(n);case 26:case 5:vl(e,n),t===null&&r&4&&Wc(n),r&512&&Hc(n,n.return);break;case 12:vl(e,n);break;case 31:vl(e,n),r&4&&ll(e,n);break;case 13:vl(e,n),r&4&&ul(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=qu.bind(null,n),sf(e,n))));break;case 22:if(r=n.memoizedState!==null||Zc,!r){t=t!==null&&t.memoizedState!==null||Qc,i=Zc;var a=Qc;Zc=r,(Qc=t)&&!a?bl(e,n,(n.subtreeFlags&8772)!=0):vl(e,n),Zc=i,Qc=a}break;case 30:break;default:vl(e,n)}}function il(e){var t=e.alternate;t!==null&&(e.alternate=null,il(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&st(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 al=null,ol=!1;function sl(e,t,n){for(n=n.child;n!==null;)cl(e,t,n),n=n.sibling}function cl(e,t,n){if(W&&typeof W.onCommitFiberUnmount==`function`)try{W.onCommitFiberUnmount(ke,n)}catch{}switch(n.tag){case 26:Qc||Uc(n,t),sl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Qc||Uc(n,t);var r=al,i=ol;Zd(n.type)&&(al=n.stateNode,ol=!1),sl(e,t,n),pf(n.stateNode),al=r,ol=i;break;case 5:Qc||Uc(n,t);case 6:if(r=al,i=ol,al=null,sl(e,t,n),al=r,ol=i,al!==null)if(ol)try{(al.nodeType===9?al.body:al.nodeName===`HTML`?al.ownerDocument.body:al).removeChild(n.stateNode)}catch(e){Q(n,t,e)}else try{al.removeChild(n.stateNode)}catch(e){Q(n,t,e)}break;case 18:al!==null&&(ol?(e=al,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd(al,n.stateNode));break;case 4:r=al,i=ol,al=n.stateNode.containerInfo,ol=!0,sl(e,t,n),al=r,ol=i;break;case 0:case 11:case 14:case 15:zc(2,n,t),Qc||zc(4,n,t),sl(e,t,n);break;case 1:Qc||(Uc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Vc(n,t,r)),sl(e,t,n);break;case 21:sl(e,t,n);break;case 22:Qc=(r=Qc)||n.memoizedState!==null,sl(e,t,n),Qc=r;break;default:sl(e,t,n)}}function ll(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Q(t,t.return,e)}}}function ul(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){Q(t,t.return,e)}}function dl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new el),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new el),t;default:throw Error(i(435,e.tag))}}function fl(e,t){var n=dl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Ju.bind(null,e,t);t.then(r,r)}})}function pl(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)){al=c.stateNode,ol=!1;break a}break;case 5:al=c.stateNode,ol=!1;break a;case 3:case 4:al=c.stateNode.containerInfo,ol=!0;break a}c=c.return}if(al===null)throw Error(i(160));cl(o,s,a),al=null,ol=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)hl(t,e),t=t.sibling}var ml=null;function hl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:pl(t,e),gl(e),r&4&&(zc(3,e,e.return),Rc(3,e),zc(5,e,e.return));break;case 1:pl(t,e),gl(e),r&512&&(Qc||n===null||Uc(n,n.return)),r&64&&Zc&&(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=ml;if(pl(t,e),gl(e),r&512&&(Qc||n===null||Uc(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[ot]||o[$e]||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[$e]=e,ft(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[$e]=e,ft(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&&Gc(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:pl(t,e),gl(e),r&512&&(Qc||n===null||Uc(n,n.return)),n!==null&&r&4&&Gc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(pl(t,e),gl(e),r&512&&(Qc||n===null||Uc(n,n.return)),e.flags&32){a=e.stateNode;try{Rt(a,``)}catch(t){Q(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Gc(e,a,n===null?a:n.memoizedProps)),r&1024&&($c=!0);break;case 6:if(pl(t,e),gl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Q(e,e.return,t)}}break;case 3:if(Bf=null,a=ml,ml=gf(t.containerInfo),pl(t,e),ml=a,gl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Q(e,e.return,t)}$c&&($c=!1,_l(e));break;case 4:r=ml,ml=gf(e.stateNode.containerInfo),pl(t,e),gl(e),ml=r;break;case 12:pl(t,e),gl(e);break;case 31:pl(t,e),gl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,fl(e,r)));break;case 13:pl(t,e),gl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Ql=Se()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,fl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=Zc,d=Qc;if(Zc=u||a,Qc=d||l,pl(t,e),Qc=d,Zc=u,gl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||Zc||Qc||yl(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){Q(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Q(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){Q(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,fl(e,n))));break;case 19:pl(t,e),gl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,fl(e,r)));break;case 30:break;case 21:break;default:pl(t,e),gl(e)}}function gl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Kc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Yc(e,qc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Rt(o,``),n.flags&=-33),Yc(e,qc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Jc(e,qc(e),s);break;default:throw Error(i(161))}}catch(t){Q(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function _l(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;_l(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function vl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)rl(e,t.alternate,t),t=t.sibling}function yl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:zc(4,t,t.return),yl(t);break;case 1:Uc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Vc(t,t.return,n),yl(t);break;case 27:pf(t.stateNode);case 26:case 5:Uc(t,t.return),yl(t);break;case 22:t.memoizedState===null&&yl(t);break;case 30:yl(t);break;default:yl(t)}e=e.sibling}}function bl(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:bl(i,a,n),Rc(4,a);break;case 1:if(bl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Q(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++)Ua(c[i],s)}catch(e){Q(r,r.return,e)}}n&&o&64&&Bc(a),Hc(a,a.return);break;case 27:Xc(a);case 26:case 5:bl(i,a,n),n&&r===null&&o&4&&Wc(a),Hc(a,a.return);break;case 12:bl(i,a,n);break;case 31:bl(i,a,n),n&&o&4&&ll(i,a);break;case 13:bl(i,a,n),n&&o&4&&ul(i,a);break;case 22:a.memoizedState===null&&bl(i,a,n),Hc(a,a.return);break;case 30:break;default:bl(i,a,n)}t=t.sibling}}function xl(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&&na(n))}function Sl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&na(e))}function Cl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)wl(e,t,n,r),t=t.sibling}function wl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Cl(e,t,n,r),i&2048&&Rc(9,t);break;case 1:Cl(e,t,n,r);break;case 3:Cl(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&&na(e)));break;case 12:if(i&2048){Cl(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){Q(t,t.return,e)}}else Cl(e,t,n,r);break;case 31:Cl(e,t,n,r);break;case 13:Cl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Cl(e,t,n,r):(a._visibility|=2,Tl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Cl(e,t,n,r):El(e,t),i&2048&&xl(o,t);break;case 24:Cl(e,t,n,r),i&2048&&Sl(t.alternate,t);break;default:Cl(e,t,n,r)}}function Tl(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:Tl(a,o,s,c,i),Rc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Tl(a,o,s,c,i)):u._visibility&2?Tl(a,o,s,c,i):El(a,o),i&&l&2048&&xl(o.alternate,o);break;case 24:Tl(a,o,s,c,i),i&&l&2048&&Sl(o.alternate,o);break;default:Tl(a,o,s,c,i)}t=t.sibling}}function El(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:El(n,r),i&2048&&xl(r.alternate,r);break;case 24:El(n,r),i&2048&&Sl(r.alternate,r);break;default:El(n,r)}t=t.sibling}}var Dl=8192;function Ol(e,t,n){if(e.subtreeFlags&Dl)for(e=e.child;e!==null;)kl(e,t,n),e=e.sibling}function kl(e,t,n){switch(e.tag){case 26:Ol(e,t,n),e.flags&Dl&&e.memoizedState!==null&&Gf(n,ml,e.memoizedState,e.memoizedProps);break;case 5:Ol(e,t,n);break;case 3:case 4:var r=ml;ml=gf(e.stateNode.containerInfo),Ol(e,t,n),ml=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Dl,Dl=16777216,Ol(e,t,n),Dl=r):Ol(e,t,n));break;default:Ol(e,t,n)}}function Al(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 jl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];tl=r,Pl(r,e)}Al(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ml(e),e=e.sibling}function Ml(e){switch(e.tag){case 0:case 11:case 15:jl(e),e.flags&2048&&zc(9,e,e.return);break;case 3:jl(e);break;case 12:jl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Nl(e)):jl(e);break;default:jl(e)}}function Nl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];tl=r,Pl(r,e)}Al(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:zc(8,t,t.return),Nl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Nl(t));break;default:Nl(t)}e=e.sibling}}function Pl(e,t){for(;tl!==null;){var n=tl;switch(n.tag){case 0:case 11:case 15:zc(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:na(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,tl=r;else a:for(n=e;tl!==null;){r=tl;var i=r.sibling,a=r.return;if(il(r),r===n){tl=null;break a}if(i!==null){i.return=a,tl=i;break a}tl=a}}}var Fl={getCacheForType:function(e){var t=Ji(ea),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ji(ea).controller.signal}},Il=typeof WeakMap==`function`?WeakMap:Map,J=0,Ll=null,Y=null,X=0,Z=0,Rl=null,zl=!1,Bl=!1,Vl=!1,Hl=0,Ul=0,Wl=0,Gl=0,Kl=0,ql=0,Jl=0,Yl=null,Xl=null,Zl=!1,Ql=0,$l=0,eu=1/0,tu=null,nu=null,ru=0,iu=null,au=null,ou=0,su=0,cu=null,lu=null,uu=0,du=null;function fu(){return J&2&&X!==0?X&-X:F.T===null?Xe():ud()}function pu(){if(ql===0)if(!(X&536870912)||K){var e=Fe;Fe<<=1,!(Fe&3932160)&&(Fe=262144),ql=e}else ql=536870912;return e=Xa.current,e!==null&&(e.flags|=32),ql}function mu(e,t,n){(e===Ll&&(Z===2||Z===9)||e.cancelPendingCommit!==null)&&(xu(e,0),vu(e,X,ql,!1)),Ue(e,n),(!(J&2)||e!==Ll)&&(e===Ll&&(!(J&2)&&(Gl|=n),Ul===4&&vu(e,X,ql,!1)),nd(e))}function hu(e,t,n){if(J&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||ze(e,t),a=r?ku(e,t):Du(e,t,!0),o=r;do{if(a===0){Bl&&!r&&vu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!_u(n)){a=Du(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=Yl;var l=c.current.memoizedState.isDehydrated;if(l&&(xu(c,s).flags|=256),s=Du(c,s,!1),s!==2){if(Vl&&!l){c.errorRecoveryDisabledLanes|=o,Gl|=o,a=4;break a}o=Xl,Xl=a,o!==null&&(Xl===null?Xl=o:Xl.push.apply(Xl,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){xu(e,0),vu(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:vu(r,t,ql,!zl);break a;case 2:Xl=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=Ql+300-Se(),10<a)){if(vu(r,t,ql,!zl),Re(r,0,!0)!==0)break a;ou=t,r.timeoutHandle=Kd(gu.bind(null,r,n,Xl,tu,Zl,t,ql,Gl,Jl,zl,o,`Throttled`,-0,0),a);break a}gu(r,n,Xl,tu,Zl,t,ql,Gl,Jl,zl,o,null,-0,0)}}break}while(1);nd(e)}function gu(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:Kt},kl(t,a,d);var m=(a&62914560)===a?Ql-Se():(a&4194048)===a?$l-Se():0;if(m=qf(d,m),m!==null){ou=a,e.cancelPendingCommit=m(Iu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),vu(e,a,o,!l);return}}Iu(e,t,a,n,r,i,o,s,c)}function _u(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(!hr(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 vu(e,t,n,r){t&=~Kl,t&=~Gl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ae(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Ge(e,n,t)}function yu(){return J&6?!0:(rd(0,!1),!1)}function bu(){if(Y!==null){if(Z===0)var e=Y.return;else e=Y,Bi=zi=null,wo(e),Ta=null,Ea=0,e=Y;for(;e!==null;)Lc(e.alternate,e),e=e.return;Y=null}}function xu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),ou=0,bu(),Ll=e,Y=n=ri(e.current,null),X=t,Z=0,Rl=null,zl=!1,Bl=ze(e,t),Vl=!1,Jl=ql=Kl=Gl=Wl=Ul=0,Xl=Yl=null,Zl=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Ae(r),a=1<<i;t|=e[i],r&=~a}return Hl=t,qr(),n}function Su(e,t){q=null,F.H=Ps,t===ha||t===_a?(t=Ca(),Z=3):t===ga?(t=Ca(),Z=4):Z=t===Qs?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Rl=t,Y===null&&(Ul=1,Ks(e,di(t,e.current)))}function Cu(){var e=Xa.current;return e===null?!0:(X&4194048)===X?Za===null:(X&62914560)===X||X&536870912?e===Za:!1}function wu(){var e=F.H;return F.H=Ps,e===null?Ps:e}function Tu(){var e=F.A;return F.A=Fl,e}function Eu(){Ul=4,zl||(X&4194048)!==X&&Xa.current!==null||(Bl=!0),!(Wl&134217727)&&!(Gl&134217727)||Ll===null||vu(Ll,X,ql,!1)}function Du(e,t,n){var r=J;J|=2;var i=wu(),a=Tu();(Ll!==e||X!==t)&&(tu=null,xu(e,t)),t=!1;var o=Ul;a:do try{if(Z!==0&&Y!==null){var s=Y,c=Rl;switch(Z){case 8:bu(),o=6;break a;case 3:case 2:case 9:case 6:Xa.current===null&&(t=!0);var l=Z;if(Z=0,Rl=null,Nu(e,s,c,l),n&&Bl){o=0;break a}break;default:l=Z,Z=0,Rl=null,Nu(e,s,c,l)}}Ou(),o=Ul;break}catch(t){Su(e,t)}while(1);return t&&e.shellSuspendCounter++,Bi=zi=null,J=r,F.H=i,F.A=a,Y===null&&(Ll=null,X=0,qr()),o}function Ou(){for(;Y!==null;)ju(Y)}function ku(e,t){var n=J;J|=2;var r=wu(),a=Tu();Ll!==e||X!==t?(tu=null,eu=Se()+500,xu(e,t)):Bl=ze(e,t);a:do try{if(Z!==0&&Y!==null){t=Y;var o=Rl;b:switch(Z){case 1:Z=0,Rl=null,Nu(e,t,o,1);break;case 2:case 9:if(ya(o)){Z=0,Rl=null,Mu(t);break}t=function(){Z!==2&&Z!==9||Ll!==e||(Z=7),nd(e)},o.then(t,t);break a;case 3:Z=7;break a;case 4:Z=5;break a;case 7:ya(o)?(Z=0,Rl=null,Mu(t)):(Z=0,Rl=null,Nu(e,t,o,7));break;case 5:var s=null;switch(Y.tag){case 26:s=Y.memoizedState;case 5:case 27:var c=Y;if(s?Wf(s):c.stateNode.complete){Z=0,Rl=null;var l=c.sibling;if(l!==null)Y=l;else{var u=c.return;u===null?Y=null:(Y=u,Pu(u))}break b}}Z=0,Rl=null,Nu(e,t,o,5);break;case 6:Z=0,Rl=null,Nu(e,t,o,6);break;case 8:bu(),Ul=6;break a;default:throw Error(i(462))}}Au();break}catch(t){Su(e,t)}while(1);return Bi=zi=null,F.H=r,F.A=a,J=n,Y===null?(Ll=null,X=0,qr(),Ul):0}function Au(){for(;Y!==null&&!be();)ju(Y)}function ju(e){var t=Oc(e.alternate,e,Hl);e.memoizedProps=e.pendingProps,t===null?Pu(e):Y=t}function Mu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=fc(n,t,t.pendingProps,t.type,void 0,X);break;case 11:t=fc(n,t,t.pendingProps,t.type.render,t.ref,X);break;case 5:wo(t);default:Lc(n,t),t=Y=ii(t,Hl),t=Oc(n,t,Hl)}e.memoizedProps=e.pendingProps,t===null?Pu(e):Y=t}function Nu(e,t,n,r){Bi=zi=null,wo(t),Ta=null,Ea=0;var i=t.return;try{if(Zs(e,i,t,n,X)){Ul=1,Ks(e,di(n,e.current)),Y=null;return}}catch(t){if(i!==null)throw Y=i,t;Ul=1,Ks(e,di(n,e.current)),Y=null;return}t.flags&32768?(K||r===1?e=!0:Bl||X&536870912?e=!1:(zl=e=!0,(r===2||r===9||r===3||r===6)&&(r=Xa.current,r!==null&&r.tag===13&&(r.flags|=16384))),Fu(t,e)):Pu(t)}function Pu(e){var t=e;do{if(t.flags&32768){Fu(t,zl);return}e=t.return;var n=Fc(t.alternate,t,Hl);if(n!==null){Y=n;return}if(t=t.sibling,t!==null){Y=t;return}Y=t=e}while(t!==null);Ul===0&&(Ul=5)}function Fu(e,t){do{var n=Ic(e.alternate,e);if(n!==null){n.flags&=32767,Y=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Y=e;return}Y=e=n}while(e!==null);Ul=6,Y=null}function Iu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Vu();while(ru!==0);if(J&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Kr,We(e,n,o,s,c,l),e===Ll&&(Y=Ll=null,X=0),au=t,iu=e,ou=n,su=o,cu=a,lu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Yu(we,function(){return Hu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=F.T,F.T=null,a=I.p,I.p=2,s=J,J|=4;try{nl(e,t,n)}finally{J=s,I.p=a,F.T=r}}ru=1,Lu(),Ru(),zu()}}function Lu(){if(ru===1){ru=0;var e=iu,t=au,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=F.T,F.T=null;var r=I.p;I.p=2;var i=J;J|=4;try{hl(t,e);var a=zd,o=br(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&yr(s.ownerDocument.documentElement,s)){if(c!==null&&xr(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 _=vr(s,h),v=vr(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{J=i,I.p=r,F.T=n}}e.current=t,ru=2}}function Ru(){if(ru===2){ru=0;var e=iu,t=au,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=F.T,F.T=null;var r=I.p;I.p=2;var i=J;J|=4;try{rl(e,t.alternate,t)}finally{J=i,I.p=r,F.T=n}}ru=3}}function zu(){if(ru===4||ru===3){ru=0,xe();var e=iu,t=au,n=ou,r=lu;t.subtreeFlags&10256||t.flags&10256?ru=5:(ru=0,au=iu=null,Bu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(nu=null),Ye(n),t=t.stateNode,W&&typeof W.onCommitFiberRoot==`function`)try{W.onCommitFiberRoot(ke,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=F.T,i=I.p,I.p=2,F.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{F.T=t,I.p=i}}ou&3&&Vu(),nd(e),i=e.pendingLanes,n&261930&&i&42?e===du?uu++:(uu=0,du=e):uu=0,rd(0,!1)}}function Bu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,na(t)))}function Vu(){return Lu(),Ru(),zu(),Hu()}function Hu(){if(ru!==5)return!1;var e=iu,t=su;su=0;var n=Ye(ou),r=F.T,a=I.p;try{I.p=32>n?32:n,F.T=null,n=cu,cu=null;var o=iu,s=ou;if(ru=0,au=iu=null,ou=0,J&6)throw Error(i(331));var c=J;if(J|=4,Ml(o.current),wl(o,o.current,s,n),J=c,rd(0,!1),W&&typeof W.onPostCommitFiberRoot==`function`)try{W.onPostCommitFiberRoot(ke,o)}catch{}return!0}finally{I.p=a,F.T=r,Bu(e,t)}}function Uu(e,t,n){t=di(n,t),t=Js(e.stateNode,t,2),e=La(e,t,2),e!==null&&(Ue(e,2),nd(e))}function Q(e,t,n){if(e.tag===3)Uu(e,e,n);else for(;t!==null;){if(t.tag===3){Uu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(nu===null||!nu.has(r))){e=di(n,e),n=Ys(2),r=La(t,n,2),r!==null&&(Xs(n,r,t,e),Ue(r,2),nd(r));break}}t=t.return}}function Wu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Il;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)||(Vl=!0,i.add(n),e=Gu.bind(null,e,t,n),t.then(e,e))}function Gu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ll===e&&(X&n)===n&&(Ul===4||Ul===3&&(X&62914560)===X&&300>Se()-Ql?!(J&2)&&xu(e,0):Kl|=n,Jl===X&&(Jl=0)),nd(e)}function Ku(e,t){t===0&&(t=Ve()),e=Xr(e,t),e!==null&&(Ue(e,t),nd(e))}function qu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ku(e,n)}function Ju(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),Ku(e,n)}function Yu(e,t){return ve(e,t)}var Xu=null,Zu=null,Qu=!1,$u=!1,ed=!1,td=0;function nd(e){e!==Zu&&e.next===null&&(Zu===null?Xu=Zu=e:Zu=Zu.next=e),$u=!0,Qu||(Qu=!0,ld())}function rd(e,t){if(!ed&&$u){ed=!0;do for(var n=!1,r=Xu;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-Ae(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,cd(r,a))}else a=X,a=Re(r,r===Ll?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||ze(r,a)||(n=!0,cd(r,a));r=r.next}while(n);ed=!1}}function id(){ad()}function ad(){$u=Qu=!1;var e=0;td!==0&&Gd()&&(e=td);for(var t=Se(),n=null,r=Xu;r!==null;){var i=r.next,a=od(r,t);a===0?(r.next=null,n===null?Xu=i:n.next=i,i===null&&(Zu=n)):(n=r,(e!==0||a&3)&&($u=!0)),r=i}ru!==0&&ru!==5||rd(e,!1),td!==0&&(td=0)}function od(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ae(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Be(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Ll,n=X,n=Re(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Z===2||Z===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&ye(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||ze(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&ye(r),Ye(n)){case 2:case 8:n=U;break;case 32:n=we;break;case 268435456:n=Ee;break;default:n=we}return r=sd.bind(null,e),n=ve(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&ye(r),e.callbackPriority=2,e.callbackNode=null,2}function sd(e,t){if(ru!==0&&ru!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Vu()&&e.callbackNode!==n)return null;var r=X;return r=Re(e,e===Ll?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(hu(e,r,t),od(e,Se()),e.callbackNode!=null&&e.callbackNode===n?sd.bind(null,e):null)}function cd(e,t){if(Vu())return null;hu(e,t,!0)}function ld(){Yd(function(){J&6?ve(H,id):ad()})}function ud(){if(td===0){var e=aa;e===0&&(e=Pe,Pe<<=1,!(Pe&261888)&&(Pe=256)),td=e}return td}function dd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Gt(``+e)}function fd(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 pd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=dd((i[et]||null).action),o=r.submitter;o&&(t=(t=o[et]||null)?dd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new mn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(td!==0){var e=o?fd(i,o):new FormData(i);bs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?fd(i,o):new FormData(i),bs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var md=0;md<Vr.length;md++){var hd=Vr[md];Hr(hd.toLowerCase(),`on`+(hd[0].toUpperCase()+hd.slice(1)))}Hr(Nr,`onAnimationEnd`),Hr(Pr,`onAnimationIteration`),Hr(Fr,`onAnimationStart`),Hr(`dblclick`,`onDoubleClick`),Hr(`focusin`,`onFocus`),Hr(`focusout`,`onBlur`),Hr(Ir,`onTransitionRun`),Hr(Lr,`onTransitionStart`),Hr(Rr,`onTransitionCancel`),Hr(zr,`onTransitionEnd`),gt(`onMouseEnter`,[`mouseout`,`mouseover`]),gt(`onMouseLeave`,[`mouseout`,`mouseover`]),gt(`onPointerEnter`,[`pointerout`,`pointerover`]),gt(`onPointerLeave`,[`pointerout`,`pointerover`]),ht(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),ht(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),ht(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),ht(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),ht(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),ht(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var gd=`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(` `),_d=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(gd));function vd(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){Ur(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){Ur(e)}i.currentTarget=null,a=c}}}}function $(e,t){var n=t[nt];n===void 0&&(n=t[nt]=new Set);var r=e+`__bubble`;n.has(r)||(Sd(t,e,2,!1),n.add(r))}function yd(e,t,n){var r=0;t&&(r|=4),Sd(n,e,r,t)}var bd=`_reactListening`+Math.random().toString(36).slice(2);function xd(e){if(!e[bd]){e[bd]=!0,pt.forEach(function(t){t!==`selectionchange`&&(_d.has(t)||yd(t,!1,e),yd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[bd]||(t[bd]=!0,yd(`selectionchange`,!1,t))}}function Sd(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,!nn||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 Cd(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=ct(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}$t(function(){var r=a,i=Jt(n),s=[];a:{var c=Br.get(e);if(c!==void 0){var l=mn,u=e;switch(e){case`keypress`:if(ln(n)===0)break a;case`keydown`:case`keyup`:l=Mn;break;case`focusin`:u=`focus`,l=Cn;break;case`focusout`:u=`blur`,l=Cn;break;case`beforeblur`:case`afterblur`:l=Cn;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=xn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Sn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Pn;break;case Nr:case Pr:case Fr:l=wn;break;case zr:l=Fn;break;case`scroll`:case`scrollend`:l=gn;break;case`wheel`:l=In;break;case`copy`:case`cut`:case`paste`:l=Tn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Nn;break;case`toggle`:case`beforetoggle`:l=Ln}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=en(m,p),g!=null&&d.push(wd(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!==qt&&(u=n.relatedTarget||n.fromElement)&&(ct(u)||u[tt]))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?ct(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=xn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Nn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:ut(l),h=u==null?c:ut(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,ct(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=Ed,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&&Dd(s,c,l,d,!1),u!==null&&f!==null&&Dd(s,f,u,d,!0)}}a:{if(c=r?ut(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=rr;else if(Zn(c))if(ir)v=pr;else{v=dr;var y=ur}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Ht(r.elementType)&&(v=rr):v=fr;if(v&&=v(e,r)){Qn(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Pt(c,`number`,c.value)}switch(y=r?ut(r):window,e){case`focusin`:(Zn(y)||y.contentEditable===`true`)&&(Cr=y,wr=r,Tr=null);break;case`focusout`:Tr=wr=Cr=null;break;case`mousedown`:Er=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Er=!1,Dr(s,n,i);break;case`selectionchange`:if(Sr)break;case`keydown`:case`keyup`:Dr(s,n,i)}var b;if(zn)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 qn?Gn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Hn&&n.locale!==`ko`&&(qn||x!==`onCompositionStart`?x===`onCompositionEnd`&&qn&&(b=cn()):(an=i,on=`value`in an?an.value:an.textContent,qn=!0)),y=Td(r,x),0<y.length&&(x=new En(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=Kn(n),b!==null&&(x.data=b)))),(b=Vn?Jn(e,n):Yn(e,n))&&(x=Td(r,`onBeforeInput`),0<x.length&&(y=new En(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),pd(s,e,r,n,i)}vd(s,t)})}function wd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Td(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=en(e,n),i!=null&&r.unshift(wd(e,i,a)),i=en(e,t),i!=null&&r.push(wd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Ed(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Dd(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=en(n,a),l!=null&&o.unshift(wd(n,l,c))):i||(l=en(n,a),l!=null&&o.push(wd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Od=/\r\n?/g,kd=/\u0000|\uFFFD/g;function Ad(e){return(typeof e==`string`?e:``+e).replace(Od,`
9
- `).replace(kd,``)}function jd(e,t){return t=Ad(t),Ad(e)===t}function Md(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Rt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Rt(e,``+r);break;case`className`:St(e,`class`,r);break;case`tabIndex`:St(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:St(e,n,r);break;case`style`:Vt(e,r,o);break;case`data`:if(t!==`object`){St(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=Gt(``+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`&&Md(e,t,`name`,a.name,a,null),Md(e,t,`formEncType`,a.formEncType,a,null),Md(e,t,`formMethod`,a.formMethod,a,null),Md(e,t,`formTarget`,a.formTarget,a,null)):(Md(e,t,`encType`,a.encType,a,null),Md(e,t,`method`,a.method,a,null),Md(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Gt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Kt);break;case`onScroll`:r!=null&&$(`scroll`,e);break;case`onScrollEnd`:r!=null&&$(`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=Gt(``+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`:$(`beforetoggle`,e),$(`toggle`,e),xt(e,`popover`,r);break;case`xlinkActuate`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Ct(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Ct(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Ct(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:xt(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=Ut.get(n)||n,xt(e,n,r))}}function Nd(e,t,n,r,a,o){switch(n){case`style`:Vt(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`?Rt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Rt(e,``+r);break;case`onScroll`:r!=null&&$(`scroll`,e);break;case`onScrollEnd`:r!=null&&$(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Kt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!mt.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[et]||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,``):xt(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`:$(`error`,e),$(`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:Md(e,t,o,s,n,null)}}a&&Md(e,t,`srcSet`,n.srcSet,n,null),r&&Md(e,t,`src`,n.src,n,null);return;case`input`:$(`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:Md(e,t,r,d,n,null)}}Nt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in $(`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:Md(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Ft(e,!!r,n,!0):Ft(e,!!r,t,!1);return;case`textarea`:for(s in $(`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:Md(e,t,s,c,n,null)}Lt(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:Md(e,t,l,r,n,null)}return;case`dialog`:$(`beforetoggle`,e),$(`toggle`,e),$(`cancel`,e),$(`close`,e);break;case`iframe`:case`object`:$(`load`,e);break;case`video`:case`audio`:for(r=0;r<gd.length;r++)$(gd[r],e);break;case`image`:$(`error`,e),$(`load`,e);break;case`details`:$(`toggle`,e);break;case`embed`:case`source`:case`link`:$(`error`,e),$(`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:Md(e,t,u,r,n,null)}return;default:if(Ht(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&&Md(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)||Md(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&&Md(e,t,p,m,r,f)}}Mt(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)||Md(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&&Md(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Ft(e,!!n,n?[]:``,!1):Ft(e,!!n,t,!0)):Ft(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:Md(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&&Md(e,t,s,a,r,o)}It(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:Md(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:Md(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)&&Md(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:Md(e,t,u,p,r,m)}return;default:if(Ht(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)&&Md(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||Md(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[ot]||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),st(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[ot])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]);st(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=I.d;I.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=yu();return e||t}function yf(e){var t=lt(e);t!==null&&t.tag===5&&t.type===`form`?Ss(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=jt(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),ft(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="`+jt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+jt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+jt(n.imageSizes)+`"]`)):i+=`[href="`+jt(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),ft(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="`+jt(r)+`"][href="`+jt(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),ft(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`);ft(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`),ft(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`),ft(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=ae.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="`+jt(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),ft(t),e.head.appendChild(t))}function Pf(e){return`[src="`+jt(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~="`+jt(n.href)+`"]`);if(r)return t.instance=r,ft(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`),ft(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,ft(o),o;r=Mf(n),(a=mf.get(a))&&Rf(r,a),o=(e.ownerDocument||e).createElement(`link`),ft(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,ft(a),a):(r=n,(a=mf.get(o))&&(r=h({},n),zf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),ft(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[ot]||a[$e]||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,ft(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),ft(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:C,Provider:null,Consumer:null,_currentValue:L,_currentValue2:L,_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=He(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=He(0),this.hiddenUpdates=He(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=ti(3,null,null,t),e.current=a,a.stateNode=e,t=ta(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Pa(a),e}function tp(e){return e?(e=$r,e):$r}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ia(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=La(e,r,t),n!==null&&(mu(n,e,t),Ra(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=Xr(e,67108864);t!==null&&mu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=fu();t=Je(t);var n=Xr(e,t);n!==null&&mu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=F.T;F.T=null;var a=I.p;try{I.p=2,up(e,t,n,r)}finally{I.p=a,F.T=i}}function lp(e,t,n,r){var i=F.T;F.T=null;var a=I.p;try{I.p=8,up(e,t,n,r)}finally{I.p=a,F.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)Cd(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=lt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Le(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ae(o);s.entanglements[1]|=c,o&=~c}nd(a),!(J&6)&&(eu=Se()+500,rd(0,!1))}}break;case 31:case 13:s=Xr(a,2),s!==null&&mu(s,a,2),yu(),ip(a,2)}if(a=dp(r),a===null&&Cd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Cd(e,t,r,null,n)}}function dp(e){return e=Jt(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=ct(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(Ce()){case H:return 2;case U:return 8;case we:case Te:return 32;case Ee: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=lt(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=ct(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,Ze(e.priority,function(){op(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,Ze(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);qt=r,n.target.dispatchEvent(r),qt=null}else return t=lt(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=lt(n);a!==null&&(e.splice(t,3),t-=3,bs(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[et]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[et]||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,fu(),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),yu(),t[tt]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=Xe();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.7`)throw Error(i(527,Lp,`19.2.7`));I.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.7`,rendererPackageName:`react-dom`,currentDispatcherRef:F,reconcilerVersion:`19.2.7`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{ke=zp.inject(Rp),W=zp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Us,s=Ws,c=Gs;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[tt]=t.current,xd(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=c(g(),1),y={en:{day:`d`,hour:`h`,minute:`m`,second:`s`},de:{day:`T`,hour:`Std`,minute:`Min`,second:`Sek`},ko:{day:`일`,hour:`시간`,minute:`분`,second:`초`},zh:{day:`天`,hour:`小时`,minute:`分钟`,second:`秒`}};function b(e,t){let n=Math.max(0,Math.floor(e)),r=y[t]??y.en;if(n<300)return`${n}${r.second}`;let i=Math.floor(n/60);if(i<60)return`${i}${r.minute}`;let a=Math.floor(i/60);if(a<24){let e=i%60;return e>0?`${a}${r.hour} ${e}${r.minute}`:`${a}${r.hour}`}let o=Math.floor(a/24),s=a%24;return s>0?`${o}${r.day} ${s}${r.hour}`:`${o}${r.day}`}var x=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})),S=o(((e,t)=>{t.exports=x()}))(),C=e=>({viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,...e}),w=e=>(0,S.jsxs)(`svg`,{...C(e),children:[(0,S.jsx)(`rect`,{x:`3`,y:`3`,width:`7`,height:`7`,rx:`1.5`}),(0,S.jsx)(`rect`,{x:`14`,y:`3`,width:`7`,height:`7`,rx:`1.5`}),(0,S.jsx)(`rect`,{x:`3`,y:`14`,width:`7`,height:`7`,rx:`1.5`}),(0,S.jsx)(`rect`,{x:`14`,y:`14`,width:`7`,height:`7`,rx:`1.5`})]}),T=e=>(0,S.jsxs)(`svg`,{...C(e),children:[(0,S.jsx)(`rect`,{x:`3`,y:`4`,width:`18`,height:`7`,rx:`2`}),(0,S.jsx)(`rect`,{x:`3`,y:`13`,width:`18`,height:`7`,rx:`2`}),(0,S.jsx)(`path`,{d:`M7 7.5h.01M7 16.5h.01`})]}),E=e=>(0,S.jsxs)(`svg`,{...C(e),children:[(0,S.jsx)(`path`,{d:`M12 2 4 6v6l8 4 8-4V6l-8-4Z`}),(0,S.jsx)(`path`,{d:`m4 6 8 4 8-4M12 10v8`})]}),D=e=>(0,S.jsxs)(`svg`,{...C(e),children:[(0,S.jsx)(`rect`,{x:`4`,y:`8`,width:`16`,height:`11`,rx:`3`}),(0,S.jsx)(`path`,{d:`M12 8V4M8 2h8`}),(0,S.jsx)(`circle`,{cx:`9`,cy:`13`,r:`1`}),(0,S.jsx)(`circle`,{cx:`15`,cy:`13`,r:`1`})]}),O=e=>(0,S.jsx)(`svg`,{...C(e),children:(0,S.jsx)(`path`,{d:`M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01`})}),k=e=>(0,S.jsx)(`svg`,{...C(e),children:(0,S.jsx)(`path`,{d:`M4 6h16M4 12h16M4 18h16`})}),A=e=>(0,S.jsxs)(`svg`,{...C(e),children:[(0,S.jsx)(`path`,{d:`m4 17 6-5-6-5`}),(0,S.jsx)(`path`,{d:`M12 19h8`})]}),j=e=>(0,S.jsx)(`svg`,{...C(e),children:(0,S.jsx)(`path`,{d:`M22 12h-4l-3 9L9 3l-3 9H2`})}),M=e=>(0,S.jsx)(`svg`,{...C(e),children:(0,S.jsx)(`path`,{d:`m20 6-11 11-5-5`})}),N=e=>(0,S.jsx)(`svg`,{...C(e),children:(0,S.jsx)(`path`,{d:`M18 6 6 18M6 6l12 12`})}),P=e=>(0,S.jsx)(`svg`,{...C(e),children:(0,S.jsx)(`path`,{d:`M12 5v14M5 12h14`})}),ee=e=>(0,S.jsx)(`svg`,{...C(e),children:(0,S.jsx)(`path`,{d:`M21 12a9 9 0 0 1-9 9 9.8 9.8 0 0 1-6.7-2.7L3 16M3 21v-5h5M3 12a9 9 0 0 1 9-9 9.8 9.8 0 0 1 6.7 2.7L21 8M21 3v5h-5`})}),F=e=>(0,S.jsx)(`svg`,{...C(e),children:(0,S.jsx)(`path`,{d:`M3 6h18M8 6V4h8v2M19 6l-1 14H6L5 6`})}),I=e=>(0,S.jsxs)(`svg`,{...C(e),children:[(0,S.jsx)(`path`,{d:`M10.3 3.7 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.7a2 2 0 0 0-3.4 0Z`}),(0,S.jsx)(`path`,{d:`M12 9v4M12 17h.01`})]}),L=e=>(0,S.jsxs)(`svg`,{...C(e),children:[(0,S.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,S.jsx)(`path`,{d:`M12 16v-4M12 8h.01`})]}),te=e=>(0,S.jsxs)(`svg`,{...C(e),children:[(0,S.jsx)(`circle`,{cx:`11`,cy:`11`,r:`7`}),(0,S.jsx)(`path`,{d:`m21 21-4.3-4.3`})]}),ne=e=>(0,S.jsx)(`svg`,{...C(e),children:(0,S.jsx)(`path`,{d:`M12 19V5M5 12l7-7 7 7`})}),R=e=>(0,S.jsx)(`svg`,{...C(e),children:(0,S.jsx)(`path`,{d:`M12 5v14M19 12l-7 7-7-7`})}),z=e=>(0,S.jsx)(`svg`,{...C(e),children:(0,S.jsx)(`path`,{d:`m9 18 6-6-6-6`})}),B=e=>(0,S.jsx)(`svg`,{...C(e),children:(0,S.jsx)(`path`,{d:`M9 19c-5 1.5-5-2.5-7-3m14 6v-3.9a3.4 3.4 0 0 0-.9-2.6c3-.3 6.2-1.5 6.2-6.7A5.2 5.2 0 0 0 20 4.8 4.9 4.9 0 0 0 19.9 1S18.7.6 16 2.5a13.4 13.4 0 0 0-7 0C6.3.6 5.1 1 5.1 1A4.9 4.9 0 0 0 5 4.8a5.2 5.2 0 0 0-1.4 3.7c0 5.1 3.1 6.4 6.1 6.7a3.4 3.4 0 0 0-.9 2.5V22`})}),re=e=>(0,S.jsxs)(`svg`,{...C(e),children:[(0,S.jsx)(`path`,{d:`M18.4 5.6a9 9 0 1 1-12.8 0`}),(0,S.jsx)(`path`,{d:`M12 2v10`})]}),ie=e=>(0,S.jsx)(`svg`,{...C(e),children:(0,S.jsx)(`path`,{d:`M15 3h6v6M10 14 21 3M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`})}),ae=e=>(0,S.jsxs)(`svg`,{...C(e),children:[(0,S.jsx)(`circle`,{cx:`7.5`,cy:`15.5`,r:`4.5`}),(0,S.jsx)(`path`,{d:`m10.7 12.3 9.6-9.6M16 7l3 3M14 9l2 2`})]}),oe=e=>(0,S.jsxs)(`svg`,{...C(e),children:[(0,S.jsx)(`rect`,{x:`4`,y:`11`,width:`16`,height:`10`,rx:`2`}),(0,S.jsx)(`path`,{d:`M8 11V7a4 4 0 0 1 8 0v4`})]}),se=e=>(0,S.jsxs)(`svg`,{...C(e),children:[(0,S.jsx)(`path`,{d:`M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z`}),(0,S.jsx)(`path`,{d:`M13 5v2`}),(0,S.jsx)(`path`,{d:`M13 17v2`}),(0,S.jsx)(`path`,{d:`M13 11v2`})]}),ce=e=>(0,S.jsx)(`svg`,{...C(e),children:(0,S.jsx)(`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2M15 7h2a5 5 0 0 1 0 10h-2M8 12h8`})}),le=e=>(0,S.jsxs)(`svg`,{...C(e),children:[(0,S.jsx)(`circle`,{cx:`12`,cy:`12`,r:`4`}),(0,S.jsx)(`path`,{d:`M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4`})]}),V=e=>(0,S.jsx)(`svg`,{...C(e),children:(0,S.jsx)(`path`,{d:`M21 12.8A9 9 0 1 1 11.2 3 7 7 0 0 0 21 12.8Z`})}),ue=e=>(0,S.jsxs)(`svg`,{...C(e),children:[(0,S.jsx)(`rect`,{x:`2`,y:`3`,width:`20`,height:`14`,rx:`2`}),(0,S.jsx)(`path`,{d:`M8 21h8M12 17v4`})]}),de=e=>(0,S.jsxs)(`svg`,{...C(e),children:[(0,S.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`}),(0,S.jsx)(`path`,{d:`M3 12h18M12 3a14 14 0 0 1 0 18M12 3a14 14 0 0 0 0 18`})]}),fe=e=>(0,S.jsx)(`svg`,{...C(e),children:(0,S.jsx)(`path`,{d:`M12 3v18M5.6 5.6l12.8 12.8M3 12h18M5.6 18.4 18.4 5.6`})}),pe=e=>(0,S.jsxs)(`svg`,{...C(e),children:[(0,S.jsx)(`path`,{d:`m18 14 4 4-4 4`}),(0,S.jsx)(`path`,{d:`m18 2 4 4-4 4`}),(0,S.jsx)(`path`,{d:`M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22`}),(0,S.jsx)(`path`,{d:`M2 6h1.972a4 4 0 0 1 3.6 2.2`}),(0,S.jsx)(`path`,{d:`M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45`})]}),me=e=>(0,S.jsxs)(`svg`,{...C(e),children:[(0,S.jsx)(`circle`,{cx:`9`,cy:`6`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,S.jsx)(`circle`,{cx:`15`,cy:`6`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,S.jsx)(`circle`,{cx:`9`,cy:`12`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,S.jsx)(`circle`,{cx:`15`,cy:`12`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,S.jsx)(`circle`,{cx:`9`,cy:`18`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,S.jsx)(`circle`,{cx:`15`,cy:`18`,r:`1`,fill:`currentColor`,stroke:`none`})]}),he=e=>(0,S.jsx)(`svg`,{...C(e),children:(0,S.jsx)(`path`,{d:`m12 2 3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z`})}),ge=e=>(0,S.jsx)(`svg`,{...C(e),children:(0,S.jsx)(`path`,{d:`M4 5h16l-6 7v5l-4 2v-7L4 5z`})}),_e={"nav.dashboard":`Dashboard`,"nav.providers":`Providers`,"nav.models":`Models`,"nav.combos":`Combos`,"nav.subagents":`Subagents`,"nav.logs":`Logs`,"nav.debug":`Debug`,"nav.usage":`Usage`,"common.github":`GitHub`,"common.save":`Save`,"common.saving":`Saving…`,"common.cancel":`Cancel`,"common.discard":`Discard`,"common.close":`Close`,"common.ok":`OK`,"common.remove":`Remove`,"common.loading":`Loading…`,"app.logoAria":`opencodex logo`,"app.claudeOn":`Claude ON`,"app.claudeOff":`Claude OFF`,"theme.label":`Theme`,"theme.light":`Light`,"theme.dark":`Dark`,"theme.system":`System`,"lang.label":`Language`,"dash.subtitle":`Live status of the local opencodex proxy, its providers, and the models routed into Codex.`,"dash.status":`Status`,"dash.online":`Online`,"dash.offline":`Offline`,"dash.version":`Version`,"dash.uptime":`Uptime`,"dash.providers":`Providers`,"dash.tokens30d":`Tokens (30d)`,"dash.coverage":`{pct} coverage`,"dash.activeProviders":`Active providers`,"dash.noProviders":`No providers configured. Run {cmd}.`,"dash.col.name":`Name`,"dash.col.adapter":`Adapter`,"dash.col.baseUrl":`Base URL`,"dash.col.model":`Model`,"dash.availableModels":`Available models`,"dash.noModels":`No models found. Check provider API keys.`,"dash.cannotConnect":`Cannot connect to proxy. Is it running?`,"dash.runStart":`Run {cmd} to start the proxy.`,"dash.stop":`Stop Proxy`,"dash.stopConfirm":`Stop the proxy and restore native Codex?`,"dash.stopping":`Stopping…`,"dash.codexAutoStart":`Start opencodex with Codex`,"dash.codexAutoStartHint":`When enabled, the Codex shim runs ocx ensure before every Codex CLI/App launch. Disable this to leave Codex untouched.`,"dash.searchModel":`Search sidecar model`,"dash.searchModelHint":`Model used for web_search on non-OpenAI routed models. Requires ChatGPT login.`,"dash.searchReasoning":`Search reasoning effort`,"dash.visionModel":`Vision sidecar model`,"dash.visionModelHint":`Model used to describe images for text-only routed models. Requires ChatGPT login.`,"dash.webSearchSidecar":`Web search sidecar`,"dash.webSearchSidecarHint":`Choose the backend and model used for web search on routed models.`,"dash.visionSidecar":`Vision sidecar`,"dash.visionSidecarHint":`Choose the backend and model used to describe images for text-only routed models.`,"dash.shadowCallIntercept":`Shadow Call Intercept`,"dash.shadowCallInterceptHint":`Intercepts Codex App's background gpt-5.4-mini calls (title generation, commit messages) and redirects them to your chosen model. Effort is fixed to low.`,"dash.shadowCallWarning":`⚠ When enabled, ALL gpt-5.4-mini requests will be replaced with the selected model.`,"dash.shadowCallOriginal":`Original`,"dash.shadowCallModel":`Replacement model`,"dash.shadowCallTooltip":`Codex App uses gpt-5.4-mini in the background for thread title generation, commit message generation, and skill orchestration. Enable this to redirect those calls to your chosen model.`,"models.shadowCallIntercept":`Shadow Call Intercept`,"models.shadowCallInterceptHint":`Intercepts Codex App's background gpt-5.4-mini calls (titles, commit messages) and redirects them to your chosen model.`,"dash.sidecarBackend":`Backend`,"dash.sidecarModel":`Model`,"dash.backendAuto":`Auto`,"dash.backendOpenAI":`OpenAI`,"dash.backendAnthropic":`Anthropic`,"dash.sidecarSaved":`Sidecar settings saved. Applied on the next request.`,"dash.sidecarSaveFailed":`Failed to save sidecar settings.`,"dash.injectionLabel":`Sub-agent delegation`,"dash.injectionHint":`Pick a routed model to inject into the delegation prompt. The agent will be told to use it for sub-tasks.`,"dash.injectionActive":`Active`,"dash.injectionNone":`None`,"dash.injectionEffortLabel":`Reasoning effort`,"dash.injectionEffortNone":`Model default`,"dash.effortCapLabel":`V2 ultra effort limit`,"dash.subagentEffortCapLabel":`V2 sub-agent effort limit`,"dash.effortCapHelp":`Limits the reasoning effort for V2 ultra-mode turns. When set, incoming max-effort requests (from ultra mode) are capped to the selected level. The sub-agent limit applies only to spawned child agents. Caps only lower effort, never raise it. If a model doesn't support the capped level, it snaps down to the nearest supported level.`,"dash.effortCapNone":`No cap`,"dash.maintenance":`Maintenance`,"dash.maintenanceHint":`Refresh Codex's model catalog or install a newer opencodex release.`,"dash.syncModels":`Sync models`,"dash.syncing":`Syncing…`,"dash.syncOk":`Sync complete. {count} model(s) appended.`,"dash.syncStaleHint":`If Codex App still shows an older list, restart its long-lived app-server process.`,"dash.syncFailed":`Sync failed: {error}`,"dash.projectConfigTitle":`Project Codex config bypasses OpenCodex`,"dash.projectConfigHint":`These repo-local settings override the OpenCodex proxy (e.g. route to OpenCode Go directly). Remove them so ~/.codex/config.toml routing applies in that project.`,"dash.checkUpdate":`Check update`,"dash.updateTitle":`Update opencodex`,"dash.updateDesc":`Check npm for the selected channel, then choose whether to restart the proxy after installation.`,"dash.updateChannel":`Channel`,"dash.updateChecking":`Checking for updates…`,"dash.updateInstalled":`Installed`,"dash.updateLatest":`Latest`,"dash.updateAvailable":`Update available`,"dash.updateCurrent":`Up to date`,"dash.updateCommand":`Command`,"dash.updateSource":`This is a source checkout. Update it from the terminal with the shown command.`,"dash.updateUnavailable":`Could not read the latest version from npm. Try again later.`,"dash.updateRetry":`Retry`,"dash.updateRecheck":`Re-check`,"dash.updateCannotAuto":`One-click update is unavailable ({reason}).`,"dash.updateReason.source_checkout":`source checkout`,"dash.updateReason.latest_unavailable":`npm registry unreachable`,"dash.updateReason.already_latest":`already on latest`,"dash.updateReason.unknown":`update unavailable`,"dash.updateRestart":`Restart after update`,"dash.updateRestartHint":`Recommended. The current GUI keeps running the old code until the proxy restarts.`,"dash.runUpdate":`Update`,"dash.updateReconnecting":`Waiting for the restarted proxy…`,"dash.updateStatus.running":`Updating opencodex.`,"dash.updateStatus.restarting":`Update installed. Restarting proxy.`,"dash.updateStatus.succeeded":`Update finished.`,"dash.updateStatus.failed":`Update failed.`,"prov.subtitle":`Configure the upstream providers opencodex routes into Codex. Log in with an account, add a provider, or edit the raw config.`,"prov.add":`Add Provider`,"prov.editJson":`Edit JSON`,"prov.accountLogin":`Account login`,"prov.noOauth":`No OAuth providers available.`,"prov.loggedIn":`logged in`,"prov.notLoggedIn":`not logged in`,"prov.logout":`Logout`,"prov.login":`Login`,"prov.loginWith":`Login with {provider}`,"prov.waitingBrowser":`Waiting for browser…`,"prov.didntOpen":`Didn't open? Click here`,"prov.copyLink":`Copy link`,"prov.linkCopied":`Copied`,"prov.pasteRedirect":`Paste redirect URL or code`,"prov.pasteRedirectHint":`If the browser shows a localhost error, copy the full URL from its address bar and paste it here (or paste the authorization code).`,"prov.pasteSubmit":`Submit`,"prov.pasteSubmitting":`Submitting…`,"prov.pasteOk":`Code submitted — finishing login…`,"prov.pasteFail":`Could not submit code: {error}`,"prov.port":`Port`,"prov.default":`Default`,"prov.loadingConfig":`Loading…`,"prov.saved":`Saved! Restart proxy to apply.`,"prov.loadConfigFail":`Failed to load config`,"prov.invalidJson":`Invalid JSON`,"prov.saveFailed":`Save failed`,"prov.loginFailStart":`{provider} login failed to start`,"prov.loginError":`{provider} login error: {error}`,"prov.loginRequestFail":`{provider} login request failed`,"prov.loginOk":`Logged in to {provider}. Run {cmd} (or it applies live) to list its models.`,"prov.logoutOk":`Logged out of {provider}.`,"prov.logoutFail":`Could not log out of {provider}. Your account state is unchanged.`,"prov.removed":`Removed "{name}".`,"prov.removeFail":`Failed to remove "{name}".`,"prov.added":`Added "{name}". Live now — run {cmd} (or restart) to list its models in Codex's picker.`,"prov.removeConfirm":`Remove provider "{name}"? Its models disappear from Codex's picker.`,"prov.hasApiKey":`api key configured`,"prov.hasHeaders":`custom headers configured`,"prov.accounts":`Accounts ({n})`,"prov.accountsAria":`Toggle {name} accounts`,"prov.accountActive":`Active`,"prov.accountReauth":`Re-login`,"prov.accountAdd":`Add account`,"prov.accountNoLabel":`account {id}`,"prov.accountSwitchTitle":`Use this account`,"prov.accountSwitched":`Switched to {email}.`,"prov.accountSwitchFail":`Failed to switch account`,"prov.accountRemoved":`Removed {email}.`,"prov.accountRemoveFail":`Could not remove {email}. The account is unchanged.`,"prov.accountRemoveAria":`Remove {email}`,"prov.accountRemoveConfirm":`Remove account {email}? Its login is deleted from this proxy.`,"prov.keyAdd":`Add API key`,"prov.keyAdded":`Added API key to {name}.`,"prov.keyAddFail":`Failed to add API key`,"prov.keyPlaceholder":`Paste API key`,"prov.keySwitchTitle":`Use this key`,"prov.keySwitched":`Switched to key {key}.`,"prov.keySwitchFail":`Failed to switch key`,"prov.keyRemoved":`Removed key {key}.`,"prov.keyRemoveAria":`Remove key {key}`,"prov.keyRemoveConfirm":`Remove API key {key}? It is deleted from this proxy's config.`,"prov.activeBadge":`Active`,"prov.disabledBadge":`Disabled`,"prov.defaultBadge":`Default`,"prov.enable":`Enable`,"prov.disable":`Disable`,"prov.enabled":`Enabled "{name}". Its models can appear in Codex again.`,"prov.disabled":`Disabled "{name}". Settings are kept, but its models are hidden.`,"prov.enableFail":`Failed to enable "{name}".`,"prov.disableFail":`Failed to disable "{name}".`,"prov.enableAria":`Enable provider {name}`,"prov.disableAria":`Disable provider {name}`,"prov.defaultCannotDisable":`Default provider can't be disabled`,"prov.openaiAccountMode":`Codex account mode`,"prov.openaiModePool":`Pool`,"prov.openaiModeDirect":`Direct`,"prov.openaiPoolDesc":`Default. Rotate the main login and added accounts using affinity, quota, cooldown, and failover.`,"prov.openaiDirectDesc":`Use only the current/main Codex login. Stored pool accounts are not read or rotated.`,"prov.openaiModeSaved":`OpenAI account mode changed to {mode}.`,"prov.openaiModeSaveFailed":`Could not change the OpenAI account mode.`,"prov.openaiApiDesc":`Uses an OpenAI API key and never uses Codex account credentials.`,"prov.manageCodexAccounts":`Manage Codex accounts`,"prov.openaiApiMissing":`API key required`,"prov.openaiApiSetup":`Set up API key`,"models.subtitle":`Toggle which models Codex sees — native GPT passthrough and routed providers, grouped by provider (click a header to collapse). Disabled models are hidden from the catalog + model picker. Changes apply on the next Codex turn — opencodex invalidates Codex's 5-min model cache so no restart is needed.`,"models.nativeGroupLabel":`OpenAI native`,"models.nativeHint":`Passthrough models use the Pool or Direct account option selected on Providers. Toggling one off hides it from the Codex picker (the catalog entry is kept, so re-enabling restores it exactly).`,"models.active":`{active}/{total} active`,"models.allOn":`All on`,"models.allOff":`All off`,"models.cap350k":`Cap 350k`,"models.capApplied":`Context cap applied — takes effect on the next Codex turn.`,"models.capSaveFailed":`Failed to save context cap`,"models.contextCapped":`350k cap`,"models.contextCapLabel":`Context cap`,"models.v2Label":`Sub-agent`,"models.v2DocsLink":`What is v1 / v2?`,"models.v2Mode_v1":`v1`,"models.v2Mode_default":`base`,"models.v2Mode_v2":`v2`,"models.v2ModeDesc_v1":`All models → v1 surface`,"models.v2ModeDesc_default":`Upstream defaults (sol/terra=v2, luna=v1)`,"models.v2ModeDesc_v2":`All models → v2 surface`,"models.v2Help":`Controls the multi-agent surface for all models.
10
-
11
- v1: Classic single-thread agent. Every model uses the v1 collab surface.
12
- base: Upstream defaults — sol/terra use v2, luna uses v1, others follow the codex feature flag.
13
- v2: Multi-thread agent with spawn_agent. Every model uses the v2 collab surface.
14
-
15
- Changes apply to new sessions.`,"dash.multiAgent":`Sub-agent`,"models.v2Conflict":`[agents] max_threads is set — codex will refuse to start; remove it from config.toml`,"models.v2Applied":`multi_agent_v2 updated — applies to new sessions (restart the Codex app to refresh the picker)`,"models.v2ThreadsLabel":`Max threads`,"models.v2ThreadsDefault":`default (4)`,"models.v2ThreadsApplied":`Thread limit updated — applies to new sessions`,"models.v2ThreadsInvalid":`Thread limit must be an integer >= 1`,"models.v2ThreadsApply":`Apply`,"models.capValue":`Cap {value}`,"models.contextCappedValue":`{value} cap`,"models.setAll":`Set all`,"models.custom":`Custom…`,"models.customApply":`Apply`,"models.customPlaceholder":`Tokens (e.g. 420000)`,"models.applied":`Applied — takes effect on the next Codex turn.`,"models.saveFailed":`Save failed`,"models.networkError":`Network error — is the proxy running?`,"models.loadFail":`Failed to load models — is the proxy running?`,"models.noRouted":`No routed models`,"models.noRoutedHint":`Log into a provider or add one first.`,"models.loading":`Loading…`,"models.search":`Search models…`,"models.showMore":`Show {n} more`,"models.allowlistLabel":`Only selected`,"models.allowlistHint":`Only checked models ship to the catalog (empty = all). Useful for providers exposing thousands of models.`,"models.selectedCount":`{n} selected`,"models.orderHint":`Picker order: Subagents picks (in the selected order) → remaining routed models alphabetically by provider, then model ID → native models. Visibility switches only filter models; they do not change this order.`,"sub.subtitle":`Codex's {cmd} advertises only the first 5 models (by priority) as overrides. Pick up to 5 here — native gpt or routed — and opencodex sets their catalog priority so exactly these lead. Any other model is still callable by its exact name; this only controls what's shown.`,"sub.featured":`Featured`,"sub.orderHint":`The order shown here sets positions 1–5 at the top of the Codex model picker and the default model candidates for {cmd}.`,"sub.noneSelected":`None selected — pick from the list below.`,"sub.models":`Models`,"sub.search":`Search models (native gpt + routed)…`,"sub.noModels":`No models — log into a provider or add one first.`,"sub.saved":`Saved {n} models. Start a new Codex session (or run {cmd}) to see them as spawn_agent overrides.`,"sub.saveFailed":`Save failed`,"sub.networkError":`Network error — is the proxy running?`,"sub.loadFail":`Failed to load models — is the proxy running?`,"sub.loading":`Loading…`,"sub.moveUp":`Move {m} up`,"sub.moveDown":`Move {m} down`,"sub.removeAria":`Remove {m}`,"logs.title":`Request Logs`,"logs.subtitle":`Recent requests routed through the local opencodex proxy, newest first.`,"logs.autoRefresh":`Auto-refresh`,"logs.noRequests":`No requests yet.`,"logs.filter.surface.label":`Surface`,"logs.filter.surface.all":`All`,"logs.filter.surface.claude":`Claude`,"logs.filter.surface.codex":`Codex`,"logs.badge.claude":`Claude`,"logs.col.time":`Time`,"logs.col.request":`Request`,"logs.col.model":`Model`,"logs.col.effort":`Effort`,"logs.col.provider":`Provider`,"logs.col.status":`Status`,"logs.col.tokens":`Tokens`,"logs.col.error":`Error`,"logs.col.upstreamReason":`Upstream reason`,"logs.col.duration":`Duration`,"logs.tokens.reported":`reported`,"logs.tokens.unreported":`unreported`,"logs.tokens.unsupported":`unsupported`,"logs.tokens.estimated":`estimated`,"logs.tokens.input":`input`,"logs.tokens.output":`output`,"logs.tokens.cacheRead":`cache read (c)`,"logs.tokens.cacheWrite":`cache write (w)`,"logs.tokens.reasoning":`reasoning`,"logs.tokens.noCache":`no cache data`,"logs.tokens.noCacheNote":`this provider does not report cache tokens`,"logs.tokens.estimatedNote":`estimated (provider reports no exact usage)`,"logs.details":`Details`,"logs.detailTitle":`Request details`,"logs.detailRaw":`Raw log entry`,"debug.title":`Debug`,"debug.subtitle":`Opt-in provider transport and usage-extraction diagnostics. Request errors and 502s stay on Logs.`,"debug.debug":`Provider debug`,"debug.usage":`Usage extraction`,"debug.injection":`Injection log`,"debug.claude":`Claude inbound`,"debug.claudeInbound.title":`Claude inbound requests`,"debug.claudeInbound.sub":`What Claude Code/Desktop actually sends (thinking, effort, metadata) — no prompt text is stored.`,"debug.claudeInbound.empty":`No requests captured yet. Send a message from Claude while this is on.`,"debug.claudeInbound.time":`Time`,"debug.claudeInbound.endpoint":`Endpoint`,"debug.claudeInbound.model":`Model`,"debug.claudeInbound.none":`none`,"debug.reset":`Clear runtime overrides`,"debug.refresh":`Refresh`,"debug.follow":`Follow`,"debug.streamProvider":`Provider`,"debug.streamUsage":`Usage`,"debug.streamInjection":`Injection`,"debug.loading":`Loading debug settings…`,"debug.emptyTitle":`Debug logging is off`,"debug.empty":`Turn on Provider debug or Usage extraction in the card above. Lines appear here after you send a request through the proxy.`,"debug.noLinesTitle":`Waiting for lines`,"debug.noLines.provider":`Provider debug is on, but it only records transport anomalies (dropped or malformed frames, and Cursor dial/retry events). A clean request through a provider like Anthropic can produce no lines.`,"debug.noLines.usage":`Usage extraction is on but nothing has been captured yet. Send a chat/request through Codex and it appears here.`,"debug.noLines.injection":`Injection log is on but nothing has been captured yet. It records multi-agent guidance injection and effort-cap decisions on collab and sub-agent turns.`,"usage.title":`Usage`,"usage.subtitle":`Local token accounting from your proxy. Missing usage is never shown as zero.`,"usage.loading":`Loading usage data…`,"usage.empty":`No usage recorded yet. Send a request through the proxy to see activity here.`,"usage.range.all":`All`,"usage.range.30d":`30d`,"usage.range.7d":`7d`,"usage.card.requests":`Requests`,"usage.card.measured":`Measured`,"usage.card.reported":`Reported`,"usage.card.totalTokens":`Total tokens`,"usage.card.cachedTokens":`Cache reads`,"usage.card.cachedTokensHint":`Prompt tokens served from the provider cache (reads). Cache writes are shown below when present.`,"usage.card.cacheWriteTokens":`cache writes`,"usage.card.coverage":`Coverage`,"usage.card.activeDays":`Active days`,"usage.section.heatmap":`Daily activity`,"usage.section.models":`Models`,"usage.section.providers":`Providers`,"usage.section.coverage":`Coverage breakdown`,"usage.coverage.measured":`Measured`,"usage.coverage.reported":`Provider reported`,"usage.coverage.estimated":`Estimated`,"usage.coverage.note":`Measured entries include provider-reported and estimated token counts. Unreported and unsupported requests are tracked but never inflated to zero tokens.`,"usage.search.models":`Search models…`,"usage.col.requests":`Requests`,"usage.col.measured":`Measured`,"usage.col.reported":`Reported`,"usage.col.tokens":`Tokens`,"usage.col.share":`Share`,"usage.heatmap.less":`Less`,"usage.heatmap.more":`More`,"usage.dayMon":`Mon`,"usage.dayWed":`Wed`,"usage.dayFri":`Fri`,"usage.heatmap.tooltipTokens":`{tokens} tokens`,"usage.heatmap.tooltipRequests":`{requests} requests`,"modal.addNamed":`Add: {label}`,"modal.add":`Add provider`,"modal.search":`Search providers…`,"modal.logInWith":`Log in with {label}`,"modal.waitingBrowser":`Waiting for browser…`,"modal.providerName":`Provider name`,"modal.adapter":`Adapter`,"modal.baseUrl":`Base URL`,"modal.defaultModel":`Default model (optional)`,"modal.nameRequired":`Provider name is required`,"modal.baseUrlRequired":`Base URL is required`,"modal.networkError":`Network error — is the proxy running?`,"modal.loginFailStart":`Login failed to start`,"modal.waitingLogin":`Waiting for browser login…`,"modal.loggingIn":`Logging in…`,"modal.loginTimeout":`Login timed out — try again.`,"modal.back":`Back`,"modal.badge.oauth":`OAuth`,"modal.customProvider":`Custom provider`,"modal.failedStatus":`Failed ({status})`,"modal.loginError":`Login error: {error}`,"modal.badge.codexLogin":`Codex login`,"modal.badge.local":`Local`,"modal.badge.apiKey":`API key`,"modal.badge.direct":`Direct`,"modal.badge.pool":`Pool`,"modal.badge.free":`Free`,"modal.invalidPreset":`This built-in provider preset is incomplete. Restart the proxy and try again.`,"modal.freeTierTitle":`Free tier`,"modal.freeTierDefault":`No API key required. Works out of the box.`,"modal.tab.accounts":`Accounts`,"modal.tab.free":`Free`,"modal.tab.paid":`Paid`,"modal.accountsHint":`Codex account providers forward your ChatGPT login. Manage accounts in`,"modal.accountsCodexAuthLink":`Codex Auth`,"modal.browseAll":`Browse all {count} providers`,"modal.browseBack":`Back to top providers`,"modal.notListed":`Provider not listed? Add a custom one`,"modal.catalogLoading":`Loading catalog…`,"modal.accountLogin":`Log in`,"modal.accountLogout":`Log out`,"modal.accountLoggedIn":`Logged in`,"modal.accountLoggedOut":`Not logged in`,"quota.fiveHourLimit":`5-hour limit`,"quota.weeklyLimit":`Weekly limit`,"quota.monthlyLimit":`30-day limit`,"quota.cursorFirstParty":`First-party models`,"quota.cursorApiUsage":`API usage`,"quota.totalSubscriptionCredits":`Total subscription credits`,"quota.usedPercent":`{pct}% used`,"quota.limitReached":`Limit reached`,"quota.resetsToday":`Resets today at {time}`,"quota.resetsTomorrow":`Resets tomorrow at {time}`,"quota.resetsAt":`Resets {when}`,"quota.resetsRelativeMinutes":`Resets in {n} min`,"quota.resetsRelativeHours":`Resets in {n} h`,"pws.status.ready":`Ready`,"pws.status.needsSetup":`Needs setup`,"pws.auth.chatgptPassthrough":`ChatGPT passthrough`,"pws.auth.noKey":`No key needed`,"pws.freeTitle":`Free pricing (a key may still be required)`,"pws.localTitle":`Local runtime`,"pws.modelCountOne":`1 model`,"pws.modelCount":`{count} models`,"pws.rail.suffixDefault":` · default`,"pws.rail.suffixLocal":` · local`,"pws.rail.suffixFree":` · free`,"pws.rail.selectAria":`Select {name} — {status}{suffix}`,"pws.searchPlaceholder":`Search providers…`,"pws.filterAria":`Filter providers`,"pws.providerFiltersAria":`Provider filters`,"pws.filters":`Filters`,"pws.filterStatus":`Status`,"pws.pricing":`Pricing`,"pws.paid":`Paid`,"pws.filterType":`Type`,"pws.type.cloud":`Cloud`,"pws.type.local":`Local`,"pws.type.selfHosted":`Self-hosted`,"pws.type.login":`Login`,"pws.sort":`Sort`,"pws.sortProvidersAria":`Sort providers`,"pws.sort.az":`A–Z`,"pws.sort.za":`Z–A`,"pws.sort.freePaid":`Free first`,"pws.sort.paidFree":`Paid first`,"pws.sort.accountsFirst":`Accounts first`,"pws.resetAll":`Reset all`,"pws.providerList":`Provider list`,"pws.providersAria":`Providers`,"pws.groupReady":`Ready ({count})`,"pws.groupNeedsSetup":`Needs setup ({count})`,"pws.groupDisabled":`Disabled ({count})`,"pws.noSearchResults":`No providers match your search.`,"pws.noMatchFilters":`No providers match the filters.`,"pws.noProvidersConfigured":`No providers configured.`,"pws.workspaceMainAria":`Provider details`,"pws.detailComingSoon":`Detail view coming soon — use the classic view to manage this provider.`,"pws.selectPrompt":`Select a provider from the list.`,"pws.connectFirst":`Connect your first provider`,"pws.empty.browseFree":`Browse free providers`,"pws.empty.browseFreeDesc":`Start without a subscription`,"pws.empty.connectAccount":`Connect an account`,"pws.empty.connectAccountDesc":`Use your ChatGPT or provider login`,"pws.empty.addEndpoint":`Add an endpoint`,"pws.empty.addEndpointDesc":`Custom base URL and API key`,"pws.workspaceToggle":`Workspace view`,"pws.classicToggle":`Classic view`,"pws.tab.overview":`Overview`,"pws.tab.models":`Models`,"pws.tab.usage":`Usage`,"pws.tab.accounts":`Accounts`,"pws.tab.settings":`Settings`,"pws.connection":`Connection`,"pws.status.connected":`Connected`,"pws.cell.auth":`Authentication`,"pws.cell.note":`Note`,"pws.cell.defaultModel":`Default model`,"pws.statsAria":`Provider statistics`,"pws.statsTitle":`Statistics`,"pws.stats.totalRequests":`Requests (30d)`,"pws.stats.totalTokens":`Tokens (30d)`,"pws.stats.quotaUpdated":`Quota updated`,"pws.stats.quotaTracked":`Rate limits tracked on the Usage tab.`,"pws.stats.source":`Source`,"pws.usageLast30d":`Usage (last 30 days)`,"pws.metricRequests":`requests`,"pws.metricTokens":`tokens`,"pws.usageUnavailable":`No usage recorded yet.`,"pws.rateLimits":`Rate limits`,"pws.quotaUnavailable":`No quota data for this provider.`,"pws.selected":`Selected`,"pws.copyModelId":`Copy ID`,"pws.modelCopied":`Copied!`,"pws.modelsAvailable":`{count} available`,"pws.modelSearchPlaceholder":`Filter models…`,"pws.modelsLoading":`Loading models…`,"pws.modelsLoadFailed":`Could not load models.`,"pws.retry":`Retry`,"pws.noModels":`No models discovered for this provider.`,"pws.noModelMatch":`No models match the filter.`,"pws.adapterBaseRequired":`Adapter and base URL are required.`,"pws.addAccount":`Add account`,"pws.addKey":`Add API key`,"pws.apiKeys":`API Keys`,"pws.authMode":`Auth mode`,"pws.availableAccounts":`Available accounts`,"pws.accountOrdinal":`Account {count}`,"pws.accountsLoading":`Loading accounts…`,"pws.accountsLoadFailed":`Accounts could not be loaded.`,"pws.retryAccounts":`Retry`,"pws.noAccounts":`No accounts are connected yet.`,"pws.accountSwitching":`Switching…`,"pws.accountCurrent":`Current account`,"pws.defaultModelNone":`None (use provider default)`,"pws.discardSettings":`Discard`,"pws.jsonEditorDesc":`Edit the raw provider JSON config. Changes are saved immediately.`,"pws.jsonEditorTitle":`JSON editor — {name}`,"pws.jsonRestore":`Restore`,"pws.jsonSave":`Save`,"pws.loggedInTitle":`Logged in`,"pws.notLoggedInTitle":`Not logged in`,"pws.note":`Note`,"pws.optionalPlaceholder":`Optional`,"pws.providerId":`Provider ID`,"pws.reauth":`Needs re-auth`,"pws.removeConfirm":`Remove`,"pws.removeConfirmBody":`Remove provider "{name}"? This cannot be undone.`,"pws.removeConfirmTitle":`Remove provider`,"pws.saveSettings":`Save`,"pws.saving":`Saving…`,"pws.settingsSaved":`Settings saved.`,"pws.settingsUnsavedBar":`You have unsaved changes.`,"pws.unsavedLeaveBody":`You have unsaved changes. Save them before leaving?`,"pws.unsavedLeaveTitle":`Unsaved changes`,"pws.updatesUnavailable":`Provider updates are not available.`,"pws.dashboard.title":`Providers overview`,"pws.dashboard.subtitle":`Manage all your model providers in one place.`,"pws.dashboard.rateLimits":`RATE LIMITS`,"pws.dashboard.recentlyUsed":`RECENTLY USED`,"pws.dashboard.requests":`{count} requests`,"pws.dashboard.checkedAgo":`Checked {time}`,"pws.dashboard.noQuota":`No quota data`,"pws.dashboard.noUsage":`No usage data yet`,"pws.allProviders":`Provider Overview`,"pws.enabledLabel":`Enabled`,"pws.testConnection":`Test connection`,"pws.testing":`Testing…`,"pws.connectionOk":`Connection OK`,"pws.connectionFailed":`Connection failed`,"pws.editSettings":`Edit settings`,"pws.viewUsage":`View detailed usage`,"pws.allSystemsOk":`All systems operational`,"pws.apiKeyConfigured":`API key configured`,"pws.addApiKey":`Add API key`,"pws.loggedInAs":`Logged in as {email}`,"pws.notLoggedIn":`Not logged in`,"pws.passthrough":`Codex passthrough`,"pws.notes":`NOTES`,"pws.notePlaceholder":`Add a note about this provider...`,"pws.noteSaved":`Note saved`,"pws.authSummary":`AUTHENTICATION`,"time.justNow":`Just now`,"time.notChecked":`Not checked`,"time.minutesAgo":`{n}m ago`,"time.hoursAgo":`{n}h ago`,"time.daysAgo":`{n}d ago`,"modal.noMatch":`No match.`,"modal.oauthDefaultNote":`Log in with your account — no API key needed.`,"modal.oauthComingSoon":`OAuth login for {label} arrives in the next update. Use an API key for now.`,"modal.oauthComingSoonShort":`OAuth login for this provider arrives in the next update — use an API key for now.`,"modal.useApiKeyInstead":`Use an API key instead`,"modal.setupGuide":`Setup guide`,"modal.setupStep1Prefix":`Go to`,"modal.setupDashboardLink":`{label} dashboard`,"modal.setupStep1Suffix":`and copy your API key`,"modal.setupStep2":`Paste it in the API key field below`,"modal.setupStep3":`Click Add provider — models are auto-discovered`,"modal.namePlaceholder":`e.g. openrouter`,"modal.duplicateWarn":`Provider "{name}" exists and will be overwritten.`,"modal.forwardHintPrefix":`No key needed — the proxy forwards your`,"modal.forwardCredentials":`codex login`,"modal.forwardHintSuffix":`credentials to this provider.`,"modal.localHint":`No API key is stored. This adds Cursor's static public model catalog for Codex, but live Cursor transport and native file/shell execution remain disabled until audited.`,"modal.getApiKey":`Get your {label} API key`,"modal.apiKey":`API key`,"modal.apiKeyPlaceholder":`sk-… (or $ENV_VAR)`,"modal.defaultModelPlaceholder":`e.g. gpt-5.5`,"modal.baseUrlPlaceholder":`https://...`,"modal.adding":`Adding…`,"modal.useOauthLogin":`← Use OAuth login`,"nav.codexAuth":`Codex Auth`,"nav.api":`API`,"nav.openMenu":`Open menu`,"nav.closeMenu":`Close menu`,"codexAuth.mainAccount":`Main Account`,"codexAuth.appLogin":`App login`,"codexAuth.accountPool":`Account Pool`,"codexAuth.accountModeTitle":`OpenAI account mode`,"codexAuth.accountModePool":`Pool mode`,"codexAuth.accountModePoolDesc":`The main login and eligible added accounts rotate here.`,"codexAuth.accountModeDirect":`Direct mode`,"codexAuth.accountModeDirectDesc":`Requests use only the main login; added accounts remain stored for Pool mode.`,"codexAuth.openaiMissing":`The built-in OpenAI provider is not configured.`,"codexAuth.openaiDisabled":`The built-in OpenAI provider is disabled.`,"codexAuth.openProviders":`Open Providers`,"codexAuth.add":`Add`,"codexAuth.refreshQuota":`Refresh quotas`,"codexAuth.refreshingQuota":`Refreshing...`,"codexAuth.quotaRefreshed":`Quotas refreshed`,"codexAuth.quotaRefreshFailed":`Failed to refresh quotas`,"codexAuth.noPool":`No pool accounts added yet.`,"codexAuth.fiveHour":`5h`,"codexAuth.weekly":`Week`,"codexAuth.monthly":`30d`,"codexAuth.resets":`resets`,"codexAuth.today":`Today`,"codexAuth.current":`CURRENT`,"codexAuth.nextSession":`NEXT SESSION`,"codexAuth.poolPrepared":`PREPARED FOR POOL`,"codexAuth.preparePoolTitle":`Prepare this account for Pool mode?`,"codexAuth.preparePoolDesc":`Direct requests keep using the main login. This account becomes the prepared Pool selection when Pool mode is enabled.`,"codexAuth.prepareForPool":`Prepare for Pool`,"codexAuth.poolPreparedToast":`{email} is prepared for Pool mode`,"codexAuth.switchTitle":`Switch active account?`,"codexAuth.switchDesc":`This applies from the next Codex session. Current session stays on the existing account.`,"codexAuth.cacheWarning":`Prompt cache resets on account switch. New session starts with empty cache.`,"codexAuth.setAsNext":`Set as Next Session`,"codexAuth.cancel":`Cancel`,"codexAuth.switchBack":`Switch back to Main?`,"codexAuth.switchBackDesc":`Next Codex session will use your App login account again.`,"codexAuth.autoSwitch":`Auto-switch at 80%`,"codexAuth.autoSwitchDesc":`New sessions switch when the relevant quota window reaches the threshold; Go/Free use 30d only`,"codexAuth.switched":`{email} will be used from next session`,"codexAuth.loadFailed":`Accounts could not be loaded.`,"codexAuth.switchFailed":`The account could not be switched. Your previous selection is unchanged.`,"codexAuth.removeConfirm":`Remove {id}?`,"codexAuth.removeFailed":`The account could not be removed. Nothing was changed.`,"codexAuth.addTitle":`Add Codex Account`,"codexAuth.addIdLabel":`Account ID (slug)`,"codexAuth.addIdPlaceholder":`codex-work, codex-alt, team...`,"codexAuth.resetCreditsAria":`{count} reset credit(s)`,"codexAuth.addJsonLabel":`auth.json content`,"codexAuth.addHelp":`Copy from another machine's ~/.codex/auth.json, or use codex-auth export.`,"codexAuth.importBtn":`Import`,"codexAuth.importInvalidJson":`Invalid JSON`,"codexAuth.importMissingTokens":`Missing access_token or refresh_token in JSON`,"codexAuth.importMissingId":`Account ID is required`,"codexAuth.accountAdded":`Account added to pool`,"codexAuth.addPickDesc":`Login with another ChatGPT account to add it to the pool.`,"codexAuth.oauthLogin":`OAuth Login`,"codexAuth.oauthDesc":`Opens ChatGPT login in browser`,"codexAuth.importAuthJson":`Import auth.json`,"codexAuth.importAuthJsonDesc":`From another Codex install or codex-auth export`,"codexAuth.back":`Back`,"codexAuth.oauthAlreadyInProgress":`Login already in progress. Complete it in your browser.`,"codexAuth.oauthWaiting":`Waiting for ChatGPT login to complete in your browser...`,"codexAuth.copyLoginLink":`Copy login link`,"codexAuth.loginLinkCopied":`Login link copied`,"codexAuth.loginLinkCopyFailed":`Could not copy login link.`,"codexAuth.oauthCancelled":`Login was cancelled.`,"codexAuth.needsReauth":`Re-login`,"codexAuth.tokenExpired":`Token expired — re-add this account to refresh`,"codexAuth.emailCollision":`This account matches your main Codex login. Use a different account.`,"codexAuth.resetCreditsTitle":`Reset Credits`,"codexAuth.resetCreditsAvailable":`You have {count} reset credit(s) available.`,"codexAuth.resetCreditsDesc":`Each credit resets your current hourly and weekly usage limits instantly.`,"codexAuth.noResetCredits":`You don't have any reset credits.`,"codexAuth.earnCreditsHint":`Credits are earned monthly and via the referral program.`,"codexAuth.creditsExpireNote":`Credits expire 30 days after earning.`,"codexAuth.useOneCredit":`Use 1 Credit`,"codexAuth.confirmResetTitle":`Use Reset Credit?`,"codexAuth.confirmResetDesc":`This will instantly reset your current rate limits. You have {count} credit(s) remaining.`,"codexAuth.irreversible":`This action cannot be undone.`,"codexAuth.useCredit":`Use Credit`,"codexAuth.redeeming":`Resetting...`,"codexAuth.resetSuccess":`Rate limits reset! {remaining} credit(s) remaining.`,"codexAuth.resetNothingToReset":`No rate-limit window needs resetting right now.`,"codexAuth.resetNoCredit":`No reset credits available.`,"codexAuth.resetError":`Failed to redeem reset credit. Please try again.`,"codexAuth.fifoNote":`The oldest credit is used first.`,"codexAuth.confirmWhichCredit":`Credit from {date} will be used.`,"codexAuth.creditNext":`Next to use`,"codexAuth.creditLabel":`Credit #{n}`,"codexAuth.creditNextBadge":`NEXT`,"codexAuth.creditGranted":`Granted {date}`,"codexAuth.creditExpires":`Expires {date} ({days}d left)`,"api.title":`API Access`,"api.subtitle":`Use generated API keys to access the opencodex proxy from external apps. Keys authenticate via the {authHeader} or {altHeader} header.`,"api.endpoint":`Endpoint`,"api.endpointNote":`Compatible with OpenAI Responses API format.`,"api.newKeyTitle":`New key created`,"api.newKeyNote":`Copy this key now — it won't be shown again.`,"api.copy":`Copy`,"api.copied":`Copied`,"api.dismiss":`Dismiss`,"api.generateTitle":`Generate key`,"api.keyNamePlaceholder":`Key name (optional)`,"api.generate":`Generate`,"api.generating":`Creating…`,"api.activeKeys":`Active keys ({count})`,"api.noKeys":`No API keys yet. Generate one above.`,"api.colName":`Name`,"api.colKey":`Key`,"api.colCreated":`Created`,"api.confirm":`Confirm`,"api.deleteAria":`Delete API key`,"api.usageTitle":`Usage example`,"nav.claude":`Claude`,"claude.subtitle":`Use GPT, Gemini, and other models inside Claude Code.`,"claude.pageTitle":`Claude Code`,"claude.enabledLabel":`Claude connection`,"claude.enabledHint":`When off, Claude Code cannot use this proxy.`,"claude.authMode":`Auth Mode`,"claude.authModeHint":`Subscription requires Claude account, Proxy works without Anthropic account`,"claude.authModeSubscription":`Subscription (Claude account)`,"claude.authModeProxy":`Proxy (no account needed)`,"claude.systemEnv":`Auto-connect`,"claude.systemEnvDesc":`When on, running claude in any terminal automatically goes through the proxy.`,"claude.systemEnvWarn":`⚠ You must fully quit and relaunch your terminal app for this to take effect. Not recommended.`,"claude.fastMode":`Fast Mode (OpenAI)`,"claude.fastModeDesc":`Controls service_tier for OpenAI models. ON = priority (faster). OFF = default. Auto = passthrough (client decides).`,"claude.fastAuto":`Auto`,"claude.fastOn":`ON`,"claude.fastOff":`OFF`,"claude.autoContext":`Use big context automatically`,"claude.autoContextDesc":`Controls how far the 1M marking goes. ON: every model above 200k tokens (GPT models etc.) gets a big-context row. OFF: only true 1M models get one.`,"claude.autoContextInert":`Inactive because a legacy context-size value (maxContextTokens) exists in the config file. Remove it there to re-enable.`,"claude.autoCompactWindow":`Auto-summarize point`,"claude.autoCompactDefault":`350k (default)`,"claude.autoCompactWindowDesc":`Older messages are summarized when the chat reaches this point. It never exceeds each model's own limit, so 200k models are unaffected.`,"claude.autoCompactWindowWarn":`Changing this can break GPT models — set higher than a model's real limit, chats will error before the summary kicks in.`,"claude.injectAgents":`Auto-register subagents`,"claude.injectAgentsDesc":`Registers the models picked on the Subagents tab (plus the current default model) as dispatchable Claude Code agents (ocx-*). Applies from the next session.`,"claude.webSearchSidecar":`Web search sidecar override`,"claude.webSearchSidecarHint":`Override the main web search sidecar for Claude Code requests.`,"claude.visionSidecar":`Vision sidecar override`,"claude.visionSidecarHint":`Override the main vision sidecar for Claude Code requests.`,"claude.useMainSetting":`Use main setting`,"claude.sidecarModelPlaceholder":`Main setting model`,"claude.quickstart":`Get started`,"claude.quickstartHint":`{cmd} opens Claude Code through the proxy. Your claude.ai login stays active.`,"claude.manualEnv":`Manual setup (advanced)`,"claude.smallFastModel":`Background helper model`,"claude.smallFastModelHint":`The model Claude Code uses for background work like chat summaries and topic detection. The haiku subagent alias uses it too. Empty = Claude default (Haiku).`,"claude.slotUnset":`Use Claude default`,"claude.modelMap":`Model interception`,"claude.modelMapHint":`Intercepts requests for a specific model and reroutes them to the one you pick. Empty by default — nothing happens until you add a rule.`,"claude.mapFrom":`Original model (e.g. claude-sonnet-4-5)`,"claude.mapTo":`Swap to (e.g. gemini/gemini-3-pro)`,"claude.addMapping":`Add rule`,"claude.removeMapping":`Remove rule`,"claude.aliases":`Available models`,"claude.aliasesHint":`Models that appear in Claude Code's /model menu.`,"claude.loading":`Loading…`,"claude.loadFail":`Failed to load Claude settings`,"claude.saved":`Saved.`,"claude.saveFailed":`Save failed`,"claude.networkError":`Network error — is the proxy running?`,"claude.toggleAria":`Toggle Claude connection`,"claude.none":`None`,"cws.loading":`Loading combos…`,"cws.loadFailed":`Could not load combos.`,"cws.saveFailed":`Could not save combo.`,"cws.removeFailed":`Could not remove combo.`,"cws.saved":`Combo saved.`,"cws.created":`Created {model}.`,"cws.removed":`Removed combo/{id}.`,"cws.add":`Add combo`,"cws.addTitle":`Add combo`,"cws.addSubtitle":`Create a virtual model that fans out across providers. Clients request combo/<id>.`,"cws.create":`Create combo`,"cws.railAria":`Combo list`,"cws.searchPlaceholder":`Search combos or targets…`,"cws.noSearchResults":`No combos match your search.`,"cws.group.failover":`Failover`,"cws.group.roundRobin":`Round-robin`,"cws.targetCount":`{count} targets`,"cws.targetCountOne":`1 target`,"cws.overviewTitle":`Combos`,"cws.overviewBlurb":`Virtual models that fail over across provider/model targets or use deterministic smooth weighted round-robin.`,"cws.count.total":`Total`,"cws.count.failover":`Failover`,"cws.count.roundRobin":`Round-robin`,"cws.howTitle":`How it works`,"cws.howBody":`Ask Codex for combo/<id>. OpenCodex selects a target and hops only on retryable upstream failures. If no target remains available, the request fails closed instead of using the global default provider.`,"cws.attentionTitle":`Needs attention`,"cws.attention.empty":`No targets configured`,"cws.attention.few":`Only one target — failover has nowhere to hop`,"cws.emptyTitle":`Create your first combo`,"cws.empty.createDesc":`Name a virtual model and chain two or more backends.`,"cws.backToAll":`Back to all combos`,"cws.allCombos":`All combos`,"cws.copyModel":`Copy id`,"cws.copied":`Copied`,"cws.tab.config":`Config`,"cws.tab.about":`About`,"cws.strategy":`Strategy`,"cws.strategy.failover":`Failover`,"cws.strategy.roundRobin":`Round-robin`,"cws.strategy.failoverHint":`Try targets in order. If the first fails with a retryable error (rate limit, outage, subscription gate), hop to the next.`,"cws.strategy.roundRobinHint":`Deterministically balance traffic by weight. Keep each selected target for a batch of successful requests, then advance.`,"cws.field.id":`Combo id`,"cws.field.idPlaceholder":`free`,"cws.field.idHint":`Clients will request {model}`,"cws.field.stickyLimit":`Sticky successes before rotate`,"cws.field.stickyLimitHint":`Retain the selected target for this many successful requests before the weighted selector advances.`,"cws.field.defaultEffort":`Default reasoning`,"cws.field.defaultEffortHint":`Used only when the client omits reasoning effort. Client effort wins, and each target applies its own capability handling.`,"cws.targets":`Targets`,"cws.targets.failoverHint":`Order matters — first is primary.`,"cws.targets.roundRobinHint":`Weights control deterministic relative selection; order breaks ties in the rotation ring.`,"cws.target.provider":`Provider`,"cws.target.model":`Model`,"cws.target.weight":`Weight`,"cws.target.pickProvider":`Select provider…`,"cws.target.pickProviderFirst":`Select a provider first…`,"cws.target.pickModel":`Select model…`,"cws.target.noModels":`No models for this provider`,"cws.target.modelPlaceholder":`model id`,"cws.target.add":`Add target`,"cws.target.drag":`Drag to reorder`,"cws.target.moveUp":`Move up`,"cws.target.moveDown":`Move down`,"cws.aboutTitle":`Runtime`,"cws.aboutBody":`Failed targets cool down briefly, honoring Retry-After. Invalid or context errors do not hop. Each target adapts effort to its own capabilities; exhausted combos fail closed. Logs and Usage retain ordered physical attempts and per-attempt usage.`,"cws.removeConfirmTitle":`Remove {model}?`,"cws.removeConfirmDesc":`This removes the virtual model from config and the Codex catalog. It does not delete any providers.`,"cws.unsavedTitle":`Unsaved changes`,"cws.unsavedDesc":`Discard edits to this combo and continue?`,"cws.keepEditing":`Keep editing`,"cws.err.missingId":`Combo id is required.`,"cws.err.invalidId":`Id must start with a letter or number and use only letters, numbers, dots, underscores, or hyphens (max 64).`,"cws.err.duplicateId":`A combo with this id already exists.`,"cws.err.noTargets":`Add at least one target.`,"cws.err.incompleteTarget":`Each target needs a provider and model.`,"cws.target.disabled":`{name} (disabled)`,"cws.err.reservedNamespace":`A physical provider named combo must be renamed before creating combos.`,"cws.err.providerCollision":`The combo ID conflicts with a configured provider name.`,"cws.err.unknownProvider":`Each target must use a configured provider.`,"cws.err.duplicateTarget":`The same provider/model target can appear only once.`,"cws.err.invalidStickyLimit":`Sticky successes must be an integer from 1 to 100.`,"cws.err.invalidWeight":`Each round-robin weight must be an integer from 1 to 10000.`,"cws.err.noEnabledTarget":`At least one target must use an enabled provider.`},ve={en:_e,de:{"nav.dashboard":`Übersicht`,"nav.providers":`Anbieter`,"nav.models":`Modelle`,"nav.combos":`Combos`,"nav.subagents":`Sub-Agenten`,"nav.logs":`Protokolle`,"nav.debug":`Fehlerdiagnose`,"nav.usage":`Nutzung`,"common.github":`GitHub`,"common.save":`Speichern`,"common.saving":`Speichern…`,"common.cancel":`Abbrechen`,"common.discard":`Verwerfen`,"common.remove":`Entfernen`,"common.loading":`Lädt…`,"theme.label":`Design`,"theme.light":`Hell`,"theme.dark":`Dunkel`,"theme.system":`System`,"lang.label":`Sprache`,"dash.subtitle":`Live-Status des lokalen opencodex-Proxys, seiner Anbieter und der in Codex gerouteten Modelle.`,"dash.status":`Status`,"dash.online":`Online`,"dash.offline":`Offline`,"dash.version":`Version`,"dash.uptime":`Laufzeit`,"dash.providers":`Anbieter`,"dash.tokens30d":`Tokens (30d)`,"dash.coverage":`{pct} Abdeckung`,"dash.activeProviders":`Aktive Anbieter`,"dash.noProviders":`Keine Anbieter konfiguriert. Führe {cmd} aus.`,"dash.col.name":`Name`,"dash.col.adapter":`Adapter`,"dash.col.baseUrl":`Basis-URL`,"dash.col.model":`Modell`,"dash.availableModels":`Verfügbare Modelle`,"dash.noModels":`Keine Modelle gefunden. Prüfe die API-Schlüssel des Anbieters.`,"dash.cannotConnect":`Keine Verbindung zum Proxy. Läuft er?`,"dash.runStart":`Führe {cmd} aus, um den Proxy zu starten.`,"dash.stop":`Proxy stoppen`,"dash.stopConfirm":`Proxy stoppen und natives Codex wiederherstellen?`,"dash.stopping":`Wird gestoppt…`,"dash.codexAutoStart":`opencodex mit Codex starten`,"dash.codexAutoStartHint":`Wenn aktiviert, führt das Codex-Shim vor jedem Codex-CLI-/App-Start „ocx ensure" aus. Deaktiviere dies, um Codex unverändert zu lassen.`,"dash.searchModel":`Such-Sidecar-Modell`,"dash.searchModelHint":`Modell für web_search bei nicht über OpenAI gerouteten Modellen. Erfordert ChatGPT-Login.`,"dash.searchReasoning":`Such-Reasoning-Aufwand`,"dash.visionModel":`Vision-Sidecar-Modell`,"dash.visionModelHint":`Modell zur Beschreibung von Bildern für nur-Text-Routen. Erfordert ChatGPT-Login.`,"dash.webSearchSidecar":`Websuche-Sidecar`,"dash.webSearchSidecarHint":`Backend und Modell für die Websuche gerouteter Modelle auswählen.`,"dash.visionSidecar":`Vision-Sidecar`,"dash.visionSidecarHint":`Backend und Modell zur Bildbeschreibung für reine Textmodelle auswählen.`,"dash.shadowCallIntercept":`Shadow-Call-Abfangen`,"dash.shadowCallInterceptHint":`Fängt die gpt-5.4-mini-Hintergrundaufrufe der Codex-App ab und leitet sie an das gewählte Modell um. Effort wird auf low fixiert.`,"dash.shadowCallWarning":`⚠ Bei Aktivierung werden ALLE gpt-5.4-mini-Anfragen durch das gewählte Modell ersetzt.`,"dash.shadowCallOriginal":`Original`,"dash.shadowCallModel":`Ersatzmodell`,"dash.shadowCallTooltip":`Die Codex-App verwendet gpt-5.4-mini im Hintergrund für Titelgenerierung, Commit-Nachrichten und Skill-Orchestrierung.`,"models.shadowCallIntercept":`Shadow-Call-Abfangen`,"models.shadowCallInterceptHint":`Fängt die gpt-5.4-mini-Hintergrundaufrufe der Codex-App ab und leitet sie an das gewählte Modell um.`,"dash.sidecarBackend":`Backend`,"dash.sidecarModel":`Modell`,"dash.backendAuto":`Automatisch`,"dash.backendOpenAI":`OpenAI`,"dash.backendAnthropic":`Anthropic`,"dash.sidecarSaved":`Sidecar-Einstellungen gespeichert. Angewendet bei der nächsten Anfrage.`,"dash.sidecarSaveFailed":`Sidecar-Einstellungen konnten nicht gespeichert werden.`,"dash.injectionLabel":`Sub-Agent-Delegation`,"dash.injectionHint":`Wähle ein geroutetes Modell für den Delegations-Prompt. Der Agent wird angewiesen, es für Teilaufgaben zu nutzen.`,"dash.injectionActive":`Aktiv`,"dash.injectionNone":`Keine`,"dash.injectionEffortLabel":`Reasoning-Aufwand`,"dash.injectionEffortNone":`Modell-Standard`,"dash.effortCapLabel":`V2 Ultra Effort-Limit`,"dash.subagentEffortCapLabel":`V2 Sub-Agent Effort-Limit`,"dash.effortCapHelp":`Begrenzt die Reasoning-Intensität für V2-Ultra-Modus-Turns. Wenn gesetzt, werden eingehende Max-Anfragen (aus dem Ultra-Modus) auf das gewählte Niveau begrenzt. Das Sub-Agent-Limit gilt nur für erzeugte Kind-Agenten. Limits senken die Intensität nur, sie erhöhen sie nie. Wenn ein Modell das gewählte Niveau nicht unterstützt, wird automatisch auf das nächste unterstützte Niveau herabgesetzt.`,"dash.effortCapNone":`Kein Limit`,"dash.maintenance":`Wartung`,"dash.maintenanceHint":`Aktualisiere Codex’ Modellkatalog oder installiere eine neuere opencodex-Version.`,"dash.syncModels":`Modelle synchronisieren`,"dash.syncing":`Synchronisiere…`,"dash.syncOk":`Synchronisierung abgeschlossen. {count} Modell(e) angehängt.`,"dash.syncStaleHint":`Falls die Codex-App weiterhin eine alte Liste zeigt, starte ihren langlebigen App-Server-Prozess neu.`,"dash.syncFailed":`Synchronisierung fehlgeschlagen: {error}`,"dash.projectConfigTitle":`Projekt-Codex-Konfig umgeht OpenCodex`,"dash.projectConfigHint":`Diese repo-lokalen Einstellungen überschreiben den OpenCodex-Proxy (z. B. direkt zu OpenCode Go routen). Entferne sie, damit die Routing aus ~/.codex/config.toml in diesem Projekt greift.`,"dash.checkUpdate":`Update prüfen`,"dash.updateTitle":`opencodex aktualisieren`,"dash.updateDesc":`Prüfe npm auf den ausgewählten Kanal und wähle dann, ob der Proxy nach der Installation neu gestartet wird.`,"dash.updateChannel":`Kanal`,"dash.updateChecking":`Updates werden geprüft…`,"dash.updateInstalled":`Installiert`,"dash.updateLatest":`Neueste`,"dash.updateAvailable":`Update verfügbar`,"dash.updateCurrent":`Auf dem neuesten Stand`,"dash.updateCommand":`Befehl`,"dash.updateSource":`Dies ist ein Source-Checkout. Aktualisiere es im Terminal mit dem angezeigten Befehl.`,"dash.updateUnavailable":`Die neueste Version konnte nicht von npm gelesen werden. Versuche es später erneut.`,"dash.updateRetry":`Wiederholen`,"dash.updateRecheck":`Erneut prüfen`,"dash.updateCannotAuto":`Ein-Klick-Update ist nicht verfügbar ({reason}).`,"dash.updateReason.source_checkout":`Quellcode-Checkout`,"dash.updateReason.latest_unavailable":`npm-Registry nicht erreichbar`,"dash.updateReason.already_latest":`bereits auf dem neuesten Stand`,"dash.updateReason.unknown":`Update nicht verfügbar`,"dash.updateRestart":`Nach Update neu starten`,"dash.updateRestartHint":`Empfohlen. Die aktuelle GUI läuft weiter mit altem Code, bis der Proxy neu startet.`,"dash.runUpdate":`Aktualisieren`,"dash.updateReconnecting":`Warten auf den neu gestarteten Proxy…`,"dash.updateStatus.running":`opencodex wird aktualisiert.`,"dash.updateStatus.restarting":`Update installiert. Proxy wird neu gestartet.`,"dash.updateStatus.succeeded":`Update abgeschlossen.`,"dash.updateStatus.failed":`Update fehlgeschlagen.`,"prov.subtitle":`Konfiguriere die Upstream-Anbieter, die opencodex in Codex routet. Melde dich mit einem Konto an, füge einen Anbieter hinzu oder bearbeite die Rohkonfiguration.`,"prov.add":`Anbieter hinzufügen`,"prov.editJson":`JSON bearbeiten`,"prov.accountLogin":`Konto-Login`,"prov.noOauth":`Keine OAuth-Anbieter verfügbar.`,"prov.loggedIn":`angemeldet`,"prov.notLoggedIn":`nicht angemeldet`,"prov.logout":`Abmelden`,"prov.login":`Anmelden`,"prov.loginWith":`Anmelden mit {provider}`,"prov.waitingBrowser":`Warten auf Browser…`,"prov.didntOpen":`Hat sich nicht geöffnet? Hier klicken`,"prov.copyLink":`Link kopieren`,"prov.linkCopied":`Kopiert`,"prov.pasteRedirect":`Redirect-URL oder Code einfügen`,"prov.pasteRedirectHint":`Zeigt der Browser einen localhost-Fehler, kopiere die vollständige URL aus der Adressleiste und füge sie hier ein (oder den Autorisierungscode).`,"prov.pasteSubmit":`Senden`,"prov.pasteSubmitting":`Wird gesendet…`,"prov.pasteOk":`Code gesendet — Anmeldung wird abgeschlossen…`,"prov.pasteFail":`Code konnte nicht gesendet werden: {error}`,"prov.port":`Port`,"prov.default":`Standard`,"prov.loadingConfig":`Lädt…`,"prov.saved":`Gespeichert! Proxy neu starten, um anzuwenden.`,"prov.loadConfigFail":`Konfiguration konnte nicht geladen werden`,"prov.invalidJson":`Ungültiges JSON`,"prov.saveFailed":`Speichern fehlgeschlagen`,"prov.loginFailStart":`{provider}-Login konnte nicht gestartet werden`,"prov.loginError":`{provider}-Login-Fehler: {error}`,"prov.loginRequestFail":`{provider}-Login-Anfrage fehlgeschlagen`,"prov.loginOk":`Bei {provider} angemeldet. Führe {cmd} aus (oder es gilt live), um seine Modelle aufzulisten.`,"prov.logoutOk":`Von {provider} abgemeldet.`,"prov.logoutFail":`Abmeldung von {provider} fehlgeschlagen. Der Kontostatus bleibt unverändert.`,"prov.removed":`"{name}" entfernt.`,"prov.removeFail":`"{name}" konnte nicht entfernt werden.`,"prov.added":`"{name}" hinzugefügt. Sofort aktiv — führe {cmd} aus (oder starte neu), um seine Modelle in Codex’ Auswahl zu listen.`,"prov.removeConfirm":`Anbieter "{name}" entfernen? Seine Modelle verschwinden aus Codex’ Auswahl.`,"prov.hasApiKey":`API-Schlüssel konfiguriert`,"prov.hasHeaders":`benutzerdefinierte Header konfiguriert`,"prov.accounts":`Konten ({n})`,"prov.accountsAria":`{name}-Konten umschalten`,"prov.accountActive":`Aktiv`,"prov.accountReauth":`Erneut anmelden`,"prov.accountAdd":`Konto hinzufügen`,"prov.accountNoLabel":`Konto {id}`,"prov.accountSwitchTitle":`Dieses Konto verwenden`,"prov.accountSwitched":`Zu {email} gewechselt.`,"prov.accountSwitchFail":`Konto-Wechsel fehlgeschlagen`,"prov.accountRemoved":`{email} entfernt.`,"prov.accountRemoveFail":`{email} konnte nicht entfernt werden. Das Konto bleibt unverändert.`,"prov.accountRemoveAria":`{email} entfernen`,"prov.accountRemoveConfirm":`Konto {email} entfernen? Sein Login wird aus diesem Proxy gelöscht.`,"prov.keyAdd":`API-Schlüssel hinzufügen`,"prov.keyAdded":`API-Schlüssel zu {name} hinzugefügt.`,"prov.keyAddFail":`API-Schlüssel konnte nicht hinzugefügt werden`,"prov.keyPlaceholder":`API-Schlüssel einfügen`,"prov.keySwitchTitle":`Diesen Schlüssel verwenden`,"prov.keySwitched":`Zu Schlüssel {key} gewechselt.`,"prov.keySwitchFail":`Schlüssel-Wechsel fehlgeschlagen`,"prov.keyRemoved":`Schlüssel {key} entfernt.`,"prov.keyRemoveAria":`Schlüssel {key} entfernen`,"prov.keyRemoveConfirm":`API-Schlüssel {key} entfernen? Er wird aus der Proxy-Konfiguration gelöscht.`,"prov.activeBadge":`Aktiv`,"prov.disabledBadge":`Deaktiviert`,"prov.defaultBadge":`Standard`,"prov.enable":`Aktivieren`,"prov.disable":`Deaktivieren`,"prov.enabled":`"{name}" aktiviert. Seine Modelle können wieder in Codex erscheinen.`,"prov.disabled":`"{name}" deaktiviert. Einstellungen bleiben erhalten, aber seine Modelle sind verborgen.`,"prov.enableFail":`"{name}" konnte nicht aktiviert werden.`,"prov.disableFail":`"{name}" konnte nicht deaktiviert werden.`,"prov.enableAria":`Anbieter {name} aktivieren`,"prov.disableAria":`Anbieter {name} deaktivieren`,"prov.defaultCannotDisable":`Standard-Anbieter kann nicht deaktiviert werden`,"prov.openaiAccountMode":`Codex-Kontomodus`,"prov.openaiModePool":`Pool`,"prov.openaiModeDirect":`Direkt`,"prov.openaiPoolDesc":`Standard. Wechselt mit Affinität, Kontingent, Abklingzeit und Ausfallsicherung zwischen Hauptanmeldung und hinzugefügten Konten.`,"prov.openaiDirectDesc":`Verwendet nur die aktuelle primäre Codex-Anmeldung. Gespeicherte Pool-Konten werden weder gelesen noch gewechselt.`,"prov.openaiModeSaved":`OpenAI-Kontomodus wurde zu {mode} geändert.`,"prov.openaiModeSaveFailed":`Der OpenAI-Kontomodus konnte nicht geändert werden.`,"prov.openaiApiDesc":`Verwendet nur einen OpenAI-API-Schlüssel und keine Codex-Kontodaten.`,"prov.manageCodexAccounts":`Codex-Konten verwalten`,"prov.openaiApiMissing":`API-Schlüssel erforderlich`,"prov.openaiApiSetup":`API-Schlüssel einrichten`,"models.subtitle":`Steuere, welche Modelle Codex sieht — natives GPT-Passthrough und geroutete Anbieter, nach Anbieter gruppiert (Kopfzeile zum Einklappen anklicken). Deaktivierte Modelle sind im Katalog und in der Modellauswahl verborgen. Änderungen gelten bei der nächsten Codex-Runde — opencodex invalidiert Codex 5-Minuten-Modell-Cache, kein Neustart nötig.`,"models.nativeGroupLabel":`OpenAI nativ`,"models.nativeHint":`Passthrough-Modelle verwenden die unter Anbieter gewählte Pool- oder Direkt-Option. Ausblenden entfernt sie aus der Codex-Auswahl (Katalogeintrag bleibt, Reaktivierung stellt exakt wieder her).`,"models.active":`{active}/{total} aktiv`,"models.allOn":`Alle an`,"models.allOff":`Alle aus`,"models.cap350k":`Limit 350k`,"models.capApplied":`Kontext-Limit angewendet — greift bei der nächsten Codex-Runde.`,"models.capSaveFailed":`Kontext-Limit konnte nicht gespeichert werden`,"models.contextCapped":`350k-Limit`,"models.contextCapLabel":`Kontext-Limit`,"models.v2Label":`Sub-Agent`,"models.v2DocsLink":`Was ist v1 / v2?`,"models.v2Mode_v1":`v1`,"models.v2Mode_default":`base`,"models.v2Mode_v2":`v2`,"models.v2ModeDesc_v1":`Alle Modelle → v1-Oberfläche`,"models.v2ModeDesc_default":`Upstream-Standard (sol/terra=v2, luna=v1)`,"models.v2ModeDesc_v2":`Alle Modelle → v2-Oberfläche`,"models.v2Help":`Steuert die Multi-Agent-Oberfläche für alle Modelle.
16
-
17
- v1: Klassischer Single-Thread-Agent. Jedes Modell nutzt die v1-Collab-Oberfläche.
18
- base: Upstream-Standard — sol/terra nutzen v2, luna v1, andere folgen dem Codex-Feature-Flag.
19
- v2: Multi-Thread-Agent mit spawn_agent. Jedes Modell nutzt die v2-Collab-Oberfläche.
20
-
21
- Änderungen gelten für neue Sitzungen.`,"dash.multiAgent":`Sub-Agent`,"models.v2Conflict":`[agents] max_threads ist gesetzt — codex verweigert den Start; entferne es aus config.toml`,"models.v2Applied":`multi_agent_v2 aktualisiert — gilt für neue Sitzungen (Codex-App neu starten, um die Auswahl zu aktualisieren)`,"models.v2ThreadsLabel":`Max. Threads`,"models.v2ThreadsDefault":`Standard (4)`,"models.v2ThreadsApplied":`Thread-Limit aktualisiert — gilt für neue Sitzungen`,"models.v2ThreadsInvalid":`Thread-Limit muss eine ganze Zahl >= 1 sein`,"models.v2ThreadsApply":`Anwenden`,"models.capValue":`Limit {value}`,"models.contextCappedValue":`{value}-Limit`,"models.setAll":`Alle setzen`,"models.custom":`Benutzerdefiniert…`,"models.customApply":`Anwenden`,"models.customPlaceholder":`Tokens (z. B. 420000)`,"models.applied":`Angewendet — greift bei der nächsten Codex-Runde.`,"models.saveFailed":`Speichern fehlgeschlagen`,"models.networkError":`Netzwerkfehler — läuft der Proxy?`,"models.loadFail":`Modelle konnten nicht geladen werden — läuft der Proxy?`,"models.noRouted":`Keine gerouteten Modelle`,"models.noRoutedHint":`Melde dich zuerst bei einem Anbieter an oder füge einen hinzu.`,"models.loading":`Lädt…`,"models.search":`Modelle suchen…`,"models.showMore":`{n} weitere anzeigen`,"models.allowlistLabel":`Nur ausgewählte`,"models.allowlistHint":`Nur geprüfte Modelle gehen in den Katalog (leer = alle). Nützlich für Anbieter mit tausenden Modellen.`,"models.selectedCount":`{n} ausgewählt`,"models.orderHint":`Reihenfolge in der Modellauswahl: Subagents-Auswahl (in der festgelegten Reihenfolge) → übrige geroutete Modelle alphabetisch nach Anbieter, dann Modell-ID → native Modelle. Sichtbarkeitsschalter filtern nur; sie ändern diese Reihenfolge nicht.`,"sub.subtitle":`Codex {cmd} bewirbt nur die ersten 5 Modelle (nach Priorität) als Overrides. Wähle hier bis zu 5 — natives gpt oder geroutet — und opencodex setzt ihre Katalog-Priorität, sodass genau diese führen. Jedes andere Modell bleibt über seinen exakten Namen aufrufbar; dies steuert nur die Anzeige.`,"sub.featured":`Empfohlen`,"sub.orderHint":`Die hier gewählte und angezeigte Reihenfolge bestimmt die Plätze 1–5 oben in der Codex-Modellauswahl und die Standard-Modellkandidaten für {cmd}.`,"sub.noneSelected":`Nichts ausgewählt — wähle aus der Liste unten.`,"sub.models":`Modelle`,"sub.search":`Modelle suchen (nativ gpt + geroutet)…`,"sub.noModels":`Keine Modelle — melde dich zuerst bei einem Anbieter an oder füge einen hinzu.`,"sub.saved":`{n} Modelle gespeichert. Starte eine neue Codex-Sitzung (oder führe {cmd} aus), um sie als spawn_agent-Overrides zu sehen.`,"sub.saveFailed":`Speichern fehlgeschlagen`,"sub.networkError":`Netzwerkfehler — läuft der Proxy?`,"sub.loadFail":`Modelle konnten nicht geladen werden — läuft der Proxy?`,"sub.loading":`Lädt…`,"sub.moveUp":`{m} nach oben`,"sub.moveDown":`{m} nach unten`,"sub.removeAria":`{m} entfernen`,"logs.title":`Anfrage-Protokolle`,"logs.subtitle":`Letzte Anfragen über den lokalen opencodex-Proxy, neueste zuerst.`,"logs.autoRefresh":`Auto-Aktualisierung`,"logs.noRequests":`Noch keine Anfragen.`,"logs.filter.surface.label":`Oberfläche`,"logs.filter.surface.all":`Alle`,"logs.filter.surface.claude":`Claude`,"logs.filter.surface.codex":`Codex`,"logs.badge.claude":`Claude`,"logs.col.time":`Zeit`,"logs.col.request":`Anfrage`,"logs.col.model":`Modell`,"logs.col.effort":`Aufwand`,"logs.col.provider":`Anbieter`,"logs.col.status":`Status`,"logs.col.tokens":`Tokens`,"logs.col.error":`Fehler`,"logs.col.upstreamReason":`Upstream-Grund`,"logs.col.duration":`Dauer`,"logs.tokens.reported":`gemeldet`,"logs.tokens.unreported":`nicht gemeldet`,"logs.tokens.unsupported":`nicht unterstützt`,"logs.tokens.estimated":`geschätzt`,"logs.tokens.input":`Eingabe`,"logs.tokens.output":`Ausgabe`,"logs.tokens.cacheRead":`Cache-Treffer (c)`,"logs.tokens.cacheWrite":`Cache-Schreiben (w)`,"logs.tokens.reasoning":`Reasoning`,"logs.tokens.noCache":`keine Cache-Daten`,"logs.tokens.noCacheNote":`dieser Anbieter meldet keine Cache-Tokens`,"logs.tokens.estimatedNote":`Schätzung (Anbieter meldet keine exakte Nutzung)`,"logs.details":`Details`,"logs.detailTitle":`Anfragedetails`,"logs.detailRaw":`Roh-Protokolleintrag`,"debug.title":`Fehlerdiagnose`,"debug.subtitle":`Opt-in-Diagnose für Provider-Transport und Nutzungs-Extraktion. Anfragefehler und 502er bleiben unter Protokolle.`,"debug.debug":`Provider-Diagnose`,"debug.usage":`Nutzungs-Extraktion`,"debug.injection":`Injektions-Log`,"debug.claude":`Claude-Inbound`,"debug.claudeInbound.title":`Claude-Inbound-Anfragen`,"debug.claudeInbound.sub":`Zeigt, was Claude Code/Desktop tatsächlich sendet (thinking, effort, metadata) — kein Prompt-Text wird gespeichert.`,"debug.claudeInbound.empty":`Noch keine Anfragen erfasst. Sende bei aktivierter Erfassung eine Nachricht aus Claude.`,"debug.claudeInbound.time":`Zeit`,"debug.claudeInbound.endpoint":`Endpunkt`,"debug.claudeInbound.model":`Modell`,"debug.claudeInbound.none":`keine`,"debug.reset":`Laufzeit-Überschreibungen löschen`,"debug.refresh":`Aktualisieren`,"debug.follow":`Folgen`,"debug.streamProvider":`Anbieter`,"debug.streamUsage":`Nutzung`,"debug.streamInjection":`Injektion`,"debug.loading":`Lade Diagnose-Einstellungen…`,"debug.emptyTitle":`Diagnose-Logging ist aus`,"debug.empty":`Aktiviere Provider-Diagnose oder Nutzungs-Extraktion in der Karte oben. Zeilen erscheinen hier, nachdem du eine Anfrage über den Proxy gesendet hast.`,"debug.noLinesTitle":`Warte auf Zeilen`,"debug.noLines.provider":`Anbieter-Debug ist an, erfasst aber nur Transport-Anomalien (verworfene oder fehlerhafte Frames sowie Cursor-Dial/Retry-Ereignisse). Eine saubere Anfrage über einen Anbieter wie Anthropic kann null Zeilen erzeugen.`,"debug.noLines.usage":`Nutzungserfassung ist an, aber es wurde noch nichts erfasst. Sende einen Chat/eine Anfrage über Codex, dann erscheint es hier.`,"debug.noLines.injection":`Injektions-Log ist an, aber es wurde noch nichts erfasst. Es erfasst Multi-Agent-Guidance-Injektion und Effort-Cap-Entscheidungen bei Collab- und Sub-Agent-Turns.`,"usage.title":`Nutzung`,"usage.subtitle":`Lokale Token-Buchhaltung deines Proxys. Fehlende Nutzung wird nie als Null angezeigt.`,"usage.loading":`Lade Nutzungsdaten…`,"usage.empty":`Noch keine Nutzung erfasst. Sende eine Anfrage über den Proxy, um Aktivität hier zu sehen.`,"usage.range.all":`Alle`,"usage.range.30d":`30d`,"usage.range.7d":`7d`,"usage.card.requests":`Anfragen`,"usage.card.measured":`Gemessen`,"usage.card.reported":`Gemeldet`,"usage.card.totalTokens":`Gesamt-Tokens`,"usage.card.cachedTokens":`Cache-Treffer-Tokens`,"usage.card.cachedTokensHint":`Prompt-Tokens aus dem Provider-Cache (Treffer). Cache-Schreibvorgänge werden darunter separat angezeigt.`,"usage.card.cacheWriteTokens":`Cache-Schreiben`,"usage.card.coverage":`Abdeckung`,"usage.card.activeDays":`Aktive Tage`,"usage.section.heatmap":`Tägliche Aktivität`,"usage.section.models":`Modelle`,"usage.section.providers":`Anbieter`,"usage.section.coverage":`Abdeckungs-Aufschlüsselung`,"usage.coverage.measured":`Gemessen`,"usage.coverage.reported":`Anbieter gemeldet`,"usage.coverage.estimated":`Geschätzt`,"usage.coverage.note":`Gemessene Einträge enthalten anbieter-gemeldete und geschätzte Token-Zahlen. Nicht gemeldete und nicht unterstützte Anfragen werden erfasst, aber nie auf Null aufgebläht.`,"usage.search.models":`Modelle suchen…`,"usage.col.requests":`Anfragen`,"usage.col.measured":`Gemessen`,"usage.col.reported":`Gemeldet`,"usage.col.tokens":`Tokens`,"usage.col.share":`Anteil`,"usage.heatmap.less":`Weniger`,"usage.heatmap.more":`Mehr`,"modal.addNamed":`Hinzufügen: {label}`,"modal.add":`Anbieter hinzufügen`,"modal.search":`Anbieter suchen…`,"modal.logInWith":`Anmelden mit {label}`,"modal.waitingBrowser":`Warten auf Browser…`,"modal.providerName":`Anbietername`,"modal.adapter":`Adapter`,"modal.baseUrl":`Basis-URL`,"modal.defaultModel":`Standardmodell (optional)`,"modal.nameRequired":`Anbietername ist erforderlich`,"modal.baseUrlRequired":`Basis-URL ist erforderlich`,"modal.networkError":`Netzwerkfehler — läuft der Proxy?`,"modal.loginFailStart":`Login konnte nicht gestartet werden`,"modal.waitingLogin":`Warten auf Browser-Login…`,"modal.loggingIn":`Anmelden…`,"modal.loginTimeout":`Login-Zeitüberschreitung — versuche es erneut.`,"nav.codexAuth":`Codex-Auth`,"nav.api":`API`,"nav.openMenu":`Menü öffnen`,"nav.closeMenu":`Menü schließen`,"codexAuth.mainAccount":`Hauptkonto`,"codexAuth.appLogin":`App-Login`,"codexAuth.accountPool":`Kontopool`,"codexAuth.accountModeTitle":`OpenAI-Kontomodus`,"codexAuth.accountModePool":`Pool-Modus`,"codexAuth.accountModePoolDesc":`Die Hauptanmeldung und geeignete hinzugefügte Konten wechseln sich hier ab.`,"codexAuth.accountModeDirect":`Direktmodus`,"codexAuth.accountModeDirectDesc":`Anfragen verwenden nur die Hauptanmeldung; hinzugefügte Konten bleiben für den Pool-Modus gespeichert.`,"codexAuth.openaiMissing":`Der integrierte OpenAI-Anbieter ist nicht konfiguriert.`,"codexAuth.openaiDisabled":`Der integrierte OpenAI-Anbieter ist deaktiviert.`,"codexAuth.openProviders":`Anbieter öffnen`,"codexAuth.add":`Hinzufügen`,"codexAuth.refreshQuota":`Kontingente aktualisieren`,"codexAuth.refreshingQuota":`Aktualisiere…`,"codexAuth.quotaRefreshed":`Kontingente aktualisiert`,"codexAuth.quotaRefreshFailed":`Kontingente konnten nicht aktualisiert werden`,"codexAuth.noPool":`Noch keine Pool-Konten hinzugefügt.`,"codexAuth.fiveHour":`5 Std.`,"codexAuth.weekly":`Woche`,"codexAuth.monthly":`30d`,"codexAuth.resets":`zurücksetzen`,"codexAuth.today":`Heute`,"codexAuth.current":`AKTUELL`,"codexAuth.nextSession":`NÄCHSTE SITZUNG`,"codexAuth.poolPrepared":`FÜR POOL VORBEREITET`,"codexAuth.preparePoolTitle":`Dieses Konto für den Pool-Modus vorbereiten?`,"codexAuth.preparePoolDesc":`Direkte Anfragen verwenden weiterhin die Hauptanmeldung. Dieses Konto wird zur vorbereiteten Pool-Auswahl, sobald der Pool-Modus aktiviert ist.`,"codexAuth.prepareForPool":`Für Pool vorbereiten`,"codexAuth.poolPreparedToast":`{email} ist für den Pool-Modus vorbereitet`,"codexAuth.switchTitle":`Aktives Konto wechseln?`,"codexAuth.switchDesc":`Dies gilt ab der nächsten Codex-Sitzung. Die aktuelle Sitzung bleibt beim bestehenden Konto.`,"codexAuth.cacheWarning":`Prompt-Cache wird beim Kontowechsel zurückgesetzt. Neue Sitzung startet mit leerem Cache.`,"codexAuth.setAsNext":`Als nächste Sitzung festlegen`,"codexAuth.cancel":`Abbrechen`,"codexAuth.switchBack":`Zurück zum Hauptkonto?`,"codexAuth.switchBackDesc":`Die nächste Codex-Sitzung verwendet wieder dein App-Login-Konto.`,"codexAuth.autoSwitch":`Auto-Wechsel bei 80%`,"codexAuth.autoSwitchDesc":`Neue Sitzungen wechseln, wenn das entsprechende Kontingent-Fenster den Schwellenwert erreicht; Go/Free nutzen nur 30d`,"codexAuth.switched":`{email} wird ab der nächsten Sitzung verwendet`,"codexAuth.loadFailed":`Konten konnten nicht geladen werden.`,"codexAuth.switchFailed":`Das Konto konnte nicht gewechselt werden. Die vorherige Auswahl bleibt erhalten.`,"codexAuth.removeConfirm":`{id} entfernen?`,"codexAuth.removeFailed":`Das Konto konnte nicht entfernt werden. Es wurde nichts geändert.`,"codexAuth.addTitle":`Codex-Konto hinzufügen`,"codexAuth.addIdLabel":`Konto-ID (slug)`,"codexAuth.addJsonLabel":`auth.json-Inhalt`,"codexAuth.addHelp":`Kopiere von ~/.codex/auth.json einer anderen Maschine oder nutze codex-auth export.`,"codexAuth.importBtn":`Importieren`,"codexAuth.importInvalidJson":`Ungültiges JSON`,"codexAuth.importMissingTokens":`access_token oder refresh_token fehlen in JSON`,"codexAuth.importMissingId":`Konto-ID ist erforderlich`,"codexAuth.accountAdded":`Konto zum Pool hinzugefügt`,"codexAuth.addPickDesc":`Melde dich mit einem anderen ChatGPT-Konto an, um es zum Pool hinzuzufügen.`,"codexAuth.oauthLogin":`OAuth-Login`,"codexAuth.oauthDesc":`Öffnet ChatGPT-Login im Browser`,"codexAuth.importAuthJson":`auth.json importieren`,"codexAuth.importAuthJsonDesc":`Von einer anderen Codex-Installation oder codex-auth export`,"codexAuth.back":`Zurück`,"codexAuth.oauthAlreadyInProgress":`Login läuft bereits. Schließe es in deinem Browser ab.`,"codexAuth.oauthWaiting":`Warte auf Abschluss des ChatGPT-Logins in deinem Browser…`,"codexAuth.copyLoginLink":`Login-Link kopieren`,"codexAuth.loginLinkCopied":`Login-Link kopiert`,"codexAuth.loginLinkCopyFailed":`Login-Link konnte nicht kopiert werden.`,"codexAuth.oauthCancelled":`Login wurde abgebrochen.`,"codexAuth.needsReauth":`Erneut anmelden`,"codexAuth.tokenExpired":`Token abgelaufen — füge dieses Konto erneut hinzu, um zu aktualisieren`,"codexAuth.emailCollision":`Dieses Konto entspricht deinem Haupt-Codex-Login. Nutze ein anderes Konto.`,"codexAuth.resetCreditsTitle":`Gutschriften zurücksetzen`,"codexAuth.resetCreditsAvailable":`Du hast {count} Reset-Gutschrift(en) verfügbar.`,"codexAuth.resetCreditsDesc":`Jede Gutschrift setzt deine aktuellen stündlichen und wöchentlichen Nutzungsgrenzen sofort zurück.`,"codexAuth.noResetCredits":`Du hast keine Reset-Gutschriften.`,"codexAuth.earnCreditsHint":`Gutschriften werden monatlich und über das Empfehlungsprogramm verdient.`,"codexAuth.creditsExpireNote":`Gutschriften verfallen 30 Tage nach Erhalt.`,"codexAuth.useOneCredit":`1 Gutschrift nutzen`,"codexAuth.confirmResetTitle":`Reset-Gutschrift nutzen?`,"codexAuth.confirmResetDesc":`Dies setzt deine aktuellen Ratenbegrenzungen sofort zurück. Du hast noch {count} Gutschrift(en).`,"codexAuth.irreversible":`Diese Aktion kann nicht rückgängig gemacht werden.`,"codexAuth.useCredit":`Gutschrift nutzen`,"codexAuth.redeeming":`Wird zurückgesetzt…`,"codexAuth.resetSuccess":`Ratenbegrenzungen zurückgesetzt! {remaining} Gutschrift(en) übrig.`,"codexAuth.resetNothingToReset":`Kein Ratenbegrenzungs-Fenster muss gerade zurückgesetzt werden.`,"codexAuth.resetNoCredit":`Keine Reset-Gutschriften verfügbar.`,"codexAuth.resetError":`Reset-Gutschrift konnte nicht eingelöst werden. Bitte erneut versuchen.`,"codexAuth.fifoNote":`Die älteste Gutschrift wird zuerst verwendet.`,"codexAuth.confirmWhichCredit":`Gutschrift vom {date} wird verwendet.`,"codexAuth.creditNext":`Als nächstes`,"codexAuth.creditLabel":`Gutschrift #{n}`,"codexAuth.creditNextBadge":`NÄCHSTE`,"codexAuth.creditGranted":`Erhalten {date}`,"codexAuth.creditExpires":`Läuft ab {date} ({days} Tage übrig)`,"api.title":`API-Zugriff`,"api.subtitle":`Nutze generierte API-Schlüssel, um von externen Apps auf den opencodex-Proxy zuzugreifen. Schlüssel authentifizieren über den {authHeader}- oder {altHeader}-Header.`,"api.endpoint":`Endpunkt`,"api.endpointNote":`Kompatibel mit dem OpenAI Responses API-Format.`,"api.newKeyTitle":`Neuer Schlüssel erstellt`,"api.newKeyNote":`Kopiere diesen Schlüssel jetzt — er wird nicht erneut angezeigt.`,"api.copy":`Kopieren`,"api.copied":`Kopiert`,"api.dismiss":`Schließen`,"api.generateTitle":`Schlüssel generieren`,"api.keyNamePlaceholder":`Schlüsselname (optional)`,"api.generate":`Generieren`,"api.generating":`Erstelle…`,"api.activeKeys":`Aktive Schlüssel ({count})`,"api.noKeys":`Noch keine API-Schlüssel. Erstelle oben einen.`,"api.colName":`Name`,"api.colKey":`Schlüssel`,"api.colCreated":`Erstellt`,"api.confirm":`Bestätigen`,"api.deleteAria":`API-Schlüssel löschen`,"api.usageTitle":`Nutzungsbeispiel`,"nav.claude":`Claude`,"claude.subtitle":`GPT, Gemini und andere Modelle in Claude Code verwenden.`,"claude.enabledLabel":`Claude-Verbindung`,"claude.enabledHint":`Wenn aus, kann Claude Code diesen Proxy nicht verwenden.`,"claude.authMode":`Auth-Modus`,"claude.authModeHint":`Subscription erfordert Claude-Konto, Proxy funktioniert ohne Anthropic-Konto`,"claude.authModeSubscription":`Subscription (Claude-Konto)`,"claude.authModeProxy":`Proxy (kein Konto nötig)`,"claude.systemEnv":`Auto-Verbindung`,"claude.systemEnvDesc":`Wenn an, wird claude in jedem Terminal automatisch über den Proxy geleitet.`,"claude.systemEnvWarn":`⚠ Die Terminal-App muss vollständig beendet und neu gestartet werden. Nicht empfohlen.`,"claude.fastMode":`Fast Mode (OpenAI)`,"claude.fastModeDesc":`Steuert service_tier für OpenAI-Modelle. ON = Priorität (schneller). OFF = Standard. Auto = Durchleitung.`,"claude.fastAuto":`Auto`,"claude.fastOn":`ON`,"claude.fastOff":`OFF`,"claude.autoContext":`Großen Kontext automatisch nutzen`,"claude.autoContextDesc":`Steuert, wie weit die 1M-Markierung geht. AN: jedes Modell über 200k Tokens (GPT-Modelle usw.) erhält eine Big-Context-Zeile. AUS: nur echte 1M-Modelle.`,"claude.autoContextInert":`Inaktiv, weil in der Konfigurationsdatei ein alter Kontextgrößen-Wert (maxContextTokens) steht. Dort entfernen, um es wieder zu aktivieren.`,"claude.autoCompactWindow":`Punkt für Auto-Zusammenfassung`,"claude.autoCompactDefault":`350k (Standard)`,"claude.autoCompactWindowDesc":`Ältere Nachrichten werden an diesem Punkt zusammengefasst. Das eigene Limit jedes Modells wird nie überschritten — 200k-Modelle bleiben unberührt.`,"claude.autoCompactWindowWarn":`Eine Änderung kann GPT-Modelle stören — liegt der Wert über dem echten Modelllimit, kommt es vor der Zusammenfassung zu Fehlern.`,"claude.injectAgents":`Subagenten automatisch registrieren`,"claude.injectAgentsDesc":`Registriert die im Subagenten-Tab gewählten Modelle (plus das aktuelle Standardmodell) als aufrufbare Claude-Code-Agenten (ocx-*). Gilt ab der nächsten Sitzung.`,"claude.webSearchSidecar":`Websuche-Sidecar überschreiben`,"claude.webSearchSidecarHint":`Überschreibt den allgemeinen Websuche-Sidecar für Claude-Code-Anfragen.`,"claude.visionSidecar":`Vision-Sidecar überschreiben`,"claude.visionSidecarHint":`Überschreibt den allgemeinen Vision-Sidecar für Claude-Code-Anfragen.`,"claude.useMainSetting":`Haupteinstellung verwenden`,"claude.sidecarModelPlaceholder":`Modell der Haupteinstellung`,"claude.quickstart":`Erste Schritte`,"claude.quickstartHint":`{cmd} öffnet Claude Code über den Proxy. Dein claude.ai-Login bleibt aktiv.`,"claude.manualEnv":`Manuelle Einrichtung (erweitert)`,"claude.smallFastModel":`Hintergrund-Hilfsmodell`,"claude.smallFastModelHint":`Das Modell für Hintergrundarbeit wie Chat-Zusammenfassungen und Themenerkennung. Auch der haiku-Alias der Subagenten nutzt es. Leer = Claude-Standard (Haiku).`,"claude.slotUnset":`Claude-Standard verwenden`,"claude.modelMap":`Modell-Abfangen`,"claude.modelMapHint":`Fängt Anfragen für ein bestimmtes Modell ab und leitet sie an das gewählte Modell um. Standardmäßig leer — wirkt erst mit einer Regel.`,"claude.mapFrom":`Originalmodell (z. B. claude-sonnet-4-5)`,"claude.mapTo":`Ersetzen durch (z. B. gemini/gemini-3-pro)`,"claude.addMapping":`Regel hinzufügen`,"claude.removeMapping":`Regel entfernen`,"claude.aliases":`Verfügbare Modelle`,"claude.aliasesHint":`Modelle, die im /model-Menü von Claude Code erscheinen.`,"claude.loading":`Lädt…`,"claude.loadFail":`Claude-Einstellungen konnten nicht geladen werden`,"claude.saved":`Gespeichert.`,"claude.saveFailed":`Speichern fehlgeschlagen`,"claude.networkError":`Netzwerkfehler — läuft der Proxy?`,"claude.toggleAria":`Claude-Verbindung umschalten`,"claude.none":`Keine`,"common.close":`Schließen`,"common.ok":`OK`,"app.logoAria":`opencodex-Logo`,"app.claudeOn":`Claude AN`,"app.claudeOff":`Claude AUS`,"usage.dayMon":`Mo`,"usage.dayWed":`Mi`,"usage.dayFri":`Fr`,"usage.heatmap.tooltipTokens":`{tokens} Tokens`,"usage.heatmap.tooltipRequests":`{requests} Anfragen`,"modal.back":`Zurück`,"modal.badge.oauth":`OAuth`,"modal.customProvider":`Benutzerdefinierter Anbieter`,"modal.failedStatus":`Fehlgeschlagen ({status})`,"modal.loginError":`Login-Fehler: {error}`,"modal.badge.codexLogin":`Codex-Login`,"modal.badge.local":`Lokal`,"modal.badge.apiKey":`API-Schlüssel`,"modal.badge.direct":`Direct`,"modal.badge.pool":`Pool`,"modal.badge.free":`Kostenlos`,"modal.invalidPreset":`Diese integrierte Anbietervorlage ist unvollständig. Starten Sie den Proxy neu und versuchen Sie es erneut.`,"modal.freeTierTitle":`Kostenloser Tarif`,"modal.freeTierDefault":`Kein API-Schlüssel nötig. Funktioniert sofort.`,"modal.tab.accounts":`Konten`,"modal.tab.free":`Kostenlos`,"modal.tab.paid":`Bezahlt`,"modal.accountsHint":`Codex-Konto-Provider leiten deinen ChatGPT-Login weiter. Konten verwalten unter`,"modal.accountsCodexAuthLink":`Codex Auth`,"modal.browseAll":`Alle {count} Provider durchsuchen`,"modal.browseBack":`Zurück zu den Top-Providern`,"modal.notListed":`Provider nicht dabei? Eigenen hinzufügen`,"modal.catalogLoading":`Katalog wird geladen…`,"modal.accountLogin":`Anmelden`,"modal.accountLogout":`Abmelden`,"modal.accountLoggedIn":`Angemeldet`,"modal.accountLoggedOut":`Nicht angemeldet`,"quota.fiveHourLimit":`5-Stunden-Limit`,"quota.weeklyLimit":`Wochenlimit`,"quota.monthlyLimit":`30-Tage-Limit`,"quota.cursorFirstParty":`Erstanbieter-Modelle`,"quota.cursorApiUsage":`API-Nutzung`,"quota.totalSubscriptionCredits":`Gesamtes Abo-Guthaben`,"quota.usedPercent":`{pct} % genutzt`,"quota.limitReached":`Limit erreicht`,"quota.resetsToday":`Zurücksetzung heute um {time}`,"quota.resetsTomorrow":`Zurücksetzung morgen um {time}`,"quota.resetsAt":`Zurücksetzung {when}`,"quota.resetsRelativeMinutes":`Zurücksetzung in {n} Min.`,"quota.resetsRelativeHours":`Zurücksetzung in {n} Std.`,"pws.status.ready":`Bereit`,"pws.status.needsSetup":`Einrichtung nötig`,"pws.auth.chatgptPassthrough":`ChatGPT-Passthrough`,"pws.auth.noKey":`Kein Schlüssel nötig`,"pws.freeTitle":`Kostenlos (Schlüssel ggf. erforderlich)`,"pws.localTitle":`Lokale Laufzeit`,"pws.modelCountOne":`1 Modell`,"pws.modelCount":`{count} Modelle`,"pws.rail.suffixDefault":` · Standard`,"pws.rail.suffixLocal":` · lokal`,"pws.rail.suffixFree":` · kostenlos`,"pws.rail.selectAria":`{name} auswählen — {status}{suffix}`,"pws.searchPlaceholder":`Provider durchsuchen…`,"pws.filterAria":`Provider filtern`,"pws.providerFiltersAria":`Provider-Filter`,"pws.filters":`Filter`,"pws.filterStatus":`Status`,"pws.pricing":`Preis`,"pws.paid":`Bezahlt`,"pws.filterType":`Typ`,"pws.type.cloud":`Cloud`,"pws.type.local":`Lokal`,"pws.type.selfHosted":`Selbst gehostet`,"pws.type.login":`Login`,"pws.sort":`Sortierung`,"pws.sortProvidersAria":`Provider sortieren`,"pws.sort.az":`A–Z`,"pws.sort.za":`Z–A`,"pws.sort.freePaid":`Kostenlos zuerst`,"pws.sort.paidFree":`Bezahlt zuerst`,"pws.sort.accountsFirst":`Konten zuerst`,"pws.resetAll":`Alle zurücksetzen`,"pws.providerList":`Provider-Liste`,"pws.providersAria":`Provider`,"pws.groupReady":`Bereit ({count})`,"pws.groupNeedsSetup":`Einrichtung nötig ({count})`,"pws.groupDisabled":`Deaktiviert ({count})`,"pws.noSearchResults":`Keine Provider entsprechen der Suche.`,"pws.noMatchFilters":`Keine Provider entsprechen den Filtern.`,"pws.noProvidersConfigured":`Keine Provider konfiguriert.`,"pws.workspaceMainAria":`Provider-Details`,"pws.detailComingSoon":`Detailansicht folgt — nutze die klassische Ansicht zur Verwaltung.`,"pws.selectPrompt":`Wähle einen Provider aus der Liste.`,"pws.connectFirst":`Verbinde deinen ersten Provider`,"pws.empty.browseFree":`Kostenlose Provider ansehen`,"pws.empty.browseFreeDesc":`Ohne Abo starten`,"pws.empty.connectAccount":`Konto verbinden`,"pws.empty.connectAccountDesc":`ChatGPT- oder Provider-Login nutzen`,"pws.empty.addEndpoint":`Endpunkt hinzufügen`,"pws.empty.addEndpointDesc":`Eigene Base-URL und API-Schlüssel`,"pws.workspaceToggle":`Workspace-Ansicht`,"pws.classicToggle":`Klassische Ansicht`,"pws.tab.overview":`Übersicht`,"pws.tab.models":`Modelle`,"pws.tab.usage":`Nutzung`,"pws.tab.accounts":`Konten`,"pws.tab.settings":`Einstellungen`,"pws.connection":`Verbindung`,"pws.status.connected":`Verbunden`,"pws.cell.auth":`Authentifizierung`,"pws.cell.note":`Notiz`,"pws.cell.defaultModel":`Standardmodell`,"pws.statsAria":`Provider-Statistiken`,"pws.statsTitle":`Statistiken`,"pws.stats.totalRequests":`Anfragen (30 T.)`,"pws.stats.totalTokens":`Tokens (30 T.)`,"pws.stats.quotaUpdated":`Kontingent aktualisiert`,"pws.stats.quotaTracked":`Limits siehe Nutzungs-Tab.`,"pws.stats.source":`Quelle`,"pws.usageLast30d":`Nutzung (letzte 30 Tage)`,"pws.metricRequests":`Anfragen`,"pws.metricTokens":`Tokens`,"pws.usageUnavailable":`Noch keine Nutzung erfasst.`,"pws.rateLimits":`Limits`,"pws.quotaUnavailable":`Keine Kontingentdaten für diesen Provider.`,"pws.selected":`Ausgewählt`,"pws.copyModelId":`ID kopieren`,"pws.modelCopied":`Kopiert!`,"pws.modelsAvailable":`{count} verfügbar`,"pws.modelSearchPlaceholder":`Modelle filtern…`,"pws.modelsLoading":`Modelle werden geladen…`,"pws.modelsLoadFailed":`Modelle konnten nicht geladen werden.`,"pws.retry":`Erneut versuchen`,"pws.noModels":`Keine Modelle für diesen Provider gefunden.`,"pws.noModelMatch":`Keine Modelle entsprechen dem Filter.`,"pws.adapterBaseRequired":`Adapter und Basis-URL sind erforderlich.`,"pws.addAccount":`Konto hinzufügen`,"pws.addKey":`API-Schlüssel hinzufügen`,"pws.apiKeys":`API-Schlüssel`,"pws.authMode":`Auth-Modus`,"pws.availableAccounts":`Verfügbare Konten`,"pws.accountOrdinal":`Konto {count}`,"pws.accountsLoading":`Konten werden geladen…`,"pws.accountsLoadFailed":`Konten konnten nicht geladen werden.`,"pws.retryAccounts":`Erneut versuchen`,"pws.noAccounts":`Noch keine Konten verbunden.`,"pws.accountSwitching":`Wechsel läuft…`,"pws.accountCurrent":`Aktuelles Konto`,"pws.defaultModelNone":`Keins (Standard des Anbieters verwenden)`,"pws.discardSettings":`Verwerfen`,"pws.jsonEditorDesc":`Bearbeiten Sie die JSON-Konfiguration des Anbieters. Änderungen werden sofort gespeichert.`,"pws.jsonEditorTitle":`JSON-Editor — {name}`,"pws.jsonRestore":`Wiederherstellen`,"pws.jsonSave":`Speichern`,"pws.loggedInTitle":`Angemeldet`,"pws.notLoggedInTitle":`Nicht angemeldet`,"pws.note":`Notiz`,"pws.optionalPlaceholder":`Optional`,"pws.providerId":`Anbieter-ID`,"pws.reauth":`Erneute Anmeldung erforderlich`,"pws.removeConfirm":`Entfernen`,"pws.removeConfirmBody":`Anbieter "{name}" entfernen? Dies kann nicht rückgängig gemacht werden.`,"pws.removeConfirmTitle":`Anbieter entfernen`,"pws.saveSettings":`Speichern`,"pws.saving":`Wird gespeichert…`,"pws.settingsSaved":`Einstellungen gespeichert.`,"pws.settingsUnsavedBar":`Es gibt ungespeicherte Änderungen.`,"pws.unsavedLeaveBody":`Es gibt ungespeicherte Änderungen. Vor dem Verlassen speichern?`,"pws.unsavedLeaveTitle":`Ungespeicherte Änderungen`,"pws.updatesUnavailable":`Anbieter-Updates sind nicht verfügbar.`,"pws.dashboard.title":`Anbieterübersicht`,"pws.dashboard.subtitle":`Verwalten Sie alle Ihre Modellanbieter an einem Ort.`,"pws.dashboard.rateLimits":`RATE LIMITS`,"pws.dashboard.recentlyUsed":`KÜRZLICH VERWENDET`,"pws.dashboard.requests":`{count} Anfragen`,"pws.dashboard.checkedAgo":`Geprüft {time}`,"pws.dashboard.noQuota":`Keine Kontingentdaten`,"pws.dashboard.noUsage":`Noch keine Nutzungsdaten`,"pws.allProviders":`Anbieterübersicht`,"pws.enabledLabel":`Aktiviert`,"pws.testConnection":`Verbindung testen`,"pws.testing":`Teste…`,"pws.connectionOk":`Verbindung OK`,"pws.connectionFailed":`Verbindung fehlgeschlagen`,"pws.editSettings":`Einstellungen bearbeiten`,"pws.viewUsage":`Detaillierte Nutzung anzeigen`,"pws.allSystemsOk":`Alle Systeme betriebsbereit`,"pws.apiKeyConfigured":`API-Schlüssel konfiguriert`,"pws.addApiKey":`API-Schlüssel hinzufügen`,"pws.loggedInAs":`Angemeldet als {email}`,"pws.notLoggedIn":`Nicht angemeldet`,"pws.passthrough":`Codex-Passthrough`,"pws.notes":`NOTIZEN`,"pws.notePlaceholder":`Notiz zu diesem Anbieter hinzufügen...`,"pws.noteSaved":`Notiz gespeichert`,"pws.authSummary":`AUTHENTIFIZIERUNG`,"time.justNow":`Gerade eben`,"time.notChecked":`Nicht geprüft`,"time.minutesAgo":`vor {n} Min.`,"time.hoursAgo":`vor {n} Std.`,"time.daysAgo":`vor {n} T.`,"modal.noMatch":`Kein Treffer.`,"modal.oauthDefaultNote":`Mit deinem Konto anmelden — kein API-Schlüssel nötig.`,"modal.oauthComingSoon":`OAuth-Login für {label} kommt im nächsten Update. Nutze vorerst einen API-Schlüssel.`,"modal.oauthComingSoonShort":`OAuth-Login für diesen Anbieter kommt im nächsten Update — nutze vorerst einen API-Schlüssel.`,"modal.useApiKeyInstead":`Stattdessen API-Schlüssel verwenden`,"modal.setupGuide":`Einrichtungsanleitung`,"modal.setupStep1Prefix":`Gehe zu`,"modal.setupDashboardLink":`{label}-Dashboard`,"modal.setupStep1Suffix":`und kopiere deinen API-Schlüssel`,"modal.setupStep2":`Füge ihn unten in das API-Schlüssel-Feld ein`,"modal.setupStep3":`Klicke auf Anbieter hinzufügen — Modelle werden automatisch erkannt`,"modal.namePlaceholder":`z. B. openrouter`,"modal.duplicateWarn":`Anbieter "{name}" existiert und wird überschrieben.`,"modal.forwardHintPrefix":`Kein Schlüssel nötig — der Proxy leitet deine`,"modal.forwardCredentials":`codex login`,"modal.forwardHintSuffix":`Anmeldedaten an diesen Anbieter weiter.`,"modal.localHint":`Es wird kein API-Schlüssel gespeichert. Damit wird Cursors öffentlicher Modellkatalog für Codex hinzugefügt; live Cursor-Transport und native Datei-/Shell-Ausführung bleiben deaktiviert, bis sie geprüft sind.`,"modal.getApiKey":`{label}-API-Schlüssel holen`,"modal.apiKey":`API-Schlüssel`,"modal.apiKeyPlaceholder":`sk-… (oder $ENV_VAR)`,"modal.defaultModelPlaceholder":`z. B. gpt-5.5`,"modal.baseUrlPlaceholder":`https://...`,"modal.adding":`Wird hinzugefügt…`,"modal.useOauthLogin":`← OAuth-Login verwenden`,"codexAuth.addIdPlaceholder":`codex-work, codex-alt, team…`,"codexAuth.resetCreditsAria":`{count} Reset-Guthaben`,"claude.pageTitle":`Claude Code`,"cws.loading":`Combos werden geladen…`,"cws.loadFailed":`Combos konnten nicht geladen werden.`,"cws.saveFailed":`Combo konnte nicht gespeichert werden.`,"cws.removeFailed":`Combo konnte nicht entfernt werden.`,"cws.saved":`Combo gespeichert.`,"cws.created":`{model} erstellt.`,"cws.removed":`combo/{id} entfernt.`,"cws.add":`Combo hinzufügen`,"cws.addTitle":`Combo hinzufügen`,"cws.addSubtitle":`Virtuelles Modell über mehrere Anbieter. Clients fordern combo/<id> an.`,"cws.create":`Combo erstellen`,"cws.railAria":`Combo-Liste`,"cws.searchPlaceholder":`Combos oder Ziele suchen…`,"cws.noSearchResults":`Keine Combos passen zur Suche.`,"cws.group.failover":`Failover`,"cws.group.roundRobin":`Round-Robin`,"cws.targetCount":`{count} Ziele`,"cws.targetCountOne":`1 Ziel`,"cws.overviewTitle":`Combos`,"cws.overviewBlurb":`Virtuelle Modelle mit Failover über Anbieter/Modell-Ziele oder deterministischem Smooth Weighted Round-Robin.`,"cws.count.total":`Gesamt`,"cws.count.failover":`Failover`,"cws.count.roundRobin":`Round-Robin`,"cws.howTitle":`So funktioniert es`,"cws.howBody":`In Codex combo/<id> anfragen. OpenCodex wählt ein Ziel und springt nur bei wiederholbaren Upstream-Fehlern. Ist kein Ziel verfügbar, schlägt die Anfrage geschlossen fehl, statt den globalen Standardanbieter zu verwenden.`,"cws.attentionTitle":`Aufmerksamkeit nötig`,"cws.attention.empty":`Keine Ziele konfiguriert`,"cws.attention.few":`Nur ein Ziel — Failover hat kein Ersatzziel`,"cws.emptyTitle":`Erste Combo erstellen`,"cws.empty.createDesc":`Virtuelles Modell benennen und zwei oder mehr Backends verketten.`,"cws.backToAll":`Zurück zu allen Combos`,"cws.allCombos":`Alle Combos`,"cws.copyModel":`ID kopieren`,"cws.copied":`Kopiert`,"cws.tab.config":`Konfiguration`,"cws.tab.about":`Info`,"cws.strategy":`Strategie`,"cws.strategy.failover":`Failover`,"cws.strategy.roundRobin":`Round-Robin`,"cws.strategy.failoverHint":`Ziele der Reihe nach versuchen. Bei einem wiederholbaren Fehler (Limit, Ausfall, Abo-Sperre) zum nächsten springen.`,"cws.strategy.roundRobinHint":`Datenverkehr deterministisch nach Gewicht verteilen. Das gewählte Ziel für einen Block erfolgreicher Anfragen behalten und dann weiterschalten.`,"cws.field.id":`Combo-ID`,"cws.field.idPlaceholder":`free`,"cws.field.idHint":`Clients fordern {model} an`,"cws.field.stickyLimit":`Sticky-Erfolge vor Rotation`,"cws.field.stickyLimitHint":`Das gewählte Ziel für so viele erfolgreiche Anfragen behalten, bevor die gewichtete Auswahl weiterschaltet.`,"cws.field.defaultEffort":`Standard-Reasoning`,"cws.field.defaultEffortHint":`Nur verwendet, wenn der Client keinen Reasoning-Aufwand sendet. Der Client-Wert hat Vorrang; jedes Ziel wendet seine eigene Fähigkeitsbehandlung an.`,"cws.targets":`Ziele`,"cws.targets.failoverHint":`Reihenfolge zählt — das erste ist primär.`,"cws.targets.roundRobinHint":`Gewichte steuern die deterministische relative Auswahl; die Reihenfolge löst Gleichstände im Rotationsring.`,"cws.target.provider":`Anbieter`,"cws.target.model":`Modell`,"cws.target.weight":`Gewicht`,"cws.target.pickProvider":`Anbieter wählen…`,"cws.target.pickProviderFirst":`Zuerst Anbieter wählen…`,"cws.target.pickModel":`Modell wählen…`,"cws.target.noModels":`Keine Modelle für diesen Anbieter`,"cws.target.modelPlaceholder":`Modell-ID`,"cws.target.add":`Ziel hinzufügen`,"cws.target.drag":`Ziehen zum Umsortieren`,"cws.target.moveUp":`Nach oben`,"cws.target.moveDown":`Nach unten`,"cws.aboutTitle":`Laufzeit`,"cws.aboutBody":`Fehlgeschlagene Ziele kühlen kurz ab; Retry-After wird beachtet. Ungültige oder Kontextfehler springen nicht. Jedes Ziel passt den Aufwand an seine Fähigkeiten an; erschöpfte Combos schlagen geschlossen fehl. Protokolle und Nutzung behalten geordnete physische Versuche samt Nutzung je Versuch.`,"cws.removeConfirmTitle":`{model} entfernen?`,"cws.removeConfirmDesc":`Entfernt das virtuelle Modell aus Config und Codex-Katalog. Anbieter bleiben erhalten.`,"cws.unsavedTitle":`Ungespeicherte Änderungen`,"cws.unsavedDesc":`Änderungen an dieser Combo verwerfen und fortfahren?`,"cws.keepEditing":`Weiter bearbeiten`,"cws.err.missingId":`Combo-ID ist erforderlich.`,"cws.err.invalidId":`ID muss mit Buchstabe/Zahl beginnen und darf nur Buchstaben, Zahlen, Punkte, Unterstriche oder Bindestriche enthalten (max. 64).`,"cws.err.duplicateId":`Eine Combo mit dieser ID existiert bereits.`,"cws.err.noTargets":`Mindestens ein Ziel hinzufügen.`,"cws.err.incompleteTarget":`Jedes Ziel braucht Anbieter und Modell.`,"cws.target.disabled":`{name} (deaktiviert)`,"cws.err.reservedNamespace":`Ein physischer Anbieter namens combo muss vor dem Erstellen von Combos umbenannt werden.`,"cws.err.providerCollision":`Die Combo-ID kollidiert mit einem konfigurierten Anbieternamen.`,"cws.err.unknownProvider":`Jedes Ziel muss einen konfigurierten Anbieter verwenden.`,"cws.err.duplicateTarget":`Dasselbe Anbieter/Modell-Ziel darf nur einmal vorkommen.`,"cws.err.invalidStickyLimit":`Sticky-Erfolge müssen eine Ganzzahl von 1 bis 100 sein.`,"cws.err.invalidWeight":`Jedes Round-Robin-Gewicht muss eine Ganzzahl von 1 bis 10000 sein.`,"cws.err.noEnabledTarget":`Mindestens ein Ziel muss einen aktivierten Anbieter verwenden.`},ko:{"nav.dashboard":`대시보드`,"nav.providers":`프로바이더`,"nav.models":`모델`,"nav.combos":`콤보`,"nav.subagents":`서브에이전트`,"nav.logs":`로그`,"nav.debug":`디버그`,"nav.usage":`사용량`,"common.github":`GitHub`,"common.save":`저장`,"common.saving":`저장 중…`,"common.cancel":`취소`,"common.discard":`버리기`,"common.remove":`삭제`,"common.loading":`불러오는 중…`,"theme.label":`테마`,"theme.light":`라이트`,"theme.dark":`다크`,"theme.system":`시스템`,"lang.label":`언어`,"dash.subtitle":`로컬 opencodex 프록시와 프로바이더, 그리고 Codex로 라우팅되는 모델의 실시간 상태입니다.`,"dash.status":`상태`,"dash.online":`온라인`,"dash.offline":`오프라인`,"dash.version":`버전`,"dash.uptime":`가동 시간`,"dash.providers":`프로바이더`,"dash.tokens30d":`토큰 (30일)`,"dash.coverage":`커버리지 {pct}`,"dash.activeProviders":`활성 프로바이더`,"dash.noProviders":`설정된 프로바이더가 없습니다. {cmd} 를 실행하세요.`,"dash.col.name":`이름`,"dash.col.adapter":`어댑터`,"dash.col.baseUrl":`Base URL`,"dash.col.model":`모델`,"dash.availableModels":`사용 가능한 모델`,"dash.noModels":`모델을 찾을 수 없습니다. 프로바이더 API 키를 확인하세요.`,"dash.cannotConnect":`프록시에 연결할 수 없습니다. 실행 중인가요?`,"dash.runStart":`{cmd} 를 실행해 프록시를 시작하세요.`,"dash.stop":`프록시 중지`,"dash.stopConfirm":`프록시를 중지하고 Codex 원본 설정을 복원할까요?`,"dash.stopping":`중지 중…`,"dash.codexAutoStart":`Codex 실행 시 opencodex 시작`,"dash.codexAutoStartHint":`켜져 있으면 Codex CLI/App 실행 전 shim이 ocx ensure를 실행합니다. 끄면 Codex를 건드리지 않습니다.`,"dash.searchModel":`서치 사이드카 모델`,"dash.searchModelHint":`비-OpenAI 라우팅 모델의 web_search에 사용되는 모델입니다. ChatGPT 로그인 필요.`,"dash.searchReasoning":`서치 추론 강도`,"dash.visionModel":`비전 사이드카 모델`,"dash.visionModelHint":`텍스트 전용 라우팅 모델에 이미지를 설명하는 데 사용되는 모델입니다. ChatGPT 로그인 필요.`,"dash.webSearchSidecar":`웹 검색 사이드카`,"dash.webSearchSidecarHint":`라우팅 모델의 웹 검색에 쓸 백엔드와 모델을 고릅니다.`,"dash.visionSidecar":`비전 사이드카`,"dash.visionSidecarHint":`텍스트 전용 라우팅 모델이 이미지를 읽을 때 쓸 백엔드와 모델을 고릅니다.`,"dash.shadowCallIntercept":`쉐도우 호출 가로채기`,"dash.shadowCallInterceptHint":`Codex 앱이 제목·커밋 메시지 생성에 쓰는 gpt-5.4-mini 백그라운드 호출을 가로채 선택한 모델로 바꿉니다. effort는 low로 고정됩니다.`,"dash.shadowCallWarning":`⚠ 활성화하면 모든 gpt-5.4-mini 요청이 선택한 모델로 대체됩니다.`,"dash.shadowCallOriginal":`원본`,"dash.shadowCallModel":`대체 모델`,"dash.shadowCallTooltip":`Codex 앱은 스레드 제목 자동 생성, 커밋 메시지 생성, 스킬 오케스트레이션 등 내부 작업에 gpt-5.4-mini를 백그라운드로 호출합니다. 이 설정을 켜면 해당 호출을 선택한 모델로 리다이렉트합니다.`,"models.shadowCallIntercept":`쉐도우 호출 가로채기`,"models.shadowCallInterceptHint":`Codex 앱의 백그라운드 gpt-5.4-mini 호출(제목·커밋 메시지)을 가로채 선택한 모델로 바꿉니다.`,"dash.sidecarBackend":`백엔드`,"dash.sidecarModel":`모델`,"dash.backendAuto":`자동`,"dash.backendOpenAI":`OpenAI`,"dash.backendAnthropic":`Anthropic`,"dash.sidecarSaved":`사이드카 설정이 저장됐습니다. 다음 요청부터 적용됩니다.`,"dash.sidecarSaveFailed":`사이드카 설정 저장에 실패했습니다.`,"dash.injectionLabel":`서브에이전트 위임`,"dash.injectionHint":`위임 프롬프트에 주입할 라우팅 모델을 선택합니다. 에이전트가 서브태스크에 이 모델을 사용하도록 안내됩니다.`,"dash.injectionActive":`활성`,"dash.injectionNone":`없음`,"dash.injectionEffortLabel":`추론 강도`,"dash.injectionEffortNone":`모델 기본값`,"dash.effortCapLabel":`V2 ultra 추론 강도 제한`,"dash.subagentEffortCapLabel":`V2 서브에이전트 추론 강도 제한`,"dash.effortCapHelp":`V2 ultra 모드 턴의 추론 강도를 제한합니다. 설정하면 ultra 모드에서 들어오는 max 요청이 선택한 수준으로 내려갑니다. 서브에이전트 제한은 스폰된 자식 에이전트에만 적용됩니다. 강도를 낮추기만 하고 올리지는 않습니다. 모델이 해당 수준을 지원하지 않으면 가장 가까운 지원 수준으로 내려갑니다.`,"dash.effortCapNone":`상한 없음`,"dash.maintenance":`유지보수`,"dash.maintenanceHint":`Codex 모델 카탈로그를 새로고침하거나 최신 opencodex 릴리스를 설치합니다.`,"dash.syncModels":`모델 동기화`,"dash.syncing":`동기화 중…`,"dash.syncOk":`동기화 완료. {count}개 모델이 추가됐습니다.`,"dash.syncStaleHint":`Codex App에 여전히 예전 목록이 보이면 오래 실행 중인 app-server 프로세스를 재시작하세요.`,"dash.syncFailed":`동기화 실패: {error}`,"dash.projectConfigTitle":`프로젝트 Codex 설정이 OpenCodex를 우회합니다`,"dash.projectConfigHint":`저장소 로컬 설정이 OpenCodex 프록시를 덮어씁니다(예: OpenCode Go로 직접 라우팅). 해당 프로젝트에서 ~/.codex/config.toml 프록시를 쓰려면 제거하세요.`,"dash.checkUpdate":`업데이트 확인`,"dash.updateTitle":`opencodex 업데이트`,"dash.updateDesc":`선택한 채널의 npm 최신 버전을 확인한 뒤, 설치 후 프록시를 재시작할지 선택합니다.`,"dash.updateChannel":`채널`,"dash.updateChecking":`업데이트 확인 중…`,"dash.updateInstalled":`설치됨`,"dash.updateLatest":`최신`,"dash.updateAvailable":`업데이트 가능`,"dash.updateCurrent":`최신 상태`,"dash.updateCommand":`명령`,"dash.updateSource":`현재는 소스 체크아웃입니다. 표시된 명령을 터미널에서 실행해 업데이트하세요.`,"dash.updateUnavailable":`npm에서 최신 버전을 읽지 못했습니다. 잠시 후 다시 시도하세요.`,"dash.updateRetry":`재시도`,"dash.updateRecheck":`다시 확인`,"dash.updateCannotAuto":`원클릭 업데이트를 사용할 수 없습니다 ({reason}).`,"dash.updateReason.source_checkout":`소스 체크아웃`,"dash.updateReason.latest_unavailable":`npm 레지스트리에 연결할 수 없음`,"dash.updateReason.already_latest":`이미 최신 버전`,"dash.updateReason.unknown":`업데이트 불가`,"dash.updateRestart":`업데이트 후 재시작`,"dash.updateRestartHint":`권장. 프록시를 재시작하기 전까지 현재 GUI는 이전 코드로 계속 실행됩니다.`,"dash.runUpdate":`업데이트`,"dash.updateReconnecting":`재시작된 프록시를 기다리는 중…`,"dash.updateStatus.running":`opencodex 업데이트 중입니다.`,"dash.updateStatus.restarting":`업데이트 설치 완료. 프록시를 재시작하는 중입니다.`,"dash.updateStatus.succeeded":`업데이트가 완료됐습니다.`,"dash.updateStatus.failed":`업데이트에 실패했습니다.`,"prov.subtitle":`opencodex가 Codex로 라우팅하는 업스트림 프로바이더를 설정합니다. 계정으로 로그인하거나, 프로바이더를 추가하거나, 원본 설정을 편집하세요.`,"prov.add":`프로바이더 추가`,"prov.editJson":`JSON 편집`,"prov.accountLogin":`계정 로그인`,"prov.noOauth":`사용 가능한 OAuth 프로바이더가 없습니다.`,"prov.loggedIn":`로그인됨`,"prov.notLoggedIn":`로그인 안 됨`,"prov.logout":`로그아웃`,"prov.login":`로그인`,"prov.loginWith":`{provider} 로 로그인`,"prov.waitingBrowser":`브라우저 대기 중…`,"prov.didntOpen":`안 열렸나요? 여기를 클릭하세요`,"prov.copyLink":`링크 복사`,"prov.linkCopied":`복사됨`,"prov.pasteRedirect":`리다이렉트 URL 또는 코드 붙여넣기`,"prov.pasteRedirectHint":`브라우저에 localhost 오류가 표시되면, 주소창의 전체 URL을 복사해 여기에 붙여넣으세요(또는 인증 코드 붙여넣기).`,"prov.pasteSubmit":`제출`,"prov.pasteSubmitting":`제출 중…`,"prov.pasteOk":`코드를 제출했습니다 — 로그인 완료 중…`,"prov.pasteFail":`코드 제출 실패: {error}`,"prov.port":`포트`,"prov.default":`기본값`,"prov.loadingConfig":`불러오는 중…`,"prov.saved":`저장됨! 적용하려면 프록시를 재시작하세요.`,"prov.loadConfigFail":`설정을 불러오지 못했습니다`,"prov.invalidJson":`잘못된 JSON`,"prov.saveFailed":`저장 실패`,"prov.loginFailStart":`{provider} 로그인을 시작하지 못했습니다`,"prov.loginError":`{provider} 로그인 오류: {error}`,"prov.loginRequestFail":`{provider} 로그인 요청 실패`,"prov.loginOk":`{provider} 에 로그인했습니다. 모델을 표시하려면 {cmd} 를 실행하세요(또는 실시간 적용됩니다).`,"prov.logoutOk":`{provider} 에서 로그아웃했습니다.`,"prov.logoutFail":`{provider}에서 로그아웃하지 못했습니다. 계정 상태는 그대로입니다.`,"prov.removed":`"{name}" 을(를) 삭제했습니다.`,"prov.removeFail":`"{name}" 삭제에 실패했습니다.`,"prov.added":`"{name}" 을(를) 추가했습니다. 지금 활성화됨 — Codex 모델 선택기에 표시하려면 {cmd} 를 실행하세요(또는 재시작).`,"prov.removeConfirm":`프로바이더 "{name}" 을(를) 삭제할까요? 해당 모델이 Codex 선택기에서 사라집니다.`,"prov.hasApiKey":`API 키 설정됨`,"prov.hasHeaders":`커스텀 헤더 설정됨`,"prov.accounts":`계정 ({n})`,"prov.accountsAria":`{name} 계정 목록 열기/닫기`,"prov.accountActive":`활성`,"prov.accountReauth":`재로그인`,"prov.accountAdd":`계정 추가`,"prov.accountNoLabel":`계정 {id}`,"prov.accountSwitchTitle":`이 계정 사용`,"prov.accountSwitched":`{email} 계정으로 전환했습니다.`,"prov.accountSwitchFail":`계정 전환에 실패했습니다`,"prov.accountRemoved":`{email} 계정을 제거했습니다.`,"prov.accountRemoveFail":`{email} 계정을 제거하지 못했습니다. 계정은 그대로입니다.`,"prov.accountRemoveAria":`{email} 제거`,"prov.accountRemoveConfirm":`{email} 계정을 제거할까요? 이 프록시에서 로그인이 삭제됩니다.`,"prov.keyAdd":`API 키 추가`,"prov.keyAdded":`{name}에 API 키를 추가했습니다.`,"prov.keyAddFail":`API 키 추가에 실패했습니다`,"prov.keyPlaceholder":`API 키 붙여넣기`,"prov.keySwitchTitle":`이 키 사용`,"prov.keySwitched":`{key} 키로 전환했습니다.`,"prov.keySwitchFail":`키 전환에 실패했습니다`,"prov.keyRemoved":`{key} 키를 제거했습니다.`,"prov.keyRemoveAria":`{key} 키 제거`,"prov.keyRemoveConfirm":`API 키 {key}를 제거할까요? 이 프록시 설정에서 삭제됩니다.`,"prov.activeBadge":`활성`,"prov.disabledBadge":`비활성`,"prov.defaultBadge":`기본`,"prov.enable":`활성화`,"prov.disable":`비활성화`,"prov.enabled":`"{name}" 을(를) 활성화했습니다. 해당 모델을 다시 Codex에서 사용할 수 있습니다.`,"prov.disabled":`"{name}" 을(를) 비활성화했습니다. 설정은 유지되고 모델은 숨겨집니다.`,"prov.enableFail":`"{name}" 활성화에 실패했습니다.`,"prov.disableFail":`"{name}" 비활성화에 실패했습니다.`,"prov.enableAria":`{name} 프로바이더 활성화`,"prov.disableAria":`{name} 프로바이더 비활성화`,"prov.defaultCannotDisable":`기본 프로바이더는 비활성화할 수 없습니다`,"prov.openaiAccountMode":`Codex 계정 모드`,"prov.openaiModePool":`풀`,"prov.openaiModeDirect":`직접`,"prov.openaiPoolDesc":`기본값입니다. 메인 로그인과 추가 계정을 친화도, 할당량, 대기 시간, 장애 조치에 따라 순환합니다.`,"prov.openaiDirectDesc":`현재 메인 Codex 로그인만 사용합니다. 저장된 풀 계정은 읽거나 순환하지 않습니다.`,"prov.openaiModeSaved":`OpenAI 계정 모드를 {mode} 모드로 변경했습니다.`,"prov.openaiModeSaveFailed":`OpenAI 계정 모드를 변경하지 못했습니다.`,"prov.openaiApiDesc":`OpenAI API 키만 사용하며 Codex 계정 인증과 섞이지 않습니다.`,"prov.manageCodexAccounts":`Codex 계정 관리`,"prov.openaiApiMissing":`API 키 필요`,"prov.openaiApiSetup":`API 키 설정`,"models.subtitle":`Codex가 보는 모델을 켜고 끕니다 — 네이티브 GPT passthrough와 라우팅된 모델을 프로바이더별로 묶어 보여줍니다(헤더를 클릭하면 접힘). 비활성화된 모델은 카탈로그와 모델 선택기에서 숨겨집니다. 변경 사항은 다음 Codex 턴에 적용됩니다 — opencodex가 Codex의 5분 모델 캐시를 무효화하므로 재시작이 필요 없습니다.`,"models.nativeGroupLabel":`OpenAI 네이티브`,"models.nativeHint":`프로바이더에서 선택한 풀 또는 직접 계정 옵션으로 서빙되는 passthrough 모델입니다. 끄면 Codex 선택기에서 숨겨지고, 카탈로그 항목은 유지되므로 다시 켜면 그대로 복원됩니다.`,"models.active":`{active}/{total} 활성`,"models.allOn":`모두 켜기`,"models.allOff":`모두 끄기`,"models.cap350k":`350k 제한`,"models.capApplied":`컨텍스트 제한 적용됨 — 다음 Codex 턴부터 반영됩니다.`,"models.capSaveFailed":`컨텍스트 제한 저장 실패`,"models.contextCapped":`350k 제한`,"models.contextCapLabel":`컨텍스트 제한`,"models.v2Label":`서브에이전트`,"models.v2Mode_v1":`v1`,"models.v2Mode_default":`base`,"models.v2Mode_v2":`v2`,"models.v2ModeDesc_v1":`전 모델 → v1 서피스`,"models.v2ModeDesc_default":`업스트림 기본값 (sol/terra=v2, luna=v1)`,"models.v2ModeDesc_v2":`전 모델 → v2 서피스`,"models.v2Help":`모든 모델의 멀티에이전트 서피스를 제어합니다.
22
-
23
- v1: 단일 스레드 에이전트. 모든 모델이 v1 서피스를 사용합니다.
24
- base: 업스트림 기본값 — sol/terra는 v2, luna는 v1, 나머지는 codex 플래그를 따릅니다.
25
- v2: 멀티 스레드 에이전트(spawn_agent). 모든 모델이 v2 서피스를 사용합니다.
26
-
27
- 새 세션부터 적용됩니다.`,"models.v2DocsLink":`v1 / v2가 뭔가요?`,"dash.multiAgent":`서브에이전트`,"models.v2Conflict":`[agents] max_threads가 남아 있어 codex가 부팅을 거부합니다 — config.toml에서 제거하세요`,"models.v2Applied":`multi_agent_v2 변경됨 — 새 세션부터 적용 (피커 갱신은 Codex 앱 재시작)`,"models.v2ThreadsLabel":`최대 스레드`,"models.v2ThreadsDefault":`기본값 (4)`,"models.v2ThreadsApplied":`스레드 한도 변경됨 — 새 세션부터 적용`,"models.v2ThreadsInvalid":`스레드 한도는 1 이상 정수여야 합니다`,"models.v2ThreadsApply":`적용`,"models.capValue":`{value} 제한`,"models.contextCappedValue":`{value} 제한`,"models.setAll":`전체 적용`,"models.custom":`직접 입력…`,"models.customApply":`적용`,"models.customPlaceholder":`토큰 (예: 420000)`,"models.applied":`적용됨 — 다음 Codex 턴부터 반영됩니다.`,"models.saveFailed":`저장 실패`,"models.networkError":`네트워크 오류 — 프록시가 실행 중인가요?`,"models.loadFail":`모델을 불러오지 못했습니다 — 프록시가 실행 중인가요?`,"models.noRouted":`라우팅된 모델 없음`,"models.noRoutedHint":`먼저 프로바이더에 로그인하거나 추가하세요.`,"models.loading":`불러오는 중…`,"models.search":`모델 검색…`,"models.showMore":`{n}개 더 보기`,"models.allowlistLabel":`선택만 노출`,"models.allowlistHint":`체크한 모델만 카탈로그에 노출돼요 (비우면 전체). 수천 개 모델을 노출하는 프로바이더에 유용해요.`,"models.selectedCount":`{n}개 선택`,"models.orderHint":`피커 순서: Subagents에서 지정한 순서 → 나머지 라우팅 모델(프로바이더, 모델 ID 순 알파벳 정렬) → 네이티브 모델. 노출 토글은 모델을 필터링할 뿐 이 순서를 바꾸지 않습니다.`,"sub.subtitle":`Codex의 {cmd} 는 우선순위 상위 5개 모델만 오버라이드로 노출합니다. 여기서 최대 5개를 선택하면 — 네이티브 gpt 또는 라우팅된 모델 — opencodex가 카탈로그 우선순위를 설정해 정확히 이들이 앞에 옵니다. 다른 모델도 정확한 이름으로 호출할 수 있으며, 이 설정은 표시 항목만 제어합니다.`,"sub.featured":`추천`,"sub.orderHint":`여기서 선택해 표시된 순서가 Codex 모델 피커 최상단 1~5위와 {cmd}의 기본 모델 후보를 결정합니다.`,"sub.noneSelected":`선택된 항목 없음 — 아래 목록에서 선택하세요.`,"sub.models":`모델`,"sub.search":`모델 검색(네이티브 gpt + 라우팅)…`,"sub.noModels":`모델 없음 — 먼저 프로바이더에 로그인하거나 추가하세요.`,"sub.saved":`{n}개 모델을 저장했습니다. spawn_agent 오버라이드로 보려면 새 Codex 세션을 시작하거나 {cmd} 를 실행하세요.`,"sub.saveFailed":`저장 실패`,"sub.networkError":`네트워크 오류 — 프록시가 실행 중인가요?`,"sub.loadFail":`모델을 불러오지 못했습니다 — 프록시가 실행 중인가요?`,"sub.loading":`불러오는 중…`,"sub.moveUp":`{m} 위로 이동`,"sub.moveDown":`{m} 아래로 이동`,"sub.removeAria":`{m} 삭제`,"logs.title":`요청 로그`,"logs.subtitle":`로컬 opencodex 프록시를 거친 최근 요청입니다. 최신순.`,"logs.autoRefresh":`자동 새로고침`,"logs.noRequests":`아직 요청이 없습니다.`,"logs.filter.surface.label":`표면`,"logs.filter.surface.all":`전체`,"logs.filter.surface.claude":`Claude`,"logs.filter.surface.codex":`Codex`,"logs.badge.claude":`Claude`,"logs.col.time":`시간`,"logs.col.request":`요청`,"logs.col.model":`모델`,"logs.col.effort":`추론 강도`,"logs.col.provider":`프로바이더`,"logs.col.status":`상태`,"logs.col.tokens":`토큰`,"logs.col.error":`오류`,"logs.col.upstreamReason":`업스트림 원인`,"logs.col.duration":`소요 시간`,"logs.tokens.reported":`측정됨`,"logs.tokens.unreported":`미보고`,"logs.tokens.unsupported":`미지원`,"logs.tokens.estimated":`추정`,"logs.tokens.input":`입력`,"logs.tokens.output":`출력`,"logs.tokens.cacheRead":`캐시 히트 (c)`,"logs.tokens.cacheWrite":`캐시 생성 (w)`,"logs.tokens.reasoning":`추론`,"logs.tokens.noCache":`캐시 미보고`,"logs.tokens.noCacheNote":`이 프로바이더는 캐시 토큰 수치를 제공하지 않습니다`,"logs.tokens.estimatedNote":`추정치 (프로바이더가 정확한 사용량을 제공하지 않음)`,"logs.details":`상세보기`,"logs.detailTitle":`요청 상세`,"logs.detailRaw":`원본 로그`,"debug.title":`디버그`,"debug.subtitle":`선택적 provider transport 및 usage 추출 진단. 요청 오류와 502는 Logs에 표시됩니다.`,"debug.debug":`Provider debug`,"debug.usage":`Usage 추출`,"debug.injection":`주입 로그`,"debug.claude":`Claude 인바운드`,"debug.claudeInbound.title":`Claude 인바운드 요청`,"debug.claudeInbound.sub":`Claude Code/Desktop이 실제로 보내는 값(thinking, effort, metadata)을 보여줍니다 — 프롬프트 원문은 저장하지 않습니다.`,"debug.claudeInbound.empty":`아직 캡처된 요청이 없습니다. 켜진 상태에서 Claude로 메시지를 보내보세요.`,"debug.claudeInbound.time":`시간`,"debug.claudeInbound.endpoint":`엔드포인트`,"debug.claudeInbound.model":`모델`,"debug.claudeInbound.none":`없음`,"debug.reset":`런타임 재정의 해제`,"debug.refresh":`새로고침`,"debug.follow":`Follow`,"debug.streamProvider":`Provider`,"debug.streamUsage":`Usage`,"debug.streamInjection":`Injection`,"debug.loading":`디버그 설정 로딩 중…`,"debug.emptyTitle":`디버그 로깅 꺼짐`,"debug.empty":`위 카드에서 Provider debug 또는 Usage extraction을 켜세요. 프록시로 요청을 보낸 뒤 라인이 표시됩니다.`,"debug.noLinesTitle":`라인 대기 중`,"debug.noLines.provider":`공급자 디버그는 켜져 있지만 전송 이상(드롭되거나 잘못된 프레임, Cursor dial/retry 이벤트)만 기록합니다. Anthropic 같은 공급자로의 정상 요청은 라인을 생성하지 않을 수 있습니다.`,"debug.noLines.usage":`사용량 추출은 켜져 있지만 아직 캡처된 항목이 없습니다. Codex로 요청을 보내면 여기에 표시됩니다.`,"debug.noLines.injection":`주입 로그는 켜져 있지만 아직 캡처된 항목이 없습니다. Collab 및 서브 에이전트 턴의 멀티 에이전트 가이던스 주입과 effort-cap 결정을 기록합니다.`,"usage.title":`사용량`,"usage.subtitle":`프록시의 로컬 토큰 집계입니다. 누락된 사용량은 0으로 표시하지 않습니다.`,"usage.loading":`사용량 데이터를 불러오는 중…`,"usage.empty":`아직 기록된 사용량이 없습니다. 프록시로 요청을 보내면 여기에 표시됩니다.`,"usage.range.all":`전체`,"usage.range.30d":`30일`,"usage.range.7d":`7일`,"usage.card.requests":`요청`,"usage.card.measured":`측정됨`,"usage.card.reported":`측정됨`,"usage.card.totalTokens":`총 토큰`,"usage.card.cachedTokens":`캐시 히트 토큰`,"usage.card.cachedTokensHint":`프로바이더 캐시에서 읽어온 프롬프트 토큰(히트)입니다. 캐시 생성(쓰기)은 아래에 별도 표시됩니다.`,"usage.card.cacheWriteTokens":`캐시 생성`,"usage.card.coverage":`커버리지`,"usage.card.activeDays":`활동일`,"usage.section.heatmap":`일별 활동`,"usage.section.models":`모델`,"usage.section.providers":`프로바이더`,"usage.section.coverage":`커버리지 상세`,"usage.coverage.measured":`측정됨`,"usage.coverage.reported":`제공자 보고`,"usage.coverage.estimated":`추정`,"usage.coverage.note":`측정됨 항목은 제공자 보고와 추정 토큰 수치를 함께 포함합니다. 미보고/미지원 요청은 추적만 하고 0으로 환산하지 않습니다.`,"usage.search.models":`모델 검색…`,"usage.col.requests":`요청`,"usage.col.measured":`측정됨`,"usage.col.reported":`측정됨`,"usage.col.tokens":`토큰`,"usage.col.share":`비율`,"usage.heatmap.less":`적음`,"usage.heatmap.more":`많음`,"modal.addNamed":`추가: {label}`,"modal.add":`프로바이더 추가`,"modal.search":`프로바이더 검색…`,"modal.logInWith":`{label} 로 로그인`,"modal.waitingBrowser":`브라우저 대기 중…`,"modal.providerName":`프로바이더 이름`,"modal.adapter":`어댑터`,"modal.baseUrl":`Base URL`,"modal.defaultModel":`기본 모델(선택)`,"modal.nameRequired":`프로바이더 이름을 입력하세요`,"modal.baseUrlRequired":`Base URL을 입력하세요`,"modal.networkError":`네트워크 오류 — 프록시가 실행 중인가요?`,"modal.loginFailStart":`로그인을 시작하지 못했습니다`,"modal.waitingLogin":`브라우저 로그인 대기 중…`,"modal.loggingIn":`로그인 중…`,"modal.loginTimeout":`로그인 시간 초과 — 다시 시도하세요.`,"nav.api":`API`,"nav.codexAuth":`Codex 인증`,"nav.openMenu":`메뉴 열기`,"nav.closeMenu":`메뉴 닫기`,"codexAuth.mainAccount":`메인 계정`,"codexAuth.appLogin":`앱 로그인`,"codexAuth.accountPool":`계정 풀`,"codexAuth.accountModeTitle":`OpenAI 계정 모드`,"codexAuth.accountModePool":`풀 모드`,"codexAuth.accountModePoolDesc":`메인 로그인과 사용 가능한 추가 계정이 여기에서 순환됩니다.`,"codexAuth.accountModeDirect":`직접 모드`,"codexAuth.accountModeDirectDesc":`요청은 메인 로그인만 사용하며, 추가 계정은 풀 모드용으로 계속 저장됩니다.`,"codexAuth.openaiMissing":`내장 OpenAI 프로바이더가 설정되지 않았습니다.`,"codexAuth.openaiDisabled":`내장 OpenAI 프로바이더가 비활성화되어 있습니다.`,"codexAuth.openProviders":`프로바이더 열기`,"codexAuth.add":`추가`,"codexAuth.refreshQuota":`할당량 새로고침`,"codexAuth.refreshingQuota":`새로고침 중...`,"codexAuth.quotaRefreshed":`할당량을 다시 조회했습니다`,"codexAuth.quotaRefreshFailed":`할당량 재조회에 실패했습니다`,"codexAuth.noPool":`풀 계정이 아직 없습니다.`,"codexAuth.fiveHour":`5시간`,"codexAuth.weekly":`주간`,"codexAuth.monthly":`30일`,"codexAuth.resets":`리셋`,"codexAuth.today":`오늘`,"codexAuth.current":`현재`,"codexAuth.nextSession":`다음 세션`,"codexAuth.poolPrepared":`풀 모드 준비됨`,"codexAuth.preparePoolTitle":`이 계정을 풀 모드용으로 준비할까요?`,"codexAuth.preparePoolDesc":`직접 모드 요청은 계속 메인 로그인을 사용합니다. 풀 모드를 켜면 이 계정이 준비된 풀 선택으로 사용됩니다.`,"codexAuth.prepareForPool":`풀 모드용으로 준비`,"codexAuth.poolPreparedToast":`{email} 계정을 풀 모드용으로 준비했습니다`,"codexAuth.switchTitle":`활성 계정을 변경하시겠습니까?`,"codexAuth.switchDesc":`다음 Codex 세션부터 적용됩니다. 현재 세션은 기존 계정을 유지합니다.`,"codexAuth.cacheWarning":`계정 전환 시 프롬프트 캐시가 초기화됩니다.`,"codexAuth.setAsNext":`다음 세션으로 설정`,"codexAuth.cancel":`취소`,"codexAuth.switchBack":`메인 계정으로 돌아가시겠습니까?`,"codexAuth.switchBackDesc":`다음 Codex 세션에서 앱 로그인 계정을 사용합니다.`,"codexAuth.autoSwitch":`80% 초과 시 자동 전환`,"codexAuth.autoSwitchDesc":`새 세션은 해당 플랜의 기준 창이 임계값에 도달하면 전환합니다. Go/Free는 30일만 봅니다`,"codexAuth.switched":`다음 세션부터 {email}을(를) 사용합니다`,"codexAuth.loadFailed":`계정을 불러오지 못했습니다.`,"codexAuth.switchFailed":`계정을 전환하지 못했습니다. 이전 선택은 그대로 유지됩니다.`,"codexAuth.removeConfirm":`{id}을(를) 삭제하시겠습니까?`,"codexAuth.removeFailed":`계정을 제거하지 못했습니다. 변경된 내용은 없습니다.`,"codexAuth.addTitle":`Codex 계정 추가`,"codexAuth.addIdLabel":`계정 ID (슬러그)`,"codexAuth.addJsonLabel":`auth.json 내용`,"codexAuth.addHelp":`다른 머신의 ~/.codex/auth.json을 복사하거나, codex-auth export를 사용하세요.`,"codexAuth.importBtn":`가져오기`,"codexAuth.importInvalidJson":`유효하지 않은 JSON`,"codexAuth.importMissingTokens":`JSON에 access_token 또는 refresh_token이 없습니다`,"codexAuth.importMissingId":`계정 ID를 입력하세요`,"codexAuth.accountAdded":`풀에 계정이 추가되었습니다`,"codexAuth.addPickDesc":`다른 ChatGPT 계정으로 로그인하여 풀에 추가하세요.`,"codexAuth.oauthLogin":`OAuth 로그인`,"codexAuth.oauthDesc":`브라우저에서 ChatGPT 로그인 열기`,"codexAuth.importAuthJson":`auth.json 가져오기`,"codexAuth.importAuthJsonDesc":`다른 Codex 설치 또는 codex-auth export에서`,"codexAuth.back":`뒤로`,"codexAuth.oauthAlreadyInProgress":`로그인이 이미 진행 중입니다. 브라우저에서 완료하세요.`,"codexAuth.oauthWaiting":`브라우저에서 ChatGPT 로그인 완료를 기다리는 중...`,"codexAuth.copyLoginLink":`로그인 링크 복사`,"codexAuth.loginLinkCopied":`로그인 링크를 복사했습니다`,"codexAuth.loginLinkCopyFailed":`로그인 링크를 복사하지 못했습니다.`,"codexAuth.oauthCancelled":`로그인이 취소되었습니다.`,"codexAuth.needsReauth":`재로그인`,"codexAuth.tokenExpired":`토큰 만료 — 계정을 다시 추가하여 갱신하세요`,"codexAuth.emailCollision":`이 계정은 메인 Codex 로그인과 동일합니다. 다른 계정을 사용하세요.`,"codexAuth.resetCreditsTitle":`리셋 크레딧`,"codexAuth.resetCreditsAvailable":`사용 가능한 리셋 크레딧이 {count}개 있습니다.`,"codexAuth.resetCreditsDesc":`크레딧 1개로 현재 시간/주간 사용량 제한을 즉시 초기화합니다.`,"codexAuth.noResetCredits":`사용 가능한 리셋 크레딧이 없습니다.`,"codexAuth.earnCreditsHint":`크레딧은 매월 자동 지급되며 추천 프로그램으로도 획득할 수 있습니다.`,"codexAuth.creditsExpireNote":`크레딧은 획득 후 30일 뒤 만료됩니다.`,"codexAuth.useOneCredit":`크레딧 1개 사용`,"codexAuth.confirmResetTitle":`리셋 크레딧을 사용하시겠습니까?`,"codexAuth.confirmResetDesc":`현재 사용량 제한이 즉시 초기화됩니다. 남은 크레딧: {count}개.`,"codexAuth.irreversible":`이 작업은 되돌릴 수 없습니다.`,"codexAuth.useCredit":`크레딧 사용`,"codexAuth.redeeming":`초기화 중...`,"codexAuth.resetSuccess":`사용량 제한이 초기화되었습니다! 남은 크레딧: {remaining}개.`,"codexAuth.resetNothingToReset":`현재 초기화할 사용량 윈도우가 없습니다.`,"codexAuth.resetNoCredit":`사용 가능한 리셋 크레딧이 없습니다.`,"codexAuth.resetError":`리셋 크레딧 사용에 실패했습니다. 다시 시도해 주세요.`,"codexAuth.fifoNote":`가장 오래된 크레딧부터 사용됩니다.`,"codexAuth.confirmWhichCredit":`{date}에 획득한 크레딧이 사용됩니다.`,"codexAuth.creditNext":`다음 사용 대상`,"codexAuth.creditLabel":`크레딧 #{n}`,"codexAuth.creditNextBadge":`NEXT`,"codexAuth.creditGranted":`획득 {date}`,"codexAuth.creditExpires":`만료 {date} ({days}일 남음)`,"api.title":`API 액세스`,"api.subtitle":`생성한 API 키로 외부 앱에서 opencodex 프록시에 접근합니다. {authHeader} 또는 {altHeader} 헤더로 인증합니다.`,"api.endpoint":`엔드포인트`,"api.endpointNote":`OpenAI Responses API 형식과 호환됩니다.`,"api.newKeyTitle":`새 키 생성됨`,"api.newKeyNote":`지금 키를 복사하세요. 다시 표시되지 않습니다.`,"api.copy":`복사`,"api.copied":`복사됨`,"api.dismiss":`닫기`,"api.generateTitle":`키 생성`,"api.keyNamePlaceholder":`키 이름 (선택)`,"api.generate":`생성`,"api.generating":`생성 중…`,"api.activeKeys":`활성 키 ({count})`,"api.noKeys":`아직 API 키가 없습니다. 위에서 하나 생성하세요.`,"api.colName":`이름`,"api.colKey":`키`,"api.colCreated":`생성일`,"api.confirm":`확인`,"api.deleteAria":`API 키 삭제`,"api.usageTitle":`사용 예시`,"nav.claude":`Claude`,"claude.subtitle":`Claude Code에서 GPT, Gemini 등 다른 모델도 쓸 수 있게 해줍니다.`,"claude.enabledLabel":`Claude 연결`,"claude.enabledHint":`끄면 Claude Code가 이 프록시를 사용할 수 없습니다.`,"claude.authMode":`인증 모드`,"claude.authModeHint":`subscription은 Claude 계정 필요, proxy는 opencodex 프록시만으로 사용 가능`,"claude.authModeSubscription":`Subscription (Claude 계정)`,"claude.authModeProxy":`Proxy (계정 불필요)`,"claude.systemEnv":`자동 연결`,"claude.systemEnvDesc":`켜면 터미널에서 claude를 바로 실행해도 프록시를 거칩니다.`,"claude.systemEnvWarn":`⚠ 터미널 앱을 완전히 종료했다 다시 열어야 적용됩니다. 사용을 권장하지 않습니다.`,"claude.fastMode":`Fast Mode (OpenAI)`,"claude.fastModeDesc":`OpenAI 모델의 추론 속도를 제어합니다. ON = 빠른 추론. OFF = 기본 속도. Auto = 클라이언트 설정 그대로.`,"claude.fastAuto":`Auto`,"claude.fastOn":`ON`,"claude.fastOff":`OFF`,"claude.autoContext":`큰 컨텍스트 자동 활용`,"claude.autoContextDesc":`1M 표기를 어디까지 붙일지 정합니다. 켜면 20만 토큰을 넘는 모델 전부(GPT 계열 등)에 큰 컨텍스트 행이 생기고, 끄면 진짜 1M 모델에만 생깁니다.`,"claude.autoContextInert":`설정 파일에 이전 방식의 컨텍스트 크기 값(maxContextTokens)이 있어 이 기능이 지금은 적용되지 않아요. 설정에서 그 값을 지우면 다시 켜집니다.`,"claude.autoCompactWindow":`자동 요약 지점`,"claude.autoCompactDefault":`350k (기본값)`,"claude.autoCompactWindowDesc":`대화가 이 지점에 다다르면 오래된 내용을 자동 요약합니다. 모델마다 자기 한도를 넘지 않는 선에서만 적용되니 200k 모델은 영향받지 않아요.`,"claude.autoCompactWindowWarn":`값을 직접 바꾸면 GPT 모델들이 제대로 동작하지 않을 수 있어요 — 모델의 실제 한도보다 크게 잡으면 요약이 되기 전에 대화가 오류로 멈춥니다.`,"claude.injectAgents":`서브에이전트 자동 등록`,"claude.injectAgentsDesc":`위 '서브에이전트' 탭에서 고른 모델들(+현재 기본 모델)을 Claude Code의 파견 가능한 에이전트(ocx-*)로 자동 등록합니다. 새 세션부터 적용돼요.`,"claude.webSearchSidecar":`웹 검색 사이드카 덮어쓰기`,"claude.webSearchSidecarHint":`Claude Code 요청에만 메인 웹 검색 사이드카 대신 이 설정을 씁니다.`,"claude.visionSidecar":`비전 사이드카 덮어쓰기`,"claude.visionSidecarHint":`Claude Code 요청에만 메인 비전 사이드카 대신 이 설정을 씁니다.`,"claude.useMainSetting":`메인 설정 사용`,"claude.sidecarModelPlaceholder":`메인 설정의 모델`,"claude.quickstart":`시작하기`,"claude.quickstartHint":`{cmd} 을 실행하면 프록시를 거쳐 Claude Code가 열립니다. claude.ai 로그인은 그대로 유지됩니다.`,"claude.manualEnv":`직접 설정하기 (고급)`,"claude.smallFastModel":`백그라운드 보조 모델`,"claude.smallFastModelHint":`Claude Code가 대화 요약, 주제 감지 같은 배후 작업에 쓰는 모델입니다. 서브에이전트의 haiku 별칭도 이 모델을 씁니다. 비워두면 Claude 기본값(Haiku).`,"claude.slotUnset":`Claude 기본값 사용`,"claude.modelMap":`모델 가로채기`,"claude.modelMapHint":`Claude가 특정 모델을 요청하면 가로채서 지정한 모델로 보냅니다. 기본값은 비어 있어요 — 규칙을 추가할 때만 동작합니다.`,"claude.mapFrom":`원래 모델 (예: claude-sonnet-4-5)`,"claude.mapTo":`바꿀 모델 (예: gemini/gemini-3-pro)`,"claude.addMapping":`규칙 추가`,"claude.removeMapping":`규칙 삭제`,"claude.aliases":`사용 가능한 모델`,"claude.aliasesHint":`Claude Code의 /model 메뉴에 표시되는 모델 목록입니다.`,"claude.loading":`불러오는 중…`,"claude.loadFail":`Claude 설정을 불러오지 못했습니다`,"claude.saved":`저장되었습니다.`,"claude.saveFailed":`저장 실패`,"claude.networkError":`네트워크 오류 — 프록시가 실행 중인가요?`,"claude.toggleAria":`Claude 인바운드 켜기/끄기`,"claude.none":`없음`,"common.close":`닫기`,"common.ok":`확인`,"app.logoAria":`opencodex 로고`,"app.claudeOn":`Claude ON`,"app.claudeOff":`Claude OFF`,"usage.dayMon":`월`,"usage.dayWed":`수`,"usage.dayFri":`금`,"usage.heatmap.tooltipTokens":`{tokens} 토큰`,"usage.heatmap.tooltipRequests":`{requests} 요청`,"modal.back":`뒤로`,"modal.badge.oauth":`OAuth`,"modal.customProvider":`사용자 지정 프로바이더`,"modal.failedStatus":`실패 ({status})`,"modal.loginError":`로그인 오류: {error}`,"modal.badge.codexLogin":`Codex 로그인`,"modal.badge.local":`로컬`,"modal.badge.apiKey":`API 키`,"modal.badge.direct":`Direct`,"modal.badge.pool":`풀`,"modal.badge.free":`무료`,"modal.invalidPreset":`내장 프로바이더 설정이 완전하지 않습니다. 프록시를 다시 시작한 뒤 재시도하세요.`,"modal.freeTierTitle":`무료 티어`,"modal.freeTierDefault":`API 키가 필요 없습니다. 바로 사용할 수 있습니다.`,"modal.tab.accounts":`계정`,"modal.tab.free":`무료`,"modal.tab.paid":`유료`,"modal.accountsHint":`Codex 계정 프로바이더는 ChatGPT 로그인을 전달합니다. 계정 관리는`,"modal.accountsCodexAuthLink":`Codex 인증`,"modal.browseAll":`프로바이더 {count}개 모두 보기`,"modal.browseBack":`상위 프로바이더로 돌아가기`,"modal.notListed":`찾는 프로바이더가 없나요? 직접 추가`,"modal.catalogLoading":`카탈로그 불러오는 중…`,"modal.accountLogin":`로그인`,"modal.accountLogout":`로그아웃`,"modal.accountLoggedIn":`로그인됨`,"modal.accountLoggedOut":`로그인 안 됨`,"quota.fiveHourLimit":`5시간 한도`,"quota.weeklyLimit":`주간 한도`,"quota.monthlyLimit":`30일 한도`,"quota.cursorFirstParty":`자사 모델`,"quota.cursorApiUsage":`API 사용량`,"quota.totalSubscriptionCredits":`전체 구독 크레딧`,"quota.usedPercent":`{pct}% 사용`,"quota.limitReached":`한도 도달`,"quota.resetsToday":`오늘 {time} 초기화`,"quota.resetsTomorrow":`내일 {time} 초기화`,"quota.resetsAt":`{when} 초기화`,"quota.resetsRelativeMinutes":`{n}분 후 초기화`,"quota.resetsRelativeHours":`{n}시간 후 초기화`,"pws.status.ready":`준비됨`,"pws.status.needsSetup":`설정 필요`,"pws.auth.chatgptPassthrough":`ChatGPT 패스스루`,"pws.auth.noKey":`키 불필요`,"pws.freeTitle":`무료 요금제 (키는 필요할 수 있음)`,"pws.localTitle":`로컬 런타임`,"pws.modelCountOne":`모델 1개`,"pws.modelCount":`모델 {count}개`,"pws.rail.suffixDefault":` · 기본`,"pws.rail.suffixLocal":` · 로컬`,"pws.rail.suffixFree":` · 무료`,"pws.rail.selectAria":`{name} 선택 — {status}{suffix}`,"pws.searchPlaceholder":`프로바이더 검색…`,"pws.filterAria":`프로바이더 필터`,"pws.providerFiltersAria":`프로바이더 필터`,"pws.filters":`필터`,"pws.filterStatus":`상태`,"pws.pricing":`요금`,"pws.paid":`유료`,"pws.filterType":`유형`,"pws.type.cloud":`클라우드`,"pws.type.local":`로컬`,"pws.type.selfHosted":`셀프 호스팅`,"pws.type.login":`로그인`,"pws.sort":`정렬`,"pws.sortProvidersAria":`프로바이더 정렬`,"pws.sort.az":`A–Z`,"pws.sort.za":`Z–A`,"pws.sort.freePaid":`무료 우선`,"pws.sort.paidFree":`유료 우선`,"pws.sort.accountsFirst":`계정 우선`,"pws.resetAll":`모두 초기화`,"pws.providerList":`프로바이더 목록`,"pws.providersAria":`프로바이더`,"pws.groupReady":`준비됨 ({count})`,"pws.groupNeedsSetup":`설정 필요 ({count})`,"pws.groupDisabled":`비활성화 ({count})`,"pws.noSearchResults":`검색과 일치하는 프로바이더가 없습니다.`,"pws.noMatchFilters":`필터와 일치하는 프로바이더가 없습니다.`,"pws.noProvidersConfigured":`설정된 프로바이더가 없습니다.`,"pws.workspaceMainAria":`프로바이더 상세`,"pws.detailComingSoon":`상세 보기는 준비 중입니다 — 클래식 보기에서 관리하세요.`,"pws.selectPrompt":`목록에서 프로바이더를 선택하세요.`,"pws.connectFirst":`첫 프로바이더를 연결하세요`,"pws.empty.browseFree":`무료 프로바이더 보기`,"pws.empty.browseFreeDesc":`구독 없이 시작`,"pws.empty.connectAccount":`계정 연결`,"pws.empty.connectAccountDesc":`ChatGPT 또는 프로바이더 로그인 사용`,"pws.empty.addEndpoint":`엔드포인트 추가`,"pws.empty.addEndpointDesc":`커스텀 base URL과 API 키`,"pws.workspaceToggle":`워크스페이스 보기`,"pws.classicToggle":`클래식 보기`,"pws.tab.overview":`개요`,"pws.tab.models":`모델`,"pws.tab.usage":`사용량`,"pws.tab.accounts":`계정`,"pws.tab.settings":`설정`,"pws.connection":`연결`,"pws.status.connected":`연결됨`,"pws.cell.auth":`인증`,"pws.cell.note":`메모`,"pws.cell.defaultModel":`기본 모델`,"pws.statsAria":`프로바이더 통계`,"pws.statsTitle":`통계`,"pws.stats.totalRequests":`요청 수 (30일)`,"pws.stats.totalTokens":`토큰 (30일)`,"pws.stats.quotaUpdated":`쿼터 갱신`,"pws.stats.quotaTracked":`사용량 탭에서 한도를 확인할 수 있습니다.`,"pws.stats.source":`출처`,"pws.usageLast30d":`사용량 (최근 30일)`,"pws.metricRequests":`요청`,"pws.metricTokens":`토큰`,"pws.usageUnavailable":`아직 기록된 사용량이 없습니다.`,"pws.rateLimits":`요청 한도`,"pws.quotaUnavailable":`이 프로바이더의 쿼터 데이터가 없습니다.`,"pws.selected":`선택됨`,"pws.copyModelId":`ID 복사`,"pws.modelCopied":`복사됨!`,"pws.modelsAvailable":`{count}개 사용 가능`,"pws.modelSearchPlaceholder":`모델 필터…`,"pws.modelsLoading":`모델 불러오는 중…`,"pws.modelsLoadFailed":`모델을 불러오지 못했습니다.`,"pws.retry":`다시 시도`,"pws.noModels":`이 프로바이더에서 발견된 모델이 없습니다.`,"pws.noModelMatch":`필터와 일치하는 모델이 없습니다.`,"pws.adapterBaseRequired":`어댑터와 기본 URL은 필수입니다.`,"pws.addAccount":`계정 추가`,"pws.addKey":`API 키 추가`,"pws.apiKeys":`API 키`,"pws.authMode":`인증 방식`,"pws.availableAccounts":`사용 가능한 계정`,"pws.accountOrdinal":`계정 {count}`,"pws.accountsLoading":`계정 불러오는 중…`,"pws.accountsLoadFailed":`계정을 불러오지 못했습니다.`,"pws.retryAccounts":`다시 시도`,"pws.noAccounts":`연결된 계정이 아직 없습니다.`,"pws.accountSwitching":`전환 중…`,"pws.accountCurrent":`현재 계정`,"pws.defaultModelNone":`없음 (프로바이더 기본값 사용)`,"pws.discardSettings":`되돌리기`,"pws.jsonEditorDesc":`프로바이더 JSON 설정을 직접 편집합니다. 저장 즉시 반영됩니다.`,"pws.jsonEditorTitle":`JSON 편집기 — {name}`,"pws.jsonRestore":`복원`,"pws.jsonSave":`저장`,"pws.loggedInTitle":`로그인됨`,"pws.notLoggedInTitle":`로그인 필요`,"pws.note":`메모`,"pws.optionalPlaceholder":`선택사항`,"pws.providerId":`프로바이더 ID`,"pws.reauth":`재인증 필요`,"pws.removeConfirm":`제거`,"pws.removeConfirmBody":`프로바이더 "{name}"을(를) 제거하시겠습니까? 되돌릴 수 없습니다.`,"pws.removeConfirmTitle":`프로바이더 제거`,"pws.saveSettings":`저장`,"pws.saving":`저장 중…`,"pws.settingsSaved":`설정이 저장되었습니다.`,"pws.settingsUnsavedBar":`저장하지 않은 변경사항이 있습니다.`,"pws.unsavedLeaveBody":`저장하지 않은 변경사항이 있습니다. 나가기 전에 저장하시겠습니까?`,"pws.unsavedLeaveTitle":`미저장 변경사항`,"pws.updatesUnavailable":`프로바이더 업데이트를 사용할 수 없습니다.`,"pws.dashboard.title":`프로바이더 개요`,"pws.dashboard.subtitle":`모든 모델 프로바이더를 한곳에서 관리합니다.`,"pws.dashboard.rateLimits":`사용량 제한`,"pws.dashboard.recentlyUsed":`최근 사용`,"pws.dashboard.requests":`{count}건 요청`,"pws.dashboard.checkedAgo":`{time} 전 확인`,"pws.dashboard.noQuota":`할당량 데이터 없음`,"pws.dashboard.noUsage":`아직 사용 데이터 없음`,"pws.allProviders":`프로바이더 개요`,"pws.enabledLabel":`활성화`,"pws.testConnection":`연결 테스트`,"pws.testing":`테스트 중…`,"pws.connectionOk":`연결 성공`,"pws.connectionFailed":`연결 실패`,"pws.editSettings":`설정 편집`,"pws.viewUsage":`사용량 상세 보기`,"pws.allSystemsOk":`모든 시스템 정상`,"pws.apiKeyConfigured":`API 키 설정됨`,"pws.addApiKey":`API 키 추가`,"pws.loggedInAs":`{email}으로 로그인됨`,"pws.notLoggedIn":`로그인되지 않음`,"pws.passthrough":`Codex 패스스루`,"pws.notes":`메모`,"pws.notePlaceholder":`이 프로바이더에 대한 메모를 추가하세요...`,"pws.noteSaved":`메모 저장됨`,"pws.authSummary":`인증`,"time.justNow":`방금 전`,"time.notChecked":`확인 안 됨`,"time.minutesAgo":`{n}분 전`,"time.hoursAgo":`{n}시간 전`,"time.daysAgo":`{n}일 전`,"modal.noMatch":`일치 항목 없음.`,"modal.oauthDefaultNote":`계정으로 로그인 — API 키 불필요.`,"modal.oauthComingSoon":`{label} OAuth 로그인은 다음 업데이트에 제공됩니다. 지금은 API 키를 사용하세요.`,"modal.oauthComingSoonShort":`이 프로바이더의 OAuth 로그인은 다음 업데이트에 제공됩니다 — 지금은 API 키를 사용하세요.`,"modal.useApiKeyInstead":`대신 API 키 사용`,"modal.setupGuide":`설정 안내`,"modal.setupStep1Prefix":`다음으로 이동:`,"modal.setupDashboardLink":`{label} 대시보드`,"modal.setupStep1Suffix":`에서 API 키를 복사하세요`,"modal.setupStep2":`아래 API 키 필드에 붙여넣으세요`,"modal.setupStep3":`프로바이더 추가를 클릭하세요 — 모델은 자동으로 검색됩니다`,"modal.namePlaceholder":`예: openrouter`,"modal.duplicateWarn":`프로바이더 "{name}"이(가) 이미 있어 덮어씁니다.`,"modal.forwardHintPrefix":`키 불필요 — 프록시가`,"modal.forwardCredentials":`codex login`,"modal.forwardHintSuffix":`자격 증명을 이 프로바이더로 전달합니다.`,"modal.localHint":`API 키는 저장되지 않습니다. Cursor의 공개 모델 카탈로그만 Codex에 추가되며, live Cursor 전송과 네이티브 파일/셸 실행은 검토 전까지 비활성입니다.`,"modal.getApiKey":`{label} API 키 받기`,"modal.apiKey":`API 키`,"modal.apiKeyPlaceholder":`sk-… (또는 $ENV_VAR)`,"modal.defaultModelPlaceholder":`예: gpt-5.5`,"modal.baseUrlPlaceholder":`https://...`,"modal.adding":`추가 중…`,"modal.useOauthLogin":`← OAuth 로그인 사용`,"codexAuth.addIdPlaceholder":`codex-work, codex-alt, team…`,"codexAuth.resetCreditsAria":`리셋 크레딧 {count}개`,"claude.pageTitle":`Claude Code`,"cws.loading":`콤보 불러오는 중…`,"cws.loadFailed":`콤보를 불러오지 못했습니다.`,"cws.saveFailed":`콤보를 저장하지 못했습니다.`,"cws.removeFailed":`콤보를 삭제하지 못했습니다.`,"cws.saved":`콤보를 저장했습니다.`,"cws.created":`{model}을(를) 만들었습니다.`,"cws.removed":`combo/{id}을(를) 삭제했습니다.`,"cws.add":`콤보 추가`,"cws.addTitle":`콤보 추가`,"cws.addSubtitle":`여러 프로바이더로 분기하는 가상 모델입니다. 클라이언트는 combo/<id>를 요청합니다.`,"cws.create":`콤보 만들기`,"cws.railAria":`콤보 목록`,"cws.searchPlaceholder":`콤보 또는 대상 검색…`,"cws.noSearchResults":`검색과 일치하는 콤보가 없습니다.`,"cws.group.failover":`장애 조치`,"cws.group.roundRobin":`라운드로빈`,"cws.targetCount":`대상 {count}개`,"cws.targetCountOne":`대상 1개`,"cws.overviewTitle":`콤보`,"cws.overviewBlurb":`프로바이더/모델 대상 사이에서 장애 조치하거나 결정적 Smooth Weighted 라운드로빈을 사용하는 가상 모델입니다.`,"cws.count.total":`전체`,"cws.count.failover":`장애 조치`,"cws.count.roundRobin":`라운드로빈`,"cws.howTitle":`동작 방식`,"cws.howBody":`Codex에서 combo/<id>를 요청하세요. OpenCodex는 재시도 가능한 업스트림 오류에서만 다음 대상으로 넘깁니다. 사용 가능한 대상이 없으면 전역 기본 프로바이더로 우회하지 않고 요청을 실패 처리합니다.`,"cws.attentionTitle":`확인 필요`,"cws.attention.empty":`구성된 대상 없음`,"cws.attention.few":`대상이 하나뿐 — 장애 조치할 곳이 없음`,"cws.emptyTitle":`첫 콤보 만들기`,"cws.empty.createDesc":`가상 모델 이름을 정하고 백엔드를 둘 이상 연결하세요.`,"cws.backToAll":`모든 콤보로`,"cws.allCombos":`모든 콤보`,"cws.copyModel":`ID 복사`,"cws.copied":`복사됨`,"cws.tab.config":`설정`,"cws.tab.about":`정보`,"cws.strategy":`전략`,"cws.strategy.failover":`장애 조치`,"cws.strategy.roundRobin":`라운드로빈`,"cws.strategy.failoverHint":`대상을 순서대로 시도합니다. 재시도 가능한 오류(한도, 장애, 구독 게이트)면 다음으로 넘어갑니다.`,"cws.strategy.roundRobinHint":`가중치에 따라 트래픽을 결정적으로 분배합니다. 선택된 대상을 성공 요청 묶음 동안 유지한 뒤 다음 대상으로 진행합니다.`,"cws.field.id":`콤보 ID`,"cws.field.idPlaceholder":`free`,"cws.field.idHint":`클라이언트는 {model}을(를) 요청합니다`,"cws.field.stickyLimit":`회전 전 sticky 성공 횟수`,"cws.field.stickyLimitHint":`가중 선택기가 다음 대상으로 진행하기 전에 선택된 대상을 이 성공 요청 횟수만큼 유지합니다.`,"cws.field.defaultEffort":`기본 추론 수준`,"cws.field.defaultEffortHint":`클라이언트가 추론 수준을 생략한 경우에만 사용합니다. 클라이언트 값이 우선하며 각 대상이 자체 기능에 맞게 처리합니다.`,"cws.targets":`대상`,"cws.targets.failoverHint":`순서가 중요합니다 — 첫 번째가 기본입니다.`,"cws.targets.roundRobinHint":`가중치는 결정적 상대 선택을 제어하고, 순서는 회전 고리의 동률을 결정합니다.`,"cws.target.provider":`프로바이더`,"cws.target.model":`모델`,"cws.target.weight":`가중치`,"cws.target.pickProvider":`프로바이더 선택…`,"cws.target.pickProviderFirst":`먼저 프로바이더를 선택하세요…`,"cws.target.pickModel":`모델 선택…`,"cws.target.noModels":`이 프로바이더에 모델 없음`,"cws.target.modelPlaceholder":`모델 ID`,"cws.target.add":`대상 추가`,"cws.target.drag":`드래그하여 순서 변경`,"cws.target.moveUp":`위로`,"cws.target.moveDown":`아래로`,"cws.aboutTitle":`런타임`,"cws.aboutBody":`실패한 대상은 Retry-After를 반영해 잠시 쿨다운됩니다. 잘못된 요청과 컨텍스트 오류는 다음 대상으로 넘기지 않습니다. 각 대상은 자체 기능에 맞게 추론 수준을 조정하며, 모든 대상 소진 시 우회 없이 실패합니다. 로그와 사용량에는 순서가 있는 실제 시도와 시도별 사용량이 남습니다.`,"cws.removeConfirmTitle":`{model}을(를) 삭제할까요?`,"cws.removeConfirmDesc":`설정과 Codex 카탈로그에서 가상 모델만 제거합니다. 프로바이더는 삭제되지 않습니다.`,"cws.unsavedTitle":`저장되지 않은 변경`,"cws.unsavedDesc":`이 콤보의 편집을 버리고 계속할까요?`,"cws.keepEditing":`계속 편집`,"cws.err.missingId":`콤보 ID가 필요합니다.`,"cws.err.invalidId":`ID는 문자/숫자로 시작하고 문자·숫자·점·밑줄·하이픈만 사용할 수 있습니다(최대 64).`,"cws.err.duplicateId":`같은 ID의 콤보가 이미 있습니다.`,"cws.err.noTargets":`대상을 하나 이상 추가하세요.`,"cws.err.incompleteTarget":`각 대상에 프로바이더와 모델이 필요합니다.`,"cws.target.disabled":`{name} (비활성화됨)`,"cws.err.reservedNamespace":`콤보를 만들기 전에 combo라는 실제 프로바이더의 이름을 변경하세요.`,"cws.err.providerCollision":`콤보 ID가 설정된 프로바이더 이름과 충돌합니다.`,"cws.err.unknownProvider":`각 대상은 설정된 프로바이더를 사용해야 합니다.`,"cws.err.duplicateTarget":`같은 프로바이더/모델 대상은 한 번만 추가할 수 있습니다.`,"cws.err.invalidStickyLimit":`sticky 성공 횟수는 1~100의 정수여야 합니다.`,"cws.err.invalidWeight":`각 라운드로빈 가중치는 1~10000의 정수여야 합니다.`,"cws.err.noEnabledTarget":`하나 이상의 대상이 활성화된 프로바이더를 사용해야 합니다.`},zh:{"nav.dashboard":`仪表盘`,"nav.providers":`提供方`,"nav.models":`模型`,"nav.combos":`组合`,"nav.subagents":`子代理`,"nav.logs":`日志`,"nav.debug":`调试`,"nav.usage":`用量`,"common.github":`GitHub`,"common.save":`保存`,"common.saving":`保存中…`,"common.cancel":`取消`,"common.discard":`丢弃`,"common.remove":`移除`,"common.loading":`加载中…`,"theme.label":`主题`,"theme.light":`浅色`,"theme.dark":`深色`,"theme.system":`跟随系统`,"lang.label":`语言`,"dash.subtitle":`本地 opencodex 代理、其提供方以及路由到 Codex 的模型的实时状态。`,"dash.status":`状态`,"dash.online":`在线`,"dash.offline":`离线`,"dash.version":`版本`,"dash.uptime":`运行时间`,"dash.providers":`提供方`,"dash.tokens30d":`Token (30 天)`,"dash.coverage":`覆盖率 {pct}`,"dash.activeProviders":`活跃提供方`,"dash.noProviders":`尚未配置提供方。请运行 {cmd}。`,"dash.col.name":`名称`,"dash.col.adapter":`适配器`,"dash.col.baseUrl":`Base URL`,"dash.col.model":`模型`,"dash.availableModels":`可用模型`,"dash.noModels":`未找到模型。请检查提供方 API 密钥。`,"dash.cannotConnect":`无法连接到代理。它在运行吗?`,"dash.runStart":`运行 {cmd} 以启动代理。`,"dash.stop":`停止代理`,"dash.stopConfirm":`停止代理并恢复原生 Codex 配置?`,"dash.stopping":`正在停止…`,"dash.codexAutoStart":`随 Codex 启动 opencodex`,"dash.codexAutoStartHint":`启用后,Codex shim 会在每次 Codex CLI/App 启动前运行 ocx ensure。关闭后不会改动 Codex。`,"dash.searchModel":`搜索附属模型`,"dash.searchModelHint":`用于非 OpenAI 路由模型的 web_search 的模型。需要 ChatGPT 登录。`,"dash.searchReasoning":`搜索推理强度`,"dash.visionModel":`视觉附属模型`,"dash.visionModelHint":`为纯文本路由模型描述图像的模型。需要 ChatGPT 登录。`,"dash.webSearchSidecar":`网页搜索附属服务`,"dash.webSearchSidecarHint":`选择路由模型进行网页搜索时使用的后端和模型。`,"dash.visionSidecar":`视觉附属服务`,"dash.visionSidecarHint":`选择纯文本路由模型描述图像时使用的后端和模型。`,"dash.shadowCallIntercept":`影子调用拦截`,"dash.shadowCallInterceptHint":`拦截 Codex 应用的 gpt-5.4-mini 后台调用(标题生成、提交消息)并重定向到所选模型。effort 固定为 low。`,"dash.shadowCallWarning":`⚠ 启用后,所有 gpt-5.4-mini 请求将被替换为所选模型。`,"dash.shadowCallOriginal":`原始`,"dash.shadowCallModel":`替代模型`,"dash.shadowCallTooltip":`Codex 应用在后台使用 gpt-5.4-mini 进行线程标题生成、提交消息生成和技能编排。启用此选项可将这些调用重定向到您选择的模型。`,"models.shadowCallIntercept":`影子调用拦截`,"models.shadowCallInterceptHint":`拦截 Codex 应用的 gpt-5.4-mini 后台调用并重定向到所选模型。`,"dash.sidecarBackend":`后端`,"dash.sidecarModel":`模型`,"dash.backendAuto":`自动`,"dash.backendOpenAI":`OpenAI`,"dash.backendAnthropic":`Anthropic`,"dash.sidecarSaved":`附属设置已保存。将在下一个请求时生效。`,"dash.sidecarSaveFailed":`保存附属设置失败。`,"dash.injectionLabel":`子代理委托`,"dash.injectionHint":`选择要注入委托提示的路由模型。代理将被告知在子任务中使用它。`,"dash.injectionActive":`已激活`,"dash.injectionNone":`无`,"dash.injectionEffortLabel":`推理强度`,"dash.injectionEffortNone":`模型默认`,"dash.effortCapLabel":`V2 ultra 推理强度限制`,"dash.subagentEffortCapLabel":`V2 子代理推理强度限制`,"dash.effortCapHelp":`限制 V2 ultra 模式轮次的推理强度。设置后,来自 ultra 模式的 max 请求将被限制到所选级别。子代理限制仅适用于衍生的子代理。只会降低强度,不会提高。如果模型不支持所选级别,将自动降至最近的支持级别。`,"dash.effortCapNone":`无上限`,"dash.maintenance":`维护`,"dash.maintenanceHint":`刷新 Codex 模型目录,或安装新的 opencodex 版本。`,"dash.syncModels":`同步模型`,"dash.syncing":`同步中…`,"dash.syncOk":`同步完成。已追加 {count} 个模型。`,"dash.syncStaleHint":`如果 Codex App 仍显示旧列表,请重启长期运行的 app-server 进程。`,"dash.syncFailed":`同步失败:{error}`,"dash.projectConfigTitle":`项目 Codex 配置绕过了 OpenCodex`,"dash.projectConfigHint":`这些仓库级设置会覆盖 OpenCodex 代理(例如直接走 OpenCode Go)。请移除它们,以便该项目使用 ~/.codex/config.toml 的代理路由。`,"dash.checkUpdate":`检查更新`,"dash.updateTitle":`更新 opencodex`,"dash.updateDesc":`检查所选 npm 频道的最新版本,然后选择安装后是否重启代理。`,"dash.updateChannel":`频道`,"dash.updateChecking":`正在检查更新…`,"dash.updateInstalled":`已安装`,"dash.updateLatest":`最新`,"dash.updateAvailable":`有可用更新`,"dash.updateCurrent":`已是最新`,"dash.updateCommand":`命令`,"dash.updateSource":`当前是源码检出。请在终端运行显示的命令进行更新。`,"dash.updateUnavailable":`无法从 npm 读取最新版本。请稍后重试。`,"dash.updateRetry":`重试`,"dash.updateRecheck":`重新检查`,"dash.updateCannotAuto":`无法一键更新({reason})。`,"dash.updateReason.source_checkout":`源码检出`,"dash.updateReason.latest_unavailable":`无法连接 npm 注册表`,"dash.updateReason.already_latest":`已是最新版本`,"dash.updateReason.unknown":`无法更新`,"dash.updateRestart":`更新后重启`,"dash.updateRestartHint":`推荐开启。代理重启前,当前 GUI 仍运行旧代码。`,"dash.runUpdate":`更新`,"dash.updateReconnecting":`正在等待重启后的代理…`,"dash.updateStatus.running":`正在更新 opencodex。`,"dash.updateStatus.restarting":`更新已安装。正在重启代理。`,"dash.updateStatus.succeeded":`更新完成。`,"dash.updateStatus.failed":`更新失败。`,"prov.subtitle":`配置 opencodex 路由到 Codex 的上游提供方。使用账户登录、添加提供方,或编辑原始配置。`,"prov.add":`添加提供方`,"prov.editJson":`编辑 JSON`,"prov.accountLogin":`账户登录`,"prov.noOauth":`没有可用的 OAuth 提供方。`,"prov.loggedIn":`已登录`,"prov.notLoggedIn":`未登录`,"prov.logout":`退出登录`,"prov.login":`登录`,"prov.loginWith":`使用 {provider} 登录`,"prov.waitingBrowser":`等待浏览器…`,"prov.didntOpen":`没有打开?点击这里`,"prov.copyLink":`复制链接`,"prov.linkCopied":`已复制`,"prov.pasteRedirect":`粘贴重定向 URL 或授权码`,"prov.pasteRedirectHint":`如果浏览器显示 localhost 错误,请复制地址栏中的完整 URL 并粘贴到此处(或粘贴授权码)。`,"prov.pasteSubmit":`提交`,"prov.pasteSubmitting":`提交中…`,"prov.pasteOk":`已提交代码 — 正在完成登录…`,"prov.pasteFail":`无法提交代码:{error}`,"prov.port":`端口`,"prov.default":`默认`,"prov.loadingConfig":`加载中…`,"prov.saved":`已保存!重启代理以生效。`,"prov.loadConfigFail":`加载配置失败`,"prov.invalidJson":`无效的 JSON`,"prov.saveFailed":`保存失败`,"prov.loginFailStart":`{provider} 登录启动失败`,"prov.loginError":`{provider} 登录错误:{error}`,"prov.loginRequestFail":`{provider} 登录请求失败`,"prov.loginOk":`已登录到 {provider}。运行 {cmd}(或实时生效)以列出其模型。`,"prov.logoutOk":`已退出 {provider}。`,"prov.logoutFail":`无法退出 {provider}。账户状态保持不变。`,"prov.removed":`已移除 "{name}"。`,"prov.removeFail":`移除 "{name}" 失败。`,"prov.added":`已添加 "{name}"。现已生效 — 运行 {cmd}(或重启)以在 Codex 选择器中列出其模型。`,"prov.removeConfirm":`移除提供方 "{name}"?其模型将从 Codex 选择器中消失。`,"prov.hasApiKey":`已配置 API 密钥`,"prov.hasHeaders":`已配置自定义请求头`,"prov.accounts":`账户({n})`,"prov.accountsAria":`展开/收起 {name} 账户`,"prov.accountActive":`使用中`,"prov.accountReauth":`需重新登录`,"prov.accountAdd":`添加账户`,"prov.accountNoLabel":`账户 {id}`,"prov.accountSwitchTitle":`使用此账户`,"prov.accountSwitched":`已切换到 {email}。`,"prov.accountSwitchFail":`切换账户失败`,"prov.accountRemoved":`已移除 {email}。`,"prov.accountRemoveFail":`无法移除 {email}。账户保持不变。`,"prov.accountRemoveAria":`移除 {email}`,"prov.accountRemoveConfirm":`移除账户 {email}?其登录将从此代理中删除。`,"prov.keyAdd":`添加 API 密钥`,"prov.keyAdded":`已为 {name} 添加 API 密钥。`,"prov.keyAddFail":`添加 API 密钥失败`,"prov.keyPlaceholder":`粘贴 API 密钥`,"prov.keySwitchTitle":`使用此密钥`,"prov.keySwitched":`已切换到密钥 {key}。`,"prov.keySwitchFail":`切换密钥失败`,"prov.keyRemoved":`已移除密钥 {key}。`,"prov.keyRemoveAria":`移除密钥 {key}`,"prov.keyRemoveConfirm":`移除 API 密钥 {key}?它将从此代理的配置中删除。`,"prov.activeBadge":`已启用`,"prov.disabledBadge":`已禁用`,"prov.defaultBadge":`默认`,"prov.enable":`启用`,"prov.disable":`禁用`,"prov.enabled":`已启用 "{name}"。其模型可再次出现在 Codex 中。`,"prov.disabled":`已禁用 "{name}"。设置会保留,但模型会被隐藏。`,"prov.enableFail":`启用 "{name}" 失败。`,"prov.disableFail":`禁用 "{name}" 失败。`,"prov.enableAria":`启用提供方 {name}`,"prov.disableAria":`禁用提供方 {name}`,"prov.defaultCannotDisable":`默认提供方不能被禁用`,"prov.openaiAccountMode":`Codex 账户模式`,"prov.openaiModePool":`账户池`,"prov.openaiModeDirect":`直连`,"prov.openaiPoolDesc":`默认模式。根据会话关联、额度、冷却时间和故障转移,在主登录与已添加账户之间轮换。`,"prov.openaiDirectDesc":`仅使用当前主 Codex 登录。不会读取或轮换已存储的账户池账号。`,"prov.openaiModeSaved":`OpenAI 账户模式已更改为 {mode}。`,"prov.openaiModeSaveFailed":`无法更改 OpenAI 账户模式。`,"prov.openaiApiDesc":`仅使用 OpenAI API 密钥,不使用 Codex 账户凭据。`,"prov.manageCodexAccounts":`管理 Codex 账户`,"prov.openaiApiMissing":`需要 API 密钥`,"prov.openaiApiSetup":`设置 API 密钥`,"models.subtitle":`开关 Codex 可见的模型 — 原生 GPT passthrough 与已路由模型按提供方分组(点击标题可折叠)。已禁用的模型会从目录和模型选择器中隐藏。更改在下一个 Codex 回合生效 — opencodex 会使 Codex 的 5 分钟模型缓存失效,因此无需重启。`,"models.nativeGroupLabel":`OpenAI 原生`,"models.nativeHint":`Passthrough 模型使用在提供方页面选择的账户池或直连选项。关闭后会从 Codex 选择器中隐藏(目录条目保留,重新开启即可完整恢复)。`,"models.active":`{active}/{total} 已启用`,"models.allOn":`全部开启`,"models.allOff":`全部关闭`,"models.cap350k":`限制 350k`,"models.capApplied":`上下文限制已应用 — 将在下一个 Codex 回合生效。`,"models.capSaveFailed":`保存上下文限制失败`,"models.contextCapped":`350k 限制`,"models.contextCapLabel":`上下文限制`,"models.v2Label":`子代理`,"models.v2Mode_v1":`v1`,"models.v2Mode_default":`base`,"models.v2Mode_v2":`v2`,"models.v2ModeDesc_v1":`所有模型 → v1 界面`,"models.v2ModeDesc_default":`上游默认值 (sol/terra=v2, luna=v1)`,"models.v2ModeDesc_v2":`所有模型 → v2 界面`,"models.v2Help":`控制所有模型的多代理界面。
28
-
29
- v1: 经典单线程代理。所有模型使用 v1 协作界面。
30
- base: 上游默认值 — sol/terra 使用 v2,luna 使用 v1,其余跟随 codex 功能标志。
31
- v2: 多线程代理(spawn_agent)。所有模型使用 v2 协作界面。
32
-
33
- 更改在新会话中生效。`,"models.v2DocsLink":`v1 / v2 是什么?`,"dash.multiAgent":`子代理`,"models.v2Conflict":`[agents] max_threads 仍存在 — codex 将拒绝启动,请从 config.toml 移除`,"models.v2Applied":`multi_agent_v2 已更新 — 新会话生效(重启 Codex 应用以刷新选择器)`,"models.v2ThreadsLabel":`最大线程`,"models.v2ThreadsDefault":`默认 (4)`,"models.v2ThreadsApplied":`线程上限已更新 — 新会话生效`,"models.v2ThreadsInvalid":`线程上限必须为 >= 1 的整数`,"models.v2ThreadsApply":`应用`,"models.capValue":`限制 {value}`,"models.contextCappedValue":`{value} 限制`,"models.setAll":`全部设置`,"models.custom":`自定义…`,"models.customApply":`应用`,"models.customPlaceholder":`令牌 (例如 420000)`,"models.applied":`已应用 — 将在下一个 Codex 回合生效。`,"models.saveFailed":`保存失败`,"models.networkError":`网络错误 — 代理在运行吗?`,"models.loadFail":`加载模型失败 — 代理在运行吗?`,"models.noRouted":`没有已路由的模型`,"models.noRoutedHint":`请先登录提供方或添加一个。`,"models.loading":`加载中…`,"models.search":`搜索模型…`,"models.showMore":`再显示 {n} 个`,"models.allowlistLabel":`仅所选`,"models.allowlistHint":`仅勾选的模型进入目录(留空 = 全部)。适用于暴露成千上万模型的提供商。`,"models.selectedCount":`已选 {n} 个`,"models.orderHint":`选择器顺序:Subagents 中的选择(按所选顺序)→ 其余已路由模型(依次按提供方、模型 ID 字母排序)→ 原生模型。可见性开关仅用于筛选,不会改变此顺序。`,"sub.subtitle":`Codex 的 {cmd} 仅将优先级最高的前 5 个模型作为覆盖项公开。在此最多选择 5 个 — 原生 gpt 或已路由模型 — opencodex 会设置它们的目录优先级,使其正好排在前面。其他模型仍可按确切名称调用;此设置仅控制显示项。`,"sub.featured":`精选`,"sub.orderHint":`此处所选并显示的顺序决定 Codex 模型选择器顶部第 1–5 位,以及 {cmd} 的默认模型候选。`,"sub.noneSelected":`未选择 — 请从下方列表选择。`,"sub.models":`模型`,"sub.search":`搜索模型(原生 gpt + 已路由)…`,"sub.noModels":`没有模型 — 请先登录提供方或添加一个。`,"sub.saved":`已保存 {n} 个模型。启动新的 Codex 会话(或运行 {cmd})以将它们作为 spawn_agent 覆盖项查看。`,"sub.saveFailed":`保存失败`,"sub.networkError":`网络错误 — 代理在运行吗?`,"sub.loadFail":`加载模型失败 — 代理在运行吗?`,"sub.loading":`加载中…`,"sub.moveUp":`上移 {m}`,"sub.moveDown":`下移 {m}`,"sub.removeAria":`移除 {m}`,"logs.title":`请求日志`,"logs.subtitle":`经过本地 opencodex 代理的最近请求,最新在前。`,"logs.autoRefresh":`自动刷新`,"logs.noRequests":`暂无请求。`,"logs.filter.surface.label":`界面`,"logs.filter.surface.all":`全部`,"logs.filter.surface.claude":`Claude`,"logs.filter.surface.codex":`Codex`,"logs.badge.claude":`Claude`,"logs.col.time":`时间`,"logs.col.request":`请求`,"logs.col.model":`模型`,"logs.col.effort":`推理强度`,"logs.col.provider":`提供方`,"logs.col.status":`状态`,"logs.col.tokens":`Token 数`,"logs.col.error":`错误`,"logs.col.upstreamReason":`上游原因`,"logs.col.duration":`耗时`,"logs.tokens.reported":`已上报`,"logs.tokens.unreported":`未上报`,"logs.tokens.unsupported":`不支持`,"logs.tokens.estimated":`估算`,"logs.tokens.input":`输入`,"logs.tokens.output":`输出`,"logs.tokens.cacheRead":`缓存命中 (c)`,"logs.tokens.cacheWrite":`缓存写入 (w)`,"logs.tokens.reasoning":`推理`,"logs.tokens.noCache":`无缓存数据`,"logs.tokens.noCacheNote":`该提供商不报告缓存 token 数`,"logs.tokens.estimatedNote":`估算值(提供商不报告精确用量)`,"logs.details":`查看详情`,"logs.detailTitle":`请求详情`,"logs.detailRaw":`原始日志`,"debug.title":`调试`,"debug.subtitle":`可选的 provider transport 与 usage 提取诊断。请求错误和 502 在 Logs 页面。`,"debug.debug":`Provider debug`,"debug.usage":`Usage 提取`,"debug.injection":`注入日志`,"debug.claude":`Claude 入站`,"debug.claudeInbound.title":`Claude 入站请求`,"debug.claudeInbound.sub":`显示 Claude Code/Desktop 实际发送的内容(thinking、effort、metadata)— 不保存提示词原文。`,"debug.claudeInbound.empty":`尚未捕获任何请求。开启后从 Claude 发送一条消息试试。`,"debug.claudeInbound.time":`时间`,"debug.claudeInbound.endpoint":`端点`,"debug.claudeInbound.model":`模型`,"debug.claudeInbound.none":`无`,"debug.reset":`清除运行时覆盖`,"debug.refresh":`刷新`,"debug.follow":`跟随滚动`,"debug.streamProvider":`Provider`,"debug.streamUsage":`Usage`,"debug.streamInjection":`Injection`,"debug.loading":`正在加载调试设置…`,"debug.emptyTitle":`调试日志已关闭`,"debug.empty":`请在上方卡片中开启 Provider debug 或 Usage extraction。通过代理发送请求后,诊断行会显示在这里。`,"debug.noLinesTitle":`等待诊断行`,"debug.noLines.provider":`提供商调试已开启,但仅记录传输异常(丢弃或格式错误的帧,以及 Cursor dial/retry 事件)。通过 Anthropic 等提供商的正常请求可能不会产生任何行。`,"debug.noLines.usage":`用量提取已开启但尚未捕获任何内容。请通过 Codex 发送请求,随后会显示在此处。`,"debug.noLines.injection":`注入日志已开启但尚未捕获任何内容。它记录协作和子代理回合中的多代理指导注入与 effort-cap 决策。`,"usage.title":`用量`,"usage.subtitle":`代理本地的 Token 用量统计。缺失的用量不会显示为零。`,"usage.loading":`正在加载用量数据…`,"usage.empty":`尚无用量记录。通过代理发送请求后将在此显示。`,"usage.range.all":`全部`,"usage.range.30d":`30 天`,"usage.range.7d":`7 天`,"usage.card.requests":`请求数`,"usage.card.measured":`已计量`,"usage.card.reported":`已上报`,"usage.card.totalTokens":`Token 总数`,"usage.card.cachedTokens":`缓存命中 Token`,"usage.card.cachedTokensHint":`从提供商缓存读取的提示 Token(命中)。缓存写入在下方单独显示。`,"usage.card.cacheWriteTokens":`缓存写入`,"usage.card.coverage":`覆盖率`,"usage.card.activeDays":`活跃天数`,"usage.section.heatmap":`每日活动`,"usage.section.models":`模型`,"usage.section.providers":`提供方`,"usage.section.coverage":`覆盖率明细`,"usage.coverage.measured":`已计量`,"usage.coverage.reported":`提供方上报`,"usage.coverage.estimated":`估算`,"usage.coverage.note":`已计量包含提供方上报和估算的 Token 数。未上报 / 不支持请求仅做计数,不会被算作 0 Token。`,"usage.search.models":`搜索模型…`,"usage.col.requests":`请求数`,"usage.col.measured":`已计量`,"usage.col.reported":`已上报`,"usage.col.tokens":`Token 数`,"usage.col.share":`占比`,"usage.heatmap.less":`少`,"usage.heatmap.more":`多`,"modal.addNamed":`添加:{label}`,"modal.add":`添加提供方`,"modal.search":`搜索提供方…`,"modal.logInWith":`使用 {label} 登录`,"modal.waitingBrowser":`等待浏览器…`,"modal.providerName":`提供方名称`,"modal.adapter":`适配器`,"modal.baseUrl":`Base URL`,"modal.defaultModel":`默认模型(可选)`,"modal.nameRequired":`提供方名称为必填项`,"modal.baseUrlRequired":`Base URL 为必填项`,"modal.networkError":`网络错误 — 代理在运行吗?`,"modal.loginFailStart":`登录启动失败`,"modal.waitingLogin":`等待浏览器登录…`,"modal.loggingIn":`登录中…`,"modal.loginTimeout":`登录超时 — 请重试。`,"nav.api":`API`,"nav.codexAuth":`Codex 认证`,"nav.openMenu":`打开菜单`,"nav.closeMenu":`关闭菜单`,"codexAuth.mainAccount":`主账号`,"codexAuth.appLogin":`应用登录`,"codexAuth.accountPool":`账号池`,"codexAuth.accountModeTitle":`OpenAI 账户模式`,"codexAuth.accountModePool":`账户池模式`,"codexAuth.accountModePoolDesc":`主登录与符合条件的已添加账户会在此轮换。`,"codexAuth.accountModeDirect":`直连模式`,"codexAuth.accountModeDirectDesc":`请求仅使用主登录;已添加账户会继续存储,供账户池模式使用。`,"codexAuth.openaiMissing":`未配置内置 OpenAI 提供方。`,"codexAuth.openaiDisabled":`内置 OpenAI 提供方已禁用。`,"codexAuth.openProviders":`打开提供商`,"codexAuth.add":`添加`,"codexAuth.refreshQuota":`刷新额度`,"codexAuth.refreshingQuota":`刷新中...`,"codexAuth.quotaRefreshed":`额度已刷新`,"codexAuth.quotaRefreshFailed":`额度刷新失败`,"codexAuth.noPool":`尚未添加池账号。`,"codexAuth.fiveHour":`5 小时`,"codexAuth.weekly":`每周`,"codexAuth.monthly":`30天`,"codexAuth.resets":`重置`,"codexAuth.today":`今天`,"codexAuth.current":`当前`,"codexAuth.nextSession":`下次会话`,"codexAuth.poolPrepared":`已为账户池准备`,"codexAuth.preparePoolTitle":`为账户池模式准备此账号?`,"codexAuth.preparePoolDesc":`直连请求仍使用主登录。启用账户池模式后,此账号会成为预先选择的池账号。`,"codexAuth.prepareForPool":`为账户池准备`,"codexAuth.poolPreparedToast":`已为账户池模式准备 {email}`,"codexAuth.switchTitle":`切换活跃账号?`,"codexAuth.switchDesc":`从下次 Codex 会话开始生效。当前会话保持现有账号。`,"codexAuth.cacheWarning":`切换账号会重置提示缓存。新会话从空缓存开始。`,"codexAuth.setAsNext":`设为下次会话`,"codexAuth.cancel":`取消`,"codexAuth.switchBack":`切换回主账号?`,"codexAuth.switchBackDesc":`下次 Codex 会话将使用应用登录账号。`,"codexAuth.autoSwitch":`超过 80% 时自动切换`,"codexAuth.autoSwitchDesc":`新会话会在相关额度窗口达到阈值时切换;Go/Free 只使用 30天`,"codexAuth.switched":`下次会话将使用 {email}`,"codexAuth.loadFailed":`无法加载账户。`,"codexAuth.switchFailed":`无法切换账户。之前的选择保持不变。`,"codexAuth.removeConfirm":`删除 {id}?`,"codexAuth.removeFailed":`无法移除账户。未进行任何更改。`,"codexAuth.addTitle":`添加 Codex 账号`,"codexAuth.addIdLabel":`账号 ID(标识符)`,"codexAuth.addJsonLabel":`auth.json 内容`,"codexAuth.addHelp":`从另一台机器的 ~/.codex/auth.json 复制,或使用 codex-auth export。`,"codexAuth.importBtn":`导入`,"codexAuth.importInvalidJson":`无效的 JSON`,"codexAuth.importMissingTokens":`JSON 中缺少 access_token 或 refresh_token`,"codexAuth.importMissingId":`请输入账号 ID`,"codexAuth.accountAdded":`账号已添加到池中`,"codexAuth.addPickDesc":`使用另一个 ChatGPT 账号登录以添加到池中。`,"codexAuth.oauthLogin":`OAuth 登录`,"codexAuth.oauthDesc":`在浏览器中打开 ChatGPT 登录`,"codexAuth.importAuthJson":`导入 auth.json`,"codexAuth.importAuthJsonDesc":`从另一个 Codex 安装或 codex-auth 导出`,"codexAuth.back":`返回`,"codexAuth.oauthAlreadyInProgress":`登录已在进行中。请在浏览器中完成。`,"codexAuth.oauthWaiting":`等待浏览器中完成 ChatGPT 登录...`,"codexAuth.copyLoginLink":`复制登录链接`,"codexAuth.loginLinkCopied":`登录链接已复制`,"codexAuth.loginLinkCopyFailed":`无法复制登录链接。`,"codexAuth.oauthCancelled":`登录已取消。`,"codexAuth.needsReauth":`重新登录`,"codexAuth.tokenExpired":`令牌已过期 — 重新添加此账号以刷新`,"codexAuth.emailCollision":`此账号与您的主 Codex 登录相同。请使用其他账号。`,"codexAuth.resetCreditsTitle":`重置额度`,"codexAuth.resetCreditsAvailable":`您有 {count} 个可用重置额度。`,"codexAuth.resetCreditsDesc":`每个额度可立即重置您当前的小时和每周使用限制。`,"codexAuth.noResetCredits":`没有可用的重置额度。`,"codexAuth.earnCreditsHint":`额度每月自动发放,也可通过推荐计划获得。`,"codexAuth.creditsExpireNote":`额度在获得后 30 天过期。`,"codexAuth.useOneCredit":`使用 1 个额度`,"codexAuth.confirmResetTitle":`使用重置额度?`,"codexAuth.confirmResetDesc":`这将立即重置您当前的使用限制。剩余额度:{count} 个。`,"codexAuth.irreversible":`此操作不可撤销。`,"codexAuth.useCredit":`使用额度`,"codexAuth.redeeming":`重置中...`,"codexAuth.resetSuccess":`使用限制已重置!剩余额度:{remaining} 个。`,"codexAuth.resetNothingToReset":`当前没有需要重置的使用窗口。`,"codexAuth.resetNoCredit":`没有可用的重置额度。`,"codexAuth.resetError":`重置额度使用失败,请重试。`,"codexAuth.fifoNote":`最早获得的额度优先使用。`,"codexAuth.confirmWhichCredit":`将使用 {date} 获得的额度。`,"codexAuth.creditNext":`即将使用`,"codexAuth.creditLabel":`额度 #{n}`,"codexAuth.creditNextBadge":`NEXT`,"codexAuth.creditGranted":`获得 {date}`,"codexAuth.creditExpires":`过期 {date}(剩余 {days} 天)`,"api.title":`API 访问`,"api.subtitle":`使用生成的 API 密钥从外部应用访问 opencodex 代理。通过 {authHeader} 或 {altHeader} 请求头进行认证。`,"api.endpoint":`端点`,"api.endpointNote":`兼容 OpenAI Responses API 格式。`,"api.newKeyTitle":`已创建新密钥`,"api.newKeyNote":`请立即复制此密钥,它不会再次显示。`,"api.copy":`复制`,"api.copied":`已复制`,"api.dismiss":`关闭`,"api.generateTitle":`生成密钥`,"api.keyNamePlaceholder":`密钥名称(可选)`,"api.generate":`生成`,"api.generating":`创建中…`,"api.activeKeys":`活跃密钥({count})`,"api.noKeys":`还没有 API 密钥。请在上方生成一个。`,"api.colName":`名称`,"api.colKey":`密钥`,"api.colCreated":`创建时间`,"api.confirm":`确认`,"api.deleteAria":`删除 API 密钥`,"api.usageTitle":`使用示例`,"nav.claude":`Claude`,"claude.subtitle":`在 Claude Code 中使用 GPT、Gemini 等其他模型。`,"claude.enabledLabel":`Claude 连接`,"claude.enabledHint":`关闭后 Claude Code 无法使用此代理。`,"claude.authMode":`认证模式`,"claude.authModeHint":`Subscription 需要 Claude 账户,Proxy 无需 Anthropic 账户即可使用`,"claude.authModeSubscription":`Subscription(Claude 账户)`,"claude.authModeProxy":`Proxy(无需账户)`,"claude.systemEnv":`自动连接`,"claude.systemEnvDesc":`开启后,在任意终端运行 claude 会自动通过代理。`,"claude.systemEnvWarn":`⚠ 需要完全退出并重新打开终端应用才能生效。不推荐使用。`,"claude.fastMode":`Fast Mode (OpenAI)`,"claude.fastModeDesc":`控制 OpenAI 模型的推理速度。ON = 优先级(更快)。OFF = 默认速度。Auto = 透传客户端设置。`,"claude.fastAuto":`Auto`,"claude.fastOn":`ON`,"claude.fastOff":`OFF`,"claude.autoContext":`自动利用大上下文`,"claude.autoContextDesc":`决定 1M 标记的范围。开:所有超过 20 万 token 的模型(GPT 系列等)都有大上下文条目;关:仅真正的 1M 模型有。`,"claude.autoContextInert":`配置文件中存在旧式上下文大小值(maxContextTokens),此功能暂不生效。删除该值即可恢复。`,"claude.autoCompactWindow":`自动摘要触发点`,"claude.autoCompactDefault":`350k(默认)`,"claude.autoCompactWindowDesc":`对话达到该点时自动摘要旧内容。不会超过各模型自身上限,因此 200k 模型不受影响。`,"claude.autoCompactWindowWarn":`修改该值可能导致 GPT 模型异常——若超过模型真实上限,会在摘要触发前报错。`,"claude.injectAgents":`自动注册子代理`,"claude.injectAgentsDesc":`将“子代理”页选中的模型(以及当前默认模型)注册为 Claude Code 可派遣的代理(ocx-*)。从下一个会话开始生效。`,"claude.webSearchSidecar":`网页搜索附属服务覆盖`,"claude.webSearchSidecarHint":`仅对 Claude Code 请求覆盖主网页搜索附属服务设置。`,"claude.visionSidecar":`视觉附属服务覆盖`,"claude.visionSidecarHint":`仅对 Claude Code 请求覆盖主视觉附属服务设置。`,"claude.useMainSetting":`使用主设置`,"claude.sidecarModelPlaceholder":`主设置中的模型`,"claude.quickstart":`开始使用`,"claude.quickstartHint":`{cmd} 通过代理打开 Claude Code。你的 claude.ai 登录保持不变。`,"claude.manualEnv":`手动配置(高级)`,"claude.smallFastModel":`后台辅助模型`,"claude.smallFastModelHint":`Claude Code 用于对话摘要、主题识别等后台工作的模型。子代理的 haiku 别名也使用它。留空 = Claude 默认(Haiku)。`,"claude.slotUnset":`使用 Claude 默认值`,"claude.modelMap":`模型拦截`,"claude.modelMapHint":`拦截对特定模型的请求并重定向到你指定的模型。默认为空——添加规则后才生效。`,"claude.mapFrom":`原始模型(如 claude-sonnet-4-5)`,"claude.mapTo":`替换为(如 gemini/gemini-3-pro)`,"claude.addMapping":`添加规则`,"claude.removeMapping":`删除规则`,"claude.aliases":`可用模型`,"claude.aliasesHint":`Claude Code 的 /model 菜单中显示的模型列表。`,"claude.loading":`加载中…`,"claude.loadFail":`加载 Claude 设置失败`,"claude.saved":`已保存。`,"claude.saveFailed":`保存失败`,"claude.networkError":`网络错误 — 代理是否在运行?`,"claude.toggleAria":`切换 Claude 连接`,"claude.none":`无`,"common.close":`关闭`,"common.ok":`确定`,"app.logoAria":`opencodex 徽标`,"app.claudeOn":`Claude 开`,"app.claudeOff":`Claude 关`,"usage.dayMon":`一`,"usage.dayWed":`三`,"usage.dayFri":`五`,"usage.heatmap.tooltipTokens":`{tokens} 令牌`,"usage.heatmap.tooltipRequests":`{requests} 请求`,"modal.back":`返回`,"modal.badge.oauth":`OAuth`,"modal.customProvider":`自定义提供方`,"modal.failedStatus":`失败 ({status})`,"modal.loginError":`登录错误:{error}`,"modal.badge.codexLogin":`Codex 登录`,"modal.badge.local":`本地`,"modal.badge.apiKey":`API 密钥`,"modal.badge.direct":`Direct`,"modal.badge.pool":`账户池`,"modal.badge.free":`免费`,"modal.invalidPreset":`此内置提供方预设不完整。请重启代理后重试。`,"modal.freeTierTitle":`免费层级`,"modal.freeTierDefault":`无需 API 密钥,开箱即用。`,"modal.tab.accounts":`账户`,"modal.tab.free":`免费`,"modal.tab.paid":`付费`,"modal.accountsHint":`Codex 账户提供商会转发你的 ChatGPT 登录。账户管理请前往`,"modal.accountsCodexAuthLink":`Codex 认证`,"modal.browseAll":`浏览全部 {count} 个提供商`,"modal.browseBack":`返回热门提供商`,"modal.notListed":`没有你要的提供商?添加自定义`,"modal.catalogLoading":`正在加载目录…`,"modal.accountLogin":`登录`,"modal.accountLogout":`退出登录`,"modal.accountLoggedIn":`已登录`,"modal.accountLoggedOut":`未登录`,"quota.fiveHourLimit":`5 小时限额`,"quota.weeklyLimit":`每周限额`,"quota.monthlyLimit":`30 天限额`,"quota.cursorFirstParty":`官方模型`,"quota.cursorApiUsage":`API 用量`,"quota.totalSubscriptionCredits":`订阅总额度`,"quota.usedPercent":`已用 {pct}%`,"quota.limitReached":`已达上限`,"quota.resetsToday":`今天 {time} 重置`,"quota.resetsTomorrow":`明天 {time} 重置`,"quota.resetsAt":`{when} 重置`,"quota.resetsRelativeMinutes":`{n} 分钟后重置`,"quota.resetsRelativeHours":`{n} 小时后重置`,"pws.status.ready":`就绪`,"pws.status.needsSetup":`需要设置`,"pws.auth.chatgptPassthrough":`ChatGPT 直通`,"pws.auth.noKey":`无需密钥`,"pws.freeTitle":`免费定价(可能仍需密钥)`,"pws.localTitle":`本地运行时`,"pws.modelCountOne":`1 个模型`,"pws.modelCount":`{count} 个模型`,"pws.rail.suffixDefault":` · 默认`,"pws.rail.suffixLocal":` · 本地`,"pws.rail.suffixFree":` · 免费`,"pws.rail.selectAria":`选择 {name} — {status}{suffix}`,"pws.searchPlaceholder":`搜索提供商…`,"pws.filterAria":`筛选提供商`,"pws.providerFiltersAria":`提供商筛选`,"pws.filters":`筛选`,"pws.filterStatus":`状态`,"pws.pricing":`定价`,"pws.paid":`付费`,"pws.filterType":`类型`,"pws.type.cloud":`云端`,"pws.type.local":`本地`,"pws.type.selfHosted":`自托管`,"pws.type.login":`登录`,"pws.sort":`排序`,"pws.sortProvidersAria":`排序提供商`,"pws.sort.az":`A–Z`,"pws.sort.za":`Z–A`,"pws.sort.freePaid":`免费优先`,"pws.sort.paidFree":`付费优先`,"pws.sort.accountsFirst":`账户优先`,"pws.resetAll":`全部重置`,"pws.providerList":`提供商列表`,"pws.providersAria":`提供商`,"pws.groupReady":`就绪 ({count})`,"pws.groupNeedsSetup":`需要设置 ({count})`,"pws.groupDisabled":`已禁用 ({count})`,"pws.noSearchResults":`没有匹配搜索的提供商。`,"pws.noMatchFilters":`没有匹配筛选的提供商。`,"pws.noProvidersConfigured":`尚未配置提供商。`,"pws.workspaceMainAria":`提供商详情`,"pws.detailComingSoon":`详情视图即将推出 — 请在经典视图中管理。`,"pws.selectPrompt":`从列表中选择一个提供商。`,"pws.connectFirst":`连接你的第一个提供商`,"pws.empty.browseFree":`浏览免费提供商`,"pws.empty.browseFreeDesc":`无需订阅即可开始`,"pws.empty.connectAccount":`连接账户`,"pws.empty.connectAccountDesc":`使用 ChatGPT 或提供商登录`,"pws.empty.addEndpoint":`添加端点`,"pws.empty.addEndpointDesc":`自定义 base URL 和 API 密钥`,"pws.workspaceToggle":`工作区视图`,"pws.classicToggle":`经典视图`,"pws.tab.overview":`概览`,"pws.tab.models":`模型`,"pws.tab.usage":`用量`,"pws.tab.accounts":`账户`,"pws.tab.settings":`设置`,"pws.connection":`连接`,"pws.status.connected":`已连接`,"pws.cell.auth":`认证`,"pws.cell.note":`备注`,"pws.cell.defaultModel":`默认模型`,"pws.statsAria":`提供商统计`,"pws.statsTitle":`统计`,"pws.stats.totalRequests":`请求数(30 天)`,"pws.stats.totalTokens":`令牌(30 天)`,"pws.stats.quotaUpdated":`配额更新`,"pws.stats.quotaTracked":`在用量标签查看限额。`,"pws.stats.source":`来源`,"pws.usageLast30d":`用量(最近 30 天)`,"pws.metricRequests":`请求`,"pws.metricTokens":`令牌`,"pws.usageUnavailable":`尚无用量记录。`,"pws.rateLimits":`速率限制`,"pws.quotaUnavailable":`此提供商暂无配额数据。`,"pws.selected":`已选择`,"pws.copyModelId":`复制 ID`,"pws.modelCopied":`已复制!`,"pws.modelsAvailable":`{count} 个可用`,"pws.modelSearchPlaceholder":`筛选模型…`,"pws.modelsLoading":`正在加载模型…`,"pws.modelsLoadFailed":`无法加载模型。`,"pws.retry":`重试`,"pws.noModels":`未发现此提供商的模型。`,"pws.noModelMatch":`没有匹配筛选的模型。`,"pws.adapterBaseRequired":`适配器和基本 URL 为必填项。`,"pws.addAccount":`添加账户`,"pws.addKey":`添加 API 密钥`,"pws.apiKeys":`API 密钥`,"pws.authMode":`认证方式`,"pws.availableAccounts":`可用账户`,"pws.accountOrdinal":`账户 {count}`,"pws.accountsLoading":`正在加载账户…`,"pws.accountsLoadFailed":`无法加载账户。`,"pws.retryAccounts":`重试`,"pws.noAccounts":`尚未连接任何账户。`,"pws.accountSwitching":`切换中…`,"pws.accountCurrent":`当前账户`,"pws.defaultModelNone":`无(使用提供商默认值)`,"pws.discardSettings":`放弃`,"pws.jsonEditorDesc":`直接编辑提供商 JSON 配置。更改将立即保存。`,"pws.jsonEditorTitle":`JSON 编辑器 — {name}`,"pws.jsonRestore":`恢复`,"pws.jsonSave":`保存`,"pws.loggedInTitle":`已登录`,"pws.notLoggedInTitle":`未登录`,"pws.note":`备注`,"pws.optionalPlaceholder":`可选`,"pws.providerId":`提供商 ID`,"pws.reauth":`需要重新认证`,"pws.removeConfirm":`移除`,"pws.removeConfirmBody":`移除提供商「{name}」?此操作无法撤消。`,"pws.removeConfirmTitle":`移除提供商`,"pws.saveSettings":`保存`,"pws.saving":`保存中…`,"pws.settingsSaved":`设置已保存。`,"pws.settingsUnsavedBar":`有未保存的更改。`,"pws.unsavedLeaveBody":`有未保存的更改。离开前保存吗?`,"pws.unsavedLeaveTitle":`未保存的更改`,"pws.updatesUnavailable":`提供商更新不可用。`,"pws.dashboard.title":`提供商概览`,"pws.dashboard.subtitle":`在一个地方管理所有模型提供商。`,"pws.dashboard.rateLimits":`速率限制`,"pws.dashboard.recentlyUsed":`最近使用`,"pws.dashboard.requests":`{count} 个请求`,"pws.dashboard.checkedAgo":`{time} 前检查`,"pws.dashboard.noQuota":`无配额数据`,"pws.dashboard.noUsage":`暂无使用数据`,"pws.allProviders":`提供商概览`,"pws.enabledLabel":`已启用`,"pws.testConnection":`测试连接`,"pws.testing":`测试中…`,"pws.connectionOk":`连接成功`,"pws.connectionFailed":`连接失败`,"pws.editSettings":`编辑设置`,"pws.viewUsage":`查看详细用量`,"pws.allSystemsOk":`所有系统正常运行`,"pws.apiKeyConfigured":`API 密钥已配置`,"pws.addApiKey":`添加 API 密钥`,"pws.loggedInAs":`已登录为 {email}`,"pws.notLoggedIn":`未登录`,"pws.passthrough":`Codex 透传`,"pws.notes":`备注`,"pws.notePlaceholder":`添加关于此提供商的备注...`,"pws.noteSaved":`备注已保存`,"pws.authSummary":`认证`,"time.justNow":`刚刚`,"time.notChecked":`未检查`,"time.minutesAgo":`{n} 分钟前`,"time.hoursAgo":`{n} 小时前`,"time.daysAgo":`{n} 天前`,"modal.noMatch":`无匹配。`,"modal.oauthDefaultNote":`使用账户登录 — 无需 API 密钥。`,"modal.oauthComingSoon":`{label} 的 OAuth 登录将在下次更新提供。请先使用 API 密钥。`,"modal.oauthComingSoonShort":`此提供方的 OAuth 登录将在下次更新提供 — 请先使用 API 密钥。`,"modal.useApiKeyInstead":`改用 API 密钥`,"modal.setupGuide":`设置指南`,"modal.setupStep1Prefix":`前往`,"modal.setupDashboardLink":`{label} 控制台`,"modal.setupStep1Suffix":`并复制 API 密钥`,"modal.setupStep2":`粘贴到下方的 API 密钥字段`,"modal.setupStep3":`点击添加提供方 — 模型会自动发现`,"modal.namePlaceholder":`例如 openrouter`,"modal.duplicateWarn":`提供方 "{name}" 已存在,将被覆盖。`,"modal.forwardHintPrefix":`无需密钥 — 代理会转发你的`,"modal.forwardCredentials":`codex login`,"modal.forwardHintSuffix":`凭据到此提供方。`,"modal.localHint":`不会存储 API 密钥。这会为 Codex 添加 Cursor 的公开模型目录,但在审计完成前,实时 Cursor 传输与原生文件/Shell 执行仍保持禁用。`,"modal.getApiKey":`获取 {label} API 密钥`,"modal.apiKey":`API 密钥`,"modal.apiKeyPlaceholder":`sk-…(或 $ENV_VAR)`,"modal.defaultModelPlaceholder":`例如 gpt-5.5`,"modal.baseUrlPlaceholder":`https://...`,"modal.adding":`正在添加…`,"modal.useOauthLogin":`← 使用 OAuth 登录`,"codexAuth.addIdPlaceholder":`codex-work, codex-alt, team…`,"codexAuth.resetCreditsAria":`{count} 个重置额度`,"claude.pageTitle":`Claude Code`,"cws.loading":`正在加载组合…`,"cws.loadFailed":`无法加载组合。`,"cws.saveFailed":`无法保存组合。`,"cws.removeFailed":`无法删除组合。`,"cws.saved":`组合已保存。`,"cws.created":`已创建 {model}。`,"cws.removed":`已删除 combo/{id}。`,"cws.add":`添加组合`,"cws.addTitle":`添加组合`,"cws.addSubtitle":`创建可跨多个提供方分发的虚拟模型。客户端请求 combo/<id>。`,"cws.create":`创建组合`,"cws.railAria":`组合列表`,"cws.searchPlaceholder":`搜索组合或目标…`,"cws.noSearchResults":`没有匹配的组合。`,"cws.group.failover":`故障转移`,"cws.group.roundRobin":`轮询`,"cws.targetCount":`{count} 个目标`,"cws.targetCountOne":`1 个目标`,"cws.overviewTitle":`组合`,"cws.overviewBlurb":`可在提供方/模型目标间故障转移,或采用确定性平滑加权轮询的虚拟模型。`,"cws.count.total":`总计`,"cws.count.failover":`故障转移`,"cws.count.roundRobin":`轮询`,"cws.howTitle":`工作原理`,"cws.howBody":`在 Codex 中请求 combo/<id>。OpenCodex 仅在可重试的上游错误时切换目标。若没有可用目标,请求会直接失败,不会回退到全局默认提供方。`,"cws.attentionTitle":`需要关注`,"cws.attention.empty":`未配置目标`,"cws.attention.few":`只有一个目标 — 故障转移无处可跳`,"cws.emptyTitle":`创建第一个组合`,"cws.empty.createDesc":`命名虚拟模型并串联两个或多个后端。`,"cws.backToAll":`返回全部组合`,"cws.allCombos":`全部组合`,"cws.copyModel":`复制 ID`,"cws.copied":`已复制`,"cws.tab.config":`配置`,"cws.tab.about":`关于`,"cws.strategy":`策略`,"cws.strategy.failover":`故障转移`,"cws.strategy.roundRobin":`轮询`,"cws.strategy.failoverHint":`按顺序尝试目标。若出现可重试错误(限流、故障、订阅门控),则跳到下一个。`,"cws.strategy.roundRobinHint":`按权重确定性地分配流量。将所选目标保留一批成功请求后,再推进到下一个目标。`,"cws.field.id":`组合 ID`,"cws.field.idPlaceholder":`free`,"cws.field.idHint":`客户端将请求 {model}`,"cws.field.stickyLimit":`轮换前的粘性成功次数`,"cws.field.stickyLimitHint":`加权选择器推进前,将所选目标保留这么多次成功请求。`,"cws.field.defaultEffort":`默认推理级别`,"cws.field.defaultEffortHint":`仅在客户端未指定推理级别时使用。客户端值优先,每个目标会按自身能力进行处理。`,"cws.targets":`目标`,"cws.targets.failoverHint":`顺序很重要 — 第一个为主。`,"cws.targets.roundRobinHint":`权重控制确定性的相对选择;顺序用于打破轮换环中的平局。`,"cws.target.provider":`提供方`,"cws.target.model":`模型`,"cws.target.weight":`权重`,"cws.target.pickProvider":`选择提供方…`,"cws.target.pickProviderFirst":`请先选择提供方…`,"cws.target.pickModel":`选择模型…`,"cws.target.noModels":`该提供方没有模型`,"cws.target.modelPlaceholder":`模型 ID`,"cws.target.add":`添加目标`,"cws.target.drag":`拖动以重新排序`,"cws.target.moveUp":`上移`,"cws.target.moveDown":`下移`,"cws.aboutTitle":`运行时`,"cws.aboutBody":`失败目标会短暂冷却并遵循 Retry-After。无效请求与上下文错误不会切换。每个目标按自身能力调整推理级别;所有目标耗尽时直接失败。日志与用量会保留有序的实际尝试及每次尝试的用量。`,"cws.removeConfirmTitle":`删除 {model}?`,"cws.removeConfirmDesc":`从配置与 Codex 目录移除该虚拟模型,不会删除任何提供方。`,"cws.unsavedTitle":`未保存的更改`,"cws.unsavedDesc":`丢弃对此组合的编辑并继续?`,"cws.keepEditing":`继续编辑`,"cws.err.missingId":`需要组合 ID。`,"cws.err.invalidId":`ID 须以字母或数字开头,仅含字母、数字、点、下划线或连字符(最多 64)。`,"cws.err.duplicateId":`已存在相同 ID 的组合。`,"cws.err.noTargets":`至少添加一个目标。`,"cws.err.incompleteTarget":`每个目标都需要提供方和模型。`,"cws.target.disabled":`{name}(已禁用)`,"cws.err.reservedNamespace":`创建组合前,请先重命名名为 combo 的实体提供方。`,"cws.err.providerCollision":`组合 ID 与已配置的提供方名称冲突。`,"cws.err.unknownProvider":`每个目标都必须使用已配置的提供方。`,"cws.err.duplicateTarget":`同一提供方/模型目标只能出现一次。`,"cws.err.invalidStickyLimit":`粘性成功次数必须是 1 到 100 的整数。`,"cws.err.invalidWeight":`每个轮询权重必须是 1 到 10000 的整数。`,"cws.err.noEnabledTarget":`至少一个目标必须使用已启用的提供方。`}},ye=[{code:`en`,name:`English`,htmlLang:`en`},{code:`de`,name:`Deutsch`,htmlLang:`de`},{code:`ko`,name:`한국어`,htmlLang:`ko`},{code:`zh`,name:`中文`,htmlLang:`zh-CN`}],be=`ocx-lang`;function xe(){try{let e=localStorage.getItem(be);if(e===`en`||e===`de`||e===`ko`||e===`zh`)return e}catch{}let e=typeof navigator<`u`?navigator.language.toLowerCase():`en`;return e.startsWith(`de`)?`de`:e.startsWith(`ko`)?`ko`:e.startsWith(`zh`)?`zh`:`en`}var Se=(0,_.createContext)(null);function Ce(e,t){if(!t)return e;let n=e;for(let e of Object.keys(t))n=n.split(`{${e}}`).join(String(t[e]));return n}function H(){let e=(0,_.useContext)(Se);if(!e)throw Error(`useI18n must be used within LanguageProvider`);return e}function U(){return H().t}function we({children:e}){let[t,n]=(0,_.useState)(xe);return(0,_.useEffect)(()=>{let e=ye.find(e=>e.code===t)??ye[0];document.documentElement.lang=e.htmlLang;try{localStorage.setItem(`ocx-lang`,t)}catch{}},[t]),(0,S.jsx)(Se.Provider,{value:{locale:t,setLocale:n,t:(e,n)=>Ce(ve[t][e]??_e[e]??e,n)},children:e})}function Te({k:e,cmd:t,vars:n}){let{t:r}=H(),[i,a=``]=r(e,n).split(`{cmd}`);return(0,S.jsxs)(S.Fragment,{children:[i,(0,S.jsx)(`code`,{className:`chip`,children:t}),a]})}var Ee={ko:[{v:0x2386f26fc10000,s:`경`},{v:0xe8d4a51000,s:`조`},{v:1e8,s:`억`},{v:1e4,s:`만`}],zh:[{v:0x2386f26fc10000,s:`京`},{v:0xe8d4a51000,s:`兆`},{v:1e8,s:`亿`},{v:1e4,s:`万`}]};function De(e){return e.replace(/\.0+$/,``).replace(/(\.\d*?)0+$/,`$1`)}function Oe(e,t){let n=Ee[t];if(n){for(let t of n)if(e>=t.v)return`${De((e/t.v).toFixed(1))}${t.s}`;return String(e)}return e<1e4?String(e):e<1e6?`${De((e/1e3).toFixed(1))}K`:e<1e9?`${De((e/1e6).toFixed(1))}M`:e<0xe8d4a51000?`${De((e/1e9).toFixed(1))}B`:`${De((e/0xe8d4a51000).toFixed(1))}T`}function ke({on:e,onClick:t,disabled:n,label:r}){return(0,S.jsx)(`button`,{type:`button`,className:`switch${e?` on`:``}`,onClick:t,disabled:n,"aria-pressed":e,"aria-label":r??(e?`enabled`:`disabled`),children:(0,S.jsx)(`span`,{className:`knob`})})}function W({tone:e,children:t}){return(0,S.jsxs)(`div`,{className:`notice ${e===`ok`?`notice-ok`:`notice-err`}`,role:`status`,children:[e===`ok`?(0,S.jsx)(M,{}):(0,S.jsx)(I,{}),(0,S.jsx)(`span`,{children:t})]})}function G({value:e,options:t,onChange:n,disabled:r,label:i,style:a,align:o,placement:s,dropdownStyle:c}){let[l,u]=(0,_.useState)(!1),d=(0,_.useRef)(null),f=t.find(t=>t.value===e);return(0,_.useEffect)(()=>{if(!l)return;let e=e=>{d.current&&!d.current.contains(e.target)&&u(!1)},t=e=>{e.key===`Escape`&&u(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[l]),(0,S.jsxs)(`div`,{ref:d,className:`custom-select`,style:{position:`relative`,display:`inline-block`,...a},children:[(0,S.jsxs)(`button`,{type:`button`,className:`select-trigger`,onClick:()=>!r&&u(e=>!e),disabled:r,"aria-haspopup":`listbox`,"aria-expanded":l,"aria-label":i,children:[(0,S.jsx)(`span`,{children:f?.label??e}),(0,S.jsx)(z,{style:{width:12,height:12,color:`var(--muted)`,transform:l?`rotate(90deg)`:`none`,transition:`transform .12s`}})]}),l&&(0,S.jsx)(`div`,{className:`select-dropdown${o===`right`?` select-dropdown-right`:``}${s===`right`?` select-dropdown-beside`:``}`,role:`listbox`,"aria-label":i,style:c,children:t.map(t=>(0,S.jsx)(`button`,{type:`button`,role:`option`,"aria-selected":t.value===e,className:`select-option${t.value===e?` active`:``}`,onClick:()=>{n(t.value),u(!1)},children:t.label},t.value))})]})}function Ae({icon:e,title:t,children:n,className:r,style:i}){return(0,S.jsxs)(`div`,{className:r?`empty ${r}`:`empty`,style:i,children:[e,(0,S.jsx)(`div`,{className:`title`,children:t}),n&&(0,S.jsx)(`div`,{className:`text-control`,children:n})]})}var je=[`low`,`medium`,`high`,`xhigh`],Me=2,Ne=800;function Pe(e){return e?.includes(`-preview.`)?`preview`:`latest`}function Fe(e,t){switch(e){case`source_checkout`:return t(`dash.updateReason.source_checkout`);case`latest_unavailable`:return t(`dash.updateReason.latest_unavailable`);case`already_latest`:return t(`dash.updateReason.already_latest`);default:return t(`dash.updateReason.unknown`)}}function Ie(e,t){switch(e){case`running`:return t(`dash.updateStatus.running`);case`restarting`:return t(`dash.updateStatus.restarting`);case`succeeded`:return t(`dash.updateStatus.succeeded`);case`failed`:return t(`dash.updateStatus.failed`)}}function Le(e,t){let n={...e};return t?.model!==void 0&&(n.model=t.model),t?.backend===null?delete n.backend:t?.backend!==void 0&&(n.backend=t.backend),n}function Re(e){return e.filter(e=>e.provider===`openai`||e.provider===`anthropic`).map(e=>({value:e.id,label:`${e.provider}/${e.id}`}))}function ze(e,t){return e.find(e=>e.id===t)?.provider===`anthropic`?`anthropic`:`openai`}var Be=!1;typeof window<`u`&&(window.addEventListener(`keydown`,()=>{Be=!0},{capture:!0,passive:!0}),window.addEventListener(`pointerdown`,()=>{Be=!1},{capture:!0,passive:!0}));function Ve(e){if(e){if(Be){e.focus({preventScroll:!0});return}try{e.focus({preventScroll:!0,focusVisible:!1})}catch{e.focus({preventScroll:!0})}}}function He(e,t){let n=(0,_.useRef)(null);return(0,_.useEffect)(()=>{let r=n.current;if(r){if(e){r.open||r.showModal();return}r.open&&r.close(),Ve(t.current)}},[e,t]),(0,_.useEffect)(()=>()=>{let e=n.current;e?.open&&e.close(),Ve(t.current)},[t]),n}function Ue({apiBase:e}){let{locale:t,t:n}=H(),[r,i]=(0,_.useState)(null),[a,o]=(0,_.useState)([]),[s,c]=(0,_.useState)([]),[l,u]=(0,_.useState)(null),[d,f]=(0,_.useState)(null),[p,m]=(0,_.useState)(null),[h,g]=(0,_.useState)(null),[v,y]=(0,_.useState)(!1),[x,C]=(0,_.useState)(!1),[w,T]=(0,_.useState)(!1),[E,D]=(0,_.useState)(!1),[O,k]=(0,_.useState)(!1),[A,j]=(0,_.useState)(`default`),[M,P]=(0,_.useState)(!1),[F,te]=(0,_.useState)(!1),[ne,R]=(0,_.useState)(!1),[z,B]=(0,_.useState)(``),[re,ae]=(0,_.useState)(``),[oe,se]=(0,_.useState)([]),[ce,le]=(0,_.useState)([]),[V,ue]=(0,_.useState)(!1),[de,fe]=(0,_.useState)(``),[pe,me]=(0,_.useState)(``),[he,ge]=(0,_.useState)(!1),[_e,ve]=(0,_.useState)(null),[ye,be]=(0,_.useState)(null),[xe,Se]=(0,_.useState)([]),[Ce,U]=(0,_.useState)(!1),[we,Ee]=(0,_.useState)(`latest`),[De,ke]=(0,_.useState)(!0),[W,Be]=(0,_.useState)(!1),Ve=(0,_.useRef)(0),Ue=(0,_.useRef)(null),We=(0,_.useRef)(0),[Ge,Ke]=(0,_.useState)(null),[qe,Je]=(0,_.useState)(null),[Ye,Xe]=(0,_.useState)(null),[Ze,Qe]=(0,_.useState)(!1),[$e,et]=(0,_.useState)(!1),tt=(0,_.useRef)(null),nt=(0,_.useRef)(null),rt=(0,_.useRef)(null),it=He(ne,tt),at=He(Ce,nt),ot=He(F,rt);(0,_.useEffect)(()=>()=>{We.current+=1,Ue.current!==null&&(window.clearTimeout(Ue.current),Ue.current=null)},[]),(0,_.useEffect)(()=>{let t=async()=>{try{let[t,n,r,a,s,c]=await Promise.all([fetch(`${e}/healthz`),fetch(`${e}/api/providers`),fetch(`${e}/api/settings`),fetch(`${e}/api/sidecar-settings`),fetch(`${e}/api/shadow-call-settings`),fetch(`${e}/api/usage?range=30d`)]);i(await t.json()),o(await n.json()),u(await r.json()),f(await a.json());try{s.ok&&m(await s.json())}catch{m(null)}try{g(c.ok?await c.json():null)}catch{g(null)}et(!1);try{let t=await fetch(`${e}/api/v2`);if(t.ok){let e=await t.json();e.multiAgentMode===`v1`||e.multiAgentMode===`v2`?j(e.multiAgentMode):j(`default`)}}catch{}try{let t=await fetch(`${e}/api/injection-model`);if(t.ok){let e=await t.json();B(e.model??``),ae(e.effort??``),se(e.efforts??[]),le(e.available??[])}}catch{}try{let t=await fetch(`${e}/api/effort-caps`);if(t.ok){let e=await t.json();fe(e.effortCap??``),me(e.subagentEffortCap??``)}}catch{}}catch{et(!0)}};t();let n=setInterval(t,5e3);return()=>clearInterval(n)},[e]),(0,_.useEffect)(()=>{let t=async()=>{try{let t=await fetch(`${e}/api/diagnostics/project-config`);Se((t.ok?await t.json():null)?.grouped??[])}catch{Se([])}};t();let n=setInterval(()=>void t(),3e4);return()=>clearInterval(n)},[e]);let st=(0,_.useCallback)(async()=>{T(!0);try{c(await(await fetch(`${e}/api/models`)).json())}catch{}finally{T(!1)}},[e]);(0,_.useEffect)(()=>{if($e)return;let e=window.setTimeout(()=>{st()},0);return()=>window.clearTimeout(e)},[$e,st]),(0,_.useEffect)(()=>{if(!Ye?.id||!Ye.restart)return;let t=!1,n=Ye.latestVersion,r=async()=>{try{let n=await fetch(`${e}/api/update/status?jobId=${encodeURIComponent(Ye.id)}`);if(n.ok){let e=await n.json();if(!t&&e.job&&(Xe(e.job),e.job.status===`failed`)){Qe(!1);return}}}catch{t||Qe(!0)}if(n)try{let r=await fetch(`${e}/healthz`,{cache:`no-store`});if(!r.ok)throw Error(`health failed`);let i=await r.json();!t&&i.version===n&&(Qe(!1),window.location.reload())}catch{t||Qe(!0)}};r();let i=setInterval(r,1500);return()=>{t=!0,clearInterval(i)}},[e,Ye?.id,Ye?.latestVersion,Ye?.restart]);let ct=(0,_.useMemo)(()=>{let e={};for(let t of s)(e[t.provider]??=[]).push(t);return Object.entries(e).sort(([e],[t])=>e.localeCompare(t))},[s]),lt=(0,_.useMemo)(()=>Re(s),[s]);if($e)return(0,S.jsx)(Ae,{style:{marginTop:40},icon:(0,S.jsx)(I,{}),title:(0,S.jsx)(`span`,{style:{color:`var(--red)`},children:n(`dash.cannotConnect`)}),children:(0,S.jsx)(Te,{k:`dash.runStart`,cmd:`ocx start`})});let ut=r?.status===`ok`,dt=async t=>{if(!d||v)return;let n={webSearch:Le(d.webSearch,t.webSearch),vision:Le(d.vision,t.vision)};y(!0),f(n);try{let n=await fetch(`${e}/api/sidecar-settings`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok)throw Error(`save failed`);let r=await n.json();f({webSearch:r.webSearch,vision:r.vision})}catch{f(d)}finally{y(!1)}};async function ft(t){if(!(!p||x)){C(!0),m({...p,...t});try{await fetch(`${e}/api/shadow-call-settings`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)})}finally{C(!1)}}}let pt=async t=>{if(!(M||A===t)){P(!0);try{(await fetch(`${e}/api/v2`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({multiAgentMode:t})})).ok&&j(t)}catch{}finally{P(!1)}}},mt=async()=>{if(!l||E)return;let t=!l.codexAutoStart;D(!0),u({...l,codexAutoStart:t});try{let n=await fetch(`${e}/api/settings`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({codexAutoStart:t})});if(!n.ok)throw Error(`save failed`);let r=await n.json();u(e=>e&&{...e,codexAutoStart:r.codexAutoStart})}catch{u(e=>e&&{...e,codexAutoStart:!t}),et(!0)}finally{D(!1)}},ht=async()=>{if(!O){k(!0),ve(null),be(null);try{let t=await fetch(`${e}/api/sync`,{method:`POST`}),n=await t.json();if(!t.ok)throw Error(`error`in n&&n.error?n.error:`sync failed`);ve(n);let r=n.projectConfigGrouped;r&&Se(r)}catch(e){be(e instanceof Error?e.message:String(e))}finally{k(!1)}}},gt=async(t,n=!1)=>{n&&(Ve.current=0),Ue.current!==null&&(window.clearTimeout(Ue.current),Ue.current=null);let r=++We.current;Be(!0),Je(null),Ke(null);try{let n=await fetch(`${e}/api/update/check?tag=${t}`),i=await n.json();if(!n.ok)throw Error(`error`in i&&i.error?i.error:`update check failed`);if(r!==We.current)return;let a=i;if(Ke(a),a.reason===`latest_unavailable`&&Ve.current<Me){let e=++Ve.current;Ue.current=window.setTimeout(()=>{r===We.current&&(Ue.current=null,gt(t))},Ne*e);return}a.reason!==`latest_unavailable`&&(Ve.current=0),Be(!1)}catch(e){if(r!==We.current)return;Je(e instanceof Error?e.message:String(e)),Be(!1)}},_t=()=>{We.current+=1,Ue.current!==null&&(window.clearTimeout(Ue.current),Ue.current=null),Be(!1),U(!1)},vt=()=>{let e=Pe(r?.version);Ee(e),ke(!0),U(!0),gt(e,!0)},yt=e=>{Ee(e),gt(e,!0)},bt=async()=>{if(Ge?.canUpdate){Je(null);try{let t=await fetch(`${e}/api/update/run`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({tag:we,restart:De})}),n=await t.json();if(!t.ok||!n.job)throw Error(n.error??`update failed to start`);Xe(n.job),Qe(!1),_t()}catch(e){Je(e instanceof Error?e.message:String(e))}}};return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`div`,{className:`page-head`,children:(0,S.jsx)(`h2`,{children:n(`nav.dashboard`)})}),(0,S.jsx)(`p`,{className:`page-sub`,children:n(`dash.subtitle`)}),(0,S.jsxs)(`div`,{className:`stat-row`,children:[(0,S.jsxs)(`div`,{className:`stat`,children:[(0,S.jsxs)(`div`,{className:`label`,style:{display:`flex`,alignItems:`center`,gap:6},children:[n(`dash.multiAgent`),(0,S.jsx)(`button`,{ref:rt,type:`button`,className:`btn btn-ghost btn-sm`,style:{width:24,height:24,minWidth:24,flex:`0 0 24px`,padding:0,borderRadius:`var(--radius-pill)`,color:`var(--muted)`},onClick:()=>te(!0),"aria-label":n(`dash.multiAgent`),"aria-haspopup":`dialog`,"aria-controls":`multi-agent-help-dialog`,"aria-expanded":F,children:(0,S.jsx)(L,{width:14,height:14,"aria-hidden":`true`})})]}),(0,S.jsx)(`div`,{className:`value`,style:{display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,S.jsx)(`div`,{role:`radiogroup`,"aria-label":n(`dash.multiAgent`),style:{display:`inline-flex`,borderRadius:`var(--radius-pill)`,background:`var(--surface-soft, var(--raised))`,padding:3,gap:2},children:[`v1`,`default`,`v2`].map(e=>(0,S.jsx)(`button`,{type:`button`,role:`radio`,"aria-checked":A===e,className:`btn btn-sm text-caption${A===e?` btn-primary`:` btn-ghost`}`,style:{borderRadius:`var(--radius-pill)`,minWidth:36,padding:`5px 10px`,border:`none`,background:A===e?void 0:`transparent`,color:A===e?void 0:`var(--muted)`},disabled:M,onClick:()=>void pt(e),children:e==="default"?`base`:e},e))})})]}),(0,S.jsxs)(`div`,{className:`stat`,children:[(0,S.jsx)(`div`,{className:`label`,children:n(`dash.status`)}),(0,S.jsxs)(`div`,{className:`value`,style:{display:`flex`,alignItems:`center`,gap:9,color:ut?`var(--green)`:`var(--red)`},children:[(0,S.jsx)(`span`,{className:`dot ${ut?`dot-green`:`dot-red`}`}),n(ut?`dash.online`:`dash.offline`)]})]}),(0,S.jsxs)(`div`,{className:`stat`,children:[(0,S.jsx)(`div`,{className:`label`,children:n(`dash.version`)}),(0,S.jsx)(`div`,{className:`value mono`,children:r?.version??`—`})]}),(0,S.jsxs)(`div`,{className:`stat`,children:[(0,S.jsx)(`div`,{className:`label`,children:n(`dash.uptime`)}),(0,S.jsx)(`div`,{className:`value mono`,children:r?b(r.uptime,t):`—`})]}),(0,S.jsxs)(`div`,{className:`stat`,children:[(0,S.jsx)(`div`,{className:`label`,children:n(`dash.providers`)}),(0,S.jsx)(`div`,{className:`value`,children:a.length})]}),(0,S.jsxs)(`div`,{className:`stat`,children:[(0,S.jsx)(`div`,{className:`label`,children:n(`dash.tokens30d`)}),(0,S.jsx)(`div`,{className:`value mono`,children:h&&h.summary.requests>0?Oe(h.summary.totalTokens,t):`—`}),h&&h.summary.requests>0&&(0,S.jsx)(`div`,{className:`muted text-label`,style:{marginTop:2},children:n(`dash.coverage`).replace(`{pct}`,`${Math.round(h.summary.coverageRatio*100)}%`)})]})]}),xe.length>0&&(0,S.jsxs)(`div`,{className:`notice notice-err maintenance-notice`,style:{marginBottom:24},role:`alert`,children:[(0,S.jsx)(I,{}),(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`div`,{className:`font-semibold`,children:n(`dash.projectConfigTitle`)}),(0,S.jsx)(`div`,{className:`muted text-control`,style:{marginTop:4},children:n(`dash.projectConfigHint`)}),(0,S.jsx)(`ul`,{className:`text-control`,style:{margin:`10px 0 0`,paddingLeft:18},children:xe.map(e=>(0,S.jsxs)(`li`,{style:{marginBottom:8},children:[(0,S.jsx)(`code`,{children:e.path}),` — `,e.issues.join(`, `),(0,S.jsx)(`div`,{className:`muted`,style:{marginTop:2},children:e.bypass})]},e.path))})]})]}),A!==`v1`&&(0,S.jsx)(`div`,{className:`panel`,style:{marginBottom:24},children:(0,S.jsxs)(`div`,{className:`injection-head`,children:[(0,S.jsxs)(`span`,{className:`injection-label`,style:{display:`inline-flex`,alignItems:`center`,gap:6},children:[n(`dash.effortCapLabel`),(0,S.jsxs)(`span`,{style:{position:`relative`,display:`inline-flex`},children:[(0,S.jsx)(`button`,{ref:tt,type:`button`,className:`btn btn-ghost btn-sm`,style:{width:22,height:22,minWidth:22,padding:0,borderRadius:`var(--radius-pill)`,color:`var(--muted)`},onClick:()=>R(e=>!e),"aria-label":n(`dash.effortCapLabel`),"aria-expanded":ne,"aria-haspopup":`dialog`,"aria-controls":`effort-cap-help-dialog`,children:(0,S.jsx)(L,{width:13,height:13,"aria-hidden":`true`})}),(0,S.jsxs)(`dialog`,{ref:it,id:`effort-cap-help-dialog`,className:`help-popup text-control font-regular leading-body`,style:{position:`absolute`,top:`calc(100% + 8px)`,left:0,width:`min(360px, calc(100vw - 48px))`,margin:0,padding:`12px 16px`,border:`1px solid var(--border)`,borderRadius:`var(--radius-sm)`,background:`var(--bg)`,boxShadow:`0 8px 24px rgba(0, 0, 0, 0.14)`,color:`var(--text)`,zIndex:10},"aria-labelledby":`effort-cap-help-text`,onCancel:e=>{e.preventDefault(),R(!1)},children:[(0,S.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-icon`,style:{position:`absolute`,top:4,right:4,width:24,height:24,minWidth:24},onClick:()=>R(!1),"aria-label":n(`common.close`),children:(0,S.jsx)(N,{width:14,height:14})}),(0,S.jsx)(`div`,{id:`effort-cap-help-text`,style:{paddingRight:16},children:n(`dash.effortCapHelp`)})]})]})]}),(0,S.jsx)(G,{value:de,options:[{value:``,label:n(`dash.effortCapNone`)},...je.map(e=>({value:e,label:e}))],onChange:async t=>{if(!he){ge(!0);try{let n=await fetch(`${e}/api/effort-caps`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({effortCap:t||null})});if(n.ok){let e=await n.json();fe(e.effortCap??``),me(e.subagentEffortCap??``)}}catch{}finally{ge(!1)}}},disabled:he,label:n(`dash.effortCapLabel`)}),(0,S.jsx)(G,{value:pe,options:[{value:``,label:n(`dash.effortCapNone`)},...je.map(e=>({value:e,label:e}))],onChange:async t=>{if(!he){ge(!0);try{let n=await fetch(`${e}/api/effort-caps`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({subagentEffortCap:t||null})});if(n.ok){let e=await n.json();fe(e.effortCap??``),me(e.subagentEffortCap??``)}}catch{}finally{ge(!1)}}},disabled:he,label:n(`dash.subagentEffortCapLabel`)})]})}),(0,S.jsxs)(`div`,{className:`panel`,style:{marginBottom:24},children:[(0,S.jsxs)(`div`,{className:`injection-head`,children:[(0,S.jsx)(`span`,{className:`injection-label`,children:n(`dash.injectionLabel`)}),(0,S.jsx)(G,{value:z,options:[{value:``,label:n(`dash.injectionNone`)},...ce.map(e=>({value:e.namespaced,label:`${e.provider} / ${e.model}`}))],onChange:async t=>{if(!V){ue(!0);try{let n=await fetch(`${e}/api/injection-model`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({model:t||null,effort:re||null})});if(n.ok){let e=await n.json();B(e.model??``),ae(e.effort??``)}}catch{}finally{ue(!1)}}},disabled:V,label:n(`dash.injectionLabel`)}),z&&oe.length>0&&(0,S.jsx)(G,{value:re,options:[{value:``,label:n(`dash.injectionEffortNone`)},...oe.map(e=>({value:e,label:e}))],onChange:async t=>{if(!V){ue(!0);try{let n=await fetch(`${e}/api/injection-model`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({model:z||null,effort:t||null})});if(n.ok){let e=await n.json();B(e.model??``),ae(e.effort??``)}}catch{}finally{ue(!1)}}},disabled:V,label:n(`dash.injectionEffortLabel`)}),z&&(0,S.jsx)(`span`,{className:`badge badge-green text-micro`,children:n(`dash.injectionActive`)})]}),(0,S.jsx)(`div`,{className:`muted text-control`,style:{marginTop:6},children:n(`dash.injectionHint`)})]}),(0,S.jsxs)(`div`,{className:`panel maintenance-panel`,style:{marginBottom:24},children:[(0,S.jsxs)(`div`,{className:`spread maintenance-head`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`div`,{className:`font-semibold`,children:n(`dash.maintenance`)}),(0,S.jsx)(`div`,{className:`muted text-control`,style:{marginTop:3},children:n(`dash.maintenanceHint`)})]}),(0,S.jsxs)(`div`,{className:`maintenance-actions`,children:[(0,S.jsxs)(`button`,{type:`button`,className:`btn btn-ghost`,onClick:ht,disabled:O,children:[(0,S.jsx)(ee,{}),` `,n(O?`dash.syncing`:`dash.syncModels`)]}),(0,S.jsxs)(`button`,{ref:nt,type:`button`,className:`btn btn-primary`,onClick:vt,disabled:W,"aria-haspopup":`dialog`,"aria-controls":`dashboard-update-dialog`,"aria-expanded":Ce,children:[(0,S.jsx)(ie,{}),` `,n(`dash.checkUpdate`)]})]})]}),_e&&(0,S.jsxs)(`div`,{className:`notice notice-ok maintenance-notice`,role:`status`,children:[(0,S.jsx)(ee,{}),(0,S.jsxs)(`span`,{children:[n(`dash.syncOk`,{count:_e.added}),_e.warning?` ${_e.warning}`:``,_e.staleAppServerHint?` ${n(`dash.syncStaleHint`)}`:``]})]}),ye&&(0,S.jsxs)(`div`,{className:`notice notice-err maintenance-notice`,role:`status`,children:[(0,S.jsx)(I,{}),(0,S.jsx)(`span`,{children:n(`dash.syncFailed`,{error:ye})})]}),Ye&&(0,S.jsxs)(`div`,{className:`notice ${Ye.status===`failed`?`notice-err`:`notice-ok`} maintenance-notice`,role:`status`,children:[Ye.status===`failed`?(0,S.jsx)(I,{}):(0,S.jsx)(ee,{}),(0,S.jsxs)(`span`,{children:[Ie(Ye.status,n),Ye.latestVersion?` ${Ye.currentVersion} -> ${Ye.latestVersion}.`:``,Ze?` ${n(`dash.updateReconnecting`)}`:``,Ye.error?` ${Ye.error}`:``]})]})]}),(0,S.jsx)(`div`,{className:`panel`,style:{marginBottom:24},children:(0,S.jsxs)(`div`,{className:`spread`,children:[(0,S.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,S.jsx)(`div`,{className:`font-semibold`,children:n(`dash.codexAutoStart`)}),(0,S.jsx)(`div`,{className:`muted setting-hint`,children:n(`dash.codexAutoStartHint`)})]}),(0,S.jsx)(`button`,{type:`button`,className:`switch ${l?.codexAutoStart??!0?`on`:``}`,onClick:mt,disabled:!l||E,"aria-label":n(`dash.codexAutoStart`),"aria-pressed":l?.codexAutoStart??!0,children:(0,S.jsx)(`span`,{className:`knob`})})]})}),(0,S.jsx)(`div`,{className:`panel`,style:{marginBottom:12},children:(0,S.jsxs)(`div`,{className:`spread setting-row`,style:{alignItems:`flex-start`},children:[(0,S.jsxs)(`div`,{className:`setting-copy`,style:{flex:1},children:[(0,S.jsx)(`div`,{className:`font-semibold`,children:n(`dash.webSearchSidecar`)}),(0,S.jsx)(`div`,{className:`muted setting-hint`,children:n(`dash.webSearchSidecarHint`)})]}),(0,S.jsx)(`div`,{className:`setting-controls`,children:(0,S.jsx)(G,{value:d?.webSearch.model??`gpt-5.6-luna`,options:lt,onChange:e=>{dt({webSearch:{model:e,backend:ze(s,e)}})},disabled:!d||v,label:n(`dash.sidecarModel`)})})]})}),(0,S.jsx)(`div`,{className:`panel`,style:{marginBottom:24},children:(0,S.jsxs)(`div`,{className:`spread setting-row`,children:[(0,S.jsxs)(`div`,{className:`setting-copy`,style:{flex:1},children:[(0,S.jsx)(`div`,{className:`font-semibold`,children:n(`dash.visionSidecar`)}),(0,S.jsx)(`div`,{className:`muted setting-hint`,children:n(`dash.visionSidecarHint`)})]}),(0,S.jsx)(`div`,{className:`setting-controls`,children:(0,S.jsx)(G,{value:d?.vision.model??`gpt-5.6-luna`,options:lt,onChange:e=>{dt({vision:{model:e,backend:ze(s,e)}})},disabled:!d||v,label:n(`dash.sidecarModel`)})})]})}),(0,S.jsx)(`div`,{className:`panel`,style:{marginBottom:12},children:(0,S.jsxs)(`div`,{className:`spread setting-row`,style:{alignItems:`center`},children:[(0,S.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,S.jsx)(`span`,{className:`font-semibold`,children:n(`dash.shadowCallIntercept`)}),(0,S.jsx)(`span`,{title:n(`dash.shadowCallTooltip`),style:{cursor:`help`,opacity:.5},children:`ⓘ`}),(0,S.jsx)(`code`,{className:`muted text-caption`,children:`⚠ 5.4-mini`})]}),(0,S.jsxs)(`div`,{className:`setting-controls`,style:{display:`flex`,gap:8,alignItems:`center`},children:[(0,S.jsx)(`button`,{type:`button`,className:`switch ${p?.enabled?`on`:``}`,onClick:()=>ft({enabled:!p?.enabled}),disabled:!p||x,"aria-label":n(`dash.shadowCallIntercept`),"aria-pressed":p?.enabled??!1,children:(0,S.jsx)(`span`,{className:`knob`})}),(0,S.jsx)(G,{value:p?.model??``,options:[{value:``,label:`—`},...s.map(e=>({value:e.id,label:`${e.provider}/${e.id}`}))],onChange:e=>{m(t=>t&&{...t,model:e}),ft({model:e})},disabled:!p||x||!p?.enabled,label:n(`dash.shadowCallModel`)})]})]})}),(0,S.jsxs)(`div`,{className:`h-section`,children:[n(`dash.activeProviders`),` `,(0,S.jsx)(`span`,{className:`count`,children:a.length})]}),a.length===0?(0,S.jsx)(Ae,{title:(0,S.jsx)(Te,{k:`dash.noProviders`,cmd:`ocx init`})}):(0,S.jsx)(`div`,{className:`tbl-wrap`,children:(0,S.jsxs)(`table`,{className:`tbl`,children:[(0,S.jsx)(`thead`,{children:(0,S.jsxs)(`tr`,{children:[(0,S.jsx)(`th`,{children:n(`dash.col.name`)}),(0,S.jsx)(`th`,{children:n(`dash.col.adapter`)}),(0,S.jsx)(`th`,{children:n(`dash.col.baseUrl`)}),(0,S.jsx)(`th`,{children:n(`dash.col.model`)})]})}),(0,S.jsx)(`tbody`,{children:a.map(e=>(0,S.jsxs)(`tr`,{children:[(0,S.jsx)(`td`,{className:`font-semibold`,children:e.name}),(0,S.jsx)(`td`,{children:(0,S.jsx)(`span`,{className:`chip`,children:e.adapter})}),(0,S.jsx)(`td`,{className:`muted mono text-label`,children:e.baseUrl}),(0,S.jsx)(`td`,{className:`muted`,children:e.defaultModel??`—`})]},e.name))})]})}),(0,S.jsxs)(`div`,{className:`h-section`,children:[n(`dash.availableModels`),` `,(0,S.jsx)(`span`,{className:`count`,children:s.length}),w&&(0,S.jsx)(`span`,{className:`spin`,style:{marginLeft:4}})]}),s.length===0&&!w?(0,S.jsx)(Ae,{title:n(`dash.noModels`)}):(0,S.jsx)(`div`,{className:`stack`,style:{gap:16},children:ct.map(([e,t])=>(0,S.jsxs)(`div`,{className:`model-group`,children:[(0,S.jsxs)(`div`,{className:`model-group-head`,children:[e,(0,S.jsx)(`span`,{className:`count`,children:t.length})]}),(0,S.jsx)(`div`,{className:`model-grid`,children:t.map(e=>(0,S.jsx)(`div`,{className:`model-card`,children:(0,S.jsx)(`div`,{className:`id`,children:e.id})},`${e.provider}/${e.id}`))})]},e))}),(0,S.jsx)(`dialog`,{ref:at,id:`dashboard-update-dialog`,className:`modal-overlay`,style:{display:Ce?`flex`:`none`,border:`none`,margin:0,maxWidth:`none`,maxHeight:`none`,width:`100%`,height:`100%`},"aria-labelledby":`update-title`,onCancel:e=>{e.preventDefault(),_t()},children:(0,S.jsxs)(`div`,{className:`modal-card`,children:[(0,S.jsxs)(`div`,{className:`modal-head`,children:[(0,S.jsx)(`h3`,{id:`update-title`,children:n(`dash.updateTitle`)}),(0,S.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-icon`,onClick:_t,"aria-label":n(`common.cancel`),children:(0,S.jsx)(N,{})})]}),(0,S.jsx)(`div`,{className:`modal-desc`,children:n(`dash.updateDesc`)}),(0,S.jsxs)(`div`,{className:`update-row`,children:[(0,S.jsx)(`label`,{className:`field-label`,htmlFor:`update-channel`,children:n(`dash.updateChannel`)}),(0,S.jsx)(G,{value:we,options:[{value:`latest`,label:`latest`},{value:`preview`,label:`preview`}],onChange:e=>yt(e),disabled:W,label:n(`dash.updateChannel`)})]}),W&&(0,S.jsx)(Ae,{className:`update-empty`,icon:(0,S.jsx)(`span`,{className:`spin`}),title:n(`dash.updateChecking`)}),qe&&(0,S.jsxs)(`div`,{className:`notice notice-err`,role:`status`,children:[(0,S.jsx)(I,{}),(0,S.jsx)(`span`,{children:qe})]}),Ge&&!W&&(0,S.jsxs)(`div`,{className:`update-box`,children:[(0,S.jsxs)(`div`,{className:`spread`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`div`,{className:`muted text-label`,children:n(`dash.updateInstalled`)}),(0,S.jsx)(`div`,{className:`mono`,children:Ge.currentVersion})]}),(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`div`,{className:`muted text-label`,children:n(`dash.updateLatest`)}),(0,S.jsx)(`div`,{className:`mono`,children:Ge.latestVersion??`—`})]}),(0,S.jsx)(`span`,{className:`badge ${Ge.updateAvailable?`badge-green`:`badge-muted`}`,children:Ge.updateAvailable?n(`dash.updateAvailable`):n(`dash.updateCurrent`)})]}),(0,S.jsxs)(`div`,{className:`muted update-command`,children:[n(`dash.updateCommand`),` `,(0,S.jsx)(`code`,{className:`chip`,children:Ge.command})]}),Ge.reason===`source_checkout`&&(0,S.jsxs)(`div`,{className:`notice-warn`,role:`status`,children:[(0,S.jsx)(I,{}),` `,n(`dash.updateSource`)]}),Ge.reason===`latest_unavailable`&&(0,S.jsxs)(`div`,{className:`notice-warn`,role:`status`,children:[(0,S.jsx)(I,{}),` `,n(`dash.updateUnavailable`),(0,S.jsxs)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,disabled:W,onClick:()=>{gt(we,!0)},style:{marginLeft:12},children:[(0,S.jsx)(ee,{}),` `,n(`dash.updateRetry`)]})]}),!Ge.canUpdate&&Ge.reason!==`latest_unavailable`&&Ge.reason!==`source_checkout`&&(0,S.jsxs)(`div`,{className:`update-recheck`,children:[(0,S.jsx)(`span`,{className:`muted update-recheck-reason`,children:n(`dash.updateCannotAuto`,{reason:Fe(Ge.reason,n)})}),(0,S.jsxs)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,disabled:W,onClick:()=>{gt(we,!0)},children:[(0,S.jsx)(ee,{}),` `,n(W?`dash.updateChecking`:`dash.updateRecheck`)]})]}),Ge.canUpdate&&(0,S.jsxs)(`div`,{className:`spread update-restart`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`div`,{className:`font-semibold`,children:n(`dash.updateRestart`)}),(0,S.jsx)(`div`,{className:`muted text-label`,children:n(`dash.updateRestartHint`)})]}),(0,S.jsx)(`button`,{type:`button`,className:`switch ${De?`on`:``}`,onClick:()=>ke(e=>!e),"aria-label":n(`dash.updateRestart`),"aria-pressed":De,children:(0,S.jsx)(`span`,{className:`knob`})})]})]}),(0,S.jsxs)(`div`,{className:`modal-actions`,children:[(0,S.jsx)(`button`,{type:`button`,className:`btn btn-ghost`,onClick:_t,children:n(`common.cancel`)}),(0,S.jsx)(`button`,{type:`button`,className:`btn btn-primary`,onClick:bt,disabled:!Ge?.canUpdate||W,children:n(`dash.runUpdate`)})]})]})}),(0,S.jsx)(`dialog`,{ref:ot,id:`multi-agent-help-dialog`,className:`modal-overlay`,style:{display:F?`flex`:`none`,border:`none`,margin:0,maxWidth:`none`,maxHeight:`none`,width:`100%`,height:`100%`},"aria-labelledby":`multi-agent-help-title`,onCancel:e=>{e.preventDefault(),te(!1)},onClick:e=>{e.target===e.currentTarget&&te(!1)},children:(0,S.jsxs)(`div`,{className:`modal-card`,onClick:e=>e.stopPropagation(),children:[(0,S.jsxs)(`div`,{className:`modal-head`,children:[(0,S.jsx)(`h3`,{id:`multi-agent-help-title`,children:n(`dash.multiAgent`)}),(0,S.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-icon`,onClick:()=>te(!1),"aria-label":n(`common.close`),children:(0,S.jsx)(N,{})})]}),(0,S.jsx)(`div`,{className:`modal-desc leading-relaxed`,style:{whiteSpace:`pre-line`},children:n(`models.v2Help`)}),(0,S.jsx)(`div`,{style:{marginTop:12},children:(0,S.jsx)(`a`,{className:`text-control`,href:`https://lidge-jun.github.io/opencodex/guides/sub-agent-surface/`,target:`_blank`,rel:`noreferrer`,style:{color:`var(--accent)`},children:n(`models.v2DocsLink`)})}),(0,S.jsx)(`div`,{className:`modal-actions`,children:(0,S.jsx)(`button`,{type:`button`,className:`btn btn-primary`,onClick:()=>te(!1),children:n(`common.ok`)})})]})})]})}function We(e){return e.id===`openai`}function Ge(e){return e.id===`openai`?e.codexAccountMode===`direct`?`prov.openaiDirectDesc`:`prov.openaiPoolDesc`:null}function Ke(e){let t={adapter:e.adapter.trim(),baseUrl:e.baseUrl.trim()};return(e.authMode===`key`||e.authMode===`forward`)&&(t.authMode=e.authMode),e.authMode===`key`&&e.apiKey.trim()&&(t.apiKey=e.apiKey.trim()),e.defaultModel.trim()&&(t.defaultModel=e.defaultModel.trim()),t}function qe(e,t){if(We(e)){if(!e.provider)throw Error(`Missing canonical provider seed for ${e.id}`);return{name:e.id,provider:JSON.parse(JSON.stringify(e.provider))}}return{name:t.name.trim(),provider:Ke(t)}}var Je=`https://chatgpt.com/backend-api/codex`,Ye=`openai`;function Xe(e){try{let t=new URL(e.trim());if(t.username||t.password||t.search||t.hash)return;let n=t.pathname.replace(/\/+$/,``);return`${t.origin}${n}`}catch{return}}function Ze(e){try{let t=new URL(e).hostname.replace(/^\[|\]$/g,``).toLowerCase();return t===`localhost`||t===`127.0.0.1`||t===`::1`}catch{return!1}}function Qe(e){return e.keyOptional===!0||e.authMode===`oauth`||e.authMode===`forward`||e.authMode===`local`||Ze(e.baseUrl)||e.hasApiKey===!0}function $e(e){return e.adapter===`openai-responses`&&e.authMode===`forward`&&Xe(e.baseUrl)===Je}function et(e,t){return e===Ye&&$e(t)}function tt(e){return e.freeTier===!0||e.keyOptional===!0||e.authMode===`local`||Ze(e.baseUrl)}function nt(e,t){return et(e,t)?`accounts`:tt(t)?`free`:`paid`}function rt(e,t){let n=[...e],r=(e,t)=>e.name.localeCompare(t.name,void 0,{sensitivity:`base`}),i=e=>e.tier??nt(e.name,e);switch(t){case`az`:return n.sort(r);case`za`:return n.sort((e,t)=>r(t,e));case`free-paid`:return n.sort((e,t)=>(i(e)===`free`?0:1)-(i(t)===`free`?0:1)||r(e,t));case`paid-free`:return n.sort((e,t)=>(i(e)===`free`)-+(i(t)===`free`)||r(e,t));case`accounts-first`:return n.sort((e,t)=>{let n=e=>{let t=i(e);return t===`accounts`?0:t===`free`?1:2};return n(e)-n(t)||r(e,t)});default:return n}}function it(e){let t=[],n=[],r=[];for(let[i,a]of Object.entries(e)){if(a.disabled){r.push({name:i,...a});continue}Qe(a)?t.push({name:i,...a,tier:nt(i,a)}):n.push({name:i,...a})}return{ready:t,needsSetup:n,disabled:r}}function at(e){return e.disabled?`disabled`:Qe(e)?`ready`:`needs-setup`}function ot(e){let t=e.openai,n=e.chatgpt;if(!t||!n||!et(`openai`,t)||!$e(n))return e;let r={...e};return delete r.chatgpt,r}function st(e){return{adapter:e.adapter,baseUrl:e.baseUrl,authMode:e.auth,freeTier:!!e.freeTier,keyOptional:!!e.keyOptional}}function ct(e){return nt(e.id,st(e))}function lt(e){let t={accounts:[],free:[],paid:[]};for(let n of e)t[ct(n)].push(n);return t}function ut(e,t){let n=t.trim().toLowerCase();return n?e.filter(e=>e.label.toLowerCase().includes(n)||e.id.toLowerCase().includes(n)):e}var dt=6;function ft({presets:e,usageRank:t={},presetsLoading:n=!1,initialTier:r=`free`,onSelectPreset:i,onSelectCustom:a,accountRows:o=[],accountStatus:s={},busyProvider:c=null,onLogin:l,onCancelLogin:u,onLogout:d}){let f=U(),[p,m]=(0,_.useState)(r),[h,g]=(0,_.useState)(`home`),[v,y]=(0,_.useState)(``),b=(0,_.useRef)(null),x=(0,_.useMemo)(()=>e.filter(e=>e.id!==`custom`),[e]),C=(0,_.useMemo)(()=>[...x].sort((e,n)=>{let r=t[e.id]??0,i=t[n.id]??0;return i===r?e.label.localeCompare(n.label,void 0,{sensitivity:`base`})||e.id.localeCompare(n.id):i-r}),[x,t]),w=(0,_.useMemo)(()=>lt(C),[C])[p],T=w.slice(0,dt),E=(0,_.useMemo)(()=>ut(w,v),[w,v]),D=h===`browse`?E:T,O=()=>{g(`browse`),y(``),setTimeout(()=>b.current?.focus(),0)},k=e=>{let t=e.codexAccountMode===`direct`?(0,S.jsx)(`span`,{className:`badge badge-green`,children:f(`modal.badge.direct`)}):e.codexAccountMode===`pool`?(0,S.jsx)(`span`,{className:`badge badge-accent`,children:f(`modal.badge.pool`)}):e.auth===`oauth`?(0,S.jsx)(`span`,{className:`badge badge-accent`,children:f(`modal.badge.oauth`)}):e.auth===`forward`?(0,S.jsx)(`span`,{className:`badge badge-green`,children:f(`modal.badge.codexLogin`)}):e.auth===`local`?(0,S.jsx)(`span`,{className:`badge badge-amber`,children:f(`modal.badge.local`)}):e.keyOptional?null:(0,S.jsx)(`span`,{className:`badge badge-muted`,children:f(`modal.badge.apiKey`)});return(0,S.jsxs)(S.Fragment,{children:[(e.freeTier||e.keyOptional)&&e.auth===`key`?(0,S.jsx)(`span`,{className:`badge badge-green`,children:f(`modal.badge.free`)}):null,t]})};return(0,S.jsxs)(`div`,{className:`provider-catalog`,children:[(0,S.jsx)(`div`,{className:`provider-catalog-tabs`,role:`tablist`,children:[`accounts`,`free`,`paid`].map(e=>(0,S.jsx)(`button`,{role:`tab`,"aria-selected":p===e,className:`provider-catalog-tab${p===e?` active`:``}`,onClick:()=>{m(e),g(`home`),y(``)},children:f(e===`accounts`?`modal.tab.accounts`:e===`free`?`modal.tab.free`:`modal.tab.paid`)},e))}),p===`accounts`&&(0,S.jsxs)(`div`,{className:`provider-catalog-accounts-hint muted text-label`,children:[f(`modal.accountsHint`),` `,(0,S.jsx)(`a`,{href:`#codex-auth`,children:f(`modal.accountsCodexAuthLink`)})]}),h===`browse`&&(0,S.jsx)(`input`,{ref:b,className:`input provider-catalog-search`,value:v,onChange:e=>y(e.target.value),placeholder:f(`modal.search`)}),(0,S.jsxs)(`div`,{className:`provider-catalog-rows`,children:[n&&D.length===0&&(0,S.jsx)(`div`,{className:`muted text-control provider-catalog-empty`,children:f(`modal.catalogLoading`)}),D.map(e=>(0,S.jsxs)(`button`,{className:`list-row`,onClick:()=>i(e),children:[(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`div`,{className:`title`,children:e.label}),(0,S.jsxs)(`div`,{className:`sub`,children:[(0,S.jsx)(`code`,{className:`chip`,children:e.adapter}),e.note?` · ${e.note}`:``]})]}),(0,S.jsx)(`div`,{className:`provider-catalog-badges`,children:k(e)})]},e.id)),!n&&D.length===0&&(0,S.jsx)(`div`,{className:`muted text-control provider-catalog-empty`,children:f(`modal.noMatch`)}),p===`accounts`&&o.map(e=>{let t=s[e.id],n=c===e.id;return(0,S.jsxs)(`div`,{className:`list-row provider-catalog-account-row`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`div`,{className:`title`,children:e.label}),(0,S.jsx)(`div`,{className:`sub`,children:t?.loggedIn?t.email??e.statusLabel??f(`modal.accountLoggedIn`):t?.error??e.statusLabel??f(`modal.accountLoggedOut`)})]}),(0,S.jsx)(`div`,{className:`provider-catalog-badges`,children:t?.loggedIn?d&&(0,S.jsx)(`button`,{className:`btn btn-ghost`,onClick:()=>d(e.id),children:f(`modal.accountLogout`)}):n?u&&(0,S.jsx)(`button`,{className:`btn btn-ghost`,onClick:()=>u(e.id),children:f(`common.cancel`)}):l&&(0,S.jsx)(`button`,{className:`btn btn-primary`,onClick:()=>l(e.id),children:f(`modal.accountLogin`)})})]},e.id)})]}),(0,S.jsxs)(`div`,{className:`provider-catalog-footer`,children:[h===`home`&&w.length>dt&&(0,S.jsx)(`button`,{className:`link-btn`,onClick:O,children:f(`modal.browseAll`,{count:w.length})}),h===`browse`&&(0,S.jsx)(`button`,{className:`link-btn`,onClick:()=>{g(`home`),y(``)},children:f(`modal.browseBack`)}),(0,S.jsx)(`div`,{style:{flex:1}}),p!==`accounts`&&(0,S.jsx)(`button`,{className:`link-btn`,onClick:a,children:f(`modal.notListed`)})]})]})}function pt({apiBase:e,existingNames:t,onClose:n,onAdded:r,initialTier:i,initialCustom:a=!1}){let o=U(),s=(0,_.useMemo)(()=>[{id:`custom`,label:o(`modal.customProvider`),adapter:`openai-chat`,baseUrl:``,auth:`key`}],[o]),[c,l]=(0,_.useState)(a?{id:`custom`,label:o(`modal.customProvider`),adapter:`openai-chat`,baseUrl:``,auth:`key`}:null),[u,d]=(0,_.useState)(a?{name:``,adapter:`openai-chat`,baseUrl:``,authMode:`key`,apiKey:``,defaultModel:``}:null),[f,p]=(0,_.useState)(!1),[m,h]=(0,_.useState)(``),[g,v]=(0,_.useState)([]),[y,b]=(0,_.useState)(!1),[x,C]=(0,_.useState)(``),[w,T]=(0,_.useState)(`ok`),[E,D]=(0,_.useState)(``),[O,k]=(0,_.useState)(!1),[A,j]=(0,_.useState)(``),[M,P]=(0,_.useState)(!0),[ee,F]=(0,_.useState)(s),[I,L]=(0,_.useState)(!0),[te,ne]=(0,_.useState)({}),R=(0,_.useRef)(!0),z=(0,_.useRef)(!1),B=(0,_.useRef)(null),re=(0,_.useRef)(null);(0,_.useEffect)(()=>{R.current=!0,B.current=document.activeElement;let e=re.current;if(e){let t=e.querySelector(`input:not([disabled]), button:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex='-1'])`);t&&t.focus()}return()=>{R.current=!1,B.current?.focus()}},[]),(0,_.useEffect)(()=>{let e=e=>{e.key===`Escape`&&n()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[n]),(0,_.useEffect)(()=>{fetch(`${e}/api/oauth/providers`).then(e=>e.json()).then(e=>v(e.providers??[])).catch(()=>{})},[e]),(0,_.useEffect)(()=>{fetch(`${e}/api/provider-presets`).then(e=>e.json()).then(e=>{Array.isArray(e.providers)&&e.providers.length>0&&(z.current=!0,F(e.providers))}).catch(()=>{}).finally(()=>L(!1))},[e]),(0,_.useEffect)(()=>{fetch(`${e}/api/usage?range=30d`).then(e=>e.json()).then(e=>{let t={};for(let n of e.providers??[])t[n.provider]=n.requests;ne(t)}).catch(()=>{})},[e]),(0,_.useEffect)(()=>{z.current||F(s)},[s]);let se=e=>{let t=Ge(e);return t?o(t):e.note},ce=e=>{l(e),d({name:e.id===`custom`?``:e.id,adapter:e.adapter,baseUrl:e.baseUrl,authMode:e.auth,apiKey:``,defaultModel:e.defaultModel??``}),h(``),C(``),T(`ok`),D(``),j(``),P(!0)},le=()=>{l(null),d(null),h(``),C(``),T(`ok`),D(``),j(``),P(!0)},V=async()=>{if(!u)return;let t=c?We(c):!1;if(!t&&!u.name.trim()){h(o(`modal.nameRequired`));return}if(!t&&!u.baseUrl.trim()){h(o(`modal.baseUrlRequired`));return}let n;try{n=qe(c??{id:`custom`},u)}catch{h(o(`modal.invalidPreset`));return}p(!0),h(``);try{let t=await fetch(`${e}/api/providers`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(n)});if(!t.ok){h((await t.json().catch(()=>({}))).error||o(`modal.failedStatus`,{status:t.status}));return}r(n.name)}catch{h(o(`modal.networkError`))}finally{p(!1)}},ue=async t=>{b(!0),C(``),T(`ok`),D(``),j(``),P(!0);try{let n=await fetch(`${e}/api/oauth/login`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({provider:t})}),i=await n.json();if(!R.current)return;if(!n.ok){T(`warn`),C(i.error===`unknown oauth provider`?o(`modal.oauthComingSoonShort`):i.error||o(`modal.loginFailStart`));return}i.url?C(o(`modal.waitingLogin`)):C(i.instructions||o(`modal.loggingIn`));for(let n=0;n<100;n++){if(await new Promise(e=>setTimeout(e,2e3)),!R.current)return;let n=await fetch(`${e}/api/oauth/status?provider=${t}`).then(e=>e.json()).catch(()=>null);if(!R.current)return;if(n?.loggedIn){r(t);return}if(n?.error){T(`warn`),C(o(`modal.loginError`,{error:n.error}));return}}T(`warn`),C(o(`modal.loginTimeout`))}catch{R.current&&(T(`warn`),C(o(`modal.networkError`)))}finally{R.current&&b(!1)}},de=async t=>{let n=E.trim();if(!(!n||O)){k(!0),j(``);try{let r=await fetch(`${e}/api/oauth/login/code`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({provider:t,input:n})}),i=await r.json().catch(()=>({}));if(!R.current)return;if(!r.ok){P(!1),j(o(`prov.pasteFail`,{error:i.error||r.statusText}));return}D(``),P(!0),j(o(`prov.pasteOk`))}catch{R.current&&(P(!1),j(o(`modal.networkError`)))}finally{R.current&&k(!1)}}},fe=u?t.includes(u.name.trim())&&u.name.trim()!==``:!1,pe=c?.id===`custom`,me=u?.authMode===`local`,he=c?We(c):!1;return(0,S.jsx)(`div`,{role:`dialog`,"aria-modal":`true`,"aria-label":o(`modal.add`),className:`modal-overlay`,onClick:n,children:(0,S.jsxs)(`div`,{ref:re,className:`modal-card`,onClick:e=>e.stopPropagation(),children:[(0,S.jsxs)(`div`,{className:`modal-head`,children:[(0,S.jsx)(`h3`,{children:c?o(`modal.addNamed`,{label:c.label}):o(`modal.add`)}),(0,S.jsx)(`button`,{className:`btn btn-ghost btn-icon`,"aria-label":o(`common.close`),onClick:n,children:(0,S.jsx)(N,{})})]}),c?u&&(c.auth===`oauth`&&u.authMode===`oauth`?(0,S.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:14},children:[(0,S.jsx)(`div`,{className:`muted text-control`,children:c.note??o(`modal.oauthDefaultNote`)}),g.includes(c.oauthProvider??``)?(0,S.jsxs)(`button`,{className:`btn btn-primary`,onClick:()=>ue(c.oauthProvider),disabled:y,style:{width:`100%`,padding:`12px 16px`},children:[(0,S.jsx)(oe,{}),y?o(`modal.waitingBrowser`):o(`modal.logInWith`,{label:c.label})]}):(0,S.jsx)(`div`,{className:`text-control`,style:{color:`var(--amber)`,background:`var(--amber-soft)`,border:`1px solid var(--amber)`,borderRadius:`var(--radius-sm)`,padding:`10px 12px`},children:o(`modal.oauthComingSoon`,{label:c.label})}),x&&(0,S.jsx)(`div`,{className:`text-label`,style:{color:w===`warn`?`var(--amber)`:`var(--accent-hover)`},children:x}),y&&(0,S.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6},children:[(0,S.jsx)(`div`,{className:`muted text-label`,children:o(`prov.pasteRedirectHint`)}),(0,S.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,S.jsx)(`input`,{type:`text`,autoComplete:`off`,spellCheck:!1,value:E,onChange:e=>D(e.target.value),onKeyDown:e=>{e.key===`Enter`&&c.oauthProvider&&(e.preventDefault(),de(c.oauthProvider))},placeholder:o(`prov.pasteRedirect`),"aria-label":o(`prov.pasteRedirect`),disabled:O,className:`input text-label`,style:{flex:1}}),(0,S.jsx)(`button`,{className:`btn btn-ghost`,type:`button`,disabled:O||!E.trim()||!c.oauthProvider,onClick:()=>c.oauthProvider&&void de(c.oauthProvider),children:o(O?`prov.pasteSubmitting`:`prov.pasteSubmit`)})]}),A&&(0,S.jsx)(`div`,{className:`text-label`,style:{color:M?`var(--accent-hover)`:`var(--amber)`},children:A})]}),(0,S.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`,marginTop:2},children:[(0,S.jsx)(`button`,{className:`link-btn`,onClick:()=>{d({...u,authMode:`key`}),C(``),T(`ok`),D(``),j(``)},children:o(`modal.useApiKeyInstead`)}),(0,S.jsx)(`div`,{style:{flex:1}}),(0,S.jsx)(`button`,{className:`btn btn-ghost`,onClick:le,children:o(`modal.back`)})]})]}):(0,S.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:10},children:[!he&&!pe&&!me&&!c.keyOptional&&c.note&&(0,S.jsxs)(`details`,{className:`setup-guide`,children:[(0,S.jsx)(`summary`,{children:o(`modal.setupGuide`)}),(0,S.jsxs)(`ol`,{className:`text-label leading-relaxed`,style:{margin:`8px 0 0`,paddingLeft:18,color:`var(--muted)`},children:[(0,S.jsxs)(`li`,{children:[o(`modal.setupStep1Prefix`),` `,(0,S.jsx)(`a`,{href:c.dashboardUrl,target:`_blank`,rel:`noreferrer`,children:o(`modal.setupDashboardLink`,{label:c.label})}),` `,o(`modal.setupStep1Suffix`)]}),(0,S.jsx)(`li`,{children:o(`modal.setupStep2`)}),(0,S.jsx)(`li`,{children:o(`modal.setupStep3`)})]}),c.note&&(0,S.jsx)(`div`,{className:`text-label`,style:{color:`var(--muted)`,marginTop:6,fontStyle:`italic`},children:c.note})]}),(0,S.jsx)(mt,{label:o(`modal.providerName`),children:(0,S.jsx)(`input`,{className:`input`,value:u.name,readOnly:he,onChange:e=>d({...u,name:e.target.value}),placeholder:o(`modal.namePlaceholder`)})}),fe&&(0,S.jsx)(`div`,{className:`text-label`,style:{color:`var(--amber)`},children:o(`modal.duplicateWarn`,{name:u.name.trim()})}),!he&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(mt,{label:o(`modal.adapter`),children:(0,S.jsx)(`select`,{className:`input`,value:u.adapter,onChange:e=>d({...u,adapter:e.target.value}),children:[`openai-responses`,`openai-chat`,`anthropic`,`google`,`azure-openai`,`cursor`].map(e=>(0,S.jsx)(`option`,{value:e,children:e},e))})}),(0,S.jsx)(mt,{label:o(`modal.baseUrl`),children:(0,S.jsx)(`input`,{className:`input`,value:u.baseUrl,onChange:e=>d({...u,baseUrl:e.target.value}),placeholder:o(`modal.baseUrlPlaceholder`)})})]}),u.authMode===`forward`?(0,S.jsx)(`div`,{className:`text-label`,style:{color:`var(--green)`,background:`var(--green-soft)`,border:`1px solid var(--green)`,borderRadius:`var(--radius-sm)`,padding:`8px 10px`},children:se(c)}):u.authMode===`local`?(0,S.jsx)(`div`,{className:`text-label leading-relaxed`,style:{color:`var(--amber)`,background:`var(--amber-soft)`,border:`1px solid var(--amber)`,borderRadius:`var(--radius-sm)`,padding:`8px 10px`},children:o(`modal.localHint`)}):c.keyOptional?(0,S.jsxs)(`div`,{className:`text-label leading-relaxed`,style:{color:`var(--green)`,background:`var(--green-soft)`,border:`1px solid var(--green)`,borderRadius:`var(--radius-sm)`,padding:`10px 12px`},children:[(0,S.jsx)(`strong`,{children:o(`modal.freeTierTitle`)}),` — `,c.note??o(`modal.freeTierDefault`)]}):(0,S.jsxs)(S.Fragment,{children:[c.dashboardUrl&&(0,S.jsxs)(`a`,{className:`text-label`,href:c.dashboardUrl,target:`_blank`,rel:`noreferrer`,style:{display:`inline-flex`,alignItems:`center`,gap:5},children:[(0,S.jsx)(ae,{style:{width:14,height:14}}),o(`modal.getApiKey`,{label:c.label}),(0,S.jsx)(ie,{style:{width:13,height:13}})]}),(0,S.jsx)(mt,{label:o(`modal.apiKey`),children:(0,S.jsx)(`input`,{className:`input`,type:`password`,value:u.apiKey,onChange:e=>d({...u,apiKey:e.target.value}),placeholder:o(`modal.apiKeyPlaceholder`)})})]}),!he&&(0,S.jsx)(mt,{label:o(`modal.defaultModel`),children:(0,S.jsx)(`input`,{className:`input`,value:u.defaultModel,onChange:e=>d({...u,defaultModel:e.target.value}),placeholder:o(`modal.defaultModelPlaceholder`)})}),m&&(0,S.jsx)(`div`,{className:`text-control`,role:`alert`,style:{color:`var(--red)`},children:m}),(0,S.jsxs)(`div`,{style:{display:`flex`,gap:8,marginTop:4,alignItems:`center`},children:[(0,S.jsx)(`button`,{className:`btn btn-primary`,onClick:V,disabled:f,children:o(f?`modal.adding`:`modal.add`)}),c.auth===`oauth`&&(0,S.jsx)(`button`,{className:`link-btn`,onClick:()=>{d({...u,authMode:`oauth`}),h(``)},children:o(`modal.useOauthLogin`)}),(0,S.jsx)(`div`,{style:{flex:1}}),(0,S.jsx)(`button`,{className:`btn btn-ghost`,onClick:le,children:o(`modal.back`)})]})]})):(0,S.jsx)(ft,{presets:ee,usageRank:te,presetsLoading:I,initialTier:i,onSelectPreset:e=>ce(e),onSelectCustom:()=>ce(s[0])})]})})}function mt({label:e,children:t}){return(0,S.jsxs)(`label`,{style:{display:`block`},children:[(0,S.jsx)(`span`,{className:`field-label`,children:e}),t]})}function ht(e){return e.authMode===`local`||Ze(e.baseUrl)}var gt=[`ollama`,`vllm`,`lm-studio`,`lmstudio`,`litellm`,`localai`];function _t(e){let t=(e.authMode??``).toLowerCase();if(t===`oauth`||t===`forward`)return`login`;if(ht(e))return`local`;let n=`${e.name??``} ${e.adapter} ${e.baseUrl}`.toLowerCase();return gt.some(e=>n.includes(e))?`selfHosted`:`cloud`}function vt(e){if(!e||typeof e!=`object`)return{};let t=e.available;if(!t||typeof t!=`object`||Array.isArray(t))return{};let n={};for(let[e,r]of Object.entries(t))Array.isArray(r)&&(n[e]=r.filter(e=>typeof e==`string`));return n}function yt(e){if(!e||typeof e!=`object`)return{};let t=e.selected;if(!t||typeof t!=`object`||Array.isArray(t))return{};let n={};for(let[e,r]of Object.entries(t))Array.isArray(r)&&(n[e]=r.filter(e=>typeof e==`string`));return n}function bt(e){let t={};for(let[n,r]of Object.entries(vt(e)))t[n]=r.length;return t}function xt(e){return Object.entries(e).filter(e=>typeof e[1].requests==`number`&&e[1].requests>0).map(([e,t])=>({name:e,...t,requests:t.requests})).sort((e,t)=>t.requests-e.requests||e.name.localeCompare(t.name))}var St={justNow:`Just now`,notChecked:`Not checked`,minutesAgo:e=>`${e}m ago`,hoursAgo:e=>`${e}h ago`,daysAgo:e=>`${e}d ago`};function Ct(e,t,n){let r=typeof t==`object`&&t?t:St,i=typeof t==`number`?t:n??Date.now();if(e===void 0||!Number.isFinite(e))return r.notChecked;let a=Math.max(0,i-e),o=Math.floor(a/6e4);if(o<1)return r.justNow;if(o<60)return r.minutesAgo(o);let s=Math.floor(o/60);return s<24?r.hoursAgo(s):r.daysAgo(Math.floor(s/24))}function wt(e){return{justNow:e(`time.justNow`),notChecked:e(`time.notChecked`),minutesAgo:t=>e(`time.minutesAgo`,{n:t}),hoursAgo:t=>e(`time.hoursAgo`,{n:t}),daysAgo:t=>e(`time.daysAgo`,{n:t})}}function Tt(e,t=`en`){if(e===void 0)return`—`;if(t.toLowerCase().slice(0,2)===`de`){let t=e=>e.replace(/\.0+$/,``).replace(`.`,`,`);return e>=1e9?`${t((e/1e9).toFixed(2))} Mrd.`:e>=1e6?`${t((e/1e6).toFixed(1))} Mio.`:e>=1e3?`${t((e/1e3).toFixed(1))} Tsd.`:String(e)}return e>=1e9?`${(e/1e9).toFixed(2).replace(/\.?0+$/,``)}B`:e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function Et(e,t=`en`){return Tt(e,t)}var Dt={anthropic:`claude-color.svg`,"anthropic-apikey":`claude-color.svg`,"azure-openai":`openai.svg`,chatgpt:`openai.svg`,"cloudflare-ai-gateway":`cloudflare-ai-gateway-color.svg`,cursor:`cursor-color.svg`,deepseek:`deepseek-color.svg`,firepass:`firepass-color.svg`,fireworks:`fireworks-color.svg`,github:`github-copilot-color.svg`,"github-copilot":`copilot-color.svg`,"gitlab-duo":`gitlab-duo-color.svg`,google:`gemini-color.svg`,"google-antigravity":`antigravity-color.svg`,"google-vertex":`gemini-color.svg`,groq:`groq-color.svg`,huggingface:`huggingface-color.svg`,kimi:`kimi-color.svg`,"kimi-code":`kimi-color.svg`,kiro:`kiro-color.svg`,"lm-studio":`lm-studio-color.svg`,mistral:`mistral-color.svg`,moonshot:`moonshot-color.svg`,nvidia:`nvidia-color.svg`,ollama:`ollama-color.svg`,"ollama-cloud":`ollama-color.svg`,openai:`openai.svg`,"openai-apikey":`openai.svg`,"opencode-free":`opencode.svg`,"opencode-go":`opencode.svg`,"opencode-zen":`opencode.svg`,openrouter:`openrouter-color.svg`,qianfan:`qianfan-color.svg`,"qwen-portal":`qwen-portal-color.svg`,"vercel-ai-gateway":`vercel-ai-gateway-color.svg`,vllm:`vllm-color.svg`,xai:`grok-color.svg`,"mimo-free":`xiaomi-color.svg`,xiaomi:`xiaomi-color.svg`},Ot={anthropic:`Anthropic Claude`,"anthropic-apikey":`Anthropic Claude`,chatgpt:`ChatGPT`,openai:`OpenAI (Codex login)`,"openai-apikey":`OpenAI API`,"azure-openai":`Azure OpenAI`,"cloudflare-ai-gateway":`Cloudflare AI Gateway`,nvidia:`NVIDIA NIM`,ollama:`Ollama`,"ollama-cloud":`Ollama Cloud`,xai:`xAI Grok`,"mimo-free":`MiMo Free`,xiaomi:`Xiaomi`,cursor:`Cursor`,deepseek:`DeepSeek`,github:`GitHub`,"github-copilot":`GitHub Copilot`,"gitlab-duo":`GitLab Duo`,openrouter:`OpenRouter`,"opencode-go":`OpenCode Go`,"opencode-free":`OpenCode Free`,"opencode-zen":`OpenCode Zen`,mistral:`Mistral`,groq:`Groq`,kimi:`Kimi`,"kimi-code":`Kimi`,moonshot:`Moonshot`,google:`Google`,"google-vertex":`Google Vertex`,"lm-studio":`LM Studio`,huggingface:`Hugging Face`,"vercel-ai-gateway":`Vercel AI Gateway`,vllm:`vLLM`,litellm:`LiteLLM`};function kt(e){return Dt[e.toLowerCase()]}function At(e,t){let n=kt(e);return n?`/provider-icons/${n}`:void 0}function jt(e){let t=e.toLowerCase();return Ot[t]?Ot[t]:e===t&&/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(e)?e.split(`-`).map(e=>e&&e[0].toUpperCase()+e.slice(1)).join(` `):e}function Mt(e){return Object.prototype.hasOwnProperty.call(Ot,e.toLowerCase())}function Nt(e,t){let n=at(e);return t(n===`disabled`?`prov.disabledBadge`:n===`ready`?`pws.status.ready`:`pws.status.needsSetup`)}function Pt(e,t){switch(e.authMode){case`oauth`:return t(`modal.badge.oauth`);case`forward`:return t(`pws.auth.chatgptPassthrough`);case`local`:return t(`modal.badge.local`);case`key`:return t(`modal.badge.apiKey`);default:return e.authMode??(e.keyOptional?t(`pws.auth.noKey`):t(`modal.badge.apiKey`))}}function Ft(e){let t=at(e);return t===`disabled`?`providers-workspace-rail-status providers-workspace-rail-status--inactive`:t===`ready`?`providers-workspace-rail-status providers-workspace-rail-status--active`:`providers-workspace-rail-status providers-workspace-rail-status--warning`}function It({name:e,adapter:t,baseUrl:n,cls:r}){let i=At(e,{adapter:t,baseUrl:n});return(0,S.jsx)(`span`,{className:r,children:i?(0,S.jsx)(`img`,{src:i,alt:``,"aria-hidden":`true`}):(0,S.jsx)(T,{"aria-hidden":`true`})})}function Lt({item:e,selected:t,tabbable:n,modelCount:r,isDefault:i,showConfigId:a,onClick:o,onFocus:s}){let c=U(),l=tt(e),u=ht(e),d=Nt(e,c),f=jt(e.name),p=a?`${f} (${e.name})`:f,m=`${i?c(`pws.rail.suffixDefault`):``}${u?c(`pws.rail.suffixLocal`):l?c(`pws.rail.suffixFree`):``}`,h=r!==void 0&&r>0?r===1?c(`pws.modelCountOne`):c(`pws.modelCount`,{count:r}):``,g=[a?e.name:``,h].filter(Boolean).join(` · `);return(0,S.jsxs)(`button`,{type:`button`,className:`providers-workspace-rail-row${t?` providers-workspace-rail-row--selected`:``}`,onClick:o,role:`option`,"aria-selected":t,tabIndex:n?0:-1,"aria-label":c(`pws.rail.selectAria`,{name:p,status:d,suffix:m}),title:p,onFocus:s,children:[(0,S.jsx)(It,{name:e.name,adapter:e.adapter,baseUrl:e.baseUrl,cls:`providers-workspace-rail-icon`}),(0,S.jsxs)(`span`,{className:`providers-workspace-rail-copy`,children:[(0,S.jsxs)(`span`,{className:`providers-workspace-rail-primary`,children:[(0,S.jsx)(`span`,{className:`providers-workspace-rail-name-label`,title:f,children:f}),u?(0,S.jsx)(`span`,{className:`pwi-rail-badge pwi-rail-badge--local`,title:c(`pws.localTitle`),children:c(`modal.badge.local`)}):l?(0,S.jsx)(`span`,{className:`pwi-rail-badge pwi-rail-badge--free`,title:c(`pws.freeTitle`),children:c(`modal.badge.free`)}):null]}),g&&(0,S.jsx)(`span`,{className:`providers-workspace-rail-secondary`,title:g,children:g})]}),(0,S.jsxs)(`span`,{className:`providers-workspace-rail-trail`,children:[i&&(0,S.jsx)(`span`,{className:`pwi-default-star`,title:c(`prov.defaultBadge`),"aria-label":c(`prov.defaultBadge`),children:(0,S.jsx)(he,{width:17,height:17,"aria-hidden":`true`})}),(0,S.jsx)(`span`,{className:Ft(e),title:d,"aria-hidden":`true`})]})]})}function Rt(e){let t=e?.quota;if(!t||typeof t!=`object`||Array.isArray(t))return null;let n=t,r=e=>typeof e==`number`&&Number.isFinite(e)?e:void 0,i=Array.isArray(n.customWindows)?n.customWindows.flatMap(e=>{if(!e||typeof e!=`object`)return[];let t=e;return typeof t.label!=`string`||r(t.percent)===void 0?[]:[{label:t.label,percent:t.percent,...r(t.resetAt)===void 0?{}:{resetAt:t.resetAt}}]}):[],a={...r(n.fiveHourPercent)===void 0?{}:{fiveHourPercent:n.fiveHourPercent},...r(n.fiveHourResetAt)===void 0?{}:{fiveHourResetAt:n.fiveHourResetAt},...r(n.weeklyPercent)===void 0?{}:{weeklyPercent:n.weeklyPercent},...r(n.weeklyResetAt)===void 0?{}:{weeklyResetAt:n.weeklyResetAt},...r(n.monthlyPercent)===void 0?{}:{monthlyPercent:n.monthlyPercent},...r(n.monthlyResetAt)===void 0?{}:{monthlyResetAt:n.monthlyResetAt},...i.length>0?{customWindows:i}:{},updatedAt:r(n.updatedAt)??e?.updatedAt??Date.now()};return a.fiveHourPercent!==void 0||a.weeklyPercent!==void 0||a.monthlyPercent!==void 0||(a.customWindows?.length??0)>0?a:null}function zt(e){if(!e?.trim())return``;let[t,n]=e.split(`:`,2);return n?`${t} · ${n.replace(/-/g,` `)}`:e}function Bt(e,t,n){let r=e.length>0?e:t?[t]:[],i=n.trim().toLowerCase();return i?r.filter(e=>e.toLowerCase().includes(i)):r}function Vt(e){let t=e?.trim().toLowerCase();return t===`go`||t===`free`}function Ht(e,t){return!e||!Vt(t)?e:{...e.monthlyPercent===void 0?{}:{monthlyPercent:e.monthlyPercent},...e.monthlyResetAt===void 0?{}:{monthlyResetAt:e.monthlyResetAt},...e.resetCredits===void 0?{}:{resetCredits:e.resetCredits},updatedAt:e.updatedAt}}function Ut(e){return e===`5h`?0:e===`First-party models`?2:e===`API usage`?3:5}function Wt(e,t){switch(e){case`First-party models`:return t(`quota.cursorFirstParty`);case`API usage`:return t(`quota.cursorApiUsage`);case`Total subscription credits`:return t(`quota.totalSubscriptionCredits`);default:return e}}function Gt(e,t,n){let r=Ht(e,t);if(!r)return[];let i=[];typeof r.fiveHourPercent==`number`&&i.push({rank:0,row:{label:n(`codexAuth.fiveHour`),limitLabel:n(`quota.fiveHourLimit`),percent:r.fiveHourPercent,resetAt:r.fiveHourResetAt}}),typeof r.weeklyPercent==`number`&&i.push({rank:1,row:{label:n(`codexAuth.weekly`),limitLabel:n(`quota.weeklyLimit`),percent:r.weeklyPercent,resetAt:r.weeklyResetAt}}),typeof r.monthlyPercent==`number`&&i.push({rank:4,row:{label:n(`codexAuth.monthly`),limitLabel:n(`quota.monthlyLimit`),percent:r.monthlyPercent,resetAt:r.monthlyResetAt}});for(let e of r.customWindows??[]){let t=Wt(e.label,n);i.push({rank:Ut(e.label),row:{label:t,limitLabel:t,percent:e.percent,resetAt:e.resetAt}})}return i.sort((e,t)=>e.rank-t.rank).map(e=>e.row)}function Kt(e){switch(e){case`en`:return`en-GB`;case`de`:return`de-DE`;case`ko`:return`ko-KR`;case`zh`:return`zh-CN`;default:return e}}function qt(e){return e>=99.5}function Jt(e,t){return t>0&&e>=t}function Yt(e,t){return Jt(e,t)||qt(e)?`bar-warn`:`bar-green`}function Xt(e){let t=Math.max(0,Math.min(100,e));return t<=0?0:Math.max(4,Math.round(t))}function Zt({quota:e,plan:t,threshold:n,t:r,className:i,layout:a=`compact`}){let{locale:o}=H(),s=Gt(e,t,r);return s.length===0?null:a===`stacked`?(0,S.jsx)(`div`,{className:`quota-stacked${i?` ${i}`:``}`,children:s.map((e,t)=>(0,S.jsx)($t,{row:e,threshold:n,t:r,locale:o},`${e.limitLabel}-${t}`))}):(0,S.jsx)(`div`,{className:`quota-compact${i?` ${i}`:``}`,children:s.map((e,t)=>(0,S.jsx)(Qt,{label:e.label,percent:e.percent,resetAt:e.resetAt,threshold:n,t:r,locale:o},`${e.label}-${t}`))})}function Qt({label:e,percent:t,resetAt:n,threshold:r,t:i,locale:a}){let o=qt(t),s=Jt(t,r),c=Yt(t,r),l=en(n,i,a);return(0,S.jsxs)(`div`,{className:`quota-row${s?` quota-row--warn`:``}${o?` quota-row--exhausted`:``}`,children:[(0,S.jsx)(`span`,{className:`quota-label`,children:e}),(0,S.jsx)(`span`,{className:`quota-reset-label`,children:i(`codexAuth.resets`)}),(0,S.jsx)(`span`,{className:`quota-reset-day`,children:l.day}),(0,S.jsx)(`span`,{className:`quota-reset-time`,children:l.time}),(0,S.jsx)(`div`,{className:`bar`,children:(0,S.jsx)(`div`,{className:`bar-fill ${c}`,style:{width:`${Xt(t)}%`}})}),(0,S.jsxs)(`span`,{className:`quota-val${s?` quota-val--warn`:``}`,title:o?i(`quota.limitReached`):void 0,children:[s&&(0,S.jsx)(I,{width:12,height:12,"aria-hidden":`true`}),Math.round(t),`%`,o?` · ${i(`quota.limitReached`)}`:``]})]})}function $t({row:e,threshold:t,t:n,locale:r}){let i=qt(e.percent),a=Jt(e.percent,t),o=Yt(e.percent,t),s=tn(e.resetAt,n,r);return(0,S.jsxs)(`div`,{className:`quota-stacked-row${a?` quota-stacked-row--warn`:``}${i?` quota-stacked-row--exhausted`:``}`,children:[(0,S.jsxs)(`div`,{className:`quota-stacked-head`,children:[(0,S.jsx)(`span`,{className:`quota-stacked-limit`,children:e.limitLabel}),(0,S.jsx)(`span`,{className:`quota-stacked-reset muted`,children:s})]}),(0,S.jsxs)(`div`,{className:`quota-stacked-bar-row`,children:[(0,S.jsx)(`div`,{className:`bar quota-stacked-bar`,children:(0,S.jsx)(`div`,{className:`bar-fill ${o}`,style:{width:`${Xt(e.percent)}%`}})}),(0,S.jsx)(`span`,{className:`quota-stacked-used${a?` quota-stacked-used--warn`:``}`,children:n(`quota.usedPercent`,{pct:Math.round(e.percent)})})]}),i&&(0,S.jsxs)(`div`,{className:`quota-stacked-limit-reached`,role:`status`,children:[(0,S.jsx)(I,{width:12,height:12,"aria-hidden":`true`}),n(`quota.limitReached`)]})]})}function en(e,t,n){if(typeof e!=`number`||!Number.isFinite(e))return{day:``,time:``};let r=e<1e10?e*1e3:e,i=new Date(r),a=new Date,o=Kt(n),s=new Intl.DateTimeFormat(o,{hour:`2-digit`,minute:`2-digit`,hour12:!1}).format(i);return i.getFullYear()===a.getFullYear()&&i.getMonth()===a.getMonth()&&i.getDate()===a.getDate()?{day:t(`codexAuth.today`),time:s}:{day:new Intl.DateTimeFormat(o,{day:`numeric`,month:`short`}).format(i),time:s}}function tn(e,t,n=`en`,r=Date.now()){if(typeof e!=`number`||!Number.isFinite(e))return``;let i=e<1e10?e*1e3:e,a=new Date(i),o=Kt(n),s=new Intl.DateTimeFormat(o,{hour:`2-digit`,minute:`2-digit`,hour12:!1}).format(a),c=new Date(r),l=new Date(c.getFullYear(),c.getMonth(),c.getDate()).getTime(),u=new Date(a.getFullYear(),a.getMonth(),a.getDate()).getTime(),d=Math.round((u-l)/864e5);if(d===1)return t(`quota.resetsTomorrow`,{time:s});let f=a.getFullYear()!==c.getFullYear(),p=new Intl.DateTimeFormat(o,{day:`numeric`,month:`short`,...f?{year:`numeric`}:{}}).format(a);if(i<=r)return t(`quota.resetsAt`,{date:p,time:s,when:`${p}, ${s}`});let m=Math.round((i-r)/6e4);if(m<60)return t(`quota.resetsRelativeMinutes`,{n:Math.max(1,m)});let h=Math.round(m/60);return h<12&&d===0?t(`quota.resetsRelativeHours`,{n:Math.max(1,h)}):d===0?t(`quota.resetsToday`,{time:s}):t(`quota.resetsAt`,{date:p,time:s,when:`${p}, ${s}`})}function nn({sections:e,quotaReports:t,usageTotals:n,onSelectProvider:r}){let i=U(),{locale:a}=H(),o=wt(i),s=(0,_.useMemo)(()=>[...e.ready,...e.needsSetup,...e.disabled],[e]),c=(0,_.useMemo)(()=>new Set(s.map(e=>e.name)),[s]),l=(0,_.useMemo)(()=>{let e=[];for(let n of s){let r=t[n.name];r&&Rt(r)&&e.push({item:n,report:r})}return e},[s,t]),u=(0,_.useMemo)(()=>{let e={};for(let[t,r]of Object.entries(n))c.has(t)&&(e[t]=r);return xt(e)},[n,c]);return(0,S.jsxs)(`div`,{className:`pws-dashboard`,children:[(0,S.jsxs)(`div`,{className:`pws-dashboard-header`,children:[(0,S.jsx)(`h2`,{className:`pws-dashboard-title`,children:i(`pws.dashboard.title`)}),(0,S.jsx)(`p`,{className:`muted pws-dashboard-subtitle`,children:i(`pws.dashboard.subtitle`)})]}),(0,S.jsxs)(`div`,{className:`pws-dashboard-summary`,children:[(0,S.jsx)(rn,{count:e.ready.length,label:i(`pws.status.ready`),tone:`ok`}),(0,S.jsx)(rn,{count:e.needsSetup.length,label:i(`pws.status.needsSetup`),tone:`warn`}),(0,S.jsx)(rn,{count:e.disabled.length,label:i(`prov.disabledBadge`),tone:`muted`})]}),l.length>0&&(0,S.jsxs)(`section`,{className:`pws-dashboard-section`,"aria-label":i(`pws.dashboard.rateLimits`),children:[(0,S.jsx)(`h3`,{className:`pws-dashboard-section-title`,children:i(`pws.dashboard.rateLimits`)}),(0,S.jsx)(`div`,{className:`pws-dashboard-rows`,children:l.map(({item:e,report:t})=>(0,S.jsxs)(`button`,{type:`button`,className:`pws-dashboard-row`,onClick:()=>r(e.name),children:[(0,S.jsx)(It,{name:e.name,adapter:e.adapter,baseUrl:e.baseUrl,cls:`pws-dashboard-row-icon`}),(0,S.jsxs)(`div`,{className:`pws-dashboard-row-info`,children:[(0,S.jsx)(`span`,{className:`pws-dashboard-row-name`,children:jt(e.name)}),(0,S.jsx)(`span`,{className:`pws-dashboard-row-meta muted`,children:i(`pws.dashboard.checkedAgo`,{time:Ct(t.updatedAt,o)})})]}),(0,S.jsx)(z,{className:`pws-dashboard-row-chevron`,"aria-hidden":`true`}),(0,S.jsx)(`div`,{className:`pws-dashboard-row-bars`,children:(0,S.jsx)(Zt,{quota:Rt(t),threshold:80,t:i,layout:`stacked`})})]},e.name))})]}),u.length>0?(0,S.jsxs)(`section`,{className:`pws-dashboard-section`,"aria-label":i(`pws.dashboard.recentlyUsed`),children:[(0,S.jsx)(`h3`,{className:`pws-dashboard-section-title`,children:i(`pws.dashboard.recentlyUsed`)}),(0,S.jsx)(`div`,{className:`pws-dashboard-rows`,children:u.map(e=>(0,S.jsxs)(`button`,{type:`button`,className:`pws-dashboard-row`,onClick:()=>r(e.name),children:[(0,S.jsx)(It,{name:e.name,adapter:``,baseUrl:``,cls:`pws-dashboard-row-icon`}),(0,S.jsx)(`span`,{className:`pws-dashboard-row-name`,children:jt(e.name)}),(0,S.jsx)(`span`,{className:`pws-dashboard-row-count muted`,children:i(`pws.dashboard.requests`,{count:Tt(e.requests,a)})}),(0,S.jsx)(z,{className:`pws-dashboard-row-chevron`,"aria-hidden":`true`})]},e.name))})]}):(0,S.jsxs)(`section`,{className:`pws-dashboard-section`,children:[(0,S.jsx)(`h3`,{className:`pws-dashboard-section-title`,children:i(`pws.dashboard.recentlyUsed`)}),(0,S.jsx)(`p`,{className:`muted`,children:i(`pws.dashboard.noUsage`)})]})]})}function rn({count:e,label:t,tone:n}){return(0,S.jsxs)(`div`,{className:`pws-dashboard-card pws-dashboard-card--${n}`,children:[(0,S.jsx)(`span`,{className:`pws-dashboard-card-count`,children:e}),(0,S.jsx)(`span`,{className:`pws-dashboard-card-label`,children:t})]})}var an=[{id:`az`,labelKey:`pws.sort.az`},{id:`za`,labelKey:`pws.sort.za`},{id:`free-paid`,labelKey:`pws.sort.freePaid`},{id:`paid-free`,labelKey:`pws.sort.paidFree`},{id:`accounts-first`,labelKey:`pws.sort.accountsFirst`}];function on({providers:e,apiBase:t,defaultProvider:n,selectedName:r,onSelect:i,onAddProvider:a,detail:o}){let s=U(),[c,l]=(0,_.useState)(``),[u,d]=(0,_.useState)({ready:!0,needsSetup:!0,disabled:!0}),[f,p]=(0,_.useState)({free:!0,paid:!0}),[m,h]=(0,_.useState)({cloud:!0,local:!0,selfHosted:!0,login:!0}),[g,v]=(0,_.useState)(`az`),[y,b]=(0,_.useState)(!1),[x,C]=(0,_.useState)(null),[w,T]=(0,_.useState)({}),[E,D]=(0,_.useState)({}),[O,k]=(0,_.useState)({}),[A,j]=(0,_.useState)(!1),[M,N]=(0,_.useState)(!1),[P,ee]=(0,_.useState)({}),[F,I]=(0,_.useState)({}),L=(0,_.useRef)(null),ne=(0,_.useMemo)(()=>it(ot(e)),[e]);(0,_.useEffect)(()=>{let e=!1;return fetch(`${t}/api/selected-models`).then(e=>e.ok?e.json():Promise.reject(Error(String(e.status)))).then(t=>{e||(T(bt(t)),D(vt(t)),k(yt(t)),N(!1),j(!1))}).catch(()=>{e||(N(!0),j(!1))}),()=>{e=!0}},[t]),(0,_.useEffect)(()=>{let e=!1;return fetch(`${t}/api/usage?range=30d`).then(e=>e.ok?e.json():null).then(t=>{if(e||!t)return;let n={};for(let e of t.providers??[])n[e.provider]={requests:e.requests,totalTokens:e.totalTokens};ee(n)}).catch(()=>{}),()=>{e=!0}},[t]),(0,_.useEffect)(()=>{let e=!1;return fetch(`${t}/api/provider-quotas`).then(e=>e.ok?e.json():null).then(t=>{if(e||!t)return;let n={};for(let e of t.reports??[])e?.provider&&(n[e.provider]={label:e.label,source:e.source,updatedAt:typeof e.updatedAt==`number`?e.updatedAt:Date.now(),quota:e.quota});I(n)}).catch(()=>{}),()=>{e=!0}},[t]),(0,_.useEffect)(()=>{if(!y)return;let e=e=>{L.current&&!L.current.contains(e.target)&&b(!1)},t=e=>{e.key===`Escape`&&b(!1)};return document.addEventListener(`mousedown`,e),window.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),window.removeEventListener(`keydown`,t)}},[y]);let R=(0,_.useMemo)(()=>[...ne.ready,...ne.needsSetup,...ne.disabled],[ne]),z=(0,_.useMemo)(()=>R.filter(tt).length,[R]),B=R.length-z,re=(0,_.useMemo)(()=>{let e={cloud:0,local:0,selfHosted:0,login:0};for(let t of R)e[_t(t)]+=1;return e},[R]),ie=(0,_.useMemo)(()=>{let e=c.trim().toLowerCase(),t=t=>rt(t.filter(t=>{if(e&&!t.name.toLowerCase().includes(e)&&!t.adapter.toLowerCase().includes(e))return!1;let n=tt(t);return!(n&&!f.free||!n&&!f.paid||!m[_t(t)])}),g);return{ready:u.ready?t(ne.ready):[],needsSetup:u.needsSetup?t(ne.needsSetup):[],disabled:u.disabled?t(ne.disabled):[]}},[ne,c,u,f,m,g]),ae=!u.ready||!u.needsSetup||!u.disabled||!f.free||!f.paid||!m.cloud||!m.local||!m.selfHosted||!m.login||g!==`az`,oe=()=>{d({ready:!0,needsSetup:!0,disabled:!0}),p({free:!0,paid:!0}),h({cloud:!0,local:!0,selfHosted:!0,login:!0}),v(`az`)},se=(0,_.useMemo)(()=>r?R.find(e=>e.name===r)??null:null,[r,R]),ce=(0,_.useMemo)(()=>{let e=new Map;for(let t of R){let n=jt(t.name);e.set(n,(e.get(n)??0)+1)}return new Set([...e.entries()].filter(([,e])=>e>1).map(([e])=>e))},[R]);if(R.length===0)return(0,S.jsx)(sn,{onAddProvider:a});let le=[{key:`ready`,label:s(`pws.status.ready`),count:ne.ready.length},{key:`needsSetup`,label:s(`pws.status.needsSetup`),count:ne.needsSetup.length},{key:`disabled`,label:s(`prov.disabledBadge`),count:ne.disabled.length}],V=[{id:`ready`,label:s(`pws.status.ready`),count:ie.ready.length,ariaLabel:s(`pws.groupReady`,{count:ie.ready.length}),items:ie.ready},{id:`needs-setup`,label:s(`pws.status.needsSetup`),count:ie.needsSetup.length,ariaLabel:s(`pws.groupNeedsSetup`,{count:ie.needsSetup.length}),items:ie.needsSetup},{id:`disabled`,label:s(`prov.disabledBadge`),count:ie.disabled.length,ariaLabel:s(`pws.groupDisabled`,{count:ie.disabled.length}),items:ie.disabled}],ue=V.flatMap(e=>e.items.map(e=>e.name)),de=x&&ue.includes(x)?x:r&&ue.includes(r)?r:ue[0]??null;return(0,S.jsx)(`div`,{className:`pws-shell-container`,children:(0,S.jsxs)(`div`,{className:`pws-root`,children:[(0,S.jsxs)(`aside`,{className:`pws-rail`,"aria-label":s(`pws.providerList`),children:[(0,S.jsxs)(`div`,{className:`pws-search-row`,children:[(0,S.jsxs)(`div`,{className:`pws-search-wrap`,children:[(0,S.jsx)(te,{className:`pws-search-icon`,width:14,height:14,"aria-hidden":`true`}),(0,S.jsx)(`input`,{type:`search`,className:`input pws-search-input`,placeholder:s(`pws.searchPlaceholder`),value:c,onChange:e=>l(e.target.value),"aria-label":s(`pws.searchPlaceholder`)})]}),(0,S.jsxs)(`div`,{className:`pws-filter-wrap`,ref:L,children:[(0,S.jsxs)(`button`,{type:`button`,className:`pws-filter-btn${ae||y?` pws-filter-btn--active`:``}`,onClick:()=>b(e=>!e),"aria-label":s(`pws.filterAria`),"aria-haspopup":`menu`,"aria-expanded":y,children:[(0,S.jsx)(ge,{width:18,height:18,"aria-hidden":`true`}),ae&&(0,S.jsx)(`span`,{className:`pws-filter-dot`,"aria-hidden":`true`})]}),y&&(0,S.jsxs)(`div`,{className:`pws-filter-menu`,role:`menu`,"aria-label":s(`pws.providerFiltersAria`),children:[(0,S.jsx)(`div`,{className:`pws-filter-title`,children:s(`pws.filters`)}),(0,S.jsx)(`div`,{className:`pws-filter-head`,children:s(`pws.filterStatus`)}),le.map(({key:e,label:t,count:n})=>(0,S.jsxs)(`label`,{className:`pws-filter-option`,role:`menuitemcheckbox`,"aria-checked":u[e],children:[(0,S.jsx)(`input`,{type:`checkbox`,checked:u[e],onChange:()=>d(t=>({...t,[e]:!t[e]}))}),(0,S.jsx)(`span`,{className:`pws-filter-label`,children:t}),(0,S.jsx)(`span`,{className:`pws-filter-count`,children:n})]},e)),(0,S.jsx)(`div`,{className:`pws-filter-head`,children:s(`pws.pricing`)}),(0,S.jsxs)(`label`,{className:`pws-filter-option`,role:`menuitemcheckbox`,"aria-checked":f.free,children:[(0,S.jsx)(`input`,{type:`checkbox`,checked:f.free,onChange:()=>p(e=>({...e,free:!e.free}))}),(0,S.jsx)(`span`,{className:`pws-filter-label`,children:s(`modal.badge.free`)}),(0,S.jsx)(`span`,{className:`pws-filter-count`,children:z})]}),(0,S.jsxs)(`label`,{className:`pws-filter-option`,role:`menuitemcheckbox`,"aria-checked":f.paid,children:[(0,S.jsx)(`input`,{type:`checkbox`,checked:f.paid,onChange:()=>p(e=>({...e,paid:!e.paid}))}),(0,S.jsx)(`span`,{className:`pws-filter-label`,children:s(`pws.paid`)}),(0,S.jsx)(`span`,{className:`pws-filter-count`,children:B})]}),(0,S.jsx)(`div`,{className:`pws-filter-head`,children:s(`pws.filterType`)}),[{key:`cloud`,label:s(`pws.type.cloud`),count:re.cloud},{key:`local`,label:s(`pws.type.local`),count:re.local},{key:`selfHosted`,label:s(`pws.type.selfHosted`),count:re.selfHosted},{key:`login`,label:s(`pws.type.login`),count:re.login}].map(({key:e,label:t,count:n})=>(0,S.jsxs)(`label`,{className:`pws-filter-option`,role:`menuitemcheckbox`,"aria-checked":m[e],children:[(0,S.jsx)(`input`,{type:`checkbox`,checked:m[e],onChange:()=>h(t=>({...t,[e]:!t[e]}))}),(0,S.jsx)(`span`,{className:`pws-filter-label`,children:t}),(0,S.jsx)(`span`,{className:`pws-filter-count`,children:n})]},e)),(0,S.jsx)(`div`,{className:`pws-filter-head`,children:s(`pws.sort`)}),(0,S.jsx)(`div`,{className:`pws-sort-grid`,role:`group`,"aria-label":s(`pws.sortProvidersAria`),children:an.map(e=>(0,S.jsx)(`button`,{type:`button`,className:`pws-sort-btn${g===e.id?` pws-sort-btn--active`:``}`,onClick:()=>v(e.id),"aria-pressed":g===e.id,children:s(e.labelKey)},e.id))}),(0,S.jsx)(`div`,{className:`pws-filter-footer`,children:(0,S.jsx)(`button`,{type:`button`,className:`link-btn`,onClick:oe,disabled:!ae,children:s(`pws.resetAll`)})})]})]})]}),(0,S.jsxs)(`div`,{className:`pws-rail-list`,role:`listbox`,"aria-label":s(`pws.providersAria`),onKeyDown:e=>{let t=Array.from(e.currentTarget.querySelectorAll(`[role="option"]`));if(t.length===0)return;let n=document.activeElement,r=t.findIndex(e=>e===n||e.contains(n));if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault();let n=e.key===`ArrowDown`?1:-1;t[r<0?n>0?0:t.length-1:(r+n+t.length)%t.length]?.focus();return}if(e.key===`Home`){e.preventDefault(),t[0]?.focus();return}e.key===`End`&&(e.preventDefault(),t[t.length-1]?.focus())},children:[Object.values(ie).every(e=>e.length===0)&&(0,S.jsx)(`span`,{className:`muted pws-rail-empty`,role:`status`,children:s(c?`pws.noSearchResults`:ae?`pws.noMatchFilters`:`pws.noProvidersConfigured`)}),V.map(({id:e,label:t,count:a,ariaLabel:o,items:s})=>s.length===0?null:(0,S.jsxs)(`div`,{className:`pws-rail-group`,role:`group`,"aria-label":o,children:[(0,S.jsxs)(`div`,{className:`pws-rail-group-head`,"aria-hidden":`true`,children:[(0,S.jsx)(`span`,{className:`pws-rail-group-label`,children:t}),(0,S.jsx)(`span`,{className:`pws-rail-group-count`,children:a})]}),s.map(e=>(0,S.jsx)(Lt,{item:e,selected:r===e.name,tabbable:de===e.name,modelCount:w[e.name],isDefault:n===e.name,showConfigId:ce.has(jt(e.name)),onClick:()=>i(e.name),onFocus:()=>C(e.name)},e.name))]},e))]})]}),(0,S.jsx)(`main`,{className:`pws-main`,"aria-label":s(`pws.workspaceMainAria`),children:se?o?.(se,{usageTotals:P[se.name],quotaReport:F[se.name],availableModels:E[se.name]??[],selectedModels:O[se.name]??[],modelsLoading:A,modelsLoadFailed:M})??(0,S.jsxs)(`div`,{className:`pws-detail-placeholder`,children:[(0,S.jsx)(`h3`,{children:jt(se.name)}),(0,S.jsx)(`p`,{className:`muted`,children:s(`pws.detailComingSoon`)}),(0,S.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>i(null),children:s(`modal.back`)})]}):R.length>0?(0,S.jsx)(nn,{sections:ne,quotaReports:F,usageTotals:P,onSelectProvider:e=>i(e)}):null})]})})}function sn({onAddProvider:e}){let t=U();return(0,S.jsx)(`div`,{className:`pws-empty-root`,children:(0,S.jsxs)(`div`,{className:`pws-empty-hero`,children:[(0,S.jsx)(`div`,{"aria-hidden":`true`,children:(0,S.jsx)(E,{style:{width:64,height:64}})}),(0,S.jsx)(`h2`,{children:t(`pws.connectFirst`)}),(0,S.jsxs)(`div`,{className:`pws-empty-tiles`,children:[(0,S.jsxs)(`button`,{type:`button`,className:`pws-empty-tile`,onClick:()=>e({tier:`free`}),children:[(0,S.jsx)(`span`,{"aria-hidden":`true`,children:(0,S.jsx)(de,{width:18,height:18})}),(0,S.jsx)(`span`,{className:`pws-empty-tile-label`,children:t(`pws.empty.browseFree`)}),(0,S.jsx)(`span`,{className:`pws-empty-tile-desc muted`,children:t(`pws.empty.browseFreeDesc`)})]}),(0,S.jsxs)(`button`,{type:`button`,className:`pws-empty-tile`,onClick:()=>e({tier:`accounts`}),children:[(0,S.jsx)(`span`,{"aria-hidden":`true`,children:(0,S.jsx)(oe,{width:18,height:18})}),(0,S.jsx)(`span`,{className:`pws-empty-tile-label`,children:t(`pws.empty.connectAccount`)}),(0,S.jsx)(`span`,{className:`pws-empty-tile-desc muted`,children:t(`pws.empty.connectAccountDesc`)})]}),(0,S.jsxs)(`button`,{type:`button`,className:`pws-empty-tile`,onClick:()=>e({custom:!0}),children:[(0,S.jsx)(`span`,{"aria-hidden":`true`,children:(0,S.jsx)(ae,{width:18,height:18})}),(0,S.jsx)(`span`,{className:`pws-empty-tile-label`,children:t(`pws.empty.addEndpoint`)}),(0,S.jsx)(`span`,{className:`pws-empty-tile-desc muted`,children:t(`pws.empty.addEndpointDesc`)})]})]})]})})}function cn(e){if(et(e.name,e))return`codex-accounts`;let t=(e.authMode??``).toLowerCase();if(t===`forward`||t===`local`||ht(e))return null;if(t===`oauth`)return`oauth-accounts`;let n=e.hasApiKey===!0;return!(t===`key`||n||t===``)||e.keyOptional===!0&&!n?null:`api-keys`}function ln(e,t,n){let r=t.email?.trim();if(r)return r;let i=e.findIndex(e=>e.id===t.id);return n(`pws.accountOrdinal`,{count:String(i>=0?i+1:1)})}function un({item:e,usageTotals:t,quotaReport:n,oauthEmail:r,onEditSettings:i,onViewUsage:a,onUpdateProvider:o}){let s=U(),{locale:c}=H(),l=wt(s),u=at(e),d=s(u===`ready`?`pws.status.connected`:u===`needs-setup`?`pws.status.needsSetup`:`prov.disabledBadge`),f=t?.requests,p=t?.totalTokens,m=Rt(n);return(0,S.jsxs)(`div`,{className:`pws-overview-layout`,children:[(0,S.jsxs)(`div`,{className:`pws-overview-main`,children:[(0,S.jsxs)(`section`,{className:`pws-section`,"aria-label":s(`pws.connection`),children:[(0,S.jsx)(`h3`,{className:`pws-section-title`,children:s(`pws.connection`)}),(0,S.jsxs)(`dl`,{className:`pws-kv`,children:[(0,S.jsxs)(`div`,{className:`pws-kv-row`,children:[(0,S.jsx)(`dt`,{children:s(`dash.status`)}),(0,S.jsxs)(`dd`,{className:u===`ready`?`pws-status-ok`:`pws-status-warn`,children:[u===`ready`?(0,S.jsx)(M,{style:{width:13,height:13},"aria-hidden":`true`}):(0,S.jsx)(I,{style:{width:13,height:13},"aria-hidden":`true`}),d]})]}),(0,S.jsxs)(`div`,{className:`pws-kv-row`,children:[(0,S.jsx)(`dt`,{children:s(`modal.baseUrl`)}),(0,S.jsx)(`dd`,{children:(0,S.jsx)(`code`,{children:e.baseUrl?.trim()?e.baseUrl:`—`})})]}),(0,S.jsxs)(`div`,{className:`pws-kv-row`,children:[(0,S.jsx)(`dt`,{children:s(`pws.cell.auth`)}),(0,S.jsx)(`dd`,{children:r?`${Pt(e,s)} · ${r}`:Pt(e,s)})]}),(0,S.jsxs)(`div`,{className:`pws-kv-row`,children:[(0,S.jsx)(`dt`,{children:s(`modal.defaultModel`)}),(0,S.jsx)(`dd`,{children:e.defaultModel??(0,S.jsx)(`span`,{className:`muted`,children:`—`})})]}),e.note&&(0,S.jsxs)(`div`,{className:`pws-kv-row`,children:[(0,S.jsx)(`dt`,{children:s(`pws.cell.note`)}),(0,S.jsx)(`dd`,{className:`muted`,children:e.note})]})]}),i&&(0,S.jsx)(`button`,{type:`button`,className:`link-btn pws-edit-settings-link`,onClick:i,children:s(`pws.editSettings`)})]}),(0,S.jsxs)(`section`,{className:`pws-section`,"aria-label":s(`pws.authSummary`),children:[(0,S.jsx)(`h3`,{className:`pws-section-title`,children:s(`pws.authSummary`)}),(0,S.jsxs)(`div`,{className:`pws-auth-summary`,children:[(0,S.jsx)(`span`,{className:`pws-auth-dot`}),(0,S.jsx)(`span`,{children:e.authMode===`forward`?s(`pws.passthrough`):e.authMode===`oauth`?r?s(`pws.loggedInAs`,{email:r}):s(`pws.notLoggedIn`):e.hasApiKey?s(`pws.apiKeyConfigured`):Pt(e,s)})]})]})]}),(0,S.jsxs)(`aside`,{className:`pws-overview-sidebar`,children:[(0,S.jsxs)(`section`,{className:`pws-section`,"aria-label":s(`pws.statsAria`),children:[(0,S.jsx)(`h3`,{className:`pws-section-title`,children:s(`pws.statsTitle`)}),(0,S.jsxs)(`dl`,{className:`pws-kv`,children:[typeof f==`number`&&(0,S.jsxs)(`div`,{className:`pws-kv-row`,children:[(0,S.jsx)(`dt`,{children:s(`pws.stats.totalRequests`)}),(0,S.jsx)(`dd`,{className:`pws-kv-mono`,children:Tt(f,c)})]}),typeof p==`number`&&(0,S.jsxs)(`div`,{className:`pws-kv-row`,children:[(0,S.jsx)(`dt`,{children:s(`pws.stats.totalTokens`)}),(0,S.jsx)(`dd`,{className:`pws-kv-mono`,children:Et(p,c)})]}),n&&(0,S.jsxs)(`div`,{className:`pws-kv-row`,children:[(0,S.jsx)(`dt`,{children:s(`pws.stats.quotaUpdated`)}),(0,S.jsx)(`dd`,{className:`pws-kv-mono`,title:n.source?zt(n.source):void 0,children:Ct(n.updatedAt,l)})]}),typeof f!=`number`&&typeof p!=`number`&&!n&&(0,S.jsx)(`div`,{className:`muted`,children:s(`pws.usageUnavailable`)})]}),a&&(0,S.jsxs)(`button`,{type:`button`,className:`link-btn pws-view-usage-link`,onClick:a,children:[s(`pws.viewUsage`),` →`]}),m&&(0,S.jsx)(`div`,{className:`muted pws-stats-note`,children:s(`pws.stats.quotaTracked`)})]}),(0,S.jsx)(dn,{item:e,onUpdateProvider:o})]})]})}function dn({item:e,onUpdateProvider:t}){let n=U(),[r,i]=(0,_.useState)(!1),[a,o]=(0,_.useState)(``),[s,c]=(0,_.useState)(!1),l=(0,_.useCallback)(async()=>{if(s||!t)return;let n=a.trim();if(n===(e.note??``)){i(!1);return}c(!0),await t(e.name,{note:n||void 0}),c(!1),i(!1)},[a,e.name,e.note,t,s]);return r?(0,S.jsxs)(`section`,{className:`pws-section pws-notes-section`,"aria-label":n(`pws.notes`),children:[(0,S.jsx)(`h3`,{className:`pws-section-title`,children:n(`pws.notes`)}),(0,S.jsx)(`textarea`,{className:`pws-notes-textarea`,value:a,onChange:e=>o(e.target.value),onBlur:()=>void l(),onKeyDown:t=>{t.key===`Escape`&&(o(e.note??``),i(!1))},placeholder:n(`pws.notePlaceholder`),autoFocus:!0,rows:3,disabled:s})]}):(0,S.jsxs)(`section`,{className:`pws-section pws-notes-section`,"aria-label":n(`pws.notes`),children:[(0,S.jsx)(`h3`,{className:`pws-section-title`,children:n(`pws.notes`)}),(0,S.jsx)(`button`,{type:`button`,className:`pws-notes-display`,onClick:()=>{t&&(o(e.note??``),i(!0))},disabled:!t,children:e.note||(0,S.jsx)(`span`,{className:`muted`,children:n(`pws.notePlaceholder`)})})]})}var fn=m();function pn(e,t,n){let r=Array(e);return new Proxy(r,{get(r,i,a){if(typeof i==`string`){let a=i.charCodeAt(0);if(a>=48&&a<=57){let a=+i;if(Number.isInteger(a)&&a>=0&&a<e){let e=r[a];if(!e){let i=t[a*2];e=r[a]={index:a,key:n(a),start:i,size:t[a*2+1],end:i+t[a*2+1],lane:0}}return e}}if(i===`length`)return e}return Reflect.get(r,i,a)}})}function mn(e,t,n){let r=n.initialDeps??[],i,a=!0;function o(){let o=e();return o.length!==r.length||o.some((e,t)=>r[t]!==e)?(r=o,i=t(...o),n?.onChange&&!(a&&n.skipInitialOnChange)&&n.onChange(i),a=!1,i):i}return o.updateDeps=e=>{r=e},o}function hn(e,t){if(e===void 0)throw Error(`Unexpected undefined${t?`: ${t}`:``}`);return e}var gn=(e,t)=>Math.abs(e-t)<1.01,_n=(e,t,n)=>{let r;return function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)}},vn,yn=()=>{if(vn!==void 0)return vn;if(typeof navigator>`u`)return vn=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return vn=!0;let e=navigator.maxTouchPoints;return vn=navigator.platform===`MacIntel`&&e!==void 0&&e>0},bn=e=>{let{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},xn=e=>e,Sn=e=>{let t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1)-t+1,r=Array(n);for(let e=0;e<n;e++)r[e]=t+e;return r},Cn=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=e=>{let{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(i(bn(n)),!r.ResizeObserver)return()=>{};let a=new r.ResizeObserver(t=>{let r=()=>{let e=t[0];if(e?.borderBoxSize){let t=e.borderBoxSize[0];if(t){i({width:t.inlineSize,height:t.blockSize});return}}i(bn(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()});return a.observe(n,{box:`border-box`}),()=>{a.unobserve(n)}},wn={passive:!0},Tn=typeof window>`u`?!0:`onscrollend`in window,En=(e,t,n)=>{let r=e.scrollElement;if(!r)return;let i=e.targetWindow;if(!i)return;let a=e.options.useScrollendEvent&&Tn,o=0,s=a?null:_n(i,()=>t(o,!1),e.options.isScrollingResetDelay),c=e=>()=>{o=n(r),s?.(),t(o,e)},l=c(!0),u=c(!1);return r.addEventListener(`scroll`,l,wn),a&&r.addEventListener(`scrollend`,u,wn),()=>{r.removeEventListener(`scroll`,l),a&&r.removeEventListener(`scrollend`,u)}},Dn=(e,t)=>En(e,t,t=>{let{horizontal:n,isRtl:r}=e.options;return n?t.scrollLeft*(r&&-1||1):t.scrollTop}),On=(e,t,n)=>{if(n.options.useCachedMeasurements){let t=n.indexFromElement(e),r=n.options.getItemKey(t);return n.itemSizeCache.get(r)??n.options.estimateSize(t)}if(t?.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?`inlineSize`:`blockSize`])}if(!t){let t=n.indexFromElement(e),r=n.options.getItemKey(t),i=n.itemSizeCache.get(r);if(i!==void 0)return i}return e[n.options.horizontal?`offsetWidth`:`offsetHeight`]},kn=(e,{adjustments:t=0,behavior:n},r)=>{var i,a;(a=(i=r.scrollElement)?.scrollTo)==null||a.call(i,{[r.options.horizontal?`left`:`top`]:e+t,behavior:n})},An=class{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this.elementsCache=new Map,this.now=()=>{var e;return((e=this.targetWindow?.performance)?.now)?.call(e)??Date.now()},this.observer=(()=>{let e=null,t=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{let t=()=>{let t=e.target,n=this.indexFromElement(t);if(!t.isConnected){this.observer.unobserve(t);for(let[e,n]of this.elementsCache)if(n===t){this.elementsCache.delete(e);break}return}this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(t,e,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}));return{disconnect:()=>{var n;(n=t())==null||n.disconnect(),e=null},observe:e=>t()?.observe(e,{box:`border-box`}),unobserve:e=>t()?.unobserve(e)}})(),this.range=null,this.setOptions=e=>{let t={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:xn,rangeExtractor:Sn,onChange:()=>{},measureElement:On,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:`data-index`,initialMeasurementsCache:[],lanes:1,anchorTo:`start`,followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:`estimate`,useCachedMeasurements:!1};for(let n in e){let r=e[n];r!==void 0&&(t[n]=r)}let n=this.options,r=null,i=null,a=!1;if(n!==void 0&&n.enabled&&t.enabled&&t.anchorTo===`end`&&this.scrollElement!==null){let e=n.count,o=t.count,s=this.getMeasurements(),c=e>0?s[0]?.key??n.getItemKey(0):null,l=e>0?s[e-1]?.key??n.getItemKey(e-1):null;if(o!==e||e>0&&o>0&&(t.getItemKey(0)!==c||t.getItemKey(o-1)!==l)){a=!0;let c=e>0?this.getVirtualItemForOffset(this.getScrollOffset())??s[0]:null;c&&(r=[c.key,this.getScrollOffset()-c.start]);let u=t.followOnAppend===!0?`auto`:t.followOnAppend||null;u&&o>e&&this.isAtEnd(n.scrollEndThreshold)&&(e===0||t.getItemKey(o-1)!==l)&&(i=u)}}this.options=t,a&&(this.pendingMin=0,this.itemSizeCacheVersion++);let o=!1,s=0;if(r&&this.scrollOffset!==null){let[e,t]=r,n=this.getMeasurements(),{count:i,getItemKey:a}=this.options,c=0;for(;c<i&&a(c)!==e;)c++;if(c<i){let e=n[c];if(e){let n=e.start+t;n!==this.scrollOffset&&(s=n-this.scrollOffset,this.scrollOffset=n,o=!0)}}}(o||i)&&(this.pendingScrollAnchor=[o?r[0]:null,o?r[1]:0,i,s])},this.notify=e=>{var t,n;(n=(t=this.options).onChange)==null||n.call(t,this,e)},this.maybeNotify=mn(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{let e=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==e){if(this.cleanup(),!e){this.maybeNotify();return}if(this.scrollElement=e,this.scrollElement&&`ownerDocument`in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=this.scrollElement?.window??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{if(t&&this._intendedScrollOffset===null&&e===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(e-this._intendedScrollOffset)<1.5&&(e=this._intendedScrollOffset),this._intendedScrollOffset=null,this.scrollAdjustments=0;let n=this.getScrollOffset();this.scrollDirection=t?n===e?this.scrollDirection:n<e?`forward`:`backward`:null,this.scrollOffset=e,this.isScrolling=t,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),`addEventListener`in this.scrollElement){let e=this.scrollElement,t=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},n=()=>{this._iosTouching=!1,!(!yn()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};e.addEventListener(`touchstart`,t,wn),e.addEventListener(`touchend`,n,wn),this.unsubs.push(()=>{e.removeEventListener(`touchstart`,t),e.removeEventListener(`touchend`,n),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}let t=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,t&&this.scrollElement&&this.options.enabled){let[e,n,r,i]=t;e!==null&&!r&&(yn()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?i!==0&&(this._iosDeferredAdjustment+=i):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),r&&this.scrollToEnd({behavior:r})}},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;let e=this.getScrollOffset(),t=this.getMaxScrollOffset();if(e<0||e>t)return;let n=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(e,{adjustments:this.scrollAdjustments+=n,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?`width`:`height`]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset==`function`?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{let n=new Map,r=new Map;for(let i=t-1;i>=0;i--){let t=e[i];if(n.has(t.lane))continue;let a=r.get(t.lane);if(a==null||t.end>a.end?r.set(t.lane,t):t.end<a.end&&n.set(t.lane,!0),n.size===this.options.lanes)break}return r.size===this.options.lanes?Array.from(r.values()).sort((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end)[0]:void 0},this.getMeasurementOptions=mn(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode],(e,t,n,r,i,a,o)=>(this.prevLanes!==void 0&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMin=null,{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o}),{key:!1}),this.getMeasurements=mn(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o},s)=>{let c=this.itemSizeCache;if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let l=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1),a===1){let i=this.options.gap,a=e*2,o=this._flatMeasurements;if(!o||o.length<a){let e=new Float64Array(a);o&&l>0&&e.set(o.subarray(0,l*2)),o=e,this._flatMeasurements=o}let s;if(l===0)s=t+n;else{let e=l-1;s=o[e*2]+o[e*2+1]+i}for(let t=l;t<e;t++){let e=r(t),n=c.get(e),a=typeof n==`number`?n:this.options.estimateSize(t);o[t*2]=s,o[t*2+1]=a,s+=a+i}let u=pn(e,o,r);return this.measurementsCache=u,u}let u=this.measurementsCache.slice(0,l),d=Array(a).fill(void 0);for(let e=0;e<l;e++){let t=u[e];t&&(d[t.lane]=e)}for(let i=l;i<e;i++){let e=r(i),a=this.laneAssignments.get(i),s,l,f=o===`estimate`||c.has(e);if(a!==void 0&&this.options.lanes>1){s=a;let e=d[s],r=e===void 0?void 0:u[e];l=r?r.end+this.options.gap:t+n}else{let e=this.options.lanes===1?u[i-1]:this.getFurthestMeasurement(u,i);l=e?e.end+this.options.gap:t+n,s=e?e.lane:i%this.options.lanes,this.options.lanes>1&&f&&this.laneAssignments.set(i,s)}let p=c.get(e),m=typeof p==`number`?p:this.options.estimateSize(i),h=l+m;u[i]={index:i,start:l,size:m,end:h,key:e,lane:s},d[s]=i}return this.measurementsCache=u,u},{key:!1,debug:()=>this.options.debug}),this.calculateRange=mn(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,r)=>e.length===0||t===0?(this.range=null,null):(this.range=Nn(e,t,n,r,r===1&&this._flatMeasurements!=null?this._flatMeasurements:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=mn(()=>{let e=null,t=null,n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,n,r,i)=>r===null||i===null?[]:e({startIndex:r,endIndex:i,overscan:t,count:n}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=e=>{if(!this.scrollState||this.scrollState.behavior!==`smooth`)return!0;let t=this.scrollState.index??this.getVirtualItemForOffset(this.scrollState.lastTargetOffset)?.index;if(t!==void 0&&this.range){let n=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),r=Math.max(0,t-n),i=Math.min(this.options.count-1,t+n);return e>=r&&e<=i}return!0},this.measureElement=e=>{if(!e){this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});return}let t=this.indexFromElement(e),n=this.options.getItemKey(t),r=this.elementsCache.get(n);r!==e&&(r&&this.observer.unobserve(r),this.observer.observe(e),this.elementsCache.set(n,e)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(t)&&this.resizeItem(t,this.options.measureElement(e,void 0,this))},this.resizeItem=(e,t)=>{if(e<0||e>=this.options.count)return;let n,r,i,a=this._flatMeasurements;if(this.options.lanes===1&&a!==null)i=this.options.getItemKey(e),r=a[e*2],n=a[e*2+1];else{let t=this.measurementsCache[e];if(!t)return;i=t.key,r=t.start,n=t.size}let o=t-(this.itemSizeCache.get(i)??n);if(o!==0){let a=this.options.anchorTo===`end`&&this.scrollState?.behavior!==`smooth`&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,s=a?this.getTotalSize():0,c=this.scrollState?.behavior!==`smooth`&&(this.shouldAdjustScrollPositionOnItemSizeChange===void 0?r<this.getScrollOffset()+this.scrollAdjustments&&(!this.itemSizeCache.has(i)||this.scrollDirection!==`backward`):this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[e]??{index:e,key:i,start:r,size:n,end:r+n,lane:0},o,this));(this.pendingMin===null||e<this.pendingMin)&&(this.pendingMin=e),this.itemSizeCache.set(i,t),this.itemSizeCacheVersion++,a?this.applyScrollAdjustment(this.getTotalSize()-s):c&&this.applyScrollAdjustment(o),this.notify(!1)}},this.getVirtualItems=mn(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let n=[];for(let r=0,i=e.length;r<i;r++){let i=t[e[r]];n.push(i)}return n},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(t.length===0)return;let n=this._flatMeasurements,r=this.options.lanes===1&&n!=null;return hn(t[jn(0,t.length-1,r?e=>n[e*2]:e=>hn(t[e]).start,e)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if(`scrollHeight`in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{let e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(e=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=e,this.getOffsetForAlignment=(e,t,n=0)=>{if(!this.scrollElement)return 0;let r=this.getSize(),i=this.getScrollOffset();t===`auto`&&(t=e>=i+r?`end`:`start`),t===`center`?e+=(n-r)/2:t===`end`&&(e-=r);let a=this.getMaxScrollOffset();return Math.max(Math.min(a,e),0)},this.getOffsetForIndex=(e,t=`auto`)=>{e=Math.max(0,Math.min(e,this.options.count-1));let n=this.getSize(),r=this.getScrollOffset(),i=this.measurementsCache[e];if(!i)return;if(t===`auto`)if(i.end>=r+n-this.options.scrollPaddingEnd)t=`end`;else if(i.start<=r+this.options.scrollPaddingStart)t=`start`;else return[r,t];if(t===`end`&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];let a=t===`end`?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,t,i.size),t]},this.scrollToOffset=(e,{align:t=`start`,behavior:n=`auto`}={})=>{let r=this.getOffsetForAlignment(e,t),i=this.now();this.scrollState={index:null,align:t,behavior:n,startedAt:i,lastTargetOffset:r,stableFrames:0},this._scrollToOffset(r,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollToIndex=(e,{align:t=`auto`,behavior:n=`auto`}={})=>{e=Math.max(0,Math.min(e,this.options.count-1));let r=this.getOffsetForIndex(e,t);if(!r)return;let[i,a]=r,o=this.now();this.scrollState={index:e,align:a,behavior:n,startedAt:o,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollBy=(e,{behavior:t=`auto`}={})=>{let n=this.getScrollOffset()+e,r=this.now();this.scrollState={index:null,align:`start`,behavior:t,startedAt:r,lastTargetOffset:n,stableFrames:0},this._scrollToOffset(n,{adjustments:void 0,behavior:t}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:e=`auto`}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:`end`,behavior:e});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:e})},this.getTotalSize=()=>{let e=this.getMeasurements(),t;if(e.length===0)t=this.options.paddingStart;else if(this.options.lanes===1){let n=e.length-1,r=this._flatMeasurements;t=r==null?e[n]?.end??0:r[n*2]+r[n*2+1]}else{let n=Array(this.options.lanes).fill(null),r=e.length-1;for(;r>=0&&n.some(e=>e===null);){let t=e[r];n[t.lane]===null&&(n[t.lane]=t.end),r--}t=Math.max(...n.filter(e=>e!==null))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{let e=[];if(this.itemSizeCache.size===0)return e;let t=this.getMeasurements();for(let n of t)n&&this.itemSizeCache.has(n.key)&&e.push({index:n.index,key:n.key,start:n.start,size:n.size,end:n.end,lane:n.lane});return e},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this._intendedScrollOffset=e+(t??0),this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(e)}applyScrollAdjustment(e,t){e!==0&&(yn()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?this._iosDeferredAdjustment+=e:(this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=e,behavior:t}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollAdjustments=0)))}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId??=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()})}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}let e=this.scrollState.index==null?void 0:this.getOffsetForIndex(this.scrollState.index,this.scrollState.align),t=e?e[0]:this.scrollState.lastTargetOffset,n=t!==this.scrollState.lastTargetOffset;if(!n&&gn(t,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=1){this.getScrollOffset()!==t&&this._scrollToOffset(t,{adjustments:void 0,behavior:`auto`}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,n){let e=this.getSize()||600,n=Math.abs(t-this.getScrollOffset()),r=this.scrollState.behavior===`smooth`&&n>e;this.scrollState.lastTargetOffset=t,r||(this.scrollState.behavior=`auto`),this._scrollToOffset(t,{adjustments:void 0,behavior:r?`smooth`:`auto`})}this.scheduleScrollReconcile()}},jn=(e,t,n,r)=>{for(;e<=t;){let i=(e+t)/2|0,a=n(i);if(a<r)e=i+1;else if(a>r)t=i-1;else return i}return e>0?e-1:0};function Mn(e,t,n){let r=0;for(;r<=t;){let i=(r+t)/2|0,a=e[i*2];if(a<n)r=i+1;else if(a>n)t=i-1;else return i}return r>0?r-1:0}function Nn(e,t,n,r,i){let a=e.length-1;if(e.length<=r)return{startIndex:0,endIndex:a};if(r===1&&i!==null){let e=Mn(i,a,n),r=e,o=n+t;for(;r<a&&i[r*2]+i[r*2+1]<o;)r++;return{startIndex:e,endIndex:r}}let o=jn(0,a,t=>e[t].start,n),s=o;if(r===1)for(;s<a&&e[s].end<n+t;)s++;else if(r>1){let i=Array(r).fill(0);for(;s<a&&i.some(e=>e<n+t);){let t=e[s];i[t.lane]=t.end,s++}let c=Array(r).fill(n+t);for(;o>=0&&c.some(e=>e>=n);){let t=e[o];c[t.lane]=t.start,o--}o=Math.max(0,o-o%r),s=Math.min(a,s+(r-1-s%r))}return{startIndex:o,endIndex:s}}var Pn=typeof document<`u`?_.useLayoutEffect:_.useEffect;function Fn({useFlushSync:e=!0,directDomUpdates:t=!1,directDomUpdatesMode:n=`transform`,...r}){let i=_.useReducer(e=>e+1,0)[1],a=_.useRef({enabled:t,mode:n,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});a.current.enabled=t,a.current.mode=n;let o=e=>{let t=a.current;if(!t.enabled||!t.container)return;let n=e.getTotalSize();if(n!==t.lastSize){t.lastSize=n;let r=e.options.horizontal?`width`:`height`;t.container.style[r]=`${n}px`}let r=!!e.options.horizontal,i=t.mode===`transform`,o=r?`left`:`top`,s=e.options.scrollMargin,c=e.getVirtualItems();for(let n of c){let a=n.start-s,c=e.elementsCache.get(n.key);c&&t.lastPositions.get(c)!==a&&(t.lastPositions.set(c,a),i?c.style.transform=r?`translate3d(${a}px, 0, 0)`:`translate3d(0, ${a}px, 0)`:c.style[o]=`${a}px`)}},s={...r,onChange:(t,n)=>{var s;let c=a.current,l=!0;if(c.enabled){o(t);let e=t.range,n=c.prevRange;l=!n||n.isScrolling!==t.isScrolling||n.startIndex!==e?.startIndex||n.endIndex!==e?.endIndex,l&&(c.prevRange=e?{startIndex:e.startIndex,endIndex:e.endIndex,isScrolling:t.isScrolling}:null)}l&&(e&&n?(0,fn.flushSync)(i):i()),(s=r.onChange)==null||s.call(r,t,n)}},[c]=_.useState(()=>{let e=new An(s);return Object.assign(e,{containerRef:t=>{let n=a.current;if(n.container=t,n.lastSize=null,t&&n.enabled){let r=e.getTotalSize();n.lastSize=r;let i=e.options.horizontal?`width`:`height`;t.style[i]=`${r}px`}}})});return c.setOptions(s),Pn(()=>c._didMount(),[]),Pn(()=>c._willUpdate()),Pn(()=>{o(c)}),c}function In(e){return Fn({observeElementRect:Cn,observeElementOffset:Dn,scrollToFn:kn,...e})}function Ln({item:e,availableModels:t,selectedModels:n,modelsLoading:r=!1,modelsLoadFailed:i=!1,onRetryModels:a}){let o=U(),[s,c]=(0,_.useState)(``),[l,u]=(0,_.useState)(null),d=(0,_.useRef)(null),f=(0,_.useMemo)(()=>new Set(n),[n]),p=(0,_.useMemo)(()=>Bt(t,e.defaultModel,s),[t,e.defaultModel,s]),m=p.length>40,h=In({count:m?p.length:0,getScrollElement:()=>d.current,estimateSize:()=>36,overscan:12}),g=async e=>{try{await navigator.clipboard.writeText(e),u(e),window.setTimeout(()=>u(t=>t===e?null:t),1200)}catch{}},v=(t,n)=>{let r=t===e.defaultModel,i=f.has(t);return(0,S.jsxs)(`div`,{className:`pws-model-row`,style:n,children:[(0,S.jsx)(`span`,{className:`pws-model-id`,title:t,children:t}),(0,S.jsxs)(`span`,{className:`pws-model-meta`,children:[r?(0,S.jsx)(`span`,{className:`pws-model-flag`,children:o(`prov.defaultBadge`)}):null,i?(0,S.jsx)(`span`,{className:`pws-model-flag pws-model-flag--selected`,children:o(`pws.selected`)}):null,(0,S.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>{g(t)},"aria-label":o(`pws.copyModelId`),children:o(l===t?`pws.modelCopied`:`pws.copyModelId`)})]})]},t)},y=t.length===0&&!e.defaultModel;return(0,S.jsxs)(`div`,{className:`pws-section`,children:[(0,S.jsxs)(`div`,{className:`pws-section-head`,children:[(0,S.jsx)(`h3`,{className:`pws-section-title`,children:o(`pws.tab.models`)}),p.length>0&&(0,S.jsx)(`span`,{className:`muted`,children:o(`pws.modelsAvailable`,{count:p.length})})]}),!y&&(0,S.jsx)(`input`,{type:`search`,className:`input pws-model-search`,placeholder:o(`pws.modelSearchPlaceholder`),value:s,onChange:e=>c(e.target.value),"aria-label":o(`pws.modelSearchPlaceholder`)}),r&&y?(0,S.jsx)(`p`,{className:`muted`,role:`status`,children:o(`pws.modelsLoading`)}):i&&y?(0,S.jsxs)(`div`,{role:`alert`,className:`pws-inline-error`,children:[(0,S.jsx)(`span`,{children:o(`pws.modelsLoadFailed`)}),a&&(0,S.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:a,children:o(`pws.retry`)})]}):y?(0,S.jsx)(`p`,{className:`muted`,children:o(`pws.noModels`)}):p.length===0?(0,S.jsx)(`p`,{className:`muted`,role:`status`,children:o(`pws.noModelMatch`)}):m?(0,S.jsx)(`div`,{ref:d,className:`pws-model-list pws-model-list--virtual`,children:(0,S.jsx)(`div`,{style:{height:h.getTotalSize(),position:`relative`},children:h.getVirtualItems().map(e=>v(p[e.index],{position:`absolute`,top:0,left:0,width:`100%`,height:e.size,transform:`translateY(${String(e.start)}px)`}))})}):(0,S.jsx)(`div`,{className:`pws-model-list`,children:p.map(e=>v(e))})]})}function Rn({item:e,usageTotals:t,quotaReport:n}){let r=U(),{locale:i}=H(),a=wt(r),o=t?.requests!==void 0,s=Rt(n);return(0,S.jsxs)(`div`,{className:`pws-section`,children:[(0,S.jsxs)(`div`,{className:`pws-usage-block`,children:[(0,S.jsx)(`h3`,{className:`pws-section-title`,children:r(`pws.usageLast30d`)}),o?(0,S.jsxs)(`div`,{className:`pws-usage-metrics`,role:`group`,"aria-label":r(`pws.usageLast30d`),children:[(0,S.jsxs)(`div`,{className:`pws-usage-metric`,children:[(0,S.jsx)(`span`,{className:`pws-usage-metric-value`,children:Tt(t?.requests,i)}),(0,S.jsx)(`span`,{className:`muted`,children:r(`pws.metricRequests`)})]}),(0,S.jsxs)(`div`,{className:`pws-usage-metric`,children:[(0,S.jsx)(`span`,{className:`pws-usage-metric-value`,children:Et(t?.totalTokens,i)}),(0,S.jsx)(`span`,{className:`muted`,children:r(`pws.metricTokens`)})]})]}):(0,S.jsx)(`p`,{className:`muted`,children:r(`pws.usageUnavailable`)})]}),(0,S.jsxs)(`div`,{className:`pws-usage-block`,children:[(0,S.jsx)(`h3`,{className:`pws-section-title`,children:r(`pws.rateLimits`)}),s?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(Zt,{quota:s,plan:null,threshold:80,t:r,layout:`stacked`}),(0,S.jsxs)(`dl`,{className:`pws-kv pws-usage-meta`,children:[n?.source?.trim()&&(0,S.jsxs)(`div`,{className:`pws-kv-row`,children:[(0,S.jsx)(`dt`,{children:r(`pws.stats.source`)}),(0,S.jsx)(`dd`,{children:zt(n.source)})]}),(0,S.jsxs)(`div`,{className:`pws-kv-row`,children:[(0,S.jsx)(`dt`,{children:r(`pws.stats.quotaUpdated`)}),(0,S.jsx)(`dd`,{children:Ct(n?.updatedAt,a)})]})]})]}):(0,S.jsx)(`p`,{className:`muted`,children:r(`pws.quotaUnavailable`)})]})]})}function zn({apiBase:e,onClose:t,onAdded:n}){let r=U(),i=(0,_.useRef)(!0),a=(0,_.useRef)(null),o=(0,_.useRef)(null),s=(0,_.useRef)(null);(0,_.useEffect)(()=>()=>{i.current=!1,a.current&&=(clearInterval(a.current),null),o.current&&=(clearTimeout(o.current),null)},[]);let[c,l]=(0,_.useState)(`pick`),[u,d]=(0,_.useState)(``),[f,p]=(0,_.useState)(``),[m,h]=(0,_.useState)(``),[g,v]=(0,_.useState)(!1),y=(0,_.useRef)(null),b=(0,_.useRef)(null),x=(0,_.useCallback)(()=>{a.current&&=(clearInterval(a.current),null),o.current&&=(clearTimeout(o.current),null)},[]),C=(0,_.useCallback)(async()=>{let t=s.current;s.current=null,h(``),x(),t&&await fetch(`${e}/api/codex-auth/login/cancel`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({flowId:t})}).catch(()=>{})},[e,x]),w=(0,_.useCallback)(()=>{c===`oauth-waiting`&&C(),t()},[c,t,C]);return(0,_.useEffect)(()=>{y.current=document.activeElement;let e=b.current;if(e){let t=e.querySelector(`input:not([disabled]), button:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex='-1'])`);t&&t.focus()}return()=>{y.current?.focus()}},[]),(0,_.useEffect)(()=>{let e=e=>{e.key===`Escape`&&w()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[w]),(0,S.jsx)(`div`,{role:`dialog`,"aria-modal":`true`,"aria-label":r(`codexAuth.addTitle`),className:`modal-overlay`,onClick:w,children:(0,S.jsxs)(`div`,{ref:b,className:`modal-card`,onClick:e=>e.stopPropagation(),style:{maxWidth:440},children:[c===`pick`&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`h3`,{style:{marginBottom:4},children:r(`codexAuth.addTitle`)}),(0,S.jsx)(`p`,{className:`modal-desc`,children:r(`codexAuth.addPickDesc`)}),(0,S.jsx)(`label`,{className:`field-label`,children:r(`codexAuth.addIdLabel`)}),(0,S.jsx)(`input`,{className:`input`,placeholder:r(`codexAuth.addIdPlaceholder`),value:u,onChange:e=>d(e.target.value),style:{marginBottom:12}}),(0,S.jsx)(`button`,{className:`list-row`,onClick:async()=>{p(``);try{let c=u.trim(),d=await fetch(`${e}/api/codex-auth/login`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(c?{id:c}:{})}),f=await d.json();if(d.status===409){p(r(`codexAuth.oauthAlreadyInProgress`));return}if(f.url){s.current=f.flowId??null,h(f.url),l(`oauth-waiting`),x();let u=f.flowId??``,d=u?`${e}/api/codex-auth/login-status?flowId=${encodeURIComponent(u)}${c?`&accountId=${encodeURIComponent(c)}`:``}`:`${e}/api/codex-auth/login-status`;a.current=setInterval(async()=>{try{let e=await fetch(d).then(e=>e.json());e.status===`done`?(x(),s.current=null,n(),t()):(e.status===`error`||e.status===`expired`)&&(x(),s.current=null,i.current&&(l(`pick`),p(e.error??`Login failed`)))}catch{}},2e3),o.current=setTimeout(()=>{a.current&&(C(),i.current&&(l(`pick`),p(r(`modal.loginTimeout`))))},3e5)}f.error&&!f.url&&p(f.error)}catch(e){p(String(e))}},style:{marginBottom:8},children:(0,S.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,S.jsx)(de,{width:20}),(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`div`,{className:`title`,children:r(`codexAuth.oauthLogin`)}),(0,S.jsx)(`div`,{className:`sub`,children:r(`codexAuth.oauthDesc`)})]})]})}),f&&(0,S.jsx)(`div`,{className:`notice notice-err`,style:{marginTop:8},children:f}),(0,S.jsx)(`button`,{className:`btn btn-ghost`,onClick:w,style:{width:`100%`},children:r(`codexAuth.cancel`)})]}),c===`oauth-waiting`&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`h3`,{style:{marginBottom:4},children:r(`codexAuth.oauthLogin`)}),(0,S.jsx)(`p`,{className:`modal-desc`,children:r(`codexAuth.oauthWaiting`)}),(0,S.jsxs)(`button`,{className:`btn btn-ghost`,onClick:async()=>{if(m)try{if(navigator.clipboard?.writeText)await navigator.clipboard.writeText(m);else{let e=document.createElement(`textarea`);e.value=m,e.style.position=`fixed`,e.style.opacity=`0`,document.body.appendChild(e),e.select(),document.execCommand(`copy`),document.body.removeChild(e)}v(!0),setTimeout(()=>{i.current&&v(!1)},2500)}catch{p(r(`codexAuth.loginLinkCopyFailed`))}},disabled:!m,style:{width:`100%`,justifyContent:`center`,marginTop:12},children:[(0,S.jsx)(ce,{width:14}),` `,r(g?`codexAuth.loginLinkCopied`:`codexAuth.copyLoginLink`)]}),f&&(0,S.jsx)(`div`,{className:`notice notice-err`,style:{marginTop:12},children:f}),(0,S.jsx)(`div`,{style:{textAlign:`center`,padding:`24px 0`},children:(0,S.jsx)(`span`,{className:`spin`,style:{width:24,height:24}})}),(0,S.jsx)(`button`,{className:`btn btn-ghost`,onClick:w,style:{width:`100%`},children:r(`codexAuth.cancel`)})]})]})})}function Bn({apiBase:e,accountModeState:t=null,banner:n=null,embedded:r=!1}){let i=U(),[a,o]=(0,_.useState)([]),[s,c]=(0,_.useState)(null),[l,u]=(0,_.useState)(80),[d,f]=(0,_.useState)(null),[p,m]=(0,_.useState)(!1),[h,g]=(0,_.useState)(``),[v,y]=(0,_.useState)(!1),[b,x]=(0,_.useState)(!1),[C,w]=(0,_.useState)(null),[T,E]=(0,_.useState)(!1),[D,O]=(0,_.useState)(!1),[k,A]=(0,_.useState)(null),[j,M]=(0,_.useState)(!1),[F,L]=(0,_.useState)(`loading`),[te,ne]=(0,_.useState)(null),R=(0,_.useRef)(0),z=(0,_.useCallback)(async(t=!1)=>{let n=++R.current;t||L(`loading`);try{let[r,i]=await Promise.all([fetch(`${e}/api/codex-auth/accounts${t?`?refresh=1`:``}`),fetch(`${e}/api/codex-auth/active`)]);if(!r.ok||!i.ok)throw Error(`account load failed`);let[a,s]=await Promise.all([r.json(),i.json()]);return R.current===n?(o(a.accounts??[]),c(s.activeCodexAccountId??null),u(s.autoSwitchThreshold??80),L(`ready`),!0):!1}catch{return R.current===n&&L(`error`),!1}},[e]);(0,_.useEffect)(()=>{let e=window.setTimeout(()=>{z()},0),t=window.setInterval(()=>{z()},3e4);return()=>{window.clearTimeout(e),window.clearInterval(t)}},[z]);let B=async n=>{if(!te){ne(n??`__main__`);try{let r=await fetch(`${e}/api/codex-auth/active`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({accountId:n})});if(!r.ok)throw Error(`account switch failed`);let o=(await r.json().catch(()=>({}))).activeCodexAccountId??n;c(o),f(null),await z();let s=o&&o!==`__main__`?a.find(e=>e.id===o)?.email??i(`pws.accountOrdinal`,{count:`1`}):i(`codexAuth.mainAccount`);g(i(t===`direct`?`codexAuth.poolPreparedToast`:`codexAuth.switched`,{email:s})),y(!1),setTimeout(()=>g(``),5e3)}catch{g(i(`codexAuth.switchFailed`)),y(!0),setTimeout(()=>g(``),5e3)}finally{ne(null)}}},re=async t=>{let n=a.find(e=>e.id===t)?.email??i(`pws.accountOrdinal`,{count:`1`});if(window.confirm(i(`codexAuth.removeConfirm`,{id:n})))try{let n=await fetch(`${e}/api/codex-auth/accounts?id=${encodeURIComponent(t)}`,{method:`DELETE`});if(!n.ok)throw Error(String(n.status));await z()}catch{g(i(`codexAuth.removeFailed`)),y(!0),setTimeout(()=>g(``),5e3)}},ie=async()=>{let t=l>0?0:80;await fetch(`${e}/api/codex-auth/auto-switch`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({threshold:t})}),u(t)},ae=async()=>{x(!0);try{g(i(await z(!0)?`codexAuth.quotaRefreshed`:`codexAuth.quotaRefreshFailed`)),setTimeout(()=>g(``),5e3)}finally{x(!1)}},ce=async t=>{w(t),E(!1),A(null),M(!0);try{let n=await fetch(`${e}/api/codex-auth/reset-credits?accountId=${encodeURIComponent(t.id)}`);n.ok&&A(((await n.json()).credits??[]).sort((e,t)=>new Date(e.granted_at).getTime()-new Date(t.granted_at).getTime()))}catch{}finally{M(!1)}},le=async t=>{O(!0);try{let n=await fetch(`${e}/api/codex-auth/reset-credits/consume`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({accountId:t})});if(!n.ok){alert(i(`codexAuth.resetError`));return}let r=await n.json();if(r.code===`reset`||r.code===`already_redeemed`){let e=C?.quota?.resetCredits??1;w(null),E(!1),await z(!0),g(i(`codexAuth.resetSuccess`,{remaining:String(Math.max(0,e-1))})),setTimeout(()=>g(``),5e3)}else r.code===`nothing_to_reset`?alert(i(`codexAuth.resetNothingToReset`)):r.code===`no_credit`?alert(i(`codexAuth.resetNoCredit`)):alert(i(`codexAuth.resetError`))}catch{alert(i(`codexAuth.resetError`))}finally{O(!1)}},V=a.find(e=>e.isMain),ue=a.filter(e=>!e.isMain),de=e=>s===e,fe=!s||s===`__main__`,pe={id:`__main__`,email:V?.email??`Codex App`,plan:V?.plan,isMain:!0,hasCredential:!0,quota:V?.quota??null},me=i(t===`direct`?`codexAuth.prepareForPool`:`codexAuth.setAsNext`);return(0,S.jsxs)(`div`,{children:[!r&&(0,S.jsxs)(`div`,{className:`page-head`,children:[(0,S.jsx)(`h2`,{className:`page-title`,children:i(`nav.codexAuth`)}),(0,S.jsxs)(`button`,{className:`btn btn-sm btn-ghost`,onClick:ae,disabled:b,children:[(0,S.jsx)(ee,{width:14}),` `,i(b?`codexAuth.refreshingQuota`:`codexAuth.refreshQuota`)]})]}),h&&(0,S.jsx)(W,{tone:v?`err`:`ok`,children:h}),F===`loading`&&a.length===0&&(0,S.jsx)(`div`,{className:`pwi-auth-state`,role:`status`,children:i(`pws.accountsLoading`)}),F===`error`&&(0,S.jsxs)(`div`,{className:`pwi-auth-state pwi-auth-state--error`,role:`alert`,children:[(0,S.jsx)(`span`,{children:i(`codexAuth.loadFailed`)}),(0,S.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>void z(),children:i(`pws.retryAccounts`)})]}),n,(0,S.jsxs)(`div`,{className:`card ${fe?`card-active`:``}`,style:{marginBottom:12},children:[(0,S.jsxs)(`div`,{className:`card-head`,children:[(0,S.jsx)(`span`,{className:`dot dot-green`}),(0,S.jsx)(`strong`,{children:i(`codexAuth.mainAccount`)}),(0,S.jsxs)(`span`,{className:`card-badges`,children:[V&&(0,S.jsx)(Wn,{t:i,account:{...V,id:`__main__`},onClick:()=>ce({...V,id:`__main__`})}),(0,S.jsx)(`span`,{className:`badge ${fe?`badge-primary`:`badge-muted`}`,children:i(fe?t===`direct`?`codexAuth.poolPrepared`:`codexAuth.nextSession`:`codexAuth.current`)})]}),!fe&&(0,S.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm codex-account-switch`,onClick:()=>f(pe),children:me}),(0,S.jsxs)(`span`,{className:`card-right`,children:[(0,S.jsx)(oe,{width:14}),` `,i(`codexAuth.appLogin`)]})]}),(0,S.jsxs)(`div`,{className:`card-sub`,children:[V?.email??`Codex App login`,V?.plan?` · ${V.plan}`:``]}),V?.quota&&(0,S.jsx)(Zt,{quota:V.quota,plan:V.plan,threshold:l,t:i})]}),(0,S.jsxs)(`div`,{className:`section-sep`,children:[(0,S.jsx)(`span`,{className:`section-label`,children:i(`codexAuth.accountPool`)}),(0,S.jsx)(`div`,{className:`sep-line`}),(0,S.jsxs)(`button`,{className:`btn btn-sm btn-ghost`,onClick:()=>m(!0),children:[(0,S.jsx)(P,{width:14}),` `,i(`codexAuth.add`)]})]}),ue.length===0&&(0,S.jsx)(Ae,{title:i(`codexAuth.noPool`)}),ue.map(e=>(0,S.jsxs)(`div`,{className:`card ${de(e.id)?`card-active`:``}`,style:{marginBottom:8},children:[(0,S.jsxs)(`div`,{className:`card-head`,children:[(0,S.jsx)(`span`,{className:`dot ${e.needsReauth?`dot-amber`:de(e.id)?`dot-blue`:`dot-muted`}`}),(0,S.jsx)(`strong`,{children:e.email}),(0,S.jsxs)(`span`,{className:`card-badges`,children:[e.plan&&(0,S.jsx)(`span`,{className:`badge badge-green`,children:e.plan}),(0,S.jsx)(Wn,{t:i,account:e,onClick:()=>ce(e)}),e.needsReauth&&(0,S.jsx)(`span`,{className:`badge badge-amber`,children:i(`codexAuth.needsReauth`)}),de(e.id)&&!e.needsReauth&&(0,S.jsx)(`span`,{className:`badge badge-primary`,children:i(t===`direct`?`codexAuth.poolPrepared`:`codexAuth.nextSession`)})]}),!de(e.id)&&!e.needsReauth&&(0,S.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm codex-account-switch`,onClick:()=>f(e),children:me}),(0,S.jsx)(`button`,{className:`btn-icon btn-icon-danger card-right`,"aria-label":`${i(`common.remove`)} — ${e.email}`,title:`${i(`common.remove`)} — ${e.email}`,onClick:t=>{t.stopPropagation(),re(e.id)},children:(0,S.jsx)(N,{width:14})})]}),e.needsReauth?(0,S.jsx)(`div`,{className:`card-sub faint`,children:i(`codexAuth.tokenExpired`)}):(0,S.jsx)(Zt,{quota:e.quota,plan:e.plan,threshold:l,t:i})]},e.id)),(0,S.jsxs)(`div`,{className:`card card-row`,style:{marginTop:16},children:[(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`strong`,{children:i(`codexAuth.autoSwitch`)}),(0,S.jsx)(`div`,{className:`card-sub`,children:i(`codexAuth.autoSwitchDesc`)})]}),(0,S.jsx)(`button`,{className:`toggle ${l>0?`on`:``}`,onClick:ie,"aria-pressed":l>0,"aria-label":i(`codexAuth.autoSwitch`),title:i(`codexAuth.autoSwitch`),children:(0,S.jsx)(`span`,{className:`toggle-knob`})})]}),d&&(0,S.jsx)(`div`,{className:`modal-overlay`,onClick:()=>f(null),children:(0,S.jsxs)(`div`,{className:`modal-card`,onClick:e=>e.stopPropagation(),children:[(0,S.jsx)(`h3`,{children:t===`direct`?i(`codexAuth.preparePoolTitle`):d.id===`__main__`?i(`codexAuth.switchBack`):i(`codexAuth.switchTitle`)}),(0,S.jsx)(`p`,{className:`modal-desc`,children:t===`direct`?i(`codexAuth.preparePoolDesc`):d.id===`__main__`?i(`codexAuth.switchBackDesc`):i(`codexAuth.switchDesc`)}),(0,S.jsxs)(`div`,{className:`card`,style:{margin:`12px 0`},children:[(0,S.jsx)(`strong`,{children:d.id===`__main__`?V?.email:d.email}),d.plan&&(0,S.jsx)(`span`,{className:`badge badge-green`,style:{marginLeft:8},children:d.plan})]}),d.id!==`__main__`&&(0,S.jsxs)(`div`,{className:`notice-warn`,children:[(0,S.jsx)(I,{width:14}),` `,i(`codexAuth.cacheWarning`)]}),(0,S.jsxs)(`div`,{className:`modal-actions`,children:[(0,S.jsx)(`button`,{className:`btn btn-ghost`,onClick:()=>f(null),children:i(`codexAuth.cancel`)}),(0,S.jsx)(`button`,{className:`btn btn-primary`,disabled:!!te,onClick:()=>B(d.id===`__main__`?`__main__`:d.id),children:i(te?`pws.accountSwitching`:t===`direct`?`codexAuth.prepareForPool`:`codexAuth.setAsNext`)})]})]})}),C&&(0,S.jsx)(`div`,{className:`modal-overlay`,onClick:()=>{w(null),E(!1),A(null)},children:(0,S.jsx)(`div`,{className:`modal-card`,onClick:e=>e.stopPropagation(),children:T?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`div`,{style:{textAlign:`center`,padding:`12px 0`},children:[(0,S.jsx)(`div`,{className:`confirm-icon`,children:(0,S.jsx)(I,{width:22})}),(0,S.jsx)(`h3`,{children:i(`codexAuth.confirmResetTitle`)}),(0,S.jsx)(`p`,{className:`modal-desc`,children:i(`codexAuth.confirmResetDesc`,{count:String(C.quota?.resetCredits??0)})}),k&&k[0]&&(0,S.jsx)(`p`,{className:`faint text-label`,children:i(`codexAuth.confirmWhichCredit`,{date:Vn(k[0].granted_at)})}),(0,S.jsx)(`p`,{className:`faint text-label`,children:i(`codexAuth.irreversible`)})]}),(0,S.jsxs)(`div`,{className:`modal-actions`,children:[(0,S.jsx)(`button`,{className:`btn btn-ghost`,onClick:()=>E(!1),children:i(`codexAuth.cancel`)}),(0,S.jsx)(`button`,{className:`btn btn-primary`,onClick:()=>le(C.id),disabled:D,children:i(D?`codexAuth.redeeming`:`codexAuth.useCredit`)})]})]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`h3`,{children:[(0,S.jsx)(se,{width:16}),` `,i(`codexAuth.resetCreditsTitle`)]}),(0,S.jsxs)(`div`,{className:`card-sub`,children:[C.email,C.plan?` · ${C.plan}`:``]}),(0,S.jsx)(`div`,{style:{margin:`16px 0`},children:(C.quota?.resetCredits??0)>0?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`p`,{style:{marginBottom:12},children:i(`codexAuth.resetCreditsAvailable`,{count:String(C.quota?.resetCredits??0)})}),j&&(0,S.jsx)(`p`,{className:`faint text-label`,children:i(`common.loading`)}),k&&k.length>0&&(0,S.jsx)(`div`,{className:`credit-list`,children:k.map((e,t)=>(0,S.jsx)(Un,{index:t,grantedAt:e.granted_at,expiresAt:e.expires_at,isNext:t===0,t:i},t))}),(0,S.jsx)(`button`,{className:`btn btn-primary`,style:{marginTop:12,width:`100%`},onClick:()=>E(!0),disabled:D,children:i(`codexAuth.useOneCredit`)}),(0,S.jsx)(`p`,{className:`card-sub text-caption`,style:{marginTop:8,textAlign:`center`},children:i(`codexAuth.fifoNote`)})]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`p`,{className:`faint`,children:i(`codexAuth.noResetCredits`)}),(0,S.jsx)(`p`,{className:`modal-desc`,children:i(`codexAuth.earnCreditsHint`)})]})})]})})}),p&&(0,S.jsx)(zn,{apiBase:e,onClose:()=>m(!1),onAdded:()=>{z(),g(i(`codexAuth.accountAdded`)),setTimeout(()=>g(``),5e3)}})]})}function Vn(e){let t=new Date(e);return new Intl.DateTimeFormat(void 0,{month:`short`,day:`numeric`,year:`numeric`}).format(t)}function Hn(e){return Math.max(0,Math.ceil((new Date(e).getTime()-Date.now())/864e5))}function Un({index:e,grantedAt:t,expiresAt:n,isNext:r,t:i}){let a=Hn(n),o=a<=7;return(0,S.jsxs)(`div`,{className:`credit-item${r?` credit-next`:``}`,children:[(0,S.jsxs)(`div`,{className:`credit-item-head`,children:[(0,S.jsx)(se,{width:13}),(0,S.jsx)(`span`,{className:`credit-item-label`,children:r?i(`codexAuth.creditNext`):i(`codexAuth.creditLabel`,{n:String(e+1)})}),r&&(0,S.jsx)(`span`,{className:`badge badge-amber text-micro`,style:{padding:`1px 6px`},children:i(`codexAuth.creditNextBadge`)})]}),(0,S.jsxs)(`div`,{className:`credit-item-dates`,children:[(0,S.jsx)(`span`,{children:i(`codexAuth.creditGranted`,{date:Vn(t)})}),(0,S.jsx)(`span`,{className:o?`credit-urgent`:``,children:i(`codexAuth.creditExpires`,{date:Vn(n),days:String(a)})})]})]})}function Wn({account:e,onClick:t,t:n}){let r=e.quota?.resetCredits;return r===void 0?null:(0,S.jsxs)(`button`,{type:`button`,className:`badge ${typeof r==`number`&&r>0?`badge-amber`:`badge-muted`} badge-clickable`,onClick:e=>{e.stopPropagation(),t()},"aria-label":n(`codexAuth.resetCreditsAria`,{count:String(r)}),children:[(0,S.jsx)(se,{width:12}),r]})}function Gn({item:e,apiBase:t,oauth:n,accounts:r=[],keys:i=[],accountLoadState:a=`ready`,switchingAccountId:o=null,busy:s=!1,loginHint:c,authHandlers:l}){let u=U(),[d,f]=(0,_.useState)(!1),[p,m]=(0,_.useState)(``),[h,g]=(0,_.useState)(!1),v=cn({...e,hasApiKey:e.hasApiKey||i.length>0}),y=v===`oauth-accounts`,b=v===`api-keys`;if(v===`codex-accounts`)return(0,S.jsxs)(`section`,{className:`pwi-section pwi-auth-section`,"aria-label":u(`pws.availableAccounts`),children:[(0,S.jsx)(`h3`,{className:`pwi-section-title`,children:u(`pws.availableAccounts`)}),(0,S.jsx)(`div`,{className:`pwi-auth-body`,children:(0,S.jsx)(Bn,{apiBase:t,embedded:!0})})]});if(!v||!l)return null;let x=c?.provider===e.name?c:null,C=r.length>0||n?.loggedIn===!0,w=async()=>{let t=p.trim();if(!t)return;g(!0);let n=await l.onAddApiKey(e.name,t);g(!1),n&&(m(``),f(!1))};return(0,S.jsxs)(`section`,{className:`pwi-section pwi-auth-section`,"aria-label":u(y?`pws.availableAccounts`:`pws.apiKeys`),children:[(0,S.jsx)(`h3`,{className:`pwi-section-title`,children:u(y?`pws.availableAccounts`:`pws.apiKeys`)}),(0,S.jsxs)(`div`,{className:`pwi-auth-body`,children:[y&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`div`,{className:`pwi-auth-status-row`,children:[(0,S.jsx)(`span`,{className:`pwi-auth-dot ${C?`pwi-auth-dot--ok`:`pwi-auth-dot--off`}`,"aria-hidden":`true`}),(0,S.jsx)(`span`,{className:`pwi-auth-status-text`,children:C?r.length>0?u(`pws.loggedInTitle`):n?.email??u(`pws.loggedInTitle`):n?.error||u(`pws.notLoggedInTitle`)}),(0,S.jsx)(`span`,{className:`pwi-auth-actions`,children:C?(0,S.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>void l.onLogout(e.name),children:u(`prov.logout`)}):(0,S.jsxs)(`button`,{type:`button`,className:`btn btn-primary btn-sm`,disabled:s,onClick:()=>void l.onLogin(e.name,!1),children:[s?(0,S.jsx)(`span`,{className:`pwi-spin-inline`,"aria-hidden":`true`}):(0,S.jsx)(oe,{style:{width:13,height:13},"aria-hidden":`true`}),u(s?`prov.waitingBrowser`:`prov.login`)]})})]}),s&&x&&(0,S.jsxs)(`div`,{className:`pwi-auth-wait`,children:[(0,S.jsx)(`span`,{className:`pwi-spin-inline`,"aria-hidden":`true`}),(0,S.jsxs)(`div`,{className:`pwi-auth-wait-copy`,children:[(0,S.jsx)(`div`,{className:`pwi-auth-wait-title`,children:u(`prov.waitingBrowser`)}),x.url&&(0,S.jsxs)(`a`,{href:x.url,target:`_blank`,rel:`noreferrer`,className:`pwi-auth-open-link`,children:[(0,S.jsx)(ie,{style:{width:13,height:13}}),` `,u(`prov.didntOpen`)]})]})]}),a===`loading`&&r.length===0&&(0,S.jsxs)(`div`,{className:`pwi-auth-state`,role:`status`,children:[(0,S.jsx)(`span`,{className:`pwi-spin-inline`,"aria-hidden":`true`}),u(`pws.accountsLoading`)]}),a===`error`&&(0,S.jsxs)(`div`,{className:`pwi-auth-state pwi-auth-state--error`,role:`alert`,children:[(0,S.jsx)(`span`,{children:u(`pws.accountsLoadFailed`)}),l.onRetryAccounts&&(0,S.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>void l.onRetryAccounts?.(e.name),children:u(`pws.retryAccounts`)})]}),r.length>0&&(0,S.jsx)(`div`,{className:`pwi-auth-list`,role:`list`,children:r.map(t=>{let n=ln(r,t,u),i=o===t.id;return(0,S.jsxs)(`div`,{className:`pwi-auth-row${t.active?` pwi-auth-row--active`:``}`,role:`listitem`,children:[(0,S.jsxs)(`button`,{type:`button`,className:`pwi-auth-row-main`,onClick:()=>{!t.active&&!t.needsReauth&&!o&&l.onSwitchAccount(e.name,t)},"aria-current":t.active?`true`:void 0,"aria-label":`${n}${t.active?` — ${u(`pws.accountCurrent`)}`:``}`,disabled:!!(t.needsReauth||o&&!i),children:[(0,S.jsx)(`span`,{className:`pwi-auth-dot ${t.needsReauth?`pwi-auth-dot--warn`:t.active?`pwi-auth-dot--ok`:`pwi-auth-dot--off`}`,"aria-hidden":`true`}),(0,S.jsx)(`span`,{className:`pwi-auth-row-label`,children:n}),t.needsReauth&&(0,S.jsx)(`span`,{className:`badge badge-amber`,children:u(`pws.reauth`)}),t.active&&(0,S.jsx)(`span`,{className:`badge badge-primary`,children:u(`prov.accountActive`)}),i&&(0,S.jsx)(`span`,{className:`badge badge-muted`,children:u(`pws.accountSwitching`)})]}),(0,S.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm pwi-auth-row-remove`,"aria-label":`${u(`common.remove`)} — ${n}`,title:`${u(`common.remove`)} — ${n}`,disabled:!!o,onClick:()=>void l.onRemoveAccount(e.name,t),children:(0,S.jsx)(F,{style:{width:13,height:13},"aria-hidden":`true`})})]},t.id)})}),a===`ready`&&C&&r.length===0&&(0,S.jsx)(`div`,{className:`pwi-auth-state pwi-auth-state--empty`,children:u(`pws.noAccounts`)}),C&&(0,S.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,style:{marginTop:8},onClick:()=>void l.onLogin(e.name,!0),disabled:s||!!o,children:u(`pws.addAccount`)})]}),b&&(0,S.jsxs)(S.Fragment,{children:[i.length>0&&(0,S.jsx)(`div`,{className:`pwi-auth-list`,role:`list`,children:i.map(t=>(0,S.jsxs)(`div`,{className:`pwi-auth-row${t.active?` pwi-auth-row--active`:``}`,role:`listitem`,children:[(0,S.jsxs)(`button`,{type:`button`,className:`pwi-auth-row-main`,onClick:()=>void l.onSwitchApiKey(e.name,t),disabled:t.active,children:[(0,S.jsx)(`span`,{className:`pwi-auth-dot ${t.active?`pwi-auth-dot--ok`:`pwi-auth-dot--off`}`,"aria-hidden":`true`}),(0,S.jsx)(`code`,{className:`pwi-auth-row-label`,children:t.masked}),t.active&&(0,S.jsx)(`span`,{className:`badge badge-primary`,children:u(`prov.accountActive`)})]}),(0,S.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm pwi-auth-row-remove`,"aria-label":`${u(`common.remove`)} — ${t.label??t.masked}`,title:`${u(`common.remove`)} — ${t.label??t.masked}`,onClick:()=>void l.onRemoveApiKey(e.name,t),children:(0,S.jsx)(F,{style:{width:13,height:13},"aria-hidden":`true`})})]},t.id))}),d?(0,S.jsxs)(`div`,{className:`pwi-auth-add-key`,children:[(0,S.jsx)(`input`,{className:`input`,type:`password`,value:p,onChange:e=>m(e.target.value),placeholder:u(`modal.apiKeyPlaceholder`),autoComplete:`off`,disabled:h}),(0,S.jsx)(`button`,{type:`button`,className:`btn btn-primary btn-sm`,onClick:()=>void w(),disabled:h||!p.trim(),children:u(h?`pws.saving`:`pws.addKey`)}),(0,S.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>{f(!1),m(``)},children:u(`common.cancel`)})]}):(0,S.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,style:{marginTop:8},onClick:()=>f(!0),children:u(`pws.addKey`)})]})]})]})}var Kn=[`openai-responses`,`openai-chat`,`anthropic`,`google`,`azure-openai`,`cursor`];function qn({item:e,availableModels:t=[],onUpdateProvider:n,onDirtyChange:r}){let i=U(),a=String(e.authMode??(e.keyOptional?`local`:`key`)),[o,s]=(0,_.useState)(e.adapter),[c,l]=(0,_.useState)(e.baseUrl),[u,d]=(0,_.useState)(e.defaultModel??``),[f,p]=(0,_.useState)(a),[m,h]=(0,_.useState)(e.note??``),[g,v]=(0,_.useState)(!1),[y,b]=(0,_.useState)(null);(0,_.useEffect)(()=>{s(e.adapter),l(e.baseUrl),d(e.defaultModel??``),p(String(e.authMode??(e.keyOptional?`local`:`key`))),h(e.note??``),b(null)},[e.name,e.adapter,e.baseUrl,e.defaultModel,e.authMode,e.keyOptional,e.note]);let x=o.trim()!==e.adapter||c.trim()!==e.baseUrl||u.trim()!==(e.defaultModel??``)||f!==String(e.authMode??(e.keyOptional?`local`:`key`))||m.trim()!==(e.note??``);(0,_.useEffect)(()=>(r?.(x),()=>r?.(!1)),[x,r]);let C=(0,_.useMemo)(()=>{let n=new Set(t);return u.trim()&&n.add(u.trim()),e.defaultModel&&n.add(e.defaultModel),[...n].sort((e,t)=>e.localeCompare(t))},[t,u,e.defaultModel]),w=(0,_.useMemo)(()=>{let e=[...Kn];return o&&!e.includes(o)&&e.unshift(o),e},[o]),T=Mt(e.name),E=async()=>{if(!n){b({ok:!1,text:i(`pws.updatesUnavailable`)});return}if(!o.trim()||!c.trim()){b({ok:!1,text:i(`pws.adapterBaseRequired`)});return}v(!0),b(null);let t={adapter:o.trim(),baseUrl:c.trim(),defaultModel:u.trim(),authMode:f,note:m.trim()},r=await n(e.name,t);v(!1),b(r.ok?{ok:!0,text:i(`pws.settingsSaved`)}:{ok:!1,text:r.error||i(`prov.saveFailed`)})};return(0,S.jsxs)(`div`,{className:`pwi-settings-form`,children:[(0,S.jsxs)(`label`,{className:`pwi-settings-field`,children:[(0,S.jsxs)(`span`,{className:`pwi-settings-label`,children:[(0,S.jsx)(oe,{style:{width:12,height:12}}),` `,i(`pws.providerId`)]}),(0,S.jsx)(`input`,{className:`input`,value:e.name,readOnly:!0,disabled:!0})]}),(0,S.jsxs)(`label`,{className:`pwi-settings-field`,children:[(0,S.jsx)(`span`,{className:`pwi-settings-label`,children:i(`modal.adapter`)}),T?(0,S.jsx)(`input`,{className:`input`,value:o,readOnly:!0,disabled:!0}):(0,S.jsx)(`select`,{className:`input`,value:o,onChange:e=>s(e.target.value),children:w.map(e=>(0,S.jsx)(`option`,{value:e,children:e},e))})]}),(0,S.jsxs)(`label`,{className:`pwi-settings-field`,children:[(0,S.jsx)(`span`,{className:`pwi-settings-label`,children:i(`modal.baseUrl`)}),(0,S.jsx)(`input`,{className:`input`,value:c,onChange:e=>l(e.target.value),readOnly:T,disabled:T})]}),(0,S.jsxs)(`label`,{className:`pwi-settings-field`,children:[(0,S.jsx)(`span`,{className:`pwi-settings-label`,children:i(`pws.cell.defaultModel`)}),C.length>0?(0,S.jsxs)(`select`,{className:`input`,value:u,onChange:e=>d(e.target.value),children:[(0,S.jsx)(`option`,{value:``,children:i(`pws.defaultModelNone`)}),C.map(e=>(0,S.jsx)(`option`,{value:e,children:e},e))]}):(0,S.jsx)(`input`,{className:`input`,value:u,onChange:e=>d(e.target.value),placeholder:i(`pws.optionalPlaceholder`)})]}),(0,S.jsxs)(`label`,{className:`pwi-settings-field`,children:[(0,S.jsx)(`span`,{className:`pwi-settings-label`,children:i(`pws.authMode`)}),T?(0,S.jsx)(`input`,{className:`input`,value:Pt(e,i),readOnly:!0,disabled:!0}):(0,S.jsxs)(`select`,{className:`input`,value:f,onChange:e=>p(e.target.value),children:[(0,S.jsx)(`option`,{value:`key`,children:i(`modal.badge.apiKey`)}),(0,S.jsx)(`option`,{value:`forward`,children:i(`pws.auth.chatgptPassthrough`)}),(0,S.jsx)(`option`,{value:`oauth`,children:i(`modal.badge.oauth`)}),(0,S.jsx)(`option`,{value:`local`,children:i(`modal.badge.local`)})]})]}),(0,S.jsxs)(`label`,{className:`pwi-settings-field`,children:[(0,S.jsx)(`span`,{className:`pwi-settings-label`,children:i(`pws.note`)}),(0,S.jsx)(`textarea`,{className:`input pwi-settings-textarea`,value:m,onChange:e=>h(e.target.value),rows:2})]}),x&&(0,S.jsxs)(`div`,{className:`pwi-settings-sticky-bar`,children:[(0,S.jsx)(`span`,{className:`muted`,children:i(`pws.settingsUnsavedBar`)}),(0,S.jsxs)(`div`,{className:`pwi-settings-sticky-bar-actions`,children:[(0,S.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>{s(e.adapter),l(e.baseUrl),d(e.defaultModel??``),p(a),h(e.note??``),b(null)},disabled:g,children:i(`pws.discardSettings`)}),(0,S.jsx)(`button`,{type:`button`,className:`btn btn-primary btn-sm`,onClick:()=>void E(),disabled:g,children:i(g?`pws.saving`:`pws.saveSettings`)})]})]}),y&&(0,S.jsx)(`div`,{className:y.ok?`pwi-settings-msg pwi-settings-msg--ok`:`pwi-settings-msg pwi-settings-msg--err`,children:y.text})]})}function Jn({item:e,usageTotals:t,quotaReport:n,availableModels:r,selectedModels:i,modelsLoading:a,modelsLoadFailed:o,onRetryModels:s,oauthEmail:c,onDeselect:l,apiBase:u,oauth:d,accounts:f,accountLoadState:p,switchingAccountId:m,keys:h,busyProvider:g,loginHint:v,authHandlers:y,onUpdateProvider:b,isDefault:x,onRemoveProvider:C,onSetDisabled:w}){let T=U(),[E,D]=(0,_.useState)(`overview`),[O,k]=(0,_.useState)(!1),A=e.disabled===!0,j=(0,_.useMemo)(()=>tt(e),[e]),M=(0,_.useMemo)(()=>ht(e),[e]),N=(0,_.useMemo)(()=>cn(e),[e]),P=(0,_.useMemo)(()=>[{id:`overview`,label:T(`pws.tab.overview`)},{id:`models`,label:T(`pws.tab.models`)},{id:`usage`,label:T(`pws.tab.usage`)},...N?[{id:`accounts`,label:T(N===`api-keys`?`pws.apiKeys`:`pws.tab.accounts`)}]:[],{id:`settings`,label:T(`pws.tab.settings`)}],[N,T]),ee=(0,_.useCallback)(e=>{O&&E===`settings`&&e!==`settings`&&!window.confirm(T(`pws.unsavedLeaveBody`))||D(e)},[E,O,T]),I=(0,_.useCallback)((e,t)=>{let n;if(e.key===`ArrowRight`)n=(t+1)%P.length;else if(e.key===`ArrowLeft`)n=(t-1+P.length)%P.length;else if(e.key===`Home`)n=0;else if(e.key===`End`)n=P.length-1;else return;e.preventDefault(),ee(P[n].id),e.currentTarget.parentElement?.querySelectorAll(`[role="tab"]`)[n]?.focus()},[ee,P]),L=`pws-tab-${E}`,te=`pws-panel-${E}`;return(0,S.jsxs)(`div`,{className:`pws-detail`,children:[(0,S.jsx)(`div`,{className:`pws-detail-head`,children:(0,S.jsxs)(`button`,{type:`button`,className:`pws-detail-back-link`,onClick:l,children:[(0,S.jsx)(z,{className:`pws-detail-back-chevron`,"aria-hidden":`true`}),T(`pws.allProviders`)]})}),(0,S.jsxs)(`div`,{className:`pws-detail-head-main`,children:[(0,S.jsx)(It,{name:e.name,adapter:e.adapter,baseUrl:e.baseUrl,cls:`pws-detail-icon`}),(0,S.jsx)(`div`,{className:`pws-detail-title-wrap`,children:(0,S.jsxs)(`h2`,{className:`pws-detail-title`,children:[jt(e.name),M&&(0,S.jsx)(`span`,{className:`pwi-rail-badge pwi-rail-badge--local`,children:T(`modal.badge.local`)}),!M&&j&&(0,S.jsx)(`span`,{className:`pwi-rail-badge pwi-rail-badge--free`,children:T(`modal.badge.free`)})]})}),(0,S.jsxs)(`div`,{className:`pws-detail-actions`,children:[C&&(0,S.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm btn-icon-only`,onClick:()=>C(e.name),"aria-label":T(`pws.removeConfirmTitle`),title:T(`pws.removeConfirmTitle`),children:(0,S.jsx)(F,{style:{width:15,height:15},"aria-hidden":`true`})}),w&&(0,S.jsxs)(`div`,{className:`pws-detail-toggle`,children:[(0,S.jsx)(`span`,{className:`pws-detail-toggle-label`,children:T(`pws.enabledLabel`)}),(0,S.jsx)(ke,{on:!A,onClick:()=>w(e.name,!A),disabled:x,label:T(`pws.enabledLabel`)})]})]})]}),(0,S.jsx)(`div`,{className:`pws-detail-tabs`,role:`tablist`,children:P.map((e,t)=>(0,S.jsx)(`button`,{type:`button`,role:`tab`,id:`pws-tab-${e.id}`,"aria-controls":`pws-panel-${e.id}`,"aria-selected":E===e.id,tabIndex:E===e.id?0:-1,className:`pws-detail-tab${E===e.id?` pws-detail-tab--active`:``}`,onClick:()=>ee(e.id),onKeyDown:e=>I(e,t),children:e.label},e.id))}),(0,S.jsxs)(`div`,{className:`pws-detail-panel`,role:`tabpanel`,id:te,"aria-labelledby":L,tabIndex:0,children:[E===`overview`&&(0,S.jsx)(un,{item:e,usageTotals:t,quotaReport:n,oauthEmail:c,onEditSettings:()=>ee(`settings`),onViewUsage:()=>ee(`usage`),onUpdateProvider:b}),E===`models`&&(0,S.jsx)(Ln,{item:e,availableModels:r,selectedModels:i,modelsLoading:a,modelsLoadFailed:o,onRetryModels:s}),E===`usage`&&(0,S.jsx)(Rn,{item:e,usageTotals:t,quotaReport:n}),E===`accounts`&&(0,S.jsx)(Gn,{item:e,apiBase:u,oauth:d,accounts:f,keys:h,accountLoadState:p,switchingAccountId:m,busy:g===e.name,loginHint:v,authHandlers:y}),E===`settings`&&(0,S.jsx)(qn,{item:e,availableModels:r,onUpdateProvider:b,onDirtyChange:k})]})]})}function Yn(e){return e.codexAccountMode===`direct`?`direct`:`pool`}var Xn={xai:`xAI (Grok)`,anthropic:`Anthropic (Claude)`,kimi:`Kimi (Moonshot)`},Zn=e=>Xn[e]??e;function Qn({apiBase:e}){let t=U(),[n,r]=(0,_.useState)(null),[i,a]=(0,_.useState)(!1),[o,s]=(0,_.useState)(!1),[c,l]=(0,_.useState)(``),[u,d]=(0,_.useState)(``),[f,p]=(0,_.useState)(!1),[m,h]=(0,_.useState)([]),[g,v]=(0,_.useState)({}),[y,b]=(0,_.useState)({}),[x,C]=(0,_.useState)(null),[w,T]=(0,_.useState)(!1),[E,D]=(0,_.useState)(null),[O,k]=(0,_.useState)(!1),[A,j]=(0,_.useState)(``),[M,N]=(0,_.useState)(!1),[ee,I]=(0,_.useState)(``),[L,te]=(0,_.useState)({}),[ne,R]=(0,_.useState)({}),[B,ae]=(0,_.useState)(null),[se,le]=(0,_.useState)({}),[V,ue]=(0,_.useState)({}),[de,fe]=(0,_.useState)(null),[pe,me]=(0,_.useState)(``),[he,ge]=(0,_.useState)(()=>location.hash.replace(/^#\/?/,``)===`providers/workspace`),[_e,ve]=(0,_.useState)(null),[ye,be]=(0,_.useState)(null),xe=(0,_.useRef)(!0),Se=(0,_.useRef)({}),Ce=(0,_.useRef)(null),H=(e,t)=>{d(e),p(t)};(0,_.useEffect)(()=>(xe.current=!0,()=>{xe.current=!1}),[]),(0,_.useEffect)(()=>{let e=()=>ge(location.hash.replace(/^#\/?/,``)===`providers/workspace`);return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},[]);let we=()=>{location.hash=he?`#providers`:`#providers/workspace`},Te=(0,_.useCallback)(async()=>{try{let t=await(await fetch(`${e}/api/config`)).json();r(t),l(JSON.stringify(t,null,2))}catch{H(t(`prov.loadConfigFail`),!1)}},[e,t]),Ee=(0,_.useCallback)(async()=>{try{let t=(await fetch(`${e}/api/oauth/providers`).then(e=>e.json())).providers??[];h(t);let n=await Promise.all(t.map(async t=>[t,await fetch(`${e}/api/oauth/status?provider=${t}`).then(e=>e.json()).catch(()=>({loggedIn:!1}))]));v(Object.fromEntries(n))}catch{}},[e]),De=(0,_.useCallback)(async(t=!1)=>{try{let n=await fetch(`${e}/api/provider-quotas${t?`?refresh=1`:``}`).then(e=>e.json());b(Object.fromEntries((n.reports??[]).map(e=>[e.provider,e])))}catch{b({})}},[e]),Oe=(0,_.useCallback)(async t=>{let n=[...new Set(t)];return R(e=>{let t={...e};for(let e of n)t[e]=`loading`;return t}),(await Promise.all(n.map(async t=>{let n=(Se.current[t]??0)+1;Se.current[t]=n;try{let r=await fetch(`${e}/api/oauth/accounts?provider=${encodeURIComponent(t)}`);if(!r.ok)throw Error(String(r.status));let i=await r.json();return!xe.current||Se.current[t]!==n?!0:(te(e=>({...e,[t]:{activeAccountId:i.activeAccountId??null,accounts:i.accounts??[]}})),R(e=>({...e,[t]:`ready`})),!0)}catch{return!xe.current||Se.current[t]!==n?!0:(R(e=>({...e,[t]:`error`})),!1)}}))).every(Boolean)},[e]),ke=async(n,r)=>{if(r.active||r.needsReauth||Ce.current)return;let i={provider:n,accountId:r.id};Ce.current=i,ae(i);let a=ln(L[n]?.accounts??[r],r,t);try{if(!(await fetch(`${e}/api/oauth/accounts/active`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({provider:n,accountId:r.id})})).ok){H(t(`prov.accountSwitchFail`),!1);return}let i=await Oe([n]);if(await Promise.all([Ee(),De(!0)]),!i){H(t(`pws.accountsLoadFailed`),!1);return}H(t(`prov.accountSwitched`,{email:a}),!0)}catch{H(t(`prov.accountSwitchFail`),!1)}finally{Ce.current?.provider===i.provider&&Ce.current.accountId===i.accountId&&(Ce.current=null,xe.current&&ae(null))}},G=(0,_.useCallback)(async t=>{let n=await Promise.all(t.map(async t=>[t,(await fetch(`${e}/api/providers/keys?name=${encodeURIComponent(t)}`).then(e=>e.json()).catch(()=>null))?.keys??[]]));ue(Object.fromEntries(n))},[e]),Ae=async(n,r)=>{if(r.active)return;let i=await fetch(`${e}/api/providers/keys/active`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({name:n,id:r.id})});i.ok?(H(t(`prov.keySwitched`,{key:r.label??r.masked}),!0),G(Object.keys(V)),De(!0)):H((await i.json().catch(()=>({}))).error||t(`prov.keySwitchFail`),!1)},je=async(n,r)=>{window.confirm(t(`prov.keyRemoveConfirm`,{key:r.label??r.masked}))&&(await fetch(`${e}/api/providers/keys?name=${encodeURIComponent(n)}&id=${encodeURIComponent(r.id)}`,{method:`DELETE`})).ok&&(H(t(`prov.keyRemoved`,{key:r.label??r.masked}),!0),G(Object.keys(V)),Te(),De(!0))},Me=async(n,r)=>{let i=r.trim();if(!i)return!1;try{let r=await fetch(`${e}/api/providers/keys`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({name:n,key:i})});return r.ok?(H(t(`prov.keyAdded`,{name:n}),!0),fe(null),await Promise.all([G(Object.keys(V).includes(n)?Object.keys(V):[...Object.keys(V),n]),Te(),De(!0)]),!0):(H((await r.json().catch(()=>({}))).error||t(`prov.keyAddFail`),!1),!1)}catch{return H(t(`prov.keyAddFail`),!1),!1}},Ne=async e=>{await Me(e,pe)&&me(``)},Pe=async(n,r)=>{let i=ln(L[n]?.accounts??[r],r,t);if(window.confirm(t(`prov.accountRemoveConfirm`,{email:i})))try{if(!(await fetch(`${e}/api/oauth/accounts?provider=${encodeURIComponent(n)}&id=${encodeURIComponent(r.id)}`,{method:`DELETE`})).ok){H(t(`prov.accountRemoveFail`,{email:i}),!1);return}H(t(`prov.accountRemoved`,{email:i}),!0),await Oe([n]),await Promise.all([Ee(),De(!0)])}catch{H(t(`prov.accountRemoveFail`,{email:i}),!1)}};(0,_.useEffect)(()=>{let e=window.setTimeout(()=>{Te(),Ee(),De()},0);return()=>window.clearTimeout(e)},[Te,Ee,De]);let Fe=(0,_.useMemo)(()=>n?Object.entries(n.providers).filter(([,e])=>e.authMode===`oauth`).map(([e])=>e):[],[n]);(0,_.useEffect)(()=>{if(Fe.length===0)return;let e=window.setTimeout(()=>{Oe(Fe)},0);return()=>window.clearTimeout(e)},[Oe,Fe]);let Ie=(0,_.useMemo)(()=>n?Object.entries(n.providers).filter(([,e])=>e.hasApiKey&&e.authMode!==`oauth`&&e.authMode!==`forward`).map(([e])=>e):[],[n]);(0,_.useEffect)(()=>{if(Ie.length===0)return;let e=window.setTimeout(()=>{G(Ie)},0);return()=>window.clearTimeout(e)},[G,Ie]);let Le=async()=>{try{let n=JSON.parse(c);(await fetch(`${e}/api/config`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(n)})).ok?(H(t(`prov.saved`),!0),a(!1),Te(),De(!0)):H(t(`prov.saveFailed`),!1)}catch{H(t(`prov.invalidJson`),!1)}},Re=async(n,r=!1)=>{C(n),d(``),D(null),j(``),I(``);try{let i=await fetch(`${e}/api/oauth/login`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(r?{provider:n,addAccount:!0}:{provider:n})}),a=await i.json();if(!i.ok){H(a.error||t(`prov.loginFailStart`,{provider:Zn(n)}),!1);return}(a.url||a.instructions)&&D({provider:n,url:a.url,instructions:a.instructions});let o=L[n]?.accounts.length??0;for(let i=0;i<150&&xe.current;i++){await new Promise(e=>setTimeout(e,2e3));let i=await fetch(`${e}/api/oauth/status?provider=${n}`).then(e=>e.json()).catch(()=>null);if(i){if(r?(i.accounts?.length??0)>o||i.done===!0&&!i.error:i.loggedIn){v(e=>({...e,[n]:i})),H(t(`prov.loginOk`,{provider:Zn(n),cmd:`ocx sync`}),!0),D(null),j(``),I(``),Te(),Oe(Object.keys(L).includes(n)?Object.keys(L):[...Object.keys(L),n]),De(!0);break}if(i.error){v(e=>({...e,[n]:i})),H(t(`prov.loginError`,{provider:Zn(n),error:i.error}),!1),D(null);break}}}}catch{H(t(`prov.loginRequestFail`,{provider:Zn(n)}),!1)}finally{xe.current&&C(null)}},ze=async n=>{let r=A.trim();if(!(!r||M)){N(!0),I(``);try{let i=await fetch(`${e}/api/oauth/login/code`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({provider:n,input:r})}),a=await i.json().catch(()=>({}));if(!i.ok){I(t(`prov.pasteFail`,{error:a.error||i.statusText}));return}j(``),I(t(`prov.pasteOk`))}catch{I(t(`prov.pasteFail`,{error:`network error`}))}finally{xe.current&&N(!1)}}},Be=async n=>{try{if(!(await fetch(`${e}/api/oauth/logout?provider=${encodeURIComponent(n)}`,{method:`POST`})).ok){H(t(`prov.logoutFail`,{provider:Zn(n)}),!1);return}await Promise.all([Oe([n]),Ee(),Te(),De(!0)]),H(t(`prov.logoutOk`,{provider:Zn(n)}),!0)}catch{H(t(`prov.logoutFail`,{provider:Zn(n)}),!1)}},Ve=async n=>{window.confirm(t(`prov.removeConfirm`,{name:n}))&&((await fetch(`${e}/api/providers?name=${encodeURIComponent(n)}`,{method:`DELETE`})).ok?(H(t(`prov.removed`,{name:n}),!0),Te(),Ee(),De(!0)):H(t(`prov.removeFail`,{name:n}),!1))},He=async(n,r)=>{let i=await fetch(`${e}/api/providers?name=${encodeURIComponent(n)}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({disabled:r})});if(i.ok){H(t(r?`prov.disabled`:`prov.enabled`,{name:n}),!0),Te(),Ee(),De(!0);return}H((await i.json().catch(()=>({}))).error||t(r?`prov.disableFail`:`prov.enableFail`,{name:n}),!1)},Ue=async(t,n)=>{try{let r=await fetch(`${e}/api/providers?name=${encodeURIComponent(t)}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify(n)});return r.ok?(Te(),{ok:!0}):{ok:!1,error:(await r.json().catch(()=>({}))).error||`Update failed`}}catch{return{ok:!1,error:`Network error`}}},We=async n=>{if(!w){T(!0);try{let i=await fetch(`${e}/api/providers?name=openai`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({codexAccountMode:n})});if(!i.ok){H((await i.json().catch(()=>({}))).error||t(`prov.openaiModeSaveFailed`),!1);return}r(e=>e&&{...e,providers:{...e.providers,openai:{...e.providers.openai,codexAccountMode:n}}}),H(t(`prov.openaiModeSaved`,{mode:t(n===`pool`?`prov.openaiModePool`:`prov.openaiModeDirect`)}),!0),n===`pool`&&De(!0)}catch{H(t(`prov.openaiModeSaveFailed`),!1)}finally{xe.current&&T(!1)}}};if(!n)return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`div`,{className:`page-head`,children:(0,S.jsx)(`h2`,{children:t(`nav.providers`)})}),u?(0,S.jsx)(W,{tone:`err`,children:u}):(0,S.jsx)(`div`,{className:`muted`,children:t(`prov.loadingConfig`)})]});let Ge=Object.entries(n.providers).filter(([e,t])=>(t.hasApiKey||e===`openai-apikey`)&&t.authMode!==`oauth`&&t.authMode!==`forward`&&!m.includes(e)).map(([e])=>e);return he?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`div`,{className:`page-head`,children:[(0,S.jsx)(`h2`,{children:t(`nav.providers`)}),(0,S.jsxs)(`div`,{className:`row`,children:[(0,S.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:we,children:t(`pws.classicToggle`)}),(0,S.jsxs)(`button`,{className:`btn btn-primary`,onClick:()=>s(!0),children:[(0,S.jsx)(P,{}),t(`prov.add`)]})]})]}),u&&(0,S.jsx)(W,{tone:f?`ok`:`err`,children:u}),(0,S.jsx)(on,{providers:n.providers,apiBase:e,defaultProvider:n.defaultProvider,selectedName:_e,onSelect:ve,onAddProvider:e=>{be(e??null),s(!0)},detail:(t,r)=>(0,S.jsx)(Jn,{item:t,usageTotals:r.usageTotals,quotaReport:r.quotaReport,availableModels:r.availableModels,selectedModels:r.selectedModels,modelsLoading:r.modelsLoading,modelsLoadFailed:r.modelsLoadFailed,oauthEmail:g[t.name]?.email,onDeselect:()=>ve(null),apiBase:e,oauth:g[t.name],accounts:L[t.name]?.accounts??[],keys:V[t.name]??[],accountLoadState:ne[t.name]??(t.authMode===`oauth`?`idle`:`ready`),switchingAccountId:B?.provider===t.name?B.accountId:null,busyProvider:x,loginHint:E,authHandlers:{onLogin:Re,onLogout:Be,onSwitchAccount:ke,onRemoveAccount:Pe,onRetryAccounts:async e=>{await Oe([e])},onAddApiKey:Me,onSwitchApiKey:Ae,onRemoveApiKey:je},isDefault:t.name===n.defaultProvider,onRemoveProvider:Ve,onSetDisabled:He,onUpdateProvider:Ue},t.name)}),o&&(0,S.jsx)(pt,{apiBase:e,existingNames:Object.keys(n.providers),initialTier:ye?.tier,initialCustom:ye?.custom,onClose:()=>{s(!1),be(null)},onAdded:e=>{s(!1),be(null),H(t(`prov.added`,{name:e,cmd:`ocx sync`}),!0),Te(),Ee(),De(!0)}})]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`div`,{className:`page-head`,children:[(0,S.jsx)(`h2`,{children:t(`nav.providers`)}),(0,S.jsxs)(`div`,{className:`row`,children:[(0,S.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:we,children:t(he?`pws.classicToggle`:`pws.workspaceToggle`)}),i?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`button`,{className:`btn btn-primary`,onClick:Le,children:t(`common.save`)}),(0,S.jsx)(`button`,{className:`btn btn-ghost`,onClick:()=>{a(!1),l(JSON.stringify(n,null,2))},children:t(`common.cancel`)})]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`button`,{className:`btn btn-primary`,onClick:()=>s(!0),children:[(0,S.jsx)(P,{}),t(`prov.add`)]}),(0,S.jsx)(`button`,{className:`btn btn-ghost`,onClick:()=>a(!0),children:t(`prov.editJson`)})]})]})]}),(0,S.jsx)(`p`,{className:`page-sub`,children:t(`prov.subtitle`)}),u&&(0,S.jsx)(W,{tone:f?`ok`:`err`,children:u}),(0,S.jsxs)(`div`,{className:`panel panel-accent`,style:{marginBottom:18},children:[(0,S.jsxs)(`div`,{className:`row`,style:{marginBottom:14},children:[(0,S.jsx)(oe,{style:{width:16,height:16,color:`var(--accent)`}}),(0,S.jsx)(`span`,{className:`font-semibold`,children:t(`prov.accountLogin`)})]}),(0,S.jsxs)(`div`,{className:`oauth-grid`,children:[m.length===0&&Ge.length===0&&(0,S.jsx)(`span`,{className:`muted text-control`,style:{gridColumn:`1 / -1`},children:t(`prov.noOauth`)}),m.map(e=>{let n=g[e]??{loggedIn:!1},r=x===e,i=At(e);return(0,S.jsxs)(`div`,{className:`oauth-row`,children:[(0,S.jsxs)(`span`,{className:`oauth-name`,title:Zn(e),children:[(0,S.jsx)(`span`,{className:`provider-icon provider-icon-sm`,children:i&&(0,S.jsx)(`img`,{src:i,alt:``,"aria-hidden":`true`})}),(0,S.jsx)(`span`,{className:`oauth-name-text`,children:e})]}),(0,S.jsxs)(`span`,{className:`oauth-status`,children:[(0,S.jsx)(`span`,{className:`dot ${n.loggedIn?`dot-green`:`dot-muted`}`}),n.loggedIn?(0,S.jsx)(`span`,{className:`oauth-email`,style:{color:`var(--green)`},children:n.email??t(`prov.loggedIn`)}):(0,S.jsx)(`span`,{className:`oauth-email muted`,children:t(`prov.notLoggedIn`)})]}),(0,S.jsx)(`span`,{className:`oauth-actions`,children:n.loggedIn?(0,S.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:()=>Be(e),children:t(`prov.logout`)}):(0,S.jsx)(`button`,{className:`btn btn-primary btn-sm`,onClick:()=>Re(e),disabled:r,children:r?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`span`,{className:`spin`}),t(`prov.waitingBrowser`)]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(oe,{}),t(`prov.login`)]})})}),E?.provider===e&&(E.url||E.instructions||r)&&(0,S.jsxs)(`span`,{className:`oauth-login-hint muted`,children:[(0,S.jsxs)(`span`,{className:`oauth-login-hint-links`,children:[E.url&&(0,S.jsxs)(`a`,{href:E.url,target:`_blank`,rel:`noreferrer`,className:`link-btn`,style:{display:`inline-flex`,alignItems:`center`,gap:5},children:[(0,S.jsx)(ie,{width:14,height:14}),t(`prov.didntOpen`)]}),(0,S.jsxs)(`button`,{className:`link-btn`,onClick:()=>{E?.url&&navigator.clipboard.writeText(E.url).then(()=>{k(!0),setTimeout(()=>k(!1),2500)}).catch(()=>{})},style:{display:`inline-flex`,alignItems:`center`,gap:5},children:[(0,S.jsx)(ce,{width:14,height:14}),t(O?`prov.linkCopied`:`prov.copyLink`)]}),E.instructions&&(0,S.jsx)(`span`,{children:E.instructions})]}),(0,S.jsxs)(`span`,{className:`oauth-login-paste`,children:[(0,S.jsx)(`input`,{className:`input`,type:`text`,autoComplete:`off`,spellCheck:!1,value:A,onChange:e=>j(e.target.value),onKeyDown:t=>{t.key===`Enter`&&(t.preventDefault(),ze(e))},placeholder:t(`prov.pasteRedirect`),"aria-label":t(`prov.pasteRedirect`),disabled:M}),(0,S.jsx)(`button`,{className:`btn btn-ghost btn-sm`,type:`button`,disabled:M||!A.trim(),onClick:()=>void ze(e),children:t(M?`prov.pasteSubmitting`:`prov.pasteSubmit`)})]}),(0,S.jsx)(`span`,{className:`text-caption`,children:ee||t(`prov.pasteRedirectHint`)})]})]},e)}),Ge.map(e=>{let r=n?.providers[e],i=At(e),a=r?.keyOptional===!0&&!r?.hasApiKey,o=e===`openai-apikey`&&!r?.hasApiKey;return(0,S.jsxs)(`div`,{className:`oauth-row`,children:[(0,S.jsxs)(`span`,{className:`oauth-name`,title:e,children:[(0,S.jsx)(`span`,{className:`provider-icon provider-icon-sm`,children:i&&(0,S.jsx)(`img`,{src:i,alt:``,"aria-hidden":`true`})}),(0,S.jsx)(`span`,{className:`oauth-name-text`,children:e})]}),(0,S.jsxs)(`span`,{className:`oauth-status`,children:[(0,S.jsx)(`span`,{className:`dot ${o?`dot-amber`:`dot-green`}`}),(0,S.jsx)(`span`,{className:`oauth-email muted`,children:t(o?`prov.openaiApiMissing`:a?`modal.badge.free`:`prov.hasApiKey`)})]}),(0,S.jsx)(`span`,{className:`oauth-actions`,children:o&&(0,S.jsx)(`button`,{className:`btn btn-primary btn-sm`,onClick:()=>s(!0),children:t(`prov.openaiApiSetup`)})})]},e)})]})]}),i?(0,S.jsx)(`textarea`,{className:`input`,value:c,onChange:e=>l(e.target.value),style:{height:400}}):(0,S.jsxs)(`div`,{className:`stack`,style:{gap:8},children:[(0,S.jsxs)(`div`,{className:`muted text-control`,style:{marginBottom:4},children:[t(`prov.port`),`: `,(0,S.jsx)(`code`,{className:`chip`,children:n.port}),` · `,t(`prov.default`),`: `,(0,S.jsx)(`code`,{className:`chip`,children:n.defaultProvider})]}),Object.entries(n.providers).map(([e,r])=>{let i=e===n.defaultProvider,a=r.disabled===!0,o=y[e]?.quota??null,s=At(e),c=r.authMode===`oauth`?L[e]:void 0,l=r.authMode!==`oauth`&&r.authMode!==`forward`&&r.hasApiKey?V[e]??[]:[],u=!!c&&c.accounts.length>0||l.length>0,d=se[e]===!0,f=c?.accounts.length??l.length,p=e===`openai`?Yn(r):null,m=p===`direct`?t(`prov.openaiDirectDesc`):p===`pool`?t(`prov.openaiPoolDesc`):e===`openai-apikey`?t(`prov.openaiApiDesc`):r.note;return(0,S.jsxs)(`div`,{className:`card prov-card${a?` prov-card-disabled`:``}`,children:[(0,S.jsxs)(`div`,{className:`prov-card-main`,children:[(0,S.jsxs)(`div`,{className:`prov-card-info`,children:[s&&(0,S.jsx)(`span`,{className:`provider-icon`,children:(0,S.jsx)(`img`,{src:s,alt:``,"aria-hidden":`true`})}),(0,S.jsxs)(`div`,{className:`prov-card-copy`,children:[(0,S.jsxs)(`div`,{className:`prov-title`,children:[(0,S.jsx)(`span`,{className:`font-semibold`,children:e}),i&&(0,S.jsx)(`span`,{className:`badge badge-primary`,children:t(`prov.defaultBadge`)}),a?(0,S.jsx)(`span`,{className:`badge badge-muted`,children:t(`prov.disabledBadge`)}):(0,S.jsx)(`span`,{className:`badge badge-green`,children:t(`prov.activeBadge`)}),r.authMode===`oauth`&&(0,S.jsx)(`span`,{className:`badge badge-accent`,children:`oauth`}),p===`direct`&&(0,S.jsx)(`span`,{className:`badge badge-green`,children:t(`prov.openaiModeDirect`)}),p===`pool`&&(0,S.jsx)(`span`,{className:`badge badge-accent`,children:t(`prov.openaiModePool`)}),e===`openai-apikey`&&(0,S.jsx)(`span`,{className:`badge badge-muted`,children:t(`modal.badge.apiKey`)}),e!==`openai`&&r.authMode===`forward`&&!r.codexAccountMode&&(0,S.jsx)(`span`,{className:`badge badge-amber`,children:`passthrough`}),r.keyOptional&&(0,S.jsx)(`span`,{className:`badge badge-green`,children:t(`modal.badge.free`)})]}),(0,S.jsxs)(`div`,{className:`muted prov-meta text-control`,children:[(0,S.jsx)(`code`,{className:`chip`,children:r.adapter}),(0,S.jsx)(`span`,{children:r.baseUrl}),r.defaultModel&&(0,S.jsx)(`span`,{children:r.defaultModel}),r.hasApiKey&&(0,S.jsx)(`span`,{children:t(`prov.hasApiKey`)}),r.hasHeaders&&(0,S.jsx)(`span`,{children:t(`prov.hasHeaders`)})]}),m&&(0,S.jsxs)(`div`,{className:`muted text-label leading-body`,style:{marginTop:4},children:[m,p&&(0,S.jsxs)(S.Fragment,{children:[` · `,(0,S.jsx)(`a`,{href:`#codex-auth`,children:t(`prov.manageCodexAccounts`)})]})]}),p&&(0,S.jsxs)(`div`,{className:`openai-mode-row`,children:[(0,S.jsx)(`span`,{id:`openai-account-mode-label`,className:`text-label font-semibold`,children:t(`prov.openaiAccountMode`)}),(0,S.jsx)(`div`,{className:`usage-segmented openai-mode-control`,role:`radiogroup`,"aria-labelledby":`openai-account-mode-label`,children:[`pool`,`direct`].map(e=>(0,S.jsx)(`button`,{type:`button`,role:`radio`,"aria-checked":p===e,className:`usage-segmented-btn${p===e?` active`:``}`,disabled:w,onClick:()=>void We(e),children:t(e===`pool`?`prov.openaiModePool`:`prov.openaiModeDirect`)},e))})]})]})]}),(0,S.jsxs)(`div`,{className:`provider-actions`,children:[(0,S.jsxs)(`button`,{className:`btn ${a?`btn-primary`:`btn-ghost`} btn-sm`,onClick:()=>He(e,!a),disabled:i,title:i?t(`prov.defaultCannotDisable`):void 0,"aria-label":t(a?`prov.enableAria`:`prov.disableAria`,{name:e}),children:[i?(0,S.jsx)(oe,{}):(0,S.jsx)(re,{}),t(a?`prov.enable`:`prov.disable`)]}),(0,S.jsxs)(`button`,{className:`btn btn-danger btn-sm`,onClick:()=>Ve(e),"aria-label":t(`sub.removeAria`,{m:e}),children:[(0,S.jsx)(F,{}),t(`common.remove`)]})]})]}),o&&(0,S.jsx)(Zt,{quota:o,threshold:80,t,className:`provider-quota`}),u&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`button`,{className:`prov-accounts-toggle${d?` open`:``}`,onClick:()=>le(t=>({...t,[e]:!d})),"aria-expanded":d,"aria-label":t(`prov.accountsAria`,{name:e}),children:[t(`prov.accounts`,{n:String(f)}),(0,S.jsx)(`span`,{className:`chev`,children:(0,S.jsx)(z,{})})]}),d&&(0,S.jsxs)(`div`,{className:`prov-accounts-list`,children:[(c?.accounts??[]).map(n=>{let r=ln(c?.accounts??[n],n,t);return(0,S.jsxs)(`button`,{className:`prov-account-row${n.active?` active`:``}`,onClick:()=>ke(e,n),title:n.active?void 0:t(`prov.accountSwitchTitle`),children:[(0,S.jsx)(`span`,{className:`dot ${n.needsReauth?`dot-amber`:n.active?`dot-green`:`dot-muted`}`}),(0,S.jsx)(`span`,{className:`prov-account-email`,children:r}),n.needsReauth&&(0,S.jsx)(`span`,{className:`badge badge-amber`,children:t(`prov.accountReauth`)}),n.active&&(0,S.jsx)(`span`,{className:`badge badge-primary`,children:t(`prov.accountActive`)}),(0,S.jsx)(`span`,{className:`prov-account-remove`,role:`button`,"aria-label":t(`prov.accountRemoveAria`,{email:r}),onClick:t=>{t.stopPropagation(),Pe(e,n)},children:(0,S.jsx)(F,{style:{width:13,height:13}})})]},n.id)}),l.map(n=>(0,S.jsxs)(`button`,{className:`prov-account-row${n.active?` active`:``}`,onClick:()=>Ae(e,n),title:n.active?void 0:t(`prov.keySwitchTitle`),children:[(0,S.jsx)(`span`,{className:`dot ${n.active?`dot-green`:`dot-muted`}`}),(0,S.jsx)(`span`,{className:`prov-account-email mono`,children:n.label?`${n.label} · ${n.masked}`:n.masked}),n.active&&(0,S.jsx)(`span`,{className:`badge badge-primary`,children:t(`prov.accountActive`)}),(0,S.jsx)(`span`,{className:`prov-account-remove`,role:`button`,"aria-label":t(`prov.keyRemoveAria`,{key:n.label??n.masked}),onClick:t=>{t.stopPropagation(),je(e,n)},children:(0,S.jsx)(F,{style:{width:13,height:13}})})]},n.id)),c?(0,S.jsx)(`button`,{className:`prov-account-row prov-account-add`,onClick:()=>Re(e,!0),disabled:x===e,children:x===e?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`span`,{className:`spin`}),t(`prov.waitingBrowser`)]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(P,{style:{width:13,height:13}}),t(`prov.accountAdd`)]})}):de===e?(0,S.jsxs)(`div`,{className:`prov-account-row prov-account-keyform`,children:[(0,S.jsx)(`input`,{className:`input input-sm mono`,type:`password`,autoFocus:!0,placeholder:t(`prov.keyPlaceholder`),value:pe,onChange:e=>me(e.target.value),onKeyDown:t=>{t.key===`Enter`&&Ne(e),t.key===`Escape`&&(fe(null),me(``))}}),(0,S.jsx)(`button`,{className:`btn btn-primary btn-sm`,onClick:()=>Ne(e),disabled:!pe.trim(),children:t(`common.save`)}),(0,S.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:()=>{fe(null),me(``)},children:t(`common.cancel`)})]}):(0,S.jsxs)(`button`,{className:`prov-account-row prov-account-add`,onClick:()=>{fe(e),me(``)},children:[(0,S.jsx)(P,{style:{width:13,height:13}}),t(`prov.keyAdd`)]})]})]})]},e)})]}),o&&(0,S.jsx)(pt,{apiBase:e,existingNames:Object.keys(n.providers),onClose:()=>s(!1),onAdded:e=>{s(!1),H(t(`prov.added`,{name:e,cmd:`ocx sync`}),!0),Te(),Ee(),De(!0)}})]})}var $n={"gpt-5.6-sol":le,"gpt-5.6-terra":de,"gpt-5.6-luna":V},er={width:14,height:14,flexShrink:0,verticalAlign:`text-bottom`,marginRight:4};function tr(e){return e.slice(e.lastIndexOf(`/`)+1)}function nr(e){return $n[e]??$n[tr(e)]??null}function rr(e){let t=nr(e);return t?(0,_.createElement)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:4}},(0,_.createElement)(t,{style:er}),e):e}var ir=Array.from({length:18},(e,t)=>1e5+t*5e4),ar=new Set(ir),or=`custom`,sr=[4,8,16,32,64,128,256,500,1e3],cr=new Set(sr),lr=60;function ur(e){return!Number.isFinite(e)||e<=0?String(e):e%1e3==0?`${e/1e3}k`:e.toLocaleString()}function dr(e){let t=new Set;for(let n of e)n.disabled&&t.add(n.namespaced);return t}function fr(e,t){let n=[];for(let r of e)!t.has(r.id)&&!t.has(r.namespaced)&&n.push({value:r.namespaced,label:r.namespaced});return n}function pr({apiBase:e}){let t=U(),[n,r]=(0,_.useState)([]),[i,a]=(0,_.useState)(new Set),[o,s]=(0,_.useState)({}),[c,l]=(0,_.useState)({}),[u,d]=(0,_.useState)({}),[f,p]=(0,_.useState)(35e4),[m,h]=(0,_.useState)(``),[g,v]=(0,_.useState)(!1),[y,b]=(0,_.useState)(()=>{try{let e=localStorage.getItem(`ocx-models-collapsed`);return e?new Set(JSON.parse(e)):new Set}catch{return new Set}}),[x,C]=(0,_.useState)(``),[w,T]=(0,_.useState)(!1),[D,O]=(0,_.useState)(!0),[k,A]=(0,_.useState)(!1),j=(0,_.useRef)(!1),[M,N]=(0,_.useState)(null),[P,ee]=(0,_.useState)(!1),[F,I]=(0,_.useState)(``),te=(0,_.useRef)(!1),[ne,R]=(0,_.useState)(``),[B,re]=(0,_.useState)(!1),[ie,ae]=(0,_.useState)(!1),[oe,se]=(0,_.useState)(null),[ce,le]=(0,_.useState)(!1),V=(0,_.useMemo)(()=>fr(n,i),[n,i]),ue=(0,_.useCallback)(async()=>{try{let t=await fetch(`${e}/api/shadow-call-settings`);t.ok&&se(await t.json())}catch{}},[e]),de=(0,_.useCallback)(async()=>{if(!te.current)try{let t=await fetch(`${e}/api/v2`);if(!t.ok||!(t.headers.get(`content-type`)??``).includes(`application/json`)){N(null);return}let n=await t.json();typeof n.enabled==`boolean`&&N({enabled:n.enabled,agentsMaxThreadsConflict:n.agentsMaxThreadsConflict===!0,maxConcurrentThreadsPerSession:typeof n.maxConcurrentThreadsPerSession==`number`?n.maxConcurrentThreadsPerSession:null,multiAgentMode:n.multiAgentMode===`v1`||n.multiAgentMode===`v2`?n.multiAgentMode:`default`})}catch{N(null)}},[e]),fe=(0,_.useCallback)(async()=>{try{let[t,n]=await Promise.all([fetch(`${e}/api/models`).then(e=>e.json()),fetch(`${e}/api/provider-context-caps`).then(e=>e.json())]);de(),ue(),r(t),a(dr(t));let i=typeof n.value==`number`&&Number.isFinite(n.value)&&n.value>0?n.value:typeof n.cap==`number`&&Number.isFinite(n.cap)&&n.cap>0?n.cap:void 0;i!==void 0&&p(i),d(n.caps??{})}catch{T(!1),C(t(`models.loadFail`))}finally{O(!1)}},[e,ue,de,t]);(0,_.useEffect)(()=>{let e=window.setTimeout(()=>{fe()},0),t=window.setInterval(()=>{j.current||fe()},1e4);return()=>{window.clearTimeout(e),window.clearInterval(t)}},[fe]);let pe=(0,_.useMemo)(()=>{let e={};for(let t of n)(e[t.provider]??=[]).push(t);return Object.entries(e).sort(([e,t],[n,r])=>{let i=t.every(e=>e.native);return i===r.every(e=>e.native)?e.localeCompare(n):i?-1:1})},[n]),me=async n=>{A(!0),j.current=!0,C(``);try{(await fetch(`${e}/api/disabled-models`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({models:[...n]})})).ok?(a(n),T(!0),C(t(`models.applied`))):(T(!1),C(t(`models.saveFailed`)))}catch{T(!1),C(t(`models.networkError`))}finally{A(!1),j.current=!1}},he=e=>{let t=new Set(i);t.has(e)?t.delete(e):t.add(e),me(t)},ge=async n=>{A(!0),j.current=!0,C(``);let r=u[n]!==f;try{let i=await fetch(`${e}/api/provider-context-caps`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({provider:n,enabled:r})});i.ok?(d((await i.json()).caps??{}),T(!0),C(t(`models.capApplied`)),await fe()):(T(!1),C(t(`models.capSaveFailed`)))}catch{T(!1),C(t(`models.networkError`))}finally{A(!1),j.current=!1}},_e=e=>{b(t=>{let n=new Set(t);n.has(e)?n.delete(e):n.add(e);try{localStorage.setItem(`ocx-models-collapsed`,JSON.stringify([...n]))}catch{}return n})},ve=async n=>{A(!0),j.current=!0,C(``);try{let r=await fetch(`${e}/api/provider-context-caps`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(n)});if(r.ok){let e=await r.json();typeof e.value==`number`&&Number.isFinite(e.value)&&e.value>0&&p(e.value),d(e.caps??{}),T(!0),C(t(`models.capApplied`)),await fe()}else T(!1),C(t(`models.capSaveFailed`))}catch{T(!1),C(t(`models.networkError`))}finally{A(!1),j.current=!1}},ye=e=>{!Number.isFinite(e)||e<=0||ve({value:Math.floor(e)})},be=e=>{if(e===or){v(!0),h(String(f));return}v(!1);let t=Number(e);Number.isFinite(t)&&t>0&&t!==f&&ye(t)},xe=()=>{let e=Number(m.replace(/[_,\s]/g,``));if(!Number.isFinite(e)||e<=0){T(!1),C(t(`models.capSaveFailed`));return}v(!1),ye(e)},Se=(0,_.useMemo)(()=>{let e=pe.filter(([,e])=>!e.every(e=>e.native));return e.length>0&&e.every(([e])=>u[e]===f)},[pe,u,f]),Ce=()=>{ve({setAll:!Se})},H=async t=>{if(!(!oe||ce)){le(!0),se({...oe,...t});try{await fetch(`${e}/api/shadow-call-settings`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)})}finally{le(!1)}}},we=async n=>{if(!(!M||te.current)&&M.multiAgentMode!==n){ee(!0),te.current=!0,I(``),C(``);try{let r=await fetch(`${e}/api/v2`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({multiAgentMode:n})}),i=await r.json().catch(()=>null);r.ok&&i?(de(),T(!0),C(t(`models.v2Applied`)),I((i.warnings??[]).join(` `))):(T(!1),C(i?.error??t(`models.saveFailed`)))}catch{T(!1),C(t(`models.networkError`))}finally{ee(!1),te.current=!1}}},Te=async n=>{if(!(!M||te.current)){if(!Number.isInteger(n)||n<1){T(!1),C(t(`models.v2ThreadsInvalid`));return}if(M.maxConcurrentThreadsPerSession!==n){ee(!0),te.current=!0,I(``),C(``);try{let r=await fetch(`${e}/api/v2`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({maxConcurrentThreadsPerSession:n})}),i=await r.json().catch(()=>null);r.ok&&i&&typeof i.enabled==`boolean`?(N({enabled:i.enabled,agentsMaxThreadsConflict:i.agentsMaxThreadsConflict===!0,maxConcurrentThreadsPerSession:typeof i.maxConcurrentThreadsPerSession==`number`?i.maxConcurrentThreadsPerSession:null,multiAgentMode:i.multiAgentMode===`v1`||i.multiAgentMode===`v2`?i.multiAgentMode:`default`}),T(!0),C(t(`models.v2ThreadsApplied`)),re(!1)):(T(!1),C(i?.error??t(`models.saveFailed`)))}catch{T(!1),C(t(`models.networkError`))}finally{ee(!1),te.current=!1}}}},Ee=e=>{if(e===or){re(!0),R(String(M?.maxConcurrentThreadsPerSession??``));return}re(!1),Te(Number(e))};return D?(0,S.jsxs)(`div`,{className:`row muted`,children:[(0,S.jsx)(`span`,{className:`spin`}),` `,t(`models.loading`)]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`div`,{className:`page-head`,children:[(0,S.jsx)(`h2`,{children:t(`nav.models`)}),(0,S.jsx)(`span`,{className:`muted mono text-label`,children:t(`models.active`,{active:n.length-i.size,total:n.length})})]}),(0,S.jsx)(`p`,{className:`page-sub`,children:t(`models.subtitle`)}),x&&(0,S.jsx)(W,{tone:w?`ok`:`err`,children:x}),(0,S.jsxs)(`div`,{className:`row muted text-control`,style:{gap:6,marginBottom:8,alignItems:`center`},children:[(0,S.jsxs)(`span`,{title:t(`models.shadowCallInterceptHint`),style:{cursor:`help`},children:[t(`models.shadowCallIntercept`),` ⓘ`]}),(0,S.jsx)(`code`,{className:`text-caption`,style:{opacity:.6},children:`⚠ 5.4-mini →`}),(0,S.jsx)(ke,{on:oe?.enabled??!1,onClick:()=>void H({enabled:!oe?.enabled}),disabled:!oe||ce,label:t(`models.shadowCallIntercept`)}),(0,S.jsx)(G,{value:oe?.model??``,options:[{value:``,label:`—`},...V],onChange:e=>{se(t=>t&&{...t,model:e}),H({model:e})},disabled:!oe||ce||!oe.enabled,label:t(`models.shadowCallIntercept`)})]}),M&&(0,S.jsxs)(`div`,{className:`row`,style:{gap:8,marginBottom:8,flexWrap:`wrap`,alignItems:`center`},children:[(0,S.jsx)(`span`,{className:`muted text-control`,children:t(`models.v2Label`)}),(0,S.jsx)(`div`,{className:`segmented`,role:`radiogroup`,"aria-label":t(`models.v2Label`),style:{display:`inline-flex`,borderRadius:`var(--radius-pill)`,background:`var(--surface-soft, var(--raised))`,padding:3,gap:2},children:[`v1`,`default`,`v2`].map(e=>(0,S.jsx)(`button`,{type:`button`,role:`radio`,"aria-checked":(M.multiAgentMode??`default`)===e,className:`btn btn-sm${(M.multiAgentMode??`default`)===e?` btn-primary`:` btn-ghost`}`,style:{borderRadius:`var(--radius-pill)`,minWidth:64,padding:`5px 12px`,border:`none`,background:(M.multiAgentMode??`default`)===e?void 0:`transparent`,color:(M.multiAgentMode??`default`)===e?void 0:`var(--muted)`},disabled:P,onClick:()=>void we(e),children:t(`models.v2Mode_${e}`)},e))}),(0,S.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,style:{width:24,height:24,minWidth:24,flex:`0 0 24px`,padding:0,borderRadius:`var(--radius-pill)`,color:`var(--muted)`},onClick:()=>ae(!0),"aria-label":t(`models.v2Label`),"aria-haspopup":`dialog`,children:(0,S.jsx)(L,{width:14,height:14,"aria-hidden":`true`})}),M.enabled&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`span`,{className:`muted text-control`,style:{marginLeft:8},children:t(`models.v2ThreadsLabel`)}),(0,S.jsx)(G,{value:B?or:M.maxConcurrentThreadsPerSession!==null&&M.maxConcurrentThreadsPerSession!==void 0?cr.has(M.maxConcurrentThreadsPerSession)?String(M.maxConcurrentThreadsPerSession):or:``,options:[...M.maxConcurrentThreadsPerSession===null||M.maxConcurrentThreadsPerSession===void 0?[{value:``,label:t(`models.v2ThreadsDefault`)}]:[],...M.maxConcurrentThreadsPerSession!==null&&M.maxConcurrentThreadsPerSession!==void 0&&!cr.has(M.maxConcurrentThreadsPerSession)&&!B?[{value:or,label:String(M.maxConcurrentThreadsPerSession)}]:[],...sr.map(e=>({value:String(e),label:String(e)})),{value:or,label:t(`models.custom`)}],onChange:e=>Ee(e),disabled:P,label:t(`models.v2ThreadsLabel`)}),B&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`input`,{className:`input`,style:{width:100},inputMode:`numeric`,value:ne,onChange:e=>R(e.target.value),onKeyDown:e=>{e.key===`Enter`&&Te(Number(ne.replace(/[_,\s]/g,``)))},disabled:P,"aria-label":t(`models.v2ThreadsLabel`)}),(0,S.jsx)(`button`,{type:`button`,className:`btn btn-sm`,disabled:P,onClick:()=>{Te(Number(ne.replace(/[_,\s]/g,``)))},children:t(`models.v2ThreadsApply`)})]})]}),M.enabled&&M.agentsMaxThreadsConflict&&(0,S.jsx)(`span`,{className:`mono text-label`,style:{color:`var(--err, #e5484d)`},children:t(`models.v2Conflict`)}),F&&(0,S.jsx)(`span`,{className:`muted text-label`,children:F})]}),(0,S.jsxs)(`div`,{className:`row`,style:{gap:8,marginBottom:8,flexWrap:`wrap`},children:[(0,S.jsx)(`span`,{className:`muted text-control`,children:t(`models.contextCapLabel`)}),(0,S.jsx)(G,{value:g?or:ar.has(f)?String(f):or,options:[...!ar.has(f)&&!g?[{value:String(f),label:ur(f)}]:[],...ir.map(e=>({value:String(e),label:ur(e)})),{value:or,label:t(`models.custom`)}],onChange:e=>be(e),disabled:k,label:t(`models.contextCapLabel`)}),g&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`input`,{className:`input`,style:{width:160},inputMode:`numeric`,placeholder:t(`models.customPlaceholder`),value:m,onChange:e=>h(e.target.value),onKeyDown:e=>{e.key===`Enter`&&xe()},disabled:k,"aria-label":t(`models.customPlaceholder`)}),(0,S.jsx)(`button`,{type:`button`,onClick:xe,disabled:k,className:`btn btn-ghost btn-sm`,children:t(`models.customApply`)})]}),(0,S.jsx)(`div`,{style:{flex:1}}),(0,S.jsx)(ke,{on:Se,onClick:Ce,disabled:k,label:t(`models.setAll`)}),(0,S.jsx)(`span`,{className:`muted mono text-label`,children:t(`models.setAll`)})]}),(0,S.jsxs)(`div`,{className:`row muted text-label leading-body`,style:{alignItems:`flex-start`,gap:8,marginBottom:12,maxWidth:`80ch`},children:[(0,S.jsx)(L,{width:15,height:15,"aria-hidden":`true`,style:{flexShrink:0,marginTop:2}}),(0,S.jsx)(`span`,{children:t(`models.orderHint`)})]}),pe.map(([e,n])=>{let r=y.has(e),a=n.filter(e=>!i.has(e.namespaced)).length,d=u[e]===f,p=n.every(e=>e.native),m=(o[e]??``).trim().toLowerCase(),h=m?n.filter(e=>e.id.toLowerCase().includes(m)):n,g=[...h].sort((e,t)=>Number(i.has(e.namespaced))-Number(i.has(t.namespaced))),_=c[e]??lr,v=g.slice(0,_),b=h.length-v.length,x=n.every(e=>!i.has(e.namespaced)),C=n.every(e=>i.has(e.namespaced)),w=e=>{let t=new Set(i);for(let r of n)e?t.delete(r.namespaced):t.add(r.namespaced);me(t)};return(0,S.jsxs)(`div`,{className:`card`,style:{marginBottom:8,overflow:`hidden`},children:[(0,S.jsxs)(`div`,{onClick:()=>_e(e),className:`row group-head${r?``:` open`}`,children:[(0,S.jsx)(z,{style:{width:14,height:14,color:`var(--muted)`,transform:r?`none`:`rotate(90deg)`,transition:`transform .12s`}}),(0,S.jsx)(`span`,{className:`text-body font-semibold`,children:e}),p&&(0,S.jsx)(`span`,{className:`muted mono text-caption`,style:{padding:`1px 6px`,border:`1px solid var(--border)`,borderRadius:`var(--radius-pill)`},children:t(`models.nativeGroupLabel`)}),(0,S.jsx)(`span`,{className:`muted mono text-label`,children:t(`models.active`,{active:a,total:n.length})}),(0,S.jsx)(`div`,{style:{flex:1}}),(0,S.jsxs)(`div`,{className:`row`,onClick:e=>e.stopPropagation(),style:{gap:6},children:[(0,S.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm text-caption`,disabled:k||x,onClick:()=>w(!0),style:{padding:`2px 8px`},children:t(`models.allOn`)}),(0,S.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm text-caption`,disabled:k||C,onClick:()=>w(!1),style:{padding:`2px 8px`},children:t(`models.allOff`)}),!p&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(ke,{on:d,onClick:()=>ge(e),disabled:k,label:t(`models.capValue`,{value:ur(f)})}),(0,S.jsx)(`span`,{className:`muted mono text-label`,children:t(`models.capValue`,{value:ur(f)})})]})]})]}),!r&&(0,S.jsxs)(`div`,{style:{padding:`6px 12px`},children:[p&&(0,S.jsx)(`p`,{className:`muted text-label`,style:{margin:`2px 0 6px`},children:t(`models.nativeHint`)}),n.length>lr/2&&(0,S.jsx)(`input`,{className:`input`,style:{width:`100%`,marginBottom:6},placeholder:t(`models.search`),value:o[e]??``,onChange:t=>s(n=>({...n,[e]:t.target.value})),"aria-label":t(`models.search`)}),v.map(e=>{let n=i.has(e.namespaced);return(0,S.jsxs)(`div`,{className:`row`,style:{padding:`5px 0`},children:[(0,S.jsx)(ke,{on:!n,onClick:()=>he(e.namespaced),disabled:k,label:e.native?e.id:e.namespaced}),(0,S.jsx)(`code`,{className:`mono text-control`,style:{color:n?`var(--faint)`:`var(--text)`,textDecoration:n?`line-through`:`none`},children:e.native?rr(e.id):e.namespaced}),e.contextCapped&&(0,S.jsx)(`span`,{className:`muted mono text-caption`,style:{padding:`1px 6px`,border:`1px solid var(--border)`,borderRadius:`var(--radius-pill)`},children:t(`models.contextCappedValue`,{value:ur(e.contextCap??f)})})]},e.namespaced)}),b>0&&(0,S.jsx)(`button`,{type:`button`,onClick:()=>l(t=>({...t,[e]:_+lr})),className:`btn btn-ghost btn-sm`,style:{marginTop:4},children:t(`models.showMore`,{n:b})})]})]},e)}),pe.length===0&&(0,S.jsx)(Ae,{icon:(0,S.jsx)(E,{}),title:t(`models.noRouted`),children:t(`models.noRoutedHint`)}),ie&&(0,S.jsx)(`div`,{className:`modal-overlay`,role:`dialog`,"aria-modal":`true`,"aria-label":t(`models.v2Label`),onClick:()=>ae(!1),onKeyDown:e=>{e.key===`Escape`&&ae(!1)},children:(0,S.jsxs)(`div`,{className:`modal-card`,onClick:e=>e.stopPropagation(),children:[(0,S.jsxs)(`div`,{className:`modal-head`,children:[(0,S.jsx)(`h3`,{children:t(`models.v2Label`)}),(0,S.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>ae(!1),"aria-label":t(`common.close`),children:`×`})]}),(0,S.jsx)(`div`,{className:`modal-desc leading-relaxed`,style:{whiteSpace:`pre-line`},children:t(`models.v2Help`)}),(0,S.jsx)(`div`,{style:{marginTop:12},children:(0,S.jsx)(`a`,{className:`text-control`,href:`https://lidge-jun.github.io/opencodex/guides/sub-agent-surface/`,target:`_blank`,rel:`noreferrer`,style:{color:`var(--accent)`},children:t(`models.v2DocsLink`)})}),(0,S.jsx)(`div`,{className:`modal-actions`,children:(0,S.jsx)(`button`,{type:`button`,className:`btn btn-primary`,onClick:()=>ae(!1),children:t(`common.ok`)})})]})})]})}var mr=[`low`,`medium`,`high`,`xhigh`,`max`,`ultra`],hr=`medium`,gr=/^[a-zA-Z0-9][a-zA-Z0-9._-]{0,63}$/;function _r(e){return gr.test(e.trim())}function vr(e){return`combo/${e.trim()}`}function yr(e){return e===`round-robin`?`round-robin`:`failover`}function br(e){return typeof e==`number`&&Number.isInteger(e)&&e>=1&&e<=100?e:1}function xr(e){return typeof e==`string`&&mr.includes(e)?e:hr}function Sr(e){return typeof e==`number`&&Number.isInteger(e)&&e>=1&&e<=1e4?e:void 0}function Cr(e){if(!e||typeof e!=`object`)return[];let t=e.combos;if(!Array.isArray(t))return[];let n=[];for(let e of t){if(!e||typeof e!=`object`)continue;let t=e,r=typeof t.id==`string`?t.id.trim():``;if(!r)continue;let i=Array.isArray(t.targets)?t.targets:[],a=[];for(let e of i){if(!e||typeof e!=`object`)continue;let t=e,n=typeof t.provider==`string`?t.provider.trim():``,r=typeof t.model==`string`?t.model.trim():``;if(!n||!r)continue;let i=Sr(t.weight);a.push(i===void 0?{provider:n,model:r}:{provider:n,model:r,weight:i})}n.push({id:r,model:typeof t.model==`string`&&t.model.trim()?t.model.trim():vr(r),strategy:yr(t.strategy),stickyLimit:br(t.stickyLimit),defaultEffort:xr(t.defaultEffort),targets:a})}return n.sort((e,t)=>e.id.localeCompare(t.id,void 0,{sensitivity:`base`}))}function wr(e){let t=[],n=[];for(let r of e)r.strategy===`round-robin`?n.push(r):t.push(r);return{failover:t,roundRobin:n}}function Tr(e,t){let n=t.trim().toLowerCase();return n?e.filter(e=>e.id.toLowerCase().includes(n)||e.model.toLowerCase().includes(n)?!0:e.targets.some(e=>e.provider.toLowerCase().includes(n)||e.model.toLowerCase().includes(n))):e}function Er(e){let t=[];for(let n of e)n.targets.length===0?t.push({id:n.id,model:n.model,reason:`empty-targets`}):n.targets.length<2&&t.push({id:n.id,model:n.model,reason:`few-targets`});return t}function Dr(e,t){return e.id!==t.id||e.strategy!==t.strategy||e.stickyLimit!==t.stickyLimit||e.defaultEffort!==t.defaultEffort||e.targets.length!==t.targets.length?!1:e.targets.every((e,n)=>{let r=t.targets[n];return e.provider===r.provider&&e.model===r.model&&(e.weight??1)===(r.weight??1)})}function Or(e){return{id:e.id.trim(),combo:{targets:e.targets.map(t=>e.strategy===`round-robin`?{provider:t.provider.trim(),model:t.model.trim(),weight:t.weight??1}:{provider:t.provider.trim(),model:t.model.trim()}),strategy:e.strategy,defaultEffort:e.defaultEffort,...e.strategy===`round-robin`?{stickyLimit:e.stickyLimit}:{}}}}function kr(e,t){let n=e.id.trim();if(!n)return`missingId`;if(!_r(n))return`invalidId`;if(t.isCreate&&t.existingIds.includes(n))return`duplicateId`;if(Object.hasOwn(t.providers,`combo`))return`reservedNamespace`;if(Object.hasOwn(t.providers,n))return`providerCollision`;if(e.targets.length<1)return`noTargets`;for(let n of e.targets){if(!n.provider.trim()||!n.model.trim())return`incompleteTarget`;if(!Object.hasOwn(t.providers,n.provider.trim()))return`unknownProvider`}let r=new Set;for(let t of e.targets){let e=`${t.provider.trim()}/${t.model.trim()}`;if(r.has(e))return`duplicateTarget`;r.add(e)}if(e.strategy===`round-robin`){if(!Number.isInteger(e.stickyLimit)||e.stickyLimit<1||e.stickyLimit>100)return`invalidStickyLimit`;for(let t of e.targets){let e=t.weight??1;if(!Number.isInteger(e)||e<1||e>1e4)return`invalidWeight`}}return e.targets.some(e=>t.providers[e.provider.trim()]?.disabled!==!0)?null:`noEnabledTarget`}function Ar(e=``){return{id:e,model:e?vr(e):`combo/`,strategy:`failover`,stickyLimit:1,defaultEffort:hr,targets:[{provider:``,model:``}]}}function jr(e){return e.filter(e=>!e.disabled&&!e.hiddenFromPicker).sort((e,t)=>e.name.localeCompare(t.name))}function Mr(e){if(!e)return!1;let t=e.name.toLowerCase();if(t!==`openai`&&t!==`chatgpt`||(e.authMode??``).toLowerCase()!==`forward`||(e.adapter??``).toLowerCase()!==`openai-responses`)return!1;let n=(e.baseUrl??``).replace(/\/+$/,``);return!n||n.includes(`chatgpt.com/backend-api/codex`)}function Nr(e,t,n){let r=new Set([t]),i=n.find(e=>e.name===t);(t.toLowerCase()===`chatgpt`||Mr(i))&&r.add(`openai`);let a=e.filter(e=>r.has(e.provider)).map(e=>e.id).filter(Boolean);return[...new Set(a)].sort((e,t)=>e.localeCompare(t))}function Pr({value:e,onChange:t,disabled:n}){let r=U();return(0,S.jsx)(`div`,{className:`cwi-strategy-seg`,role:`radiogroup`,"aria-label":r(`cws.strategy`),children:[[`failover`,`cws.strategy.failover`],[`round-robin`,`cws.strategy.roundRobin`]].map(([i,a])=>(0,S.jsx)(`button`,{type:`button`,role:`radio`,"aria-checked":e===i,className:`btn btn-sm${e===i?` btn-primary`:` btn-ghost`}`,disabled:n,onClick:()=>t(i),children:r(a)},i))})}function Fr({id:e,value:t,onChange:n,disabled:r}){return(0,S.jsx)(`select`,{id:e,className:`input`,value:t,disabled:r,"aria-label":U()(`cws.field.defaultEffort`),onChange:e=>n(e.target.value),children:mr.map(e=>(0,S.jsx)(`option`,{value:e,children:e},e))})}function Ir({targets:e,strategy:t,providers:n,models:r,onChange:i}){let a=U(),o=jr(n),[s,c]=(0,_.useState)(null),[l,u]=(0,_.useState)(null),d=(t,n)=>{i(e.map((e,r)=>r===t?{...e,...n}:e))},f=(t,n)=>{if(t===n||t<0||n<0||t>=e.length||n>=e.length)return;let r=[...e],[a]=r.splice(t,1);r.splice(n,0,a),i(r)};return(0,S.jsxs)(`div`,{className:`cwi-target-list`,children:[e.map((p,m)=>{let h=n.find(e=>e.name===p.provider),g=h&&!o.some(e=>e.name===p.provider)?[...o,h]:o,_=Nr(r,p.provider,n),v=p.model&&!_.includes(p.model)?[p.model,..._]:_,y=!p.provider;return(0,S.jsxs)(`div`,{className:[`cwi-target-row`,t===`failover`?`cwi-target-row--failover`:``,s===m?`cwi-target-row--dragging`:``,l===m&&s!==null&&s!==m?`cwi-target-row--drop`:``].filter(Boolean).join(` `),onDragOver:e=>{s!==null&&(e.preventDefault(),e.dataTransfer.dropEffect=`move`,l!==m&&u(m))},onDrop:e=>{e.preventDefault(),s!==null&&f(s,m),c(null),u(null)},onDragEnd:()=>{c(null),u(null)},children:[(0,S.jsx)(`button`,{type:`button`,className:`cwi-target-grip`,draggable:!0,"aria-label":a(`cws.target.drag`),title:a(`cws.target.drag`),onDragStart:e=>{c(m),e.dataTransfer.effectAllowed=`move`,e.dataTransfer.setData(`text/plain`,String(m))},children:(0,S.jsx)(me,{width:14,height:14,"aria-hidden":`true`})}),(0,S.jsxs)(`select`,{className:`input`,value:p.provider,"aria-label":a(`cws.target.provider`),onChange:e=>{let t=e.target.value;d(m,{provider:t,model:Nr(r,t,n)[0]??``})},children:[(0,S.jsx)(`option`,{value:``,children:a(`cws.target.pickProvider`)}),g.map(e=>(0,S.jsx)(`option`,{value:e.name,children:e.disabled?a(`cws.target.disabled`,{name:e.name}):e.name},e.name))]}),(0,S.jsxs)(`select`,{className:`input`,value:p.model,disabled:y,"aria-label":a(`cws.target.model`),onChange:e=>d(m,{model:e.target.value}),children:[(0,S.jsx)(`option`,{value:``,children:y?a(`cws.target.pickProviderFirst`):v.length===0?a(`cws.target.noModels`):a(`cws.target.pickModel`)}),v.map(e=>(0,S.jsx)(`option`,{value:e,children:e},e))]}),t===`round-robin`&&(0,S.jsx)(`input`,{className:`input mono`,type:`number`,min:1,max:1e4,value:p.weight??1,"aria-label":a(`cws.target.weight`),onChange:e=>d(m,{weight:Number(e.target.value)})}),(0,S.jsx)(`div`,{className:`cwi-target-actions`,children:(0,S.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,disabled:e.length<=1,onClick:()=>i(e.filter((e,t)=>t!==m)),"aria-label":a(`common.remove`),children:(0,S.jsx)(F,{width:14,height:14})})})]},m)}),(0,S.jsxs)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,style:{alignSelf:`flex-start`},onClick:()=>i([...e,{provider:``,model:``}]),children:[(0,S.jsx)(P,{width:14,height:14}),` `,a(`cws.target.add`)]})]})}function Lr({model:e,onCancel:t,onConfirm:n}){let r=U();return(0,_.useEffect)(()=>{let e=e=>{e.key===`Escape`&&(e.preventDefault(),t())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[t]),(0,S.jsx)(`div`,{className:`modal-overlay`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`cwi-remove-title`,onClick:t,children:(0,S.jsxs)(`div`,{className:`modal-card pwi-remove-confirm-card`,onClick:e=>e.stopPropagation(),children:[(0,S.jsx)(`h3`,{id:`cwi-remove-title`,className:`pwi-remove-confirm-title`,children:r(`cws.removeConfirmTitle`,{model:e})}),(0,S.jsx)(`p`,{className:`muted pwi-remove-confirm-desc`,children:r(`cws.removeConfirmDesc`)}),(0,S.jsxs)(`div`,{className:`pwi-remove-confirm-actions`,children:[(0,S.jsx)(`button`,{type:`button`,className:`btn btn-ghost`,onClick:t,children:r(`common.cancel`)}),(0,S.jsx)(`button`,{type:`button`,className:`btn pwi-remove-confirm-danger`,onClick:n,children:r(`common.remove`)})]})]})})}function Rr({onKeep:e,onDiscard:t}){let n=U();return(0,S.jsx)(`div`,{className:`modal-overlay`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`cwi-unsaved-title`,onClick:e,children:(0,S.jsxs)(`div`,{className:`modal-card pwi-json-unsaved-card`,onClick:e=>e.stopPropagation(),children:[(0,S.jsx)(`h3`,{id:`cwi-unsaved-title`,className:`pwi-json-unsaved-title`,children:n(`cws.unsavedTitle`)}),(0,S.jsx)(`p`,{className:`muted pwi-json-unsaved-desc`,children:n(`cws.unsavedDesc`)}),(0,S.jsxs)(`div`,{className:`pwi-json-unsaved-actions`,children:[(0,S.jsx)(`button`,{type:`button`,className:`btn btn-ghost`,onClick:e,children:n(`cws.keepEditing`)}),(0,S.jsx)(`button`,{type:`button`,className:`btn btn-danger`,onClick:t,children:n(`common.discard`)})]})]})})}function zr({existingIds:e,providerMap:t,providers:n,models:r,onClose:i,onSubmit:a}){let o=U(),[s,c]=(0,_.useState)(()=>Ar()),[l,u]=(0,_.useState)(!1),[d,f]=(0,_.useState)(``);(0,_.useEffect)(()=>{let e=e=>{e.key===`Escape`&&!l&&(e.preventDefault(),i())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[l,i]);let p=async()=>{let n=kr(s,{existingIds:e,isCreate:!0,providers:t});if(n){f(o(`cws.err.${n}`));return}u(!0),f(``);let r=await a({...s,id:s.id.trim(),model:vr(s.id.trim())});if(u(!1),!r.ok){f(r.error||o(`cws.saveFailed`));return}};return(0,S.jsx)(`div`,{className:`modal-overlay`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`cwi-add-title`,onClick:()=>{l||i()},children:(0,S.jsxs)(`div`,{className:`modal-card`,style:{width:`min(560px, 94vw)`},onClick:e=>e.stopPropagation(),children:[(0,S.jsxs)(`div`,{className:`row`,style:{justifyContent:`space-between`,marginBottom:8},children:[(0,S.jsx)(`h3`,{id:`cwi-add-title`,style:{margin:0},children:o(`cws.addTitle`)}),(0,S.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:i,disabled:l,"aria-label":o(`common.close`),children:(0,S.jsx)(N,{width:16,height:16})})]}),(0,S.jsx)(`p`,{className:`muted`,style:{marginTop:0},children:o(`cws.addSubtitle`)}),d&&(0,S.jsx)(W,{tone:`err`,children:d}),(0,S.jsxs)(`div`,{className:`cwi-modal-form`,children:[(0,S.jsxs)(`div`,{className:`cwi-field`,children:[(0,S.jsx)(`label`,{htmlFor:`cwi-new-id`,children:o(`cws.field.id`)}),(0,S.jsx)(`input`,{id:`cwi-new-id`,className:`input mono`,value:s.id,placeholder:o(`cws.field.idPlaceholder`),disabled:l,onChange:e=>c(t=>({...t,id:e.target.value,model:vr(e.target.value)}))}),(0,S.jsx)(`p`,{className:`muted`,style:{fontSize:12,margin:`4px 0 0`},children:o(`cws.field.idHint`,{model:s.id.trim()?vr(s.id.trim()):`combo/…`})})]}),(0,S.jsxs)(`div`,{className:`cwi-field`,children:[(0,S.jsx)(`label`,{children:o(`cws.strategy`)}),(0,S.jsx)(Pr,{value:s.strategy,disabled:l,onChange:e=>c(t=>({...t,strategy:e}))}),(0,S.jsx)(`p`,{className:`muted`,style:{fontSize:12,margin:`6px 0 0`},children:s.strategy===`failover`?o(`cws.strategy.failoverHint`):o(`cws.strategy.roundRobinHint`)})]}),(0,S.jsxs)(`div`,{className:`cwi-field`,children:[(0,S.jsx)(`label`,{htmlFor:`cwi-new-effort`,children:o(`cws.field.defaultEffort`)}),(0,S.jsx)(Fr,{id:`cwi-new-effort`,value:s.defaultEffort,disabled:l,onChange:e=>c(t=>({...t,defaultEffort:e}))}),(0,S.jsx)(`p`,{className:`muted`,style:{fontSize:12,margin:`4px 0 0`},children:o(`cws.field.defaultEffortHint`)})]}),s.strategy===`round-robin`&&(0,S.jsxs)(`div`,{className:`cwi-field`,children:[(0,S.jsx)(`label`,{htmlFor:`cwi-new-sticky`,children:o(`cws.field.stickyLimit`)}),(0,S.jsx)(`input`,{id:`cwi-new-sticky`,className:`input mono`,type:`number`,min:1,max:100,value:s.stickyLimit,disabled:l,onChange:e=>c(t=>({...t,stickyLimit:Number(e.target.value)}))}),(0,S.jsx)(`p`,{className:`muted`,style:{fontSize:12,margin:`4px 0 0`},children:o(`cws.field.stickyLimitHint`)})]}),(0,S.jsxs)(`div`,{className:`cwi-field`,children:[(0,S.jsx)(`label`,{children:o(`cws.targets`)}),(0,S.jsx)(`p`,{className:`muted`,style:{fontSize:12,margin:`0 0 8px`},children:s.strategy===`failover`?o(`cws.targets.failoverHint`):o(`cws.targets.roundRobinHint`)}),(0,S.jsx)(Ir,{targets:s.targets,strategy:s.strategy,providers:n,models:r,onChange:e=>c(t=>({...t,targets:e}))})]})]}),(0,S.jsxs)(`div`,{className:`cwi-modal-actions`,children:[(0,S.jsx)(`button`,{type:`button`,className:`btn btn-ghost`,onClick:i,disabled:l,children:o(`common.cancel`)}),(0,S.jsx)(`button`,{type:`button`,className:`btn btn-primary`,onClick:()=>{p()},disabled:l,children:o(l?`common.saving`:`cws.create`)})]})]})})}function Br({combos:e,onSelect:t,onAdd:n}){let r=U(),i=wr(e),a=Er(e);return(0,S.jsxs)(`div`,{className:`combos-workspace-overview`,children:[(0,S.jsxs)(`div`,{className:`combos-workspace-overview-head`,children:[(0,S.jsx)(`h2`,{className:`combos-workspace-overview-title`,children:r(`cws.overviewTitle`)}),(0,S.jsxs)(`button`,{type:`button`,className:`btn btn-primary btn-sm`,onClick:n,children:[(0,S.jsx)(P,{width:14,height:14}),` `,r(`cws.add`)]})]}),(0,S.jsx)(`p`,{className:`muted`,style:{marginTop:0,maxWidth:`62ch`},children:r(`cws.overviewBlurb`)}),(0,S.jsxs)(`div`,{className:`cwi-count-strip`,children:[(0,S.jsxs)(`div`,{className:`cwi-count-pill`,children:[(0,S.jsx)(`strong`,{children:e.length}),(0,S.jsx)(`span`,{children:r(`cws.count.total`)})]}),(0,S.jsxs)(`div`,{className:`cwi-count-pill`,children:[(0,S.jsx)(`strong`,{children:i.failover.length}),(0,S.jsx)(`span`,{children:r(`cws.count.failover`)})]}),(0,S.jsxs)(`div`,{className:`cwi-count-pill`,children:[(0,S.jsx)(`strong`,{children:i.roundRobin.length}),(0,S.jsx)(`span`,{children:r(`cws.count.roundRobin`)})]})]}),(0,S.jsxs)(`section`,{className:`pwi-section`,"aria-label":r(`cws.howTitle`),children:[(0,S.jsx)(`h3`,{className:`pwi-section-title`,children:r(`cws.howTitle`)}),(0,S.jsx)(`p`,{className:`muted`,style:{margin:0},children:r(`cws.howBody`)})]}),a.length>0&&(0,S.jsxs)(`section`,{className:`pwi-section`,"aria-label":r(`cws.attentionTitle`),children:[(0,S.jsx)(`h3`,{className:`pwi-section-title`,children:r(`cws.attentionTitle`)}),(0,S.jsx)(`div`,{className:`cwi-attention-list`,children:a.map(e=>(0,S.jsxs)(`button`,{type:`button`,className:`cwi-attention-row`,onClick:()=>t(e.id),children:[(0,S.jsx)(I,{width:14,height:14,"aria-hidden":`true`}),(0,S.jsx)(`code`,{className:`chip`,children:e.model}),(0,S.jsx)(`span`,{className:`muted`,children:e.reason===`empty-targets`?r(`cws.attention.empty`):r(`cws.attention.few`)}),(0,S.jsx)(z,{width:14,height:14,style:{marginLeft:`auto`},"aria-hidden":`true`})]},e.id))})]})]})}function Vr({onAdd:e}){let t=U();return(0,S.jsx)(`div`,{className:`combos-workspace-empty-root`,children:(0,S.jsxs)(`button`,{type:`button`,className:`cwi-empty-cta`,onClick:e,children:[(0,S.jsx)(`span`,{className:`pwi-empty-right-icon`,"aria-hidden":`true`,children:(0,S.jsx)(pe,{style:{width:64,height:64}})}),(0,S.jsx)(`span`,{className:`cwi-empty-cta-title`,children:t(`cws.emptyTitle`)}),(0,S.jsx)(`span`,{className:`pwi-empty-right-sub`,children:t(`cws.empty.createDesc`)})]})})}function Hr({baseline:e,providerMap:t,providers:n,models:r,onBack:i,onSaved:a,onRequestRemove:o,onSave:s,onDirtyChange:c}){let l=U(),[u,d]=(0,_.useState)(`config`),[f,p]=(0,_.useState)(e),[m,h]=(0,_.useState)(!1),[g,v]=(0,_.useState)(null),[y,b]=(0,_.useState)(!1),x=!Dr(f,e);(0,_.useEffect)(()=>{let t=window.setTimeout(()=>{p(e),v(null),d(`config`)},0);return()=>window.clearTimeout(t)},[`${e.id}:${e.strategy}:${e.stickyLimit}:${e.defaultEffort}:${e.targets.map(e=>`${e.provider}/${e.model}:${e.weight??1}`).join(`,`)}`]),(0,_.useEffect)(()=>{c(x)},[x,c]);let C=async()=>{try{await navigator.clipboard.writeText(e.model),b(!0),window.setTimeout(()=>b(!1),1200)}catch{}},w=async()=>{let e=kr(f,{existingIds:[],isCreate:!1,providers:t});if(e){v({ok:!1,text:l(`cws.err.${e}`)});return}h(!0);let n=await s(f,!1);if(h(!1),!n.ok){v({ok:!1,text:n.error||l(`cws.saveFailed`)});return}v({ok:!0,text:l(`cws.saved`)}),a(f)};return(0,S.jsxs)(`div`,{className:`combos-workspace-detail`,children:[(0,S.jsxs)(`div`,{className:`combos-workspace-detail-head`,children:[(0,S.jsxs)(`button`,{type:`button`,className:`btn btn-ghost btn-sm pwi-back-overview`,onClick:i,"aria-label":l(`cws.backToAll`),children:[(0,S.jsx)(z,{style:{width:14,height:14,transform:`rotate(180deg)`},"aria-hidden":`true`}),l(`cws.allCombos`)]}),(0,S.jsx)(`h2`,{className:`combos-workspace-detail-title`,children:e.model}),(0,S.jsx)(`button`,{type:`button`,className:`chip cwi-copy-chip`,onClick:()=>{C()},title:l(`cws.copyModel`),children:l(y?`cws.copied`:`cws.copyModel`)}),(0,S.jsxs)(`div`,{className:`combos-workspace-detail-actions`,children:[(0,S.jsxs)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:o,children:[(0,S.jsx)(F,{width:14,height:14}),` `,l(`common.remove`)]}),(0,S.jsx)(`button`,{type:`button`,className:`btn btn-primary btn-sm`,disabled:!x||m,onClick:()=>{w()},children:l(m?`common.saving`:`common.save`)})]})]}),g&&(0,S.jsx)(W,{tone:g.ok?`ok`:`err`,children:g.text}),(0,S.jsxs)(`div`,{className:`combos-workspace-tabs`,role:`tablist`,children:[(0,S.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":u===`config`,className:`combos-workspace-tab${u===`config`?` combos-workspace-tab--active`:``}`,onClick:()=>d(`config`),children:l(`cws.tab.config`)}),(0,S.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":u===`about`,className:`combos-workspace-tab${u===`about`?` combos-workspace-tab--active`:``}`,onClick:()=>d(`about`),children:l(`cws.tab.about`)})]}),(0,S.jsx)(`div`,{className:`combos-workspace-tab-content`,role:`tabpanel`,children:u===`config`?(0,S.jsxs)(`div`,{className:`cwi-form-grid`,children:[(0,S.jsxs)(`div`,{className:`cwi-field`,children:[(0,S.jsx)(`label`,{children:l(`cws.strategy`)}),(0,S.jsx)(Pr,{value:f.strategy,disabled:m,onChange:e=>p(t=>({...t,strategy:e}))}),(0,S.jsx)(`p`,{className:`muted`,style:{fontSize:12,margin:`6px 0 0`},children:f.strategy===`failover`?l(`cws.strategy.failoverHint`):l(`cws.strategy.roundRobinHint`)})]}),(0,S.jsxs)(`div`,{className:`cwi-field`,children:[(0,S.jsx)(`label`,{htmlFor:`cwi-effort`,children:l(`cws.field.defaultEffort`)}),(0,S.jsx)(Fr,{id:`cwi-effort`,value:f.defaultEffort,disabled:m,onChange:e=>p(t=>({...t,defaultEffort:e}))}),(0,S.jsx)(`p`,{className:`muted`,style:{fontSize:12,margin:`4px 0 0`},children:l(`cws.field.defaultEffortHint`)})]}),f.strategy===`round-robin`&&(0,S.jsxs)(`div`,{className:`cwi-field`,children:[(0,S.jsx)(`label`,{htmlFor:`cwi-sticky`,children:l(`cws.field.stickyLimit`)}),(0,S.jsx)(`input`,{id:`cwi-sticky`,className:`input mono`,type:`number`,min:1,max:100,value:f.stickyLimit,disabled:m,onChange:e=>p(t=>({...t,stickyLimit:Number(e.target.value)}))})]}),(0,S.jsxs)(`div`,{className:`cwi-field`,children:[(0,S.jsx)(`label`,{children:l(`cws.targets`)}),(0,S.jsx)(`p`,{className:`muted`,style:{fontSize:12,margin:`0 0 8px`},children:f.strategy===`failover`?l(`cws.targets.failoverHint`):l(`cws.targets.roundRobinHint`)}),(0,S.jsx)(Ir,{targets:f.targets,strategy:f.strategy,providers:n,models:r,onChange:e=>p(t=>({...t,targets:e}))})]})]}):(0,S.jsxs)(`section`,{className:`pwi-section`,children:[(0,S.jsx)(`h3`,{className:`pwi-section-title`,children:l(`cws.aboutTitle`)}),(0,S.jsx)(`p`,{className:`muted`,style:{margin:0},children:l(`cws.aboutBody`)})]})})]})}function Ur({combos:e,providers:t,models:n,loading:r,onRefresh:i,onSave:a,onRemove:o,onAdd:s,adding:c,onCloseAdd:l,onCreated:u}){let d=U(),f=(0,_.useMemo)(()=>Object.fromEntries(t.map(e=>[e.name,{disabled:e.disabled}])),[t]),[p,m]=(0,_.useState)(``),[h,g]=(0,_.useState)(null),[v,y]=(0,_.useState)(void 0),[b,x]=(0,_.useState)(null),[C,w]=(0,_.useState)(null),T=(0,_.useMemo)(()=>Tr(e,p),[e,p]),E=(0,_.useMemo)(()=>wr(T),[T]),D=h&&e.some(e=>e.id===h)?h:null,O=e.find(e=>e.id===D)??null,k=O&&C?.id===O.id?C:O,[A,j]=(0,_.useState)(!1),M=(0,_.useCallback)(e=>{if(e!==D){if(!A){g(e),w(null);return}y(e)}},[D,A]),N=()=>{v!==void 0&&(g(v),w(null),j(!1),y(void 0))},ee=()=>y(void 0),F=v!==void 0&&A;return!r&&e.length===0?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(Vr,{onAdd:s}),c&&(0,S.jsx)(zr,{existingIds:e.map(e=>e.id),providerMap:f,providers:t,models:n,onClose:l,onSubmit:async e=>{let t=await a(e,!0);return t.ok&&(l(),u(e.id),g(e.id)),t}})]}):(0,S.jsxs)(`div`,{className:`combos-workspace-root`,children:[(0,S.jsxs)(`aside`,{className:`combos-workspace-rail`,"aria-label":d(`cws.railAria`),children:[(0,S.jsxs)(`div`,{className:`combos-workspace-rail-header`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`div`,{className:`combos-workspace-rail-title`,children:d(`nav.combos`)}),(0,S.jsx)(`div`,{className:`combos-workspace-rail-count`,children:e.length})]}),(0,S.jsxs)(`button`,{type:`button`,className:`btn btn-primary btn-sm`,onClick:s,"aria-label":d(`cws.add`),children:[(0,S.jsx)(P,{width:14,height:14}),` `,d(`cws.add`)]})]}),(0,S.jsx)(`div`,{className:`cwi-search-row`,children:(0,S.jsxs)(`div`,{className:`cwi-search-wrap`,children:[(0,S.jsx)(te,{className:`cwi-search-icon`,"aria-hidden":`true`}),(0,S.jsx)(`input`,{className:`input cwi-search-input`,value:p,onChange:e=>m(e.target.value),placeholder:d(`cws.searchPlaceholder`),"aria-label":d(`cws.searchPlaceholder`)})]})}),(0,S.jsx)(`div`,{className:`combos-workspace-rail-list`,children:T.length===0?(0,S.jsx)(`p`,{className:`muted`,style:{padding:`16px`},children:d(`cws.noSearchResults`)}):(0,S.jsx)(S.Fragment,{children:[[`failover`,E.failover,`cws.group.failover`],[`round-robin`,E.roundRobin,`cws.group.roundRobin`]].map(([e,t,n])=>t.length>0?(0,S.jsxs)(`div`,{className:`combos-workspace-rail-group`,children:[(0,S.jsxs)(`div`,{className:`combos-workspace-rail-group-head`,children:[(0,S.jsx)(`span`,{className:`pwi-dot`,"aria-hidden":`true`}),d(n),(0,S.jsx)(`span`,{className:`combos-workspace-rail-count`,children:t.length})]}),t.map(e=>(0,S.jsxs)(`button`,{type:`button`,className:`combos-workspace-rail-row${D===e.id?` combos-workspace-rail-row--selected`:``}`,onClick:()=>M(e.id),"aria-current":D===e.id?`true`:void 0,children:[(0,S.jsx)(`span`,{className:`combos-workspace-rail-icon`,"aria-hidden":`true`,children:(0,S.jsx)(pe,{width:16,height:16})}),(0,S.jsx)(`span`,{className:`combos-workspace-rail-name`,children:e.model}),(0,S.jsx)(`span`,{className:`combos-workspace-rail-meta`,children:e.targets.length===1?d(`cws.targetCountOne`):d(`cws.targetCount`,{count:e.targets.length})}),(0,S.jsx)(z,{className:`combos-workspace-rail-chevron`,"aria-hidden":`true`})]},e.id))]},e):null)})})]}),(0,S.jsx)(`div`,{className:`combos-workspace-main`,children:k?(0,S.jsx)(Hr,{baseline:k,providerMap:f,providers:t,models:n,onBack:()=>M(null),onSaved:e=>{w(e),j(!1),i()},onRequestRemove:()=>x(k.id),onSave:a,onDirtyChange:j},k.id):(0,S.jsx)(Br,{combos:e,onSelect:e=>M(e),onAdd:s})}),c&&(0,S.jsx)(zr,{existingIds:e.map(e=>e.id),providerMap:f,providers:t,models:n,onClose:l,onSubmit:async e=>{let t=await a(e,!0);return t.ok&&(l(),u(e.id),g(e.id),w(null)),t}}),b&&(0,S.jsx)(Lr,{model:vr(b),onCancel:()=>x(null),onConfirm:()=>{(async()=>{let e=await o(b);x(null),e.ok&&(D===b&&(g(null),w(null)),i())})()}}),F&&(0,S.jsx)(Rr,{onKeep:ee,onDiscard:N})]})}function Wr(e){if(!e||typeof e!=`object`||Array.isArray(e))return;let t=e.error;return typeof t==`string`&&t.trim()?t:void 0}function Gr(e){return!!e&&typeof e==`object`&&!Array.isArray(e)&&e.success===!0}function Kr({apiBase:e}){let t=U(),[n,r]=(0,_.useState)([]),[i,a]=(0,_.useState)([]),[o,s]=(0,_.useState)([]),[c,l]=(0,_.useState)(!0),[u,d]=(0,_.useState)(``),[f,p]=(0,_.useState)(!1),[m,h]=(0,_.useState)(!1),g=(e,t)=>{d(e),p(t)};(0,_.useEffect)(()=>{if(!u||!f)return;let e=window.setTimeout(()=>{d(``),p(!1)},5e3);return()=>window.clearTimeout(e)},[u,f]);let v=(0,_.useCallback)(async()=>{try{let[t,n,i]=await Promise.all([fetch(`${e}/api/combos`),fetch(`${e}/api/config`),fetch(`${e}/api/models`)]);if(!t.ok||!n.ok||!i.ok)throw Error(`combo workspace load failed`);let o=await t.json(),c=await n.json(),l=await i.json(),u=Array.isArray(l)?l:Array.isArray(l?.models)?l.models:[];r(Cr(o));let d=c.providers??{},f=ot(d);a(Object.entries(d).map(([e,t])=>({name:e,disabled:!!t.disabled,hiddenFromPicker:!Object.hasOwn(f,e),authMode:t.authMode,adapter:t.adapter,baseUrl:t.baseUrl})));let p=[];for(let e of u){if(!e||typeof e!=`object`)continue;let t=e;if(typeof t.provider!=`string`||typeof t.id!=`string`)continue;let n=t.provider.trim(),r=t.id.trim();!n||!r||n===`combo`||t.disabled!==!0&&p.push({provider:n,id:r,namespaced:typeof t.namespaced==`string`?t.namespaced:void 0})}for(let[e,t]of Object.entries(c.providers??{})){let n=typeof t.defaultModel==`string`?t.defaultModel.trim():``;!n||t.disabled||p.some(t=>t.provider===e&&t.id===n)||p.push({provider:e,id:n,namespaced:`${e}/${n}`})}s(p)}catch{g(t(`cws.loadFailed`),!1)}finally{l(!1)}},[e,t]);return(0,_.useEffect)(()=>{let e=window.setTimeout(()=>{v()},0);return()=>window.clearTimeout(e)},[v]),c&&n.length===0?(0,S.jsxs)(`div`,{className:`combos-workspace-shell`,children:[u&&(0,S.jsx)(`div`,{className:`combos-workspace-shell-banner`,children:(0,S.jsx)(W,{tone:f?`ok`:`err`,children:u})}),(0,S.jsx)(`div`,{className:`muted`,style:{padding:`24px 20px`},role:`status`,children:u?null:t(`cws.loading`)})]}):(0,S.jsxs)(`div`,{className:`combos-workspace-shell`,children:[u&&(0,S.jsx)(`div`,{className:`combos-workspace-shell-banner`,children:(0,S.jsx)(W,{tone:f?`ok`:`err`,children:u})}),(0,S.jsx)(`div`,{className:`combos-workspace-shell-body`,children:(0,S.jsx)(Ur,{combos:n,providers:i,models:o,loading:c,onRefresh:()=>{v()},onSave:async(n,r)=>{try{let i=await fetch(`${e}/api/combos`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify(Or(n))}),a=await i.json(),o=Wr(a);if(!i.ok||o||!Gr(a)){let e=o||t(`cws.saveFailed`);return g(e,!1),{ok:!1,error:e}}return await v(),g(r?t(`cws.created`,{model:n.model}):t(`cws.saved`),!0),{ok:!0}}catch{let e=t(`cws.saveFailed`);return g(e,!1),{ok:!1,error:e}}},onRemove:async n=>{try{let r=await fetch(`${e}/api/combos?id=${encodeURIComponent(n)}`,{method:`DELETE`}),i=await r.json(),a=Wr(i);if(!r.ok||a||!Gr(i)){let e=a||t(`cws.removeFailed`);return g(e,!1),{ok:!1,error:e}}return await v(),g(t(`cws.removed`,{id:n}),!0),{ok:!0}}catch{let e=t(`cws.removeFailed`);return g(e,!1),{ok:!1,error:e}}},onAdd:()=>h(!0),adding:m,onCloseAdd:()=>h(!1),onCreated:()=>{v()}})})]})}function qr({apiBase:e}){let t=U(),[n,r]=(0,_.useState)([]),[i,a]=(0,_.useState)([]),[o,s]=(0,_.useState)(``),[c,l]=(0,_.useState)(``),[u,d]=(0,_.useState)(!1),[f,p]=(0,_.useState)(!0),m=(0,_.useMemo)(()=>new Set(i),[i]),h=(0,_.useCallback)(async()=>{try{let t=await fetch(`${e}/api/subagent-models`).then(e=>e.json()),n=t.available??[],i=new Set(n);r(n),a((t.chosen??[]).filter(e=>i.has(e)))}catch{d(!1),l(t(`sub.loadFail`))}finally{p(!1)}},[e,t]);(0,_.useEffect)(()=>{let e=window.setTimeout(()=>{h()},0);return()=>window.clearTimeout(e)},[h]);let g=e=>{l(``),a(t=>t.includes(e)?t.filter(t=>t!==e):t.length>=5?t:[...t,e])},v=(e,t)=>{a(n=>{let r=[...n],i=e+t;return i<0||i>=r.length?n:([r[e],r[i]]=[r[i],r[e]],r)})},y=async()=>{l(``);try{let n=await fetch(`${e}/api/subagent-models`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({models:i})}),r=await n.json();d(n.ok),l(n.ok?t(`sub.saved`,{n:r.applied?.length??0,cmd:`ocx sync`}):r.error||t(`sub.saveFailed`))}catch{d(!1),l(t(`sub.networkError`))}},b=(0,_.useMemo)(()=>{let e=o.trim().toLowerCase();return n.filter(t=>!e||t.toLowerCase().includes(e))},[n,o]);return f?(0,S.jsx)(`div`,{className:`muted`,style:{padding:8},children:t(`sub.loading`)}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`div`,{className:`page-head`,children:(0,S.jsx)(`h2`,{children:t(`nav.subagents`)})}),(0,S.jsx)(`p`,{className:`page-sub`,children:(0,S.jsx)(Te,{k:`sub.subtitle`,cmd:`spawn_agent`})}),c&&(0,S.jsx)(W,{tone:u?`ok`:`err`,children:c}),(0,S.jsxs)(`div`,{className:`h-section`,children:[t(`sub.featured`),` `,(0,S.jsxs)(`span`,{className:`count`,children:[i.length,`/5`]})]}),(0,S.jsxs)(`div`,{className:`row muted text-label leading-body`,style:{alignItems:`flex-start`,gap:8,margin:`-2px 0 10px`,maxWidth:`80ch`},children:[(0,S.jsx)(L,{width:15,height:15,"aria-hidden":`true`,style:{flexShrink:0,marginTop:2}}),(0,S.jsx)(`span`,{children:(0,S.jsx)(Te,{k:`sub.orderHint`,cmd:`spawn_agent`})})]}),i.length===0?(0,S.jsx)(Ae,{title:t(`sub.noneSelected`)}):(0,S.jsx)(`div`,{className:`stack`,style:{gap:8},children:i.map((e,n)=>(0,S.jsxs)(`div`,{className:`card panel-accent row`,style:{padding:`8px 12px`,gap:10},children:[(0,S.jsx)(`span`,{className:`mono font-bold`,style:{width:18,color:`var(--accent)`},children:n+1}),(0,S.jsx)(`code`,{className:`mono`,style:{flex:1,color:`var(--text)`},children:rr(e)}),(0,S.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-icon btn-sm`,onClick:()=>v(n,-1),disabled:n===0,"aria-label":t(`sub.moveUp`,{m:e}),children:(0,S.jsx)(ne,{})}),(0,S.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-icon btn-sm`,onClick:()=>v(n,1),disabled:n===i.length-1,"aria-label":t(`sub.moveDown`,{m:e}),children:(0,S.jsx)(R,{})}),(0,S.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-icon btn-sm`,onClick:()=>g(e),"aria-label":t(`sub.removeAria`,{m:e}),style:{color:`var(--red)`},children:(0,S.jsx)(N,{})})]},e))}),(0,S.jsx)(`div`,{style:{marginTop:14},children:(0,S.jsx)(`button`,{type:`button`,className:`btn btn-primary`,onClick:y,children:t(`common.save`)})}),(0,S.jsxs)(`div`,{className:`h-section`,children:[t(`sub.models`),` `,(0,S.jsx)(`span`,{className:`count`,children:b.length})]}),(0,S.jsxs)(`div`,{className:`row`,style:{marginBottom:10,gap:8},children:[(0,S.jsx)(te,{width:15,height:15,"aria-hidden":`true`,style:{color:`var(--faint)`,flexShrink:0}}),(0,S.jsx)(`input`,{className:`input`,value:o,onChange:e=>s(e.target.value),placeholder:t(`sub.search`),"aria-label":t(`sub.search`),style:{flex:1}})]}),(0,S.jsxs)(`div`,{className:`stack`,style:{gap:6,maxHeight:360,overflowY:`auto`},children:[b.map(e=>{let t=m.has(e),n=!t&&i.length>=5;return(0,S.jsxs)(`button`,{type:`button`,className:`card row${t?` panel-accent`:``}`,onClick:()=>g(e),disabled:n,"aria-pressed":t,style:{width:`100%`,opacity:n?.45:1,cursor:n?`not-allowed`:`pointer`},children:[(0,S.jsx)(`span`,{style:{width:16,height:16,flexShrink:0,color:`var(--accent)`,display:`inline-flex`},children:t&&(0,S.jsx)(M,{style:{width:16,height:16}})}),(0,S.jsx)(D,{style:{width:15,height:15,color:`var(--faint)`,flexShrink:0}}),(0,S.jsx)(`code`,{className:`mono`,style:{color:`var(--text)`},children:rr(e)})]},e)}),b.length===0&&(0,S.jsx)(Ae,{title:t(`sub.noModels`)})]})]})}var Jr={400:{en:{label:`Bad request`,description:`The proxy could not understand the request. Check the model, message shape, headers, and JSON body before retrying.`},ko:{label:`잘못된 요청`,description:`프록시가 요청을 이해할 수 없습니다. 재시도 전에 모델, 메시지 형식, 헤더, JSON 본문을 확인해야 합니다.`},zh:{label:`错误请求`,description:`代理无法理解该请求。重试前请检查模型、消息结构、标头和 JSON 正文。`},de:{label:`Ungültige Anfrage`,description:`Der Proxy konnte die Anfrage nicht verstehen. Prüfe Modell, Nachrichtenformat, Header und JSON-Body vor einem erneuten Versuch.`}},401:{en:{label:`Unauthorized`,description:`Credentials are missing, expired, or invalid. Re-login or refresh the account/provider credentials used by opencodex.`},ko:{label:`인증 필요`,description:`자격 증명이 없거나 만료되었거나 유효하지 않습니다. opencodex에서 사용하는 계정 또는 제공자 자격 증명을 다시 로그인하거나 갱신해야 합니다.`},zh:{label:`未授权`,description:`凭据缺失、已过期或无效。请重新登录,或刷新 opencodex 使用的账号/提供商凭据。`},de:{label:`Nicht autorisiert`,description:`Anmeldedaten fehlen, sind abgelaufen oder ungültig. Melde dich erneut an oder aktualisiere die von opencodex genutzten Konto-/Anbieter-Zugangsdaten.`}},402:{en:{label:`Payment required`,description:`The upstream provider rejected the request because billing, credits, or plan access is not available. Add credits, update billing, or switch provider.`},ko:{label:`결제 필요`,description:`청구, 크레딧, 플랜 접근 권한 문제로 업스트림 제공자가 요청을 거부했습니다. 크레딧 추가, 결제 정보 갱신, 제공자 전환이 필요합니다.`},zh:{label:`需要付款`,description:`上游提供商因账单、额度或套餐权限不可用而拒绝了请求。请充值、更新账单信息或切换提供商。`},de:{label:`Zahlung erforderlich`,description:`Der Upstream-Anbieter hat die Anfrage abgelehnt, weil Abrechnung, Guthaben oder Planzugriff nicht verfügbar ist. Guthaben aufladen, Abrechnung aktualisieren oder Anbieter wechseln.`}},403:{en:{label:`Forbidden`,description:`The account is authenticated but not allowed to use this model or operation. Often a plan/subscription gate (e.g. Ollama Cloud Pro), org policy, or model permission — not necessarily a bad API key.`},ko:{label:`권한 없음`,description:`계정 인증은 되었지만 이 모델 또는 작업을 사용할 권한이 없습니다. 플랜/구독 제한(예: Ollama Cloud Pro), 조직 정책, 모델 권한 문제인 경우가 많으며 API 키가 잘못된 것은 아닐 수 있습니다.`},zh:{label:`禁止访问`,description:`账号已认证,但无权使用此模型或操作。常见原因是套餐/订阅限制(例如 Ollama Cloud Pro)、组织策略或模型权限——不一定是 API 密钥无效。`},de:{label:`Verboten`,description:`Das Konto ist authentifiziert, darf dieses Modell oder diese Operation aber nicht nutzen. Oft Plan-/Abo-Sperre (z. B. Ollama Cloud Pro), Organisationsrichtlinie oder Modellrecht — nicht zwingend ein ungültiger API-Key.`}},404:{en:{label:`Not found`,description:`The requested route, model, account, or upstream resource was not found. Verify the model name and opencodex provider configuration.`},ko:{label:`찾을 수 없음`,description:`요청한 경로, 모델, 계정 또는 업스트림 리소스를 찾을 수 없습니다. 모델 이름과 opencodex 제공자 설정을 확인해야 합니다.`},zh:{label:`未找到`,description:`找不到请求的路由、模型、账号或上游资源。请确认模型名称和 opencodex 提供商配置。`},de:{label:`Nicht gefunden`,description:`Die angeforderte Route, das Modell, das Konto oder die Upstream-Ressource wurde nicht gefunden. Prüfe Modellname und opencodex-Anbieterkonfiguration.`}},408:{en:{label:`Request timeout`,description:`The request took too long before the proxy or upstream provider could complete it. Retry with a smaller request or a different provider.`},ko:{label:`요청 시간 초과`,description:`프록시 또는 업스트림 제공자가 요청을 완료하기 전에 시간이 초과되었습니다. 더 작은 요청으로 재시도하거나 다른 제공자로 전환해야 합니다.`},zh:{label:`请求超时`,description:`代理或上游提供商未能在限定时间内完成请求。请缩小请求后重试,或切换提供商。`},de:{label:`Anfrage-Timeout`,description:`Die Anfrage dauerte zu lange, bevor Proxy oder Upstream-Anbieter sie abschließen konnten. Mit kleinerer Anfrage oder anderem Anbieter erneut versuchen.`}},409:{en:{label:`Conflict`,description:`The request conflicts with the current account, session, or provider state. Refresh the session or retry after the active operation finishes.`},ko:{label:`상태 충돌`,description:`요청이 현재 계정, 세션 또는 제공자 상태와 충돌합니다. 세션을 갱신하거나 진행 중인 작업이 끝난 뒤 재시도해야 합니다.`},zh:{label:`状态冲突`,description:`请求与当前账号、会话或提供商状态冲突。请刷新会话,或等待当前操作完成后重试。`},de:{label:`Konflikt`,description:`Die Anfrage kollidiert mit dem aktuellen Konto-, Sitzungs- oder Anbieterstatus. Sitzung aktualisieren oder nach Abschluss der laufenden Operation erneut versuchen.`}},413:{en:{label:`Request too large`,description:`The prompt, attachments, or generated payload exceeds a proxy or upstream limit. Reduce tokens, file size, or conversation history.`},ko:{label:`요청 과대`,description:`프롬프트, 첨부 파일 또는 생성 페이로드가 프록시나 업스트림 한도를 초과했습니다. 토큰, 파일 크기, 대화 기록을 줄여야 합니다.`},zh:{label:`请求过大`,description:`提示、附件或生成的负载超过了代理或上游限制。请减少 token、文件大小或对话历史。`},de:{label:`Anfrage zu groß`,description:`Prompt, Anhänge oder generierte Nutzlast überschreiten ein Proxy- oder Upstream-Limit. Tokens, Dateigröße oder Verlauf reduzieren.`}},422:{en:{label:`Invalid content`,description:`The provider accepted the request format but rejected its contents. Check model options, tool definitions, message roles, and unsupported fields.`},ko:{label:`내용 검증 실패`,description:`제공자가 요청 형식은 받았지만 내용을 거부했습니다. 모델 옵션, 도구 정의, 메시지 역할, 지원되지 않는 필드를 확인해야 합니다.`},zh:{label:`内容无效`,description:`提供商接受了请求格式,但拒绝了其中的内容。请检查模型选项、工具定义、消息角色和不支持的字段。`},de:{label:`Ungültiger Inhalt`,description:`Der Anbieter akzeptierte das Anfrageformat, lehnte den Inhalt aber ab. Prüfe Modelloptionen, Tool-Definitionen, Nachrichtenrollen und nicht unterstützte Felder.`}},424:{en:{label:`Provider dependency failed`,description:`A required upstream dependency failed while opencodex was routing the request. Retry later or switch to another configured provider.`},ko:{label:`제공자 의존성 실패`,description:`opencodex가 요청을 라우팅하는 동안 필요한 업스트림 의존성이 실패했습니다. 나중에 재시도하거나 다른 설정된 제공자로 전환해야 합니다.`},zh:{label:`提供商依赖失败`,description:`opencodex 路由请求时,必需的上游依赖失败。请稍后重试,或切换到另一个已配置的提供商。`},de:{label:`Anbieter-Abhängigkeit fehlgeschlagen`,description:`Eine erforderliche Upstream-Abhängigkeit ist fehlgeschlagen, während opencodex die Anfrage geroutet hat. Später erneut versuchen oder zu einem anderen Anbieter wechseln.`}},429:{en:{label:`Rate limited`,description:`The upstream provider rate or quota limit has been reached. Wait for the quota window to reset or switch account/provider.`},ko:{label:`한도 초과`,description:`업스트림 제공자의 속도 또는 할당량 한도에 도달했습니다. 한도 창이 초기화될 때까지 기다리거나 계정/제공자를 전환해야 합니다.`},zh:{label:`限流`,description:`已达到上游提供商的速率或额度限制。请等待额度窗口重置,或切换账号/提供商。`},de:{label:`Ratenlimit erreicht`,description:`Das Raten- oder Kontingentlimit des Upstream-Anbieters ist erreicht. Auf Reset des Kontingentfensters warten oder Konto/Anbieter wechseln.`}},499:{en:{label:`Client closed request`,description:`The client disconnected or canceled the request before opencodex finished routing it. Retry if the cancellation was accidental.`},ko:{label:`클라이언트 취소`,description:`opencodex가 라우팅을 끝내기 전에 클라이언트 연결이 끊기거나 요청이 취소되었습니다. 의도한 취소가 아니면 다시 시도해야 합니다.`},zh:{label:`客户端已取消`,description:`opencodex 完成路由前,客户端已断开连接或取消请求。如果不是有意取消,请重试。`},de:{label:`Client hat Anfrage geschlossen`,description:`Der Client hat die Verbindung getrennt oder die Anfrage abgebrochen, bevor opencodex das Routing abgeschlossen hat. Bei versehentlichem Abbruch erneut versuchen.`}},500:{en:{label:`Proxy error`,description:`opencodex hit an internal error while handling the request. Retry once, then check proxy logs if it repeats.`},ko:{label:`프록시 오류`,description:`opencodex가 요청을 처리하는 동안 내부 오류가 발생했습니다. 한 번 재시도하고 반복되면 프록시 로그를 확인해야 합니다.`},zh:{label:`代理错误`,description:`opencodex 处理请求时发生内部错误。请先重试一次;如果重复出现,请检查代理日志。`},de:{label:`Proxy-Fehler`,description:`opencodex ist bei der Anfragebearbeitung auf einen internen Fehler gestoßen. Einmal erneut versuchen, bei Wiederholung Proxy-Logs prüfen.`}},502:{en:{label:`Bad upstream response`,description:`The upstream provider returned an invalid or failed response through the proxy. Retry or route the request to another provider.`},ko:{label:`업스트림 응답 오류`,description:`업스트림 제공자가 프록시를 통해 유효하지 않거나 실패한 응답을 반환했습니다. 재시도하거나 다른 제공자로 라우팅해야 합니다.`},zh:{label:`上游响应错误`,description:`上游提供商通过代理返回了无效或失败的响应。请重试,或将请求路由到其他提供商。`},de:{label:`Ungültige Upstream-Antwort`,description:`Der Upstream-Anbieter lieferte über den Proxy eine ungültige oder fehlgeschlagene Antwort. Erneut versuchen oder zu einem anderen Anbieter routen.`}},503:{en:{label:`Provider unavailable`,description:`The proxy or upstream provider is temporarily unavailable or overloaded. Wait briefly, then retry or switch provider.`},ko:{label:`제공자 사용 불가`,description:`프록시 또는 업스트림 제공자가 일시적으로 사용할 수 없거나 과부하 상태입니다. 잠시 기다린 뒤 재시도하거나 제공자를 전환해야 합니다.`},zh:{label:`提供商不可用`,description:`代理或上游提供商暂时不可用或过载。请稍后重试,或切换提供商。`},de:{label:`Anbieter nicht verfügbar`,description:`Proxy oder Upstream-Anbieter ist vorübergehend nicht verfügbar oder überlastet. Kurz warten, dann erneut versuchen oder Anbieter wechseln.`}},504:{en:{label:`Upstream timeout`,description:`The upstream provider did not respond before the proxy timeout. Retry with a smaller request or choose a faster provider.`},ko:{label:`업스트림 시간 초과`,description:`프록시 시간 제한 전에 업스트림 제공자가 응답하지 않았습니다. 더 작은 요청으로 재시도하거나 더 빠른 제공자를 선택해야 합니다.`},zh:{label:`上游超时`,description:`上游提供商未在代理超时前响应。请缩小请求后重试,或选择响应更快的提供商。`},de:{label:`Upstream-Timeout`,description:`Der Upstream-Anbieter antwortete nicht vor dem Proxy-Timeout. Mit kleinerer Anfrage erneut versuchen oder schnelleren Anbieter wählen.`}},529:{en:{label:`Provider overloaded`,description:`The upstream provider is overloaded or capacity-limited. Wait and retry, or switch to another account/provider.`},ko:{label:`제공자 과부하`,description:`업스트림 제공자가 과부하 상태이거나 처리 용량이 제한되었습니다. 기다렸다가 재시도하거나 다른 계정/제공자로 전환해야 합니다.`},zh:{label:`提供商过载`,description:`上游提供商过载或容量受限。请等待后重试,或切换到其他账号/提供商。`},de:{label:`Anbieter überlastet`,description:`Der Upstream-Anbieter ist überlastet oder kapazitätsbegrenzt. Warten und erneut versuchen oder anderes Konto/Anbieter nutzen.`}}},Yr={client:{en:{label:`Request error`,description:`The proxy or upstream provider rejected the request. Check the request shape, credentials, model name, and provider configuration.`},ko:{label:`요청 오류`,description:`프록시 또는 업스트림 제공자가 요청을 거부했습니다. 요청 형식, 자격 증명, 모델 이름, 제공자 설정을 확인해야 합니다.`},zh:{label:`请求错误`,description:`代理或上游提供商拒绝了该请求。请检查请求结构、凭据、模型名称和提供商配置。`},de:{label:`Anfragefehler`,description:`Der Proxy oder Upstream-Anbieter hat die Anfrage abgelehnt. Prüfe Anfrageformat, Anmeldedaten, Modellname und Anbieterkonfiguration.`}},server:{en:{label:`Server or upstream error`,description:`opencodex or an upstream provider failed while processing the request. Retry later or route the request to another provider.`},ko:{label:`서버 또는 업스트림 오류`,description:`opencodex 또는 업스트림 제공자가 요청 처리 중 실패했습니다. 나중에 재시도하거나 다른 제공자로 라우팅해야 합니다.`},zh:{label:`服务器或上游错误`,description:`opencodex 或上游提供商处理请求时失败。请稍后重试,或将请求路由到其他提供商。`},de:{label:`Server- oder Upstream-Fehler`,description:`opencodex oder ein Upstream-Anbieter ist bei der Anfragebearbeitung fehlgeschlagen. Später erneut versuchen oder zu einem anderen Anbieter routen.`}}};function Xr(e){return e===`de`||e===`ko`||e===`zh`?e:`en`}function Zr(e,t){if(e<400)return null;let n=Xr(t);return(Jr[Math.trunc(e)]??(e<500?Yr.client:Yr.server))[n]}function Qr(e,t){if(!e.usage)return;let n=ei(e),r=[`${t(`logs.tokens.input`)}=${e.usage.inputTokens}`,`${t(`logs.tokens.output`)}=${e.usage.outputTokens}`];return n.read!==void 0&&r.push(`${t(`logs.tokens.cacheRead`)}=${n.read}`),n.write!==void 0&&r.push(`${t(`logs.tokens.cacheWrite`)}=${n.write}`),typeof e.usage.reasoningOutputTokens==`number`&&r.push(`${t(`logs.tokens.reasoning`)}=${e.usage.reasoningOutputTokens}`),e.usageStatus===`estimated`&&r.push(t(`logs.tokens.estimatedNote`)),e.usageStatus===`estimated`&&n.read===void 0&&n.write===void 0&&r.push(t(`logs.tokens.noCacheNote`)),r.join(` · `)}function $r(e){if(!e.usage)return typeof e.totalTokens==`number`?e.totalTokens:void 0;let t=e.usage.inputTokens+e.usage.outputTokens,n=e.usage.totalTokens??e.totalTokens;return typeof n==`number`?Math.max(n,t):t}function ei(e){let t=e.usage;if(!t)return{};let n=typeof t.cacheCreationInputTokens==`number`?t.cacheCreationInputTokens:void 0;return{read:typeof t.cacheReadInputTokens==`number`?t.cacheReadInputTokens:typeof t.cachedInputTokens==`number`&&n!==void 0?Math.max(0,t.cachedInputTokens-n):t.cachedInputTokens,write:n}}function ti(e){if(e.requestedSpeedLabel)return e.requestedSpeedLabel;if(e.modelSupportsServiceTier&&e.configuredSpeedLabel)return e.configuredSpeedLabel}function ni(e){return e>=200&&e<300?`var(--green)`:e>=400?`var(--red)`:`var(--amber)`}function ri(e,t){return new Date(e).toLocaleTimeString(t)}function ii(e,t){return new Date(e).toLocaleString(t)}function ai(e){return[`model=${e.model}`,e.resolvedModel?`resolved=${e.resolvedModel}`:void 0,e.requestedServiceTier?`requestedTier=${e.requestedServiceTier}`:void 0,e.configuredServiceTier?`configuredTier=${e.configuredServiceTier}`:void 0,e.responseServiceTier?`responseTier=${e.responseServiceTier}`:void 0,e.modelSupportsServiceTier===void 0?void 0:`supportsTier=${e.modelSupportsServiceTier}`].filter(Boolean).join(` · `)}function oi({apiBase:e}){let{t,locale:n}=H(),[r,i]=(0,_.useState)([]),[a,o]=(0,_.useState)(!0),[s,c]=(0,_.useState)(null),[l,u]=(0,_.useState)(`all`),d=(0,_.useRef)(null),f=ye.find(e=>e.code===n)?.htmlLang;(0,_.useEffect)(()=>{let t=async()=>{try{i(await(await fetch(`${e}/api/logs`)).json())}catch{}};if(t(),!a)return;let n=setInterval(t,2e3);return()=>clearInterval(n)},[e,a]);let p=s?Zr(s.status,n):null,m=r.filter(e=>l===`all`||(l===`claude`?e.surface===`claude`:e.surface!==`claude`)),h=In({count:m.length,getScrollElement:()=>d.current,estimateSize:()=>44,overscan:15}),g=h.getVirtualItems(),v=g.length>0?g[0].start:0,y=g.length>0?h.getTotalSize()-g[g.length-1].end:0;return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`div`,{className:`page-head`,children:[(0,S.jsx)(`h2`,{children:t(`logs.title`)}),(0,S.jsxs)(`label`,{className:`muted text-control`,style:{cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6},children:[(0,S.jsx)(`input`,{type:`checkbox`,checked:a,onChange:e=>o(e.target.checked)}),t(`logs.autoRefresh`)]})]}),(0,S.jsx)(`p`,{className:`page-sub`,children:t(`logs.subtitle`)}),(0,S.jsxs)(`div`,{className:`row`,style:{gap:8,marginBottom:12,alignItems:`center`},children:[(0,S.jsx)(`span`,{className:`muted text-control`,children:t(`logs.filter.surface.label`)}),(0,S.jsx)(`div`,{className:`segmented`,role:`radiogroup`,"aria-label":t(`logs.filter.surface.label`),style:{display:`inline-flex`,borderRadius:`var(--radius-pill)`,background:`var(--surface-soft, var(--raised))`,padding:3,gap:2},children:[`all`,`claude`,`codex`].map(e=>(0,S.jsx)(`button`,{type:`button`,role:`radio`,"aria-checked":l===e,className:`btn btn-sm${l===e?` btn-primary`:` btn-ghost`}`,style:{borderRadius:`var(--radius-pill)`,minWidth:64,padding:`5px 12px`,border:`none`,background:l===e?void 0:`transparent`,color:l===e?void 0:`var(--muted)`},onClick:()=>u(e),children:t(`logs.filter.surface.${e}`)},e))})]}),m.length===0?(0,S.jsx)(Ae,{title:t(`logs.noRequests`)}):(0,S.jsx)(`div`,{ref:d,className:`tbl-wrap`,style:{overflowY:`auto`,maxHeight:`calc(100vh - 260px)`},children:(0,S.jsxs)(`table`,{className:`tbl`,children:[(0,S.jsx)(`thead`,{style:{position:`sticky`,top:0,zIndex:1,background:`var(--surface)`},children:(0,S.jsxs)(`tr`,{children:[(0,S.jsx)(`th`,{children:t(`logs.col.time`)}),(0,S.jsx)(`th`,{className:`num log-col-tokens`,children:t(`logs.col.tokens`)}),(0,S.jsx)(`th`,{className:`log-col-model`,children:t(`logs.col.model`)}),(0,S.jsx)(`th`,{children:t(`logs.col.effort`)}),(0,S.jsx)(`th`,{children:t(`logs.col.provider`)}),(0,S.jsx)(`th`,{children:t(`logs.col.status`)}),(0,S.jsx)(`th`,{children:t(`logs.col.request`)}),(0,S.jsx)(`th`,{className:`num`,children:t(`logs.col.duration`)})]})}),(0,S.jsxs)(`tbody`,{children:[v>0&&(0,S.jsx)(`tr`,{children:(0,S.jsx)(`td`,{colSpan:8,style:{height:v,padding:0,border:0}})}),g.map(e=>{let r=m[m.length-1-e.index];return(0,S.jsxs)(`tr`,{"data-index":e.index,ref:h.measureElement,children:[(0,S.jsx)(`td`,{className:`muted mono`,children:ri(r.timestamp,f)}),(0,S.jsx)(`td`,{className:`num mono log-col-tokens`,title:Qr(r,t),children:(()=>{let e=$r(r),{read:i,write:a}=ei(r);return e===void 0?(0,S.jsx)(`span`,{className:`muted`,children:t(`logs.tokens.${r.usageStatus??`unreported`}`)}):(0,S.jsxs)(`span`,{style:{display:`inline-flex`,flexDirection:`column`,alignItems:`flex-end`,gap:2},children:[(0,S.jsxs)(`span`,{children:[r.usageStatus===`estimated`?`~`:``,Oe(e,n)]}),i!==void 0&&i>0&&(0,S.jsxs)(`span`,{className:`muted text-caption leading-tight`,children:[`c `,Oe(i,n)]}),a!==void 0&&a>0&&(0,S.jsxs)(`span`,{className:`muted text-caption leading-tight`,children:[`w `,Oe(a,n)]}),r.usageStatus===`estimated`&&i===void 0&&a===void 0&&(0,S.jsx)(`span`,{className:`muted text-caption leading-tight`,children:t(`logs.tokens.noCache`)})]})})()}),(0,S.jsx)(`td`,{className:`mono log-col-model`,title:ai(r),children:(0,S.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:6,flexWrap:`wrap`},children:[(0,S.jsx)(`span`,{children:rr(r.resolvedModel??r.model)}),r.surface===`claude`&&(0,S.jsx)(`span`,{className:`badge badge-accent`,children:t(`logs.badge.claude`)}),ti(r)&&(0,S.jsx)(`span`,{className:`badge badge-amber`,children:ti(r)})]})}),(0,S.jsx)(`td`,{className:`mono`,children:r.requestedEffort??`-`}),(0,S.jsx)(`td`,{className:`muted`,children:r.provider}),(0,S.jsx)(`td`,{children:(0,S.jsxs)(`span`,{className:`log-status-cell`,children:[(0,S.jsx)(`span`,{className:`mono font-semibold`,style:{color:ni(r.status)},children:r.status}),r.status>=400&&(0,S.jsx)(`button`,{type:`button`,className:`log-detail-btn`,onClick:()=>c(r),children:t(`logs.details`)})]})}),(0,S.jsx)(`td`,{className:`muted mono`,children:(0,S.jsx)(`span`,{className:`log-reqid`,title:r.requestId,children:r.requestId??`-`})}),(0,S.jsxs)(`td`,{className:`num`,children:[r.durationMs,`ms`]})]},r.requestId??`${r.timestamp}-${e.index}`)}),y>0&&(0,S.jsx)(`tr`,{children:(0,S.jsx)(`td`,{colSpan:8,style:{height:y,padding:0,border:0}})})]})]})}),s&&(0,S.jsx)(ci,{detail:s,detailInfo:p,localeTag:f,t,onClose:()=>c(null)})]})}function si(e){let t=(0,_.useRef)(null);return(0,_.useEffect)(()=>{let n=t.current;n&&(e&&!n.open?n.showModal():!e&&n.open&&n.close())},[e]),t}function ci({detail:e,detailInfo:t,localeTag:n,t:r,onClose:i}){return(0,S.jsx)(`dialog`,{ref:si(!0),className:`modal-overlay`,"aria-labelledby":`log-detail-title`,onCancel:e=>{e.preventDefault(),i()},children:(0,S.jsxs)(`div`,{className:`modal-card`,children:[(0,S.jsxs)(`div`,{className:`modal-head`,children:[(0,S.jsxs)(`h3`,{id:`log-detail-title`,children:[(0,S.jsx)(`span`,{className:`mono`,style:{color:ni(e.status)},children:e.status}),t&&(0,S.jsx)(`span`,{style:{marginLeft:8},children:t.label})]}),(0,S.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:i,"aria-label":r(`common.cancel`),children:(0,S.jsx)(N,{})})]}),t&&(0,S.jsx)(`p`,{className:`modal-desc`,children:t.description}),(0,S.jsxs)(`div`,{className:`log-detail-grid`,children:[(0,S.jsx)(`span`,{className:`muted`,children:r(`logs.col.time`)}),(0,S.jsx)(`span`,{className:`mono`,children:ii(e.timestamp,n)}),(0,S.jsx)(`span`,{className:`muted`,children:r(`logs.col.request`)}),(0,S.jsx)(`span`,{className:`mono log-detail-break`,children:e.requestId??`-`}),(0,S.jsx)(`span`,{className:`muted`,children:r(`logs.col.model`)}),(0,S.jsx)(`span`,{className:`mono`,children:rr(e.resolvedModel??e.model)}),(0,S.jsx)(`span`,{className:`muted`,children:r(`logs.col.provider`)}),(0,S.jsx)(`span`,{children:e.provider}),e.errorCode&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`span`,{className:`muted`,children:r(`logs.col.error`)}),(0,S.jsx)(`span`,{className:`mono`,children:e.errorCode})]}),e.upstreamError&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`span`,{className:`muted`,children:r(`logs.col.upstreamReason`)}),(0,S.jsx)(`span`,{className:`mono log-detail-break`,children:e.upstreamError})]}),(0,S.jsx)(`span`,{className:`muted`,children:r(`logs.col.duration`)}),(0,S.jsxs)(`span`,{className:`mono`,children:[e.durationMs,`ms`]})]}),(0,S.jsx)(`div`,{className:`muted text-label`,style:{margin:`12px 0 6px`},children:r(`logs.detailRaw`)}),(0,S.jsx)(`pre`,{className:`log-detail-json`,children:JSON.stringify(e,null,2)})]})})}var li=[`provider`,`usage`,`injection`];function ui(e){return e>0?`[${new Date(e).toLocaleTimeString()}] `:``}function di(e){return new Date(e).toLocaleTimeString()}function fi(e,t){return t===`provider`?!!e?.enabled:t===`usage`?!!e?.usage:!!e?.injection}function pi(e,t){return t===`debug`?e.enabled:t===`usage`?e.usage:t===`injection`?e.injection:e.claude}function mi({apiBase:e}){let{t}=H(),[n,r]=(0,_.useState)(null),[i,a]=(0,_.useState)(!1),[o,s]=(0,_.useState)(`provider`),[c,l]=(0,_.useState)([]),[u,d]=(0,_.useState)(!0),[f,p]=(0,_.useState)(!1),[m,h]=(0,_.useState)([]),g=(0,_.useRef)(0),v=(0,_.useRef)(null),y=In({count:c.length,getScrollElement:()=>v.current,estimateSize:()=>20,overscan:30,getItemKey:e=>c[e].seq});(0,_.useEffect)(()=>{let t=async()=>{try{let t=await fetch(`${e}/api/debug`);t.ok&&r(await t.json())}catch{}};t();let n=setInterval(()=>void t(),2e3);return()=>clearInterval(n)},[e]);let b=(0,_.useCallback)(e=>fi(n,e),[n]);(0,_.useEffect)(()=>{if(!n||b(o))return;let e=li.find(b);if(!e)return;let t=window.setTimeout(()=>s(e),0);return()=>window.clearTimeout(t)},[n,o,b]);let x=b(o),C=o===`provider`?`${e}/api/debug/logs`:o===`usage`?`${e}/api/debug/usage-logs`:`${e}/api/debug/injection-logs`,w=(0,_.useCallback)(async e=>{if(!x){l([]),g.current=0;return}p(!0);try{let t=new URLSearchParams({limit:`500`});!e&&g.current>0&&t.set(`after`,String(g.current));let n=await fetch(`${C}?${t}`);if(!n.ok)return;let r=await n.json();if(r.length===0)return;l(t=>(e?r:[...t,...r]).slice(-2e3)),g.current=r[r.length-1].seq}catch{}finally{p(!1)}},[C,x]);(0,_.useEffect)(()=>{g.current=0;let e=window.setTimeout(()=>{l([]),w(!0)},0);return()=>window.clearTimeout(e)},[o,x,w]),(0,_.useEffect)(()=>{if(!u||!x)return;let e=setInterval(()=>void w(!1),1e3);return()=>clearInterval(e)},[u,x,w]),(0,_.useEffect)(()=>{u&&c.length>0&&y.scrollToIndex(c.length-1,{align:`end`})},[c,u,y]),(0,_.useEffect)(()=>{if(!n?.claude){h([]);return}let t=async()=>{try{let t=await fetch(`${e}/api/claude/inbound-debug`);if(t.ok){let e=await t.json();h(Array.isArray(e.entries)?e.entries:[])}}catch{}};t();let r=setInterval(()=>void t(),2e3);return()=>clearInterval(r)},[e,n?.claude]);let T=async(t,n)=>{a(!0);try{let i=await fetch(`${e}/api/debug`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify({[t]:n})});i.ok&&r(await i.json())}catch{}finally{a(!1)}},E=async()=>{a(!0);try{let t=await fetch(`${e}/api/debug`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify({reset:!0})});t.ok&&r(await t.json())}catch{}finally{a(!1)}};return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`div`,{className:`page-head`,children:[(0,S.jsx)(`h2`,{children:t(`debug.title`)}),(0,S.jsxs)(`div`,{style:{display:`inline-flex`,alignItems:`center`,gap:12},children:[(0,S.jsxs)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,disabled:f||!x,onClick:()=>void w(!0),children:[(0,S.jsx)(ee,{}),` `,t(`debug.refresh`)]}),(0,S.jsxs)(`label`,{className:`muted text-control`,style:{cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6},children:[(0,S.jsx)(`input`,{type:`checkbox`,checked:u,onChange:e=>d(e.target.checked)}),t(`debug.follow`)]})]})]}),(0,S.jsx)(`p`,{className:`page-sub`,children:t(`debug.subtitle`)}),n?(0,S.jsxs)(`div`,{className:`card`,style:{marginBottom:16,padding:`12px 14px`},children:[(0,S.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:12,flexWrap:`wrap`},children:[(0,S.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:16},children:[`debug`,`usage`,`injection`,`claude`].map(e=>{let r=pi(n,e);return(0,S.jsxs)(`div`,{style:{display:`inline-flex`,alignItems:`center`,gap:10,minWidth:220},children:[(0,S.jsx)(ke,{on:r,disabled:i,label:t(`debug.${e}`),onClick:()=>void T(e,!r)}),(0,S.jsx)(`span`,{className:`text-control`,children:t(`debug.${e}`)})]},e)})}),(0,S.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,disabled:i,onClick:()=>void E(),children:t(`debug.reset`)})]}),(n.enabled||n.usage||n.injection)&&(0,S.jsxs)(`div`,{style:{display:`inline-flex`,gap:6,marginTop:12},children:[n.enabled&&(0,S.jsx)(`button`,{type:`button`,className:`btn btn-sm${o===`provider`?` btn-primary`:` btn-ghost`}`,onClick:()=>s(`provider`),children:t(`debug.streamProvider`)}),n.usage&&(0,S.jsx)(`button`,{type:`button`,className:`btn btn-sm${o===`usage`?` btn-primary`:` btn-ghost`}`,onClick:()=>s(`usage`),children:t(`debug.streamUsage`)}),n.injection&&(0,S.jsx)(`button`,{type:`button`,className:`btn btn-sm${o===`injection`?` btn-primary`:` btn-ghost`}`,onClick:()=>s(`injection`),children:t(`debug.streamInjection`)})]})]}):(0,S.jsx)(`div`,{className:`empty`,children:t(`debug.loading`)}),n?.claude&&(0,S.jsxs)(`div`,{className:`card`,style:{marginBottom:16,padding:`12px 14px`},children:[(0,S.jsx)(`div`,{className:`font-semibold`,style:{marginBottom:4},children:t(`debug.claudeInbound.title`)}),(0,S.jsx)(`div`,{className:`muted text-control`,style:{marginBottom:10},children:t(`debug.claudeInbound.sub`)}),m.length===0?(0,S.jsx)(`div`,{className:`muted text-control`,children:t(`debug.claudeInbound.empty`)}):(0,S.jsx)(`div`,{style:{overflowX:`auto`},children:(0,S.jsxs)(`table`,{className:`table text-label`,children:[(0,S.jsx)(`thead`,{children:(0,S.jsxs)(`tr`,{children:[(0,S.jsx)(`th`,{children:t(`debug.claudeInbound.time`)}),(0,S.jsx)(`th`,{children:t(`debug.claudeInbound.endpoint`)}),(0,S.jsx)(`th`,{children:t(`debug.claudeInbound.model`)}),(0,S.jsx)(`th`,{children:`thinking`}),(0,S.jsx)(`th`,{children:`effort`}),(0,S.jsx)(`th`,{children:`beta`}),(0,S.jsx)(`th`,{children:`metadata`}),(0,S.jsx)(`th`,{children:`system`})]})}),(0,S.jsx)(`tbody`,{children:m.map((e,n)=>(0,S.jsxs)(`tr`,{children:[(0,S.jsx)(`td`,{className:`muted mono`,children:di(e.at)}),(0,S.jsx)(`td`,{className:`mono`,children:e.endpoint}),(0,S.jsxs)(`td`,{className:`mono`,title:e.resolvedModel,children:[e.model,e.resolvedModel&&e.resolvedModel!==e.model&&(0,S.jsxs)(`span`,{className:`muted`,children:[` → `,e.resolvedModel]})]}),(0,S.jsxs)(`td`,{className:`mono`,children:[e.thinkingType??`-`,e.thinkingBudgetTokens!==void 0&&(0,S.jsxs)(`span`,{className:`muted`,children:[` (`,e.thinkingBudgetTokens,`)`]})]}),(0,S.jsx)(`td`,{className:`mono`,children:e.outputConfigEffort??`-`}),(0,S.jsx)(`td`,{className:`mono`,title:e.anthropicBeta,style:{maxWidth:160,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e.anthropicBeta??`-`}),(0,S.jsx)(`td`,{className:`mono`,title:e.metadataKeys?.join(`, `),children:e.hasMetadataUserId?`user_id ${e.userIdTag??``}`:t(`debug.claudeInbound.none`)}),(0,S.jsx)(`td`,{className:`mono`,children:e.hasSystem?e.systemTag??`yes`:t(`debug.claudeInbound.none`)})]},`${e.at}-${n}`))})]})})]}),n&&!x?(0,S.jsxs)(`div`,{className:`empty`,children:[(0,S.jsx)(`div`,{className:`font-semibold`,style:{marginBottom:6},children:t(`debug.emptyTitle`)}),(0,S.jsx)(`div`,{className:`muted text-control`,style:{maxWidth:560,marginInline:`auto`},children:t(`debug.empty`)})]}):n&&x&&c.length===0?(0,S.jsxs)(`div`,{className:`empty`,children:[(0,S.jsx)(`div`,{className:`font-semibold`,style:{marginBottom:6},children:t(`debug.noLinesTitle`)}),(0,S.jsx)(`div`,{className:`muted text-control`,style:{maxWidth:560,marginInline:`auto`},children:t(`debug.noLines.${o}`)})]}):n&&x?(0,S.jsx)(`div`,{ref:v,className:`log-detail-json`,style:{maxHeight:`calc(100vh - 280px)`,overflow:`auto`},children:(0,S.jsx)(`div`,{style:{position:`relative`,height:y.getTotalSize(),width:`100%`},children:y.getVirtualItems().map(e=>(0,S.jsx)(`div`,{ref:y.measureElement,"data-index":e.index,style:{position:`absolute`,top:0,left:0,width:`100%`,transform:`translateY(${e.start}px)`},children:`${ui(c[e.index].at)}${c[e.index].line}`},e.key))})}):null]})}function hi(e){return`${Math.round(e*100)}%`}function gi(e,t){let n=`${t}/${e}`,r=0;for(let e=0;e<n.length;e++)r=r*31+n.charCodeAt(e)>>>0;return`hsl(${r%360} 55% 55%)`}function _i(e){let t=new Map(e.map(e=>[e.date,e])),n=[],r=new Date;r.setHours(0,0,0,0),r.setDate(r.getDate()-6);for(let e=0;e<7;e++){let e=`${r.getFullYear()}-${String(r.getMonth()+1).padStart(2,`0`)}-${String(r.getDate()).padStart(2,`0`)}`,i=t.get(e);n.push({date:e,requests:i?.requests??0,measuredRequests:i?.measuredRequests??0,reportedRequests:i?.reportedRequests??0,totalTokens:i?.totalTokens??0,models:i?.models??[]}),r.setDate(r.getDate()+1)}return n}function vi(e){let t=e.filter(e=>e>0).sort((e,t)=>e-t);if(t.length===0)return[0,0,0,0];let n=e=>t[Math.min(t.length-1,Math.floor(e*t.length))];return[n(.25),n(.5),n(.75),n(.95)]}function yi(e,t){return e<=0?0:e<=t[0]?1:e<=t[1]?2:e<=t[2]?3:4}function bi(e){let t=vi(e.map(e=>e.totalTokens)),n=new Map(e.map(e=>[e.date,e])),r=new Date;r.setHours(0,0,0,0);let i=new Date(r);i.setDate(i.getDate()-364),i.setDate(i.getDate()-i.getDay());let a=[],o=[],s=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],c=-4,l=-1,u=[],d=new Date(i);for(;d<=r;){let e=`${d.getFullYear()}-${String(d.getMonth()+1).padStart(2,`0`)}-${String(d.getDate()).padStart(2,`0`)}`,r=d.getMonth();d.getDay()===0&&r!==l&&a.length-c>=4&&(o.push({label:s[r],col:a.length}),c=a.length,l=r);let i=n.get(e);u.push({date:e,requests:i?.requests??0,totalTokens:i?.totalTokens??0,level:i?yi(i.totalTokens,t):0,dayOfWeek:d.getDay()}),d.getDay()===6&&(a.push(u),u=[]),d.setDate(d.getDate()+1)}if(u.length>0){for(;u.length<7;)u.push({date:``,requests:0,totalTokens:0,level:0,dayOfWeek:u.length});a.push(u)}return{weeks:a,months:o,buckets:t}}function xi({surface:e,range:t,onSurface:n,onRange:r,t:i}){return(0,S.jsxs)(`div`,{className:`usage-filters`,children:[(0,S.jsx)(`div`,{className:`usage-segmented`,role:`group`,"aria-label":i(`logs.filter.surface.label`),children:[`all`,`codex`,`claude`].map(t=>{let r=i(`logs.filter.surface.${t}`);return(0,S.jsxs)(`button`,{type:`button`,className:`usage-segmented-btn usage-source-btn${e===t?` active`:``}`,"aria-label":r,"aria-pressed":e===t,onClick:()=>n(t),children:[t===`codex`&&(0,S.jsx)(`img`,{className:`usage-source-mark`,src:`/provider-icons/openai.svg`,alt:``,"aria-hidden":`true`}),t===`claude`&&(0,S.jsx)(`img`,{className:`usage-source-mark`,src:`/provider-icons/claude.svg`,alt:``,"aria-hidden":`true`}),(0,S.jsx)(`span`,{className:t===`all`?`usage-source-label`:`usage-source-label usage-source-label-collapsible`,children:r})]},t)})}),(0,S.jsx)(`div`,{className:`usage-segmented`,role:`group`,"aria-label":i(`usage.title`),children:[`all`,`30d`,`7d`].map(e=>{let n=i(`usage.range.${e}`);return(0,S.jsx)(`button`,{type:`button`,className:`usage-segmented-btn${t===e?` active`:``}`,"aria-label":n,"aria-pressed":t===e,onClick:()=>r(e),children:n},e)})})]})}function Si({summary:e,activeDays:t,locale:n,t:r}){return(0,S.jsxs)(`div`,{className:`usage-cards usage-cards-3x2`,role:`group`,"aria-label":r(`usage.title`),children:[(0,S.jsxs)(`div`,{className:`stat`,children:[(0,S.jsx)(`div`,{className:`muted`,children:r(`usage.card.requests`)}),(0,S.jsx)(`div`,{className:`stat-value`,children:e.requests})]}),(0,S.jsxs)(`div`,{className:`stat`,children:[(0,S.jsx)(`div`,{className:`muted`,children:r(`usage.card.measured`)}),(0,S.jsx)(`div`,{className:`stat-value`,children:e.measuredRequests})]}),(0,S.jsxs)(`div`,{className:`stat`,children:[(0,S.jsx)(`div`,{className:`muted`,children:r(`usage.card.totalTokens`)}),(0,S.jsx)(`div`,{className:`stat-value`,children:Oe(e.totalTokens,n)})]}),(0,S.jsxs)(`div`,{className:`stat`,title:r(`usage.card.cachedTokensHint`),children:[(0,S.jsx)(`div`,{className:`muted`,children:r(`usage.card.cachedTokens`)}),(0,S.jsx)(`div`,{className:`stat-value`,children:Oe(e.cacheReadInputTokens??e.cachedInputTokens,n)}),(e.cacheCreationInputTokens??0)>0&&(0,S.jsxs)(`div`,{className:`muted text-caption`,children:[r(`usage.card.cacheWriteTokens`),`: `,Oe(e.cacheCreationInputTokens??0,n)]})]}),(0,S.jsxs)(`div`,{className:`stat`,children:[(0,S.jsx)(`div`,{className:`muted`,children:r(`usage.card.coverage`)}),(0,S.jsx)(`div`,{className:`stat-value`,children:hi(e.coverageRatio)})]}),(0,S.jsxs)(`div`,{className:`stat`,children:[(0,S.jsx)(`div`,{className:`muted`,children:r(`usage.card.activeDays`)}),(0,S.jsx)(`div`,{className:`stat-value`,children:t})]})]})}function Ci({weekBars:e,locale:t,t:n}){let[r,i]=(0,_.useState)(null),a=Math.max(1,...e.map(e=>e.totalTokens));return(0,S.jsx)(`div`,{className:`daybars`,role:`img`,"aria-label":n(`usage.section.heatmap`),children:e.map(e=>{let n=Math.round(e.totalTokens/a*100),o=e.date.slice(5);return(0,S.jsxs)(`div`,{className:`daybar`,onMouseEnter:()=>i(e.date),onMouseLeave:()=>i(t=>t===e.date?null:t),children:[(0,S.jsx)(`div`,{className:`daybar-track`,children:(0,S.jsxs)(`div`,{className:`daybar-stack`,style:{height:`${n}%`},children:[e.models.map(e=>(0,S.jsx)(`div`,{className:`daybar-seg`,style:{flexGrow:e.totalTokens,background:gi(e.model,e.provider)}},`${e.provider}/${e.model}`)),e.models.length===0&&e.totalTokens>0&&(0,S.jsx)(`div`,{className:`daybar-seg`,style:{flexGrow:1,background:`var(--green)`}})]})}),r===e.date&&e.totalTokens>0&&(0,S.jsxs)(`div`,{className:`daybar-tip`,role:`tooltip`,children:[(0,S.jsx)(`div`,{className:`daybar-tip-date`,children:e.date}),e.models.slice(0,8).map(e=>(0,S.jsxs)(`div`,{className:`daybar-tip-row`,children:[(0,S.jsx)(`span`,{className:`daybar-tip-swatch`,style:{background:gi(e.model,e.provider)}}),(0,S.jsx)(`span`,{className:`daybar-tip-name`,children:rr(e.model)}),(0,S.jsx)(`span`,{className:`daybar-tip-val`,children:Oe(e.totalTokens,t)})]},`${e.provider}/${e.model}`))]}),(0,S.jsx)(`span`,{className:`daybar-count`,children:Oe(e.totalTokens,t)}),(0,S.jsx)(`span`,{className:`daybar-label muted`,children:o})]},e.date)})})}function wi({range:e,heatmap:t,weekBars:n,locale:r,t:i}){let a=(0,_.useRef)(null),[o,s]=(0,_.useState)(null);return(0,_.useEffect)(()=>{let e=a.current;if(!e)return;let t=()=>{e.scrollLeft=e.scrollWidth};t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[t,e]),(0,S.jsxs)(`section`,{className:`panel`,style:{marginTop:16},"aria-labelledby":`usage-heatmap-title`,children:[(0,S.jsx)(`h3`,{id:`usage-heatmap-title`,className:`panel-title`,children:i(`usage.section.heatmap`)}),e===`7d`?(0,S.jsx)(Ci,{weekBars:n,locale:r,t:i}):(0,S.jsxs)(`div`,{className:`heatmap`,ref:a,role:`img`,"aria-labelledby":`usage-heatmap-title`,children:[(0,S.jsxs)(`div`,{className:`heatmap-months`,style:{gridTemplateColumns:`28px repeat(${t.weeks.length}, calc(var(--hm-cell) + var(--hm-gap)))`},children:[(0,S.jsx)(`span`,{className:`heatmap-day-spacer`}),t.months.map(e=>(0,S.jsx)(`span`,{className:`heatmap-month`,style:{gridColumn:e.col+2},children:e.label},`${e.label}-${e.col}`))]}),(0,S.jsxs)(`div`,{className:`heatmap-body`,children:[(0,S.jsxs)(`div`,{className:`heatmap-days`,children:[(0,S.jsx)(`span`,{}),(0,S.jsx)(`span`,{children:i(`usage.dayMon`)}),(0,S.jsx)(`span`,{}),(0,S.jsx)(`span`,{children:i(`usage.dayWed`)}),(0,S.jsx)(`span`,{}),(0,S.jsx)(`span`,{children:i(`usage.dayFri`)}),(0,S.jsx)(`span`,{})]}),(0,S.jsx)(`div`,{className:`heatmap-grid`,style:{gridTemplateColumns:`repeat(${t.weeks.length}, var(--hm-cell))`},children:t.weeks.map((e,t)=>(0,S.jsx)(`div`,{className:`heatmap-week`,children:e.map((e,n)=>(0,S.jsx)(`div`,{className:`heatmap-cell heatmap-cell-${e.level}`,onMouseEnter:r=>{if(!e.date)return;let i=r.currentTarget.getBoundingClientRect();s({weekIndex:t,dayIndex:n,x:i.left+i.width/2,y:i.top})},onMouseLeave:()=>s(e=>e?.weekIndex===t&&e.dayIndex===n?null:e)},e.date||`pad-${t}-${n}`))},e[0]?.date||`week-${t}`))})]}),o&&(()=>{let e=t.weeks[o.weekIndex]?.[o.dayIndex];return e?.date?(0,S.jsxs)(`div`,{className:`heatmap-tip`,role:`tooltip`,style:{left:o.x,top:o.y},children:[(0,S.jsx)(`div`,{className:`heatmap-tip-date`,children:e.date}),(0,S.jsx)(`div`,{className:`heatmap-tip-val`,children:i(`usage.heatmap.tooltipTokens`,{tokens:Oe(e.totalTokens,r)})}),(0,S.jsx)(`div`,{className:`heatmap-tip-req muted`,children:i(`usage.heatmap.tooltipRequests`,{requests:e.requests})})]}):null})(),(0,S.jsxs)(`div`,{className:`heatmap-legend muted`,children:[(0,S.jsx)(`span`,{children:i(`usage.heatmap.less`)}),[0,1,2,3,4].map(e=>(0,S.jsx)(`span`,{className:`heatmap-cell heatmap-cell-${e}`},e)),(0,S.jsx)(`span`,{children:i(`usage.heatmap.more`)})]})]})]})}function Ti({models:e,modelQuery:t,onModelQuery:n,locale:r,t:i}){let a=i(`usage.search.models`);return(0,S.jsxs)(`section`,{className:`panel`,style:{marginTop:16},"aria-labelledby":`usage-models-title`,children:[(0,S.jsxs)(`div`,{className:`panel-head`,children:[(0,S.jsx)(`h3`,{id:`usage-models-title`,className:`panel-title`,children:i(`usage.section.models`)}),(0,S.jsx)(`input`,{className:`input`,"aria-label":a,placeholder:a,value:t,onChange:e=>n(e.target.value)})]}),(0,S.jsx)(`div`,{className:`tbl-wrap usage-scroll`,children:(0,S.jsxs)(`table`,{className:`tbl`,children:[(0,S.jsx)(`thead`,{children:(0,S.jsxs)(`tr`,{children:[(0,S.jsx)(`th`,{children:i(`logs.col.model`)}),(0,S.jsx)(`th`,{children:i(`logs.col.provider`)}),(0,S.jsx)(`th`,{className:`num`,children:i(`usage.col.requests`)}),(0,S.jsx)(`th`,{className:`num`,children:i(`usage.col.measured`)}),(0,S.jsx)(`th`,{className:`num`,children:i(`usage.col.tokens`)}),(0,S.jsx)(`th`,{children:i(`usage.col.share`)})]})}),(0,S.jsx)(`tbody`,{children:e.map(e=>(0,S.jsxs)(`tr`,{children:[(0,S.jsx)(`td`,{className:`mono`,children:rr(e.resolvedModel??e.model)}),(0,S.jsx)(`td`,{className:`muted`,children:e.provider}),(0,S.jsx)(`td`,{className:`num`,children:e.requests}),(0,S.jsx)(`td`,{className:`num`,children:e.measuredRequests}),(0,S.jsx)(`td`,{className:`num mono`,children:Oe(e.totalTokens,r)}),(0,S.jsx)(`td`,{children:(0,S.jsx)(`div`,{className:`usage-bar`,children:(0,S.jsx)(`div`,{className:`usage-bar-fill`,style:{width:`${Math.round(e.shareRatio*100)}%`}})})})]},`${e.provider}/${e.model}/${e.resolvedModel??``}`))})]})})]})}function Ei({providers:e,locale:t,t:n}){return(0,S.jsxs)(`section`,{className:`panel`,style:{marginTop:16},"aria-labelledby":`usage-providers-title`,children:[(0,S.jsx)(`h3`,{id:`usage-providers-title`,className:`panel-title`,children:n(`usage.section.providers`)}),(0,S.jsx)(`div`,{className:`tbl-wrap usage-scroll`,children:(0,S.jsxs)(`table`,{className:`tbl`,children:[(0,S.jsx)(`thead`,{children:(0,S.jsxs)(`tr`,{children:[(0,S.jsx)(`th`,{children:n(`logs.col.provider`)}),(0,S.jsx)(`th`,{className:`num`,children:n(`usage.col.requests`)}),(0,S.jsx)(`th`,{className:`num`,children:n(`usage.col.measured`)}),(0,S.jsx)(`th`,{className:`num`,children:n(`usage.col.tokens`)}),(0,S.jsx)(`th`,{children:n(`usage.col.share`)})]})}),(0,S.jsx)(`tbody`,{children:e.map(e=>(0,S.jsxs)(`tr`,{children:[(0,S.jsx)(`td`,{className:`mono`,children:e.provider}),(0,S.jsx)(`td`,{className:`num`,children:e.requests}),(0,S.jsx)(`td`,{className:`num`,children:e.measuredRequests}),(0,S.jsx)(`td`,{className:`num mono`,children:Oe(e.totalTokens,t)}),(0,S.jsx)(`td`,{children:(0,S.jsx)(`div`,{className:`usage-bar`,children:(0,S.jsx)(`div`,{className:`usage-bar-fill`,style:{width:`${Math.round(e.shareRatio*100)}%`}})})})]},e.provider))})]})})]})}function Di({summary:e,t}){return(0,S.jsxs)(`section`,{className:`panel`,style:{marginTop:16},"aria-labelledby":`usage-coverage-title`,children:[(0,S.jsx)(`h3`,{id:`usage-coverage-title`,className:`panel-title`,children:t(`usage.section.coverage`)}),(0,S.jsxs)(`div`,{className:`usage-cards usage-cards-3x2`,children:[(0,S.jsxs)(`div`,{className:`stat`,children:[(0,S.jsx)(`div`,{className:`muted`,children:t(`usage.coverage.measured`)}),(0,S.jsx)(`div`,{className:`stat-value`,children:e.measuredRequests})]}),(0,S.jsxs)(`div`,{className:`stat`,children:[(0,S.jsx)(`div`,{className:`muted`,children:t(`usage.coverage.reported`)}),(0,S.jsx)(`div`,{className:`stat-value`,children:e.reportedRequests})]}),(0,S.jsxs)(`div`,{className:`stat`,children:[(0,S.jsx)(`div`,{className:`muted`,children:t(`usage.coverage.estimated`)}),(0,S.jsx)(`div`,{className:`stat-value`,children:e.estimatedRequests})]}),(0,S.jsxs)(`div`,{className:`stat`,children:[(0,S.jsx)(`div`,{className:`muted`,children:t(`logs.tokens.unreported`)}),(0,S.jsx)(`div`,{className:`stat-value`,children:e.unreportedRequests})]}),(0,S.jsxs)(`div`,{className:`stat`,children:[(0,S.jsx)(`div`,{className:`muted`,children:t(`logs.tokens.unsupported`)}),(0,S.jsx)(`div`,{className:`stat-value`,children:e.unsupportedRequests})]})]}),(0,S.jsx)(`p`,{className:`muted text-control`,style:{marginTop:12},children:t(`usage.coverage.note`)})]})}function K({apiBase:e}){let{t,locale:n}=H(),[r,i]=(0,_.useState)(`30d`),[a,o]=(0,_.useState)(`all`),[s,c]=(0,_.useState)(null),[l,u]=(0,_.useState)(!0),[d,f]=(0,_.useState)(``),p=(0,_.useCallback)(async(t,n,r)=>{u(!0);try{let i=await fetch(`${e}/api/usage?range=${t}&surface=${n}`,{signal:r});if(!i.ok)throw Error(`fetch failed`);let a=await i.json();if(r.aborted)return;c(a)}catch{if(r.aborted)return;c(null)}finally{r.aborted||u(!1)}},[e]);(0,_.useEffect)(()=>{let e=new AbortController,t=window.setTimeout(()=>{p(r,a,e.signal)},0);return()=>{window.clearTimeout(t),e.abort()}},[p,r,a]);let m=(0,_.useMemo)(()=>bi(s?.days??[]),[s?.days]),h=(0,_.useMemo)(()=>_i(s?.days??[]),[s?.days]),g=(0,_.useMemo)(()=>(s?.days??[]).filter(e=>e.requests>0).length,[s?.days]),v=(0,_.useMemo)(()=>{let e=d.trim().toLowerCase(),t=[...s?.models??[]].sort((e,t)=>t.totalTokens-e.totalTokens);return e?t.filter(t=>t.model.toLowerCase().includes(e)||t.provider.toLowerCase().includes(e)||(t.resolvedModel??``).toLowerCase().includes(e)).slice(0,100):t.slice(0,100)},[s?.models,d]),y=(0,_.useMemo)(()=>[...s?.providers??[]].sort((e,t)=>t.totalTokens-e.totalTokens),[s?.providers]);return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(`div`,{className:`page-head usage-head`,children:[(0,S.jsx)(`h2`,{id:`usage-page-title`,children:t(`usage.title`)}),(0,S.jsx)(xi,{surface:a,range:r,onSurface:o,onRange:i,t})]}),(0,S.jsx)(`p`,{className:`page-sub`,children:t(`usage.subtitle`)}),l&&!s?(0,S.jsx)(Ae,{title:t(`usage.loading`)}):!s||s.summary.requests===0?(0,S.jsx)(Ae,{title:t(`usage.empty`)}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(Si,{summary:s.summary,activeDays:g,locale:n,t}),(0,S.jsx)(wi,{range:r,heatmap:m,weekBars:h,locale:n,t}),(0,S.jsx)(Ti,{models:v,modelQuery:d,onModelQuery:f,locale:n,t}),(0,S.jsx)(Ei,{providers:y,locale:n,t}),(0,S.jsx)(Di,{summary:s.summary,t})]})]})}function Oi(e){if(!e||typeof e!=`object`)return`absent`;let t=e.providers;if(!t||typeof t!=`object`||Array.isArray(t)||!Object.hasOwn(t,`openai`))return`absent`;let n=t.openai;if(!n||typeof n!=`object`||Array.isArray(n))return`absent`;let r=n;return r.disabled===!0?`disabled`:r.codexAccountMode===`direct`?`direct`:r.codexAccountMode===void 0||r.codexAccountMode===`pool`?`pool`:`absent`}function ki({apiBase:e}){let t=U(),[n,r]=(0,_.useState)(null),i=(0,_.useCallback)(async()=>{try{r(Oi(await fetch(`${e}/api/config`).then(e=>e.json())))}catch{}},[e]);return(0,_.useEffect)(()=>{let e=window.setTimeout(()=>{i()},0),t=window.setInterval(()=>{i()},3e4);return()=>{window.clearTimeout(e),window.clearInterval(t)}},[i]),(0,S.jsx)(Bn,{apiBase:e,accountModeState:n,banner:(0,S.jsxs)(`div`,{className:`panel`,style:{marginBottom:16},children:[(0,S.jsxs)(`div`,{className:`row`,children:[(0,S.jsx)(`strong`,{children:t(`codexAuth.accountModeTitle`)}),n===`pool`&&(0,S.jsx)(`span`,{className:`badge badge-accent`,children:t(`codexAuth.accountModePool`)}),n===`direct`&&(0,S.jsx)(`span`,{className:`badge badge-green`,children:t(`codexAuth.accountModeDirect`)})]}),n===`pool`&&(0,S.jsx)(`p`,{className:`card-sub`,style:{margin:`6px 0 0`},children:t(`codexAuth.accountModePoolDesc`)}),n===`direct`&&(0,S.jsxs)(`p`,{className:`card-sub`,style:{margin:`6px 0 0`},children:[t(`codexAuth.accountModeDirectDesc`),` `,(0,S.jsx)(`a`,{href:`#providers`,children:t(`codexAuth.openProviders`)})]}),n===`absent`&&(0,S.jsxs)(`p`,{className:`card-sub`,style:{margin:`8px 0 0`},children:[t(`codexAuth.openaiMissing`),` `,(0,S.jsx)(`a`,{href:`#providers`,children:t(`codexAuth.openProviders`)})]}),n===`disabled`&&(0,S.jsxs)(`p`,{className:`card-sub`,style:{margin:`8px 0 0`},children:[t(`codexAuth.openaiDisabled`),` `,(0,S.jsx)(`a`,{href:`#providers`,children:t(`codexAuth.openProviders`)})]})]})})}function Ai(e,t){return new Date(e).toLocaleDateString(t)}function ji({apiBase:e}){let{t,locale:n}=H(),r=ye.find(e=>e.code===n)?.htmlLang,[i,a]=(0,_.useState)([]),[o,s]=(0,_.useState)(``),[c,l]=(0,_.useState)(``),[u,d]=(0,_.useState)(!1),[f,p]=(0,_.useState)(null),[m,h]=(0,_.useState)(!1),[g,v]=(0,_.useState)(null),y=(0,_.useCallback)(async()=>{try{let t=await fetch(`${e}/api/keys`);if(t.ok){let e=await t.json();a(e.keys??[]),s(e.endpoint??``)}}catch{}},[e]);(0,_.useEffect)(()=>{let e=window.setTimeout(()=>{y()},0);return()=>window.clearTimeout(e)},[y]);let b=o||`http://127.0.0.1:10100/v1/responses`,x=async()=>{d(!0);try{let t=await fetch(`${e}/api/keys`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({name:c||`default`})});t.ok&&(p((await t.json()).key),l(``),y())}finally{d(!1)}},C=async t=>{await fetch(`${e}/api/keys`,{method:`DELETE`,headers:{"Content-Type":`application/json`},body:JSON.stringify({id:t})}),v(null),y()},w=()=>{f&&(navigator.clipboard.writeText(f),h(!0),setTimeout(()=>h(!1),2e3))},T=t(`api.subtitle`).split(/\{authHeader\}|\{altHeader\}/);return(0,S.jsxs)(`section`,{className:`api-page`,children:[(0,S.jsx)(`div`,{className:`page-head`,children:(0,S.jsx)(`h2`,{children:t(`api.title`)})}),(0,S.jsxs)(`p`,{className:`page-sub`,children:[T[0],(0,S.jsx)(`code`,{children:`Authorization: Bearer ocx_...`}),T[1],(0,S.jsx)(`code`,{children:`x-opencodex-api-key`}),T[2]]}),(0,S.jsxs)(`div`,{className:`panel api-panel`,children:[(0,S.jsx)(`h3`,{className:`panel-title`,children:t(`api.endpoint`)}),(0,S.jsx)(`code`,{className:`api-code api-code-inline`,children:b}),(0,S.jsx)(`p`,{className:`muted small`,children:t(`api.endpointNote`)})]}),f&&(0,S.jsxs)(`div`,{className:`panel api-panel panel-accent`,style:{marginTop:`1rem`},children:[(0,S.jsx)(`h3`,{className:`panel-title`,children:t(`api.newKeyTitle`)}),(0,S.jsx)(`p`,{className:`muted small`,children:t(`api.newKeyNote`)}),(0,S.jsxs)(`div`,{className:`api-form-row`,children:[(0,S.jsx)(`code`,{className:`api-code`,style:{flex:1,wordBreak:`break-all`},children:f}),(0,S.jsx)(`button`,{type:`button`,className:`btn btn-sm btn-ghost`,onClick:w,children:m?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(M,{}),` `,t(`api.copied`)]}):t(`api.copy`)})]}),(0,S.jsx)(`button`,{type:`button`,className:`btn btn-sm btn-ghost`,style:{alignSelf:`flex-start`},onClick:()=>p(null),children:t(`api.dismiss`)})]}),(0,S.jsxs)(`div`,{className:`panel api-panel`,style:{marginTop:`1rem`},children:[(0,S.jsx)(`h3`,{className:`panel-title`,children:t(`api.generateTitle`)}),(0,S.jsxs)(`div`,{className:`api-form-row`,children:[(0,S.jsx)(`input`,{id:`api-key-name`,type:`text`,placeholder:t(`api.keyNamePlaceholder`),"aria-label":t(`api.keyNamePlaceholder`),value:c,onChange:e=>l(e.target.value),className:`input`}),(0,S.jsxs)(`button`,{type:`button`,className:`btn btn-primary`,onClick:x,disabled:u,children:[(0,S.jsx)(P,{}),` `,t(u?`api.generating`:`api.generate`)]})]})]}),(0,S.jsxs)(`div`,{className:`panel api-panel`,style:{marginTop:`1rem`},children:[(0,S.jsx)(`h3`,{className:`panel-title`,children:t(`api.activeKeys`,{count:i.length})}),i.length===0?(0,S.jsx)(`p`,{className:`muted`,children:t(`api.noKeys`)}):(0,S.jsx)(`div`,{className:`tbl-wrap`,children:(0,S.jsxs)(`table`,{className:`tbl`,children:[(0,S.jsx)(`thead`,{children:(0,S.jsxs)(`tr`,{children:[(0,S.jsx)(`th`,{children:t(`api.colName`)}),(0,S.jsx)(`th`,{children:t(`api.colKey`)}),(0,S.jsx)(`th`,{children:t(`api.colCreated`)}),(0,S.jsx)(`th`,{})]})}),(0,S.jsx)(`tbody`,{children:i.map(e=>(0,S.jsxs)(`tr`,{children:[(0,S.jsx)(`td`,{children:e.name}),(0,S.jsx)(`td`,{children:(0,S.jsx)(`code`,{children:e.prefix})}),(0,S.jsx)(`td`,{children:Ai(e.createdAt,r)}),(0,S.jsx)(`td`,{children:g===e.id?(0,S.jsxs)(`span`,{className:`api-actions`,children:[(0,S.jsx)(`button`,{type:`button`,className:`btn btn-sm btn-danger`,onClick:()=>C(e.id),children:t(`api.confirm`)}),(0,S.jsx)(`button`,{type:`button`,className:`btn btn-sm btn-ghost`,onClick:()=>v(null),children:t(`common.cancel`)})]}):(0,S.jsx)(`button`,{type:`button`,className:`btn btn-sm btn-ghost`,"aria-label":t(`api.deleteAria`),onClick:()=>v(e.id),children:(0,S.jsx)(N,{})})})]},e.id))})]})})]}),(0,S.jsxs)(`div`,{className:`panel api-panel`,style:{marginTop:`1rem`},children:[(0,S.jsx)(`h3`,{className:`panel-title`,children:t(`api.usageTitle`)}),(0,S.jsx)(`pre`,{className:`api-code`,children:`curl ${b} \\
34
- -H "Authorization: Bearer ocx_YOUR_KEY_HERE" \\
35
- -H "Content-Type: application/json" \\
36
- -d '{
37
- "model": "gpt-5.4",
38
- "input": "Hello, world!"
39
- }'`})]})]})}var Mi=[`ANTHROPIC_MODEL`,`ANTHROPIC_DEFAULT_OPUS_MODEL`,`ANTHROPIC_DEFAULT_SONNET_MODEL`,`ANTHROPIC_DEFAULT_HAIKU_MODEL`,`ANTHROPIC_DEFAULT_FABLE_MODEL`];function Ni(e){let t=`http://127.0.0.1:${e.port}`,n=e.autoContext&&e.maxContextTokens===null,r=Mi.filter(t=>e.effectiveModelEnv[t]).map(t=>`export ${t}=${e.effectiveModelEnv[t]}`);return[`export ANTHROPIC_BASE_URL=${t}`,...e.authMode===`proxy`?[`export ANTHROPIC_AUTH_TOKEN=opencodex-proxy`]:[`# no ANTHROPIC_AUTH_TOKEN: your claude.ai login (and connectors) stay active`],`export CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1`,'[ -z "${CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST+x}" ] && export CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST=1',...n?[`export CLAUDE_CODE_AUTO_COMPACT_WINDOW=${e.autoCompactWindow??35e4}`]:[],...r,`claude`].join(`
40
- `)}function Pi(e){return e>=1e6?`1M`:`${Math.round(e/1e3)}k`}function Fi({label:e,checked:t,onChange:n}){return(0,S.jsxs)(`label`,{className:`toggle`,children:[(0,S.jsx)(`input`,{type:`checkbox`,checked:t,onChange:e=>n(e.target.checked),"aria-label":e}),(0,S.jsx)(`span`,{className:`slider`,"aria-hidden":`true`})]})}function Ii({apiBase:e}){let t=U(),[n,r]=(0,_.useState)(null),[i,a]=(0,_.useState)([]),[o,s]=(0,_.useState)(``),[c,l]=(0,_.useState)(!1),[u,d]=(0,_.useState)(!0),f=(0,_.useCallback)(async()=>{try{let t=await fetch(`${e}/api/claude-code`).then(e=>e.json());r({...t,authMode:t.authMode===`proxy`?`proxy`:`subscription`,systemEnv:t.systemEnv!==!1,fastMode:t.fastMode??null,maxContextTokens:t.maxContextTokens??null,autoContext:t.autoContext!==!1,autoCompactWindow:t.autoCompactWindow??null,injectAgents:t.injectAgents!==!1,effectiveModelEnv:t.effectiveModelEnv??{}}),a(Object.entries(t.modelMap??{}).map(([e,t])=>({from:e,to:String(t)})))}catch{l(!1),s(t(`claude.loadFail`))}finally{d(!1)}},[e,t]);(0,_.useEffect)(()=>{let e=window.setTimeout(()=>{f()},0);return()=>window.clearTimeout(e)},[f]);let p=(0,_.useMemo)(()=>{let e=(n?.available??[]).map(e=>({value:e,label:String(rr(e))}));return[{value:``,label:t(`claude.slotUnset`)},...e]},[n?.available,t]),m=(0,_.useMemo)(()=>{let e=[1e5,2e5,25e4,3e5,35e4,4e5,5e5,6e5,75e4,9e5,1e6],r=n?.autoCompactWindow??null,i=r!==null&&!e.includes(r)?[...e,r].sort((e,t)=>e-t):e;return[{value:``,label:t(`claude.autoCompactDefault`)},...i.map(e=>({value:String(e),label:Pi(e)}))]},[n?.autoCompactWindow,t]),h=async()=>{if(!n)return;s(``);let r={};for(let e of i)e.from.trim()&&e.to.trim()&&(r[e.from.trim()]=e.to.trim());try{let i=await fetch(`${e}/api/claude-code`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({enabled:n.enabled,authMode:n.authMode,systemEnv:n.systemEnv,fastMode:n.fastMode,autoContext:n.autoContext,autoCompactWindow:n.autoCompactWindow,injectAgents:n.injectAgents,smallFastModel:n.smallFastModel,modelMap:r,webSearchSidecar:n.webSearchSidecar?{backend:n.webSearchSidecar.backend??null,model:n.webSearchSidecar.model??``}:null,visionSidecar:n.visionSidecar?{backend:n.visionSidecar.backend??null,model:n.visionSidecar.model??``}:null})}),a=await i.json();l(i.ok),s(i.ok?t(`claude.saved`):a.error||t(`claude.saveFailed`)),i.ok&&await f()}catch{l(!1),s(t(`claude.networkError`))}};if(u)return(0,S.jsx)(`div`,{className:`muted`,style:{padding:8},children:t(`claude.loading`)});if(!n)return(0,S.jsx)(W,{tone:`err`,children:o||t(`claude.loadFail`)});let g=Ni(n);return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`div`,{className:`page-head`,children:(0,S.jsx)(`h2`,{children:t(`claude.pageTitle`)})}),(0,S.jsx)(`p`,{className:`page-sub`,children:t(`claude.subtitle`)}),o&&(0,S.jsx)(W,{tone:c?`ok`:`err`,children:o}),(0,S.jsxs)(`div`,{className:`card`,style:{overflow:`hidden`},children:[(0,S.jsxs)(`div`,{className:`setting-row`,children:[(0,S.jsxs)(`div`,{className:`setting-label`,children:[(0,S.jsx)(`span`,{className:`title`,children:t(`claude.enabledLabel`)}),(0,S.jsx)(`span`,{className:`desc`,children:t(`claude.enabledHint`)})]}),(0,S.jsx)(Fi,{label:t(`claude.enabledLabel`),checked:n.enabled,onChange:e=>r({...n,enabled:e})})]}),(0,S.jsxs)(`div`,{className:`setting-row`,children:[(0,S.jsxs)(`div`,{className:`setting-label`,children:[(0,S.jsx)(`span`,{className:`title`,children:t(`claude.authMode`)}),(0,S.jsx)(`span`,{className:`desc`,children:t(`claude.authModeHint`)})]}),(0,S.jsx)(G,{value:n.authMode,options:[{value:`subscription`,label:t(`claude.authModeSubscription`)},{value:`proxy`,label:t(`claude.authModeProxy`)}],onChange:e=>r({...n,authMode:e}),label:t(`claude.authMode`),style:{minWidth:220}})]}),(0,S.jsxs)(`div`,{className:`setting-row`,children:[(0,S.jsxs)(`div`,{className:`setting-label`,children:[(0,S.jsx)(`span`,{className:`title`,children:t(`claude.systemEnv`)}),(0,S.jsx)(`span`,{className:`desc`,children:t(`claude.systemEnvDesc`)}),n.systemEnv&&(0,S.jsx)(`span`,{className:`desc`,style:{color:`var(--red)`},children:t(`claude.systemEnvWarn`)})]}),(0,S.jsx)(Fi,{label:t(`claude.systemEnv`),checked:n.systemEnv,onChange:e=>r({...n,systemEnv:e})})]}),(0,S.jsxs)(`div`,{className:`setting-row`,children:[(0,S.jsxs)(`div`,{className:`setting-label`,children:[(0,S.jsx)(`span`,{className:`title`,children:t(`claude.fastMode`)}),(0,S.jsx)(`span`,{className:`desc`,children:t(`claude.fastModeDesc`)})]}),(0,S.jsxs)(`select`,{value:n.fastMode===null?`auto`:n.fastMode?`on`:`off`,onChange:e=>{let t=e.target.value;r({...n,fastMode:t===`auto`?null:t===`on`})},className:`text-label font-medium`,"aria-label":t(`claude.fastMode`),style:{padding:`5px 10px`,borderRadius:`var(--radius-xs)`,border:`1px solid var(--border)`,background:`var(--surface)`,color:`var(--text)`},children:[(0,S.jsx)(`option`,{value:`auto`,children:t(`claude.fastAuto`)}),(0,S.jsx)(`option`,{value:`on`,children:t(`claude.fastOn`)}),(0,S.jsx)(`option`,{value:`off`,children:t(`claude.fastOff`)})]})]}),(0,S.jsxs)(`div`,{className:`setting-row`,children:[(0,S.jsxs)(`div`,{className:`setting-label`,children:[(0,S.jsx)(`span`,{className:`title`,children:t(`claude.autoContext`)}),(0,S.jsx)(`span`,{className:`desc`,children:t(`claude.autoContextDesc`)}),n.maxContextTokens!==null&&(0,S.jsx)(`span`,{className:`desc`,style:{color:`var(--muted)`},children:t(`claude.autoContextInert`)})]}),(0,S.jsx)(Fi,{label:t(`claude.autoContext`),checked:n.autoContext,onChange:e=>r({...n,autoContext:e})})]}),n.autoContext&&(0,S.jsxs)(`div`,{className:`setting-row`,children:[(0,S.jsxs)(`div`,{className:`setting-label`,children:[(0,S.jsx)(`span`,{className:`title`,children:t(`claude.autoCompactWindow`)}),(0,S.jsx)(`span`,{className:`desc`,children:t(`claude.autoCompactWindowDesc`)}),n.autoCompactWindow!==null&&(0,S.jsx)(`span`,{className:`desc`,style:{color:`var(--red)`},children:t(`claude.autoCompactWindowWarn`)})]}),(0,S.jsx)(G,{value:n.autoCompactWindow===null?``:String(n.autoCompactWindow),options:m,onChange:e=>r({...n,autoCompactWindow:e===``?null:Number(e)}),label:t(`claude.autoCompactWindow`),style:{minWidth:130}})]}),(0,S.jsxs)(`div`,{className:`setting-row`,children:[(0,S.jsxs)(`div`,{className:`setting-label`,children:[(0,S.jsx)(`span`,{className:`title`,children:t(`claude.injectAgents`)}),(0,S.jsx)(`span`,{className:`desc`,children:t(`claude.injectAgentsDesc`)})]}),(0,S.jsx)(Fi,{label:t(`claude.injectAgents`),checked:n.injectAgents,onChange:e=>r({...n,injectAgents:e})})]}),[`webSearchSidecar`,`visionSidecar`].map(e=>{let i=n[e],a=e===`webSearchSidecar`?`claude.webSearchSidecar`:`claude.visionSidecar`,o=e===`webSearchSidecar`?`claude.webSearchSidecarHint`:`claude.visionSidecarHint`;return(0,S.jsxs)(`div`,{className:`setting-row`,style:{alignItems:`flex-start`},children:[(0,S.jsxs)(`div`,{className:`setting-label setting-copy`,style:{flex:1},children:[(0,S.jsx)(`span`,{className:`title`,children:t(a)}),(0,S.jsx)(`span`,{className:`desc`,children:t(o)})]}),(0,S.jsxs)(`div`,{className:`setting-controls`,style:{display:`flex`,gap:8},children:[(0,S.jsx)(G,{value:i?i.backend??`auto`:`inherit`,options:[{value:`inherit`,label:t(`claude.useMainSetting`)},{value:`auto`,label:t(`dash.backendAuto`)},{value:`openai`,label:t(`dash.backendOpenAI`)},{value:`anthropic`,label:t(`dash.backendAnthropic`)}],onChange:t=>r({...n,[e]:t===`inherit`?void 0:{...i,backend:t===`auto`?void 0:t}}),label:t(`dash.sidecarBackend`)}),(0,S.jsx)(`input`,{className:`input mono`,value:i?.model??``,onChange:t=>r({...n,[e]:{...i,model:t.target.value}}),placeholder:t(`claude.sidecarModelPlaceholder`),disabled:!i,"aria-label":t(`dash.sidecarModel`),style:{minWidth:210}})]})]},e)})]}),(0,S.jsx)(`div`,{className:`h-section`,children:t(`claude.quickstart`)}),(0,S.jsx)(`p`,{className:`muted text-label`,style:{margin:`0 0 8px`},children:(0,S.jsx)(Te,{k:`claude.quickstartHint`,cmd:`ocx claude`})}),(0,S.jsx)(`pre`,{className:`mono card`,style:{padding:`10px 14px`,overflowX:`auto`,margin:0},children:`ocx claude`}),(0,S.jsxs)(`details`,{style:{margin:`10px 0 0`},children:[(0,S.jsx)(`summary`,{className:`muted text-label`,style:{cursor:`pointer`,padding:`2px 2px`},children:t(`claude.manualEnv`)}),(0,S.jsx)(`pre`,{className:`mono card text-label`,style:{padding:`10px 14px`,overflowX:`auto`,margin:`6px 0 0`},children:g})]}),(0,S.jsx)(`div`,{className:`h-section`,children:t(`claude.smallFastModel`)}),(0,S.jsx)(`p`,{className:`muted text-label`,style:{margin:`0 0 8px`},children:t(`claude.smallFastModelHint`)}),(0,S.jsx)(G,{value:n.smallFastModel,options:p,onChange:e=>r({...n,smallFastModel:e}),label:t(`claude.smallFastModel`),style:{maxWidth:420}}),(0,S.jsxs)(`div`,{className:`h-section`,children:[t(`claude.modelMap`),` `,(0,S.jsx)(`span`,{className:`count`,children:i.length})]}),(0,S.jsx)(`p`,{className:`muted text-label`,style:{margin:`0 0 8px`},children:t(`claude.modelMapHint`)}),(0,S.jsx)(`div`,{className:`stack`,style:{gap:8},children:i.map((e,n)=>(0,S.jsxs)(`div`,{className:`row`,style:{gap:8},children:[(0,S.jsx)(`input`,{className:`input mono`,value:e.from,placeholder:t(`claude.mapFrom`),"aria-label":t(`claude.mapFrom`),onChange:e=>a(t=>t.map((t,r)=>r===n?{...t,from:e.target.value}:t)),style:{flex:1}}),(0,S.jsx)(`span`,{className:`muted`,"aria-hidden":!0,children:`→`}),(0,S.jsx)(`input`,{className:`input mono`,value:e.to,placeholder:t(`claude.mapTo`),"aria-label":t(`claude.mapTo`),onChange:e=>a(t=>t.map((t,r)=>r===n?{...t,to:e.target.value}:t)),style:{flex:1}}),(0,S.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-icon btn-sm`,onClick:()=>a(e=>e.filter((e,t)=>t!==n)),"aria-label":t(`claude.removeMapping`),style:{color:`var(--red)`},children:(0,S.jsx)(N,{})})]},n))}),(0,S.jsx)(`div`,{style:{marginTop:8},children:(0,S.jsxs)(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,onClick:()=>a(e=>[...e,{from:``,to:``}]),children:[(0,S.jsx)(P,{}),` `,t(`claude.addMapping`)]})}),(0,S.jsx)(`div`,{style:{marginTop:14},children:(0,S.jsx)(`button`,{type:`button`,className:`btn btn-primary`,onClick:h,children:t(`common.save`)})}),(0,S.jsxs)(`div`,{className:`h-section`,children:[t(`claude.aliases`),` `,(0,S.jsx)(`span`,{className:`count`,children:n.aliases.length})]}),(0,S.jsx)(`p`,{className:`muted text-label`,style:{margin:`0 0 8px`},children:t(`claude.aliasesHint`)}),n.aliases.length===0?(0,S.jsx)(`div`,{className:`muted text-label`,children:t(`claude.none`)}):(0,S.jsx)(`div`,{className:`stack`,style:{gap:6,maxHeight:320,overflowY:`auto`},children:Array.from(n.aliases.reduce((e,t)=>{let n=/\(([^)]+)\)\s*$/.exec(t.display_name),r=n?n[1]:`etc`;return(e.get(r)??e.set(r,[]).get(r)).push(t),e},new Map)).map(([e,t])=>(0,S.jsxs)(`div`,{children:[(0,S.jsxs)(`div`,{className:`muted text-caption font-semibold`,style:{textTransform:`uppercase`,letterSpacing:`var(--tracking-wide)`,margin:`6px 2px 4px`},children:[e,` · `,t.length]}),(0,S.jsx)(`div`,{className:`stack`,style:{gap:4},children:t.map(e=>(0,S.jsxs)(`div`,{className:`card row`,style:{padding:`6px 12px`,gap:10},children:[(0,S.jsx)(`code`,{className:`mono text-label`,style:{flex:1},children:e.id}),(0,S.jsx)(`span`,{className:`muted text-label`,children:e.display_name})]},e.id))})]},e))})]})}var Li=`opencodex-api-token`,Ri=!1,zi=null;function Bi(e){try{let t=e instanceof Request?e.url:String(e);return new URL(t,window.location.href).pathname}catch{return null}}function Vi(e){let t=Bi(e);return!!t&&(t.startsWith(`/api/`)||t.startsWith(`/v1/`))}function Hi(){try{return sessionStorage.getItem(Li)?.trim()||null}catch{return null}}function Ui(e){try{sessionStorage.setItem(Li,e)}catch{}}function Wi(){try{sessionStorage.removeItem(Li)}catch{}}function Gi(e,t,n){let r=new Headers(t?.headers??(e instanceof Request?e.headers:void 0));return r.set(`X-OpenCodex-API-Key`,n),e instanceof Request?[new Request(e,{headers:r}),t?{...t,headers:r}:void 0]:[e,{...t,headers:r}]}async function Ki(){return zi||(zi=Promise.resolve().then(()=>window.prompt(`OpenCodex API token`)?.trim()||null).finally(()=>{zi=null}),zi)}function qi(){if(Ri)return;Ri=!0;let e=window.fetch.bind(window);window.fetch=async(t,n)=>{if(!Vi(t))return e(t,n);let r=Hi(),[i,a]=r?Gi(t,n,r):[t,n],o=await e(i,a);if(o.status!==401)return o;r&&Wi();let s=await Ki();if(!s)return o;Ui(s);let[c,l]=Gi(t,n,s),u=await e(c,l);return u.status===401&&Wi(),u}}qi();var Ji=new Set([`dashboard`,`providers`,`models`,`combos`,`subagents`,`logs`,`debug`,`usage`,`codex-auth`,`api`,`claude`]);function Yi(){let e=location.hash.replace(/^#\/?/,``).split(`/`)[0];return Ji.has(e)?e:`dashboard`}function Xi(e,t){return e===t||t===`providers`&&e===`providers/workspace`}var Zi=``,Qi=`ocx-theme`,$i=[{id:`dashboard`,tkey:`nav.dashboard`,Icon:w},{id:`providers`,tkey:`nav.providers`,Icon:T},{id:`models`,tkey:`nav.models`,Icon:E},{id:`combos`,tkey:`nav.combos`,Icon:pe},{id:`subagents`,tkey:`nav.subagents`,Icon:D},{id:`logs`,tkey:`nav.logs`,Icon:O},{id:`debug`,tkey:`nav.debug`,Icon:A},{id:`usage`,tkey:`nav.usage`,Icon:j},{id:`codex-auth`,tkey:`nav.codexAuth`,Icon:ae},{id:`api`,tkey:`nav.api`,Icon:de},{id:`claude`,tkey:`nav.claude`,Icon:fe}],ea={light:le,dark:V,system:ue},ta={light:`theme.light`,dark:`theme.dark`,system:`theme.system`};function na(e){if(!e||typeof e!=`object`||!(`version`in e))return null;let t=e.version;return typeof t==`string`&&t.length>0?t:null}function ra(){let e=localStorage.getItem(Qi);return e===`light`||e===`dark`?e:`system`}function ia(){let[e,t]=(0,_.useState)(Yi),[n,r]=(0,_.useState)(ra),[i,a]=(0,_.useState)(null),{locale:o,setLocale:s}=H(),c=U(),[l,u]=(0,_.useState)(!1),d=(0,_.useRef)(null),f=(0,_.useRef)(null),p=(0,_.useRef)(!1);(0,_.useEffect)(()=>{let e=()=>{let e=Yi(),n=window.location.hash.replace(/^#\/?/,``);if(u(!1),!Xi(n,e)){window.location.hash=e;return}t(e)};return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},[]),(0,_.useEffect)(()=>{Xi(window.location.hash.replace(/^#\/?/,``),e)||(window.location.hash=e)},[e]),(0,_.useEffect)(()=>{let e=document.documentElement;n===`system`?(e.removeAttribute(`data-theme`),localStorage.removeItem(Qi)):(e.setAttribute(`data-theme`,n),localStorage.setItem(Qi,n))},[n]),(0,_.useEffect)(()=>{let e=!1,t=async()=>{try{let t=await fetch(`${Zi}/healthz`);if(!t.ok)return;let n=na(await t.json());!e&&n&&a(n)}catch{}};t();let n=setInterval(t,3e4);return()=>{e=!0,clearInterval(n)}},[]);let m=()=>r(e=>e===`light`?`dark`:e===`dark`?`system`:`light`),h=ea[n],g=i??`2.7.27`,[v,y]=(0,_.useState)(!1),[b,x]=(0,_.useState)(null);(0,_.useEffect)(()=>{if(!l)return;let e=e=>{e.key===`Escape`&&u(!1)};window.addEventListener(`keydown`,e);let t=document.body.style.overflow;return document.body.style.overflow=`hidden`,()=>{window.removeEventListener(`keydown`,e),document.body.style.overflow=t}},[l]),(0,_.useEffect)(()=>{if(l){p.current=!0;let e=setTimeout(()=>f.current?.focus(),200);return()=>clearTimeout(e)}p.current&&(p.current=!1,d.current?.focus())},[l]),(0,_.useEffect)(()=>{let e=window.matchMedia(`(min-width: 761px)`),t=()=>{e.matches&&u(!1)};return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[]),(0,_.useEffect)(()=>{let e=!1;return fetch(`${Zi}/api/claude-code`).then(e=>e.json()).then(t=>{!e&&typeof t.enabled==`boolean`&&x(t.enabled)}).catch(()=>{}),()=>{e=!0}},[]);let C=async()=>{if(b===null)return;let e=!b;x(e);try{(await fetch(`${Zi}/api/claude-code`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({enabled:e})})).ok||x(!e)}catch{x(!e)}},w=async()=>{if(confirm(c(`dash.stopConfirm`))){y(!0);try{await fetch(`${Zi}/api/stop`,{method:`POST`})}catch{}}},T=(0,S.jsxs)(`div`,{className:`brand`,children:[(0,S.jsx)(`span`,{className:`brand-logo`,role:`img`,"aria-label":c(`app.logoAria`)}),(0,S.jsx)(`span`,{className:`name`,children:`opencodex`}),(0,S.jsxs)(`span`,{className:`ver`,children:[`v`,g]})]});return(0,S.jsxs)(`div`,{className:`app`,children:[(0,S.jsxs)(`header`,{className:`mobile-topbar`,inert:l,children:[(0,S.jsx)(`button`,{ref:d,type:`button`,className:`menu-toggle`,onClick:()=>u(e=>!e),"aria-expanded":l,"aria-controls":`app-sidebar`,"aria-label":c(l?`nav.closeMenu`:`nav.openMenu`),title:c(l?`nav.closeMenu`:`nav.openMenu`),children:(0,S.jsx)(k,{})}),T,(0,S.jsx)(`button`,{type:`button`,className:`theme-toggle stop-toggle`,onClick:w,disabled:v,"aria-label":c(`dash.stop`),title:c(`dash.stop`),children:(0,S.jsx)(re,{})})]}),l&&(0,S.jsx)(`div`,{className:`drawer-scrim`,onClick:()=>u(!1),"aria-hidden":`true`}),(0,S.jsxs)(`aside`,{id:`app-sidebar`,className:`sidebar${l?` open`:``}`,ref:f,tabIndex:-1,children:[(0,S.jsxs)(`div`,{className:`drawer-head`,children:[T,(0,S.jsx)(`button`,{type:`button`,className:`menu-toggle drawer-close`,onClick:()=>u(!1),"aria-label":c(`nav.closeMenu`),title:c(`nav.closeMenu`),children:(0,S.jsx)(N,{})})]}),(0,S.jsx)(`nav`,{children:$i.map(({id:n,tkey:r,Icon:i})=>(0,S.jsxs)(`button`,{className:`nav-item${e===n?` active`:``}`,"data-page":n,onClick:()=>{t(n),u(!1)},"aria-current":e===n?`page`:void 0,children:[(0,S.jsx)(i,{}),` `,c(r)]},n))}),(0,S.jsxs)(`div`,{className:`sidebar-foot`,children:[b!==null&&(0,S.jsxs)(`button`,{type:`button`,className:`theme-toggle`,onClick:C,"aria-pressed":b,"aria-label":c(`claude.toggleAria`),title:c(`claude.toggleAria`),style:b?{color:`var(--accent)`}:void 0,children:[(0,S.jsx)(fe,{}),` `,(0,S.jsx)(`span`,{className:`mode`,children:c(b?`app.claudeOn`:`app.claudeOff`)})]}),(0,S.jsxs)(`div`,{className:`lang-toggle`,children:[(0,S.jsx)(de,{"aria-hidden":!0}),(0,S.jsx)(G,{value:o,options:ye.map(e=>({value:e.code,label:e.name})),onChange:e=>s(e),label:c(`lang.label`),placement:`right`,style:{flex:1,minWidth:0,width:`100%`}})]}),(0,S.jsxs)(`button`,{type:`button`,className:`theme-toggle`,onClick:m,"aria-label":`${c(`theme.label`)}: ${c(ta[n])}`,title:`${c(`theme.label`)}: ${c(ta[n])}`,children:[(0,S.jsx)(h,{}),` `,(0,S.jsx)(`span`,{className:`mode`,children:c(ta[n])})]}),(0,S.jsxs)(`button`,{type:`button`,className:`theme-toggle stop-toggle`,onClick:w,disabled:v,"aria-label":c(`dash.stop`),title:c(`dash.stop`),children:[(0,S.jsx)(re,{}),` `,(0,S.jsx)(`span`,{className:`mode`,children:c(v?`dash.stopping`:`dash.stop`)})]}),(0,S.jsxs)(`a`,{className:`sidebar-link`,href:`https://github.com/lidge-jun/opencodex`,target:`_blank`,rel:`noreferrer`,children:[(0,S.jsx)(B,{}),` `,c(`common.github`)]})]})]}),(0,S.jsx)(`main`,{className:`main`,inert:l,children:(0,S.jsxs)(`div`,{className:`main-inner${e===`combos`?` main-inner--combos`:``}`,children:[e===`dashboard`&&(0,S.jsx)(Ue,{apiBase:Zi}),e===`providers`&&(0,S.jsx)(Qn,{apiBase:Zi}),e===`models`&&(0,S.jsx)(pr,{apiBase:Zi}),e===`combos`&&(0,S.jsx)(Kr,{apiBase:Zi}),e===`subagents`&&(0,S.jsx)(qr,{apiBase:Zi}),e===`logs`&&(0,S.jsx)(oi,{apiBase:Zi}),e===`debug`&&(0,S.jsx)(mi,{apiBase:Zi}),e===`usage`&&(0,S.jsx)(K,{apiBase:Zi}),e===`codex-auth`&&(0,S.jsx)(ki,{apiBase:Zi}),e===`api`&&(0,S.jsx)(ji,{apiBase:Zi}),e===`claude`&&(0,S.jsx)(Ii,{apiBase:Zi})]})})]})}v.createRoot(document.getElementById(`root`)).render((0,S.jsx)(_.StrictMode,{children:(0,S.jsx)(we,{children:(0,S.jsx)(ia,{})})}));