var PE=e=>{throw TypeError(e)};var Zy=(e,t,n)=>t.has(e)||PE("Cannot "+n);var L=(e,t,n)=>(Zy(e,t,"read from private field"),n?n.call(e):t.get(e)),_e=(e,t,n)=>t.has(e)?PE("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),he=(e,t,n,r)=>(Zy(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Be=(e,t,n)=>(Zy(e,t,"access private method"),n);var Ep=(e,t,n,r)=>({set _(i){he(e,t,i,n)},get _(){return L(e,t,r)}});function C6(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var Zi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function lt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var MR={exports:{}},cm={},$R={exports:{}},He={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var pd=Symbol.for("react.element"),T6=Symbol.for("react.portal"),M6=Symbol.for("react.fragment"),$6=Symbol.for("react.strict_mode"),R6=Symbol.for("react.profiler"),N6=Symbol.for("react.provider"),I6=Symbol.for("react.context"),j6=Symbol.for("react.forward_ref"),k6=Symbol.for("react.suspense"),D6=Symbol.for("react.memo"),L6=Symbol.for("react.lazy"),EE=Symbol.iterator;function F6(e){return e===null||typeof e!="object"?null:(e=EE&&e[EE]||e["@@iterator"],typeof e=="function"?e:null)}var RR={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},NR=Object.assign,IR={};function Al(e,t,n){this.props=e,this.context=t,this.refs=IR,this.updater=n||RR}Al.prototype.isReactComponent={};Al.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Al.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function jR(){}jR.prototype=Al.prototype;function f1(e,t,n){this.props=e,this.context=t,this.refs=IR,this.updater=n||RR}var d1=f1.prototype=new jR;d1.constructor=f1;NR(d1,Al.prototype);d1.isPureReactComponent=!0;var AE=Array.isArray,kR=Object.prototype.hasOwnProperty,p1={current:null},DR={key:!0,ref:!0,__self:!0,__source:!0};function LR(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)kR.call(t,r)&&!DR.hasOwnProperty(r)&&(i[r]=t[r]);var u=arguments.length-2;if(u===1)i.children=n;else if(1>>1,ae=F[oe];if(0>>1;oei(Ne,ee))Lei(me,Ne)?(F[oe]=me,F[Le]=ee,oe=Le):(F[oe]=Ne,F[Ce]=ee,oe=Ce);else if(Lei(me,ee))F[oe]=me,F[Le]=ee,oe=Le;else break e}}return z}function i(F,z){var ee=F.sortIndex-z.sortIndex;return ee!==0?ee:F.id-z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,u=a.now();e.unstable_now=function(){return a.now()-u}}var l=[],f=[],p=1,d=null,h=3,m=!1,y=!1,g=!1,w=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(F){for(var z=n(f);z!==null;){if(z.callback===null)r(f);else if(z.startTime<=F)r(f),z.sortIndex=z.expirationTime,t(l,z);else break;z=n(f)}}function P(F){if(g=!1,S(F),!y)if(n(l)!==null)y=!0,G(O);else{var z=n(f);z!==null&&Y(P,z.startTime-F)}}function O(F,z){y=!1,g&&(g=!1,b(R),R=-1),m=!0;var ee=h;try{for(S(z),d=n(l);d!==null&&(!(d.expirationTime>z)||F&&!k());){var oe=d.callback;if(typeof oe=="function"){d.callback=null,h=d.priorityLevel;var ae=oe(d.expirationTime<=z);z=e.unstable_now(),typeof ae=="function"?d.callback=ae:d===n(l)&&r(l),S(z)}else r(l);d=n(l)}if(d!==null)var be=!0;else{var Ce=n(f);Ce!==null&&Y(P,Ce.startTime-z),be=!1}return be}finally{d=null,h=ee,m=!1}}var E=!1,T=null,R=-1,I=5,B=-1;function k(){return!(e.unstable_now()-BF||125oe?(F.sortIndex=ee,t(f,F),n(l)===null&&F===n(f)&&(g?(b(R),R=-1):g=!0,Y(P,ee-oe))):(F.sortIndex=ae,t(l,F),y||m||(y=!0,G(O))),F},e.unstable_shouldYield=k,e.unstable_wrapCallback=function(F){var z=h;return function(){var ee=h;h=z;try{return F.apply(this,arguments)}finally{h=ee}}}})(WR);zR.exports=WR;var Q6=zR.exports;/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Z6=A,hr=Q6;function le(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),mb=Object.prototype.hasOwnProperty,J6=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,TE={},ME={};function eH(e){return mb.call(ME,e)?!0:mb.call(TE,e)?!1:J6.test(e)?ME[e]=!0:(TE[e]=!0,!1)}function tH(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function nH(e,t,n,r){if(t===null||typeof t>"u"||tH(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Rn(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var cn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){cn[e]=new Rn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];cn[t]=new Rn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){cn[e]=new Rn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){cn[e]=new Rn(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){cn[e]=new Rn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){cn[e]=new Rn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){cn[e]=new Rn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){cn[e]=new Rn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){cn[e]=new Rn(e,5,!1,e.toLowerCase(),null,!1,!1)});var v1=/[\-:]([a-z])/g;function m1(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(v1,m1);cn[t]=new Rn(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(v1,m1);cn[t]=new Rn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(v1,m1);cn[t]=new Rn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){cn[e]=new Rn(e,1,!1,e.toLowerCase(),null,!1,!1)});cn.xlinkHref=new Rn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){cn[e]=new Rn(e,1,!1,e.toLowerCase(),null,!0,!0)});function g1(e,t,n,r){var i=cn.hasOwnProperty(t)?cn[t]:null;(i!==null?i.type!==0:r||!(2u||i[a]!==o[u]){var l=` `+i[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=u);break}}}finally{t0=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?kc(e):""}function rH(e){switch(e.tag){case 5:return kc(e.type);case 16:return kc("Lazy");case 13:return kc("Suspense");case 19:return kc("SuspenseList");case 0:case 2:case 15:return e=n0(e.type,!1),e;case 11:return e=n0(e.type.render,!1),e;case 1:return e=n0(e.type,!0),e;default:return""}}function wb(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case uu:return"Fragment";case su:return"Portal";case gb:return"Profiler";case y1:return"StrictMode";case yb:return"Suspense";case bb:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case GR:return(e.displayName||"Context")+".Consumer";case KR:return(e._context.displayName||"Context")+".Provider";case b1:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case w1:return t=e.displayName||null,t!==null?t:wb(e.type)||"Memo";case Bo:t=e._payload,e=e._init;try{return wb(e(t))}catch{}}return null}function iH(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return wb(t);case 8:return t===y1?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ha(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function VR(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function oH(e){var t=VR(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Tp(e){e._valueTracker||(e._valueTracker=oH(e))}function XR(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=VR(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Mh(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function xb(e,t){var n=t.checked;return Mt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function RE(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ha(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function YR(e,t){t=t.checked,t!=null&&g1(e,"checked",t,!1)}function Sb(e,t){YR(e,t);var n=ha(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?_b(e,t.type,n):t.hasOwnProperty("defaultValue")&&_b(e,t.type,ha(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function NE(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function _b(e,t,n){(t!=="number"||Mh(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Dc=Array.isArray;function Su(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Mp.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function af(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Kc={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},aH=["Webkit","ms","Moz","O"];Object.keys(Kc).forEach(function(e){aH.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Kc[t]=Kc[e]})});function eN(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Kc.hasOwnProperty(e)&&Kc[e]?(""+t).trim():t+"px"}function tN(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=eN(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var sH=Mt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Eb(e,t){if(t){if(sH[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(le(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(le(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(le(61))}if(t.style!=null&&typeof t.style!="object")throw Error(le(62))}}function Ab(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Cb=null;function x1(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Tb=null,_u=null,Ou=null;function kE(e){if(e=md(e)){if(typeof Tb!="function")throw Error(le(280));var t=e.stateNode;t&&(t=vm(t),Tb(e.stateNode,e.type,t))}}function nN(e){_u?Ou?Ou.push(e):Ou=[e]:_u=e}function rN(){if(_u){var e=_u,t=Ou;if(Ou=_u=null,kE(e),t)for(e=0;e>>=0,e===0?32:31-(yH(e)/bH|0)|0}var $p=64,Rp=4194304;function Lc(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Ih(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var u=a&~i;u!==0?r=Lc(u):(o&=a,o!==0&&(r=Lc(o)))}else a=n&~i,a!==0?r=Lc(a):o!==0&&(r=Lc(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function hd(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ii(t),e[t]=n}function _H(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=qc),KE=" ",GE=!1;function _N(e,t){switch(e){case"keyup":return QH.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ON(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var lu=!1;function JH(e,t){switch(e){case"compositionend":return ON(t);case"keypress":return t.which!==32?null:(GE=!0,KE);case"textInput":return e=t.data,e===KE&&GE?null:e;default:return null}}function eK(e,t){if(lu)return e==="compositionend"||!T1&&_N(e,t)?(e=xN(),hh=E1=ta=null,lu=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=YE(n)}}function CN(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?CN(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function TN(){for(var e=window,t=Mh();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Mh(e.document)}return t}function M1(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function lK(e){var t=TN(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&CN(n.ownerDocument.documentElement,n)){if(r!==null&&M1(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=QE(n,o);var a=QE(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,cu=null,jb=null,Xc=null,kb=!1;function ZE(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;kb||cu==null||cu!==Mh(r)||(r=cu,"selectionStart"in r&&M1(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Xc&&df(Xc,r)||(Xc=r,r=Dh(jb,"onSelect"),0pu||(e.current=zb[pu],zb[pu]=null,pu--)}function mt(e,t){pu++,zb[pu]=e.current,e.current=t}var va={},wn=xa(va),Wn=xa(!1),ms=va;function Yu(e,t){var n=e.type.contextTypes;if(!n)return va;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Hn(e){return e=e.childContextTypes,e!=null}function Fh(){St(Wn),St(wn)}function oA(e,t,n){if(wn.current!==va)throw Error(le(168));mt(wn,t),mt(Wn,n)}function LN(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(le(108,iH(e)||"Unknown",i));return Mt({},n,r)}function Bh(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||va,ms=wn.current,mt(wn,e),mt(Wn,Wn.current),!0}function aA(e,t,n){var r=e.stateNode;if(!r)throw Error(le(169));n?(e=LN(e,t,ms),r.__reactInternalMemoizedMergedChildContext=e,St(Wn),St(wn),mt(wn,e)):St(Wn),mt(Wn,n)}var Yi=null,mm=!1,m0=!1;function FN(e){Yi===null?Yi=[e]:Yi.push(e)}function xK(e){mm=!0,FN(e)}function Sa(){if(!m0&&Yi!==null){m0=!0;var e=0,t=at;try{var n=Yi;for(at=1;e>=a,i-=a,Ji=1<<32-ii(t)+i|n<R?(I=T,T=null):I=T.sibling;var B=h(b,T,S[R],P);if(B===null){T===null&&(T=I);break}e&&T&&B.alternate===null&&t(b,T),x=o(B,x,R),E===null?O=B:E.sibling=B,E=B,T=I}if(R===S.length)return n(b,T),Ot&&za(b,R),O;if(T===null){for(;RR?(I=T,T=null):I=T.sibling;var k=h(b,T,B.value,P);if(k===null){T===null&&(T=I);break}e&&T&&k.alternate===null&&t(b,T),x=o(k,x,R),E===null?O=k:E.sibling=k,E=k,T=I}if(B.done)return n(b,T),Ot&&za(b,R),O;if(T===null){for(;!B.done;R++,B=S.next())B=d(b,B.value,P),B!==null&&(x=o(B,x,R),E===null?O=B:E.sibling=B,E=B);return Ot&&za(b,R),O}for(T=r(b,T);!B.done;R++,B=S.next())B=m(T,b,R,B.value,P),B!==null&&(e&&B.alternate!==null&&T.delete(B.key===null?R:B.key),x=o(B,x,R),E===null?O=B:E.sibling=B,E=B);return e&&T.forEach(function(U){return t(b,U)}),Ot&&za(b,R),O}function w(b,x,S,P){if(typeof S=="object"&&S!==null&&S.type===uu&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case Cp:e:{for(var O=S.key,E=x;E!==null;){if(E.key===O){if(O=S.type,O===uu){if(E.tag===7){n(b,E.sibling),x=i(E,S.props.children),x.return=b,b=x;break e}}else if(E.elementType===O||typeof O=="object"&&O!==null&&O.$$typeof===Bo&&lA(O)===E.type){n(b,E.sibling),x=i(E,S.props),x.ref=wc(b,E,S),x.return=b,b=x;break e}n(b,E);break}else t(b,E);E=E.sibling}S.type===uu?(x=cs(S.props.children,b.mode,P,S.key),x.return=b,b=x):(P=Sh(S.type,S.key,S.props,null,b.mode,P),P.ref=wc(b,x,S),P.return=b,b=P)}return a(b);case su:e:{for(E=S.key;x!==null;){if(x.key===E)if(x.tag===4&&x.stateNode.containerInfo===S.containerInfo&&x.stateNode.implementation===S.implementation){n(b,x.sibling),x=i(x,S.children||[]),x.return=b,b=x;break e}else{n(b,x);break}else t(b,x);x=x.sibling}x=O0(S,b.mode,P),x.return=b,b=x}return a(b);case Bo:return E=S._init,w(b,x,E(S._payload),P)}if(Dc(S))return y(b,x,S,P);if(vc(S))return g(b,x,S,P);Fp(b,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,x!==null&&x.tag===6?(n(b,x.sibling),x=i(x,S),x.return=b,b=x):(n(b,x),x=_0(S,b.mode,P),x.return=b,b=x),a(b)):n(b,x)}return w}var Zu=WN(!0),HN=WN(!1),Wh=xa(null),Hh=null,mu=null,I1=null;function j1(){I1=mu=Hh=null}function k1(e){var t=Wh.current;St(Wh),e._currentValue=t}function Kb(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Eu(e,t){Hh=e,I1=mu=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Un=!0),e.firstContext=null)}function Dr(e){var t=e._currentValue;if(I1!==e)if(e={context:e,memoizedValue:t,next:null},mu===null){if(Hh===null)throw Error(le(308));mu=e,Hh.dependencies={lanes:0,firstContext:e}}else mu=mu.next=e;return t}var Xa=null;function D1(e){Xa===null?Xa=[e]:Xa.push(e)}function KN(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,D1(t)):(n.next=i.next,i.next=n),t.interleaved=n,fo(e,r)}function fo(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Uo=!1;function L1(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function GN(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function io(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ua(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Xe&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,fo(e,n)}return i=r.interleaved,i===null?(t.next=t,D1(r)):(t.next=i.next,i.next=t),r.interleaved=t,fo(e,n)}function mh(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,_1(e,n)}}function cA(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=a:o=o.next=a,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Kh(e,t,n,r){var i=e.updateQueue;Uo=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,u=i.shared.pending;if(u!==null){i.shared.pending=null;var l=u,f=l.next;l.next=null,a===null?o=f:a.next=f,a=l;var p=e.alternate;p!==null&&(p=p.updateQueue,u=p.lastBaseUpdate,u!==a&&(u===null?p.firstBaseUpdate=f:u.next=f,p.lastBaseUpdate=l))}if(o!==null){var d=i.baseState;a=0,p=f=l=null,u=o;do{var h=u.lane,m=u.eventTime;if((r&h)===h){p!==null&&(p=p.next={eventTime:m,lane:0,tag:u.tag,payload:u.payload,callback:u.callback,next:null});e:{var y=e,g=u;switch(h=t,m=n,g.tag){case 1:if(y=g.payload,typeof y=="function"){d=y.call(m,d,h);break e}d=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=g.payload,h=typeof y=="function"?y.call(m,d,h):y,h==null)break e;d=Mt({},d,h);break e;case 2:Uo=!0}}u.callback!==null&&u.lane!==0&&(e.flags|=64,h=i.effects,h===null?i.effects=[u]:h.push(u))}else m={eventTime:m,lane:h,tag:u.tag,payload:u.payload,callback:u.callback,next:null},p===null?(f=p=m,l=d):p=p.next=m,a|=h;if(u=u.next,u===null){if(u=i.shared.pending,u===null)break;h=u,u=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(p===null&&(l=d),i.baseState=l,i.firstBaseUpdate=f,i.lastBaseUpdate=p,t=i.shared.interleaved,t!==null){i=t;do a|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);bs|=a,e.lanes=a,e.memoizedState=d}}function fA(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=y0.transition;y0.transition={};try{e(!1),t()}finally{at=n,y0.transition=r}}function lI(){return Lr().memoizedState}function PK(e,t,n){var r=ca(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},cI(e))fI(t,n);else if(n=KN(e,t,n,r),n!==null){var i=Tn();oi(n,e,r,i),dI(n,t,r)}}function EK(e,t,n){var r=ca(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(cI(e))fI(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,u=o(a,n);if(i.hasEagerState=!0,i.eagerState=u,si(u,a)){var l=t.interleaved;l===null?(i.next=i,D1(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=KN(e,t,i,r),n!==null&&(i=Tn(),oi(n,e,r,i),dI(n,t,r))}}function cI(e){var t=e.alternate;return e===Tt||t!==null&&t===Tt}function fI(e,t){Yc=qh=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function dI(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,_1(e,n)}}var Vh={readContext:Dr,useCallback:pn,useContext:pn,useEffect:pn,useImperativeHandle:pn,useInsertionEffect:pn,useLayoutEffect:pn,useMemo:pn,useReducer:pn,useRef:pn,useState:pn,useDebugValue:pn,useDeferredValue:pn,useTransition:pn,useMutableSource:pn,useSyncExternalStore:pn,useId:pn,unstable_isNewReconciler:!1},AK={readContext:Dr,useCallback:function(e,t){return yi().memoizedState=[e,t===void 0?null:t],e},useContext:Dr,useEffect:pA,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,yh(4194308,4,iI.bind(null,t,e),n)},useLayoutEffect:function(e,t){return yh(4194308,4,e,t)},useInsertionEffect:function(e,t){return yh(4,2,e,t)},useMemo:function(e,t){var n=yi();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=yi();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=PK.bind(null,Tt,e),[r.memoizedState,e]},useRef:function(e){var t=yi();return e={current:e},t.memoizedState=e},useState:dA,useDebugValue:G1,useDeferredValue:function(e){return yi().memoizedState=e},useTransition:function(){var e=dA(!1),t=e[0];return e=OK.bind(null,e[1]),yi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Tt,i=yi();if(Ot){if(n===void 0)throw Error(le(407));n=n()}else{if(n=t(),tn===null)throw Error(le(349));ys&30||YN(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,pA(ZN.bind(null,r,o,e),[e]),r.flags|=2048,wf(9,QN.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=yi(),t=tn.identifierPrefix;if(Ot){var n=eo,r=Ji;n=(r&~(1<<32-ii(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=yf++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[Oi]=t,e[vf]=r,SI(e,t,!1,!1),t.stateNode=e;e:{switch(a=Ab(n,r),n){case"dialog":bt("cancel",e),bt("close",e),i=r;break;case"iframe":case"object":case"embed":bt("load",e),i=r;break;case"video":case"audio":for(i=0;itl&&(t.flags|=128,r=!0,xc(o,!1),t.lanes=4194304)}else{if(!r)if(e=Gh(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),xc(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!Ot)return hn(t),null}else 2*Dt()-o.renderingStartTime>tl&&n!==1073741824&&(t.flags|=128,r=!0,xc(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Dt(),t.sibling=null,n=Ct.current,mt(Ct,r?n&1|2:n&1),t):(hn(t),null);case 22:case 23:return Z1(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ar&1073741824&&(hn(t),t.subtreeFlags&6&&(t.flags|=8192)):hn(t),null;case 24:return null;case 25:return null}throw Error(le(156,t.tag))}function jK(e,t){switch(R1(t),t.tag){case 1:return Hn(t.type)&&Fh(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ju(),St(Wn),St(wn),U1(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return B1(t),null;case 13:if(St(Ct),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(le(340));Qu()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return St(Ct),null;case 4:return Ju(),null;case 10:return k1(t.type._context),null;case 22:case 23:return Z1(),null;case 24:return null;default:return null}}var Up=!1,gn=!1,kK=typeof WeakSet=="function"?WeakSet:Set,ge=null;function gu(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Nt(e,t,r)}else n.current=null}function ew(e,t,n){try{n()}catch(r){Nt(e,t,r)}}var OA=!1;function DK(e,t){if(Db=jh,e=TN(),M1(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,u=-1,l=-1,f=0,p=0,d=e,h=null;t:for(;;){for(var m;d!==n||i!==0&&d.nodeType!==3||(u=a+i),d!==o||r!==0&&d.nodeType!==3||(l=a+r),d.nodeType===3&&(a+=d.nodeValue.length),(m=d.firstChild)!==null;)h=d,d=m;for(;;){if(d===e)break t;if(h===n&&++f===i&&(u=a),h===o&&++p===r&&(l=a),(m=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=m}n=u===-1||l===-1?null:{start:u,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Lb={focusedElem:e,selectionRange:n},jh=!1,ge=t;ge!==null;)if(t=ge,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ge=e;else for(;ge!==null;){t=ge;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var g=y.memoizedProps,w=y.memoizedState,b=t.stateNode,x=b.getSnapshotBeforeUpdate(t.elementType===t.type?g:Yr(t.type,g),w);b.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var S=t.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(le(163))}}catch(P){Nt(t,t.return,P)}if(e=t.sibling,e!==null){e.return=t.return,ge=e;break}ge=t.return}return y=OA,OA=!1,y}function Qc(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&ew(t,n,o)}i=i.next}while(i!==r)}}function bm(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function tw(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function PI(e){var t=e.alternate;t!==null&&(e.alternate=null,PI(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Oi],delete t[vf],delete t[Ub],delete t[bK],delete t[wK])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function EI(e){return e.tag===5||e.tag===3||e.tag===4}function PA(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||EI(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function nw(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Lh));else if(r!==4&&(e=e.child,e!==null))for(nw(e,t,n),e=e.sibling;e!==null;)nw(e,t,n),e=e.sibling}function rw(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(rw(e,t,n),e=e.sibling;e!==null;)rw(e,t,n),e=e.sibling}var sn=null,Zr=!1;function Io(e,t,n){for(n=n.child;n!==null;)AI(e,t,n),n=n.sibling}function AI(e,t,n){if(Ai&&typeof Ai.onCommitFiberUnmount=="function")try{Ai.onCommitFiberUnmount(fm,n)}catch{}switch(n.tag){case 5:gn||gu(n,t);case 6:var r=sn,i=Zr;sn=null,Io(e,t,n),sn=r,Zr=i,sn!==null&&(Zr?(e=sn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):sn.removeChild(n.stateNode));break;case 18:sn!==null&&(Zr?(e=sn,n=n.stateNode,e.nodeType===8?v0(e.parentNode,n):e.nodeType===1&&v0(e,n),cf(e)):v0(sn,n.stateNode));break;case 4:r=sn,i=Zr,sn=n.stateNode.containerInfo,Zr=!0,Io(e,t,n),sn=r,Zr=i;break;case 0:case 11:case 14:case 15:if(!gn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&ew(n,t,a),i=i.next}while(i!==r)}Io(e,t,n);break;case 1:if(!gn&&(gu(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){Nt(n,t,u)}Io(e,t,n);break;case 21:Io(e,t,n);break;case 22:n.mode&1?(gn=(r=gn)||n.memoizedState!==null,Io(e,t,n),gn=r):Io(e,t,n);break;default:Io(e,t,n)}}function EA(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new kK),t.forEach(function(r){var i=GK.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function qr(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Dt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*FK(r/1960))-r,10e?16:e,na===null)var r=!1;else{if(e=na,na=null,Qh=0,Xe&6)throw Error(le(331));var i=Xe;for(Xe|=4,ge=e.current;ge!==null;){var o=ge,a=o.child;if(ge.flags&16){var u=o.deletions;if(u!==null){for(var l=0;lDt()-Y1?ls(e,0):X1|=n),Kn(e,t)}function jI(e,t){t===0&&(e.mode&1?(t=Rp,Rp<<=1,!(Rp&130023424)&&(Rp=4194304)):t=1);var n=Tn();e=fo(e,t),e!==null&&(hd(e,t,n),Kn(e,n))}function KK(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),jI(e,n)}function GK(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(le(314))}r!==null&&r.delete(t),jI(e,n)}var kI;kI=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Wn.current)Un=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Un=!1,NK(e,t,n);Un=!!(e.flags&131072)}else Un=!1,Ot&&t.flags&1048576&&BN(t,zh,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;bh(e,t),e=t.pendingProps;var i=Yu(t,wn.current);Eu(t,n),i=W1(null,t,r,e,i,n);var o=H1();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Hn(r)?(o=!0,Bh(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,L1(t),i.updater=ym,t.stateNode=i,i._reactInternals=t,qb(t,r,e,n),t=Yb(null,t,r,!0,o,n)):(t.tag=0,Ot&&o&&$1(t),An(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(bh(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=VK(r),e=Yr(r,e),i){case 0:t=Xb(null,t,r,e,n);break e;case 1:t=xA(null,t,r,e,n);break e;case 11:t=bA(null,t,r,e,n);break e;case 14:t=wA(null,t,r,Yr(r.type,e),n);break e}throw Error(le(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Yr(r,i),Xb(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Yr(r,i),xA(e,t,r,i,n);case 3:e:{if(bI(t),e===null)throw Error(le(387));r=t.pendingProps,o=t.memoizedState,i=o.element,GN(e,t),Kh(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=el(Error(le(423)),t),t=SA(e,t,r,n,i);break e}else if(r!==i){i=el(Error(le(424)),t),t=SA(e,t,r,n,i);break e}else for(cr=sa(t.stateNode.containerInfo.firstChild),fr=t,Ot=!0,ei=null,n=HN(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Qu(),r===i){t=po(e,t,n);break e}An(e,t,r,n)}t=t.child}return t;case 5:return qN(t),e===null&&Hb(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,Fb(r,i)?a=null:o!==null&&Fb(r,o)&&(t.flags|=32),yI(e,t),An(e,t,a,n),t.child;case 6:return e===null&&Hb(t),null;case 13:return wI(e,t,n);case 4:return F1(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Zu(t,null,r,n):An(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Yr(r,i),bA(e,t,r,i,n);case 7:return An(e,t,t.pendingProps,n),t.child;case 8:return An(e,t,t.pendingProps.children,n),t.child;case 12:return An(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,mt(Wh,r._currentValue),r._currentValue=a,o!==null)if(si(o.value,a)){if(o.children===i.children&&!Wn.current){t=po(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var u=o.dependencies;if(u!==null){a=o.child;for(var l=u.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=io(-1,n&-n),l.tag=2;var f=o.updateQueue;if(f!==null){f=f.shared;var p=f.pending;p===null?l.next=l:(l.next=p.next,p.next=l),f.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),Kb(o.return,n,t),u.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(le(341));a.lanes|=n,u=a.alternate,u!==null&&(u.lanes|=n),Kb(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}An(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Eu(t,n),i=Dr(i),r=r(i),t.flags|=1,An(e,t,r,n),t.child;case 14:return r=t.type,i=Yr(r,t.pendingProps),i=Yr(r.type,i),wA(e,t,r,i,n);case 15:return mI(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Yr(r,i),bh(e,t),t.tag=1,Hn(r)?(e=!0,Bh(t)):e=!1,Eu(t,n),pI(t,r,i),qb(t,r,i,n),Yb(null,t,r,!0,e,n);case 19:return xI(e,t,n);case 22:return gI(e,t,n)}throw Error(le(156,t.tag))};function DI(e,t){return cN(e,t)}function qK(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Rr(e,t,n,r){return new qK(e,t,n,r)}function eS(e){return e=e.prototype,!(!e||!e.isReactComponent)}function VK(e){if(typeof e=="function")return eS(e)?1:0;if(e!=null){if(e=e.$$typeof,e===b1)return 11;if(e===w1)return 14}return 2}function fa(e,t){var n=e.alternate;return n===null?(n=Rr(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Sh(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")eS(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case uu:return cs(n.children,i,o,t);case y1:a=8,i|=8;break;case gb:return e=Rr(12,n,t,i|2),e.elementType=gb,e.lanes=o,e;case yb:return e=Rr(13,n,t,i),e.elementType=yb,e.lanes=o,e;case bb:return e=Rr(19,n,t,i),e.elementType=bb,e.lanes=o,e;case qR:return xm(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case KR:a=10;break e;case GR:a=9;break e;case b1:a=11;break e;case w1:a=14;break e;case Bo:a=16,r=null;break e}throw Error(le(130,e==null?e:typeof e,""))}return t=Rr(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function cs(e,t,n,r){return e=Rr(7,e,r,t),e.lanes=n,e}function xm(e,t,n,r){return e=Rr(22,e,r,t),e.elementType=qR,e.lanes=n,e.stateNode={isHidden:!1},e}function _0(e,t,n){return e=Rr(6,e,null,t),e.lanes=n,e}function O0(e,t,n){return t=Rr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function XK(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=i0(0),this.expirationTimes=i0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=i0(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function tS(e,t,n,r,i,o,a,u,l){return e=new XK(e,t,n,u,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Rr(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},L1(o),e}function YK(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(UI)}catch(e){console.error(e)}}UI(),UR.exports=vr;var Ml=UR.exports;const t9=lt(Ml);var zI,IA=Ml;zI=IA.createRoot,IA.hydrateRoot;function WI(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-1}var eq=JG,tq=Am;function nq(e,t){var n=this.__data__,r=tq(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var rq=nq,iq=BG,oq=VG,aq=QG,sq=eq,uq=rq;function Il(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t0?1:-1},Qa=function(t){return bd(t)&&t.indexOf("%")===t.length-1},ce=function(t){return MV(t)&&!wd(t)},Xt=function(t){return ce(t)||bd(t)},IV=0,Um=function(t){var n=++IV;return"".concat(t||"").concat(n)},xs=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(!ce(t)&&!bd(t))return r;var o;if(Qa(t)){var a=t.indexOf("%");o=n*parseFloat(t.slice(0,a))/100}else o=+t;return wd(o)&&(o=r),i&&o>n&&(o=n),o},Ko=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},jV=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 UV(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 GA={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"},oo=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},qA=null,A0=null,mS=function e(t){if(t===qA&&Array.isArray(A0))return A0;var n=[];return A.Children.forEach(t,function(r){rt(r)||(PV.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),A0=n,qA=t,n};function ai(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return oo(i)}):r=[oo(t)],mS(e).forEach(function(i){var o=jr(i,"type.displayName")||jr(i,"type.name");r.indexOf(o)!==-1&&n.push(i)}),n}function sr(e,t){var n=ai(e,t);return n&&n[0]}var VA=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!ce(r)||r<=0||!ce(i)||i<=0)},zV=["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"],WV=function(t){return t&&t.type&&bd(t.type)&&zV.indexOf(t.type)>=0},HV=function(t,n,r,i){var o,a=(o=E0==null?void 0:E0[i])!==null&&o!==void 0?o:[];return!Ge(t)&&(i&&a.includes(n)||DV.includes(n))||r&&vS.includes(n)},Je=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(A.isValidElement(t)&&(i=t.props),!Rl(i))return null;var o={};return Object.keys(i).forEach(function(a){var u;HV((u=i)===null||u===void 0?void 0:u[a],a,n,r)&&(o[a]=i[a])}),o},cw=function e(t,n){if(t===n)return!0;var r=A.Children.count(t);if(r!==A.Children.count(n))return!1;if(r===0)return!0;if(r===1)return XA(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 XV(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 dw(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,o=e.className,a=e.style,u=e.title,l=e.desc,f=VV(e,qV),p=i||{width:n,height:r,x:0,y:0},d=et("recharts-surface",o);return W.createElement("svg",fw({},Je(f,!0,"svg"),{className:d,width:n,height:r,style:a,viewBox:"".concat(p.x," ").concat(p.y," ").concat(p.width," ").concat(p.height)}),W.createElement("title",null,u),W.createElement("desc",null,l),t)}var YV=["children","className"];function pw(){return pw=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 ZV(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 en=W.forwardRef(function(e,t){var n=e.children,r=e.className,i=QV(e,YV),o=et("recharts-layer",r);return W.createElement("g",pw({className:o},Je(i,!0),{ref:t}),n)}),ao=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;oi?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r=r?e:t7(e,t,n)}var r7=n7,i7="\\ud800-\\udfff",o7="\\u0300-\\u036f",a7="\\ufe20-\\ufe2f",s7="\\u20d0-\\u20ff",u7=o7+a7+s7,l7="\\ufe0e\\ufe0f",c7="\\u200d",f7=RegExp("["+c7+i7+u7+l7+"]");function d7(e){return f7.test(e)}var n2=d7;function p7(e){return e.split("")}var h7=p7,r2="\\ud800-\\udfff",v7="\\u0300-\\u036f",m7="\\ufe20-\\ufe2f",g7="\\u20d0-\\u20ff",y7=v7+m7+g7,b7="\\ufe0e\\ufe0f",w7="["+r2+"]",hw="["+y7+"]",vw="\\ud83c[\\udffb-\\udfff]",x7="(?:"+hw+"|"+vw+")",i2="[^"+r2+"]",o2="(?:\\ud83c[\\udde6-\\uddff]){2}",a2="[\\ud800-\\udbff][\\udc00-\\udfff]",S7="\\u200d",s2=x7+"?",u2="["+b7+"]?",_7="(?:"+S7+"(?:"+[i2,o2,a2].join("|")+")"+u2+s2+")*",O7=u2+s2+_7,P7="(?:"+[i2+hw+"?",hw,o2,a2,w7].join("|")+")",E7=RegExp(vw+"(?="+vw+")|"+P7+O7,"g");function A7(e){return e.match(E7)||[]}var C7=A7,T7=h7,M7=n2,$7=C7;function R7(e){return M7(e)?$7(e):T7(e)}var N7=R7,I7=r7,j7=n2,k7=N7,D7=YI;function L7(e){return function(t){t=D7(t);var n=j7(t)?k7(t):void 0,r=n?n[0]:t.charAt(0),i=n?I7(n,1).join(""):t.slice(1);return r[e]()+i}}var F7=L7,B7=F7,U7=B7("toUpperCase"),z7=U7;const zm=lt(z7);function vt(e){return function(){return e}}const l2=Math.cos,nv=Math.sin,ci=Math.sqrt,rv=Math.PI,Wm=2*rv,mw=Math.PI,gw=2*mw,Ha=1e-6,W7=gw-Ha;function c2(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return c2;const n=10**t;return function(r){this._+=r[0];for(let i=1,o=r.length;iHa)if(!(Math.abs(d*l-f*p)>Ha)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let m=r-a,y=i-u,g=l*l+f*f,w=m*m+y*y,b=Math.sqrt(g),x=Math.sqrt(h),S=o*Math.tan((mw-Math.acos((g+h-w)/(2*b*x)))/2),P=S/x,O=S/b;Math.abs(P-1)>Ha&&this._append`L${t+P*p},${n+P*d}`,this._append`A${o},${o},0,0,${+(d*m>p*y)},${this._x1=t+O*l},${this._y1=n+O*f}`}}arc(t,n,r,i,o,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let u=r*Math.cos(i),l=r*Math.sin(i),f=t+u,p=n+l,d=1^a,h=a?i-o:o-i;this._x1===null?this._append`M${f},${p}`:(Math.abs(this._x1-f)>Ha||Math.abs(this._y1-p)>Ha)&&this._append`L${f},${p}`,r&&(h<0&&(h=h%gw+gw),h>W7?this._append`A${r},${r},0,1,${d},${t-u},${n-l}A${r},${r},0,1,${d},${this._x1=f},${this._y1=p}`:h>Ha&&this._append`A${r},${r},0,${+(h>=mw)},${d},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function gS(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 K7(t)}function yS(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function f2(e){this._context=e}f2.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 Hm(e){return new f2(e)}function d2(e){return e[0]}function p2(e){return e[1]}function h2(e,t){var n=vt(!0),r=null,i=Hm,o=null,a=gS(u);e=typeof e=="function"?e:e===void 0?d2:vt(e),t=typeof t=="function"?t:t===void 0?p2:vt(t);function u(l){var f,p=(l=yS(l)).length,d,h=!1,m;for(r==null&&(o=i(m=a())),f=0;f<=p;++f)!(f=m;--y)u.point(S[y],P[y]);u.lineEnd(),u.areaEnd()}b&&(S[h]=+e(w,h,d),P[h]=+t(w,h,d),u.point(r?+r(w,h,d):S[h],n?+n(w,h,d):P[h]))}if(x)return u=null,x+""||null}function p(){return h2().defined(i).curve(a).context(o)}return f.x=function(d){return arguments.length?(e=typeof d=="function"?d:vt(+d),r=null,f):e},f.x0=function(d){return arguments.length?(e=typeof d=="function"?d:vt(+d),f):e},f.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:vt(+d),f):r},f.y=function(d){return arguments.length?(t=typeof d=="function"?d:vt(+d),n=null,f):t},f.y0=function(d){return arguments.length?(t=typeof d=="function"?d:vt(+d),f):t},f.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:vt(+d),f):n},f.lineX0=f.lineY0=function(){return p().x(e).y(t)},f.lineY1=function(){return p().x(e).y(n)},f.lineX1=function(){return p().x(r).y(t)},f.defined=function(d){return arguments.length?(i=typeof d=="function"?d:vt(!!d),f):i},f.curve=function(d){return arguments.length?(a=d,o!=null&&(u=a(o)),f):a},f.context=function(d){return arguments.length?(d==null?o=u=null:u=a(o=d),f):o},f}class v2{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 G7(e){return new v2(e,!0)}function q7(e){return new v2(e,!1)}const bS={draw(e,t){const n=ci(t/rv);e.moveTo(n,0),e.arc(0,0,n,0,Wm)}},V7={draw(e,t){const n=ci(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()}},m2=ci(1/3),X7=m2*2,Y7={draw(e,t){const n=ci(t/X7),r=n*m2;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Q7={draw(e,t){const n=ci(t),r=-n/2;e.rect(r,r,n,n)}},Z7=.8908130915292852,g2=nv(rv/10)/nv(7*rv/10),J7=nv(Wm/10)*g2,eX=-l2(Wm/10)*g2,tX={draw(e,t){const n=ci(t*Z7),r=J7*n,i=eX*n;e.moveTo(0,-n),e.lineTo(r,i);for(let o=1;o<5;++o){const a=Wm*o/5,u=l2(a),l=nv(a);e.lineTo(l*n,-u*n),e.lineTo(u*r-l*i,l*r+u*i)}e.closePath()}},C0=ci(3),nX={draw(e,t){const n=-ci(t/(C0*3));e.moveTo(0,n*2),e.lineTo(-C0*n,-n),e.lineTo(C0*n,-n),e.closePath()}},Pr=-.5,Er=ci(3)/2,yw=1/ci(12),rX=(yw/2+1)*3,iX={draw(e,t){const n=ci(t/rX),r=n/2,i=n*yw,o=r,a=n*yw+n,u=-o,l=a;e.moveTo(r,i),e.lineTo(o,a),e.lineTo(u,l),e.lineTo(Pr*r-Er*i,Er*r+Pr*i),e.lineTo(Pr*o-Er*a,Er*o+Pr*a),e.lineTo(Pr*u-Er*l,Er*u+Pr*l),e.lineTo(Pr*r+Er*i,Pr*i-Er*r),e.lineTo(Pr*o+Er*a,Pr*a-Er*o),e.lineTo(Pr*u+Er*l,Pr*l-Er*u),e.closePath()}};function oX(e,t){let n=null,r=gS(i);e=typeof e=="function"?e:vt(e||bS),t=typeof t=="function"?t:vt(t===void 0?64:+t);function i(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:vt(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:vt(+o),i):t},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function iv(){}function ov(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 y2(e){this._context=e}y2.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:ov(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:ov(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function aX(e){return new y2(e)}function b2(e){this._context=e}b2.prototype={areaStart:iv,areaEnd:iv,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:ov(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function sX(e){return new b2(e)}function w2(e){this._context=e}w2.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:ov(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function uX(e){return new w2(e)}function x2(e){this._context=e}x2.prototype={areaStart:iv,areaEnd:iv,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 lX(e){return new x2(e)}function QA(e){return e<0?-1:1}function ZA(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),u=(o*i+a*r)/(r+i);return(QA(o)+QA(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(u))||0}function JA(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function T0(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,u=(o-r)/3;e._context.bezierCurveTo(r+u,i+u*t,o-u,a-u*n,o,a)}function av(e){this._context=e}av.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:T0(this,this._t0,JA(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,T0(this,JA(this,n=ZA(this,e,t)),n);break;default:T0(this,this._t0,n=ZA(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function S2(e){this._context=new _2(e)}(S2.prototype=Object.create(av.prototype)).point=function(e,t){av.prototype.point.call(this,t,e)};function _2(e){this._context=e}_2.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}};function cX(e){return new av(e)}function fX(e){return new S2(e)}function O2(e){this._context=e}O2.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=eC(e),i=eC(t),o=0,a=1;a=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[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 pX(e){return new Km(e,.5)}function hX(e){return new Km(e,0)}function vX(e){return new Km(e,1)}function nl(e,t){if((a=e.length)>1)for(var n=1,r,i,o=e[t[0]],a,u=o.length;n=0;)n[t]=t;return n}function mX(e,t){return e[t]}function gX(e){const t=[];return t.key=e,t}function yX(){var e=vt([]),t=bw,n=nl,r=mX;function i(o){var a=Array.from(e.apply(this,arguments),gX),u,l=a.length,f=-1,p;for(const d of o)for(u=0,++f;u0){for(var n,r,i=0,o=e[0].length,a;i0){for(var n=0,r=e[t[0]],i,o=r.length;n0)||!((o=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,o,a;r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function AX(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 P2={symbolCircle:bS,symbolCross:V7,symbolDiamond:Y7,symbolSquare:Q7,symbolStar:tX,symbolTriangle:nX,symbolWye:iX},CX=Math.PI/180,TX=function(t){var n="symbol".concat(zm(t));return P2[n]||bS},MX=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*CX;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}},$X=function(t,n){P2["symbol".concat(zm(t))]=n},wS=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,o=i===void 0?64:i,a=t.sizeType,u=a===void 0?"area":a,l=EX(t,SX),f=nC(nC({},l),{},{type:r,size:o,sizeType:u}),p=function(){var w=TX(r),b=oX().type(w).size(MX(o,u,r));return b()},d=f.className,h=f.cx,m=f.cy,y=Je(f,!0);return h===+h&&m===+m&&o===+o?W.createElement("path",ww({},y,{className:et("recharts-symbols",d),transform:"translate(".concat(h,", ").concat(m,")"),d:p()})):null};wS.registerSymbol=$X;function rl(e){"@babel/helpers - typeof";return rl=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},rl(e)}function xw(){return xw=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var x=m.inactive?f:m.color;return W.createElement("li",xw({className:w,style:d,key:"legend-item-".concat(y)},tv(r.props,m,y)),W.createElement(dw,{width:a,height:a,viewBox:p,style:h},r.renderIcon(m)),W.createElement("span",{className:"recharts-legend-item-text",style:{color:x}},g?g(b,m,y):b))})}},{key:"render",value:function(){var r=this.props,i=r.payload,o=r.layout,a=r.align;if(!i||!i.length)return null;var u={padding:0,margin:0,textAlign:o==="horizontal"?a:"left"};return W.createElement("ul",{className:"recharts-default-legend",style:u},this.renderItems())}}])}(A.PureComponent);_f(xS,"displayName","Legend");_f(xS,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var UX=Cm;function zX(){this.__data__=new UX,this.size=0}var WX=zX;function HX(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var KX=HX;function GX(e){return this.__data__.get(e)}var qX=GX;function VX(e){return this.__data__.has(e)}var XX=VX,YX=Cm,QX=uS,ZX=lS,JX=200;function eY(e,t){var n=this.__data__;if(n instanceof YX){var r=n.__data__;if(!QX||r.lengthu))return!1;var f=o.get(e),p=o.get(t);if(f&&p)return f==t&&p==e;var d=-1,h=!0,m=n&SY?new yY:void 0;for(o.set(e,t),o.set(t,e);++d-1&&e%1==0&&e-1&&e%1==0&&e<=EQ}var PS=AQ,CQ=wo,TQ=PS,MQ=xo,$Q="[object Arguments]",RQ="[object Array]",NQ="[object Boolean]",IQ="[object Date]",jQ="[object Error]",kQ="[object Function]",DQ="[object Map]",LQ="[object Number]",FQ="[object Object]",BQ="[object RegExp]",UQ="[object Set]",zQ="[object String]",WQ="[object WeakMap]",HQ="[object ArrayBuffer]",KQ="[object DataView]",GQ="[object Float32Array]",qQ="[object Float64Array]",VQ="[object Int8Array]",XQ="[object Int16Array]",YQ="[object Int32Array]",QQ="[object Uint8Array]",ZQ="[object Uint8ClampedArray]",JQ="[object Uint16Array]",eZ="[object Uint32Array]",wt={};wt[GQ]=wt[qQ]=wt[VQ]=wt[XQ]=wt[YQ]=wt[QQ]=wt[ZQ]=wt[JQ]=wt[eZ]=!0;wt[$Q]=wt[RQ]=wt[HQ]=wt[NQ]=wt[KQ]=wt[IQ]=wt[jQ]=wt[kQ]=wt[DQ]=wt[LQ]=wt[FQ]=wt[BQ]=wt[UQ]=wt[zQ]=wt[WQ]=!1;function tZ(e){return MQ(e)&&TQ(e.length)&&!!wt[CQ(e)]}var nZ=tZ;function rZ(e){return function(t){return e(t)}}var k2=rZ,cv={exports:{}};cv.exports;(function(e,t){var n=HI,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,a=o&&n.process,u=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();e.exports=u})(cv,cv.exports);var iZ=cv.exports,oZ=nZ,aZ=k2,lC=iZ,cC=lC&&lC.isTypedArray,sZ=cC?aZ(cC):oZ,D2=sZ,uZ=fQ,lZ=_S,cZ=Vn,fZ=j2,dZ=OS,pZ=D2,hZ=Object.prototype,vZ=hZ.hasOwnProperty;function mZ(e,t){var n=cZ(e),r=!n&&lZ(e),i=!n&&!r&&fZ(e),o=!n&&!r&&!i&&pZ(e),a=n||r||i||o,u=a?uZ(e.length,String):[],l=u.length;for(var f in e)(t||vZ.call(e,f))&&!(a&&(f=="length"||i&&(f=="offset"||f=="parent")||o&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||dZ(f,l)))&&u.push(f);return u}var gZ=mZ,yZ=Object.prototype;function bZ(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||yZ;return e===n}var wZ=bZ;function xZ(e,t){return function(n){return e(t(n))}}var L2=xZ,SZ=L2,_Z=SZ(Object.keys,Object),OZ=_Z,PZ=wZ,EZ=OZ,AZ=Object.prototype,CZ=AZ.hasOwnProperty;function TZ(e){if(!PZ(e))return EZ(e);var t=[];for(var n in Object(e))CZ.call(e,n)&&n!="constructor"&&t.push(n);return t}var MZ=TZ,$Z=aS,RZ=PS;function NZ(e){return e!=null&&RZ(e.length)&&!$Z(e)}var xd=NZ,IZ=gZ,jZ=MZ,kZ=xd;function DZ(e){return kZ(e)?IZ(e):jZ(e)}var Gm=DZ,LZ=JY,FZ=lQ,BZ=Gm;function UZ(e){return LZ(e,BZ,FZ)}var zZ=UZ,fC=zZ,WZ=1,HZ=Object.prototype,KZ=HZ.hasOwnProperty;function GZ(e,t,n,r,i,o){var a=n&WZ,u=fC(e),l=u.length,f=fC(t),p=f.length;if(l!=p&&!a)return!1;for(var d=l;d--;){var h=u[d];if(!(a?h in t:KZ.call(t,h)))return!1}var m=o.get(e),y=o.get(t);if(m&&y)return m==t&&y==e;var g=!0;o.set(e,t),o.set(t,e);for(var w=a;++d-1}var Hee=Wee;function Kee(e,t,n){for(var r=-1,i=e==null?0:e.length;++r=ate){var f=t?null:ite(e);if(f)return ote(f);a=!1,i=rte,l=new ete}else l=t?[]:u;e:for(;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ste(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 _te(e){return e.value}function Ote(e,t){if(W.isValidElement(e))return W.cloneElement(e,t);if(typeof e=="function")return W.createElement(e,t);t.ref;var n=xte(t,pte);return W.createElement(xS,n)}var AC=1,Tu=function(e){function t(){var n;hte(this,t);for(var r=arguments.length,i=new Array(r),o=0;oAC||Math.abs(i.height-this.lastBoundingBox.height)>AC)&&(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?Gi({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,o=i.layout,a=i.align,u=i.verticalAlign,l=i.margin,f=i.chartWidth,p=i.chartHeight,d,h;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(a==="center"&&o==="vertical"){var m=this.getBBoxSnapshot();d={left:((f||0)-m.width)/2}}else d=a==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(u==="middle"){var y=this.getBBoxSnapshot();h={top:((p||0)-y.height)/2}}else h=u==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return Gi(Gi({},d),h)}},{key:"render",value:function(){var r=this,i=this.props,o=i.content,a=i.width,u=i.height,l=i.wrapperStyle,f=i.payloadUniqBy,p=i.payload,d=Gi(Gi({position:"absolute",width:a||"auto",height:u||"auto"},this.getDefaultPosition(l)),l);return W.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(m){r.wrapperNode=m}},Ote(o,Gi(Gi({},this.props),{},{payload:K2(p,f,_te)})))}}],[{key:"getWithHeight",value:function(r,i){var o=Gi(Gi({},this.defaultProps),r.props),a=o.layout;return a==="vertical"&&ce(r.props.height)?{height:r.props.height}:a==="horizontal"?{width:r.props.width||i}:null}}])}(A.PureComponent);qm(Tu,"displayName","Legend");qm(Tu,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var CC=yd,Pte=_S,Ete=Vn,TC=CC?CC.isConcatSpreadable:void 0;function Ate(e){return Ete(e)||Pte(e)||!!(TC&&e&&e[TC])}var Cte=Ate,Tte=N2,Mte=Cte;function V2(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=Mte),i||(i=[]);++o0&&n(u)?t>1?V2(u,t-1,n,r,i):Tte(i,u):r||(i[i.length]=u)}return i}var X2=V2;function $te(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),u=a.length;u--;){var l=a[e?u:++i];if(n(o[l],l,o)===!1)break}return t}}var Rte=$te,Nte=Rte,Ite=Nte(),jte=Ite,kte=jte,Dte=Gm;function Lte(e,t){return e&&kte(e,t,Dte)}var Y2=Lte,Fte=xd;function Bte(e,t){return function(n,r){if(n==null)return n;if(!Fte(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Object(n);(t?o--:++ot||o&&a&&l&&!u&&!f||r&&a&&l||!n&&l||!i)return 1;if(!r&&!o&&!f&&e=u)return l;var f=n[r];return l*(f=="desc"?-1:1)}}return e.index-t.index}var ene=Jte,N0=fS,tne=dS,nne=Oa,rne=Q2,ine=Xte,one=k2,ane=ene,sne=Ll,une=Vn;function lne(e,t,n){t.length?t=N0(t,function(o){return une(o)?function(a){return tne(a,o.length===1?o[0]:o)}:o}):t=[sne];var r=-1;t=N0(t,one(nne));var i=rne(e,function(o,a,u){var l=N0(t,function(f){return f(o)});return{criteria:l,index:++r,value:o}});return ine(i,function(o,a){return ane(o,a,n)})}var cne=lne;function fne(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var dne=fne,pne=dne,$C=Math.max;function hne(e,t,n){return t=$C(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=$C(r.length-t,0),a=Array(o);++i0){if(++t>=One)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Cne=Ane,Tne=_ne,Mne=Cne,$ne=Mne(Tne),Rne=$ne,Nne=Ll,Ine=vne,jne=Rne;function kne(e,t){return jne(Ine(e,t,Nne),e+"")}var Dne=kne,Lne=sS,Fne=xd,Bne=OS,Une=_a;function zne(e,t,n){if(!Une(n))return!1;var r=typeof t;return(r=="number"?Fne(n)&&Bne(t,n.length):r=="string"&&t in n)?Lne(n[t],e):!1}var Vm=zne,Wne=X2,Hne=cne,Kne=Dne,NC=Vm,Gne=Kne(function(e,t){if(e==null)return[];var n=t.length;return n>1&&NC(e,t[0],t[1])?t=[]:n>2&&NC(t[0],t[1],t[2])&&(t=[t[0]]),Hne(e,Wne(t,1),[])}),qne=Gne;const CS=lt(qne);function Of(e){"@babel/helpers - typeof";return Of=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},Of(e)}function Tw(){return Tw=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t.x),"".concat(Oc,"-left"),ce(n)&&t&&ce(t.x)&&n=t.y),"".concat(Oc,"-top"),ce(r)&&t&&ce(t.y)&&rg?Math.max(p,l[r]):Math.max(d,l[r])}function ure(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 lre(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,o=e.reverseDirection,a=e.tooltipBox,u=e.useTranslate3d,l=e.viewBox,f,p,d;return a.height>0&&a.width>0&&n?(p=kC({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:a.width,viewBox:l,viewBoxDimension:l.width}),d=kC({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:a.height,viewBox:l,viewBoxDimension:l.height}),f=ure({translateX:p,translateY:d,useTranslate3d:u})):f=are,{cssProperties:f,cssClasses:sre({translateX:p,translateY:d,coordinate:n})}}function ol(e){"@babel/helpers - typeof";return ol=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},ol(e)}function DC(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 LC(e){for(var t=1;tFC||Math.abs(r.height-this.state.lastBoundingBox.height)>FC)&&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,o=i.active,a=i.allowEscapeViewBox,u=i.animationDuration,l=i.animationEasing,f=i.children,p=i.coordinate,d=i.hasPayload,h=i.isAnimationActive,m=i.offset,y=i.position,g=i.reverseDirection,w=i.useTranslate3d,b=i.viewBox,x=i.wrapperStyle,S=lre({allowEscapeViewBox:a,coordinate:p,offsetTopLeft:m,position:y,reverseDirection:g,tooltipBox:this.state.lastBoundingBox,useTranslate3d:w,viewBox:b}),P=S.cssClasses,O=S.cssProperties,E=LC(LC({transition:h&&o?"transform ".concat(u,"ms ").concat(l):void 0},O),{},{pointerEvents:"none",visibility:!this.state.dismissed&&o&&d?"visible":"hidden",position:"absolute",top:0,left:0},x);return W.createElement("div",{tabIndex:-1,className:P,style:E,ref:function(R){r.wrapperNode=R}},f)}}])}(A.PureComponent),bre=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},da={isSsr:bre(),get:function(t){return da[t]},set:function(t,n){if(typeof t=="string")da[t]=n;else{var r=Object.keys(t);r&&r.length&&r.forEach(function(i){da[i]=t[i]})}}};function al(e){"@babel/helpers - typeof";return al=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},al(e)}function BC(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 UC(e){for(var t=1;t0;return W.createElement(yre,{allowEscapeViewBox:a,animationDuration:u,animationEasing:l,isAnimationActive:h,active:o,coordinate:p,hasPayload:E,offset:m,position:w,reverseDirection:b,useTranslate3d:x,viewBox:S,wrapperStyle:P},Tre(f,UC(UC({},this.props),{},{payload:O})))}}])}(A.PureComponent);TS(bi,"displayName","Tooltip");TS(bi,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!da.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 Mre=ji,$re=function(){return Mre.Date.now()},Rre=$re,Nre=/\s/;function Ire(e){for(var t=e.length;t--&&Nre.test(e.charAt(t)););return t}var jre=Ire,kre=jre,Dre=/^\s+/;function Lre(e){return e&&e.slice(0,kre(e)+1).replace(Dre,"")}var Fre=Lre,Bre=Fre,zC=_a,Ure=$l,WC=NaN,zre=/^[-+]0x[0-9a-f]+$/i,Wre=/^0b[01]+$/i,Hre=/^0o[0-7]+$/i,Kre=parseInt;function Gre(e){if(typeof e=="number")return e;if(Ure(e))return WC;if(zC(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=zC(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Bre(e);var n=Wre.test(e);return n||Hre.test(e)?Kre(e.slice(2),n?2:8):zre.test(e)?WC:+e}var rj=Gre,qre=_a,j0=Rre,HC=rj,Vre="Expected a function",Xre=Math.max,Yre=Math.min;function Qre(e,t,n){var r,i,o,a,u,l,f=0,p=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(Vre);t=HC(t)||0,qre(n)&&(p=!!n.leading,d="maxWait"in n,o=d?Xre(HC(n.maxWait)||0,t):o,h="trailing"in n?!!n.trailing:h);function m(E){var T=r,R=i;return r=i=void 0,f=E,a=e.apply(R,T),a}function y(E){return f=E,u=setTimeout(b,t),p?m(E):a}function g(E){var T=E-l,R=E-f,I=t-T;return d?Yre(I,o-R):I}function w(E){var T=E-l,R=E-f;return l===void 0||T>=t||T<0||d&&R>=o}function b(){var E=j0();if(w(E))return x(E);u=setTimeout(b,g(E))}function x(E){return u=void 0,h&&r?m(E):(r=i=void 0,a)}function S(){u!==void 0&&clearTimeout(u),f=0,r=l=i=u=void 0}function P(){return u===void 0?a:x(j0())}function O(){var E=j0(),T=w(E);if(r=arguments,i=this,l=E,T){if(u===void 0)return y(l);if(d)return clearTimeout(u),u=setTimeout(b,t),m(l)}return u===void 0&&(u=setTimeout(b,t)),a}return O.cancel=S,O.flush=P,O}var Zre=Qre,Jre=Zre,eie=_a,tie="Expected a function";function nie(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(tie);return eie(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Jre(e,t,{leading:r,maxWait:t,trailing:i})}var rie=nie;const ij=lt(rie);function Ef(e){"@babel/helpers - typeof";return Ef=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},Ef(e)}function KC(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 qp(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(V=ij(V,g,{trailing:!0,leading:!1}));var q=new ResizeObserver(V),X=O.current.getBoundingClientRect(),G=X.width,Y=X.height;return k(G,Y),q.observe(O.current),function(){q.disconnect()}},[k,g]);var U=A.useMemo(function(){var V=I.containerWidth,q=I.containerHeight;if(V<0||q<0)return null;ao(Qa(a)||Qa(l),`The width(%s) and height(%s) are both fixed numbers, maybe you don't need to use a ResponsiveContainer.`,a,l),ao(!n||n>0,"The aspect(%s) must be greater than zero.",n);var X=Qa(a)?V:a,G=Qa(l)?q:l;n&&n>0&&(X?G=X/n:G&&(X=G*n),h&&G>h&&(G=h)),ao(X>0||G>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.`,X,G,a,l,p,d,n);var Y=!Array.isArray(m)&&oo(m.type).endsWith("Chart");return W.Children.map(m,function(F){return W.isValidElement(F)?A.cloneElement(F,qp({width:X,height:G},Y?{style:qp({height:"100%",width:"100%",maxHeight:G,maxWidth:X},F.props.style)}:{})):F})},[n,m,l,h,d,p,I,a]);return W.createElement("div",{id:w?"".concat(w):void 0,className:et("recharts-responsive-container",b),style:qp(qp({},P),{},{width:a,height:l,minWidth:p,minHeight:d,maxHeight:h}),ref:O},U)}),oj=function(t){return null};oj.displayName="Cell";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 qC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Nw(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||da.isSsr)return{width:0,height:0};var r=yie(n),i=JSON.stringify({text:t,copyStyle:r});if(tu.widthCache[i])return tu.widthCache[i];try{var o=document.getElementById(VC);o||(o=document.createElement("span"),o.setAttribute("id",VC),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var a=Nw(Nw({},gie),r);Object.assign(o.style,a),o.textContent="".concat(t);var u=o.getBoundingClientRect(),l={width:u.width,height:u.height};return tu.widthCache[i]=l,++tu.cacheCount>mie&&(tu.cacheCount=0,tu.widthCache={}),l}catch{return{width:0,height:0}}},bie=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Cf(e){"@babel/helpers - typeof";return Cf=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},Cf(e)}function hv(e,t){return _ie(e)||Sie(e,t)||xie(e,t)||wie()}function wie(){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 xie(e,t){if(e){if(typeof e=="string")return XC(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 XC(e,t)}}function XC(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 Die(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 tT(e,t){return Uie(e)||Bie(e,t)||Fie(e,t)||Lie()}function Lie(){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 Fie(e,t){if(e){if(typeof e=="string")return nT(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 nT(e,t)}}function nT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[];return X.reduce(function(G,Y){var F=Y.word,z=Y.width,ee=G[G.length-1];if(ee&&(i==null||o||ee.width+z+rY.width?G:Y})};if(!p)return m;for(var g="…",w=function(X){var G=d.slice(0,X),Y=lj({breakAll:f,style:l,children:G+g}).wordsWithComputedWidth,F=h(Y),z=F.length>a||y(F).width>Number(i);return[z,F]},b=0,x=d.length-1,S=0,P;b<=x&&S<=d.length-1;){var O=Math.floor((b+x)/2),E=O-1,T=w(E),R=tT(T,2),I=R[0],B=R[1],k=w(O),U=tT(k,1),V=U[0];if(!I&&!V&&(b=O+1),I&&V&&(x=O-1),!I&&V){P=B;break}S++}return P||m},rT=function(t){var n=rt(t)?[]:t.toString().split(uj);return[{words:n}]},Wie=function(t){var n=t.width,r=t.scaleToFit,i=t.children,o=t.style,a=t.breakAll,u=t.maxLines;if((n||r)&&!da.isSsr){var l,f,p=lj({breakAll:a,children:i,style:o});if(p){var d=p.wordsWithComputedWidth,h=p.spaceWidth;l=d,f=h}else return rT(i);return zie({breakAll:a,children:i,maxLines:u,style:o},l,f,n,r)}return rT(i)},iT="#808080",vv=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,o=i===void 0?0:i,a=t.lineHeight,u=a===void 0?"1em":a,l=t.capHeight,f=l===void 0?"0.71em":l,p=t.scaleToFit,d=p===void 0?!1:p,h=t.textAnchor,m=h===void 0?"start":h,y=t.verticalAnchor,g=y===void 0?"end":y,w=t.fill,b=w===void 0?iT:w,x=eT(t,jie),S=A.useMemo(function(){return Wie({breakAll:x.breakAll,children:x.children,maxLines:x.maxLines,scaleToFit:d,style:x.style,width:x.width})},[x.breakAll,x.children,x.maxLines,d,x.style,x.width]),P=x.dx,O=x.dy,E=x.angle,T=x.className,R=x.breakAll,I=eT(x,kie);if(!Xt(r)||!Xt(o))return null;var B=r+(ce(P)?P:0),k=o+(ce(O)?O:0),U;switch(g){case"start":U=k0("calc(".concat(f,")"));break;case"middle":U=k0("calc(".concat((S.length-1)/2," * -").concat(u," + (").concat(f," / 2))"));break;default:U=k0("calc(".concat(S.length-1," * -").concat(u,")"));break}var V=[];if(d){var q=S[0].width,X=x.width;V.push("scale(".concat((ce(X)?X/q:1)/q,")"))}return E&&V.push("rotate(".concat(E,", ").concat(B,", ").concat(k,")")),V.length&&(I.transform=V.join(" ")),W.createElement("text",Iw({},Je(I,!0),{x:B,y:k,className:et("recharts-text",T),textAnchor:m,fill:b.includes("url")?iT:b}),S.map(function(G,Y){var F=G.words.join(R?"":" ");return W.createElement("tspan",{x:B,dy:Y===0?U:u,key:"".concat(F,"-").concat(Y)},F)}))};function pa(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function Hie(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function MS(e){let t,n,r;e.length!==2?(t=pa,n=(u,l)=>pa(e(u),l),r=(u,l)=>e(u)-l):(t=e===pa||e===Hie?e:Kie,n=e,r=e);function i(u,l,f=0,p=u.length){if(f>>1;n(u[d],l)<0?f=d+1:p=d}while(f>>1;n(u[d],l)<=0?f=d+1:p=d}while(ff&&r(u[d-1],l)>-r(u[d],l)?d-1:d}return{left:i,center:a,right:o}}function Kie(){return 0}function cj(e){return e===null?NaN:+e}function*Gie(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const qie=MS(pa),Sd=qie.right;MS(cj).center;class oT extends Map{constructor(t,n=Yie){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(aT(this,t))}has(t){return super.has(aT(this,t))}set(t,n){return super.set(Vie(this,t),n)}delete(t){return super.delete(Xie(this,t))}}function aT({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function Vie({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function Xie({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function Yie(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Qie(e=pa){if(e===pa)return fj;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 fj(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const Zie=Math.sqrt(50),Jie=Math.sqrt(10),eoe=Math.sqrt(2);function mv(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=Zie?10:o>=Jie?5:o>=eoe?2:1;let u,l,f;return i<0?(f=Math.pow(10,-i)/a,u=Math.round(e*f),l=Math.round(t*f),u/ft&&--l,f=-f):(f=Math.pow(10,i)*a,u=Math.round(e/f),l=Math.round(t/f),u*ft&&--l),l0))return[];if(e===t)return[e];const r=t=i))return[];const u=o-i+1,l=new Array(u);if(r)if(a<0)for(let f=0;f=r)&&(n=r);return n}function uT(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function dj(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?fj:Qie(i);r>n;){if(r-n>600){const l=r-n+1,f=t-n+1,p=Math.log(l),d=.5*Math.exp(2*p/3),h=.5*Math.sqrt(p*d*(l-d)/l)*(f-l/2<0?-1:1),m=Math.max(n,Math.floor(t-f*d/l+h)),y=Math.min(r,Math.floor(t+(l-f)*d/l+h));dj(e,t,m,y,i)}const o=e[t];let a=n,u=r;for(Pc(e,n,t),i(e[r],o)>0&&Pc(e,n,r);a0;)--u}i(e[n],o)===0?Pc(e,n,u):(++u,Pc(e,u,r)),u<=t&&(n=u+1),t<=u&&(r=u-1)}return e}function Pc(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function toe(e,t,n){if(e=Float64Array.from(Gie(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return uT(e);if(t>=1)return sT(e);var r,i=(r-1)*t,o=Math.floor(i),a=sT(dj(e,o).subarray(0,o+1)),u=uT(e.subarray(o+1));return a+(u-a)*(i-o)}}function noe(e,t,n=cj){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),a=+n(e[o],o,e),u=+n(e[o+1],o+1,e);return a+(u-a)*(i-o)}}function roe(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Xp(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Xp(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=ooe.exec(e))?new zn(t[1],t[2],t[3],1):(t=aoe.exec(e))?new zn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=soe.exec(e))?Xp(t[1],t[2],t[3],t[4]):(t=uoe.exec(e))?Xp(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=loe.exec(e))?vT(t[1],t[2]/100,t[3]/100,1):(t=coe.exec(e))?vT(t[1],t[2]/100,t[3]/100,t[4]):lT.hasOwnProperty(e)?dT(lT[e]):e==="transparent"?new zn(NaN,NaN,NaN,0):null}function dT(e){return new zn(e>>16&255,e>>8&255,e&255,1)}function Xp(e,t,n,r){return r<=0&&(e=t=n=NaN),new zn(e,t,n,r)}function poe(e){return e instanceof _d||(e=Rf(e)),e?(e=e.rgb(),new zn(e.r,e.g,e.b,e.opacity)):new zn}function Fw(e,t,n,r){return arguments.length===1?poe(e):new zn(e,t,n,r??1)}function zn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}RS(zn,Fw,hj(_d,{brighter(e){return e=e==null?gv:Math.pow(gv,e),new zn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Mf:Math.pow(Mf,e),new zn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new zn(fs(this.r),fs(this.g),fs(this.b),yv(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:pT,formatHex:pT,formatHex8:hoe,formatRgb:hT,toString:hT}));function pT(){return`#${Za(this.r)}${Za(this.g)}${Za(this.b)}`}function hoe(){return`#${Za(this.r)}${Za(this.g)}${Za(this.b)}${Za((isNaN(this.opacity)?1:this.opacity)*255)}`}function hT(){const e=yv(this.opacity);return`${e===1?"rgb(":"rgba("}${fs(this.r)}, ${fs(this.g)}, ${fs(this.b)}${e===1?")":`, ${e})`}`}function yv(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function fs(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Za(e){return e=fs(e),(e<16?"0":"")+e.toString(16)}function vT(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ni(e,t,n,r)}function vj(e){if(e instanceof ni)return new ni(e.h,e.s,e.l,e.opacity);if(e instanceof _d||(e=Rf(e)),!e)return new ni;if(e instanceof ni)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,u=o-i,l=(o+i)/2;return u?(t===o?a=(n-r)/u+(n0&&l<1?0:a,new ni(a,u,l,e.opacity)}function voe(e,t,n,r){return arguments.length===1?vj(e):new ni(e,t,n,r??1)}function ni(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}RS(ni,voe,hj(_d,{brighter(e){return e=e==null?gv:Math.pow(gv,e),new ni(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Mf:Math.pow(Mf,e),new ni(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 zn(D0(e>=240?e-240:e+120,i,r),D0(e,i,r),D0(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new ni(mT(this.h),Yp(this.s),Yp(this.l),yv(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=yv(this.opacity);return`${e===1?"hsl(":"hsla("}${mT(this.h)}, ${Yp(this.s)*100}%, ${Yp(this.l)*100}%${e===1?")":`, ${e})`}`}}));function mT(e){return e=(e||0)%360,e<0?e+360:e}function Yp(e){return Math.max(0,Math.min(1,e||0))}function D0(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 NS=e=>()=>e;function moe(e,t){return function(n){return e+n*t}}function goe(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 yoe(e){return(e=+e)==1?mj:function(t,n){return n-t?goe(t,n,e):NS(isNaN(t)?n:t)}}function mj(e,t){var n=t-e;return n?moe(e,n):NS(isNaN(e)?t:e)}const gT=function e(t){var n=yoe(t);function r(i,o){var a=n((i=Fw(i)).r,(o=Fw(o)).r),u=n(i.g,o.g),l=n(i.b,o.b),f=mj(i.opacity,o.opacity);return function(p){return i.r=a(p),i.g=u(p),i.b=l(p),i.opacity=f(p),i+""}}return r.gamma=e,r}(1);function boe(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;in&&(o=t.slice(n,o),u[a]?u[a]+=o:u[++a]=o),(r=r[0])===(i=i[0])?u[a]?u[a]+=i:u[++a]=i:(u[++a]=null,l.push({i:a,x:bv(r,i)})),n=L0.lastIndex;return nt&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function Moe(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i2?$oe:Moe,l=f=null,d}function d(h){return h==null||isNaN(h=+h)?o:(l||(l=u(e.map(r),t,n)))(r(a(h)))}return d.invert=function(h){return a(i((f||(f=u(t,e.map(r),bv)))(h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,wv),p()):e.slice()},d.range=function(h){return arguments.length?(t=Array.from(h),p()):t.slice()},d.rangeRound=function(h){return t=Array.from(h),n=IS,p()},d.clamp=function(h){return arguments.length?(a=h?!0:Cn,p()):a!==Cn},d.interpolate=function(h){return arguments.length?(n=h,p()):n},d.unknown=function(h){return arguments.length?(o=h,d):o},function(h,m){return r=h,i=m,p()}}function jS(){return Xm()(Cn,Cn)}function Roe(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function xv(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function sl(e){return e=xv(Math.abs(e)),e?e[1]:NaN}function Noe(e,t){return function(n,r){for(var i=n.length,o=[],a=0,u=e[0],l=0;i>0&&u>0&&(l+u+1>r&&(u=Math.max(1,r-l)),o.push(n.substring(i-=u,i+u)),!((l+=u+1)>r));)u=e[a=(a+1)%e.length];return o.reverse().join(t)}}function Ioe(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var joe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Nf(e){if(!(t=joe.exec(e)))throw new Error("invalid format: "+e);var t;return new kS({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]})}Nf.prototype=kS.prototype;function kS(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+""}kS.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 koe(e){e:for(var t=e.length,n=1,r=-1,i;n0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var gj;function Doe(e,t){var n=xv(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(gj=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+xv(e,Math.max(0,t+o-1))[0]}function bT(e,t){var n=xv(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 wT={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Roe,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)=>bT(e*100,t),r:bT,s:Doe,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function xT(e){return e}var ST=Array.prototype.map,_T=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Loe(e){var t=e.grouping===void 0||e.thousands===void 0?xT:Noe(ST.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?xT:Ioe(ST.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",u=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function f(d){d=Nf(d);var h=d.fill,m=d.align,y=d.sign,g=d.symbol,w=d.zero,b=d.width,x=d.comma,S=d.precision,P=d.trim,O=d.type;O==="n"?(x=!0,O="g"):wT[O]||(S===void 0&&(S=12),P=!0,O="g"),(w||h==="0"&&m==="=")&&(w=!0,h="0",m="=");var E=g==="$"?n:g==="#"&&/[boxX]/.test(O)?"0"+O.toLowerCase():"",T=g==="$"?r:/[%p]/.test(O)?a:"",R=wT[O],I=/[defgprs%]/.test(O);S=S===void 0?6:/[gprs]/.test(O)?Math.max(1,Math.min(21,S)):Math.max(0,Math.min(20,S));function B(k){var U=E,V=T,q,X,G;if(O==="c")V=R(k)+V,k="";else{k=+k;var Y=k<0||1/k<0;if(k=isNaN(k)?l:R(Math.abs(k),S),P&&(k=koe(k)),Y&&+k==0&&y!=="+"&&(Y=!1),U=(Y?y==="("?y:u:y==="-"||y==="("?"":y)+U,V=(O==="s"?_T[8+gj/3]:"")+V+(Y&&y==="("?")":""),I){for(q=-1,X=k.length;++qG||G>57){V=(G===46?i+k.slice(q+1):k.slice(q))+V,k=k.slice(0,q);break}}}x&&!w&&(k=t(k,1/0));var F=U.length+k.length+V.length,z=F>1)+U+k+V+z.slice(F);break;default:k=z+U+k+V;break}return o(k)}return B.toString=function(){return d+""},B}function p(d,h){var m=f((d=Nf(d),d.type="f",d)),y=Math.max(-8,Math.min(8,Math.floor(sl(h)/3)))*3,g=Math.pow(10,-y),w=_T[8+y/3];return function(b){return m(g*b)+w}}return{format:f,formatPrefix:p}}var Qp,DS,yj;Foe({thousands:",",grouping:[3],currency:["$",""]});function Foe(e){return Qp=Loe(e),DS=Qp.format,yj=Qp.formatPrefix,Qp}function Boe(e){return Math.max(0,-sl(Math.abs(e)))}function Uoe(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(sl(t)/3)))*3-sl(Math.abs(e)))}function zoe(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,sl(t)-sl(e))+1}function bj(e,t,n,r){var i=Dw(e,t,n),o;switch(r=Nf(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=Uoe(i,a))&&(r.precision=o),yj(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=zoe(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=Boe(i))&&(r.precision=o-(r.type==="%")*2);break}}return DS(r)}function Pa(e){var t=e.domain;return e.ticks=function(n){var r=t();return jw(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return bj(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,a=r[i],u=r[o],l,f,p=10;for(u0;){if(f=kw(a,u,n),f===l)return r[i]=a,r[o]=u,t(r);if(f>0)a=Math.floor(a/f)*f,u=Math.ceil(u/f)*f;else if(f<0)a=Math.ceil(a*f)/f,u=Math.floor(u*f)/f;else break;l=f}return e},e}function Sv(){var e=jS();return e.copy=function(){return Od(e,Sv())},zr.apply(e,arguments),Pa(e)}function wj(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,wv),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return wj(e).unknown(t)},e=arguments.length?Array.from(e,wv):[0,1],Pa(n)}function xj(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],a;return oMath.pow(e,t)}function qoe(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 ET(e){return(t,n)=>-e(-t,n)}function LS(e){const t=e(OT,PT),n=t.domain;let r=10,i,o;function a(){return i=qoe(r),o=Goe(r),n()[0]<0?(i=ET(i),o=ET(o),e(Woe,Hoe)):e(OT,PT),t}return t.base=function(u){return arguments.length?(r=+u,a()):r},t.domain=function(u){return arguments.length?(n(u),a()):n()},t.ticks=u=>{const l=n();let f=l[0],p=l[l.length-1];const d=p0){for(;h<=m;++h)for(y=1;yp)break;b.push(g)}}else for(;h<=m;++h)for(y=r-1;y>=1;--y)if(g=h>0?y/o(-h):y*o(h),!(gp)break;b.push(g)}b.length*2{if(u==null&&(u=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=Nf(l)).precision==null&&(l.trim=!0),l=DS(l)),u===1/0)return l;const f=Math.max(1,r*u/t.ticks().length);return p=>{let d=p/o(Math.round(i(p)));return d*rn(xj(n(),{floor:u=>o(Math.floor(i(u))),ceil:u=>o(Math.ceil(i(u)))})),t}function Sj(){const e=LS(Xm()).domain([1,10]);return e.copy=()=>Od(e,Sj()).base(e.base()),zr.apply(e,arguments),e}function AT(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function CT(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function FS(e){var t=1,n=e(AT(t),CT(t));return n.constant=function(r){return arguments.length?e(AT(t=+r),CT(t)):t},Pa(n)}function _j(){var e=FS(Xm());return e.copy=function(){return Od(e,_j()).constant(e.constant())},zr.apply(e,arguments)}function TT(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Voe(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Xoe(e){return e<0?-e*e:e*e}function BS(e){var t=e(Cn,Cn),n=1;function r(){return n===1?e(Cn,Cn):n===.5?e(Voe,Xoe):e(TT(n),TT(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Pa(t)}function US(){var e=BS(Xm());return e.copy=function(){return Od(e,US()).exponent(e.exponent())},zr.apply(e,arguments),e}function Yoe(){return US.apply(null,arguments).exponent(.5)}function MT(e){return Math.sign(e)*e*e}function Qoe(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function Oj(){var e=jS(),t=[0,1],n=!1,r;function i(o){var a=Qoe(e(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return e.invert(MT(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,wv)).map(MT)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return Oj(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},zr.apply(i,arguments),Pa(i)}function Pj(){var e=[],t=[],n=[],r;function i(){var a=0,u=Math.max(1,t.length);for(n=new Array(u-1);++a0?n[u-1]:e[0],u=n?[r[n-1],t]:[r[f-1],r[f]]},a.unknown=function(l){return arguments.length&&(o=l),a},a.thresholds=function(){return r.slice()},a.copy=function(){return Ej().domain([e,t]).range(i).unknown(o)},zr.apply(Pa(a),arguments)}function Aj(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[Sd(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var a=t.indexOf(o);return[e[a-1],e[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return Aj().domain(e).range(t).unknown(n)},zr.apply(i,arguments)}const F0=new Date,B0=new Date;function Yt(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const a=i(o),u=i.ceil(o);return o-a(t(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,u)=>{const l=[];if(o=i.ceil(o),u=u==null?1:Math.floor(u),!(o0))return l;let f;do l.push(f=new Date(+o)),t(o,u),e(o);while(fYt(a=>{if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},(a,u)=>{if(a>=a)if(u<0)for(;++u<=0;)for(;t(a,-1),!o(a););else for(;--u>=0;)for(;t(a,1),!o(a););}),n&&(i.count=(o,a)=>(F0.setTime(+o),B0.setTime(+a),e(F0),e(B0),Math.floor(n(F0,B0))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?a=>r(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const _v=Yt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);_v.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Yt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):_v);_v.range;const to=1e3,Nr=to*60,no=Nr*60,ho=no*24,zS=ho*7,$T=ho*30,U0=ho*365,Ja=Yt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*to)},(e,t)=>(t-e)/to,e=>e.getUTCSeconds());Ja.range;const WS=Yt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*to)},(e,t)=>{e.setTime(+e+t*Nr)},(e,t)=>(t-e)/Nr,e=>e.getMinutes());WS.range;const HS=Yt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Nr)},(e,t)=>(t-e)/Nr,e=>e.getUTCMinutes());HS.range;const KS=Yt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*to-e.getMinutes()*Nr)},(e,t)=>{e.setTime(+e+t*no)},(e,t)=>(t-e)/no,e=>e.getHours());KS.range;const GS=Yt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*no)},(e,t)=>(t-e)/no,e=>e.getUTCHours());GS.range;const Pd=Yt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Nr)/ho,e=>e.getDate()-1);Pd.range;const Ym=Yt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ho,e=>e.getUTCDate()-1);Ym.range;const Cj=Yt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ho,e=>Math.floor(e/ho));Cj.range;function Is(e){return Yt(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())*Nr)/zS)}const Qm=Is(0),Ov=Is(1),Zoe=Is(2),Joe=Is(3),ul=Is(4),eae=Is(5),tae=Is(6);Qm.range;Ov.range;Zoe.range;Joe.range;ul.range;eae.range;tae.range;function js(e){return Yt(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)/zS)}const Zm=js(0),Pv=js(1),nae=js(2),rae=js(3),ll=js(4),iae=js(5),oae=js(6);Zm.range;Pv.range;nae.range;rae.range;ll.range;iae.range;oae.range;const qS=Yt(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());qS.range;const VS=Yt(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());VS.range;const vo=Yt(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());vo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Yt(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)});vo.range;const mo=Yt(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());mo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Yt(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)});mo.range;function Tj(e,t,n,r,i,o){const a=[[Ja,1,to],[Ja,5,5*to],[Ja,15,15*to],[Ja,30,30*to],[o,1,Nr],[o,5,5*Nr],[o,15,15*Nr],[o,30,30*Nr],[i,1,no],[i,3,3*no],[i,6,6*no],[i,12,12*no],[r,1,ho],[r,2,2*ho],[n,1,zS],[t,1,$T],[t,3,3*$T],[e,1,U0]];function u(f,p,d){const h=pw).right(a,h);if(m===a.length)return e.every(Dw(f/U0,p/U0,d));if(m===0)return _v.every(Math.max(Dw(f,p,d),1));const[y,g]=a[h/a[m-1][2]53)return null;"w"in J||(J.w=1),"Z"in J?(xe=W0(Ec(J.y,0,1)),Qe=xe.getUTCDay(),xe=Qe>4||Qe===0?Pv.ceil(xe):Pv(xe),xe=Ym.offset(xe,(J.V-1)*7),J.y=xe.getUTCFullYear(),J.m=xe.getUTCMonth(),J.d=xe.getUTCDate()+(J.w+6)%7):(xe=z0(Ec(J.y,0,1)),Qe=xe.getDay(),xe=Qe>4||Qe===0?Ov.ceil(xe):Ov(xe),xe=Pd.offset(xe,(J.V-1)*7),J.y=xe.getFullYear(),J.m=xe.getMonth(),J.d=xe.getDate()+(J.w+6)%7)}else("W"in J||"U"in J)&&("w"in J||(J.w="u"in J?J.u%7:"W"in J?1:0),Qe="Z"in J?W0(Ec(J.y,0,1)).getUTCDay():z0(Ec(J.y,0,1)).getDay(),J.m=0,J.d="W"in J?(J.w+6)%7+J.W*7-(Qe+5)%7:J.w+J.U*7-(Qe+6)%7);return"Z"in J?(J.H+=J.Z/100|0,J.M+=J.Z%100,W0(J)):z0(J)}}function R(se,de,pe,J){for(var Ue=0,xe=de.length,Qe=pe.length,ft,tt;Ue=Qe)return-1;if(ft=de.charCodeAt(Ue++),ft===37){if(ft=de.charAt(Ue++),tt=O[ft in RT?de.charAt(Ue++):ft],!tt||(J=tt(se,pe,J))<0)return-1}else if(ft!=pe.charCodeAt(J++))return-1}return J}function I(se,de,pe){var J=f.exec(de.slice(pe));return J?(se.p=p.get(J[0].toLowerCase()),pe+J[0].length):-1}function B(se,de,pe){var J=m.exec(de.slice(pe));return J?(se.w=y.get(J[0].toLowerCase()),pe+J[0].length):-1}function k(se,de,pe){var J=d.exec(de.slice(pe));return J?(se.w=h.get(J[0].toLowerCase()),pe+J[0].length):-1}function U(se,de,pe){var J=b.exec(de.slice(pe));return J?(se.m=x.get(J[0].toLowerCase()),pe+J[0].length):-1}function V(se,de,pe){var J=g.exec(de.slice(pe));return J?(se.m=w.get(J[0].toLowerCase()),pe+J[0].length):-1}function q(se,de,pe){return R(se,t,de,pe)}function X(se,de,pe){return R(se,n,de,pe)}function G(se,de,pe){return R(se,r,de,pe)}function Y(se){return a[se.getDay()]}function F(se){return o[se.getDay()]}function z(se){return l[se.getMonth()]}function ee(se){return u[se.getMonth()]}function oe(se){return i[+(se.getHours()>=12)]}function ae(se){return 1+~~(se.getMonth()/3)}function be(se){return a[se.getUTCDay()]}function Ce(se){return o[se.getUTCDay()]}function Ne(se){return l[se.getUTCMonth()]}function Le(se){return u[se.getUTCMonth()]}function me(se){return i[+(se.getUTCHours()>=12)]}function Ae(se){return 1+~~(se.getUTCMonth()/3)}return{format:function(se){var de=E(se+="",S);return de.toString=function(){return se},de},parse:function(se){var de=T(se+="",!1);return de.toString=function(){return se},de},utcFormat:function(se){var de=E(se+="",P);return de.toString=function(){return se},de},utcParse:function(se){var de=T(se+="",!0);return de.toString=function(){return se},de}}}var RT={"-":"",_:" ",0:"0"},nn=/^\s*\d+/,fae=/^%/,dae=/[\\^$*+?|[\]().{}]/g;function Ye(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o[t.toLowerCase(),n]))}function hae(e,t,n){var r=nn.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function vae(e,t,n){var r=nn.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function mae(e,t,n){var r=nn.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function gae(e,t,n){var r=nn.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function yae(e,t,n){var r=nn.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function NT(e,t,n){var r=nn.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function IT(e,t,n){var r=nn.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function bae(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 wae(e,t,n){var r=nn.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function xae(e,t,n){var r=nn.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function jT(e,t,n){var r=nn.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Sae(e,t,n){var r=nn.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function kT(e,t,n){var r=nn.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function _ae(e,t,n){var r=nn.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Oae(e,t,n){var r=nn.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Pae(e,t,n){var r=nn.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Eae(e,t,n){var r=nn.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Aae(e,t,n){var r=fae.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Cae(e,t,n){var r=nn.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Tae(e,t,n){var r=nn.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function DT(e,t){return Ye(e.getDate(),t,2)}function Mae(e,t){return Ye(e.getHours(),t,2)}function $ae(e,t){return Ye(e.getHours()%12||12,t,2)}function Rae(e,t){return Ye(1+Pd.count(vo(e),e),t,3)}function Mj(e,t){return Ye(e.getMilliseconds(),t,3)}function Nae(e,t){return Mj(e,t)+"000"}function Iae(e,t){return Ye(e.getMonth()+1,t,2)}function jae(e,t){return Ye(e.getMinutes(),t,2)}function kae(e,t){return Ye(e.getSeconds(),t,2)}function Dae(e){var t=e.getDay();return t===0?7:t}function Lae(e,t){return Ye(Qm.count(vo(e)-1,e),t,2)}function $j(e){var t=e.getDay();return t>=4||t===0?ul(e):ul.ceil(e)}function Fae(e,t){return e=$j(e),Ye(ul.count(vo(e),e)+(vo(e).getDay()===4),t,2)}function Bae(e){return e.getDay()}function Uae(e,t){return Ye(Ov.count(vo(e)-1,e),t,2)}function zae(e,t){return Ye(e.getFullYear()%100,t,2)}function Wae(e,t){return e=$j(e),Ye(e.getFullYear()%100,t,2)}function Hae(e,t){return Ye(e.getFullYear()%1e4,t,4)}function Kae(e,t){var n=e.getDay();return e=n>=4||n===0?ul(e):ul.ceil(e),Ye(e.getFullYear()%1e4,t,4)}function Gae(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ye(t/60|0,"0",2)+Ye(t%60,"0",2)}function LT(e,t){return Ye(e.getUTCDate(),t,2)}function qae(e,t){return Ye(e.getUTCHours(),t,2)}function Vae(e,t){return Ye(e.getUTCHours()%12||12,t,2)}function Xae(e,t){return Ye(1+Ym.count(mo(e),e),t,3)}function Rj(e,t){return Ye(e.getUTCMilliseconds(),t,3)}function Yae(e,t){return Rj(e,t)+"000"}function Qae(e,t){return Ye(e.getUTCMonth()+1,t,2)}function Zae(e,t){return Ye(e.getUTCMinutes(),t,2)}function Jae(e,t){return Ye(e.getUTCSeconds(),t,2)}function ese(e){var t=e.getUTCDay();return t===0?7:t}function tse(e,t){return Ye(Zm.count(mo(e)-1,e),t,2)}function Nj(e){var t=e.getUTCDay();return t>=4||t===0?ll(e):ll.ceil(e)}function nse(e,t){return e=Nj(e),Ye(ll.count(mo(e),e)+(mo(e).getUTCDay()===4),t,2)}function rse(e){return e.getUTCDay()}function ise(e,t){return Ye(Pv.count(mo(e)-1,e),t,2)}function ose(e,t){return Ye(e.getUTCFullYear()%100,t,2)}function ase(e,t){return e=Nj(e),Ye(e.getUTCFullYear()%100,t,2)}function sse(e,t){return Ye(e.getUTCFullYear()%1e4,t,4)}function use(e,t){var n=e.getUTCDay();return e=n>=4||n===0?ll(e):ll.ceil(e),Ye(e.getUTCFullYear()%1e4,t,4)}function lse(){return"+0000"}function FT(){return"%"}function BT(e){return+e}function UT(e){return Math.floor(+e/1e3)}var nu,Ij,jj;cse({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 cse(e){return nu=cae(e),Ij=nu.format,nu.parse,jj=nu.utcFormat,nu.utcParse,nu}function fse(e){return new Date(e)}function dse(e){return e instanceof Date?+e:+new Date(+e)}function XS(e,t,n,r,i,o,a,u,l,f){var p=jS(),d=p.invert,h=p.domain,m=f(".%L"),y=f(":%S"),g=f("%I:%M"),w=f("%I %p"),b=f("%a %d"),x=f("%b %d"),S=f("%B"),P=f("%Y");function O(E){return(l(E)t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>toe(e,o/r))},n.copy=function(){return Fj(t).domain(e)},So.apply(n,arguments)}function eg(){var e=0,t=.5,n=1,r=1,i,o,a,u,l,f=Cn,p,d=!1,h;function m(g){return isNaN(g=+g)?h:(g=.5+((g=+p(g))-o)*(r*gt}var wse=bse,xse=Wj,Sse=wse,_se=Ll;function Ose(e){return e&&e.length?xse(e,_se,Sse):void 0}var Pse=Ose;const tg=lt(Pse);function Ese(e,t){return ee.e^o.s<0?1:-1;for(r=o.d.length,i=e.d.length,t=0,n=re.d[t]^o.s<0?1:-1;return r===i?0:r>i^o.s<0?1:-1};ye.decimalPlaces=ye.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*xt;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};ye.dividedBy=ye.div=function(e){return so(this,new this.constructor(e))};ye.dividedToIntegerBy=ye.idiv=function(e){var t=this,n=t.constructor;return pt(so(t,new n(e),0,1),n.precision)};ye.equals=ye.eq=function(e){return!this.cmp(e)};ye.exponent=function(){return Bt(this)};ye.greaterThan=ye.gt=function(e){return this.cmp(e)>0};ye.greaterThanOrEqualTo=ye.gte=function(e){return this.cmp(e)>=0};ye.isInteger=ye.isint=function(){return this.e>this.d.length-2};ye.isNegative=ye.isneg=function(){return this.s<0};ye.isPositive=ye.ispos=function(){return this.s>0};ye.isZero=function(){return this.s===0};ye.lessThan=ye.lt=function(e){return this.cmp(e)<0};ye.lessThanOrEqualTo=ye.lte=function(e){return this.cmp(e)<1};ye.logarithm=ye.log=function(e){var t,n=this,r=n.constructor,i=r.precision,o=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(lr))throw Error(Fr+"NaN");if(n.s<1)throw Error(Fr+(n.s?"NaN":"-Infinity"));return n.eq(lr)?new r(0):(Pt=!1,t=so(If(n,o),If(e,o),o),Pt=!0,pt(t,i))};ye.minus=ye.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?qj(t,e):Kj(t,(e.s=-e.s,e))};ye.modulo=ye.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(Fr+"NaN");return n.s?(Pt=!1,t=so(n,e,0,1).times(e),Pt=!0,n.minus(t)):pt(new r(n),i)};ye.naturalExponential=ye.exp=function(){return Gj(this)};ye.naturalLogarithm=ye.ln=function(){return If(this)};ye.negated=ye.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};ye.plus=ye.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Kj(t,e):qj(t,(e.s=-e.s,e))};ye.precision=ye.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(ds+e);if(t=Bt(i)+1,r=i.d.length-1,n=r*xt+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};ye.squareRoot=ye.sqrt=function(){var e,t,n,r,i,o,a,u=this,l=u.constructor;if(u.s<1){if(!u.s)return new l(0);throw Error(Fr+"NaN")}for(e=Bt(u),Pt=!1,i=Math.sqrt(+u),i==0||i==1/0?(t=Ei(u.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Ul((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 l(t)):r=new l(i.toString()),n=l.precision,i=a=n+3;;)if(o=r,r=o.plus(so(u,o,a+2)).times(.5),Ei(o.d).slice(0,a)===(t=Ei(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),i==a&&t=="4999"){if(pt(o,n+1,0),o.times(o).eq(u)){r=o;break}}else if(t!="9999")break;a+=4}return Pt=!0,pt(r,n)};ye.times=ye.mul=function(e){var t,n,r,i,o,a,u,l,f,p=this,d=p.constructor,h=p.d,m=(e=new d(e)).d;if(!p.s||!e.s)return new d(0);for(e.s*=p.s,n=p.e+e.e,l=h.length,f=m.length,l=0;){for(t=0,i=l+r;i>r;)u=o[i]+m[r]*h[i-r-1]+t,o[i--]=u%Zt|0,t=u/Zt|0;o[i]=(o[i]+t)%Zt|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,Pt?pt(e,d.precision):e};ye.toDecimalPlaces=ye.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Ri(e,0,Bl),t===void 0?t=r.rounding:Ri(t,0,8),pt(n,e+Bt(n)+1,t))};ye.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=Ss(r,!0):(Ri(e,0,Bl),t===void 0?t=i.rounding:Ri(t,0,8),r=pt(new i(r),e+1,t),n=Ss(r,!0,e+1)),n};ye.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?Ss(i):(Ri(e,0,Bl),t===void 0?t=o.rounding:Ri(t,0,8),r=pt(new o(i),e+Bt(i)+1,t),n=Ss(r.abs(),!1,e+Bt(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};ye.toInteger=ye.toint=function(){var e=this,t=e.constructor;return pt(new t(e),Bt(e)+1,t.rounding)};ye.toNumber=function(){return+this};ye.toPower=ye.pow=function(e){var t,n,r,i,o,a,u=this,l=u.constructor,f=12,p=+(e=new l(e));if(!e.s)return new l(lr);if(u=new l(u),!u.s){if(e.s<1)throw Error(Fr+"Infinity");return u}if(u.eq(lr))return u;if(r=l.precision,e.eq(lr))return pt(u,r);if(t=e.e,n=e.d.length-1,a=t>=n,o=u.s,a){if((n=p<0?-p:p)<=Hj){for(i=new l(lr),t=Math.ceil(r/xt+4),Pt=!1;n%2&&(i=i.times(u),HT(i.d,t)),n=Ul(n/2),n!==0;)u=u.times(u),HT(u.d,t);return Pt=!0,e.s<0?new l(lr).div(i):pt(i,r)}}else if(o<0)throw Error(Fr+"NaN");return o=o<0&&e.d[Math.max(t,n)]&1?-1:1,u.s=1,Pt=!1,i=e.times(If(u,r+f)),Pt=!0,i=Gj(i),i.s=o,i};ye.toPrecision=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?(n=Bt(i),r=Ss(i,n<=o.toExpNeg||n>=o.toExpPos)):(Ri(e,1,Bl),t===void 0?t=o.rounding:Ri(t,0,8),i=pt(new o(i),e,t),n=Bt(i),r=Ss(i,e<=n||n<=o.toExpNeg,e)),r};ye.toSignificantDigits=ye.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Ri(e,1,Bl),t===void 0?t=r.rounding:Ri(t,0,8)),pt(new r(n),e,t)};ye.toString=ye.valueOf=ye.val=ye.toJSON=ye[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Bt(e),n=e.constructor;return Ss(e,t<=n.toExpNeg||t>=n.toExpPos)};function Kj(e,t){var n,r,i,o,a,u,l,f,p=e.constructor,d=p.precision;if(!e.s||!t.s)return t.s||(t=new p(e)),Pt?pt(t,d):t;if(l=e.d,f=t.d,a=e.e,i=t.e,l=l.slice(),o=a-i,o){for(o<0?(r=l,o=-o,u=f.length):(r=f,i=a,u=l.length),a=Math.ceil(d/xt),u=a>u?a+1:u+1,o>u&&(o=u,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(u=l.length,o=f.length,u-o<0&&(o=u,r=f,f=l,l=r),n=0;o;)n=(l[--o]=l[o]+f[o]+n)/Zt|0,l[o]%=Zt;for(n&&(l.unshift(n),++i),u=l.length;l[--u]==0;)l.pop();return t.d=l,t.e=i,Pt?pt(t,d):t}function Ri(e,t,n){if(e!==~~e||en)throw Error(ds+e)}function Ei(e){var t,n,r,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;ta?1:-1;else for(u=l=0;ui[u]?1:-1;break}return l}function n(r,i,o){for(var a=0;o--;)r[o]-=a,a=r[o]1;)r.shift()}return function(r,i,o,a){var u,l,f,p,d,h,m,y,g,w,b,x,S,P,O,E,T,R,I=r.constructor,B=r.s==i.s?1:-1,k=r.d,U=i.d;if(!r.s)return new I(r);if(!i.s)throw Error(Fr+"Division by zero");for(l=r.e-i.e,T=U.length,O=k.length,m=new I(B),y=m.d=[],f=0;U[f]==(k[f]||0);)++f;if(U[f]>(k[f]||0)&&--l,o==null?x=o=I.precision:a?x=o+(Bt(r)-Bt(i))+1:x=o,x<0)return new I(0);if(x=x/xt+2|0,f=0,T==1)for(p=0,U=U[0],x++;(f1&&(U=e(U,p),k=e(k,p),T=U.length,O=k.length),P=T,g=k.slice(0,T),w=g.length;w=Zt/2&&++E;do p=0,u=t(U,g,T,w),u<0?(b=g[0],T!=w&&(b=b*Zt+(g[1]||0)),p=b/E|0,p>1?(p>=Zt&&(p=Zt-1),d=e(U,p),h=d.length,w=g.length,u=t(d,g,h,w),u==1&&(p--,n(d,T16)throw Error(JS+Bt(e));if(!e.s)return new p(lr);for(t==null?(Pt=!1,u=d):u=t,a=new p(.03125);e.abs().gte(.1);)e=e.times(a),f+=5;for(r=Math.log(Ga(2,f))/Math.LN10*2+5|0,u+=r,n=i=o=new p(lr),p.precision=u;;){if(i=pt(i.times(e),u),n=n.times(++l),a=o.plus(so(i,n,u)),Ei(a.d).slice(0,u)===Ei(o.d).slice(0,u)){for(;f--;)o=pt(o.times(o),u);return p.precision=d,t==null?(Pt=!0,pt(o,d)):o}o=a}}function Bt(e){for(var t=e.e*xt,n=e.d[0];n>=10;n/=10)t++;return t}function H0(e,t,n){if(t>e.LN10.sd())throw Pt=!0,n&&(e.precision=n),Error(Fr+"LN10 precision limit exceeded");return pt(new e(e.LN10),t)}function zo(e){for(var t="";e--;)t+="0";return t}function If(e,t){var n,r,i,o,a,u,l,f,p,d=1,h=10,m=e,y=m.d,g=m.constructor,w=g.precision;if(m.s<1)throw Error(Fr+(m.s?"NaN":"-Infinity"));if(m.eq(lr))return new g(0);if(t==null?(Pt=!1,f=w):f=t,m.eq(10))return t==null&&(Pt=!0),H0(g,f);if(f+=h,g.precision=f,n=Ei(y),r=n.charAt(0),o=Bt(m),Math.abs(o)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)m=m.times(e),n=Ei(m.d),r=n.charAt(0),d++;o=Bt(m),r>1?(m=new g("0."+n),o++):m=new g(r+"."+n.slice(1))}else return l=H0(g,f+2,w).times(o+""),m=If(new g(r+"."+n.slice(1)),f-h).plus(l),g.precision=w,t==null?(Pt=!0,pt(m,w)):m;for(u=a=m=so(m.minus(lr),m.plus(lr),f),p=pt(m.times(m),f),i=3;;){if(a=pt(a.times(p),f),l=u.plus(so(a,new g(i),f)),Ei(l.d).slice(0,f)===Ei(u.d).slice(0,f))return u=u.times(2),o!==0&&(u=u.plus(H0(g,f+2,w).times(o+""))),u=so(u,new g(d),f),g.precision=w,t==null?(Pt=!0,pt(u,w)):u;u=l,i+=2}}function WT(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=Ul(n/xt),e.d=[],r=(n+1)%xt,n<0&&(r+=xt),rEv||e.e<-Ev))throw Error(JS+n)}else e.s=0,e.e=0,e.d=[0];return e}function pt(e,t,n){var r,i,o,a,u,l,f,p,d=e.d;for(a=1,o=d[0];o>=10;o/=10)a++;if(r=t-a,r<0)r+=xt,i=t,f=d[p=0];else{if(p=Math.ceil((r+1)/xt),o=d.length,p>=o)return e;for(f=o=d[p],a=1;o>=10;o/=10)a++;r%=xt,i=r-xt+a}if(n!==void 0&&(o=Ga(10,a-i-1),u=f/o%10|0,l=t<0||d[p+1]!==void 0||f%o,l=n<4?(u||l)&&(n==0||n==(e.s<0?3:2)):u>5||u==5&&(n==4||l||n==6&&(r>0?i>0?f/Ga(10,a-i):0:d[p-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return l?(o=Bt(e),d.length=1,t=t-o-1,d[0]=Ga(10,(xt-t%xt)%xt),e.e=Ul(-t/xt)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(r==0?(d.length=p,o=1,p--):(d.length=p+1,o=Ga(10,xt-r),d[p]=i>0?(f/Ga(10,a-i)%Ga(10,i)|0)*o:0),l)for(;;)if(p==0){(d[0]+=o)==Zt&&(d[0]=1,++e.e);break}else{if(d[p]+=o,d[p]!=Zt)break;d[p--]=0,o=1}for(r=d.length;d[--r]===0;)d.pop();if(Pt&&(e.e>Ev||e.e<-Ev))throw Error(JS+Bt(e));return e}function qj(e,t){var n,r,i,o,a,u,l,f,p,d,h=e.constructor,m=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),Pt?pt(t,m):t;if(l=e.d,d=t.d,r=t.e,f=e.e,l=l.slice(),a=f-r,a){for(p=a<0,p?(n=l,a=-a,u=d.length):(n=d,r=f,u=l.length),i=Math.max(Math.ceil(m/xt),u)+2,a>i&&(a=i,n.length=1),n.reverse(),i=a;i--;)n.push(0);n.reverse()}else{for(i=l.length,u=d.length,p=i0;--i)l[u++]=0;for(i=d.length;i>a;){if(l[--i]0?o=o.charAt(0)+"."+o.slice(1)+zo(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+zo(-i-1)+o,n&&(r=n-a)>0&&(o+=zo(r))):i>=a?(o+=zo(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+zo(r))):((r=i+1)0&&(i+1===a&&(o+="."),o+=zo(r))),e.s<0?"-"+o:o}function HT(e,t){if(e.length>t)return e.length=t,!0}function Vj(e){var t,n,r;function i(o){var a=this;if(!(a instanceof i))return new i(o);if(a.constructor=i,o instanceof i){a.s=o.s,a.e=o.e,a.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(ds+o);if(o>0)a.s=1;else if(o<0)o=-o,a.s=-1;else{a.s=0,a.e=0,a.d=[0];return}if(o===~~o&&o<1e7){a.e=0,a.d=[o];return}return WT(a,o.toString())}else if(typeof o!="string")throw Error(ds+o);if(o.charCodeAt(0)===45?(o=o.slice(1),a.s=-1):a.s=1,Vse.test(o))WT(a,o);else throw Error(ds+o)}if(i.prototype=ye,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=Vj,i.config=i.set=Xse,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(ds+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(ds+n+": "+r);return this}var e_=Vj(qse);lr=new e_(1);const ut=e_;function Yse(e){return eue(e)||Jse(e)||Zse(e)||Qse()}function Qse(){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 Zse(e,t){if(e){if(typeof e=="string")return zw(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 zw(e,t)}}function Jse(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function eue(e){if(Array.isArray(e))return zw(e)}function zw(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-a,KT(function(){for(var u=arguments.length,l=new Array(u),f=0;fe.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,o=void 0;try{for(var a=e[Symbol.iterator](),u;!(r=(u=a.next()).done)&&(n.push(u.value),!(t&&n.length===t));r=!0);}catch(l){i=!0,o=l}finally{try{!r&&a.return!=null&&a.return()}finally{if(i)throw o}}return n}}function vue(e){if(Array.isArray(e))return e}function Jj(e){var t=jf(e,2),n=t[0],r=t[1],i=n,o=r;return n>r&&(i=r,o=n),[i,o]}function ek(e,t,n){if(e.lte(0))return new ut(0);var r=ig.getDigitCount(e.toNumber()),i=new ut(10).pow(r),o=e.div(i),a=r!==1?.05:.1,u=new ut(Math.ceil(o.div(a).toNumber())).add(n).mul(a),l=u.mul(i);return t?l:new ut(Math.ceil(l))}function mue(e,t,n){var r=1,i=new ut(e);if(!i.isint()&&n){var o=Math.abs(e);o<1?(r=new ut(10).pow(ig.getDigitCount(e)-1),i=new ut(Math.floor(i.div(r).toNumber())).mul(r)):o>1&&(i=new ut(Math.floor(e)))}else e===0?i=new ut(Math.floor((t-1)/2)):n||(i=new ut(Math.floor(e)));var a=Math.floor((t-1)/2),u=iue(rue(function(l){return i.add(new ut(l-a).mul(r)).toNumber()}),Ww);return u(0,t)}function tk(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 ut(0),tickMin:new ut(0),tickMax:new ut(0)};var o=ek(new ut(t).sub(e).div(n-1),r,i),a;e<=0&&t>=0?a=new ut(0):(a=new ut(e).add(t).div(2),a=a.sub(new ut(a).mod(o)));var u=Math.ceil(a.sub(e).div(o).toNumber()),l=Math.ceil(new ut(t).sub(a).div(o).toNumber()),f=u+l+1;return f>n?tk(e,t,n,r,i+1):(f0?l+(n-f):l,u=t>0?u:u+(n-f)),{step:o,tickMin:a.sub(new ut(u).mul(o)),tickMax:a.add(new ut(l).mul(o))})}function gue(e){var t=jf(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=Math.max(i,2),u=Jj([n,r]),l=jf(u,2),f=l[0],p=l[1];if(f===-1/0||p===1/0){var d=p===1/0?[f].concat(Kw(Ww(0,i-1).map(function(){return 1/0}))):[].concat(Kw(Ww(0,i-1).map(function(){return-1/0})),[p]);return n>r?Hw(d):d}if(f===p)return mue(f,i,o);var h=tk(f,p,a,o),m=h.step,y=h.tickMin,g=h.tickMax,w=ig.rangeStep(y,g.add(new ut(.1).mul(m)),m);return n>r?Hw(w):w}function yue(e,t){var n=jf(e,2),r=n[0],i=n[1],o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=Jj([r,i]),u=jf(a,2),l=u[0],f=u[1];if(l===-1/0||f===1/0)return[r,i];if(l===f)return[l];var p=Math.max(t,2),d=ek(new ut(f).sub(l).div(p-1),o,0),h=[].concat(Kw(ig.rangeStep(new ut(l),new ut(f).sub(new ut(.99).mul(d)),d)),[f]);return r>i?Hw(h):h}var bue=Qj(gue),wue=Qj(yue),xue="Invariant failed";function _s(e,t){throw new Error(xue)}var Sue=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function cl(e){"@babel/helpers - typeof";return cl=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},cl(e)}function Av(){return Av=Object.assign?Object.assign.bind():function(e){for(var t=1;te.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 Tue(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 Mue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $ue(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,a=-1,u=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(u<=1)return 0;if(o&&o.axisType==="angleAxis"&&Math.abs(Math.abs(o.range[1]-o.range[0])-360)<=1e-6)for(var l=o.range,f=0;f0?i[f-1].coordinate:i[u-1].coordinate,d=i[f].coordinate,h=f>=u-1?i[0].coordinate:i[f+1].coordinate,m=void 0;if(ri(d-p)!==ri(h-d)){var y=[];if(ri(h-d)===ri(l[1]-l[0])){m=h;var g=d+l[1]-l[0];y[0]=Math.min(g,(g+p)/2),y[1]=Math.max(g,(g+p)/2)}else{m=p;var w=h+l[1]-l[0];y[0]=Math.min(d,(w+d)/2),y[1]=Math.max(d,(w+d)/2)}var b=[Math.min(d,(m+d)/2),Math.max(d,(m+d)/2)];if(t>b[0]&&t<=b[1]||t>=y[0]&&t<=y[1]){a=i[f].index;break}}else{var x=Math.min(p,h),S=Math.max(p,h);if(t>(x+d)/2&&t<=(S+d)/2){a=i[f].index;break}}}else for(var P=0;P0&&P(r[P].coordinate+r[P-1].coordinate)/2&&t<=(r[P].coordinate+r[P+1].coordinate)/2||P===u-1&&t>(r[P].coordinate+r[P-1].coordinate)/2){a=r[P].index;break}return a},t_=function(t){var n,r=t,i=r.type.displayName,o=(n=t.type)!==null&&n!==void 0&&n.defaultProps?It(It({},t.type.defaultProps),t.props):t.props,a=o.stroke,u=o.fill,l;switch(i){case"Line":l=a;break;case"Area":case"Radar":l=a&&a!=="none"?a:u;break;default:l=u;break}return l},Vue=function(t){var n=t.barSize,r=t.totalSize,i=t.stackGroups,o=i===void 0?{}:i;if(!o)return{};for(var a={},u=Object.keys(o),l=0,f=u.length;l=0});if(b&&b.length){var x=b[0].type.defaultProps,S=x!==void 0?It(It({},x),b[0].props):b[0].props,P=S.barSize,O=S[w];a[O]||(a[O]=[]);var E=rt(P)?n:P;a[O].push({item:b[0],stackList:b.slice(1),barSize:rt(E)?void 0:xs(E,r,0)})}}return a},Xue=function(t){var n=t.barGap,r=t.barCategoryGap,i=t.bandSize,o=t.sizeList,a=o===void 0?[]:o,u=t.maxBarSize,l=a.length;if(l<1)return null;var f=xs(n,i,0,!0),p,d=[];if(a[0].barSize===+a[0].barSize){var h=!1,m=i/l,y=a.reduce(function(P,O){return P+O.barSize||0},0);y+=(l-1)*f,y>=i&&(y-=(l-1)*f,f=0),y>=i&&m>0&&(h=!0,m*=.9,y=l*m);var g=(i-y)/2>>0,w={offset:g-f,size:0};p=a.reduce(function(P,O){var E={item:O.item,position:{offset:w.offset+w.size+f,size:h?m:O.barSize}},T=[].concat(VT(P),[E]);return w=T[T.length-1].position,O.stackList&&O.stackList.length&&O.stackList.forEach(function(R){T.push({item:R,position:w})}),T},d)}else{var b=xs(r,i,0,!0);i-2*b-(l-1)*f<=0&&(f=0);var x=(i-2*b-(l-1)*f)/l;x>1&&(x>>=0);var S=u===+u?Math.min(x,u):x;p=a.reduce(function(P,O,E){var T=[].concat(VT(P),[{item:O.item,position:{offset:b+(x+f)*E+(x-S)/2,size:S}}]);return O.stackList&&O.stackList.length&&O.stackList.forEach(function(R){T.push({item:R,position:T[T.length-1].position})}),T},d)}return p},Yue=function(t,n,r,i){var o=r.children,a=r.width,u=r.margin,l=a-(u.left||0)-(u.right||0),f=ok({children:o,legendWidth:l});if(f){var p=i||{},d=p.width,h=p.height,m=f.align,y=f.verticalAlign,g=f.layout;if((g==="vertical"||g==="horizontal"&&y==="middle")&&m!=="center"&&ce(t[m]))return It(It({},t),{},$u({},m,t[m]+(d||0)));if((g==="horizontal"||g==="vertical"&&m==="center")&&y!=="middle"&&ce(t[y]))return It(It({},t),{},$u({},y,t[y]+(h||0)))}return t},Que=function(t,n,r){return rt(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},ak=function(t,n,r,i,o){var a=n.props.children,u=ai(a,og).filter(function(f){return Que(i,o,f.props.direction)});if(u&&u.length){var l=u.map(function(f){return f.props.dataKey});return t.reduce(function(f,p){var d=Ni(p,r);if(rt(d))return f;var h=Array.isArray(d)?[ng(d),tg(d)]:[d,d],m=l.reduce(function(y,g){var w=Ni(p,g,0),b=h[0]-Math.abs(Array.isArray(w)?w[0]:w),x=h[1]+Math.abs(Array.isArray(w)?w[1]:w);return[Math.min(b,y[0]),Math.max(x,y[1])]},[1/0,-1/0]);return[Math.min(m[0],f[0]),Math.max(m[1],f[1])]},[1/0,-1/0])}return null},Zue=function(t,n,r,i,o){var a=n.map(function(u){return ak(t,u,r,o,i)}).filter(function(u){return!rt(u)});return a&&a.length?a.reduce(function(u,l){return[Math.min(u[0],l[0]),Math.max(u[1],l[1])]},[1/0,-1/0]):null},sk=function(t,n,r,i,o){var a=n.map(function(l){var f=l.props.dataKey;return r==="number"&&f&&ak(t,l,f,i)||nf(t,f,r,o)});if(r==="number")return a.reduce(function(l,f){return[Math.min(l[0],f[0]),Math.max(l[1],f[1])]},[1/0,-1/0]);var u={};return a.reduce(function(l,f){for(var p=0,d=f.length;p=2?ri(u[0]-u[1])*2*f:f,n&&(t.ticks||t.niceTicks)){var p=(t.ticks||t.niceTicks).map(function(d){var h=o?o.indexOf(d):d;return{coordinate:i(h)+f,value:d,offset:f}});return p.filter(function(d){return!wd(d.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(d,h){return{coordinate:i(d)+f,value:d,index:h,offset:f}}):i.ticks&&!r?i.ticks(t.tickCount).map(function(d){return{coordinate:i(d)+f,value:d,offset:f}}):i.domain().map(function(d,h){return{coordinate:i(d)+f,value:o?o[d]:d,index:h,offset:f}})},K0=new WeakMap,Zp=function(t,n){if(typeof n!="function")return t;K0.has(t)||K0.set(t,new WeakMap);var r=K0.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},Jue=function(t,n,r){var i=t.scale,o=t.type,a=t.layout,u=t.axisType;if(i==="auto")return a==="radial"&&u==="radiusAxis"?{scale:Tf(),realScaleType:"band"}:a==="radial"&&u==="angleAxis"?{scale:Sv(),realScaleType:"linear"}:o==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:tf(),realScaleType:"point"}:o==="category"?{scale:Tf(),realScaleType:"band"}:{scale:Sv(),realScaleType:"linear"};if(bd(i)){var l="scale".concat(zm(i));return{scale:(zT[l]||tf)(),realScaleType:zT[l]?l:"point"}}return Ge(i)?{scale:i}:{scale:tf(),realScaleType:"point"}},YT=1e-4,ele=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,i=t.range(),o=Math.min(i[0],i[1])-YT,a=Math.max(i[0],i[1])+YT,u=t(n[0]),l=t(n[r-1]);(ua||la)&&t.domain([n[0],n[r-1]])}},tle=function(t,n){if(!t)return null;for(var r=0,i=t.length;ri)&&(o[1]=i),o[0]>i&&(o[0]=i),o[1]=0?(t[u][r][0]=o,t[u][r][1]=o+l,o=t[u][r][1]):(t[u][r][0]=a,t[u][r][1]=a+l,a=t[u][r][1])}},ile=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r=0?(t[a][r][0]=o,t[a][r][1]=o+u,o=t[a][r][1]):(t[a][r][0]=0,t[a][r][1]=0)}},ole={sign:rle,expand:bX,none:nl,silhouette:wX,wiggle:xX,positive:ile},ale=function(t,n,r){var i=n.map(function(u){return u.props.dataKey}),o=ole[r],a=yX().keys(i).value(function(u,l){return+Ni(u,l,0)}).order(bw).offset(o);return a(t)},sle=function(t,n,r,i,o,a){if(!t)return null;var u=a?n.reverse():n,l={},f=u.reduce(function(d,h){var m,y=(m=h.type)!==null&&m!==void 0&&m.defaultProps?It(It({},h.type.defaultProps),h.props):h.props,g=y.stackId,w=y.hide;if(w)return d;var b=y[r],x=d[b]||{hasStack:!1,stackGroups:{}};if(Xt(g)){var S=x.stackGroups[g]||{numericAxisId:r,cateAxisId:i,items:[]};S.items.push(h),x.hasStack=!0,x.stackGroups[g]=S}else x.stackGroups[Um("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[h]};return It(It({},d),{},$u({},b,x))},l),p={};return Object.keys(f).reduce(function(d,h){var m=f[h];if(m.hasStack){var y={};m.stackGroups=Object.keys(m.stackGroups).reduce(function(g,w){var b=m.stackGroups[w];return It(It({},g),{},$u({},w,{numericAxisId:r,cateAxisId:i,items:b.items,stackedData:ale(t,b.items,o)}))},y)}return It(It({},d),{},$u({},h,m))},p)},ule=function(t,n){var r=n.realScaleType,i=n.type,o=n.tickCount,a=n.originalDomain,u=n.allowDecimals,l=r||n.scale;if(l!=="auto"&&l!=="linear")return null;if(o&&i==="number"&&a&&(a[0]==="auto"||a[1]==="auto")){var f=t.domain();if(!f.length)return null;var p=bue(f,o,u);return t.domain([ng(p),tg(p)]),{niceTicks:p}}if(o&&i==="number"){var d=t.domain(),h=wue(d,o,u);return{niceTicks:h}}return null},QT=function(t){var n=t.axis,r=t.ticks,i=t.offset,o=t.bandSize,a=t.entry,u=t.index;if(n.type==="category")return r[u]?r[u].coordinate+i:null;var l=Ni(a,n.dataKey,n.domain[u]);return rt(l)?null:n.scale(l)-o/2+i},lle=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var i=Math.min(r[0],r[1]),o=Math.max(r[0],r[1]);return i<=0&&o>=0?0:o<0?o:i}return r[0]},cle=function(t,n){var r,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?It(It({},t.type.defaultProps),t.props):t.props,o=i.stackId;if(Xt(o)){var a=n[o];if(a){var u=a.items.indexOf(t);return u>=0?a.stackedData[u]:null}}return null},fle=function(t){return t.reduce(function(n,r){return[ng(r.concat([n[0]]).filter(ce)),tg(r.concat([n[1]]).filter(ce))]},[1/0,-1/0])},ck=function(t,n,r){return Object.keys(t).reduce(function(i,o){var a=t[o],u=a.stackedData,l=u.reduce(function(f,p){var d=fle(p.slice(n,r+1));return[Math.min(f[0],d[0]),Math.max(f[1],d[1])]},[1/0,-1/0]);return[Math.min(l[0],i[0]),Math.max(l[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},ZT=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,JT=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Xw=function(t,n,r){if(Ge(t))return t(n,r);if(!Array.isArray(t))return n;var i=[];if(ce(t[0]))i[0]=r?t[0]:Math.min(t[0],n[0]);else if(ZT.test(t[0])){var o=+ZT.exec(t[0])[1];i[0]=n[0]-o}else Ge(t[0])?i[0]=t[0](n[0]):i[0]=n[0];if(ce(t[1]))i[1]=r?t[1]:Math.max(t[1],n[1]);else if(JT.test(t[1])){var a=+JT.exec(t[1])[1];i[1]=n[1]+a}else Ge(t[1])?i[1]=t[1](n[1]):i[1]=n[1];return i},Tv=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 o=CS(n,function(d){return d.coordinate}),a=1/0,u=1,l=o.length;ua&&(f=2*Math.PI-f),{radius:u,angle:vle(f),angleInRadian:f}},yle=function(t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),o=Math.floor(r/360),a=Math.min(i,o);return{startAngle:n-a*360,endAngle:r-a*360}},ble=function(t,n){var r=n.startAngle,i=n.endAngle,o=Math.floor(r/360),a=Math.floor(i/360),u=Math.min(o,a);return t+u*360},rM=function(t,n){var r=t.x,i=t.y,o=gle({x:r,y:i},n),a=o.radius,u=o.angle,l=n.innerRadius,f=n.outerRadius;if(af)return!1;if(a===0)return!0;var p=yle(n),d=p.startAngle,h=p.endAngle,m=u,y;if(d<=h){for(;m>h;)m-=360;for(;m=d&&m<=h}else{for(;m>d;)m-=360;for(;m=h&&m<=d}return y?nM(nM({},n),{},{radius:a,angle:ble(m,n)}):null};function Ff(e){"@babel/helpers - typeof";return Ff=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},Ff(e)}var wle=["offset"];function xle(e){return Ple(e)||Ole(e)||_le(e)||Sle()}function Sle(){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 _le(e,t){if(e){if(typeof e=="string")return Yw(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 Yw(e,t)}}function Ole(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ple(e){if(Array.isArray(e))return Yw(e)}function Yw(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 Ale(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 iM(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 Kt(e){for(var t=1;t=0?1:-1,S,P;i==="insideStart"?(S=m+x*a,P=g):i==="insideEnd"?(S=y-x*a,P=!g):i==="end"&&(S=y+x*a,P=g),P=b<=0?P:!P;var O=un(f,p,w,S),E=un(f,p,w,S+(P?1:-1)*359),T="M".concat(O.x,",").concat(O.y,` A`).concat(w,",").concat(w,",0,1,").concat(P?0:1,`, `).concat(E.x,",").concat(E.y),R=rt(t.id)?Um("recharts-radial-line-"):t.id;return W.createElement("text",Bf({},r,{dominantBaseline:"central",className:et("recharts-radial-bar-label",u)}),W.createElement("defs",null,W.createElement("path",{id:R,d:T})),W.createElement("textPath",{xlinkHref:"#".concat(R)},n))},Ile=function(t){var n=t.viewBox,r=t.offset,i=t.position,o=n,a=o.cx,u=o.cy,l=o.innerRadius,f=o.outerRadius,p=o.startAngle,d=o.endAngle,h=(p+d)/2;if(i==="outside"){var m=un(a,u,f+r,h),y=m.x,g=m.y;return{x:y,y:g,textAnchor:y>=a?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:a,y:u,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:a,y:u,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:a,y:u,textAnchor:"middle",verticalAnchor:"end"};var w=(l+f)/2,b=un(a,u,w,h),x=b.x,S=b.y;return{x,y:S,textAnchor:"middle",verticalAnchor:"middle"}},jle=function(t){var n=t.viewBox,r=t.parentViewBox,i=t.offset,o=t.position,a=n,u=a.x,l=a.y,f=a.width,p=a.height,d=p>=0?1:-1,h=d*i,m=d>0?"end":"start",y=d>0?"start":"end",g=f>=0?1:-1,w=g*i,b=g>0?"end":"start",x=g>0?"start":"end";if(o==="top"){var S={x:u+f/2,y:l-d*i,textAnchor:"middle",verticalAnchor:m};return Kt(Kt({},S),r?{height:Math.max(l-r.y,0),width:f}:{})}if(o==="bottom"){var P={x:u+f/2,y:l+p+h,textAnchor:"middle",verticalAnchor:y};return Kt(Kt({},P),r?{height:Math.max(r.y+r.height-(l+p),0),width:f}:{})}if(o==="left"){var O={x:u-w,y:l+p/2,textAnchor:b,verticalAnchor:"middle"};return Kt(Kt({},O),r?{width:Math.max(O.x-r.x,0),height:p}:{})}if(o==="right"){var E={x:u+f+w,y:l+p/2,textAnchor:x,verticalAnchor:"middle"};return Kt(Kt({},E),r?{width:Math.max(r.x+r.width-E.x,0),height:p}:{})}var T=r?{width:f,height:p}:{};return o==="insideLeft"?Kt({x:u+w,y:l+p/2,textAnchor:x,verticalAnchor:"middle"},T):o==="insideRight"?Kt({x:u+f-w,y:l+p/2,textAnchor:b,verticalAnchor:"middle"},T):o==="insideTop"?Kt({x:u+f/2,y:l+h,textAnchor:"middle",verticalAnchor:y},T):o==="insideBottom"?Kt({x:u+f/2,y:l+p-h,textAnchor:"middle",verticalAnchor:m},T):o==="insideTopLeft"?Kt({x:u+w,y:l+h,textAnchor:x,verticalAnchor:y},T):o==="insideTopRight"?Kt({x:u+f-w,y:l+h,textAnchor:b,verticalAnchor:y},T):o==="insideBottomLeft"?Kt({x:u+w,y:l+p-h,textAnchor:x,verticalAnchor:m},T):o==="insideBottomRight"?Kt({x:u+f-w,y:l+p-h,textAnchor:b,verticalAnchor:m},T):Rl(o)&&(ce(o.x)||Qa(o.x))&&(ce(o.y)||Qa(o.y))?Kt({x:u+xs(o.x,f),y:l+xs(o.y,p),textAnchor:"end",verticalAnchor:"end"},T):Kt({x:u+f/2,y:l+p/2,textAnchor:"middle",verticalAnchor:"middle"},T)},kle=function(t){return"cx"in t&&ce(t.cx)};function yn(e){var t=e.offset,n=t===void 0?5:t,r=Ele(e,wle),i=Kt({offset:n},r),o=i.viewBox,a=i.position,u=i.value,l=i.children,f=i.content,p=i.className,d=p===void 0?"":p,h=i.textBreakAll;if(!o||rt(u)&&rt(l)&&!A.isValidElement(f)&&!Ge(f))return null;if(A.isValidElement(f))return A.cloneElement(f,i);var m;if(Ge(f)){if(m=A.createElement(f,i),A.isValidElement(m))return m}else m=$le(i);var y=kle(o),g=Je(i,!0);if(y&&(a==="insideStart"||a==="insideEnd"||a==="end"))return Nle(i,m,g);var w=y?Ile(i):jle(i);return W.createElement(vv,Bf({className:et("recharts-label",d)},g,w,{breakAll:h}),m)}yn.displayName="Label";var dk=function(t){var n=t.cx,r=t.cy,i=t.angle,o=t.startAngle,a=t.endAngle,u=t.r,l=t.radius,f=t.innerRadius,p=t.outerRadius,d=t.x,h=t.y,m=t.top,y=t.left,g=t.width,w=t.height,b=t.clockWise,x=t.labelViewBox;if(x)return x;if(ce(g)&&ce(w)){if(ce(d)&&ce(h))return{x:d,y:h,width:g,height:w};if(ce(m)&&ce(y))return{x:m,y,width:g,height:w}}return ce(d)&&ce(h)?{x:d,y:h,width:0,height:0}:ce(n)&&ce(r)?{cx:n,cy:r,startAngle:o||i||0,endAngle:a||i||0,innerRadius:f||0,outerRadius:p||l||u||0,clockWise:b}:t.viewBox?t.viewBox:{}},Dle=function(t,n){return t?t===!0?W.createElement(yn,{key:"label-implicit",viewBox:n}):Xt(t)?W.createElement(yn,{key:"label-implicit",viewBox:n,value:t}):A.isValidElement(t)?t.type===yn?A.cloneElement(t,{key:"label-implicit",viewBox:n}):W.createElement(yn,{key:"label-implicit",content:t,viewBox:n}):Ge(t)?W.createElement(yn,{key:"label-implicit",content:t,viewBox:n}):Rl(t)?W.createElement(yn,Bf({viewBox:n},t,{key:"label-implicit"})):null:null},Lle=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var i=t.children,o=dk(t),a=ai(i,yn).map(function(l,f){return A.cloneElement(l,{viewBox:n||o,key:"label-".concat(f)})});if(!r)return a;var u=Dle(t.label,n||o);return[u].concat(xle(a))};yn.parseViewBox=dk;yn.renderCallByParent=Lle;function Fle(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var Ble=Fle;const Ule=lt(Ble);function Uf(e){"@babel/helpers - typeof";return Uf=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},Uf(e)}var zle=["valueAccessor"],Wle=["data","dataKey","clockWise","id","textBreakAll"];function Hle(e){return Vle(e)||qle(e)||Gle(e)||Kle()}function Kle(){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 Gle(e,t){if(e){if(typeof e=="string")return Qw(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 Qw(e,t)}}function qle(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Vle(e){if(Array.isArray(e))return Qw(e)}function Qw(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 Zle(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 Jle=function(t){return Array.isArray(t.value)?Ule(t.value):t.value};function ps(e){var t=e.valueAccessor,n=t===void 0?Jle:t,r=sM(e,zle),i=r.data,o=r.dataKey,a=r.clockWise,u=r.id,l=r.textBreakAll,f=sM(r,Wle);return!i||!i.length?null:W.createElement(en,{className:"recharts-label-list"},i.map(function(p,d){var h=rt(o)?n(p,d):Ni(p&&p.payload,o),m=rt(u)?{}:{id:"".concat(u,"-").concat(d)};return W.createElement(yn,$v({},Je(p,!0),f,m,{parentViewBox:p.parentViewBox,value:h,textBreakAll:l,viewBox:yn.parseViewBox(rt(a)?p:aM(aM({},p),{},{clockWise:a})),key:"label-".concat(d),index:d}))}))}ps.displayName="LabelList";function ece(e,t){return e?e===!0?W.createElement(ps,{key:"labelList-implicit",data:t}):W.isValidElement(e)||Ge(e)?W.createElement(ps,{key:"labelList-implicit",data:t,content:e}):Rl(e)?W.createElement(ps,$v({data:t},e,{key:"labelList-implicit"})):null:null}function tce(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,i=ai(r,ps).map(function(a,u){return A.cloneElement(a,{data:t,key:"labelList-".concat(u)})});if(!n)return i;var o=ece(e.label,t);return[o].concat(Hle(i))}ps.renderCallByParent=tce;function zf(e){"@babel/helpers - typeof";return zf=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},zf(e)}function Zw(){return Zw=Object.assign?Object.assign.bind():function(e){for(var t=1;t180),",").concat(+(a>f),`, `).concat(d.x,",").concat(d.y,` `);if(i>0){var m=un(n,r,i,a),y=un(n,r,i,f);h+="L ".concat(y.x,",").concat(y.y,` A `).concat(i,",").concat(i,`,0, `).concat(+(Math.abs(l)>180),",").concat(+(a<=f),`, `).concat(m.x,",").concat(m.y," Z")}else h+="L ".concat(n,",").concat(r," Z");return h},ace=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,o=t.outerRadius,a=t.cornerRadius,u=t.forceCornerRadius,l=t.cornerIsExternal,f=t.startAngle,p=t.endAngle,d=ri(p-f),h=Jp({cx:n,cy:r,radius:o,angle:f,sign:d,cornerRadius:a,cornerIsExternal:l}),m=h.circleTangency,y=h.lineTangency,g=h.theta,w=Jp({cx:n,cy:r,radius:o,angle:p,sign:-d,cornerRadius:a,cornerIsExternal:l}),b=w.circleTangency,x=w.lineTangency,S=w.theta,P=l?Math.abs(f-p):Math.abs(f-p)-g-S;if(P<0)return u?"M ".concat(y.x,",").concat(y.y,` a`).concat(a,",").concat(a,",0,0,1,").concat(a*2,`,0 a`).concat(a,",").concat(a,",0,0,1,").concat(-a*2,`,0 `):pk({cx:n,cy:r,innerRadius:i,outerRadius:o,startAngle:f,endAngle:p});var O="M ".concat(y.x,",").concat(y.y,` A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(m.x,",").concat(m.y,` A`).concat(o,",").concat(o,",0,").concat(+(P>180),",").concat(+(d<0),",").concat(b.x,",").concat(b.y,` A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(x.x,",").concat(x.y,` `);if(i>0){var E=Jp({cx:n,cy:r,radius:i,angle:f,sign:d,isExternal:!0,cornerRadius:a,cornerIsExternal:l}),T=E.circleTangency,R=E.lineTangency,I=E.theta,B=Jp({cx:n,cy:r,radius:i,angle:p,sign:-d,isExternal:!0,cornerRadius:a,cornerIsExternal:l}),k=B.circleTangency,U=B.lineTangency,V=B.theta,q=l?Math.abs(f-p):Math.abs(f-p)-I-V;if(q<0&&a===0)return"".concat(O,"L").concat(n,",").concat(r,"Z");O+="L".concat(U.x,",").concat(U.y,` A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(k.x,",").concat(k.y,` A`).concat(i,",").concat(i,",0,").concat(+(q>180),",").concat(+(d>0),",").concat(T.x,",").concat(T.y,` A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(R.x,",").concat(R.y,"Z")}else O+="L".concat(n,",").concat(r,"Z");return O},sce={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},hk=function(t){var n=lM(lM({},sce),t),r=n.cx,i=n.cy,o=n.innerRadius,a=n.outerRadius,u=n.cornerRadius,l=n.forceCornerRadius,f=n.cornerIsExternal,p=n.startAngle,d=n.endAngle,h=n.className;if(a0&&Math.abs(p-d)<360?w=ace({cx:r,cy:i,innerRadius:o,outerRadius:a,cornerRadius:Math.min(g,y/2),forceCornerRadius:l,cornerIsExternal:f,startAngle:p,endAngle:d}):w=pk({cx:r,cy:i,innerRadius:o,outerRadius:a,startAngle:p,endAngle:d}),W.createElement("path",Zw({},Je(n,!0),{className:m,d:w,role:"img"}))};function Wf(e){"@babel/helpers - typeof";return Wf=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},Wf(e)}function Jw(){return Jw=Object.assign?Object.assign.bind():function(e){for(var t=1;t0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function Sce(e,t){return zl(e.getTime(),t.getTime())}function yM(e,t,n){if(e.size!==t.size)return!1;for(var r={},i=e.entries(),o=0,a,u;(a=i.next())&&!a.done;){for(var l=t.entries(),f=!1,p=0;(u=l.next())&&!u.done;){var d=a.value,h=d[0],m=d[1],y=u.value,g=y[0],w=y[1];!f&&!r[p]&&(f=n.equals(h,g,o,p,e,t,n)&&n.equals(m,w,h,g,e,t,n))&&(r[p]=!0),p++}if(!f)return!1;o++}return!0}function _ce(e,t,n){var r=gM(e),i=r.length;if(gM(t).length!==i)return!1;for(var o;i-- >0;)if(o=r[i],o===bk&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!yk(t,o)||!n.equals(e[o],t[o],o,o,e,t,n))return!1;return!0}function $c(e,t,n){var r=vM(e),i=r.length;if(vM(t).length!==i)return!1;for(var o,a,u;i-- >0;)if(o=r[i],o===bk&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!yk(t,o)||!n.equals(e[o],t[o],o,o,e,t,n)||(a=mM(e,o),u=mM(t,o),(a||u)&&(!a||!u||a.configurable!==u.configurable||a.enumerable!==u.enumerable||a.writable!==u.writable)))return!1;return!0}function Oce(e,t){return zl(e.valueOf(),t.valueOf())}function Pce(e,t){return e.source===t.source&&e.flags===t.flags}function bM(e,t,n){if(e.size!==t.size)return!1;for(var r={},i=e.values(),o,a;(o=i.next())&&!o.done;){for(var u=t.values(),l=!1,f=0;(a=u.next())&&!a.done;)!l&&!r[f]&&(l=n.equals(o.value,a.value,o.value,a.value,e,t,n))&&(r[f]=!0),f++;if(!l)return!1}return!0}function Ece(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}var Ace="[object Arguments]",Cce="[object Boolean]",Tce="[object Date]",Mce="[object Map]",$ce="[object Number]",Rce="[object Object]",Nce="[object RegExp]",Ice="[object Set]",jce="[object String]",kce=Array.isArray,wM=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,xM=Object.assign,Dce=Object.prototype.toString.call.bind(Object.prototype.toString);function Lce(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,i=e.areObjectsEqual,o=e.arePrimitiveWrappersEqual,a=e.areRegExpsEqual,u=e.areSetsEqual,l=e.areTypedArraysEqual;return function(p,d,h){if(p===d)return!0;if(p==null||d==null||typeof p!="object"||typeof d!="object")return p!==p&&d!==d;var m=p.constructor;if(m!==d.constructor)return!1;if(m===Object)return i(p,d,h);if(kce(p))return t(p,d,h);if(wM!=null&&wM(p))return l(p,d,h);if(m===Date)return n(p,d,h);if(m===RegExp)return a(p,d,h);if(m===Map)return r(p,d,h);if(m===Set)return u(p,d,h);var y=Dce(p);return y===Tce?n(p,d,h):y===Nce?a(p,d,h):y===Mce?r(p,d,h):y===Ice?u(p,d,h):y===Rce?typeof p.then!="function"&&typeof d.then!="function"&&i(p,d,h):y===Ace?i(p,d,h):y===Cce||y===$ce||y===jce?o(p,d,h):!1}}function Fce(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,i={areArraysEqual:r?$c:xce,areDatesEqual:Sce,areMapsEqual:r?hM(yM,$c):yM,areObjectsEqual:r?$c:_ce,arePrimitiveWrappersEqual:Oce,areRegExpsEqual:Pce,areSetsEqual:r?hM(bM,$c):bM,areTypedArraysEqual:r?$c:Ece};if(n&&(i=xM({},i,n(i))),t){var o=th(i.areArraysEqual),a=th(i.areMapsEqual),u=th(i.areObjectsEqual),l=th(i.areSetsEqual);i=xM({},i,{areArraysEqual:o,areMapsEqual:a,areObjectsEqual:u,areSetsEqual:l})}return i}function Bce(e){return function(t,n,r,i,o,a,u){return e(t,n,u)}}function Uce(e){var t=e.circular,n=e.comparator,r=e.createState,i=e.equals,o=e.strict;if(r)return function(l,f){var p=r(),d=p.cache,h=d===void 0?t?new WeakMap:void 0:d,m=p.meta;return n(l,f,{cache:h,equals:i,meta:m,strict:o})};if(t)return function(l,f){return n(l,f,{cache:new WeakMap,equals:i,meta:void 0,strict:o})};var a={cache:void 0,equals:i,meta:void 0,strict:o};return function(l,f){return n(l,f,a)}}var zce=Aa();Aa({strict:!0});Aa({circular:!0});Aa({circular:!0,strict:!0});Aa({createInternalComparator:function(){return zl}});Aa({strict:!0,createInternalComparator:function(){return zl}});Aa({circular:!0,createInternalComparator:function(){return zl}});Aa({circular:!0,createInternalComparator:function(){return zl},strict:!0});function Aa(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,i=e.createState,o=e.strict,a=o===void 0?!1:o,u=Fce(e),l=Lce(u),f=r?r(l):Bce(l);return Uce({circular:n,comparator:l,createState:i,equals:f,strict:a})}function Wce(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function SM(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(o){n<0&&(n=o),o-n>t?(e(o),n=-1):Wce(i)};requestAnimationFrame(r)}function ex(e){"@babel/helpers - typeof";return ex=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},ex(e)}function Hce(e){return Vce(e)||qce(e)||Gce(e)||Kce()}function Kce(){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 Gce(e,t){if(e){if(typeof e=="string")return _M(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 _M(e,t)}}function _M(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?1:b<0?0:b},g=function(b){for(var x=b>1?1:b,S=x,P=0;P<8;++P){var O=d(S)-x,E=m(S);if(Math.abs(O-x)0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,i=t.damping,o=i===void 0?8:i,a=t.dt,u=a===void 0?17:a,l=function(p,d,h){var m=-(p-d)*r,y=h*o,g=h+(m-y)*u/1e3,w=h*u/1e3+p;return Math.abs(w-d)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 Pfe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function G0(e){return Tfe(e)||Cfe(e)||Afe(e)||Efe()}function Efe(){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 Afe(e,t){if(e){if(typeof e=="string")return ox(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 ox(e,t)}}function Cfe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Tfe(e){if(Array.isArray(e))return ox(e)}function ox(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Iv(e){return Iv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Iv(e)}var ma=function(e){Ife(n,e);var t=jfe(n);function n(r,i){var o;Mfe(this,n),o=t.call(this,r,i);var a=o.props,u=a.isActive,l=a.attributeName,f=a.from,p=a.to,d=a.steps,h=a.children,m=a.duration;if(o.handleStyleChange=o.handleStyleChange.bind(ux(o)),o.changeStyle=o.changeStyle.bind(ux(o)),!u||m<=0)return o.state={style:{}},typeof h=="function"&&(o.state={style:p}),sx(o);if(d&&d.length)o.state={style:d[0].style};else if(f){if(typeof h=="function")return o.state={style:f},sx(o);o.state={style:l?Bc({},l,f):f}}else o.state={style:{}};return o}return Rfe(n,[{key:"componentDidMount",value:function(){var i=this.props,o=i.isActive,a=i.canBegin;this.mounted=!0,!(!o||!a)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var o=this.props,a=o.isActive,u=o.canBegin,l=o.attributeName,f=o.shouldReAnimate,p=o.to,d=o.from,h=this.state.style;if(u){if(!a){var m={style:l?Bc({},l,p):p};this.state&&h&&(l&&h[l]!==p||!l&&h!==p)&&this.setState(m);return}if(!(zce(i.to,p)&&i.canBegin&&i.isActive)){var y=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var g=y||f?d:i.to;if(this.state&&h){var w={style:l?Bc({},l,g):g};(l&&h[l]!==g||!l&&h!==g)&&this.setState(w)}this.runAnimation(Vr(Vr({},this.props),{},{from:g,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var o=this,a=i.from,u=i.to,l=i.duration,f=i.easing,p=i.begin,d=i.onAnimationEnd,h=i.onAnimationStart,m=Sfe(a,u,ffe(f),l,this.changeStyle),y=function(){o.stopJSAnimation=m()};this.manager.start([h,p,y,l,d])}},{key:"runStepAnimation",value:function(i){var o=this,a=i.steps,u=i.begin,l=i.onAnimationStart,f=a[0],p=f.style,d=f.duration,h=d===void 0?0:d,m=function(g,w,b){if(b===0)return g;var x=w.duration,S=w.easing,P=S===void 0?"ease":S,O=w.style,E=w.properties,T=w.onAnimationEnd,R=b>0?a[b-1]:w,I=E||Object.keys(O);if(typeof P=="function"||P==="spring")return[].concat(G0(g),[o.runJSAnimation.bind(o,{from:R.style,to:O,duration:x,easing:P}),x]);var B=EM(I,x,P),k=Vr(Vr(Vr({},R.style),O),{},{transition:B});return[].concat(G0(g),[k,x,T]).filter(Jce)};return this.manager.start([l].concat(G0(a.reduce(m,[p,Math.max(h,u)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=Xce());var o=i.begin,a=i.duration,u=i.attributeName,l=i.to,f=i.easing,p=i.onAnimationStart,d=i.onAnimationEnd,h=i.steps,m=i.children,y=this.manager;if(this.unSubscribe=y.subscribe(this.handleStyleChange),typeof f=="function"||typeof m=="function"||f==="spring"){this.runJSAnimation(i);return}if(h.length>1){this.runStepAnimation(i);return}var g=u?Bc({},u,l):l,w=EM(Object.keys(g),a,f);y.start([p,o,Vr(Vr({},g),{},{transition:w}),a,d])}},{key:"render",value:function(){var i=this.props,o=i.children;i.begin;var a=i.duration;i.attributeName,i.easing;var u=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var l=Ofe(i,_fe),f=A.Children.count(o),p=this.state.style;if(typeof o=="function")return o(p);if(!u||f===0||a<=0)return o;var d=function(m){var y=m.props,g=y.style,w=g===void 0?{}:g,b=y.className,x=A.cloneElement(m,Vr(Vr({},l),{},{style:Vr(Vr({},w),p),className:b}));return x};return f===1?d(A.Children.only(o)):W.createElement("div",null,A.Children.map(o,function(h){return d(h)}))}}]),n}(A.PureComponent);ma.displayName="Animate";ma.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};ma.propTypes={from:ke.oneOfType([ke.object,ke.string]),to:ke.oneOfType([ke.object,ke.string]),attributeName:ke.string,duration:ke.number,begin:ke.number,easing:ke.oneOfType([ke.string,ke.func]),steps:ke.arrayOf(ke.shape({duration:ke.number.isRequired,style:ke.object.isRequired,easing:ke.oneOfType([ke.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),ke.func]),properties:ke.arrayOf("string"),onAnimationEnd:ke.func})),children:ke.oneOfType([ke.node,ke.func]),isActive:ke.bool,canBegin:ke.bool,onAnimationEnd:ke.func,shouldReAnimate:ke.bool,onAnimationStart:ke.func,onAnimationReStart:ke.func};ke.object,ke.object,ke.object,ke.element;ke.object,ke.object,ke.object,ke.oneOfType([ke.array,ke.element]),ke.any;function Gf(e){"@babel/helpers - typeof";return Gf=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},Gf(e)}function jv(){return jv=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0?1:-1,l=r>=0?1:-1,f=i>=0&&r>=0||i<0&&r<0?1:0,p;if(a>0&&o instanceof Array){for(var d=[0,0,0,0],h=0,m=4;ha?a:o[h];p="M".concat(t,",").concat(n+u*d[0]),d[0]>0&&(p+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(f,",").concat(t+l*d[0],",").concat(n)),p+="L ".concat(t+r-l*d[1],",").concat(n),d[1]>0&&(p+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(f,`, `).concat(t+r,",").concat(n+u*d[1])),p+="L ".concat(t+r,",").concat(n+i-u*d[2]),d[2]>0&&(p+="A ".concat(d[2],",").concat(d[2],",0,0,").concat(f,`, `).concat(t+r-l*d[2],",").concat(n+i)),p+="L ".concat(t+l*d[3],",").concat(n+i),d[3]>0&&(p+="A ".concat(d[3],",").concat(d[3],",0,0,").concat(f,`, `).concat(t,",").concat(n+i-u*d[3])),p+="Z"}else if(a>0&&o===+o&&o>0){var y=Math.min(a,o);p="M ".concat(t,",").concat(n+u*y,` A `).concat(y,",").concat(y,",0,0,").concat(f,",").concat(t+l*y,",").concat(n,` L `).concat(t+r-l*y,",").concat(n,` A `).concat(y,",").concat(y,",0,0,").concat(f,",").concat(t+r,",").concat(n+u*y,` L `).concat(t+r,",").concat(n+i-u*y,` A `).concat(y,",").concat(y,",0,0,").concat(f,",").concat(t+r-l*y,",").concat(n+i,` L `).concat(t+l*y,",").concat(n+i,` A `).concat(y,",").concat(y,",0,0,").concat(f,",").concat(t,",").concat(n+i-u*y," Z")}else p="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return p},Kfe=function(t,n){if(!t||!n)return!1;var r=t.x,i=t.y,o=n.x,a=n.y,u=n.width,l=n.height;if(Math.abs(u)>0&&Math.abs(l)>0){var f=Math.min(o,o+u),p=Math.max(o,o+u),d=Math.min(a,a+l),h=Math.max(a,a+l);return r>=f&&r<=p&&i>=d&&i<=h}return!1},Gfe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},n_=function(t){var n=IM(IM({},Gfe),t),r=A.useRef(),i=A.useState(-1),o=Dfe(i,2),a=o[0],u=o[1];A.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var P=r.current.getTotalLength();P&&u(P)}catch{}},[]);var l=n.x,f=n.y,p=n.width,d=n.height,h=n.radius,m=n.className,y=n.animationEasing,g=n.animationDuration,w=n.animationBegin,b=n.isAnimationActive,x=n.isUpdateAnimationActive;if(l!==+l||f!==+f||p!==+p||d!==+d||p===0||d===0)return null;var S=et("recharts-rectangle",m);return x?W.createElement(ma,{canBegin:a>0,from:{width:p,height:d,x:l,y:f},to:{width:p,height:d,x:l,y:f},duration:g,animationEasing:y,isActive:x},function(P){var O=P.width,E=P.height,T=P.x,R=P.y;return W.createElement(ma,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:w,duration:g,isActive:b,easing:y},W.createElement("path",jv({},Je(n,!0),{className:S,d:jM(T,R,O,E,h),ref:r})))}):W.createElement("path",jv({},Je(n,!0),{className:S,d:jM(l,f,p,d,h)}))};function lx(){return lx=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 Jfe(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 ede=function(t,n,r,i,o,a){return"M".concat(t,",").concat(o,"v").concat(i,"M").concat(a,",").concat(n,"h").concat(r)},tde=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,o=i===void 0?0:i,a=t.top,u=a===void 0?0:a,l=t.left,f=l===void 0?0:l,p=t.width,d=p===void 0?0:p,h=t.height,m=h===void 0?0:h,y=t.className,g=Zfe(t,qfe),w=Vfe({x:r,y:o,top:u,left:f,width:d,height:m},g);return!ce(r)||!ce(o)||!ce(d)||!ce(m)||!ce(u)||!ce(f)?null:W.createElement("path",cx({},Je(w,!0),{className:et("recharts-cross",y),d:ede(r,o,d,m,u,f)}))},nde=L2,rde=nde(Object.getPrototypeOf,Object),ide=rde,ode=wo,ade=ide,sde=xo,ude="[object Object]",lde=Function.prototype,cde=Object.prototype,Ak=lde.toString,fde=cde.hasOwnProperty,dde=Ak.call(Object);function pde(e){if(!sde(e)||ode(e)!=ude)return!1;var t=ade(e);if(t===null)return!0;var n=fde.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Ak.call(n)==dde}var hde=pde;const vde=lt(hde);var mde=wo,gde=xo,yde="[object Boolean]";function bde(e){return e===!0||e===!1||gde(e)&&mde(e)==yde}var wde=bde;const xde=lt(wde);function Vf(e){"@babel/helpers - typeof";return Vf=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},Vf(e)}function kv(){return kv=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0,from:{upperWidth:0,lowerWidth:0,height:h,x:l,y:f},to:{upperWidth:p,lowerWidth:d,height:h,x:l,y:f},duration:g,animationEasing:y,isActive:b},function(S){var P=S.upperWidth,O=S.lowerWidth,E=S.height,T=S.x,R=S.y;return W.createElement(ma,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:w,duration:g,easing:y},W.createElement("path",kv({},Je(n,!0),{className:x,d:BM(T,R,P,O,E),ref:r})))}):W.createElement("g",null,W.createElement("path",kv({},Je(n,!0),{className:x,d:BM(l,f,p,d,h)})))},Rde=["option","shapeType","propTransformer","activeClassName","isActive"];function Xf(e){"@babel/helpers - typeof";return Xf=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},Xf(e)}function Nde(e,t){if(e==null)return{};var n=Ide(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ide(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 UM(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 Dv(e){for(var t=1;t0&&r.handleDrag(i.changedTouches[0])}),ir(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,o=i.endIndex,a=i.onDragEnd,u=i.startIndex;a==null||a({endIndex:o,startIndex:u})}),r.detachDragEndListener()}),ir(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),ir(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),ir(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),ir(r,"handleSlideDragStart",function(i){var o=VM(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:o.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return ype(t,e),hpe(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,o=r.endX,a=this.state.scaleValues,u=this.props,l=u.gap,f=u.data,p=f.length-1,d=Math.min(i,o),h=Math.max(i,o),m=t.getIndexInRange(a,d),y=t.getIndexInRange(a,h);return{startIndex:m-m%l,endIndex:y===p?p:y-y%l}}},{key:"getTextOfTick",value:function(r){var i=this.props,o=i.data,a=i.tickFormatter,u=i.dataKey,l=Ni(o[r],u,r);return Ge(a)?a(l,r):l}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var i=this.state,o=i.slideMoveStartX,a=i.startX,u=i.endX,l=this.props,f=l.x,p=l.width,d=l.travellerWidth,h=l.startIndex,m=l.endIndex,y=l.onChange,g=r.pageX-o;g>0?g=Math.min(g,f+p-d-u,f+p-d-a):g<0&&(g=Math.max(g,f-a,f-u));var w=this.getIndex({startX:a+g,endX:u+g});(w.startIndex!==h||w.endIndex!==m)&&y&&y(w),this.setState({startX:a+g,endX:u+g,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var o=VM(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:o.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,o=i.brushMoveStartX,a=i.movingTravellerId,u=i.endX,l=i.startX,f=this.state[a],p=this.props,d=p.x,h=p.width,m=p.travellerWidth,y=p.onChange,g=p.gap,w=p.data,b={startX:this.state.startX,endX:this.state.endX},x=r.pageX-o;x>0?x=Math.min(x,d+h-m-f):x<0&&(x=Math.max(x,d-f)),b[a]=f+x;var S=this.getIndex(b),P=S.startIndex,O=S.endIndex,E=function(){var R=w.length-1;return a==="startX"&&(u>l?P%g===0:O%g===0)||ul?O%g===0:P%g===0)||u>l&&O===R};this.setState(ir(ir({},a,f+x),"brushMoveStartX",r.pageX),function(){y&&E()&&y(S)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var o=this,a=this.state,u=a.scaleValues,l=a.startX,f=a.endX,p=this.state[i],d=u.indexOf(p);if(d!==-1){var h=d+r;if(!(h===-1||h>=u.length)){var m=u[h];i==="startX"&&m>=f||i==="endX"&&m<=l||this.setState(ir({},i,m),function(){o.props.onChange(o.getIndex({startX:o.state.startX,endX:o.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,o=r.y,a=r.width,u=r.height,l=r.fill,f=r.stroke;return W.createElement("rect",{stroke:f,fill:l,x:i,y:o,width:a,height:u})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,o=r.y,a=r.width,u=r.height,l=r.data,f=r.children,p=r.padding,d=A.Children.only(f);return d?W.cloneElement(d,{x:i,y:o,width:a,height:u,margin:p,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(r,i){var o,a,u=this,l=this.props,f=l.y,p=l.travellerWidth,d=l.height,h=l.traveller,m=l.ariaLabel,y=l.data,g=l.startIndex,w=l.endIndex,b=Math.max(r,this.props.x),x=V0(V0({},Je(this.props,!1)),{},{x:b,y:f,width:p,height:d}),S=m||"Min value: ".concat((o=y[g])===null||o===void 0?void 0:o.name,", Max value: ").concat((a=y[w])===null||a===void 0?void 0:a.name);return W.createElement(en,{tabIndex:0,role:"slider","aria-label":S,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(O){["ArrowLeft","ArrowRight"].includes(O.key)&&(O.preventDefault(),O.stopPropagation(),u.handleTravellerMoveKeyboard(O.key==="ArrowRight"?1:-1,i))},onFocus:function(){u.setState({isTravellerFocused:!0})},onBlur:function(){u.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(h,x))}},{key:"renderSlide",value:function(r,i){var o=this.props,a=o.y,u=o.height,l=o.stroke,f=o.travellerWidth,p=Math.min(r,i)+f,d=Math.max(Math.abs(i-r)-f,0);return W.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:p,y:a,width:d,height:u})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,o=r.endIndex,a=r.y,u=r.height,l=r.travellerWidth,f=r.stroke,p=this.state,d=p.startX,h=p.endX,m=5,y={pointerEvents:"none",fill:f};return W.createElement(en,{className:"recharts-brush-texts"},W.createElement(vv,Fv({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,h)-m,y:a+u/2},y),this.getTextOfTick(i)),W.createElement(vv,Fv({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,h)+l+m,y:a+u/2},y),this.getTextOfTick(o)))}},{key:"render",value:function(){var r=this.props,i=r.data,o=r.className,a=r.children,u=r.x,l=r.y,f=r.width,p=r.height,d=r.alwaysShowText,h=this.state,m=h.startX,y=h.endX,g=h.isTextActive,w=h.isSlideMoving,b=h.isTravellerMoving,x=h.isTravellerFocused;if(!i||!i.length||!ce(u)||!ce(l)||!ce(f)||!ce(p)||f<=0||p<=0)return null;var S=et("recharts-brush",o),P=W.Children.count(a)===1,O=dpe("userSelect","none");return W.createElement(en,{className:S,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:O},this.renderBackground(),P&&this.renderPanorama(),this.renderSlide(m,y),this.renderTravellerLayer(m,"startX"),this.renderTravellerLayer(y,"endX"),(g||w||b||x||d)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,o=r.y,a=r.width,u=r.height,l=r.stroke,f=Math.floor(o+u/2)-1;return W.createElement(W.Fragment,null,W.createElement("rect",{x:i,y:o,width:a,height:u,fill:l,stroke:"none"}),W.createElement("line",{x1:i+1,y1:f,x2:i+a-1,y2:f,fill:"none",stroke:"#fff"}),W.createElement("line",{x1:i+1,y1:f+2,x2:i+a-1,y2:f+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var o;return W.isValidElement(r)?o=W.cloneElement(r,i):Ge(r)?o=r(i):o=t.renderDefaultTraveller(i),o}},{key:"getDerivedStateFromProps",value:function(r,i){var o=r.data,a=r.width,u=r.x,l=r.travellerWidth,f=r.updateId,p=r.startIndex,d=r.endIndex;if(o!==i.prevData||f!==i.prevUpdateId)return V0({prevData:o,prevTravellerWidth:l,prevUpdateId:f,prevX:u,prevWidth:a},o&&o.length?wpe({data:o,width:a,x:u,travellerWidth:l,startIndex:p,endIndex:d}):{scale:null,scaleValues:null});if(i.scale&&(a!==i.prevWidth||u!==i.prevX||l!==i.prevTravellerWidth)){i.scale.range([u,u+a-l]);var h=i.scale.domain().map(function(m){return i.scale(m)});return{prevData:o,prevTravellerWidth:l,prevUpdateId:f,prevX:u,prevWidth:a,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:h}}return null}},{key:"getIndexInRange",value:function(r,i){for(var o=r.length,a=0,u=o-1;u-a>1;){var l=Math.floor((a+u)/2);r[l]>i?u=l:a=l}return i>=r[u]?u:a}}])}(A.PureComponent);ir(pl,"displayName","Brush");ir(pl,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var xpe=AS;function Spe(e,t){var n;return xpe(e,function(r,i,o){return n=t(r,i,o),!n}),!!n}var _pe=Spe,Ope=M2,Ppe=Oa,Epe=_pe,Ape=Vn,Cpe=Vm;function Tpe(e,t,n){var r=Ape(e)?Ope:Epe;return n&&Cpe(e,t,n)&&(t=void 0),r(e,Ppe(t))}var Mpe=Tpe;const $pe=lt(Mpe);var Mi=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},XM=Z2;function Rpe(e,t,n){t=="__proto__"&&XM?XM(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Npe=Rpe,Ipe=Npe,jpe=Y2,kpe=Oa;function Dpe(e,t){var n={};return t=kpe(t),jpe(e,function(r,i,o){Ipe(n,i,t(r,i,o))}),n}var Lpe=Dpe;const Fpe=lt(Lpe);function Bpe(e,t){for(var n=-1,r=e==null?0:e.length;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function rhe(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 ihe(e,t){var n=e.x,r=e.y,i=nhe(e,Zpe),o="".concat(n),a=parseInt(o,10),u="".concat(r),l=parseInt(u,10),f="".concat(t.height||i.height),p=parseInt(f,10),d="".concat(t.width||i.width),h=parseInt(d,10);return Rc(Rc(Rc(Rc(Rc({},t),i),a?{x:a}:{}),l?{y:l}:{}),{},{height:p,width:h,name:t.name,radius:t.radius})}function QM(e){return W.createElement(Ude,dx({shapeType:"rectangle",propTransformer:ihe,activeClassName:"recharts-active-bar"},e))}var ohe=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,i){if(typeof t=="number")return t;var o=typeof r=="number";return o?t(r,i):(o||_s(),n)}},ahe=["value","background"],Nk;function hl(e){"@babel/helpers - typeof";return hl=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},hl(e)}function she(e,t){if(e==null)return{};var n=uhe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function uhe(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 Uv(){return Uv=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(X)0&&Math.abs(q)0&&(V=Math.min((Ce||0)-(q[Ne-1]||0),V))}),Number.isFinite(V)){var X=V/U,G=g.layout==="vertical"?r.height:r.width;if(g.padding==="gap"&&(T=X*G/2),g.padding==="no-gap"){var Y=xs(t.barCategoryGap,X*G),F=X*G/2;T=F-Y-(F-Y)/G*Y}}}i==="xAxis"?R=[r.left+(S.left||0)+(T||0),r.left+r.width-(S.right||0)-(T||0)]:i==="yAxis"?R=l==="horizontal"?[r.top+r.height-(S.bottom||0),r.top+(S.top||0)]:[r.top+(S.top||0)+(T||0),r.top+r.height-(S.bottom||0)-(T||0)]:R=g.range,O&&(R=[R[1],R[0]]);var z=Jue(g,o,h),ee=z.scale,oe=z.realScaleType;ee.domain(b).range(R),ele(ee);var ae=ule(ee,Jr(Jr({},g),{},{realScaleType:oe}));i==="xAxis"?(k=w==="top"&&!P||w==="bottom"&&P,I=r.left,B=d[E]-k*g.height):i==="yAxis"&&(k=w==="left"&&!P||w==="right"&&P,I=d[E]-k*g.width,B=r.top);var be=Jr(Jr(Jr({},g),ae),{},{realScaleType:oe,x:I,y:B,scale:ee,width:i==="xAxis"?r.width:g.width,height:i==="yAxis"?r.height:g.height});return be.bandSize=Tv(be,ae),!g.hide&&i==="xAxis"?d[E]+=(k?-1:1)*be.height:g.hide||(d[E]+=(k?-1:1)*be.width),Jr(Jr({},m),{},ug({},y,be))},{})},Dk=function(t,n){var r=t.x,i=t.y,o=n.x,a=n.y;return{x:Math.min(r,o),y:Math.min(i,a),width:Math.abs(o-r),height:Math.abs(a-i)}},whe=function(t){var n=t.x1,r=t.y1,i=t.x2,o=t.y2;return Dk({x:n,y:r},{x:i,y:o})},Lk=function(){function e(t){mhe(this,e),this.scale=t}return ghe(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.bandAware,o=r.position;if(n!==void 0){if(o)switch(o){case"start":return this.scale(n);case"middle":{var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+a}case"end":{var u=this.bandwidth?this.bandwidth():0;return this.scale(n)+u}default:return this.scale(n)}if(i){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+l}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],o=r[r.length-1];return i<=o?n>=i&&n<=o:n>=o&&n<=i}}],[{key:"create",value:function(n){return new e(n)}}])}();ug(Lk,"EPS",1e-4);var r_=function(t){var n=Object.keys(t).reduce(function(r,i){return Jr(Jr({},r),{},ug({},i,Lk.create(t[i])))},{});return Jr(Jr({},n),{},{apply:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=o.bandAware,u=o.position;return Fpe(i,function(l,f){return n[f].apply(l,{bandAware:a,position:u})})},isInRange:function(i){return Rk(i,function(o,a){return n[a].isInRange(o)})}})};function xhe(e){return(e%180+180)%180}var She=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=xhe(i),a=o*Math.PI/180,u=Math.atan(r/n),l=a>u&&a-1?i[o?t[a]:a]:void 0}}var Ahe=Ehe,Che=Ck;function The(e){var t=Che(e),n=t%1;return t===t?n?t-n:t:0}var Mhe=The,$he=H2,Rhe=Oa,Nhe=Mhe,Ihe=Math.max;function jhe(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:Nhe(n);return i<0&&(i=Ihe(r+i,0)),$he(e,Rhe(t),i)}var khe=jhe,Dhe=Ahe,Lhe=khe,Fhe=Dhe(Lhe),Bhe=Fhe;const Uhe=lt(Bhe);var zhe=Lq(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),i_=A.createContext(void 0),o_=A.createContext(void 0),Fk=A.createContext(void 0),Bk=A.createContext({}),Uk=A.createContext(void 0),zk=A.createContext(0),Wk=A.createContext(0),n$=function(t){var n=t.state,r=n.xAxisMap,i=n.yAxisMap,o=n.offset,a=t.clipPathId,u=t.children,l=t.width,f=t.height,p=zhe(o);return W.createElement(i_.Provider,{value:r},W.createElement(o_.Provider,{value:i},W.createElement(Bk.Provider,{value:o},W.createElement(Fk.Provider,{value:p},W.createElement(Uk.Provider,{value:a},W.createElement(zk.Provider,{value:f},W.createElement(Wk.Provider,{value:l},u)))))))},Whe=function(){return A.useContext(Uk)},Hk=function(t){var n=A.useContext(i_);n==null&&_s();var r=n[t];return r==null&&_s(),r},Hhe=function(){var t=A.useContext(i_);return Ko(t)},Khe=function(){var t=A.useContext(o_),n=Uhe(t,function(r){return Rk(r.domain,Number.isFinite)});return n||Ko(t)},Kk=function(t){var n=A.useContext(o_);n==null&&_s();var r=n[t];return r==null&&_s(),r},Ghe=function(){var t=A.useContext(Fk);return t},qhe=function(){return A.useContext(Bk)},a_=function(){return A.useContext(Wk)},s_=function(){return A.useContext(zk)};function vl(e){"@babel/helpers - typeof";return vl=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},vl(e)}function Vhe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xhe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne*i)return!1;var o=n();return e*(t-e*o/2-r)>=0&&e*(t+e*o/2-i)<=0}function Mve(e,t){return Zk(e,t+1)}function $ve(e,t,n,r,i){for(var o=(r||[]).slice(),a=t.start,u=t.end,l=0,f=1,p=a,d=function(){var y=r==null?void 0:r[l];if(y===void 0)return{v:Zk(r,f)};var g=l,w,b=function(){return w===void 0&&(w=n(y,g)),w},x=y.coordinate,S=l===0||Gv(e,x,b,p,u);S||(l=0,p=a,f+=1),S&&(p=x+e*(b()/2+i),l+=f)},h;f<=o.length;)if(h=d(),h)return h.v;return[]}function ed(e){"@babel/helpers - typeof";return ed=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},ed(e)}function c$(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 mn(e){for(var t=1;t0?m.coordinate-w*e:m.coordinate})}else o[h]=m=mn(mn({},m),{},{tickCoord:m.coordinate});var b=Gv(e,m.tickCoord,g,u,l);b&&(l=m.tickCoord-e*(g()/2+i),o[h]=mn(mn({},m),{},{isShow:!0}))},p=a-1;p>=0;p--)f(p);return o}function kve(e,t,n,r,i,o){var a=(r||[]).slice(),u=a.length,l=t.start,f=t.end;if(o){var p=r[u-1],d=n(p,u-1),h=e*(p.coordinate+e*d/2-f);a[u-1]=p=mn(mn({},p),{},{tickCoord:h>0?p.coordinate-h*e:p.coordinate});var m=Gv(e,p.tickCoord,function(){return d},l,f);m&&(f=p.tickCoord-e*(d/2+i),a[u-1]=mn(mn({},p),{},{isShow:!0}))}for(var y=o?u-1:u,g=function(x){var S=a[x],P,O=function(){return P===void 0&&(P=n(S,x)),P};if(x===0){var E=e*(S.coordinate-e*O()/2-l);a[x]=S=mn(mn({},S),{},{tickCoord:E<0?S.coordinate-E*e:S.coordinate})}else a[x]=S=mn(mn({},S),{},{tickCoord:S.coordinate});var T=Gv(e,S.tickCoord,O,l,f);T&&(l=S.tickCoord+e*(O()/2+i),a[x]=mn(mn({},S),{},{isShow:!0}))},w=0;w=2?ri(i[1].coordinate-i[0].coordinate):1,b=Tve(o,w,m);return l==="equidistantPreserveStart"?$ve(w,b,g,i,a):(l==="preserveStart"||l==="preserveStartEnd"?h=kve(w,b,g,i,a,l==="preserveStartEnd"):h=jve(w,b,g,i,a),h.filter(function(x){return x.isShow}))}var Dve=["viewBox"],Lve=["viewBox"],Fve=["ticks"];function yl(e){"@babel/helpers - typeof";return yl=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},yl(e)}function wu(){return wu=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 Bve(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 Uve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d$(e,t){for(var n=0;n0?l(this.props):l(m)),a<=0||u<=0||!y||!y.length?null:W.createElement(en,{className:et("recharts-cartesian-axis",f),ref:function(w){r.layerReference=w}},o&&this.renderAxisLine(),this.renderTicks(y,this.state.fontSize,this.state.letterSpacing),yn.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,o){var a;return W.isValidElement(r)?a=W.cloneElement(r,i):Ge(r)?a=r(i):a=W.createElement(vv,wu({},i,{className:"recharts-cartesian-axis-tick-value"}),o),a}}])}(A.Component);f_(Wl,"displayName","CartesianAxis");f_(Wl,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var Vve=["x1","y1","x2","y2","key"],Xve=["offset"];function Os(e){"@babel/helpers - typeof";return Os=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},Os(e)}function p$(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 bn(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Jve(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 eme=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,i=t.x,o=t.y,a=t.width,u=t.height,l=t.ry;return W.createElement("rect",{x:i,y:o,ry:l,width:a,height:u,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function tD(e,t){var n;if(W.isValidElement(e))n=W.cloneElement(e,t);else if(Ge(e))n=e(t);else{var r=t.x1,i=t.y1,o=t.x2,a=t.y2,u=t.key,l=h$(t,Vve),f=Je(l,!1);f.offset;var p=h$(f,Xve);n=W.createElement("line",es({},p,{x1:r,y1:i,x2:o,y2:a,fill:"none",key:u}))}return n}function tme(e){var t=e.x,n=e.width,r=e.horizontal,i=r===void 0?!0:r,o=e.horizontalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(u,l){var f=bn(bn({},e),{},{x1:t,y1:u,x2:t+n,y2:u,key:"line-".concat(l),index:l});return tD(i,f)});return W.createElement("g",{className:"recharts-cartesian-grid-horizontal"},a)}function nme(e){var t=e.y,n=e.height,r=e.vertical,i=r===void 0?!0:r,o=e.verticalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(u,l){var f=bn(bn({},e),{},{x1:u,y1:t,x2:u,y2:t+n,key:"line-".concat(l),index:l});return tD(i,f)});return W.createElement("g",{className:"recharts-cartesian-grid-vertical"},a)}function rme(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,o=e.width,a=e.height,u=e.horizontalPoints,l=e.horizontal,f=l===void 0?!0:l;if(!f||!t||!t.length)return null;var p=u.map(function(h){return Math.round(h+i-i)}).sort(function(h,m){return h-m});i!==p[0]&&p.unshift(0);var d=p.map(function(h,m){var y=!p[m+1],g=y?i+a-h:p[m+1]-h;if(g<=0)return null;var w=m%t.length;return W.createElement("rect",{key:"react-".concat(m),y:h,x:r,height:g,width:o,stroke:"none",fill:t[w],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return W.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function ime(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,i=e.fillOpacity,o=e.x,a=e.y,u=e.width,l=e.height,f=e.verticalPoints;if(!n||!r||!r.length)return null;var p=f.map(function(h){return Math.round(h+o-o)}).sort(function(h,m){return h-m});o!==p[0]&&p.unshift(0);var d=p.map(function(h,m){var y=!p[m+1],g=y?o+u-h:p[m+1]-h;if(g<=0)return null;var w=m%r.length;return W.createElement("rect",{key:"react-".concat(m),x:h,y:a,width:g,height:l,stroke:"none",fill:r[w],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return W.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var ome=function(t,n){var r=t.xAxis,i=t.width,o=t.height,a=t.offset;return lk(c_(bn(bn(bn({},Wl.defaultProps),r),{},{ticks:ro(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),a.left,a.left+a.width,n)},ame=function(t,n){var r=t.yAxis,i=t.width,o=t.height,a=t.offset;return lk(c_(bn(bn(bn({},Wl.defaultProps),r),{},{ticks:ro(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),a.top,a.top+a.height,n)},ru={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function d_(e){var t,n,r,i,o,a,u=a_(),l=s_(),f=qhe(),p=bn(bn({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:ru.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:ru.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:ru.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:ru.horizontalFill,vertical:(o=e.vertical)!==null&&o!==void 0?o:ru.vertical,verticalFill:(a=e.verticalFill)!==null&&a!==void 0?a:ru.verticalFill,x:ce(e.x)?e.x:f.left,y:ce(e.y)?e.y:f.top,width:ce(e.width)?e.width:f.width,height:ce(e.height)?e.height:f.height}),d=p.x,h=p.y,m=p.width,y=p.height,g=p.syncWithTicks,w=p.horizontalValues,b=p.verticalValues,x=Hhe(),S=Khe();if(!ce(m)||m<=0||!ce(y)||y<=0||!ce(d)||d!==+d||!ce(h)||h!==+h)return null;var P=p.verticalCoordinatesGenerator||ome,O=p.horizontalCoordinatesGenerator||ame,E=p.horizontalPoints,T=p.verticalPoints;if((!E||!E.length)&&Ge(O)){var R=w&&w.length,I=O({yAxis:S?bn(bn({},S),{},{ticks:R?w:S.ticks}):void 0,width:u,height:l,offset:f},R?!0:g);ao(Array.isArray(I),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Os(I),"]")),Array.isArray(I)&&(E=I)}if((!T||!T.length)&&Ge(P)){var B=b&&b.length,k=P({xAxis:x?bn(bn({},x),{},{ticks:B?b:x.ticks}):void 0,width:u,height:l,offset:f},B?!0:g);ao(Array.isArray(k),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Os(k),"]")),Array.isArray(k)&&(T=k)}return W.createElement("g",{className:"recharts-cartesian-grid"},W.createElement(eme,{fill:p.fill,fillOpacity:p.fillOpacity,x:p.x,y:p.y,width:p.width,height:p.height,ry:p.ry}),W.createElement(tme,es({},p,{offset:f,horizontalPoints:E,xAxis:x,yAxis:S})),W.createElement(nme,es({},p,{offset:f,verticalPoints:T,xAxis:x,yAxis:S})),W.createElement(rme,es({},p,{horizontalPoints:E})),W.createElement(ime,es({},p,{verticalPoints:T})))}d_.displayName="CartesianGrid";function bl(e){"@babel/helpers - typeof";return bl=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},bl(e)}function sme(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ume(e,t){for(var n=0;ne.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 Vme(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 Xme(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Yme(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?a:t&&t.length&&ce(i)&&ce(o)?t.slice(i,o+1):[]};function vD(e){return e==="number"?[0,"auto"]:void 0}var Tx=function(t,n,r,i){var o=t.graphicalItems,a=t.tooltipAxis,u=pg(n,t);return r<0||!o||!o.length||r>=u.length?null:o.reduce(function(l,f){var p,d=(p=f.props.data)!==null&&p!==void 0?p:n;d&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(d=d.slice(t.dataStartIndex,t.dataEndIndex+1));var h;if(a.dataKey&&!a.allowDuplicatedCategory){var m=d===void 0?u:d;h=uw(m,a.dataKey,i)}else h=d&&d[r]||u[r];return h?[].concat(Sl(l),[fk(f,h)]):l},[])},w$=function(t,n,r,i){var o=i||{x:t.chartX,y:t.chartY},a=uge(o,r),u=t.orderedTooltipTicks,l=t.tooltipAxis,f=t.tooltipTicks,p=que(a,u,f,l);if(p>=0&&f){var d=f[p]&&f[p].value,h=Tx(t,n,p,d),m=lge(r,u,p,o);return{activeTooltipIndex:p,activeLabel:d,activePayload:h,activeCoordinate:m}}return null},cge=function(t,n){var r=n.axes,i=n.graphicalItems,o=n.axisType,a=n.axisIdKey,u=n.stackGroups,l=n.dataStartIndex,f=n.dataEndIndex,p=t.layout,d=t.children,h=t.stackOffset,m=uk(p,o);return r.reduce(function(y,g){var w,b=g.type.defaultProps!==void 0?te(te({},g.type.defaultProps),g.props):g.props,x=b.type,S=b.dataKey,P=b.allowDataOverflow,O=b.allowDuplicatedCategory,E=b.scale,T=b.ticks,R=b.includeHidden,I=b[a];if(y[I])return y;var B=pg(t.data,{graphicalItems:i.filter(function(ae){var be,Ce=a in ae.props?ae.props[a]:(be=ae.type.defaultProps)===null||be===void 0?void 0:be[a];return Ce===I}),dataStartIndex:l,dataEndIndex:f}),k=B.length,U,V,q;kme(b.domain,P,x)&&(U=Xw(b.domain,null,P),m&&(x==="number"||E!=="auto")&&(q=nf(B,S,"category")));var X=vD(x);if(!U||U.length===0){var G,Y=(G=b.domain)!==null&&G!==void 0?G:X;if(S){if(U=nf(B,S,x),x==="category"&&m){var F=jV(U);O&&F?(V=U,U=Lv(0,k)):O||(U=eM(Y,U,g).reduce(function(ae,be){return ae.indexOf(be)>=0?ae:[].concat(Sl(ae),[be])},[]))}else if(x==="category")O?U=U.filter(function(ae){return ae!==""&&!rt(ae)}):U=eM(Y,U,g).reduce(function(ae,be){return ae.indexOf(be)>=0||be===""||rt(be)?ae:[].concat(Sl(ae),[be])},[]);else if(x==="number"){var z=Zue(B,i.filter(function(ae){var be,Ce,Ne=a in ae.props?ae.props[a]:(be=ae.type.defaultProps)===null||be===void 0?void 0:be[a],Le="hide"in ae.props?ae.props.hide:(Ce=ae.type.defaultProps)===null||Ce===void 0?void 0:Ce.hide;return Ne===I&&(R||!Le)}),S,o,p);z&&(U=z)}m&&(x==="number"||E!=="auto")&&(q=nf(B,S,"category"))}else m?U=Lv(0,k):u&&u[I]&&u[I].hasStack&&x==="number"?U=h==="expand"?[0,1]:ck(u[I].stackGroups,l,f):U=sk(B,i.filter(function(ae){var be=a in ae.props?ae.props[a]:ae.type.defaultProps[a],Ce="hide"in ae.props?ae.props.hide:ae.type.defaultProps.hide;return be===I&&(R||!Ce)}),x,p,!0);if(x==="number")U=Ex(d,U,I,o,T),Y&&(U=Xw(Y,U,P));else if(x==="category"&&Y){var ee=Y,oe=U.every(function(ae){return ee.indexOf(ae)>=0});oe&&(U=ee)}}return te(te({},y),{},Te({},I,te(te({},b),{},{axisType:o,domain:U,categoricalDomain:q,duplicateDomain:V,originalDomain:(w=b.domain)!==null&&w!==void 0?w:X,isCategorical:m,layout:p})))},{})},fge=function(t,n){var r=n.graphicalItems,i=n.Axis,o=n.axisType,a=n.axisIdKey,u=n.stackGroups,l=n.dataStartIndex,f=n.dataEndIndex,p=t.layout,d=t.children,h=pg(t.data,{graphicalItems:r,dataStartIndex:l,dataEndIndex:f}),m=h.length,y=uk(p,o),g=-1;return r.reduce(function(w,b){var x=b.type.defaultProps!==void 0?te(te({},b.type.defaultProps),b.props):b.props,S=x[a],P=vD("number");if(!w[S]){g++;var O;return y?O=Lv(0,m):u&&u[S]&&u[S].hasStack?(O=ck(u[S].stackGroups,l,f),O=Ex(d,O,S,o)):(O=Xw(P,sk(h,r.filter(function(E){var T,R,I=a in E.props?E.props[a]:(T=E.type.defaultProps)===null||T===void 0?void 0:T[a],B="hide"in E.props?E.props.hide:(R=E.type.defaultProps)===null||R===void 0?void 0:R.hide;return I===S&&!B}),"number",p),i.defaultProps.allowDataOverflow),O=Ex(d,O,S,o)),te(te({},w),{},Te({},S,te(te({axisType:o},i.defaultProps),{},{hide:!0,orientation:jr(age,"".concat(o,".").concat(g%2),null),domain:O,originalDomain:P,isCategorical:y,layout:p})))}return w},{})},dge=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,o=n.AxisComp,a=n.graphicalItems,u=n.stackGroups,l=n.dataStartIndex,f=n.dataEndIndex,p=t.children,d="".concat(i,"Id"),h=ai(p,o),m={};return h&&h.length?m=cge(t,{axes:h,graphicalItems:a,axisType:i,axisIdKey:d,stackGroups:u,dataStartIndex:l,dataEndIndex:f}):a&&a.length&&(m=fge(t,{Axis:o,graphicalItems:a,axisType:i,axisIdKey:d,stackGroups:u,dataStartIndex:l,dataEndIndex:f})),m},pge=function(t){var n=Ko(t),r=ro(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:CS(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:Tv(n,r)}},x$=function(t){var n=t.children,r=t.defaultShowTooltip,i=sr(n,pl),o=0,a=0;return t.data&&t.data.length!==0&&(a=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(o=i.props.startIndex),i.props.endIndex>=0&&(a=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:a,activeTooltipIndex:-1,isTooltipActive:!!r}},hge=function(t){return!t||!t.length?!1:t.some(function(n){var r=oo(n&&n.type);return r&&r.indexOf("Bar")>=0})},S$=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},vge=function(t,n){var r=t.props,i=t.graphicalItems,o=t.xAxisMap,a=o===void 0?{}:o,u=t.yAxisMap,l=u===void 0?{}:u,f=r.width,p=r.height,d=r.children,h=r.margin||{},m=sr(d,pl),y=sr(d,Tu),g=Object.keys(l).reduce(function(O,E){var T=l[E],R=T.orientation;return!T.mirror&&!T.hide?te(te({},O),{},Te({},R,O[R]+T.width)):O},{left:h.left||0,right:h.right||0}),w=Object.keys(a).reduce(function(O,E){var T=a[E],R=T.orientation;return!T.mirror&&!T.hide?te(te({},O),{},Te({},R,jr(O,"".concat(R))+T.height)):O},{top:h.top||0,bottom:h.bottom||0}),b=te(te({},w),g),x=b.bottom;m&&(b.bottom+=m.props.height||pl.defaultProps.height),y&&n&&(b=Yue(b,i,r,n));var S=f-b.left-b.right,P=p-b.top-b.bottom;return te(te({brushBottom:x},b),{},{width:Math.max(S,0),height:Math.max(P,0)})},mge=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},gge=function(t){var n=t.chartName,r=t.GraphicalChild,i=t.defaultTooltipEventType,o=i===void 0?"axis":i,a=t.validateTooltipEventTypes,u=a===void 0?["axis"]:a,l=t.axisComponents,f=t.legendContent,p=t.formatAxisMap,d=t.defaultProps,h=function(b,x){var S=x.graphicalItems,P=x.stackGroups,O=x.offset,E=x.updateId,T=x.dataStartIndex,R=x.dataEndIndex,I=b.barSize,B=b.layout,k=b.barGap,U=b.barCategoryGap,V=b.maxBarSize,q=S$(B),X=q.numericAxisName,G=q.cateAxisName,Y=hge(S),F=[];return S.forEach(function(z,ee){var oe=pg(b.data,{graphicalItems:[z],dataStartIndex:T,dataEndIndex:R}),ae=z.type.defaultProps!==void 0?te(te({},z.type.defaultProps),z.props):z.props,be=ae.dataKey,Ce=ae.maxBarSize,Ne=ae["".concat(X,"Id")],Le=ae["".concat(G,"Id")],me={},Ae=l.reduce(function(zt,Qn){var _o=x["".concat(Qn.axisType,"Map")],Dd=ae["".concat(Qn.axisType,"Id")];_o&&_o[Dd]||Qn.axisType==="zAxis"||_s();var Oo=_o[Dd];return te(te({},zt),{},Te(Te({},Qn.axisType,Oo),"".concat(Qn.axisType,"Ticks"),ro(Oo)))},me),se=Ae[G],de=Ae["".concat(G,"Ticks")],pe=P&&P[Ne]&&P[Ne].hasStack&&cle(z,P[Ne].stackGroups),J=oo(z.type).indexOf("Bar")>=0,Ue=Tv(se,de),xe=[],Qe=Y&&Vue({barSize:I,stackGroups:P,totalSize:mge(Ae,G)});if(J){var ft,tt,Xn=rt(Ce)?V:Ce,Yn=(ft=(tt=Tv(se,de,!0))!==null&&tt!==void 0?tt:Xn)!==null&&ft!==void 0?ft:0;xe=Xue({barGap:k,barCategoryGap:U,bandSize:Yn!==Ue?Yn:Ue,sizeList:Qe[Le],maxBarSize:Xn}),Yn!==Ue&&(xe=xe.map(function(zt){return te(te({},zt),{},{position:te(te({},zt.position),{},{offset:zt.position.offset-Yn/2})})}))}var pi=z&&z.type&&z.type.getComposedData;pi&&F.push({props:te(te({},pi(te(te({},Ae),{},{displayedData:oe,props:b,dataKey:be,item:z,bandSize:Ue,barPosition:xe,offset:O,stackedData:pe,layout:B,dataStartIndex:T,dataEndIndex:R}))),{},Te(Te(Te({key:z.key||"item-".concat(ee)},X,Ae[X]),G,Ae[G]),"animationId",E)),childIndex:GV(z,b.children),item:z})}),F},m=function(b,x){var S=b.props,P=b.dataStartIndex,O=b.dataEndIndex,E=b.updateId;if(!VA({props:S}))return null;var T=S.children,R=S.layout,I=S.stackOffset,B=S.data,k=S.reverseStackOrder,U=S$(R),V=U.numericAxisName,q=U.cateAxisName,X=ai(T,r),G=sle(B,X,"".concat(V,"Id"),"".concat(q,"Id"),I,k),Y=l.reduce(function(ae,be){var Ce="".concat(be.axisType,"Map");return te(te({},ae),{},Te({},Ce,dge(S,te(te({},be),{},{graphicalItems:X,stackGroups:be.axisType===V&&G,dataStartIndex:P,dataEndIndex:O}))))},{}),F=vge(te(te({},Y),{},{props:S,graphicalItems:X}),x==null?void 0:x.legendBBox);Object.keys(Y).forEach(function(ae){Y[ae]=p(S,Y[ae],F,ae.replace("Map",""),n)});var z=Y["".concat(q,"Map")],ee=pge(z),oe=h(S,te(te({},Y),{},{dataStartIndex:P,dataEndIndex:O,updateId:E,graphicalItems:X,stackGroups:G,offset:F}));return te(te({formattedGraphicalItems:oe,graphicalItems:X,offset:F,stackGroups:G},ee),Y)},y=function(w){function b(x){var S,P,O;return Xme(this,b),O=Zme(this,b,[x]),Te(O,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Te(O,"accessibilityManager",new jme),Te(O,"handleLegendBBoxUpdate",function(E){if(E){var T=O.state,R=T.dataStartIndex,I=T.dataEndIndex,B=T.updateId;O.setState(te({legendBBox:E},m({props:O.props,dataStartIndex:R,dataEndIndex:I,updateId:B},te(te({},O.state),{},{legendBBox:E}))))}}),Te(O,"handleReceiveSyncEvent",function(E,T,R){if(O.props.syncId===E){if(R===O.eventEmitterSymbol&&typeof O.props.syncMethod!="function")return;O.applySyncEvent(T)}}),Te(O,"handleBrushChange",function(E){var T=E.startIndex,R=E.endIndex;if(T!==O.state.dataStartIndex||R!==O.state.dataEndIndex){var I=O.state.updateId;O.setState(function(){return te({dataStartIndex:T,dataEndIndex:R},m({props:O.props,dataStartIndex:T,dataEndIndex:R,updateId:I},O.state))}),O.triggerSyncEvent({dataStartIndex:T,dataEndIndex:R})}}),Te(O,"handleMouseEnter",function(E){var T=O.getMouseInfo(E);if(T){var R=te(te({},T),{},{isTooltipActive:!0});O.setState(R),O.triggerSyncEvent(R);var I=O.props.onMouseEnter;Ge(I)&&I(R,E)}}),Te(O,"triggeredAfterMouseMove",function(E){var T=O.getMouseInfo(E),R=T?te(te({},T),{},{isTooltipActive:!0}):{isTooltipActive:!1};O.setState(R),O.triggerSyncEvent(R);var I=O.props.onMouseMove;Ge(I)&&I(R,E)}),Te(O,"handleItemMouseEnter",function(E){O.setState(function(){return{isTooltipActive:!0,activeItem:E,activePayload:E.tooltipPayload,activeCoordinate:E.tooltipPosition||{x:E.cx,y:E.cy}}})}),Te(O,"handleItemMouseLeave",function(){O.setState(function(){return{isTooltipActive:!1}})}),Te(O,"handleMouseMove",function(E){E.persist(),O.throttleTriggeredAfterMouseMove(E)}),Te(O,"handleMouseLeave",function(E){O.throttleTriggeredAfterMouseMove.cancel();var T={isTooltipActive:!1};O.setState(T),O.triggerSyncEvent(T);var R=O.props.onMouseLeave;Ge(R)&&R(T,E)}),Te(O,"handleOuterEvent",function(E){var T=KV(E),R=jr(O.props,"".concat(T));if(T&&Ge(R)){var I,B;/.*touch.*/i.test(T)?B=O.getMouseInfo(E.changedTouches[0]):B=O.getMouseInfo(E),R((I=B)!==null&&I!==void 0?I:{},E)}}),Te(O,"handleClick",function(E){var T=O.getMouseInfo(E);if(T){var R=te(te({},T),{},{isTooltipActive:!0});O.setState(R),O.triggerSyncEvent(R);var I=O.props.onClick;Ge(I)&&I(R,E)}}),Te(O,"handleMouseDown",function(E){var T=O.props.onMouseDown;if(Ge(T)){var R=O.getMouseInfo(E);T(R,E)}}),Te(O,"handleMouseUp",function(E){var T=O.props.onMouseUp;if(Ge(T)){var R=O.getMouseInfo(E);T(R,E)}}),Te(O,"handleTouchMove",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&O.throttleTriggeredAfterMouseMove(E.changedTouches[0])}),Te(O,"handleTouchStart",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&O.handleMouseDown(E.changedTouches[0])}),Te(O,"handleTouchEnd",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&O.handleMouseUp(E.changedTouches[0])}),Te(O,"triggerSyncEvent",function(E){O.props.syncId!==void 0&&Y0.emit(Q0,O.props.syncId,E,O.eventEmitterSymbol)}),Te(O,"applySyncEvent",function(E){var T=O.props,R=T.layout,I=T.syncMethod,B=O.state.updateId,k=E.dataStartIndex,U=E.dataEndIndex;if(E.dataStartIndex!==void 0||E.dataEndIndex!==void 0)O.setState(te({dataStartIndex:k,dataEndIndex:U},m({props:O.props,dataStartIndex:k,dataEndIndex:U,updateId:B},O.state)));else if(E.activeTooltipIndex!==void 0){var V=E.chartX,q=E.chartY,X=E.activeTooltipIndex,G=O.state,Y=G.offset,F=G.tooltipTicks;if(!Y)return;if(typeof I=="function")X=I(F,E);else if(I==="value"){X=-1;for(var z=0;z=0){var pe,J;if(V.dataKey&&!V.allowDuplicatedCategory){var Ue=typeof V.dataKey=="function"?de:"payload.".concat(V.dataKey.toString());pe=uw(z,Ue,X),J=ee&&oe&&uw(oe,Ue,X)}else pe=z==null?void 0:z[q],J=ee&&oe&&oe[q];if(Le||Ne){var xe=E.props.activeIndex!==void 0?E.props.activeIndex:q;return[A.cloneElement(E,te(te(te({},I.props),Ae),{},{activeIndex:xe})),null,null]}if(!rt(pe))return[se].concat(Sl(O.renderActivePoints({item:I,activePoint:pe,basePoint:J,childIndex:q,isRange:ee})))}else{var Qe,ft=(Qe=O.getItemByXY(O.state.activeCoordinate))!==null&&Qe!==void 0?Qe:{graphicalItem:se},tt=ft.graphicalItem,Xn=tt.item,Yn=Xn===void 0?E:Xn,pi=tt.childIndex,zt=te(te(te({},I.props),Ae),{},{activeIndex:pi});return[A.cloneElement(Yn,zt),null,null]}return ee?[se,null,null]:[se,null]}),Te(O,"renderCustomized",function(E,T,R){return A.cloneElement(E,te(te({key:"recharts-customized-".concat(R)},O.props),O.state))}),Te(O,"renderMap",{CartesianGrid:{handler:rh,once:!0},ReferenceArea:{handler:O.renderReferenceElement},ReferenceLine:{handler:rh},ReferenceDot:{handler:O.renderReferenceElement},XAxis:{handler:rh},YAxis:{handler:rh},Brush:{handler:O.renderBrush,once:!0},Bar:{handler:O.renderGraphicChild},Line:{handler:O.renderGraphicChild},Area:{handler:O.renderGraphicChild},Radar:{handler:O.renderGraphicChild},RadialBar:{handler:O.renderGraphicChild},Scatter:{handler:O.renderGraphicChild},Pie:{handler:O.renderGraphicChild},Funnel:{handler:O.renderGraphicChild},Tooltip:{handler:O.renderCursor,once:!0},PolarGrid:{handler:O.renderPolarGrid,once:!0},PolarAngleAxis:{handler:O.renderPolarAxis},PolarRadiusAxis:{handler:O.renderPolarAxis},Customized:{handler:O.renderCustomized}}),O.clipPathId="".concat((S=x.id)!==null&&S!==void 0?S:Um("recharts"),"-clip"),O.throttleTriggeredAfterMouseMove=ij(O.triggeredAfterMouseMove,(P=x.throttleDelay)!==null&&P!==void 0?P:1e3/60),O.state={},O}return tge(b,w),Qme(b,[{key:"componentDidMount",value:function(){var S,P;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(S=this.props.margin.left)!==null&&S!==void 0?S:0,top:(P=this.props.margin.top)!==null&&P!==void 0?P:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var S=this.props,P=S.children,O=S.data,E=S.height,T=S.layout,R=sr(P,bi);if(R){var I=R.props.defaultIndex;if(!(typeof I!="number"||I<0||I>this.state.tooltipTicks.length-1)){var B=this.state.tooltipTicks[I]&&this.state.tooltipTicks[I].value,k=Tx(this.state,O,I,B),U=this.state.tooltipTicks[I].coordinate,V=(this.state.offset.top+E)/2,q=T==="horizontal",X=q?{x:U,y:V}:{y:U,x:V},G=this.state.formattedGraphicalItems.find(function(F){var z=F.item;return z.type.name==="Scatter"});G&&(X=te(te({},X),G.props.points[I].tooltipPosition),k=G.props.points[I].tooltipPayload);var Y={activeTooltipIndex:I,isTooltipActive:!0,activeLabel:B,activePayload:k,activeCoordinate:X};this.setState(Y),this.renderCursor(R),this.accessibilityManager.setIndex(I)}}}},{key:"getSnapshotBeforeUpdate",value:function(S,P){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==P.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==S.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==S.margin){var O,E;this.accessibilityManager.setDetails({offset:{left:(O=this.props.margin.left)!==null&&O!==void 0?O:0,top:(E=this.props.margin.top)!==null&&E!==void 0?E:0}})}return null}},{key:"componentDidUpdate",value:function(S){cw([sr(S.children,bi)],[sr(this.props.children,bi)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var S=sr(this.props.children,bi);if(S&&typeof S.props.shared=="boolean"){var P=S.props.shared?"axis":"item";return u.indexOf(P)>=0?P:o}return o}},{key:"getMouseInfo",value:function(S){if(!this.container)return null;var P=this.container,O=P.getBoundingClientRect(),E=bie(O),T={chartX:Math.round(S.pageX-E.left),chartY:Math.round(S.pageY-E.top)},R=O.width/P.offsetWidth||1,I=this.inRange(T.chartX,T.chartY,R);if(!I)return null;var B=this.state,k=B.xAxisMap,U=B.yAxisMap,V=this.getTooltipEventType();if(V!=="axis"&&k&&U){var q=Ko(k).scale,X=Ko(U).scale,G=q&&q.invert?q.invert(T.chartX):null,Y=X&&X.invert?X.invert(T.chartY):null;return te(te({},T),{},{xValue:G,yValue:Y})}var F=w$(this.state,this.props.data,this.props.layout,I);return F?te(te({},T),F):null}},{key:"inRange",value:function(S,P){var O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,E=this.props.layout,T=S/O,R=P/O;if(E==="horizontal"||E==="vertical"){var I=this.state.offset,B=T>=I.left&&T<=I.left+I.width&&R>=I.top&&R<=I.top+I.height;return B?{x:T,y:R}:null}var k=this.state,U=k.angleAxisMap,V=k.radiusAxisMap;if(U&&V){var q=Ko(U);return rM({x:T,y:R},q)}return null}},{key:"parseEventsOfWrapper",value:function(){var S=this.props.children,P=this.getTooltipEventType(),O=sr(S,bi),E={};O&&P==="axis"&&(O.props.trigger==="click"?E={onClick:this.handleClick}:E={onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd});var T=ev(this.props,this.handleOuterEvent);return te(te({},T),E)}},{key:"addListener",value:function(){Y0.on(Q0,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){Y0.removeListener(Q0,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(S,P,O){for(var E=this.state.formattedGraphicalItems,T=0,R=E.length;T{const t=wge(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const u=a.split(p_);return u[0]===""&&u.length!==1&&u.shift(),gD(u,t)||bge(a)},getConflictingClassGroupIds:(a,u)=>{const l=n[a]||[];return u&&r[a]?[...l,...r[a]]:l}}},gD=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?gD(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(p_);return(a=t.validators.find(({validator:u})=>u(o)))==null?void 0:a.classGroupId},_$=/^\[(.+)\]$/,bge=e=>{if(_$.test(e)){const t=_$.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},wge=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Sge(Object.entries(e.classGroups),n).forEach(([o,a])=>{Mx(a,r,o,t)}),r},Mx=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:O$(t,i);o.classGroupId=n;return}if(typeof i=="function"){if(xge(i)){Mx(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([o,a])=>{Mx(a,O$(t,o),n,r)})})},O$=(e,t)=>{let n=e;return t.split(p_).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},xge=e=>e.isThemeGetter,Sge=(e,t)=>t?e.map(([n,r])=>{const i=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([a,u])=>[t+a,u])):o);return[n,i]}):e,_ge=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(o,a)=>{n.set(o,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let a=n.get(o);if(a!==void 0)return a;if((a=r.get(o))!==void 0)return i(o,a),a},set(o,a){n.has(o)?n.set(o,a):i(o,a)}}},yD="!",Oge=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],o=t.length,a=u=>{const l=[];let f=0,p=0,d;for(let w=0;wp?d-p:void 0;return{modifiers:l,hasImportantModifier:m,baseClassName:y,maybePostfixModifierPosition:g}};return n?u=>n({className:u,parseClassName:a}):a},Pge=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},Ege=e=>({cache:_ge(e.cacheSize),parseClassName:Oge(e),...yge(e)}),Age=/\s+/,Cge=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,o=[],a=e.trim().split(Age);let u="";for(let l=a.length-1;l>=0;l-=1){const f=a[l],{modifiers:p,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:m}=n(f);let y=!!m,g=r(y?h.substring(0,m):h);if(!g){if(!y){u=f+(u.length>0?" "+u:u);continue}if(g=r(h),!g){u=f+(u.length>0?" "+u:u);continue}y=!1}const w=Pge(p).join(":"),b=d?w+yD:w,x=b+g;if(o.includes(x))continue;o.push(x);const S=i(g,y);for(let P=0;P0?" "+u:u)}return u};function Tge(){let e=0,t,n,r="";for(;e{if(typeof e=="string")return e;let t,n="";for(let r=0;rd(p),e());return n=Ege(f),r=n.cache.get,i=n.cache.set,o=u,u(l)}function u(l){const f=r(l);if(f)return f;const p=Cge(l,n);return i(l,p),p}return function(){return o(Tge.apply(null,arguments))}}const yt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},wD=/^\[(?:([a-z-]+):)?(.+)\]$/i,$ge=/^\d+\/\d+$/,Rge=new Set(["px","full","screen"]),Nge=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ige=/\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$/,jge=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,kge=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Dge=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,qi=e=>Ru(e)||Rge.has(e)||$ge.test(e),jo=e=>Hl(e,"length",Kge),Ru=e=>!!e&&!Number.isNaN(Number(e)),J0=e=>Hl(e,"number",Ru),Nc=e=>!!e&&Number.isInteger(Number(e)),Lge=e=>e.endsWith("%")&&Ru(e.slice(0,-1)),je=e=>wD.test(e),ko=e=>Nge.test(e),Fge=new Set(["length","size","percentage"]),Bge=e=>Hl(e,Fge,xD),Uge=e=>Hl(e,"position",xD),zge=new Set(["image","url"]),Wge=e=>Hl(e,zge,qge),Hge=e=>Hl(e,"",Gge),Ic=()=>!0,Hl=(e,t,n)=>{const r=wD.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},Kge=e=>Ige.test(e)&&!jge.test(e),xD=()=>!1,Gge=e=>kge.test(e),qge=e=>Dge.test(e),Vge=()=>{const e=yt("colors"),t=yt("spacing"),n=yt("blur"),r=yt("brightness"),i=yt("borderColor"),o=yt("borderRadius"),a=yt("borderSpacing"),u=yt("borderWidth"),l=yt("contrast"),f=yt("grayscale"),p=yt("hueRotate"),d=yt("invert"),h=yt("gap"),m=yt("gradientColorStops"),y=yt("gradientColorStopPositions"),g=yt("inset"),w=yt("margin"),b=yt("opacity"),x=yt("padding"),S=yt("saturate"),P=yt("scale"),O=yt("sepia"),E=yt("skew"),T=yt("space"),R=yt("translate"),I=()=>["auto","contain","none"],B=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto",je,t],U=()=>[je,t],V=()=>["",qi,jo],q=()=>["auto",Ru,je],X=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],G=()=>["solid","dashed","dotted","double","none"],Y=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],F=()=>["start","end","center","between","around","evenly","stretch"],z=()=>["","0",je],ee=()=>["auto","avoid","all","avoid-page","page","left","right","column"],oe=()=>[Ru,je];return{cacheSize:500,separator:":",theme:{colors:[Ic],spacing:[qi,jo],blur:["none","",ko,je],brightness:oe(),borderColor:[e],borderRadius:["none","","full",ko,je],borderSpacing:U(),borderWidth:V(),contrast:oe(),grayscale:z(),hueRotate:oe(),invert:z(),gap:U(),gradientColorStops:[e],gradientColorStopPositions:[Lge,jo],inset:k(),margin:k(),opacity:oe(),padding:U(),saturate:oe(),scale:oe(),sepia:z(),skew:oe(),space:U(),translate:U()},classGroups:{aspect:[{aspect:["auto","square","video",je]}],container:["container"],columns:[{columns:[ko]}],"break-after":[{"break-after":ee()}],"break-before":[{"break-before":ee()}],"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:[...X(),je]}],overflow:[{overflow:B()}],"overflow-x":[{"overflow-x":B()}],"overflow-y":[{"overflow-y":B()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Nc,je]}],basis:[{basis:k()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",je]}],grow:[{grow:z()}],shrink:[{shrink:z()}],order:[{order:["first","last","none",Nc,je]}],"grid-cols":[{"grid-cols":[Ic]}],"col-start-end":[{col:["auto",{span:["full",Nc,je]},je]}],"col-start":[{"col-start":q()}],"col-end":[{"col-end":q()}],"grid-rows":[{"grid-rows":[Ic]}],"row-start-end":[{row:["auto",{span:[Nc,je]},je]}],"row-start":[{"row-start":q()}],"row-end":[{"row-end":q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",je]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",je]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...F()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...F(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...F(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[T]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[T]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",je,t]}],"min-w":[{"min-w":[je,t,"min","max","fit"]}],"max-w":[{"max-w":[je,t,"none","full","min","max","fit","prose",{screen:[ko]},ko]}],h:[{h:[je,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[je,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[je,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[je,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ko,jo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",J0]}],"font-family":[{font:[Ic]}],"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-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",je]}],"line-clamp":[{"line-clamp":["none",Ru,J0]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",qi,je]}],"list-image":[{"list-image":["none",je]}],"list-style-type":[{list:["none","disc","decimal",je]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...G(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",qi,jo]}],"underline-offset":[{"underline-offset":["auto",qi,je]}],"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:U()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",je]}],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",je]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...X(),Uge]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Bge]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Wge]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[u]}],"border-w-x":[{"border-x":[u]}],"border-w-y":[{"border-y":[u]}],"border-w-s":[{"border-s":[u]}],"border-w-e":[{"border-e":[u]}],"border-w-t":[{"border-t":[u]}],"border-w-r":[{"border-r":[u]}],"border-w-b":[{"border-b":[u]}],"border-w-l":[{"border-l":[u]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[...G(),"hidden"]}],"divide-x":[{"divide-x":[u]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[u]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:G()}],"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:["",...G()]}],"outline-offset":[{"outline-offset":[qi,je]}],"outline-w":[{outline:[qi,jo]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:V()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[qi,jo]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ko,Hge]}],"shadow-color":[{shadow:[Ic]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...Y(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Y()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",ko,je]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[d]}],saturate:[{saturate:[S]}],sepia:[{sepia:[O]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[S]}],"backdrop-sepia":[{"backdrop-sepia":[O]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",je]}],duration:[{duration:oe()}],ease:[{ease:["linear","in","out","in-out",je]}],delay:[{delay:oe()}],animate:[{animate:["none","spin","ping","pulse","bounce",je]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[P]}],"scale-x":[{"scale-x":[P]}],"scale-y":[{"scale-y":[P]}],rotate:[{rotate:[Nc,je]}],"translate-x":[{"translate-x":[R]}],"translate-y":[{"translate-y":[R]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",je]}],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",je]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":U()}],"scroll-mx":[{"scroll-mx":U()}],"scroll-my":[{"scroll-my":U()}],"scroll-ms":[{"scroll-ms":U()}],"scroll-me":[{"scroll-me":U()}],"scroll-mt":[{"scroll-mt":U()}],"scroll-mr":[{"scroll-mr":U()}],"scroll-mb":[{"scroll-mb":U()}],"scroll-ml":[{"scroll-ml":U()}],"scroll-p":[{"scroll-p":U()}],"scroll-px":[{"scroll-px":U()}],"scroll-py":[{"scroll-py":U()}],"scroll-ps":[{"scroll-ps":U()}],"scroll-pe":[{"scroll-pe":U()}],"scroll-pt":[{"scroll-pt":U()}],"scroll-pr":[{"scroll-pr":U()}],"scroll-pb":[{"scroll-pb":U()}],"scroll-pl":[{"scroll-pl":U()}],"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",je]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[qi,jo,J0]}],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"]}}},Xge=Mge(Vge);function De(...e){return Xge(et(e))}const _l=A.forwardRef(({className:e,...t},n)=>$.jsx("div",{ref:n,className:De("rounded-xl border bg-card text-card-foreground shadow",e),...t}));_l.displayName="Card";const Cd=A.forwardRef(({className:e,...t},n)=>$.jsx("div",{ref:n,className:De("flex flex-col space-y-1.5 p-6",e),...t}));Cd.displayName="CardHeader";const Td=A.forwardRef(({className:e,...t},n)=>$.jsx("div",{ref:n,className:De("font-semibold leading-none tracking-tight",e),...t}));Td.displayName="CardTitle";const h_=A.forwardRef(({className:e,...t},n)=>$.jsx("div",{ref:n,className:De("text-sm text-muted-foreground",e),...t}));h_.displayName="CardDescription";const Ol=A.forwardRef(({className:e,...t},n)=>$.jsx("div",{ref:n,className:De("p-6 pt-0",e),...t}));Ol.displayName="CardContent";const SD=A.forwardRef(({className:e,...t},n)=>$.jsx("div",{ref:n,className:De("flex items-center p-6 pt-0",e),...t}));SD.displayName="CardFooter";const Yge={light:"",dark:".dark"},_D=A.createContext(null);function OD(){const e=A.useContext(_D);if(!e)throw new Error("useChart must be used within a ");return e}const v_=A.forwardRef(({id:e,className:t,children:n,config:r,...i},o)=>{const a=A.useId(),u=`chart-${e||a.replace(/:/g,"")}`;return $.jsx(_D.Provider,{value:{config:r},children:$.jsxs("div",{"data-chart":u,ref:o,className:De("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none",t),...i,children:[$.jsx(Qge,{id:u,config:r}),$.jsx(die,{children:n})]})})});v_.displayName="Chart";const Qge=({id:e,config:t})=>{const n=Object.entries(t).filter(([r,i])=>i.theme||i.color);return n.length?$.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(Yge).map(([r,i])=>` ${i} [data-chart=${e}] { ${n.map(([o,a])=>{var l;const u=((l=a.theme)==null?void 0:l[r])||a.color;return u?` --color-${o}: ${u};`:null}).join(` `)} } `).join(` `)}}):null},PD=bi,ED=A.forwardRef(({active:e,payload:t,className:n,indicator:r="dot",hideLabel:i=!1,hideIndicator:o=!1,label:a,labelFormatter:u,labelClassName:l,formatter:f,color:p,nameKey:d,labelKey:h},m)=>{const{config:y}=OD(),g=A.useMemo(()=>{var O;if(i||!(t!=null&&t.length))return null;const[b]=t,x=`${h||b.dataKey||b.name||"value"}`,S=$x(y,b,x),P=!h&&typeof a=="string"?((O=y[a])==null?void 0:O.label)||a:S==null?void 0:S.label;return u?$.jsx("div",{className:De("font-medium",l),children:u(P,t)}):P?$.jsx("div",{className:De("font-medium",l),children:P}):null},[a,u,t,i,l,y,h]);if(!e||!(t!=null&&t.length))return null;const w=t.length===1&&r!=="dot";return $.jsxs("div",{ref:m,className:De("grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",n),children:[w?null:g,$.jsx("div",{className:"grid gap-1.5",children:t.map((b,x)=>{const S=`${d||b.name||b.dataKey||"value"}`,P=$x(y,b,S),O=p||b.payload.fill||b.color;return $.jsx("div",{className:De("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",r==="dot"&&"items-center"),children:f&&(b==null?void 0:b.value)!==void 0&&b.name?f(b.value,b.name,b,x,b.payload):$.jsxs($.Fragment,{children:[P!=null&&P.icon?$.jsx(P.icon,{}):!o&&$.jsx("div",{className:De("shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]",{"h-2.5 w-2.5":r==="dot","w-1":r==="line","w-0 border-[1.5px] border-dashed bg-transparent":r==="dashed","my-0.5":w&&r==="dashed"}),style:{"--color-bg":O,"--color-border":O}}),$.jsxs("div",{className:De("flex flex-1 justify-between leading-none",w?"items-end":"items-center"),children:[$.jsxs("div",{className:"grid gap-1.5",children:[w?g:null,$.jsx("span",{className:"text-muted-foreground",children:(P==null?void 0:P.label)||b.name})]}),b.value&&$.jsx("span",{className:"font-mono font-medium tabular-nums text-foreground",children:b.value.toLocaleString()})]})]})},b.dataKey)})})]})});ED.displayName="ChartTooltip";const Zge=A.forwardRef(({className:e,hideIcon:t=!1,payload:n,verticalAlign:r="bottom",nameKey:i},o)=>{const{config:a}=OD();return n!=null&&n.length?$.jsx("div",{ref:o,className:De("flex items-center justify-center gap-4",r==="top"?"pb-3":"pt-3",e),children:n.map(u=>{const l=`${i||u.dataKey||"value"}`,f=$x(a,u,l);return $.jsxs("div",{className:De("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"),children:[f!=null&&f.icon&&!t?$.jsx(f.icon,{}):$.jsx("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:u.color}}),f==null?void 0:f.label]},u.value)})}):null});Zge.displayName="ChartLegend";function $x(e,t,n){if(typeof t!="object"||t===null)return;const r="payload"in t&&typeof t.payload=="object"&&t.payload!==null?t.payload:void 0;let i=n;return n in t&&typeof t[n]=="string"?i=t[n]:r&&n in r&&typeof r[n]=="string"&&(i=r[n]),i in e?e[i]:e[n]}var Kl=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(){}},Ps=typeof window>"u"||"Deno"in globalThis;function Tr(){}function Jge(e,t){return typeof e=="function"?e(t):e}function Rx(e){return typeof e=="number"&&e>=0&&e!==1/0}function AD(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Nu(e,t){return typeof e=="function"?e(t):e}function ti(e,t){return typeof e=="function"?e(t):e}function P$(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:a,stale:u}=e;if(a){if(r){if(t.queryHash!==m_(a,t.options))return!1}else if(!rd(t.queryKey,a))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||i&&i!==t.state.fetchStatus||o&&!o(t))}function E$(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(Es(t.options.mutationKey)!==Es(o))return!1}else if(!rd(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function m_(e,t){return((t==null?void 0:t.queryKeyHashFn)||Es)(e)}function Es(e){return JSON.stringify(e,(t,n)=>Nx(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function rd(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!rd(e[n],t[n])):!1}function CD(e,t){if(e===t)return e;const n=A$(e)&&A$(t);if(n||Nx(e)&&Nx(t)){const r=n?e:Object.keys(e),i=r.length,o=n?t:Object.keys(t),a=o.length,u=n?[]:{};let l=0;for(let f=0;f{setTimeout(t,e)})}function Ix(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?CD(e,t):t}function tye(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function nye(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var g_=Symbol();function TD(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===g_?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var ns,Go,ku,wR,rye=(wR=class extends Kl{constructor(){super();_e(this,ns);_e(this,Go);_e(this,ku);he(this,ku,t=>{if(!Ps&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){L(this,Go)||this.setEventListener(L(this,ku))}onUnsubscribe(){var t;this.hasListeners()||((t=L(this,Go))==null||t.call(this),he(this,Go,void 0))}setEventListener(t){var n;he(this,ku,t),(n=L(this,Go))==null||n.call(this),he(this,Go,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){L(this,ns)!==t&&(he(this,ns,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof L(this,ns)=="boolean"?L(this,ns):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ns=new WeakMap,Go=new WeakMap,ku=new WeakMap,wR),y_=new rye,Du,qo,Lu,xR,iye=(xR=class extends Kl{constructor(){super();_e(this,Du,!0);_e(this,qo);_e(this,Lu);he(this,Lu,t=>{if(!Ps&&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(){L(this,qo)||this.setEventListener(L(this,Lu))}onUnsubscribe(){var t;this.hasListeners()||((t=L(this,qo))==null||t.call(this),he(this,qo,void 0))}setEventListener(t){var n;he(this,Lu,t),(n=L(this,qo))==null||n.call(this),he(this,qo,t(this.setOnline.bind(this)))}setOnline(t){L(this,Du)!==t&&(he(this,Du,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return L(this,Du)}},Du=new WeakMap,qo=new WeakMap,Lu=new WeakMap,xR),Zv=new iye;function jx(){let e,t;const n=new Promise((i,o)=>{e=i,t=o});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}function oye(e){return Math.min(1e3*2**e,3e4)}function MD(e){return(e??"online")==="online"?Zv.isOnline():!0}var $D=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function eb(e){return e instanceof $D}function RD(e){let t=!1,n=0,r=!1,i;const o=jx(),a=g=>{var w;r||(h(new $D(g)),(w=e.abort)==null||w.call(e))},u=()=>{t=!0},l=()=>{t=!1},f=()=>y_.isFocused()&&(e.networkMode==="always"||Zv.isOnline())&&e.canRun(),p=()=>MD(e.networkMode)&&e.canRun(),d=g=>{var w;r||(r=!0,(w=e.onSuccess)==null||w.call(e,g),i==null||i(),o.resolve(g))},h=g=>{var w;r||(r=!0,(w=e.onError)==null||w.call(e,g),i==null||i(),o.reject(g))},m=()=>new Promise(g=>{var w;i=b=>{(r||f())&&g(b)},(w=e.onPause)==null||w.call(e)}).then(()=>{var g;i=void 0,r||(g=e.onContinue)==null||g.call(e)}),y=()=>{if(r)return;let g;const w=n===0?e.initialPromise:void 0;try{g=w??e.fn()}catch(b){g=Promise.reject(b)}Promise.resolve(g).then(d).catch(b=>{var E;if(r)return;const x=e.retry??(Ps?0:3),S=e.retryDelay??oye,P=typeof S=="function"?S(n,b):S,O=x===!0||typeof x=="number"&&nf()?void 0:m()).then(()=>{t?h(b):y()})})};return{promise:o,cancel:a,continue:()=>(i==null||i(),o),cancelRetry:u,continueRetry:l,canStart:p,start:()=>(p()?y():m().then(y),o)}}function aye(){let e=[],t=0,n=u=>{u()},r=u=>{u()},i=u=>setTimeout(u,0);const o=u=>{t?e.push(u):i(()=>{n(u)})},a=()=>{const u=e;e=[],u.length&&i(()=>{r(()=>{u.forEach(l=>{n(l)})})})};return{batch:u=>{let l;t++;try{l=u()}finally{t--,t||a()}return l},batchCalls:u=>(...l)=>{o(()=>{u(...l)})},schedule:o,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{i=u}}}var qt=aye(),rs,SR,ND=(SR=class{constructor(){_e(this,rs)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Rx(this.gcTime)&&he(this,rs,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ps?1/0:5*60*1e3))}clearGcTimeout(){L(this,rs)&&(clearTimeout(L(this,rs)),he(this,rs,void 0))}},rs=new WeakMap,SR),Fu,Bu,Cr,vn,ld,is,Qr,Vi,_R,sye=(_R=class extends ND{constructor(t){super();_e(this,Qr);_e(this,Fu);_e(this,Bu);_e(this,Cr);_e(this,vn);_e(this,ld);_e(this,is);he(this,is,!1),he(this,ld,t.defaultOptions),this.setOptions(t.options),this.observers=[],he(this,Cr,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,he(this,Fu,uye(this.options)),this.state=t.state??L(this,Fu),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=L(this,vn))==null?void 0:t.promise}setOptions(t){this.options={...L(this,ld),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&L(this,Cr).remove(this)}setData(t,n){const r=Ix(this.state.data,t,this.options);return Be(this,Qr,Vi).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){Be(this,Qr,Vi).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=L(this,vn))==null?void 0:r.promise;return(i=L(this,vn))==null||i.cancel(t),n?n.then(Tr).catch(Tr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(L(this,Fu))}isActive(){return this.observers.some(t=>ti(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===g_||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!AD(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=L(this,vn))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=L(this,vn))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),L(this,Cr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(L(this,vn)&&(L(this,is)?L(this,vn).cancel({revert:!0}):L(this,vn).cancelRetry()),this.scheduleGc()),L(this,Cr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Be(this,Qr,Vi).call(this,{type:"invalidate"})}fetch(t,n){var l,f,p;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(L(this,vn))return L(this,vn).continueRetry(),L(this,vn).promise}if(t&&this.setOptions(t),!this.options.queryFn){const d=this.observers.find(h=>h.options.queryFn);d&&this.setOptions(d.options)}const r=new AbortController,i=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(he(this,is,!0),r.signal)})},o=()=>{const d=TD(this.options,n),h={queryKey:this.queryKey,meta:this.meta};return i(h),he(this,is,!1),this.options.persister?this.options.persister(d,h,this):d(h)},a={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:o};i(a),(l=this.options.behavior)==null||l.onFetch(a,this),he(this,Bu,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=a.fetchOptions)==null?void 0:f.meta))&&Be(this,Qr,Vi).call(this,{type:"fetch",meta:(p=a.fetchOptions)==null?void 0:p.meta});const u=d=>{var h,m,y,g;eb(d)&&d.silent||Be(this,Qr,Vi).call(this,{type:"error",error:d}),eb(d)||((m=(h=L(this,Cr).config).onError)==null||m.call(h,d,this),(g=(y=L(this,Cr).config).onSettled)==null||g.call(y,this.state.data,d,this)),this.scheduleGc()};return he(this,vn,RD({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:d=>{var h,m,y,g;if(d===void 0){u(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(d)}catch(w){u(w);return}(m=(h=L(this,Cr).config).onSuccess)==null||m.call(h,d,this),(g=(y=L(this,Cr).config).onSettled)==null||g.call(y,d,this.state.error,this),this.scheduleGc()},onError:u,onFail:(d,h)=>{Be(this,Qr,Vi).call(this,{type:"failed",failureCount:d,error:h})},onPause:()=>{Be(this,Qr,Vi).call(this,{type:"pause"})},onContinue:()=>{Be(this,Qr,Vi).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),L(this,vn).start()}},Fu=new WeakMap,Bu=new WeakMap,Cr=new WeakMap,vn=new WeakMap,ld=new WeakMap,is=new WeakMap,Qr=new WeakSet,Vi=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,...ID(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return eb(i)&&i.revert&&L(this,Bu)?{...L(this,Bu),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),qt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),L(this,Cr).notify({query:this,type:"updated",action:t})})},_R);function ID(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:MD(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function uye(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 wi,OR,lye=(OR=class extends Kl{constructor(t={}){super();_e(this,wi);this.config=t,he(this,wi,new Map)}build(t,n,r){const i=n.queryKey,o=n.queryHash??m_(i,n);let a=this.get(o);return a||(a=new sye({cache:this,queryKey:i,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(a)),a}add(t){L(this,wi).has(t.queryHash)||(L(this,wi).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=L(this,wi).get(t.queryHash);n&&(t.destroy(),n===t&&L(this,wi).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){qt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return L(this,wi).get(t)}getAll(){return[...L(this,wi).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>P$(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>P$(t,r)):n}notify(t){qt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){qt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){qt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},wi=new WeakMap,OR),xi,Pn,os,Si,Lo,PR,cye=(PR=class extends ND{constructor(t){super();_e(this,Si);_e(this,xi);_e(this,Pn);_e(this,os);this.mutationId=t.mutationId,he(this,Pn,t.mutationCache),he(this,xi,[]),this.state=t.state||jD(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){L(this,xi).includes(t)||(L(this,xi).push(t),this.clearGcTimeout(),L(this,Pn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){he(this,xi,L(this,xi).filter(n=>n!==t)),this.scheduleGc(),L(this,Pn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){L(this,xi).length||(this.state.status==="pending"?this.scheduleGc():L(this,Pn).remove(this))}continue(){var t;return((t=L(this,os))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,o,a,u,l,f,p,d,h,m,y,g,w,b,x,S,P,O,E,T;he(this,os,RD({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(R,I)=>{Be(this,Si,Lo).call(this,{type:"failed",failureCount:R,error:I})},onPause:()=>{Be(this,Si,Lo).call(this,{type:"pause"})},onContinue:()=>{Be(this,Si,Lo).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>L(this,Pn).canRun(this)}));const n=this.state.status==="pending",r=!L(this,os).canStart();try{if(!n){Be(this,Si,Lo).call(this,{type:"pending",variables:t,isPaused:r}),await((o=(i=L(this,Pn).config).onMutate)==null?void 0:o.call(i,t,this));const I=await((u=(a=this.options).onMutate)==null?void 0:u.call(a,t));I!==this.state.context&&Be(this,Si,Lo).call(this,{type:"pending",context:I,variables:t,isPaused:r})}const R=await L(this,os).start();return await((f=(l=L(this,Pn).config).onSuccess)==null?void 0:f.call(l,R,t,this.state.context,this)),await((d=(p=this.options).onSuccess)==null?void 0:d.call(p,R,t,this.state.context)),await((m=(h=L(this,Pn).config).onSettled)==null?void 0:m.call(h,R,null,this.state.variables,this.state.context,this)),await((g=(y=this.options).onSettled)==null?void 0:g.call(y,R,null,t,this.state.context)),Be(this,Si,Lo).call(this,{type:"success",data:R}),R}catch(R){try{throw await((b=(w=L(this,Pn).config).onError)==null?void 0:b.call(w,R,t,this.state.context,this)),await((S=(x=this.options).onError)==null?void 0:S.call(x,R,t,this.state.context)),await((O=(P=L(this,Pn).config).onSettled)==null?void 0:O.call(P,void 0,R,this.state.variables,this.state.context,this)),await((T=(E=this.options).onSettled)==null?void 0:T.call(E,void 0,R,t,this.state.context)),R}finally{Be(this,Si,Lo).call(this,{type:"error",error:R})}}finally{L(this,Pn).runNext(this)}}},xi=new WeakMap,Pn=new WeakMap,os=new WeakMap,Si=new WeakSet,Lo=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),qt.batch(()=>{L(this,xi).forEach(r=>{r.onMutationUpdate(t)}),L(this,Pn).notify({mutation:this,type:"updated",action:t})})},PR);function jD(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var or,cd,ER,fye=(ER=class extends Kl{constructor(t={}){super();_e(this,or);_e(this,cd);this.config=t,he(this,or,new Map),he(this,cd,Date.now())}build(t,n,r){const i=new cye({mutationCache:this,mutationId:++Ep(this,cd)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){const n=ih(t),r=L(this,or).get(n)??[];r.push(t),L(this,or).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=ih(t);if(L(this,or).has(n)){const i=(r=L(this,or).get(n))==null?void 0:r.filter(o=>o!==t);i&&(i.length===0?L(this,or).delete(n):L(this,or).set(n,i))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=L(this,or).get(ih(t)))==null?void 0:r.find(i=>i.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=L(this,or).get(ih(t)))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){qt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...L(this,or).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>E$(n,r))}findAll(t={}){return this.getAll().filter(n=>E$(t,n))}notify(t){qt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return qt.batch(()=>Promise.all(t.map(n=>n.continue().catch(Tr))))}},or=new WeakMap,cd=new WeakMap,ER);function ih(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function T$(e){return{onFetch:(t,n)=>{var p,d,h,m,y;const r=t.options,i=(h=(d=(p=t.fetchOptions)==null?void 0:p.meta)==null?void 0:d.fetchMore)==null?void 0:h.direction,o=((m=t.state.data)==null?void 0:m.pages)||[],a=((y=t.state.data)==null?void 0:y.pageParams)||[];let u={pages:[],pageParams:[]},l=0;const f=async()=>{let g=!1;const w=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},b=TD(t.options,t.fetchOptions),x=async(S,P,O)=>{if(g)return Promise.reject();if(P==null&&S.pages.length)return Promise.resolve(S);const E={queryKey:t.queryKey,pageParam:P,direction:O?"backward":"forward",meta:t.options.meta};w(E);const T=await b(E),{maxPages:R}=t.options,I=O?nye:tye;return{pages:I(S.pages,T,R),pageParams:I(S.pageParams,P,R)}};if(i&&o.length){const S=i==="backward",P=S?dye:M$,O={pages:o,pageParams:a},E=P(r,O);u=await x(O,E,S)}else{const S=e??o.length;do{const P=l===0?a[0]??r.initialPageParam:M$(r,u);if(l>0&&P==null)break;u=await x(u,P),l++}while(l{var g,w;return(w=(g=t.options).persister)==null?void 0:w.call(g,f,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=f}}}function M$(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 dye(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 Rt,Vo,Xo,Uu,zu,Yo,Wu,Hu,AR,pye=(AR=class{constructor(e={}){_e(this,Rt);_e(this,Vo);_e(this,Xo);_e(this,Uu);_e(this,zu);_e(this,Yo);_e(this,Wu);_e(this,Hu);he(this,Rt,e.queryCache||new lye),he(this,Vo,e.mutationCache||new fye),he(this,Xo,e.defaultOptions||{}),he(this,Uu,new Map),he(this,zu,new Map),he(this,Yo,0)}mount(){Ep(this,Yo)._++,L(this,Yo)===1&&(he(this,Wu,y_.subscribe(async e=>{e&&(await this.resumePausedMutations(),L(this,Rt).onFocus())})),he(this,Hu,Zv.subscribe(async e=>{e&&(await this.resumePausedMutations(),L(this,Rt).onOnline())})))}unmount(){var e,t;Ep(this,Yo)._--,L(this,Yo)===0&&((e=L(this,Wu))==null||e.call(this),he(this,Wu,void 0),(t=L(this,Hu))==null||t.call(this),he(this,Hu,void 0))}isFetching(e){return L(this,Rt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return L(this,Vo).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=L(this,Rt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=L(this,Rt).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(Nu(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return L(this,Rt).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=L(this,Rt).get(r.queryHash),o=i==null?void 0:i.state.data,a=Jge(t,o);if(a!==void 0)return L(this,Rt).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return qt.batch(()=>L(this,Rt).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=L(this,Rt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=L(this,Rt);qt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=L(this,Rt),r={type:"active",...e};return qt.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e={},t={}){const n={revert:!0,...t},r=qt.batch(()=>L(this,Rt).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Tr).catch(Tr)}invalidateQueries(e={},t={}){return qt.batch(()=>{if(L(this,Rt).findAll(e).forEach(r=>{r.invalidate()}),e.refetchType==="none")return Promise.resolve();const n={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e={},t){const n={...t,cancelRefetch:(t==null?void 0:t.cancelRefetch)??!0},r=qt.batch(()=>L(this,Rt).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let o=i.fetch(void 0,n);return n.throwOnError||(o=o.catch(Tr)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(Tr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=L(this,Rt).build(this,t);return n.isStaleByTime(Nu(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Tr).catch(Tr)}fetchInfiniteQuery(e){return e.behavior=T$(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Tr).catch(Tr)}ensureInfiniteQueryData(e){return e.behavior=T$(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Zv.isOnline()?L(this,Vo).resumePausedMutations():Promise.resolve()}getQueryCache(){return L(this,Rt)}getMutationCache(){return L(this,Vo)}getDefaultOptions(){return L(this,Xo)}setDefaultOptions(e){he(this,Xo,e)}setQueryDefaults(e,t){L(this,Uu).set(Es(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...L(this,Uu).values()];let n={};return t.forEach(r=>{rd(e,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(e,t){L(this,zu).set(Es(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...L(this,zu).values()];let n={};return t.forEach(r=>{rd(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...L(this,Xo).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=m_(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.enabled!==!0&&t.queryFn===g_&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...L(this,Xo).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){L(this,Rt).clear(),L(this,Vo).clear()}},Rt=new WeakMap,Vo=new WeakMap,Xo=new WeakMap,Uu=new WeakMap,zu=new WeakMap,Yo=new WeakMap,Wu=new WeakMap,Hu=new WeakMap,AR),Ln,Ve,fd,En,as,Ku,Qo,_i,dd,Gu,qu,ss,us,Zo,Vu,it,Uc,kx,Dx,Lx,Fx,Bx,Ux,zx,kD,CR,hye=(CR=class extends Kl{constructor(t,n){super();_e(this,it);_e(this,Ln);_e(this,Ve);_e(this,fd);_e(this,En);_e(this,as);_e(this,Ku);_e(this,Qo);_e(this,_i);_e(this,dd);_e(this,Gu);_e(this,qu);_e(this,ss);_e(this,us);_e(this,Zo);_e(this,Vu,new Set);this.options=n,he(this,Ln,t),he(this,_i,null),he(this,Qo,jx()),this.options.experimental_prefetchInRender||L(this,Qo).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(L(this,Ve).addObserver(this),$$(L(this,Ve),this.options)?Be(this,it,Uc).call(this):this.updateResult(),Be(this,it,Fx).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Wx(L(this,Ve),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Wx(L(this,Ve),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Be(this,it,Bx).call(this),Be(this,it,Ux).call(this),L(this,Ve).removeObserver(this)}setOptions(t,n){const r=this.options,i=L(this,Ve);if(this.options=L(this,Ln).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ti(this.options.enabled,L(this,Ve))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Be(this,it,zx).call(this),L(this,Ve).setOptions(this.options),r._defaulted&&!Qv(this.options,r)&&L(this,Ln).getQueryCache().notify({type:"observerOptionsUpdated",query:L(this,Ve),observer:this});const o=this.hasListeners();o&&R$(L(this,Ve),i,this.options,r)&&Be(this,it,Uc).call(this),this.updateResult(n),o&&(L(this,Ve)!==i||ti(this.options.enabled,L(this,Ve))!==ti(r.enabled,L(this,Ve))||Nu(this.options.staleTime,L(this,Ve))!==Nu(r.staleTime,L(this,Ve)))&&Be(this,it,kx).call(this);const a=Be(this,it,Dx).call(this);o&&(L(this,Ve)!==i||ti(this.options.enabled,L(this,Ve))!==ti(r.enabled,L(this,Ve))||a!==L(this,Zo))&&Be(this,it,Lx).call(this,a)}getOptimisticResult(t){const n=L(this,Ln).getQueryCache().build(L(this,Ln),t),r=this.createResult(n,t);return mye(this,r)&&(he(this,En,r),he(this,Ku,this.options),he(this,as,L(this,Ve).state)),r}getCurrentResult(){return L(this,En)}trackResult(t,n){const r={};return Object.keys(t).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),n==null||n(i),t[i])})}),r}trackProp(t){L(this,Vu).add(t)}getCurrentQuery(){return L(this,Ve)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=L(this,Ln).defaultQueryOptions(t),r=L(this,Ln).getQueryCache().build(L(this,Ln),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return Be(this,it,Uc).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),L(this,En)))}createResult(t,n){var R;const r=L(this,Ve),i=this.options,o=L(this,En),a=L(this,as),u=L(this,Ku),f=t!==r?t.state:L(this,fd),{state:p}=t;let d={...p},h=!1,m;if(n._optimisticResults){const I=this.hasListeners(),B=!I&&$$(t,n),k=I&&R$(t,r,n,i);(B||k)&&(d={...d,...ID(p.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:y,errorUpdatedAt:g,status:w}=d;if(n.select&&d.data!==void 0)if(o&&d.data===(a==null?void 0:a.data)&&n.select===L(this,dd))m=L(this,Gu);else try{he(this,dd,n.select),m=n.select(d.data),m=Ix(o==null?void 0:o.data,m,n),he(this,Gu,m),he(this,_i,null)}catch(I){he(this,_i,I)}else m=d.data;if(n.placeholderData!==void 0&&m===void 0&&w==="pending"){let I;if(o!=null&&o.isPlaceholderData&&n.placeholderData===(u==null?void 0:u.placeholderData))I=o.data;else if(I=typeof n.placeholderData=="function"?n.placeholderData((R=L(this,qu))==null?void 0:R.state.data,L(this,qu)):n.placeholderData,n.select&&I!==void 0)try{I=n.select(I),he(this,_i,null)}catch(B){he(this,_i,B)}I!==void 0&&(w="success",m=Ix(o==null?void 0:o.data,I,n),h=!0)}L(this,_i)&&(y=L(this,_i),m=L(this,Gu),g=Date.now(),w="error");const b=d.fetchStatus==="fetching",x=w==="pending",S=w==="error",P=x&&b,O=m!==void 0,T={status:w,fetchStatus:d.fetchStatus,isPending:x,isSuccess:w==="success",isError:S,isInitialLoading:P,isLoading:P,data:m,dataUpdatedAt:d.dataUpdatedAt,error:y,errorUpdatedAt:g,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>f.dataUpdateCount||d.errorUpdateCount>f.errorUpdateCount,isFetching:b,isRefetching:b&&!x,isLoadingError:S&&!O,isPaused:d.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:S&&O,isStale:b_(t,n),refetch:this.refetch,promise:L(this,Qo)};if(this.options.experimental_prefetchInRender){const I=U=>{T.status==="error"?U.reject(T.error):T.data!==void 0&&U.resolve(T.data)},B=()=>{const U=he(this,Qo,T.promise=jx());I(U)},k=L(this,Qo);switch(k.status){case"pending":t.queryHash===r.queryHash&&I(k);break;case"fulfilled":(T.status==="error"||T.data!==k.value)&&B();break;case"rejected":(T.status!=="error"||T.error!==k.reason)&&B();break}}return T}updateResult(t){const n=L(this,En),r=this.createResult(L(this,Ve),this.options);if(he(this,as,L(this,Ve).state),he(this,Ku,this.options),L(this,as).data!==void 0&&he(this,qu,L(this,Ve)),Qv(r,n))return;he(this,En,r);const i={},o=()=>{if(!n)return!0;const{notifyOnChangeProps:a}=this.options,u=typeof a=="function"?a():a;if(u==="all"||!u&&!L(this,Vu).size)return!0;const l=new Set(u??L(this,Vu));return this.options.throwOnError&&l.add("error"),Object.keys(L(this,En)).some(f=>{const p=f;return L(this,En)[p]!==n[p]&&l.has(p)})};(t==null?void 0:t.listeners)!==!1&&o()&&(i.listeners=!0),Be(this,it,kD).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Be(this,it,Fx).call(this)}},Ln=new WeakMap,Ve=new WeakMap,fd=new WeakMap,En=new WeakMap,as=new WeakMap,Ku=new WeakMap,Qo=new WeakMap,_i=new WeakMap,dd=new WeakMap,Gu=new WeakMap,qu=new WeakMap,ss=new WeakMap,us=new WeakMap,Zo=new WeakMap,Vu=new WeakMap,it=new WeakSet,Uc=function(t){Be(this,it,zx).call(this);let n=L(this,Ve).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Tr)),n},kx=function(){Be(this,it,Bx).call(this);const t=Nu(this.options.staleTime,L(this,Ve));if(Ps||L(this,En).isStale||!Rx(t))return;const r=AD(L(this,En).dataUpdatedAt,t)+1;he(this,ss,setTimeout(()=>{L(this,En).isStale||this.updateResult()},r))},Dx=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(L(this,Ve)):this.options.refetchInterval)??!1},Lx=function(t){Be(this,it,Ux).call(this),he(this,Zo,t),!(Ps||ti(this.options.enabled,L(this,Ve))===!1||!Rx(L(this,Zo))||L(this,Zo)===0)&&he(this,us,setInterval(()=>{(this.options.refetchIntervalInBackground||y_.isFocused())&&Be(this,it,Uc).call(this)},L(this,Zo)))},Fx=function(){Be(this,it,kx).call(this),Be(this,it,Lx).call(this,Be(this,it,Dx).call(this))},Bx=function(){L(this,ss)&&(clearTimeout(L(this,ss)),he(this,ss,void 0))},Ux=function(){L(this,us)&&(clearInterval(L(this,us)),he(this,us,void 0))},zx=function(){const t=L(this,Ln).getQueryCache().build(L(this,Ln),this.options);if(t===L(this,Ve))return;const n=L(this,Ve);he(this,Ve,t),he(this,fd,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},kD=function(t){qt.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(L(this,En))}),L(this,Ln).getQueryCache().notify({query:L(this,Ve),type:"observerResultsUpdated"})})},CR);function vye(e,t){return ti(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function $$(e,t){return vye(e,t)||e.state.data!==void 0&&Wx(e,t,t.refetchOnMount)}function Wx(e,t,n){if(ti(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&b_(e,t)}return!1}function R$(e,t,n,r){return(e!==t||ti(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&b_(e,n)}function b_(e,t){return ti(t.enabled,e)!==!1&&e.isStaleByTime(Nu(t.staleTime,e))}function mye(e,t){return!Qv(e.getCurrentResult(),t)}var Jo,ea,Fn,Qi,uo,_h,Hx,TR,gye=(TR=class extends Kl{constructor(n,r){super();_e(this,uo);_e(this,Jo);_e(this,ea);_e(this,Fn);_e(this,Qi);he(this,Jo,n),this.setOptions(r),this.bindMethods(),Be(this,uo,_h).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=L(this,Jo).defaultMutationOptions(n),Qv(this.options,r)||L(this,Jo).getMutationCache().notify({type:"observerOptionsUpdated",mutation:L(this,Fn),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Es(r.mutationKey)!==Es(this.options.mutationKey)?this.reset():((i=L(this,Fn))==null?void 0:i.state.status)==="pending"&&L(this,Fn).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=L(this,Fn))==null||n.removeObserver(this)}onMutationUpdate(n){Be(this,uo,_h).call(this),Be(this,uo,Hx).call(this,n)}getCurrentResult(){return L(this,ea)}reset(){var n;(n=L(this,Fn))==null||n.removeObserver(this),he(this,Fn,void 0),Be(this,uo,_h).call(this),Be(this,uo,Hx).call(this)}mutate(n,r){var i;return he(this,Qi,r),(i=L(this,Fn))==null||i.removeObserver(this),he(this,Fn,L(this,Jo).getMutationCache().build(L(this,Jo),this.options)),L(this,Fn).addObserver(this),L(this,Fn).execute(n)}},Jo=new WeakMap,ea=new WeakMap,Fn=new WeakMap,Qi=new WeakMap,uo=new WeakSet,_h=function(){var r;const n=((r=L(this,Fn))==null?void 0:r.state)??jD();he(this,ea,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Hx=function(n){qt.batch(()=>{var r,i,o,a,u,l,f,p;if(L(this,Qi)&&this.hasListeners()){const d=L(this,ea).variables,h=L(this,ea).context;(n==null?void 0:n.type)==="success"?((i=(r=L(this,Qi)).onSuccess)==null||i.call(r,n.data,d,h),(a=(o=L(this,Qi)).onSettled)==null||a.call(o,n.data,null,d,h)):(n==null?void 0:n.type)==="error"&&((l=(u=L(this,Qi)).onError)==null||l.call(u,n.error,d,h),(p=(f=L(this,Qi)).onSettled)==null||p.call(f,void 0,n.error,d,h))}this.listeners.forEach(d=>{d(L(this,ea))})})},TR),DD=A.createContext(void 0),LD=e=>{const t=A.useContext(DD);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},yye=({client:e,children:t})=>(A.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),$.jsx(DD.Provider,{value:e,children:t})),FD=A.createContext(!1),bye=()=>A.useContext(FD);FD.Provider;function wye(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var xye=A.createContext(wye()),Sye=()=>A.useContext(xye);function BD(e,t){return typeof e=="function"?e(...t):!!e}function UD(){}var _ye=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Oye=e=>{A.useEffect(()=>{e.clearReset()},[e])},Pye=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&BD(n,[e.error,r]),Eye=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},Aye=(e,t)=>e.isLoading&&e.isFetching&&!t,Cye=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,N$=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Tye(e,t,n){var p,d,h,m,y;const r=LD(),i=bye(),o=Sye(),a=r.defaultQueryOptions(e);(d=(p=r.getDefaultOptions().queries)==null?void 0:p._experimental_beforeQuery)==null||d.call(p,a),a._optimisticResults=i?"isRestoring":"optimistic",Eye(a),_ye(a,o),Oye(o);const u=!r.getQueryCache().get(a.queryHash),[l]=A.useState(()=>new t(r,a)),f=l.getOptimisticResult(a);if(A.useSyncExternalStore(A.useCallback(g=>{const w=i?()=>{}:l.subscribe(qt.batchCalls(g));return l.updateResult(),w},[l,i]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),A.useEffect(()=>{l.setOptions(a,{listeners:!1})},[a,l]),Cye(a,f))throw N$(a,l,o);if(Pye({result:f,errorResetBoundary:o,throwOnError:a.throwOnError,query:r.getQueryCache().get(a.queryHash)}))throw f.error;if((m=(h=r.getDefaultOptions().queries)==null?void 0:h._experimental_afterQuery)==null||m.call(h,a,f),a.experimental_prefetchInRender&&!Ps&&Aye(f,i)){const g=u?N$(a,l,o):(y=r.getQueryCache().get(a.queryHash))==null?void 0:y.promise;g==null||g.catch(UD).finally(()=>{l.updateResult()})}return a.notifyOnChangeProps?f:l.trackResult(f)}function Gl(e,t){return Tye(e,hye)}function zD(e,t){const n=LD(),[r]=A.useState(()=>new gye(n,e));A.useEffect(()=>{r.setOptions(e)},[r,e]);const i=A.useSyncExternalStore(A.useCallback(a=>r.subscribe(qt.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=A.useCallback((a,u)=>{r.mutate(a,u).catch(UD)},[r]);if(i.error&&BD(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:o,mutateAsync:i.mutate}}function WD(e,t){return function(){return e.apply(t,arguments)}}const{toString:Mye}=Object.prototype,{getPrototypeOf:w_}=Object,hg=(e=>t=>{const n=Mye.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),fi=e=>(e=e.toLowerCase(),t=>hg(t)===e),vg=e=>t=>typeof t===e,{isArray:ql}=Array,id=vg("undefined");function $ye(e){return e!==null&&!id(e)&&e.constructor!==null&&!id(e.constructor)&&dr(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const HD=fi("ArrayBuffer");function Rye(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&HD(e.buffer),t}const Nye=vg("string"),dr=vg("function"),KD=vg("number"),mg=e=>e!==null&&typeof e=="object",Iye=e=>e===!0||e===!1,Oh=e=>{if(hg(e)!=="object")return!1;const t=w_(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},jye=fi("Date"),kye=fi("File"),Dye=fi("Blob"),Lye=fi("FileList"),Fye=e=>mg(e)&&dr(e.pipe),Bye=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||dr(e.append)&&((t=hg(e))==="formdata"||t==="object"&&dr(e.toString)&&e.toString()==="[object FormData]"))},Uye=fi("URLSearchParams"),[zye,Wye,Hye,Kye]=["ReadableStream","Request","Response","Headers"].map(fi),Gye=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Md(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),ql(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}const ts=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,qD=e=>!id(e)&&e!==ts;function Kx(){const{caseless:e}=qD(this)&&this||{},t={},n=(r,i)=>{const o=e&&GD(t,i)||i;Oh(t[o])&&Oh(r)?t[o]=Kx(t[o],r):Oh(r)?t[o]=Kx({},r):ql(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r(Md(t,(i,o)=>{n&&dr(i)?e[o]=WD(i,n):e[o]=i},{allOwnKeys:r}),e),Vye=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Xye=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Yye=(e,t,n,r)=>{let i,o,a;const u={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)a=i[o],(!r||r(a,e,t))&&!u[a]&&(t[a]=e[a],u[a]=!0);e=n!==!1&&w_(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Qye=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Zye=e=>{if(!e)return null;if(ql(e))return e;let t=e.length;if(!KD(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Jye=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&w_(Uint8Array)),e0e=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},t0e=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},n0e=fi("HTMLFormElement"),r0e=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),I$=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),i0e=fi("RegExp"),VD=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Md(n,(i,o)=>{let a;(a=t(i,o,e))!==!1&&(r[o]=a||i)}),Object.defineProperties(e,r)},o0e=e=>{VD(e,(t,n)=>{if(dr(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(dr(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},a0e=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return ql(e)?r(e):r(String(e).split(t)),n},s0e=()=>{},u0e=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,tb="abcdefghijklmnopqrstuvwxyz",j$="0123456789",XD={DIGIT:j$,ALPHA:tb,ALPHA_DIGIT:tb+tb.toUpperCase()+j$},l0e=(e=16,t=XD.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function c0e(e){return!!(e&&dr(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const f0e=e=>{const t=new Array(10),n=(r,i)=>{if(mg(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const o=ql(r)?[]:{};return Md(r,(a,u)=>{const l=n(a,i+1);!id(l)&&(o[u]=l)}),t[i]=void 0,o}}return r};return n(e,0)},d0e=fi("AsyncFunction"),p0e=e=>e&&(mg(e)||dr(e))&&dr(e.then)&&dr(e.catch),YD=((e,t)=>e?setImmediate:t?((n,r)=>(ts.addEventListener("message",({source:i,data:o})=>{i===ts&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),ts.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",dr(ts.postMessage)),h0e=typeof queueMicrotask<"u"?queueMicrotask.bind(ts):typeof process<"u"&&process.nextTick||YD,Z={isArray:ql,isArrayBuffer:HD,isBuffer:$ye,isFormData:Bye,isArrayBufferView:Rye,isString:Nye,isNumber:KD,isBoolean:Iye,isObject:mg,isPlainObject:Oh,isReadableStream:zye,isRequest:Wye,isResponse:Hye,isHeaders:Kye,isUndefined:id,isDate:jye,isFile:kye,isBlob:Dye,isRegExp:i0e,isFunction:dr,isStream:Fye,isURLSearchParams:Uye,isTypedArray:Jye,isFileList:Lye,forEach:Md,merge:Kx,extend:qye,trim:Gye,stripBOM:Vye,inherits:Xye,toFlatObject:Yye,kindOf:hg,kindOfTest:fi,endsWith:Qye,toArray:Zye,forEachEntry:e0e,matchAll:t0e,isHTMLForm:n0e,hasOwnProperty:I$,hasOwnProp:I$,reduceDescriptors:VD,freezeMethods:o0e,toObjectSet:a0e,toCamelCase:r0e,noop:s0e,toFiniteNumber:u0e,findKey:GD,global:ts,isContextDefined:qD,ALPHABET:XD,generateString:l0e,isSpecCompliantForm:c0e,toJSONObject:f0e,isAsyncFn:d0e,isThenable:p0e,setImmediate:YD,asap:h0e};function Re(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}Z.inherits(Re,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Z.toJSONObject(this.config),code:this.code,status:this.status}}});const QD=Re.prototype,ZD={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{ZD[e]={value:e}});Object.defineProperties(Re,ZD);Object.defineProperty(QD,"isAxiosError",{value:!0});Re.from=(e,t,n,r,i,o)=>{const a=Object.create(QD);return Z.toFlatObject(e,a,function(l){return l!==Error.prototype},u=>u!=="isAxiosError"),Re.call(a,e.message,t,n,r,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};const v0e=null;function Gx(e){return Z.isPlainObject(e)||Z.isArray(e)}function JD(e){return Z.endsWith(e,"[]")?e.slice(0,-2):e}function k$(e,t,n){return e?e.concat(t).map(function(i,o){return i=JD(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function m0e(e){return Z.isArray(e)&&!e.some(Gx)}const g0e=Z.toFlatObject(Z,{},null,function(t){return/^is[A-Z]/.test(t)});function gg(e,t,n){if(!Z.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=Z.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,w){return!Z.isUndefined(w[g])});const r=n.metaTokens,i=n.visitor||p,o=n.dots,a=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&Z.isSpecCompliantForm(t);if(!Z.isFunction(i))throw new TypeError("visitor must be a function");function f(y){if(y===null)return"";if(Z.isDate(y))return y.toISOString();if(!l&&Z.isBlob(y))throw new Re("Blob is not supported. Use a Buffer instead.");return Z.isArrayBuffer(y)||Z.isTypedArray(y)?l&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function p(y,g,w){let b=y;if(y&&!w&&typeof y=="object"){if(Z.endsWith(g,"{}"))g=r?g:g.slice(0,-2),y=JSON.stringify(y);else if(Z.isArray(y)&&m0e(y)||(Z.isFileList(y)||Z.endsWith(g,"[]"))&&(b=Z.toArray(y)))return g=JD(g),b.forEach(function(S,P){!(Z.isUndefined(S)||S===null)&&t.append(a===!0?k$([g],P,o):a===null?g:g+"[]",f(S))}),!1}return Gx(y)?!0:(t.append(k$(w,g,o),f(y)),!1)}const d=[],h=Object.assign(g0e,{defaultVisitor:p,convertValue:f,isVisitable:Gx});function m(y,g){if(!Z.isUndefined(y)){if(d.indexOf(y)!==-1)throw Error("Circular reference detected in "+g.join("."));d.push(y),Z.forEach(y,function(b,x){(!(Z.isUndefined(b)||b===null)&&i.call(t,b,Z.isString(x)?x.trim():x,g,h))===!0&&m(b,g?g.concat(x):[x])}),d.pop()}}if(!Z.isObject(e))throw new TypeError("data must be an object");return m(e),t}function D$(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function x_(e,t){this._pairs=[],e&&gg(e,this,t)}const eL=x_.prototype;eL.append=function(t,n){this._pairs.push([t,n])};eL.toString=function(t){const n=t?function(r){return t.call(this,r,D$)}:D$;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function y0e(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function tL(e,t,n){if(!t)return e;const r=n&&n.encode||y0e,i=n&&n.serialize;let o;if(i?o=i(t,n):o=Z.isURLSearchParams(t)?t.toString():new x_(t,n).toString(r),o){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class L${constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Z.forEach(this.handlers,function(r){r!==null&&t(r)})}}const nL={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},b0e=typeof URLSearchParams<"u"?URLSearchParams:x_,w0e=typeof FormData<"u"?FormData:null,x0e=typeof Blob<"u"?Blob:null,S0e={isBrowser:!0,classes:{URLSearchParams:b0e,FormData:w0e,Blob:x0e},protocols:["http","https","file","blob","url","data"]},S_=typeof window<"u"&&typeof document<"u",qx=typeof navigator=="object"&&navigator||void 0,_0e=S_&&(!qx||["ReactNative","NativeScript","NS"].indexOf(qx.product)<0),O0e=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",P0e=S_&&window.location.href||"http://localhost",E0e=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:S_,hasStandardBrowserEnv:_0e,hasStandardBrowserWebWorkerEnv:O0e,navigator:qx,origin:P0e},Symbol.toStringTag,{value:"Module"})),Gn={...E0e,...S0e};function A0e(e,t){return gg(e,new Gn.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return Gn.isNode&&Z.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function C0e(e){return Z.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function T0e(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r=n.length;return a=!a&&Z.isArray(i)?i.length:a,l?(Z.hasOwnProp(i,a)?i[a]=[i[a],r]:i[a]=r,!u):((!i[a]||!Z.isObject(i[a]))&&(i[a]=[]),t(n,r,i[a],o)&&Z.isArray(i[a])&&(i[a]=T0e(i[a])),!u)}if(Z.isFormData(e)&&Z.isFunction(e.entries)){const n={};return Z.forEachEntry(e,(r,i)=>{t(C0e(r),i,n,0)}),n}return null}function M0e(e,t,n){if(Z.isString(e))try{return(t||JSON.parse)(e),Z.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const $d={transitional:nL,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=Z.isObject(t);if(o&&Z.isHTMLForm(t)&&(t=new FormData(t)),Z.isFormData(t))return i?JSON.stringify(rL(t)):t;if(Z.isArrayBuffer(t)||Z.isBuffer(t)||Z.isStream(t)||Z.isFile(t)||Z.isBlob(t)||Z.isReadableStream(t))return t;if(Z.isArrayBufferView(t))return t.buffer;if(Z.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let u;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return A0e(t,this.formSerializer).toString();if((u=Z.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return gg(u?{"files[]":t}:t,l&&new l,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),M0e(t)):t}],transformResponse:[function(t){const n=this.transitional||$d.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(Z.isResponse(t)||Z.isReadableStream(t))return t;if(t&&Z.isString(t)&&(r&&!this.responseType||i)){const a=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(u){if(a)throw u.name==="SyntaxError"?Re.from(u,Re.ERR_BAD_RESPONSE,this,null,this.response):u}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Gn.classes.FormData,Blob:Gn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Z.forEach(["delete","get","head","post","put","patch"],e=>{$d.headers[e]={}});const $0e=Z.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),R0e=e=>{const t={};let n,r,i;return e&&e.split(` `).forEach(function(a){i=a.indexOf(":"),n=a.substring(0,i).trim().toLowerCase(),r=a.substring(i+1).trim(),!(!n||t[n]&&$0e[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},F$=Symbol("internals");function jc(e){return e&&String(e).trim().toLowerCase()}function Ph(e){return e===!1||e==null?e:Z.isArray(e)?e.map(Ph):String(e)}function N0e(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const I0e=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function nb(e,t,n,r,i){if(Z.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!Z.isString(t)){if(Z.isString(r))return t.indexOf(r)!==-1;if(Z.isRegExp(r))return r.test(t)}}function j0e(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function k0e(e,t){const n=Z.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,a){return this[r].call(this,t,i,o,a)},configurable:!0})})}class qn{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(u,l,f){const p=jc(l);if(!p)throw new Error("header name must be a non-empty string");const d=Z.findKey(i,p);(!d||i[d]===void 0||f===!0||f===void 0&&i[d]!==!1)&&(i[d||l]=Ph(u))}const a=(u,l)=>Z.forEach(u,(f,p)=>o(f,p,l));if(Z.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(Z.isString(t)&&(t=t.trim())&&!I0e(t))a(R0e(t),n);else if(Z.isHeaders(t))for(const[u,l]of t.entries())o(l,u,r);else t!=null&&o(n,t,r);return this}get(t,n){if(t=jc(t),t){const r=Z.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return N0e(i);if(Z.isFunction(n))return n.call(this,i,r);if(Z.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=jc(t),t){const r=Z.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||nb(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(a){if(a=jc(a),a){const u=Z.findKey(r,a);u&&(!n||nb(r,r[u],u,n))&&(delete r[u],i=!0)}}return Z.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!t||nb(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return Z.forEach(this,(i,o)=>{const a=Z.findKey(r,o);if(a){n[a]=Ph(i),delete n[o];return}const u=t?j0e(o):String(o).trim();u!==o&&delete n[o],n[u]=Ph(i),r[u]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return Z.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&Z.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[F$]=this[F$]={accessors:{}}).accessors,i=this.prototype;function o(a){const u=jc(a);r[u]||(k0e(i,a),r[u]=!0)}return Z.isArray(t)?t.forEach(o):o(t),this}}qn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Z.reduceDescriptors(qn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});Z.freezeMethods(qn);function rb(e,t){const n=this||$d,r=t||n,i=qn.from(r.headers);let o=r.data;return Z.forEach(e,function(u){o=u.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function iL(e){return!!(e&&e.__CANCEL__)}function Vl(e,t,n){Re.call(this,e??"canceled",Re.ERR_CANCELED,t,n),this.name="CanceledError"}Z.inherits(Vl,Re,{__CANCEL__:!0});function oL(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Re("Request failed with status code "+n.status,[Re.ERR_BAD_REQUEST,Re.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function D0e(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function L0e(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,a;return t=t!==void 0?t:1e3,function(l){const f=Date.now(),p=r[o];a||(a=f),n[i]=l,r[i]=f;let d=o,h=0;for(;d!==i;)h+=n[d++],d=d%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),f-a{n=p,i=null,o&&(clearTimeout(o),o=null),e.apply(null,f)};return[(...f)=>{const p=Date.now(),d=p-n;d>=r?a(f,p):(i=f,o||(o=setTimeout(()=>{o=null,a(i)},r-d)))},()=>i&&a(i)]}const Jv=(e,t,n=3)=>{let r=0;const i=L0e(50,250);return F0e(o=>{const a=o.loaded,u=o.lengthComputable?o.total:void 0,l=a-r,f=i(l),p=a<=u;r=a;const d={loaded:a,total:u,progress:u?a/u:void 0,bytes:l,rate:f||void 0,estimated:f&&u&&p?(u-a)/f:void 0,event:o,lengthComputable:u!=null,[t?"download":"upload"]:!0};e(d)},n)},B$=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},U$=e=>(...t)=>Z.asap(()=>e(...t)),B0e=Gn.hasStandardBrowserEnv?function(){const t=Gn.navigator&&/(msie|trident)/i.test(Gn.navigator.userAgent),n=document.createElement("a");let r;function i(o){let a=o;return t&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(a){const u=Z.isString(a)?i(a):a;return u.protocol===r.protocol&&u.host===r.host}}():function(){return function(){return!0}}(),U0e=Gn.hasStandardBrowserEnv?{write(e,t,n,r,i,o){const a=[e+"="+encodeURIComponent(t)];Z.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),Z.isString(r)&&a.push("path="+r),Z.isString(i)&&a.push("domain="+i),o===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function z0e(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function W0e(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function aL(e,t){return e&&!z0e(t)?W0e(e,t):t}const z$=e=>e instanceof qn?{...e}:e;function As(e,t){t=t||{};const n={};function r(f,p,d){return Z.isPlainObject(f)&&Z.isPlainObject(p)?Z.merge.call({caseless:d},f,p):Z.isPlainObject(p)?Z.merge({},p):Z.isArray(p)?p.slice():p}function i(f,p,d){if(Z.isUndefined(p)){if(!Z.isUndefined(f))return r(void 0,f,d)}else return r(f,p,d)}function o(f,p){if(!Z.isUndefined(p))return r(void 0,p)}function a(f,p){if(Z.isUndefined(p)){if(!Z.isUndefined(f))return r(void 0,f)}else return r(void 0,p)}function u(f,p,d){if(d in t)return r(f,p);if(d in e)return r(void 0,f)}const l={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:u,headers:(f,p)=>i(z$(f),z$(p),!0)};return Z.forEach(Object.keys(Object.assign({},e,t)),function(p){const d=l[p]||i,h=d(e[p],t[p],p);Z.isUndefined(h)&&d!==u||(n[p]=h)}),n}const sL=e=>{const t=As({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:a,auth:u}=t;t.headers=a=qn.from(a),t.url=tL(aL(t.baseURL,t.url),e.params,e.paramsSerializer),u&&a.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):"")));let l;if(Z.isFormData(n)){if(Gn.hasStandardBrowserEnv||Gn.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((l=a.getContentType())!==!1){const[f,...p]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];a.setContentType([f||"multipart/form-data",...p].join("; "))}}if(Gn.hasStandardBrowserEnv&&(r&&Z.isFunction(r)&&(r=r(t)),r||r!==!1&&B0e(t.url))){const f=i&&o&&U0e.read(o);f&&a.set(i,f)}return t},H0e=typeof XMLHttpRequest<"u",K0e=H0e&&function(e){return new Promise(function(n,r){const i=sL(e);let o=i.data;const a=qn.from(i.headers).normalize();let{responseType:u,onUploadProgress:l,onDownloadProgress:f}=i,p,d,h,m,y;function g(){m&&m(),y&&y(),i.cancelToken&&i.cancelToken.unsubscribe(p),i.signal&&i.signal.removeEventListener("abort",p)}let w=new XMLHttpRequest;w.open(i.method.toUpperCase(),i.url,!0),w.timeout=i.timeout;function b(){if(!w)return;const S=qn.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),O={data:!u||u==="text"||u==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:S,config:e,request:w};oL(function(T){n(T),g()},function(T){r(T),g()},O),w=null}"onloadend"in w?w.onloadend=b:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(b)},w.onabort=function(){w&&(r(new Re("Request aborted",Re.ECONNABORTED,e,w)),w=null)},w.onerror=function(){r(new Re("Network Error",Re.ERR_NETWORK,e,w)),w=null},w.ontimeout=function(){let P=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const O=i.transitional||nL;i.timeoutErrorMessage&&(P=i.timeoutErrorMessage),r(new Re(P,O.clarifyTimeoutError?Re.ETIMEDOUT:Re.ECONNABORTED,e,w)),w=null},o===void 0&&a.setContentType(null),"setRequestHeader"in w&&Z.forEach(a.toJSON(),function(P,O){w.setRequestHeader(O,P)}),Z.isUndefined(i.withCredentials)||(w.withCredentials=!!i.withCredentials),u&&u!=="json"&&(w.responseType=i.responseType),f&&([h,y]=Jv(f,!0),w.addEventListener("progress",h)),l&&w.upload&&([d,m]=Jv(l),w.upload.addEventListener("progress",d),w.upload.addEventListener("loadend",m)),(i.cancelToken||i.signal)&&(p=S=>{w&&(r(!S||S.type?new Vl(null,e,w):S),w.abort(),w=null)},i.cancelToken&&i.cancelToken.subscribe(p),i.signal&&(i.signal.aborted?p():i.signal.addEventListener("abort",p)));const x=D0e(i.url);if(x&&Gn.protocols.indexOf(x)===-1){r(new Re("Unsupported protocol "+x+":",Re.ERR_BAD_REQUEST,e));return}w.send(o||null)})},G0e=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const o=function(f){if(!i){i=!0,u();const p=f instanceof Error?f:this.reason;r.abort(p instanceof Re?p:new Vl(p instanceof Error?p.message:p))}};let a=t&&setTimeout(()=>{a=null,o(new Re(`timeout ${t} of ms exceeded`,Re.ETIMEDOUT))},t);const u=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(f=>{f.unsubscribe?f.unsubscribe(o):f.removeEventListener("abort",o)}),e=null)};e.forEach(f=>f.addEventListener("abort",o));const{signal:l}=r;return l.unsubscribe=()=>Z.asap(u),l}},q0e=function*(e,t){let n=e.byteLength;if(n{const i=V0e(e,t);let o=0,a,u=l=>{a||(a=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:f,value:p}=await i.next();if(f){u(),l.close();return}let d=p.byteLength;if(n){let h=o+=d;n(h)}l.enqueue(new Uint8Array(p))}catch(f){throw u(f),f}},cancel(l){return u(l),i.return()}},{highWaterMark:2})},yg=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",uL=yg&&typeof ReadableStream=="function",Y0e=yg&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),lL=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Q0e=uL&&lL(()=>{let e=!1;const t=new Request(Gn.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),H$=64*1024,Vx=uL&&lL(()=>Z.isReadableStream(new Response("").body)),em={stream:Vx&&(e=>e.body)};yg&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!em[t]&&(em[t]=Z.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new Re(`Response type '${t}' is not supported`,Re.ERR_NOT_SUPPORT,r)})})})(new Response);const Z0e=async e=>{if(e==null)return 0;if(Z.isBlob(e))return e.size;if(Z.isSpecCompliantForm(e))return(await new Request(Gn.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(Z.isArrayBufferView(e)||Z.isArrayBuffer(e))return e.byteLength;if(Z.isURLSearchParams(e)&&(e=e+""),Z.isString(e))return(await Y0e(e)).byteLength},J0e=async(e,t)=>{const n=Z.toFiniteNumber(e.getContentLength());return n??Z0e(t)},ebe=yg&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:o,timeout:a,onDownloadProgress:u,onUploadProgress:l,responseType:f,headers:p,withCredentials:d="same-origin",fetchOptions:h}=sL(e);f=f?(f+"").toLowerCase():"text";let m=G0e([i,o&&o.toAbortSignal()],a),y;const g=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let w;try{if(l&&Q0e&&n!=="get"&&n!=="head"&&(w=await J0e(p,r))!==0){let O=new Request(t,{method:"POST",body:r,duplex:"half"}),E;if(Z.isFormData(r)&&(E=O.headers.get("content-type"))&&p.setContentType(E),O.body){const[T,R]=B$(w,Jv(U$(l)));r=W$(O.body,H$,T,R)}}Z.isString(d)||(d=d?"include":"omit");const b="credentials"in Request.prototype;y=new Request(t,{...h,signal:m,method:n.toUpperCase(),headers:p.normalize().toJSON(),body:r,duplex:"half",credentials:b?d:void 0});let x=await fetch(y);const S=Vx&&(f==="stream"||f==="response");if(Vx&&(u||S&&g)){const O={};["status","statusText","headers"].forEach(I=>{O[I]=x[I]});const E=Z.toFiniteNumber(x.headers.get("content-length")),[T,R]=u&&B$(E,Jv(U$(u),!0))||[];x=new Response(W$(x.body,H$,T,()=>{R&&R(),g&&g()}),O)}f=f||"text";let P=await em[Z.findKey(em,f)||"text"](x,e);return!S&&g&&g(),await new Promise((O,E)=>{oL(O,E,{data:P,headers:qn.from(x.headers),status:x.status,statusText:x.statusText,config:e,request:y})})}catch(b){throw g&&g(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new Re("Network Error",Re.ERR_NETWORK,e,y),{cause:b.cause||b}):Re.from(b,b&&b.code,e,y)}}),Xx={http:v0e,xhr:K0e,fetch:ebe};Z.forEach(Xx,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const K$=e=>`- ${e}`,tbe=e=>Z.isFunction(e)||e===null||e===!1,cL={getAdapter:e=>{e=Z.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let o=0;o`adapter ${u} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=t?o.length>1?`since : `+o.map(K$).join(` `):" "+K$(o[0]):"as no adapter specified";throw new Re("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:Xx};function ib(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Vl(null,e)}function G$(e){return ib(e),e.headers=qn.from(e.headers),e.data=rb.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),cL.getAdapter(e.adapter||$d.adapter)(e).then(function(r){return ib(e),r.data=rb.call(e,e.transformResponse,r),r.headers=qn.from(r.headers),r},function(r){return iL(r)||(ib(e),r&&r.response&&(r.response.data=rb.call(e,e.transformResponse,r.response),r.response.headers=qn.from(r.response.headers))),Promise.reject(r)})}const fL="1.7.7",__={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{__[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const q$={};__.transitional=function(t,n,r){function i(o,a){return"[Axios v"+fL+"] Transitional option '"+o+"'"+a+(r?". "+r:"")}return(o,a,u)=>{if(t===!1)throw new Re(i(a," has been removed"+(n?" in "+n:"")),Re.ERR_DEPRECATED);return n&&!q$[a]&&(q$[a]=!0,console.warn(i(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,a,u):!0}};function nbe(e,t,n){if(typeof e!="object")throw new Re("options must be an object",Re.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],a=t[o];if(a){const u=e[o],l=u===void 0||a(u,o,e);if(l!==!0)throw new Re("option "+o+" must be "+l,Re.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Re("Unknown option "+o,Re.ERR_BAD_OPTION)}}const Yx={assertOptions:nbe,validators:__},Do=Yx.validators;class hs{constructor(t){this.defaults=t,this.interceptors={request:new L$,response:new L$}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=` `+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=As(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Yx.assertOptions(r,{silentJSONParsing:Do.transitional(Do.boolean),forcedJSONParsing:Do.transitional(Do.boolean),clarifyTimeoutError:Do.transitional(Do.boolean)},!1),i!=null&&(Z.isFunction(i)?n.paramsSerializer={serialize:i}:Yx.assertOptions(i,{encode:Do.function,serialize:Do.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=o&&Z.merge(o.common,o[n.method]);o&&Z.forEach(["delete","get","head","post","put","patch","common"],y=>{delete o[y]}),n.headers=qn.concat(a,o);const u=[];let l=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(l=l&&g.synchronous,u.unshift(g.fulfilled,g.rejected))});const f=[];this.interceptors.response.forEach(function(g){f.push(g.fulfilled,g.rejected)});let p,d=0,h;if(!l){const y=[G$.bind(this),void 0];for(y.unshift.apply(y,u),y.push.apply(y,f),h=y.length,p=Promise.resolve(n);d{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const a=new Promise(u=>{r.subscribe(u),o=u}).then(i);return a.cancel=function(){r.unsubscribe(o)},a},t(function(o,a,u){r.reason||(r.reason=new Vl(o,a,u),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new O_(function(i){t=i}),cancel:t}}}function rbe(e){return function(n){return e.apply(null,n)}}function ibe(e){return Z.isObject(e)&&e.isAxiosError===!0}const Qx={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Qx).forEach(([e,t])=>{Qx[t]=e});function dL(e){const t=new hs(e),n=WD(hs.prototype.request,t);return Z.extend(n,hs.prototype,t,{allOwnKeys:!0}),Z.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return dL(As(e,i))},n}const Ut=dL($d);Ut.Axios=hs;Ut.CanceledError=Vl;Ut.CancelToken=O_;Ut.isCancel=iL;Ut.VERSION=fL;Ut.toFormData=gg;Ut.AxiosError=Re;Ut.Cancel=Ut.CanceledError;Ut.all=function(t){return Promise.all(t)};Ut.spread=rbe;Ut.isAxiosError=ibe;Ut.mergeConfig=As;Ut.AxiosHeaders=qn;Ut.formToJSON=e=>rL(Z.isHTMLForm(e)?new FormData(e):e);Ut.getAdapter=cL.getAdapter;Ut.HttpStatusCode=Qx;Ut.default=Ut;const obe="https://aoa-backend-0c688c299028.herokuapp.com/",Xl=Ut.create({baseURL:obe});async function abe(e,t){return await Xl.get(e,t)}async function sbe(e,t){return(await Xl.get(e,t)).data}async function ube(e,t){return await Xl.get(e,t)}async function lbe(e,t){return await Xl.delete(e,t)}async function cbe(e,t,n){return await Xl.post(e,t,n)}async function fbe(e,t,n){return await Xl.put(e,t,n)}const Ta={getSingle:abe,getAll:sbe,getAllPaginated:ube,deleteSingle:lbe,postSingle:cbe,putSingle:fbe},dbe=e=>Gl({queryFn:async()=>{const r=new URLSearchParams({...e.date&&{date:e.date.toISOString()}}).toString();return(await Ta.getSingle(`/daily-comparisons?${r}`)).data},queryKey:["todayComparisons"],retry:2,refetchInterval:6e4}),pbe=()=>Gl({queryFn:async()=>(await Ta.getSingle("/daily-comparisons")).data,queryKey:["dailyComparisons"],retry:2,refetchInterval:6e4}),hbe=()=>Gl({queryFn:async()=>(await Ta.getSingle("/rating/distribution")).data,queryKey:["perNComparisonsDistribution"],retry:2,refetchInterval:6e4}),vbe=e=>{const t=new URLSearchParams({page:e.page.toString(),page_size:e.page_size.toString(),...e.search&&{search:e.search},...e.sort_by&&{sort_by:e.sort_by},...e.sort_order&&{sort_order:e.sort_order}}).toString();return Gl({queryKey:["ratings",e],queryFn:async()=>(await Ta.getSingle(`/ratings?${t}`)).data})},mbe=()=>Gl({queryFn:async()=>(await Ta.getSingle("/get-avg-stdev")).data,queryKey:["getAvgStdev"],retry:2,refetchInterval:6e4}),gbe=e=>Gl({queryFn:async()=>{const r=new URLSearchParams({...e.n&&{n:e.n.toString()}}).toString();return(await Ta.getSingle(`/get-wordcount-with-n-comparisons?${r}`)).data},queryKey:["getWordsGeqN"],retry:2,refetchInterval:6e4}),ybe=()=>zD({mutationFn:async()=>(await Ta.getSingle("/export-comparisons-csv",{responseType:"blob"})).data}),bbe=()=>zD({mutationFn:async()=>(await Ta.getSingle("/export-ratings-csv",{responseType:"blob"})).data}),V$={views:{label:"Comparisons"},total:{label:"total",color:"hsl(var(--chart-1))"},week:{label:"week",color:"hsl(var(--chart-1))"}};function wbe(){const{data:e}=pbe(),[t,n]=A.useState("total"),r=A.useMemo(()=>({count:e==null?void 0:e.reduce((i,o)=>i+o.count,0)}),[e]);return e?$.jsxs(_l,{className:"",children:[$.jsxs(Cd,{className:"flex flex-col items-stretch space-y-0 border-b p-0 sm:flex-row",children:[$.jsxs("div",{className:"flex flex-1 flex-col justify-center gap-1 px-6 py-5 sm:py-6",children:[$.jsx(Td,{children:"Počty porovnání v čase"}),$.jsx(h_,{})]}),$.jsx("div",{className:"flex",children:["total"].map(i=>{var a;const o=i;return $.jsxs("button",{"data-active":t===o,className:"flex flex-1 flex-col justify-center gap-1 border-t px-6 py-4 text-left even:border-l data-[active=true]:bg-muted/50 sm:border-l sm:border-t-0 sm:px-8 sm:py-6",onClick:()=>n(o),children:[$.jsx("span",{className:"text-xs text-muted-foreground",children:V$[o].label}),$.jsx("span",{className:"text-lg font-bold leading-none sm:text-3xl",children:(a=r.count)==null?void 0:a.toLocaleString()})]},o)})})]}),$.jsx(Ol,{className:"px-2 sm:p-6",children:$.jsx(v_,{config:V$,className:"aspect-auto h-[250px] w-full",children:$.jsxs(mD,{accessibilityLayer:!0,data:e,margin:{left:12,right:12},children:[$.jsx(d_,{vertical:!1}),$.jsx(Ed,{dataKey:"date",tickLine:!1,axisLine:!1,tickMargin:8,minTickGap:32,tickFormatter:i=>new Date(i).toLocaleDateString("en-US",{month:"short",day:"numeric"})}),$.jsx(Ad,{axisLine:!1,tickLine:!1,tickMargin:8,tickFormatter:i=>i.toLocaleString(),allowDecimals:!1,domain:[0,"auto"]}),$.jsx(PD,{content:$.jsx(ED,{className:"w-[150px]",nameKey:"views",labelFormatter:i=>new Date(i).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})})}),$.jsx(Ca,{dataKey:"count",fill:`var(--color-${t})`})]})})})]}):null}const xbe={views:{label:"Počet slov"},total:{label:"n_comparisons",color:"hsl(var(--chart-1))"}};function Sbe(){const{data:e}=hbe(),[t,n]=A.useState("total"),r=A.useMemo(()=>({count:e==null?void 0:e.reduce((o,a)=>o+a.count,0)}),[e]);if(!e)return null;const i=({active:o,payload:a})=>!o||!(a!=null&&a.length)?null:$.jsxs("div",{className:"bg-background border rounded-lg shadow-md p-3 dark:bg-card",children:[$.jsx("p",{className:"text-sm font-medium text-foreground",children:`${a[0].payload.n_comparisons} porovnání`}),$.jsx("p",{className:"text-sm text-muted-foreground",children:`Počet slov: ${a[0].value}`})]});return $.jsxs(_l,{className:"",children:[$.jsxs(Cd,{className:"flex flex-col items-stretch space-y-0 border-b p-0 sm:flex-row",children:[$.jsxs("div",{className:"flex flex-1 flex-col justify-center gap-1 px-6 py-5 sm:py-6",children:[$.jsx(Td,{children:"Počty porovnání slov"}),$.jsx(h_,{})]}),$.jsx("div",{className:"flex",children:["total"].map(o=>{var u;const a=o;return $.jsxs("button",{"data-active":t===a,className:"flex flex-1 flex-col justify-center gap-1 border-t px-6 py-4 text-left even:border-l data-[active=true]:bg-muted/50 sm:border-l sm:border-t-0 sm:px-8 sm:py-6",onClick:()=>n(a),children:[$.jsx("span",{className:"text-xs text-muted-foreground",children:"Celkový počet slov"}),$.jsx("span",{className:"text-lg font-bold leading-none sm:text-3xl",children:(u=r.count)==null?void 0:u.toLocaleString()})]},a)})})]}),$.jsx(Ol,{className:"px-2 sm:p-6",children:$.jsx(v_,{config:xbe,className:"aspect-auto h-[250px] w-full",children:$.jsxs(mD,{accessibilityLayer:!0,data:e,margin:{left:12,right:12},children:[$.jsx(d_,{vertical:!1}),$.jsx(Ed,{dataKey:"n_comparisons",tickLine:!1,axisLine:!1,tickMargin:8,minTickGap:32}),$.jsx(Ad,{axisLine:!1,tickLine:!1,tickMargin:8,tickFormatter:o=>o.toLocaleString(),allowDecimals:!1,domain:[0,"auto"]}),$.jsx(PD,{content:$.jsx(i,{})}),$.jsx(Ca,{dataKey:"count",fill:`var(--color-${t})`})]})})})]})}var tm={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */tm.exports;(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",u="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",f=500,p="__lodash_placeholder__",d=1,h=2,m=4,y=1,g=2,w=1,b=2,x=4,S=8,P=16,O=32,E=64,T=128,R=256,I=512,B=30,k="...",U=800,V=16,q=1,X=2,G=3,Y=1/0,F=9007199254740991,z=17976931348623157e292,ee=NaN,oe=4294967295,ae=oe-1,be=oe>>>1,Ce=[["ary",T],["bind",w],["bindKey",b],["curry",S],["curryRight",P],["flip",I],["partial",O],["partialRight",E],["rearg",R]],Ne="[object Arguments]",Le="[object Array]",me="[object AsyncFunction]",Ae="[object Boolean]",se="[object Date]",de="[object DOMException]",pe="[object Error]",J="[object Function]",Ue="[object GeneratorFunction]",xe="[object Map]",Qe="[object Number]",ft="[object Null]",tt="[object Object]",Xn="[object Promise]",Yn="[object Proxy]",pi="[object RegExp]",zt="[object Set]",Qn="[object String]",_o="[object Symbol]",Dd="[object Undefined]",Oo="[object WeakMap]",VB="[object WeakSet]",Jl="[object ArrayBuffer]",Ls="[object DataView]",$g="[object Float32Array]",Rg="[object Float64Array]",Ng="[object Int8Array]",Ig="[object Int16Array]",jg="[object Int32Array]",kg="[object Uint8Array]",Dg="[object Uint8ClampedArray]",Lg="[object Uint16Array]",Fg="[object Uint32Array]",XB=/\b__p \+= '';/g,YB=/\b(__p \+=) '' \+/g,QB=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Y_=/&(?:amp|lt|gt|quot|#39);/g,Q_=/[&<>"']/g,ZB=RegExp(Y_.source),JB=RegExp(Q_.source),e3=/<%-([\s\S]+?)%>/g,t3=/<%([\s\S]+?)%>/g,Z_=/<%=([\s\S]+?)%>/g,n3=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r3=/^\w*$/,i3=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Bg=/[\\^$.*+?()[\]{}|]/g,o3=RegExp(Bg.source),Ug=/^\s+/,a3=/\s/,s3=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,u3=/\{\n\/\* \[wrapped with (.+)\] \*/,l3=/,? & /,c3=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,f3=/[()=,{}\[\]\/\s]/,d3=/\\(\\)?/g,p3=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,J_=/\w*$/,h3=/^[-+]0x[0-9a-f]+$/i,v3=/^0b[01]+$/i,m3=/^\[object .+?Constructor\]$/,g3=/^0o[0-7]+$/i,y3=/^(?:0|[1-9]\d*)$/,b3=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ld=/($^)/,w3=/['\n\r\u2028\u2029\\]/g,Fd="\\ud800-\\udfff",x3="\\u0300-\\u036f",S3="\\ufe20-\\ufe2f",_3="\\u20d0-\\u20ff",eO=x3+S3+_3,tO="\\u2700-\\u27bf",nO="a-z\\xdf-\\xf6\\xf8-\\xff",O3="\\xac\\xb1\\xd7\\xf7",P3="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",E3="\\u2000-\\u206f",A3=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",rO="A-Z\\xc0-\\xd6\\xd8-\\xde",iO="\\ufe0e\\ufe0f",oO=O3+P3+E3+A3,zg="['’]",C3="["+Fd+"]",aO="["+oO+"]",Bd="["+eO+"]",sO="\\d+",T3="["+tO+"]",uO="["+nO+"]",lO="[^"+Fd+oO+sO+tO+nO+rO+"]",Wg="\\ud83c[\\udffb-\\udfff]",M3="(?:"+Bd+"|"+Wg+")",cO="[^"+Fd+"]",Hg="(?:\\ud83c[\\udde6-\\uddff]){2}",Kg="[\\ud800-\\udbff][\\udc00-\\udfff]",Fs="["+rO+"]",fO="\\u200d",dO="(?:"+uO+"|"+lO+")",$3="(?:"+Fs+"|"+lO+")",pO="(?:"+zg+"(?:d|ll|m|re|s|t|ve))?",hO="(?:"+zg+"(?:D|LL|M|RE|S|T|VE))?",vO=M3+"?",mO="["+iO+"]?",R3="(?:"+fO+"(?:"+[cO,Hg,Kg].join("|")+")"+mO+vO+")*",N3="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",I3="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",gO=mO+vO+R3,j3="(?:"+[T3,Hg,Kg].join("|")+")"+gO,k3="(?:"+[cO+Bd+"?",Bd,Hg,Kg,C3].join("|")+")",D3=RegExp(zg,"g"),L3=RegExp(Bd,"g"),Gg=RegExp(Wg+"(?="+Wg+")|"+k3+gO,"g"),F3=RegExp([Fs+"?"+uO+"+"+pO+"(?="+[aO,Fs,"$"].join("|")+")",$3+"+"+hO+"(?="+[aO,Fs+dO,"$"].join("|")+")",Fs+"?"+dO+"+"+pO,Fs+"+"+hO,I3,N3,sO,j3].join("|"),"g"),B3=RegExp("["+fO+Fd+eO+iO+"]"),U3=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,z3=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],W3=-1,gt={};gt[$g]=gt[Rg]=gt[Ng]=gt[Ig]=gt[jg]=gt[kg]=gt[Dg]=gt[Lg]=gt[Fg]=!0,gt[Ne]=gt[Le]=gt[Jl]=gt[Ae]=gt[Ls]=gt[se]=gt[pe]=gt[J]=gt[xe]=gt[Qe]=gt[tt]=gt[pi]=gt[zt]=gt[Qn]=gt[Oo]=!1;var ht={};ht[Ne]=ht[Le]=ht[Jl]=ht[Ls]=ht[Ae]=ht[se]=ht[$g]=ht[Rg]=ht[Ng]=ht[Ig]=ht[jg]=ht[xe]=ht[Qe]=ht[tt]=ht[pi]=ht[zt]=ht[Qn]=ht[_o]=ht[kg]=ht[Dg]=ht[Lg]=ht[Fg]=!0,ht[pe]=ht[J]=ht[Oo]=!1;var H3={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},K3={"&":"&","<":"<",">":">",'"':""","'":"'"},G3={"&":"&","<":"<",">":">",""":'"',"'":"'"},q3={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},V3=parseFloat,X3=parseInt,yO=typeof Zi=="object"&&Zi&&Zi.Object===Object&&Zi,Y3=typeof self=="object"&&self&&self.Object===Object&&self,rn=yO||Y3||Function("return this")(),qg=t&&!t.nodeType&&t,Ra=qg&&!0&&e&&!e.nodeType&&e,bO=Ra&&Ra.exports===qg,Vg=bO&&yO.process,gr=function(){try{var H=Ra&&Ra.require&&Ra.require("util").types;return H||Vg&&Vg.binding&&Vg.binding("util")}catch{}}(),wO=gr&&gr.isArrayBuffer,xO=gr&&gr.isDate,SO=gr&&gr.isMap,_O=gr&&gr.isRegExp,OO=gr&&gr.isSet,PO=gr&&gr.isTypedArray;function Zn(H,ne,Q){switch(Q.length){case 0:return H.call(ne);case 1:return H.call(ne,Q[0]);case 2:return H.call(ne,Q[0],Q[1]);case 3:return H.call(ne,Q[0],Q[1],Q[2])}return H.apply(ne,Q)}function Q3(H,ne,Q,ve){for(var Me=-1,Ze=H==null?0:H.length;++Me-1}function Xg(H,ne,Q){for(var ve=-1,Me=H==null?0:H.length;++ve-1;);return Q}function NO(H,ne){for(var Q=H.length;Q--&&Bs(ne,H[Q],0)>-1;);return Q}function aU(H,ne){for(var Q=H.length,ve=0;Q--;)H[Q]===ne&&++ve;return ve}var sU=Jg(H3),uU=Jg(K3);function lU(H){return"\\"+q3[H]}function cU(H,ne){return H==null?n:H[ne]}function Us(H){return B3.test(H)}function fU(H){return U3.test(H)}function dU(H){for(var ne,Q=[];!(ne=H.next()).done;)Q.push(ne.value);return Q}function ry(H){var ne=-1,Q=Array(H.size);return H.forEach(function(ve,Me){Q[++ne]=[Me,ve]}),Q}function IO(H,ne){return function(Q){return H(ne(Q))}}function Ao(H,ne){for(var Q=-1,ve=H.length,Me=0,Ze=[];++Q-1}function JU(s,c){var v=this.__data__,_=ip(v,s);return _<0?(++this.size,v.push([s,c])):v[_][1]=c,this}Di.prototype.clear=XU,Di.prototype.delete=YU,Di.prototype.get=QU,Di.prototype.has=ZU,Di.prototype.set=JU;function Li(s){var c=-1,v=s==null?0:s.length;for(this.clear();++c=c?s:c)),s}function xr(s,c,v,_,C,N){var j,D=c&d,K=c&h,re=c&m;if(v&&(j=C?v(s,_,C,N):v(s)),j!==n)return j;if(!At(s))return s;var ie=$e(s);if(ie){if(j=r4(s),!D)return In(s,j)}else{var ue=dn(s),fe=ue==J||ue==Ue;if(No(s))return mP(s,D);if(ue==tt||ue==Ne||fe&&!C){if(j=K||fe?{}:jP(s),!D)return K?Gz(s,vz(j,s)):Kz(s,GO(j,s))}else{if(!ht[ue])return C?s:{};j=i4(s,ue,D)}}N||(N=new Hr);var we=N.get(s);if(we)return we;N.set(s,j),cE(s)?s.forEach(function(Ee){j.add(xr(Ee,c,v,Ee,s,N))}):uE(s)&&s.forEach(function(Ee,We){j.set(We,xr(Ee,c,v,We,s,N))});var Pe=re?K?Ty:Cy:K?kn:Qt,Fe=ie?n:Pe(s);return yr(Fe||s,function(Ee,We){Fe&&(We=Ee,Ee=s[We]),ac(j,We,xr(Ee,c,v,We,s,N))}),j}function mz(s){var c=Qt(s);return function(v){return qO(v,s,c)}}function qO(s,c,v){var _=v.length;if(s==null)return!_;for(s=dt(s);_--;){var C=v[_],N=c[C],j=s[C];if(j===n&&!(C in s)||!N(j))return!1}return!0}function VO(s,c,v){if(typeof s!="function")throw new br(a);return pc(function(){s.apply(n,v)},c)}function sc(s,c,v,_){var C=-1,N=Ud,j=!0,D=s.length,K=[],re=c.length;if(!D)return K;v&&(c=_t(c,Jn(v))),_?(N=Xg,j=!1):c.length>=i&&(N=ec,j=!1,c=new ja(c));e:for(;++CC?0:C+v),_=_===n||_>C?C:Ie(_),_<0&&(_+=C),_=v>_?0:dE(_);v<_;)s[v++]=c;return s}function YO(s,c){var v=[];return To(s,function(_,C,N){c(_,C,N)&&v.push(_)}),v}function on(s,c,v,_,C){var N=-1,j=s.length;for(v||(v=a4),C||(C=[]);++N0&&v(D)?c>1?on(D,c-1,v,_,C):Eo(C,D):_||(C[C.length]=D)}return C}var cy=SP(),QO=SP(!0);function hi(s,c){return s&&cy(s,c,Qt)}function fy(s,c){return s&&QO(s,c,Qt)}function ap(s,c){return Po(c,function(v){return Wi(s[v])})}function Da(s,c){c=$o(c,s);for(var v=0,_=c.length;s!=null&&v<_;)s=s[mi(c[v++])];return v&&v==_?s:n}function ZO(s,c,v){var _=c(s);return $e(s)?_:Eo(_,v(s))}function xn(s){return s==null?s===n?Dd:ft:Na&&Na in dt(s)?e4(s):p4(s)}function dy(s,c){return s>c}function bz(s,c){return s!=null&&ot.call(s,c)}function wz(s,c){return s!=null&&c in dt(s)}function xz(s,c,v){return s>=fn(c,v)&&s=120&&ie.length>=120)?new ja(j&&ie):n}ie=s[0];var ue=-1,fe=D[0];e:for(;++ue-1;)D!==s&&Qd.call(D,K,1),Qd.call(s,K,1);return s}function uP(s,c){for(var v=s?c.length:0,_=v-1;v--;){var C=c[v];if(v==_||C!==N){var N=C;zi(C)?Qd.call(s,C,1):xy(s,C)}}return s}function yy(s,c){return s+ep(zO()*(c-s+1))}function Iz(s,c,v,_){for(var C=-1,N=Ht(Jd((c-s)/(v||1)),0),j=Q(N);N--;)j[_?N:++C]=s,s+=v;return j}function by(s,c){var v="";if(!s||c<1||c>F)return v;do c%2&&(v+=s),c=ep(c/2),c&&(s+=s);while(c);return v}function ze(s,c){return ky(LP(s,c,Dn),s+"")}function jz(s){return KO(Zs(s))}function kz(s,c){var v=Zs(s);return gp(v,ka(c,0,v.length))}function cc(s,c,v,_){if(!At(s))return s;c=$o(c,s);for(var C=-1,N=c.length,j=N-1,D=s;D!=null&&++CC?0:C+c),v=v>C?C:v,v<0&&(v+=C),C=c>v?0:v-c>>>0,c>>>=0;for(var N=Q(C);++_>>1,j=s[N];j!==null&&!tr(j)&&(v?j<=c:j=i){var re=c?null:Yz(s);if(re)return Wd(re);j=!1,C=ec,K=new ja}else K=c?[]:D;e:for(;++_=_?s:Sr(s,c,v)}var vP=AU||function(s){return rn.clearTimeout(s)};function mP(s,c){if(c)return s.slice();var v=s.length,_=DO?DO(v):new s.constructor(v);return s.copy(_),_}function Py(s){var c=new s.constructor(s.byteLength);return new Xd(c).set(new Xd(s)),c}function Uz(s,c){var v=c?Py(s.buffer):s.buffer;return new s.constructor(v,s.byteOffset,s.byteLength)}function zz(s){var c=new s.constructor(s.source,J_.exec(s));return c.lastIndex=s.lastIndex,c}function Wz(s){return oc?dt(oc.call(s)):{}}function gP(s,c){var v=c?Py(s.buffer):s.buffer;return new s.constructor(v,s.byteOffset,s.length)}function yP(s,c){if(s!==c){var v=s!==n,_=s===null,C=s===s,N=tr(s),j=c!==n,D=c===null,K=c===c,re=tr(c);if(!D&&!re&&!N&&s>c||N&&j&&K&&!D&&!re||_&&j&&K||!v&&K||!C)return 1;if(!_&&!N&&!re&&s=D)return K;var re=v[_];return K*(re=="desc"?-1:1)}}return s.index-c.index}function bP(s,c,v,_){for(var C=-1,N=s.length,j=v.length,D=-1,K=c.length,re=Ht(N-j,0),ie=Q(K+re),ue=!_;++D1?v[C-1]:n,j=C>2?v[2]:n;for(N=s.length>3&&typeof N=="function"?(C--,N):n,j&&Sn(v[0],v[1],j)&&(N=C<3?n:N,C=1),c=dt(c);++_-1?C[N?c[j]:j]:n}}function PP(s){return Ui(function(c){var v=c.length,_=v,C=wr.prototype.thru;for(s&&c.reverse();_--;){var N=c[_];if(typeof N!="function")throw new br(a);if(C&&!j&&vp(N)=="wrapper")var j=new wr([],!0)}for(_=j?_:v;++_1&&qe.reverse(),ie&&KD))return!1;var re=N.get(s),ie=N.get(c);if(re&&ie)return re==c&&ie==s;var ue=-1,fe=!0,we=v&g?new ja:n;for(N.set(s,c),N.set(c,s);++ue1?"& ":"")+c[_],c=c.join(v>2?", ":" "),s.replace(s3,`{ /* [wrapped with `+c+`] */ `)}function a4(s){return $e(s)||Ba(s)||!!(BO&&s&&s[BO])}function zi(s,c){var v=typeof s;return c=c??F,!!c&&(v=="number"||v!="symbol"&&y3.test(s))&&s>-1&&s%1==0&&s0){if(++c>=U)return arguments[0]}else c=0;return s.apply(n,arguments)}}function gp(s,c){var v=-1,_=s.length,C=_-1;for(c=c===n?_:c;++v1?s[c-1]:n;return v=typeof v=="function"?(s.pop(),v):n,YP(s,v)});function QP(s){var c=M(s);return c.__chain__=!0,c}function gW(s,c){return c(s),s}function yp(s,c){return c(s)}var yW=Ui(function(s){var c=s.length,v=c?s[0]:0,_=this.__wrapped__,C=function(N){return ly(N,s)};return c>1||this.__actions__.length||!(_ instanceof Ke)||!zi(v)?this.thru(C):(_=_.slice(v,+v+(c?1:0)),_.__actions__.push({func:yp,args:[C],thisArg:n}),new wr(_,this.__chain__).thru(function(N){return c&&!N.length&&N.push(n),N}))});function bW(){return QP(this)}function wW(){return new wr(this.value(),this.__chain__)}function xW(){this.__values__===n&&(this.__values__=fE(this.value()));var s=this.__index__>=this.__values__.length,c=s?n:this.__values__[this.__index__++];return{done:s,value:c}}function SW(){return this}function _W(s){for(var c,v=this;v instanceof rp;){var _=HP(v);_.__index__=0,_.__values__=n,c?C.__wrapped__=_:c=_;var C=_;v=v.__wrapped__}return C.__wrapped__=s,c}function OW(){var s=this.__wrapped__;if(s instanceof Ke){var c=s;return this.__actions__.length&&(c=new Ke(this)),c=c.reverse(),c.__actions__.push({func:yp,args:[Dy],thisArg:n}),new wr(c,this.__chain__)}return this.thru(Dy)}function PW(){return pP(this.__wrapped__,this.__actions__)}var EW=cp(function(s,c,v){ot.call(s,v)?++s[v]:Fi(s,v,1)});function AW(s,c,v){var _=$e(s)?EO:gz;return v&&Sn(s,c,v)&&(c=n),_(s,Se(c,3))}function CW(s,c){var v=$e(s)?Po:YO;return v(s,Se(c,3))}var TW=OP(KP),MW=OP(GP);function $W(s,c){return on(bp(s,c),1)}function RW(s,c){return on(bp(s,c),Y)}function NW(s,c,v){return v=v===n?1:Ie(v),on(bp(s,c),v)}function ZP(s,c){var v=$e(s)?yr:To;return v(s,Se(c,3))}function JP(s,c){var v=$e(s)?Z3:XO;return v(s,Se(c,3))}var IW=cp(function(s,c,v){ot.call(s,v)?s[v].push(c):Fi(s,v,[c])});function jW(s,c,v,_){s=jn(s)?s:Zs(s),v=v&&!_?Ie(v):0;var C=s.length;return v<0&&(v=Ht(C+v,0)),Op(s)?v<=C&&s.indexOf(c,v)>-1:!!C&&Bs(s,c,v)>-1}var kW=ze(function(s,c,v){var _=-1,C=typeof c=="function",N=jn(s)?Q(s.length):[];return To(s,function(j){N[++_]=C?Zn(c,j,v):uc(j,c,v)}),N}),DW=cp(function(s,c,v){Fi(s,v,c)});function bp(s,c){var v=$e(s)?_t:nP;return v(s,Se(c,3))}function LW(s,c,v,_){return s==null?[]:($e(c)||(c=c==null?[]:[c]),v=_?n:v,$e(v)||(v=v==null?[]:[v]),aP(s,c,v))}var FW=cp(function(s,c,v){s[v?0:1].push(c)},function(){return[[],[]]});function BW(s,c,v){var _=$e(s)?Yg:MO,C=arguments.length<3;return _(s,Se(c,4),v,C,To)}function UW(s,c,v){var _=$e(s)?J3:MO,C=arguments.length<3;return _(s,Se(c,4),v,C,XO)}function zW(s,c){var v=$e(s)?Po:YO;return v(s,Sp(Se(c,3)))}function WW(s){var c=$e(s)?KO:jz;return c(s)}function HW(s,c,v){(v?Sn(s,c,v):c===n)?c=1:c=Ie(c);var _=$e(s)?dz:kz;return _(s,c)}function KW(s){var c=$e(s)?pz:Lz;return c(s)}function GW(s){if(s==null)return 0;if(jn(s))return Op(s)?zs(s):s.length;var c=dn(s);return c==xe||c==zt?s.size:vy(s).length}function qW(s,c,v){var _=$e(s)?Qg:Fz;return v&&Sn(s,c,v)&&(c=n),_(s,Se(c,3))}var VW=ze(function(s,c){if(s==null)return[];var v=c.length;return v>1&&Sn(s,c[0],c[1])?c=[]:v>2&&Sn(c[0],c[1],c[2])&&(c=[c[0]]),aP(s,on(c,1),[])}),wp=CU||function(){return rn.Date.now()};function XW(s,c){if(typeof c!="function")throw new br(a);return s=Ie(s),function(){if(--s<1)return c.apply(this,arguments)}}function eE(s,c,v){return c=v?n:c,c=s&&c==null?s.length:c,Bi(s,T,n,n,n,n,c)}function tE(s,c){var v;if(typeof c!="function")throw new br(a);return s=Ie(s),function(){return--s>0&&(v=c.apply(this,arguments)),s<=1&&(c=n),v}}var Fy=ze(function(s,c,v){var _=w;if(v.length){var C=Ao(v,Ys(Fy));_|=O}return Bi(s,_,c,v,C)}),nE=ze(function(s,c,v){var _=w|b;if(v.length){var C=Ao(v,Ys(nE));_|=O}return Bi(c,_,s,v,C)});function rE(s,c,v){c=v?n:c;var _=Bi(s,S,n,n,n,n,n,c);return _.placeholder=rE.placeholder,_}function iE(s,c,v){c=v?n:c;var _=Bi(s,P,n,n,n,n,n,c);return _.placeholder=iE.placeholder,_}function oE(s,c,v){var _,C,N,j,D,K,re=0,ie=!1,ue=!1,fe=!0;if(typeof s!="function")throw new br(a);c=Or(c)||0,At(v)&&(ie=!!v.leading,ue="maxWait"in v,N=ue?Ht(Or(v.maxWait)||0,c):N,fe="trailing"in v?!!v.trailing:fe);function we(kt){var Gr=_,Ki=C;return _=C=n,re=kt,j=s.apply(Ki,Gr),j}function Pe(kt){return re=kt,D=pc(We,c),ie?we(kt):j}function Fe(kt){var Gr=kt-K,Ki=kt-re,OE=c-Gr;return ue?fn(OE,N-Ki):OE}function Ee(kt){var Gr=kt-K,Ki=kt-re;return K===n||Gr>=c||Gr<0||ue&&Ki>=N}function We(){var kt=wp();if(Ee(kt))return qe(kt);D=pc(We,Fe(kt))}function qe(kt){return D=n,fe&&_?we(kt):(_=C=n,j)}function nr(){D!==n&&vP(D),re=0,_=K=C=D=n}function _n(){return D===n?j:qe(wp())}function rr(){var kt=wp(),Gr=Ee(kt);if(_=arguments,C=this,K=kt,Gr){if(D===n)return Pe(K);if(ue)return vP(D),D=pc(We,c),we(K)}return D===n&&(D=pc(We,c)),j}return rr.cancel=nr,rr.flush=_n,rr}var YW=ze(function(s,c){return VO(s,1,c)}),QW=ze(function(s,c,v){return VO(s,Or(c)||0,v)});function ZW(s){return Bi(s,I)}function xp(s,c){if(typeof s!="function"||c!=null&&typeof c!="function")throw new br(a);var v=function(){var _=arguments,C=c?c.apply(this,_):_[0],N=v.cache;if(N.has(C))return N.get(C);var j=s.apply(this,_);return v.cache=N.set(C,j)||N,j};return v.cache=new(xp.Cache||Li),v}xp.Cache=Li;function Sp(s){if(typeof s!="function")throw new br(a);return function(){var c=arguments;switch(c.length){case 0:return!s.call(this);case 1:return!s.call(this,c[0]);case 2:return!s.call(this,c[0],c[1]);case 3:return!s.call(this,c[0],c[1],c[2])}return!s.apply(this,c)}}function JW(s){return tE(2,s)}var e5=Bz(function(s,c){c=c.length==1&&$e(c[0])?_t(c[0],Jn(Se())):_t(on(c,1),Jn(Se()));var v=c.length;return ze(function(_){for(var C=-1,N=fn(_.length,v);++C=c}),Ba=JO(function(){return arguments}())?JO:function(s){return $t(s)&&ot.call(s,"callee")&&!FO.call(s,"callee")},$e=Q.isArray,v5=wO?Jn(wO):_z;function jn(s){return s!=null&&_p(s.length)&&!Wi(s)}function jt(s){return $t(s)&&jn(s)}function m5(s){return s===!0||s===!1||$t(s)&&xn(s)==Ae}var No=MU||Qy,g5=xO?Jn(xO):Oz;function y5(s){return $t(s)&&s.nodeType===1&&!hc(s)}function b5(s){if(s==null)return!0;if(jn(s)&&($e(s)||typeof s=="string"||typeof s.splice=="function"||No(s)||Qs(s)||Ba(s)))return!s.length;var c=dn(s);if(c==xe||c==zt)return!s.size;if(dc(s))return!vy(s).length;for(var v in s)if(ot.call(s,v))return!1;return!0}function w5(s,c){return lc(s,c)}function x5(s,c,v){v=typeof v=="function"?v:n;var _=v?v(s,c):n;return _===n?lc(s,c,n,v):!!_}function Uy(s){if(!$t(s))return!1;var c=xn(s);return c==pe||c==de||typeof s.message=="string"&&typeof s.name=="string"&&!hc(s)}function S5(s){return typeof s=="number"&&UO(s)}function Wi(s){if(!At(s))return!1;var c=xn(s);return c==J||c==Ue||c==me||c==Yn}function sE(s){return typeof s=="number"&&s==Ie(s)}function _p(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=F}function At(s){var c=typeof s;return s!=null&&(c=="object"||c=="function")}function $t(s){return s!=null&&typeof s=="object"}var uE=SO?Jn(SO):Ez;function _5(s,c){return s===c||hy(s,c,$y(c))}function O5(s,c,v){return v=typeof v=="function"?v:n,hy(s,c,$y(c),v)}function P5(s){return lE(s)&&s!=+s}function E5(s){if(l4(s))throw new Me(o);return eP(s)}function A5(s){return s===null}function C5(s){return s==null}function lE(s){return typeof s=="number"||$t(s)&&xn(s)==Qe}function hc(s){if(!$t(s)||xn(s)!=tt)return!1;var c=Yd(s);if(c===null)return!0;var v=ot.call(c,"constructor")&&c.constructor;return typeof v=="function"&&v instanceof v&&Gd.call(v)==OU}var zy=_O?Jn(_O):Az;function T5(s){return sE(s)&&s>=-F&&s<=F}var cE=OO?Jn(OO):Cz;function Op(s){return typeof s=="string"||!$e(s)&&$t(s)&&xn(s)==Qn}function tr(s){return typeof s=="symbol"||$t(s)&&xn(s)==_o}var Qs=PO?Jn(PO):Tz;function M5(s){return s===n}function $5(s){return $t(s)&&dn(s)==Oo}function R5(s){return $t(s)&&xn(s)==VB}var N5=hp(my),I5=hp(function(s,c){return s<=c});function fE(s){if(!s)return[];if(jn(s))return Op(s)?Wr(s):In(s);if(tc&&s[tc])return dU(s[tc]());var c=dn(s),v=c==xe?ry:c==zt?Wd:Zs;return v(s)}function Hi(s){if(!s)return s===0?s:0;if(s=Or(s),s===Y||s===-Y){var c=s<0?-1:1;return c*z}return s===s?s:0}function Ie(s){var c=Hi(s),v=c%1;return c===c?v?c-v:c:0}function dE(s){return s?ka(Ie(s),0,oe):0}function Or(s){if(typeof s=="number")return s;if(tr(s))return ee;if(At(s)){var c=typeof s.valueOf=="function"?s.valueOf():s;s=At(c)?c+"":c}if(typeof s!="string")return s===0?s:+s;s=$O(s);var v=v3.test(s);return v||g3.test(s)?X3(s.slice(2),v?2:8):h3.test(s)?ee:+s}function pE(s){return vi(s,kn(s))}function j5(s){return s?ka(Ie(s),-F,F):s===0?s:0}function nt(s){return s==null?"":er(s)}var k5=Vs(function(s,c){if(dc(c)||jn(c)){vi(c,Qt(c),s);return}for(var v in c)ot.call(c,v)&&ac(s,v,c[v])}),hE=Vs(function(s,c){vi(c,kn(c),s)}),Pp=Vs(function(s,c,v,_){vi(c,kn(c),s,_)}),D5=Vs(function(s,c,v,_){vi(c,Qt(c),s,_)}),L5=Ui(ly);function F5(s,c){var v=qs(s);return c==null?v:GO(v,c)}var B5=ze(function(s,c){s=dt(s);var v=-1,_=c.length,C=_>2?c[2]:n;for(C&&Sn(c[0],c[1],C)&&(_=1);++v<_;)for(var N=c[v],j=kn(N),D=-1,K=j.length;++D1),N}),vi(s,Ty(s),v),_&&(v=xr(v,d|h|m,Qz));for(var C=c.length;C--;)xy(v,c[C]);return v});function i8(s,c){return mE(s,Sp(Se(c)))}var o8=Ui(function(s,c){return s==null?{}:Rz(s,c)});function mE(s,c){if(s==null)return{};var v=_t(Ty(s),function(_){return[_]});return c=Se(c),sP(s,v,function(_,C){return c(_,C[0])})}function a8(s,c,v){c=$o(c,s);var _=-1,C=c.length;for(C||(C=1,s=n);++_c){var _=s;s=c,c=_}if(v||s%1||c%1){var C=zO();return fn(s+C*(c-s+V3("1e-"+((C+"").length-1))),c)}return yy(s,c)}var g8=Xs(function(s,c,v){return c=c.toLowerCase(),s+(v?bE(c):c)});function bE(s){return Ky(nt(s).toLowerCase())}function wE(s){return s=nt(s),s&&s.replace(b3,sU).replace(L3,"")}function y8(s,c,v){s=nt(s),c=er(c);var _=s.length;v=v===n?_:ka(Ie(v),0,_);var C=v;return v-=c.length,v>=0&&s.slice(v,C)==c}function b8(s){return s=nt(s),s&&JB.test(s)?s.replace(Q_,uU):s}function w8(s){return s=nt(s),s&&o3.test(s)?s.replace(Bg,"\\$&"):s}var x8=Xs(function(s,c,v){return s+(v?"-":"")+c.toLowerCase()}),S8=Xs(function(s,c,v){return s+(v?" ":"")+c.toLowerCase()}),_8=_P("toLowerCase");function O8(s,c,v){s=nt(s),c=Ie(c);var _=c?zs(s):0;if(!c||_>=c)return s;var C=(c-_)/2;return pp(ep(C),v)+s+pp(Jd(C),v)}function P8(s,c,v){s=nt(s),c=Ie(c);var _=c?zs(s):0;return c&&_>>0,v?(s=nt(s),s&&(typeof c=="string"||c!=null&&!zy(c))&&(c=er(c),!c&&Us(s))?Ro(Wr(s),0,v):s.split(c,v)):[]}var R8=Xs(function(s,c,v){return s+(v?" ":"")+Ky(c)});function N8(s,c,v){return s=nt(s),v=v==null?0:ka(Ie(v),0,s.length),c=er(c),s.slice(v,v+c.length)==c}function I8(s,c,v){var _=M.templateSettings;v&&Sn(s,c,v)&&(c=n),s=nt(s),c=Pp({},c,_,MP);var C=Pp({},c.imports,_.imports,MP),N=Qt(C),j=ny(C,N),D,K,re=0,ie=c.interpolate||Ld,ue="__p += '",fe=iy((c.escape||Ld).source+"|"+ie.source+"|"+(ie===Z_?p3:Ld).source+"|"+(c.evaluate||Ld).source+"|$","g"),we="//# sourceURL="+(ot.call(c,"sourceURL")?(c.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++W3+"]")+` `;s.replace(fe,function(Ee,We,qe,nr,_n,rr){return qe||(qe=nr),ue+=s.slice(re,rr).replace(w3,lU),We&&(D=!0,ue+=`' + __e(`+We+`) + '`),_n&&(K=!0,ue+=`'; `+_n+`; __p += '`),qe&&(ue+=`' + ((__t = (`+qe+`)) == null ? '' : __t) + '`),re=rr+Ee.length,Ee}),ue+=`'; `;var Pe=ot.call(c,"variable")&&c.variable;if(!Pe)ue=`with (obj) { `+ue+` } `;else if(f3.test(Pe))throw new Me(u);ue=(K?ue.replace(XB,""):ue).replace(YB,"$1").replace(QB,"$1;"),ue="function("+(Pe||"obj")+`) { `+(Pe?"":`obj || (obj = {}); `)+"var __t, __p = ''"+(D?", __e = _.escape":"")+(K?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; `)+ue+`return __p }`;var Fe=SE(function(){return Ze(N,we+"return "+ue).apply(n,j)});if(Fe.source=ue,Uy(Fe))throw Fe;return Fe}function j8(s){return nt(s).toLowerCase()}function k8(s){return nt(s).toUpperCase()}function D8(s,c,v){if(s=nt(s),s&&(v||c===n))return $O(s);if(!s||!(c=er(c)))return s;var _=Wr(s),C=Wr(c),N=RO(_,C),j=NO(_,C)+1;return Ro(_,N,j).join("")}function L8(s,c,v){if(s=nt(s),s&&(v||c===n))return s.slice(0,jO(s)+1);if(!s||!(c=er(c)))return s;var _=Wr(s),C=NO(_,Wr(c))+1;return Ro(_,0,C).join("")}function F8(s,c,v){if(s=nt(s),s&&(v||c===n))return s.replace(Ug,"");if(!s||!(c=er(c)))return s;var _=Wr(s),C=RO(_,Wr(c));return Ro(_,C).join("")}function B8(s,c){var v=B,_=k;if(At(c)){var C="separator"in c?c.separator:C;v="length"in c?Ie(c.length):v,_="omission"in c?er(c.omission):_}s=nt(s);var N=s.length;if(Us(s)){var j=Wr(s);N=j.length}if(v>=N)return s;var D=v-zs(_);if(D<1)return _;var K=j?Ro(j,0,D).join(""):s.slice(0,D);if(C===n)return K+_;if(j&&(D+=K.length-D),zy(C)){if(s.slice(D).search(C)){var re,ie=K;for(C.global||(C=iy(C.source,nt(J_.exec(C))+"g")),C.lastIndex=0;re=C.exec(ie);)var ue=re.index;K=K.slice(0,ue===n?D:ue)}}else if(s.indexOf(er(C),D)!=D){var fe=K.lastIndexOf(C);fe>-1&&(K=K.slice(0,fe))}return K+_}function U8(s){return s=nt(s),s&&ZB.test(s)?s.replace(Y_,mU):s}var z8=Xs(function(s,c,v){return s+(v?" ":"")+c.toUpperCase()}),Ky=_P("toUpperCase");function xE(s,c,v){return s=nt(s),c=v?n:c,c===n?fU(s)?bU(s):nU(s):s.match(c)||[]}var SE=ze(function(s,c){try{return Zn(s,n,c)}catch(v){return Uy(v)?v:new Me(v)}}),W8=Ui(function(s,c){return yr(c,function(v){v=mi(v),Fi(s,v,Fy(s[v],s))}),s});function H8(s){var c=s==null?0:s.length,v=Se();return s=c?_t(s,function(_){if(typeof _[1]!="function")throw new br(a);return[v(_[0]),_[1]]}):[],ze(function(_){for(var C=-1;++CF)return[];var v=oe,_=fn(s,oe);c=Se(c),s-=oe;for(var C=ty(_,c);++v0||c<0)?new Ke(v):(s<0?v=v.takeRight(-s):s&&(v=v.drop(s)),c!==n&&(c=Ie(c),v=c<0?v.dropRight(-c):v.take(c-s)),v)},Ke.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},Ke.prototype.toArray=function(){return this.take(oe)},hi(Ke.prototype,function(s,c){var v=/^(?:filter|find|map|reject)|While$/.test(c),_=/^(?:head|last)$/.test(c),C=M[_?"take"+(c=="last"?"Right":""):c],N=_||/^find/.test(c);C&&(M.prototype[c]=function(){var j=this.__wrapped__,D=_?[1]:arguments,K=j instanceof Ke,re=D[0],ie=K||$e(j),ue=function(We){var qe=C.apply(M,Eo([We],D));return _&&fe?qe[0]:qe};ie&&v&&typeof re=="function"&&re.length!=1&&(K=ie=!1);var fe=this.__chain__,we=!!this.__actions__.length,Pe=N&&!fe,Fe=K&&!we;if(!N&&ie){j=Fe?j:new Ke(this);var Ee=s.apply(j,D);return Ee.__actions__.push({func:yp,args:[ue],thisArg:n}),new wr(Ee,fe)}return Pe&&Fe?s.apply(this,D):(Ee=this.thru(ue),Pe?_?Ee.value()[0]:Ee.value():Ee)})}),yr(["pop","push","shift","sort","splice","unshift"],function(s){var c=Hd[s],v=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",_=/^(?:pop|shift)$/.test(s);M.prototype[s]=function(){var C=arguments;if(_&&!this.__chain__){var N=this.value();return c.apply($e(N)?N:[],C)}return this[v](function(j){return c.apply($e(j)?j:[],C)})}}),hi(Ke.prototype,function(s,c){var v=M[c];if(v){var _=v.name+"";ot.call(Gs,_)||(Gs[_]=[]),Gs[_].push({name:c,func:v})}}),Gs[fp(n,b).name]=[{name:"wrapper",func:n}],Ke.prototype.clone=UU,Ke.prototype.reverse=zU,Ke.prototype.value=WU,M.prototype.at=yW,M.prototype.chain=bW,M.prototype.commit=wW,M.prototype.next=xW,M.prototype.plant=_W,M.prototype.reverse=OW,M.prototype.toJSON=M.prototype.valueOf=M.prototype.value=PW,M.prototype.first=M.prototype.head,tc&&(M.prototype[tc]=SW),M},Ws=wU();Ra?((Ra.exports=Ws)._=Ws,qg._=Ws):rn._=Ws}).call(Zi)})(tm,tm.exports);var _be=tm.exports;const pL=A.forwardRef(({className:e,...t},n)=>$.jsx("div",{className:"relative w-full overflow-auto",children:$.jsx("table",{ref:n,className:De("w-full caption-bottom text-sm",e),...t})}));pL.displayName="Table";const hL=A.forwardRef(({className:e,...t},n)=>$.jsx("thead",{ref:n,className:De("[&_tr]:border-b",e),...t}));hL.displayName="TableHeader";const vL=A.forwardRef(({className:e,...t},n)=>$.jsx("tbody",{ref:n,className:De("[&_tr:last-child]:border-0",e),...t}));vL.displayName="TableBody";const Obe=A.forwardRef(({className:e,...t},n)=>$.jsx("tfoot",{ref:n,className:De("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));Obe.displayName="TableFooter";const zc=A.forwardRef(({className:e,...t},n)=>$.jsx("tr",{ref:n,className:De("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));zc.displayName="TableRow";const mL=A.forwardRef(({className:e,...t},n)=>$.jsx("th",{ref:n,className:De("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));mL.displayName="TableHead";const qa=A.forwardRef(({className:e,...t},n)=>$.jsx("td",{ref:n,className:De("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));qa.displayName="TableCell";const Pbe=A.forwardRef(({className:e,...t},n)=>$.jsx("caption",{ref:n,className:De("mt-4 text-sm text-muted-foreground",e),...t}));Pbe.displayName="TableCaption";const gL=A.forwardRef(({className:e,type:t,...n},r)=>$.jsx("input",{type:t,className:De("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));gL.displayName="Input";function Ebe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function bg(...e){return t=>e.forEach(n=>Ebe(n,t))}function Et(...e){return A.useCallback(bg(...e),e)}var Cs=A.forwardRef((e,t)=>{const{children:n,...r}=e,i=A.Children.toArray(n),o=i.find(Cbe);if(o){const a=o.props.children,u=i.map(l=>l===o?A.Children.count(a)>1?A.Children.only(null):A.isValidElement(a)?a.props.children:null:l);return $.jsx(Zx,{...r,ref:t,children:A.isValidElement(a)?A.cloneElement(a,void 0,u):null})}return $.jsx(Zx,{...r,ref:t,children:n})});Cs.displayName="Slot";var Zx=A.forwardRef((e,t)=>{const{children:n,...r}=e;if(A.isValidElement(n)){const i=Mbe(n);return A.cloneElement(n,{...Tbe(r,n.props),ref:t?bg(t,i):i})}return A.Children.count(n)>1?A.Children.only(null):null});Zx.displayName="SlotClone";var Abe=({children:e})=>$.jsx($.Fragment,{children:e});function Cbe(e){return A.isValidElement(e)&&e.type===Abe}function Tbe(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...u)=>{o(...u),i(...u)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function Mbe(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function yL(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ttypeof e=="boolean"?"".concat(e):e===0?"0":e,Y$=$be,Rbe=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Y$(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:o}=t,a=Object.keys(i).map(f=>{const p=n==null?void 0:n[f],d=o==null?void 0:o[f];if(p===null)return null;const h=X$(p)||X$(d);return i[f][h]}),u=n&&Object.entries(n).reduce((f,p)=>{let[d,h]=p;return h===void 0||(f[d]=h),f},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((f,p)=>{let{class:d,className:h,...m}=p;return Object.entries(m).every(y=>{let[g,w]=y;return Array.isArray(w)?w.includes({...o,...u}[g]):{...o,...u}[g]===w})?[...f,d,h]:f},[]);return Y$(e,a,l,n==null?void 0:n.class,n==null?void 0:n.className)},Nbe=Rbe("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),vs=A.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},o)=>{const a=r?Cs:"button";return $.jsx(a,{className:De(Nbe({variant:t,size:n,className:e})),ref:o,...i})});vs.displayName="Button";/** * @license lucide-react v0.456.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ibe=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),bL=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/** * @license lucide-react v0.456.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var jbe={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v0.456.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const kbe=A.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:a,...u},l)=>A.createElement("svg",{ref:l,...jbe,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:bL("lucide",i),...u},[...a.map(([f,p])=>A.createElement(f,p)),...Array.isArray(o)?o:[o]]));/** * @license lucide-react v0.456.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const di=(e,t)=>{const n=A.forwardRef(({className:r,...i},o)=>A.createElement(kbe,{ref:o,iconNode:t,className:bL(`lucide-${Ibe(e)}`,r),...i}));return n.displayName=`${e}`,n};/** * @license lucide-react v0.456.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Dbe=di("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/** * @license lucide-react v0.456.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const wL=di("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** * @license lucide-react v0.456.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const xL=di("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** * @license lucide-react v0.456.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Lbe=di("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** * @license lucide-react v0.456.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const SL=di("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** * @license lucide-react v0.456.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Fbe=di("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** * @license lucide-react v0.456.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Bbe=di("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** * @license lucide-react v0.456.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Q$=di("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** * @license lucide-react v0.456.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ube=di("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/** * @license lucide-react v0.456.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const zbe=di("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** * @license lucide-react v0.456.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Wbe=di("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);function Z$(e,[t,n]){return Math.min(n,Math.max(t,e))}function Oe(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function Hbe(e,t=[]){let n=[];function r(o,a){const u=A.createContext(a),l=n.length;n=[...n,a];function f(d){const{scope:h,children:m,...y}=d,g=(h==null?void 0:h[e][l])||u,w=A.useMemo(()=>y,Object.values(y));return $.jsx(g.Provider,{value:w,children:m})}function p(d,h){const m=(h==null?void 0:h[e][l])||u,y=A.useContext(m);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${o}\``)}return f.displayName=o+"Provider",[f,p]}const i=()=>{const o=n.map(a=>A.createContext(a));return function(u){const l=(u==null?void 0:u[e])||o;return A.useMemo(()=>({[`__scope${e}`]:{...u,[e]:l}}),[u,l])}};return i.scopeName=e,[r,Kbe(i,...t)]}function Kbe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((u,{useScope:l,scopeName:f})=>{const d=l(o)[`__scope${f}`];return{...u,...d}},{});return A.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function P_(e){const t=e+"CollectionProvider",[n,r]=Hbe(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=m=>{const{scope:y,children:g}=m,w=W.useRef(null),b=W.useRef(new Map).current;return $.jsx(i,{scope:y,itemMap:b,collectionRef:w,children:g})};a.displayName=t;const u=e+"CollectionSlot",l=W.forwardRef((m,y)=>{const{scope:g,children:w}=m,b=o(u,g),x=Et(y,b.collectionRef);return $.jsx(Cs,{ref:x,children:w})});l.displayName=u;const f=e+"CollectionItemSlot",p="data-radix-collection-item",d=W.forwardRef((m,y)=>{const{scope:g,children:w,...b}=m,x=W.useRef(null),S=Et(y,x),P=o(f,g);return W.useEffect(()=>(P.itemMap.set(x,{ref:x,...b}),()=>void P.itemMap.delete(x))),$.jsx(Cs,{[p]:"",ref:S,children:w})});d.displayName=f;function h(m){const y=o(e+"CollectionConsumer",m);return W.useCallback(()=>{const w=y.collectionRef.current;if(!w)return[];const b=Array.from(w.querySelectorAll(`[${p}]`));return Array.from(y.itemMap.values()).sort((P,O)=>b.indexOf(P.ref.current)-b.indexOf(O.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:a,Slot:l,ItemSlot:d},h,r]}function E_(e,t=[]){let n=[];function r(o,a){const u=A.createContext(a),l=n.length;n=[...n,a];const f=d=>{var b;const{scope:h,children:m,...y}=d,g=((b=h==null?void 0:h[e])==null?void 0:b[l])||u,w=A.useMemo(()=>y,Object.values(y));return $.jsx(g.Provider,{value:w,children:m})};f.displayName=o+"Provider";function p(d,h){var g;const m=((g=h==null?void 0:h[e])==null?void 0:g[l])||u,y=A.useContext(m);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${o}\``)}return[f,p]}const i=()=>{const o=n.map(a=>A.createContext(a));return function(u){const l=(u==null?void 0:u[e])||o;return A.useMemo(()=>({[`__scope${e}`]:{...u,[e]:l}}),[u,l])}};return i.scopeName=e,[r,Gbe(i,...t)]}function Gbe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((u,{useScope:l,scopeName:f})=>{const d=l(o)[`__scope${f}`];return{...u,...d}},{});return A.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var qbe=A.createContext(void 0);function A_(e){const t=A.useContext(qbe);return e||t||"ltr"}var Vbe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ct=Vbe.reduce((e,t)=>{const n=A.forwardRef((r,i)=>{const{asChild:o,...a}=r,u=o?Cs:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),$.jsx(u,{...a,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function _L(e,t){e&&Ml.flushSync(()=>e.dispatchEvent(t))}function Br(e){const t=A.useRef(e);return A.useEffect(()=>{t.current=e}),A.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Xbe(e,t=globalThis==null?void 0:globalThis.document){const n=Br(e);A.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Ybe="DismissableLayer",Jx="dismissableLayer.update",Qbe="dismissableLayer.pointerDownOutside",Zbe="dismissableLayer.focusOutside",J$,OL=A.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),C_=A.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:u,...l}=e,f=A.useContext(OL),[p,d]=A.useState(null),h=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=A.useState({}),y=Et(t,T=>d(T)),g=Array.from(f.layers),[w]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),b=g.indexOf(w),x=p?g.indexOf(p):-1,S=f.layersWithOutsidePointerEventsDisabled.size>0,P=x>=b,O=twe(T=>{const R=T.target,I=[...f.branches].some(B=>B.contains(R));!P||I||(i==null||i(T),a==null||a(T),T.defaultPrevented||u==null||u())},h),E=nwe(T=>{const R=T.target;[...f.branches].some(B=>B.contains(R))||(o==null||o(T),a==null||a(T),T.defaultPrevented||u==null||u())},h);return Xbe(T=>{x===f.layers.size-1&&(r==null||r(T),!T.defaultPrevented&&u&&(T.preventDefault(),u()))},h),A.useEffect(()=>{if(p)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(J$=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(p)),f.layers.add(p),eR(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=J$)}},[p,h,n,f]),A.useEffect(()=>()=>{p&&(f.layers.delete(p),f.layersWithOutsidePointerEventsDisabled.delete(p),eR())},[p,f]),A.useEffect(()=>{const T=()=>m({});return document.addEventListener(Jx,T),()=>document.removeEventListener(Jx,T)},[]),$.jsx(ct.div,{...l,ref:y,style:{pointerEvents:S?P?"auto":"none":void 0,...e.style},onFocusCapture:Oe(e.onFocusCapture,E.onFocusCapture),onBlurCapture:Oe(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Oe(e.onPointerDownCapture,O.onPointerDownCapture)})});C_.displayName=Ybe;var Jbe="DismissableLayerBranch",ewe=A.forwardRef((e,t)=>{const n=A.useContext(OL),r=A.useRef(null),i=Et(t,r);return A.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),$.jsx(ct.div,{...e,ref:i})});ewe.displayName=Jbe;function twe(e,t=globalThis==null?void 0:globalThis.document){const n=Br(e),r=A.useRef(!1),i=A.useRef(()=>{});return A.useEffect(()=>{const o=u=>{if(u.target&&!r.current){let l=function(){PL(Qbe,n,f,{discrete:!0})};const f={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function nwe(e,t=globalThis==null?void 0:globalThis.document){const n=Br(e),r=A.useRef(!1);return A.useEffect(()=>{const i=o=>{o.target&&!r.current&&PL(Zbe,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function eR(){const e=new CustomEvent(Jx);document.dispatchEvent(e)}function PL(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?_L(i,o):i.dispatchEvent(o)}var ob=0;function EL(){A.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??tR()),document.body.insertAdjacentElement("beforeend",e[1]??tR()),ob++,()=>{ob===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ob--}},[])}function tR(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ab="focusScope.autoFocusOnMount",sb="focusScope.autoFocusOnUnmount",nR={bubbles:!1,cancelable:!0},rwe="FocusScope",T_=A.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[u,l]=A.useState(null),f=Br(i),p=Br(o),d=A.useRef(null),h=Et(t,g=>l(g)),m=A.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;A.useEffect(()=>{if(r){let g=function(S){if(m.paused||!u)return;const P=S.target;u.contains(P)?d.current=P:Fo(d.current,{select:!0})},w=function(S){if(m.paused||!u)return;const P=S.relatedTarget;P!==null&&(u.contains(P)||Fo(d.current,{select:!0}))},b=function(S){if(document.activeElement===document.body)for(const O of S)O.removedNodes.length>0&&Fo(u)};document.addEventListener("focusin",g),document.addEventListener("focusout",w);const x=new MutationObserver(b);return u&&x.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",w),x.disconnect()}}},[r,u,m.paused]),A.useEffect(()=>{if(u){iR.add(m);const g=document.activeElement;if(!u.contains(g)){const b=new CustomEvent(ab,nR);u.addEventListener(ab,f),u.dispatchEvent(b),b.defaultPrevented||(iwe(lwe(AL(u)),{select:!0}),document.activeElement===g&&Fo(u))}return()=>{u.removeEventListener(ab,f),setTimeout(()=>{const b=new CustomEvent(sb,nR);u.addEventListener(sb,p),u.dispatchEvent(b),b.defaultPrevented||Fo(g??document.body,{select:!0}),u.removeEventListener(sb,p),iR.remove(m)},0)}}},[u,f,p,m]);const y=A.useCallback(g=>{if(!n&&!r||m.paused)return;const w=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,b=document.activeElement;if(w&&b){const x=g.currentTarget,[S,P]=owe(x);S&&P?!g.shiftKey&&b===P?(g.preventDefault(),n&&Fo(S,{select:!0})):g.shiftKey&&b===S&&(g.preventDefault(),n&&Fo(P,{select:!0})):b===x&&g.preventDefault()}},[n,r,m.paused]);return $.jsx(ct.div,{tabIndex:-1,...a,ref:h,onKeyDown:y})});T_.displayName=rwe;function iwe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Fo(r,{select:t}),document.activeElement!==n)return}function owe(e){const t=AL(e),n=rR(t,e),r=rR(t.reverse(),e);return[n,r]}function AL(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function rR(e,t){for(const n of e)if(!awe(n,{upTo:t}))return n}function awe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function swe(e){return e instanceof HTMLInputElement&&"select"in e}function Fo(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&swe(e)&&t&&e.select()}}var iR=uwe();function uwe(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=oR(e,t),e.unshift(t)},remove(t){var n;e=oR(e,t),(n=e[0])==null||n.resume()}}}function oR(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function lwe(e){return e.filter(t=>t.tagName!=="A")}var Mn=globalThis!=null&&globalThis.document?A.useLayoutEffect:()=>{},cwe=H6.useId||(()=>{}),fwe=0;function Pl(e){const[t,n]=A.useState(cwe());return Mn(()=>{n(r=>r??String(fwe++))},[e]),t?`radix-${t}`:""}const dwe=["top","right","bottom","left"],ga=Math.min,ur=Math.max,nm=Math.round,oh=Math.floor,$i=e=>({x:e,y:e}),pwe={left:"right",right:"left",bottom:"top",top:"bottom"},hwe={start:"end",end:"start"};function e1(e,t,n){return ur(e,ga(t,n))}function go(e,t){return typeof e=="function"?e(t):e}function yo(e){return e.split("-")[0]}function Yl(e){return e.split("-")[1]}function M_(e){return e==="x"?"y":"x"}function $_(e){return e==="y"?"height":"width"}function ya(e){return["top","bottom"].includes(yo(e))?"y":"x"}function R_(e){return M_(ya(e))}function vwe(e,t,n){n===void 0&&(n=!1);const r=Yl(e),i=R_(e),o=$_(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=rm(a)),[a,rm(a)]}function mwe(e){const t=rm(e);return[t1(e),t,t1(t)]}function t1(e){return e.replace(/start|end/g,t=>hwe[t])}function gwe(e,t,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?o:a;default:return[]}}function ywe(e,t,n,r){const i=Yl(e);let o=gwe(yo(e),n==="start",r);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(t1)))),o}function rm(e){return e.replace(/left|right|bottom|top/g,t=>pwe[t])}function bwe(e){return{top:0,right:0,bottom:0,left:0,...e}}function CL(e){return typeof e!="number"?bwe(e):{top:e,right:e,bottom:e,left:e}}function im(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function aR(e,t,n){let{reference:r,floating:i}=e;const o=ya(t),a=R_(t),u=$_(a),l=yo(t),f=o==="y",p=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,h=r[u]/2-i[u]/2;let m;switch(l){case"top":m={x:p,y:r.y-i.height};break;case"bottom":m={x:p,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:d};break;case"left":m={x:r.x-i.width,y:d};break;default:m={x:r.x,y:r.y}}switch(Yl(t)){case"start":m[a]-=h*(n&&f?-1:1);break;case"end":m[a]+=h*(n&&f?-1:1);break}return m}const wwe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,u=o.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let f=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:p,y:d}=aR(f,r,l),h=r,m={},y=0;for(let g=0;g({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:a,elements:u,middlewareData:l}=t,{element:f,padding:p=0}=go(e,t)||{};if(f==null)return{};const d=CL(p),h={x:n,y:r},m=R_(i),y=$_(m),g=await a.getDimensions(f),w=m==="y",b=w?"top":"left",x=w?"bottom":"right",S=w?"clientHeight":"clientWidth",P=o.reference[y]+o.reference[m]-h[m]-o.floating[y],O=h[m]-o.reference[m],E=await(a.getOffsetParent==null?void 0:a.getOffsetParent(f));let T=E?E[S]:0;(!T||!await(a.isElement==null?void 0:a.isElement(E)))&&(T=u.floating[S]||o.floating[y]);const R=P/2-O/2,I=T/2-g[y]/2-1,B=ga(d[b],I),k=ga(d[x],I),U=B,V=T-g[y]-k,q=T/2-g[y]/2+R,X=e1(U,q,V),G=!l.arrow&&Yl(i)!=null&&q!==X&&o.reference[y]/2-(qq<=0)){var k,U;const q=(((k=o.flip)==null?void 0:k.index)||0)+1,X=T[q];if(X)return{data:{index:q,overflows:B},reset:{placement:X}};let G=(U=B.filter(Y=>Y.overflows[0]<=0).sort((Y,F)=>Y.overflows[1]-F.overflows[1])[0])==null?void 0:U.placement;if(!G)switch(m){case"bestFit":{var V;const Y=(V=B.filter(F=>{if(E){const z=ya(F.placement);return z===x||z==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(z=>z>0).reduce((z,ee)=>z+ee,0)]).sort((F,z)=>F[1]-z[1])[0])==null?void 0:V[0];Y&&(G=Y);break}case"initialPlacement":G=u;break}if(i!==G)return{reset:{placement:G}}}return{}}}};function sR(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function uR(e){return dwe.some(t=>e[t]>=0)}const _we=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=go(e,t);switch(r){case"referenceHidden":{const o=await od(t,{...i,elementContext:"reference"}),a=sR(o,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:uR(a)}}}case"escaped":{const o=await od(t,{...i,altBoundary:!0}),a=sR(o,n.floating);return{data:{escapedOffsets:a,escaped:uR(a)}}}default:return{}}}}};async function Owe(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=yo(n),u=Yl(n),l=ya(n)==="y",f=["left","top"].includes(a)?-1:1,p=o&&l?-1:1,d=go(t,e);let{mainAxis:h,crossAxis:m,alignmentAxis:y}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return u&&typeof y=="number"&&(m=u==="end"?y*-1:y),l?{x:m*p,y:h*f}:{x:h*f,y:m*p}}const Pwe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:a,middlewareData:u}=t,l=await Owe(t,e);return a===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:a}}}}},Ewe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:u={fn:w=>{let{x:b,y:x}=w;return{x:b,y:x}}},...l}=go(e,t),f={x:n,y:r},p=await od(t,l),d=ya(yo(i)),h=M_(d);let m=f[h],y=f[d];if(o){const w=h==="y"?"top":"left",b=h==="y"?"bottom":"right",x=m+p[w],S=m-p[b];m=e1(x,m,S)}if(a){const w=d==="y"?"top":"left",b=d==="y"?"bottom":"right",x=y+p[w],S=y-p[b];y=e1(x,y,S)}const g=u.fn({...t,[h]:m,[d]:y});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[h]:o,[d]:a}}}}}},Awe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:u=0,mainAxis:l=!0,crossAxis:f=!0}=go(e,t),p={x:n,y:r},d=ya(i),h=M_(d);let m=p[h],y=p[d];const g=go(u,t),w=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const S=h==="y"?"height":"width",P=o.reference[h]-o.floating[S]+w.mainAxis,O=o.reference[h]+o.reference[S]-w.mainAxis;mO&&(m=O)}if(f){var b,x;const S=h==="y"?"width":"height",P=["top","left"].includes(yo(i)),O=o.reference[d]-o.floating[S]+(P&&((b=a.offset)==null?void 0:b[d])||0)+(P?0:w.crossAxis),E=o.reference[d]+o.reference[S]+(P?0:((x=a.offset)==null?void 0:x[d])||0)-(P?w.crossAxis:0);yE&&(y=E)}return{[h]:m,[d]:y}}}},Cwe=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:a,elements:u}=t,{apply:l=()=>{},...f}=go(e,t),p=await od(t,f),d=yo(i),h=Yl(i),m=ya(i)==="y",{width:y,height:g}=o.floating;let w,b;d==="top"||d==="bottom"?(w=d,b=h===(await(a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(b=d,w=h==="end"?"top":"bottom");const x=g-p.top-p.bottom,S=y-p.left-p.right,P=ga(g-p[w],x),O=ga(y-p[b],S),E=!t.middlewareData.shift;let T=P,R=O;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=S),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(T=x),E&&!h){const B=ur(p.left,0),k=ur(p.right,0),U=ur(p.top,0),V=ur(p.bottom,0);m?R=y-2*(B!==0||k!==0?B+k:ur(p.left,p.right)):T=g-2*(U!==0||V!==0?U+V:ur(p.top,p.bottom))}await l({...t,availableWidth:R,availableHeight:T});const I=await a.getDimensions(u.floating);return y!==I.width||g!==I.height?{reset:{rects:!0}}:{}}}};function wg(){return typeof window<"u"}function Ql(e){return TL(e)?(e.nodeName||"").toLowerCase():"#document"}function pr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ki(e){var t;return(t=(TL(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function TL(e){return wg()?e instanceof Node||e instanceof pr(e).Node:!1}function ui(e){return wg()?e instanceof Element||e instanceof pr(e).Element:!1}function Ii(e){return wg()?e instanceof HTMLElement||e instanceof pr(e).HTMLElement:!1}function lR(e){return!wg()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof pr(e).ShadowRoot}function Rd(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=li(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function Twe(e){return["table","td","th"].includes(Ql(e))}function xg(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function N_(e){const t=I_(),n=ui(e)?li(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Mwe(e){let t=ba(e);for(;Ii(t)&&!El(t);){if(N_(t))return t;if(xg(t))return null;t=ba(t)}return null}function I_(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function El(e){return["html","body","#document"].includes(Ql(e))}function li(e){return pr(e).getComputedStyle(e)}function Sg(e){return ui(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ba(e){if(Ql(e)==="html")return e;const t=e.assignedSlot||e.parentNode||lR(e)&&e.host||ki(e);return lR(t)?t.host:t}function ML(e){const t=ba(e);return El(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ii(t)&&Rd(t)?t:ML(t)}function ad(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=ML(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=pr(i);if(o){const u=n1(a);return t.concat(a,a.visualViewport||[],Rd(i)?i:[],u&&n?ad(u):[])}return t.concat(i,ad(i,[],n))}function n1(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function $L(e){const t=li(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Ii(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,u=nm(n)!==o||nm(r)!==a;return u&&(n=o,r=a),{width:n,height:r,$:u}}function j_(e){return ui(e)?e:e.contextElement}function Iu(e){const t=j_(e);if(!Ii(t))return $i(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=$L(t);let a=(o?nm(n.width):n.width)/r,u=(o?nm(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!u||!Number.isFinite(u))&&(u=1),{x:a,y:u}}const $we=$i(0);function RL(e){const t=pr(e);return!I_()||!t.visualViewport?$we:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Rwe(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==pr(e)?!1:t}function Ts(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=j_(e);let a=$i(1);t&&(r?ui(r)&&(a=Iu(r)):a=Iu(e));const u=Rwe(o,n,r)?RL(o):$i(0);let l=(i.left+u.x)/a.x,f=(i.top+u.y)/a.y,p=i.width/a.x,d=i.height/a.y;if(o){const h=pr(o),m=r&&ui(r)?pr(r):r;let y=h,g=n1(y);for(;g&&r&&m!==y;){const w=Iu(g),b=g.getBoundingClientRect(),x=li(g),S=b.left+(g.clientLeft+parseFloat(x.paddingLeft))*w.x,P=b.top+(g.clientTop+parseFloat(x.paddingTop))*w.y;l*=w.x,f*=w.y,p*=w.x,d*=w.y,l+=S,f+=P,y=pr(g),g=n1(y)}}return im({width:p,height:d,x:l,y:f})}function k_(e,t){const n=Sg(e).scrollLeft;return t?t.left+n:Ts(ki(e)).left+n}function NL(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-(n?0:k_(e,r)),o=r.top+t.scrollTop;return{x:i,y:o}}function Nwe(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",a=ki(r),u=t?xg(t.floating):!1;if(r===a||u&&o)return n;let l={scrollLeft:0,scrollTop:0},f=$i(1);const p=$i(0),d=Ii(r);if((d||!d&&!o)&&((Ql(r)!=="body"||Rd(a))&&(l=Sg(r)),Ii(r))){const m=Ts(r);f=Iu(r),p.x=m.x+r.clientLeft,p.y=m.y+r.clientTop}const h=a&&!d&&!o?NL(a,l,!0):$i(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-l.scrollLeft*f.x+p.x+h.x,y:n.y*f.y-l.scrollTop*f.y+p.y+h.y}}function Iwe(e){return Array.from(e.getClientRects())}function jwe(e){const t=ki(e),n=Sg(e),r=e.ownerDocument.body,i=ur(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=ur(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+k_(e);const u=-n.scrollTop;return li(r).direction==="rtl"&&(a+=ur(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:u}}function kwe(e,t){const n=pr(e),r=ki(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,u=0,l=0;if(i){o=i.width,a=i.height;const f=I_();(!f||f&&t==="fixed")&&(u=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:u,y:l}}function Dwe(e,t){const n=Ts(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Ii(e)?Iu(e):$i(1),a=e.clientWidth*o.x,u=e.clientHeight*o.y,l=i*o.x,f=r*o.y;return{width:a,height:u,x:l,y:f}}function cR(e,t,n){let r;if(t==="viewport")r=kwe(e,n);else if(t==="document")r=jwe(ki(e));else if(ui(t))r=Dwe(t,n);else{const i=RL(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return im(r)}function IL(e,t){const n=ba(e);return n===t||!ui(n)||El(n)?!1:li(n).position==="fixed"||IL(n,t)}function Lwe(e,t){const n=t.get(e);if(n)return n;let r=ad(e,[],!1).filter(u=>ui(u)&&Ql(u)!=="body"),i=null;const o=li(e).position==="fixed";let a=o?ba(e):e;for(;ui(a)&&!El(a);){const u=li(a),l=N_(a);!l&&u.position==="fixed"&&(i=null),(o?!l&&!i:!l&&u.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Rd(a)&&!l&&IL(e,a))?r=r.filter(p=>p!==a):i=u,a=ba(a)}return t.set(e,r),r}function Fwe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?xg(t)?[]:Lwe(t,this._c):[].concat(n),r],u=a[0],l=a.reduce((f,p)=>{const d=cR(t,p,i);return f.top=ur(d.top,f.top),f.right=ga(d.right,f.right),f.bottom=ga(d.bottom,f.bottom),f.left=ur(d.left,f.left),f},cR(t,u,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Bwe(e){const{width:t,height:n}=$L(e);return{width:t,height:n}}function Uwe(e,t,n){const r=Ii(t),i=ki(t),o=n==="fixed",a=Ts(e,!0,o,t);let u={scrollLeft:0,scrollTop:0};const l=$i(0);if(r||!r&&!o)if((Ql(t)!=="body"||Rd(i))&&(u=Sg(t)),r){const h=Ts(t,!0,o,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else i&&(l.x=k_(i));const f=i&&!r&&!o?NL(i,u):$i(0),p=a.left+u.scrollLeft-l.x-f.x,d=a.top+u.scrollTop-l.y-f.y;return{x:p,y:d,width:a.width,height:a.height}}function ub(e){return li(e).position==="static"}function fR(e,t){if(!Ii(e)||li(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ki(e)===n&&(n=n.ownerDocument.body),n}function jL(e,t){const n=pr(e);if(xg(e))return n;if(!Ii(e)){let i=ba(e);for(;i&&!El(i);){if(ui(i)&&!ub(i))return i;i=ba(i)}return n}let r=fR(e,t);for(;r&&Twe(r)&&ub(r);)r=fR(r,t);return r&&El(r)&&ub(r)&&!N_(r)?n:r||Mwe(e)||n}const zwe=async function(e){const t=this.getOffsetParent||jL,n=this.getDimensions,r=await n(e.floating);return{reference:Uwe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Wwe(e){return li(e).direction==="rtl"}const Hwe={convertOffsetParentRelativeRectToViewportRelativeRect:Nwe,getDocumentElement:ki,getClippingRect:Fwe,getOffsetParent:jL,getElementRects:zwe,getClientRects:Iwe,getDimensions:Bwe,getScale:Iu,isElement:ui,isRTL:Wwe};function Kwe(e,t){let n=null,r;const i=ki(e);function o(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function a(u,l){u===void 0&&(u=!1),l===void 0&&(l=1),o();const{left:f,top:p,width:d,height:h}=e.getBoundingClientRect();if(u||t(),!d||!h)return;const m=oh(p),y=oh(i.clientWidth-(f+d)),g=oh(i.clientHeight-(p+h)),w=oh(f),x={rootMargin:-m+"px "+-y+"px "+-g+"px "+-w+"px",threshold:ur(0,ga(1,l))||1};let S=!0;function P(O){const E=O[0].intersectionRatio;if(E!==l){if(!S)return a();E?a(!1,E):r=setTimeout(()=>{a(!1,1e-7)},1e3)}S=!1}try{n=new IntersectionObserver(P,{...x,root:i.ownerDocument})}catch{n=new IntersectionObserver(P,x)}n.observe(e)}return a(!0),o}function Gwe(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,f=j_(e),p=i||o?[...f?ad(f):[],...ad(t)]:[];p.forEach(b=>{i&&b.addEventListener("scroll",n,{passive:!0}),o&&b.addEventListener("resize",n)});const d=f&&u?Kwe(f,n):null;let h=-1,m=null;a&&(m=new ResizeObserver(b=>{let[x]=b;x&&x.target===f&&m&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var S;(S=m)==null||S.observe(t)})),n()}),f&&!l&&m.observe(f),m.observe(t));let y,g=l?Ts(e):null;l&&w();function w(){const b=Ts(e);g&&(b.x!==g.x||b.y!==g.y||b.width!==g.width||b.height!==g.height)&&n(),g=b,y=requestAnimationFrame(w)}return n(),()=>{var b;p.forEach(x=>{i&&x.removeEventListener("scroll",n),o&&x.removeEventListener("resize",n)}),d==null||d(),(b=m)==null||b.disconnect(),m=null,l&&cancelAnimationFrame(y)}}const qwe=Pwe,Vwe=Ewe,Xwe=Swe,Ywe=Cwe,Qwe=_we,dR=xwe,Zwe=Awe,Jwe=(e,t,n)=>{const r=new Map,i={platform:Hwe,...n},o={...i.platform,_c:r};return wwe(e,t,{...i,platform:o})};var Eh=typeof document<"u"?A.useLayoutEffect:A.useEffect;function om(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!om(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!om(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function kL(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function pR(e,t){const n=kL(e);return Math.round(t*n)/n}function lb(e){const t=A.useRef(e);return Eh(()=>{t.current=e}),t}function exe(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:u=!0,whileElementsMounted:l,open:f}=e,[p,d]=A.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=A.useState(r);om(h,r)||m(r);const[y,g]=A.useState(null),[w,b]=A.useState(null),x=A.useCallback(F=>{F!==E.current&&(E.current=F,g(F))},[]),S=A.useCallback(F=>{F!==T.current&&(T.current=F,b(F))},[]),P=o||y,O=a||w,E=A.useRef(null),T=A.useRef(null),R=A.useRef(p),I=l!=null,B=lb(l),k=lb(i),U=lb(f),V=A.useCallback(()=>{if(!E.current||!T.current)return;const F={placement:t,strategy:n,middleware:h};k.current&&(F.platform=k.current),Jwe(E.current,T.current,F).then(z=>{const ee={...z,isPositioned:U.current!==!1};q.current&&!om(R.current,ee)&&(R.current=ee,Ml.flushSync(()=>{d(ee)}))})},[h,t,n,k,U]);Eh(()=>{f===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,d(F=>({...F,isPositioned:!1})))},[f]);const q=A.useRef(!1);Eh(()=>(q.current=!0,()=>{q.current=!1}),[]),Eh(()=>{if(P&&(E.current=P),O&&(T.current=O),P&&O){if(B.current)return B.current(P,O,V);V()}},[P,O,V,B,I]);const X=A.useMemo(()=>({reference:E,floating:T,setReference:x,setFloating:S}),[x,S]),G=A.useMemo(()=>({reference:P,floating:O}),[P,O]),Y=A.useMemo(()=>{const F={position:n,left:0,top:0};if(!G.floating)return F;const z=pR(G.floating,p.x),ee=pR(G.floating,p.y);return u?{...F,transform:"translate("+z+"px, "+ee+"px)",...kL(G.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:ee}},[n,u,G.floating,p.x,p.y]);return A.useMemo(()=>({...p,update:V,refs:X,elements:G,floatingStyles:Y}),[p,V,X,G,Y])}const txe=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?dR({element:r.current,padding:i}).fn(n):{}:r?dR({element:r,padding:i}).fn(n):{}}}},nxe=(e,t)=>({...qwe(e),options:[e,t]}),rxe=(e,t)=>({...Vwe(e),options:[e,t]}),ixe=(e,t)=>({...Zwe(e),options:[e,t]}),oxe=(e,t)=>({...Xwe(e),options:[e,t]}),axe=(e,t)=>({...Ywe(e),options:[e,t]}),sxe=(e,t)=>({...Qwe(e),options:[e,t]}),uxe=(e,t)=>({...txe(e),options:[e,t]});var lxe="Arrow",DL=A.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return $.jsx(ct.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:$.jsx("polygon",{points:"0,0 30,0 15,10"})})});DL.displayName=lxe;var cxe=DL;function fxe(e,t=[]){let n=[];function r(o,a){const u=A.createContext(a),l=n.length;n=[...n,a];function f(d){const{scope:h,children:m,...y}=d,g=(h==null?void 0:h[e][l])||u,w=A.useMemo(()=>y,Object.values(y));return $.jsx(g.Provider,{value:w,children:m})}function p(d,h){const m=(h==null?void 0:h[e][l])||u,y=A.useContext(m);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${o}\``)}return f.displayName=o+"Provider",[f,p]}const i=()=>{const o=n.map(a=>A.createContext(a));return function(u){const l=(u==null?void 0:u[e])||o;return A.useMemo(()=>({[`__scope${e}`]:{...u,[e]:l}}),[u,l])}};return i.scopeName=e,[r,dxe(i,...t)]}function dxe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((u,{useScope:l,scopeName:f})=>{const d=l(o)[`__scope${f}`];return{...u,...d}},{});return A.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function pxe(e){const[t,n]=A.useState(void 0);return Mn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,u;if("borderBoxSize"in o){const l=o.borderBoxSize,f=Array.isArray(l)?l[0]:l;a=f.inlineSize,u=f.blockSize}else a=e.offsetWidth,u=e.offsetHeight;n({width:a,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var D_="Popper",[LL,_g]=fxe(D_),[hxe,FL]=LL(D_),BL=e=>{const{__scopePopper:t,children:n}=e,[r,i]=A.useState(null);return $.jsx(hxe,{scope:t,anchor:r,onAnchorChange:i,children:n})};BL.displayName=D_;var UL="PopperAnchor",zL=A.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=FL(UL,n),a=A.useRef(null),u=Et(t,a);return A.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:$.jsx(ct.div,{...i,ref:u})});zL.displayName=UL;var L_="PopperContent",[vxe,mxe]=LL(L_),WL=A.forwardRef((e,t)=>{var me,Ae,se,de,pe,J;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:a=0,arrowPadding:u=0,avoidCollisions:l=!0,collisionBoundary:f=[],collisionPadding:p=0,sticky:d="partial",hideWhenDetached:h=!1,updatePositionStrategy:m="optimized",onPlaced:y,...g}=e,w=FL(L_,n),[b,x]=A.useState(null),S=Et(t,Ue=>x(Ue)),[P,O]=A.useState(null),E=pxe(P),T=(E==null?void 0:E.width)??0,R=(E==null?void 0:E.height)??0,I=r+(o!=="center"?"-"+o:""),B=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},k=Array.isArray(f)?f:[f],U=k.length>0,V={padding:B,boundary:k.filter(yxe),altBoundary:U},{refs:q,floatingStyles:X,placement:G,isPositioned:Y,middlewareData:F}=exe({strategy:"fixed",placement:I,whileElementsMounted:(...Ue)=>Gwe(...Ue,{animationFrame:m==="always"}),elements:{reference:w.anchor},middleware:[nxe({mainAxis:i+R,alignmentAxis:a}),l&&rxe({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?ixe():void 0,...V}),l&&oxe({...V}),axe({...V,apply:({elements:Ue,rects:xe,availableWidth:Qe,availableHeight:ft})=>{const{width:tt,height:Xn}=xe.reference,Yn=Ue.floating.style;Yn.setProperty("--radix-popper-available-width",`${Qe}px`),Yn.setProperty("--radix-popper-available-height",`${ft}px`),Yn.setProperty("--radix-popper-anchor-width",`${tt}px`),Yn.setProperty("--radix-popper-anchor-height",`${Xn}px`)}}),P&&uxe({element:P,padding:u}),bxe({arrowWidth:T,arrowHeight:R}),h&&sxe({strategy:"referenceHidden",...V})]}),[z,ee]=GL(G),oe=Br(y);Mn(()=>{Y&&(oe==null||oe())},[Y,oe]);const ae=(me=F.arrow)==null?void 0:me.x,be=(Ae=F.arrow)==null?void 0:Ae.y,Ce=((se=F.arrow)==null?void 0:se.centerOffset)!==0,[Ne,Le]=A.useState();return Mn(()=>{b&&Le(window.getComputedStyle(b).zIndex)},[b]),$.jsx("div",{ref:q.setFloating,"data-radix-popper-content-wrapper":"",style:{...X,transform:Y?X.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ne,"--radix-popper-transform-origin":[(de=F.transformOrigin)==null?void 0:de.x,(pe=F.transformOrigin)==null?void 0:pe.y].join(" "),...((J=F.hide)==null?void 0:J.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:$.jsx(vxe,{scope:n,placedSide:z,onArrowChange:O,arrowX:ae,arrowY:be,shouldHideArrow:Ce,children:$.jsx(ct.div,{"data-side":z,"data-align":ee,...g,ref:S,style:{...g.style,animation:Y?void 0:"none"}})})})});WL.displayName=L_;var HL="PopperArrow",gxe={top:"bottom",right:"left",bottom:"top",left:"right"},KL=A.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=mxe(HL,r),a=gxe[o.placedSide];return $.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:$.jsx(cxe,{...i,ref:n,style:{...i.style,display:"block"}})})});KL.displayName=HL;function yxe(e){return e!==null}var bxe=e=>({name:"transformOrigin",options:e,fn(t){var w,b,x;const{placement:n,rects:r,middlewareData:i}=t,a=((w=i.arrow)==null?void 0:w.centerOffset)!==0,u=a?0:e.arrowWidth,l=a?0:e.arrowHeight,[f,p]=GL(n),d={start:"0%",center:"50%",end:"100%"}[p],h=(((b=i.arrow)==null?void 0:b.x)??0)+u/2,m=(((x=i.arrow)==null?void 0:x.y)??0)+l/2;let y="",g="";return f==="bottom"?(y=a?d:`${h}px`,g=`${-l}px`):f==="top"?(y=a?d:`${h}px`,g=`${r.floating.height+l}px`):f==="right"?(y=`${-l}px`,g=a?d:`${m}px`):f==="left"&&(y=`${r.floating.width+l}px`,g=a?d:`${m}px`),{data:{x:y,y:g}}}});function GL(e){const[t,n="center"]=e.split("-");return[t,n]}var qL=BL,VL=zL,XL=WL,YL=KL,wxe="Portal",F_=A.forwardRef((e,t)=>{var u;const{container:n,...r}=e,[i,o]=A.useState(!1);Mn(()=>o(!0),[]);const a=n||i&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return a?t9.createPortal($.jsx(ct.div,{...r,ref:t}),a):null});F_.displayName=wxe;function am({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=xxe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,u=Br(n),l=A.useCallback(f=>{if(o){const d=typeof f=="function"?f(e):f;d!==e&&u(d)}else i(f)},[o,e,i,u]);return[a,l]}function xxe({defaultProp:e,onChange:t}){const n=A.useState(e),[r]=n,i=A.useRef(r),o=Br(t);return A.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}function Sxe(e){const t=A.useRef({value:e,previous:e});return A.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var _xe="VisuallyHidden",QL=A.forwardRef((e,t)=>$.jsx(ct.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));QL.displayName=_xe;var Oxe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},iu=new WeakMap,ah=new WeakMap,sh={},cb=0,ZL=function(e){return e&&(e.host||ZL(e.parentNode))},Pxe=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=ZL(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Exe=function(e,t,n,r){var i=Pxe(t,Array.isArray(e)?e:[e]);sh[n]||(sh[n]=new WeakMap);var o=sh[n],a=[],u=new Set,l=new Set(i),f=function(d){!d||u.has(d)||(u.add(d),f(d.parentNode))};i.forEach(f);var p=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(h){if(u.has(h))p(h);else try{var m=h.getAttribute(r),y=m!==null&&m!=="false",g=(iu.get(h)||0)+1,w=(o.get(h)||0)+1;iu.set(h,g),o.set(h,w),a.push(h),g===1&&y&&ah.set(h,!0),w===1&&h.setAttribute(n,"true"),y||h.setAttribute(r,"true")}catch(b){console.error("aria-hidden: cannot operate on ",h,b)}})};return p(t),u.clear(),cb++,function(){a.forEach(function(d){var h=iu.get(d)-1,m=o.get(d)-1;iu.set(d,h),o.set(d,m),h||(ah.has(d)||d.removeAttribute(r),ah.delete(d)),m||d.removeAttribute(n)}),cb--,cb||(iu=new WeakMap,iu=new WeakMap,ah=new WeakMap,sh={})}},JL=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=Oxe(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),Exe(r,i,n,"aria-hidden")):function(){return null}},Pi=function(){return Pi=Object.assign||function(t){for(var n,r=1,i=arguments.length;r"u")return Wxe;var t=Hxe(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Gxe=rF(),ju="data-scroll-locked",qxe=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,u=e.gap;return n===void 0&&(n="margin"),` .`.concat(Cxe,` { overflow: hidden `).concat(r,`; padding-right: `).concat(u,"px ").concat(r,`; } body[`).concat(ju,`] { overflow: hidden `).concat(r,`; overscroll-behavior: contain; `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` padding-left: `.concat(i,`px; padding-top: `).concat(o,`px; padding-right: `).concat(a,`px; margin-left:0; margin-top:0; margin-right: `).concat(u,"px ").concat(r,`; `),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),` } .`).concat(Ah,` { right: `).concat(u,"px ").concat(r,`; } .`).concat(Ch,` { margin-right: `).concat(u,"px ").concat(r,`; } .`).concat(Ah," .").concat(Ah,` { right: 0 `).concat(r,`; } .`).concat(Ch," .").concat(Ch,` { margin-right: 0 `).concat(r,`; } body[`).concat(ju,`] { `).concat(Txe,": ").concat(u,`px; } `)},vR=function(){var e=parseInt(document.body.getAttribute(ju)||"0",10);return isFinite(e)?e:0},Vxe=function(){A.useEffect(function(){return document.body.setAttribute(ju,(vR()+1).toString()),function(){var e=vR()-1;e<=0?document.body.removeAttribute(ju):document.body.setAttribute(ju,e.toString())}},[])},Xxe=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;Vxe();var o=A.useMemo(function(){return Kxe(i)},[i]);return A.createElement(Gxe,{styles:qxe(o,!t,i,n?"":"!important")})},r1=!1;if(typeof window<"u")try{var uh=Object.defineProperty({},"passive",{get:function(){return r1=!0,!0}});window.addEventListener("test",uh,uh),window.removeEventListener("test",uh,uh)}catch{r1=!1}var ou=r1?{passive:!1}:!1,Yxe=function(e){return e.tagName==="TEXTAREA"},iF=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Yxe(e)&&n[t]==="visible")},Qxe=function(e){return iF(e,"overflowY")},Zxe=function(e){return iF(e,"overflowX")},mR=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=oF(e,r);if(i){var o=aF(e,r),a=o[1],u=o[2];if(a>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Jxe=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},e1e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},oF=function(e,t){return e==="v"?Qxe(t):Zxe(t)},aF=function(e,t){return e==="v"?Jxe(t):e1e(t)},t1e=function(e,t){return e==="h"&&t==="rtl"?-1:1},n1e=function(e,t,n,r,i){var o=t1e(e,window.getComputedStyle(t).direction),a=o*r,u=n.target,l=t.contains(u),f=!1,p=a>0,d=0,h=0;do{var m=aF(e,u),y=m[0],g=m[1],w=m[2],b=g-w-o*y;(y||b)&&oF(e,u)&&(d+=b,h+=y),u instanceof ShadowRoot?u=u.host:u=u.parentNode}while(!l&&u!==document.body||l&&(t.contains(u)||t===u));return(p&&(Math.abs(d)<1||!i)||!p&&(Math.abs(h)<1||!i))&&(f=!0),f},lh=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},gR=function(e){return[e.deltaX,e.deltaY]},yR=function(e){return e&&"current"in e?e.current:e},r1e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},i1e=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} `)},o1e=0,au=[];function a1e(e){var t=A.useRef([]),n=A.useRef([0,0]),r=A.useRef(),i=A.useState(o1e++)[0],o=A.useState(rF)[0],a=A.useRef(e);A.useEffect(function(){a.current=e},[e]),A.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var g=Axe([e.lockRef.current],(e.shards||[]).map(yR),!0).filter(Boolean);return g.forEach(function(w){return w.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),g.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var u=A.useCallback(function(g,w){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!a.current.allowPinchZoom;var b=lh(g),x=n.current,S="deltaX"in g?g.deltaX:x[0]-b[0],P="deltaY"in g?g.deltaY:x[1]-b[1],O,E=g.target,T=Math.abs(S)>Math.abs(P)?"h":"v";if("touches"in g&&T==="h"&&E.type==="range")return!1;var R=mR(T,E);if(!R)return!0;if(R?O=T:(O=T==="v"?"h":"v",R=mR(T,E)),!R)return!1;if(!r.current&&"changedTouches"in g&&(S||P)&&(r.current=O),!O)return!0;var I=r.current||O;return n1e(I,w,g,I==="h"?S:P,!0)},[]),l=A.useCallback(function(g){var w=g;if(!(!au.length||au[au.length-1]!==o)){var b="deltaY"in w?gR(w):lh(w),x=t.current.filter(function(O){return O.name===w.type&&(O.target===w.target||w.target===O.shadowParent)&&r1e(O.delta,b)})[0];if(x&&x.should){w.cancelable&&w.preventDefault();return}if(!x){var S=(a.current.shards||[]).map(yR).filter(Boolean).filter(function(O){return O.contains(w.target)}),P=S.length>0?u(w,S[0]):!a.current.noIsolation;P&&w.cancelable&&w.preventDefault()}}},[]),f=A.useCallback(function(g,w,b,x){var S={name:g,delta:w,target:b,should:x,shadowParent:s1e(b)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(P){return P!==S})},1)},[]),p=A.useCallback(function(g){n.current=lh(g),r.current=void 0},[]),d=A.useCallback(function(g){f(g.type,gR(g),g.target,u(g,e.lockRef.current))},[]),h=A.useCallback(function(g){f(g.type,lh(g),g.target,u(g,e.lockRef.current))},[]);A.useEffect(function(){return au.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",l,ou),document.addEventListener("touchmove",l,ou),document.addEventListener("touchstart",p,ou),function(){au=au.filter(function(g){return g!==o}),document.removeEventListener("wheel",l,ou),document.removeEventListener("touchmove",l,ou),document.removeEventListener("touchstart",p,ou)}},[]);var m=e.removeScrollBar,y=e.inert;return A.createElement(A.Fragment,null,y?A.createElement(o,{styles:i1e(i)}):null,m?A.createElement(Xxe,{gapMode:e.gapMode}):null)}function s1e(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const u1e=kxe(nF,a1e);var B_=A.forwardRef(function(e,t){return A.createElement(Og,Pi({},e,{ref:t,sideCar:u1e}))});B_.classNames=Og.classNames;var l1e=[" ","Enter","ArrowUp","ArrowDown"],c1e=[" ","Enter"],Nd="Select",[Pg,Eg,f1e]=P_(Nd),[Zl,C_e]=E_(Nd,[f1e,_g]),Ag=_g(),[d1e,Ma]=Zl(Nd),[p1e,h1e]=Zl(Nd),sF=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:o,value:a,defaultValue:u,onValueChange:l,dir:f,name:p,autoComplete:d,disabled:h,required:m,form:y}=e,g=Ag(t),[w,b]=A.useState(null),[x,S]=A.useState(null),[P,O]=A.useState(!1),E=A_(f),[T=!1,R]=am({prop:r,defaultProp:i,onChange:o}),[I,B]=am({prop:a,defaultProp:u,onChange:l}),k=A.useRef(null),U=w?y||!!w.closest("form"):!0,[V,q]=A.useState(new Set),X=Array.from(V).map(G=>G.props.value).join(";");return $.jsx(qL,{...g,children:$.jsxs(d1e,{required:m,scope:t,trigger:w,onTriggerChange:b,valueNode:x,onValueNodeChange:S,valueNodeHasChildren:P,onValueNodeHasChildrenChange:O,contentId:Pl(),value:I,onValueChange:B,open:T,onOpenChange:R,dir:E,triggerPointerDownPosRef:k,disabled:h,children:[$.jsx(Pg.Provider,{scope:t,children:$.jsx(p1e,{scope:e.__scopeSelect,onNativeOptionAdd:A.useCallback(G=>{q(Y=>new Set(Y).add(G))},[]),onNativeOptionRemove:A.useCallback(G=>{q(Y=>{const F=new Set(Y);return F.delete(G),F})},[]),children:n})}),U?$.jsxs(RF,{"aria-hidden":!0,required:m,tabIndex:-1,name:p,autoComplete:d,value:I,onChange:G=>B(G.target.value),disabled:h,form:y,children:[I===void 0?$.jsx("option",{value:""}):null,Array.from(V)]},X):null]})})};sF.displayName=Nd;var uF="SelectTrigger",lF=A.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,o=Ag(n),a=Ma(uF,n),u=a.disabled||r,l=Et(t,a.onTriggerChange),f=Eg(n),p=A.useRef("touch"),[d,h,m]=NF(g=>{const w=f().filter(S=>!S.disabled),b=w.find(S=>S.value===a.value),x=IF(w,g,b);x!==void 0&&a.onValueChange(x.value)}),y=g=>{u||(a.onOpenChange(!0),m()),g&&(a.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return $.jsx(VL,{asChild:!0,...o,children:$.jsx(ct.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":$F(a.value)?"":void 0,...i,ref:l,onClick:Oe(i.onClick,g=>{g.currentTarget.focus(),p.current!=="mouse"&&y(g)}),onPointerDown:Oe(i.onPointerDown,g=>{p.current=g.pointerType;const w=g.target;w.hasPointerCapture(g.pointerId)&&w.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(y(g),g.preventDefault())}),onKeyDown:Oe(i.onKeyDown,g=>{const w=d.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&h(g.key),!(w&&g.key===" ")&&l1e.includes(g.key)&&(y(),g.preventDefault())})})})});lF.displayName=uF;var cF="SelectValue",fF=A.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:o,placeholder:a="",...u}=e,l=Ma(cF,n),{onValueNodeHasChildrenChange:f}=l,p=o!==void 0,d=Et(t,l.onValueNodeChange);return Mn(()=>{f(p)},[f,p]),$.jsx(ct.span,{...u,ref:d,style:{pointerEvents:"none"},children:$F(l.value)?$.jsx($.Fragment,{children:a}):o})});fF.displayName=cF;var v1e="SelectIcon",dF=A.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return $.jsx(ct.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});dF.displayName=v1e;var m1e="SelectPortal",pF=e=>$.jsx(F_,{asChild:!0,...e});pF.displayName=m1e;var Ms="SelectContent",hF=A.forwardRef((e,t)=>{const n=Ma(Ms,e.__scopeSelect),[r,i]=A.useState();if(Mn(()=>{i(new DocumentFragment)},[]),!n.open){const o=r;return o?Ml.createPortal($.jsx(vF,{scope:e.__scopeSelect,children:$.jsx(Pg.Slot,{scope:e.__scopeSelect,children:$.jsx("div",{children:e.children})})}),o):null}return $.jsx(mF,{...e,ref:t})});hF.displayName=Ms;var Xr=10,[vF,$a]=Zl(Ms),g1e="SelectContentImpl",mF=A.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:o,onPointerDownOutside:a,side:u,sideOffset:l,align:f,alignOffset:p,arrowPadding:d,collisionBoundary:h,collisionPadding:m,sticky:y,hideWhenDetached:g,avoidCollisions:w,...b}=e,x=Ma(Ms,n),[S,P]=A.useState(null),[O,E]=A.useState(null),T=Et(t,me=>P(me)),[R,I]=A.useState(null),[B,k]=A.useState(null),U=Eg(n),[V,q]=A.useState(!1),X=A.useRef(!1);A.useEffect(()=>{if(S)return JL(S)},[S]),EL();const G=A.useCallback(me=>{const[Ae,...se]=U().map(J=>J.ref.current),[de]=se.slice(-1),pe=document.activeElement;for(const J of me)if(J===pe||(J==null||J.scrollIntoView({block:"nearest"}),J===Ae&&O&&(O.scrollTop=0),J===de&&O&&(O.scrollTop=O.scrollHeight),J==null||J.focus(),document.activeElement!==pe))return},[U,O]),Y=A.useCallback(()=>G([R,S]),[G,R,S]);A.useEffect(()=>{V&&Y()},[V,Y]);const{onOpenChange:F,triggerPointerDownPosRef:z}=x;A.useEffect(()=>{if(S){let me={x:0,y:0};const Ae=de=>{var pe,J;me={x:Math.abs(Math.round(de.pageX)-(((pe=z.current)==null?void 0:pe.x)??0)),y:Math.abs(Math.round(de.pageY)-(((J=z.current)==null?void 0:J.y)??0))}},se=de=>{me.x<=10&&me.y<=10?de.preventDefault():S.contains(de.target)||F(!1),document.removeEventListener("pointermove",Ae),z.current=null};return z.current!==null&&(document.addEventListener("pointermove",Ae),document.addEventListener("pointerup",se,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Ae),document.removeEventListener("pointerup",se,{capture:!0})}}},[S,F,z]),A.useEffect(()=>{const me=()=>F(!1);return window.addEventListener("blur",me),window.addEventListener("resize",me),()=>{window.removeEventListener("blur",me),window.removeEventListener("resize",me)}},[F]);const[ee,oe]=NF(me=>{const Ae=U().filter(pe=>!pe.disabled),se=Ae.find(pe=>pe.ref.current===document.activeElement),de=IF(Ae,me,se);de&&setTimeout(()=>de.ref.current.focus())}),ae=A.useCallback((me,Ae,se)=>{const de=!X.current&&!se;(x.value!==void 0&&x.value===Ae||de)&&(I(me),de&&(X.current=!0))},[x.value]),be=A.useCallback(()=>S==null?void 0:S.focus(),[S]),Ce=A.useCallback((me,Ae,se)=>{const de=!X.current&&!se;(x.value!==void 0&&x.value===Ae||de)&&k(me)},[x.value]),Ne=r==="popper"?i1:gF,Le=Ne===i1?{side:u,sideOffset:l,align:f,alignOffset:p,arrowPadding:d,collisionBoundary:h,collisionPadding:m,sticky:y,hideWhenDetached:g,avoidCollisions:w}:{};return $.jsx(vF,{scope:n,content:S,viewport:O,onViewportChange:E,itemRefCallback:ae,selectedItem:R,onItemLeave:be,itemTextRefCallback:Ce,focusSelectedItem:Y,selectedItemText:B,position:r,isPositioned:V,searchRef:ee,children:$.jsx(B_,{as:Cs,allowPinchZoom:!0,children:$.jsx(T_,{asChild:!0,trapped:x.open,onMountAutoFocus:me=>{me.preventDefault()},onUnmountAutoFocus:Oe(i,me=>{var Ae;(Ae=x.trigger)==null||Ae.focus({preventScroll:!0}),me.preventDefault()}),children:$.jsx(C_,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:me=>me.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:$.jsx(Ne,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:me=>me.preventDefault(),...b,...Le,onPlaced:()=>q(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:Oe(b.onKeyDown,me=>{const Ae=me.ctrlKey||me.altKey||me.metaKey;if(me.key==="Tab"&&me.preventDefault(),!Ae&&me.key.length===1&&oe(me.key),["ArrowUp","ArrowDown","Home","End"].includes(me.key)){let de=U().filter(pe=>!pe.disabled).map(pe=>pe.ref.current);if(["ArrowUp","End"].includes(me.key)&&(de=de.slice().reverse()),["ArrowUp","ArrowDown"].includes(me.key)){const pe=me.target,J=de.indexOf(pe);de=de.slice(J+1)}setTimeout(()=>G(de)),me.preventDefault()}})})})})})})});mF.displayName=g1e;var y1e="SelectItemAlignedPosition",gF=A.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,o=Ma(Ms,n),a=$a(Ms,n),[u,l]=A.useState(null),[f,p]=A.useState(null),d=Et(t,T=>p(T)),h=Eg(n),m=A.useRef(!1),y=A.useRef(!0),{viewport:g,selectedItem:w,selectedItemText:b,focusSelectedItem:x}=a,S=A.useCallback(()=>{if(o.trigger&&o.valueNode&&u&&f&&g&&w&&b){const T=o.trigger.getBoundingClientRect(),R=f.getBoundingClientRect(),I=o.valueNode.getBoundingClientRect(),B=b.getBoundingClientRect();if(o.dir!=="rtl"){const pe=B.left-R.left,J=I.left-pe,Ue=T.left-J,xe=T.width+Ue,Qe=Math.max(xe,R.width),ft=window.innerWidth-Xr,tt=Z$(J,[Xr,Math.max(Xr,ft-Qe)]);u.style.minWidth=xe+"px",u.style.left=tt+"px"}else{const pe=R.right-B.right,J=window.innerWidth-I.right-pe,Ue=window.innerWidth-T.right-J,xe=T.width+Ue,Qe=Math.max(xe,R.width),ft=window.innerWidth-Xr,tt=Z$(J,[Xr,Math.max(Xr,ft-Qe)]);u.style.minWidth=xe+"px",u.style.right=tt+"px"}const k=h(),U=window.innerHeight-Xr*2,V=g.scrollHeight,q=window.getComputedStyle(f),X=parseInt(q.borderTopWidth,10),G=parseInt(q.paddingTop,10),Y=parseInt(q.borderBottomWidth,10),F=parseInt(q.paddingBottom,10),z=X+G+V+F+Y,ee=Math.min(w.offsetHeight*5,z),oe=window.getComputedStyle(g),ae=parseInt(oe.paddingTop,10),be=parseInt(oe.paddingBottom,10),Ce=T.top+T.height/2-Xr,Ne=U-Ce,Le=w.offsetHeight/2,me=w.offsetTop+Le,Ae=X+G+me,se=z-Ae;if(Ae<=Ce){const pe=k.length>0&&w===k[k.length-1].ref.current;u.style.bottom="0px";const J=f.clientHeight-g.offsetTop-g.offsetHeight,Ue=Math.max(Ne,Le+(pe?be:0)+J+Y),xe=Ae+Ue;u.style.height=xe+"px"}else{const pe=k.length>0&&w===k[0].ref.current;u.style.top="0px";const Ue=Math.max(Ce,X+g.offsetTop+(pe?ae:0)+Le)+se;u.style.height=Ue+"px",g.scrollTop=Ae-Ce+g.offsetTop}u.style.margin=`${Xr}px 0`,u.style.minHeight=ee+"px",u.style.maxHeight=U+"px",r==null||r(),requestAnimationFrame(()=>m.current=!0)}},[h,o.trigger,o.valueNode,u,f,g,w,b,o.dir,r]);Mn(()=>S(),[S]);const[P,O]=A.useState();Mn(()=>{f&&O(window.getComputedStyle(f).zIndex)},[f]);const E=A.useCallback(T=>{T&&y.current===!0&&(S(),x==null||x(),y.current=!1)},[S,x]);return $.jsx(w1e,{scope:n,contentWrapper:u,shouldExpandOnScrollRef:m,onScrollButtonChange:E,children:$.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:P},children:$.jsx(ct.div,{...i,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});gF.displayName=y1e;var b1e="SelectPopperPosition",i1=A.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=Xr,...o}=e,a=Ag(n);return $.jsx(XL,{...a,...o,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});i1.displayName=b1e;var[w1e,U_]=Zl(Ms,{}),o1="SelectViewport",yF=A.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,o=$a(o1,n),a=U_(o1,n),u=Et(t,o.onViewportChange),l=A.useRef(0);return $.jsxs($.Fragment,{children:[$.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),$.jsx(Pg.Slot,{scope:n,children:$.jsx(ct.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Oe(i.onScroll,f=>{const p=f.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:h}=a;if(h!=null&&h.current&&d){const m=Math.abs(l.current-p.scrollTop);if(m>0){const y=window.innerHeight-Xr*2,g=parseFloat(d.style.minHeight),w=parseFloat(d.style.height),b=Math.max(g,w);if(b0?P:0,d.style.justifyContent="flex-end")}}}l.current=p.scrollTop})})})]})});yF.displayName=o1;var bF="SelectGroup",[x1e,S1e]=Zl(bF),_1e=A.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Pl();return $.jsx(x1e,{scope:n,id:i,children:$.jsx(ct.div,{role:"group","aria-labelledby":i,...r,ref:t})})});_1e.displayName=bF;var wF="SelectLabel",xF=A.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=S1e(wF,n);return $.jsx(ct.div,{id:i.id,...r,ref:t})});xF.displayName=wF;var sm="SelectItem",[O1e,SF]=Zl(sm),_F=A.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:o,...a}=e,u=Ma(sm,n),l=$a(sm,n),f=u.value===r,[p,d]=A.useState(o??""),[h,m]=A.useState(!1),y=Et(t,x=>{var S;return(S=l.itemRefCallback)==null?void 0:S.call(l,x,r,i)}),g=Pl(),w=A.useRef("touch"),b=()=>{i||(u.onValueChange(r),u.onOpenChange(!1))};if(r==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return $.jsx(O1e,{scope:n,value:r,disabled:i,textId:g,isSelected:f,onItemTextChange:A.useCallback(x=>{d(S=>S||((x==null?void 0:x.textContent)??"").trim())},[]),children:$.jsx(Pg.ItemSlot,{scope:n,value:r,disabled:i,textValue:p,children:$.jsx(ct.div,{role:"option","aria-labelledby":g,"data-highlighted":h?"":void 0,"aria-selected":f&&h,"data-state":f?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...a,ref:y,onFocus:Oe(a.onFocus,()=>m(!0)),onBlur:Oe(a.onBlur,()=>m(!1)),onClick:Oe(a.onClick,()=>{w.current!=="mouse"&&b()}),onPointerUp:Oe(a.onPointerUp,()=>{w.current==="mouse"&&b()}),onPointerDown:Oe(a.onPointerDown,x=>{w.current=x.pointerType}),onPointerMove:Oe(a.onPointerMove,x=>{var S;w.current=x.pointerType,i?(S=l.onItemLeave)==null||S.call(l):w.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Oe(a.onPointerLeave,x=>{var S;x.currentTarget===document.activeElement&&((S=l.onItemLeave)==null||S.call(l))}),onKeyDown:Oe(a.onKeyDown,x=>{var P;((P=l.searchRef)==null?void 0:P.current)!==""&&x.key===" "||(c1e.includes(x.key)&&b(),x.key===" "&&x.preventDefault())})})})})});_F.displayName=sm;var Wc="SelectItemText",OF=A.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...o}=e,a=Ma(Wc,n),u=$a(Wc,n),l=SF(Wc,n),f=h1e(Wc,n),[p,d]=A.useState(null),h=Et(t,b=>d(b),l.onItemTextChange,b=>{var x;return(x=u.itemTextRefCallback)==null?void 0:x.call(u,b,l.value,l.disabled)}),m=p==null?void 0:p.textContent,y=A.useMemo(()=>$.jsx("option",{value:l.value,disabled:l.disabled,children:m},l.value),[l.disabled,l.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:w}=f;return Mn(()=>(g(y),()=>w(y)),[g,w,y]),$.jsxs($.Fragment,{children:[$.jsx(ct.span,{id:l.textId,...o,ref:h}),l.isSelected&&a.valueNode&&!a.valueNodeHasChildren?Ml.createPortal(o.children,a.valueNode):null]})});OF.displayName=Wc;var PF="SelectItemIndicator",EF=A.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return SF(PF,n).isSelected?$.jsx(ct.span,{"aria-hidden":!0,...r,ref:t}):null});EF.displayName=PF;var a1="SelectScrollUpButton",AF=A.forwardRef((e,t)=>{const n=$a(a1,e.__scopeSelect),r=U_(a1,e.__scopeSelect),[i,o]=A.useState(!1),a=Et(t,r.onScrollButtonChange);return Mn(()=>{if(n.viewport&&n.isPositioned){let u=function(){const f=l.scrollTop>0;o(f)};const l=n.viewport;return u(),l.addEventListener("scroll",u),()=>l.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),i?$.jsx(TF,{...e,ref:a,onAutoScroll:()=>{const{viewport:u,selectedItem:l}=n;u&&l&&(u.scrollTop=u.scrollTop-l.offsetHeight)}}):null});AF.displayName=a1;var s1="SelectScrollDownButton",CF=A.forwardRef((e,t)=>{const n=$a(s1,e.__scopeSelect),r=U_(s1,e.__scopeSelect),[i,o]=A.useState(!1),a=Et(t,r.onScrollButtonChange);return Mn(()=>{if(n.viewport&&n.isPositioned){let u=function(){const f=l.scrollHeight-l.clientHeight,p=Math.ceil(l.scrollTop)l.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),i?$.jsx(TF,{...e,ref:a,onAutoScroll:()=>{const{viewport:u,selectedItem:l}=n;u&&l&&(u.scrollTop=u.scrollTop+l.offsetHeight)}}):null});CF.displayName=s1;var TF=A.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,o=$a("SelectScrollButton",n),a=A.useRef(null),u=Eg(n),l=A.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return A.useEffect(()=>()=>l(),[l]),Mn(()=>{var p;const f=u().find(d=>d.ref.current===document.activeElement);(p=f==null?void 0:f.ref.current)==null||p.scrollIntoView({block:"nearest"})},[u]),$.jsx(ct.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Oe(i.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:Oe(i.onPointerMove,()=>{var f;(f=o.onItemLeave)==null||f.call(o),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:Oe(i.onPointerLeave,()=>{l()})})}),P1e="SelectSeparator",MF=A.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return $.jsx(ct.div,{"aria-hidden":!0,...r,ref:t})});MF.displayName=P1e;var u1="SelectArrow",E1e=A.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Ag(n),o=Ma(u1,n),a=$a(u1,n);return o.open&&a.position==="popper"?$.jsx(YL,{...i,...r,ref:t}):null});E1e.displayName=u1;function $F(e){return e===""||e===void 0}var RF=A.forwardRef((e,t)=>{const{value:n,...r}=e,i=A.useRef(null),o=Et(t,i),a=Sxe(n);return A.useEffect(()=>{const u=i.current,l=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==n&&p){const d=new Event("change",{bubbles:!0});p.call(u,n),u.dispatchEvent(d)}},[a,n]),$.jsx(QL,{asChild:!0,children:$.jsx("select",{...r,ref:o,defaultValue:n})})});RF.displayName="BubbleSelect";function NF(e){const t=Br(e),n=A.useRef(""),r=A.useRef(0),i=A.useCallback(a=>{const u=n.current+a;t(u),function l(f){n.current=f,window.clearTimeout(r.current),f!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(u)},[t]),o=A.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return A.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,o]}function IF(e,t,n){const i=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=A1e(e,Math.max(o,0));i.length===1&&(a=a.filter(f=>f!==n));const l=a.find(f=>f.textValue.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function A1e(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var C1e=sF,jF=lF,T1e=fF,M1e=dF,$1e=pF,kF=hF,R1e=yF,DF=xF,LF=_F,N1e=OF,I1e=EF,FF=AF,BF=CF,UF=MF;const j1e=C1e,k1e=T1e,zF=A.forwardRef(({className:e,children:t,...n},r)=>$.jsxs(jF,{ref:r,className:De("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,$.jsx(M1e,{asChild:!0,children:$.jsx(xL,{className:"h-4 w-4 opacity-50"})})]}));zF.displayName=jF.displayName;const WF=A.forwardRef(({className:e,...t},n)=>$.jsx(FF,{ref:n,className:De("flex cursor-default items-center justify-center py-1",e),...t,children:$.jsx(Fbe,{className:"h-4 w-4"})}));WF.displayName=FF.displayName;const HF=A.forwardRef(({className:e,...t},n)=>$.jsx(BF,{ref:n,className:De("flex cursor-default items-center justify-center py-1",e),...t,children:$.jsx(xL,{className:"h-4 w-4"})}));HF.displayName=BF.displayName;const KF=A.forwardRef(({className:e,children:t,position:n="popper",...r},i)=>$.jsx($1e,{children:$.jsxs(kF,{ref:i,className:De("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[$.jsx(WF,{}),$.jsx(R1e,{className:De("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),$.jsx(HF,{})]})}));KF.displayName=kF.displayName;const D1e=A.forwardRef(({className:e,...t},n)=>$.jsx(DF,{ref:n,className:De("px-2 py-1.5 text-sm font-semibold",e),...t}));D1e.displayName=DF.displayName;const GF=A.forwardRef(({className:e,children:t,...n},r)=>$.jsxs(LF,{ref:r,className:De("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[$.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:$.jsx(I1e,{children:$.jsx(wL,{className:"h-4 w-4"})})}),$.jsx(N1e,{children:t})]}));GF.displayName=LF.displayName;const L1e=A.forwardRef(({className:e,...t},n)=>$.jsx(UF,{ref:n,className:De("-mx-1 my-1 h-px bg-muted",e),...t}));L1e.displayName=UF.displayName;const F1e=()=>{const[e,t]=A.useState(1),[n,r]=A.useState(15),[i,o]=A.useState(""),[a,u]=A.useState({sort_by:"n_comparisons",sort_order:"desc"}),l=A.useCallback(_be.debounce(y=>{o(y),t(1)},300),[]),{data:f,isLoading:p,isError:d,isFetching:h}=vbe({page:e,page_size:n,search:i,sort_by:a.sort_by,sort_order:a.sort_order}),m=y=>{u(g=>({sort_by:y,sort_order:g.sort_by===y&&g.sort_order==="asc"?"desc":"asc"})),t(1)};return d?$.jsx(_l,{className:"w-full",children:$.jsx(Ol,{className:"flex items-center justify-center py-8",children:$.jsx("div",{className:"text-red-500",children:"Error loading data. Please try again later."})})}):$.jsxs(_l,{className:"w-full",children:[$.jsxs(Cd,{children:[$.jsxs(Td,{className:"flex items-center justify-between",children:[$.jsx("span",{children:"AoA tabulka slov"}),h&&$.jsx(Q$,{className:"w-4 h-4 animate-spin"})]}),$.jsxs("div",{className:"flex items-center justify-between",children:[$.jsxs("div",{className:"flex items-center space-x-2",children:[$.jsx(zbe,{className:"w-4 h-4 text-gray-500"}),$.jsx(gL,{placeholder:"Vyhledej slova...",onChange:y=>l(y.target.value),className:"max-w-sm"})]}),$.jsxs("div",{className:"flex items-center space-x-2",children:[$.jsx("span",{className:"text-sm text-gray-500",children:"slov na stránku:"}),$.jsxs(j1e,{value:n.toString(),onValueChange:y=>{r(Number(y)),t(1)},children:[$.jsx(zF,{className:"w-20",children:$.jsx(k1e,{})}),$.jsx(KF,{children:[10,15,20,50].map(y=>$.jsx(GF,{value:y.toString(),children:y},y))})]})]})]})]}),$.jsx(Ol,{children:$.jsxs(pL,{children:[$.jsx(hL,{children:$.jsx(zc,{children:[{key:"word",label:"Word"},{key:"estimated_mean_age",label:"Est. Mean Age"},{key:"stdev",label:"Std Dev"},{key:"n_comparisons",label:"Comparisons"}].map(({key:y,label:g})=>$.jsx(mL,{children:$.jsxs(vs,{variant:"ghost",className:"h-8 flex items-center gap-2",onClick:()=>m(y),children:[g,$.jsx(Dbe,{className:`w-4 h-4 ${a.sort_by===y?"opacity-100":"opacity-50"}`})]})},y))})}),$.jsx(vL,{children:p?$.jsx(zc,{children:$.jsx(qa,{colSpan:4,className:"text-center py-8",children:$.jsx(Q$,{className:"w-6 h-6 animate-spin mx-auto"})})}):(f==null?void 0:f.items.length)===0?$.jsx(zc,{children:$.jsx(qa,{colSpan:4,className:"text-center py-8",children:"Nic jsme nanašli"})}):f==null?void 0:f.items.map(y=>$.jsxs(zc,{children:[$.jsx(qa,{className:"font-medium",children:y.word}),$.jsx(qa,{children:y.estimated_mean_age.toFixed(2)}),$.jsx(qa,{children:y.stdev.toFixed(2)}),$.jsx(qa,{children:y.n_comparisons})]},y.word))})]})}),f&&$.jsxs(SD,{className:"flex flex-col items-center justify-between",children:[$.jsxs("div",{className:"text-sm mb-2 text-gray-500",children:["řádek ",(e-1)*n+1," až ",Math.min(e*n,f.total)," z ",f.total]}),$.jsxs("div",{className:"flex items-center space-x-2",children:[$.jsxs(vs,{variant:"outline",size:"sm",onClick:()=>t(e-1),disabled:e<=1||h,children:[$.jsx(Lbe,{className:"w-4 h-4"}),"Předchozí"]}),$.jsxs("div",{className:"text-sm text-gray-500",children:["Stránka ",e," z ",f.total_pages]}),$.jsxs(vs,{variant:"outline",size:"sm",onClick:()=>t(e+1),disabled:e>=f.total_pages||h,children:["Další",$.jsx(SL,{className:"w-4 h-4"})]})]})]})]})},hb=({title:e,value:t=0})=>$.jsxs(_l,{children:[$.jsxs(Cd,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[$.jsx(Td,{className:"text-sm font-medium",children:e}),$.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",className:"h-4 w-4 text-muted-foreground",children:$.jsx("path",{d:"M22 12h-4l-3 9L9 3l-3 9H2"})})]}),$.jsx(Ol,{children:$.jsx("div",{className:"text-2xl font-bold",children:t})})]});function B1e(e,t){return A.useReducer((n,r)=>t[n][r]??n,e)}var Id=e=>{const{present:t,children:n}=e,r=U1e(t),i=typeof n=="function"?n({present:r.isPresent}):A.Children.only(n),o=Et(r.ref,z1e(i));return typeof n=="function"||r.isPresent?A.cloneElement(i,{ref:o}):null};Id.displayName="Presence";function U1e(e){const[t,n]=A.useState(),r=A.useRef({}),i=A.useRef(e),o=A.useRef("none"),a=e?"mounted":"unmounted",[u,l]=B1e(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return A.useEffect(()=>{const f=ch(r.current);o.current=u==="mounted"?f:"none"},[u]),Mn(()=>{const f=r.current,p=i.current;if(p!==e){const h=o.current,m=ch(f);e?l("MOUNT"):m==="none"||(f==null?void 0:f.display)==="none"?l("UNMOUNT"):l(p&&h!==m?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),Mn(()=>{if(t){let f;const p=t.ownerDocument.defaultView??window,d=m=>{const g=ch(r.current).includes(m.animationName);if(m.target===t&&g&&(l("ANIMATION_END"),!i.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",f=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},h=m=>{m.target===t&&(o.current=ch(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{p.clearTimeout(f),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:A.useCallback(f=>{f&&(r.current=getComputedStyle(f)),n(f)},[])}}function ch(e){return(e==null?void 0:e.animationName)||"none"}function z1e(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function W1e(e,t=[]){let n=[];function r(o,a){const u=A.createContext(a),l=n.length;n=[...n,a];function f(d){const{scope:h,children:m,...y}=d,g=(h==null?void 0:h[e][l])||u,w=A.useMemo(()=>y,Object.values(y));return $.jsx(g.Provider,{value:w,children:m})}function p(d,h){const m=(h==null?void 0:h[e][l])||u,y=A.useContext(m);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${o}\``)}return f.displayName=o+"Provider",[f,p]}const i=()=>{const o=n.map(a=>A.createContext(a));return function(u){const l=(u==null?void 0:u[e])||o;return A.useMemo(()=>({[`__scope${e}`]:{...u,[e]:l}}),[u,l])}};return i.scopeName=e,[r,H1e(i,...t)]}function H1e(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((u,{useScope:l,scopeName:f})=>{const d=l(o)[`__scope${f}`];return{...u,...d}},{});return A.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var vb="rovingFocusGroup.onEntryFocus",K1e={bubbles:!1,cancelable:!0},Cg="RovingFocusGroup",[l1,qF,G1e]=P_(Cg),[q1e,VF]=W1e(Cg,[G1e]),[V1e,X1e]=q1e(Cg),XF=A.forwardRef((e,t)=>$.jsx(l1.Provider,{scope:e.__scopeRovingFocusGroup,children:$.jsx(l1.Slot,{scope:e.__scopeRovingFocusGroup,children:$.jsx(Y1e,{...e,ref:t})})}));XF.displayName=Cg;var Y1e=A.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:l,onEntryFocus:f,preventScrollOnEntryFocus:p=!1,...d}=e,h=A.useRef(null),m=Et(t,h),y=A_(o),[g=null,w]=am({prop:a,defaultProp:u,onChange:l}),[b,x]=A.useState(!1),S=Br(f),P=qF(n),O=A.useRef(!1),[E,T]=A.useState(0);return A.useEffect(()=>{const R=h.current;if(R)return R.addEventListener(vb,S),()=>R.removeEventListener(vb,S)},[S]),$.jsx(V1e,{scope:n,orientation:r,dir:y,loop:i,currentTabStopId:g,onItemFocus:A.useCallback(R=>w(R),[w]),onItemShiftTab:A.useCallback(()=>x(!0),[]),onFocusableItemAdd:A.useCallback(()=>T(R=>R+1),[]),onFocusableItemRemove:A.useCallback(()=>T(R=>R-1),[]),children:$.jsx(ct.div,{tabIndex:b||E===0?-1:0,"data-orientation":r,...d,ref:m,style:{outline:"none",...e.style},onMouseDown:Oe(e.onMouseDown,()=>{O.current=!0}),onFocus:Oe(e.onFocus,R=>{const I=!O.current;if(R.target===R.currentTarget&&I&&!b){const B=new CustomEvent(vb,K1e);if(R.currentTarget.dispatchEvent(B),!B.defaultPrevented){const k=P().filter(G=>G.focusable),U=k.find(G=>G.active),V=k.find(G=>G.id===g),X=[U,V,...k].filter(Boolean).map(G=>G.ref.current);ZF(X,p)}}O.current=!1}),onBlur:Oe(e.onBlur,()=>x(!1))})})}),YF="RovingFocusGroupItem",QF=A.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,...a}=e,u=Pl(),l=o||u,f=X1e(YF,n),p=f.currentTabStopId===l,d=qF(n),{onFocusableItemAdd:h,onFocusableItemRemove:m}=f;return A.useEffect(()=>{if(r)return h(),()=>m()},[r,h,m]),$.jsx(l1.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:$.jsx(ct.span,{tabIndex:p?0:-1,"data-orientation":f.orientation,...a,ref:t,onMouseDown:Oe(e.onMouseDown,y=>{r?f.onItemFocus(l):y.preventDefault()}),onFocus:Oe(e.onFocus,()=>f.onItemFocus(l)),onKeyDown:Oe(e.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){f.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const g=J1e(y,f.orientation,f.dir);if(g!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let b=d().filter(x=>x.focusable).map(x=>x.ref.current);if(g==="last")b.reverse();else if(g==="prev"||g==="next"){g==="prev"&&b.reverse();const x=b.indexOf(y.currentTarget);b=f.loop?eSe(b,x+1):b.slice(x+1)}setTimeout(()=>ZF(b))}})})})});QF.displayName=YF;var Q1e={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Z1e(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function J1e(e,t,n){const r=Z1e(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Q1e[r]}function ZF(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function eSe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var tSe=XF,nSe=QF,c1=["Enter"," "],rSe=["ArrowDown","PageUp","Home"],JF=["ArrowUp","PageDown","End"],iSe=[...rSe,...JF],oSe={ltr:[...c1,"ArrowRight"],rtl:[...c1,"ArrowLeft"]},aSe={ltr:["ArrowLeft"],rtl:["ArrowRight"]},jd="Menu",[sd,sSe,uSe]=P_(jd),[ks,eB]=E_(jd,[uSe,_g,VF]),Tg=_g(),tB=VF(),[lSe,Ds]=ks(jd),[cSe,kd]=ks(jd),nB=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,u=Tg(t),[l,f]=A.useState(null),p=A.useRef(!1),d=Br(o),h=A_(i);return A.useEffect(()=>{const m=()=>{p.current=!0,document.addEventListener("pointerdown",y,{capture:!0,once:!0}),document.addEventListener("pointermove",y,{capture:!0,once:!0})},y=()=>p.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",y,{capture:!0}),document.removeEventListener("pointermove",y,{capture:!0})}},[]),$.jsx(qL,{...u,children:$.jsx(lSe,{scope:t,open:n,onOpenChange:d,content:l,onContentChange:f,children:$.jsx(cSe,{scope:t,onClose:A.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:p,dir:h,modal:a,children:r})})})};nB.displayName=jd;var fSe="MenuAnchor",z_=A.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=Tg(n);return $.jsx(VL,{...i,...r,ref:t})});z_.displayName=fSe;var W_="MenuPortal",[dSe,rB]=ks(W_,{forceMount:void 0}),iB=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:i}=e,o=Ds(W_,t);return $.jsx(dSe,{scope:t,forceMount:n,children:$.jsx(Id,{present:n||o.open,children:$.jsx(F_,{asChild:!0,container:i,children:r})})})};iB.displayName=W_;var kr="MenuContent",[pSe,H_]=ks(kr),oB=A.forwardRef((e,t)=>{const n=rB(kr,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=Ds(kr,e.__scopeMenu),a=kd(kr,e.__scopeMenu);return $.jsx(sd.Provider,{scope:e.__scopeMenu,children:$.jsx(Id,{present:r||o.open,children:$.jsx(sd.Slot,{scope:e.__scopeMenu,children:a.modal?$.jsx(hSe,{...i,ref:t}):$.jsx(vSe,{...i,ref:t})})})})}),hSe=A.forwardRef((e,t)=>{const n=Ds(kr,e.__scopeMenu),r=A.useRef(null),i=Et(t,r);return A.useEffect(()=>{const o=r.current;if(o)return JL(o)},[]),$.jsx(K_,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Oe(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),vSe=A.forwardRef((e,t)=>{const n=Ds(kr,e.__scopeMenu);return $.jsx(K_,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),K_=A.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:u,onEntryFocus:l,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:d,onInteractOutside:h,onDismiss:m,disableOutsideScroll:y,...g}=e,w=Ds(kr,n),b=kd(kr,n),x=Tg(n),S=tB(n),P=sSe(n),[O,E]=A.useState(null),T=A.useRef(null),R=Et(t,T,w.onContentChange),I=A.useRef(0),B=A.useRef(""),k=A.useRef(0),U=A.useRef(null),V=A.useRef("right"),q=A.useRef(0),X=y?B_:A.Fragment,G=y?{as:Cs,allowPinchZoom:!0}:void 0,Y=z=>{var me,Ae;const ee=B.current+z,oe=P().filter(se=>!se.disabled),ae=document.activeElement,be=(me=oe.find(se=>se.ref.current===ae))==null?void 0:me.textValue,Ce=oe.map(se=>se.textValue),Ne=ASe(Ce,ee,be),Le=(Ae=oe.find(se=>se.textValue===Ne))==null?void 0:Ae.ref.current;(function se(de){B.current=de,window.clearTimeout(I.current),de!==""&&(I.current=window.setTimeout(()=>se(""),1e3))})(ee),Le&&setTimeout(()=>Le.focus())};A.useEffect(()=>()=>window.clearTimeout(I.current),[]),EL();const F=A.useCallback(z=>{var oe,ae;return V.current===((oe=U.current)==null?void 0:oe.side)&&TSe(z,(ae=U.current)==null?void 0:ae.area)},[]);return $.jsx(pSe,{scope:n,searchRef:B,onItemEnter:A.useCallback(z=>{F(z)&&z.preventDefault()},[F]),onItemLeave:A.useCallback(z=>{var ee;F(z)||((ee=T.current)==null||ee.focus(),E(null))},[F]),onTriggerLeave:A.useCallback(z=>{F(z)&&z.preventDefault()},[F]),pointerGraceTimerRef:k,onPointerGraceIntentChange:A.useCallback(z=>{U.current=z},[]),children:$.jsx(X,{...G,children:$.jsx(T_,{asChild:!0,trapped:i,onMountAutoFocus:Oe(o,z=>{var ee;z.preventDefault(),(ee=T.current)==null||ee.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:$.jsx(C_,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:d,onInteractOutside:h,onDismiss:m,children:$.jsx(tSe,{asChild:!0,...S,dir:b.dir,orientation:"vertical",loop:r,currentTabStopId:O,onCurrentTabStopIdChange:E,onEntryFocus:Oe(l,z=>{b.isUsingKeyboardRef.current||z.preventDefault()}),preventScrollOnEntryFocus:!0,children:$.jsx(XL,{role:"menu","aria-orientation":"vertical","data-state":xB(w.open),"data-radix-menu-content":"",dir:b.dir,...x,...g,ref:R,style:{outline:"none",...g.style},onKeyDown:Oe(g.onKeyDown,z=>{const oe=z.target.closest("[data-radix-menu-content]")===z.currentTarget,ae=z.ctrlKey||z.altKey||z.metaKey,be=z.key.length===1;oe&&(z.key==="Tab"&&z.preventDefault(),!ae&&be&&Y(z.key));const Ce=T.current;if(z.target!==Ce||!iSe.includes(z.key))return;z.preventDefault();const Le=P().filter(me=>!me.disabled).map(me=>me.ref.current);JF.includes(z.key)&&Le.reverse(),PSe(Le)}),onBlur:Oe(e.onBlur,z=>{z.currentTarget.contains(z.target)||(window.clearTimeout(I.current),B.current="")}),onPointerMove:Oe(e.onPointerMove,ud(z=>{const ee=z.target,oe=q.current!==z.clientX;if(z.currentTarget.contains(ee)&&oe){const ae=z.clientX>q.current?"right":"left";V.current=ae,q.current=z.clientX}}))})})})})})})});oB.displayName=kr;var mSe="MenuGroup",G_=A.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return $.jsx(ct.div,{role:"group",...r,ref:t})});G_.displayName=mSe;var gSe="MenuLabel",aB=A.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return $.jsx(ct.div,{...r,ref:t})});aB.displayName=gSe;var um="MenuItem",bR="menu.itemSelect",Mg=A.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=A.useRef(null),a=kd(um,e.__scopeMenu),u=H_(um,e.__scopeMenu),l=Et(t,o),f=A.useRef(!1),p=()=>{const d=o.current;if(!n&&d){const h=new CustomEvent(bR,{bubbles:!0,cancelable:!0});d.addEventListener(bR,m=>r==null?void 0:r(m),{once:!0}),_L(d,h),h.defaultPrevented?f.current=!1:a.onClose()}};return $.jsx(sB,{...i,ref:l,disabled:n,onClick:Oe(e.onClick,p),onPointerDown:d=>{var h;(h=e.onPointerDown)==null||h.call(e,d),f.current=!0},onPointerUp:Oe(e.onPointerUp,d=>{var h;f.current||(h=d.currentTarget)==null||h.click()}),onKeyDown:Oe(e.onKeyDown,d=>{const h=u.searchRef.current!=="";n||h&&d.key===" "||c1.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});Mg.displayName=um;var sB=A.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=H_(um,n),u=tB(n),l=A.useRef(null),f=Et(t,l),[p,d]=A.useState(!1),[h,m]=A.useState("");return A.useEffect(()=>{const y=l.current;y&&m((y.textContent??"").trim())},[o.children]),$.jsx(sd.ItemSlot,{scope:n,disabled:r,textValue:i??h,children:$.jsx(nSe,{asChild:!0,...u,focusable:!r,children:$.jsx(ct.div,{role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:f,onPointerMove:Oe(e.onPointerMove,ud(y=>{r?a.onItemLeave(y):(a.onItemEnter(y),y.defaultPrevented||y.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Oe(e.onPointerLeave,ud(y=>a.onItemLeave(y))),onFocus:Oe(e.onFocus,()=>d(!0)),onBlur:Oe(e.onBlur,()=>d(!1))})})})}),ySe="MenuCheckboxItem",uB=A.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return $.jsx(pB,{scope:e.__scopeMenu,checked:n,children:$.jsx(Mg,{role:"menuitemcheckbox","aria-checked":lm(n)?"mixed":n,...i,ref:t,"data-state":V_(n),onSelect:Oe(i.onSelect,()=>r==null?void 0:r(lm(n)?!0:!n),{checkForDefaultPrevented:!1})})})});uB.displayName=ySe;var lB="MenuRadioGroup",[bSe,wSe]=ks(lB,{value:void 0,onValueChange:()=>{}}),cB=A.forwardRef((e,t)=>{const{value:n,onValueChange:r,...i}=e,o=Br(r);return $.jsx(bSe,{scope:e.__scopeMenu,value:n,onValueChange:o,children:$.jsx(G_,{...i,ref:t})})});cB.displayName=lB;var fB="MenuRadioItem",dB=A.forwardRef((e,t)=>{const{value:n,...r}=e,i=wSe(fB,e.__scopeMenu),o=n===i.value;return $.jsx(pB,{scope:e.__scopeMenu,checked:o,children:$.jsx(Mg,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":V_(o),onSelect:Oe(r.onSelect,()=>{var a;return(a=i.onValueChange)==null?void 0:a.call(i,n)},{checkForDefaultPrevented:!1})})})});dB.displayName=fB;var q_="MenuItemIndicator",[pB,xSe]=ks(q_,{checked:!1}),hB=A.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,o=xSe(q_,n);return $.jsx(Id,{present:r||lm(o.checked)||o.checked===!0,children:$.jsx(ct.span,{...i,ref:t,"data-state":V_(o.checked)})})});hB.displayName=q_;var SSe="MenuSeparator",vB=A.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return $.jsx(ct.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});vB.displayName=SSe;var _Se="MenuArrow",mB=A.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=Tg(n);return $.jsx(YL,{...i,...r,ref:t})});mB.displayName=_Se;var OSe="MenuSub",[T_e,gB]=ks(OSe),Hc="MenuSubTrigger",yB=A.forwardRef((e,t)=>{const n=Ds(Hc,e.__scopeMenu),r=kd(Hc,e.__scopeMenu),i=gB(Hc,e.__scopeMenu),o=H_(Hc,e.__scopeMenu),a=A.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:l}=o,f={__scopeMenu:e.__scopeMenu},p=A.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return A.useEffect(()=>p,[p]),A.useEffect(()=>{const d=u.current;return()=>{window.clearTimeout(d),l(null)}},[u,l]),$.jsx(z_,{asChild:!0,...f,children:$.jsx(sB,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":xB(n.open),...e,ref:bg(t,i.onTriggerChange),onClick:d=>{var h;(h=e.onClick)==null||h.call(e,d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Oe(e.onPointerMove,ud(d=>{o.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(o.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),p()},100))})),onPointerLeave:Oe(e.onPointerLeave,ud(d=>{var m,y;p();const h=(m=n.content)==null?void 0:m.getBoundingClientRect();if(h){const g=(y=n.content)==null?void 0:y.dataset.side,w=g==="right",b=w?-5:5,x=h[w?"left":"right"],S=h[w?"right":"left"];o.onPointerGraceIntentChange({area:[{x:d.clientX+b,y:d.clientY},{x,y:h.top},{x:S,y:h.top},{x:S,y:h.bottom},{x,y:h.bottom}],side:g}),window.clearTimeout(u.current),u.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(d),d.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:Oe(e.onKeyDown,d=>{var m;const h=o.searchRef.current!=="";e.disabled||h&&d.key===" "||oSe[r.dir].includes(d.key)&&(n.onOpenChange(!0),(m=n.content)==null||m.focus(),d.preventDefault())})})})});yB.displayName=Hc;var bB="MenuSubContent",wB=A.forwardRef((e,t)=>{const n=rB(kr,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=Ds(kr,e.__scopeMenu),a=kd(kr,e.__scopeMenu),u=gB(bB,e.__scopeMenu),l=A.useRef(null),f=Et(t,l);return $.jsx(sd.Provider,{scope:e.__scopeMenu,children:$.jsx(Id,{present:r||o.open,children:$.jsx(sd.Slot,{scope:e.__scopeMenu,children:$.jsx(K_,{id:u.contentId,"aria-labelledby":u.triggerId,...i,ref:f,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:p=>{var d;a.isUsingKeyboardRef.current&&((d=l.current)==null||d.focus()),p.preventDefault()},onCloseAutoFocus:p=>p.preventDefault(),onFocusOutside:Oe(e.onFocusOutside,p=>{p.target!==u.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:Oe(e.onEscapeKeyDown,p=>{a.onClose(),p.preventDefault()}),onKeyDown:Oe(e.onKeyDown,p=>{var m;const d=p.currentTarget.contains(p.target),h=aSe[a.dir].includes(p.key);d&&h&&(o.onOpenChange(!1),(m=u.trigger)==null||m.focus(),p.preventDefault())})})})})})});wB.displayName=bB;function xB(e){return e?"open":"closed"}function lm(e){return e==="indeterminate"}function V_(e){return lm(e)?"indeterminate":e?"checked":"unchecked"}function PSe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function ESe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function ASe(e,t,n){const i=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=ESe(e,Math.max(o,0));i.length===1&&(a=a.filter(f=>f!==n));const l=a.find(f=>f.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function CSe(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=p>r&&n<(f-u)*(r-l)/(p-l)+u&&(i=!i)}return i}function TSe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return CSe(n,t)}function ud(e){return t=>t.pointerType==="mouse"?e(t):void 0}var MSe=nB,$Se=z_,RSe=iB,NSe=oB,ISe=G_,jSe=aB,kSe=Mg,DSe=uB,LSe=cB,FSe=dB,BSe=hB,USe=vB,zSe=mB,WSe=yB,HSe=wB,X_="DropdownMenu",[KSe,M_e]=E_(X_,[eB]),Nn=eB(),[GSe,SB]=KSe(X_),_B=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:o,onOpenChange:a,modal:u=!0}=e,l=Nn(t),f=A.useRef(null),[p=!1,d]=am({prop:i,defaultProp:o,onChange:a});return $.jsx(GSe,{scope:t,triggerId:Pl(),triggerRef:f,contentId:Pl(),open:p,onOpenChange:d,onOpenToggle:A.useCallback(()=>d(h=>!h),[d]),modal:u,children:$.jsx(MSe,{...l,open:p,onOpenChange:d,dir:r,modal:u,children:n})})};_B.displayName=X_;var OB="DropdownMenuTrigger",PB=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,o=SB(OB,n),a=Nn(n);return $.jsx($Se,{asChild:!0,...a,children:$.jsx(ct.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:bg(t,o.triggerRef),onPointerDown:Oe(e.onPointerDown,u=>{!r&&u.button===0&&u.ctrlKey===!1&&(o.onOpenToggle(),o.open||u.preventDefault())}),onKeyDown:Oe(e.onKeyDown,u=>{r||(["Enter"," "].includes(u.key)&&o.onOpenToggle(),u.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(u.key)&&u.preventDefault())})})})});PB.displayName=OB;var qSe="DropdownMenuPortal",EB=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Nn(t);return $.jsx(RSe,{...r,...n})};EB.displayName=qSe;var AB="DropdownMenuContent",CB=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=SB(AB,n),o=Nn(n),a=A.useRef(!1);return $.jsx(NSe,{id:i.contentId,"aria-labelledby":i.triggerId,...o,...r,ref:t,onCloseAutoFocus:Oe(e.onCloseAutoFocus,u=>{var l;a.current||(l=i.triggerRef.current)==null||l.focus(),a.current=!1,u.preventDefault()}),onInteractOutside:Oe(e.onInteractOutside,u=>{const l=u.detail.originalEvent,f=l.button===0&&l.ctrlKey===!0,p=l.button===2||f;(!i.modal||p)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});CB.displayName=AB;var VSe="DropdownMenuGroup",XSe=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Nn(n);return $.jsx(ISe,{...i,...r,ref:t})});XSe.displayName=VSe;var YSe="DropdownMenuLabel",TB=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Nn(n);return $.jsx(jSe,{...i,...r,ref:t})});TB.displayName=YSe;var QSe="DropdownMenuItem",MB=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Nn(n);return $.jsx(kSe,{...i,...r,ref:t})});MB.displayName=QSe;var ZSe="DropdownMenuCheckboxItem",$B=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Nn(n);return $.jsx(DSe,{...i,...r,ref:t})});$B.displayName=ZSe;var JSe="DropdownMenuRadioGroup",e_e=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Nn(n);return $.jsx(LSe,{...i,...r,ref:t})});e_e.displayName=JSe;var t_e="DropdownMenuRadioItem",RB=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Nn(n);return $.jsx(FSe,{...i,...r,ref:t})});RB.displayName=t_e;var n_e="DropdownMenuItemIndicator",NB=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Nn(n);return $.jsx(BSe,{...i,...r,ref:t})});NB.displayName=n_e;var r_e="DropdownMenuSeparator",IB=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Nn(n);return $.jsx(USe,{...i,...r,ref:t})});IB.displayName=r_e;var i_e="DropdownMenuArrow",o_e=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Nn(n);return $.jsx(zSe,{...i,...r,ref:t})});o_e.displayName=i_e;var a_e="DropdownMenuSubTrigger",jB=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Nn(n);return $.jsx(WSe,{...i,...r,ref:t})});jB.displayName=a_e;var s_e="DropdownMenuSubContent",kB=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Nn(n);return $.jsx(HSe,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});kB.displayName=s_e;var u_e=_B,l_e=PB,c_e=EB,DB=CB,LB=TB,FB=MB,BB=$B,UB=RB,zB=NB,WB=IB,HB=jB,KB=kB;const f_e=u_e,d_e=l_e,p_e=A.forwardRef(({className:e,inset:t,children:n,...r},i)=>$.jsxs(HB,{ref:i,className:De("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r,children:[n,$.jsx(SL,{className:"ml-auto"})]}));p_e.displayName=HB.displayName;const h_e=A.forwardRef(({className:e,...t},n)=>$.jsx(KB,{ref:n,className:De("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));h_e.displayName=KB.displayName;const GB=A.forwardRef(({className:e,sideOffset:t=4,...n},r)=>$.jsx(c_e,{children:$.jsx(DB,{ref:r,sideOffset:t,className:De("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));GB.displayName=DB.displayName;const Th=A.forwardRef(({className:e,inset:t,...n},r)=>$.jsx(FB,{ref:r,className:De("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...n}));Th.displayName=FB.displayName;const v_e=A.forwardRef(({className:e,children:t,checked:n,...r},i)=>$.jsxs(BB,{ref:i,className:De("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[$.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:$.jsx(zB,{children:$.jsx(wL,{className:"h-4 w-4"})})}),t]}));v_e.displayName=BB.displayName;const m_e=A.forwardRef(({className:e,children:t,...n},r)=>$.jsxs(UB,{ref:r,className:De("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[$.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:$.jsx(zB,{children:$.jsx(Bbe,{className:"h-2 w-2 fill-current"})})}),t]}));m_e.displayName=UB.displayName;const g_e=A.forwardRef(({className:e,inset:t,...n},r)=>$.jsx(LB,{ref:r,className:De("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));g_e.displayName=LB.displayName;const y_e=A.forwardRef(({className:e,...t},n)=>$.jsx(WB,{ref:n,className:De("-mx-1 my-1 h-px bg-muted",e),...t}));y_e.displayName=WB.displayName;const b_e={theme:"light",setTheme:()=>null},qB=A.createContext(b_e);function w_e({children:e,defaultTheme:t="light",storageKey:n="vite-ui-theme",...r}){const[i,o]=A.useState(()=>localStorage.getItem(n)||t);A.useEffect(()=>{const u=window.document.documentElement;if(u.classList.remove("light","dark"),i==="system"){const l=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";u.classList.add(l);return}u.classList.add(i)},[i]);const a={theme:i,setTheme:u=>{localStorage.setItem(n,u),o(u)}};return $.jsx(qB.Provider,{...r,value:a,children:e})}const x_e=()=>{const e=A.useContext(qB);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};function S_e(){const{setTheme:e}=x_e();return $.jsxs(f_e,{children:[$.jsx(d_e,{asChild:!0,children:$.jsxs(vs,{variant:"outline",size:"icon",children:[$.jsx(Wbe,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),$.jsx(Ube,{className:"absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),$.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),$.jsxs(GB,{align:"end",children:[$.jsx(Th,{onClick:()=>e("light"),children:"Light"}),$.jsx(Th,{onClick:()=>e("dark"),children:"Dark"}),$.jsx(Th,{onClick:()=>e("system"),children:"System"})]})]})}const __e=()=>{const e=ybe(),t=bbe(),n=(a,u)=>{const l=window.URL.createObjectURL(a),f=document.createElement("a");f.href=l,f.setAttribute("download",u),document.body.appendChild(f),f.click(),f.remove(),window.URL.revokeObjectURL(l)},{data:r}=dbe({date:new Date}),{data:i}=mbe(),{data:o}=gbe({n:1});return $.jsxs("div",{className:"max-h-screen max-w-[100vw] md:max-w-[75vw] flex-1 space-y-4 p-4 pt-2 md:p-8",children:[$.jsxs("div",{className:"flex items-center justify-between space-y-2",children:[$.jsx("h2",{className:"text-3xl font-bold tracking-tight",children:"AoA sběr dat - Dashboard"}),$.jsx(S_e,{})]}),$.jsxs("div",{className:"md:space-x-4 flex md:flex-row flex-col items-center justify-center gap-4",children:[$.jsx(vs,{onClick:async()=>{const a=await e.mutateAsync();n(a,"comparisons.csv")},disabled:e.isPending,children:e.isPending?"Stahování...":"Exportovat tabulku porovnání"}),$.jsx(vs,{onClick:async()=>{const a=await t.mutateAsync();n(a,"AoA_word_ratings.csv")},disabled:t.isPending,children:t.isPending?"Stahování...":"Exportovat tabulku slov"})]}),$.jsxs("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:[$.jsx(hb,{value:r&&r[0].count,title:"Počet dnešních porovnání"}),$.jsx(hb,{value:o&&o.wordCount&&(o.wordCount/32e3*100).toFixed(2).toString()+"%",title:"Počet alespoň jednou porovnaných slov"}),$.jsx(hb,{value:i&&i.avg_stdev&&i.avg_stdev.toFixed(2),title:"Průměrná směrodatná odchylka TrueSkill ratingu"})]}),$.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-3 lg:grid-cols-8",children:[$.jsxs("section",{className:"col-span-4 gap-2 flex flex-col",children:[$.jsx(wbe,{}),$.jsx(Sbe,{})]}),$.jsx("section",{className:"col-span-4",children:$.jsx(F1e,{})})]})]})},O_e=new pye;function P_e(){return $.jsx(yye,{client:O_e,children:$.jsx(w_e,{children:$.jsx(__e,{})})})}zI(document.getElementById("root")).render($.jsx(P_e,{}));