@nick3/copilot-api 1.6.1 → 1.6.3

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.
Files changed (29) hide show
  1. package/dist/{account-B2tSWtVS.js → account-Db80RUHX.js} +2 -2
  2. package/dist/{account-B2tSWtVS.js.map → account-Db80RUHX.js.map} +1 -1
  3. package/dist/{accounts-manager-CAyZJSn8.js → accounts-manager-B4eOuKSK.js} +225 -293
  4. package/dist/accounts-manager-B4eOuKSK.js.map +1 -0
  5. package/dist/admin/assets/index-B2qj1asn.css +1 -0
  6. package/dist/admin/assets/index-CH72K8cb.js +107 -0
  7. package/dist/admin/assets/sse-BHNhW__Y.js +9 -0
  8. package/dist/admin/index.html +2 -2
  9. package/dist/{auth-BXCeDjRG.js → auth-Ba8K-1aX.js} +3 -3
  10. package/dist/{auth-BXCeDjRG.js.map → auth-Ba8K-1aX.js.map} +1 -1
  11. package/dist/{check-usage-CQxXYfUx.js → check-usage-ChbkyMqB.js} +3 -3
  12. package/dist/{check-usage-CQxXYfUx.js.map → check-usage-ChbkyMqB.js.map} +1 -1
  13. package/dist/{get-copilot-token-p17sJyPU.js → get-copilot-token-Buo3CA1x.js} +2 -2
  14. package/dist/{get-copilot-token-p17sJyPU.js.map → get-copilot-token-Buo3CA1x.js.map} +1 -1
  15. package/dist/main.js +3 -3
  16. package/dist/{poll-access-token-Bc6VwWab.js → poll-access-token-tKPQmH_6.js} +2 -2
  17. package/dist/{poll-access-token-Bc6VwWab.js.map → poll-access-token-tKPQmH_6.js.map} +1 -1
  18. package/dist/request-outbound-C0g49Ab6.js +505 -0
  19. package/dist/request-outbound-C0g49Ab6.js.map +1 -0
  20. package/dist/request-outbound-IimJTlvY.js +4 -0
  21. package/dist/{server-BAlLdlCl.js → server-Dw9SIlHL.js} +3778 -3292
  22. package/dist/server-Dw9SIlHL.js.map +1 -0
  23. package/dist/{start-eFWi3mS4.js → start-BI0sDz7p.js} +7 -6
  24. package/dist/{start-eFWi3mS4.js.map → start-BI0sDz7p.js.map} +1 -1
  25. package/package.json +1 -1
  26. package/dist/accounts-manager-CAyZJSn8.js.map +0 -1
  27. package/dist/admin/assets/index-BESw8Vvd.css +0 -1
  28. package/dist/admin/assets/index-Ddo9RHg-.js +0 -101
  29. package/dist/server-BAlLdlCl.js.map +0 -1
@@ -1,101 +0,0 @@
1
- function aq(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function va(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var c0={exports:{}},pf={};var AP;function oq(){if(AP)return pf;AP=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,o){var l=null;if(o!==void 0&&(l=""+o),i.key!==void 0&&(l=""+i.key),"key"in i){o={};for(var u in i)u!=="key"&&(o[u]=i[u])}else o=i;return i=o.ref,{$$typeof:e,type:r,key:l,ref:i!==void 0?i:null,props:o}}return pf.Fragment=t,pf.jsx=n,pf.jsxs=n,pf}var CP;function sq(){return CP||(CP=1,c0.exports=oq()),c0.exports}var g=sq(),f0={exports:{}},Ie={};var EP;function lq(){if(EP)return Ie;EP=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),y=Symbol.iterator;function b(D){return D===null||typeof D!="object"?null:(D=y&&D[y]||D["@@iterator"],typeof D=="function"?D:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,C={};function E(D,V,K){this.props=D,this.context=V,this.refs=C,this.updater=K||w}E.prototype.isReactComponent={},E.prototype.setState=function(D,V){if(typeof D!="object"&&typeof D!="function"&&D!=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,D,V,"setState")},E.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function j(){}j.prototype=E.prototype;function T(D,V,K){this.props=D,this.context=V,this.refs=C,this.updater=K||w}var O=T.prototype=new j;O.constructor=T,S(O,E.prototype),O.isPureReactComponent=!0;var N=Array.isArray;function _(){}var M={H:null,A:null,T:null,S:null},R=Object.prototype.hasOwnProperty;function I(D,V,K){var ee=K.ref;return{$$typeof:e,type:D,key:V,ref:ee!==void 0?ee:null,props:K}}function $(D,V){return I(D.type,V,D.props)}function F(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function z(D){var V={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(K){return V[K]})}var Y=/\/+/g;function Q(D,V){return typeof D=="object"&&D!==null&&D.key!=null?z(""+D.key):V.toString(36)}function se(D){switch(D.status){case"fulfilled":return D.value;case"rejected":throw D.reason;default:switch(typeof D.status=="string"?D.then(_,_):(D.status="pending",D.then(function(V){D.status==="pending"&&(D.status="fulfilled",D.value=V)},function(V){D.status==="pending"&&(D.status="rejected",D.reason=V)})),D.status){case"fulfilled":return D.value;case"rejected":throw D.reason}}throw D}function L(D,V,K,ee,he){var ye=typeof D;(ye==="undefined"||ye==="boolean")&&(D=null);var X=!1;if(D===null)X=!0;else switch(ye){case"bigint":case"string":case"number":X=!0;break;case"object":switch(D.$$typeof){case e:case t:X=!0;break;case m:return X=D._init,L(X(D._payload),V,K,ee,he)}}if(X)return he=he(D),X=ee===""?"."+Q(D,0):ee,N(he)?(K="",X!=null&&(K=X.replace(Y,"$&/")+"/"),L(he,V,K,"",function(le){return le})):he!=null&&(F(he)&&(he=$(he,K+(he.key==null||D&&D.key===he.key?"":(""+he.key).replace(Y,"$&/")+"/")+X)),V.push(he)),1;X=0;var me=ee===""?".":ee+":";if(N(D))for(var oe=0;oe<D.length;oe++)ee=D[oe],ye=me+Q(ee,oe),X+=L(ee,V,K,ye,he);else if(oe=b(D),typeof oe=="function")for(D=oe.call(D),oe=0;!(ee=D.next()).done;)ee=ee.value,ye=me+Q(ee,oe++),X+=L(ee,V,K,ye,he);else if(ye==="object"){if(typeof D.then=="function")return L(se(D),V,K,ee,he);throw V=String(D),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return X}function q(D,V,K){if(D==null)return D;var ee=[],he=0;return L(D,ee,"","",function(ye){return V.call(K,ye,he++)}),ee}function B(D){if(D._status===-1){var V=D._result;V=V(),V.then(function(K){(D._status===0||D._status===-1)&&(D._status=1,D._result=K)},function(K){(D._status===0||D._status===-1)&&(D._status=2,D._result=K)}),D._status===-1&&(D._status=0,D._result=V)}if(D._status===1)return D._result.default;throw D._result}var ae=typeof reportError=="function"?reportError:function(D){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof D=="object"&&D!==null&&typeof D.message=="string"?String(D.message):String(D),error:D});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",D);return}console.error(D)},G={map:q,forEach:function(D,V,K){q(D,function(){V.apply(this,arguments)},K)},count:function(D){var V=0;return q(D,function(){V++}),V},toArray:function(D){return q(D,function(V){return V})||[]},only:function(D){if(!F(D))throw Error("React.Children.only expected to receive a single React element child.");return D}};return Ie.Activity=h,Ie.Children=G,Ie.Component=E,Ie.Fragment=n,Ie.Profiler=i,Ie.PureComponent=T,Ie.StrictMode=r,Ie.Suspense=c,Ie.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,Ie.__COMPILER_RUNTIME={__proto__:null,c:function(D){return M.H.useMemoCache(D)}},Ie.cache=function(D){return function(){return D.apply(null,arguments)}},Ie.cacheSignal=function(){return null},Ie.cloneElement=function(D,V,K){if(D==null)throw Error("The argument must be a React element, but you passed "+D+".");var ee=S({},D.props),he=D.key;if(V!=null)for(ye in V.key!==void 0&&(he=""+V.key),V)!R.call(V,ye)||ye==="key"||ye==="__self"||ye==="__source"||ye==="ref"&&V.ref===void 0||(ee[ye]=V[ye]);var ye=arguments.length-2;if(ye===1)ee.children=K;else if(1<ye){for(var X=Array(ye),me=0;me<ye;me++)X[me]=arguments[me+2];ee.children=X}return I(D.type,he,ee)},Ie.createContext=function(D){return D={$$typeof:l,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null},D.Provider=D,D.Consumer={$$typeof:o,_context:D},D},Ie.createElement=function(D,V,K){var ee,he={},ye=null;if(V!=null)for(ee in V.key!==void 0&&(ye=""+V.key),V)R.call(V,ee)&&ee!=="key"&&ee!=="__self"&&ee!=="__source"&&(he[ee]=V[ee]);var X=arguments.length-2;if(X===1)he.children=K;else if(1<X){for(var me=Array(X),oe=0;oe<X;oe++)me[oe]=arguments[oe+2];he.children=me}if(D&&D.defaultProps)for(ee in X=D.defaultProps,X)he[ee]===void 0&&(he[ee]=X[ee]);return I(D,ye,he)},Ie.createRef=function(){return{current:null}},Ie.forwardRef=function(D){return{$$typeof:u,render:D}},Ie.isValidElement=F,Ie.lazy=function(D){return{$$typeof:m,_payload:{_status:-1,_result:D},_init:B}},Ie.memo=function(D,V){return{$$typeof:d,type:D,compare:V===void 0?null:V}},Ie.startTransition=function(D){var V=M.T,K={};M.T=K;try{var ee=D(),he=M.S;he!==null&&he(K,ee),typeof ee=="object"&&ee!==null&&typeof ee.then=="function"&&ee.then(_,ae)}catch(ye){ae(ye)}finally{V!==null&&K.types!==null&&(V.types=K.types),M.T=V}},Ie.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},Ie.use=function(D){return M.H.use(D)},Ie.useActionState=function(D,V,K){return M.H.useActionState(D,V,K)},Ie.useCallback=function(D,V){return M.H.useCallback(D,V)},Ie.useContext=function(D){return M.H.useContext(D)},Ie.useDebugValue=function(){},Ie.useDeferredValue=function(D,V){return M.H.useDeferredValue(D,V)},Ie.useEffect=function(D,V){return M.H.useEffect(D,V)},Ie.useEffectEvent=function(D){return M.H.useEffectEvent(D)},Ie.useId=function(){return M.H.useId()},Ie.useImperativeHandle=function(D,V,K){return M.H.useImperativeHandle(D,V,K)},Ie.useInsertionEffect=function(D,V){return M.H.useInsertionEffect(D,V)},Ie.useLayoutEffect=function(D,V){return M.H.useLayoutEffect(D,V)},Ie.useMemo=function(D,V){return M.H.useMemo(D,V)},Ie.useOptimistic=function(D,V){return M.H.useOptimistic(D,V)},Ie.useReducer=function(D,V,K){return M.H.useReducer(D,V,K)},Ie.useRef=function(D){return M.H.useRef(D)},Ie.useState=function(D){return M.H.useState(D)},Ie.useSyncExternalStore=function(D,V,K){return M.H.useSyncExternalStore(D,V,K)},Ie.useTransition=function(){return M.H.useTransition()},Ie.version="19.2.3",Ie}var jP;function nc(){return jP||(jP=1,f0.exports=lq()),f0.exports}var v=nc();const pe=va(v),Dg=aq({__proto__:null,default:pe},[v]);var d0={exports:{}},gf={},h0={exports:{}},m0={};var TP;function uq(){return TP||(TP=1,(function(e){function t(L,q){var B=L.length;L.push(q);e:for(;0<B;){var ae=B-1>>>1,G=L[ae];if(0<i(G,q))L[ae]=q,L[B]=G,B=ae;else break e}}function n(L){return L.length===0?null:L[0]}function r(L){if(L.length===0)return null;var q=L[0],B=L.pop();if(B!==q){L[0]=B;e:for(var ae=0,G=L.length,D=G>>>1;ae<D;){var V=2*(ae+1)-1,K=L[V],ee=V+1,he=L[ee];if(0>i(K,B))ee<G&&0>i(he,K)?(L[ae]=he,L[ee]=B,ae=ee):(L[ae]=K,L[V]=B,ae=V);else if(ee<G&&0>i(he,B))L[ae]=he,L[ee]=B,ae=ee;else break e}}return q}function i(L,q){var B=L.sortIndex-q.sortIndex;return B!==0?B:L.id-q.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,u=l.now();e.unstable_now=function(){return l.now()-u}}var c=[],d=[],m=1,h=null,y=3,b=!1,w=!1,S=!1,C=!1,E=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function O(L){for(var q=n(d);q!==null;){if(q.callback===null)r(d);else if(q.startTime<=L)r(d),q.sortIndex=q.expirationTime,t(c,q);else break;q=n(d)}}function N(L){if(S=!1,O(L),!w)if(n(c)!==null)w=!0,_||(_=!0,z());else{var q=n(d);q!==null&&se(N,q.startTime-L)}}var _=!1,M=-1,R=5,I=-1;function $(){return C?!0:!(e.unstable_now()-I<R)}function F(){if(C=!1,_){var L=e.unstable_now();I=L;var q=!0;try{e:{w=!1,S&&(S=!1,j(M),M=-1),b=!0;var B=y;try{t:{for(O(L),h=n(c);h!==null&&!(h.expirationTime>L&&$());){var ae=h.callback;if(typeof ae=="function"){h.callback=null,y=h.priorityLevel;var G=ae(h.expirationTime<=L);if(L=e.unstable_now(),typeof G=="function"){h.callback=G,O(L),q=!0;break t}h===n(c)&&r(c),O(L)}else r(c);h=n(c)}if(h!==null)q=!0;else{var D=n(d);D!==null&&se(N,D.startTime-L),q=!1}}break e}finally{h=null,y=B,b=!1}q=void 0}}finally{q?z():_=!1}}}var z;if(typeof T=="function")z=function(){T(F)};else if(typeof MessageChannel<"u"){var Y=new MessageChannel,Q=Y.port2;Y.port1.onmessage=F,z=function(){Q.postMessage(null)}}else z=function(){E(F,0)};function se(L,q){M=E(function(){L(e.unstable_now())},q)}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(L){L.callback=null},e.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<L?Math.floor(1e3/L):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_next=function(L){switch(y){case 1:case 2:case 3:var q=3;break;default:q=y}var B=y;y=q;try{return L()}finally{y=B}},e.unstable_requestPaint=function(){C=!0},e.unstable_runWithPriority=function(L,q){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var B=y;y=L;try{return q()}finally{y=B}},e.unstable_scheduleCallback=function(L,q,B){var ae=e.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?ae+B:ae):B=ae,L){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=B+G,L={id:m++,callback:q,priorityLevel:L,startTime:B,expirationTime:G,sortIndex:-1},B>ae?(L.sortIndex=B,t(d,L),n(c)===null&&L===n(d)&&(S?(j(M),M=-1):S=!0,se(N,B-ae))):(L.sortIndex=G,t(c,L),w||b||(w=!0,_||(_=!0,z()))),L},e.unstable_shouldYield=$,e.unstable_wrapCallback=function(L){var q=y;return function(){var B=y;y=q;try{return L.apply(this,arguments)}finally{y=B}}}})(m0)),m0}var OP;function cq(){return OP||(OP=1,h0.exports=uq()),h0.exports}var p0={exports:{}},Hn={};var PP;function fq(){if(PP)return Hn;PP=1;var e=nc();function t(c){var d="https://react.dev/errors/"+c;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)d+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+c+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function o(c,d,m){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:h==null?null:""+h,children:c,containerInfo:d,implementation:m}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(c,d){if(c==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return Hn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Hn.createPortal=function(c,d){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(t(299));return o(c,d,null,m)},Hn.flushSync=function(c){var d=l.T,m=r.p;try{if(l.T=null,r.p=2,c)return c()}finally{l.T=d,r.p=m,r.d.f()}},Hn.preconnect=function(c,d){typeof c=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,r.d.C(c,d))},Hn.prefetchDNS=function(c){typeof c=="string"&&r.d.D(c)},Hn.preinit=function(c,d){if(typeof c=="string"&&d&&typeof d.as=="string"){var m=d.as,h=u(m,d.crossOrigin),y=typeof d.integrity=="string"?d.integrity:void 0,b=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;m==="style"?r.d.S(c,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:h,integrity:y,fetchPriority:b}):m==="script"&&r.d.X(c,{crossOrigin:h,integrity:y,fetchPriority:b,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},Hn.preinitModule=function(c,d){if(typeof c=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var m=u(d.as,d.crossOrigin);r.d.M(c,{crossOrigin:m,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&r.d.M(c)},Hn.preload=function(c,d){if(typeof c=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var m=d.as,h=u(m,d.crossOrigin);r.d.L(c,m,{crossOrigin:h,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},Hn.preloadModule=function(c,d){if(typeof c=="string")if(d){var m=u(d.as,d.crossOrigin);r.d.m(c,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:m,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else r.d.m(c)},Hn.requestFormReset=function(c){r.d.r(c)},Hn.unstable_batchedUpdates=function(c,d){return c(d)},Hn.useFormState=function(c,d,m){return l.H.useFormState(c,d,m)},Hn.useFormStatus=function(){return l.H.useHostTransitionStatus()},Hn.version="19.2.3",Hn}var NP;function CL(){if(NP)return p0.exports;NP=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),p0.exports=fq(),p0.exports}var _P;function dq(){if(_P)return gf;_P=1;var e=cq(),t=nc(),n=CL();function r(a){var s="https://react.dev/errors/"+a;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var f=2;f<arguments.length;f++)s+="&args[]="+encodeURIComponent(arguments[f])}return"Minified React error #"+a+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function o(a){var s=a,f=a;if(a.alternate)for(;s.return;)s=s.return;else{a=s;do s=a,(s.flags&4098)!==0&&(f=s.return),a=s.return;while(a)}return s.tag===3?f:null}function l(a){if(a.tag===13){var s=a.memoizedState;if(s===null&&(a=a.alternate,a!==null&&(s=a.memoizedState)),s!==null)return s.dehydrated}return null}function u(a){if(a.tag===31){var s=a.memoizedState;if(s===null&&(a=a.alternate,a!==null&&(s=a.memoizedState)),s!==null)return s.dehydrated}return null}function c(a){if(o(a)!==a)throw Error(r(188))}function d(a){var s=a.alternate;if(!s){if(s=o(a),s===null)throw Error(r(188));return s!==a?null:a}for(var f=a,p=s;;){var x=f.return;if(x===null)break;var A=x.alternate;if(A===null){if(p=x.return,p!==null){f=p;continue}break}if(x.child===A.child){for(A=x.child;A;){if(A===f)return c(x),a;if(A===p)return c(x),s;A=A.sibling}throw Error(r(188))}if(f.return!==p.return)f=x,p=A;else{for(var P=!1,k=x.child;k;){if(k===f){P=!0,f=x,p=A;break}if(k===p){P=!0,p=x,f=A;break}k=k.sibling}if(!P){for(k=A.child;k;){if(k===f){P=!0,f=A,p=x;break}if(k===p){P=!0,p=A,f=x;break}k=k.sibling}if(!P)throw Error(r(189))}}if(f.alternate!==p)throw Error(r(190))}if(f.tag!==3)throw Error(r(188));return f.stateNode.current===f?a:s}function m(a){var s=a.tag;if(s===5||s===26||s===27||s===6)return a;for(a=a.child;a!==null;){if(s=m(a),s!==null)return s;a=a.sibling}return null}var h=Object.assign,y=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),T=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),I=Symbol.for("react.activity"),$=Symbol.for("react.memo_cache_sentinel"),F=Symbol.iterator;function z(a){return a===null||typeof a!="object"?null:(a=F&&a[F]||a["@@iterator"],typeof a=="function"?a:null)}var Y=Symbol.for("react.client.reference");function Q(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===Y?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case S:return"Fragment";case E:return"Profiler";case C:return"StrictMode";case N:return"Suspense";case _:return"SuspenseList";case I:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case w:return"Portal";case T:return a.displayName||"Context";case j:return(a._context.displayName||"Context")+".Consumer";case O:var s=a.render;return a=a.displayName,a||(a=s.displayName||s.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case M:return s=a.displayName||null,s!==null?s:Q(a.type)||"Memo";case R:s=a._payload,a=a._init;try{return Q(a(s))}catch{}}return null}var se=Array.isArray,L=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B={pending:!1,data:null,method:null,action:null},ae=[],G=-1;function D(a){return{current:a}}function V(a){0>G||(a.current=ae[G],ae[G]=null,G--)}function K(a,s){G++,ae[G]=a.current,a.current=s}var ee=D(null),he=D(null),ye=D(null),X=D(null);function me(a,s){switch(K(ye,s),K(he,a),K(ee,null),s.nodeType){case 9:case 11:a=(a=s.documentElement)&&(a=a.namespaceURI)?KO(a):0;break;default:if(a=s.tagName,s=s.namespaceURI)s=KO(s),a=GO(s,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}V(ee),K(ee,a)}function oe(){V(ee),V(he),V(ye)}function le(a){a.memoizedState!==null&&K(X,a);var s=ee.current,f=GO(s,a.type);s!==f&&(K(he,a),K(ee,f))}function ve(a){he.current===a&&(V(ee),V(he)),X.current===a&&(V(X),ff._currentValue=B)}var re,ze;function Ee(a){if(re===void 0)try{throw Error()}catch(f){var s=f.stack.trim().match(/\n( *(at )?)/);re=s&&s[1]||"",ze=-1<f.stack.indexOf(`
2
- at`)?" (<anonymous>)":-1<f.stack.indexOf("@")?"@unknown:0:0":""}return`
3
- `+re+a+ze}var Le=!1;function ot(a,s){if(!a||Le)return"";Le=!0;var f=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var p={DetermineComponentFrameRoot:function(){try{if(s){var fe=function(){throw Error()};if(Object.defineProperty(fe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(fe,[])}catch(ie){var ne=ie}Reflect.construct(a,[],fe)}else{try{fe.call()}catch(ie){ne=ie}a.call(fe.prototype)}}else{try{throw Error()}catch(ie){ne=ie}(fe=a())&&typeof fe.catch=="function"&&fe.catch(function(){})}}catch(ie){if(ie&&ne&&typeof ie.stack=="string")return[ie.stack,ne.stack]}return[null,null]}};p.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var x=Object.getOwnPropertyDescriptor(p.DetermineComponentFrameRoot,"name");x&&x.configurable&&Object.defineProperty(p.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var A=p.DetermineComponentFrameRoot(),P=A[0],k=A[1];if(P&&k){var U=P.split(`
4
- `),J=k.split(`
5
- `);for(x=p=0;p<U.length&&!U[p].includes("DetermineComponentFrameRoot");)p++;for(;x<J.length&&!J[x].includes("DetermineComponentFrameRoot");)x++;if(p===U.length||x===J.length)for(p=U.length-1,x=J.length-1;1<=p&&0<=x&&U[p]!==J[x];)x--;for(;1<=p&&0<=x;p--,x--)if(U[p]!==J[x]){if(p!==1||x!==1)do if(p--,x--,0>x||U[p]!==J[x]){var ue=`
6
- `+U[p].replace(" at new "," at ");return a.displayName&&ue.includes("<anonymous>")&&(ue=ue.replace("<anonymous>",a.displayName)),ue}while(1<=p&&0<=x);break}}}finally{Le=!1,Error.prepareStackTrace=f}return(f=a?a.displayName||a.name:"")?Ee(f):""}function Dt(a,s){switch(a.tag){case 26:case 27:case 5:return Ee(a.type);case 16:return Ee("Lazy");case 13:return a.child!==s&&s!==null?Ee("Suspense Fallback"):Ee("Suspense");case 19:return Ee("SuspenseList");case 0:case 15:return ot(a.type,!1);case 11:return ot(a.type.render,!1);case 1:return ot(a.type,!0);case 31:return Ee("Activity");default:return""}}function Hr(a){try{var s="",f=null;do s+=Dt(a,f),f=a,a=a.return;while(a);return s}catch(p){return`
7
- Error generating stack: `+p.message+`
8
- `+p.stack}}var En=Object.prototype.hasOwnProperty,$i=e.unstable_scheduleCallback,xa=e.unstable_cancelCallback,Gt=e.unstable_shouldYield,Kr=e.unstable_requestPaint,Wt=e.unstable_now,gs=e.unstable_getCurrentPriorityLevel,gi=e.unstable_ImmediatePriority,bo=e.unstable_UserBlockingPriority,vi=e.unstable_NormalPriority,wa=e.unstable_LowPriority,Er=e.unstable_IdlePriority,Sa=e.log,Zn=e.unstable_setDisableYieldValue,lr=null,Yt=null;function Qn(a){if(typeof Sa=="function"&&Zn(a),Yt&&typeof Yt.setStrictMode=="function")try{Yt.setStrictMode(lr,a)}catch{}}var Xt=Math.clz32?Math.clz32:ur,vs=Math.log,Aa=Math.LN2;function ur(a){return a>>>=0,a===0?32:31-(vs(a)/Aa|0)|0}var Bi=256,Ui=262144,yi=4194304;function cr(a){var s=a&42;if(s!==0)return s;switch(a&-a){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 a&261888;case 262144:case 524288:case 1048576:case 2097152:return a&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return a&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return a}}function we(a,s,f){var p=a.pendingLanes;if(p===0)return 0;var x=0,A=a.suspendedLanes,P=a.pingedLanes;a=a.warmLanes;var k=p&134217727;return k!==0?(p=k&~A,p!==0?x=cr(p):(P&=k,P!==0?x=cr(P):f||(f=k&~a,f!==0&&(x=cr(f))))):(k=p&~A,k!==0?x=cr(k):P!==0?x=cr(P):f||(f=p&~a,f!==0&&(x=cr(f)))),x===0?0:s!==0&&s!==x&&(s&A)===0&&(A=x&-x,f=s&-s,A>=f||A===32&&(f&4194048)!==0)?s:x}function st(a,s){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&s)===0}function lt(a,s){switch(a){case 1:case 2:case 4:case 8:case 64:return s+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 s+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 wt(){var a=yi;return yi<<=1,(yi&62914560)===0&&(yi=4194304),a}function jr(a){for(var s=[],f=0;31>f;f++)s.push(a);return s}function $e(a,s){a.pendingLanes|=s,s!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function Ft(a,s,f,p,x,A){var P=a.pendingLanes;a.pendingLanes=f,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=f,a.entangledLanes&=f,a.errorRecoveryDisabledLanes&=f,a.shellSuspendCounter=0;var k=a.entanglements,U=a.expirationTimes,J=a.hiddenUpdates;for(f=P&~f;0<f;){var ue=31-Xt(f),fe=1<<ue;k[ue]=0,U[ue]=-1;var ne=J[ue];if(ne!==null)for(J[ue]=null,ue=0;ue<ne.length;ue++){var ie=ne[ue];ie!==null&&(ie.lane&=-536870913)}f&=~fe}p!==0&&Ca(a,p,0),A!==0&&x===0&&a.tag!==0&&(a.suspendedLanes|=A&~(P&~s))}function Ca(a,s,f){a.pendingLanes|=s,a.suspendedLanes&=~s;var p=31-Xt(s);a.entangledLanes|=s,a.entanglements[p]=a.entanglements[p]|1073741824|f&261930}function jn(a,s){var f=a.entangledLanes|=s;for(a=a.entanglements;f;){var p=31-Xt(f),x=1<<p;x&s|a[p]&s&&(a[p]|=s),f&=~x}}function Fn(a,s){var f=s&-s;return f=(f&42)!==0?1:xo(f),(f&(a.suspendedLanes|s))!==0?0:f}function xo(a){switch(a){case 2:a=1;break;case 8:a=4;break;case 32:a=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:a=128;break;case 268435456:a=134217728;break;default:a=0}return a}function Tr(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function Ac(){var a=q.p;return a!==0?a:(a=window.event,a===void 0?32:gP(a.type))}function nh(a,s){var f=q.p;try{return q.p=a,s()}finally{q.p=f}}var Vi=Math.random().toString(36).slice(2),un="__reactFiber$"+Vi,qn="__reactProps$"+Vi,wo="__reactContainer$"+Vi,Cc="__reactEvents$"+Vi,ty="__reactListeners$"+Vi,ny="__reactHandles$"+Vi,rh="__reactResources$"+Vi,ys="__reactMarker$"+Vi;function Ec(a){delete a[un],delete a[qn],delete a[Cc],delete a[ty],delete a[ny]}function So(a){var s=a[un];if(s)return s;for(var f=a.parentNode;f;){if(s=f[wo]||f[un]){if(f=s.alternate,s.child!==null||f!==null&&f.child!==null)for(a=eP(a);a!==null;){if(f=a[un])return f;a=eP(a)}return s}a=f,f=a.parentNode}return null}function Ao(a){if(a=a[un]||a[wo]){var s=a.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return a}return null}function je(a){var s=a.tag;if(s===5||s===26||s===27||s===6)return a.stateNode;throw Error(r(33))}function _e(a){var s=a[rh];return s||(s=a[rh]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function Je(a){a[ys]=!0}var ih=new Set,jc={};function Ea(a,s){ja(a,s),ja(a+"Capture",s)}function ja(a,s){for(jc[a]=s,a=0;a<s.length;a++)ih.add(s[a])}var XV=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]*$"),LE={},IE={};function ZV(a){return En.call(IE,a)?!0:En.call(LE,a)?!1:XV.test(a)?IE[a]=!0:(LE[a]=!0,!1)}function ah(a,s,f){if(ZV(s))if(f===null)a.removeAttribute(s);else{switch(typeof f){case"undefined":case"function":case"symbol":a.removeAttribute(s);return;case"boolean":var p=s.toLowerCase().slice(0,5);if(p!=="data-"&&p!=="aria-"){a.removeAttribute(s);return}}a.setAttribute(s,""+f)}}function oh(a,s,f){if(f===null)a.removeAttribute(s);else{switch(typeof f){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(s);return}a.setAttribute(s,""+f)}}function Ta(a,s,f,p){if(p===null)a.removeAttribute(f);else{switch(typeof p){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(f);return}a.setAttributeNS(s,f,""+p)}}function Gr(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function zE(a){var s=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function QV(a,s,f){var p=Object.getOwnPropertyDescriptor(a.constructor.prototype,s);if(!a.hasOwnProperty(s)&&typeof p<"u"&&typeof p.get=="function"&&typeof p.set=="function"){var x=p.get,A=p.set;return Object.defineProperty(a,s,{configurable:!0,get:function(){return x.call(this)},set:function(P){f=""+P,A.call(this,P)}}),Object.defineProperty(a,s,{enumerable:p.enumerable}),{getValue:function(){return f},setValue:function(P){f=""+P},stopTracking:function(){a._valueTracker=null,delete a[s]}}}}function ry(a){if(!a._valueTracker){var s=zE(a)?"checked":"value";a._valueTracker=QV(a,s,""+a[s])}}function $E(a){if(!a)return!1;var s=a._valueTracker;if(!s)return!0;var f=s.getValue(),p="";return a&&(p=zE(a)?a.checked?"true":"false":a.value),a=p,a!==f?(s.setValue(a),!0):!1}function sh(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}var JV=/[\n"\\]/g;function Wr(a){return a.replace(JV,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function iy(a,s,f,p,x,A,P,k){a.name="",P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?a.type=P:a.removeAttribute("type"),s!=null?P==="number"?(s===0&&a.value===""||a.value!=s)&&(a.value=""+Gr(s)):a.value!==""+Gr(s)&&(a.value=""+Gr(s)):P!=="submit"&&P!=="reset"||a.removeAttribute("value"),s!=null?ay(a,P,Gr(s)):f!=null?ay(a,P,Gr(f)):p!=null&&a.removeAttribute("value"),x==null&&A!=null&&(a.defaultChecked=!!A),x!=null&&(a.checked=x&&typeof x!="function"&&typeof x!="symbol"),k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?a.name=""+Gr(k):a.removeAttribute("name")}function BE(a,s,f,p,x,A,P,k){if(A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"&&(a.type=A),s!=null||f!=null){if(!(A!=="submit"&&A!=="reset"||s!=null)){ry(a);return}f=f!=null?""+Gr(f):"",s=s!=null?""+Gr(s):f,k||s===a.value||(a.value=s),a.defaultValue=s}p=p??x,p=typeof p!="function"&&typeof p!="symbol"&&!!p,a.checked=k?a.checked:!!p,a.defaultChecked=!!p,P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"&&(a.name=P),ry(a)}function ay(a,s,f){s==="number"&&sh(a.ownerDocument)===a||a.defaultValue===""+f||(a.defaultValue=""+f)}function _l(a,s,f,p){if(a=a.options,s){s={};for(var x=0;x<f.length;x++)s["$"+f[x]]=!0;for(f=0;f<a.length;f++)x=s.hasOwnProperty("$"+a[f].value),a[f].selected!==x&&(a[f].selected=x),x&&p&&(a[f].defaultSelected=!0)}else{for(f=""+Gr(f),s=null,x=0;x<a.length;x++){if(a[x].value===f){a[x].selected=!0,p&&(a[x].defaultSelected=!0);return}s!==null||a[x].disabled||(s=a[x])}s!==null&&(s.selected=!0)}}function UE(a,s,f){if(s!=null&&(s=""+Gr(s),s!==a.value&&(a.value=s),f==null)){a.defaultValue!==s&&(a.defaultValue=s);return}a.defaultValue=f!=null?""+Gr(f):""}function VE(a,s,f,p){if(s==null){if(p!=null){if(f!=null)throw Error(r(92));if(se(p)){if(1<p.length)throw Error(r(93));p=p[0]}f=p}f==null&&(f=""),s=f}f=Gr(s),a.defaultValue=f,p=a.textContent,p===f&&p!==""&&p!==null&&(a.value=p),ry(a)}function Ml(a,s){if(s){var f=a.firstChild;if(f&&f===a.lastChild&&f.nodeType===3){f.nodeValue=s;return}}a.textContent=s}var eF=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 FE(a,s,f){var p=s.indexOf("--")===0;f==null||typeof f=="boolean"||f===""?p?a.setProperty(s,""):s==="float"?a.cssFloat="":a[s]="":p?a.setProperty(s,f):typeof f!="number"||f===0||eF.has(s)?s==="float"?a.cssFloat=f:a[s]=(""+f).trim():a[s]=f+"px"}function qE(a,s,f){if(s!=null&&typeof s!="object")throw Error(r(62));if(a=a.style,f!=null){for(var p in f)!f.hasOwnProperty(p)||s!=null&&s.hasOwnProperty(p)||(p.indexOf("--")===0?a.setProperty(p,""):p==="float"?a.cssFloat="":a[p]="");for(var x in s)p=s[x],s.hasOwnProperty(x)&&f[x]!==p&&FE(a,x,p)}else for(var A in s)s.hasOwnProperty(A)&&FE(a,A,s[A])}function oy(a){if(a.indexOf("-")===-1)return!1;switch(a){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 tF=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"]]),nF=/^[\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 lh(a){return nF.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}function Oa(){}var sy=null;function ly(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var Rl=null,Dl=null;function HE(a){var s=Ao(a);if(s&&(a=s.stateNode)){var f=a[qn]||null;e:switch(a=s.stateNode,s.type){case"input":if(iy(a,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name),s=f.name,f.type==="radio"&&s!=null){for(f=a;f.parentNode;)f=f.parentNode;for(f=f.querySelectorAll('input[name="'+Wr(""+s)+'"][type="radio"]'),s=0;s<f.length;s++){var p=f[s];if(p!==a&&p.form===a.form){var x=p[qn]||null;if(!x)throw Error(r(90));iy(p,x.value,x.defaultValue,x.defaultValue,x.checked,x.defaultChecked,x.type,x.name)}}for(s=0;s<f.length;s++)p=f[s],p.form===a.form&&$E(p)}break e;case"textarea":UE(a,f.value,f.defaultValue);break e;case"select":s=f.value,s!=null&&_l(a,!!f.multiple,s,!1)}}}var uy=!1;function KE(a,s,f){if(uy)return a(s,f);uy=!0;try{var p=a(s);return p}finally{if(uy=!1,(Rl!==null||Dl!==null)&&(Yh(),Rl&&(s=Rl,a=Dl,Dl=Rl=null,HE(s),a)))for(s=0;s<a.length;s++)HE(a[s])}}function Tc(a,s){var f=a.stateNode;if(f===null)return null;var p=f[qn]||null;if(p===null)return null;f=p[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(p=!p.disabled)||(a=a.type,p=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!p;break e;default:a=!1}if(a)return null;if(f&&typeof f!="function")throw Error(r(231,s,typeof f));return f}var Pa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),cy=!1;if(Pa)try{var Oc={};Object.defineProperty(Oc,"passive",{get:function(){cy=!0}}),window.addEventListener("test",Oc,Oc),window.removeEventListener("test",Oc,Oc)}catch{cy=!1}var Co=null,fy=null,uh=null;function GE(){if(uh)return uh;var a,s=fy,f=s.length,p,x="value"in Co?Co.value:Co.textContent,A=x.length;for(a=0;a<f&&s[a]===x[a];a++);var P=f-a;for(p=1;p<=P&&s[f-p]===x[A-p];p++);return uh=x.slice(a,1<p?1-p:void 0)}function ch(a){var s=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&s===13&&(a=13)):a=s,a===10&&(a=13),32<=a||a===13?a:0}function fh(){return!0}function WE(){return!1}function fr(a){function s(f,p,x,A,P){this._reactName=f,this._targetInst=x,this.type=p,this.nativeEvent=A,this.target=P,this.currentTarget=null;for(var k in a)a.hasOwnProperty(k)&&(f=a[k],this[k]=f?f(A):A[k]);return this.isDefaultPrevented=(A.defaultPrevented!=null?A.defaultPrevented:A.returnValue===!1)?fh:WE,this.isPropagationStopped=WE,this}return h(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var f=this.nativeEvent;f&&(f.preventDefault?f.preventDefault():typeof f.returnValue!="unknown"&&(f.returnValue=!1),this.isDefaultPrevented=fh)},stopPropagation:function(){var f=this.nativeEvent;f&&(f.stopPropagation?f.stopPropagation():typeof f.cancelBubble!="unknown"&&(f.cancelBubble=!0),this.isPropagationStopped=fh)},persist:function(){},isPersistent:fh}),s}var bs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},dh=fr(bs),Pc=h({},bs,{view:0,detail:0}),rF=fr(Pc),dy,hy,Nc,hh=h({},Pc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:py,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==Nc&&(Nc&&a.type==="mousemove"?(dy=a.screenX-Nc.screenX,hy=a.screenY-Nc.screenY):hy=dy=0,Nc=a),dy)},movementY:function(a){return"movementY"in a?a.movementY:hy}}),YE=fr(hh),iF=h({},hh,{dataTransfer:0}),aF=fr(iF),oF=h({},Pc,{relatedTarget:0}),my=fr(oF),sF=h({},bs,{animationName:0,elapsedTime:0,pseudoElement:0}),lF=fr(sF),uF=h({},bs,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),cF=fr(uF),fF=h({},bs,{data:0}),XE=fr(fF),dF={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},hF={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"},mF={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function pF(a){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(a):(a=mF[a])?!!s[a]:!1}function py(){return pF}var gF=h({},Pc,{key:function(a){if(a.key){var s=dF[a.key]||a.key;if(s!=="Unidentified")return s}return a.type==="keypress"?(a=ch(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?hF[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:py,charCode:function(a){return a.type==="keypress"?ch(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?ch(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),vF=fr(gF),yF=h({},hh,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ZE=fr(yF),bF=h({},Pc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:py}),xF=fr(bF),wF=h({},bs,{propertyName:0,elapsedTime:0,pseudoElement:0}),SF=fr(wF),AF=h({},hh,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),CF=fr(AF),EF=h({},bs,{newState:0,oldState:0}),jF=fr(EF),TF=[9,13,27,32],gy=Pa&&"CompositionEvent"in window,_c=null;Pa&&"documentMode"in document&&(_c=document.documentMode);var OF=Pa&&"TextEvent"in window&&!_c,QE=Pa&&(!gy||_c&&8<_c&&11>=_c),JE=" ",ej=!1;function tj(a,s){switch(a){case"keyup":return TF.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function nj(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var kl=!1;function PF(a,s){switch(a){case"compositionend":return nj(s);case"keypress":return s.which!==32?null:(ej=!0,JE);case"textInput":return a=s.data,a===JE&&ej?null:a;default:return null}}function NF(a,s){if(kl)return a==="compositionend"||!gy&&tj(a,s)?(a=GE(),uh=fy=Co=null,kl=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return QE&&s.locale!=="ko"?null:s.data;default:return null}}var _F={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 rj(a){var s=a&&a.nodeName&&a.nodeName.toLowerCase();return s==="input"?!!_F[a.type]:s==="textarea"}function ij(a,s,f,p){Rl?Dl?Dl.push(p):Dl=[p]:Rl=p,s=nm(s,"onChange"),0<s.length&&(f=new dh("onChange","change",null,f,p),a.push({event:f,listeners:s}))}var Mc=null,Rc=null;function MF(a){BO(a,0)}function mh(a){var s=je(a);if($E(s))return a}function aj(a,s){if(a==="change")return s}var oj=!1;if(Pa){var vy;if(Pa){var yy="oninput"in document;if(!yy){var sj=document.createElement("div");sj.setAttribute("oninput","return;"),yy=typeof sj.oninput=="function"}vy=yy}else vy=!1;oj=vy&&(!document.documentMode||9<document.documentMode)}function lj(){Mc&&(Mc.detachEvent("onpropertychange",uj),Rc=Mc=null)}function uj(a){if(a.propertyName==="value"&&mh(Rc)){var s=[];ij(s,Rc,a,ly(a)),KE(MF,s)}}function RF(a,s,f){a==="focusin"?(lj(),Mc=s,Rc=f,Mc.attachEvent("onpropertychange",uj)):a==="focusout"&&lj()}function DF(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return mh(Rc)}function kF(a,s){if(a==="click")return mh(s)}function LF(a,s){if(a==="input"||a==="change")return mh(s)}function IF(a,s){return a===s&&(a!==0||1/a===1/s)||a!==a&&s!==s}var Or=typeof Object.is=="function"?Object.is:IF;function Dc(a,s){if(Or(a,s))return!0;if(typeof a!="object"||a===null||typeof s!="object"||s===null)return!1;var f=Object.keys(a),p=Object.keys(s);if(f.length!==p.length)return!1;for(p=0;p<f.length;p++){var x=f[p];if(!En.call(s,x)||!Or(a[x],s[x]))return!1}return!0}function cj(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function fj(a,s){var f=cj(a);a=0;for(var p;f;){if(f.nodeType===3){if(p=a+f.textContent.length,a<=s&&p>=s)return{node:f,offset:s-a};a=p}e:{for(;f;){if(f.nextSibling){f=f.nextSibling;break e}f=f.parentNode}f=void 0}f=cj(f)}}function dj(a,s){return a&&s?a===s?!0:a&&a.nodeType===3?!1:s&&s.nodeType===3?dj(a,s.parentNode):"contains"in a?a.contains(s):a.compareDocumentPosition?!!(a.compareDocumentPosition(s)&16):!1:!1}function hj(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var s=sh(a.document);s instanceof a.HTMLIFrameElement;){try{var f=typeof s.contentWindow.location.href=="string"}catch{f=!1}if(f)a=s.contentWindow;else break;s=sh(a.document)}return s}function by(a){var s=a&&a.nodeName&&a.nodeName.toLowerCase();return s&&(s==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||s==="textarea"||a.contentEditable==="true")}var zF=Pa&&"documentMode"in document&&11>=document.documentMode,Ll=null,xy=null,kc=null,wy=!1;function mj(a,s,f){var p=f.window===f?f.document:f.nodeType===9?f:f.ownerDocument;wy||Ll==null||Ll!==sh(p)||(p=Ll,"selectionStart"in p&&by(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focusNode:p.focusNode,focusOffset:p.focusOffset}),kc&&Dc(kc,p)||(kc=p,p=nm(xy,"onSelect"),0<p.length&&(s=new dh("onSelect","select",null,s,f),a.push({event:s,listeners:p}),s.target=Ll)))}function xs(a,s){var f={};return f[a.toLowerCase()]=s.toLowerCase(),f["Webkit"+a]="webkit"+s,f["Moz"+a]="moz"+s,f}var Il={animationend:xs("Animation","AnimationEnd"),animationiteration:xs("Animation","AnimationIteration"),animationstart:xs("Animation","AnimationStart"),transitionrun:xs("Transition","TransitionRun"),transitionstart:xs("Transition","TransitionStart"),transitioncancel:xs("Transition","TransitionCancel"),transitionend:xs("Transition","TransitionEnd")},Sy={},pj={};Pa&&(pj=document.createElement("div").style,"AnimationEvent"in window||(delete Il.animationend.animation,delete Il.animationiteration.animation,delete Il.animationstart.animation),"TransitionEvent"in window||delete Il.transitionend.transition);function ws(a){if(Sy[a])return Sy[a];if(!Il[a])return a;var s=Il[a],f;for(f in s)if(s.hasOwnProperty(f)&&f in pj)return Sy[a]=s[f];return a}var gj=ws("animationend"),vj=ws("animationiteration"),yj=ws("animationstart"),$F=ws("transitionrun"),BF=ws("transitionstart"),UF=ws("transitioncancel"),bj=ws("transitionend"),xj=new Map,Ay="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(" ");Ay.push("scrollEnd");function bi(a,s){xj.set(a,s),Ea(s,[a])}var ph=typeof reportError=="function"?reportError:function(a){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof a=="object"&&a!==null&&typeof a.message=="string"?String(a.message):String(a),error:a});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",a);return}console.error(a)},Yr=[],zl=0,Cy=0;function gh(){for(var a=zl,s=Cy=zl=0;s<a;){var f=Yr[s];Yr[s++]=null;var p=Yr[s];Yr[s++]=null;var x=Yr[s];Yr[s++]=null;var A=Yr[s];if(Yr[s++]=null,p!==null&&x!==null){var P=p.pending;P===null?x.next=x:(x.next=P.next,P.next=x),p.pending=x}A!==0&&wj(f,x,A)}}function vh(a,s,f,p){Yr[zl++]=a,Yr[zl++]=s,Yr[zl++]=f,Yr[zl++]=p,Cy|=p,a.lanes|=p,a=a.alternate,a!==null&&(a.lanes|=p)}function Ey(a,s,f,p){return vh(a,s,f,p),yh(a)}function Ss(a,s){return vh(a,null,null,s),yh(a)}function wj(a,s,f){a.lanes|=f;var p=a.alternate;p!==null&&(p.lanes|=f);for(var x=!1,A=a.return;A!==null;)A.childLanes|=f,p=A.alternate,p!==null&&(p.childLanes|=f),A.tag===22&&(a=A.stateNode,a===null||a._visibility&1||(x=!0)),a=A,A=A.return;return a.tag===3?(A=a.stateNode,x&&s!==null&&(x=31-Xt(f),a=A.hiddenUpdates,p=a[x],p===null?a[x]=[s]:p.push(s),s.lane=f|536870912),A):null}function yh(a){if(50<rf)throw rf=0,Db=null,Error(r(185));for(var s=a.return;s!==null;)a=s,s=a.return;return a.tag===3?a.stateNode:null}var $l={};function VF(a,s,f,p){this.tag=a,this.key=f,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Pr(a,s,f,p){return new VF(a,s,f,p)}function jy(a){return a=a.prototype,!(!a||!a.isReactComponent)}function Na(a,s){var f=a.alternate;return f===null?(f=Pr(a.tag,s,a.key,a.mode),f.elementType=a.elementType,f.type=a.type,f.stateNode=a.stateNode,f.alternate=a,a.alternate=f):(f.pendingProps=s,f.type=a.type,f.flags=0,f.subtreeFlags=0,f.deletions=null),f.flags=a.flags&65011712,f.childLanes=a.childLanes,f.lanes=a.lanes,f.child=a.child,f.memoizedProps=a.memoizedProps,f.memoizedState=a.memoizedState,f.updateQueue=a.updateQueue,s=a.dependencies,f.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},f.sibling=a.sibling,f.index=a.index,f.ref=a.ref,f.refCleanup=a.refCleanup,f}function Sj(a,s){a.flags&=65011714;var f=a.alternate;return f===null?(a.childLanes=0,a.lanes=s,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=f.childLanes,a.lanes=f.lanes,a.child=f.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=f.memoizedProps,a.memoizedState=f.memoizedState,a.updateQueue=f.updateQueue,a.type=f.type,s=f.dependencies,a.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),a}function bh(a,s,f,p,x,A){var P=0;if(p=a,typeof a=="function")jy(a)&&(P=1);else if(typeof a=="string")P=G8(a,f,ee.current)?26:a==="html"||a==="head"||a==="body"?27:5;else e:switch(a){case I:return a=Pr(31,f,s,x),a.elementType=I,a.lanes=A,a;case S:return As(f.children,x,A,s);case C:P=8,x|=24;break;case E:return a=Pr(12,f,s,x|2),a.elementType=E,a.lanes=A,a;case N:return a=Pr(13,f,s,x),a.elementType=N,a.lanes=A,a;case _:return a=Pr(19,f,s,x),a.elementType=_,a.lanes=A,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case T:P=10;break e;case j:P=9;break e;case O:P=11;break e;case M:P=14;break e;case R:P=16,p=null;break e}P=29,f=Error(r(130,a===null?"null":typeof a,"")),p=null}return s=Pr(P,f,s,x),s.elementType=a,s.type=p,s.lanes=A,s}function As(a,s,f,p){return a=Pr(7,a,p,s),a.lanes=f,a}function Ty(a,s,f){return a=Pr(6,a,null,s),a.lanes=f,a}function Aj(a){var s=Pr(18,null,null,0);return s.stateNode=a,s}function Oy(a,s,f){return s=Pr(4,a.children!==null?a.children:[],a.key,s),s.lanes=f,s.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},s}var Cj=new WeakMap;function Xr(a,s){if(typeof a=="object"&&a!==null){var f=Cj.get(a);return f!==void 0?f:(s={value:a,source:s,stack:Hr(s)},Cj.set(a,s),s)}return{value:a,source:s,stack:Hr(s)}}var Bl=[],Ul=0,xh=null,Lc=0,Zr=[],Qr=0,Eo=null,Fi=1,qi="";function _a(a,s){Bl[Ul++]=Lc,Bl[Ul++]=xh,xh=a,Lc=s}function Ej(a,s,f){Zr[Qr++]=Fi,Zr[Qr++]=qi,Zr[Qr++]=Eo,Eo=a;var p=Fi;a=qi;var x=32-Xt(p)-1;p&=~(1<<x),f+=1;var A=32-Xt(s)+x;if(30<A){var P=x-x%5;A=(p&(1<<P)-1).toString(32),p>>=P,x-=P,Fi=1<<32-Xt(s)+x|f<<x|p,qi=A+a}else Fi=1<<A|f<<x|p,qi=a}function Py(a){a.return!==null&&(_a(a,1),Ej(a,1,0))}function Ny(a){for(;a===xh;)xh=Bl[--Ul],Bl[Ul]=null,Lc=Bl[--Ul],Bl[Ul]=null;for(;a===Eo;)Eo=Zr[--Qr],Zr[Qr]=null,qi=Zr[--Qr],Zr[Qr]=null,Fi=Zr[--Qr],Zr[Qr]=null}function jj(a,s){Zr[Qr++]=Fi,Zr[Qr++]=qi,Zr[Qr++]=Eo,Fi=s.id,qi=s.overflow,Eo=a}var Tn=null,St=null,Xe=!1,jo=null,Jr=!1,_y=Error(r(519));function To(a){var s=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ic(Xr(s,a)),_y}function Tj(a){var s=a.stateNode,f=a.type,p=a.memoizedProps;switch(s[un]=a,s[qn]=p,f){case"dialog":Ke("cancel",s),Ke("close",s);break;case"iframe":case"object":case"embed":Ke("load",s);break;case"video":case"audio":for(f=0;f<of.length;f++)Ke(of[f],s);break;case"source":Ke("error",s);break;case"img":case"image":case"link":Ke("error",s),Ke("load",s);break;case"details":Ke("toggle",s);break;case"input":Ke("invalid",s),BE(s,p.value,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name,!0);break;case"select":Ke("invalid",s);break;case"textarea":Ke("invalid",s),VE(s,p.value,p.defaultValue,p.children)}f=p.children,typeof f!="string"&&typeof f!="number"&&typeof f!="bigint"||s.textContent===""+f||p.suppressHydrationWarning===!0||qO(s.textContent,f)?(p.popover!=null&&(Ke("beforetoggle",s),Ke("toggle",s)),p.onScroll!=null&&Ke("scroll",s),p.onScrollEnd!=null&&Ke("scrollend",s),p.onClick!=null&&(s.onclick=Oa),s=!0):s=!1,s||To(a,!0)}function Oj(a){for(Tn=a.return;Tn;)switch(Tn.tag){case 5:case 31:case 13:Jr=!1;return;case 27:case 3:Jr=!0;return;default:Tn=Tn.return}}function Vl(a){if(a!==Tn)return!1;if(!Xe)return Oj(a),Xe=!0,!1;var s=a.tag,f;if((f=s!==3&&s!==27)&&((f=s===5)&&(f=a.type,f=!(f!=="form"&&f!=="button")||Yb(a.type,a.memoizedProps)),f=!f),f&&St&&To(a),Oj(a),s===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));St=JO(a)}else if(s===31){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));St=JO(a)}else s===27?(s=St,Uo(a.type)?(a=e0,e0=null,St=a):St=s):St=Tn?ti(a.stateNode.nextSibling):null;return!0}function Cs(){St=Tn=null,Xe=!1}function My(){var a=jo;return a!==null&&(pr===null?pr=a:pr.push.apply(pr,a),jo=null),a}function Ic(a){jo===null?jo=[a]:jo.push(a)}var Ry=D(null),Es=null,Ma=null;function Oo(a,s,f){K(Ry,s._currentValue),s._currentValue=f}function Ra(a){a._currentValue=Ry.current,V(Ry)}function Dy(a,s,f){for(;a!==null;){var p=a.alternate;if((a.childLanes&s)!==s?(a.childLanes|=s,p!==null&&(p.childLanes|=s)):p!==null&&(p.childLanes&s)!==s&&(p.childLanes|=s),a===f)break;a=a.return}}function ky(a,s,f,p){var x=a.child;for(x!==null&&(x.return=a);x!==null;){var A=x.dependencies;if(A!==null){var P=x.child;A=A.firstContext;e:for(;A!==null;){var k=A;A=x;for(var U=0;U<s.length;U++)if(k.context===s[U]){A.lanes|=f,k=A.alternate,k!==null&&(k.lanes|=f),Dy(A.return,f,a),p||(P=null);break e}A=k.next}}else if(x.tag===18){if(P=x.return,P===null)throw Error(r(341));P.lanes|=f,A=P.alternate,A!==null&&(A.lanes|=f),Dy(P,f,a),P=null}else P=x.child;if(P!==null)P.return=x;else for(P=x;P!==null;){if(P===a){P=null;break}if(x=P.sibling,x!==null){x.return=P.return,P=x;break}P=P.return}x=P}}function Fl(a,s,f,p){a=null;for(var x=s,A=!1;x!==null;){if(!A){if((x.flags&524288)!==0)A=!0;else if((x.flags&262144)!==0)break}if(x.tag===10){var P=x.alternate;if(P===null)throw Error(r(387));if(P=P.memoizedProps,P!==null){var k=x.type;Or(x.pendingProps.value,P.value)||(a!==null?a.push(k):a=[k])}}else if(x===X.current){if(P=x.alternate,P===null)throw Error(r(387));P.memoizedState.memoizedState!==x.memoizedState.memoizedState&&(a!==null?a.push(ff):a=[ff])}x=x.return}a!==null&&ky(s,a,f,p),s.flags|=262144}function wh(a){for(a=a.firstContext;a!==null;){if(!Or(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function js(a){Es=a,Ma=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function On(a){return Pj(Es,a)}function Sh(a,s){return Es===null&&js(a),Pj(a,s)}function Pj(a,s){var f=s._currentValue;if(s={context:s,memoizedValue:f,next:null},Ma===null){if(a===null)throw Error(r(308));Ma=s,a.dependencies={lanes:0,firstContext:s},a.flags|=524288}else Ma=Ma.next=s;return f}var FF=typeof AbortController<"u"?AbortController:function(){var a=[],s=this.signal={aborted:!1,addEventListener:function(f,p){a.push(p)}};this.abort=function(){s.aborted=!0,a.forEach(function(f){return f()})}},qF=e.unstable_scheduleCallback,HF=e.unstable_NormalPriority,Zt={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ly(){return{controller:new FF,data:new Map,refCount:0}}function zc(a){a.refCount--,a.refCount===0&&qF(HF,function(){a.controller.abort()})}var $c=null,Iy=0,ql=0,Hl=null;function KF(a,s){if($c===null){var f=$c=[];Iy=0,ql=Bb(),Hl={status:"pending",value:void 0,then:function(p){f.push(p)}}}return Iy++,s.then(Nj,Nj),s}function Nj(){if(--Iy===0&&$c!==null){Hl!==null&&(Hl.status="fulfilled");var a=$c;$c=null,ql=0,Hl=null;for(var s=0;s<a.length;s++)(0,a[s])()}}function GF(a,s){var f=[],p={status:"pending",value:null,reason:null,then:function(x){f.push(x)}};return a.then(function(){p.status="fulfilled",p.value=s;for(var x=0;x<f.length;x++)(0,f[x])(s)},function(x){for(p.status="rejected",p.reason=x,x=0;x<f.length;x++)(0,f[x])(void 0)}),p}var _j=L.S;L.S=function(a,s){mO=Wt(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&KF(a,s),_j!==null&&_j(a,s)};var Ts=D(null);function zy(){var a=Ts.current;return a!==null?a:pt.pooledCache}function Ah(a,s){s===null?K(Ts,Ts.current):K(Ts,s.pool)}function Mj(){var a=zy();return a===null?null:{parent:Zt._currentValue,pool:a}}var Kl=Error(r(460)),$y=Error(r(474)),Ch=Error(r(542)),Eh={then:function(){}};function Rj(a){return a=a.status,a==="fulfilled"||a==="rejected"}function Dj(a,s,f){switch(f=a[f],f===void 0?a.push(s):f!==s&&(s.then(Oa,Oa),s=f),s.status){case"fulfilled":return s.value;case"rejected":throw a=s.reason,Lj(a),a;default:if(typeof s.status=="string")s.then(Oa,Oa);else{if(a=pt,a!==null&&100<a.shellSuspendCounter)throw Error(r(482));a=s,a.status="pending",a.then(function(p){if(s.status==="pending"){var x=s;x.status="fulfilled",x.value=p}},function(p){if(s.status==="pending"){var x=s;x.status="rejected",x.reason=p}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw a=s.reason,Lj(a),a}throw Ps=s,Kl}}function Os(a){try{var s=a._init;return s(a._payload)}catch(f){throw f!==null&&typeof f=="object"&&typeof f.then=="function"?(Ps=f,Kl):f}}var Ps=null;function kj(){if(Ps===null)throw Error(r(459));var a=Ps;return Ps=null,a}function Lj(a){if(a===Kl||a===Ch)throw Error(r(483))}var Gl=null,Bc=0;function jh(a){var s=Bc;return Bc+=1,Gl===null&&(Gl=[]),Dj(Gl,a,s)}function Uc(a,s){s=s.props.ref,a.ref=s!==void 0?s:null}function Th(a,s){throw s.$$typeof===y?Error(r(525)):(a=Object.prototype.toString.call(s),Error(r(31,a==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":a)))}function Ij(a){function s(W,H){if(a){var Z=W.deletions;Z===null?(W.deletions=[H],W.flags|=16):Z.push(H)}}function f(W,H){if(!a)return null;for(;H!==null;)s(W,H),H=H.sibling;return null}function p(W){for(var H=new Map;W!==null;)W.key!==null?H.set(W.key,W):H.set(W.index,W),W=W.sibling;return H}function x(W,H){return W=Na(W,H),W.index=0,W.sibling=null,W}function A(W,H,Z){return W.index=Z,a?(Z=W.alternate,Z!==null?(Z=Z.index,Z<H?(W.flags|=67108866,H):Z):(W.flags|=67108866,H)):(W.flags|=1048576,H)}function P(W){return a&&W.alternate===null&&(W.flags|=67108866),W}function k(W,H,Z,ce){return H===null||H.tag!==6?(H=Ty(Z,W.mode,ce),H.return=W,H):(H=x(H,Z),H.return=W,H)}function U(W,H,Z,ce){var Ne=Z.type;return Ne===S?ue(W,H,Z.props.children,ce,Z.key):H!==null&&(H.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===R&&Os(Ne)===H.type)?(H=x(H,Z.props),Uc(H,Z),H.return=W,H):(H=bh(Z.type,Z.key,Z.props,null,W.mode,ce),Uc(H,Z),H.return=W,H)}function J(W,H,Z,ce){return H===null||H.tag!==4||H.stateNode.containerInfo!==Z.containerInfo||H.stateNode.implementation!==Z.implementation?(H=Oy(Z,W.mode,ce),H.return=W,H):(H=x(H,Z.children||[]),H.return=W,H)}function ue(W,H,Z,ce,Ne){return H===null||H.tag!==7?(H=As(Z,W.mode,ce,Ne),H.return=W,H):(H=x(H,Z),H.return=W,H)}function fe(W,H,Z){if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return H=Ty(""+H,W.mode,Z),H.return=W,H;if(typeof H=="object"&&H!==null){switch(H.$$typeof){case b:return Z=bh(H.type,H.key,H.props,null,W.mode,Z),Uc(Z,H),Z.return=W,Z;case w:return H=Oy(H,W.mode,Z),H.return=W,H;case R:return H=Os(H),fe(W,H,Z)}if(se(H)||z(H))return H=As(H,W.mode,Z,null),H.return=W,H;if(typeof H.then=="function")return fe(W,jh(H),Z);if(H.$$typeof===T)return fe(W,Sh(W,H),Z);Th(W,H)}return null}function ne(W,H,Z,ce){var Ne=H!==null?H.key:null;if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return Ne!==null?null:k(W,H,""+Z,ce);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case b:return Z.key===Ne?U(W,H,Z,ce):null;case w:return Z.key===Ne?J(W,H,Z,ce):null;case R:return Z=Os(Z),ne(W,H,Z,ce)}if(se(Z)||z(Z))return Ne!==null?null:ue(W,H,Z,ce,null);if(typeof Z.then=="function")return ne(W,H,jh(Z),ce);if(Z.$$typeof===T)return ne(W,H,Sh(W,Z),ce);Th(W,Z)}return null}function ie(W,H,Z,ce,Ne){if(typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint")return W=W.get(Z)||null,k(H,W,""+ce,Ne);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case b:return W=W.get(ce.key===null?Z:ce.key)||null,U(H,W,ce,Ne);case w:return W=W.get(ce.key===null?Z:ce.key)||null,J(H,W,ce,Ne);case R:return ce=Os(ce),ie(W,H,Z,ce,Ne)}if(se(ce)||z(ce))return W=W.get(Z)||null,ue(H,W,ce,Ne,null);if(typeof ce.then=="function")return ie(W,H,Z,jh(ce),Ne);if(ce.$$typeof===T)return ie(W,H,Z,Sh(H,ce),Ne);Th(H,ce)}return null}function Se(W,H,Z,ce){for(var Ne=null,et=null,Te=H,Ue=H=0,We=null;Te!==null&&Ue<Z.length;Ue++){Te.index>Ue?(We=Te,Te=null):We=Te.sibling;var tt=ne(W,Te,Z[Ue],ce);if(tt===null){Te===null&&(Te=We);break}a&&Te&&tt.alternate===null&&s(W,Te),H=A(tt,H,Ue),et===null?Ne=tt:et.sibling=tt,et=tt,Te=We}if(Ue===Z.length)return f(W,Te),Xe&&_a(W,Ue),Ne;if(Te===null){for(;Ue<Z.length;Ue++)Te=fe(W,Z[Ue],ce),Te!==null&&(H=A(Te,H,Ue),et===null?Ne=Te:et.sibling=Te,et=Te);return Xe&&_a(W,Ue),Ne}for(Te=p(Te);Ue<Z.length;Ue++)We=ie(Te,W,Ue,Z[Ue],ce),We!==null&&(a&&We.alternate!==null&&Te.delete(We.key===null?Ue:We.key),H=A(We,H,Ue),et===null?Ne=We:et.sibling=We,et=We);return a&&Te.forEach(function(Ko){return s(W,Ko)}),Xe&&_a(W,Ue),Ne}function Re(W,H,Z,ce){if(Z==null)throw Error(r(151));for(var Ne=null,et=null,Te=H,Ue=H=0,We=null,tt=Z.next();Te!==null&&!tt.done;Ue++,tt=Z.next()){Te.index>Ue?(We=Te,Te=null):We=Te.sibling;var Ko=ne(W,Te,tt.value,ce);if(Ko===null){Te===null&&(Te=We);break}a&&Te&&Ko.alternate===null&&s(W,Te),H=A(Ko,H,Ue),et===null?Ne=Ko:et.sibling=Ko,et=Ko,Te=We}if(tt.done)return f(W,Te),Xe&&_a(W,Ue),Ne;if(Te===null){for(;!tt.done;Ue++,tt=Z.next())tt=fe(W,tt.value,ce),tt!==null&&(H=A(tt,H,Ue),et===null?Ne=tt:et.sibling=tt,et=tt);return Xe&&_a(W,Ue),Ne}for(Te=p(Te);!tt.done;Ue++,tt=Z.next())tt=ie(Te,W,Ue,tt.value,ce),tt!==null&&(a&&tt.alternate!==null&&Te.delete(tt.key===null?Ue:tt.key),H=A(tt,H,Ue),et===null?Ne=tt:et.sibling=tt,et=tt);return a&&Te.forEach(function(iq){return s(W,iq)}),Xe&&_a(W,Ue),Ne}function mt(W,H,Z,ce){if(typeof Z=="object"&&Z!==null&&Z.type===S&&Z.key===null&&(Z=Z.props.children),typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case b:e:{for(var Ne=Z.key;H!==null;){if(H.key===Ne){if(Ne=Z.type,Ne===S){if(H.tag===7){f(W,H.sibling),ce=x(H,Z.props.children),ce.return=W,W=ce;break e}}else if(H.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===R&&Os(Ne)===H.type){f(W,H.sibling),ce=x(H,Z.props),Uc(ce,Z),ce.return=W,W=ce;break e}f(W,H);break}else s(W,H);H=H.sibling}Z.type===S?(ce=As(Z.props.children,W.mode,ce,Z.key),ce.return=W,W=ce):(ce=bh(Z.type,Z.key,Z.props,null,W.mode,ce),Uc(ce,Z),ce.return=W,W=ce)}return P(W);case w:e:{for(Ne=Z.key;H!==null;){if(H.key===Ne)if(H.tag===4&&H.stateNode.containerInfo===Z.containerInfo&&H.stateNode.implementation===Z.implementation){f(W,H.sibling),ce=x(H,Z.children||[]),ce.return=W,W=ce;break e}else{f(W,H);break}else s(W,H);H=H.sibling}ce=Oy(Z,W.mode,ce),ce.return=W,W=ce}return P(W);case R:return Z=Os(Z),mt(W,H,Z,ce)}if(se(Z))return Se(W,H,Z,ce);if(z(Z)){if(Ne=z(Z),typeof Ne!="function")throw Error(r(150));return Z=Ne.call(Z),Re(W,H,Z,ce)}if(typeof Z.then=="function")return mt(W,H,jh(Z),ce);if(Z.$$typeof===T)return mt(W,H,Sh(W,Z),ce);Th(W,Z)}return typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint"?(Z=""+Z,H!==null&&H.tag===6?(f(W,H.sibling),ce=x(H,Z),ce.return=W,W=ce):(f(W,H),ce=Ty(Z,W.mode,ce),ce.return=W,W=ce),P(W)):f(W,H)}return function(W,H,Z,ce){try{Bc=0;var Ne=mt(W,H,Z,ce);return Gl=null,Ne}catch(Te){if(Te===Kl||Te===Ch)throw Te;var et=Pr(29,Te,null,W.mode);return et.lanes=ce,et.return=W,et}}}var Ns=Ij(!0),zj=Ij(!1),Po=!1;function By(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Uy(a,s){a=a.updateQueue,s.updateQueue===a&&(s.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function No(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function _o(a,s,f){var p=a.updateQueue;if(p===null)return null;if(p=p.shared,(it&2)!==0){var x=p.pending;return x===null?s.next=s:(s.next=x.next,x.next=s),p.pending=s,s=yh(a),wj(a,null,f),s}return vh(a,p,s,f),yh(a)}function Vc(a,s,f){if(s=s.updateQueue,s!==null&&(s=s.shared,(f&4194048)!==0)){var p=s.lanes;p&=a.pendingLanes,f|=p,s.lanes=f,jn(a,f)}}function Vy(a,s){var f=a.updateQueue,p=a.alternate;if(p!==null&&(p=p.updateQueue,f===p)){var x=null,A=null;if(f=f.firstBaseUpdate,f!==null){do{var P={lane:f.lane,tag:f.tag,payload:f.payload,callback:null,next:null};A===null?x=A=P:A=A.next=P,f=f.next}while(f!==null);A===null?x=A=s:A=A.next=s}else x=A=s;f={baseState:p.baseState,firstBaseUpdate:x,lastBaseUpdate:A,shared:p.shared,callbacks:p.callbacks},a.updateQueue=f;return}a=f.lastBaseUpdate,a===null?f.firstBaseUpdate=s:a.next=s,f.lastBaseUpdate=s}var Fy=!1;function Fc(){if(Fy){var a=Hl;if(a!==null)throw a}}function qc(a,s,f,p){Fy=!1;var x=a.updateQueue;Po=!1;var A=x.firstBaseUpdate,P=x.lastBaseUpdate,k=x.shared.pending;if(k!==null){x.shared.pending=null;var U=k,J=U.next;U.next=null,P===null?A=J:P.next=J,P=U;var ue=a.alternate;ue!==null&&(ue=ue.updateQueue,k=ue.lastBaseUpdate,k!==P&&(k===null?ue.firstBaseUpdate=J:k.next=J,ue.lastBaseUpdate=U))}if(A!==null){var fe=x.baseState;P=0,ue=J=U=null,k=A;do{var ne=k.lane&-536870913,ie=ne!==k.lane;if(ie?(Ge&ne)===ne:(p&ne)===ne){ne!==0&&ne===ql&&(Fy=!0),ue!==null&&(ue=ue.next={lane:0,tag:k.tag,payload:k.payload,callback:null,next:null});e:{var Se=a,Re=k;ne=s;var mt=f;switch(Re.tag){case 1:if(Se=Re.payload,typeof Se=="function"){fe=Se.call(mt,fe,ne);break e}fe=Se;break e;case 3:Se.flags=Se.flags&-65537|128;case 0:if(Se=Re.payload,ne=typeof Se=="function"?Se.call(mt,fe,ne):Se,ne==null)break e;fe=h({},fe,ne);break e;case 2:Po=!0}}ne=k.callback,ne!==null&&(a.flags|=64,ie&&(a.flags|=8192),ie=x.callbacks,ie===null?x.callbacks=[ne]:ie.push(ne))}else ie={lane:ne,tag:k.tag,payload:k.payload,callback:k.callback,next:null},ue===null?(J=ue=ie,U=fe):ue=ue.next=ie,P|=ne;if(k=k.next,k===null){if(k=x.shared.pending,k===null)break;ie=k,k=ie.next,ie.next=null,x.lastBaseUpdate=ie,x.shared.pending=null}}while(!0);ue===null&&(U=fe),x.baseState=U,x.firstBaseUpdate=J,x.lastBaseUpdate=ue,A===null&&(x.shared.lanes=0),Lo|=P,a.lanes=P,a.memoizedState=fe}}function $j(a,s){if(typeof a!="function")throw Error(r(191,a));a.call(s)}function Bj(a,s){var f=a.callbacks;if(f!==null)for(a.callbacks=null,a=0;a<f.length;a++)$j(f[a],s)}var Wl=D(null),Oh=D(0);function Uj(a,s){a=Va,K(Oh,a),K(Wl,s),Va=a|s.baseLanes}function qy(){K(Oh,Va),K(Wl,Wl.current)}function Hy(){Va=Oh.current,V(Wl),V(Oh)}var Nr=D(null),ei=null;function Mo(a){var s=a.alternate;K(qt,qt.current&1),K(Nr,a),ei===null&&(s===null||Wl.current!==null||s.memoizedState!==null)&&(ei=a)}function Ky(a){K(qt,qt.current),K(Nr,a),ei===null&&(ei=a)}function Vj(a){a.tag===22?(K(qt,qt.current),K(Nr,a),ei===null&&(ei=a)):Ro()}function Ro(){K(qt,qt.current),K(Nr,Nr.current)}function _r(a){V(Nr),ei===a&&(ei=null),V(qt)}var qt=D(0);function Ph(a){for(var s=a;s!==null;){if(s.tag===13){var f=s.memoizedState;if(f!==null&&(f=f.dehydrated,f===null||Qb(f)||Jb(f)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===a)break;for(;s.sibling===null;){if(s.return===null||s.return===a)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Da=0,Be=null,dt=null,Qt=null,Nh=!1,Yl=!1,_s=!1,_h=0,Hc=0,Xl=null,WF=0;function It(){throw Error(r(321))}function Gy(a,s){if(s===null)return!1;for(var f=0;f<s.length&&f<a.length;f++)if(!Or(a[f],s[f]))return!1;return!0}function Wy(a,s,f,p,x,A){return Da=A,Be=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,L.H=a===null||a.memoizedState===null?ET:ub,_s=!1,A=f(p,x),_s=!1,Yl&&(A=qj(s,f,p,x)),Fj(a),A}function Fj(a){L.H=Wc;var s=dt!==null&&dt.next!==null;if(Da=0,Qt=dt=Be=null,Nh=!1,Hc=0,Xl=null,s)throw Error(r(300));a===null||Jt||(a=a.dependencies,a!==null&&wh(a)&&(Jt=!0))}function qj(a,s,f,p){Be=a;var x=0;do{if(Yl&&(Xl=null),Hc=0,Yl=!1,25<=x)throw Error(r(301));if(x+=1,Qt=dt=null,a.updateQueue!=null){var A=a.updateQueue;A.lastEffect=null,A.events=null,A.stores=null,A.memoCache!=null&&(A.memoCache.index=0)}L.H=jT,A=s(f,p)}while(Yl);return A}function YF(){var a=L.H,s=a.useState()[0];return s=typeof s.then=="function"?Kc(s):s,a=a.useState()[0],(dt!==null?dt.memoizedState:null)!==a&&(Be.flags|=1024),s}function Yy(){var a=_h!==0;return _h=0,a}function Xy(a,s,f){s.updateQueue=a.updateQueue,s.flags&=-2053,a.lanes&=~f}function Zy(a){if(Nh){for(a=a.memoizedState;a!==null;){var s=a.queue;s!==null&&(s.pending=null),a=a.next}Nh=!1}Da=0,Qt=dt=Be=null,Yl=!1,Hc=_h=0,Xl=null}function Jn(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Qt===null?Be.memoizedState=Qt=a:Qt=Qt.next=a,Qt}function Ht(){if(dt===null){var a=Be.alternate;a=a!==null?a.memoizedState:null}else a=dt.next;var s=Qt===null?Be.memoizedState:Qt.next;if(s!==null)Qt=s,dt=a;else{if(a===null)throw Be.alternate===null?Error(r(467)):Error(r(310));dt=a,a={memoizedState:dt.memoizedState,baseState:dt.baseState,baseQueue:dt.baseQueue,queue:dt.queue,next:null},Qt===null?Be.memoizedState=Qt=a:Qt=Qt.next=a}return Qt}function Mh(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Kc(a){var s=Hc;return Hc+=1,Xl===null&&(Xl=[]),a=Dj(Xl,a,s),s=Be,(Qt===null?s.memoizedState:Qt.next)===null&&(s=s.alternate,L.H=s===null||s.memoizedState===null?ET:ub),a}function Rh(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return Kc(a);if(a.$$typeof===T)return On(a)}throw Error(r(438,String(a)))}function Qy(a){var s=null,f=Be.updateQueue;if(f!==null&&(s=f.memoCache),s==null){var p=Be.alternate;p!==null&&(p=p.updateQueue,p!==null&&(p=p.memoCache,p!=null&&(s={data:p.data.map(function(x){return x.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),f===null&&(f=Mh(),Be.updateQueue=f),f.memoCache=s,f=s.data[s.index],f===void 0)for(f=s.data[s.index]=Array(a),p=0;p<a;p++)f[p]=$;return s.index++,f}function ka(a,s){return typeof s=="function"?s(a):s}function Dh(a){var s=Ht();return Jy(s,dt,a)}function Jy(a,s,f){var p=a.queue;if(p===null)throw Error(r(311));p.lastRenderedReducer=f;var x=a.baseQueue,A=p.pending;if(A!==null){if(x!==null){var P=x.next;x.next=A.next,A.next=P}s.baseQueue=x=A,p.pending=null}if(A=a.baseState,x===null)a.memoizedState=A;else{s=x.next;var k=P=null,U=null,J=s,ue=!1;do{var fe=J.lane&-536870913;if(fe!==J.lane?(Ge&fe)===fe:(Da&fe)===fe){var ne=J.revertLane;if(ne===0)U!==null&&(U=U.next={lane:0,revertLane:0,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null}),fe===ql&&(ue=!0);else if((Da&ne)===ne){J=J.next,ne===ql&&(ue=!0);continue}else fe={lane:0,revertLane:J.revertLane,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},U===null?(k=U=fe,P=A):U=U.next=fe,Be.lanes|=ne,Lo|=ne;fe=J.action,_s&&f(A,fe),A=J.hasEagerState?J.eagerState:f(A,fe)}else ne={lane:fe,revertLane:J.revertLane,gesture:J.gesture,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},U===null?(k=U=ne,P=A):U=U.next=ne,Be.lanes|=fe,Lo|=fe;J=J.next}while(J!==null&&J!==s);if(U===null?P=A:U.next=k,!Or(A,a.memoizedState)&&(Jt=!0,ue&&(f=Hl,f!==null)))throw f;a.memoizedState=A,a.baseState=P,a.baseQueue=U,p.lastRenderedState=A}return x===null&&(p.lanes=0),[a.memoizedState,p.dispatch]}function eb(a){var s=Ht(),f=s.queue;if(f===null)throw Error(r(311));f.lastRenderedReducer=a;var p=f.dispatch,x=f.pending,A=s.memoizedState;if(x!==null){f.pending=null;var P=x=x.next;do A=a(A,P.action),P=P.next;while(P!==x);Or(A,s.memoizedState)||(Jt=!0),s.memoizedState=A,s.baseQueue===null&&(s.baseState=A),f.lastRenderedState=A}return[A,p]}function Hj(a,s,f){var p=Be,x=Ht(),A=Xe;if(A){if(f===void 0)throw Error(r(407));f=f()}else f=s();var P=!Or((dt||x).memoizedState,f);if(P&&(x.memoizedState=f,Jt=!0),x=x.queue,rb(Wj.bind(null,p,x,a),[a]),x.getSnapshot!==s||P||Qt!==null&&Qt.memoizedState.tag&1){if(p.flags|=2048,Zl(9,{destroy:void 0},Gj.bind(null,p,x,f,s),null),pt===null)throw Error(r(349));A||(Da&127)!==0||Kj(p,s,f)}return f}function Kj(a,s,f){a.flags|=16384,a={getSnapshot:s,value:f},s=Be.updateQueue,s===null?(s=Mh(),Be.updateQueue=s,s.stores=[a]):(f=s.stores,f===null?s.stores=[a]:f.push(a))}function Gj(a,s,f,p){s.value=f,s.getSnapshot=p,Yj(s)&&Xj(a)}function Wj(a,s,f){return f(function(){Yj(s)&&Xj(a)})}function Yj(a){var s=a.getSnapshot;a=a.value;try{var f=s();return!Or(a,f)}catch{return!0}}function Xj(a){var s=Ss(a,2);s!==null&&gr(s,a,2)}function tb(a){var s=Jn();if(typeof a=="function"){var f=a;if(a=f(),_s){Qn(!0);try{f()}finally{Qn(!1)}}}return s.memoizedState=s.baseState=a,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ka,lastRenderedState:a},s}function Zj(a,s,f,p){return a.baseState=f,Jy(a,dt,typeof p=="function"?p:ka)}function XF(a,s,f,p,x){if(Ih(a))throw Error(r(485));if(a=s.action,a!==null){var A={payload:x,action:a,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(P){A.listeners.push(P)}};L.T!==null?f(!0):A.isTransition=!1,p(A),f=s.pending,f===null?(A.next=s.pending=A,Qj(s,A)):(A.next=f.next,s.pending=f.next=A)}}function Qj(a,s){var f=s.action,p=s.payload,x=a.state;if(s.isTransition){var A=L.T,P={};L.T=P;try{var k=f(x,p),U=L.S;U!==null&&U(P,k),Jj(a,s,k)}catch(J){nb(a,s,J)}finally{A!==null&&P.types!==null&&(A.types=P.types),L.T=A}}else try{A=f(x,p),Jj(a,s,A)}catch(J){nb(a,s,J)}}function Jj(a,s,f){f!==null&&typeof f=="object"&&typeof f.then=="function"?f.then(function(p){eT(a,s,p)},function(p){return nb(a,s,p)}):eT(a,s,f)}function eT(a,s,f){s.status="fulfilled",s.value=f,tT(s),a.state=f,s=a.pending,s!==null&&(f=s.next,f===s?a.pending=null:(f=f.next,s.next=f,Qj(a,f)))}function nb(a,s,f){var p=a.pending;if(a.pending=null,p!==null){p=p.next;do s.status="rejected",s.reason=f,tT(s),s=s.next;while(s!==p)}a.action=null}function tT(a){a=a.listeners;for(var s=0;s<a.length;s++)(0,a[s])()}function nT(a,s){return s}function rT(a,s){if(Xe){var f=pt.formState;if(f!==null){e:{var p=Be;if(Xe){if(St){t:{for(var x=St,A=Jr;x.nodeType!==8;){if(!A){x=null;break t}if(x=ti(x.nextSibling),x===null){x=null;break t}}A=x.data,x=A==="F!"||A==="F"?x:null}if(x){St=ti(x.nextSibling),p=x.data==="F!";break e}}To(p)}p=!1}p&&(s=f[0])}}return f=Jn(),f.memoizedState=f.baseState=s,p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:nT,lastRenderedState:s},f.queue=p,f=ST.bind(null,Be,p),p.dispatch=f,p=tb(!1),A=lb.bind(null,Be,!1,p.queue),p=Jn(),x={state:s,dispatch:null,action:a,pending:null},p.queue=x,f=XF.bind(null,Be,x,A,f),x.dispatch=f,p.memoizedState=a,[s,f,!1]}function iT(a){var s=Ht();return aT(s,dt,a)}function aT(a,s,f){if(s=Jy(a,s,nT)[0],a=Dh(ka)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var p=Kc(s)}catch(P){throw P===Kl?Ch:P}else p=s;s=Ht();var x=s.queue,A=x.dispatch;return f!==s.memoizedState&&(Be.flags|=2048,Zl(9,{destroy:void 0},ZF.bind(null,x,f),null)),[p,A,a]}function ZF(a,s){a.action=s}function oT(a){var s=Ht(),f=dt;if(f!==null)return aT(s,f,a);Ht(),s=s.memoizedState,f=Ht();var p=f.queue.dispatch;return f.memoizedState=a,[s,p,!1]}function Zl(a,s,f,p){return a={tag:a,create:f,deps:p,inst:s,next:null},s=Be.updateQueue,s===null&&(s=Mh(),Be.updateQueue=s),f=s.lastEffect,f===null?s.lastEffect=a.next=a:(p=f.next,f.next=a,a.next=p,s.lastEffect=a),a}function sT(){return Ht().memoizedState}function kh(a,s,f,p){var x=Jn();Be.flags|=a,x.memoizedState=Zl(1|s,{destroy:void 0},f,p===void 0?null:p)}function Lh(a,s,f,p){var x=Ht();p=p===void 0?null:p;var A=x.memoizedState.inst;dt!==null&&p!==null&&Gy(p,dt.memoizedState.deps)?x.memoizedState=Zl(s,A,f,p):(Be.flags|=a,x.memoizedState=Zl(1|s,A,f,p))}function lT(a,s){kh(8390656,8,a,s)}function rb(a,s){Lh(2048,8,a,s)}function QF(a){Be.flags|=4;var s=Be.updateQueue;if(s===null)s=Mh(),Be.updateQueue=s,s.events=[a];else{var f=s.events;f===null?s.events=[a]:f.push(a)}}function uT(a){var s=Ht().memoizedState;return QF({ref:s,nextImpl:a}),function(){if((it&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}function cT(a,s){return Lh(4,2,a,s)}function fT(a,s){return Lh(4,4,a,s)}function dT(a,s){if(typeof s=="function"){a=a();var f=s(a);return function(){typeof f=="function"?f():s(null)}}if(s!=null)return a=a(),s.current=a,function(){s.current=null}}function hT(a,s,f){f=f!=null?f.concat([a]):null,Lh(4,4,dT.bind(null,s,a),f)}function ib(){}function mT(a,s){var f=Ht();s=s===void 0?null:s;var p=f.memoizedState;return s!==null&&Gy(s,p[1])?p[0]:(f.memoizedState=[a,s],a)}function pT(a,s){var f=Ht();s=s===void 0?null:s;var p=f.memoizedState;if(s!==null&&Gy(s,p[1]))return p[0];if(p=a(),_s){Qn(!0);try{a()}finally{Qn(!1)}}return f.memoizedState=[p,s],p}function ab(a,s,f){return f===void 0||(Da&1073741824)!==0&&(Ge&261930)===0?a.memoizedState=s:(a.memoizedState=f,a=gO(),Be.lanes|=a,Lo|=a,f)}function gT(a,s,f,p){return Or(f,s)?f:Wl.current!==null?(a=ab(a,f,p),Or(a,s)||(Jt=!0),a):(Da&42)===0||(Da&1073741824)!==0&&(Ge&261930)===0?(Jt=!0,a.memoizedState=f):(a=gO(),Be.lanes|=a,Lo|=a,s)}function vT(a,s,f,p,x){var A=q.p;q.p=A!==0&&8>A?A:8;var P=L.T,k={};L.T=k,lb(a,!1,s,f);try{var U=x(),J=L.S;if(J!==null&&J(k,U),U!==null&&typeof U=="object"&&typeof U.then=="function"){var ue=GF(U,p);Gc(a,s,ue,Dr(a))}else Gc(a,s,p,Dr(a))}catch(fe){Gc(a,s,{then:function(){},status:"rejected",reason:fe},Dr())}finally{q.p=A,P!==null&&k.types!==null&&(P.types=k.types),L.T=P}}function JF(){}function ob(a,s,f,p){if(a.tag!==5)throw Error(r(476));var x=yT(a).queue;vT(a,x,s,B,f===null?JF:function(){return bT(a),f(p)})}function yT(a){var s=a.memoizedState;if(s!==null)return s;s={memoizedState:B,baseState:B,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ka,lastRenderedState:B},next:null};var f={};return s.next={memoizedState:f,baseState:f,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ka,lastRenderedState:f},next:null},a.memoizedState=s,a=a.alternate,a!==null&&(a.memoizedState=s),s}function bT(a){var s=yT(a);s.next===null&&(s=a.alternate.memoizedState),Gc(a,s.next.queue,{},Dr())}function sb(){return On(ff)}function xT(){return Ht().memoizedState}function wT(){return Ht().memoizedState}function e8(a){for(var s=a.return;s!==null;){switch(s.tag){case 24:case 3:var f=Dr();a=No(f);var p=_o(s,a,f);p!==null&&(gr(p,s,f),Vc(p,s,f)),s={cache:Ly()},a.payload=s;return}s=s.return}}function t8(a,s,f){var p=Dr();f={lane:p,revertLane:0,gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null},Ih(a)?AT(s,f):(f=Ey(a,s,f,p),f!==null&&(gr(f,a,p),CT(f,s,p)))}function ST(a,s,f){var p=Dr();Gc(a,s,f,p)}function Gc(a,s,f,p){var x={lane:p,revertLane:0,gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null};if(Ih(a))AT(s,x);else{var A=a.alternate;if(a.lanes===0&&(A===null||A.lanes===0)&&(A=s.lastRenderedReducer,A!==null))try{var P=s.lastRenderedState,k=A(P,f);if(x.hasEagerState=!0,x.eagerState=k,Or(k,P))return vh(a,s,x,0),pt===null&&gh(),!1}catch{}if(f=Ey(a,s,x,p),f!==null)return gr(f,a,p),CT(f,s,p),!0}return!1}function lb(a,s,f,p){if(p={lane:2,revertLane:Bb(),gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},Ih(a)){if(s)throw Error(r(479))}else s=Ey(a,f,p,2),s!==null&&gr(s,a,2)}function Ih(a){var s=a.alternate;return a===Be||s!==null&&s===Be}function AT(a,s){Yl=Nh=!0;var f=a.pending;f===null?s.next=s:(s.next=f.next,f.next=s),a.pending=s}function CT(a,s,f){if((f&4194048)!==0){var p=s.lanes;p&=a.pendingLanes,f|=p,s.lanes=f,jn(a,f)}}var Wc={readContext:On,use:Rh,useCallback:It,useContext:It,useEffect:It,useImperativeHandle:It,useLayoutEffect:It,useInsertionEffect:It,useMemo:It,useReducer:It,useRef:It,useState:It,useDebugValue:It,useDeferredValue:It,useTransition:It,useSyncExternalStore:It,useId:It,useHostTransitionStatus:It,useFormState:It,useActionState:It,useOptimistic:It,useMemoCache:It,useCacheRefresh:It};Wc.useEffectEvent=It;var ET={readContext:On,use:Rh,useCallback:function(a,s){return Jn().memoizedState=[a,s===void 0?null:s],a},useContext:On,useEffect:lT,useImperativeHandle:function(a,s,f){f=f!=null?f.concat([a]):null,kh(4194308,4,dT.bind(null,s,a),f)},useLayoutEffect:function(a,s){return kh(4194308,4,a,s)},useInsertionEffect:function(a,s){kh(4,2,a,s)},useMemo:function(a,s){var f=Jn();s=s===void 0?null:s;var p=a();if(_s){Qn(!0);try{a()}finally{Qn(!1)}}return f.memoizedState=[p,s],p},useReducer:function(a,s,f){var p=Jn();if(f!==void 0){var x=f(s);if(_s){Qn(!0);try{f(s)}finally{Qn(!1)}}}else x=s;return p.memoizedState=p.baseState=x,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:x},p.queue=a,a=a.dispatch=t8.bind(null,Be,a),[p.memoizedState,a]},useRef:function(a){var s=Jn();return a={current:a},s.memoizedState=a},useState:function(a){a=tb(a);var s=a.queue,f=ST.bind(null,Be,s);return s.dispatch=f,[a.memoizedState,f]},useDebugValue:ib,useDeferredValue:function(a,s){var f=Jn();return ab(f,a,s)},useTransition:function(){var a=tb(!1);return a=vT.bind(null,Be,a.queue,!0,!1),Jn().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,s,f){var p=Be,x=Jn();if(Xe){if(f===void 0)throw Error(r(407));f=f()}else{if(f=s(),pt===null)throw Error(r(349));(Ge&127)!==0||Kj(p,s,f)}x.memoizedState=f;var A={value:f,getSnapshot:s};return x.queue=A,lT(Wj.bind(null,p,A,a),[a]),p.flags|=2048,Zl(9,{destroy:void 0},Gj.bind(null,p,A,f,s),null),f},useId:function(){var a=Jn(),s=pt.identifierPrefix;if(Xe){var f=qi,p=Fi;f=(p&~(1<<32-Xt(p)-1)).toString(32)+f,s="_"+s+"R_"+f,f=_h++,0<f&&(s+="H"+f.toString(32)),s+="_"}else f=WF++,s="_"+s+"r_"+f.toString(32)+"_";return a.memoizedState=s},useHostTransitionStatus:sb,useFormState:rT,useActionState:rT,useOptimistic:function(a){var s=Jn();s.memoizedState=s.baseState=a;var f={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=f,s=lb.bind(null,Be,!0,f),f.dispatch=s,[a,s]},useMemoCache:Qy,useCacheRefresh:function(){return Jn().memoizedState=e8.bind(null,Be)},useEffectEvent:function(a){var s=Jn(),f={impl:a};return s.memoizedState=f,function(){if((it&2)!==0)throw Error(r(440));return f.impl.apply(void 0,arguments)}}},ub={readContext:On,use:Rh,useCallback:mT,useContext:On,useEffect:rb,useImperativeHandle:hT,useInsertionEffect:cT,useLayoutEffect:fT,useMemo:pT,useReducer:Dh,useRef:sT,useState:function(){return Dh(ka)},useDebugValue:ib,useDeferredValue:function(a,s){var f=Ht();return gT(f,dt.memoizedState,a,s)},useTransition:function(){var a=Dh(ka)[0],s=Ht().memoizedState;return[typeof a=="boolean"?a:Kc(a),s]},useSyncExternalStore:Hj,useId:xT,useHostTransitionStatus:sb,useFormState:iT,useActionState:iT,useOptimistic:function(a,s){var f=Ht();return Zj(f,dt,a,s)},useMemoCache:Qy,useCacheRefresh:wT};ub.useEffectEvent=uT;var jT={readContext:On,use:Rh,useCallback:mT,useContext:On,useEffect:rb,useImperativeHandle:hT,useInsertionEffect:cT,useLayoutEffect:fT,useMemo:pT,useReducer:eb,useRef:sT,useState:function(){return eb(ka)},useDebugValue:ib,useDeferredValue:function(a,s){var f=Ht();return dt===null?ab(f,a,s):gT(f,dt.memoizedState,a,s)},useTransition:function(){var a=eb(ka)[0],s=Ht().memoizedState;return[typeof a=="boolean"?a:Kc(a),s]},useSyncExternalStore:Hj,useId:xT,useHostTransitionStatus:sb,useFormState:oT,useActionState:oT,useOptimistic:function(a,s){var f=Ht();return dt!==null?Zj(f,dt,a,s):(f.baseState=a,[a,f.queue.dispatch])},useMemoCache:Qy,useCacheRefresh:wT};jT.useEffectEvent=uT;function cb(a,s,f,p){s=a.memoizedState,f=f(p,s),f=f==null?s:h({},s,f),a.memoizedState=f,a.lanes===0&&(a.updateQueue.baseState=f)}var fb={enqueueSetState:function(a,s,f){a=a._reactInternals;var p=Dr(),x=No(p);x.payload=s,f!=null&&(x.callback=f),s=_o(a,x,p),s!==null&&(gr(s,a,p),Vc(s,a,p))},enqueueReplaceState:function(a,s,f){a=a._reactInternals;var p=Dr(),x=No(p);x.tag=1,x.payload=s,f!=null&&(x.callback=f),s=_o(a,x,p),s!==null&&(gr(s,a,p),Vc(s,a,p))},enqueueForceUpdate:function(a,s){a=a._reactInternals;var f=Dr(),p=No(f);p.tag=2,s!=null&&(p.callback=s),s=_o(a,p,f),s!==null&&(gr(s,a,f),Vc(s,a,f))}};function TT(a,s,f,p,x,A,P){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(p,A,P):s.prototype&&s.prototype.isPureReactComponent?!Dc(f,p)||!Dc(x,A):!0}function OT(a,s,f,p){a=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(f,p),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(f,p),s.state!==a&&fb.enqueueReplaceState(s,s.state,null)}function Ms(a,s){var f=s;if("ref"in s){f={};for(var p in s)p!=="ref"&&(f[p]=s[p])}if(a=a.defaultProps){f===s&&(f=h({},f));for(var x in a)f[x]===void 0&&(f[x]=a[x])}return f}function PT(a){ph(a)}function NT(a){console.error(a)}function _T(a){ph(a)}function zh(a,s){try{var f=a.onUncaughtError;f(s.value,{componentStack:s.stack})}catch(p){setTimeout(function(){throw p})}}function MT(a,s,f){try{var p=a.onCaughtError;p(f.value,{componentStack:f.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(x){setTimeout(function(){throw x})}}function db(a,s,f){return f=No(f),f.tag=3,f.payload={element:null},f.callback=function(){zh(a,s)},f}function RT(a){return a=No(a),a.tag=3,a}function DT(a,s,f,p){var x=f.type.getDerivedStateFromError;if(typeof x=="function"){var A=p.value;a.payload=function(){return x(A)},a.callback=function(){MT(s,f,p)}}var P=f.stateNode;P!==null&&typeof P.componentDidCatch=="function"&&(a.callback=function(){MT(s,f,p),typeof x!="function"&&(Io===null?Io=new Set([this]):Io.add(this));var k=p.stack;this.componentDidCatch(p.value,{componentStack:k!==null?k:""})})}function n8(a,s,f,p,x){if(f.flags|=32768,p!==null&&typeof p=="object"&&typeof p.then=="function"){if(s=f.alternate,s!==null&&Fl(s,f,x,!0),f=Nr.current,f!==null){switch(f.tag){case 31:case 13:return ei===null?Xh():f.alternate===null&&zt===0&&(zt=3),f.flags&=-257,f.flags|=65536,f.lanes=x,p===Eh?f.flags|=16384:(s=f.updateQueue,s===null?f.updateQueue=new Set([p]):s.add(p),Ib(a,p,x)),!1;case 22:return f.flags|=65536,p===Eh?f.flags|=16384:(s=f.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([p])},f.updateQueue=s):(f=s.retryQueue,f===null?s.retryQueue=new Set([p]):f.add(p)),Ib(a,p,x)),!1}throw Error(r(435,f.tag))}return Ib(a,p,x),Xh(),!1}if(Xe)return s=Nr.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=x,p!==_y&&(a=Error(r(422),{cause:p}),Ic(Xr(a,f)))):(p!==_y&&(s=Error(r(423),{cause:p}),Ic(Xr(s,f))),a=a.current.alternate,a.flags|=65536,x&=-x,a.lanes|=x,p=Xr(p,f),x=db(a.stateNode,p,x),Vy(a,x),zt!==4&&(zt=2)),!1;var A=Error(r(520),{cause:p});if(A=Xr(A,f),nf===null?nf=[A]:nf.push(A),zt!==4&&(zt=2),s===null)return!0;p=Xr(p,f),f=s;do{switch(f.tag){case 3:return f.flags|=65536,a=x&-x,f.lanes|=a,a=db(f.stateNode,p,a),Vy(f,a),!1;case 1:if(s=f.type,A=f.stateNode,(f.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||A!==null&&typeof A.componentDidCatch=="function"&&(Io===null||!Io.has(A))))return f.flags|=65536,x&=-x,f.lanes|=x,x=RT(x),DT(x,a,f,p),Vy(f,x),!1}f=f.return}while(f!==null);return!1}var hb=Error(r(461)),Jt=!1;function Pn(a,s,f,p){s.child=a===null?zj(s,null,f,p):Ns(s,a.child,f,p)}function kT(a,s,f,p,x){f=f.render;var A=s.ref;if("ref"in p){var P={};for(var k in p)k!=="ref"&&(P[k]=p[k])}else P=p;return js(s),p=Wy(a,s,f,P,A,x),k=Yy(),a!==null&&!Jt?(Xy(a,s,x),La(a,s,x)):(Xe&&k&&Py(s),s.flags|=1,Pn(a,s,p,x),s.child)}function LT(a,s,f,p,x){if(a===null){var A=f.type;return typeof A=="function"&&!jy(A)&&A.defaultProps===void 0&&f.compare===null?(s.tag=15,s.type=A,IT(a,s,A,p,x)):(a=bh(f.type,null,p,s,s.mode,x),a.ref=s.ref,a.return=s,s.child=a)}if(A=a.child,!wb(a,x)){var P=A.memoizedProps;if(f=f.compare,f=f!==null?f:Dc,f(P,p)&&a.ref===s.ref)return La(a,s,x)}return s.flags|=1,a=Na(A,p),a.ref=s.ref,a.return=s,s.child=a}function IT(a,s,f,p,x){if(a!==null){var A=a.memoizedProps;if(Dc(A,p)&&a.ref===s.ref)if(Jt=!1,s.pendingProps=p=A,wb(a,x))(a.flags&131072)!==0&&(Jt=!0);else return s.lanes=a.lanes,La(a,s,x)}return mb(a,s,f,p,x)}function zT(a,s,f,p){var x=p.children,A=a!==null?a.memoizedState:null;if(a===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),p.mode==="hidden"){if((s.flags&128)!==0){if(A=A!==null?A.baseLanes|f:f,a!==null){for(p=s.child=a.child,x=0;p!==null;)x=x|p.lanes|p.childLanes,p=p.sibling;p=x&~A}else p=0,s.child=null;return $T(a,s,A,f,p)}if((f&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},a!==null&&Ah(s,A!==null?A.cachePool:null),A!==null?Uj(s,A):qy(),Vj(s);else return p=s.lanes=536870912,$T(a,s,A!==null?A.baseLanes|f:f,f,p)}else A!==null?(Ah(s,A.cachePool),Uj(s,A),Ro(),s.memoizedState=null):(a!==null&&Ah(s,null),qy(),Ro());return Pn(a,s,x,f),s.child}function Yc(a,s){return a!==null&&a.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function $T(a,s,f,p,x){var A=zy();return A=A===null?null:{parent:Zt._currentValue,pool:A},s.memoizedState={baseLanes:f,cachePool:A},a!==null&&Ah(s,null),qy(),Vj(s),a!==null&&Fl(a,s,p,!0),s.childLanes=x,null}function $h(a,s){return s=Uh({mode:s.mode,children:s.children},a.mode),s.ref=a.ref,a.child=s,s.return=a,s}function BT(a,s,f){return Ns(s,a.child,null,f),a=$h(s,s.pendingProps),a.flags|=2,_r(s),s.memoizedState=null,a}function r8(a,s,f){var p=s.pendingProps,x=(s.flags&128)!==0;if(s.flags&=-129,a===null){if(Xe){if(p.mode==="hidden")return a=$h(s,p),s.lanes=536870912,Yc(null,a);if(Ky(s),(a=St)?(a=QO(a,Jr),a=a!==null&&a.data==="&"?a:null,a!==null&&(s.memoizedState={dehydrated:a,treeContext:Eo!==null?{id:Fi,overflow:qi}:null,retryLane:536870912,hydrationErrors:null},f=Aj(a),f.return=s,s.child=f,Tn=s,St=null)):a=null,a===null)throw To(s);return s.lanes=536870912,null}return $h(s,p)}var A=a.memoizedState;if(A!==null){var P=A.dehydrated;if(Ky(s),x)if(s.flags&256)s.flags&=-257,s=BT(a,s,f);else if(s.memoizedState!==null)s.child=a.child,s.flags|=128,s=null;else throw Error(r(558));else if(Jt||Fl(a,s,f,!1),x=(f&a.childLanes)!==0,Jt||x){if(p=pt,p!==null&&(P=Fn(p,f),P!==0&&P!==A.retryLane))throw A.retryLane=P,Ss(a,P),gr(p,a,P),hb;Xh(),s=BT(a,s,f)}else a=A.treeContext,St=ti(P.nextSibling),Tn=s,Xe=!0,jo=null,Jr=!1,a!==null&&jj(s,a),s=$h(s,p),s.flags|=4096;return s}return a=Na(a.child,{mode:p.mode,children:p.children}),a.ref=s.ref,s.child=a,a.return=s,a}function Bh(a,s){var f=s.ref;if(f===null)a!==null&&a.ref!==null&&(s.flags|=4194816);else{if(typeof f!="function"&&typeof f!="object")throw Error(r(284));(a===null||a.ref!==f)&&(s.flags|=4194816)}}function mb(a,s,f,p,x){return js(s),f=Wy(a,s,f,p,void 0,x),p=Yy(),a!==null&&!Jt?(Xy(a,s,x),La(a,s,x)):(Xe&&p&&Py(s),s.flags|=1,Pn(a,s,f,x),s.child)}function UT(a,s,f,p,x,A){return js(s),s.updateQueue=null,f=qj(s,p,f,x),Fj(a),p=Yy(),a!==null&&!Jt?(Xy(a,s,A),La(a,s,A)):(Xe&&p&&Py(s),s.flags|=1,Pn(a,s,f,A),s.child)}function VT(a,s,f,p,x){if(js(s),s.stateNode===null){var A=$l,P=f.contextType;typeof P=="object"&&P!==null&&(A=On(P)),A=new f(p,A),s.memoizedState=A.state!==null&&A.state!==void 0?A.state:null,A.updater=fb,s.stateNode=A,A._reactInternals=s,A=s.stateNode,A.props=p,A.state=s.memoizedState,A.refs={},By(s),P=f.contextType,A.context=typeof P=="object"&&P!==null?On(P):$l,A.state=s.memoizedState,P=f.getDerivedStateFromProps,typeof P=="function"&&(cb(s,f,P,p),A.state=s.memoizedState),typeof f.getDerivedStateFromProps=="function"||typeof A.getSnapshotBeforeUpdate=="function"||typeof A.UNSAFE_componentWillMount!="function"&&typeof A.componentWillMount!="function"||(P=A.state,typeof A.componentWillMount=="function"&&A.componentWillMount(),typeof A.UNSAFE_componentWillMount=="function"&&A.UNSAFE_componentWillMount(),P!==A.state&&fb.enqueueReplaceState(A,A.state,null),qc(s,p,A,x),Fc(),A.state=s.memoizedState),typeof A.componentDidMount=="function"&&(s.flags|=4194308),p=!0}else if(a===null){A=s.stateNode;var k=s.memoizedProps,U=Ms(f,k);A.props=U;var J=A.context,ue=f.contextType;P=$l,typeof ue=="object"&&ue!==null&&(P=On(ue));var fe=f.getDerivedStateFromProps;ue=typeof fe=="function"||typeof A.getSnapshotBeforeUpdate=="function",k=s.pendingProps!==k,ue||typeof A.UNSAFE_componentWillReceiveProps!="function"&&typeof A.componentWillReceiveProps!="function"||(k||J!==P)&&OT(s,A,p,P),Po=!1;var ne=s.memoizedState;A.state=ne,qc(s,p,A,x),Fc(),J=s.memoizedState,k||ne!==J||Po?(typeof fe=="function"&&(cb(s,f,fe,p),J=s.memoizedState),(U=Po||TT(s,f,U,p,ne,J,P))?(ue||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"&&(s.flags|=4194308)):(typeof A.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=p,s.memoizedState=J),A.props=p,A.state=J,A.context=P,p=U):(typeof A.componentDidMount=="function"&&(s.flags|=4194308),p=!1)}else{A=s.stateNode,Uy(a,s),P=s.memoizedProps,ue=Ms(f,P),A.props=ue,fe=s.pendingProps,ne=A.context,J=f.contextType,U=$l,typeof J=="object"&&J!==null&&(U=On(J)),k=f.getDerivedStateFromProps,(J=typeof k=="function"||typeof A.getSnapshotBeforeUpdate=="function")||typeof A.UNSAFE_componentWillReceiveProps!="function"&&typeof A.componentWillReceiveProps!="function"||(P!==fe||ne!==U)&&OT(s,A,p,U),Po=!1,ne=s.memoizedState,A.state=ne,qc(s,p,A,x),Fc();var ie=s.memoizedState;P!==fe||ne!==ie||Po||a!==null&&a.dependencies!==null&&wh(a.dependencies)?(typeof k=="function"&&(cb(s,f,k,p),ie=s.memoizedState),(ue=Po||TT(s,f,ue,p,ne,ie,U)||a!==null&&a.dependencies!==null&&wh(a.dependencies))?(J||typeof A.UNSAFE_componentWillUpdate!="function"&&typeof A.componentWillUpdate!="function"||(typeof A.componentWillUpdate=="function"&&A.componentWillUpdate(p,ie,U),typeof A.UNSAFE_componentWillUpdate=="function"&&A.UNSAFE_componentWillUpdate(p,ie,U)),typeof A.componentDidUpdate=="function"&&(s.flags|=4),typeof A.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof A.componentDidUpdate!="function"||P===a.memoizedProps&&ne===a.memoizedState||(s.flags|=4),typeof A.getSnapshotBeforeUpdate!="function"||P===a.memoizedProps&&ne===a.memoizedState||(s.flags|=1024),s.memoizedProps=p,s.memoizedState=ie),A.props=p,A.state=ie,A.context=U,p=ue):(typeof A.componentDidUpdate!="function"||P===a.memoizedProps&&ne===a.memoizedState||(s.flags|=4),typeof A.getSnapshotBeforeUpdate!="function"||P===a.memoizedProps&&ne===a.memoizedState||(s.flags|=1024),p=!1)}return A=p,Bh(a,s),p=(s.flags&128)!==0,A||p?(A=s.stateNode,f=p&&typeof f.getDerivedStateFromError!="function"?null:A.render(),s.flags|=1,a!==null&&p?(s.child=Ns(s,a.child,null,x),s.child=Ns(s,null,f,x)):Pn(a,s,f,x),s.memoizedState=A.state,a=s.child):a=La(a,s,x),a}function FT(a,s,f,p){return Cs(),s.flags|=256,Pn(a,s,f,p),s.child}var pb={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function gb(a){return{baseLanes:a,cachePool:Mj()}}function vb(a,s,f){return a=a!==null?a.childLanes&~f:0,s&&(a|=Rr),a}function qT(a,s,f){var p=s.pendingProps,x=!1,A=(s.flags&128)!==0,P;if((P=A)||(P=a!==null&&a.memoizedState===null?!1:(qt.current&2)!==0),P&&(x=!0,s.flags&=-129),P=(s.flags&32)!==0,s.flags&=-33,a===null){if(Xe){if(x?Mo(s):Ro(),(a=St)?(a=QO(a,Jr),a=a!==null&&a.data!=="&"?a:null,a!==null&&(s.memoizedState={dehydrated:a,treeContext:Eo!==null?{id:Fi,overflow:qi}:null,retryLane:536870912,hydrationErrors:null},f=Aj(a),f.return=s,s.child=f,Tn=s,St=null)):a=null,a===null)throw To(s);return Jb(a)?s.lanes=32:s.lanes=536870912,null}var k=p.children;return p=p.fallback,x?(Ro(),x=s.mode,k=Uh({mode:"hidden",children:k},x),p=As(p,x,f,null),k.return=s,p.return=s,k.sibling=p,s.child=k,p=s.child,p.memoizedState=gb(f),p.childLanes=vb(a,P,f),s.memoizedState=pb,Yc(null,p)):(Mo(s),yb(s,k))}var U=a.memoizedState;if(U!==null&&(k=U.dehydrated,k!==null)){if(A)s.flags&256?(Mo(s),s.flags&=-257,s=bb(a,s,f)):s.memoizedState!==null?(Ro(),s.child=a.child,s.flags|=128,s=null):(Ro(),k=p.fallback,x=s.mode,p=Uh({mode:"visible",children:p.children},x),k=As(k,x,f,null),k.flags|=2,p.return=s,k.return=s,p.sibling=k,s.child=p,Ns(s,a.child,null,f),p=s.child,p.memoizedState=gb(f),p.childLanes=vb(a,P,f),s.memoizedState=pb,s=Yc(null,p));else if(Mo(s),Jb(k)){if(P=k.nextSibling&&k.nextSibling.dataset,P)var J=P.dgst;P=J,p=Error(r(419)),p.stack="",p.digest=P,Ic({value:p,source:null,stack:null}),s=bb(a,s,f)}else if(Jt||Fl(a,s,f,!1),P=(f&a.childLanes)!==0,Jt||P){if(P=pt,P!==null&&(p=Fn(P,f),p!==0&&p!==U.retryLane))throw U.retryLane=p,Ss(a,p),gr(P,a,p),hb;Qb(k)||Xh(),s=bb(a,s,f)}else Qb(k)?(s.flags|=192,s.child=a.child,s=null):(a=U.treeContext,St=ti(k.nextSibling),Tn=s,Xe=!0,jo=null,Jr=!1,a!==null&&jj(s,a),s=yb(s,p.children),s.flags|=4096);return s}return x?(Ro(),k=p.fallback,x=s.mode,U=a.child,J=U.sibling,p=Na(U,{mode:"hidden",children:p.children}),p.subtreeFlags=U.subtreeFlags&65011712,J!==null?k=Na(J,k):(k=As(k,x,f,null),k.flags|=2),k.return=s,p.return=s,p.sibling=k,s.child=p,Yc(null,p),p=s.child,k=a.child.memoizedState,k===null?k=gb(f):(x=k.cachePool,x!==null?(U=Zt._currentValue,x=x.parent!==U?{parent:U,pool:U}:x):x=Mj(),k={baseLanes:k.baseLanes|f,cachePool:x}),p.memoizedState=k,p.childLanes=vb(a,P,f),s.memoizedState=pb,Yc(a.child,p)):(Mo(s),f=a.child,a=f.sibling,f=Na(f,{mode:"visible",children:p.children}),f.return=s,f.sibling=null,a!==null&&(P=s.deletions,P===null?(s.deletions=[a],s.flags|=16):P.push(a)),s.child=f,s.memoizedState=null,f)}function yb(a,s){return s=Uh({mode:"visible",children:s},a.mode),s.return=a,a.child=s}function Uh(a,s){return a=Pr(22,a,null,s),a.lanes=0,a}function bb(a,s,f){return Ns(s,a.child,null,f),a=yb(s,s.pendingProps.children),a.flags|=2,s.memoizedState=null,a}function HT(a,s,f){a.lanes|=s;var p=a.alternate;p!==null&&(p.lanes|=s),Dy(a.return,s,f)}function xb(a,s,f,p,x,A){var P=a.memoizedState;P===null?a.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:p,tail:f,tailMode:x,treeForkCount:A}:(P.isBackwards=s,P.rendering=null,P.renderingStartTime=0,P.last=p,P.tail=f,P.tailMode=x,P.treeForkCount=A)}function KT(a,s,f){var p=s.pendingProps,x=p.revealOrder,A=p.tail;p=p.children;var P=qt.current,k=(P&2)!==0;if(k?(P=P&1|2,s.flags|=128):P&=1,K(qt,P),Pn(a,s,p,f),p=Xe?Lc:0,!k&&a!==null&&(a.flags&128)!==0)e:for(a=s.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&HT(a,f,s);else if(a.tag===19)HT(a,f,s);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===s)break e;for(;a.sibling===null;){if(a.return===null||a.return===s)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}switch(x){case"forwards":for(f=s.child,x=null;f!==null;)a=f.alternate,a!==null&&Ph(a)===null&&(x=f),f=f.sibling;f=x,f===null?(x=s.child,s.child=null):(x=f.sibling,f.sibling=null),xb(s,!1,x,f,A,p);break;case"backwards":case"unstable_legacy-backwards":for(f=null,x=s.child,s.child=null;x!==null;){if(a=x.alternate,a!==null&&Ph(a)===null){s.child=x;break}a=x.sibling,x.sibling=f,f=x,x=a}xb(s,!0,f,null,A,p);break;case"together":xb(s,!1,null,null,void 0,p);break;default:s.memoizedState=null}return s.child}function La(a,s,f){if(a!==null&&(s.dependencies=a.dependencies),Lo|=s.lanes,(f&s.childLanes)===0)if(a!==null){if(Fl(a,s,f,!1),(f&s.childLanes)===0)return null}else return null;if(a!==null&&s.child!==a.child)throw Error(r(153));if(s.child!==null){for(a=s.child,f=Na(a,a.pendingProps),s.child=f,f.return=s;a.sibling!==null;)a=a.sibling,f=f.sibling=Na(a,a.pendingProps),f.return=s;f.sibling=null}return s.child}function wb(a,s){return(a.lanes&s)!==0?!0:(a=a.dependencies,!!(a!==null&&wh(a)))}function i8(a,s,f){switch(s.tag){case 3:me(s,s.stateNode.containerInfo),Oo(s,Zt,a.memoizedState.cache),Cs();break;case 27:case 5:le(s);break;case 4:me(s,s.stateNode.containerInfo);break;case 10:Oo(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,Ky(s),null;break;case 13:var p=s.memoizedState;if(p!==null)return p.dehydrated!==null?(Mo(s),s.flags|=128,null):(f&s.child.childLanes)!==0?qT(a,s,f):(Mo(s),a=La(a,s,f),a!==null?a.sibling:null);Mo(s);break;case 19:var x=(a.flags&128)!==0;if(p=(f&s.childLanes)!==0,p||(Fl(a,s,f,!1),p=(f&s.childLanes)!==0),x){if(p)return KT(a,s,f);s.flags|=128}if(x=s.memoizedState,x!==null&&(x.rendering=null,x.tail=null,x.lastEffect=null),K(qt,qt.current),p)break;return null;case 22:return s.lanes=0,zT(a,s,f,s.pendingProps);case 24:Oo(s,Zt,a.memoizedState.cache)}return La(a,s,f)}function GT(a,s,f){if(a!==null)if(a.memoizedProps!==s.pendingProps)Jt=!0;else{if(!wb(a,f)&&(s.flags&128)===0)return Jt=!1,i8(a,s,f);Jt=(a.flags&131072)!==0}else Jt=!1,Xe&&(s.flags&1048576)!==0&&Ej(s,Lc,s.index);switch(s.lanes=0,s.tag){case 16:e:{var p=s.pendingProps;if(a=Os(s.elementType),s.type=a,typeof a=="function")jy(a)?(p=Ms(a,p),s.tag=1,s=VT(null,s,a,p,f)):(s.tag=0,s=mb(null,s,a,p,f));else{if(a!=null){var x=a.$$typeof;if(x===O){s.tag=11,s=kT(null,s,a,p,f);break e}else if(x===M){s.tag=14,s=LT(null,s,a,p,f);break e}}throw s=Q(a)||a,Error(r(306,s,""))}}return s;case 0:return mb(a,s,s.type,s.pendingProps,f);case 1:return p=s.type,x=Ms(p,s.pendingProps),VT(a,s,p,x,f);case 3:e:{if(me(s,s.stateNode.containerInfo),a===null)throw Error(r(387));p=s.pendingProps;var A=s.memoizedState;x=A.element,Uy(a,s),qc(s,p,null,f);var P=s.memoizedState;if(p=P.cache,Oo(s,Zt,p),p!==A.cache&&ky(s,[Zt],f,!0),Fc(),p=P.element,A.isDehydrated)if(A={element:p,isDehydrated:!1,cache:P.cache},s.updateQueue.baseState=A,s.memoizedState=A,s.flags&256){s=FT(a,s,p,f);break e}else if(p!==x){x=Xr(Error(r(424)),s),Ic(x),s=FT(a,s,p,f);break e}else for(a=s.stateNode.containerInfo,a.nodeType===9?a=a.body:a=a.nodeName==="HTML"?a.ownerDocument.body:a,St=ti(a.firstChild),Tn=s,Xe=!0,jo=null,Jr=!0,f=zj(s,null,p,f),s.child=f;f;)f.flags=f.flags&-3|4096,f=f.sibling;else{if(Cs(),p===x){s=La(a,s,f);break e}Pn(a,s,p,f)}s=s.child}return s;case 26:return Bh(a,s),a===null?(f=iP(s.type,null,s.pendingProps,null))?s.memoizedState=f:Xe||(f=s.type,a=s.pendingProps,p=rm(ye.current).createElement(f),p[un]=s,p[qn]=a,Nn(p,f,a),Je(p),s.stateNode=p):s.memoizedState=iP(s.type,a.memoizedProps,s.pendingProps,a.memoizedState),null;case 27:return le(s),a===null&&Xe&&(p=s.stateNode=tP(s.type,s.pendingProps,ye.current),Tn=s,Jr=!0,x=St,Uo(s.type)?(e0=x,St=ti(p.firstChild)):St=x),Pn(a,s,s.pendingProps.children,f),Bh(a,s),a===null&&(s.flags|=4194304),s.child;case 5:return a===null&&Xe&&((x=p=St)&&(p=D8(p,s.type,s.pendingProps,Jr),p!==null?(s.stateNode=p,Tn=s,St=ti(p.firstChild),Jr=!1,x=!0):x=!1),x||To(s)),le(s),x=s.type,A=s.pendingProps,P=a!==null?a.memoizedProps:null,p=A.children,Yb(x,A)?p=null:P!==null&&Yb(x,P)&&(s.flags|=32),s.memoizedState!==null&&(x=Wy(a,s,YF,null,null,f),ff._currentValue=x),Bh(a,s),Pn(a,s,p,f),s.child;case 6:return a===null&&Xe&&((a=f=St)&&(f=k8(f,s.pendingProps,Jr),f!==null?(s.stateNode=f,Tn=s,St=null,a=!0):a=!1),a||To(s)),null;case 13:return qT(a,s,f);case 4:return me(s,s.stateNode.containerInfo),p=s.pendingProps,a===null?s.child=Ns(s,null,p,f):Pn(a,s,p,f),s.child;case 11:return kT(a,s,s.type,s.pendingProps,f);case 7:return Pn(a,s,s.pendingProps,f),s.child;case 8:return Pn(a,s,s.pendingProps.children,f),s.child;case 12:return Pn(a,s,s.pendingProps.children,f),s.child;case 10:return p=s.pendingProps,Oo(s,s.type,p.value),Pn(a,s,p.children,f),s.child;case 9:return x=s.type._context,p=s.pendingProps.children,js(s),x=On(x),p=p(x),s.flags|=1,Pn(a,s,p,f),s.child;case 14:return LT(a,s,s.type,s.pendingProps,f);case 15:return IT(a,s,s.type,s.pendingProps,f);case 19:return KT(a,s,f);case 31:return r8(a,s,f);case 22:return zT(a,s,f,s.pendingProps);case 24:return js(s),p=On(Zt),a===null?(x=zy(),x===null&&(x=pt,A=Ly(),x.pooledCache=A,A.refCount++,A!==null&&(x.pooledCacheLanes|=f),x=A),s.memoizedState={parent:p,cache:x},By(s),Oo(s,Zt,x)):((a.lanes&f)!==0&&(Uy(a,s),qc(s,null,null,f),Fc()),x=a.memoizedState,A=s.memoizedState,x.parent!==p?(x={parent:p,cache:p},s.memoizedState=x,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=x),Oo(s,Zt,p)):(p=A.cache,Oo(s,Zt,p),p!==x.cache&&ky(s,[Zt],f,!0))),Pn(a,s,s.pendingProps.children,f),s.child;case 29:throw s.pendingProps}throw Error(r(156,s.tag))}function Ia(a){a.flags|=4}function Sb(a,s,f,p,x){if((s=(a.mode&32)!==0)&&(s=!1),s){if(a.flags|=16777216,(x&335544128)===x)if(a.stateNode.complete)a.flags|=8192;else if(xO())a.flags|=8192;else throw Ps=Eh,$y}else a.flags&=-16777217}function WT(a,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!uP(s))if(xO())a.flags|=8192;else throw Ps=Eh,$y}function Vh(a,s){s!==null&&(a.flags|=4),a.flags&16384&&(s=a.tag!==22?wt():536870912,a.lanes|=s,tu|=s)}function Xc(a,s){if(!Xe)switch(a.tailMode){case"hidden":s=a.tail;for(var f=null;s!==null;)s.alternate!==null&&(f=s),s=s.sibling;f===null?a.tail=null:f.sibling=null;break;case"collapsed":f=a.tail;for(var p=null;f!==null;)f.alternate!==null&&(p=f),f=f.sibling;p===null?s||a.tail===null?a.tail=null:a.tail.sibling=null:p.sibling=null}}function At(a){var s=a.alternate!==null&&a.alternate.child===a.child,f=0,p=0;if(s)for(var x=a.child;x!==null;)f|=x.lanes|x.childLanes,p|=x.subtreeFlags&65011712,p|=x.flags&65011712,x.return=a,x=x.sibling;else for(x=a.child;x!==null;)f|=x.lanes|x.childLanes,p|=x.subtreeFlags,p|=x.flags,x.return=a,x=x.sibling;return a.subtreeFlags|=p,a.childLanes=f,s}function a8(a,s,f){var p=s.pendingProps;switch(Ny(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return At(s),null;case 1:return At(s),null;case 3:return f=s.stateNode,p=null,a!==null&&(p=a.memoizedState.cache),s.memoizedState.cache!==p&&(s.flags|=2048),Ra(Zt),oe(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(a===null||a.child===null)&&(Vl(s)?Ia(s):a===null||a.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,My())),At(s),null;case 26:var x=s.type,A=s.memoizedState;return a===null?(Ia(s),A!==null?(At(s),WT(s,A)):(At(s),Sb(s,x,null,p,f))):A?A!==a.memoizedState?(Ia(s),At(s),WT(s,A)):(At(s),s.flags&=-16777217):(a=a.memoizedProps,a!==p&&Ia(s),At(s),Sb(s,x,a,p,f)),null;case 27:if(ve(s),f=ye.current,x=s.type,a!==null&&s.stateNode!=null)a.memoizedProps!==p&&Ia(s);else{if(!p){if(s.stateNode===null)throw Error(r(166));return At(s),null}a=ee.current,Vl(s)?Tj(s):(a=tP(x,p,f),s.stateNode=a,Ia(s))}return At(s),null;case 5:if(ve(s),x=s.type,a!==null&&s.stateNode!=null)a.memoizedProps!==p&&Ia(s);else{if(!p){if(s.stateNode===null)throw Error(r(166));return At(s),null}if(A=ee.current,Vl(s))Tj(s);else{var P=rm(ye.current);switch(A){case 1:A=P.createElementNS("http://www.w3.org/2000/svg",x);break;case 2:A=P.createElementNS("http://www.w3.org/1998/Math/MathML",x);break;default:switch(x){case"svg":A=P.createElementNS("http://www.w3.org/2000/svg",x);break;case"math":A=P.createElementNS("http://www.w3.org/1998/Math/MathML",x);break;case"script":A=P.createElement("div"),A.innerHTML="<script><\/script>",A=A.removeChild(A.firstChild);break;case"select":A=typeof p.is=="string"?P.createElement("select",{is:p.is}):P.createElement("select"),p.multiple?A.multiple=!0:p.size&&(A.size=p.size);break;default:A=typeof p.is=="string"?P.createElement(x,{is:p.is}):P.createElement(x)}}A[un]=s,A[qn]=p;e:for(P=s.child;P!==null;){if(P.tag===5||P.tag===6)A.appendChild(P.stateNode);else if(P.tag!==4&&P.tag!==27&&P.child!==null){P.child.return=P,P=P.child;continue}if(P===s)break e;for(;P.sibling===null;){if(P.return===null||P.return===s)break e;P=P.return}P.sibling.return=P.return,P=P.sibling}s.stateNode=A;e:switch(Nn(A,x,p),x){case"button":case"input":case"select":case"textarea":p=!!p.autoFocus;break e;case"img":p=!0;break e;default:p=!1}p&&Ia(s)}}return At(s),Sb(s,s.type,a===null?null:a.memoizedProps,s.pendingProps,f),null;case 6:if(a&&s.stateNode!=null)a.memoizedProps!==p&&Ia(s);else{if(typeof p!="string"&&s.stateNode===null)throw Error(r(166));if(a=ye.current,Vl(s)){if(a=s.stateNode,f=s.memoizedProps,p=null,x=Tn,x!==null)switch(x.tag){case 27:case 5:p=x.memoizedProps}a[un]=s,a=!!(a.nodeValue===f||p!==null&&p.suppressHydrationWarning===!0||qO(a.nodeValue,f)),a||To(s,!0)}else a=rm(a).createTextNode(p),a[un]=s,s.stateNode=a}return At(s),null;case 31:if(f=s.memoizedState,a===null||a.memoizedState!==null){if(p=Vl(s),f!==null){if(a===null){if(!p)throw Error(r(318));if(a=s.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(557));a[un]=s}else Cs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;At(s),a=!1}else f=My(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=f),a=!0;if(!a)return s.flags&256?(_r(s),s):(_r(s),null);if((s.flags&128)!==0)throw Error(r(558))}return At(s),null;case 13:if(p=s.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(x=Vl(s),p!==null&&p.dehydrated!==null){if(a===null){if(!x)throw Error(r(318));if(x=s.memoizedState,x=x!==null?x.dehydrated:null,!x)throw Error(r(317));x[un]=s}else Cs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;At(s),x=!1}else x=My(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=x),x=!0;if(!x)return s.flags&256?(_r(s),s):(_r(s),null)}return _r(s),(s.flags&128)!==0?(s.lanes=f,s):(f=p!==null,a=a!==null&&a.memoizedState!==null,f&&(p=s.child,x=null,p.alternate!==null&&p.alternate.memoizedState!==null&&p.alternate.memoizedState.cachePool!==null&&(x=p.alternate.memoizedState.cachePool.pool),A=null,p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(A=p.memoizedState.cachePool.pool),A!==x&&(p.flags|=2048)),f!==a&&f&&(s.child.flags|=8192),Vh(s,s.updateQueue),At(s),null);case 4:return oe(),a===null&&qb(s.stateNode.containerInfo),At(s),null;case 10:return Ra(s.type),At(s),null;case 19:if(V(qt),p=s.memoizedState,p===null)return At(s),null;if(x=(s.flags&128)!==0,A=p.rendering,A===null)if(x)Xc(p,!1);else{if(zt!==0||a!==null&&(a.flags&128)!==0)for(a=s.child;a!==null;){if(A=Ph(a),A!==null){for(s.flags|=128,Xc(p,!1),a=A.updateQueue,s.updateQueue=a,Vh(s,a),s.subtreeFlags=0,a=f,f=s.child;f!==null;)Sj(f,a),f=f.sibling;return K(qt,qt.current&1|2),Xe&&_a(s,p.treeForkCount),s.child}a=a.sibling}p.tail!==null&&Wt()>Gh&&(s.flags|=128,x=!0,Xc(p,!1),s.lanes=4194304)}else{if(!x)if(a=Ph(A),a!==null){if(s.flags|=128,x=!0,a=a.updateQueue,s.updateQueue=a,Vh(s,a),Xc(p,!0),p.tail===null&&p.tailMode==="hidden"&&!A.alternate&&!Xe)return At(s),null}else 2*Wt()-p.renderingStartTime>Gh&&f!==536870912&&(s.flags|=128,x=!0,Xc(p,!1),s.lanes=4194304);p.isBackwards?(A.sibling=s.child,s.child=A):(a=p.last,a!==null?a.sibling=A:s.child=A,p.last=A)}return p.tail!==null?(a=p.tail,p.rendering=a,p.tail=a.sibling,p.renderingStartTime=Wt(),a.sibling=null,f=qt.current,K(qt,x?f&1|2:f&1),Xe&&_a(s,p.treeForkCount),a):(At(s),null);case 22:case 23:return _r(s),Hy(),p=s.memoizedState!==null,a!==null?a.memoizedState!==null!==p&&(s.flags|=8192):p&&(s.flags|=8192),p?(f&536870912)!==0&&(s.flags&128)===0&&(At(s),s.subtreeFlags&6&&(s.flags|=8192)):At(s),f=s.updateQueue,f!==null&&Vh(s,f.retryQueue),f=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(f=a.memoizedState.cachePool.pool),p=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(p=s.memoizedState.cachePool.pool),p!==f&&(s.flags|=2048),a!==null&&V(Ts),null;case 24:return f=null,a!==null&&(f=a.memoizedState.cache),s.memoizedState.cache!==f&&(s.flags|=2048),Ra(Zt),At(s),null;case 25:return null;case 30:return null}throw Error(r(156,s.tag))}function o8(a,s){switch(Ny(s),s.tag){case 1:return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 3:return Ra(Zt),oe(),a=s.flags,(a&65536)!==0&&(a&128)===0?(s.flags=a&-65537|128,s):null;case 26:case 27:case 5:return ve(s),null;case 31:if(s.memoizedState!==null){if(_r(s),s.alternate===null)throw Error(r(340));Cs()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 13:if(_r(s),a=s.memoizedState,a!==null&&a.dehydrated!==null){if(s.alternate===null)throw Error(r(340));Cs()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 19:return V(qt),null;case 4:return oe(),null;case 10:return Ra(s.type),null;case 22:case 23:return _r(s),Hy(),a!==null&&V(Ts),a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 24:return Ra(Zt),null;case 25:return null;default:return null}}function YT(a,s){switch(Ny(s),s.tag){case 3:Ra(Zt),oe();break;case 26:case 27:case 5:ve(s);break;case 4:oe();break;case 31:s.memoizedState!==null&&_r(s);break;case 13:_r(s);break;case 19:V(qt);break;case 10:Ra(s.type);break;case 22:case 23:_r(s),Hy(),a!==null&&V(Ts);break;case 24:Ra(Zt)}}function Zc(a,s){try{var f=s.updateQueue,p=f!==null?f.lastEffect:null;if(p!==null){var x=p.next;f=x;do{if((f.tag&a)===a){p=void 0;var A=f.create,P=f.inst;p=A(),P.destroy=p}f=f.next}while(f!==x)}}catch(k){ct(s,s.return,k)}}function Do(a,s,f){try{var p=s.updateQueue,x=p!==null?p.lastEffect:null;if(x!==null){var A=x.next;p=A;do{if((p.tag&a)===a){var P=p.inst,k=P.destroy;if(k!==void 0){P.destroy=void 0,x=s;var U=f,J=k;try{J()}catch(ue){ct(x,U,ue)}}}p=p.next}while(p!==A)}}catch(ue){ct(s,s.return,ue)}}function XT(a){var s=a.updateQueue;if(s!==null){var f=a.stateNode;try{Bj(s,f)}catch(p){ct(a,a.return,p)}}}function ZT(a,s,f){f.props=Ms(a.type,a.memoizedProps),f.state=a.memoizedState;try{f.componentWillUnmount()}catch(p){ct(a,s,p)}}function Qc(a,s){try{var f=a.ref;if(f!==null){switch(a.tag){case 26:case 27:case 5:var p=a.stateNode;break;case 30:p=a.stateNode;break;default:p=a.stateNode}typeof f=="function"?a.refCleanup=f(p):f.current=p}}catch(x){ct(a,s,x)}}function Hi(a,s){var f=a.ref,p=a.refCleanup;if(f!==null)if(typeof p=="function")try{p()}catch(x){ct(a,s,x)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof f=="function")try{f(null)}catch(x){ct(a,s,x)}else f.current=null}function QT(a){var s=a.type,f=a.memoizedProps,p=a.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":f.autoFocus&&p.focus();break e;case"img":f.src?p.src=f.src:f.srcSet&&(p.srcset=f.srcSet)}}catch(x){ct(a,a.return,x)}}function Ab(a,s,f){try{var p=a.stateNode;O8(p,a.type,f,s),p[qn]=s}catch(x){ct(a,a.return,x)}}function JT(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&Uo(a.type)||a.tag===4}function Cb(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||JT(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.tag===27&&Uo(a.type)||a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function Eb(a,s,f){var p=a.tag;if(p===5||p===6)a=a.stateNode,s?(f.nodeType===9?f.body:f.nodeName==="HTML"?f.ownerDocument.body:f).insertBefore(a,s):(s=f.nodeType===9?f.body:f.nodeName==="HTML"?f.ownerDocument.body:f,s.appendChild(a),f=f._reactRootContainer,f!=null||s.onclick!==null||(s.onclick=Oa));else if(p!==4&&(p===27&&Uo(a.type)&&(f=a.stateNode,s=null),a=a.child,a!==null))for(Eb(a,s,f),a=a.sibling;a!==null;)Eb(a,s,f),a=a.sibling}function Fh(a,s,f){var p=a.tag;if(p===5||p===6)a=a.stateNode,s?f.insertBefore(a,s):f.appendChild(a);else if(p!==4&&(p===27&&Uo(a.type)&&(f=a.stateNode),a=a.child,a!==null))for(Fh(a,s,f),a=a.sibling;a!==null;)Fh(a,s,f),a=a.sibling}function eO(a){var s=a.stateNode,f=a.memoizedProps;try{for(var p=a.type,x=s.attributes;x.length;)s.removeAttributeNode(x[0]);Nn(s,p,f),s[un]=a,s[qn]=f}catch(A){ct(a,a.return,A)}}var za=!1,en=!1,jb=!1,tO=typeof WeakSet=="function"?WeakSet:Set,xn=null;function s8(a,s){if(a=a.containerInfo,Gb=cm,a=hj(a),by(a)){if("selectionStart"in a)var f={start:a.selectionStart,end:a.selectionEnd};else e:{f=(f=a.ownerDocument)&&f.defaultView||window;var p=f.getSelection&&f.getSelection();if(p&&p.rangeCount!==0){f=p.anchorNode;var x=p.anchorOffset,A=p.focusNode;p=p.focusOffset;try{f.nodeType,A.nodeType}catch{f=null;break e}var P=0,k=-1,U=-1,J=0,ue=0,fe=a,ne=null;t:for(;;){for(var ie;fe!==f||x!==0&&fe.nodeType!==3||(k=P+x),fe!==A||p!==0&&fe.nodeType!==3||(U=P+p),fe.nodeType===3&&(P+=fe.nodeValue.length),(ie=fe.firstChild)!==null;)ne=fe,fe=ie;for(;;){if(fe===a)break t;if(ne===f&&++J===x&&(k=P),ne===A&&++ue===p&&(U=P),(ie=fe.nextSibling)!==null)break;fe=ne,ne=fe.parentNode}fe=ie}f=k===-1||U===-1?null:{start:k,end:U}}else f=null}f=f||{start:0,end:0}}else f=null;for(Wb={focusedElem:a,selectionRange:f},cm=!1,xn=s;xn!==null;)if(s=xn,a=s.child,(s.subtreeFlags&1028)!==0&&a!==null)a.return=s,xn=a;else for(;xn!==null;){switch(s=xn,A=s.alternate,a=s.flags,s.tag){case 0:if((a&4)!==0&&(a=s.updateQueue,a=a!==null?a.events:null,a!==null))for(f=0;f<a.length;f++)x=a[f],x.ref.impl=x.nextImpl;break;case 11:case 15:break;case 1:if((a&1024)!==0&&A!==null){a=void 0,f=s,x=A.memoizedProps,A=A.memoizedState,p=f.stateNode;try{var Se=Ms(f.type,x);a=p.getSnapshotBeforeUpdate(Se,A),p.__reactInternalSnapshotBeforeUpdate=a}catch(Re){ct(f,f.return,Re)}}break;case 3:if((a&1024)!==0){if(a=s.stateNode.containerInfo,f=a.nodeType,f===9)Zb(a);else if(f===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":Zb(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((a&1024)!==0)throw Error(r(163))}if(a=s.sibling,a!==null){a.return=s.return,xn=a;break}xn=s.return}}function nO(a,s,f){var p=f.flags;switch(f.tag){case 0:case 11:case 15:Ba(a,f),p&4&&Zc(5,f);break;case 1:if(Ba(a,f),p&4)if(a=f.stateNode,s===null)try{a.componentDidMount()}catch(P){ct(f,f.return,P)}else{var x=Ms(f.type,s.memoizedProps);s=s.memoizedState;try{a.componentDidUpdate(x,s,a.__reactInternalSnapshotBeforeUpdate)}catch(P){ct(f,f.return,P)}}p&64&&XT(f),p&512&&Qc(f,f.return);break;case 3:if(Ba(a,f),p&64&&(a=f.updateQueue,a!==null)){if(s=null,f.child!==null)switch(f.child.tag){case 27:case 5:s=f.child.stateNode;break;case 1:s=f.child.stateNode}try{Bj(a,s)}catch(P){ct(f,f.return,P)}}break;case 27:s===null&&p&4&&eO(f);case 26:case 5:Ba(a,f),s===null&&p&4&&QT(f),p&512&&Qc(f,f.return);break;case 12:Ba(a,f);break;case 31:Ba(a,f),p&4&&aO(a,f);break;case 13:Ba(a,f),p&4&&oO(a,f),p&64&&(a=f.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(f=g8.bind(null,f),L8(a,f))));break;case 22:if(p=f.memoizedState!==null||za,!p){s=s!==null&&s.memoizedState!==null||en,x=za;var A=en;za=p,(en=s)&&!A?Ua(a,f,(f.subtreeFlags&8772)!==0):Ba(a,f),za=x,en=A}break;case 30:break;default:Ba(a,f)}}function rO(a){var s=a.alternate;s!==null&&(a.alternate=null,rO(s)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(s=a.stateNode,s!==null&&Ec(s)),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}var Ot=null,dr=!1;function $a(a,s,f){for(f=f.child;f!==null;)iO(a,s,f),f=f.sibling}function iO(a,s,f){if(Yt&&typeof Yt.onCommitFiberUnmount=="function")try{Yt.onCommitFiberUnmount(lr,f)}catch{}switch(f.tag){case 26:en||Hi(f,s),$a(a,s,f),f.memoizedState?f.memoizedState.count--:f.stateNode&&(f=f.stateNode,f.parentNode.removeChild(f));break;case 27:en||Hi(f,s);var p=Ot,x=dr;Uo(f.type)&&(Ot=f.stateNode,dr=!1),$a(a,s,f),lf(f.stateNode),Ot=p,dr=x;break;case 5:en||Hi(f,s);case 6:if(p=Ot,x=dr,Ot=null,$a(a,s,f),Ot=p,dr=x,Ot!==null)if(dr)try{(Ot.nodeType===9?Ot.body:Ot.nodeName==="HTML"?Ot.ownerDocument.body:Ot).removeChild(f.stateNode)}catch(A){ct(f,s,A)}else try{Ot.removeChild(f.stateNode)}catch(A){ct(f,s,A)}break;case 18:Ot!==null&&(dr?(a=Ot,XO(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,f.stateNode),uu(a)):XO(Ot,f.stateNode));break;case 4:p=Ot,x=dr,Ot=f.stateNode.containerInfo,dr=!0,$a(a,s,f),Ot=p,dr=x;break;case 0:case 11:case 14:case 15:Do(2,f,s),en||Do(4,f,s),$a(a,s,f);break;case 1:en||(Hi(f,s),p=f.stateNode,typeof p.componentWillUnmount=="function"&&ZT(f,s,p)),$a(a,s,f);break;case 21:$a(a,s,f);break;case 22:en=(p=en)||f.memoizedState!==null,$a(a,s,f),en=p;break;default:$a(a,s,f)}}function aO(a,s){if(s.memoizedState===null&&(a=s.alternate,a!==null&&(a=a.memoizedState,a!==null))){a=a.dehydrated;try{uu(a)}catch(f){ct(s,s.return,f)}}}function oO(a,s){if(s.memoizedState===null&&(a=s.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{uu(a)}catch(f){ct(s,s.return,f)}}function l8(a){switch(a.tag){case 31:case 13:case 19:var s=a.stateNode;return s===null&&(s=a.stateNode=new tO),s;case 22:return a=a.stateNode,s=a._retryCache,s===null&&(s=a._retryCache=new tO),s;default:throw Error(r(435,a.tag))}}function qh(a,s){var f=l8(a);s.forEach(function(p){if(!f.has(p)){f.add(p);var x=v8.bind(null,a,p);p.then(x,x)}})}function hr(a,s){var f=s.deletions;if(f!==null)for(var p=0;p<f.length;p++){var x=f[p],A=a,P=s,k=P;e:for(;k!==null;){switch(k.tag){case 27:if(Uo(k.type)){Ot=k.stateNode,dr=!1;break e}break;case 5:Ot=k.stateNode,dr=!1;break e;case 3:case 4:Ot=k.stateNode.containerInfo,dr=!0;break e}k=k.return}if(Ot===null)throw Error(r(160));iO(A,P,x),Ot=null,dr=!1,A=x.alternate,A!==null&&(A.return=null),x.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)sO(s,a),s=s.sibling}var xi=null;function sO(a,s){var f=a.alternate,p=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:hr(s,a),mr(a),p&4&&(Do(3,a,a.return),Zc(3,a),Do(5,a,a.return));break;case 1:hr(s,a),mr(a),p&512&&(en||f===null||Hi(f,f.return)),p&64&&za&&(a=a.updateQueue,a!==null&&(p=a.callbacks,p!==null&&(f=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=f===null?p:f.concat(p))));break;case 26:var x=xi;if(hr(s,a),mr(a),p&512&&(en||f===null||Hi(f,f.return)),p&4){var A=f!==null?f.memoizedState:null;if(p=a.memoizedState,f===null)if(p===null)if(a.stateNode===null){e:{p=a.type,f=a.memoizedProps,x=x.ownerDocument||x;t:switch(p){case"title":A=x.getElementsByTagName("title")[0],(!A||A[ys]||A[un]||A.namespaceURI==="http://www.w3.org/2000/svg"||A.hasAttribute("itemprop"))&&(A=x.createElement(p),x.head.insertBefore(A,x.querySelector("head > title"))),Nn(A,p,f),A[un]=a,Je(A),p=A;break e;case"link":var P=sP("link","href",x).get(p+(f.href||""));if(P){for(var k=0;k<P.length;k++)if(A=P[k],A.getAttribute("href")===(f.href==null||f.href===""?null:f.href)&&A.getAttribute("rel")===(f.rel==null?null:f.rel)&&A.getAttribute("title")===(f.title==null?null:f.title)&&A.getAttribute("crossorigin")===(f.crossOrigin==null?null:f.crossOrigin)){P.splice(k,1);break t}}A=x.createElement(p),Nn(A,p,f),x.head.appendChild(A);break;case"meta":if(P=sP("meta","content",x).get(p+(f.content||""))){for(k=0;k<P.length;k++)if(A=P[k],A.getAttribute("content")===(f.content==null?null:""+f.content)&&A.getAttribute("name")===(f.name==null?null:f.name)&&A.getAttribute("property")===(f.property==null?null:f.property)&&A.getAttribute("http-equiv")===(f.httpEquiv==null?null:f.httpEquiv)&&A.getAttribute("charset")===(f.charSet==null?null:f.charSet)){P.splice(k,1);break t}}A=x.createElement(p),Nn(A,p,f),x.head.appendChild(A);break;default:throw Error(r(468,p))}A[un]=a,Je(A),p=A}a.stateNode=p}else lP(x,a.type,a.stateNode);else a.stateNode=oP(x,p,a.memoizedProps);else A!==p?(A===null?f.stateNode!==null&&(f=f.stateNode,f.parentNode.removeChild(f)):A.count--,p===null?lP(x,a.type,a.stateNode):oP(x,p,a.memoizedProps)):p===null&&a.stateNode!==null&&Ab(a,a.memoizedProps,f.memoizedProps)}break;case 27:hr(s,a),mr(a),p&512&&(en||f===null||Hi(f,f.return)),f!==null&&p&4&&Ab(a,a.memoizedProps,f.memoizedProps);break;case 5:if(hr(s,a),mr(a),p&512&&(en||f===null||Hi(f,f.return)),a.flags&32){x=a.stateNode;try{Ml(x,"")}catch(Se){ct(a,a.return,Se)}}p&4&&a.stateNode!=null&&(x=a.memoizedProps,Ab(a,x,f!==null?f.memoizedProps:x)),p&1024&&(jb=!0);break;case 6:if(hr(s,a),mr(a),p&4){if(a.stateNode===null)throw Error(r(162));p=a.memoizedProps,f=a.stateNode;try{f.nodeValue=p}catch(Se){ct(a,a.return,Se)}}break;case 3:if(om=null,x=xi,xi=im(s.containerInfo),hr(s,a),xi=x,mr(a),p&4&&f!==null&&f.memoizedState.isDehydrated)try{uu(s.containerInfo)}catch(Se){ct(a,a.return,Se)}jb&&(jb=!1,lO(a));break;case 4:p=xi,xi=im(a.stateNode.containerInfo),hr(s,a),mr(a),xi=p;break;case 12:hr(s,a),mr(a);break;case 31:hr(s,a),mr(a),p&4&&(p=a.updateQueue,p!==null&&(a.updateQueue=null,qh(a,p)));break;case 13:hr(s,a),mr(a),a.child.flags&8192&&a.memoizedState!==null!=(f!==null&&f.memoizedState!==null)&&(Kh=Wt()),p&4&&(p=a.updateQueue,p!==null&&(a.updateQueue=null,qh(a,p)));break;case 22:x=a.memoizedState!==null;var U=f!==null&&f.memoizedState!==null,J=za,ue=en;if(za=J||x,en=ue||U,hr(s,a),en=ue,za=J,mr(a),p&8192)e:for(s=a.stateNode,s._visibility=x?s._visibility&-2:s._visibility|1,x&&(f===null||U||za||en||Rs(a)),f=null,s=a;;){if(s.tag===5||s.tag===26){if(f===null){U=f=s;try{if(A=U.stateNode,x)P=A.style,typeof P.setProperty=="function"?P.setProperty("display","none","important"):P.display="none";else{k=U.stateNode;var fe=U.memoizedProps.style,ne=fe!=null&&fe.hasOwnProperty("display")?fe.display:null;k.style.display=ne==null||typeof ne=="boolean"?"":(""+ne).trim()}}catch(Se){ct(U,U.return,Se)}}}else if(s.tag===6){if(f===null){U=s;try{U.stateNode.nodeValue=x?"":U.memoizedProps}catch(Se){ct(U,U.return,Se)}}}else if(s.tag===18){if(f===null){U=s;try{var ie=U.stateNode;x?ZO(ie,!0):ZO(U.stateNode,!1)}catch(Se){ct(U,U.return,Se)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===a)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===a)break e;for(;s.sibling===null;){if(s.return===null||s.return===a)break e;f===s&&(f=null),s=s.return}f===s&&(f=null),s.sibling.return=s.return,s=s.sibling}p&4&&(p=a.updateQueue,p!==null&&(f=p.retryQueue,f!==null&&(p.retryQueue=null,qh(a,f))));break;case 19:hr(s,a),mr(a),p&4&&(p=a.updateQueue,p!==null&&(a.updateQueue=null,qh(a,p)));break;case 30:break;case 21:break;default:hr(s,a),mr(a)}}function mr(a){var s=a.flags;if(s&2){try{for(var f,p=a.return;p!==null;){if(JT(p)){f=p;break}p=p.return}if(f==null)throw Error(r(160));switch(f.tag){case 27:var x=f.stateNode,A=Cb(a);Fh(a,A,x);break;case 5:var P=f.stateNode;f.flags&32&&(Ml(P,""),f.flags&=-33);var k=Cb(a);Fh(a,k,P);break;case 3:case 4:var U=f.stateNode.containerInfo,J=Cb(a);Eb(a,J,U);break;default:throw Error(r(161))}}catch(ue){ct(a,a.return,ue)}a.flags&=-3}s&4096&&(a.flags&=-4097)}function lO(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var s=a;lO(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),a=a.sibling}}function Ba(a,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)nO(a,s.alternate,s),s=s.sibling}function Rs(a){for(a=a.child;a!==null;){var s=a;switch(s.tag){case 0:case 11:case 14:case 15:Do(4,s,s.return),Rs(s);break;case 1:Hi(s,s.return);var f=s.stateNode;typeof f.componentWillUnmount=="function"&&ZT(s,s.return,f),Rs(s);break;case 27:lf(s.stateNode);case 26:case 5:Hi(s,s.return),Rs(s);break;case 22:s.memoizedState===null&&Rs(s);break;case 30:Rs(s);break;default:Rs(s)}a=a.sibling}}function Ua(a,s,f){for(f=f&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var p=s.alternate,x=a,A=s,P=A.flags;switch(A.tag){case 0:case 11:case 15:Ua(x,A,f),Zc(4,A);break;case 1:if(Ua(x,A,f),p=A,x=p.stateNode,typeof x.componentDidMount=="function")try{x.componentDidMount()}catch(J){ct(p,p.return,J)}if(p=A,x=p.updateQueue,x!==null){var k=p.stateNode;try{var U=x.shared.hiddenCallbacks;if(U!==null)for(x.shared.hiddenCallbacks=null,x=0;x<U.length;x++)$j(U[x],k)}catch(J){ct(p,p.return,J)}}f&&P&64&&XT(A),Qc(A,A.return);break;case 27:eO(A);case 26:case 5:Ua(x,A,f),f&&p===null&&P&4&&QT(A),Qc(A,A.return);break;case 12:Ua(x,A,f);break;case 31:Ua(x,A,f),f&&P&4&&aO(x,A);break;case 13:Ua(x,A,f),f&&P&4&&oO(x,A);break;case 22:A.memoizedState===null&&Ua(x,A,f),Qc(A,A.return);break;case 30:break;default:Ua(x,A,f)}s=s.sibling}}function Tb(a,s){var f=null;a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(f=a.memoizedState.cachePool.pool),a=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(a=s.memoizedState.cachePool.pool),a!==f&&(a!=null&&a.refCount++,f!=null&&zc(f))}function Ob(a,s){a=null,s.alternate!==null&&(a=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==a&&(s.refCount++,a!=null&&zc(a))}function wi(a,s,f,p){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)uO(a,s,f,p),s=s.sibling}function uO(a,s,f,p){var x=s.flags;switch(s.tag){case 0:case 11:case 15:wi(a,s,f,p),x&2048&&Zc(9,s);break;case 1:wi(a,s,f,p);break;case 3:wi(a,s,f,p),x&2048&&(a=null,s.alternate!==null&&(a=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==a&&(s.refCount++,a!=null&&zc(a)));break;case 12:if(x&2048){wi(a,s,f,p),a=s.stateNode;try{var A=s.memoizedProps,P=A.id,k=A.onPostCommit;typeof k=="function"&&k(P,s.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch(U){ct(s,s.return,U)}}else wi(a,s,f,p);break;case 31:wi(a,s,f,p);break;case 13:wi(a,s,f,p);break;case 23:break;case 22:A=s.stateNode,P=s.alternate,s.memoizedState!==null?A._visibility&2?wi(a,s,f,p):Jc(a,s):A._visibility&2?wi(a,s,f,p):(A._visibility|=2,Ql(a,s,f,p,(s.subtreeFlags&10256)!==0||!1)),x&2048&&Tb(P,s);break;case 24:wi(a,s,f,p),x&2048&&Ob(s.alternate,s);break;default:wi(a,s,f,p)}}function Ql(a,s,f,p,x){for(x=x&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var A=a,P=s,k=f,U=p,J=P.flags;switch(P.tag){case 0:case 11:case 15:Ql(A,P,k,U,x),Zc(8,P);break;case 23:break;case 22:var ue=P.stateNode;P.memoizedState!==null?ue._visibility&2?Ql(A,P,k,U,x):Jc(A,P):(ue._visibility|=2,Ql(A,P,k,U,x)),x&&J&2048&&Tb(P.alternate,P);break;case 24:Ql(A,P,k,U,x),x&&J&2048&&Ob(P.alternate,P);break;default:Ql(A,P,k,U,x)}s=s.sibling}}function Jc(a,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var f=a,p=s,x=p.flags;switch(p.tag){case 22:Jc(f,p),x&2048&&Tb(p.alternate,p);break;case 24:Jc(f,p),x&2048&&Ob(p.alternate,p);break;default:Jc(f,p)}s=s.sibling}}var ef=8192;function Jl(a,s,f){if(a.subtreeFlags&ef)for(a=a.child;a!==null;)cO(a,s,f),a=a.sibling}function cO(a,s,f){switch(a.tag){case 26:Jl(a,s,f),a.flags&ef&&a.memoizedState!==null&&W8(f,xi,a.memoizedState,a.memoizedProps);break;case 5:Jl(a,s,f);break;case 3:case 4:var p=xi;xi=im(a.stateNode.containerInfo),Jl(a,s,f),xi=p;break;case 22:a.memoizedState===null&&(p=a.alternate,p!==null&&p.memoizedState!==null?(p=ef,ef=16777216,Jl(a,s,f),ef=p):Jl(a,s,f));break;default:Jl(a,s,f)}}function fO(a){var s=a.alternate;if(s!==null&&(a=s.child,a!==null)){s.child=null;do s=a.sibling,a.sibling=null,a=s;while(a!==null)}}function tf(a){var s=a.deletions;if((a.flags&16)!==0){if(s!==null)for(var f=0;f<s.length;f++){var p=s[f];xn=p,hO(p,a)}fO(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)dO(a),a=a.sibling}function dO(a){switch(a.tag){case 0:case 11:case 15:tf(a),a.flags&2048&&Do(9,a,a.return);break;case 3:tf(a);break;case 12:tf(a);break;case 22:var s=a.stateNode;a.memoizedState!==null&&s._visibility&2&&(a.return===null||a.return.tag!==13)?(s._visibility&=-3,Hh(a)):tf(a);break;default:tf(a)}}function Hh(a){var s=a.deletions;if((a.flags&16)!==0){if(s!==null)for(var f=0;f<s.length;f++){var p=s[f];xn=p,hO(p,a)}fO(a)}for(a=a.child;a!==null;){switch(s=a,s.tag){case 0:case 11:case 15:Do(8,s,s.return),Hh(s);break;case 22:f=s.stateNode,f._visibility&2&&(f._visibility&=-3,Hh(s));break;default:Hh(s)}a=a.sibling}}function hO(a,s){for(;xn!==null;){var f=xn;switch(f.tag){case 0:case 11:case 15:Do(8,f,s);break;case 23:case 22:if(f.memoizedState!==null&&f.memoizedState.cachePool!==null){var p=f.memoizedState.cachePool.pool;p!=null&&p.refCount++}break;case 24:zc(f.memoizedState.cache)}if(p=f.child,p!==null)p.return=f,xn=p;else e:for(f=a;xn!==null;){p=xn;var x=p.sibling,A=p.return;if(rO(p),p===f){xn=null;break e}if(x!==null){x.return=A,xn=x;break e}xn=A}}}var u8={getCacheForType:function(a){var s=On(Zt),f=s.data.get(a);return f===void 0&&(f=a(),s.data.set(a,f)),f},cacheSignal:function(){return On(Zt).controller.signal}},c8=typeof WeakMap=="function"?WeakMap:Map,it=0,pt=null,He=null,Ge=0,ut=0,Mr=null,ko=!1,eu=!1,Pb=!1,Va=0,zt=0,Lo=0,Ds=0,Nb=0,Rr=0,tu=0,nf=null,pr=null,_b=!1,Kh=0,mO=0,Gh=1/0,Wh=null,Io=null,cn=0,zo=null,nu=null,Fa=0,Mb=0,Rb=null,pO=null,rf=0,Db=null;function Dr(){return(it&2)!==0&&Ge!==0?Ge&-Ge:L.T!==null?Bb():Ac()}function gO(){if(Rr===0)if((Ge&536870912)===0||Xe){var a=Ui;Ui<<=1,(Ui&3932160)===0&&(Ui=262144),Rr=a}else Rr=536870912;return a=Nr.current,a!==null&&(a.flags|=32),Rr}function gr(a,s,f){(a===pt&&(ut===2||ut===9)||a.cancelPendingCommit!==null)&&(ru(a,0),$o(a,Ge,Rr,!1)),$e(a,f),((it&2)===0||a!==pt)&&(a===pt&&((it&2)===0&&(Ds|=f),zt===4&&$o(a,Ge,Rr,!1)),Ki(a))}function vO(a,s,f){if((it&6)!==0)throw Error(r(327));var p=!f&&(s&127)===0&&(s&a.expiredLanes)===0||st(a,s),x=p?h8(a,s):Lb(a,s,!0),A=p;do{if(x===0){eu&&!p&&$o(a,s,0,!1);break}else{if(f=a.current.alternate,A&&!f8(f)){x=Lb(a,s,!1),A=!1;continue}if(x===2){if(A=s,a.errorRecoveryDisabledLanes&A)var P=0;else P=a.pendingLanes&-536870913,P=P!==0?P:P&536870912?536870912:0;if(P!==0){s=P;e:{var k=a;x=nf;var U=k.current.memoizedState.isDehydrated;if(U&&(ru(k,P).flags|=256),P=Lb(k,P,!1),P!==2){if(Pb&&!U){k.errorRecoveryDisabledLanes|=A,Ds|=A,x=4;break e}A=pr,pr=x,A!==null&&(pr===null?pr=A:pr.push.apply(pr,A))}x=P}if(A=!1,x!==2)continue}}if(x===1){ru(a,0),$o(a,s,0,!0);break}e:{switch(p=a,A=x,A){case 0:case 1:throw Error(r(345));case 4:if((s&4194048)!==s)break;case 6:$o(p,s,Rr,!ko);break e;case 2:pr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((s&62914560)===s&&(x=Kh+300-Wt(),10<x)){if($o(p,s,Rr,!ko),we(p,0,!0)!==0)break e;Fa=s,p.timeoutHandle=WO(yO.bind(null,p,f,pr,Wh,_b,s,Rr,Ds,tu,ko,A,"Throttled",-0,0),x);break e}yO(p,f,pr,Wh,_b,s,Rr,Ds,tu,ko,A,null,-0,0)}}break}while(!0);Ki(a)}function yO(a,s,f,p,x,A,P,k,U,J,ue,fe,ne,ie){if(a.timeoutHandle=-1,fe=s.subtreeFlags,fe&8192||(fe&16785408)===16785408){fe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Oa},cO(s,A,fe);var Se=(A&62914560)===A?Kh-Wt():(A&4194048)===A?mO-Wt():0;if(Se=Y8(fe,Se),Se!==null){Fa=A,a.cancelPendingCommit=Se(jO.bind(null,a,s,A,f,p,x,P,k,U,ue,fe,null,ne,ie)),$o(a,A,P,!J);return}}jO(a,s,A,f,p,x,P,k,U)}function f8(a){for(var s=a;;){var f=s.tag;if((f===0||f===11||f===15)&&s.flags&16384&&(f=s.updateQueue,f!==null&&(f=f.stores,f!==null)))for(var p=0;p<f.length;p++){var x=f[p],A=x.getSnapshot;x=x.value;try{if(!Or(A(),x))return!1}catch{return!1}}if(f=s.child,s.subtreeFlags&16384&&f!==null)f.return=s,s=f;else{if(s===a)break;for(;s.sibling===null;){if(s.return===null||s.return===a)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function $o(a,s,f,p){s&=~Nb,s&=~Ds,a.suspendedLanes|=s,a.pingedLanes&=~s,p&&(a.warmLanes|=s),p=a.expirationTimes;for(var x=s;0<x;){var A=31-Xt(x),P=1<<A;p[A]=-1,x&=~P}f!==0&&Ca(a,f,s)}function Yh(){return(it&6)===0?(af(0),!1):!0}function kb(){if(He!==null){if(ut===0)var a=He.return;else a=He,Ma=Es=null,Zy(a),Gl=null,Bc=0,a=He;for(;a!==null;)YT(a.alternate,a),a=a.return;He=null}}function ru(a,s){var f=a.timeoutHandle;f!==-1&&(a.timeoutHandle=-1,_8(f)),f=a.cancelPendingCommit,f!==null&&(a.cancelPendingCommit=null,f()),Fa=0,kb(),pt=a,He=f=Na(a.current,null),Ge=s,ut=0,Mr=null,ko=!1,eu=st(a,s),Pb=!1,tu=Rr=Nb=Ds=Lo=zt=0,pr=nf=null,_b=!1,(s&8)!==0&&(s|=s&32);var p=a.entangledLanes;if(p!==0)for(a=a.entanglements,p&=s;0<p;){var x=31-Xt(p),A=1<<x;s|=a[x],p&=~A}return Va=s,gh(),f}function bO(a,s){Be=null,L.H=Wc,s===Kl||s===Ch?(s=kj(),ut=3):s===$y?(s=kj(),ut=4):ut=s===hb?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,Mr=s,He===null&&(zt=1,zh(a,Xr(s,a.current)))}function xO(){var a=Nr.current;return a===null?!0:(Ge&4194048)===Ge?ei===null:(Ge&62914560)===Ge||(Ge&536870912)!==0?a===ei:!1}function wO(){var a=L.H;return L.H=Wc,a===null?Wc:a}function SO(){var a=L.A;return L.A=u8,a}function Xh(){zt=4,ko||(Ge&4194048)!==Ge&&Nr.current!==null||(eu=!0),(Lo&134217727)===0&&(Ds&134217727)===0||pt===null||$o(pt,Ge,Rr,!1)}function Lb(a,s,f){var p=it;it|=2;var x=wO(),A=SO();(pt!==a||Ge!==s)&&(Wh=null,ru(a,s)),s=!1;var P=zt;e:do try{if(ut!==0&&He!==null){var k=He,U=Mr;switch(ut){case 8:kb(),P=6;break e;case 3:case 2:case 9:case 6:Nr.current===null&&(s=!0);var J=ut;if(ut=0,Mr=null,iu(a,k,U,J),f&&eu){P=0;break e}break;default:J=ut,ut=0,Mr=null,iu(a,k,U,J)}}d8(),P=zt;break}catch(ue){bO(a,ue)}while(!0);return s&&a.shellSuspendCounter++,Ma=Es=null,it=p,L.H=x,L.A=A,He===null&&(pt=null,Ge=0,gh()),P}function d8(){for(;He!==null;)AO(He)}function h8(a,s){var f=it;it|=2;var p=wO(),x=SO();pt!==a||Ge!==s?(Wh=null,Gh=Wt()+500,ru(a,s)):eu=st(a,s);e:do try{if(ut!==0&&He!==null){s=He;var A=Mr;t:switch(ut){case 1:ut=0,Mr=null,iu(a,s,A,1);break;case 2:case 9:if(Rj(A)){ut=0,Mr=null,CO(s);break}s=function(){ut!==2&&ut!==9||pt!==a||(ut=7),Ki(a)},A.then(s,s);break e;case 3:ut=7;break e;case 4:ut=5;break e;case 7:Rj(A)?(ut=0,Mr=null,CO(s)):(ut=0,Mr=null,iu(a,s,A,7));break;case 5:var P=null;switch(He.tag){case 26:P=He.memoizedState;case 5:case 27:var k=He;if(P?uP(P):k.stateNode.complete){ut=0,Mr=null;var U=k.sibling;if(U!==null)He=U;else{var J=k.return;J!==null?(He=J,Zh(J)):He=null}break t}}ut=0,Mr=null,iu(a,s,A,5);break;case 6:ut=0,Mr=null,iu(a,s,A,6);break;case 8:kb(),zt=6;break e;default:throw Error(r(462))}}m8();break}catch(ue){bO(a,ue)}while(!0);return Ma=Es=null,L.H=p,L.A=x,it=f,He!==null?0:(pt=null,Ge=0,gh(),zt)}function m8(){for(;He!==null&&!Gt();)AO(He)}function AO(a){var s=GT(a.alternate,a,Va);a.memoizedProps=a.pendingProps,s===null?Zh(a):He=s}function CO(a){var s=a,f=s.alternate;switch(s.tag){case 15:case 0:s=UT(f,s,s.pendingProps,s.type,void 0,Ge);break;case 11:s=UT(f,s,s.pendingProps,s.type.render,s.ref,Ge);break;case 5:Zy(s);default:YT(f,s),s=He=Sj(s,Va),s=GT(f,s,Va)}a.memoizedProps=a.pendingProps,s===null?Zh(a):He=s}function iu(a,s,f,p){Ma=Es=null,Zy(s),Gl=null,Bc=0;var x=s.return;try{if(n8(a,x,s,f,Ge)){zt=1,zh(a,Xr(f,a.current)),He=null;return}}catch(A){if(x!==null)throw He=x,A;zt=1,zh(a,Xr(f,a.current)),He=null;return}s.flags&32768?(Xe||p===1?a=!0:eu||(Ge&536870912)!==0?a=!1:(ko=a=!0,(p===2||p===9||p===3||p===6)&&(p=Nr.current,p!==null&&p.tag===13&&(p.flags|=16384))),EO(s,a)):Zh(s)}function Zh(a){var s=a;do{if((s.flags&32768)!==0){EO(s,ko);return}a=s.return;var f=a8(s.alternate,s,Va);if(f!==null){He=f;return}if(s=s.sibling,s!==null){He=s;return}He=s=a}while(s!==null);zt===0&&(zt=5)}function EO(a,s){do{var f=o8(a.alternate,a);if(f!==null){f.flags&=32767,He=f;return}if(f=a.return,f!==null&&(f.flags|=32768,f.subtreeFlags=0,f.deletions=null),!s&&(a=a.sibling,a!==null)){He=a;return}He=a=f}while(a!==null);zt=6,He=null}function jO(a,s,f,p,x,A,P,k,U){a.cancelPendingCommit=null;do Qh();while(cn!==0);if((it&6)!==0)throw Error(r(327));if(s!==null){if(s===a.current)throw Error(r(177));if(A=s.lanes|s.childLanes,A|=Cy,Ft(a,f,A,P,k,U),a===pt&&(He=pt=null,Ge=0),nu=s,zo=a,Fa=f,Mb=A,Rb=x,pO=p,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,y8(vi,function(){return _O(),null})):(a.callbackNode=null,a.callbackPriority=0),p=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||p){p=L.T,L.T=null,x=q.p,q.p=2,P=it,it|=4;try{s8(a,s,f)}finally{it=P,q.p=x,L.T=p}}cn=1,TO(),OO(),PO()}}function TO(){if(cn===1){cn=0;var a=zo,s=nu,f=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||f){f=L.T,L.T=null;var p=q.p;q.p=2;var x=it;it|=4;try{sO(s,a);var A=Wb,P=hj(a.containerInfo),k=A.focusedElem,U=A.selectionRange;if(P!==k&&k&&k.ownerDocument&&dj(k.ownerDocument.documentElement,k)){if(U!==null&&by(k)){var J=U.start,ue=U.end;if(ue===void 0&&(ue=J),"selectionStart"in k)k.selectionStart=J,k.selectionEnd=Math.min(ue,k.value.length);else{var fe=k.ownerDocument||document,ne=fe&&fe.defaultView||window;if(ne.getSelection){var ie=ne.getSelection(),Se=k.textContent.length,Re=Math.min(U.start,Se),mt=U.end===void 0?Re:Math.min(U.end,Se);!ie.extend&&Re>mt&&(P=mt,mt=Re,Re=P);var W=fj(k,Re),H=fj(k,mt);if(W&&H&&(ie.rangeCount!==1||ie.anchorNode!==W.node||ie.anchorOffset!==W.offset||ie.focusNode!==H.node||ie.focusOffset!==H.offset)){var Z=fe.createRange();Z.setStart(W.node,W.offset),ie.removeAllRanges(),Re>mt?(ie.addRange(Z),ie.extend(H.node,H.offset)):(Z.setEnd(H.node,H.offset),ie.addRange(Z))}}}}for(fe=[],ie=k;ie=ie.parentNode;)ie.nodeType===1&&fe.push({element:ie,left:ie.scrollLeft,top:ie.scrollTop});for(typeof k.focus=="function"&&k.focus(),k=0;k<fe.length;k++){var ce=fe[k];ce.element.scrollLeft=ce.left,ce.element.scrollTop=ce.top}}cm=!!Gb,Wb=Gb=null}finally{it=x,q.p=p,L.T=f}}a.current=s,cn=2}}function OO(){if(cn===2){cn=0;var a=zo,s=nu,f=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||f){f=L.T,L.T=null;var p=q.p;q.p=2;var x=it;it|=4;try{nO(a,s.alternate,s)}finally{it=x,q.p=p,L.T=f}}cn=3}}function PO(){if(cn===4||cn===3){cn=0,Kr();var a=zo,s=nu,f=Fa,p=pO;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?cn=5:(cn=0,nu=zo=null,NO(a,a.pendingLanes));var x=a.pendingLanes;if(x===0&&(Io=null),Tr(f),s=s.stateNode,Yt&&typeof Yt.onCommitFiberRoot=="function")try{Yt.onCommitFiberRoot(lr,s,void 0,(s.current.flags&128)===128)}catch{}if(p!==null){s=L.T,x=q.p,q.p=2,L.T=null;try{for(var A=a.onRecoverableError,P=0;P<p.length;P++){var k=p[P];A(k.value,{componentStack:k.stack})}}finally{L.T=s,q.p=x}}(Fa&3)!==0&&Qh(),Ki(a),x=a.pendingLanes,(f&261930)!==0&&(x&42)!==0?a===Db?rf++:(rf=0,Db=a):rf=0,af(0)}}function NO(a,s){(a.pooledCacheLanes&=s)===0&&(s=a.pooledCache,s!=null&&(a.pooledCache=null,zc(s)))}function Qh(){return TO(),OO(),PO(),_O()}function _O(){if(cn!==5)return!1;var a=zo,s=Mb;Mb=0;var f=Tr(Fa),p=L.T,x=q.p;try{q.p=32>f?32:f,L.T=null,f=Rb,Rb=null;var A=zo,P=Fa;if(cn=0,nu=zo=null,Fa=0,(it&6)!==0)throw Error(r(331));var k=it;if(it|=4,dO(A.current),uO(A,A.current,P,f),it=k,af(0,!1),Yt&&typeof Yt.onPostCommitFiberRoot=="function")try{Yt.onPostCommitFiberRoot(lr,A)}catch{}return!0}finally{q.p=x,L.T=p,NO(a,s)}}function MO(a,s,f){s=Xr(f,s),s=db(a.stateNode,s,2),a=_o(a,s,2),a!==null&&($e(a,2),Ki(a))}function ct(a,s,f){if(a.tag===3)MO(a,a,f);else for(;s!==null;){if(s.tag===3){MO(s,a,f);break}else if(s.tag===1){var p=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(Io===null||!Io.has(p))){a=Xr(f,a),f=RT(2),p=_o(s,f,2),p!==null&&(DT(f,p,s,a),$e(p,2),Ki(p));break}}s=s.return}}function Ib(a,s,f){var p=a.pingCache;if(p===null){p=a.pingCache=new c8;var x=new Set;p.set(s,x)}else x=p.get(s),x===void 0&&(x=new Set,p.set(s,x));x.has(f)||(Pb=!0,x.add(f),a=p8.bind(null,a,s,f),s.then(a,a))}function p8(a,s,f){var p=a.pingCache;p!==null&&p.delete(s),a.pingedLanes|=a.suspendedLanes&f,a.warmLanes&=~f,pt===a&&(Ge&f)===f&&(zt===4||zt===3&&(Ge&62914560)===Ge&&300>Wt()-Kh?(it&2)===0&&ru(a,0):Nb|=f,tu===Ge&&(tu=0)),Ki(a)}function RO(a,s){s===0&&(s=wt()),a=Ss(a,s),a!==null&&($e(a,s),Ki(a))}function g8(a){var s=a.memoizedState,f=0;s!==null&&(f=s.retryLane),RO(a,f)}function v8(a,s){var f=0;switch(a.tag){case 31:case 13:var p=a.stateNode,x=a.memoizedState;x!==null&&(f=x.retryLane);break;case 19:p=a.stateNode;break;case 22:p=a.stateNode._retryCache;break;default:throw Error(r(314))}p!==null&&p.delete(s),RO(a,f)}function y8(a,s){return $i(a,s)}var Jh=null,au=null,zb=!1,em=!1,$b=!1,Bo=0;function Ki(a){a!==au&&a.next===null&&(au===null?Jh=au=a:au=au.next=a),em=!0,zb||(zb=!0,x8())}function af(a,s){if(!$b&&em){$b=!0;do for(var f=!1,p=Jh;p!==null;){if(a!==0){var x=p.pendingLanes;if(x===0)var A=0;else{var P=p.suspendedLanes,k=p.pingedLanes;A=(1<<31-Xt(42|a)+1)-1,A&=x&~(P&~k),A=A&201326741?A&201326741|1:A?A|2:0}A!==0&&(f=!0,IO(p,A))}else A=Ge,A=we(p,p===pt?A:0,p.cancelPendingCommit!==null||p.timeoutHandle!==-1),(A&3)===0||st(p,A)||(f=!0,IO(p,A));p=p.next}while(f);$b=!1}}function b8(){DO()}function DO(){em=zb=!1;var a=0;Bo!==0&&N8()&&(a=Bo);for(var s=Wt(),f=null,p=Jh;p!==null;){var x=p.next,A=kO(p,s);A===0?(p.next=null,f===null?Jh=x:f.next=x,x===null&&(au=f)):(f=p,(a!==0||(A&3)!==0)&&(em=!0)),p=x}cn!==0&&cn!==5||af(a),Bo!==0&&(Bo=0)}function kO(a,s){for(var f=a.suspendedLanes,p=a.pingedLanes,x=a.expirationTimes,A=a.pendingLanes&-62914561;0<A;){var P=31-Xt(A),k=1<<P,U=x[P];U===-1?((k&f)===0||(k&p)!==0)&&(x[P]=lt(k,s)):U<=s&&(a.expiredLanes|=k),A&=~k}if(s=pt,f=Ge,f=we(a,a===s?f:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),p=a.callbackNode,f===0||a===s&&(ut===2||ut===9)||a.cancelPendingCommit!==null)return p!==null&&p!==null&&xa(p),a.callbackNode=null,a.callbackPriority=0;if((f&3)===0||st(a,f)){if(s=f&-f,s===a.callbackPriority)return s;switch(p!==null&&xa(p),Tr(f)){case 2:case 8:f=bo;break;case 32:f=vi;break;case 268435456:f=Er;break;default:f=vi}return p=LO.bind(null,a),f=$i(f,p),a.callbackPriority=s,a.callbackNode=f,s}return p!==null&&p!==null&&xa(p),a.callbackPriority=2,a.callbackNode=null,2}function LO(a,s){if(cn!==0&&cn!==5)return a.callbackNode=null,a.callbackPriority=0,null;var f=a.callbackNode;if(Qh()&&a.callbackNode!==f)return null;var p=Ge;return p=we(a,a===pt?p:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),p===0?null:(vO(a,p,s),kO(a,Wt()),a.callbackNode!=null&&a.callbackNode===f?LO.bind(null,a):null)}function IO(a,s){if(Qh())return null;vO(a,s,!0)}function x8(){M8(function(){(it&6)!==0?$i(gi,b8):DO()})}function Bb(){if(Bo===0){var a=ql;a===0&&(a=Bi,Bi<<=1,(Bi&261888)===0&&(Bi=256)),Bo=a}return Bo}function zO(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:lh(""+a)}function $O(a,s){var f=s.ownerDocument.createElement("input");return f.name=s.name,f.value=s.value,a.id&&f.setAttribute("form",a.id),s.parentNode.insertBefore(f,s),a=new FormData(a),f.parentNode.removeChild(f),a}function w8(a,s,f,p,x){if(s==="submit"&&f&&f.stateNode===x){var A=zO((x[qn]||null).action),P=p.submitter;P&&(s=(s=P[qn]||null)?zO(s.formAction):P.getAttribute("formAction"),s!==null&&(A=s,P=null));var k=new dh("action","action",null,p,x);a.push({event:k,listeners:[{instance:null,listener:function(){if(p.defaultPrevented){if(Bo!==0){var U=P?$O(x,P):new FormData(x);ob(f,{pending:!0,data:U,method:x.method,action:A},null,U)}}else typeof A=="function"&&(k.preventDefault(),U=P?$O(x,P):new FormData(x),ob(f,{pending:!0,data:U,method:x.method,action:A},A,U))},currentTarget:x}]})}}for(var Ub=0;Ub<Ay.length;Ub++){var Vb=Ay[Ub],S8=Vb.toLowerCase(),A8=Vb[0].toUpperCase()+Vb.slice(1);bi(S8,"on"+A8)}bi(gj,"onAnimationEnd"),bi(vj,"onAnimationIteration"),bi(yj,"onAnimationStart"),bi("dblclick","onDoubleClick"),bi("focusin","onFocus"),bi("focusout","onBlur"),bi($F,"onTransitionRun"),bi(BF,"onTransitionStart"),bi(UF,"onTransitionCancel"),bi(bj,"onTransitionEnd"),ja("onMouseEnter",["mouseout","mouseover"]),ja("onMouseLeave",["mouseout","mouseover"]),ja("onPointerEnter",["pointerout","pointerover"]),ja("onPointerLeave",["pointerout","pointerover"]),Ea("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ea("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ea("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ea("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ea("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ea("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var of="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(" "),C8=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(of));function BO(a,s){s=(s&4)!==0;for(var f=0;f<a.length;f++){var p=a[f],x=p.event;p=p.listeners;e:{var A=void 0;if(s)for(var P=p.length-1;0<=P;P--){var k=p[P],U=k.instance,J=k.currentTarget;if(k=k.listener,U!==A&&x.isPropagationStopped())break e;A=k,x.currentTarget=J;try{A(x)}catch(ue){ph(ue)}x.currentTarget=null,A=U}else for(P=0;P<p.length;P++){if(k=p[P],U=k.instance,J=k.currentTarget,k=k.listener,U!==A&&x.isPropagationStopped())break e;A=k,x.currentTarget=J;try{A(x)}catch(ue){ph(ue)}x.currentTarget=null,A=U}}}}function Ke(a,s){var f=s[Cc];f===void 0&&(f=s[Cc]=new Set);var p=a+"__bubble";f.has(p)||(UO(s,a,2,!1),f.add(p))}function Fb(a,s,f){var p=0;s&&(p|=4),UO(f,a,p,s)}var tm="_reactListening"+Math.random().toString(36).slice(2);function qb(a){if(!a[tm]){a[tm]=!0,ih.forEach(function(f){f!=="selectionchange"&&(C8.has(f)||Fb(f,!1,a),Fb(f,!0,a))});var s=a.nodeType===9?a:a.ownerDocument;s===null||s[tm]||(s[tm]=!0,Fb("selectionchange",!1,s))}}function UO(a,s,f,p){switch(gP(s)){case 2:var x=Q8;break;case 8:x=J8;break;default:x=a0}f=x.bind(null,s,f,a),x=void 0,!cy||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(x=!0),p?x!==void 0?a.addEventListener(s,f,{capture:!0,passive:x}):a.addEventListener(s,f,!0):x!==void 0?a.addEventListener(s,f,{passive:x}):a.addEventListener(s,f,!1)}function Hb(a,s,f,p,x){var A=p;if((s&1)===0&&(s&2)===0&&p!==null)e:for(;;){if(p===null)return;var P=p.tag;if(P===3||P===4){var k=p.stateNode.containerInfo;if(k===x)break;if(P===4)for(P=p.return;P!==null;){var U=P.tag;if((U===3||U===4)&&P.stateNode.containerInfo===x)return;P=P.return}for(;k!==null;){if(P=So(k),P===null)return;if(U=P.tag,U===5||U===6||U===26||U===27){p=A=P;continue e}k=k.parentNode}}p=p.return}KE(function(){var J=A,ue=ly(f),fe=[];e:{var ne=xj.get(a);if(ne!==void 0){var ie=dh,Se=a;switch(a){case"keypress":if(ch(f)===0)break e;case"keydown":case"keyup":ie=vF;break;case"focusin":Se="focus",ie=my;break;case"focusout":Se="blur",ie=my;break;case"beforeblur":case"afterblur":ie=my;break;case"click":if(f.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ie=YE;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ie=aF;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ie=xF;break;case gj:case vj:case yj:ie=lF;break;case bj:ie=SF;break;case"scroll":case"scrollend":ie=rF;break;case"wheel":ie=CF;break;case"copy":case"cut":case"paste":ie=cF;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ie=ZE;break;case"toggle":case"beforetoggle":ie=jF}var Re=(s&4)!==0,mt=!Re&&(a==="scroll"||a==="scrollend"),W=Re?ne!==null?ne+"Capture":null:ne;Re=[];for(var H=J,Z;H!==null;){var ce=H;if(Z=ce.stateNode,ce=ce.tag,ce!==5&&ce!==26&&ce!==27||Z===null||W===null||(ce=Tc(H,W),ce!=null&&Re.push(sf(H,ce,Z))),mt)break;H=H.return}0<Re.length&&(ne=new ie(ne,Se,null,f,ue),fe.push({event:ne,listeners:Re}))}}if((s&7)===0){e:{if(ne=a==="mouseover"||a==="pointerover",ie=a==="mouseout"||a==="pointerout",ne&&f!==sy&&(Se=f.relatedTarget||f.fromElement)&&(So(Se)||Se[wo]))break e;if((ie||ne)&&(ne=ue.window===ue?ue:(ne=ue.ownerDocument)?ne.defaultView||ne.parentWindow:window,ie?(Se=f.relatedTarget||f.toElement,ie=J,Se=Se?So(Se):null,Se!==null&&(mt=o(Se),Re=Se.tag,Se!==mt||Re!==5&&Re!==27&&Re!==6)&&(Se=null)):(ie=null,Se=J),ie!==Se)){if(Re=YE,ce="onMouseLeave",W="onMouseEnter",H="mouse",(a==="pointerout"||a==="pointerover")&&(Re=ZE,ce="onPointerLeave",W="onPointerEnter",H="pointer"),mt=ie==null?ne:je(ie),Z=Se==null?ne:je(Se),ne=new Re(ce,H+"leave",ie,f,ue),ne.target=mt,ne.relatedTarget=Z,ce=null,So(ue)===J&&(Re=new Re(W,H+"enter",Se,f,ue),Re.target=Z,Re.relatedTarget=mt,ce=Re),mt=ce,ie&&Se)t:{for(Re=E8,W=ie,H=Se,Z=0,ce=W;ce;ce=Re(ce))Z++;ce=0;for(var Ne=H;Ne;Ne=Re(Ne))ce++;for(;0<Z-ce;)W=Re(W),Z--;for(;0<ce-Z;)H=Re(H),ce--;for(;Z--;){if(W===H||H!==null&&W===H.alternate){Re=W;break t}W=Re(W),H=Re(H)}Re=null}else Re=null;ie!==null&&VO(fe,ne,ie,Re,!1),Se!==null&&mt!==null&&VO(fe,mt,Se,Re,!0)}}e:{if(ne=J?je(J):window,ie=ne.nodeName&&ne.nodeName.toLowerCase(),ie==="select"||ie==="input"&&ne.type==="file")var et=aj;else if(rj(ne))if(oj)et=LF;else{et=DF;var Te=RF}else ie=ne.nodeName,!ie||ie.toLowerCase()!=="input"||ne.type!=="checkbox"&&ne.type!=="radio"?J&&oy(J.elementType)&&(et=aj):et=kF;if(et&&(et=et(a,J))){ij(fe,et,f,ue);break e}Te&&Te(a,ne,J),a==="focusout"&&J&&ne.type==="number"&&J.memoizedProps.value!=null&&ay(ne,"number",ne.value)}switch(Te=J?je(J):window,a){case"focusin":(rj(Te)||Te.contentEditable==="true")&&(Ll=Te,xy=J,kc=null);break;case"focusout":kc=xy=Ll=null;break;case"mousedown":wy=!0;break;case"contextmenu":case"mouseup":case"dragend":wy=!1,mj(fe,f,ue);break;case"selectionchange":if(zF)break;case"keydown":case"keyup":mj(fe,f,ue)}var Ue;if(gy)e:{switch(a){case"compositionstart":var We="onCompositionStart";break e;case"compositionend":We="onCompositionEnd";break e;case"compositionupdate":We="onCompositionUpdate";break e}We=void 0}else kl?tj(a,f)&&(We="onCompositionEnd"):a==="keydown"&&f.keyCode===229&&(We="onCompositionStart");We&&(QE&&f.locale!=="ko"&&(kl||We!=="onCompositionStart"?We==="onCompositionEnd"&&kl&&(Ue=GE()):(Co=ue,fy="value"in Co?Co.value:Co.textContent,kl=!0)),Te=nm(J,We),0<Te.length&&(We=new XE(We,a,null,f,ue),fe.push({event:We,listeners:Te}),Ue?We.data=Ue:(Ue=nj(f),Ue!==null&&(We.data=Ue)))),(Ue=OF?PF(a,f):NF(a,f))&&(We=nm(J,"onBeforeInput"),0<We.length&&(Te=new XE("onBeforeInput","beforeinput",null,f,ue),fe.push({event:Te,listeners:We}),Te.data=Ue)),w8(fe,a,J,f,ue)}BO(fe,s)})}function sf(a,s,f){return{instance:a,listener:s,currentTarget:f}}function nm(a,s){for(var f=s+"Capture",p=[];a!==null;){var x=a,A=x.stateNode;if(x=x.tag,x!==5&&x!==26&&x!==27||A===null||(x=Tc(a,f),x!=null&&p.unshift(sf(a,x,A)),x=Tc(a,s),x!=null&&p.push(sf(a,x,A))),a.tag===3)return p;a=a.return}return[]}function E8(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function VO(a,s,f,p,x){for(var A=s._reactName,P=[];f!==null&&f!==p;){var k=f,U=k.alternate,J=k.stateNode;if(k=k.tag,U!==null&&U===p)break;k!==5&&k!==26&&k!==27||J===null||(U=J,x?(J=Tc(f,A),J!=null&&P.unshift(sf(f,J,U))):x||(J=Tc(f,A),J!=null&&P.push(sf(f,J,U)))),f=f.return}P.length!==0&&a.push({event:s,listeners:P})}var j8=/\r\n?/g,T8=/\u0000|\uFFFD/g;function FO(a){return(typeof a=="string"?a:""+a).replace(j8,`
9
- `).replace(T8,"")}function qO(a,s){return s=FO(s),FO(a)===s}function ht(a,s,f,p,x,A){switch(f){case"children":typeof p=="string"?s==="body"||s==="textarea"&&p===""||Ml(a,p):(typeof p=="number"||typeof p=="bigint")&&s!=="body"&&Ml(a,""+p);break;case"className":oh(a,"class",p);break;case"tabIndex":oh(a,"tabindex",p);break;case"dir":case"role":case"viewBox":case"width":case"height":oh(a,f,p);break;case"style":qE(a,p,A);break;case"data":if(s!=="object"){oh(a,"data",p);break}case"src":case"href":if(p===""&&(s!=="a"||f!=="href")){a.removeAttribute(f);break}if(p==null||typeof p=="function"||typeof p=="symbol"||typeof p=="boolean"){a.removeAttribute(f);break}p=lh(""+p),a.setAttribute(f,p);break;case"action":case"formAction":if(typeof p=="function"){a.setAttribute(f,"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 A=="function"&&(f==="formAction"?(s!=="input"&&ht(a,s,"name",x.name,x,null),ht(a,s,"formEncType",x.formEncType,x,null),ht(a,s,"formMethod",x.formMethod,x,null),ht(a,s,"formTarget",x.formTarget,x,null)):(ht(a,s,"encType",x.encType,x,null),ht(a,s,"method",x.method,x,null),ht(a,s,"target",x.target,x,null)));if(p==null||typeof p=="symbol"||typeof p=="boolean"){a.removeAttribute(f);break}p=lh(""+p),a.setAttribute(f,p);break;case"onClick":p!=null&&(a.onclick=Oa);break;case"onScroll":p!=null&&Ke("scroll",a);break;case"onScrollEnd":p!=null&&Ke("scrollend",a);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(r(61));if(f=p.__html,f!=null){if(x.children!=null)throw Error(r(60));a.innerHTML=f}}break;case"multiple":a.multiple=p&&typeof p!="function"&&typeof p!="symbol";break;case"muted":a.muted=p&&typeof p!="function"&&typeof p!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(p==null||typeof p=="function"||typeof p=="boolean"||typeof p=="symbol"){a.removeAttribute("xlink:href");break}f=lh(""+p),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",f);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":p!=null&&typeof p!="function"&&typeof p!="symbol"?a.setAttribute(f,""+p):a.removeAttribute(f);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":p&&typeof p!="function"&&typeof p!="symbol"?a.setAttribute(f,""):a.removeAttribute(f);break;case"capture":case"download":p===!0?a.setAttribute(f,""):p!==!1&&p!=null&&typeof p!="function"&&typeof p!="symbol"?a.setAttribute(f,p):a.removeAttribute(f);break;case"cols":case"rows":case"size":case"span":p!=null&&typeof p!="function"&&typeof p!="symbol"&&!isNaN(p)&&1<=p?a.setAttribute(f,p):a.removeAttribute(f);break;case"rowSpan":case"start":p==null||typeof p=="function"||typeof p=="symbol"||isNaN(p)?a.removeAttribute(f):a.setAttribute(f,p);break;case"popover":Ke("beforetoggle",a),Ke("toggle",a),ah(a,"popover",p);break;case"xlinkActuate":Ta(a,"http://www.w3.org/1999/xlink","xlink:actuate",p);break;case"xlinkArcrole":Ta(a,"http://www.w3.org/1999/xlink","xlink:arcrole",p);break;case"xlinkRole":Ta(a,"http://www.w3.org/1999/xlink","xlink:role",p);break;case"xlinkShow":Ta(a,"http://www.w3.org/1999/xlink","xlink:show",p);break;case"xlinkTitle":Ta(a,"http://www.w3.org/1999/xlink","xlink:title",p);break;case"xlinkType":Ta(a,"http://www.w3.org/1999/xlink","xlink:type",p);break;case"xmlBase":Ta(a,"http://www.w3.org/XML/1998/namespace","xml:base",p);break;case"xmlLang":Ta(a,"http://www.w3.org/XML/1998/namespace","xml:lang",p);break;case"xmlSpace":Ta(a,"http://www.w3.org/XML/1998/namespace","xml:space",p);break;case"is":ah(a,"is",p);break;case"innerText":case"textContent":break;default:(!(2<f.length)||f[0]!=="o"&&f[0]!=="O"||f[1]!=="n"&&f[1]!=="N")&&(f=tF.get(f)||f,ah(a,f,p))}}function Kb(a,s,f,p,x,A){switch(f){case"style":qE(a,p,A);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(r(61));if(f=p.__html,f!=null){if(x.children!=null)throw Error(r(60));a.innerHTML=f}}break;case"children":typeof p=="string"?Ml(a,p):(typeof p=="number"||typeof p=="bigint")&&Ml(a,""+p);break;case"onScroll":p!=null&&Ke("scroll",a);break;case"onScrollEnd":p!=null&&Ke("scrollend",a);break;case"onClick":p!=null&&(a.onclick=Oa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!jc.hasOwnProperty(f))e:{if(f[0]==="o"&&f[1]==="n"&&(x=f.endsWith("Capture"),s=f.slice(2,x?f.length-7:void 0),A=a[qn]||null,A=A!=null?A[f]:null,typeof A=="function"&&a.removeEventListener(s,A,x),typeof p=="function")){typeof A!="function"&&A!==null&&(f in a?a[f]=null:a.hasAttribute(f)&&a.removeAttribute(f)),a.addEventListener(s,p,x);break e}f in a?a[f]=p:p===!0?a.setAttribute(f,""):ah(a,f,p)}}}function Nn(a,s,f){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ke("error",a),Ke("load",a);var p=!1,x=!1,A;for(A in f)if(f.hasOwnProperty(A)){var P=f[A];if(P!=null)switch(A){case"src":p=!0;break;case"srcSet":x=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:ht(a,s,A,P,f,null)}}x&&ht(a,s,"srcSet",f.srcSet,f,null),p&&ht(a,s,"src",f.src,f,null);return;case"input":Ke("invalid",a);var k=A=P=x=null,U=null,J=null;for(p in f)if(f.hasOwnProperty(p)){var ue=f[p];if(ue!=null)switch(p){case"name":x=ue;break;case"type":P=ue;break;case"checked":U=ue;break;case"defaultChecked":J=ue;break;case"value":A=ue;break;case"defaultValue":k=ue;break;case"children":case"dangerouslySetInnerHTML":if(ue!=null)throw Error(r(137,s));break;default:ht(a,s,p,ue,f,null)}}BE(a,A,k,U,J,P,x,!1);return;case"select":Ke("invalid",a),p=P=A=null;for(x in f)if(f.hasOwnProperty(x)&&(k=f[x],k!=null))switch(x){case"value":A=k;break;case"defaultValue":P=k;break;case"multiple":p=k;default:ht(a,s,x,k,f,null)}s=A,f=P,a.multiple=!!p,s!=null?_l(a,!!p,s,!1):f!=null&&_l(a,!!p,f,!0);return;case"textarea":Ke("invalid",a),A=x=p=null;for(P in f)if(f.hasOwnProperty(P)&&(k=f[P],k!=null))switch(P){case"value":p=k;break;case"defaultValue":x=k;break;case"children":A=k;break;case"dangerouslySetInnerHTML":if(k!=null)throw Error(r(91));break;default:ht(a,s,P,k,f,null)}VE(a,p,x,A);return;case"option":for(U in f)f.hasOwnProperty(U)&&(p=f[U],p!=null)&&(U==="selected"?a.selected=p&&typeof p!="function"&&typeof p!="symbol":ht(a,s,U,p,f,null));return;case"dialog":Ke("beforetoggle",a),Ke("toggle",a),Ke("cancel",a),Ke("close",a);break;case"iframe":case"object":Ke("load",a);break;case"video":case"audio":for(p=0;p<of.length;p++)Ke(of[p],a);break;case"image":Ke("error",a),Ke("load",a);break;case"details":Ke("toggle",a);break;case"embed":case"source":case"link":Ke("error",a),Ke("load",a);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(J in f)if(f.hasOwnProperty(J)&&(p=f[J],p!=null))switch(J){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:ht(a,s,J,p,f,null)}return;default:if(oy(s)){for(ue in f)f.hasOwnProperty(ue)&&(p=f[ue],p!==void 0&&Kb(a,s,ue,p,f,void 0));return}}for(k in f)f.hasOwnProperty(k)&&(p=f[k],p!=null&&ht(a,s,k,p,f,null))}function O8(a,s,f,p){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var x=null,A=null,P=null,k=null,U=null,J=null,ue=null;for(ie in f){var fe=f[ie];if(f.hasOwnProperty(ie)&&fe!=null)switch(ie){case"checked":break;case"value":break;case"defaultValue":U=fe;default:p.hasOwnProperty(ie)||ht(a,s,ie,null,p,fe)}}for(var ne in p){var ie=p[ne];if(fe=f[ne],p.hasOwnProperty(ne)&&(ie!=null||fe!=null))switch(ne){case"type":A=ie;break;case"name":x=ie;break;case"checked":J=ie;break;case"defaultChecked":ue=ie;break;case"value":P=ie;break;case"defaultValue":k=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(r(137,s));break;default:ie!==fe&&ht(a,s,ne,ie,p,fe)}}iy(a,P,k,U,J,ue,A,x);return;case"select":ie=P=k=ne=null;for(A in f)if(U=f[A],f.hasOwnProperty(A)&&U!=null)switch(A){case"value":break;case"multiple":ie=U;default:p.hasOwnProperty(A)||ht(a,s,A,null,p,U)}for(x in p)if(A=p[x],U=f[x],p.hasOwnProperty(x)&&(A!=null||U!=null))switch(x){case"value":ne=A;break;case"defaultValue":k=A;break;case"multiple":P=A;default:A!==U&&ht(a,s,x,A,p,U)}s=k,f=P,p=ie,ne!=null?_l(a,!!f,ne,!1):!!p!=!!f&&(s!=null?_l(a,!!f,s,!0):_l(a,!!f,f?[]:"",!1));return;case"textarea":ie=ne=null;for(k in f)if(x=f[k],f.hasOwnProperty(k)&&x!=null&&!p.hasOwnProperty(k))switch(k){case"value":break;case"children":break;default:ht(a,s,k,null,p,x)}for(P in p)if(x=p[P],A=f[P],p.hasOwnProperty(P)&&(x!=null||A!=null))switch(P){case"value":ne=x;break;case"defaultValue":ie=x;break;case"children":break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(r(91));break;default:x!==A&&ht(a,s,P,x,p,A)}UE(a,ne,ie);return;case"option":for(var Se in f)ne=f[Se],f.hasOwnProperty(Se)&&ne!=null&&!p.hasOwnProperty(Se)&&(Se==="selected"?a.selected=!1:ht(a,s,Se,null,p,ne));for(U in p)ne=p[U],ie=f[U],p.hasOwnProperty(U)&&ne!==ie&&(ne!=null||ie!=null)&&(U==="selected"?a.selected=ne&&typeof ne!="function"&&typeof ne!="symbol":ht(a,s,U,ne,p,ie));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 Re in f)ne=f[Re],f.hasOwnProperty(Re)&&ne!=null&&!p.hasOwnProperty(Re)&&ht(a,s,Re,null,p,ne);for(J in p)if(ne=p[J],ie=f[J],p.hasOwnProperty(J)&&ne!==ie&&(ne!=null||ie!=null))switch(J){case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(r(137,s));break;default:ht(a,s,J,ne,p,ie)}return;default:if(oy(s)){for(var mt in f)ne=f[mt],f.hasOwnProperty(mt)&&ne!==void 0&&!p.hasOwnProperty(mt)&&Kb(a,s,mt,void 0,p,ne);for(ue in p)ne=p[ue],ie=f[ue],!p.hasOwnProperty(ue)||ne===ie||ne===void 0&&ie===void 0||Kb(a,s,ue,ne,p,ie);return}}for(var W in f)ne=f[W],f.hasOwnProperty(W)&&ne!=null&&!p.hasOwnProperty(W)&&ht(a,s,W,null,p,ne);for(fe in p)ne=p[fe],ie=f[fe],!p.hasOwnProperty(fe)||ne===ie||ne==null&&ie==null||ht(a,s,fe,ne,p,ie)}function HO(a){switch(a){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function P8(){if(typeof performance.getEntriesByType=="function"){for(var a=0,s=0,f=performance.getEntriesByType("resource"),p=0;p<f.length;p++){var x=f[p],A=x.transferSize,P=x.initiatorType,k=x.duration;if(A&&k&&HO(P)){for(P=0,k=x.responseEnd,p+=1;p<f.length;p++){var U=f[p],J=U.startTime;if(J>k)break;var ue=U.transferSize,fe=U.initiatorType;ue&&HO(fe)&&(U=U.responseEnd,P+=ue*(U<k?1:(k-J)/(U-J)))}if(--p,s+=8*(A+P)/(x.duration/1e3),a++,10<a)break}}if(0<a)return s/a/1e6}return navigator.connection&&(a=navigator.connection.downlink,typeof a=="number")?a:5}var Gb=null,Wb=null;function rm(a){return a.nodeType===9?a:a.ownerDocument}function KO(a){switch(a){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function GO(a,s){if(a===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return a===1&&s==="foreignObject"?0:a}function Yb(a,s){return a==="textarea"||a==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var Xb=null;function N8(){var a=window.event;return a&&a.type==="popstate"?a===Xb?!1:(Xb=a,!0):(Xb=null,!1)}var WO=typeof setTimeout=="function"?setTimeout:void 0,_8=typeof clearTimeout=="function"?clearTimeout:void 0,YO=typeof Promise=="function"?Promise:void 0,M8=typeof queueMicrotask=="function"?queueMicrotask:typeof YO<"u"?function(a){return YO.resolve(null).then(a).catch(R8)}:WO;function R8(a){setTimeout(function(){throw a})}function Uo(a){return a==="head"}function XO(a,s){var f=s,p=0;do{var x=f.nextSibling;if(a.removeChild(f),x&&x.nodeType===8)if(f=x.data,f==="/$"||f==="/&"){if(p===0){a.removeChild(x),uu(s);return}p--}else if(f==="$"||f==="$?"||f==="$~"||f==="$!"||f==="&")p++;else if(f==="html")lf(a.ownerDocument.documentElement);else if(f==="head"){f=a.ownerDocument.head,lf(f);for(var A=f.firstChild;A;){var P=A.nextSibling,k=A.nodeName;A[ys]||k==="SCRIPT"||k==="STYLE"||k==="LINK"&&A.rel.toLowerCase()==="stylesheet"||f.removeChild(A),A=P}}else f==="body"&&lf(a.ownerDocument.body);f=x}while(f);uu(s)}function ZO(a,s){var f=a;a=0;do{var p=f.nextSibling;if(f.nodeType===1?s?(f._stashedDisplay=f.style.display,f.style.display="none"):(f.style.display=f._stashedDisplay||"",f.getAttribute("style")===""&&f.removeAttribute("style")):f.nodeType===3&&(s?(f._stashedText=f.nodeValue,f.nodeValue=""):f.nodeValue=f._stashedText||""),p&&p.nodeType===8)if(f=p.data,f==="/$"){if(a===0)break;a--}else f!=="$"&&f!=="$?"&&f!=="$~"&&f!=="$!"||a++;f=p}while(f)}function Zb(a){var s=a.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var f=s;switch(s=s.nextSibling,f.nodeName){case"HTML":case"HEAD":case"BODY":Zb(f),Ec(f);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(f.rel.toLowerCase()==="stylesheet")continue}a.removeChild(f)}}function D8(a,s,f,p){for(;a.nodeType===1;){var x=f;if(a.nodeName.toLowerCase()!==s.toLowerCase()){if(!p&&(a.nodeName!=="INPUT"||a.type!=="hidden"))break}else if(p){if(!a[ys])switch(s){case"meta":if(!a.hasAttribute("itemprop"))break;return a;case"link":if(A=a.getAttribute("rel"),A==="stylesheet"&&a.hasAttribute("data-precedence"))break;if(A!==x.rel||a.getAttribute("href")!==(x.href==null||x.href===""?null:x.href)||a.getAttribute("crossorigin")!==(x.crossOrigin==null?null:x.crossOrigin)||a.getAttribute("title")!==(x.title==null?null:x.title))break;return a;case"style":if(a.hasAttribute("data-precedence"))break;return a;case"script":if(A=a.getAttribute("src"),(A!==(x.src==null?null:x.src)||a.getAttribute("type")!==(x.type==null?null:x.type)||a.getAttribute("crossorigin")!==(x.crossOrigin==null?null:x.crossOrigin))&&A&&a.hasAttribute("async")&&!a.hasAttribute("itemprop"))break;return a;default:return a}}else if(s==="input"&&a.type==="hidden"){var A=x.name==null?null:""+x.name;if(x.type==="hidden"&&a.getAttribute("name")===A)return a}else return a;if(a=ti(a.nextSibling),a===null)break}return null}function k8(a,s,f){if(s==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!f||(a=ti(a.nextSibling),a===null))return null;return a}function QO(a,s){for(;a.nodeType!==8;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!s||(a=ti(a.nextSibling),a===null))return null;return a}function Qb(a){return a.data==="$?"||a.data==="$~"}function Jb(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState!=="loading"}function L8(a,s){var f=a.ownerDocument;if(a.data==="$~")a._reactRetry=s;else if(a.data!=="$?"||f.readyState!=="loading")s();else{var p=function(){s(),f.removeEventListener("DOMContentLoaded",p)};f.addEventListener("DOMContentLoaded",p),a._reactRetry=p}}function ti(a){for(;a!=null;a=a.nextSibling){var s=a.nodeType;if(s===1||s===3)break;if(s===8){if(s=a.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return a}var e0=null;function JO(a){a=a.nextSibling;for(var s=0;a;){if(a.nodeType===8){var f=a.data;if(f==="/$"||f==="/&"){if(s===0)return ti(a.nextSibling);s--}else f!=="$"&&f!=="$!"&&f!=="$?"&&f!=="$~"&&f!=="&"||s++}a=a.nextSibling}return null}function eP(a){a=a.previousSibling;for(var s=0;a;){if(a.nodeType===8){var f=a.data;if(f==="$"||f==="$!"||f==="$?"||f==="$~"||f==="&"){if(s===0)return a;s--}else f!=="/$"&&f!=="/&"||s++}a=a.previousSibling}return null}function tP(a,s,f){switch(s=rm(f),a){case"html":if(a=s.documentElement,!a)throw Error(r(452));return a;case"head":if(a=s.head,!a)throw Error(r(453));return a;case"body":if(a=s.body,!a)throw Error(r(454));return a;default:throw Error(r(451))}}function lf(a){for(var s=a.attributes;s.length;)a.removeAttributeNode(s[0]);Ec(a)}var ni=new Map,nP=new Set;function im(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var qa=q.d;q.d={f:I8,r:z8,D:$8,C:B8,L:U8,m:V8,X:q8,S:F8,M:H8};function I8(){var a=qa.f(),s=Yh();return a||s}function z8(a){var s=Ao(a);s!==null&&s.tag===5&&s.type==="form"?bT(s):qa.r(a)}var ou=typeof document>"u"?null:document;function rP(a,s,f){var p=ou;if(p&&typeof s=="string"&&s){var x=Wr(s);x='link[rel="'+a+'"][href="'+x+'"]',typeof f=="string"&&(x+='[crossorigin="'+f+'"]'),nP.has(x)||(nP.add(x),a={rel:a,crossOrigin:f,href:s},p.querySelector(x)===null&&(s=p.createElement("link"),Nn(s,"link",a),Je(s),p.head.appendChild(s)))}}function $8(a){qa.D(a),rP("dns-prefetch",a,null)}function B8(a,s){qa.C(a,s),rP("preconnect",a,s)}function U8(a,s,f){qa.L(a,s,f);var p=ou;if(p&&a&&s){var x='link[rel="preload"][as="'+Wr(s)+'"]';s==="image"&&f&&f.imageSrcSet?(x+='[imagesrcset="'+Wr(f.imageSrcSet)+'"]',typeof f.imageSizes=="string"&&(x+='[imagesizes="'+Wr(f.imageSizes)+'"]')):x+='[href="'+Wr(a)+'"]';var A=x;switch(s){case"style":A=su(a);break;case"script":A=lu(a)}ni.has(A)||(a=h({rel:"preload",href:s==="image"&&f&&f.imageSrcSet?void 0:a,as:s},f),ni.set(A,a),p.querySelector(x)!==null||s==="style"&&p.querySelector(uf(A))||s==="script"&&p.querySelector(cf(A))||(s=p.createElement("link"),Nn(s,"link",a),Je(s),p.head.appendChild(s)))}}function V8(a,s){qa.m(a,s);var f=ou;if(f&&a){var p=s&&typeof s.as=="string"?s.as:"script",x='link[rel="modulepreload"][as="'+Wr(p)+'"][href="'+Wr(a)+'"]',A=x;switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":A=lu(a)}if(!ni.has(A)&&(a=h({rel:"modulepreload",href:a},s),ni.set(A,a),f.querySelector(x)===null)){switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(f.querySelector(cf(A)))return}p=f.createElement("link"),Nn(p,"link",a),Je(p),f.head.appendChild(p)}}}function F8(a,s,f){qa.S(a,s,f);var p=ou;if(p&&a){var x=_e(p).hoistableStyles,A=su(a);s=s||"default";var P=x.get(A);if(!P){var k={loading:0,preload:null};if(P=p.querySelector(uf(A)))k.loading=5;else{a=h({rel:"stylesheet",href:a,"data-precedence":s},f),(f=ni.get(A))&&t0(a,f);var U=P=p.createElement("link");Je(U),Nn(U,"link",a),U._p=new Promise(function(J,ue){U.onload=J,U.onerror=ue}),U.addEventListener("load",function(){k.loading|=1}),U.addEventListener("error",function(){k.loading|=2}),k.loading|=4,am(P,s,p)}P={type:"stylesheet",instance:P,count:1,state:k},x.set(A,P)}}}function q8(a,s){qa.X(a,s);var f=ou;if(f&&a){var p=_e(f).hoistableScripts,x=lu(a),A=p.get(x);A||(A=f.querySelector(cf(x)),A||(a=h({src:a,async:!0},s),(s=ni.get(x))&&n0(a,s),A=f.createElement("script"),Je(A),Nn(A,"link",a),f.head.appendChild(A)),A={type:"script",instance:A,count:1,state:null},p.set(x,A))}}function H8(a,s){qa.M(a,s);var f=ou;if(f&&a){var p=_e(f).hoistableScripts,x=lu(a),A=p.get(x);A||(A=f.querySelector(cf(x)),A||(a=h({src:a,async:!0,type:"module"},s),(s=ni.get(x))&&n0(a,s),A=f.createElement("script"),Je(A),Nn(A,"link",a),f.head.appendChild(A)),A={type:"script",instance:A,count:1,state:null},p.set(x,A))}}function iP(a,s,f,p){var x=(x=ye.current)?im(x):null;if(!x)throw Error(r(446));switch(a){case"meta":case"title":return null;case"style":return typeof f.precedence=="string"&&typeof f.href=="string"?(s=su(f.href),f=_e(x).hoistableStyles,p=f.get(s),p||(p={type:"style",instance:null,count:0,state:null},f.set(s,p)),p):{type:"void",instance:null,count:0,state:null};case"link":if(f.rel==="stylesheet"&&typeof f.href=="string"&&typeof f.precedence=="string"){a=su(f.href);var A=_e(x).hoistableStyles,P=A.get(a);if(P||(x=x.ownerDocument||x,P={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},A.set(a,P),(A=x.querySelector(uf(a)))&&!A._p&&(P.instance=A,P.state.loading=5),ni.has(a)||(f={rel:"preload",as:"style",href:f.href,crossOrigin:f.crossOrigin,integrity:f.integrity,media:f.media,hrefLang:f.hrefLang,referrerPolicy:f.referrerPolicy},ni.set(a,f),A||K8(x,a,f,P.state))),s&&p===null)throw Error(r(528,""));return P}if(s&&p!==null)throw Error(r(529,""));return null;case"script":return s=f.async,f=f.src,typeof f=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=lu(f),f=_e(x).hoistableScripts,p=f.get(s),p||(p={type:"script",instance:null,count:0,state:null},f.set(s,p)),p):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,a))}}function su(a){return'href="'+Wr(a)+'"'}function uf(a){return'link[rel="stylesheet"]['+a+"]"}function aP(a){return h({},a,{"data-precedence":a.precedence,precedence:null})}function K8(a,s,f,p){a.querySelector('link[rel="preload"][as="style"]['+s+"]")?p.loading=1:(s=a.createElement("link"),p.preload=s,s.addEventListener("load",function(){return p.loading|=1}),s.addEventListener("error",function(){return p.loading|=2}),Nn(s,"link",f),Je(s),a.head.appendChild(s))}function lu(a){return'[src="'+Wr(a)+'"]'}function cf(a){return"script[async]"+a}function oP(a,s,f){if(s.count++,s.instance===null)switch(s.type){case"style":var p=a.querySelector('style[data-href~="'+Wr(f.href)+'"]');if(p)return s.instance=p,Je(p),p;var x=h({},f,{"data-href":f.href,"data-precedence":f.precedence,href:null,precedence:null});return p=(a.ownerDocument||a).createElement("style"),Je(p),Nn(p,"style",x),am(p,f.precedence,a),s.instance=p;case"stylesheet":x=su(f.href);var A=a.querySelector(uf(x));if(A)return s.state.loading|=4,s.instance=A,Je(A),A;p=aP(f),(x=ni.get(x))&&t0(p,x),A=(a.ownerDocument||a).createElement("link"),Je(A);var P=A;return P._p=new Promise(function(k,U){P.onload=k,P.onerror=U}),Nn(A,"link",p),s.state.loading|=4,am(A,f.precedence,a),s.instance=A;case"script":return A=lu(f.src),(x=a.querySelector(cf(A)))?(s.instance=x,Je(x),x):(p=f,(x=ni.get(A))&&(p=h({},f),n0(p,x)),a=a.ownerDocument||a,x=a.createElement("script"),Je(x),Nn(x,"link",p),a.head.appendChild(x),s.instance=x);case"void":return null;default:throw Error(r(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(p=s.instance,s.state.loading|=4,am(p,f.precedence,a));return s.instance}function am(a,s,f){for(var p=f.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),x=p.length?p[p.length-1]:null,A=x,P=0;P<p.length;P++){var k=p[P];if(k.dataset.precedence===s)A=k;else if(A!==x)break}A?A.parentNode.insertBefore(a,A.nextSibling):(s=f.nodeType===9?f.head:f,s.insertBefore(a,s.firstChild))}function t0(a,s){a.crossOrigin==null&&(a.crossOrigin=s.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=s.referrerPolicy),a.title==null&&(a.title=s.title)}function n0(a,s){a.crossOrigin==null&&(a.crossOrigin=s.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=s.referrerPolicy),a.integrity==null&&(a.integrity=s.integrity)}var om=null;function sP(a,s,f){if(om===null){var p=new Map,x=om=new Map;x.set(f,p)}else x=om,p=x.get(f),p||(p=new Map,x.set(f,p));if(p.has(a))return p;for(p.set(a,null),f=f.getElementsByTagName(a),x=0;x<f.length;x++){var A=f[x];if(!(A[ys]||A[un]||a==="link"&&A.getAttribute("rel")==="stylesheet")&&A.namespaceURI!=="http://www.w3.org/2000/svg"){var P=A.getAttribute(s)||"";P=a+P;var k=p.get(P);k?k.push(A):p.set(P,[A])}}return p}function lP(a,s,f){a=a.ownerDocument||a,a.head.insertBefore(f,s==="title"?a.querySelector("head > title"):null)}function G8(a,s,f){if(f===1||s.itemProp!=null)return!1;switch(a){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;return s.rel==="stylesheet"?(a=s.disabled,typeof s.precedence=="string"&&a==null):!0;case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function uP(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function W8(a,s,f,p){if(f.type==="stylesheet"&&(typeof p.media!="string"||matchMedia(p.media).matches!==!1)&&(f.state.loading&4)===0){if(f.instance===null){var x=su(p.href),A=s.querySelector(uf(x));if(A){s=A._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(a.count++,a=sm.bind(a),s.then(a,a)),f.state.loading|=4,f.instance=A,Je(A);return}A=s.ownerDocument||s,p=aP(p),(x=ni.get(x))&&t0(p,x),A=A.createElement("link"),Je(A);var P=A;P._p=new Promise(function(k,U){P.onload=k,P.onerror=U}),Nn(A,"link",p),f.instance=A}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(f,s),(s=f.state.preload)&&(f.state.loading&3)===0&&(a.count++,f=sm.bind(a),s.addEventListener("load",f),s.addEventListener("error",f))}}var r0=0;function Y8(a,s){return a.stylesheets&&a.count===0&&um(a,a.stylesheets),0<a.count||0<a.imgCount?function(f){var p=setTimeout(function(){if(a.stylesheets&&um(a,a.stylesheets),a.unsuspend){var A=a.unsuspend;a.unsuspend=null,A()}},6e4+s);0<a.imgBytes&&r0===0&&(r0=62500*P8());var x=setTimeout(function(){if(a.waitingForImages=!1,a.count===0&&(a.stylesheets&&um(a,a.stylesheets),a.unsuspend)){var A=a.unsuspend;a.unsuspend=null,A()}},(a.imgBytes>r0?50:800)+s);return a.unsuspend=f,function(){a.unsuspend=null,clearTimeout(p),clearTimeout(x)}}:null}function sm(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)um(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var lm=null;function um(a,s){a.stylesheets=null,a.unsuspend!==null&&(a.count++,lm=new Map,s.forEach(X8,a),lm=null,sm.call(a))}function X8(a,s){if(!(s.state.loading&4)){var f=lm.get(a);if(f)var p=f.get(null);else{f=new Map,lm.set(a,f);for(var x=a.querySelectorAll("link[data-precedence],style[data-precedence]"),A=0;A<x.length;A++){var P=x[A];(P.nodeName==="LINK"||P.getAttribute("media")!=="not all")&&(f.set(P.dataset.precedence,P),p=P)}p&&f.set(null,p)}x=s.instance,P=x.getAttribute("data-precedence"),A=f.get(P)||p,A===p&&f.set(null,x),f.set(P,x),this.count++,p=sm.bind(this),x.addEventListener("load",p),x.addEventListener("error",p),A?A.parentNode.insertBefore(x,A.nextSibling):(a=a.nodeType===9?a.head:a,a.insertBefore(x,a.firstChild)),s.state.loading|=4}}var ff={$$typeof:T,Provider:null,Consumer:null,_currentValue:B,_currentValue2:B,_threadCount:0};function Z8(a,s,f,p,x,A,P,k,U){this.tag=1,this.containerInfo=a,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=jr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=jr(0),this.hiddenUpdates=jr(null),this.identifierPrefix=p,this.onUncaughtError=x,this.onCaughtError=A,this.onRecoverableError=P,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=U,this.incompleteTransitions=new Map}function cP(a,s,f,p,x,A,P,k,U,J,ue,fe){return a=new Z8(a,s,f,P,U,J,ue,fe,k),s=1,A===!0&&(s|=24),A=Pr(3,null,null,s),a.current=A,A.stateNode=a,s=Ly(),s.refCount++,a.pooledCache=s,s.refCount++,A.memoizedState={element:p,isDehydrated:f,cache:s},By(A),a}function fP(a){return a?(a=$l,a):$l}function dP(a,s,f,p,x,A){x=fP(x),p.context===null?p.context=x:p.pendingContext=x,p=No(s),p.payload={element:f},A=A===void 0?null:A,A!==null&&(p.callback=A),f=_o(a,p,s),f!==null&&(gr(f,a,s),Vc(f,a,s))}function hP(a,s){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var f=a.retryLane;a.retryLane=f!==0&&f<s?f:s}}function i0(a,s){hP(a,s),(a=a.alternate)&&hP(a,s)}function mP(a){if(a.tag===13||a.tag===31){var s=Ss(a,67108864);s!==null&&gr(s,a,67108864),i0(a,67108864)}}function pP(a){if(a.tag===13||a.tag===31){var s=Dr();s=xo(s);var f=Ss(a,s);f!==null&&gr(f,a,s),i0(a,s)}}var cm=!0;function Q8(a,s,f,p){var x=L.T;L.T=null;var A=q.p;try{q.p=2,a0(a,s,f,p)}finally{q.p=A,L.T=x}}function J8(a,s,f,p){var x=L.T;L.T=null;var A=q.p;try{q.p=8,a0(a,s,f,p)}finally{q.p=A,L.T=x}}function a0(a,s,f,p){if(cm){var x=o0(p);if(x===null)Hb(a,s,p,fm,f),vP(a,p);else if(tq(x,a,s,f,p))p.stopPropagation();else if(vP(a,p),s&4&&-1<eq.indexOf(a)){for(;x!==null;){var A=Ao(x);if(A!==null)switch(A.tag){case 3:if(A=A.stateNode,A.current.memoizedState.isDehydrated){var P=cr(A.pendingLanes);if(P!==0){var k=A;for(k.pendingLanes|=2,k.entangledLanes|=2;P;){var U=1<<31-Xt(P);k.entanglements[1]|=U,P&=~U}Ki(A),(it&6)===0&&(Gh=Wt()+500,af(0))}}break;case 31:case 13:k=Ss(A,2),k!==null&&gr(k,A,2),Yh(),i0(A,2)}if(A=o0(p),A===null&&Hb(a,s,p,fm,f),A===x)break;x=A}x!==null&&p.stopPropagation()}else Hb(a,s,p,null,f)}}function o0(a){return a=ly(a),s0(a)}var fm=null;function s0(a){if(fm=null,a=So(a),a!==null){var s=o(a);if(s===null)a=null;else{var f=s.tag;if(f===13){if(a=l(s),a!==null)return a;a=null}else if(f===31){if(a=u(s),a!==null)return a;a=null}else if(f===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;a=null}else s!==a&&(a=null)}}return fm=a,null}function gP(a){switch(a){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(gs()){case gi:return 2;case bo:return 8;case vi:case wa:return 32;case Er:return 268435456;default:return 32}default:return 32}}var l0=!1,Vo=null,Fo=null,qo=null,df=new Map,hf=new Map,Ho=[],eq="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 vP(a,s){switch(a){case"focusin":case"focusout":Vo=null;break;case"dragenter":case"dragleave":Fo=null;break;case"mouseover":case"mouseout":qo=null;break;case"pointerover":case"pointerout":df.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":hf.delete(s.pointerId)}}function mf(a,s,f,p,x,A){return a===null||a.nativeEvent!==A?(a={blockedOn:s,domEventName:f,eventSystemFlags:p,nativeEvent:A,targetContainers:[x]},s!==null&&(s=Ao(s),s!==null&&mP(s)),a):(a.eventSystemFlags|=p,s=a.targetContainers,x!==null&&s.indexOf(x)===-1&&s.push(x),a)}function tq(a,s,f,p,x){switch(s){case"focusin":return Vo=mf(Vo,a,s,f,p,x),!0;case"dragenter":return Fo=mf(Fo,a,s,f,p,x),!0;case"mouseover":return qo=mf(qo,a,s,f,p,x),!0;case"pointerover":var A=x.pointerId;return df.set(A,mf(df.get(A)||null,a,s,f,p,x)),!0;case"gotpointercapture":return A=x.pointerId,hf.set(A,mf(hf.get(A)||null,a,s,f,p,x)),!0}return!1}function yP(a){var s=So(a.target);if(s!==null){var f=o(s);if(f!==null){if(s=f.tag,s===13){if(s=l(f),s!==null){a.blockedOn=s,nh(a.priority,function(){pP(f)});return}}else if(s===31){if(s=u(f),s!==null){a.blockedOn=s,nh(a.priority,function(){pP(f)});return}}else if(s===3&&f.stateNode.current.memoizedState.isDehydrated){a.blockedOn=f.tag===3?f.stateNode.containerInfo:null;return}}}a.blockedOn=null}function dm(a){if(a.blockedOn!==null)return!1;for(var s=a.targetContainers;0<s.length;){var f=o0(a.nativeEvent);if(f===null){f=a.nativeEvent;var p=new f.constructor(f.type,f);sy=p,f.target.dispatchEvent(p),sy=null}else return s=Ao(f),s!==null&&mP(s),a.blockedOn=f,!1;s.shift()}return!0}function bP(a,s,f){dm(a)&&f.delete(s)}function nq(){l0=!1,Vo!==null&&dm(Vo)&&(Vo=null),Fo!==null&&dm(Fo)&&(Fo=null),qo!==null&&dm(qo)&&(qo=null),df.forEach(bP),hf.forEach(bP)}function hm(a,s){a.blockedOn===s&&(a.blockedOn=null,l0||(l0=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,nq)))}var mm=null;function xP(a){mm!==a&&(mm=a,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){mm===a&&(mm=null);for(var s=0;s<a.length;s+=3){var f=a[s],p=a[s+1],x=a[s+2];if(typeof p!="function"){if(s0(p||f)===null)continue;break}var A=Ao(f);A!==null&&(a.splice(s,3),s-=3,ob(A,{pending:!0,data:x,method:f.method,action:p},p,x))}}))}function uu(a){function s(U){return hm(U,a)}Vo!==null&&hm(Vo,a),Fo!==null&&hm(Fo,a),qo!==null&&hm(qo,a),df.forEach(s),hf.forEach(s);for(var f=0;f<Ho.length;f++){var p=Ho[f];p.blockedOn===a&&(p.blockedOn=null)}for(;0<Ho.length&&(f=Ho[0],f.blockedOn===null);)yP(f),f.blockedOn===null&&Ho.shift();if(f=(a.ownerDocument||a).$$reactFormReplay,f!=null)for(p=0;p<f.length;p+=3){var x=f[p],A=f[p+1],P=x[qn]||null;if(typeof A=="function")P||xP(f);else if(P){var k=null;if(A&&A.hasAttribute("formAction")){if(x=A,P=A[qn]||null)k=P.formAction;else if(s0(x)!==null)continue}else k=P.action;typeof k=="function"?f[p+1]=k:(f.splice(p,3),p-=3),xP(f)}}}function wP(){function a(A){A.canIntercept&&A.info==="react-transition"&&A.intercept({handler:function(){return new Promise(function(P){return x=P})},focusReset:"manual",scroll:"manual"})}function s(){x!==null&&(x(),x=null),p||setTimeout(f,20)}function f(){if(!p&&!navigation.transition){var A=navigation.currentEntry;A&&A.url!=null&&navigation.navigate(A.url,{state:A.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var p=!1,x=null;return navigation.addEventListener("navigate",a),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(f,100),function(){p=!0,navigation.removeEventListener("navigate",a),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),x!==null&&(x(),x=null)}}}function u0(a){this._internalRoot=a}pm.prototype.render=u0.prototype.render=function(a){var s=this._internalRoot;if(s===null)throw Error(r(409));var f=s.current,p=Dr();dP(f,p,a,s,null,null)},pm.prototype.unmount=u0.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var s=a.containerInfo;dP(a.current,2,null,a,null,null),Yh(),s[wo]=null}};function pm(a){this._internalRoot=a}pm.prototype.unstable_scheduleHydration=function(a){if(a){var s=Ac();a={blockedOn:null,target:a,priority:s};for(var f=0;f<Ho.length&&s!==0&&s<Ho[f].priority;f++);Ho.splice(f,0,a),f===0&&yP(a)}};var SP=t.version;if(SP!=="19.2.3")throw Error(r(527,SP,"19.2.3"));q.findDOMNode=function(a){var s=a._reactInternals;if(s===void 0)throw typeof a.render=="function"?Error(r(188)):(a=Object.keys(a).join(","),Error(r(268,a)));return a=d(s),a=a!==null?m(a):null,a=a===null?null:a.stateNode,a};var rq={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var gm=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!gm.isDisabled&&gm.supportsFiber)try{lr=gm.inject(rq),Yt=gm}catch{}}return gf.createRoot=function(a,s){if(!i(a))throw Error(r(299));var f=!1,p="",x=PT,A=NT,P=_T;return s!=null&&(s.unstable_strictMode===!0&&(f=!0),s.identifierPrefix!==void 0&&(p=s.identifierPrefix),s.onUncaughtError!==void 0&&(x=s.onUncaughtError),s.onCaughtError!==void 0&&(A=s.onCaughtError),s.onRecoverableError!==void 0&&(P=s.onRecoverableError)),s=cP(a,1,!1,null,null,f,p,null,x,A,P,wP),a[wo]=s.current,qb(a),new u0(s)},gf.hydrateRoot=function(a,s,f){if(!i(a))throw Error(r(299));var p=!1,x="",A=PT,P=NT,k=_T,U=null;return f!=null&&(f.unstable_strictMode===!0&&(p=!0),f.identifierPrefix!==void 0&&(x=f.identifierPrefix),f.onUncaughtError!==void 0&&(A=f.onUncaughtError),f.onCaughtError!==void 0&&(P=f.onCaughtError),f.onRecoverableError!==void 0&&(k=f.onRecoverableError),f.formState!==void 0&&(U=f.formState)),s=cP(a,1,!0,s,f??null,p,x,U,A,P,k,wP),s.context=fP(null),f=s.current,p=Dr(),p=xo(p),x=No(p),x.callback=null,_o(f,x,p),f=p,s.current.lanes=f,$e(s,f),Ki(s),a[wo]=s.current,qb(a),new pm(s)},gf.version="19.2.3",gf}var MP;function hq(){if(MP)return d0.exports;MP=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),d0.exports=dq(),d0.exports}var mq=hq();var RP="popstate";function pq(e={}){function t(i,o){let{pathname:l="/",search:u="",hash:c=""}=Al(i.location.hash.substring(1));return!l.startsWith("/")&&!l.startsWith(".")&&(l="/"+l),Iw("",{pathname:l,search:u,hash:c},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(i,o){let l=i.document.querySelector("base"),u="";if(l&&l.getAttribute("href")){let c=i.location.href,d=c.indexOf("#");u=d===-1?c:c.slice(0,d)}return u+"#"+(typeof o=="string"?o:Zf(o))}function r(i,o){Cr(i.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(o)})`)}return vq(t,n,r,e)}function _t(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Cr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function gq(){return Math.random().toString(36).substring(2,10)}function DP(e,t){return{usr:e.state,key:e.key,idx:t}}function Iw(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Al(t):t,state:n,key:t&&t.key||r||gq()}}function Zf({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Al(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function vq(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:o=!1}=r,l=i.history,u="POP",c=null,d=m();d==null&&(d=0,l.replaceState({...l.state,idx:d},""));function m(){return(l.state||{idx:null}).idx}function h(){u="POP";let C=m(),E=C==null?null:C-d;d=C,c&&c({action:u,location:S.location,delta:E})}function y(C,E){u="PUSH";let j=Iw(S.location,C,E);n&&n(j,C),d=m()+1;let T=DP(j,d),O=S.createHref(j);try{l.pushState(T,"",O)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;i.location.assign(O)}o&&c&&c({action:u,location:S.location,delta:1})}function b(C,E){u="REPLACE";let j=Iw(S.location,C,E);n&&n(j,C),d=m();let T=DP(j,d),O=S.createHref(j);l.replaceState(T,"",O),o&&c&&c({action:u,location:S.location,delta:0})}function w(C){return yq(C)}let S={get action(){return u},get location(){return e(i,l)},listen(C){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(RP,h),c=C,()=>{i.removeEventListener(RP,h),c=null}},createHref(C){return t(i,C)},createURL:w,encodeLocation(C){let E=w(C);return{pathname:E.pathname,search:E.search,hash:E.hash}},push:y,replace:b,go(C){return l.go(C)}};return S}function yq(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),_t(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:Zf(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function EL(e,t,n="/"){return bq(e,t,n,!1)}function bq(e,t,n,r){let i=typeof t=="string"?Al(t):t,o=eo(i.pathname||"/",n);if(o==null)return null;let l=jL(e);xq(l);let u=null;for(let c=0;u==null&&c<l.length;++c){let d=_q(o);u=Pq(l[c],d,r)}return u}function jL(e,t=[],n=[],r="",i=!1){let o=(l,u,c=i,d)=>{let m={relativePath:d===void 0?l.path||"":d,caseSensitive:l.caseSensitive===!0,childrenIndex:u,route:l};if(m.relativePath.startsWith("/")){if(!m.relativePath.startsWith(r)&&c)return;_t(m.relativePath.startsWith(r),`Absolute route path "${m.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),m.relativePath=m.relativePath.slice(r.length)}let h=Za([r,m.relativePath]),y=n.concat(m);l.children&&l.children.length>0&&(_t(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),jL(l.children,t,y,h,c)),!(l.path==null&&!l.index)&&t.push({path:h,score:Tq(h,l.index),routesMeta:y})};return e.forEach((l,u)=>{if(l.path===""||!l.path?.includes("?"))o(l,u);else for(let c of TL(l.path))o(l,u,!0,c)}),t}function TL(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let l=TL(r.join("/")),u=[];return u.push(...l.map(c=>c===""?o:[o,c].join("/"))),i&&u.push(...l),u.map(c=>e.startsWith("/")&&c===""?"/":c)}function xq(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Oq(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var wq=/^:[\w-]+$/,Sq=3,Aq=2,Cq=1,Eq=10,jq=-2,kP=e=>e==="*";function Tq(e,t){let n=e.split("/"),r=n.length;return n.some(kP)&&(r+=jq),t&&(r+=Aq),n.filter(i=>!kP(i)).reduce((i,o)=>i+(wq.test(o)?Sq:o===""?Cq:Eq),r)}function Oq(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function Pq(e,t,n=!1){let{routesMeta:r}=e,i={},o="/",l=[];for(let u=0;u<r.length;++u){let c=r[u],d=u===r.length-1,m=o==="/"?t:t.slice(o.length)||"/",h=gp({path:c.relativePath,caseSensitive:c.caseSensitive,end:d},m),y=c.route;if(!h&&d&&n&&!r[r.length-1].route.index&&(h=gp({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},m)),!h)return null;Object.assign(i,h.params),l.push({params:i,pathname:Za([o,h.pathname]),pathnameBase:kq(Za([o,h.pathnameBase])),route:y}),h.pathnameBase!=="/"&&(o=Za([o,h.pathnameBase]))}return l}function gp(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Nq(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],l=o.replace(/(.)\/+$/,"$1"),u=i.slice(1);return{params:r.reduce((d,{paramName:m,isOptional:h},y)=>{if(m==="*"){let w=u[y]||"";l=o.slice(0,o.length-w.length).replace(/(.)\/+$/,"$1")}const b=u[y];return h&&!b?d[m]=void 0:d[m]=(b||"").replace(/%2F/g,"/"),d},{}),pathname:o,pathnameBase:l,pattern:e}}function Nq(e,t=!1,n=!0){Cr(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,u,c)=>(r.push({paramName:u,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function _q(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Cr(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function eo(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}var OL=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Mq=e=>OL.test(e);function Rq(e,t="/"){let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Al(e):e,o;if(n)if(Mq(n))o=n;else{if(n.includes("//")){let l=n;n=n.replace(/\/\/+/g,"/"),Cr(!1,`Pathnames cannot have embedded double slashes - normalizing ${l} -> ${n}`)}n.startsWith("/")?o=LP(n.substring(1),"/"):o=LP(n,t)}else o=t;return{pathname:o,search:Lq(r),hash:Iq(i)}}function LP(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function g0(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Dq(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function MS(e){let t=Dq(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function RS(e,t,n,r=!1){let i;typeof e=="string"?i=Al(e):(i={...e},_t(!i.pathname||!i.pathname.includes("?"),g0("?","pathname","search",i)),_t(!i.pathname||!i.pathname.includes("#"),g0("#","pathname","hash",i)),_t(!i.search||!i.search.includes("#"),g0("#","search","hash",i)));let o=e===""||i.pathname==="",l=o?"/":i.pathname,u;if(l==null)u=n;else{let h=t.length-1;if(!r&&l.startsWith("..")){let y=l.split("/");for(;y[0]==="..";)y.shift(),h-=1;i.pathname=y.join("/")}u=h>=0?t[h]:"/"}let c=Rq(i,u),d=l&&l!=="/"&&l.endsWith("/"),m=(o||l===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(d||m)&&(c.pathname+="/"),c}var Za=e=>e.join("/").replace(/\/\/+/g,"/"),kq=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Lq=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Iq=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,zq=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function $q(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Bq(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var PL=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function NL(e,t){let n=e;if(typeof n!="string"||!OL.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(PL)try{let o=new URL(window.location.href),l=n.startsWith("//")?new URL(o.protocol+n):new URL(n),u=eo(l.pathname,t);l.origin===o.origin&&u!=null?n=u+l.search+l.hash:i=!0}catch{Cr(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var _L=["POST","PUT","PATCH","DELETE"];new Set(_L);var Uq=["GET",..._L];new Set(Uq);var rc=v.createContext(null);rc.displayName="DataRouter";var kg=v.createContext(null);kg.displayName="DataRouterState";var Vq=v.createContext(!1),ML=v.createContext({isTransitioning:!1});ML.displayName="ViewTransition";var Fq=v.createContext(new Map);Fq.displayName="Fetchers";var qq=v.createContext(null);qq.displayName="Await";var qr=v.createContext(null);qr.displayName="Navigation";var Od=v.createContext(null);Od.displayName="Location";var mi=v.createContext({outlet:null,matches:[],isDataRoute:!1});mi.displayName="Route";var DS=v.createContext(null);DS.displayName="RouteError";var RL="REACT_ROUTER_ERROR",Hq="REDIRECT",Kq="ROUTE_ERROR_RESPONSE";function Gq(e){if(e.startsWith(`${RL}:${Hq}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function Wq(e){if(e.startsWith(`${RL}:${Kq}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new zq(t.status,t.statusText,t.data)}catch{}}function Yq(e,{relative:t}={}){_t(ic(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=v.useContext(qr),{hash:i,pathname:o,search:l}=Pd(e,{relative:t}),u=o;return n!=="/"&&(u=o==="/"?n:Za([n,o])),r.createHref({pathname:u,search:l,hash:i})}function ic(){return v.useContext(Od)!=null}function ya(){return _t(ic(),"useLocation() may be used only in the context of a <Router> component."),v.useContext(Od).location}var DL="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function kL(e){v.useContext(qr).static||v.useLayoutEffect(e)}function kS(){let{isDataRoute:e}=v.useContext(mi);return e?fH():Xq()}function Xq(){_t(ic(),"useNavigate() may be used only in the context of a <Router> component.");let e=v.useContext(rc),{basename:t,navigator:n}=v.useContext(qr),{matches:r}=v.useContext(mi),{pathname:i}=ya(),o=JSON.stringify(MS(r)),l=v.useRef(!1);return kL(()=>{l.current=!0}),v.useCallback((c,d={})=>{if(Cr(l.current,DL),!l.current)return;if(typeof c=="number"){n.go(c);return}let m=RS(c,JSON.parse(o),i,d.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:Za([t,m.pathname])),(d.replace?n.replace:n.push)(m,d.state,d)},[t,n,o,i,e])}var Zq=v.createContext(null);function Qq(e){let t=v.useContext(mi).outlet;return v.useMemo(()=>t&&v.createElement(Zq.Provider,{value:e},t),[t,e])}function Jq(){let{matches:e}=v.useContext(mi),t=e[e.length-1];return t?t.params:{}}function Pd(e,{relative:t}={}){let{matches:n}=v.useContext(mi),{pathname:r}=ya(),i=JSON.stringify(MS(n));return v.useMemo(()=>RS(e,JSON.parse(i),r,t==="path"),[e,i,r,t])}function eH(e,t){return LL(e,t)}function LL(e,t,n,r,i){_t(ic(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=v.useContext(qr),{matches:l}=v.useContext(mi),u=l[l.length-1],c=u?u.params:{},d=u?u.pathname:"/",m=u?u.pathnameBase:"/",h=u&&u.route;{let j=h&&h.path||"";zL(d,!h||j.endsWith("*")||j.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${j}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
10
-
11
- Please change the parent <Route path="${j}"> to <Route path="${j==="/"?"*":`${j}/*`}">.`)}let y=ya(),b;if(t){let j=typeof t=="string"?Al(t):t;_t(m==="/"||j.pathname?.startsWith(m),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${m}" but pathname "${j.pathname}" was given in the \`location\` prop.`),b=j}else b=y;let w=b.pathname||"/",S=w;if(m!=="/"){let j=m.replace(/^\//,"").split("/");S="/"+w.replace(/^\//,"").split("/").slice(j.length).join("/")}let C=EL(e,{pathname:S});Cr(h||C!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),Cr(C==null||C[C.length-1].route.element!==void 0||C[C.length-1].route.Component!==void 0||C[C.length-1].route.lazy!==void 0,`Matched leaf route at location "${b.pathname}${b.search}${b.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let E=aH(C&&C.map(j=>Object.assign({},j,{params:Object.assign({},c,j.params),pathname:Za([m,o.encodeLocation?o.encodeLocation(j.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:j.pathname]),pathnameBase:j.pathnameBase==="/"?m:Za([m,o.encodeLocation?o.encodeLocation(j.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:j.pathnameBase])})),l,n,r,i);return t&&E?v.createElement(Od.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...b},navigationType:"POP"}},E):E}function tH(){let e=cH(),t=$q(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},o={padding:"2px 4px",backgroundColor:r},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=v.createElement(v.Fragment,null,v.createElement("p",null,"💿 Hey developer 👋"),v.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",v.createElement("code",{style:o},"ErrorBoundary")," or"," ",v.createElement("code",{style:o},"errorElement")," prop on your route.")),v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},t),n?v.createElement("pre",{style:i},n):null,l)}var nH=v.createElement(tH,null),IL=class extends v.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=Wq(e.digest);n&&(e=n)}let t=e!==void 0?v.createElement(mi.Provider,{value:this.props.routeContext},v.createElement(DS.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?v.createElement(rH,{error:e},t):t}};IL.contextType=Vq;var v0=new WeakMap;function rH({children:e,error:t}){let{basename:n}=v.useContext(qr);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=Gq(t.digest);if(r){let i=v0.get(t);if(i)throw i;let o=NL(r.location,n);if(PL&&!v0.get(t))if(o.isExternal||r.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const l=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:r.replace}));throw v0.set(t,l),l}return v.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function iH({routeContext:e,match:t,children:n}){let r=v.useContext(rc);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),v.createElement(mi.Provider,{value:e},n)}function aH(e,t=[],n=null,r=null,i=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,l=n?.errors;if(l!=null){let m=o.findIndex(h=>h.route.id&&l?.[h.route.id]!==void 0);_t(m>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),o=o.slice(0,Math.min(o.length,m+1))}let u=!1,c=-1;if(n)for(let m=0;m<o.length;m++){let h=o[m];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(c=m),h.route.id){let{loaderData:y,errors:b}=n,w=h.route.loader&&!y.hasOwnProperty(h.route.id)&&(!b||b[h.route.id]===void 0);if(h.route.lazy||w){u=!0,c>=0?o=o.slice(0,c+1):o=[o[0]];break}}}let d=n&&r?(m,h)=>{r(m,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:Bq(n.matches),errorInfo:h})}:void 0;return o.reduceRight((m,h,y)=>{let b,w=!1,S=null,C=null;n&&(b=l&&h.route.id?l[h.route.id]:void 0,S=h.route.errorElement||nH,u&&(c<0&&y===0?(zL("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,C=null):c===y&&(w=!0,C=h.route.hydrateFallbackElement||null)));let E=t.concat(o.slice(0,y+1)),j=()=>{let T;return b?T=S:w?T=C:h.route.Component?T=v.createElement(h.route.Component,null):h.route.element?T=h.route.element:T=m,v.createElement(iH,{match:h,routeContext:{outlet:m,matches:E,isDataRoute:n!=null},children:T})};return n&&(h.route.ErrorBoundary||h.route.errorElement||y===0)?v.createElement(IL,{location:n.location,revalidation:n.revalidation,component:S,error:b,children:j(),routeContext:{outlet:null,matches:E,isDataRoute:!0},onError:d}):j()},null)}function LS(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function oH(e){let t=v.useContext(rc);return _t(t,LS(e)),t}function sH(e){let t=v.useContext(kg);return _t(t,LS(e)),t}function lH(e){let t=v.useContext(mi);return _t(t,LS(e)),t}function IS(e){let t=lH(e),n=t.matches[t.matches.length-1];return _t(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function uH(){return IS("useRouteId")}function cH(){let e=v.useContext(DS),t=sH("useRouteError"),n=IS("useRouteError");return e!==void 0?e:t.errors?.[n]}function fH(){let{router:e}=oH("useNavigate"),t=IS("useNavigate"),n=v.useRef(!1);return kL(()=>{n.current=!0}),v.useCallback(async(i,o={})=>{Cr(n.current,DL),n.current&&(typeof i=="number"?await e.navigate(i):await e.navigate(i,{fromRouteId:t,...o}))},[e,t])}var IP={};function zL(e,t,n){!t&&!IP[e]&&(IP[e]=!0,Cr(!1,n))}v.memo(dH);function dH({routes:e,future:t,state:n,onError:r}){return LL(e,void 0,n,r,t)}function hH({to:e,replace:t,state:n,relative:r}){_t(ic(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=v.useContext(qr);Cr(!i,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=v.useContext(mi),{pathname:l}=ya(),u=kS(),c=RS(e,MS(o),l,r==="path"),d=JSON.stringify(c);return v.useEffect(()=>{u(JSON.parse(d),{replace:t,state:n,relative:r})},[u,d,r,t,n]),null}function mH(e){return Qq(e.context)}function Zi(e){_t(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function pH({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:i,static:o=!1,unstable_useTransitions:l}){_t(!ic(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let u=e.replace(/^\/*/,"/"),c=v.useMemo(()=>({basename:u,navigator:i,static:o,unstable_useTransitions:l,future:{}}),[u,i,o,l]);typeof n=="string"&&(n=Al(n));let{pathname:d="/",search:m="",hash:h="",state:y=null,key:b="default"}=n,w=v.useMemo(()=>{let S=eo(d,u);return S==null?null:{location:{pathname:S,search:m,hash:h,state:y,key:b},navigationType:r}},[u,d,m,h,y,b,r]);return Cr(w!=null,`<Router basename="${u}"> is not able to match the URL "${d}${m}${h}" because it does not start with the basename, so the <Router> won't render anything.`),w==null?null:v.createElement(qr.Provider,{value:c},v.createElement(Od.Provider,{children:t,value:w}))}function gH({children:e,location:t}){return eH(zw(e),t)}function zw(e,t=[]){let n=[];return v.Children.forEach(e,(r,i)=>{if(!v.isValidElement(r))return;let o=[...t,i];if(r.type===v.Fragment){n.push.apply(n,zw(r.props.children,o));return}_t(r.type===Zi,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),_t(!r.props.index||!r.props.children,"An index route cannot have child routes.");let l={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(l.children=zw(r.props.children,o)),n.push(l)}),n}var Zm="get",Qm="application/x-www-form-urlencoded";function Lg(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function vH(e){return Lg(e)&&e.tagName.toLowerCase()==="button"}function yH(e){return Lg(e)&&e.tagName.toLowerCase()==="form"}function bH(e){return Lg(e)&&e.tagName.toLowerCase()==="input"}function xH(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function wH(e,t){return e.button===0&&(!t||t==="_self")&&!xH(e)}function $w(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function SH(e,t){let n=$w(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(o=>{n.append(i,o)})}),n}var vm=null;function AH(){if(vm===null)try{new FormData(document.createElement("form"),0),vm=!1}catch{vm=!0}return vm}var CH=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function y0(e){return e!=null&&!CH.has(e)?(Cr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Qm}"`),null):e}function EH(e,t){let n,r,i,o,l;if(yH(e)){let u=e.getAttribute("action");r=u?eo(u,t):null,n=e.getAttribute("method")||Zm,i=y0(e.getAttribute("enctype"))||Qm,o=new FormData(e)}else if(vH(e)||bH(e)&&(e.type==="submit"||e.type==="image")){let u=e.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=e.getAttribute("formaction")||u.getAttribute("action");if(r=c?eo(c,t):null,n=e.getAttribute("formmethod")||u.getAttribute("method")||Zm,i=y0(e.getAttribute("formenctype"))||y0(u.getAttribute("enctype"))||Qm,o=new FormData(u,e),!AH()){let{name:d,type:m,value:h}=e;if(m==="image"){let y=d?`${d}.`:"";o.append(`${y}x`,"0"),o.append(`${y}y`,"0")}else d&&o.append(d,h)}}else{if(Lg(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Zm,r=null,i=Qm,l=e}return o&&i==="text/plain"&&(l=o,o=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:o,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function zS(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function jH(e,t,n){let r=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r.pathname==="/"?r.pathname=`_root.${n}`:t&&eo(r.pathname,t)==="/"?r.pathname=`${t.replace(/\/$/,"")}/_root.${n}`:r.pathname=`${r.pathname.replace(/\/$/,"")}.${n}`,r}async function TH(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function OH(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function PH(e,t,n){let r=await Promise.all(e.map(async i=>{let o=t.routes[i.route.id];if(o){let l=await TH(o,n);return l.links?l.links():[]}return[]}));return RH(r.flat(1).filter(OH).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function zP(e,t,n,r,i,o){let l=(c,d)=>n[d]?c.route.id!==n[d].route.id:!0,u=(c,d)=>n[d].pathname!==c.pathname||n[d].route.path?.endsWith("*")&&n[d].params["*"]!==c.params["*"];return o==="assets"?t.filter((c,d)=>l(c,d)||u(c,d)):o==="data"?t.filter((c,d)=>{let m=r.routes[c.route.id];if(!m||!m.hasLoader)return!1;if(l(c,d)||u(c,d))return!0;if(c.route.shouldRevalidate){let h=c.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function NH(e,t,{includeHydrateFallback:n}={}){return _H(e.map(r=>{let i=t.routes[r.route.id];if(!i)return[];let o=[i.module];return i.clientActionModule&&(o=o.concat(i.clientActionModule)),i.clientLoaderModule&&(o=o.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(o=o.concat(i.hydrateFallbackModule)),i.imports&&(o=o.concat(i.imports)),o}).flat(1))}function _H(e){return[...new Set(e)]}function MH(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function RH(e,t){let n=new Set;return new Set(t),e.reduce((r,i)=>{let o=JSON.stringify(MH(i));return n.has(o)||(n.add(o),r.push({key:o,link:i})),r},[])}function $L(){let e=v.useContext(rc);return zS(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function DH(){let e=v.useContext(kg);return zS(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var $S=v.createContext(void 0);$S.displayName="FrameworkContext";function BL(){let e=v.useContext($S);return zS(e,"You must render this element inside a <HydratedRouter> element"),e}function kH(e,t){let n=v.useContext($S),[r,i]=v.useState(!1),[o,l]=v.useState(!1),{onFocus:u,onBlur:c,onMouseEnter:d,onMouseLeave:m,onTouchStart:h}=t,y=v.useRef(null);v.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let S=E=>{E.forEach(j=>{l(j.isIntersecting)})},C=new IntersectionObserver(S,{threshold:.5});return y.current&&C.observe(y.current),()=>{C.disconnect()}}},[e]),v.useEffect(()=>{if(r){let S=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(S)}}},[r]);let b=()=>{i(!0)},w=()=>{i(!1),l(!1)};return n?e!=="intent"?[o,y,{}]:[o,y,{onFocus:vf(u,b),onBlur:vf(c,w),onMouseEnter:vf(d,b),onMouseLeave:vf(m,w),onTouchStart:vf(h,b)}]:[!1,y,{}]}function vf(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function LH({page:e,...t}){let{router:n}=$L(),r=v.useMemo(()=>EL(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?v.createElement(zH,{page:e,matches:r,...t}):null}function IH(e){let{manifest:t,routeModules:n}=BL(),[r,i]=v.useState([]);return v.useEffect(()=>{let o=!1;return PH(e,t,n).then(l=>{o||i(l)}),()=>{o=!0}},[e,t,n]),r}function zH({page:e,matches:t,...n}){let r=ya(),{manifest:i,routeModules:o}=BL(),{basename:l}=$L(),{loaderData:u,matches:c}=DH(),d=v.useMemo(()=>zP(e,t,c,i,r,"data"),[e,t,c,i,r]),m=v.useMemo(()=>zP(e,t,c,i,r,"assets"),[e,t,c,i,r]),h=v.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let w=new Set,S=!1;if(t.forEach(E=>{let j=i.routes[E.route.id];!j||!j.hasLoader||(!d.some(T=>T.route.id===E.route.id)&&E.route.id in u&&o[E.route.id]?.shouldRevalidate||j.hasClientLoader?S=!0:w.add(E.route.id))}),w.size===0)return[];let C=jH(e,l,"data");return S&&w.size>0&&C.searchParams.set("_routes",t.filter(E=>w.has(E.route.id)).map(E=>E.route.id).join(",")),[C.pathname+C.search]},[l,u,r,i,d,t,e,o]),y=v.useMemo(()=>NH(m,i),[m,i]),b=IH(m);return v.createElement(v.Fragment,null,h.map(w=>v.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...n})),y.map(w=>v.createElement("link",{key:w,rel:"modulepreload",href:w,...n})),b.map(({key:w,link:S})=>v.createElement("link",{key:w,nonce:n.nonce,...S})))}function $H(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var BH=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{BH&&(window.__reactRouterVersion="7.11.0")}catch{}function UH({basename:e,children:t,unstable_useTransitions:n,window:r}){let i=v.useRef();i.current==null&&(i.current=pq({window:r,v5Compat:!0}));let o=i.current,[l,u]=v.useState({action:o.action,location:o.location}),c=v.useCallback(d=>{n===!1?u(d):v.startTransition(()=>u(d))},[n]);return v.useLayoutEffect(()=>o.listen(c),[o,c]),v.createElement(pH,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:o,unstable_useTransitions:n})}var UL=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,es=v.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:i,reloadDocument:o,replace:l,state:u,target:c,to:d,preventScrollReset:m,viewTransition:h,unstable_defaultShouldRevalidate:y,...b},w){let{basename:S,unstable_useTransitions:C}=v.useContext(qr),E=typeof d=="string"&&UL.test(d),j=NL(d,S);d=j.to;let T=Yq(d,{relative:i}),[O,N,_]=kH(r,b),M=qH(d,{replace:l,state:u,target:c,preventScrollReset:m,relative:i,viewTransition:h,unstable_defaultShouldRevalidate:y,unstable_useTransitions:C});function R($){t&&t($),$.defaultPrevented||M($)}let I=v.createElement("a",{...b,..._,href:j.absoluteURL||T,onClick:j.isExternal||o?t:R,ref:$H(w,N),target:c,"data-discover":!E&&n==="render"?"true":void 0});return O&&!E?v.createElement(v.Fragment,null,I,v.createElement(LH,{page:T})):I});es.displayName="Link";var VL=v.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:i=!1,style:o,to:l,viewTransition:u,children:c,...d},m){let h=Pd(l,{relative:d.relative}),y=ya(),b=v.useContext(kg),{navigator:w,basename:S}=v.useContext(qr),C=b!=null&&XH(h)&&u===!0,E=w.encodeLocation?w.encodeLocation(h).pathname:h.pathname,j=y.pathname,T=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;n||(j=j.toLowerCase(),T=T?T.toLowerCase():null,E=E.toLowerCase()),T&&S&&(T=eo(T,S)||T);const O=E!=="/"&&E.endsWith("/")?E.length-1:E.length;let N=j===E||!i&&j.startsWith(E)&&j.charAt(O)==="/",_=T!=null&&(T===E||!i&&T.startsWith(E)&&T.charAt(E.length)==="/"),M={isActive:N,isPending:_,isTransitioning:C},R=N?t:void 0,I;typeof r=="function"?I=r(M):I=[r,N?"active":null,_?"pending":null,C?"transitioning":null].filter(Boolean).join(" ");let $=typeof o=="function"?o(M):o;return v.createElement(es,{...d,"aria-current":R,className:I,ref:m,style:$,to:l,viewTransition:u},typeof c=="function"?c(M):c)});VL.displayName="NavLink";var VH=v.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:o,method:l=Zm,action:u,onSubmit:c,relative:d,preventScrollReset:m,viewTransition:h,unstable_defaultShouldRevalidate:y,...b},w)=>{let{unstable_useTransitions:S}=v.useContext(qr),C=WH(),E=YH(u,{relative:d}),j=l.toLowerCase()==="get"?"get":"post",T=typeof u=="string"&&UL.test(u),O=N=>{if(c&&c(N),N.defaultPrevented)return;N.preventDefault();let _=N.nativeEvent.submitter,M=_?.getAttribute("formmethod")||l,R=()=>C(_||N.currentTarget,{fetcherKey:t,method:M,navigate:n,replace:i,state:o,relative:d,preventScrollReset:m,viewTransition:h,unstable_defaultShouldRevalidate:y});S&&n!==!1?v.startTransition(()=>R()):R()};return v.createElement("form",{ref:w,method:j,action:E,onSubmit:r?c:O,...b,"data-discover":!T&&e==="render"?"true":void 0})});VH.displayName="Form";function FH(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function FL(e){let t=v.useContext(rc);return _t(t,FH(e)),t}function qH(e,{target:t,replace:n,state:r,preventScrollReset:i,relative:o,viewTransition:l,unstable_defaultShouldRevalidate:u,unstable_useTransitions:c}={}){let d=kS(),m=ya(),h=Pd(e,{relative:o});return v.useCallback(y=>{if(wH(y,t)){y.preventDefault();let b=n!==void 0?n:Zf(m)===Zf(h),w=()=>d(e,{replace:b,state:r,preventScrollReset:i,relative:o,viewTransition:l,unstable_defaultShouldRevalidate:u});c?v.startTransition(()=>w()):w()}},[m,d,h,n,r,t,e,i,o,l,u,c])}function HH(e){Cr(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=v.useRef($w(e)),n=v.useRef(!1),r=ya(),i=v.useMemo(()=>SH(r.search,n.current?null:t.current),[r.search]),o=kS(),l=v.useCallback((u,c)=>{const d=$w(typeof u=="function"?u(new URLSearchParams(i)):u);n.current=!0,o("?"+d,c)},[o,i]);return[i,l]}var KH=0,GH=()=>`__${String(++KH)}__`;function WH(){let{router:e}=FL("useSubmit"),{basename:t}=v.useContext(qr),n=uH(),r=e.fetch,i=e.navigate;return v.useCallback(async(o,l={})=>{let{action:u,method:c,encType:d,formData:m,body:h}=EH(o,t);if(l.navigate===!1){let y=l.fetcherKey||GH();await r(y,n,l.action||u,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:m,body:h,formMethod:l.method||c,formEncType:l.encType||d,flushSync:l.flushSync})}else await i(l.action||u,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:m,body:h,formMethod:l.method||c,formEncType:l.encType||d,replace:l.replace,state:l.state,fromRouteId:n,flushSync:l.flushSync,viewTransition:l.viewTransition})},[r,i,t,n])}function YH(e,{relative:t}={}){let{basename:n}=v.useContext(qr),r=v.useContext(mi);_t(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),o={...Pd(e||".",{relative:t})},l=ya();if(e==null){o.search=l.search;let u=new URLSearchParams(o.search),c=u.getAll("index");if(c.some(m=>m==="")){u.delete("index"),c.filter(h=>h).forEach(h=>u.append("index",h));let m=u.toString();o.search=m?`?${m}`:""}}return(!e||e===".")&&i.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(o.pathname=o.pathname==="/"?n:Za([n,o.pathname])),Zf(o)}function XH(e,{relative:t}={}){let n=v.useContext(ML);_t(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=FL("useViewTransitionState"),i=Pd(e,{relative:t});if(!n.isTransitioning)return!1;let o=eo(n.currentLocation.pathname,r)||n.currentLocation.pathname,l=eo(n.nextLocation.pathname,r)||n.nextLocation.pathname;return gp(i.pathname,l)!=null||gp(i.pathname,o)!=null}var cs=CL();const qL=va(cs);var ZH=(e,t,n,r,i,o,l,u)=>{let c=document.documentElement,d=["light","dark"];function m(b){(Array.isArray(e)?e:[e]).forEach(w=>{let S=w==="class",C=S&&o?i.map(E=>o[E]||E):i;S?(c.classList.remove(...C),c.classList.add(o&&o[b]?o[b]:b)):c.setAttribute(w,b)}),h(b)}function h(b){u&&d.includes(b)&&(c.style.colorScheme=b)}function y(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)m(r);else try{let b=localStorage.getItem(t)||n,w=l&&b==="system"?y():b;m(w)}catch{}},$P=["light","dark"],HL="(prefers-color-scheme: dark)",QH=typeof window>"u",BS=v.createContext(void 0),JH={setTheme:e=>{},themes:[]},KL=()=>{var e;return(e=v.useContext(BS))!=null?e:JH},e9=e=>v.useContext(BS)?v.createElement(v.Fragment,null,e.children):v.createElement(n9,{...e}),t9=["light","dark"],n9=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:n=!0,enableColorScheme:r=!0,storageKey:i="theme",themes:o=t9,defaultTheme:l=n?"system":"light",attribute:u="data-theme",value:c,children:d,nonce:m,scriptProps:h})=>{let[y,b]=v.useState(()=>i9(i,l)),[w,S]=v.useState(()=>y==="system"?b0():y),C=c?Object.values(c):o,E=v.useCallback(N=>{let _=N;if(!_)return;N==="system"&&n&&(_=b0());let M=c?c[_]:_,R=t?a9(m):null,I=document.documentElement,$=F=>{F==="class"?(I.classList.remove(...C),M&&I.classList.add(M)):F.startsWith("data-")&&(M?I.setAttribute(F,M):I.removeAttribute(F))};if(Array.isArray(u)?u.forEach($):$(u),r){let F=$P.includes(l)?l:null,z=$P.includes(_)?_:F;I.style.colorScheme=z}R?.()},[m]),j=v.useCallback(N=>{let _=typeof N=="function"?N(y):N;b(_);try{localStorage.setItem(i,_)}catch{}},[y]),T=v.useCallback(N=>{let _=b0(N);S(_),y==="system"&&n&&!e&&E("system")},[y,e]);v.useEffect(()=>{let N=window.matchMedia(HL);return N.addListener(T),T(N),()=>N.removeListener(T)},[T]),v.useEffect(()=>{let N=_=>{_.key===i&&(_.newValue?b(_.newValue):j(l))};return window.addEventListener("storage",N),()=>window.removeEventListener("storage",N)},[j]),v.useEffect(()=>{E(e??y)},[e,y]);let O=v.useMemo(()=>({theme:y,setTheme:j,forcedTheme:e,resolvedTheme:y==="system"?w:y,themes:n?[...o,"system"]:o,systemTheme:n?w:void 0}),[y,j,e,w,n,o]);return v.createElement(BS.Provider,{value:O},v.createElement(r9,{forcedTheme:e,storageKey:i,attribute:u,enableSystem:n,enableColorScheme:r,defaultTheme:l,value:c,themes:o,nonce:m,scriptProps:h}),d)},r9=v.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:i,defaultTheme:o,value:l,themes:u,nonce:c,scriptProps:d})=>{let m=JSON.stringify([n,t,o,e,u,l,r,i]).slice(1,-1);return v.createElement("script",{...d,suppressHydrationWarning:!0,nonce:typeof window>"u"?c:"",dangerouslySetInnerHTML:{__html:`(${ZH.toString()})(${m})`}})}),i9=(e,t)=>{if(QH)return;let n;try{n=localStorage.getItem(e)||void 0}catch{}return n||t},a9=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},b0=e=>(e||(e=window.matchMedia(HL)),e.matches?"dark":"light");const De=e=>typeof e=="string",yf=()=>{let e,t;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n},BP=e=>e==null?"":""+e,o9=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},s9=/###/g,UP=e=>e&&e.indexOf("###")>-1?e.replace(s9,"."):e,VP=e=>!e||De(e),Bf=(e,t,n)=>{const r=De(t)?t.split("."):t;let i=0;for(;i<r.length-1;){if(VP(e))return{};const o=UP(r[i]);!e[o]&&n&&(e[o]=new n),Object.prototype.hasOwnProperty.call(e,o)?e=e[o]:e={},++i}return VP(e)?{}:{obj:e,k:UP(r[i])}},FP=(e,t,n)=>{const{obj:r,k:i}=Bf(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let o=t[t.length-1],l=t.slice(0,t.length-1),u=Bf(e,l,Object);for(;u.obj===void 0&&l.length;)o=`${l[l.length-1]}.${o}`,l=l.slice(0,l.length-1),u=Bf(e,l,Object),u?.obj&&typeof u.obj[`${u.k}.${o}`]<"u"&&(u.obj=void 0);u.obj[`${u.k}.${o}`]=n},l9=(e,t,n,r)=>{const{obj:i,k:o}=Bf(e,t,Object);i[o]=i[o]||[],i[o].push(n)},vp=(e,t)=>{const{obj:n,k:r}=Bf(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},u9=(e,t,n)=>{const r=vp(e,n);return r!==void 0?r:vp(t,n)},GL=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?De(e[r])||e[r]instanceof String||De(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):GL(e[r],t[r],n):e[r]=t[r]);return e},cu=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var c9={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const f9=e=>De(e)?e.replace(/[&<>"'\/]/g,t=>c9[t]):e;class d9{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const h9=[" ",",","?","!",";"],m9=new d9(20),p9=(e,t,n)=>{t=t||"",n=n||"";const r=h9.filter(l=>t.indexOf(l)<0&&n.indexOf(l)<0);if(r.length===0)return!0;const i=m9.getRegExp(`(${r.map(l=>l==="?"?"\\?":l).join("|")})`);let o=!i.test(e);if(!o){const l=e.indexOf(n);l>0&&!i.test(e.substring(0,l))&&(o=!0)}return o},Bw=(e,t,n=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(n);let i=e;for(let o=0;o<r.length;){if(!i||typeof i!="object")return;let l,u="";for(let c=o;c<r.length;++c)if(c!==o&&(u+=n),u+=r[c],l=i[u],l!==void 0){if(["string","number","boolean"].indexOf(typeof l)>-1&&c<r.length-1)continue;o+=c-o+1;break}i=l}return i},Qf=e=>e?.replace("_","-"),g9={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class yp{constructor(t,n={}){this.init(t,n)}init(t,n={}){this.prefix=n.prefix||"i18next:",this.logger=t||g9,this.options=n,this.debug=n.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,i){return i&&!this.debug?null:(De(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new yp(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new yp(this.logger,t)}}var ea=new yp;let Ig=class{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const i=this.observers[r].get(n)||0;this.observers[r].set(n,i+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t,...n){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([i,o])=>{for(let l=0;l<o;l++)i(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([i,o])=>{for(let l=0;l<o;l++)i.apply(i,[t,...n])})}};class qP extends Ig{constructor(t,n={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r,i={}){const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,l=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let u;t.indexOf(".")>-1?u=t.split("."):(u=[t,n],r&&(Array.isArray(r)?u.push(...r):De(r)&&o?u.push(...r.split(o)):u.push(r)));const c=vp(this.data,u);return!c&&!n&&!r&&t.indexOf(".")>-1&&(t=u[0],n=u[1],r=u.slice(2).join(".")),c||!l||!De(r)?c:Bw(this.data?.[t]?.[n],r,o)}addResource(t,n,r,i,o={silent:!1}){const l=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let u=[t,n];r&&(u=u.concat(l?r.split(l):r)),t.indexOf(".")>-1&&(u=t.split("."),i=n,n=u[1]),this.addNamespaces(n),FP(this.data,u,i),o.silent||this.emit("added",t,n,r,i)}addResources(t,n,r,i={silent:!1}){for(const o in r)(De(r[o])||Array.isArray(r[o]))&&this.addResource(t,n,o,r[o],{silent:!0});i.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,i,o,l={silent:!1,skipCopy:!1}){let u=[t,n];t.indexOf(".")>-1&&(u=t.split("."),i=r,r=n,n=u[1]),this.addNamespaces(n);let c=vp(this.data,u)||{};l.skipCopy||(r=JSON.parse(JSON.stringify(r))),i?GL(c,r,o):c={...c,...r},FP(this.data,u,c),l.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var WL={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(o=>{t=this.processors[o]?.process(t,n,r,i)??t}),t}};const YL=Symbol("i18next/PATH_KEY");function v9(){const e=[],t=Object.create(null);let n;return t.get=(r,i)=>(n?.revoke?.(),i===YL?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function bp(e,t){const{[YL]:n}=e(v9());return n.join(t?.keySeparator??".")}const HP={},x0=e=>!De(e)&&typeof e!="boolean"&&typeof e!="number";class xp extends Ig{constructor(t,n={}){super(),o9(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ea.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,n={interpolation:{}}){const r={...n};if(t==null)return!1;const i=this.resolve(t,r);if(i?.res===void 0)return!1;const o=x0(i.res);return!(r.returnObjects===!1&&o)}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=n.ns||this.options.defaultNS||[];const l=r&&t.indexOf(r)>-1,u=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!p9(t,r,i);if(l&&!u){const c=t.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:t,namespaces:De(o)?[o]:o};const d=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(d[0])>-1)&&(o=d.shift()),t=d.join(i)}return{key:t,namespaces:De(o)?[o]:o}}translate(t,n,r){let i=typeof n=="object"?{...n}:n;if(typeof i!="object"&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i=="object"&&(i={...i}),i||(i={}),t==null)return"";typeof t=="function"&&(t=bp(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]);const o=i.returnDetails!==void 0?i.returnDetails:this.options.returnDetails,l=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,{key:u,namespaces:c}=this.extractFromKey(t[t.length-1],i),d=c[c.length-1];let m=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;m===void 0&&(m=":");const h=i.lng||this.language,y=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(h?.toLowerCase()==="cimode")return y?o?{res:`${d}${m}${u}`,usedKey:u,exactUsedKey:u,usedLng:h,usedNS:d,usedParams:this.getUsedParamsDetails(i)}:`${d}${m}${u}`:o?{res:u,usedKey:u,exactUsedKey:u,usedLng:h,usedNS:d,usedParams:this.getUsedParamsDetails(i)}:u;const b=this.resolve(t,i);let w=b?.res;const S=b?.usedKey||u,C=b?.exactUsedKey||u,E=["[object Number]","[object Function]","[object RegExp]"],j=i.joinArrays!==void 0?i.joinArrays:this.options.joinArrays,T=!this.i18nFormat||this.i18nFormat.handleAsObject,O=i.count!==void 0&&!De(i.count),N=xp.hasDefaultValue(i),_=O?this.pluralResolver.getSuffix(h,i.count,i):"",M=i.ordinal&&O?this.pluralResolver.getSuffix(h,i.count,{ordinal:!1}):"",R=O&&!i.ordinal&&i.count===0,I=R&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${_}`]||i[`defaultValue${M}`]||i.defaultValue;let $=w;T&&!w&&N&&($=I);const F=x0($),z=Object.prototype.toString.apply($);if(T&&$&&F&&E.indexOf(z)<0&&!(De(j)&&Array.isArray($))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const Y=this.options.returnedObjectHandler?this.options.returnedObjectHandler(S,$,{...i,ns:c}):`key '${u} (${this.language})' returned an object instead of string.`;return o?(b.res=Y,b.usedParams=this.getUsedParamsDetails(i),b):Y}if(l){const Y=Array.isArray($),Q=Y?[]:{},se=Y?C:S;for(const L in $)if(Object.prototype.hasOwnProperty.call($,L)){const q=`${se}${l}${L}`;N&&!w?Q[L]=this.translate(q,{...i,defaultValue:x0(I)?I[L]:void 0,joinArrays:!1,ns:c}):Q[L]=this.translate(q,{...i,joinArrays:!1,ns:c}),Q[L]===q&&(Q[L]=$[L])}w=Q}}else if(T&&De(j)&&Array.isArray(w))w=w.join(j),w&&(w=this.extendTranslation(w,t,i,r));else{let Y=!1,Q=!1;!this.isValidLookup(w)&&N&&(Y=!0,w=I),this.isValidLookup(w)||(Q=!0,w=u);const L=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&Q?void 0:w,q=N&&I!==w&&this.options.updateMissing;if(Q||Y||q){if(this.logger.log(q?"updateKey":"missingKey",h,d,u,q?I:w),l){const D=this.resolve(u,{...i,keySeparator:!1});D&&D.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let B=[];const ae=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ae&&ae[0])for(let D=0;D<ae.length;D++)B.push(ae[D]);else this.options.saveMissingTo==="all"?B=this.languageUtils.toResolveHierarchy(i.lng||this.language):B.push(i.lng||this.language);const G=(D,V,K)=>{const ee=N&&K!==w?K:L;this.options.missingKeyHandler?this.options.missingKeyHandler(D,d,V,ee,q,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(D,d,V,ee,q,i),this.emit("missingKey",D,d,V,w)};this.options.saveMissing&&(this.options.saveMissingPlurals&&O?B.forEach(D=>{const V=this.pluralResolver.getSuffixes(D,i);R&&i[`defaultValue${this.options.pluralSeparator}zero`]&&V.indexOf(`${this.options.pluralSeparator}zero`)<0&&V.push(`${this.options.pluralSeparator}zero`),V.forEach(K=>{G([D],u+K,i[`defaultValue${K}`]||I)})}):G(B,u,I))}w=this.extendTranslation(w,t,i,b,r),Q&&w===u&&this.options.appendNamespaceToMissingKey&&(w=`${d}${m}${u}`),(Q||Y)&&this.options.parseMissingKeyHandler&&(w=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${d}${m}${u}`:u,Y?w:void 0,i))}return o?(b.res=w,b.usedParams=this.getUsedParamsDetails(i),b):w}extendTranslation(t,n,r,i,o){if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const c=De(t)&&(r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(c){const h=t.match(this.interpolator.nestingRegexp);d=h&&h.length}let m=r.replace&&!De(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(m={...this.options.interpolation.defaultVariables,...m}),t=this.interpolator.interpolate(t,m,r.lng||this.language||i.usedLng,r),c){const h=t.match(this.interpolator.nestingRegexp),y=h&&h.length;d<y&&(r.nest=!1)}!r.lng&&i&&i.res&&(r.lng=this.language||i.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,(...h)=>o?.[0]===h[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${h[0]} in key: ${n[0]}`),null):this.translate(...h,n),r)),r.interpolation&&this.interpolator.reset()}const l=r.postProcess||this.options.postProcess,u=De(l)?[l]:l;return t!=null&&u?.length&&r.applyPostProcessor!==!1&&(t=WL.handle(u,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t,n={}){let r,i,o,l,u;return De(t)&&(t=[t]),t.forEach(c=>{if(this.isValidLookup(r))return;const d=this.extractFromKey(c,n),m=d.key;i=m;let h=d.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));const y=n.count!==void 0&&!De(n.count),b=y&&!n.ordinal&&n.count===0,w=n.context!==void 0&&(De(n.context)||typeof n.context=="number")&&n.context!=="",S=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);h.forEach(C=>{this.isValidLookup(r)||(u=C,!HP[`${S[0]}-${C}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(u)&&(HP[`${S[0]}-${C}`]=!0,this.logger.warn(`key "${i}" for languages "${S.join(", ")}" won't get resolved as namespace "${u}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),S.forEach(E=>{if(this.isValidLookup(r))return;l=E;const j=[m];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(j,m,E,C,n);else{let O;y&&(O=this.pluralResolver.getSuffix(E,n.count,n));const N=`${this.options.pluralSeparator}zero`,_=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(y&&(n.ordinal&&O.indexOf(_)===0&&j.push(m+O.replace(_,this.options.pluralSeparator)),j.push(m+O),b&&j.push(m+N)),w){const M=`${m}${this.options.contextSeparator||"_"}${n.context}`;j.push(M),y&&(n.ordinal&&O.indexOf(_)===0&&j.push(M+O.replace(_,this.options.pluralSeparator)),j.push(M+O),b&&j.push(M+N))}}let T;for(;T=j.pop();)this.isValidLookup(r)||(o=T,r=this.getResource(E,C,T,n))}))})}),{res:r,usedKey:i,exactUsedKey:o,usedLng:l,usedNS:u}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r,i={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}getUsedParamsDetails(t={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!De(t.replace);let i=r?t.replace:t;if(r&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(const o of n)delete i[o]}return i}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}class KP{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ea.create("languageUtils")}getScriptPartFromCode(t){if(t=Qf(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=Qf(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(De(t)&&t.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(n=i)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const i=this.getScriptPartFromCode(r);if(this.isSupportedCode(i))return n=i;const o=this.getLanguagePartFromCode(r);if(this.isSupportedCode(o))return n=o;n=this.options.supportedLngs.find(l=>{if(l===o)return l;if(!(l.indexOf("-")<0&&o.indexOf("-")<0)&&(l.indexOf("-")>0&&o.indexOf("-")<0&&l.substring(0,l.indexOf("-"))===o||l.indexOf(o)===0&&o.length>1))return l})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),De(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],t),i=[],o=l=>{l&&(this.isSupportedCode(l)?i.push(l):this.logger.warn(`rejecting language code not found in supportedLngs: ${l}`))};return De(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):De(t)&&o(this.formatLanguageCode(t)),r.forEach(l=>{i.indexOf(l)<0&&o(this.formatLanguageCode(l))}),i}}const GP={zero:0,one:1,two:2,few:3,many:4,other:5},WP={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class y9{constructor(t,n={}){this.languageUtils=t,this.options=n,this.logger=ea.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,n={}){const r=Qf(t==="dev"?"en":t),i=n.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:i});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let l;try{l=new Intl.PluralRules(r,{type:i})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),WP;if(!t.match(/-|_/))return WP;const c=this.languageUtils.getLanguagePartFromCode(t);l=this.getRule(c,n)}return this.pluralRulesCache[o]=l,l}needsPlural(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,n,r={}){return this.getSuffixes(t,r).map(i=>`${n}${i}`)}getSuffixes(t,n={}){let r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((i,o)=>GP[i]-GP[o]).map(i=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(t,n,r={}){const i=this.getRule(t,r);return i?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const YP=(e,t,n,r=".",i=!0)=>{let o=u9(e,t,n);return!o&&i&&De(n)&&(o=Bw(e,n,r),o===void 0&&(o=Bw(t,n,r))),o},w0=e=>e.replace(/\$/g,"$$$$");class XP{constructor(t={}){this.logger=ea.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(n=>n),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:i,prefix:o,prefixEscaped:l,suffix:u,suffixEscaped:c,formatSeparator:d,unescapeSuffix:m,unescapePrefix:h,nestingPrefix:y,nestingPrefixEscaped:b,nestingSuffix:w,nestingSuffixEscaped:S,nestingOptionsSeparator:C,maxReplaces:E,alwaysFormat:j}=t.interpolation;this.escape=n!==void 0?n:f9,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=o?cu(o):l||"{{",this.suffix=u?cu(u):c||"}}",this.formatSeparator=d||",",this.unescapePrefix=m?"":h||"-",this.unescapeSuffix=this.unescapePrefix?"":m||"",this.nestingPrefix=y?cu(y):b||cu("$t("),this.nestingSuffix=w?cu(w):S||cu(")"),this.nestingOptionsSeparator=C||",",this.maxReplaces=E||1e3,this.alwaysFormat=j!==void 0?j:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n?.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,n,r,i){let o,l,u;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},d=b=>{if(b.indexOf(this.formatSeparator)<0){const E=YP(n,c,b,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(E,void 0,r,{...i,...n,interpolationkey:b}):E}const w=b.split(this.formatSeparator),S=w.shift().trim(),C=w.join(this.formatSeparator).trim();return this.format(YP(n,c,S,this.options.keySeparator,this.options.ignoreJSONStructure),C,r,{...i,...n,interpolationkey:S})};this.resetRegExp();const m=i?.missingInterpolationHandler||this.options.missingInterpolationHandler,h=i?.interpolation?.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:b=>w0(b)},{regex:this.regexp,safeValue:b=>this.escapeValue?w0(this.escape(b)):w0(b)}].forEach(b=>{for(u=0;o=b.regex.exec(t);){const w=o[1].trim();if(l=d(w),l===void 0)if(typeof m=="function"){const C=m(t,o,i);l=De(C)?C:""}else if(i&&Object.prototype.hasOwnProperty.call(i,w))l="";else if(h){l=o[0];continue}else this.logger.warn(`missed to pass in variable ${w} for interpolating ${t}`),l="";else!De(l)&&!this.useRawValueToEscape&&(l=BP(l));const S=b.safeValue(l);if(t=t.replace(o[0],S),h?(b.regex.lastIndex+=l.length,b.regex.lastIndex-=o[0].length):b.regex.lastIndex=0,u++,u>=this.maxReplaces)break}}),t}nest(t,n,r={}){let i,o,l;const u=(c,d)=>{const m=this.nestingOptionsSeparator;if(c.indexOf(m)<0)return c;const h=c.split(new RegExp(`${m}[ ]*{`));let y=`{${h[1]}`;c=h[0],y=this.interpolate(y,l);const b=y.match(/'/g),w=y.match(/"/g);((b?.length??0)%2===0&&!w||w.length%2!==0)&&(y=y.replace(/'/g,'"'));try{l=JSON.parse(y),d&&(l={...d,...l})}catch(S){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,S),`${c}${m}${y}`}return l.defaultValue&&l.defaultValue.indexOf(this.prefix)>-1&&delete l.defaultValue,c};for(;i=this.nestingRegexp.exec(t);){let c=[];l={...r},l=l.replace&&!De(l.replace)?l.replace:l,l.applyPostProcessor=!1,delete l.defaultValue;const d=/{.*}/.test(i[1])?i[1].lastIndexOf("}")+1:i[1].indexOf(this.formatSeparator);if(d!==-1&&(c=i[1].slice(d).split(this.formatSeparator).map(m=>m.trim()).filter(Boolean),i[1]=i[1].slice(0,d)),o=n(u.call(this,i[1].trim(),l),l),o&&i[0]===t&&!De(o))return o;De(o)||(o=BP(o)),o||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),o=""),c.length&&(o=c.reduce((m,h)=>this.format(m,h,r.lng,{...r,interpolationkey:i[1].trim()}),o.trim())),t=t.replace(i[0],o),this.regexp.lastIndex=0}return t}}const b9=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);t==="currency"&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(l=>{if(l){const[u,...c]=l.split(":"),d=c.join(":").trim().replace(/^'+|'+$/g,""),m=u.trim();n[m]||(n[m]=d),d==="false"&&(n[m]=!1),d==="true"&&(n[m]=!0),isNaN(d)||(n[m]=parseInt(d,10))}})}return{formatName:t,formatOptions:n}},ZP=e=>{const t={};return(n,r,i)=>{let o=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(o={...o,[i.interpolationkey]:void 0});const l=r+JSON.stringify(o);let u=t[l];return u||(u=e(Qf(r),i),t[l]=u),u(n)}},x9=e=>(t,n,r)=>e(Qf(n),r)(t);class w9{constructor(t={}){this.logger=ea.create("formatter"),this.options=t,this.init(t)}init(t,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const r=n.cacheInBuiltFormats?ZP:x9;this.formats={number:r((i,o)=>{const l=new Intl.NumberFormat(i,{...o});return u=>l.format(u)}),currency:r((i,o)=>{const l=new Intl.NumberFormat(i,{...o,style:"currency"});return u=>l.format(u)}),datetime:r((i,o)=>{const l=new Intl.DateTimeFormat(i,{...o});return u=>l.format(u)}),relativetime:r((i,o)=>{const l=new Intl.RelativeTimeFormat(i,{...o});return u=>l.format(u,o.range||"day")}),list:r((i,o)=>{const l=new Intl.ListFormat(i,{...o});return u=>l.format(u)})}}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=ZP(n)}format(t,n,r,i={}){const o=n.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(u=>u.indexOf(")")>-1)){const u=o.findIndex(c=>c.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,u)].join(this.formatSeparator)}return o.reduce((u,c)=>{const{formatName:d,formatOptions:m}=b9(c);if(this.formats[d]){let h=u;try{const y=i?.formatParams?.[i.interpolationkey]||{},b=y.locale||y.lng||i.locale||i.lng||r;h=this.formats[d](u,b,{...m,...i,...y})}catch(y){this.logger.warn(y)}return h}else this.logger.warn(`there was no format function for ${d}`);return u},t)}}const S9=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class A9 extends Ig{constructor(t,n,r,i={}){super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=ea.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(r,i.backend,i)}queueLoad(t,n,r,i){const o={},l={},u={},c={};return t.forEach(d=>{let m=!0;n.forEach(h=>{const y=`${d}|${h}`;!r.reload&&this.store.hasResourceBundle(d,h)?this.state[y]=2:this.state[y]<0||(this.state[y]===1?l[y]===void 0&&(l[y]=!0):(this.state[y]=1,m=!1,l[y]===void 0&&(l[y]=!0),o[y]===void 0&&(o[y]=!0),c[h]===void 0&&(c[h]=!0)))}),m||(u[d]=!0)}),(Object.keys(o).length||Object.keys(l).length)&&this.queue.push({pending:l,pendingCount:Object.keys(l).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(o),pending:Object.keys(l),toLoadLanguages:Object.keys(u),toLoadNamespaces:Object.keys(c)}}loaded(t,n,r){const i=t.split("|"),o=i[0],l=i[1];n&&this.emit("failedLoading",o,l,n),!n&&r&&this.store.addResourceBundle(o,l,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const u={};this.queue.forEach(c=>{l9(c.loaded,[o],l),S9(c,t),n&&c.errors.push(n),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(d=>{u[d]||(u[d]={});const m=c.loaded[d];m.length&&m.forEach(h=>{u[d][h]===void 0&&(u[d][h]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",u),this.queue=this.queue.filter(c=>!c.done)}read(t,n,r,i=0,o=this.retryTimeout,l){if(!t.length)return l(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:i,wait:o,callback:l});return}this.readingCalls++;const u=(d,m)=>{if(this.readingCalls--,this.waitingReads.length>0){const h=this.waitingReads.shift();this.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(d&&m&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,i+1,o*2,l)},o);return}l(d,m)},c=this.backend[r].bind(this.backend);if(c.length===2){try{const d=c(t,n);d&&typeof d.then=="function"?d.then(m=>u(null,m)).catch(u):u(null,d)}catch(d){u(d)}return}return c(t,n,u)}prepareLoading(t,n,r={},i){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();De(t)&&(t=this.languageUtils.toResolveHierarchy(t)),De(n)&&(n=[n]);const o=this.queueLoad(t,n,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach(l=>{this.loadOne(l)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t,n=""){const r=t.split("|"),i=r[0],o=r[1];this.read(i,o,"read",void 0,void 0,(l,u)=>{l&&this.logger.warn(`${n}loading namespace ${o} for language ${i} failed`,l),!l&&u&&this.logger.log(`${n}loaded namespace ${o} for language ${i}`,u),this.loaded(t,l,u)})}saveMissing(t,n,r,i,o,l={},u=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend?.create){const c={...l,isUpdate:o},d=this.backend.create.bind(this.backend);if(d.length<6)try{let m;d.length===5?m=d(t,n,r,i,c):m=d(t,n,r,i),m&&typeof m.then=="function"?m.then(h=>u(null,h)).catch(u):u(null,m)}catch(m){u(m)}else d(t,n,r,i,u,c)}!t||!t[0]||this.store.addResource(t[0],n,r,i)}}}const S0=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),De(e[1])&&(t.defaultValue=e[1]),De(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),QP=e=>(De(e.ns)&&(e.ns=[e.ns]),De(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),De(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e),ym=()=>{},C9=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})},E9=e=>!!(e?.modules?.backend?.name?.indexOf("Locize")>0||e?.modules?.backend?.constructor?.name?.indexOf("Locize")>0||e?.options?.backend?.backends&&e.options.backend.backends.some(t=>t?.name.indexOf("Locize")>0||t?.constructor?.name.indexOf("Locize")>0));class Uf extends Ig{constructor(t={},n){if(super(),this.options=QP(t),this.services={},this.logger=ea,this.modules={external:[]},C9(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(t={},n){this.isInitializing=!0,typeof t=="function"&&(n=t,t={}),t.defaultNS==null&&t.ns&&(De(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=S0();this.options={...r,...this.options,...QP(t)},this.options.interpolation={...r.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=r.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!E9(this)&&typeof console<"u"&&typeof console.info<"u"&&console.info("🌐 i18next is maintained with support from locize.com — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙");const i=d=>d?typeof d=="function"?new d:d:null;if(!this.options.isClone){this.modules.logger?ea.init(i(this.modules.logger),this.options):ea.init(null,this.options);let d;this.modules.formatter?d=this.modules.formatter:d=w9;const m=new KP(this.options);this.store=new qP(this.options.resources,this.options);const h=this.services;h.logger=ea,h.resourceStore=this.store,h.languageUtils=m,h.pluralResolver=new y9(m,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),d&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(h.formatter=i(d),h.formatter.init&&h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new XP(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new A9(i(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",(b,...w)=>{this.emit(b,...w)}),this.modules.languageDetector&&(h.languageDetector=i(this.modules.languageDetector),h.languageDetector.init&&h.languageDetector.init(h,this.options.detection,this.options)),this.modules.i18nFormat&&(h.i18nFormat=i(this.modules.i18nFormat),h.i18nFormat.init&&h.i18nFormat.init(this)),this.translator=new xp(this.services,this.options),this.translator.on("*",(b,...w)=>{this.emit(b,...w)}),this.modules.external.forEach(b=>{b.init&&b.init(this)})}if(this.format=this.options.interpolation.format,n||(n=ym),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.length>0&&d[0]!=="dev"&&(this.options.lng=d[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(d=>{this[d]=(...m)=>this.store[d](...m)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(d=>{this[d]=(...m)=>(this.store[d](...m),this)});const u=yf(),c=()=>{const d=(m,h)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),u.resolve(h),n(m,h)};if(this.languages&&!this.isInitialized)return d(null,this.t.bind(this));this.changeLanguage(this.options.lng,d)};return this.options.resources||!this.options.initAsync?c():setTimeout(c,0),u}loadResources(t,n=ym){let r=n;const i=De(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(i?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const o=[],l=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(d=>{d!=="cimode"&&o.indexOf(d)<0&&o.push(d)})};i?l(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>l(c)),this.options.preload?.forEach?.(u=>l(u)),this.services.backendConnector.load(o,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(u)})}else r(null)}reloadResources(t,n,r){const i=yf();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=ym),this.services.backendConnector.reload(t,n,o=>{i.resolve(),r(o)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&WL.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1)){for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,n){this.isLanguageChangingTo=t;const r=yf();this.emit("languageChanging",t);const i=u=>{this.language=u,this.languages=this.services.languageUtils.toResolveHierarchy(u),this.resolvedLanguage=void 0,this.setResolvedLanguage(u)},o=(u,c)=>{c?this.isLanguageChangingTo===t&&(i(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,r.resolve((...d)=>this.t(...d)),n&&n(u,(...d)=>this.t(...d))},l=u=>{!t&&!u&&this.services.languageDetector&&(u=[]);const c=De(u)?u:u&&u[0],d=this.store.hasLanguageSomeTranslations(c)?c:this.services.languageUtils.getBestMatchFromCodes(De(u)?[u]:u);d&&(this.language||i(d),this.translator.language||this.translator.changeLanguage(d),this.services.languageDetector?.cacheUserLanguage?.(d)),this.loadResources(d,m=>{o(m,d)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?l(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(l):this.services.languageDetector.detect(l):l(t),r}getFixedT(t,n,r){const i=(o,l,...u)=>{let c;typeof l!="object"?c=this.options.overloadTranslationOptionHandler([o,l].concat(u)):c={...l},c.lng=c.lng||i.lng,c.lngs=c.lngs||i.lngs,c.ns=c.ns||i.ns,c.keyPrefix!==""&&(c.keyPrefix=c.keyPrefix||r||i.keyPrefix);const d=this.options.keySeparator||".";let m;return c.keyPrefix&&Array.isArray(o)?m=o.map(h=>(typeof h=="function"&&(h=bp(h,{...this.options,...l})),`${c.keyPrefix}${d}${h}`)):(typeof o=="function"&&(o=bp(o,{...this.options,...l})),m=c.keyPrefix?`${c.keyPrefix}${d}${o}`:o),this.t(m,c)};return De(t)?i.lng=t:i.lngs=t,i.ns=n,i.keyPrefix=r,i}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,n={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const l=(u,c)=>{const d=this.services.backendConnector.state[`${u}|${c}`];return d===-1||d===0||d===2};if(n.precheck){const u=n.precheck(this,l);if(u!==void 0)return u}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||l(r,t)&&(!i||l(o,t)))}loadNamespaces(t,n){const r=yf();return this.options.ns?(De(t)&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=yf();De(t)&&(t=[t]);const i=this.options.preload||[],o=t.filter(l=>i.indexOf(l)<0&&this.services.languageUtils.isSupportedCode(l));return o.length?(this.options.preload=i.concat(o),this.loadResources(l=>{r.resolve(),n&&n(l)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";try{const i=new Intl.Locale(t);if(i&&i.getTextInfo){const o=i.getTextInfo();if(o&&o.direction)return o.direction}}catch{}const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services?.languageUtils||new KP(S0());return t.toLowerCase().indexOf("-latn")>1?"ltr":n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},n){const r=new Uf(t,n);return r.createInstance=Uf.createInstance,r}cloneInstance(t={},n=ym){const r=t.forkResourceStore;r&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},o=new Uf(i);if((t.debug!==void 0||t.prefix!==void 0)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(u=>{o[u]=this[u]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r){const u=Object.keys(this.store.data).reduce((c,d)=>(c[d]={...this.store.data[d]},c[d]=Object.keys(c[d]).reduce((m,h)=>(m[h]={...c[d][h]},m),c[d]),c),{});o.store=new qP(u,i),o.services.resourceStore=o.store}if(t.interpolation){const c={...S0().interpolation,...this.options.interpolation,...t.interpolation},d={...i,interpolation:c};o.services.interpolator=new XP(d)}return o.translator=new xp(o.services,i),o.translator.on("*",(u,...c)=>{o.emit(u,...c)}),o.init(i,n),o.translator.options=i,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const yt=Uf.createInstance();yt.createInstance;yt.dir;yt.init;yt.loadResources;yt.reloadResources;yt.use;yt.changeLanguage;yt.getFixedT;yt.t;yt.exists;yt.setDefaultNamespace;yt.hasLoadedNamespace;yt.loadNamespaces;yt.loadLanguages;var A0,JP;function j9(){return JP||(JP=1,A0={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),A0}var T9=j9();const O9=va(T9);var P9=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function eN(e){var t={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},n=e.match(/<\/?([^\s]+?)[/\s>]/);if(n&&(t.name=n[1],(O9[n[1]]||e.charAt(e.length-2)==="/")&&(t.voidElement=!0),t.name.startsWith("!--"))){var r=e.indexOf("-->");return{type:"comment",comment:r!==-1?e.slice(4,r):""}}for(var i=new RegExp(P9),o=null;(o=i.exec(e))!==null;)if(o[0].trim())if(o[1]){var l=o[1].trim(),u=[l,""];l.indexOf("=")>-1&&(u=l.split("=")),t.attrs[u[0]]=u[1],i.lastIndex--}else o[2]&&(t.attrs[o[2]]=o[3].trim().substring(1,o[3].length-1));return t}var N9=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,_9=/^\s*$/,M9=Object.create(null);function XL(e,t){switch(t.type){case"text":return e+t.content;case"tag":return e+="<"+t.name+(t.attrs?(function(n){var r=[];for(var i in n)r.push(i+'="'+n[i]+'"');return r.length?" "+r.join(" "):""})(t.attrs):"")+(t.voidElement?"/>":">"),t.voidElement?e:e+t.children.reduce(XL,"")+"</"+t.name+">";case"comment":return e+"<!--"+t.comment+"-->"}}var R9={parse:function(e,t){t||(t={}),t.components||(t.components=M9);var n,r=[],i=[],o=-1,l=!1;if(e.indexOf("<")!==0){var u=e.indexOf("<");r.push({type:"text",content:u===-1?e:e.substring(0,u)})}return e.replace(N9,function(c,d){if(l){if(c!=="</"+n.name+">")return;l=!1}var m,h=c.charAt(1)!=="/",y=c.startsWith("<!--"),b=d+c.length,w=e.charAt(b);if(y){var S=eN(c);return o<0?(r.push(S),r):((m=i[o]).children.push(S),r)}if(h&&(o++,(n=eN(c)).type==="tag"&&t.components[n.name]&&(n.type="component",l=!0),n.voidElement||l||!w||w==="<"||n.children.push({type:"text",content:e.slice(b,e.indexOf("<",b))}),o===0&&r.push(n),(m=i[o-1])&&m.children.push(n),i[o]=n),(!h||n.voidElement)&&(o>-1&&(n.voidElement||n.name===c.slice(2,-1))&&(o--,n=o===-1?r:i[o]),!l&&w!=="<"&&w)){m=o===-1?r:i[o].children;var C=e.indexOf("<",b),E=e.slice(b,C===-1?void 0:C);_9.test(E)&&(E=" "),(C>-1&&o+m.length>=0||E!==" ")&&m.push({type:"text",content:E})}}),r},stringify:function(e){return e.reduce(function(t,n){return t+XL("",n)},"")}};const Jm=(e,t,n,r)=>{const i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,"warn","react-i18next::",!0);Ar(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)},tN={},zg=(e,t,n,r)=>{Ar(n)&&tN[n]||(Ar(n)&&(tN[n]=new Date),Jm(e,t,n,r))},ZL=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},Uw=(e,t,n)=>{e.loadNamespaces(t,ZL(e,n))},nN=(e,t,n,r)=>{if(Ar(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return Uw(e,n,r);n.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,ZL(e,r))},D9=(e,t,n={})=>!t.languages||!t.languages.length?(zg(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(r,i)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!i(r.isLanguageChangingTo,e))return!1}}),Ar=e=>typeof e=="string",Wa=e=>typeof e=="object"&&e!==null,k9=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,L9={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},I9=e=>L9[e],QL=e=>e.replace(k9,I9);let Vw={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:QL,transDefaultProps:void 0};const z9=(e={})=>{Vw={...Vw,...e}},US=()=>Vw;let JL;const $9=e=>{JL=e},VS=()=>JL,ep=(e,t)=>{if(!e)return!1;const n=e.props?.children??e.children;return t?n.length>0:!!n},tp=e=>{if(!e)return[];const t=e.props?.children??e.children;return e.props?.i18nIsDynamicList?Ys(t):t},B9=e=>Array.isArray(e)&&e.every(v.isValidElement),Ys=e=>Array.isArray(e)?e:[e],U9=(e,t)=>{const n={...t};return n.props={...t.props,...e.props},n},V9=e=>{const t={};if(!e)return t;const n=r=>{Ys(r).forEach(o=>{Ar(o)||(ep(o)?n(tp(o)):Wa(o)&&!v.isValidElement(o)&&Object.assign(t,o))})};return n(e),t},eI=(e,t,n,r)=>{if(!e)return"";let i="";const o=Ys(e),l=t?.transSupportBasicHtmlNodes?t.transKeepBasicHtmlNodesFor??[]:[];return o.forEach((u,c)=>{if(Ar(u)){i+=`${u}`;return}if(v.isValidElement(u)){const{props:d,type:m}=u,h=Object.keys(d).length,y=l.indexOf(m)>-1,b=d.children;if(!b&&y&&!h){i+=`<${m}/>`;return}if(!b&&(!y||h)||d.i18nIsDynamicList){i+=`<${c}></${c}>`;return}if(y&&h===1&&Ar(b)){i+=`<${m}>${b}</${m}>`;return}const w=eI(b,t,n,r);i+=`<${c}>${w}</${c}>`;return}if(u===null){Jm(n,"TRANS_NULL_VALUE","Passed in a null value as child",{i18nKey:r});return}if(Wa(u)){const{format:d,...m}=u,h=Object.keys(m);if(h.length===1){const y=d?`${h[0]}, ${d}`:h[0];i+=`{{${y}}}`;return}Jm(n,"TRANS_INVALID_OBJ","Invalid child - Object should only have keys {{ value, format }} (format is optional).",{i18nKey:r,child:u});return}Jm(n,"TRANS_INVALID_VAR","Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.",{i18nKey:r,child:u})}),i},F9=(e,t=[],n={})=>{if(!e)return e;const r=Object.keys(n),i=[...t,...r];let o="",l=0;for(;l<e.length;)if(e[l]==="<"){let u=!1;const c=e.slice(l).match(/^<\/(\d+|[a-zA-Z][a-zA-Z0-9_-]*)>/);if(c){const d=c[1];(/^\d+$/.test(d)||i.includes(d))&&(u=!0,o+=c[0],l+=c[0].length)}if(!u){const d=e.slice(l).match(/^<(\d+|[a-zA-Z][a-zA-Z0-9_-]*)(\s+[\w-]+(?:=(?:"[^"]*"|'[^']*'|[^\s>]+))?)*\s*(\/)?>/);if(d){const m=d[1];(/^\d+$/.test(m)||i.includes(m))&&(u=!0,o+=d[0],l+=d[0].length)}}u||(o+="&lt;",l+=1)}else o+=e[l],l+=1;return o},q9=(e,t,n,r,i,o,l)=>{if(n==="")return[];const u=i.transKeepBasicHtmlNodesFor||[],c=n&&new RegExp(u.map(j=>`<${j}`).join("|")).test(n);if(!e&&!t&&!c&&!l)return[n];const d=t??{},m=j=>{Ys(j).forEach(O=>{Ar(O)||(ep(O)?m(tp(O)):Wa(O)&&!v.isValidElement(O)&&Object.assign(d,O))})};m(e);const h=F9(n,u,d),y=R9.parse(`<0>${h}</0>`),b={...d,...o},w=(j,T,O)=>{const N=tp(j),_=C(N,T.children,O);return B9(N)&&_.length===0||j.props?.i18nIsDynamicList?N:_},S=(j,T,O,N,_)=>{j.dummy?(j.children=T,O.push(v.cloneElement(j,{key:N},_?void 0:T))):O.push(...v.Children.map([j],M=>{const R="data-i18n-is-dynamic-list",I={key:N,[R]:void 0};return M&&M.props&&Object.keys(M.props).forEach($=>{$==="ref"||$==="children"||$==="i18nIsDynamicList"||$===R||(I[$]=M.props[$])}),v.cloneElement(M,I,_?null:T)}))},C=(j,T,O)=>{const N=Ys(j);return Ys(T).reduce((M,R,I)=>{const $=R.children?.[0]?.content&&r.services.interpolator.interpolate(R.children[0].content,b,r.language);if(R.type==="tag"){let F=N[parseInt(R.name,10)];!F&&t&&(F=t[R.name]),O.length===1&&!F&&(F=O[0][R.name]),F||(F={});const z={...R.attrs};l&&Object.keys(z).forEach(B=>{const ae=z[B];Ar(ae)&&(z[B]=QL(ae))});const Y=Object.keys(z).length!==0?U9({props:z},F):F,Q=v.isValidElement(Y),se=Q&&ep(R,!0)&&!R.voidElement,L=c&&Wa(Y)&&Y.dummy&&!Q,q=Wa(t)&&Object.hasOwnProperty.call(t,R.name);if(Ar(Y)){const B=r.services.interpolator.interpolate(Y,b,r.language);M.push(B)}else if(ep(Y)||se){const B=w(Y,R,O);S(Y,B,M,I)}else if(L){const B=C(N,R.children,O);S(Y,B,M,I)}else if(Number.isNaN(parseFloat(R.name)))if(q){const B=w(Y,R,O);S(Y,B,M,I,R.voidElement)}else if(i.transSupportBasicHtmlNodes&&u.indexOf(R.name)>-1)if(R.voidElement)M.push(v.createElement(R.name,{key:`${R.name}-${I}`}));else{const B=C(N,R.children,O);M.push(v.createElement(R.name,{key:`${R.name}-${I}`},B))}else if(R.voidElement)M.push(`<${R.name} />`);else{const B=C(N,R.children,O);M.push(`<${R.name}>${B}</${R.name}>`)}else if(Wa(Y)&&!Q){const B=R.children[0]?$:null;B&&M.push(B)}else S(Y,$,M,I,R.children.length!==1||!$)}else if(R.type==="text"){const F=i.transWrapTextNodes,z=typeof i.unescape=="function"?i.unescape:US().unescape,Y=l?z(r.services.interpolator.interpolate(R.content,b,r.language)):r.services.interpolator.interpolate(R.content,b,r.language);F?M.push(v.createElement(F,{key:`${R.name}-${I}`},Y)):M.push(Y)}return M},[])},E=C([{dummy:!0,children:e||[]}],y,Ys(e||[]));return tp(E[0])},tI=(e,t,n)=>{const r=e.key||t,i=v.cloneElement(e,{key:r});if(!i.props||!i.props.children||n.indexOf(`${t}/>`)<0&&n.indexOf(`${t} />`)<0)return i;function o(){return v.createElement(v.Fragment,null,i)}return v.createElement(o,{key:r})},H9=(e,t)=>e.map((n,r)=>tI(n,r,t)),K9=(e,t)=>{const n={};return Object.keys(e).forEach(r=>{Object.assign(n,{[r]:tI(e[r],r,t)})}),n},G9=(e,t,n,r)=>e?Array.isArray(e)?H9(e,t):Wa(e)?K9(e,t):(zg(n,"TRANS_INVALID_COMPONENTS",'<Trans /> "components" prop expects an object or array',{i18nKey:r}),null):null,W9=e=>!Wa(e)||Array.isArray(e)?!1:Object.keys(e).reduce((t,n)=>t&&Number.isNaN(Number.parseFloat(n)),!0);function Y9({children:e,count:t,parent:n,i18nKey:r,context:i,tOptions:o={},values:l,defaults:u,components:c,ns:d,i18n:m,t:h,shouldUnescape:y,...b}){const w=m||VS();if(!w)return zg(w,"NO_I18NEXT_INSTANCE","Trans: You need to pass in an i18next instance using i18nextReactModule",{i18nKey:r}),e;const S=h||w.t.bind(w)||(G=>G),C={...US(),...w.options?.react};let E=d||S.ns||w.options?.defaultNS;E=Ar(E)?[E]:E||["translation"];const{transDefaultProps:j}=C,T=j?.tOptions?{...j.tOptions,...o}:o,O=y??j?.shouldUnescape,N=j?.values?{...j.values,...l}:l,_=j?.components?{...j.components,...c}:c,M=eI(e,C,w,r),R=u||T?.defaultValue||M||C.transEmptyNodeValue||(typeof r=="function"?bp(r):r),{hashTransKey:I}=C,$=r||(I?I(M||R):M||R);w.options?.interpolation?.defaultVariables?l=N&&Object.keys(N).length>0?{...N,...w.options.interpolation.defaultVariables}:{...w.options.interpolation.defaultVariables}:l=N;const F=V9(e);F&&typeof F.count=="number"&&t===void 0&&(t=F.count);const z=l||t!==void 0&&!w.options?.interpolation?.alwaysFormat||!e?T.interpolation:{interpolation:{...T.interpolation,prefix:"#$?",suffix:"?$#"}},Y={...T,context:i||T.context,count:t,...l,...z,defaultValue:R,ns:E};let Q=$?S($,Y):R;Q===$&&R&&(Q=R);const se=G9(_,Q,w,r);let L=se||e,q=null;W9(se)&&(q=se,L=e);const B=q9(L,q,Q,w,C,Y,O),ae=n??C.defaultTransParent;return ae?v.createElement(ae,b,B):B}const X9={type:"3rdParty",init(e){z9(e.options.react),$9(e)}},nI=v.createContext();class Z9{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}function rN({children:e,count:t,parent:n,i18nKey:r,context:i,tOptions:o={},values:l,defaults:u,components:c,ns:d,i18n:m,t:h,shouldUnescape:y,...b}){const{i18n:w,defaultNS:S}=v.useContext(nI)||{},C=m||w||VS(),E=h||C?.t.bind(C);return Y9({children:e,count:t,parent:n,i18nKey:r,context:i,tOptions:o,values:l,defaults:u,components:c,ns:d||E?.ns||S||C?.options?.defaultNS,i18n:C,t:h,shouldUnescape:y,...b})}var C0={exports:{}},E0={};var iN;function Q9(){if(iN)return E0;iN=1;var e=nc();function t(h,y){return h===y&&(h!==0||1/h===1/y)||h!==h&&y!==y}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,l=e.useDebugValue;function u(h,y){var b=y(),w=r({inst:{value:b,getSnapshot:y}}),S=w[0].inst,C=w[1];return o(function(){S.value=b,S.getSnapshot=y,c(S)&&C({inst:S})},[h,b,y]),i(function(){return c(S)&&C({inst:S}),h(function(){c(S)&&C({inst:S})})},[h]),l(b),b}function c(h){var y=h.getSnapshot;h=h.value;try{var b=y();return!n(h,b)}catch{return!0}}function d(h,y){return y()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:u;return E0.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,E0}var aN;function rI(){return aN||(aN=1,C0.exports=Q9()),C0.exports}var J9=rI();const eK=(e,t)=>Ar(t)?t:Wa(t)&&Ar(t.defaultValue)?t.defaultValue:Array.isArray(e)?e[e.length-1]:e,tK={t:eK,ready:!1},nK=()=>()=>{},Ye=(e,t={})=>{const{i18n:n}=t,{i18n:r,defaultNS:i}=v.useContext(nI)||{},o=n||r||VS();o&&!o.reportNamespaces&&(o.reportNamespaces=new Z9),o||zg(o,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const l=v.useMemo(()=>({...US(),...o?.options?.react,...t}),[o,t]),{useSuspense:u,keyPrefix:c}=l,d=i||o?.options?.defaultNS,m=Ar(d)?[d]:d||["translation"],h=v.useMemo(()=>m,m);o?.reportNamespaces?.addUsedNamespaces?.(h);const y=v.useRef(0),b=v.useCallback(I=>{if(!o)return nK;const{bindI18n:$,bindI18nStore:F}=l,z=()=>{y.current+=1,I()};return $&&o.on($,z),F&&o.store.on(F,z),()=>{$&&$.split(" ").forEach(Y=>o.off(Y,z)),F&&F.split(" ").forEach(Y=>o.store.off(Y,z))}},[o,l]),w=v.useRef(),S=v.useCallback(()=>{if(!o)return tK;const I=!!(o.isInitialized||o.initializedStoreOnce)&&h.every(se=>D9(se,o,l)),$=t.lng||o.language,F=y.current,z=w.current;if(z&&z.ready===I&&z.lng===$&&z.keyPrefix===c&&z.revision===F)return z;const Q={t:o.getFixedT($,l.nsMode==="fallback"?h:h[0],c),ready:I,lng:$,keyPrefix:c,revision:F};return w.current=Q,Q},[o,h,c,l,t.lng]),[C,E]=v.useState(0),{t:j,ready:T}=J9.useSyncExternalStore(b,S,S);v.useEffect(()=>{if(o&&!T&&!u){const I=()=>E($=>$+1);t.lng?nN(o,t.lng,h,I):Uw(o,h,I)}},[o,t.lng,h,T,u,C]);const O=o||{},N=v.useRef(null),_=v.useRef(),M=I=>{const $=Object.getOwnPropertyDescriptors(I);$.__original&&delete $.__original;const F=Object.create(Object.getPrototypeOf(I),$);if(!Object.prototype.hasOwnProperty.call(F,"__original"))try{Object.defineProperty(F,"__original",{value:I,writable:!1,enumerable:!1,configurable:!1})}catch{}return F},R=v.useMemo(()=>{const I=O,$=I?.language;let F=I;I&&(N.current&&N.current.__original===I?_.current!==$?(F=M(I),N.current=F,_.current=$):F=N.current:(F=M(I),N.current=F,_.current=$));const z=[j,F,T];return z.t=j,z.i18n=F,z.ready=T,z},[j,O,T,O.resolvedLanguage,O.language,O.languages]);if(o&&u&&!T)throw new Promise(I=>{const $=()=>I();t.lng?nN(o,t.lng,h,$):Uw(o,h,$)});return R},rK={title:"Copilot API Admin",language:"Language"},iK={enUS:"English",zhCN:"简体中文"},aK={accounts:"Accounts",requests:"Requests",statistics:"Statistics",models:"Models",settings:"Settings",openNavigation:"Open navigation"},oK={label:"Theme",system:"System",light:"Light",dark:"Dark"},sK={label:"Motion",magic:"Magic",subtle:"Subtle",off:"Off",reducedMotionEnabled:"Reduced motion is enabled in system settings"},lK={set:"set",unset:"unset",test:"Test",testing:"Testing...",clear:"Clear",save:"Save",saving:"Saving...",refresh:"Refresh",refreshing:"Refreshing...",retry:"Retry",errors:"Errors",tokens:"Tokens",failed:"Failed",errorRate:"Error rate",tokensPerRequest:"Tokens / req",avgDurationMs:"Avg duration (s)",lastRequest:"Last req",account:"Account",status:"Status",avgMs:"Avg duration (s)",clearFilter:"Clear filter",statusFailed:"failed",statusOk:"ok",used:"Used",remaining:"Remaining",unlimited:"unlimited",apply:"Apply",any:"(any)",yes:"yes",no:"no",from:"From",to:"To",time:"Time",path:"Path",endpoint:"Endpoint",model:"Model",xInitiator:"Initiator",subagentRequest:"Subagent Request",cost:"Cost",quota:"Quota",durationAbbrev:"Duration (s)",loading:"Loading...",loadMore:"Load more",noMore:"All results loaded",clearFilters:"Clear filters",back:"Back",download:"Download",copyJson:"Copy JSON",actions:"Actions",enabled:"Enabled"},uK={trigger:"Token",title:"Admin token",description:"Used as <1>x-admin-token</1> when calling <3>/api/admin/*</3>. Stored in <5>localStorage</5>.",inputPlaceholder:"Enter token",remoteNote:"If the server is not running on localhost, you must set <1>ADMIN_TOKEN</1> on the server to enable remote access.",connected:"Connected: DB v{{version}} · {{path}}",validation:{empty:"Token cannot be empty."},toast:{adminApiOk:"Admin API access OK",adminApiFailed:"Admin API access failed",tokenSaved:"Token saved",tokenCleared:"Token cleared"}},cK={loadFailedTitle:"Failed to load accounts",statsWindowLabel:"Stats window",window:{last24h:"Last 24h",last7d:"Last 7d",thisMonth:"This month"},dbInfo:"DB v{{version}} · {{path}}",tableDescription:"Click an account to filter requests.",filterAccountPlaceholder:"Filter account",sortByLabel:"Sort by",autoRefreshLabel:"Auto",autoRefresh:{off:"Off","30s":"30s","60s":"60s","5m":"5m"},exportCsv:"Export CSV",exportCsvAria:"Export accounts as CSV",exportSuccess:"Accounts exported as CSV",premiumReq:"Premium req",empty:{noAccountsTitle:"No accounts yet",noAccountsDescription:"Add your first GitHub Copilot account to start proxying API requests.",noAccountsCta:"Add Your First Account",noMatchesTitle:"No matches",noMatchesDescription:"No accounts match the current filter."},premiumQuotaUsedAria:"Premium interactions quota used",kpiTooltip:{accounts:"Total number of registered GitHub Copilot accounts.",failed:"Accounts that failed authentication or token refresh.",requests:"Total API requests across all accounts in the selected time window.",errors:"Total failed requests (4xx/5xx responses) in the selected time window.",errorRate:"Percentage of requests that returned an error.",tokensPerRequest:"Average number of tokens (input + output) consumed per request.",tokens:"Total tokens consumed across all accounts in the selected time window.",avgDuration:"Weighted average response time across all accounts (in seconds).",premiumUsage:"Aggregated premium request quota across all accounts (excluding unlimited accounts)"},tableTooltip:{premiumReq:"Premium interactions quota: used vs remaining for the current billing cycle.",avgMs:"Average response time in seconds for this account."},type:"Type",accountType:{free:"Free",individual:"Individual",business:"Business",enterprise:"Enterprise"},kpi:{premiumUsage:"Premium Usage",premiumTotal:"Total",premiumUsageAria:"Premium request usage progress",premiumUnlimitedNote:"+{{count}} unlimited account(s) not included"},enabledToggleFailed:"Failed to update account enabled state"},fK={loadFailedTitle:"Failed to load requests",description:"Filter and inspect recent requests.",tabs:{quick:"Quick",advanced:"Advanced"},filters:{timeRange:"Time range",hasError:"Has error",upstreamModel:"Upstream model",clientModel:"Client model"},timeRange:{last15m:"Last 15m",last1h:"Last 1h",last6h:"Last 6h",last24h:"Last 24h",last7d:"Last 7d",custom:"Custom..."},validation:{title:"Invalid time range",fromMsMustBeNumber:"Start time must be a valid date.",toMsMustBeNumber:"End time must be a valid date.",fromMsMustBeLteToMs:"Start time must be before end time."},empty:{noRequestsTitle:"No requests",noResultsForFilters:"No results for the current filters.",noRequestsFound:"No requests found."},affinityHit:"Affinity cache hit",resultCount:"{{count}} loaded",resultCountWithMore:"{{count}}+ loaded",activeFilters:"{{count}} active",autoRefreshLabel:"Auto",autoRefresh:{off:"Off","30s":"30s","60s":"60s","5m":"5m"},columnTooltip:{initiator:"Value of the x-initiator header sent by the client (e.g. IDE extension name).",subagentRequest:"Whether this request was identified as a subagent request.",cost:"Copilot cost units consumed by this request.",quota:"Premium interactions quota remaining after this request.",duration:"Total response time in seconds.",tokens:"Total tokens consumed (input + output)."}},dK={title:"Models",description:"View available models and their metadata.",totalCount:"{{count}} models",filteredCount:"{{filtered}} of {{total}} models",searchPlaceholder:"Search by name or ID",searchAriaLabel:"Search models by name or ID",aliasesMore:"+{{count}} more",loadFailedTitle:"Failed to load models",toast:{loadFailed:"Failed to load models"},columns:{name:"Model",endpoints:"Endpoints",originalId:"Model ID",aliases:"Aliases",context:"Token Limits",features:"Features",multiplier:"Cost"},columnTooltip:{name:"Display name of the model as exposed by the proxy.",endpoints:"API endpoints that support this model (e.g. chat-completions, messages).",originalId:"Original upstream model identifier and any configured aliases.",context:"Maximum token limits for input (prompt) and output (completion).",features:"Capabilities supported by this model.",multiplier:"Copilot billing cost multiplier — higher values consume more premium quota per request."},contextTooltip:"Max input: {{input}} tokens · Max output: {{output}} tokens",badges:{preview:"preview",premium:"premium"},features:{tools:"tools",vision:"vision",structuredOutputs:"structured",streaming:"streaming",parallelTools:"parallel tools"},featureTooltip:{tools:"Supports function/tool calling.",vision:"Can process image inputs.",structuredOutputs:"Supports JSON schema-constrained output.",streaming:"Supports streaming responses.",parallelTools:"Can execute multiple tool calls in parallel."},contextInputLabel:"in",contextOutputLabel:"out",empty:{title:"No models",description:"No models found.",noMatchesDescription:"No models match the current search or filters."}},hK={loadFailedTitle:"Failed to load request",title:"Request Detail",notFoundTitle:"Request not found",notFoundDescription:"The specified request could not be found.",summaryTitle:"Summary",rawTitle:"Raw JSON",rawDescription:"Full request record in JSON format.",searchPlaceholder:"Search key or value…",toast:{copiedJson:"Copied JSON",copyFailed:"Copy failed",downloadedJson:"Downloaded JSON",downloadFailed:"Download failed"},sections:{request:"Request",routing:"Routing",upstreamHeaders:"Upstream Headers",client:"Client",usage:"Usage"},fields:{time:"Time",path:"Path",endpoint:"Endpoint",account:"Account",userId:"User ID",safetyIdentifier:"Safety ID",promptCacheKey:"Prompt Cache Key",initiator:"Initiator",upstreamRequestId:"Pre-route Request ID",outboundXRequestId:"Outbound x-request-id",outboundXAgentTaskId:"Outbound x-agent-task-id",outboundXInteractionType:"Outbound x-interaction-type",outboundOpenaiIntent:"Outbound openai-intent",outboundUserAgent:"Outbound user-agent",model:"Model",client:"Client",clientIp:"Inbound IP",inboundUserAgent:"Inbound user-agent",tokens:"Tokens",quota:"Quota",affinityHit:"Affinity Hit",affinityCacheKey:"Affinity Cache Key",affinityKeyUsed:"Affinity Key Used",affinityKeySource:"Affinity Key Source",selectionReason:"Selection Reason",upstreamErrorMessageRaw:"Upstream Error (Raw)",duration:"Duration (s)",ttfb:"TTFB (s)"},fieldTooltip:{endpoint:"The upstream API endpoint this request was forwarded to",userId:"GitHub user ID associated with this request",safetyIdentifier:"Safety identifier used for content moderation",promptCacheKey:"Cache key for prompt deduplication",initiator:"The component or client that initiated this request",upstreamRequestId:"The request id generated or passed through before the final upstream send; in messages-proxy flows, the eventual upstream x-request-id may be rewritten later",outboundXRequestId:"The final x-request-id actually sent to the upstream GitHub Copilot API",outboundXAgentTaskId:"The final x-agent-task-id actually sent to the upstream GitHub Copilot API",outboundXInteractionType:"The final x-interaction-type actually sent to the upstream GitHub Copilot API",outboundOpenaiIntent:"The final openai-intent actually sent to the upstream GitHub Copilot API",outboundUserAgent:"The final user-agent actually sent to the upstream GitHub Copilot API",clientIp:"The source IP parsed when the client request entered this service",inboundUserAgent:"The user-agent carried by the inbound client request",affinityCacheKey:"Account affinity cache key persisted after a successful request",affinityKeyUsed:"The exact key value used when evaluating account affinity for this request",affinityKeySource:"Where the affinity key came from: prompt_cache_key, metadata.session_id, x-session-id, or request-id fallback",selectionReason:"High-level reason recorded by the account selector for why this account was chosen",upstreamErrorMessageRaw:"Sanitized raw upstream error message captured for debugging and ownership-mismatch analysis",duration:"Total request processing time in seconds",ttfb:"Time to first byte in seconds — latency before the first response chunk"},tokens:{in:"Input",out:"Output",total:"Total",cached:"Cached"},quota:{before:"Before",after:"After",diff:"Change"}},mK={expand:"Expand",collapse:"Collapse",root:"(root)",more:"… {{count}} more",arrayLabel:"Array({{count}})",objectLabel:"Object({{count}})",expandAll:"Expand all",collapseAll:"Collapse all",statusCollapsed:"collapsed",statusExpanded:"expanded",statusDepth:"depth<{{depth}}"},pK={subtitle:"Manage server configuration and feature flags.",configPath:"Config path: {{path}}",note:"Changes take effect after saving.",errorTitle:"Failed to load settings",sections:{general:"General",accountAffinity:"Account Affinity",reasoning:"Reasoning",aliases:"Aliases",prompts:"Prompts",advanced:"Advanced",providers:"Providers"},navigation:{ariaLabel:"Settings sections"},saveButton:{saving:"Saving...",saveChanges:"Save changes"},toast:{loadModelsFailed:"Failed to load models",loadConfigFailed:"Failed to load config",configSaved:"Config saved",saveConfigFailed:"Failed to save config"},common:{defaultOption:"(default)",customModel:"Custom: {{value}}",remove:"Remove",allow:"allow",block:"block",jsonMode:"JSON mode",invalidJsonTitle:"Invalid JSON",selectModelPlaceholder:"Select model",noModelsAvailable:"No models available"},general:{title:"General",description:"Basic configuration.",smallModel:"Small model",smallModelManual:"Small model (manual)",smallModelPlaceholder:"Select small model",smallModelInputPlaceholder:"gpt-5-mini",smallModelHint:"Controls which model receives lightweight/free requests when routing.",apiKeysLabel:"API keys",apiKeysPlaceholder:"one key per line",apiKeysHint:"One key per line (or comma-separated). Leave empty to disable request authentication.",legacyAuthNote:"Legacy fallback remains enabled for env {{env}} or config.apiKey when auth.apiKeys is empty.",anthropicApiKeyLabel:"Anthropic API key",anthropicApiKeyPlaceholder:"sk-ant-...",anthropicApiKeyHint:"Optional. Used for exact Claude /v1/messages/count_tokens calls; without it, the server falls back to local token estimation.",anthropicApiKeyEnvNote:"Runtime fallback remains available through env {{env}}. Leaving this field empty does not override a server-side environment variable.",showAnthropicApiKey:"Show",hideAnthropicApiKey:"Hide"},accountAffinity:{title:"Account Affinity",description:"Configure account affinity routing.",label:"Enable account affinity",hint:"Routes requests to the account that last successfully handled the same session. Applies to both free and premium models."},reasoning:{title:"Reasoning efforts",description:"Override model reasoning effort levels.",hint:"Define per-model reasoning effort (optional).",jsonPlaceholder:'{ "gpt-5-mini": "low" }',emptyState:"No reasoning overrides. Add a model below.",itemHint:"Overrides reasoning effort for this model.",addButton:"Add model override"},prompts:{title:"Extra prompts",description:"Inject extra system prompts per model.",hint:"Add or edit prompt snippets injected for specific models.",jsonPlaceholder:'{ "gpt-5-mini": "..." }',emptyState:"No extra prompts configured.",promptPlaceholder:"System prompt snippet...",itemHint:"Adds prompt content before model execution.",addButton:"Add prompt"},aliases:{title:"Model aliases",description:"Map friendly alias names to upstream model IDs.",defaultBehaviorHint:"Default behavior: {{behavior}} original model IDs. Each alias can override this setting.",jsonPlaceholder:'{ "fast": { "target": "gpt-5-mini", "allowOriginal": true } }',aliasPlaceholder:"Alias",selectTargetPlaceholder:"Select target model",selectOption:"(select)",originalModelPlaceholder:"Original model ID",useDefault:"Use default",allowOriginal:"Allow original model ID",blockOriginal:"Block original model ID",emptyState:"No model aliases configured.",addButton:"Add alias"},advanced:{title:"Advanced",description:"Feature flags and experimental toggles.",routingGroupTitle:"Routing",apiGroupTitle:"API endpoints",modelGroupTitle:"Model & tokens",modelRefreshIntervalLabel:"Model refresh interval (hours)",modelRefreshIntervalHint:"Set to 0 to disable automatic refresh.",modelRefreshIntervalError:"Must be a non-negative number.",sessionAffinityRetentionLabel:"Session affinity retention (days)",sessionAffinityRetentionHint:"Set to 0 to disable automatic cleanup of persisted L2 session affinity rows.",sessionAffinityRetentionError:"Must be a non-negative number.",allowOriginalModelNamesLabel:"Allow original model names",allowOriginalModelNamesHint:"Default behavior when aliases do not override original model IDs.",useFunctionApplyPatchLabel:"Responses API apply_patch",useFunctionApplyPatchHint:"Include the apply_patch function tool when forwarding requests through the Responses API.",forceAgentLabel:"Batch agent requests per session",forceAgentHint:"Affects Copilot Premium request consumption counting: when off, every agent conversation request counts as 1 (same as the VS Code extension); when on, multiple requests in the same session count only once per model.",compactUseSmallModelLabel:"Route compact requests to small model",compactUseSmallModelHint:"When enabled, compact requests use the configured smallModel; otherwise they use the requested model.",messageStartInputTokensFallbackLabel:"Estimate input tokens (fallback)",messageStartInputTokensFallbackHint:"When enabled, estimates message_start input tokens when upstream usage is unavailable.",useMessagesApiLabel:"Enable Messages API",useMessagesApiHint:"When enabled, Claude-family models may use Copilot's native /v1/messages endpoint.",useResponsesApiWebSearchLabel:"Enable Responses API WebSearch",useResponsesApiWebSearchHint:"When enabled, /v1/responses keeps web_search tools and forwards them upstream.",responsesApiContextManagementModelsLabel:"Context management models (Responses API)",responsesApiContextManagementModelsPlaceholder:"one model id per line",responsesApiContextManagementModelsHint:"List of model IDs that should receive Responses API context_management compaction instructions.",providersTitle:"Providers",providersDescription:"Configure upstream providers (currently anthropic only). Each provider key becomes a route prefix (/:provider/v1/messages).",providersIssueTitle:"Invalid providers",providersEmptyState:"No providers configured.",providersAddProvider:"Add provider",providersNamePlaceholder:"Provider key (route prefix)",providersEnabledLabel:"Enabled",providersBaseUrlLabel:"Base URL",providersBaseUrlPlaceholder:"https://api.anthropic.com",providersApiKeyLabel:"API key",providersApiKeyPlaceholder:"sk-...",providersAuthTypeLabel:"Auth type",providersAuthTypeHint:"Controls whether the API key is forwarded as x-api-key or Authorization: Bearer.",providersAuthTypeXApiKey:"x-api-key",providersAuthTypeAuthorization:"authorization",providersAdjustInputTokensLabel:"Adjust input tokens",providersAdjustInputTokensHint:"Subtract cache read/write tokens from upstream usage.input_tokens.",providersModelsLabel:"Model defaults",providersModelsEmptyState:"No per-model defaults.",providersAddModel:"Add model",providersModelIdPlaceholder:"Model ID"}},gK={addAccount:"Add Account",addAccountDescription:"Add a new GitHub Copilot account",selectAccountType:"Select your GitHub Copilot subscription type",typeIndividual:"Individual",typeIndividualDescription:"Personal GitHub Copilot subscription",typeBusiness:"Business",typeBusinessDescription:"Organization-managed Copilot Business plan",typeEnterprise:"Enterprise",typeEnterpriseDescription:"GitHub Copilot Enterprise subscription (GitHub Enterprise Cloud or custom GHE/GHES domain)",enterpriseDomain:"Enterprise Domain (optional)",enterpriseDomainPlaceholder:"github.example.com",enterpriseDomainHint:"Only fill this in when your enterprise uses a custom GHE.com/GHES hostname.",continue:"Continue",cancel:"Cancel",authorizeTitle:"Authorize with GitHub",reauthAuthorizeTitle:'Re-authorize "{{id}}"',reauthAuthorizeDescription:"Complete the authorization flow to refresh this account's credentials.",reauthConfirmDescription:"This will open GitHub in a new tab to re-authorize your account credentials.",reauthConfirmHint:"You will need to enter a device code on GitHub to complete the process. Your existing account data will be preserved.",enterCodePrompt:"Enter the code below at GitHub to authorize:",copy:"Copy",copied:"Copied!",copyFailed:"Copy failed",copyManualHint:"Your browser blocked automatic copy. Please copy the code manually.",autoOpenHint:"A new tab has been opened. If it didn't open automatically:",waitingForAuth:"Waiting for authorization...",expiresIn:"expires in {{time}}",expiresWarning:"Code expiring soon",errorRecoveryHint:"Check your network connection and try again. If the issue persists, make sure your GitHub account has an active Copilot subscription.",errorExpiredHint:"The authorization code has expired. Start over to get a new code.",successTitle:"Account Added!",successReauthTitle:'"{{id}}" Re-authenticated!',accountLabel:"Account",typeLabel:"Type",statusLabel:"Status",statusActive:"Active",done:"Done",expired:"Authorization expired",startOver:"Start Over",retry:"Retry",reauth:"Reauth",delete:"Delete",deleteTitle:"Delete Account",deleteConfirmation:'Are you sure you want to delete account "{{id}}"? This action cannot be undone.',deleteSuccess:'Account "{{id}}" deleted successfully.',authFailed:"Authentication failed",deleting:"Deleting...",reauthAriaLabel:"Re-authenticate account {{id}}",deleteAriaLabel:"Delete account {{id}}"},vK={title:"Not found",description:"The page you are looking for does not exist."},yK={title:"Statistics",premiumUsage:"Premium Usage Trend",accountUsage:"Per-Account Premium Usage",costUnits:"Premium Usage",requestCount:"Request Count",tokensTotal:"Total Tokens",errorCount:"Errors",timeRange:{today:"Today","7d":"7 Days",month:"This Month",custom:"Custom"},autoRefresh:{off:"Auto-refresh: Off","30s":"Every 30s","60s":"Every 60s","5m":"Every 5m"},noData:"No premium request data for this period",loadFailed:"Failed to load statistics"},bK={app:rK,locale:iK,nav:aK,theme:oK,motion:sK,common:lK,tokenDialog:uK,accountsPage:cK,requestsPage:fK,modelsPage:dK,requestDetailPage:hK,jsonViewer:mK,settingsPage:pK,accountManagement:gK,notFound:vK,statistics:yK},xK={title:"Copilot API 管理后台",language:"语言"},wK={enUS:"English",zhCN:"简体中文"},SK={accounts:"账号",requests:"请求",statistics:"统计",models:"模型",settings:"设置",openNavigation:"打开导航"},AK={label:"主题",system:"跟随系统",light:"浅色",dark:"深色"},CK={label:"动效",magic:"炫酷",subtle:"柔和",off:"关闭",reducedMotionEnabled:"系统设置已启用减少动态效果"},EK={set:"已设置",unset:"未设置",test:"测试",testing:"测试中…",clear:"清除",save:"保存",saving:"保存中…",refresh:"刷新",refreshing:"刷新中…",retry:"重试",errors:"错误",tokens:"Tokens",failed:"失败",errorRate:"错误率",tokensPerRequest:"Tokens/请求",avgDurationMs:"平均耗时(s)",lastRequest:"最近请求",account:"账号",status:"状态",avgMs:"平均耗时(s)",clearFilter:"清除筛选",statusFailed:"失败",statusOk:"正常",used:"已用",remaining:"剩余",unlimited:"无限",apply:"应用",any:"(任意)",yes:"是",no:"否",from:"从",to:"到",time:"时间",path:"路径",endpoint:"端点",model:"模型",xInitiator:"发起方",subagentRequest:"子代理请求",cost:"成本",quota:"额度",durationAbbrev:"耗时(s)",loading:"加载中…",loadMore:"加载更多",noMore:"已加载全部",clearFilters:"清除筛选",back:"返回",download:"下载",copyJson:"复制 JSON",actions:"操作",enabled:"启用"},jK={trigger:"Token",title:"管理 Token",description:"调用 <3>/api/admin/*</3> 时会使用 <1>x-admin-token</1> 请求头。存储在 <5>localStorage</5> 中。",inputPlaceholder:"输入 Token",remoteNote:"如果服务端不在 localhost 运行,你必须在服务端设置 <1>ADMIN_TOKEN</1> 才能启用远程访问。",connected:"已连接:DB v{{version}} · {{path}}",validation:{empty:"Token 不能为空。"},toast:{adminApiOk:"Admin API 访问正常",adminApiFailed:"Admin API 访问失败",tokenSaved:"Token 已保存",tokenCleared:"Token 已清除"}},TK={loadFailedTitle:"加载账号失败",statsWindowLabel:"统计窗口",window:{last24h:"最近 24 小时",last7d:"最近 7 天",thisMonth:"本月"},dbInfo:"DB v{{version}} · {{path}}",tableDescription:"点击账号可筛选请求。",filterAccountPlaceholder:"筛选账号",sortByLabel:"排序",autoRefreshLabel:"自动",autoRefresh:{off:"关闭","30s":"30秒","60s":"60秒","5m":"5分钟"},exportCsv:"导出 CSV",exportCsvAria:"将账号导出为 CSV",exportSuccess:"账号已导出为 CSV",premiumReq:"Premium 请求",empty:{noAccountsTitle:"还没有账号",noAccountsDescription:"添加你的第一个 GitHub Copilot 账号,即可开始代理 API 请求。",noAccountsCta:"添加第一个账号",noMatchesTitle:"无匹配结果",noMatchesDescription:"没有账号匹配当前筛选条件。"},premiumQuotaUsedAria:"Premium 交互额度使用量",kpiTooltip:{accounts:"已注册的 GitHub Copilot 账号总数。",failed:"认证或 Token 刷新失败的账号。",requests:"在选定时间窗口内所有账号的 API 请求总数。",errors:"在选定时间窗口内返回错误(4xx/5xx)的请求总数。",errorRate:"返回错误的请求所占百分比。",tokensPerRequest:"每次请求平均消耗的 Token 数(输入+输出)。",tokens:"在选定时间窗口内所有账号消耗的 Token 总数。",avgDuration:"所有账号的加权平均响应时间(秒)。",premiumUsage:"所有账号的 Premium 请求额度汇总(不含无限额度账号)"},tableTooltip:{premiumReq:"Premium 交互额度:当前计费周期内的已用量与剩余量。",avgMs:"该账号的平均响应时间(秒)。"},type:"类型",accountType:{free:"Free",individual:"Individual",business:"Business",enterprise:"Enterprise"},kpi:{premiumUsage:"Premium 用量",premiumTotal:"总量",premiumUsageAria:"Premium 请求使用进度",premiumUnlimitedNote:"另有 {{count}} 个无限额度账号未计入"},enabledToggleFailed:"更新账号启用状态失败"},OK={loadFailedTitle:"加载请求失败",description:"筛选并查看最近的请求。",tabs:{quick:"快速",advanced:"高级"},filters:{timeRange:"时间范围",hasError:"有错误",upstreamModel:"上游模型",clientModel:"客户端模型"},timeRange:{last15m:"最近 15 分钟",last1h:"最近 1 小时",last6h:"最近 6 小时",last24h:"最近 24 小时",last7d:"最近 7 天",custom:"自定义…"},validation:{title:"时间范围无效",fromMsMustBeNumber:"开始时间必须是有效的日期。",toMsMustBeNumber:"结束时间必须是有效的日期。",fromMsMustBeLteToMs:"开始时间必须早于结束时间。"},empty:{noRequestsTitle:"无请求",noResultsForFilters:"当前筛选条件下没有结果。",noRequestsFound:"未找到请求。"},affinityHit:"命中亲和性缓存",resultCount:"已加载 {{count}} 条",resultCountWithMore:"已加载 {{count}}+ 条",activeFilters:"{{count}} 个筛选",autoRefreshLabel:"自动",autoRefresh:{off:"关闭","30s":"30秒","60s":"60秒","5m":"5分钟"},columnTooltip:{initiator:"客户端发送的 x-initiator 请求头值(如 IDE 扩展名称)。",subagentRequest:"该请求是否被识别为子代理请求。",cost:"此请求消耗的 Copilot 成本单位。",quota:"此请求完成后剩余的 Premium 交互额度。",duration:"总响应时间(秒)。",tokens:"消耗的总 token 数(输入 + 输出)。"}},PK={title:"模型",description:"查看当前可用模型及其元数据。",totalCount:"共 {{count}} 个模型",filteredCount:"显示 {{filtered}} / {{total}} 个模型",searchPlaceholder:"按名称或 ID 搜索",searchAriaLabel:"按名称或 ID 搜索模型",aliasesMore:"+{{count}} 个",loadFailedTitle:"加载模型失败",toast:{loadFailed:"加载模型失败"},columns:{name:"模型",endpoints:"端点",originalId:"模型ID",aliases:"别名",context:"Token 限制",features:"功能",multiplier:"成本"},columnTooltip:{name:"代理对外暴露的模型显示名称。",endpoints:"支持此模型的 API 端点(如 chat-completions、messages)。",originalId:"上游模型的原始标识符及已配置的别名。",context:"输入(prompt)和输出(completion)的最大 token 限制。",features:"该模型支持的功能。",multiplier:"Copilot 计费成本倍数——值越高,每次请求消耗的 Premium 额度越多。"},contextTooltip:"最大输入:{{input}} tokens · 最大输出:{{output}} tokens",badges:{preview:"预览",premium:"高级"},features:{tools:"工具",vision:"视觉",structuredOutputs:"结构化",streaming:"流式",parallelTools:"并行工具"},featureTooltip:{tools:"支持函数/工具调用。",vision:"可以处理图像输入。",structuredOutputs:"支持 JSON Schema 约束输出。",streaming:"支持流式响应。",parallelTools:"可以同时执行多个工具调用。"},contextInputLabel:"输入",contextOutputLabel:"输出",empty:{title:"无模型",description:"未找到模型。",noMatchesDescription:"没有模型匹配当前的搜索或筛选条件。"}},NK={loadFailedTitle:"加载请求详情失败",title:"请求详情",notFoundTitle:"请求不存在",notFoundDescription:"未找到指定的请求记录。",summaryTitle:"摘要",rawTitle:"原始 JSON",rawDescription:"完整请求记录(JSON 格式)。",searchPlaceholder:"搜索键或值…",toast:{copiedJson:"已复制 JSON",copyFailed:"复制失败",downloadedJson:"已下载 JSON",downloadFailed:"下载失败"},sections:{request:"请求",routing:"路由",upstreamHeaders:"上游请求头",client:"客户端",usage:"用量"},fields:{time:"时间",path:"路径",endpoint:"上游端点",account:"账号",userId:"用户 ID",safetyIdentifier:"安全标识",promptCacheKey:"提示词缓存键",initiator:"发起者",upstreamRequestId:"预路由请求 ID",outboundXRequestId:"Outbound x-request-id",outboundXAgentTaskId:"Outbound x-agent-task-id",outboundXInteractionType:"Outbound x-interaction-type",outboundOpenaiIntent:"Outbound openai-intent",outboundUserAgent:"Outbound user-agent",model:"模型",client:"客户端",clientIp:"入站 IP",inboundUserAgent:"入站 user-agent",tokens:"Token",quota:"额度",affinityHit:"亲和性命中",affinityCacheKey:"亲和性缓存键",affinityKeyUsed:"实际使用的亲和性键",affinityKeySource:"亲和性键来源",selectionReason:"选中原因",upstreamErrorMessageRaw:"上游原始错误(脱敏后)",duration:"耗时(s)",ttfb:"首字节(s)"},fieldTooltip:{endpoint:"此请求被转发到的上游 API 端点",userId:"与此请求关联的 GitHub 用户 ID",safetyIdentifier:"用于内容审核的安全标识符",promptCacheKey:"用于提示词去重的缓存键",initiator:"发起此请求的组件或客户端",upstreamRequestId:"路由层在最终发送前生成或传递的 request id;在 messages-proxy 场景下,最终发往上游的 x-request-id 可能会被后续 headers 改写",outboundXRequestId:"最终实际发往上游 GitHub Copilot API 的 x-request-id",outboundXAgentTaskId:"最终实际发往上游 GitHub Copilot API 的 x-agent-task-id",outboundXInteractionType:"最终实际发往上游 GitHub Copilot API 的 x-interaction-type",outboundOpenaiIntent:"最终实际发往上游 GitHub Copilot API 的 openai-intent",outboundUserAgent:"最终实际发往上游 GitHub Copilot API 的 user-agent",clientIp:"客户端请求进入当前服务时解析出的来源 IP",inboundUserAgent:"客户端请求进入当前服务时携带的 user-agent",affinityCacheKey:"请求成功后持久化保存、用于账号亲和性命中的缓存键",affinityKeyUsed:"本次请求在评估账号亲和性时实际使用的键值",affinityKeySource:"亲和性键的来源:prompt_cache_key、metadata.session_id、x-session-id,或 request-id 回退值",selectionReason:"账号选择器记录的高层原因,用于解释这次为何选中当前账号",upstreamErrorMessageRaw:"为调试和所有权不匹配分析保存的、已脱敏的上游原始错误消息",duration:"请求总处理时间(秒)",ttfb:"首字节时间(秒)— 收到第一个响应块前的延迟"},tokens:{in:"输入",out:"输出",total:"总计",cached:"缓存"},quota:{before:"之前",after:"之后",diff:"变化"}},_K={expand:"展开",collapse:"折叠",root:"(根)",more:"… 还有 {{count}} 项",arrayLabel:"数组({{count}})",objectLabel:"对象({{count}})",expandAll:"全部展开",collapseAll:"全部折叠",statusCollapsed:"已折叠",statusExpanded:"已展开",statusDepth:"层级<{{depth}}"},MK={subtitle:"管理服务端配置和功能开关。",configPath:"配置路径:{{path}}",note:"更改在保存后生效。",errorTitle:"加载设置失败",sections:{general:"通用",accountAffinity:"账号亲和性",reasoning:"推理",aliases:"别名",prompts:"提示词",advanced:"高级",providers:"上游提供方"},navigation:{ariaLabel:"设置分区"},saveButton:{saving:"保存中…",saveChanges:"保存更改"},toast:{loadModelsFailed:"加载模型失败",loadConfigFailed:"加载配置失败",configSaved:"配置已保存",saveConfigFailed:"保存配置失败"},common:{defaultOption:"(默认)",customModel:"自定义:{{value}}",remove:"移除",allow:"允许",block:"阻止",jsonMode:"JSON 模式",invalidJsonTitle:"无效的 JSON",selectModelPlaceholder:"选择模型",noModelsAvailable:"没有可用模型"},general:{title:"通用",description:"基础配置。",smallModel:"小模型",smallModelManual:"小模型(手动)",smallModelPlaceholder:"选择小模型",smallModelInputPlaceholder:"gpt-5-mini",smallModelHint:"控制路由时接收轻量/免费请求的模型。",apiKeysLabel:"API 密钥列表",apiKeysPlaceholder:"每行一个密钥",apiKeysHint:"支持每行一个或逗号分隔;留空表示关闭请求鉴权。",legacyAuthNote:"当 auth.apiKeys 为空时,仍会回退使用环境变量 {{env}} 或 config.apiKey(兼容旧配置)。",anthropicApiKeyLabel:"Anthropic API Key",anthropicApiKeyPlaceholder:"sk-ant-...",anthropicApiKeyHint:"可选。用于 Claude `/v1/messages/count_tokens` 的精确计数;未配置时,服务端会回退到本地 token 估算。",anthropicApiKeyEnvNote:"运行时仍可通过环境变量 {{env}} 回退提供。将此输入框留空并不会覆盖服务端已设置的环境变量。",showAnthropicApiKey:"显示",hideAnthropicApiKey:"隐藏"},accountAffinity:{title:"账号亲和性",description:"配置账号亲和性路由。",label:"启用账号亲和性",hint:"将请求路由到上次成功处理同一会话的账号。同时适用于免费和付费模型。"},reasoning:{title:"推理强度",description:"覆盖模型的推理强度等级。",hint:"定义每个模型的推理强度(可选)。",jsonPlaceholder:'{ \\"gpt-5-mini\\": \\"low\\" }',emptyState:"没有推理覆盖。请在下方添加模型。",itemHint:"覆盖该模型的推理强度。",addButton:"添加模型覆盖"},prompts:{title:"额外提示词",description:"为每个模型注入额外的 system prompt。",hint:"为指定模型添加或编辑注入的 prompt 片段。",jsonPlaceholder:'{ \\"gpt-5-mini\\": \\"...\\" }',emptyState:"未配置额外提示词。",promptPlaceholder:"System prompt 片段…",itemHint:"在模型执行前追加 prompt 内容。",addButton:"添加提示词"},aliases:{title:"模型别名",description:"将友好别名映射到上游模型 ID。",defaultBehaviorHint:"默认行为:{{behavior}} 原始模型 ID。每个别名可覆盖此设置。",jsonPlaceholder:'{ \\"fast\\": { \\"target\\": \\"gpt-5-mini\\", \\"allowOriginal\\": true } }',aliasPlaceholder:"别名",selectTargetPlaceholder:"选择目标模型",selectOption:"(选择)",originalModelPlaceholder:"原始模型 ID",useDefault:"使用默认值",allowOriginal:"允许原始模型 ID",blockOriginal:"阻止原始模型 ID",emptyState:"未配置模型别名。",addButton:"添加别名"},advanced:{title:"高级",description:"功能开关与实验选项。",routingGroupTitle:"路由",apiGroupTitle:"API 端点",modelGroupTitle:"模型与 Token",modelRefreshIntervalLabel:"模型列表刷新间隔(小时)",modelRefreshIntervalHint:"设置为 0 表示关闭自动刷新。",modelRefreshIntervalError:"必须是非负数字。",sessionAffinityRetentionLabel:"Session affinity 保留期(天)",sessionAffinityRetentionHint:"设置为 0 表示关闭持久化 L2 session affinity 记录的自动清理。",sessionAffinityRetentionError:"必须是非负数字。",allowOriginalModelNamesLabel:"允许原始模型名",allowOriginalModelNamesHint:"当别名未覆盖时的默认行为。",useFunctionApplyPatchLabel:"Responses API apply_patch",useFunctionApplyPatchHint:"在 Responses API 转发请求时包含 apply_patch 函数工具。",forceAgentLabel:"按会话合并 Agent 请求计费",forceAgentHint:"影响 Copilot高级请求消耗的计次:关闭时,每次与 Agent 的对话请求都会计 1 次(与 VS Code 插件一致);开启时,同一会话内对同一模型的多次请求只计 1 次。",compactUseSmallModelLabel:"compact 请求路由到小模型",compactUseSmallModelHint:"启用后,compact 请求使用配置的小模型;否则使用请求的模型。",messageStartInputTokensFallbackLabel:"估算输入 tokens(回退)",messageStartInputTokensFallbackHint:"启用后,当上游 usage 不可用时,会估算 message_start 的 input tokens。",useMessagesApiLabel:"启用 Messages API",useMessagesApiHint:"启用后,支持 Copilot 原生 /v1/messages 的 Claude 系列模型将优先走 Messages API。",useResponsesApiWebSearchLabel:"启用 Responses API WebSearch",useResponsesApiWebSearchHint:"启用后,/v1/responses 会保留 web_search 工具并继续向上游转发。",responsesApiContextManagementModelsLabel:"上下文管理模型(Responses API)",responsesApiContextManagementModelsPlaceholder:"每行一个 model id",responsesApiContextManagementModelsHint:"这些模型将收到 Responses API 的 context_management 压缩指令。",providersTitle:"上游 Providers",providersDescription:"配置上游 provider(目前仅支持 anthropic)。每个 provider key 会作为路由前缀(/:provider/v1/messages)。",providersIssueTitle:"Providers 配置无效",providersEmptyState:"未配置 providers。",providersAddProvider:"添加 provider",providersNamePlaceholder:"Provider key(路由前缀)",providersEnabledLabel:"启用",providersBaseUrlLabel:"Base URL",providersBaseUrlPlaceholder:"https://api.anthropic.com",providersApiKeyLabel:"API Key",providersApiKeyPlaceholder:"sk-...",providersAuthTypeLabel:"认证类型",providersAuthTypeHint:"控制向上游发送 API Key 的方式:使用 x-api-key,或使用 Authorization: Bearer。",providersAuthTypeXApiKey:"x-api-key",providersAuthTypeAuthorization:"authorization",providersAdjustInputTokensLabel:"调整输入 Tokens",providersAdjustInputTokensHint:"从上游 usage.input_tokens 中扣除缓存读写 tokens。",providersModelsLabel:"模型默认参数",providersModelsEmptyState:"未配置按模型的默认参数。",providersAddModel:"添加模型",providersModelIdPlaceholder:"Model ID"}},RK={addAccount:"添加账号",addAccountDescription:"添加新的 GitHub Copilot 账号",selectAccountType:"选择你的 GitHub Copilot 订阅类型",typeIndividual:"Individual(个人版)",typeIndividualDescription:"个人 GitHub Copilot 订阅",typeBusiness:"Business(商业版)",typeBusinessDescription:"组织管理的 Copilot Business 计划",typeEnterprise:"Enterprise(企业版)",typeEnterpriseDescription:"GitHub Copilot Enterprise 订阅(支持 GitHub Enterprise Cloud 或自定义 GHE/GHES 域名)",enterpriseDomain:"Enterprise 域名(可选)",enterpriseDomainPlaceholder:"github.example.com",enterpriseDomainHint:"仅当你的企业使用自定义 GHE.com/GHES 主机名时才需要填写。",continue:"继续",cancel:"取消",authorizeTitle:"GitHub 授权",reauthAuthorizeTitle:'重新授权 "{{id}}"',reauthAuthorizeDescription:"完成授权流程以刷新此账号的凭据。",reauthConfirmDescription:"这将在新标签页中打开 GitHub 以重新授权你的账号凭据。",reauthConfirmHint:"你需要在 GitHub 上输入设备码来完成流程。现有账号数据将保留不变。",enterCodePrompt:"请在 GitHub 输入以下代码以完成授权:",copy:"复制",copied:"已复制!",copyFailed:"复制失败",copyManualHint:"浏览器阻止了自动复制,请手动复制上方授权码。",autoOpenHint:"已打开新标签页。如果未自动打开:",waitingForAuth:"等待授权中...",expiresIn:"{{time}} 后过期",expiresWarning:"授权码即将过期",errorRecoveryHint:"请检查网络连接后重试。如问题持续存在,请确认你的 GitHub 账号已订阅 Copilot。",errorExpiredHint:"授权码已过期,请重新开始以获取新的授权码。",successTitle:"账号添加成功!",successReauthTitle:'"{{id}}" 重新认证成功!',accountLabel:"账号",typeLabel:"类型",statusLabel:"状态",statusActive:"正常",done:"完成",expired:"授权已过期",startOver:"重新开始",retry:"重试",reauth:"重新认证",delete:"删除",deleteTitle:"删除账号",deleteConfirmation:'确定要删除账号 "{{id}}" 吗?此操作不可撤销。',deleteSuccess:'账号 "{{id}}" 已成功删除。',authFailed:"认证失败",deleting:"删除中...",reauthAriaLabel:"重新认证账号 {{id}}",deleteAriaLabel:"删除账号 {{id}}"},DK={title:"未找到页面",description:"你访问的页面不存在。"},kK={title:"统计",premiumUsage:"高级请求用量趋势",accountUsage:"各账号高级请求消耗",costUnits:"Premium 消耗",requestCount:"请求次数",tokensTotal:"总 Token 数",errorCount:"错误数",timeRange:{today:"今日","7d":"7 天",month:"本月",custom:"自定义"},autoRefresh:{off:"自动刷新:关","30s":"每 30 秒","60s":"每 60 秒","5m":"每 5 分钟"},noData:"该时间段无高级请求数据",loadFailed:"加载统计数据失败"},LK={app:xK,locale:wK,nav:SK,theme:AK,motion:CK,common:EK,tokenDialog:jK,accountsPage:TK,requestsPage:OK,modelsPage:PK,requestDetailPage:NK,jsonViewer:_K,settingsPage:MK,accountManagement:RK,notFound:DK,statistics:kK},Jf="en-US",IK=["en-US","zh-CN"],iI="locale";function Fw(e){if(!e)return Jf;const t=e.toLowerCase().trim().replace(/_/g,"-");return t.startsWith("zh")?"zh-CN":t.startsWith("en")?"en-US":Jf}function aI(){if(typeof window>"u")return Jf;try{const e=globalThis.localStorage.getItem(iI);if(e)return Fw(e);const t=Array.isArray(navigator.languages)&&navigator.languages[0]||navigator.language;return Fw(t)}catch{return Jf}}yt.use(X9).init({resources:{"en-US":{translation:bK},"zh-CN":{translation:LK}},lng:aI(),fallbackLng:Jf,supportedLngs:[...IK],interpolation:{escapeValue:!1},react:{useSuspense:!1},initImmediate:!1});const zK=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),$K=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),oN=e=>{const t=$K(e);return t.charAt(0).toUpperCase()+t.slice(1)},oI=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),BK=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var UK={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const VK=v.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:l,...u},c)=>v.createElement("svg",{ref:c,...UK,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:oI("lucide",i),...!o&&!BK(u)&&{"aria-hidden":"true"},...u},[...l.map(([d,m])=>v.createElement(d,m)),...Array.isArray(o)?o:[o]]));const Rt=(e,t)=>{const n=v.forwardRef(({className:r,...i},o)=>v.createElement(VK,{ref:o,iconNode:t,className:oI(`lucide-${zK(oN(e))}`,`lucide-${e}`,r),...i}));return n.displayName=oN(e),n};const FK=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],sN=Rt("arrow-left",FK);const qK=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],HK=Rt("check",qK);const KK=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],FS=Rt("chevron-down",KK);const GK=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],WK=Rt("chevron-right",GK);const YK=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],XK=Rt("chevron-up",YK);const ZK=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],qS=Rt("circle-check",ZK);const QK=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],sI=Rt("download",QK);const JK=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],e7=Rt("eye-off",JK);const t7=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],n7=Rt("eye",t7);const r7=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],i7=Rt("globe",r7);const a7=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],lI=Rt("info",a7);const o7=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],s7=Rt("key-round",o7);const l7=[["path",{d:"M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",key:"1pdavp"}],["path",{d:"M20.054 15.987H3.946",key:"14rxg9"}]],u7=Rt("laptop",l7);const c7=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Bu=Rt("loader-circle",c7);const f7=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],d7=Rt("menu",f7);const h7=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],m7=Rt("moon",h7);const p7=[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],HS=Rt("octagon-x",p7);const g7=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],lN=Rt("plus",g7);const v7=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],wp=Rt("refresh-cw",v7);const y7=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],b7=Rt("search",y7);const x7=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],w7=Rt("sun",x7);const S7=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],uI=Rt("triangle-alert",S7);const A7=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],C7=Rt("user-plus",A7);const E7=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],cI=Rt("x",E7);function uN(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ac(...e){return t=>{let n=!1;const r=e.map(i=>{const o=uN(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():uN(e[i],null)}}}}function Mt(...e){return v.useCallback(ac(...e),e)}var j7=Symbol.for("react.lazy"),Sp=Dg[" use ".trim().toString()];function T7(e){return typeof e=="object"&&e!==null&&"then"in e}function fI(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===j7&&"_payload"in e&&T7(e._payload)}function dI(e){const t=O7(e),n=v.forwardRef((r,i)=>{let{children:o,...l}=r;fI(o)&&typeof Sp=="function"&&(o=Sp(o._payload));const u=v.Children.toArray(o),c=u.find(N7);if(c){const d=c.props.children,m=u.map(h=>h===c?v.Children.count(d)>1?v.Children.only(null):v.isValidElement(d)?d.props.children:null:h);return g.jsx(t,{...l,ref:i,children:v.isValidElement(d)?v.cloneElement(d,void 0,m):null})}return g.jsx(t,{...l,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}var KS=dI("Slot");function O7(e){const t=v.forwardRef((n,r)=>{let{children:i,...o}=n;if(fI(i)&&typeof Sp=="function"&&(i=Sp(i._payload)),v.isValidElement(i)){const l=M7(i),u=_7(o,i.props);return i.type!==v.Fragment&&(u.ref=r?ac(r,l):l),v.cloneElement(i,u)}return v.Children.count(i)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var P7=Symbol("radix.slottable");function N7(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===P7}function _7(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...u)=>{const c=o(...u);return i(...u),c}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function M7(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function hI(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=hI(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function at(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=hI(e))&&(r&&(r+=" "),r+=t);return r}const cN=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,fN=at,GS=(e,t)=>n=>{var r;if(t?.variants==null)return fN(e,n?.class,n?.className);const{variants:i,defaultVariants:o}=t,l=Object.keys(i).map(d=>{const m=n?.[d],h=o?.[d];if(m===null)return null;const y=cN(m)||cN(h);return i[d][y]}),u=n&&Object.entries(n).reduce((d,m)=>{let[h,y]=m;return y===void 0||(d[h]=y),d},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,m)=>{let{class:h,className:y,...b}=m;return Object.entries(b).every(w=>{let[S,C]=w;return Array.isArray(C)?C.includes({...o,...u}[S]):{...o,...u}[S]===C})?[...d,h,y]:d},[]);return fN(e,l,c,n?.class,n?.className)},R7=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},D7=(e,t)=>({classGroupId:e,validator:t}),mI=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Ap="-",dN=[],k7="arbitrary..",L7=e=>{const t=z7(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return I7(l);const u=l.split(Ap),c=u[0]===""&&u.length>1?1:0;return pI(u,c,t)},getConflictingClassGroupIds:(l,u)=>{if(u){const c=r[l],d=n[l];return c?d?R7(d,c):c:d||dN}return n[l]||dN}}},pI=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],o=n.nextPart.get(i);if(o){const d=pI(e,t+1,o);if(d)return d}const l=n.validators;if(l===null)return;const u=t===0?e.join(Ap):e.slice(t).join(Ap),c=l.length;for(let d=0;d<c;d++){const m=l[d];if(m.validator(u))return m.classGroupId}},I7=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?k7+r:void 0})(),z7=e=>{const{theme:t,classGroups:n}=e;return $7(n,t)},$7=(e,t)=>{const n=mI();for(const r in e){const i=e[r];WS(i,n,r,t)}return n},WS=(e,t,n,r)=>{const i=e.length;for(let o=0;o<i;o++){const l=e[o];B7(l,t,n,r)}},B7=(e,t,n,r)=>{if(typeof e=="string"){U7(e,t,n);return}if(typeof e=="function"){V7(e,t,n,r);return}F7(e,t,n,r)},U7=(e,t,n)=>{const r=e===""?t:gI(t,e);r.classGroupId=n},V7=(e,t,n,r)=>{if(q7(e)){WS(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(D7(n,e))},F7=(e,t,n,r)=>{const i=Object.entries(e),o=i.length;for(let l=0;l<o;l++){const[u,c]=i[l];WS(c,gI(t,u),n,r)}},gI=(e,t)=>{let n=e;const r=t.split(Ap),i=r.length;for(let o=0;o<i;o++){const l=r[o];let u=n.nextPart.get(l);u||(u=mI(),n.nextPart.set(l,u)),n=u}return n},q7=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,H7=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(o,l)=>{n[o]=l,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(o){let l=n[o];if(l!==void 0)return l;if((l=r[o])!==void 0)return i(o,l),l},set(o,l){o in n?n[o]=l:i(o,l)}}},qw="!",hN=":",K7=[],mN=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),G7=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const o=[];let l=0,u=0,c=0,d;const m=i.length;for(let S=0;S<m;S++){const C=i[S];if(l===0&&u===0){if(C===hN){o.push(i.slice(c,S)),c=S+1;continue}if(C==="/"){d=S;continue}}C==="["?l++:C==="]"?l--:C==="("?u++:C===")"&&u--}const h=o.length===0?i:i.slice(c);let y=h,b=!1;h.endsWith(qw)?(y=h.slice(0,-1),b=!0):h.startsWith(qw)&&(y=h.slice(1),b=!0);const w=d&&d>c?d-c:void 0;return mN(o,b,y,w)};if(t){const i=t+hN,o=r;r=l=>l.startsWith(i)?o(l.slice(i.length)):mN(K7,!1,l,void 0,!0)}if(n){const i=r;r=o=>n({className:o,parseClassName:i})}return r},W7=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let o=0;o<n.length;o++){const l=n[o],u=l[0]==="[",c=t.has(l);u||c?(i.length>0&&(i.sort(),r.push(...i),i=[]),r.push(l)):i.push(l)}return i.length>0&&(i.sort(),r.push(...i)),r}},Y7=e=>({cache:H7(e.cacheSize),parseClassName:G7(e),sortModifiers:W7(e),...L7(e)}),X7=/\s+/,Z7=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:o}=t,l=[],u=e.trim().split(X7);let c="";for(let d=u.length-1;d>=0;d-=1){const m=u[d],{isExternal:h,modifiers:y,hasImportantModifier:b,baseClassName:w,maybePostfixModifierPosition:S}=n(m);if(h){c=m+(c.length>0?" "+c:c);continue}let C=!!S,E=r(C?w.substring(0,S):w);if(!E){if(!C){c=m+(c.length>0?" "+c:c);continue}if(E=r(w),!E){c=m+(c.length>0?" "+c:c);continue}C=!1}const j=y.length===0?"":y.length===1?y[0]:o(y).join(":"),T=b?j+qw:j,O=T+E;if(l.indexOf(O)>-1)continue;l.push(O);const N=i(E,C);for(let _=0;_<N.length;++_){const M=N[_];l.push(T+M)}c=m+(c.length>0?" "+c:c)}return c},Q7=(...e)=>{let t=0,n,r,i="";for(;t<e.length;)(n=e[t++])&&(r=vI(n))&&(i&&(i+=" "),i+=r);return i},vI=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=vI(e[r]))&&(n&&(n+=" "),n+=t);return n},J7=(e,...t)=>{let n,r,i,o;const l=c=>{const d=t.reduce((m,h)=>h(m),e());return n=Y7(d),r=n.cache.get,i=n.cache.set,o=u,u(c)},u=c=>{const d=r(c);if(d)return d;const m=Z7(c,n);return i(c,m),m};return o=l,(...c)=>o(Q7(...c))},eG=[],fn=e=>{const t=n=>n[e]||eG;return t.isThemeGetter=!0,t},yI=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,bI=/^\((?:(\w[\w-]*):)?(.+)\)$/i,tG=/^\d+\/\d+$/,nG=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,rG=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,iG=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,aG=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,oG=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,fu=e=>tG.test(e),Fe=e=>!!e&&!Number.isNaN(Number(e)),Go=e=>!!e&&Number.isInteger(Number(e)),j0=e=>e.endsWith("%")&&Fe(e.slice(0,-1)),Ha=e=>nG.test(e),sG=()=>!0,lG=e=>rG.test(e)&&!iG.test(e),xI=()=>!1,uG=e=>aG.test(e),cG=e=>oG.test(e),fG=e=>!Ae(e)&&!Ce(e),dG=e=>oc(e,AI,xI),Ae=e=>yI.test(e),ks=e=>oc(e,CI,lG),T0=e=>oc(e,vG,Fe),pN=e=>oc(e,wI,xI),hG=e=>oc(e,SI,cG),bm=e=>oc(e,EI,uG),Ce=e=>bI.test(e),bf=e=>sc(e,CI),mG=e=>sc(e,yG),gN=e=>sc(e,wI),pG=e=>sc(e,AI),gG=e=>sc(e,SI),xm=e=>sc(e,EI,!0),oc=(e,t,n)=>{const r=yI.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},sc=(e,t,n=!1)=>{const r=bI.exec(e);return r?r[1]?t(r[1]):n:!1},wI=e=>e==="position"||e==="percentage",SI=e=>e==="image"||e==="url",AI=e=>e==="length"||e==="size"||e==="bg-size",CI=e=>e==="length",vG=e=>e==="number",yG=e=>e==="family-name",EI=e=>e==="shadow",bG=()=>{const e=fn("color"),t=fn("font"),n=fn("text"),r=fn("font-weight"),i=fn("tracking"),o=fn("leading"),l=fn("breakpoint"),u=fn("container"),c=fn("spacing"),d=fn("radius"),m=fn("shadow"),h=fn("inset-shadow"),y=fn("text-shadow"),b=fn("drop-shadow"),w=fn("blur"),S=fn("perspective"),C=fn("aspect"),E=fn("ease"),j=fn("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],N=()=>[...O(),Ce,Ae],_=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto","contain","none"],R=()=>[Ce,Ae,c],I=()=>[fu,"full","auto",...R()],$=()=>[Go,"none","subgrid",Ce,Ae],F=()=>["auto",{span:["full",Go,Ce,Ae]},Go,Ce,Ae],z=()=>[Go,"auto",Ce,Ae],Y=()=>["auto","min","max","fr",Ce,Ae],Q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],se=()=>["start","end","center","stretch","center-safe","end-safe"],L=()=>["auto",...R()],q=()=>[fu,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...R()],B=()=>[e,Ce,Ae],ae=()=>[...O(),gN,pN,{position:[Ce,Ae]}],G=()=>["no-repeat",{repeat:["","x","y","space","round"]}],D=()=>["auto","cover","contain",pG,dG,{size:[Ce,Ae]}],V=()=>[j0,bf,ks],K=()=>["","none","full",d,Ce,Ae],ee=()=>["",Fe,bf,ks],he=()=>["solid","dashed","dotted","double"],ye=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],X=()=>[Fe,j0,gN,pN],me=()=>["","none",w,Ce,Ae],oe=()=>["none",Fe,Ce,Ae],le=()=>["none",Fe,Ce,Ae],ve=()=>[Fe,Ce,Ae],re=()=>[fu,"full",...R()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ha],breakpoint:[Ha],color:[sG],container:[Ha],"drop-shadow":[Ha],ease:["in","out","in-out"],font:[fG],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ha],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ha],shadow:[Ha],spacing:["px",Fe],text:[Ha],"text-shadow":[Ha],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",fu,Ae,Ce,C]}],container:["container"],columns:[{columns:[Fe,Ae,Ce,u]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:N()}],overflow:[{overflow:_()}],"overflow-x":[{"overflow-x":_()}],"overflow-y":[{"overflow-y":_()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:I()}],"inset-x":[{"inset-x":I()}],"inset-y":[{"inset-y":I()}],start:[{start:I()}],end:[{end:I()}],top:[{top:I()}],right:[{right:I()}],bottom:[{bottom:I()}],left:[{left:I()}],visibility:["visible","invisible","collapse"],z:[{z:[Go,"auto",Ce,Ae]}],basis:[{basis:[fu,"full","auto",u,...R()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Fe,fu,"auto","initial","none",Ae]}],grow:[{grow:["",Fe,Ce,Ae]}],shrink:[{shrink:["",Fe,Ce,Ae]}],order:[{order:[Go,"first","last","none",Ce,Ae]}],"grid-cols":[{"grid-cols":$()}],"col-start-end":[{col:F()}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":$()}],"row-start-end":[{row:F()}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Y()}],"auto-rows":[{"auto-rows":Y()}],gap:[{gap:R()}],"gap-x":[{"gap-x":R()}],"gap-y":[{"gap-y":R()}],"justify-content":[{justify:[...Q(),"normal"]}],"justify-items":[{"justify-items":[...se(),"normal"]}],"justify-self":[{"justify-self":["auto",...se()]}],"align-content":[{content:["normal",...Q()]}],"align-items":[{items:[...se(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...se(),{baseline:["","last"]}]}],"place-content":[{"place-content":Q()}],"place-items":[{"place-items":[...se(),"baseline"]}],"place-self":[{"place-self":["auto",...se()]}],p:[{p:R()}],px:[{px:R()}],py:[{py:R()}],ps:[{ps:R()}],pe:[{pe:R()}],pt:[{pt:R()}],pr:[{pr:R()}],pb:[{pb:R()}],pl:[{pl:R()}],m:[{m:L()}],mx:[{mx:L()}],my:[{my:L()}],ms:[{ms:L()}],me:[{me:L()}],mt:[{mt:L()}],mr:[{mr:L()}],mb:[{mb:L()}],ml:[{ml:L()}],"space-x":[{"space-x":R()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":R()}],"space-y-reverse":["space-y-reverse"],size:[{size:q()}],w:[{w:[u,"screen",...q()]}],"min-w":[{"min-w":[u,"screen","none",...q()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[l]},...q()]}],h:[{h:["screen","lh",...q()]}],"min-h":[{"min-h":["screen","lh","none",...q()]}],"max-h":[{"max-h":["screen","lh",...q()]}],"font-size":[{text:["base",n,bf,ks]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Ce,T0]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",j0,Ae]}],"font-family":[{font:[mG,Ae,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Ce,Ae]}],"line-clamp":[{"line-clamp":[Fe,"none",Ce,T0]}],leading:[{leading:[o,...R()]}],"list-image":[{"list-image":["none",Ce,Ae]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ce,Ae]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:B()}],"text-color":[{text:B()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...he(),"wavy"]}],"text-decoration-thickness":[{decoration:[Fe,"from-font","auto",Ce,ks]}],"text-decoration-color":[{decoration:B()}],"underline-offset":[{"underline-offset":[Fe,"auto",Ce,Ae]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ce,Ae]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ce,Ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ae()}],"bg-repeat":[{bg:G()}],"bg-size":[{bg:D()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Go,Ce,Ae],radial:["",Ce,Ae],conic:[Go,Ce,Ae]},gG,hG]}],"bg-color":[{bg:B()}],"gradient-from-pos":[{from:V()}],"gradient-via-pos":[{via:V()}],"gradient-to-pos":[{to:V()}],"gradient-from":[{from:B()}],"gradient-via":[{via:B()}],"gradient-to":[{to:B()}],rounded:[{rounded:K()}],"rounded-s":[{"rounded-s":K()}],"rounded-e":[{"rounded-e":K()}],"rounded-t":[{"rounded-t":K()}],"rounded-r":[{"rounded-r":K()}],"rounded-b":[{"rounded-b":K()}],"rounded-l":[{"rounded-l":K()}],"rounded-ss":[{"rounded-ss":K()}],"rounded-se":[{"rounded-se":K()}],"rounded-ee":[{"rounded-ee":K()}],"rounded-es":[{"rounded-es":K()}],"rounded-tl":[{"rounded-tl":K()}],"rounded-tr":[{"rounded-tr":K()}],"rounded-br":[{"rounded-br":K()}],"rounded-bl":[{"rounded-bl":K()}],"border-w":[{border:ee()}],"border-w-x":[{"border-x":ee()}],"border-w-y":[{"border-y":ee()}],"border-w-s":[{"border-s":ee()}],"border-w-e":[{"border-e":ee()}],"border-w-t":[{"border-t":ee()}],"border-w-r":[{"border-r":ee()}],"border-w-b":[{"border-b":ee()}],"border-w-l":[{"border-l":ee()}],"divide-x":[{"divide-x":ee()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ee()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...he(),"hidden","none"]}],"divide-style":[{divide:[...he(),"hidden","none"]}],"border-color":[{border:B()}],"border-color-x":[{"border-x":B()}],"border-color-y":[{"border-y":B()}],"border-color-s":[{"border-s":B()}],"border-color-e":[{"border-e":B()}],"border-color-t":[{"border-t":B()}],"border-color-r":[{"border-r":B()}],"border-color-b":[{"border-b":B()}],"border-color-l":[{"border-l":B()}],"divide-color":[{divide:B()}],"outline-style":[{outline:[...he(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Fe,Ce,Ae]}],"outline-w":[{outline:["",Fe,bf,ks]}],"outline-color":[{outline:B()}],shadow:[{shadow:["","none",m,xm,bm]}],"shadow-color":[{shadow:B()}],"inset-shadow":[{"inset-shadow":["none",h,xm,bm]}],"inset-shadow-color":[{"inset-shadow":B()}],"ring-w":[{ring:ee()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:B()}],"ring-offset-w":[{"ring-offset":[Fe,ks]}],"ring-offset-color":[{"ring-offset":B()}],"inset-ring-w":[{"inset-ring":ee()}],"inset-ring-color":[{"inset-ring":B()}],"text-shadow":[{"text-shadow":["none",y,xm,bm]}],"text-shadow-color":[{"text-shadow":B()}],opacity:[{opacity:[Fe,Ce,Ae]}],"mix-blend":[{"mix-blend":[...ye(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ye()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Fe]}],"mask-image-linear-from-pos":[{"mask-linear-from":X()}],"mask-image-linear-to-pos":[{"mask-linear-to":X()}],"mask-image-linear-from-color":[{"mask-linear-from":B()}],"mask-image-linear-to-color":[{"mask-linear-to":B()}],"mask-image-t-from-pos":[{"mask-t-from":X()}],"mask-image-t-to-pos":[{"mask-t-to":X()}],"mask-image-t-from-color":[{"mask-t-from":B()}],"mask-image-t-to-color":[{"mask-t-to":B()}],"mask-image-r-from-pos":[{"mask-r-from":X()}],"mask-image-r-to-pos":[{"mask-r-to":X()}],"mask-image-r-from-color":[{"mask-r-from":B()}],"mask-image-r-to-color":[{"mask-r-to":B()}],"mask-image-b-from-pos":[{"mask-b-from":X()}],"mask-image-b-to-pos":[{"mask-b-to":X()}],"mask-image-b-from-color":[{"mask-b-from":B()}],"mask-image-b-to-color":[{"mask-b-to":B()}],"mask-image-l-from-pos":[{"mask-l-from":X()}],"mask-image-l-to-pos":[{"mask-l-to":X()}],"mask-image-l-from-color":[{"mask-l-from":B()}],"mask-image-l-to-color":[{"mask-l-to":B()}],"mask-image-x-from-pos":[{"mask-x-from":X()}],"mask-image-x-to-pos":[{"mask-x-to":X()}],"mask-image-x-from-color":[{"mask-x-from":B()}],"mask-image-x-to-color":[{"mask-x-to":B()}],"mask-image-y-from-pos":[{"mask-y-from":X()}],"mask-image-y-to-pos":[{"mask-y-to":X()}],"mask-image-y-from-color":[{"mask-y-from":B()}],"mask-image-y-to-color":[{"mask-y-to":B()}],"mask-image-radial":[{"mask-radial":[Ce,Ae]}],"mask-image-radial-from-pos":[{"mask-radial-from":X()}],"mask-image-radial-to-pos":[{"mask-radial-to":X()}],"mask-image-radial-from-color":[{"mask-radial-from":B()}],"mask-image-radial-to-color":[{"mask-radial-to":B()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":O()}],"mask-image-conic-pos":[{"mask-conic":[Fe]}],"mask-image-conic-from-pos":[{"mask-conic-from":X()}],"mask-image-conic-to-pos":[{"mask-conic-to":X()}],"mask-image-conic-from-color":[{"mask-conic-from":B()}],"mask-image-conic-to-color":[{"mask-conic-to":B()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ae()}],"mask-repeat":[{mask:G()}],"mask-size":[{mask:D()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ce,Ae]}],filter:[{filter:["","none",Ce,Ae]}],blur:[{blur:me()}],brightness:[{brightness:[Fe,Ce,Ae]}],contrast:[{contrast:[Fe,Ce,Ae]}],"drop-shadow":[{"drop-shadow":["","none",b,xm,bm]}],"drop-shadow-color":[{"drop-shadow":B()}],grayscale:[{grayscale:["",Fe,Ce,Ae]}],"hue-rotate":[{"hue-rotate":[Fe,Ce,Ae]}],invert:[{invert:["",Fe,Ce,Ae]}],saturate:[{saturate:[Fe,Ce,Ae]}],sepia:[{sepia:["",Fe,Ce,Ae]}],"backdrop-filter":[{"backdrop-filter":["","none",Ce,Ae]}],"backdrop-blur":[{"backdrop-blur":me()}],"backdrop-brightness":[{"backdrop-brightness":[Fe,Ce,Ae]}],"backdrop-contrast":[{"backdrop-contrast":[Fe,Ce,Ae]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Fe,Ce,Ae]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Fe,Ce,Ae]}],"backdrop-invert":[{"backdrop-invert":["",Fe,Ce,Ae]}],"backdrop-opacity":[{"backdrop-opacity":[Fe,Ce,Ae]}],"backdrop-saturate":[{"backdrop-saturate":[Fe,Ce,Ae]}],"backdrop-sepia":[{"backdrop-sepia":["",Fe,Ce,Ae]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":R()}],"border-spacing-x":[{"border-spacing-x":R()}],"border-spacing-y":[{"border-spacing-y":R()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ce,Ae]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Fe,"initial",Ce,Ae]}],ease:[{ease:["linear","initial",E,Ce,Ae]}],delay:[{delay:[Fe,Ce,Ae]}],animate:[{animate:["none",j,Ce,Ae]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,Ce,Ae]}],"perspective-origin":[{"perspective-origin":N()}],rotate:[{rotate:oe()}],"rotate-x":[{"rotate-x":oe()}],"rotate-y":[{"rotate-y":oe()}],"rotate-z":[{"rotate-z":oe()}],scale:[{scale:le()}],"scale-x":[{"scale-x":le()}],"scale-y":[{"scale-y":le()}],"scale-z":[{"scale-z":le()}],"scale-3d":["scale-3d"],skew:[{skew:ve()}],"skew-x":[{"skew-x":ve()}],"skew-y":[{"skew-y":ve()}],transform:[{transform:[Ce,Ae,"","none","gpu","cpu"]}],"transform-origin":[{origin:N()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:re()}],"translate-x":[{"translate-x":re()}],"translate-y":[{"translate-y":re()}],"translate-z":[{"translate-z":re()}],"translate-none":["translate-none"],accent:[{accent:B()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:B()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ce,Ae]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ce,Ae]}],fill:[{fill:["none",...B()]}],"stroke-w":[{stroke:[Fe,bf,ks,T0]}],stroke:[{stroke:["none",...B()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},xG=J7(bG);function de(...e){return xG(at(e))}const wG=GS("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function ke({className:e,variant:t="default",size:n="default",asChild:r=!1,...i}){const o=r?KS:"button";return g.jsx(o,{"data-slot":"button","data-variant":t,"data-size":n,className:de(wG({variant:t,size:n,className:e})),...i})}const YS=v.createContext({});function Nd(e){const t=v.useRef(null);return t.current===null&&(t.current=e()),t.current}const XS=typeof window<"u",ZS=XS?v.useLayoutEffect:v.useEffect,$g=v.createContext(null);function QS(e,t){e.indexOf(t)===-1&&e.push(t)}function JS(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const to=(e,t,n)=>n>t?t:n<e?e:n;let eA=()=>{};const no={},jI=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function TI(e){return typeof e=="object"&&e!==null}const OI=e=>/^0[^.\s]+$/u.test(e);function tA(e){let t;return()=>(t===void 0&&(t=e()),t)}const fi=e=>e,SG=(e,t)=>n=>t(e(n)),_d=(...e)=>e.reduce(SG),ed=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class nA{constructor(){this.subscriptions=[]}add(t){return QS(this.subscriptions,t),()=>JS(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o<i;o++){const l=this.subscriptions[o];l&&l(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const aa=e=>e*1e3,li=e=>e/1e3;function PI(e,t){return t?e*(1e3/t):0}const NI=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,AG=1e-7,CG=12;function EG(e,t,n,r,i){let o,l,u=0;do l=t+(n-t)/2,o=NI(l,r,i)-e,o>0?n=l:t=l;while(Math.abs(o)>AG&&++u<CG);return l}function Md(e,t,n,r){if(e===t&&n===r)return fi;const i=o=>EG(o,0,1,e,n);return o=>o===0||o===1?o:NI(i(o),t,r)}const _I=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,MI=e=>t=>1-e(1-t),RI=Md(.33,1.53,.69,.99),rA=MI(RI),DI=_I(rA),kI=e=>(e*=2)<1?.5*rA(e):.5*(2-Math.pow(2,-10*(e-1))),iA=e=>1-Math.sin(Math.acos(e)),LI=MI(iA),II=_I(iA),jG=Md(.42,0,1,1),TG=Md(0,0,.58,1),zI=Md(.42,0,.58,1),OG=e=>Array.isArray(e)&&typeof e[0]!="number",$I=e=>Array.isArray(e)&&typeof e[0]=="number",PG={linear:fi,easeIn:jG,easeInOut:zI,easeOut:TG,circIn:iA,circInOut:II,circOut:LI,backIn:rA,backInOut:DI,backOut:RI,anticipate:kI},NG=e=>typeof e=="string",vN=e=>{if($I(e)){eA(e.length===4);const[t,n,r,i]=e;return Md(t,n,r,i)}else if(NG(e))return PG[e];return e},wm=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function _G(e,t){let n=new Set,r=new Set,i=!1,o=!1;const l=new WeakSet;let u={delta:0,timestamp:0,isProcessing:!1};function c(m){l.has(m)&&(d.schedule(m),e()),m(u)}const d={schedule:(m,h=!1,y=!1)=>{const w=y&&i?n:r;return h&&l.add(m),w.has(m)||w.add(m),m},cancel:m=>{r.delete(m),l.delete(m)},process:m=>{if(u=m,i){o=!0;return}i=!0,[n,r]=[r,n],n.forEach(c),n.clear(),i=!1,o&&(o=!1,d.process(m))}};return d}const MG=40;function BI(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,l=wm.reduce((T,O)=>(T[O]=_G(o),T),{}),{setup:u,read:c,resolveKeyframes:d,preUpdate:m,update:h,preRender:y,render:b,postRender:w}=l,S=()=>{const T=no.useManualTiming?i.timestamp:performance.now();n=!1,no.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(T-i.timestamp,MG),1)),i.timestamp=T,i.isProcessing=!0,u.process(i),c.process(i),d.process(i),m.process(i),h.process(i),y.process(i),b.process(i),w.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(S))},C=()=>{n=!0,r=!0,i.isProcessing||e(S)};return{schedule:wm.reduce((T,O)=>{const N=l[O];return T[O]=(_,M=!1,R=!1)=>(n||C(),N.schedule(_,M,R)),T},{}),cancel:T=>{for(let O=0;O<wm.length;O++)l[wm[O]].cancel(T)},state:i,steps:l}}const{schedule:bt,cancel:ro,state:Mn,steps:O0}=BI(typeof requestAnimationFrame<"u"?requestAnimationFrame:fi,!0);let np;function RG(){np=void 0}const br={now:()=>(np===void 0&&br.set(Mn.isProcessing||no.useManualTiming?Mn.timestamp:performance.now()),np),set:e=>{np=e,queueMicrotask(RG)}},UI=e=>t=>typeof t=="string"&&t.startsWith(e),VI=UI("--"),DG=UI("var(--"),aA=e=>DG(e)?kG.test(e.split("/*")[0].trim()):!1,kG=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,lc={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},td={...lc,transform:e=>to(0,1,e)},Sm={...lc,default:1},Vf=e=>Math.round(e*1e5)/1e5,oA=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function LG(e){return e==null}const IG=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,sA=(e,t)=>n=>!!(typeof n=="string"&&IG.test(n)&&n.startsWith(e)||t&&!LG(n)&&Object.prototype.hasOwnProperty.call(n,t)),FI=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,o,l,u]=r.match(oA);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(l),alpha:u!==void 0?parseFloat(u):1}},zG=e=>to(0,255,e),P0={...lc,transform:e=>Math.round(zG(e))},Xs={test:sA("rgb","red"),parse:FI("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+P0.transform(e)+", "+P0.transform(t)+", "+P0.transform(n)+", "+Vf(td.transform(r))+")"};function $G(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Hw={test:sA("#"),parse:$G,transform:Xs.transform},Rd=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Yo=Rd("deg"),oa=Rd("%"),be=Rd("px"),BG=Rd("vh"),UG=Rd("vw"),yN={...oa,parse:e=>oa.parse(e)/100,transform:e=>oa.transform(e*100)},Eu={test:sA("hsl","hue"),parse:FI("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+oa.transform(Vf(t))+", "+oa.transform(Vf(n))+", "+Vf(td.transform(r))+")"},nn={test:e=>Xs.test(e)||Hw.test(e)||Eu.test(e),parse:e=>Xs.test(e)?Xs.parse(e):Eu.test(e)?Eu.parse(e):Hw.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Xs.transform(e):Eu.transform(e),getAnimatableNone:e=>{const t=nn.parse(e);return t.alpha=0,nn.transform(t)}},VG=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function FG(e){return isNaN(e)&&typeof e=="string"&&(e.match(oA)?.length||0)+(e.match(VG)?.length||0)>0}const qI="number",HI="color",qG="var",HG="var(",bN="${}",KG=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function nd(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const u=t.replace(KG,c=>(nn.test(c)?(r.color.push(o),i.push(HI),n.push(nn.parse(c))):c.startsWith(HG)?(r.var.push(o),i.push(qG),n.push(c)):(r.number.push(o),i.push(qI),n.push(parseFloat(c))),++o,bN)).split(bN);return{values:n,split:u,indexes:r,types:i}}function KI(e){return nd(e).values}function GI(e){const{split:t,types:n}=nd(e),r=t.length;return i=>{let o="";for(let l=0;l<r;l++)if(o+=t[l],i[l]!==void 0){const u=n[l];u===qI?o+=Vf(i[l]):u===HI?o+=nn.transform(i[l]):o+=i[l]}return o}}const GG=e=>typeof e=="number"?0:nn.test(e)?nn.getAnimatableNone(e):e;function WG(e){const t=KI(e);return GI(e)(t.map(GG))}const is={test:FG,parse:KI,createTransformer:GI,getAnimatableNone:WG};function N0(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function YG({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,l=0;if(!t)i=o=l=n;else{const u=n<.5?n*(1+t):n+t-n*t,c=2*n-u;i=N0(c,u,e+1/3),o=N0(c,u,e),l=N0(c,u,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(l*255),alpha:r}}function Cp(e,t){return n=>n>0?t:e}const kt=(e,t,n)=>e+(t-e)*n,_0=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},XG=[Hw,Xs,Eu],ZG=e=>XG.find(t=>t.test(e));function xN(e){const t=ZG(e);if(!t)return!1;let n=t.parse(e);return t===Eu&&(n=YG(n)),n}const wN=(e,t)=>{const n=xN(e),r=xN(t);if(!n||!r)return Cp(e,t);const i={...n};return o=>(i.red=_0(n.red,r.red,o),i.green=_0(n.green,r.green,o),i.blue=_0(n.blue,r.blue,o),i.alpha=kt(n.alpha,r.alpha,o),Xs.transform(i))},Kw=new Set(["none","hidden"]);function QG(e,t){return Kw.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function JG(e,t){return n=>kt(e,t,n)}function lA(e){return typeof e=="number"?JG:typeof e=="string"?aA(e)?Cp:nn.test(e)?wN:nW:Array.isArray(e)?WI:typeof e=="object"?nn.test(e)?wN:eW:Cp}function WI(e,t){const n=[...e],r=n.length,i=e.map((o,l)=>lA(o)(o,t[l]));return o=>{for(let l=0;l<r;l++)n[l]=i[l](o);return n}}function eW(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=lA(e[i])(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}}function tW(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const o=t.types[i],l=e.indexes[o][r[o]],u=e.values[l]??0;n[i]=u,r[o]++}return n}const nW=(e,t)=>{const n=is.createTransformer(t),r=nd(e),i=nd(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Kw.has(e)&&!i.values.length||Kw.has(t)&&!r.values.length?QG(e,t):_d(WI(tW(r,i),i.values),n):Cp(e,t)};function YI(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?kt(e,t,n):lA(e)(e,t)}const rW=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>bt.update(t,n),stop:()=>ro(t),now:()=>Mn.isProcessing?Mn.timestamp:br.now()}},XI=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let o=0;o<i;o++)r+=Math.round(e(o/(i-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Ep=2e4;function uA(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Ep;)t+=n,r=e.next(t);return t>=Ep?1/0:t}function iW(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(uA(r),Ep);return{type:"keyframes",ease:o=>r.next(i*o).value/t,duration:li(i)}}const aW=5;function ZI(e,t,n){const r=Math.max(t-aW,0);return PI(n-e(r),t-r)}const Bt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},M0=.001;function oW({duration:e=Bt.duration,bounce:t=Bt.bounce,velocity:n=Bt.velocity,mass:r=Bt.mass}){let i,o,l=1-t;l=to(Bt.minDamping,Bt.maxDamping,l),e=to(Bt.minDuration,Bt.maxDuration,li(e)),l<1?(i=d=>{const m=d*l,h=m*e,y=m-n,b=Gw(d,l),w=Math.exp(-h);return M0-y/b*w},o=d=>{const h=d*l*e,y=h*n+n,b=Math.pow(l,2)*Math.pow(d,2)*e,w=Math.exp(-h),S=Gw(Math.pow(d,2),l);return(-i(d)+M0>0?-1:1)*((y-b)*w)/S}):(i=d=>{const m=Math.exp(-d*e),h=(d-n)*e+1;return-M0+m*h},o=d=>{const m=Math.exp(-d*e),h=(n-d)*(e*e);return m*h});const u=5/e,c=lW(i,o,u);if(e=aa(e),isNaN(c))return{stiffness:Bt.stiffness,damping:Bt.damping,duration:e};{const d=Math.pow(c,2)*r;return{stiffness:d,damping:l*2*Math.sqrt(r*d),duration:e}}}const sW=12;function lW(e,t,n){let r=n;for(let i=1;i<sW;i++)r=r-e(r)/t(r);return r}function Gw(e,t){return e*Math.sqrt(1-t*t)}const uW=["duration","bounce"],cW=["stiffness","damping","mass"];function SN(e,t){return t.some(n=>e[n]!==void 0)}function fW(e){let t={velocity:Bt.velocity,stiffness:Bt.stiffness,damping:Bt.damping,mass:Bt.mass,isResolvedFromDuration:!1,...e};if(!SN(e,cW)&&SN(e,uW))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,o=2*to(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Bt.mass,stiffness:i,damping:o}}else{const n=oW(e);t={...t,...n,mass:Bt.mass},t.isResolvedFromDuration=!0}return t}function jp(e=Bt.visualDuration,t=Bt.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const o=n.keyframes[0],l=n.keyframes[n.keyframes.length-1],u={done:!1,value:o},{stiffness:c,damping:d,mass:m,duration:h,velocity:y,isResolvedFromDuration:b}=fW({...n,velocity:-li(n.velocity||0)}),w=y||0,S=d/(2*Math.sqrt(c*m)),C=l-o,E=li(Math.sqrt(c/m)),j=Math.abs(C)<5;r||(r=j?Bt.restSpeed.granular:Bt.restSpeed.default),i||(i=j?Bt.restDelta.granular:Bt.restDelta.default);let T;if(S<1){const N=Gw(E,S);T=_=>{const M=Math.exp(-S*E*_);return l-M*((w+S*E*C)/N*Math.sin(N*_)+C*Math.cos(N*_))}}else if(S===1)T=N=>l-Math.exp(-E*N)*(C+(w+E*C)*N);else{const N=E*Math.sqrt(S*S-1);T=_=>{const M=Math.exp(-S*E*_),R=Math.min(N*_,300);return l-M*((w+S*E*C)*Math.sinh(R)+N*C*Math.cosh(R))/N}}const O={calculatedDuration:b&&h||null,next:N=>{const _=T(N);if(b)u.done=N>=h;else{let M=N===0?w:0;S<1&&(M=N===0?aa(w):ZI(T,N,_));const R=Math.abs(M)<=r,I=Math.abs(l-_)<=i;u.done=R&&I}return u.value=u.done?l:_,u},toString:()=>{const N=Math.min(uA(O),Ep),_=XI(M=>O.next(N*M).value,N,30);return N+"ms "+_},toTransition:()=>{}};return O}jp.applyToOptions=e=>{const t=iW(e,100,jp);return e.ease=t.ease,e.duration=aa(t.duration),e.type="keyframes",e};function Ww({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:l,min:u,max:c,restDelta:d=.5,restSpeed:m}){const h=e[0],y={done:!1,value:h},b=R=>u!==void 0&&R<u||c!==void 0&&R>c,w=R=>u===void 0?c:c===void 0||Math.abs(u-R)<Math.abs(c-R)?u:c;let S=n*t;const C=h+S,E=l===void 0?C:l(C);E!==C&&(S=E-h);const j=R=>-S*Math.exp(-R/r),T=R=>E+j(R),O=R=>{const I=j(R),$=T(R);y.done=Math.abs(I)<=d,y.value=y.done?E:$};let N,_;const M=R=>{b(y.value)&&(N=R,_=jp({keyframes:[y.value,w(y.value)],velocity:ZI(T,R,y.value),damping:i,stiffness:o,restDelta:d,restSpeed:m}))};return M(0),{calculatedDuration:null,next:R=>{let I=!1;return!_&&N===void 0&&(I=!0,O(R),M(R)),N!==void 0&&R>=N?_.next(R-N):(!I&&O(R),y)}}}function dW(e,t,n){const r=[],i=n||no.mix||YI,o=e.length-1;for(let l=0;l<o;l++){let u=i(e[l],e[l+1]);if(t){const c=Array.isArray(t)?t[l]||fi:t;u=_d(c,u)}r.push(u)}return r}function QI(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;if(eA(o===t.length),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const l=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const u=dW(t,r,i),c=u.length,d=m=>{if(l&&m<e[0])return t[0];let h=0;if(c>1)for(;h<e.length-2&&!(m<e[h+1]);h++);const y=ed(e[h],e[h+1],m);return u[h](y)};return n?m=>d(to(e[0],e[o-1],m)):d}function hW(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=ed(0,t,r);e.push(kt(n,1,i))}}function mW(e){const t=[0];return hW(t,e.length-1),t}function pW(e,t){return e.map(n=>n*t)}function gW(e,t){return e.map(()=>t||zI).splice(0,e.length-1)}function Ff({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=OG(r)?r.map(vN):vN(r),o={done:!1,value:t[0]},l=pW(n&&n.length===t.length?n:mW(t),e),u=QI(l,t,{ease:Array.isArray(i)?i:gW(t,i)});return{calculatedDuration:e,next:c=>(o.value=u(c),o.done=c>=e,o)}}const vW=e=>e!==null;function cA(e,{repeat:t,repeatType:n="loop"},r,i=1){const o=e.filter(vW),u=i<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!u||r===void 0?o[u]:r}const yW={decay:Ww,inertia:Ww,tween:Ff,keyframes:Ff,spring:jp};function JI(e){typeof e.type=="string"&&(e.type=yW[e.type])}class fA{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const bW=e=>e/100;class Bg extends fA{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==br.now()&&this.tick(br.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;JI(t);const{type:n=Ff,repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:l=0}=t;let{keyframes:u}=t;const c=n||Ff;c!==Ff&&typeof u[0]!="number"&&(this.mixKeyframes=_d(bW,YI(u[0],u[1])),u=[0,100]);const d=c({...t,keyframes:u});o==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...u].reverse(),velocity:-l})),d.calculatedDuration===null&&(d.calculatedDuration=uA(d));const{calculatedDuration:m}=d;this.calculatedDuration=m,this.resolvedDuration=m+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=d}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:i,mixKeyframes:o,mirroredGenerator:l,resolvedDuration:u,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:d=0,keyframes:m,repeat:h,repeatType:y,repeatDelay:b,type:w,onUpdate:S,finalKeyframe:C}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const E=this.currentTime-d*(this.playbackSpeed>=0?1:-1),j=this.playbackSpeed>=0?E<0:E>i;this.currentTime=Math.max(E,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let T=this.currentTime,O=r;if(h){const R=Math.min(this.currentTime,i)/u;let I=Math.floor(R),$=R%1;!$&&R>=1&&($=1),$===1&&I--,I=Math.min(I,h+1),I%2&&(y==="reverse"?($=1-$,b&&($-=b/u)):y==="mirror"&&(O=l)),T=to(0,1,$)*u}const N=j?{done:!1,value:m[0]}:O.next(T);o&&(N.value=o(N.value));let{done:_}=N;!j&&c!==null&&(_=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const M=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&_);return M&&w!==Ww&&(N.value=cA(m,this.options,C,this.speed)),S&&S(N.value),M&&this.finish(),N}then(t,n){return this.finished.then(t,n)}get duration(){return li(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+li(t)}get time(){return li(this.currentTime)}set time(t){t=aa(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(br.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=li(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=rW,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(br.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function xW(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Zs=e=>e*180/Math.PI,Yw=e=>{const t=Zs(Math.atan2(e[1],e[0]));return Xw(t)},wW={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Yw,rotateZ:Yw,skewX:e=>Zs(Math.atan(e[1])),skewY:e=>Zs(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Xw=e=>(e=e%360,e<0&&(e+=360),e),AN=Yw,CN=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),EN=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),SW={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:CN,scaleY:EN,scale:e=>(CN(e)+EN(e))/2,rotateX:e=>Xw(Zs(Math.atan2(e[6],e[5]))),rotateY:e=>Xw(Zs(Math.atan2(-e[2],e[0]))),rotateZ:AN,rotate:AN,skewX:e=>Zs(Math.atan(e[4])),skewY:e=>Zs(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Zw(e){return e.includes("scale")?1:0}function Qw(e,t){if(!e||e==="none")return Zw(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=SW,i=n;else{const u=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=wW,i=u}if(!i)return Zw(t);const o=r[t],l=i[1].split(",").map(CW);return typeof o=="function"?o(l):l[o]}const AW=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Qw(n,t)};function CW(e){return parseFloat(e.trim())}const uc=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],cc=new Set(uc),jN=e=>e===lc||e===be,EW=new Set(["x","y","z"]),jW=uc.filter(e=>!EW.has(e));function TW(e){const t=[];return jW.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const rl={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Qw(t,"x"),y:(e,{transform:t})=>Qw(t,"y")};rl.translateX=rl.x;rl.translateY=rl.y;const il=new Set;let Jw=!1,e1=!1,t1=!1;function ez(){if(e1){const e=Array.from(il).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=TW(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([o,l])=>{r.getValue(o)?.set(l)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}e1=!1,Jw=!1,il.forEach(e=>e.complete(t1)),il.clear()}function tz(){il.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(e1=!0)})}function OW(){t1=!0,tz(),ez(),t1=!1}class dA{constructor(t,n,r,i,o,l=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=o,this.isAsync=l}scheduleResolve(){this.state="scheduled",this.isAsync?(il.add(this),Jw||(Jw=!0,bt.read(tz),bt.resolveKeyframes(ez))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;if(t[0]===null){const o=i?.get(),l=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const u=r.readValue(n,l);u!=null&&(t[0]=u)}t[0]===void 0&&(t[0]=l),i&&o===void 0&&i.set(t[0])}xW(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),il.delete(this)}cancel(){this.state==="scheduled"&&(il.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const PW=e=>e.startsWith("--");function NW(e,t,n){PW(t)?e.style.setProperty(t,n):e.style[t]=n}const _W=tA(()=>window.ScrollTimeline!==void 0),MW={};function RW(e,t){const n=tA(e);return()=>MW[t]??n()}const nz=RW(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),kf=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,TN={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:kf([0,.65,.55,1]),circOut:kf([.55,0,1,.45]),backIn:kf([.31,.01,.66,-.59]),backOut:kf([.33,1.53,.69,.99])};function rz(e,t){if(e)return typeof e=="function"?nz()?XI(e,t):"ease-out":$I(e)?kf(e):Array.isArray(e)?e.map(n=>rz(n,t)||TN.easeOut):TN[e]}function DW(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:l="loop",ease:u="easeOut",times:c}={},d=void 0){const m={[t]:n};c&&(m.offset=c);const h=rz(u,i);Array.isArray(h)&&(m.easing=h);const y={delay:r,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:l==="reverse"?"alternate":"normal"};return d&&(y.pseudoElement=d),e.animate(m,y)}function iz(e){return typeof e=="function"&&"applyToOptions"in e}function kW({type:e,...t}){return iz(e)&&nz()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class LW extends fA{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:i,pseudoElement:o,allowFlatten:l=!1,finalKeyframe:u,onComplete:c}=t;this.isPseudoElement=!!o,this.allowFlatten=l,this.options=t,eA(typeof t.type!="string");const d=kW(t);this.animation=DW(n,r,i,d,o),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const m=cA(i,this.options,u,this.speed);this.updateMotionValue?this.updateMotionValue(m):NW(n,r,m),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return li(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+li(t)}get time(){return li(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=aa(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&_W()?(this.animation.timeline=t,fi):n(this)}}const az={anticipate:kI,backInOut:DI,circInOut:II};function IW(e){return e in az}function zW(e){typeof e.ease=="string"&&IW(e.ease)&&(e.ease=az[e.ease])}const ON=10;class $W extends LW{constructor(t){zW(t),JI(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:i,element:o,...l}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const u=new Bg({...l,autoplay:!1}),c=aa(this.finishedTime??this.time);n.setWithVelocity(u.sample(c-ON).value,u.sample(c).value,ON),u.stop()}}const PN=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(is.test(e)||e==="0")&&!e.startsWith("url("));function BW(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function UW(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],l=PN(i,t),u=PN(o,t);return!l||!u?!1:BW(e)||(n==="spring"||iz(n))&&r}function n1(e){e.duration=0,e.type="keyframes"}const VW=new Set(["opacity","clipPath","filter","transform"]),FW=tA(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function qW(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:o,type:l}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:d}=t.owner.getProps();return FW()&&n&&VW.has(n)&&(n!=="transform"||!d)&&!c&&!r&&i!=="mirror"&&o!==0&&l!=="inertia"}const HW=40;class KW extends fA{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:l="loop",keyframes:u,name:c,motionValue:d,element:m,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=br.now();const y={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:o,repeatType:l,name:c,motionValue:d,element:m,...h},b=m?.KeyframeResolver||dA;this.keyframeResolver=new b(u,(w,S,C)=>this.onKeyframesResolved(w,S,y,!C),c,d,m),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,i){this.keyframeResolver=void 0;const{name:o,type:l,velocity:u,delay:c,isHandoff:d,onUpdate:m}=r;this.resolvedAt=br.now(),UW(t,o,l,u)||((no.instantAnimations||!c)&&m?.(cA(t,r,n)),t[0]=t[t.length-1],n1(r),r.repeat=0);const y={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>HW?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},b=!d&&qW(y)?new $W({...y,element:y.motionValue.owner.current}):new Bg(y);b.finished.then(()=>this.notifyFinished()).catch(fi),this.pendingTimeline&&(this.stopTimeline=b.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=b}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),OW()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const GW=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function WW(e){const t=GW.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function oz(e,t,n=1){const[r,i]=WW(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const l=o.trim();return jI(l)?parseFloat(l):l}return aA(i)?oz(i,t,n+1):i}function hA(e,t){return e?.[t]??e?.default??e}const sz=new Set(["width","height","top","left","right","bottom",...uc]),YW={test:e=>e==="auto",parse:e=>e},lz=e=>t=>t.test(e),uz=[lc,be,oa,Yo,UG,BG,YW],NN=e=>uz.find(lz(e));function XW(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||OI(e):!0}const ZW=new Set(["brightness","contrast","saturate","opacity"]);function QW(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(oA)||[];if(!r)return e;const i=n.replace(r,"");let o=ZW.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const JW=/\b([a-z-]*)\(.*?\)/gu,r1={...is,getAnimatableNone:e=>{const t=e.match(JW);return t?t.map(QW).join(" "):e}},_N={...lc,transform:Math.round},eY={rotate:Yo,rotateX:Yo,rotateY:Yo,rotateZ:Yo,scale:Sm,scaleX:Sm,scaleY:Sm,scaleZ:Sm,skew:Yo,skewX:Yo,skewY:Yo,distance:be,translateX:be,translateY:be,translateZ:be,x:be,y:be,z:be,perspective:be,transformPerspective:be,opacity:td,originX:yN,originY:yN,originZ:be},mA={borderWidth:be,borderTopWidth:be,borderRightWidth:be,borderBottomWidth:be,borderLeftWidth:be,borderRadius:be,radius:be,borderTopLeftRadius:be,borderTopRightRadius:be,borderBottomRightRadius:be,borderBottomLeftRadius:be,width:be,maxWidth:be,height:be,maxHeight:be,top:be,right:be,bottom:be,left:be,inset:be,insetBlock:be,insetBlockStart:be,insetBlockEnd:be,insetInline:be,insetInlineStart:be,insetInlineEnd:be,padding:be,paddingTop:be,paddingRight:be,paddingBottom:be,paddingLeft:be,paddingBlock:be,paddingBlockStart:be,paddingBlockEnd:be,paddingInline:be,paddingInlineStart:be,paddingInlineEnd:be,margin:be,marginTop:be,marginRight:be,marginBottom:be,marginLeft:be,marginBlock:be,marginBlockStart:be,marginBlockEnd:be,marginInline:be,marginInlineStart:be,marginInlineEnd:be,backgroundPositionX:be,backgroundPositionY:be,...eY,zIndex:_N,fillOpacity:td,strokeOpacity:td,numOctaves:_N},tY={...mA,color:nn,backgroundColor:nn,outlineColor:nn,fill:nn,stroke:nn,borderColor:nn,borderTopColor:nn,borderRightColor:nn,borderBottomColor:nn,borderLeftColor:nn,filter:r1,WebkitFilter:r1},cz=e=>tY[e];function fz(e,t){let n=cz(e);return n!==r1&&(n=is),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const nY=new Set(["auto","none","0"]);function rY(e,t,n){let r=0,i;for(;r<e.length&&!i;){const o=e[r];typeof o=="string"&&!nY.has(o)&&nd(o).values.length&&(i=e[r]),r++}if(i&&n)for(const o of t)e[o]=fz(n,i)}class iY extends dA{constructor(t,n,r,i,o){super(t,n,r,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let d=t[c];if(typeof d=="string"&&(d=d.trim(),aA(d))){const m=oz(d,n.current);m!==void 0&&(t[c]=m),c===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!sz.has(r)||t.length!==2)return;const[i,o]=t,l=NN(i),u=NN(o);if(l!==u)if(jN(l)&&jN(u))for(let c=0;c<t.length;c++){const d=t[c];typeof d=="string"&&(t[c]=parseFloat(d))}else rl[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)(t[i]===null||XW(t[i]))&&r.push(i);r.length&&rY(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=rl[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=r.length-1,l=r[o];r[o]=rl[n](t.measureViewportBox(),window.getComputedStyle(t.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),this.removedTransforms?.length&&this.removedTransforms.forEach(([u,c])=>{t.getValue(u).set(c)}),this.resolveNoneKeyframes()}}function dz(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){const i=document.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}const hz=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function mz(e){return TI(e)&&"offsetHeight"in e}const MN=30,aY=e=>!isNaN(parseFloat(e)),qf={current:void 0};class oY{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const i=br.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=br.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=aY(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new nA);const r=this.events[t].add(n);return t==="change"?()=>{r(),bt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return qf.current&&qf.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=br.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>MN)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,MN);return PI(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function cl(e,t){return new oY(e,t)}const{schedule:pA}=BI(queueMicrotask,!1),Ai={x:!1,y:!1};function pz(){return Ai.x||Ai.y}function sY(e){return e==="x"||e==="y"?Ai[e]?null:(Ai[e]=!0,()=>{Ai[e]=!1}):Ai.x||Ai.y?null:(Ai.x=Ai.y=!0,()=>{Ai.x=Ai.y=!1})}function gz(e,t){const n=dz(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function RN(e){return!(e.pointerType==="touch"||pz())}function lY(e,t,n={}){const[r,i,o]=gz(e,n),l=u=>{if(!RN(u))return;const{target:c}=u,d=t(c,u);if(typeof d!="function"||!c)return;const m=h=>{RN(h)&&(d(h),c.removeEventListener("pointerleave",m))};c.addEventListener("pointerleave",m,i)};return r.forEach(u=>{u.addEventListener("pointerenter",l,i)}),o}const vz=(e,t)=>t?e===t?!0:vz(e,t.parentElement):!1,gA=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,uY=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function cY(e){return uY.has(e.tagName)||e.tabIndex!==-1}const rp=new WeakSet;function DN(e){return t=>{t.key==="Enter"&&e(t)}}function R0(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const fY=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=DN(()=>{if(rp.has(n))return;R0(n,"down");const i=DN(()=>{R0(n,"up")}),o=()=>R0(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function kN(e){return gA(e)&&!pz()}function dY(e,t,n={}){const[r,i,o]=gz(e,n),l=u=>{const c=u.currentTarget;if(!kN(u))return;rp.add(c);const d=t(c,u),m=(b,w)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",y),rp.has(c)&&rp.delete(c),kN(b)&&typeof d=="function"&&d(b,{success:w})},h=b=>{m(b,c===window||c===document||n.useGlobalTarget||vz(c,b.target))},y=b=>{m(b,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",y,i)};return r.forEach(u=>{(n.useGlobalTarget?window:u).addEventListener("pointerdown",l,i),mz(u)&&(u.addEventListener("focus",d=>fY(d,i)),!cY(u)&&!u.hasAttribute("tabindex")&&(u.tabIndex=0))}),o}function yz(e){return TI(e)&&"ownerSVGElement"in e}function hY(e){return yz(e)&&e.tagName==="svg"}function mY(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],i=e[1+n],o=e[2+n],l=e[3+n],u=QI(i,o,l);return t?u(r):u}const on=e=>!!(e&&e.getVelocity);function pY(e,t,n){const r=e.get();let i=null,o=r,l;const u=typeof r=="string"?r.replace(/[\d.-]/g,""):void 0,c=()=>{i&&(i.stop(),i=null)},d=()=>{c(),i=new Bg({keyframes:[IN(e.get()),IN(o)],velocity:e.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:l})};if(e.attach((m,h)=>{o=m,l=y=>h(LN(y,u)),bt.postRender(d)},c),on(t)){const m=t.on("change",y=>e.set(LN(y,u))),h=e.on("destroy",m);return()=>{m(),h()}}return c}function LN(e,t){return t?e+t:e}function IN(e){return typeof e=="number"?e:parseFloat(e)}const gY=[...uz,nn,is],vY=e=>gY.find(lz(e)),Dd=v.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function zN(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function yY(...e){return t=>{let n=!1;const r=e.map(i=>{const o=zN(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():zN(e[i],null)}}}}function bY(...e){return v.useCallback(yY(...e),e)}class xY extends v.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,i=mz(r)&&r.offsetWidth||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=i-o.width-o.left}return null}componentDidUpdate(){}render(){return this.props.children}}function wY({children:e,isPresent:t,anchorX:n,root:r}){const i=v.useId(),o=v.useRef(null),l=v.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:u}=v.useContext(Dd),c=bY(o,e?.ref);return v.useInsertionEffect(()=>{const{width:d,height:m,top:h,left:y,right:b}=l.current;if(t||!o.current||!d||!m)return;const w=n==="left"?`left: ${y}`:`right: ${b}`;o.current.dataset.motionPopId=i;const S=document.createElement("style");u&&(S.nonce=u);const C=r??document.head;return C.appendChild(S),S.sheet&&S.sheet.insertRule(`
12
- [data-motion-pop-id="${i}"] {
13
- position: absolute !important;
14
- width: ${d}px !important;
15
- height: ${m}px !important;
16
- ${w}px !important;
17
- top: ${h}px !important;
18
- }
19
- `),()=>{C.contains(S)&&C.removeChild(S)}},[t]),g.jsx(xY,{isPresent:t,childRef:o,sizeRef:l,children:v.cloneElement(e,{ref:c})})}const SY=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:l,anchorX:u,root:c})=>{const d=Nd(AY),m=v.useId();let h=!0,y=v.useMemo(()=>(h=!1,{id:m,initial:t,isPresent:n,custom:i,onExitComplete:b=>{d.set(b,!0);for(const w of d.values())if(!w)return;r&&r()},register:b=>(d.set(b,!1),()=>d.delete(b))}),[n,d,r]);return o&&h&&(y={...y}),v.useMemo(()=>{d.forEach((b,w)=>d.set(w,!1))},[n]),v.useEffect(()=>{!n&&!d.size&&r&&r()},[n]),l==="popLayout"&&(e=g.jsx(wY,{isPresent:n,anchorX:u,root:c,children:e})),g.jsx($g.Provider,{value:y,children:e})};function AY(){return new Map}function bz(e=!0){const t=v.useContext($g);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,o=v.useId();v.useEffect(()=>{if(e)return i(o)},[e]);const l=v.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,l]:[!0]}const Am=e=>e.key||"";function $N(e){const t=[];return v.Children.forEach(e,n=>{v.isValidElement(n)&&t.push(n)}),t}const vA=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:o="sync",propagate:l=!1,anchorX:u="left",root:c})=>{const[d,m]=bz(l),h=v.useMemo(()=>$N(e),[e]),y=l&&!d?[]:h.map(Am),b=v.useRef(!0),w=v.useRef(h),S=Nd(()=>new Map),[C,E]=v.useState(h),[j,T]=v.useState(h);ZS(()=>{b.current=!1,w.current=h;for(let _=0;_<j.length;_++){const M=Am(j[_]);y.includes(M)?S.delete(M):S.get(M)!==!0&&S.set(M,!1)}},[j,y.length,y.join("-")]);const O=[];if(h!==C){let _=[...h];for(let M=0;M<j.length;M++){const R=j[M],I=Am(R);y.includes(I)||(_.splice(M,0,R),O.push(R))}return o==="wait"&&O.length&&(_=O),T($N(_)),E(h),null}const{forceRender:N}=v.useContext(YS);return g.jsx(g.Fragment,{children:j.map(_=>{const M=Am(_),R=l&&!d?!1:h===j||y.includes(M),I=()=>{if(S.has(M))S.set(M,!0);else return;let $=!0;S.forEach(F=>{F||($=!1)}),$&&(N?.(),T(w.current),l&&m?.(),r&&r())};return g.jsx(SY,{isPresent:R,initial:!b.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:o,root:c,onExitComplete:R?void 0:I,anchorX:u,children:_},M)})})},xz=v.createContext({strict:!1}),BN={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Uu={};for(const e in BN)Uu[e]={isEnabled:t=>BN[e].some(n=>!!t[n])};function CY(e){for(const t in e)Uu[t]={...Uu[t],...e[t]}}const EY=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Tp(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||EY.has(e)}let wz=e=>!Tp(e);function jY(e){typeof e=="function"&&(wz=t=>t.startsWith("on")?!Tp(t):e(t))}try{jY(require("@emotion/is-prop-valid").default)}catch{}function TY(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(wz(i)||n===!0&&Tp(i)||!t&&!Tp(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const Ug=v.createContext({});function Vg(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function rd(e){return typeof e=="string"||Array.isArray(e)}const yA=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],bA=["initial",...yA];function Fg(e){return Vg(e.animate)||bA.some(t=>rd(e[t]))}function Sz(e){return!!(Fg(e)||e.variants)}function OY(e,t){if(Fg(e)){const{initial:n,animate:r}=e;return{initial:n===!1||rd(n)?n:void 0,animate:rd(r)?r:void 0}}return e.inherit!==!1?t:{}}function PY(e){const{initial:t,animate:n}=OY(e,v.useContext(Ug));return v.useMemo(()=>({initial:t,animate:n}),[UN(t),UN(n)])}function UN(e){return Array.isArray(e)?e.join(" "):e}function VN(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const xf={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(be.test(e))e=parseFloat(e);else return e;const n=VN(e,t.target.x),r=VN(e,t.target.y);return`${n}% ${r}%`}},NY={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=is.parse(e);if(i.length>5)return r;const o=is.createTransformer(e),l=typeof i[0]!="number"?1:0,u=n.x.scale*t.x,c=n.y.scale*t.y;i[0+l]/=u,i[1+l]/=c;const d=kt(u,c,.5);return typeof i[2+l]=="number"&&(i[2+l]/=d),typeof i[3+l]=="number"&&(i[3+l]/=d),o(i)}},i1={borderRadius:{...xf,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:xf,borderTopRightRadius:xf,borderBottomLeftRadius:xf,borderBottomRightRadius:xf,boxShadow:NY};function Az(e,{layout:t,layoutId:n}){return cc.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!i1[e]||e==="opacity")}const _Y={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},MY=uc.length;function RY(e,t,n){let r="",i=!0;for(let o=0;o<MY;o++){const l=uc[o],u=e[l];if(u===void 0)continue;let c=!0;if(typeof u=="number"?c=u===(l.startsWith("scale")?1:0):c=parseFloat(u)===0,!c||n){const d=hz(u,mA[l]);if(!c){i=!1;const m=_Y[l]||l;r+=`${m}(${d}) `}n&&(t[l]=d)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function xA(e,t,n){const{style:r,vars:i,transformOrigin:o}=e;let l=!1,u=!1;for(const c in t){const d=t[c];if(cc.has(c)){l=!0;continue}else if(VI(c)){i[c]=d;continue}else{const m=hz(d,mA[c]);c.startsWith("origin")?(u=!0,o[c]=m):r[c]=m}}if(t.transform||(l||n?r.transform=RY(t,e.transform,n):r.transform&&(r.transform="none")),u){const{originX:c="50%",originY:d="50%",originZ:m=0}=o;r.transformOrigin=`${c} ${d} ${m}`}}const wA=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Cz(e,t,n){for(const r in t)!on(t[r])&&!Az(r,n)&&(e[r]=t[r])}function DY({transformTemplate:e},t){return v.useMemo(()=>{const n=wA();return xA(n,t,e),Object.assign({},n.vars,n.style)},[t])}function kY(e,t){const n=e.style||{},r={};return Cz(r,n,e),Object.assign(r,DY(e,t)),r}function LY(e,t){const n={},r=kY(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const IY={offset:"stroke-dashoffset",array:"stroke-dasharray"},zY={offset:"strokeDashoffset",array:"strokeDasharray"};function $Y(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?IY:zY;e[o.offset]=be.transform(-r);const l=be.transform(t),u=be.transform(n);e[o.array]=`${l} ${u}`}function Ez(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:o=1,pathOffset:l=0,...u},c,d,m){if(xA(e,u,d),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:y}=e;h.transform&&(y.transform=h.transform,delete h.transform),(y.transform||h.transformOrigin)&&(y.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),y.transform&&(y.transformBox=m?.transformBox??"fill-box",delete h.transformBox),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),i!==void 0&&$Y(h,i,o,l,!1)}const jz=()=>({...wA(),attrs:{}}),Tz=e=>typeof e=="string"&&e.toLowerCase()==="svg";function BY(e,t,n,r){const i=v.useMemo(()=>{const o=jz();return Ez(o,t,Tz(r),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};Cz(o,e.style,e),i.style={...o,...i.style}}return i}const UY=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function SA(e){return typeof e!="string"||e.includes("-")?!1:!!(UY.indexOf(e)>-1||/[A-Z]/u.test(e))}function VY(e,t,n,{latestValues:r},i,o=!1,l){const c=(l??SA(e)?BY:LY)(t,r,i,e),d=TY(t,typeof e=="string",o),m=e!==v.Fragment?{...d,...c,ref:n}:{},{children:h}=t,y=v.useMemo(()=>on(h)?h.get():h,[h]);return v.createElement(e,{...m,children:y})}function FN(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function AA(e,t,n,r){if(typeof t=="function"){const[i,o]=FN(r);t=t(n!==void 0?n:e.custom,i,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,o]=FN(r);t=t(n!==void 0?n:e.custom,i,o)}return t}function ip(e){return on(e)?e.get():e}function FY({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:qY(n,r,i,e),renderState:t()}}function qY(e,t,n,r){const i={},o=r(e,{});for(const y in o)i[y]=ip(o[y]);let{initial:l,animate:u}=e;const c=Fg(e),d=Sz(e);t&&d&&!c&&e.inherit!==!1&&(l===void 0&&(l=t.initial),u===void 0&&(u=t.animate));let m=n?n.initial===!1:!1;m=m||l===!1;const h=m?u:l;if(h&&typeof h!="boolean"&&!Vg(h)){const y=Array.isArray(h)?h:[h];for(let b=0;b<y.length;b++){const w=AA(e,y[b]);if(w){const{transitionEnd:S,transition:C,...E}=w;for(const j in E){let T=E[j];if(Array.isArray(T)){const O=m?T.length-1:0;T=T[O]}T!==null&&(i[j]=T)}for(const j in S)i[j]=S[j]}}}return i}const Oz=e=>(t,n)=>{const r=v.useContext(Ug),i=v.useContext($g),o=()=>FY(e,t,r,i);return n?o():Nd(o)};function CA(e,t,n){const{style:r}=e,i={};for(const o in r)(on(r[o])||t.style&&on(t.style[o])||Az(o,e)||n?.getValue(o)?.liveStyle!==void 0)&&(i[o]=r[o]);return i}const HY=Oz({scrapeMotionValuesFromProps:CA,createRenderState:wA});function Pz(e,t,n){const r=CA(e,t,n);for(const i in e)if(on(e[i])||on(t[i])){const o=uc.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=e[i]}return r}const KY=Oz({scrapeMotionValuesFromProps:Pz,createRenderState:jz}),GY=Symbol.for("motionComponentSymbol");function ju(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function WY(e,t,n){return v.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):ju(n)&&(n.current=r))},[t])}const EA=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),YY="framerAppearId",Nz="data-"+EA(YY),_z=v.createContext({});function XY(e,t,n,r,i,o){const{visualElement:l}=v.useContext(Ug),u=v.useContext(xz),c=v.useContext($g),d=v.useContext(Dd).reducedMotion,m=v.useRef(null);r=r||u.renderer,!m.current&&r&&(m.current=r(e,{visualState:t,parent:l,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:d,isSVG:o}));const h=m.current,y=v.useContext(_z);h&&!h.projection&&i&&(h.type==="html"||h.type==="svg")&&ZY(m.current,n,i,y);const b=v.useRef(!1);v.useInsertionEffect(()=>{h&&b.current&&h.update(n,c)});const w=n[Nz],S=v.useRef(!!w&&!window.MotionHandoffIsComplete?.(w)&&window.MotionHasOptimisedAnimation?.(w));return ZS(()=>{h&&(b.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),h.scheduleRenderMicrotask(),S.current&&h.animationState&&h.animationState.animateChanges())}),v.useEffect(()=>{h&&(!S.current&&h.animationState&&h.animationState.animateChanges(),S.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(w)}),S.current=!1),h.enteringChildren=void 0)}),h}function ZY(e,t,n,r){const{layoutId:i,layout:o,drag:l,dragConstraints:u,layoutScroll:c,layoutRoot:d,layoutCrossfade:m}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Mz(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!l||u&&ju(u),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:m,layoutScroll:c,layoutRoot:d})}function Mz(e){if(e)return e.options.allowProjection!==!1?e.projection:Mz(e.parent)}function D0(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&CY(r);const o=n?n==="svg":SA(e),l=o?KY:HY;function u(d,m){let h;const y={...v.useContext(Dd),...d,layoutId:QY(d)},{isStatic:b}=y,w=PY(d),S=l(d,b);if(!b&&XS){JY();const C=eX(y);h=C.MeasureLayout,w.visualElement=XY(e,S,y,i,C.ProjectionNode,o)}return g.jsxs(Ug.Provider,{value:w,children:[h&&w.visualElement?g.jsx(h,{visualElement:w.visualElement,...y}):null,VY(e,d,WY(S,w.visualElement,m),S,b,t,o)]})}u.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=v.forwardRef(u);return c[GY]=e,c}function QY({layoutId:e}){const t=v.useContext(YS).id;return t&&e!==void 0?t+"-"+e:e}function JY(e,t){v.useContext(xz).strict}function eX(e){const{drag:t,layout:n}=Uu;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function tX(e,t){if(typeof Proxy>"u")return D0;const n=new Map,r=(o,l)=>D0(o,l,e,t),i=(o,l)=>r(o,l);return new Proxy(i,{get:(o,l)=>l==="create"?r:(n.has(l)||n.set(l,D0(l,void 0,e,t)),n.get(l))})}function Rz({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function nX({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function rX(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function k0(e){return e===void 0||e===1}function a1({scale:e,scaleX:t,scaleY:n}){return!k0(e)||!k0(t)||!k0(n)}function Us(e){return a1(e)||Dz(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Dz(e){return qN(e.x)||qN(e.y)}function qN(e){return e&&e!=="0%"}function Op(e,t,n){const r=e-n,i=t*r;return n+i}function HN(e,t,n,r,i){return i!==void 0&&(e=Op(e,i,r)),Op(e,n,r)+t}function o1(e,t=0,n=1,r,i){e.min=HN(e.min,t,n,r,i),e.max=HN(e.max,t,n,r,i)}function kz(e,{x:t,y:n}){o1(e.x,t.translate,t.scale,t.originPoint),o1(e.y,n.translate,n.scale,n.originPoint)}const KN=.999999999999,GN=1.0000000000001;function iX(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,l;for(let u=0;u<i;u++){o=n[u],l=o.projectionDelta;const{visualElement:c}=o.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Ou(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,kz(e,l)),r&&Us(o.latestValues)&&Ou(e,o.latestValues))}t.x<GN&&t.x>KN&&(t.x=1),t.y<GN&&t.y>KN&&(t.y=1)}function Tu(e,t){e.min=e.min+t,e.max=e.max+t}function WN(e,t,n,r,i=.5){const o=kt(e.min,e.max,i);o1(e,t,n,o,r)}function Ou(e,t){WN(e.x,t.x,t.scaleX,t.scale,t.originX),WN(e.y,t.y,t.scaleY,t.scale,t.originY)}function Lz(e,t){return Rz(rX(e.getBoundingClientRect(),t))}function aX(e,t,n){const r=Lz(e,n),{scroll:i}=t;return i&&(Tu(r.x,i.offset.x),Tu(r.y,i.offset.y)),r}const YN=()=>({translate:0,scale:1,origin:0,originPoint:0}),Pu=()=>({x:YN(),y:YN()}),XN=()=>({min:0,max:0}),mn=()=>({x:XN(),y:XN()}),s1={current:null},Iz={current:!1};function oX(){if(Iz.current=!0,!!XS)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>s1.current=e.matches;e.addEventListener("change",t),t()}else s1.current=!1}const sX=new WeakMap;function lX(e,t,n){for(const r in t){const i=t[r],o=n[r];if(on(i))e.addValue(r,i);else if(on(o))e.addValue(r,cl(i,{owner:e}));else if(o!==i)if(e.hasValue(r)){const l=e.getValue(r);l.liveStyle===!0?l.jump(i):l.hasAnimated||l.set(i)}else{const l=e.getStaticValue(r);e.addValue(r,cl(l!==void 0?l:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const ZN=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class uX{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:o,visualState:l},u={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=dA,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const y=br.now();this.renderScheduledAt<y&&(this.renderScheduledAt=y,bt.render(this.render,!1,!0))};const{latestValues:c,renderState:d}=l;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=d,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=u,this.blockInitialAnimation=!!o,this.isControllingVariants=Fg(n),this.isVariantNode=Sz(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:m,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const y in h){const b=h[y];c[y]!==void 0&&on(b)&&b.set(c[y])}}mount(t){this.current=t,sX.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),Iz.current||oX(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:s1.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),ro(this.notifyUpdate),ro(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=cc.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&bt.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Uu){const n=Uu[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):mn()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<ZN.length;r++){const i=ZN[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,l=t[o];l&&(this.propEventSubscriptions[i]=this.on(i,l))}this.prevMotionValues=lX(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=cl(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(jI(r)||OI(r))?r=parseFloat(r):!vY(r)&&is.test(n)&&(r=fz(t,n)),this.setBaseTarget(t,on(r)?r.get():r)),on(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=AA(this.props,n,this.presenceContext?.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!on(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new nA),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){pA.render(this.render)}}class zz extends uX{constructor(){super(...arguments),this.KeyframeResolver=iY}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;on(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function $z(e,{style:t,vars:n},r,i){const o=e.style;let l;for(l in t)o[l]=t[l];i?.applyProjectionStyles(o,r);for(l in n)o.setProperty(l,n[l])}function cX(e){return window.getComputedStyle(e)}class fX extends zz{constructor(){super(...arguments),this.type="html",this.renderInstance=$z}readValueFromInstance(t,n){if(cc.has(n))return this.projection?.isProjecting?Zw(n):AW(t,n);{const r=cX(t),i=(VI(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Lz(t,n)}build(t,n,r){xA(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return CA(t,n,r)}}const Bz=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function dX(e,t,n,r){$z(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Bz.has(i)?i:EA(i),t.attrs[i])}class hX extends zz{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=mn}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(cc.has(n)){const r=cz(n);return r&&r.default||0}return n=Bz.has(n)?n:EA(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Pz(t,n,r)}build(t,n,r){Ez(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){dX(t,n,r,i)}mount(t){this.isSVGTag=Tz(t.tagName),super.mount(t)}}const mX=(e,t)=>t.isSVG??SA(e)?new hX(t):new fX(t,{allowProjection:e!==v.Fragment});function Du(e,t,n){const r=e.getProps();return AA(r,t,n!==void 0?n:r.custom,e)}const l1=e=>Array.isArray(e);function pX(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,cl(n))}function gX(e){return l1(e)?e[e.length-1]||0:e}function vX(e,t){const n=Du(e,t);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const l in o){const u=gX(o[l]);pX(e,l,u)}}function yX(e){return!!(on(e)&&e.add)}function u1(e,t){const n=e.getValue("willChange");if(yX(n))return n.add(t);if(!n&&no.WillChange){const r=new no.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Uz(e){return e.props[Nz]}const bX=e=>e!==null;function xX(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(bX),o=t&&n!=="loop"&&t%2===1?0:i.length-1;return i[o]}const wX={type:"spring",stiffness:500,damping:25,restSpeed:10},SX=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),AX={type:"keyframes",duration:.8},CX={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},EX=(e,{keyframes:t})=>t.length>2?AX:cc.has(e)?e.startsWith("scale")?SX(t[1]):wX:CX;function jX({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:l,repeatDelay:u,from:c,elapsed:d,...m}){return!!Object.keys(m).length}const jA=(e,t,n,r={},i,o)=>l=>{const u=hA(r,e)||{},c=u.delay||r.delay||0;let{elapsed:d=0}=r;d=d-aa(c);const m={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...u,delay:-d,onUpdate:y=>{t.set(y),u.onUpdate&&u.onUpdate(y)},onComplete:()=>{l(),u.onComplete&&u.onComplete()},name:e,motionValue:t,element:o?void 0:i};jX(u)||Object.assign(m,EX(e,m)),m.duration&&(m.duration=aa(m.duration)),m.repeatDelay&&(m.repeatDelay=aa(m.repeatDelay)),m.from!==void 0&&(m.keyframes[0]=m.from);let h=!1;if((m.type===!1||m.duration===0&&!m.repeatDelay)&&(n1(m),m.delay===0&&(h=!0)),(no.instantAnimations||no.skipAnimations)&&(h=!0,n1(m),m.delay=0),m.allowFlatten=!u.type&&!u.ease,h&&!o&&t.get()!==void 0){const y=xX(m.keyframes,u);if(y!==void 0){bt.update(()=>{m.onUpdate(y),m.onComplete()});return}}return u.isSync?new Bg(m):new KW(m)};function TX({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Vz(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:l,...u}=t;r&&(o=r);const c=[],d=i&&e.animationState&&e.animationState.getState()[i];for(const m in u){const h=e.getValue(m,e.latestValues[m]??null),y=u[m];if(y===void 0||d&&TX(d,m))continue;const b={delay:n,...hA(o||{},m)},w=h.get();if(w!==void 0&&!h.isAnimating&&!Array.isArray(y)&&y===w&&!b.velocity)continue;let S=!1;if(window.MotionHandoffAnimation){const E=Uz(e);if(E){const j=window.MotionHandoffAnimation(E,m,bt);j!==null&&(b.startTime=j,S=!0)}}u1(e,m),h.start(jA(m,h,y,e.shouldReduceMotion&&sz.has(m)?{type:!1}:b,e,S));const C=h.animation;C&&c.push(C)}return l&&Promise.all(c).then(()=>{bt.update(()=>{l&&vX(e,l)})}),c}function Fz(e,t,n,r=0,i=1){const o=Array.from(e).sort((d,m)=>d.sortNodePosition(m)).indexOf(t),l=e.size,u=(l-1)*r;return typeof n=="function"?n(o,l):i===1?o*r:u-o*r}function c1(e,t,n={}){const r=Du(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(Vz(e,r,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:d=0,staggerChildren:m,staggerDirection:h}=i;return OX(e,t,c,d,m,h,n)}:()=>Promise.resolve(),{when:u}=i;if(u){const[c,d]=u==="beforeChildren"?[o,l]:[l,o];return c().then(()=>d())}else return Promise.all([o(),l(n.delay)])}function OX(e,t,n=0,r=0,i=0,o=1,l){const u=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),u.push(c1(c,t,{...l,delay:n+(typeof r=="function"?0:r)+Fz(e.variantChildren,c,r,i,o)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(u)}function PX(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>c1(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=c1(e,t,n);else{const i=typeof t=="function"?Du(e,t,n.custom):t;r=Promise.all(Vz(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function qz(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const NX=bA.length;function Hz(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Hz(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<NX;n++){const r=bA[n],i=e.props[r];(rd(i)||i===!1)&&(t[r]=i)}return t}const _X=[...yA].reverse(),MX=yA.length;function RX(e){return t=>Promise.all(t.map(({animation:n,options:r})=>PX(e,n,r)))}function DX(e){let t=RX(e),n=QN(),r=!0;const i=c=>(d,m)=>{const h=Du(e,m,c==="exit"?e.presenceContext?.custom:void 0);if(h){const{transition:y,transitionEnd:b,...w}=h;d={...d,...w,...b}}return d};function o(c){t=c(e)}function l(c){const{props:d}=e,m=Hz(e.parent)||{},h=[],y=new Set;let b={},w=1/0;for(let C=0;C<MX;C++){const E=_X[C],j=n[E],T=d[E]!==void 0?d[E]:m[E],O=rd(T),N=E===c?j.isActive:null;N===!1&&(w=C);let _=T===m[E]&&T!==d[E]&&O;if(_&&r&&e.manuallyAnimateOnMount&&(_=!1),j.protectedKeys={...b},!j.isActive&&N===null||!T&&!j.prevProp||Vg(T)||typeof T=="boolean")continue;const M=kX(j.prevProp,T);let R=M||E===c&&j.isActive&&!_&&O||C>w&&O,I=!1;const $=Array.isArray(T)?T:[T];let F=$.reduce(i(E),{});N===!1&&(F={});const{prevResolvedValues:z={}}=j,Y={...z,...F},Q=q=>{R=!0,y.has(q)&&(I=!0,y.delete(q)),j.needsAnimating[q]=!0;const B=e.getValue(q);B&&(B.liveStyle=!1)};for(const q in Y){const B=F[q],ae=z[q];if(b.hasOwnProperty(q))continue;let G=!1;l1(B)&&l1(ae)?G=!qz(B,ae):G=B!==ae,G?B!=null?Q(q):y.add(q):B!==void 0&&y.has(q)?Q(q):j.protectedKeys[q]=!0}j.prevProp=T,j.prevResolvedValues=F,j.isActive&&(b={...b,...F}),r&&e.blockInitialAnimation&&(R=!1);const se=_&&M;R&&(!se||I)&&h.push(...$.map(q=>{const B={type:E};if(typeof q=="string"&&r&&!se&&e.manuallyAnimateOnMount&&e.parent){const{parent:ae}=e,G=Du(ae,q);if(ae.enteringChildren&&G){const{delayChildren:D}=G.transition||{};B.delay=Fz(ae.enteringChildren,e,D)}}return{animation:q,options:B}}))}if(y.size){const C={};if(typeof d.initial!="boolean"){const E=Du(e,Array.isArray(d.initial)?d.initial[0]:d.initial);E&&E.transition&&(C.transition=E.transition)}y.forEach(E=>{const j=e.getBaseTarget(E),T=e.getValue(E);T&&(T.liveStyle=!0),C[E]=j??null}),h.push({animation:C})}let S=!!h.length;return r&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(S=!1),r=!1,S?t(h):Promise.resolve()}function u(c,d){if(n[c].isActive===d)return Promise.resolve();e.variantChildren?.forEach(h=>h.animationState?.setActive(c,d)),n[c].isActive=d;const m=l(c);for(const h in n)n[h].protectedKeys={};return m}return{animateChanges:l,setActive:u,setAnimateFunction:o,getState:()=>n,reset:()=>{n=QN()}}}function kX(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!qz(t,e):!1}function Ls(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function QN(){return{animate:Ls(!0),whileInView:Ls(),whileHover:Ls(),whileTap:Ls(),whileDrag:Ls(),whileFocus:Ls(),exit:Ls()}}class fs{constructor(t){this.isMounted=!1,this.node=t}update(){}}class LX extends fs{constructor(t){super(t),t.animationState||(t.animationState=DX(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Vg(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let IX=0;class zX extends fs{constructor(){super(...arguments),this.id=IX++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const $X={animation:{Feature:LX},exit:{Feature:zX}};function id(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function kd(e){return{point:{x:e.pageX,y:e.pageY}}}const BX=e=>t=>gA(t)&&e(t,kd(t));function Hf(e,t,n,r){return id(e,t,BX(n),r)}const Kz=1e-4,UX=1-Kz,VX=1+Kz,Gz=.01,FX=0-Gz,qX=0+Gz;function tr(e){return e.max-e.min}function HX(e,t,n){return Math.abs(e-t)<=n}function JN(e,t,n,r=.5){e.origin=r,e.originPoint=kt(t.min,t.max,e.origin),e.scale=tr(n)/tr(t),e.translate=kt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=UX&&e.scale<=VX||isNaN(e.scale))&&(e.scale=1),(e.translate>=FX&&e.translate<=qX||isNaN(e.translate))&&(e.translate=0)}function Kf(e,t,n,r){JN(e.x,t.x,n.x,r?r.originX:void 0),JN(e.y,t.y,n.y,r?r.originY:void 0)}function e_(e,t,n){e.min=n.min+t.min,e.max=e.min+tr(t)}function KX(e,t,n){e_(e.x,t.x,n.x),e_(e.y,t.y,n.y)}function t_(e,t,n){e.min=t.min-n.min,e.max=e.min+tr(t)}function Pp(e,t,n){t_(e.x,t.x,n.x),t_(e.y,t.y,n.y)}function oi(e){return[e("x"),e("y")]}const Wz=({current:e})=>e?e.ownerDocument.defaultView:null,n_=(e,t)=>Math.abs(e-t);function GX(e,t){const n=n_(e.x,t.x),r=n_(e.y,t.y);return Math.sqrt(n**2+r**2)}class Yz{constructor(t,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:l=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=I0(this.lastMoveEventInfo,this.history),b=this.startEvent!==null,w=GX(y.offset,{x:0,y:0})>=this.distanceThreshold;if(!b&&!w)return;const{point:S}=y,{timestamp:C}=Mn;this.history.push({...S,timestamp:C});const{onStart:E,onMove:j}=this.handlers;b||(E&&E(this.lastMoveEvent,y),this.startEvent=this.lastMoveEvent),j&&j(this.lastMoveEvent,y)},this.handlePointerMove=(y,b)=>{this.lastMoveEvent=y,this.lastMoveEventInfo=L0(b,this.transformPagePoint),bt.update(this.updatePoint,!0)},this.handlePointerUp=(y,b)=>{this.end();const{onEnd:w,onSessionEnd:S,resumeAnimation:C}=this.handlers;if(this.dragSnapToOrigin&&C&&C(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const E=I0(y.type==="pointercancel"?this.lastMoveEventInfo:L0(b,this.transformPagePoint),this.history);this.startEvent&&w&&w(y,E),S&&S(y,E)},!gA(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=l,this.contextWindow=i||window;const u=kd(t),c=L0(u,this.transformPagePoint),{point:d}=c,{timestamp:m}=Mn;this.history=[{...d,timestamp:m}];const{onSessionStart:h}=n;h&&h(t,I0(c,this.history)),this.removeListeners=_d(Hf(this.contextWindow,"pointermove",this.handlePointerMove),Hf(this.contextWindow,"pointerup",this.handlePointerUp),Hf(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ro(this.updatePoint)}}function L0(e,t){return t?{point:t(e.point)}:e}function r_(e,t){return{x:e.x-t.x,y:e.y-t.y}}function I0({point:e},t){return{point:e,delta:r_(e,Xz(t)),offset:r_(e,WX(t)),velocity:YX(t,.1)}}function WX(e){return e[0]}function Xz(e){return e[e.length-1]}function YX(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=Xz(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>aa(t)));)n--;if(!r)return{x:0,y:0};const o=li(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const l={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function XX(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?kt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?kt(n,e,r.max):Math.min(e,n)),e}function i_(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function ZX(e,{top:t,left:n,bottom:r,right:i}){return{x:i_(e.x,n,i),y:i_(e.y,t,r)}}function a_(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function QX(e,t){return{x:a_(e.x,t.x),y:a_(e.y,t.y)}}function JX(e,t){let n=.5;const r=tr(e),i=tr(t);return i>r?n=ed(t.min,t.max-r,e.min):r>i&&(n=ed(e.min,e.max-i,t.min)),to(0,1,n)}function eZ(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const f1=.35;function tZ(e=f1){return e===!1?e=0:e===!0&&(e=f1),{x:o_(e,"left","right"),y:o_(e,"top","bottom")}}function o_(e,t,n){return{min:s_(e,t),max:s_(e,n)}}function s_(e,t){return typeof e=="number"?e:e[t]||0}const nZ=new WeakMap;class rZ{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=mn(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const o=h=>{const{dragSnapToOrigin:y}=this.getProps();y?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(kd(h).point)},l=(h,y)=>{const{drag:b,dragPropagation:w,onDragStart:S}=this.getProps();if(b&&!w&&(this.openDragLock&&this.openDragLock(),this.openDragLock=sY(b),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=y,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),oi(E=>{let j=this.getAxisMotionValue(E).get()||0;if(oa.test(j)){const{projection:T}=this.visualElement;if(T&&T.layout){const O=T.layout.layoutBox[E];O&&(j=tr(O)*(parseFloat(j)/100))}}this.originPoint[E]=j}),S&&bt.postRender(()=>S(h,y)),u1(this.visualElement,"transform");const{animationState:C}=this.visualElement;C&&C.setActive("whileDrag",!0)},u=(h,y)=>{this.latestPointerEvent=h,this.latestPanInfo=y;const{dragPropagation:b,dragDirectionLock:w,onDirectionLock:S,onDrag:C}=this.getProps();if(!b&&!this.openDragLock)return;const{offset:E}=y;if(w&&this.currentDirection===null){this.currentDirection=iZ(E),this.currentDirection!==null&&S&&S(this.currentDirection);return}this.updateAxis("x",y.point,E),this.updateAxis("y",y.point,E),this.visualElement.render(),C&&C(h,y)},c=(h,y)=>{this.latestPointerEvent=h,this.latestPanInfo=y,this.stop(h,y),this.latestPointerEvent=null,this.latestPanInfo=null},d=()=>oi(h=>this.getAnimationState(h)==="paused"&&this.getAxisMotionValue(h).animation?.play()),{dragSnapToOrigin:m}=this.getProps();this.panSession=new Yz(t,{onSessionStart:o,onStart:l,onMove:u,onSessionEnd:c,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,distanceThreshold:r,contextWindow:Wz(this.visualElement)})}stop(t,n){const r=t||this.latestPointerEvent,i=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!r)return;const{velocity:l}=i;this.startAnimation(l);const{onDragEnd:u}=this.getProps();u&&bt.postRender(()=>u(r,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Cm(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let l=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(l=XX(l,this.constraints[t],this.elastic[t])),o.set(l)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&ju(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=ZX(r.layoutBox,t):this.constraints=!1,this.elastic=tZ(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&oi(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=eZ(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ju(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=aX(r,i.root,this.visualElement.getTransformPagePoint());let l=QX(i.layout.layoutBox,o);if(n){const u=n(nX(l));this.hasMutatedConstraints=!!u,u&&(l=Rz(u))}return l}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:l,onDragTransitionEnd:u}=this.getProps(),c=this.constraints||{},d=oi(m=>{if(!Cm(m,n,this.currentDirection))return;let h=c&&c[m]||{};l&&(h={min:0,max:0});const y=i?200:1e6,b=i?40:1e7,w={type:"inertia",velocity:r?t[m]:0,bounceStiffness:y,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(m,w)});return Promise.all(d).then(u)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return u1(this.visualElement,t),r.start(jA(t,r,0,n,this.visualElement,!1))}stopAnimation(){oi(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){oi(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){oi(n=>{const{drag:r}=this.getProps();if(!Cm(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:l,max:u}=i.layout.layoutBox[n];o.set(t[n]-kt(l,u,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!ju(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};oi(l=>{const u=this.getAxisMotionValue(l);if(u&&this.constraints!==!1){const c=u.get();i[l]=JX({min:c,max:c},this.constraints[l])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),oi(l=>{if(!Cm(l,t,null))return;const u=this.getAxisMotionValue(l),{min:c,max:d}=this.constraints[l];u.set(kt(c,d,i[l]))})}addListeners(){if(!this.visualElement.current)return;nZ.set(this.visualElement,this);const t=this.visualElement.current,n=Hf(t,"pointerdown",c=>{const{drag:d,dragListener:m=!0}=this.getProps();d&&m&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();ju(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),bt.read(r);const l=id(window,"resize",()=>this.scalePositionWithinConstraints()),u=i.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:d})=>{this.isDragging&&d&&(oi(m=>{const h=this.getAxisMotionValue(m);h&&(this.originPoint[m]+=c[m].translate,h.set(h.get()+c[m].translate))}),this.visualElement.render())}));return()=>{l(),n(),o(),u&&u()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:l=f1,dragMomentum:u=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:l,dragMomentum:u}}}function Cm(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function iZ(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class aZ extends fs{constructor(t){super(t),this.removeGroupControls=fi,this.removeListeners=fi,this.controls=new rZ(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||fi}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners()}}const l_=e=>(t,n)=>{e&&bt.postRender(()=>e(t,n))};class oZ extends fs{constructor(){super(...arguments),this.removePointerDownListener=fi}onPointerDown(t){this.session=new Yz(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Wz(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:l_(t),onStart:l_(n),onMove:r,onEnd:(o,l)=>{delete this.session,i&&bt.postRender(()=>i(o,l))}}}mount(){this.removePointerDownListener=Hf(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const ap={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let z0=!1;class sZ extends v.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),z0&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),ap.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,{projection:l}=r;return l&&(l.isPresent=o,z0=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==o?l.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?l.promote():l.relegate()||bt.postRender(()=>{const u=l.getStack();(!u||!u.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),pA.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;z0=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Zz(e){const[t,n]=bz(),r=v.useContext(YS);return g.jsx(sZ,{...e,layoutGroup:r,switchLayoutGroup:v.useContext(_z),isPresent:t,safeToRemove:n})}function lZ(e,t,n){const r=on(e)?e:cl(e);return r.start(jA("",r,t,n)),r.animation}const uZ=(e,t)=>e.depth-t.depth;class cZ{constructor(){this.children=[],this.isDirty=!1}add(t){QS(this.children,t),this.isDirty=!0}remove(t){JS(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(uZ),this.isDirty=!1,this.children.forEach(t)}}function fZ(e,t){const n=br.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(ro(r),e(o-t))};return bt.setup(r,!0),()=>ro(r)}const Qz=["TopLeft","TopRight","BottomLeft","BottomRight"],dZ=Qz.length,u_=e=>typeof e=="string"?parseFloat(e):e,c_=e=>typeof e=="number"||be.test(e);function hZ(e,t,n,r,i,o){i?(e.opacity=kt(0,n.opacity??1,mZ(r)),e.opacityExit=kt(t.opacity??1,0,pZ(r))):o&&(e.opacity=kt(t.opacity??1,n.opacity??1,r));for(let l=0;l<dZ;l++){const u=`border${Qz[l]}Radius`;let c=f_(t,u),d=f_(n,u);if(c===void 0&&d===void 0)continue;c||(c=0),d||(d=0),c===0||d===0||c_(c)===c_(d)?(e[u]=Math.max(kt(u_(c),u_(d),r),0),(oa.test(d)||oa.test(c))&&(e[u]+="%")):e[u]=d}(t.rotate||n.rotate)&&(e.rotate=kt(t.rotate||0,n.rotate||0,r))}function f_(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const mZ=Jz(0,.5,LI),pZ=Jz(.5,.95,fi);function Jz(e,t,n){return r=>r<e?0:r>t?1:n(ed(e,t,r))}function d_(e,t){e.min=t.min,e.max=t.max}function Si(e,t){d_(e.x,t.x),d_(e.y,t.y)}function h_(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function m_(e,t,n,r,i){return e-=t,e=Op(e,1/n,r),i!==void 0&&(e=Op(e,1/i,r)),e}function gZ(e,t=0,n=1,r=.5,i,o=e,l=e){if(oa.test(t)&&(t=parseFloat(t),t=kt(l.min,l.max,t/100)-l.min),typeof t!="number")return;let u=kt(o.min,o.max,r);e===o&&(u-=t),e.min=m_(e.min,t,n,u,i),e.max=m_(e.max,t,n,u,i)}function p_(e,t,[n,r,i],o,l){gZ(e,t[n],t[r],t[i],t.scale,o,l)}const vZ=["x","scaleX","originX"],yZ=["y","scaleY","originY"];function g_(e,t,n,r){p_(e.x,t,vZ,n?n.x:void 0,r?r.x:void 0),p_(e.y,t,yZ,n?n.y:void 0,r?r.y:void 0)}function v_(e){return e.translate===0&&e.scale===1}function e3(e){return v_(e.x)&&v_(e.y)}function y_(e,t){return e.min===t.min&&e.max===t.max}function bZ(e,t){return y_(e.x,t.x)&&y_(e.y,t.y)}function b_(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function t3(e,t){return b_(e.x,t.x)&&b_(e.y,t.y)}function x_(e){return tr(e.x)/tr(e.y)}function w_(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class xZ{constructor(){this.members=[]}add(t){QS(this.members,t),t.scheduleRender()}remove(t){if(JS(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function wZ(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y,l=n?.z||0;if((i||o||l)&&(r=`translate3d(${i}px, ${o}px, ${l}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:d,rotate:m,rotateX:h,rotateY:y,skewX:b,skewY:w}=n;d&&(r=`perspective(${d}px) ${r}`),m&&(r+=`rotate(${m}deg) `),h&&(r+=`rotateX(${h}deg) `),y&&(r+=`rotateY(${y}deg) `),b&&(r+=`skewX(${b}deg) `),w&&(r+=`skewY(${w}deg) `)}const u=e.x.scale*t.x,c=e.y.scale*t.y;return(u!==1||c!==1)&&(r+=`scale(${u}, ${c})`),r||"none"}const $0=["","X","Y","Z"],SZ=1e3;let AZ=0;function B0(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function n3(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Uz(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",bt,!(i||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&n3(r)}function r3({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(l={},u=t?.()){this.id=AZ++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(jZ),this.nodes.forEach(NZ),this.nodes.forEach(_Z),this.nodes.forEach(TZ)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=l,this.root=u?u.root||u:this,this.path=u?[...u.path,u]:[],this.parent=u,this.depth=u?u.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new cZ)}addEventListener(l,u){return this.eventHandlers.has(l)||this.eventHandlers.set(l,new nA),this.eventHandlers.get(l).add(u)}notifyListeners(l,...u){const c=this.eventHandlers.get(l);c&&c.notify(...u)}hasListeners(l){return this.eventHandlers.has(l)}mount(l){if(this.instance)return;this.isSVG=yz(l)&&!hY(l),this.instance=l;const{layoutId:u,layout:c,visualElement:d}=this.options;if(d&&!d.current&&d.mount(l),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||u)&&(this.isLayoutDirty=!0),e){let m,h=0;const y=()=>this.root.updateBlockedByResize=!1;bt.read(()=>{h=window.innerWidth}),e(l,()=>{const b=window.innerWidth;b!==h&&(h=b,this.root.updateBlockedByResize=!0,m&&m(),m=fZ(y,250),ap.hasAnimatedSinceResize&&(ap.hasAnimatedSinceResize=!1,this.nodes.forEach(C_)))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&d&&(u||c)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:h,hasRelativeLayoutChanged:y,layout:b})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const w=this.options.transition||d.getDefaultTransition()||LZ,{onLayoutAnimationStart:S,onLayoutAnimationComplete:C}=d.getProps(),E=!this.targetLayout||!t3(this.targetLayout,b),j=!h&&y;if(this.options.layoutRoot||this.resumeFrom||j||h&&(E||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const T={...hA(w,"layout"),onPlay:S,onComplete:C};(d.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T),this.setAnimationOrigin(m,j)}else h||C_(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=b})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const l=this.getStack();l&&l.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ro(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(MZ),this.animationId++)}getTransformTemplate(){const{visualElement:l}=this.options;return l&&l.getProps().transformTemplate}willUpdate(l=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&n3(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let m=0;m<this.path.length;m++){const h=this.path[m];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:u,layout:c}=this.options;if(u===void 0&&!c)return;const d=this.getTransformTemplate();this.prevTransformTemplateValue=d?d(this.latestValues,""):void 0,this.updateSnapshot(),l&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(S_);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(A_);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(PZ),this.nodes.forEach(CZ),this.nodes.forEach(EZ)):this.nodes.forEach(A_),this.clearAllSnapshots();const u=br.now();Mn.delta=to(0,1e3/60,u-Mn.timestamp),Mn.timestamp=u,Mn.isProcessing=!0,O0.update.process(Mn),O0.preRender.process(Mn),O0.render.process(Mn),Mn.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,pA.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(OZ),this.sharedNodes.forEach(RZ)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,bt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){bt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!tr(this.snapshot.measuredBox.x)&&!tr(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const l=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=mn(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:u}=this.options;u&&u.notify("LayoutMeasure",this.layout.layoutBox,l?l.layoutBox:void 0)}updateScroll(l="measure"){let u=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===l&&(u=!1),u&&this.instance){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:l,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const l=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,u=this.projectionDelta&&!e3(this.projectionDelta),c=this.getTransformTemplate(),d=c?c(this.latestValues,""):void 0,m=d!==this.prevTransformTemplateValue;l&&this.instance&&(u||Us(this.latestValues)||m)&&(i(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(l=!0){const u=this.measurePageBox();let c=this.removeElementScroll(u);return l&&(c=this.removeTransform(c)),IZ(c),{animationId:this.root.animationId,measuredBox:u,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:l}=this.options;if(!l)return mn();const u=l.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(zZ))){const{scroll:d}=this.root;d&&(Tu(u.x,d.offset.x),Tu(u.y,d.offset.y))}return u}removeElementScroll(l){const u=mn();if(Si(u,l),this.scroll?.wasRoot)return u;for(let c=0;c<this.path.length;c++){const d=this.path[c],{scroll:m,options:h}=d;d!==this.root&&m&&h.layoutScroll&&(m.wasRoot&&Si(u,l),Tu(u.x,m.offset.x),Tu(u.y,m.offset.y))}return u}applyTransform(l,u=!1){const c=mn();Si(c,l);for(let d=0;d<this.path.length;d++){const m=this.path[d];!u&&m.options.layoutScroll&&m.scroll&&m!==m.root&&Ou(c,{x:-m.scroll.offset.x,y:-m.scroll.offset.y}),Us(m.latestValues)&&Ou(c,m.latestValues)}return Us(this.latestValues)&&Ou(c,this.latestValues),c}removeTransform(l){const u=mn();Si(u,l);for(let c=0;c<this.path.length;c++){const d=this.path[c];if(!d.instance||!Us(d.latestValues))continue;a1(d.latestValues)&&d.updateSnapshot();const m=mn(),h=d.measurePageBox();Si(m,h),g_(u,d.latestValues,d.snapshot?d.snapshot.layoutBox:void 0,m)}return Us(this.latestValues)&&g_(u,this.latestValues),u}setTargetDelta(l){this.targetDelta=l,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(l){this.options={...this.options,...l,crossfade:l.crossfade!==void 0?l.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Mn.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(l=!1){const u=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=u.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=u.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=u.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==u;if(!(l||c&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:m,layoutId:h}=this.options;if(!this.layout||!(m||h))return;this.resolvedRelativeTargetAt=Mn.timestamp;const y=this.getClosestProjectingParent();y&&this.linkedParentVersion!==y.layoutVersion&&!y.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(y&&y.layout?this.createRelativeTarget(y,this.layout.layoutBox,y.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=mn(),this.targetWithTransforms=mn()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),KX(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Si(this.target,this.layout.layoutBox),kz(this.target,this.targetDelta)):Si(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,y&&!!y.resumingFrom==!!this.resumingFrom&&!y.options.layoutScroll&&y.target&&this.animationProgress!==1?this.createRelativeTarget(y,this.target,y.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||a1(this.parent.latestValues)||Dz(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(l,u,c){this.relativeParent=l,this.linkedParentVersion=l.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=mn(),this.relativeTargetOrigin=mn(),Pp(this.relativeTargetOrigin,u,c),Si(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const l=this.getLead(),u=!!this.resumingFrom||this!==l;let c=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(c=!1),u&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Mn.timestamp&&(c=!1),c)return;const{layout:d,layoutId:m}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||m))return;Si(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,y=this.treeScale.y;iX(this.layoutCorrected,this.treeScale,this.path,u),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox,l.targetWithTransforms=mn());const{target:b}=l;if(!b){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(h_(this.prevProjectionDelta.x,this.projectionDelta.x),h_(this.prevProjectionDelta.y,this.projectionDelta.y)),Kf(this.projectionDelta,this.layoutCorrected,b,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==y||!w_(this.projectionDelta.x,this.prevProjectionDelta.x)||!w_(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",b))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(l=!0){if(this.options.visualElement?.scheduleRender(),l){const u=this.getStack();u&&u.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Pu(),this.projectionDelta=Pu(),this.projectionDeltaWithTransform=Pu()}setAnimationOrigin(l,u=!1){const c=this.snapshot,d=c?c.latestValues:{},m={...this.latestValues},h=Pu();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!u;const y=mn(),b=c?c.source:void 0,w=this.layout?this.layout.source:void 0,S=b!==w,C=this.getStack(),E=!C||C.members.length<=1,j=!!(S&&!E&&this.options.crossfade===!0&&!this.path.some(kZ));this.animationProgress=0;let T;this.mixTargetDelta=O=>{const N=O/1e3;E_(h.x,l.x,N),E_(h.y,l.y,N),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Pp(y,this.layout.layoutBox,this.relativeParent.layout.layoutBox),DZ(this.relativeTarget,this.relativeTargetOrigin,y,N),T&&bZ(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=mn()),Si(T,this.relativeTarget)),S&&(this.animationValues=m,hZ(m,d,this.latestValues,N,j,E)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=N},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(l){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(ro(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=bt.update(()=>{ap.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=cl(0)),this.currentAnimation=lZ(this.motionValue,[0,1e3],{...l,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),l.onUpdate&&l.onUpdate(u)},onStop:()=>{},onComplete:()=>{l.onComplete&&l.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const l=this.getStack();l&&l.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(SZ),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const l=this.getLead();let{targetWithTransforms:u,target:c,layout:d,latestValues:m}=l;if(!(!u||!c||!d)){if(this!==l&&this.layout&&d&&i3(this.options.animationType,this.layout.layoutBox,d.layoutBox)){c=this.target||mn();const h=tr(this.layout.layoutBox.x);c.x.min=l.target.x.min,c.x.max=c.x.min+h;const y=tr(this.layout.layoutBox.y);c.y.min=l.target.y.min,c.y.max=c.y.min+y}Si(u,c),Ou(u,m),Kf(this.projectionDeltaWithTransform,this.layoutCorrected,u,m)}}registerSharedNode(l,u){this.sharedNodes.has(l)||this.sharedNodes.set(l,new xZ),this.sharedNodes.get(l).add(u);const d=u.options.initialPromotionConfig;u.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(u):void 0})}isLead(){const l=this.getStack();return l?l.lead===this:!0}getLead(){const{layoutId:l}=this.options;return l?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:l}=this.options;return l?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:l}=this.options;if(l)return this.root.sharedNodes.get(l)}promote({needsReset:l,transition:u,preserveFollowOpacity:c}={}){const d=this.getStack();d&&d.promote(this,c),l&&(this.projectionDelta=void 0,this.needsReset=!0),u&&this.setOptions({transition:u})}relegate(){const l=this.getStack();return l?l.relegate(this):!1}resetSkewAndRotation(){const{visualElement:l}=this.options;if(!l)return;let u=!1;const{latestValues:c}=l;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(u=!0),!u)return;const d={};c.z&&B0("z",l,d,this.animationValues);for(let m=0;m<$0.length;m++)B0(`rotate${$0[m]}`,l,d,this.animationValues),B0(`skew${$0[m]}`,l,d,this.animationValues);l.render();for(const m in d)l.setStaticValue(m,d[m]),this.animationValues&&(this.animationValues[m]=d[m]);l.scheduleRender()}applyProjectionStyles(l,u){if(!this.instance||this.isSVG)return;if(!this.isVisible){l.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,l.visibility="",l.opacity="",l.pointerEvents=ip(u?.pointerEvents)||"",l.transform=c?c(this.latestValues,""):"none";return}const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){this.options.layoutId&&(l.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,l.pointerEvents=ip(u?.pointerEvents)||""),this.hasProjected&&!Us(this.latestValues)&&(l.transform=c?c({},""):"none",this.hasProjected=!1);return}l.visibility="";const m=d.animationValues||d.latestValues;this.applyTransformsToTarget();let h=wZ(this.projectionDeltaWithTransform,this.treeScale,m);c&&(h=c(m,h)),l.transform=h;const{x:y,y:b}=this.projectionDelta;l.transformOrigin=`${y.origin*100}% ${b.origin*100}% 0`,d.animationValues?l.opacity=d===this?m.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:m.opacityExit:l.opacity=d===this?m.opacity!==void 0?m.opacity:"":m.opacityExit!==void 0?m.opacityExit:0;for(const w in i1){if(m[w]===void 0)continue;const{correct:S,applyTo:C,isCSSVariable:E}=i1[w],j=h==="none"?m[w]:S(m[w],d);if(C){const T=C.length;for(let O=0;O<T;O++)l[C[O]]=j}else E?this.options.visualElement.renderState.vars[w]=j:l[w]=j}this.options.layoutId&&(l.pointerEvents=d===this?ip(u?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(l=>l.currentAnimation?.stop()),this.root.nodes.forEach(S_),this.root.sharedNodes.clear()}}}function CZ(e){e.updateLayout()}function EZ(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,o=t.source!==e.layout.source;i==="size"?oi(m=>{const h=o?t.measuredBox[m]:t.layoutBox[m],y=tr(h);h.min=n[m].min,h.max=h.min+y}):i3(i,t.layoutBox,n)&&oi(m=>{const h=o?t.measuredBox[m]:t.layoutBox[m],y=tr(n[m]);h.max=h.min+y,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[m].max=e.relativeTarget[m].min+y)});const l=Pu();Kf(l,n,t.layoutBox);const u=Pu();o?Kf(u,e.applyTransform(r,!0),t.measuredBox):Kf(u,n,t.layoutBox);const c=!e3(l);let d=!1;if(!e.resumeFrom){const m=e.getClosestProjectingParent();if(m&&!m.resumeFrom){const{snapshot:h,layout:y}=m;if(h&&y){const b=mn();Pp(b,t.layoutBox,h.layoutBox);const w=mn();Pp(w,n,y.layoutBox),t3(b,w)||(d=!0),m.options.layoutRoot&&(e.relativeTarget=w,e.relativeTargetOrigin=b,e.relativeParent=m)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:u,layoutDelta:l,hasLayoutChanged:c,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function jZ(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function TZ(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function OZ(e){e.clearSnapshot()}function S_(e){e.clearMeasurements()}function A_(e){e.isLayoutDirty=!1}function PZ(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function C_(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function NZ(e){e.resolveTargetDelta()}function _Z(e){e.calcProjection()}function MZ(e){e.resetSkewAndRotation()}function RZ(e){e.removeLeadSnapshot()}function E_(e,t,n){e.translate=kt(t.translate,0,n),e.scale=kt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function j_(e,t,n,r){e.min=kt(t.min,n.min,r),e.max=kt(t.max,n.max,r)}function DZ(e,t,n,r){j_(e.x,t.x,n.x,r),j_(e.y,t.y,n.y,r)}function kZ(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const LZ={duration:.45,ease:[.4,0,.1,1]},T_=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),O_=T_("applewebkit/")&&!T_("chrome/")?Math.round:fi;function P_(e){e.min=O_(e.min),e.max=O_(e.max)}function IZ(e){P_(e.x),P_(e.y)}function i3(e,t,n){return e==="position"||e==="preserve-aspect"&&!HX(x_(t),x_(n),.2)}function zZ(e){return e!==e.root&&e.scroll?.wasRoot}const $Z=r3({attachResizeListener:(e,t)=>id(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),U0={current:void 0},a3=r3({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!U0.current){const e=new $Z({});e.mount(window),e.setOptions({layoutScroll:!0}),U0.current=e}return U0.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),BZ={pan:{Feature:oZ},drag:{Feature:aZ,ProjectionNode:a3,MeasureLayout:Zz}};function N_(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=r[i];o&&bt.postRender(()=>o(t,kd(t)))}class UZ extends fs{mount(){const{current:t}=this.node;t&&(this.unmount=lY(t,(n,r)=>(N_(this.node,r,"Start"),i=>N_(this.node,i,"End"))))}unmount(){}}class VZ extends fs{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=_d(id(this.node.current,"focus",()=>this.onFocus()),id(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function __(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=r[i];o&&bt.postRender(()=>o(t,kd(t)))}class FZ extends fs{mount(){const{current:t}=this.node;t&&(this.unmount=dY(t,(n,r)=>(__(this.node,r,"Start"),(i,{success:o})=>__(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const d1=new WeakMap,V0=new WeakMap,qZ=e=>{const t=d1.get(e.target);t&&t(e)},HZ=e=>{e.forEach(qZ)};function KZ({root:e,...t}){const n=e||document;V0.has(n)||V0.set(n,{});const r=V0.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(HZ,{root:e,...t})),r[i]}function GZ(e,t,n){const r=KZ(t);return d1.set(e,n),r.observe(e),()=>{d1.delete(e),r.unobserve(e)}}const WZ={some:0,all:1};class YZ extends fs{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=t,l={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:WZ[i]},u=c=>{const{isIntersecting:d}=c;if(this.isInView===d||(this.isInView=d,o&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:m,onViewportLeave:h}=this.node.getProps(),y=d?m:h;y&&y(c)};return GZ(this.node.current,l,u)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(XZ(t,n))&&this.startObserver()}unmount(){}}function XZ({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const ZZ={inView:{Feature:YZ},tap:{Feature:FZ},focus:{Feature:VZ},hover:{Feature:UZ}},QZ={layout:{ProjectionNode:a3,MeasureLayout:Zz}},JZ={...$X,...ZZ,...BZ,...QZ},io=tX(JZ,mX);function ad(e){const t=Nd(()=>cl(e)),{isStatic:n}=v.useContext(Dd);if(n){const[,r]=v.useState(e);v.useEffect(()=>t.on("change",r),[])}return t}function TA(e,t){const n=ad(t()),r=()=>n.set(t());return r(),ZS(()=>{const i=()=>bt.preRender(r,!1,!0),o=e.map(l=>l.on("change",i));return()=>{o.forEach(l=>l()),ro(r)}}),n}function M_(e,...t){const n=e.length;function r(){let i="";for(let o=0;o<n;o++){i+=e[o];const l=t[o];l&&(i+=on(l)?l.get():l)}return i}return TA(t.filter(on),r)}function eQ(e){qf.current=[],e();const t=TA(qf.current,e);return qf.current=void 0,t}function o3(e,t,n,r){if(typeof e=="function")return eQ(e);const i=typeof t=="function"?t:mY(t,n,r);return Array.isArray(e)?R_(e,i):R_([e],([o])=>i(o))}function R_(e,t){const n=Nd(()=>[]);return TA(e,()=>{n.length=0;const r=e.length;for(let i=0;i<r;i++)n[i]=e[i].get();return t(n)})}function s3(e,t={}){const{isStatic:n}=v.useContext(Dd),r=()=>on(e)?e.get():e;if(n)return o3(r);const i=ad(r());return v.useInsertionEffect(()=>pY(i,e,t),[i,JSON.stringify(t)]),i}const tQ={some:0,all:1};function nQ(e,t,{root:n,margin:r,amount:i="some"}={}){const o=dz(e),l=new WeakMap,u=d=>{d.forEach(m=>{const h=l.get(m.target);if(m.isIntersecting!==!!h)if(m.isIntersecting){const y=t(m.target,m);typeof y=="function"?l.set(m.target,y):c.unobserve(m.target)}else typeof h=="function"&&(h(m),l.delete(m.target))})},c=new IntersectionObserver(u,{root:n,rootMargin:r,threshold:typeof i=="number"?i:tQ[i]});return o.forEach(d=>c.observe(d)),()=>c.disconnect()}function rQ(e,{root:t,margin:n,amount:r,once:i=!1,initial:o=!1}={}){const[l,u]=v.useState(o);return v.useEffect(()=>{if(!e.current||i&&l)return;const c=()=>(u(!0),i?void 0:()=>u(!1)),d={root:t&&t.current||void 0,margin:n,amount:r};return nQ(e.current,c,d)},[t,e,n,i,r]),l}const iQ=({id:e,x:t,y:n,color:r,delay:i,scale:o})=>g.jsx(io.svg,{className:"pointer-events-none absolute z-20",initial:{opacity:0,left:t,top:n},animate:{opacity:[0,1,0],scale:[0,o,0],rotate:[75,120,150]},transition:{duration:.8,repeat:1/0,delay:i},width:"21",height:"21",viewBox:"0 0 21 21",children:g.jsx("path",{d:"M9.82531 0.843845C10.0553 0.215178 10.9446 0.215178 11.1746 0.843845L11.8618 2.72026C12.4006 4.19229 12.3916 6.39157 13.5 7.5C14.6084 8.60843 16.8077 8.59935 18.2797 9.13822L20.1561 9.82534C20.7858 10.0553 20.7858 10.9447 20.1561 11.1747L18.2797 11.8618C16.8077 12.4007 14.6084 12.3916 13.5 13.5C12.3916 14.6084 12.4006 16.8077 11.8618 18.2798L11.1746 20.1562C10.9446 20.7858 10.0553 20.7858 9.82531 20.1562L9.13819 18.2798C8.59932 16.8077 8.60843 14.6084 7.5 13.5C6.39157 12.3916 4.19225 12.4007 2.72023 11.8618L0.843814 11.1747C0.215148 10.9447 0.215148 10.0553 0.843814 9.82534L2.72023 9.13822C4.19225 8.59935 6.39157 8.60843 7.5 7.5C8.60843 6.39157 8.59932 4.19229 9.13819 2.72026L9.82531 0.843845Z",fill:r})},e),D_=({children:e,colors:t={first:"#9E7AFF",second:"#FE8BBB"},className:n,sparklesCount:r=10,...i})=>{const[o,l]=v.useState([]);return v.useEffect(()=>{const u=()=>{const h=`${Math.random()*100}%`,y=`${Math.random()*100}%`,b=Math.random()>.5?t.first:t.second,w=Math.random()*2,S=Math.random()*1+.3,C=Math.random()*10+5;return{id:`${h}-${y}-${Date.now()}`,x:h,y,color:b,delay:w,scale:S,lifespan:C}},c=()=>{const h=Array.from({length:r},u);l(h)},d=()=>{l(h=>h.map(y=>y.lifespan<=0?u():{...y,lifespan:y.lifespan-.1}))};c();const m=setInterval(d,100);return()=>clearInterval(m)},[t.first,t.second,r]),g.jsx("div",{className:de("font-bold",n),...i,style:{"--sparkles-first-color":`${t.first}`,"--sparkles-second-color":`${t.second}`},children:g.jsxs("span",{className:"relative inline-block",children:[o.map(u=>g.jsx(iQ,{...u},u.id)),g.jsx("strong",{children:e})]})})};function Ve(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function aQ(e,t){const n=v.createContext(t),r=o=>{const{children:l,...u}=o,c=v.useMemo(()=>u,Object.values(u));return g.jsx(n.Provider,{value:c,children:l})};r.displayName=e+"Provider";function i(o){const l=v.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,i]}function Cl(e,t=[]){let n=[];function r(o,l){const u=v.createContext(l),c=n.length;n=[...n,l];const d=h=>{const{scope:y,children:b,...w}=h,S=y?.[e]?.[c]||u,C=v.useMemo(()=>w,Object.values(w));return g.jsx(S.Provider,{value:C,children:b})};d.displayName=o+"Provider";function m(h,y){const b=y?.[e]?.[c]||u,w=v.useContext(b);if(w)return w;if(l!==void 0)return l;throw new Error(`\`${h}\` must be used within \`${o}\``)}return[d,m]}const i=()=>{const o=n.map(l=>v.createContext(l));return function(u){const c=u?.[e]||o;return v.useMemo(()=>({[`__scope${e}`]:{...u,[e]:c}}),[u,c])}};return i.scopeName=e,[r,oQ(i,...t)]}function oQ(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const l=r.reduce((u,{useScope:c,scopeName:d})=>{const h=c(o)[`__scope${d}`];return{...u,...h}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}var Gn=globalThis?.document?v.useLayoutEffect:()=>{},sQ=Dg[" useId ".trim().toString()]||(()=>{}),lQ=0;function Qa(e){const[t,n]=v.useState(sQ());return Gn(()=>{n(r=>r??String(lQ++))},[e]),t?`radix-${t}`:""}var uQ=Dg[" useInsertionEffect ".trim().toString()]||Gn;function Vu({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,o,l]=cQ({defaultProp:t,onChange:n}),u=e!==void 0,c=u?e:i;{const m=v.useRef(e!==void 0);v.useEffect(()=>{const h=m.current;h!==u&&console.warn(`${r} is changing from ${h?"controlled":"uncontrolled"} to ${u?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),m.current=u},[u,r])}const d=v.useCallback(m=>{if(u){const h=fQ(m)?m(e):m;h!==e&&l.current?.(h)}else o(m)},[u,e,o,l]);return[c,d]}function cQ({defaultProp:e,onChange:t}){const[n,r]=v.useState(e),i=v.useRef(n),o=v.useRef(t);return uQ(()=>{o.current=t},[t]),v.useEffect(()=>{i.current!==n&&(o.current?.(n),i.current=n)},[n,i]),[n,r,o]}function fQ(e){return typeof e=="function"}function dQ(e){const t=hQ(e),n=v.forwardRef((r,i)=>{const{children:o,...l}=r,u=v.Children.toArray(o),c=u.find(pQ);if(c){const d=c.props.children,m=u.map(h=>h===c?v.Children.count(d)>1?v.Children.only(null):v.isValidElement(d)?d.props.children:null:h);return g.jsx(t,{...l,ref:i,children:v.isValidElement(d)?v.cloneElement(d,void 0,m):null})}return g.jsx(t,{...l,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}function hQ(e){const t=v.forwardRef((n,r)=>{const{children:i,...o}=n;if(v.isValidElement(i)){const l=vQ(i),u=gQ(o,i.props);return i.type!==v.Fragment&&(u.ref=r?ac(r,l):l),v.cloneElement(i,u)}return v.Children.count(i)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var mQ=Symbol("radix.slottable");function pQ(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===mQ}function gQ(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...u)=>{const c=o(...u);return i(...u),c}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function vQ(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var yQ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Qe=yQ.reduce((e,t)=>{const n=dQ(`Primitive.${t}`),r=v.forwardRef((i,o)=>{const{asChild:l,...u}=i,c=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(c,{...u,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function bQ(e,t){e&&cs.flushSync(()=>e.dispatchEvent(t))}function as(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...n)=>t.current?.(...n),[])}function xQ(e,t=globalThis?.document){const n=as(e);v.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var wQ="DismissableLayer",h1="dismissableLayer.update",SQ="dismissableLayer.pointerDownOutside",AQ="dismissableLayer.focusOutside",k_,l3=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),qg=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:l,onDismiss:u,...c}=e,d=v.useContext(l3),[m,h]=v.useState(null),y=m?.ownerDocument??globalThis?.document,[,b]=v.useState({}),w=Mt(t,M=>h(M)),S=Array.from(d.layers),[C]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),E=S.indexOf(C),j=m?S.indexOf(m):-1,T=d.layersWithOutsidePointerEventsDisabled.size>0,O=j>=E,N=jQ(M=>{const R=M.target,I=[...d.branches].some($=>$.contains(R));!O||I||(i?.(M),l?.(M),M.defaultPrevented||u?.())},y),_=TQ(M=>{const R=M.target;[...d.branches].some($=>$.contains(R))||(o?.(M),l?.(M),M.defaultPrevented||u?.())},y);return xQ(M=>{j===d.layers.size-1&&(r?.(M),!M.defaultPrevented&&u&&(M.preventDefault(),u()))},y),v.useEffect(()=>{if(m)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(k_=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(m)),d.layers.add(m),L_(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(y.body.style.pointerEvents=k_)}},[m,y,n,d]),v.useEffect(()=>()=>{m&&(d.layers.delete(m),d.layersWithOutsidePointerEventsDisabled.delete(m),L_())},[m,d]),v.useEffect(()=>{const M=()=>b({});return document.addEventListener(h1,M),()=>document.removeEventListener(h1,M)},[]),g.jsx(Qe.div,{...c,ref:w,style:{pointerEvents:T?O?"auto":"none":void 0,...e.style},onFocusCapture:Ve(e.onFocusCapture,_.onFocusCapture),onBlurCapture:Ve(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:Ve(e.onPointerDownCapture,N.onPointerDownCapture)})});qg.displayName=wQ;var CQ="DismissableLayerBranch",EQ=v.forwardRef((e,t)=>{const n=v.useContext(l3),r=v.useRef(null),i=Mt(t,r);return v.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),g.jsx(Qe.div,{...e,ref:i})});EQ.displayName=CQ;function jQ(e,t=globalThis?.document){const n=as(e),r=v.useRef(!1),i=v.useRef(()=>{});return v.useEffect(()=>{const o=u=>{if(u.target&&!r.current){let c=function(){u3(SQ,n,d,{discrete:!0})};const d={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=c,t.addEventListener("click",i.current,{once:!0})):c()}else t.removeEventListener("click",i.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function TQ(e,t=globalThis?.document){const n=as(e),r=v.useRef(!1);return v.useEffect(()=>{const i=o=>{o.target&&!r.current&&u3(AQ,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function L_(){const e=new CustomEvent(h1);document.dispatchEvent(e)}function u3(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?bQ(i,o):i.dispatchEvent(o)}var F0="focusScope.autoFocusOnMount",q0="focusScope.autoFocusOnUnmount",I_={bubbles:!1,cancelable:!0},OQ="FocusScope",OA=v.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...l}=e,[u,c]=v.useState(null),d=as(i),m=as(o),h=v.useRef(null),y=Mt(t,S=>c(S)),b=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(r){let S=function(T){if(b.paused||!u)return;const O=T.target;u.contains(O)?h.current=O:Xo(h.current,{select:!0})},C=function(T){if(b.paused||!u)return;const O=T.relatedTarget;O!==null&&(u.contains(O)||Xo(h.current,{select:!0}))},E=function(T){if(document.activeElement===document.body)for(const N of T)N.removedNodes.length>0&&Xo(u)};document.addEventListener("focusin",S),document.addEventListener("focusout",C);const j=new MutationObserver(E);return u&&j.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",C),j.disconnect()}}},[r,u,b.paused]),v.useEffect(()=>{if(u){$_.add(b);const S=document.activeElement;if(!u.contains(S)){const E=new CustomEvent(F0,I_);u.addEventListener(F0,d),u.dispatchEvent(E),E.defaultPrevented||(PQ(DQ(c3(u)),{select:!0}),document.activeElement===S&&Xo(u))}return()=>{u.removeEventListener(F0,d),setTimeout(()=>{const E=new CustomEvent(q0,I_);u.addEventListener(q0,m),u.dispatchEvent(E),E.defaultPrevented||Xo(S??document.body,{select:!0}),u.removeEventListener(q0,m),$_.remove(b)},0)}}},[u,d,m,b]);const w=v.useCallback(S=>{if(!n&&!r||b.paused)return;const C=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,E=document.activeElement;if(C&&E){const j=S.currentTarget,[T,O]=NQ(j);T&&O?!S.shiftKey&&E===O?(S.preventDefault(),n&&Xo(T,{select:!0})):S.shiftKey&&E===T&&(S.preventDefault(),n&&Xo(O,{select:!0})):E===j&&S.preventDefault()}},[n,r,b.paused]);return g.jsx(Qe.div,{tabIndex:-1,...l,ref:y,onKeyDown:w})});OA.displayName=OQ;function PQ(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Xo(r,{select:t}),document.activeElement!==n)return}function NQ(e){const t=c3(e),n=z_(t,e),r=z_(t.reverse(),e);return[n,r]}function c3(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function z_(e,t){for(const n of e)if(!_Q(n,{upTo:t}))return n}function _Q(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function MQ(e){return e instanceof HTMLInputElement&&"select"in e}function Xo(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&MQ(e)&&t&&e.select()}}var $_=RQ();function RQ(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=B_(e,t),e.unshift(t)},remove(t){e=B_(e,t),e[0]?.resume()}}}function B_(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function DQ(e){return e.filter(t=>t.tagName!=="A")}var kQ="Portal",Hg=v.forwardRef((e,t)=>{const{container:n,...r}=e,[i,o]=v.useState(!1);Gn(()=>o(!0),[]);const l=n||i&&globalThis?.document?.body;return l?qL.createPortal(g.jsx(Qe.div,{...r,ref:t}),l):null});Hg.displayName=kQ;function LQ(e,t){return v.useReducer((n,r)=>t[n][r]??n,e)}var El=e=>{const{present:t,children:n}=e,r=IQ(t),i=typeof n=="function"?n({present:r.isPresent}):v.Children.only(n),o=Mt(r.ref,zQ(i));return typeof n=="function"||r.isPresent?v.cloneElement(i,{ref:o}):null};El.displayName="Presence";function IQ(e){const[t,n]=v.useState(),r=v.useRef(null),i=v.useRef(e),o=v.useRef("none"),l=e?"mounted":"unmounted",[u,c]=LQ(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const d=Em(r.current);o.current=u==="mounted"?d:"none"},[u]),Gn(()=>{const d=r.current,m=i.current;if(m!==e){const y=o.current,b=Em(d);e?c("MOUNT"):b==="none"||d?.display==="none"?c("UNMOUNT"):c(m&&y!==b?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,c]),Gn(()=>{if(t){let d;const m=t.ownerDocument.defaultView??window,h=b=>{const S=Em(r.current).includes(CSS.escape(b.animationName));if(b.target===t&&S&&(c("ANIMATION_END"),!i.current)){const C=t.style.animationFillMode;t.style.animationFillMode="forwards",d=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=C)})}},y=b=>{b.target===t&&(o.current=Em(r.current))};return t.addEventListener("animationstart",y),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{m.clearTimeout(d),t.removeEventListener("animationstart",y),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:v.useCallback(d=>{r.current=d?getComputedStyle(d):null,n(d)},[])}}function Em(e){return e?.animationName||"none"}function zQ(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var H0=0;function f3(){v.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??U_()),document.body.insertAdjacentElement("beforeend",e[1]??U_()),H0++,()=>{H0===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),H0--}},[])}function U_(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Ji=function(){return Ji=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Ji.apply(this,arguments)};function d3(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function $Q(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var op="right-scroll-bar-position",sp="width-before-scroll-bar",BQ="with-scroll-bars-hidden",UQ="--removed-body-scroll-bar-size";function K0(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function VQ(e,t){var n=v.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var FQ=typeof window<"u"?v.useLayoutEffect:v.useEffect,V_=new WeakMap;function qQ(e,t){var n=VQ(null,function(r){return e.forEach(function(i){return K0(i,r)})});return FQ(function(){var r=V_.get(n);if(r){var i=new Set(r),o=new Set(e),l=n.current;i.forEach(function(u){o.has(u)||K0(u,null)}),o.forEach(function(u){i.has(u)||K0(u,l)})}V_.set(n,e)},[e]),n}function HQ(e){return e}function KQ(e,t){t===void 0&&(t=HQ);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var l=t(o,r);return n.push(l),function(){n=n.filter(function(u){return u!==l})}},assignSyncMedium:function(o){for(r=!0;n.length;){var l=n;n=[],l.forEach(o)}n={push:function(u){return o(u)},filter:function(){return n}}},assignMedium:function(o){r=!0;var l=[];if(n.length){var u=n;n=[],u.forEach(o),l=n}var c=function(){var m=l;l=[],m.forEach(o)},d=function(){return Promise.resolve().then(c)};d(),n={push:function(m){l.push(m),d()},filter:function(m){return l=l.filter(m),n}}}};return i}function GQ(e){e===void 0&&(e={});var t=KQ(null);return t.options=Ji({async:!0,ssr:!1},e),t}var h3=function(e){var t=e.sideCar,n=d3(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return v.createElement(r,Ji({},n))};h3.isSideCarExport=!0;function WQ(e,t){return e.useMedium(t),h3}var m3=GQ(),G0=function(){},Kg=v.forwardRef(function(e,t){var n=v.useRef(null),r=v.useState({onScrollCapture:G0,onWheelCapture:G0,onTouchMoveCapture:G0}),i=r[0],o=r[1],l=e.forwardProps,u=e.children,c=e.className,d=e.removeScrollBar,m=e.enabled,h=e.shards,y=e.sideCar,b=e.noRelative,w=e.noIsolation,S=e.inert,C=e.allowPinchZoom,E=e.as,j=E===void 0?"div":E,T=e.gapMode,O=d3(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=y,_=qQ([n,t]),M=Ji(Ji({},O),i);return v.createElement(v.Fragment,null,m&&v.createElement(N,{sideCar:m3,removeScrollBar:d,shards:h,noRelative:b,noIsolation:w,inert:S,setCallbacks:o,allowPinchZoom:!!C,lockRef:n,gapMode:T}),l?v.cloneElement(v.Children.only(u),Ji(Ji({},M),{ref:_})):v.createElement(j,Ji({},M,{className:c,ref:_}),u))});Kg.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Kg.classNames={fullWidth:sp,zeroRight:op};var YQ=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function XQ(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=YQ();return t&&e.setAttribute("nonce",t),e}function ZQ(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function QQ(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var JQ=function(){var e=0,t=null;return{add:function(n){e==0&&(t=XQ())&&(ZQ(t,n),QQ(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},eJ=function(){var e=JQ();return function(t,n){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},p3=function(){var e=eJ(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},tJ={left:0,top:0,right:0,gap:0},W0=function(e){return parseInt(e||"",10)||0},nJ=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[W0(n),W0(r),W0(i)]},rJ=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return tJ;var t=nJ(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},iJ=p3(),ku="data-scroll-locked",aJ=function(e,t,n,r){var i=e.left,o=e.top,l=e.right,u=e.gap;return n===void 0&&(n="margin"),`
20
- .`.concat(BQ,` {
21
- overflow: hidden `).concat(r,`;
22
- padding-right: `).concat(u,"px ").concat(r,`;
23
- }
24
- body[`).concat(ku,`] {
25
- overflow: hidden `).concat(r,`;
26
- overscroll-behavior: contain;
27
- `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
28
- padding-left: `.concat(i,`px;
29
- padding-top: `).concat(o,`px;
30
- padding-right: `).concat(l,`px;
31
- margin-left:0;
32
- margin-top:0;
33
- margin-right: `).concat(u,"px ").concat(r,`;
34
- `),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),`
35
- }
36
-
37
- .`).concat(op,` {
38
- right: `).concat(u,"px ").concat(r,`;
39
- }
40
-
41
- .`).concat(sp,` {
42
- margin-right: `).concat(u,"px ").concat(r,`;
43
- }
44
-
45
- .`).concat(op," .").concat(op,` {
46
- right: 0 `).concat(r,`;
47
- }
48
-
49
- .`).concat(sp," .").concat(sp,` {
50
- margin-right: 0 `).concat(r,`;
51
- }
52
-
53
- body[`).concat(ku,`] {
54
- `).concat(UQ,": ").concat(u,`px;
55
- }
56
- `)},F_=function(){var e=parseInt(document.body.getAttribute(ku)||"0",10);return isFinite(e)?e:0},oJ=function(){v.useEffect(function(){return document.body.setAttribute(ku,(F_()+1).toString()),function(){var e=F_()-1;e<=0?document.body.removeAttribute(ku):document.body.setAttribute(ku,e.toString())}},[])},sJ=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;oJ();var o=v.useMemo(function(){return rJ(i)},[i]);return v.createElement(iJ,{styles:aJ(o,!t,i,n?"":"!important")})},m1=!1;if(typeof window<"u")try{var jm=Object.defineProperty({},"passive",{get:function(){return m1=!0,!0}});window.addEventListener("test",jm,jm),window.removeEventListener("test",jm,jm)}catch{m1=!1}var du=m1?{passive:!1}:!1,lJ=function(e){return e.tagName==="TEXTAREA"},g3=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!lJ(e)&&n[t]==="visible")},uJ=function(e){return g3(e,"overflowY")},cJ=function(e){return g3(e,"overflowX")},q_=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=v3(e,r);if(i){var o=y3(e,r),l=o[1],u=o[2];if(l>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},fJ=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},dJ=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},v3=function(e,t){return e==="v"?uJ(t):cJ(t)},y3=function(e,t){return e==="v"?fJ(t):dJ(t)},hJ=function(e,t){return e==="h"&&t==="rtl"?-1:1},mJ=function(e,t,n,r,i){var o=hJ(e,window.getComputedStyle(t).direction),l=o*r,u=n.target,c=t.contains(u),d=!1,m=l>0,h=0,y=0;do{if(!u)break;var b=y3(e,u),w=b[0],S=b[1],C=b[2],E=S-C-o*w;(w||E)&&v3(e,u)&&(h+=E,y+=w);var j=u.parentNode;u=j&&j.nodeType===Node.DOCUMENT_FRAGMENT_NODE?j.host:j}while(!c&&u!==document.body||c&&(t.contains(u)||t===u));return(m&&Math.abs(h)<1||!m&&Math.abs(y)<1)&&(d=!0),d},Tm=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},H_=function(e){return[e.deltaX,e.deltaY]},K_=function(e){return e&&"current"in e?e.current:e},pJ=function(e,t){return e[0]===t[0]&&e[1]===t[1]},gJ=function(e){return`
57
- .block-interactivity-`.concat(e,` {pointer-events: none;}
58
- .allow-interactivity-`).concat(e,` {pointer-events: all;}
59
- `)},vJ=0,hu=[];function yJ(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),i=v.useState(vJ++)[0],o=v.useState(p3)[0],l=v.useRef(e);v.useEffect(function(){l.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var S=$Q([e.lockRef.current],(e.shards||[]).map(K_),!0).filter(Boolean);return S.forEach(function(C){return C.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),S.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var u=v.useCallback(function(S,C){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!l.current.allowPinchZoom;var E=Tm(S),j=n.current,T="deltaX"in S?S.deltaX:j[0]-E[0],O="deltaY"in S?S.deltaY:j[1]-E[1],N,_=S.target,M=Math.abs(T)>Math.abs(O)?"h":"v";if("touches"in S&&M==="h"&&_.type==="range")return!1;var R=window.getSelection(),I=R&&R.anchorNode,$=I?I===_||I.contains(_):!1;if($)return!1;var F=q_(M,_);if(!F)return!0;if(F?N=M:(N=M==="v"?"h":"v",F=q_(M,_)),!F)return!1;if(!r.current&&"changedTouches"in S&&(T||O)&&(r.current=N),!N)return!0;var z=r.current||N;return mJ(z,C,S,z==="h"?T:O)},[]),c=v.useCallback(function(S){var C=S;if(!(!hu.length||hu[hu.length-1]!==o)){var E="deltaY"in C?H_(C):Tm(C),j=t.current.filter(function(N){return N.name===C.type&&(N.target===C.target||C.target===N.shadowParent)&&pJ(N.delta,E)})[0];if(j&&j.should){C.cancelable&&C.preventDefault();return}if(!j){var T=(l.current.shards||[]).map(K_).filter(Boolean).filter(function(N){return N.contains(C.target)}),O=T.length>0?u(C,T[0]):!l.current.noIsolation;O&&C.cancelable&&C.preventDefault()}}},[]),d=v.useCallback(function(S,C,E,j){var T={name:S,delta:C,target:E,should:j,shadowParent:bJ(E)};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(O){return O!==T})},1)},[]),m=v.useCallback(function(S){n.current=Tm(S),r.current=void 0},[]),h=v.useCallback(function(S){d(S.type,H_(S),S.target,u(S,e.lockRef.current))},[]),y=v.useCallback(function(S){d(S.type,Tm(S),S.target,u(S,e.lockRef.current))},[]);v.useEffect(function(){return hu.push(o),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:y}),document.addEventListener("wheel",c,du),document.addEventListener("touchmove",c,du),document.addEventListener("touchstart",m,du),function(){hu=hu.filter(function(S){return S!==o}),document.removeEventListener("wheel",c,du),document.removeEventListener("touchmove",c,du),document.removeEventListener("touchstart",m,du)}},[]);var b=e.removeScrollBar,w=e.inert;return v.createElement(v.Fragment,null,w?v.createElement(o,{styles:gJ(i)}):null,b?v.createElement(sJ,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function bJ(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const xJ=WQ(m3,yJ);var PA=v.forwardRef(function(e,t){return v.createElement(Kg,Ji({},e,{ref:t,sideCar:xJ}))});PA.classNames=Kg.classNames;var wJ=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},mu=new WeakMap,Om=new WeakMap,Pm={},Y0=0,b3=function(e){return e&&(e.host||b3(e.parentNode))},SJ=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=b3(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},AJ=function(e,t,n,r){var i=SJ(t,Array.isArray(e)?e:[e]);Pm[n]||(Pm[n]=new WeakMap);var o=Pm[n],l=[],u=new Set,c=new Set(i),d=function(h){!h||u.has(h)||(u.add(h),d(h.parentNode))};i.forEach(d);var m=function(h){!h||c.has(h)||Array.prototype.forEach.call(h.children,function(y){if(u.has(y))m(y);else try{var b=y.getAttribute(r),w=b!==null&&b!=="false",S=(mu.get(y)||0)+1,C=(o.get(y)||0)+1;mu.set(y,S),o.set(y,C),l.push(y),S===1&&w&&Om.set(y,!0),C===1&&y.setAttribute(n,"true"),w||y.setAttribute(r,"true")}catch(E){console.error("aria-hidden: cannot operate on ",y,E)}})};return m(t),u.clear(),Y0++,function(){l.forEach(function(h){var y=mu.get(h)-1,b=o.get(h)-1;mu.set(h,y),o.set(h,b),y||(Om.has(h)||h.removeAttribute(r),Om.delete(h)),b||h.removeAttribute(n)}),Y0--,Y0||(mu=new WeakMap,mu=new WeakMap,Om=new WeakMap,Pm={})}},x3=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=wJ(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),AJ(r,i,n,"aria-hidden")):function(){return null}};function CJ(e){const t=EJ(e),n=v.forwardRef((r,i)=>{const{children:o,...l}=r,u=v.Children.toArray(o),c=u.find(TJ);if(c){const d=c.props.children,m=u.map(h=>h===c?v.Children.count(d)>1?v.Children.only(null):v.isValidElement(d)?d.props.children:null:h);return g.jsx(t,{...l,ref:i,children:v.isValidElement(d)?v.cloneElement(d,void 0,m):null})}return g.jsx(t,{...l,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}function EJ(e){const t=v.forwardRef((n,r)=>{const{children:i,...o}=n;if(v.isValidElement(i)){const l=PJ(i),u=OJ(o,i.props);return i.type!==v.Fragment&&(u.ref=r?ac(r,l):l),v.cloneElement(i,u)}return v.Children.count(i)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var jJ=Symbol("radix.slottable");function TJ(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===jJ}function OJ(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...u)=>{const c=o(...u);return i(...u),c}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function PJ(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Gg="Dialog",[w3]=Cl(Gg),[NJ,ki]=w3(Gg),S3=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:l=!0}=e,u=v.useRef(null),c=v.useRef(null),[d,m]=Vu({prop:r,defaultProp:i??!1,onChange:o,caller:Gg});return g.jsx(NJ,{scope:t,triggerRef:u,contentRef:c,contentId:Qa(),titleId:Qa(),descriptionId:Qa(),open:d,onOpenChange:m,onOpenToggle:v.useCallback(()=>m(h=>!h),[m]),modal:l,children:n})};S3.displayName=Gg;var A3="DialogTrigger",C3=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ki(A3,n),o=Mt(t,i.triggerRef);return g.jsx(Qe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":MA(i.open),...r,ref:o,onClick:Ve(e.onClick,i.onOpenToggle)})});C3.displayName=A3;var NA="DialogPortal",[_J,E3]=w3(NA,{forceMount:void 0}),j3=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=ki(NA,t);return g.jsx(_J,{scope:t,forceMount:n,children:v.Children.map(r,l=>g.jsx(El,{present:n||o.open,children:g.jsx(Hg,{asChild:!0,container:i,children:l})}))})};j3.displayName=NA;var Np="DialogOverlay",T3=v.forwardRef((e,t)=>{const n=E3(Np,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=ki(Np,e.__scopeDialog);return o.modal?g.jsx(El,{present:r||o.open,children:g.jsx(RJ,{...i,ref:t})}):null});T3.displayName=Np;var MJ=CJ("DialogOverlay.RemoveScroll"),RJ=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ki(Np,n);return g.jsx(PA,{as:MJ,allowPinchZoom:!0,shards:[i.contentRef],children:g.jsx(Qe.div,{"data-state":MA(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),fl="DialogContent",O3=v.forwardRef((e,t)=>{const n=E3(fl,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=ki(fl,e.__scopeDialog);return g.jsx(El,{present:r||o.open,children:o.modal?g.jsx(DJ,{...i,ref:t}):g.jsx(kJ,{...i,ref:t})})});O3.displayName=fl;var DJ=v.forwardRef((e,t)=>{const n=ki(fl,e.__scopeDialog),r=v.useRef(null),i=Mt(t,n.contentRef,r);return v.useEffect(()=>{const o=r.current;if(o)return x3(o)},[]),g.jsx(P3,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ve(e.onCloseAutoFocus,o=>{o.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Ve(e.onPointerDownOutside,o=>{const l=o.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0;(l.button===2||u)&&o.preventDefault()}),onFocusOutside:Ve(e.onFocusOutside,o=>o.preventDefault())})}),kJ=v.forwardRef((e,t)=>{const n=ki(fl,e.__scopeDialog),r=v.useRef(!1),i=v.useRef(!1);return g.jsx(P3,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||n.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=o.target;n.triggerRef.current?.contains(l)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),P3=v.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...l}=e,u=ki(fl,n),c=v.useRef(null),d=Mt(t,c);return f3(),g.jsxs(g.Fragment,{children:[g.jsx(OA,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:g.jsx(qg,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":MA(u.open),...l,ref:d,onDismiss:()=>u.onOpenChange(!1)})}),g.jsxs(g.Fragment,{children:[g.jsx(LJ,{titleId:u.titleId}),g.jsx(zJ,{contentRef:c,descriptionId:u.descriptionId})]})]})}),_A="DialogTitle",N3=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ki(_A,n);return g.jsx(Qe.h2,{id:i.titleId,...r,ref:t})});N3.displayName=_A;var _3="DialogDescription",M3=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ki(_3,n);return g.jsx(Qe.p,{id:i.descriptionId,...r,ref:t})});M3.displayName=_3;var R3="DialogClose",D3=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ki(R3,n);return g.jsx(Qe.button,{type:"button",...r,ref:t,onClick:Ve(e.onClick,()=>i.onOpenChange(!1))})});D3.displayName=R3;function MA(e){return e?"open":"closed"}var k3="DialogTitleWarning",[gSe,L3]=aQ(k3,{contentName:fl,titleName:_A,docsSlug:"dialog"}),LJ=({titleId:e})=>{const t=L3(k3),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
60
-
61
- If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
62
-
63
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return v.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},IJ="DialogDescriptionWarning",zJ=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${L3(IJ).contentName}}.`;return v.useEffect(()=>{const i=e.current?.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},I3=S3,z3=C3,$3=j3,B3=T3,U3=O3,V3=N3,$J=M3,F3=D3;function BJ({...e}){return g.jsx(I3,{"data-slot":"sheet",...e})}function UJ({...e}){return g.jsx(z3,{"data-slot":"sheet-trigger",...e})}function VJ({...e}){return g.jsx($3,{"data-slot":"sheet-portal",...e})}function FJ({className:e,...t}){return g.jsx(B3,{"data-slot":"sheet-overlay",className:de("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function qJ({className:e,children:t,side:n="right",...r}){return g.jsxs(VJ,{children:[g.jsx(FJ,{}),g.jsxs(U3,{"data-slot":"sheet-content",className:de("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",n==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",n==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",n==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",n==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",e),...r,children:[t,g.jsxs(F3,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none",children:[g.jsx(cI,{className:"size-4"}),g.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function HJ({className:e,...t}){return g.jsx("div",{"data-slot":"sheet-header",className:de("flex flex-col gap-1.5 p-4",e),...t})}function KJ({className:e,...t}){return g.jsx(V3,{"data-slot":"sheet-title",className:de("text-foreground font-semibold",e),...t})}function GJ(e){try{globalThis.localStorage.setItem(iI,e)}catch{}}const q3=v.createContext(null);function WJ({children:e}){const[t,n]=v.useState(()=>aI()),r=v.useCallback(o=>{n(o)},[]);v.useEffect(()=>{GJ(t)},[t]),v.useEffect(()=>{document.documentElement.lang=t,yt.changeLanguage(t)},[t]);const i=v.useMemo(()=>({locale:t,setLocale:r}),[t,r]);return g.jsx(q3.Provider,{value:i,children:e})}function YJ(){const e=v.useContext(q3);if(!e)throw new Error("useLocalePreference must be used within LocalePreferenceProvider");return e}function G_(e,[t,n]){return Math.min(n,Math.max(t,e))}function W_(e){const t=XJ(e),n=v.forwardRef((r,i)=>{const{children:o,...l}=r,u=v.Children.toArray(o),c=u.find(QJ);if(c){const d=c.props.children,m=u.map(h=>h===c?v.Children.count(d)>1?v.Children.only(null):v.isValidElement(d)?d.props.children:null:h);return g.jsx(t,{...l,ref:i,children:v.isValidElement(d)?v.cloneElement(d,void 0,m):null})}return g.jsx(t,{...l,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}function XJ(e){const t=v.forwardRef((n,r)=>{const{children:i,...o}=n;if(v.isValidElement(i)){const l=eee(i),u=JJ(o,i.props);return i.type!==v.Fragment&&(u.ref=r?ac(r,l):l),v.cloneElement(i,u)}return v.Children.count(i)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ZJ=Symbol("radix.slottable");function QJ(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ZJ}function JJ(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...u)=>{const c=o(...u);return i(...u),c}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function eee(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function H3(e){const t=e+"CollectionProvider",[n,r]=Cl(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=S=>{const{scope:C,children:E}=S,j=pe.useRef(null),T=pe.useRef(new Map).current;return g.jsx(i,{scope:C,itemMap:T,collectionRef:j,children:E})};l.displayName=t;const u=e+"CollectionSlot",c=W_(u),d=pe.forwardRef((S,C)=>{const{scope:E,children:j}=S,T=o(u,E),O=Mt(C,T.collectionRef);return g.jsx(c,{ref:O,children:j})});d.displayName=u;const m=e+"CollectionItemSlot",h="data-radix-collection-item",y=W_(m),b=pe.forwardRef((S,C)=>{const{scope:E,children:j,...T}=S,O=pe.useRef(null),N=Mt(C,O),_=o(m,E);return pe.useEffect(()=>(_.itemMap.set(O,{ref:O,...T}),()=>{_.itemMap.delete(O)})),g.jsx(y,{[h]:"",ref:N,children:j})});b.displayName=m;function w(S){const C=o(e+"CollectionConsumer",S);return pe.useCallback(()=>{const j=C.collectionRef.current;if(!j)return[];const T=Array.from(j.querySelectorAll(`[${h}]`));return Array.from(C.itemMap.values()).sort((_,M)=>T.indexOf(_.ref.current)-T.indexOf(M.ref.current))},[C.collectionRef,C.itemMap])}return[{Provider:l,Slot:d,ItemSlot:b},w,r]}var tee=v.createContext(void 0);function RA(e){const t=v.useContext(tee);return e||t||"ltr"}const nee=["top","right","bottom","left"],os=Math.min,Lr=Math.max,_p=Math.round,Nm=Math.floor,sa=e=>({x:e,y:e}),ree={left:"right",right:"left",bottom:"top",top:"bottom"},iee={start:"end",end:"start"};function p1(e,t,n){return Lr(e,os(t,n))}function ao(e,t){return typeof e=="function"?e(t):e}function oo(e){return e.split("-")[0]}function fc(e){return e.split("-")[1]}function DA(e){return e==="x"?"y":"x"}function kA(e){return e==="y"?"height":"width"}const aee=new Set(["top","bottom"]);function ta(e){return aee.has(oo(e))?"y":"x"}function LA(e){return DA(ta(e))}function oee(e,t,n){n===void 0&&(n=!1);const r=fc(e),i=LA(e),o=kA(i);let l=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=Mp(l)),[l,Mp(l)]}function see(e){const t=Mp(e);return[g1(e),t,g1(t)]}function g1(e){return e.replace(/start|end/g,t=>iee[t])}const Y_=["left","right"],X_=["right","left"],lee=["top","bottom"],uee=["bottom","top"];function cee(e,t,n){switch(e){case"top":case"bottom":return n?t?X_:Y_:t?Y_:X_;case"left":case"right":return t?lee:uee;default:return[]}}function fee(e,t,n,r){const i=fc(e);let o=cee(oo(e),n==="start",r);return i&&(o=o.map(l=>l+"-"+i),t&&(o=o.concat(o.map(g1)))),o}function Mp(e){return e.replace(/left|right|bottom|top/g,t=>ree[t])}function dee(e){return{top:0,right:0,bottom:0,left:0,...e}}function K3(e){return typeof e!="number"?dee(e):{top:e,right:e,bottom:e,left:e}}function Rp(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Z_(e,t,n){let{reference:r,floating:i}=e;const o=ta(t),l=LA(t),u=kA(l),c=oo(t),d=o==="y",m=r.x+r.width/2-i.width/2,h=r.y+r.height/2-i.height/2,y=r[u]/2-i[u]/2;let b;switch(c){case"top":b={x:m,y:r.y-i.height};break;case"bottom":b={x:m,y:r.y+r.height};break;case"right":b={x:r.x+r.width,y:h};break;case"left":b={x:r.x-i.width,y:h};break;default:b={x:r.x,y:r.y}}switch(fc(t)){case"start":b[l]-=y*(n&&d?-1:1);break;case"end":b[l]+=y*(n&&d?-1:1);break}return b}const hee=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:l}=n,u=o.filter(Boolean),c=await(l.isRTL==null?void 0:l.isRTL(t));let d=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:m,y:h}=Z_(d,r,c),y=r,b={},w=0;for(let S=0;S<u.length;S++){const{name:C,fn:E}=u[S],{x:j,y:T,data:O,reset:N}=await E({x:m,y:h,initialPlacement:r,placement:y,strategy:i,middlewareData:b,rects:d,platform:l,elements:{reference:e,floating:t}});m=j??m,h=T??h,b={...b,[C]:{...b[C],...O}},N&&w<=50&&(w++,typeof N=="object"&&(N.placement&&(y=N.placement),N.rects&&(d=N.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:i}):N.rects),{x:m,y:h}=Z_(d,y,c)),S=-1)}return{x:m,y:h,placement:y,strategy:i,middlewareData:b}};async function od(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:l,elements:u,strategy:c}=e,{boundary:d="clippingAncestors",rootBoundary:m="viewport",elementContext:h="floating",altBoundary:y=!1,padding:b=0}=ao(t,e),w=K3(b),C=u[y?h==="floating"?"reference":"floating":h],E=Rp(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(C)))==null||n?C:C.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(u.floating)),boundary:d,rootBoundary:m,strategy:c})),j=h==="floating"?{x:r,y:i,width:l.floating.width,height:l.floating.height}:l.reference,T=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u.floating)),O=await(o.isElement==null?void 0:o.isElement(T))?await(o.getScale==null?void 0:o.getScale(T))||{x:1,y:1}:{x:1,y:1},N=Rp(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:j,offsetParent:T,strategy:c}):j);return{top:(E.top-N.top+w.top)/O.y,bottom:(N.bottom-E.bottom+w.bottom)/O.y,left:(E.left-N.left+w.left)/O.x,right:(N.right-E.right+w.right)/O.x}}const mee=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:l,elements:u,middlewareData:c}=t,{element:d,padding:m=0}=ao(e,t)||{};if(d==null)return{};const h=K3(m),y={x:n,y:r},b=LA(i),w=kA(b),S=await l.getDimensions(d),C=b==="y",E=C?"top":"left",j=C?"bottom":"right",T=C?"clientHeight":"clientWidth",O=o.reference[w]+o.reference[b]-y[b]-o.floating[w],N=y[b]-o.reference[b],_=await(l.getOffsetParent==null?void 0:l.getOffsetParent(d));let M=_?_[T]:0;(!M||!await(l.isElement==null?void 0:l.isElement(_)))&&(M=u.floating[T]||o.floating[w]);const R=O/2-N/2,I=M/2-S[w]/2-1,$=os(h[E],I),F=os(h[j],I),z=$,Y=M-S[w]-F,Q=M/2-S[w]/2+R,se=p1(z,Q,Y),L=!c.arrow&&fc(i)!=null&&Q!==se&&o.reference[w]/2-(Q<z?$:F)-S[w]/2<0,q=L?Q<z?Q-z:Q-Y:0;return{[b]:y[b]+q,data:{[b]:se,centerOffset:Q-se-q,...L&&{alignmentOffset:q}},reset:L}}}),pee=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:l,initialPlacement:u,platform:c,elements:d}=t,{mainAxis:m=!0,crossAxis:h=!0,fallbackPlacements:y,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:S=!0,...C}=ao(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const E=oo(i),j=ta(u),T=oo(u)===u,O=await(c.isRTL==null?void 0:c.isRTL(d.floating)),N=y||(T||!S?[Mp(u)]:see(u)),_=w!=="none";!y&&_&&N.push(...fee(u,S,w,O));const M=[u,...N],R=await od(t,C),I=[];let $=((r=o.flip)==null?void 0:r.overflows)||[];if(m&&I.push(R[E]),h){const Q=oee(i,l,O);I.push(R[Q[0]],R[Q[1]])}if($=[...$,{placement:i,overflows:I}],!I.every(Q=>Q<=0)){var F,z;const Q=(((F=o.flip)==null?void 0:F.index)||0)+1,se=M[Q];if(se&&(!(h==="alignment"?j!==ta(se):!1)||$.every(B=>ta(B.placement)===j?B.overflows[0]>0:!0)))return{data:{index:Q,overflows:$},reset:{placement:se}};let L=(z=$.filter(q=>q.overflows[0]<=0).sort((q,B)=>q.overflows[1]-B.overflows[1])[0])==null?void 0:z.placement;if(!L)switch(b){case"bestFit":{var Y;const q=(Y=$.filter(B=>{if(_){const ae=ta(B.placement);return ae===j||ae==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(ae=>ae>0).reduce((ae,G)=>ae+G,0)]).sort((B,ae)=>B[1]-ae[1])[0])==null?void 0:Y[0];q&&(L=q);break}case"initialPlacement":L=u;break}if(i!==L)return{reset:{placement:L}}}return{}}}};function Q_(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function J_(e){return nee.some(t=>e[t]>=0)}const gee=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=ao(e,t);switch(r){case"referenceHidden":{const o=await od(t,{...i,elementContext:"reference"}),l=Q_(o,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:J_(l)}}}case"escaped":{const o=await od(t,{...i,altBoundary:!0}),l=Q_(o,n.floating);return{data:{escapedOffsets:l,escaped:J_(l)}}}default:return{}}}}},G3=new Set(["left","top"]);async function vee(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),l=oo(n),u=fc(n),c=ta(n)==="y",d=G3.has(l)?-1:1,m=o&&c?-1:1,h=ao(t,e);let{mainAxis:y,crossAxis:b,alignmentAxis:w}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return u&&typeof w=="number"&&(b=u==="end"?w*-1:w),c?{x:b*m,y:y*d}:{x:y*d,y:b*m}}const yee=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:l,middlewareData:u}=t,c=await vee(t,e);return l===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:o+c.y,data:{...c,placement:l}}}}},bee=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:l=!1,limiter:u={fn:C=>{let{x:E,y:j}=C;return{x:E,y:j}}},...c}=ao(e,t),d={x:n,y:r},m=await od(t,c),h=ta(oo(i)),y=DA(h);let b=d[y],w=d[h];if(o){const C=y==="y"?"top":"left",E=y==="y"?"bottom":"right",j=b+m[C],T=b-m[E];b=p1(j,b,T)}if(l){const C=h==="y"?"top":"left",E=h==="y"?"bottom":"right",j=w+m[C],T=w-m[E];w=p1(j,w,T)}const S=u.fn({...t,[y]:b,[h]:w});return{...S,data:{x:S.x-n,y:S.y-r,enabled:{[y]:o,[h]:l}}}}}},xee=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:l}=t,{offset:u=0,mainAxis:c=!0,crossAxis:d=!0}=ao(e,t),m={x:n,y:r},h=ta(i),y=DA(h);let b=m[y],w=m[h];const S=ao(u,t),C=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(c){const T=y==="y"?"height":"width",O=o.reference[y]-o.floating[T]+C.mainAxis,N=o.reference[y]+o.reference[T]-C.mainAxis;b<O?b=O:b>N&&(b=N)}if(d){var E,j;const T=y==="y"?"width":"height",O=G3.has(oo(i)),N=o.reference[h]-o.floating[T]+(O&&((E=l.offset)==null?void 0:E[h])||0)+(O?0:C.crossAxis),_=o.reference[h]+o.reference[T]+(O?0:((j=l.offset)==null?void 0:j[h])||0)-(O?C.crossAxis:0);w<N?w=N:w>_&&(w=_)}return{[y]:b,[h]:w}}}},wee=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:l,elements:u}=t,{apply:c=()=>{},...d}=ao(e,t),m=await od(t,d),h=oo(i),y=fc(i),b=ta(i)==="y",{width:w,height:S}=o.floating;let C,E;h==="top"||h==="bottom"?(C=h,E=y===(await(l.isRTL==null?void 0:l.isRTL(u.floating))?"start":"end")?"left":"right"):(E=h,C=y==="end"?"top":"bottom");const j=S-m.top-m.bottom,T=w-m.left-m.right,O=os(S-m[C],j),N=os(w-m[E],T),_=!t.middlewareData.shift;let M=O,R=N;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=T),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(M=j),_&&!y){const $=Lr(m.left,0),F=Lr(m.right,0),z=Lr(m.top,0),Y=Lr(m.bottom,0);b?R=w-2*($!==0||F!==0?$+F:Lr(m.left,m.right)):M=S-2*(z!==0||Y!==0?z+Y:Lr(m.top,m.bottom))}await c({...t,availableWidth:R,availableHeight:M});const I=await l.getDimensions(u.floating);return w!==I.width||S!==I.height?{reset:{rects:!0}}:{}}}};function Wg(){return typeof window<"u"}function dc(e){return W3(e)?(e.nodeName||"").toLowerCase():"#document"}function $r(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ba(e){var t;return(t=(W3(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function W3(e){return Wg()?e instanceof Node||e instanceof $r(e).Node:!1}function Ni(e){return Wg()?e instanceof Element||e instanceof $r(e).Element:!1}function da(e){return Wg()?e instanceof HTMLElement||e instanceof $r(e).HTMLElement:!1}function eM(e){return!Wg()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof $r(e).ShadowRoot}const See=new Set(["inline","contents"]);function Ld(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=_i(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!See.has(i)}const Aee=new Set(["table","td","th"]);function Cee(e){return Aee.has(dc(e))}const Eee=[":popover-open",":modal"];function Yg(e){return Eee.some(t=>{try{return e.matches(t)}catch{return!1}})}const jee=["transform","translate","scale","rotate","perspective"],Tee=["transform","translate","scale","rotate","perspective","filter"],Oee=["paint","layout","strict","content"];function IA(e){const t=zA(),n=Ni(e)?_i(e):e;return jee.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Tee.some(r=>(n.willChange||"").includes(r))||Oee.some(r=>(n.contain||"").includes(r))}function Pee(e){let t=ss(e);for(;da(t)&&!Fu(t);){if(IA(t))return t;if(Yg(t))return null;t=ss(t)}return null}function zA(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Nee=new Set(["html","body","#document"]);function Fu(e){return Nee.has(dc(e))}function _i(e){return $r(e).getComputedStyle(e)}function Xg(e){return Ni(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ss(e){if(dc(e)==="html")return e;const t=e.assignedSlot||e.parentNode||eM(e)&&e.host||ba(e);return eM(t)?t.host:t}function Y3(e){const t=ss(e);return Fu(t)?e.ownerDocument?e.ownerDocument.body:e.body:da(t)&&Ld(t)?t:Y3(t)}function sd(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Y3(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),l=$r(i);if(o){const u=v1(l);return t.concat(l,l.visualViewport||[],Ld(i)?i:[],u&&n?sd(u):[])}return t.concat(i,sd(i,[],n))}function v1(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function X3(e){const t=_i(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=da(e),o=i?e.offsetWidth:n,l=i?e.offsetHeight:r,u=_p(n)!==o||_p(r)!==l;return u&&(n=o,r=l),{width:n,height:r,$:u}}function $A(e){return Ni(e)?e:e.contextElement}function Lu(e){const t=$A(e);if(!da(t))return sa(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=X3(t);let l=(o?_p(n.width):n.width)/r,u=(o?_p(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!u||!Number.isFinite(u))&&(u=1),{x:l,y:u}}const _ee=sa(0);function Z3(e){const t=$r(e);return!zA()||!t.visualViewport?_ee:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Mee(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==$r(e)?!1:t}function dl(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=$A(e);let l=sa(1);t&&(r?Ni(r)&&(l=Lu(r)):l=Lu(e));const u=Mee(o,n,r)?Z3(o):sa(0);let c=(i.left+u.x)/l.x,d=(i.top+u.y)/l.y,m=i.width/l.x,h=i.height/l.y;if(o){const y=$r(o),b=r&&Ni(r)?$r(r):r;let w=y,S=v1(w);for(;S&&r&&b!==w;){const C=Lu(S),E=S.getBoundingClientRect(),j=_i(S),T=E.left+(S.clientLeft+parseFloat(j.paddingLeft))*C.x,O=E.top+(S.clientTop+parseFloat(j.paddingTop))*C.y;c*=C.x,d*=C.y,m*=C.x,h*=C.y,c+=T,d+=O,w=$r(S),S=v1(w)}}return Rp({width:m,height:h,x:c,y:d})}function Zg(e,t){const n=Xg(e).scrollLeft;return t?t.left+n:dl(ba(e)).left+n}function Q3(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Zg(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function Ree(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",l=ba(r),u=t?Yg(t.floating):!1;if(r===l||u&&o)return n;let c={scrollLeft:0,scrollTop:0},d=sa(1);const m=sa(0),h=da(r);if((h||!h&&!o)&&((dc(r)!=="body"||Ld(l))&&(c=Xg(r)),da(r))){const b=dl(r);d=Lu(r),m.x=b.x+r.clientLeft,m.y=b.y+r.clientTop}const y=l&&!h&&!o?Q3(l,c):sa(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-c.scrollLeft*d.x+m.x+y.x,y:n.y*d.y-c.scrollTop*d.y+m.y+y.y}}function Dee(e){return Array.from(e.getClientRects())}function kee(e){const t=ba(e),n=Xg(e),r=e.ownerDocument.body,i=Lr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Lr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+Zg(e);const u=-n.scrollTop;return _i(r).direction==="rtl"&&(l+=Lr(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:l,y:u}}const tM=25;function Lee(e,t){const n=$r(e),r=ba(e),i=n.visualViewport;let o=r.clientWidth,l=r.clientHeight,u=0,c=0;if(i){o=i.width,l=i.height;const m=zA();(!m||m&&t==="fixed")&&(u=i.offsetLeft,c=i.offsetTop)}const d=Zg(r);if(d<=0){const m=r.ownerDocument,h=m.body,y=getComputedStyle(h),b=m.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,w=Math.abs(r.clientWidth-h.clientWidth-b);w<=tM&&(o-=w)}else d<=tM&&(o+=d);return{width:o,height:l,x:u,y:c}}const Iee=new Set(["absolute","fixed"]);function zee(e,t){const n=dl(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=da(e)?Lu(e):sa(1),l=e.clientWidth*o.x,u=e.clientHeight*o.y,c=i*o.x,d=r*o.y;return{width:l,height:u,x:c,y:d}}function nM(e,t,n){let r;if(t==="viewport")r=Lee(e,n);else if(t==="document")r=kee(ba(e));else if(Ni(t))r=zee(t,n);else{const i=Z3(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Rp(r)}function J3(e,t){const n=ss(e);return n===t||!Ni(n)||Fu(n)?!1:_i(n).position==="fixed"||J3(n,t)}function $ee(e,t){const n=t.get(e);if(n)return n;let r=sd(e,[],!1).filter(u=>Ni(u)&&dc(u)!=="body"),i=null;const o=_i(e).position==="fixed";let l=o?ss(e):e;for(;Ni(l)&&!Fu(l);){const u=_i(l),c=IA(l);!c&&u.position==="fixed"&&(i=null),(o?!c&&!i:!c&&u.position==="static"&&!!i&&Iee.has(i.position)||Ld(l)&&!c&&J3(e,l))?r=r.filter(m=>m!==l):i=u,l=ss(l)}return t.set(e,r),r}function Bee(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const l=[...n==="clippingAncestors"?Yg(t)?[]:$ee(t,this._c):[].concat(n),r],u=l[0],c=l.reduce((d,m)=>{const h=nM(t,m,i);return d.top=Lr(h.top,d.top),d.right=os(h.right,d.right),d.bottom=os(h.bottom,d.bottom),d.left=Lr(h.left,d.left),d},nM(t,u,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Uee(e){const{width:t,height:n}=X3(e);return{width:t,height:n}}function Vee(e,t,n){const r=da(t),i=ba(t),o=n==="fixed",l=dl(e,!0,o,t);let u={scrollLeft:0,scrollTop:0};const c=sa(0);function d(){c.x=Zg(i)}if(r||!r&&!o)if((dc(t)!=="body"||Ld(i))&&(u=Xg(t)),r){const b=dl(t,!0,o,t);c.x=b.x+t.clientLeft,c.y=b.y+t.clientTop}else i&&d();o&&!r&&i&&d();const m=i&&!r&&!o?Q3(i,u):sa(0),h=l.left+u.scrollLeft-c.x-m.x,y=l.top+u.scrollTop-c.y-m.y;return{x:h,y,width:l.width,height:l.height}}function X0(e){return _i(e).position==="static"}function rM(e,t){if(!da(e)||_i(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ba(e)===n&&(n=n.ownerDocument.body),n}function e5(e,t){const n=$r(e);if(Yg(e))return n;if(!da(e)){let i=ss(e);for(;i&&!Fu(i);){if(Ni(i)&&!X0(i))return i;i=ss(i)}return n}let r=rM(e,t);for(;r&&Cee(r)&&X0(r);)r=rM(r,t);return r&&Fu(r)&&X0(r)&&!IA(r)?n:r||Pee(e)||n}const Fee=async function(e){const t=this.getOffsetParent||e5,n=this.getDimensions,r=await n(e.floating);return{reference:Vee(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function qee(e){return _i(e).direction==="rtl"}const Hee={convertOffsetParentRelativeRectToViewportRelativeRect:Ree,getDocumentElement:ba,getClippingRect:Bee,getOffsetParent:e5,getElementRects:Fee,getClientRects:Dee,getDimensions:Uee,getScale:Lu,isElement:Ni,isRTL:qee};function t5(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Kee(e,t){let n=null,r;const i=ba(e);function o(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function l(u,c){u===void 0&&(u=!1),c===void 0&&(c=1),o();const d=e.getBoundingClientRect(),{left:m,top:h,width:y,height:b}=d;if(u||t(),!y||!b)return;const w=Nm(h),S=Nm(i.clientWidth-(m+y)),C=Nm(i.clientHeight-(h+b)),E=Nm(m),T={rootMargin:-w+"px "+-S+"px "+-C+"px "+-E+"px",threshold:Lr(0,os(1,c))||1};let O=!0;function N(_){const M=_[0].intersectionRatio;if(M!==c){if(!O)return l();M?l(!1,M):r=setTimeout(()=>{l(!1,1e-7)},1e3)}M===1&&!t5(d,e.getBoundingClientRect())&&l(),O=!1}try{n=new IntersectionObserver(N,{...T,root:i.ownerDocument})}catch{n=new IntersectionObserver(N,T)}n.observe(e)}return l(!0),o}function Gee(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,d=$A(e),m=i||o?[...d?sd(d):[],...sd(t)]:[];m.forEach(E=>{i&&E.addEventListener("scroll",n,{passive:!0}),o&&E.addEventListener("resize",n)});const h=d&&u?Kee(d,n):null;let y=-1,b=null;l&&(b=new ResizeObserver(E=>{let[j]=E;j&&j.target===d&&b&&(b.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var T;(T=b)==null||T.observe(t)})),n()}),d&&!c&&b.observe(d),b.observe(t));let w,S=c?dl(e):null;c&&C();function C(){const E=dl(e);S&&!t5(S,E)&&n(),S=E,w=requestAnimationFrame(C)}return n(),()=>{var E;m.forEach(j=>{i&&j.removeEventListener("scroll",n),o&&j.removeEventListener("resize",n)}),h?.(),(E=b)==null||E.disconnect(),b=null,c&&cancelAnimationFrame(w)}}const Wee=yee,Yee=bee,Xee=pee,Zee=wee,Qee=gee,iM=mee,Jee=xee,ete=(e,t,n)=>{const r=new Map,i={platform:Hee,...n},o={...i.platform,_c:r};return hee(e,t,{...i,platform:o})};var tte=typeof document<"u",nte=function(){},lp=tte?v.useLayoutEffect:nte;function Dp(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Dp(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!Dp(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function n5(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function aM(e,t){const n=n5(e);return Math.round(t*n)/n}function Z0(e){const t=v.useRef(e);return lp(()=>{t.current=e}),t}function rte(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:l}={},transform:u=!0,whileElementsMounted:c,open:d}=e,[m,h]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[y,b]=v.useState(r);Dp(y,r)||b(r);const[w,S]=v.useState(null),[C,E]=v.useState(null),j=v.useCallback(B=>{B!==_.current&&(_.current=B,S(B))},[]),T=v.useCallback(B=>{B!==M.current&&(M.current=B,E(B))},[]),O=o||w,N=l||C,_=v.useRef(null),M=v.useRef(null),R=v.useRef(m),I=c!=null,$=Z0(c),F=Z0(i),z=Z0(d),Y=v.useCallback(()=>{if(!_.current||!M.current)return;const B={placement:t,strategy:n,middleware:y};F.current&&(B.platform=F.current),ete(_.current,M.current,B).then(ae=>{const G={...ae,isPositioned:z.current!==!1};Q.current&&!Dp(R.current,G)&&(R.current=G,cs.flushSync(()=>{h(G)}))})},[y,t,n,F,z]);lp(()=>{d===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,h(B=>({...B,isPositioned:!1})))},[d]);const Q=v.useRef(!1);lp(()=>(Q.current=!0,()=>{Q.current=!1}),[]),lp(()=>{if(O&&(_.current=O),N&&(M.current=N),O&&N){if($.current)return $.current(O,N,Y);Y()}},[O,N,Y,$,I]);const se=v.useMemo(()=>({reference:_,floating:M,setReference:j,setFloating:T}),[j,T]),L=v.useMemo(()=>({reference:O,floating:N}),[O,N]),q=v.useMemo(()=>{const B={position:n,left:0,top:0};if(!L.floating)return B;const ae=aM(L.floating,m.x),G=aM(L.floating,m.y);return u?{...B,transform:"translate("+ae+"px, "+G+"px)",...n5(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ae,top:G}},[n,u,L.floating,m.x,m.y]);return v.useMemo(()=>({...m,update:Y,refs:se,elements:L,floatingStyles:q}),[m,Y,se,L,q])}const ite=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?iM({element:r.current,padding:i}).fn(n):{}:r?iM({element:r,padding:i}).fn(n):{}}}},ate=(e,t)=>({...Wee(e),options:[e,t]}),ote=(e,t)=>({...Yee(e),options:[e,t]}),ste=(e,t)=>({...Jee(e),options:[e,t]}),lte=(e,t)=>({...Xee(e),options:[e,t]}),ute=(e,t)=>({...Zee(e),options:[e,t]}),cte=(e,t)=>({...Qee(e),options:[e,t]}),fte=(e,t)=>({...ite(e),options:[e,t]});var dte="Arrow",r5=v.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return g.jsx(Qe.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:g.jsx("polygon",{points:"0,0 30,0 15,10"})})});r5.displayName=dte;var hte=r5;function mte(e){const[t,n]=v.useState(void 0);return Gn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let l,u;if("borderBoxSize"in o){const c=o.borderBoxSize,d=Array.isArray(c)?c[0]:c;l=d.inlineSize,u=d.blockSize}else l=e.offsetWidth,u=e.offsetHeight;n({width:l,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var BA="Popper",[i5,Qg]=Cl(BA),[pte,a5]=i5(BA),o5=e=>{const{__scopePopper:t,children:n}=e,[r,i]=v.useState(null);return g.jsx(pte,{scope:t,anchor:r,onAnchorChange:i,children:n})};o5.displayName=BA;var s5="PopperAnchor",l5=v.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=a5(s5,n),l=v.useRef(null),u=Mt(t,l),c=v.useRef(null);return v.useEffect(()=>{const d=c.current;c.current=r?.current||l.current,d!==c.current&&o.onAnchorChange(c.current)}),r?null:g.jsx(Qe.div,{...i,ref:u})});l5.displayName=s5;var UA="PopperContent",[gte,vte]=i5(UA),u5=v.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:l=0,arrowPadding:u=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:m=0,sticky:h="partial",hideWhenDetached:y=!1,updatePositionStrategy:b="optimized",onPlaced:w,...S}=e,C=a5(UA,n),[E,j]=v.useState(null),T=Mt(t,X=>j(X)),[O,N]=v.useState(null),_=mte(O),M=_?.width??0,R=_?.height??0,I=r+(o!=="center"?"-"+o:""),$=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},F=Array.isArray(d)?d:[d],z=F.length>0,Y={padding:$,boundary:F.filter(bte),altBoundary:z},{refs:Q,floatingStyles:se,placement:L,isPositioned:q,middlewareData:B}=rte({strategy:"fixed",placement:I,whileElementsMounted:(...X)=>Gee(...X,{animationFrame:b==="always"}),elements:{reference:C.anchor},middleware:[ate({mainAxis:i+R,alignmentAxis:l}),c&&ote({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?ste():void 0,...Y}),c&&lte({...Y}),ute({...Y,apply:({elements:X,rects:me,availableWidth:oe,availableHeight:le})=>{const{width:ve,height:re}=me.reference,ze=X.floating.style;ze.setProperty("--radix-popper-available-width",`${oe}px`),ze.setProperty("--radix-popper-available-height",`${le}px`),ze.setProperty("--radix-popper-anchor-width",`${ve}px`),ze.setProperty("--radix-popper-anchor-height",`${re}px`)}}),O&&fte({element:O,padding:u}),xte({arrowWidth:M,arrowHeight:R}),y&&cte({strategy:"referenceHidden",...Y})]}),[ae,G]=d5(L),D=as(w);Gn(()=>{q&&D?.()},[q,D]);const V=B.arrow?.x,K=B.arrow?.y,ee=B.arrow?.centerOffset!==0,[he,ye]=v.useState();return Gn(()=>{E&&ye(window.getComputedStyle(E).zIndex)},[E]),g.jsx("div",{ref:Q.setFloating,"data-radix-popper-content-wrapper":"",style:{...se,transform:q?se.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:he,"--radix-popper-transform-origin":[B.transformOrigin?.x,B.transformOrigin?.y].join(" "),...B.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:g.jsx(gte,{scope:n,placedSide:ae,onArrowChange:N,arrowX:V,arrowY:K,shouldHideArrow:ee,children:g.jsx(Qe.div,{"data-side":ae,"data-align":G,...S,ref:T,style:{...S.style,animation:q?void 0:"none"}})})})});u5.displayName=UA;var c5="PopperArrow",yte={top:"bottom",right:"left",bottom:"top",left:"right"},f5=v.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=vte(c5,r),l=yte[o.placedSide];return g.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:g.jsx(hte,{...i,ref:n,style:{...i.style,display:"block"}})})});f5.displayName=c5;function bte(e){return e!==null}var xte=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:i}=t,l=i.arrow?.centerOffset!==0,u=l?0:e.arrowWidth,c=l?0:e.arrowHeight,[d,m]=d5(n),h={start:"0%",center:"50%",end:"100%"}[m],y=(i.arrow?.x??0)+u/2,b=(i.arrow?.y??0)+c/2;let w="",S="";return d==="bottom"?(w=l?h:`${y}px`,S=`${-c}px`):d==="top"?(w=l?h:`${y}px`,S=`${r.floating.height+c}px`):d==="right"?(w=`${-c}px`,S=l?h:`${b}px`):d==="left"&&(w=`${r.floating.width+c}px`,S=l?h:`${b}px`),{data:{x:w,y:S}}}});function d5(e){const[t,n="center"]=e.split("-");return[t,n]}var h5=o5,m5=l5,p5=u5,g5=f5;function wte(e){const t=Ste(e),n=v.forwardRef((r,i)=>{const{children:o,...l}=r,u=v.Children.toArray(o),c=u.find(Cte);if(c){const d=c.props.children,m=u.map(h=>h===c?v.Children.count(d)>1?v.Children.only(null):v.isValidElement(d)?d.props.children:null:h);return g.jsx(t,{...l,ref:i,children:v.isValidElement(d)?v.cloneElement(d,void 0,m):null})}return g.jsx(t,{...l,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}function Ste(e){const t=v.forwardRef((n,r)=>{const{children:i,...o}=n;if(v.isValidElement(i)){const l=jte(i),u=Ete(o,i.props);return i.type!==v.Fragment&&(u.ref=r?ac(r,l):l),v.cloneElement(i,u)}return v.Children.count(i)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ate=Symbol("radix.slottable");function Cte(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ate}function Ete(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...u)=>{const c=o(...u);return i(...u),c}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function jte(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Tte(e){const t=v.useRef({value:e,previous:e});return v.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var v5=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Ote="VisuallyHidden",y5=v.forwardRef((e,t)=>g.jsx(Qe.span,{...e,ref:t,style:{...v5,...e.style}}));y5.displayName=Ote;var Pte=y5,Nte=[" ","Enter","ArrowUp","ArrowDown"],_te=[" ","Enter"],hl="Select",[Jg,ev,Mte]=H3(hl),[hc]=Cl(hl,[Mte,Qg]),tv=Qg(),[Rte,ds]=hc(hl),[Dte,kte]=hc(hl),b5=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:o,value:l,defaultValue:u,onValueChange:c,dir:d,name:m,autoComplete:h,disabled:y,required:b,form:w}=e,S=tv(t),[C,E]=v.useState(null),[j,T]=v.useState(null),[O,N]=v.useState(!1),_=RA(d),[M,R]=Vu({prop:r,defaultProp:i??!1,onChange:o,caller:hl}),[I,$]=Vu({prop:l,defaultProp:u,onChange:c,caller:hl}),F=v.useRef(null),z=C?w||!!C.closest("form"):!0,[Y,Q]=v.useState(new Set),se=Array.from(Y).map(L=>L.props.value).join(";");return g.jsx(h5,{...S,children:g.jsxs(Rte,{required:b,scope:t,trigger:C,onTriggerChange:E,valueNode:j,onValueNodeChange:T,valueNodeHasChildren:O,onValueNodeHasChildrenChange:N,contentId:Qa(),value:I,onValueChange:$,open:M,onOpenChange:R,dir:_,triggerPointerDownPosRef:F,disabled:y,children:[g.jsx(Jg.Provider,{scope:t,children:g.jsx(Dte,{scope:e.__scopeSelect,onNativeOptionAdd:v.useCallback(L=>{Q(q=>new Set(q).add(L))},[]),onNativeOptionRemove:v.useCallback(L=>{Q(q=>{const B=new Set(q);return B.delete(L),B})},[]),children:n})}),z?g.jsxs(U5,{"aria-hidden":!0,required:b,tabIndex:-1,name:m,autoComplete:h,value:I,onChange:L=>$(L.target.value),disabled:y,form:w,children:[I===void 0?g.jsx("option",{value:""}):null,Array.from(Y)]},se):null]})})};b5.displayName=hl;var x5="SelectTrigger",w5=v.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,o=tv(n),l=ds(x5,n),u=l.disabled||r,c=Mt(t,l.onTriggerChange),d=ev(n),m=v.useRef("touch"),[h,y,b]=F5(S=>{const C=d().filter(T=>!T.disabled),E=C.find(T=>T.value===l.value),j=q5(C,S,E);j!==void 0&&l.onValueChange(j.value)}),w=S=>{u||(l.onOpenChange(!0),b()),S&&(l.triggerPointerDownPosRef.current={x:Math.round(S.pageX),y:Math.round(S.pageY)})};return g.jsx(m5,{asChild:!0,...o,children:g.jsx(Qe.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":V5(l.value)?"":void 0,...i,ref:c,onClick:Ve(i.onClick,S=>{S.currentTarget.focus(),m.current!=="mouse"&&w(S)}),onPointerDown:Ve(i.onPointerDown,S=>{m.current=S.pointerType;const C=S.target;C.hasPointerCapture(S.pointerId)&&C.releasePointerCapture(S.pointerId),S.button===0&&S.ctrlKey===!1&&S.pointerType==="mouse"&&(w(S),S.preventDefault())}),onKeyDown:Ve(i.onKeyDown,S=>{const C=h.current!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&y(S.key),!(C&&S.key===" ")&&Nte.includes(S.key)&&(w(),S.preventDefault())})})})});w5.displayName=x5;var S5="SelectValue",A5=v.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:o,placeholder:l="",...u}=e,c=ds(S5,n),{onValueNodeHasChildrenChange:d}=c,m=o!==void 0,h=Mt(t,c.onValueNodeChange);return Gn(()=>{d(m)},[d,m]),g.jsx(Qe.span,{...u,ref:h,style:{pointerEvents:"none"},children:V5(c.value)?g.jsx(g.Fragment,{children:l}):o})});A5.displayName=S5;var Lte="SelectIcon",C5=v.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return g.jsx(Qe.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});C5.displayName=Lte;var Ite="SelectPortal",E5=e=>g.jsx(Hg,{asChild:!0,...e});E5.displayName=Ite;var ml="SelectContent",j5=v.forwardRef((e,t)=>{const n=ds(ml,e.__scopeSelect),[r,i]=v.useState();if(Gn(()=>{i(new DocumentFragment)},[]),!n.open){const o=r;return o?cs.createPortal(g.jsx(T5,{scope:e.__scopeSelect,children:g.jsx(Jg.Slot,{scope:e.__scopeSelect,children:g.jsx("div",{children:e.children})})}),o):null}return g.jsx(O5,{...e,ref:t})});j5.displayName=ml;var Ci=10,[T5,hs]=hc(ml),zte="SelectContentImpl",$te=wte("SelectContent.RemoveScroll"),O5=v.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:o,onPointerDownOutside:l,side:u,sideOffset:c,align:d,alignOffset:m,arrowPadding:h,collisionBoundary:y,collisionPadding:b,sticky:w,hideWhenDetached:S,avoidCollisions:C,...E}=e,j=ds(ml,n),[T,O]=v.useState(null),[N,_]=v.useState(null),M=Mt(t,X=>O(X)),[R,I]=v.useState(null),[$,F]=v.useState(null),z=ev(n),[Y,Q]=v.useState(!1),se=v.useRef(!1);v.useEffect(()=>{if(T)return x3(T)},[T]),f3();const L=v.useCallback(X=>{const[me,...oe]=z().map(re=>re.ref.current),[le]=oe.slice(-1),ve=document.activeElement;for(const re of X)if(re===ve||(re?.scrollIntoView({block:"nearest"}),re===me&&N&&(N.scrollTop=0),re===le&&N&&(N.scrollTop=N.scrollHeight),re?.focus(),document.activeElement!==ve))return},[z,N]),q=v.useCallback(()=>L([R,T]),[L,R,T]);v.useEffect(()=>{Y&&q()},[Y,q]);const{onOpenChange:B,triggerPointerDownPosRef:ae}=j;v.useEffect(()=>{if(T){let X={x:0,y:0};const me=le=>{X={x:Math.abs(Math.round(le.pageX)-(ae.current?.x??0)),y:Math.abs(Math.round(le.pageY)-(ae.current?.y??0))}},oe=le=>{X.x<=10&&X.y<=10?le.preventDefault():T.contains(le.target)||B(!1),document.removeEventListener("pointermove",me),ae.current=null};return ae.current!==null&&(document.addEventListener("pointermove",me),document.addEventListener("pointerup",oe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",me),document.removeEventListener("pointerup",oe,{capture:!0})}}},[T,B,ae]),v.useEffect(()=>{const X=()=>B(!1);return window.addEventListener("blur",X),window.addEventListener("resize",X),()=>{window.removeEventListener("blur",X),window.removeEventListener("resize",X)}},[B]);const[G,D]=F5(X=>{const me=z().filter(ve=>!ve.disabled),oe=me.find(ve=>ve.ref.current===document.activeElement),le=q5(me,X,oe);le&&setTimeout(()=>le.ref.current.focus())}),V=v.useCallback((X,me,oe)=>{const le=!se.current&&!oe;(j.value!==void 0&&j.value===me||le)&&(I(X),le&&(se.current=!0))},[j.value]),K=v.useCallback(()=>T?.focus(),[T]),ee=v.useCallback((X,me,oe)=>{const le=!se.current&&!oe;(j.value!==void 0&&j.value===me||le)&&F(X)},[j.value]),he=r==="popper"?y1:P5,ye=he===y1?{side:u,sideOffset:c,align:d,alignOffset:m,arrowPadding:h,collisionBoundary:y,collisionPadding:b,sticky:w,hideWhenDetached:S,avoidCollisions:C}:{};return g.jsx(T5,{scope:n,content:T,viewport:N,onViewportChange:_,itemRefCallback:V,selectedItem:R,onItemLeave:K,itemTextRefCallback:ee,focusSelectedItem:q,selectedItemText:$,position:r,isPositioned:Y,searchRef:G,children:g.jsx(PA,{as:$te,allowPinchZoom:!0,children:g.jsx(OA,{asChild:!0,trapped:j.open,onMountAutoFocus:X=>{X.preventDefault()},onUnmountAutoFocus:Ve(i,X=>{j.trigger?.focus({preventScroll:!0}),X.preventDefault()}),children:g.jsx(qg,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:X=>X.preventDefault(),onDismiss:()=>j.onOpenChange(!1),children:g.jsx(he,{role:"listbox",id:j.contentId,"data-state":j.open?"open":"closed",dir:j.dir,onContextMenu:X=>X.preventDefault(),...E,...ye,onPlaced:()=>Q(!0),ref:M,style:{display:"flex",flexDirection:"column",outline:"none",...E.style},onKeyDown:Ve(E.onKeyDown,X=>{const me=X.ctrlKey||X.altKey||X.metaKey;if(X.key==="Tab"&&X.preventDefault(),!me&&X.key.length===1&&D(X.key),["ArrowUp","ArrowDown","Home","End"].includes(X.key)){let le=z().filter(ve=>!ve.disabled).map(ve=>ve.ref.current);if(["ArrowUp","End"].includes(X.key)&&(le=le.slice().reverse()),["ArrowUp","ArrowDown"].includes(X.key)){const ve=X.target,re=le.indexOf(ve);le=le.slice(re+1)}setTimeout(()=>L(le)),X.preventDefault()}})})})})})})});O5.displayName=zte;var Bte="SelectItemAlignedPosition",P5=v.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,o=ds(ml,n),l=hs(ml,n),[u,c]=v.useState(null),[d,m]=v.useState(null),h=Mt(t,M=>m(M)),y=ev(n),b=v.useRef(!1),w=v.useRef(!0),{viewport:S,selectedItem:C,selectedItemText:E,focusSelectedItem:j}=l,T=v.useCallback(()=>{if(o.trigger&&o.valueNode&&u&&d&&S&&C&&E){const M=o.trigger.getBoundingClientRect(),R=d.getBoundingClientRect(),I=o.valueNode.getBoundingClientRect(),$=E.getBoundingClientRect();if(o.dir!=="rtl"){const ve=$.left-R.left,re=I.left-ve,ze=M.left-re,Ee=M.width+ze,Le=Math.max(Ee,R.width),ot=window.innerWidth-Ci,Dt=G_(re,[Ci,Math.max(Ci,ot-Le)]);u.style.minWidth=Ee+"px",u.style.left=Dt+"px"}else{const ve=R.right-$.right,re=window.innerWidth-I.right-ve,ze=window.innerWidth-M.right-re,Ee=M.width+ze,Le=Math.max(Ee,R.width),ot=window.innerWidth-Ci,Dt=G_(re,[Ci,Math.max(Ci,ot-Le)]);u.style.minWidth=Ee+"px",u.style.right=Dt+"px"}const F=y(),z=window.innerHeight-Ci*2,Y=S.scrollHeight,Q=window.getComputedStyle(d),se=parseInt(Q.borderTopWidth,10),L=parseInt(Q.paddingTop,10),q=parseInt(Q.borderBottomWidth,10),B=parseInt(Q.paddingBottom,10),ae=se+L+Y+B+q,G=Math.min(C.offsetHeight*5,ae),D=window.getComputedStyle(S),V=parseInt(D.paddingTop,10),K=parseInt(D.paddingBottom,10),ee=M.top+M.height/2-Ci,he=z-ee,ye=C.offsetHeight/2,X=C.offsetTop+ye,me=se+L+X,oe=ae-me;if(me<=ee){const ve=F.length>0&&C===F[F.length-1].ref.current;u.style.bottom="0px";const re=d.clientHeight-S.offsetTop-S.offsetHeight,ze=Math.max(he,ye+(ve?K:0)+re+q),Ee=me+ze;u.style.height=Ee+"px"}else{const ve=F.length>0&&C===F[0].ref.current;u.style.top="0px";const ze=Math.max(ee,se+S.offsetTop+(ve?V:0)+ye)+oe;u.style.height=ze+"px",S.scrollTop=me-ee+S.offsetTop}u.style.margin=`${Ci}px 0`,u.style.minHeight=G+"px",u.style.maxHeight=z+"px",r?.(),requestAnimationFrame(()=>b.current=!0)}},[y,o.trigger,o.valueNode,u,d,S,C,E,o.dir,r]);Gn(()=>T(),[T]);const[O,N]=v.useState();Gn(()=>{d&&N(window.getComputedStyle(d).zIndex)},[d]);const _=v.useCallback(M=>{M&&w.current===!0&&(T(),j?.(),w.current=!1)},[T,j]);return g.jsx(Vte,{scope:n,contentWrapper:u,shouldExpandOnScrollRef:b,onScrollButtonChange:_,children:g.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:O},children:g.jsx(Qe.div,{...i,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});P5.displayName=Bte;var Ute="SelectPopperPosition",y1=v.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=Ci,...o}=e,l=tv(n);return g.jsx(p5,{...l,...o,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});y1.displayName=Ute;var[Vte,VA]=hc(ml,{}),b1="SelectViewport",N5=v.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,o=hs(b1,n),l=VA(b1,n),u=Mt(t,o.onViewportChange),c=v.useRef(0);return g.jsxs(g.Fragment,{children:[g.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),g.jsx(Jg.Slot,{scope:n,children:g.jsx(Qe.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Ve(i.onScroll,d=>{const m=d.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:y}=l;if(y?.current&&h){const b=Math.abs(c.current-m.scrollTop);if(b>0){const w=window.innerHeight-Ci*2,S=parseFloat(h.style.minHeight),C=parseFloat(h.style.height),E=Math.max(S,C);if(E<w){const j=E+b,T=Math.min(w,j),O=j-T;h.style.height=T+"px",h.style.bottom==="0px"&&(m.scrollTop=O>0?O:0,h.style.justifyContent="flex-end")}}}c.current=m.scrollTop})})})]})});N5.displayName=b1;var _5="SelectGroup",[Fte,qte]=hc(_5),Hte=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Qa();return g.jsx(Fte,{scope:n,id:i,children:g.jsx(Qe.div,{role:"group","aria-labelledby":i,...r,ref:t})})});Hte.displayName=_5;var M5="SelectLabel",Kte=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=qte(M5,n);return g.jsx(Qe.div,{id:i.id,...r,ref:t})});Kte.displayName=M5;var kp="SelectItem",[Gte,R5]=hc(kp),D5=v.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:o,...l}=e,u=ds(kp,n),c=hs(kp,n),d=u.value===r,[m,h]=v.useState(o??""),[y,b]=v.useState(!1),w=Mt(t,j=>c.itemRefCallback?.(j,r,i)),S=Qa(),C=v.useRef("touch"),E=()=>{i||(u.onValueChange(r),u.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return g.jsx(Gte,{scope:n,value:r,disabled:i,textId:S,isSelected:d,onItemTextChange:v.useCallback(j=>{h(T=>T||(j?.textContent??"").trim())},[]),children:g.jsx(Jg.ItemSlot,{scope:n,value:r,disabled:i,textValue:m,children:g.jsx(Qe.div,{role:"option","aria-labelledby":S,"data-highlighted":y?"":void 0,"aria-selected":d&&y,"data-state":d?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...l,ref:w,onFocus:Ve(l.onFocus,()=>b(!0)),onBlur:Ve(l.onBlur,()=>b(!1)),onClick:Ve(l.onClick,()=>{C.current!=="mouse"&&E()}),onPointerUp:Ve(l.onPointerUp,()=>{C.current==="mouse"&&E()}),onPointerDown:Ve(l.onPointerDown,j=>{C.current=j.pointerType}),onPointerMove:Ve(l.onPointerMove,j=>{C.current=j.pointerType,i?c.onItemLeave?.():C.current==="mouse"&&j.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ve(l.onPointerLeave,j=>{j.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:Ve(l.onKeyDown,j=>{c.searchRef?.current!==""&&j.key===" "||(_te.includes(j.key)&&E(),j.key===" "&&j.preventDefault())})})})})});D5.displayName=kp;var Lf="SelectItemText",k5=v.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...o}=e,l=ds(Lf,n),u=hs(Lf,n),c=R5(Lf,n),d=kte(Lf,n),[m,h]=v.useState(null),y=Mt(t,E=>h(E),c.onItemTextChange,E=>u.itemTextRefCallback?.(E,c.value,c.disabled)),b=m?.textContent,w=v.useMemo(()=>g.jsx("option",{value:c.value,disabled:c.disabled,children:b},c.value),[c.disabled,c.value,b]),{onNativeOptionAdd:S,onNativeOptionRemove:C}=d;return Gn(()=>(S(w),()=>C(w)),[S,C,w]),g.jsxs(g.Fragment,{children:[g.jsx(Qe.span,{id:c.textId,...o,ref:y}),c.isSelected&&l.valueNode&&!l.valueNodeHasChildren?cs.createPortal(o.children,l.valueNode):null]})});k5.displayName=Lf;var L5="SelectItemIndicator",I5=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return R5(L5,n).isSelected?g.jsx(Qe.span,{"aria-hidden":!0,...r,ref:t}):null});I5.displayName=L5;var x1="SelectScrollUpButton",z5=v.forwardRef((e,t)=>{const n=hs(x1,e.__scopeSelect),r=VA(x1,e.__scopeSelect),[i,o]=v.useState(!1),l=Mt(t,r.onScrollButtonChange);return Gn(()=>{if(n.viewport&&n.isPositioned){let u=function(){const d=c.scrollTop>0;o(d)};const c=n.viewport;return u(),c.addEventListener("scroll",u),()=>c.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),i?g.jsx(B5,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:c}=n;u&&c&&(u.scrollTop=u.scrollTop-c.offsetHeight)}}):null});z5.displayName=x1;var w1="SelectScrollDownButton",$5=v.forwardRef((e,t)=>{const n=hs(w1,e.__scopeSelect),r=VA(w1,e.__scopeSelect),[i,o]=v.useState(!1),l=Mt(t,r.onScrollButtonChange);return Gn(()=>{if(n.viewport&&n.isPositioned){let u=function(){const d=c.scrollHeight-c.clientHeight,m=Math.ceil(c.scrollTop)<d;o(m)};const c=n.viewport;return u(),c.addEventListener("scroll",u),()=>c.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),i?g.jsx(B5,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:c}=n;u&&c&&(u.scrollTop=u.scrollTop+c.offsetHeight)}}):null});$5.displayName=w1;var B5=v.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,o=hs("SelectScrollButton",n),l=v.useRef(null),u=ev(n),c=v.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return v.useEffect(()=>()=>c(),[c]),Gn(()=>{u().find(m=>m.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[u]),g.jsx(Qe.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Ve(i.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(r,50))}),onPointerMove:Ve(i.onPointerMove,()=>{o.onItemLeave?.(),l.current===null&&(l.current=window.setInterval(r,50))}),onPointerLeave:Ve(i.onPointerLeave,()=>{c()})})}),Wte="SelectSeparator",Yte=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return g.jsx(Qe.div,{"aria-hidden":!0,...r,ref:t})});Yte.displayName=Wte;var S1="SelectArrow",Xte=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=tv(n),o=ds(S1,n),l=hs(S1,n);return o.open&&l.position==="popper"?g.jsx(g5,{...i,...r,ref:t}):null});Xte.displayName=S1;var Zte="SelectBubbleInput",U5=v.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const i=v.useRef(null),o=Mt(r,i),l=Tte(t);return v.useEffect(()=>{const u=i.current;if(!u)return;const c=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(c,"value").set;if(l!==t&&m){const h=new Event("change",{bubbles:!0});m.call(u,t),u.dispatchEvent(h)}},[l,t]),g.jsx(Qe.select,{...n,style:{...v5,...n.style},ref:o,defaultValue:t})});U5.displayName=Zte;function V5(e){return e===""||e===void 0}function F5(e){const t=as(e),n=v.useRef(""),r=v.useRef(0),i=v.useCallback(l=>{const u=n.current+l;t(u),(function c(d){n.current=d,window.clearTimeout(r.current),d!==""&&(r.current=window.setTimeout(()=>c(""),1e3))})(u)},[t]),o=v.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,o]}function q5(e,t,n){const i=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let l=Qte(e,Math.max(o,0));i.length===1&&(l=l.filter(d=>d!==n));const c=l.find(d=>d.textValue.toLowerCase().startsWith(i.toLowerCase()));return c!==n?c:void 0}function Qte(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Jte=b5,ene=w5,tne=A5,nne=C5,rne=E5,ine=j5,ane=N5,one=D5,sne=k5,lne=I5,une=z5,cne=$5;function zn({...e}){return g.jsx(Jte,{"data-slot":"select",...e})}function $n({...e}){return g.jsx(tne,{"data-slot":"select-value",...e})}function Bn({className:e,size:t="default",children:n,...r}){return g.jsxs(ene,{"data-slot":"select-trigger","data-size":t,className:de("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[n,g.jsx(nne,{asChild:!0,children:g.jsx(FS,{className:"size-4 opacity-50"})})]})}function Un({className:e,children:t,position:n="item-aligned",align:r="center",...i}){return g.jsx(rne,{children:g.jsxs(ine,{"data-slot":"select-content",className:de("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,align:r,...i,children:[g.jsx(fne,{}),g.jsx(ane,{className:de("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),g.jsx(dne,{})]})})}function Oe({className:e,children:t,...n}){return g.jsxs(one,{"data-slot":"select-item",className:de("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_span:last-child]:flex [&_span:last-child]:items-center [&_span:last-child]:gap-2",e),...n,children:[g.jsx("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:g.jsx(lne,{children:g.jsx(HK,{className:"size-4"})})}),g.jsx(sne,{children:t})]})}function fne({className:e,...t}){return g.jsx(une,{"data-slot":"select-scroll-up-button",className:de("flex cursor-default items-center justify-center py-1",e),...t,children:g.jsx(XK,{className:"size-4"})})}function dne({className:e,...t}){return g.jsx(cne,{"data-slot":"select-scroll-down-button",className:de("flex cursor-default items-center justify-center py-1",e),...t,children:g.jsx(FS,{className:"size-4"})})}function hne(){const{t:e}=Ye(),{locale:t,setLocale:n}=YJ();return g.jsxs(zn,{value:t,onValueChange:r=>n(Fw(r)),children:[g.jsxs(Bn,{size:"sm",className:"w-[8.5rem]","aria-label":e("app.language"),children:[g.jsx(i7,{className:"size-4"}),g.jsx($n,{})]}),g.jsxs(Un,{align:"end",children:[g.jsx(Oe,{value:"en-US",children:e("locale.enUS")}),g.jsx(Oe,{value:"zh-CN",children:e("locale.zhCN")})]})]})}function mne({theme:e}){return e==="light"?g.jsx(w7,{className:"size-4"}):e==="dark"?g.jsx(m7,{className:"size-4"}):g.jsx(u7,{className:"size-4"})}function pne(){const{t:e}=Ye(),{theme:t,setTheme:n}=KL();return g.jsxs(zn,{value:t??"system",onValueChange:n,children:[g.jsxs(Bn,{size:"sm",className:"w-[8.5rem]","aria-label":e("theme.label"),children:[g.jsx(mne,{theme:t}),g.jsx($n,{})]}),g.jsxs(Un,{align:"end",children:[g.jsx(Oe,{value:"system",children:e("theme.system")}),g.jsx(Oe,{value:"light",children:e("theme.light")}),g.jsx(Oe,{value:"dark",children:e("theme.dark")})]})]})}function gne(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const vne=e=>{switch(e){case"success":return xne;case"info":return Sne;case"warning":return wne;case"error":return Ane;default:return null}},yne=Array(12).fill(0),bne=({visible:e,className:t})=>pe.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},pe.createElement("div",{className:"sonner-spinner"},yne.map((n,r)=>pe.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),xne=pe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},pe.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),wne=pe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},pe.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Sne=pe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},pe.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Ane=pe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},pe.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Cne=pe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},pe.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),pe.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Ene=()=>{const[e,t]=pe.useState(document.hidden);return pe.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let A1=1;class jne{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...i}=t,o=typeof t?.id=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:A1++,l=this.toasts.find(c=>c.id===o),u=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),l?this.toasts=this.toasts.map(c=>c.id===o?(this.publish({...c,...t,id:o,title:r}),{...c,...t,id:o,dismissible:u,title:r}):c):this.addToast({title:r,...i,dismissible:u,id:o}),o},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const i=Promise.resolve(t instanceof Function?t():t);let o=r!==void 0,l;const u=i.then(async d=>{if(l=["resolve",d],pe.isValidElement(d))o=!1,this.create({id:r,type:"default",message:d});else if(One(d)&&!d.ok){o=!1;const h=typeof n.error=="function"?await n.error(`HTTP error! status: ${d.status}`):n.error,y=typeof n.description=="function"?await n.description(`HTTP error! status: ${d.status}`):n.description,w=typeof h=="object"&&!pe.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:y,...w})}else if(d instanceof Error){o=!1;const h=typeof n.error=="function"?await n.error(d):n.error,y=typeof n.description=="function"?await n.description(d):n.description,w=typeof h=="object"&&!pe.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:y,...w})}else if(n.success!==void 0){o=!1;const h=typeof n.success=="function"?await n.success(d):n.success,y=typeof n.description=="function"?await n.description(d):n.description,w=typeof h=="object"&&!pe.isValidElement(h)?h:{message:h};this.create({id:r,type:"success",description:y,...w})}}).catch(async d=>{if(l=["reject",d],n.error!==void 0){o=!1;const m=typeof n.error=="function"?await n.error(d):n.error,h=typeof n.description=="function"?await n.description(d):n.description,b=typeof m=="object"&&!pe.isValidElement(m)?m:{message:m};this.create({id:r,type:"error",description:h,...b})}}).finally(()=>{o&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),c=()=>new Promise((d,m)=>u.then(()=>l[0]==="reject"?m(l[1]):d(l[1])).catch(m));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(t,n)=>{const r=n?.id||A1++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const vr=new jne,Tne=(e,t)=>{const n=t?.id||A1++;return vr.addToast({title:e,...t,id:n}),n},One=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Pne=Tne,Nne=()=>vr.toasts,_ne=()=>vr.getActiveToasts(),Lt=Object.assign(Pne,{success:vr.success,info:vr.info,warning:vr.warning,error:vr.error,custom:vr.custom,message:vr.message,promise:vr.promise,dismiss:vr.dismiss,loading:vr.loading},{getHistory:Nne,getToasts:_ne});gne("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function _m(e){return e.label!==void 0}const Mne=3,Rne="24px",Dne="16px",oM=4e3,kne=356,Lne=14,Ine=45,zne=200;function Gi(...e){return e.filter(Boolean).join(" ")}function $ne(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const Bne=e=>{var t,n,r,i,o,l,u,c,d;const{invert:m,toast:h,unstyled:y,interacting:b,setHeights:w,visibleToasts:S,heights:C,index:E,toasts:j,expanded:T,removeToast:O,defaultRichColors:N,closeButton:_,style:M,cancelButtonStyle:R,actionButtonStyle:I,className:$="",descriptionClassName:F="",duration:z,position:Y,gap:Q,expandByDefault:se,classNames:L,icons:q,closeButtonAriaLabel:B="Close toast"}=e,[ae,G]=pe.useState(null),[D,V]=pe.useState(null),[K,ee]=pe.useState(!1),[he,ye]=pe.useState(!1),[X,me]=pe.useState(!1),[oe,le]=pe.useState(!1),[ve,re]=pe.useState(!1),[ze,Ee]=pe.useState(0),[Le,ot]=pe.useState(0),Dt=pe.useRef(h.duration||z||oM),Hr=pe.useRef(null),En=pe.useRef(null),$i=E===0,xa=E+1<=S,Gt=h.type,Kr=h.dismissible!==!1,Wt=h.className||"",gs=h.descriptionClassName||"",gi=pe.useMemo(()=>C.findIndex(we=>we.toastId===h.id)||0,[C,h.id]),bo=pe.useMemo(()=>{var we;return(we=h.closeButton)!=null?we:_},[h.closeButton,_]),vi=pe.useMemo(()=>h.duration||z||oM,[h.duration,z]),wa=pe.useRef(0),Er=pe.useRef(0),Sa=pe.useRef(0),Zn=pe.useRef(null),[lr,Yt]=Y.split("-"),Qn=pe.useMemo(()=>C.reduce((we,st,lt)=>lt>=gi?we:we+st.height,0),[C,gi]),Xt=Ene(),vs=h.invert||m,Aa=Gt==="loading";Er.current=pe.useMemo(()=>gi*Q+Qn,[gi,Qn]),pe.useEffect(()=>{Dt.current=vi},[vi]),pe.useEffect(()=>{ee(!0)},[]),pe.useEffect(()=>{const we=En.current;if(we){const st=we.getBoundingClientRect().height;return ot(st),w(lt=>[{toastId:h.id,height:st,position:h.position},...lt]),()=>w(lt=>lt.filter(wt=>wt.toastId!==h.id))}},[w,h.id]),pe.useLayoutEffect(()=>{if(!K)return;const we=En.current,st=we.style.height;we.style.height="auto";const lt=we.getBoundingClientRect().height;we.style.height=st,ot(lt),w(wt=>wt.find($e=>$e.toastId===h.id)?wt.map($e=>$e.toastId===h.id?{...$e,height:lt}:$e):[{toastId:h.id,height:lt,position:h.position},...wt])},[K,h.title,h.description,w,h.id,h.jsx,h.action,h.cancel]);const ur=pe.useCallback(()=>{ye(!0),Ee(Er.current),w(we=>we.filter(st=>st.toastId!==h.id)),setTimeout(()=>{O(h)},zne)},[h,O,w,Er]);pe.useEffect(()=>{if(h.promise&&Gt==="loading"||h.duration===1/0||h.type==="loading")return;let we;return T||b||Xt?(()=>{if(Sa.current<wa.current){const wt=new Date().getTime()-wa.current;Dt.current=Dt.current-wt}Sa.current=new Date().getTime()})():Dt.current!==1/0&&(wa.current=new Date().getTime(),we=setTimeout(()=>{h.onAutoClose==null||h.onAutoClose.call(h,h),ur()},Dt.current)),()=>clearTimeout(we)},[T,b,h,Gt,Xt,ur]),pe.useEffect(()=>{h.delete&&(ur(),h.onDismiss==null||h.onDismiss.call(h,h))},[ur,h.delete]);function Bi(){var we;if(q?.loading){var st;return pe.createElement("div",{className:Gi(L?.loader,h==null||(st=h.classNames)==null?void 0:st.loader,"sonner-loader"),"data-visible":Gt==="loading"},q.loading)}return pe.createElement(bne,{className:Gi(L?.loader,h==null||(we=h.classNames)==null?void 0:we.loader),visible:Gt==="loading"})}const Ui=h.icon||q?.[Gt]||vne(Gt);var yi,cr;return pe.createElement("li",{tabIndex:0,ref:En,className:Gi($,Wt,L?.toast,h==null||(t=h.classNames)==null?void 0:t.toast,L?.default,L?.[Gt],h==null||(n=h.classNames)==null?void 0:n[Gt]),"data-sonner-toast":"","data-rich-colors":(yi=h.richColors)!=null?yi:N,"data-styled":!(h.jsx||h.unstyled||y),"data-mounted":K,"data-promise":!!h.promise,"data-swiped":ve,"data-removed":he,"data-visible":xa,"data-y-position":lr,"data-x-position":Yt,"data-index":E,"data-front":$i,"data-swiping":X,"data-dismissible":Kr,"data-type":Gt,"data-invert":vs,"data-swipe-out":oe,"data-swipe-direction":D,"data-expanded":!!(T||se&&K),"data-testid":h.testId,style:{"--index":E,"--toasts-before":E,"--z-index":j.length-E,"--offset":`${he?ze:Er.current}px`,"--initial-height":se?"auto":`${Le}px`,...M,...h.style},onDragEnd:()=>{me(!1),G(null),Zn.current=null},onPointerDown:we=>{we.button!==2&&(Aa||!Kr||(Hr.current=new Date,Ee(Er.current),we.target.setPointerCapture(we.pointerId),we.target.tagName!=="BUTTON"&&(me(!0),Zn.current={x:we.clientX,y:we.clientY})))},onPointerUp:()=>{var we,st,lt;if(oe||!Kr)return;Zn.current=null;const wt=Number(((we=En.current)==null?void 0:we.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),jr=Number(((st=En.current)==null?void 0:st.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),$e=new Date().getTime()-((lt=Hr.current)==null?void 0:lt.getTime()),Ft=ae==="x"?wt:jr,Ca=Math.abs(Ft)/$e;if(Math.abs(Ft)>=Ine||Ca>.11){Ee(Er.current),h.onDismiss==null||h.onDismiss.call(h,h),V(ae==="x"?wt>0?"right":"left":jr>0?"down":"up"),ur(),le(!0);return}else{var jn,Fn;(jn=En.current)==null||jn.style.setProperty("--swipe-amount-x","0px"),(Fn=En.current)==null||Fn.style.setProperty("--swipe-amount-y","0px")}re(!1),me(!1),G(null)},onPointerMove:we=>{var st,lt,wt;if(!Zn.current||!Kr||((st=window.getSelection())==null?void 0:st.toString().length)>0)return;const $e=we.clientY-Zn.current.y,Ft=we.clientX-Zn.current.x;var Ca;const jn=(Ca=e.swipeDirections)!=null?Ca:$ne(Y);!ae&&(Math.abs(Ft)>1||Math.abs($e)>1)&&G(Math.abs(Ft)>Math.abs($e)?"x":"y");let Fn={x:0,y:0};const xo=Tr=>1/(1.5+Math.abs(Tr)/20);if(ae==="y"){if(jn.includes("top")||jn.includes("bottom"))if(jn.includes("top")&&$e<0||jn.includes("bottom")&&$e>0)Fn.y=$e;else{const Tr=$e*xo($e);Fn.y=Math.abs(Tr)<Math.abs($e)?Tr:$e}}else if(ae==="x"&&(jn.includes("left")||jn.includes("right")))if(jn.includes("left")&&Ft<0||jn.includes("right")&&Ft>0)Fn.x=Ft;else{const Tr=Ft*xo(Ft);Fn.x=Math.abs(Tr)<Math.abs(Ft)?Tr:Ft}(Math.abs(Fn.x)>0||Math.abs(Fn.y)>0)&&re(!0),(lt=En.current)==null||lt.style.setProperty("--swipe-amount-x",`${Fn.x}px`),(wt=En.current)==null||wt.style.setProperty("--swipe-amount-y",`${Fn.y}px`)}},bo&&!h.jsx&&Gt!=="loading"?pe.createElement("button",{"aria-label":B,"data-disabled":Aa,"data-close-button":!0,onClick:Aa||!Kr?()=>{}:()=>{ur(),h.onDismiss==null||h.onDismiss.call(h,h)},className:Gi(L?.closeButton,h==null||(r=h.classNames)==null?void 0:r.closeButton)},(cr=q?.close)!=null?cr:Cne):null,(Gt||h.icon||h.promise)&&h.icon!==null&&(q?.[Gt]!==null||h.icon)?pe.createElement("div",{"data-icon":"",className:Gi(L?.icon,h==null||(i=h.classNames)==null?void 0:i.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||Bi():null,h.type!=="loading"?Ui:null):null,pe.createElement("div",{"data-content":"",className:Gi(L?.content,h==null||(o=h.classNames)==null?void 0:o.content)},pe.createElement("div",{"data-title":"",className:Gi(L?.title,h==null||(l=h.classNames)==null?void 0:l.title)},h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title),h.description?pe.createElement("div",{"data-description":"",className:Gi(F,gs,L?.description,h==null||(u=h.classNames)==null?void 0:u.description)},typeof h.description=="function"?h.description():h.description):null),pe.isValidElement(h.cancel)?h.cancel:h.cancel&&_m(h.cancel)?pe.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||R,onClick:we=>{_m(h.cancel)&&Kr&&(h.cancel.onClick==null||h.cancel.onClick.call(h.cancel,we),ur())},className:Gi(L?.cancelButton,h==null||(c=h.classNames)==null?void 0:c.cancelButton)},h.cancel.label):null,pe.isValidElement(h.action)?h.action:h.action&&_m(h.action)?pe.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||I,onClick:we=>{_m(h.action)&&(h.action.onClick==null||h.action.onClick.call(h.action,we),!we.defaultPrevented&&ur())},className:Gi(L?.actionButton,h==null||(d=h.classNames)==null?void 0:d.actionButton)},h.action.label):null)};function sM(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function Une(e,t){const n={};return[e,t].forEach((r,i)=>{const o=i===1,l=o?"--mobile-offset":"--offset",u=o?Dne:Rne;function c(d){["top","right","bottom","left"].forEach(m=>{n[`${l}-${m}`]=typeof d=="number"?`${d}px`:d})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(d=>{r[d]===void 0?n[`${l}-${d}`]=u:n[`${l}-${d}`]=typeof r[d]=="number"?`${r[d]}px`:r[d]}):c(u)}),n}const Vne=pe.forwardRef(function(t,n){const{id:r,invert:i,position:o="bottom-right",hotkey:l=["altKey","KeyT"],expand:u,closeButton:c,className:d,offset:m,mobileOffset:h,theme:y="light",richColors:b,duration:w,style:S,visibleToasts:C=Mne,toastOptions:E,dir:j=sM(),gap:T=Lne,icons:O,containerAriaLabel:N="Notifications"}=t,[_,M]=pe.useState([]),R=pe.useMemo(()=>r?_.filter(K=>K.toasterId===r):_.filter(K=>!K.toasterId),[_,r]),I=pe.useMemo(()=>Array.from(new Set([o].concat(R.filter(K=>K.position).map(K=>K.position)))),[R,o]),[$,F]=pe.useState([]),[z,Y]=pe.useState(!1),[Q,se]=pe.useState(!1),[L,q]=pe.useState(y!=="system"?y:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),B=pe.useRef(null),ae=l.join("+").replace(/Key/g,"").replace(/Digit/g,""),G=pe.useRef(null),D=pe.useRef(!1),V=pe.useCallback(K=>{M(ee=>{var he;return(he=ee.find(ye=>ye.id===K.id))!=null&&he.delete||vr.dismiss(K.id),ee.filter(({id:ye})=>ye!==K.id)})},[]);return pe.useEffect(()=>vr.subscribe(K=>{if(K.dismiss){requestAnimationFrame(()=>{M(ee=>ee.map(he=>he.id===K.id?{...he,delete:!0}:he))});return}setTimeout(()=>{qL.flushSync(()=>{M(ee=>{const he=ee.findIndex(ye=>ye.id===K.id);return he!==-1?[...ee.slice(0,he),{...ee[he],...K},...ee.slice(he+1)]:[K,...ee]})})})}),[_]),pe.useEffect(()=>{if(y!=="system"){q(y);return}if(y==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?q("dark"):q("light")),typeof window>"u")return;const K=window.matchMedia("(prefers-color-scheme: dark)");try{K.addEventListener("change",({matches:ee})=>{q(ee?"dark":"light")})}catch{K.addListener(({matches:he})=>{try{q(he?"dark":"light")}catch(ye){console.error(ye)}})}},[y]),pe.useEffect(()=>{_.length<=1&&Y(!1)},[_]),pe.useEffect(()=>{const K=ee=>{var he;if(l.every(me=>ee[me]||ee.code===me)){var X;Y(!0),(X=B.current)==null||X.focus()}ee.code==="Escape"&&(document.activeElement===B.current||(he=B.current)!=null&&he.contains(document.activeElement))&&Y(!1)};return document.addEventListener("keydown",K),()=>document.removeEventListener("keydown",K)},[l]),pe.useEffect(()=>{if(B.current)return()=>{G.current&&(G.current.focus({preventScroll:!0}),G.current=null,D.current=!1)}},[B.current]),pe.createElement("section",{ref:n,"aria-label":`${N} ${ae}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},I.map((K,ee)=>{var he;const[ye,X]=K.split("-");return R.length?pe.createElement("ol",{key:K,dir:j==="auto"?sM():j,tabIndex:-1,ref:B,className:d,"data-sonner-toaster":!0,"data-sonner-theme":L,"data-y-position":ye,"data-x-position":X,style:{"--front-toast-height":`${((he=$[0])==null?void 0:he.height)||0}px`,"--width":`${kne}px`,"--gap":`${T}px`,...S,...Une(m,h)},onBlur:me=>{D.current&&!me.currentTarget.contains(me.relatedTarget)&&(D.current=!1,G.current&&(G.current.focus({preventScroll:!0}),G.current=null))},onFocus:me=>{me.target instanceof HTMLElement&&me.target.dataset.dismissible==="false"||D.current||(D.current=!0,G.current=me.relatedTarget)},onMouseEnter:()=>Y(!0),onMouseMove:()=>Y(!0),onMouseLeave:()=>{Q||Y(!1)},onDragEnd:()=>Y(!1),onPointerDown:me=>{me.target instanceof HTMLElement&&me.target.dataset.dismissible==="false"||se(!0)},onPointerUp:()=>se(!1)},R.filter(me=>!me.position&&ee===0||me.position===K).map((me,oe)=>{var le,ve;return pe.createElement(Bne,{key:me.id,icons:O,index:oe,toast:me,defaultRichColors:b,duration:(le=E?.duration)!=null?le:w,className:E?.className,descriptionClassName:E?.descriptionClassName,invert:i,visibleToasts:C,closeButton:(ve=E?.closeButton)!=null?ve:c,interacting:Q,position:K,style:E?.style,unstyled:E?.unstyled,classNames:E?.classNames,cancelButtonStyle:E?.cancelButtonStyle,actionButtonStyle:E?.actionButtonStyle,closeButtonAriaLabel:E?.closeButtonAriaLabel,removeToast:V,toasts:R.filter(re=>re.position==me.position),heights:$.filter(re=>re.position==me.position),setHeights:F,expandByDefault:u,gap:T,expanded:z,swipeDirections:t.swipeDirections})})):null}))}),Qs="adminToken";function C1(){if(typeof window>"u")return"";try{const e=window.localStorage.getItem(Qs)||"";if(e)return e;const t=window.sessionStorage.getItem(Qs)||"";if(t)return window.localStorage.setItem(Qs,t),window.sessionStorage.removeItem(Qs),t}catch{}return""}function lM(e){if(!(typeof window>"u"))try{const t=e.trim();t?window.localStorage.setItem(Qs,t):window.localStorage.removeItem(Qs),window.sessionStorage.removeItem(Qs)}catch{}}const H5=v.createContext(null);function Fne({children:e}){const[t,n]=v.useState(()=>C1()),r=v.useMemo(()=>({token:t,setToken:i=>{lM(i),n(C1())},clearToken:()=>{lM(""),n("")}}),[t]);return g.jsx(H5.Provider,{value:r,children:e})}function qne(){const e=v.useContext(H5);if(!e)throw new Error("useAdminToken must be used within <AdminTokenProvider />");return e}const E1="admin-ui:admin-token-required";function K5(e){const{is_subagent:t,...n}=e;let r=null;return t===1?r=!0:t===0&&(r=!1),{...n,is_subagent:r}}class di extends Error{status;responseText;constructor(t,n){super(`HTTP ${t}: ${n}`),this.name="AdminApiError",this.status=t,this.responseText=n}}function uM(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}async function ar(e,t,n){const r=n?.trim()??C1(),i=new Headers(t?.headers??void 0);r&&i.set("x-admin-token",r),t?.body&&!i.has("content-type")&&i.set("content-type","application/json");const o=await fetch(e,{...t,headers:i});if(!o.ok){const l=await o.text().catch(()=>"");let u=l;try{const c=JSON.parse(l);if(uM(c)&&"error"in c){const d=c.error;uM(d)&&typeof d.message=="string"&&(u=d.message)}}catch{}throw(o.status===401||o.status===403)&&typeof window<"u"&&window.dispatchEvent(new Event(E1)),new di(o.status,u)}return await o.json()}async function j1(e){return ar("/api/admin/meta",void 0,e)}async function Hne(e){const t=new URLSearchParams;return t.set("since_ms",String(e.sinceMs)),t.set("include_stats","1"),ar(`/api/admin/accounts?${t.toString()}`)}async function Kne(e){const t=new URLSearchParams;e.account_id&&t.set("account_id",e.account_id),e.upstream_model&&t.set("upstream_model",e.upstream_model),e.client_model&&t.set("client_model",e.client_model),e.upstream_endpoint&&t.set("upstream_endpoint",e.upstream_endpoint),e.path&&t.set("path",e.path),e.status&&t.set("status",e.status),e.has_error&&t.set("has_error",e.has_error),e.from_ms&&t.set("from_ms",e.from_ms),e.to_ms&&t.set("to_ms",e.to_ms),t.set("limit",String(e.limit??50)),e.cursor_id!=null&&t.set("cursor_id",String(e.cursor_id));const n=await ar(`/api/admin/requests?${t.toString()}`);return{...n,items:n.items.map(K5)}}async function Q0(e){const t=await ar(`/api/admin/requests/${encodeURIComponent(e)}`);return{item:t.item?K5(t.item):null}}async function Gne(){return ar("/api/admin/config")}async function Wne(e){return ar("/api/admin/config",{method:"POST",body:JSON.stringify(e)})}async function Yne(){return ar("/api/admin/models")}async function Xne(){return ar("/api/admin/models/details")}async function Zne(e){const t=new URLSearchParams;return e.from&&t.set("from",e.from),e.to&&t.set("to",e.to),e.accountId&&t.set("account_id",e.accountId),e.granularity&&t.set("granularity",e.granularity),e.fromMs!=null&&t.set("from_ms",String(e.fromMs)),e.toMs!=null&&t.set("to_ms",String(e.toMs)),ar(`/api/admin/stats/premium-daily?${t.toString()}`)}async function Qne(e){return ar("/api/admin/accounts/auth/start",{method:"POST",body:JSON.stringify(e)})}async function Jne(e){return ar(`/api/admin/accounts/auth/status/${encodeURIComponent(e)}`)}async function ere(e){return ar(`/api/admin/accounts/auth/cancel/${encodeURIComponent(e)}`,{method:"POST"})}async function tre(e){return ar(`/api/admin/accounts/${encodeURIComponent(e)}`,{method:"DELETE"})}async function nre(e){return ar(`/api/admin/accounts/${encodeURIComponent(e)}/reauth`,{method:"POST"})}async function rre(e,t){return ar(`/api/admin/accounts/${encodeURIComponent(e)}`,{method:"PATCH",body:JSON.stringify(t)})}const ire=GS("inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function an({className:e,variant:t,asChild:n=!1,...r}){const i=n?KS:"span";return g.jsx(i,{"data-slot":"badge",className:de(ire({variant:t}),e),...r})}function FA({...e}){return g.jsx(I3,{"data-slot":"dialog",...e})}function are({...e}){return g.jsx(z3,{"data-slot":"dialog-trigger",...e})}function ore({...e}){return g.jsx($3,{"data-slot":"dialog-portal",...e})}function sre({className:e,...t}){return g.jsx(B3,{"data-slot":"dialog-overlay",className:de("fixed inset-0 z-50",e),asChild:!0,...t,children:g.jsx(io.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},className:"bg-black/50",style:{position:"fixed",inset:0}})})}function qA({className:e,children:t,showCloseButton:n=!0,...r}){const o=typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches?{duration:.01}:{type:"spring",damping:26,stiffness:300,mass:.8};return g.jsx(vA,{children:g.jsxs(ore,{children:[g.jsx(sre,{}),g.jsx(U3,{"data-slot":"dialog-content",className:de("bg-background fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg outline-none sm:max-w-lg",e),asChild:!0,...r,children:g.jsxs(io.div,{initial:{opacity:0,scale:.95,y:8},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.97,y:4},transition:o,children:[t,n&&g.jsxs(F3,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[g.jsx(cI,{}),g.jsx("span",{className:"sr-only",children:"Close"})]})]})})]})})}function Ks({className:e,...t}){return g.jsx("div",{"data-slot":"dialog-header",className:de("flex flex-col gap-2 text-center sm:text-left",e),...t})}function Gs({className:e,...t}){return g.jsx("div",{"data-slot":"dialog-footer",className:de("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function Ws({className:e,...t}){return g.jsx(V3,{"data-slot":"dialog-title",className:de("text-lg leading-none font-semibold",e),...t})}function Gf({className:e,...t}){return g.jsx($J,{"data-slot":"dialog-description",className:de("text-muted-foreground text-sm",e),...t})}function Tt({className:e,type:t,...n}){return g.jsx("input",{type:t,"data-slot":"input",className:de("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...n})}var lre=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ure=lre.reduce((e,t)=>{const n=dI(`Primitive.${t}`),r=v.forwardRef((i,o)=>{const{asChild:l,...u}=i,c=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(c,{...u,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),cre="Label",G5=v.forwardRef((e,t)=>g.jsx(ure.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));G5.displayName=cre;var fre=G5;function Ct({className:e,...t}){return g.jsx(fre,{"data-slot":"label",className:de("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}const dre=GS(de("relative cursor-pointer group transition-all animate-rainbow","inline-flex items-center justify-center gap-2 shrink-0","rounded-md outline-none focus-visible:ring-[3px] aria-invalid:border-destructive","text-sm font-medium whitespace-nowrap","disabled:pointer-events-none disabled:opacity-50","[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0"),{variants:{variant:{default:"border-0 bg-[linear-gradient(#121213,#121213),linear-gradient(#121213_50%,rgba(18,18,19,0.6)_80%,rgba(18,18,19,0)),linear-gradient(90deg,var(--color-1),var(--color-5),var(--color-3),var(--color-4),var(--color-2))] bg-[length:200%] text-primary-foreground [background-clip:padding-box,border-box,border-box] [background-origin:border-box] [border:calc(0.125rem)_solid_transparent] before:absolute before:bottom-[-20%] before:left-1/2 before:z-0 before:h-1/5 before:w-3/5 before:-translate-x-1/2 before:animate-rainbow before:bg-[linear-gradient(90deg,var(--color-1),var(--color-5),var(--color-3),var(--color-4),var(--color-2))] before:[filter:blur(0.75rem)] dark:bg-[linear-gradient(#fff,#fff),linear-gradient(#fff_50%,rgba(255,255,255,0.6)_80%,rgba(0,0,0,0)),linear-gradient(90deg,var(--color-1),var(--color-5),var(--color-3),var(--color-4),var(--color-2))]",outline:"border border-input border-b-transparent bg-[linear-gradient(#ffffff,#ffffff),linear-gradient(#ffffff_50%,rgba(18,18,19,0.6)_80%,rgba(18,18,19,0)),linear-gradient(90deg,var(--color-1),var(--color-5),var(--color-3),var(--color-4),var(--color-2))] bg-[length:200%] text-accent-foreground [background-clip:padding-box,border-box,border-box] [background-origin:border-box] before:absolute before:bottom-[-20%] before:left-1/2 before:z-0 before:h-1/5 before:w-3/5 before:-translate-x-1/2 before:animate-rainbow before:bg-[linear-gradient(90deg,var(--color-1),var(--color-5),var(--color-3),var(--color-4),var(--color-2))] before:[filter:blur(0.75rem)] dark:bg-[linear-gradient(#0a0a0a,#0a0a0a),linear-gradient(#0a0a0a_50%,rgba(255,255,255,0.6)_80%,rgba(0,0,0,0)),linear-gradient(90deg,var(--color-1),var(--color-5),var(--color-3),var(--color-4),var(--color-2))]"},size:{default:"h-9 px-4 py-2",sm:"h-8 gap-1.5 px-3 text-xs",lg:"h-11 px-8",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}}),HA=pe.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},o)=>{const l=r?KS:"button";return g.jsx(l,{"data-slot":"button",className:de(dre({variant:t,size:n,className:e})),ref:o,...i})});HA.displayName="RainbowButton";function hre(){const{t:e}=Ye(),{token:t,setToken:n,clearToken:r}=qne(),[i,o]=v.useState(!1),[l,u]=v.useState(t),[c,d]=v.useState(!1),[m,h]=v.useState(!1),[y,b]=v.useState(null),[w,S]=v.useState(null),C=e(t?"common.set":"common.unset");v.useEffect(()=>{if(typeof window>"u")return;function O(){o(!0)}return window.addEventListener(E1,O),()=>{window.removeEventListener(E1,O)}},[]),v.useEffect(()=>{i&&u(t),i&&b(null)},[i,t]);async function E(){d(!0),S(null),b(null);try{const O=await j1(l);S(O),Lt.success(e("tokenDialog.toast.adminApiOk"))}catch(O){const N=O instanceof di?O.message:String(O);Lt.error(e("tokenDialog.toast.adminApiFailed"),{description:N})}finally{d(!1)}}async function j(){const O=l.trim();if(!O){b(e("tokenDialog.validation.empty"));return}h(!0),b(null),S(null);try{const N=await j1(O);S(N),n(O),o(!1),Lt.success(e("tokenDialog.toast.tokenSaved"))}catch(N){const _=N instanceof di?N.message:String(N);b(_)}finally{h(!1)}}function T(){r(),u(""),b(null),S(null),Lt.success(e("tokenDialog.toast.tokenCleared"))}return g.jsxs(FA,{open:i,onOpenChange:o,children:[g.jsx(are,{asChild:!0,children:g.jsxs(ke,{variant:"outline",className:"gap-2",children:[g.jsx(s7,{className:"size-4"}),e("tokenDialog.trigger"),g.jsx(an,{variant:t?"secondary":"outline",className:"ml-1 hidden sm:inline-flex",children:C})]})}),g.jsxs(qA,{children:[g.jsxs(Ks,{children:[g.jsx(Ws,{children:e("tokenDialog.title")}),g.jsx(Gf,{children:g.jsxs(rN,{i18nKey:"tokenDialog.description",children:["Used as ",g.jsx("code",{children:"x-admin-token"})," when calling ",g.jsx("code",{children:"/api/admin/*"}),". Stored in ",g.jsx("code",{children:"localStorage"}),"."]})})]}),g.jsxs("div",{className:"grid gap-2",children:[g.jsx(Ct,{htmlFor:"admin-token",children:"x-admin-token"}),g.jsx(Tt,{id:"admin-token",type:"password",placeholder:e("tokenDialog.inputPlaceholder"),value:l,onChange:O=>{u(O.target.value),y&&b(null)},autoComplete:"off"}),y?g.jsx("p",{className:"text-destructive text-xs",children:y}):null,g.jsx("p",{className:"text-muted-foreground text-xs",children:g.jsxs(rN,{i18nKey:"tokenDialog.remoteNote",children:["If the server is not running on localhost, you must set ",g.jsx("code",{children:"ADMIN_TOKEN"})," on the server to enable remote access."]})}),w?.dbPath&&g.jsx("p",{className:"text-muted-foreground text-xs",children:e("tokenDialog.connected",{version:w.userVersion??"?",path:w.dbPath})})]}),g.jsxs(Gs,{className:"gap-2 sm:gap-2",children:[g.jsx(ke,{variant:"secondary",onClick:E,disabled:c||m,children:e(c?"common.testing":"common.test")}),g.jsx(ke,{variant:"outline",onClick:T,disabled:!t&&!l.trim()||c||m,children:e("common.clear")}),g.jsx(HA,{onClick:j,className:"h-9 px-4",disabled:c||m,children:e(m?"common.saving":"common.save")})]})]})]})}function mre({to:e,label:t}){return g.jsx(VL,{to:e,className:({isActive:n})=>de("text-sm font-medium transition-colors hover:text-foreground",n?"text-foreground":"text-muted-foreground"),children:t})}const pre=[{to:"/accounts",labelKey:"nav.accounts"},{to:"/requests",labelKey:"nav.requests"},{to:"/statistics",labelKey:"nav.statistics"},{to:"/models",labelKey:"nav.models"},{to:"/settings",labelKey:"nav.settings"}];function cM(){const{t:e}=Ye();return g.jsx(g.Fragment,{children:pre.map(t=>g.jsx(mre,{to:t.to,label:e(t.labelKey)},t.to))})}function gre(){const{t:e}=Ye(),t=v.useRef(null),n=v.useRef(null);return v.useEffect(()=>{const r=t.current,i=n.current;if(!r||!i)return;const o=()=>{r.style.setProperty("--app-shell-header-height",`${i.getBoundingClientRect().height}px`)};if(o(),window.addEventListener("resize",o),typeof ResizeObserver>"u")return()=>{window.removeEventListener("resize",o)};const l=new ResizeObserver(o);return l.observe(i),()=>{l.disconnect(),window.removeEventListener("resize",o)}},[]),g.jsxs("div",{ref:t,className:"min-h-svh bg-background text-foreground",children:[g.jsx("header",{ref:n,className:"bg-background/70 sticky top-0 z-50 border-b backdrop-blur",children:g.jsxs("div",{className:"flex w-full items-center gap-3 px-4 py-3 lg:px-6",children:[g.jsx("div",{className:"md:hidden",children:g.jsxs(BJ,{children:[g.jsx(UJ,{asChild:!0,children:g.jsx(ke,{variant:"outline",size:"icon","aria-label":e("nav.openNavigation"),children:g.jsx(d7,{className:"size-4"})})}),g.jsxs(qJ,{side:"left",className:"w-72",children:[g.jsx(HJ,{children:g.jsx(KJ,{children:g.jsx(D_,{className:"text-base font-semibold text-foreground",sparklesCount:3,children:e("app.title")})})}),g.jsx("nav",{className:"mt-4 flex flex-col gap-3",children:g.jsx(cM,{})})]})]})}),g.jsx("div",{className:"min-w-0",children:g.jsx(D_,{className:"text-base font-semibold text-foreground",sparklesCount:3,children:e("app.title")})}),g.jsx("nav",{className:"hidden items-center gap-5 md:flex",children:g.jsx(cM,{})}),g.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[g.jsx(hne,{}),g.jsx(pne,{}),g.jsx(hre,{})]})]})}),g.jsx("main",{className:"w-full px-4 py-4 lg:px-6 lg:py-6",style:{viewTransitionName:"page-content"},children:g.jsx(mH,{})})]})}const vre="en-US";function up(e,t){return Intl.NumberFormat(vre,t).format(e)}function yre(e=0){return Math.max(0,e)}function bre(e,t){return Number(e.toFixed(t))}function xre(e,t){return Math.abs(bre(e,t))>=1e3}function wre(e){const t=new Set;return e.filter(n=>t.has(n.text)?!1:(t.add(n.text),!0))}function Sre(e){const t=new Set;return e.filter(n=>t.has(n.text)?!1:(t.add(n.text),!0))}function T1(e,t=0){const n=yre(t),r={minimumFractionDigits:n,maximumFractionDigits:n},i={text:up(e,r),formatOptions:r};if(!xre(e,n))return[i];const o=Math.max(1,n),l={text:up(e,{notation:"compact",compactDisplay:"short",minimumFractionDigits:o,maximumFractionDigits:o}),formatOptions:{notation:"compact",compactDisplay:"short",minimumFractionDigits:o,maximumFractionDigits:o}},u={text:up(e,{notation:"compact",compactDisplay:"short",minimumFractionDigits:0,maximumFractionDigits:0}),formatOptions:{notation:"compact",compactDisplay:"short",minimumFractionDigits:0,maximumFractionDigits:0}};return wre([i,l,u])}function Are(e,t,n=0,r=0,i=" / "){const o=T1(e,n),l=T1(t,r),u=[],c=o.length+l.length-2;for(let d=0;d<=c;d+=1)for(let m=Math.min(d,o.length-1);m>=0;m-=1){const h=d-m;if(h<0||h>=l.length)continue;const y=o[m],b=l[h];u.push({primaryCandidate:y,secondaryCandidate:b,text:`${y.text}${i}${b.text}`})}return Sre(u)}function Cre(e,t){return e.find(t)??e[e.length-1]??{text:"",formatOptions:{}}}function Ere(e,t){return e.find(t)??e[e.length-1]??{primaryCandidate:{text:"",formatOptions:{}},secondaryCandidate:{text:"",formatOptions:{}},text:""}}function fM(e,t){return e.find(n=>n.text===t?.text)??e[e.length-1]??{text:"",formatOptions:{}}}function dM(e,t){return e.find(n=>n.text===t?.text)??e[e.length-1]??{primaryCandidate:{text:"",formatOptions:{}},secondaryCandidate:{text:"",formatOptions:{}},text:""}}function wf(e){return String(e).padStart(2,"0")}function qu(e){if(e==null)return"";const t=new Date(e);if(Number.isNaN(t.getTime()))return"";const n=t.getFullYear(),r=wf(t.getMonth()+1),i=wf(t.getDate()),o=wf(t.getHours()),l=wf(t.getMinutes()),u=wf(t.getSeconds());return`${n}-${r}-${i} ${o}:${l}:${u}`}function yr(e){return e==null||!Number.isFinite(e)?"":up(e)}function ld(e){return e==null||!Number.isFinite(e)?"":(e/1e3).toFixed(1)}function jre(e){return`"${(/^[=+\-@]/u.test(e)?`'${e}`:e).replaceAll('"','""')}"`}function Tre(e=new Date){const t=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0");return`accounts-${t}-${n}-${r}.csv`}function Ore(e){const t=["account_id","status","account_type","requests","errors","tokens","avg_duration_s","last_request"],n=e.map(r=>[r.account_id,r.runtime?.failed?"failed":"ok",r.account_type??"free",String(r.stats?.request_count??0),String(r.stats?.error_count??0),String(r.stats?.tokens_total??0),ld(r.stats?.avg_duration_ms),qu(r.stats?.last_request_at_ms)]);return[t.join(","),...n.map(r=>r.map(i=>jre(i)).join(","))].join(`
64
- `)}function Pre(e){return e==="success"?g.jsx(qS,{className:"size-4"}):e==="warning"?g.jsx(uI,{className:"size-4"}):e==="error"?g.jsx(HS,{className:"size-4"}):g.jsx(lI,{className:"size-4"})}function Nre(e){switch(e){case"success":return"border-emerald-500/20 bg-emerald-500/10";case"warning":return"border-amber-500/20 bg-amber-500/10";case"error":return"border-destructive/20 bg-destructive/10";default:return"border-border/60 bg-muted/30"}}function xr({variant:e="info",title:t,description:n,actionLabel:r,onAction:i,className:o}){const l=Pre(e);return g.jsxs("div",{role:e==="error"?"alert":"status",className:de("flex items-start gap-3 rounded-lg border p-3",Nre(e),o),children:[g.jsx("div",{className:"mt-0.5 shrink-0 text-foreground",children:l}),g.jsxs("div",{className:"min-w-0 flex-1",children:[g.jsx("div",{className:"text-sm font-medium leading-5",children:t}),n?g.jsx("div",{className:"text-muted-foreground mt-1 text-sm leading-5",children:n}):null]}),r&&i?g.jsx(ke,{type:"button",variant:"outline",size:"sm",onClick:i,className:"shrink-0",children:r}):null]})}const W5=v.createContext(null),O1="magic",_re={preference:O1,effective:O1,reducedMotion:!1,setPreference:()=>{}};function Mre({children:e}){return v.useEffect(()=>{document.documentElement.dataset.motion=O1},[]),g.jsx(W5.Provider,{value:_re,children:e})}function Y5(){const e=v.useContext(W5);if(!e)throw new Error("useMotionPreference must be used within MotionPreferenceProvider");return e}function Js({className:e,...t}){const{effective:n}=Y5();return g.jsx("div",{"data-slot":"skeleton","aria-hidden":"true",className:de("rounded-md",n==="off"?"bg-muted":"relative overflow-hidden bg-muted before:absolute before:inset-0 before:-translate-x-full before:bg-gradient-to-r before:from-transparent before:via-foreground/[0.07] before:to-transparent before:animate-[skeleton-shimmer_1.8s_ease-in-out_infinite] dark:before:via-foreground/[0.05]",e),...t})}var Rre=Symbol("radix.slottable");function Dre(e){const t=({children:n})=>g.jsx(g.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Rre,t}var[nv]=Cl("Tooltip",[Qg]),rv=Qg(),X5="TooltipProvider",kre=700,P1="tooltip.open",[Lre,KA]=nv(X5),Z5=e=>{const{__scopeTooltip:t,delayDuration:n=kre,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:o}=e,l=v.useRef(!0),u=v.useRef(!1),c=v.useRef(0);return v.useEffect(()=>{const d=c.current;return()=>window.clearTimeout(d)},[]),g.jsx(Lre,{scope:t,isOpenDelayedRef:l,delayDuration:n,onOpen:v.useCallback(()=>{window.clearTimeout(c.current),l.current=!1},[]),onClose:v.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>l.current=!0,r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:v.useCallback(d=>{u.current=d},[]),disableHoverableContent:i,children:o})};Z5.displayName=X5;var ud="Tooltip",[Ire,Id]=nv(ud),Q5=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:o,disableHoverableContent:l,delayDuration:u}=e,c=KA(ud,e.__scopeTooltip),d=rv(t),[m,h]=v.useState(null),y=Qa(),b=v.useRef(0),w=l??c.disableHoverableContent,S=u??c.delayDuration,C=v.useRef(!1),[E,j]=Vu({prop:r,defaultProp:i??!1,onChange:M=>{M?(c.onOpen(),document.dispatchEvent(new CustomEvent(P1))):c.onClose(),o?.(M)},caller:ud}),T=v.useMemo(()=>E?C.current?"delayed-open":"instant-open":"closed",[E]),O=v.useCallback(()=>{window.clearTimeout(b.current),b.current=0,C.current=!1,j(!0)},[j]),N=v.useCallback(()=>{window.clearTimeout(b.current),b.current=0,j(!1)},[j]),_=v.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>{C.current=!0,j(!0),b.current=0},S)},[S,j]);return v.useEffect(()=>()=>{b.current&&(window.clearTimeout(b.current),b.current=0)},[]),g.jsx(h5,{...d,children:g.jsx(Ire,{scope:t,contentId:y,open:E,stateAttribute:T,trigger:m,onTriggerChange:h,onTriggerEnter:v.useCallback(()=>{c.isOpenDelayedRef.current?_():O()},[c.isOpenDelayedRef,_,O]),onTriggerLeave:v.useCallback(()=>{w?N():(window.clearTimeout(b.current),b.current=0)},[N,w]),onOpen:O,onClose:N,disableHoverableContent:w,children:n})})};Q5.displayName=ud;var N1="TooltipTrigger",J5=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=Id(N1,n),o=KA(N1,n),l=rv(n),u=v.useRef(null),c=Mt(t,u,i.onTriggerChange),d=v.useRef(!1),m=v.useRef(!1),h=v.useCallback(()=>d.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),g.jsx(m5,{asChild:!0,...l,children:g.jsx(Qe.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:c,onPointerMove:Ve(e.onPointerMove,y=>{y.pointerType!=="touch"&&!m.current&&!o.isPointerInTransitRef.current&&(i.onTriggerEnter(),m.current=!0)}),onPointerLeave:Ve(e.onPointerLeave,()=>{i.onTriggerLeave(),m.current=!1}),onPointerDown:Ve(e.onPointerDown,()=>{i.open&&i.onClose(),d.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:Ve(e.onFocus,()=>{d.current||i.onOpen()}),onBlur:Ve(e.onBlur,i.onClose),onClick:Ve(e.onClick,i.onClose)})})});J5.displayName=N1;var GA="TooltipPortal",[zre,$re]=nv(GA,{forceMount:void 0}),e4=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,o=Id(GA,t);return g.jsx(zre,{scope:t,forceMount:n,children:g.jsx(El,{present:n||o.open,children:g.jsx(Hg,{asChild:!0,container:i,children:r})})})};e4.displayName=GA;var Hu="TooltipContent",t4=v.forwardRef((e,t)=>{const n=$re(Hu,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...o}=e,l=Id(Hu,e.__scopeTooltip);return g.jsx(El,{present:r||l.open,children:l.disableHoverableContent?g.jsx(n4,{side:i,...o,ref:t}):g.jsx(Bre,{side:i,...o,ref:t})})}),Bre=v.forwardRef((e,t)=>{const n=Id(Hu,e.__scopeTooltip),r=KA(Hu,e.__scopeTooltip),i=v.useRef(null),o=Mt(t,i),[l,u]=v.useState(null),{trigger:c,onClose:d}=n,m=i.current,{onPointerInTransitChange:h}=r,y=v.useCallback(()=>{u(null),h(!1)},[h]),b=v.useCallback((w,S)=>{const C=w.currentTarget,E={x:w.clientX,y:w.clientY},j=Hre(E,C.getBoundingClientRect()),T=Kre(E,j),O=Gre(S.getBoundingClientRect()),N=Yre([...T,...O]);u(N),h(!0)},[h]);return v.useEffect(()=>()=>y(),[y]),v.useEffect(()=>{if(c&&m){const w=C=>b(C,m),S=C=>b(C,c);return c.addEventListener("pointerleave",w),m.addEventListener("pointerleave",S),()=>{c.removeEventListener("pointerleave",w),m.removeEventListener("pointerleave",S)}}},[c,m,b,y]),v.useEffect(()=>{if(l){const w=S=>{const C=S.target,E={x:S.clientX,y:S.clientY},j=c?.contains(C)||m?.contains(C),T=!Wre(E,l);j?y():T&&(y(),d())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[c,m,l,d,y]),g.jsx(n4,{...e,ref:o})}),[Ure,Vre]=nv(ud,{isInside:!1}),Fre=Dre("TooltipContent"),n4=v.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:o,onPointerDownOutside:l,...u}=e,c=Id(Hu,n),d=rv(n),{onClose:m}=c;return v.useEffect(()=>(document.addEventListener(P1,m),()=>document.removeEventListener(P1,m)),[m]),v.useEffect(()=>{if(c.trigger){const h=y=>{y.target?.contains(c.trigger)&&m()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[c.trigger,m]),g.jsx(qg,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:h=>h.preventDefault(),onDismiss:m,children:g.jsxs(p5,{"data-state":c.stateAttribute,...d,...u,ref:t,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[g.jsx(Fre,{children:r}),g.jsx(Ure,{scope:n,isInside:!0,children:g.jsx(Pte,{id:c.contentId,role:"tooltip",children:i||r})})]})})});t4.displayName=Hu;var r4="TooltipArrow",qre=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=rv(n);return Vre(r4,n).isInside?null:g.jsx(g5,{...i,...r,ref:t})});qre.displayName=r4;function Hre(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,i,o)){case o:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Kre(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function Gre(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function Wre(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,l=t.length-1;o<t.length;l=o++){const u=t[o],c=t[l],d=u.x,m=u.y,h=c.x,y=c.y;m>r!=y>r&&n<(h-d)*(r-m)/(y-m)+d&&(i=!i)}return i}function Yre(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),Xre(t)}function Xre(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const o=t[t.length-1],l=t[t.length-2];if((o.x-l.x)*(i.y-l.y)>=(o.y-l.y)*(i.x-l.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const o=n[n.length-1],l=n[n.length-2];if((o.x-l.x)*(i.y-l.y)>=(o.y-l.y)*(i.x-l.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Zre=Z5,Qre=Q5,Jre=J5,eie=e4,i4=t4;const tie=Zre,la=Qre,ua=Jre,Pi=v.forwardRef(({className:e,sideOffset:t=4,...n},r)=>g.jsx(eie,{children:g.jsx(i4,{ref:r,sideOffset:t,className:de("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));Pi.displayName=i4.displayName;function gn({className:e,...t}){return g.jsx("div",{"data-slot":"card",className:de("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...t})}function Dn({className:e,...t}){return g.jsx("div",{"data-slot":"card-header",className:de("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function kn({className:e,...t}){return g.jsx("div",{"data-slot":"card-title",className:de("leading-none font-semibold",e),...t})}function wr({className:e,...t}){return g.jsx("div",{"data-slot":"card-description",className:de("text-muted-foreground text-sm",e),...t})}function nie({className:e,...t}){return g.jsx("div",{"data-slot":"card-action",className:de("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...t})}function Ln({className:e,...t}){return g.jsx("div",{"data-slot":"card-content",className:de("px-6",e),...t})}const a4=v.createContext(!1),rie=typeof window>"u"?v.useEffect:v.useLayoutEffect;function iie({stickyHeader:e,tableWidth:t,containerWidth:n}){return!!e&&t<=n+1}function iv({className:e,glow:t,stickyHeader:n,...r}){const i=v.useRef(null),o=v.useRef(null),[l,u]=v.useState(!1),c=v.useCallback(d=>{if(!t)return;const m=d.target.closest("tr");if(!m)return;const h=m.getBoundingClientRect();m.style.setProperty("--glow-x",`${d.clientX-h.left}px`),m.style.setProperty("--glow-y",`${d.clientY-h.top}px`)},[t]);return rie(()=>{if(!n){u(!1);return}const d=i.current,m=o.current;if(!d||!m)return;const h=()=>{u(iie({stickyHeader:n,tableWidth:m.scrollWidth,containerWidth:d.clientWidth}))};if(h(),window.addEventListener("resize",h),typeof ResizeObserver>"u")return()=>{window.removeEventListener("resize",h)};const y=new ResizeObserver(h);return y.observe(d),y.observe(m),()=>{y.disconnect(),window.removeEventListener("resize",h)}},[n]),g.jsx("div",{ref:i,"data-slot":"table-container","data-sticky-header":l?"":void 0,className:de("relative w-full",l?"overflow-x-visible":"overflow-x-auto"),children:g.jsx(a4.Provider,{value:l,children:g.jsx("table",{ref:o,"data-slot":"table","data-glow-table":t?"":void 0,className:de("w-full caption-bottom text-sm",e),onMouseMove:t?c:void 0,...r})})})}function WA({className:e,...t}){const n=v.useContext(a4);return g.jsx("thead",{"data-slot":"table-header","data-sticky-header":n?"":void 0,className:de("[&_tr]:border-b",n&&"[&_th]:sticky [&_th]:top-[var(--app-shell-header-height,3.5rem)] [&_th]:z-20 [&_th]:border-b [&_th]:border-border [&_th]:bg-card",e),...t})}function av({className:e,...t}){return g.jsx("tbody",{"data-slot":"table-body",className:de("[&_tr:last-child]:border-0",e),...t})}function qe({className:e,...t}){return g.jsx("tr",{"data-slot":"table-row",className:de("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...t})}function Pt({className:e,...t}){return g.jsx("th",{"data-slot":"table-head",className:de("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function ge({className:e,...t}){return g.jsx("td",{"data-slot":"table-cell",className:de("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function aie(e,t,n){return Math.min(n,Math.max(t,e))}function hM({value:e=0,className:t,indicatorClassName:n,style:r,...i}){const{effective:o}=Y5(),l=Number.isFinite(e)?aie(e,0,100):0,u=o!=="off",c=o==="magic",d=o==="subtle"?"4s":"2.2s",m=s3(l,{damping:30,stiffness:120,mass:.8}),h=o3(m,y=>`${y}%`);return v.useEffect(()=>{m.set(l)},[l,m]),g.jsx("div",{"data-slot":"progress",role:"progressbar","aria-valuenow":Math.round(l),"aria-valuemin":0,"aria-valuemax":100,className:de("bg-muted/60 relative h-1.5 w-full overflow-hidden rounded-full ring-1 ring-border/40",t),style:{...r,"--speed":d},...i,children:g.jsx(io.div,{"data-slot":"progress-indicator",className:de("relative h-full rounded-full","[container-type:inline-size] overflow-hidden","bg-[linear-gradient(90deg,var(--color-1),var(--color-5),var(--color-3),var(--color-4),var(--color-2))] bg-[length:200%_100%]",u?"animate-rainbow":void 0,c?"before:absolute before:inset-y-0 before:left-0 before:w-3/5 before:rounded-full before:bg-[linear-gradient(90deg,transparent,rgba(255,255,255,0.55),transparent)] before:opacity-50 before:animate-shimmer-slide before:content-['']":void 0,"dark:shadow-[0_0_12px_rgba(255,255,255,0.12)] shadow-[0_0_8px_rgba(0,0,0,0.06)]",n),style:{width:u?h:`${l}%`}})})}function oie({className:e,checked:t,defaultChecked:n,onCheckedChange:r,disabled:i,onClick:o,type:l="button",...u},c){const d=t!==void 0,[m,h]=v.useState(n??!1),y=d?t:m;function b(w){if(o?.(w),w.defaultPrevented||i)return;const S=!y;d||h(S),r?.(S)}return g.jsx("button",{ref:c,type:l,role:"switch","aria-checked":!!y,"data-state":y?"checked":"unchecked","data-disabled":i?"true":"false",className:de("inline-flex h-6 w-11 shrink-0 items-center rounded-full border border-input bg-input/30 shadow-xs transition-[color,box-shadow] outline-none","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",y?"bg-primary border-primary":"bg-input/30",e),onClick:b,disabled:i,...u,children:g.jsx("span",{"data-state":y?"checked":"unchecked",className:de("pointer-events-none inline-block size-4 rounded-full bg-background shadow-sm transition-transform",y?"translate-x-5":"translate-x-1")})})}const er=v.forwardRef(oie);er.displayName="Switch";const sie=({children:e,className:t,...n})=>g.jsx("div",{className:de("grid w-full auto-rows-[22rem] grid-cols-3 gap-4",t),...n,children:e});function J0({children:e,className:t,style:n,gradientSize:r=200,gradientColor:i="#262626",gradientOpacity:o=.8,gradientFrom:l="#9E7AFF",gradientTo:u="#FE8BBB"}){const c=ad(-r),d=ad(-r),m=M_`radial-gradient(${r}px circle at ${c}px ${d}px, ${l}, ${u}, var(--border) 100%)`,h=M_`radial-gradient(${r}px circle at ${c}px ${d}px, ${i}, transparent 100%)`,y=v.useCallback(()=>{c.set(-r),d.set(-r)},[r,c,d]),b=v.useCallback(w=>{const S=w.currentTarget.getBoundingClientRect();c.set(w.clientX-S.left),d.set(w.clientY-S.top)},[c,d]);return v.useEffect(()=>{y()},[y]),v.useEffect(()=>{const w=C=>{C.relatedTarget||y()},S=()=>{document.visibilityState!=="visible"&&y()};return window.addEventListener("pointerout",w),window.addEventListener("blur",y),document.addEventListener("visibilitychange",S),()=>{window.removeEventListener("pointerout",w),window.removeEventListener("blur",y),document.removeEventListener("visibilitychange",S)}},[y]),g.jsxs("div",{className:de("group relative rounded-[inherit]",t),style:n,onPointerMove:b,onPointerLeave:y,onPointerEnter:y,children:[g.jsx(io.div,{className:"bg-border pointer-events-none absolute inset-0 rounded-[inherit] duration-300 group-hover:opacity-100",style:{background:m}}),g.jsx("div",{className:"bg-background absolute inset-px rounded-[inherit]"}),g.jsx(io.div,{className:"pointer-events-none absolute inset-px rounded-[inherit] opacity-0 transition-opacity duration-300 group-hover:opacity-100",style:{background:h,opacity:o}}),g.jsx("div",{className:"relative",children:e})]})}const YA="inline-block tracking-wider text-black tabular-nums dark:text-white";function ov({value:e,startValue:t=0,direction:n="up",delay:r=0,className:i,decimalPlaces:o=0,formatOptions:l,...u}){const c=v.useRef(null),d=v.useMemo(()=>new Intl.NumberFormat("en-US",{minimumFractionDigits:o,maximumFractionDigits:o,...l}),[o,l]),m=l?.notation!=="compact",h=ad(m?n==="down"?e:t:e),y=s3(h,{damping:60,stiffness:100}),b=rQ(c,{once:!0,margin:"0px"}),w=v.useRef(!1);return v.useEffect(()=>{if(!b||w.current)return;if(w.current=!0,!m){h.set(e);return}const S=setTimeout(()=>{h.set(n==="down"?t:e)},r*1e3);return()=>clearTimeout(S)},[h,b,r,e,n,t,m]),v.useEffect(()=>{w.current&&m&&h.set(n==="down"?t:e)},[h,e,n,t,m]),v.useEffect(()=>{const S=C=>{c.current&&(c.current.textContent=d.format(Number(C.toFixed(o))))};if(!m){S(e);return}return S(y.get()),y.on("change",S)},[y,o,d,m,e]),g.jsx("span",{ref:c,className:de(YA,i),...u,children:m?t:d.format(Number(e.toFixed(o)))})}const sv="block min-w-0 max-w-full grow overflow-hidden",o4="pointer-events-none invisible absolute left-0 top-0 whitespace-nowrap",_1="text-muted-foreground text-sm whitespace-nowrap",Lp={text:"",formatOptions:{}},s4={primaryCandidate:Lp,secondaryCandidate:Lp,text:""};function lie({value:e,startValue:t=0,direction:n="up",delay:r=0,className:i,decimalPlaces:o=0,...l}){const u=v.useMemo(()=>T1(e,o),[e,o]);if(u.length===1){const c=u[0]??Lp;return g.jsx("span",{className:de(sv,i),...l,children:g.jsx(ov,{value:e,startValue:t,direction:n,delay:r,decimalPlaces:o,formatOptions:c.formatOptions,className:"whitespace-nowrap"})})}return g.jsx(cie,{value:e,startValue:t,direction:n,delay:r,decimalPlaces:o,className:i,candidates:u,...l})}function uie({primaryValue:e,secondaryValue:t,primaryStartValue:n=0,primaryDirection:r="up",primaryDelay:i=0,className:o,primaryDecimalPlaces:l=0,secondaryDecimalPlaces:u=0,separator:c=" / ",...d}){const m=v.useMemo(()=>Are(e,t,l,u,c),[e,t,l,u,c]);if(m.length===1){const h=m[0]??s4;return g.jsxs("div",{className:de("relative flex min-w-0 items-baseline gap-1 overflow-hidden",o),...d,children:[g.jsx("span",{className:sv,children:g.jsx(ov,{value:e,startValue:n,direction:r,delay:i,decimalPlaces:l,formatOptions:h.primaryCandidate.formatOptions,className:"whitespace-nowrap"})}),g.jsxs("span",{className:de(_1,"shrink-0"),children:[c,h.secondaryCandidate.text]})]})}return g.jsx(fie,{primaryValue:e,primaryStartValue:n,primaryDirection:r,primaryDelay:i,primaryDecimalPlaces:l,separator:c,className:o,candidates:m,...d})}function cie({value:e,startValue:t=0,direction:n="up",delay:r=0,className:i,decimalPlaces:o=0,candidates:l,...u}){const c=v.useRef(null),d=v.useRef(null),[m,h]=v.useState(()=>l[l.length-1]??Lp),y=fM(l,m),b=v.useCallback(()=>{const w=c.current,S=d.current;if(!w||!S)return;const C=w.clientWidth;if(C<=0)return;const E=Cre(l,j=>(S.textContent=j.text,S.scrollWidth<=C));h(j=>fM(l,j).text===E.text?j:E)},[l]);return v.useEffect(()=>{b();const w=c.current;if(!w)return;if(typeof ResizeObserver>"u")return window.addEventListener("resize",b),()=>{window.removeEventListener("resize",b)};const S=new ResizeObserver(b);return S.observe(w),()=>{S.disconnect()}},[b]),g.jsxs("span",{ref:c,className:de("relative",sv,i),...u,children:[g.jsx(ov,{value:e,startValue:t,direction:n,delay:r,decimalPlaces:o,formatOptions:y.formatOptions,className:"whitespace-nowrap"}),g.jsx("span",{ref:d,"aria-hidden":!0,className:de(o4,YA)})]})}function fie({primaryValue:e,primaryStartValue:t=0,primaryDirection:n="up",primaryDelay:r=0,className:i,primaryDecimalPlaces:o=0,separator:l=" / ",candidates:u,...c}){const d=v.useRef(null),m=v.useRef(null),h=v.useRef(null),y=v.useRef(null),[b,w]=v.useState(()=>u[u.length-1]??s4),S=dM(u,b),C=v.useCallback(()=>{const E=d.current,j=m.current,T=h.current,O=y.current;if(!E||!j||!T||!O)return;const N=E.clientWidth;if(N<=0)return;const _=Ere(u,M=>(T.textContent=M.primaryCandidate.text,O.textContent=`${l}${M.secondaryCandidate.text}`,j.scrollWidth<=N));w(M=>dM(u,M).text===_.text?M:_)},[u,l]);return v.useEffect(()=>{C();const E=d.current;if(!E)return;if(typeof ResizeObserver>"u")return window.addEventListener("resize",C),()=>{window.removeEventListener("resize",C)};const j=new ResizeObserver(C);return j.observe(E),()=>{j.disconnect()}},[C]),g.jsxs("div",{ref:d,className:de("relative flex min-w-0 items-baseline gap-1 overflow-hidden",i),...c,children:[g.jsx("span",{className:sv,children:g.jsx(ov,{value:e,startValue:t,direction:n,delay:r,decimalPlaces:o,formatOptions:S.primaryCandidate.formatOptions,className:"whitespace-nowrap"})}),g.jsxs("span",{className:de(_1,"shrink-0"),children:[l,S.secondaryCandidate.text]}),g.jsxs("div",{ref:m,"aria-hidden":!0,className:de(o4,"flex items-baseline gap-1"),children:[g.jsx("span",{ref:h,className:YA}),g.jsx("span",{ref:y,className:_1})]})]})}function l4(e){return e.trim().replace(/^https?:\/\//i,"").replace(/\/+$/,"")}function die({accountType:e,enterpriseDomain:t}){const n=l4(t);return{accountType:e,enterpriseDomain:e==="enterprise"&&n?n:void 0}}function mM(e){if(typeof document>"u"||typeof document.createElement!="function"||typeof document.execCommand!="function"||!document.body)return!1;const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="fixed",t.style.opacity="0",t.style.pointerEvents="none",t.style.left="-9999px",t.style.top="0",document.body.appendChild(t);try{return t.select(),t.setSelectionRange(0,e.length),document.execCommand("copy")}finally{t.remove()}}function pM(e){return e instanceof Error?e:new Error(String(e))}async function hie(e){const t=globalThis.navigator?.clipboard;if(t?.writeText)try{await t.writeText(e);return}catch(n){const r=pM(n);try{if(mM(e))return}catch(i){const o=pM(i);throw new Error(`${r.message}; legacy copy fallback threw: ${o.message}`)}throw new Error(`${r.message}; legacy copy fallback was unavailable or returned false.`)}if(!mM(e))throw new Error("Clipboard unavailable")}const mie=["individual","business","enterprise"],ex=120;function pie(e){const t=Math.floor(e/60),n=e%60;return`${t}:${n.toString().padStart(2,"0")}`}function gM({open:e,onOpenChange:t,onSuccess:n,reauthAccountId:r}){const{t:i}=Ye(),[o,l]=v.useState(r?"confirm-reauth":"select-type"),[u,c]=v.useState("individual"),[d,m]=v.useState(""),[h,y]=v.useState(null),[b,w]=v.useState(null),[S,C]=v.useState(null),[E,j]=v.useState(!1),[T,O]=v.useState(null),[N,_]=v.useState(!1),M=v.useRef(null),R=v.useRef(null),I=v.useRef(0),$=v.useRef(null),F=v.useRef(0),z=v.useRef(!1),Y=v.useCallback(()=>{F.current+=1,M.current&&(clearTimeout(M.current),M.current=null)},[]),Q=v.useCallback(()=>{R.current&&(clearInterval(R.current),R.current=null),O(null)},[]),se=v.useCallback(X=>{Q(),I.current=Date.now()+X*1e3,O(X),R.current=setInterval(()=>{const me=Math.max(0,Math.ceil((I.current-Date.now())/1e3));O(me),me<=0&&(Q(),Y(),C(i("accountManagement.expired")),l("error"))},1e3)},[Q,Y,i]),L=v.useCallback((X,me)=>{Y();const oe=F.current,le=(me+1)*1e3,ve=async()=>{try{const re=await Jne(X);if(F.current!==oe)return;switch(w(re),re.status){case"completed":{if(F.current!==oe)return;Y(),Q(),l("success");return}case"failed":{if(F.current!==oe)return;Y(),Q(),C(re.error??i("accountManagement.authFailed")),l("error");return}case"expired":{if(F.current!==oe)return;Y(),Q(),C(i("accountManagement.expired")),l("error");return}case"pending":{if(F.current!==oe)return;M.current=setTimeout(()=>{ve()},le);return}default:return}}catch(re){if(console.warn("Failed to poll auth session status.",re),F.current!==oe)return;M.current=setTimeout(()=>{ve()},le)}};M.current=setTimeout(()=>{ve()},le)},[i,Q,Y]),q=v.useCallback(async()=>{!h||(b?.status??"pending")!=="pending"||$.current!==h.sessionId&&($.current=h.sessionId,await ere(h.sessionId).catch(()=>{}))},[h,b?.status]),B=v.useCallback(async()=>{if(!(!r||z.current)){z.current=!0,_(!0);try{C(null),w(null);const X=await nre(r);y(X),l("authorize"),window.open(X.verificationUri,"_blank"),se(X.expiresIn),L(X.sessionId,X.interval)}catch(X){C(X instanceof Error?X.message:String(X)),l("error")}finally{z.current=!1,_(!1)}}},[r,L,se]);v.useEffect(()=>{if(!e){q(),Y(),R.current&&(clearInterval(R.current),R.current=null);const X=setTimeout(()=>{l(r?"confirm-reauth":"select-type"),c("individual"),m(""),y(null),w(null),C(null),j(!1),_(!1),O(null),z.current=!1},200);return()=>clearTimeout(X)}},[e,r,q,Q,Y]);const ae=v.useCallback(async()=>{if(!z.current){z.current=!0,_(!0);try{C(null),w(null);const X=await Qne(die({accountType:u,enterpriseDomain:d}));y(X),l("authorize"),window.open(X.verificationUri,"_blank"),se(X.expiresIn),L(X.sessionId,X.interval)}catch(X){C(X instanceof Error?X.message:String(X)),l("error")}finally{z.current=!1,_(!1)}}},[u,d,L,se]),G=v.useCallback(async()=>{await q(),Y(),Q(),t(!1)},[q,t,Q,Y]),D=v.useCallback(async()=>{await G()},[G]),V=v.useCallback(()=>{Y(),Q(),t(!1),n()},[Q,Y,t,n]),K=v.useCallback(async()=>{if(h)try{await hie(h.userCode),j(!0),setTimeout(()=>j(!1),2e3)}catch(X){console.warn("Failed to copy GitHub authorization code.",X),Lt.error(i("accountManagement.copyFailed"),{description:i("accountManagement.copyManualHint")})}},[h,i]),ee=v.useCallback(()=>{C(null),y(null),w(null),Q(),l(r?"confirm-reauth":"select-type")},[r,Q]),he=v.useCallback(()=>{m(X=>l4(X))},[]),ye=S===i("accountManagement.expired");return g.jsx(FA,{open:e,onOpenChange:X=>{if(!X){G();return}t(X)},children:g.jsxs(qA,{className:"sm:max-w-md",children:[o==="select-type"&&g.jsxs(g.Fragment,{children:[g.jsxs(Ks,{children:[g.jsx(Ws,{children:i("accountManagement.addAccount")}),g.jsx(Gf,{children:i("accountManagement.selectAccountType")})]}),g.jsx("div",{className:"flex flex-col gap-2",role:"radiogroup","aria-label":i("accountManagement.selectAccountType"),children:mie.map(X=>g.jsxs("button",{type:"button",role:"radio","aria-checked":u===X,onClick:()=>c(X),className:`flex items-center gap-3 rounded-lg border p-3 text-left transition-colors ${u===X?"border-primary bg-primary/5":"border-border hover:bg-accent/50"}`,children:[g.jsx("div",{className:`flex h-5 w-5 shrink-0 items-center justify-center rounded-full border-2 ${u===X?"border-primary":"border-muted-foreground"}`,children:u===X&&g.jsx("div",{className:"bg-primary h-2.5 w-2.5 rounded-full"})}),g.jsxs("div",{children:[g.jsx("div",{className:"font-medium",children:i(`accountManagement.type${X.charAt(0).toUpperCase()+X.slice(1)}`)}),g.jsx("div",{className:"text-muted-foreground text-sm",children:i(`accountManagement.type${X.charAt(0).toUpperCase()+X.slice(1)}Description`)})]})]},X))}),u==="enterprise"&&g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ct,{htmlFor:"enterprise-domain",children:i("accountManagement.enterpriseDomain")}),g.jsx(Tt,{id:"enterprise-domain",placeholder:i("accountManagement.enterpriseDomainPlaceholder"),value:d,onChange:X=>m(X.target.value),onBlur:he}),g.jsx("p",{className:"text-muted-foreground text-xs",children:i("accountManagement.enterpriseDomainHint")})]}),S&&g.jsx("p",{className:"text-destructive text-sm",role:"alert",children:S}),g.jsxs(Gs,{children:[g.jsx(ke,{variant:"outline",onClick:()=>{G()},children:i("accountManagement.cancel")}),g.jsx(ke,{onClick:ae,disabled:N,children:i("accountManagement.continue")})]})]}),o==="confirm-reauth"&&r&&g.jsxs(g.Fragment,{children:[g.jsxs(Ks,{children:[g.jsx(Ws,{children:i("accountManagement.reauthAuthorizeTitle",{id:r})}),g.jsx(Gf,{children:i("accountManagement.reauthConfirmDescription")})]}),g.jsx("div",{className:"text-muted-foreground space-y-2 py-2 text-sm",children:g.jsx("p",{children:i("accountManagement.reauthConfirmHint")})}),g.jsxs(Gs,{children:[g.jsx(ke,{variant:"outline",onClick:()=>{G()},children:i("accountManagement.cancel")}),g.jsx(ke,{onClick:()=>{B()},disabled:N,children:i("accountManagement.continue")})]})]}),o==="authorize"&&h&&g.jsxs(g.Fragment,{children:[g.jsxs(Ks,{children:[g.jsx(Ws,{children:r?i("accountManagement.reauthAuthorizeTitle",{id:r}):i("accountManagement.authorizeTitle")}),r&&g.jsx(Gf,{children:i("accountManagement.reauthAuthorizeDescription")})]}),g.jsxs("div",{className:"flex flex-col items-center gap-4 py-4",children:[g.jsx("p",{className:"text-muted-foreground text-sm",children:i("accountManagement.enterCodePrompt")}),g.jsxs("div",{className:"border-primary/50 bg-muted relative w-full rounded-lg border-2 border-dashed p-4 text-center",children:[g.jsx("code",{className:"text-2xl font-bold tracking-[0.3em]",children:h.userCode}),g.jsx(ke,{variant:"ghost",size:"sm",className:"absolute right-2 top-1/2 h-7 -translate-y-1/2 px-2 text-xs",onClick:K,children:i(E?"accountManagement.copied":"accountManagement.copy")})]}),g.jsx("p",{className:"text-muted-foreground text-xs",children:i("accountManagement.autoOpenHint")}),g.jsx("a",{href:h.verificationUri,target:"_blank",rel:"noopener noreferrer",className:"text-primary text-sm underline",children:h.verificationUri}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("div",{className:de("h-2 w-2 rounded-full motion-safe:animate-pulse",T!==null&&T<=ex?"bg-amber-500":"bg-primary")}),g.jsx("span",{className:de("text-sm",T!==null&&T<=ex?"text-amber-500 font-medium":"text-muted-foreground"),children:T!==null&&T>0?i("accountManagement.expiresIn",{time:pie(T)}):i("accountManagement.waitingForAuth")})]}),T!==null&&T<=ex&&T>0&&g.jsx("p",{className:"text-amber-500 text-xs",children:i("accountManagement.expiresWarning")})]}),g.jsx(Gs,{children:g.jsx(ke,{variant:"outline",onClick:D,children:i("accountManagement.cancel")})})]}),o==="success"&&g.jsxs(g.Fragment,{children:[g.jsx(Ks,{children:g.jsx(Ws,{children:r?i("accountManagement.successReauthTitle",{id:r}):i("accountManagement.successTitle")})}),g.jsxs("div",{className:"flex flex-col items-center gap-4 py-4 motion-safe:animate-in motion-safe:fade-in-0 motion-safe:zoom-in-95 motion-safe:duration-300",children:[g.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-green-500/10",children:g.jsx(qS,{className:"size-6 text-green-500"})}),g.jsxs("div",{className:"bg-muted w-full rounded-lg p-4 text-sm",children:[g.jsxs("div",{className:"flex justify-between py-1",children:[g.jsx("span",{className:"text-muted-foreground",children:i("accountManagement.accountLabel")}),g.jsx("span",{className:"font-medium",children:b?.accountId??"—"})]}),!r&&g.jsxs("div",{className:"flex justify-between py-1",children:[g.jsx("span",{className:"text-muted-foreground",children:i("accountManagement.typeLabel")}),g.jsx("span",{children:i(`accountManagement.type${u.charAt(0).toUpperCase()+u.slice(1)}`)})]}),g.jsxs("div",{className:"flex justify-between py-1",children:[g.jsx("span",{className:"text-muted-foreground",children:i("accountManagement.statusLabel")}),g.jsx("span",{className:"text-green-500",children:i("accountManagement.statusActive")})]})]})]}),g.jsx(Gs,{children:g.jsx(ke,{onClick:V,children:i("accountManagement.done")})})]}),o==="error"&&g.jsxs(g.Fragment,{children:[g.jsx(Ks,{children:g.jsx(Ws,{children:i("accountManagement.authFailed")})}),g.jsxs("div",{className:"flex flex-col items-center gap-4 py-4",role:"alert",children:[g.jsx("div",{className:"bg-destructive/10 flex h-12 w-12 items-center justify-center rounded-full",children:g.jsx(HS,{className:"text-destructive size-6"})}),g.jsx("div",{className:"bg-destructive/5 border-destructive/20 w-full rounded-lg border p-4",children:g.jsx("p",{className:"text-destructive text-sm font-medium",children:S})}),g.jsx("p",{className:"text-muted-foreground text-center text-xs",children:i(ye?"accountManagement.errorExpiredHint":"accountManagement.errorRecoveryHint")})]}),g.jsxs(Gs,{children:[g.jsx(ke,{variant:"outline",onClick:()=>t(!1),children:i("accountManagement.cancel")}),g.jsx(ke,{onClick:ee,children:i("accountManagement.startOver")})]})]})]})})}function gie({open:e,onOpenChange:t,accountId:n,onDeleted:r}){const{t:i}=Ye(),[o,l]=v.useState(!1),u=v.useCallback(async()=>{l(!0);try{await tre(n),Lt.success(i("accountManagement.deleteSuccess",{id:n})),t(!1),r()}catch(c){Lt.error(c instanceof Error?c.message:String(c))}finally{l(!1)}},[n,r,t,i]);return g.jsx(FA,{open:e,onOpenChange:t,children:g.jsxs(qA,{className:"sm:max-w-md",children:[g.jsxs(Ks,{children:[g.jsx(Ws,{children:i("accountManagement.deleteTitle")}),g.jsx(Gf,{children:i("accountManagement.deleteConfirmation",{id:n})})]}),g.jsxs(Gs,{children:[g.jsx(ke,{variant:"outline",onClick:()=>t(!1),disabled:o,children:i("accountManagement.cancel")}),g.jsx(ke,{variant:"destructive",onClick:u,disabled:o,children:o?g.jsxs(g.Fragment,{children:[g.jsx(Bu,{className:"size-4 animate-spin"}),i("accountManagement.deleting")]}):i("accountManagement.delete")})]})]})})}function Sf(e){return e.reduce((t,n)=>t+(n??0),0)}function vM(e,t){if(e==="this_month"){const i=new Date(t),o=new Date(i.getFullYear(),i.getMonth(),1).getTime();return{sinceMs:o,fromMs:String(o),toMs:String(t)}}const n=Number(e),r=t-n;return{sinceMs:r,fromMs:String(r),toMs:String(t)}}function yM(e){return Math.min(100,Math.max(0,e))}function bM(e){return yr(e)||"—"}function vie(e){let t=0,n=0;for(const r of e){const i=r.stats?.request_count??0,o=r.stats?.avg_duration_ms??0;i>0&&o>0&&(t+=i,n+=i*o)}return t>0?n/t/1e3:0}function xM({value:e,decimalPlaces:t=0}){return g.jsx(lie,{value:e,decimalPlaces:t})}function tx({label:e,tooltip:t}){return t?g.jsxs(la,{children:[g.jsx(ua,{asChild:!0,children:g.jsx("div",{className:"text-muted-foreground cursor-help text-xs underline decoration-dashed decoration-current/30 underline-offset-2",children:e})}),g.jsx(Pi,{side:"bottom",className:"max-w-60",children:g.jsx("p",{children:t})})]}):g.jsx("div",{className:"text-muted-foreground text-xs",children:e})}const kr=[null,null,"hidden md:table-cell","hidden lg:table-cell",null,null,"hidden xl:table-cell","hidden xl:table-cell","hidden lg:table-cell",null,null];function yie({rows:e}){const t=kr.length;return g.jsx(g.Fragment,{children:Array.from({length:e}).map((n,r)=>g.jsx(qe,{children:Array.from({length:t}).map((i,o)=>g.jsx(ge,{className:de("py-3",kr[o]),children:g.jsx(Js,{className:o===0?"h-4 w-56":"h-4 w-24"})},o))},r))})}function bie(){const{t:e}=Ye(),[t,n]=v.useState("this_month"),[r,i]=v.useState(!1),[o,l]=v.useState(null),[u,c]=v.useState(""),[d,m]=v.useState("requests"),[h,y]=v.useState([]),[b,w]=v.useState(null),[S,C]=v.useState(!1),[E,j]=v.useState(!1),[T,O]=v.useState(""),[N,_]=v.useState(!1),[M,R]=v.useState(""),I=v.useRef(null),$=v.useRef(!1),F=v.useRef(!1),z=v.useCallback(async()=>{if($.current){F.current=!0;return}$.current=!0,i(!0),l(null);try{const D=Date.now(),{sinceMs:V}=vM(t,D),[K,ee]=await Promise.all([Hne({sinceMs:V,includeStats:!0}),j1()]);y(K.items),w(ee)}catch(D){const V=D instanceof di?D.message:String(D);l(V),Lt.error(yt.t("accountsPage.loadFailedTitle"),{description:V})}finally{$.current=!1,i(!1),F.current&&(F.current=!1,z())}},[t]);v.useEffect(()=>{z()},[z]);const[Y,Q]=v.useState(0);v.useEffect(()=>{let D=!1;if(I.current&&(clearTimeout(I.current),I.current=null),Y>0){const V=()=>{D||(I.current=setTimeout(async()=>{if($.current){V();return}try{await z()}finally{V()}},Y))};V()}return()=>{D=!0,I.current&&(clearTimeout(I.current),I.current=null)}},[Y,z]),v.useEffect(()=>{function D(V){const K=V.target?.tagName;K==="INPUT"||K==="TEXTAREA"||K==="SELECT"||V.target?.closest("[role=dialog]")||V.metaKey||V.ctrlKey||V.altKey||(V.key==="r"||V.key==="R"?(V.preventDefault(),z()):(V.key==="n"||V.key==="N")&&(V.preventDefault(),C(!0)))}return document.addEventListener("keydown",D),()=>document.removeEventListener("keydown",D)},[z]);const se=v.useCallback(()=>{if(h.length===0)return;const D=Ore(h),V=new Blob([D],{type:"text/csv;charset=utf-8"}),K=URL.createObjectURL(V),ee=document.createElement("a");ee.href=K,ee.download=Tre(),ee.click(),URL.revokeObjectURL(K),Lt.success(e("accountsPage.exportSuccess"))},[h,e]),L=v.useMemo(()=>{const D=h.length,V=h.filter(Le=>Le.runtime?.failed).length,K=Sf(h.map(Le=>Le.stats?.request_count)),ee=Sf(h.map(Le=>Le.stats?.error_count)),he=Sf(h.map(Le=>Le.stats?.tokens_total)),ye=vie(h),X=K>0?ee/K*100:0,me=K>0?he/K:0,oe=h.filter(Le=>Le.runtime&&!Le.runtime.unlimited&&Le.runtime.entitlement!=null),le=Sf(oe.map(Le=>Le.runtime?.entitlement)),ve=Sf(oe.map(Le=>Le.runtime?.remaining)),re=le-ve,ze=le>0?yM(re/le*100):0,Ee=h.filter(Le=>Le.runtime?.unlimited).length;return{totalAccounts:D,failedAccounts:V,totalRequests:K,totalErrors:ee,totalTokens:he,avgDurationSeconds:ye,errorRatePct:X,tokensPerRequest:me,totalPremiumEntitlement:le,totalPremiumRemaining:ve,totalPremiumUsed:re,premiumUsedPercent:ze,unlimitedAccountCount:Ee}},[h]),q=v.useMemo(()=>{const D=u.trim().toLowerCase(),K=[...D?h.filter(ee=>ee.account_id.toLowerCase().includes(D)):h];return K.sort((ee,he)=>d==="account"?ee.account_id.localeCompare(he.account_id):d==="last_req"?(he.stats?.last_request_at_ms??0)-(ee.stats?.last_request_at_ms??0):d==="errors"?(he.stats?.error_count??0)-(ee.stats?.error_count??0):d==="tokens"?(he.stats?.tokens_total??0)-(ee.stats?.tokens_total??0):(he.stats?.request_count??0)-(ee.stats?.request_count??0)),K},[h,u,d]),B=Date.now(),{fromMs:ae,toMs:G}=vM(t,B);return g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"text-muted-foreground text-sm",children:e("accountsPage.statsWindowLabel")}),g.jsxs(zn,{value:t,onValueChange:D=>n(D),children:[g.jsx(Bn,{size:"sm",className:"w-40",children:g.jsx($n,{})}),g.jsxs(Un,{children:[g.jsx(Oe,{value:"86400000",children:e("accountsPage.window.last24h")}),g.jsx(Oe,{value:"604800000",children:e("accountsPage.window.last7d")}),g.jsx(Oe,{value:"this_month",children:e("accountsPage.window.thisMonth")})]})]})]}),g.jsxs(ke,{variant:"outline",size:"sm",onClick:z,disabled:r,children:[g.jsx(wp,{className:de("size-4",r&&"animate-spin")}),e(r?"common.refreshing":"common.refresh")]}),g.jsxs("div",{className:"flex items-center gap-2",children:[Y>0&&g.jsxs("span",{className:"relative flex h-2 w-2",children:[g.jsx("span",{className:"bg-primary absolute inline-flex h-full w-full motion-safe:animate-ping rounded-full opacity-75"}),g.jsx("span",{className:"bg-primary relative inline-flex h-2 w-2 rounded-full"})]}),g.jsx("span",{className:"text-muted-foreground text-sm",children:e("accountsPage.autoRefreshLabel")}),g.jsxs(zn,{value:String(Y),onValueChange:D=>Q(Number(D)),children:[g.jsx(Bn,{size:"sm",className:"w-24",children:g.jsx($n,{})}),g.jsxs(Un,{children:[g.jsx(Oe,{value:"0",children:e("accountsPage.autoRefresh.off")}),g.jsx(Oe,{value:"30000",children:e("accountsPage.autoRefresh.30s")}),g.jsx(Oe,{value:"60000",children:e("accountsPage.autoRefresh.60s")}),g.jsx(Oe,{value:"300000",children:e("accountsPage.autoRefresh.5m")})]})]})]}),g.jsxs(HA,{size:"sm",onClick:()=>C(!0),children:[g.jsx(lN,{className:"size-4"}),e("accountManagement.addAccount")]}),g.jsxs(la,{children:[g.jsx(ua,{asChild:!0,children:g.jsx(ke,{variant:"ghost",size:"sm",onClick:se,disabled:h.length===0,"aria-label":e("accountsPage.exportCsvAria"),children:g.jsx(sI,{className:"size-4"})})}),g.jsx(Pi,{children:e("accountsPage.exportCsv")})]}),g.jsx("div",{className:"text-muted-foreground ml-auto text-xs opacity-60",children:b?.dbPath?e("accountsPage.dbInfo",{version:b.userVersion??"?",path:b.dbPath}):null})]}),o?g.jsx(xr,{variant:"error",title:e("accountsPage.loadFailedTitle"),description:o,actionLabel:e("common.retry"),onAction:()=>{z()}}):null,g.jsxs(sie,{className:"auto-rows-min grid-cols-1 gap-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-6 2xl:grid-cols-9",children:[[{label:e("nav.accounts"),tooltip:e("accountsPage.kpiTooltip.accounts"),value:L.totalAccounts},{label:e("common.failed"),tooltip:e("accountsPage.kpiTooltip.failed"),value:L.failedAccounts}].map((D,V)=>g.jsx(J0,{className:"motion-safe:animate-in motion-safe:fade-in-0 motion-safe:slide-in-from-bottom-2 rounded-xl fill-mode-backwards",style:{animationDelay:`${V*60}ms`,animationDuration:"400ms"},children:g.jsxs("div",{className:"p-4",children:[g.jsx(tx,{label:D.label,tooltip:D.tooltip}),g.jsx("div",{className:"mt-1 flex min-w-0 items-baseline gap-1 text-2xl font-semibold",children:g.jsx(xM,{value:D.value})})]})},D.label)),g.jsx(J0,{className:"motion-safe:animate-in motion-safe:fade-in-0 motion-safe:slide-in-from-bottom-2 rounded-xl fill-mode-backwards",style:{animationDelay:"120ms",animationDuration:"400ms"},children:g.jsxs("div",{className:"p-4",children:[g.jsx(tx,{label:e("accountsPage.kpi.premiumUsage"),tooltip:e("accountsPage.kpiTooltip.premiumUsage")}),L.unlimitedAccountCount>0&&L.totalPremiumEntitlement===0?g.jsx("div",{className:"mt-1",children:g.jsx(an,{variant:"secondary",children:e("common.unlimited")})}):g.jsxs(g.Fragment,{children:[g.jsx(uie,{className:"mt-1 text-2xl font-semibold",primaryValue:L.totalPremiumUsed,secondaryValue:L.totalPremiumEntitlement}),g.jsx(hM,{value:L.premiumUsedPercent,className:"mt-1.5 h-1.5","aria-label":e("accountsPage.kpi.premiumUsageAria")})]})]})}),[{label:e("nav.requests"),tooltip:e("accountsPage.kpiTooltip.requests"),value:L.totalRequests},{label:e("common.errors"),tooltip:e("accountsPage.kpiTooltip.errors"),value:L.totalErrors},{label:e("common.errorRate"),tooltip:e("accountsPage.kpiTooltip.errorRate"),value:L.errorRatePct,decimal:1,suffix:"%"},{label:e("common.tokensPerRequest"),tooltip:e("accountsPage.kpiTooltip.tokensPerRequest"),value:L.tokensPerRequest,decimal:1},{label:e("common.tokens"),tooltip:e("accountsPage.kpiTooltip.tokens"),value:L.totalTokens},{label:e("common.avgDurationMs"),tooltip:e("accountsPage.kpiTooltip.avgDuration"),value:L.avgDurationSeconds,decimal:1}].map((D,V)=>g.jsx(J0,{className:"motion-safe:animate-in motion-safe:fade-in-0 motion-safe:slide-in-from-bottom-2 rounded-xl fill-mode-backwards",style:{animationDelay:`${(V+3)*60}ms`,animationDuration:"400ms"},children:g.jsxs("div",{className:"p-4",children:[g.jsx(tx,{label:D.label,tooltip:D.tooltip}),g.jsxs("div",{className:"mt-1 flex min-w-0 items-baseline gap-1 text-2xl font-semibold",children:[g.jsx(xM,{value:D.value,decimalPlaces:D.decimal??0}),D.suffix?g.jsx("span",{className:"text-muted-foreground text-sm",children:D.suffix}):null]})]})},D.label))]}),!r&&h.length===0?g.jsx(gn,{className:"py-12",children:g.jsxs(Ln,{className:"flex flex-col items-center gap-4 text-center",children:[g.jsx("div",{className:"bg-muted flex h-14 w-14 items-center justify-center rounded-full",children:g.jsx(C7,{className:"text-muted-foreground size-7"})}),g.jsxs("div",{className:"space-y-1.5",children:[g.jsx("h3",{className:"text-lg font-semibold",children:e("accountsPage.empty.noAccountsTitle")}),g.jsx("p",{className:"text-muted-foreground mx-auto max-w-sm text-sm",children:e("accountsPage.empty.noAccountsDescription")})]}),g.jsxs(ke,{size:"lg",onClick:()=>C(!0),className:"mt-2",children:[g.jsx(lN,{className:"size-4"}),e("accountsPage.empty.noAccountsCta")]})]})}):g.jsxs(gn,{className:"gap-4 py-4",children:[g.jsxs(Dn,{className:"px-4",children:[g.jsx(kn,{children:e("nav.accounts")}),g.jsx(wr,{className:"hidden sm:block",children:e("accountsPage.tableDescription")})]}),g.jsxs(Ln,{className:"space-y-3 px-4",children:[g.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[g.jsx(Tt,{placeholder:e("accountsPage.filterAccountPlaceholder"),value:u,onChange:D=>c(D.target.value),className:"h-8 sm:max-w-xs"}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"text-muted-foreground text-sm",children:e("accountsPage.sortByLabel")}),g.jsxs(zn,{value:d,onValueChange:D=>m(D),children:[g.jsx(Bn,{size:"sm",className:"w-40",children:g.jsx($n,{})}),g.jsxs(Un,{align:"end",children:[g.jsx(Oe,{value:"requests",children:e("nav.requests")}),g.jsx(Oe,{value:"errors",children:e("common.errors")}),g.jsx(Oe,{value:"tokens",children:e("common.tokens")}),g.jsx(Oe,{value:"last_req",children:e("common.lastRequest")}),g.jsx(Oe,{value:"account",children:e("common.account")})]})]}),g.jsxs("div",{className:"text-muted-foreground text-sm tabular-nums",children:[q.length,"/",h.length]})]})]}),g.jsxs(iv,{glow:!0,stickyHeader:!0,className:"[&_th]:h-9 [&_td]:py-1.5",children:[g.jsx(WA,{children:g.jsxs(qe,{children:[g.jsx(Pt,{children:e("common.account")}),g.jsx(Pt,{children:e("common.status")}),g.jsx(Pt,{className:de(kr[2]),children:e("accountsPage.type")}),g.jsx(Pt,{className:de(kr[3]),children:g.jsxs(la,{children:[g.jsx(ua,{asChild:!0,children:g.jsx("span",{className:"cursor-help underline decoration-dashed decoration-current/30 underline-offset-2",children:e("accountsPage.premiumReq")})}),g.jsx(Pi,{side:"bottom",className:"max-w-60",children:g.jsx("p",{children:e("accountsPage.tableTooltip.premiumReq")})})]})}),g.jsx(Pt,{children:e("nav.requests")}),g.jsx(Pt,{children:e("common.errors")}),g.jsx(Pt,{className:de(kr[6]),children:e("common.tokens")}),g.jsx(Pt,{className:de(kr[7]),children:g.jsxs(la,{children:[g.jsx(ua,{asChild:!0,children:g.jsx("span",{className:"cursor-help underline decoration-dashed decoration-current/30 underline-offset-2",children:e("common.avgMs")})}),g.jsx(Pi,{side:"bottom",className:"max-w-60",children:g.jsx("p",{children:e("accountsPage.tableTooltip.avgMs")})})]})}),g.jsx(Pt,{className:de(kr[8]),children:e("common.lastRequest")}),g.jsx(Pt,{children:e("common.enabled")}),g.jsx(Pt,{className:"text-right",children:e("common.actions")})]})}),g.jsx(av,{children:r&&h.length===0?g.jsx(yie,{rows:6}):q.length===0?g.jsx(qe,{children:g.jsx(ge,{colSpan:kr.length,children:g.jsx(xr,{variant:"info",title:e("accountsPage.empty.noMatchesTitle"),description:e("accountsPage.empty.noMatchesDescription"),actionLabel:u.trim()?e("common.clearFilter"):void 0,onAction:u.trim()?()=>c(""):void 0})})}):g.jsx(vA,{initial:!1,children:q.map(D=>{const V=D.runtime?.failed,K=V?g.jsx(an,{variant:"destructive",children:e("common.statusFailed")}):g.jsx(an,{variant:"secondary",children:e("common.statusOk")}),ee=D.runtime?.entitlement,he=D.runtime?.remaining,ye=ee!=null&&he!=null?ee-he:void 0,X=ee!=null&&ee>0&&ye!=null?ye/ee*100:void 0,me=X!=null&&Number.isFinite(X)?yM(X):void 0,oe=D.runtime?.unlimited?g.jsx(an,{variant:"secondary",children:e("common.unlimited")}):g.jsxs("div",{className:"flex flex-col gap-1",children:[g.jsxs("div",{className:"flex items-baseline justify-between gap-2 text-xs whitespace-nowrap",children:[g.jsxs("div",{className:"flex items-baseline gap-1",children:[g.jsx("span",{className:"text-muted-foreground",children:e("common.used")}),g.jsx("span",{className:"tabular-nums font-medium",children:bM(ye)})]}),g.jsxs("div",{className:"flex items-baseline gap-1",children:[g.jsx("span",{className:"text-muted-foreground",children:e("common.remaining")}),g.jsx("span",{className:"tabular-nums font-medium",children:bM(he)})]})]}),me!=null?g.jsx(hM,{value:me,className:"h-1.5","aria-label":e("accountsPage.premiumQuotaUsedAria")}):null]}),le=D.stats?.last_request_at_ms?qu(D.stats.last_request_at_ms):"";return g.jsxs(io.tr,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15,ease:"easeOut"},"data-slot":"table-row",className:de("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",D.runtime?.enabled===!1&&"text-muted-foreground opacity-60"),children:[g.jsx(ge,{className:"font-mono",children:g.jsx(es,{to:`/requests?account_id=${encodeURIComponent(D.account_id)}&from_ms=${ae}&to_ms=${G}`,className:"underline decoration-border hover:decoration-foreground",children:D.account_id})}),g.jsx(ge,{children:g.jsxs("div",{className:"flex flex-col gap-1",children:[g.jsx("div",{children:K}),V&&D.runtime?.failureReason?g.jsx("div",{className:"text-muted-foreground text-xs",children:D.runtime.failureReason}):null]})}),g.jsx(ge,{className:de(kr[2]),children:g.jsx(an,{variant:"outline",children:e(`accountsPage.accountType.${D.account_type??"free"}`,e("accountsPage.accountType.free"))})}),g.jsx(ge,{className:de(kr[3],"whitespace-normal"),children:oe}),g.jsx(ge,{children:yr(D.stats?.request_count)}),g.jsx(ge,{children:yr(D.stats?.error_count)}),g.jsx(ge,{className:de(kr[6]),children:yr(D.stats?.tokens_total)}),g.jsx(ge,{className:de(kr[7]),children:ld(D.stats?.avg_duration_ms)}),g.jsx(ge,{className:de(kr[8],"font-mono text-xs"),children:le}),g.jsx(ge,{children:g.jsx(er,{checked:D.runtime?.enabled!==!1,onCheckedChange:async ve=>{const re=D.runtime?.enabled!==!1;y(ze=>ze.map(Ee=>Ee.account_id===D.account_id?{...Ee,runtime:{...Ee.runtime,enabled:ve}}:Ee));try{await rre(D.account_id,{enabled:ve})}catch{y(ze=>ze.map(Ee=>Ee.account_id===D.account_id?{...Ee,runtime:{...Ee.runtime,enabled:re}}:Ee)),Lt.error(e("accountsPage.enabledToggleFailed"))}}})}),g.jsx(ge,{className:"text-right",children:g.jsxs("div",{className:"flex items-center justify-end gap-1",children:[g.jsx(ke,{variant:V?"default":"ghost",size:"sm",className:"h-8 px-2.5 text-xs","aria-label":e("accountManagement.reauthAriaLabel",{id:D.account_id}),onClick:()=>{R(D.account_id),_(!0)},children:e("accountManagement.reauth")}),g.jsx(ke,{variant:"ghost",size:"sm",className:"text-destructive h-8 px-2.5 text-xs","aria-label":e("accountManagement.deleteAriaLabel",{id:D.account_id}),onClick:()=>{O(D.account_id),j(!0)},children:e("accountManagement.delete")})]})})]},D.account_id)})})})]})]})]}),g.jsx(gM,{open:S,onOpenChange:C,onSuccess:z}),g.jsx(gM,{open:N,onOpenChange:_,onSuccess:z,reauthAccountId:M}),g.jsx(gie,{open:E,onOpenChange:j,accountId:T,onDeleted:z})]})}const Nu=[null,"hidden lg:table-cell","hidden lg:table-cell",null,null,null],u4=Nu.length;function wM(e){return e==null||!Number.isFinite(e)||e<=0?"":e>=1e3?`${Math.floor(e/1e3)}K`:String(Math.floor(e))}function SM(e){return e==null||!Number.isFinite(e)||e<=0?"—":String(Math.floor(e))}function Mm(e,t,n){const r=e?.trim(),i=t?.trim();if(!r&&!i)return 0;if(!r)return 1;if(!i)return-1;const o=r.toLowerCase().localeCompare(i.toLowerCase());return n==="asc"?o:-o}function nx(e,t,n){const r=typeof e=="number"&&Number.isFinite(e)?e:null,i=typeof t=="number"&&Number.isFinite(t)?t:null;if(r==null&&i==null)return 0;if(r==null)return 1;if(i==null)return-1;const o=r-i;return o===0?0:n==="asc"?o:-o}function AM(e){if(!e||e.length===0)return null;const t=e.map(n=>n.trim().toLowerCase()).filter(n=>n.length>0).sort();return t.length>0?t.join("|"):null}function CM(e){const t=[];return e.tool_calls&&t.push("tool_calls"),e.vision&&t.push("vision"),e.structured_outputs&&t.push("structured_outputs"),e.streaming&&t.push("streaming"),e.parallel_tool_calls&&t.push("parallel_tool_calls"),t.length>0?t.join("|"):null}function pu({columnKey:e,label:t,tooltip:n,sortKey:r,sortDir:i,onSort:o,className:l}){const u=r===e;let c="none";return u&&(c=i==="asc"?"ascending":"descending"),g.jsx(Pt,{"aria-sort":c,className:l,children:n?g.jsxs(la,{children:[g.jsx(ua,{asChild:!0,children:g.jsxs("button",{type:"button",onClick:()=>o(e),className:de("flex w-full cursor-pointer select-none items-center gap-1 text-left","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"),children:[g.jsx("span",{className:"cursor-help underline decoration-dashed decoration-current/30 underline-offset-2",children:t}),u?g.jsx("span",{className:"text-muted-foreground",children:i==="asc"?"↑":"↓"}):null]})}),g.jsx(Pi,{side:"bottom",className:"max-w-60",children:g.jsx("p",{children:n})})]}):g.jsxs("button",{type:"button",onClick:()=>o(e),className:de("flex w-full cursor-pointer select-none items-center gap-1 text-left","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"),children:[g.jsx("span",{children:t}),u?g.jsx("span",{className:"text-muted-foreground",children:i==="asc"?"↑":"↓"}):null]})})}function xie({rows:e}){return g.jsx(g.Fragment,{children:Array.from({length:e}).map((t,n)=>g.jsx(qe,{children:Array.from({length:u4}).map((r,i)=>g.jsx(ge,{className:de("py-3",Nu[i]),children:g.jsx(Js,{className:i===0?"h-4 w-48":"h-4 w-28"})},i))},n))})}function wie({supports:e}){const{t}=Ye(),n=[];return e.tool_calls&&n.push({key:"tool_calls",label:t("modelsPage.features.tools"),tooltip:t("modelsPage.featureTooltip.tools")}),e.vision&&n.push({key:"vision",label:t("modelsPage.features.vision"),tooltip:t("modelsPage.featureTooltip.vision")}),e.structured_outputs&&n.push({key:"structured_outputs",label:t("modelsPage.features.structuredOutputs"),tooltip:t("modelsPage.featureTooltip.structuredOutputs")}),e.streaming&&n.push({key:"streaming",label:t("modelsPage.features.streaming"),tooltip:t("modelsPage.featureTooltip.streaming")}),e.parallel_tool_calls&&n.push({key:"parallel_tool_calls",label:t("modelsPage.features.parallelTools"),tooltip:t("modelsPage.featureTooltip.parallelTools")}),n.length===0?g.jsx("span",{className:"text-muted-foreground",children:"—"}):g.jsx("div",{className:"flex flex-wrap gap-1 whitespace-normal",children:n.map(r=>g.jsxs(la,{children:[g.jsx(ua,{asChild:!0,children:g.jsx("button",{type:"button",className:"focus-visible:outline-none",children:g.jsx(an,{variant:"outline",className:"cursor-help text-xs",children:r.label})})}),g.jsx(Pi,{side:"bottom",className:"max-w-60",children:g.jsx("p",{children:r.tooltip})})]},r.key))})}function Sie({endpoints:e}){return!e||e.length===0?g.jsx("span",{className:"text-muted-foreground",children:"—"}):g.jsx("div",{className:"flex flex-wrap gap-1 whitespace-normal",children:e.map(t=>g.jsx(an,{variant:"secondary",className:"font-mono text-xs",children:t},t))})}function Aie({limits:e}){const{t}=Ye(),n=wM(e.max_prompt_tokens),r=wM(e.max_output_tokens),i=t("modelsPage.contextTooltip",{input:SM(e.max_prompt_tokens),output:SM(e.max_output_tokens)});return g.jsxs(la,{children:[g.jsx(ua,{asChild:!0,children:g.jsxs("button",{type:"button",className:"flex cursor-help items-center gap-3 tabular-nums focus-visible:outline-none",children:[g.jsx("span",{className:"text-muted-foreground text-xs",children:t("modelsPage.contextInputLabel")}),g.jsx("span",{children:n||"—"}),g.jsx("span",{className:"text-muted-foreground text-xs",children:t("modelsPage.contextOutputLabel")}),g.jsx("span",{children:r||"—"})]})}),g.jsx(Pi,{side:"bottom",className:"max-w-72",children:g.jsx("p",{children:i})})]})}const EM=3;function Cie({id:e,aliases:t}){const{t:n}=Ye(),[r,i]=v.useState(!1),o=r?t:t.slice(0,EM),l=t.length-EM;return g.jsxs("div",{className:"flex flex-wrap items-center gap-1 whitespace-normal",children:[g.jsx("span",{className:"max-w-[14rem] truncate font-mono text-xs",title:e,children:e}),o.map(u=>g.jsx(an,{variant:"outline",className:"max-w-[10rem] truncate font-mono text-xs",title:u,children:u},u)),!r&&l>0&&g.jsx("button",{type:"button",onClick:()=>i(!0),className:"text-muted-foreground hover:text-foreground cursor-pointer text-xs transition-colors",children:n("modelsPage.aliasesMore",{count:l})})]})}function Eie({billing:e}){const{t}=Ye(),n=e?.multiplier;return n==null?g.jsx("span",{className:"text-muted-foreground",children:"—"}):g.jsxs("div",{className:"flex items-center gap-2 tabular-nums",children:[g.jsxs("span",{children:[n,"x"]}),e?.is_premium?g.jsx(an,{variant:"default",className:"text-xs",children:t("modelsPage.badges.premium")}):null]})}function jie(){const{t:e}=Ye(),[t,n]=v.useState(!0),[r,i]=v.useState(null),[o,l]=v.useState([]),[u,c]=v.useState(""),[d,m]=v.useState(new Set),[h,y]=v.useState({key:null,dir:"asc"}),{key:b,dir:w}=h,S=v.useCallback(N=>{y(_=>_.key===N?{key:_.key,dir:_.dir==="asc"?"desc":"asc"}:{key:N,dir:"asc"})},[]),C=v.useCallback(N=>{m(_=>{const M=new Set(_);return M.has(N)?M.delete(N):M.add(N),M})},[]),E=v.useMemo(()=>{let N=0,_=0;for(const M of o)M.billing?.is_premium&&N++,M.preview&&_++;return{total:o.length,premium:N,preview:_}},[o]),j=v.useMemo(()=>{let N=o;const _=u.trim().toLowerCase();return _&&(N=N.filter(M=>M.name.toLowerCase().includes(_)||M.id.toLowerCase().includes(_)||M.aliases.some(R=>R.toLowerCase().includes(_)))),d.has("premium")&&(N=N.filter(M=>M.billing?.is_premium)),d.has("preview")&&(N=N.filter(M=>M.preview)),N},[o,u,d]),T=v.useMemo(()=>b?[...j].sort((N,_)=>{let M=0;switch(b){case"name":M=Mm(N.name,_.name,w);break;case"endpoints":M=Mm(AM(N.supported_endpoints),AM(_.supported_endpoints),w);break;case"originalId":M=Mm(N.id,_.id,w);break;case"context":M=nx(N.capabilities.limits.max_prompt_tokens,_.capabilities.limits.max_prompt_tokens,w),M===0&&(M=nx(N.capabilities.limits.max_output_tokens,_.capabilities.limits.max_output_tokens,w));break;case"features":M=Mm(CM(N.capabilities.supports),CM(_.capabilities.supports),w);break;case"multiplier":M=nx(N.billing?.multiplier,_.billing?.multiplier,w);break;default:M=0}return M!==0?M:N.id.localeCompare(_.id)}):j,[j,w,b]),O=v.useCallback(async()=>{n(!0),i(null);try{const N=await Xne();l(N.items)}catch(N){const _=N instanceof di?N.message:String(N);i(_),Lt.error(yt.t("modelsPage.toast.loadFailed"),{description:_})}finally{n(!1)}},[]);return v.useEffect(()=>{O()},[O]),g.jsxs("div",{className:"space-y-4",children:[r?g.jsx(xr,{variant:"error",title:e("modelsPage.loadFailedTitle"),description:r,actionLabel:e("common.retry"),onAction:()=>{O()}}):null,g.jsxs(gn,{children:[g.jsx(Dn,{children:g.jsxs("div",{className:"flex items-start justify-between gap-4",children:[g.jsxs("div",{children:[g.jsx(kn,{children:e("modelsPage.title")}),g.jsx(wr,{children:e("modelsPage.description")})]}),g.jsxs(ke,{variant:"outline",size:"sm",onClick:()=>{O()},disabled:t,children:[t?g.jsx(Bu,{className:"size-4 motion-safe:animate-spin"}):g.jsx(wp,{className:"size-4"}),e("common.refresh")]})]})}),g.jsxs(Ln,{className:"space-y-3",children:[g.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[g.jsxs("div",{className:"relative max-w-64 flex-1",children:[g.jsx(b7,{className:"text-muted-foreground pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2"}),g.jsx(Tt,{value:u,onChange:N=>c(N.target.value),placeholder:e("modelsPage.searchPlaceholder"),"aria-label":e("modelsPage.searchAriaLabel"),className:"pl-8"})]}),g.jsx(an,{asChild:!0,variant:d.has("premium")?"default":"outline",children:g.jsxs("button",{type:"button","aria-pressed":d.has("premium"),className:"cursor-pointer select-none transition-colors",onClick:()=>C("premium"),children:[e("modelsPage.badges.premium"),E.premium>0?` (${E.premium})`:""]})}),g.jsx(an,{asChild:!0,variant:d.has("preview")?"default":"outline",children:g.jsxs("button",{type:"button","aria-pressed":d.has("preview"),className:"cursor-pointer select-none transition-colors",onClick:()=>C("preview"),children:[e("modelsPage.badges.preview"),E.preview>0?` (${E.preview})`:""]})}),g.jsx("span",{className:de("text-muted-foreground ml-auto text-sm tabular-nums",!t&&o.length>0&&"motion-safe:animate-in motion-safe:fade-in-0"),children:j.length===E.total?e("modelsPage.totalCount",{count:E.total}):e("modelsPage.filteredCount",{filtered:j.length,total:E.total})})]}),g.jsxs(iv,{glow:!0,stickyHeader:!0,children:[g.jsx(WA,{children:g.jsxs(qe,{children:[g.jsx(pu,{columnKey:"name",label:e("modelsPage.columns.name"),tooltip:e("modelsPage.columnTooltip.name"),sortKey:b,sortDir:w,onSort:S}),g.jsx(pu,{columnKey:"endpoints",label:e("modelsPage.columns.endpoints"),tooltip:e("modelsPage.columnTooltip.endpoints"),sortKey:b,sortDir:w,onSort:S,className:Nu[1]}),g.jsx(pu,{columnKey:"originalId",label:e("modelsPage.columns.originalId"),tooltip:e("modelsPage.columnTooltip.originalId"),sortKey:b,sortDir:w,onSort:S,className:Nu[2]}),g.jsx(pu,{columnKey:"context",label:e("modelsPage.columns.context"),tooltip:e("modelsPage.columnTooltip.context"),sortKey:b,sortDir:w,onSort:S}),g.jsx(pu,{columnKey:"features",label:e("modelsPage.columns.features"),tooltip:e("modelsPage.columnTooltip.features"),sortKey:b,sortDir:w,onSort:S}),g.jsx(pu,{columnKey:"multiplier",label:e("modelsPage.columns.multiplier"),tooltip:e("modelsPage.columnTooltip.multiplier"),sortKey:b,sortDir:w,onSort:S})]})}),g.jsxs(av,{children:[t&&o.length===0&&g.jsx(xie,{rows:10}),!t&&j.length===0&&g.jsx(qe,{children:g.jsx(ge,{colSpan:u4,children:g.jsx(xr,{variant:"info",title:e("modelsPage.empty.title"),description:o.length>0?e("modelsPage.empty.noMatchesDescription"):e("modelsPage.empty.description")})})}),g.jsx(vA,{initial:!1,children:j.length>0&&T.map(N=>g.jsxs(io.tr,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15,ease:"easeOut"},"data-slot":"table-row",className:"hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",children:[g.jsx(ge,{className:"max-w-[16rem]",children:g.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[g.jsx("span",{className:"truncate",title:N.name,children:N.name}),N.preview?g.jsx(an,{variant:"outline",className:"shrink-0 text-xs",children:e("modelsPage.badges.preview")}):null]})}),g.jsx(ge,{className:de("max-w-[26rem]",Nu[1]),children:g.jsx(Sie,{endpoints:N.supported_endpoints})}),g.jsx(ge,{className:de("max-w-[26rem]",Nu[2]),children:g.jsx(Cie,{id:N.id,aliases:N.aliases})}),g.jsx(ge,{children:g.jsx(Aie,{limits:N.capabilities.limits})}),g.jsx(ge,{children:g.jsx(wie,{supports:N.capabilities.supports})}),g.jsx(ge,{children:g.jsx(Eie,{billing:N.billing})})]},N.id))})]})]})]})]})]})}function Tie(){const{t:e}=Ye();return g.jsx(io.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},transition:{duration:.25,ease:[.25,.1,.25,1]},children:g.jsx(gn,{children:g.jsxs(Dn,{children:[g.jsx(kn,{children:e("notFound.title")}),g.jsx(wr,{children:e("notFound.description")})]})})})}const Rm=200;function Oie(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function Ip(e,t){const n=t?.trim();if(!n)return e;const r=e.toLowerCase(),i=n.toLowerCase(),o=[];let l=0;for(;l<e.length;){const u=r.indexOf(i,l);if(u===-1){o.push(e.slice(l));break}u>l&&o.push(e.slice(l,u)),o.push(g.jsx("mark",{className:"bg-accent/50 text-foreground rounded px-0.5",children:e.slice(u,u+i.length)},`${u}-${i}`)),l=u+i.length}return g.jsx(g.Fragment,{children:o})}function Pie(e,t,n){if(e==null)return g.jsx("span",{className:"text-muted-foreground",children:"null"});if(typeof e=="string")return g.jsxs("span",{className:"text-foreground",children:['"',Ip(e,t),'"']});if(typeof e=="number"){const r=String(e);if(!n||!/_at_ms$/.test(n))return g.jsx("span",{className:"text-foreground",children:r});if(e<9466848e5||e>41024448e5)return g.jsx("span",{className:"text-foreground",children:r});const l=qu(e);return l?g.jsxs(g.Fragment,{children:[g.jsx("span",{className:"text-foreground",title:l,children:r}),g.jsxs("span",{className:"text-muted-foreground ml-1",children:["(",Ip(l,t),")"]})]}):g.jsx("span",{className:"text-foreground",children:r})}return typeof e=="boolean"?g.jsx("span",{className:"text-foreground",children:e?"true":"false"}):g.jsx("span",{className:"text-foreground",children:String(e)})}function rx({depth:e,name:t,valuePreview:n,expanded:r,toggle:i,t:o}){return g.jsxs("div",{className:"flex items-start gap-2",style:{paddingLeft:e*12},children:[i?g.jsx("button",{type:"button",onClick:i,className:"text-muted-foreground hover:text-foreground mt-0.5","aria-label":o(r?"jsonViewer.collapse":"jsonViewer.expand"),children:r?g.jsx(FS,{className:"size-4"}):g.jsx(WK,{className:"size-4"})}):g.jsx("span",{className:"size-4"}),t?g.jsxs(g.Fragment,{children:[g.jsx("span",{className:"text-muted-foreground",children:t}),g.jsx("span",{className:"text-muted-foreground",children:":"})]}):g.jsx("span",{className:"text-muted-foreground",children:o("jsonViewer.root")}),g.jsx("span",{className:"min-w-0 break-words",children:n})]})}function M1({value:e,name:t,path:n,depth:r,search:i,baseExpandDepth:o,expandedPaths:l,collapsedPaths:u,onToggle:c,t:d}){const m=Oie(e),h=Array.isArray(e),y=m||h,b=y&&(u.has(n)?!1:l.has(n)?!0:r<o);if(!y)return g.jsx(rx,{depth:r,name:t?Ip(t,i):void 0,valuePreview:Pie(e,i,t),expanded:!1,t:d});const w=h?e.length:Object.keys(e).length,S=h?d("jsonViewer.arrayLabel",{count:w}):d("jsonViewer.objectLabel",{count:w});return g.jsxs("div",{className:"space-y-1",children:[g.jsx(rx,{depth:r,name:t?Ip(t,i):void 0,valuePreview:g.jsx("span",{className:"text-muted-foreground",children:S}),expanded:b,toggle:()=>c(n,!b),t:d}),b?g.jsxs("div",{className:"space-y-1",children:[h?e.slice(0,Rm).map((C,E)=>g.jsx(M1,{value:C,name:`[${E}]`,path:`${n}[${E}]`,depth:r+1,search:i,baseExpandDepth:o,expandedPaths:l,collapsedPaths:u,onToggle:c,t:d},`${n}[${E}]`)):Object.entries(e).slice(0,Rm).map(([C,E])=>g.jsx(M1,{value:E,name:C,path:`${n}.${C}`,depth:r+1,search:i,baseExpandDepth:o,expandedPaths:l,collapsedPaths:u,onToggle:c,t:d},`${n}.${C}`)),w>Rm?g.jsx(rx,{depth:r+1,valuePreview:g.jsx("span",{className:"text-muted-foreground",children:d("jsonViewer.more",{count:w-Rm})}),expanded:!1,t:d}):null]}):null]})}function Nie({value:e,search:t,defaultExpandedDepth:n=2,className:r}){const[i,o]=v.useState(n),[l,u]=v.useState(()=>new Set),[c,d]=v.useState(()=>new Set),{t:m}=Ye();function h(S,C){if(C){d(E=>{const j=new Set(E);return j.delete(S),j}),u(E=>{const j=new Set(E);return j.add(S),j});return}u(E=>{const j=new Set(E);return j.delete(S),j}),d(E=>{const j=new Set(E);return j.add(S),j})}function y(){o(99),d(new Set),u(new Set)}function b(){o(0),u(new Set),d(new Set)}function w(){return i===0?m("jsonViewer.statusCollapsed"):i>=99?m("jsonViewer.statusExpanded"):m("jsonViewer.statusDepth",{depth:i})}return g.jsxs("div",{className:de("space-y-3",r),children:[g.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[g.jsx(ke,{type:"button",variant:"outline",size:"sm",onClick:y,children:m("jsonViewer.expandAll")}),g.jsx(ke,{type:"button",variant:"outline",size:"sm",onClick:b,children:m("jsonViewer.collapseAll")}),g.jsx("span",{className:"text-muted-foreground ml-auto text-xs",children:w()})]}),g.jsx("div",{className:"bg-muted/20 overflow-auto rounded-md border p-3 font-mono text-xs",children:g.jsx(M1,{value:e,path:"$",depth:0,search:t,baseExpandDepth:i,expandedPaths:l,collapsedPaths:c,onToggle:h,t:m})})]})}const ft="—";function _ie(e){return e.premium_unlimited_after?"∞":e.premium_remaining_after!=null?yr(e.premium_remaining_after):""}function Mie({status:e}){return e>=400?g.jsx(an,{variant:"destructive",children:e}):g.jsx(an,{variant:"secondary",children:e})}function Af({label:e}){return g.jsx(qe,{className:"hover:bg-transparent",children:g.jsx(ge,{colSpan:2,className:"bg-muted/30 py-1.5 text-[11px] font-medium tracking-wider text-muted-foreground uppercase",children:e})})}function tn({label:e,tooltip:t}){return t?g.jsxs(la,{children:[g.jsx(ua,{asChild:!0,children:g.jsx("span",{className:"cursor-help underline decoration-dashed decoration-current/30 underline-offset-2",children:e})}),g.jsx(Pi,{side:"right",className:"max-w-60",children:g.jsx("p",{children:t})})]}):g.jsx(g.Fragment,{children:e})}function Rie(){const{t:e}=Ye(),{requestId:t=""}=Jq(),r=ya().state?.fromSearch,i=r?`/requests?${r}`:"/requests",[o,l]=v.useState(!0),[u,c]=v.useState(!1),[d,m]=v.useState(null),[h,y]=v.useState(null),[b,w]=v.useState("");v.useEffect(()=>{let O=!1;async function N(){l(!0),y(null);try{const _=await Q0(t);if(O)return;m(_.item)}catch(_){if(O)return;const M=_ instanceof di?_.message:String(_);y(M),m(null)}finally{O||l(!1)}}return t&&N(),()=>{O=!0}},[t]);function S(){c(!0),Q0(t).then(O=>{m(O.item),y(null)}).catch(O=>{const N=O instanceof di?O.message:String(O);Lt.error(yt.t("requestDetailPage.loadFailedTitle"),{description:N})}).finally(()=>c(!1))}function C(){l(!0),y(null),Q0(t).then(O=>{m(O.item)}).catch(O=>{const N=O instanceof di?O.message:String(O);y(N),m(null)}).finally(()=>l(!1))}async function E(){if(d)try{const O=JSON.stringify(d,null,2);await navigator.clipboard.writeText(O),Lt.success(e("requestDetailPage.toast.copiedJson"))}catch(O){Lt.error(e("requestDetailPage.toast.copyFailed"),{description:String(O)})}}function j(){if(d)try{const O=JSON.stringify(d,null,2),N=new Blob([O],{type:"application/json"}),_=URL.createObjectURL(N),M=document.createElement("a");M.href=_,M.download=`${d.request_id}.json`,M.click(),URL.revokeObjectURL(_),Lt.success(e("requestDetailPage.toast.downloadedJson"))}catch(O){Lt.error(e("requestDetailPage.toast.downloadFailed"),{description:String(O)})}}if(o)return g.jsxs(gn,{children:[g.jsxs(Dn,{children:[g.jsx(kn,{children:e("requestDetailPage.title")}),g.jsx(wr,{children:g.jsx(Js,{className:"h-4 w-40"})})]}),g.jsx(Ln,{children:g.jsxs("div",{className:"space-y-2",children:[g.jsx(Js,{className:"h-4 w-64"}),g.jsx(Js,{className:"h-4 w-48"}),g.jsx(Js,{className:"h-24 w-full"})]})})]});if(h||!d)return g.jsxs("div",{className:"space-y-4",children:[g.jsx("div",{className:"flex items-center gap-2",children:g.jsx(ke,{variant:"ghost",size:"sm",asChild:!0,children:g.jsxs(es,{to:i,children:[g.jsx(sN,{className:"size-4"}),e("common.back")]})})}),g.jsxs(gn,{children:[g.jsxs(Dn,{children:[g.jsx(kn,{children:e("requestDetailPage.title")}),g.jsx(wr,{children:e("requestDetailPage.notFoundDescription")})]}),g.jsxs(Ln,{className:"space-y-3",children:[g.jsx(xr,{variant:"warning",title:e(h?"requestDetailPage.loadFailedTitle":"requestDetailPage.notFoundTitle"),description:h||`request_id: ${t}`}),g.jsxs(ke,{variant:"outline",size:"sm",onClick:C,children:[g.jsx(wp,{className:"size-4"}),e("common.retry")]})]})]})]});const T=_ie(d);return g.jsxs("div",{className:"space-y-4 motion-safe:animate-in motion-safe:fade-in-0 motion-safe:duration-300",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(ke,{variant:"ghost",size:"sm",asChild:!0,children:g.jsxs(es,{to:i,children:[g.jsx(sN,{className:"size-4"}),e("common.back")]})}),g.jsxs(ke,{variant:"ghost",size:"sm",className:"ml-auto",disabled:u,onClick:S,children:[u?g.jsx(Bu,{className:"size-4 animate-spin"}):g.jsx(wp,{className:"size-4"}),e("common.refresh")]})]}),g.jsx(gn,{className:"motion-safe:animate-in motion-safe:fade-in-0 motion-safe:slide-in-from-bottom-1 motion-safe:duration-300 fill-mode-backwards",style:{animationDelay:"50ms"},children:g.jsxs(Dn,{children:[g.jsxs(kn,{className:"flex flex-wrap items-center gap-2",children:[g.jsx("span",{className:"font-mono text-sm",children:d.request_id}),g.jsx(Mie,{status:d.http_status})]}),g.jsx(wr,{className:"font-mono text-xs",children:qu(d.started_at_ms)})]})}),g.jsxs("div",{className:"grid grid-cols-1 gap-3 lg:grid-cols-2 xl:grid-cols-[1fr_2fr]",children:[g.jsxs(gn,{className:"motion-safe:animate-in motion-safe:fade-in-0 motion-safe:slide-in-from-bottom-1 motion-safe:duration-300 fill-mode-backwards",style:{animationDelay:"100ms"},children:[g.jsx(Dn,{children:g.jsx(kn,{children:e("requestDetailPage.summaryTitle")})}),g.jsx(Ln,{children:g.jsx(iv,{children:g.jsxs(av,{children:[g.jsx(Af,{label:e("requestDetailPage.sections.request")}),g.jsxs(qe,{children:[g.jsx(ge,{className:"w-36 text-muted-foreground",children:e("requestDetailPage.fields.time")}),g.jsx(ge,{className:"font-mono text-xs",children:qu(d.started_at_ms)||ft})]}),g.jsxs(qe,{children:[g.jsx(ge,{className:"text-muted-foreground",children:e("requestDetailPage.fields.path")}),g.jsx(ge,{className:"font-mono text-xs whitespace-normal break-words",children:g.jsx(es,{to:`/requests?path=${encodeURIComponent(d.path)}`,className:"underline decoration-border hover:decoration-foreground",children:d.path})})]}),g.jsxs(qe,{children:[g.jsx(ge,{className:"text-muted-foreground",children:g.jsx(tn,{label:e("requestDetailPage.fields.endpoint"),tooltip:e("requestDetailPage.fieldTooltip.endpoint")})}),g.jsx(ge,{className:"font-mono text-xs whitespace-normal break-words",children:d.upstream_endpoint||ft})]}),g.jsxs(qe,{children:[g.jsx(ge,{className:"text-muted-foreground",children:e("requestDetailPage.fields.model")}),g.jsx(ge,{className:"font-mono text-xs",children:d.upstream_model||ft})]}),g.jsxs(qe,{children:[g.jsx(ge,{className:"text-muted-foreground",children:g.jsx(tn,{label:e("requestDetailPage.fields.duration"),tooltip:e("requestDetailPage.fieldTooltip.duration")})}),g.jsx(ge,{className:"font-mono text-xs",children:ld(d.duration_ms)||ft})]}),g.jsxs(qe,{children:[g.jsx(ge,{className:"text-muted-foreground",children:g.jsx(tn,{label:e("requestDetailPage.fields.ttfb"),tooltip:e("requestDetailPage.fieldTooltip.ttfb")})}),g.jsx(ge,{className:"font-mono text-xs",children:ld(d.ttfb_ms)||ft})]}),g.jsx(Af,{label:e("requestDetailPage.sections.routing")}),g.jsxs(qe,{children:[g.jsx(ge,{className:"text-muted-foreground",children:e("requestDetailPage.fields.account")}),g.jsxs(ge,{className:"font-mono text-xs whitespace-normal break-words",children:[d.account_id?g.jsx(es,{to:`/requests?account_id=${encodeURIComponent(d.account_id)}`,className:"underline decoration-border hover:decoration-foreground",children:d.account_id}):ft,d.affinity_hit?g.jsx(an,{variant:"outline",className:"ml-2",children:e("requestDetailPage.fields.affinityHit")}):null]})]}),d.affinity_cache_key?g.jsxs(qe,{children:[g.jsx(ge,{className:"text-muted-foreground",children:g.jsx(tn,{label:e("requestDetailPage.fields.affinityCacheKey"),tooltip:e("requestDetailPage.fieldTooltip.affinityCacheKey")})}),g.jsx(ge,{className:"font-mono text-xs whitespace-normal break-words",children:d.affinity_cache_key})]}):null,g.jsxs(qe,{children:[g.jsx(ge,{className:"text-muted-foreground",children:g.jsx(tn,{label:e("requestDetailPage.fields.affinityKeyUsed"),tooltip:e("requestDetailPage.fieldTooltip.affinityKeyUsed")})}),g.jsx(ge,{className:"font-mono text-xs whitespace-normal break-words",children:d.affinity_key_used||ft})]}),g.jsxs(qe,{children:[g.jsx(ge,{className:"text-muted-foreground",children:g.jsx(tn,{label:e("requestDetailPage.fields.affinityKeySource"),tooltip:e("requestDetailPage.fieldTooltip.affinityKeySource")})}),g.jsx(ge,{className:"font-mono text-xs whitespace-normal break-words",children:d.affinity_key_source||ft})]}),g.jsxs(qe,{children:[g.jsx(ge,{className:"text-muted-foreground",children:g.jsx(tn,{label:e("requestDetailPage.fields.selectionReason"),tooltip:e("requestDetailPage.fieldTooltip.selectionReason")})}),g.jsx(ge,{className:"font-mono text-xs whitespace-normal break-words",children:d.selection_reason||ft})]}),g.jsxs(qe,{children:[g.jsx(ge,{className:"text-muted-foreground",children:g.jsx(tn,{label:e("requestDetailPage.fields.initiator"),tooltip:e("requestDetailPage.fieldTooltip.initiator")})}),g.jsx(ge,{className:"font-mono text-xs whitespace-normal break-words",children:d.initiator||ft})]}),g.jsxs(qe,{children:[g.jsx(ge,{className:"text-muted-foreground",children:g.jsx(tn,{label:e("requestDetailPage.fields.upstreamRequestId"),tooltip:e("requestDetailPage.fieldTooltip.upstreamRequestId")})}),g.jsx(ge,{className:"font-mono text-xs whitespace-normal break-words",children:d.upstream_request_id||ft})]}),g.jsxs(qe,{children:[g.jsx(ge,{className:"text-muted-foreground",children:g.jsx(tn,{label:e("requestDetailPage.fields.upstreamErrorMessageRaw"),tooltip:e("requestDetailPage.fieldTooltip.upstreamErrorMessageRaw")})}),g.jsx(ge,{className:"font-mono text-xs whitespace-normal break-words",children:d.upstream_error_message_raw||ft})]}),g.jsx(Af,{label:e("requestDetailPage.sections.upstreamHeaders")}),g.jsxs(qe,{children:[g.jsx(ge,{className:"text-muted-foreground",children:g.jsx(tn,{label:e("requestDetailPage.fields.outboundXRequestId"),tooltip:e("requestDetailPage.fieldTooltip.outboundXRequestId")})}),g.jsx(ge,{className:"font-mono text-xs whitespace-normal break-words",children:d.outbound_x_request_id||ft})]}),g.jsxs(qe,{children:[g.jsx(ge,{className:"text-muted-foreground",children:g.jsx(tn,{label:e("requestDetailPage.fields.outboundXAgentTaskId"),tooltip:e("requestDetailPage.fieldTooltip.outboundXAgentTaskId")})}),g.jsx(ge,{className:"font-mono text-xs whitespace-normal break-words",children:d.outbound_x_agent_task_id||ft})]}),g.jsxs(qe,{children:[g.jsx(ge,{className:"text-muted-foreground",children:g.jsx(tn,{label:e("requestDetailPage.fields.outboundXInteractionType"),tooltip:e("requestDetailPage.fieldTooltip.outboundXInteractionType")})}),g.jsx(ge,{className:"font-mono text-xs whitespace-normal break-words",children:d.outbound_x_interaction_type||ft})]}),g.jsxs(qe,{children:[g.jsx(ge,{className:"text-muted-foreground",children:g.jsx(tn,{label:e("requestDetailPage.fields.outboundOpenaiIntent"),tooltip:e("requestDetailPage.fieldTooltip.outboundOpenaiIntent")})}),g.jsx(ge,{className:"font-mono text-xs whitespace-normal break-words",children:d.outbound_openai_intent||ft})]}),g.jsxs(qe,{children:[g.jsx(ge,{className:"text-muted-foreground",children:g.jsx(tn,{label:e("requestDetailPage.fields.outboundUserAgent"),tooltip:e("requestDetailPage.fieldTooltip.outboundUserAgent")})}),g.jsx(ge,{className:"font-mono text-xs whitespace-normal break-words",children:d.outbound_user_agent||ft})]}),g.jsx(Af,{label:e("requestDetailPage.sections.client")}),g.jsxs(qe,{children:[g.jsx(ge,{className:"text-muted-foreground",children:g.jsx(tn,{label:e("requestDetailPage.fields.userId"),tooltip:e("requestDetailPage.fieldTooltip.userId")})}),g.jsx(ge,{className:"font-mono text-xs whitespace-normal break-words",children:d.user_id||ft})]}),g.jsxs(qe,{children:[g.jsx(ge,{className:"text-muted-foreground",children:g.jsx(tn,{label:e("requestDetailPage.fields.safetyIdentifier"),tooltip:e("requestDetailPage.fieldTooltip.safetyIdentifier")})}),g.jsx(ge,{className:"font-mono text-xs whitespace-normal break-words",children:d.safety_identifier||ft})]}),g.jsxs(qe,{children:[g.jsx(ge,{className:"text-muted-foreground",children:g.jsx(tn,{label:e("requestDetailPage.fields.promptCacheKey"),tooltip:e("requestDetailPage.fieldTooltip.promptCacheKey")})}),g.jsx(ge,{className:"font-mono text-xs whitespace-normal break-words",children:d.prompt_cache_key||ft})]}),g.jsxs(qe,{children:[g.jsx(ge,{className:"text-muted-foreground",children:g.jsx(tn,{label:e("requestDetailPage.fields.clientIp"),tooltip:e("requestDetailPage.fieldTooltip.clientIp")})}),g.jsx(ge,{className:"font-mono text-xs whitespace-normal break-words",children:d.client_ip||ft})]}),g.jsxs(qe,{children:[g.jsx(ge,{className:"text-muted-foreground",children:g.jsx(tn,{label:e("requestDetailPage.fields.inboundUserAgent"),tooltip:e("requestDetailPage.fieldTooltip.inboundUserAgent")})}),g.jsx(ge,{className:"font-mono text-xs whitespace-normal break-words",children:d.user_agent||ft})]}),g.jsx(Af,{label:e("requestDetailPage.sections.usage")}),g.jsxs(qe,{children:[g.jsx(ge,{className:"text-muted-foreground",children:e("requestDetailPage.fields.tokens")}),g.jsx(ge,{className:"font-mono text-xs",children:g.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-0.5",children:[g.jsxs("span",{children:[g.jsxs("span",{className:"text-muted-foreground",children:[e("requestDetailPage.tokens.in"),":"]})," ",d.tokens_input!=null?yr(d.tokens_input):ft]}),g.jsxs("span",{children:[g.jsxs("span",{className:"text-muted-foreground",children:[e("requestDetailPage.tokens.out"),":"]})," ",d.tokens_output!=null?yr(d.tokens_output):ft]}),g.jsxs("span",{children:[g.jsxs("span",{className:"text-muted-foreground",children:[e("requestDetailPage.tokens.total"),":"]})," ",d.tokens_total!=null?yr(d.tokens_total):ft]}),g.jsxs("span",{children:[g.jsxs("span",{className:"text-muted-foreground",children:[e("requestDetailPage.tokens.cached"),":"]})," ",d.tokens_cached_input!=null?yr(d.tokens_cached_input):ft]})]})})]}),g.jsxs(qe,{children:[g.jsx(ge,{className:"text-muted-foreground",children:e("requestDetailPage.fields.quota")}),g.jsx(ge,{className:"font-mono text-xs",children:g.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-0.5",children:[g.jsxs("span",{children:[g.jsxs("span",{className:"text-muted-foreground",children:[e("requestDetailPage.quota.before"),":"]})," ",d.premium_remaining_before!=null?yr(d.premium_remaining_before):ft]}),g.jsxs("span",{children:[g.jsxs("span",{className:"text-muted-foreground",children:[e("requestDetailPage.quota.after"),":"]})," ",d.premium_remaining_after!=null?yr(d.premium_remaining_after):ft]}),g.jsxs("span",{children:[g.jsxs("span",{className:"text-muted-foreground",children:[e("requestDetailPage.quota.diff"),":"]})," ",d.premium_remaining_diff!=null?yr(d.premium_remaining_diff):ft,T?` (${T})`:""]})]})})]})]})})})]}),g.jsxs(gn,{className:"motion-safe:animate-in motion-safe:fade-in-0 motion-safe:slide-in-from-bottom-1 motion-safe:duration-300 fill-mode-backwards",style:{animationDelay:"150ms"},children:[g.jsxs(Dn,{children:[g.jsx(kn,{children:e("requestDetailPage.rawTitle")}),g.jsx(wr,{children:e("requestDetailPage.rawDescription")})]}),g.jsxs(Ln,{className:"space-y-3",children:[g.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center",children:[g.jsx(Tt,{placeholder:e("requestDetailPage.searchPlaceholder"),value:b,onChange:O=>w(O.target.value),className:"h-8 sm:max-w-xs"}),g.jsxs("div",{className:"flex items-center gap-2 sm:ml-auto",children:[g.jsxs(ke,{type:"button",variant:"outline",size:"sm",onClick:j,children:[g.jsx(sI,{className:"size-4"}),e("common.download")]}),g.jsx(ke,{type:"button",variant:"outline",size:"sm",onClick:()=>{E()},children:e("common.copyJson")})]})]}),g.jsx(Nie,{value:d,search:b})]})]})]})]})}const Die=59999;function c4(e){if(!e)return null;const t=Date.parse(e);return Number.isFinite(t)?t:null}function kie(e){const t=c4(e);return t==null?"":String(t)}function Lie(e){const t=c4(e);return t==null?"":String(t+Die)}function jM(e){const t=Number(e);if(!Number.isFinite(t))return"";const n=new Date(t),r=d=>String(d).padStart(2,"0"),i=n.getFullYear(),o=r(n.getMonth()+1),l=r(n.getDate()),u=r(n.getHours()),c=r(n.getMinutes());return`${i}-${o}-${l}T${u}:${c}`}var ix="rovingFocusGroup.onEntryFocus",Iie={bubbles:!1,cancelable:!0},zd="RovingFocusGroup",[R1,f4,zie]=H3(zd),[$ie,d4]=Cl(zd,[zie]),[Bie,Uie]=$ie(zd),h4=v.forwardRef((e,t)=>g.jsx(R1.Provider,{scope:e.__scopeRovingFocusGroup,children:g.jsx(R1.Slot,{scope:e.__scopeRovingFocusGroup,children:g.jsx(Vie,{...e,ref:t})})}));h4.displayName=zd;var Vie=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:l,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:c,onEntryFocus:d,preventScrollOnEntryFocus:m=!1,...h}=e,y=v.useRef(null),b=Mt(t,y),w=RA(o),[S,C]=Vu({prop:l,defaultProp:u??null,onChange:c,caller:zd}),[E,j]=v.useState(!1),T=as(d),O=f4(n),N=v.useRef(!1),[_,M]=v.useState(0);return v.useEffect(()=>{const R=y.current;if(R)return R.addEventListener(ix,T),()=>R.removeEventListener(ix,T)},[T]),g.jsx(Bie,{scope:n,orientation:r,dir:w,loop:i,currentTabStopId:S,onItemFocus:v.useCallback(R=>C(R),[C]),onItemShiftTab:v.useCallback(()=>j(!0),[]),onFocusableItemAdd:v.useCallback(()=>M(R=>R+1),[]),onFocusableItemRemove:v.useCallback(()=>M(R=>R-1),[]),children:g.jsx(Qe.div,{tabIndex:E||_===0?-1:0,"data-orientation":r,...h,ref:b,style:{outline:"none",...e.style},onMouseDown:Ve(e.onMouseDown,()=>{N.current=!0}),onFocus:Ve(e.onFocus,R=>{const I=!N.current;if(R.target===R.currentTarget&&I&&!E){const $=new CustomEvent(ix,Iie);if(R.currentTarget.dispatchEvent($),!$.defaultPrevented){const F=O().filter(L=>L.focusable),z=F.find(L=>L.active),Y=F.find(L=>L.id===S),se=[z,Y,...F].filter(Boolean).map(L=>L.ref.current);g4(se,m)}}N.current=!1}),onBlur:Ve(e.onBlur,()=>j(!1))})})}),m4="RovingFocusGroupItem",p4=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,children:l,...u}=e,c=Qa(),d=o||c,m=Uie(m4,n),h=m.currentTabStopId===d,y=f4(n),{onFocusableItemAdd:b,onFocusableItemRemove:w,currentTabStopId:S}=m;return v.useEffect(()=>{if(r)return b(),()=>w()},[r,b,w]),g.jsx(R1.ItemSlot,{scope:n,id:d,focusable:r,active:i,children:g.jsx(Qe.span,{tabIndex:h?0:-1,"data-orientation":m.orientation,...u,ref:t,onMouseDown:Ve(e.onMouseDown,C=>{r?m.onItemFocus(d):C.preventDefault()}),onFocus:Ve(e.onFocus,()=>m.onItemFocus(d)),onKeyDown:Ve(e.onKeyDown,C=>{if(C.key==="Tab"&&C.shiftKey){m.onItemShiftTab();return}if(C.target!==C.currentTarget)return;const E=Hie(C,m.orientation,m.dir);if(E!==void 0){if(C.metaKey||C.ctrlKey||C.altKey||C.shiftKey)return;C.preventDefault();let T=y().filter(O=>O.focusable).map(O=>O.ref.current);if(E==="last")T.reverse();else if(E==="prev"||E==="next"){E==="prev"&&T.reverse();const O=T.indexOf(C.currentTarget);T=m.loop?Kie(T,O+1):T.slice(O+1)}setTimeout(()=>g4(T))}}),children:typeof l=="function"?l({isCurrentTabStop:h,hasTabStop:S!=null}):l})})});p4.displayName=m4;var Fie={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function qie(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Hie(e,t,n){const r=qie(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Fie[r]}function g4(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Kie(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Gie=h4,Wie=p4,lv="Tabs",[Yie]=Cl(lv,[d4]),v4=d4(),[Xie,XA]=Yie(lv),y4=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:o,orientation:l="horizontal",dir:u,activationMode:c="automatic",...d}=e,m=RA(u),[h,y]=Vu({prop:r,onChange:i,defaultProp:o??"",caller:lv});return g.jsx(Xie,{scope:n,baseId:Qa(),value:h,onValueChange:y,orientation:l,dir:m,activationMode:c,children:g.jsx(Qe.div,{dir:m,"data-orientation":l,...d,ref:t})})});y4.displayName=lv;var b4="TabsList",x4=v.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,o=XA(b4,n),l=v4(n);return g.jsx(Gie,{asChild:!0,...l,orientation:o.orientation,dir:o.dir,loop:r,children:g.jsx(Qe.div,{role:"tablist","aria-orientation":o.orientation,...i,ref:t})})});x4.displayName=b4;var w4="TabsTrigger",S4=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...o}=e,l=XA(w4,n),u=v4(n),c=E4(l.baseId,r),d=j4(l.baseId,r),m=r===l.value;return g.jsx(Wie,{asChild:!0,...u,focusable:!i,active:m,children:g.jsx(Qe.button,{type:"button",role:"tab","aria-selected":m,"aria-controls":d,"data-state":m?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:c,...o,ref:t,onMouseDown:Ve(e.onMouseDown,h=>{!i&&h.button===0&&h.ctrlKey===!1?l.onValueChange(r):h.preventDefault()}),onKeyDown:Ve(e.onKeyDown,h=>{[" ","Enter"].includes(h.key)&&l.onValueChange(r)}),onFocus:Ve(e.onFocus,()=>{const h=l.activationMode!=="manual";!m&&!i&&h&&l.onValueChange(r)})})})});S4.displayName=w4;var A4="TabsContent",C4=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:o,...l}=e,u=XA(A4,n),c=E4(u.baseId,r),d=j4(u.baseId,r),m=r===u.value,h=v.useRef(m);return v.useEffect(()=>{const y=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(y)},[]),g.jsx(El,{present:i||m,children:({present:y})=>g.jsx(Qe.div,{"data-state":m?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":c,hidden:!y,id:d,tabIndex:0,...l,ref:t,style:{...e.style,animationDuration:h.current?"0s":void 0},children:y&&o})})});C4.displayName=A4;function E4(e,t){return`${e}-trigger-${t}`}function j4(e,t){return`${e}-content-${t}`}var Zie=y4,Qie=x4,Jie=S4,eae=C4;function tae({className:e,...t}){return g.jsx(Zie,{"data-slot":"tabs",className:de("flex flex-col gap-2",e),...t})}function nae({className:e,...t}){return g.jsx(Qie,{"data-slot":"tabs-list",className:de("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function TM({className:e,...t}){return g.jsx(Jie,{"data-slot":"tabs-trigger",className:de("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function OM({className:e,...t}){return g.jsx(eae,{"data-slot":"tabs-content",className:de("flex-1 outline-none",e),...t})}function ax(e){return{account_id:e.get("account_id")||"",upstream_model:e.get("upstream_model")||"",client_model:e.get("client_model")||"",upstream_endpoint:e.get("upstream_endpoint")||"",path:e.get("path")||"",status:e.get("status")||"",has_error:e.get("has_error")||"",from_ms:e.get("from_ms")||"",to_ms:e.get("to_ms")||""}}function rae(e){const t=new URLSearchParams;return[["account_id",e.account_id],["upstream_model",e.upstream_model],["client_model",e.client_model],["upstream_endpoint",e.upstream_endpoint],["path",e.path],["status",e.status],["has_error",e.has_error],["from_ms",e.from_ms],["to_ms",e.to_ms]].forEach(([n,r])=>{const i=r.trim();i&&t.set(n,i)}),t}function PM(e){const t=e.trim();if(!t)return null;const n=Number(t);if(!Number.isFinite(n))return null;const r=Math.trunc(n);return r<0?null:r}function iae(e,t){const n=PM(e),r=PM(t);return e.trim()&&n===null?"requestsPage.validation.fromMsMustBeNumber":t.trim()&&r===null?"requestsPage.validation.toMsMustBeNumber":n!==null&&r!==null&&n>r?"requestsPage.validation.fromMsMustBeLteToMs":null}function aae(e){const t=Date.now(),r={"15m":900*1e3,"1h":3600*1e3,"6h":360*60*1e3,"24h":1440*60*1e3,"7d":10080*60*1e3}[e];return{from_ms:String(t-r),to_ms:String(t)}}const Kt=[null,null,"hidden md:table-cell","hidden md:table-cell","hidden lg:table-cell","hidden xl:table-cell","hidden 2xl:table-cell","hidden 2xl:table-cell","hidden 2xl:table-cell","hidden 2xl:table-cell","hidden lg:table-cell",null];function gu({label:e,tooltip:t}){return t?g.jsxs(la,{children:[g.jsx(ua,{asChild:!0,children:g.jsx("span",{className:"cursor-help underline decoration-dashed decoration-current/30 underline-offset-2",children:e})}),g.jsx(Pi,{side:"bottom",className:"max-w-60",children:g.jsx("p",{children:t})})]}):g.jsx(g.Fragment,{children:e})}function oae({rows:e}){const t=Kt.length;return g.jsx(g.Fragment,{children:Array.from({length:e}).map((n,r)=>g.jsx(qe,{children:Array.from({length:t}).map((i,o)=>g.jsx(ge,{className:de("py-3",Kt[o]),children:g.jsx(Js,{className:o===1?"h-4 w-56":"h-4 w-24"})},o))},r))})}function sae(){const{t:e}=Ye(),[t,n]=HH(),[r,i]=v.useState(()=>ax(t)),[o,l]=v.useState([]),[u,c]=v.useState(null),[d,m]=v.useState(!1),[h,y]=v.useState(!1),[b,w]=v.useState(null),S=v.useMemo(()=>ax(t),[t]),[C,E]=v.useState(()=>{const G=ax(t);return G.from_ms||G.to_ms?"custom":"__any__"});v.useEffect(()=>{i(S);const G=!!(S.from_ms||S.to_ms);E(D=>G?D==="__any__"?"custom":D:"__any__")},[S]);const j=v.useMemo(()=>{const G=iae(r.from_ms,r.to_ms);return G?e(G):null},[r.from_ms,r.to_ms,e]),T=v.useCallback(async({reset:G,cursor:D})=>{L.current=!0,y(!0),w(null);try{const V=await Kne({...S,limit:50,cursor_id:G?null:D});l(K=>G?V.items:K.concat(V.items)),c(V.next_cursor_id??null),m(!!V.has_more)}catch(V){const K=V instanceof di?V.message:String(V);w(K),Lt.error(yt.t("requestsPage.loadFailedTitle"),{description:K}),G&&l([]),m(!1),c(null)}finally{L.current=!1,y(!1)}},[S]);v.useEffect(()=>{T({reset:!0,cursor:null})},[T]);function O(){j||n(rae(r))}function N(){n(new URLSearchParams)}function _(G){if(E(G),G==="__any__"){i(K=>({...K,from_ms:"",to_ms:""}));return}if(G==="custom")return;const{from_ms:D,to_ms:V}=aae(G);i(K=>({...K,from_ms:D,to_ms:V}))}const M=v.useMemo(()=>C==="custom"?jM(r.from_ms):"",[r.from_ms,C]),R=v.useMemo(()=>C==="custom"?jM(r.to_ms):"",[r.to_ms,C]),I=!h&&!j,$=Kt.length,F=t.toString().length>0,z=v.useMemo(()=>{let G=0;for(const[,D]of t)D.trim()&&G++;return G},[t]),[Y,Q]=v.useState(0),se=v.useRef(null),L=v.useRef(!1);v.useEffect(()=>{let G=!1;if(se.current&&(clearTimeout(se.current),se.current=null),Y>0){const D=()=>{G||(se.current=setTimeout(async()=>{if(L.current){D();return}try{await T({reset:!0,cursor:null})}finally{D()}},Y))};D()}return()=>{G=!0,se.current&&(clearTimeout(se.current),se.current=null)}},[Y,T]);const q=v.useRef(O);q.current=O;const B=v.useRef(null);v.useEffect(()=>{function G(D){if(D.key!=="Enter")return;const V=D.target;if(!V||!B.current?.contains(V))return;const K=V.tagName;K==="TEXTAREA"||K==="BUTTON"||K==="A"||K==="SELECT"||V.isContentEditable||V.closest("[role=dialog]")||V.closest("[role=listbox]")||V.closest("[role=button]")||(D.preventDefault(),q.current())}return document.addEventListener("keydown",G),()=>document.removeEventListener("keydown",G)},[]);let ae=e("common.noMore");return d&&(ae=e(h?"common.loading":"common.loadMore")),g.jsxs("div",{className:"space-y-4",children:[g.jsxs(gn,{className:"gap-4 py-4",children:[g.jsxs(Dn,{className:"px-4",children:[g.jsx(kn,{children:e("nav.requests")}),g.jsx(wr,{className:"hidden sm:block",children:e("requestsPage.description")}),g.jsxs(nie,{className:"flex items-center gap-2",children:[z>0&&g.jsx(an,{variant:"secondary",className:"text-xs",children:e("requestsPage.activeFilters",{count:z})}),g.jsx(ke,{type:"button",variant:"outline",size:"sm",onClick:N,disabled:!F||h,children:e("common.clear")}),g.jsxs(ke,{onClick:O,disabled:!I,size:"sm",children:[h&&g.jsx(Bu,{className:"size-4 motion-safe:animate-spin"}),e("common.apply")]})]})]}),g.jsxs(Ln,{ref:B,className:"space-y-3 px-4",children:[g.jsxs(tae,{defaultValue:"quick",className:"gap-1.5",children:[g.jsxs(nae,{className:"h-8 p-[2px]",children:[g.jsx(TM,{value:"quick",children:e("requestsPage.tabs.quick")}),g.jsx(TM,{value:"advanced",children:e("requestsPage.tabs.advanced")})]}),g.jsx(OM,{value:"quick",children:g.jsxs("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-6",children:[g.jsxs("div",{className:"grid gap-1.5",children:[g.jsx(Ct,{htmlFor:"account_id",className:"text-muted-foreground lg:text-xs",children:e("common.account")}),g.jsx(Tt,{id:"account_id",className:"h-8",placeholder:"octocat",value:r.account_id,onChange:G=>i(D=>({...D,account_id:G.target.value}))})]}),g.jsxs("div",{className:"grid gap-1.5",children:[g.jsx(Ct,{className:"text-muted-foreground lg:text-xs",children:e("requestsPage.filters.timeRange")}),g.jsxs(zn,{value:C,onValueChange:G=>_(G),children:[g.jsx(Bn,{size:"sm",className:"w-full",children:g.jsx($n,{})}),g.jsxs(Un,{children:[g.jsx(Oe,{value:"__any__",children:e("common.any")}),g.jsx(Oe,{value:"15m",children:e("requestsPage.timeRange.last15m")}),g.jsx(Oe,{value:"1h",children:e("requestsPage.timeRange.last1h")}),g.jsx(Oe,{value:"6h",children:e("requestsPage.timeRange.last6h")}),g.jsx(Oe,{value:"24h",children:e("requestsPage.timeRange.last24h")}),g.jsx(Oe,{value:"7d",children:e("requestsPage.timeRange.last7d")}),g.jsx(Oe,{value:"custom",children:e("requestsPage.timeRange.custom")})]})]})]}),g.jsxs("div",{className:"grid gap-1.5",children:[g.jsx(Ct,{htmlFor:"status",className:"text-muted-foreground lg:text-xs",children:e("common.status")}),g.jsx(Tt,{id:"status",className:"h-8",placeholder:"200",value:r.status,onChange:G=>i(D=>({...D,status:G.target.value}))})]}),g.jsxs("div",{className:"grid gap-1.5",children:[g.jsx(Ct,{className:"text-muted-foreground lg:text-xs",children:e("requestsPage.filters.hasError")}),g.jsxs(zn,{value:r.has_error||"__any__",onValueChange:G=>i(D=>({...D,has_error:G==="__any__"?"":G})),children:[g.jsx(Bn,{size:"sm",className:"w-full",children:g.jsx($n,{})}),g.jsxs(Un,{children:[g.jsx(Oe,{value:"__any__",children:e("common.any")}),g.jsx(Oe,{value:"1",children:e("common.yes")}),g.jsx(Oe,{value:"0",children:e("common.no")})]})]})]}),C==="custom"?g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"grid gap-1.5",children:[g.jsx(Ct,{htmlFor:"from_dt",className:"text-muted-foreground lg:text-xs",children:e("common.from")}),g.jsx(Tt,{id:"from_dt",className:"h-8",type:"datetime-local",value:M,onChange:G=>{E("custom"),i(D=>({...D,from_ms:kie(G.target.value)}))}})]}),g.jsxs("div",{className:"grid gap-1.5",children:[g.jsx(Ct,{htmlFor:"to_dt",className:"text-muted-foreground lg:text-xs",children:e("common.to")}),g.jsx(Tt,{id:"to_dt",className:"h-8",type:"datetime-local",value:R,onChange:G=>{E("custom"),i(D=>({...D,to_ms:Lie(G.target.value)}))}})]})]}):null]})}),g.jsx(OM,{value:"advanced",children:g.jsxs("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:[g.jsxs("div",{className:"grid gap-1.5",children:[g.jsx(Ct,{htmlFor:"upstream_model",className:"text-muted-foreground lg:text-xs",children:e("requestsPage.filters.upstreamModel")}),g.jsx(Tt,{id:"upstream_model",className:"h-8",placeholder:"gpt-5",value:r.upstream_model,onChange:G=>i(D=>({...D,upstream_model:G.target.value}))})]}),g.jsxs("div",{className:"grid gap-1.5",children:[g.jsx(Ct,{htmlFor:"client_model",className:"text-muted-foreground lg:text-xs",children:e("requestsPage.filters.clientModel")}),g.jsx(Tt,{id:"client_model",className:"h-8",placeholder:"claude-sonnet-4",value:r.client_model,onChange:G=>i(D=>({...D,client_model:G.target.value}))})]}),g.jsxs("div",{className:"grid gap-1.5",children:[g.jsx(Ct,{htmlFor:"upstream_endpoint",className:"text-muted-foreground lg:text-xs",children:e("common.endpoint")}),g.jsx(Tt,{id:"upstream_endpoint",className:"h-8",placeholder:"/responses",value:r.upstream_endpoint,onChange:G=>i(D=>({...D,upstream_endpoint:G.target.value}))})]}),g.jsxs("div",{className:"grid gap-1.5",children:[g.jsx(Ct,{htmlFor:"path",className:"text-muted-foreground lg:text-xs",children:e("common.path")}),g.jsx(Tt,{id:"path",className:"h-8",placeholder:"/v1/messages",value:r.path,onChange:G=>i(D=>({...D,path:G.target.value}))})]})]})})]}),j?g.jsx(xr,{variant:"warning",title:e("requestsPage.validation.title"),description:j}):null]})]}),g.jsxs("div",{className:"flex items-center justify-between motion-safe:animate-in motion-safe:fade-in-0 motion-safe:duration-300",children:[g.jsx("span",{className:"text-muted-foreground text-sm",children:o.length>0?d?e("requestsPage.resultCountWithMore",{count:o.length}):e("requestsPage.resultCount",{count:o.length}):null}),g.jsxs("div",{className:"flex items-center gap-2",children:[Y>0&&g.jsxs("span",{className:"relative flex h-2 w-2",children:[g.jsx("span",{className:"bg-primary absolute inline-flex h-full w-full motion-safe:animate-ping rounded-full opacity-75"}),g.jsx("span",{className:"bg-primary relative inline-flex h-2 w-2 rounded-full"})]}),g.jsx("span",{className:"text-muted-foreground text-sm",children:e("requestsPage.autoRefreshLabel")}),g.jsxs(zn,{value:String(Y),onValueChange:G=>Q(Number(G)),children:[g.jsx(Bn,{size:"sm",className:"w-20",children:g.jsx($n,{})}),g.jsxs(Un,{align:"end",children:[g.jsx(Oe,{value:"0",children:e("requestsPage.autoRefresh.off")}),g.jsx(Oe,{value:"30000",children:e("requestsPage.autoRefresh.30s")}),g.jsx(Oe,{value:"60000",children:e("requestsPage.autoRefresh.60s")}),g.jsx(Oe,{value:"300000",children:e("requestsPage.autoRefresh.5m")})]})]})]})]}),g.jsx(gn,{className:"gap-4 py-4",children:g.jsxs(Ln,{className:"space-y-4 px-4",children:[b&&o.length>0?g.jsx(xr,{variant:"error",title:e("requestsPage.loadFailedTitle"),description:b,actionLabel:e("common.retry"),onAction:()=>{T({reset:!0,cursor:null})}}):null,g.jsxs(iv,{glow:!0,stickyHeader:!0,className:"[&_th]:h-9 [&_td]:py-1.5",children:[g.jsx(WA,{children:g.jsxs(qe,{children:[g.jsx(Pt,{children:e("common.time")}),g.jsx(Pt,{children:e("common.path")}),g.jsx(Pt,{className:de(Kt[2],"text-muted-foreground"),children:e("common.endpoint")}),g.jsx(Pt,{className:de(Kt[3]),children:e("common.account")}),g.jsx(Pt,{className:de(Kt[4]),children:e("common.model")}),g.jsx(Pt,{className:de(Kt[5],"text-muted-foreground"),children:g.jsx(gu,{label:e("common.xInitiator"),tooltip:e("requestsPage.columnTooltip.initiator")})}),g.jsx(Pt,{className:de(Kt[6],"text-muted-foreground"),children:g.jsx(gu,{label:e("common.subagentRequest"),tooltip:e("requestsPage.columnTooltip.subagentRequest")})}),g.jsx(Pt,{className:de(Kt[7],"text-muted-foreground"),children:g.jsx(gu,{label:e("common.tokens"),tooltip:e("requestsPage.columnTooltip.tokens")})}),g.jsx(Pt,{className:de(Kt[8],"text-muted-foreground"),children:g.jsx(gu,{label:e("common.cost"),tooltip:e("requestsPage.columnTooltip.cost")})}),g.jsx(Pt,{className:de(Kt[9],"text-muted-foreground"),children:g.jsx(gu,{label:e("common.quota"),tooltip:e("requestsPage.columnTooltip.quota")})}),g.jsx(Pt,{className:de(Kt[10],"text-muted-foreground"),children:g.jsx(gu,{label:e("common.durationAbbrev"),tooltip:e("requestsPage.columnTooltip.duration")})}),g.jsx(Pt,{children:e("common.status")})]})}),g.jsx(av,{children:b&&!h&&o.length===0?g.jsx(qe,{children:g.jsx(ge,{colSpan:$,children:g.jsx(xr,{variant:"error",title:e("requestsPage.loadFailedTitle"),description:b,actionLabel:e("common.retry"),onAction:()=>{T({reset:!0,cursor:null})}})})}):h&&o.length===0?g.jsx(oae,{rows:6}):o.length===0?g.jsx(qe,{children:g.jsx(ge,{colSpan:$,children:g.jsx(xr,{variant:"info",title:e("requestsPage.empty.noRequestsTitle"),description:e(F?"requestsPage.empty.noResultsForFilters":"requestsPage.empty.noRequestsFound"),actionLabel:F?e("common.clearFilters"):void 0,onAction:F?N:void 0})})}):o.map(G=>{const D=G.premium_unlimited_after?"∞":G.premium_remaining_after!=null?yr(G.premium_remaining_after):"",V=G.http_status>=400?g.jsxs(an,{variant:"destructive","aria-label":`Error ${G.http_status}`,children:[g.jsx("span",{"aria-hidden":"true",className:"mr-0.5",children:"!"}),G.http_status]}):g.jsx(an,{variant:"secondary",children:G.http_status});return g.jsxs(qe,{children:[g.jsx(ge,{className:"font-mono text-xs",children:qu(G.started_at_ms)}),g.jsx(ge,{className:"font-mono text-sm whitespace-normal break-words",children:g.jsx(es,{to:`/request/${encodeURIComponent(G.request_id)}`,state:{fromSearch:t.toString()},className:"underline decoration-border hover:decoration-foreground",children:G.path})}),g.jsx(ge,{className:de(Kt[2],"font-mono text-xs text-muted-foreground whitespace-normal break-words"),children:G.upstream_endpoint||""}),g.jsxs(ge,{className:de(Kt[3],"font-mono text-xs whitespace-normal break-words"),children:[G.account_id||"",G.affinity_hit?g.jsxs(la,{children:[g.jsx(ua,{asChild:!0,children:g.jsx(an,{variant:"outline",className:"ml-1 px-1 py-0 text-[10px] leading-tight align-middle","aria-label":e("requestsPage.affinityHit"),children:"affinity"})}),g.jsxs(Pi,{children:[g.jsx("p",{children:e("requestsPage.affinityHit")}),G.affinity_cache_key&&g.jsx("p",{className:"font-mono text-xs opacity-80",children:G.affinity_cache_key})]})]}):null]}),g.jsx(ge,{className:de(Kt[4],"font-mono text-xs"),children:G.upstream_model||""}),g.jsx(ge,{className:de(Kt[5],"font-mono text-xs text-muted-foreground"),children:G.initiator||""}),g.jsx(ge,{className:de(Kt[6],"text-xs text-center text-muted-foreground"),children:G.is_subagent?"√":""}),g.jsx(ge,{className:de(Kt[7],"font-mono text-xs text-muted-foreground"),children:G.tokens_total!=null?yr(G.tokens_total):""}),g.jsx(ge,{className:de(Kt[8],"font-mono text-xs text-muted-foreground"),children:G.cost_units??""}),g.jsx(ge,{className:de(Kt[9],"font-mono text-xs text-muted-foreground"),children:D}),g.jsx(ge,{className:de(Kt[10],"font-mono text-xs text-muted-foreground"),children:ld(G.duration_ms)}),g.jsx(ge,{children:V})]},G.request_id)})})]}),g.jsx("div",{className:"flex items-center justify-end gap-2",children:g.jsxs(ke,{variant:"outline",onClick:()=>{T({reset:!1,cursor:u})},disabled:h||!d,size:"sm",children:[h&&g.jsx(Bu,{className:"size-4 motion-safe:animate-spin"}),ae]})})]})})]})}function lae({saving:e,canSave:t,onSave:n,className:r}){const{t:i}=Ye();return g.jsx("div",{className:de("fixed bottom-6 right-6 z-50","motion-safe:animate-in motion-safe:fade-in-0 motion-safe:slide-in-from-bottom-4 motion-safe:duration-300",r),children:g.jsx(ke,{type:"button",size:"lg",onClick:()=>{e||!t||n()},disabled:!t||e,className:"shadow-lg",children:i(e?"settingsPage.saveButton.saving":"settingsPage.saveButton.saveChanges")})})}function uae({sections:e,activeSection:t,onSectionClick:n,className:r}){const{t:i}=Ye();return g.jsxs("nav",{className:de("sticky top-6 space-y-1 rounded-lg border bg-card p-2",r),"aria-label":i("settingsPage.navigation.ariaLabel"),children:[g.jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground uppercase tracking-wider",children:i("nav.settings")}),e.map(o=>{const l=t===o.id;return g.jsx("button",{type:"button",onClick:()=>n(o.id),className:de("w-full text-left px-3 py-2 rounded-md text-sm transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",l?"bg-accent/50 font-medium text-foreground":"text-muted-foreground"),"aria-current":l?"page":void 0,"aria-controls":o.id,children:o.label},o.id)})]})}const Vs=v.forwardRef(({id:e,isActive:t,children:n,className:r,style:i},o)=>g.jsx("div",{ref:o,id:e,"data-section-id":e,className:de("scroll-mt-6 rounded-xl transition-shadow","motion-safe:animate-in motion-safe:fade-in-0 motion-safe:slide-in-from-bottom-1 motion-safe:duration-300 fill-mode-backwards",t&&"ring-1 ring-primary/30",r),style:i,children:n}));Vs.displayName="SettingsSectionCard";function cae({sectionIds:e,rootMargin:t="-20% 0px -60% 0px",threshold:n=0}){const[r,i]=v.useState(e[0]??""),o=v.useRef(new Map),l=v.useRef(null),u=v.useCallback((d,m)=>{if(m)o.current.set(d,m),l.current?.observe(m);else{const h=o.current.get(d);h&&l.current?.unobserve(h),o.current.delete(d)}},[]),c=v.useCallback(d=>{const m=o.current.get(d);m&&m.scrollIntoView({behavior:"smooth",block:"start"})},[]);return v.useEffect(()=>{const d=new IntersectionObserver(m=>{const h=m.filter(y=>y.isIntersecting);if(h.length>0){h.sort((w,S)=>w.boundingClientRect.top-S.boundingClientRect.top);const b=h[0].target.dataset.sectionId;b&&i(b)}},{rootMargin:t,threshold:n});l.current=d;for(const m of o.current.values())d.observe(m);return()=>{d.disconnect(),l.current=null}},[t,n]),{activeSection:r,registerSection:u,scrollToSection:c}}function Ku({className:e,...t}){return g.jsx("textarea",{"data-slot":"textarea",className:de("placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input min-h-[96px] w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...t})}const fae=["general","reasoning","aliases","prompts","advanced","providers"],D1=["none","minimal","low","medium","high","xhigh"];function ZA({next:e,record:t,setJson:n,setError:r,setMode:i}){e&&n(JSON.stringify(t??{},null,2)),r(null),i(e?"json":"form")}function QA({value:e,parse:t,setJson:n,setError:r,onRecord:i}){n(e);const o=t(e);if("error"in o){r(o.error);return}r(null),i(o.record)}function cd(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function k1(e){if(e===void 0)return;if(e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string")return e;if(Array.isArray(e)){const n=e.map(r=>k1(r)).filter(r=>r!==void 0);return n.length===0?void 0:(n.every(r=>typeof r!="object"||r===null)&&n.sort((r,i)=>JSON.stringify(r).localeCompare(JSON.stringify(i))),n)}if(!cd(e))return;const t=Object.entries(e).map(([n,r])=>[n,k1(r)]).filter(([,n])=>n!==void 0).sort(([n],[r])=>n.localeCompare(r));if(t.length!==0)return Object.fromEntries(t)}function NM(e){return JSON.stringify(k1(e)??{})}function Mi(){return typeof globalThis.crypto?.randomUUID=="function"?globalThis.crypto.randomUUID():`${Date.now()}-${Math.random().toString(16).slice(2)}`}function dae(e){return Array.isArray(e)?[...new Set(e.filter(t=>typeof t=="string").map(t=>t.trim()).filter(t=>t.length>0))]:[]}function _M(e){const t=dae(e.auth?.apiKeys);if(t.length>0)return t;const n=e.apiKey?.trim();return n?[n]:[]}function hae(e){return T4(e)}function T4(e){return[...new Set(e.split(/\r?\n|,/).map(t=>t.trim()).filter(t=>t.length>0))]}function MM(e){return e?Object.entries(e).map(([t,n])=>({id:Mi(),model:t,prompt:n})):[]}function RM(e){return e?Object.entries(e).map(([t,n])=>({id:Mi(),model:t,effort:n})):[]}function L1(e){return e?Object.entries(e).map(([t,n])=>typeof n=="string"?{id:Mi(),alias:t,target:n,allowOriginal:void 0}:{id:Mi(),alias:t,target:n.target,allowOriginal:n.allowOriginal}):[]}function DM(e){const t={};for(const n of e){const r=n.model.trim();r&&(t[r]=n.prompt)}return t}function kM(e){const t={};for(const n of e){const r=n.model.trim();r&&(t[r]=n.effort)}return t}const O4=new Set(["__proto__","constructor","prototype"]);function cp(e){const t=Object.create(null),n=new Set;for(const r of e){const i=r.alias.trim(),o=r.target.trim();if(!i||!o)continue;const l=i.toLowerCase();O4.has(l)||l!==o.toLowerCase()&&(n.has(l)||(n.add(l),t[i]=r.allowOriginal===void 0?{target:o}:{target:o,allowOriginal:r.allowOriginal}))}return t}const P4=new Set(["__proto__","constructor","prototype"]);function mae(e){return e?Object.entries(e).map(([t,n])=>({id:Mi(),name:t,type:n.type??"anthropic",enabled:n.enabled??!0,baseUrl:n.baseUrl??"",apiKey:n.apiKey??"",authType:n.authType??"x-api-key",adjustInputTokens:n.adjustInputTokens??!1,models:Object.entries(n.models??{}).map(([r,i])=>({id:Mi(),model:r,temperature:i.temperature===void 0?"":String(i.temperature),topP:i.topP===void 0?"":String(i.topP),topK:i.topK===void 0?"":String(i.topK)}))})):[]}function pae(e){return e.enabled===!1||e.baseUrl.trim()||e.apiKey.trim()||e.authType!=="x-api-key"||e.adjustInputTokens?!0:e.models.some(t=>!!t.model.trim()||!!t.temperature.trim()||!!t.topP.trim()||!!t.topK.trim())}function gae(e,t,n){const r=e.model.trim(),i=e.temperature.trim(),o=e.topP.trim(),l=e.topK.trim(),u=!!(i||o||l);if(!r)return u?{error:`Provider '${t}': model id is required when setting overrides.`}:{record:null};const c=r.toLowerCase();if(P4.has(c))return{error:`Provider '${t}' model '${r}' is not allowed.`};if(n.has(c))return{error:`Provider '${t}' model '${r}' is duplicated.`};const d={};if(i){const m=Number(i);if(!Number.isFinite(m)||m<0)return{error:`Provider '${t}' model '${r}': temperature must be a non-negative number.`};d.temperature=m}if(o){const m=Number(o);if(!Number.isFinite(m)||m<0)return{error:`Provider '${t}' model '${r}': topP must be a non-negative number.`};d.topP=m}if(l){const m=Number(l);if(!Number.isFinite(m)||m<0)return{error:`Provider '${t}' model '${r}': topK must be a non-negative number.`};d.topK=m}return Object.keys(d).length===0?{record:null}:(n.add(c),{record:{modelId:r,config:d}})}function vae(e,t){const n=Object.create(null),r=new Set;for(const i of e){const o=gae(i,t,r);if("error"in o)return o;o.record&&(n[o.record.modelId]=o.record.config)}return{record:n}}function yae(e){const t=Object.create(null),n=new Set;for(const r of e){const i=r.name.trim();if(!i){if(pae(r))return{error:"Provider name is required."};continue}const o=i.toLowerCase();if(P4.has(o))return{error:`Provider '${i}' is not allowed.`};if(n.has(o))return{error:`Provider '${i}' is duplicated.`};n.add(o);const l=r.baseUrl.trim(),u=r.apiKey.trim(),c={type:r.type||"anthropic",enabled:r.enabled,baseUrl:l||void 0,apiKey:u||void 0,authType:r.authType,adjustInputTokens:r.adjustInputTokens},d=vae(r.models,i);if("error"in d)return d;Object.keys(d.record).length>0&&(c.models=d.record),t[i]=c}return{record:t}}function bae(e){const[t,n]=v.useState([]),[r,i]=v.useState(null),o=v.useCallback(b=>{n(mae(b)),i(null)},[]),l=v.useCallback(b=>{n(b);const w=yae(b);if("error"in w){i(w.error);return}i(null),e(w.record)},[e]),u=v.useCallback(()=>{l(t.concat({id:Mi(),name:"",type:"anthropic",enabled:!0,baseUrl:"",apiKey:"",authType:"x-api-key",adjustInputTokens:!1,models:[]}))},[t,l]),c=v.useCallback(b=>{l(t.filter(w=>w.id!==b))},[t,l]),d=v.useCallback((b,w)=>{const S=t.map(C=>C.id===b?{...C,...w}:C);l(S)},[t,l]),m=v.useCallback(b=>{const w=t.map(S=>S.id!==b?S:{...S,models:S.models.concat({id:Mi(),model:"",temperature:"",topP:"",topK:""})});l(w)},[t,l]),h=v.useCallback((b,w)=>{const S=t.map(C=>C.id!==b?C:{...C,models:C.models.filter(E=>E.id!==w)});l(S)},[t,l]),y=v.useCallback((b,w,S)=>{const C=t.map(E=>E.id!==b?E:{...E,models:E.models.map(j=>j.id===w?{...j,...S}:j)});l(C)},[t,l]);return{items:t,issue:r,onAddProvider:u,onRemoveProvider:c,onUpdateProvider:d,onAddModel:m,onRemoveModel:h,onUpdateModel:y,setFromRecord:o}}function xae(e){if(!e.trim())return{record:{}};try{const t=JSON.parse(e);if(!cd(t))return{error:"extraPrompts JSON must be an object of string values."};const n={};for(const[r,i]of Object.entries(t)){if(typeof i!="string")return{error:`extraPrompts.${r} must be a string.`};n[r]=i}return{record:n}}catch{return{error:"extraPrompts JSON is not valid."}}}function wae(e){if(!e.trim())return{record:{}};try{const t=JSON.parse(e);if(!cd(t))return{error:"modelReasoningEfforts JSON must be an object."};const n={};for(const[r,i]of Object.entries(t)){if(typeof i!="string")return{error:`modelReasoningEfforts.${r} must be a string.`};if(!D1.includes(i))return{error:`modelReasoningEfforts.${r} must be one of ${D1.join(", ")}.`};n[r]=i}return{record:n}}catch{return{error:"modelReasoningEfforts JSON is not valid."}}}function Sae(e){if(!e.trim())return{record:{}};try{const t=JSON.parse(e);if(!cd(t))return{error:"modelAliases JSON must be an object."};const n=Object.create(null),r=new Set;for(const[i,o]of Object.entries(t)){const l=i.trim();if(!l)return{error:"modelAliases keys must be non-empty strings."};const u=l.toLowerCase();if(O4.has(u))return{error:`modelAliases.${i} is not allowed.`};let c,d;if(typeof o=="string")c=o.trim();else if(cd(o)){const m=o.target;if(typeof m!="string")return{error:`modelAliases.${i}.target must be a string.`};if(c=m.trim(),"allowOriginal"in o){if(typeof o.allowOriginal!="boolean")return{error:`modelAliases.${i}.allowOriginal must be a boolean.`};d=o.allowOriginal}}else return{error:`modelAliases.${i} must be a string or object.`};if(!c)return{error:`modelAliases.${i} must be a non-empty string.`};if(u===c.toLowerCase())return{error:`modelAliases.${i} cannot map to itself.`};if(r.has(u))return{error:`modelAliases.${i} conflicts with another alias.`};r.add(u),n[l]=d===void 0?{target:c}:{target:c,allowOriginal:d}}return{record:n}}catch{return{error:"modelAliases JSON is not valid."}}}function Aae(e){const[t,n]=v.useState("form"),[r,i]=v.useState([]),[o,l]=v.useState(""),[u,c]=v.useState(null),d=v.useMemo(()=>u?`extraPrompts: ${u}`:null,[u]),m=v.useCallback(E=>{i(MM(E)),l(JSON.stringify(E??{},null,2)),c(null)},[]),h=v.useCallback(E=>{i(E),e(DM(E))},[e]),y=v.useCallback(E=>{QA({value:E,parse:xae,setJson:l,setError:c,onRecord:j=>h(MM(j))})},[h]),b=v.useCallback(E=>{ZA({next:E,record:DM(r),setJson:l,setError:c,setMode:n})},[r]),w=v.useCallback(()=>{h(r.concat({id:Mi(),model:"",prompt:""}))},[r,h]),S=v.useCallback(E=>{h(r.filter(j=>j.id!==E))},[r,h]),C=v.useCallback((E,j)=>{const T=r.map(O=>O.id===E?{...O,...j}:O);h(T)},[r,h]);return{mode:t,items:r,json:o,jsonIssue:d,onToggleMode:b,onJsonChange:y,onAddItem:w,onRemoveItem:S,onUpdateItem:C,setFromRecord:m}}function Cae(e){const[t,n]=v.useState("form"),[r,i]=v.useState([]),[o,l]=v.useState(""),[u,c]=v.useState(null),d=v.useMemo(()=>u?`modelReasoningEfforts: ${u}`:null,[u]),m=v.useCallback(E=>{i(RM(E)),l(JSON.stringify(E??{},null,2)),c(null)},[]),h=v.useCallback(E=>{i(E),e(kM(E))},[e]),y=v.useCallback(E=>{QA({value:E,parse:wae,setJson:l,setError:c,onRecord:j=>h(RM(j))})},[h]),b=v.useCallback(E=>{ZA({next:E,record:kM(r),setJson:l,setError:c,setMode:n})},[r]),w=v.useCallback(()=>{h(r.concat({id:Mi(),model:"",effort:"high"}))},[r,h]),S=v.useCallback(E=>{h(r.filter(j=>j.id!==E))},[r,h]),C=v.useCallback((E,j)=>{const T=r.map(O=>O.id===E?{...O,...j}:O);h(T)},[r,h]);return{mode:t,items:r,json:o,jsonIssue:d,onToggleMode:b,onJsonChange:y,onAddItem:w,onRemoveItem:S,onUpdateItem:C,setFromRecord:m}}function Eae(e){const[t,n]=v.useState("form"),[r,i]=v.useState([]),[o,l]=v.useState(""),[u,c]=v.useState(null),d=v.useMemo(()=>u?`modelAliases: ${u}`:null,[u]),m=v.useCallback(E=>{const j=L1(E),T=cp(j);i(j),l(JSON.stringify(T,null,2)),c(null)},[]),h=v.useCallback(E=>{i(E),e(cp(E))},[e]),y=v.useCallback(E=>{QA({value:E,parse:Sae,setJson:l,setError:c,onRecord:j=>h(L1(j))})},[h]),b=v.useCallback(E=>{ZA({next:E,record:cp(r),setJson:l,setError:c,setMode:n})},[r]),w=v.useCallback(()=>{h(r.concat({id:Mi(),alias:"",target:"",allowOriginal:void 0}))},[r,h]),S=v.useCallback(E=>{h(r.filter(j=>j.id!==E))},[r,h]),C=v.useCallback((E,j)=>{const T=r.map(O=>O.id===E?{...O,...j}:O);h(T)},[r,h]);return{mode:t,items:r,json:o,jsonIssue:d,onToggleMode:b,onJsonChange:y,onAddItem:w,onRemoveItem:S,onUpdateItem:C,setFromRecord:m}}function jae({hasModels:e,smallModelLabel:t,smallModelValue:n,smallModelInputValue:r,models:i,authApiKeysValue:o,anthropicApiKeyValue:l,legacyAuthNote:u,anthropicApiKeyEnvNote:c,onSmallModelSelect:d,onSmallModelInput:m,onAuthApiKeysChange:h,onAnthropicApiKeyChange:y}){const{t:b}=Ye(),[w,S]=v.useState(!1),C=e&&n!=="__default__"&&!i.includes(n);return g.jsxs(gn,{className:"gap-4 py-4",children:[g.jsxs(Dn,{className:"px-4",children:[g.jsx(kn,{children:b("settingsPage.general.title")}),g.jsx(wr,{className:"hidden sm:block",children:b("settingsPage.general.description")})]}),g.jsxs(Ln,{className:"space-y-4 px-4",children:[g.jsxs("div",{className:"grid gap-2",children:[g.jsx(Ct,{className:"text-muted-foreground text-xs",children:t}),e?g.jsxs(zn,{value:n,onValueChange:d,children:[g.jsx(Bn,{className:"w-full",children:g.jsx($n,{placeholder:b("settingsPage.general.smallModelPlaceholder")})}),g.jsxs(Un,{children:[g.jsx(Oe,{value:"__default__",children:b("settingsPage.common.defaultOption")}),C?g.jsx(Oe,{value:n,children:b("settingsPage.common.customModel",{value:n})}):null,i.map(E=>g.jsx(Oe,{value:E,children:E},E))]})]}):g.jsx(Tt,{placeholder:b("settingsPage.general.smallModelInputPlaceholder"),value:r,onChange:E=>m(E.target.value)}),g.jsx("div",{className:"text-muted-foreground text-xs",children:b("settingsPage.general.smallModelHint")})]}),g.jsxs("div",{className:"grid gap-2",children:[g.jsx(Ct,{className:"text-muted-foreground text-xs",children:b("settingsPage.general.apiKeysLabel")}),g.jsx(Ku,{autoComplete:"off",placeholder:b("settingsPage.general.apiKeysPlaceholder"),value:o,onChange:E=>h(E.target.value),className:"min-h-[96px] font-mono text-xs"}),g.jsx("div",{className:"text-muted-foreground text-xs",children:b("settingsPage.general.apiKeysHint")}),g.jsx("div",{className:"text-muted-foreground text-xs",children:u})]}),g.jsxs("div",{className:"grid gap-2",children:[g.jsx(Ct,{className:"text-muted-foreground text-xs",children:b("settingsPage.general.anthropicApiKeyLabel")}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Tt,{autoComplete:"off",type:w?"text":"password",placeholder:b("settingsPage.general.anthropicApiKeyPlaceholder"),value:l,onChange:E=>y(E.target.value),className:"font-mono text-xs"}),g.jsxs(ke,{type:"button",variant:"outline",className:"shrink-0",onClick:()=>S(E=>!E),"aria-label":b(w?"settingsPage.general.hideAnthropicApiKey":"settingsPage.general.showAnthropicApiKey"),children:[w?g.jsx(e7,{}):g.jsx(n7,{}),g.jsx("span",{className:"hidden sm:inline",children:b(w?"settingsPage.general.hideAnthropicApiKey":"settingsPage.general.showAnthropicApiKey")})]})]}),g.jsx("div",{className:"text-muted-foreground text-xs",children:b("settingsPage.general.anthropicApiKeyHint")}),g.jsx("div",{className:"text-muted-foreground text-xs",children:c})]})]})]})}function Tae({mode:e,json:t,jsonIssue:n,items:r,models:i,onToggleMode:o,onJsonChange:l,onAddItem:u,onRemoveItem:c,onUpdateItem:d}){const m="__default__",h=i.length>0,{t:y}=Ye();return g.jsxs(gn,{className:"gap-4 py-4",children:[g.jsxs(Dn,{className:"px-4",children:[g.jsx(kn,{children:y("settingsPage.reasoning.title")}),g.jsx(wr,{className:"hidden sm:block",children:y("settingsPage.reasoning.description")})]}),g.jsxs(Ln,{className:"space-y-3 px-4",children:[g.jsxs("div",{className:"flex items-center justify-between gap-3",children:[g.jsx("div",{className:"text-muted-foreground text-xs",children:y("settingsPage.reasoning.hint")}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(er,{checked:e==="json",onCheckedChange:o}),g.jsx(Ct,{className:"text-muted-foreground text-xs",children:y("settingsPage.common.jsonMode")})]})]}),e==="json"?g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ku,{value:t,onChange:b=>l(b.target.value),className:"min-h-[160px] lg:min-h-[120px] max-h-[36vh] overflow-auto font-mono text-xs",placeholder:y("settingsPage.reasoning.jsonPlaceholder")}),n?g.jsx(xr,{variant:"warning",title:y("settingsPage.common.invalidJsonTitle"),description:n}):null]}):g.jsxs("div",{className:"space-y-2",children:[r.length===0?g.jsx("div",{className:"text-muted-foreground text-sm",children:y("settingsPage.reasoning.emptyState")}):r.map(b=>{const w=b.model||m,S=w!==m&&!i.includes(w),C=!h&&!S;return g.jsxs("div",{className:"grid gap-2 rounded-lg border p-3",children:[g.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[g.jsxs(zn,{value:w,onValueChange:E=>d(b.id,{model:E===m?"":E}),disabled:C,children:[g.jsx(Bn,{className:"min-w-[220px]",children:g.jsx($n,{placeholder:y(h?"settingsPage.common.selectModelPlaceholder":"settingsPage.common.noModelsAvailable")})}),g.jsxs(Un,{children:[g.jsx(Oe,{value:m,children:y("settingsPage.common.defaultOption")}),S?g.jsx(Oe,{value:w,children:y("settingsPage.common.customModel",{value:w})}):null,i.map(E=>g.jsx(Oe,{value:E,children:E},E))]})]}),g.jsxs(zn,{value:b.effort,onValueChange:E=>d(b.id,{effort:E}),children:[g.jsx(Bn,{className:"w-40",children:g.jsx($n,{})}),g.jsx(Un,{children:D1.map(E=>g.jsx(Oe,{value:E,children:E},E))})]}),g.jsx(ke,{type:"button",variant:"outline",size:"sm",onClick:()=>c(b.id),children:y("settingsPage.common.remove")})]}),g.jsx("div",{className:"text-muted-foreground text-xs",children:y("settingsPage.reasoning.itemHint")})]},b.id)}),g.jsx(ke,{type:"button",variant:"outline",size:"sm",onClick:u,children:y("settingsPage.reasoning.addButton")})]})]})]})}function Oae({mode:e,json:t,jsonIssue:n,items:r,models:i,onToggleMode:o,onJsonChange:l,onAddItem:u,onRemoveItem:c,onUpdateItem:d}){const m="__default__",h=i.length>0,{t:y}=Ye();return g.jsxs(gn,{className:"gap-4 py-4",children:[g.jsxs(Dn,{className:"px-4",children:[g.jsx(kn,{children:y("settingsPage.prompts.title")}),g.jsx(wr,{className:"hidden sm:block",children:y("settingsPage.prompts.description")})]}),g.jsxs(Ln,{className:"space-y-3 px-4",children:[g.jsxs("div",{className:"flex items-center justify-between gap-3",children:[g.jsx("div",{className:"text-muted-foreground text-xs",children:y("settingsPage.prompts.hint")}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(er,{checked:e==="json",onCheckedChange:o}),g.jsx(Ct,{className:"text-muted-foreground text-xs",children:y("settingsPage.common.jsonMode")})]})]}),e==="json"?g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ku,{value:t,onChange:b=>l(b.target.value),className:"min-h-[200px] lg:min-h-[140px] max-h-[40vh] overflow-auto font-mono text-xs",placeholder:y("settingsPage.prompts.jsonPlaceholder")}),n?g.jsx(xr,{variant:"warning",title:y("settingsPage.common.invalidJsonTitle"),description:n}):null]}):g.jsxs("div",{className:"space-y-2",children:[r.length===0?g.jsx("div",{className:"text-muted-foreground text-sm",children:y("settingsPage.prompts.emptyState")}):r.map(b=>{const w=b.model||m,S=w!==m&&!i.includes(w),C=!h&&!S;return g.jsxs("div",{className:"grid gap-2 rounded-lg border p-3",children:[g.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[g.jsxs(zn,{value:w,onValueChange:E=>d(b.id,{model:E===m?"":E}),disabled:C,children:[g.jsx(Bn,{className:"min-w-[220px]",children:g.jsx($n,{placeholder:y(h?"settingsPage.common.selectModelPlaceholder":"settingsPage.common.noModelsAvailable")})}),g.jsxs(Un,{children:[g.jsx(Oe,{value:m,children:y("settingsPage.common.defaultOption")}),S?g.jsx(Oe,{value:w,children:y("settingsPage.common.customModel",{value:w})}):null,i.map(E=>g.jsx(Oe,{value:E,children:E},E))]})]}),g.jsx(ke,{type:"button",variant:"outline",size:"sm",onClick:()=>c(b.id),children:y("settingsPage.common.remove")})]}),g.jsx(Ku,{value:b.prompt,onChange:E=>d(b.id,{prompt:E.target.value}),className:"min-h-[120px] lg:min-h-[96px] max-h-[30vh] overflow-auto font-mono text-xs",placeholder:y("settingsPage.prompts.promptPlaceholder")}),g.jsx("div",{className:"text-muted-foreground text-xs",children:y("settingsPage.prompts.itemHint")})]},b.id)}),g.jsx(ke,{type:"button",variant:"outline",size:"sm",onClick:u,children:y("settingsPage.prompts.addButton")})]})]})]})}function Pae({allowOriginalModelNamesForAliases:e,mode:t,onToggleMode:n}){const{t:r}=Ye(),i=r(e?"settingsPage.common.allow":"settingsPage.common.block");return g.jsxs("div",{className:"flex items-center justify-between gap-3",children:[g.jsx("div",{className:"text-muted-foreground text-xs",children:r("settingsPage.aliases.defaultBehaviorHint",{behavior:i})}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(er,{checked:t==="json",onCheckedChange:n}),g.jsx(Ct,{className:"text-muted-foreground text-xs",children:r("settingsPage.common.jsonMode")})]})]})}function Nae({json:e,jsonIssue:t,onJsonChange:n}){const{t:r}=Ye();return g.jsxs("div",{className:"space-y-2",children:[g.jsx(Ku,{value:e,onChange:i=>n(i.target.value),className:"min-h-[160px] lg:min-h-[120px] max-h-[36vh] overflow-auto font-mono text-xs",placeholder:r("settingsPage.aliases.jsonPlaceholder")}),t?g.jsx(xr,{variant:"warning",title:r("settingsPage.common.invalidJsonTitle"),description:t}):null]})}function _ae({item:e,models:t,emptyTargetValue:n,allowOriginalDefaultValue:r,hasModels:i,onUpdateItem:o,onRemoveItem:l}){const{t:u}=Ye(),c=e.target||n,d=c!==n&&!t.includes(c),m=!i&&!d,h=e.allowOriginal===void 0?r:e.allowOriginal?"allow":"block";return g.jsx("div",{className:"grid gap-2 rounded-lg border p-3",children:g.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[g.jsx(Tt,{className:"min-w-[180px]",placeholder:u("settingsPage.aliases.aliasPlaceholder"),value:e.alias,onChange:y=>o(e.id,{alias:y.target.value})}),g.jsxs(zn,{value:c,onValueChange:y=>o(e.id,{target:y===n?"":y}),disabled:m,children:[g.jsx(Bn,{className:"min-w-[220px]",children:g.jsx($n,{placeholder:u(i?"settingsPage.aliases.selectTargetPlaceholder":"settingsPage.common.noModelsAvailable")})}),g.jsxs(Un,{children:[g.jsx(Oe,{value:n,children:u("settingsPage.aliases.selectOption")}),d?g.jsx(Oe,{value:c,children:u("settingsPage.common.customModel",{value:c})}):null,t.map(y=>g.jsx(Oe,{value:y,children:y},y))]})]}),g.jsxs(zn,{value:h,onValueChange:y=>o(e.id,{allowOriginal:y===r?void 0:y==="allow"}),children:[g.jsx(Bn,{className:"min-w-[200px]",children:g.jsx($n,{placeholder:u("settingsPage.aliases.originalModelPlaceholder")})}),g.jsxs(Un,{children:[g.jsx(Oe,{value:r,children:u("settingsPage.aliases.useDefault")}),g.jsx(Oe,{value:"allow",children:u("settingsPage.aliases.allowOriginal")}),g.jsx(Oe,{value:"block",children:u("settingsPage.aliases.blockOriginal")})]})]}),g.jsx(ke,{type:"button",variant:"outline",size:"sm",onClick:()=>l(e.id),children:u("settingsPage.common.remove")})]})})}function Mae({items:e,models:t,emptyTargetValue:n,allowOriginalDefaultValue:r,hasModels:i,onAddItem:o,onRemoveItem:l,onUpdateItem:u}){const{t:c}=Ye();return g.jsxs("div",{className:"space-y-2",children:[e.length===0?g.jsx("div",{className:"text-muted-foreground text-sm",children:c("settingsPage.aliases.emptyState")}):e.map(d=>g.jsx(_ae,{item:d,models:t,emptyTargetValue:n,allowOriginalDefaultValue:r,hasModels:i,onUpdateItem:u,onRemoveItem:l},d.id)),g.jsx(ke,{type:"button",variant:"outline",size:"sm",onClick:o,children:c("settingsPage.aliases.addButton")})]})}function Rae({allowOriginalModelNamesForAliases:e,mode:t,json:n,jsonIssue:r,items:i,models:o,onToggleMode:l,onJsonChange:u,onAddItem:c,onRemoveItem:d,onUpdateItem:m}){const h="__target__",y="__allow_original_default__",b=o.length>0,{t:w}=Ye();return g.jsxs(gn,{className:"gap-4 py-4",children:[g.jsxs(Dn,{className:"px-4",children:[g.jsx(kn,{children:w("settingsPage.aliases.title")}),g.jsx(wr,{className:"hidden sm:block",children:w("settingsPage.aliases.description")})]}),g.jsxs(Ln,{className:"space-y-3 px-4",children:[g.jsx(Pae,{allowOriginalModelNamesForAliases:e,mode:t,onToggleMode:l}),t==="json"?g.jsx(Nae,{json:n,jsonIssue:r,onJsonChange:u}):g.jsx(Mae,{items:i,models:o,emptyTargetValue:h,allowOriginalDefaultValue:y,hasModels:b,onAddItem:c,onRemoveItem:d,onUpdateItem:m})]})]})}function Dae({accountAffinityEnabled:e,modelRefreshIntervalInput:t,modelRefreshIntervalIssue:n,sessionAffinityRetentionInput:r,sessionAffinityRetentionIssue:i,allowOriginalModelNamesForAliases:o,useFunctionApplyPatch:l,forceAgent:u,compactUseSmallModel:c,messageStartInputTokensFallback:d,useMessagesApi:m,useResponsesApiWebSearch:h,responsesApiContextManagementModelsValue:y,onToggleAccountAffinity:b,onModelRefreshIntervalChange:w,onSessionAffinityRetentionChange:S,onToggleAllowOriginalModelNamesForAliases:C,onToggleUseFunctionApplyPatch:E,onToggleForceAgent:j,onToggleCompactUseSmallModel:T,onToggleMessageStartInputTokensFallback:O,onToggleUseMessagesApi:N,onToggleUseResponsesApiWebSearch:_,onResponsesApiContextManagementModelsChange:M}){const{t:R}=Ye();return g.jsxs(gn,{className:"gap-4 py-4",children:[g.jsxs(Dn,{className:"px-4",children:[g.jsx(kn,{children:R("settingsPage.advanced.title")}),g.jsx(wr,{className:"hidden sm:block",children:R("settingsPage.advanced.description")})]}),g.jsxs(Ln,{className:"space-y-3 px-4",children:[g.jsx("div",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:R("settingsPage.advanced.routingGroupTitle")}),g.jsxs("div",{className:"flex items-center justify-between gap-4",children:[g.jsxs("div",{className:"space-y-1",children:[g.jsx("div",{className:"text-sm font-medium",children:R("settingsPage.accountAffinity.label")}),g.jsx("div",{className:"text-muted-foreground text-xs",children:R("settingsPage.accountAffinity.hint")})]}),g.jsx(er,{checked:e,onCheckedChange:b})]}),g.jsxs("div",{className:"flex items-center justify-between gap-4",children:[g.jsxs("div",{className:"space-y-1",children:[g.jsx("div",{className:"text-sm font-medium",children:R("settingsPage.advanced.allowOriginalModelNamesLabel")}),g.jsx("div",{className:"text-muted-foreground text-xs",children:R("settingsPage.advanced.allowOriginalModelNamesHint")})]}),g.jsx(er,{checked:o,onCheckedChange:C})]}),g.jsxs("div",{className:"flex items-center justify-between gap-4",children:[g.jsxs("div",{className:"space-y-1",children:[g.jsx("div",{className:"text-sm font-medium",children:R("settingsPage.advanced.forceAgentLabel")}),g.jsx("div",{className:"text-muted-foreground text-xs",children:R("settingsPage.advanced.forceAgentHint")})]}),g.jsx(er,{checked:u,onCheckedChange:j})]}),g.jsx("hr",{className:"border-t mt-1"}),g.jsx("div",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:R("settingsPage.advanced.apiGroupTitle")}),g.jsxs("div",{className:"flex items-center justify-between gap-4",children:[g.jsxs("div",{className:"space-y-1",children:[g.jsx("div",{className:"text-sm font-medium",children:R("settingsPage.advanced.useMessagesApiLabel")}),g.jsx("div",{className:"text-muted-foreground text-xs",children:R("settingsPage.advanced.useMessagesApiHint")})]}),g.jsx(er,{checked:m,onCheckedChange:N})]}),g.jsxs("div",{className:"flex items-center justify-between gap-4",children:[g.jsxs("div",{className:"space-y-1",children:[g.jsx("div",{className:"text-sm font-medium",children:R("settingsPage.advanced.useFunctionApplyPatchLabel")}),g.jsx("div",{className:"text-muted-foreground text-xs",children:R("settingsPage.advanced.useFunctionApplyPatchHint")})]}),g.jsx(er,{checked:l,onCheckedChange:E})]}),g.jsxs("div",{className:"flex items-center justify-between gap-4",children:[g.jsxs("div",{className:"space-y-1",children:[g.jsx("div",{className:"text-sm font-medium",children:R("settingsPage.advanced.useResponsesApiWebSearchLabel")}),g.jsx("div",{className:"text-muted-foreground text-xs",children:R("settingsPage.advanced.useResponsesApiWebSearchHint")})]}),g.jsx(er,{checked:h,onCheckedChange:_})]}),g.jsxs("div",{className:"grid gap-2",children:[g.jsx(Ct,{className:"text-muted-foreground text-xs",children:R("settingsPage.advanced.responsesApiContextManagementModelsLabel")}),g.jsx(Ku,{autoComplete:"off",placeholder:R("settingsPage.advanced.responsesApiContextManagementModelsPlaceholder"),value:y,onChange:I=>M(I.target.value),className:"min-h-[96px] font-mono text-xs"}),g.jsx("div",{className:"text-muted-foreground text-xs",children:R("settingsPage.advanced.responsesApiContextManagementModelsHint")})]}),g.jsx("hr",{className:"border-t mt-1"}),g.jsx("div",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:R("settingsPage.advanced.modelGroupTitle")}),g.jsxs("div",{className:"grid gap-2",children:[g.jsx(Ct,{className:"text-muted-foreground text-xs",children:R("settingsPage.advanced.modelRefreshIntervalLabel")}),g.jsx(Tt,{type:"number",min:"0",step:"0.5",value:t,onChange:I=>w(I.target.value)}),g.jsx("div",{className:"text-muted-foreground text-xs",children:R("settingsPage.advanced.modelRefreshIntervalHint")}),n?g.jsx("div",{className:"text-destructive text-xs",children:n}):null]}),g.jsxs("div",{className:"grid gap-2",children:[g.jsx(Ct,{className:"text-muted-foreground text-xs",children:R("settingsPage.advanced.sessionAffinityRetentionLabel")}),g.jsx(Tt,{type:"number",min:"0",step:"1",value:r,onChange:I=>S(I.target.value)}),g.jsx("div",{className:"text-muted-foreground text-xs",children:R("settingsPage.advanced.sessionAffinityRetentionHint")}),i?g.jsx("div",{className:"text-destructive text-xs",children:i}):null]}),g.jsxs("div",{className:"flex items-center justify-between gap-4",children:[g.jsxs("div",{className:"space-y-1",children:[g.jsx("div",{className:"text-sm font-medium",children:R("settingsPage.advanced.compactUseSmallModelLabel")}),g.jsx("div",{className:"text-muted-foreground text-xs",children:R("settingsPage.advanced.compactUseSmallModelHint")})]}),g.jsx(er,{checked:c,onCheckedChange:T})]}),g.jsxs("div",{className:"flex items-center justify-between gap-4",children:[g.jsxs("div",{className:"space-y-1",children:[g.jsx("div",{className:"text-sm font-medium",children:R("settingsPage.advanced.messageStartInputTokensFallbackLabel")}),g.jsx("div",{className:"text-muted-foreground text-xs",children:R("settingsPage.advanced.messageStartInputTokensFallbackHint")})]}),g.jsx(er,{checked:d,onCheckedChange:O})]})]})]})}function kae({providerId:e,item:t,onRemoveModel:n,onUpdateModel:r}){const{t:i}=Ye();return g.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[g.jsx(Tt,{className:"min-w-[180px]",placeholder:i("settingsPage.advanced.providersModelIdPlaceholder"),value:t.model,onChange:o=>r(e,t.id,{model:o.target.value})}),g.jsx(Tt,{className:"w-28",type:"number",step:"0.1",min:"0",placeholder:"temperature",value:t.temperature,onChange:o=>r(e,t.id,{temperature:o.target.value})}),g.jsx(Tt,{className:"w-28",type:"number",step:"0.01",min:"0",placeholder:"topP",value:t.topP,onChange:o=>r(e,t.id,{topP:o.target.value})}),g.jsx(Tt,{className:"w-28",type:"number",step:"1",min:"0",placeholder:"topK",value:t.topK,onChange:o=>r(e,t.id,{topK:o.target.value})}),g.jsx(ke,{type:"button",variant:"outline",size:"sm",onClick:()=>n(e,t.id),children:i("settingsPage.common.remove")})]})}function Lae({item:e,onRemoveProvider:t,onUpdateProvider:n,onAddModel:r,onRemoveModel:i,onUpdateModel:o}){const{t:l}=Ye();return g.jsxs("div",{className:"grid gap-3 rounded-lg border p-3",children:[g.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[g.jsx(Tt,{className:"min-w-[200px]",placeholder:l("settingsPage.advanced.providersNamePlaceholder"),value:e.name,onChange:u=>n(e.id,{name:u.target.value})}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(er,{checked:e.enabled,onCheckedChange:u=>n(e.id,{enabled:u})}),g.jsx(Ct,{className:"text-muted-foreground text-xs",children:l("settingsPage.advanced.providersEnabledLabel")})]}),g.jsx(ke,{type:"button",variant:"outline",size:"sm",onClick:()=>t(e.id),children:l("settingsPage.common.remove")})]}),g.jsxs("div",{className:"grid gap-3 md:grid-cols-3",children:[g.jsxs("div",{className:"grid gap-2",children:[g.jsx(Ct,{className:"text-muted-foreground text-xs",children:l("settingsPage.advanced.providersBaseUrlLabel")}),g.jsx(Tt,{autoComplete:"off",placeholder:l("settingsPage.advanced.providersBaseUrlPlaceholder"),value:e.baseUrl,onChange:u=>n(e.id,{baseUrl:u.target.value})})]}),g.jsxs("div",{className:"grid gap-2",children:[g.jsx(Ct,{className:"text-muted-foreground text-xs",children:l("settingsPage.advanced.providersApiKeyLabel")}),g.jsx(Tt,{type:"password",autoComplete:"off",placeholder:l("settingsPage.advanced.providersApiKeyPlaceholder"),value:e.apiKey,onChange:u=>n(e.id,{apiKey:u.target.value})})]}),g.jsxs("div",{className:"grid gap-2",children:[g.jsx(Ct,{className:"text-muted-foreground text-xs",children:l("settingsPage.advanced.providersAuthTypeLabel")}),g.jsxs(zn,{value:e.authType,onValueChange:u=>n(e.id,{authType:u}),children:[g.jsx(Bn,{children:g.jsx($n,{})}),g.jsxs(Un,{children:[g.jsx(Oe,{value:"x-api-key",children:l("settingsPage.advanced.providersAuthTypeXApiKey")}),g.jsx(Oe,{value:"authorization",children:l("settingsPage.advanced.providersAuthTypeAuthorization")})]})]}),g.jsx("div",{className:"text-muted-foreground text-xs",children:l("settingsPage.advanced.providersAuthTypeHint")})]})]}),g.jsxs("div",{className:"flex items-center justify-between gap-4",children:[g.jsxs("div",{className:"space-y-1",children:[g.jsx("div",{className:"text-sm font-medium",children:l("settingsPage.advanced.providersAdjustInputTokensLabel")}),g.jsx("div",{className:"text-muted-foreground text-xs",children:l("settingsPage.advanced.providersAdjustInputTokensHint")})]}),g.jsx(er,{checked:e.adjustInputTokens,onCheckedChange:u=>n(e.id,{adjustInputTokens:u})})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[g.jsx("div",{className:"text-sm font-medium",children:l("settingsPage.advanced.providersModelsLabel")}),g.jsx(ke,{type:"button",variant:"outline",size:"sm",onClick:()=>r(e.id),children:l("settingsPage.advanced.providersAddModel")})]}),e.models.length===0?g.jsx("div",{className:"text-muted-foreground text-xs",children:l("settingsPage.advanced.providersModelsEmptyState")}):e.models.map(u=>g.jsx(kae,{providerId:e.id,item:u,onUpdateModel:o,onRemoveModel:i},u.id))]})]})}function Iae({items:e,issue:t,onAddProvider:n,onRemoveProvider:r,onUpdateProvider:i,onAddModel:o,onRemoveModel:l,onUpdateModel:u}){const{t:c}=Ye();return g.jsxs(gn,{className:"gap-4 py-4",children:[g.jsxs(Dn,{className:"px-4",children:[g.jsx(kn,{children:c("settingsPage.advanced.providersTitle")}),g.jsx(wr,{className:"hidden sm:block",children:c("settingsPage.advanced.providersDescription")})]}),g.jsxs(Ln,{className:"space-y-3 px-4",children:[t?g.jsx(xr,{variant:"warning",title:c("settingsPage.advanced.providersIssueTitle"),description:t}):null,e.length===0?g.jsx("div",{className:"text-muted-foreground text-sm",children:c("settingsPage.advanced.providersEmptyState")}):e.map(d=>g.jsx(Lae,{item:d,onRemoveProvider:r,onUpdateProvider:i,onAddModel:o,onRemoveModel:l,onUpdateModel:u},d.id)),g.jsx(ke,{type:"button",variant:"outline",size:"sm",onClick:n,children:c("settingsPage.advanced.providersAddProvider")})]})]})}function LM(e){return typeof e=="number"?String(e):""}function IM(e,t,n){switch(t){case"modelRefreshIntervalHours":return{...e,modelRefreshIntervalHours:n};case"sessionAffinityRetentionDays":return{...e,sessionAffinityRetentionDays:n}}}function zM(e){const{value:t,key:n,issueMessage:r,setInput:i,setIssue:o,setDraft:l}=e;i(t);const u=t.trim();if(!u){o(null),l(d=>IM(d,n,void 0));return}const c=Number(u);if(!Number.isFinite(c)||c<0){o(r);return}o(null),l(d=>IM(d,n,c))}function zae(){const{t:e}=Ye(),[t,n]=v.useState(!1),[r,i]=v.useState(!1),[o,l]=v.useState(null),[u,c]=v.useState(null),[d,m]=v.useState([]),[h,y]=v.useState({}),[b,w]=v.useState("{}"),[S,C]=v.useState(""),[E,j]=v.useState(null),[T,O]=v.useState(""),[N,_]=v.useState(null),[M,R]=v.useState(""),I=Aae(je=>y(_e=>({..._e,extraPrompts:je}))),$=Cae(je=>y(_e=>({..._e,modelReasoningEfforts:je}))),F=Eae(je=>y(_e=>({..._e,modelAliases:je}))),z=bae(je=>y(_e=>({..._e,providers:je}))),{mode:Y,items:Q,json:se,jsonIssue:L,onToggleMode:q,onJsonChange:B,onAddItem:ae,onRemoveItem:G,onUpdateItem:D,setFromRecord:V}=I,{mode:K,items:ee,json:he,jsonIssue:ye,onToggleMode:X,onJsonChange:me,onAddItem:oe,onRemoveItem:le,onUpdateItem:ve,setFromRecord:re}=$,{mode:ze,items:Ee,json:Le,jsonIssue:ot,onToggleMode:Dt,onJsonChange:Hr,onAddItem:En,onRemoveItem:$i,onUpdateItem:xa,setFromRecord:Gt}=F,{items:Kr,issue:Wt,onAddProvider:gs,onRemoveProvider:gi,onUpdateProvider:bo,onAddModel:vi,onRemoveModel:wa,onUpdateModel:Er,setFromRecord:Sa}=z,Zn=v.useCallback(je=>{const{_configPath:_e,...Je}=je,ih=L1(Je.modelAliases),jc=cp(ih),Ea=_M(Je);c(_e??null);const ja={...Je,auth:{apiKeys:Ea},modelAliases:jc};y(ja),w(NM(ja)),V(Je.extraPrompts),re(Je.modelReasoningEfforts),Gt(jc),Sa(Je.providers),C(LM(Je.modelRefreshIntervalHours)),j(null),O(LM(Je.sessionAffinityRetentionDays)),_(null),R(Je.responsesApiContextManagementModels?.join(`
65
- `)??"")},[V,re,Gt,Sa,C,j,O,_,R]),lr=v.useCallback(async()=>{n(!0),l(null);try{const[je,_e]=await Promise.allSettled([Gne(),Yne()]);if(je.status==="fulfilled")Zn(je.value);else throw je.reason;_e.status==="fulfilled"?m(_e.value.items??[]):(m([]),Lt.error(yt.t("settingsPage.toast.loadModelsFailed"),{description:_e.reason instanceof Error?_e.reason.message:String(_e.reason)}))}catch(je){const _e=je instanceof di?je.message:String(je);l(_e),Lt.error(yt.t("settingsPage.toast.loadConfigFailed"),{description:_e})}finally{n(!1)}},[Zn]);v.useEffect(()=>{lr()},[lr]);const Yt=v.useCallback(async()=>{i(!0),l(null);try{const je=await Wne(h);Zn(je),Lt.success(yt.t("settingsPage.toast.configSaved"))}catch(je){const _e=je instanceof di?je.message:String(je);l(_e),Lt.error(yt.t("settingsPage.toast.saveConfigFailed"),{description:_e})}finally{i(!1)}},[Zn,h]),Qn=v.useCallback(()=>{lr()},[lr]),Xt=v.useCallback(()=>{Yt()},[Yt]),vs=v.useCallback(je=>{y(_e=>({..._e,smallModel:je==="__default__"?"":je}))},[y]),Aa=v.useCallback(je=>{y(_e=>({..._e,smallModel:je}))},[y]),ur=v.useCallback(je=>{const _e=hae(je);y(Je=>({...Je,auth:{apiKeys:_e},apiKey:void 0}))},[y]),Bi=v.useCallback(je=>{y(_e=>({..._e,anthropicApiKey:je}))},[y]),Ui=v.useCallback(je=>{y(_e=>({..._e,accountAffinity:je}))},[y]),yi=v.useCallback(je=>{zM({value:je,key:"modelRefreshIntervalHours",issueMessage:e("settingsPage.advanced.modelRefreshIntervalError"),setInput:C,setIssue:j,setDraft:y})},[y,C,j,e]),cr=v.useCallback(je=>{zM({value:je,key:"sessionAffinityRetentionDays",issueMessage:e("settingsPage.advanced.sessionAffinityRetentionError"),setInput:O,setIssue:_,setDraft:y})},[y,O,_,e]),we=v.useCallback(je=>{y(_e=>({..._e,allowOriginalModelNamesForAliases:je}))},[y]),st=v.useCallback(je=>{y(_e=>({..._e,useFunctionApplyPatch:je}))},[y]),lt=v.useCallback(je=>{y(_e=>({..._e,forceAgent:je}))},[y]),wt=v.useCallback(je=>{y(_e=>({..._e,compactUseSmallModel:je}))},[y]),jr=v.useCallback(je=>{y(_e=>({..._e,messageStartInputTokensFallback:je}))},[y]),$e=v.useCallback(je=>{y(_e=>({..._e,useMessagesApi:je}))},[y]),Ft=v.useCallback(je=>{y(_e=>({..._e,useResponsesApiWebSearch:je}))},[y]),Ca=v.useCallback(je=>{R(je);const _e=T4(je);y(Je=>({...Je,responsesApiContextManagementModels:_e}))},[y,R]),jn=d.length>0,Fn=h.smallModel?h.smallModel:"__default__",xo=!r&&!t&&!(Y==="json"&&L)&&!(K==="json"&&ye)&&!(ze==="json"&&ot)&&!E&&!N&&!Wt,Tr=v.useMemo(()=>NM(h)!==b,[h,b]),Ac=e("settingsPage.general.legacyAuthNote",{env:"COPILOT_API_KEY"}),nh=e(jn?"settingsPage.general.smallModel":"settingsPage.general.smallModelManual"),Vi=h.smallModel??"",un=_M(h).join(`
66
- `),qn=h.anthropicApiKey??"",wo=e("settingsPage.general.anthropicApiKeyEnvNote",{env:"ANTHROPIC_API_KEY"}),Cc=h.accountAffinity??!0,ty=h.allowOriginalModelNamesForAliases??!1,ny=h.useFunctionApplyPatch??!0,rh=h.forceAgent??!1,ys=h.compactUseSmallModel??!0,Ec=h.messageStartInputTokensFallback??!1,So=h.useMessagesApi??!0,Ao=h.useResponsesApiWebSearch??!0;return{loading:t,saving:r,error:o,configPath:u,canSave:xo,isDirty:Tr,onReload:Qn,onSave:Xt,hasModels:jn,smallModelLabel:nh,smallModelValue:Fn,smallModelInputValue:Vi,models:d,authApiKeysValue:un,anthropicApiKeyValue:qn,legacyAuthNote:Ac,anthropicApiKeyEnvNote:wo,onSmallModelSelect:vs,onSmallModelInput:Aa,onAuthApiKeysChange:ur,onAnthropicApiKeyChange:Bi,accountAffinityEnabled:Cc,onAccountAffinityToggle:Ui,modelRefreshIntervalInput:S,modelRefreshIntervalIssue:E,sessionAffinityRetentionInput:T,sessionAffinityRetentionIssue:N,onSessionAffinityRetentionChange:cr,onModelRefreshIntervalChange:yi,allowOriginalModelNamesForAliases:ty,reasoningMode:K,reasoningJson:he,reasoningJsonIssue:ye,reasoningItems:ee,onReasoningToggleMode:X,onReasoningJsonChange:me,onReasoningAddItem:oe,onReasoningRemoveItem:le,onReasoningUpdateItem:ve,extraMode:Y,extraJson:se,extraJsonIssue:L,extraItems:Q,onExtraToggleMode:q,onExtraJsonChange:B,onExtraAddItem:ae,onExtraRemoveItem:G,onExtraUpdateItem:D,aliasMode:ze,aliasJson:Le,aliasJsonIssue:ot,aliasItems:Ee,onAliasToggleMode:Dt,onAliasJsonChange:Hr,onAliasAddItem:En,onAliasRemoveItem:$i,onAliasUpdateItem:xa,useFunctionApplyPatch:ny,forceAgent:rh,compactUseSmallModel:ys,messageStartInputTokensFallback:Ec,useMessagesApi:So,useResponsesApiWebSearch:Ao,responsesApiContextManagementModelsValue:M,onUseMessagesApiToggle:$e,onUseResponsesApiWebSearchToggle:Ft,onResponsesApiContextManagementModelsChange:Ca,providersItems:Kr,providersIssue:Wt,onProvidersAddProvider:gs,onProvidersRemoveProvider:gi,onProvidersUpdateProvider:bo,onProvidersAddModel:vi,onProvidersRemoveModel:wa,onProvidersUpdateModel:Er,onAllowOriginalModelNamesForAliasesToggle:we,onUseFunctionApplyPatchToggle:st,onForceAgentToggle:lt,onCompactUseSmallModelToggle:wt,onMessageStartInputTokensFallbackToggle:jr}}function $ae({loading:e,saving:t,error:n,configPath:r,canSave:i,isDirty:o,onReload:l,onSave:u,hasModels:c,smallModelLabel:d,smallModelValue:m,smallModelInputValue:h,models:y,authApiKeysValue:b,anthropicApiKeyValue:w,legacyAuthNote:S,anthropicApiKeyEnvNote:C,onSmallModelSelect:E,onSmallModelInput:j,onAuthApiKeysChange:T,onAnthropicApiKeyChange:O,accountAffinityEnabled:N,onAccountAffinityToggle:_,modelRefreshIntervalInput:M,modelRefreshIntervalIssue:R,sessionAffinityRetentionInput:I,sessionAffinityRetentionIssue:$,onSessionAffinityRetentionChange:F,onModelRefreshIntervalChange:z,reasoningMode:Y,reasoningJson:Q,reasoningJsonIssue:se,reasoningItems:L,onReasoningToggleMode:q,onReasoningJsonChange:B,onReasoningAddItem:ae,onReasoningRemoveItem:G,onReasoningUpdateItem:D,extraMode:V,extraJson:K,extraJsonIssue:ee,extraItems:he,onExtraToggleMode:ye,onExtraJsonChange:X,onExtraAddItem:me,onExtraRemoveItem:oe,onExtraUpdateItem:le,aliasMode:ve,aliasJson:re,aliasJsonIssue:ze,aliasItems:Ee,onAliasToggleMode:Le,onAliasJsonChange:ot,onAliasAddItem:Dt,onAliasRemoveItem:Hr,onAliasUpdateItem:En,allowOriginalModelNamesForAliases:$i,useFunctionApplyPatch:xa,forceAgent:Gt,compactUseSmallModel:Kr,messageStartInputTokensFallback:Wt,useMessagesApi:gs,useResponsesApiWebSearch:gi,responsesApiContextManagementModelsValue:bo,onUseMessagesApiToggle:vi,onUseResponsesApiWebSearchToggle:wa,onResponsesApiContextManagementModelsChange:Er,providersItems:Sa,providersIssue:Zn,onProvidersAddProvider:lr,onProvidersRemoveProvider:Yt,onProvidersUpdateProvider:Qn,onProvidersAddModel:Xt,onProvidersRemoveModel:vs,onProvidersUpdateModel:Aa,onAllowOriginalModelNamesForAliasesToggle:ur,onUseFunctionApplyPatchToggle:Bi,onForceAgentToggle:Ui,onCompactUseSmallModelToggle:yi,onMessageStartInputTokensFallbackToggle:cr}){const{t:we}=Ye(),st=v.useMemo(()=>[{id:"general",label:we("settingsPage.sections.general")},{id:"reasoning",label:we("settingsPage.sections.reasoning")},{id:"aliases",label:we("settingsPage.sections.aliases")},{id:"prompts",label:we("settingsPage.sections.prompts")},{id:"advanced",label:we("settingsPage.sections.advanced")},{id:"providers",label:we("settingsPage.sections.providers")}],[we]),{activeSection:lt,registerSection:wt,scrollToSection:jr}=cae({sectionIds:[...fae]});return g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[g.jsxs("div",{className:"min-w-0",children:[g.jsx("div",{className:"text-lg font-semibold",children:we("nav.settings")}),g.jsx("div",{className:"text-muted-foreground text-sm",children:we("settingsPage.subtitle")})]}),g.jsxs("div",{className:"ml-auto flex flex-col items-end gap-1 text-right",children:[g.jsx("div",{className:"flex flex-wrap items-center gap-2",children:g.jsx(ke,{type:"button",variant:"outline",size:"sm",onClick:l,disabled:e||t,children:we(e?"common.refreshing":"common.refresh")})}),r?g.jsx("div",{className:"text-muted-foreground text-xs leading-tight hidden sm:block",children:we("settingsPage.configPath",{path:r})}):null,g.jsx("div",{className:"text-muted-foreground text-xs leading-tight hidden sm:block",children:we("settingsPage.note")})]})]}),n?g.jsx(xr,{variant:"error",title:we("settingsPage.errorTitle"),description:n,actionLabel:we("common.retry"),onAction:l}):null,g.jsx("nav",{className:"flex gap-1 overflow-x-auto pb-2 lg:hidden","aria-label":we("settingsPage.navigation.ariaLabel"),children:st.map($e=>{const Ft=lt===$e.id;return g.jsx("button",{type:"button","aria-current":Ft?"true":void 0,onClick:()=>jr($e.id),className:de("shrink-0 rounded-full px-3 py-1.5 text-xs font-medium transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",Ft?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:$e.label},$e.id)})}),g.jsxs("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-12",children:[g.jsx("aside",{className:"hidden lg:block lg:col-span-2",children:g.jsx(uae,{sections:st,activeSection:lt,onSectionClick:jr})}),e&&!n?g.jsx("div",{className:"space-y-6 lg:col-span-10","aria-busy":"true",children:Array.from({length:4},($e,Ft)=>g.jsxs("div",{className:"rounded-xl border bg-card p-4 space-y-3",children:[g.jsx("div",{className:"h-5 w-32 rounded bg-muted animate-pulse"}),g.jsx("div",{className:"h-3 w-48 rounded bg-muted animate-pulse"}),g.jsxs("div",{className:"space-y-2 pt-2",children:[g.jsx("div",{className:"h-9 rounded bg-muted animate-pulse"}),g.jsx("div",{className:"h-9 rounded bg-muted animate-pulse"})]})]},Ft))}):null,g.jsxs("main",{className:de("space-y-6 lg:col-span-10",e&&"hidden"),children:[g.jsx(Vs,{id:"general",isActive:lt==="general",ref:$e=>wt("general",$e),style:{animationDelay:"0ms"},children:g.jsx(jae,{hasModels:c,smallModelLabel:d,smallModelValue:m,smallModelInputValue:h,models:y,authApiKeysValue:b,anthropicApiKeyValue:w,legacyAuthNote:S,anthropicApiKeyEnvNote:C,onSmallModelSelect:E,onSmallModelInput:j,onAuthApiKeysChange:T,onAnthropicApiKeyChange:O})}),g.jsx(Vs,{id:"reasoning",isActive:lt==="reasoning",ref:$e=>wt("reasoning",$e),style:{animationDelay:"60ms"},children:g.jsx(Tae,{mode:Y,json:Q,jsonIssue:se,items:L,models:y,onToggleMode:q,onJsonChange:B,onAddItem:ae,onRemoveItem:G,onUpdateItem:D})}),g.jsx(Vs,{id:"aliases",isActive:lt==="aliases",ref:$e=>wt("aliases",$e),style:{animationDelay:"120ms"},children:g.jsx(Rae,{allowOriginalModelNamesForAliases:$i,mode:ve,json:re,jsonIssue:ze,items:Ee,models:y,onToggleMode:Le,onJsonChange:ot,onAddItem:Dt,onRemoveItem:Hr,onUpdateItem:En})}),g.jsx(Vs,{id:"prompts",isActive:lt==="prompts",ref:$e=>wt("prompts",$e),style:{animationDelay:"180ms"},children:g.jsx(Oae,{mode:V,json:K,jsonIssue:ee,items:he,models:y,onToggleMode:ye,onJsonChange:X,onAddItem:me,onRemoveItem:oe,onUpdateItem:le})}),g.jsx(Vs,{id:"advanced",isActive:lt==="advanced",ref:$e=>wt("advanced",$e),style:{animationDelay:"240ms"},children:g.jsx(Dae,{accountAffinityEnabled:N,modelRefreshIntervalInput:M,modelRefreshIntervalIssue:R,sessionAffinityRetentionInput:I,sessionAffinityRetentionIssue:$,allowOriginalModelNamesForAliases:$i,useFunctionApplyPatch:xa,forceAgent:Gt,compactUseSmallModel:Kr,messageStartInputTokensFallback:Wt,useMessagesApi:gs,useResponsesApiWebSearch:gi,responsesApiContextManagementModelsValue:bo,onToggleAccountAffinity:_,onModelRefreshIntervalChange:z,onSessionAffinityRetentionChange:F,onToggleAllowOriginalModelNamesForAliases:ur,onToggleUseFunctionApplyPatch:Bi,onToggleForceAgent:Ui,onToggleCompactUseSmallModel:yi,onToggleMessageStartInputTokensFallback:cr,onToggleUseMessagesApi:vi,onToggleUseResponsesApiWebSearch:wa,onResponsesApiContextManagementModelsChange:Er})}),g.jsx(Vs,{id:"providers",isActive:lt==="providers",ref:$e=>wt("providers",$e),style:{animationDelay:"300ms"},children:g.jsx(Iae,{items:Sa,issue:Zn,onAddProvider:lr,onRemoveProvider:Yt,onUpdateProvider:Qn,onAddModel:Xt,onRemoveModel:vs,onUpdateModel:Aa})})]})]}),o||t?g.jsx(lae,{saving:t,canSave:i,onSave:u}):null]})}function Bae(){const e=zae();return g.jsx($ae,{...e})}var Uae=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function JA(e){if(typeof e!="string")return!1;var t=Uae;return t.includes(e)}var Vae=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],Fae=new Set(Vae);function N4(e){return typeof e!="string"?!1:Fae.has(e)}function _4(e){return typeof e=="string"&&e.startsWith("data-")}function Ri(e){if(typeof e!="object"||e===null)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(N4(n)||_4(n))&&(t[n]=e[n]);return t}function uv(e){if(e==null)return null;if(v.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return Ri(t)}return typeof e=="object"&&!Array.isArray(e)?Ri(e):null}function Wn(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(N4(n)||_4(n)||JA(n))&&(t[n]=e[n]);return t}function qae(e){return e==null?null:v.isValidElement(e)?Wn(e.props):typeof e=="object"&&!Array.isArray(e)?Wn(e):null}var Hae=["children","width","height","viewBox","className","style","title","desc"];function I1(){return I1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},I1.apply(null,arguments)}function Kae(e,t){if(e==null)return{};var n,r,i=Gae(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Gae(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var eC=v.forwardRef((e,t)=>{var{children:n,width:r,height:i,viewBox:o,className:l,style:u,title:c,desc:d}=e,m=Kae(e,Hae),h=o||{width:r,height:i,x:0,y:0},y=at("recharts-surface",l);return v.createElement("svg",I1({},Wn(m),{className:y,width:r,height:i,style:u,viewBox:"".concat(h.x," ").concat(h.y," ").concat(h.width," ").concat(h.height),ref:t}),v.createElement("title",null,c),v.createElement("desc",null,d),n)}),Wae=["children","className"];function z1(){return z1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},z1.apply(null,arguments)}function Yae(e,t){if(e==null)return{};var n,r,i=Xae(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Xae(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Ur=v.forwardRef((e,t)=>{var{children:n,className:r}=e,i=Yae(e,Wae),o=at("recharts-layer",r);return v.createElement("g",z1({className:o},Wn(i),{ref:t}),n)}),M4=v.createContext(null),Zae=()=>v.useContext(M4);function vt(e){return function(){return e}}const R4=Math.cos,zp=Math.sin,Li=Math.sqrt,$p=Math.PI,cv=2*$p,$1=Math.PI,B1=2*$1,Fs=1e-6,Qae=B1-Fs;function D4(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function Jae(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return D4;const n=10**t;return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class eoe{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?D4:Jae(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,o,l){this._append`C${+t},${+n},${+r},${+i},${this._x1=+o},${this._y1=+l}`}arcTo(t,n,r,i,o){if(t=+t,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let l=this._x1,u=this._y1,c=r-t,d=i-n,m=l-t,h=u-n,y=m*m+h*h;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(y>Fs)if(!(Math.abs(h*c-d*m)>Fs)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let b=r-l,w=i-u,S=c*c+d*d,C=b*b+w*w,E=Math.sqrt(S),j=Math.sqrt(y),T=o*Math.tan(($1-Math.acos((S+y-C)/(2*E*j)))/2),O=T/j,N=T/E;Math.abs(O-1)>Fs&&this._append`L${t+O*m},${n+O*h}`,this._append`A${o},${o},0,0,${+(h*b>m*w)},${this._x1=t+N*c},${this._y1=n+N*d}`}}arc(t,n,r,i,o,l){if(t=+t,n=+n,r=+r,l=!!l,r<0)throw new Error(`negative radius: ${r}`);let u=r*Math.cos(i),c=r*Math.sin(i),d=t+u,m=n+c,h=1^l,y=l?i-o:o-i;this._x1===null?this._append`M${d},${m}`:(Math.abs(this._x1-d)>Fs||Math.abs(this._y1-m)>Fs)&&this._append`L${d},${m}`,r&&(y<0&&(y=y%B1+B1),y>Qae?this._append`A${r},${r},0,1,${h},${t-u},${n-c}A${r},${r},0,1,${h},${this._x1=d},${this._y1=m}`:y>Fs&&this._append`A${r},${r},0,${+(y>=$1)},${h},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function tC(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new eoe(t)}function nC(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function k4(e){this._context=e}k4.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function fv(e){return new k4(e)}function L4(e){return e[0]}function I4(e){return e[1]}function z4(e,t){var n=vt(!0),r=null,i=fv,o=null,l=tC(u);e=typeof e=="function"?e:e===void 0?L4:vt(e),t=typeof t=="function"?t:t===void 0?I4:vt(t);function u(c){var d,m=(c=nC(c)).length,h,y=!1,b;for(r==null&&(o=i(b=l())),d=0;d<=m;++d)!(d<m&&n(h=c[d],d,c))===y&&((y=!y)?o.lineStart():o.lineEnd()),y&&o.point(+e(h,d,c),+t(h,d,c));if(b)return o=null,b+""||null}return u.x=function(c){return arguments.length?(e=typeof c=="function"?c:vt(+c),u):e},u.y=function(c){return arguments.length?(t=typeof c=="function"?c:vt(+c),u):t},u.defined=function(c){return arguments.length?(n=typeof c=="function"?c:vt(!!c),u):n},u.curve=function(c){return arguments.length?(i=c,r!=null&&(o=i(r)),u):i},u.context=function(c){return arguments.length?(c==null?r=o=null:o=i(r=c),u):r},u}function Dm(e,t,n){var r=null,i=vt(!0),o=null,l=fv,u=null,c=tC(d);e=typeof e=="function"?e:e===void 0?L4:vt(+e),t=typeof t=="function"?t:vt(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?I4:vt(+n);function d(h){var y,b,w,S=(h=nC(h)).length,C,E=!1,j,T=new Array(S),O=new Array(S);for(o==null&&(u=l(j=c())),y=0;y<=S;++y){if(!(y<S&&i(C=h[y],y,h))===E)if(E=!E)b=y,u.areaStart(),u.lineStart();else{for(u.lineEnd(),u.lineStart(),w=y-1;w>=b;--w)u.point(T[w],O[w]);u.lineEnd(),u.areaEnd()}E&&(T[y]=+e(C,y,h),O[y]=+t(C,y,h),u.point(r?+r(C,y,h):T[y],n?+n(C,y,h):O[y]))}if(j)return u=null,j+""||null}function m(){return z4().defined(i).curve(l).context(o)}return d.x=function(h){return arguments.length?(e=typeof h=="function"?h:vt(+h),r=null,d):e},d.x0=function(h){return arguments.length?(e=typeof h=="function"?h:vt(+h),d):e},d.x1=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:vt(+h),d):r},d.y=function(h){return arguments.length?(t=typeof h=="function"?h:vt(+h),n=null,d):t},d.y0=function(h){return arguments.length?(t=typeof h=="function"?h:vt(+h),d):t},d.y1=function(h){return arguments.length?(n=h==null?null:typeof h=="function"?h:vt(+h),d):n},d.lineX0=d.lineY0=function(){return m().x(e).y(t)},d.lineY1=function(){return m().x(e).y(n)},d.lineX1=function(){return m().x(r).y(t)},d.defined=function(h){return arguments.length?(i=typeof h=="function"?h:vt(!!h),d):i},d.curve=function(h){return arguments.length?(l=h,o!=null&&(u=l(o)),d):l},d.context=function(h){return arguments.length?(h==null?o=u=null:u=l(o=h),d):o},d}class $4{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function toe(e){return new $4(e,!0)}function noe(e){return new $4(e,!1)}const rC={draw(e,t){const n=Li(t/$p);e.moveTo(n,0),e.arc(0,0,n,0,cv)}},roe={draw(e,t){const n=Li(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},B4=Li(1/3),ioe=B4*2,aoe={draw(e,t){const n=Li(t/ioe),r=n*B4;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},ooe={draw(e,t){const n=Li(t),r=-n/2;e.rect(r,r,n,n)}},soe=.8908130915292852,U4=zp($p/10)/zp(7*$p/10),loe=zp(cv/10)*U4,uoe=-R4(cv/10)*U4,coe={draw(e,t){const n=Li(t*soe),r=loe*n,i=uoe*n;e.moveTo(0,-n),e.lineTo(r,i);for(let o=1;o<5;++o){const l=cv*o/5,u=R4(l),c=zp(l);e.lineTo(c*n,-u*n),e.lineTo(u*r-c*i,c*r+u*i)}e.closePath()}},ox=Li(3),foe={draw(e,t){const n=-Li(t/(ox*3));e.moveTo(0,n*2),e.lineTo(-ox*n,-n),e.lineTo(ox*n,-n),e.closePath()}},ri=-.5,ii=Li(3)/2,U1=1/Li(12),doe=(U1/2+1)*3,hoe={draw(e,t){const n=Li(t/doe),r=n/2,i=n*U1,o=r,l=n*U1+n,u=-o,c=l;e.moveTo(r,i),e.lineTo(o,l),e.lineTo(u,c),e.lineTo(ri*r-ii*i,ii*r+ri*i),e.lineTo(ri*o-ii*l,ii*o+ri*l),e.lineTo(ri*u-ii*c,ii*u+ri*c),e.lineTo(ri*r+ii*i,ri*i-ii*r),e.lineTo(ri*o+ii*l,ri*l-ii*o),e.lineTo(ri*u+ii*c,ri*c-ii*u),e.closePath()}};function moe(e,t){let n=null,r=tC(i);e=typeof e=="function"?e:vt(e||rC),t=typeof t=="function"?t:vt(t===void 0?64:+t);function i(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:vt(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:vt(+o),i):t},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function Bp(){}function Up(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function V4(e){this._context=e}V4.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Up(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Up(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function poe(e){return new V4(e)}function F4(e){this._context=e}F4.prototype={areaStart:Bp,areaEnd:Bp,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Up(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function goe(e){return new F4(e)}function q4(e){this._context=e}q4.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Up(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function voe(e){return new q4(e)}function H4(e){this._context=e}H4.prototype={areaStart:Bp,areaEnd:Bp,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function yoe(e){return new H4(e)}function $M(e){return e<0?-1:1}function BM(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),l=(n-e._y1)/(i||r<0&&-0),u=(o*i+l*r)/(r+i);return($M(o)+$M(l))*Math.min(Math.abs(o),Math.abs(l),.5*Math.abs(u))||0}function UM(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function sx(e,t,n){var r=e._x0,i=e._y0,o=e._x1,l=e._y1,u=(o-r)/3;e._context.bezierCurveTo(r+u,i+u*t,o-u,l-u*n,o,l)}function Vp(e){this._context=e}Vp.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:sx(this,this._t0,UM(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,sx(this,UM(this,n=BM(this,e,t)),n);break;default:sx(this,this._t0,n=BM(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function K4(e){this._context=new G4(e)}(K4.prototype=Object.create(Vp.prototype)).point=function(e,t){Vp.prototype.point.call(this,t,e)};function G4(e){this._context=e}G4.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}};function boe(e){return new Vp(e)}function xoe(e){return new K4(e)}function W4(e){this._context=e}W4.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=VM(e),i=VM(t),o=0,l=1;l<n;++o,++l)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],e[l],t[l]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function VM(e){var t,n=e.length-1,r,i=new Array(n),o=new Array(n),l=new Array(n);for(i[0]=0,o[0]=2,l[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,o[t]=4,l[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,o[n-1]=7,l[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/o[t-1],o[t]-=r,l[t]-=r*l[t-1];for(i[n-1]=l[n-1]/o[n-1],t=n-2;t>=0;--t)i[t]=(l[t]-i[t+1])/o[t];for(o[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function woe(e){return new W4(e)}function dv(e,t){this._context=e,this._t=t}dv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function Soe(e){return new dv(e,.5)}function Aoe(e){return new dv(e,0)}function Coe(e){return new dv(e,1)}function pl(e,t){if((l=e.length)>1)for(var n=1,r,i,o=e[t[0]],l,u=o.length;n<l;++n)for(i=o,o=e[t[n]],r=0;r<u;++r)o[r][1]+=o[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function V1(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function Eoe(e,t){return e[t]}function joe(e){const t=[];return t.key=e,t}function Toe(){var e=vt([]),t=V1,n=pl,r=Eoe;function i(o){var l=Array.from(e.apply(this,arguments),joe),u,c=l.length,d=-1,m;for(const h of o)for(u=0,++d;u<c;++u)(l[u][d]=[0,+r(h,l[u].key,d,o)]).data=h;for(u=0,m=nC(t(l));u<c;++u)l[m[u]].index=u;return n(l,m),l}return i.keys=function(o){return arguments.length?(e=typeof o=="function"?o:vt(Array.from(o)),i):e},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:vt(+o),i):r},i.order=function(o){return arguments.length?(t=o==null?V1:typeof o=="function"?o:vt(Array.from(o)),i):t},i.offset=function(o){return arguments.length?(n=o??pl,i):n},i}function Ooe(e,t){if((r=e.length)>0){for(var n,r,i=0,o=e[0].length,l;i<o;++i){for(l=n=0;n<r;++n)l+=e[n][i][1]||0;if(l)for(n=0;n<r;++n)e[n][i][1]/=l}pl(e,t)}}function Poe(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,o=r.length;n<o;++n){for(var l=0,u=0;l<i;++l)u+=e[l][n][1]||0;r[n][1]+=r[n][0]=-u/2}pl(e,t)}}function Noe(e,t){if(!(!((l=e.length)>0)||!((o=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,o,l;r<o;++r){for(var u=0,c=0,d=0;u<l;++u){for(var m=e[t[u]],h=m[r][1]||0,y=m[r-1][1]||0,b=(h-y)/2,w=0;w<u;++w){var S=e[t[w]],C=S[r][1]||0,E=S[r-1][1]||0;b+=C-E}c+=h,d+=b*h}i[r-1][1]+=i[r-1][0]=n,c&&(n-=d/c)}i[r-1][1]+=i[r-1][0]=n,pl(e,t)}}var lx={},ux={},FM;function _oe(){return FM||(FM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==="__proto__"}e.isUnsafeProperty=t})(ux)),ux}var cx={},qM;function Y4(){return qM||(qM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){switch(typeof n){case"number":case"symbol":return!1;case"string":return n.includes(".")||n.includes("[")||n.includes("]")}}e.isDeepKey=t})(cx)),cx}var fx={},HM;function iC(){return HM||(HM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="string"||typeof n=="symbol"?n:Object.is(n?.valueOf?.(),-0)?"-0":String(n)}e.toKey=t})(fx)),fx}var dx={},hx={},KM;function Moe(){return KM||(KM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){if(n==null)return"";if(typeof n=="string")return n;if(Array.isArray(n))return n.map(t).join(",");const r=String(n);return r==="0"&&Object.is(Number(n),-0)?"-0":r}e.toString=t})(hx)),hx}var GM;function aC(){return GM||(GM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Moe(),n=iC();function r(i){if(Array.isArray(i))return i.map(n.toKey);if(typeof i=="symbol")return[i];i=t.toString(i);const o=[],l=i.length;if(l===0)return o;let u=0,c="",d="",m=!1;for(i.charCodeAt(0)===46&&(o.push(""),u++);u<l;){const h=i[u];d?h==="\\"&&u+1<l?(u++,c+=i[u]):h===d?d="":c+=h:m?h==='"'||h==="'"?d=h:h==="]"?(m=!1,o.push(c),c=""):c+=h:h==="["?(m=!0,c&&(o.push(c),c="")):h==="."?c&&(o.push(c),c=""):c+=h,u++}return c&&o.push(c),o}e.toPath=r})(dx)),dx}var WM;function oC(){return WM||(WM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=_oe(),n=Y4(),r=iC(),i=aC();function o(u,c,d){if(u==null)return d;switch(typeof c){case"string":{if(t.isUnsafeProperty(c))return d;const m=u[c];return m===void 0?n.isDeepKey(c)?o(u,i.toPath(c),d):d:m}case"number":case"symbol":{typeof c=="number"&&(c=r.toKey(c));const m=u[c];return m===void 0?d:m}default:{if(Array.isArray(c))return l(u,c,d);if(Object.is(c?.valueOf(),-0)?c="-0":c=String(c),t.isUnsafeProperty(c))return d;const m=u[c];return m===void 0?d:m}}}function l(u,c,d){if(c.length===0)return d;let m=u;for(let h=0;h<c.length;h++){if(m==null||t.isUnsafeProperty(c[h]))return d;m=m[c[h]]}return m===void 0?d:m}e.get=o})(lx)),lx}var mx,YM;function Roe(){return YM||(YM=1,mx=oC().get),mx}var Doe=Roe();const hv=va(Doe);var koe=4;function ts(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:koe,n=10**t,r=Math.round(e*n)/n;return Object.is(r,-0)?0:r}function Ut(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.reduce((i,o,l)=>{var u=n[l-1];return typeof u=="string"?i+u+o:u!==void 0?i+ts(u)+o:i+o},"")}var Oi=e=>e===0?0:e>0?1:-1,ha=e=>typeof e=="number"&&e!=+e,gl=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,Pe=e=>(typeof e=="number"||e instanceof Number)&&!ha(e),ma=e=>Pe(e)||typeof e=="string",Loe=0,fd=e=>{var t=++Loe;return"".concat(e||"").concat(t)},ls=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Pe(t)&&typeof t!="string")return r;var o;if(gl(t)){if(n==null)return r;var l=t.indexOf("%");o=n*parseFloat(t.slice(0,l))/100}else o=+t;return ha(o)&&(o=r),i&&n!=null&&o>n&&(o=n),o},X4=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++)if(!n[String(e[r])])n[String(e[r])]=!0;else return!0;return!1};function rn(e,t,n){return Pe(e)&&Pe(t)?ts(e+n*(t-e)):t}function Z4(e,t,n){if(!(!e||!e.length))return e.find(r=>r&&(typeof t=="function"?t(r):hv(r,t))===n)}var vn=e=>e===null||typeof e>"u",$d=e=>vn(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function na(e){return e!=null}function jl(){}var Ioe=["type","size","sizeType"];function F1(){return F1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},F1.apply(null,arguments)}function XM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ZM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?XM(Object(n),!0).forEach(function(r){zoe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zoe(e,t,n){return(t=$oe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $oe(e){var t=Boe(e,"string");return typeof t=="symbol"?t:t+""}function Boe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Uoe(e,t){if(e==null)return{};var n,r,i=Voe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Voe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Q4={symbolCircle:rC,symbolCross:roe,symbolDiamond:aoe,symbolSquare:ooe,symbolStar:coe,symbolTriangle:foe,symbolWye:hoe},Foe=Math.PI/180,qoe=e=>{var t="symbol".concat($d(e));return Q4[t]||rC},Hoe=(e,t,n)=>{if(t==="area")return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var r=18*Foe;return 1.25*e*e*(Math.tan(r)-Math.tan(r*2)*Math.tan(r)**2)}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},Koe=(e,t)=>{Q4["symbol".concat($d(e))]=t},sC=e=>{var{type:t="circle",size:n=64,sizeType:r="area"}=e,i=Uoe(e,Ioe),o=ZM(ZM({},i),{},{type:t,size:n,sizeType:r}),l="circle";typeof t=="string"&&(l=t);var u=()=>{var y=qoe(l),b=moe().type(y).size(Hoe(n,r,l)),w=b();if(w!==null)return w},{className:c,cx:d,cy:m}=o,h=Wn(o);return Pe(d)&&Pe(m)&&Pe(n)?v.createElement("path",F1({},h,{className:at("recharts-symbols",c),transform:"translate(".concat(d,", ").concat(m,")"),d:u()})):null};sC.registerSymbol=Koe;var J4=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,lC=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var n=e;if(v.isValidElement(e)&&(n=e.props),typeof n!="object"&&typeof n!="function")return null;var r={};return Object.keys(n).forEach(i=>{JA(i)&&typeof n[i]=="function"&&(r[i]=(o=>n[i](n,o)))}),r},Goe=(e,t,n)=>r=>(e(t,n,r),null),e$=(e,t,n)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var r=null;return Object.keys(e).forEach(i=>{var o=e[i];JA(i)&&typeof o=="function"&&(r||(r={}),r[i]=Goe(o,t,n))}),r};function QM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Woe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?QM(Object(n),!0).forEach(function(r){Yoe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Yoe(e,t,n){return(t=Xoe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xoe(e){var t=Zoe(e,"string");return typeof t=="symbol"?t:t+""}function Zoe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Yn(e,t){var n=Woe({},e),r=t,i=Object.keys(t),o=i.reduce((l,u)=>(l[u]===void 0&&r[u]!==void 0&&(l[u]=r[u]),l),n);return o}function Fp(){return Fp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fp.apply(null,arguments)}function JM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function t$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?JM(Object(n),!0).forEach(function(r){Qoe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Qoe(e,t,n){return(t=Joe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Joe(e){var t=ese(e,"string");return typeof t=="symbol"?t:t+""}function ese(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var si=32,tse={align:"center",iconSize:14,inactiveColor:"#ccc",layout:"horizontal",verticalAlign:"middle",labelStyle:{}};function nse(e){if(typeof e=="object"&&e!==null&&"strokeDasharray"in e)return String(e.strokeDasharray)}function rse(e){var{data:t,iconType:n,inactiveColor:r}=e,i=si/2,o=si/6,l=si/3,u=t.inactive?r:t.color,c=n??t.type;if(c==="none")return null;if(c==="plainline")return v.createElement("line",{strokeWidth:4,fill:"none",stroke:u,strokeDasharray:nse(t.payload),x1:0,y1:i,x2:si,y2:i,className:"recharts-legend-icon"});if(c==="line")return v.createElement("path",{strokeWidth:4,fill:"none",stroke:u,d:"M0,".concat(i,"h").concat(l,`
67
- A`).concat(o,",").concat(o,",0,1,1,").concat(2*l,",").concat(i,`
68
- H`).concat(si,"M").concat(2*l,",").concat(i,`
69
- A`).concat(o,",").concat(o,",0,1,1,").concat(l,",").concat(i),className:"recharts-legend-icon"});if(c==="rect")return v.createElement("path",{stroke:"none",fill:u,d:"M0,".concat(si/8,"h").concat(si,"v").concat(si*3/4,"h").concat(-si,"z"),className:"recharts-legend-icon"});if(v.isValidElement(t.legendIcon)){var d=t$({},t);return delete d.legendIcon,v.cloneElement(t.legendIcon,d)}return v.createElement(sC,{fill:u,cx:i,cy:i,size:si,sizeType:"diameter",type:c})}function ise(e){var{payload:t,iconSize:n,layout:r,formatter:i,inactiveColor:o,iconType:l,labelStyle:u}=e,c={x:0,y:0,width:si,height:si},d={display:r==="horizontal"?"inline-block":"block",marginRight:10},m={display:"inline-block",verticalAlign:"middle",marginRight:4};return t.map((h,y)=>{var b=h.formatter||i,w=at({"recharts-legend-item":!0,["legend-item-".concat(y)]:!0,inactive:h.inactive});if(h.type==="none")return null;var S=typeof u=="object"?t$({},u):{};S.color=h.inactive?o:S.color||h.color;var C=b?b(h.value,h,y):h.value;return v.createElement("li",Fp({className:w,style:d,key:"legend-item-".concat(y)},e$(e,h,y)),v.createElement(eC,{width:n,height:n,viewBox:c,style:m,"aria-label":"".concat(h.value," legend icon")},v.createElement(rse,{data:h,iconType:l,inactiveColor:o})),v.createElement("span",{className:"recharts-legend-item-text",style:S},C))})}var ase=e=>{var t=Yn(e,tse),{payload:n,layout:r,align:i}=t;if(!n||!n.length)return null;var o={padding:0,margin:0,textAlign:r==="horizontal"?i:"left"};return v.createElement("ul",{className:"recharts-default-legend",style:o},v.createElement(ise,Fp({},t,{payload:n})))},px={},gx={},eR;function ose(){return eR||(eR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){const i=new Map;for(let o=0;o<n.length;o++){const l=n[o],u=r(l,o,n);i.has(u)||i.set(u,l)}return Array.from(i.values())}e.uniqBy=t})(gx)),gx}var vx={},tR;function sse(){return tR||(tR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){return function(...i){return n.apply(this,i.slice(0,r))}}e.ary=t})(vx)),vx}var yx={},nR;function n$(){return nR||(nR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n}e.identity=t})(yx)),yx}var bx={},xx={},wx={},rR;function lse(){return rR||(rR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Number.isSafeInteger(n)&&n>=0}e.isLength=t})(wx)),wx}var iR;function r$(){return iR||(iR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=lse();function n(r){return r!=null&&typeof r!="function"&&t.isLength(r.length)}e.isArrayLike=n})(xx)),xx}var Sx={},aR;function use(){return aR||(aR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="object"&&n!==null}e.isObjectLike=t})(Sx)),Sx}var oR;function cse(){return oR||(oR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=r$(),n=use();function r(i){return n.isObjectLike(i)&&t.isArrayLike(i)}e.isArrayLikeObject=r})(bx)),bx}var Ax={},Cx={},sR;function fse(){return sR||(sR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=oC();function n(r){return function(i){return t.get(i,r)}}e.property=n})(Cx)),Cx}var Ex={},jx={},Tx={},Ox={},lR;function i$(){return lR||(lR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n!==null&&(typeof n=="object"||typeof n=="function")}e.isObject=t})(Ox)),Ox}var Px={},uR;function a$(){return uR||(uR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==null||typeof n!="object"&&typeof n!="function"}e.isPrimitive=t})(Px)),Px}var Nx={},cR;function o$(){return cR||(cR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){return n===r||Number.isNaN(n)&&Number.isNaN(r)}e.isEqualsSameValueZero=t})(Nx)),Nx}var fR;function dse(){return fR||(fR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=i$(),n=a$(),r=o$();function i(m,h,y){return typeof y!="function"?i(m,h,()=>{}):o(m,h,function b(w,S,C,E,j,T){const O=y(w,S,C,E,j,T);return O!==void 0?!!O:o(w,S,b,T)},new Map)}function o(m,h,y,b){if(h===m)return!0;switch(typeof h){case"object":return l(m,h,y,b);case"function":return Object.keys(h).length>0?o(m,{...h},y,b):r.isEqualsSameValueZero(m,h);default:return t.isObject(m)?typeof h=="string"?h==="":!0:r.isEqualsSameValueZero(m,h)}}function l(m,h,y,b){if(h==null)return!0;if(Array.isArray(h))return c(m,h,y,b);if(h instanceof Map)return u(m,h,y,b);if(h instanceof Set)return d(m,h,y,b);const w=Object.keys(h);if(m==null||n.isPrimitive(m))return w.length===0;if(w.length===0)return!0;if(b?.has(h))return b.get(h)===m;b?.set(h,m);try{for(let S=0;S<w.length;S++){const C=w[S];if(!n.isPrimitive(m)&&!(C in m)||h[C]===void 0&&m[C]!==void 0||h[C]===null&&m[C]!==null||!y(m[C],h[C],C,m,h,b))return!1}return!0}finally{b?.delete(h)}}function u(m,h,y,b){if(h.size===0)return!0;if(!(m instanceof Map))return!1;for(const[w,S]of h.entries()){const C=m.get(w);if(y(C,S,w,m,h,b)===!1)return!1}return!0}function c(m,h,y,b){if(h.length===0)return!0;if(!Array.isArray(m))return!1;const w=new Set;for(let S=0;S<h.length;S++){const C=h[S];let E=!1;for(let j=0;j<m.length;j++){if(w.has(j))continue;const T=m[j];let O=!1;if(y(T,C,S,m,h,b)&&(O=!0),O){w.add(j),E=!0;break}}if(!E)return!1}return!0}function d(m,h,y,b){return h.size===0?!0:m instanceof Set?c([...m],[...h],y,b):!1}e.isMatchWith=i,e.isSetMatch=d})(Tx)),Tx}var dR;function s$(){return dR||(dR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=dse();function n(r,i){return t.isMatchWith(r,i,()=>{})}e.isMatch=n})(jx)),jx}var _x={},Mx={},Rx={},hR;function hse(){return hR||(hR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Object.getOwnPropertySymbols(n).filter(r=>Object.prototype.propertyIsEnumerable.call(n,r))}e.getSymbols=t})(Rx)),Rx}var Dx={},mR;function uC(){return mR||(mR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}e.getTag=t})(Dx)),Dx}var kx={},pR;function l$(){return pR||(pR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t="[object RegExp]",n="[object String]",r="[object Number]",i="[object Boolean]",o="[object Arguments]",l="[object Symbol]",u="[object Date]",c="[object Map]",d="[object Set]",m="[object Array]",h="[object Function]",y="[object ArrayBuffer]",b="[object Object]",w="[object Error]",S="[object DataView]",C="[object Uint8Array]",E="[object Uint8ClampedArray]",j="[object Uint16Array]",T="[object Uint32Array]",O="[object BigUint64Array]",N="[object Int8Array]",_="[object Int16Array]",M="[object Int32Array]",R="[object BigInt64Array]",I="[object Float32Array]",$="[object Float64Array]";e.argumentsTag=o,e.arrayBufferTag=y,e.arrayTag=m,e.bigInt64ArrayTag=R,e.bigUint64ArrayTag=O,e.booleanTag=i,e.dataViewTag=S,e.dateTag=u,e.errorTag=w,e.float32ArrayTag=I,e.float64ArrayTag=$,e.functionTag=h,e.int16ArrayTag=_,e.int32ArrayTag=M,e.int8ArrayTag=N,e.mapTag=c,e.numberTag=r,e.objectTag=b,e.regexpTag=t,e.setTag=d,e.stringTag=n,e.symbolTag=l,e.uint16ArrayTag=j,e.uint32ArrayTag=T,e.uint8ArrayTag=C,e.uint8ClampedArrayTag=E})(kx)),kx}var Lx={},gR;function mse(){return gR||(gR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}e.isTypedArray=t})(Lx)),Lx}var vR;function u$(){return vR||(vR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=hse(),n=uC(),r=l$(),i=a$(),o=mse();function l(m,h){return u(m,void 0,m,new Map,h)}function u(m,h,y,b=new Map,w=void 0){const S=w?.(m,h,y,b);if(S!==void 0)return S;if(i.isPrimitive(m))return m;if(b.has(m))return b.get(m);if(Array.isArray(m)){const C=new Array(m.length);b.set(m,C);for(let E=0;E<m.length;E++)C[E]=u(m[E],E,y,b,w);return Object.hasOwn(m,"index")&&(C.index=m.index),Object.hasOwn(m,"input")&&(C.input=m.input),C}if(m instanceof Date)return new Date(m.getTime());if(m instanceof RegExp){const C=new RegExp(m.source,m.flags);return C.lastIndex=m.lastIndex,C}if(m instanceof Map){const C=new Map;b.set(m,C);for(const[E,j]of m)C.set(E,u(j,E,y,b,w));return C}if(m instanceof Set){const C=new Set;b.set(m,C);for(const E of m)C.add(u(E,void 0,y,b,w));return C}if(typeof Buffer<"u"&&Buffer.isBuffer(m))return m.subarray();if(o.isTypedArray(m)){const C=new(Object.getPrototypeOf(m)).constructor(m.length);b.set(m,C);for(let E=0;E<m.length;E++)C[E]=u(m[E],E,y,b,w);return C}if(m instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&m instanceof SharedArrayBuffer)return m.slice(0);if(m instanceof DataView){const C=new DataView(m.buffer.slice(0),m.byteOffset,m.byteLength);return b.set(m,C),c(C,m,y,b,w),C}if(typeof File<"u"&&m instanceof File){const C=new File([m],m.name,{type:m.type});return b.set(m,C),c(C,m,y,b,w),C}if(typeof Blob<"u"&&m instanceof Blob){const C=new Blob([m],{type:m.type});return b.set(m,C),c(C,m,y,b,w),C}if(m instanceof Error){const C=structuredClone(m);return b.set(m,C),C.message=m.message,C.name=m.name,C.stack=m.stack,C.cause=m.cause,C.constructor=m.constructor,c(C,m,y,b,w),C}if(m instanceof Boolean){const C=new Boolean(m.valueOf());return b.set(m,C),c(C,m,y,b,w),C}if(m instanceof Number){const C=new Number(m.valueOf());return b.set(m,C),c(C,m,y,b,w),C}if(m instanceof String){const C=new String(m.valueOf());return b.set(m,C),c(C,m,y,b,w),C}if(typeof m=="object"&&d(m)){const C=Object.create(Object.getPrototypeOf(m));return b.set(m,C),c(C,m,y,b,w),C}return m}function c(m,h,y=m,b,w){const S=[...Object.keys(h),...t.getSymbols(h)];for(let C=0;C<S.length;C++){const E=S[C],j=Object.getOwnPropertyDescriptor(m,E);(j==null||j.writable)&&(m[E]=u(h[E],E,y,b,w))}}function d(m){switch(n.getTag(m)){case r.argumentsTag:case r.arrayTag:case r.arrayBufferTag:case r.dataViewTag:case r.booleanTag:case r.dateTag:case r.float32ArrayTag:case r.float64ArrayTag:case r.int8ArrayTag:case r.int16ArrayTag:case r.int32ArrayTag:case r.mapTag:case r.numberTag:case r.objectTag:case r.regexpTag:case r.setTag:case r.stringTag:case r.symbolTag:case r.uint8ArrayTag:case r.uint8ClampedArrayTag:case r.uint16ArrayTag:case r.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=l,e.cloneDeepWithImpl=u,e.copyProperties=c})(Mx)),Mx}var yR;function pse(){return yR||(yR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=u$();function n(r){return t.cloneDeepWithImpl(r,void 0,r,new Map,void 0)}e.cloneDeep=n})(_x)),_x}var bR;function gse(){return bR||(bR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=s$(),n=pse();function r(i){return i=n.cloneDeep(i),o=>t.isMatch(o,i)}e.matches=r})(Ex)),Ex}var Ix={},zx={},$x={},xR;function vse(){return xR||(xR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=u$(),n=uC(),r=l$();function i(o,l){return t.cloneDeepWith(o,(u,c,d,m)=>{const h=l?.(u,c,d,m);if(h!==void 0)return h;if(typeof o=="object"){if(n.getTag(o)===r.objectTag&&typeof o.constructor!="function"){const y={};return m.set(o,y),t.copyProperties(y,o,d,m),y}switch(Object.prototype.toString.call(o)){case r.numberTag:case r.stringTag:case r.booleanTag:{const y=new o.constructor(o?.valueOf());return t.copyProperties(y,o),y}case r.argumentsTag:{const y={};return t.copyProperties(y,o),y.length=o.length,y[Symbol.iterator]=o[Symbol.iterator],y}default:return}}})}e.cloneDeepWith=i})($x)),$x}var wR;function yse(){return wR||(wR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=vse();function n(r){return t.cloneDeepWith(r)}e.cloneDeep=n})(zx)),zx}var Bx={},Ux={},SR;function c$(){return SR||(SR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;function n(r,i=Number.MAX_SAFE_INTEGER){switch(typeof r){case"number":return Number.isInteger(r)&&r>=0&&r<i;case"symbol":return!1;case"string":return t.test(r)}}e.isIndex=n})(Ux)),Ux}var Vx={},AR;function bse(){return AR||(AR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=uC();function n(r){return r!==null&&typeof r=="object"&&t.getTag(r)==="[object Arguments]"}e.isArguments=n})(Vx)),Vx}var CR;function xse(){return CR||(CR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Y4(),n=c$(),r=bse(),i=aC();function o(l,u){let c;if(Array.isArray(u)?c=u:typeof u=="string"&&t.isDeepKey(u)&&l?.[u]==null?c=i.toPath(u):c=[u],c.length===0)return!1;let d=l;for(let m=0;m<c.length;m++){const h=c[m];if((d==null||!Object.hasOwn(d,h))&&!((Array.isArray(d)||r.isArguments(d))&&n.isIndex(h)&&h<d.length))return!1;d=d[h]}return!0}e.has=o})(Bx)),Bx}var ER;function wse(){return ER||(ER=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=s$(),n=iC(),r=yse(),i=oC(),o=xse();function l(u,c){switch(typeof u){case"object":{Object.is(u?.valueOf(),-0)&&(u="-0");break}case"number":{u=n.toKey(u);break}}return c=r.cloneDeep(c),function(d){const m=i.get(d,u);return m===void 0?o.has(d,u):c===void 0?m===void 0:t.isMatch(m,c)}}e.matchesProperty=l})(Ix)),Ix}var jR;function Sse(){return jR||(jR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=n$(),n=fse(),r=gse(),i=wse();function o(l){if(l==null)return t.identity;switch(typeof l){case"function":return l;case"object":return Array.isArray(l)&&l.length===2?i.matchesProperty(l[0],l[1]):r.matches(l);case"string":case"symbol":case"number":return n.property(l)}}e.iteratee=o})(Ax)),Ax}var TR;function Ase(){return TR||(TR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ose(),n=sse(),r=n$(),i=cse(),o=Sse();function l(u,c=r.identity){return i.isArrayLikeObject(u)?t.uniqBy(Array.from(u),n.ary(o.iteratee(c),1)):[]}e.uniqBy=l})(px)),px}var Fx,OR;function Cse(){return OR||(OR=1,Fx=Ase().uniqBy),Fx}var Ese=Cse();const PR=va(Ese);function f$(e,t,n){return t===!0?PR(e,n):typeof t=="function"?PR(e,t):e}var qx={exports:{}},Hx={};var NR;function jse(){if(NR)return Hx;NR=1;var e=nc(),t=rI();function n(d,m){return d===m&&(d!==0||1/d===1/m)||d!==d&&m!==m}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,l=e.useEffect,u=e.useMemo,c=e.useDebugValue;return Hx.useSyncExternalStoreWithSelector=function(d,m,h,y,b){var w=o(null);if(w.current===null){var S={hasValue:!1,value:null};w.current=S}else S=w.current;w=u(function(){function E(_){if(!j){if(j=!0,T=_,_=y(_),b!==void 0&&S.hasValue){var M=S.value;if(b(M,_))return O=M}return O=_}if(M=O,r(T,_))return M;var R=y(_);return b!==void 0&&b(M,R)?(T=_,M):(T=_,O=R)}var j=!1,T,O,N=h===void 0?null:h;return[function(){return E(m())},N===null?void 0:function(){return E(N())}]},[m,h,y,b]);var C=i(d,w[0],w[1]);return l(function(){S.hasValue=!0,S.value=C},[C]),c(C),C},Hx}var _R;function Tse(){return _R||(_R=1,qx.exports=jse()),qx.exports}var Ose=Tse(),cC=v.createContext(null),Pse=e=>e,Vt=()=>{var e=v.useContext(cC);return e?e.store.dispatch:Pse},fp=()=>{},Nse=()=>fp,_se=(e,t)=>e===t;function Me(e){var t=v.useContext(cC),n=v.useMemo(()=>t?r=>{if(r!=null)return e(r)}:fp,[t,e]);return Ose.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:Nse,t?t.store.getState:fp,t?t.store.getState:fp,n,_se)}function Mse(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Rse(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Dse(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var MR=e=>Array.isArray(e)?e:[e];function kse(e){const t=Array.isArray(e[0])?e[0]:e;return Dse(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Lse(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var Ise=class{constructor(e){this.value=e}deref(){return this.value}},zse=typeof WeakRef<"u"?WeakRef:Ise,$se=0,RR=1;function km(){return{s:$se,v:void 0,o:null,p:null}}function d$(e,t={}){let n=km();const{resultEqualityCheck:r}=t;let i,o=0;function l(){let u=n;const{length:c}=arguments;for(let h=0,y=c;h<y;h++){const b=arguments[h];if(typeof b=="function"||typeof b=="object"&&b!==null){let w=u.o;w===null&&(u.o=w=new WeakMap);const S=w.get(b);S===void 0?(u=km(),w.set(b,u)):u=S}else{let w=u.p;w===null&&(u.p=w=new Map);const S=w.get(b);S===void 0?(u=km(),w.set(b,u)):u=S}}const d=u;let m;if(u.s===RR)m=u.v;else if(m=e.apply(null,arguments),o++,r){const h=i?.deref?.()??i;h!=null&&r(h,m)&&(m=h,o!==0&&o--),i=typeof m=="object"&&m!==null||typeof m=="function"?new zse(m):m}return d.s=RR,d.v=m,m}return l.clearCache=()=>{n=km(),l.resetResultsCount()},l.resultsCount=()=>o,l.resetResultsCount=()=>{o=0},l}function Bse(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let o=0,l=0,u,c={},d=i.pop();typeof d=="object"&&(c=d,d=i.pop()),Mse(d,`createSelector expects an output function after the inputs, but received: [${typeof d}]`);const m={...n,...c},{memoize:h,memoizeOptions:y=[],argsMemoize:b=d$,argsMemoizeOptions:w=[]}=m,S=MR(y),C=MR(w),E=kse(i),j=h(function(){return o++,d.apply(null,arguments)},...S),T=b(function(){l++;const N=Lse(E,arguments);return u=j.apply(null,N),u},...C);return Object.assign(T,{resultFunc:d,memoizedResultFunc:j,dependencies:E,dependencyRecomputations:()=>l,resetDependencyRecomputations:()=>{l=0},lastResult:()=>u,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:h,argsMemoize:b})};return Object.assign(r,{withTypes:()=>r}),r}var te=Bse(d$),Use=Object.assign((e,t=te)=>{Rse(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(o=>e[o]);return t(r,(...o)=>o.reduce((l,u,c)=>(l[n[c]]=u,l),{}))},{withTypes:()=>Use}),Kx={},Gx={},Wx={},DR;function Vse(){return DR||(DR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"?1:r===null?2:r===void 0?3:r!==r?4:0}const n=(r,i,o)=>{if(r!==i){const l=t(r),u=t(i);if(l===u&&l===0){if(r<i)return o==="desc"?1:-1;if(r>i)return o==="desc"?-1:1}return o==="desc"?u-l:l-u}return 0};e.compareValues=n})(Wx)),Wx}var Yx={},Xx={},kR;function h$(){return kR||(kR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="symbol"||n instanceof Symbol}e.isSymbol=t})(Xx)),Xx}var LR;function Fse(){return LR||(LR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=h$(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(o,l){return Array.isArray(o)?!1:typeof o=="number"||typeof o=="boolean"||o==null||t.isSymbol(o)?!0:typeof o=="string"&&(r.test(o)||!n.test(o))||l!=null&&Object.hasOwn(l,o)}e.isKey=i})(Yx)),Yx}var IR;function qse(){return IR||(IR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Vse(),n=Fse(),r=aC();function i(o,l,u,c){if(o==null)return[];u=c?void 0:u,Array.isArray(o)||(o=Object.values(o)),Array.isArray(l)||(l=l==null?[null]:[l]),l.length===0&&(l=[null]),Array.isArray(u)||(u=u==null?[]:[u]),u=u.map(b=>String(b));const d=(b,w)=>{let S=b;for(let C=0;C<w.length&&S!=null;++C)S=S[w[C]];return S},m=(b,w)=>w==null||b==null?w:typeof b=="object"&&"key"in b?Object.hasOwn(w,b.key)?w[b.key]:d(w,b.path):typeof b=="function"?b(w):Array.isArray(b)?d(w,b):typeof w=="object"?w[b]:w,h=l.map(b=>(Array.isArray(b)&&b.length===1&&(b=b[0]),b==null||typeof b=="function"||Array.isArray(b)||n.isKey(b)?b:{key:b,path:r.toPath(b)}));return o.map(b=>({original:b,criteria:h.map(w=>m(w,b))})).slice().sort((b,w)=>{for(let S=0;S<h.length;S++){const C=t.compareValues(b.criteria[S],w.criteria[S],u[S]);if(C!==0)return C}return 0}).map(b=>b.original)}e.orderBy=i})(Gx)),Gx}var Zx={},zR;function Hse(){return zR||(zR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r=1){const i=[],o=Math.floor(r),l=(u,c)=>{for(let d=0;d<u.length;d++){const m=u[d];Array.isArray(m)&&c<o?l(m,c+1):i.push(m)}};return l(n,0),i}e.flatten=t})(Zx)),Zx}var Qx={},$R;function m$(){return $R||($R=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=c$(),n=r$(),r=i$(),i=o$();function o(l,u,c){return r.isObject(c)&&(typeof u=="number"&&n.isArrayLike(c)&&t.isIndex(u)&&u<c.length||typeof u=="string"&&u in c)?i.isEqualsSameValueZero(c[u],l):!1}e.isIterateeCall=o})(Qx)),Qx}var BR;function Kse(){return BR||(BR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=qse(),n=Hse(),r=m$();function i(o,...l){const u=l.length;return u>1&&r.isIterateeCall(o,l[0],l[1])?l=[]:u>2&&r.isIterateeCall(l[0],l[1],l[2])&&(l=[l[0]]),t.orderBy(o,n.flatten(l),["asc"])}e.sortBy=i})(Kx)),Kx}var Jx,UR;function Gse(){return UR||(UR=1,Jx=Kse().sortBy),Jx}var Wse=Gse();const mv=va(Wse);var p$=e=>e.legend.settings,Yse=e=>e.legend.size,Xse=e=>e.legend.payload,Zse=te([Xse,p$],(e,t)=>{var{itemSorter:n}=t,r=e.flat(1);return n?mv(r,n):r});function Qse(){return Me(Zse)}var Lm=1;function g$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,n]=v.useState({height:0,left:0,top:0,width:0}),r=v.useCallback(i=>{if(i!=null){var o=i.getBoundingClientRect(),l={height:o.height,left:o.left,top:o.top,width:o.width};(Math.abs(l.height-t.height)>Lm||Math.abs(l.left-t.left)>Lm||Math.abs(l.top-t.top)>Lm||Math.abs(l.width-t.width)>Lm)&&n({height:l.height,left:l.left,top:l.top,width:l.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,r]}function _n(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Jse=typeof Symbol=="function"&&Symbol.observable||"@@observable",VR=Jse,ew=()=>Math.random().toString(36).substring(7).split("").join("."),ele={INIT:`@@redux/INIT${ew()}`,REPLACE:`@@redux/REPLACE${ew()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${ew()}`},qp=ele;function fC(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function v$(e,t,n){if(typeof e!="function")throw new Error(_n(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(_n(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(_n(1));return n(v$)(e,t)}let r=e,i=t,o=new Map,l=o,u=0,c=!1;function d(){l===o&&(l=new Map,o.forEach((C,E)=>{l.set(E,C)}))}function m(){if(c)throw new Error(_n(3));return i}function h(C){if(typeof C!="function")throw new Error(_n(4));if(c)throw new Error(_n(5));let E=!0;d();const j=u++;return l.set(j,C),function(){if(E){if(c)throw new Error(_n(6));E=!1,d(),l.delete(j),o=null}}}function y(C){if(!fC(C))throw new Error(_n(7));if(typeof C.type>"u")throw new Error(_n(8));if(typeof C.type!="string")throw new Error(_n(17));if(c)throw new Error(_n(9));try{c=!0,i=r(i,C)}finally{c=!1}return(o=l).forEach(j=>{j()}),C}function b(C){if(typeof C!="function")throw new Error(_n(10));r=C,y({type:qp.REPLACE})}function w(){const C=h;return{subscribe(E){if(typeof E!="object"||E===null)throw new Error(_n(11));function j(){const O=E;O.next&&O.next(m())}return j(),{unsubscribe:C(j)}},[VR](){return this}}}return y({type:qp.INIT}),{dispatch:y,subscribe:h,getState:m,replaceReducer:b,[VR]:w}}function tle(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:qp.INIT})>"u")throw new Error(_n(12));if(typeof n(void 0,{type:qp.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(_n(13))})}function y$(e){const t=Object.keys(e),n={};for(let o=0;o<t.length;o++){const l=t[o];typeof e[l]=="function"&&(n[l]=e[l])}const r=Object.keys(n);let i;try{tle(n)}catch(o){i=o}return function(l={},u){if(i)throw i;let c=!1;const d={};for(let m=0;m<r.length;m++){const h=r[m],y=n[h],b=l[h],w=y(b,u);if(typeof w>"u")throw u&&u.type,new Error(_n(14));d[h]=w,c=c||w!==b}return c=c||r.length!==Object.keys(l).length,c?d:l}}function Hp(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function nle(...e){return t=>(n,r)=>{const i=t(n,r);let o=()=>{throw new Error(_n(15))};const l={getState:i.getState,dispatch:(c,...d)=>o(c,...d)},u=e.map(c=>c(l));return o=Hp(...u)(i.dispatch),{...i,dispatch:o}}}function b$(e){return fC(e)&&"type"in e&&typeof e.type=="string"}var x$=Symbol.for("immer-nothing"),FR=Symbol.for("immer-draftable"),ir=Symbol.for("immer-state");function Ei(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var zr=Object,Gu=zr.getPrototypeOf,Kp="constructor",pv="prototype",q1="configurable",Gp="enumerable",dp="writable",dd="value",so=e=>!!e&&!!e[ir];function Di(e){return e?w$(e)||vv(e)||!!e[FR]||!!e[Kp]?.[FR]||yv(e)||bv(e):!1}var rle=zr[pv][Kp].toString(),qR=new WeakMap;function w$(e){if(!e||!dC(e))return!1;const t=Gu(e);if(t===null||t===zr[pv])return!0;const n=zr.hasOwnProperty.call(t,Kp)&&t[Kp];if(n===Object)return!0;if(!Cu(n))return!1;let r=qR.get(n);return r===void 0&&(r=Function.toString.call(n),qR.set(n,r)),r===rle}function gv(e,t,n=!0){Bd(e)===0?(n?Reflect.ownKeys(e):zr.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((r,i)=>t(i,r,e))}function Bd(e){const t=e[ir];return t?t.type_:vv(e)?1:yv(e)?2:bv(e)?3:0}var HR=(e,t,n=Bd(e))=>n===2?e.has(t):zr[pv].hasOwnProperty.call(e,t),H1=(e,t,n=Bd(e))=>n===2?e.get(t):e[t],Wp=(e,t,n,r=Bd(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function ile(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var vv=Array.isArray,yv=e=>e instanceof Map,bv=e=>e instanceof Set,dC=e=>typeof e=="object",Cu=e=>typeof e=="function",tw=e=>typeof e=="boolean";function ale(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var Ka=e=>e.copy_||e.base_,hC=e=>e.modified_?e.copy_:e.base_;function K1(e,t){if(yv(e))return new Map(e);if(bv(e))return new Set(e);if(vv(e))return Array[pv].slice.call(e);const n=w$(e);if(t===!0||t==="class_only"&&!n){const r=zr.getOwnPropertyDescriptors(e);delete r[ir];let i=Reflect.ownKeys(r);for(let o=0;o<i.length;o++){const l=i[o],u=r[l];u[dp]===!1&&(u[dp]=!0,u[q1]=!0),(u.get||u.set)&&(r[l]={[q1]:!0,[dp]:!0,[Gp]:u[Gp],[dd]:e[l]})}return zr.create(Gu(e),r)}else{const r=Gu(e);if(r!==null&&n)return{...e};const i=zr.create(r);return zr.assign(i,e)}}function mC(e,t=!1){return xv(e)||so(e)||!Di(e)||(Bd(e)>1&&zr.defineProperties(e,{set:Im,add:Im,clear:Im,delete:Im}),zr.freeze(e),t&&gv(e,(n,r)=>{mC(r,!0)},!1)),e}function ole(){Ei(2)}var Im={[dd]:ole};function xv(e){return e===null||!dC(e)?!0:zr.isFrozen(e)}var Yp="MapSet",G1="Patches",KR="ArrayMethods",S$={};function vl(e){const t=S$[e];return t||Ei(0,e),t}var GR=e=>!!S$[e],hd,A$=()=>hd,sle=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:GR(Yp)?vl(Yp):void 0,arrayMethodsPlugin_:GR(KR)?vl(KR):void 0});function WR(e,t){t&&(e.patchPlugin_=vl(G1),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function W1(e){Y1(e),e.drafts_.forEach(lle),e.drafts_=null}function Y1(e){e===hd&&(hd=e.parent_)}var YR=e=>hd=sle(hd,e);function lle(e){const t=e[ir];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function XR(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(e!==void 0&&e!==n){n[ir].modified_&&(W1(t),Ei(4)),Di(e)&&(e=ZR(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(n[ir].base_,e,t)}else e=ZR(t,n);return ule(t,e,!0),W1(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==x$?e:void 0}function ZR(e,t){if(xv(t))return t;const n=t[ir];if(!n)return Xp(t,e.handledSet_,e);if(!wv(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:r}=n;if(r)for(;r.length>0;)r.pop()(e);j$(n,e)}return n.copy_}function ule(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&mC(t,n)}function C$(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var wv=(e,t)=>e.scope_===t,cle=[];function E$(e,t,n,r){const i=Ka(e),o=e.type_;if(r!==void 0&&H1(i,r,o)===t){Wp(i,r,n,o);return}if(!e.draftLocations_){const u=e.draftLocations_=new Map;gv(i,(c,d)=>{if(so(d)){const m=u.get(d)||[];m.push(c),u.set(d,m)}})}const l=e.draftLocations_.get(t)??cle;for(const u of l)Wp(i,u,n,o)}function fle(e,t,n){e.callbacks_.push(function(i){const o=t;if(!o||!wv(o,i))return;i.mapSetPlugin_?.fixSetContents(o);const l=hC(o);E$(e,o.draft_??o,l,n),j$(o,i)})}function j$(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){const{patchPlugin_:r}=t;if(r){const i=r.getPath(e);i&&r.generatePatches_(e,i,t)}C$(e)}}function dle(e,t,n){const{scope_:r}=e;if(so(n)){const i=n[ir];wv(i,r)&&i.callbacks_.push(function(){hp(e);const l=hC(i);E$(e,n,l,t)})}else Di(n)&&e.callbacks_.push(function(){const o=Ka(e);e.type_===3?o.has(n)&&Xp(n,r.handledSet_,r):H1(o,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Xp(H1(e.copy_,t,e.type_),r.handledSet_,r)})}function Xp(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||so(e)||t.has(e)||!Di(e)||xv(e)||(t.add(e),gv(e,(r,i)=>{if(so(i)){const o=i[ir];if(wv(o,n)){const l=hC(o);Wp(e,r,l,e.type_),C$(o)}}else Di(i)&&Xp(i,t,n)})),e}function hle(e,t){const n=vv(e),r={type_:n?1:0,scope_:t?t.scope_:A$(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=r,o=Zp;n&&(i=[r],o=md);const{revoke:l,proxy:u}=Proxy.revocable(i,o);return r.draft_=u,r.revoke_=l,[u,r]}var Zp={get(e,t){if(t===ir)return e;let n=e.scope_.arrayMethodsPlugin_;const r=e.type_===1&&typeof t=="string";if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);const i=Ka(e);if(!HR(i,t,e.type_))return mle(e,i,t);const o=i[t];if(e.finalized_||!Di(o)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&ale(t))return o;if(o===nw(e.base_,t)){hp(e);const l=e.type_===1?+t:t,u=Z1(e.scope_,o,e,l);return e.copy_[l]=u}return o},has(e,t){return t in Ka(e)},ownKeys(e){return Reflect.ownKeys(Ka(e))},set(e,t,n){const r=T$(Ka(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=nw(Ka(e),t),o=i?.[ir];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(ile(n,i)&&(n!==void 0||HR(e.base_,t,e.type_)))return!0;hp(e),X1(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),dle(e,t,n)),!0},deleteProperty(e,t){return hp(e),nw(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),X1(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Ka(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[dp]:!0,[q1]:e.type_!==1||t!=="length",[Gp]:r[Gp],[dd]:n[t]}},defineProperty(){Ei(11)},getPrototypeOf(e){return Gu(e.base_)},setPrototypeOf(){Ei(12)}},md={};for(let e in Zp){let t=Zp[e];md[e]=function(){const n=arguments;return n[0]=n[0][0],t.apply(this,n)}}md.deleteProperty=function(e,t){return md.set.call(this,e,t,void 0)};md.set=function(e,t,n){return Zp.set.call(this,e[0],t,n,e[0])};function nw(e,t){const n=e[ir];return(n?Ka(n):e)[t]}function mle(e,t,n){const r=T$(t,n);return r?dd in r?r[dd]:r.get?.call(e.draft_):void 0}function T$(e,t){if(!(t in e))return;let n=Gu(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Gu(n)}}function X1(e){e.modified_||(e.modified_=!0,e.parent_&&X1(e.parent_))}function hp(e){e.copy_||(e.assigned_=new Map,e.copy_=K1(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var ple=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(n,r,i)=>{if(Cu(n)&&!Cu(r)){const l=r;r=n;const u=this;return function(d=l,...m){return u.produce(d,h=>r.call(this,h,...m))}}Cu(r)||Ei(6),i!==void 0&&!Cu(i)&&Ei(7);let o;if(Di(n)){const l=YR(this),u=Z1(l,n,void 0);let c=!0;try{o=r(u),c=!1}finally{c?W1(l):Y1(l)}return WR(l,i),XR(o,l)}else if(!n||!dC(n)){if(o=r(n),o===void 0&&(o=n),o===x$&&(o=void 0),this.autoFreeze_&&mC(o,!0),i){const l=[],u=[];vl(G1).generateReplacementPatches_(n,o,{patches_:l,inversePatches_:u}),i(l,u)}return o}else Ei(1,n)},this.produceWithPatches=(n,r)=>{if(Cu(n))return(u,...c)=>this.produceWithPatches(u,d=>n(d,...c));let i,o;return[this.produce(n,r,(u,c)=>{i=u,o=c}),i,o]},tw(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),tw(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),tw(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){Di(t)||Ei(8),so(t)&&(t=ui(t));const n=YR(this),r=Z1(n,t,void 0);return r[ir].isManual_=!0,Y1(n),r}finishDraft(t,n){const r=t&&t[ir];(!r||!r.isManual_)&&Ei(9);const{scope_:i}=r;return WR(i,n),XR(void 0,i)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,n){let r;for(r=n.length-1;r>=0;r--){const o=n[r];if(o.path.length===0&&o.op==="replace"){t=o.value;break}}r>-1&&(n=n.slice(r+1));const i=vl(G1).applyPatches_;return so(t)?i(t,n):this.produce(t,o=>i(o,n))}};function Z1(e,t,n,r){const[i,o]=yv(t)?vl(Yp).proxyMap_(t,n):bv(t)?vl(Yp).proxySet_(t,n):hle(t,n);return(n?.scope_??A$()).drafts_.push(i),o.callbacks_=n?.callbacks_??[],o.key_=r,n&&r!==void 0?fle(n,o,r):o.callbacks_.push(function(c){c.mapSetPlugin_?.fixSetContents(o);const{patchPlugin_:d}=c;o.modified_&&d&&d.generatePatches_(o,[],c)}),i}function ui(e){return so(e)||Ei(10,e),O$(e)}function O$(e){if(!Di(e)||xv(e))return e;const t=e[ir];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=K1(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=K1(e,!0);return gv(n,(i,o)=>{Wp(n,i,O$(o))},r),t&&(t.finalized_=!1),n}var gle=new ple,P$=gle.produce;function N$(e){return({dispatch:n,getState:r})=>i=>o=>typeof o=="function"?o(n,r,e):i(o)}var vle=N$(),yle=N$,ble=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Hp:Hp.apply(null,arguments)};function Vr(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error(Br(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>b$(r)&&r.type===e,n}var _$=class If extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,If.prototype)}static get[Symbol.species](){return If}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new If(...t[0].concat(this)):new If(...t.concat(this))}};function QR(e){return Di(e)?P$(e,()=>{}):e}function zm(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function xle(e){return typeof e=="boolean"}var wle=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let l=new _$;return n&&(xle(n)?l.push(vle):l.push(yle(n.extraArgument))),l},M$="RTK_autoBatch",Et=()=>e=>({payload:e,meta:{[M$]:!0}}),JR=e=>t=>{setTimeout(t,e)},R$=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,o=!1,l=!1;const u=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:JR(10):e.type==="callback"?e.queueNotification:JR(e.timeout),d=()=>{l=!1,o&&(o=!1,u.forEach(m=>m()))};return Object.assign({},r,{subscribe(m){const h=()=>i&&m(),y=r.subscribe(h);return u.add(m),()=>{y(),u.delete(m)}},dispatch(m){try{return i=!m?.meta?.[M$],o=!i,o&&(l||(l=!0,c(d))),r.dispatch(m)}finally{i=!0}}})},Sle=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new _$(e);return r&&i.push(R$(typeof r=="object"?r:void 0)),i};function Ale(e){const t=wle(),{reducer:n=void 0,middleware:r,devTools:i=!0,preloadedState:o=void 0,enhancers:l=void 0}=e||{};let u;if(typeof n=="function")u=n;else if(fC(n))u=y$(n);else throw new Error(Br(1));let c;typeof r=="function"?c=r(t):c=t();let d=Hp;i&&(d=ble({trace:!1,...typeof i=="object"&&i}));const m=nle(...c),h=Sle(m);let y=typeof l=="function"?l(h):h();const b=d(...y);return v$(u,o,b)}function D$(e){const t={},n=[];let r;const i={addCase(o,l){const u=typeof o=="string"?o:o.type;if(!u)throw new Error(Br(28));if(u in t)throw new Error(Br(29));return t[u]=l,i},addAsyncThunk(o,l){return l.pending&&(t[o.pending.type]=l.pending),l.rejected&&(t[o.rejected.type]=l.rejected),l.fulfilled&&(t[o.fulfilled.type]=l.fulfilled),l.settled&&n.push({matcher:o.settled,reducer:l.settled}),i},addMatcher(o,l){return n.push({matcher:o,reducer:l}),i},addDefaultCase(o){return r=o,i}};return e(i),[t,n,r]}function Cle(e){return typeof e=="function"}function Ele(e,t){let[n,r,i]=D$(t),o;if(Cle(e))o=()=>QR(e());else{const u=QR(e);o=()=>u}function l(u=o(),c){let d=[n[c.type],...r.filter(({matcher:m})=>m(c)).map(({reducer:m})=>m)];return d.filter(m=>!!m).length===0&&(d=[i]),d.reduce((m,h)=>{if(h)if(so(m)){const b=h(m,c);return b===void 0?m:b}else{if(Di(m))return P$(m,y=>h(y,c));{const y=h(m,c);if(y===void 0){if(m===null)return m;throw Error("A case reducer on a non-draftable value must not return undefined")}return y}}return m},u)}return l.getInitialState=o,l}var jle="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Tle=(e=21)=>{let t="",n=e;for(;n--;)t+=jle[Math.random()*64|0];return t},Ole=Symbol.for("rtk-slice-createasyncthunk");function Ple(e,t){return`${e}/${t}`}function Nle({creators:e}={}){const t=e?.asyncThunk?.[Ole];return function(r){const{name:i,reducerPath:o=i}=r;if(!i)throw new Error(Br(11));const l=(typeof r.reducers=="function"?r.reducers(Mle()):r.reducers)||{},u=Object.keys(l),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},d={addCase(T,O){const N=typeof T=="string"?T:T.type;if(!N)throw new Error(Br(12));if(N in c.sliceCaseReducersByType)throw new Error(Br(13));return c.sliceCaseReducersByType[N]=O,d},addMatcher(T,O){return c.sliceMatchers.push({matcher:T,reducer:O}),d},exposeAction(T,O){return c.actionCreators[T]=O,d},exposeCaseReducer(T,O){return c.sliceCaseReducersByName[T]=O,d}};u.forEach(T=>{const O=l[T],N={reducerName:T,type:Ple(i,T),createNotation:typeof r.reducers=="function"};Dle(O)?Lle(N,O,d,t):Rle(N,O,d)});function m(){const[T={},O=[],N=void 0]=typeof r.extraReducers=="function"?D$(r.extraReducers):[r.extraReducers],_={...T,...c.sliceCaseReducersByType};return Ele(r.initialState,M=>{for(let R in _)M.addCase(R,_[R]);for(let R of c.sliceMatchers)M.addMatcher(R.matcher,R.reducer);for(let R of O)M.addMatcher(R.matcher,R.reducer);N&&M.addDefaultCase(N)})}const h=T=>T,y=new Map,b=new WeakMap;let w;function S(T,O){return w||(w=m()),w(T,O)}function C(){return w||(w=m()),w.getInitialState()}function E(T,O=!1){function N(M){let R=M[T];return typeof R>"u"&&O&&(R=zm(b,N,C)),R}function _(M=h){const R=zm(y,O,()=>new WeakMap);return zm(R,M,()=>{const I={};for(const[$,F]of Object.entries(r.selectors??{}))I[$]=_le(F,M,()=>zm(b,M,C),O);return I})}return{reducerPath:T,getSelectors:_,get selectors(){return _(N)},selectSlice:N}}const j={name:i,reducer:S,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:C,...E(o),injectInto(T,{reducerPath:O,...N}={}){const _=O??o;return T.inject({reducerPath:_,reducer:S},N),{...j,...E(_,!0)}}};return j}}function _le(e,t,n,r){function i(o,...l){let u=t(o);return typeof u>"u"&&r&&(u=n()),e(u,...l)}return i.unwrapped=e,i}var Xn=Nle();function Mle(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function Rle({type:e,reducerName:t,createNotation:n},r,i){let o,l;if("reducer"in r){if(n&&!kle(r))throw new Error(Br(17));o=r.reducer,l=r.prepare}else o=r;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,l?Vr(e,l):Vr(e))}function Dle(e){return e._reducerDefinitionType==="asyncThunk"}function kle(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Lle({type:e,reducerName:t},n,r,i){if(!i)throw new Error(Br(18));const{payloadCreator:o,fulfilled:l,pending:u,rejected:c,settled:d,options:m}=n,h=i(e,o,m);r.exposeAction(t,h),l&&r.addCase(h.fulfilled,l),u&&r.addCase(h.pending,u),c&&r.addCase(h.rejected,c),d&&r.addMatcher(h.settled,d),r.exposeCaseReducer(t,{fulfilled:l||$m,pending:u||$m,rejected:c||$m,settled:d||$m})}function $m(){}var Ile="task",k$="listener",L$="completed",pC="cancelled",zle=`task-${pC}`,$le=`task-${L$}`,Q1=`${k$}-${pC}`,Ble=`${k$}-${L$}`,Sv=class{constructor(e){this.code=e,this.message=`${Ile} ${pC} (reason: ${e})`}name="TaskAbortError";message},gC=(e,t)=>{if(typeof e!="function")throw new TypeError(Br(32))},Qp=()=>{},I$=(e,t=Qp)=>(e.catch(t),e),z$=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),al=e=>{if(e.aborted)throw new Sv(e.reason)};function $$(e,t){let n=Qp;return new Promise((r,i)=>{const o=()=>i(new Sv(e.reason));if(e.aborted){o();return}n=z$(e,o),t.finally(()=>n()).then(r,i)}).finally(()=>{n=Qp})}var Ule=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(n){return{status:n instanceof Sv?"cancelled":"rejected",error:n}}finally{t?.()}},Jp=e=>t=>I$($$(e,t).then(n=>(al(e),n))),B$=e=>{const t=Jp(e);return n=>t(new Promise(r=>setTimeout(r,n)))},{assign:Iu}=Object,eD={},Av="listenerMiddleware",Vle=(e,t)=>{const n=r=>z$(e,()=>r.abort(e.reason));return(r,i)=>{gC(r);const o=new AbortController;n(o);const l=Ule(async()=>{al(e),al(o.signal);const u=await r({pause:Jp(o.signal),delay:B$(o.signal),signal:o.signal});return al(o.signal),u},()=>o.abort($le));return i?.autoJoin&&t.push(l.catch(Qp)),{result:Jp(e)(l),cancel(){o.abort(zle)}}}},Fle=(e,t)=>{const n=async(r,i)=>{al(t);let o=()=>{};const u=[new Promise((c,d)=>{let m=e({predicate:r,effect:(h,y)=>{y.unsubscribe(),c([h,y.getState(),y.getOriginalState()])}});o=()=>{m(),d()}})];i!=null&&u.push(new Promise(c=>setTimeout(c,i,null)));try{const c=await $$(t,Promise.race(u));return al(t),c}finally{o()}};return(r,i)=>I$(n(r,i))},U$=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:o}=e;if(t)i=Vr(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw new Error(Br(21));return gC(o),{predicate:i,type:t,effect:o}},V$=Iu(e=>{const{type:t,predicate:n,effect:r}=U$(e);return{id:Tle(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(Br(22))}}},{withTypes:()=>V$}),tD=(e,t)=>{const{type:n,effect:r,predicate:i}=U$(t);return Array.from(e.values()).find(o=>(typeof n=="string"?o.type===n:o.predicate===i)&&o.effect===r)},J1=e=>{e.pending.forEach(t=>{t.abort(Q1)})},qle=(e,t)=>()=>{for(const n of t.keys())J1(n);e.clear()},nD=(e,t,n)=>{try{e(t,n)}catch(r){setTimeout(()=>{throw r},0)}},F$=Iu(Vr(`${Av}/add`),{withTypes:()=>F$}),Hle=Vr(`${Av}/removeAll`),q$=Iu(Vr(`${Av}/remove`),{withTypes:()=>q$}),Kle=(...e)=>{console.error(`${Av}/error`,...e)},Ud=(e={})=>{const t=new Map,n=new Map,r=b=>{const w=n.get(b)??0;n.set(b,w+1)},i=b=>{const w=n.get(b)??1;w===1?n.delete(b):n.set(b,w-1)},{extra:o,onError:l=Kle}=e;gC(l);const u=b=>(b.unsubscribe=()=>t.delete(b.id),t.set(b.id,b),w=>{b.unsubscribe(),w?.cancelActive&&J1(b)}),c=b=>{const w=tD(t,b)??V$(b);return u(w)};Iu(c,{withTypes:()=>c});const d=b=>{const w=tD(t,b);return w&&(w.unsubscribe(),b.cancelActive&&J1(w)),!!w};Iu(d,{withTypes:()=>d});const m=async(b,w,S,C)=>{const E=new AbortController,j=Fle(c,E.signal),T=[];try{b.pending.add(E),r(b),await Promise.resolve(b.effect(w,Iu({},S,{getOriginalState:C,condition:(O,N)=>j(O,N).then(Boolean),take:j,delay:B$(E.signal),pause:Jp(E.signal),extra:o,signal:E.signal,fork:Vle(E.signal,T),unsubscribe:b.unsubscribe,subscribe:()=>{t.set(b.id,b)},cancelActiveListeners:()=>{b.pending.forEach((O,N,_)=>{O!==E&&(O.abort(Q1),_.delete(O))})},cancel:()=>{E.abort(Q1),b.pending.delete(E)},throwIfCancelled:()=>{al(E.signal)}})))}catch(O){O instanceof Sv||nD(l,O,{raisedBy:"effect"})}finally{await Promise.all(T),E.abort(Ble),i(b),b.pending.delete(E)}},h=qle(t,n);return{middleware:b=>w=>S=>{if(!b$(S))return w(S);if(F$.match(S))return c(S.payload);if(Hle.match(S)){h();return}if(q$.match(S))return d(S.payload);let C=b.getState();const E=()=>{if(C===eD)throw new Error(Br(23));return C};let j;try{if(j=w(S),t.size>0){const T=b.getState(),O=Array.from(t.values());for(const N of O){let _=!1;try{_=N.predicate(S,T,C)}catch(M){_=!1,nD(l,M,{raisedBy:"predicate"})}_&&m(N,S,b,E)}}}finally{C=eD}return j},startListening:c,stopListening:d,clearListeners:h}};function Br(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Gle={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},H$=Xn({name:"chartLayout",initialState:Gle,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var n,r,i,o;e.margin.top=(n=t.payload.top)!==null&&n!==void 0?n:0,e.margin.right=(r=t.payload.right)!==null&&r!==void 0?r:0,e.margin.bottom=(i=t.payload.bottom)!==null&&i!==void 0?i:0,e.margin.left=(o=t.payload.left)!==null&&o!==void 0?o:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:Wle,setLayout:Yle,setChartSize:Xle,setScale:Zle}=H$.actions,Qle=H$.reducer;function K$(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function nt(e){return Number.isFinite(e)}function us(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function rD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function _u(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rD(Object(n),!0).forEach(function(r){Jle(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Jle(e,t,n){return(t=eue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eue(e){var t=tue(e,"string");return typeof t=="symbol"?t:t+""}function tue(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function sn(e,t,n){return vn(e)||vn(t)?n:ma(t)?hv(e,t,n):typeof t=="function"?t(e):n}var nue=(e,t,n)=>{if(t&&n){var{width:r,height:i}=n,{align:o,verticalAlign:l,layout:u}=t;if((u==="vertical"||u==="horizontal"&&l==="middle")&&o!=="center"&&Pe(e[o]))return _u(_u({},e),{},{[o]:e[o]+(r||0)});if((u==="horizontal"||u==="vertical"&&o==="center")&&l!=="middle"&&Pe(e[l]))return _u(_u({},e),{},{[l]:e[l]+(i||0)})}return e},Ii=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",rue=e=>{var t,n=e.length;if(!(n<=0)){var r=(t=e[0])===null||t===void 0?void 0:t.length;if(!(r==null||r<=0))for(var i=0;i<r;++i)for(var o=0,l=0,u=0;u<n;++u){var c=e[u],d=c?.[i];if(d!=null){var m=d[1],h=d[0],y=ha(m)?h:m;y>=0?(d[0]=o,o+=y,d[1]=o):(d[0]=l,l+=y,d[1]=l)}}}},iue=e=>{var t,n=e.length;if(!(n<=0)){var r=(t=e[0])===null||t===void 0?void 0:t.length;if(!(r==null||r<=0))for(var i=0;i<r;++i)for(var o=0,l=0;l<n;++l){var u=e[l],c=u?.[i];if(c!=null){var d=ha(c[1])?c[0]:c[1];d>=0?(c[0]=o,o+=d,c[1]=o):(c[0]=0,c[1]=0)}}}},aue={sign:rue,expand:Ooe,none:pl,silhouette:Poe,wiggle:Noe,positive:iue},oue=(e,t,n)=>{var r,i=(r=aue[n])!==null&&r!==void 0?r:pl,o=Toe().keys(t).value((u,c)=>Number(sn(u,c,0))).order(V1).offset(i),l=o(e);return l.forEach((u,c)=>{u.forEach((d,m)=>{var h=sn(e[m],t[c],0);Array.isArray(h)&&h.length===2&&Pe(h[0])&&Pe(h[1])&&(d[0]=h[0],d[1]=h[1])})}),l};function sue(e){return e==null?void 0:String(e)}function eg(e){var{axis:t,ticks:n,bandSize:r,entry:i,index:o,dataKey:l}=e;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!vn(i[t.dataKey])){var u=Z4(n,"value",i[t.dataKey]);if(u)return u.coordinate+r/2}return n!=null&&n[o]?n[o].coordinate+r/2:null}var c=sn(i,vn(l)?t.dataKey:l),d=t.scale.map(c);return Pe(d)?d:null}var lue=e=>{var t=e.flat(2).filter(Pe);return[Math.min(...t),Math.max(...t)]},uue=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],cue=(e,t,n)=>{if(e!=null)return uue(Object.keys(e).reduce((r,i)=>{var o=e[i];if(!o)return r;var{stackedData:l}=o,u=l.reduce((c,d)=>{var m=K$(d,t,n),h=lue(m);return!nt(h[0])||!nt(h[1])?c:[Math.min(c[0],h[0]),Math.max(c[1],h[1])]},[1/0,-1/0]);return[Math.min(u[0],r[0]),Math.max(u[1],r[1])]},[1/0,-1/0]))},iD=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,aD=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Wu=(e,t,n)=>{if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var i=mv(t,m=>m.coordinate),o=1/0,l=1,u=i.length;l<u;l++){var c=i[l],d=i[l-1];o=Math.min((c?.coordinate||0)-(d?.coordinate||0),o)}return o===1/0?0:o}return n?void 0:0};function oD(e){var{tooltipEntrySettings:t,dataKey:n,payload:r,value:i,name:o}=e;return _u(_u({},t),{},{dataKey:n,payload:r,value:i,name:o})}function Cv(e,t){if(e)return String(e);if(typeof t=="string")return t}var fue=(e,t)=>{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},due=(e,t)=>t==="centric"?e.angle:e.radius,fo=e=>e.layout.width,ho=e=>e.layout.height,hue=e=>e.layout.scale,G$=e=>e.layout.margin,Ev=te(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),jv=te(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),mue="data-recharts-item-index",pue="data-recharts-item-id",Vd=60;function sD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Bm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sD(Object(n),!0).forEach(function(r){gue(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gue(e,t,n){return(t=vue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vue(e){var t=yue(e,"string");return typeof t=="symbol"?t:t+""}function yue(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var bue=e=>e.brush.height;function xue(e){var t=jv(e);return t.reduce((n,r)=>{if(r.orientation==="left"&&!r.mirror&&!r.hide){var i=typeof r.width=="number"?r.width:Vd;return n+i}return n},0)}function wue(e){var t=jv(e);return t.reduce((n,r)=>{if(r.orientation==="right"&&!r.mirror&&!r.hide){var i=typeof r.width=="number"?r.width:Vd;return n+i}return n},0)}function Sue(e){var t=Ev(e);return t.reduce((n,r)=>r.orientation==="top"&&!r.mirror&&!r.hide?n+r.height:n,0)}function Aue(e){var t=Ev(e);return t.reduce((n,r)=>r.orientation==="bottom"&&!r.mirror&&!r.hide?n+r.height:n,0)}var Vn=te([fo,ho,G$,bue,xue,wue,Sue,Aue,p$,Yse],(e,t,n,r,i,o,l,u,c,d)=>{var m={left:(n.left||0)+i,right:(n.right||0)+o},h={top:(n.top||0)+l,bottom:(n.bottom||0)+u},y=Bm(Bm({},h),m),b=y.bottom;y.bottom+=r,y=nue(y,c,d);var w=e-y.left-y.right,S=t-y.top-y.bottom;return Bm(Bm({brushBottom:b},y),{},{width:Math.max(w,0),height:Math.max(S,0)})}),Cue=te(Vn,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),W$=te(fo,ho,(e,t)=>({x:0,y:0,width:e,height:t})),Eue=v.createContext(null),or=()=>v.useContext(Eue)!=null,Tv=e=>e.brush,Ov=te([Tv,Vn,G$],(e,t,n)=>({height:e.height,x:Pe(e.x)?e.x:t.left,y:Pe(e.y)?e.y:t.top+t.height+t.brushBottom-(n?.bottom||0),width:Pe(e.width)?e.width:t.width})),rw={},iw={},aw={},lD;function jue(){return lD||(lD=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r,{signal:i,edges:o}={}){let l,u=null;const c=o!=null&&o.includes("leading"),d=o==null||o.includes("trailing"),m=()=>{u!==null&&(n.apply(l,u),l=void 0,u=null)},h=()=>{d&&m(),S()};let y=null;const b=()=>{y!=null&&clearTimeout(y),y=setTimeout(()=>{y=null,h()},r)},w=()=>{y!==null&&(clearTimeout(y),y=null)},S=()=>{w(),l=void 0,u=null},C=()=>{m()},E=function(...j){if(i?.aborted)return;l=this,u=j;const T=y==null;b(),c&&T&&m()};return E.schedule=b,E.cancel=S,E.flush=C,i?.addEventListener("abort",S,{once:!0}),E}e.debounce=t})(aw)),aw}var uD;function Tue(){return uD||(uD=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=jue();function n(r,i=0,o={}){typeof o!="object"&&(o={});const{leading:l=!1,trailing:u=!0,maxWait:c}=o,d=Array(2);l&&(d[0]="leading"),u&&(d[1]="trailing");let m,h=null;const y=t.debounce(function(...S){m=r.apply(this,S),h=null},i,{edges:d}),b=function(...S){return c!=null&&(h===null&&(h=Date.now()),Date.now()-h>=c)?(m=r.apply(this,S),h=Date.now(),y.cancel(),y.schedule(),m):(y.apply(this,S),m)},w=()=>(y.flush(),m);return b.cancel=y.cancel,b.flush=w,b}e.debounce=n})(iw)),iw}var cD;function Oue(){return cD||(cD=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Tue();function n(r,i=0,o={}){const{leading:l=!0,trailing:u=!0}=o;return t.debounce(r,i,{leading:l,maxWait:i,trailing:u})}e.throttle=n})(rw)),rw}var ow,fD;function Pue(){return fD||(fD=1,ow=Oue().throttle),ow}var Nue=Pue();const _ue=va(Nue);var dD=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];if(typeof console<"u"&&console.warn&&(n===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(n===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=0;console.warn(n.replace(/%s/g,()=>i[l++]))}},ra={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},Y$=(e,t,n)=>{var{width:r=ra.width,height:i=ra.height,aspect:o,maxHeight:l}=n,u=gl(r)?e:Number(r),c=gl(i)?t:Number(i);return o&&o>0&&(u?c=u/o:c&&(u=c*o),l&&c!=null&&c>l&&(c=l)),{calculatedWidth:u,calculatedHeight:c}},Mue={width:0,height:0,overflow:"visible"},Rue={width:0,overflowX:"visible"},Due={height:0,overflowY:"visible"},kue={},Lue=e=>{var{width:t,height:n}=e,r=gl(t),i=gl(n);return r&&i?Mue:r?Rue:i?Due:kue};function Iue(e){var{width:t,height:n,aspect:r}=e,i=t,o=n;return i===void 0&&o===void 0?(i=ra.width,o=ra.height):i===void 0?i=r&&r>0?void 0:ra.width:o===void 0&&(o=r&&r>0?void 0:ra.height),{width:i,height:o}}function eS(){return eS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},eS.apply(null,arguments)}function hD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function mD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?hD(Object(n),!0).forEach(function(r){zue(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zue(e,t,n){return(t=$ue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $ue(e){var t=Bue(e,"string");return typeof t=="symbol"?t:t+""}function Bue(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var X$=v.createContext(ra.initialDimension);function Uue(e){return us(e.width)&&us(e.height)}function Z$(e){var{children:t,width:n,height:r}=e,i=v.useMemo(()=>({width:n,height:r}),[n,r]);return Uue(i)?v.createElement(X$.Provider,{value:i},t):null}var vC=()=>v.useContext(X$),Vue=v.forwardRef((e,t)=>{var{aspect:n,initialDimension:r=ra.initialDimension,width:i,height:o,minWidth:l=ra.minWidth,minHeight:u,maxHeight:c,children:d,debounce:m=ra.debounce,id:h,className:y,onResize:b,style:w={}}=e,S=v.useRef(null),C=v.useRef();C.current=b,v.useImperativeHandle(t,()=>S.current);var[E,j]=v.useState({containerWidth:r.width,containerHeight:r.height}),T=v.useCallback((R,I)=>{j($=>{var F=Math.round(R),z=Math.round(I);return $.containerWidth===F&&$.containerHeight===z?$:{containerWidth:F,containerHeight:z}})},[]);v.useEffect(()=>{if(S.current==null||typeof ResizeObserver>"u")return jl;var R=z=>{var Y,Q=z[0];if(Q!=null){var{width:se,height:L}=Q.contentRect;T(se,L),(Y=C.current)===null||Y===void 0||Y.call(C,se,L)}};m>0&&(R=_ue(R,m,{trailing:!0,leading:!1}));var I=new ResizeObserver(R),{width:$,height:F}=S.current.getBoundingClientRect();return T($,F),I.observe(S.current),()=>{I.disconnect()}},[T,m]);var{containerWidth:O,containerHeight:N}=E;dD(!n||n>0,"The aspect(%s) must be greater than zero.",n);var{calculatedWidth:_,calculatedHeight:M}=Y$(O,N,{width:i,height:o,aspect:n,maxHeight:c});return dD(_!=null&&_>0||M!=null&&M>0,`The width(%s) and height(%s) of chart should be greater than 0,
70
- please check the style of container, or the props width(%s) and height(%s),
71
- or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
72
- height and width.`,_,M,i,o,l,u,n),v.createElement("div",{id:h?"".concat(h):void 0,className:at("recharts-responsive-container",y),style:mD(mD({},w),{},{width:i,height:o,minWidth:l,minHeight:u,maxHeight:c}),ref:S},v.createElement("div",{style:Lue({width:i,height:o})},v.createElement(Z$,{width:_,height:M},d)))}),Q$=v.forwardRef((e,t)=>{var n=vC();if(us(n.width)&&us(n.height))return e.children;var{width:r,height:i}=Iue({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:o,calculatedHeight:l}=Y$(void 0,void 0,{width:r,height:i,aspect:e.aspect,maxHeight:e.maxHeight});return Pe(o)&&Pe(l)?v.createElement(Z$,{width:o,height:l},e.children):v.createElement(Vue,eS({},e,{width:r,height:i,ref:t}))});function yC(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var Pv=()=>{var e,t=or(),n=Me(Cue),r=Me(Ov),i=(e=Me(Tv))===null||e===void 0?void 0:e.padding;return!t||!r||!i?n:{width:r.width-i.left-i.right,height:r.height-i.top-i.bottom,x:i.left,y:i.top}},Fue={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},que=()=>{var e;return(e=Me(Vn))!==null&&e!==void 0?e:Fue},J$=()=>Me(fo),eB=()=>Me(ho),Hue=()=>Me(e=>e.layout.margin),xt=e=>e.layout.layoutType,Tl=()=>Me(xt),bC=()=>{var e=Tl();if(e==="horizontal"||e==="vertical")return e},tB=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},Kue=()=>{var e=Tl();return e!==void 0},Fd=e=>{var t=Vt(),n=or(),{width:r,height:i}=e,o=vC(),l=r,u=i;return o&&(l=o.width>0?o.width:r,u=o.height>0?o.height:i),v.useEffect(()=>{!n&&us(l)&&us(u)&&t(Xle({width:l,height:u}))},[t,n,l,u]),null},nB=Symbol.for("immer-nothing"),pD=Symbol.for("immer-draftable"),Fr=Symbol.for("immer-state");function ji(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var pd=Object.getPrototypeOf;function Yu(e){return!!e&&!!e[Fr]}function yl(e){return e?rB(e)||Array.isArray(e)||!!e[pD]||!!e.constructor?.[pD]||qd(e)||_v(e):!1}var Gue=Object.prototype.constructor.toString(),gD=new WeakMap;function rB(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(n===Object)return!0;if(typeof n!="function")return!1;let r=gD.get(n);return r===void 0&&(r=Function.toString.call(n),gD.set(n,r)),r===Gue}function tg(e,t,n=!0){Nv(e)===0?(n?Reflect.ownKeys(e):Object.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((r,i)=>t(i,r,e))}function Nv(e){const t=e[Fr];return t?t.type_:Array.isArray(e)?1:qd(e)?2:_v(e)?3:0}function tS(e,t){return Nv(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function iB(e,t,n){const r=Nv(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Wue(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function qd(e){return e instanceof Map}function _v(e){return e instanceof Set}function qs(e){return e.copy_||e.base_}function nS(e,t){if(qd(e))return new Map(e);if(_v(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=rB(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Fr];let i=Reflect.ownKeys(r);for(let o=0;o<i.length;o++){const l=i[o],u=r[l];u.writable===!1&&(u.writable=!0,u.configurable=!0),(u.get||u.set)&&(r[l]={configurable:!0,writable:!0,enumerable:u.enumerable,value:e[l]})}return Object.create(pd(e),r)}else{const r=pd(e);if(r!==null&&n)return{...e};const i=Object.create(r);return Object.assign(i,e)}}function xC(e,t=!1){return Mv(e)||Yu(e)||!yl(e)||(Nv(e)>1&&Object.defineProperties(e,{set:Um,add:Um,clear:Um,delete:Um}),Object.freeze(e),t&&Object.values(e).forEach(n=>xC(n,!0))),e}function Yue(){ji(2)}var Um={value:Yue};function Mv(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var Xue={};function bl(e){const t=Xue[e];return t||ji(0,e),t}var gd;function aB(){return gd}function Zue(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function vD(e,t){t&&(bl("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function rS(e){iS(e),e.drafts_.forEach(Que),e.drafts_=null}function iS(e){e===gd&&(gd=e.parent_)}function yD(e){return gd=Zue(gd,e)}function Que(e){const t=e[Fr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function bD(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Fr].modified_&&(rS(t),ji(4)),yl(e)&&(e=ng(t,e),t.parent_||rg(t,e)),t.patches_&&bl("Patches").generateReplacementPatches_(n[Fr].base_,e,t.patches_,t.inversePatches_)):e=ng(t,n,[]),rS(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==nB?e:void 0}function ng(e,t,n){if(Mv(t))return t;const r=e.immer_.shouldUseStrictIteration(),i=t[Fr];if(!i)return tg(t,(o,l)=>xD(e,i,t,o,l,n),r),t;if(i.scope_!==e)return t;if(!i.modified_)return rg(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const o=i.copy_;let l=o,u=!1;i.type_===3&&(l=new Set(o),o.clear(),u=!0),tg(l,(c,d)=>xD(e,i,o,c,d,n,u),r),rg(e,o,!1),n&&e.patches_&&bl("Patches").generatePatches_(i,n,e.patches_,e.inversePatches_)}return i.copy_}function xD(e,t,n,r,i,o,l){if(i==null||typeof i!="object"&&!l)return;const u=Mv(i);if(!(u&&!l)){if(Yu(i)){const c=o&&t&&t.type_!==3&&!tS(t.assigned_,r)?o.concat(r):void 0,d=ng(e,i,c);if(iB(n,r,d),Yu(d))e.canAutoFreeze_=!1;else return}else l&&n.add(i);if(yl(i)&&!u){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[r]===i&&u)return;ng(e,i),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(qd(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&rg(e,i)}}}function rg(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&xC(t,n)}function Jue(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:aB(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=wC;n&&(i=[r],o=vd);const{revoke:l,proxy:u}=Proxy.revocable(i,o);return r.draft_=u,r.revoke_=l,u}var wC={get(e,t){if(t===Fr)return e;const n=qs(e);if(!tS(n,t))return ece(e,n,t);const r=n[t];return e.finalized_||!yl(r)?r:r===sw(e.base_,t)?(lw(e),e.copy_[t]=oS(r,e)):r},has(e,t){return t in qs(e)},ownKeys(e){return Reflect.ownKeys(qs(e))},set(e,t,n){const r=oB(qs(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=sw(qs(e),t),o=i?.[Fr];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Wue(n,i)&&(n!==void 0||tS(e.base_,t)))return!0;lw(e),aS(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return sw(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,lw(e),aS(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=qs(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){ji(11)},getPrototypeOf(e){return pd(e.base_)},setPrototypeOf(){ji(12)}},vd={};tg(wC,(e,t)=>{vd[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});vd.deleteProperty=function(e,t){return vd.set.call(this,e,t,void 0)};vd.set=function(e,t,n){return wC.set.call(this,e[0],t,n,e[0])};function sw(e,t){const n=e[Fr];return(n?qs(n):e)[t]}function ece(e,t,n){const r=oB(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}function oB(e,t){if(!(t in e))return;let n=pd(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=pd(n)}}function aS(e){e.modified_||(e.modified_=!0,e.parent_&&aS(e.parent_))}function lw(e){e.copy_||(e.copy_=nS(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var tce=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const o=n;n=t;const l=this;return function(c=o,...d){return l.produce(c,m=>n.call(this,m,...d))}}typeof n!="function"&&ji(6),r!==void 0&&typeof r!="function"&&ji(7);let i;if(yl(t)){const o=yD(this),l=oS(t,void 0);let u=!0;try{i=n(l),u=!1}finally{u?rS(o):iS(o)}return vD(o,r),bD(i,o)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===nB&&(i=void 0),this.autoFreeze_&&xC(i,!0),r){const o=[],l=[];bl("Patches").generateReplacementPatches_(t,i,o,l),r(o,l)}return i}else ji(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(l,...u)=>this.produceWithPatches(l,c=>t(c,...u));let r,i;return[this.produce(t,n,(l,u)=>{r=l,i=u}),r,i]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof e?.useStrictIteration=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){yl(e)||ji(8),Yu(e)&&(e=nce(e));const t=yD(this),n=oS(e,void 0);return n[Fr].isManual_=!0,iS(t),n}finishDraft(e,t){const n=e&&e[Fr];(!n||!n.isManual_)&&ji(9);const{scope_:r}=n;return vD(r,t),bD(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=bl("Patches").applyPatches_;return Yu(e)?r(e,t):this.produce(e,i=>r(i,t))}};function oS(e,t){const n=qd(e)?bl("MapSet").proxyMap_(e,t):_v(e)?bl("MapSet").proxySet_(e,t):Jue(e,t);return(t?t.scope_:aB()).drafts_.push(n),n}function nce(e){return Yu(e)||ji(10,e),sB(e)}function sB(e){if(!yl(e)||Mv(e))return e;const t=e[Fr];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=nS(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=nS(e,!0);return tg(n,(i,o)=>{iB(n,i,sB(o))},r),t&&(t.finalized_=!1),n}var rce=new tce;rce.produce;var ice={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},lB=Xn({name:"legend",initialState:ice,reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(t.payload)},prepare:Et()},replaceLegendPayload:{reducer(e,t){var{prev:n,next:r}=t.payload,i=ui(e).payload.indexOf(n);i>-1&&(e.payload[i]=r)},prepare:Et()},removeLegendPayload:{reducer(e,t){var n=ui(e).payload.indexOf(t.payload);n>-1&&e.payload.splice(n,1)},prepare:Et()}}}),{setLegendSize:wD,setLegendSettings:ace,addLegendPayload:oce,replaceLegendPayload:sce,removeLegendPayload:lce}=lB.actions,uce=lB.reducer,uw={exports:{}},cw={};var SD;function cce(){if(SD)return cw;SD=1;var e=nc();function t(c,d){return c===d&&(c!==0||1/c===1/d)||c!==c&&d!==d}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,i=e.useRef,o=e.useEffect,l=e.useMemo,u=e.useDebugValue;return cw.useSyncExternalStoreWithSelector=function(c,d,m,h,y){var b=i(null);if(b.current===null){var w={hasValue:!1,value:null};b.current=w}else w=b.current;b=l(function(){function C(N){if(!E){if(E=!0,j=N,N=h(N),y!==void 0&&w.hasValue){var _=w.value;if(y(_,N))return T=_}return T=N}if(_=T,n(j,N))return _;var M=h(N);return y!==void 0&&y(_,M)?(j=N,_):(j=N,T=M)}var E=!1,j,T,O=m===void 0?null:m;return[function(){return C(d())},O===null?void 0:function(){return C(O())}]},[d,m,h,y]);var S=r(c,b[0],b[1]);return o(function(){w.hasValue=!0,w.value=S},[S]),u(S),S},cw}var AD;function fce(){return AD||(AD=1,uw.exports=cce()),uw.exports}fce();function dce(e){e()}function hce(){let e=null,t=null;return{clear(){e=null,t=null},notify(){dce(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!r||e===null||(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var CD={notify(){},get:()=>[]};function mce(e,t){let n,r=CD,i=0,o=!1;function l(S){m();const C=r.subscribe(S);let E=!1;return()=>{E||(E=!0,C(),h())}}function u(){r.notify()}function c(){w.onStateChange&&w.onStateChange()}function d(){return o}function m(){i++,n||(n=e.subscribe(c),r=hce())}function h(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=CD)}function y(){o||(o=!0,m())}function b(){o&&(o=!1,h())}const w={addNestedSub:l,notifyNestedSubs:u,handleChangeWrapper:c,isSubscribed:d,trySubscribe:y,tryUnsubscribe:b,getListeners:()=>r};return w}var pce=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",gce=pce(),vce=()=>typeof navigator<"u"&&navigator.product==="ReactNative",yce=vce(),bce=()=>gce||yce?v.useLayoutEffect:v.useEffect,xce=bce();function ED(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function wce(e,t){if(ED(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!ED(e[n[i]],t[n[i]]))return!1;return!0}var Sce=Symbol.for("react-redux-context"),Ace=typeof globalThis<"u"?globalThis:{};function Cce(){if(!v.createContext)return{};const e=Ace[Sce]??=new Map;let t=e.get(v.createContext);return t||(t=v.createContext(null),e.set(v.createContext,t)),t}var Ece=Cce();function jce(e){const{children:t,context:n,serverState:r,store:i}=e,o=v.useMemo(()=>{const c=mce(i);return{store:i,subscription:c,getServerState:r?()=>r:void 0}},[i,r]),l=v.useMemo(()=>i.getState(),[i]);xce(()=>{const{subscription:c}=o;return c.onStateChange=c.notifyNestedSubs,c.trySubscribe(),l!==i.getState()&&c.notifyNestedSubs(),()=>{c.tryUnsubscribe(),c.onStateChange=void 0}},[o,l]);const u=n||Ece;return v.createElement(u.Provider,{value:o},t)}var Tce=jce,Oce=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function Pce(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function mc(e,t){var n=new Set([...Object.keys(e),...Object.keys(t)]);for(var r of n)if(Oce.has(r)){if(e[r]==null&&t[r]==null)continue;if(!wce(e[r],t[r]))return!1}else if(!Pce(e[r],t[r]))return!1;return!0}var Nce=["contextPayload"];function sS(){return sS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sS.apply(null,arguments)}function jD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Xu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jD(Object(n),!0).forEach(function(r){_ce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _ce(e,t,n){return(t=Mce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mce(e){var t=Rce(e,"string");return typeof t=="symbol"?t:t+""}function Rce(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Dce(e,t){if(e==null)return{};var n,r,i=kce(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function kce(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Lce(e){return e.value}function Ice(e){var{contextPayload:t}=e,n=Dce(e,Nce),r=f$(t,e.payloadUniqBy,Lce),i=Xu(Xu({},n),{},{payload:r});return v.isValidElement(e.content)?v.cloneElement(e.content,i):typeof e.content=="function"?v.createElement(e.content,i):v.createElement(ase,i)}function zce(e,t,n,r,i,o){var{layout:l,align:u,verticalAlign:c}=t,d,m;return(!e||(e.left===void 0||e.left===null)&&(e.right===void 0||e.right===null))&&(u==="center"&&l==="vertical"?d={left:((r||0)-o.width)/2}:d=u==="right"?{right:n&&n.right||0}:{left:n&&n.left||0}),(!e||(e.top===void 0||e.top===null)&&(e.bottom===void 0||e.bottom===null))&&(c==="middle"?m={top:((i||0)-o.height)/2}:m=c==="bottom"?{bottom:n&&n.bottom||0}:{top:n&&n.top||0}),Xu(Xu({},d),m)}function $ce(e){var t=Vt();return v.useEffect(()=>{t(ace(e))},[t,e]),null}function Bce(e){var t=Vt();return v.useEffect(()=>(t(wD(e)),()=>{t(wD({width:0,height:0}))}),[t,e]),null}function Uce(e,t,n,r){return e==="vertical"&&t!=null?{height:t}:e==="horizontal"?{width:n||r}:null}var Vce={align:"center",iconSize:14,inactiveColor:"#ccc",itemSorter:"value",layout:"horizontal",verticalAlign:"bottom"};function Fce(e){var t=Yn(e,Vce),n=Qse(),r=Zae(),i=Hue(),{width:o,height:l,wrapperStyle:u,portal:c}=t,[d,m]=g$([n]),h=J$(),y=eB();if(h==null||y==null)return null;var b=h-(i?.left||0)-(i?.right||0),w=Uce(t.layout,l,o,b),S=c?u:Xu(Xu({position:"absolute",width:w?.width||o||"auto",height:w?.height||l||"auto"},zce(u,t,i,h,y,d)),u),C=c??r;if(C==null||n==null)return null;var E=v.createElement("div",{className:"recharts-legend-wrapper",style:S,ref:m},v.createElement($ce,{layout:t.layout,align:t.align,verticalAlign:t.verticalAlign,itemSorter:t.itemSorter}),!c&&v.createElement(Bce,{width:d.width,height:d.height}),v.createElement(Ice,sS({},t,w,{margin:i,chartWidth:h,chartHeight:y,contextPayload:n})));return cs.createPortal(E,C)}var uB=v.memo(Fce,mc);uB.displayName="Legend";function lS(){return lS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lS.apply(null,arguments)}function TD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Cf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?TD(Object(n),!0).forEach(function(r){qce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qce(e,t,n){return(t=Hce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hce(e){var t=Kce(e,"string");return typeof t=="symbol"?t:t+""}function Kce(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Gce(e){return Array.isArray(e)&&ma(e[0])&&ma(e[1])?e.join(" ~ "):e}var vu={separator:" : ",contentStyle:{margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},itemStyle:{display:"block",paddingTop:4,paddingBottom:4,color:"#000"},labelStyle:{},accessibilityLayer:!1};function Wce(e,t){return t==null?e:mv(e,t)}var Yce=e=>{var{separator:t=vu.separator,contentStyle:n,itemStyle:r,labelStyle:i=vu.labelStyle,payload:o,formatter:l,itemSorter:u,wrapperClassName:c,labelClassName:d,label:m,labelFormatter:h,accessibilityLayer:y=vu.accessibilityLayer}=e,b=()=>{if(o&&o.length){var N={padding:0,margin:0},_=Wce(o,u),M=_.map((R,I)=>{if(!R||R.type==="none")return null;var $=R.formatter||l||Gce,{value:F,name:z}=R,Y=F,Q=z;if($){var se=$(F,z,R,I,o);if(Array.isArray(se))[Y,Q]=se;else if(se!=null)Y=se;else return null}var L=Cf(Cf({},vu.itemStyle),{},{color:R.color||vu.itemStyle.color},r);return v.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(I),style:L},ma(Q)?v.createElement("span",{className:"recharts-tooltip-item-name"},Q):null,ma(Q)?v.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,v.createElement("span",{className:"recharts-tooltip-item-value"},Y),v.createElement("span",{className:"recharts-tooltip-item-unit"},R.unit||""))});return v.createElement("ul",{className:"recharts-tooltip-item-list",style:N},M)}return null},w=Cf(Cf({},vu.contentStyle),n),S=Cf({margin:0},i),C=!vn(m),E=C?m:"",j=at("recharts-default-tooltip",c),T=at("recharts-tooltip-label",d);C&&h&&o!==void 0&&o!==null&&(E=h(m,o));var O=y?{role:"status","aria-live":"assertive"}:{};return v.createElement("div",lS({className:j,style:w},O),v.createElement("p",{className:T,style:S},v.isValidElement(E)?E:"".concat(E)),b())},Ef="recharts-tooltip-wrapper",Xce={visibility:"hidden"};function Zce(e){var{coordinate:t,translateX:n,translateY:r}=e;return at(Ef,{["".concat(Ef,"-right")]:Pe(n)&&t&&Pe(t.x)&&n>=t.x,["".concat(Ef,"-left")]:Pe(n)&&t&&Pe(t.x)&&n<t.x,["".concat(Ef,"-bottom")]:Pe(r)&&t&&Pe(t.y)&&r>=t.y,["".concat(Ef,"-top")]:Pe(r)&&t&&Pe(t.y)&&r<t.y})}function OD(e){var{allowEscapeViewBox:t,coordinate:n,key:r,offset:i,position:o,reverseDirection:l,tooltipDimension:u,viewBox:c,viewBoxDimension:d}=e;if(o&&Pe(o[r]))return o[r];var m=n[r]-u-(i>0?i:0),h=n[r]+i;if(t[r])return l[r]?m:h;var y=c[r];if(y==null)return 0;if(l[r]){var b=m,w=y;return b<w?Math.max(h,y):Math.max(m,y)}if(d==null)return 0;var S=h+u,C=y+d;return S>C?Math.max(m,y):Math.max(h,y)}function Qce(e){var{translateX:t,translateY:n,useTranslate3d:r}=e;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function Jce(e){var{allowEscapeViewBox:t,coordinate:n,offsetTop:r,offsetLeft:i,position:o,reverseDirection:l,tooltipBox:u,useTranslate3d:c,viewBox:d}=e,m,h,y;return u.height>0&&u.width>0&&n?(h=OD({allowEscapeViewBox:t,coordinate:n,key:"x",offset:i,position:o,reverseDirection:l,tooltipDimension:u.width,viewBox:d,viewBoxDimension:d.width}),y=OD({allowEscapeViewBox:t,coordinate:n,key:"y",offset:r,position:o,reverseDirection:l,tooltipDimension:u.height,viewBox:d,viewBoxDimension:d.height}),m=Qce({translateX:h,translateY:y,useTranslate3d:c})):m=Xce,{cssProperties:m,cssClasses:Zce({translateX:h,translateY:y,coordinate:n})}}var efe=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),Hd={isSsr:efe()};function cB(){var[e,t]=v.useState(()=>Hd.isSsr||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches);return v.useEffect(()=>{if(window.matchMedia){var n=window.matchMedia("(prefers-reduced-motion: reduce)"),r=()=>{t(n.matches)};return n.addEventListener("change",r),()=>{n.removeEventListener("change",r)}}},[]),e}function PD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function yu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?PD(Object(n),!0).forEach(function(r){tfe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tfe(e,t,n){return(t=nfe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nfe(e){var t=rfe(e,"string");return typeof t=="symbol"?t:t+""}function rfe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ife(e){if(!(e.prefersReducedMotion&&e.isAnimationActive==="auto")&&e.isAnimationActive&&e.active)return"transform ".concat(e.animationDuration,"ms ").concat(e.animationEasing)}function afe(e){var t,n,r,i,o,l,u=cB(),[c,d]=v.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}));v.useEffect(()=>{var w=S=>{if(S.key==="Escape"){var C,E,j,T;d({dismissed:!0,dismissedAtCoordinate:{x:(C=(E=e.coordinate)===null||E===void 0?void 0:E.x)!==null&&C!==void 0?C:0,y:(j=(T=e.coordinate)===null||T===void 0?void 0:T.y)!==null&&j!==void 0?j:0}})}};return document.addEventListener("keydown",w),()=>{document.removeEventListener("keydown",w)}},[(t=e.coordinate)===null||t===void 0?void 0:t.x,(n=e.coordinate)===null||n===void 0?void 0:n.y]),c.dismissed&&(((r=(i=e.coordinate)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)!==c.dismissedAtCoordinate.x||((o=(l=e.coordinate)===null||l===void 0?void 0:l.y)!==null&&o!==void 0?o:0)!==c.dismissedAtCoordinate.y)&&d(yu(yu({},c),{},{dismissed:!1}));var{cssClasses:m,cssProperties:h}=Jce({allowEscapeViewBox:e.allowEscapeViewBox,coordinate:e.coordinate,offsetLeft:typeof e.offset=="number"?e.offset:e.offset.x,offsetTop:typeof e.offset=="number"?e.offset:e.offset.y,position:e.position,reverseDirection:e.reverseDirection,tooltipBox:{height:e.lastBoundingBox.height,width:e.lastBoundingBox.width},useTranslate3d:e.useTranslate3d,viewBox:e.viewBox}),y=e.hasPortalFromProps?{}:yu(yu({transition:ife({prefersReducedMotion:u,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},h),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),b=yu(yu({},y),{},{visibility:!c.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return v.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:m,style:b,ref:e.innerRef},e.children)}var ofe=v.memo(afe),fB=()=>{var e;return(e=Me(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function uS(){return uS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uS.apply(null,arguments)}function ND(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function _D(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ND(Object(n),!0).forEach(function(r){sfe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ND(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sfe(e,t,n){return(t=lfe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lfe(e){var t=ufe(e,"string");return typeof t=="symbol"?t:t+""}function ufe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var MD={curveBasisClosed:goe,curveBasisOpen:voe,curveBasis:poe,curveBumpX:toe,curveBumpY:noe,curveLinearClosed:yoe,curveLinear:fv,curveMonotoneX:boe,curveMonotoneY:xoe,curveNatural:woe,curveStep:Soe,curveStepAfter:Coe,curveStepBefore:Aoe},ig=e=>nt(e.x)&&nt(e.y),RD=e=>e.base!=null&&ig(e.base)&&ig(e),jf=e=>e.x,Tf=e=>e.y,cfe=(e,t)=>{if(typeof e=="function")return e;var n="curve".concat($d(e));if((n==="curveMonotone"||n==="curveBump")&&t){var r=MD["".concat(n).concat(t==="vertical"?"Y":"X")];if(r)return r}return MD[n]||fv},DD={connectNulls:!1,type:"linear"},ffe=e=>{var{type:t=DD.type,points:n=[],baseLine:r,layout:i,connectNulls:o=DD.connectNulls}=e,l=cfe(t,i),u=o?n.filter(ig):n;if(Array.isArray(r)){var c,d=n.map((w,S)=>_D(_D({},w),{},{base:r[S]}));i==="vertical"?c=Dm().y(Tf).x1(jf).x0(w=>w.base.x):c=Dm().x(jf).y1(Tf).y0(w=>w.base.y);var m=c.defined(RD).curve(l),h=o?d.filter(RD):d;return m(h)}var y;i==="vertical"&&Pe(r)?y=Dm().y(Tf).x1(jf).x0(r):Pe(r)?y=Dm().x(jf).y1(Tf).y0(r):y=z4().x(jf).y(Tf);var b=y.defined(ig).curve(l);return b(u)},Wf=e=>{var{className:t,points:n,path:r,pathRef:i}=e,o=Tl();if((!n||!n.length)&&!r)return null;var l={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||o,connectNulls:e.connectNulls},u=n&&n.length?ffe(l):r;return v.createElement("path",uS({},Ri(e),lC(e),{className:at("recharts-curve",t),d:u===null?void 0:u,ref:i}))},dfe=["x","y","top","left","width","height","className"];function cS(){return cS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cS.apply(null,arguments)}function kD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function hfe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kD(Object(n),!0).forEach(function(r){mfe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mfe(e,t,n){return(t=pfe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pfe(e){var t=gfe(e,"string");return typeof t=="symbol"?t:t+""}function gfe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vfe(e,t){if(e==null)return{};var n,r,i=yfe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function yfe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var bfe=(e,t,n,r,i,o)=>"M".concat(e,",").concat(i,"v").concat(r,"M").concat(o,",").concat(t,"h").concat(n),xfe=e=>{var{x:t=0,y:n=0,top:r=0,left:i=0,width:o=0,height:l=0,className:u}=e,c=vfe(e,dfe),d=hfe({x:t,y:n,top:r,left:i,width:o,height:l},c);return!Pe(t)||!Pe(n)||!Pe(o)||!Pe(l)||!Pe(r)||!Pe(i)?null:v.createElement("path",cS({},Wn(d),{className:at("recharts-cross",u),d:bfe(t,n,o,l,r,i)}))};function wfe(e,t,n,r){var i=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-i,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function LD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ID(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?LD(Object(n),!0).forEach(function(r){Sfe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Sfe(e,t,n){return(t=Afe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Afe(e){var t=Cfe(e,"string");return typeof t=="symbol"?t:t+""}function Cfe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Efe=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),dB=(e,t,n)=>e.map(r=>"".concat(Efe(r)," ").concat(t,"ms ").concat(n)).join(","),jfe=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((n,r)=>n.filter(i=>r.includes(i))),yd=(e,t)=>Object.keys(t).reduce((n,r)=>ID(ID({},n),{},{[r]:e(r,t[r])}),{});function zD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function pn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zD(Object(n),!0).forEach(function(r){Tfe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Tfe(e,t,n){return(t=Ofe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ofe(e){var t=Pfe(e,"string");return typeof t=="symbol"?t:t+""}function Pfe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ag=(e,t,n)=>e+(t-e)*n,fS=e=>{var{from:t,to:n}=e;return t!==n},hB=(e,t,n)=>{var r=yd((i,o)=>{if(fS(o)){var[l,u]=e(o.from,o.to,o.velocity);return pn(pn({},o),{},{from:l,velocity:u})}return o},t);return n<1?yd((i,o)=>fS(o)&&r[i]!=null?pn(pn({},o),{},{velocity:ag(o.velocity,r[i].velocity,n),from:ag(o.from,r[i].from,n)}):o,t):hB(e,r,n-1)};function Nfe(e,t,n,r,i,o){var l,u=r.reduce((y,b)=>pn(pn({},y),{},{[b]:{from:e[b],velocity:0,to:t[b]}}),{}),c=()=>yd((y,b)=>b.from,u),d=()=>!Object.values(u).filter(fS).length,m=null,h=y=>{l||(l=y);var b=y-l,w=b/n.dt;u=hB(n,u,w),i(pn(pn(pn({},e),t),c())),l=y,d()||(m=o.setTimeout(h))};return()=>(m=o.setTimeout(h),()=>{var y;(y=m)===null||y===void 0||y()})}function _fe(e,t,n,r,i,o,l){var u=null,c=i.reduce((h,y)=>{var b=e[y],w=t[y];return b==null||w==null?h:pn(pn({},h),{},{[y]:[b,w]})},{}),d,m=h=>{d||(d=h);var y=(h-d)/r,b=yd((S,C)=>ag(...C,n(y)),c);if(o(pn(pn(pn({},e),t),b)),y<1)u=l.setTimeout(m);else{var w=yd((S,C)=>ag(...C,n(1)),c);o(pn(pn(pn({},e),t),w))}};return()=>(u=l.setTimeout(m),()=>{var h;(h=u)===null||h===void 0||h()})}const Mfe=(e,t,n,r,i,o)=>{var l=jfe(e,t);return n==null?()=>(i(pn(pn({},e),t)),()=>{}):n.isStepper===!0?Nfe(e,t,n,l,i,o):_fe(e,t,n,r,l,i,o)};var og=1e-4,mB=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],pB=(e,t)=>e.map((n,r)=>n*t**r).reduce((n,r)=>n+r),$D=(e,t)=>n=>{var r=mB(e,t);return pB(r,n)},Rfe=(e,t)=>n=>{var r=mB(e,t),i=[...r.map((o,l)=>o*l).slice(1),0];return pB(i,n)},Dfe=e=>{var t,n=e.split("(");if(n.length!==2||n[0]!=="cubic-bezier")return null;var r=(t=n[1])===null||t===void 0||(t=t.split(")")[0])===null||t===void 0?void 0:t.split(",");if(r==null||r.length!==4)return null;var i=r.map(o=>parseFloat(o));return[i[0],i[1],i[2],i[3]]},kfe=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(n.length===1)switch(n[0]){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-out":return[.42,0,.58,1];case"ease-in-out":return[0,0,.58,1];default:{var i=Dfe(n[0]);if(i)return i}}return n.length===4?n:[0,0,1,1]},Lfe=(e,t,n,r)=>{var i=$D(e,n),o=$D(t,r),l=Rfe(e,n),u=d=>d>1?1:d<0?0:d,c=d=>{for(var m=d>1?1:d,h=m,y=0;y<8;++y){var b=i(h)-m,w=l(h);if(Math.abs(b-m)<og||w<og)return o(h);h=u(h-b/w)}return o(h)};return c.isStepper=!1,c},BD=function(){return Lfe(...kfe(...arguments))},Ife=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:n=100,damping:r=8,dt:i=17}=t,o=(l,u,c)=>{var d=-(l-u)*n,m=c*r,h=c+(d-m)*i/1e3,y=c*i/1e3+l;return Math.abs(y-u)<og&&Math.abs(h)<og?[u,0]:[y,h]};return o.isStepper=!0,o.dt=i,o},zfe=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return BD(e);case"spring":return Ife();default:if(e.split("(")[0]==="cubic-bezier")return BD(e)}return typeof e=="function"?e:null};function $fe(e){var t,n=()=>null,r=!1,i=null,o=l=>{if(!r){if(Array.isArray(l)){if(!l.length)return;var u=l,[c,...d]=u;if(typeof c=="number"){i=e.setTimeout(o.bind(null,d),c);return}o(c),i=e.setTimeout(o.bind(null,d));return}typeof l=="string"&&(t=l,n(t)),typeof l=="object"&&(t=l,n(t)),typeof l=="function"&&l()}};return{stop:()=>{r=!0},start:l=>{r=!1,i&&(i(),i=null),o(l)},subscribe:l=>(n=l,()=>{n=()=>null}),getTimeoutController:()=>e}}class Bfe{setTimeout(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=performance.now(),i=null,o=l=>{l-r>=n?t(l):typeof requestAnimationFrame=="function"&&(i=requestAnimationFrame(o))};return i=requestAnimationFrame(o),()=>{i!=null&&cancelAnimationFrame(i)}}}function Ufe(){return $fe(new Bfe)}var Vfe=v.createContext(Ufe);function Ffe(e,t){var n=v.useContext(Vfe);return v.useMemo(()=>t??n(e),[e,t,n])}var qfe={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},UD={t:0},fw={t:1};function Rv(e){var t=Yn(e,qfe),{isActive:n,canBegin:r,duration:i,easing:o,begin:l,onAnimationEnd:u,onAnimationStart:c,children:d}=t,m=cB(),h=n==="auto"?!Hd.isSsr&&!m:n,y=Ffe(t.animationId,t.animationManager),[b,w]=v.useState(h?UD:fw),S=v.useRef(null);return v.useEffect(()=>{h||w(fw)},[h]),v.useEffect(()=>{if(!h||!r)return jl;var C=Mfe(UD,fw,zfe(o),i,w,y.getTimeoutController()),E=()=>{S.current=C()};return y.start([c,l,E,i,u]),()=>{y.stop(),S.current&&S.current(),u()}},[h,r,i,o,l,c,u,y]),d(b.t)}function Dv(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",n=v.useRef(fd(t)),r=v.useRef(e);return r.current!==e&&(n.current=fd(t),r.current=e),n.current}var Hfe=["radius"],Kfe=["radius"],VD,FD,qD,HD,KD,GD,WD,YD,XD,ZD;function QD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function JD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?QD(Object(n),!0).forEach(function(r){Gfe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Gfe(e,t,n){return(t=Wfe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wfe(e){var t=Yfe(e,"string");return typeof t=="symbol"?t:t+""}function Yfe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function sg(){return sg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sg.apply(null,arguments)}function ek(e,t){if(e==null)return{};var n,r,i=Xfe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Xfe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Wi(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var tk=(e,t,n,r,i)=>{var o=ts(n),l=ts(r),u=Math.min(Math.abs(o)/2,Math.abs(l)/2),c=l>=0?1:-1,d=o>=0?1:-1,m=l>=0&&o>=0||l<0&&o<0?1:0,h;if(u>0&&Array.isArray(i)){for(var y=[0,0,0,0],b=0,w=4;b<w;b++){var S,C=(S=i[b])!==null&&S!==void 0?S:0;y[b]=C>u?u:C}h=Ut(VD||(VD=Wi(["M",",",""])),e,t+c*y[0]),y[0]>0&&(h+=Ut(FD||(FD=Wi(["A ",",",",0,0,",",",",",""])),y[0],y[0],m,e+d*y[0],t)),h+=Ut(qD||(qD=Wi(["L ",",",""])),e+n-d*y[1],t),y[1]>0&&(h+=Ut(HD||(HD=Wi(["A ",",",",0,0,",`,
73
- `,",",""])),y[1],y[1],m,e+n,t+c*y[1])),h+=Ut(KD||(KD=Wi(["L ",",",""])),e+n,t+r-c*y[2]),y[2]>0&&(h+=Ut(GD||(GD=Wi(["A ",",",",0,0,",`,
74
- `,",",""])),y[2],y[2],m,e+n-d*y[2],t+r)),h+=Ut(WD||(WD=Wi(["L ",",",""])),e+d*y[3],t+r),y[3]>0&&(h+=Ut(YD||(YD=Wi(["A ",",",",0,0,",`,
75
- `,",",""])),y[3],y[3],m,e,t+r-c*y[3])),h+="Z"}else if(u>0&&i===+i&&i>0){var E=Math.min(u,i);h=Ut(XD||(XD=Wi(["M ",",",`
76
- A `,",",",0,0,",",",",",`
77
- L `,",",`
78
- A `,",",",0,0,",",",",",`
79
- L `,",",`
80
- A `,",",",0,0,",",",",",`
81
- L `,",",`
82
- A `,",",",0,0,",",",","," Z"])),e,t+c*E,E,E,m,e+d*E,t,e+n-d*E,t,E,E,m,e+n,t+c*E,e+n,t+r-c*E,E,E,m,e+n-d*E,t+r,e+d*E,t+r,E,E,m,e,t+r-c*E)}else h=Ut(ZD||(ZD=Wi(["M ",","," h "," v "," h "," Z"])),e,t,n,r,-n);return h},nk={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},gB=e=>{var t=Yn(e,nk),n=v.useRef(null),[r,i]=v.useState(-1);v.useEffect(()=>{if(n.current&&n.current.getTotalLength)try{var q=n.current.getTotalLength();q&&i(q)}catch{}},[]);var{x:o,y:l,width:u,height:c,radius:d,className:m}=t,{animationEasing:h,animationDuration:y,animationBegin:b,isAnimationActive:w,isUpdateAnimationActive:S}=t,C=v.useRef(u),E=v.useRef(c),j=v.useRef(o),T=v.useRef(l),O=v.useMemo(()=>({x:o,y:l,width:u,height:c,radius:d}),[o,l,u,c,d]),N=Dv(O,"rectangle-");if(o!==+o||l!==+l||u!==+u||c!==+c||u===0||c===0)return null;var _=at("recharts-rectangle",m);if(!S){var M=Wn(t),{radius:R}=M,I=ek(M,Hfe);return v.createElement("path",sg({},I,{x:ts(o),y:ts(l),width:ts(u),height:ts(c),radius:typeof d=="number"?d:void 0,className:_,d:tk(o,l,u,c,d)}))}var $=C.current,F=E.current,z=j.current,Y=T.current,Q="0px ".concat(r===-1?1:r,"px"),se="".concat(r,"px ").concat(r,"px"),L=dB(["strokeDasharray"],y,typeof h=="string"?h:nk.animationEasing);return v.createElement(Rv,{animationId:N,key:N,canBegin:r>0,duration:y,easing:h,isActive:S,begin:b},q=>{var B=rn($,u,q),ae=rn(F,c,q),G=rn(z,o,q),D=rn(Y,l,q);n.current&&(C.current=B,E.current=ae,j.current=G,T.current=D);var V;w?q>0?V={transition:L,strokeDasharray:se}:V={strokeDasharray:Q}:V={strokeDasharray:se};var K=Wn(t),{radius:ee}=K,he=ek(K,Kfe);return v.createElement("path",sg({},he,{radius:typeof d=="number"?d:void 0,className:_,d:tk(G,D,B,ae,d),ref:n,style:JD(JD({},V),t.style)}))})};function rk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ik(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rk(Object(n),!0).forEach(function(r){Zfe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Zfe(e,t,n){return(t=Qfe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qfe(e){var t=Jfe(e,"string");return typeof t=="symbol"?t:t+""}function Jfe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var lg=Math.PI/180,ede=e=>e*180/Math.PI,In=(e,t,n,r)=>({x:e+Math.cos(-lg*r)*n,y:t+Math.sin(-lg*r)*n}),tde=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},nde=(e,t)=>{var{x:n,y:r}=e,{x:i,y:o}=t;return Math.sqrt((n-i)**2+(r-o)**2)},rde=(e,t)=>{var{x:n,y:r}=e,{cx:i,cy:o}=t,l=nde({x:n,y:r},{x:i,y:o});if(l<=0)return{radius:l,angle:0};var u=(n-i)/l,c=Math.acos(u);return r>o&&(c=2*Math.PI-c),{radius:l,angle:ede(c),angleInRadian:c}},ide=e=>{var{startAngle:t,endAngle:n}=e,r=Math.floor(t/360),i=Math.floor(n/360),o=Math.min(r,i);return{startAngle:t-o*360,endAngle:n-o*360}},ade=(e,t)=>{var{startAngle:n,endAngle:r}=t,i=Math.floor(n/360),o=Math.floor(r/360),l=Math.min(i,o);return e+l*360},ode=(e,t)=>{var{relativeX:n,relativeY:r}=e,{radius:i,angle:o}=rde({x:n,y:r},t),{innerRadius:l,outerRadius:u}=t;if(i<l||i>u||i===0)return null;var{startAngle:c,endAngle:d}=ide(t),m=o,h;if(c<=d){for(;m>d;)m-=360;for(;m<c;)m+=360;h=m>=c&&m<=d}else{for(;m>c;)m-=360;for(;m<d;)m+=360;h=m>=d&&m<=c}return h?ik(ik({},t),{},{radius:i,angle:ade(m,t)}):null};function vB(e){var{cx:t,cy:n,radius:r,startAngle:i,endAngle:o}=e,l=In(t,n,r,i),u=In(t,n,r,o);return{points:[l,u],cx:t,cy:n,radius:r,startAngle:i,endAngle:o}}var ak,ok,sk,lk,uk,ck,fk;function dS(){return dS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dS.apply(null,arguments)}function el(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var sde=(e,t)=>{var n=Oi(t-e),r=Math.min(Math.abs(t-e),359.999);return n*r},Vm=e=>{var{cx:t,cy:n,radius:r,angle:i,sign:o,isExternal:l,cornerRadius:u,cornerIsExternal:c}=e,d=u*(l?1:-1)+r,m=Math.asin(u/d)/lg,h=c?i:i+o*m,y=In(t,n,d,h),b=In(t,n,r,h),w=c?i-o*m:i,S=In(t,n,d*Math.cos(m*lg),w);return{center:y,circleTangency:b,lineTangency:S,theta:m}},yB=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:o,endAngle:l}=e,u=sde(o,l),c=o+u,d=In(t,n,i,o),m=In(t,n,i,c),h=Ut(ak||(ak=el(["M ",",",`
83
- A `,",",`,0,
84
- `,",",`,
85
- `,",",`
86
- `])),d.x,d.y,i,i,+(Math.abs(u)>180),+(o>c),m.x,m.y);if(r>0){var y=In(t,n,r,o),b=In(t,n,r,c);h+=Ut(ok||(ok=el(["L ",",",`
87
- A `,",",`,0,
88
- `,",",`,
89
- `,","," Z"])),b.x,b.y,r,r,+(Math.abs(u)>180),+(o<=c),y.x,y.y)}else h+=Ut(sk||(sk=el(["L ",","," Z"])),t,n);return h},lde=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:i,cornerRadius:o,forceCornerRadius:l,cornerIsExternal:u,startAngle:c,endAngle:d}=e,m=Oi(d-c),{circleTangency:h,lineTangency:y,theta:b}=Vm({cx:t,cy:n,radius:i,angle:c,sign:m,cornerRadius:o,cornerIsExternal:u}),{circleTangency:w,lineTangency:S,theta:C}=Vm({cx:t,cy:n,radius:i,angle:d,sign:-m,cornerRadius:o,cornerIsExternal:u}),E=u?Math.abs(c-d):Math.abs(c-d)-b-C;if(E<0)return l?Ut(lk||(lk=el(["M ",",",`
90
- a`,",",",0,0,1,",`,0
91
- a`,",",",0,0,1,",`,0
92
- `])),y.x,y.y,o,o,o*2,o,o,-o*2):yB({cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:c,endAngle:d});var j=Ut(uk||(uk=el(["M ",",",`
93
- A`,",",",0,0,",",",",",`
94
- A`,",",",0,",",",",",",",`
95
- A`,",",",0,0,",",",",",`
96
- `])),y.x,y.y,o,o,+(m<0),h.x,h.y,i,i,+(E>180),+(m<0),w.x,w.y,o,o,+(m<0),S.x,S.y);if(r>0){var{circleTangency:T,lineTangency:O,theta:N}=Vm({cx:t,cy:n,radius:r,angle:c,sign:m,isExternal:!0,cornerRadius:o,cornerIsExternal:u}),{circleTangency:_,lineTangency:M,theta:R}=Vm({cx:t,cy:n,radius:r,angle:d,sign:-m,isExternal:!0,cornerRadius:o,cornerIsExternal:u}),I=u?Math.abs(c-d):Math.abs(c-d)-N-R;if(I<0&&o===0)return"".concat(j,"L").concat(t,",").concat(n,"Z");j+=Ut(ck||(ck=el(["L",",",`
97
- A`,",",",0,0,",",",",",`
98
- A`,",",",0,",",",",",",",`
99
- A`,",",",0,0,",",",",","Z"])),M.x,M.y,o,o,+(m<0),_.x,_.y,r,r,+(I>180),+(m>0),T.x,T.y,o,o,+(m<0),O.x,O.y)}else j+=Ut(fk||(fk=el(["L",",","Z"])),t,n);return j},ude={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},bB=e=>{var t=Yn(e,ude),{cx:n,cy:r,innerRadius:i,outerRadius:o,cornerRadius:l,forceCornerRadius:u,cornerIsExternal:c,startAngle:d,endAngle:m,className:h}=t;if(o<i||d===m)return null;var y=at("recharts-sector",h),b=o-i,w=ls(l,b,0,!0),S;return w>0&&Math.abs(d-m)<360?S=lde({cx:n,cy:r,innerRadius:i,outerRadius:o,cornerRadius:Math.min(w,b/2),forceCornerRadius:u,cornerIsExternal:c,startAngle:d,endAngle:m}):S=yB({cx:n,cy:r,innerRadius:i,outerRadius:o,startAngle:d,endAngle:m}),v.createElement("path",dS({},Wn(t),{className:y,d:S}))};function cde(e,t,n){if(e==="horizontal")return[{x:t.x,y:n.top},{x:t.x,y:n.top+n.height}];if(e==="vertical")return[{x:n.left,y:t.y},{x:n.left+n.width,y:t.y}];if(J4(t)){if(e==="centric"){var{cx:r,cy:i,innerRadius:o,outerRadius:l,angle:u}=t,c=In(r,i,o,u),d=In(r,i,l,u);return[{x:c.x,y:c.y},{x:d.x,y:d.y}]}return vB(t)}}var dw={},hw={},mw={},dk;function fde(){return dk||(dk=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=h$();function n(r){return t.isSymbol(r)?NaN:Number(r)}e.toNumber=n})(mw)),mw}var hk;function dde(){return hk||(hk=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=fde();function n(r){return r?(r=t.toNumber(r),r===1/0||r===-1/0?(r<0?-1:1)*Number.MAX_VALUE:r===r?r:0):r===0?r:0}e.toFinite=n})(hw)),hw}var mk;function hde(){return mk||(mk=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=m$(),n=dde();function r(i,o,l){l&&typeof l!="number"&&t.isIterateeCall(i,o,l)&&(o=l=void 0),i=n.toFinite(i),o===void 0?(o=i,i=0):o=n.toFinite(o),l=l===void 0?i<o?1:-1:n.toFinite(l);const u=Math.max(Math.ceil((o-i)/(l||1)),0),c=new Array(u);for(let d=0;d<u;d++)c[d]=i,i+=l;return c}e.range=r})(dw)),dw}var pw,pk;function mde(){return pk||(pk=1,pw=hde().range),pw}var pde=mde();const xB=va(pde);var zi=e=>e.chartData,SC=te([zi],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),Kd=(e,t,n,r)=>r?SC(e):zi(e),gde=(e,t,n)=>n?SC(e):zi(e),vde=te([Kd],e=>{var{chartData:t,dataStartIndex:n,dataEndIndex:r}=e;return t!=null?t.slice(n,r+1):[]});te([SC],e=>{var{chartData:t,dataStartIndex:n,dataEndIndex:r}=e;return t!=null?t.slice(n,r+1):[]});var yde=te([zi],e=>{var{chartData:t,dataStartIndex:n,dataEndIndex:r}=e;return t!=null?t.slice(n,r+1):[]});function ca(e){if(Array.isArray(e)&&e.length===2){var[t,n]=e;if(nt(t)&&nt(n))return!0}return!1}function gk(e,t,n){return n?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function wB(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[n,r]=e,i,o;if(nt(n))i=n;else if(typeof n=="function")return;if(nt(r))o=r;else if(typeof r=="function")return;var l=[i,o];if(ca(l))return l}}function bde(e,t,n){if(!(!n&&t==null)){if(typeof e=="function"&&t!=null)try{var r=e(t,n);if(ca(r))return gk(r,t,n)}catch{}if(Array.isArray(e)&&e.length===2){var[i,o]=e,l,u;if(i==="auto")t!=null&&(l=Math.min(...t));else if(Pe(i))l=i;else if(typeof i=="function")try{t!=null&&(l=i(t?.[0]))}catch{}else if(typeof i=="string"&&iD.test(i)){var c=iD.exec(i);if(c==null||c[1]==null||t==null)l=void 0;else{var d=+c[1];l=t[0]-d}}else l=t?.[0];if(o==="auto")t!=null&&(u=Math.max(...t));else if(Pe(o))u=o;else if(typeof o=="function")try{t!=null&&(u=o(t?.[1]))}catch{}else if(typeof o=="string"&&aD.test(o)){var m=aD.exec(o);if(m==null||m[1]==null||t==null)u=void 0;else{var h=+m[1];u=t[1]+h}}else u=t?.[1];var y=[l,u];if(ca(y))return t==null?y:gk(y,t,n)}}}var pc=1e9,xde={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},CC,Nt=!0,hi="[DecimalError] ",ol=hi+"Invalid argument: ",AC=hi+"Exponent out of range: ",gc=Math.floor,Hs=Math.pow,wde=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Ir,wn=1e7,jt=7,SB=9007199254740991,ug=gc(SB/jt),xe={};xe.absoluteValue=xe.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};xe.comparedTo=xe.cmp=function(e){var t,n,r,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(r=o.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(o.d[t]!==e.d[t])return o.d[t]>e.d[t]^o.s<0?1:-1;return r===i?0:r>i^o.s<0?1:-1};xe.decimalPlaces=xe.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*jt;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};xe.dividedBy=xe.div=function(e){return Ja(this,new this.constructor(e))};xe.dividedToIntegerBy=xe.idiv=function(e){var t=this,n=t.constructor;return gt(Ja(t,new n(e),0,1),n.precision)};xe.equals=xe.eq=function(e){return!this.cmp(e)};xe.exponent=function(){return ln(this)};xe.greaterThan=xe.gt=function(e){return this.cmp(e)>0};xe.greaterThanOrEqualTo=xe.gte=function(e){return this.cmp(e)>=0};xe.isInteger=xe.isint=function(){return this.e>this.d.length-2};xe.isNegative=xe.isneg=function(){return this.s<0};xe.isPositive=xe.ispos=function(){return this.s>0};xe.isZero=function(){return this.s===0};xe.lessThan=xe.lt=function(e){return this.cmp(e)<0};xe.lessThanOrEqualTo=xe.lte=function(e){return this.cmp(e)<1};xe.logarithm=xe.log=function(e){var t,n=this,r=n.constructor,i=r.precision,o=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Ir))throw Error(hi+"NaN");if(n.s<1)throw Error(hi+(n.s?"NaN":"-Infinity"));return n.eq(Ir)?new r(0):(Nt=!1,t=Ja(bd(n,o),bd(e,o),o),Nt=!0,gt(t,i))};xe.minus=xe.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?EB(t,e):AB(t,(e.s=-e.s,e))};xe.modulo=xe.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(hi+"NaN");return n.s?(Nt=!1,t=Ja(n,e,0,1).times(e),Nt=!0,n.minus(t)):gt(new r(n),i)};xe.naturalExponential=xe.exp=function(){return CB(this)};xe.naturalLogarithm=xe.ln=function(){return bd(this)};xe.negated=xe.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};xe.plus=xe.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?AB(t,e):EB(t,(e.s=-e.s,e))};xe.precision=xe.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(ol+e);if(t=ln(i)+1,r=i.d.length-1,n=r*jt+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};xe.squareRoot=xe.sqrt=function(){var e,t,n,r,i,o,l,u=this,c=u.constructor;if(u.s<1){if(!u.s)return new c(0);throw Error(hi+"NaN")}for(e=ln(u),Nt=!1,i=Math.sqrt(+u),i==0||i==1/0?(t=ia(u.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=gc((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new c(t)):r=new c(i.toString()),n=c.precision,i=l=n+3;;)if(o=r,r=o.plus(Ja(u,o,l+2)).times(.5),ia(o.d).slice(0,l)===(t=ia(r.d)).slice(0,l)){if(t=t.slice(l-3,l+1),i==l&&t=="4999"){if(gt(o,n+1,0),o.times(o).eq(u)){r=o;break}}else if(t!="9999")break;l+=4}return Nt=!0,gt(r,n)};xe.times=xe.mul=function(e){var t,n,r,i,o,l,u,c,d,m=this,h=m.constructor,y=m.d,b=(e=new h(e)).d;if(!m.s||!e.s)return new h(0);for(e.s*=m.s,n=m.e+e.e,c=y.length,d=b.length,c<d&&(o=y,y=b,b=o,l=c,c=d,d=l),o=[],l=c+d,r=l;r--;)o.push(0);for(r=d;--r>=0;){for(t=0,i=c+r;i>r;)u=o[i]+b[r]*y[i-r-1]+t,o[i--]=u%wn|0,t=u/wn|0;o[i]=(o[i]+t)%wn|0}for(;!o[--l];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,Nt?gt(e,h.precision):e};xe.toDecimalPlaces=xe.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(pa(e,0,pc),t===void 0?t=r.rounding:pa(t,0,8),gt(n,e+ln(n)+1,t))};xe.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=xl(r,!0):(pa(e,0,pc),t===void 0?t=i.rounding:pa(t,0,8),r=gt(new i(r),e+1,t),n=xl(r,!0,e+1)),n};xe.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?xl(i):(pa(e,0,pc),t===void 0?t=o.rounding:pa(t,0,8),r=gt(new o(i),e+ln(i)+1,t),n=xl(r.abs(),!1,e+ln(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};xe.toInteger=xe.toint=function(){var e=this,t=e.constructor;return gt(new t(e),ln(e)+1,t.rounding)};xe.toNumber=function(){return+this};xe.toPower=xe.pow=function(e){var t,n,r,i,o,l,u=this,c=u.constructor,d=12,m=+(e=new c(e));if(!e.s)return new c(Ir);if(u=new c(u),!u.s){if(e.s<1)throw Error(hi+"Infinity");return u}if(u.eq(Ir))return u;if(r=c.precision,e.eq(Ir))return gt(u,r);if(t=e.e,n=e.d.length-1,l=t>=n,o=u.s,l){if((n=m<0?-m:m)<=SB){for(i=new c(Ir),t=Math.ceil(r/jt+4),Nt=!1;n%2&&(i=i.times(u),yk(i.d,t)),n=gc(n/2),n!==0;)u=u.times(u),yk(u.d,t);return Nt=!0,e.s<0?new c(Ir).div(i):gt(i,r)}}else if(o<0)throw Error(hi+"NaN");return o=o<0&&e.d[Math.max(t,n)]&1?-1:1,u.s=1,Nt=!1,i=e.times(bd(u,r+d)),Nt=!0,i=CB(i),i.s=o,i};xe.toPrecision=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?(n=ln(i),r=xl(i,n<=o.toExpNeg||n>=o.toExpPos)):(pa(e,1,pc),t===void 0?t=o.rounding:pa(t,0,8),i=gt(new o(i),e,t),n=ln(i),r=xl(i,e<=n||n<=o.toExpNeg,e)),r};xe.toSignificantDigits=xe.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(pa(e,1,pc),t===void 0?t=r.rounding:pa(t,0,8)),gt(new r(n),e,t)};xe.toString=xe.valueOf=xe.val=xe.toJSON=xe[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=ln(e),n=e.constructor;return xl(e,t<=n.toExpNeg||t>=n.toExpPos)};function AB(e,t){var n,r,i,o,l,u,c,d,m=e.constructor,h=m.precision;if(!e.s||!t.s)return t.s||(t=new m(e)),Nt?gt(t,h):t;if(c=e.d,d=t.d,l=e.e,i=t.e,c=c.slice(),o=l-i,o){for(o<0?(r=c,o=-o,u=d.length):(r=d,i=l,u=c.length),l=Math.ceil(h/jt),u=l>u?l+1:u+1,o>u&&(o=u,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(u=c.length,o=d.length,u-o<0&&(o=u,r=d,d=c,c=r),n=0;o;)n=(c[--o]=c[o]+d[o]+n)/wn|0,c[o]%=wn;for(n&&(c.unshift(n),++i),u=c.length;c[--u]==0;)c.pop();return t.d=c,t.e=i,Nt?gt(t,h):t}function pa(e,t,n){if(e!==~~e||e<t||e>n)throw Error(ol+e)}function ia(e){var t,n,r,i=e.length-1,o="",l=e[0];if(i>0){for(o+=l,t=1;t<i;t++)r=e[t]+"",n=jt-r.length,n&&(o+=Zo(n)),o+=r;l=e[t],r=l+"",n=jt-r.length,n&&(o+=Zo(n))}else if(l===0)return"0";for(;l%10===0;)l/=10;return o+l}var Ja=(function(){function e(r,i){var o,l=0,u=r.length;for(r=r.slice();u--;)o=r[u]*i+l,r[u]=o%wn|0,l=o/wn|0;return l&&r.unshift(l),r}function t(r,i,o,l){var u,c;if(o!=l)c=o>l?1:-1;else for(u=c=0;u<o;u++)if(r[u]!=i[u]){c=r[u]>i[u]?1:-1;break}return c}function n(r,i,o){for(var l=0;o--;)r[o]-=l,l=r[o]<i[o]?1:0,r[o]=l*wn+r[o]-i[o];for(;!r[0]&&r.length>1;)r.shift()}return function(r,i,o,l){var u,c,d,m,h,y,b,w,S,C,E,j,T,O,N,_,M,R,I=r.constructor,$=r.s==i.s?1:-1,F=r.d,z=i.d;if(!r.s)return new I(r);if(!i.s)throw Error(hi+"Division by zero");for(c=r.e-i.e,M=z.length,N=F.length,b=new I($),w=b.d=[],d=0;z[d]==(F[d]||0);)++d;if(z[d]>(F[d]||0)&&--c,o==null?j=o=I.precision:l?j=o+(ln(r)-ln(i))+1:j=o,j<0)return new I(0);if(j=j/jt+2|0,d=0,M==1)for(m=0,z=z[0],j++;(d<N||m)&&j--;d++)T=m*wn+(F[d]||0),w[d]=T/z|0,m=T%z|0;else{for(m=wn/(z[0]+1)|0,m>1&&(z=e(z,m),F=e(F,m),M=z.length,N=F.length),O=M,S=F.slice(0,M),C=S.length;C<M;)S[C++]=0;R=z.slice(),R.unshift(0),_=z[0],z[1]>=wn/2&&++_;do m=0,u=t(z,S,M,C),u<0?(E=S[0],M!=C&&(E=E*wn+(S[1]||0)),m=E/_|0,m>1?(m>=wn&&(m=wn-1),h=e(z,m),y=h.length,C=S.length,u=t(h,S,y,C),u==1&&(m--,n(h,M<y?R:z,y))):(m==0&&(u=m=1),h=z.slice()),y=h.length,y<C&&h.unshift(0),n(S,h,C),u==-1&&(C=S.length,u=t(z,S,M,C),u<1&&(m++,n(S,M<C?R:z,C))),C=S.length):u===0&&(m++,S=[0]),w[d++]=m,u&&S[0]?S[C++]=F[O]||0:(S=[F[O]],C=1);while((O++<N||S[0]!==void 0)&&j--)}return w[0]||w.shift(),b.e=c,gt(b,l?o+ln(b)+1:o)}})();function CB(e,t){var n,r,i,o,l,u,c=0,d=0,m=e.constructor,h=m.precision;if(ln(e)>16)throw Error(AC+ln(e));if(!e.s)return new m(Ir);for(Nt=!1,u=h,l=new m(.03125);e.abs().gte(.1);)e=e.times(l),d+=5;for(r=Math.log(Hs(2,d))/Math.LN10*2+5|0,u+=r,n=i=o=new m(Ir),m.precision=u;;){if(i=gt(i.times(e),u),n=n.times(++c),l=o.plus(Ja(i,n,u)),ia(l.d).slice(0,u)===ia(o.d).slice(0,u)){for(;d--;)o=gt(o.times(o),u);return m.precision=h,t==null?(Nt=!0,gt(o,h)):o}o=l}}function ln(e){for(var t=e.e*jt,n=e.d[0];n>=10;n/=10)t++;return t}function gw(e,t,n){if(t>e.LN10.sd())throw Nt=!0,n&&(e.precision=n),Error(hi+"LN10 precision limit exceeded");return gt(new e(e.LN10),t)}function Zo(e){for(var t="";e--;)t+="0";return t}function bd(e,t){var n,r,i,o,l,u,c,d,m,h=1,y=10,b=e,w=b.d,S=b.constructor,C=S.precision;if(b.s<1)throw Error(hi+(b.s?"NaN":"-Infinity"));if(b.eq(Ir))return new S(0);if(t==null?(Nt=!1,d=C):d=t,b.eq(10))return t==null&&(Nt=!0),gw(S,d);if(d+=y,S.precision=d,n=ia(w),r=n.charAt(0),o=ln(b),Math.abs(o)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)b=b.times(e),n=ia(b.d),r=n.charAt(0),h++;o=ln(b),r>1?(b=new S("0."+n),o++):b=new S(r+"."+n.slice(1))}else return c=gw(S,d+2,C).times(o+""),b=bd(new S(r+"."+n.slice(1)),d-y).plus(c),S.precision=C,t==null?(Nt=!0,gt(b,C)):b;for(u=l=b=Ja(b.minus(Ir),b.plus(Ir),d),m=gt(b.times(b),d),i=3;;){if(l=gt(l.times(m),d),c=u.plus(Ja(l,new S(i),d)),ia(c.d).slice(0,d)===ia(u.d).slice(0,d))return u=u.times(2),o!==0&&(u=u.plus(gw(S,d+2,C).times(o+""))),u=Ja(u,new S(h),d),S.precision=C,t==null?(Nt=!0,gt(u,C)):u;u=c,i+=2}}function vk(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=gc(n/jt),e.d=[],r=(n+1)%jt,n<0&&(r+=jt),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=jt;r<i;)e.d.push(+t.slice(r,r+=jt));t=t.slice(r),r=jt-t.length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),Nt&&(e.e>ug||e.e<-ug))throw Error(AC+n)}else e.s=0,e.e=0,e.d=[0];return e}function gt(e,t,n){var r,i,o,l,u,c,d,m,h=e.d;for(l=1,o=h[0];o>=10;o/=10)l++;if(r=t-l,r<0)r+=jt,i=t,d=h[m=0];else{if(m=Math.ceil((r+1)/jt),o=h.length,m>=o)return e;for(d=o=h[m],l=1;o>=10;o/=10)l++;r%=jt,i=r-jt+l}if(n!==void 0&&(o=Hs(10,l-i-1),u=d/o%10|0,c=t<0||h[m+1]!==void 0||d%o,c=n<4?(u||c)&&(n==0||n==(e.s<0?3:2)):u>5||u==5&&(n==4||c||n==6&&(r>0?i>0?d/Hs(10,l-i):0:h[m-1])%10&1||n==(e.s<0?8:7))),t<1||!h[0])return c?(o=ln(e),h.length=1,t=t-o-1,h[0]=Hs(10,(jt-t%jt)%jt),e.e=gc(-t/jt)||0):(h.length=1,h[0]=e.e=e.s=0),e;if(r==0?(h.length=m,o=1,m--):(h.length=m+1,o=Hs(10,jt-r),h[m]=i>0?(d/Hs(10,l-i)%Hs(10,i)|0)*o:0),c)for(;;)if(m==0){(h[0]+=o)==wn&&(h[0]=1,++e.e);break}else{if(h[m]+=o,h[m]!=wn)break;h[m--]=0,o=1}for(r=h.length;h[--r]===0;)h.pop();if(Nt&&(e.e>ug||e.e<-ug))throw Error(AC+ln(e));return e}function EB(e,t){var n,r,i,o,l,u,c,d,m,h,y=e.constructor,b=y.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new y(e),Nt?gt(t,b):t;if(c=e.d,h=t.d,r=t.e,d=e.e,c=c.slice(),l=d-r,l){for(m=l<0,m?(n=c,l=-l,u=h.length):(n=h,r=d,u=c.length),i=Math.max(Math.ceil(b/jt),u)+2,l>i&&(l=i,n.length=1),n.reverse(),i=l;i--;)n.push(0);n.reverse()}else{for(i=c.length,u=h.length,m=i<u,m&&(u=i),i=0;i<u;i++)if(c[i]!=h[i]){m=c[i]<h[i];break}l=0}for(m&&(n=c,c=h,h=n,t.s=-t.s),u=c.length,i=h.length-u;i>0;--i)c[u++]=0;for(i=h.length;i>l;){if(c[--i]<h[i]){for(o=i;o&&c[--o]===0;)c[o]=wn-1;--c[o],c[i]+=wn}c[i]-=h[i]}for(;c[--u]===0;)c.pop();for(;c[0]===0;c.shift())--r;return c[0]?(t.d=c,t.e=r,Nt?gt(t,b):t):new y(0)}function xl(e,t,n){var r,i=ln(e),o=ia(e.d),l=o.length;return t?(n&&(r=n-l)>0?o=o.charAt(0)+"."+o.slice(1)+Zo(r):l>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Zo(-i-1)+o,n&&(r=n-l)>0&&(o+=Zo(r))):i>=l?(o+=Zo(i+1-l),n&&(r=n-i-1)>0&&(o=o+"."+Zo(r))):((r=i+1)<l&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-l)>0&&(i+1===l&&(o+="."),o+=Zo(r))),e.s<0?"-"+o:o}function yk(e,t){if(e.length>t)return e.length=t,!0}function jB(e){var t,n,r;function i(o){var l=this;if(!(l instanceof i))return new i(o);if(l.constructor=i,o instanceof i){l.s=o.s,l.e=o.e,l.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(ol+o);if(o>0)l.s=1;else if(o<0)o=-o,l.s=-1;else{l.s=0,l.e=0,l.d=[0];return}if(o===~~o&&o<1e7){l.e=0,l.d=[o];return}return vk(l,o.toString())}else if(typeof o!="string")throw Error(ol+o);if(o.charCodeAt(0)===45?(o=o.slice(1),l.s=-1):l.s=1,wde.test(o))vk(l,o);else throw Error(ol+o)}if(i.prototype=xe,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=jB,i.config=i.set=Sde,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return i.config(e),i}function Sde(e){if(!e||typeof e!="object")throw Error(hi+"Object expected");var t,n,r,i=["precision",1,pc,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((r=e[n=i[t]])!==void 0)if(gc(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(ol+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(ol+n+": "+r);return this}var CC=jB(xde);Ir=new CC(1);const Ze=CC;function TB(e){var t;return e===0?t=1:t=Math.floor(new Ze(e).abs().log(10).toNumber())+1,t}function OB(e,t,n){for(var r=new Ze(e),i=0,o=[];r.lt(t)&&i<1e5;)o.push(r.toNumber()),r=r.add(n),i++;return o}var PB=e=>{var[t,n]=e,[r,i]=[t,n];return t>n&&([r,i]=[n,t]),[r,i]},EC=(e,t,n)=>{if(e.lte(0))return new Ze(0);var r=TB(e.toNumber()),i=new Ze(10).pow(r),o=e.div(i),l=r!==1?.05:.1,u=new Ze(Math.ceil(o.div(l).toNumber())).add(n).mul(l),c=u.mul(i);return t?new Ze(c.toNumber()):new Ze(Math.ceil(c.toNumber()))},NB=(e,t,n)=>{var r;if(e.lte(0))return new Ze(0);var i=[1,2,2.5,5],o=e.toNumber(),l=Math.floor(new Ze(o).abs().log(10).toNumber()),u=new Ze(10).pow(l),c=e.div(u).toNumber(),d=i.findIndex(b=>b>=c-1e-10);if(d===-1&&(u=u.mul(10),d=0),d+=n,d>=i.length){var m=Math.floor(d/i.length);d%=i.length,u=u.mul(new Ze(10).pow(m))}var h=(r=i[d])!==null&&r!==void 0?r:1,y=new Ze(h).mul(u);return t?y:new Ze(Math.ceil(y.toNumber()))},Ade=(e,t,n)=>{var r=new Ze(1),i=new Ze(e);if(!i.isint()&&n){var o=Math.abs(e);o<1?(r=new Ze(10).pow(TB(e)-1),i=new Ze(Math.floor(i.div(r).toNumber())).mul(r)):o>1&&(i=new Ze(Math.floor(e)))}else e===0?i=new Ze(Math.floor((t-1)/2)):n||(i=new Ze(Math.floor(e)));for(var l=Math.floor((t-1)/2),u=[],c=0;c<t;c++)u.push(i.add(new Ze(c-l).mul(r)).toNumber());return u},_B=function(t,n,r,i){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:EC;if(!Number.isFinite((n-t)/(r-1)))return{step:new Ze(0),tickMin:new Ze(0),tickMax:new Ze(0)};var u=l(new Ze(n).sub(t).div(r-1),i,o),c;t<=0&&n>=0?c=new Ze(0):(c=new Ze(t).add(n).div(2),c=c.sub(new Ze(c).mod(u)));var d=Math.ceil(c.sub(t).div(u).toNumber()),m=Math.ceil(new Ze(n).sub(c).div(u).toNumber()),h=d+m+1;return h>r?_B(t,n,r,i,o+1,l):(h<r&&(m=n>0?m+(r-h):m,d=n>0?d:d+(r-h)),{step:u,tickMin:c.sub(new Ze(d).mul(u)),tickMax:c.add(new Ze(m).mul(u))})},bk=function(t){var[n,r]=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",u=Math.max(i,2),[c,d]=PB([n,r]);if(c===-1/0||d===1/0){var m=d===1/0?[c,...Array(i-1).fill(1/0)]:[...Array(i-1).fill(-1/0),d];return n>r?m.reverse():m}if(c===d)return Ade(c,i,o);var h=l==="snap125"?NB:EC,{step:y,tickMin:b,tickMax:w}=_B(c,d,u,o,0,h),S=OB(b,w.add(new Ze(.1).mul(y)),y);return n>r?S.reverse():S},xk=function(t,n){var[r,i]=t,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",[u,c]=PB([r,i]);if(u===-1/0||c===1/0)return[r,i];if(u===c)return[u];var d=l==="snap125"?NB:EC,m=Math.max(n,2),h=d(new Ze(c).sub(u).div(m-1),o,0),y=[...OB(new Ze(u),new Ze(c),h),c];return o===!1&&(y=y.map(b=>Math.round(b))),r>i?y.reverse():y},Cde=e=>e.rootProps.barCategoryGap,kv=e=>e.rootProps.stackOffset,MB=e=>e.rootProps.reverseStackOrder,jC=e=>e.options.chartName,TC=e=>e.rootProps.syncId,RB=e=>e.rootProps.syncMethod,OC=e=>e.options.eventEmitter,Ede=e=>e.rootProps.baseValue,nr={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},Is={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},Yi={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},Lv=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function Iv(e,t,n){if(n!=="auto")return n;if(e!=null)return Ii(e,t)?"category":"number"}function wk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function cg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wk(Object(n),!0).forEach(function(r){jde(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jde(e,t,n){return(t=Tde(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tde(e){var t=Ode(e,"string");return typeof t=="symbol"?t:t+""}function Ode(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Sk={allowDataOverflow:Is.allowDataOverflow,allowDecimals:Is.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:Is.angleAxisId,includeHidden:!1,name:void 0,reversed:Is.reversed,scale:Is.scale,tick:Is.tick,tickCount:void 0,ticks:void 0,type:Is.type,unit:void 0,niceTicks:"auto"},Ak={allowDataOverflow:Yi.allowDataOverflow,allowDecimals:Yi.allowDecimals,allowDuplicatedCategory:Yi.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Yi.radiusAxisId,includeHidden:Yi.includeHidden,name:void 0,reversed:Yi.reversed,scale:Yi.scale,tick:Yi.tick,tickCount:Yi.tickCount,ticks:void 0,type:Yi.type,unit:void 0,niceTicks:"auto"},Pde=(e,t)=>{if(t!=null)return e.polarAxis.angleAxis[t]},PC=te([Pde,tB],(e,t)=>{var n;if(e!=null)return e;var r=(n=Iv(t,"angleAxis",Sk.type))!==null&&n!==void 0?n:"category";return cg(cg({},Sk),{},{type:r})}),Nde=(e,t)=>e.polarAxis.radiusAxis[t],NC=te([Nde,tB],(e,t)=>{var n;if(e!=null)return e;var r=(n=Iv(t,"radiusAxis",Ak.type))!==null&&n!==void 0?n:"category";return cg(cg({},Ak),{},{type:r})}),zv=e=>e.polarOptions,_C=te([fo,ho,Vn],tde),DB=te([zv,_C],(e,t)=>{if(e!=null)return ls(e.innerRadius,t,0)}),kB=te([zv,_C],(e,t)=>{if(e!=null)return ls(e.outerRadius,t,t*.8)}),_de=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:n}=e;return[t,n]},LB=te([zv],_de);te([PC,LB],Lv);var IB=te([_C,DB,kB],(e,t,n)=>{if(!(e==null||t==null||n==null))return[t,n]});te([NC,IB],Lv);var zB=te([xt,zv,DB,kB,fo,ho],(e,t,n,r,i,o)=>{if(!(e!=="centric"&&e!=="radial"||t==null||n==null||r==null)){var{cx:l,cy:u,startAngle:c,endAngle:d}=t;return{cx:ls(l,i,i/2),cy:ls(u,o,o/2),innerRadius:n,outerRadius:r,startAngle:c,endAngle:d,clockWise:!1}}}),Sn=(e,t)=>t,$v=(e,t,n)=>n;function MC(e){return e?.id}function $B(e,t,n){var{chartData:r=[]}=t,{allowDuplicatedCategory:i,dataKey:o}=n,l=new Map;return e.forEach(u=>{var c,d=(c=u.data)!==null&&c!==void 0?c:r;if(!(d==null||d.length===0)){var m=MC(u);d.forEach((h,y)=>{var b=o==null||i?y:String(sn(h,o,null)),w=sn(h,u.dataKey,0),S;l.has(b)?S=l.get(b):S={},Object.assign(S,{[m]:w}),l.set(b,S)})}}),Array.from(l.values())}function RC(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var Bv=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function Uv(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function Mde(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return!1}var An=e=>{var t=xt(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},vc=e=>e.tooltip.settings.axisId;function DC(e){if(e!=null){var t=e.ticks,n=e.bandwidth,r=e.range(),i=[Math.min(...r),Math.max(...r)];return{domain:()=>e.domain(),range:(function(o){function l(){return o.apply(this,arguments)}return l.toString=function(){return o.toString()},l})(()=>i),rangeMin:()=>i[0],rangeMax:()=>i[1],isInRange(o){var l=i[0],u=i[1];return l<=u?o>=l&&o<=u:o>=u&&o<=l},bandwidth:n?()=>n.call(e):void 0,ticks:t?o=>t.call(e,o):void 0,map:(o,l)=>{var u=e(o);if(u!=null){if(e.bandwidth&&l!==null&&l!==void 0&&l.position){var c=e.bandwidth();switch(l.position){case"middle":u+=c/2;break;case"end":u+=c;break}}return u}}}}}var Rde=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!ca(t)){for(var n,r,i=0;i<t.length;i++){var o=t[i];nt(o)&&((n===void 0||o<n)&&(n=o),(r===void 0||o>r)&&(r=o))}return n!==void 0&&r!==void 0?[n,r]:void 0}return t}default:return t}};function ns(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Dde(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function kC(e){let t,n,r;e.length!==2?(t=ns,n=(u,c)=>ns(e(u),c),r=(u,c)=>e(u)-c):(t=e===ns||e===Dde?e:kde,n=e,r=e);function i(u,c,d=0,m=u.length){if(d<m){if(t(c,c)!==0)return m;do{const h=d+m>>>1;n(u[h],c)<0?d=h+1:m=h}while(d<m)}return d}function o(u,c,d=0,m=u.length){if(d<m){if(t(c,c)!==0)return m;do{const h=d+m>>>1;n(u[h],c)<=0?d=h+1:m=h}while(d<m)}return d}function l(u,c,d=0,m=u.length){const h=i(u,c,d,m-1);return h>d&&r(u[h-1],c)>-r(u[h],c)?h-1:h}return{left:i,center:l,right:o}}function kde(){return 0}function BB(e){return e===null?NaN:+e}function*Lde(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const Ide=kC(ns),Gd=Ide.right;kC(BB).center;class Ck extends Map{constructor(t,n=Bde){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(Ek(this,t))}has(t){return super.has(Ek(this,t))}set(t,n){return super.set(zde(this,t),n)}delete(t){return super.delete($de(this,t))}}function Ek({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function zde({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function $de({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function Bde(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Ude(e=ns){if(e===ns)return UB;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function UB(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const Vde=Math.sqrt(50),Fde=Math.sqrt(10),qde=Math.sqrt(2);function fg(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),l=o>=Vde?10:o>=Fde?5:o>=qde?2:1;let u,c,d;return i<0?(d=Math.pow(10,-i)/l,u=Math.round(e*d),c=Math.round(t*d),u/d<e&&++u,c/d>t&&--c,d=-d):(d=Math.pow(10,i)*l,u=Math.round(e/d),c=Math.round(t/d),u*d<e&&++u,c*d>t&&--c),c<u&&.5<=n&&n<2?fg(e,t,n*2):[u,c,d]}function hS(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,o,l]=r?fg(t,e,n):fg(e,t,n);if(!(o>=i))return[];const u=o-i+1,c=new Array(u);if(r)if(l<0)for(let d=0;d<u;++d)c[d]=(o-d)/-l;else for(let d=0;d<u;++d)c[d]=(o-d)*l;else if(l<0)for(let d=0;d<u;++d)c[d]=(i+d)/-l;else for(let d=0;d<u;++d)c[d]=(i+d)*l;return c}function mS(e,t,n){return t=+t,e=+e,n=+n,fg(e,t,n)[2]}function pS(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?mS(t,e,n):mS(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function jk(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function Tk(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function VB(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?UB:Ude(i);r>n;){if(r-n>600){const c=r-n+1,d=t-n+1,m=Math.log(c),h=.5*Math.exp(2*m/3),y=.5*Math.sqrt(m*h*(c-h)/c)*(d-c/2<0?-1:1),b=Math.max(n,Math.floor(t-d*h/c+y)),w=Math.min(r,Math.floor(t+(c-d)*h/c+y));VB(e,t,b,w,i)}const o=e[t];let l=n,u=r;for(Of(e,n,t),i(e[r],o)>0&&Of(e,n,r);l<u;){for(Of(e,l,u),++l,--u;i(e[l],o)<0;)++l;for(;i(e[u],o)>0;)--u}i(e[n],o)===0?Of(e,n,u):(++u,Of(e,u,r)),u<=t&&(n=u+1),t<=u&&(r=u-1)}return e}function Of(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Hde(e,t,n){if(e=Float64Array.from(Lde(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return Tk(e);if(t>=1)return jk(e);var r,i=(r-1)*t,o=Math.floor(i),l=jk(VB(e,o).subarray(0,o+1)),u=Tk(e.subarray(o+1));return l+(u-l)*(i-o)}}function Kde(e,t,n=BB){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),l=+n(e[o],o,e),u=+n(e[o+1],o+1,e);return l+(u-l)*(i-o)}}function Gde(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++r<i;)o[r]=e+r*n;return o}function pi(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function mo(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const gS=Symbol("implicit");function LC(){var e=new Ck,t=[],n=[],r=gS;function i(o){let l=e.get(o);if(l===void 0){if(r!==gS)return r;e.set(o,l=t.push(o)-1)}return n[l%n.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new Ck;for(const l of o)e.has(l)||e.set(l,t.push(l)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return LC(t,n).unknown(r)},pi.apply(i,arguments),i}function IC(){var e=LC().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,o,l,u=!1,c=0,d=0,m=.5;delete e.unknown;function h(){var y=t().length,b=i<r,w=b?i:r,S=b?r:i;o=(S-w)/Math.max(1,y-c+d*2),u&&(o=Math.floor(o)),w+=(S-w-o*(y-c))*m,l=o*(1-c),u&&(w=Math.round(w),l=Math.round(l));var C=Gde(y).map(function(E){return w+o*E});return n(b?C.reverse():C)}return e.domain=function(y){return arguments.length?(t(y),h()):t()},e.range=function(y){return arguments.length?([r,i]=y,r=+r,i=+i,h()):[r,i]},e.rangeRound=function(y){return[r,i]=y,r=+r,i=+i,u=!0,h()},e.bandwidth=function(){return l},e.step=function(){return o},e.round=function(y){return arguments.length?(u=!!y,h()):u},e.padding=function(y){return arguments.length?(c=Math.min(1,d=+y),h()):c},e.paddingInner=function(y){return arguments.length?(c=Math.min(1,y),h()):c},e.paddingOuter=function(y){return arguments.length?(d=+y,h()):d},e.align=function(y){return arguments.length?(m=Math.max(0,Math.min(1,y)),h()):m},e.copy=function(){return IC(t(),[r,i]).round(u).paddingInner(c).paddingOuter(d).align(m)},pi.apply(h(),arguments)}function FB(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return FB(t())},e}function Wde(){return FB(IC.apply(null,arguments).paddingInner(1))}function zC(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function qB(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Wd(){}var xd=.7,dg=1/xd,zu="\\s*([+-]?\\d+)\\s*",wd="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",fa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Yde=/^#([0-9a-f]{3,8})$/,Xde=new RegExp(`^rgb\\(${zu},${zu},${zu}\\)$`),Zde=new RegExp(`^rgb\\(${fa},${fa},${fa}\\)$`),Qde=new RegExp(`^rgba\\(${zu},${zu},${zu},${wd}\\)$`),Jde=new RegExp(`^rgba\\(${fa},${fa},${fa},${wd}\\)$`),ehe=new RegExp(`^hsl\\(${wd},${fa},${fa}\\)$`),the=new RegExp(`^hsla\\(${wd},${fa},${fa},${wd}\\)$`),Ok={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};zC(Wd,Sd,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Pk,formatHex:Pk,formatHex8:nhe,formatHsl:rhe,formatRgb:Nk,toString:Nk});function Pk(){return this.rgb().formatHex()}function nhe(){return this.rgb().formatHex8()}function rhe(){return HB(this).formatHsl()}function Nk(){return this.rgb().formatRgb()}function Sd(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Yde.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?_k(t):n===3?new Sr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Fm(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Fm(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Xde.exec(e))?new Sr(t[1],t[2],t[3],1):(t=Zde.exec(e))?new Sr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Qde.exec(e))?Fm(t[1],t[2],t[3],t[4]):(t=Jde.exec(e))?Fm(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=ehe.exec(e))?Dk(t[1],t[2]/100,t[3]/100,1):(t=the.exec(e))?Dk(t[1],t[2]/100,t[3]/100,t[4]):Ok.hasOwnProperty(e)?_k(Ok[e]):e==="transparent"?new Sr(NaN,NaN,NaN,0):null}function _k(e){return new Sr(e>>16&255,e>>8&255,e&255,1)}function Fm(e,t,n,r){return r<=0&&(e=t=n=NaN),new Sr(e,t,n,r)}function ihe(e){return e instanceof Wd||(e=Sd(e)),e?(e=e.rgb(),new Sr(e.r,e.g,e.b,e.opacity)):new Sr}function vS(e,t,n,r){return arguments.length===1?ihe(e):new Sr(e,t,n,r??1)}function Sr(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}zC(Sr,vS,qB(Wd,{brighter(e){return e=e==null?dg:Math.pow(dg,e),new Sr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?xd:Math.pow(xd,e),new Sr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Sr(sl(this.r),sl(this.g),sl(this.b),hg(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Mk,formatHex:Mk,formatHex8:ahe,formatRgb:Rk,toString:Rk}));function Mk(){return`#${tl(this.r)}${tl(this.g)}${tl(this.b)}`}function ahe(){return`#${tl(this.r)}${tl(this.g)}${tl(this.b)}${tl((isNaN(this.opacity)?1:this.opacity)*255)}`}function Rk(){const e=hg(this.opacity);return`${e===1?"rgb(":"rgba("}${sl(this.r)}, ${sl(this.g)}, ${sl(this.b)}${e===1?")":`, ${e})`}`}function hg(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function sl(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function tl(e){return e=sl(e),(e<16?"0":"")+e.toString(16)}function Dk(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ti(e,t,n,r)}function HB(e){if(e instanceof Ti)return new Ti(e.h,e.s,e.l,e.opacity);if(e instanceof Wd||(e=Sd(e)),!e)return new Ti;if(e instanceof Ti)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),l=NaN,u=o-i,c=(o+i)/2;return u?(t===o?l=(n-r)/u+(n<r)*6:n===o?l=(r-t)/u+2:l=(t-n)/u+4,u/=c<.5?o+i:2-o-i,l*=60):u=c>0&&c<1?0:l,new Ti(l,u,c,e.opacity)}function ohe(e,t,n,r){return arguments.length===1?HB(e):new Ti(e,t,n,r??1)}function Ti(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}zC(Ti,ohe,qB(Wd,{brighter(e){return e=e==null?dg:Math.pow(dg,e),new Ti(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?xd:Math.pow(xd,e),new Ti(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Sr(vw(e>=240?e-240:e+120,i,r),vw(e,i,r),vw(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Ti(kk(this.h),qm(this.s),qm(this.l),hg(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=hg(this.opacity);return`${e===1?"hsl(":"hsla("}${kk(this.h)}, ${qm(this.s)*100}%, ${qm(this.l)*100}%${e===1?")":`, ${e})`}`}}));function kk(e){return e=(e||0)%360,e<0?e+360:e}function qm(e){return Math.max(0,Math.min(1,e||0))}function vw(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const $C=e=>()=>e;function she(e,t){return function(n){return e+n*t}}function lhe(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function uhe(e){return(e=+e)==1?KB:function(t,n){return n-t?lhe(t,n,e):$C(isNaN(t)?n:t)}}function KB(e,t){var n=t-e;return n?she(e,n):$C(isNaN(e)?t:e)}const Lk=(function e(t){var n=uhe(t);function r(i,o){var l=n((i=vS(i)).r,(o=vS(o)).r),u=n(i.g,o.g),c=n(i.b,o.b),d=KB(i.opacity,o.opacity);return function(m){return i.r=l(m),i.g=u(m),i.b=c(m),i.opacity=d(m),i+""}}return r.gamma=e,r})(1);function che(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=e[i]*(1-o)+t[i]*o;return r}}function fhe(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function dhe(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n),l;for(l=0;l<r;++l)i[l]=yc(e[l],t[l]);for(;l<n;++l)o[l]=t[l];return function(u){for(l=0;l<r;++l)o[l]=i[l](u);return o}}function hhe(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function mg(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function mhe(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=yc(e[i],t[i]):r[i]=t[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var yS=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,yw=new RegExp(yS.source,"g");function phe(e){return function(){return e}}function ghe(e){return function(t){return e(t)+""}}function vhe(e,t){var n=yS.lastIndex=yw.lastIndex=0,r,i,o,l=-1,u=[],c=[];for(e=e+"",t=t+"";(r=yS.exec(e))&&(i=yw.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),u[l]?u[l]+=o:u[++l]=o),(r=r[0])===(i=i[0])?u[l]?u[l]+=i:u[++l]=i:(u[++l]=null,c.push({i:l,x:mg(r,i)})),n=yw.lastIndex;return n<t.length&&(o=t.slice(n),u[l]?u[l]+=o:u[++l]=o),u.length<2?c[0]?ghe(c[0].x):phe(t):(t=c.length,function(d){for(var m=0,h;m<t;++m)u[(h=c[m]).i]=h.x(d);return u.join("")})}function yc(e,t){var n=typeof t,r;return t==null||n==="boolean"?$C(t):(n==="number"?mg:n==="string"?(r=Sd(t))?(t=r,Lk):vhe:t instanceof Sd?Lk:t instanceof Date?hhe:fhe(t)?che:Array.isArray(t)?dhe:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?mhe:mg)(e,t)}function BC(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function yhe(e,t){t===void 0&&(t=e,e=yc);for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(i,i=t[++n]);return function(l){var u=Math.max(0,Math.min(r-1,Math.floor(l*=r)));return o[u](l-u)}}function bhe(e){return function(){return e}}function pg(e){return+e}var Ik=[0,1];function rr(e){return e}function bS(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:bhe(isNaN(t)?NaN:.5)}function xhe(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function whe(e,t,n){var r=e[0],i=e[1],o=t[0],l=t[1];return i<r?(r=bS(i,r),o=n(l,o)):(r=bS(r,i),o=n(o,l)),function(u){return o(r(u))}}function She(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),l=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++l<r;)i[l]=bS(e[l],e[l+1]),o[l]=n(t[l],t[l+1]);return function(u){var c=Gd(e,u,1,r)-1;return o[c](i[c](u))}}function Yd(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Vv(){var e=Ik,t=Ik,n=yc,r,i,o,l=rr,u,c,d;function m(){var y=Math.min(e.length,t.length);return l!==rr&&(l=xhe(e[0],e[y-1])),u=y>2?She:whe,c=d=null,h}function h(y){return y==null||isNaN(y=+y)?o:(c||(c=u(e.map(r),t,n)))(r(l(y)))}return h.invert=function(y){return l(i((d||(d=u(t,e.map(r),mg)))(y)))},h.domain=function(y){return arguments.length?(e=Array.from(y,pg),m()):e.slice()},h.range=function(y){return arguments.length?(t=Array.from(y),m()):t.slice()},h.rangeRound=function(y){return t=Array.from(y),n=BC,m()},h.clamp=function(y){return arguments.length?(l=y?!0:rr,m()):l!==rr},h.interpolate=function(y){return arguments.length?(n=y,m()):n},h.unknown=function(y){return arguments.length?(o=y,h):o},function(y,b){return r=y,i=b,m()}}function UC(){return Vv()(rr,rr)}function Ahe(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function gg(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Zu(e){return e=gg(Math.abs(e)),e?e[1]:NaN}function Che(e,t){return function(n,r){for(var i=n.length,o=[],l=0,u=e[0],c=0;i>0&&u>0&&(c+u+1>r&&(u=Math.max(1,r-c)),o.push(n.substring(i-=u,i+u)),!((c+=u+1)>r));)u=e[l=(l+1)%e.length];return o.reverse().join(t)}}function Ehe(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var jhe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ad(e){if(!(t=jhe.exec(e)))throw new Error("invalid format: "+e);var t;return new VC({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Ad.prototype=VC.prototype;function VC(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}VC.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function The(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var vg;function Ohe(e,t){var n=gg(e,t);if(!n)return vg=void 0,e.toPrecision(t);var r=n[0],i=n[1],o=i-(vg=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,l=r.length;return o===l?r:o>l?r+new Array(o-l+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+gg(e,Math.max(0,t+o-1))[0]}function zk(e,t){var n=gg(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const $k={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Ahe,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>zk(e*100,t),r:zk,s:Ohe,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Bk(e){return e}var Uk=Array.prototype.map,Vk=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Phe(e){var t=e.grouping===void 0||e.thousands===void 0?Bk:Che(Uk.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?Bk:Ehe(Uk.call(e.numerals,String)),l=e.percent===void 0?"%":e.percent+"",u=e.minus===void 0?"−":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function d(h,y){h=Ad(h);var b=h.fill,w=h.align,S=h.sign,C=h.symbol,E=h.zero,j=h.width,T=h.comma,O=h.precision,N=h.trim,_=h.type;_==="n"?(T=!0,_="g"):$k[_]||(O===void 0&&(O=12),N=!0,_="g"),(E||b==="0"&&w==="=")&&(E=!0,b="0",w="=");var M=(y&&y.prefix!==void 0?y.prefix:"")+(C==="$"?n:C==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():""),R=(C==="$"?r:/[%p]/.test(_)?l:"")+(y&&y.suffix!==void 0?y.suffix:""),I=$k[_],$=/[defgprs%]/.test(_);O=O===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,O)):Math.max(0,Math.min(20,O));function F(z){var Y=M,Q=R,se,L,q;if(_==="c")Q=I(z)+Q,z="";else{z=+z;var B=z<0||1/z<0;if(z=isNaN(z)?c:I(Math.abs(z),O),N&&(z=The(z)),B&&+z==0&&S!=="+"&&(B=!1),Y=(B?S==="("?S:u:S==="-"||S==="("?"":S)+Y,Q=(_==="s"&&!isNaN(z)&&vg!==void 0?Vk[8+vg/3]:"")+Q+(B&&S==="("?")":""),$){for(se=-1,L=z.length;++se<L;)if(q=z.charCodeAt(se),48>q||q>57){Q=(q===46?i+z.slice(se+1):z.slice(se))+Q,z=z.slice(0,se);break}}}T&&!E&&(z=t(z,1/0));var ae=Y.length+z.length+Q.length,G=ae<j?new Array(j-ae+1).join(b):"";switch(T&&E&&(z=t(G+z,G.length?j-Q.length:1/0),G=""),w){case"<":z=Y+z+Q+G;break;case"=":z=Y+G+z+Q;break;case"^":z=G.slice(0,ae=G.length>>1)+Y+z+Q+G.slice(ae);break;default:z=G+Y+z+Q;break}return o(z)}return F.toString=function(){return h+""},F}function m(h,y){var b=Math.max(-8,Math.min(8,Math.floor(Zu(y)/3)))*3,w=Math.pow(10,-b),S=d((h=Ad(h),h.type="f",h),{suffix:Vk[8+b/3]});return function(C){return S(w*C)}}return{format:d,formatPrefix:m}}var Hm,FC,GB;Nhe({thousands:",",grouping:[3],currency:["$",""]});function Nhe(e){return Hm=Phe(e),FC=Hm.format,GB=Hm.formatPrefix,Hm}function _he(e){return Math.max(0,-Zu(Math.abs(e)))}function Mhe(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Zu(t)/3)))*3-Zu(Math.abs(e)))}function Rhe(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Zu(t)-Zu(e))+1}function WB(e,t,n,r){var i=pS(e,t,n),o;switch(r=Ad(r??",f"),r.type){case"s":{var l=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=Mhe(i,l))&&(r.precision=o),GB(r,l)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=Rhe(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=_he(i))&&(r.precision=o-(r.type==="%")*2);break}}return FC(r)}function ms(e){var t=e.domain;return e.ticks=function(n){var r=t();return hS(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return WB(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,l=r[i],u=r[o],c,d,m=10;for(u<l&&(d=l,l=u,u=d,d=i,i=o,o=d);m-- >0;){if(d=mS(l,u,n),d===c)return r[i]=l,r[o]=u,t(r);if(d>0)l=Math.floor(l/d)*d,u=Math.ceil(u/d)*d;else if(d<0)l=Math.ceil(l*d)/d,u=Math.floor(u*d)/d;else break;c=d}return e},e}function YB(){var e=UC();return e.copy=function(){return Yd(e,YB())},pi.apply(e,arguments),ms(e)}function XB(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,pg),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return XB(e).unknown(t)},e=arguments.length?Array.from(e,pg):[0,1],ms(n)}function ZB(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],l;return o<i&&(l=n,n=r,r=l,l=i,i=o,o=l),e[n]=t.floor(i),e[r]=t.ceil(o),e}function Fk(e){return Math.log(e)}function qk(e){return Math.exp(e)}function Dhe(e){return-Math.log(-e)}function khe(e){return-Math.exp(-e)}function Lhe(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Ihe(e){return e===10?Lhe:e===Math.E?Math.exp:t=>Math.pow(e,t)}function zhe(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function Hk(e){return(t,n)=>-e(-t,n)}function qC(e){const t=e(Fk,qk),n=t.domain;let r=10,i,o;function l(){return i=zhe(r),o=Ihe(r),n()[0]<0?(i=Hk(i),o=Hk(o),e(Dhe,khe)):e(Fk,qk),t}return t.base=function(u){return arguments.length?(r=+u,l()):r},t.domain=function(u){return arguments.length?(n(u),l()):n()},t.ticks=u=>{const c=n();let d=c[0],m=c[c.length-1];const h=m<d;h&&([d,m]=[m,d]);let y=i(d),b=i(m),w,S;const C=u==null?10:+u;let E=[];if(!(r%1)&&b-y<C){if(y=Math.floor(y),b=Math.ceil(b),d>0){for(;y<=b;++y)for(w=1;w<r;++w)if(S=y<0?w/o(-y):w*o(y),!(S<d)){if(S>m)break;E.push(S)}}else for(;y<=b;++y)for(w=r-1;w>=1;--w)if(S=y>0?w/o(-y):w*o(y),!(S<d)){if(S>m)break;E.push(S)}E.length*2<C&&(E=hS(d,m,C))}else E=hS(y,b,Math.min(b-y,C)).map(o);return h?E.reverse():E},t.tickFormat=(u,c)=>{if(u==null&&(u=10),c==null&&(c=r===10?"s":","),typeof c!="function"&&(!(r%1)&&(c=Ad(c)).precision==null&&(c.trim=!0),c=FC(c)),u===1/0)return c;const d=Math.max(1,r*u/t.ticks().length);return m=>{let h=m/o(Math.round(i(m)));return h*r<r-.5&&(h*=r),h<=d?c(m):""}},t.nice=()=>n(ZB(n(),{floor:u=>o(Math.floor(i(u))),ceil:u=>o(Math.ceil(i(u)))})),t}function QB(){const e=qC(Vv()).domain([1,10]);return e.copy=()=>Yd(e,QB()).base(e.base()),pi.apply(e,arguments),e}function Kk(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Gk(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function HC(e){var t=1,n=e(Kk(t),Gk(t));return n.constant=function(r){return arguments.length?e(Kk(t=+r),Gk(t)):t},ms(n)}function JB(){var e=HC(Vv());return e.copy=function(){return Yd(e,JB()).constant(e.constant())},pi.apply(e,arguments)}function Wk(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function $he(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Bhe(e){return e<0?-e*e:e*e}function KC(e){var t=e(rr,rr),n=1;function r(){return n===1?e(rr,rr):n===.5?e($he,Bhe):e(Wk(n),Wk(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},ms(t)}function GC(){var e=KC(Vv());return e.copy=function(){return Yd(e,GC()).exponent(e.exponent())},pi.apply(e,arguments),e}function Uhe(){return GC.apply(null,arguments).exponent(.5)}function Yk(e){return Math.sign(e)*e*e}function Vhe(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function eU(){var e=UC(),t=[0,1],n=!1,r;function i(o){var l=Vhe(e(o));return isNaN(l)?r:n?Math.round(l):l}return i.invert=function(o){return e.invert(Yk(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,pg)).map(Yk)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return eU(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},pi.apply(i,arguments),ms(i)}function tU(){var e=[],t=[],n=[],r;function i(){var l=0,u=Math.max(1,t.length);for(n=new Array(u-1);++l<u;)n[l-1]=Kde(e,l/u);return o}function o(l){return l==null||isNaN(l=+l)?r:t[Gd(n,l)]}return o.invertExtent=function(l){var u=t.indexOf(l);return u<0?[NaN,NaN]:[u>0?n[u-1]:e[0],u<n.length?n[u]:e[e.length-1]]},o.domain=function(l){if(!arguments.length)return e.slice();e=[];for(let u of l)u!=null&&!isNaN(u=+u)&&e.push(u);return e.sort(ns),i()},o.range=function(l){return arguments.length?(t=Array.from(l),i()):t.slice()},o.unknown=function(l){return arguments.length?(r=l,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return tU().domain(e).range(t).unknown(r)},pi.apply(o,arguments)}function nU(){var e=0,t=1,n=1,r=[.5],i=[0,1],o;function l(c){return c!=null&&c<=c?i[Gd(r,c,0,n)]:o}function u(){var c=-1;for(r=new Array(n);++c<n;)r[c]=((c+1)*t-(c-n)*e)/(n+1);return l}return l.domain=function(c){return arguments.length?([e,t]=c,e=+e,t=+t,u()):[e,t]},l.range=function(c){return arguments.length?(n=(i=Array.from(c)).length-1,u()):i.slice()},l.invertExtent=function(c){var d=i.indexOf(c);return d<0?[NaN,NaN]:d<1?[e,r[0]]:d>=n?[r[n-1],t]:[r[d-1],r[d]]},l.unknown=function(c){return arguments.length&&(o=c),l},l.thresholds=function(){return r.slice()},l.copy=function(){return nU().domain([e,t]).range(i).unknown(o)},pi.apply(ms(l),arguments)}function rU(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[Gd(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var l=t.indexOf(o);return[e[l-1],e[l]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return rU().domain(e).range(t).unknown(n)},pi.apply(i,arguments)}const bw=new Date,xw=new Date;function yn(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const l=i(o),u=i.ceil(o);return o-l<u-o?l:u},i.offset=(o,l)=>(t(o=new Date(+o),l==null?1:Math.floor(l)),o),i.range=(o,l,u)=>{const c=[];if(o=i.ceil(o),u=u==null?1:Math.floor(u),!(o<l)||!(u>0))return c;let d;do c.push(d=new Date(+o)),t(o,u),e(o);while(d<o&&o<l);return c},i.filter=o=>yn(l=>{if(l>=l)for(;e(l),!o(l);)l.setTime(l-1)},(l,u)=>{if(l>=l)if(u<0)for(;++u<=0;)for(;t(l,-1),!o(l););else for(;--u>=0;)for(;t(l,1),!o(l););}),n&&(i.count=(o,l)=>(bw.setTime(+o),xw.setTime(+l),e(bw),e(xw),Math.floor(n(bw,xw))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?l=>r(l)%o===0:l=>i.count(0,l)%o===0):i)),i}const yg=yn(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);yg.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?yn(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):yg);yg.range;const Ya=1e3,ci=Ya*60,Xa=ci*60,lo=Xa*24,WC=lo*7,Xk=lo*30,ww=lo*365,nl=yn(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Ya)},(e,t)=>(t-e)/Ya,e=>e.getUTCSeconds());nl.range;const YC=yn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ya)},(e,t)=>{e.setTime(+e+t*ci)},(e,t)=>(t-e)/ci,e=>e.getMinutes());YC.range;const XC=yn(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*ci)},(e,t)=>(t-e)/ci,e=>e.getUTCMinutes());XC.range;const ZC=yn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ya-e.getMinutes()*ci)},(e,t)=>{e.setTime(+e+t*Xa)},(e,t)=>(t-e)/Xa,e=>e.getHours());ZC.range;const QC=yn(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Xa)},(e,t)=>(t-e)/Xa,e=>e.getUTCHours());QC.range;const Xd=yn(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*ci)/lo,e=>e.getDate()-1);Xd.range;const Fv=yn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/lo,e=>e.getUTCDate()-1);Fv.range;const iU=yn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/lo,e=>Math.floor(e/lo));iU.range;function Ol(e){return yn(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*ci)/WC)}const qv=Ol(0),bg=Ol(1),Fhe=Ol(2),qhe=Ol(3),Qu=Ol(4),Hhe=Ol(5),Khe=Ol(6);qv.range;bg.range;Fhe.range;qhe.range;Qu.range;Hhe.range;Khe.range;function Pl(e){return yn(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/WC)}const Hv=Pl(0),xg=Pl(1),Ghe=Pl(2),Whe=Pl(3),Ju=Pl(4),Yhe=Pl(5),Xhe=Pl(6);Hv.range;xg.range;Ghe.range;Whe.range;Ju.range;Yhe.range;Xhe.range;const JC=yn(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());JC.range;const eE=yn(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());eE.range;const uo=yn(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());uo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:yn(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});uo.range;const co=yn(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());co.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:yn(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});co.range;function aU(e,t,n,r,i,o){const l=[[nl,1,Ya],[nl,5,5*Ya],[nl,15,15*Ya],[nl,30,30*Ya],[o,1,ci],[o,5,5*ci],[o,15,15*ci],[o,30,30*ci],[i,1,Xa],[i,3,3*Xa],[i,6,6*Xa],[i,12,12*Xa],[r,1,lo],[r,2,2*lo],[n,1,WC],[t,1,Xk],[t,3,3*Xk],[e,1,ww]];function u(d,m,h){const y=m<d;y&&([d,m]=[m,d]);const b=h&&typeof h.range=="function"?h:c(d,m,h),w=b?b.range(d,+m+1):[];return y?w.reverse():w}function c(d,m,h){const y=Math.abs(m-d)/h,b=kC(([,,C])=>C).right(l,y);if(b===l.length)return e.every(pS(d/ww,m/ww,h));if(b===0)return yg.every(Math.max(pS(d,m,h),1));const[w,S]=l[y/l[b-1][2]<l[b][2]/y?b-1:b];return w.every(S)}return[u,c]}const[Zhe,Qhe]=aU(co,eE,Hv,iU,QC,XC),[Jhe,eme]=aU(uo,JC,qv,Xd,ZC,YC);function Sw(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Aw(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Pf(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function tme(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,l=e.shortDays,u=e.months,c=e.shortMonths,d=Nf(i),m=_f(i),h=Nf(o),y=_f(o),b=Nf(l),w=_f(l),S=Nf(u),C=_f(u),E=Nf(c),j=_f(c),T={a:q,A:B,b:ae,B:G,c:null,d:n2,e:n2,f:Cme,g:Dme,G:Lme,H:wme,I:Sme,j:Ame,L:oU,m:Eme,M:jme,p:D,q:V,Q:a2,s:o2,S:Tme,u:Ome,U:Pme,V:Nme,w:_me,W:Mme,x:null,X:null,y:Rme,Y:kme,Z:Ime,"%":i2},O={a:K,A:ee,b:he,B:ye,c:null,d:r2,e:r2,f:Ume,g:Zme,G:Jme,H:zme,I:$me,j:Bme,L:lU,m:Vme,M:Fme,p:X,q:me,Q:a2,s:o2,S:qme,u:Hme,U:Kme,V:Gme,w:Wme,W:Yme,x:null,X:null,y:Xme,Y:Qme,Z:epe,"%":i2},N={a:$,A:F,b:z,B:Y,c:Q,d:e2,e:e2,f:vme,g:Jk,G:Qk,H:t2,I:t2,j:hme,L:gme,m:dme,M:mme,p:I,q:fme,Q:bme,s:xme,S:pme,u:ome,U:sme,V:lme,w:ame,W:ume,x:se,X:L,y:Jk,Y:Qk,Z:cme,"%":yme};T.x=_(n,T),T.X=_(r,T),T.c=_(t,T),O.x=_(n,O),O.X=_(r,O),O.c=_(t,O);function _(oe,le){return function(ve){var re=[],ze=-1,Ee=0,Le=oe.length,ot,Dt,Hr;for(ve instanceof Date||(ve=new Date(+ve));++ze<Le;)oe.charCodeAt(ze)===37&&(re.push(oe.slice(Ee,ze)),(Dt=Zk[ot=oe.charAt(++ze)])!=null?ot=oe.charAt(++ze):Dt=ot==="e"?" ":"0",(Hr=le[ot])&&(ot=Hr(ve,Dt)),re.push(ot),Ee=ze+1);return re.push(oe.slice(Ee,ze)),re.join("")}}function M(oe,le){return function(ve){var re=Pf(1900,void 0,1),ze=R(re,oe,ve+="",0),Ee,Le;if(ze!=ve.length)return null;if("Q"in re)return new Date(re.Q);if("s"in re)return new Date(re.s*1e3+("L"in re?re.L:0));if(le&&!("Z"in re)&&(re.Z=0),"p"in re&&(re.H=re.H%12+re.p*12),re.m===void 0&&(re.m="q"in re?re.q:0),"V"in re){if(re.V<1||re.V>53)return null;"w"in re||(re.w=1),"Z"in re?(Ee=Aw(Pf(re.y,0,1)),Le=Ee.getUTCDay(),Ee=Le>4||Le===0?xg.ceil(Ee):xg(Ee),Ee=Fv.offset(Ee,(re.V-1)*7),re.y=Ee.getUTCFullYear(),re.m=Ee.getUTCMonth(),re.d=Ee.getUTCDate()+(re.w+6)%7):(Ee=Sw(Pf(re.y,0,1)),Le=Ee.getDay(),Ee=Le>4||Le===0?bg.ceil(Ee):bg(Ee),Ee=Xd.offset(Ee,(re.V-1)*7),re.y=Ee.getFullYear(),re.m=Ee.getMonth(),re.d=Ee.getDate()+(re.w+6)%7)}else("W"in re||"U"in re)&&("w"in re||(re.w="u"in re?re.u%7:"W"in re?1:0),Le="Z"in re?Aw(Pf(re.y,0,1)).getUTCDay():Sw(Pf(re.y,0,1)).getDay(),re.m=0,re.d="W"in re?(re.w+6)%7+re.W*7-(Le+5)%7:re.w+re.U*7-(Le+6)%7);return"Z"in re?(re.H+=re.Z/100|0,re.M+=re.Z%100,Aw(re)):Sw(re)}}function R(oe,le,ve,re){for(var ze=0,Ee=le.length,Le=ve.length,ot,Dt;ze<Ee;){if(re>=Le)return-1;if(ot=le.charCodeAt(ze++),ot===37){if(ot=le.charAt(ze++),Dt=N[ot in Zk?le.charAt(ze++):ot],!Dt||(re=Dt(oe,ve,re))<0)return-1}else if(ot!=ve.charCodeAt(re++))return-1}return re}function I(oe,le,ve){var re=d.exec(le.slice(ve));return re?(oe.p=m.get(re[0].toLowerCase()),ve+re[0].length):-1}function $(oe,le,ve){var re=b.exec(le.slice(ve));return re?(oe.w=w.get(re[0].toLowerCase()),ve+re[0].length):-1}function F(oe,le,ve){var re=h.exec(le.slice(ve));return re?(oe.w=y.get(re[0].toLowerCase()),ve+re[0].length):-1}function z(oe,le,ve){var re=E.exec(le.slice(ve));return re?(oe.m=j.get(re[0].toLowerCase()),ve+re[0].length):-1}function Y(oe,le,ve){var re=S.exec(le.slice(ve));return re?(oe.m=C.get(re[0].toLowerCase()),ve+re[0].length):-1}function Q(oe,le,ve){return R(oe,t,le,ve)}function se(oe,le,ve){return R(oe,n,le,ve)}function L(oe,le,ve){return R(oe,r,le,ve)}function q(oe){return l[oe.getDay()]}function B(oe){return o[oe.getDay()]}function ae(oe){return c[oe.getMonth()]}function G(oe){return u[oe.getMonth()]}function D(oe){return i[+(oe.getHours()>=12)]}function V(oe){return 1+~~(oe.getMonth()/3)}function K(oe){return l[oe.getUTCDay()]}function ee(oe){return o[oe.getUTCDay()]}function he(oe){return c[oe.getUTCMonth()]}function ye(oe){return u[oe.getUTCMonth()]}function X(oe){return i[+(oe.getUTCHours()>=12)]}function me(oe){return 1+~~(oe.getUTCMonth()/3)}return{format:function(oe){var le=_(oe+="",T);return le.toString=function(){return oe},le},parse:function(oe){var le=M(oe+="",!1);return le.toString=function(){return oe},le},utcFormat:function(oe){var le=_(oe+="",O);return le.toString=function(){return oe},le},utcParse:function(oe){var le=M(oe+="",!0);return le.toString=function(){return oe},le}}}var Zk={"-":"",_:" ",0:"0"},Cn=/^\s*\d+/,nme=/^%/,rme=/[\\^$*+?|[\]().{}]/g;function rt(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function ime(e){return e.replace(rme,"\\$&")}function Nf(e){return new RegExp("^(?:"+e.map(ime).join("|")+")","i")}function _f(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function ame(e,t,n){var r=Cn.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function ome(e,t,n){var r=Cn.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function sme(e,t,n){var r=Cn.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function lme(e,t,n){var r=Cn.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function ume(e,t,n){var r=Cn.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Qk(e,t,n){var r=Cn.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Jk(e,t,n){var r=Cn.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function cme(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function fme(e,t,n){var r=Cn.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function dme(e,t,n){var r=Cn.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function e2(e,t,n){var r=Cn.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function hme(e,t,n){var r=Cn.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function t2(e,t,n){var r=Cn.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function mme(e,t,n){var r=Cn.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function pme(e,t,n){var r=Cn.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function gme(e,t,n){var r=Cn.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function vme(e,t,n){var r=Cn.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function yme(e,t,n){var r=nme.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function bme(e,t,n){var r=Cn.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function xme(e,t,n){var r=Cn.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function n2(e,t){return rt(e.getDate(),t,2)}function wme(e,t){return rt(e.getHours(),t,2)}function Sme(e,t){return rt(e.getHours()%12||12,t,2)}function Ame(e,t){return rt(1+Xd.count(uo(e),e),t,3)}function oU(e,t){return rt(e.getMilliseconds(),t,3)}function Cme(e,t){return oU(e,t)+"000"}function Eme(e,t){return rt(e.getMonth()+1,t,2)}function jme(e,t){return rt(e.getMinutes(),t,2)}function Tme(e,t){return rt(e.getSeconds(),t,2)}function Ome(e){var t=e.getDay();return t===0?7:t}function Pme(e,t){return rt(qv.count(uo(e)-1,e),t,2)}function sU(e){var t=e.getDay();return t>=4||t===0?Qu(e):Qu.ceil(e)}function Nme(e,t){return e=sU(e),rt(Qu.count(uo(e),e)+(uo(e).getDay()===4),t,2)}function _me(e){return e.getDay()}function Mme(e,t){return rt(bg.count(uo(e)-1,e),t,2)}function Rme(e,t){return rt(e.getFullYear()%100,t,2)}function Dme(e,t){return e=sU(e),rt(e.getFullYear()%100,t,2)}function kme(e,t){return rt(e.getFullYear()%1e4,t,4)}function Lme(e,t){var n=e.getDay();return e=n>=4||n===0?Qu(e):Qu.ceil(e),rt(e.getFullYear()%1e4,t,4)}function Ime(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+rt(t/60|0,"0",2)+rt(t%60,"0",2)}function r2(e,t){return rt(e.getUTCDate(),t,2)}function zme(e,t){return rt(e.getUTCHours(),t,2)}function $me(e,t){return rt(e.getUTCHours()%12||12,t,2)}function Bme(e,t){return rt(1+Fv.count(co(e),e),t,3)}function lU(e,t){return rt(e.getUTCMilliseconds(),t,3)}function Ume(e,t){return lU(e,t)+"000"}function Vme(e,t){return rt(e.getUTCMonth()+1,t,2)}function Fme(e,t){return rt(e.getUTCMinutes(),t,2)}function qme(e,t){return rt(e.getUTCSeconds(),t,2)}function Hme(e){var t=e.getUTCDay();return t===0?7:t}function Kme(e,t){return rt(Hv.count(co(e)-1,e),t,2)}function uU(e){var t=e.getUTCDay();return t>=4||t===0?Ju(e):Ju.ceil(e)}function Gme(e,t){return e=uU(e),rt(Ju.count(co(e),e)+(co(e).getUTCDay()===4),t,2)}function Wme(e){return e.getUTCDay()}function Yme(e,t){return rt(xg.count(co(e)-1,e),t,2)}function Xme(e,t){return rt(e.getUTCFullYear()%100,t,2)}function Zme(e,t){return e=uU(e),rt(e.getUTCFullYear()%100,t,2)}function Qme(e,t){return rt(e.getUTCFullYear()%1e4,t,4)}function Jme(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Ju(e):Ju.ceil(e),rt(e.getUTCFullYear()%1e4,t,4)}function epe(){return"+0000"}function i2(){return"%"}function a2(e){return+e}function o2(e){return Math.floor(+e/1e3)}var bu,cU,fU;tpe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function tpe(e){return bu=tme(e),cU=bu.format,bu.parse,fU=bu.utcFormat,bu.utcParse,bu}function npe(e){return new Date(e)}function rpe(e){return e instanceof Date?+e:+new Date(+e)}function tE(e,t,n,r,i,o,l,u,c,d){var m=UC(),h=m.invert,y=m.domain,b=d(".%L"),w=d(":%S"),S=d("%I:%M"),C=d("%I %p"),E=d("%a %d"),j=d("%b %d"),T=d("%B"),O=d("%Y");function N(_){return(c(_)<_?b:u(_)<_?w:l(_)<_?S:o(_)<_?C:r(_)<_?i(_)<_?E:j:n(_)<_?T:O)(_)}return m.invert=function(_){return new Date(h(_))},m.domain=function(_){return arguments.length?y(Array.from(_,rpe)):y().map(npe)},m.ticks=function(_){var M=y();return e(M[0],M[M.length-1],_??10)},m.tickFormat=function(_,M){return M==null?N:d(M)},m.nice=function(_){var M=y();return(!_||typeof _.range!="function")&&(_=t(M[0],M[M.length-1],_??10)),_?y(ZB(M,_)):m},m.copy=function(){return Yd(m,tE(e,t,n,r,i,o,l,u,c,d))},m}function ipe(){return pi.apply(tE(Jhe,eme,uo,JC,qv,Xd,ZC,YC,nl,cU).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function ape(){return pi.apply(tE(Zhe,Qhe,co,eE,Hv,Fv,QC,XC,nl,fU).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Kv(){var e=0,t=1,n,r,i,o,l=rr,u=!1,c;function d(h){return h==null||isNaN(h=+h)?c:l(i===0?.5:(h=(o(h)-n)*i,u?Math.max(0,Math.min(1,h)):h))}d.domain=function(h){return arguments.length?([e,t]=h,n=o(e=+e),r=o(t=+t),i=n===r?0:1/(r-n),d):[e,t]},d.clamp=function(h){return arguments.length?(u=!!h,d):u},d.interpolator=function(h){return arguments.length?(l=h,d):l};function m(h){return function(y){var b,w;return arguments.length?([b,w]=y,l=h(b,w),d):[l(0),l(1)]}}return d.range=m(yc),d.rangeRound=m(BC),d.unknown=function(h){return arguments.length?(c=h,d):c},function(h){return o=h,n=h(e),r=h(t),i=n===r?0:1/(r-n),d}}function ps(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function dU(){var e=ms(Kv()(rr));return e.copy=function(){return ps(e,dU())},mo.apply(e,arguments)}function hU(){var e=qC(Kv()).domain([1,10]);return e.copy=function(){return ps(e,hU()).base(e.base())},mo.apply(e,arguments)}function mU(){var e=HC(Kv());return e.copy=function(){return ps(e,mU()).constant(e.constant())},mo.apply(e,arguments)}function nE(){var e=KC(Kv());return e.copy=function(){return ps(e,nE()).exponent(e.exponent())},mo.apply(e,arguments)}function ope(){return nE.apply(null,arguments).exponent(.5)}function pU(){var e=[],t=rr;function n(r){if(r!=null&&!isNaN(r=+r))return t((Gd(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let i of r)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(ns),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,i)=>t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>Hde(e,o/r))},n.copy=function(){return pU(t).domain(e)},mo.apply(n,arguments)}function Gv(){var e=0,t=.5,n=1,r=1,i,o,l,u,c,d=rr,m,h=!1,y;function b(S){return isNaN(S=+S)?y:(S=.5+((S=+m(S))-o)*(r*S<r*o?u:c),d(h?Math.max(0,Math.min(1,S)):S))}b.domain=function(S){return arguments.length?([e,t,n]=S,i=m(e=+e),o=m(t=+t),l=m(n=+n),u=i===o?0:.5/(o-i),c=o===l?0:.5/(l-o),r=o<i?-1:1,b):[e,t,n]},b.clamp=function(S){return arguments.length?(h=!!S,b):h},b.interpolator=function(S){return arguments.length?(d=S,b):d};function w(S){return function(C){var E,j,T;return arguments.length?([E,j,T]=C,d=yhe(S,[E,j,T]),b):[d(0),d(.5),d(1)]}}return b.range=w(yc),b.rangeRound=w(BC),b.unknown=function(S){return arguments.length?(y=S,b):y},function(S){return m=S,i=S(e),o=S(t),l=S(n),u=i===o?0:.5/(o-i),c=o===l?0:.5/(l-o),r=o<i?-1:1,b}}function gU(){var e=ms(Gv()(rr));return e.copy=function(){return ps(e,gU())},mo.apply(e,arguments)}function vU(){var e=qC(Gv()).domain([.1,1,10]);return e.copy=function(){return ps(e,vU()).base(e.base())},mo.apply(e,arguments)}function yU(){var e=HC(Gv());return e.copy=function(){return ps(e,yU()).constant(e.constant())},mo.apply(e,arguments)}function rE(){var e=KC(Gv());return e.copy=function(){return ps(e,rE()).exponent(e.exponent())},mo.apply(e,arguments)}function spe(){return rE.apply(null,arguments).exponent(.5)}const bU=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:IC,scaleDiverging:gU,scaleDivergingLog:vU,scaleDivergingPow:rE,scaleDivergingSqrt:spe,scaleDivergingSymlog:yU,scaleIdentity:XB,scaleImplicit:gS,scaleLinear:YB,scaleLog:QB,scaleOrdinal:LC,scalePoint:Wde,scalePow:GC,scaleQuantile:tU,scaleQuantize:nU,scaleRadial:eU,scaleSequential:dU,scaleSequentialLog:hU,scaleSequentialPow:nE,scaleSequentialQuantile:pU,scaleSequentialSqrt:ope,scaleSequentialSymlog:mU,scaleSqrt:Uhe,scaleSymlog:JB,scaleThreshold:rU,scaleTime:ipe,scaleUtc:ape,tickFormat:WB},Symbol.toStringTag,{value:"Module"}));function lpe(e){var t=bU;if(e in t&&typeof t[e]=="function")return t[e]();var n="scale".concat($d(e));if(n in t&&typeof t[n]=="function")return t[n]()}function s2(e,t,n){if(typeof e=="function")return e.copy().domain(t).range(n);if(e!=null){var r=lpe(e);if(r!=null)return r.domain(t).range(n),r}}function iE(e,t,n,r){if(!(n==null||r==null))return typeof e.scale=="function"?s2(e.scale,n,r):s2(t,n,r)}function upe(e){return"scale".concat($d(e))}function cpe(e){return upe(e)in bU}var xU=(e,t,n)=>{if(e!=null){var{scale:r,type:i}=e;if(r==="auto")return i==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!t)?"point":i==="category"?"band":"linear";if(typeof r=="string")return cpe(r)?r:"point"}};function fpe(e,t){for(var n=0,r=e.length,i=e[0]<e[e.length-1];n<r;){var o=Math.floor((n+r)/2);(i?e[o]<t:e[o]>t)?n=o+1:r=o}return n}function wU(e,t){if(e){var n=t??e.domain(),r=n.map(o=>{var l;return(l=e(o))!==null&&l!==void 0?l:0}),i=e.range();if(!(n.length===0||i.length<2))return o=>{var l,u,c=fpe(r,o);if(c<=0)return n[0];if(c>=n.length)return n[n.length-1];var d=(l=r[c-1])!==null&&l!==void 0?l:0,m=(u=r[c])!==null&&u!==void 0?u:0;return Math.abs(o-d)<=Math.abs(o-m)?n[c-1]:n[c]}}}function dpe(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):wU(e,void 0)}function l2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function wg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?l2(Object(n),!0).forEach(function(r){hpe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hpe(e,t,n){return(t=mpe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mpe(e){var t=ppe(e,"string");return typeof t=="symbol"?t:t+""}function ppe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var xS=[0,"auto"],dn={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0,niceTicks:"auto"},SU=(e,t)=>e.cartesianAxis.xAxis[t],po=(e,t)=>{var n=SU(e,t);return n??dn},hn={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:xS,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,niceTicks:"auto",width:Vd},AU=(e,t)=>e.cartesianAxis.yAxis[t],go=(e,t)=>{var n=AU(e,t);return n??hn},gpe={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},aE=(e,t)=>{var n=e.cartesianAxis.zAxis[t];return n??gpe},sr=(e,t,n)=>{switch(t){case"xAxis":return po(e,n);case"yAxis":return go(e,n);case"zAxis":return aE(e,n);case"angleAxis":return PC(e,n);case"radiusAxis":return NC(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},vpe=(e,t,n)=>{switch(t){case"xAxis":return po(e,n);case"yAxis":return go(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},Zd=(e,t,n)=>{switch(t){case"xAxis":return po(e,n);case"yAxis":return go(e,n);case"angleAxis":return PC(e,n);case"radiusAxis":return NC(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},CU=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function EU(e,t){return n=>{switch(e){case"xAxis":return"xAxisId"in n&&n.xAxisId===t;case"yAxis":return"yAxisId"in n&&n.yAxisId===t;case"zAxis":return"zAxisId"in n&&n.zAxisId===t;case"angleAxis":return"angleAxisId"in n&&n.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in n&&n.radiusAxisId===t;default:return!1}}}var oE=e=>e.graphicalItems.cartesianItems,ype=te([Sn,$v],EU),jU=(e,t,n)=>e.filter(n).filter(r=>t?.includeHidden===!0?!0:!r.hide),bc=te([oE,sr,ype],jU,{memoizeOptions:{resultEqualityCheck:Uv}}),TU=te([bc],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(RC)),OU=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),bpe=te([bc],OU),PU=e=>e.map(t=>t.data).filter(Boolean).flat(1),xpe=te([bc],e=>e.some(t=>!t.data)),NU=te([bc],PU,{memoizeOptions:{resultEqualityCheck:Uv}}),_U=(e,t)=>{var{chartData:n=[],dataStartIndex:r,dataEndIndex:i}=t;return e.length>0?e:n.slice(r,i+1)},sE=te([NU,Kd],_U),wpe=(e,t,n)=>t?.dataKey!=null?e.map(r=>({value:sn(r,t.dataKey)})):n.length>0?n.map(r=>r.dataKey).flatMap(r=>e.map(i=>({value:sn(i,r)}))):e.map(r=>({value:r})),MU=(e,t,n,r,i,o)=>{var{chartData:l=[],dataStartIndex:u,dataEndIndex:c}=r,d=wpe(e,t,n);if(i&&t?.dataKey!=null&&o.length>0){var m=l.slice(u,c+1),h=m.map(y=>({value:sn(y,t.dataKey)})).filter(y=>y.value!=null);return[...h,...d]}return d},Qd=te([sE,sr,bc,Kd,xpe,NU],MU);function $u(e){if(ma(e)||e instanceof Date){var t=Number(e);if(nt(t))return t}}function u2(e){if(Array.isArray(e)){var t=[$u(e[0]),$u(e[1])];return ca(t)?t:void 0}var n=$u(e);if(n!=null)return[n,n]}function ga(e){return e.map($u).filter(na)}function Spe(e,t){var n=$u(e),r=$u(t);return n==null&&r==null?0:n==null?-1:r==null?1:n-r}var Ape=te([Qd],e=>e?.map(t=>t.value).sort(Spe));function RU(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function Cpe(e,t,n){if(!n)return[];if(!n.length)return[];var r;if(typeof t=="number"&&!ha(t))r=t;else if(Array.isArray(t)){var i=ga(t);i.length>0&&(r=Math.max(...i))}return r==null?[]:ga(n.flatMap(o=>{var l=sn(e,o.dataKey),u,c;if(Array.isArray(l)?[u,c]=l:u=c=l,!(!nt(u)||!nt(c)))return[r-u,r+c]}))}var bn=e=>{var t=An(e),n=vc(e);return Zd(e,t,n)},ec=te([bn],e=>e?.dataKey),Epe=te([TU,Kd,bn],$B),DU=(e,t,n,r)=>{var i={},o=t.reduce((l,u)=>{if(u.stackId==null)return l;var c=l[u.stackId];return c==null&&(c=[]),c.push(u),l[u.stackId]=c,l},i);return Object.fromEntries(Object.entries(o).map(l=>{var[u,c]=l,d=r?[...c].reverse():c,m=d.map(MC);return[u,{stackedData:oue(e,m,n),graphicalItems:d}]}))},kU=te([Epe,TU,kv,MB],DU),LU=(e,t,n,r)=>{var{dataStartIndex:i,dataEndIndex:o}=t;if(r==null&&n!=="zAxis"){var l=cue(e,i,o);if(!(l!=null&&l[0]===0&&l[1]===0))return l}},jpe=te([sr],e=>e.allowDataOverflow),lE=e=>{var t;if(e==null||!("domain"in e))return xS;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var n=ga(e.ticks);return[Math.min(...n),Math.max(...n)]}if(e.type==="category")return e.ticks.map(String)}return(t=e?.domain)!==null&&t!==void 0?t:xS},IU=te([sr],lE),zU=te([IU,jpe],wB),Tpe=te([kU,zi,Sn,zU],LU,{memoizeOptions:{resultEqualityCheck:Bv}}),uE=e=>e.errorBars,Ope=(e,t,n)=>e.flatMap(r=>t[r.id]).filter(Boolean).filter(r=>RU(n,r)),Sg=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n.filter(Boolean);if(i.length!==0){var o=i.flat(),l=Math.min(...o),u=Math.max(...o);return[l,u]}},$U=function(t,n,r,i,o){var l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],u,c;if(r.length>0&&r.forEach(d=>{var m,h=d.data!=null?[...d.data]:l,y=(m=i[d.id])===null||m===void 0?void 0:m.filter(b=>RU(o,b));h.forEach(b=>{var w,S=sn(b,(w=n.dataKey)!==null&&w!==void 0?w:d.dataKey),C=Cpe(b,S,y);if(C.length>=2){var E=Math.min(...C),j=Math.max(...C);(u==null||E<u)&&(u=E),(c==null||j>c)&&(c=j)}var T=u2(S);T!=null&&(u=u==null?T[0]:Math.min(u,T[0]),c=c==null?T[1]:Math.max(c,T[1]))})}),n?.dataKey!=null&&r.length===0&&t.forEach(d=>{var m=u2(sn(d,n.dataKey));m!=null&&(u=u==null?m[0]:Math.min(u,m[0]),c=c==null?m[1]:Math.max(c,m[1]))}),nt(u)&&nt(c))return[u,c]},Ppe=te([sE,sr,bpe,uE,Sn,vde],$U,{memoizeOptions:{resultEqualityCheck:Bv}});function Npe(e){var{value:t}=e;if(ma(t)||t instanceof Date)return t}var _pe=(e,t,n)=>{var r=e.map(Npe).filter(i=>i!=null);return n&&(t.dataKey==null||t.allowDuplicatedCategory&&X4(r))?xB(0,e.length):t.allowDuplicatedCategory?r:Array.from(new Set(r))},BU=e=>e.referenceElements.dots,xc=(e,t,n)=>e.filter(r=>r.ifOverflow==="extendDomain").filter(r=>t==="xAxis"?r.xAxisId===n:r.yAxisId===n),Mpe=te([BU,Sn,$v],xc),UU=e=>e.referenceElements.areas,Rpe=te([UU,Sn,$v],xc),VU=e=>e.referenceElements.lines,Dpe=te([VU,Sn,$v],xc),FU=(e,t)=>{if(e!=null){var n=ga(e.map(r=>t==="xAxis"?r.x:r.y));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},kpe=te(Mpe,Sn,FU),qU=(e,t)=>{if(e!=null){var n=ga(e.flatMap(r=>[t==="xAxis"?r.x1:r.y1,t==="xAxis"?r.x2:r.y2]));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},Lpe=te([Rpe,Sn],qU);function Ipe(e){var t;if(e.x!=null)return ga([e.x]);var n=(t=e.segment)===null||t===void 0?void 0:t.map(r=>r.x);return n==null||n.length===0?[]:ga(n)}function zpe(e){var t;if(e.y!=null)return ga([e.y]);var n=(t=e.segment)===null||t===void 0?void 0:t.map(r=>r.y);return n==null||n.length===0?[]:ga(n)}var HU=(e,t)=>{if(e!=null){var n=e.flatMap(r=>t==="xAxis"?Ipe(r):zpe(r));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},$pe=te([Dpe,Sn],HU),Bpe=te(kpe,$pe,Lpe,(e,t,n)=>Sg(e,n,t)),KU=(e,t,n,r,i,o,l,u)=>{if(n!=null)return n;var c=l==="vertical"&&u==="xAxis"||l==="horizontal"&&u==="yAxis",d=c?Sg(r,o,i):Sg(o,i);return bde(t,d,e.allowDataOverflow)},Upe=te([sr,IU,zU,Tpe,Ppe,Bpe,xt,Sn],KU,{memoizeOptions:{resultEqualityCheck:Bv}}),Vpe=[0,1],GU=(e,t,n,r,i,o,l)=>{if(!((e==null||n==null||n.length===0)&&l===void 0)){var{dataKey:u,type:c}=e,d=Ii(t,o);if(d&&u==null){var m;return xB(0,(m=n?.length)!==null&&m!==void 0?m:0)}return c==="category"?_pe(r,e,d):i==="expand"&&!d?Vpe:l}},cE=te([sr,xt,sE,Qd,kv,Sn,Upe],GU),wc=te([sr,CU,jC],xU),WU=(e,t,n)=>{var{niceTicks:r}=t;if(r!=="none"){var i=lE(t),o=Array.isArray(i)&&(i[0]==="auto"||i[1]==="auto");if((r==="snap125"||r==="adaptive")&&t!=null&&t.tickCount&&ca(e)){if(o)return bk(e,t.tickCount,t.allowDecimals,r);if(t.type==="number")return xk(e,t.tickCount,t.allowDecimals,r)}if(r==="auto"&&n==="linear"&&t!=null&&t.tickCount){if(o&&ca(e))return bk(e,t.tickCount,t.allowDecimals,"adaptive");if(t.type==="number"&&ca(e))return xk(e,t.tickCount,t.allowDecimals,"adaptive")}}},fE=te([cE,Zd,wc],WU),YU=(e,t,n,r)=>{if(r!=="angleAxis"&&e?.type==="number"&&ca(t)&&Array.isArray(n)&&n.length>0){var i,o,l=t[0],u=(i=n[0])!==null&&i!==void 0?i:0,c=t[1],d=(o=n[n.length-1])!==null&&o!==void 0?o:0;return[Math.min(l,u),Math.max(c,d)]}return t},Fpe=te([sr,cE,fE,Sn],YU),qpe=te(Qd,sr,(e,t)=>{if(!(!t||t.type!=="number")){var n=1/0,r=Array.from(ga(e.map(h=>h.value))).sort((h,y)=>h-y),i=r[0],o=r[r.length-1];if(i==null||o==null)return 1/0;var l=o-i;if(l===0)return 1/0;for(var u=0;u<r.length-1;u++){var c=r[u],d=r[u+1];if(!(c==null||d==null)){var m=d-c;n=Math.min(n,m)}}return n/l}}),XU=te(qpe,xt,Cde,Vn,(e,t,n,r,i)=>i,(e,t,n,r,i)=>{if(!nt(e))return 0;var o=t==="vertical"?r.height:r.width;if(i==="gap")return e*o/2;if(i==="no-gap"){var l=ls(n,e*o),u=e*o/2;return u-l-(u-l)/o*l}return 0}),Hpe=(e,t,n)=>{var r=po(e,t);return r==null||typeof r.padding!="string"?0:XU(e,"xAxis",t,n,r.padding)},Kpe=(e,t,n)=>{var r=go(e,t);return r==null||typeof r.padding!="string"?0:XU(e,"yAxis",t,n,r.padding)},Gpe=te(po,Hpe,(e,t)=>{var n,r;if(e==null)return{left:0,right:0};var{padding:i}=e;return typeof i=="string"?{left:t,right:t}:{left:((n=i.left)!==null&&n!==void 0?n:0)+t,right:((r=i.right)!==null&&r!==void 0?r:0)+t}}),Wpe=te(go,Kpe,(e,t)=>{var n,r;if(e==null)return{top:0,bottom:0};var{padding:i}=e;return typeof i=="string"?{top:t,bottom:t}:{top:((n=i.top)!==null&&n!==void 0?n:0)+t,bottom:((r=i.bottom)!==null&&r!==void 0?r:0)+t}}),Ype=te([Vn,Gpe,Ov,Tv,(e,t,n)=>n],(e,t,n,r,i)=>{var{padding:o}=r;return i?[o.left,n.width-o.right]:[e.left+t.left,e.left+e.width-t.right]}),Xpe=te([Vn,xt,Wpe,Ov,Tv,(e,t,n)=>n],(e,t,n,r,i,o)=>{var{padding:l}=i;return o?[r.height-l.bottom,l.top]:t==="horizontal"?[e.top+e.height-n.bottom,e.top+n.top]:[e.top+n.top,e.top+e.height-n.bottom]}),Jd=(e,t,n,r)=>{var i;switch(t){case"xAxis":return Ype(e,n,r);case"yAxis":return Xpe(e,n,r);case"zAxis":return(i=aE(e,n))===null||i===void 0?void 0:i.range;case"angleAxis":return LB(e);case"radiusAxis":return IB(e,n);default:return}},ZU=te([sr,Jd],Lv),Zpe=te([wc,Fpe],Rde),dE=te([sr,wc,Zpe,ZU],iE),QU=(e,t,n,r)=>{if(!(n==null||n.dataKey==null)){var{type:i,scale:o}=n,l=Ii(e,r);if(l&&(i==="number"||o!=="auto"))return t.map(u=>u.value)}},hE=te([xt,Qd,Zd,Sn],QU),Wv=te([dE],DC);te([dE],dpe);te([dE,Ape],wU);te([bc,uE,Sn],Ope);function JU(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var Yv=(e,t)=>t,Xv=(e,t,n)=>n,Qpe=te(Ev,Yv,Xv,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(JU)),Jpe=te(jv,Yv,Xv,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(JU)),e6=(e,t)=>({width:e.width,height:t.height}),ege=(e,t)=>{var n=typeof t.width=="number"?t.width:Vd;return{width:n,height:e.height}},tge=te(Vn,po,e6),nge=(e,t,n)=>{switch(t){case"top":return e.top;case"bottom":return n-e.bottom;default:return 0}},rge=(e,t,n)=>{switch(t){case"left":return e.left;case"right":return n-e.right;default:return 0}},ige=te(ho,Vn,Qpe,Yv,Xv,(e,t,n,r,i)=>{var o={},l;return n.forEach(u=>{var c=e6(t,u);l==null&&(l=nge(t,r,e));var d=r==="top"&&!i||r==="bottom"&&i;o[u.id]=l-Number(d)*c.height,l+=(d?-1:1)*c.height}),o}),age=te(fo,Vn,Jpe,Yv,Xv,(e,t,n,r,i)=>{var o={},l;return n.forEach(u=>{var c=ege(t,u);l==null&&(l=rge(t,r,e));var d=r==="left"&&!i||r==="right"&&i;o[u.id]=l-Number(d)*c.width,l+=(d?-1:1)*c.width}),o}),oge=(e,t)=>{var n=po(e,t);if(n!=null)return ige(e,n.orientation,n.mirror)},sge=te([Vn,po,oge,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var i=n?.[r];return i==null?{x:e.left,y:0}:{x:e.left,y:i}}}),lge=(e,t)=>{var n=go(e,t);if(n!=null)return age(e,n.orientation,n.mirror)},uge=te([Vn,go,lge,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var i=n?.[r];return i==null?{x:0,y:e.top}:{x:i,y:e.top}}}),cge=te(Vn,go,(e,t)=>{var n=typeof t.width=="number"?t.width:Vd;return{width:n,height:e.height}}),t6=(e,t,n,r)=>{if(n!=null){var{allowDuplicatedCategory:i,type:o,dataKey:l}=n,u=Ii(e,r),c=t.map(m=>m.value),d=c.filter(m=>m!=null);if(l&&u&&o==="category"&&i&&X4(d))return c}},mE=te([xt,Qd,sr,Sn],t6);te([xt,vpe,wc,Wv,mE,hE,Jd,fE,Sn],(e,t,n,r,i,o,l,u,c)=>{if(t!=null){var d=Ii(e,c);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:c,categoricalDomain:o,duplicateDomain:i,isCategorical:d,niceTicks:u,range:l,realScaleType:n,scale:r}}});var fge=(e,t,n,r,i,o,l,u,c)=>{if(!(t==null||r==null)){var d=Ii(e,c),{type:m,ticks:h,tickCount:y}=t,b=n==="scaleBand"&&typeof r.bandwidth=="function"?r.bandwidth()/2:2,w=m==="category"&&r.bandwidth?r.bandwidth()/b:0;w=c==="angleAxis"&&o!=null&&o.length>=2?Oi(o[0]-o[1])*2*w:w;var S=h||i;return S?S.map((C,E)=>{var j=l?l.indexOf(C):C,T=r.map(j);return nt(T)?{index:E,coordinate:T+w,value:C,offset:w}:null}).filter(na):d&&u?u.map((C,E)=>{var j=r.map(C);return nt(j)?{coordinate:j+w,value:C,index:E,offset:w}:null}).filter(na):r.ticks?r.ticks(y).map((C,E)=>{var j=r.map(C);return nt(j)?{coordinate:j+w,value:C,index:E,offset:w}:null}).filter(na):r.domain().map((C,E)=>{var j=r.map(C);return nt(j)?{coordinate:j+w,value:l?l[C]:C,index:E,offset:w}:null}).filter(na)}},n6=te([xt,Zd,wc,Wv,fE,Jd,mE,hE,Sn],fge),dge=(e,t,n,r,i,o,l)=>{if(!(t==null||n==null||r==null||r[0]===r[1])){var u=Ii(e,l),{tickCount:c}=t,d=0;return d=l==="angleAxis"&&r?.length>=2?Oi(r[0]-r[1])*2*d:d,u&&o?o.map((m,h)=>{var y=n.map(m);return nt(y)?{coordinate:y+d,value:m,index:h,offset:d}:null}).filter(na):n.ticks?n.ticks(c).map((m,h)=>{var y=n.map(m);return nt(y)?{coordinate:y+d,value:m,index:h,offset:d}:null}).filter(na):n.domain().map((m,h)=>{var y=n.map(m);return nt(y)?{coordinate:y+d,value:i?i[m]:m,index:h,offset:d}:null}).filter(na)}},Zv=te([xt,Zd,Wv,Jd,mE,hE,Sn],dge),Qv=te(sr,Wv,(e,t)=>{if(!(e==null||t==null))return wg(wg({},e),{},{scale:t})}),hge=te([sr,wc,cE,ZU],iE),mge=te([hge],DC);te((e,t,n)=>aE(e,n),mge,(e,t)=>{if(!(e==null||t==null))return wg(wg({},e),{},{scale:t})});var pge=te([xt,Ev,jv],(e,t,n)=>{switch(e){case"horizontal":return t.some(r=>r.reversed)?"right-to-left":"left-to-right";case"vertical":return n.some(r=>r.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),gge=(e,t,n)=>{var r;return(r=e.renderedTicks[t])===null||r===void 0?void 0:r[n]};te([gge],e=>{if(!(!e||e.length===0))return t=>{var n,r=1/0,i=e[0];for(var o of e){var l=Math.abs(o.coordinate-t);l<r&&(r=l,i=o)}return(n=i)===null||n===void 0?void 0:n.value}});var r6=e=>e.options.defaultTooltipEventType,i6=e=>e.options.validateTooltipEventTypes;function a6(e,t,n){if(e==null)return t;var r=e?"axis":"item";return n==null?t:n.includes(r)?r:t}function eh(e,t){var n=r6(e),r=i6(e);return a6(t,n,r)}function vge(e){return Me(t=>eh(t,e))}var o6=(e,t)=>{var n,r=Number(t);if(!(ha(r)||t==null))return r>=0?e==null||(n=e[r])===null||n===void 0?void 0:n.value:void 0},yge=e=>e.tooltip.settings,Jo={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},bge={itemInteraction:{click:Jo,hover:Jo},axisInteraction:{click:Jo,hover:Jo},keyboardInteraction:Jo,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},s6=Xn({name:"tooltip",initialState:bge,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:Et()},replaceTooltipEntrySettings:{reducer(e,t){var{prev:n,next:r}=t.payload,i=ui(e).tooltipItemPayloads.indexOf(n);i>-1&&(e.tooltipItemPayloads[i]=r)},prepare:Et()},removeTooltipEntrySettings:{reducer(e,t){var n=ui(e).tooltipItemPayloads.indexOf(t.payload);n>-1&&e.tooltipItemPayloads.splice(n,1)},prepare:Et()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate}}}),{addTooltipEntrySettings:xge,replaceTooltipEntrySettings:wge,removeTooltipEntrySettings:Sge,setTooltipSettingsState:Age,setActiveMouseOverItemIndex:Cge,mouseLeaveItem:ySe,mouseLeaveChart:l6,setActiveClickItemIndex:bSe,setMouseOverAxisIndex:u6,setMouseClickAxisIndex:Ege,setSyncInteraction:zf,setKeyboardInteraction:Ag}=s6.actions,jge=s6.reducer;function c2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Km(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?c2(Object(n),!0).forEach(function(r){Tge(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Tge(e,t,n){return(t=Oge(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Oge(e){var t=Pge(e,"string");return typeof t=="symbol"?t:t+""}function Pge(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Nge(e,t,n){return t==="axis"?n==="click"?e.axisInteraction.click:e.axisInteraction.hover:n==="click"?e.itemInteraction.click:e.itemInteraction.hover}function _ge(e){return e.index!=null}var c6=(e,t,n,r)=>{if(t==null)return Jo;var i=Nge(e,t,n);if(i==null)return Jo;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var o=e.settings.active===!0;if(_ge(i)){if(o)return Km(Km({},i),{},{active:!0})}else if(r!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:r,graphicalItemId:void 0};return Km(Km({},Jo),{},{coordinate:i.coordinate})};function Mge(e){if(typeof e=="number")return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var n=Number(e);return Number.isFinite(n)?n:void 0}function Rge(e,t){var n=Mge(e),r=t[0],i=t[1];if(n===void 0)return!1;var o=Math.min(r,i),l=Math.max(r,i);return n>=o&&n<=l}function Dge(e,t,n){if(n==null||t==null)return!0;var r=sn(e,t);return r==null||!ca(n)?!0:Rge(r,n)}var Yf=(e,t,n,r)=>{var i=e?.index;if(i==null)return null;var o=Number(i);if(!nt(o))return i;var l=0,u=1/0;t.length>0&&(u=t.length-1);var c=Math.max(l,Math.min(o,u)),d=t[c];return d==null||Dge(d,n,r)?String(c):null},f6=(e,t,n,r,i,o,l)=>{if(o!=null){var u=l[0],c=u?.getPosition(o);if(c!=null)return c;var d=i?.[Number(o)];if(d)return n==="horizontal"?{x:d.coordinate,y:(r.top+t)/2}:{x:(r.left+e)/2,y:d.coordinate}}},d6=(e,t,n,r)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var i;if(n==="hover"?i=e.itemInteraction.hover.graphicalItemId:i=e.itemInteraction.click.graphicalItemId,e.syncInteraction.active&&i==null)return e.tooltipItemPayloads;if(i==null&&(r!=null||e.keyboardInteraction.active)){var o=e.tooltipItemPayloads[0];return o!=null?[o]:[]}return e.tooltipItemPayloads.filter(l=>{var u;return((u=l.settings)===null||u===void 0?void 0:u.graphicalItemId)===i})},h6=e=>e.options.tooltipPayloadSearcher,Sc=e=>e.tooltip;function f2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function d2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?f2(Object(n),!0).forEach(function(r){kge(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kge(e,t,n){return(t=Lge(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lge(e){var t=Ige(e,"string");return typeof t=="symbol"?t:t+""}function Ige(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zge(e){if(typeof e=="string"||typeof e=="number")return e}function $ge(e){if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e}function Bge(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e=="function")return t=>e(t)}function h2(e){if(typeof e=="string")return e}function Uge(e){if(!(e==null||typeof e!="object")){var t="name"in e?zge(e.name):void 0,n="unit"in e?$ge(e.unit):void 0,r="dataKey"in e?Bge(e.dataKey):void 0,i="payload"in e?e.payload:void 0,o="color"in e?h2(e.color):void 0,l="fill"in e?h2(e.fill):void 0;return{name:t,unit:n,dataKey:r,payload:i,color:o,fill:l}}}function Vge(e,t){return e??t}var m6=(e,t,n,r,i,o,l)=>{if(!(t==null||o==null)){var{chartData:u,computedData:c,dataStartIndex:d,dataEndIndex:m}=n,h=[];return e.reduce((y,b)=>{var w,{dataDefinedOnItem:S,settings:C}=b,E=Vge(S,u),j=Array.isArray(E)?K$(E,d,m):E,T=(w=C?.dataKey)!==null&&w!==void 0?w:r,O=C?.nameKey,N;if(r&&Array.isArray(j)&&!Array.isArray(j[0])&&l==="axis"?N=Z4(j,r,i):N=o(j,t,c,O),Array.isArray(N))N.forEach(M=>{var R,I,$=Uge(M),F=$?.name,z=$?.dataKey,Y=$?.payload,Q=d2(d2({},C),{},{name:F,unit:$?.unit,color:(R=$?.color)!==null&&R!==void 0?R:C?.color,fill:(I=$?.fill)!==null&&I!==void 0?I:C?.fill});y.push(oD({tooltipEntrySettings:Q,dataKey:z,payload:Y,value:sn(Y,z),name:F==null?void 0:String(F)}))});else{var _;y.push(oD({tooltipEntrySettings:C,dataKey:T,payload:N,value:sn(N,T),name:(_=sn(N,O))!==null&&_!==void 0?_:C?.name}))}return y},h)}},pE=te([bn,CU,jC],xU),Fge=te([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),qge=te([An,vc],EU),Nl=te([Fge,bn,qge],jU,{memoizeOptions:{resultEqualityCheck:Uv}}),Hge=te([Nl],e=>e.filter(RC)),p6=te([Nl],PU,{memoizeOptions:{resultEqualityCheck:Uv}}),Kge=te([Nl],e=>e.some(t=>!t.data)),wl=te([p6,zi],_U),Gge=te([Hge,zi,bn],$B),gE=te([wl,bn,Nl,zi,Kge,p6],MU),g6=te([bn],lE),Wge=te([bn],e=>e.allowDataOverflow),v6=te([g6,Wge],wB),Yge=te([Nl],e=>e.filter(RC)),Xge=te([Gge,Yge,kv,MB],DU),Zge=te([Xge,zi,An,v6],LU),Qge=te([Nl],OU),Jge=te([wl,bn,Qge,uE,An,yde],$U,{memoizeOptions:{resultEqualityCheck:Bv}}),eve=te([BU,An,vc],xc),tve=te([eve,An],FU),nve=te([UU,An,vc],xc),rve=te([nve,An],qU),ive=te([VU,An,vc],xc),ave=te([ive,An],HU),ove=te([tve,ave,rve],Sg),sve=te([bn,g6,v6,Zge,Jge,ove,xt,An],KU),tc=te([bn,xt,wl,gE,kv,An,sve],GU),lve=te([tc,bn,pE],WU),uve=te([bn,tc,lve,An],YU),y6=e=>{var t=An(e),n=vc(e),r=!1;return Jd(e,t,n,r)},b6=te([bn,y6],Lv),cve=te([bn,pE,uve,b6],iE),x6=te([cve],DC),fve=te([xt,gE,bn,An],t6),dve=te([xt,gE,bn,An],QU),hve=(e,t,n,r,i,o,l,u)=>{if(t){var{type:c}=t,d=Ii(e,u);if(r){var m=n==="scaleBand"&&r.bandwidth?r.bandwidth()/2:2,h=c==="category"&&r.bandwidth?r.bandwidth()/m:0;return h=u==="angleAxis"&&i!=null&&i?.length>=2?Oi(i[0]-i[1])*2*h:h,d&&l?l.map((y,b)=>{var w=r.map(y);return nt(w)?{coordinate:w+h,value:y,index:b,offset:h}:null}).filter(na):r.domain().map((y,b)=>{var w=r.map(y);return nt(w)?{coordinate:w+h,value:o?o[y]:y,index:b,offset:h}:null}).filter(na)}}},vo=te([xt,bn,pE,x6,y6,fve,dve,An],hve),vE=te([r6,i6,yge],(e,t,n)=>a6(n.shared,e,t)),w6=e=>e.tooltip.settings.trigger,yE=e=>e.tooltip.settings.defaultIndex,th=te([Sc,vE,w6,yE],c6),Cd=te([th,wl,ec,tc],Yf),S6=te([vo,Cd],o6),mve=te([th],e=>{if(e)return e.dataKey}),pve=te([th],e=>{if(e)return e.graphicalItemId}),A6=te([Sc,vE,w6,yE],d6),gve=te([fo,ho,xt,Vn,vo,yE,A6],f6),vve=te([th,gve],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),yve=te([th],e=>{var t;return(t=e?.active)!==null&&t!==void 0?t:!1}),bve=te([A6,Cd,zi,ec,S6,h6,vE],m6),xve=te([bve],e=>{if(e!=null){var t=e.map(n=>n.payload).filter(n=>n!=null);return Array.from(new Set(t))}});function m2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function p2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?m2(Object(n),!0).forEach(function(r){wve(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wve(e,t,n){return(t=Sve(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sve(e){var t=Ave(e,"string");return typeof t=="symbol"?t:t+""}function Ave(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Cve=()=>Me(bn),Eve=()=>{var e=Cve(),t=Me(vo),n=Me(x6);return Wu(!e||!n?void 0:p2(p2({},e),{},{scale:n}),t)};function g2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function xu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?g2(Object(n),!0).forEach(function(r){jve(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jve(e,t,n){return(t=Tve(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tve(e){var t=Ove(e,"string");return typeof t=="symbol"?t:t+""}function Ove(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Pve=(e,t,n,r)=>{var i=t.find(o=>o&&o.index===n);if(i){if(e==="horizontal")return{x:i.coordinate,y:r.relativeY};if(e==="vertical")return{x:r.relativeX,y:i.coordinate}}return{x:0,y:0}},Nve=(e,t,n,r)=>{var i=t.find(d=>d&&d.index===n);if(i){if(e==="centric"){var o=i.coordinate,{radius:l}=r;return xu(xu(xu({},r),In(r.cx,r.cy,l,o)),{},{angle:o,radius:l})}var u=i.coordinate,{angle:c}=r;return xu(xu(xu({},r),In(r.cx,r.cy,u,c)),{},{angle:c,radius:u})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function _ve(e,t){var{relativeX:n,relativeY:r}=e;return n>=t.left&&n<=t.left+t.width&&r>=t.top&&r<=t.top+t.height}var C6=(e,t,n,r,i)=>{var o,l=(o=t?.length)!==null&&o!==void 0?o:0;if(l<=1||e==null)return 0;if(r==="angleAxis"&&i!=null&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var u=0;u<l;u++){var c,d,m,h,y,b=u>0?(c=n[u-1])===null||c===void 0?void 0:c.coordinate:(d=n[l-1])===null||d===void 0?void 0:d.coordinate,w=(m=n[u])===null||m===void 0?void 0:m.coordinate,S=u>=l-1?(h=n[0])===null||h===void 0?void 0:h.coordinate:(y=n[u+1])===null||y===void 0?void 0:y.coordinate,C=void 0;if(!(b==null||w==null||S==null))if(Oi(w-b)!==Oi(S-w)){var E=[];if(Oi(S-w)===Oi(i[1]-i[0])){C=S;var j=w+i[1]-i[0];E[0]=Math.min(j,(j+b)/2),E[1]=Math.max(j,(j+b)/2)}else{C=b;var T=S+i[1]-i[0];E[0]=Math.min(w,(T+w)/2),E[1]=Math.max(w,(T+w)/2)}var O=[Math.min(w,(C+w)/2),Math.max(w,(C+w)/2)];if(e>O[0]&&e<=O[1]||e>=E[0]&&e<=E[1]){var N;return(N=n[u])===null||N===void 0?void 0:N.index}}else{var _=Math.min(b,S),M=Math.max(b,S);if(e>(_+w)/2&&e<=(M+w)/2){var R;return(R=n[u])===null||R===void 0?void 0:R.index}}}else if(t)for(var I=0;I<l;I++){var $=t[I];if($!=null){var F=t[I+1],z=t[I-1];if(I===0&&F!=null&&e<=($.coordinate+F.coordinate)/2||I===l-1&&z!=null&&e>($.coordinate+z.coordinate)/2||I>0&&I<l-1&&z!=null&&F!=null&&e>($.coordinate+z.coordinate)/2&&e<=($.coordinate+F.coordinate)/2)return $.index}}return-1},E6=()=>Me(jC),bE=(e,t)=>t,j6=(e,t,n)=>n,xE=(e,t,n,r)=>r,Mve=te(vo,e=>mv(e,t=>t.coordinate)),wE=te([Sc,bE,j6,xE],c6),SE=te([wE,wl,ec,tc],Yf),Rve=(e,t,n)=>{if(t!=null){var r=Sc(e);return t==="axis"?n==="hover"?r.axisInteraction.hover.dataKey:r.axisInteraction.click.dataKey:n==="hover"?r.itemInteraction.hover.dataKey:r.itemInteraction.click.dataKey}},T6=te([Sc,bE,j6,xE],d6),Cg=te([fo,ho,xt,Vn,vo,xE,T6],f6),Dve=te([wE,Cg],(e,t)=>{var n;return(n=e.coordinate)!==null&&n!==void 0?n:t}),O6=te([vo,SE],o6),kve=te([T6,SE,zi,ec,O6,h6,bE],m6),Lve=te([wE,SE],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),Ive=(e,t,n,r,i,o,l)=>{if(!(!e||!n||!r||!i)&&_ve(e,l)){var u=fue(e,t),c=C6(u,o,i,n,r),d=Pve(t,i,c,e);return{activeIndex:String(c),activeCoordinate:d}}},zve=(e,t,n,r,i,o,l)=>{if(!(!e||!r||!i||!o||!n)){var u=ode(e,n);if(u){var c=due(u,t),d=C6(c,l,o,r,i),m=Nve(t,o,d,u);return{activeIndex:String(d),activeCoordinate:m}}}},$ve=(e,t,n,r,i,o,l,u)=>{if(!(!e||!t||!r||!i||!o))return t==="horizontal"||t==="vertical"?Ive(e,t,r,i,o,l,u):zve(e,t,n,r,i,o,l)},Bve=te(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,n)=>n,(e,t,n)=>{if(t!=null){var r=e[t];if(r!=null)return n?r.panoramaElement:r.element}}),Uve=te(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(r=>parseInt(r,10)).concat(Object.values(nr)),n=Array.from(new Set(t));return n.sort((r,i)=>r-i)},{memoizeOptions:{resultEqualityCheck:Mde}});function v2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function y2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?v2(Object(n),!0).forEach(function(r){Vve(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Vve(e,t,n){return(t=Fve(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fve(e){var t=qve(e,"string");return typeof t=="symbol"?t:t+""}function qve(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Hve={},Kve={zIndexMap:Object.values(nr).reduce((e,t)=>y2(y2({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),Hve)},Gve=new Set(Object.values(nr));function Wve(e){return Gve.has(e)}var P6=Xn({name:"zIndex",initialState:Kve,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]?e.zIndexMap[n].consumers+=1:e.zIndexMap[n]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:Et()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]&&(e.zIndexMap[n].consumers-=1,e.zIndexMap[n].consumers<=0&&!Wve(n)&&delete e.zIndexMap[n])},prepare:Et()},registerZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:n,element:r,isPanorama:i}=t.payload;e.zIndexMap[n]?i?e.zIndexMap[n].panoramaElement=r:e.zIndexMap[n].element=r:e.zIndexMap[n]={consumers:0,element:i?void 0:r,panoramaElement:i?r:void 0}},prepare:Et()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]&&(t.payload.isPanorama?e.zIndexMap[n].panoramaElement=void 0:e.zIndexMap[n].element=void 0)},prepare:Et()}}}),{registerZIndexPortal:Yve,unregisterZIndexPortal:Cw,registerZIndexPortalElement:Xve,unregisterZIndexPortalElement:Zve}=P6.actions,Qve=P6.reducer;function yo(e){var{zIndex:t,children:n}=e,r=Kue(),i=r&&t!==void 0&&t!==0,o=or(),l=v.useRef(void 0),u=v.useRef(new Set),c=Vt(),d=Me(h=>Bve(h,t,o));if(v.useLayoutEffect(()=>{if(!i){var h=u.current;h.forEach(b=>{c(Cw({zIndex:b}))}),h.clear(),l.current=void 0;return}if(u.current.has(t)||(c(Yve({zIndex:t})),u.current.add(t)),d){l.current=d;var y=u.current;y.forEach(b=>{b!==t&&(c(Cw({zIndex:b})),y.delete(b))})}},[c,t,i,d]),v.useLayoutEffect(()=>{var h=u.current;return()=>{h.forEach(y=>{c(Cw({zIndex:y}))}),h.clear()}},[c]),!i)return n;var m=d??l.current;return m?cs.createPortal(n,m):null}function wS(){return wS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wS.apply(null,arguments)}function b2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Gm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?b2(Object(n),!0).forEach(function(r){Jve(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Jve(e,t,n){return(t=eye(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eye(e){var t=tye(e,"string");return typeof t=="symbol"?t:t+""}function tye(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nye(e){var{cursor:t,cursorComp:n,cursorProps:r}=e;return v.isValidElement(t)?v.cloneElement(t,r):v.createElement(n,r)}function rye(e){var t,{coordinate:n,payload:r,index:i,offset:o,tooltipAxisBandSize:l,layout:u,cursor:c,tooltipEventType:d,chartName:m}=e,h=n,y=r,b=i;if(!c||!h||m!=="ScatterChart"&&d!=="axis")return null;var w,S,C;if(m==="ScatterChart")w=h,S=xfe,C=nr.cursorLine;else if(m==="BarChart")w=wfe(u,h,o,l),S=gB,C=nr.cursorRectangle;else if(u==="radial"&&J4(h)){var{cx:E,cy:j,radius:T,startAngle:O,endAngle:N}=vB(h);w={cx:E,cy:j,startAngle:O,endAngle:N,innerRadius:T,outerRadius:T},S=bB,C=nr.cursorLine}else w={points:cde(u,h,o)},S=Wf,C=nr.cursorLine;var _=typeof c=="object"&&"className"in c?c.className:void 0,M=Gm(Gm(Gm(Gm({stroke:"#ccc",pointerEvents:"none"},o),w),uv(c)),{},{payload:y,payloadIndex:b,className:at("recharts-tooltip-cursor",_)});return v.createElement(yo,{zIndex:(t=e.zIndex)!==null&&t!==void 0?t:C},v.createElement(nye,{cursor:c,cursorComp:S,cursorProps:M}))}function iye(e){var t=Eve(),n=que(),r=Tl(),i=E6();return t==null||n==null||r==null||i==null?null:v.createElement(rye,wS({},e,{offset:n,layout:r,tooltipAxisBandSize:t,chartName:i}))}var N6=v.createContext(null),aye=()=>v.useContext(N6),Ew={exports:{}},x2;function oye(){return x2||(x2=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(c,d,m){this.fn=c,this.context=d,this.once=m||!1}function o(c,d,m,h,y){if(typeof m!="function")throw new TypeError("The listener must be a function");var b=new i(m,h||c,y),w=n?n+d:d;return c._events[w]?c._events[w].fn?c._events[w]=[c._events[w],b]:c._events[w].push(b):(c._events[w]=b,c._eventsCount++),c}function l(c,d){--c._eventsCount===0?c._events=new r:delete c._events[d]}function u(){this._events=new r,this._eventsCount=0}u.prototype.eventNames=function(){var d=[],m,h;if(this._eventsCount===0)return d;for(h in m=this._events)t.call(m,h)&&d.push(n?h.slice(1):h);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(m)):d},u.prototype.listeners=function(d){var m=n?n+d:d,h=this._events[m];if(!h)return[];if(h.fn)return[h.fn];for(var y=0,b=h.length,w=new Array(b);y<b;y++)w[y]=h[y].fn;return w},u.prototype.listenerCount=function(d){var m=n?n+d:d,h=this._events[m];return h?h.fn?1:h.length:0},u.prototype.emit=function(d,m,h,y,b,w){var S=n?n+d:d;if(!this._events[S])return!1;var C=this._events[S],E=arguments.length,j,T;if(C.fn){switch(C.once&&this.removeListener(d,C.fn,void 0,!0),E){case 1:return C.fn.call(C.context),!0;case 2:return C.fn.call(C.context,m),!0;case 3:return C.fn.call(C.context,m,h),!0;case 4:return C.fn.call(C.context,m,h,y),!0;case 5:return C.fn.call(C.context,m,h,y,b),!0;case 6:return C.fn.call(C.context,m,h,y,b,w),!0}for(T=1,j=new Array(E-1);T<E;T++)j[T-1]=arguments[T];C.fn.apply(C.context,j)}else{var O=C.length,N;for(T=0;T<O;T++)switch(C[T].once&&this.removeListener(d,C[T].fn,void 0,!0),E){case 1:C[T].fn.call(C[T].context);break;case 2:C[T].fn.call(C[T].context,m);break;case 3:C[T].fn.call(C[T].context,m,h);break;case 4:C[T].fn.call(C[T].context,m,h,y);break;default:if(!j)for(N=1,j=new Array(E-1);N<E;N++)j[N-1]=arguments[N];C[T].fn.apply(C[T].context,j)}}return!0},u.prototype.on=function(d,m,h){return o(this,d,m,h,!1)},u.prototype.once=function(d,m,h){return o(this,d,m,h,!0)},u.prototype.removeListener=function(d,m,h,y){var b=n?n+d:d;if(!this._events[b])return this;if(!m)return l(this,b),this;var w=this._events[b];if(w.fn)w.fn===m&&(!y||w.once)&&(!h||w.context===h)&&l(this,b);else{for(var S=0,C=[],E=w.length;S<E;S++)(w[S].fn!==m||y&&!w[S].once||h&&w[S].context!==h)&&C.push(w[S]);C.length?this._events[b]=C.length===1?C[0]:C:l(this,b)}return this},u.prototype.removeAllListeners=function(d){var m;return d?(m=n?n+d:d,this._events[m]&&l(this,m)):(this._events=new r,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=n,u.EventEmitter=u,e.exports=u})(Ew)),Ew.exports}var sye=oye();const lye=va(sye);var Ed=new lye,SS="recharts.syncEvent.tooltip",w2="recharts.syncEvent.brush",_6=(e,t)=>{if(t&&Array.isArray(e)){var n=Number.parseInt(t,10);if(!ha(n))return e[n]}},uye={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},M6=Xn({name:"options",initialState:uye,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),cye=M6.reducer,{createEventEmitter:fye}=M6.actions;function dye(e){return e.tooltip.syncInteraction}var hye={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},R6=Xn({name:"chartData",initialState:hye,reducers:{setChartData(e,t){if(e.chartData=t.payload,t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var{startIndex:n,endIndex:r}=t.payload;n!=null&&(e.dataStartIndex=n),r!=null&&(e.dataEndIndex=r)}}}),{setChartData:S2,setDataStartEndIndexes:mye,setComputedData:xSe}=R6.actions,pye=R6.reducer,gye=["x","y"];function A2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function wu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?A2(Object(n),!0).forEach(function(r){vye(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vye(e,t,n){return(t=yye(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yye(e){var t=bye(e,"string");return typeof t=="symbol"?t:t+""}function bye(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xye(e,t){if(e==null)return{};var n,r,i=wye(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function wye(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Sye(){var e=Me(TC),t=Me(OC),n=Vt(),r=Me(RB),i=Me(vo),o=Tl(),l=Pv(),u=Me(c=>c.rootProps.className);v.useEffect(()=>{if(e==null)return jl;var c=(d,m,h)=>{if(t!==h&&e===d){if(m.payload.active===!1){n(zf({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(r==="index"){var y;if(l&&m!==null&&m!==void 0&&(y=m.payload)!==null&&y!==void 0&&y.coordinate&&m.payload.sourceViewBox){var b=m.payload.coordinate,{x:w,y:S}=b,C=xye(b,gye),{x:E,y:j,width:T,height:O}=m.payload.sourceViewBox,N=wu(wu({},C),{},{x:l.x+(T?(w-E)/T:0)*l.width,y:l.y+(O?(S-j)/O:0)*l.height});n(wu(wu({},m),{},{payload:wu(wu({},m.payload),{},{coordinate:N})}))}else n(m);return}if(i!=null){var _;if(typeof r=="function"){var M={activeTooltipIndex:m.payload.index==null?void 0:Number(m.payload.index),isTooltipActive:m.payload.active,activeIndex:m.payload.index==null?void 0:Number(m.payload.index),activeLabel:m.payload.label,activeDataKey:m.payload.dataKey,activeCoordinate:m.payload.coordinate},R=r(i,M);_=i[R]}else r==="value"&&(_=i.find(L=>String(L.value)===m.payload.label));var{coordinate:I}=m.payload;if(I==null||l==null){n(zf({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(_==null){n(zf({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:m.payload.sourceViewBox,graphicalItemId:void 0}));return}var{x:$,y:F}=I,z=Math.min($,l.x+l.width),Y=Math.min(F,l.y+l.height),Q={x:o==="horizontal"?_.coordinate:z,y:o==="horizontal"?Y:_.coordinate},se=zf({active:m.payload.active,coordinate:Q,dataKey:m.payload.dataKey,index:String(_.index),label:m.payload.label,sourceViewBox:m.payload.sourceViewBox,graphicalItemId:m.payload.graphicalItemId});n(se)}}};return Ed.on(SS,c),()=>{Ed.off(SS,c)}},[u,n,t,e,r,i,o,l])}function Aye(){var e=Me(TC),t=Me(OC),n=Vt();v.useEffect(()=>{if(e==null)return jl;var r=(i,o,l)=>{t!==l&&e===i&&n(mye(o))};return Ed.on(w2,r),()=>{Ed.off(w2,r)}},[n,t,e])}function Cye(){var e=Vt();v.useEffect(()=>{e(fye())},[e]),Sye(),Aye()}function Eye(e,t,n,r,i,o){var l=Me(w=>Rve(w,e,t)),u=Me(pve),c=Me(OC),d=Me(TC),m=Me(RB),h=Me(dye),y=h?.sourceViewBox!=null,b=Pv();v.useEffect(()=>{if(!y&&d!=null&&c!=null){var w=zf({active:o,coordinate:n,dataKey:l,index:i,label:typeof r=="number"?String(r):r,sourceViewBox:b,graphicalItemId:u});Ed.emit(SS,d,w,c)}},[y,n,l,u,i,r,c,d,m,o,b])}function C2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function E2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?C2(Object(n),!0).forEach(function(r){jye(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jye(e,t,n){return(t=Tye(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tye(e){var t=Oye(e,"string");return typeof t=="symbol"?t:t+""}function Oye(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Pye(e){return e.dataKey}function Nye(e,t){return v.isValidElement(e)?v.cloneElement(e,t):typeof e=="function"?v.createElement(e,t):v.createElement(Yce,t)}var j2=[],_ye={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,includeHidden:!1,isAnimationActive:"auto",itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function D6(e){var t,n,r=Yn(e,_ye),{active:i,allowEscapeViewBox:o,animationDuration:l,animationEasing:u,content:c,filterNull:d,isAnimationActive:m,offset:h,payloadUniqBy:y,position:b,reverseDirection:w,useTranslate3d:S,wrapperStyle:C,cursor:E,shared:j,trigger:T,defaultIndex:O,portal:N,axisId:_}=r,M=Vt(),R=typeof O=="number"?String(O):O;v.useEffect(()=>{M(Age({shared:j,trigger:T,axisId:_,active:i,defaultIndex:R}))},[M,j,T,_,i,R]);var I=Pv(),$=fB(),F=vge(j),{activeIndex:z,isActive:Y}=(t=Me(me=>Lve(me,F,T,R)))!==null&&t!==void 0?t:{},Q=Me(me=>kve(me,F,T,R)),se=Me(me=>O6(me,F,T,R)),L=Me(me=>Dve(me,F,T,R)),q=Q,B=aye(),ae=(n=i??Y)!==null&&n!==void 0?n:!1,[G,D]=g$([q,ae]),V=F==="axis"?se:void 0;Eye(F,T,L,V,z,ae);var K=N??B;if(K==null||I==null||F==null)return null;var ee=q??j2;ae||(ee=j2),d&&ee.length&&(ee=f$(ee.filter(me=>me.value!=null&&(me.hide!==!0||r.includeHidden)),y,Pye));var he=ee.length>0,ye=E2(E2({},r),{},{payload:ee,label:V,active:ae,activeIndex:z,coordinate:L,accessibilityLayer:$}),X=v.createElement(ofe,{allowEscapeViewBox:o,animationDuration:l,animationEasing:u,isAnimationActive:m,active:ae,coordinate:L,hasPayload:he,offset:h,position:b,reverseDirection:w,useTranslate3d:S,viewBox:I,wrapperStyle:C,lastBoundingBox:G,innerRef:D,hasPortalFromProps:!!N},Nye(c,ye));return v.createElement(v.Fragment,null,cs.createPortal(X,K),ae&&v.createElement(iye,{cursor:E,tooltipEventType:F,coordinate:L,payload:ee,index:z}))}function Mye(e,t,n){return(t=Rye(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rye(e){var t=Dye(e,"string");return typeof t=="symbol"?t:t+""}function Dye(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class kye{constructor(t){Mye(this,"cache",new Map),this.maxSize=t}get(t){var n=this.cache.get(t);return n!==void 0&&(this.cache.delete(t),this.cache.set(t,n)),n}set(t,n){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var r=this.cache.keys().next().value;r!=null&&this.cache.delete(r)}this.cache.set(t,n)}clear(){this.cache.clear()}size(){return this.cache.size}}function T2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Lye(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?T2(Object(n),!0).forEach(function(r){Iye(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Iye(e,t,n){return(t=zye(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zye(e){var t=$ye(e,"string");return typeof t=="symbol"?t:t+""}function $ye(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Bye={cacheSize:2e3,enableCache:!0},k6=Lye({},Bye),O2=new kye(k6.cacheSize),Uye={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},P2="recharts_measurement_span";function Vye(e,t){var n=t.fontSize||"",r=t.fontFamily||"",i=t.fontWeight||"",o=t.fontStyle||"",l=t.letterSpacing||"",u=t.textTransform||"";return"".concat(e,"|").concat(n,"|").concat(r,"|").concat(i,"|").concat(o,"|").concat(l,"|").concat(u)}var N2=(e,t)=>{try{var n=document.getElementById(P2);n||(n=document.createElement("span"),n.setAttribute("id",P2),n.setAttribute("aria-hidden","true"),document.body.appendChild(n)),Object.assign(n.style,Uye,t),n.textContent="".concat(e);var r=n.getBoundingClientRect();return{width:r.width,height:r.height}}catch{return{width:0,height:0}}},Xf=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Hd.isSsr)return{width:0,height:0};if(!k6.enableCache)return N2(t,n);var r=Vye(t,n),i=O2.get(r);if(i)return i;var o=N2(t,n);return O2.set(r,o),o},L6;function Fye(e,t,n){return(t=qye(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qye(e){var t=Hye(e,"string");return typeof t=="symbol"?t:t+""}function Hye(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var _2=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,M2=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Kye=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,Gye=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,Wye={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},Yye=["cm","mm","pt","pc","in","Q","px"];function Xye(e){return Yye.includes(e)}var Mu="NaN";function Zye(e,t){return e*Wye[t]}class Rn{static parse(t){var n,[,r,i]=(n=Gye.exec(t))!==null&&n!==void 0?n:[];return r==null?Rn.NaN:new Rn(parseFloat(r),i??"")}constructor(t,n){this.num=t,this.unit=n,this.num=t,this.unit=n,ha(t)&&(this.unit=""),n!==""&&!Kye.test(n)&&(this.num=NaN,this.unit=""),Xye(n)&&(this.num=Zye(t,n),this.unit="px")}add(t){return this.unit!==t.unit?new Rn(NaN,""):new Rn(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new Rn(NaN,""):new Rn(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Rn(NaN,""):new Rn(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Rn(NaN,""):new Rn(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return ha(this.num)}}L6=Rn;Fye(Rn,"NaN",new L6(NaN,""));function I6(e){if(e==null||e.includes(Mu))return Mu;for(var t=e;t.includes("*")||t.includes("/");){var n,[,r,i,o]=(n=_2.exec(t))!==null&&n!==void 0?n:[],l=Rn.parse(r??""),u=Rn.parse(o??""),c=i==="*"?l.multiply(u):l.divide(u);if(c.isNaN())return Mu;t=t.replace(_2,c.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var d,[,m,h,y]=(d=M2.exec(t))!==null&&d!==void 0?d:[],b=Rn.parse(m??""),w=Rn.parse(y??""),S=h==="+"?b.add(w):b.subtract(w);if(S.isNaN())return Mu;t=t.replace(M2,S.toString())}return t}var R2=/\(([^()]*)\)/;function Qye(e){for(var t=e,n;(n=R2.exec(t))!=null;){var[,r]=n;t=t.replace(R2,I6(r))}return t}function Jye(e){var t=e.replace(/\s+/g,"");return t=Qye(t),t=I6(t),t}function ebe(e){try{return Jye(e)}catch{return Mu}}function jw(e){var t=ebe(e.slice(5,-1));return t===Mu?"":t}var tbe=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],nbe=["dx","dy","angle","className","breakAll"];function AS(){return AS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},AS.apply(null,arguments)}function D2(e,t){if(e==null)return{};var n,r,i=rbe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function rbe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var z6=/[ \f\n\r\t\v\u2028\u2029]+/,$6=e=>{var{children:t,breakAll:n,style:r}=e;try{var i=[];vn(t)||(n?i=t.toString().split(""):i=t.toString().split(z6));var o=i.map(u=>({word:u,width:Xf(u,r).width})),l=n?0:Xf(" ",r).width;return{wordsWithComputedWidth:o,spaceWidth:l}}catch{return null}};function B6(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function ibe(e){return vn(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var U6=(e,t,n,r)=>e.reduce((i,o)=>{var{word:l,width:u}=o,c=i[i.length-1];if(c&&u!=null&&(t==null||r||c.width+u+n<Number(t)))c.words.push(l),c.width+=u+n;else{var d={words:[l],width:u};i.push(d)}return i},[]),V6=e=>e.reduce((t,n)=>t.width>n.width?t:n),abe="…",k2=(e,t,n,r,i,o,l,u)=>{var c=e.slice(0,t),d=$6({breakAll:n,style:r,children:c+abe});if(!d)return[!1,[]];var m=U6(d.wordsWithComputedWidth,o,l,u),h=m.length>i||V6(m).width>Number(o);return[h,m]},obe=(e,t,n,r,i)=>{var{maxLines:o,children:l,style:u,breakAll:c}=e,d=Pe(o),m=String(l),h=U6(t,r,n,i);if(!d||i)return h;var y=h.length>o||V6(h).width>Number(r);if(!y)return h;for(var b=0,w=m.length-1,S=0,C;b<=w&&S<=m.length-1;){var E=Math.floor((b+w)/2),j=E-1,[T,O]=k2(m,j,c,u,o,r,n,i),[N]=k2(m,E,c,u,o,r,n,i);if(!T&&!N&&(b=E+1),T&&N&&(w=E-1),!T&&N){C=O;break}S++}return C||h},L2=e=>{var t=vn(e)?[]:e.toString().split(z6);return[{words:t,width:void 0}]},sbe=e=>{var{width:t,scaleToFit:n,children:r,style:i,breakAll:o,maxLines:l}=e;if((t||n)&&!Hd.isSsr){var u,c,d=$6({breakAll:o,children:r,style:i});if(d){var{wordsWithComputedWidth:m,spaceWidth:h}=d;u=m,c=h}else return L2(r);return obe({breakAll:o,children:r,maxLines:l,style:i},u,c,t,!!n)}return L2(r)},F6="#808080",lbe={angle:0,breakAll:!1,capHeight:"0.71em",fill:F6,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},AE=v.forwardRef((e,t)=>{var n=Yn(e,lbe),{x:r,y:i,lineHeight:o,capHeight:l,fill:u,scaleToFit:c,textAnchor:d,verticalAnchor:m}=n,h=D2(n,tbe),y=v.useMemo(()=>sbe({breakAll:h.breakAll,children:h.children,maxLines:h.maxLines,scaleToFit:c,style:h.style,width:h.width}),[h.breakAll,h.children,h.maxLines,c,h.style,h.width]),{dx:b,dy:w,angle:S,className:C,breakAll:E}=h,j=D2(h,nbe);if(!ma(r)||!ma(i)||y.length===0)return null;var T=Number(r)+(Pe(b)?b:0),O=Number(i)+(Pe(w)?w:0);if(!nt(T)||!nt(O))return null;var N;switch(m){case"start":N=jw("calc(".concat(l,")"));break;case"middle":N=jw("calc(".concat((y.length-1)/2," * -").concat(o," + (").concat(l," / 2))"));break;default:N=jw("calc(".concat(y.length-1," * -").concat(o,")"));break}var _=[],M=y[0];if(c&&M!=null){var R=M.width,{width:I}=h;_.push("scale(".concat(Pe(I)&&Pe(R)?I/R:1,")"))}return S&&_.push("rotate(".concat(S,", ").concat(T,", ").concat(O,")")),_.length&&(j.transform=_.join(" ")),v.createElement("text",AS({},Wn(j),{ref:t,x:T,y:O,className:at("recharts-text",C),textAnchor:d,fill:u.includes("url")?F6:u}),y.map(($,F)=>{var z=$.words.join(E?"":" ");return v.createElement("tspan",{x:T,dy:F===0?N:o,key:"".concat(z,"-").concat(F)},z)}))});AE.displayName="Text";function I2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Xi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?I2(Object(n),!0).forEach(function(r){ube(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ube(e,t,n){return(t=cbe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cbe(e){var t=fbe(e,"string");return typeof t=="symbol"?t:t+""}function fbe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var dbe=e=>{var{viewBox:t,position:n,offset:r=0,parentViewBox:i}=e,{x:o,y:l,height:u,upperWidth:c,lowerWidth:d}=yC(t),m=o,h=o+(c-d)/2,y=(m+h)/2,b=(c+d)/2,w=m+c/2,S=u>=0?1:-1,C=S*r,E=S>0?"end":"start",j=S>0?"start":"end",T=c>=0?1:-1,O=T*r,N=T>0?"end":"start",_=T>0?"start":"end",M=i;if(n==="top"){var R={x:m+c/2,y:l-C,horizontalAnchor:"middle",verticalAnchor:E};return M&&(R.height=Math.max(l-M.y,0),R.width=c),R}if(n==="bottom"){var I={x:h+d/2,y:l+u+C,horizontalAnchor:"middle",verticalAnchor:j};return M&&(I.height=Math.max(M.y+M.height-(l+u),0),I.width=d),I}if(n==="left"){var $={x:y-O,y:l+u/2,horizontalAnchor:N,verticalAnchor:"middle"};return M&&($.width=Math.max($.x-M.x,0),$.height=u),$}if(n==="right"){var F={x:y+b+O,y:l+u/2,horizontalAnchor:_,verticalAnchor:"middle"};return M&&(F.width=Math.max(M.x+M.width-F.x,0),F.height=u),F}var z=M?{width:b,height:u}:{};return n==="insideLeft"?Xi({x:y+O,y:l+u/2,horizontalAnchor:_,verticalAnchor:"middle"},z):n==="insideRight"?Xi({x:y+b-O,y:l+u/2,horizontalAnchor:N,verticalAnchor:"middle"},z):n==="insideTop"?Xi({x:m+c/2,y:l+C,horizontalAnchor:"middle",verticalAnchor:j},z):n==="insideBottom"?Xi({x:h+d/2,y:l+u-C,horizontalAnchor:"middle",verticalAnchor:E},z):n==="insideTopLeft"?Xi({x:m+O,y:l+C,horizontalAnchor:_,verticalAnchor:j},z):n==="insideTopRight"?Xi({x:m+c-O,y:l+C,horizontalAnchor:N,verticalAnchor:j},z):n==="insideBottomLeft"?Xi({x:h+O,y:l+u-C,horizontalAnchor:_,verticalAnchor:E},z):n==="insideBottomRight"?Xi({x:h+d-O,y:l+u-C,horizontalAnchor:N,verticalAnchor:E},z):n&&typeof n=="object"&&(Pe(n.x)||gl(n.x))&&(Pe(n.y)||gl(n.y))?Xi({x:o+ls(n.x,b),y:l+ls(n.y,u),horizontalAnchor:"end",verticalAnchor:"end"},z):Xi({x:w,y:l+u/2,horizontalAnchor:"middle",verticalAnchor:"middle"},z)},hbe=["labelRef"],mbe=["content"];function z2(e,t){if(e==null)return{};var n,r,i=pbe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function pbe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function $2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function $f(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$2(Object(n),!0).forEach(function(r){gbe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gbe(e,t,n){return(t=vbe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vbe(e){var t=ybe(e,"string");return typeof t=="symbol"?t:t+""}function ybe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ga(){return Ga=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ga.apply(null,arguments)}var q6=v.createContext(null),bbe=e=>{var{x:t,y:n,upperWidth:r,lowerWidth:i,width:o,height:l,children:u}=e,c=v.useMemo(()=>({x:t,y:n,upperWidth:r,lowerWidth:i,width:o,height:l}),[t,n,r,i,o,l]);return v.createElement(q6.Provider,{value:c},u)},H6=()=>{var e=v.useContext(q6),t=Pv();return e||(t?yC(t):void 0)},xbe=v.createContext(null),wbe=()=>{var e=v.useContext(xbe),t=Me(zB);return e||t},Sbe=e=>{var{value:t,formatter:n}=e,r=vn(e.children)?t:e.children;return typeof n=="function"?n(r):r},CE=e=>e!=null&&typeof e=="function",Abe=(e,t)=>{var n=Oi(t-e),r=Math.min(Math.abs(t-e),360);return n*r},Cbe=(e,t,n,r,i)=>{var{offset:o,className:l}=e,{cx:u,cy:c,innerRadius:d,outerRadius:m,startAngle:h,endAngle:y,clockWise:b}=i,w=(d+m)/2,S=Abe(h,y),C=S>=0?1:-1,E,j;switch(t){case"insideStart":E=h+C*o,j=b;break;case"insideEnd":E=y-C*o,j=!b;break;case"end":E=y+C*o,j=b;break;default:throw new Error("Unsupported position ".concat(t))}j=S<=0?j:!j;var T=In(u,c,w,E),O=In(u,c,w,E+(j?1:-1)*359),N="M".concat(T.x,",").concat(T.y,`
100
- A`).concat(w,",").concat(w,",0,1,").concat(j?0:1,`,
101
- `).concat(O.x,",").concat(O.y),_=vn(e.id)?fd("recharts-radial-line-"):e.id;return v.createElement("text",Ga({},r,{dominantBaseline:"central",className:at("recharts-radial-bar-label",l)}),v.createElement("defs",null,v.createElement("path",{id:_,d:N})),v.createElement("textPath",{xlinkHref:"#".concat(_)},n))},Ebe=(e,t,n)=>{var{cx:r,cy:i,innerRadius:o,outerRadius:l,startAngle:u,endAngle:c}=e,d=(u+c)/2;if(n==="outside"){var{x:m,y:h}=In(r,i,l+t,d);return{x:m,y:h,textAnchor:m>=r?"start":"end",verticalAnchor:"middle"}}if(n==="center")return{x:r,y:i,textAnchor:"middle",verticalAnchor:"middle"};if(n==="centerTop")return{x:r,y:i,textAnchor:"middle",verticalAnchor:"start"};if(n==="centerBottom")return{x:r,y:i,textAnchor:"middle",verticalAnchor:"end"};var y=(o+l)/2,{x:b,y:w}=In(r,i,y,d);return{x:b,y:w,textAnchor:"middle",verticalAnchor:"middle"}},mp=e=>e!=null&&"cx"in e&&Pe(e.cx),jbe={angle:0,offset:5,zIndex:nr.label,position:"middle",textBreakAll:!1};function Tbe(e){if(!mp(e))return e;var{cx:t,cy:n,outerRadius:r}=e,i=r*2;return{x:t-r,y:n-r,width:i,upperWidth:i,lowerWidth:i,height:i}}function Qo(e){var t=Yn(e,jbe),{viewBox:n,parentViewBox:r,position:i,value:o,children:l,content:u,className:c="",textBreakAll:d,labelRef:m}=t,h=wbe(),y=H6(),b=i==="center"?y:h??y,w,S,C;n==null?w=b:mp(n)?w=n:w=yC(n);var E=Tbe(w);if(!w||vn(o)&&vn(l)&&!v.isValidElement(u)&&typeof u!="function")return null;var j=$f($f({},t),{},{viewBox:w});if(v.isValidElement(u)){var{labelRef:T}=j,O=z2(j,hbe);return v.cloneElement(u,O)}if(typeof u=="function"){var{content:N}=j,_=z2(j,mbe);if(S=v.createElement(u,_),v.isValidElement(S))return S}else S=Sbe(t);var M=Wn(t);if(mp(w)){if(i==="insideStart"||i==="insideEnd"||i==="end")return Cbe(t,i,S,M,w);C=Ebe(w,t.offset,t.position)}else{if(!E)return null;var R=dbe({viewBox:E,position:i,offset:t.offset,parentViewBox:mp(r)?void 0:r});C=$f($f({x:R.x,y:R.y,textAnchor:R.horizontalAnchor,verticalAnchor:R.verticalAnchor},R.width!==void 0?{width:R.width}:{}),R.height!==void 0?{height:R.height}:{})}return v.createElement(yo,{zIndex:t.zIndex},v.createElement(AE,Ga({ref:m,className:at("recharts-label",c)},M,C,{textAnchor:B6(M.textAnchor)?M.textAnchor:C.textAnchor,breakAll:d}),S))}Qo.displayName="Label";var Obe=(e,t,n)=>{if(!e)return null;var r={viewBox:t,labelRef:n};return e===!0?v.createElement(Qo,Ga({key:"label-implicit"},r)):ma(e)?v.createElement(Qo,Ga({key:"label-implicit",value:e},r)):v.isValidElement(e)?e.type===Qo?v.cloneElement(e,$f({key:"label-implicit"},r)):v.createElement(Qo,Ga({key:"label-implicit",content:e},r)):CE(e)?v.createElement(Qo,Ga({key:"label-implicit",content:e},r)):e&&typeof e=="object"?v.createElement(Qo,Ga({},e,{key:"label-implicit"},r)):null};function Pbe(e){var{label:t,labelRef:n}=e,r=H6();return Obe(t,r,n)||null}var Nbe=["valueAccessor"],_be=["dataKey","clockWise","id","textBreakAll","zIndex"];function Eg(){return Eg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Eg.apply(null,arguments)}function B2(e,t){if(e==null)return{};var n,r,i=Mbe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Mbe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Rbe=e=>{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(ibe(t))return t},K6=v.createContext(void 0),G6=K6.Provider,W6=v.createContext(void 0);W6.Provider;function Dbe(){return v.useContext(K6)}function kbe(){return v.useContext(W6)}function pp(e){var{valueAccessor:t=Rbe}=e,n=B2(e,Nbe),{dataKey:r,clockWise:i,id:o,textBreakAll:l,zIndex:u}=n,c=B2(n,_be),d=Dbe(),m=kbe(),h=d||m;return!h||!h.length?null:v.createElement(yo,{zIndex:u??nr.label},v.createElement(Ur,{className:"recharts-label-list"},h.map((y,b)=>{var w,S=vn(r)?t(y,b):sn(y.payload,r),C=vn(o)?{}:{id:"".concat(o,"-").concat(b)};return v.createElement(Qo,Eg({key:"label-".concat(b)},Wn(y),c,C,{fill:(w=n.fill)!==null&&w!==void 0?w:y.fill,parentViewBox:y.parentViewBox,value:S,textBreakAll:l,viewBox:y.viewBox,index:b,zIndex:0}))})))}pp.displayName="LabelList";function Y6(e){var{label:t}=e;return t?t===!0?v.createElement(pp,{key:"labelList-implicit"}):v.isValidElement(t)||CE(t)?v.createElement(pp,{key:"labelList-implicit",content:t}):typeof t=="object"?v.createElement(pp,Eg({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function CS(){return CS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},CS.apply(null,arguments)}var X6=e=>{var{cx:t,cy:n,r,className:i}=e,o=at("recharts-dot",i);return Pe(t)&&Pe(n)&&Pe(r)?v.createElement("circle",CS({},Ri(e),lC(e),{className:o,cx:t,cy:n,r})):null},Lbe={radiusAxis:{},angleAxis:{}},Z6=Xn({name:"polarAxis",initialState:Lbe,reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),{addRadiusAxis:wSe,removeRadiusAxis:SSe,addAngleAxis:ASe,removeAngleAxis:CSe}=Z6.actions,Ibe=Z6.reducer;function zbe(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var EE=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0,Tw={},U2;function $be(){return U2||(U2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){if(typeof n!="object"||n==null)return!1;if(Object.getPrototypeOf(n)===null)return!0;if(Object.prototype.toString.call(n)!=="[object Object]"){const i=n[Symbol.toStringTag];return i==null||!Object.getOwnPropertyDescriptor(n,Symbol.toStringTag)?.writable?!1:n.toString()===`[object ${i}]`}let r=n;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(n)===r}e.isPlainObject=t})(Tw)),Tw}var Ow,V2;function Bbe(){return V2||(V2=1,Ow=$be().isPlainObject),Ow}var Ube=Bbe();const Vbe=va(Ube);var F2,q2,H2,K2,G2;function W2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Y2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?W2(Object(n),!0).forEach(function(r){Fbe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Fbe(e,t,n){return(t=qbe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qbe(e){var t=Hbe(e,"string");return typeof t=="symbol"?t:t+""}function Hbe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function jg(){return jg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jg.apply(null,arguments)}function Mf(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var X2=(e,t,n,r,i)=>{var o=n-r,l;return l=Ut(F2||(F2=Mf(["M ",",",""])),e,t),l+=Ut(q2||(q2=Mf(["L ",",",""])),e+n,t),l+=Ut(H2||(H2=Mf(["L ",",",""])),e+n-o/2,t+i),l+=Ut(K2||(K2=Mf(["L ",",",""])),e+n-o/2-r,t+i),l+=Ut(G2||(G2=Mf(["L ",","," Z"])),e,t),l},Kbe={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Gbe=e=>{var t=Yn(e,Kbe),{x:n,y:r,upperWidth:i,lowerWidth:o,height:l,className:u}=t,{animationEasing:c,animationDuration:d,animationBegin:m,isUpdateAnimationActive:h}=t,y=v.useRef(null),[b,w]=v.useState(-1),S=v.useRef(i),C=v.useRef(o),E=v.useRef(l),j=v.useRef(n),T=v.useRef(r),O=Dv(e,"trapezoid-");if(v.useEffect(()=>{if(y.current&&y.current.getTotalLength)try{var Q=y.current.getTotalLength();Q&&w(Q)}catch{}},[]),n!==+n||r!==+r||i!==+i||o!==+o||l!==+l||i===0&&o===0||l===0)return null;var N=at("recharts-trapezoid",u);if(!h)return v.createElement("g",null,v.createElement("path",jg({},Wn(t),{className:N,d:X2(n,r,i,o,l)})));var _=S.current,M=C.current,R=E.current,I=j.current,$=T.current,F="0px ".concat(b===-1?1:b,"px"),z="".concat(b,"px ").concat(b,"px"),Y=dB(["strokeDasharray"],d,c);return v.createElement(Rv,{animationId:O,key:O,canBegin:b>0,duration:d,easing:c,isActive:h,begin:m},Q=>{var se=rn(_,i,Q),L=rn(M,o,Q),q=rn(R,l,Q),B=rn(I,n,Q),ae=rn($,r,Q);y.current&&(S.current=se,C.current=L,E.current=q,j.current=B,T.current=ae);var G=Q>0?{transition:Y,strokeDasharray:z}:{strokeDasharray:F};return v.createElement("path",jg({},Wn(t),{className:N,d:X2(B,ae,se,L,q),ref:y,style:Y2(Y2({},G),t.style)}))})},Wbe=["option","shapeType","activeClassName","inActiveClassName"];function Ybe(e,t){if(e==null)return{};var n,r,i=Xbe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Xbe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Z2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Tg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Z2(Object(n),!0).forEach(function(r){Zbe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Z2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Zbe(e,t,n){return(t=Qbe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qbe(e){var t=Jbe(e,"string");return typeof t=="symbol"?t:t+""}function Jbe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function e0e(e,t){return Tg(Tg({},t),e)}function t0e(e,t){return e==="symbols"}function Q2(e){var{shapeType:t,elementProps:n}=e;switch(t){case"rectangle":return v.createElement(gB,n);case"trapezoid":return v.createElement(Gbe,n);case"sector":return v.createElement(bB,n);case"symbols":if(t0e(t))return v.createElement(sC,n);break;case"curve":return v.createElement(Wf,n);default:return null}}function n0e(e){return v.isValidElement(e)?e.props:e}function r0e(e){var{option:t,shapeType:n,activeClassName:r="recharts-active-shape",inActiveClassName:i="recharts-shape"}=e,o=Ybe(e,Wbe),l;if(v.isValidElement(t))l=v.cloneElement(t,Tg(Tg({},o),n0e(t)));else if(typeof t=="function")l=t(o,o.index);else if(Vbe(t)&&typeof t!="boolean"){var u=e0e(t,o);l=v.createElement(Q2,{shapeType:n,elementProps:u})}else{var c=o;l=v.createElement(Q2,{shapeType:n,elementProps:c})}return o.isActive?v.createElement(Ur,{className:r},l):v.createElement(Ur,{className:i},l)}function Q6(e){var{tooltipEntrySettings:t}=e,n=Vt(),r=or(),i=v.useRef(null);return v.useLayoutEffect(()=>{r||(i.current===null?n(xge(t)):i.current!==t&&n(wge({prev:i.current,next:t})),i.current=t)},[t,n,r]),v.useLayoutEffect(()=>()=>{i.current&&(n(Sge(i.current)),i.current=null)},[n]),null}function J6(e){var{legendPayload:t}=e,n=Vt(),r=or(),i=v.useRef(null);return v.useLayoutEffect(()=>{r||(i.current===null?n(oce(t)):i.current!==t&&n(sce({prev:i.current,next:t})),i.current=t)},[n,r,t]),v.useLayoutEffect(()=>()=>{i.current&&(n(lce(i.current)),i.current=null)},[n]),null}var Pw,i0e=()=>{var[e]=v.useState(()=>fd("uid-"));return e},a0e=(Pw=Dg.useId)!==null&&Pw!==void 0?Pw:i0e;function o0e(e,t){var n=a0e();return t||(e?"".concat(e,"-").concat(n):n)}var s0e=v.createContext(void 0),eV=e=>{var{id:t,type:n,children:r}=e,i=o0e("recharts-".concat(n),t);return v.createElement(s0e.Provider,{value:i},r(i))},l0e={cartesianItems:[],polarItems:[]},tV=Xn({name:"graphicalItems",initialState:l0e,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:Et()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:n,next:r}=t.payload,i=ui(e).cartesianItems.indexOf(n);i>-1&&(e.cartesianItems[i]=r)},prepare:Et()},removeCartesianGraphicalItem:{reducer(e,t){var n=ui(e).cartesianItems.indexOf(t.payload);n>-1&&e.cartesianItems.splice(n,1)},prepare:Et()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:Et()},removePolarGraphicalItem:{reducer(e,t){var n=ui(e).polarItems.indexOf(t.payload);n>-1&&e.polarItems.splice(n,1)},prepare:Et()},replacePolarGraphicalItem:{reducer(e,t){var{prev:n,next:r}=t.payload,i=ui(e).polarItems.indexOf(n);i>-1&&(e.polarItems[i]=r)},prepare:Et()}}}),{addCartesianGraphicalItem:u0e,replaceCartesianGraphicalItem:c0e,removeCartesianGraphicalItem:f0e,addPolarGraphicalItem:ESe,removePolarGraphicalItem:jSe,replacePolarGraphicalItem:TSe}=tV.actions,d0e=tV.reducer,h0e=e=>{var t=Vt(),n=v.useRef(null);return v.useLayoutEffect(()=>{n.current===null?t(u0e(e)):n.current!==e&&t(c0e({prev:n.current,next:e})),n.current=e},[t,e]),v.useLayoutEffect(()=>()=>{n.current&&(t(f0e(n.current)),n.current=null)},[t]),null},nV=v.memo(h0e),m0e=["points"];function J2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Nw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?J2(Object(n),!0).forEach(function(r){p0e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function p0e(e,t,n){return(t=g0e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g0e(e){var t=v0e(e,"string");return typeof t=="symbol"?t:t+""}function v0e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Og(){return Og=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Og.apply(null,arguments)}function y0e(e,t){if(e==null)return{};var n,r,i=b0e(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function b0e(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function x0e(e){var{option:t,dotProps:n,className:r}=e;if(v.isValidElement(t))return v.cloneElement(t,n);if(typeof t=="function")return t(n);var i=at(r,typeof t!="boolean"?t.className:""),o=n??{},{points:l}=o,u=y0e(o,m0e);return v.createElement(X6,Og({},u,{className:i}))}function w0e(e,t){return e==null?!1:t?!0:e.length===1}function rV(e){var{points:t,dot:n,className:r,dotClassName:i,dataKey:o,baseProps:l,needClip:u,clipPathId:c,zIndex:d=nr.scatter}=e;if(!w0e(t,n))return null;var m=EE(n),h=qae(n),y=t.map((w,S)=>{var C,E,j=Nw(Nw(Nw({r:3},l),h),{},{index:S,cx:(C=w.x)!==null&&C!==void 0?C:void 0,cy:(E=w.y)!==null&&E!==void 0?E:void 0,dataKey:o,value:w.value,payload:w.payload,points:t});return v.createElement(x0e,{key:"dot-".concat(S),option:n,dotProps:j,className:i})}),b={};return u&&c!=null&&(b.clipPath="url(#clipPath-".concat(m?"":"dots-").concat(c,")")),v.createElement(yo,{zIndex:d},v.createElement(Ur,Og({className:r},b),y))}function eL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function tL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?eL(Object(n),!0).forEach(function(r){S0e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function S0e(e,t,n){return(t=A0e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function A0e(e){var t=C0e(e,"string");return typeof t=="symbol"?t:t+""}function C0e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var iV=0,E0e={xAxis:{},yAxis:{},zAxis:{}},aV=Xn({name:"cartesianAxis",initialState:E0e,reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:Et()},replaceXAxis:{reducer(e,t){var{prev:n,next:r}=t.payload;e.xAxis[n.id]!==void 0&&(n.id!==r.id&&delete e.xAxis[n.id],e.xAxis[r.id]=r)},prepare:Et()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:Et()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:Et()},replaceYAxis:{reducer(e,t){var{prev:n,next:r}=t.payload;e.yAxis[n.id]!==void 0&&(n.id!==r.id&&delete e.yAxis[n.id],e.yAxis[r.id]=r)},prepare:Et()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:Et()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:Et()},replaceZAxis:{reducer(e,t){var{prev:n,next:r}=t.payload;e.zAxis[n.id]!==void 0&&(n.id!==r.id&&delete e.zAxis[n.id],e.zAxis[r.id]=r)},prepare:Et()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:Et()},updateYAxisWidth(e,t){var{id:n,width:r}=t.payload,i=e.yAxis[n];if(i){var o,l=i.widthHistory||[];if(l.length===3&&l[0]===l[2]&&r===l[1]&&r!==i.width&&Math.abs(r-((o=l[0])!==null&&o!==void 0?o:0))<=1)return;var u=[...l,r].slice(-3);e.yAxis[n]=tL(tL({},i),{},{width:r,widthHistory:u})}}}}),{addXAxis:j0e,replaceXAxis:T0e,removeXAxis:O0e,addYAxis:P0e,replaceYAxis:N0e,removeYAxis:_0e,addZAxis:OSe,replaceZAxis:PSe,removeZAxis:NSe,updateYAxisWidth:M0e}=aV.actions,R0e=aV.reducer,D0e=te([Vn],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),k0e=te([D0e,fo,ho],(e,t,n)=>{if(!(!e||t==null||n==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,n-e.top-e.bottom)}}),Jv=()=>Me(k0e),L0e=()=>Me(xve);function nL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function _w(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?nL(Object(n),!0).forEach(function(r){I0e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function I0e(e,t,n){return(t=z0e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function z0e(e){var t=$0e(e,"string");return typeof t=="symbol"?t:t+""}function $0e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var B0e=e=>{var{point:t,childIndex:n,mainColor:r,activeDot:i,dataKey:o,clipPath:l}=e;if(i===!1||t.x==null||t.y==null)return null;var u={index:n,dataKey:o,cx:t.x,cy:t.y,r:4,fill:r??"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value},c=_w(_w(_w({},u),uv(i)),lC(i)),d;return v.isValidElement(i)?d=v.cloneElement(i,c):typeof i=="function"?d=i(c):d=v.createElement(X6,c),v.createElement(Ur,{className:"recharts-active-dot",clipPath:l},d)};function ES(e){var{points:t,mainColor:n,activeDot:r,itemDataKey:i,clipPath:o,zIndex:l=nr.activeDot}=e,u=Me(Cd),c=L0e();if(t==null||c==null)return null;var d=t.find(m=>c.includes(m.payload));return vn(d)?null:v.createElement(yo,{zIndex:l},v.createElement(B0e,{point:d,childIndex:Number(u),mainColor:n,dataKey:i,activeDot:r,clipPath:o}))}var U0e=e=>{var{chartData:t}=e,n=Vt(),r=or();return v.useEffect(()=>r?()=>{}:(n(S2(t)),()=>{n(S2(void 0))}),[t,n,r]),null},rL={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},oV=Xn({name:"brush",initialState:rL,reducers:{setBrushSettings(e,t){return t.payload==null?rL:t.payload}}}),{setBrushSettings:_Se}=oV.actions,V0e=oV.reducer;function F0e(e){return(e%180+180)%180}var q0e=function(t){var{width:n,height:r}=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=F0e(i),l=o*Math.PI/180,u=Math.atan(r/n),c=l>u&&l<Math.PI-u?r/Math.sin(l):n/Math.cos(l);return Math.abs(c)},H0e={dots:[],areas:[],lines:[]},sV=Xn({name:"referenceElements",initialState:H0e,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var n=ui(e).dots.findIndex(r=>r===t.payload);n!==-1&&e.dots.splice(n,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var n=ui(e).areas.findIndex(r=>r===t.payload);n!==-1&&e.areas.splice(n,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var n=ui(e).lines.findIndex(r=>r===t.payload);n!==-1&&e.lines.splice(n,1)}}}),{addDot:MSe,removeDot:RSe,addArea:DSe,removeArea:kSe,addLine:LSe,removeLine:ISe}=sV.actions,K0e=sV.reducer,G0e=v.createContext(void 0),W0e=e=>{var{children:t}=e,[n]=v.useState("".concat(fd("recharts"),"-clip")),r=Jv();if(r==null)return null;var{x:i,y:o,width:l,height:u}=r;return v.createElement(G0e.Provider,{value:n},v.createElement("defs",null,v.createElement("clipPath",{id:n},v.createElement("rect",{x:i,y:o,height:u,width:l}))),t)};function lV(e,t){if(t<1)return[];if(t===1)return e;for(var n=[],r=0;r<e.length;r+=t){var i=e[r];i!==void 0&&n.push(i)}return n}function Y0e(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return q0e(r,n)}function X0e(e,t,n){var r=n==="width",{x:i,y:o,width:l,height:u}=e;return t===1?{start:r?i:o,end:r?i+l:o+u}:{start:r?i+l:o+u,end:r?i:o}}function jd(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var o=n();return e*(t-e*o/2-r)>=0&&e*(t+e*o/2-i)<=0}function Z0e(e,t){return lV(e,t+1)}function Q0e(e,t,n,r,i){for(var o=(r||[]).slice(),{start:l,end:u}=t,c=0,d=1,m=l,h=function(){var w=r?.[c];if(w===void 0)return{v:lV(r,d)};var S=c,C,E=()=>(C===void 0&&(C=n(w,S)),C),j=w.coordinate,T=c===0||jd(e,j,E,m,u);T||(c=0,m=l,d+=1),T&&(m=j+e*(E()/2+i),c+=d)},y;d<=o.length;)if(y=h(),y)return y.v;return[]}function J0e(e,t,n,r,i){var o=(r||[]).slice(),l=o.length;if(l===0)return[];for(var{start:u,end:c}=t,d=1;d<=l;d++){for(var m=(l-1)%d,h=u,y=!0,b=function(){var O=r[S];if(O==null)return 0;var N=S,_,M=()=>(_===void 0&&(_=n(O,N)),_),R=O.coordinate,I=S===m||jd(e,R,M,h,c);if(!I)return y=!1,1;I&&(h=R+e*(M()/2+i))},w,S=m;S<l&&(w=b(),!(w!==0&&w===1));S+=d);if(y){for(var C=[],E=m;E<l;E+=d){var j=r[E];j!=null&&C.push(j)}return C}}return[]}function iL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Kn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?iL(Object(n),!0).forEach(function(r){exe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function exe(e,t,n){return(t=txe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function txe(e){var t=nxe(e,"string");return typeof t=="symbol"?t:t+""}function nxe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function rxe(e,t,n,r,i){for(var o=(r||[]).slice(),l=o.length,{start:u}=t,{end:c}=t,d=function(y){var b=o[y];if(b==null)return 1;var w=b,S,C=()=>(S===void 0&&(S=n(b,y)),S);if(y===l-1){var E=e*(w.coordinate+e*C()/2-c);o[y]=w=Kn(Kn({},w),{},{tickCoord:E>0?w.coordinate-E*e:w.coordinate})}else o[y]=w=Kn(Kn({},w),{},{tickCoord:w.coordinate});if(w.tickCoord!=null){var j=jd(e,w.tickCoord,C,u,c);j&&(c=w.tickCoord-e*(C()/2+i),o[y]=Kn(Kn({},w),{},{isShow:!0}))}},m=l-1;m>=0;m--)d(m);return o}function ixe(e,t,n,r,i,o){var l=(r||[]).slice(),u=l.length,{start:c,end:d}=t;if(o){var m=r[u-1];if(m!=null){var h=n(m,u-1),y=e*(m.coordinate+e*h/2-d);if(l[u-1]=m=Kn(Kn({},m),{},{tickCoord:y>0?m.coordinate-y*e:m.coordinate}),m.tickCoord!=null){var b=jd(e,m.tickCoord,()=>h,c,d);b&&(d=m.tickCoord-e*(h/2+i),l[u-1]=Kn(Kn({},m),{},{isShow:!0}))}}}for(var w=o?u-1:u,S=function(j){var T=l[j];if(T==null)return 1;var O=T,N,_=()=>(N===void 0&&(N=n(T,j)),N);if(j===0){var M=e*(O.coordinate-e*_()/2-c);l[j]=O=Kn(Kn({},O),{},{tickCoord:M<0?O.coordinate-M*e:O.coordinate})}else l[j]=O=Kn(Kn({},O),{},{tickCoord:O.coordinate});if(O.tickCoord!=null){var R=jd(e,O.tickCoord,_,c,d);R&&(c=O.tickCoord+e*(_()/2+i),l[j]=Kn(Kn({},O),{},{isShow:!0}))}},C=0;C<w;C++)S(C);return l}function axe(e,t,n){var{tick:r,ticks:i,viewBox:o,minTickGap:l,orientation:u,interval:c,tickFormatter:d,unit:m,angle:h}=e;if(!i||!i.length||!r)return[];if(Pe(c)||Hd.isSsr){var y;return(y=Z0e(i,Pe(c)?c:0))!==null&&y!==void 0?y:[]}var b=[],w=u==="top"||u==="bottom"?"width":"height",S=m&&w==="width"?Xf(m,{fontSize:t,letterSpacing:n}):{width:0,height:0},C=(N,_)=>{var M=typeof d=="function"?d(N.value,_):N.value;return w==="width"?Y0e(Xf(M,{fontSize:t,letterSpacing:n}),S,h):Xf(M,{fontSize:t,letterSpacing:n})[w]},E=i[0],j=i[1],T=i.length>=2&&E!=null&&j!=null?Oi(j.coordinate-E.coordinate):1,O=X0e(o,T,w);return c==="equidistantPreserveStart"?Q0e(T,O,C,i,l):c==="equidistantPreserveEnd"?J0e(T,O,C,i,l):(c==="preserveStart"||c==="preserveStartEnd"?b=ixe(T,O,C,i,l,c==="preserveStartEnd"):b=rxe(T,O,C,i,l),b.filter(N=>N.isShow))}var oxe=e=>{var{ticks:t,label:n,labelGapWithTick:r=5,tickSize:i=0,tickMargin:o=0}=e,l=0;if(t){Array.from(t).forEach(m=>{if(m){var h=m.getBoundingClientRect();h.width>l&&(l=h.width)}});var u=n?n.getBoundingClientRect().width:0,c=i+o,d=l+c+u+(n?r:0);return Math.round(d)}return 0},sxe={xAxis:{},yAxis:{}},uV=Xn({name:"renderedTicks",initialState:sxe,reducers:{setRenderedTicks:(e,t)=>{var{axisType:n,axisId:r,ticks:i}=t.payload;e[n][r]=i},removeRenderedTicks:(e,t)=>{var{axisType:n,axisId:r}=t.payload;delete e[n][r]}}}),{setRenderedTicks:lxe,removeRenderedTicks:uxe}=uV.actions,cxe=uV.reducer,fxe=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function dxe(e,t){if(e==null)return{};var n,r,i=hxe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function hxe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Sl(){return Sl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sl.apply(null,arguments)}function aL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function $t(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?aL(Object(n),!0).forEach(function(r){mxe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mxe(e,t,n){return(t=pxe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pxe(e){var t=gxe(e,"string");return typeof t=="symbol"?t:t+""}function gxe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ll={x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd",zIndex:nr.axis};function vxe(e){var{x:t,y:n,width:r,height:i,orientation:o,mirror:l,axisLine:u,otherSvgProps:c}=e;if(!u)return null;var d=$t($t($t({},c),Ri(u)),{},{fill:"none"});if(o==="top"||o==="bottom"){var m=+(o==="top"&&!l||o==="bottom"&&l);d=$t($t({},d),{},{x1:t,y1:n+m*i,x2:t+r,y2:n+m*i})}else{var h=+(o==="left"&&!l||o==="right"&&l);d=$t($t({},d),{},{x1:t+h*r,y1:n,x2:t+h*r,y2:n+i})}return v.createElement("line",Sl({},d,{className:at("recharts-cartesian-axis-line",hv(u,"className"))}))}function yxe(e,t,n,r,i,o,l,u,c){var d,m,h,y,b,w,S=u?-1:1,C=e.tickSize||l,E=Pe(e.tickCoord)?e.tickCoord:e.coordinate;switch(o){case"top":d=m=e.coordinate,y=n+ +!u*i,h=y-S*C,w=h-S*c,b=E;break;case"left":h=y=e.coordinate,m=t+ +!u*r,d=m-S*C,b=d-S*c,w=E;break;case"right":h=y=e.coordinate,m=t+ +u*r,d=m+S*C,b=d+S*c,w=E;break;default:d=m=e.coordinate,y=n+ +u*i,h=y+S*C,w=h+S*c,b=E;break}return{line:{x1:d,y1:h,x2:m,y2:y},tick:{x:b,y:w}}}function bxe(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function xxe(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function wxe(e){var{option:t,tickProps:n,value:r}=e,i,o=at(n.className,"recharts-cartesian-axis-tick-value");if(v.isValidElement(t))i=v.cloneElement(t,$t($t({},n),{},{className:o}));else if(typeof t=="function")i=t($t($t({},n),{},{className:o}));else{var l="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(l=at(l,zbe(t))),i=v.createElement(AE,Sl({},n,{className:l}),r)}return i}function Sxe(e){var{ticks:t,axisType:n,axisId:r}=e,i=Vt();return v.useEffect(()=>{if(r==null||n==null)return jl;var o=t.map(l=>({value:l.value,coordinate:l.coordinate,offset:l.offset,index:l.index}));return i(lxe({ticks:o,axisId:r,axisType:n})),()=>{i(uxe({axisId:r,axisType:n}))}},[i,t,r,n]),null}var Axe=v.forwardRef((e,t)=>{var{ticks:n=[],tick:r,tickLine:i,stroke:o,tickFormatter:l,unit:u,padding:c,tickTextProps:d,orientation:m,mirror:h,x:y,y:b,width:w,height:S,tickSize:C,tickMargin:E,fontSize:j,letterSpacing:T,getTicksConfig:O,events:N,axisType:_,axisId:M}=e,R=axe($t($t({},O),{},{ticks:n}),j,T),I=Ri(O),$=uv(r),F=B6(I.textAnchor)?I.textAnchor:bxe(m,h),z=xxe(m,h),Y={};typeof i=="object"&&(Y=i);var Q=$t($t({},I),{},{fill:"none"},Y),se=R.map(B=>$t({entry:B},yxe(B,y,b,w,S,m,C,h,E))),L=se.map(B=>{var{entry:ae,line:G}=B;return v.createElement(Ur,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(ae.value,"-").concat(ae.coordinate,"-").concat(ae.tickCoord)},i&&v.createElement("line",Sl({},Q,G,{className:at("recharts-cartesian-axis-tick-line",hv(i,"className"))})))}),q=se.map((B,ae)=>{var G,D,{entry:V,tick:K}=B,ee=$t($t($t($t({verticalAnchor:z},I),{},{textAnchor:F,stroke:"none",fill:o},K),{},{index:ae,payload:V,visibleTicksCount:R.length,tickFormatter:l,padding:c},d),{},{angle:(G=(D=d?.angle)!==null&&D!==void 0?D:I.angle)!==null&&G!==void 0?G:0}),he=$t($t({},ee),$);return v.createElement(Ur,Sl({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(V.value,"-").concat(V.coordinate,"-").concat(V.tickCoord)},e$(N,V,ae)),r&&v.createElement(wxe,{option:r,tickProps:he,value:"".concat(typeof l=="function"?l(V.value,ae):V.value).concat(u||"")}))});return v.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(_,"-ticks")},v.createElement(Sxe,{ticks:R,axisId:M,axisType:_}),q.length>0&&v.createElement(yo,{zIndex:nr.label},v.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(_,"-tick-labels"),ref:t},q)),L.length>0&&v.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(_,"-tick-lines")},L))}),Cxe=v.forwardRef((e,t)=>{var{axisLine:n,width:r,height:i,className:o,hide:l,ticks:u,axisType:c,axisId:d}=e,m=dxe(e,fxe),[h,y]=v.useState(""),[b,w]=v.useState(""),S=v.useRef(null);v.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var E;return oxe({ticks:S.current,label:(E=e.labelRef)===null||E===void 0?void 0:E.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var C=v.useCallback(E=>{if(E){var j=E.getElementsByClassName("recharts-cartesian-axis-tick-value");S.current=j;var T=j[0];if(T){var O=window.getComputedStyle(T),N=O.fontSize,_=O.letterSpacing;(N!==h||_!==b)&&(y(N),w(_))}}},[h,b]);return l||r!=null&&r<=0||i!=null&&i<=0?null:v.createElement(yo,{zIndex:e.zIndex},v.createElement(Ur,{className:at("recharts-cartesian-axis",o)},v.createElement(vxe,{x:e.x,y:e.y,width:r,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:n,otherSvgProps:Ri(e)}),v.createElement(Axe,{ref:C,axisType:c,events:m,fontSize:h,getTicksConfig:e,height:e.height,letterSpacing:b,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:u,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:d}),v.createElement(bbe,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},v.createElement(Pbe,{label:e.label,labelRef:e.labelRef}),e.children)))}),jE=v.forwardRef((e,t)=>{var n=Yn(e,ll);return v.createElement(Cxe,Sl({},n,{ref:t}))});jE.displayName="CartesianAxis";var Exe={},cV=Xn({name:"errorBars",initialState:Exe,reducers:{addErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]||(e[n]=[]),e[n].push(r)},replaceErrorBar:(e,t)=>{var{itemId:n,prev:r,next:i}=t.payload;e[n]&&(e[n]=e[n].map(o=>o.dataKey===r.dataKey&&o.direction===r.direction?i:o))},removeErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]&&(e[n]=e[n].filter(i=>i.dataKey!==r.dataKey||i.direction!==r.direction))}}}),{addErrorBar:zSe,replaceErrorBar:$Se,removeErrorBar:BSe}=cV.actions,jxe=cV.reducer,Txe=["children"];function Oxe(e,t){if(e==null)return{};var n,r,i=Pxe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Pxe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Nxe={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},_xe=v.createContext(Nxe);function Mxe(e){var{children:t}=e,n=Oxe(e,Txe);return v.createElement(_xe.Provider,{value:n},t)}function TE(e,t){var n,r,i=Me(d=>po(d,e)),o=Me(d=>go(d,t)),l=(n=i?.allowDataOverflow)!==null&&n!==void 0?n:dn.allowDataOverflow,u=(r=o?.allowDataOverflow)!==null&&r!==void 0?r:hn.allowDataOverflow,c=l||u;return{needClip:c,needClipX:l,needClipY:u}}function fV(e){var{xAxisId:t,yAxisId:n,clipPathId:r}=e,i=Jv(),{needClipX:o,needClipY:l,needClip:u}=TE(t,n);if(!u||!i)return null;var{x:c,y:d,width:m,height:h}=i;return v.createElement("clipPath",{id:"clipPath-".concat(r)},v.createElement("rect",{x:o?c:c-m/2,y:l?d:d-h/2,width:o?m:m*2,height:l?h:h*2}))}var dV=(e,t,n,r)=>Qv(e,"xAxis",t,r),hV=(e,t,n,r)=>Zv(e,"xAxis",t,r),mV=(e,t,n,r)=>Qv(e,"yAxis",n,r),pV=(e,t,n,r)=>Zv(e,"yAxis",n,r),Rxe=te([xt,dV,mV,hV,pV],(e,t,n,r,i)=>Ii(e,"xAxis")?Wu(t,r,!1):Wu(n,i,!1)),Dxe=(e,t,n,r,i)=>i;function kxe(e){return e.type==="line"}var Lxe=te([oE,Dxe],(e,t)=>e.filter(kxe).find(n=>n.id===t)),Ixe=te([xt,dV,mV,hV,pV,Lxe,Rxe,Kd],(e,t,n,r,i,o,l,u)=>{var{chartData:c,dataStartIndex:d,dataEndIndex:m}=u;if(!(o==null||t==null||n==null||r==null||i==null||r.length===0||i.length===0||l==null||e!=="horizontal"&&e!=="vertical")){var{dataKey:h,data:y}=o,b;if(y!=null&&y.length>0?b=y:b=c?.slice(d,m+1),b!=null)return rwe({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataKey:h,bandSize:l,displayedData:b})}});function gV(e){var t=uv(e),n=3,r=2;if(t!=null){var{r:i,strokeWidth:o}=t,l=Number(i),u=Number(o);return(Number.isNaN(l)||l<0)&&(l=n),(Number.isNaN(u)||u<0)&&(u=r),{r:l,strokeWidth:u}}return{r:n,strokeWidth:r}}var zxe=["id"],$xe=["type","layout","connectNulls","needClip","shape"],Bxe=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function Td(){return Td=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Td.apply(null,arguments)}function oL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Qi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?oL(Object(n),!0).forEach(function(r){Uxe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Uxe(e,t,n){return(t=Vxe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vxe(e){var t=Fxe(e,"string");return typeof t=="symbol"?t:t+""}function Fxe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function OE(e,t){if(e==null)return{};var n,r,i=qxe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function qxe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Hxe=e=>{var{dataKey:t,name:n,stroke:r,legendType:i,hide:o}=e;return[{inactive:o,dataKey:t,type:i,color:r,value:Cv(n,t),payload:e}]},Kxe=v.memo(e=>{var{dataKey:t,data:n,stroke:r,strokeWidth:i,fill:o,name:l,hide:u,unit:c,tooltipType:d,id:m}=e,h={dataDefinedOnItem:n,getPosition:jl,settings:{stroke:r,strokeWidth:i,fill:o,dataKey:t,nameKey:void 0,name:Cv(l,t),hide:u,type:d,color:r,unit:c,graphicalItemId:m}};return v.createElement(Q6,{tooltipEntrySettings:h})}),vV=(e,t)=>"".concat(t,"px ").concat(e,"px");function Gxe(e,t){for(var n=e.length%2!==0?[...e,0]:e,r=[],i=0;i<t;++i)r.push(...n);return r}var Wxe=(e,t,n)=>{var r=n.reduce((y,b)=>y+b,0);if(!r)return vV(t,e);for(var i=Math.floor(e/r),o=e%r,l=[],u=0,c=0;u<n.length;c+=(d=n[u])!==null&&d!==void 0?d:0,++u){var d,m=n[u];if(m!=null&&c+m>o){l=[...n.slice(0,u),o-c];break}}var h=l.length%2===0?[0,t]:[t];return[...Gxe(n,i),...l,...h].map(y=>"".concat(y,"px")).join(", ")};function Yxe(e){var{clipPathId:t,points:n,props:r}=e,{dot:i,dataKey:o,needClip:l}=r,{id:u}=r,c=OE(r,zxe),d=Ri(c);return v.createElement(rV,{points:n,dot:i,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:o,baseProps:d,needClip:l,clipPathId:t})}function Xxe(e){var{showLabels:t,children:n,points:r}=e,i=v.useMemo(()=>r?.map(o=>{var l,u,c={x:(l=o.x)!==null&&l!==void 0?l:0,y:(u=o.y)!==null&&u!==void 0?u:0,width:0,lowerWidth:0,upperWidth:0,height:0};return Qi(Qi({},c),{},{value:o.value,payload:o.payload,viewBox:c,parentViewBox:void 0,fill:void 0})}),[r]);return v.createElement(G6,{value:t?i:void 0},n)}function sL(e){var{clipPathId:t,pathRef:n,points:r,strokeDasharray:i,props:o}=e,{type:l,layout:u,connectNulls:c,needClip:d,shape:m}=o,h=OE(o,$xe),y=Qi(Qi({},Wn(h)),{},{fill:"none",className:"recharts-line-curve",clipPath:d?"url(#clipPath-".concat(t,")"):void 0,points:r,type:l,layout:u,connectNulls:c,strokeDasharray:i??o.strokeDasharray});return v.createElement(v.Fragment,null,r?.length>1&&v.createElement(r0e,Td({shapeType:"curve",option:m},y,{pathRef:n})),v.createElement(Yxe,{points:r,clipPathId:t,props:o}))}function Zxe(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function Qxe(e){var{clipPathId:t,props:n,pathRef:r,previousPointsRef:i,longestAnimatedLengthRef:o}=e,{points:l,strokeDasharray:u,isAnimationActive:c,animationBegin:d,animationDuration:m,animationEasing:h,animateNewValues:y,width:b,height:w,onAnimationEnd:S,onAnimationStart:C}=n,E=i.current,j=Dv(l,"recharts-line-"),T=v.useRef(j),[O,N]=v.useState(!1),_=!O,M=v.useCallback(()=>{typeof S=="function"&&S(),N(!1)},[S]),R=v.useCallback(()=>{typeof C=="function"&&C(),N(!0)},[C]),I=Zxe(r.current),$=v.useRef(0);T.current!==j&&($.current=o.current,T.current=j);var F=$.current;return v.createElement(Xxe,{points:l,showLabels:_},n.children,v.createElement(Rv,{animationId:j,begin:d,duration:m,isActive:c,easing:h,onAnimationEnd:M,onAnimationStart:R,key:j},z=>{var Y=rn(F,I+F,z),Q=Math.min(Y,I),se;if(c)if(u){var L="".concat(u).split(/[,\s]+/gim).map(ae=>parseFloat(ae));se=Wxe(Q,I,L)}else se=vV(I,Q);else se=u==null?void 0:String(u);if(z>0&&I>0&&(i.current=l,o.current=Math.max(o.current,Q)),E){var q=E.length/l.length,B=z===1?l:l.map((ae,G)=>{var D=Math.floor(G*q);if(E[D]){var V=E[D];return Qi(Qi({},ae),{},{x:rn(V.x,ae.x,z),y:rn(V.y,ae.y,z)})}return y?Qi(Qi({},ae),{},{x:rn(b*2,ae.x,z),y:rn(w/2,ae.y,z)}):Qi(Qi({},ae),{},{x:ae.x,y:ae.y})});return i.current=B,v.createElement(sL,{props:n,points:B,clipPathId:t,pathRef:r,strokeDasharray:se})}return v.createElement(sL,{props:n,points:l,clipPathId:t,pathRef:r,strokeDasharray:se})}),v.createElement(Y6,{label:n.label}))}function Jxe(e){var{clipPathId:t,props:n}=e,r=v.useRef(null),i=v.useRef(0),o=v.useRef(null);return v.createElement(Qxe,{props:n,clipPathId:t,previousPointsRef:r,longestAnimatedLengthRef:i,pathRef:o})}var ewe=(e,t)=>{var n,r;return{x:(n=e.x)!==null&&n!==void 0?n:void 0,y:(r=e.y)!==null&&r!==void 0?r:void 0,value:e.value,errorVal:sn(e.payload,t)}};class twe extends v.Component{render(){var{hide:t,dot:n,points:r,className:i,xAxisId:o,yAxisId:l,top:u,left:c,width:d,height:m,id:h,needClip:y,zIndex:b}=this.props;if(t)return null;var w=at("recharts-line",i),S=h,{r:C,strokeWidth:E}=gV(n),j=EE(n),T=C*2+E,O=y?"url(#clipPath-".concat(j?"":"dots-").concat(S,")"):void 0;return v.createElement(yo,{zIndex:b},v.createElement(Ur,{className:w},y&&v.createElement("defs",null,v.createElement(fV,{clipPathId:S,xAxisId:o,yAxisId:l}),!j&&v.createElement("clipPath",{id:"clipPath-dots-".concat(S)},v.createElement("rect",{x:c-T/2,y:u-T/2,width:d+T,height:m+T}))),v.createElement(Mxe,{xAxisId:o,yAxisId:l,data:r,dataPointFormatter:ewe,errorBarOffset:0},v.createElement(Jxe,{props:this.props,clipPathId:S}))),v.createElement(ES,{activeDot:this.props.activeDot,points:r,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:O}))}}var yV={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:"auto",label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:nr.line,type:"linear"};function nwe(e){var t=Yn(e,yV),{activeDot:n,animateNewValues:r,animationBegin:i,animationDuration:o,animationEasing:l,connectNulls:u,dot:c,hide:d,isAnimationActive:m,label:h,legendType:y,xAxisId:b,yAxisId:w,id:S}=t,C=OE(t,Bxe),{needClip:E}=TE(b,w),j=Jv(),T=Tl(),O=or(),N=Me($=>Ixe($,b,w,O,S));if(T!=="horizontal"&&T!=="vertical"||N==null||j==null)return null;var{height:_,width:M,x:R,y:I}=j;return v.createElement(twe,Td({},C,{id:S,connectNulls:u,dot:c,activeDot:n,animateNewValues:r,animationBegin:i,animationDuration:o,animationEasing:l,isAnimationActive:m,hide:d,label:h,legendType:y,xAxisId:b,yAxisId:w,points:N,layout:T,height:_,width:M,left:R,top:I,needClip:E}))}function rwe(e){var{layout:t,xAxis:n,yAxis:r,xAxisTicks:i,yAxisTicks:o,dataKey:l,bandSize:u,displayedData:c}=e;return c.map((d,m)=>{var h=sn(d,l);if(t==="horizontal"){var y=eg({axis:n,ticks:i,bandSize:u,entry:d,index:m}),b=vn(h)?null:r.scale.map(h);return{x:y,y:b??null,value:h,payload:d}}var w=vn(h)?null:n.scale.map(h),S=eg({axis:r,ticks:o,bandSize:u,entry:d,index:m});return w==null||S==null?null:{x:w,y:S,value:h,payload:d}}).filter(Boolean)}function iwe(e){var t=Yn(e,yV),n=or();return v.createElement(eV,{id:t.id,type:"line"},r=>v.createElement(v.Fragment,null,v.createElement(J6,{legendPayload:Hxe(t)}),v.createElement(Kxe,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:r}),v.createElement(nV,{type:"line",id:r,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:n}),v.createElement(nwe,Td({},t,{id:r}))))}var bV=v.memo(iwe,mc);bV.displayName="Line";function PE(e,t){var n,r;return(n=(r=e.graphicalItems.cartesianItems.find(i=>i.id===t))===null||r===void 0?void 0:r.xAxisId)!==null&&n!==void 0?n:iV}function NE(e,t){var n,r;return(n=(r=e.graphicalItems.cartesianItems.find(i=>i.id===t))===null||r===void 0?void 0:r.yAxisId)!==null&&n!==void 0?n:iV}var xV=(e,t,n)=>Qv(e,"xAxis",PE(e,t),n),wV=(e,t,n)=>Zv(e,"xAxis",PE(e,t),n),SV=(e,t,n)=>Qv(e,"yAxis",NE(e,t),n),AV=(e,t,n)=>Zv(e,"yAxis",NE(e,t),n),awe=te([xt,xV,SV,wV,AV],(e,t,n,r,i)=>Ii(e,"xAxis")?Wu(t,r,!1):Wu(n,i,!1)),owe=(e,t)=>t,CV=te([oE,owe],(e,t)=>e.filter(n=>n.type==="area").find(n=>n.id===t)),EV=e=>{var t=xt(e),n=Ii(t,"xAxis");return n?"yAxis":"xAxis"},swe=(e,t)=>{var n=EV(e);return n==="yAxis"?NE(e,t):PE(e,t)},lwe=(e,t,n)=>kU(e,EV(e),swe(e,t),n),uwe=te([CV,lwe],(e,t)=>{var n;if(!(e==null||t==null)){var{stackId:r}=e,i=MC(e);if(!(r==null||i==null)){var o=(n=t[r])===null||n===void 0?void 0:n.stackedData,l=o?.find(u=>u.key===i);if(l!=null)return l.map(u=>[u[0],u[1]])}}}),cwe=te([xt,xV,SV,wV,AV,uwe,gde,awe,CV,Ede],(e,t,n,r,i,o,l,u,c,d)=>{var{chartData:m,dataStartIndex:h,dataEndIndex:y}=l;if(!(c==null||e!=="horizontal"&&e!=="vertical"||t==null||n==null||r==null||i==null||r.length===0||i.length===0||u==null)){var{data:b}=c,w;if(b&&b.length>0?w=b:w=m?.slice(h,y+1),w!=null)return Nwe({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataStartIndex:h,areaSettings:c,stackedData:o,displayedData:w,chartBaseValue:d,bandSize:u})}}),fwe=["id"],dwe=["activeDot","animationBegin","animationDuration","animationEasing","connectNulls","dot","fill","fillOpacity","hide","isAnimationActive","legendType","stroke","xAxisId","yAxisId"];function ul(){return ul=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ul.apply(null,arguments)}function jV(e,t){if(e==null)return{};var n,r,i=hwe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function hwe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function lL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ru(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lL(Object(n),!0).forEach(function(r){mwe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mwe(e,t,n){return(t=pwe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pwe(e){var t=gwe(e,"string");return typeof t=="symbol"?t:t+""}function gwe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Pg(e,t){return e&&e!=="none"?e:t}var vwe=e=>{var{dataKey:t,name:n,stroke:r,fill:i,legendType:o,hide:l}=e;return[{inactive:l,dataKey:t,type:o,color:Pg(r,i),value:Cv(n,t),payload:e}]},ywe=v.memo(e=>{var{dataKey:t,data:n,stroke:r,strokeWidth:i,fill:o,name:l,hide:u,unit:c,tooltipType:d,id:m}=e,h={dataDefinedOnItem:n,getPosition:jl,settings:{stroke:r,strokeWidth:i,fill:o,dataKey:t,nameKey:void 0,name:Cv(l,t),hide:u,type:d,color:Pg(r,o),unit:c,graphicalItemId:m}};return v.createElement(Q6,{tooltipEntrySettings:h})});function bwe(e){var{clipPathId:t,points:n,props:r}=e,{needClip:i,dot:o,dataKey:l}=r,u=Ri(r);return v.createElement(rV,{points:n,dot:o,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:l,baseProps:u,needClip:i,clipPathId:t})}function xwe(e){var{showLabels:t,children:n,points:r}=e,i=r.map(o=>{var l,u,c={x:(l=o.x)!==null&&l!==void 0?l:0,y:(u=o.y)!==null&&u!==void 0?u:0,width:0,lowerWidth:0,upperWidth:0,height:0};return Ru(Ru({},c),{},{value:o.value,payload:o.payload,parentViewBox:void 0,viewBox:c,fill:void 0})});return v.createElement(G6,{value:t?i:void 0},n)}function uL(e){var{points:t,baseLine:n,needClip:r,clipPathId:i,props:o}=e,{layout:l,type:u,stroke:c,connectNulls:d,isRange:m}=o,{id:h}=o,y=jV(o,fwe),b=Ri(y),w=Wn(y);return v.createElement(v.Fragment,null,t?.length>1&&v.createElement(Ur,{clipPath:r?"url(#clipPath-".concat(i,")"):void 0},v.createElement(Wf,ul({},w,{id:h,points:t,connectNulls:d,type:u,baseLine:n,layout:l,stroke:"none",className:"recharts-area-area"})),c!=="none"&&v.createElement(Wf,ul({},b,{className:"recharts-area-curve",layout:l,type:u,connectNulls:d,fill:"none",points:t})),c!=="none"&&m&&Array.isArray(n)&&v.createElement(Wf,ul({},b,{className:"recharts-area-curve",layout:l,type:u,connectNulls:d,fill:"none",points:n}))),v.createElement(bwe,{points:t,props:y,clipPathId:i}))}function wwe(e){var t,n,{alpha:r,baseLine:i,points:o,strokeWidth:l}=e,u=(t=o[0])===null||t===void 0?void 0:t.y,c=(n=o[o.length-1])===null||n===void 0?void 0:n.y;if(!nt(u)||!nt(c))return null;var d=r*Math.abs(u-c),m=Math.max(...o.map(h=>h.x||0));return Pe(i)?m=Math.max(i,m):i&&Array.isArray(i)&&i.length&&(m=Math.max(...i.map(h=>h.x||0),m)),Pe(m)?v.createElement("rect",{x:0,y:u<c?u:u-d,width:m+(l?parseInt("".concat(l),10):1),height:Math.floor(d)}):null}function Swe(e){var t,n,{alpha:r,baseLine:i,points:o,strokeWidth:l}=e,u=(t=o[0])===null||t===void 0?void 0:t.x,c=(n=o[o.length-1])===null||n===void 0?void 0:n.x;if(!nt(u)||!nt(c))return null;var d=r*Math.abs(u-c),m=Math.max(...o.map(h=>h.y||0));return Pe(i)?m=Math.max(i,m):i&&Array.isArray(i)&&i.length&&(m=Math.max(...i.map(h=>h.y||0),m)),Pe(m)?v.createElement("rect",{x:u<c?u:u-d,y:0,width:d,height:Math.floor(m+(l?parseInt("".concat(l),10):1))}):null}function Awe(e){var{alpha:t,layout:n,points:r,baseLine:i,strokeWidth:o}=e;return n==="vertical"?v.createElement(wwe,{alpha:t,points:r,baseLine:i,strokeWidth:o}):v.createElement(Swe,{alpha:t,points:r,baseLine:i,strokeWidth:o})}function Cwe(e){var{needClip:t,clipPathId:n,props:r,previousPointsRef:i,previousBaselineRef:o}=e,{points:l,baseLine:u,isAnimationActive:c,animationBegin:d,animationDuration:m,animationEasing:h,onAnimationStart:y,onAnimationEnd:b}=r,w=v.useMemo(()=>({points:l,baseLine:u}),[l,u]),S=Dv(w,"recharts-area-"),C=bC(),[E,j]=v.useState(!1),T=!E,O=v.useCallback(()=>{typeof b=="function"&&b(),j(!1)},[b]),N=v.useCallback(()=>{typeof y=="function"&&y(),j(!0)},[y]);if(C==null)return null;var _=i.current,M=o.current;return v.createElement(xwe,{showLabels:T,points:l},r.children,v.createElement(Rv,{animationId:S,begin:d,duration:m,isActive:c,easing:h,onAnimationEnd:O,onAnimationStart:N,key:S},R=>{if(_){var I=_.length/l.length,$=R===1?l:l.map((z,Y)=>{var Q=Math.floor(Y*I);if(_[Q]){var se=_[Q];return Ru(Ru({},z),{},{x:rn(se.x,z.x,R),y:rn(se.y,z.y,R)})}return z}),F;return Pe(u)?F=rn(M,u,R):vn(u)||ha(u)?F=rn(M,0,R):F=u.map((z,Y)=>{var Q=Math.floor(Y*I);if(Array.isArray(M)&&M[Q]){var se=M[Q];return Ru(Ru({},z),{},{x:rn(se.x,z.x,R),y:rn(se.y,z.y,R)})}return z}),R>0&&(i.current=$,o.current=F),v.createElement(uL,{points:$,baseLine:F,needClip:t,clipPathId:n,props:r})}return R>0&&(i.current=l,o.current=u),v.createElement(Ur,null,c&&v.createElement("defs",null,v.createElement("clipPath",{id:"animationClipPath-".concat(n)},v.createElement(Awe,{alpha:R,points:l,baseLine:u,layout:C,strokeWidth:r.strokeWidth}))),v.createElement(Ur,{clipPath:"url(#animationClipPath-".concat(n,")")},v.createElement(uL,{points:l,baseLine:u,needClip:t,clipPathId:n,props:r})))}),v.createElement(Y6,{label:r.label}))}function Ewe(e){var{needClip:t,clipPathId:n,props:r}=e,i=v.useRef(null),o=v.useRef();return v.createElement(Cwe,{needClip:t,clipPathId:n,props:r,previousPointsRef:i,previousBaselineRef:o})}class jwe extends v.PureComponent{render(){var{hide:t,dot:n,points:r,className:i,top:o,left:l,needClip:u,xAxisId:c,yAxisId:d,width:m,height:h,id:y,baseLine:b,zIndex:w}=this.props;if(t)return null;var S=at("recharts-area",i),C=y,{r:E,strokeWidth:j}=gV(n),T=EE(n),O=E*2+j,N=u?"url(#clipPath-".concat(T?"":"dots-").concat(C,")"):void 0;return v.createElement(yo,{zIndex:w},v.createElement(Ur,{className:S},u&&v.createElement("defs",null,v.createElement(fV,{clipPathId:C,xAxisId:c,yAxisId:d}),!T&&v.createElement("clipPath",{id:"clipPath-dots-".concat(C)},v.createElement("rect",{x:l-O/2,y:o-O/2,width:m+O,height:h+O}))),v.createElement(Ewe,{needClip:u,clipPathId:C,props:this.props})),v.createElement(ES,{points:r,mainColor:Pg(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:N}),this.props.isRange&&Array.isArray(b)&&v.createElement(ES,{points:b,mainColor:Pg(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:N}))}}var Twe={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:"auto",legendType:"line",stroke:"#3182bd",strokeWidth:1,type:"linear",label:!1,xAxisId:0,yAxisId:0,zIndex:nr.area};function Owe(e){var t,{activeDot:n,animationBegin:r,animationDuration:i,animationEasing:o,connectNulls:l,dot:u,fill:c,fillOpacity:d,hide:m,isAnimationActive:h,legendType:y,stroke:b,xAxisId:w,yAxisId:S}=e,C=jV(e,dwe),E=Tl(),j=E6(),{needClip:T}=TE(w,S),O=or(),{points:N,isRange:_,baseLine:M}=(t=Me(Y=>cwe(Y,e.id,O)))!==null&&t!==void 0?t:{},R=Jv();if(E!=="horizontal"&&E!=="vertical"||R==null||j!=="AreaChart"&&j!=="ComposedChart")return null;var{height:I,width:$,x:F,y:z}=R;return!N||!N.length?null:v.createElement(jwe,ul({},C,{activeDot:n,animationBegin:r,animationDuration:i,animationEasing:o,baseLine:M,connectNulls:l,dot:u,fill:c,fillOpacity:d,height:I,hide:m,layout:E,isAnimationActive:h,isRange:_,legendType:y,needClip:T,points:N,stroke:b,width:$,left:F,top:z,xAxisId:w,yAxisId:S}))}var Pwe=(e,t,n,r,i)=>{var o=n??t;if(Pe(o))return o;var l=e==="horizontal"?i:r,u=l.scale.domain();if(l.type==="number"){var c=Math.max(u[0],u[1]),d=Math.min(u[0],u[1]);return o==="dataMin"?d:o==="dataMax"||c<0?c:Math.max(Math.min(u[0],u[1]),0)}return o==="dataMin"?u[0]:o==="dataMax"?u[1]:u[0]};function Nwe(e){var{areaSettings:{connectNulls:t,baseValue:n,dataKey:r},stackedData:i,layout:o,chartBaseValue:l,xAxis:u,yAxis:c,displayedData:d,dataStartIndex:m,xAxisTicks:h,yAxisTicks:y,bandSize:b}=e,w=i&&i.length,S=Pwe(o,l,n,u,c),C=o==="horizontal",E=!1,j=d.map((O,N)=>{var _,M,R,I;if(w)I=i[m+N];else{var $=sn(O,r);Array.isArray($)?(I=$,E=!0):I=[S,$]}var F=(_=(M=I)===null||M===void 0?void 0:M[1])!==null&&_!==void 0?_:null,z=F==null||w&&!t&&sn(O,r)==null;if(C){var Y;return{x:eg({axis:u,ticks:h,bandSize:b,entry:O,index:N}),y:z?null:(Y=c.scale.map(F))!==null&&Y!==void 0?Y:null,value:I,payload:O}}return{x:z?null:(R=u.scale.map(F))!==null&&R!==void 0?R:null,y:eg({axis:c,ticks:y,bandSize:b,entry:O,index:N}),value:I,payload:O}}),T;return w||E?T=j.map(O=>{var N,_=Array.isArray(O.value)?O.value[0]:null;if(C){var M;return{x:O.x,y:_!=null&&O.y!=null&&(M=c.scale.map(_))!==null&&M!==void 0?M:null,payload:O.payload}}return{x:_!=null&&(N=u.scale.map(_))!==null&&N!==void 0?N:null,y:O.y,payload:O.payload}}):T=C?c.scale.map(S):u.scale.map(S),{points:j,baseLine:T??0,isRange:E}}function _we(e){var t=Yn(e,Twe),n=or();return v.createElement(eV,{id:t.id,type:"area"},r=>v.createElement(v.Fragment,null,v.createElement(J6,{legendPayload:vwe(t)}),v.createElement(ywe,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:r}),v.createElement(nV,{type:"area",id:r,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:sue(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:n,connectNulls:t.connectNulls}),v.createElement(Owe,ul({},t,{id:r}))))}var _E=v.memo(_we,mc);_E.displayName="Area";var Mwe=["domain","range"],Rwe=["domain","range"];function cL(e,t){if(e==null)return{};var n,r,i=Dwe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Dwe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function fL(e,t){return e===t?!0:Array.isArray(e)&&e.length===2&&Array.isArray(t)&&t.length===2?e[0]===t[0]&&e[1]===t[1]:!1}function TV(e,t){if(e===t)return!0;var{domain:n,range:r}=e,i=cL(e,Mwe),{domain:o,range:l}=t,u=cL(t,Rwe);return!fL(n,o)||!fL(r,l)?!1:mc(i,u)}var kwe=["type"],Lwe=["dangerouslySetInnerHTML","ticks","scale"],Iwe=["id","scale"];function jS(){return jS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jS.apply(null,arguments)}function dL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function hL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dL(Object(n),!0).forEach(function(r){zwe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zwe(e,t,n){return(t=$we(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $we(e){var t=Bwe(e,"string");return typeof t=="symbol"?t:t+""}function Bwe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function TS(e,t){if(e==null)return{};var n,r,i=Uwe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Uwe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Vwe(e){var t=Vt(),n=v.useRef(null),r=bC(),{type:i}=e,o=TS(e,kwe),l=Iv(r,"xAxis",i),u=v.useMemo(()=>{if(l!=null)return hL(hL({},o),{},{type:l})},[o,l]);return v.useLayoutEffect(()=>{u!=null&&(n.current===null?t(j0e(u)):n.current!==u&&t(T0e({prev:n.current,next:u})),n.current=u)},[u,t]),v.useLayoutEffect(()=>()=>{n.current&&(t(O0e(n.current)),n.current=null)},[t]),null}var Fwe=e=>{var{xAxisId:t,className:n}=e,r=Me(W$),i=or(),o="xAxis",l=Me(E=>n6(E,o,t,i)),u=Me(E=>tge(E,t)),c=Me(E=>sge(E,t)),d=Me(E=>SU(E,t));if(u==null||c==null||d==null)return null;var{dangerouslySetInnerHTML:m,ticks:h,scale:y}=e,b=TS(e,Lwe),{id:w,scale:S}=d,C=TS(d,Iwe);return v.createElement(jE,jS({},b,C,{x:c.x,y:c.y,width:u.width,height:u.height,className:at("recharts-".concat(o," ").concat(o),n),viewBox:r,ticks:l,axisType:o,axisId:t}))},qwe={allowDataOverflow:dn.allowDataOverflow,allowDecimals:dn.allowDecimals,allowDuplicatedCategory:dn.allowDuplicatedCategory,angle:dn.angle,axisLine:ll.axisLine,height:dn.height,hide:!1,includeHidden:dn.includeHidden,interval:dn.interval,label:!1,minTickGap:dn.minTickGap,mirror:dn.mirror,orientation:dn.orientation,padding:dn.padding,reversed:dn.reversed,scale:dn.scale,tick:dn.tick,tickCount:dn.tickCount,tickLine:ll.tickLine,tickSize:ll.tickSize,type:dn.type,niceTicks:dn.niceTicks,xAxisId:0},Hwe=e=>{var t=Yn(e,qwe);return v.createElement(v.Fragment,null,v.createElement(Vwe,{allowDataOverflow:t.allowDataOverflow,allowDecimals:t.allowDecimals,allowDuplicatedCategory:t.allowDuplicatedCategory,angle:t.angle,dataKey:t.dataKey,domain:t.domain,height:t.height,hide:t.hide,id:t.xAxisId,includeHidden:t.includeHidden,interval:t.interval,minTickGap:t.minTickGap,mirror:t.mirror,name:t.name,orientation:t.orientation,padding:t.padding,reversed:t.reversed,scale:t.scale,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,niceTicks:t.niceTicks}),v.createElement(Fwe,t))},ME=v.memo(Hwe,TV);ME.displayName="XAxis";var Kwe=["type"],Gwe=["dangerouslySetInnerHTML","ticks","scale"],Wwe=["id","scale"];function OS(){return OS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},OS.apply(null,arguments)}function mL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function pL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mL(Object(n),!0).forEach(function(r){Ywe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ywe(e,t,n){return(t=Xwe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xwe(e){var t=Zwe(e,"string");return typeof t=="symbol"?t:t+""}function Zwe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function PS(e,t){if(e==null)return{};var n,r,i=Qwe(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Qwe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Jwe(e){var t=Vt(),n=v.useRef(null),r=bC(),{type:i}=e,o=PS(e,Kwe),l=Iv(r,"yAxis",i),u=v.useMemo(()=>{if(l!=null)return pL(pL({},o),{},{type:l})},[l,o]);return v.useLayoutEffect(()=>{u!=null&&(n.current===null?t(P0e(u)):n.current!==u&&t(N0e({prev:n.current,next:u})),n.current=u)},[u,t]),v.useLayoutEffect(()=>()=>{n.current&&(t(_0e(n.current)),n.current=null)},[t]),null}function e1e(e){var{yAxisId:t,className:n,width:r,label:i}=e,o=v.useRef(null),l=v.useRef(null),u=Me(W$),c=or(),d=Vt(),m="yAxis",h=Me(_=>cge(_,t)),y=Me(_=>uge(_,t)),b=Me(_=>n6(_,m,t,c)),w=Me(_=>AU(_,t));if(v.useLayoutEffect(()=>{if(!(r!=="auto"||!h||CE(i)||v.isValidElement(i)||w==null)){var _=o.current;if(_){var M=_.getCalculatedWidth();Math.round(h.width)!==Math.round(M)&&d(M0e({id:t,width:M}))}}},[b,h,d,i,t,r,w]),h==null||y==null||w==null)return null;var{dangerouslySetInnerHTML:S,ticks:C,scale:E}=e,j=PS(e,Gwe),{id:T,scale:O}=w,N=PS(w,Wwe);return v.createElement(jE,OS({},j,N,{ref:o,labelRef:l,x:y.x,y:y.y,tickTextProps:r==="auto"?{width:void 0}:{width:r},width:h.width,height:h.height,className:at("recharts-".concat(m," ").concat(m),n),viewBox:u,ticks:b,axisType:m,axisId:t}))}var t1e={allowDataOverflow:hn.allowDataOverflow,allowDecimals:hn.allowDecimals,allowDuplicatedCategory:hn.allowDuplicatedCategory,angle:hn.angle,axisLine:ll.axisLine,hide:!1,includeHidden:hn.includeHidden,interval:hn.interval,label:!1,minTickGap:hn.minTickGap,mirror:hn.mirror,orientation:hn.orientation,padding:hn.padding,reversed:hn.reversed,scale:hn.scale,tick:hn.tick,tickCount:hn.tickCount,tickLine:ll.tickLine,tickSize:ll.tickSize,type:hn.type,niceTicks:hn.niceTicks,width:hn.width,yAxisId:0},n1e=e=>{var t=Yn(e,t1e);return v.createElement(v.Fragment,null,v.createElement(Jwe,{interval:t.interval,id:t.yAxisId,scale:t.scale,type:t.type,domain:t.domain,allowDataOverflow:t.allowDataOverflow,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,padding:t.padding,includeHidden:t.includeHidden,reversed:t.reversed,ticks:t.ticks,width:t.width,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:t.angle,minTickGap:t.minTickGap,tick:t.tick,tickFormatter:t.tickFormatter,niceTicks:t.niceTicks}),v.createElement(e1e,t))},Ng=v.memo(n1e,TV);Ng.displayName="YAxis";var r1e=(e,t)=>t,RE=te([r1e,xt,zB,An,b6,vo,Mve,Vn],$ve);function i1e(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function DE(e){var t=e.currentTarget.getBoundingClientRect(),n,r;if(i1e(e)){var i=e.currentTarget.getBBox();n=i.width>0?t.width/i.width:1,r=i.height>0?t.height/i.height:1}else{var o=e.currentTarget;n=o.offsetWidth>0?t.width/o.offsetWidth:1,r=o.offsetHeight>0?t.height/o.offsetHeight:1}var l=(u,c)=>({relativeX:Math.round((u-t.left)/n),relativeY:Math.round((c-t.top)/r)});return"touches"in e?Array.from(e.touches).map(u=>l(u.clientX,u.clientY)):l(e.clientX,e.clientY)}var OV=Vr("mouseClick"),PV=Ud();PV.startListening({actionCreator:OV,effect:(e,t)=>{var n=e.payload,r=RE(t.getState(),DE(n));r?.activeIndex!=null&&t.dispatch(Ege({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate}))}});var NS=Vr("mouseMove"),NV=Ud(),Su=null,zs=null,Mw=null;NV.startListening({actionCreator:NS,effect:(e,t)=>{var n=e.payload,r=t.getState(),{throttleDelay:i,throttledEvents:o}=r.eventSettings,l=o==="all"||o?.includes("mousemove");Su!==null&&(cancelAnimationFrame(Su),Su=null),zs!==null&&(typeof i!="number"||!l)&&(clearTimeout(zs),zs=null),Mw=DE(n);var u=()=>{var c=t.getState(),d=eh(c,c.tooltip.settings.shared);if(!Mw){Su=null,zs=null;return}if(d==="axis"){var m=RE(c,Mw);m?.activeIndex!=null?t.dispatch(u6({activeIndex:m.activeIndex,activeDataKey:void 0,activeCoordinate:m.activeCoordinate})):t.dispatch(l6())}Su=null,zs=null};if(!l){u();return}i==="raf"?Su=requestAnimationFrame(u):typeof i=="number"&&zs===null&&(zs=setTimeout(u,i))}});function a1e(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":e==="children"&&typeof t=="object"&&t!==null?"<<CHILDREN>>":t}var gL={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0,reverseStackOrder:!1},_V=Xn({name:"rootProps",initialState:gL,reducers:{updateOptions:(e,t)=>{var n;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(n=t.payload.barGap)!==null&&n!==void 0?n:gL.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className,e.baseValue=t.payload.baseValue,e.reverseStackOrder=t.payload.reverseStackOrder}}}),o1e=_V.reducer,{updateOptions:s1e}=_V.actions,l1e=null,u1e={updatePolarOptions:(e,t)=>e===null?t.payload:(e.startAngle=t.payload.startAngle,e.endAngle=t.payload.endAngle,e.cx=t.payload.cx,e.cy=t.payload.cy,e.innerRadius=t.payload.innerRadius,e.outerRadius=t.payload.outerRadius,e)},MV=Xn({name:"polarOptions",initialState:l1e,reducers:u1e}),{updatePolarOptions:USe}=MV.actions,c1e=MV.reducer,RV=Vr("keyDown"),DV=Vr("focus"),kV=Vr("blur"),ey=Ud(),Au=null,$s=null,Wm=null;ey.startListening({actionCreator:RV,effect:(e,t)=>{Wm=e.payload,Au!==null&&(cancelAnimationFrame(Au),Au=null);var n=t.getState(),{throttleDelay:r,throttledEvents:i}=n.eventSettings,o=i==="all"||i.includes("keydown");$s!==null&&(typeof r!="number"||!o)&&(clearTimeout($s),$s=null);var l=()=>{try{var u=t.getState(),c=u.rootProps.accessibilityLayer!==!1;if(!c)return;var{keyboardInteraction:d}=u.tooltip,m=Wm;if(m!=="ArrowRight"&&m!=="ArrowLeft"&&m!=="Enter")return;var h=Yf(d,wl(u),ec(u),tc(u)),y=h==null?-1:Number(h),b=!Number.isFinite(y)||y<0,w=vo(u),S=wl(u),C=eh(u,u.tooltip.settings.shared);if(m==="Enter"){if(b)return;var E=Cg(u,C,"hover",String(d.index));t.dispatch(Ag({active:!d.active,activeIndex:d.index,activeCoordinate:E}));return}var j=pge(u),T=j==="left-to-right"?1:-1,O=m==="ArrowRight"?1:-1,N;if(b){var _=ec(u),M=tc(u),R=O*T,I=Q=>({active:!1,index:String(Q),dataKey:void 0,graphicalItemId:void 0,coordinate:void 0});if(N=-1,R>0){for(var $=0;$<S.length;$++)if(Yf(I($),S,_,M)!=null){N=$;break}}else for(var F=S.length-1;F>=0;F--)if(Yf(I(F),S,_,M)!=null){N=F;break}if(N<0)return}else{N=y+O*T;var z=w?.length||S.length;if(z===0||N>=z||N<0)return}var Y=Cg(u,C,"hover",String(N));t.dispatch(Ag({active:!0,activeIndex:N.toString(),activeCoordinate:Y}))}finally{Au=null,$s=null}};if(!o){l();return}r==="raf"?Au=requestAnimationFrame(l):typeof r=="number"&&$s===null&&(l(),Wm=null,$s=setTimeout(()=>{Wm?l():($s=null,Au=null)},r))}});ey.startListening({actionCreator:DV,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:i}=n.tooltip;if(!i.active&&i.index==null){var o="0",l=eh(n,n.tooltip.settings.shared),u=Cg(n,l,"hover",String(o));t.dispatch(Ag({active:!0,activeIndex:o,activeCoordinate:u}))}}}});ey.startListening({actionCreator:kV,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:i}=n.tooltip;i.active&&t.dispatch(Ag({active:!1,activeIndex:i.index,activeCoordinate:i.coordinate}))}}});function LV(e){e.persist();var{currentTarget:t}=e;return new Proxy(e,{get:(n,r)=>{if(r==="currentTarget")return t;var i=Reflect.get(n,r);return typeof i=="function"?i.bind(n):i}})}var ai=Vr("externalEvent"),IV=Ud(),Ym=new Map,Rf=new Map,Rw=new Map;IV.startListening({actionCreator:ai,effect:(e,t)=>{var{handler:n,reactEvent:r}=e.payload;if(n!=null){var i=r.type,o=LV(r);Rw.set(i,{handler:n,reactEvent:o});var l=Ym.get(i);l!==void 0&&(cancelAnimationFrame(l),Ym.delete(i));var u=t.getState(),{throttleDelay:c,throttledEvents:d}=u.eventSettings,m=d,h=m==="all"||m?.includes(i),y=Rf.get(i);y!==void 0&&(typeof c!="number"||!h)&&(clearTimeout(y),Rf.delete(i));var b=()=>{var C=Rw.get(i);try{if(!C)return;var{handler:E,reactEvent:j}=C,T=t.getState(),O={activeCoordinate:vve(T),activeDataKey:mve(T),activeIndex:Cd(T),activeLabel:S6(T),activeTooltipIndex:Cd(T),isTooltipActive:yve(T)};E&&E(O,j)}finally{Ym.delete(i),Rf.delete(i),Rw.delete(i)}};if(!h){b();return}if(c==="raf"){var w=requestAnimationFrame(b);Ym.set(i,w)}else if(typeof c=="number"){if(!Rf.has(i)){b();var S=setTimeout(b,c);Rf.set(i,S)}}else b()}}});var f1e=te([Sc],e=>e.tooltipItemPayloads),d1e=te([f1e,(e,t)=>t,(e,t,n)=>n],(e,t,n)=>{if(t!=null){var r=e.find(o=>o.settings.graphicalItemId===n);if(r!=null){var{getPosition:i}=r;if(i!=null)return i(t)}}}),zV=Vr("touchMove"),$V=Ud(),Bs=null,Wo=null,vL=null,Df=null;$V.startListening({actionCreator:zV,effect:(e,t)=>{var n=e.payload;if(!(n.touches==null||n.touches.length===0)){Df=LV(n);var r=t.getState(),{throttleDelay:i,throttledEvents:o}=r.eventSettings,l=o==="all"||o.includes("touchmove");Bs!==null&&(cancelAnimationFrame(Bs),Bs=null),Wo!==null&&(typeof i!="number"||!l)&&(clearTimeout(Wo),Wo=null),vL=Array.from(n.touches).map(c=>DE({clientX:c.clientX,clientY:c.clientY,currentTarget:n.currentTarget}));var u=()=>{if(Df!=null){var c=t.getState(),d=eh(c,c.tooltip.settings.shared);if(d==="axis"){var m,h=(m=vL)===null||m===void 0?void 0:m[0];if(h==null){Bs=null,Wo=null;return}var y=RE(c,h);y?.activeIndex!=null&&t.dispatch(u6({activeIndex:y.activeIndex,activeDataKey:void 0,activeCoordinate:y.activeCoordinate}))}else if(d==="item"){var b,w=Df.touches[0];if(document.elementFromPoint==null||w==null)return;var S=document.elementFromPoint(w.clientX,w.clientY);if(!S||!S.getAttribute)return;var C=S.getAttribute(mue),E=(b=S.getAttribute(pue))!==null&&b!==void 0?b:void 0,j=Nl(c).find(N=>N.id===E);if(C==null||j==null||E==null)return;var{dataKey:T}=j,O=d1e(c,C,E);t.dispatch(Cge({activeDataKey:T,activeIndex:C,activeCoordinate:O,activeGraphicalItemId:E}))}Bs=null,Wo=null}};if(!l){u();return}i==="raf"?Bs=requestAnimationFrame(u):typeof i=="number"&&Wo===null&&(u(),Df=null,Wo=setTimeout(()=>{Df?u():(Wo=null,Bs=null)},i))}}});var BV={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},UV=Xn({name:"eventSettings",initialState:BV,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=t.payload.throttledEvents)}}}),{setEventSettings:h1e}=UV.actions,m1e=UV.reducer,p1e=y$({brush:V0e,cartesianAxis:R0e,chartData:pye,errorBars:jxe,eventSettings:m1e,graphicalItems:d0e,layout:Qle,legend:uce,options:cye,polarAxis:Ibe,polarOptions:c1e,referenceElements:K0e,renderedTicks:cxe,rootProps:o1e,tooltip:jge,zIndex:Qve}),g1e=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return Ale({reducer:p1e,preloadedState:t,middleware:r=>{var i;return r({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((i="es6")!==null&&i!==void 0?i:"")}).concat([PV.middleware,NV.middleware,ey.middleware,IV.middleware,$V.middleware])},enhancers:r=>{var i=r;return typeof r=="function"&&(i=r()),i.concat(R$({type:"raf"}))},devTools:{serialize:{replacer:a1e},name:"recharts-".concat(n)}})};function v1e(e){var{preloadedState:t,children:n,reduxStoreName:r}=e,i=or(),o=v.useRef(null);if(i)return n;o.current==null&&(o.current=g1e(t,r));var l=cC;return v.createElement(Tce,{context:l,store:o.current},n)}function y1e(e){var{layout:t,margin:n}=e,r=Vt(),i=or();return v.useEffect(()=>{i||(r(Yle(t)),r(Wle(n)))},[r,i,t,n]),null}var b1e=v.memo(y1e,mc);function x1e(e){var t=Vt();return v.useEffect(()=>{t(s1e(e))},[t,e]),null}var w1e=e=>{var t=Vt();return v.useEffect(()=>{t(h1e(e))},[t,e]),null},S1e=v.memo(w1e,mc);function yL(e){var{zIndex:t,isPanorama:n}=e,r=v.useRef(null),i=Vt();return v.useLayoutEffect(()=>(r.current&&i(Xve({zIndex:t,element:r.current,isPanorama:n})),()=>{i(Zve({zIndex:t,isPanorama:n}))}),[i,t,n]),v.createElement("g",{tabIndex:-1,ref:r,className:"recharts-zIndex-layer_".concat(t)})}function bL(e){var{children:t,isPanorama:n}=e,r=Me(Uve);if(!r||r.length===0)return t;var i=r.filter(l=>l<0),o=r.filter(l=>l>0);return v.createElement(v.Fragment,null,i.map(l=>v.createElement(yL,{key:l,zIndex:l,isPanorama:n})),t,o.map(l=>v.createElement(yL,{key:l,zIndex:l,isPanorama:n})))}var A1e=["children"];function C1e(e,t){if(e==null)return{};var n,r,i=E1e(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function E1e(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function _g(){return _g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_g.apply(null,arguments)}var j1e={width:"100%",height:"100%",display:"block"},T1e=v.forwardRef((e,t)=>{var n=J$(),r=eB(),i=fB();if(!us(n)||!us(r))return null;var{children:o,otherAttributes:l,title:u,desc:c}=e,d,m;return l!=null&&(typeof l.tabIndex=="number"?d=l.tabIndex:d=i?0:void 0,typeof l.role=="string"?m=l.role:m=i?"application":void 0),v.createElement(eC,_g({},l,{title:u,desc:c,role:m,tabIndex:d,width:n,height:r,style:j1e,ref:t}),o)}),O1e=e=>{var{children:t}=e,n=Me(Ov);if(!n)return null;var{width:r,height:i,y:o,x:l}=n;return v.createElement(eC,{width:r,height:i,x:l,y:o},t)},xL=v.forwardRef((e,t)=>{var{children:n}=e,r=C1e(e,A1e),i=or();return i?v.createElement(O1e,null,v.createElement(bL,{isPanorama:!0},n)):v.createElement(T1e,_g({ref:t},r),v.createElement(bL,{isPanorama:!1},n))});function P1e(){var e=Vt(),[t,n]=v.useState(null),r=Me(hue);return v.useEffect(()=>{if(t!=null){var i=t.getBoundingClientRect(),o=i.width/t.offsetWidth;nt(o)&&o!==r&&e(Zle(o))}},[t,e,r]),n}function wL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function N1e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wL(Object(n),!0).forEach(function(r){_1e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _1e(e,t,n){return(t=M1e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function M1e(e){var t=R1e(e,"string");return typeof t=="symbol"?t:t+""}function R1e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function rs(){return rs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rs.apply(null,arguments)}var D1e=()=>(Cye(),null);function Mg(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var k1e=v.forwardRef((e,t)=>{var n,r,i=v.useRef(null),[o,l]=v.useState({containerWidth:Mg((n=e.style)===null||n===void 0?void 0:n.width),containerHeight:Mg((r=e.style)===null||r===void 0?void 0:r.height)}),u=v.useCallback((d,m)=>{l(h=>{var y=Math.round(d),b=Math.round(m);return h.containerWidth===y&&h.containerHeight===b?h:{containerWidth:y,containerHeight:b}})},[]),c=v.useCallback(d=>{if(typeof t=="function"&&t(d),i.current!=null&&(i.current.disconnect(),i.current=null),d!=null&&typeof ResizeObserver<"u"){var{width:m,height:h}=d.getBoundingClientRect();u(m,h);var y=w=>{var S=w[0];if(S!=null){var{width:C,height:E}=S.contentRect;u(C,E)}},b=new ResizeObserver(y);b.observe(d),i.current=b}},[t,u]);return v.useEffect(()=>()=>{var d=i.current;d?.disconnect()},[u]),v.createElement(v.Fragment,null,v.createElement(Fd,{width:o.containerWidth,height:o.containerHeight}),v.createElement("div",rs({ref:c},e)))}),L1e=v.forwardRef((e,t)=>{var{width:n,height:r}=e,[i,o]=v.useState({containerWidth:Mg(n),containerHeight:Mg(r)}),l=v.useCallback((c,d)=>{o(m=>{var h=Math.round(c),y=Math.round(d);return m.containerWidth===h&&m.containerHeight===y?m:{containerWidth:h,containerHeight:y}})},[]),u=v.useCallback(c=>{if(typeof t=="function"&&t(c),c!=null){var{width:d,height:m}=c.getBoundingClientRect();l(d,m)}},[t,l]);return v.createElement(v.Fragment,null,v.createElement(Fd,{width:i.containerWidth,height:i.containerHeight}),v.createElement("div",rs({ref:u},e)))}),I1e=v.forwardRef((e,t)=>{var{width:n,height:r}=e;return v.createElement(v.Fragment,null,v.createElement(Fd,{width:n,height:r}),v.createElement("div",rs({ref:t},e)))}),z1e=v.forwardRef((e,t)=>{var{width:n,height:r}=e;return typeof n=="string"||typeof r=="string"?v.createElement(L1e,rs({},e,{ref:t})):typeof n=="number"&&typeof r=="number"?v.createElement(I1e,rs({},e,{width:n,height:r,ref:t})):v.createElement(v.Fragment,null,v.createElement(Fd,{width:n,height:r}),v.createElement("div",rs({ref:t},e)))});function $1e(e){return e?k1e:z1e}var B1e=v.forwardRef((e,t)=>{var{children:n,className:r,height:i,onClick:o,onContextMenu:l,onDoubleClick:u,onMouseDown:c,onMouseEnter:d,onMouseLeave:m,onMouseMove:h,onMouseUp:y,onTouchEnd:b,onTouchMove:w,onTouchStart:S,style:C,width:E,responsive:j,dispatchTouchEvents:T=!0}=e,O=v.useRef(null),N=Vt(),[_,M]=v.useState(null),[R,I]=v.useState(null),$=P1e(),F=vC(),z=F?.width>0?F.width:E,Y=F?.height>0?F.height:i,Q=v.useCallback(le=>{$(le),typeof t=="function"&&t(le),M(le),I(le),le!=null&&(O.current=le)},[$,t,M,I]),se=v.useCallback(le=>{N(OV(le)),N(ai({handler:o,reactEvent:le}))},[N,o]),L=v.useCallback(le=>{N(NS(le)),N(ai({handler:d,reactEvent:le}))},[N,d]),q=v.useCallback(le=>{N(l6()),N(ai({handler:m,reactEvent:le}))},[N,m]),B=v.useCallback(le=>{N(NS(le)),N(ai({handler:h,reactEvent:le}))},[N,h]),ae=v.useCallback(()=>{N(DV())},[N]),G=v.useCallback(()=>{N(kV())},[N]),D=v.useCallback(le=>{N(RV(le.key))},[N]),V=v.useCallback(le=>{N(ai({handler:l,reactEvent:le}))},[N,l]),K=v.useCallback(le=>{N(ai({handler:u,reactEvent:le}))},[N,u]),ee=v.useCallback(le=>{N(ai({handler:c,reactEvent:le}))},[N,c]),he=v.useCallback(le=>{N(ai({handler:y,reactEvent:le}))},[N,y]),ye=v.useCallback(le=>{N(ai({handler:S,reactEvent:le}))},[N,S]),X=v.useCallback(le=>{T&&N(zV(le)),N(ai({handler:w,reactEvent:le}))},[N,T,w]),me=v.useCallback(le=>{N(ai({handler:b,reactEvent:le}))},[N,b]),oe=$1e(j);return v.createElement(N6.Provider,{value:_},v.createElement(M4.Provider,{value:R},v.createElement(oe,{width:z??C?.width,height:Y??C?.height,className:at("recharts-wrapper",r),style:N1e({position:"relative",cursor:"default",width:z,height:Y},C),onClick:se,onContextMenu:V,onDoubleClick:K,onFocus:ae,onBlur:G,onKeyDown:D,onMouseDown:ee,onMouseEnter:L,onMouseLeave:q,onMouseMove:B,onMouseUp:he,onTouchEnd:me,onTouchMove:X,onTouchStart:ye,ref:Q},v.createElement(D1e,null),n)))}),U1e=["width","height","responsive","children","className","style","compact","title","desc"];function V1e(e,t){if(e==null)return{};var n,r,i=F1e(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function F1e(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var q1e=v.forwardRef((e,t)=>{var{width:n,height:r,responsive:i,children:o,className:l,style:u,compact:c,title:d,desc:m}=e,h=V1e(e,U1e),y=Ri(h);return c?v.createElement(v.Fragment,null,v.createElement(Fd,{width:n,height:r}),v.createElement(xL,{otherAttributes:y,title:d,desc:m},o)):v.createElement(B1e,{className:l,style:u,width:n,height:r,responsive:i??!1,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},v.createElement(xL,{otherAttributes:y,title:d,desc:m,ref:t},v.createElement(W0e,null,o)))});function _S(){return _S=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_S.apply(null,arguments)}function SL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function H1e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?SL(Object(n),!0).forEach(function(r){K1e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function K1e(e,t,n){return(t=G1e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function G1e(e){var t=W1e(e,"string");return typeof t=="symbol"?t:t+""}function W1e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Y1e={top:5,right:5,bottom:5,left:5},X1e=H1e({accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:Y1e,responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},BV),VV=v.forwardRef(function(t,n){var r,i=Yn(t.categoricalChartProps,X1e),{chartName:o,defaultTooltipEventType:l,validateTooltipEventTypes:u,tooltipPayloadSearcher:c,categoricalChartProps:d}=t,m={chartName:o,defaultTooltipEventType:l,validateTooltipEventTypes:u,tooltipPayloadSearcher:c,eventEmitter:void 0};return v.createElement(v1e,{preloadedState:{options:m},reduxStoreName:(r=d.id)!==null&&r!==void 0?r:o},v.createElement(U0e,{chartData:d.data}),v.createElement(b1e,{layout:i.layout,margin:i.margin}),v.createElement(S1e,{throttleDelay:i.throttleDelay,throttledEvents:i.throttledEvents}),v.createElement(x1e,{baseValue:i.baseValue,accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className,reverseStackOrder:i.reverseStackOrder}),v.createElement(q1e,_S({},i,{ref:n})))}),Z1e=["axis"],Q1e=v.forwardRef((e,t)=>v.createElement(VV,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:Z1e,tooltipPayloadSearcher:_6,categoricalChartProps:e,ref:t})),J1e=["axis"],eSe=v.forwardRef((e,t)=>v.createElement(VV,{chartName:"ComposedChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:J1e,tooltipPayloadSearcher:_6,categoricalChartProps:e,ref:t}));function FV(e){return e||Intl.DateTimeFormat().resolvedOptions().timeZone||void 0}function kE(e,t){const n=new Date(e);if(Number.isNaN(n.getTime()))return null;const i=new Intl.DateTimeFormat("en-CA",{timeZone:FV(t),year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",hourCycle:"h23"}).formatToParts(n),o=i.find(d=>d.type==="year")?.value,l=i.find(d=>d.type==="month")?.value,u=i.find(d=>d.type==="day")?.value,c=i.find(d=>d.type==="hour")?.value;return!o||!l||!u||!c?null:{year:o,month:l,day:u,hour:c}}function qV(e,t){const n=new Date(e);return Number.isNaN(n.getTime())?null:new Intl.DateTimeFormat("en",{timeZone:FV(t),hour:"2-digit",hourCycle:"h23",timeZoneName:"shortOffset"}).formatToParts(n).find(i=>i.type==="timeZoneName")?.value??null}function HV(e){const t=/(\d{2})-(\d{2})$/.exec(e);return t?`${t[1]}-${t[2]}`:e}function Rg(e,t,n={}){const r=kE(e,n.timeZone);if(!r)return e;const i=t?`${r.month}-${r.day} `:"",o=n.includeOffset?` ${qV(e,n.timeZone)??""}`:"";return`${i}${r.hour}:00${o}`.trimEnd()}function KV(e,t){const n=new Set;for(const r of e){const i=kE(r,t);i&&n.add(`${i.year}-${i.month}-${i.day}`)}return n.size>1}function GV(e,t={}){const n=kE(e,t.timeZone);if(!n)return e;const r=t.includeOffset?` ${qV(e,t.timeZone)??""}`:"";return`${n.year}-${n.month}-${n.day} ${n.hour}:00${r}`.trimEnd()}const Xm=["var(--color-chart-1)","var(--color-chart-2)","var(--color-chart-3)","var(--color-chart-4)","var(--color-chart-5)"],AL=["#2563eb","#16a34a","#ea580c","#8b5cf6","#0891b2"];function tSe(e,t){const n=t.active,r=t.payload;if(!n||!r?.length)return null;const i=r[0]?.payload;if(!i)return null;const o=i.tooltipDate??String(i.label??"");return g.jsxs("div",{className:"bg-popover text-popover-foreground rounded-md border px-3 py-2 text-xs shadow-md",children:[g.jsx("div",{className:"mb-1 font-medium",children:o}),g.jsx("div",{className:"space-y-0.5",children:e.map((l,u)=>g.jsxs("div",{className:"flex items-center justify-between gap-4",children:[g.jsxs("span",{className:"flex items-center gap-1.5",children:[g.jsx("span",{className:"inline-block h-2 w-2 rounded-full",style:{backgroundColor:AL[u%AL.length]}}),g.jsx("span",{className:"text-muted-foreground",children:l})]}),g.jsx("span",{className:"tabular-nums font-medium",children:i[l]??0})]},l))})]})}function nSe({data:e,isHourly:t=!1}){const{t:n}=Ye(),{pivoted:r,accountIds:i}=v.useMemo(()=>{const o=new Map,l=new Set;for(const b of e){l.add(b.account_id);let w=o.get(b.date);w||(w={},o.set(b.date,w)),w[b.account_id]=b.premium_consumed}const u=[...l],c=[...o.entries()].sort(([b],[w])=>b.localeCompare(w)),d=t?KV(c.map(([b])=>b)):!1,m=t?c.map(([b])=>Rg(b,d)):[],h=new Set(m.filter((b,w)=>m.indexOf(b)!==w));return{pivoted:c.map(([b,w],S)=>{const C=m[S],E=t&&h.has(C),j={label:t?Rg(b,d,{includeOffset:E}):HV(b)};t&&(j.tooltipDate=GV(b,{includeOffset:!0}));for(const T of u)j[T]=w[T]??0;return j}),accountIds:u}},[e,t]);return g.jsxs(gn,{children:[g.jsx(Dn,{children:g.jsx(kn,{children:n("statistics.accountUsage")})}),g.jsx(Ln,{children:r.length===0?g.jsx("div",{className:"text-muted-foreground flex h-64 items-center justify-center text-sm",children:n("statistics.noData")}):g.jsx(Q$,{width:"100%",height:320,children:g.jsxs(Q1e,{data:r,margin:{top:5,right:10,left:0,bottom:5},children:[g.jsx(ME,{dataKey:"label",tick:{fontSize:12},tickLine:!1,axisLine:!1}),g.jsx(Ng,{tick:{fontSize:12},tickLine:!1,axisLine:!1,width:50}),g.jsx(D6,{content:o=>tSe(i,o)}),g.jsx(uB,{wrapperStyle:{fontSize:"0.75rem"}}),i.map((o,l)=>g.jsx(_E,{type:"monotone",dataKey:o,name:o,stackId:"1",fill:Xm[l%Xm.length],fillOpacity:.3,stroke:Xm[l%Xm.length],strokeWidth:1.5},o))]})})})]})}function rSe(e,t){const n=t.active,r=t.payload;if(!n||!r?.length)return null;const i=r[0]?.payload;if(!i)return null;const o=i.tooltipDate??String(i.label??"");return g.jsxs("div",{className:"bg-popover text-popover-foreground rounded-md border px-3 py-2 text-xs shadow-md",children:[g.jsx("div",{className:"mb-1 font-medium",children:o}),g.jsxs("div",{className:"space-y-0.5",children:[g.jsxs("div",{className:"flex justify-between gap-4",children:[g.jsx("span",{className:"text-muted-foreground",children:e("statistics.costUnits")}),g.jsx("span",{className:"tabular-nums font-medium",children:i.premium_consumed})]}),g.jsxs("div",{className:"flex justify-between gap-4",children:[g.jsx("span",{className:"text-muted-foreground",children:e("statistics.requestCount")}),g.jsx("span",{className:"tabular-nums font-medium",children:i.request_count})]}),g.jsxs("div",{className:"flex justify-between gap-4",children:[g.jsx("span",{className:"text-muted-foreground",children:e("statistics.tokensTotal")}),g.jsx("span",{className:"tabular-nums font-medium",children:i.tokens_total})]}),g.jsxs("div",{className:"flex justify-between gap-4",children:[g.jsx("span",{className:"text-muted-foreground",children:e("statistics.errorCount")}),g.jsx("span",{className:"tabular-nums font-medium",children:i.error_count})]})]})]})}function iSe({data:e,isHourly:t=!1}){const{t:n}=Ye(),r=v.useMemo(()=>{if(!t)return e.map(u=>({...u,label:HV(u.date)}));const i=KV(e.map(u=>u.date)),o=e.map(u=>Rg(u.date,i)),l=new Set(o.filter((u,c)=>o.indexOf(u)!==c));return e.map((u,c)=>{const d=o[c],m=l.has(d);return{...u,label:Rg(u.date,i,{includeOffset:m}),tooltipDate:GV(u.date,{includeOffset:!0})}})},[e,t]);return g.jsxs(gn,{children:[g.jsx(Dn,{children:g.jsx(kn,{children:n("statistics.premiumUsage")})}),g.jsx(Ln,{children:r.length===0?g.jsx("div",{className:"text-muted-foreground flex h-64 items-center justify-center text-sm",children:n("statistics.noData")}):g.jsx(Q$,{width:"100%",height:320,children:g.jsxs(eSe,{data:r,margin:{top:5,right:10,left:0,bottom:5},children:[g.jsx(ME,{dataKey:"label",tick:{fontSize:12},tickLine:!1,axisLine:!1}),g.jsx(Ng,{yAxisId:"cost",tick:{fontSize:12},tickLine:!1,axisLine:!1,width:50}),g.jsx(Ng,{yAxisId:"count",orientation:"right",tick:{fontSize:12},tickLine:!1,axisLine:!1,width:50}),g.jsx(D6,{content:i=>rSe(n,i)}),g.jsx(_E,{yAxisId:"cost",type:"monotone",dataKey:"premium_consumed",name:n("statistics.costUnits"),fill:"var(--color-chart-1)",fillOpacity:.2,stroke:"var(--color-chart-1)",strokeWidth:2}),g.jsx(bV,{yAxisId:"count",type:"monotone",dataKey:"request_count",name:n("statistics.requestCount"),stroke:"var(--color-chart-2)",strokeWidth:2,strokeDasharray:"5 3",dot:!1})]})})})]})}function aSe(e){return Intl.DateTimeFormat().resolvedOptions().timeZone||void 0}function WV(e,t){const n=new Date(e);if(Number.isNaN(n.getTime()))return e;const i=new Intl.DateTimeFormat("en-CA",{timeZone:aSe(),year:"numeric",month:"2-digit",day:"2-digit"}).formatToParts(n),o=i.find(c=>c.type==="year")?.value,l=i.find(c=>c.type==="month")?.value,u=i.find(c=>c.type==="day")?.value;return!o||!l||!u?e:`${o}-${l}-${u}`}function oSe(e,t){const n=new Map;for(const r of e){const i=WV(r.date),o=n.get(i);if(o){o.request_count+=r.request_count,o.premium_consumed+=r.premium_consumed,o.tokens_total+=r.tokens_total,o.error_count+=r.error_count;continue}n.set(i,{date:i,request_count:r.request_count,premium_consumed:r.premium_consumed,tokens_total:r.tokens_total,error_count:r.error_count})}return[...n.values()].sort((r,i)=>r.date.localeCompare(i.date))}function sSe(e,t){const n=new Map;for(const r of e){const i=WV(r.date),o=`${i}|${r.account_id}`,l=n.get(o);if(l){l.request_count+=r.request_count,l.premium_consumed+=r.premium_consumed,l.tokens_total+=r.tokens_total,l.error_count+=r.error_count;continue}n.set(o,{date:i,account_id:r.account_id,request_count:r.request_count,premium_consumed:r.premium_consumed,tokens_total:r.tokens_total,error_count:r.error_count})}return[...n.values()].sort((r,i)=>r.date===i.date?r.account_id.localeCompare(i.account_id):r.date.localeCompare(i.date))}function Dw(e){const t=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0");return`${t}-${n}-${r}`}function kw(e){const[t,n,r]=e.split("-").map(Number);return new Date(t,n-1,r+1).getTime()-1}function Lw(e){const[t,n,r]=e.split("-").map(Number);return new Date(t,n-1,r).getTime()}function lSe(e,t){return!e||!t?null:e>t?"From date must not be after to date":null}function uSe(e){const{preset:t,customFrom:n,customTo:r,now:i=new Date}=e,o=Dw(i);if(t==="today"){const c=new Date(i.getFullYear(),i.getMonth(),i.getDate()).getTime(),d=new Date(i.getFullYear(),i.getMonth(),i.getDate()+1).getTime()-1;return{from:o,to:o,granularity:"hour",fromMs:c,toMs:d}}if(t==="7d"){const c=new Date(i.getFullYear(),i.getMonth(),i.getDate()-6),d=Dw(c);return{from:d,to:o,granularity:"day",fromMs:Lw(d),toMs:kw(o)}}if(t==="month"){const c=new Date(i.getFullYear(),i.getMonth(),1),d=Dw(c);return{from:d,to:o,granularity:"day",fromMs:Lw(d),toMs:kw(o)}}const l=n||o,u=r||o;return{from:l,to:u,granularity:"day",fromMs:Lw(l),toMs:kw(u)}}const cSe=840*60*60*1e3;function fSe(){const{t:e}=Ye(),[t,n]=v.useState("7d"),[r,i]=v.useState(""),[o,l]=v.useState(""),[u,c]=v.useState(0),[d,m]=v.useState(!1),[h,y]=v.useState([]),[b,w]=v.useState([]),[S,C]=v.useState(!1),E=v.useRef(!1),j=v.useRef(null),T=v.useCallback(async()=>{if(!E.current){if(t==="custom"){const O=lSe(r,o);if(O){Lt.error(yt.t("statistics.loadFailed"),{description:O});return}}E.current=!0,m(!0);try{const O=uSe({preset:t,customFrom:r,customTo:o}),N=O.fromMs,_=O.toMs,R=N!=null&&_!=null&&_-N<cSe,I=R?"hour":O.granularity,$=await Zne({from:O.from,to:O.to,granularity:I,fromMs:R?N:void 0,toMs:R?_:void 0});O.granularity==="day"&&I==="hour"?(y(oSe($.daily)),w(sSe($.by_account)),C(!1)):(y($.daily),w($.by_account),C(O.granularity==="hour"))}catch(O){const N=O instanceof di?O.message:String(O);Lt.error(yt.t("statistics.loadFailed"),{description:N})}finally{E.current=!1,m(!1)}}},[t,r,o]);return v.useEffect(()=>{T()},[T]),v.useEffect(()=>{let O=!1;if(j.current&&(clearTimeout(j.current),j.current=null),u>0){const N=()=>{O||(j.current=setTimeout(async()=>{if(E.current){N();return}try{await T()}finally{N()}},u))};N()}return()=>{O=!0,j.current&&(clearTimeout(j.current),j.current=null)}},[u,T]),g.jsxs("div",{className:"space-y-6",children:[g.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[g.jsx("h1",{className:"text-xl font-semibold",children:e("statistics.title")}),g.jsx("div",{className:"flex items-center gap-2",children:g.jsxs(zn,{value:t,onValueChange:O=>n(O),children:[g.jsx(Bn,{size:"sm",className:"w-32",children:g.jsx($n,{})}),g.jsxs(Un,{children:[g.jsx(Oe,{value:"today",children:e("statistics.timeRange.today")}),g.jsx(Oe,{value:"7d",children:e("statistics.timeRange.7d")}),g.jsx(Oe,{value:"month",children:e("statistics.timeRange.month")}),g.jsx(Oe,{value:"custom",children:e("statistics.timeRange.custom")})]})]})}),t==="custom"&&g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("input",{type:"date",value:r,onChange:O=>i(O.target.value),className:"border-input bg-background text-foreground h-8 rounded-md border px-2 text-sm"}),g.jsx("span",{className:"text-muted-foreground text-sm",children:"-"}),g.jsx("input",{type:"date",value:o,onChange:O=>l(O.target.value),className:"border-input bg-background text-foreground h-8 rounded-md border px-2 text-sm"})]}),g.jsxs("div",{className:"flex items-center gap-2",children:[u>0&&g.jsxs("span",{className:"relative flex h-2 w-2",children:[g.jsx("span",{className:"bg-primary absolute inline-flex h-full w-full rounded-full opacity-75 motion-safe:animate-ping"}),g.jsx("span",{className:"bg-primary relative inline-flex h-2 w-2 rounded-full"})]}),g.jsxs(zn,{value:String(u),onValueChange:O=>c(Number(O)),children:[g.jsx(Bn,{size:"sm",className:"w-40",children:g.jsx($n,{})}),g.jsxs(Un,{children:[g.jsx(Oe,{value:"0",children:e("statistics.autoRefresh.off")}),g.jsx(Oe,{value:"30000",children:e("statistics.autoRefresh.30s")}),g.jsx(Oe,{value:"60000",children:e("statistics.autoRefresh.60s")}),g.jsx(Oe,{value:"300000",children:e("statistics.autoRefresh.5m")})]})]})]})]}),d&&h.length===0?g.jsxs("div",{className:"space-y-6",children:[g.jsx("div",{className:"bg-muted h-[380px] animate-pulse rounded-xl"}),g.jsx("div",{className:"bg-muted h-[380px] animate-pulse rounded-xl"})]}):g.jsxs(g.Fragment,{children:[g.jsx(iSe,{data:h,isHourly:S}),g.jsx(nSe,{data:b,isHourly:S})]})]})}function dSe(){return g.jsx(gH,{children:g.jsxs(Zi,{element:g.jsx(gre,{}),children:[g.jsx(Zi,{path:"/",element:g.jsx(hH,{to:"/accounts",replace:!0})}),g.jsx(Zi,{path:"/accounts",element:g.jsx(bie,{})}),g.jsx(Zi,{path:"/requests",element:g.jsx(sae,{})}),g.jsx(Zi,{path:"/statistics",element:g.jsx(fSe,{})}),g.jsx(Zi,{path:"/models",element:g.jsx(jie,{})}),g.jsx(Zi,{path:"/settings",element:g.jsx(Bae,{})}),g.jsx(Zi,{path:"/request/:requestId",element:g.jsx(Rie,{})}),g.jsx(Zi,{path:"*",element:g.jsx(Tie,{})})]})})}const hSe=({...e})=>{const{resolvedTheme:t}=KL(),n=t==="dark"?"dark":t==="light"?"light":"system";return g.jsx(Vne,{theme:n,className:"toaster group",icons:{success:g.jsx(qS,{className:"size-4"}),info:g.jsx(lI,{className:"size-4"}),warning:g.jsx(uI,{className:"size-4"}),error:g.jsx(HS,{className:"size-4"}),loading:g.jsx(Bu,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},...e})},YV=document.querySelector("#root");if(!YV)throw new Error("Root element not found");mq.createRoot(YV).render(g.jsx(v.StrictMode,{children:g.jsx(e9,{attribute:"class",defaultTheme:"system",enableSystem:!0,children:g.jsx(WJ,{children:g.jsx(Fne,{children:g.jsxs(Mre,{children:[g.jsx(tie,{children:g.jsx(UH,{children:g.jsx(dSe,{})})}),g.jsx(hSe,{})]})})})})}));