diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a5039769..b9fd46415 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable user-facing changes to MTPLX. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versions follow [Semantic Versioning](https://semver.org/). +## [Unreleased] + +### Fixed + +- **A cancelled request keeps its cache outcome in the request log.** A streamed turn the client closed during decode was written with `session_cache_hit: false` and no `cached_tokens`, `cache_source` or `ttft_s`, so the dashboard showed it as a "MISS" and counted it against the hit rate, even when its prompt had been restored from the cache. The receipt now carries the cache outcome of the completed prefill (`session_cache_hit`, `cached_tokens`, `new_prefill_tokens`, `cache_source`, `cache_miss_reason`, the SSD fields) and `ttft_s`; when the request was cancelled before its prefill finished, these are `null` (unknown). The dashboard gives a cancelled row its own badge, such as "cancelled · client · 3m 0s", with the cache outcome beside it, and leaves cancelled requests out of the hit rate. + ## [2.12.2] - 2026-10-03 ### Fixed diff --git a/dashboard/src/components/CacheTiles.tsx b/dashboard/src/components/CacheTiles.tsx index abed0cb50..14a18abe9 100644 --- a/dashboard/src/components/CacheTiles.tsx +++ b/dashboard/src/components/CacheTiles.tsx @@ -1,6 +1,7 @@ import { BigNumber, Card } from "./Card"; import { fmtNumber } from "../lib/utils"; import { useDashboardStore } from "../state/store"; +import { countsTowardHitRate } from "../lib/requestCancel"; export function CumulativeCachedTokensTile() { const lifetime = useDashboardStore((s) => s.lifetime); @@ -21,7 +22,8 @@ export function CumulativeCachedTokensTile() { export function HitRateGauge() { const recent = useDashboardStore((s) => s.recent); - const window = recent.slice(-32); + // A cancelled request says nothing about the cache's hit rate. + const window = recent.filter(countsTowardHitRate).slice(-32); const hits = window.filter((r) => r.session_cache_hit).length; const ratio = window.length > 0 ? (hits / window.length) * 100 : 0; const tone = ratio >= 70 ? "accent" : ratio >= 40 ? "warm" : "hot"; diff --git a/dashboard/src/components/RequestLogTable.tsx b/dashboard/src/components/RequestLogTable.tsx index 67b27aa06..4c04ab61e 100644 --- a/dashboard/src/components/RequestLogTable.tsx +++ b/dashboard/src/components/RequestLogTable.tsx @@ -4,6 +4,7 @@ import { Card } from "./Card"; import { useRecentRequests } from "../hooks/usePolling"; import { fmtNumber, fmtSeconds, fmtTokS, relativeTime, truncateMiddle } from "../lib/utils"; import { useDashboardStore, useFilteredRecent } from "../state/store"; +import { cancellationOf } from "../lib/requestCancel"; import type { MetricsLatest } from "../lib/types"; export function RequestLogTable() { @@ -122,7 +123,7 @@ function Td({ ); } -function Row({ +export function Row({ row, isOpen, onToggle, @@ -132,11 +133,23 @@ function Row({ onToggle: () => void; }) { const sessionId = row.session_id ?? "—"; - const cacheBadge = row.session_cache_hit - ? { label: "HIT", color: "text-[var(--accent)] bg-[var(--accent)]/10" } + const cancellation = cancellationOf(row); + const cacheBadge = cancellation + ? { + label: cancellation.label, + color: "text-[var(--text-muted)] bg-[var(--text-muted)]/10", + tooltip: cancellation.tooltip as string | undefined, + } + : row.session_cache_hit + ? { + label: "HIT", + color: "text-[var(--accent)] bg-[var(--accent)]/10", + tooltip: undefined, + } : { label: (row.cache_miss_reason ?? "MISS").toUpperCase(), color: "text-[var(--accent-warm)] bg-[var(--accent-warm)]/10", + tooltip: undefined, }; return ( <> @@ -164,10 +177,16 @@ function Row({
ce?(q.sortIndex=ie,t(d,q),n(f)===null&&q===n(d)&&(S?(_(R),R=-1):S=!0,J(O,ie-ce))):(q.sortIndex=U,t(f,q),w||b||(w=!0,j||(j=!0,B()))),q},e.unstable_shouldYield=G,e.unstable_wrapCallback=function(q){var F=v;return function(){var ie=v;v=F;try{return q.apply(this,arguments)}finally{v=ie}}}})(ox)),ox}var uP;function hU(){return uP||(uP=1,ax.exports=dU()),ax.exports}var sx={exports:{}},Rr={};/** + */var uC;function hU(){return uC||(uC=1,(function(e){function t(q,F){var ie=q.length;q.push(F);e:for(;0>>1,U=q[ce];if(0>>1;ce i(X,ie))uei(be,X)?(q[ce]=be,q[ue]=ie,ce=ue):(q[ce]=X,q[V]=ie,ce=V);else if(uei(be,ie))q[ce]=be,q[ue]=ie,ce=ue;else break e}}return F}function i(q,F){var ie=q.sortIndex-F.sortIndex;return ie!==0?ie:q.id-F.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var f=[],d=[],m=1,p=null,v=3,b=!1,w=!1,S=!1,x=!1,A=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;function E(q){for(var F=n(d);F!==null;){if(F.callback===null)r(d);else if(F.startTime<=q)r(d),F.sortIndex=F.expirationTime,t(f,F);else break;F=n(d)}}function O(q){if(S=!1,E(q),!w)if(n(f)!==null)w=!0,j||(j=!0,B());else{var F=n(d);F!==null&&J(O,F.startTime-q)}}var j=!1,R=-1,k=5,z=-1;function G(){return x?!0:!(e.unstable_now()-z q&&G());){var ce=p.callback;if(typeof ce=="function"){p.callback=null,v=p.priorityLevel;var U=ce(p.expirationTime<=q);if(q=e.unstable_now(),typeof U=="function"){p.callback=U,E(q),F=!0;break t}p===n(f)&&r(f),E(q)}else r(f);p=n(f)}if(p!==null)F=!0;else{var D=n(d);D!==null&&J(O,D.startTime-q),F=!1}}break e}finally{p=null,v=ie,b=!1}F=void 0}}finally{F?B():j=!1}}}var B;if(typeof M=="function")B=function(){M($)};else if(typeof MessageChannel<"u"){var Z=new MessageChannel,ee=Z.port2;Z.port1.onmessage=$,B=function(){ee.postMessage(null)}}else B=function(){A($,0)};function J(q,F){R=A(function(){q(e.unstable_now())},F)}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(q){q.callback=null},e.unstable_forceFrameRate=function(q){0>q||125 ce?(q.sortIndex=ie,t(d,q),n(f)===null&&q===n(d)&&(S?(_(R),R=-1):S=!0,J(O,ie-ce))):(q.sortIndex=U,t(f,q),w||b||(w=!0,j||(j=!0,B()))),q},e.unstable_shouldYield=G,e.unstable_wrapCallback=function(q){var F=v;return function(){var ie=v;v=F;try{return q.apply(this,arguments)}finally{v=ie}}}})(ox)),ox}var cC;function pU(){return cC||(cC=1,ax.exports=hU()),ax.exports}var sx={exports:{}},Rr={};/** * @license React * react-dom.production.js * @@ -30,7 +30,7 @@ var sU=Object.defineProperty;var nP=e=>{throw TypeError(e)};var lU=(e,t,n)=>t in * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var cP;function pU(){if(cP)return Rr;cP=1;var e=FO();function t(f){var d="https://react.dev/errors/"+f;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),sx.exports=pU(),sx.exports}/** + */var fC;function mU(){if(fC)return Rr;fC=1;var e=GO();function t(f){var d="https://react.dev/errors/"+f;if(1 "u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),sx.exports=mU(),sx.exports}/** * @license React * react-dom-client.production.js * @@ -38,15 +38,17 @@ var sU=Object.defineProperty;var nP=e=>{throw TypeError(e)};var lU=(e,t,n)=>t in * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var dP;function vU(){if(dP)return nh;dP=1;var e=hU(),t=FO(),n=mU();function r(a){var o="https://react.dev/errors/"+a;if(1 U||(a.current=ce[U],ce[U]=null,U--)}function X(a,o){U++,ce[U]=a.current,a.current=o}var ue=D(null),be=D(null),Se=D(null),ye=D(null);function Me(a,o){switch(X(Se,o),X(be,a),X(ue,null),o.nodeType){case 9:case 11:a=(a=o.documentElement)&&(a=a.namespaceURI)?Oj(a):0;break;default:if(a=o.tagName,o=o.namespaceURI)o=Oj(o),a=Tj(o,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}V(ue),X(ue,a)}function de(){V(ue),V(be),V(Se)}function _e(a){a.memoizedState!==null&&X(ye,a);var o=ue.current,u=Tj(o,a.type);o!==u&&(X(be,a),X(ue,u))}function Ee(a){be.current===a&&(V(ue),V(be)),ye.current===a&&(V(ye),Qd._currentValue=ie)}var he,Ie;function Te(a){if(he===void 0)try{throw Error()}catch(u){var o=u.stack.trim().match(/\n( *(at )?)/);he=o&&o[1]||"",Ie=-1 U||(a.current=ce[U],ce[U]=null,U--)}function X(a,o){U++,ce[U]=a.current,a.current=o}var ue=D(null),be=D(null),Se=D(null),ye=D(null);function Me(a,o){switch(X(Se,o),X(be,a),X(ue,null),o.nodeType){case 9:case 11:a=(a=o.documentElement)&&(a=a.namespaceURI)?Tj(a):0;break;default:if(a=o.tagName,o=o.namespaceURI)o=Tj(o),a=Ej(o,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}V(ue),X(ue,a)}function de(){V(ue),V(be),V(Se)}function _e(a){a.memoizedState!==null&&X(ye,a);var o=ue.current,u=Ej(o,a.type);o!==u&&(X(be,a),X(ue,u))}function Ee(a){be.current===a&&(V(ue),V(be)),ye.current===a&&(V(ye),Qd._currentValue=ie)}var he,Ie;function Te(a){if(he===void 0)try{throw Error()}catch(u){var o=u.stack.trim().match(/\n( *(at )?)/);he=o&&o[1]||"",Ie=-1 )":-1 y||Y[h]!==se[y]){var pe=` -`+Y[h].replace(" at new "," at ");return a.displayName&&pe.includes(" ")&&(pe=pe.replace(" ",a.displayName)),pe}while(1<=h&&0<=y);break}}}finally{Xe=!1,Error.prepareStackTrace=u}return(u=a?a.displayName||a.name:"")?Te(u):""}function yt(a,o){switch(a.tag){case 26:case 27:case 5:return Te(a.type);case 16:return Te("Lazy");case 13:return a.child!==o&&o!==null?Te("Suspense Fallback"):Te("Suspense");case 19:return Te("SuspenseList");case 0:case 15:return nt(a.type,!1);case 11:return nt(a.type.render,!1);case 1:return nt(a.type,!0);case 31:return Te("Activity");default:return""}}function Qt(a){try{var o="",u=null;do o+=yt(a,u),u=a,a=a.return;while(a);return o}catch(h){return` +`+Y[h].replace(" at new "," at ");return a.displayName&&pe.includes(" ")&&(pe=pe.replace(" ",a.displayName)),pe}while(1<=h&&0<=y);break}}}finally{We=!1,Error.prepareStackTrace=u}return(u=a?a.displayName||a.name:"")?Te(u):""}function yt(a,o){switch(a.tag){case 26:case 27:case 5:return Te(a.type);case 16:return Te("Lazy");case 13:return a.child!==o&&o!==null?Te("Suspense Fallback"):Te("Suspense");case 19:return Te("SuspenseList");case 0:case 15:return nt(a.type,!1);case 11:return nt(a.type.render,!1);case 1:return nt(a.type,!0);case 31:return Te("Activity");default:return""}}function Qt(a){try{var o="",u=null;do o+=yt(a,u),u=a,a=a.return;while(a);return o}catch(h){return` Error generating stack: `+h.message+` -`+h.stack}}var Zt=Object.prototype.hasOwnProperty,pt=e.unstable_scheduleCallback,Nn=e.unstable_cancelCallback,Tn=e.unstable_shouldYield,Br=e.unstable_requestPaint,ze=e.unstable_now,je=e.unstable_getCurrentPriorityLevel,bt=e.unstable_ImmediatePriority,cn=e.unstable_UserBlockingPriority,di=e.unstable_NormalPriority,ki=e.unstable_LowPriority,Tr=e.unstable_IdlePriority,hi=e.log,pr=e.unstable_setDisableYieldValue,kn=null,Bt=null;function Ln(a){if(typeof hi=="function"&&pr(a),Bt&&typeof Bt.setStrictMode=="function")try{Bt.setStrictMode(kn,a)}catch{}}var mr=Math.clz32?Math.clz32:no,ku=Math.log,ns=Math.LN2;function no(a){return a>>>=0,a===0?32:31-(ku(a)/ns|0)|0}var ro=256,vr=262144,rs=4194304;function Ma(a){var o=a&42;if(o!==0)return o;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 Lu(a,o,u){var h=a.pendingLanes;if(h===0)return 0;var y=0,g=a.suspendedLanes,P=a.pingedLanes;a=a.warmLanes;var L=h&134217727;return L!==0?(h=L&~g,h!==0?y=Ma(h):(P&=L,P!==0?y=Ma(P):u||(u=L&~a,u!==0&&(y=Ma(u))))):(L=h&~g,L!==0?y=Ma(L):P!==0?y=Ma(P):u||(u=h&~a,u!==0&&(y=Ma(u)))),y===0?0:o!==0&&o!==y&&(o&g)===0&&(g=y&-y,u=o&-o,g>=u||g===32&&(u&4194048)!==0)?o:y}function vl(a,o){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&o)===0}function o0(a,o){switch(a){case 1:case 2:case 4:case 8:case 64:return o+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 o+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 Xp(){var a=rs;return rs<<=1,(rs&62914560)===0&&(rs=4194304),a}function rd(a){for(var o=[],u=0;31>u;u++)o.push(a);return o}function pi(a,o){a.pendingLanes|=o,o!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function ir(a,o,u,h,y,g){var P=a.pendingLanes;a.pendingLanes=u,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=u,a.entangledLanes&=u,a.errorRecoveryDisabledLanes&=u,a.shellSuspendCounter=0;var L=a.entanglements,Y=a.expirationTimes,se=a.hiddenUpdates;for(u=P&~u;0"u")return null;try{return a.activeElement||a.body}catch{return a.body}}var s0=/[\n"\\]/g;function Ir(a){return a.replace(s0,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function Uu(a,o,u,h,y,g,P,L){a.name="",P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?a.type=P:a.removeAttribute("type"),o!=null?P==="number"?(o===0&&a.value===""||a.value!=o)&&(a.value=""+qr(o)):a.value!==""+qr(o)&&(a.value=""+qr(o)):P!=="submit"&&P!=="reset"||a.removeAttribute("value"),o!=null?Vu(a,P,qr(o)):u!=null?Vu(a,P,qr(u)):h!=null&&a.removeAttribute("value"),y==null&&g!=null&&(a.defaultChecked=!!g),y!=null&&(a.checked=y&&typeof y!="function"&&typeof y!="symbol"),L!=null&&typeof L!="function"&&typeof L!="symbol"&&typeof L!="boolean"?a.name=""+qr(L):a.removeAttribute("name")}function Zp(a,o,u,h,y,g,P,L){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(a.type=g),o!=null||u!=null){if(!(g!=="submit"&&g!=="reset"||o!=null)){qu(a);return}u=u!=null?""+qr(u):"",o=o!=null?""+qr(o):u,L||o===a.value||(a.value=o),a.defaultValue=o}h=h??y,h=typeof h!="function"&&typeof h!="symbol"&&!!h,a.checked=L?a.checked:!!h,a.defaultChecked=!!h,P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"&&(a.name=P),qu(a)}function Vu(a,o,u){o==="number"&&Iu(a.ownerDocument)===a||a.defaultValue===""+u||(a.defaultValue=""+u)}function Ca(a,o,u,h){if(a=a.options,o){o={};for(var y=0;y "u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ku=!1;if(jr)try{var cs={};Object.defineProperty(cs,"passive",{get:function(){Ku=!0}}),window.addEventListener("test",cs,cs),window.removeEventListener("test",cs,cs)}catch{Ku=!1}var Vr=null,Ra=null,wl=null;function hd(){if(wl)return wl;var a,o=Ra,u=o.length,h,y="value"in Vr?Vr.value:Vr.textContent,g=y.length;for(a=0;a=ps),Sd=" ",co=!1;function Tl(a,o){switch(a){case"keyup":return um.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Mn(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var fo=!1;function gn(a,o){switch(a){case"compositionend":return Mn(o);case"keypress":return o.which!==32?null:(co=!0,Sd);case"textInput":return a=o.data,a===Sd&&co?null:a;default:return null}}function cm(a,o){if(fo)return a==="compositionend"||!Yu&&Tl(a,o)?(a=hd(),wl=Ra=Vr=null,fo=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1 =o)return{node:u,offset:o-a};a=h}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=Ve(u)}}function qt(a,o){return a&&o?a===o?!0:a&&a.nodeType===3?!1:o&&o.nodeType===3?qt(a,o.parentNode):"contains"in a?a.contains(o):a.compareDocumentPosition?!!(a.compareDocumentPosition(o)&16):!1:!1}function nn(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var o=Iu(a.document);o instanceof a.HTMLIFrameElement;){try{var u=typeof o.contentWindow.location.href=="string"}catch{u=!1}if(u)a=o.contentWindow;else break;o=Iu(a.document)}return o}function bn(a){var o=a&&a.nodeName&&a.nodeName.toLowerCase();return o&&(o==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||o==="textarea"||a.contentEditable==="true")}var Pt=jr&&"documentMode"in document&&11>=document.documentMode,Lt=null,gr=null,jn=null,Pr=!1;function Jr(a,o,u){var h=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;Pr||Lt==null||Lt!==Iu(h)||(h=Lt,"selectionStart"in h&&bn(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),jn&&et(jn,h)||(jn=h,h=ev(gr,"onSelect"),0 >=P,y-=P,La=1<<32-mr(o)+y|u< it?(dt=$e,$e=null):dt=$e.sibling;var wt=le(re,$e,oe[it],ge);if(wt===null){$e===null&&($e=dt);break}a&&$e&&wt.alternate===null&&o(re,$e),ne=g(wt,ne,it),St===null?Ue=wt:St.sibling=wt,St=wt,$e=dt}if(it===oe.length)return u(re,$e),mt&&mo(re,it),Ue;if($e===null){for(;it it?(dt=$e,$e=null):dt=$e.sibling;var zs=le(re,$e,wt.value,ge);if(zs===null){$e===null&&($e=dt);break}a&&$e&&zs.alternate===null&&o(re,$e),ne=g(zs,ne,it),St===null?Ue=zs:St.sibling=zs,St=zs,$e=dt}if(wt.done)return u(re,$e),mt&&mo(re,it),Ue;if($e===null){for(;!wt.done;it++,wt=oe.next())wt=xe(re,wt.value,ge),wt!==null&&(ne=g(wt,ne,it),St===null?Ue=wt:St.sibling=wt,St=wt);return mt&&mo(re,it),Ue}for($e=h($e);!wt.done;it++,wt=oe.next())wt=fe($e,re,it,wt.value,ge),wt!==null&&(a&&wt.alternate!==null&&$e.delete(wt.key===null?it:wt.key),ne=g(wt,ne,it),St===null?Ue=wt:St.sibling=wt,St=wt);return a&&$e.forEach(function(oU){return o(re,oU)}),mt&&mo(re,it),Ue}function Vt(re,ne,oe,ge){if(typeof oe=="object"&&oe!==null&&oe.type===S&&oe.key===null&&(oe=oe.props.children),typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case b:e:{for(var Ue=oe.key;ne!==null;){if(ne.key===Ue){if(Ue=oe.type,Ue===S){if(ne.tag===7){u(re,ne.sibling),ge=y(ne,oe.props.children),ge.return=re,re=ge;break e}}else if(ne.elementType===Ue||typeof Ue=="object"&&Ue!==null&&Ue.$$typeof===k&&Nl(Ue)===ne.type){u(re,ne.sibling),ge=y(ne,oe.props),Md(ge,oe),ge.return=re,re=ge;break e}u(re,ne);break}else o(re,ne);ne=ne.sibling}oe.type===S?(ge=jl(oe.props.children,re.mode,ge,oe.key),ge.return=re,re=ge):(ge=ym(oe.type,oe.key,oe.props,null,re.mode,ge),Md(ge,oe),ge.return=re,re=ge)}return P(re);case w:e:{for(Ue=oe.key;ne!==null;){if(ne.key===Ue)if(ne.tag===4&&ne.stateNode.containerInfo===oe.containerInfo&&ne.stateNode.implementation===oe.implementation){u(re,ne.sibling),ge=y(ne,oe.children||[]),ge.return=re,re=ge;break e}else{u(re,ne);break}else o(re,ne);ne=ne.sibling}ge=b0(oe,re.mode,ge),ge.return=re,re=ge}return P(re);case k:return oe=Nl(oe),Vt(re,ne,oe,ge)}if(J(oe))return Le(re,ne,oe,ge);if(B(oe)){if(Ue=B(oe),typeof Ue!="function")throw Error(r(150));return oe=Ue.call(oe),He(re,ne,oe,ge)}if(typeof oe.then=="function")return Vt(re,ne,Am(oe),ge);if(oe.$$typeof===M)return Vt(re,ne,xm(re,oe),ge);Om(re,oe)}return typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint"?(oe=""+oe,ne!==null&&ne.tag===6?(u(re,ne.sibling),ge=y(ne,oe),ge.return=re,re=ge):(u(re,ne),ge=g0(oe,re.mode,ge),ge.return=re,re=ge),P(re)):u(re,ne)}return function(re,ne,oe,ge){try{Ed=0;var Ue=Vt(re,ne,oe,ge);return ic=null,Ue}catch($e){if($e===rc||$e===wm)throw $e;var St=yi(29,$e,null,re.mode);return St.lanes=ge,St.return=re,St}finally{}}}var Ll=vE(!0),yE=vE(!1),xs=!1;function C0(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function D0(a,o){a=a.updateQueue,o.updateQueue===a&&(o.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function Ss(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function ws(a,o,u){var h=a.updateQueue;if(h===null)return null;if(h=h.shared,(Tt&2)!==0){var y=h.pending;return y===null?o.next=o:(o.next=y.next,y.next=o),h.pending=o,o=vm(a),eE(a,null,u),o}return mm(a,h,o,u),vm(a)}function jd(a,o,u){if(o=o.updateQueue,o!==null&&(o=o.shared,(u&4194048)!==0)){var h=o.lanes;h&=a.pendingLanes,u|=h,o.lanes=u,io(a,u)}}function R0(a,o){var u=a.updateQueue,h=a.alternate;if(h!==null&&(h=h.updateQueue,u===h)){var y=null,g=null;if(u=u.firstBaseUpdate,u!==null){do{var P={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};g===null?y=g=P:g=g.next=P,u=u.next}while(u!==null);g===null?y=g=o:g=g.next=o}else y=g=o;u={baseState:h.baseState,firstBaseUpdate:y,lastBaseUpdate:g,shared:h.shared,callbacks:h.callbacks},a.updateQueue=u;return}a=u.lastBaseUpdate,a===null?u.firstBaseUpdate=o:a.next=o,u.lastBaseUpdate=o}var N0=!1;function Pd(){if(N0){var a=nc;if(a!==null)throw a}}function Cd(a,o,u,h){N0=!1;var y=a.updateQueue;xs=!1;var g=y.firstBaseUpdate,P=y.lastBaseUpdate,L=y.shared.pending;if(L!==null){y.shared.pending=null;var Y=L,se=Y.next;Y.next=null,P===null?g=se:P.next=se,P=Y;var pe=a.alternate;pe!==null&&(pe=pe.updateQueue,L=pe.lastBaseUpdate,L!==P&&(L===null?pe.firstBaseUpdate=se:L.next=se,pe.lastBaseUpdate=Y))}if(g!==null){var xe=y.baseState;P=0,pe=se=Y=null,L=g;do{var le=L.lane&-536870913,fe=le!==L.lane;if(fe?(ft&le)===le:(h&le)===le){le!==0&&le===tc&&(N0=!0),pe!==null&&(pe=pe.next={lane:0,tag:L.tag,payload:L.payload,callback:null,next:null});e:{var Le=a,He=L;le=o;var Vt=u;switch(He.tag){case 1:if(Le=He.payload,typeof Le=="function"){xe=Le.call(Vt,xe,le);break e}xe=Le;break e;case 3:Le.flags=Le.flags&-65537|128;case 0:if(Le=He.payload,le=typeof Le=="function"?Le.call(Vt,xe,le):Le,le==null)break e;xe=p({},xe,le);break e;case 2:xs=!0}}le=L.callback,le!==null&&(a.flags|=64,fe&&(a.flags|=8192),fe=y.callbacks,fe===null?y.callbacks=[le]:fe.push(le))}else fe={lane:le,tag:L.tag,payload:L.payload,callback:L.callback,next:null},pe===null?(se=pe=fe,Y=xe):pe=pe.next=fe,P|=le;if(L=L.next,L===null){if(L=y.shared.pending,L===null)break;fe=L,L=fe.next,fe.next=null,y.lastBaseUpdate=fe,y.shared.pending=null}}while(!0);pe===null&&(Y=xe),y.baseState=Y,y.firstBaseUpdate=se,y.lastBaseUpdate=pe,g===null&&(y.shared.lanes=0),Es|=P,a.lanes=P,a.memoizedState=xe}}function gE(a,o){if(typeof a!="function")throw Error(r(191,a));a.call(o)}function bE(a,o){var u=a.callbacks;if(u!==null)for(a.callbacks=null,a=0;a g?g:8;var P=q.T,L={};q.T=L,J0(a,!1,o,u);try{var Y=y(),se=q.S;if(se!==null&&se(L,Y),Y!==null&&typeof Y=="object"&&typeof Y.then=="function"){var pe=XI(Y,h);Nd(a,o,pe,wi(a))}else Nd(a,o,h,wi(a))}catch(xe){Nd(a,o,{then:function(){},status:"rejected",reason:xe},wi())}finally{F.p=g,P!==null&&L.types!==null&&(P.types=L.types),q.T=P}}function t8(){}function Q0(a,o,u,h){if(a.tag!==5)throw Error(r(476));var y=QE(a).queue;WE(a,y,o,ie,u===null?t8:function(){return ZE(a),u(h)})}function QE(a){var o=a.memoizedState;if(o!==null)return o;o={memoizedState:ie,baseState:ie,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:bo,lastRenderedState:ie},next:null};var u={};return o.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:bo,lastRenderedState:u},next:null},a.memoizedState=o,a=a.alternate,a!==null&&(a.memoizedState=o),o}function ZE(a){var o=QE(a);o.next===null&&(o=a.alternate.memoizedState),Nd(a,o.next.queue,{},wi())}function Z0(){return Sr(Qd)}function JE(){return Cn().memoizedState}function eM(){return Cn().memoizedState}function n8(a){for(var o=a.return;o!==null;){switch(o.tag){case 24:case 3:var u=wi();a=Ss(u);var h=ws(o,a,u);h!==null&&(ai(h,o,u),jd(h,o,u)),o={cache:E0()},a.payload=o;return}o=o.return}}function r8(a,o,u){var h=wi();u={lane:h,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},km(a)?nM(o,u):(u=v0(a,o,u,h),u!==null&&(ai(u,a,h),rM(u,o,h)))}function tM(a,o,u){var h=wi();Nd(a,o,u,h)}function Nd(a,o,u,h){var y={lane:h,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(km(a))nM(o,y);else{var g=a.alternate;if(a.lanes===0&&(g===null||g.lanes===0)&&(g=o.lastRenderedReducer,g!==null))try{var P=o.lastRenderedState,L=g(P,u);if(y.hasEagerState=!0,y.eagerState=L,Ye(L,P))return mm(a,o,y,0),Gt===null&&pm(),!1}catch{}finally{}if(u=v0(a,o,y,h),u!==null)return ai(u,a,h),rM(u,o,h),!0}return!1}function J0(a,o,u,h){if(h={lane:2,revertLane:Cb(),gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},km(a)){if(o)throw Error(r(479))}else o=v0(a,u,h,2),o!==null&&ai(o,a,2)}function km(a){var o=a.alternate;return a===rt||o!==null&&o===rt}function nM(a,o){oc=Mm=!0;var u=a.pending;u===null?o.next=o:(o.next=u.next,u.next=o),a.pending=o}function rM(a,o,u){if((u&4194048)!==0){var h=o.lanes;h&=a.pendingLanes,u|=h,o.lanes=u,io(a,u)}}var kd={readContext:Sr,use:Cm,useCallback:xn,useContext:xn,useEffect:xn,useImperativeHandle:xn,useLayoutEffect:xn,useInsertionEffect:xn,useMemo:xn,useReducer:xn,useRef:xn,useState:xn,useDebugValue:xn,useDeferredValue:xn,useTransition:xn,useSyncExternalStore:xn,useId:xn,useHostTransitionStatus:xn,useFormState:xn,useActionState:xn,useOptimistic:xn,useMemoCache:xn,useCacheRefresh:xn};kd.useEffectEvent=xn;var iM={readContext:Sr,use:Cm,useCallback:function(a,o){return Fr().memoizedState=[a,o===void 0?null:o],a},useContext:Sr,useEffect:IE,useImperativeHandle:function(a,o,u){u=u!=null?u.concat([a]):null,Rm(4194308,4,FE.bind(null,o,a),u)},useLayoutEffect:function(a,o){return Rm(4194308,4,a,o)},useInsertionEffect:function(a,o){Rm(4,2,a,o)},useMemo:function(a,o){var u=Fr();o=o===void 0?null:o;var h=a();if(zl){Ln(!0);try{a()}finally{Ln(!1)}}return u.memoizedState=[h,o],h},useReducer:function(a,o,u){var h=Fr();if(u!==void 0){var y=u(o);if(zl){Ln(!0);try{u(o)}finally{Ln(!1)}}}else y=o;return h.memoizedState=h.baseState=y,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:y},h.queue=a,a=a.dispatch=r8.bind(null,rt,a),[h.memoizedState,a]},useRef:function(a){var o=Fr();return a={current:a},o.memoizedState=a},useState:function(a){a=G0(a);var o=a.queue,u=tM.bind(null,rt,o);return o.dispatch=u,[a.memoizedState,u]},useDebugValue:X0,useDeferredValue:function(a,o){var u=Fr();return W0(u,a,o)},useTransition:function(){var a=G0(!1);return a=WE.bind(null,rt,a.queue,!0,!1),Fr().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,o,u){var h=rt,y=Fr();if(mt){if(u===void 0)throw Error(r(407));u=u()}else{if(u=o(),Gt===null)throw Error(r(349));(ft&127)!==0||OE(h,o,u)}y.memoizedState=u;var g={value:u,getSnapshot:o};return y.queue=g,IE(EE.bind(null,h,g,a),[a]),h.flags|=2048,lc(9,{destroy:void 0},TE.bind(null,h,g,u,o),null),u},useId:function(){var a=Fr(),o=Gt.identifierPrefix;if(mt){var u=za,h=La;u=(h&~(1<<32-mr(h)-1)).toString(32)+u,o="_"+o+"R_"+u,u=jm++,0<\/script>",g=g.removeChild(g.firstChild);break;case"select":g=typeof h.is=="string"?P.createElement("select",{is:h.is}):P.createElement("select"),h.multiple?g.multiple=!0:h.size&&(g.size=h.size);break;default:g=typeof h.is=="string"?P.createElement(y,{is:h.is}):P.createElement(y)}}g[Fn]=o,g[Mr]=h;e:for(P=o.child;P!==null;){if(P.tag===5||P.tag===6)g.appendChild(P.stateNode);else if(P.tag!==4&&P.tag!==27&&P.child!==null){P.child.return=P,P=P.child;continue}if(P===o)break e;for(;P.sibling===null;){if(P.return===null||P.return===o)break e;P=P.return}P.sibling.return=P.return,P=P.sibling}o.stateNode=g;e:switch(_r(g,y,h),y){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}h&&So(o)}}return an(o),hb(o,o.type,a===null?null:a.memoizedProps,o.pendingProps,u),null;case 6:if(a&&o.stateNode!=null)a.memoizedProps!==h&&So(o);else{if(typeof h!="string"&&o.stateNode===null)throw Error(r(166));if(a=Se.current,Ju(o)){if(a=o.stateNode,u=o.memoizedProps,h=null,y=xr,y!==null)switch(y.tag){case 27:case 5:h=y.memoizedProps}a[Fn]=o,a=!!(a.nodeValue===u||h!==null&&h.suppressHydrationWarning===!0||_j(a.nodeValue,u)),a||gs(o,!0)}else a=tv(a).createTextNode(h),a[Fn]=o,o.stateNode=a}return an(o),null;case 31:if(u=o.memoizedState,a===null||a.memoizedState!==null){if(h=Ju(o),u!==null){if(a===null){if(!h)throw Error(r(318));if(a=o.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(557));a[Fn]=o}else Pl(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;an(o),a=!1}else u=_0(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=u),a=!0;if(!a)return o.flags&256?(bi(o),o):(bi(o),null);if((o.flags&128)!==0)throw Error(r(558))}return an(o),null;case 13:if(h=o.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(y=Ju(o),h!==null&&h.dehydrated!==null){if(a===null){if(!y)throw Error(r(318));if(y=o.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(r(317));y[Fn]=o}else Pl(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;an(o),y=!1}else y=_0(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=y),y=!0;if(!y)return o.flags&256?(bi(o),o):(bi(o),null)}return bi(o),(o.flags&128)!==0?(o.lanes=u,o):(u=h!==null,a=a!==null&&a.memoizedState!==null,u&&(h=o.child,y=null,h.alternate!==null&&h.alternate.memoizedState!==null&&h.alternate.memoizedState.cachePool!==null&&(y=h.alternate.memoizedState.cachePool.pool),g=null,h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(g=h.memoizedState.cachePool.pool),g!==y&&(h.flags|=2048)),u!==a&&u&&(o.child.flags|=8192),qm(o,o.updateQueue),an(o),null);case 4:return de(),a===null&&kb(o.stateNode.containerInfo),an(o),null;case 10:return yo(o.type),an(o),null;case 19:if(V(Pn),h=o.memoizedState,h===null)return an(o),null;if(y=(o.flags&128)!==0,g=h.rendering,g===null)if(y)zd(h,!1);else{if(Sn!==0||a!==null&&(a.flags&128)!==0)for(a=o.child;a!==null;){if(g=Em(a),g!==null){for(o.flags|=128,zd(h,!1),a=g.updateQueue,o.updateQueue=a,qm(o,a),o.subtreeFlags=0,a=u,u=o.child;u!==null;)tE(u,a),u=u.sibling;return X(Pn,Pn.current&1|2),mt&&mo(o,h.treeForkCount),o.child}a=a.sibling}h.tail!==null&&ze()>Fm&&(o.flags|=128,y=!0,zd(h,!1),o.lanes=4194304)}else{if(!y)if(a=Em(g),a!==null){if(o.flags|=128,y=!0,a=a.updateQueue,o.updateQueue=a,qm(o,a),zd(h,!0),h.tail===null&&h.tailMode==="hidden"&&!g.alternate&&!mt)return an(o),null}else 2*ze()-h.renderingStartTime>Fm&&u!==536870912&&(o.flags|=128,y=!0,zd(h,!1),o.lanes=4194304);h.isBackwards?(g.sibling=o.child,o.child=g):(a=h.last,a!==null?a.sibling=g:o.child=g,h.last=g)}return h.tail!==null?(a=h.tail,h.rendering=a,h.tail=a.sibling,h.renderingStartTime=ze(),a.sibling=null,u=Pn.current,X(Pn,y?u&1|2:u&1),mt&&mo(o,h.treeForkCount),a):(an(o),null);case 22:case 23:return bi(o),L0(),h=o.memoizedState!==null,a!==null?a.memoizedState!==null!==h&&(o.flags|=8192):h&&(o.flags|=8192),h?(u&536870912)!==0&&(o.flags&128)===0&&(an(o),o.subtreeFlags&6&&(o.flags|=8192)):an(o),u=o.updateQueue,u!==null&&qm(o,u.retryQueue),u=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),h=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(h=o.memoizedState.cachePool.pool),h!==u&&(o.flags|=2048),a!==null&&V(Rl),null;case 24:return u=null,a!==null&&(u=a.memoizedState.cache),o.memoizedState.cache!==u&&(o.flags|=2048),yo($n),an(o),null;case 25:return null;case 30:return null}throw Error(r(156,o.tag))}function l8(a,o){switch(S0(o),o.tag){case 1:return a=o.flags,a&65536?(o.flags=a&-65537|128,o):null;case 3:return yo($n),de(),a=o.flags,(a&65536)!==0&&(a&128)===0?(o.flags=a&-65537|128,o):null;case 26:case 27:case 5:return Ee(o),null;case 31:if(o.memoizedState!==null){if(bi(o),o.alternate===null)throw Error(r(340));Pl()}return a=o.flags,a&65536?(o.flags=a&-65537|128,o):null;case 13:if(bi(o),a=o.memoizedState,a!==null&&a.dehydrated!==null){if(o.alternate===null)throw Error(r(340));Pl()}return a=o.flags,a&65536?(o.flags=a&-65537|128,o):null;case 19:return V(Pn),null;case 4:return de(),null;case 10:return yo(o.type),null;case 22:case 23:return bi(o),L0(),a!==null&&V(Rl),a=o.flags,a&65536?(o.flags=a&-65537|128,o):null;case 24:return yo($n),null;case 25:return null;default:return null}}function MM(a,o){switch(S0(o),o.tag){case 3:yo($n),de();break;case 26:case 27:case 5:Ee(o);break;case 4:de();break;case 31:o.memoizedState!==null&&bi(o);break;case 13:bi(o);break;case 19:V(Pn);break;case 10:yo(o.type);break;case 22:case 23:bi(o),L0(),a!==null&&V(Rl);break;case 24:yo($n)}}function $d(a,o){try{var u=o.updateQueue,h=u!==null?u.lastEffect:null;if(h!==null){var y=h.next;u=y;do{if((u.tag&a)===a){h=void 0;var g=u.create,P=u.inst;h=g(),P.destroy=h}u=u.next}while(u!==y)}}catch(L){$t(o,o.return,L)}}function Os(a,o,u){try{var h=o.updateQueue,y=h!==null?h.lastEffect:null;if(y!==null){var g=y.next;h=g;do{if((h.tag&a)===a){var P=h.inst,L=P.destroy;if(L!==void 0){P.destroy=void 0,y=o;var Y=u,se=L;try{se()}catch(pe){$t(y,Y,pe)}}}h=h.next}while(h!==g)}}catch(pe){$t(o,o.return,pe)}}function jM(a){var o=a.updateQueue;if(o!==null){var u=a.stateNode;try{bE(o,u)}catch(h){$t(a,a.return,h)}}}function PM(a,o,u){u.props=$l(a.type,a.memoizedProps),u.state=a.memoizedState;try{u.componentWillUnmount()}catch(h){$t(a,o,h)}}function Bd(a,o){try{var u=a.ref;if(u!==null){switch(a.tag){case 26:case 27:case 5:var h=a.stateNode;break;case 30:h=a.stateNode;break;default:h=a.stateNode}typeof u=="function"?a.refCleanup=u(h):u.current=h}}catch(y){$t(a,o,y)}}function $a(a,o){var u=a.ref,h=a.refCleanup;if(u!==null)if(typeof h=="function")try{h()}catch(y){$t(a,o,y)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(y){$t(a,o,y)}else u.current=null}function CM(a){var o=a.type,u=a.memoizedProps,h=a.stateNode;try{e:switch(o){case"button":case"input":case"select":case"textarea":u.autoFocus&&h.focus();break e;case"img":u.src?h.src=u.src:u.srcSet&&(h.srcset=u.srcSet)}}catch(y){$t(a,a.return,y)}}function pb(a,o,u){try{var h=a.stateNode;P8(h,a.type,u,o),h[Mr]=o}catch(y){$t(a,a.return,y)}}function DM(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&Ds(a.type)||a.tag===4}function mb(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||DM(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&&Ds(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 vb(a,o,u){var h=a.tag;if(h===5||h===6)a=a.stateNode,o?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(a,o):(o=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,o.appendChild(a),u=u._reactRootContainer,u!=null||o.onclick!==null||(o.onclick=Ur));else if(h!==4&&(h===27&&Ds(a.type)&&(u=a.stateNode,o=null),a=a.child,a!==null))for(vb(a,o,u),a=a.sibling;a!==null;)vb(a,o,u),a=a.sibling}function Im(a,o,u){var h=a.tag;if(h===5||h===6)a=a.stateNode,o?u.insertBefore(a,o):u.appendChild(a);else if(h!==4&&(h===27&&Ds(a.type)&&(u=a.stateNode),a=a.child,a!==null))for(Im(a,o,u),a=a.sibling;a!==null;)Im(a,o,u),a=a.sibling}function RM(a){var o=a.stateNode,u=a.memoizedProps;try{for(var h=a.type,y=o.attributes;y.length;)o.removeAttributeNode(y[0]);_r(o,h,u),o[Fn]=a,o[Mr]=u}catch(g){$t(a,a.return,g)}}var wo=!1,In=!1,yb=!1,NM=typeof WeakSet=="function"?WeakSet:Set,lr=null;function u8(a,o){if(a=a.containerInfo,$b=lv,a=nn(a),bn(a)){if("selectionStart"in a)var u={start:a.selectionStart,end:a.selectionEnd};else e:{u=(u=a.ownerDocument)&&u.defaultView||window;var h=u.getSelection&&u.getSelection();if(h&&h.rangeCount!==0){u=h.anchorNode;var y=h.anchorOffset,g=h.focusNode;h=h.focusOffset;try{u.nodeType,g.nodeType}catch{u=null;break e}var P=0,L=-1,Y=-1,se=0,pe=0,xe=a,le=null;t:for(;;){for(var fe;xe!==u||y!==0&&xe.nodeType!==3||(L=P+y),xe!==g||h!==0&&xe.nodeType!==3||(Y=P+h),xe.nodeType===3&&(P+=xe.nodeValue.length),(fe=xe.firstChild)!==null;)le=xe,xe=fe;for(;;){if(xe===a)break t;if(le===u&&++se===y&&(L=P),le===g&&++pe===h&&(Y=P),(fe=xe.nextSibling)!==null)break;xe=le,le=xe.parentNode}xe=fe}u=L===-1||Y===-1?null:{start:L,end:Y}}else u=null}u=u||{start:0,end:0}}else u=null;for(Bb={focusedElem:a,selectionRange:u},lv=!1,lr=o;lr!==null;)if(o=lr,a=o.child,(o.subtreeFlags&1028)!==0&&a!==null)a.return=o,lr=a;else for(;lr!==null;){switch(o=lr,g=o.alternate,a=o.flags,o.tag){case 0:if((a&4)!==0&&(a=o.updateQueue,a=a!==null?a.events:null,a!==null))for(u=0;u title"))),_r(g,h,u),g[Fn]=a,En(g),h=g;break e;case"link":var P=qj("link","href",y).get(h+(u.href||""));if(P){for(var L=0;L Vt&&(P=Vt,Vt=He,He=P);var re=Be(L,He),ne=Be(L,Vt);if(re&&ne&&(fe.rangeCount!==1||fe.anchorNode!==re.node||fe.anchorOffset!==re.offset||fe.focusNode!==ne.node||fe.focusOffset!==ne.offset)){var oe=xe.createRange();oe.setStart(re.node,re.offset),fe.removeAllRanges(),He>Vt?(fe.addRange(oe),fe.extend(ne.node,ne.offset)):(oe.setEnd(ne.node,ne.offset),fe.addRange(oe))}}}}for(xe=[],fe=L;fe=fe.parentNode;)fe.nodeType===1&&xe.push({element:fe,left:fe.scrollLeft,top:fe.scrollTop});for(typeof L.focus=="function"&&L.focus(),L=0;L u?32:u,q.T=null,u=Ab,Ab=null;var g=js,P=Eo;if(Gn=0,hc=js=null,Eo=0,(Tt&6)!==0)throw Error(r(331));var L=Tt;if(Tt|=4,FM(g.current),UM(g,g.current,P,u),Tt=L,Fd(0,!1),Bt&&typeof Bt.onPostCommitFiberRoot=="function")try{Bt.onPostCommitFiberRoot(kn,g)}catch{}return!0}finally{F.p=y,q.T=h,uj(a,o)}}function fj(a,o,u){o=qi(u,o),o=rb(a.stateNode,o,2),a=ws(a,o,2),a!==null&&(pi(a,2),Ba(a))}function $t(a,o,u){if(a.tag===3)fj(a,a,u);else for(;o!==null;){if(o.tag===3){fj(o,a,u);break}else if(o.tag===1){var h=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Ms===null||!Ms.has(h))){a=qi(u,a),u=dM(2),h=ws(o,u,2),h!==null&&(hM(u,h,o,a),pi(h,2),Ba(h));break}}o=o.return}}function Mb(a,o,u){var h=a.pingCache;if(h===null){h=a.pingCache=new d8;var y=new Set;h.set(o,y)}else y=h.get(o),y===void 0&&(y=new Set,h.set(o,y));y.has(u)||(xb=!0,y.add(u),a=y8.bind(null,a,o,u),o.then(a,a))}function y8(a,o,u){var h=a.pingCache;h!==null&&h.delete(o),a.pingedLanes|=a.suspendedLanes&u,a.warmLanes&=~u,Gt===a&&(ft&u)===u&&(Sn===4||Sn===3&&(ft&62914560)===ft&&300>ze()-Hm?(Tt&2)===0&&pc(a,0):Sb|=u,dc===ft&&(dc=0)),Ba(a)}function dj(a,o){o===0&&(o=Xp()),a=Ml(a,o),a!==null&&(pi(a,o),Ba(a))}function g8(a){var o=a.memoizedState,u=0;o!==null&&(u=o.retryLane),dj(a,u)}function b8(a,o){var u=0;switch(a.tag){case 31:case 13:var h=a.stateNode,y=a.memoizedState;y!==null&&(u=y.retryLane);break;case 19:h=a.stateNode;break;case 22:h=a.stateNode._retryCache;break;default:throw Error(r(314))}h!==null&&h.delete(o),dj(a,u)}function x8(a,o){return pt(a,o)}var Qm=null,vc=null,jb=!1,Zm=!1,Pb=!1,Cs=0;function Ba(a){a!==vc&&a.next===null&&(vc===null?Qm=vc=a:vc=vc.next=a),Zm=!0,jb||(jb=!0,w8())}function Fd(a,o){if(!Pb&&Zm){Pb=!0;do for(var u=!1,h=Qm;h!==null;){if(a!==0){var y=h.pendingLanes;if(y===0)var g=0;else{var P=h.suspendedLanes,L=h.pingedLanes;g=(1<<31-mr(42|a)+1)-1,g&=y&~(P&~L),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(u=!0,vj(h,g))}else g=ft,g=Lu(h,h===Gt?g:0,h.cancelPendingCommit!==null||h.timeoutHandle!==-1),(g&3)===0||vl(h,g)||(u=!0,vj(h,g));h=h.next}while(u);Pb=!1}}function S8(){hj()}function hj(){Zm=jb=!1;var a=0;Cs!==0&&D8()&&(a=Cs);for(var o=ze(),u=null,h=Qm;h!==null;){var y=h.next,g=pj(h,o);g===0?(h.next=null,u===null?Qm=y:u.next=y,y===null&&(vc=u)):(u=h,(a!==0||(g&3)!==0)&&(Zm=!0)),h=y}Gn!==0&&Gn!==5||Fd(a),Cs!==0&&(Cs=0)}function pj(a,o){for(var u=a.suspendedLanes,h=a.pingedLanes,y=a.expirationTimes,g=a.pendingLanes&-62914561;0 L)break;var pe=Y.transferSize,xe=Y.initiatorType;pe&&Aj(xe)&&(Y=Y.responseEnd,P+=pe*(Y "u"?null:document;function Lj(a,o,u){var h=yc;if(h&&typeof o=="string"&&o){var y=Ir(o);y='link[rel="'+a+'"][href="'+y+'"]',typeof u=="string"&&(y+='[crossorigin="'+u+'"]'),kj.has(y)||(kj.add(y),a={rel:a,crossOrigin:u,href:o},h.querySelector(y)===null&&(o=h.createElement("link"),_r(o,"link",a),En(o),h.head.appendChild(o)))}}function I8(a){Mo.D(a),Lj("dns-prefetch",a,null)}function U8(a,o){Mo.C(a,o),Lj("preconnect",a,o)}function V8(a,o,u){Mo.L(a,o,u);var h=yc;if(h&&a&&o){var y='link[rel="preload"][as="'+Ir(o)+'"]';o==="image"&&u&&u.imageSrcSet?(y+='[imagesrcset="'+Ir(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(y+='[imagesizes="'+Ir(u.imageSizes)+'"]')):y+='[href="'+Ir(a)+'"]';var g=y;switch(o){case"style":g=gc(a);break;case"script":g=bc(a)}Gi.has(g)||(a=p({rel:"preload",href:o==="image"&&u&&u.imageSrcSet?void 0:a,as:o},u),Gi.set(g,a),h.querySelector(y)!==null||o==="style"&&h.querySelector(Xd(g))||o==="script"&&h.querySelector(Wd(g))||(o=h.createElement("link"),_r(o,"link",a),En(o),h.head.appendChild(o)))}}function H8(a,o){Mo.m(a,o);var u=yc;if(u&&a){var h=o&&typeof o.as=="string"?o.as:"script",y='link[rel="modulepreload"][as="'+Ir(h)+'"][href="'+Ir(a)+'"]',g=y;switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=bc(a)}if(!Gi.has(g)&&(a=p({rel:"modulepreload",href:a},o),Gi.set(g,a),u.querySelector(y)===null)){switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(Wd(g)))return}h=u.createElement("link"),_r(h,"link",a),En(h),u.head.appendChild(h)}}}function F8(a,o,u){Mo.S(a,o,u);var h=yc;if(h&&a){var y=Li(h).hoistableStyles,g=gc(a);o=o||"default";var P=y.get(g);if(!P){var L={loading:0,preload:null};if(P=h.querySelector(Xd(g)))L.loading=5;else{a=p({rel:"stylesheet",href:a,"data-precedence":o},u),(u=Gi.get(g))&&Gb(a,u);var Y=P=h.createElement("link");En(Y),_r(Y,"link",a),Y._p=new Promise(function(se,pe){Y.onload=se,Y.onerror=pe}),Y.addEventListener("load",function(){L.loading|=1}),Y.addEventListener("error",function(){L.loading|=2}),L.loading|=4,rv(P,o,h)}P={type:"stylesheet",instance:P,count:1,state:L},y.set(g,P)}}}function G8(a,o){Mo.X(a,o);var u=yc;if(u&&a){var h=Li(u).hoistableScripts,y=bc(a),g=h.get(y);g||(g=u.querySelector(Wd(y)),g||(a=p({src:a,async:!0},o),(o=Gi.get(y))&&Kb(a,o),g=u.createElement("script"),En(g),_r(g,"link",a),u.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},h.set(y,g))}}function K8(a,o){Mo.M(a,o);var u=yc;if(u&&a){var h=Li(u).hoistableScripts,y=bc(a),g=h.get(y);g||(g=u.querySelector(Wd(y)),g||(a=p({src:a,async:!0,type:"module"},o),(o=Gi.get(y))&&Kb(a,o),g=u.createElement("script"),En(g),_r(g,"link",a),u.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},h.set(y,g))}}function zj(a,o,u,h){var y=(y=Se.current)?nv(y):null;if(!y)throw Error(r(446));switch(a){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(o=gc(u.href),u=Li(y).hoistableStyles,h=u.get(o),h||(h={type:"style",instance:null,count:0,state:null},u.set(o,h)),h):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){a=gc(u.href);var g=Li(y).hoistableStyles,P=g.get(a);if(P||(y=y.ownerDocument||y,P={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(a,P),(g=y.querySelector(Xd(a)))&&!g._p&&(P.instance=g,P.state.loading=5),Gi.has(a)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},Gi.set(a,u),g||Y8(y,a,u,P.state))),o&&h===null)throw Error(r(528,""));return P}if(o&&h!==null)throw Error(r(529,""));return null;case"script":return o=u.async,u=u.src,typeof u=="string"&&o&&typeof o!="function"&&typeof o!="symbol"?(o=bc(u),u=Li(y).hoistableScripts,h=u.get(o),h||(h={type:"script",instance:null,count:0,state:null},u.set(o,h)),h):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,a))}}function gc(a){return'href="'+Ir(a)+'"'}function Xd(a){return'link[rel="stylesheet"]['+a+"]"}function $j(a){return p({},a,{"data-precedence":a.precedence,precedence:null})}function Y8(a,o,u,h){a.querySelector('link[rel="preload"][as="style"]['+o+"]")?h.loading=1:(o=a.createElement("link"),h.preload=o,o.addEventListener("load",function(){return h.loading|=1}),o.addEventListener("error",function(){return h.loading|=2}),_r(o,"link",u),En(o),a.head.appendChild(o))}function bc(a){return'[src="'+Ir(a)+'"]'}function Wd(a){return"script[async]"+a}function Bj(a,o,u){if(o.count++,o.instance===null)switch(o.type){case"style":var h=a.querySelector('style[data-href~="'+Ir(u.href)+'"]');if(h)return o.instance=h,En(h),h;var y=p({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return h=(a.ownerDocument||a).createElement("style"),En(h),_r(h,"style",y),rv(h,u.precedence,a),o.instance=h;case"stylesheet":y=gc(u.href);var g=a.querySelector(Xd(y));if(g)return o.state.loading|=4,o.instance=g,En(g),g;h=$j(u),(y=Gi.get(y))&&Gb(h,y),g=(a.ownerDocument||a).createElement("link"),En(g);var P=g;return P._p=new Promise(function(L,Y){P.onload=L,P.onerror=Y}),_r(g,"link",h),o.state.loading|=4,rv(g,u.precedence,a),o.instance=g;case"script":return g=bc(u.src),(y=a.querySelector(Wd(g)))?(o.instance=y,En(y),y):(h=u,(y=Gi.get(g))&&(h=p({},u),Kb(h,y)),a=a.ownerDocument||a,y=a.createElement("script"),En(y),_r(y,"link",h),a.head.appendChild(y),o.instance=y);case"void":return null;default:throw Error(r(443,o.type))}else o.type==="stylesheet"&&(o.state.loading&4)===0&&(h=o.instance,o.state.loading|=4,rv(h,u.precedence,a));return o.instance}function rv(a,o,u){for(var h=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),y=h.length?h[h.length-1]:null,g=y,P=0;P title"):null)}function X8(a,o,u){if(u===1||o.itemProp!=null)return!1;switch(a){case"meta":case"title":return!0;case"style":if(typeof o.precedence!="string"||typeof o.href!="string"||o.href==="")break;return!0;case"link":if(typeof o.rel!="string"||typeof o.href!="string"||o.href===""||o.onLoad||o.onError)break;switch(o.rel){case"stylesheet":return a=o.disabled,typeof o.precedence=="string"&&a==null;default:return!0}case"script":if(o.async&&typeof o.async!="function"&&typeof o.async!="symbol"&&!o.onLoad&&!o.onError&&o.src&&typeof o.src=="string")return!0}return!1}function Uj(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function W8(a,o,u,h){if(u.type==="stylesheet"&&(typeof h.media!="string"||matchMedia(h.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var y=gc(h.href),g=o.querySelector(Xd(y));if(g){o=g._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(a.count++,a=av.bind(a),o.then(a,a)),u.state.loading|=4,u.instance=g,En(g);return}g=o.ownerDocument||o,h=$j(h),(y=Gi.get(y))&&Gb(h,y),g=g.createElement("link"),En(g);var P=g;P._p=new Promise(function(L,Y){P.onload=L,P.onerror=Y}),_r(g,"link",h),u.instance=g}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(u,o),(o=u.state.preload)&&(u.state.loading&3)===0&&(a.count++,u=av.bind(a),o.addEventListener("load",u),o.addEventListener("error",u))}}var Yb=0;function Q8(a,o){return a.stylesheets&&a.count===0&&sv(a,a.stylesheets),0 Yb?50:800)+o);return a.unsuspend=u,function(){a.unsuspend=null,clearTimeout(h),clearTimeout(y)}}:null}function av(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)sv(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var ov=null;function sv(a,o){a.stylesheets=null,a.unsuspend!==null&&(a.count++,ov=new Map,o.forEach(Z8,a),ov=null,av.call(a))}function Z8(a,o){if(!(o.state.loading&4)){var u=ov.get(a);if(u)var h=u.get(null);else{u=new Map,ov.set(a,u);for(var y=a.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g "u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),ix.exports=vU(),ix.exports}var gU=yU();const bU=Ft(gU);var Bf=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},iu,Gs,Vc,Tz,xU=(Tz=class extends Bf{constructor(){super();qe(this,iu);qe(this,Gs);qe(this,Vc);Ce(this,Vc,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){W(this,Gs)||this.setEventListener(W(this,Vc))}onUnsubscribe(){var t;this.hasListeners()||((t=W(this,Gs))==null||t.call(this),Ce(this,Gs,void 0))}setEventListener(t){var n;Ce(this,Vc,t),(n=W(this,Gs))==null||n.call(this),Ce(this,Gs,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){W(this,iu)!==t&&(Ce(this,iu,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof W(this,iu)=="boolean"?W(this,iu):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},iu=new WeakMap,Gs=new WeakMap,Vc=new WeakMap,Tz),GO=new xU,SU={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Ks,HO,Ez,wU=(Ez=class{constructor(){qe(this,Ks,SU);qe(this,HO,!1)}setTimeoutProvider(e){Ce(this,Ks,e)}setTimeout(e,t){return W(this,Ks).setTimeout(e,t)}clearTimeout(e){W(this,Ks).clearTimeout(e)}setInterval(e,t){return W(this,Ks).setInterval(e,t)}clearInterval(e){W(this,Ks).clearInterval(e)}},Ks=new WeakMap,HO=new WeakMap,Ez),Ql=new wU;function _U(e){setTimeout(e,0)}var AU=typeof window>"u"||"Deno"in globalThis;function Kr(){}function OU(e,t){return typeof e=="function"?e(t):e}function N_(e){return typeof e=="number"&&e>=0&&e!==1/0}function zz(e,t){return Math.max(e+(t||0)-Date.now(),0)}function il(e,t){return typeof e=="function"?e(t):e}function Mi(e,t){return typeof e=="function"?e(t):e}function pP(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:l,stale:c}=e;if(l){if(r){if(t.queryHash!==KO(l,t.options))return!1}else if(!Ih(t.queryKey,l))return!1}if(n!=="all"){const f=t.isActive();if(n==="active"&&!f||n==="inactive"&&f)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||i&&i!==t.state.fetchStatus||s&&!s(t))}function mP(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(gu(t.options.mutationKey)!==gu(s))return!1}else if(!Ih(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function KO(e,t){return((t==null?void 0:t.queryKeyHashFn)||gu)(e)}function gu(e){return JSON.stringify(e,(t,n)=>k_(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Ih(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Ih(e[n],t[n])):!1}var TU=Object.prototype.hasOwnProperty;function $z(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=vP(e)&&vP(t);if(!r&&!(k_(e)&&k_(t)))return t;const s=(r?e:Object.keys(e)).length,l=r?t:Object.keys(t),c=l.length,f=r?new Array(c):{};let d=0;for(let m=0;m {Ql.setTimeout(t,e)})}function L_(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?$z(e,t):t}function MU(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function jU(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var YO=Symbol();function Bz(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===YO?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function XO(e,t){return typeof e=="function"?e(...t):!!e}function PU(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??(i=t()),r||(r=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),e}var Uh=(()=>{let e=()=>AU;return{isServer(){return e()},setIsServer(t){e=t}}})();function z_(){let e,t;const n=new Promise((i,s)=>{e=i,t=s});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}var CU=_U;function DU(){let e=[],t=0,n=c=>{c()},r=c=>{c()},i=CU;const s=c=>{t?e.push(c):i(()=>{n(c)})},l=()=>{const c=e;e=[],c.length&&i(()=>{r(()=>{c.forEach(f=>{n(f)})})})};return{batch:c=>{let f;t++;try{f=c()}finally{t--,t||l()}return f},batchCalls:c=>(...f)=>{s(()=>{c(...f)})},schedule:s,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{r=c},setScheduler:c=>{i=c}}}var Qn=DU(),Hc,Ys,Fc,Mz,RU=(Mz=class extends Bf{constructor(){super();qe(this,Hc,!0);qe(this,Ys);qe(this,Fc);Ce(this,Fc,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){W(this,Ys)||this.setEventListener(W(this,Fc))}onUnsubscribe(){var t;this.hasListeners()||((t=W(this,Ys))==null||t.call(this),Ce(this,Ys,void 0))}setEventListener(t){var n;Ce(this,Fc,t),(n=W(this,Ys))==null||n.call(this),Ce(this,Ys,t(this.setOnline.bind(this)))}setOnline(t){W(this,Hc)!==t&&(Ce(this,Hc,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return W(this,Hc)}},Hc=new WeakMap,Ys=new WeakMap,Fc=new WeakMap,Mz),Wv=new RU;function NU(e){return Math.min(1e3*2**e,3e4)}function qz(e){return(e??"online")==="online"?Wv.isOnline():!0}var $_=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Iz(e){let t=!1,n=0,r;const i=z_(),s=()=>i.status!=="pending",l=S=>{var x;if(!s()){const A=new $_(S);v(A),(x=e.onCancel)==null||x.call(e,A)}},c=()=>{t=!0},f=()=>{t=!1},d=()=>GO.isFocused()&&(e.networkMode==="always"||Wv.isOnline())&&e.canRun(),m=()=>qz(e.networkMode)&&e.canRun(),p=S=>{s()||(r==null||r(),i.resolve(S))},v=S=>{s()||(r==null||r(),i.reject(S))},b=()=>new Promise(S=>{var x;r=A=>{(s()||d())&&S(A)},(x=e.onPause)==null||x.call(e)}).then(()=>{var S;r=void 0,s()||(S=e.onContinue)==null||S.call(e)}),w=()=>{if(s())return;let S;const x=n===0?e.initialPromise:void 0;try{S=x??e.fn()}catch(A){S=Promise.reject(A)}Promise.resolve(S).then(p).catch(A=>{var j;if(s())return;const _=e.retry??(Uh.isServer()?0:3),M=e.retryDelay??NU,E=typeof M=="function"?M(n,A):M,O=_===!0||typeof _=="number"&&n<_||typeof _=="function"&&_(n,A);if(t||!O){v(A);return}n++,(j=e.onFail)==null||j.call(e,n,A),EU(E).then(()=>d()?void 0:b()).then(()=>{t?v(A):w()})})};return{promise:i,status:()=>i.status,cancel:l,continue:()=>(r==null||r(),i),cancelRetry:c,continueRetry:f,canStart:m,start:()=>(m()?w():b().then(w),i)}}var au,jz,Uz=(jz=class{constructor(){qe(this,au)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),N_(this.gcTime)&&Ce(this,au,Ql.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Uh.isServer()?1/0:300*1e3))}clearGcTimeout(){W(this,au)!==void 0&&(Ql.clearTimeout(W(this,au)),Ce(this,au,void 0))}},au=new WeakMap,jz);function kU(e){return{onFetch:(t,n)=>{var m,p,v,b,w;const r=t.options,i=(v=(p=(m=t.fetchOptions)==null?void 0:m.meta)==null?void 0:p.fetchMore)==null?void 0:v.direction,s=((b=t.state.data)==null?void 0:b.pages)||[],l=((w=t.state.data)==null?void 0:w.pageParams)||[];let c={pages:[],pageParams:[]},f=0;const d=async()=>{let S=!1;const x=M=>{PU(M,()=>t.signal,()=>S=!0)},A=Bz(t.options,t.fetchOptions),_=async(M,E,O)=>{if(S)return Promise.reject(t.signal.reason);if(E==null&&M.pages.length)return Promise.resolve(M);const R=(()=>{const $={client:t.client,queryKey:t.queryKey,pageParam:E,direction:O?"backward":"forward",meta:t.options.meta};return x($),$})(),k=await A(R),{maxPages:z}=t.options,G=O?jU:MU;return{pages:G(M.pages,k,z),pageParams:G(M.pageParams,E,z)}};if(i&&s.length){const M=i==="backward",E=M?LU:gP,O={pages:s,pageParams:l},j=E(r,O);c=await _(O,j,M)}else{const M=e??s.length;do{const E=f===0?l[0]??r.initialPageParam:gP(r,c);if(f>0&&E==null)break;c=await _(c,E),f++}while(f {var S,x;return(x=(S=t.options).persister)==null?void 0:x.call(S,d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=d}}}function gP(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function LU(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Gc,ou,Kc,ta,su,ur,Pp,lu,Ei,Vz,Co,Pz,zU=(Pz=class extends Uz{constructor(t){super();qe(this,Ei);qe(this,Gc);qe(this,ou);qe(this,Kc);qe(this,ta);qe(this,su);qe(this,ur);qe(this,Pp);qe(this,lu);Ce(this,lu,!1),Ce(this,Pp,t.defaultOptions),this.setOptions(t.options),this.observers=[],Ce(this,su,t.client),Ce(this,ta,W(this,su).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Ce(this,ou,xP(this.options)),this.state=t.state??W(this,ou),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return W(this,Gc)}get promise(){var t;return(t=W(this,ur))==null?void 0:t.promise}setOptions(t){if(this.options={...W(this,Pp),...t},t!=null&&t._type&&Ce(this,Gc,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=xP(this.options);n.data!==void 0&&(this.setState(bP(n.data,n.dataUpdatedAt)),Ce(this,ou,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&W(this,ta).remove(this)}setData(t,n){const r=L_(this.state.data,t,this.options);return at(this,Ei,Co).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t){at(this,Ei,Co).call(this,{type:"setState",state:t})}cancel(t){var r,i;const n=(r=W(this,ur))==null?void 0:r.promise;return(i=W(this,ur))==null||i.cancel(t),n?n.then(Kr).catch(Kr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return W(this,ou)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Mi(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===YO||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>il(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!zz(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=W(this,ur))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=W(this,ur))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),W(this,ta).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(W(this,ur)&&(W(this,lu)||at(this,Ei,Vz).call(this)?W(this,ur).cancel({revert:!0}):W(this,ur).cancelRetry()),this.scheduleGc()),W(this,ta).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||at(this,Ei,Co).call(this,{type:"invalidate"})}async fetch(t,n){var d,m,p,v,b,w,S,x,A,_,M;if(this.state.fetchStatus!=="idle"&&((d=W(this,ur))==null?void 0:d.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(W(this,ur))return W(this,ur).continueRetry(),W(this,ur).promise}if(t&&this.setOptions(t),!this.options.queryFn){const E=this.observers.find(O=>O.options.queryFn);E&&this.setOptions(E.options)}const r=new AbortController,i=E=>{Object.defineProperty(E,"signal",{enumerable:!0,get:()=>(Ce(this,lu,!0),r.signal)})},s=()=>{const E=Bz(this.options,n),j=(()=>{const R={client:W(this,su),queryKey:this.queryKey,meta:this.meta};return i(R),R})();return Ce(this,lu,!1),this.options.persister?this.options.persister(E,j,this):E(j)},c=(()=>{const E={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:W(this,su),state:this.state,fetchFn:s};return i(E),E})(),f=W(this,Gc)==="infinite"?kU(this.options.pages):this.options.behavior;f==null||f.onFetch(c,this),Ce(this,Kc,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((m=c.fetchOptions)==null?void 0:m.meta))&&at(this,Ei,Co).call(this,{type:"fetch",meta:(p=c.fetchOptions)==null?void 0:p.meta}),Ce(this,ur,Iz({initialPromise:n==null?void 0:n.initialPromise,fn:c.fetchFn,onCancel:E=>{E instanceof $_&&E.revert&&this.setState({...W(this,Kc),fetchStatus:"idle"}),r.abort()},onFail:(E,O)=>{at(this,Ei,Co).call(this,{type:"failed",failureCount:E,error:O})},onPause:()=>{at(this,Ei,Co).call(this,{type:"pause"})},onContinue:()=>{at(this,Ei,Co).call(this,{type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0}));try{const E=await W(this,ur).start();if(E===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(E),(b=(v=W(this,ta).config).onSuccess)==null||b.call(v,E,this),(S=(w=W(this,ta).config).onSettled)==null||S.call(w,E,this.state.error,this),E}catch(E){if(E instanceof $_){if(E.silent)return W(this,ur).promise;if(E.revert){if(this.state.data===void 0)throw E;return this.state.data}}throw at(this,Ei,Co).call(this,{type:"error",error:E}),(A=(x=W(this,ta).config).onError)==null||A.call(x,E,this),(M=(_=W(this,ta).config).onSettled)==null||M.call(_,this.state.data,E,this),E}finally{this.scheduleGc()}}},Gc=new WeakMap,ou=new WeakMap,Kc=new WeakMap,ta=new WeakMap,su=new WeakMap,ur=new WeakMap,Pp=new WeakMap,lu=new WeakMap,Ei=new WeakSet,Vz=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Co=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Hz(r.data,this.options),fetchMeta:t.meta??null};case"success":const i={...r,...bP(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Ce(this,Kc,t.manual?i:void 0),i;case"error":const s=t.error;return{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Qn.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),W(this,ta).notify({query:this,type:"updated",action:t})})},Pz);function Hz(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:qz(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function bP(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function xP(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var oi,vt,Cp,Gr,uu,Yc,Do,Xs,Dp,Xc,Wc,cu,fu,Ws,Qc,Nt,yh,B_,q_,I_,U_,V_,H_,F_,Fz,Cz,$U=(Cz=class extends Bf{constructor(t,n){super();qe(this,Nt);qe(this,oi);qe(this,vt);qe(this,Cp);qe(this,Gr);qe(this,uu);qe(this,Yc);qe(this,Do);qe(this,Xs);qe(this,Dp);qe(this,Xc);qe(this,Wc);qe(this,cu);qe(this,fu);qe(this,Ws);qe(this,Qc,new Set);this.options=n,Ce(this,oi,t),Ce(this,Xs,null),Ce(this,Do,z_()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(W(this,vt).addObserver(this),SP(W(this,vt),this.options)?at(this,Nt,yh).call(this):this.updateResult(),at(this,Nt,U_).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return G_(W(this,vt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return G_(W(this,vt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,at(this,Nt,V_).call(this),at(this,Nt,H_).call(this),W(this,vt).removeObserver(this)}setOptions(t){const n=this.options,r=W(this,vt);if(this.options=W(this,oi).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Mi(this.options.enabled,W(this,vt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");at(this,Nt,F_).call(this),W(this,vt).setOptions(this.options),n._defaulted&&!Xv(this.options,n)&&W(this,oi).getQueryCache().notify({type:"observerOptionsUpdated",query:W(this,vt),observer:this});const i=this.hasListeners();i&&wP(W(this,vt),r,this.options,n)&&at(this,Nt,yh).call(this),this.updateResult(),i&&(W(this,vt)!==r||Mi(this.options.enabled,W(this,vt))!==Mi(n.enabled,W(this,vt))||il(this.options.staleTime,W(this,vt))!==il(n.staleTime,W(this,vt)))&&at(this,Nt,B_).call(this);const s=at(this,Nt,q_).call(this);i&&(W(this,vt)!==r||Mi(this.options.enabled,W(this,vt))!==Mi(n.enabled,W(this,vt))||s!==W(this,Ws))&&at(this,Nt,I_).call(this,s)}getOptimisticResult(t){const n=W(this,oi).getQueryCache().build(W(this,oi),t),r=this.createResult(n,t);return qU(this,r)&&(Ce(this,Gr,r),Ce(this,Yc,this.options),Ce(this,uu,W(this,vt).state)),r}getCurrentResult(){return W(this,Gr)}trackResult(t,n){return new Proxy(t,{get:(r,i)=>(this.trackProp(i),n==null||n(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&W(this,Do).status==="pending"&&W(this,Do).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,i))})}trackProp(t){W(this,Qc).add(t)}getCurrentQuery(){return W(this,vt)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=W(this,oi).defaultQueryOptions(t),r=W(this,oi).getQueryCache().build(W(this,oi),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return at(this,Nt,yh).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),W(this,Gr)))}createResult(t,n){var z;const r=W(this,vt),i=this.options,s=W(this,Gr),l=W(this,uu),c=W(this,Yc),d=t!==r?t.state:W(this,Cp),{state:m}=t;let p={...m},v=!1,b;if(n._optimisticResults){const G=this.hasListeners(),$=!G&&SP(t,n),B=G&&wP(t,r,n,i);($||B)&&(p={...p,...Hz(m.data,t.options)}),n._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:w,errorUpdatedAt:S,status:x}=p;b=p.data;let A=!1;if(n.placeholderData!==void 0&&b===void 0&&x==="pending"){let G;s!=null&&s.isPlaceholderData&&n.placeholderData===(c==null?void 0:c.placeholderData)?(G=s.data,A=!0):G=typeof n.placeholderData=="function"?n.placeholderData((z=W(this,Wc))==null?void 0:z.state.data,W(this,Wc)):n.placeholderData,G!==void 0&&(x="success",b=L_(s==null?void 0:s.data,G,n),v=!0)}if(n.select&&b!==void 0&&!A)if(s&&b===(l==null?void 0:l.data)&&n.select===W(this,Dp))b=W(this,Xc);else try{Ce(this,Dp,n.select),b=n.select(b),b=L_(s==null?void 0:s.data,b,n),Ce(this,Xc,b),Ce(this,Xs,null)}catch(G){Ce(this,Xs,G)}W(this,Xs)&&(w=W(this,Xs),b=W(this,Xc),S=Date.now(),x="error");const _=p.fetchStatus==="fetching",M=x==="pending",E=x==="error",O=M&&_,j=b!==void 0,k={status:x,fetchStatus:p.fetchStatus,isPending:M,isSuccess:x==="success",isError:E,isInitialLoading:O,isLoading:O,data:b,dataUpdatedAt:p.dataUpdatedAt,error:w,errorUpdatedAt:S,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:p.dataUpdateCount>d.dataUpdateCount||p.errorUpdateCount>d.errorUpdateCount,isFetching:_,isRefetching:_&&!M,isLoadingError:E&&!j,isPaused:p.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:E&&j,isStale:WO(t,n),refetch:this.refetch,promise:W(this,Do),isEnabled:Mi(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const G=k.data!==void 0,$=k.status==="error"&&!G,B=J=>{$?J.reject(k.error):G&&J.resolve(k.data)},Z=()=>{const J=Ce(this,Do,k.promise=z_());B(J)},ee=W(this,Do);switch(ee.status){case"pending":t.queryHash===r.queryHash&&B(ee);break;case"fulfilled":($||k.data!==ee.value)&&Z();break;case"rejected":(!$||k.error!==ee.reason)&&Z();break}}return k}updateResult(){const t=W(this,Gr),n=this.createResult(W(this,vt),this.options);if(Ce(this,uu,W(this,vt).state),Ce(this,Yc,this.options),W(this,uu).data!==void 0&&Ce(this,Wc,W(this,vt)),Xv(n,t))return;Ce(this,Gr,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,s=typeof i=="function"?i():i;if(s==="all"||!s&&!W(this,Qc).size)return!0;const l=new Set(s??W(this,Qc));return this.options.throwOnError&&l.add("error"),Object.keys(W(this,Gr)).some(c=>{const f=c;return W(this,Gr)[f]!==t[f]&&l.has(f)})};at(this,Nt,Fz).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&at(this,Nt,U_).call(this)}},oi=new WeakMap,vt=new WeakMap,Cp=new WeakMap,Gr=new WeakMap,uu=new WeakMap,Yc=new WeakMap,Do=new WeakMap,Xs=new WeakMap,Dp=new WeakMap,Xc=new WeakMap,Wc=new WeakMap,cu=new WeakMap,fu=new WeakMap,Ws=new WeakMap,Qc=new WeakMap,Nt=new WeakSet,yh=function(t){at(this,Nt,F_).call(this);let n=W(this,vt).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Kr)),n},B_=function(){at(this,Nt,V_).call(this);const t=il(this.options.staleTime,W(this,vt));if(Uh.isServer()||W(this,Gr).isStale||!N_(t))return;const r=zz(W(this,Gr).dataUpdatedAt,t)+1;Ce(this,cu,Ql.setTimeout(()=>{W(this,Gr).isStale||this.updateResult()},r))},q_=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(W(this,vt)):this.options.refetchInterval)??!1},I_=function(t){at(this,Nt,H_).call(this),Ce(this,Ws,t),!(Uh.isServer()||Mi(this.options.enabled,W(this,vt))===!1||!N_(W(this,Ws))||W(this,Ws)===0)&&Ce(this,fu,Ql.setInterval(()=>{(this.options.refetchIntervalInBackground||GO.isFocused())&&at(this,Nt,yh).call(this)},W(this,Ws)))},U_=function(){at(this,Nt,B_).call(this),at(this,Nt,I_).call(this,at(this,Nt,q_).call(this))},V_=function(){W(this,cu)!==void 0&&(Ql.clearTimeout(W(this,cu)),Ce(this,cu,void 0))},H_=function(){W(this,fu)!==void 0&&(Ql.clearInterval(W(this,fu)),Ce(this,fu,void 0))},F_=function(){const t=W(this,oi).getQueryCache().build(W(this,oi),this.options);if(t===W(this,vt))return;const n=W(this,vt);Ce(this,vt,t),Ce(this,Cp,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Fz=function(t){Qn.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(W(this,Gr))}),W(this,oi).getQueryCache().notify({query:W(this,vt),type:"observerResultsUpdated"})})},Cz);function BU(e,t){return Mi(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Mi(t.retryOnMount,e)===!1)}function SP(e,t){return BU(e,t)||e.state.data!==void 0&&G_(e,t,t.refetchOnMount)}function G_(e,t,n){if(Mi(t.enabled,e)!==!1&&il(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&WO(e,t)}return!1}function wP(e,t,n,r){return(e!==t||Mi(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&WO(e,n)}function WO(e,t){return Mi(t.enabled,e)!==!1&&e.isStaleByTime(il(t.staleTime,e))}function qU(e,t){return!Xv(e.getCurrentResult(),t)}var Rp,Va,Nr,du,Ha,qs,Dz,IU=(Dz=class extends Uz{constructor(t){super();qe(this,Ha);qe(this,Rp);qe(this,Va);qe(this,Nr);qe(this,du);Ce(this,Rp,t.client),this.mutationId=t.mutationId,Ce(this,Nr,t.mutationCache),Ce(this,Va,[]),this.state=t.state||Gz(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){W(this,Va).includes(t)||(W(this,Va).push(t),this.clearGcTimeout(),W(this,Nr).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Ce(this,Va,W(this,Va).filter(n=>n!==t)),this.scheduleGc(),W(this,Nr).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){W(this,Va).length||(this.state.status==="pending"?this.scheduleGc():W(this,Nr).remove(this))}continue(){var t;return((t=W(this,du))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var l,c,f,d,m,p,v,b,w,S,x,A,_,M,E,O,j,R;const n=()=>{at(this,Ha,qs).call(this,{type:"continue"})},r={client:W(this,Rp),meta:this.options.meta,mutationKey:this.options.mutationKey};Ce(this,du,Iz({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(k,z)=>{at(this,Ha,qs).call(this,{type:"failed",failureCount:k,error:z})},onPause:()=>{at(this,Ha,qs).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>W(this,Nr).canRun(this)}));const i=this.state.status==="pending",s=!W(this,du).canStart();try{if(i)n();else{at(this,Ha,qs).call(this,{type:"pending",variables:t,isPaused:s}),W(this,Nr).config.onMutate&&await W(this,Nr).config.onMutate(t,this,r);const z=await((c=(l=this.options).onMutate)==null?void 0:c.call(l,t,r));z!==this.state.context&&at(this,Ha,qs).call(this,{type:"pending",context:z,variables:t,isPaused:s})}const k=await W(this,du).start();return await((d=(f=W(this,Nr).config).onSuccess)==null?void 0:d.call(f,k,t,this.state.context,this,r)),await((p=(m=this.options).onSuccess)==null?void 0:p.call(m,k,t,this.state.context,r)),await((b=(v=W(this,Nr).config).onSettled)==null?void 0:b.call(v,k,null,this.state.variables,this.state.context,this,r)),await((S=(w=this.options).onSettled)==null?void 0:S.call(w,k,null,t,this.state.context,r)),at(this,Ha,qs).call(this,{type:"success",data:k}),k}catch(k){try{await((A=(x=W(this,Nr).config).onError)==null?void 0:A.call(x,k,t,this.state.context,this,r))}catch(z){Promise.reject(z)}try{await((M=(_=this.options).onError)==null?void 0:M.call(_,k,t,this.state.context,r))}catch(z){Promise.reject(z)}try{await((O=(E=W(this,Nr).config).onSettled)==null?void 0:O.call(E,void 0,k,this.state.variables,this.state.context,this,r))}catch(z){Promise.reject(z)}try{await((R=(j=this.options).onSettled)==null?void 0:R.call(j,void 0,k,t,this.state.context,r))}catch(z){Promise.reject(z)}throw at(this,Ha,qs).call(this,{type:"error",error:k}),k}finally{W(this,Nr).runNext(this)}}},Rp=new WeakMap,Va=new WeakMap,Nr=new WeakMap,du=new WeakMap,Ha=new WeakSet,qs=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Qn.batch(()=>{W(this,Va).forEach(r=>{r.onMutationUpdate(t)}),W(this,Nr).notify({mutation:this,type:"updated",action:t})})},Dz);function Gz(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ro,ba,Np,Rz,UU=(Rz=class extends Bf{constructor(t={}){super();qe(this,Ro);qe(this,ba);qe(this,Np);this.config=t,Ce(this,Ro,new Set),Ce(this,ba,new Map),Ce(this,Np,0)}build(t,n,r){const i=new IU({client:t,mutationCache:this,mutationId:++mv(this,Np)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){W(this,Ro).add(t);const n=yv(t);if(typeof n=="string"){const r=W(this,ba).get(n);r?r.push(t):W(this,ba).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(W(this,Ro).delete(t)){const n=yv(t);if(typeof n=="string"){const r=W(this,ba).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&W(this,ba).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=yv(t);if(typeof n=="string"){const r=W(this,ba).get(n),i=r==null?void 0:r.find(s=>s.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r;const n=yv(t);if(typeof n=="string"){const i=(r=W(this,ba).get(n))==null?void 0:r.find(s=>s!==t&&s.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Qn.batch(()=>{W(this,Ro).forEach(t=>{this.notify({type:"removed",mutation:t})}),W(this,Ro).clear(),W(this,ba).clear()})}getAll(){return Array.from(W(this,Ro))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>mP(n,r))}findAll(t={}){return this.getAll().filter(n=>mP(t,n))}notify(t){Qn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Qn.batch(()=>Promise.all(t.map(n=>n.continue().catch(Kr))))}},Ro=new WeakMap,ba=new WeakMap,Np=new WeakMap,Rz);function yv(e){var t;return(t=e.options.scope)==null?void 0:t.id}var No,Qs,si,ko,Go,Hv,K_,Nz,VU=(Nz=class extends Bf{constructor(n,r){super();qe(this,Go);qe(this,No);qe(this,Qs);qe(this,si);qe(this,ko);Ce(this,No,n),this.setOptions(r),this.bindMethods(),at(this,Go,Hv).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const r=this.options;this.options=W(this,No).defaultMutationOptions(n),Xv(this.options,r)||W(this,No).getMutationCache().notify({type:"observerOptionsUpdated",mutation:W(this,si),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&gu(r.mutationKey)!==gu(this.options.mutationKey)?this.reset():((i=W(this,si))==null?void 0:i.state.status)==="pending"&&W(this,si).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=W(this,si))==null||n.removeObserver(this)}onMutationUpdate(n){at(this,Go,Hv).call(this),at(this,Go,K_).call(this,n)}getCurrentResult(){return W(this,Qs)}reset(){var n;(n=W(this,si))==null||n.removeObserver(this),Ce(this,si,void 0),at(this,Go,Hv).call(this),at(this,Go,K_).call(this)}mutate(n,r){var i;return Ce(this,ko,r),(i=W(this,si))==null||i.removeObserver(this),Ce(this,si,W(this,No).getMutationCache().build(W(this,No),this.options)),W(this,si).addObserver(this),W(this,si).execute(n)}},No=new WeakMap,Qs=new WeakMap,si=new WeakMap,ko=new WeakMap,Go=new WeakSet,Hv=function(){var r;const n=((r=W(this,si))==null?void 0:r.state)??Gz();Ce(this,Qs,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},K_=function(n){Qn.batch(()=>{var r,i,s,l,c,f,d,m;if(W(this,ko)&&this.hasListeners()){const p=W(this,Qs).variables,v=W(this,Qs).context,b={client:W(this,No),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(i=(r=W(this,ko)).onSuccess)==null||i.call(r,n.data,p,v,b)}catch(w){Promise.reject(w)}try{(l=(s=W(this,ko)).onSettled)==null||l.call(s,n.data,null,p,v,b)}catch(w){Promise.reject(w)}}else if((n==null?void 0:n.type)==="error"){try{(f=(c=W(this,ko)).onError)==null||f.call(c,n.error,p,v,b)}catch(w){Promise.reject(w)}try{(m=(d=W(this,ko)).onSettled)==null||m.call(d,void 0,n.error,p,v,b)}catch(w){Promise.reject(w)}}}this.listeners.forEach(p=>{p(W(this,Qs))})})},Nz),Fa,kz,HU=(kz=class extends Bf{constructor(t={}){super();qe(this,Fa);this.config=t,Ce(this,Fa,new Map)}build(t,n,r){const i=n.queryKey,s=n.queryHash??KO(i,n);let l=this.get(s);return l||(l=new zU({client:t,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(l)),l}add(t){W(this,Fa).has(t.queryHash)||(W(this,Fa).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=W(this,Fa).get(t.queryHash);n&&(t.destroy(),n===t&&W(this,Fa).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Qn.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return W(this,Fa).get(t)}getAll(){return[...W(this,Fa).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>pP(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>pP(t,r)):n}notify(t){Qn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Qn.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Qn.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Fa=new WeakMap,kz),wn,Zs,Js,Zc,Jc,el,ef,tf,Lz,FU=(Lz=class{constructor(e={}){qe(this,wn);qe(this,Zs);qe(this,Js);qe(this,Zc);qe(this,Jc);qe(this,el);qe(this,ef);qe(this,tf);Ce(this,wn,e.queryCache||new HU),Ce(this,Zs,e.mutationCache||new UU),Ce(this,Js,e.defaultOptions||{}),Ce(this,Zc,new Map),Ce(this,Jc,new Map),Ce(this,el,0)}mount(){mv(this,el)._++,W(this,el)===1&&(Ce(this,ef,GO.subscribe(async e=>{e&&(await this.resumePausedMutations(),W(this,wn).onFocus())})),Ce(this,tf,Wv.subscribe(async e=>{e&&(await this.resumePausedMutations(),W(this,wn).onOnline())})))}unmount(){var e,t;mv(this,el)._--,W(this,el)===0&&((e=W(this,ef))==null||e.call(this),Ce(this,ef,void 0),(t=W(this,tf))==null||t.call(this),Ce(this,tf,void 0))}isFetching(e){return W(this,wn).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return W(this,Zs).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=W(this,wn).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=W(this,wn).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(il(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return W(this,wn).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=W(this,wn).get(r.queryHash),s=i==null?void 0:i.state.data,l=OU(t,s);if(l!==void 0)return W(this,wn).build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return Qn.batch(()=>W(this,wn).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=W(this,wn).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=W(this,wn);Qn.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=W(this,wn);return Qn.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Qn.batch(()=>W(this,wn).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Kr).catch(Kr)}invalidateQueries(e,t={}){return Qn.batch(()=>(W(this,wn).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Qn.batch(()=>W(this,wn).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(Kr)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Kr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=W(this,wn).build(this,t);return n.isStaleByTime(il(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Kr).catch(Kr)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Kr).catch(Kr)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Wv.isOnline()?W(this,Zs).resumePausedMutations():Promise.resolve()}getQueryCache(){return W(this,wn)}getMutationCache(){return W(this,Zs)}getDefaultOptions(){return W(this,Js)}setDefaultOptions(e){Ce(this,Js,e)}setQueryDefaults(e,t){W(this,Zc).set(gu(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...W(this,Zc).values()],n={};return t.forEach(r=>{Ih(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){W(this,Jc).set(gu(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...W(this,Jc).values()],n={};return t.forEach(r=>{Ih(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...W(this,Js).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=KO(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===YO&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...W(this,Js).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){W(this,wn).clear(),W(this,Zs).clear()}},wn=new WeakMap,Zs=new WeakMap,Js=new WeakMap,Zc=new WeakMap,Jc=new WeakMap,el=new WeakMap,ef=new WeakMap,tf=new WeakMap,Lz),Kz=K.createContext(void 0),qf=e=>{const t=K.useContext(Kz);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},GU=({client:e,children:t})=>(K.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),T.jsx(Kz.Provider,{value:e,children:t})),Yz=K.createContext(!1),KU=()=>K.useContext(Yz);Yz.Provider;function YU(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var XU=K.createContext(YU()),WU=()=>K.useContext(XU),QU=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?XO(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},ZU=e=>{K.useEffect(()=>{e.clearReset()},[e])},JU=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||XO(n,[e.error,r])),eV=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...i)=>n(r(...i)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},tV=(e,t)=>e.isLoading&&e.isFetching&&!t,nV=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,_P=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function rV(e,t,n){var v,b,w,S;const r=KU(),i=WU(),s=qf(),l=s.defaultQueryOptions(e);(b=(v=s.getDefaultOptions().queries)==null?void 0:v._experimental_beforeQuery)==null||b.call(v,l);const c=s.getQueryCache().get(l.queryHash);l._optimisticResults=r?"isRestoring":"optimistic",eV(l),QU(l,i,c),ZU(i);const f=!s.getQueryCache().get(l.queryHash),[d]=K.useState(()=>new t(s,l)),m=d.getOptimisticResult(l),p=!r&&e.subscribed!==!1;if(K.useSyncExternalStore(K.useCallback(x=>{const A=p?d.subscribe(Qn.batchCalls(x)):Kr;return d.updateResult(),A},[d,p]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),K.useEffect(()=>{d.setOptions(l)},[l,d]),nV(l,m))throw _P(l,d,i);if(JU({result:m,errorResetBoundary:i,throwOnError:l.throwOnError,query:c,suspense:l.suspense}))throw m.error;if((S=(w=s.getDefaultOptions().queries)==null?void 0:w._experimental_afterQuery)==null||S.call(w,l,m),l.experimental_prefetchInRender&&!Uh.isServer()&&tV(m,r)){const x=f?_P(l,d,i):c==null?void 0:c.promise;x==null||x.catch(Kr).finally(()=>{d.updateResult()})}return l.notifyOnChangeProps?m:d.trackResult(m)}function Xz(e,t){return rV(e,$U)}function sg(e,t){const n=qf(),[r]=K.useState(()=>new VU(n,e));K.useEffect(()=>{r.setOptions(e)},[r,e]);const i=K.useSyncExternalStore(K.useCallback(l=>r.subscribe(Qn.batchCalls(l)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=K.useCallback((l,c)=>{r.mutate(l,c).catch(Kr)},[r]);if(i.error&&XO(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}function Wz(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{const t=oV(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{const c=l.split(QO);return c[0]===""&&c.length!==1&&c.shift(),Qz(c,t)||aV(l)},getConflictingClassGroupIds:(l,c)=>{const f=n[l]||[];return c&&r[l]?[...f,...r[l]]:f}}},Qz=(e,t)=>{var l;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?Qz(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const s=e.join(QO);return(l=t.validators.find(({validator:c})=>c(s)))==null?void 0:l.classGroupId},AP=/^\[(.+)\]$/,aV=e=>{if(AP.test(e)){const t=AP.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},oV=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return lV(Object.entries(e.classGroups),n).forEach(([s,l])=>{Y_(l,r,s,t)}),r},Y_=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const s=i===""?t:OP(t,i);s.classGroupId=n;return}if(typeof i=="function"){if(sV(i)){Y_(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,l])=>{Y_(l,OP(t,s),n,r)})})},OP=(e,t)=>{let n=e;return t.split(QO).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},sV=e=>e.isThemeGetter,lV=(e,t)=>t?e.map(([n,r])=>{const i=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([l,c])=>[t+l,c])):s);return[n,i]}):e,uV=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(s,l)=>{n.set(s,l),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let l=n.get(s);if(l!==void 0)return l;if((l=r.get(s))!==void 0)return i(s,l),l},set(s,l){n.has(s)?n.set(s,l):i(s,l)}}},Zz="!",cV=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],s=t.length,l=c=>{const f=[];let d=0,m=0,p;for(let x=0;x m?p-m:void 0;return{modifiers:f,hasImportantModifier:b,baseClassName:w,maybePostfixModifierPosition:S}};return n?c=>n({className:c,parseClassName:l}):l},fV=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},dV=e=>({cache:uV(e.cacheSize),parseClassName:cV(e),...iV(e)}),hV=/\s+/,pV=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,s=[],l=e.trim().split(hV);let c="";for(let f=l.length-1;f>=0;f-=1){const d=l[f],{modifiers:m,hasImportantModifier:p,baseClassName:v,maybePostfixModifierPosition:b}=n(d);let w=!!b,S=r(w?v.substring(0,b):v);if(!S){if(!w){c=d+(c.length>0?" "+c:c);continue}if(S=r(v),!S){c=d+(c.length>0?" "+c:c);continue}w=!1}const x=fV(m).join(":"),A=p?x+Zz:x,_=A+S;if(s.includes(_))continue;s.push(_);const M=i(S,w);for(let E=0;E 0?" "+c:c)}return c};function mV(){let e=0,t,n,r="";for(;e {if(typeof e=="string")return e;let t,n="";for(let r=0;r p(m),e());return n=dV(d),r=n.cache.get,i=n.cache.set,s=c,c(f)}function c(f){const d=r(f);if(d)return d;const m=pV(f,n);return i(f,m),m}return function(){return s(mV.apply(null,arguments))}}const on=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},e$=/^\[(?:([a-z-]+):)?(.+)\]$/i,yV=/^\d+\/\d+$/,gV=new Set(["px","full","screen"]),bV=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,xV=/\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$/,SV=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,wV=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,_V=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,jo=e=>zc(e)||gV.has(e)||yV.test(e),$s=e=>If(e,"length",CV),zc=e=>!!e&&!Number.isNaN(Number(e)),lx=e=>If(e,"number",zc),rh=e=>!!e&&Number.isInteger(Number(e)),AV=e=>e.endsWith("%")&&zc(e.slice(0,-1)),ot=e=>e$.test(e),Bs=e=>bV.test(e),OV=new Set(["length","size","percentage"]),TV=e=>If(e,OV,t$),EV=e=>If(e,"position",t$),MV=new Set(["image","url"]),jV=e=>If(e,MV,RV),PV=e=>If(e,"",DV),ih=()=>!0,If=(e,t,n)=>{const r=e$.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},CV=e=>xV.test(e)&&!SV.test(e),t$=()=>!1,DV=e=>wV.test(e),RV=e=>_V.test(e),NV=()=>{const e=on("colors"),t=on("spacing"),n=on("blur"),r=on("brightness"),i=on("borderColor"),s=on("borderRadius"),l=on("borderSpacing"),c=on("borderWidth"),f=on("contrast"),d=on("grayscale"),m=on("hueRotate"),p=on("invert"),v=on("gap"),b=on("gradientColorStops"),w=on("gradientColorStopPositions"),S=on("inset"),x=on("margin"),A=on("opacity"),_=on("padding"),M=on("saturate"),E=on("scale"),O=on("sepia"),j=on("skew"),R=on("space"),k=on("translate"),z=()=>["auto","contain","none"],G=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto",ot,t],B=()=>[ot,t],Z=()=>["",jo,$s],ee=()=>["auto",zc,ot],J=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],q=()=>["solid","dashed","dotted","double","none"],F=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ie=()=>["start","end","center","between","around","evenly","stretch"],ce=()=>["","0",ot],U=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>[zc,ot];return{cacheSize:500,separator:":",theme:{colors:[ih],spacing:[jo,$s],blur:["none","",Bs,ot],brightness:D(),borderColor:[e],borderRadius:["none","","full",Bs,ot],borderSpacing:B(),borderWidth:Z(),contrast:D(),grayscale:ce(),hueRotate:D(),invert:ce(),gap:B(),gradientColorStops:[e],gradientColorStopPositions:[AV,$s],inset:$(),margin:$(),opacity:D(),padding:B(),saturate:D(),scale:D(),sepia:ce(),skew:D(),space:B(),translate:B()},classGroups:{aspect:[{aspect:["auto","square","video",ot]}],container:["container"],columns:[{columns:[Bs]}],"break-after":[{"break-after":U()}],"break-before":[{"break-before":U()}],"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"],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:[...J(),ot]}],overflow:[{overflow:G()}],"overflow-x":[{"overflow-x":G()}],"overflow-y":[{"overflow-y":G()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[S]}],"inset-x":[{"inset-x":[S]}],"inset-y":[{"inset-y":[S]}],start:[{start:[S]}],end:[{end:[S]}],top:[{top:[S]}],right:[{right:[S]}],bottom:[{bottom:[S]}],left:[{left:[S]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",rh,ot]}],basis:[{basis:$()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ot]}],grow:[{grow:ce()}],shrink:[{shrink:ce()}],order:[{order:["first","last","none",rh,ot]}],"grid-cols":[{"grid-cols":[ih]}],"col-start-end":[{col:["auto",{span:["full",rh,ot]},ot]}],"col-start":[{"col-start":ee()}],"col-end":[{"col-end":ee()}],"grid-rows":[{"grid-rows":[ih]}],"row-start-end":[{row:["auto",{span:[rh,ot]},ot]}],"row-start":[{"row-start":ee()}],"row-end":[{"row-end":ee()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ot]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ot]}],gap:[{gap:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",...ie()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ie(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ie(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[_]}],px:[{px:[_]}],py:[{py:[_]}],ps:[{ps:[_]}],pe:[{pe:[_]}],pt:[{pt:[_]}],pr:[{pr:[_]}],pb:[{pb:[_]}],pl:[{pl:[_]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[R]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[R]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ot,t]}],"min-w":[{"min-w":[ot,t,"min","max","fit"]}],"max-w":[{"max-w":[ot,t,"none","full","min","max","fit","prose",{screen:[Bs]},Bs]}],h:[{h:[ot,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ot,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ot,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ot,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Bs,$s]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",lx]}],"font-family":[{font:[ih]}],"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:["tighter","tight","normal","wide","wider","widest",ot]}],"line-clamp":[{"line-clamp":["none",zc,lx]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",jo,ot]}],"list-image":[{"list-image":["none",ot]}],"list-style-type":[{list:["none","disc","decimal",ot]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[A]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[A]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...q(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",jo,$s]}],"underline-offset":[{"underline-offset":["auto",jo,ot]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:B()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ot]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ot]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[A]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...J(),EV]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",TV]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},jV]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[c]}],"border-w-x":[{"border-x":[c]}],"border-w-y":[{"border-y":[c]}],"border-w-s":[{"border-s":[c]}],"border-w-e":[{"border-e":[c]}],"border-w-t":[{"border-t":[c]}],"border-w-r":[{"border-r":[c]}],"border-w-b":[{"border-b":[c]}],"border-w-l":[{"border-l":[c]}],"border-opacity":[{"border-opacity":[A]}],"border-style":[{border:[...q(),"hidden"]}],"divide-x":[{"divide-x":[c]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[c]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[A]}],"divide-style":[{divide:q()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...q()]}],"outline-offset":[{"outline-offset":[jo,ot]}],"outline-w":[{outline:[jo,$s]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[A]}],"ring-offset-w":[{"ring-offset":[jo,$s]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Bs,PV]}],"shadow-color":[{shadow:[ih]}],opacity:[{opacity:[A]}],"mix-blend":[{"mix-blend":[...F(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":F()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",Bs,ot]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[m]}],invert:[{invert:[p]}],saturate:[{saturate:[M]}],sepia:[{sepia:[O]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[m]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[A]}],"backdrop-saturate":[{"backdrop-saturate":[M]}],"backdrop-sepia":[{"backdrop-sepia":[O]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ot]}],duration:[{duration:D()}],ease:[{ease:["linear","in","out","in-out",ot]}],delay:[{delay:D()}],animate:[{animate:["none","spin","ping","pulse","bounce",ot]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[E]}],"scale-x":[{"scale-x":[E]}],"scale-y":[{"scale-y":[E]}],rotate:[{rotate:[rh,ot]}],"translate-x":[{"translate-x":[k]}],"translate-y":[{"translate-y":[k]}],"skew-x":[{"skew-x":[j]}],"skew-y":[{"skew-y":[j]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ot]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",ot]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":B()}],"scroll-mx":[{"scroll-mx":B()}],"scroll-my":[{"scroll-my":B()}],"scroll-ms":[{"scroll-ms":B()}],"scroll-me":[{"scroll-me":B()}],"scroll-mt":[{"scroll-mt":B()}],"scroll-mr":[{"scroll-mr":B()}],"scroll-mb":[{"scroll-mb":B()}],"scroll-ml":[{"scroll-ml":B()}],"scroll-p":[{"scroll-p":B()}],"scroll-px":[{"scroll-px":B()}],"scroll-py":[{"scroll-py":B()}],"scroll-ps":[{"scroll-ps":B()}],"scroll-pe":[{"scroll-pe":B()}],"scroll-pt":[{"scroll-pt":B()}],"scroll-pr":[{"scroll-pr":B()}],"scroll-pb":[{"scroll-pb":B()}],"scroll-pl":[{"scroll-pl":B()}],"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",ot]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[jo,$s,lx]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"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-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-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"],"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"]}}},kV=vV(NV);function nf(...e){return kV(ut(e))}function li(e){if(e==null||Number.isNaN(e))return"—";const t=["B","KB","MB","GB","TB"];let n=Number(e),r=0;for(;n>=1024&&r n+r,0)}const TP=e=>{let t;const n=new Set,r=(d,m)=>{const p=typeof d=="function"?d(t):d;if(!Object.is(p,t)){const v=t;t=m??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(b=>b(t,v))}},i=()=>t,c={setState:r,getState:i,getInitialState:()=>f,subscribe:d=>(n.add(d),()=>n.delete(d))},f=t=e(r,i,c);return c},LV=(e=>e?TP(e):TP),zV=e=>e;function $V(e,t=zV){const n=Q.useSyncExternalStore(e.subscribe,Q.useCallback(()=>t(e.getState()),[e,t]),Q.useCallback(()=>t(e.getInitialState()),[e,t]));return Q.useDebugValue(n),n}const EP=e=>{const t=LV(e),n=r=>$V(t,r);return Object.assign(n,t),n},BV=(e=>e?EP(e):EP),MP=e=>Symbol.iterator in e,jP=e=>"entries"in e,PP=(e,t)=>{const n=e instanceof Map?e:new Map(e.entries()),r=t instanceof Map?t:new Map(t.entries());if(n.size!==r.size)return!1;for(const[i,s]of n)if(!r.has(i)||!Object.is(s,r.get(i)))return!1;return!0},qV=(e,t)=>{const n=e[Symbol.iterator](),r=t[Symbol.iterator]();let i=n.next(),s=r.next();for(;!i.done&&!s.done;){if(!Object.is(i.value,s.value))return!1;i=n.next(),s=r.next()}return!!i.done&&!!s.done};function IV(e,t){return Object.is(e,t)?!0:typeof e!="object"||e===null||typeof t!="object"||t===null||Object.getPrototypeOf(e)!==Object.getPrototypeOf(t)?!1:MP(e)&&MP(t)?jP(e)&&jP(t)?PP(e,t):qV(e,t):PP({entries:()=>Object.entries(e)},{entries:()=>Object.entries(t)})}function lg(e){const t=Q.useRef(void 0);return n=>{const r=e(n);return IV(t.current,r)?t.current:t.current=r}}const n$="mtplx.dashboard.theme";function r$(){if(typeof window>"u")return"hippo";const e=window.localStorage.getItem(n$);return e==="hippo"||e==="river"||e==="light"||e==="mono"?e:"hippo"}function CP(e){if(!(typeof window>"u"))try{window.localStorage.setItem(n$,e),window.document.documentElement.setAttribute("data-theme",e)}catch{}}const ux=["hippo","river","light","mono"],De=BV((e,t)=>({snapshot:null,latest:null,recent:[],rolling:null,lifetime:null,inFlight:[],sessionBank:null,sessions:null,mem:null,thermal:null,thermalWhenS:0,settings:null,modelId:null,profileName:null,contextWindow:null,machine:null,uptimeS:0,liveTokS:null,liveProgressByRequest:{},activePrefillByRequest:{},lastCompletedPrefill:null,newMaxTPSEvent:null,connection:"idle",reconnectAttempts:0,lastSnapshotAtMs:null,authRequired:!1,sessionFilter:null,theme:r$(),pauseStream:!1,soundEnabled:!1,applySnapshot:n=>{if(t().pauseStream)return;const r={};(n.in_flight??[]).forEach(s=>{s.prefill_state&&(r[s.request_id]={...s.prefill_state,request_id:s.request_id,session_id:s.session_id})});const i=n.in_flight??[];e(s=>{var l;return{snapshot:n,latest:n.latest,recent:n.recent??[],rolling:n.rolling,lifetime:n.lifetime,inFlight:i,sessionBank:n.session_bank??null,sessions:n.sessions??null,mem:n.mem,thermal:n.thermal,thermalWhenS:n.thermal_when_s,settings:n.settings,modelId:n.model_id,profileName:((l=n.profile)==null?void 0:l.name)??null,contextWindow:n.context_window,machine:n.machine,uptimeS:n.uptime_s,activePrefillByRequest:r,liveTokS:i.length>0?s.liveTokS:null,lastSnapshotAtMs:Date.now()}})},applyEvent:n=>{var r;if(!t().pauseStream)switch(n.kind){case"progress":{const i=(r=n.progress)==null?void 0:r.decode_tok_s;e(s=>({liveTokS:typeof i=="number"&&i>0?i:s.liveTokS,liveProgressByRequest:{...s.liveProgressByRequest,[n.request_id]:n}}));break}case"completed":{e(i=>({latest:n.envelope??i.latest,liveTokS:null}));break}case"new_max_tps":{e({newMaxTPSEvent:{tok_s:n.tok_s,when_s:n.when_s,session_id:n.session_id}});break}case"thermal":{e({thermal:n.thermal,thermalWhenS:n.when_s});break}case"prefill":{const i=n.request_id,s={phase:n.phase,tokens_done:n.tokens_done,tokens_total:n.tokens_total,cached_tokens:n.cached_tokens,new_prefill_tokens:n.new_prefill_tokens,elapsed_s:n.elapsed_s,prefill_tok_s:n.prefill_tok_s,chunk_size:n.chunk_size,cache_hit:n.cache_hit,started_s:n.started_s,request_id:i,session_id:n.session_id};n.phase==="completed"?e(l=>{const c={...l.activePrefillByRequest};return delete c[i],{activePrefillByRequest:c,lastCompletedPrefill:{...s,when_s:n.when_s}}}):e(l=>({activePrefillByRequest:{...l.activePrefillByRequest,[i]:s}}));break}case"snapshot":{t().applySnapshot(n);break}}},mergeSettings:n=>e(r=>r.settings?{settings:{...r.settings,...n}}:{}),setConnection:n=>{e(r=>({connection:n,reconnectAttempts:n==="reconnecting"?r.reconnectAttempts+1:0}))},setAuthRequired:n=>e({authRequired:n}),setSessionFilter:n=>e({sessionFilter:n}),setTheme:n=>{CP(n),e({theme:n})},cycleTheme:()=>{const n=t().theme,r=ux[(ux.indexOf(n)+1)%ux.length];CP(r),e({theme:r})},togglePauseStream:()=>e(n=>({pauseStream:!n.pauseStream})),toggleSound:()=>e(n=>({soundEnabled:!n.soundEnabled})),consumeNewMaxTPS:()=>e({newMaxTPSEvent:null})}));typeof window<"u"&&window.document.documentElement.setAttribute("data-theme",r$());function UV(){return De(lg(e=>{var n;const t=new Set;return(n=e.rolling)==null||n.history.forEach(r=>{r.session_id&&t.add(r.session_id)}),e.inFlight.forEach(r=>{r.session_id&&t.add(r.session_id)}),Array.from(t).sort()}))}function VV(){return De(lg(e=>{if(!e.rolling)return[];const t=e.sessionFilter;return t?e.rolling.history.filter(n=>n.session_id===t):e.rolling.history}))}function HV(){return De(lg(e=>e.sessionFilter?e.recent.filter(t=>t.session_id===e.sessionFilter):e.recent))}function i$(){return De(lg(e=>{const t=Object.values(e.activePrefillByRequest);if(t.length===0)return{active:!1};const n=t.reduce((m,p)=>(p.elapsed_s??0)>(m.elapsed_s??0)?p:m),r=Number(n.tokens_total??0),i=Number(n.tokens_done??0),s=Number(n.elapsed_s??0),l=r>0?Math.min(100,i/r*100):0,c=typeof n.prefill_tok_s=="number"&&n.prefill_tok_s>0?n.prefill_tok_s:i>0&&s>0?i/s:null,f=Math.max(0,r-i),d=c&&c>0&&f>0?f/c:null;return{active:!0,request_id:n.request_id,session_id:n.session_id,tokens_done:i,tokens_total:r,cached_tokens:Number(n.cached_tokens??0),elapsed_s:s,prefill_tok_s:c,pct:l,eta_s:d}}))}function FV(){const e=De(p=>p.latest),t=De(p=>p.lifetime),n=De(p=>p.liveTokS),r=(e==null?void 0:e.completion_tokens)??null,i=(e==null?void 0:e.ttft_s)??null,s=typeof n=="number",l=s?n:(e==null?void 0:e.decode_tok_s)??null,c=(e==null?void 0:e.request_tok_s)??null,f=(e==null?void 0:e.prompt_eval_time_s)??null,d=(e==null?void 0:e.decode_elapsed_s)??null,m=(t==null?void 0:t.requests_total)??0;return T.jsxs("div",{className:"px-4 lg:px-6 py-2 flex items-center justify-between gap-4 text-xs",children:[T.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-[var(--text-muted)] min-w-0",children:[T.jsx(Il,{label:"tok",value:We(r)}),T.jsx(Il,{label:"ttft",value:Zn(i)}),T.jsx(Il,{label:"prompt eval",value:Zn(f)}),T.jsx(Il,{label:"decode",value:Zn(d)}),T.jsx(Il,{label:s?"tok/s live":"tok/s",value:On(l),highlight:s}),T.jsx(Il,{label:"req tok/s",value:On(c)}),T.jsx(Il,{label:"lifetime req",value:We(m)})]}),T.jsx("div",{className:"text-[10px] uppercase tracking-widest text-[var(--text-muted)] hidden sm:block",children:"MTPLX live"})]})}function Il({label:e,value:t,highlight:n=!1}){return T.jsxs("span",{className:"flex items-baseline gap-1.5 whitespace-nowrap",children:[T.jsx("span",{className:"text-[10px] uppercase tracking-widest text-[var(--text-muted)]",children:e}),T.jsx("span",{className:"tabular-nums font-medium "+(n?"text-[var(--accent)]":"text-[var(--text-primary)]"),children:t})]})}function ct({title:e,subtitle:t,action:n,className:r,bodyClassName:i,children:s}){return T.jsxs("section",{className:nf("rounded-2xl border border-[var(--border-soft)] bg-[var(--bg-card)] shadow-[inset_0_1px_0_0_rgba(255,255,255,0.02)] overflow-hidden",r),children:[(e||n)&&T.jsxs("header",{className:"px-5 pt-4 pb-2 flex items-start justify-between gap-4",children:[T.jsxs("div",{className:"min-w-0",children:[e?T.jsx("h3",{className:"text-sm font-semibold text-[var(--text-primary)] tracking-tight",children:e}):null,t?T.jsx("p",{className:"text-xs text-[var(--text-muted)] mt-0.5",children:t}):null]}),n?T.jsx("div",{className:"shrink-0",children:n}):null]}),T.jsx("div",{className:nf("px-5 pb-5 pt-2",i),children:s})]})}function Ya({value:e,unit:t,caption:n,tone:r="default"}){const i=r==="accent"?"text-[var(--accent)]":r==="warm"?"text-[var(--accent-warm)]":r==="hot"?"text-[var(--accent-hot)]":r==="cool"?"text-[var(--accent-cool)]":"text-[var(--text-primary)]";return T.jsxs("div",{children:[T.jsxs("div",{className:nf("flex items-baseline gap-2",i),children:[T.jsx("span",{className:"text-4xl font-semibold tabular-nums leading-none",children:e}),t?T.jsx("span",{className:"text-sm text-[var(--text-muted)]",children:t}):null]}),n?T.jsx("div",{className:"text-xs text-[var(--text-muted)] mt-2",children:n}):null]})}function GV(){const e=De(i=>i.lifetime),t=(e==null?void 0:e.cached_tokens_total)??0,n=(e==null?void 0:e.prompt_tokens_total)??0,r=n>0?t/n*100:0;return T.jsx(ct,{title:"Cached tokens · lifetime",subtitle:"cached / prompt across all requests",children:T.jsx(Ya,{value:We(t),unit:"tokens",tone:"accent",caption:`${r.toFixed(1)}% of ${We(n)} prompt tokens`})})}function KV(){const t=De(s=>s.recent).slice(-32),n=t.filter(s=>s.session_cache_hit).length,r=t.length>0?n/t.length*100:0,i=r>=70?"accent":r>=40?"warm":"hot";return T.jsx(ct,{title:"Session cache hit rate",subtitle:`last ${t.length} requests`,children:T.jsx(Ya,{value:`${r.toFixed(0)}%`,unit:"hit",tone:i,caption:`${n} hits / ${t.length} requests`})})}function YV(){const e=De(l=>l.latest),t=De(l=>l.contextWindow),n=(e==null?void 0:e.context_len)??0,r=t?Math.min(100,n/t*100):0,i=r>=95?"hot":r>=75?"warm":r>=50?"cool":"accent",s=i==="hot"?"var(--accent-hot)":i==="warm"?"var(--accent-warm)":i==="cool"?"var(--accent-cool)":"var(--accent)";return T.jsxs(ct,{title:"Context window utilization",subtitle:`${We(n)} / ${We(t??0)} tokens`,children:[T.jsx("div",{className:"h-4 w-full rounded-full bg-[var(--bg-elevated)] overflow-hidden border border-[var(--border-soft)]",children:T.jsx("div",{className:"h-full transition-[width] duration-500",style:{width:`${r}%`,background:s}})}),T.jsxs("div",{className:"flex justify-between mt-2 text-xs text-[var(--text-muted)] tabular-nums",children:[T.jsx("span",{children:"0"}),T.jsxs("span",{className:"text-[var(--text-primary)] font-semibold",children:[r.toFixed(0),"%"]}),T.jsx("span",{children:We(t??0)})]})]})}var cx,DP;function fi(){if(DP)return cx;DP=1;var e=Array.isArray;return cx=e,cx}var fx,RP;function a$(){if(RP)return fx;RP=1;var e=typeof vv=="object"&&vv&&vv.Object===Object&&vv;return fx=e,fx}var dx,NP;function to(){if(NP)return dx;NP=1;var e=a$(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return dx=n,dx}var hx,kP;function kp(){if(kP)return hx;kP=1;var e=to(),t=e.Symbol;return hx=t,hx}var px,LP;function XV(){if(LP)return px;LP=1;var e=kp(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,i=e?e.toStringTag:void 0;function s(l){var c=n.call(l,i),f=l[i];try{l[i]=void 0;var d=!0}catch{}var m=r.call(l);return d&&(c?l[i]=f:delete l[i]),m}return px=s,px}var mx,zP;function WV(){if(zP)return mx;zP=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return mx=n,mx}var vx,$P;function Jo(){if($P)return vx;$P=1;var e=kp(),t=XV(),n=WV(),r="[object Null]",i="[object Undefined]",s=e?e.toStringTag:void 0;function l(c){return c==null?c===void 0?i:r:s&&s in Object(c)?t(c):n(c)}return vx=l,vx}var yx,BP;function es(){if(BP)return yx;BP=1;function e(t){return t!=null&&typeof t=="object"}return yx=e,yx}var gx,qP;function Uf(){if(qP)return gx;qP=1;var e=Jo(),t=es(),n="[object Symbol]";function r(i){return typeof i=="symbol"||t(i)&&e(i)==n}return gx=r,gx}var bx,IP;function JO(){if(IP)return bx;IP=1;var e=fi(),t=Uf(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(s,l){if(e(s))return!1;var c=typeof s;return c=="number"||c=="symbol"||c=="boolean"||s==null||t(s)?!0:r.test(s)||!n.test(s)||l!=null&&s in Object(l)}return bx=i,bx}var xx,UP;function ll(){if(UP)return xx;UP=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return xx=e,xx}var Sx,VP;function eT(){if(VP)return Sx;VP=1;var e=Jo(),t=ll(),n="[object AsyncFunction]",r="[object Function]",i="[object GeneratorFunction]",s="[object Proxy]";function l(c){if(!t(c))return!1;var f=e(c);return f==r||f==i||f==n||f==s}return Sx=l,Sx}var wx,HP;function QV(){if(HP)return wx;HP=1;var e=to(),t=e["__core-js_shared__"];return wx=t,wx}var _x,FP;function ZV(){if(FP)return _x;FP=1;var e=QV(),t=(function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!t&&t in r}return _x=n,_x}var Ax,GP;function o$(){if(GP)return Ax;GP=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return Ax=n,Ax}var Ox,KP;function JV(){if(KP)return Ox;KP=1;var e=eT(),t=ZV(),n=ll(),r=o$(),i=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,f=l.toString,d=c.hasOwnProperty,m=RegExp("^"+f.call(d).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function p(v){if(!n(v)||t(v))return!1;var b=e(v)?m:s;return b.test(r(v))}return Ox=p,Ox}var Tx,YP;function eH(){if(YP)return Tx;YP=1;function e(t,n){return t==null?void 0:t[n]}return Tx=e,Tx}var Ex,XP;function Eu(){if(XP)return Ex;XP=1;var e=JV(),t=eH();function n(r,i){var s=t(r,i);return e(s)?s:void 0}return Ex=n,Ex}var Mx,WP;function ug(){if(WP)return Mx;WP=1;var e=Eu(),t=e(Object,"create");return Mx=t,Mx}var jx,QP;function tH(){if(QP)return jx;QP=1;var e=ug();function t(){this.__data__=e?e(null):{},this.size=0}return jx=t,jx}var Px,ZP;function nH(){if(ZP)return Px;ZP=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return Px=e,Px}var Cx,JP;function rH(){if(JP)return Cx;JP=1;var e=ug(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function i(s){var l=this.__data__;if(e){var c=l[s];return c===t?void 0:c}return r.call(l,s)?l[s]:void 0}return Cx=i,Cx}var Dx,eC;function iH(){if(eC)return Dx;eC=1;var e=ug(),t=Object.prototype,n=t.hasOwnProperty;function r(i){var s=this.__data__;return e?s[i]!==void 0:n.call(s,i)}return Dx=r,Dx}var Rx,tC;function aH(){if(tC)return Rx;tC=1;var e=ug(),t="__lodash_hash_undefined__";function n(r,i){var s=this.__data__;return this.size+=this.has(r)?0:1,s[r]=e&&i===void 0?t:i,this}return Rx=n,Rx}var Nx,nC;function oH(){if(nC)return Nx;nC=1;var e=tH(),t=nH(),n=rH(),r=iH(),i=aH();function s(l){var c=-1,f=l==null?0:l.length;for(this.clear();++c -1}return qx=t,qx}var Ix,uC;function fH(){if(uC)return Ix;uC=1;var e=cg();function t(n,r){var i=this.__data__,s=e(i,n);return s<0?(++this.size,i.push([n,r])):i[s][1]=r,this}return Ix=t,Ix}var Ux,cC;function fg(){if(cC)return Ux;cC=1;var e=sH(),t=lH(),n=uH(),r=cH(),i=fH();function s(l){var c=-1,f=l==null?0:l.length;for(this.clear();++c >>=0,a===0?32:31-(ku(a)/ns|0)|0}var ro=256,vr=262144,rs=4194304;function Ma(a){var o=a&42;if(o!==0)return o;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 Lu(a,o,u){var h=a.pendingLanes;if(h===0)return 0;var y=0,g=a.suspendedLanes,C=a.pingedLanes;a=a.warmLanes;var L=h&134217727;return L!==0?(h=L&~g,h!==0?y=Ma(h):(C&=L,C!==0?y=Ma(C):u||(u=L&~a,u!==0&&(y=Ma(u))))):(L=h&~g,L!==0?y=Ma(L):C!==0?y=Ma(C):u||(u=h&~a,u!==0&&(y=Ma(u)))),y===0?0:o!==0&&o!==y&&(o&g)===0&&(g=y&-y,u=o&-o,g>=u||g===32&&(u&4194048)!==0)?o:y}function vl(a,o){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&o)===0}function o0(a,o){switch(a){case 1:case 2:case 4:case 8:case 64:return o+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 o+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 Xp(){var a=rs;return rs<<=1,(rs&62914560)===0&&(rs=4194304),a}function rd(a){for(var o=[],u=0;31>u;u++)o.push(a);return o}function pi(a,o){a.pendingLanes|=o,o!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function ir(a,o,u,h,y,g){var C=a.pendingLanes;a.pendingLanes=u,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=u,a.entangledLanes&=u,a.errorRecoveryDisabledLanes&=u,a.shellSuspendCounter=0;var L=a.entanglements,Y=a.expirationTimes,se=a.hiddenUpdates;for(u=C&~u;0"u")return null;try{return a.activeElement||a.body}catch{return a.body}}var s0=/[\n"\\]/g;function Ir(a){return a.replace(s0,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function Uu(a,o,u,h,y,g,C,L){a.name="",C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"?a.type=C:a.removeAttribute("type"),o!=null?C==="number"?(o===0&&a.value===""||a.value!=o)&&(a.value=""+qr(o)):a.value!==""+qr(o)&&(a.value=""+qr(o)):C!=="submit"&&C!=="reset"||a.removeAttribute("value"),o!=null?Vu(a,C,qr(o)):u!=null?Vu(a,C,qr(u)):h!=null&&a.removeAttribute("value"),y==null&&g!=null&&(a.defaultChecked=!!g),y!=null&&(a.checked=y&&typeof y!="function"&&typeof y!="symbol"),L!=null&&typeof L!="function"&&typeof L!="symbol"&&typeof L!="boolean"?a.name=""+qr(L):a.removeAttribute("name")}function Zp(a,o,u,h,y,g,C,L){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(a.type=g),o!=null||u!=null){if(!(g!=="submit"&&g!=="reset"||o!=null)){qu(a);return}u=u!=null?""+qr(u):"",o=o!=null?""+qr(o):u,L||o===a.value||(a.value=o),a.defaultValue=o}h=h??y,h=typeof h!="function"&&typeof h!="symbol"&&!!h,a.checked=L?a.checked:!!h,a.defaultChecked=!!h,C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"&&(a.name=C),qu(a)}function Vu(a,o,u){o==="number"&&Iu(a.ownerDocument)===a||a.defaultValue===""+u||(a.defaultValue=""+u)}function Pa(a,o,u,h){if(a=a.options,o){o={};for(var y=0;y "u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ku=!1;if(jr)try{var cs={};Object.defineProperty(cs,"passive",{get:function(){Ku=!0}}),window.addEventListener("test",cs,cs),window.removeEventListener("test",cs,cs)}catch{Ku=!1}var Vr=null,Ra=null,wl=null;function hd(){if(wl)return wl;var a,o=Ra,u=o.length,h,y="value"in Vr?Vr.value:Vr.textContent,g=y.length;for(a=0;a=ps),Sd=" ",co=!1;function Tl(a,o){switch(a){case"keyup":return um.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Mn(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var fo=!1;function gn(a,o){switch(a){case"compositionend":return Mn(o);case"keypress":return o.which!==32?null:(co=!0,Sd);case"textInput":return a=o.data,a===Sd&&co?null:a;default:return null}}function cm(a,o){if(fo)return a==="compositionend"||!Yu&&Tl(a,o)?(a=hd(),wl=Ra=Vr=null,fo=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1 =o)return{node:u,offset:o-a};a=h}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=Ve(u)}}function qt(a,o){return a&&o?a===o?!0:a&&a.nodeType===3?!1:o&&o.nodeType===3?qt(a,o.parentNode):"contains"in a?a.contains(o):a.compareDocumentPosition?!!(a.compareDocumentPosition(o)&16):!1:!1}function nn(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var o=Iu(a.document);o instanceof a.HTMLIFrameElement;){try{var u=typeof o.contentWindow.location.href=="string"}catch{u=!1}if(u)a=o.contentWindow;else break;o=Iu(a.document)}return o}function bn(a){var o=a&&a.nodeName&&a.nodeName.toLowerCase();return o&&(o==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||o==="textarea"||a.contentEditable==="true")}var Ct=jr&&"documentMode"in document&&11>=document.documentMode,Lt=null,gr=null,jn=null,Cr=!1;function Jr(a,o,u){var h=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;Cr||Lt==null||Lt!==Iu(h)||(h=Lt,"selectionStart"in h&&bn(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),jn&&et(jn,h)||(jn=h,h=ev(gr,"onSelect"),0 >=C,y-=C,La=1<<32-mr(o)+y|u< it?(dt=$e,$e=null):dt=$e.sibling;var wt=le(re,$e,oe[it],ge);if(wt===null){$e===null&&($e=dt);break}a&&$e&&wt.alternate===null&&o(re,$e),ne=g(wt,ne,it),St===null?Ue=wt:St.sibling=wt,St=wt,$e=dt}if(it===oe.length)return u(re,$e),mt&&mo(re,it),Ue;if($e===null){for(;it it?(dt=$e,$e=null):dt=$e.sibling;var zs=le(re,$e,wt.value,ge);if(zs===null){$e===null&&($e=dt);break}a&&$e&&zs.alternate===null&&o(re,$e),ne=g(zs,ne,it),St===null?Ue=zs:St.sibling=zs,St=zs,$e=dt}if(wt.done)return u(re,$e),mt&&mo(re,it),Ue;if($e===null){for(;!wt.done;it++,wt=oe.next())wt=xe(re,wt.value,ge),wt!==null&&(ne=g(wt,ne,it),St===null?Ue=wt:St.sibling=wt,St=wt);return mt&&mo(re,it),Ue}for($e=h($e);!wt.done;it++,wt=oe.next())wt=fe($e,re,it,wt.value,ge),wt!==null&&(a&&wt.alternate!==null&&$e.delete(wt.key===null?it:wt.key),ne=g(wt,ne,it),St===null?Ue=wt:St.sibling=wt,St=wt);return a&&$e.forEach(function(sU){return o(re,sU)}),mt&&mo(re,it),Ue}function Vt(re,ne,oe,ge){if(typeof oe=="object"&&oe!==null&&oe.type===S&&oe.key===null&&(oe=oe.props.children),typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case b:e:{for(var Ue=oe.key;ne!==null;){if(ne.key===Ue){if(Ue=oe.type,Ue===S){if(ne.tag===7){u(re,ne.sibling),ge=y(ne,oe.props.children),ge.return=re,re=ge;break e}}else if(ne.elementType===Ue||typeof Ue=="object"&&Ue!==null&&Ue.$$typeof===k&&Nl(Ue)===ne.type){u(re,ne.sibling),ge=y(ne,oe.props),Md(ge,oe),ge.return=re,re=ge;break e}u(re,ne);break}else o(re,ne);ne=ne.sibling}oe.type===S?(ge=jl(oe.props.children,re.mode,ge,oe.key),ge.return=re,re=ge):(ge=ym(oe.type,oe.key,oe.props,null,re.mode,ge),Md(ge,oe),ge.return=re,re=ge)}return C(re);case w:e:{for(Ue=oe.key;ne!==null;){if(ne.key===Ue)if(ne.tag===4&&ne.stateNode.containerInfo===oe.containerInfo&&ne.stateNode.implementation===oe.implementation){u(re,ne.sibling),ge=y(ne,oe.children||[]),ge.return=re,re=ge;break e}else{u(re,ne);break}else o(re,ne);ne=ne.sibling}ge=b0(oe,re.mode,ge),ge.return=re,re=ge}return C(re);case k:return oe=Nl(oe),Vt(re,ne,oe,ge)}if(J(oe))return Le(re,ne,oe,ge);if(B(oe)){if(Ue=B(oe),typeof Ue!="function")throw Error(r(150));return oe=Ue.call(oe),He(re,ne,oe,ge)}if(typeof oe.then=="function")return Vt(re,ne,Am(oe),ge);if(oe.$$typeof===M)return Vt(re,ne,xm(re,oe),ge);Om(re,oe)}return typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint"?(oe=""+oe,ne!==null&&ne.tag===6?(u(re,ne.sibling),ge=y(ne,oe),ge.return=re,re=ge):(u(re,ne),ge=g0(oe,re.mode,ge),ge.return=re,re=ge),C(re)):u(re,ne)}return function(re,ne,oe,ge){try{Ed=0;var Ue=Vt(re,ne,oe,ge);return ic=null,Ue}catch($e){if($e===rc||$e===wm)throw $e;var St=yi(29,$e,null,re.mode);return St.lanes=ge,St.return=re,St}finally{}}}var Ll=yE(!0),gE=yE(!1),xs=!1;function P0(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function D0(a,o){a=a.updateQueue,o.updateQueue===a&&(o.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function Ss(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function ws(a,o,u){var h=a.updateQueue;if(h===null)return null;if(h=h.shared,(Tt&2)!==0){var y=h.pending;return y===null?o.next=o:(o.next=y.next,y.next=o),h.pending=o,o=vm(a),tE(a,null,u),o}return mm(a,h,o,u),vm(a)}function jd(a,o,u){if(o=o.updateQueue,o!==null&&(o=o.shared,(u&4194048)!==0)){var h=o.lanes;h&=a.pendingLanes,u|=h,o.lanes=u,io(a,u)}}function R0(a,o){var u=a.updateQueue,h=a.alternate;if(h!==null&&(h=h.updateQueue,u===h)){var y=null,g=null;if(u=u.firstBaseUpdate,u!==null){do{var C={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};g===null?y=g=C:g=g.next=C,u=u.next}while(u!==null);g===null?y=g=o:g=g.next=o}else y=g=o;u={baseState:h.baseState,firstBaseUpdate:y,lastBaseUpdate:g,shared:h.shared,callbacks:h.callbacks},a.updateQueue=u;return}a=u.lastBaseUpdate,a===null?u.firstBaseUpdate=o:a.next=o,u.lastBaseUpdate=o}var N0=!1;function Cd(){if(N0){var a=nc;if(a!==null)throw a}}function Pd(a,o,u,h){N0=!1;var y=a.updateQueue;xs=!1;var g=y.firstBaseUpdate,C=y.lastBaseUpdate,L=y.shared.pending;if(L!==null){y.shared.pending=null;var Y=L,se=Y.next;Y.next=null,C===null?g=se:C.next=se,C=Y;var pe=a.alternate;pe!==null&&(pe=pe.updateQueue,L=pe.lastBaseUpdate,L!==C&&(L===null?pe.firstBaseUpdate=se:L.next=se,pe.lastBaseUpdate=Y))}if(g!==null){var xe=y.baseState;C=0,pe=se=Y=null,L=g;do{var le=L.lane&-536870913,fe=le!==L.lane;if(fe?(ft&le)===le:(h&le)===le){le!==0&&le===tc&&(N0=!0),pe!==null&&(pe=pe.next={lane:0,tag:L.tag,payload:L.payload,callback:null,next:null});e:{var Le=a,He=L;le=o;var Vt=u;switch(He.tag){case 1:if(Le=He.payload,typeof Le=="function"){xe=Le.call(Vt,xe,le);break e}xe=Le;break e;case 3:Le.flags=Le.flags&-65537|128;case 0:if(Le=He.payload,le=typeof Le=="function"?Le.call(Vt,xe,le):Le,le==null)break e;xe=p({},xe,le);break e;case 2:xs=!0}}le=L.callback,le!==null&&(a.flags|=64,fe&&(a.flags|=8192),fe=y.callbacks,fe===null?y.callbacks=[le]:fe.push(le))}else fe={lane:le,tag:L.tag,payload:L.payload,callback:L.callback,next:null},pe===null?(se=pe=fe,Y=xe):pe=pe.next=fe,C|=le;if(L=L.next,L===null){if(L=y.shared.pending,L===null)break;fe=L,L=fe.next,fe.next=null,y.lastBaseUpdate=fe,y.shared.pending=null}}while(!0);pe===null&&(Y=xe),y.baseState=Y,y.firstBaseUpdate=se,y.lastBaseUpdate=pe,g===null&&(y.shared.lanes=0),Es|=C,a.lanes=C,a.memoizedState=xe}}function bE(a,o){if(typeof a!="function")throw Error(r(191,a));a.call(o)}function xE(a,o){var u=a.callbacks;if(u!==null)for(a.callbacks=null,a=0;a g?g:8;var C=q.T,L={};q.T=L,J0(a,!1,o,u);try{var Y=y(),se=q.S;if(se!==null&&se(L,Y),Y!==null&&typeof Y=="object"&&typeof Y.then=="function"){var pe=WI(Y,h);Nd(a,o,pe,wi(a))}else Nd(a,o,h,wi(a))}catch(xe){Nd(a,o,{then:function(){},status:"rejected",reason:xe},wi())}finally{F.p=g,C!==null&&L.types!==null&&(C.types=L.types),q.T=C}}function n8(){}function Q0(a,o,u,h){if(a.tag!==5)throw Error(r(476));var y=ZE(a).queue;QE(a,y,o,ie,u===null?n8:function(){return JE(a),u(h)})}function ZE(a){var o=a.memoizedState;if(o!==null)return o;o={memoizedState:ie,baseState:ie,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:bo,lastRenderedState:ie},next:null};var u={};return o.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:bo,lastRenderedState:u},next:null},a.memoizedState=o,a=a.alternate,a!==null&&(a.memoizedState=o),o}function JE(a){var o=ZE(a);o.next===null&&(o=a.alternate.memoizedState),Nd(a,o.next.queue,{},wi())}function Z0(){return Sr(Qd)}function eM(){return Pn().memoizedState}function tM(){return Pn().memoizedState}function r8(a){for(var o=a.return;o!==null;){switch(o.tag){case 24:case 3:var u=wi();a=Ss(u);var h=ws(o,a,u);h!==null&&(ai(h,o,u),jd(h,o,u)),o={cache:E0()},a.payload=o;return}o=o.return}}function i8(a,o,u){var h=wi();u={lane:h,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},km(a)?rM(o,u):(u=v0(a,o,u,h),u!==null&&(ai(u,a,h),iM(u,o,h)))}function nM(a,o,u){var h=wi();Nd(a,o,u,h)}function Nd(a,o,u,h){var y={lane:h,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(km(a))rM(o,y);else{var g=a.alternate;if(a.lanes===0&&(g===null||g.lanes===0)&&(g=o.lastRenderedReducer,g!==null))try{var C=o.lastRenderedState,L=g(C,u);if(y.hasEagerState=!0,y.eagerState=L,Ye(L,C))return mm(a,o,y,0),Gt===null&&pm(),!1}catch{}finally{}if(u=v0(a,o,y,h),u!==null)return ai(u,a,h),iM(u,o,h),!0}return!1}function J0(a,o,u,h){if(h={lane:2,revertLane:Pb(),gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},km(a)){if(o)throw Error(r(479))}else o=v0(a,u,h,2),o!==null&&ai(o,a,2)}function km(a){var o=a.alternate;return a===rt||o!==null&&o===rt}function rM(a,o){oc=Mm=!0;var u=a.pending;u===null?o.next=o:(o.next=u.next,u.next=o),a.pending=o}function iM(a,o,u){if((u&4194048)!==0){var h=o.lanes;h&=a.pendingLanes,u|=h,o.lanes=u,io(a,u)}}var kd={readContext:Sr,use:Pm,useCallback:xn,useContext:xn,useEffect:xn,useImperativeHandle:xn,useLayoutEffect:xn,useInsertionEffect:xn,useMemo:xn,useReducer:xn,useRef:xn,useState:xn,useDebugValue:xn,useDeferredValue:xn,useTransition:xn,useSyncExternalStore:xn,useId:xn,useHostTransitionStatus:xn,useFormState:xn,useActionState:xn,useOptimistic:xn,useMemoCache:xn,useCacheRefresh:xn};kd.useEffectEvent=xn;var aM={readContext:Sr,use:Pm,useCallback:function(a,o){return Fr().memoizedState=[a,o===void 0?null:o],a},useContext:Sr,useEffect:UE,useImperativeHandle:function(a,o,u){u=u!=null?u.concat([a]):null,Rm(4194308,4,GE.bind(null,o,a),u)},useLayoutEffect:function(a,o){return Rm(4194308,4,a,o)},useInsertionEffect:function(a,o){Rm(4,2,a,o)},useMemo:function(a,o){var u=Fr();o=o===void 0?null:o;var h=a();if(zl){zn(!0);try{a()}finally{zn(!1)}}return u.memoizedState=[h,o],h},useReducer:function(a,o,u){var h=Fr();if(u!==void 0){var y=u(o);if(zl){zn(!0);try{u(o)}finally{zn(!1)}}}else y=o;return h.memoizedState=h.baseState=y,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:y},h.queue=a,a=a.dispatch=i8.bind(null,rt,a),[h.memoizedState,a]},useRef:function(a){var o=Fr();return a={current:a},o.memoizedState=a},useState:function(a){a=G0(a);var o=a.queue,u=nM.bind(null,rt,o);return o.dispatch=u,[a.memoizedState,u]},useDebugValue:X0,useDeferredValue:function(a,o){var u=Fr();return W0(u,a,o)},useTransition:function(){var a=G0(!1);return a=QE.bind(null,rt,a.queue,!0,!1),Fr().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,o,u){var h=rt,y=Fr();if(mt){if(u===void 0)throw Error(r(407));u=u()}else{if(u=o(),Gt===null)throw Error(r(349));(ft&127)!==0||TE(h,o,u)}y.memoizedState=u;var g={value:u,getSnapshot:o};return y.queue=g,UE(ME.bind(null,h,g,a),[a]),h.flags|=2048,lc(9,{destroy:void 0},EE.bind(null,h,g,u,o),null),u},useId:function(){var a=Fr(),o=Gt.identifierPrefix;if(mt){var u=za,h=La;u=(h&~(1<<32-mr(h)-1)).toString(32)+u,o="_"+o+"R_"+u,u=jm++,0<\/script>",g=g.removeChild(g.firstChild);break;case"select":g=typeof h.is=="string"?C.createElement("select",{is:h.is}):C.createElement("select"),h.multiple?g.multiple=!0:h.size&&(g.size=h.size);break;default:g=typeof h.is=="string"?C.createElement(y,{is:h.is}):C.createElement(y)}}g[Gn]=o,g[Mr]=h;e:for(C=o.child;C!==null;){if(C.tag===5||C.tag===6)g.appendChild(C.stateNode);else if(C.tag!==4&&C.tag!==27&&C.child!==null){C.child.return=C,C=C.child;continue}if(C===o)break e;for(;C.sibling===null;){if(C.return===null||C.return===o)break e;C=C.return}C.sibling.return=C.return,C=C.sibling}o.stateNode=g;e:switch(_r(g,y,h),y){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}h&&So(o)}}return an(o),hb(o,o.type,a===null?null:a.memoizedProps,o.pendingProps,u),null;case 6:if(a&&o.stateNode!=null)a.memoizedProps!==h&&So(o);else{if(typeof h!="string"&&o.stateNode===null)throw Error(r(166));if(a=Se.current,Ju(o)){if(a=o.stateNode,u=o.memoizedProps,h=null,y=xr,y!==null)switch(y.tag){case 27:case 5:h=y.memoizedProps}a[Gn]=o,a=!!(a.nodeValue===u||h!==null&&h.suppressHydrationWarning===!0||Aj(a.nodeValue,u)),a||gs(o,!0)}else a=tv(a).createTextNode(h),a[Gn]=o,o.stateNode=a}return an(o),null;case 31:if(u=o.memoizedState,a===null||a.memoizedState!==null){if(h=Ju(o),u!==null){if(a===null){if(!h)throw Error(r(318));if(a=o.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(557));a[Gn]=o}else Cl(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;an(o),a=!1}else u=_0(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=u),a=!0;if(!a)return o.flags&256?(bi(o),o):(bi(o),null);if((o.flags&128)!==0)throw Error(r(558))}return an(o),null;case 13:if(h=o.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(y=Ju(o),h!==null&&h.dehydrated!==null){if(a===null){if(!y)throw Error(r(318));if(y=o.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(r(317));y[Gn]=o}else Cl(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;an(o),y=!1}else y=_0(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=y),y=!0;if(!y)return o.flags&256?(bi(o),o):(bi(o),null)}return bi(o),(o.flags&128)!==0?(o.lanes=u,o):(u=h!==null,a=a!==null&&a.memoizedState!==null,u&&(h=o.child,y=null,h.alternate!==null&&h.alternate.memoizedState!==null&&h.alternate.memoizedState.cachePool!==null&&(y=h.alternate.memoizedState.cachePool.pool),g=null,h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(g=h.memoizedState.cachePool.pool),g!==y&&(h.flags|=2048)),u!==a&&u&&(o.child.flags|=8192),qm(o,o.updateQueue),an(o),null);case 4:return de(),a===null&&kb(o.stateNode.containerInfo),an(o),null;case 10:return yo(o.type),an(o),null;case 19:if(V(Cn),h=o.memoizedState,h===null)return an(o),null;if(y=(o.flags&128)!==0,g=h.rendering,g===null)if(y)zd(h,!1);else{if(Sn!==0||a!==null&&(a.flags&128)!==0)for(a=o.child;a!==null;){if(g=Em(a),g!==null){for(o.flags|=128,zd(h,!1),a=g.updateQueue,o.updateQueue=a,qm(o,a),o.subtreeFlags=0,a=u,u=o.child;u!==null;)nE(u,a),u=u.sibling;return X(Cn,Cn.current&1|2),mt&&mo(o,h.treeForkCount),o.child}a=a.sibling}h.tail!==null&&ze()>Fm&&(o.flags|=128,y=!0,zd(h,!1),o.lanes=4194304)}else{if(!y)if(a=Em(g),a!==null){if(o.flags|=128,y=!0,a=a.updateQueue,o.updateQueue=a,qm(o,a),zd(h,!0),h.tail===null&&h.tailMode==="hidden"&&!g.alternate&&!mt)return an(o),null}else 2*ze()-h.renderingStartTime>Fm&&u!==536870912&&(o.flags|=128,y=!0,zd(h,!1),o.lanes=4194304);h.isBackwards?(g.sibling=o.child,o.child=g):(a=h.last,a!==null?a.sibling=g:o.child=g,h.last=g)}return h.tail!==null?(a=h.tail,h.rendering=a,h.tail=a.sibling,h.renderingStartTime=ze(),a.sibling=null,u=Cn.current,X(Cn,y?u&1|2:u&1),mt&&mo(o,h.treeForkCount),a):(an(o),null);case 22:case 23:return bi(o),L0(),h=o.memoizedState!==null,a!==null?a.memoizedState!==null!==h&&(o.flags|=8192):h&&(o.flags|=8192),h?(u&536870912)!==0&&(o.flags&128)===0&&(an(o),o.subtreeFlags&6&&(o.flags|=8192)):an(o),u=o.updateQueue,u!==null&&qm(o,u.retryQueue),u=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),h=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(h=o.memoizedState.cachePool.pool),h!==u&&(o.flags|=2048),a!==null&&V(Rl),null;case 24:return u=null,a!==null&&(u=a.memoizedState.cache),o.memoizedState.cache!==u&&(o.flags|=2048),yo(Bn),an(o),null;case 25:return null;case 30:return null}throw Error(r(156,o.tag))}function u8(a,o){switch(S0(o),o.tag){case 1:return a=o.flags,a&65536?(o.flags=a&-65537|128,o):null;case 3:return yo(Bn),de(),a=o.flags,(a&65536)!==0&&(a&128)===0?(o.flags=a&-65537|128,o):null;case 26:case 27:case 5:return Ee(o),null;case 31:if(o.memoizedState!==null){if(bi(o),o.alternate===null)throw Error(r(340));Cl()}return a=o.flags,a&65536?(o.flags=a&-65537|128,o):null;case 13:if(bi(o),a=o.memoizedState,a!==null&&a.dehydrated!==null){if(o.alternate===null)throw Error(r(340));Cl()}return a=o.flags,a&65536?(o.flags=a&-65537|128,o):null;case 19:return V(Cn),null;case 4:return de(),null;case 10:return yo(o.type),null;case 22:case 23:return bi(o),L0(),a!==null&&V(Rl),a=o.flags,a&65536?(o.flags=a&-65537|128,o):null;case 24:return yo(Bn),null;case 25:return null;default:return null}}function jM(a,o){switch(S0(o),o.tag){case 3:yo(Bn),de();break;case 26:case 27:case 5:Ee(o);break;case 4:de();break;case 31:o.memoizedState!==null&&bi(o);break;case 13:bi(o);break;case 19:V(Cn);break;case 10:yo(o.type);break;case 22:case 23:bi(o),L0(),a!==null&&V(Rl);break;case 24:yo(Bn)}}function $d(a,o){try{var u=o.updateQueue,h=u!==null?u.lastEffect:null;if(h!==null){var y=h.next;u=y;do{if((u.tag&a)===a){h=void 0;var g=u.create,C=u.inst;h=g(),C.destroy=h}u=u.next}while(u!==y)}}catch(L){$t(o,o.return,L)}}function Os(a,o,u){try{var h=o.updateQueue,y=h!==null?h.lastEffect:null;if(y!==null){var g=y.next;h=g;do{if((h.tag&a)===a){var C=h.inst,L=C.destroy;if(L!==void 0){C.destroy=void 0,y=o;var Y=u,se=L;try{se()}catch(pe){$t(y,Y,pe)}}}h=h.next}while(h!==g)}}catch(pe){$t(o,o.return,pe)}}function CM(a){var o=a.updateQueue;if(o!==null){var u=a.stateNode;try{xE(o,u)}catch(h){$t(a,a.return,h)}}}function PM(a,o,u){u.props=$l(a.type,a.memoizedProps),u.state=a.memoizedState;try{u.componentWillUnmount()}catch(h){$t(a,o,h)}}function Bd(a,o){try{var u=a.ref;if(u!==null){switch(a.tag){case 26:case 27:case 5:var h=a.stateNode;break;case 30:h=a.stateNode;break;default:h=a.stateNode}typeof u=="function"?a.refCleanup=u(h):u.current=h}}catch(y){$t(a,o,y)}}function $a(a,o){var u=a.ref,h=a.refCleanup;if(u!==null)if(typeof h=="function")try{h()}catch(y){$t(a,o,y)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(y){$t(a,o,y)}else u.current=null}function DM(a){var o=a.type,u=a.memoizedProps,h=a.stateNode;try{e:switch(o){case"button":case"input":case"select":case"textarea":u.autoFocus&&h.focus();break e;case"img":u.src?h.src=u.src:u.srcSet&&(h.srcset=u.srcSet)}}catch(y){$t(a,a.return,y)}}function pb(a,o,u){try{var h=a.stateNode;P8(h,a.type,u,o),h[Mr]=o}catch(y){$t(a,a.return,y)}}function RM(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&Ds(a.type)||a.tag===4}function mb(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||RM(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&&Ds(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 vb(a,o,u){var h=a.tag;if(h===5||h===6)a=a.stateNode,o?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(a,o):(o=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,o.appendChild(a),u=u._reactRootContainer,u!=null||o.onclick!==null||(o.onclick=Ur));else if(h!==4&&(h===27&&Ds(a.type)&&(u=a.stateNode,o=null),a=a.child,a!==null))for(vb(a,o,u),a=a.sibling;a!==null;)vb(a,o,u),a=a.sibling}function Im(a,o,u){var h=a.tag;if(h===5||h===6)a=a.stateNode,o?u.insertBefore(a,o):u.appendChild(a);else if(h!==4&&(h===27&&Ds(a.type)&&(u=a.stateNode),a=a.child,a!==null))for(Im(a,o,u),a=a.sibling;a!==null;)Im(a,o,u),a=a.sibling}function NM(a){var o=a.stateNode,u=a.memoizedProps;try{for(var h=a.type,y=o.attributes;y.length;)o.removeAttributeNode(y[0]);_r(o,h,u),o[Gn]=a,o[Mr]=u}catch(g){$t(a,a.return,g)}}var wo=!1,Un=!1,yb=!1,kM=typeof WeakSet=="function"?WeakSet:Set,lr=null;function c8(a,o){if(a=a.containerInfo,$b=lv,a=nn(a),bn(a)){if("selectionStart"in a)var u={start:a.selectionStart,end:a.selectionEnd};else e:{u=(u=a.ownerDocument)&&u.defaultView||window;var h=u.getSelection&&u.getSelection();if(h&&h.rangeCount!==0){u=h.anchorNode;var y=h.anchorOffset,g=h.focusNode;h=h.focusOffset;try{u.nodeType,g.nodeType}catch{u=null;break e}var C=0,L=-1,Y=-1,se=0,pe=0,xe=a,le=null;t:for(;;){for(var fe;xe!==u||y!==0&&xe.nodeType!==3||(L=C+y),xe!==g||h!==0&&xe.nodeType!==3||(Y=C+h),xe.nodeType===3&&(C+=xe.nodeValue.length),(fe=xe.firstChild)!==null;)le=xe,xe=fe;for(;;){if(xe===a)break t;if(le===u&&++se===y&&(L=C),le===g&&++pe===h&&(Y=C),(fe=xe.nextSibling)!==null)break;xe=le,le=xe.parentNode}xe=fe}u=L===-1||Y===-1?null:{start:L,end:Y}}else u=null}u=u||{start:0,end:0}}else u=null;for(Bb={focusedElem:a,selectionRange:u},lv=!1,lr=o;lr!==null;)if(o=lr,a=o.child,(o.subtreeFlags&1028)!==0&&a!==null)a.return=o,lr=a;else for(;lr!==null;){switch(o=lr,g=o.alternate,a=o.flags,o.tag){case 0:if((a&4)!==0&&(a=o.updateQueue,a=a!==null?a.events:null,a!==null))for(u=0;u title"))),_r(g,h,u),g[Gn]=a,En(g),h=g;break e;case"link":var C=Ij("link","href",y).get(h+(u.href||""));if(C){for(var L=0;L Vt&&(C=Vt,Vt=He,He=C);var re=Be(L,He),ne=Be(L,Vt);if(re&&ne&&(fe.rangeCount!==1||fe.anchorNode!==re.node||fe.anchorOffset!==re.offset||fe.focusNode!==ne.node||fe.focusOffset!==ne.offset)){var oe=xe.createRange();oe.setStart(re.node,re.offset),fe.removeAllRanges(),He>Vt?(fe.addRange(oe),fe.extend(ne.node,ne.offset)):(oe.setEnd(ne.node,ne.offset),fe.addRange(oe))}}}}for(xe=[],fe=L;fe=fe.parentNode;)fe.nodeType===1&&xe.push({element:fe,left:fe.scrollLeft,top:fe.scrollTop});for(typeof L.focus=="function"&&L.focus(),L=0;L u?32:u,q.T=null,u=Ab,Ab=null;var g=js,C=Eo;if(Kn=0,hc=js=null,Eo=0,(Tt&6)!==0)throw Error(r(331));var L=Tt;if(Tt|=4,GM(g.current),VM(g,g.current,C,u),Tt=L,Fd(0,!1),Bt&&typeof Bt.onPostCommitFiberRoot=="function")try{Bt.onPostCommitFiberRoot(Ln,g)}catch{}return!0}finally{F.p=y,q.T=h,cj(a,o)}}function dj(a,o,u){o=qi(u,o),o=rb(a.stateNode,o,2),a=ws(a,o,2),a!==null&&(pi(a,2),Ba(a))}function $t(a,o,u){if(a.tag===3)dj(a,a,u);else for(;o!==null;){if(o.tag===3){dj(o,a,u);break}else if(o.tag===1){var h=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Ms===null||!Ms.has(h))){a=qi(u,a),u=hM(2),h=ws(o,u,2),h!==null&&(pM(u,h,o,a),pi(h,2),Ba(h));break}}o=o.return}}function Mb(a,o,u){var h=a.pingCache;if(h===null){h=a.pingCache=new h8;var y=new Set;h.set(o,y)}else y=h.get(o),y===void 0&&(y=new Set,h.set(o,y));y.has(u)||(xb=!0,y.add(u),a=g8.bind(null,a,o,u),o.then(a,a))}function g8(a,o,u){var h=a.pingCache;h!==null&&h.delete(o),a.pingedLanes|=a.suspendedLanes&u,a.warmLanes&=~u,Gt===a&&(ft&u)===u&&(Sn===4||Sn===3&&(ft&62914560)===ft&&300>ze()-Hm?(Tt&2)===0&&pc(a,0):Sb|=u,dc===ft&&(dc=0)),Ba(a)}function hj(a,o){o===0&&(o=Xp()),a=Ml(a,o),a!==null&&(pi(a,o),Ba(a))}function b8(a){var o=a.memoizedState,u=0;o!==null&&(u=o.retryLane),hj(a,u)}function x8(a,o){var u=0;switch(a.tag){case 31:case 13:var h=a.stateNode,y=a.memoizedState;y!==null&&(u=y.retryLane);break;case 19:h=a.stateNode;break;case 22:h=a.stateNode._retryCache;break;default:throw Error(r(314))}h!==null&&h.delete(o),hj(a,u)}function S8(a,o){return pt(a,o)}var Qm=null,vc=null,jb=!1,Zm=!1,Cb=!1,Ps=0;function Ba(a){a!==vc&&a.next===null&&(vc===null?Qm=vc=a:vc=vc.next=a),Zm=!0,jb||(jb=!0,_8())}function Fd(a,o){if(!Cb&&Zm){Cb=!0;do for(var u=!1,h=Qm;h!==null;){if(a!==0){var y=h.pendingLanes;if(y===0)var g=0;else{var C=h.suspendedLanes,L=h.pingedLanes;g=(1<<31-mr(42|a)+1)-1,g&=y&~(C&~L),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(u=!0,yj(h,g))}else g=ft,g=Lu(h,h===Gt?g:0,h.cancelPendingCommit!==null||h.timeoutHandle!==-1),(g&3)===0||vl(h,g)||(u=!0,yj(h,g));h=h.next}while(u);Cb=!1}}function w8(){pj()}function pj(){Zm=jb=!1;var a=0;Ps!==0&&R8()&&(a=Ps);for(var o=ze(),u=null,h=Qm;h!==null;){var y=h.next,g=mj(h,o);g===0?(h.next=null,u===null?Qm=y:u.next=y,y===null&&(vc=u)):(u=h,(a!==0||(g&3)!==0)&&(Zm=!0)),h=y}Kn!==0&&Kn!==5||Fd(a),Ps!==0&&(Ps=0)}function mj(a,o){for(var u=a.suspendedLanes,h=a.pingedLanes,y=a.expirationTimes,g=a.pendingLanes&-62914561;0 L)break;var pe=Y.transferSize,xe=Y.initiatorType;pe&&Oj(xe)&&(Y=Y.responseEnd,C+=pe*(Y "u"?null:document;function zj(a,o,u){var h=yc;if(h&&typeof o=="string"&&o){var y=Ir(o);y='link[rel="'+a+'"][href="'+y+'"]',typeof u=="string"&&(y+='[crossorigin="'+u+'"]'),Lj.has(y)||(Lj.add(y),a={rel:a,crossOrigin:u,href:o},h.querySelector(y)===null&&(o=h.createElement("link"),_r(o,"link",a),En(o),h.head.appendChild(o)))}}function U8(a){Mo.D(a),zj("dns-prefetch",a,null)}function V8(a,o){Mo.C(a,o),zj("preconnect",a,o)}function H8(a,o,u){Mo.L(a,o,u);var h=yc;if(h&&a&&o){var y='link[rel="preload"][as="'+Ir(o)+'"]';o==="image"&&u&&u.imageSrcSet?(y+='[imagesrcset="'+Ir(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(y+='[imagesizes="'+Ir(u.imageSizes)+'"]')):y+='[href="'+Ir(a)+'"]';var g=y;switch(o){case"style":g=gc(a);break;case"script":g=bc(a)}Gi.has(g)||(a=p({rel:"preload",href:o==="image"&&u&&u.imageSrcSet?void 0:a,as:o},u),Gi.set(g,a),h.querySelector(y)!==null||o==="style"&&h.querySelector(Xd(g))||o==="script"&&h.querySelector(Wd(g))||(o=h.createElement("link"),_r(o,"link",a),En(o),h.head.appendChild(o)))}}function F8(a,o){Mo.m(a,o);var u=yc;if(u&&a){var h=o&&typeof o.as=="string"?o.as:"script",y='link[rel="modulepreload"][as="'+Ir(h)+'"][href="'+Ir(a)+'"]',g=y;switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=bc(a)}if(!Gi.has(g)&&(a=p({rel:"modulepreload",href:a},o),Gi.set(g,a),u.querySelector(y)===null)){switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(Wd(g)))return}h=u.createElement("link"),_r(h,"link",a),En(h),u.head.appendChild(h)}}}function G8(a,o,u){Mo.S(a,o,u);var h=yc;if(h&&a){var y=Li(h).hoistableStyles,g=gc(a);o=o||"default";var C=y.get(g);if(!C){var L={loading:0,preload:null};if(C=h.querySelector(Xd(g)))L.loading=5;else{a=p({rel:"stylesheet",href:a,"data-precedence":o},u),(u=Gi.get(g))&&Gb(a,u);var Y=C=h.createElement("link");En(Y),_r(Y,"link",a),Y._p=new Promise(function(se,pe){Y.onload=se,Y.onerror=pe}),Y.addEventListener("load",function(){L.loading|=1}),Y.addEventListener("error",function(){L.loading|=2}),L.loading|=4,rv(C,o,h)}C={type:"stylesheet",instance:C,count:1,state:L},y.set(g,C)}}}function K8(a,o){Mo.X(a,o);var u=yc;if(u&&a){var h=Li(u).hoistableScripts,y=bc(a),g=h.get(y);g||(g=u.querySelector(Wd(y)),g||(a=p({src:a,async:!0},o),(o=Gi.get(y))&&Kb(a,o),g=u.createElement("script"),En(g),_r(g,"link",a),u.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},h.set(y,g))}}function Y8(a,o){Mo.M(a,o);var u=yc;if(u&&a){var h=Li(u).hoistableScripts,y=bc(a),g=h.get(y);g||(g=u.querySelector(Wd(y)),g||(a=p({src:a,async:!0,type:"module"},o),(o=Gi.get(y))&&Kb(a,o),g=u.createElement("script"),En(g),_r(g,"link",a),u.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},h.set(y,g))}}function $j(a,o,u,h){var y=(y=Se.current)?nv(y):null;if(!y)throw Error(r(446));switch(a){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(o=gc(u.href),u=Li(y).hoistableStyles,h=u.get(o),h||(h={type:"style",instance:null,count:0,state:null},u.set(o,h)),h):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){a=gc(u.href);var g=Li(y).hoistableStyles,C=g.get(a);if(C||(y=y.ownerDocument||y,C={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(a,C),(g=y.querySelector(Xd(a)))&&!g._p&&(C.instance=g,C.state.loading=5),Gi.has(a)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},Gi.set(a,u),g||X8(y,a,u,C.state))),o&&h===null)throw Error(r(528,""));return C}if(o&&h!==null)throw Error(r(529,""));return null;case"script":return o=u.async,u=u.src,typeof u=="string"&&o&&typeof o!="function"&&typeof o!="symbol"?(o=bc(u),u=Li(y).hoistableScripts,h=u.get(o),h||(h={type:"script",instance:null,count:0,state:null},u.set(o,h)),h):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,a))}}function gc(a){return'href="'+Ir(a)+'"'}function Xd(a){return'link[rel="stylesheet"]['+a+"]"}function Bj(a){return p({},a,{"data-precedence":a.precedence,precedence:null})}function X8(a,o,u,h){a.querySelector('link[rel="preload"][as="style"]['+o+"]")?h.loading=1:(o=a.createElement("link"),h.preload=o,o.addEventListener("load",function(){return h.loading|=1}),o.addEventListener("error",function(){return h.loading|=2}),_r(o,"link",u),En(o),a.head.appendChild(o))}function bc(a){return'[src="'+Ir(a)+'"]'}function Wd(a){return"script[async]"+a}function qj(a,o,u){if(o.count++,o.instance===null)switch(o.type){case"style":var h=a.querySelector('style[data-href~="'+Ir(u.href)+'"]');if(h)return o.instance=h,En(h),h;var y=p({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return h=(a.ownerDocument||a).createElement("style"),En(h),_r(h,"style",y),rv(h,u.precedence,a),o.instance=h;case"stylesheet":y=gc(u.href);var g=a.querySelector(Xd(y));if(g)return o.state.loading|=4,o.instance=g,En(g),g;h=Bj(u),(y=Gi.get(y))&&Gb(h,y),g=(a.ownerDocument||a).createElement("link"),En(g);var C=g;return C._p=new Promise(function(L,Y){C.onload=L,C.onerror=Y}),_r(g,"link",h),o.state.loading|=4,rv(g,u.precedence,a),o.instance=g;case"script":return g=bc(u.src),(y=a.querySelector(Wd(g)))?(o.instance=y,En(y),y):(h=u,(y=Gi.get(g))&&(h=p({},u),Kb(h,y)),a=a.ownerDocument||a,y=a.createElement("script"),En(y),_r(y,"link",h),a.head.appendChild(y),o.instance=y);case"void":return null;default:throw Error(r(443,o.type))}else o.type==="stylesheet"&&(o.state.loading&4)===0&&(h=o.instance,o.state.loading|=4,rv(h,u.precedence,a));return o.instance}function rv(a,o,u){for(var h=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),y=h.length?h[h.length-1]:null,g=y,C=0;C title"):null)}function W8(a,o,u){if(u===1||o.itemProp!=null)return!1;switch(a){case"meta":case"title":return!0;case"style":if(typeof o.precedence!="string"||typeof o.href!="string"||o.href==="")break;return!0;case"link":if(typeof o.rel!="string"||typeof o.href!="string"||o.href===""||o.onLoad||o.onError)break;switch(o.rel){case"stylesheet":return a=o.disabled,typeof o.precedence=="string"&&a==null;default:return!0}case"script":if(o.async&&typeof o.async!="function"&&typeof o.async!="symbol"&&!o.onLoad&&!o.onError&&o.src&&typeof o.src=="string")return!0}return!1}function Vj(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function Q8(a,o,u,h){if(u.type==="stylesheet"&&(typeof h.media!="string"||matchMedia(h.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var y=gc(h.href),g=o.querySelector(Xd(y));if(g){o=g._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(a.count++,a=av.bind(a),o.then(a,a)),u.state.loading|=4,u.instance=g,En(g);return}g=o.ownerDocument||o,h=Bj(h),(y=Gi.get(y))&&Gb(h,y),g=g.createElement("link"),En(g);var C=g;C._p=new Promise(function(L,Y){C.onload=L,C.onerror=Y}),_r(g,"link",h),u.instance=g}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(u,o),(o=u.state.preload)&&(u.state.loading&3)===0&&(a.count++,u=av.bind(a),o.addEventListener("load",u),o.addEventListener("error",u))}}var Yb=0;function Z8(a,o){return a.stylesheets&&a.count===0&&sv(a,a.stylesheets),0 Yb?50:800)+o);return a.unsuspend=u,function(){a.unsuspend=null,clearTimeout(h),clearTimeout(y)}}:null}function av(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)sv(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var ov=null;function sv(a,o){a.stylesheets=null,a.unsuspend!==null&&(a.count++,ov=new Map,o.forEach(J8,a),ov=null,av.call(a))}function J8(a,o){if(!(o.state.loading&4)){var u=ov.get(a);if(u)var h=u.get(null);else{u=new Map,ov.set(a,u);for(var y=a.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g "u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),ix.exports=yU(),ix.exports}var bU=gU();const xU=Ft(bU);var Bf=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},iu,Gs,Vc,Ez,SU=(Ez=class extends Bf{constructor(){super();qe(this,iu);qe(this,Gs);qe(this,Vc);Pe(this,Vc,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){W(this,Gs)||this.setEventListener(W(this,Vc))}onUnsubscribe(){var t;this.hasListeners()||((t=W(this,Gs))==null||t.call(this),Pe(this,Gs,void 0))}setEventListener(t){var n;Pe(this,Vc,t),(n=W(this,Gs))==null||n.call(this),Pe(this,Gs,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){W(this,iu)!==t&&(Pe(this,iu,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof W(this,iu)=="boolean"?W(this,iu):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},iu=new WeakMap,Gs=new WeakMap,Vc=new WeakMap,Ez),KO=new SU,wU={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Ks,FO,Mz,_U=(Mz=class{constructor(){qe(this,Ks,wU);qe(this,FO,!1)}setTimeoutProvider(e){Pe(this,Ks,e)}setTimeout(e,t){return W(this,Ks).setTimeout(e,t)}clearTimeout(e){W(this,Ks).clearTimeout(e)}setInterval(e,t){return W(this,Ks).setInterval(e,t)}clearInterval(e){W(this,Ks).clearInterval(e)}},Ks=new WeakMap,FO=new WeakMap,Mz),Ql=new _U;function AU(e){setTimeout(e,0)}var OU=typeof window>"u"||"Deno"in globalThis;function Kr(){}function TU(e,t){return typeof e=="function"?e(t):e}function N_(e){return typeof e=="number"&&e>=0&&e!==1/0}function $z(e,t){return Math.max(e+(t||0)-Date.now(),0)}function il(e,t){return typeof e=="function"?e(t):e}function Mi(e,t){return typeof e=="function"?e(t):e}function mC(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:l,stale:c}=e;if(l){if(r){if(t.queryHash!==YO(l,t.options))return!1}else if(!Ih(t.queryKey,l))return!1}if(n!=="all"){const f=t.isActive();if(n==="active"&&!f||n==="inactive"&&f)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||i&&i!==t.state.fetchStatus||s&&!s(t))}function vC(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(gu(t.options.mutationKey)!==gu(s))return!1}else if(!Ih(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function YO(e,t){return((t==null?void 0:t.queryKeyHashFn)||gu)(e)}function gu(e){return JSON.stringify(e,(t,n)=>k_(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Ih(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Ih(e[n],t[n])):!1}var EU=Object.prototype.hasOwnProperty;function Bz(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=yC(e)&&yC(t);if(!r&&!(k_(e)&&k_(t)))return t;const s=(r?e:Object.keys(e)).length,l=r?t:Object.keys(t),c=l.length,f=r?new Array(c):{};let d=0;for(let m=0;m {Ql.setTimeout(t,e)})}function L_(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Bz(e,t):t}function jU(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function CU(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var XO=Symbol();function qz(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===XO?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function WO(e,t){return typeof e=="function"?e(...t):!!e}function PU(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??(i=t()),r||(r=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),e}var Uh=(()=>{let e=()=>OU;return{isServer(){return e()},setIsServer(t){e=t}}})();function z_(){let e,t;const n=new Promise((i,s)=>{e=i,t=s});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}var DU=AU;function RU(){let e=[],t=0,n=c=>{c()},r=c=>{c()},i=DU;const s=c=>{t?e.push(c):i(()=>{n(c)})},l=()=>{const c=e;e=[],c.length&&i(()=>{r(()=>{c.forEach(f=>{n(f)})})})};return{batch:c=>{let f;t++;try{f=c()}finally{t--,t||l()}return f},batchCalls:c=>(...f)=>{s(()=>{c(...f)})},schedule:s,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{r=c},setScheduler:c=>{i=c}}}var Zn=RU(),Hc,Ys,Fc,jz,NU=(jz=class extends Bf{constructor(){super();qe(this,Hc,!0);qe(this,Ys);qe(this,Fc);Pe(this,Fc,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){W(this,Ys)||this.setEventListener(W(this,Fc))}onUnsubscribe(){var t;this.hasListeners()||((t=W(this,Ys))==null||t.call(this),Pe(this,Ys,void 0))}setEventListener(t){var n;Pe(this,Fc,t),(n=W(this,Ys))==null||n.call(this),Pe(this,Ys,t(this.setOnline.bind(this)))}setOnline(t){W(this,Hc)!==t&&(Pe(this,Hc,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return W(this,Hc)}},Hc=new WeakMap,Ys=new WeakMap,Fc=new WeakMap,jz),Wv=new NU;function kU(e){return Math.min(1e3*2**e,3e4)}function Iz(e){return(e??"online")==="online"?Wv.isOnline():!0}var $_=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Uz(e){let t=!1,n=0,r;const i=z_(),s=()=>i.status!=="pending",l=S=>{var x;if(!s()){const A=new $_(S);v(A),(x=e.onCancel)==null||x.call(e,A)}},c=()=>{t=!0},f=()=>{t=!1},d=()=>KO.isFocused()&&(e.networkMode==="always"||Wv.isOnline())&&e.canRun(),m=()=>Iz(e.networkMode)&&e.canRun(),p=S=>{s()||(r==null||r(),i.resolve(S))},v=S=>{s()||(r==null||r(),i.reject(S))},b=()=>new Promise(S=>{var x;r=A=>{(s()||d())&&S(A)},(x=e.onPause)==null||x.call(e)}).then(()=>{var S;r=void 0,s()||(S=e.onContinue)==null||S.call(e)}),w=()=>{if(s())return;let S;const x=n===0?e.initialPromise:void 0;try{S=x??e.fn()}catch(A){S=Promise.reject(A)}Promise.resolve(S).then(p).catch(A=>{var j;if(s())return;const _=e.retry??(Uh.isServer()?0:3),M=e.retryDelay??kU,E=typeof M=="function"?M(n,A):M,O=_===!0||typeof _=="number"&&n<_||typeof _=="function"&&_(n,A);if(t||!O){v(A);return}n++,(j=e.onFail)==null||j.call(e,n,A),MU(E).then(()=>d()?void 0:b()).then(()=>{t?v(A):w()})})};return{promise:i,status:()=>i.status,cancel:l,continue:()=>(r==null||r(),i),cancelRetry:c,continueRetry:f,canStart:m,start:()=>(m()?w():b().then(w),i)}}var au,Cz,Vz=(Cz=class{constructor(){qe(this,au)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),N_(this.gcTime)&&Pe(this,au,Ql.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Uh.isServer()?1/0:300*1e3))}clearGcTimeout(){W(this,au)!==void 0&&(Ql.clearTimeout(W(this,au)),Pe(this,au,void 0))}},au=new WeakMap,Cz);function LU(e){return{onFetch:(t,n)=>{var m,p,v,b,w;const r=t.options,i=(v=(p=(m=t.fetchOptions)==null?void 0:m.meta)==null?void 0:p.fetchMore)==null?void 0:v.direction,s=((b=t.state.data)==null?void 0:b.pages)||[],l=((w=t.state.data)==null?void 0:w.pageParams)||[];let c={pages:[],pageParams:[]},f=0;const d=async()=>{let S=!1;const x=M=>{PU(M,()=>t.signal,()=>S=!0)},A=qz(t.options,t.fetchOptions),_=async(M,E,O)=>{if(S)return Promise.reject(t.signal.reason);if(E==null&&M.pages.length)return Promise.resolve(M);const R=(()=>{const $={client:t.client,queryKey:t.queryKey,pageParam:E,direction:O?"backward":"forward",meta:t.options.meta};return x($),$})(),k=await A(R),{maxPages:z}=t.options,G=O?CU:jU;return{pages:G(M.pages,k,z),pageParams:G(M.pageParams,E,z)}};if(i&&s.length){const M=i==="backward",E=M?zU:bC,O={pages:s,pageParams:l},j=E(r,O);c=await _(O,j,M)}else{const M=e??s.length;do{const E=f===0?l[0]??r.initialPageParam:bC(r,c);if(f>0&&E==null)break;c=await _(c,E),f++}while(f {var S,x;return(x=(S=t.options).persister)==null?void 0:x.call(S,d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=d}}}function bC(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function zU(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Gc,ou,Kc,ta,su,ur,Cp,lu,Ei,Hz,Po,Pz,$U=(Pz=class extends Vz{constructor(t){super();qe(this,Ei);qe(this,Gc);qe(this,ou);qe(this,Kc);qe(this,ta);qe(this,su);qe(this,ur);qe(this,Cp);qe(this,lu);Pe(this,lu,!1),Pe(this,Cp,t.defaultOptions),this.setOptions(t.options),this.observers=[],Pe(this,su,t.client),Pe(this,ta,W(this,su).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Pe(this,ou,SC(this.options)),this.state=t.state??W(this,ou),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return W(this,Gc)}get promise(){var t;return(t=W(this,ur))==null?void 0:t.promise}setOptions(t){if(this.options={...W(this,Cp),...t},t!=null&&t._type&&Pe(this,Gc,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=SC(this.options);n.data!==void 0&&(this.setState(xC(n.data,n.dataUpdatedAt)),Pe(this,ou,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&W(this,ta).remove(this)}setData(t,n){const r=L_(this.state.data,t,this.options);return at(this,Ei,Po).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t){at(this,Ei,Po).call(this,{type:"setState",state:t})}cancel(t){var r,i;const n=(r=W(this,ur))==null?void 0:r.promise;return(i=W(this,ur))==null||i.cancel(t),n?n.then(Kr).catch(Kr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return W(this,ou)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Mi(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===XO||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>il(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!$z(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=W(this,ur))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=W(this,ur))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),W(this,ta).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(W(this,ur)&&(W(this,lu)||at(this,Ei,Hz).call(this)?W(this,ur).cancel({revert:!0}):W(this,ur).cancelRetry()),this.scheduleGc()),W(this,ta).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||at(this,Ei,Po).call(this,{type:"invalidate"})}async fetch(t,n){var d,m,p,v,b,w,S,x,A,_,M;if(this.state.fetchStatus!=="idle"&&((d=W(this,ur))==null?void 0:d.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(W(this,ur))return W(this,ur).continueRetry(),W(this,ur).promise}if(t&&this.setOptions(t),!this.options.queryFn){const E=this.observers.find(O=>O.options.queryFn);E&&this.setOptions(E.options)}const r=new AbortController,i=E=>{Object.defineProperty(E,"signal",{enumerable:!0,get:()=>(Pe(this,lu,!0),r.signal)})},s=()=>{const E=qz(this.options,n),j=(()=>{const R={client:W(this,su),queryKey:this.queryKey,meta:this.meta};return i(R),R})();return Pe(this,lu,!1),this.options.persister?this.options.persister(E,j,this):E(j)},c=(()=>{const E={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:W(this,su),state:this.state,fetchFn:s};return i(E),E})(),f=W(this,Gc)==="infinite"?LU(this.options.pages):this.options.behavior;f==null||f.onFetch(c,this),Pe(this,Kc,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((m=c.fetchOptions)==null?void 0:m.meta))&&at(this,Ei,Po).call(this,{type:"fetch",meta:(p=c.fetchOptions)==null?void 0:p.meta}),Pe(this,ur,Uz({initialPromise:n==null?void 0:n.initialPromise,fn:c.fetchFn,onCancel:E=>{E instanceof $_&&E.revert&&this.setState({...W(this,Kc),fetchStatus:"idle"}),r.abort()},onFail:(E,O)=>{at(this,Ei,Po).call(this,{type:"failed",failureCount:E,error:O})},onPause:()=>{at(this,Ei,Po).call(this,{type:"pause"})},onContinue:()=>{at(this,Ei,Po).call(this,{type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0}));try{const E=await W(this,ur).start();if(E===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(E),(b=(v=W(this,ta).config).onSuccess)==null||b.call(v,E,this),(S=(w=W(this,ta).config).onSettled)==null||S.call(w,E,this.state.error,this),E}catch(E){if(E instanceof $_){if(E.silent)return W(this,ur).promise;if(E.revert){if(this.state.data===void 0)throw E;return this.state.data}}throw at(this,Ei,Po).call(this,{type:"error",error:E}),(A=(x=W(this,ta).config).onError)==null||A.call(x,E,this),(M=(_=W(this,ta).config).onSettled)==null||M.call(_,this.state.data,E,this),E}finally{this.scheduleGc()}}},Gc=new WeakMap,ou=new WeakMap,Kc=new WeakMap,ta=new WeakMap,su=new WeakMap,ur=new WeakMap,Cp=new WeakMap,lu=new WeakMap,Ei=new WeakSet,Hz=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Po=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Fz(r.data,this.options),fetchMeta:t.meta??null};case"success":const i={...r,...xC(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Pe(this,Kc,t.manual?i:void 0),i;case"error":const s=t.error;return{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Zn.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),W(this,ta).notify({query:this,type:"updated",action:t})})},Pz);function Fz(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Iz(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function xC(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function SC(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var oi,vt,Pp,Gr,uu,Yc,Do,Xs,Dp,Xc,Wc,cu,fu,Ws,Qc,Nt,yh,B_,q_,I_,U_,V_,H_,F_,Gz,Dz,BU=(Dz=class extends Bf{constructor(t,n){super();qe(this,Nt);qe(this,oi);qe(this,vt);qe(this,Pp);qe(this,Gr);qe(this,uu);qe(this,Yc);qe(this,Do);qe(this,Xs);qe(this,Dp);qe(this,Xc);qe(this,Wc);qe(this,cu);qe(this,fu);qe(this,Ws);qe(this,Qc,new Set);this.options=n,Pe(this,oi,t),Pe(this,Xs,null),Pe(this,Do,z_()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(W(this,vt).addObserver(this),wC(W(this,vt),this.options)?at(this,Nt,yh).call(this):this.updateResult(),at(this,Nt,U_).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return G_(W(this,vt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return G_(W(this,vt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,at(this,Nt,V_).call(this),at(this,Nt,H_).call(this),W(this,vt).removeObserver(this)}setOptions(t){const n=this.options,r=W(this,vt);if(this.options=W(this,oi).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Mi(this.options.enabled,W(this,vt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");at(this,Nt,F_).call(this),W(this,vt).setOptions(this.options),n._defaulted&&!Xv(this.options,n)&&W(this,oi).getQueryCache().notify({type:"observerOptionsUpdated",query:W(this,vt),observer:this});const i=this.hasListeners();i&&_C(W(this,vt),r,this.options,n)&&at(this,Nt,yh).call(this),this.updateResult(),i&&(W(this,vt)!==r||Mi(this.options.enabled,W(this,vt))!==Mi(n.enabled,W(this,vt))||il(this.options.staleTime,W(this,vt))!==il(n.staleTime,W(this,vt)))&&at(this,Nt,B_).call(this);const s=at(this,Nt,q_).call(this);i&&(W(this,vt)!==r||Mi(this.options.enabled,W(this,vt))!==Mi(n.enabled,W(this,vt))||s!==W(this,Ws))&&at(this,Nt,I_).call(this,s)}getOptimisticResult(t){const n=W(this,oi).getQueryCache().build(W(this,oi),t),r=this.createResult(n,t);return IU(this,r)&&(Pe(this,Gr,r),Pe(this,Yc,this.options),Pe(this,uu,W(this,vt).state)),r}getCurrentResult(){return W(this,Gr)}trackResult(t,n){return new Proxy(t,{get:(r,i)=>(this.trackProp(i),n==null||n(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&W(this,Do).status==="pending"&&W(this,Do).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,i))})}trackProp(t){W(this,Qc).add(t)}getCurrentQuery(){return W(this,vt)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=W(this,oi).defaultQueryOptions(t),r=W(this,oi).getQueryCache().build(W(this,oi),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return at(this,Nt,yh).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),W(this,Gr)))}createResult(t,n){var z;const r=W(this,vt),i=this.options,s=W(this,Gr),l=W(this,uu),c=W(this,Yc),d=t!==r?t.state:W(this,Pp),{state:m}=t;let p={...m},v=!1,b;if(n._optimisticResults){const G=this.hasListeners(),$=!G&&wC(t,n),B=G&&_C(t,r,n,i);($||B)&&(p={...p,...Fz(m.data,t.options)}),n._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:w,errorUpdatedAt:S,status:x}=p;b=p.data;let A=!1;if(n.placeholderData!==void 0&&b===void 0&&x==="pending"){let G;s!=null&&s.isPlaceholderData&&n.placeholderData===(c==null?void 0:c.placeholderData)?(G=s.data,A=!0):G=typeof n.placeholderData=="function"?n.placeholderData((z=W(this,Wc))==null?void 0:z.state.data,W(this,Wc)):n.placeholderData,G!==void 0&&(x="success",b=L_(s==null?void 0:s.data,G,n),v=!0)}if(n.select&&b!==void 0&&!A)if(s&&b===(l==null?void 0:l.data)&&n.select===W(this,Dp))b=W(this,Xc);else try{Pe(this,Dp,n.select),b=n.select(b),b=L_(s==null?void 0:s.data,b,n),Pe(this,Xc,b),Pe(this,Xs,null)}catch(G){Pe(this,Xs,G)}W(this,Xs)&&(w=W(this,Xs),b=W(this,Xc),S=Date.now(),x="error");const _=p.fetchStatus==="fetching",M=x==="pending",E=x==="error",O=M&&_,j=b!==void 0,k={status:x,fetchStatus:p.fetchStatus,isPending:M,isSuccess:x==="success",isError:E,isInitialLoading:O,isLoading:O,data:b,dataUpdatedAt:p.dataUpdatedAt,error:w,errorUpdatedAt:S,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:p.dataUpdateCount>d.dataUpdateCount||p.errorUpdateCount>d.errorUpdateCount,isFetching:_,isRefetching:_&&!M,isLoadingError:E&&!j,isPaused:p.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:E&&j,isStale:QO(t,n),refetch:this.refetch,promise:W(this,Do),isEnabled:Mi(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const G=k.data!==void 0,$=k.status==="error"&&!G,B=J=>{$?J.reject(k.error):G&&J.resolve(k.data)},Z=()=>{const J=Pe(this,Do,k.promise=z_());B(J)},ee=W(this,Do);switch(ee.status){case"pending":t.queryHash===r.queryHash&&B(ee);break;case"fulfilled":($||k.data!==ee.value)&&Z();break;case"rejected":(!$||k.error!==ee.reason)&&Z();break}}return k}updateResult(){const t=W(this,Gr),n=this.createResult(W(this,vt),this.options);if(Pe(this,uu,W(this,vt).state),Pe(this,Yc,this.options),W(this,uu).data!==void 0&&Pe(this,Wc,W(this,vt)),Xv(n,t))return;Pe(this,Gr,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,s=typeof i=="function"?i():i;if(s==="all"||!s&&!W(this,Qc).size)return!0;const l=new Set(s??W(this,Qc));return this.options.throwOnError&&l.add("error"),Object.keys(W(this,Gr)).some(c=>{const f=c;return W(this,Gr)[f]!==t[f]&&l.has(f)})};at(this,Nt,Gz).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&at(this,Nt,U_).call(this)}},oi=new WeakMap,vt=new WeakMap,Pp=new WeakMap,Gr=new WeakMap,uu=new WeakMap,Yc=new WeakMap,Do=new WeakMap,Xs=new WeakMap,Dp=new WeakMap,Xc=new WeakMap,Wc=new WeakMap,cu=new WeakMap,fu=new WeakMap,Ws=new WeakMap,Qc=new WeakMap,Nt=new WeakSet,yh=function(t){at(this,Nt,F_).call(this);let n=W(this,vt).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Kr)),n},B_=function(){at(this,Nt,V_).call(this);const t=il(this.options.staleTime,W(this,vt));if(Uh.isServer()||W(this,Gr).isStale||!N_(t))return;const r=$z(W(this,Gr).dataUpdatedAt,t)+1;Pe(this,cu,Ql.setTimeout(()=>{W(this,Gr).isStale||this.updateResult()},r))},q_=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(W(this,vt)):this.options.refetchInterval)??!1},I_=function(t){at(this,Nt,H_).call(this),Pe(this,Ws,t),!(Uh.isServer()||Mi(this.options.enabled,W(this,vt))===!1||!N_(W(this,Ws))||W(this,Ws)===0)&&Pe(this,fu,Ql.setInterval(()=>{(this.options.refetchIntervalInBackground||KO.isFocused())&&at(this,Nt,yh).call(this)},W(this,Ws)))},U_=function(){at(this,Nt,B_).call(this),at(this,Nt,I_).call(this,at(this,Nt,q_).call(this))},V_=function(){W(this,cu)!==void 0&&(Ql.clearTimeout(W(this,cu)),Pe(this,cu,void 0))},H_=function(){W(this,fu)!==void 0&&(Ql.clearInterval(W(this,fu)),Pe(this,fu,void 0))},F_=function(){const t=W(this,oi).getQueryCache().build(W(this,oi),this.options);if(t===W(this,vt))return;const n=W(this,vt);Pe(this,vt,t),Pe(this,Pp,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Gz=function(t){Zn.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(W(this,Gr))}),W(this,oi).getQueryCache().notify({query:W(this,vt),type:"observerResultsUpdated"})})},Dz);function qU(e,t){return Mi(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Mi(t.retryOnMount,e)===!1)}function wC(e,t){return qU(e,t)||e.state.data!==void 0&&G_(e,t,t.refetchOnMount)}function G_(e,t,n){if(Mi(t.enabled,e)!==!1&&il(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&QO(e,t)}return!1}function _C(e,t,n,r){return(e!==t||Mi(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&QO(e,n)}function QO(e,t){return Mi(t.enabled,e)!==!1&&e.isStaleByTime(il(t.staleTime,e))}function IU(e,t){return!Xv(e.getCurrentResult(),t)}var Rp,Va,Nr,du,Ha,qs,Rz,UU=(Rz=class extends Vz{constructor(t){super();qe(this,Ha);qe(this,Rp);qe(this,Va);qe(this,Nr);qe(this,du);Pe(this,Rp,t.client),this.mutationId=t.mutationId,Pe(this,Nr,t.mutationCache),Pe(this,Va,[]),this.state=t.state||Kz(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){W(this,Va).includes(t)||(W(this,Va).push(t),this.clearGcTimeout(),W(this,Nr).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Pe(this,Va,W(this,Va).filter(n=>n!==t)),this.scheduleGc(),W(this,Nr).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){W(this,Va).length||(this.state.status==="pending"?this.scheduleGc():W(this,Nr).remove(this))}continue(){var t;return((t=W(this,du))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var l,c,f,d,m,p,v,b,w,S,x,A,_,M,E,O,j,R;const n=()=>{at(this,Ha,qs).call(this,{type:"continue"})},r={client:W(this,Rp),meta:this.options.meta,mutationKey:this.options.mutationKey};Pe(this,du,Uz({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(k,z)=>{at(this,Ha,qs).call(this,{type:"failed",failureCount:k,error:z})},onPause:()=>{at(this,Ha,qs).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>W(this,Nr).canRun(this)}));const i=this.state.status==="pending",s=!W(this,du).canStart();try{if(i)n();else{at(this,Ha,qs).call(this,{type:"pending",variables:t,isPaused:s}),W(this,Nr).config.onMutate&&await W(this,Nr).config.onMutate(t,this,r);const z=await((c=(l=this.options).onMutate)==null?void 0:c.call(l,t,r));z!==this.state.context&&at(this,Ha,qs).call(this,{type:"pending",context:z,variables:t,isPaused:s})}const k=await W(this,du).start();return await((d=(f=W(this,Nr).config).onSuccess)==null?void 0:d.call(f,k,t,this.state.context,this,r)),await((p=(m=this.options).onSuccess)==null?void 0:p.call(m,k,t,this.state.context,r)),await((b=(v=W(this,Nr).config).onSettled)==null?void 0:b.call(v,k,null,this.state.variables,this.state.context,this,r)),await((S=(w=this.options).onSettled)==null?void 0:S.call(w,k,null,t,this.state.context,r)),at(this,Ha,qs).call(this,{type:"success",data:k}),k}catch(k){try{await((A=(x=W(this,Nr).config).onError)==null?void 0:A.call(x,k,t,this.state.context,this,r))}catch(z){Promise.reject(z)}try{await((M=(_=this.options).onError)==null?void 0:M.call(_,k,t,this.state.context,r))}catch(z){Promise.reject(z)}try{await((O=(E=W(this,Nr).config).onSettled)==null?void 0:O.call(E,void 0,k,this.state.variables,this.state.context,this,r))}catch(z){Promise.reject(z)}try{await((R=(j=this.options).onSettled)==null?void 0:R.call(j,void 0,k,t,this.state.context,r))}catch(z){Promise.reject(z)}throw at(this,Ha,qs).call(this,{type:"error",error:k}),k}finally{W(this,Nr).runNext(this)}}},Rp=new WeakMap,Va=new WeakMap,Nr=new WeakMap,du=new WeakMap,Ha=new WeakSet,qs=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Zn.batch(()=>{W(this,Va).forEach(r=>{r.onMutationUpdate(t)}),W(this,Nr).notify({mutation:this,type:"updated",action:t})})},Rz);function Kz(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ro,ba,Np,Nz,VU=(Nz=class extends Bf{constructor(t={}){super();qe(this,Ro);qe(this,ba);qe(this,Np);this.config=t,Pe(this,Ro,new Set),Pe(this,ba,new Map),Pe(this,Np,0)}build(t,n,r){const i=new UU({client:t,mutationCache:this,mutationId:++mv(this,Np)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){W(this,Ro).add(t);const n=yv(t);if(typeof n=="string"){const r=W(this,ba).get(n);r?r.push(t):W(this,ba).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(W(this,Ro).delete(t)){const n=yv(t);if(typeof n=="string"){const r=W(this,ba).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&W(this,ba).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=yv(t);if(typeof n=="string"){const r=W(this,ba).get(n),i=r==null?void 0:r.find(s=>s.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r;const n=yv(t);if(typeof n=="string"){const i=(r=W(this,ba).get(n))==null?void 0:r.find(s=>s!==t&&s.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Zn.batch(()=>{W(this,Ro).forEach(t=>{this.notify({type:"removed",mutation:t})}),W(this,Ro).clear(),W(this,ba).clear()})}getAll(){return Array.from(W(this,Ro))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>vC(n,r))}findAll(t={}){return this.getAll().filter(n=>vC(t,n))}notify(t){Zn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Zn.batch(()=>Promise.all(t.map(n=>n.continue().catch(Kr))))}},Ro=new WeakMap,ba=new WeakMap,Np=new WeakMap,Nz);function yv(e){var t;return(t=e.options.scope)==null?void 0:t.id}var No,Qs,si,ko,Go,Hv,K_,kz,HU=(kz=class extends Bf{constructor(n,r){super();qe(this,Go);qe(this,No);qe(this,Qs);qe(this,si);qe(this,ko);Pe(this,No,n),this.setOptions(r),this.bindMethods(),at(this,Go,Hv).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const r=this.options;this.options=W(this,No).defaultMutationOptions(n),Xv(this.options,r)||W(this,No).getMutationCache().notify({type:"observerOptionsUpdated",mutation:W(this,si),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&gu(r.mutationKey)!==gu(this.options.mutationKey)?this.reset():((i=W(this,si))==null?void 0:i.state.status)==="pending"&&W(this,si).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=W(this,si))==null||n.removeObserver(this)}onMutationUpdate(n){at(this,Go,Hv).call(this),at(this,Go,K_).call(this,n)}getCurrentResult(){return W(this,Qs)}reset(){var n;(n=W(this,si))==null||n.removeObserver(this),Pe(this,si,void 0),at(this,Go,Hv).call(this),at(this,Go,K_).call(this)}mutate(n,r){var i;return Pe(this,ko,r),(i=W(this,si))==null||i.removeObserver(this),Pe(this,si,W(this,No).getMutationCache().build(W(this,No),this.options)),W(this,si).addObserver(this),W(this,si).execute(n)}},No=new WeakMap,Qs=new WeakMap,si=new WeakMap,ko=new WeakMap,Go=new WeakSet,Hv=function(){var r;const n=((r=W(this,si))==null?void 0:r.state)??Kz();Pe(this,Qs,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},K_=function(n){Zn.batch(()=>{var r,i,s,l,c,f,d,m;if(W(this,ko)&&this.hasListeners()){const p=W(this,Qs).variables,v=W(this,Qs).context,b={client:W(this,No),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(i=(r=W(this,ko)).onSuccess)==null||i.call(r,n.data,p,v,b)}catch(w){Promise.reject(w)}try{(l=(s=W(this,ko)).onSettled)==null||l.call(s,n.data,null,p,v,b)}catch(w){Promise.reject(w)}}else if((n==null?void 0:n.type)==="error"){try{(f=(c=W(this,ko)).onError)==null||f.call(c,n.error,p,v,b)}catch(w){Promise.reject(w)}try{(m=(d=W(this,ko)).onSettled)==null||m.call(d,void 0,n.error,p,v,b)}catch(w){Promise.reject(w)}}}this.listeners.forEach(p=>{p(W(this,Qs))})})},kz),Fa,Lz,FU=(Lz=class extends Bf{constructor(t={}){super();qe(this,Fa);this.config=t,Pe(this,Fa,new Map)}build(t,n,r){const i=n.queryKey,s=n.queryHash??YO(i,n);let l=this.get(s);return l||(l=new $U({client:t,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(l)),l}add(t){W(this,Fa).has(t.queryHash)||(W(this,Fa).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=W(this,Fa).get(t.queryHash);n&&(t.destroy(),n===t&&W(this,Fa).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Zn.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return W(this,Fa).get(t)}getAll(){return[...W(this,Fa).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>mC(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>mC(t,r)):n}notify(t){Zn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Zn.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Zn.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Fa=new WeakMap,Lz),wn,Zs,Js,Zc,Jc,el,ef,tf,zz,GU=(zz=class{constructor(e={}){qe(this,wn);qe(this,Zs);qe(this,Js);qe(this,Zc);qe(this,Jc);qe(this,el);qe(this,ef);qe(this,tf);Pe(this,wn,e.queryCache||new FU),Pe(this,Zs,e.mutationCache||new VU),Pe(this,Js,e.defaultOptions||{}),Pe(this,Zc,new Map),Pe(this,Jc,new Map),Pe(this,el,0)}mount(){mv(this,el)._++,W(this,el)===1&&(Pe(this,ef,KO.subscribe(async e=>{e&&(await this.resumePausedMutations(),W(this,wn).onFocus())})),Pe(this,tf,Wv.subscribe(async e=>{e&&(await this.resumePausedMutations(),W(this,wn).onOnline())})))}unmount(){var e,t;mv(this,el)._--,W(this,el)===0&&((e=W(this,ef))==null||e.call(this),Pe(this,ef,void 0),(t=W(this,tf))==null||t.call(this),Pe(this,tf,void 0))}isFetching(e){return W(this,wn).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return W(this,Zs).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=W(this,wn).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=W(this,wn).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(il(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return W(this,wn).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=W(this,wn).get(r.queryHash),s=i==null?void 0:i.state.data,l=TU(t,s);if(l!==void 0)return W(this,wn).build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return Zn.batch(()=>W(this,wn).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=W(this,wn).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=W(this,wn);Zn.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=W(this,wn);return Zn.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Zn.batch(()=>W(this,wn).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Kr).catch(Kr)}invalidateQueries(e,t={}){return Zn.batch(()=>(W(this,wn).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Zn.batch(()=>W(this,wn).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(Kr)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Kr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=W(this,wn).build(this,t);return n.isStaleByTime(il(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Kr).catch(Kr)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Kr).catch(Kr)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Wv.isOnline()?W(this,Zs).resumePausedMutations():Promise.resolve()}getQueryCache(){return W(this,wn)}getMutationCache(){return W(this,Zs)}getDefaultOptions(){return W(this,Js)}setDefaultOptions(e){Pe(this,Js,e)}setQueryDefaults(e,t){W(this,Zc).set(gu(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...W(this,Zc).values()],n={};return t.forEach(r=>{Ih(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){W(this,Jc).set(gu(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...W(this,Jc).values()],n={};return t.forEach(r=>{Ih(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...W(this,Js).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=YO(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===XO&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...W(this,Js).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){W(this,wn).clear(),W(this,Zs).clear()}},wn=new WeakMap,Zs=new WeakMap,Js=new WeakMap,Zc=new WeakMap,Jc=new WeakMap,el=new WeakMap,ef=new WeakMap,tf=new WeakMap,zz),Yz=K.createContext(void 0),qf=e=>{const t=K.useContext(Yz);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},KU=({client:e,children:t})=>(K.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),T.jsx(Yz.Provider,{value:e,children:t})),Xz=K.createContext(!1),YU=()=>K.useContext(Xz);Xz.Provider;function XU(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var WU=K.createContext(XU()),QU=()=>K.useContext(WU),ZU=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?WO(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},JU=e=>{K.useEffect(()=>{e.clearReset()},[e])},eV=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||WO(n,[e.error,r])),tV=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...i)=>n(r(...i)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},nV=(e,t)=>e.isLoading&&e.isFetching&&!t,rV=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,AC=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function iV(e,t,n){var v,b,w,S;const r=YU(),i=QU(),s=qf(),l=s.defaultQueryOptions(e);(b=(v=s.getDefaultOptions().queries)==null?void 0:v._experimental_beforeQuery)==null||b.call(v,l);const c=s.getQueryCache().get(l.queryHash);l._optimisticResults=r?"isRestoring":"optimistic",tV(l),ZU(l,i,c),JU(i);const f=!s.getQueryCache().get(l.queryHash),[d]=K.useState(()=>new t(s,l)),m=d.getOptimisticResult(l),p=!r&&e.subscribed!==!1;if(K.useSyncExternalStore(K.useCallback(x=>{const A=p?d.subscribe(Zn.batchCalls(x)):Kr;return d.updateResult(),A},[d,p]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),K.useEffect(()=>{d.setOptions(l)},[l,d]),rV(l,m))throw AC(l,d,i);if(eV({result:m,errorResetBoundary:i,throwOnError:l.throwOnError,query:c,suspense:l.suspense}))throw m.error;if((S=(w=s.getDefaultOptions().queries)==null?void 0:w._experimental_afterQuery)==null||S.call(w,l,m),l.experimental_prefetchInRender&&!Uh.isServer()&&nV(m,r)){const x=f?AC(l,d,i):c==null?void 0:c.promise;x==null||x.catch(Kr).finally(()=>{d.updateResult()})}return l.notifyOnChangeProps?m:d.trackResult(m)}function Wz(e,t){return iV(e,BU)}function sg(e,t){const n=qf(),[r]=K.useState(()=>new HU(n,e));K.useEffect(()=>{r.setOptions(e)},[r,e]);const i=K.useSyncExternalStore(K.useCallback(l=>r.subscribe(Zn.batchCalls(l)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=K.useCallback((l,c)=>{r.mutate(l,c).catch(Kr)},[r]);if(i.error&&WO(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}function Qz(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{const t=sV(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{const c=l.split(ZO);return c[0]===""&&c.length!==1&&c.shift(),Zz(c,t)||oV(l)},getConflictingClassGroupIds:(l,c)=>{const f=n[l]||[];return c&&r[l]?[...f,...r[l]]:f}}},Zz=(e,t)=>{var l;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?Zz(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const s=e.join(ZO);return(l=t.validators.find(({validator:c})=>c(s)))==null?void 0:l.classGroupId},OC=/^\[(.+)\]$/,oV=e=>{if(OC.test(e)){const t=OC.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},sV=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return uV(Object.entries(e.classGroups),n).forEach(([s,l])=>{Y_(l,r,s,t)}),r},Y_=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const s=i===""?t:TC(t,i);s.classGroupId=n;return}if(typeof i=="function"){if(lV(i)){Y_(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,l])=>{Y_(l,TC(t,s),n,r)})})},TC=(e,t)=>{let n=e;return t.split(ZO).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},lV=e=>e.isThemeGetter,uV=(e,t)=>t?e.map(([n,r])=>{const i=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([l,c])=>[t+l,c])):s);return[n,i]}):e,cV=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(s,l)=>{n.set(s,l),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let l=n.get(s);if(l!==void 0)return l;if((l=r.get(s))!==void 0)return i(s,l),l},set(s,l){n.has(s)?n.set(s,l):i(s,l)}}},Jz="!",fV=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],s=t.length,l=c=>{const f=[];let d=0,m=0,p;for(let x=0;x m?p-m:void 0;return{modifiers:f,hasImportantModifier:b,baseClassName:w,maybePostfixModifierPosition:S}};return n?c=>n({className:c,parseClassName:l}):l},dV=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},hV=e=>({cache:cV(e.cacheSize),parseClassName:fV(e),...aV(e)}),pV=/\s+/,mV=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,s=[],l=e.trim().split(pV);let c="";for(let f=l.length-1;f>=0;f-=1){const d=l[f],{modifiers:m,hasImportantModifier:p,baseClassName:v,maybePostfixModifierPosition:b}=n(d);let w=!!b,S=r(w?v.substring(0,b):v);if(!S){if(!w){c=d+(c.length>0?" "+c:c);continue}if(S=r(v),!S){c=d+(c.length>0?" "+c:c);continue}w=!1}const x=dV(m).join(":"),A=p?x+Jz:x,_=A+S;if(s.includes(_))continue;s.push(_);const M=i(S,w);for(let E=0;E 0?" "+c:c)}return c};function vV(){let e=0,t,n,r="";for(;e {if(typeof e=="string")return e;let t,n="";for(let r=0;r p(m),e());return n=hV(d),r=n.cache.get,i=n.cache.set,s=c,c(f)}function c(f){const d=r(f);if(d)return d;const m=mV(f,n);return i(f,m),m}return function(){return s(vV.apply(null,arguments))}}const on=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},t$=/^\[(?:([a-z-]+):)?(.+)\]$/i,gV=/^\d+\/\d+$/,bV=new Set(["px","full","screen"]),xV=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,SV=/\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$/,wV=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,_V=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,AV=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,jo=e=>zc(e)||bV.has(e)||gV.test(e),$s=e=>If(e,"length",DV),zc=e=>!!e&&!Number.isNaN(Number(e)),lx=e=>If(e,"number",zc),rh=e=>!!e&&Number.isInteger(Number(e)),OV=e=>e.endsWith("%")&&zc(e.slice(0,-1)),ot=e=>t$.test(e),Bs=e=>xV.test(e),TV=new Set(["length","size","percentage"]),EV=e=>If(e,TV,n$),MV=e=>If(e,"position",n$),jV=new Set(["image","url"]),CV=e=>If(e,jV,NV),PV=e=>If(e,"",RV),ih=()=>!0,If=(e,t,n)=>{const r=t$.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},DV=e=>SV.test(e)&&!wV.test(e),n$=()=>!1,RV=e=>_V.test(e),NV=e=>AV.test(e),kV=()=>{const e=on("colors"),t=on("spacing"),n=on("blur"),r=on("brightness"),i=on("borderColor"),s=on("borderRadius"),l=on("borderSpacing"),c=on("borderWidth"),f=on("contrast"),d=on("grayscale"),m=on("hueRotate"),p=on("invert"),v=on("gap"),b=on("gradientColorStops"),w=on("gradientColorStopPositions"),S=on("inset"),x=on("margin"),A=on("opacity"),_=on("padding"),M=on("saturate"),E=on("scale"),O=on("sepia"),j=on("skew"),R=on("space"),k=on("translate"),z=()=>["auto","contain","none"],G=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto",ot,t],B=()=>[ot,t],Z=()=>["",jo,$s],ee=()=>["auto",zc,ot],J=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],q=()=>["solid","dashed","dotted","double","none"],F=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ie=()=>["start","end","center","between","around","evenly","stretch"],ce=()=>["","0",ot],U=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>[zc,ot];return{cacheSize:500,separator:":",theme:{colors:[ih],spacing:[jo,$s],blur:["none","",Bs,ot],brightness:D(),borderColor:[e],borderRadius:["none","","full",Bs,ot],borderSpacing:B(),borderWidth:Z(),contrast:D(),grayscale:ce(),hueRotate:D(),invert:ce(),gap:B(),gradientColorStops:[e],gradientColorStopPositions:[OV,$s],inset:$(),margin:$(),opacity:D(),padding:B(),saturate:D(),scale:D(),sepia:ce(),skew:D(),space:B(),translate:B()},classGroups:{aspect:[{aspect:["auto","square","video",ot]}],container:["container"],columns:[{columns:[Bs]}],"break-after":[{"break-after":U()}],"break-before":[{"break-before":U()}],"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"],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:[...J(),ot]}],overflow:[{overflow:G()}],"overflow-x":[{"overflow-x":G()}],"overflow-y":[{"overflow-y":G()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[S]}],"inset-x":[{"inset-x":[S]}],"inset-y":[{"inset-y":[S]}],start:[{start:[S]}],end:[{end:[S]}],top:[{top:[S]}],right:[{right:[S]}],bottom:[{bottom:[S]}],left:[{left:[S]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",rh,ot]}],basis:[{basis:$()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ot]}],grow:[{grow:ce()}],shrink:[{shrink:ce()}],order:[{order:["first","last","none",rh,ot]}],"grid-cols":[{"grid-cols":[ih]}],"col-start-end":[{col:["auto",{span:["full",rh,ot]},ot]}],"col-start":[{"col-start":ee()}],"col-end":[{"col-end":ee()}],"grid-rows":[{"grid-rows":[ih]}],"row-start-end":[{row:["auto",{span:[rh,ot]},ot]}],"row-start":[{"row-start":ee()}],"row-end":[{"row-end":ee()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ot]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ot]}],gap:[{gap:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",...ie()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ie(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ie(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[_]}],px:[{px:[_]}],py:[{py:[_]}],ps:[{ps:[_]}],pe:[{pe:[_]}],pt:[{pt:[_]}],pr:[{pr:[_]}],pb:[{pb:[_]}],pl:[{pl:[_]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[R]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[R]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ot,t]}],"min-w":[{"min-w":[ot,t,"min","max","fit"]}],"max-w":[{"max-w":[ot,t,"none","full","min","max","fit","prose",{screen:[Bs]},Bs]}],h:[{h:[ot,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ot,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ot,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ot,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Bs,$s]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",lx]}],"font-family":[{font:[ih]}],"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:["tighter","tight","normal","wide","wider","widest",ot]}],"line-clamp":[{"line-clamp":["none",zc,lx]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",jo,ot]}],"list-image":[{"list-image":["none",ot]}],"list-style-type":[{list:["none","disc","decimal",ot]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[A]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[A]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...q(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",jo,$s]}],"underline-offset":[{"underline-offset":["auto",jo,ot]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:B()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ot]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ot]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[A]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...J(),MV]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",EV]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},CV]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[c]}],"border-w-x":[{"border-x":[c]}],"border-w-y":[{"border-y":[c]}],"border-w-s":[{"border-s":[c]}],"border-w-e":[{"border-e":[c]}],"border-w-t":[{"border-t":[c]}],"border-w-r":[{"border-r":[c]}],"border-w-b":[{"border-b":[c]}],"border-w-l":[{"border-l":[c]}],"border-opacity":[{"border-opacity":[A]}],"border-style":[{border:[...q(),"hidden"]}],"divide-x":[{"divide-x":[c]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[c]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[A]}],"divide-style":[{divide:q()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...q()]}],"outline-offset":[{"outline-offset":[jo,ot]}],"outline-w":[{outline:[jo,$s]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[A]}],"ring-offset-w":[{"ring-offset":[jo,$s]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Bs,PV]}],"shadow-color":[{shadow:[ih]}],opacity:[{opacity:[A]}],"mix-blend":[{"mix-blend":[...F(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":F()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",Bs,ot]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[m]}],invert:[{invert:[p]}],saturate:[{saturate:[M]}],sepia:[{sepia:[O]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[m]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[A]}],"backdrop-saturate":[{"backdrop-saturate":[M]}],"backdrop-sepia":[{"backdrop-sepia":[O]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ot]}],duration:[{duration:D()}],ease:[{ease:["linear","in","out","in-out",ot]}],delay:[{delay:D()}],animate:[{animate:["none","spin","ping","pulse","bounce",ot]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[E]}],"scale-x":[{"scale-x":[E]}],"scale-y":[{"scale-y":[E]}],rotate:[{rotate:[rh,ot]}],"translate-x":[{"translate-x":[k]}],"translate-y":[{"translate-y":[k]}],"skew-x":[{"skew-x":[j]}],"skew-y":[{"skew-y":[j]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ot]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",ot]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":B()}],"scroll-mx":[{"scroll-mx":B()}],"scroll-my":[{"scroll-my":B()}],"scroll-ms":[{"scroll-ms":B()}],"scroll-me":[{"scroll-me":B()}],"scroll-mt":[{"scroll-mt":B()}],"scroll-mr":[{"scroll-mr":B()}],"scroll-mb":[{"scroll-mb":B()}],"scroll-ml":[{"scroll-ml":B()}],"scroll-p":[{"scroll-p":B()}],"scroll-px":[{"scroll-px":B()}],"scroll-py":[{"scroll-py":B()}],"scroll-ps":[{"scroll-ps":B()}],"scroll-pe":[{"scroll-pe":B()}],"scroll-pt":[{"scroll-pt":B()}],"scroll-pr":[{"scroll-pr":B()}],"scroll-pb":[{"scroll-pb":B()}],"scroll-pl":[{"scroll-pl":B()}],"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",ot]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[jo,$s,lx]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"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-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-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"],"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"]}}},LV=yV(kV);function nf(...e){return LV(ut(e))}function li(e){if(e==null||Number.isNaN(e))return"—";const t=["B","KB","MB","GB","TB"];let n=Number(e),r=0;for(;n>=1024&&r n+r,0)}const EC=e=>{let t;const n=new Set,r=(d,m)=>{const p=typeof d=="function"?d(t):d;if(!Object.is(p,t)){const v=t;t=m??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(b=>b(t,v))}},i=()=>t,c={setState:r,getState:i,getInitialState:()=>f,subscribe:d=>(n.add(d),()=>n.delete(d))},f=t=e(r,i,c);return c},zV=(e=>e?EC(e):EC),$V=e=>e;function BV(e,t=$V){const n=Q.useSyncExternalStore(e.subscribe,Q.useCallback(()=>t(e.getState()),[e,t]),Q.useCallback(()=>t(e.getInitialState()),[e,t]));return Q.useDebugValue(n),n}const MC=e=>{const t=zV(e),n=r=>BV(t,r);return Object.assign(n,t),n},qV=(e=>e?MC(e):MC),jC=e=>Symbol.iterator in e,CC=e=>"entries"in e,PC=(e,t)=>{const n=e instanceof Map?e:new Map(e.entries()),r=t instanceof Map?t:new Map(t.entries());if(n.size!==r.size)return!1;for(const[i,s]of n)if(!r.has(i)||!Object.is(s,r.get(i)))return!1;return!0},IV=(e,t)=>{const n=e[Symbol.iterator](),r=t[Symbol.iterator]();let i=n.next(),s=r.next();for(;!i.done&&!s.done;){if(!Object.is(i.value,s.value))return!1;i=n.next(),s=r.next()}return!!i.done&&!!s.done};function UV(e,t){return Object.is(e,t)?!0:typeof e!="object"||e===null||typeof t!="object"||t===null||Object.getPrototypeOf(e)!==Object.getPrototypeOf(t)?!1:jC(e)&&jC(t)?CC(e)&&CC(t)?PC(e,t):IV(e,t):PC({entries:()=>Object.entries(e)},{entries:()=>Object.entries(t)})}function lg(e){const t=Q.useRef(void 0);return n=>{const r=e(n);return UV(t.current,r)?t.current:t.current=r}}const r$="mtplx.dashboard.theme";function i$(){if(typeof window>"u")return"hippo";const e=window.localStorage.getItem(r$);return e==="hippo"||e==="river"||e==="light"||e==="mono"?e:"hippo"}function DC(e){if(!(typeof window>"u"))try{window.localStorage.setItem(r$,e),window.document.documentElement.setAttribute("data-theme",e)}catch{}}const ux=["hippo","river","light","mono"],De=qV((e,t)=>({snapshot:null,latest:null,recent:[],rolling:null,lifetime:null,inFlight:[],sessionBank:null,sessions:null,mem:null,thermal:null,thermalWhenS:0,settings:null,modelId:null,profileName:null,contextWindow:null,machine:null,uptimeS:0,liveTokS:null,liveProgressByRequest:{},activePrefillByRequest:{},lastCompletedPrefill:null,newMaxTPSEvent:null,connection:"idle",reconnectAttempts:0,lastSnapshotAtMs:null,authRequired:!1,sessionFilter:null,theme:i$(),pauseStream:!1,soundEnabled:!1,applySnapshot:n=>{if(t().pauseStream)return;const r={};(n.in_flight??[]).forEach(s=>{s.prefill_state&&(r[s.request_id]={...s.prefill_state,request_id:s.request_id,session_id:s.session_id})});const i=n.in_flight??[];e(s=>{var l;return{snapshot:n,latest:n.latest,recent:n.recent??[],rolling:n.rolling,lifetime:n.lifetime,inFlight:i,sessionBank:n.session_bank??null,sessions:n.sessions??null,mem:n.mem,thermal:n.thermal,thermalWhenS:n.thermal_when_s,settings:n.settings,modelId:n.model_id,profileName:((l=n.profile)==null?void 0:l.name)??null,contextWindow:n.context_window,machine:n.machine,uptimeS:n.uptime_s,activePrefillByRequest:r,liveTokS:i.length>0?s.liveTokS:null,lastSnapshotAtMs:Date.now()}})},applyEvent:n=>{var r;if(!t().pauseStream)switch(n.kind){case"progress":{const i=(r=n.progress)==null?void 0:r.decode_tok_s;e(s=>({liveTokS:typeof i=="number"&&i>0?i:s.liveTokS,liveProgressByRequest:{...s.liveProgressByRequest,[n.request_id]:n}}));break}case"completed":{e(i=>({latest:n.envelope??i.latest,liveTokS:null}));break}case"new_max_tps":{e({newMaxTPSEvent:{tok_s:n.tok_s,when_s:n.when_s,session_id:n.session_id}});break}case"thermal":{e({thermal:n.thermal,thermalWhenS:n.when_s});break}case"prefill":{const i=n.request_id,s={phase:n.phase,tokens_done:n.tokens_done,tokens_total:n.tokens_total,cached_tokens:n.cached_tokens,new_prefill_tokens:n.new_prefill_tokens,elapsed_s:n.elapsed_s,prefill_tok_s:n.prefill_tok_s,chunk_size:n.chunk_size,cache_hit:n.cache_hit,started_s:n.started_s,request_id:i,session_id:n.session_id};n.phase==="completed"?e(l=>{const c={...l.activePrefillByRequest};return delete c[i],{activePrefillByRequest:c,lastCompletedPrefill:{...s,when_s:n.when_s}}}):e(l=>({activePrefillByRequest:{...l.activePrefillByRequest,[i]:s}}));break}case"snapshot":{t().applySnapshot(n);break}}},mergeSettings:n=>e(r=>r.settings?{settings:{...r.settings,...n}}:{}),setConnection:n=>{e(r=>({connection:n,reconnectAttempts:n==="reconnecting"?r.reconnectAttempts+1:0}))},setAuthRequired:n=>e({authRequired:n}),setSessionFilter:n=>e({sessionFilter:n}),setTheme:n=>{DC(n),e({theme:n})},cycleTheme:()=>{const n=t().theme,r=ux[(ux.indexOf(n)+1)%ux.length];DC(r),e({theme:r})},togglePauseStream:()=>e(n=>({pauseStream:!n.pauseStream})),toggleSound:()=>e(n=>({soundEnabled:!n.soundEnabled})),consumeNewMaxTPS:()=>e({newMaxTPSEvent:null})}));typeof window<"u"&&window.document.documentElement.setAttribute("data-theme",i$());function VV(){return De(lg(e=>{var n;const t=new Set;return(n=e.rolling)==null||n.history.forEach(r=>{r.session_id&&t.add(r.session_id)}),e.inFlight.forEach(r=>{r.session_id&&t.add(r.session_id)}),Array.from(t).sort()}))}function HV(){return De(lg(e=>{if(!e.rolling)return[];const t=e.sessionFilter;return t?e.rolling.history.filter(n=>n.session_id===t):e.rolling.history}))}function FV(){return De(lg(e=>e.sessionFilter?e.recent.filter(t=>t.session_id===e.sessionFilter):e.recent))}function a$(){return De(lg(e=>{const t=Object.values(e.activePrefillByRequest);if(t.length===0)return{active:!1};const n=t.reduce((m,p)=>(p.elapsed_s??0)>(m.elapsed_s??0)?p:m),r=Number(n.tokens_total??0),i=Number(n.tokens_done??0),s=Number(n.elapsed_s??0),l=r>0?Math.min(100,i/r*100):0,c=typeof n.prefill_tok_s=="number"&&n.prefill_tok_s>0?n.prefill_tok_s:i>0&&s>0?i/s:null,f=Math.max(0,r-i),d=c&&c>0&&f>0?f/c:null;return{active:!0,request_id:n.request_id,session_id:n.session_id,tokens_done:i,tokens_total:r,cached_tokens:Number(n.cached_tokens??0),elapsed_s:s,prefill_tok_s:c,pct:l,eta_s:d}}))}function GV(){const e=De(p=>p.latest),t=De(p=>p.lifetime),n=De(p=>p.liveTokS),r=(e==null?void 0:e.completion_tokens)??null,i=(e==null?void 0:e.ttft_s)??null,s=typeof n=="number",l=s?n:(e==null?void 0:e.decode_tok_s)??null,c=(e==null?void 0:e.request_tok_s)??null,f=(e==null?void 0:e.prompt_eval_time_s)??null,d=(e==null?void 0:e.decode_elapsed_s)??null,m=(t==null?void 0:t.requests_total)??0;return T.jsxs("div",{className:"px-4 lg:px-6 py-2 flex items-center justify-between gap-4 text-xs",children:[T.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-[var(--text-muted)] min-w-0",children:[T.jsx(Il,{label:"tok",value:Xe(r)}),T.jsx(Il,{label:"ttft",value:Nn(i)}),T.jsx(Il,{label:"prompt eval",value:Nn(f)}),T.jsx(Il,{label:"decode",value:Nn(d)}),T.jsx(Il,{label:s?"tok/s live":"tok/s",value:On(l),highlight:s}),T.jsx(Il,{label:"req tok/s",value:On(c)}),T.jsx(Il,{label:"lifetime req",value:Xe(m)})]}),T.jsx("div",{className:"text-[10px] uppercase tracking-widest text-[var(--text-muted)] hidden sm:block",children:"MTPLX live"})]})}function Il({label:e,value:t,highlight:n=!1}){return T.jsxs("span",{className:"flex items-baseline gap-1.5 whitespace-nowrap",children:[T.jsx("span",{className:"text-[10px] uppercase tracking-widest text-[var(--text-muted)]",children:e}),T.jsx("span",{className:"tabular-nums font-medium "+(n?"text-[var(--accent)]":"text-[var(--text-primary)]"),children:t})]})}function ct({title:e,subtitle:t,action:n,className:r,bodyClassName:i,children:s}){return T.jsxs("section",{className:nf("rounded-2xl border border-[var(--border-soft)] bg-[var(--bg-card)] shadow-[inset_0_1px_0_0_rgba(255,255,255,0.02)] overflow-hidden",r),children:[(e||n)&&T.jsxs("header",{className:"px-5 pt-4 pb-2 flex items-start justify-between gap-4",children:[T.jsxs("div",{className:"min-w-0",children:[e?T.jsx("h3",{className:"text-sm font-semibold text-[var(--text-primary)] tracking-tight",children:e}):null,t?T.jsx("p",{className:"text-xs text-[var(--text-muted)] mt-0.5",children:t}):null]}),n?T.jsx("div",{className:"shrink-0",children:n}):null]}),T.jsx("div",{className:nf("px-5 pb-5 pt-2",i),children:s})]})}function Ya({value:e,unit:t,caption:n,tone:r="default"}){const i=r==="accent"?"text-[var(--accent)]":r==="warm"?"text-[var(--accent-warm)]":r==="hot"?"text-[var(--accent-hot)]":r==="cool"?"text-[var(--accent-cool)]":"text-[var(--text-primary)]";return T.jsxs("div",{children:[T.jsxs("div",{className:nf("flex items-baseline gap-2",i),children:[T.jsx("span",{className:"text-4xl font-semibold tabular-nums leading-none",children:e}),t?T.jsx("span",{className:"text-sm text-[var(--text-muted)]",children:t}):null]}),n?T.jsx("div",{className:"text-xs text-[var(--text-muted)] mt-2",children:n}):null]})}const KV={client_disconnected:"client",client_disconnect:"client",stream_cancelled:"stream",stream_teardown:"stream",stream_stall:"stall",stop_sequence:"stop",early_tool_finish:"tool call",hidden_tool_guard:"tool guard",post_endpoint:"cancel call"},YV={client_disconnected:"the client closed the connection",client_disconnect:"the client closed the connection",stream_stall:"the stream stalled",stop_sequence:"a stop sequence ended the answer",early_tool_finish:"the server finished the tool call early",hidden_tool_guard:"the hidden-tool stream guard stopped it",post_endpoint:"POST /v1/mtplx/cancel stopped it"};function W_(e){return e.replace(/_/g," ")}function XV(e){return e.cached_tokens===null||e.cached_tokens===void 0?null:e.session_cache_hit===!0?`hit${e.cache_source&&e.cache_source!=="ram"?` ${e.cache_source}`:""} ${Xe(e.cached_tokens)}`:e.session_cache_hit===!1?e.cache_miss_reason?`miss: ${W_(e.cache_miss_reason)}`:"miss":null}function WV(e){if(!e.request_cancelled)return null;const t=e.cancellation_reason??"",n=e.cancellation_elapsed_s??e.request_elapsed_s,r=["cancelled"];t&&r.push(KV[t]??W_(t)),typeof n=="number"&&Number.isFinite(n)&&r.push(Nn(n));const i=t?YV[t]??W_(t):"unknown reason",s=typeof n=="number"&&Number.isFinite(n)?` after ${Nn(n)}`:"",l=XV(e),c=l===null?"Cache outcome unknown: the request ended before its prompt was read.":`Cache: ${l}.`;return{label:r.join(" · "),tooltip:`Cancelled${s}: ${i}${t?` (${t})`:""}. +${c} +Not counted in the hit rate.`,cacheHint:l}}function QV(e){return!e.request_cancelled}function ZV(){const e=De(i=>i.lifetime),t=(e==null?void 0:e.cached_tokens_total)??0,n=(e==null?void 0:e.prompt_tokens_total)??0,r=n>0?t/n*100:0;return T.jsx(ct,{title:"Cached tokens · lifetime",subtitle:"cached / prompt across all requests",children:T.jsx(Ya,{value:Xe(t),unit:"tokens",tone:"accent",caption:`${r.toFixed(1)}% of ${Xe(n)} prompt tokens`})})}function JV(){const t=De(s=>s.recent).filter(QV).slice(-32),n=t.filter(s=>s.session_cache_hit).length,r=t.length>0?n/t.length*100:0,i=r>=70?"accent":r>=40?"warm":"hot";return T.jsx(ct,{title:"Session cache hit rate",subtitle:`last ${t.length} requests`,children:T.jsx(Ya,{value:`${r.toFixed(0)}%`,unit:"hit",tone:i,caption:`${n} hits / ${t.length} requests`})})}function eH(){const e=De(l=>l.latest),t=De(l=>l.contextWindow),n=(e==null?void 0:e.context_len)??0,r=t?Math.min(100,n/t*100):0,i=r>=95?"hot":r>=75?"warm":r>=50?"cool":"accent",s=i==="hot"?"var(--accent-hot)":i==="warm"?"var(--accent-warm)":i==="cool"?"var(--accent-cool)":"var(--accent)";return T.jsxs(ct,{title:"Context window utilization",subtitle:`${Xe(n)} / ${Xe(t??0)} tokens`,children:[T.jsx("div",{className:"h-4 w-full rounded-full bg-[var(--bg-elevated)] overflow-hidden border border-[var(--border-soft)]",children:T.jsx("div",{className:"h-full transition-[width] duration-500",style:{width:`${r}%`,background:s}})}),T.jsxs("div",{className:"flex justify-between mt-2 text-xs text-[var(--text-muted)] tabular-nums",children:[T.jsx("span",{children:"0"}),T.jsxs("span",{className:"text-[var(--text-primary)] font-semibold",children:[r.toFixed(0),"%"]}),T.jsx("span",{children:Xe(t??0)})]})]})}var cx,RC;function fi(){if(RC)return cx;RC=1;var e=Array.isArray;return cx=e,cx}var fx,NC;function o$(){if(NC)return fx;NC=1;var e=typeof vv=="object"&&vv&&vv.Object===Object&&vv;return fx=e,fx}var dx,kC;function to(){if(kC)return dx;kC=1;var e=o$(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return dx=n,dx}var hx,LC;function kp(){if(LC)return hx;LC=1;var e=to(),t=e.Symbol;return hx=t,hx}var px,zC;function tH(){if(zC)return px;zC=1;var e=kp(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,i=e?e.toStringTag:void 0;function s(l){var c=n.call(l,i),f=l[i];try{l[i]=void 0;var d=!0}catch{}var m=r.call(l);return d&&(c?l[i]=f:delete l[i]),m}return px=s,px}var mx,$C;function nH(){if($C)return mx;$C=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return mx=n,mx}var vx,BC;function Jo(){if(BC)return vx;BC=1;var e=kp(),t=tH(),n=nH(),r="[object Null]",i="[object Undefined]",s=e?e.toStringTag:void 0;function l(c){return c==null?c===void 0?i:r:s&&s in Object(c)?t(c):n(c)}return vx=l,vx}var yx,qC;function es(){if(qC)return yx;qC=1;function e(t){return t!=null&&typeof t=="object"}return yx=e,yx}var gx,IC;function Uf(){if(IC)return gx;IC=1;var e=Jo(),t=es(),n="[object Symbol]";function r(i){return typeof i=="symbol"||t(i)&&e(i)==n}return gx=r,gx}var bx,UC;function eT(){if(UC)return bx;UC=1;var e=fi(),t=Uf(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(s,l){if(e(s))return!1;var c=typeof s;return c=="number"||c=="symbol"||c=="boolean"||s==null||t(s)?!0:r.test(s)||!n.test(s)||l!=null&&s in Object(l)}return bx=i,bx}var xx,VC;function ll(){if(VC)return xx;VC=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return xx=e,xx}var Sx,HC;function tT(){if(HC)return Sx;HC=1;var e=Jo(),t=ll(),n="[object AsyncFunction]",r="[object Function]",i="[object GeneratorFunction]",s="[object Proxy]";function l(c){if(!t(c))return!1;var f=e(c);return f==r||f==i||f==n||f==s}return Sx=l,Sx}var wx,FC;function rH(){if(FC)return wx;FC=1;var e=to(),t=e["__core-js_shared__"];return wx=t,wx}var _x,GC;function iH(){if(GC)return _x;GC=1;var e=rH(),t=(function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!t&&t in r}return _x=n,_x}var Ax,KC;function s$(){if(KC)return Ax;KC=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return Ax=n,Ax}var Ox,YC;function aH(){if(YC)return Ox;YC=1;var e=tT(),t=iH(),n=ll(),r=s$(),i=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,f=l.toString,d=c.hasOwnProperty,m=RegExp("^"+f.call(d).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function p(v){if(!n(v)||t(v))return!1;var b=e(v)?m:s;return b.test(r(v))}return Ox=p,Ox}var Tx,XC;function oH(){if(XC)return Tx;XC=1;function e(t,n){return t==null?void 0:t[n]}return Tx=e,Tx}var Ex,WC;function Eu(){if(WC)return Ex;WC=1;var e=aH(),t=oH();function n(r,i){var s=t(r,i);return e(s)?s:void 0}return Ex=n,Ex}var Mx,QC;function ug(){if(QC)return Mx;QC=1;var e=Eu(),t=e(Object,"create");return Mx=t,Mx}var jx,ZC;function sH(){if(ZC)return jx;ZC=1;var e=ug();function t(){this.__data__=e?e(null):{},this.size=0}return jx=t,jx}var Cx,JC;function lH(){if(JC)return Cx;JC=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return Cx=e,Cx}var Px,eP;function uH(){if(eP)return Px;eP=1;var e=ug(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function i(s){var l=this.__data__;if(e){var c=l[s];return c===t?void 0:c}return r.call(l,s)?l[s]:void 0}return Px=i,Px}var Dx,tP;function cH(){if(tP)return Dx;tP=1;var e=ug(),t=Object.prototype,n=t.hasOwnProperty;function r(i){var s=this.__data__;return e?s[i]!==void 0:n.call(s,i)}return Dx=r,Dx}var Rx,nP;function fH(){if(nP)return Rx;nP=1;var e=ug(),t="__lodash_hash_undefined__";function n(r,i){var s=this.__data__;return this.size+=this.has(r)?0:1,s[r]=e&&i===void 0?t:i,this}return Rx=n,Rx}var Nx,rP;function dH(){if(rP)return Nx;rP=1;var e=sH(),t=lH(),n=uH(),r=cH(),i=fH();function s(l){var c=-1,f=l==null?0:l.length;for(this.clear();++c -1}return qx=t,qx}var Ix,cP;function yH(){if(cP)return Ix;cP=1;var e=cg();function t(n,r){var i=this.__data__,s=e(i,n);return s<0?(++this.size,i.push([n,r])):i[s][1]=r,this}return Ix=t,Ix}var Ux,fP;function fg(){if(fP)return Ux;fP=1;var e=hH(),t=pH(),n=mH(),r=vH(),i=yH();function s(l){var c=-1,f=l==null?0:l.length;for(this.clear();++c 0?1:-1},Zl=function(t){return xu(t)&&t.indexOf("%")===t.length-1},Oe=function(t){return NH(t)&&!Hf(t)},kH=function(t){return Qe(t)},Jn=function(t){return Oe(t)||xu(t)},LH=0,Mu=function(t){var n=++LH;return"".concat(t||"").concat(n)},Su=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(!Oe(t)&&!xu(t))return r;var s;if(Zl(t)){var l=t.indexOf("%");s=n*parseFloat(t.slice(0,l))/100}else s=+t;return Hf(s)&&(s=r),i&&s>n&&(s=n),s},Fs=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},zH=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},i=0;i =0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function FH(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Q_(e){"@babel/helpers - typeof";return Q_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Q_(e)}var $C={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},Bo=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},BC=null,p1=null,sT=function e(t){if(t===BC&&Array.isArray(p1))return p1;var n=[];return K.Children.forEach(t,function(r){Qe(r)||(PH.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),p1=n,BC=t,n};function ci(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return Bo(i)}):r=[Bo(t)],sT(e).forEach(function(i){var s=ia(i,"type.displayName")||ia(i,"type.name");r.indexOf(s)!==-1&&n.push(i)}),n}function Ti(e,t){var n=ci(e,t);return n&&n[0]}var qC=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!Oe(r)||r<=0||!Oe(i)||i<=0)},GH=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],KH=function(t){return t&&t.type&&xu(t.type)&&GH.indexOf(t.type)>=0},d$=function(t){return t&&Q_(t)==="object"&&"clipDot"in t},YH=function(t,n,r,i){var s,l=(s=h1==null?void 0:h1[i])!==null&&s!==void 0?s:[];return n.startsWith("data-")||!tt(t)&&(i&&l.includes(n)||IH.includes(n))||r&&oT.includes(n)},Je=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(K.isValidElement(t)&&(i=t.props),!Vf(i))return null;var s={};return Object.keys(i).forEach(function(l){var c;YH((c=i)===null||c===void 0?void 0:c[l],l,n,r)&&(s[l]=i[l])}),s},Z_=function e(t,n){if(t===n)return!0;var r=K.Children.count(t);if(r!==K.Children.count(n))return!1;if(r===0)return!0;if(r===1)return IC(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i =0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function JH(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function eA(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,s=e.className,l=e.style,c=e.title,f=e.desc,d=ZH(e,QH),m=i||{width:n,height:r,x:0,y:0},p=ut("recharts-surface",s);return Q.createElement("svg",J_({},Je(d,!0,"svg"),{className:p,width:n,height:r,style:l,viewBox:"".concat(m.x," ").concat(m.y," ").concat(m.width," ").concat(m.height)}),Q.createElement("title",null,c),Q.createElement("desc",null,f),t)}var eF=["children","className"];function tA(){return tA=Object.assign?Object.assign.bind():function(e){for(var t=1;t =0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function nF(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Mt=Q.forwardRef(function(e,t){var n=e.children,r=e.className,i=tF(e,eF),s=ut("recharts-layer",r);return Q.createElement("g",tA({className:s},Je(i,!0),{ref:t}),n)}),qo=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),s=2;s s?0:s+n),r=r>s?s:r,r<0&&(r+=s),s=n>r?0:r-n>>>0,n>>>=0;for(var l=Array(s);++i =s?n:e(n,r,i)}return v1=t,v1}var y1,FC;function h$(){if(FC)return y1;FC=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,s="\\ufe0e\\ufe0f",l="\\u200d",c=RegExp("["+l+e+i+s+"]");function f(d){return c.test(d)}return y1=f,y1}var g1,GC;function aF(){if(GC)return g1;GC=1;function e(t){return t.split("")}return g1=e,g1}var b1,KC;function oF(){if(KC)return b1;KC=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,s="\\ufe0e\\ufe0f",l="["+e+"]",c="["+i+"]",f="\\ud83c[\\udffb-\\udfff]",d="(?:"+c+"|"+f+")",m="[^"+e+"]",p="(?:\\ud83c[\\udde6-\\uddff]){2}",v="[\\ud800-\\udbff][\\udc00-\\udfff]",b="\\u200d",w=d+"?",S="["+s+"]?",x="(?:"+b+"(?:"+[m,p,v].join("|")+")"+S+w+")*",A=S+w+x,_="(?:"+[m+c+"?",c,p,v,l].join("|")+")",M=RegExp(f+"(?="+f+")|"+_+A,"g");function E(O){return O.match(M)||[]}return b1=E,b1}var x1,YC;function sF(){if(YC)return x1;YC=1;var e=aF(),t=h$(),n=oF();function r(i){return t(i)?n(i):e(i)}return x1=r,x1}var S1,XC;function lF(){if(XC)return S1;XC=1;var e=iF(),t=h$(),n=sF(),r=l$();function i(s){return function(l){l=r(l);var c=t(l)?n(l):void 0,f=c?c[0]:l.charAt(0),d=c?e(c,1).join(""):l.slice(1);return f[s]()+d}}return S1=i,S1}var w1,WC;function uF(){if(WC)return w1;WC=1;var e=lF(),t=e("toUpperCase");return w1=t,w1}var cF=uF();const pg=Ft(cF);function en(e){return function(){return e}}const p$=Math.cos,Jv=Math.sin,Ea=Math.sqrt,ey=Math.PI,mg=2*ey,nA=Math.PI,rA=2*nA,Hl=1e-6,fF=rA-Hl;function m$(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return m$;const n=10**t;return function(r){this._+=r[0];for(let i=1,s=r.length;i Hl)if(!(Math.abs(p*f-d*m)>Hl)||!s)this._append`L${this._x1=t},${this._y1=n}`;else{let b=r-l,w=i-c,S=f*f+d*d,x=b*b+w*w,A=Math.sqrt(S),_=Math.sqrt(v),M=s*Math.tan((nA-Math.acos((S+v-x)/(2*A*_)))/2),E=M/_,O=M/A;Math.abs(E-1)>Hl&&this._append`L${t+E*m},${n+E*p}`,this._append`A${s},${s},0,0,${+(p*b>m*w)},${this._x1=t+O*f},${this._y1=n+O*d}`}}arc(t,n,r,i,s,l){if(t=+t,n=+n,r=+r,l=!!l,r<0)throw new Error(`negative radius: ${r}`);let c=r*Math.cos(i),f=r*Math.sin(i),d=t+c,m=n+f,p=1^l,v=l?i-s:s-i;this._x1===null?this._append`M${d},${m}`:(Math.abs(this._x1-d)>Hl||Math.abs(this._y1-m)>Hl)&&this._append`L${d},${m}`,r&&(v<0&&(v=v%rA+rA),v>fF?this._append`A${r},${r},0,1,${p},${t-c},${n-f}A${r},${r},0,1,${p},${this._x1=d},${this._y1=m}`:v>Hl&&this._append`A${r},${r},0,${+(v>=nA)},${p},${this._x1=t+r*Math.cos(s)},${this._y1=n+r*Math.sin(s)}`)}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 lT(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 hF(t)}function uT(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function v$(e){this._context=e}v$.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 vg(e){return new v$(e)}function y$(e){return e[0]}function g$(e){return e[1]}function b$(e,t){var n=en(!0),r=null,i=vg,s=null,l=lT(c);e=typeof e=="function"?e:e===void 0?y$:en(e),t=typeof t=="function"?t:t===void 0?g$:en(t);function c(f){var d,m=(f=uT(f)).length,p,v=!1,b;for(r==null&&(s=i(b=l())),d=0;d<=m;++d)!(d=b;--w)c.point(M[w],E[w]);c.lineEnd(),c.areaEnd()}A&&(M[v]=+e(x,v,p),E[v]=+t(x,v,p),c.point(r?+r(x,v,p):M[v],n?+n(x,v,p):E[v]))}if(_)return c=null,_+""||null}function m(){return b$().defined(i).curve(l).context(s)}return d.x=function(p){return arguments.length?(e=typeof p=="function"?p:en(+p),r=null,d):e},d.x0=function(p){return arguments.length?(e=typeof p=="function"?p:en(+p),d):e},d.x1=function(p){return arguments.length?(r=p==null?null:typeof p=="function"?p:en(+p),d):r},d.y=function(p){return arguments.length?(t=typeof p=="function"?p:en(+p),n=null,d):t},d.y0=function(p){return arguments.length?(t=typeof p=="function"?p:en(+p),d):t},d.y1=function(p){return arguments.length?(n=p==null?null:typeof p=="function"?p:en(+p),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(p){return arguments.length?(i=typeof p=="function"?p:en(!!p),d):i},d.curve=function(p){return arguments.length?(l=p,s!=null&&(c=l(s)),d):l},d.context=function(p){return arguments.length?(p==null?s=c=null:c=l(s=p),d):s},d}class x${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 pF(e){return new x$(e,!0)}function mF(e){return new x$(e,!1)}const cT={draw(e,t){const n=Ea(t/ey);e.moveTo(n,0),e.arc(0,0,n,0,mg)}},vF={draw(e,t){const n=Ea(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()}},S$=Ea(1/3),yF=S$*2,gF={draw(e,t){const n=Ea(t/yF),r=n*S$;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},bF={draw(e,t){const n=Ea(t),r=-n/2;e.rect(r,r,n,n)}},xF=.8908130915292852,w$=Jv(ey/10)/Jv(7*ey/10),SF=Jv(mg/10)*w$,wF=-p$(mg/10)*w$,_F={draw(e,t){const n=Ea(t*xF),r=SF*n,i=wF*n;e.moveTo(0,-n),e.lineTo(r,i);for(let s=1;s<5;++s){const l=mg*s/5,c=p$(l),f=Jv(l);e.lineTo(f*n,-c*n),e.lineTo(c*r-f*i,f*r+c*i)}e.closePath()}},_1=Ea(3),AF={draw(e,t){const n=-Ea(t/(_1*3));e.moveTo(0,n*2),e.lineTo(-_1*n,-n),e.lineTo(_1*n,-n),e.closePath()}},Ki=-.5,Yi=Ea(3)/2,iA=1/Ea(12),OF=(iA/2+1)*3,TF={draw(e,t){const n=Ea(t/OF),r=n/2,i=n*iA,s=r,l=n*iA+n,c=-s,f=l;e.moveTo(r,i),e.lineTo(s,l),e.lineTo(c,f),e.lineTo(Ki*r-Yi*i,Yi*r+Ki*i),e.lineTo(Ki*s-Yi*l,Yi*s+Ki*l),e.lineTo(Ki*c-Yi*f,Yi*c+Ki*f),e.lineTo(Ki*r+Yi*i,Ki*i-Yi*r),e.lineTo(Ki*s+Yi*l,Ki*l-Yi*s),e.lineTo(Ki*c+Yi*f,Ki*f-Yi*c),e.closePath()}};function EF(e,t){let n=null,r=lT(i);e=typeof e=="function"?e:en(e||cT),t=typeof t=="function"?t:en(t===void 0?64:+t);function i(){let s;if(n||(n=s=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),s)return n=null,s+""||null}return i.type=function(s){return arguments.length?(e=typeof s=="function"?s:en(s),i):e},i.size=function(s){return arguments.length?(t=typeof s=="function"?s:en(+s),i):t},i.context=function(s){return arguments.length?(n=s??null,i):n},i}function ty(){}function ny(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 _$(e){this._context=e}_$.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:ny(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:ny(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function MF(e){return new _$(e)}function A$(e){this._context=e}A$.prototype={areaStart:ty,areaEnd:ty,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:ny(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function jF(e){return new A$(e)}function O$(e){this._context=e}O$.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:ny(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function PF(e){return new O$(e)}function T$(e){this._context=e}T$.prototype={areaStart:ty,areaEnd:ty,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 CF(e){return new T$(e)}function QC(e){return e<0?-1:1}function ZC(e,t,n){var r=e._x1-e._x0,i=t-e._x1,s=(e._y1-e._y0)/(r||i<0&&-0),l=(n-e._y1)/(i||r<0&&-0),c=(s*i+l*r)/(r+i);return(QC(s)+QC(l))*Math.min(Math.abs(s),Math.abs(l),.5*Math.abs(c))||0}function JC(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function A1(e,t,n){var r=e._x0,i=e._y0,s=e._x1,l=e._y1,c=(s-r)/3;e._context.bezierCurveTo(r+c,i+c*t,s-c,l-c*n,s,l)}function ry(e){this._context=e}ry.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:A1(this,this._t0,JC(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,A1(this,JC(this,n=ZC(this,e,t)),n);break;default:A1(this,this._t0,n=ZC(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function E$(e){this._context=new M$(e)}(E$.prototype=Object.create(ry.prototype)).point=function(e,t){ry.prototype.point.call(this,t,e)};function M$(e){this._context=e}M$.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,s){this._context.bezierCurveTo(t,e,r,n,s,i)}};function DF(e){return new ry(e)}function RF(e){return new E$(e)}function j$(e){this._context=e}j$.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=eD(e),i=eD(t),s=0,l=1;l =0;--t)i[t]=(l[t]-i[t+1])/s[t];for(s[n-1]=(e[n]+i[n-1])/2,t=0;t =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 kF(e){return new yg(e,.5)}function LF(e){return new yg(e,0)}function zF(e){return new yg(e,1)}function rf(e,t){if((l=e.length)>1)for(var n=1,r,i,s=e[t[0]],l,c=s.length;n =0;)n[t]=t;return n}function $F(e,t){return e[t]}function BF(e){const t=[];return t.key=e,t}function qF(){var e=en([]),t=aA,n=rf,r=$F;function i(s){var l=Array.from(e.apply(this,arguments),BF),c,f=l.length,d=-1,m;for(const p of s)for(c=0,++d;c 0){for(var n,r,i=0,s=e[0].length,l;i 0){for(var n=0,r=e[t[0]],i,s=r.length;n0)||!((s=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,s,l;r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function XF(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var P$={symbolCircle:cT,symbolCross:vF,symbolDiamond:gF,symbolSquare:bF,symbolStar:_F,symbolTriangle:AF,symbolWye:TF},WF=Math.PI/180,QF=function(t){var n="symbol".concat(pg(t));return P$[n]||cT},ZF=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*WF;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},JF=function(t,n){P$["symbol".concat(pg(t))]=n},gg=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,s=i===void 0?64:i,l=t.sizeType,c=l===void 0?"area":l,f=YF(t,HF),d=nD(nD({},f),{},{type:r,size:s,sizeType:c}),m=function(){var x=QF(r),A=EF().type(x).size(ZF(s,c,r));return A()},p=d.className,v=d.cx,b=d.cy,w=Je(d,!0);return v===+v&&b===+b&&s===+s?Q.createElement("path",oA({},w,{className:ut("recharts-symbols",p),transform:"translate(".concat(v,", ").concat(b,")"),d:m()})):null};gg.registerSymbol=JF;function af(e){"@babel/helpers - typeof";return af=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},af(e)}function sA(){return sA=Object.assign?Object.assign.bind():function(e){for(var t=1;t0?1:-1},Zl=function(t){return xu(t)&&t.indexOf("%")===t.length-1},Oe=function(t){return qH(t)&&!Hf(t)},IH=function(t){return Qe(t)},Jn=function(t){return Oe(t)||xu(t)},UH=0,Mu=function(t){var n=++UH;return"".concat(t||"").concat(n)},Su=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(!Oe(t)&&!xu(t))return r;var s;if(Zl(t)){var l=t.indexOf("%");s=n*parseFloat(t.slice(0,l))/100}else s=+t;return Hf(s)&&(s=r),i&&s>n&&(s=n),s},Fs=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},VH=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},i=0;i =0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function QH(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Z_(e){"@babel/helpers - typeof";return Z_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Z_(e)}var BP={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},Bo=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},qP=null,p1=null,lT=function e(t){if(t===qP&&Array.isArray(p1))return p1;var n=[];return K.Children.forEach(t,function(r){Qe(r)||(LH.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),p1=n,qP=t,n};function ci(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return Bo(i)}):r=[Bo(t)],lT(e).forEach(function(i){var s=ia(i,"type.displayName")||ia(i,"type.name");r.indexOf(s)!==-1&&n.push(i)}),n}function Ti(e,t){var n=ci(e,t);return n&&n[0]}var IP=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!Oe(r)||r<=0||!Oe(i)||i<=0)},ZH=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],JH=function(t){return t&&t.type&&xu(t.type)&&ZH.indexOf(t.type)>=0},h$=function(t){return t&&Z_(t)==="object"&&"clipDot"in t},eF=function(t,n,r,i){var s,l=(s=h1==null?void 0:h1[i])!==null&&s!==void 0?s:[];return n.startsWith("data-")||!tt(t)&&(i&&l.includes(n)||KH.includes(n))||r&&sT.includes(n)},Je=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(K.isValidElement(t)&&(i=t.props),!Vf(i))return null;var s={};return Object.keys(i).forEach(function(l){var c;eF((c=i)===null||c===void 0?void 0:c[l],l,n,r)&&(s[l]=i[l])}),s},J_=function e(t,n){if(t===n)return!0;var r=K.Children.count(t);if(r!==K.Children.count(n))return!1;if(r===0)return!0;if(r===1)return UP(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i =0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function aF(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function tA(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,s=e.className,l=e.style,c=e.title,f=e.desc,d=iF(e,rF),m=i||{width:n,height:r,x:0,y:0},p=ut("recharts-surface",s);return Q.createElement("svg",eA({},Je(d,!0,"svg"),{className:p,width:n,height:r,style:l,viewBox:"".concat(m.x," ").concat(m.y," ").concat(m.width," ").concat(m.height)}),Q.createElement("title",null,c),Q.createElement("desc",null,f),t)}var oF=["children","className"];function nA(){return nA=Object.assign?Object.assign.bind():function(e){for(var t=1;t =0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function lF(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Mt=Q.forwardRef(function(e,t){var n=e.children,r=e.className,i=sF(e,oF),s=ut("recharts-layer",r);return Q.createElement("g",nA({className:s},Je(i,!0),{ref:t}),n)}),qo=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),s=2;s s?0:s+n),r=r>s?s:r,r<0&&(r+=s),s=n>r?0:r-n>>>0,n>>>=0;for(var l=Array(s);++i =s?n:e(n,r,i)}return v1=t,v1}var y1,GP;function p$(){if(GP)return y1;GP=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,s="\\ufe0e\\ufe0f",l="\\u200d",c=RegExp("["+l+e+i+s+"]");function f(d){return c.test(d)}return y1=f,y1}var g1,KP;function fF(){if(KP)return g1;KP=1;function e(t){return t.split("")}return g1=e,g1}var b1,YP;function dF(){if(YP)return b1;YP=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,s="\\ufe0e\\ufe0f",l="["+e+"]",c="["+i+"]",f="\\ud83c[\\udffb-\\udfff]",d="(?:"+c+"|"+f+")",m="[^"+e+"]",p="(?:\\ud83c[\\udde6-\\uddff]){2}",v="[\\ud800-\\udbff][\\udc00-\\udfff]",b="\\u200d",w=d+"?",S="["+s+"]?",x="(?:"+b+"(?:"+[m,p,v].join("|")+")"+S+w+")*",A=S+w+x,_="(?:"+[m+c+"?",c,p,v,l].join("|")+")",M=RegExp(f+"(?="+f+")|"+_+A,"g");function E(O){return O.match(M)||[]}return b1=E,b1}var x1,XP;function hF(){if(XP)return x1;XP=1;var e=fF(),t=p$(),n=dF();function r(i){return t(i)?n(i):e(i)}return x1=r,x1}var S1,WP;function pF(){if(WP)return S1;WP=1;var e=cF(),t=p$(),n=hF(),r=u$();function i(s){return function(l){l=r(l);var c=t(l)?n(l):void 0,f=c?c[0]:l.charAt(0),d=c?e(c,1).join(""):l.slice(1);return f[s]()+d}}return S1=i,S1}var w1,QP;function mF(){if(QP)return w1;QP=1;var e=pF(),t=e("toUpperCase");return w1=t,w1}var vF=mF();const pg=Ft(vF);function en(e){return function(){return e}}const m$=Math.cos,Jv=Math.sin,Ea=Math.sqrt,ey=Math.PI,mg=2*ey,rA=Math.PI,iA=2*rA,Hl=1e-6,yF=iA-Hl;function v$(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return v$;const n=10**t;return function(r){this._+=r[0];for(let i=1,s=r.length;i Hl)if(!(Math.abs(p*f-d*m)>Hl)||!s)this._append`L${this._x1=t},${this._y1=n}`;else{let b=r-l,w=i-c,S=f*f+d*d,x=b*b+w*w,A=Math.sqrt(S),_=Math.sqrt(v),M=s*Math.tan((rA-Math.acos((S+v-x)/(2*A*_)))/2),E=M/_,O=M/A;Math.abs(E-1)>Hl&&this._append`L${t+E*m},${n+E*p}`,this._append`A${s},${s},0,0,${+(p*b>m*w)},${this._x1=t+O*f},${this._y1=n+O*d}`}}arc(t,n,r,i,s,l){if(t=+t,n=+n,r=+r,l=!!l,r<0)throw new Error(`negative radius: ${r}`);let c=r*Math.cos(i),f=r*Math.sin(i),d=t+c,m=n+f,p=1^l,v=l?i-s:s-i;this._x1===null?this._append`M${d},${m}`:(Math.abs(this._x1-d)>Hl||Math.abs(this._y1-m)>Hl)&&this._append`L${d},${m}`,r&&(v<0&&(v=v%iA+iA),v>yF?this._append`A${r},${r},0,1,${p},${t-c},${n-f}A${r},${r},0,1,${p},${this._x1=d},${this._y1=m}`:v>Hl&&this._append`A${r},${r},0,${+(v>=rA)},${p},${this._x1=t+r*Math.cos(s)},${this._y1=n+r*Math.sin(s)}`)}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 uT(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 bF(t)}function cT(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function y$(e){this._context=e}y$.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 vg(e){return new y$(e)}function g$(e){return e[0]}function b$(e){return e[1]}function x$(e,t){var n=en(!0),r=null,i=vg,s=null,l=uT(c);e=typeof e=="function"?e:e===void 0?g$:en(e),t=typeof t=="function"?t:t===void 0?b$:en(t);function c(f){var d,m=(f=cT(f)).length,p,v=!1,b;for(r==null&&(s=i(b=l())),d=0;d<=m;++d)!(d=b;--w)c.point(M[w],E[w]);c.lineEnd(),c.areaEnd()}A&&(M[v]=+e(x,v,p),E[v]=+t(x,v,p),c.point(r?+r(x,v,p):M[v],n?+n(x,v,p):E[v]))}if(_)return c=null,_+""||null}function m(){return x$().defined(i).curve(l).context(s)}return d.x=function(p){return arguments.length?(e=typeof p=="function"?p:en(+p),r=null,d):e},d.x0=function(p){return arguments.length?(e=typeof p=="function"?p:en(+p),d):e},d.x1=function(p){return arguments.length?(r=p==null?null:typeof p=="function"?p:en(+p),d):r},d.y=function(p){return arguments.length?(t=typeof p=="function"?p:en(+p),n=null,d):t},d.y0=function(p){return arguments.length?(t=typeof p=="function"?p:en(+p),d):t},d.y1=function(p){return arguments.length?(n=p==null?null:typeof p=="function"?p:en(+p),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(p){return arguments.length?(i=typeof p=="function"?p:en(!!p),d):i},d.curve=function(p){return arguments.length?(l=p,s!=null&&(c=l(s)),d):l},d.context=function(p){return arguments.length?(p==null?s=c=null:c=l(s=p),d):s},d}class S${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 xF(e){return new S$(e,!0)}function SF(e){return new S$(e,!1)}const fT={draw(e,t){const n=Ea(t/ey);e.moveTo(n,0),e.arc(0,0,n,0,mg)}},wF={draw(e,t){const n=Ea(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()}},w$=Ea(1/3),_F=w$*2,AF={draw(e,t){const n=Ea(t/_F),r=n*w$;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},OF={draw(e,t){const n=Ea(t),r=-n/2;e.rect(r,r,n,n)}},TF=.8908130915292852,_$=Jv(ey/10)/Jv(7*ey/10),EF=Jv(mg/10)*_$,MF=-m$(mg/10)*_$,jF={draw(e,t){const n=Ea(t*TF),r=EF*n,i=MF*n;e.moveTo(0,-n),e.lineTo(r,i);for(let s=1;s<5;++s){const l=mg*s/5,c=m$(l),f=Jv(l);e.lineTo(f*n,-c*n),e.lineTo(c*r-f*i,f*r+c*i)}e.closePath()}},_1=Ea(3),CF={draw(e,t){const n=-Ea(t/(_1*3));e.moveTo(0,n*2),e.lineTo(-_1*n,-n),e.lineTo(_1*n,-n),e.closePath()}},Ki=-.5,Yi=Ea(3)/2,aA=1/Ea(12),PF=(aA/2+1)*3,DF={draw(e,t){const n=Ea(t/PF),r=n/2,i=n*aA,s=r,l=n*aA+n,c=-s,f=l;e.moveTo(r,i),e.lineTo(s,l),e.lineTo(c,f),e.lineTo(Ki*r-Yi*i,Yi*r+Ki*i),e.lineTo(Ki*s-Yi*l,Yi*s+Ki*l),e.lineTo(Ki*c-Yi*f,Yi*c+Ki*f),e.lineTo(Ki*r+Yi*i,Ki*i-Yi*r),e.lineTo(Ki*s+Yi*l,Ki*l-Yi*s),e.lineTo(Ki*c+Yi*f,Ki*f-Yi*c),e.closePath()}};function RF(e,t){let n=null,r=uT(i);e=typeof e=="function"?e:en(e||fT),t=typeof t=="function"?t:en(t===void 0?64:+t);function i(){let s;if(n||(n=s=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),s)return n=null,s+""||null}return i.type=function(s){return arguments.length?(e=typeof s=="function"?s:en(s),i):e},i.size=function(s){return arguments.length?(t=typeof s=="function"?s:en(+s),i):t},i.context=function(s){return arguments.length?(n=s??null,i):n},i}function ty(){}function ny(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 A$(e){this._context=e}A$.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:ny(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:ny(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function NF(e){return new A$(e)}function O$(e){this._context=e}O$.prototype={areaStart:ty,areaEnd:ty,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:ny(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function kF(e){return new O$(e)}function T$(e){this._context=e}T$.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:ny(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function LF(e){return new T$(e)}function E$(e){this._context=e}E$.prototype={areaStart:ty,areaEnd:ty,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 zF(e){return new E$(e)}function ZP(e){return e<0?-1:1}function JP(e,t,n){var r=e._x1-e._x0,i=t-e._x1,s=(e._y1-e._y0)/(r||i<0&&-0),l=(n-e._y1)/(i||r<0&&-0),c=(s*i+l*r)/(r+i);return(ZP(s)+ZP(l))*Math.min(Math.abs(s),Math.abs(l),.5*Math.abs(c))||0}function eD(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function A1(e,t,n){var r=e._x0,i=e._y0,s=e._x1,l=e._y1,c=(s-r)/3;e._context.bezierCurveTo(r+c,i+c*t,s-c,l-c*n,s,l)}function ry(e){this._context=e}ry.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:A1(this,this._t0,eD(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,A1(this,eD(this,n=JP(this,e,t)),n);break;default:A1(this,this._t0,n=JP(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function M$(e){this._context=new j$(e)}(M$.prototype=Object.create(ry.prototype)).point=function(e,t){ry.prototype.point.call(this,t,e)};function j$(e){this._context=e}j$.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,s){this._context.bezierCurveTo(t,e,r,n,s,i)}};function $F(e){return new ry(e)}function BF(e){return new M$(e)}function C$(e){this._context=e}C$.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=tD(e),i=tD(t),s=0,l=1;l =0;--t)i[t]=(l[t]-i[t+1])/s[t];for(s[n-1]=(e[n]+i[n-1])/2,t=0;t =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 IF(e){return new yg(e,.5)}function UF(e){return new yg(e,0)}function VF(e){return new yg(e,1)}function rf(e,t){if((l=e.length)>1)for(var n=1,r,i,s=e[t[0]],l,c=s.length;n =0;)n[t]=t;return n}function HF(e,t){return e[t]}function FF(e){const t=[];return t.key=e,t}function GF(){var e=en([]),t=oA,n=rf,r=HF;function i(s){var l=Array.from(e.apply(this,arguments),FF),c,f=l.length,d=-1,m;for(const p of s)for(c=0,++d;c 0){for(var n,r,i=0,s=e[0].length,l;i 0){for(var n=0,r=e[t[0]],i,s=r.length;n0)||!((s=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,s,l;r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function t9(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var P$={symbolCircle:fT,symbolCross:wF,symbolDiamond:AF,symbolSquare:OF,symbolStar:jF,symbolTriangle:CF,symbolWye:DF},n9=Math.PI/180,r9=function(t){var n="symbol".concat(pg(t));return P$[n]||fT},i9=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*n9;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},a9=function(t,n){P$["symbol".concat(pg(t))]=n},gg=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,s=i===void 0?64:i,l=t.sizeType,c=l===void 0?"area":l,f=e9(t,WF),d=rD(rD({},f),{},{type:r,size:s,sizeType:c}),m=function(){var x=r9(r),A=RF().type(x).size(i9(s,c,r));return A()},p=d.className,v=d.cx,b=d.cy,w=Je(d,!0);return v===+v&&b===+b&&s===+s?Q.createElement("path",sA({},w,{className:ut("recharts-symbols",p),transform:"translate(".concat(v,", ").concat(b,")"),d:m()})):null};gg.registerSymbol=a9;function af(e){"@babel/helpers - typeof";return af=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},af(e)}function lA(){return lA=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var _=b.inactive?d:b.color;return Q.createElement("li",sA({className:x,style:p,key:"legend-item-".concat(w)},Vh(r.props,b,w)),Q.createElement(eA,{width:l,height:l,viewBox:m,style:v},r.renderIcon(b)),Q.createElement("span",{className:"recharts-legend-item-text",style:{color:_}},S?S(A,b,w):A))})}},{key:"render",value:function(){var r=this.props,i=r.payload,s=r.layout,l=r.align;if(!i||!i.length)return null;var c={padding:0,margin:0,textAlign:s==="horizontal"?l:"left"};return Q.createElement("ul",{className:"recharts-default-legend",style:c},this.renderItems())}}])})(K.PureComponent);Fh(fT,"displayName","Legend");Fh(fT,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var O1,iD;function u9(){if(iD)return O1;iD=1;var e=fg();function t(){this.__data__=new e,this.size=0}return O1=t,O1}var T1,aD;function c9(){if(aD)return T1;aD=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return T1=e,T1}var E1,oD;function f9(){if(oD)return E1;oD=1;function e(t){return this.__data__.get(t)}return E1=e,E1}var M1,sD;function d9(){if(sD)return M1;sD=1;function e(t){return this.__data__.has(t)}return M1=e,M1}var j1,lD;function h9(){if(lD)return j1;lD=1;var e=fg(),t=nT(),n=rT(),r=200;function i(s,l){var c=this.__data__;if(c instanceof e){var f=c.__data__;if(!t||f.length b))return!1;var S=p.get(l),x=p.get(c);if(S&&x)return S==c&&x==l;var A=-1,_=!0,M=f&i?new e:void 0;for(p.set(l,c),p.set(c,l);++A-1&&r%1==0&&r-1&&n%1==0&&n<=e}return Q1=t,Q1}var Z1,DD;function T9(){if(DD)return Z1;DD=1;var e=Jo(),t=mT(),n=es(),r="[object Arguments]",i="[object Array]",s="[object Boolean]",l="[object Date]",c="[object Error]",f="[object Function]",d="[object Map]",m="[object Number]",p="[object Object]",v="[object RegExp]",b="[object Set]",w="[object String]",S="[object WeakMap]",x="[object ArrayBuffer]",A="[object DataView]",_="[object Float32Array]",M="[object Float64Array]",E="[object Int8Array]",O="[object Int16Array]",j="[object Int32Array]",R="[object Uint8Array]",k="[object Uint8ClampedArray]",z="[object Uint16Array]",G="[object Uint32Array]",$={};$[_]=$[M]=$[E]=$[O]=$[j]=$[R]=$[k]=$[z]=$[G]=!0,$[r]=$[i]=$[x]=$[s]=$[A]=$[l]=$[c]=$[f]=$[d]=$[m]=$[p]=$[v]=$[b]=$[w]=$[S]=!1;function B(Z){return n(Z)&&t(Z.length)&&!!$[e(Z)]}return Z1=B,Z1}var J1,RD;function q$(){if(RD)return J1;RD=1;function e(t){return function(n){return t(n)}}return J1=e,J1}var bh={exports:{}};bh.exports;var ND;function E9(){return ND||(ND=1,(function(e,t){var n=a$(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===r,l=s&&n.process,c=(function(){try{var f=i&&i.require&&i.require("util").types;return f||l&&l.binding&&l.binding("util")}catch{}})();e.exports=c})(bh,bh.exports)),bh.exports}var eS,kD;function I$(){if(kD)return eS;kD=1;var e=T9(),t=q$(),n=E9(),r=n&&n.isTypedArray,i=r?t(r):e;return eS=i,eS}var tS,LD;function M9(){if(LD)return tS;LD=1;var e=_9(),t=hT(),n=fi(),r=B$(),i=pT(),s=I$(),l=Object.prototype,c=l.hasOwnProperty;function f(d,m){var p=n(d),v=!p&&t(d),b=!p&&!v&&r(d),w=!p&&!v&&!b&&s(d),S=p||v||b||w,x=S?e(d.length,String):[],A=x.length;for(var _ in d)(m||c.call(d,_))&&!(S&&(_=="length"||b&&(_=="offset"||_=="parent")||w&&(_=="buffer"||_=="byteLength"||_=="byteOffset")||i(_,A)))&&x.push(_);return x}return tS=f,tS}var nS,zD;function j9(){if(zD)return nS;zD=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,i=typeof r=="function"&&r.prototype||e;return n===i}return nS=t,nS}var rS,$D;function U$(){if($D)return rS;$D=1;function e(t,n){return function(r){return t(n(r))}}return rS=e,rS}var iS,BD;function P9(){if(BD)return iS;BD=1;var e=U$(),t=e(Object.keys,Object);return iS=t,iS}var aS,qD;function C9(){if(qD)return aS;qD=1;var e=j9(),t=P9(),n=Object.prototype,r=n.hasOwnProperty;function i(s){if(!e(s))return t(s);var l=[];for(var c in Object(s))r.call(s,c)&&c!="constructor"&&l.push(c);return l}return aS=i,aS}var oS,ID;function Lp(){if(ID)return oS;ID=1;var e=eT(),t=mT();function n(r){return r!=null&&t(r.length)&&!e(r)}return oS=n,oS}var sS,UD;function bg(){if(UD)return sS;UD=1;var e=M9(),t=C9(),n=Lp();function r(i){return n(i)?e(i):t(i)}return sS=r,sS}var lS,VD;function D9(){if(VD)return lS;VD=1;var e=b9(),t=w9(),n=bg();function r(i){return e(i,n,t)}return lS=r,lS}var uS,HD;function R9(){if(HD)return uS;HD=1;var e=D9(),t=1,n=Object.prototype,r=n.hasOwnProperty;function i(s,l,c,f,d,m){var p=c&t,v=e(s),b=v.length,w=e(l),S=w.length;if(b!=S&&!p)return!1;for(var x=b;x--;){var A=v[x];if(!(p?A in l:r.call(l,A)))return!1}var _=m.get(s),M=m.get(l);if(_&&M)return _==l&&M==s;var E=!0;m.set(s,l),m.set(l,s);for(var O=p;++x-1}return kS=t,kS}var LS,yR;function J9(){if(yR)return LS;yR=1;function e(t,n,r){for(var i=-1,s=t==null?0:t.length;++i =l){var A=d?null:i(f);if(A)return s(A);w=!1,v=r,x=new e}else x=d?[]:S;e:for(;++p=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function p7(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function m7(e){return e.value}function v7(e,t){if(Q.isValidElement(e))return Q.cloneElement(e,t);if(typeof e=="function")return Q.createElement(e,t);t.ref;var n=h7(t,a7);return Q.createElement(fT,n)}var OR=1,Bc=(function(e){function t(){var n;o7(this,t);for(var r=arguments.length,i=new Array(r),s=0;sOR||Math.abs(i.height-this.lastBoundingBox.height)>OR)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,r&&r(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Po({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,s=i.layout,l=i.align,c=i.verticalAlign,f=i.margin,d=i.chartWidth,m=i.chartHeight,p,v;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(l==="center"&&s==="vertical"){var b=this.getBBoxSnapshot();p={left:((d||0)-b.width)/2}}else p=l==="right"?{right:f&&f.right||0}:{left:f&&f.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(c==="middle"){var w=this.getBBoxSnapshot();v={top:((m||0)-w.height)/2}}else v=c==="bottom"?{bottom:f&&f.bottom||0}:{top:f&&f.top||0};return Po(Po({},p),v)}},{key:"render",value:function(){var r=this,i=this.props,s=i.content,l=i.width,c=i.height,f=i.wrapperStyle,d=i.payloadUniqBy,m=i.payload,p=Po(Po({position:"absolute",width:l||"auto",height:c||"auto"},this.getDefaultPosition(f)),f);return Q.createElement("div",{className:"recharts-legend-wrapper",style:p,ref:function(b){r.wrapperNode=b}},v7(s,Po(Po({},this.props),{},{payload:K$(m,d,m7)})))}}],[{key:"getWithHeight",value:function(r,i){var s=Po(Po({},this.defaultProps),r.props),l=s.layout;return l==="vertical"&&Oe(r.props.height)?{height:r.props.height}:l==="horizontal"?{width:r.props.width||i}:null}}])})(K.PureComponent);xg(Bc,"displayName","Legend");xg(Bc,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var IS,TR;function y7(){if(TR)return IS;TR=1;var e=kp(),t=hT(),n=fi(),r=e?e.isConcatSpreadable:void 0;function i(s){return n(s)||t(s)||!!(r&&s&&s[r])}return IS=i,IS}var US,ER;function W$(){if(ER)return US;ER=1;var e=$$(),t=y7();function n(r,i,s,l,c){var f=-1,d=r.length;for(s||(s=t),c||(c=[]);++f 0&&s(m)?i>1?n(m,i-1,s,l,c):e(c,m):l||(c[c.length]=m)}return c}return US=n,US}var VS,MR;function g7(){if(MR)return VS;MR=1;function e(t){return function(n,r,i){for(var s=-1,l=Object(n),c=i(n),f=c.length;f--;){var d=c[t?f:++s];if(r(l[d],d,l)===!1)break}return n}}return VS=e,VS}var HS,jR;function b7(){if(jR)return HS;jR=1;var e=g7(),t=e();return HS=t,HS}var FS,PR;function Q$(){if(PR)return FS;PR=1;var e=b7(),t=bg();function n(r,i){return r&&e(r,i,t)}return FS=n,FS}var GS,CR;function x7(){if(CR)return GS;CR=1;var e=Lp();function t(n,r){return function(i,s){if(i==null)return i;if(!e(i))return n(i,s);for(var l=i.length,c=r?l:-1,f=Object(i);(r?c--:++c r||c&&f&&m&&!d&&!p||s&&f&&m||!i&&m||!l)return 1;if(!s&&!c&&!p&&n =d)return m;var p=i[s];return m*(p=="desc"?-1:1)}}return n.index-r.index}return QS=t,QS}var ZS,zR;function A7(){if(zR)return ZS;zR=1;var e=iT(),t=aT(),n=ul(),r=Z$(),i=S7(),s=q$(),l=_7(),c=Ff(),f=fi();function d(m,p,v){p.length?p=e(p,function(S){return f(S)?function(x){return t(x,S.length===1?S[0]:S)}:S}):p=[c];var b=-1;p=e(p,s(n));var w=r(m,function(S,x,A){var _=e(p,function(M){return M(S)});return{criteria:_,index:++b,value:S}});return i(w,function(S,x){return l(S,x,v)})}return ZS=d,ZS}var JS,$R;function O7(){if($R)return JS;$R=1;function e(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}return JS=e,JS}var ew,BR;function T7(){if(BR)return ew;BR=1;var e=O7(),t=Math.max;function n(r,i,s){return i=t(i===void 0?r.length-1:i,0),function(){for(var l=arguments,c=-1,f=t(l.length-i,0),d=Array(f);++c 0){if(++s>=e)return arguments[0]}else s=0;return i.apply(void 0,arguments)}}return iw=r,iw}var aw,HR;function P7(){if(HR)return aw;HR=1;var e=M7(),t=j7(),n=t(e);return aw=n,aw}var ow,FR;function C7(){if(FR)return ow;FR=1;var e=Ff(),t=T7(),n=P7();function r(i,s){return n(t(i,s,e),i+"")}return ow=r,ow}var sw,GR;function Sg(){if(GR)return sw;GR=1;var e=tT(),t=Lp(),n=pT(),r=ll();function i(s,l,c){if(!r(c))return!1;var f=typeof l;return(f=="number"?t(c)&&n(l,c.length):f=="string"&&l in c)?e(c[l],s):!1}return sw=i,sw}var lw,KR;function D7(){if(KR)return lw;KR=1;var e=W$(),t=A7(),n=C7(),r=Sg(),i=n(function(s,l){if(s==null)return[];var c=l.length;return c>1&&r(s,l[0],l[1])?l=[]:c>2&&r(l[0],l[1],l[2])&&(l=[l[0]]),t(s,e(l,1),[])});return lw=i,lw}var R7=D7();const gT=Ft(R7);function Gh(e){"@babel/helpers - typeof";return Gh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gh(e)}function cA(){return cA=Object.assign?Object.assign.bind():function(e){for(var t=1;t e.length)&&(t=e.length);for(var n=0,r=new Array(t);n =t.x),"".concat(ah,"-left"),Oe(n)&&t&&Oe(t.x)&&n =t.y),"".concat(ah,"-top"),Oe(r)&&t&&Oe(t.y)&&r S?Math.max(m,f[r]):Math.max(p,f[r])}function Y7(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function X7(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,s=e.reverseDirection,l=e.tooltipBox,c=e.useTranslate3d,f=e.viewBox,d,m,p;return l.height>0&&l.width>0&&n?(m=WR({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:s,tooltipDimension:l.width,viewBox:f,viewBoxDimension:f.width}),p=WR({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:s,tooltipDimension:l.height,viewBox:f,viewBoxDimension:f.height}),d=Y7({translateX:m,translateY:p,useTranslate3d:c})):d=G7,{cssProperties:d,cssClasses:K7({translateX:m,translateY:p,coordinate:n})}}function sf(e){"@babel/helpers - typeof";return sf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sf(e)}function QR(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 ZR(e){for(var t=1;t JR||Math.abs(r.height-this.state.lastBoundingBox.height)>JR)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,i=this.props,s=i.active,l=i.allowEscapeViewBox,c=i.animationDuration,f=i.animationEasing,d=i.children,m=i.coordinate,p=i.hasPayload,v=i.isAnimationActive,b=i.offset,w=i.position,S=i.reverseDirection,x=i.useTranslate3d,A=i.viewBox,_=i.wrapperStyle,M=X7({allowEscapeViewBox:l,coordinate:m,offsetTopLeft:b,position:w,reverseDirection:S,tooltipBox:this.state.lastBoundingBox,useTranslate3d:x,viewBox:A}),E=M.cssClasses,O=M.cssProperties,j=ZR(ZR({transition:v&&s?"transform ".concat(c,"ms ").concat(f):void 0},O),{},{pointerEvents:"none",visibility:!this.state.dismissed&&s&&p?"visible":"hidden",position:"absolute",top:0,left:0},_);return Q.createElement("div",{tabIndex:-1,className:E,style:j,ref:function(k){r.wrapperNode=k}},d)}}])})(K.PureComponent),aG=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},cl={isSsr:aG()};function lf(e){"@babel/helpers - typeof";return lf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lf(e)}function eN(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 tN(e){for(var t=1;t 0;return Q.createElement(iG,{allowEscapeViewBox:l,animationDuration:c,animationEasing:f,isAnimationActive:v,active:s,coordinate:m,hasPayload:j,offset:b,position:x,reverseDirection:A,useTranslate3d:_,viewBox:M,wrapperStyle:E},mG(d,tN(tN({},this.props),{},{payload:O})))}}])})(K.PureComponent);bT(ji,"displayName","Tooltip");bT(ji,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!cl.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var cw,nN;function vG(){if(nN)return cw;nN=1;var e=to(),t=function(){return e.Date.now()};return cw=t,cw}var fw,rN;function yG(){if(rN)return fw;rN=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return fw=t,fw}var dw,iN;function gG(){if(iN)return dw;iN=1;var e=yG(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return dw=n,dw}var hw,aN;function iB(){if(aN)return hw;aN=1;var e=gG(),t=ll(),n=Uf(),r=NaN,i=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;function f(d){if(typeof d=="number")return d;if(n(d))return r;if(t(d)){var m=typeof d.valueOf=="function"?d.valueOf():d;d=t(m)?m+"":m}if(typeof d!="string")return d===0?d:+d;d=e(d);var p=s.test(d);return p||l.test(d)?c(d.slice(2),p?2:8):i.test(d)?r:+d}return hw=f,hw}var pw,oN;function bG(){if(oN)return pw;oN=1;var e=ll(),t=vG(),n=iB(),r="Expected a function",i=Math.max,s=Math.min;function l(c,f,d){var m,p,v,b,w,S,x=0,A=!1,_=!1,M=!0;if(typeof c!="function")throw new TypeError(r);f=n(f)||0,e(d)&&(A=!!d.leading,_="maxWait"in d,v=_?i(n(d.maxWait)||0,f):v,M="trailing"in d?!!d.trailing:M);function E(Z){var ee=m,J=p;return m=p=void 0,x=Z,b=c.apply(J,ee),b}function O(Z){return x=Z,w=setTimeout(k,f),A?E(Z):b}function j(Z){var ee=Z-S,J=Z-x,q=f-ee;return _?s(q,v-J):q}function R(Z){var ee=Z-S,J=Z-x;return S===void 0||ee>=f||ee<0||_&&J>=v}function k(){var Z=t();if(R(Z))return z(Z);w=setTimeout(k,j(Z))}function z(Z){return w=void 0,M&&m?E(Z):(m=p=void 0,b)}function G(){w!==void 0&&clearTimeout(w),x=0,m=S=p=w=void 0}function $(){return w===void 0?b:z(t())}function B(){var Z=t(),ee=R(Z);if(m=arguments,p=this,S=Z,ee){if(w===void 0)return O(S);if(_)return clearTimeout(w),w=setTimeout(k,f),E(S)}return w===void 0&&(w=setTimeout(k,f)),b}return B.cancel=G,B.flush=$,B}return pw=l,pw}var mw,sN;function xG(){if(sN)return mw;sN=1;var e=bG(),t=ll(),n="Expected a function";function r(i,s,l){var c=!0,f=!0;if(typeof i!="function")throw new TypeError(n);return t(l)&&(c="leading"in l?!!l.leading:c,f="trailing"in l?!!l.trailing:f),e(i,s,{leading:c,maxWait:s,trailing:f})}return mw=r,mw}var SG=xG();const aB=Ft(SG);function Yh(e){"@babel/helpers - typeof";return Yh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yh(e)}function lN(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 xv(e){for(var t=1;t e.length)&&(t=e.length);for(var n=0,r=new Array(t);n 0&&(Z=aB(Z,S,{trailing:!0,leading:!1}));var ee=new ResizeObserver(Z),J=O.current.getBoundingClientRect(),q=J.width,F=J.height;return $(q,F),ee.observe(O.current),function(){ee.disconnect()}},[$,S]);var B=K.useMemo(function(){var Z=z.containerWidth,ee=z.containerHeight;if(Z<0||ee<0)return null;qo(Zl(l)||Zl(f),`The width(%s) and height(%s) are both fixed numbers, + A`).concat(l,",").concat(l,",0,1,1,").concat(c,",").concat(s),className:"recharts-legend-icon"});if(r.type==="rect")return Q.createElement("path",{stroke:"none",fill:f,d:"M0,".concat(Xi/8,"h").concat(Xi,"v").concat(Xi*3/4,"h").concat(-Xi,"z"),className:"recharts-legend-icon"});if(Q.isValidElement(r.legendIcon)){var d=o9({},r);return delete d.legendIcon,Q.cloneElement(r.legendIcon,d)}return Q.createElement(gg,{fill:f,cx:s,cy:s,size:Xi,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,i=this.props,s=i.payload,l=i.iconSize,c=i.layout,f=i.formatter,d=i.inactiveColor,m={x:0,y:0,width:Xi,height:Xi},p={display:c==="horizontal"?"inline-block":"block",marginRight:10},v={display:"inline-block",verticalAlign:"middle",marginRight:4};return s.map(function(b,w){var S=b.formatter||f,x=ut(Fh(Fh({"recharts-legend-item":!0},"legend-item-".concat(w),!0),"inactive",b.inactive));if(b.type==="none")return null;var A=tt(b.value)?null:b.value;qo(!tt(b.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: `);var _=b.inactive?d:b.color;return Q.createElement("li",lA({className:x,style:p,key:"legend-item-".concat(w)},Vh(r.props,b,w)),Q.createElement(tA,{width:l,height:l,viewBox:m,style:v},r.renderIcon(b)),Q.createElement("span",{className:"recharts-legend-item-text",style:{color:_}},S?S(A,b,w):A))})}},{key:"render",value:function(){var r=this.props,i=r.payload,s=r.layout,l=r.align;if(!i||!i.length)return null;var c={padding:0,margin:0,textAlign:s==="horizontal"?l:"left"};return Q.createElement("ul",{className:"recharts-default-legend",style:c},this.renderItems())}}])})(K.PureComponent);Fh(dT,"displayName","Legend");Fh(dT,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var O1,aD;function m9(){if(aD)return O1;aD=1;var e=fg();function t(){this.__data__=new e,this.size=0}return O1=t,O1}var T1,oD;function v9(){if(oD)return T1;oD=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return T1=e,T1}var E1,sD;function y9(){if(sD)return E1;sD=1;function e(t){return this.__data__.get(t)}return E1=e,E1}var M1,lD;function g9(){if(lD)return M1;lD=1;function e(t){return this.__data__.has(t)}return M1=e,M1}var j1,uD;function b9(){if(uD)return j1;uD=1;var e=fg(),t=rT(),n=iT(),r=200;function i(s,l){var c=this.__data__;if(c instanceof e){var f=c.__data__;if(!t||f.length b))return!1;var S=p.get(l),x=p.get(c);if(S&&x)return S==c&&x==l;var A=-1,_=!0,M=f&i?new e:void 0;for(p.set(l,c),p.set(c,l);++A-1&&r%1==0&&r-1&&n%1==0&&n<=e}return Q1=t,Q1}var Z1,RD;function D9(){if(RD)return Z1;RD=1;var e=Jo(),t=vT(),n=es(),r="[object Arguments]",i="[object Array]",s="[object Boolean]",l="[object Date]",c="[object Error]",f="[object Function]",d="[object Map]",m="[object Number]",p="[object Object]",v="[object RegExp]",b="[object Set]",w="[object String]",S="[object WeakMap]",x="[object ArrayBuffer]",A="[object DataView]",_="[object Float32Array]",M="[object Float64Array]",E="[object Int8Array]",O="[object Int16Array]",j="[object Int32Array]",R="[object Uint8Array]",k="[object Uint8ClampedArray]",z="[object Uint16Array]",G="[object Uint32Array]",$={};$[_]=$[M]=$[E]=$[O]=$[j]=$[R]=$[k]=$[z]=$[G]=!0,$[r]=$[i]=$[x]=$[s]=$[A]=$[l]=$[c]=$[f]=$[d]=$[m]=$[p]=$[v]=$[b]=$[w]=$[S]=!1;function B(Z){return n(Z)&&t(Z.length)&&!!$[e(Z)]}return Z1=B,Z1}var J1,ND;function I$(){if(ND)return J1;ND=1;function e(t){return function(n){return t(n)}}return J1=e,J1}var bh={exports:{}};bh.exports;var kD;function R9(){return kD||(kD=1,(function(e,t){var n=o$(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===r,l=s&&n.process,c=(function(){try{var f=i&&i.require&&i.require("util").types;return f||l&&l.binding&&l.binding("util")}catch{}})();e.exports=c})(bh,bh.exports)),bh.exports}var eS,LD;function U$(){if(LD)return eS;LD=1;var e=D9(),t=I$(),n=R9(),r=n&&n.isTypedArray,i=r?t(r):e;return eS=i,eS}var tS,zD;function N9(){if(zD)return tS;zD=1;var e=j9(),t=pT(),n=fi(),r=q$(),i=mT(),s=U$(),l=Object.prototype,c=l.hasOwnProperty;function f(d,m){var p=n(d),v=!p&&t(d),b=!p&&!v&&r(d),w=!p&&!v&&!b&&s(d),S=p||v||b||w,x=S?e(d.length,String):[],A=x.length;for(var _ in d)(m||c.call(d,_))&&!(S&&(_=="length"||b&&(_=="offset"||_=="parent")||w&&(_=="buffer"||_=="byteLength"||_=="byteOffset")||i(_,A)))&&x.push(_);return x}return tS=f,tS}var nS,$D;function k9(){if($D)return nS;$D=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,i=typeof r=="function"&&r.prototype||e;return n===i}return nS=t,nS}var rS,BD;function V$(){if(BD)return rS;BD=1;function e(t,n){return function(r){return t(n(r))}}return rS=e,rS}var iS,qD;function L9(){if(qD)return iS;qD=1;var e=V$(),t=e(Object.keys,Object);return iS=t,iS}var aS,ID;function z9(){if(ID)return aS;ID=1;var e=k9(),t=L9(),n=Object.prototype,r=n.hasOwnProperty;function i(s){if(!e(s))return t(s);var l=[];for(var c in Object(s))r.call(s,c)&&c!="constructor"&&l.push(c);return l}return aS=i,aS}var oS,UD;function Lp(){if(UD)return oS;UD=1;var e=tT(),t=vT();function n(r){return r!=null&&t(r.length)&&!e(r)}return oS=n,oS}var sS,VD;function bg(){if(VD)return sS;VD=1;var e=N9(),t=z9(),n=Lp();function r(i){return n(i)?e(i):t(i)}return sS=r,sS}var lS,HD;function $9(){if(HD)return lS;HD=1;var e=O9(),t=M9(),n=bg();function r(i){return e(i,n,t)}return lS=r,lS}var uS,FD;function B9(){if(FD)return uS;FD=1;var e=$9(),t=1,n=Object.prototype,r=n.hasOwnProperty;function i(s,l,c,f,d,m){var p=c&t,v=e(s),b=v.length,w=e(l),S=w.length;if(b!=S&&!p)return!1;for(var x=b;x--;){var A=v[x];if(!(p?A in l:r.call(l,A)))return!1}var _=m.get(s),M=m.get(l);if(_&&M)return _==l&&M==s;var E=!0;m.set(s,l),m.set(l,s);for(var O=p;++x-1}return kS=t,kS}var LS,gR;function a7(){if(gR)return LS;gR=1;function e(t,n,r){for(var i=-1,s=t==null?0:t.length;++i =l){var A=d?null:i(f);if(A)return s(A);w=!1,v=r,x=new e}else x=d?[]:S;e:for(;++p=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function x7(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function S7(e){return e.value}function w7(e,t){if(Q.isValidElement(e))return Q.cloneElement(e,t);if(typeof e=="function")return Q.createElement(e,t);t.ref;var n=b7(t,f7);return Q.createElement(dT,n)}var TR=1,Bc=(function(e){function t(){var n;d7(this,t);for(var r=arguments.length,i=new Array(r),s=0;sTR||Math.abs(i.height-this.lastBoundingBox.height)>TR)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,r&&r(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Co({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,s=i.layout,l=i.align,c=i.verticalAlign,f=i.margin,d=i.chartWidth,m=i.chartHeight,p,v;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(l==="center"&&s==="vertical"){var b=this.getBBoxSnapshot();p={left:((d||0)-b.width)/2}}else p=l==="right"?{right:f&&f.right||0}:{left:f&&f.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(c==="middle"){var w=this.getBBoxSnapshot();v={top:((m||0)-w.height)/2}}else v=c==="bottom"?{bottom:f&&f.bottom||0}:{top:f&&f.top||0};return Co(Co({},p),v)}},{key:"render",value:function(){var r=this,i=this.props,s=i.content,l=i.width,c=i.height,f=i.wrapperStyle,d=i.payloadUniqBy,m=i.payload,p=Co(Co({position:"absolute",width:l||"auto",height:c||"auto"},this.getDefaultPosition(f)),f);return Q.createElement("div",{className:"recharts-legend-wrapper",style:p,ref:function(b){r.wrapperNode=b}},w7(s,Co(Co({},this.props),{},{payload:Y$(m,d,S7)})))}}],[{key:"getWithHeight",value:function(r,i){var s=Co(Co({},this.defaultProps),r.props),l=s.layout;return l==="vertical"&&Oe(r.props.height)?{height:r.props.height}:l==="horizontal"?{width:r.props.width||i}:null}}])})(K.PureComponent);xg(Bc,"displayName","Legend");xg(Bc,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var IS,ER;function _7(){if(ER)return IS;ER=1;var e=kp(),t=pT(),n=fi(),r=e?e.isConcatSpreadable:void 0;function i(s){return n(s)||t(s)||!!(r&&s&&s[r])}return IS=i,IS}var US,MR;function Q$(){if(MR)return US;MR=1;var e=B$(),t=_7();function n(r,i,s,l,c){var f=-1,d=r.length;for(s||(s=t),c||(c=[]);++f 0&&s(m)?i>1?n(m,i-1,s,l,c):e(c,m):l||(c[c.length]=m)}return c}return US=n,US}var VS,jR;function A7(){if(jR)return VS;jR=1;function e(t){return function(n,r,i){for(var s=-1,l=Object(n),c=i(n),f=c.length;f--;){var d=c[t?f:++s];if(r(l[d],d,l)===!1)break}return n}}return VS=e,VS}var HS,CR;function O7(){if(CR)return HS;CR=1;var e=A7(),t=e();return HS=t,HS}var FS,PR;function Z$(){if(PR)return FS;PR=1;var e=O7(),t=bg();function n(r,i){return r&&e(r,i,t)}return FS=n,FS}var GS,DR;function T7(){if(DR)return GS;DR=1;var e=Lp();function t(n,r){return function(i,s){if(i==null)return i;if(!e(i))return n(i,s);for(var l=i.length,c=r?l:-1,f=Object(i);(r?c--:++c r||c&&f&&m&&!d&&!p||s&&f&&m||!i&&m||!l)return 1;if(!s&&!c&&!p&&n =d)return m;var p=i[s];return m*(p=="desc"?-1:1)}}return n.index-r.index}return QS=t,QS}var ZS,$R;function C7(){if($R)return ZS;$R=1;var e=aT(),t=oT(),n=ul(),r=J$(),i=E7(),s=I$(),l=j7(),c=Ff(),f=fi();function d(m,p,v){p.length?p=e(p,function(S){return f(S)?function(x){return t(x,S.length===1?S[0]:S)}:S}):p=[c];var b=-1;p=e(p,s(n));var w=r(m,function(S,x,A){var _=e(p,function(M){return M(S)});return{criteria:_,index:++b,value:S}});return i(w,function(S,x){return l(S,x,v)})}return ZS=d,ZS}var JS,BR;function P7(){if(BR)return JS;BR=1;function e(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}return JS=e,JS}var ew,qR;function D7(){if(qR)return ew;qR=1;var e=P7(),t=Math.max;function n(r,i,s){return i=t(i===void 0?r.length-1:i,0),function(){for(var l=arguments,c=-1,f=t(l.length-i,0),d=Array(f);++c 0){if(++s>=e)return arguments[0]}else s=0;return i.apply(void 0,arguments)}}return iw=r,iw}var aw,FR;function L7(){if(FR)return aw;FR=1;var e=N7(),t=k7(),n=t(e);return aw=n,aw}var ow,GR;function z7(){if(GR)return ow;GR=1;var e=Ff(),t=D7(),n=L7();function r(i,s){return n(t(i,s,e),i+"")}return ow=r,ow}var sw,KR;function Sg(){if(KR)return sw;KR=1;var e=nT(),t=Lp(),n=mT(),r=ll();function i(s,l,c){if(!r(c))return!1;var f=typeof l;return(f=="number"?t(c)&&n(l,c.length):f=="string"&&l in c)?e(c[l],s):!1}return sw=i,sw}var lw,YR;function $7(){if(YR)return lw;YR=1;var e=Q$(),t=C7(),n=z7(),r=Sg(),i=n(function(s,l){if(s==null)return[];var c=l.length;return c>1&&r(s,l[0],l[1])?l=[]:c>2&&r(l[0],l[1],l[2])&&(l=[l[0]]),t(s,e(l,1),[])});return lw=i,lw}var B7=$7();const bT=Ft(B7);function Gh(e){"@babel/helpers - typeof";return Gh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gh(e)}function fA(){return fA=Object.assign?Object.assign.bind():function(e){for(var t=1;t e.length)&&(t=e.length);for(var n=0,r=new Array(t);n =t.x),"".concat(ah,"-left"),Oe(n)&&t&&Oe(t.x)&&n =t.y),"".concat(ah,"-top"),Oe(r)&&t&&Oe(t.y)&&r S?Math.max(m,f[r]):Math.max(p,f[r])}function eG(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function tG(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,s=e.reverseDirection,l=e.tooltipBox,c=e.useTranslate3d,f=e.viewBox,d,m,p;return l.height>0&&l.width>0&&n?(m=QR({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:s,tooltipDimension:l.width,viewBox:f,viewBoxDimension:f.width}),p=QR({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:s,tooltipDimension:l.height,viewBox:f,viewBoxDimension:f.height}),d=eG({translateX:m,translateY:p,useTranslate3d:c})):d=Z7,{cssProperties:d,cssClasses:J7({translateX:m,translateY:p,coordinate:n})}}function sf(e){"@babel/helpers - typeof";return sf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sf(e)}function ZR(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 JR(e){for(var t=1;t eN||Math.abs(r.height-this.state.lastBoundingBox.height)>eN)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,i=this.props,s=i.active,l=i.allowEscapeViewBox,c=i.animationDuration,f=i.animationEasing,d=i.children,m=i.coordinate,p=i.hasPayload,v=i.isAnimationActive,b=i.offset,w=i.position,S=i.reverseDirection,x=i.useTranslate3d,A=i.viewBox,_=i.wrapperStyle,M=tG({allowEscapeViewBox:l,coordinate:m,offsetTopLeft:b,position:w,reverseDirection:S,tooltipBox:this.state.lastBoundingBox,useTranslate3d:x,viewBox:A}),E=M.cssClasses,O=M.cssProperties,j=JR(JR({transition:v&&s?"transform ".concat(c,"ms ").concat(f):void 0},O),{},{pointerEvents:"none",visibility:!this.state.dismissed&&s&&p?"visible":"hidden",position:"absolute",top:0,left:0},_);return Q.createElement("div",{tabIndex:-1,className:E,style:j,ref:function(k){r.wrapperNode=k}},d)}}])})(K.PureComponent),fG=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},cl={isSsr:fG()};function lf(e){"@babel/helpers - typeof";return lf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lf(e)}function tN(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 nN(e){for(var t=1;t 0;return Q.createElement(cG,{allowEscapeViewBox:l,animationDuration:c,animationEasing:f,isAnimationActive:v,active:s,coordinate:m,hasPayload:j,offset:b,position:x,reverseDirection:A,useTranslate3d:_,viewBox:M,wrapperStyle:E},SG(d,nN(nN({},this.props),{},{payload:O})))}}])})(K.PureComponent);xT(ji,"displayName","Tooltip");xT(ji,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!cl.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var cw,rN;function wG(){if(rN)return cw;rN=1;var e=to(),t=function(){return e.Date.now()};return cw=t,cw}var fw,iN;function _G(){if(iN)return fw;iN=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return fw=t,fw}var dw,aN;function AG(){if(aN)return dw;aN=1;var e=_G(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return dw=n,dw}var hw,oN;function aB(){if(oN)return hw;oN=1;var e=AG(),t=ll(),n=Uf(),r=NaN,i=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;function f(d){if(typeof d=="number")return d;if(n(d))return r;if(t(d)){var m=typeof d.valueOf=="function"?d.valueOf():d;d=t(m)?m+"":m}if(typeof d!="string")return d===0?d:+d;d=e(d);var p=s.test(d);return p||l.test(d)?c(d.slice(2),p?2:8):i.test(d)?r:+d}return hw=f,hw}var pw,sN;function OG(){if(sN)return pw;sN=1;var e=ll(),t=wG(),n=aB(),r="Expected a function",i=Math.max,s=Math.min;function l(c,f,d){var m,p,v,b,w,S,x=0,A=!1,_=!1,M=!0;if(typeof c!="function")throw new TypeError(r);f=n(f)||0,e(d)&&(A=!!d.leading,_="maxWait"in d,v=_?i(n(d.maxWait)||0,f):v,M="trailing"in d?!!d.trailing:M);function E(Z){var ee=m,J=p;return m=p=void 0,x=Z,b=c.apply(J,ee),b}function O(Z){return x=Z,w=setTimeout(k,f),A?E(Z):b}function j(Z){var ee=Z-S,J=Z-x,q=f-ee;return _?s(q,v-J):q}function R(Z){var ee=Z-S,J=Z-x;return S===void 0||ee>=f||ee<0||_&&J>=v}function k(){var Z=t();if(R(Z))return z(Z);w=setTimeout(k,j(Z))}function z(Z){return w=void 0,M&&m?E(Z):(m=p=void 0,b)}function G(){w!==void 0&&clearTimeout(w),x=0,m=S=p=w=void 0}function $(){return w===void 0?b:z(t())}function B(){var Z=t(),ee=R(Z);if(m=arguments,p=this,S=Z,ee){if(w===void 0)return O(S);if(_)return clearTimeout(w),w=setTimeout(k,f),E(S)}return w===void 0&&(w=setTimeout(k,f)),b}return B.cancel=G,B.flush=$,B}return pw=l,pw}var mw,lN;function TG(){if(lN)return mw;lN=1;var e=OG(),t=ll(),n="Expected a function";function r(i,s,l){var c=!0,f=!0;if(typeof i!="function")throw new TypeError(n);return t(l)&&(c="leading"in l?!!l.leading:c,f="trailing"in l?!!l.trailing:f),e(i,s,{leading:c,maxWait:s,trailing:f})}return mw=r,mw}var EG=TG();const oB=Ft(EG);function Yh(e){"@babel/helpers - typeof";return Yh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yh(e)}function uN(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 xv(e){for(var t=1;t e.length)&&(t=e.length);for(var n=0,r=new Array(t);n 0&&(Z=oB(Z,S,{trailing:!0,leading:!1}));var ee=new ResizeObserver(Z),J=O.current.getBoundingClientRect(),q=J.width,F=J.height;return $(q,F),ee.observe(O.current),function(){ee.disconnect()}},[$,S]);var B=K.useMemo(function(){var Z=z.containerWidth,ee=z.containerHeight;if(Z<0||ee<0)return null;qo(Zl(l)||Zl(f),`The width(%s) and height(%s) are both fixed numbers, maybe you don't need to use a ResponsiveContainer.`,l,f),qo(!n||n>0,"The aspect(%s) must be greater than zero.",n);var J=Zl(l)?Z:l,q=Zl(f)?ee:f;n&&n>0&&(J?q=J/n:q&&(J=q*n),v&&q>v&&(q=v)),qo(J>0||q>0,`The width(%s) and height(%s) of chart should be greater than 0, please check the style of container, or the props width(%s) and height(%s), or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the - height and width.`,J,q,l,f,m,p,n);var F=!Array.isArray(b)&&Bo(b.type).endsWith("Chart");return Q.Children.map(b,function(ie){return Q.isValidElement(ie)?K.cloneElement(ie,xv({width:J,height:q},F?{style:xv({height:"100%",width:"100%",maxHeight:q,maxWidth:J},ie.props.style)}:{})):ie})},[n,b,f,v,p,m,z,l]);return Q.createElement("div",{id:x?"".concat(x):void 0,className:ut("recharts-responsive-container",A),style:xv(xv({},E),{},{width:l,height:f,minWidth:m,minHeight:p,maxHeight:v}),ref:O},B)}),xT=function(t){return null};xT.displayName="Cell";function Xh(e){"@babel/helpers - typeof";return Xh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xh(e)}function cN(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 pA(e){for(var t=1;t 1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||cl.isSsr)return{width:0,height:0};var r=kG(n),i=JSON.stringify({text:t,copyStyle:r});if(Sc.widthCache[i])return Sc.widthCache[i];try{var s=document.getElementById(fN);s||(s=document.createElement("span"),s.setAttribute("id",fN),s.setAttribute("aria-hidden","true"),document.body.appendChild(s));var l=pA(pA({},NG),r);Object.assign(s.style,l),s.textContent="".concat(t);var c=s.getBoundingClientRect(),f={width:c.width,height:c.height};return Sc.widthCache[i]=f,++Sc.cacheCount>RG&&(Sc.cacheCount=0,Sc.widthCache={}),f}catch{return{width:0,height:0}}},LG=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Wh(e){"@babel/helpers - typeof";return Wh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wh(e)}function ly(e,t){return qG(e)||BG(e,t)||$G(e,t)||zG()}function zG(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $G(e,t){if(e){if(typeof e=="string")return dN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return dN(e,t)}}function dN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n =0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function eK(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function gN(e,t){return iK(e)||rK(e,t)||nK(e,t)||tK()}function tK(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nK(e,t){if(e){if(typeof e=="string")return bN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bN(e,t)}}function bN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n 0&&arguments[0]!==void 0?arguments[0]:[];return J.reduce(function(q,F){var ie=F.word,ce=F.width,U=q[q.length-1];if(U&&(i==null||s||U.width+ce+r F.width?q:F})};if(!m)return b;for(var S="…",x=function(J){var q=p.slice(0,J),F=uB({breakAll:d,style:f,children:q+S}).wordsWithComputedWidth,ie=v(F),ce=ie.length>l||w(ie).width>Number(i);return[ce,ie]},A=0,_=p.length-1,M=0,E;A<=_&&M<=p.length-1;){var O=Math.floor((A+_)/2),j=O-1,R=x(j),k=gN(R,2),z=k[0],G=k[1],$=x(O),B=gN($,1),Z=B[0];if(!z&&!Z&&(A=O+1),z&&Z&&(_=O-1),!z&&Z){E=G;break}M++}return E||b},xN=function(t){var n=Qe(t)?[]:t.toString().split(lB);return[{words:n}]},oK=function(t){var n=t.width,r=t.scaleToFit,i=t.children,s=t.style,l=t.breakAll,c=t.maxLines;if((n||r)&&!cl.isSsr){var f,d,m=uB({breakAll:l,children:i,style:s});if(m){var p=m.wordsWithComputedWidth,v=m.spaceWidth;f=p,d=v}else return xN(i);return aK({breakAll:l,children:i,maxLines:c,style:s},f,d,n,r)}return xN(i)},SN="#808080",uy=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,s=i===void 0?0:i,l=t.lineHeight,c=l===void 0?"1em":l,f=t.capHeight,d=f===void 0?"0.71em":f,m=t.scaleToFit,p=m===void 0?!1:m,v=t.textAnchor,b=v===void 0?"start":v,w=t.verticalAnchor,S=w===void 0?"end":w,x=t.fill,A=x===void 0?SN:x,_=yN(t,ZG),M=K.useMemo(function(){return oK({breakAll:_.breakAll,children:_.children,maxLines:_.maxLines,scaleToFit:p,style:_.style,width:_.width})},[_.breakAll,_.children,_.maxLines,p,_.style,_.width]),E=_.dx,O=_.dy,j=_.angle,R=_.className,k=_.breakAll,z=yN(_,JG);if(!Jn(r)||!Jn(s))return null;var G=r+(Oe(E)?E:0),$=s+(Oe(O)?O:0),B;switch(S){case"start":B=vw("calc(".concat(d,")"));break;case"middle":B=vw("calc(".concat((M.length-1)/2," * -").concat(c," + (").concat(d," / 2))"));break;default:B=vw("calc(".concat(M.length-1," * -").concat(c,")"));break}var Z=[];if(p){var ee=M[0].width,J=_.width;Z.push("scale(".concat((Oe(J)?J/ee:1)/ee,")"))}return j&&Z.push("rotate(".concat(j,", ").concat(G,", ").concat($,")")),Z.length&&(z.transform=Z.join(" ")),Q.createElement("text",mA({},Je(z,!0),{x:G,y:$,className:ut("recharts-text",R),textAnchor:b,fill:A.includes("url")?SN:A}),M.map(function(q,F){var ie=q.words.join(k?"":" ");return Q.createElement("tspan",{x:G,dy:F===0?B:c,key:"".concat(ie,"-").concat(F)},ie)}))};function al(e,t){return e==null||t==null?NaN:e t?1:e>=t?0:NaN}function sK(e,t){return e==null||t==null?NaN:t e?1:t>=e?0:NaN}function ST(e){let t,n,r;e.length!==2?(t=al,n=(c,f)=>al(e(c),f),r=(c,f)=>e(c)-f):(t=e===al||e===sK?e:lK,n=e,r=e);function i(c,f,d=0,m=c.length){if(d >>1;n(c[p],f)<0?d=p+1:m=p}while(d >>1;n(c[p],f)<=0?d=p+1:m=p}while(d d&&r(c[p-1],f)>-r(c[p],f)?p-1:p}return{left:i,center:l,right:s}}function lK(){return 0}function cB(e){return e===null?NaN:+e}function*uK(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const cK=ST(al),zp=cK.right;ST(cB).center;class wN extends Map{constructor(t,n=hK){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(_N(this,t))}has(t){return super.has(_N(this,t))}set(t,n){return super.set(fK(this,t),n)}delete(t){return super.delete(dK(this,t))}}function _N({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function fK({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function dK({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function hK(e){return e!==null&&typeof e=="object"?e.valueOf():e}function pK(e=al){if(e===al)return fB;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 fB(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e t?1:0)}const mK=Math.sqrt(50),vK=Math.sqrt(10),yK=Math.sqrt(2);function cy(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),s=r/Math.pow(10,i),l=s>=mK?10:s>=vK?5:s>=yK?2:1;let c,f,d;return i<0?(d=Math.pow(10,-i)/l,c=Math.round(e*d),f=Math.round(t*d),c/d t&&--f,d=-d):(d=Math.pow(10,i)*l,c=Math.round(e/d),f=Math.round(t/d),c*d t&&--f),f 0))return[];if(e===t)return[e];const r=t =i))return[];const c=s-i+1,f=new Array(c);if(r)if(l<0)for(let d=0;d =r)&&(n=r);return n}function ON(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function dB(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?fB:pK(i);r>n;){if(r-n>600){const f=r-n+1,d=t-n+1,m=Math.log(f),p=.5*Math.exp(2*m/3),v=.5*Math.sqrt(m*p*(f-p)/f)*(d-f/2<0?-1:1),b=Math.max(n,Math.floor(t-d*p/f+v)),w=Math.min(r,Math.floor(t+(f-d)*p/f+v));dB(e,t,b,w,i)}const s=e[t];let l=n,c=r;for(oh(e,n,t),i(e[r],s)>0&&oh(e,n,r);l 0;)--c}i(e[n],s)===0?oh(e,n,c):(++c,oh(e,c,r)),c<=t&&(n=c+1),t<=c&&(r=c-1)}return e}function oh(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function gK(e,t,n){if(e=Float64Array.from(uK(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return ON(e);if(t>=1)return AN(e);var r,i=(r-1)*t,s=Math.floor(i),l=AN(dB(e,s).subarray(0,s+1)),c=ON(e.subarray(s+1));return l+(c-l)*(i-s)}}function bK(e,t,n=cB){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,s=Math.floor(i),l=+n(e[s],s,e),c=+n(e[s+1],s+1,e);return l+(c-l)*(i-s)}}function xK(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,s=new Array(i);++r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?wv(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?wv(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=wK.exec(e))?new ui(t[1],t[2],t[3],1):(t=_K.exec(e))?new ui(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=AK.exec(e))?wv(t[1],t[2],t[3],t[4]):(t=OK.exec(e))?wv(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=TK.exec(e))?DN(t[1],t[2]/100,t[3]/100,1):(t=EK.exec(e))?DN(t[1],t[2]/100,t[3]/100,t[4]):TN.hasOwnProperty(e)?jN(TN[e]):e==="transparent"?new ui(NaN,NaN,NaN,0):null}function jN(e){return new ui(e>>16&255,e>>8&255,e&255,1)}function wv(e,t,n,r){return r<=0&&(e=t=n=NaN),new ui(e,t,n,r)}function PK(e){return e instanceof $p||(e=ep(e)),e?(e=e.rgb(),new ui(e.r,e.g,e.b,e.opacity)):new ui}function xA(e,t,n,r){return arguments.length===1?PK(e):new ui(e,t,n,r??1)}function ui(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}_T(ui,xA,pB($p,{brighter(e){return e=e==null?fy:Math.pow(fy,e),new ui(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Zh:Math.pow(Zh,e),new ui(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ui(hu(this.r),hu(this.g),hu(this.b),dy(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:PN,formatHex:PN,formatHex8:CK,formatRgb:CN,toString:CN}));function PN(){return`#${Jl(this.r)}${Jl(this.g)}${Jl(this.b)}`}function CK(){return`#${Jl(this.r)}${Jl(this.g)}${Jl(this.b)}${Jl((isNaN(this.opacity)?1:this.opacity)*255)}`}function CN(){const e=dy(this.opacity);return`${e===1?"rgb(":"rgba("}${hu(this.r)}, ${hu(this.g)}, ${hu(this.b)}${e===1?")":`, ${e})`}`}function dy(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function hu(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Jl(e){return e=hu(e),(e<16?"0":"")+e.toString(16)}function DN(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new _a(e,t,n,r)}function mB(e){if(e instanceof _a)return new _a(e.h,e.s,e.l,e.opacity);if(e instanceof $p||(e=ep(e)),!e)return new _a;if(e instanceof _a)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),s=Math.max(t,n,r),l=NaN,c=s-i,f=(s+i)/2;return c?(t===s?l=(n-r)/c+(n 0&&f<1?0:l,new _a(l,c,f,e.opacity)}function DK(e,t,n,r){return arguments.length===1?mB(e):new _a(e,t,n,r??1)}function _a(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}_T(_a,DK,pB($p,{brighter(e){return e=e==null?fy:Math.pow(fy,e),new _a(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Zh:Math.pow(Zh,e),new _a(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 ui(yw(e>=240?e-240:e+120,i,r),yw(e,i,r),yw(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new _a(RN(this.h),_v(this.s),_v(this.l),dy(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=dy(this.opacity);return`${e===1?"hsl(":"hsla("}${RN(this.h)}, ${_v(this.s)*100}%, ${_v(this.l)*100}%${e===1?")":`, ${e})`}`}}));function RN(e){return e=(e||0)%360,e<0?e+360:e}function _v(e){return Math.max(0,Math.min(1,e||0))}function yw(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 AT=e=>()=>e;function RK(e,t){return function(n){return e+n*t}}function NK(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 kK(e){return(e=+e)==1?vB:function(t,n){return n-t?NK(t,n,e):AT(isNaN(t)?n:t)}}function vB(e,t){var n=t-e;return n?RK(e,n):AT(isNaN(e)?t:e)}const NN=(function e(t){var n=kK(t);function r(i,s){var l=n((i=xA(i)).r,(s=xA(s)).r),c=n(i.g,s.g),f=n(i.b,s.b),d=vB(i.opacity,s.opacity);return function(m){return i.r=l(m),i.g=c(m),i.b=f(m),i.opacity=d(m),i+""}}return r.gamma=e,r})(1);function LK(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(s){for(i=0;i n&&(s=t.slice(n,s),c[l]?c[l]+=s:c[++l]=s),(r=r[0])===(i=i[0])?c[l]?c[l]+=i:c[++l]=i:(c[++l]=null,f.push({i:l,x:hy(r,i)})),n=gw.lastIndex;return n t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function KK(e,t,n){var r=e[0],i=e[1],s=t[0],l=t[1];return i 2?YK:KK,f=d=null,p}function p(v){return v==null||isNaN(v=+v)?s:(f||(f=c(e.map(r),t,n)))(r(l(v)))}return p.invert=function(v){return l(i((d||(d=c(t,e.map(r),hy)))(v)))},p.domain=function(v){return arguments.length?(e=Array.from(v,py),m()):e.slice()},p.range=function(v){return arguments.length?(t=Array.from(v),m()):t.slice()},p.rangeRound=function(v){return t=Array.from(v),n=OT,m()},p.clamp=function(v){return arguments.length?(l=v?!0:Yr,m()):l!==Yr},p.interpolate=function(v){return arguments.length?(n=v,m()):n},p.unknown=function(v){return arguments.length?(s=v,p):s},function(v,b){return r=v,i=b,m()}}function TT(){return _g()(Yr,Yr)}function XK(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function my(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 uf(e){return e=my(Math.abs(e)),e?e[1]:NaN}function WK(e,t){return function(n,r){for(var i=n.length,s=[],l=0,c=e[0],f=0;i>0&&c>0&&(f+c+1>r&&(c=Math.max(1,r-f)),s.push(n.substring(i-=c,i+c)),!((f+=c+1)>r));)c=e[l=(l+1)%e.length];return s.reverse().join(t)}}function QK(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var ZK=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function tp(e){if(!(t=ZK.exec(e)))throw new Error("invalid format: "+e);var t;return new ET({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]})}tp.prototype=ET.prototype;function ET(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+""}ET.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 JK(e){e:for(var t=e.length,n=1,r=-1,i;n 0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var vy;function eY(e,t){var n=my(e,t);if(!n)return vy=void 0,e.toPrecision(t);var r=n[0],i=n[1],s=i-(vy=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,l=r.length;return s===l?r:s>l?r+new Array(s-l+1).join("0"):s>0?r.slice(0,s)+"."+r.slice(s):"0."+new Array(1-s).join("0")+my(e,Math.max(0,t+s-1))[0]}function LN(e,t){var n=my(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 zN={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:XK,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)=>LN(e*100,t),r:LN,s:eY,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function $N(e){return e}var BN=Array.prototype.map,qN=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function tY(e){var t=e.grouping===void 0||e.thousands===void 0?$N:WK(BN.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+"",s=e.numerals===void 0?$N:QK(BN.call(e.numerals,String)),l=e.percent===void 0?"%":e.percent+"",c=e.minus===void 0?"−":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function d(p,v){p=tp(p);var b=p.fill,w=p.align,S=p.sign,x=p.symbol,A=p.zero,_=p.width,M=p.comma,E=p.precision,O=p.trim,j=p.type;j==="n"?(M=!0,j="g"):zN[j]||(E===void 0&&(E=12),O=!0,j="g"),(A||b==="0"&&w==="=")&&(A=!0,b="0",w="=");var R=(v&&v.prefix!==void 0?v.prefix:"")+(x==="$"?n:x==="#"&&/[boxX]/.test(j)?"0"+j.toLowerCase():""),k=(x==="$"?r:/[%p]/.test(j)?l:"")+(v&&v.suffix!==void 0?v.suffix:""),z=zN[j],G=/[defgprs%]/.test(j);E=E===void 0?6:/[gprs]/.test(j)?Math.max(1,Math.min(21,E)):Math.max(0,Math.min(20,E));function $(B){var Z=R,ee=k,J,q,F;if(j==="c")ee=z(B)+ee,B="";else{B=+B;var ie=B<0||1/B<0;if(B=isNaN(B)?f:z(Math.abs(B),E),O&&(B=JK(B)),ie&&+B==0&&S!=="+"&&(ie=!1),Z=(ie?S==="("?S:c:S==="-"||S==="("?"":S)+Z,ee=(j==="s"&&!isNaN(B)&&vy!==void 0?qN[8+vy/3]:"")+ee+(ie&&S==="("?")":""),G){for(J=-1,q=B.length;++J F||F>57){ee=(F===46?i+B.slice(J+1):B.slice(J))+ee,B=B.slice(0,J);break}}}M&&!A&&(B=t(B,1/0));var ce=Z.length+B.length+ee.length,U=ce<_?new Array(_-ce+1).join(b):"";switch(M&&A&&(B=t(U+B,U.length?_-ee.length:1/0),U=""),w){case"<":B=Z+B+ee+U;break;case"=":B=Z+U+B+ee;break;case"^":B=U.slice(0,ce=U.length>>1)+Z+B+ee+U.slice(ce);break;default:B=U+Z+B+ee;break}return s(B)}return $.toString=function(){return p+""},$}function m(p,v){var b=Math.max(-8,Math.min(8,Math.floor(uf(v)/3)))*3,w=Math.pow(10,-b),S=d((p=tp(p),p.type="f",p),{suffix:qN[8+b/3]});return function(x){return S(w*x)}}return{format:d,formatPrefix:m}}var Av,MT,yB;nY({thousands:",",grouping:[3],currency:["$",""]});function nY(e){return Av=tY(e),MT=Av.format,yB=Av.formatPrefix,Av}function rY(e){return Math.max(0,-uf(Math.abs(e)))}function iY(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(uf(t)/3)))*3-uf(Math.abs(e)))}function aY(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,uf(t)-uf(e))+1}function gB(e,t,n,r){var i=gA(e,t,n),s;switch(r=tp(r??",f"),r.type){case"s":{var l=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(s=iY(i,l))&&(r.precision=s),yB(r,l)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(s=aY(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=s-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(s=rY(i))&&(r.precision=s-(r.type==="%")*2);break}}return MT(r)}function fl(e){var t=e.domain;return e.ticks=function(n){var r=t();return vA(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return gB(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,s=r.length-1,l=r[i],c=r[s],f,d,m=10;for(c0;){if(d=yA(l,c,n),d===f)return r[i]=l,r[s]=c,t(r);if(d>0)l=Math.floor(l/d)*d,c=Math.ceil(c/d)*d;else if(d<0)l=Math.ceil(l*d)/d,c=Math.floor(c*d)/d;else break;f=d}return e},e}function yy(){var e=TT();return e.copy=function(){return Bp(e,yy())},sa.apply(e,arguments),fl(e)}function bB(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,py),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return bB(e).unknown(t)},e=arguments.length?Array.from(e,py):[0,1],fl(n)}function xB(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],s=e[r],l;return sMath.pow(e,t)}function cY(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 VN(e){return(t,n)=>-e(-t,n)}function jT(e){const t=e(IN,UN),n=t.domain;let r=10,i,s;function l(){return i=cY(r),s=uY(r),n()[0]<0?(i=VN(i),s=VN(s),e(oY,sY)):e(IN,UN),t}return t.base=function(c){return arguments.length?(r=+c,l()):r},t.domain=function(c){return arguments.length?(n(c),l()):n()},t.ticks=c=>{const f=n();let d=f[0],m=f[f.length-1];const p=m 0){for(;v<=b;++v)for(w=1;w m)break;A.push(S)}}else for(;v<=b;++v)for(w=r-1;w>=1;--w)if(S=v>0?w/s(-v):w*s(v),!(S m)break;A.push(S)}A.length*2 {if(c==null&&(c=10),f==null&&(f=r===10?"s":","),typeof f!="function"&&(!(r%1)&&(f=tp(f)).precision==null&&(f.trim=!0),f=MT(f)),c===1/0)return f;const d=Math.max(1,r*c/t.ticks().length);return m=>{let p=m/s(Math.round(i(m)));return p*r n(xB(n(),{floor:c=>s(Math.floor(i(c))),ceil:c=>s(Math.ceil(i(c)))})),t}function SB(){const e=jT(_g()).domain([1,10]);return e.copy=()=>Bp(e,SB()).base(e.base()),sa.apply(e,arguments),e}function HN(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function FN(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function PT(e){var t=1,n=e(HN(t),FN(t));return n.constant=function(r){return arguments.length?e(HN(t=+r),FN(t)):t},fl(n)}function wB(){var e=PT(_g());return e.copy=function(){return Bp(e,wB()).constant(e.constant())},sa.apply(e,arguments)}function GN(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function fY(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function dY(e){return e<0?-e*e:e*e}function CT(e){var t=e(Yr,Yr),n=1;function r(){return n===1?e(Yr,Yr):n===.5?e(fY,dY):e(GN(n),GN(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},fl(t)}function DT(){var e=CT(_g());return e.copy=function(){return Bp(e,DT()).exponent(e.exponent())},sa.apply(e,arguments),e}function hY(){return DT.apply(null,arguments).exponent(.5)}function KN(e){return Math.sign(e)*e*e}function pY(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function _B(){var e=TT(),t=[0,1],n=!1,r;function i(s){var l=pY(e(s));return isNaN(l)?r:n?Math.round(l):l}return i.invert=function(s){return e.invert(KN(s))},i.domain=function(s){return arguments.length?(e.domain(s),i):e.domain()},i.range=function(s){return arguments.length?(e.range((t=Array.from(s,py)).map(KN)),i):t.slice()},i.rangeRound=function(s){return i.range(s).round(!0)},i.round=function(s){return arguments.length?(n=!!s,i):n},i.clamp=function(s){return arguments.length?(e.clamp(s),i):e.clamp()},i.unknown=function(s){return arguments.length?(r=s,i):r},i.copy=function(){return _B(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},sa.apply(i,arguments),fl(i)}function AB(){var e=[],t=[],n=[],r;function i(){var l=0,c=Math.max(1,t.length);for(n=new Array(c-1);++l 0?n[c-1]:e[0],c =n?[r[n-1],t]:[r[d-1],r[d]]},l.unknown=function(f){return arguments.length&&(s=f),l},l.thresholds=function(){return r.slice()},l.copy=function(){return OB().domain([e,t]).range(i).unknown(s)},sa.apply(fl(l),arguments)}function TB(){var e=[.5],t=[0,1],n,r=1;function i(s){return s!=null&&s<=s?t[zp(e,s,0,r)]:n}return i.domain=function(s){return arguments.length?(e=Array.from(s),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(s){return arguments.length?(t=Array.from(s),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(s){var l=t.indexOf(s);return[e[l-1],e[l]]},i.unknown=function(s){return arguments.length?(n=s,i):n},i.copy=function(){return TB().domain(e).range(t).unknown(n)},sa.apply(i,arguments)}const bw=new Date,xw=new Date;function nr(e,t,n,r){function i(s){return e(s=arguments.length===0?new Date:new Date(+s)),s}return i.floor=s=>(e(s=new Date(+s)),s),i.ceil=s=>(e(s=new Date(s-1)),t(s,1),e(s),s),i.round=s=>{const l=i(s),c=i.ceil(s);return s-l (t(s=new Date(+s),l==null?1:Math.floor(l)),s),i.range=(s,l,c)=>{const f=[];if(s=i.ceil(s),c=c==null?1:Math.floor(c),!(s 0))return f;let d;do f.push(d=new Date(+s)),t(s,c),e(s);while(d nr(l=>{if(l>=l)for(;e(l),!s(l);)l.setTime(l-1)},(l,c)=>{if(l>=l)if(c<0)for(;++c<=0;)for(;t(l,-1),!s(l););else for(;--c>=0;)for(;t(l,1),!s(l););}),n&&(i.count=(s,l)=>(bw.setTime(+s),xw.setTime(+l),e(bw),e(xw),Math.floor(n(bw,xw))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?l=>r(l)%s===0:l=>i.count(0,l)%s===0):i)),i}const gy=nr(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);gy.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?nr(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):gy);gy.range;const Lo=1e3,ra=Lo*60,zo=ra*60,Ko=zo*24,RT=Ko*7,YN=Ko*30,Sw=Ko*365,eu=nr(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Lo)},(e,t)=>(t-e)/Lo,e=>e.getUTCSeconds());eu.range;const NT=nr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Lo)},(e,t)=>{e.setTime(+e+t*ra)},(e,t)=>(t-e)/ra,e=>e.getMinutes());NT.range;const kT=nr(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*ra)},(e,t)=>(t-e)/ra,e=>e.getUTCMinutes());kT.range;const LT=nr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Lo-e.getMinutes()*ra)},(e,t)=>{e.setTime(+e+t*zo)},(e,t)=>(t-e)/zo,e=>e.getHours());LT.range;const zT=nr(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*zo)},(e,t)=>(t-e)/zo,e=>e.getUTCHours());zT.range;const qp=nr(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*ra)/Ko,e=>e.getDate()-1);qp.range;const Ag=nr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ko,e=>e.getUTCDate()-1);Ag.range;const EB=nr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ko,e=>Math.floor(e/Ko));EB.range;function ju(e){return nr(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())*ra)/RT)}const Og=ju(0),by=ju(1),mY=ju(2),vY=ju(3),cf=ju(4),yY=ju(5),gY=ju(6);Og.range;by.range;mY.range;vY.range;cf.range;yY.range;gY.range;function Pu(e){return nr(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)/RT)}const Tg=Pu(0),xy=Pu(1),bY=Pu(2),xY=Pu(3),ff=Pu(4),SY=Pu(5),wY=Pu(6);Tg.range;xy.range;bY.range;xY.range;ff.range;SY.range;wY.range;const $T=nr(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());$T.range;const BT=nr(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());BT.range;const Yo=nr(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());Yo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:nr(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)});Yo.range;const Xo=nr(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());Xo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:nr(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)});Xo.range;function MB(e,t,n,r,i,s){const l=[[eu,1,Lo],[eu,5,5*Lo],[eu,15,15*Lo],[eu,30,30*Lo],[s,1,ra],[s,5,5*ra],[s,15,15*ra],[s,30,30*ra],[i,1,zo],[i,3,3*zo],[i,6,6*zo],[i,12,12*zo],[r,1,Ko],[r,2,2*Ko],[n,1,RT],[t,1,YN],[t,3,3*YN],[e,1,Sw]];function c(d,m,p){const v=mx).right(l,v);if(b===l.length)return e.every(gA(d/Sw,m/Sw,p));if(b===0)return gy.every(Math.max(gA(d,m,p),1));const[w,S]=l[v/l[b-1][2] 53)return null;"w"in he||(he.w=1),"Z"in he?(Te=_w(sh(he.y,0,1)),Xe=Te.getUTCDay(),Te=Xe>4||Xe===0?xy.ceil(Te):xy(Te),Te=Ag.offset(Te,(he.V-1)*7),he.y=Te.getUTCFullYear(),he.m=Te.getUTCMonth(),he.d=Te.getUTCDate()+(he.w+6)%7):(Te=ww(sh(he.y,0,1)),Xe=Te.getDay(),Te=Xe>4||Xe===0?by.ceil(Te):by(Te),Te=qp.offset(Te,(he.V-1)*7),he.y=Te.getFullYear(),he.m=Te.getMonth(),he.d=Te.getDate()+(he.w+6)%7)}else("W"in he||"U"in he)&&("w"in he||(he.w="u"in he?he.u%7:"W"in he?1:0),Xe="Z"in he?_w(sh(he.y,0,1)).getUTCDay():ww(sh(he.y,0,1)).getDay(),he.m=0,he.d="W"in he?(he.w+6)%7+he.W*7-(Xe+5)%7:he.w+he.U*7-(Xe+6)%7);return"Z"in he?(he.H+=he.Z/100|0,he.M+=he.Z%100,_w(he)):ww(he)}}function k(de,_e,Ee,he){for(var Ie=0,Te=_e.length,Xe=Ee.length,nt,yt;Ie =Xe)return-1;if(nt=_e.charCodeAt(Ie++),nt===37){if(nt=_e.charAt(Ie++),yt=O[nt in XN?_e.charAt(Ie++):nt],!yt||(he=yt(de,Ee,he))<0)return-1}else if(nt!=Ee.charCodeAt(he++))return-1}return he}function z(de,_e,Ee){var he=d.exec(_e.slice(Ee));return he?(de.p=m.get(he[0].toLowerCase()),Ee+he[0].length):-1}function G(de,_e,Ee){var he=b.exec(_e.slice(Ee));return he?(de.w=w.get(he[0].toLowerCase()),Ee+he[0].length):-1}function $(de,_e,Ee){var he=p.exec(_e.slice(Ee));return he?(de.w=v.get(he[0].toLowerCase()),Ee+he[0].length):-1}function B(de,_e,Ee){var he=A.exec(_e.slice(Ee));return he?(de.m=_.get(he[0].toLowerCase()),Ee+he[0].length):-1}function Z(de,_e,Ee){var he=S.exec(_e.slice(Ee));return he?(de.m=x.get(he[0].toLowerCase()),Ee+he[0].length):-1}function ee(de,_e,Ee){return k(de,t,_e,Ee)}function J(de,_e,Ee){return k(de,n,_e,Ee)}function q(de,_e,Ee){return k(de,r,_e,Ee)}function F(de){return l[de.getDay()]}function ie(de){return s[de.getDay()]}function ce(de){return f[de.getMonth()]}function U(de){return c[de.getMonth()]}function D(de){return i[+(de.getHours()>=12)]}function V(de){return 1+~~(de.getMonth()/3)}function X(de){return l[de.getUTCDay()]}function ue(de){return s[de.getUTCDay()]}function be(de){return f[de.getUTCMonth()]}function Se(de){return c[de.getUTCMonth()]}function ye(de){return i[+(de.getUTCHours()>=12)]}function Me(de){return 1+~~(de.getUTCMonth()/3)}return{format:function(de){var _e=j(de+="",M);return _e.toString=function(){return de},_e},parse:function(de){var _e=R(de+="",!1);return _e.toString=function(){return de},_e},utcFormat:function(de){var _e=j(de+="",E);return _e.toString=function(){return de},_e},utcParse:function(de){var _e=R(de+="",!0);return _e.toString=function(){return de},_e}}}var XN={"-":"",_:" ",0:"0"},hr=/^\s*\d+/,MY=/^%/,jY=/[\\^$*+?|[\]().{}]/g;function At(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",s=i.length;return r+(s [t.toLowerCase(),n]))}function CY(e,t,n){var r=hr.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function DY(e,t,n){var r=hr.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function RY(e,t,n){var r=hr.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function NY(e,t,n){var r=hr.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function kY(e,t,n){var r=hr.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function WN(e,t,n){var r=hr.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function QN(e,t,n){var r=hr.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function LY(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 zY(e,t,n){var r=hr.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function $Y(e,t,n){var r=hr.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function ZN(e,t,n){var r=hr.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function BY(e,t,n){var r=hr.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function JN(e,t,n){var r=hr.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function qY(e,t,n){var r=hr.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function IY(e,t,n){var r=hr.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function UY(e,t,n){var r=hr.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function VY(e,t,n){var r=hr.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function HY(e,t,n){var r=MY.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function FY(e,t,n){var r=hr.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function GY(e,t,n){var r=hr.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function ek(e,t){return At(e.getDate(),t,2)}function KY(e,t){return At(e.getHours(),t,2)}function YY(e,t){return At(e.getHours()%12||12,t,2)}function XY(e,t){return At(1+qp.count(Yo(e),e),t,3)}function jB(e,t){return At(e.getMilliseconds(),t,3)}function WY(e,t){return jB(e,t)+"000"}function QY(e,t){return At(e.getMonth()+1,t,2)}function ZY(e,t){return At(e.getMinutes(),t,2)}function JY(e,t){return At(e.getSeconds(),t,2)}function eX(e){var t=e.getDay();return t===0?7:t}function tX(e,t){return At(Og.count(Yo(e)-1,e),t,2)}function PB(e){var t=e.getDay();return t>=4||t===0?cf(e):cf.ceil(e)}function nX(e,t){return e=PB(e),At(cf.count(Yo(e),e)+(Yo(e).getDay()===4),t,2)}function rX(e){return e.getDay()}function iX(e,t){return At(by.count(Yo(e)-1,e),t,2)}function aX(e,t){return At(e.getFullYear()%100,t,2)}function oX(e,t){return e=PB(e),At(e.getFullYear()%100,t,2)}function sX(e,t){return At(e.getFullYear()%1e4,t,4)}function lX(e,t){var n=e.getDay();return e=n>=4||n===0?cf(e):cf.ceil(e),At(e.getFullYear()%1e4,t,4)}function uX(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+At(t/60|0,"0",2)+At(t%60,"0",2)}function tk(e,t){return At(e.getUTCDate(),t,2)}function cX(e,t){return At(e.getUTCHours(),t,2)}function fX(e,t){return At(e.getUTCHours()%12||12,t,2)}function dX(e,t){return At(1+Ag.count(Xo(e),e),t,3)}function CB(e,t){return At(e.getUTCMilliseconds(),t,3)}function hX(e,t){return CB(e,t)+"000"}function pX(e,t){return At(e.getUTCMonth()+1,t,2)}function mX(e,t){return At(e.getUTCMinutes(),t,2)}function vX(e,t){return At(e.getUTCSeconds(),t,2)}function yX(e){var t=e.getUTCDay();return t===0?7:t}function gX(e,t){return At(Tg.count(Xo(e)-1,e),t,2)}function DB(e){var t=e.getUTCDay();return t>=4||t===0?ff(e):ff.ceil(e)}function bX(e,t){return e=DB(e),At(ff.count(Xo(e),e)+(Xo(e).getUTCDay()===4),t,2)}function xX(e){return e.getUTCDay()}function SX(e,t){return At(xy.count(Xo(e)-1,e),t,2)}function wX(e,t){return At(e.getUTCFullYear()%100,t,2)}function _X(e,t){return e=DB(e),At(e.getUTCFullYear()%100,t,2)}function AX(e,t){return At(e.getUTCFullYear()%1e4,t,4)}function OX(e,t){var n=e.getUTCDay();return e=n>=4||n===0?ff(e):ff.ceil(e),At(e.getUTCFullYear()%1e4,t,4)}function TX(){return"+0000"}function nk(){return"%"}function rk(e){return+e}function ik(e){return Math.floor(+e/1e3)}var wc,RB,NB;EX({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 EX(e){return wc=EY(e),RB=wc.format,wc.parse,NB=wc.utcFormat,wc.utcParse,wc}function MX(e){return new Date(e)}function jX(e){return e instanceof Date?+e:+new Date(+e)}function qT(e,t,n,r,i,s,l,c,f,d){var m=TT(),p=m.invert,v=m.domain,b=d(".%L"),w=d(":%S"),S=d("%I:%M"),x=d("%I %p"),A=d("%a %d"),_=d("%b %d"),M=d("%B"),E=d("%Y");function O(j){return(f(j) t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,s)=>gK(e,s/r))},n.copy=function(){return $B(t).domain(e)},ts.apply(n,arguments)}function Mg(){var e=0,t=.5,n=1,r=1,i,s,l,c,f,d=Yr,m,p=!1,v;function b(S){return isNaN(S=+S)?v:(S=.5+((S=+m(S))-s)*(r*S n}return Ow=e,Ow}var Tw,lk;function kX(){if(lk)return Tw;lk=1;var e=UB(),t=NX(),n=Ff();function r(i){return i&&i.length?e(i,n,t):void 0}return Tw=r,Tw}var LX=kX();const tl=Ft(LX);var Ew,uk;function zX(){if(uk)return Ew;uk=1;function e(t,n){return t e.e^s.s<0?1:-1;for(r=s.d.length,i=e.d.length,t=0,n=re.d[t]^s.s<0?1:-1;return r===i?0:r>i^s.s<0?1:-1};ke.decimalPlaces=ke.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*ln;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};ke.dividedBy=ke.div=function(e){return Io(this,new this.constructor(e))};ke.dividedToIntegerBy=ke.idiv=function(e){var t=this,n=t.constructor;return Xt(Io(t,new n(e),0,1),n.precision)};ke.equals=ke.eq=function(e){return!this.cmp(e)};ke.exponent=function(){return Hn(this)};ke.greaterThan=ke.gt=function(e){return this.cmp(e)>0};ke.greaterThanOrEqualTo=ke.gte=function(e){return this.cmp(e)>=0};ke.isInteger=ke.isint=function(){return this.e>this.d.length-2};ke.isNegative=ke.isneg=function(){return this.s<0};ke.isPositive=ke.ispos=function(){return this.s>0};ke.isZero=function(){return this.s===0};ke.lessThan=ke.lt=function(e){return this.cmp(e)<0};ke.lessThanOrEqualTo=ke.lte=function(e){return this.cmp(e)<1};ke.logarithm=ke.log=function(e){var t,n=this,r=n.constructor,i=r.precision,s=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Pi))throw Error(aa+"NaN");if(n.s<1)throw Error(aa+(n.s?"NaN":"-Infinity"));return n.eq(Pi)?new r(0):(hn=!1,t=Io(np(n,s),np(e,s),s),hn=!0,Xt(t,i))};ke.minus=ke.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?GB(t,e):HB(t,(e.s=-e.s,e))};ke.modulo=ke.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(aa+"NaN");return n.s?(hn=!1,t=Io(n,e,0,1).times(e),hn=!0,n.minus(t)):Xt(new r(n),i)};ke.naturalExponential=ke.exp=function(){return FB(this)};ke.naturalLogarithm=ke.ln=function(){return np(this)};ke.negated=ke.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};ke.plus=ke.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?HB(t,e):GB(t,(e.s=-e.s,e))};ke.precision=ke.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(pu+e);if(t=Hn(i)+1,r=i.d.length-1,n=r*ln+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};ke.squareRoot=ke.sqrt=function(){var e,t,n,r,i,s,l,c=this,f=c.constructor;if(c.s<1){if(!c.s)return new f(0);throw Error(aa+"NaN")}for(e=Hn(c),hn=!1,i=Math.sqrt(+c),i==0||i==1/0?(t=Ga(c.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Yf((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 f(t)):r=new f(i.toString()),n=f.precision,i=l=n+3;;)if(s=r,r=s.plus(Io(c,s,l+2)).times(.5),Ga(s.d).slice(0,l)===(t=Ga(r.d)).slice(0,l)){if(t=t.slice(l-3,l+1),i==l&&t=="4999"){if(Xt(s,n+1,0),s.times(s).eq(c)){r=s;break}}else if(t!="9999")break;l+=4}return hn=!0,Xt(r,n)};ke.times=ke.mul=function(e){var t,n,r,i,s,l,c,f,d,m=this,p=m.constructor,v=m.d,b=(e=new p(e)).d;if(!m.s||!e.s)return new p(0);for(e.s*=m.s,n=m.e+e.e,f=v.length,d=b.length,f =0;){for(t=0,i=f+r;i>r;)c=s[i]+b[r]*v[i-r-1]+t,s[i--]=c%fr|0,t=c/fr|0;s[i]=(s[i]+t)%fr|0}for(;!s[--l];)s.pop();return t?++n:s.shift(),e.d=s,e.e=n,hn?Xt(e,p.precision):e};ke.toDecimalPlaces=ke.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(eo(e,0,Kf),t===void 0?t=r.rounding:eo(t,0,8),Xt(n,e+Hn(n)+1,t))};ke.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=_u(r,!0):(eo(e,0,Kf),t===void 0?t=i.rounding:eo(t,0,8),r=Xt(new i(r),e+1,t),n=_u(r,!0,e+1)),n};ke.toFixed=function(e,t){var n,r,i=this,s=i.constructor;return e===void 0?_u(i):(eo(e,0,Kf),t===void 0?t=s.rounding:eo(t,0,8),r=Xt(new s(i),e+Hn(i)+1,t),n=_u(r.abs(),!1,e+Hn(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};ke.toInteger=ke.toint=function(){var e=this,t=e.constructor;return Xt(new t(e),Hn(e)+1,t.rounding)};ke.toNumber=function(){return+this};ke.toPower=ke.pow=function(e){var t,n,r,i,s,l,c=this,f=c.constructor,d=12,m=+(e=new f(e));if(!e.s)return new f(Pi);if(c=new f(c),!c.s){if(e.s<1)throw Error(aa+"Infinity");return c}if(c.eq(Pi))return c;if(r=f.precision,e.eq(Pi))return Xt(c,r);if(t=e.e,n=e.d.length-1,l=t>=n,s=c.s,l){if((n=m<0?-m:m)<=VB){for(i=new f(Pi),t=Math.ceil(r/ln+4),hn=!1;n%2&&(i=i.times(c),mk(i.d,t)),n=Yf(n/2),n!==0;)c=c.times(c),mk(c.d,t);return hn=!0,e.s<0?new f(Pi).div(i):Xt(i,r)}}else if(s<0)throw Error(aa+"NaN");return s=s<0&&e.d[Math.max(t,n)]&1?-1:1,c.s=1,hn=!1,i=e.times(np(c,r+d)),hn=!0,i=FB(i),i.s=s,i};ke.toPrecision=function(e,t){var n,r,i=this,s=i.constructor;return e===void 0?(n=Hn(i),r=_u(i,n<=s.toExpNeg||n>=s.toExpPos)):(eo(e,1,Kf),t===void 0?t=s.rounding:eo(t,0,8),i=Xt(new s(i),e,t),n=Hn(i),r=_u(i,e<=n||n<=s.toExpNeg,e)),r};ke.toSignificantDigits=ke.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(eo(e,1,Kf),t===void 0?t=r.rounding:eo(t,0,8)),Xt(new r(n),e,t)};ke.toString=ke.valueOf=ke.val=ke.toJSON=ke[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Hn(e),n=e.constructor;return _u(e,t<=n.toExpNeg||t>=n.toExpPos)};function HB(e,t){var n,r,i,s,l,c,f,d,m=e.constructor,p=m.precision;if(!e.s||!t.s)return t.s||(t=new m(e)),hn?Xt(t,p):t;if(f=e.d,d=t.d,l=e.e,i=t.e,f=f.slice(),s=l-i,s){for(s<0?(r=f,s=-s,c=d.length):(r=d,i=l,c=f.length),l=Math.ceil(p/ln),c=l>c?l+1:c+1,s>c&&(s=c,r.length=1),r.reverse();s--;)r.push(0);r.reverse()}for(c=f.length,s=d.length,c-s<0&&(s=c,r=d,d=f,f=r),n=0;s;)n=(f[--s]=f[s]+d[s]+n)/fr|0,f[s]%=fr;for(n&&(f.unshift(n),++i),c=f.length;f[--c]==0;)f.pop();return t.d=f,t.e=i,hn?Xt(t,p):t}function eo(e,t,n){if(e!==~~e||e n)throw Error(pu+e)}function Ga(e){var t,n,r,i=e.length-1,s="",l=e[0];if(i>0){for(s+=l,t=1;tl?1:-1;else for(c=f=0;c i[c]?1:-1;break}return f}function n(r,i,s){for(var l=0;s--;)r[s]-=l,l=r[s]1;)r.shift()}return function(r,i,s,l){var c,f,d,m,p,v,b,w,S,x,A,_,M,E,O,j,R,k,z=r.constructor,G=r.s==i.s?1:-1,$=r.d,B=i.d;if(!r.s)return new z(r);if(!i.s)throw Error(aa+"Division by zero");for(f=r.e-i.e,R=B.length,O=$.length,b=new z(G),w=b.d=[],d=0;B[d]==($[d]||0);)++d;if(B[d]>($[d]||0)&&--f,s==null?_=s=z.precision:l?_=s+(Hn(r)-Hn(i))+1:_=s,_<0)return new z(0);if(_=_/ln+2|0,d=0,R==1)for(m=0,B=B[0],_++;(d1&&(B=e(B,m),$=e($,m),R=B.length,O=$.length),E=R,S=$.slice(0,R),x=S.length;x =fr/2&&++j;do m=0,c=t(B,S,R,x),c<0?(A=S[0],R!=x&&(A=A*fr+(S[1]||0)),m=A/j|0,m>1?(m>=fr&&(m=fr-1),p=e(B,m),v=p.length,x=S.length,c=t(p,S,v,x),c==1&&(m--,n(p,R 16)throw Error(VT+Hn(e));if(!e.s)return new m(Pi);for(hn=!1,c=p,l=new m(.03125);e.abs().gte(.1);)e=e.times(l),d+=5;for(r=Math.log(Fl(2,d))/Math.LN10*2+5|0,c+=r,n=i=s=new m(Pi),m.precision=c;;){if(i=Xt(i.times(e),c),n=n.times(++f),l=s.plus(Io(i,n,c)),Ga(l.d).slice(0,c)===Ga(s.d).slice(0,c)){for(;d--;)s=Xt(s.times(s),c);return m.precision=p,t==null?(hn=!0,Xt(s,p)):s}s=l}}function Hn(e){for(var t=e.e*ln,n=e.d[0];n>=10;n/=10)t++;return t}function Dw(e,t,n){if(t>e.LN10.sd())throw hn=!0,n&&(e.precision=n),Error(aa+"LN10 precision limit exceeded");return Xt(new e(e.LN10),t)}function Vs(e){for(var t="";e--;)t+="0";return t}function np(e,t){var n,r,i,s,l,c,f,d,m,p=1,v=10,b=e,w=b.d,S=b.constructor,x=S.precision;if(b.s<1)throw Error(aa+(b.s?"NaN":"-Infinity"));if(b.eq(Pi))return new S(0);if(t==null?(hn=!1,d=x):d=t,b.eq(10))return t==null&&(hn=!0),Dw(S,d);if(d+=v,S.precision=d,n=Ga(w),r=n.charAt(0),s=Hn(b),Math.abs(s)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)b=b.times(e),n=Ga(b.d),r=n.charAt(0),p++;s=Hn(b),r>1?(b=new S("0."+n),s++):b=new S(r+"."+n.slice(1))}else return f=Dw(S,d+2,x).times(s+""),b=np(new S(r+"."+n.slice(1)),d-v).plus(f),S.precision=x,t==null?(hn=!0,Xt(b,x)):b;for(c=l=b=Io(b.minus(Pi),b.plus(Pi),d),m=Xt(b.times(b),d),i=3;;){if(l=Xt(l.times(m),d),f=c.plus(Io(l,new S(i),d)),Ga(f.d).slice(0,d)===Ga(c.d).slice(0,d))return c=c.times(2),s!==0&&(c=c.plus(Dw(S,d+2,x).times(s+""))),c=Io(c,new S(p),d),S.precision=x,t==null?(hn=!0,Xt(c,x)):c;c=f,i+=2}}function pk(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=Yf(n/ln),e.d=[],r=(n+1)%ln,n<0&&(r+=ln),rSy||e.e<-Sy))throw Error(VT+n)}else e.s=0,e.e=0,e.d=[0];return e}function Xt(e,t,n){var r,i,s,l,c,f,d,m,p=e.d;for(l=1,s=p[0];s>=10;s/=10)l++;if(r=t-l,r<0)r+=ln,i=t,d=p[m=0];else{if(m=Math.ceil((r+1)/ln),s=p.length,m>=s)return e;for(d=s=p[m],l=1;s>=10;s/=10)l++;r%=ln,i=r-ln+l}if(n!==void 0&&(s=Fl(10,l-i-1),c=d/s%10|0,f=t<0||p[m+1]!==void 0||d%s,f=n<4?(c||f)&&(n==0||n==(e.s<0?3:2)):c>5||c==5&&(n==4||f||n==6&&(r>0?i>0?d/Fl(10,l-i):0:p[m-1])%10&1||n==(e.s<0?8:7))),t<1||!p[0])return f?(s=Hn(e),p.length=1,t=t-s-1,p[0]=Fl(10,(ln-t%ln)%ln),e.e=Yf(-t/ln)||0):(p.length=1,p[0]=e.e=e.s=0),e;if(r==0?(p.length=m,s=1,m--):(p.length=m+1,s=Fl(10,ln-r),p[m]=i>0?(d/Fl(10,l-i)%Fl(10,i)|0)*s:0),f)for(;;)if(m==0){(p[0]+=s)==fr&&(p[0]=1,++e.e);break}else{if(p[m]+=s,p[m]!=fr)break;p[m--]=0,s=1}for(r=p.length;p[--r]===0;)p.pop();if(hn&&(e.e>Sy||e.e<-Sy))throw Error(VT+Hn(e));return e}function GB(e,t){var n,r,i,s,l,c,f,d,m,p,v=e.constructor,b=v.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new v(e),hn?Xt(t,b):t;if(f=e.d,p=t.d,r=t.e,d=e.e,f=f.slice(),l=d-r,l){for(m=l<0,m?(n=f,l=-l,c=p.length):(n=p,r=d,c=f.length),i=Math.max(Math.ceil(b/ln),c)+2,l>i&&(l=i,n.length=1),n.reverse(),i=l;i--;)n.push(0);n.reverse()}else{for(i=f.length,c=p.length,m=i 0;--i)f[c++]=0;for(i=p.length;i>l;){if(f[--i] 0?s=s.charAt(0)+"."+s.slice(1)+Vs(r):l>1&&(s=s.charAt(0)+"."+s.slice(1)),s=s+(i<0?"e":"e+")+i):i<0?(s="0."+Vs(-i-1)+s,n&&(r=n-l)>0&&(s+=Vs(r))):i>=l?(s+=Vs(i+1-l),n&&(r=n-i-1)>0&&(s=s+"."+Vs(r))):((r=i+1)
0&&(i+1===l&&(s+="."),s+=Vs(r))),e.s<0?"-"+s:s}function mk(e,t){if(e.length>t)return e.length=t,!0}function KB(e){var t,n,r;function i(s){var l=this;if(!(l instanceof i))return new i(s);if(l.constructor=i,s instanceof i){l.s=s.s,l.e=s.e,l.d=(s=s.d)?s.slice():s;return}if(typeof s=="number"){if(s*0!==0)throw Error(pu+s);if(s>0)l.s=1;else if(s<0)s=-s,l.s=-1;else{l.s=0,l.e=0,l.d=[0];return}if(s===~~s&&s<1e7){l.e=0,l.d=[s];return}return pk(l,s.toString())}else if(typeof s!="string")throw Error(pu+s);if(s.charCodeAt(0)===45?(s=s.slice(1),l.s=-1):l.s=1,KX.test(s))pk(l,s);else throw Error(pu+s)}if(i.prototype=ke,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=KB,i.config=i.set=YX,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t =i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(pu+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(pu+n+": "+r);return this}var HT=KB(GX);Pi=new HT(1);const Ht=HT;function XX(e){return JX(e)||ZX(e)||QX(e)||WX()}function WX(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function QX(e,t){if(e){if(typeof e=="string")return _A(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _A(e,t)}}function ZX(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function JX(e){if(Array.isArray(e))return _A(e)}function _A(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n =t?n.apply(void 0,i):e(t-l,vk(function(){for(var c=arguments.length,f=new Array(c),d=0;d e.length)&&(t=e.length);for(var n=0,r=new Array(t);n "u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,s=void 0;try{for(var l=e[Symbol.iterator](),c;!(r=(c=l.next()).done)&&(n.push(c.value),!(t&&n.length===t));r=!0);}catch(f){i=!0,s=f}finally{try{!r&&l.return!=null&&l.return()}finally{if(i)throw s}}return n}}function pW(e){if(Array.isArray(e))return e}function ZB(e){var t=rp(e,2),n=t[0],r=t[1],i=n,s=r;return n>r&&(i=r,s=n),[i,s]}function JB(e,t,n){if(e.lte(0))return new Ht(0);var r=Cg.getDigitCount(e.toNumber()),i=new Ht(10).pow(r),s=e.div(i),l=r!==1?.05:.1,c=new Ht(Math.ceil(s.div(l).toNumber())).add(n).mul(l),f=c.mul(i);return t?f:new Ht(Math.ceil(f))}function mW(e,t,n){var r=1,i=new Ht(e);if(!i.isint()&&n){var s=Math.abs(e);s<1?(r=new Ht(10).pow(Cg.getDigitCount(e)-1),i=new Ht(Math.floor(i.div(r).toNumber())).mul(r)):s>1&&(i=new Ht(Math.floor(e)))}else e===0?i=new Ht(Math.floor((t-1)/2)):n||(i=new Ht(Math.floor(e)));var l=Math.floor((t-1)/2),c=rW(nW(function(f){return i.add(new Ht(f-l).mul(r)).toNumber()}),AA);return c(0,t)}function eq(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new Ht(0),tickMin:new Ht(0),tickMax:new Ht(0)};var s=JB(new Ht(t).sub(e).div(n-1),r,i),l;e<=0&&t>=0?l=new Ht(0):(l=new Ht(e).add(t).div(2),l=l.sub(new Ht(l).mod(s)));var c=Math.ceil(l.sub(e).div(s).toNumber()),f=Math.ceil(new Ht(t).sub(l).div(s).toNumber()),d=c+f+1;return d>n?eq(e,t,n,r,i+1):(d 0?f+(n-d):f,c=t>0?c:c+(n-d)),{step:s,tickMin:l.sub(new Ht(c).mul(s)),tickMax:l.add(new Ht(f).mul(s))})}function vW(e){var t=rp(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=Math.max(i,2),c=ZB([n,r]),f=rp(c,2),d=f[0],m=f[1];if(d===-1/0||m===1/0){var p=m===1/0?[d].concat(TA(AA(0,i-1).map(function(){return 1/0}))):[].concat(TA(AA(0,i-1).map(function(){return-1/0})),[m]);return n>r?OA(p):p}if(d===m)return mW(d,i,s);var v=eq(d,m,l,s),b=v.step,w=v.tickMin,S=v.tickMax,x=Cg.rangeStep(w,S.add(new Ht(.1).mul(b)),b);return n>r?OA(x):x}function yW(e,t){var n=rp(e,2),r=n[0],i=n[1],s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=ZB([r,i]),c=rp(l,2),f=c[0],d=c[1];if(f===-1/0||d===1/0)return[r,i];if(f===d)return[f];var m=Math.max(t,2),p=JB(new Ht(d).sub(f).div(m-1),s,0),v=[].concat(TA(Cg.rangeStep(new Ht(f),new Ht(d).sub(new Ht(.99).mul(p)),p)),[d]);return r>i?OA(v):v}var gW=WB(vW),bW=WB(yW),xW="Invariant failed";function Au(e,t){throw new Error(xW)}var SW=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function df(e){"@babel/helpers - typeof";return df=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},df(e)}function wy(){return wy=Object.assign?Object.assign.bind():function(e){for(var t=1;t e.length)&&(t=e.length);for(var n=0,r=new Array(t);n =0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function MW(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function jW(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PW(e,t){for(var n=0;n e.length)&&(t=e.length);for(var n=0,r=new Array(t);n 1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0,l=-1,c=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(c<=1)return 0;if(s&&s.axisType==="angleAxis"&&Math.abs(Math.abs(s.range[1]-s.range[0])-360)<=1e-6)for(var f=s.range,d=0;d 0?i[d-1].coordinate:i[c-1].coordinate,p=i[d].coordinate,v=d>=c-1?i[0].coordinate:i[d+1].coordinate,b=void 0;if(Oa(p-m)!==Oa(v-p)){var w=[];if(Oa(v-p)===Oa(f[1]-f[0])){b=v;var S=p+f[1]-f[0];w[0]=Math.min(S,(S+m)/2),w[1]=Math.max(S,(S+m)/2)}else{b=m;var x=v+f[1]-f[0];w[0]=Math.min(p,(x+p)/2),w[1]=Math.max(p,(x+p)/2)}var A=[Math.min(p,(b+p)/2),Math.max(p,(b+p)/2)];if(t>A[0]&&t<=A[1]||t>=w[0]&&t<=w[1]){l=i[d].index;break}}else{var _=Math.min(m,v),M=Math.max(m,v);if(t>(_+p)/2&&t<=(M+p)/2){l=i[d].index;break}}}else for(var E=0;E 0&&E (r[E].coordinate+r[E-1].coordinate)/2&&t<=(r[E].coordinate+r[E+1].coordinate)/2||E===c-1&&t>(r[E].coordinate+r[E-1].coordinate)/2){l=r[E].index;break}return l},FT=function(t){var n,r=t,i=r.type.displayName,s=(n=t.type)!==null&&n!==void 0&&n.defaultProps?An(An({},t.type.defaultProps),t.props):t.props,l=s.stroke,c=s.fill,f;switch(i){case"Line":f=l;break;case"Area":case"Radar":f=l&&l!=="none"?l:c;break;default:f=c;break}return f},KW=function(t){var n=t.barSize,r=t.totalSize,i=t.stackGroups,s=i===void 0?{}:i;if(!s)return{};for(var l={},c=Object.keys(s),f=0,d=c.length;f =0});if(A&&A.length){var _=A[0].type.defaultProps,M=_!==void 0?An(An({},_),A[0].props):A[0].props,E=M.barSize,O=M[x];l[O]||(l[O]=[]);var j=Qe(E)?n:E;l[O].push({item:A[0],stackList:A.slice(1),barSize:Qe(j)?void 0:Su(j,r,0)})}}return l},YW=function(t){var n=t.barGap,r=t.barCategoryGap,i=t.bandSize,s=t.sizeList,l=s===void 0?[]:s,c=t.maxBarSize,f=l.length;if(f<1)return null;var d=Su(n,i,0,!0),m,p=[];if(l[0].barSize===+l[0].barSize){var v=!1,b=i/f,w=l.reduce(function(E,O){return E+O.barSize||0},0);w+=(f-1)*d,w>=i&&(w-=(f-1)*d,d=0),w>=i&&b>0&&(v=!0,b*=.9,w=f*b);var S=(i-w)/2>>0,x={offset:S-d,size:0};m=l.reduce(function(E,O){var j={item:O.item,position:{offset:x.offset+x.size+d,size:v?b:O.barSize}},R=[].concat(bk(E),[j]);return x=R[R.length-1].position,O.stackList&&O.stackList.length&&O.stackList.forEach(function(k){R.push({item:k,position:x})}),R},p)}else{var A=Su(r,i,0,!0);i-2*A-(f-1)*d<=0&&(d=0);var _=(i-2*A-(f-1)*d)/f;_>1&&(_>>=0);var M=c===+c?Math.min(_,c):_;m=l.reduce(function(E,O,j){var R=[].concat(bk(E),[{item:O.item,position:{offset:A+(_+d)*j+(_-M)/2,size:M}}]);return O.stackList&&O.stackList.length&&O.stackList.forEach(function(k){R.push({item:k,position:R[R.length-1].position})}),R},p)}return m},XW=function(t,n,r,i){var s=r.children,l=r.width,c=r.margin,f=l-(c.left||0)-(c.right||0),d=iq({children:s,legendWidth:f});if(d){var m=i||{},p=m.width,v=m.height,b=d.align,w=d.verticalAlign,S=d.layout;if((S==="vertical"||S==="horizontal"&&w==="middle")&&b!=="center"&&Oe(t[b]))return An(An({},t),{},Ic({},b,t[b]+(p||0)));if((S==="horizontal"||S==="vertical"&&b==="center")&&w!=="middle"&&Oe(t[w]))return An(An({},t),{},Ic({},w,t[w]+(v||0)))}return t},WW=function(t,n,r){return Qe(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},aq=function(t,n,r,i,s){var l=n.props.children,c=ci(l,Xf).filter(function(d){return WW(i,s,d.props.direction)});if(c&&c.length){var f=c.map(function(d){return d.props.dataKey});return t.reduce(function(d,m){var p=er(m,r);if(Qe(p))return d;var v=Array.isArray(p)?[jg(p),tl(p)]:[p,p],b=f.reduce(function(w,S){var x=er(m,S,0),A=v[0]-Math.abs(Array.isArray(x)?x[0]:x),_=v[1]+Math.abs(Array.isArray(x)?x[1]:x);return[Math.min(A,w[0]),Math.max(_,w[1])]},[1/0,-1/0]);return[Math.min(b[0],d[0]),Math.max(b[1],d[1])]},[1/0,-1/0])}return null},QW=function(t,n,r,i,s){var l=n.map(function(c){return aq(t,c,r,s,i)}).filter(function(c){return!Qe(c)});return l&&l.length?l.reduce(function(c,f){return[Math.min(c[0],f[0]),Math.max(c[1],f[1])]},[1/0,-1/0]):null},oq=function(t,n,r,i,s){var l=n.map(function(f){var d=f.props.dataKey;return r==="number"&&d&&aq(t,f,d,i)||jh(t,d,r,s)});if(r==="number")return l.reduce(function(f,d){return[Math.min(f[0],d[0]),Math.max(f[1],d[1])]},[1/0,-1/0]);var c={};return l.reduce(function(f,d){for(var m=0,p=d.length;m =2?Oa(c[0]-c[1])*2*d:d,n&&(t.ticks||t.niceTicks)){var m=(t.ticks||t.niceTicks).map(function(p){var v=s?s.indexOf(p):p;return{coordinate:i(v)+d,value:p,offset:d}});return m.filter(function(p){return!Hf(p.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(p,v){return{coordinate:i(p)+d,value:p,index:v,offset:d}}):i.ticks&&!r?i.ticks(t.tickCount).map(function(p){return{coordinate:i(p)+d,value:p,offset:d}}):i.domain().map(function(p,v){return{coordinate:i(p)+d,value:s?s[p]:p,index:v,offset:d}})},Rw=new WeakMap,Ov=function(t,n){if(typeof n!="function")return t;Rw.has(t)||Rw.set(t,new WeakMap);var r=Rw.get(t);if(r.has(n))return r.get(n);var i=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,i),i},ZW=function(t,n,r){var i=t.scale,s=t.type,l=t.layout,c=t.axisType;if(i==="auto")return l==="radial"&&c==="radiusAxis"?{scale:Qh(),realScaleType:"band"}:l==="radial"&&c==="angleAxis"?{scale:yy(),realScaleType:"linear"}:s==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:Mh(),realScaleType:"point"}:s==="category"?{scale:Qh(),realScaleType:"band"}:{scale:yy(),realScaleType:"linear"};if(xu(i)){var f="scale".concat(pg(i));return{scale:(ak[f]||Mh)(),realScaleType:ak[f]?f:"point"}}return tt(i)?{scale:i}:{scale:Mh(),realScaleType:"point"}},Sk=1e-4,JW=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,i=t.range(),s=Math.min(i[0],i[1])-Sk,l=Math.max(i[0],i[1])+Sk,c=t(n[0]),f=t(n[r-1]);(c
l||fl)&&t.domain([n[0],n[r-1]])}},eQ=function(t,n){if(!t)return null;for(var r=0,i=t.length;ri)&&(s[1]=i),s[0]>i&&(s[0]=i),s[1]=0?(t[c][r][0]=s,t[c][r][1]=s+f,s=t[c][r][1]):(t[c][r][0]=l,t[c][r][1]=l+f,l=t[c][r][1])}},rQ=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r=0?(t[l][r][0]=s,t[l][r][1]=s+c,s=t[l][r][1]):(t[l][r][0]=0,t[l][r][1]=0)}},iQ={sign:nQ,expand:IF,none:rf,silhouette:UF,wiggle:VF,positive:rQ},aQ=function(t,n,r){var i=n.map(function(c){return c.props.dataKey}),s=iQ[r],l=qF().keys(i).value(function(c,f){return+er(c,f,0)}).order(aA).offset(s);return l(t)},oQ=function(t,n,r,i,s,l){if(!t)return null;var c=l?n.reverse():n,f={},d=c.reduce(function(p,v){var b,w=(b=v.type)!==null&&b!==void 0&&b.defaultProps?An(An({},v.type.defaultProps),v.props):v.props,S=w.stackId,x=w.hide;if(x)return p;var A=w[r],_=p[A]||{hasStack:!1,stackGroups:{}};if(Jn(S)){var M=_.stackGroups[S]||{numericAxisId:r,cateAxisId:i,items:[]};M.items.push(v),_.hasStack=!0,_.stackGroups[S]=M}else _.stackGroups[Mu("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[v]};return An(An({},p),{},Ic({},A,_))},f),m={};return Object.keys(d).reduce(function(p,v){var b=d[v];if(b.hasStack){var w={};b.stackGroups=Object.keys(b.stackGroups).reduce(function(S,x){var A=b.stackGroups[x];return An(An({},S),{},Ic({},x,{numericAxisId:r,cateAxisId:i,items:A.items,stackedData:aQ(t,A.items,s)}))},w)}return An(An({},p),{},Ic({},v,b))},m)},sQ=function(t,n){var r=n.realScaleType,i=n.type,s=n.tickCount,l=n.originalDomain,c=n.allowDecimals,f=r||n.scale;if(f!=="auto"&&f!=="linear")return null;if(s&&i==="number"&&l&&(l[0]==="auto"||l[1]==="auto")){var d=t.domain();if(!d.length)return null;var m=gW(d,s,c);return t.domain([jg(m),tl(m)]),{niceTicks:m}}if(s&&i==="number"){var p=t.domain(),v=bW(p,s,c);return{niceTicks:v}}return null};function hf(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,s=e.index,l=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Qe(i[t.dataKey])){var c=Qv(n,"value",i[t.dataKey]);if(c)return c.coordinate+r/2}return n[s]?n[s].coordinate+r/2:null}var f=er(i,Qe(l)?t.dataKey:l);return Qe(f)?null:t.scale(f)}var wk=function(t){var n=t.axis,r=t.ticks,i=t.offset,s=t.bandSize,l=t.entry,c=t.index;if(n.type==="category")return r[c]?r[c].coordinate+i:null;var f=er(l,n.dataKey,n.domain[c]);return Qe(f)?null:n.scale(f)-s/2+i},lQ=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var i=Math.min(r[0],r[1]),s=Math.max(r[0],r[1]);return i<=0&&s>=0?0:s<0?s:i}return r[0]},uQ=function(t,n){var r,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?An(An({},t.type.defaultProps),t.props):t.props,s=i.stackId;if(Jn(s)){var l=n[s];if(l){var c=l.items.indexOf(t);return c>=0?l.stackedData[c]:null}}return null},cQ=function(t){return t.reduce(function(n,r){return[jg(r.concat([n[0]]).filter(Oe)),tl(r.concat([n[1]]).filter(Oe))]},[1/0,-1/0])},uq=function(t,n,r){return Object.keys(t).reduce(function(i,s){var l=t[s],c=l.stackedData,f=c.reduce(function(d,m){var p=cQ(m.slice(n,r+1));return[Math.min(d[0],p[0]),Math.max(d[1],p[1])]},[1/0,-1/0]);return[Math.min(f[0],i[0]),Math.max(f[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},_k=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Ak=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,PA=function(t,n,r){if(tt(t))return t(n,r);if(!Array.isArray(t))return n;var i=[];if(Oe(t[0]))i[0]=r?t[0]:Math.min(t[0],n[0]);else if(_k.test(t[0])){var s=+_k.exec(t[0])[1];i[0]=n[0]-s}else tt(t[0])?i[0]=t[0](n[0]):i[0]=n[0];if(Oe(t[1]))i[1]=r?t[1]:Math.max(t[1],n[1]);else if(Ak.test(t[1])){var l=+Ak.exec(t[1])[1];i[1]=n[1]+l}else tt(t[1])?i[1]=t[1](n[1]):i[1]=n[1];return i},Ay=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!r||i>0)return i}if(t&&n&&n.length>=2){for(var s=gT(n,function(p){return p.coordinate}),l=1/0,c=1,f=s.length;c l&&(d=2*Math.PI-d),{radius:c,angle:pQ(d),angleInRadian:d}},yQ=function(t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),s=Math.floor(r/360),l=Math.min(i,s);return{startAngle:n-l*360,endAngle:r-l*360}},gQ=function(t,n){var r=n.startAngle,i=n.endAngle,s=Math.floor(r/360),l=Math.floor(i/360),c=Math.min(s,l);return t+c*360},Mk=function(t,n){var r=t.x,i=t.y,s=vQ({x:r,y:i},n),l=s.radius,c=s.angle,f=n.innerRadius,d=n.outerRadius;if(l d)return!1;if(l===0)return!0;var m=yQ(n),p=m.startAngle,v=m.endAngle,b=c,w;if(p<=v){for(;b>v;)b-=360;for(;b =p&&b<=v}else{for(;b>p;)b-=360;for(;b
=v&&b<=p}return w?Ek(Ek({},n),{},{radius:l,angle:gQ(b,n)}):null};function sp(e){"@babel/helpers - typeof";return sp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sp(e)}var bQ=["offset"];function xQ(e){return AQ(e)||_Q(e)||wQ(e)||SQ()}function SQ(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wQ(e,t){if(e){if(typeof e=="string")return CA(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return CA(e,t)}}function _Q(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function AQ(e){if(Array.isArray(e))return CA(e)}function CA(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n =0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function TQ(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function jk(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 Yn(e){for(var t=1;t =0?1:-1,M,E;i==="insideStart"?(M=b+_*l,E=S):i==="insideEnd"?(M=w-_*l,E=!S):i==="end"&&(M=w+_*l,E=S),E=A<=0?E:!E;var O=Or(d,m,x,M),j=Or(d,m,x,M+(E?1:-1)*359),R="M".concat(O.x,",").concat(O.y,` + height and width.`,J,q,l,f,m,p,n);var F=!Array.isArray(b)&&Bo(b.type).endsWith("Chart");return Q.Children.map(b,function(ie){return Q.isValidElement(ie)?K.cloneElement(ie,xv({width:J,height:q},F?{style:xv({height:"100%",width:"100%",maxHeight:q,maxWidth:J},ie.props.style)}:{})):ie})},[n,b,f,v,p,m,z,l]);return Q.createElement("div",{id:x?"".concat(x):void 0,className:ut("recharts-responsive-container",A),style:xv(xv({},E),{},{width:l,height:f,minWidth:m,minHeight:p,maxHeight:v}),ref:O},B)}),ST=function(t){return null};ST.displayName="Cell";function Xh(e){"@babel/helpers - typeof";return Xh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xh(e)}function fN(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 mA(e){for(var t=1;t 1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||cl.isSsr)return{width:0,height:0};var r=IG(n),i=JSON.stringify({text:t,copyStyle:r});if(Sc.widthCache[i])return Sc.widthCache[i];try{var s=document.getElementById(dN);s||(s=document.createElement("span"),s.setAttribute("id",dN),s.setAttribute("aria-hidden","true"),document.body.appendChild(s));var l=mA(mA({},qG),r);Object.assign(s.style,l),s.textContent="".concat(t);var c=s.getBoundingClientRect(),f={width:c.width,height:c.height};return Sc.widthCache[i]=f,++Sc.cacheCount>BG&&(Sc.cacheCount=0,Sc.widthCache={}),f}catch{return{width:0,height:0}}},UG=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Wh(e){"@babel/helpers - typeof";return Wh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wh(e)}function ly(e,t){return GG(e)||FG(e,t)||HG(e,t)||VG()}function VG(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function HG(e,t){if(e){if(typeof e=="string")return hN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return hN(e,t)}}function hN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n =0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function oK(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function bN(e,t){return cK(e)||uK(e,t)||lK(e,t)||sK()}function sK(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lK(e,t){if(e){if(typeof e=="string")return xN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xN(e,t)}}function xN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n 0&&arguments[0]!==void 0?arguments[0]:[];return J.reduce(function(q,F){var ie=F.word,ce=F.width,U=q[q.length-1];if(U&&(i==null||s||U.width+ce+r F.width?q:F})};if(!m)return b;for(var S="…",x=function(J){var q=p.slice(0,J),F=cB({breakAll:d,style:f,children:q+S}).wordsWithComputedWidth,ie=v(F),ce=ie.length>l||w(ie).width>Number(i);return[ce,ie]},A=0,_=p.length-1,M=0,E;A<=_&&M<=p.length-1;){var O=Math.floor((A+_)/2),j=O-1,R=x(j),k=bN(R,2),z=k[0],G=k[1],$=x(O),B=bN($,1),Z=B[0];if(!z&&!Z&&(A=O+1),z&&Z&&(_=O-1),!z&&Z){E=G;break}M++}return E||b},SN=function(t){var n=Qe(t)?[]:t.toString().split(uB);return[{words:n}]},dK=function(t){var n=t.width,r=t.scaleToFit,i=t.children,s=t.style,l=t.breakAll,c=t.maxLines;if((n||r)&&!cl.isSsr){var f,d,m=cB({breakAll:l,children:i,style:s});if(m){var p=m.wordsWithComputedWidth,v=m.spaceWidth;f=p,d=v}else return SN(i);return fK({breakAll:l,children:i,maxLines:c,style:s},f,d,n,r)}return SN(i)},wN="#808080",uy=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,s=i===void 0?0:i,l=t.lineHeight,c=l===void 0?"1em":l,f=t.capHeight,d=f===void 0?"0.71em":f,m=t.scaleToFit,p=m===void 0?!1:m,v=t.textAnchor,b=v===void 0?"start":v,w=t.verticalAnchor,S=w===void 0?"end":w,x=t.fill,A=x===void 0?wN:x,_=gN(t,iK),M=K.useMemo(function(){return dK({breakAll:_.breakAll,children:_.children,maxLines:_.maxLines,scaleToFit:p,style:_.style,width:_.width})},[_.breakAll,_.children,_.maxLines,p,_.style,_.width]),E=_.dx,O=_.dy,j=_.angle,R=_.className,k=_.breakAll,z=gN(_,aK);if(!Jn(r)||!Jn(s))return null;var G=r+(Oe(E)?E:0),$=s+(Oe(O)?O:0),B;switch(S){case"start":B=vw("calc(".concat(d,")"));break;case"middle":B=vw("calc(".concat((M.length-1)/2," * -").concat(c," + (").concat(d," / 2))"));break;default:B=vw("calc(".concat(M.length-1," * -").concat(c,")"));break}var Z=[];if(p){var ee=M[0].width,J=_.width;Z.push("scale(".concat((Oe(J)?J/ee:1)/ee,")"))}return j&&Z.push("rotate(".concat(j,", ").concat(G,", ").concat($,")")),Z.length&&(z.transform=Z.join(" ")),Q.createElement("text",vA({},Je(z,!0),{x:G,y:$,className:ut("recharts-text",R),textAnchor:b,fill:A.includes("url")?wN:A}),M.map(function(q,F){var ie=q.words.join(k?"":" ");return Q.createElement("tspan",{x:G,dy:F===0?B:c,key:"".concat(ie,"-").concat(F)},ie)}))};function al(e,t){return e==null||t==null?NaN:e t?1:e>=t?0:NaN}function hK(e,t){return e==null||t==null?NaN:t e?1:t>=e?0:NaN}function wT(e){let t,n,r;e.length!==2?(t=al,n=(c,f)=>al(e(c),f),r=(c,f)=>e(c)-f):(t=e===al||e===hK?e:pK,n=e,r=e);function i(c,f,d=0,m=c.length){if(d >>1;n(c[p],f)<0?d=p+1:m=p}while(d >>1;n(c[p],f)<=0?d=p+1:m=p}while(d d&&r(c[p-1],f)>-r(c[p],f)?p-1:p}return{left:i,center:l,right:s}}function pK(){return 0}function fB(e){return e===null?NaN:+e}function*mK(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const vK=wT(al),zp=vK.right;wT(fB).center;class _N extends Map{constructor(t,n=bK){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(AN(this,t))}has(t){return super.has(AN(this,t))}set(t,n){return super.set(yK(this,t),n)}delete(t){return super.delete(gK(this,t))}}function AN({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function yK({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function gK({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function bK(e){return e!==null&&typeof e=="object"?e.valueOf():e}function xK(e=al){if(e===al)return dB;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 dB(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e t?1:0)}const SK=Math.sqrt(50),wK=Math.sqrt(10),_K=Math.sqrt(2);function cy(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),s=r/Math.pow(10,i),l=s>=SK?10:s>=wK?5:s>=_K?2:1;let c,f,d;return i<0?(d=Math.pow(10,-i)/l,c=Math.round(e*d),f=Math.round(t*d),c/d t&&--f,d=-d):(d=Math.pow(10,i)*l,c=Math.round(e/d),f=Math.round(t/d),c*d t&&--f),f 0))return[];if(e===t)return[e];const r=t =i))return[];const c=s-i+1,f=new Array(c);if(r)if(l<0)for(let d=0;d