diff --git "a/frontend/dist/assets/index-D2ksG3qQ.js" "b/frontend/dist/assets/index-D2ksG3qQ.js" new file mode 100644--- /dev/null +++ "b/frontend/dist/assets/index-D2ksG3qQ.js" @@ -0,0 +1,180 @@ +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var Il=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ae(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var L1={exports:{}},Xs={},R1={exports:{}},se={};/** + * @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 ml=Symbol.for("react.element"),EP=Symbol.for("react.portal"),$P=Symbol.for("react.fragment"),TP=Symbol.for("react.strict_mode"),jP=Symbol.for("react.profiler"),CP=Symbol.for("react.provider"),kP=Symbol.for("react.context"),MP=Symbol.for("react.forward_ref"),NP=Symbol.for("react.suspense"),IP=Symbol.for("react.memo"),DP=Symbol.for("react.lazy"),Dy=Symbol.iterator;function LP(e){return e===null||typeof e!="object"?null:(e=Dy&&e[Dy]||e["@@iterator"],typeof e=="function"?e:null)}var B1={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},z1=Object.assign,F1={};function ga(e,t,r){this.props=e,this.context=t,this.refs=F1,this.updater=r||B1}ga.prototype.isReactComponent={};ga.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")};ga.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function W1(){}W1.prototype=ga.prototype;function Eh(e,t,r){this.props=e,this.context=t,this.refs=F1,this.updater=r||B1}var $h=Eh.prototype=new W1;$h.constructor=Eh;z1($h,ga.prototype);$h.isPureReactComponent=!0;var Ly=Array.isArray,U1=Object.prototype.hasOwnProperty,Th={current:null},H1={key:!0,ref:!0,__self:!0,__source:!0};function V1(e,t,r){var n,i={},a=null,o=null;if(t!=null)for(n in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(a=""+t.key),t)U1.call(t,n)&&!H1.hasOwnProperty(n)&&(i[n]=t[n]);var l=arguments.length-2;if(l===1)i.children=r;else if(1>>1,V=C[Y];if(0>>1;Yi(Se,W))mei(F,Se)?(C[Y]=F,C[me]=W,Y=me):(C[Y]=Se,C[le]=W,Y=le);else if(mei(F,W))C[Y]=F,C[me]=W,Y=me;else break e}}return D}function i(C,D){var W=C.sortIndex-D.sortIndex;return W!==0?W:C.id-D.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var u=[],s=[],f=1,c=null,d=3,p=!1,v=!1,b=!1,w=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function h(C){for(var D=r(s);D!==null;){if(D.callback===null)n(s);else if(D.startTime<=C)n(s),D.sortIndex=D.expirationTime,t(u,D);else break;D=r(s)}}function S(C){if(b=!1,h(C),!v)if(r(u)!==null)v=!0,z(m);else{var D=r(s);D!==null&&U(S,D.startTime-C)}}function m(C,D){v=!1,b&&(b=!1,g(_),_=-1),p=!0;var W=d;try{for(h(D),c=r(u);c!==null&&(!(c.expirationTime>D)||C&&!$());){var Y=c.callback;if(typeof Y=="function"){c.callback=null,d=c.priorityLevel;var V=Y(c.expirationTime<=D);D=e.unstable_now(),typeof V=="function"?c.callback=V:c===r(u)&&n(u),h(D)}else n(u);c=r(u)}if(c!==null)var re=!0;else{var le=r(s);le!==null&&U(S,le.startTime-D),re=!1}return re}finally{c=null,d=W,p=!1}}var x=!1,O=null,_=-1,P=5,T=-1;function $(){return!(e.unstable_now()-TC||125Y?(C.sortIndex=W,t(s,C),r(u)===null&&C===r(s)&&(b?(g(_),_=-1):b=!0,U(S,W-Y))):(C.sortIndex=V,t(u,C),v||p||(v=!0,z(m))),C},e.unstable_shouldYield=$,e.unstable_wrapCallback=function(C){var D=d;return function(){var W=d;d=D;try{return C.apply(this,arguments)}finally{d=W}}}})(Y1);X1.exports=Y1;var qP=X1.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 XP=N,Bt=qP;function G(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ld=Object.prototype.hasOwnProperty,YP=/^[: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]*$/,By={},zy={};function QP(e){return ld.call(zy,e)?!0:ld.call(By,e)?!1:YP.test(e)?zy[e]=!0:(By[e]=!0,!1)}function ZP(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function JP(e,t,r,n){if(t===null||typeof t>"u"||ZP(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.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 Ot(e,t,r,n,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var st={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){st[e]=new Ot(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];st[t]=new Ot(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){st[e]=new Ot(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){st[e]=new Ot(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){st[e]=new Ot(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){st[e]=new Ot(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){st[e]=new Ot(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){st[e]=new Ot(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){st[e]=new Ot(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ch=/[\-:]([a-z])/g;function kh(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(Ch,kh);st[t]=new Ot(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(Ch,kh);st[t]=new Ot(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(Ch,kh);st[t]=new Ot(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){st[e]=new Ot(e,1,!1,e.toLowerCase(),null,!1,!1)});st.xlinkHref=new Ot("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){st[e]=new Ot(e,1,!1,e.toLowerCase(),null,!0,!0)});function Mh(e,t,r,n){var i=st.hasOwnProperty(t)?st[t]:null;(i!==null?i.type!==0:n||!(2l||i[o]!==a[l]){var u=` +`+i[o].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=o&&0<=l);break}}}finally{af=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Za(e):""}function eA(e){switch(e.tag){case 5:return Za(e.type);case 16:return Za("Lazy");case 13:return Za("Suspense");case 19:return Za("SuspenseList");case 0:case 2:case 15:return e=of(e.type,!1),e;case 11:return e=of(e.type.render,!1),e;case 1:return e=of(e.type,!0),e;default:return""}}function fd(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 wi:return"Fragment";case bi:return"Portal";case ud:return"Profiler";case Nh:return"StrictMode";case sd:return"Suspense";case cd:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case J1:return(e.displayName||"Context")+".Consumer";case Z1:return(e._context.displayName||"Context")+".Provider";case Ih:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Dh:return t=e.displayName||null,t!==null?t:fd(e.type)||"Memo";case rn:t=e._payload,e=e._init;try{return fd(e(t))}catch{}}return null}function tA(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 fd(t);case 8:return t===Nh?"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 Sn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function tw(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function rA(e){var t=tw(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,a.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Rl(e){e._valueTracker||(e._valueTracker=rA(e))}function rw(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=tw(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Au(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 dd(e,t){var r=t.checked;return Le({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Wy(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Sn(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function nw(e,t){t=t.checked,t!=null&&Mh(e,"checked",t,!1)}function pd(e,t){nw(e,t);var r=Sn(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?hd(e,t.type,r):t.hasOwnProperty("defaultValue")&&hd(e,t.type,Sn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Uy(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function hd(e,t,r){(t!=="number"||Au(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Ja=Array.isArray;function Ni(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Bl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function wo(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var io={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},nA=["Webkit","ms","Moz","O"];Object.keys(io).forEach(function(e){nA.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),io[t]=io[e]})});function lw(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||io.hasOwnProperty(e)&&io[e]?(""+t).trim():t+"px"}function uw(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=lw(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}var iA=Le({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 md(e,t){if(t){if(iA[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(G(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(G(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(G(61))}if(t.style!=null&&typeof t.style!="object")throw Error(G(62))}}function gd(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 bd=null;function Lh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var wd=null,Ii=null,Di=null;function Gy(e){if(e=wl(e)){if(typeof wd!="function")throw Error(G(280));var t=e.stateNode;t&&(t=ec(t),wd(e.stateNode,e.type,t))}}function sw(e){Ii?Di?Di.push(e):Di=[e]:Ii=e}function cw(){if(Ii){var e=Ii,t=Di;if(Di=Ii=null,Gy(e),t)for(e=0;e>>=0,e===0?32:31-(vA(e)/yA|0)|0}var zl=64,Fl=4194304;function eo(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 ju(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,i=e.suspendedLanes,a=e.pingedLanes,o=r&268435455;if(o!==0){var l=o&~i;l!==0?n=eo(l):(a&=o,a!==0&&(n=eo(a)))}else o=r&~i,o!==0?n=eo(o):a!==0&&(n=eo(a));if(n===0)return 0;if(t!==0&&t!==n&&!(t&i)&&(i=n&-n,a=t&-t,i>=a||i===16&&(a&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function gl(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-yr(t),e[t]=r}function wA(e,t){var r=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 n=e.eventTimes;for(e=e.expirationTimes;0=oo),tm=" ",rm=!1;function jw(e,t){switch(e){case"keyup":return qA.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Cw(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var xi=!1;function YA(e,t){switch(e){case"compositionend":return Cw(t);case"keypress":return t.which!==32?null:(rm=!0,tm);case"textInput":return e=t.data,e===tm&&rm?null:e;default:return null}}function QA(e,t){if(xi)return e==="compositionend"||!Vh&&jw(e,t)?(e=$w(),mu=Wh=sn=null,xi=!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:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=om(r)}}function Iw(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Iw(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Dw(){for(var e=window,t=Au();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Au(e.document)}return t}function Gh(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 oE(e){var t=Dw(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&Iw(r.ownerDocument.documentElement,r)){if(n!==null&&Gh(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=r.textContent.length,a=Math.min(n.start,i);n=n.end===void 0?a:Math.min(n.end,i),!e.extend&&a>n&&(i=n,n=a,a=i),i=lm(r,a);var o=lm(r,n);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>n?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,Si=null,Ad=null,uo=null,Ed=!1;function um(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Ed||Si==null||Si!==Au(n)||(n=Si,"selectionStart"in n&&Gh(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),uo&&Ao(uo,n)||(uo=n,n=Mu(Ad,"onSelect"),0Pi||(e.current=Md[Pi],Md[Pi]=null,Pi--)}function $e(e,t){Pi++,Md[Pi]=e.current,e.current=t}var On={},yt=Pn(On),$t=Pn(!1),Qn=On;function Hi(e,t){var r=e.type.contextTypes;if(!r)return On;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in r)i[a]=t[a];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Tt(e){return e=e.childContextTypes,e!=null}function Iu(){ke($t),ke(yt)}function vm(e,t,r){if(yt.current!==On)throw Error(G(168));$e(yt,t),$e($t,r)}function Vw(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in t))throw Error(G(108,tA(e)||"Unknown",i));return Le({},r,n)}function Du(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||On,Qn=yt.current,$e(yt,e),$e($t,$t.current),!0}function ym(e,t,r){var n=e.stateNode;if(!n)throw Error(G(169));r?(e=Vw(e,t,Qn),n.__reactInternalMemoizedMergedChildContext=e,ke($t),ke(yt),$e(yt,e)):ke($t),$e($t,r)}var Mr=null,tc=!1,wf=!1;function Gw(e){Mr===null?Mr=[e]:Mr.push(e)}function gE(e){tc=!0,Gw(e)}function An(){if(!wf&&Mr!==null){wf=!0;var e=0,t=we;try{var r=Mr;for(we=1;e>=o,i-=o,Nr=1<<32-yr(t)+i|r<_?(P=O,O=null):P=O.sibling;var T=d(g,O,h[_],S);if(T===null){O===null&&(O=P);break}e&&O&&T.alternate===null&&t(g,O),y=a(T,y,_),x===null?m=T:x.sibling=T,x=T,O=P}if(_===h.length)return r(g,O),Me&&Nn(g,_),m;if(O===null){for(;__?(P=O,O=null):P=O.sibling;var $=d(g,O,T.value,S);if($===null){O===null&&(O=P);break}e&&O&&$.alternate===null&&t(g,O),y=a($,y,_),x===null?m=$:x.sibling=$,x=$,O=P}if(T.done)return r(g,O),Me&&Nn(g,_),m;if(O===null){for(;!T.done;_++,T=h.next())T=c(g,T.value,S),T!==null&&(y=a(T,y,_),x===null?m=T:x.sibling=T,x=T);return Me&&Nn(g,_),m}for(O=n(g,O);!T.done;_++,T=h.next())T=p(O,g,_,T.value,S),T!==null&&(e&&T.alternate!==null&&O.delete(T.key===null?_:T.key),y=a(T,y,_),x===null?m=T:x.sibling=T,x=T);return e&&O.forEach(function(j){return t(g,j)}),Me&&Nn(g,_),m}function w(g,y,h,S){if(typeof h=="object"&&h!==null&&h.type===wi&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case Ll:e:{for(var m=h.key,x=y;x!==null;){if(x.key===m){if(m=h.type,m===wi){if(x.tag===7){r(g,x.sibling),y=i(x,h.props.children),y.return=g,g=y;break e}}else if(x.elementType===m||typeof m=="object"&&m!==null&&m.$$typeof===rn&&bm(m)===x.type){r(g,x.sibling),y=i(x,h.props),y.ref=Ba(g,x,h),y.return=g,g=y;break e}r(g,x);break}else t(g,x);x=x.sibling}h.type===wi?(y=Kn(h.props.children,g.mode,S,h.key),y.return=g,g=y):(S=Pu(h.type,h.key,h.props,null,g.mode,S),S.ref=Ba(g,y,h),S.return=g,g=S)}return o(g);case bi:e:{for(x=h.key;y!==null;){if(y.key===x)if(y.tag===4&&y.stateNode.containerInfo===h.containerInfo&&y.stateNode.implementation===h.implementation){r(g,y.sibling),y=i(y,h.children||[]),y.return=g,g=y;break e}else{r(g,y);break}else t(g,y);y=y.sibling}y=$f(h,g.mode,S),y.return=g,g=y}return o(g);case rn:return x=h._init,w(g,y,x(h._payload),S)}if(Ja(h))return v(g,y,h,S);if(Na(h))return b(g,y,h,S);ql(g,h)}return typeof h=="string"&&h!==""||typeof h=="number"?(h=""+h,y!==null&&y.tag===6?(r(g,y.sibling),y=i(y,h),y.return=g,g=y):(r(g,y),y=Ef(h,g.mode,S),y.return=g,g=y),o(g)):r(g,y)}return w}var Gi=Yw(!0),Qw=Yw(!1),Bu=Pn(null),zu=null,$i=null,Yh=null;function Qh(){Yh=$i=zu=null}function Zh(e){var t=Bu.current;ke(Bu),e._currentValue=t}function Dd(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Ri(e,t){zu=e,Yh=$i=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(At=!0),e.firstContext=null)}function er(e){var t=e._currentValue;if(Yh!==e)if(e={context:e,memoizedValue:t,next:null},$i===null){if(zu===null)throw Error(G(308));$i=e,zu.dependencies={lanes:0,firstContext:e}}else $i=$i.next=e;return t}var zn=null;function Jh(e){zn===null?zn=[e]:zn.push(e)}function Zw(e,t,r,n){var i=t.interleaved;return i===null?(r.next=r,Jh(t)):(r.next=i.next,i.next=r),t.interleaved=r,Vr(e,n)}function Vr(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var nn=!1;function ev(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Jw(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 Br(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function yn(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,pe&2){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,Vr(e,r)}return i=n.interleaved,i===null?(t.next=t,Jh(n)):(t.next=i.next,i.next=t),n.interleaved=t,Vr(e,r)}function bu(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Bh(e,r)}}function wm(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,a=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};a===null?i=a=o:a=a.next=o,r=r.next}while(r!==null);a===null?i=a=t:a=a.next=t}else i=a=t;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Fu(e,t,r,n){var i=e.updateQueue;nn=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var u=l,s=u.next;u.next=null,o===null?a=s:o.next=s,o=u;var f=e.alternate;f!==null&&(f=f.updateQueue,l=f.lastBaseUpdate,l!==o&&(l===null?f.firstBaseUpdate=s:l.next=s,f.lastBaseUpdate=u))}if(a!==null){var c=i.baseState;o=0,f=s=u=null,l=a;do{var d=l.lane,p=l.eventTime;if((n&d)===d){f!==null&&(f=f.next={eventTime:p,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var v=e,b=l;switch(d=t,p=r,b.tag){case 1:if(v=b.payload,typeof v=="function"){c=v.call(p,c,d);break e}c=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=b.payload,d=typeof v=="function"?v.call(p,c,d):v,d==null)break e;c=Le({},c,d);break e;case 2:nn=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,d=i.effects,d===null?i.effects=[l]:d.push(l))}else p={eventTime:p,lane:d,tag:l.tag,payload:l.payload,callback:l.callback,next:null},f===null?(s=f=p,u=c):f=f.next=p,o|=d;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;d=l,l=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);if(f===null&&(u=c),i.baseState=u,i.firstBaseUpdate=s,i.lastBaseUpdate=f,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);ei|=o,e.lanes=o,e.memoizedState=c}}function xm(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;tr?r:4,e(!0);var n=Sf.transition;Sf.transition={};try{e(!1),t()}finally{we=r,Sf.transition=n}}function yx(){return tr().memoizedState}function SE(e,t,r){var n=gn(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},mx(e))gx(t,r);else if(r=Zw(e,t,r,n),r!==null){var i=xt();mr(r,e,n,i),bx(r,t,n)}}function OE(e,t,r){var n=gn(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(mx(e))gx(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,l=a(o,r);if(i.hasEagerState=!0,i.eagerState=l,gr(l,o)){var u=t.interleaved;u===null?(i.next=i,Jh(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}r=Zw(e,t,i,n),r!==null&&(i=xt(),mr(r,e,n,i),bx(r,t,n))}}function mx(e){var t=e.alternate;return e===De||t!==null&&t===De}function gx(e,t){so=Uu=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function bx(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Bh(e,r)}}var Hu={readContext:er,useCallback:ct,useContext:ct,useEffect:ct,useImperativeHandle:ct,useInsertionEffect:ct,useLayoutEffect:ct,useMemo:ct,useReducer:ct,useRef:ct,useState:ct,useDebugValue:ct,useDeferredValue:ct,useTransition:ct,useMutableSource:ct,useSyncExternalStore:ct,useId:ct,unstable_isNewReconciler:!1},_E={readContext:er,useCallback:function(e,t){return xr().memoizedState=[e,t===void 0?null:t],e},useContext:er,useEffect:Om,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,xu(4194308,4,fx.bind(null,t,e),r)},useLayoutEffect:function(e,t){return xu(4194308,4,e,t)},useInsertionEffect:function(e,t){return xu(4,2,e,t)},useMemo:function(e,t){var r=xr();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=xr();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=SE.bind(null,De,e),[n.memoizedState,e]},useRef:function(e){var t=xr();return e={current:e},t.memoizedState=e},useState:Sm,useDebugValue:uv,useDeferredValue:function(e){return xr().memoizedState=e},useTransition:function(){var e=Sm(!1),t=e[0];return e=xE.bind(null,e[1]),xr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=De,i=xr();if(Me){if(r===void 0)throw Error(G(407));r=r()}else{if(r=t(),rt===null)throw Error(G(349));Jn&30||nx(n,t,r)}i.memoizedState=r;var a={value:r,getSnapshot:t};return i.queue=a,Om(ax.bind(null,n,a,e),[e]),n.flags|=2048,No(9,ix.bind(null,n,a,r,t),void 0,null),r},useId:function(){var e=xr(),t=rt.identifierPrefix;if(Me){var r=Ir,n=Nr;r=(n&~(1<<32-yr(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=ko++,0<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(r,{is:n.is}):(e=o.createElement(r),r==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,r),e[Or]=t,e[To]=n,Tx(e,t,!1,!1),t.stateNode=e;e:{switch(o=gd(r,n),r){case"dialog":Te("cancel",e),Te("close",e),i=n;break;case"iframe":case"object":case"embed":Te("load",e),i=n;break;case"video":case"audio":for(i=0;iXi&&(t.flags|=128,n=!0,za(a,!1),t.lanes=4194304)}else{if(!n)if(e=Wu(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),za(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!Me)return ft(t),null}else 2*Fe()-a.renderingStartTime>Xi&&r!==1073741824&&(t.flags|=128,n=!0,za(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(r=a.last,r!==null?r.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Fe(),t.sibling=null,r=Ie.current,$e(Ie,n?r&1|2:r&1),t):(ft(t),null);case 22:case 23:return hv(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Nt&1073741824&&(ft(t),t.subtreeFlags&6&&(t.flags|=8192)):ft(t),null;case 24:return null;case 25:return null}throw Error(G(156,t.tag))}function kE(e,t){switch(qh(t),t.tag){case 1:return Tt(t.type)&&Iu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ki(),ke($t),ke(yt),nv(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return rv(t),null;case 13:if(ke(Ie),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(G(340));Vi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ke(Ie),null;case 4:return Ki(),null;case 10:return Zh(t.type._context),null;case 22:case 23:return hv(),null;case 24:return null;default:return null}}var Yl=!1,pt=!1,ME=typeof WeakSet=="function"?WeakSet:Set,Z=null;function Ti(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Re(e,t,n)}else r.current=null}function Vd(e,t,r){try{r()}catch(n){Re(e,t,n)}}var Nm=!1;function NE(e,t){if($d=Cu,e=Dw(),Gh(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,a=n.focusNode;n=n.focusOffset;try{r.nodeType,a.nodeType}catch{r=null;break e}var o=0,l=-1,u=-1,s=0,f=0,c=e,d=null;t:for(;;){for(var p;c!==r||i!==0&&c.nodeType!==3||(l=o+i),c!==a||n!==0&&c.nodeType!==3||(u=o+n),c.nodeType===3&&(o+=c.nodeValue.length),(p=c.firstChild)!==null;)d=c,c=p;for(;;){if(c===e)break t;if(d===r&&++s===i&&(l=o),d===a&&++f===n&&(u=o),(p=c.nextSibling)!==null)break;c=d,d=c.parentNode}c=p}r=l===-1||u===-1?null:{start:l,end:u}}else r=null}r=r||{start:0,end:0}}else r=null;for(Td={focusedElem:e,selectionRange:r},Cu=!1,Z=t;Z!==null;)if(t=Z,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Z=e;else for(;Z!==null;){t=Z;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var b=v.memoizedProps,w=v.memoizedState,g=t.stateNode,y=g.getSnapshotBeforeUpdate(t.elementType===t.type?b:ur(t.type,b),w);g.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var h=t.stateNode.containerInfo;h.nodeType===1?h.textContent="":h.nodeType===9&&h.documentElement&&h.removeChild(h.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(G(163))}}catch(S){Re(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,Z=e;break}Z=t.return}return v=Nm,Nm=!1,v}function co(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&Vd(t,r,a)}i=i.next}while(i!==n)}}function ic(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function Gd(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function kx(e){var t=e.alternate;t!==null&&(e.alternate=null,kx(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Or],delete t[To],delete t[kd],delete t[yE],delete t[mE])),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 Mx(e){return e.tag===5||e.tag===3||e.tag===4}function Im(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Mx(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 Kd(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Nu));else if(n!==4&&(e=e.child,e!==null))for(Kd(e,t,r),e=e.sibling;e!==null;)Kd(e,t,r),e=e.sibling}function qd(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(qd(e,t,r),e=e.sibling;e!==null;)qd(e,t,r),e=e.sibling}var at=null,sr=!1;function tn(e,t,r){for(r=r.child;r!==null;)Nx(e,t,r),r=r.sibling}function Nx(e,t,r){if(Pr&&typeof Pr.onCommitFiberUnmount=="function")try{Pr.onCommitFiberUnmount(Ys,r)}catch{}switch(r.tag){case 5:pt||Ti(r,t);case 6:var n=at,i=sr;at=null,tn(e,t,r),at=n,sr=i,at!==null&&(sr?(e=at,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):at.removeChild(r.stateNode));break;case 18:at!==null&&(sr?(e=at,r=r.stateNode,e.nodeType===8?bf(e.parentNode,r):e.nodeType===1&&bf(e,r),_o(e)):bf(at,r.stateNode));break;case 4:n=at,i=sr,at=r.stateNode.containerInfo,sr=!0,tn(e,t,r),at=n,sr=i;break;case 0:case 11:case 14:case 15:if(!pt&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&Vd(r,t,o),i=i.next}while(i!==n)}tn(e,t,r);break;case 1:if(!pt&&(Ti(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(l){Re(r,t,l)}tn(e,t,r);break;case 21:tn(e,t,r);break;case 22:r.mode&1?(pt=(n=pt)||r.memoizedState!==null,tn(e,t,r),pt=n):tn(e,t,r);break;default:tn(e,t,r)}}function Dm(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new ME),t.forEach(function(n){var i=UE.bind(null,e,n);r.has(n)||(r.add(n),n.then(i,i))})}}function or(e,t){var r=t.deletions;if(r!==null)for(var n=0;ni&&(i=o),n&=~a}if(n=i,n=Fe()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*DE(n/1960))-n,10e?16:e,cn===null)var n=!1;else{if(e=cn,cn=null,Ku=0,pe&6)throw Error(G(331));var i=pe;for(pe|=4,Z=e.current;Z!==null;){var a=Z,o=a.child;if(Z.flags&16){var l=a.deletions;if(l!==null){for(var u=0;uFe()-dv?Gn(e,0):fv|=r),jt(e,t)}function Wx(e,t){t===0&&(e.mode&1?(t=Fl,Fl<<=1,!(Fl&130023424)&&(Fl=4194304)):t=1);var r=xt();e=Vr(e,t),e!==null&&(gl(e,t,r),jt(e,r))}function WE(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Wx(e,r)}function UE(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(G(314))}n!==null&&n.delete(t),Wx(e,r)}var Ux;Ux=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||$t.current)At=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return At=!1,jE(e,t,r);At=!!(e.flags&131072)}else At=!1,Me&&t.flags&1048576&&Kw(t,Ru,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Su(e,t),e=t.pendingProps;var i=Hi(t,yt.current);Ri(t,r),i=av(null,t,n,e,i,r);var a=ov();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,Tt(n)?(a=!0,Du(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,ev(t),i.updater=nc,t.stateNode=i,i._reactInternals=t,Rd(t,n,e,r),t=Fd(null,t,n,!0,a,r)):(t.tag=0,Me&&a&&Kh(t),bt(null,t,i,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Su(e,t),e=t.pendingProps,i=n._init,n=i(n._payload),t.type=n,i=t.tag=VE(n),e=ur(n,e),i){case 0:t=zd(null,t,n,e,r);break e;case 1:t=Cm(null,t,n,e,r);break e;case 11:t=Tm(null,t,n,e,r);break e;case 14:t=jm(null,t,n,ur(n.type,e),r);break e}throw Error(G(306,n,""))}return t;case 0:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:ur(n,i),zd(e,t,n,i,r);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:ur(n,i),Cm(e,t,n,i,r);case 3:e:{if(Ax(t),e===null)throw Error(G(387));n=t.pendingProps,a=t.memoizedState,i=a.element,Jw(e,t),Fu(t,n,null,r);var o=t.memoizedState;if(n=o.element,a.isDehydrated)if(a={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){i=qi(Error(G(423)),t),t=km(e,t,n,r,i);break e}else if(n!==i){i=qi(Error(G(424)),t),t=km(e,t,n,r,i);break e}else for(Lt=vn(t.stateNode.containerInfo.firstChild),Rt=t,Me=!0,dr=null,r=Qw(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Vi(),n===i){t=Gr(e,t,r);break e}bt(e,t,n,r)}t=t.child}return t;case 5:return ex(t),e===null&&Id(t),n=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,o=i.children,jd(n,i)?o=null:a!==null&&jd(n,a)&&(t.flags|=32),Px(e,t),bt(e,t,o,r),t.child;case 6:return e===null&&Id(t),null;case 13:return Ex(e,t,r);case 4:return tv(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Gi(t,null,n,r):bt(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:ur(n,i),Tm(e,t,n,i,r);case 7:return bt(e,t,t.pendingProps,r),t.child;case 8:return bt(e,t,t.pendingProps.children,r),t.child;case 12:return bt(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,i=t.pendingProps,a=t.memoizedProps,o=i.value,$e(Bu,n._currentValue),n._currentValue=o,a!==null)if(gr(a.value,o)){if(a.children===i.children&&!$t.current){t=Gr(e,t,r);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var l=a.dependencies;if(l!==null){o=a.child;for(var u=l.firstContext;u!==null;){if(u.context===n){if(a.tag===1){u=Br(-1,r&-r),u.tag=2;var s=a.updateQueue;if(s!==null){s=s.shared;var f=s.pending;f===null?u.next=u:(u.next=f.next,f.next=u),s.pending=u}}a.lanes|=r,u=a.alternate,u!==null&&(u.lanes|=r),Dd(a.return,r,t),l.lanes|=r;break}u=u.next}}else if(a.tag===10)o=a.type===t.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(G(341));o.lanes|=r,l=o.alternate,l!==null&&(l.lanes|=r),Dd(o,r,t),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===t){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}bt(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,n=t.pendingProps.children,Ri(t,r),i=er(i),n=n(i),t.flags|=1,bt(e,t,n,r),t.child;case 14:return n=t.type,i=ur(n,t.pendingProps),i=ur(n.type,i),jm(e,t,n,i,r);case 15:return Ox(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:ur(n,i),Su(e,t),t.tag=1,Tt(n)?(e=!0,Du(t)):e=!1,Ri(t,r),wx(t,n,i),Rd(t,n,i,r),Fd(null,t,n,!0,e,r);case 19:return $x(e,t,r);case 22:return _x(e,t,r)}throw Error(G(156,t.tag))};function Hx(e,t){return mw(e,t)}function HE(e,t,r,n){this.tag=e,this.key=r,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=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xt(e,t,r,n){return new HE(e,t,r,n)}function yv(e){return e=e.prototype,!(!e||!e.isReactComponent)}function VE(e){if(typeof e=="function")return yv(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ih)return 11;if(e===Dh)return 14}return 2}function bn(e,t){var r=e.alternate;return r===null?(r=Xt(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Pu(e,t,r,n,i,a){var o=2;if(n=e,typeof e=="function")yv(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case wi:return Kn(r.children,i,a,t);case Nh:o=8,i|=8;break;case ud:return e=Xt(12,r,t,i|2),e.elementType=ud,e.lanes=a,e;case sd:return e=Xt(13,r,t,i),e.elementType=sd,e.lanes=a,e;case cd:return e=Xt(19,r,t,i),e.elementType=cd,e.lanes=a,e;case ew:return oc(r,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Z1:o=10;break e;case J1:o=9;break e;case Ih:o=11;break e;case Dh:o=14;break e;case rn:o=16,n=null;break e}throw Error(G(130,e==null?e:typeof e,""))}return t=Xt(o,r,t,i),t.elementType=e,t.type=n,t.lanes=a,t}function Kn(e,t,r,n){return e=Xt(7,e,n,t),e.lanes=r,e}function oc(e,t,r,n){return e=Xt(22,e,n,t),e.elementType=ew,e.lanes=r,e.stateNode={isHidden:!1},e}function Ef(e,t,r){return e=Xt(6,e,null,t),e.lanes=r,e}function $f(e,t,r){return t=Xt(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function GE(e,t,r,n,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=uf(0),this.expirationTimes=uf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=uf(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function mv(e,t,r,n,i,a,o,l,u){return e=new GE(e,t,r,l,u),t===1?(t=1,a===!0&&(t|=8)):t=0,a=Xt(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},ev(a),e}function KE(e,t,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(qx)}catch(e){console.error(e)}}qx(),q1.exports=Ft;var ZE=q1.exports,Hm=ZE;od.createRoot=Hm.createRoot,od.hydrateRoot=Hm.hydrateRoot;const ro="http://localhost:7860";console.log(`API Server URL: ${ro}`);class fc{static async fetchIndex(){const t=await fetch(ro+"/");if(!t.ok)throw new Error("Failed to fetch index.html");return t.text()}static async fetchStaticFile(t){const r=await fetch(`${ro}/${t}`);if(!r.ok)throw new Error(`Failed to fetch ${t}`);return r.text()}static fetchExamplesByType(t){return fetch(`${ro}/examples/${t}`).then(r=>{if(!r.ok)throw new Error(`Failed to fetch examples of type ${t}`);return r.json()})}static getProxiedUrl(t){return`${ro}/proxy/${encodeURIComponent(t)}`}}function ot(e,t,r,n){return new(r||(r=Promise))(function(i,a){function o(s){try{u(n.next(s))}catch(f){a(f)}}function l(s){try{u(n.throw(s))}catch(f){a(f)}}function u(s){var f;s.done?i(s.value):(f=s.value,f instanceof r?f:new r(function(c){c(f)})).then(o,l)}u((n=n.apply(e,t||[])).next())})}let Sl=class{constructor(){this.listeners={}}on(t,r,n){if(this.listeners[t]||(this.listeners[t]=new Set),this.listeners[t].add(r),n==null?void 0:n.once){const i=()=>{this.un(t,i),this.un(t,r)};return this.on(t,i),i}return()=>this.un(t,r)}un(t,r){var n;(n=this.listeners[t])===null||n===void 0||n.delete(r)}once(t,r){return this.on(t,r,{once:!0})}unAll(){this.listeners={}}emit(t,...r){this.listeners[t]&&this.listeners[t].forEach(n=>n(...r))}};const Jl={decode:function(e,t){return ot(this,void 0,void 0,function*(){const r=new AudioContext({sampleRate:t});return r.decodeAudioData(e).finally(()=>r.close())})},createBuffer:function(e,t){return typeof e[0]=="number"&&(e=[e]),function(r){const n=r[0];if(n.some(i=>i>1||i<-1)){const i=n.length;let a=0;for(let o=0;oa&&(a=l)}for(const o of r)for(let l=0;le==null?void 0:e[r],copyFromChannel:AudioBuffer.prototype.copyFromChannel,copyToChannel:AudioBuffer.prototype.copyToChannel}}};function Xx(e,t){const r=t.xmlns?document.createElementNS(t.xmlns,e):document.createElement(e);for(const[n,i]of Object.entries(t))if(n==="children")for(const[a,o]of Object.entries(t))typeof o=="string"?r.appendChild(document.createTextNode(o)):r.appendChild(Xx(a,o));else n==="style"?Object.assign(r.style,i):n==="textContent"?r.textContent=i:r.setAttribute(n,i.toString());return r}function Vm(e,t,r){const n=Xx(e,t||{});return r==null||r.appendChild(n),n}var JE=Object.freeze({__proto__:null,createElement:Vm,default:Vm});const e$={fetchBlob:function(e,t,r){return ot(this,void 0,void 0,function*(){const n=yield fetch(e,r);if(n.status>=400)throw new Error(`Failed to fetch ${e}: ${n.status} (${n.statusText})`);return function(i,a){ot(this,void 0,void 0,function*(){if(!i.body||!i.headers)return;const o=i.body.getReader(),l=Number(i.headers.get("Content-Length"))||0;let u=0;const s=c=>ot(this,void 0,void 0,function*(){u+=(c==null?void 0:c.length)||0;const d=Math.round(u/l*100);a(d)}),f=()=>ot(this,void 0,void 0,function*(){let c;try{c=yield o.read()}catch{return}c.done||(s(c.value),yield f())});f()})}(n.clone(),t),n.blob()})}};let t$=class extends Sl{constructor(t){super(),this.isExternalMedia=!1,t.media?(this.media=t.media,this.isExternalMedia=!0):this.media=document.createElement("audio"),t.mediaControls&&(this.media.controls=!0),t.autoplay&&(this.media.autoplay=!0),t.playbackRate!=null&&this.onMediaEvent("canplay",()=>{t.playbackRate!=null&&(this.media.playbackRate=t.playbackRate)},{once:!0})}onMediaEvent(t,r,n){return this.media.addEventListener(t,r,n),()=>this.media.removeEventListener(t,r,n)}getSrc(){return this.media.currentSrc||this.media.src||""}revokeSrc(){const t=this.getSrc();t.startsWith("blob:")&&URL.revokeObjectURL(t)}canPlayType(t){return this.media.canPlayType(t)!==""}setSrc(t,r){const n=this.getSrc();if(t&&n===t)return;this.revokeSrc();const i=r instanceof Blob&&(this.canPlayType(r.type)||!t)?URL.createObjectURL(r):t;n&&(this.media.src="");try{this.media.src=i}catch{this.media.src=t}}destroy(){this.isExternalMedia||(this.media.pause(),this.media.remove(),this.revokeSrc(),this.media.src="",this.media.load())}setMediaElement(t){this.media=t}play(){return ot(this,void 0,void 0,function*(){return this.media.play()})}pause(){this.media.pause()}isPlaying(){return!this.media.paused&&!this.media.ended}setTime(t){this.media.currentTime=Math.max(0,Math.min(t,this.getDuration()))}getDuration(){return this.media.duration}getCurrentTime(){return this.media.currentTime}getVolume(){return this.media.volume}setVolume(t){this.media.volume=t}getMuted(){return this.media.muted}setMuted(t){this.media.muted=t}getPlaybackRate(){return this.media.playbackRate}isSeeking(){return this.media.seeking}setPlaybackRate(t,r){r!=null&&(this.media.preservesPitch=r),this.media.playbackRate=t}getMediaElement(){return this.media}setSinkId(t){return this.media.setSinkId(t)}},Jd=class ep extends Sl{constructor(t,r){super(),this.timeouts=[],this.isScrollable=!1,this.audioData=null,this.resizeObserver=null,this.lastContainerWidth=0,this.isDragging=!1,this.subscriptions=[],this.unsubscribeOnScroll=[],this.subscriptions=[],this.options=t;const n=this.parentFromOptionsContainer(t.container);this.parent=n;const[i,a]=this.initHtml();n.appendChild(i),this.container=i,this.scrollContainer=a.querySelector(".scroll"),this.wrapper=a.querySelector(".wrapper"),this.canvasWrapper=a.querySelector(".canvases"),this.progressWrapper=a.querySelector(".progress"),this.cursor=a.querySelector(".cursor"),r&&a.appendChild(r),this.initEvents()}parentFromOptionsContainer(t){let r;if(typeof t=="string"?r=document.querySelector(t):t instanceof HTMLElement&&(r=t),!r)throw new Error("Container not found");return r}initEvents(){const t=r=>{const n=this.wrapper.getBoundingClientRect(),i=r.clientX-n.left,a=r.clientY-n.top;return[i/n.width,a/n.height]};if(this.wrapper.addEventListener("click",r=>{const[n,i]=t(r);this.emit("click",n,i)}),this.wrapper.addEventListener("dblclick",r=>{const[n,i]=t(r);this.emit("dblclick",n,i)}),this.options.dragToSeek!==!0&&typeof this.options.dragToSeek!="object"||this.initDrag(),this.scrollContainer.addEventListener("scroll",()=>{const{scrollLeft:r,scrollWidth:n,clientWidth:i}=this.scrollContainer,a=r/n,o=(r+i)/n;this.emit("scroll",a,o,r,r+i)}),typeof ResizeObserver=="function"){const r=this.createDelay(100);this.resizeObserver=new ResizeObserver(()=>{r().then(()=>this.onContainerResize()).catch(()=>{})}),this.resizeObserver.observe(this.scrollContainer)}}onContainerResize(){const t=this.parent.clientWidth;t===this.lastContainerWidth&&this.options.height!=="auto"||(this.lastContainerWidth=t,this.reRender())}initDrag(){this.subscriptions.push(function(t,r,n,i,a=3,o=0,l=100){if(!t)return()=>{};const u=matchMedia("(pointer: coarse)").matches;let s=()=>{};const f=c=>{if(c.button!==o)return;c.preventDefault(),c.stopPropagation();let d=c.clientX,p=c.clientY,v=!1;const b=Date.now(),w=m=>{if(m.preventDefault(),m.stopPropagation(),u&&Date.now()-ba||Math.abs(P)>a){const T=t.getBoundingClientRect(),{left:$,top:j}=T;v||(n==null||n(d-$,p-j),v=!0),r(_,P,x-$,O-j),d=x,p=O}},g=m=>{if(v){const x=m.clientX,O=m.clientY,_=t.getBoundingClientRect(),{left:P,top:T}=_;i==null||i(x-P,O-T)}s()},y=m=>{m.relatedTarget&&m.relatedTarget!==document.documentElement||g(m)},h=m=>{v&&(m.stopPropagation(),m.preventDefault())},S=m=>{v&&m.preventDefault()};document.addEventListener("pointermove",w),document.addEventListener("pointerup",g),document.addEventListener("pointerout",y),document.addEventListener("pointercancel",y),document.addEventListener("touchmove",S,{passive:!1}),document.addEventListener("click",h,{capture:!0}),s=()=>{document.removeEventListener("pointermove",w),document.removeEventListener("pointerup",g),document.removeEventListener("pointerout",y),document.removeEventListener("pointercancel",y),document.removeEventListener("touchmove",S),setTimeout(()=>{document.removeEventListener("click",h,{capture:!0})},10)}};return t.addEventListener("pointerdown",f),()=>{s(),t.removeEventListener("pointerdown",f)}}(this.wrapper,(t,r,n)=>{this.emit("drag",Math.max(0,Math.min(1,n/this.wrapper.getBoundingClientRect().width)))},t=>{this.isDragging=!0,this.emit("dragstart",Math.max(0,Math.min(1,t/this.wrapper.getBoundingClientRect().width)))},t=>{this.isDragging=!1,this.emit("dragend",Math.max(0,Math.min(1,t/this.wrapper.getBoundingClientRect().width)))}))}getHeight(t,r){var n;const i=((n=this.audioData)===null||n===void 0?void 0:n.numberOfChannels)||1;if(t==null)return 128;if(!isNaN(Number(t)))return Number(t);if(t==="auto"){const a=this.parent.clientHeight||128;return r!=null&&r.every(o=>!o.overlay)?a/i:a}return 128}initHtml(){const t=document.createElement("div"),r=t.attachShadow({mode:"open"}),n=this.options.cspNonce&&typeof this.options.cspNonce=="string"?this.options.cspNonce.replace(/"/g,""):"";return r.innerHTML=` + + :host { + user-select: none; + min-width: 1px; + } + :host audio { + display: block; + width: 100%; + } + :host .scroll { + overflow-x: auto; + overflow-y: hidden; + width: 100%; + position: relative; + } + :host .noScrollbar { + scrollbar-color: transparent; + scrollbar-width: none; + } + :host .noScrollbar::-webkit-scrollbar { + display: none; + -webkit-appearance: none; + } + :host .wrapper { + position: relative; + overflow: visible; + z-index: 2; + } + :host .canvases { + min-height: ${this.getHeight(this.options.height,this.options.splitChannels)}px; + } + :host .canvases > div { + position: relative; + } + :host canvas { + display: block; + position: absolute; + top: 0; + image-rendering: pixelated; + } + :host .progress { + pointer-events: none; + position: absolute; + z-index: 2; + top: 0; + left: 0; + width: 0; + height: 100%; + overflow: hidden; + } + :host .progress > div { + position: relative; + } + :host .cursor { + pointer-events: none; + position: absolute; + z-index: 5; + top: 0; + left: 0; + height: 100%; + border-radius: 2px; + } + + +
+
+
+
+
+
+
+ `,[t,r]}setOptions(t){if(this.options.container!==t.container){const r=this.parentFromOptionsContainer(t.container);r.appendChild(this.container),this.parent=r}t.dragToSeek!==!0&&typeof this.options.dragToSeek!="object"||this.initDrag(),this.options=t,this.reRender()}getWrapper(){return this.wrapper}getWidth(){return this.scrollContainer.clientWidth}getScroll(){return this.scrollContainer.scrollLeft}setScroll(t){this.scrollContainer.scrollLeft=t}setScrollPercentage(t){const{scrollWidth:r}=this.scrollContainer,n=r*t;this.setScroll(n)}destroy(){var t,r;this.subscriptions.forEach(n=>n()),this.container.remove(),(t=this.resizeObserver)===null||t===void 0||t.disconnect(),(r=this.unsubscribeOnScroll)===null||r===void 0||r.forEach(n=>n()),this.unsubscribeOnScroll=[]}createDelay(t=10){let r,n;const i=()=>{r&&clearTimeout(r),n&&n()};return this.timeouts.push(i),()=>new Promise((a,o)=>{i(),n=o,r=setTimeout(()=>{r=void 0,n=void 0,a()},t)})}convertColorValues(t){if(!Array.isArray(t))return t||"";if(t.length<2)return t[0]||"";const r=document.createElement("canvas"),n=r.getContext("2d"),i=r.height*(window.devicePixelRatio||1),a=n.createLinearGradient(0,0,0,i),o=1/(t.length-1);return t.forEach((l,u)=>{const s=u*o;a.addColorStop(s,l)}),a}getPixelRatio(){return Math.max(1,window.devicePixelRatio||1)}renderBarWaveform(t,r,n,i){const a=t[0],o=t[1]||t[0],l=a.length,{width:u,height:s}=n.canvas,f=s/2,c=this.getPixelRatio(),d=r.barWidth?r.barWidth*c:1,p=r.barGap?r.barGap*c:r.barWidth?d/2:0,v=r.barRadius||0,b=u/(d+p)/l,w=v&&"roundRect"in n?"roundRect":"rect";n.beginPath();let g=0,y=0,h=0;for(let S=0;S<=l;S++){const m=Math.round(S*b);if(m>g){const _=Math.round(y*f*i),P=_+Math.round(h*f*i)||1;let T=f-_;r.barAlign==="top"?T=0:r.barAlign==="bottom"&&(T=s-P),n[w](g*(d+p),T,d,P,v),g=m,y=0,h=0}const x=Math.abs(a[S]||0),O=Math.abs(o[S]||0);x>y&&(y=x),O>h&&(h=O)}n.fill(),n.closePath()}renderLineWaveform(t,r,n,i){const a=o=>{const l=t[o]||t[0],u=l.length,{height:s}=n.canvas,f=s/2,c=n.canvas.width/u;n.moveTo(0,f);let d=0,p=0;for(let v=0;v<=u;v++){const b=Math.round(v*c);if(b>d){const g=f+(Math.round(p*f*i)||1)*(o===0?-1:1);n.lineTo(d,g),d=b,p=0}const w=Math.abs(l[v]||0);w>p&&(p=w)}n.lineTo(d,f)};n.beginPath(),a(0),a(1),n.fill(),n.closePath()}renderWaveform(t,r,n){if(n.fillStyle=this.convertColorValues(r.waveColor),r.renderFunction)return void r.renderFunction(t,n);let i=r.barHeight||1;if(r.normalize){const a=Array.from(t[0]).reduce((o,l)=>Math.max(o,Math.abs(l)),0);i=a?1/a:1}r.barWidth||r.barGap||r.barAlign?this.renderBarWaveform(t,r,n,i):this.renderLineWaveform(t,r,n,i)}renderSingleCanvas(t,r,n,i,a,o,l){const u=this.getPixelRatio(),s=document.createElement("canvas");s.width=Math.round(n*u),s.height=Math.round(i*u),s.style.width=`${n}px`,s.style.height=`${i}px`,s.style.left=`${Math.round(a)}px`,o.appendChild(s);const f=s.getContext("2d");if(this.renderWaveform(t,r,f),s.width>0&&s.height>0){const c=s.cloneNode(),d=c.getContext("2d");d.drawImage(s,0,0),d.globalCompositeOperation="source-in",d.fillStyle=this.convertColorValues(r.progressColor),d.fillRect(0,0,s.width,s.height),l.appendChild(c)}}renderMultiCanvas(t,r,n,i,a,o){const l=this.getPixelRatio(),{clientWidth:u}=this.scrollContainer,s=n/l;let f=Math.min(ep.MAX_CANVAS_WIDTH,u,s),c={};if(f===0)return;if(r.barWidth||r.barGap){const w=r.barWidth||.5,g=w+(r.barGap||w/2);f%g!=0&&(f=Math.floor(f/g)*g)}const d=w=>{if(w<0||w>=p||c[w])return;c[w]=!0;const g=w*f,y=Math.min(s-g,f);if(y<=0)return;const h=t.map(S=>{const m=Math.floor(g/s*S.length),x=Math.floor((g+y)/s*S.length);return S.slice(m,x)});this.renderSingleCanvas(h,r,y,i,g,a,o)},p=Math.ceil(s/f);if(!this.isScrollable){for(let w=0;w1){const w=this.on("scroll",()=>{const{scrollLeft:g}=this.scrollContainer,y=Math.floor(g/s*p);Object.keys(c).length>ep.MAX_NODES&&(a.innerHTML="",o.innerHTML="",c={}),d(y-1),d(y),d(y+1)});this.unsubscribeOnScroll.push(w)}}renderChannel(t,r,n,i){var{overlay:a}=r,o=function(f,c){var d={};for(var p in f)Object.prototype.hasOwnProperty.call(f,p)&&c.indexOf(p)<0&&(d[p]=f[p]);if(f!=null&&typeof Object.getOwnPropertySymbols=="function"){var v=0;for(p=Object.getOwnPropertySymbols(f);v0&&(l.style.marginTop=`-${u}px`),this.canvasWrapper.style.minHeight=`${u}px`,this.canvasWrapper.appendChild(l);const s=l.cloneNode();this.progressWrapper.appendChild(s),this.renderMultiCanvas(t,o,n,u,l,s)}render(t){return ot(this,void 0,void 0,function*(){var r;this.timeouts.forEach(u=>u()),this.timeouts=[],this.canvasWrapper.innerHTML="",this.progressWrapper.innerHTML="",this.options.width!=null&&(this.scrollContainer.style.width=typeof this.options.width=="number"?`${this.options.width}px`:this.options.width);const n=this.getPixelRatio(),i=this.scrollContainer.clientWidth,a=Math.ceil(t.duration*(this.options.minPxPerSec||0));this.isScrollable=a>i;const o=this.options.fillParent&&!this.isScrollable,l=(o?i:a)*n;if(this.wrapper.style.width=o?"100%":`${a}px`,this.scrollContainer.style.overflowX=this.isScrollable?"auto":"hidden",this.scrollContainer.classList.toggle("noScrollbar",!!this.options.hideScrollbar),this.cursor.style.backgroundColor=`${this.options.cursorColor||this.options.progressColor}`,this.cursor.style.width=`${this.options.cursorWidth}px`,this.audioData=t,this.emit("render"),this.options.splitChannels)for(let u=0;u1&&u.push(t.getChannelData(1)),this.renderChannel(u,this.options,l,0)}Promise.resolve().then(()=>this.emit("rendered"))})}reRender(){if(this.unsubscribeOnScroll.forEach(n=>n()),this.unsubscribeOnScroll=[],!this.audioData)return;const{scrollWidth:t}=this.scrollContainer,{right:r}=this.progressWrapper.getBoundingClientRect();if(this.render(this.audioData),this.isScrollable&&t!==this.scrollContainer.scrollWidth){const{right:n}=this.progressWrapper.getBoundingClientRect();let i=n-r;i*=2,i=i<0?Math.floor(i):Math.ceil(i),i/=2,this.scrollContainer.scrollLeft+=i}}zoom(t){this.options.minPxPerSec=t,this.reRender()}scrollIntoView(t,r=!1){const{scrollLeft:n,scrollWidth:i,clientWidth:a}=this.scrollContainer,o=t*i,l=n,u=n+a,s=a/2;if(this.isDragging)o+30>u?this.scrollContainer.scrollLeft+=30:o-30u)&&(this.scrollContainer.scrollLeft=o-(this.options.autoCenter?s:0));const f=o-n-s;r&&this.options.autoCenter&&f>0&&(this.scrollContainer.scrollLeft+=Math.min(f,10))}{const f=this.scrollContainer.scrollLeft,c=f/i,d=(f+a)/i;this.emit("scroll",c,d,f,f+a)}}renderProgress(t,r){if(isNaN(t))return;const n=100*t;this.canvasWrapper.style.clipPath=`polygon(${n}% 0, 100% 0, 100% 100%, ${n}% 100%)`,this.progressWrapper.style.width=`${n}%`,this.cursor.style.left=`${n}%`,this.cursor.style.transform=`translateX(-${Math.round(n)===100?this.options.cursorWidth:0}px)`,this.isScrollable&&this.options.autoScroll&&this.scrollIntoView(t,r)}exportImage(t,r,n){return ot(this,void 0,void 0,function*(){const i=this.canvasWrapper.querySelectorAll("canvas");if(!i.length)throw new Error("No waveform data");if(n==="dataURL"){const a=Array.from(i).map(o=>o.toDataURL(t,r));return Promise.resolve(a)}return Promise.all(Array.from(i).map(a=>new Promise((o,l)=>{a.toBlob(u=>{u?o(u):l(new Error("Could not export image"))},t,r)})))})}};Jd.MAX_CANVAS_WIDTH=8e3,Jd.MAX_NODES=10;let r$=class extends Sl{constructor(){super(...arguments),this.unsubscribe=()=>{}}start(){this.unsubscribe=this.on("tick",()=>{requestAnimationFrame(()=>{this.emit("tick")})}),this.emit("tick")}stop(){this.unsubscribe()}destroy(){this.unsubscribe()}},Tf=class extends Sl{constructor(t=new AudioContext){super(),this.bufferNode=null,this.playStartTime=0,this.playedDuration=0,this._muted=!1,this._playbackRate=1,this._duration=void 0,this.buffer=null,this.currentSrc="",this.paused=!0,this.crossOrigin=null,this.seeking=!1,this.autoplay=!1,this.addEventListener=this.on,this.removeEventListener=this.un,this.audioContext=t,this.gainNode=this.audioContext.createGain(),this.gainNode.connect(this.audioContext.destination)}load(){return ot(this,void 0,void 0,function*(){})}get src(){return this.currentSrc}set src(t){if(this.currentSrc=t,this._duration=void 0,!t)return this.buffer=null,void this.emit("emptied");fetch(t).then(r=>{if(r.status>=400)throw new Error(`Failed to fetch ${t}: ${r.status} (${r.statusText})`);return r.arrayBuffer()}).then(r=>this.currentSrc!==t?null:this.audioContext.decodeAudioData(r)).then(r=>{this.currentSrc===t&&(this.buffer=r,this.emit("loadedmetadata"),this.emit("canplay"),this.autoplay&&this.play())})}_play(){var t;if(!this.paused)return;this.paused=!1,(t=this.bufferNode)===null||t===void 0||t.disconnect(),this.bufferNode=this.audioContext.createBufferSource(),this.buffer&&(this.bufferNode.buffer=this.buffer),this.bufferNode.playbackRate.value=this._playbackRate,this.bufferNode.connect(this.gainNode);let r=this.playedDuration*this._playbackRate;(r>=this.duration||r<0)&&(r=0,this.playedDuration=0),this.bufferNode.start(this.audioContext.currentTime,r),this.playStartTime=this.audioContext.currentTime,this.bufferNode.onended=()=>{this.currentTime>=this.duration&&(this.pause(),this.emit("ended"))}}_pause(){var t;this.paused=!0,(t=this.bufferNode)===null||t===void 0||t.stop(),this.playedDuration+=this.audioContext.currentTime-this.playStartTime}play(){return ot(this,void 0,void 0,function*(){this.paused&&(this._play(),this.emit("play"))})}pause(){this.paused||(this._pause(),this.emit("pause"))}stopAt(t){const r=t-this.currentTime,n=this.bufferNode;n==null||n.stop(this.audioContext.currentTime+r),n==null||n.addEventListener("ended",()=>{n===this.bufferNode&&(this.bufferNode=null,this.pause())},{once:!0})}setSinkId(t){return ot(this,void 0,void 0,function*(){return this.audioContext.setSinkId(t)})}get playbackRate(){return this._playbackRate}set playbackRate(t){this._playbackRate=t,this.bufferNode&&(this.bufferNode.playbackRate.value=t)}get currentTime(){return(this.paused?this.playedDuration:this.playedDuration+(this.audioContext.currentTime-this.playStartTime))*this._playbackRate}set currentTime(t){const r=!this.paused;r&&this._pause(),this.playedDuration=t/this._playbackRate,r&&this._play(),this.emit("seeking"),this.emit("timeupdate")}get duration(){var t,r;return(t=this._duration)!==null&&t!==void 0?t:((r=this.buffer)===null||r===void 0?void 0:r.duration)||0}set duration(t){this._duration=t}get volume(){return this.gainNode.gain.value}set volume(t){this.gainNode.gain.value=t,this.emit("volumechange")}get muted(){return this._muted}set muted(t){this._muted!==t&&(this._muted=t,this._muted?this.gainNode.disconnect():this.gainNode.connect(this.audioContext.destination))}canPlayType(t){return/^(audio|video)\//.test(t)}getGainNode(){return this.gainNode}getChannelData(){const t=[];if(!this.buffer)return t;const r=this.buffer.numberOfChannels;for(let n=0;n{this.emit("init");const{peaks:a,duration:o}=this.options;(i||a&&o)&&this.load(i,a,o).catch(()=>null)})}updateProgress(t=this.getCurrentTime()){return this.renderer.renderProgress(t/this.getDuration(),this.isPlaying()),t}initTimerEvents(){this.subscriptions.push(this.timer.on("tick",()=>{if(!this.isSeeking()){const t=this.updateProgress();this.emit("timeupdate",t),this.emit("audioprocess",t),this.stopAtPosition!=null&&this.isPlaying()&&t>=this.stopAtPosition&&this.pause()}}))}initPlayerEvents(){this.isPlaying()&&(this.emit("play"),this.timer.start()),this.mediaSubscriptions.push(this.onMediaEvent("timeupdate",()=>{const t=this.updateProgress();this.emit("timeupdate",t)}),this.onMediaEvent("play",()=>{this.emit("play"),this.timer.start()}),this.onMediaEvent("pause",()=>{this.emit("pause"),this.timer.stop(),this.stopAtPosition=null}),this.onMediaEvent("emptied",()=>{this.timer.stop(),this.stopAtPosition=null}),this.onMediaEvent("ended",()=>{this.emit("timeupdate",this.getDuration()),this.emit("finish"),this.stopAtPosition=null}),this.onMediaEvent("seeking",()=>{this.emit("seeking",this.getCurrentTime())}),this.onMediaEvent("error",()=>{var t;this.emit("error",(t=this.getMediaElement().error)!==null&&t!==void 0?t:new Error("Media error")),this.stopAtPosition=null}))}initRendererEvents(){this.subscriptions.push(this.renderer.on("click",(t,r)=>{this.options.interact&&(this.seekTo(t),this.emit("interaction",t*this.getDuration()),this.emit("click",t,r))}),this.renderer.on("dblclick",(t,r)=>{this.emit("dblclick",t,r)}),this.renderer.on("scroll",(t,r,n,i)=>{const a=this.getDuration();this.emit("scroll",t*a,r*a,n,i)}),this.renderer.on("render",()=>{this.emit("redraw")}),this.renderer.on("rendered",()=>{this.emit("redrawcomplete")}),this.renderer.on("dragstart",t=>{this.emit("dragstart",t)}),this.renderer.on("dragend",t=>{this.emit("dragend",t)}));{let t;this.subscriptions.push(this.renderer.on("drag",r=>{if(!this.options.interact)return;let n;this.renderer.renderProgress(r),clearTimeout(t),this.isPlaying()?n=0:this.options.dragToSeek===!0?n=200:typeof this.options.dragToSeek=="object"&&this.options.dragToSeek!==void 0&&(n=this.options.dragToSeek.debounceTime),t=setTimeout(()=>{this.seekTo(r)},n),this.emit("interaction",r*this.getDuration()),this.emit("drag",r)}))}}initPlugins(){var t;!((t=this.options.plugins)===null||t===void 0)&&t.length&&this.options.plugins.forEach(r=>{this.registerPlugin(r)})}unsubscribePlayerEvents(){this.mediaSubscriptions.forEach(t=>t()),this.mediaSubscriptions=[]}setOptions(t){this.options=Object.assign({},this.options,t),t.duration&&!t.peaks&&(this.decodedData=Jl.createBuffer(this.exportPeaks(),t.duration)),t.peaks&&t.duration&&(this.decodedData=Jl.createBuffer(t.peaks,t.duration)),this.renderer.setOptions(this.options),t.audioRate&&this.setPlaybackRate(t.audioRate),t.mediaControls!=null&&(this.getMediaElement().controls=t.mediaControls)}registerPlugin(t){return t._init(this),this.plugins.push(t),this.subscriptions.push(t.once("destroy",()=>{this.plugins=this.plugins.filter(r=>r!==t)})),t}getWrapper(){return this.renderer.getWrapper()}getWidth(){return this.renderer.getWidth()}getScroll(){return this.renderer.getScroll()}setScroll(t){return this.renderer.setScroll(t)}setScrollTime(t){const r=t/this.getDuration();this.renderer.setScrollPercentage(r)}getActivePlugins(){return this.plugins}loadAudio(t,r,n,i){return ot(this,void 0,void 0,function*(){var a;if(this.emit("load",t),!this.options.media&&this.isPlaying()&&this.pause(),this.decodedData=null,this.stopAtPosition=null,!r&&!n){const l=this.options.fetchParams||{};window.AbortController&&!l.signal&&(this.abortController=new AbortController,l.signal=(a=this.abortController)===null||a===void 0?void 0:a.signal);const u=f=>this.emit("loading",f);r=yield e$.fetchBlob(t,u,l);const s=this.options.blobMimeType;s&&(r=new Blob([r],{type:s}))}this.setSrc(t,r);const o=yield new Promise(l=>{const u=i||this.getDuration();u?l(u):this.mediaSubscriptions.push(this.onMediaEvent("loadedmetadata",()=>l(this.getDuration()),{once:!0}))});if(!t&&!r){const l=this.getMediaElement();l instanceof Tf&&(l.duration=o)}if(n)this.decodedData=Jl.createBuffer(n,o||0);else if(r){const l=yield r.arrayBuffer();this.decodedData=yield Jl.decode(l,this.options.sampleRate)}this.decodedData&&(this.emit("decode",this.getDuration()),this.renderer.render(this.decodedData)),this.emit("ready",this.getDuration())})}load(t,r,n){return ot(this,void 0,void 0,function*(){try{return yield this.loadAudio(t,void 0,r,n)}catch(i){throw this.emit("error",i),i}})}loadBlob(t,r,n){return ot(this,void 0,void 0,function*(){try{return yield this.loadAudio("",t,r,n)}catch(i){throw this.emit("error",i),i}})}zoom(t){if(!this.decodedData)throw new Error("No audio loaded");this.renderer.zoom(t),this.emit("zoom",t)}getDecodedData(){return this.decodedData}exportPeaks({channels:t=2,maxLength:r=8e3,precision:n=1e4}={}){if(!this.decodedData)throw new Error("The audio has not been decoded yet");const i=Math.min(t,this.decodedData.numberOfChannels),a=[];for(let o=0;oMath.abs(d)&&(d=v)}u.push(Math.round(d*n)/n)}a.push(u)}return a}getDuration(){let t=super.getDuration()||0;return t!==0&&t!==1/0||!this.decodedData||(t=this.decodedData.duration),t}toggleInteraction(t){this.options.interact=t}setTime(t){this.stopAtPosition=null,super.setTime(t),this.updateProgress(t),this.emit("timeupdate",t)}seekTo(t){const r=this.getDuration()*t;this.setTime(r)}play(t,r){const n=Object.create(null,{play:{get:()=>super.play}});return ot(this,void 0,void 0,function*(){t!=null&&this.setTime(t);const i=yield n.play.call(this);return r!=null&&(this.media instanceof Tf?this.media.stopAt(r):this.stopAtPosition=r),i})}playPause(){return ot(this,void 0,void 0,function*(){return this.isPlaying()?this.pause():this.play()})}stop(){this.pause(),this.setTime(0)}skip(t){this.setTime(this.getCurrentTime()+t)}empty(){this.load("",[[0]],.001)}setMediaElement(t){this.unsubscribePlayerEvents(),super.setMediaElement(t),this.initPlayerEvents()}exportImage(){return ot(this,arguments,void 0,function*(t="image/png",r=1,n="dataURL"){return this.renderer.exportImage(t,r,n)})}destroy(){var t;this.emit("destroy"),(t=this.abortController)===null||t===void 0||t.abort(),this.plugins.forEach(r=>r.destroy()),this.subscriptions.forEach(r=>r()),this.unsubscribePlayerEvents(),this.timer.destroy(),this.renderer.destroy(),super.destroy()}};tp.BasePlugin=class extends Sl{constructor(e){super(),this.subscriptions=[],this.options=e}onInit(){}_init(e){this.wavesurfer=e,this.onInit()}destroy(){this.emit("destroy"),this.subscriptions.forEach(e=>e())}},tp.dom=JE;let i$=class{constructor(){this.listeners={}}on(t,r,n){if(this.listeners[t]||(this.listeners[t]=new Set),this.listeners[t].add(r),n==null?void 0:n.once){const i=()=>{this.un(t,i),this.un(t,r)};return this.on(t,i),i}return()=>this.un(t,r)}un(t,r){var n;(n=this.listeners[t])===null||n===void 0||n.delete(r)}once(t,r){return this.on(t,r,{once:!0})}unAll(){this.listeners={}}emit(t,...r){this.listeners[t]&&this.listeners[t].forEach(n=>n(...r))}},a$=class extends i${constructor(t){super(),this.subscriptions=[],this.options=t}onInit(){}_init(t){this.wavesurfer=t,this.onInit()}destroy(){this.emit("destroy"),this.subscriptions.forEach(t=>t())}};function Qx(e,t){const r=t.xmlns?document.createElementNS(t.xmlns,e):document.createElement(e);for(const[n,i]of Object.entries(t))if(n==="children")for(const[a,o]of Object.entries(t))typeof o=="string"?r.appendChild(document.createTextNode(o)):r.appendChild(Qx(a,o));else n==="style"?Object.assign(r.style,i):n==="textContent"?r.textContent=i:r.setAttribute(n,i.toString());return r}function jf(e,t,r){return Qx(e,t||{})}const o$={height:20,timeOffset:0,formatTimeCallback:e=>e/60>1?`${Math.floor(e/60)}:${`${(e=Math.round(e%60))<10?"0":""}${e}`}`:`${Math.round(1e3*e)/1e3}`};let l$=class Zx extends a${constructor(t){super(t||{}),this.options=Object.assign({},o$,t),this.timelineWrapper=this.initTimelineWrapper()}static create(t){return new Zx(t)}onInit(){var t;if(!this.wavesurfer)throw Error("WaveSurfer is not initialized");let r=this.wavesurfer.getWrapper();if(this.options.container instanceof HTMLElement)r=this.options.container;else if(typeof this.options.container=="string"){const n=document.querySelector(this.options.container);if(!n)throw Error(`No Timeline container found matching ${this.options.container}`);r=n}this.options.insertPosition?(r.firstElementChild||r).insertAdjacentElement(this.options.insertPosition,this.timelineWrapper):r.appendChild(this.timelineWrapper),this.subscriptions.push(this.wavesurfer.on("redraw",()=>this.initTimeline())),(!((t=this.wavesurfer)===null||t===void 0)&&t.getDuration()||this.options.duration)&&this.initTimeline()}destroy(){this.timelineWrapper.remove(),super.destroy()}initTimelineWrapper(){return jf("div",{part:"timeline-wrapper",style:{pointerEvents:"none"}})}defaultTimeInterval(t){return t>=25?1:5*t>=25?5:15*t>=25?15:60*Math.ceil(.5/t)}defaultPrimaryLabelInterval(t){return t>=25?10:5*t>=25?6:4}defaultSecondaryLabelInterval(t){return t>=25?5:2}virtualAppend(t,r,n){let i=!1;const a=(u,s)=>{if(!this.wavesurfer)return;const f=n.clientWidth,c=t>u&&t+f{a(f,c)}))}initTimeline(){var t,r,n,i,a,o,l,u;const s=(n=(r=(t=this.wavesurfer)===null||t===void 0?void 0:t.getDuration())!==null&&r!==void 0?r:this.options.duration)!==null&&n!==void 0?n:0,f=(((i=this.wavesurfer)===null||i===void 0?void 0:i.getWrapper().scrollWidth)||this.timelineWrapper.scrollWidth)/s,c=(a=this.options.timeInterval)!==null&&a!==void 0?a:this.defaultTimeInterval(f),d=(o=this.options.primaryLabelInterval)!==null&&o!==void 0?o:this.defaultPrimaryLabelInterval(f),p=this.options.primaryLabelSpacing,v=(l=this.options.secondaryLabelInterval)!==null&&l!==void 0?l:this.defaultSecondaryLabelInterval(f),b=this.options.secondaryLabelSpacing,w=this.options.insertPosition==="beforebegin",g=jf("div",{style:Object.assign({height:`${this.options.height}px`,overflow:"hidden",fontSize:this.options.height/2+"px",whiteSpace:"nowrap"},w?{position:"absolute",top:"0",left:"0",right:"0",zIndex:"2"}:{position:"relative"})});g.setAttribute("part","timeline"),typeof this.options.style=="string"?g.setAttribute("style",g.getAttribute("style")+this.options.style):typeof this.options.style=="object"&&Object.assign(g.style,this.options.style);const y=jf("div",{style:{width:"0",height:"50%",display:"flex",flexDirection:"column",justifyContent:w?"flex-start":"flex-end",top:w?"0":"auto",bottom:w?"auto":"0",overflow:"visible",borderLeft:"1px solid currentColor",opacity:`${(u=this.options.secondaryLabelOpacity)!==null&&u!==void 0?u:.25}`,position:"absolute",zIndex:"1"}});for(let h=0,S=0;h{const t=N.useRef(null),r=N.useRef(null),[n,i]=N.useState(!1);return l$.create({height:16,timeInterval:.1,primaryLabelInterval:1,style:{fontSize:"10px"}}),N.useEffect(()=>{if(!t.current)return;const a=fc.getProxiedUrl(e);return r.current=tp.create({container:t.current,waveColor:"rgb(200, 0, 200)",progressColor:"rgb(100, 0, 100)",url:a,minPxPerSec:100,barWidth:10,barRadius:10,barGap:2,mediaControls:!0}),r.current.on("interaction",()=>{var o;(o=r.current)==null||o.play(),i(!0)}),r.current.on("finish",()=>{var o;(o=r.current)==null||o.setTime(0),i(!1)}),r.current.on("play",()=>i(!0)),r.current.on("pause",()=>i(!1)),()=>{var o;(o=r.current)==null||o.destroy()}},[e]),E.jsx("div",{className:"",children:E.jsx("div",{ref:t})})},xv=({minHeight:e="300px"})=>E.jsx("div",{className:`flex items-center justify-center min-h-[${e}]`,children:E.jsx("span",{className:"loading loading-spinner loading-lg text-primary"})}),Cf=({fileType:e})=>{const[t,r]=N.useState({}),[n,i]=N.useState(!1),[a,o]=N.useState(null),[l,u]=N.useState(null),[s,f]=N.useState(null);N.useEffect(()=>{i(!0),o(null),fc.fetchExamplesByType(e).then(d=>{r(d);const p=Object.keys(d);if(p.length>0){u(p[0]);const v=Object.keys(d[p[0]]);v.length>0?f(v[0]):f(null)}else u(null),f(null);i(!1)}).catch(d=>{o(d.message),i(!1)})},[e]);const c=({selectedModel:d,selectedAttack:p,examples:v,fileType:b})=>{const w=v[d][p];return E.jsx("div",{className:"example-display",children:w.map((g,y)=>E.jsxs("div",{className:"example-item",children:[E.jsx("p",{children:g.description}),b==="image"&&E.jsx("img",{src:g.image_url,alt:g.description,className:"example-image"}),b==="audio"&&g.audio_url&&E.jsxs(E.Fragment,{children:[E.jsx(u$,{src:g.audio_url}),E.jsx("img",{src:g.image_url,alt:g.description,className:"example-image"})]}),b==="video"&&E.jsx("video",{controls:!0,src:g.video_url,className:"example-video"})]},y))})};return E.jsxs("div",{className:"examples-container",children:[E.jsxs("div",{className:"selectors-container flex flex-col md:flex-row gap-4 mb-4",children:[E.jsxs("fieldset",{className:"fieldset",children:[E.jsx("legend",{className:"fieldset-legend",children:"Model"}),E.jsx("select",{className:"select select-bordered w-full",value:l||"",onChange:d=>u(d.target.value||null),children:Object.keys(t).map(d=>E.jsx("option",{value:d,children:d},d))})]}),l&&E.jsxs("fieldset",{className:"fieldset",children:[E.jsx("legend",{className:"fieldset-legend",children:"Attack"}),E.jsx("select",{className:"select select-bordered w-full",value:s||"",onChange:d=>f(d.target.value||null),children:Object.keys(t[l]).map(d=>E.jsx("option",{value:d,children:d},d))})]})]}),n&&E.jsx(xv,{}),a&&E.jsxs("p",{className:"error",children:["Error: ",a]}),l&&s&&E.jsx(c,{selectedModel:l,selectedAttack:s,examples:t,fileType:e})]})},s$=({datasetNames:e,selectedDatasetName:t,onDatasetNameChange:r})=>E.jsx("div",{className:"",children:E.jsxs("fieldset",{className:"fieldset w-full p-4 rounded border border-gray-700 bg-base-200",children:[E.jsx("legend",{className:"fieldset-legend font-semibold",children:"Dataset"}),E.jsx("div",{className:"flex flex-wrap gap-2",children:e.map(n=>E.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[E.jsx("input",{type:"radio",name:"dataset",className:"radio radio-sm",checked:t===n,onChange:()=>r(n)}),E.jsx("span",{className:"text-sm",children:n})]},n))})]})}),c$=({groups:e,selectedMetrics:t,setSelectedMetrics:r})=>{const[n,i]=N.useState({}),[a,o]=N.useState({}),[l,u]=N.useState(""),[s,f]=N.useState(!1),c=h=>{i(S=>({...S,[h]:!S[h]}))},d=(h,S)=>{o(m=>{var x;return{...m,[h]:{...m[h],[S]:!((x=m[h])!=null&&x[S])}}})},p=h=>{const S=new Set(t);Object.entries(e[h]).forEach(([m,x])=>{(l?x.filter(_=>_.toLowerCase().includes(l.toLowerCase())):x).forEach(_=>S.add(_))}),r(S),i(m=>({...m,[h]:!0})),o(m=>({...m,[h]:Object.keys(e[h]).reduce((x,O)=>(x[O]=!0,x),{})}))},v=h=>{const S=new Set(t);Object.entries(e[h]).forEach(([m,x])=>{(l?x.filter(_=>_.toLowerCase().includes(l.toLowerCase())):x).forEach(_=>S.delete(_))}),r(S),o(m=>({...m,[h]:Object.keys(m[h]||{}).reduce((x,O)=>(x[O]=!1,x),{})}))},b=(h,S)=>{const m=new Set(t);(l?e[h][S].filter(O=>O.toLowerCase().includes(l.toLowerCase())):e[h][S]).forEach(O=>m.add(O)),r(m),i(O=>({...O,[h]:!0})),o(O=>({...O,[h]:{...O[h]||{},[S]:!0}}))},w=(h,S)=>{const m=new Set(t);(l?e[h][S].filter(O=>O.toLowerCase().includes(l.toLowerCase())):e[h][S]).forEach(O=>m.delete(O)),r(m),o(O=>({...O,[h]:{...O[h]||{},[S]:!1}}))},g=()=>{const h=Object.values(e).flatMap(x=>Object.values(x).flat()).filter(x=>!l||x.toLowerCase().includes(l.toLowerCase()));r(new Set(h));const S={},m={};Object.entries(e).forEach(([x,O])=>{let _=!1;m[x]={},Object.entries(O).forEach(([P,T])=>{const $=T.some(j=>!l||j.toLowerCase().includes(l.toLowerCase()));m[x][P]=$,$&&(_=!0)}),S[x]=_}),i(S),o(m)},y=()=>{const h=new Set(t);Object.values(e).flatMap(x=>Object.values(x).flat()).filter(x=>!l||x.toLowerCase().includes(l.toLowerCase())).forEach(x=>h.delete(x)),r(h);const S={},m={};Object.entries(e).forEach(([x,O])=>{m[x]={},Object.entries(O).forEach(([_,P])=>{P.some(T=>!l||T.toLowerCase().includes(l.toLowerCase())),m[x][_]=!1}),S[x]=!1}),i(S),o(m)};return N.useEffect(()=>{if(Object.values(e).flatMap(m=>Object.values(m).flat()).every(m=>t.has(m))&&Object.keys(e).length>0){const m={},x={};Object.entries(e).forEach(([O,_])=>{m[O]=!0,x[O]={},Object.keys(_).forEach(P=>{x[O][P]=!0})}),i(m),o(x)}},[e,t]),E.jsx("div",{className:"w-full mb-4",children:E.jsxs("div",{className:"collapse collapse-arrow bg-base-200 border border-gray-700",children:[E.jsx("input",{type:"checkbox",className:"peer",checked:s,onChange:()=>f(h=>!h)}),E.jsx("div",{className:"collapse-title select-none ",children:E.jsx("span",{className:"text-sm",children:"Filter Individual Metrics"})}),E.jsx("div",{className:"collapse-content",children:E.jsxs("fieldset",{className:"fieldset w-full",children:[E.jsxs("div",{className:"flex gap-2 mb-3",children:[E.jsxs("div",{className:"relative mr-2",children:[E.jsx("input",{type:"text",placeholder:"Search metrics...",className:"input input-bordered border-gray-700 input-sm w-48 pr-8",value:l,onChange:h=>{const S=h.target.value;u(S);const m={},x={};Object.entries(e).forEach(([O,_])=>{let P=!1;x[O]={},Object.entries(_).forEach(([T,$])=>{const j=$.some(L=>L.toLowerCase().includes(S.toLowerCase()));x[O][T]=j||S==="",j&&(P=!0)}),m[O]=P||S===""}),i(m),o(x)}}),E.jsx("span",{className:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 pointer-events-none",children:E.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-4-4m0 0A7 7 0 104 4a7 7 0 0013 13z"})})})]}),E.jsx("button",{type:"button",className:"text-xs px-3 py-1 border border-gray-700 rounded font-semibold bg-base-200 cursor-pointer",onClick:g,children:"All"}),E.jsx("button",{type:"button",className:"text-xs px-3 py-1 border border-gray-700 rounded font-semibold bg-base-200 cursor-pointer",onClick:y,children:"None"})]}),E.jsx("div",{className:"flex flex-row flex-wrap gap-4 w-full items-start",children:Object.entries(e).map(([h,S])=>E.jsxs("div",{className:"flex-1 min-w-[220px] max-w-full",children:[E.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[E.jsxs("button",{type:"button",onClick:()=>c(h),className:"flex-1 text-left font-medium py-1 px-2 rounded border border-gray-700 cursor-pointer",children:[h," ",n[h]?"▼":"▶"]}),E.jsx("button",{type:"button",className:"text-xs px-2 py-1 border border-gray-700 rounded cursor-pointer",onClick:()=>p(h),children:"All"}),E.jsx("button",{type:"button",className:"text-xs px-2 py-1 border border-gray-700 rounded cursor-pointer",onClick:()=>v(h),children:"None"})]}),n[h]&&E.jsx("div",{className:"ml-2",children:Object.entries(S).map(([m,x])=>{var _,P;const O=l?x.filter(T=>T.toLowerCase().includes(l.toLowerCase())):x;return O.length===0?null:E.jsxs("div",{className:"mb-2",children:[E.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[E.jsxs("button",{type:"button",onClick:()=>d(h,m),className:"flex-1 text-left py-1 px-2 rounded border border-gray-700 cursor-pointer",children:[m," ",(_=a[h])!=null&&_[m]?"▼":"▶"]}),E.jsx("button",{type:"button",className:"text-xs px-2 py-1 border border-gray-700 rounded cursor-pointer",onClick:()=>b(h,m),children:"All"}),E.jsx("button",{type:"button",className:"text-xs px-2 py-1 border border-gray-700 rounded cursor-pointer",onClick:()=>w(h,m),children:"None"})]}),((P=a[h])==null?void 0:P[m])&&E.jsx("div",{className:"grid grid-cols-1 gap-1 ml-2 max-h-48 overflow-y-auto pr-2",children:O.map(T=>E.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[E.jsx("input",{type:"checkbox",checked:t.has(T),onChange:$=>{const j=new Set(t);$.target.checked?j.add(T):j.delete(T),r(j)},className:"form-checkbox h-4 w-4"}),E.jsx("span",{className:"truncate",title:T,children:T.includes("_")?T.split("_").slice(1).join("_"):T})]},T))})]},m)})})]},h))})]})})]})})},f$=({independentMetrics:e,tableHeader:t,selectedModels:r,tableRows:n})=>e.length===0?null:E.jsx("div",{className:"overflow-x-auto max-h-[80vh] overflow-y-auto",children:E.jsxs("table",{className:"table w-full min-w-max border-gray-700 border",children:[E.jsx("thead",{children:E.jsxs("tr",{children:[E.jsx("th",{className:"sticky left-0 top-0 bg-base-100 z-20 border-gray-700 border",children:"Metric"}),t.filter(i=>r.has(i)).map(i=>E.jsx("th",{className:"sticky top-0 bg-base-100 z-10 text-center text-xs border-gray-700 border",children:i},`independent-${i}`))]})}),E.jsx("tbody",{children:e.sort().map(i=>{const a=n.find(o=>o.metric===i);return a?E.jsxs("tr",{className:"hover:bg-base-100",children:[E.jsx("td",{className:"sticky left-0 bg-base-100 z-10 border-gray-700 border",children:i}),t.filter(o=>r.has(o)).map(o=>{const l=a[o];return E.jsx("td",{className:"text-center border-gray-700 border",children:isNaN(Number(l))?l:Number(Number(l).toFixed(3))},`independent-${i}-${o}`)})]},`independent-${i}`):null})})]})}),d$=({overallMetrics:e,selectedOverallMetrics:t,setSelectedOverallMetrics:r})=>{const n=i=>{const a=new Set(t);a.has(i)?a.delete(i):a.add(i),r(a)};return E.jsx("div",{className:"w-full",children:E.jsxs("fieldset",{className:"fieldset w-full p-4 rounded border border-gray-700 bg-base-200",children:[E.jsxs("legend",{className:"fieldset-legend font-semibold",children:["Metrics (",t.size,"/",e.length,")"]}),E.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-6 gap-1 max-h-48 overflow-y-auto pr-2",children:e.map(i=>E.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[E.jsx("input",{type:"checkbox",className:"form-checkbox h-4 w-4",checked:t.has(i),onChange:()=>n(i)}),E.jsx("span",{className:"truncate",title:i,children:i})]},i))})]})})},p$=({benchmarkData:e,selectedModels:t})=>{const[r,n]=N.useState([]),[i,a]=N.useState([]),[o,l]=N.useState(null),[u,s]=N.useState({}),[f,c]=N.useState({}),[d,p]=N.useState({}),[v,b]=N.useState(new Set),[w,g]=N.useState([]),[y,h]=N.useState(new Set),[S,m]=N.useState({}),[x,O]=N.useState({}),[_,P]=N.useState({});N.useEffect(()=>{if(e)try{const F=e,q=F.rows,R=F.groups,{Overall:K,...Q}=R,k=new Set;K==null||K.forEach(ae=>{if(ae.includes("_")){const Oe=ae.split("_").slice(1).join("_");k.add(Oe)}}),g(Array.from(k).sort()),h(new Set(Array.from(k)));const te=Object.entries(Q).sort(([ae],[Oe])=>ae==="Overall"?-1:Oe==="Overall"?1:ae.localeCompare(Oe)).reduce((ae,[Oe,ge])=>{const ze=[...ge].sort();return ae[Oe]=ze.reduce((ce,Qe)=>{const[Ze,_t]=Qe.split("_");return ce[Ze]||(ce[Ze]=[]),ce[Ze].push(Qe),ce},{}),ae[Oe]=Object.fromEntries(Object.entries(ae[Oe]).sort(([ce],[Qe])=>ce.localeCompare(Qe))),ae},{}),ne=Array.from(new Set(q.flatMap(ae=>Object.keys(ae)))).filter(ae=>ae!=="metric"),ee={},oe={};Object.keys(te).forEach(ae=>{ee[ae]=!1,oe[ae]={},Object.keys(te[ae]).forEach(Oe=>{oe[ae][Oe]=!1})});const he=Object.values(Q).flat();b(new Set(he)),a(ne),n(q),s(te),c(ee),p(oe),l(null)}catch(F){l("Failed to parse benchmark data, please try again: "+F.message)}},[e]);const T=F=>{c(q=>({...q,[F]:!q[F]}))},$=(F,q)=>{p(R=>{var K;return{...R,[F]:{...R[F]||{},[q]:!((K=R[F])!=null&&K[q])}}})},j=(F,q)=>{m(R=>{var k,te;const K=(te=(k=R[F])==null?void 0:k[q])==null?void 0:te.direction;let Q={};return K?K==="asc"&&(Q[F]={[q]:{direction:"desc"}}):Q[F]={[q]:{direction:"asc"}},Q})};function L(F,q,R){return`${F??""}||${q??""}||${R??""}`}const B=(F,q,R)=>{const K=L(F,q,R);P(Q=>{var H;const k=(H=Q[K])==null?void 0:H.direction,te={};return k?k==="asc"?te[K]={direction:"desc"}:k==="desc"&&delete te[K]:te[K]={direction:"asc"},te})};function M(F,q,R){return _[L(F,q,R)]||null}const z=()=>{var F;console.log({sortState:S});for(const q of w){if(!y.has(q))continue;const R=i.filter(K=>t.has(K));for(const K of R)if((F=S[q])!=null&&F[K])return{overallMetric:q,model:K,direction:S[q][K].direction}}return null},U=()=>{var F;for(const q of w)if(y.has(q)&&(F=x[q])!=null&&F.__col__)return{overallMetric:q,direction:x[q].__col__.direction};return null},C=(F,q)=>{const R=U();return console.log({columnSortConfig:R,overallMetric:q}),R&&R.overallMetric===q?[...F].sort((K,Q)=>{const k=r.filter(ee=>W(q).includes(ee.metric)).map(ee=>Number(ee[K])).filter(ee=>!isNaN(ee)),te=r.filter(ee=>W(q).includes(ee.metric)).map(ee=>Number(ee[Q])).filter(ee=>!isNaN(ee)),H=k.length?k.reduce((ee,oe)=>ee+oe,0)/k.length:NaN,ne=te.length?te.reduce((ee,oe)=>ee+oe,0)/te.length:NaN;return isNaN(H)&&isNaN(ne)?0:isNaN(H)?1:isNaN(ne)?-1:R.direction==="asc"?H-ne:ne-H}):F},D=(F,q,R,K)=>[...F].sort((Q,k)=>{const te=r.find(oe=>oe.metric===Q),H=r.find(oe=>oe.metric===k);if(!te||!H)return 0;const ne=Number(te[R]),ee=Number(H[R]);return isNaN(ne)&&isNaN(ee)?0:isNaN(ne)?1:isNaN(ee)?-1:K==="asc"?ne-ee:ee-ne}),W=F=>r.filter(q=>{const R=q.metric;return R.includes("_")?R.split("_").slice(1).join("_").endsWith(F):!1}).map(q=>q.metric),Y=()=>r.map(q=>q.metric).filter(q=>{for(const R of w)if(q.endsWith(`_${R}`)||q===R)return!1;return!0}),V=(F,q)=>{const R=F.map(H=>{const ne=r.find(ee=>ee.metric===H);return ne?Number(ne[q]):NaN}).filter(H=>!isNaN(H));if(R.length===0)return{avg:NaN,stdDev:NaN};const K=R.reduce((H,ne)=>H+ne,0)/R.length,k=R.map(H=>{const ne=H-K;return ne*ne}).reduce((H,ne)=>H+ne,0)/R.length,te=Math.sqrt(k);return{avg:K,stdDev:te}},re=(F,q=null,R=null)=>{var Q;if(!q)return F;const K=Object.values(u[q]||{}).flat();return R&&((Q=u[q])!=null&&Q[R])?F.filter(k=>u[q][R].includes(k)&&v.has(k)):F.filter(k=>K.includes(k)&&v.has(k))},le=z();let Se=Object.entries(u).filter(([F])=>F!=="Overall");le&&(Se=Se.sort(([F,q],[R,K])=>{const Q=W(le.overallMetric),k=ne=>{const oe=Object.values(ne).flat().filter(ae=>Q.includes(ae));return V(oe,le.model).avg},te=k(q),H=k(K);return isNaN(te)&&isNaN(H)?0:isNaN(te)?1:isNaN(H)?-1:le.direction==="asc"?te-H:H-te}));const me={};return w.filter(F=>y.has(F)).forEach(F=>{var K;let q=null;const R=Object.keys(_).find(Q=>{const[k,te,H]=Q.split("||");return!!(H===""&&F===F||H&&W(F).includes(H))});if(R&&_[R]){const Q=_[R].direction,[k,te,H]=R.split("||"),ne=i.filter(ee=>t.has(ee));if(H)q=[...ne].sort((ee,oe)=>{const he=r.find(ze=>ze.metric===H),ae=he,Oe=he?Number(he[ee]):NaN,ge=ae?Number(ae[oe]):NaN;return isNaN(Oe)&&isNaN(ge)?0:isNaN(Oe)?1:isNaN(ge)?-1:Q==="asc"?Oe-ge:ge-Oe});else{let ee=[];k&&!te?ee=Object.values(u[k]||{}).flat().filter(he=>W(F).includes(he)):k&&te&&(ee=(((K=u[k])==null?void 0:K[te])||[]).filter(oe=>W(F).includes(oe))),q=[...ne].sort((oe,he)=>{const ae=V(ee,oe),Oe=V(ee,he);return isNaN(ae.avg)&&isNaN(Oe.avg)?0:isNaN(ae.avg)?1:isNaN(Oe.avg)?-1:Q==="asc"?ae.avg-Oe.avg:Oe.avg-ae.avg})}}me[F]=q||C(i.filter(Q=>t.has(Q)),F)}),console.log({modelOrderByOverallMetric:me}),E.jsxs("div",{className:"rounded",children:[o&&E.jsx("div",{className:"text-red-500",children:o}),!o&&E.jsxs("div",{className:"flex flex-col gap-8",children:[E.jsxs("div",{className:"flex flex-col gap-4",children:[E.jsx(d$,{overallMetrics:w,selectedOverallMetrics:y,setSelectedOverallMetrics:h}),E.jsx(c$,{groups:u,selectedMetrics:v,setSelectedMetrics:b})]}),t.size===0||v.size===0?E.jsx("div",{className:"text-center p-4 text-lg",children:"Please select at least one model and one metric to display the data"}):E.jsxs(E.Fragment,{children:[E.jsx(f$,{independentMetrics:Y(),tableHeader:i,selectedModels:t,tableRows:r}),E.jsx("div",{className:"overflow-x-auto max-h-[80vh] overflow-y-auto",children:E.jsxs("table",{className:"table w-full min-w-max border-gray-700 border",children:[E.jsxs("thead",{children:[E.jsxs("tr",{children:[E.jsx("th",{className:"sticky left-0 top-0 bg-base-100 z-20 border-gray-700 border",children:"Attack Category Metrics"}),w.filter(F=>y.has(F)).map(F=>E.jsx("th",{className:"bg-base-100 z-10 text-center text-xs border-gray-700 border",colSpan:me[F].length,children:F},`header-metric-${F}`))]}),E.jsxs("tr",{children:[E.jsx("th",{className:"sticky left-0 bg-base-100 z-10 border-gray-700 border"}),w.filter(F=>y.has(F)).map(F=>E.jsx(A.Fragment,{children:me[F].map(q=>{var Q,k,te,H;const R=((k=(Q=S[F])==null?void 0:Q[q])==null?void 0:k.direction)!==void 0,K=((H=(te=S[F])==null?void 0:te[q])==null?void 0:H.direction)||"desc";return E.jsxs("th",{className:"sticky top-12 bg-base-100 z-10 text-center text-xs border-gray-700 border border-bottom-solid border-b-gray-700 border-b-3 cursor-pointer select-none",onClick:()=>j(F,q),children:[q,E.jsx("span",{className:"ml-1",children:R?K==="asc"?"↑":"↓":"⇅"})]},`${F}-${q}`)})},`header-models-${F}`))]})]}),E.jsx("tbody",{children:Se.map(([F,q])=>{var k,te;if(F==="Overall")return null;const R=Object.values(q).flat(),K=re(R,F);if(K.length===0)return null;let Q=Object.entries(q);if(le){const H=W(le.overallMetric),ne=ee=>{const oe=ee.filter(ae=>H.includes(ae));return V(oe,le.model).avg};Q=Q.sort(([,ee],[,oe])=>{const he=ne(ee),ae=ne(oe);return isNaN(he)&&isNaN(ae)?0:isNaN(he)?1:isNaN(ae)?-1:le.direction==="asc"?he-ae:ae-he})}return E.jsxs(A.Fragment,{children:[E.jsxs("tr",{className:"bg-base-200 cursor-pointer hover:bg-base-300",onClick:()=>T(F),children:[E.jsxs("td",{className:"sticky left-0 bg-base-200 z-10 font-medium border-gray-700 border cursor-pointer select-none flex items-center gap-1",children:[E.jsx("span",{children:f[F]?"▼ ":"▶ "}),E.jsx("span",{className:"flex-1",children:F}),E.jsx("span",{className:"ml-1 cursor-pointer",onClick:H=>{H.stopPropagation(),B(F,null,null)},title:M(F,null,null)?((k=M(F,null,null))==null?void 0:k.direction)==="asc"?"Sort descending":"Clear sort":"Sort by this row",children:M(F,null,null)?((te=M(F,null,null))==null?void 0:te.direction)==="asc"?"↑":"↓":"⇅"})]}),w.filter(H=>y.has(H)).map(H=>E.jsx(A.Fragment,{children:me[H].map(ne=>{const ee=W(H),oe=K.filter(ae=>ee.includes(ae)),he=V(oe,ne);return E.jsx("td",{className:"font-medium text-center border-gray-700 border",children:isNaN(he.avg)?"N/A":`${he.avg.toFixed(3)} ± ${he.stdDev.toFixed(3)}`},`${F}-${H}-${ne}`)})},`${F}-${H}`))]}),f[F]&&Q.map(([H,ne])=>{var oe,he,ae,Oe;const ee=re(ne,F,H);return ee.length===0?null:E.jsxs(A.Fragment,{children:[E.jsxs("tr",{className:"bg-base-100 cursor-pointer hover:bg-base-200",onClick:()=>$(F,H),children:[E.jsxs("td",{className:"sticky left-0 bg-base-100 z-10 pl-6 font-medium border-gray-700 border cursor-pointer select-none flex items-center gap-1",children:[E.jsx("span",{children:(oe=d[F])!=null&&oe[H]?"▼ ":"▶ "}),E.jsx("span",{className:"flex-1",children:H}),E.jsx("span",{className:"ml-1 cursor-pointer",onClick:ge=>{ge.stopPropagation(),B(F,H,null)},title:M(F,H,null)?((he=M(F,H,null))==null?void 0:he.direction)==="asc"?"Sort descending":"Clear sort":"Sort by this row",children:M(F,H,null)?((ae=M(F,H,null))==null?void 0:ae.direction)==="asc"?"↑":"↓":"⇅"})]}),w.filter(ge=>y.has(ge)).map(ge=>E.jsx(A.Fragment,{children:me[ge].map(ze=>{const ce=W(ge),Qe=ee.filter(_t=>ce.includes(_t)),Ze=V(Qe,ze);return E.jsx("td",{className:"font-medium text-center border-gray-700 border",children:isNaN(Ze.avg)?"N/A":`${Ze.avg.toFixed(3)} ± ${Ze.stdDev.toFixed(3)}`},`${F}-${H}-${ge}-${ze}`)})},`${F}-${H}-${ge}`))]}),((Oe=d[F])==null?void 0:Oe[H])&&(()=>{const ge=z();let ze=[...ee];if(console.log("Sorting metrics for subgroup:",F,H,"with config:",ge),ge){const ce=W(ge.overallMetric),Qe=ze.filter(_t=>ce.includes(_t)),Ze=ze.filter(_t=>!ce.includes(_t));ze=[...D(Qe,ge.overallMetric,ge.model,ge.direction),...Ze]}else ze=ze.sort((ce,Qe)=>{const Ze=mt=>{for(const Ut of w)if(mt.endsWith(`_${Ut}`)||mt===Ut)return Ut;return""},_t=Ze(ce),Je=Ze(Qe),tf=(mt,Ut)=>{if(mt.endsWith(`_${Ut}`)){const ar=mt.slice(0,mt.length-Ut.length-1).split("_");return ar.length>0?ar[ar.length-1]:""}return mt},kn=(mt,Ut)=>{if(mt.endsWith(`_${Ut}`)){const ar=mt.slice(0,mt.length-Ut.length-1).split("_");return ar.length>1?ar.slice(0,ar.length-1).join("_"):""}return mt},pi=kn(ce,_t),Ty=kn(Qe,Je);if(pi!==Ty)return pi.localeCompare(Ty);if(_t!==Je)return _t.localeCompare(Je);const jy=tf(ce,_t),Cy=tf(Qe,Je),ky=mt=>{const Ut=mt.match(/^\d+(?:\.\d+)?([kKmMbB]?)$/);if(!Ut)return NaN;let[Iy,ar]=Ut,Nl=parseFloat(mt);switch(ar==null?void 0:ar.toLowerCase()){case"k":Nl*=1e3;break;case"m":Nl*=1e6;break;case"b":Nl*=1e9;break}return Nl},My=ky(jy),Ny=ky(Cy);return!isNaN(My)&&!isNaN(Ny)?My-Ny:jy.localeCompare(Cy)});return ze.map(ce=>{var Ze,_t;const Qe=r.find(Je=>Je.metric===ce);return Qe?(ce.includes("_")&&ce.split("_").slice(1).join("_"),E.jsxs("tr",{className:"hover:bg-base-100",children:[E.jsxs("td",{className:"sticky left-0 bg-base-100 z-10 pl-10 border-gray-700 border cursor-pointer select-none flex items-center gap-1",children:[E.jsx("span",{className:"flex-1",children:ce}),E.jsx("span",{className:"ml-1 cursor-pointer",onClick:Je=>{Je.stopPropagation(),B(F,H,ce)},title:M(F,H,ce)?((Ze=M(F,H,ce))==null?void 0:Ze.direction)==="asc"?"Sort descending":"Clear sort":"Sort by this row",children:M(F,H,ce)?((_t=M(F,H,ce))==null?void 0:_t.direction)==="asc"?"���":"▼":"⇅"})]}),w.filter(Je=>y.has(Je)).map(Je=>W(Je).includes(ce)?E.jsx(A.Fragment,{children:me[Je].map(kn=>{const pi=Qe[kn];return E.jsx("td",{className:"text-center border-gray-700 border",children:isNaN(Number(pi))?pi:Number(Number(pi).toFixed(3))},`${ce}-${Je}-${kn}`)})},`${ce}-${Je}`):E.jsx(A.Fragment,{children:me[Je].map(kn=>E.jsx("td",{className:"text-center border-gray-700 border"},`${ce}-${Je}-${kn}`))},`${ce}-${Je}`))]},ce)):null})})()]},`${F}-${H}`)})]},F)})})]})})]})]})]})};function Jx(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t-1}var dj=fj,pj=pc;function hj(e,t){var r=this.__data__,n=pj(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var vj=hj,yj=ZT,mj=oj,gj=sj,bj=dj,wj=vj;function _a(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t0?1:-1},Wn=function(t){return ri(t)&&t.indexOf("%")===t.length-1},X=function(t){return zC(t)&&!_l(t)},Xe=function(t){return X(t)||ri(t)},HC=0,Pl=function(t){var r=++HC;return"".concat(t||"").concat(r)},ni=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!X(t)&&!ri(t))return n;var a;if(Wn(t)){var o=t.indexOf("%");a=r*parseFloat(t.slice(0,o))/100}else a=+t;return _l(a)&&(a=n),i&&a>r&&(a=r),a},un=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},VC=function(t){if(!Array.isArray(t))return!1;for(var r=t.length,n={},i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ZC(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function np(e){"@babel/helpers - typeof";return np=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},np(e)}var ng={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},zr=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},ig=null,Nf=null,Mv=function e(t){if(t===ig&&Array.isArray(Nf))return Nf;var r=[];return N.Children.forEach(t,function(n){fe(n)||(IC.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),Nf=r,ig=t,r};function Jt(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(i){return zr(i)}):n=[zr(t)],Mv(e).forEach(function(i){var a=Zt(i,"type.displayName")||Zt(i,"type.name");n.indexOf(a)!==-1&&r.push(i)}),r}function It(e,t){var r=Jt(e,t);return r&&r[0]}var ag=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,i=r.height;return!(!X(n)||n<=0||!X(i)||i<=0)},JC=["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"],ek=function(t){return t&&t.type&&ri(t.type)&&JC.indexOf(t.type)>=0},tk=function(t){return t&&np(t)==="object"&&"clipDot"in t},rk=function(t,r,n,i){var a,o=(a=Mf==null?void 0:Mf[i])!==null&&a!==void 0?a:[];return r.startsWith("data-")||!ue(t)&&(i&&o.includes(r)||qC.includes(r))||n&&kv.includes(r)},de=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(N.isValidElement(t)&&(i=t.props),!Sa(i))return null;var a={};return Object.keys(i).forEach(function(o){var l;rk((l=i)===null||l===void 0?void 0:l[o],o,r,n)&&(a[o]=i[o])}),a},ip=function e(t,r){if(t===r)return!0;var n=N.Children.count(t);if(n!==N.Children.count(r))return!1;if(n===0)return!0;if(n===1)return og(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function lk(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function op(e){var t=e.children,r=e.width,n=e.height,i=e.viewBox,a=e.className,o=e.style,l=e.title,u=e.desc,s=ok(e,ak),f=i||{width:r,height:n,x:0,y:0},c=ve("recharts-surface",a);return A.createElement("svg",ap({},de(s,!0,"svg"),{className:c,width:r,height:n,style:o,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),A.createElement("title",null,l),A.createElement("desc",null,u),t)}var uk=["children","className"];function lp(){return lp=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ck(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var We=A.forwardRef(function(e,t){var r=e.children,n=e.className,i=sk(e,uk),a=ve("recharts-layer",n);return A.createElement("g",lp({className:a},de(i,!0),{ref:t}),r)}),Fr=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;ai?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(i);++n=n?e:pk(e,t,r)}var vk=hk,yk="\\ud800-\\udfff",mk="\\u0300-\\u036f",gk="\\ufe20-\\ufe2f",bk="\\u20d0-\\u20ff",wk=mk+gk+bk,xk="\\ufe0e\\ufe0f",Sk="\\u200d",Ok=RegExp("["+Sk+yk+wk+xk+"]");function _k(e){return Ok.test(e)}var dS=_k;function Pk(e){return e.split("")}var Ak=Pk,pS="\\ud800-\\udfff",Ek="\\u0300-\\u036f",$k="\\ufe20-\\ufe2f",Tk="\\u20d0-\\u20ff",jk=Ek+$k+Tk,Ck="\\ufe0e\\ufe0f",kk="["+pS+"]",up="["+jk+"]",sp="\\ud83c[\\udffb-\\udfff]",Mk="(?:"+up+"|"+sp+")",hS="[^"+pS+"]",vS="(?:\\ud83c[\\udde6-\\uddff]){2}",yS="[\\ud800-\\udbff][\\udc00-\\udfff]",Nk="\\u200d",mS=Mk+"?",gS="["+Ck+"]?",Ik="(?:"+Nk+"(?:"+[hS,vS,yS].join("|")+")"+gS+mS+")*",Dk=gS+mS+Ik,Lk="(?:"+[hS+up+"?",up,vS,yS,kk].join("|")+")",Rk=RegExp(sp+"(?="+sp+")|"+Lk+Dk,"g");function Bk(e){return e.match(Rk)||[]}var zk=Bk,Fk=Ak,Wk=dS,Uk=zk;function Hk(e){return Wk(e)?Uk(e):Fk(e)}var Vk=Hk,Gk=vk,Kk=dS,qk=Vk,Xk=oS;function Yk(e){return function(t){t=Xk(t);var r=Kk(t)?qk(t):void 0,n=r?r[0]:t.charAt(0),i=r?Gk(r,1).join(""):t.slice(1);return n[e]()+i}}var Qk=Yk,Zk=Qk,Jk=Zk("toUpperCase"),eM=Jk;const Ec=Ae(eM);function Ee(e){return function(){return e}}const bS=Math.cos,Ju=Math.sin,br=Math.sqrt,es=Math.PI,$c=2*es,cp=Math.PI,fp=2*cp,Dn=1e-6,tM=fp-Dn;function wS(e){this._+=e[0];for(let t=1,r=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return wS;const r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;iDn)if(!(Math.abs(c*u-s*f)>Dn)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let p=n-o,v=i-l,b=u*u+s*s,w=p*p+v*v,g=Math.sqrt(b),y=Math.sqrt(d),h=a*Math.tan((cp-Math.acos((b+d-w)/(2*g*y)))/2),S=h/y,m=h/g;Math.abs(S-1)>Dn&&this._append`L${t+S*f},${r+S*c}`,this._append`A${a},${a},0,0,${+(c*p>f*v)},${this._x1=t+m*u},${this._y1=r+m*s}`}}arc(t,r,n,i,a,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let l=n*Math.cos(i),u=n*Math.sin(i),s=t+l,f=r+u,c=1^o,d=o?i-a:a-i;this._x1===null?this._append`M${s},${f}`:(Math.abs(this._x1-s)>Dn||Math.abs(this._y1-f)>Dn)&&this._append`L${s},${f}`,n&&(d<0&&(d=d%fp+fp),d>tM?this._append`A${n},${n},0,1,${c},${t-l},${r-u}A${n},${n},0,1,${c},${this._x1=s},${this._y1=f}`:d>Dn&&this._append`A${n},${n},0,${+(d>=cp)},${c},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function Nv(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new nM(t)}function Iv(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function xS(e){this._context=e}xS.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 Tc(e){return new xS(e)}function SS(e){return e[0]}function OS(e){return e[1]}function _S(e,t){var r=Ee(!0),n=null,i=Tc,a=null,o=Nv(l);e=typeof e=="function"?e:e===void 0?SS:Ee(e),t=typeof t=="function"?t:t===void 0?OS:Ee(t);function l(u){var s,f=(u=Iv(u)).length,c,d=!1,p;for(n==null&&(a=i(p=o())),s=0;s<=f;++s)!(s=p;--v)l.point(h[v],S[v]);l.lineEnd(),l.areaEnd()}g&&(h[d]=+e(w,d,c),S[d]=+t(w,d,c),l.point(n?+n(w,d,c):h[d],r?+r(w,d,c):S[d]))}if(y)return l=null,y+""||null}function f(){return _S().defined(i).curve(o).context(a)}return s.x=function(c){return arguments.length?(e=typeof c=="function"?c:Ee(+c),n=null,s):e},s.x0=function(c){return arguments.length?(e=typeof c=="function"?c:Ee(+c),s):e},s.x1=function(c){return arguments.length?(n=c==null?null:typeof c=="function"?c:Ee(+c),s):n},s.y=function(c){return arguments.length?(t=typeof c=="function"?c:Ee(+c),r=null,s):t},s.y0=function(c){return arguments.length?(t=typeof c=="function"?c:Ee(+c),s):t},s.y1=function(c){return arguments.length?(r=c==null?null:typeof c=="function"?c:Ee(+c),s):r},s.lineX0=s.lineY0=function(){return f().x(e).y(t)},s.lineY1=function(){return f().x(e).y(r)},s.lineX1=function(){return f().x(n).y(t)},s.defined=function(c){return arguments.length?(i=typeof c=="function"?c:Ee(!!c),s):i},s.curve=function(c){return arguments.length?(o=c,a!=null&&(l=o(a)),s):o},s.context=function(c){return arguments.length?(c==null?a=l=null:l=o(a=c),s):a},s}class PS{constructor(t,r){this._context=t,this._x=r}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,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function iM(e){return new PS(e,!0)}function aM(e){return new PS(e,!1)}const Dv={draw(e,t){const r=br(t/es);e.moveTo(r,0),e.arc(0,0,r,0,$c)}},oM={draw(e,t){const r=br(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},AS=br(1/3),lM=AS*2,uM={draw(e,t){const r=br(t/lM),n=r*AS;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},sM={draw(e,t){const r=br(t),n=-r/2;e.rect(n,n,r,r)}},cM=.8908130915292852,ES=Ju(es/10)/Ju(7*es/10),fM=Ju($c/10)*ES,dM=-bS($c/10)*ES,pM={draw(e,t){const r=br(t*cM),n=fM*r,i=dM*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const o=$c*a/5,l=bS(o),u=Ju(o);e.lineTo(u*r,-l*r),e.lineTo(l*n-u*i,u*n+l*i)}e.closePath()}},If=br(3),hM={draw(e,t){const r=-br(t/(If*3));e.moveTo(0,r*2),e.lineTo(-If*r,-r),e.lineTo(If*r,-r),e.closePath()}},Ht=-.5,Vt=br(3)/2,dp=1/br(12),vM=(dp/2+1)*3,yM={draw(e,t){const r=br(t/vM),n=r/2,i=r*dp,a=n,o=r*dp+r,l=-a,u=o;e.moveTo(n,i),e.lineTo(a,o),e.lineTo(l,u),e.lineTo(Ht*n-Vt*i,Vt*n+Ht*i),e.lineTo(Ht*a-Vt*o,Vt*a+Ht*o),e.lineTo(Ht*l-Vt*u,Vt*l+Ht*u),e.lineTo(Ht*n+Vt*i,Ht*i-Vt*n),e.lineTo(Ht*a+Vt*o,Ht*o-Vt*a),e.lineTo(Ht*l+Vt*u,Ht*u-Vt*l),e.closePath()}};function mM(e,t){let r=null,n=Nv(i);e=typeof e=="function"?e:Ee(e||Dv),t=typeof t=="function"?t:Ee(t===void 0?64:+t);function i(){let a;if(r||(r=a=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),a)return r=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:Ee(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:Ee(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function ts(){}function rs(e,t,r){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+r)/6)}function $S(e){this._context=e}$S.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:rs(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:rs(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function gM(e){return new $S(e)}function TS(e){this._context=e}TS.prototype={areaStart:ts,areaEnd:ts,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:rs(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function bM(e){return new TS(e)}function jS(e){this._context=e}jS.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 r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:rs(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function wM(e){return new jS(e)}function CS(e){this._context=e}CS.prototype={areaStart:ts,areaEnd:ts,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 xM(e){return new CS(e)}function ug(e){return e<0?-1:1}function sg(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),l=(a*i+o*n)/(n+i);return(ug(a)+ug(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(l))||0}function cg(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Df(e,t,r){var n=e._x0,i=e._y0,a=e._x1,o=e._y1,l=(a-n)/3;e._context.bezierCurveTo(n+l,i+l*t,a-l,o-l*r,a,o)}function ns(e){this._context=e}ns.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:Df(this,this._t0,cg(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 r=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,Df(this,cg(this,r=sg(this,e,t)),r);break;default:Df(this,this._t0,r=sg(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function kS(e){this._context=new MS(e)}(kS.prototype=Object.create(ns.prototype)).point=function(e,t){ns.prototype.point.call(this,t,e)};function MS(e){this._context=e}MS.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,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}};function SM(e){return new ns(e)}function OM(e){return new kS(e)}function NS(e){this._context=e}NS.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,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=fg(e),i=fg(t),a=0,o=1;o=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-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 r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function PM(e){return new jc(e,.5)}function AM(e){return new jc(e,0)}function EM(e){return new jc(e,1)}function Yi(e,t){if((o=e.length)>1)for(var r=1,n,i,a=e[t[0]],o,l=a.length;r=0;)r[t]=t;return r}function $M(e,t){return e[t]}function TM(e){const t=[];return t.key=e,t}function jM(){var e=Ee([]),t=pp,r=Yi,n=$M;function i(a){var o=Array.from(e.apply(this,arguments),TM),l,u=o.length,s=-1,f;for(const c of a)for(l=0,++s;l0){for(var r,n,i=0,a=e[0].length,o;i0){for(var r=0,n=e[t[0]],i,a=n.length;r0)||!((a=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,a,o;n=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function BM(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var IS={symbolCircle:Dv,symbolCross:oM,symbolDiamond:uM,symbolSquare:sM,symbolStar:pM,symbolTriangle:hM,symbolWye:yM},zM=Math.PI/180,FM=function(t){var r="symbol".concat(Ec(t));return IS[r]||Dv},WM=function(t,r,n){if(r==="area")return t;switch(n){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*zM;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}},UM=function(t,r){IS["symbol".concat(Ec(t))]=r},Lv=function(t){var r=t.type,n=r===void 0?"circle":r,i=t.size,a=i===void 0?64:i,o=t.sizeType,l=o===void 0?"area":o,u=RM(t,NM),s=pg(pg({},u),{},{type:n,size:a,sizeType:l}),f=function(){var w=FM(n),g=mM().type(w).size(WM(a,l,n));return g()},c=s.className,d=s.cx,p=s.cy,v=de(s,!0);return d===+d&&p===+p&&a===+a?A.createElement("path",hp({},v,{className:ve("recharts-symbols",c),transform:"translate(".concat(d,", ").concat(p,")"),d:f()})):null};Lv.registerSymbol=UM;function Qi(e){"@babel/helpers - typeof";return Qi=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},Qi(e)}function vp(){return vp=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var y=p.inactive?s:p.color;return A.createElement("li",vp({className:w,style:c,key:"legend-item-".concat(v)},Zu(n.props,p,v)),A.createElement(op,{width:o,height:o,viewBox:f,style:d},n.renderIcon(p)),A.createElement("span",{className:"recharts-legend-item-text",style:{color:y}},b?b(g,p,v):g))})}},{key:"render",value:function(){var n=this.props,i=n.payload,a=n.layout,o=n.align;if(!i||!i.length)return null;var l={padding:0,margin:0,textAlign:a==="horizontal"?o:"left"};return A.createElement("ul",{className:"recharts-default-legend",style:l},this.renderItems())}}])}(N.PureComponent);Lo(Rv,"displayName","Legend");Lo(Rv,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var JM=hc;function e2(){this.__data__=new JM,this.size=0}var t2=e2;function r2(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var n2=r2;function i2(e){return this.__data__.get(e)}var a2=i2;function o2(e){return this.__data__.has(e)}var l2=o2,u2=hc,s2=Pv,c2=Av,f2=200;function d2(e,t){var r=this.__data__;if(r instanceof u2){var n=r.__data__;if(!s2||n.lengthl))return!1;var s=a.get(e),f=a.get(t);if(s&&f)return s==t&&f==e;var c=-1,d=!0,p=r&N2?new j2:void 0;for(a.set(e,t),a.set(t,e);++c-1&&e%1==0&&e-1&&e%1==0&&e<=RN}var Wv=BN,zN=Zr,FN=Wv,WN=Jr,UN="[object Arguments]",HN="[object Array]",VN="[object Boolean]",GN="[object Date]",KN="[object Error]",qN="[object Function]",XN="[object Map]",YN="[object Number]",QN="[object Object]",ZN="[object RegExp]",JN="[object Set]",eI="[object String]",tI="[object WeakMap]",rI="[object ArrayBuffer]",nI="[object DataView]",iI="[object Float32Array]",aI="[object Float64Array]",oI="[object Int8Array]",lI="[object Int16Array]",uI="[object Int32Array]",sI="[object Uint8Array]",cI="[object Uint8ClampedArray]",fI="[object Uint16Array]",dI="[object Uint32Array]",je={};je[iI]=je[aI]=je[oI]=je[lI]=je[uI]=je[sI]=je[cI]=je[fI]=je[dI]=!0;je[UN]=je[HN]=je[rI]=je[VN]=je[nI]=je[GN]=je[KN]=je[qN]=je[XN]=je[YN]=je[QN]=je[ZN]=je[JN]=je[eI]=je[tI]=!1;function pI(e){return WN(e)&&FN(e.length)&&!!je[zN(e)]}var hI=pI;function vI(e){return function(t){return e(t)}}var GS=vI,ls={exports:{}};ls.exports;(function(e,t){var r=eS,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===n,o=a&&r.process,l=function(){try{var u=i&&i.require&&i.require("util").types;return u||o&&o.binding&&o.binding("util")}catch{}}();e.exports=l})(ls,ls.exports);var yI=ls.exports,mI=hI,gI=GS,wg=yI,xg=wg&&wg.isTypedArray,bI=xg?gI(xg):mI,KS=bI,wI=ON,xI=zv,SI=Ct,OI=VS,_I=Fv,PI=KS,AI=Object.prototype,EI=AI.hasOwnProperty;function $I(e,t){var r=SI(e),n=!r&&xI(e),i=!r&&!n&&OI(e),a=!r&&!n&&!i&&PI(e),o=r||n||i||a,l=o?wI(e.length,String):[],u=l.length;for(var s in e)(t||EI.call(e,s))&&!(o&&(s=="length"||i&&(s=="offset"||s=="parent")||a&&(s=="buffer"||s=="byteLength"||s=="byteOffset")||_I(s,u)))&&l.push(s);return l}var TI=$I,jI=Object.prototype;function CI(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||jI;return e===r}var kI=CI;function MI(e,t){return function(r){return e(t(r))}}var qS=MI,NI=qS,II=NI(Object.keys,Object),DI=II,LI=kI,RI=DI,BI=Object.prototype,zI=BI.hasOwnProperty;function FI(e){if(!LI(e))return RI(e);var t=[];for(var r in Object(e))zI.call(e,r)&&r!="constructor"&&t.push(r);return t}var WI=FI,UI=Ov,HI=Wv;function VI(e){return e!=null&&HI(e.length)&&!UI(e)}var Al=VI,GI=TI,KI=WI,qI=Al;function XI(e){return qI(e)?GI(e):KI(e)}var Cc=XI,YI=fN,QI=xN,ZI=Cc;function JI(e){return YI(e,ZI,QI)}var eD=JI,Sg=eD,tD=1,rD=Object.prototype,nD=rD.hasOwnProperty;function iD(e,t,r,n,i,a){var o=r&tD,l=Sg(e),u=l.length,s=Sg(t),f=s.length;if(u!=f&&!o)return!1;for(var c=u;c--;){var d=l[c];if(!(o?d in t:nD.call(t,d)))return!1}var p=a.get(e),v=a.get(t);if(p&&v)return p==t&&v==e;var b=!0;a.set(e,t),a.set(t,e);for(var w=o;++c-1}var rR=tR;function nR(e,t,r){for(var n=-1,i=e==null?0:e.length;++n=gR){var s=t?null:yR(e);if(s)return mR(s);o=!1,i=vR,u=new dR}else u=t?[]:l;e:for(;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function NR(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function IR(e){return e.value}function DR(e,t){if(A.isValidElement(e))return A.cloneElement(e,t);if(typeof e=="function")return A.createElement(e,t);t.ref;var r=MR(t,PR);return A.createElement(Rv,r)}var Rg=1,qn=function(e){function t(){var r;AR(this,t);for(var n=arguments.length,i=new Array(n),a=0;aRg||Math.abs(i.height-this.lastBoundingBox.height)>Rg)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,n&&n(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,n&&n(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Cr({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var i=this.props,a=i.layout,o=i.align,l=i.verticalAlign,u=i.margin,s=i.chartWidth,f=i.chartHeight,c,d;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(o==="center"&&a==="vertical"){var p=this.getBBoxSnapshot();c={left:((s||0)-p.width)/2}}else c=o==="right"?{right:u&&u.right||0}:{left:u&&u.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(l==="middle"){var v=this.getBBoxSnapshot();d={top:((f||0)-v.height)/2}}else d=l==="bottom"?{bottom:u&&u.bottom||0}:{top:u&&u.top||0};return Cr(Cr({},c),d)}},{key:"render",value:function(){var n=this,i=this.props,a=i.content,o=i.width,l=i.height,u=i.wrapperStyle,s=i.payloadUniqBy,f=i.payload,c=Cr(Cr({position:"absolute",width:o||"auto",height:l||"auto"},this.getDefaultPosition(u)),u);return A.createElement("div",{className:"recharts-legend-wrapper",style:c,ref:function(p){n.wrapperNode=p}},DR(a,Cr(Cr({},this.props),{},{payload:tO(f,s,IR)})))}}],[{key:"getWithHeight",value:function(n,i){var a=Cr(Cr({},this.defaultProps),n.props),o=a.layout;return o==="vertical"&&X(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||i}:null}}])}(N.PureComponent);kc(qn,"displayName","Legend");kc(qn,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Bg=Ol,LR=zv,RR=Ct,zg=Bg?Bg.isConcatSpreadable:void 0;function BR(e){return RR(e)||LR(e)||!!(zg&&e&&e[zg])}var zR=BR,FR=US,WR=zR;function iO(e,t,r,n,i){var a=-1,o=e.length;for(r||(r=WR),i||(i=[]);++a0&&r(l)?t>1?iO(l,t-1,r,n,i):FR(i,l):n||(i[i.length]=l)}return i}var aO=iO;function UR(e){return function(t,r,n){for(var i=-1,a=Object(t),o=n(t),l=o.length;l--;){var u=o[e?l:++i];if(r(a[u],u,a)===!1)break}return t}}var HR=UR,VR=HR,GR=VR(),KR=GR,qR=KR,XR=Cc;function YR(e,t){return e&&qR(e,t,XR)}var oO=YR,QR=Al;function ZR(e,t){return function(r,n){if(r==null)return r;if(!QR(r))return e(r,n);for(var i=r.length,a=t?i:-1,o=Object(r);(t?a--:++at||a&&o&&u&&!l&&!s||n&&o&&u||!r&&u||!i)return 1;if(!n&&!a&&!s&&e=l)return u;var s=r[n];return u*(s=="desc"?-1:1)}}return e.index-t.index}var d3=f3,zf=$v,p3=Tv,h3=$n,v3=lO,y3=l3,m3=GS,g3=d3,b3=$a,w3=Ct;function x3(e,t,r){t.length?t=zf(t,function(a){return w3(a)?function(o){return p3(o,a.length===1?a[0]:a)}:a}):t=[b3];var n=-1;t=zf(t,m3(h3));var i=v3(e,function(a,o,l){var u=zf(t,function(s){return s(a)});return{criteria:u,index:++n,value:a}});return y3(i,function(a,o){return g3(a,o,r)})}var S3=x3;function O3(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var _3=O3,P3=_3,Wg=Math.max;function A3(e,t,r){return t=Wg(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,a=Wg(n.length-t,0),o=Array(a);++i0){if(++t>=D3)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var z3=B3,F3=I3,W3=z3,U3=W3(F3),H3=U3,V3=$a,G3=E3,K3=H3;function q3(e,t){return K3(G3(e,t,V3),e+"")}var X3=q3,Y3=_v,Q3=Al,Z3=Fv,J3=En;function eB(e,t,r){if(!J3(r))return!1;var n=typeof t;return(n=="number"?Q3(r)&&Z3(t,r.length):n=="string"&&t in r)?Y3(r[t],e):!1}var Mc=eB,tB=aO,rB=S3,nB=X3,Hg=Mc,iB=nB(function(e,t){if(e==null)return[];var r=t.length;return r>1&&Hg(e,t[0],t[1])?t=[]:r>2&&Hg(t[0],t[1],t[2])&&(t=[t[0]]),rB(e,tB(t,1),[])}),aB=iB;const Vv=Ae(aB);function Ro(e){"@babel/helpers - typeof";return Ro=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},Ro(e)}function Op(){return Op=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=t.x),"".concat(Ua,"-left"),X(r)&&t&&X(t.x)&&r=t.y),"".concat(Ua,"-top"),X(n)&&t&&X(t.y)&&nb?Math.max(f,u[n]):Math.max(c,u[n])}function wB(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function xB(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,i=e.position,a=e.reverseDirection,o=e.tooltipBox,l=e.useTranslate3d,u=e.viewBox,s,f,c;return o.height>0&&o.width>0&&r?(f=Kg({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:u,viewBoxDimension:u.width}),c=Kg({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:u,viewBoxDimension:u.height}),s=wB({translateX:f,translateY:c,useTranslate3d:l})):s=gB,{cssProperties:s,cssClasses:bB({translateX:f,translateY:c,coordinate:r})}}function Ji(e){"@babel/helpers - typeof";return Ji=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},Ji(e)}function qg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Xg(e){for(var t=1;tYg||Math.abs(n.height-this.state.lastBoundingBox.height)>Yg)&&this.setState({lastBoundingBox:{width:n.width,height:n.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 n,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.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 n=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,l=i.animationDuration,u=i.animationEasing,s=i.children,f=i.coordinate,c=i.hasPayload,d=i.isAnimationActive,p=i.offset,v=i.position,b=i.reverseDirection,w=i.useTranslate3d,g=i.viewBox,y=i.wrapperStyle,h=xB({allowEscapeViewBox:o,coordinate:f,offsetTopLeft:p,position:v,reverseDirection:b,tooltipBox:this.state.lastBoundingBox,useTranslate3d:w,viewBox:g}),S=h.cssClasses,m=h.cssProperties,x=Xg(Xg({transition:d&&a?"transform ".concat(l,"ms ").concat(u):void 0},m),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&c?"visible":"hidden",position:"absolute",top:0,left:0},y);return A.createElement("div",{tabIndex:-1,className:S,style:x,ref:function(_){n.wrapperNode=_}},s)}}])}(N.PureComponent),CB=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Ta={isSsr:CB()};function ea(e){"@babel/helpers - typeof";return ea=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},ea(e)}function Qg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Zg(e){for(var t=1;t0;return A.createElement(jB,{allowEscapeViewBox:o,animationDuration:l,animationEasing:u,isAnimationActive:d,active:a,coordinate:f,hasPayload:x,offset:p,position:w,reverseDirection:g,useTranslate3d:y,viewBox:h,wrapperStyle:S},FB(s,Zg(Zg({},this.props),{},{payload:m})))}}])}(N.PureComponent);Gv(Sr,"displayName","Tooltip");Gv(Sr,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Ta.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 WB=jr,UB=function(){return WB.Date.now()},HB=UB,VB=/\s/;function GB(e){for(var t=e.length;t--&&VB.test(e.charAt(t)););return t}var KB=GB,qB=KB,XB=/^\s+/;function YB(e){return e&&e.slice(0,qB(e)+1).replace(XB,"")}var QB=YB,ZB=QB,Jg=En,JB=xa,e0=NaN,ez=/^[-+]0x[0-9a-f]+$/i,tz=/^0b[01]+$/i,rz=/^0o[0-7]+$/i,nz=parseInt;function iz(e){if(typeof e=="number")return e;if(JB(e))return e0;if(Jg(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Jg(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=ZB(e);var r=tz.test(e);return r||rz.test(e)?nz(e.slice(2),r?2:8):ez.test(e)?e0:+e}var pO=iz,az=En,Wf=HB,t0=pO,oz="Expected a function",lz=Math.max,uz=Math.min;function sz(e,t,r){var n,i,a,o,l,u,s=0,f=!1,c=!1,d=!0;if(typeof e!="function")throw new TypeError(oz);t=t0(t)||0,az(r)&&(f=!!r.leading,c="maxWait"in r,a=c?lz(t0(r.maxWait)||0,t):a,d="trailing"in r?!!r.trailing:d);function p(x){var O=n,_=i;return n=i=void 0,s=x,o=e.apply(_,O),o}function v(x){return s=x,l=setTimeout(g,t),f?p(x):o}function b(x){var O=x-u,_=x-s,P=t-O;return c?uz(P,a-_):P}function w(x){var O=x-u,_=x-s;return u===void 0||O>=t||O<0||c&&_>=a}function g(){var x=Wf();if(w(x))return y(x);l=setTimeout(g,b(x))}function y(x){return l=void 0,d&&n?p(x):(n=i=void 0,o)}function h(){l!==void 0&&clearTimeout(l),s=0,n=u=i=l=void 0}function S(){return l===void 0?o:y(Wf())}function m(){var x=Wf(),O=w(x);if(n=arguments,i=this,u=x,O){if(l===void 0)return v(u);if(c)return clearTimeout(l),l=setTimeout(g,t),p(u)}return l===void 0&&(l=setTimeout(g,t)),o}return m.cancel=h,m.flush=S,m}var cz=sz,fz=cz,dz=En,pz="Expected a function";function hz(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError(pz);return dz(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),fz(e,t,{leading:n,maxWait:t,trailing:i})}var vz=hz;const hO=Ae(vz);function zo(e){"@babel/helpers - typeof";return zo=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},zo(e)}function r0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function nu(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&(L=hO(L,b,{trailing:!0,leading:!1}));var B=new ResizeObserver(L),M=m.current.getBoundingClientRect(),z=M.width,U=M.height;return $(z,U),B.observe(m.current),function(){B.disconnect()}},[$,b]);var j=N.useMemo(function(){var L=P.containerWidth,B=P.containerHeight;if(L<0||B<0)return null;Fr(Wn(o)||Wn(u),`The width(%s) and height(%s) are both fixed numbers, + maybe you don't need to use a ResponsiveContainer.`,o,u),Fr(!r||r>0,"The aspect(%s) must be greater than zero.",r);var M=Wn(o)?L:o,z=Wn(u)?B:u;r&&r>0&&(M?z=M/r:z&&(M=z*r),d&&z>d&&(z=d)),Fr(M>0||z>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.`,M,z,o,u,f,c,r);var U=!Array.isArray(p)&&zr(p.type).endsWith("Chart");return A.Children.map(p,function(C){return A.isValidElement(C)?N.cloneElement(C,nu({width:M,height:z},U?{style:nu({height:"100%",width:"100%",maxHeight:z,maxWidth:M},C.props.style)}:{})):C})},[r,p,u,d,c,f,P,o]);return A.createElement("div",{id:w?"".concat(w):void 0,className:ve("recharts-responsive-container",g),style:nu(nu({},S),{},{width:o,height:u,minWidth:f,minHeight:c,maxHeight:d}),ref:m},j)}),vO=function(t){return null};vO.displayName="Cell";function Fo(e){"@babel/helpers - typeof";return Fo=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},Fo(e)}function i0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ep(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Ta.isSsr)return{width:0,height:0};var n=jz(r),i=JSON.stringify({text:t,copyStyle:n});if(vi.widthCache[i])return vi.widthCache[i];try{var a=document.getElementById(a0);a||(a=document.createElement("span"),a.setAttribute("id",a0),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=Ep(Ep({},Tz),n);Object.assign(a.style,o),a.textContent="".concat(t);var l=a.getBoundingClientRect(),u={width:l.width,height:l.height};return vi.widthCache[i]=u,++vi.cacheCount>$z&&(vi.cacheCount=0,vi.widthCache={}),u}catch{return{width:0,height:0}}},Cz=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Wo(e){"@babel/helpers - typeof";return Wo=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},Wo(e)}function fs(e,t){return Iz(e)||Nz(e,t)||Mz(e,t)||kz()}function kz(){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 Mz(e,t){if(e){if(typeof e=="string")return o0(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o0(e,t)}}function o0(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Xz(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function d0(e,t){return Jz(e)||Zz(e,t)||Qz(e,t)||Yz()}function Yz(){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 Qz(e,t){if(e){if(typeof e=="string")return p0(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return p0(e,t)}}function p0(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&arguments[0]!==void 0?arguments[0]:[];return M.reduce(function(z,U){var C=U.word,D=U.width,W=z[z.length-1];if(W&&(i==null||a||W.width+D+nU.width?z:U})};if(!f)return p;for(var b="…",w=function(M){var z=c.slice(0,M),U=bO({breakAll:s,style:u,children:z+b}).wordsWithComputedWidth,C=d(U),D=C.length>o||v(C).width>Number(i);return[D,C]},g=0,y=c.length-1,h=0,S;g<=y&&h<=c.length-1;){var m=Math.floor((g+y)/2),x=m-1,O=w(x),_=d0(O,2),P=_[0],T=_[1],$=w(m),j=d0($,1),L=j[0];if(!P&&!L&&(g=m+1),P&&L&&(y=m-1),!P&&L){S=T;break}h++}return S||p},h0=function(t){var r=fe(t)?[]:t.toString().split(gO);return[{words:r}]},t4=function(t){var r=t.width,n=t.scaleToFit,i=t.children,a=t.style,o=t.breakAll,l=t.maxLines;if((r||n)&&!Ta.isSsr){var u,s,f=bO({breakAll:o,children:i,style:a});if(f){var c=f.wordsWithComputedWidth,d=f.spaceWidth;u=c,s=d}else return h0(i);return e4({breakAll:o,children:i,maxLines:l,style:a},u,s,r,n)}return h0(i)},v0="#808080",ds=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.lineHeight,l=o===void 0?"1em":o,u=t.capHeight,s=u===void 0?"0.71em":u,f=t.scaleToFit,c=f===void 0?!1:f,d=t.textAnchor,p=d===void 0?"start":d,v=t.verticalAnchor,b=v===void 0?"end":v,w=t.fill,g=w===void 0?v0:w,y=f0(t,Kz),h=N.useMemo(function(){return t4({breakAll:y.breakAll,children:y.children,maxLines:y.maxLines,scaleToFit:c,style:y.style,width:y.width})},[y.breakAll,y.children,y.maxLines,c,y.style,y.width]),S=y.dx,m=y.dy,x=y.angle,O=y.className,_=y.breakAll,P=f0(y,qz);if(!Xe(n)||!Xe(a))return null;var T=n+(X(S)?S:0),$=a+(X(m)?m:0),j;switch(b){case"start":j=Uf("calc(".concat(s,")"));break;case"middle":j=Uf("calc(".concat((h.length-1)/2," * -").concat(l," + (").concat(s," / 2))"));break;default:j=Uf("calc(".concat(h.length-1," * -").concat(l,")"));break}var L=[];if(c){var B=h[0].width,M=y.width;L.push("scale(".concat((X(M)?M/B:1)/B,")"))}return x&&L.push("rotate(".concat(x,", ").concat(T,", ").concat($,")")),L.length&&(P.transform=L.join(" ")),A.createElement("text",$p({},de(P,!0),{x:T,y:$,className:ve("recharts-text",O),textAnchor:p,fill:g.includes("url")?v0:g}),h.map(function(z,U){var C=z.words.join(_?"":" ");return A.createElement("tspan",{x:T,dy:U===0?j:l,key:"".concat(C,"-").concat(U)},C)}))};function wn(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function r4(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function Kv(e){let t,r,n;e.length!==2?(t=wn,r=(l,u)=>wn(e(l),u),n=(l,u)=>e(l)-u):(t=e===wn||e===r4?e:n4,r=e,n=e);function i(l,u,s=0,f=l.length){if(s>>1;r(l[c],u)<0?s=c+1:f=c}while(s>>1;r(l[c],u)<=0?s=c+1:f=c}while(ss&&n(l[c-1],u)>-n(l[c],u)?c-1:c}return{left:i,center:o,right:a}}function n4(){return 0}function wO(e){return e===null?NaN:+e}function*i4(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const a4=Kv(wn),El=a4.right;Kv(wO).center;class y0 extends Map{constructor(t,r=u4){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(m0(this,t))}has(t){return super.has(m0(this,t))}set(t,r){return super.set(o4(this,t),r)}delete(t){return super.delete(l4(this,t))}}function m0({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function o4({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function l4({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function u4(e){return e!==null&&typeof e=="object"?e.valueOf():e}function s4(e=wn){if(e===wn)return xO;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function xO(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const c4=Math.sqrt(50),f4=Math.sqrt(10),d4=Math.sqrt(2);function ps(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),o=a>=c4?10:a>=f4?5:a>=d4?2:1;let l,u,s;return i<0?(s=Math.pow(10,-i)/o,l=Math.round(e*s),u=Math.round(t*s),l/st&&--u,s=-s):(s=Math.pow(10,i)*o,l=Math.round(e/s),u=Math.round(t/s),l*st&&--u),u0))return[];if(e===t)return[e];const n=t=i))return[];const l=a-i+1,u=new Array(l);if(n)if(o<0)for(let s=0;s=n)&&(r=n);return r}function b0(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function SO(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=i===void 0?xO:s4(i);n>r;){if(n-r>600){const u=n-r+1,s=t-r+1,f=Math.log(u),c=.5*Math.exp(2*f/3),d=.5*Math.sqrt(f*c*(u-c)/u)*(s-u/2<0?-1:1),p=Math.max(r,Math.floor(t-s*c/u+d)),v=Math.min(n,Math.floor(t+(u-s)*c/u+d));SO(e,t,p,v,i)}const a=e[t];let o=r,l=n;for(Ha(e,r,t),i(e[n],a)>0&&Ha(e,r,n);o0;)--l}i(e[r],a)===0?Ha(e,r,l):(++l,Ha(e,l,n)),l<=t&&(r=l+1),t<=l&&(n=l-1)}return e}function Ha(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function p4(e,t,r){if(e=Float64Array.from(i4(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return b0(e);if(t>=1)return g0(e);var n,i=(n-1)*t,a=Math.floor(i),o=g0(SO(e,a).subarray(0,a+1)),l=b0(e.subarray(a+1));return o+(l-o)*(i-a)}}function h4(e,t,r=wO){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,a=Math.floor(i),o=+r(e[a],a,e),l=+r(e[a+1],a+1,e);return o+(l-o)*(i-a)}}function v4(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(i);++n>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?au(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?au(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=m4.exec(e))?new Et(t[1],t[2],t[3],1):(t=g4.exec(e))?new Et(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=b4.exec(e))?au(t[1],t[2],t[3],t[4]):(t=w4.exec(e))?au(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=x4.exec(e))?A0(t[1],t[2]/100,t[3]/100,1):(t=S4.exec(e))?A0(t[1],t[2]/100,t[3]/100,t[4]):w0.hasOwnProperty(e)?O0(w0[e]):e==="transparent"?new Et(NaN,NaN,NaN,0):null}function O0(e){return new Et(e>>16&255,e>>8&255,e&255,1)}function au(e,t,r,n){return n<=0&&(e=t=r=NaN),new Et(e,t,r,n)}function P4(e){return e instanceof $l||(e=Go(e)),e?(e=e.rgb(),new Et(e.r,e.g,e.b,e.opacity)):new Et}function Mp(e,t,r,n){return arguments.length===1?P4(e):new Et(e,t,r,n??1)}function Et(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Xv(Et,Mp,_O($l,{brighter(e){return e=e==null?hs:Math.pow(hs,e),new Et(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ho:Math.pow(Ho,e),new Et(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Et(Xn(this.r),Xn(this.g),Xn(this.b),vs(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:_0,formatHex:_0,formatHex8:A4,formatRgb:P0,toString:P0}));function _0(){return`#${Un(this.r)}${Un(this.g)}${Un(this.b)}`}function A4(){return`#${Un(this.r)}${Un(this.g)}${Un(this.b)}${Un((isNaN(this.opacity)?1:this.opacity)*255)}`}function P0(){const e=vs(this.opacity);return`${e===1?"rgb(":"rgba("}${Xn(this.r)}, ${Xn(this.g)}, ${Xn(this.b)}${e===1?")":`, ${e})`}`}function vs(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Xn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Un(e){return e=Xn(e),(e<16?"0":"")+e.toString(16)}function A0(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new hr(e,t,r,n)}function PO(e){if(e instanceof hr)return new hr(e.h,e.s,e.l,e.opacity);if(e instanceof $l||(e=Go(e)),!e)return new hr;if(e instanceof hr)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=NaN,l=a-i,u=(a+i)/2;return l?(t===a?o=(r-n)/l+(r0&&u<1?0:o,new hr(o,l,u,e.opacity)}function E4(e,t,r,n){return arguments.length===1?PO(e):new hr(e,t,r,n??1)}function hr(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Xv(hr,E4,_O($l,{brighter(e){return e=e==null?hs:Math.pow(hs,e),new hr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ho:Math.pow(Ho,e),new hr(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,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new Et(Hf(e>=240?e-240:e+120,i,n),Hf(e,i,n),Hf(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new hr(E0(this.h),ou(this.s),ou(this.l),vs(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=vs(this.opacity);return`${e===1?"hsl(":"hsla("}${E0(this.h)}, ${ou(this.s)*100}%, ${ou(this.l)*100}%${e===1?")":`, ${e})`}`}}));function E0(e){return e=(e||0)%360,e<0?e+360:e}function ou(e){return Math.max(0,Math.min(1,e||0))}function Hf(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Yv=e=>()=>e;function $4(e,t){return function(r){return e+r*t}}function T4(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function j4(e){return(e=+e)==1?AO:function(t,r){return r-t?T4(t,r,e):Yv(isNaN(t)?r:t)}}function AO(e,t){var r=t-e;return r?$4(e,r):Yv(isNaN(e)?t:e)}const $0=function e(t){var r=j4(t);function n(i,a){var o=r((i=Mp(i)).r,(a=Mp(a)).r),l=r(i.g,a.g),u=r(i.b,a.b),s=AO(i.opacity,a.opacity);return function(f){return i.r=o(f),i.g=l(f),i.b=u(f),i.opacity=s(f),i+""}}return n.gamma=e,n}(1);function C4(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(a){for(i=0;ir&&(a=t.slice(r,a),l[o]?l[o]+=a:l[++o]=a),(n=n[0])===(i=i[0])?l[o]?l[o]+=i:l[++o]=i:(l[++o]=null,u.push({i:o,x:ys(n,i)})),r=Vf.lastIndex;return rt&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function W4(e,t,r){var n=e[0],i=e[1],a=t[0],o=t[1];return i2?U4:W4,u=s=null,c}function c(d){return d==null||isNaN(d=+d)?a:(u||(u=l(e.map(n),t,r)))(n(o(d)))}return c.invert=function(d){return o(i((s||(s=l(t,e.map(n),ys)))(d)))},c.domain=function(d){return arguments.length?(e=Array.from(d,ms),f()):e.slice()},c.range=function(d){return arguments.length?(t=Array.from(d),f()):t.slice()},c.rangeRound=function(d){return t=Array.from(d),r=Qv,f()},c.clamp=function(d){return arguments.length?(o=d?!0:wt,f()):o!==wt},c.interpolate=function(d){return arguments.length?(r=d,f()):r},c.unknown=function(d){return arguments.length?(a=d,c):a},function(d,p){return n=d,i=p,f()}}function Zv(){return Nc()(wt,wt)}function H4(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function gs(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function ta(e){return e=gs(Math.abs(e)),e?e[1]:NaN}function V4(e,t){return function(r,n){for(var i=r.length,a=[],o=0,l=e[0],u=0;i>0&&l>0&&(u+l+1>n&&(l=Math.max(1,n-u)),a.push(r.substring(i-=l,i+l)),!((u+=l+1)>n));)l=e[o=(o+1)%e.length];return a.reverse().join(t)}}function G4(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var K4=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ko(e){if(!(t=K4.exec(e)))throw new Error("invalid format: "+e);var t;return new Jv({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]})}Ko.prototype=Jv.prototype;function Jv(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+""}Jv.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 q4(e){e:for(var t=e.length,r=1,n=-1,i;r0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var EO;function X4(e,t){var r=gs(e,t);if(!r)return e+"";var n=r[0],i=r[1],a=i-(EO=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=n.length;return a===o?n:a>o?n+new Array(a-o+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+gs(e,Math.max(0,t+a-1))[0]}function j0(e,t){var r=gs(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const C0={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:H4,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)=>j0(e*100,t),r:j0,s:X4,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function k0(e){return e}var M0=Array.prototype.map,N0=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Y4(e){var t=e.grouping===void 0||e.thousands===void 0?k0:V4(M0.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?k0:G4(M0.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"−":e.minus+"",u=e.nan===void 0?"NaN":e.nan+"";function s(c){c=Ko(c);var d=c.fill,p=c.align,v=c.sign,b=c.symbol,w=c.zero,g=c.width,y=c.comma,h=c.precision,S=c.trim,m=c.type;m==="n"?(y=!0,m="g"):C0[m]||(h===void 0&&(h=12),S=!0,m="g"),(w||d==="0"&&p==="=")&&(w=!0,d="0",p="=");var x=b==="$"?r:b==="#"&&/[boxX]/.test(m)?"0"+m.toLowerCase():"",O=b==="$"?n:/[%p]/.test(m)?o:"",_=C0[m],P=/[defgprs%]/.test(m);h=h===void 0?6:/[gprs]/.test(m)?Math.max(1,Math.min(21,h)):Math.max(0,Math.min(20,h));function T($){var j=x,L=O,B,M,z;if(m==="c")L=_($)+L,$="";else{$=+$;var U=$<0||1/$<0;if($=isNaN($)?u:_(Math.abs($),h),S&&($=q4($)),U&&+$==0&&v!=="+"&&(U=!1),j=(U?v==="("?v:l:v==="-"||v==="("?"":v)+j,L=(m==="s"?N0[8+EO/3]:"")+L+(U&&v==="("?")":""),P){for(B=-1,M=$.length;++Bz||z>57){L=(z===46?i+$.slice(B+1):$.slice(B))+L,$=$.slice(0,B);break}}}y&&!w&&($=t($,1/0));var C=j.length+$.length+L.length,D=C>1)+j+$+L+D.slice(C);break;default:$=D+j+$+L;break}return a($)}return T.toString=function(){return c+""},T}function f(c,d){var p=s((c=Ko(c),c.type="f",c)),v=Math.max(-8,Math.min(8,Math.floor(ta(d)/3)))*3,b=Math.pow(10,-v),w=N0[8+v/3];return function(g){return p(b*g)+w}}return{format:s,formatPrefix:f}}var lu,ey,$O;Q4({thousands:",",grouping:[3],currency:["$",""]});function Q4(e){return lu=Y4(e),ey=lu.format,$O=lu.formatPrefix,lu}function Z4(e){return Math.max(0,-ta(Math.abs(e)))}function J4(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ta(t)/3)))*3-ta(Math.abs(e)))}function eF(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,ta(t)-ta(e))+1}function TO(e,t,r,n){var i=Cp(e,t,r),a;switch(n=Ko(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=J4(i,o))&&(n.precision=a),$O(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=eF(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=Z4(i))&&(n.precision=a-(n.type==="%")*2);break}}return ey(n)}function Tn(e){var t=e.domain;return e.ticks=function(r){var n=t();return Tp(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return TO(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,a=n.length-1,o=n[i],l=n[a],u,s,f=10;for(l0;){if(s=jp(o,l,r),s===u)return n[i]=o,n[a]=l,t(n);if(s>0)o=Math.floor(o/s)*s,l=Math.ceil(l/s)*s;else if(s<0)o=Math.ceil(o*s)/s,l=Math.floor(l*s)/s;else break;u=s}return e},e}function bs(){var e=Zv();return e.copy=function(){return Tl(e,bs())},ir.apply(e,arguments),Tn(e)}function jO(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,ms),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return jO(e).unknown(t)},e=arguments.length?Array.from(e,ms):[0,1],Tn(r)}function CO(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],a=e[n],o;return aMath.pow(e,t)}function aF(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 L0(e){return(t,r)=>-e(-t,r)}function ty(e){const t=e(I0,D0),r=t.domain;let n=10,i,a;function o(){return i=aF(n),a=iF(n),r()[0]<0?(i=L0(i),a=L0(a),e(tF,rF)):e(I0,D0),t}return t.base=function(l){return arguments.length?(n=+l,o()):n},t.domain=function(l){return arguments.length?(r(l),o()):r()},t.ticks=l=>{const u=r();let s=u[0],f=u[u.length-1];const c=f0){for(;d<=p;++d)for(v=1;vf)break;g.push(b)}}else for(;d<=p;++d)for(v=n-1;v>=1;--v)if(b=d>0?v/a(-d):v*a(d),!(bf)break;g.push(b)}g.length*2{if(l==null&&(l=10),u==null&&(u=n===10?"s":","),typeof u!="function"&&(!(n%1)&&(u=Ko(u)).precision==null&&(u.trim=!0),u=ey(u)),l===1/0)return u;const s=Math.max(1,n*l/t.ticks().length);return f=>{let c=f/a(Math.round(i(f)));return c*nr(CO(r(),{floor:l=>a(Math.floor(i(l))),ceil:l=>a(Math.ceil(i(l)))})),t}function kO(){const e=ty(Nc()).domain([1,10]);return e.copy=()=>Tl(e,kO()).base(e.base()),ir.apply(e,arguments),e}function R0(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function B0(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function ry(e){var t=1,r=e(R0(t),B0(t));return r.constant=function(n){return arguments.length?e(R0(t=+n),B0(t)):t},Tn(r)}function MO(){var e=ry(Nc());return e.copy=function(){return Tl(e,MO()).constant(e.constant())},ir.apply(e,arguments)}function z0(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function oF(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function lF(e){return e<0?-e*e:e*e}function ny(e){var t=e(wt,wt),r=1;function n(){return r===1?e(wt,wt):r===.5?e(oF,lF):e(z0(r),z0(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},Tn(t)}function iy(){var e=ny(Nc());return e.copy=function(){return Tl(e,iy()).exponent(e.exponent())},ir.apply(e,arguments),e}function uF(){return iy.apply(null,arguments).exponent(.5)}function F0(e){return Math.sign(e)*e*e}function sF(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function NO(){var e=Zv(),t=[0,1],r=!1,n;function i(a){var o=sF(e(a));return isNaN(o)?n:r?Math.round(o):o}return i.invert=function(a){return e.invert(F0(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,ms)).map(F0)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(r=!!a,i):r},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return NO(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},ir.apply(i,arguments),Tn(i)}function IO(){var e=[],t=[],r=[],n;function i(){var o=0,l=Math.max(1,t.length);for(r=new Array(l-1);++o0?r[l-1]:e[0],l=r?[n[r-1],t]:[n[s-1],n[s]]},o.unknown=function(u){return arguments.length&&(a=u),o},o.thresholds=function(){return n.slice()},o.copy=function(){return DO().domain([e,t]).range(i).unknown(a)},ir.apply(Tn(o),arguments)}function LO(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[El(e,a,0,n)]:r}return i.domain=function(a){return arguments.length?(e=Array.from(a),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return LO().domain(e).range(t).unknown(r)},ir.apply(i,arguments)}const Gf=new Date,Kf=new Date;function Ye(e,t,r,n){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),l=i.ceil(a);return a-o(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,l)=>{const u=[];if(a=i.ceil(a),l=l==null?1:Math.floor(l),!(a0))return u;let s;do u.push(s=new Date(+a)),t(a,l),e(a);while(sYe(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,l)=>{if(o>=o)if(l<0)for(;++l<=0;)for(;t(o,-1),!a(o););else for(;--l>=0;)for(;t(o,1),!a(o););}),r&&(i.count=(a,o)=>(Gf.setTime(+a),Kf.setTime(+o),e(Gf),e(Kf),Math.floor(r(Gf,Kf))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?o=>n(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const ws=Ye(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);ws.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Ye(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):ws);ws.range;const Dr=1e3,Yt=Dr*60,Lr=Yt*60,Kr=Lr*24,ay=Kr*7,W0=Kr*30,qf=Kr*365,Hn=Ye(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Dr)},(e,t)=>(t-e)/Dr,e=>e.getUTCSeconds());Hn.range;const oy=Ye(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Dr)},(e,t)=>{e.setTime(+e+t*Yt)},(e,t)=>(t-e)/Yt,e=>e.getMinutes());oy.range;const ly=Ye(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Yt)},(e,t)=>(t-e)/Yt,e=>e.getUTCMinutes());ly.range;const uy=Ye(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Dr-e.getMinutes()*Yt)},(e,t)=>{e.setTime(+e+t*Lr)},(e,t)=>(t-e)/Lr,e=>e.getHours());uy.range;const sy=Ye(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Lr)},(e,t)=>(t-e)/Lr,e=>e.getUTCHours());sy.range;const jl=Ye(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Yt)/Kr,e=>e.getDate()-1);jl.range;const Ic=Ye(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Kr,e=>e.getUTCDate()-1);Ic.range;const RO=Ye(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Kr,e=>Math.floor(e/Kr));RO.range;function ci(e){return Ye(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*Yt)/ay)}const Dc=ci(0),xs=ci(1),cF=ci(2),fF=ci(3),ra=ci(4),dF=ci(5),pF=ci(6);Dc.range;xs.range;cF.range;fF.range;ra.range;dF.range;pF.range;function fi(e){return Ye(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/ay)}const Lc=fi(0),Ss=fi(1),hF=fi(2),vF=fi(3),na=fi(4),yF=fi(5),mF=fi(6);Lc.range;Ss.range;hF.range;vF.range;na.range;yF.range;mF.range;const cy=Ye(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());cy.range;const fy=Ye(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());fy.range;const qr=Ye(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());qr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ye(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});qr.range;const Xr=Ye(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());Xr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ye(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});Xr.range;function BO(e,t,r,n,i,a){const o=[[Hn,1,Dr],[Hn,5,5*Dr],[Hn,15,15*Dr],[Hn,30,30*Dr],[a,1,Yt],[a,5,5*Yt],[a,15,15*Yt],[a,30,30*Yt],[i,1,Lr],[i,3,3*Lr],[i,6,6*Lr],[i,12,12*Lr],[n,1,Kr],[n,2,2*Kr],[r,1,ay],[t,1,W0],[t,3,3*W0],[e,1,qf]];function l(s,f,c){const d=fw).right(o,d);if(p===o.length)return e.every(Cp(s/qf,f/qf,c));if(p===0)return ws.every(Math.max(Cp(s,f,c),1));const[v,b]=o[d/o[p-1][2]53)return null;"w"in k||(k.w=1),"Z"in k?(H=Yf(Va(k.y,0,1)),ne=H.getUTCDay(),H=ne>4||ne===0?Ss.ceil(H):Ss(H),H=Ic.offset(H,(k.V-1)*7),k.y=H.getUTCFullYear(),k.m=H.getUTCMonth(),k.d=H.getUTCDate()+(k.w+6)%7):(H=Xf(Va(k.y,0,1)),ne=H.getDay(),H=ne>4||ne===0?xs.ceil(H):xs(H),H=jl.offset(H,(k.V-1)*7),k.y=H.getFullYear(),k.m=H.getMonth(),k.d=H.getDate()+(k.w+6)%7)}else("W"in k||"U"in k)&&("w"in k||(k.w="u"in k?k.u%7:"W"in k?1:0),ne="Z"in k?Yf(Va(k.y,0,1)).getUTCDay():Xf(Va(k.y,0,1)).getDay(),k.m=0,k.d="W"in k?(k.w+6)%7+k.W*7-(ne+5)%7:k.w+k.U*7-(ne+6)%7);return"Z"in k?(k.H+=k.Z/100|0,k.M+=k.Z%100,Yf(k)):Xf(k)}}function _(R,K,Q,k){for(var te=0,H=K.length,ne=Q.length,ee,oe;te=ne)return-1;if(ee=K.charCodeAt(te++),ee===37){if(ee=K.charAt(te++),oe=m[ee in U0?K.charAt(te++):ee],!oe||(k=oe(R,Q,k))<0)return-1}else if(ee!=Q.charCodeAt(k++))return-1}return k}function P(R,K,Q){var k=s.exec(K.slice(Q));return k?(R.p=f.get(k[0].toLowerCase()),Q+k[0].length):-1}function T(R,K,Q){var k=p.exec(K.slice(Q));return k?(R.w=v.get(k[0].toLowerCase()),Q+k[0].length):-1}function $(R,K,Q){var k=c.exec(K.slice(Q));return k?(R.w=d.get(k[0].toLowerCase()),Q+k[0].length):-1}function j(R,K,Q){var k=g.exec(K.slice(Q));return k?(R.m=y.get(k[0].toLowerCase()),Q+k[0].length):-1}function L(R,K,Q){var k=b.exec(K.slice(Q));return k?(R.m=w.get(k[0].toLowerCase()),Q+k[0].length):-1}function B(R,K,Q){return _(R,t,K,Q)}function M(R,K,Q){return _(R,r,K,Q)}function z(R,K,Q){return _(R,n,K,Q)}function U(R){return o[R.getDay()]}function C(R){return a[R.getDay()]}function D(R){return u[R.getMonth()]}function W(R){return l[R.getMonth()]}function Y(R){return i[+(R.getHours()>=12)]}function V(R){return 1+~~(R.getMonth()/3)}function re(R){return o[R.getUTCDay()]}function le(R){return a[R.getUTCDay()]}function Se(R){return u[R.getUTCMonth()]}function me(R){return l[R.getUTCMonth()]}function F(R){return i[+(R.getUTCHours()>=12)]}function q(R){return 1+~~(R.getUTCMonth()/3)}return{format:function(R){var K=x(R+="",h);return K.toString=function(){return R},K},parse:function(R){var K=O(R+="",!1);return K.toString=function(){return R},K},utcFormat:function(R){var K=x(R+="",S);return K.toString=function(){return R},K},utcParse:function(R){var K=O(R+="",!0);return K.toString=function(){return R},K}}}var U0={"-":"",_:" ",0:"0"},nt=/^\s*\d+/,OF=/^%/,_F=/[\\^$*+?|[\]().{}]/g;function ye(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a[t.toLowerCase(),r]))}function AF(e,t,r){var n=nt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function EF(e,t,r){var n=nt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function $F(e,t,r){var n=nt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function TF(e,t,r){var n=nt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function jF(e,t,r){var n=nt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function H0(e,t,r){var n=nt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function V0(e,t,r){var n=nt.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function CF(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function kF(e,t,r){var n=nt.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function MF(e,t,r){var n=nt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function G0(e,t,r){var n=nt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function NF(e,t,r){var n=nt.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function K0(e,t,r){var n=nt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function IF(e,t,r){var n=nt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function DF(e,t,r){var n=nt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function LF(e,t,r){var n=nt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function RF(e,t,r){var n=nt.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function BF(e,t,r){var n=OF.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function zF(e,t,r){var n=nt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function FF(e,t,r){var n=nt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function q0(e,t){return ye(e.getDate(),t,2)}function WF(e,t){return ye(e.getHours(),t,2)}function UF(e,t){return ye(e.getHours()%12||12,t,2)}function HF(e,t){return ye(1+jl.count(qr(e),e),t,3)}function zO(e,t){return ye(e.getMilliseconds(),t,3)}function VF(e,t){return zO(e,t)+"000"}function GF(e,t){return ye(e.getMonth()+1,t,2)}function KF(e,t){return ye(e.getMinutes(),t,2)}function qF(e,t){return ye(e.getSeconds(),t,2)}function XF(e){var t=e.getDay();return t===0?7:t}function YF(e,t){return ye(Dc.count(qr(e)-1,e),t,2)}function FO(e){var t=e.getDay();return t>=4||t===0?ra(e):ra.ceil(e)}function QF(e,t){return e=FO(e),ye(ra.count(qr(e),e)+(qr(e).getDay()===4),t,2)}function ZF(e){return e.getDay()}function JF(e,t){return ye(xs.count(qr(e)-1,e),t,2)}function e8(e,t){return ye(e.getFullYear()%100,t,2)}function t8(e,t){return e=FO(e),ye(e.getFullYear()%100,t,2)}function r8(e,t){return ye(e.getFullYear()%1e4,t,4)}function n8(e,t){var r=e.getDay();return e=r>=4||r===0?ra(e):ra.ceil(e),ye(e.getFullYear()%1e4,t,4)}function i8(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ye(t/60|0,"0",2)+ye(t%60,"0",2)}function X0(e,t){return ye(e.getUTCDate(),t,2)}function a8(e,t){return ye(e.getUTCHours(),t,2)}function o8(e,t){return ye(e.getUTCHours()%12||12,t,2)}function l8(e,t){return ye(1+Ic.count(Xr(e),e),t,3)}function WO(e,t){return ye(e.getUTCMilliseconds(),t,3)}function u8(e,t){return WO(e,t)+"000"}function s8(e,t){return ye(e.getUTCMonth()+1,t,2)}function c8(e,t){return ye(e.getUTCMinutes(),t,2)}function f8(e,t){return ye(e.getUTCSeconds(),t,2)}function d8(e){var t=e.getUTCDay();return t===0?7:t}function p8(e,t){return ye(Lc.count(Xr(e)-1,e),t,2)}function UO(e){var t=e.getUTCDay();return t>=4||t===0?na(e):na.ceil(e)}function h8(e,t){return e=UO(e),ye(na.count(Xr(e),e)+(Xr(e).getUTCDay()===4),t,2)}function v8(e){return e.getUTCDay()}function y8(e,t){return ye(Ss.count(Xr(e)-1,e),t,2)}function m8(e,t){return ye(e.getUTCFullYear()%100,t,2)}function g8(e,t){return e=UO(e),ye(e.getUTCFullYear()%100,t,2)}function b8(e,t){return ye(e.getUTCFullYear()%1e4,t,4)}function w8(e,t){var r=e.getUTCDay();return e=r>=4||r===0?na(e):na.ceil(e),ye(e.getUTCFullYear()%1e4,t,4)}function x8(){return"+0000"}function Y0(){return"%"}function Q0(e){return+e}function Z0(e){return Math.floor(+e/1e3)}var yi,HO,VO;S8({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 S8(e){return yi=SF(e),HO=yi.format,yi.parse,VO=yi.utcFormat,yi.utcParse,yi}function O8(e){return new Date(e)}function _8(e){return e instanceof Date?+e:+new Date(+e)}function dy(e,t,r,n,i,a,o,l,u,s){var f=Zv(),c=f.invert,d=f.domain,p=s(".%L"),v=s(":%S"),b=s("%I:%M"),w=s("%I %p"),g=s("%a %d"),y=s("%b %d"),h=s("%B"),S=s("%Y");function m(x){return(u(x)t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,a)=>p4(e,a/n))},r.copy=function(){return XO(t).domain(e)},en.apply(r,arguments)}function Bc(){var e=0,t=.5,r=1,n=1,i,a,o,l,u,s=wt,f,c=!1,d;function p(b){return isNaN(b=+b)?d:(b=.5+((b=+f(b))-a)*(n*bt}var k8=C8,M8=JO,N8=k8,I8=$a;function D8(e){return e&&e.length?M8(e,I8,N8):void 0}var L8=D8;const zc=Ae(L8);function R8(e,t){return ee.e^a.s<0?1:-1;for(n=a.d.length,i=e.d.length,t=0,r=ne.d[t]^a.s<0?1:-1;return n===i?0:n>i^a.s<0?1:-1};J.decimalPlaces=J.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*Ce;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};J.dividedBy=J.div=function(e){return Wr(this,new this.constructor(e))};J.dividedToIntegerBy=J.idiv=function(e){var t=this,r=t.constructor;return Pe(Wr(t,new r(e),0,1),r.precision)};J.equals=J.eq=function(e){return!this.cmp(e)};J.exponent=function(){return Ve(this)};J.greaterThan=J.gt=function(e){return this.cmp(e)>0};J.greaterThanOrEqualTo=J.gte=function(e){return this.cmp(e)>=0};J.isInteger=J.isint=function(){return this.e>this.d.length-2};J.isNegative=J.isneg=function(){return this.s<0};J.isPositive=J.ispos=function(){return this.s>0};J.isZero=function(){return this.s===0};J.lessThan=J.lt=function(e){return this.cmp(e)<0};J.lessThanOrEqualTo=J.lte=function(e){return this.cmp(e)<1};J.logarithm=J.log=function(e){var t,r=this,n=r.constructor,i=n.precision,a=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Dt))throw Error(rr+"NaN");if(r.s<1)throw Error(rr+(r.s?"NaN":"-Infinity"));return r.eq(Dt)?new n(0):(Ne=!1,t=Wr(qo(r,a),qo(e,a),a),Ne=!0,Pe(t,i))};J.minus=J.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?n_(t,e):t_(t,(e.s=-e.s,e))};J.modulo=J.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(rr+"NaN");return r.s?(Ne=!1,t=Wr(r,e,0,1).times(e),Ne=!0,r.minus(t)):Pe(new n(r),i)};J.naturalExponential=J.exp=function(){return r_(this)};J.naturalLogarithm=J.ln=function(){return qo(this)};J.negated=J.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};J.plus=J.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?t_(t,e):n_(t,(e.s=-e.s,e))};J.precision=J.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Yn+e);if(t=Ve(i)+1,n=i.d.length-1,r=n*Ce+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};J.squareRoot=J.sqrt=function(){var e,t,r,n,i,a,o,l=this,u=l.constructor;if(l.s<1){if(!l.s)return new u(0);throw Error(rr+"NaN")}for(e=Ve(l),Ne=!1,i=Math.sqrt(+l),i==0||i==1/0?(t=_r(l.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=ka((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),n=new u(t)):n=new u(i.toString()),r=u.precision,i=o=r+3;;)if(a=n,n=a.plus(Wr(l,a,o+2)).times(.5),_r(a.d).slice(0,o)===(t=_r(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(Pe(a,r+1,0),a.times(a).eq(l)){n=a;break}}else if(t!="9999")break;o+=4}return Ne=!0,Pe(n,r)};J.times=J.mul=function(e){var t,r,n,i,a,o,l,u,s,f=this,c=f.constructor,d=f.d,p=(e=new c(e)).d;if(!f.s||!e.s)return new c(0);for(e.s*=f.s,r=f.e+e.e,u=d.length,s=p.length,u=0;){for(t=0,i=u+n;i>n;)l=a[i]+p[n]*d[i-n-1]+t,a[i--]=l%et|0,t=l/et|0;a[i]=(a[i]+t)%et|0}for(;!a[--o];)a.pop();return t?++r:a.shift(),e.d=a,e.e=r,Ne?Pe(e,c.precision):e};J.toDecimalPlaces=J.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Tr(e,0,Ca),t===void 0?t=n.rounding:Tr(t,0,8),Pe(r,e+Ve(r)+1,t))};J.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=ii(n,!0):(Tr(e,0,Ca),t===void 0?t=i.rounding:Tr(t,0,8),n=Pe(new i(n),e+1,t),r=ii(n,!0,e+1)),r};J.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?ii(i):(Tr(e,0,Ca),t===void 0?t=a.rounding:Tr(t,0,8),n=Pe(new a(i),e+Ve(i)+1,t),r=ii(n.abs(),!1,e+Ve(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};J.toInteger=J.toint=function(){var e=this,t=e.constructor;return Pe(new t(e),Ve(e)+1,t.rounding)};J.toNumber=function(){return+this};J.toPower=J.pow=function(e){var t,r,n,i,a,o,l=this,u=l.constructor,s=12,f=+(e=new u(e));if(!e.s)return new u(Dt);if(l=new u(l),!l.s){if(e.s<1)throw Error(rr+"Infinity");return l}if(l.eq(Dt))return l;if(n=u.precision,e.eq(Dt))return Pe(l,n);if(t=e.e,r=e.d.length-1,o=t>=r,a=l.s,o){if((r=f<0?-f:f)<=e_){for(i=new u(Dt),t=Math.ceil(n/Ce+4),Ne=!1;r%2&&(i=i.times(l),tb(i.d,t)),r=ka(r/2),r!==0;)l=l.times(l),tb(l.d,t);return Ne=!0,e.s<0?new u(Dt).div(i):Pe(i,n)}}else if(a<0)throw Error(rr+"NaN");return a=a<0&&e.d[Math.max(t,r)]&1?-1:1,l.s=1,Ne=!1,i=e.times(qo(l,n+s)),Ne=!0,i=r_(i),i.s=a,i};J.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?(r=Ve(i),n=ii(i,r<=a.toExpNeg||r>=a.toExpPos)):(Tr(e,1,Ca),t===void 0?t=a.rounding:Tr(t,0,8),i=Pe(new a(i),e,t),r=Ve(i),n=ii(i,e<=r||r<=a.toExpNeg,e)),n};J.toSignificantDigits=J.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Tr(e,1,Ca),t===void 0?t=n.rounding:Tr(t,0,8)),Pe(new n(r),e,t)};J.toString=J.valueOf=J.val=J.toJSON=J[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Ve(e),r=e.constructor;return ii(e,t<=r.toExpNeg||t>=r.toExpPos)};function t_(e,t){var r,n,i,a,o,l,u,s,f=e.constructor,c=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),Ne?Pe(t,c):t;if(u=e.d,s=t.d,o=e.e,i=t.e,u=u.slice(),a=o-i,a){for(a<0?(n=u,a=-a,l=s.length):(n=s,i=o,l=u.length),o=Math.ceil(c/Ce),l=o>l?o+1:l+1,a>l&&(a=l,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for(l=u.length,a=s.length,l-a<0&&(a=l,n=s,s=u,u=n),r=0;a;)r=(u[--a]=u[a]+s[a]+r)/et|0,u[a]%=et;for(r&&(u.unshift(r),++i),l=u.length;u[--l]==0;)u.pop();return t.d=u,t.e=i,Ne?Pe(t,c):t}function Tr(e,t,r){if(e!==~~e||er)throw Error(Yn+e)}function _r(e){var t,r,n,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,t=1;to?1:-1;else for(l=u=0;li[l]?1:-1;break}return u}function r(n,i,a){for(var o=0;a--;)n[a]-=o,o=n[a]1;)n.shift()}return function(n,i,a,o){var l,u,s,f,c,d,p,v,b,w,g,y,h,S,m,x,O,_,P=n.constructor,T=n.s==i.s?1:-1,$=n.d,j=i.d;if(!n.s)return new P(n);if(!i.s)throw Error(rr+"Division by zero");for(u=n.e-i.e,O=j.length,m=$.length,p=new P(T),v=p.d=[],s=0;j[s]==($[s]||0);)++s;if(j[s]>($[s]||0)&&--u,a==null?y=a=P.precision:o?y=a+(Ve(n)-Ve(i))+1:y=a,y<0)return new P(0);if(y=y/Ce+2|0,s=0,O==1)for(f=0,j=j[0],y++;(s1&&(j=e(j,f),$=e($,f),O=j.length,m=$.length),S=O,b=$.slice(0,O),w=b.length;w=et/2&&++x;do f=0,l=t(j,b,O,w),l<0?(g=b[0],O!=w&&(g=g*et+(b[1]||0)),f=g/x|0,f>1?(f>=et&&(f=et-1),c=e(j,f),d=c.length,w=b.length,l=t(c,b,d,w),l==1&&(f--,r(c,O16)throw Error(vy+Ve(e));if(!e.s)return new f(Dt);for(Ne=!1,l=c,o=new f(.03125);e.abs().gte(.1);)e=e.times(o),s+=5;for(n=Math.log(Rn(2,s))/Math.LN10*2+5|0,l+=n,r=i=a=new f(Dt),f.precision=l;;){if(i=Pe(i.times(e),l),r=r.times(++u),o=a.plus(Wr(i,r,l)),_r(o.d).slice(0,l)===_r(a.d).slice(0,l)){for(;s--;)a=Pe(a.times(a),l);return f.precision=c,t==null?(Ne=!0,Pe(a,c)):a}a=o}}function Ve(e){for(var t=e.e*Ce,r=e.d[0];r>=10;r/=10)t++;return t}function Qf(e,t,r){if(t>e.LN10.sd())throw Ne=!0,r&&(e.precision=r),Error(rr+"LN10 precision limit exceeded");return Pe(new e(e.LN10),t)}function an(e){for(var t="";e--;)t+="0";return t}function qo(e,t){var r,n,i,a,o,l,u,s,f,c=1,d=10,p=e,v=p.d,b=p.constructor,w=b.precision;if(p.s<1)throw Error(rr+(p.s?"NaN":"-Infinity"));if(p.eq(Dt))return new b(0);if(t==null?(Ne=!1,s=w):s=t,p.eq(10))return t==null&&(Ne=!0),Qf(b,s);if(s+=d,b.precision=s,r=_r(v),n=r.charAt(0),a=Ve(p),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)p=p.times(e),r=_r(p.d),n=r.charAt(0),c++;a=Ve(p),n>1?(p=new b("0."+r),a++):p=new b(n+"."+r.slice(1))}else return u=Qf(b,s+2,w).times(a+""),p=qo(new b(n+"."+r.slice(1)),s-d).plus(u),b.precision=w,t==null?(Ne=!0,Pe(p,w)):p;for(l=o=p=Wr(p.minus(Dt),p.plus(Dt),s),f=Pe(p.times(p),s),i=3;;){if(o=Pe(o.times(f),s),u=l.plus(Wr(o,new b(i),s)),_r(u.d).slice(0,s)===_r(l.d).slice(0,s))return l=l.times(2),a!==0&&(l=l.plus(Qf(b,s+2,w).times(a+""))),l=Wr(l,new b(c),s),b.precision=w,t==null?(Ne=!0,Pe(l,w)):l;l=u,i+=2}}function eb(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=ka(r/Ce),e.d=[],n=(r+1)%Ce,r<0&&(n+=Ce),nOs||e.e<-Os))throw Error(vy+r)}else e.s=0,e.e=0,e.d=[0];return e}function Pe(e,t,r){var n,i,a,o,l,u,s,f,c=e.d;for(o=1,a=c[0];a>=10;a/=10)o++;if(n=t-o,n<0)n+=Ce,i=t,s=c[f=0];else{if(f=Math.ceil((n+1)/Ce),a=c.length,f>=a)return e;for(s=a=c[f],o=1;a>=10;a/=10)o++;n%=Ce,i=n-Ce+o}if(r!==void 0&&(a=Rn(10,o-i-1),l=s/a%10|0,u=t<0||c[f+1]!==void 0||s%a,u=r<4?(l||u)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||u||r==6&&(n>0?i>0?s/Rn(10,o-i):0:c[f-1])%10&1||r==(e.s<0?8:7))),t<1||!c[0])return u?(a=Ve(e),c.length=1,t=t-a-1,c[0]=Rn(10,(Ce-t%Ce)%Ce),e.e=ka(-t/Ce)||0):(c.length=1,c[0]=e.e=e.s=0),e;if(n==0?(c.length=f,a=1,f--):(c.length=f+1,a=Rn(10,Ce-n),c[f]=i>0?(s/Rn(10,o-i)%Rn(10,i)|0)*a:0),u)for(;;)if(f==0){(c[0]+=a)==et&&(c[0]=1,++e.e);break}else{if(c[f]+=a,c[f]!=et)break;c[f--]=0,a=1}for(n=c.length;c[--n]===0;)c.pop();if(Ne&&(e.e>Os||e.e<-Os))throw Error(vy+Ve(e));return e}function n_(e,t){var r,n,i,a,o,l,u,s,f,c,d=e.constructor,p=d.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new d(e),Ne?Pe(t,p):t;if(u=e.d,c=t.d,n=t.e,s=e.e,u=u.slice(),o=s-n,o){for(f=o<0,f?(r=u,o=-o,l=c.length):(r=c,n=s,l=u.length),i=Math.max(Math.ceil(p/Ce),l)+2,o>i&&(o=i,r.length=1),r.reverse(),i=o;i--;)r.push(0);r.reverse()}else{for(i=u.length,l=c.length,f=i0;--i)u[l++]=0;for(i=c.length;i>o;){if(u[--i]0?a=a.charAt(0)+"."+a.slice(1)+an(n):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+an(-i-1)+a,r&&(n=r-o)>0&&(a+=an(n))):i>=o?(a+=an(i+1-o),r&&(n=r-i-1)>0&&(a=a+"."+an(n))):((n=i+1)0&&(i+1===o&&(a+="."),a+=an(n))),e.s<0?"-"+a:a}function tb(e,t){if(e.length>t)return e.length=t,!0}function i_(e){var t,r,n;function i(a){var o=this;if(!(o instanceof i))return new i(a);if(o.constructor=i,a instanceof i){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(Yn+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return eb(o,a.toString())}else if(typeof a!="string")throw Error(Yn+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,o5.test(a))eb(o,a);else throw Error(Yn+a)}if(i.prototype=J,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=i_,i.config=i.set=l5,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Yn+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Yn+r+": "+n);return this}var yy=i_(a5);Dt=new yy(1);const _e=yy;function u5(e){return d5(e)||f5(e)||c5(e)||s5()}function s5(){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 c5(e,t){if(e){if(typeof e=="string")return Dp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Dp(e,t)}}function f5(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function d5(e){if(Array.isArray(e))return Dp(e)}function Dp(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=t?r.apply(void 0,i):e(t-o,rb(function(){for(var l=arguments.length,u=new Array(l),s=0;se.length)&&(t=e.length);for(var r=0,n=new Array(t);r"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),l;!(n=(l=o.next()).done)&&(r.push(l.value),!(t&&r.length===t));n=!0);}catch(u){i=!0,a=u}finally{try{!n&&o.return!=null&&o.return()}finally{if(i)throw a}}return r}}function E5(e){if(Array.isArray(e))return e}function s_(e){var t=Xo(e,2),r=t[0],n=t[1],i=r,a=n;return r>n&&(i=n,a=r),[i,a]}function c_(e,t,r){if(e.lte(0))return new _e(0);var n=Hc.getDigitCount(e.toNumber()),i=new _e(10).pow(n),a=e.div(i),o=n!==1?.05:.1,l=new _e(Math.ceil(a.div(o).toNumber())).add(r).mul(o),u=l.mul(i);return t?u:new _e(Math.ceil(u))}function $5(e,t,r){var n=1,i=new _e(e);if(!i.isint()&&r){var a=Math.abs(e);a<1?(n=new _e(10).pow(Hc.getDigitCount(e)-1),i=new _e(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new _e(Math.floor(e)))}else e===0?i=new _e(Math.floor((t-1)/2)):r||(i=new _e(Math.floor(e)));var o=Math.floor((t-1)/2),l=y5(v5(function(u){return i.add(new _e(u-o).mul(n)).toNumber()}),Lp);return l(0,t)}function f_(e,t,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new _e(0),tickMin:new _e(0),tickMax:new _e(0)};var a=c_(new _e(t).sub(e).div(r-1),n,i),o;e<=0&&t>=0?o=new _e(0):(o=new _e(e).add(t).div(2),o=o.sub(new _e(o).mod(a)));var l=Math.ceil(o.sub(e).div(a).toNumber()),u=Math.ceil(new _e(t).sub(o).div(a).toNumber()),s=l+u+1;return s>r?f_(e,t,r,n,i+1):(s0?u+(r-s):u,l=t>0?l:l+(r-s)),{step:a,tickMin:o.sub(new _e(l).mul(a)),tickMax:o.add(new _e(u).mul(a))})}function T5(e){var t=Xo(e,2),r=t[0],n=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(i,2),l=s_([r,n]),u=Xo(l,2),s=u[0],f=u[1];if(s===-1/0||f===1/0){var c=f===1/0?[s].concat(Bp(Lp(0,i-1).map(function(){return 1/0}))):[].concat(Bp(Lp(0,i-1).map(function(){return-1/0})),[f]);return r>n?Rp(c):c}if(s===f)return $5(s,i,a);var d=f_(s,f,o,a),p=d.step,v=d.tickMin,b=d.tickMax,w=Hc.rangeStep(v,b.add(new _e(.1).mul(p)),p);return r>n?Rp(w):w}function j5(e,t){var r=Xo(e,2),n=r[0],i=r[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=s_([n,i]),l=Xo(o,2),u=l[0],s=l[1];if(u===-1/0||s===1/0)return[n,i];if(u===s)return[u];var f=Math.max(t,2),c=c_(new _e(s).sub(u).div(f-1),a,0),d=[].concat(Bp(Hc.rangeStep(new _e(u),new _e(s).sub(new _e(.99).mul(c)),c)),[s]);return n>i?Rp(d):d}var C5=l_(T5),k5=l_(j5),M5="Invariant failed";function ai(e,t){throw new Error(M5)}var N5=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function ia(e){"@babel/helpers - typeof";return ia=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},ia(e)}function _s(){return _s=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function F5(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function W5(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function U5(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,o=-1,l=(r=n==null?void 0:n.length)!==null&&r!==void 0?r:0;if(l<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var u=a.range,s=0;s0?i[s-1].coordinate:i[l-1].coordinate,c=i[s].coordinate,d=s>=l-1?i[0].coordinate:i[s+1].coordinate,p=void 0;if(vr(c-f)!==vr(d-c)){var v=[];if(vr(d-c)===vr(u[1]-u[0])){p=d;var b=c+u[1]-u[0];v[0]=Math.min(b,(b+f)/2),v[1]=Math.max(b,(b+f)/2)}else{p=f;var w=d+u[1]-u[0];v[0]=Math.min(c,(w+c)/2),v[1]=Math.max(c,(w+c)/2)}var g=[Math.min(c,(p+c)/2),Math.max(c,(p+c)/2)];if(t>g[0]&&t<=g[1]||t>=v[0]&&t<=v[1]){o=i[s].index;break}}else{var y=Math.min(f,d),h=Math.max(f,d);if(t>(y+c)/2&&t<=(h+c)/2){o=i[s].index;break}}}else for(var S=0;S0&&S(n[S].coordinate+n[S-1].coordinate)/2&&t<=(n[S].coordinate+n[S+1].coordinate)/2||S===l-1&&t>(n[S].coordinate+n[S-1].coordinate)/2){o=n[S].index;break}return o},my=function(t){var r,n=t,i=n.type.displayName,a=(r=t.type)!==null&&r!==void 0&&r.defaultProps?Be(Be({},t.type.defaultProps),t.props):t.props,o=a.stroke,l=a.fill,u;switch(i){case"Line":u=o;break;case"Area":case"Radar":u=o&&o!=="none"?o:l;break;default:u=l;break}return u},oW=function(t){var r=t.barSize,n=t.totalSize,i=t.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var o={},l=Object.keys(a),u=0,s=l.length;u=0});if(g&&g.length){var y=g[0].type.defaultProps,h=y!==void 0?Be(Be({},y),g[0].props):g[0].props,S=h.barSize,m=h[w];o[m]||(o[m]=[]);var x=fe(S)?r:S;o[m].push({item:g[0],stackList:g.slice(1),barSize:fe(x)?void 0:ni(x,n,0)})}}return o},lW=function(t){var r=t.barGap,n=t.barCategoryGap,i=t.bandSize,a=t.sizeList,o=a===void 0?[]:a,l=t.maxBarSize,u=o.length;if(u<1)return null;var s=ni(r,i,0,!0),f,c=[];if(o[0].barSize===+o[0].barSize){var d=!1,p=i/u,v=o.reduce(function(S,m){return S+m.barSize||0},0);v+=(u-1)*s,v>=i&&(v-=(u-1)*s,s=0),v>=i&&p>0&&(d=!0,p*=.9,v=u*p);var b=(i-v)/2>>0,w={offset:b-s,size:0};f=o.reduce(function(S,m){var x={item:m.item,position:{offset:w.offset+w.size+s,size:d?p:m.barSize}},O=[].concat(ab(S),[x]);return w=O[O.length-1].position,m.stackList&&m.stackList.length&&m.stackList.forEach(function(_){O.push({item:_,position:w})}),O},c)}else{var g=ni(n,i,0,!0);i-2*g-(u-1)*s<=0&&(s=0);var y=(i-2*g-(u-1)*s)/u;y>1&&(y>>=0);var h=l===+l?Math.min(y,l):y;f=o.reduce(function(S,m,x){var O=[].concat(ab(S),[{item:m.item,position:{offset:g+(y+s)*x+(y-h)/2,size:h}}]);return m.stackList&&m.stackList.length&&m.stackList.forEach(function(_){O.push({item:_,position:O[O.length-1].position})}),O},c)}return f},uW=function(t,r,n,i){var a=n.children,o=n.width,l=n.margin,u=o-(l.left||0)-(l.right||0),s=v_({children:a,legendWidth:u});if(s){var f=i||{},c=f.width,d=f.height,p=s.align,v=s.verticalAlign,b=s.layout;if((b==="vertical"||b==="horizontal"&&v==="middle")&&p!=="center"&&X(t[p]))return Be(Be({},t),{},Wi({},p,t[p]+(c||0)));if((b==="horizontal"||b==="vertical"&&p==="center")&&v!=="middle"&&X(t[v]))return Be(Be({},t),{},Wi({},v,t[v]+(d||0)))}return t},sW=function(t,r,n){return fe(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},y_=function(t,r,n,i,a){var o=r.props.children,l=Jt(o,Cl).filter(function(s){return sW(i,a,s.props.direction)});if(l&&l.length){var u=l.map(function(s){return s.props.dataKey});return t.reduce(function(s,f){var c=zt(f,n);if(fe(c))return s;var d=Array.isArray(c)?[Fc(c),zc(c)]:[c,c],p=u.reduce(function(v,b){var w=zt(f,b,0),g=d[0]-Math.abs(Array.isArray(w)?w[0]:w),y=d[1]+Math.abs(Array.isArray(w)?w[1]:w);return[Math.min(g,v[0]),Math.max(y,v[1])]},[1/0,-1/0]);return[Math.min(p[0],s[0]),Math.max(p[1],s[1])]},[1/0,-1/0])}return null},cW=function(t,r,n,i,a){var o=r.map(function(l){return y_(t,l,n,a,i)}).filter(function(l){return!fe(l)});return o&&o.length?o.reduce(function(l,u){return[Math.min(l[0],u[0]),Math.max(l[1],u[1])]},[1/0,-1/0]):null},m_=function(t,r,n,i,a){var o=r.map(function(u){var s=u.props.dataKey;return n==="number"&&s&&y_(t,u,s,i)||yo(t,s,n,a)});if(n==="number")return o.reduce(function(u,s){return[Math.min(u[0],s[0]),Math.max(u[1],s[1])]},[1/0,-1/0]);var l={};return o.reduce(function(u,s){for(var f=0,c=s.length;f=2?vr(l[0]-l[1])*2*s:s,r&&(t.ticks||t.niceTicks)){var f=(t.ticks||t.niceTicks).map(function(c){var d=a?a.indexOf(c):c;return{coordinate:i(d)+s,value:c,offset:s}});return f.filter(function(c){return!_l(c.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(c,d){return{coordinate:i(c)+s,value:c,index:d,offset:s}}):i.ticks&&!n?i.ticks(t.tickCount).map(function(c){return{coordinate:i(c)+s,value:c,offset:s}}):i.domain().map(function(c,d){return{coordinate:i(c)+s,value:a?a[c]:c,index:d,offset:s}})},Zf=new WeakMap,uu=function(t,r){if(typeof r!="function")return t;Zf.has(t)||Zf.set(t,new WeakMap);var n=Zf.get(t);if(n.has(r))return n.get(r);var i=function(){t.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,i),i},fW=function(t,r,n){var i=t.scale,a=t.type,o=t.layout,l=t.axisType;if(i==="auto")return o==="radial"&&l==="radiusAxis"?{scale:Uo(),realScaleType:"band"}:o==="radial"&&l==="angleAxis"?{scale:bs(),realScaleType:"linear"}:a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:vo(),realScaleType:"point"}:a==="category"?{scale:Uo(),realScaleType:"band"}:{scale:bs(),realScaleType:"linear"};if(ri(i)){var u="scale".concat(Ec(i));return{scale:(J0[u]||vo)(),realScaleType:J0[u]?u:"point"}}return ue(i)?{scale:i}:{scale:vo(),realScaleType:"point"}},lb=1e-4,dW=function(t){var r=t.domain();if(!(!r||r.length<=2)){var n=r.length,i=t.range(),a=Math.min(i[0],i[1])-lb,o=Math.max(i[0],i[1])+lb,l=t(r[0]),u=t(r[n-1]);(lo||uo)&&t.domain([r[0],r[n-1]])}},pW=function(t,r){if(!t)return null;for(var n=0,i=t.length;ni)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]=0?(t[l][n][0]=a,t[l][n][1]=a+u,a=t[l][n][1]):(t[l][n][0]=o,t[l][n][1]=o+u,o=t[l][n][1])}},yW=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n=0?(t[o][n][0]=a,t[o][n][1]=a+l,a=t[o][n][1]):(t[o][n][0]=0,t[o][n][1]=0)}},mW={sign:vW,expand:CM,none:Yi,silhouette:kM,wiggle:MM,positive:yW},gW=function(t,r,n){var i=r.map(function(l){return l.props.dataKey}),a=mW[n],o=jM().keys(i).value(function(l,u){return+zt(l,u,0)}).order(pp).offset(a);return o(t)},bW=function(t,r,n,i,a,o){if(!t)return null;var l=o?r.reverse():r,u={},s=l.reduce(function(c,d){var p,v=(p=d.type)!==null&&p!==void 0&&p.defaultProps?Be(Be({},d.type.defaultProps),d.props):d.props,b=v.stackId,w=v.hide;if(w)return c;var g=v[n],y=c[g]||{hasStack:!1,stackGroups:{}};if(Xe(b)){var h=y.stackGroups[b]||{numericAxisId:n,cateAxisId:i,items:[]};h.items.push(d),y.hasStack=!0,y.stackGroups[b]=h}else y.stackGroups[Pl("_stackId_")]={numericAxisId:n,cateAxisId:i,items:[d]};return Be(Be({},c),{},Wi({},g,y))},u),f={};return Object.keys(s).reduce(function(c,d){var p=s[d];if(p.hasStack){var v={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(b,w){var g=p.stackGroups[w];return Be(Be({},b),{},Wi({},w,{numericAxisId:n,cateAxisId:i,items:g.items,stackedData:gW(t,g.items,a)}))},v)}return Be(Be({},c),{},Wi({},d,p))},f)},wW=function(t,r){var n=r.realScaleType,i=r.type,a=r.tickCount,o=r.originalDomain,l=r.allowDecimals,u=n||r.scale;if(u!=="auto"&&u!=="linear")return null;if(a&&i==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var s=t.domain();if(!s.length)return null;var f=C5(s,a,l);return t.domain([Fc(f),zc(f)]),{niceTicks:f}}if(a&&i==="number"){var c=t.domain(),d=k5(c,a,l);return{niceTicks:d}}return null};function ub(e){var t=e.axis,r=e.ticks,n=e.bandSize,i=e.entry,a=e.index,o=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!fe(i[t.dataKey])){var l=Yu(r,"value",i[t.dataKey]);if(l)return l.coordinate+n/2}return r[a]?r[a].coordinate+n/2:null}var u=zt(i,fe(o)?t.dataKey:o);return fe(u)?null:t.scale(u)}var sb=function(t){var r=t.axis,n=t.ticks,i=t.offset,a=t.bandSize,o=t.entry,l=t.index;if(r.type==="category")return n[l]?n[l].coordinate+i:null;var u=zt(o,r.dataKey,r.domain[l]);return fe(u)?null:r.scale(u)-a/2+i},xW=function(t){var r=t.numericAxis,n=r.scale.domain();if(r.type==="number"){var i=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]);return i<=0&&a>=0?0:a<0?a:i}return n[0]},SW=function(t,r){var n,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?Be(Be({},t.type.defaultProps),t.props):t.props,a=i.stackId;if(Xe(a)){var o=r[a];if(o){var l=o.items.indexOf(t);return l>=0?o.stackedData[l]:null}}return null},OW=function(t){return t.reduce(function(r,n){return[Fc(n.concat([r[0]]).filter(X)),zc(n.concat([r[1]]).filter(X))]},[1/0,-1/0])},w_=function(t,r,n){return Object.keys(t).reduce(function(i,a){var o=t[a],l=o.stackedData,u=l.reduce(function(s,f){var c=OW(f.slice(r,n+1));return[Math.min(s[0],c[0]),Math.max(s[1],c[1])]},[1/0,-1/0]);return[Math.min(u[0],i[0]),Math.max(u[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},cb=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,fb=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Up=function(t,r,n){if(ue(t))return t(r,n);if(!Array.isArray(t))return r;var i=[];if(X(t[0]))i[0]=n?t[0]:Math.min(t[0],r[0]);else if(cb.test(t[0])){var a=+cb.exec(t[0])[1];i[0]=r[0]-a}else ue(t[0])?i[0]=t[0](r[0]):i[0]=r[0];if(X(t[1]))i[1]=n?t[1]:Math.max(t[1],r[1]);else if(fb.test(t[1])){var o=+fb.exec(t[1])[1];i[1]=r[1]+o}else ue(t[1])?i[1]=t[1](r[1]):i[1]=r[1];return i},As=function(t,r,n){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!n||i>0)return i}if(t&&r&&r.length>=2){for(var a=Vv(r,function(c){return c.coordinate}),o=1/0,l=1,u=a.length;lo&&(s=2*Math.PI-s),{radius:l,angle:EW(s),angleInRadian:s}},jW=function(t){var r=t.startAngle,n=t.endAngle,i=Math.floor(r/360),a=Math.floor(n/360),o=Math.min(i,a);return{startAngle:r-o*360,endAngle:n-o*360}},CW=function(t,r){var n=r.startAngle,i=r.endAngle,a=Math.floor(n/360),o=Math.floor(i/360),l=Math.min(a,o);return t+l*360},vb=function(t,r){var n=t.x,i=t.y,a=TW({x:n,y:i},r),o=a.radius,l=a.angle,u=r.innerRadius,s=r.outerRadius;if(os)return!1;if(o===0)return!0;var f=jW(r),c=f.startAngle,d=f.endAngle,p=l,v;if(c<=d){for(;p>d;)p-=360;for(;p=c&&p<=d}else{for(;p>c;)p-=360;for(;p=d&&p<=c}return v?hb(hb({},r),{},{radius:o,angle:CW(p,r)}):null};function Jo(e){"@babel/helpers - typeof";return Jo=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},Jo(e)}var kW=["offset"];function MW(e){return LW(e)||DW(e)||IW(e)||NW()}function NW(){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 IW(e,t){if(e){if(typeof e=="string")return Hp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Hp(e,t)}}function DW(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function LW(e){if(Array.isArray(e))return Hp(e)}function Hp(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function BW(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function yb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ge(e){for(var t=1;t=0?1:-1,h,S;i==="insideStart"?(h=p+y*o,S=b):i==="insideEnd"?(h=v-y*o,S=!b):i==="end"&&(h=v+y*o,S=b),S=g<=0?S:!S;var m=lt(s,f,w,h),x=lt(s,f,w,h+(S?1:-1)*359),O="M".concat(m.x,",").concat(m.y,` + A`).concat(w,",").concat(w,",0,1,").concat(S?0:1,`, + `).concat(x.x,",").concat(x.y),_=fe(t.id)?Pl("recharts-radial-line-"):t.id;return A.createElement("text",el({},n,{dominantBaseline:"central",className:ve("recharts-radial-bar-label",l)}),A.createElement("defs",null,A.createElement("path",{id:_,d:O})),A.createElement("textPath",{xlinkHref:"#".concat(_)},r))},GW=function(t){var r=t.viewBox,n=t.offset,i=t.position,a=r,o=a.cx,l=a.cy,u=a.innerRadius,s=a.outerRadius,f=a.startAngle,c=a.endAngle,d=(f+c)/2;if(i==="outside"){var p=lt(o,l,s+n,d),v=p.x,b=p.y;return{x:v,y:b,textAnchor:v>=o?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"end"};var w=(u+s)/2,g=lt(o,l,w,d),y=g.x,h=g.y;return{x:y,y:h,textAnchor:"middle",verticalAnchor:"middle"}},KW=function(t){var r=t.viewBox,n=t.parentViewBox,i=t.offset,a=t.position,o=r,l=o.x,u=o.y,s=o.width,f=o.height,c=f>=0?1:-1,d=c*i,p=c>0?"end":"start",v=c>0?"start":"end",b=s>=0?1:-1,w=b*i,g=b>0?"end":"start",y=b>0?"start":"end";if(a==="top"){var h={x:l+s/2,y:u-c*i,textAnchor:"middle",verticalAnchor:p};return Ge(Ge({},h),n?{height:Math.max(u-n.y,0),width:s}:{})}if(a==="bottom"){var S={x:l+s/2,y:u+f+d,textAnchor:"middle",verticalAnchor:v};return Ge(Ge({},S),n?{height:Math.max(n.y+n.height-(u+f),0),width:s}:{})}if(a==="left"){var m={x:l-w,y:u+f/2,textAnchor:g,verticalAnchor:"middle"};return Ge(Ge({},m),n?{width:Math.max(m.x-n.x,0),height:f}:{})}if(a==="right"){var x={x:l+s+w,y:u+f/2,textAnchor:y,verticalAnchor:"middle"};return Ge(Ge({},x),n?{width:Math.max(n.x+n.width-x.x,0),height:f}:{})}var O=n?{width:s,height:f}:{};return a==="insideLeft"?Ge({x:l+w,y:u+f/2,textAnchor:y,verticalAnchor:"middle"},O):a==="insideRight"?Ge({x:l+s-w,y:u+f/2,textAnchor:g,verticalAnchor:"middle"},O):a==="insideTop"?Ge({x:l+s/2,y:u+d,textAnchor:"middle",verticalAnchor:v},O):a==="insideBottom"?Ge({x:l+s/2,y:u+f-d,textAnchor:"middle",verticalAnchor:p},O):a==="insideTopLeft"?Ge({x:l+w,y:u+d,textAnchor:y,verticalAnchor:v},O):a==="insideTopRight"?Ge({x:l+s-w,y:u+d,textAnchor:g,verticalAnchor:v},O):a==="insideBottomLeft"?Ge({x:l+w,y:u+f-d,textAnchor:y,verticalAnchor:p},O):a==="insideBottomRight"?Ge({x:l+s-w,y:u+f-d,textAnchor:g,verticalAnchor:p},O):Sa(a)&&(X(a.x)||Wn(a.x))&&(X(a.y)||Wn(a.y))?Ge({x:l+ni(a.x,s),y:u+ni(a.y,f),textAnchor:"end",verticalAnchor:"end"},O):Ge({x:l+s/2,y:u+f/2,textAnchor:"middle",verticalAnchor:"middle"},O)},qW=function(t){return"cx"in t&&X(t.cx)};function ht(e){var t=e.offset,r=t===void 0?5:t,n=RW(e,kW),i=Ge({offset:r},n),a=i.viewBox,o=i.position,l=i.value,u=i.children,s=i.content,f=i.className,c=f===void 0?"":f,d=i.textBreakAll;if(!a||fe(l)&&fe(u)&&!N.isValidElement(s)&&!ue(s))return null;if(N.isValidElement(s))return N.cloneElement(s,i);var p;if(ue(s)){if(p=N.createElement(s,i),N.isValidElement(p))return p}else p=UW(i);var v=qW(a),b=de(i,!0);if(v&&(o==="insideStart"||o==="insideEnd"||o==="end"))return VW(i,p,b);var w=v?GW(i):KW(i);return A.createElement(ds,el({className:ve("recharts-label",c)},b,w,{breakAll:d}),p)}ht.displayName="Label";var S_=function(t){var r=t.cx,n=t.cy,i=t.angle,a=t.startAngle,o=t.endAngle,l=t.r,u=t.radius,s=t.innerRadius,f=t.outerRadius,c=t.x,d=t.y,p=t.top,v=t.left,b=t.width,w=t.height,g=t.clockWise,y=t.labelViewBox;if(y)return y;if(X(b)&&X(w)){if(X(c)&&X(d))return{x:c,y:d,width:b,height:w};if(X(p)&&X(v))return{x:p,y:v,width:b,height:w}}return X(c)&&X(d)?{x:c,y:d,width:0,height:0}:X(r)&&X(n)?{cx:r,cy:n,startAngle:a||i||0,endAngle:o||i||0,innerRadius:s||0,outerRadius:f||u||l||0,clockWise:g}:t.viewBox?t.viewBox:{}},XW=function(t,r){return t?t===!0?A.createElement(ht,{key:"label-implicit",viewBox:r}):Xe(t)?A.createElement(ht,{key:"label-implicit",viewBox:r,value:t}):N.isValidElement(t)?t.type===ht?N.cloneElement(t,{key:"label-implicit",viewBox:r}):A.createElement(ht,{key:"label-implicit",content:t,viewBox:r}):ue(t)?A.createElement(ht,{key:"label-implicit",content:t,viewBox:r}):Sa(t)?A.createElement(ht,el({viewBox:r},t,{key:"label-implicit"})):null:null},YW=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var i=t.children,a=S_(t),o=Jt(i,ht).map(function(u,s){return N.cloneElement(u,{viewBox:r||a,key:"label-".concat(s)})});if(!n)return o;var l=XW(t.label,r||a);return[l].concat(MW(o))};ht.parseViewBox=S_;ht.renderCallByParent=YW;function QW(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var ZW=QW;const JW=Ae(ZW);function tl(e){"@babel/helpers - typeof";return tl=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},tl(e)}var e6=["valueAccessor"],t6=["data","dataKey","clockWise","id","textBreakAll"];function r6(e){return o6(e)||a6(e)||i6(e)||n6()}function n6(){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 i6(e,t){if(e){if(typeof e=="string")return Vp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Vp(e,t)}}function a6(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function o6(e){if(Array.isArray(e))return Vp(e)}function Vp(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function c6(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var f6=function(t){return Array.isArray(t.value)?JW(t.value):t.value};function xn(e){var t=e.valueAccessor,r=t===void 0?f6:t,n=bb(e,e6),i=n.data,a=n.dataKey,o=n.clockWise,l=n.id,u=n.textBreakAll,s=bb(n,t6);return!i||!i.length?null:A.createElement(We,{className:"recharts-label-list"},i.map(function(f,c){var d=fe(a)?r(f,c):zt(f&&f.payload,a),p=fe(l)?{}:{id:"".concat(l,"-").concat(c)};return A.createElement(ht,$s({},de(f,!0),s,p,{parentViewBox:f.parentViewBox,value:d,textBreakAll:u,viewBox:ht.parseViewBox(fe(o)?f:gb(gb({},f),{},{clockWise:o})),key:"label-".concat(c),index:c}))}))}xn.displayName="LabelList";function d6(e,t){return e?e===!0?A.createElement(xn,{key:"labelList-implicit",data:t}):A.isValidElement(e)||ue(e)?A.createElement(xn,{key:"labelList-implicit",data:t,content:e}):Sa(e)?A.createElement(xn,$s({data:t},e,{key:"labelList-implicit"})):null:null}function p6(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var n=e.children,i=Jt(n,xn).map(function(o,l){return N.cloneElement(o,{data:t,key:"labelList-".concat(l)})});if(!r)return i;var a=d6(e.label,t);return[a].concat(r6(i))}xn.renderCallByParent=p6;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 Gp(){return Gp=Object.assign?Object.assign.bind():function(e){for(var t=1;t180),",").concat(+(o>s),`, + `).concat(c.x,",").concat(c.y,` + `);if(i>0){var p=lt(r,n,i,o),v=lt(r,n,i,s);d+="L ".concat(v.x,",").concat(v.y,` + A `).concat(i,",").concat(i,`,0, + `).concat(+(Math.abs(u)>180),",").concat(+(o<=s),`, + `).concat(p.x,",").concat(p.y," Z")}else d+="L ".concat(r,",").concat(n," Z");return d},g6=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.cornerRadius,l=t.forceCornerRadius,u=t.cornerIsExternal,s=t.startAngle,f=t.endAngle,c=vr(f-s),d=su({cx:r,cy:n,radius:a,angle:s,sign:c,cornerRadius:o,cornerIsExternal:u}),p=d.circleTangency,v=d.lineTangency,b=d.theta,w=su({cx:r,cy:n,radius:a,angle:f,sign:-c,cornerRadius:o,cornerIsExternal:u}),g=w.circleTangency,y=w.lineTangency,h=w.theta,S=u?Math.abs(s-f):Math.abs(s-f)-b-h;if(S<0)return l?"M ".concat(v.x,",").concat(v.y,` + a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0 + a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0 + `):O_({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:s,endAngle:f});var m="M ".concat(v.x,",").concat(v.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(c<0),",").concat(p.x,",").concat(p.y,` + A`).concat(a,",").concat(a,",0,").concat(+(S>180),",").concat(+(c<0),",").concat(g.x,",").concat(g.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(c<0),",").concat(y.x,",").concat(y.y,` + `);if(i>0){var x=su({cx:r,cy:n,radius:i,angle:s,sign:c,isExternal:!0,cornerRadius:o,cornerIsExternal:u}),O=x.circleTangency,_=x.lineTangency,P=x.theta,T=su({cx:r,cy:n,radius:i,angle:f,sign:-c,isExternal:!0,cornerRadius:o,cornerIsExternal:u}),$=T.circleTangency,j=T.lineTangency,L=T.theta,B=u?Math.abs(s-f):Math.abs(s-f)-P-L;if(B<0&&o===0)return"".concat(m,"L").concat(r,",").concat(n,"Z");m+="L".concat(j.x,",").concat(j.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(c<0),",").concat($.x,",").concat($.y,` + A`).concat(i,",").concat(i,",0,").concat(+(B>180),",").concat(+(c>0),",").concat(O.x,",").concat(O.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(c<0),",").concat(_.x,",").concat(_.y,"Z")}else m+="L".concat(r,",").concat(n,"Z");return m},b6={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},__=function(t){var r=xb(xb({},b6),t),n=r.cx,i=r.cy,a=r.innerRadius,o=r.outerRadius,l=r.cornerRadius,u=r.forceCornerRadius,s=r.cornerIsExternal,f=r.startAngle,c=r.endAngle,d=r.className;if(o0&&Math.abs(f-c)<360?w=g6({cx:n,cy:i,innerRadius:a,outerRadius:o,cornerRadius:Math.min(b,v/2),forceCornerRadius:u,cornerIsExternal:s,startAngle:f,endAngle:c}):w=O_({cx:n,cy:i,innerRadius:a,outerRadius:o,startAngle:f,endAngle:c}),A.createElement("path",Gp({},de(r,!0),{className:p,d:w,role:"img"}))};function nl(e){"@babel/helpers - typeof";return nl=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},nl(e)}function Kp(){return Kp=Object.assign?Object.assign.bind():function(e){for(var t=1;t0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function R6(e,t){return di(e.getTime(),t.getTime())}function B6(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function z6(e,t){return e===t}function Tb(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var i=new Array(n),a=e.entries(),o,l,u=0;(o=a.next())&&!o.done;){for(var s=t.entries(),f=!1,c=0;(l=s.next())&&!l.done;){if(i[c]){c++;continue}var d=o.value,p=l.value;if(r.equals(d[0],p[0],u,c,e,t,r)&&r.equals(d[1],p[1],d[0],p[0],e,t,r)){f=i[c]=!0;break}c++}if(!f)return!1;u++}return!0}var F6=di;function W6(e,t,r){var n=$b(e),i=n.length;if($b(t).length!==i)return!1;for(;i-- >0;)if(!$_(e,t,r,n[i]))return!1;return!0}function Ya(e,t,r){var n=Ab(e),i=n.length;if(Ab(t).length!==i)return!1;for(var a,o,l;i-- >0;)if(a=n[i],!$_(e,t,r,a)||(o=Eb(e,a),l=Eb(t,a),(o||l)&&(!o||!l||o.configurable!==l.configurable||o.enumerable!==l.enumerable||o.writable!==l.writable)))return!1;return!0}function U6(e,t){return di(e.valueOf(),t.valueOf())}function H6(e,t){return e.source===t.source&&e.flags===t.flags}function jb(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var i=new Array(n),a=e.values(),o,l;(o=a.next())&&!o.done;){for(var u=t.values(),s=!1,f=0;(l=u.next())&&!l.done;){if(!i[f]&&r.equals(o.value,l.value,o.value,l.value,e,t,r)){s=i[f]=!0;break}f++}if(!s)return!1}return!0}function V6(e,t){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function G6(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function $_(e,t,r,n){return(n===D6||n===I6||n===N6)&&(e.$$typeof||t.$$typeof)?!0:M6(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}var K6="[object Arguments]",q6="[object Boolean]",X6="[object Date]",Y6="[object Error]",Q6="[object Map]",Z6="[object Number]",J6="[object Object]",eU="[object RegExp]",tU="[object Set]",rU="[object String]",nU="[object URL]",iU=Array.isArray,Cb=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,kb=Object.assign,aU=Object.prototype.toString.call.bind(Object.prototype.toString);function oU(e){var t=e.areArraysEqual,r=e.areDatesEqual,n=e.areErrorsEqual,i=e.areFunctionsEqual,a=e.areMapsEqual,o=e.areNumbersEqual,l=e.areObjectsEqual,u=e.arePrimitiveWrappersEqual,s=e.areRegExpsEqual,f=e.areSetsEqual,c=e.areTypedArraysEqual,d=e.areUrlsEqual;return function(v,b,w){if(v===b)return!0;if(v==null||b==null)return!1;var g=typeof v;if(g!==typeof b)return!1;if(g!=="object")return g==="number"?o(v,b,w):g==="function"?i(v,b,w):!1;var y=v.constructor;if(y!==b.constructor)return!1;if(y===Object)return l(v,b,w);if(iU(v))return t(v,b,w);if(Cb!=null&&Cb(v))return c(v,b,w);if(y===Date)return r(v,b,w);if(y===RegExp)return s(v,b,w);if(y===Map)return a(v,b,w);if(y===Set)return f(v,b,w);var h=aU(v);return h===X6?r(v,b,w):h===eU?s(v,b,w):h===Q6?a(v,b,w):h===tU?f(v,b,w):h===J6?typeof v.then!="function"&&typeof b.then!="function"&&l(v,b,w):h===nU?d(v,b,w):h===Y6?n(v,b,w):h===K6?l(v,b,w):h===q6||h===Z6||h===rU?u(v,b,w):!1}}function lU(e){var t=e.circular,r=e.createCustomConfig,n=e.strict,i={areArraysEqual:n?Ya:L6,areDatesEqual:R6,areErrorsEqual:B6,areFunctionsEqual:z6,areMapsEqual:n?Pb(Tb,Ya):Tb,areNumbersEqual:F6,areObjectsEqual:n?Ya:W6,arePrimitiveWrappersEqual:U6,areRegExpsEqual:H6,areSetsEqual:n?Pb(jb,Ya):jb,areTypedArraysEqual:n?Ya:V6,areUrlsEqual:G6};if(r&&(i=kb({},i,r(i))),t){var a=fu(i.areArraysEqual),o=fu(i.areMapsEqual),l=fu(i.areObjectsEqual),u=fu(i.areSetsEqual);i=kb({},i,{areArraysEqual:a,areMapsEqual:o,areObjectsEqual:l,areSetsEqual:u})}return i}function uU(e){return function(t,r,n,i,a,o,l){return e(t,r,l)}}function sU(e){var t=e.circular,r=e.comparator,n=e.createState,i=e.equals,a=e.strict;if(n)return function(u,s){var f=n(),c=f.cache,d=c===void 0?t?new WeakMap:void 0:c,p=f.meta;return r(u,s,{cache:d,equals:i,meta:p,strict:a})};if(t)return function(u,s){return r(u,s,{cache:new WeakMap,equals:i,meta:void 0,strict:a})};var o={cache:void 0,equals:i,meta:void 0,strict:a};return function(u,s){return r(u,s,o)}}var cU=Cn();Cn({strict:!0});Cn({circular:!0});Cn({circular:!0,strict:!0});Cn({createInternalComparator:function(){return di}});Cn({strict:!0,createInternalComparator:function(){return di}});Cn({circular:!0,createInternalComparator:function(){return di}});Cn({circular:!0,createInternalComparator:function(){return di},strict:!0});function Cn(e){e===void 0&&(e={});var t=e.circular,r=t===void 0?!1:t,n=e.createInternalComparator,i=e.createState,a=e.strict,o=a===void 0?!1:a,l=lU(e),u=oU(l),s=n?n(u):uU(u);return sU({circular:r,comparator:u,createState:i,equals:s,strict:o})}function fU(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function Mb(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function i(a){r<0&&(r=a),a-r>t?(e(a),r=-1):fU(i)};requestAnimationFrame(n)}function Xp(e){"@babel/helpers - typeof";return Xp=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},Xp(e)}function dU(e){return yU(e)||vU(e)||hU(e)||pU()}function pU(){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 hU(e,t){if(e){if(typeof e=="string")return Nb(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Nb(e,t)}}function Nb(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1?1:g<0?0:g},b=function(g){for(var y=g>1?1:g,h=y,S=0;S<8;++S){var m=c(h)-y,x=p(h);if(Math.abs(m-y)0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,i=t.damping,a=i===void 0?8:i,o=t.dt,l=o===void 0?17:o,u=function(f,c,d){var p=-(f-c)*n,v=d*a,b=d+(p-v)*l/1e3,w=d*l/1e3+f;return Math.abs(w-c)e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function KU(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a=0)&&(r[i]=e[i]);return r}function Jf(e){return QU(e)||YU(e)||XU(e)||qU()}function qU(){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 XU(e,t){if(e){if(typeof e=="string")return eh(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return eh(e,t)}}function YU(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function QU(e){if(Array.isArray(e))return eh(e)}function eh(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r"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 Cs(e){return Cs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Cs(e)}var Yr=function(e){rH(r,e);var t=nH(r);function r(n,i){var a;ZU(this,r),a=t.call(this,n,i);var o=a.props,l=o.isActive,u=o.attributeName,s=o.from,f=o.to,c=o.steps,d=o.children,p=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(nh(a)),a.changeStyle=a.changeStyle.bind(nh(a)),!l||p<=0)return a.state={style:{}},typeof d=="function"&&(a.state={style:f}),rh(a);if(c&&c.length)a.state={style:c[0].style};else if(s){if(typeof d=="function")return a.state={style:s},rh(a);a.state={style:u?no({},u,s):s}}else a.state={style:{}};return a}return eH(r,[{key:"componentDidMount",value:function(){var i=this.props,a=i.isActive,o=i.canBegin;this.mounted=!0,!(!a||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var a=this.props,o=a.isActive,l=a.canBegin,u=a.attributeName,s=a.shouldReAnimate,f=a.to,c=a.from,d=this.state.style;if(l){if(!o){var p={style:u?no({},u,f):f};this.state&&d&&(u&&d[u]!==f||!u&&d!==f)&&this.setState(p);return}if(!(cU(i.to,f)&&i.canBegin&&i.isActive)){var v=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var b=v||s?c:i.to;if(this.state&&d){var w={style:u?no({},u,b):b};(u&&d[u]!==b||!u&&d!==b)&&this.setState(w)}this.runAnimation(lr(lr({},this.props),{},{from:b,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 a=this,o=i.from,l=i.to,u=i.duration,s=i.easing,f=i.begin,c=i.onAnimationEnd,d=i.onAnimationStart,p=HU(o,l,MU(s),u,this.changeStyle),v=function(){a.stopJSAnimation=p()};this.manager.start([d,f,v,u,c])}},{key:"runStepAnimation",value:function(i){var a=this,o=i.steps,l=i.begin,u=i.onAnimationStart,s=o[0],f=s.style,c=s.duration,d=c===void 0?0:c,p=function(b,w,g){if(g===0)return b;var y=w.duration,h=w.easing,S=h===void 0?"ease":h,m=w.style,x=w.properties,O=w.onAnimationEnd,_=g>0?o[g-1]:w,P=x||Object.keys(m);if(typeof S=="function"||S==="spring")return[].concat(Jf(b),[a.runJSAnimation.bind(a,{from:_.style,to:m,duration:y,easing:S}),y]);var T=Lb(P,y,S),$=lr(lr(lr({},_.style),m),{},{transition:T});return[].concat(Jf(b),[$,y,O]).filter(xU)};return this.manager.start([u].concat(Jf(o.reduce(p,[f,Math.max(d,l)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=mU());var a=i.begin,o=i.duration,l=i.attributeName,u=i.to,s=i.easing,f=i.onAnimationStart,c=i.onAnimationEnd,d=i.steps,p=i.children,v=this.manager;if(this.unSubscribe=v.subscribe(this.handleStyleChange),typeof s=="function"||typeof p=="function"||s==="spring"){this.runJSAnimation(i);return}if(d.length>1){this.runStepAnimation(i);return}var b=l?no({},l,u):u,w=Lb(Object.keys(b),o,s);v.start([f,a,lr(lr({},b),{},{transition:w}),o,c])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var o=i.duration;i.attributeName,i.easing;var l=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var u=GU(i,VU),s=N.Children.count(a),f=this.state.style;if(typeof a=="function")return a(f);if(!l||s===0||o<=0)return a;var c=function(p){var v=p.props,b=v.style,w=b===void 0?{}:b,g=v.className,y=N.cloneElement(p,lr(lr({},u),{},{style:lr(lr({},w),f),className:g}));return y};return s===1?c(N.Children.only(a)):A.createElement("div",null,N.Children.map(a,function(d){return c(d)}))}}]),r}(N.PureComponent);Yr.displayName="Animate";Yr.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Yr.propTypes={from:be.oneOfType([be.object,be.string]),to:be.oneOfType([be.object,be.string]),attributeName:be.string,duration:be.number,begin:be.number,easing:be.oneOfType([be.string,be.func]),steps:be.arrayOf(be.shape({duration:be.number.isRequired,style:be.object.isRequired,easing:be.oneOfType([be.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),be.func]),properties:be.arrayOf("string"),onAnimationEnd:be.func})),children:be.oneOfType([be.node,be.func]),isActive:be.bool,canBegin:be.bool,onAnimationEnd:be.func,shouldReAnimate:be.bool,onAnimationStart:be.func,onAnimationReStart:be.func};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 ks(){return ks=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0?1:-1,u=n>=0?1:-1,s=i>=0&&n>=0||i<0&&n<0?1:0,f;if(o>0&&a instanceof Array){for(var c=[0,0,0,0],d=0,p=4;do?o:a[d];f="M".concat(t,",").concat(r+l*c[0]),c[0]>0&&(f+="A ".concat(c[0],",").concat(c[0],",0,0,").concat(s,",").concat(t+u*c[0],",").concat(r)),f+="L ".concat(t+n-u*c[1],",").concat(r),c[1]>0&&(f+="A ".concat(c[1],",").concat(c[1],",0,0,").concat(s,`, + `).concat(t+n,",").concat(r+l*c[1])),f+="L ".concat(t+n,",").concat(r+i-l*c[2]),c[2]>0&&(f+="A ".concat(c[2],",").concat(c[2],",0,0,").concat(s,`, + `).concat(t+n-u*c[2],",").concat(r+i)),f+="L ".concat(t+u*c[3],",").concat(r+i),c[3]>0&&(f+="A ".concat(c[3],",").concat(c[3],",0,0,").concat(s,`, + `).concat(t,",").concat(r+i-l*c[3])),f+="Z"}else if(o>0&&a===+a&&a>0){var v=Math.min(o,a);f="M ".concat(t,",").concat(r+l*v,` + A `).concat(v,",").concat(v,",0,0,").concat(s,",").concat(t+u*v,",").concat(r,` + L `).concat(t+n-u*v,",").concat(r,` + A `).concat(v,",").concat(v,",0,0,").concat(s,",").concat(t+n,",").concat(r+l*v,` + L `).concat(t+n,",").concat(r+i-l*v,` + A `).concat(v,",").concat(v,",0,0,").concat(s,",").concat(t+n-u*v,",").concat(r+i,` + L `).concat(t+u*v,",").concat(r+i,` + A `).concat(v,",").concat(v,",0,0,").concat(s,",").concat(t,",").concat(r+i-l*v," Z")}else f="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(i," h ").concat(-n," Z");return f},pH=function(t,r){if(!t||!r)return!1;var n=t.x,i=t.y,a=r.x,o=r.y,l=r.width,u=r.height;if(Math.abs(l)>0&&Math.abs(u)>0){var s=Math.min(a,a+l),f=Math.max(a,a+l),c=Math.min(o,o+u),d=Math.max(o,o+u);return n>=s&&n<=f&&i>=c&&i<=d}return!1},hH={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},gy=function(t){var r=Vb(Vb({},hH),t),n=N.useRef(),i=N.useState(-1),a=aH(i,2),o=a[0],l=a[1];N.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var S=n.current.getTotalLength();S&&l(S)}catch{}},[]);var u=r.x,s=r.y,f=r.width,c=r.height,d=r.radius,p=r.className,v=r.animationEasing,b=r.animationDuration,w=r.animationBegin,g=r.isAnimationActive,y=r.isUpdateAnimationActive;if(u!==+u||s!==+s||f!==+f||c!==+c||f===0||c===0)return null;var h=ve("recharts-rectangle",p);return y?A.createElement(Yr,{canBegin:o>0,from:{width:f,height:c,x:u,y:s},to:{width:f,height:c,x:u,y:s},duration:b,animationEasing:v,isActive:y},function(S){var m=S.width,x=S.height,O=S.x,_=S.y;return A.createElement(Yr,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:w,duration:b,isActive:g,easing:v},A.createElement("path",ks({},de(r,!0),{className:h,d:Gb(O,_,m,x,d),ref:n})))}):A.createElement("path",ks({},de(r,!0),{className:h,d:Gb(u,s,f,c,d)}))};function ih(){return ih=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function xH(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var SH=function(t,r,n,i,a,o){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(o,",").concat(r,"h").concat(n)},OH=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.top,l=o===void 0?0:o,u=t.left,s=u===void 0?0:u,f=t.width,c=f===void 0?0:f,d=t.height,p=d===void 0?0:d,v=t.className,b=wH(t,vH),w=yH({x:n,y:a,top:l,left:s,width:c,height:p},b);return!X(n)||!X(a)||!X(c)||!X(p)||!X(l)||!X(s)?null:A.createElement("path",ah({},de(w,!0),{className:ve("recharts-cross",v),d:SH(n,a,c,p,l,s)}))},_H=qS,PH=_H(Object.getPrototypeOf,Object),AH=PH,EH=Zr,$H=AH,TH=Jr,jH="[object Object]",CH=Function.prototype,kH=Object.prototype,I_=CH.toString,MH=kH.hasOwnProperty,NH=I_.call(Object);function IH(e){if(!TH(e)||EH(e)!=jH)return!1;var t=$H(e);if(t===null)return!0;var r=MH.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&I_.call(r)==NH}var DH=IH;const LH=Ae(DH);var RH=Zr,BH=Jr,zH="[object Boolean]";function FH(e){return e===!0||e===!1||BH(e)&&RH(e)==zH}var WH=FH;const UH=Ae(WH);function ul(e){"@babel/helpers - typeof";return ul=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},ul(e)}function Ms(){return Ms=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0,from:{upperWidth:0,lowerWidth:0,height:d,x:u,y:s},to:{upperWidth:f,lowerWidth:c,height:d,x:u,y:s},duration:b,animationEasing:v,isActive:g},function(h){var S=h.upperWidth,m=h.lowerWidth,x=h.height,O=h.x,_=h.y;return A.createElement(Yr,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:w,duration:b,easing:v},A.createElement("path",Ms({},de(r,!0),{className:y,d:Qb(O,_,S,m,x),ref:n})))}):A.createElement("g",null,A.createElement("path",Ms({},de(r,!0),{className:y,d:Qb(u,s,f,c,d)})))},e7=["option","shapeType","propTransformer","activeClassName","isActive"];function sl(e){"@babel/helpers - typeof";return sl=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},sl(e)}function t7(e,t){if(e==null)return{};var r=r7(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function r7(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Zb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ns(e){for(var t=1;t0&&n.handleDrag(i.changedTouches[0])}),Mt(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=n.props,a=i.endIndex,o=i.onDragEnd,l=i.startIndex;o==null||o({endIndex:a,startIndex:l})}),n.detachDragEndListener()}),Mt(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),Mt(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),Mt(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),Mt(n,"handleSlideDragStart",function(i){var a=a1(i)?i.changedTouches[0]:i;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return z7(t,e),D7(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var i=n.startX,a=n.endX,o=this.state.scaleValues,l=this.props,u=l.gap,s=l.data,f=s.length-1,c=Math.min(i,a),d=Math.max(i,a),p=t.getIndexInRange(o,c),v=t.getIndexInRange(o,d);return{startIndex:p-p%u,endIndex:v===f?f:v-v%u}}},{key:"getTextOfTick",value:function(n){var i=this.props,a=i.data,o=i.tickFormatter,l=i.dataKey,u=zt(a[n],l,n);return ue(o)?o(u,n):u}},{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(n){var i=this.state,a=i.slideMoveStartX,o=i.startX,l=i.endX,u=this.props,s=u.x,f=u.width,c=u.travellerWidth,d=u.startIndex,p=u.endIndex,v=u.onChange,b=n.pageX-a;b>0?b=Math.min(b,s+f-c-l,s+f-c-o):b<0&&(b=Math.max(b,s-o,s-l));var w=this.getIndex({startX:o+b,endX:l+b});(w.startIndex!==d||w.endIndex!==p)&&v&&v(w),this.setState({startX:o+b,endX:l+b,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,i){var a=a1(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var i=this.state,a=i.brushMoveStartX,o=i.movingTravellerId,l=i.endX,u=i.startX,s=this.state[o],f=this.props,c=f.x,d=f.width,p=f.travellerWidth,v=f.onChange,b=f.gap,w=f.data,g={startX:this.state.startX,endX:this.state.endX},y=n.pageX-a;y>0?y=Math.min(y,c+d-p-s):y<0&&(y=Math.max(y,c-s)),g[o]=s+y;var h=this.getIndex(g),S=h.startIndex,m=h.endIndex,x=function(){var _=w.length-1;return o==="startX"&&(l>u?S%b===0:m%b===0)||lu?m%b===0:S%b===0)||l>u&&m===_};this.setState(Mt(Mt({},o,s+y),"brushMoveStartX",n.pageX),function(){v&&x()&&v(h)})}},{key:"handleTravellerMoveKeyboard",value:function(n,i){var a=this,o=this.state,l=o.scaleValues,u=o.startX,s=o.endX,f=this.state[i],c=l.indexOf(f);if(c!==-1){var d=c+n;if(!(d===-1||d>=l.length)){var p=l[d];i==="startX"&&p>=s||i==="endX"&&p<=u||this.setState(Mt({},i,p),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,l=n.height,u=n.fill,s=n.stroke;return A.createElement("rect",{stroke:s,fill:u,x:i,y:a,width:o,height:l})}},{key:"renderPanorama",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,l=n.height,u=n.data,s=n.children,f=n.padding,c=N.Children.only(s);return c?A.cloneElement(c,{x:i,y:a,width:o,height:l,margin:f,compact:!0,data:u}):null}},{key:"renderTravellerLayer",value:function(n,i){var a,o,l=this,u=this.props,s=u.y,f=u.travellerWidth,c=u.height,d=u.traveller,p=u.ariaLabel,v=u.data,b=u.startIndex,w=u.endIndex,g=Math.max(n,this.props.x),y=td(td({},de(this.props,!1)),{},{x:g,y:s,width:f,height:c}),h=p||"Min value: ".concat((a=v[b])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=v[w])===null||o===void 0?void 0:o.name);return A.createElement(We,{tabIndex:0,role:"slider","aria-label":h,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(m){["ArrowLeft","ArrowRight"].includes(m.key)&&(m.preventDefault(),m.stopPropagation(),l.handleTravellerMoveKeyboard(m.key==="ArrowRight"?1:-1,i))},onFocus:function(){l.setState({isTravellerFocused:!0})},onBlur:function(){l.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(d,y))}},{key:"renderSlide",value:function(n,i){var a=this.props,o=a.y,l=a.height,u=a.stroke,s=a.travellerWidth,f=Math.min(n,i)+s,c=Math.max(Math.abs(i-n)-s,0);return A.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:u,fillOpacity:.2,x:f,y:o,width:c,height:l})}},{key:"renderText",value:function(){var n=this.props,i=n.startIndex,a=n.endIndex,o=n.y,l=n.height,u=n.travellerWidth,s=n.stroke,f=this.state,c=f.startX,d=f.endX,p=5,v={pointerEvents:"none",fill:s};return A.createElement(We,{className:"recharts-brush-texts"},A.createElement(ds,Ds({textAnchor:"end",verticalAnchor:"middle",x:Math.min(c,d)-p,y:o+l/2},v),this.getTextOfTick(i)),A.createElement(ds,Ds({textAnchor:"start",verticalAnchor:"middle",x:Math.max(c,d)+u+p,y:o+l/2},v),this.getTextOfTick(a)))}},{key:"render",value:function(){var n=this.props,i=n.data,a=n.className,o=n.children,l=n.x,u=n.y,s=n.width,f=n.height,c=n.alwaysShowText,d=this.state,p=d.startX,v=d.endX,b=d.isTextActive,w=d.isSlideMoving,g=d.isTravellerMoving,y=d.isTravellerFocused;if(!i||!i.length||!X(l)||!X(u)||!X(s)||!X(f)||s<=0||f<=0)return null;var h=ve("recharts-brush",a),S=A.Children.count(o)===1,m=N7("userSelect","none");return A.createElement(We,{className:h,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:m},this.renderBackground(),S&&this.renderPanorama(),this.renderSlide(p,v),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(v,"endX"),(b||w||g||y||c)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var i=n.x,a=n.y,o=n.width,l=n.height,u=n.stroke,s=Math.floor(a+l/2)-1;return A.createElement(A.Fragment,null,A.createElement("rect",{x:i,y:a,width:o,height:l,fill:u,stroke:"none"}),A.createElement("line",{x1:i+1,y1:s,x2:i+o-1,y2:s,fill:"none",stroke:"#fff"}),A.createElement("line",{x1:i+1,y1:s+2,x2:i+o-1,y2:s+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,i){var a;return A.isValidElement(n)?a=A.cloneElement(n,i):ue(n)?a=n(i):a=t.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(n,i){var a=n.data,o=n.width,l=n.x,u=n.travellerWidth,s=n.updateId,f=n.startIndex,c=n.endIndex;if(a!==i.prevData||s!==i.prevUpdateId)return td({prevData:a,prevTravellerWidth:u,prevUpdateId:s,prevX:l,prevWidth:o},a&&a.length?W7({data:a,width:o,x:l,travellerWidth:u,startIndex:f,endIndex:c}):{scale:null,scaleValues:null});if(i.scale&&(o!==i.prevWidth||l!==i.prevX||u!==i.prevTravellerWidth)){i.scale.range([l,l+o-u]);var d=i.scale.domain().map(function(p){return i.scale(p)});return{prevData:a,prevTravellerWidth:u,prevUpdateId:s,prevX:l,prevWidth:o,startX:i.scale(n.startIndex),endX:i.scale(n.endIndex),scaleValues:d}}return null}},{key:"getIndexInRange",value:function(n,i){for(var a=n.length,o=0,l=a-1;l-o>1;){var u=Math.floor((o+l)/2);n[u]>i?l=u:o=u}return i>=n[l]?l:o}}])}(N.PureComponent);Mt(la,"displayName","Brush");Mt(la,"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 U7=Hv;function H7(e,t){var r;return U7(e,function(n,i,a){return r=t(n,i,a),!r}),!!r}var V7=H7,G7=zS,K7=$n,q7=V7,X7=Ct,Y7=Mc;function Q7(e,t,r){var n=X7(e)?G7:q7;return r&&Y7(e,t,r)&&(t=void 0),n(e,K7(t))}var Z7=Q7;const J7=Ae(Z7);var $r=function(t,r){var n=t.alwaysShow,i=t.ifOverflow;return n&&(i="extendDomain"),i===r},o1=uO;function e9(e,t,r){t=="__proto__"&&o1?o1(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var t9=e9,r9=t9,n9=oO,i9=$n;function a9(e,t){var r={};return t=i9(t),n9(e,function(n,i,a){r9(r,i,t(n,i,a))}),r}var o9=a9;const l9=Ae(o9);function u9(e,t){for(var r=-1,n=e==null?0:e.length;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function P9(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function A9(e,t){var r=e.x,n=e.y,i=_9(e,w9),a="".concat(r),o=parseInt(a,10),l="".concat(n),u=parseInt(l,10),s="".concat(t.height||i.height),f=parseInt(s,10),c="".concat(t.width||i.width),d=parseInt(c,10);return Qa(Qa(Qa(Qa(Qa({},t),i),o?{x:o}:{}),u?{y:u}:{}),{},{height:f,width:d,name:t.name,radius:t.radius})}function u1(e){return A.createElement(s7,lh({shapeType:"rectangle",propTransformer:A9,activeClassName:"recharts-active-bar"},e))}var E9=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,i){if(typeof t=="number")return t;var a=typeof n=="number";return a?t(n,i):(a||ai(),r)}},$9=["value","background"],F_;function ua(e){"@babel/helpers - typeof";return ua=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},ua(e)}function T9(e,t){if(e==null)return{};var r=j9(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function j9(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Rs(){return Rs=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(M)0&&Math.abs(B)0&&(L=Math.min((le||0)-(B[Se-1]||0),L))}),Number.isFinite(L)){var M=L/j,z=b.layout==="vertical"?n.height:n.width;if(b.padding==="gap"&&(O=M*z/2),b.padding==="no-gap"){var U=ni(t.barCategoryGap,M*z),C=M*z/2;O=C-U-(C-U)/z*U}}}i==="xAxis"?_=[n.left+(h.left||0)+(O||0),n.left+n.width-(h.right||0)-(O||0)]:i==="yAxis"?_=u==="horizontal"?[n.top+n.height-(h.bottom||0),n.top+(h.top||0)]:[n.top+(h.top||0)+(O||0),n.top+n.height-(h.bottom||0)-(O||0)]:_=b.range,m&&(_=[_[1],_[0]]);var D=fW(b,a,d),W=D.scale,Y=D.realScaleType;W.domain(g).range(_),dW(W);var V=wW(W,cr(cr({},b),{},{realScaleType:Y}));i==="xAxis"?($=w==="top"&&!S||w==="bottom"&&S,P=n.left,T=c[x]-$*b.height):i==="yAxis"&&($=w==="left"&&!S||w==="right"&&S,P=c[x]-$*b.width,T=n.top);var re=cr(cr(cr({},b),V),{},{realScaleType:Y,x:P,y:T,scale:W,width:i==="xAxis"?n.width:b.width,height:i==="yAxis"?n.height:b.height});return re.bandSize=As(re,V),!b.hide&&i==="xAxis"?c[x]+=($?-1:1)*re.height:b.hide||(c[x]+=($?-1:1)*re.width),cr(cr({},p),{},Kc({},v,re))},{})},V_=function(t,r){var n=t.x,i=t.y,a=r.x,o=r.y;return{x:Math.min(n,a),y:Math.min(i,o),width:Math.abs(a-n),height:Math.abs(o-i)}},W9=function(t){var r=t.x1,n=t.y1,i=t.x2,a=t.y2;return V_({x:r,y:n},{x:i,y:a})},G_=function(){function e(t){R9(this,e),this.scale=t}return B9(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(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.bandAware,a=n.position;if(r!==void 0){if(a)switch(a){case"start":return this.scale(r);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+o}case"end":{var l=this.bandwidth?this.bandwidth():0;return this.scale(r)+l}default:return this.scale(r)}if(i){var u=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+u}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),i=n[0],a=n[n.length-1];return i<=a?r>=i&&r<=a:r>=a&&r<=i}}],[{key:"create",value:function(r){return new e(r)}}])}();Kc(G_,"EPS",1e-4);var wy=function(t){var r=Object.keys(t).reduce(function(n,i){return cr(cr({},n),{},Kc({},i,G_.create(t[i])))},{});return cr(cr({},r),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,l=a.position;return l9(i,function(u,s){return r[s].apply(u,{bandAware:o,position:l})})},isInRange:function(i){return z_(i,function(a,o){return r[o].isInRange(a)})}})};function U9(e){return(e%180+180)%180}var H9=function(t){var r=t.width,n=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=U9(i),o=a*Math.PI/180,l=Math.atan(n/r),u=o>l&&o-1?i[a?t[o]:o]:void 0}}var X9=q9,Y9=D_;function Q9(e){var t=Y9(e),r=t%1;return t===t?r?t-r:t:0}var Z9=Q9,J9=eO,eV=$n,tV=Z9,rV=Math.max;function nV(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:tV(r);return i<0&&(i=rV(n+i,0)),J9(e,eV(t),i)}var iV=nV,aV=X9,oV=iV,lV=aV(oV),uV=lV;const sV=Ae(uV);var cV=Yj(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("")}),xy=N.createContext(void 0),Sy=N.createContext(void 0),K_=N.createContext(void 0),q_=N.createContext({}),X_=N.createContext(void 0),Y_=N.createContext(0),Q_=N.createContext(0),p1=function(t){var r=t.state,n=r.xAxisMap,i=r.yAxisMap,a=r.offset,o=t.clipPathId,l=t.children,u=t.width,s=t.height,f=cV(a);return A.createElement(xy.Provider,{value:n},A.createElement(Sy.Provider,{value:i},A.createElement(q_.Provider,{value:a},A.createElement(K_.Provider,{value:f},A.createElement(X_.Provider,{value:o},A.createElement(Y_.Provider,{value:s},A.createElement(Q_.Provider,{value:u},l)))))))},fV=function(){return N.useContext(X_)},Z_=function(t){var r=N.useContext(xy);r==null&&ai();var n=r[t];return n==null&&ai(),n},dV=function(){var t=N.useContext(xy);return un(t)},pV=function(){var t=N.useContext(Sy),r=sV(t,function(n){return z_(n.domain,Number.isFinite)});return r||un(t)},J_=function(t){var r=N.useContext(Sy);r==null&&ai();var n=r[t];return n==null&&ai(),n},hV=function(){var t=N.useContext(K_);return t},vV=function(){return N.useContext(q_)},Oy=function(){return N.useContext(Q_)},_y=function(){return N.useContext(Y_)};function sa(e){"@babel/helpers - typeof";return sa=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},sa(e)}function yV(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mV(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);re*i)return!1;var a=r();return e*(t-e*a/2-n)>=0&&e*(t+e*a/2-i)<=0}function ZV(e,t){return oP(e,t+1)}function JV(e,t,r,n,i){for(var a=(n||[]).slice(),o=t.start,l=t.end,u=0,s=1,f=o,c=function(){var v=n==null?void 0:n[u];if(v===void 0)return{v:oP(n,s)};var b=u,w,g=function(){return w===void 0&&(w=r(v,b)),w},y=v.coordinate,h=u===0||Us(e,y,g,f,l);h||(u=0,f=o,s+=1),h&&(f=y+e*(g()/2+i),u+=s)},d;s<=a.length;)if(d=c(),d)return d.v;return[]}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 x1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function dt(e){for(var t=1;t0?p.coordinate-w*e:p.coordinate})}else a[d]=p=dt(dt({},p),{},{tickCoord:p.coordinate});var g=Us(e,p.tickCoord,b,l,u);g&&(u=p.tickCoord-e*(b()/2+i),a[d]=dt(dt({},p),{},{isShow:!0}))},f=o-1;f>=0;f--)s(f);return a}function iG(e,t,r,n,i,a){var o=(n||[]).slice(),l=o.length,u=t.start,s=t.end;if(a){var f=n[l-1],c=r(f,l-1),d=e*(f.coordinate+e*c/2-s);o[l-1]=f=dt(dt({},f),{},{tickCoord:d>0?f.coordinate-d*e:f.coordinate});var p=Us(e,f.tickCoord,function(){return c},u,s);p&&(s=f.tickCoord-e*(c/2+i),o[l-1]=dt(dt({},f),{},{isShow:!0}))}for(var v=a?l-1:l,b=function(y){var h=o[y],S,m=function(){return S===void 0&&(S=r(h,y)),S};if(y===0){var x=e*(h.coordinate-e*m()/2-u);o[y]=h=dt(dt({},h),{},{tickCoord:x<0?h.coordinate-x*e:h.coordinate})}else o[y]=h=dt(dt({},h),{},{tickCoord:h.coordinate});var O=Us(e,h.tickCoord,m,u,s);O&&(u=h.tickCoord+e*(m()/2+i),o[y]=dt(dt({},h),{},{isShow:!0}))},w=0;w=2?vr(i[1].coordinate-i[0].coordinate):1,g=QV(a,w,p);return u==="equidistantPreserveStart"?JV(w,g,b,i,o):(u==="preserveStart"||u==="preserveStartEnd"?d=iG(w,g,b,i,o,u==="preserveStartEnd"):d=nG(w,g,b,i,o),d.filter(function(y){return y.isShow}))}var aG=["viewBox"],oG=["viewBox"],lG=["ticks"];function da(e){"@babel/helpers - typeof";return da=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},da(e)}function ki(){return ki=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function uG(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function sG(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function O1(e,t){for(var r=0;r0?u(this.props):u(p)),o<=0||l<=0||!v||!v.length?null:A.createElement(We,{className:ve("recharts-cartesian-axis",s),ref:function(w){n.layerReference=w}},a&&this.renderAxisLine(),this.renderTicks(v,this.state.fontSize,this.state.letterSpacing),ht.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,i,a){var o;return A.isValidElement(n)?o=A.cloneElement(n,i):ue(n)?o=n(i):o=A.createElement(ds,ki({},i,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])}(N.Component);$y(Ma,"displayName","CartesianAxis");$y(Ma,"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 yG=["x1","y1","x2","y2","key"],mG=["offset"];function oi(e){"@babel/helpers - typeof";return oi=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},oi(e)}function _1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function vt(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function xG(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var SG=function(t){var r=t.fill;if(!r||r==="none")return null;var n=t.fillOpacity,i=t.x,a=t.y,o=t.width,l=t.height,u=t.ry;return A.createElement("rect",{x:i,y:a,ry:u,width:o,height:l,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function sP(e,t){var r;if(A.isValidElement(e))r=A.cloneElement(e,t);else if(ue(e))r=e(t);else{var n=t.x1,i=t.y1,a=t.x2,o=t.y2,l=t.key,u=P1(t,yG),s=de(u,!1);s.offset;var f=P1(s,mG);r=A.createElement("line",Vn({},f,{x1:n,y1:i,x2:a,y2:o,fill:"none",key:l}))}return r}function OG(e){var t=e.x,r=e.width,n=e.horizontal,i=n===void 0?!0:n,a=e.horizontalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(l,u){var s=vt(vt({},e),{},{x1:t,y1:l,x2:t+r,y2:l,key:"line-".concat(u),index:u});return sP(i,s)});return A.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function _G(e){var t=e.y,r=e.height,n=e.vertical,i=n===void 0?!0:n,a=e.verticalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(l,u){var s=vt(vt({},e),{},{x1:l,y1:t,x2:l,y2:t+r,key:"line-".concat(u),index:u});return sP(i,s)});return A.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function PG(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,i=e.y,a=e.width,o=e.height,l=e.horizontalPoints,u=e.horizontal,s=u===void 0?!0:u;if(!s||!t||!t.length)return null;var f=l.map(function(d){return Math.round(d+i-i)}).sort(function(d,p){return d-p});i!==f[0]&&f.unshift(0);var c=f.map(function(d,p){var v=!f[p+1],b=v?i+o-d:f[p+1]-d;if(b<=0)return null;var w=p%t.length;return A.createElement("rect",{key:"react-".concat(p),y:d,x:n,height:b,width:a,stroke:"none",fill:t[w],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return A.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},c)}function AG(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,i=e.fillOpacity,a=e.x,o=e.y,l=e.width,u=e.height,s=e.verticalPoints;if(!r||!n||!n.length)return null;var f=s.map(function(d){return Math.round(d+a-a)}).sort(function(d,p){return d-p});a!==f[0]&&f.unshift(0);var c=f.map(function(d,p){var v=!f[p+1],b=v?a+l-d:f[p+1]-d;if(b<=0)return null;var w=p%n.length;return A.createElement("rect",{key:"react-".concat(p),x:d,y:o,width:b,height:u,stroke:"none",fill:n[w],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return A.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},c)}var EG=function(t,r){var n=t.xAxis,i=t.width,a=t.height,o=t.offset;return b_(Ey(vt(vt(vt({},Ma.defaultProps),n),{},{ticks:Rr(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.left,o.left+o.width,r)},$G=function(t,r){var n=t.yAxis,i=t.width,a=t.height,o=t.offset;return b_(Ey(vt(vt(vt({},Ma.defaultProps),n),{},{ticks:Rr(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.top,o.top+o.height,r)},mi={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function cP(e){var t,r,n,i,a,o,l=Oy(),u=_y(),s=vV(),f=vt(vt({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:mi.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:mi.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:mi.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:mi.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:mi.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:mi.verticalFill,x:X(e.x)?e.x:s.left,y:X(e.y)?e.y:s.top,width:X(e.width)?e.width:s.width,height:X(e.height)?e.height:s.height}),c=f.x,d=f.y,p=f.width,v=f.height,b=f.syncWithTicks,w=f.horizontalValues,g=f.verticalValues,y=dV(),h=pV();if(!X(p)||p<=0||!X(v)||v<=0||!X(c)||c!==+c||!X(d)||d!==+d)return null;var S=f.verticalCoordinatesGenerator||EG,m=f.horizontalCoordinatesGenerator||$G,x=f.horizontalPoints,O=f.verticalPoints;if((!x||!x.length)&&ue(m)){var _=w&&w.length,P=m({yAxis:h?vt(vt({},h),{},{ticks:_?w:h.ticks}):void 0,width:l,height:u,offset:s},_?!0:b);Fr(Array.isArray(P),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(oi(P),"]")),Array.isArray(P)&&(x=P)}if((!O||!O.length)&&ue(S)){var T=g&&g.length,$=S({xAxis:y?vt(vt({},y),{},{ticks:T?g:y.ticks}):void 0,width:l,height:u,offset:s},T?!0:b);Fr(Array.isArray($),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(oi($),"]")),Array.isArray($)&&(O=$)}return A.createElement("g",{className:"recharts-cartesian-grid"},A.createElement(SG,{fill:f.fill,fillOpacity:f.fillOpacity,x:f.x,y:f.y,width:f.width,height:f.height,ry:f.ry}),A.createElement(OG,Vn({},f,{offset:s,horizontalPoints:x,xAxis:y,yAxis:h})),A.createElement(_G,Vn({},f,{offset:s,verticalPoints:O,xAxis:y,yAxis:h})),A.createElement(PG,Vn({},f,{horizontalPoints:x})),A.createElement(AG,Vn({},f,{verticalPoints:O})))}cP.displayName="CartesianGrid";var TG=["type","layout","connectNulls","ref"],jG=["key"];function pa(e){"@babel/helpers - typeof";return pa=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},pa(e)}function A1(e,t){if(e==null)return{};var r=CG(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function CG(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function go(){return go=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);rc){p=[].concat(gi(u.slice(0,v)),[c-b]);break}var w=p.length%2===0?[0,d]:[d];return[].concat(gi(t.repeat(u,f)),gi(p),w).map(function(g){return"".concat(g,"px")}).join(", ")}),fr(r,"id",Pl("recharts-line-")),fr(r,"pathRef",function(o){r.mainCurve=o}),fr(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),fr(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return FG(t,e),LG(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();this.setState({totalLength:n})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();n!==this.state.totalLength&&this.setState({totalLength:n})}}},{key:"getTotalLength",value:function(){var n=this.mainCurve;try{return n&&n.getTotalLength&&n.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(n,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.points,l=a.xAxis,u=a.yAxis,s=a.layout,f=a.children,c=Jt(f,Cl);if(!c)return null;var d=function(b,w){return{x:b.x,y:b.y,value:b.value,errorVal:zt(b.payload,w)}},p={clipPath:n?"url(#clipPath-".concat(i,")"):null};return A.createElement(We,p,c.map(function(v){return A.cloneElement(v,{key:"bar-".concat(v.props.dataKey),data:o,xAxis:l,yAxis:u,layout:s,dataPointFormatter:d})}))}},{key:"renderDots",value:function(n,i,a){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var l=this.props,u=l.dot,s=l.points,f=l.dataKey,c=de(this.props,!1),d=de(u,!0),p=s.map(function(b,w){var g=kt(kt(kt({key:"dot-".concat(w),r:3},c),d),{},{index:w,cx:b.x,cy:b.y,value:b.value,dataKey:f,payload:b.payload,points:s});return t.renderDotItem(u,g)}),v={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return A.createElement(We,go({className:"recharts-line-dots",key:"dots"},v),p)}},{key:"renderCurveStatically",value:function(n,i,a,o){var l=this.props,u=l.type,s=l.layout,f=l.connectNulls;l.ref;var c=A1(l,TG),d=kt(kt(kt({},de(c,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(a,")"):null,points:n},o),{},{type:u,layout:s,connectNulls:f});return A.createElement(qp,go({},d,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,i){var a=this,o=this.props,l=o.points,u=o.strokeDasharray,s=o.isAnimationActive,f=o.animationBegin,c=o.animationDuration,d=o.animationEasing,p=o.animationId,v=o.animateNewValues,b=o.width,w=o.height,g=this.state,y=g.prevPoints,h=g.totalLength;return A.createElement(Yr,{begin:f,duration:c,isActive:s,easing:d,from:{t:0},to:{t:1},key:"line-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(S){var m=S.t;if(y){var x=y.length/l.length,O=l.map(function(j,L){var B=Math.floor(L*x);if(y[B]){var M=y[B],z=pr(M.x,j.x),U=pr(M.y,j.y);return kt(kt({},j),{},{x:z(m),y:U(m)})}if(v){var C=pr(b*2,j.x),D=pr(w/2,j.y);return kt(kt({},j),{},{x:C(m),y:D(m)})}return kt(kt({},j),{},{x:j.x,y:j.y})});return a.renderCurveStatically(O,n,i)}var _=pr(0,h),P=_(m),T;if(u){var $="".concat(u).split(/[,\s]+/gim).map(function(j){return parseFloat(j)});T=a.getStrokeDasharray(P,h,$)}else T=a.generateSimpleStrokeDasharray(h,P);return a.renderCurveStatically(l,n,i,{strokeDasharray:T})})}},{key:"renderCurve",value:function(n,i){var a=this.props,o=a.points,l=a.isAnimationActive,u=this.state,s=u.prevPoints,f=u.totalLength;return l&&o&&o.length&&(!s&&f>0||!Wc(s,o))?this.renderCurveWithAnimation(n,i):this.renderCurveStatically(o,n,i)}},{key:"render",value:function(){var n,i=this.props,a=i.hide,o=i.dot,l=i.points,u=i.className,s=i.xAxis,f=i.yAxis,c=i.top,d=i.left,p=i.width,v=i.height,b=i.isAnimationActive,w=i.id;if(a||!l||!l.length)return null;var g=this.state.isAnimationFinished,y=l.length===1,h=ve("recharts-line",u),S=s&&s.allowDataOverflow,m=f&&f.allowDataOverflow,x=S||m,O=fe(w)?this.id:w,_=(n=de(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},P=_.r,T=P===void 0?3:P,$=_.strokeWidth,j=$===void 0?2:$,L=tk(o)?o:{},B=L.clipDot,M=B===void 0?!0:B,z=T*2+j;return A.createElement(We,{className:h},S||m?A.createElement("defs",null,A.createElement("clipPath",{id:"clipPath-".concat(O)},A.createElement("rect",{x:S?d:d-p/2,y:m?c:c-v/2,width:S?p:p*2,height:m?v:v*2})),!M&&A.createElement("clipPath",{id:"clipPath-dots-".concat(O)},A.createElement("rect",{x:d-z/2,y:c-z/2,width:p+z,height:v+z}))):null,!y&&this.renderCurve(x,O),this.renderErrorBar(x,O),(y||o)&&this.renderDots(x,M,O),(!b||g)&&xn.renderCallByParent(this.props,l))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:i.curPoints}:n.points!==i.curPoints?{curPoints:n.points}:null}},{key:"repeat",value:function(n,i){for(var a=n.length%2!==0?[].concat(gi(n),[0]):n,o=[],l=0;le.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function jK(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function CK(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kK(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r0?o:t&&t.length&&X(i)&&X(a)?t.slice(i,a+1):[]};function AP(e){return e==="number"?[0,"auto"]:void 0}var Ah=function(t,r,n,i){var a=t.graphicalItems,o=t.tooltipAxis,l=ef(r,t);return n<0||!a||!a.length||n>=l.length?null:a.reduce(function(u,s){var f,c=(f=s.props.data)!==null&&f!==void 0?f:r;c&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(c=c.slice(t.dataStartIndex,t.dataEndIndex+1));var d;if(o.dataKey&&!o.allowDuplicatedCategory){var p=c===void 0?l:c;d=Yu(p,o.dataKey,i)}else d=c&&c[n]||l[n];return d?[].concat(ma(u),[x_(s,d)]):u},[])},N1=function(t,r,n,i){var a=i||{x:t.chartX,y:t.chartY},o=HK(a,n),l=t.orderedTooltipTicks,u=t.tooltipAxis,s=t.tooltipTicks,f=aW(o,l,s,u);if(f>=0&&s){var c=s[f]&&s[f].value,d=Ah(t,r,f,c),p=VK(n,l,f,a);return{activeTooltipIndex:f,activeLabel:c,activePayload:d,activeCoordinate:p}}return null},GK=function(t,r){var n=r.axes,i=r.graphicalItems,a=r.axisType,o=r.axisIdKey,l=r.stackGroups,u=r.dataStartIndex,s=r.dataEndIndex,f=t.layout,c=t.children,d=t.stackOffset,p=g_(f,a);return n.reduce(function(v,b){var w,g=b.type.defaultProps!==void 0?I(I({},b.type.defaultProps),b.props):b.props,y=g.type,h=g.dataKey,S=g.allowDataOverflow,m=g.allowDuplicatedCategory,x=g.scale,O=g.ticks,_=g.includeHidden,P=g[o];if(v[P])return v;var T=ef(t.data,{graphicalItems:i.filter(function(V){var re,le=o in V.props?V.props[o]:(re=V.type.defaultProps)===null||re===void 0?void 0:re[o];return le===P}),dataStartIndex:u,dataEndIndex:s}),$=T.length,j,L,B;gK(g.domain,S,y)&&(j=Up(g.domain,null,S),p&&(y==="number"||x!=="auto")&&(B=yo(T,h,"category")));var M=AP(y);if(!j||j.length===0){var z,U=(z=g.domain)!==null&&z!==void 0?z:M;if(h){if(j=yo(T,h,y),y==="category"&&p){var C=VC(j);m&&C?(L=j,j=Is(0,$)):m||(j=db(U,j,b).reduce(function(V,re){return V.indexOf(re)>=0?V:[].concat(ma(V),[re])},[]))}else if(y==="category")m?j=j.filter(function(V){return V!==""&&!fe(V)}):j=db(U,j,b).reduce(function(V,re){return V.indexOf(re)>=0||re===""||fe(re)?V:[].concat(ma(V),[re])},[]);else if(y==="number"){var D=cW(T,i.filter(function(V){var re,le,Se=o in V.props?V.props[o]:(re=V.type.defaultProps)===null||re===void 0?void 0:re[o],me="hide"in V.props?V.props.hide:(le=V.type.defaultProps)===null||le===void 0?void 0:le.hide;return Se===P&&(_||!me)}),h,a,f);D&&(j=D)}p&&(y==="number"||x!=="auto")&&(B=yo(T,h,"category"))}else p?j=Is(0,$):l&&l[P]&&l[P].hasStack&&y==="number"?j=d==="expand"?[0,1]:w_(l[P].stackGroups,u,s):j=m_(T,i.filter(function(V){var re=o in V.props?V.props[o]:V.type.defaultProps[o],le="hide"in V.props?V.props.hide:V.type.defaultProps.hide;return re===P&&(_||!le)}),y,f,!0);if(y==="number")j=Oh(c,j,P,a,O),U&&(j=Up(U,j,S));else if(y==="category"&&U){var W=U,Y=j.every(function(V){return W.indexOf(V)>=0});Y&&(j=W)}}return I(I({},v),{},ie({},P,I(I({},g),{},{axisType:a,domain:j,categoricalDomain:B,duplicateDomain:L,originalDomain:(w=g.domain)!==null&&w!==void 0?w:M,isCategorical:p,layout:f})))},{})},KK=function(t,r){var n=r.graphicalItems,i=r.Axis,a=r.axisType,o=r.axisIdKey,l=r.stackGroups,u=r.dataStartIndex,s=r.dataEndIndex,f=t.layout,c=t.children,d=ef(t.data,{graphicalItems:n,dataStartIndex:u,dataEndIndex:s}),p=d.length,v=g_(f,a),b=-1;return n.reduce(function(w,g){var y=g.type.defaultProps!==void 0?I(I({},g.type.defaultProps),g.props):g.props,h=y[o],S=AP("number");if(!w[h]){b++;var m;return v?m=Is(0,p):l&&l[h]&&l[h].hasStack?(m=w_(l[h].stackGroups,u,s),m=Oh(c,m,h,a)):(m=Up(S,m_(d,n.filter(function(x){var O,_,P=o in x.props?x.props[o]:(O=x.type.defaultProps)===null||O===void 0?void 0:O[o],T="hide"in x.props?x.props.hide:(_=x.type.defaultProps)===null||_===void 0?void 0:_.hide;return P===h&&!T}),"number",f),i.defaultProps.allowDataOverflow),m=Oh(c,m,h,a)),I(I({},w),{},ie({},h,I(I({axisType:a},i.defaultProps),{},{hide:!0,orientation:Zt(WK,"".concat(a,".").concat(b%2),null),domain:m,originalDomain:S,isCategorical:v,layout:f})))}return w},{})},qK=function(t,r){var n=r.axisType,i=n===void 0?"xAxis":n,a=r.AxisComp,o=r.graphicalItems,l=r.stackGroups,u=r.dataStartIndex,s=r.dataEndIndex,f=t.children,c="".concat(i,"Id"),d=Jt(f,a),p={};return d&&d.length?p=GK(t,{axes:d,graphicalItems:o,axisType:i,axisIdKey:c,stackGroups:l,dataStartIndex:u,dataEndIndex:s}):o&&o.length&&(p=KK(t,{Axis:a,graphicalItems:o,axisType:i,axisIdKey:c,stackGroups:l,dataStartIndex:u,dataEndIndex:s})),p},XK=function(t){var r=un(t),n=Rr(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:Vv(n,function(i){return i.coordinate}),tooltipAxis:r,tooltipAxisBandSize:As(r,n)}},I1=function(t){var r=t.children,n=t.defaultShowTooltip,i=It(r,la),a=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(o=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!n}},YK=function(t){return!t||!t.length?!1:t.some(function(r){var n=zr(r&&r.type);return n&&n.indexOf("Bar")>=0})},D1=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"}},QK=function(t,r){var n=t.props,i=t.graphicalItems,a=t.xAxisMap,o=a===void 0?{}:a,l=t.yAxisMap,u=l===void 0?{}:l,s=n.width,f=n.height,c=n.children,d=n.margin||{},p=It(c,la),v=It(c,qn),b=Object.keys(u).reduce(function(m,x){var O=u[x],_=O.orientation;return!O.mirror&&!O.hide?I(I({},m),{},ie({},_,m[_]+O.width)):m},{left:d.left||0,right:d.right||0}),w=Object.keys(o).reduce(function(m,x){var O=o[x],_=O.orientation;return!O.mirror&&!O.hide?I(I({},m),{},ie({},_,Zt(m,"".concat(_))+O.height)):m},{top:d.top||0,bottom:d.bottom||0}),g=I(I({},w),b),y=g.bottom;p&&(g.bottom+=p.props.height||la.defaultProps.height),v&&r&&(g=uW(g,i,n,r));var h=s-g.left-g.right,S=f-g.top-g.bottom;return I(I({brushBottom:y},g),{},{width:Math.max(h,0),height:Math.max(S,0)})},ZK=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},JK=function(t){var r=t.chartName,n=t.GraphicalChild,i=t.defaultTooltipEventType,a=i===void 0?"axis":i,o=t.validateTooltipEventTypes,l=o===void 0?["axis"]:o,u=t.axisComponents,s=t.legendContent,f=t.formatAxisMap,c=t.defaultProps,d=function(g,y){var h=y.graphicalItems,S=y.stackGroups,m=y.offset,x=y.updateId,O=y.dataStartIndex,_=y.dataEndIndex,P=g.barSize,T=g.layout,$=g.barGap,j=g.barCategoryGap,L=g.maxBarSize,B=D1(T),M=B.numericAxisName,z=B.cateAxisName,U=YK(h),C=[];return h.forEach(function(D,W){var Y=ef(g.data,{graphicalItems:[D],dataStartIndex:O,dataEndIndex:_}),V=D.type.defaultProps!==void 0?I(I({},D.type.defaultProps),D.props):D.props,re=V.dataKey,le=V.maxBarSize,Se=V["".concat(M,"Id")],me=V["".concat(z,"Id")],F={},q=u.reduce(function(ge,ze){var ce=y["".concat(ze.axisType,"Map")],Qe=V["".concat(ze.axisType,"Id")];ce&&ce[Qe]||ze.axisType==="zAxis"||ai();var Ze=ce[Qe];return I(I({},ge),{},ie(ie({},ze.axisType,Ze),"".concat(ze.axisType,"Ticks"),Rr(Ze)))},F),R=q[z],K=q["".concat(z,"Ticks")],Q=S&&S[Se]&&S[Se].hasStack&&SW(D,S[Se].stackGroups),k=zr(D.type).indexOf("Bar")>=0,te=As(R,K),H=[],ne=U&&oW({barSize:P,stackGroups:S,totalSize:ZK(q,z)});if(k){var ee,oe,he=fe(le)?L:le,ae=(ee=(oe=As(R,K,!0))!==null&&oe!==void 0?oe:he)!==null&&ee!==void 0?ee:0;H=lW({barGap:$,barCategoryGap:j,bandSize:ae!==te?ae:te,sizeList:ne[me],maxBarSize:he}),ae!==te&&(H=H.map(function(ge){return I(I({},ge),{},{position:I(I({},ge.position),{},{offset:ge.position.offset-ae/2})})}))}var Oe=D&&D.type&&D.type.getComposedData;Oe&&C.push({props:I(I({},Oe(I(I({},q),{},{displayedData:Y,props:g,dataKey:re,item:D,bandSize:te,barPosition:H,offset:m,stackedData:Q,layout:T,dataStartIndex:O,dataEndIndex:_}))),{},ie(ie(ie({key:D.key||"item-".concat(W)},M,q[M]),z,q[z]),"animationId",x)),childIndex:ik(D,g.children),item:D})}),C},p=function(g,y){var h=g.props,S=g.dataStartIndex,m=g.dataEndIndex,x=g.updateId;if(!ag({props:h}))return null;var O=h.children,_=h.layout,P=h.stackOffset,T=h.data,$=h.reverseStackOrder,j=D1(_),L=j.numericAxisName,B=j.cateAxisName,M=Jt(O,n),z=bW(T,M,"".concat(L,"Id"),"".concat(B,"Id"),P,$),U=u.reduce(function(V,re){var le="".concat(re.axisType,"Map");return I(I({},V),{},ie({},le,qK(h,I(I({},re),{},{graphicalItems:M,stackGroups:re.axisType===L&&z,dataStartIndex:S,dataEndIndex:m}))))},{}),C=QK(I(I({},U),{},{props:h,graphicalItems:M}),y==null?void 0:y.legendBBox);Object.keys(U).forEach(function(V){U[V]=f(h,U[V],C,V.replace("Map",""),r)});var D=U["".concat(B,"Map")],W=XK(D),Y=d(h,I(I({},U),{},{dataStartIndex:S,dataEndIndex:m,updateId:x,graphicalItems:M,stackGroups:z,offset:C}));return I(I({formattedGraphicalItems:Y,graphicalItems:M,offset:C,stackGroups:z},W),U)},v=function(w){function g(y){var h,S,m;return CK(this,g),m=NK(this,g,[y]),ie(m,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),ie(m,"accessibilityManager",new mK),ie(m,"handleLegendBBoxUpdate",function(x){if(x){var O=m.state,_=O.dataStartIndex,P=O.dataEndIndex,T=O.updateId;m.setState(I({legendBBox:x},p({props:m.props,dataStartIndex:_,dataEndIndex:P,updateId:T},I(I({},m.state),{},{legendBBox:x}))))}}),ie(m,"handleReceiveSyncEvent",function(x,O,_){if(m.props.syncId===x){if(_===m.eventEmitterSymbol&&typeof m.props.syncMethod!="function")return;m.applySyncEvent(O)}}),ie(m,"handleBrushChange",function(x){var O=x.startIndex,_=x.endIndex;if(O!==m.state.dataStartIndex||_!==m.state.dataEndIndex){var P=m.state.updateId;m.setState(function(){return I({dataStartIndex:O,dataEndIndex:_},p({props:m.props,dataStartIndex:O,dataEndIndex:_,updateId:P},m.state))}),m.triggerSyncEvent({dataStartIndex:O,dataEndIndex:_})}}),ie(m,"handleMouseEnter",function(x){var O=m.getMouseInfo(x);if(O){var _=I(I({},O),{},{isTooltipActive:!0});m.setState(_),m.triggerSyncEvent(_);var P=m.props.onMouseEnter;ue(P)&&P(_,x)}}),ie(m,"triggeredAfterMouseMove",function(x){var O=m.getMouseInfo(x),_=O?I(I({},O),{},{isTooltipActive:!0}):{isTooltipActive:!1};m.setState(_),m.triggerSyncEvent(_);var P=m.props.onMouseMove;ue(P)&&P(_,x)}),ie(m,"handleItemMouseEnter",function(x){m.setState(function(){return{isTooltipActive:!0,activeItem:x,activePayload:x.tooltipPayload,activeCoordinate:x.tooltipPosition||{x:x.cx,y:x.cy}}})}),ie(m,"handleItemMouseLeave",function(){m.setState(function(){return{isTooltipActive:!1}})}),ie(m,"handleMouseMove",function(x){x.persist(),m.throttleTriggeredAfterMouseMove(x)}),ie(m,"handleMouseLeave",function(x){m.throttleTriggeredAfterMouseMove.cancel();var O={isTooltipActive:!1};m.setState(O),m.triggerSyncEvent(O);var _=m.props.onMouseLeave;ue(_)&&_(O,x)}),ie(m,"handleOuterEvent",function(x){var O=nk(x),_=Zt(m.props,"".concat(O));if(O&&ue(_)){var P,T;/.*touch.*/i.test(O)?T=m.getMouseInfo(x.changedTouches[0]):T=m.getMouseInfo(x),_((P=T)!==null&&P!==void 0?P:{},x)}}),ie(m,"handleClick",function(x){var O=m.getMouseInfo(x);if(O){var _=I(I({},O),{},{isTooltipActive:!0});m.setState(_),m.triggerSyncEvent(_);var P=m.props.onClick;ue(P)&&P(_,x)}}),ie(m,"handleMouseDown",function(x){var O=m.props.onMouseDown;if(ue(O)){var _=m.getMouseInfo(x);O(_,x)}}),ie(m,"handleMouseUp",function(x){var O=m.props.onMouseUp;if(ue(O)){var _=m.getMouseInfo(x);O(_,x)}}),ie(m,"handleTouchMove",function(x){x.changedTouches!=null&&x.changedTouches.length>0&&m.throttleTriggeredAfterMouseMove(x.changedTouches[0])}),ie(m,"handleTouchStart",function(x){x.changedTouches!=null&&x.changedTouches.length>0&&m.handleMouseDown(x.changedTouches[0])}),ie(m,"handleTouchEnd",function(x){x.changedTouches!=null&&x.changedTouches.length>0&&m.handleMouseUp(x.changedTouches[0])}),ie(m,"handleDoubleClick",function(x){var O=m.props.onDoubleClick;if(ue(O)){var _=m.getMouseInfo(x);O(_,x)}}),ie(m,"handleContextMenu",function(x){var O=m.props.onContextMenu;if(ue(O)){var _=m.getMouseInfo(x);O(_,x)}}),ie(m,"triggerSyncEvent",function(x){m.props.syncId!==void 0&&nd.emit(id,m.props.syncId,x,m.eventEmitterSymbol)}),ie(m,"applySyncEvent",function(x){var O=m.props,_=O.layout,P=O.syncMethod,T=m.state.updateId,$=x.dataStartIndex,j=x.dataEndIndex;if(x.dataStartIndex!==void 0||x.dataEndIndex!==void 0)m.setState(I({dataStartIndex:$,dataEndIndex:j},p({props:m.props,dataStartIndex:$,dataEndIndex:j,updateId:T},m.state)));else if(x.activeTooltipIndex!==void 0){var L=x.chartX,B=x.chartY,M=x.activeTooltipIndex,z=m.state,U=z.offset,C=z.tooltipTicks;if(!U)return;if(typeof P=="function")M=P(C,x);else if(P==="value"){M=-1;for(var D=0;D=0){var Q,k;if(L.dataKey&&!L.allowDuplicatedCategory){var te=typeof L.dataKey=="function"?K:"payload.".concat(L.dataKey.toString());Q=Yu(D,te,M),k=W&&Y&&Yu(Y,te,M)}else Q=D==null?void 0:D[B],k=W&&Y&&Y[B];if(me||Se){var H=x.props.activeIndex!==void 0?x.props.activeIndex:B;return[N.cloneElement(x,I(I(I({},P.props),q),{},{activeIndex:H})),null,null]}if(!fe(Q))return[R].concat(ma(m.renderActivePoints({item:P,activePoint:Q,basePoint:k,childIndex:B,isRange:W})))}else{var ne,ee=(ne=m.getItemByXY(m.state.activeCoordinate))!==null&&ne!==void 0?ne:{graphicalItem:R},oe=ee.graphicalItem,he=oe.item,ae=he===void 0?x:he,Oe=oe.childIndex,ge=I(I(I({},P.props),q),{},{activeIndex:Oe});return[N.cloneElement(ae,ge),null,null]}return W?[R,null,null]:[R,null]}),ie(m,"renderCustomized",function(x,O,_){return N.cloneElement(x,I(I({key:"recharts-customized-".concat(_)},m.props),m.state))}),ie(m,"renderMap",{CartesianGrid:{handler:pu,once:!0},ReferenceArea:{handler:m.renderReferenceElement},ReferenceLine:{handler:pu},ReferenceDot:{handler:m.renderReferenceElement},XAxis:{handler:pu},YAxis:{handler:pu},Brush:{handler:m.renderBrush,once:!0},Bar:{handler:m.renderGraphicChild},Line:{handler:m.renderGraphicChild},Area:{handler:m.renderGraphicChild},Radar:{handler:m.renderGraphicChild},RadialBar:{handler:m.renderGraphicChild},Scatter:{handler:m.renderGraphicChild},Pie:{handler:m.renderGraphicChild},Funnel:{handler:m.renderGraphicChild},Tooltip:{handler:m.renderCursor,once:!0},PolarGrid:{handler:m.renderPolarGrid,once:!0},PolarAngleAxis:{handler:m.renderPolarAxis},PolarRadiusAxis:{handler:m.renderPolarAxis},Customized:{handler:m.renderCustomized}}),m.clipPathId="".concat((h=y.id)!==null&&h!==void 0?h:Pl("recharts"),"-clip"),m.throttleTriggeredAfterMouseMove=hO(m.triggeredAfterMouseMove,(S=y.throttleDelay)!==null&&S!==void 0?S:1e3/60),m.state={},m}return LK(g,w),MK(g,[{key:"componentDidMount",value:function(){var h,S;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(h=this.props.margin.left)!==null&&h!==void 0?h:0,top:(S=this.props.margin.top)!==null&&S!==void 0?S:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var h=this.props,S=h.children,m=h.data,x=h.height,O=h.layout,_=It(S,Sr);if(_){var P=_.props.defaultIndex;if(!(typeof P!="number"||P<0||P>this.state.tooltipTicks.length-1)){var T=this.state.tooltipTicks[P]&&this.state.tooltipTicks[P].value,$=Ah(this.state,m,P,T),j=this.state.tooltipTicks[P].coordinate,L=(this.state.offset.top+x)/2,B=O==="horizontal",M=B?{x:j,y:L}:{y:j,x:L},z=this.state.formattedGraphicalItems.find(function(C){var D=C.item;return D.type.name==="Scatter"});z&&(M=I(I({},M),z.props.points[P].tooltipPosition),$=z.props.points[P].tooltipPayload);var U={activeTooltipIndex:P,isTooltipActive:!0,activeLabel:T,activePayload:$,activeCoordinate:M};this.setState(U),this.renderCursor(_),this.accessibilityManager.setIndex(P)}}}},{key:"getSnapshotBeforeUpdate",value:function(h,S){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==S.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==h.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==h.margin){var m,x;this.accessibilityManager.setDetails({offset:{left:(m=this.props.margin.left)!==null&&m!==void 0?m:0,top:(x=this.props.margin.top)!==null&&x!==void 0?x:0}})}return null}},{key:"componentDidUpdate",value:function(h){ip([It(h.children,Sr)],[It(this.props.children,Sr)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var h=It(this.props.children,Sr);if(h&&typeof h.props.shared=="boolean"){var S=h.props.shared?"axis":"item";return l.indexOf(S)>=0?S:a}return a}},{key:"getMouseInfo",value:function(h){if(!this.container)return null;var S=this.container,m=S.getBoundingClientRect(),x=Cz(m),O={chartX:Math.round(h.pageX-x.left),chartY:Math.round(h.pageY-x.top)},_=m.width/S.offsetWidth||1,P=this.inRange(O.chartX,O.chartY,_);if(!P)return null;var T=this.state,$=T.xAxisMap,j=T.yAxisMap,L=this.getTooltipEventType(),B=N1(this.state,this.props.data,this.props.layout,P);if(L!=="axis"&&$&&j){var M=un($).scale,z=un(j).scale,U=M&&M.invert?M.invert(O.chartX):null,C=z&&z.invert?z.invert(O.chartY):null;return I(I({},O),{},{xValue:U,yValue:C},B)}return B?I(I({},O),B):null}},{key:"inRange",value:function(h,S){var m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,x=this.props.layout,O=h/m,_=S/m;if(x==="horizontal"||x==="vertical"){var P=this.state.offset,T=O>=P.left&&O<=P.left+P.width&&_>=P.top&&_<=P.top+P.height;return T?{x:O,y:_}:null}var $=this.state,j=$.angleAxisMap,L=$.radiusAxisMap;if(j&&L){var B=un(j);return vb({x:O,y:_},B)}return null}},{key:"parseEventsOfWrapper",value:function(){var h=this.props.children,S=this.getTooltipEventType(),m=It(h,Sr),x={};m&&S==="axis"&&(m.props.trigger==="click"?x={onClick:this.handleClick}:x={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var O=Qu(this.props,this.handleOuterEvent);return I(I({},O),x)}},{key:"addListener",value:function(){nd.on(id,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){nd.removeListener(id,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(h,S,m){for(var x=this.state.formattedGraphicalItems,O=0,_=x.length;O<_;O++){var P=x[O];if(P.item===h||P.props.key===h.key||S===zr(P.item.type)&&m===P.childIndex)return P}return null}},{key:"renderClipPath",value:function(){var h=this.clipPathId,S=this.state.offset,m=S.left,x=S.top,O=S.height,_=S.width;return A.createElement("defs",null,A.createElement("clipPath",{id:h},A.createElement("rect",{x:m,y:x,height:O,width:_})))}},{key:"getXScales",value:function(){var h=this.state.xAxisMap;return h?Object.entries(h).reduce(function(S,m){var x=C1(m,2),O=x[0],_=x[1];return I(I({},S),{},ie({},O,_.scale))},{}):null}},{key:"getYScales",value:function(){var h=this.state.yAxisMap;return h?Object.entries(h).reduce(function(S,m){var x=C1(m,2),O=x[0],_=x[1];return I(I({},S),{},ie({},O,_.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(h){var S;return(S=this.state.xAxisMap)===null||S===void 0||(S=S[h])===null||S===void 0?void 0:S.scale}},{key:"getYScaleByAxisId",value:function(h){var S;return(S=this.state.yAxisMap)===null||S===void 0||(S=S[h])===null||S===void 0?void 0:S.scale}},{key:"getItemByXY",value:function(h){var S=this.state,m=S.formattedGraphicalItems,x=S.activeItem;if(m&&m.length)for(var O=0,_=m.length;O<_;O++){var P=m[O],T=P.props,$=P.item,j=$.type.defaultProps!==void 0?I(I({},$.type.defaultProps),$.props):$.props,L=zr($.type);if(L==="Bar"){var B=(T.data||[]).find(function(C){return pH(h,C)});if(B)return{graphicalItem:P,payload:B}}else if(L==="RadialBar"){var M=(T.data||[]).find(function(C){return vb(h,C)});if(M)return{graphicalItem:P,payload:M}}else if(Vc(P,x)||Gc(P,x)||cl(P,x)){var z=y7({graphicalItem:P,activeTooltipItem:x,itemData:j.data}),U=j.activeIndex===void 0?z:j.activeIndex;return{graphicalItem:I(I({},P),{},{childIndex:U}),payload:cl(P,x)?j.data[z]:P.props.data[z]}}}return null}},{key:"render",value:function(){var h=this;if(!ag(this))return null;var S=this.props,m=S.children,x=S.className,O=S.width,_=S.height,P=S.style,T=S.compact,$=S.title,j=S.desc,L=k1(S,AK),B=de(L,!1);if(T)return A.createElement(p1,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},A.createElement(op,Mi({},B,{width:O,height:_,title:$,desc:j}),this.renderClipPath(),lg(m,this.renderMap)));if(this.props.accessibilityLayer){var M,z;B.tabIndex=(M=this.props.tabIndex)!==null&&M!==void 0?M:0,B.role=(z=this.props.role)!==null&&z!==void 0?z:"application",B.onKeyDown=function(C){h.accessibilityManager.keyboardEvent(C)},B.onFocus=function(){h.accessibilityManager.focus()}}var U=this.parseEventsOfWrapper();return A.createElement(p1,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},A.createElement("div",Mi({className:ve("recharts-wrapper",x),style:I({position:"relative",cursor:"default",width:O,height:_},P)},U,{ref:function(D){h.container=D}}),A.createElement(op,Mi({},B,{width:O,height:_,title:$,desc:j,style:UK}),this.renderClipPath(),lg(m,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(N.Component);ie(v,"displayName",r),ie(v,"defaultProps",I({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},c)),ie(v,"getDerivedStateFromProps",function(w,g){var y=w.dataKey,h=w.data,S=w.children,m=w.width,x=w.height,O=w.layout,_=w.stackOffset,P=w.margin,T=g.dataStartIndex,$=g.dataEndIndex;if(g.updateId===void 0){var j=I1(w);return I(I(I({},j),{},{updateId:0},p(I(I({props:w},j),{},{updateId:0}),g)),{},{prevDataKey:y,prevData:h,prevWidth:m,prevHeight:x,prevLayout:O,prevStackOffset:_,prevMargin:P,prevChildren:S})}if(y!==g.prevDataKey||h!==g.prevData||m!==g.prevWidth||x!==g.prevHeight||O!==g.prevLayout||_!==g.prevStackOffset||!zi(P,g.prevMargin)){var L=I1(w),B={chartX:g.chartX,chartY:g.chartY,isTooltipActive:g.isTooltipActive},M=I(I({},N1(g,h,O)),{},{updateId:g.updateId+1}),z=I(I(I({},L),B),M);return I(I(I({},z),p(I({props:w},z),g)),{},{prevDataKey:y,prevData:h,prevWidth:m,prevHeight:x,prevLayout:O,prevStackOffset:_,prevMargin:P,prevChildren:S})}if(!ip(S,g.prevChildren)){var U,C,D,W,Y=It(S,la),V=Y&&(U=(C=Y.props)===null||C===void 0?void 0:C.startIndex)!==null&&U!==void 0?U:T,re=Y&&(D=(W=Y.props)===null||W===void 0?void 0:W.endIndex)!==null&&D!==void 0?D:$,le=V!==T||re!==$,Se=!fe(h),me=Se&&!le?g.updateId:g.updateId+1;return I(I({updateId:me},p(I(I({props:w},g),{},{updateId:me,dataStartIndex:V,dataEndIndex:re}),g)),{},{prevChildren:S,dataStartIndex:V,dataEndIndex:re})}return null}),ie(v,"renderActiveDot",function(w,g,y){var h;return N.isValidElement(w)?h=N.cloneElement(w,g):ue(w)?h=w(g):h=A.createElement(by,g),A.createElement(We,{className:"recharts-active-dot",key:y},h)});var b=N.forwardRef(function(g,y){return A.createElement(v,Mi({},g,{ref:y}))});return b.displayName=v.displayName,b},eq=JK({chartName:"LineChart",GraphicalChild:Ml,axisComponents:[{axisType:"xAxis",AxisComp:Zc},{axisType:"yAxis",AxisComp:Jc}],formatAxisMap:F9});const tq=({metrics:e,selectedMetric:t,onMetricChange:r})=>E.jsxs("fieldset",{className:"fieldset",children:[E.jsx("legend",{className:"fieldset-legend",children:"Metric"}),E.jsx("select",{id:"metric-selector",value:t||"",onChange:r,className:"select select-bordered w-full",children:[...e].map(n=>E.jsx("option",{value:n,children:n},n))})]}),rq=({attacks:e,selectedAttack:t,onAttackChange:r})=>E.jsxs("fieldset",{className:"fieldset mb-4",children:[E.jsx("legend",{className:"fieldset-legend",children:"Attack"}),E.jsx("select",{id:"attack-selector",value:t||"",onChange:r,className:"select select-bordered w-full",children:[...e].map(n=>E.jsx("option",{value:n,children:n},n))})]}),nq=({dataset:e,selectedModels:t})=>{const[r,n]=N.useState([]),[i,a]=N.useState(!0),[o,l]=N.useState(null),[u,s]=N.useState(new Set),[f,c]=N.useState(new Set),[d,p]=N.useState(null),[v,b]=N.useState(null);N.useEffect(()=>{a(!0),fc.fetchStaticFile(`data/${e}?dataset_type=attacks_variations`).then(h=>{const S=JSON.parse(h),m=S.all_attacks_df.map(x=>{const O={...x};return typeof O.strength=="string"&&(O.strength=parseFloat(O.strength)),O});p(S.metrics[0]),s(new Set(S.metrics)),b(S.attacks_with_variations[0]),c(new Set(S.attacks_with_variations)),n(m),a(!1)}).catch(h=>{l("Failed to fetch JSON: "+h.message),a(!1)})},[e]);const w=h=>{p(h.target.value)},g=h=>{b(h.target.value)},y=r.filter(h=>!v||h.attack===v).sort((h,S)=>h.strength-S.strength);return E.jsxs("div",{className:"rounded shadow p-4 overflow-auto mb-8",children:[i&&E.jsx(xv,{}),o&&E.jsx("div",{className:"text-red-500",children:o}),!i&&!o&&E.jsxs(E.Fragment,{children:[E.jsxs("div",{className:"flex flex-col md:flex-row md:gap-x-4 mb-4",children:[E.jsx("div",{className:"w-full md:w-1/2",children:E.jsx(tq,{metrics:u,selectedMetric:d,onMetricChange:w})}),E.jsx("div",{className:"w-full md:w-1/2",children:E.jsx(rq,{attacks:f,selectedAttack:v,onAttackChange:g})})]}),r.length>0&&E.jsx("div",{className:"h-64 mb-4",children:E.jsx(_z,{width:"100%",height:"100%",children:E.jsxs(eq,{data:y,margin:{top:5,right:30,left:20,bottom:5},children:[E.jsx(cP,{strokeDasharray:"3 3"}),E.jsx(Zc,{dataKey:"strength",domain:[Math.min(...y.map(h=>Number(h.strength))),Math.max(...y.map(h=>Number(h.strength)))],type:"number",tickFormatter:h=>h.toFixed(3),label:{value:"Strength",position:"insideBottomRight",offset:-5}}),E.jsx(Jc,{label:{value:d||"",angle:-90,position:"insideLeft",style:{textAnchor:"middle"}},tickFormatter:h=>h.toFixed(3)}),E.jsx(Sr,{contentStyle:{backgroundColor:"#2a303c",borderColor:"#374151",color:"white"},formatter:h=>h.toFixed(3)}),E.jsx(qn,{}),(()=>{if(!d)return null;const h=new Set(y.filter(m=>t.has(m.model)).map(m=>m.model)),S=["#8884d8","#82ca9d","#ffc658","#ff8042","#0088fe","#00C49F"];return[...h].map((m,x)=>E.jsx(Ml,{type:"monotone",dataKey:d,data:y.filter(O=>O.model===m),name:m,stroke:S[x%S.length],dot:!1},m))})()]})})})]})]})},iq=({models:e,selectedModels:t,setSelectedModels:r})=>{const n=i=>{const a=new Set(t);a.has(i)?a.delete(i):a.add(i),r(a)};return E.jsx("div",{className:"w-full",children:E.jsxs("fieldset",{className:"fieldset w-full p-4 rounded border border-gray-700 bg-base-200",children:[E.jsxs("legend",{className:"fieldset-legend font-semibold",children:["Models (",t.size,"/",e.length,")"]}),E.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-6 gap-1 max-h-48 overflow-y-auto pr-2",children:e.map(i=>E.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[E.jsx("input",{type:"checkbox",className:"form-checkbox h-4 w-4",checked:t.has(i),onChange:()=>n(i)}),E.jsx("span",{className:"truncate",title:i,children:i})]},i))})]})})},aq=()=>{const e=["voxpopuli_1k/audio","ravdess_1k/audio","val2014_1k/image","sav_val_full/video"],[t,r]=N.useState(e[0]),[n,i]=N.useState([]),[a,o]=N.useState(new Set),[l,u]=N.useState(!0),[s,f]=N.useState(null);return N.useEffect(()=>{u(!0),fc.fetchStaticFile(`data/${t}?dataset_type=benchmark`).then(c=>{const d=JSON.parse(c);f(d);const p=d.rows,b=Array.from(new Set(p.flatMap(w=>Object.keys(w)))).filter(w=>w!=="metric");i(b),o(new Set(b)),u(!1)}).catch(c=>{console.error("Failed to fetch models:",c),u(!1)})},[t]),E.jsxs("div",{className:"",children:[E.jsx("div",{className:"flex flex-col gap-4",children:E.jsx(s$,{datasetNames:e,selectedDatasetName:t,onDatasetNameChange:r})}),l?E.jsx(xv,{}):E.jsxs(E.Fragment,{children:[n.length>0&&E.jsx(iq,{models:n,selectedModels:a,setSelectedModels:o}),E.jsxs("div",{className:"space-y-8",children:[E.jsx(p$,{benchmarkData:s,selectedModels:a}),E.jsx("div",{className:"mt-8 pt-4 border-t border-gray-200",children:E.jsx(nq,{dataset:t,selectedModels:a})})]})]})]})};function oq(){const[e,t]=N.useState("leaderboard"),[r,n]=N.useState("dark");return N.useEffect(()=>{document.documentElement.setAttribute("data-theme",r)},[r]),E.jsxs("div",{className:"min-h-screen w-11/12 mx-auto",children:[E.jsx("div",{className:"bg-base-100 my-4",children:E.jsxs("div",{className:"flex flex-row justify-between items-center",children:[E.jsx("h2",{className:"card-title",children:"🥇 Omni Seal Bench Watermarking Leaderboard"}),E.jsxs("div",{className:"flex justify-end items-center gap-2",children:[E.jsx("span",{className:"text-sm",children:r==="dark"?"🌙 Dark Mode":"☀️ Light Mode"}),E.jsx("input",{type:"checkbox",className:"toggle",checked:r==="dark",onChange:()=>n(r==="dark"?"light":"dark"),"aria-label":"Toggle dark mode"})]})]})}),E.jsxs("div",{className:"tabs tabs-border",children:[E.jsx("input",{type:"radio",name:"my_tabs_6",className:"tab","aria-label":"Leaderboard Table",checked:e==="leaderboard",onChange:()=>t("leaderboard")}),E.jsx("div",{className:"tab-content bg-base-100 ",children:E.jsx(aq,{})}),E.jsx("input",{type:"radio",name:"my_tabs_6",className:"tab","aria-label":"Image Examples",checked:e==="imageExamples",onChange:()=>t("imageExamples")}),E.jsx("div",{className:"tab-content bg-base-100 ",children:e==="imageExamples"?E.jsx(Cf,{fileType:"image"}):null}),E.jsx("input",{type:"radio",name:"my_tabs_6",className:"tab","aria-label":"Audio Examples",checked:e==="audioExamples",onChange:()=>t("audioExamples")}),E.jsx("div",{className:"tab-content bg-base-100 ",children:e==="audioExamples"?E.jsx(Cf,{fileType:"audio"}):null}),E.jsx("input",{type:"radio",name:"my_tabs_6",className:"tab","aria-label":"Video Examples",checked:e==="videoExamples",onChange:()=>t("videoExamples")}),E.jsx("div",{className:"tab-content bg-base-100 ",children:e==="videoExamples"?E.jsx(Cf,{fileType:"video"}):null})]})]})}od.createRoot(document.getElementById("root")).render(E.jsx(A.StrictMode,{children:E.jsx(oq,{})}));