var Hp=Object.defineProperty;var Vp=(e,t,n)=>t in e?Hp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var F=(e,t,n)=>(Vp(e,typeof t!="symbol"?t+"":t,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(r){if(r.ep)return;r.ep=!0;const s=n(r);fetch(r.href,s)}})();function Wp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Vf={exports:{}},Js={},Wf={exports:{}},A={};/**
 * @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 vr=Symbol.for("react.element"),$p=Symbol.for("react.portal"),Up=Symbol.for("react.fragment"),Yp=Symbol.for("react.strict_mode"),Kp=Symbol.for("react.profiler"),Xp=Symbol.for("react.provider"),Qp=Symbol.for("react.context"),Gp=Symbol.for("react.forward_ref"),Zp=Symbol.for("react.suspense"),qp=Symbol.for("react.memo"),Jp=Symbol.for("react.lazy"),mu=Symbol.iterator;function tg(e){return e===null||typeof e!="object"?null:(e=mu&&e[mu]||e["@@iterator"],typeof e=="function"?e:null)}var $f={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Uf=Object.assign,Yf={};function hi(e,t,n){this.props=e,this.context=t,this.refs=Yf,this.updater=n||$f}hi.prototype.isReactComponent={};hi.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")};hi.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Kf(){}Kf.prototype=hi.prototype;function sa(e,t,n){this.props=e,this.context=t,this.refs=Yf,this.updater=n||$f}var oa=sa.prototype=new Kf;oa.constructor=sa;Uf(oa,hi.prototype);oa.isPureReactComponent=!0;var yu=Array.isArray,Xf=Object.prototype.hasOwnProperty,la={current:null},Qf={key:!0,ref:!0,__self:!0,__source:!0};function Gf(e,t,n){var i,r={},s=null,o=null;if(t!=null)for(i in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(s=""+t.key),t)Xf.call(t,i)&&!Qf.hasOwnProperty(i)&&(r[i]=t[i]);var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){for(var a=Array(l),u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}if(e&&e.defaultProps)for(i in l=e.defaultProps,l)r[i]===void 0&&(r[i]=l[i]);return{$$typeof:vr,type:e,key:s,ref:o,props:r,_owner:la.current}}function eg(e,t){return{$$typeof:vr,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function aa(e){return typeof e=="object"&&e!==null&&e.$$typeof===vr}function ng(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var vu=/\/+/g;function _o(e,t){return typeof e=="object"&&e!==null&&e.key!=null?ng(""+e.key):t.toString(36)}function is(e,t,n,i,r){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case vr:case $p:o=!0}}if(o)return o=e,r=r(o),e=i===""?"."+_o(o,0):i,yu(r)?(n="",e!=null&&(n=e.replace(vu,"$&/")+"/"),is(r,t,n,"",function(u){return u})):r!=null&&(aa(r)&&(r=eg(r,n+(!r.key||o&&o.key===r.key?"":(""+r.key).replace(vu,"$&/")+"/")+e)),t.push(r)),1;if(o=0,i=i===""?".":i+":",yu(e))for(var l=0;l<e.length;l++){s=e[l];var a=i+_o(s,l);o+=is(s,t,n,a,r)}else if(a=tg(e),typeof a=="function")for(e=a.call(e),l=0;!(s=e.next()).done;)s=s.value,a=i+_o(s,l++),o+=is(s,t,n,a,r);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function Mr(e,t,n){if(e==null)return e;var i=[],r=0;return is(e,i,"","",function(s){return t.call(n,s,r++)}),i}function ig(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Lt={current:null},rs={transition:null},rg={ReactCurrentDispatcher:Lt,ReactCurrentBatchConfig:rs,ReactCurrentOwner:la};A.Children={map:Mr,forEach:function(e,t,n){Mr(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Mr(e,function(){t++}),t},toArray:function(e){return Mr(e,function(t){return t})||[]},only:function(e){if(!aa(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};A.Component=hi;A.Fragment=Up;A.Profiler=Kp;A.PureComponent=sa;A.StrictMode=Yp;A.Suspense=Zp;A.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=rg;A.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var i=Uf({},e.props),r=e.key,s=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,o=la.current),t.key!==void 0&&(r=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(a in t)Xf.call(t,a)&&!Qf.hasOwnProperty(a)&&(i[a]=t[a]===void 0&&l!==void 0?l[a]:t[a])}var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){l=Array(a);for(var u=0;u<a;u++)l[u]=arguments[u+2];i.children=l}return{$$typeof:vr,type:e.type,key:r,ref:s,props:i,_owner:o}};A.createContext=function(e){return e={$$typeof:Qp,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Xp,_context:e},e.Consumer=e};A.createElement=Gf;A.createFactory=function(e){var t=Gf.bind(null,e);return t.type=e,t};A.createRef=function(){return{current:null}};A.forwardRef=function(e){return{$$typeof:Gp,render:e}};A.isValidElement=aa;A.lazy=function(e){return{$$typeof:Jp,_payload:{_status:-1,_result:e},_init:ig}};A.memo=function(e,t){return{$$typeof:qp,type:e,compare:t===void 0?null:t}};A.startTransition=function(e){var t=rs.transition;rs.transition={};try{e()}finally{rs.transition=t}};A.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};A.useCallback=function(e,t){return Lt.current.useCallback(e,t)};A.useContext=function(e){return Lt.current.useContext(e)};A.useDebugValue=function(){};A.useDeferredValue=function(e){return Lt.current.useDeferredValue(e)};A.useEffect=function(e,t){return Lt.current.useEffect(e,t)};A.useId=function(){return Lt.current.useId()};A.useImperativeHandle=function(e,t,n){return Lt.current.useImperativeHandle(e,t,n)};A.useInsertionEffect=function(e,t){return Lt.current.useInsertionEffect(e,t)};A.useLayoutEffect=function(e,t){return Lt.current.useLayoutEffect(e,t)};A.useMemo=function(e,t){return Lt.current.useMemo(e,t)};A.useReducer=function(e,t,n){return Lt.current.useReducer(e,t,n)};A.useRef=function(e){return Lt.current.useRef(e)};A.useState=function(e){return Lt.current.useState(e)};A.useSyncExternalStore=function(e,t,n){return Lt.current.useSyncExternalStore(e,t,n)};A.useTransition=function(){return Lt.current.useTransition()};A.version="18.2.0";Wf.exports=A;var W=Wf.exports;const ua=Wp(W);/**
 * @license React
 * react-jsx-runtime.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 sg=W,og=Symbol.for("react.element"),lg=Symbol.for("react.fragment"),ag=Object.prototype.hasOwnProperty,ug=sg.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,cg={key:!0,ref:!0,__self:!0,__source:!0};function Zf(e,t,n){var i,r={},s=null,o=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(o=t.ref);for(i in t)ag.call(t,i)&&!cg.hasOwnProperty(i)&&(r[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps,t)r[i]===void 0&&(r[i]=t[i]);return{$$typeof:og,type:e,key:s,ref:o,props:r,_owner:ug.current}}Js.Fragment=lg;Js.jsx=Zf;Js.jsxs=Zf;Vf.exports=Js;var O=Vf.exports,il={},qf={exports:{}},Ut={},Jf={exports:{}},td={};/**
 * @license React
 * scheduler.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.
 */(function(e){function t(E,z){var D=E.length;E.push(z);t:for(;0<D;){var U=D-1>>>1,X=E[U];if(0<r(X,z))E[U]=z,E[D]=X,D=U;else break t}}function n(E){return E.length===0?null:E[0]}function i(E){if(E.length===0)return null;var z=E[0],D=E.pop();if(D!==z){E[0]=D;t:for(var U=0,X=E.length,ue=X>>>1;U<ue;){var Mt=2*(U+1)-1,xe=E[Mt],Pt=Mt+1,Cr=E[Pt];if(0>r(xe,D))Pt<X&&0>r(Cr,xe)?(E[U]=Cr,E[Pt]=D,U=Pt):(E[U]=xe,E[Mt]=D,U=Mt);else if(Pt<X&&0>r(Cr,D))E[U]=Cr,E[Pt]=D,U=Pt;else break t}}return z}function r(E,z){var D=E.sortIndex-z.sortIndex;return D!==0?D:E.id-z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var a=[],u=[],c=1,f=null,d=3,h=!1,m=!1,v=!1,x=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(E){for(var z=n(u);z!==null;){if(z.callback===null)i(u);else if(z.startTime<=E)i(u),z.sortIndex=z.expirationTime,t(a,z);else break;z=n(u)}}function _(E){if(v=!1,y(E),!m)if(n(a)!==null)m=!0,tt(k);else{var z=n(u);z!==null&&ft(_,z.startTime-E)}}function k(E,z){m=!1,v&&(v=!1,p(b),b=-1),h=!0;var D=d;try{for(y(z),f=n(a);f!==null&&(!(f.expirationTime>z)||E&&!L());){var U=f.callback;if(typeof U=="function"){f.callback=null,d=f.priorityLevel;var X=U(f.expirationTime<=z);z=e.unstable_now(),typeof X=="function"?f.callback=X:f===n(a)&&i(a),y(z)}else i(a);f=n(a)}if(f!==null)var ue=!0;else{var Mt=n(u);Mt!==null&&ft(_,Mt.startTime-z),ue=!1}return ue}finally{f=null,d=D,h=!1}}var w=!1,S=null,b=-1,P=5,M=-1;function L(){return!(e.unstable_now()-M<P)}function R(){if(S!==null){var E=e.unstable_now();M=E;var z=!0;try{z=S(!0,E)}finally{z?$():(w=!1,S=null)}}else w=!1}var $;if(typeof g=="function")$=function(){g(R)};else if(typeof MessageChannel<"u"){var Ct=new MessageChannel,Z=Ct.port2;Ct.port1.onmessage=R,$=function(){Z.postMessage(null)}}else $=function(){x(R,0)};function tt(E){S=E,w||(w=!0,$())}function ft(E,z){b=x(function(){E(e.unstable_now())},z)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(E){E.callback=null},e.unstable_continueExecution=function(){m||h||(m=!0,tt(k))},e.unstable_forceFrameRate=function(E){0>E||125<E?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<E?Math.floor(1e3/E):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_getFirstCallbackNode=function(){return n(a)},e.unstable_next=function(E){switch(d){case 1:case 2:case 3:var z=3;break;default:z=d}var D=d;d=z;try{return E()}finally{d=D}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(E,z){switch(E){case 1:case 2:case 3:case 4:case 5:break;default:E=3}var D=d;d=E;try{return z()}finally{d=D}},e.unstable_scheduleCallback=function(E,z,D){var U=e.unstable_now();switch(typeof D=="object"&&D!==null?(D=D.delay,D=typeof D=="number"&&0<D?U+D:U):D=U,E){case 1:var X=-1;break;case 2:X=250;break;case 5:X=1073741823;break;case 4:X=1e4;break;default:X=5e3}return X=D+X,E={id:c++,callback:z,priorityLevel:E,startTime:D,expirationTime:X,sortIndex:-1},D>U?(E.sortIndex=D,t(u,E),n(a)===null&&E===n(u)&&(v?(p(b),b=-1):v=!0,ft(_,D-U))):(E.sortIndex=X,t(a,E),m||h||(m=!0,tt(k))),E},e.unstable_shouldYield=L,e.unstable_wrapCallback=function(E){var z=d;return function(){var D=d;d=z;try{return E.apply(this,arguments)}finally{d=D}}}})(td);Jf.exports=td;var fg=Jf.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 ed=W,$t=fg;function C(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var nd=new Set,Qi={};function On(e,t){ri(e,t),ri(e+"Capture",t)}function ri(e,t){for(Qi[e]=t,e=0;e<t.length;e++)nd.add(t[e])}var Te=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),rl=Object.prototype.hasOwnProperty,dg=/^[: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]*$/,xu={},_u={};function hg(e){return rl.call(_u,e)?!0:rl.call(xu,e)?!1:dg.test(e)?_u[e]=!0:(xu[e]=!0,!1)}function pg(e,t,n,i){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return i?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function gg(e,t,n,i){if(t===null||typeof t>"u"||pg(e,t,n,i))return!0;if(i)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ot(e,t,n,i,r,s,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=i,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}var vt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){vt[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];vt[t]=new Ot(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){vt[e]=new Ot(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){vt[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){vt[e]=new Ot(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){vt[e]=new Ot(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){vt[e]=new Ot(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){vt[e]=new Ot(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){vt[e]=new Ot(e,5,!1,e.toLowerCase(),null,!1,!1)});var ca=/[\-:]([a-z])/g;function fa(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(ca,fa);vt[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(ca,fa);vt[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(ca,fa);vt[t]=new Ot(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){vt[e]=new Ot(e,1,!1,e.toLowerCase(),null,!1,!1)});vt.xlinkHref=new Ot("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){vt[e]=new Ot(e,1,!1,e.toLowerCase(),null,!0,!0)});function da(e,t,n,i){var r=vt.hasOwnProperty(t)?vt[t]:null;(r!==null?r.type!==0:i||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(gg(t,n,r,i)&&(n=null),i||r===null?hg(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):r.mustUseProperty?e[r.propertyName]=n===null?r.type===3?!1:"":n:(t=r.attributeName,i=r.attributeNamespace,n===null?e.removeAttribute(t):(r=r.type,n=r===3||r===4&&n===!0?"":""+n,i?e.setAttributeNS(i,t,n):e.setAttribute(t,n))))}var De=ed.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Pr=Symbol.for("react.element"),Nn=Symbol.for("react.portal"),In=Symbol.for("react.fragment"),ha=Symbol.for("react.strict_mode"),sl=Symbol.for("react.profiler"),id=Symbol.for("react.provider"),rd=Symbol.for("react.context"),pa=Symbol.for("react.forward_ref"),ol=Symbol.for("react.suspense"),ll=Symbol.for("react.suspense_list"),ga=Symbol.for("react.memo"),Ae=Symbol.for("react.lazy"),sd=Symbol.for("react.offscreen"),ku=Symbol.iterator;function mi(e){return e===null||typeof e!="object"?null:(e=ku&&e[ku]||e["@@iterator"],typeof e=="function"?e:null)}var it=Object.assign,ko;function Ti(e){if(ko===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);ko=t&&t[1]||""}return`
`+ko+e}var wo=!1;function So(e,t){if(!e||wo)return"";wo=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var i=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){i=u}e.call(t.prototype)}else{try{throw Error()}catch(u){i=u}e()}}catch(u){if(u&&i&&typeof u.stack=="string"){for(var r=u.stack.split(`
`),s=i.stack.split(`
`),o=r.length-1,l=s.length-1;1<=o&&0<=l&&r[o]!==s[l];)l--;for(;1<=o&&0<=l;o--,l--)if(r[o]!==s[l]){if(o!==1||l!==1)do if(o--,l--,0>l||r[o]!==s[l]){var a=`
`+r[o].replace(" at new "," at ");return e.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",e.displayName)),a}while(1<=o&&0<=l);break}}}finally{wo=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ti(e):""}function mg(e){switch(e.tag){case 5:return Ti(e.type);case 16:return Ti("Lazy");case 13:return Ti("Suspense");case 19:return Ti("SuspenseList");case 0:case 2:case 15:return e=So(e.type,!1),e;case 11:return e=So(e.type.render,!1),e;case 1:return e=So(e.type,!0),e;default:return""}}function al(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 In:return"Fragment";case Nn:return"Portal";case sl:return"Profiler";case ha:return"StrictMode";case ol:return"Suspense";case ll:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case rd:return(e.displayName||"Context")+".Consumer";case id:return(e._context.displayName||"Context")+".Provider";case pa:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ga:return t=e.displayName||null,t!==null?t:al(e.type)||"Memo";case Ae:t=e._payload,e=e._init;try{return al(e(t))}catch{}}return null}function yg(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 al(t);case 8:return t===ha?"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 nn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function od(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function vg(e){var t=od(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var r=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(o){i=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return i},setValue:function(o){i=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Er(e){e._valueTracker||(e._valueTracker=vg(e))}function ld(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),i="";return e&&(i=od(e)?e.checked?"true":"false":e.value),e=i,e!==n?(t.setValue(e),!0):!1}function _s(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 ul(e,t){var n=t.checked;return it({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function wu(e,t){var n=t.defaultValue==null?"":t.defaultValue,i=t.checked!=null?t.checked:t.defaultChecked;n=nn(t.value!=null?t.value:n),e._wrapperState={initialChecked:i,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function ad(e,t){t=t.checked,t!=null&&da(e,"checked",t,!1)}function cl(e,t){ad(e,t);var n=nn(t.value),i=t.type;if(n!=null)i==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(i==="submit"||i==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?fl(e,t.type,n):t.hasOwnProperty("defaultValue")&&fl(e,t.type,nn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Su(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=t.type;if(!(i!=="submit"&&i!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function fl(e,t,n){(t!=="number"||_s(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Li=Array.isArray;function Zn(e,t,n,i){if(e=e.options,t){t={};for(var r=0;r<n.length;r++)t["$"+n[r]]=!0;for(n=0;n<e.length;n++)r=t.hasOwnProperty("$"+e[n].value),e[n].selected!==r&&(e[n].selected=r),r&&i&&(e[n].defaultSelected=!0)}else{for(n=""+nn(n),t=null,r=0;r<e.length;r++){if(e[r].value===n){e[r].selected=!0,i&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function dl(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(C(91));return it({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function bu(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(C(92));if(Li(n)){if(1<n.length)throw Error(C(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:nn(n)}}function ud(e,t){var n=nn(t.value),i=nn(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),i!=null&&(e.defaultValue=""+i)}function Cu(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function cd(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function hl(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?cd(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Tr,fd=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,i,r){MSApp.execUnsafeLocalFunction(function(){return e(t,n,i,r)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Tr=Tr||document.createElement("div"),Tr.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Tr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Gi(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ai={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},xg=["Webkit","ms","Moz","O"];Object.keys(Ai).forEach(function(e){xg.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ai[t]=Ai[e]})});function dd(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ai.hasOwnProperty(e)&&Ai[e]?(""+t).trim():t+"px"}function hd(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var i=n.indexOf("--")===0,r=dd(n,t[n],i);n==="float"&&(n="cssFloat"),i?e.setProperty(n,r):e[n]=r}}var _g=it({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 pl(e,t){if(t){if(_g[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(C(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(C(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(C(61))}if(t.style!=null&&typeof t.style!="object")throw Error(C(62))}}function gl(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 ml=null;function ma(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var yl=null,qn=null,Jn=null;function Mu(e){if(e=kr(e)){if(typeof yl!="function")throw Error(C(280));var t=e.stateNode;t&&(t=ro(t),yl(e.stateNode,e.type,t))}}function pd(e){qn?Jn?Jn.push(e):Jn=[e]:qn=e}function gd(){if(qn){var e=qn,t=Jn;if(Jn=qn=null,Mu(e),t)for(e=0;e<t.length;e++)Mu(t[e])}}function md(e,t){return e(t)}function yd(){}var bo=!1;function vd(e,t,n){if(bo)return e(t,n);bo=!0;try{return md(e,t,n)}finally{bo=!1,(qn!==null||Jn!==null)&&(yd(),gd())}}function Zi(e,t){var n=e.stateNode;if(n===null)return null;var i=ro(n);if(i===null)return null;n=i[t];t:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break t;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(C(231,t,typeof n));return n}var vl=!1;if(Te)try{var yi={};Object.defineProperty(yi,"passive",{get:function(){vl=!0}}),window.addEventListener("test",yi,yi),window.removeEventListener("test",yi,yi)}catch{vl=!1}function kg(e,t,n,i,r,s,o,l,a){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var Ni=!1,ks=null,ws=!1,xl=null,wg={onError:function(e){Ni=!0,ks=e}};function Sg(e,t,n,i,r,s,o,l,a){Ni=!1,ks=null,kg.apply(wg,arguments)}function bg(e,t,n,i,r,s,o,l,a){if(Sg.apply(this,arguments),Ni){if(Ni){var u=ks;Ni=!1,ks=null}else throw Error(C(198));ws||(ws=!0,xl=u)}}function zn(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function xd(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Pu(e){if(zn(e)!==e)throw Error(C(188))}function Cg(e){var t=e.alternate;if(!t){if(t=zn(e),t===null)throw Error(C(188));return t!==e?null:e}for(var n=e,i=t;;){var r=n.return;if(r===null)break;var s=r.alternate;if(s===null){if(i=r.return,i!==null){n=i;continue}break}if(r.child===s.child){for(s=r.child;s;){if(s===n)return Pu(r),e;if(s===i)return Pu(r),t;s=s.sibling}throw Error(C(188))}if(n.return!==i.return)n=r,i=s;else{for(var o=!1,l=r.child;l;){if(l===n){o=!0,n=r,i=s;break}if(l===i){o=!0,i=r,n=s;break}l=l.sibling}if(!o){for(l=s.child;l;){if(l===n){o=!0,n=s,i=r;break}if(l===i){o=!0,i=s,n=r;break}l=l.sibling}if(!o)throw Error(C(189))}}if(n.alternate!==i)throw Error(C(190))}if(n.tag!==3)throw Error(C(188));return n.stateNode.current===n?e:t}function _d(e){return e=Cg(e),e!==null?kd(e):null}function kd(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=kd(e);if(t!==null)return t;e=e.sibling}return null}var wd=$t.unstable_scheduleCallback,Eu=$t.unstable_cancelCallback,Mg=$t.unstable_shouldYield,Pg=$t.unstable_requestPaint,ot=$t.unstable_now,Eg=$t.unstable_getCurrentPriorityLevel,ya=$t.unstable_ImmediatePriority,Sd=$t.unstable_UserBlockingPriority,Ss=$t.unstable_NormalPriority,Tg=$t.unstable_LowPriority,bd=$t.unstable_IdlePriority,to=null,me=null;function Lg(e){if(me&&typeof me.onCommitFiberRoot=="function")try{me.onCommitFiberRoot(to,e,void 0,(e.current.flags&128)===128)}catch{}}var oe=Math.clz32?Math.clz32:Dg,Og=Math.log,zg=Math.LN2;function Dg(e){return e>>>=0,e===0?32:31-(Og(e)/zg|0)|0}var Lr=64,Or=4194304;function Oi(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 bs(e,t){var n=e.pendingLanes;if(n===0)return 0;var i=0,r=e.suspendedLanes,s=e.pingedLanes,o=n&268435455;if(o!==0){var l=o&~r;l!==0?i=Oi(l):(s&=o,s!==0&&(i=Oi(s)))}else o=n&~r,o!==0?i=Oi(o):s!==0&&(i=Oi(s));if(i===0)return 0;if(t!==0&&t!==i&&!(t&r)&&(r=i&-i,s=t&-t,r>=s||r===16&&(s&4194240)!==0))return t;if(i&4&&(i|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=i;0<t;)n=31-oe(t),r=1<<n,i|=e[n],t&=~r;return i}function Rg(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Fg(e,t){for(var n=e.suspendedLanes,i=e.pingedLanes,r=e.expirationTimes,s=e.pendingLanes;0<s;){var o=31-oe(s),l=1<<o,a=r[o];a===-1?(!(l&n)||l&i)&&(r[o]=Rg(l,t)):a<=t&&(e.expiredLanes|=l),s&=~l}}function _l(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Cd(){var e=Lr;return Lr<<=1,!(Lr&4194240)&&(Lr=64),e}function Co(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function xr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-oe(t),e[t]=n}function Ag(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var i=e.eventTimes;for(e=e.expirationTimes;0<n;){var r=31-oe(n),s=1<<r;t[r]=0,i[r]=-1,e[r]=-1,n&=~s}}function va(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var i=31-oe(n),r=1<<i;r&t|e[i]&t&&(e[i]|=t),n&=~r}}var H=0;function Md(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Pd,xa,Ed,Td,Ld,kl=!1,zr=[],Ye=null,Ke=null,Xe=null,qi=new Map,Ji=new Map,Ie=[],Ng="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Tu(e,t){switch(e){case"focusin":case"focusout":Ye=null;break;case"dragenter":case"dragleave":Ke=null;break;case"mouseover":case"mouseout":Xe=null;break;case"pointerover":case"pointerout":qi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ji.delete(t.pointerId)}}function vi(e,t,n,i,r,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:i,nativeEvent:s,targetContainers:[r]},t!==null&&(t=kr(t),t!==null&&xa(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function Ig(e,t,n,i,r){switch(t){case"focusin":return Ye=vi(Ye,e,t,n,i,r),!0;case"dragenter":return Ke=vi(Ke,e,t,n,i,r),!0;case"mouseover":return Xe=vi(Xe,e,t,n,i,r),!0;case"pointerover":var s=r.pointerId;return qi.set(s,vi(qi.get(s)||null,e,t,n,i,r)),!0;case"gotpointercapture":return s=r.pointerId,Ji.set(s,vi(Ji.get(s)||null,e,t,n,i,r)),!0}return!1}function Od(e){var t=yn(e.target);if(t!==null){var n=zn(t);if(n!==null){if(t=n.tag,t===13){if(t=xd(n),t!==null){e.blockedOn=t,Ld(e.priority,function(){Ed(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ss(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=wl(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var i=new n.constructor(n.type,n);ml=i,n.target.dispatchEvent(i),ml=null}else return t=kr(n),t!==null&&xa(t),e.blockedOn=n,!1;t.shift()}return!0}function Lu(e,t,n){ss(e)&&n.delete(t)}function jg(){kl=!1,Ye!==null&&ss(Ye)&&(Ye=null),Ke!==null&&ss(Ke)&&(Ke=null),Xe!==null&&ss(Xe)&&(Xe=null),qi.forEach(Lu),Ji.forEach(Lu)}function xi(e,t){e.blockedOn===t&&(e.blockedOn=null,kl||(kl=!0,$t.unstable_scheduleCallback($t.unstable_NormalPriority,jg)))}function tr(e){function t(r){return xi(r,e)}if(0<zr.length){xi(zr[0],e);for(var n=1;n<zr.length;n++){var i=zr[n];i.blockedOn===e&&(i.blockedOn=null)}}for(Ye!==null&&xi(Ye,e),Ke!==null&&xi(Ke,e),Xe!==null&&xi(Xe,e),qi.forEach(t),Ji.forEach(t),n=0;n<Ie.length;n++)i=Ie[n],i.blockedOn===e&&(i.blockedOn=null);for(;0<Ie.length&&(n=Ie[0],n.blockedOn===null);)Od(n),n.blockedOn===null&&Ie.shift()}var ti=De.ReactCurrentBatchConfig,Cs=!0;function Bg(e,t,n,i){var r=H,s=ti.transition;ti.transition=null;try{H=1,_a(e,t,n,i)}finally{H=r,ti.transition=s}}function Hg(e,t,n,i){var r=H,s=ti.transition;ti.transition=null;try{H=4,_a(e,t,n,i)}finally{H=r,ti.transition=s}}function _a(e,t,n,i){if(Cs){var r=wl(e,t,n,i);if(r===null)Fo(e,t,i,Ms,n),Tu(e,i);else if(Ig(r,e,t,n,i))i.stopPropagation();else if(Tu(e,i),t&4&&-1<Ng.indexOf(e)){for(;r!==null;){var s=kr(r);if(s!==null&&Pd(s),s=wl(e,t,n,i),s===null&&Fo(e,t,i,Ms,n),s===r)break;r=s}r!==null&&i.stopPropagation()}else Fo(e,t,i,null,n)}}var Ms=null;function wl(e,t,n,i){if(Ms=null,e=ma(i),e=yn(e),e!==null)if(t=zn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=xd(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Ms=e,null}function zd(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Eg()){case ya:return 1;case Sd:return 4;case Ss:case Tg:return 16;case bd:return 536870912;default:return 16}default:return 16}}var Be=null,ka=null,os=null;function Dd(){if(os)return os;var e,t=ka,n=t.length,i,r="value"in Be?Be.value:Be.textContent,s=r.length;for(e=0;e<n&&t[e]===r[e];e++);var o=n-e;for(i=1;i<=o&&t[n-i]===r[s-i];i++);return os=r.slice(e,1<i?1-i:void 0)}function ls(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Dr(){return!0}function Ou(){return!1}function Yt(e){function t(n,i,r,s,o){this._reactName=n,this._targetInst=r,this.type=i,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(s):s[l]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Dr:Ou,this.isPropagationStopped=Ou,this}return it(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Dr)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Dr)},persist:function(){},isPersistent:Dr}),t}var pi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},wa=Yt(pi),_r=it({},pi,{view:0,detail:0}),Vg=Yt(_r),Mo,Po,_i,eo=it({},_r,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Sa,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==_i&&(_i&&e.type==="mousemove"?(Mo=e.screenX-_i.screenX,Po=e.screenY-_i.screenY):Po=Mo=0,_i=e),Mo)},movementY:function(e){return"movementY"in e?e.movementY:Po}}),zu=Yt(eo),Wg=it({},eo,{dataTransfer:0}),$g=Yt(Wg),Ug=it({},_r,{relatedTarget:0}),Eo=Yt(Ug),Yg=it({},pi,{animationName:0,elapsedTime:0,pseudoElement:0}),Kg=Yt(Yg),Xg=it({},pi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Qg=Yt(Xg),Gg=it({},pi,{data:0}),Du=Yt(Gg),Zg={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},qg={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Jg={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function tm(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Jg[e])?!!t[e]:!1}function Sa(){return tm}var em=it({},_r,{key:function(e){if(e.key){var t=Zg[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ls(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?qg[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Sa,charCode:function(e){return e.type==="keypress"?ls(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ls(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),nm=Yt(em),im=it({},eo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ru=Yt(im),rm=it({},_r,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Sa}),sm=Yt(rm),om=it({},pi,{propertyName:0,elapsedTime:0,pseudoElement:0}),lm=Yt(om),am=it({},eo,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),um=Yt(am),cm=[9,13,27,32],ba=Te&&"CompositionEvent"in window,Ii=null;Te&&"documentMode"in document&&(Ii=document.documentMode);var fm=Te&&"TextEvent"in window&&!Ii,Rd=Te&&(!ba||Ii&&8<Ii&&11>=Ii),Fu=String.fromCharCode(32),Au=!1;function Fd(e,t){switch(e){case"keyup":return cm.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ad(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var jn=!1;function dm(e,t){switch(e){case"compositionend":return Ad(t);case"keypress":return t.which!==32?null:(Au=!0,Fu);case"textInput":return e=t.data,e===Fu&&Au?null:e;default:return null}}function hm(e,t){if(jn)return e==="compositionend"||!ba&&Fd(e,t)?(e=Dd(),os=ka=Be=null,jn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Rd&&t.locale!=="ko"?null:t.data;default:return null}}var pm={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Nu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!pm[e.type]:t==="textarea"}function Nd(e,t,n,i){pd(i),t=Ps(t,"onChange"),0<t.length&&(n=new wa("onChange","change",null,n,i),e.push({event:n,listeners:t}))}var ji=null,er=null;function gm(e){Xd(e,0)}function no(e){var t=Vn(e);if(ld(t))return e}function mm(e,t){if(e==="change")return t}var Id=!1;if(Te){var To;if(Te){var Lo="oninput"in document;if(!Lo){var Iu=document.createElement("div");Iu.setAttribute("oninput","return;"),Lo=typeof Iu.oninput=="function"}To=Lo}else To=!1;Id=To&&(!document.documentMode||9<document.documentMode)}function ju(){ji&&(ji.detachEvent("onpropertychange",jd),er=ji=null)}function jd(e){if(e.propertyName==="value"&&no(er)){var t=[];Nd(t,er,e,ma(e)),vd(gm,t)}}function ym(e,t,n){e==="focusin"?(ju(),ji=t,er=n,ji.attachEvent("onpropertychange",jd)):e==="focusout"&&ju()}function vm(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return no(er)}function xm(e,t){if(e==="click")return no(t)}function _m(e,t){if(e==="input"||e==="change")return no(t)}function km(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ae=typeof Object.is=="function"?Object.is:km;function nr(e,t){if(ae(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(i=0;i<n.length;i++){var r=n[i];if(!rl.call(t,r)||!ae(e[r],t[r]))return!1}return!0}function Bu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Hu(e,t){var n=Bu(e);e=0;for(var i;n;){if(n.nodeType===3){if(i=e+n.textContent.length,e<=t&&i>=t)return{node:n,offset:t-e};e=i}t:{for(;n;){if(n.nextSibling){n=n.nextSibling;break t}n=n.parentNode}n=void 0}n=Bu(n)}}function Bd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Bd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Hd(){for(var e=window,t=_s();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=_s(e.document)}return t}function Ca(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 wm(e){var t=Hd(),n=e.focusedElem,i=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Bd(n.ownerDocument.documentElement,n)){if(i!==null&&Ca(n)){if(t=i.start,e=i.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var r=n.textContent.length,s=Math.min(i.start,r);i=i.end===void 0?s:Math.min(i.end,r),!e.extend&&s>i&&(r=i,i=s,s=r),r=Hu(n,s);var o=Hu(n,i);r&&o&&(e.rangeCount!==1||e.anchorNode!==r.node||e.anchorOffset!==r.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(r.node,r.offset),e.removeAllRanges(),s>i?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Sm=Te&&"documentMode"in document&&11>=document.documentMode,Bn=null,Sl=null,Bi=null,bl=!1;function Vu(e,t,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;bl||Bn==null||Bn!==_s(i)||(i=Bn,"selectionStart"in i&&Ca(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),Bi&&nr(Bi,i)||(Bi=i,i=Ps(Sl,"onSelect"),0<i.length&&(t=new wa("onSelect","select",null,t,n),e.push({event:t,listeners:i}),t.target=Bn)))}function Rr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Hn={animationend:Rr("Animation","AnimationEnd"),animationiteration:Rr("Animation","AnimationIteration"),animationstart:Rr("Animation","AnimationStart"),transitionend:Rr("Transition","TransitionEnd")},Oo={},Vd={};Te&&(Vd=document.createElement("div").style,"AnimationEvent"in window||(delete Hn.animationend.animation,delete Hn.animationiteration.animation,delete Hn.animationstart.animation),"TransitionEvent"in window||delete Hn.transitionend.transition);function io(e){if(Oo[e])return Oo[e];if(!Hn[e])return e;var t=Hn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Vd)return Oo[e]=t[n];return e}var Wd=io("animationend"),$d=io("animationiteration"),Ud=io("animationstart"),Yd=io("transitionend"),Kd=new Map,Wu="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function ln(e,t){Kd.set(e,t),On(t,[e])}for(var zo=0;zo<Wu.length;zo++){var Do=Wu[zo],bm=Do.toLowerCase(),Cm=Do[0].toUpperCase()+Do.slice(1);ln(bm,"on"+Cm)}ln(Wd,"onAnimationEnd");ln($d,"onAnimationIteration");ln(Ud,"onAnimationStart");ln("dblclick","onDoubleClick");ln("focusin","onFocus");ln("focusout","onBlur");ln(Yd,"onTransitionEnd");ri("onMouseEnter",["mouseout","mouseover"]);ri("onMouseLeave",["mouseout","mouseover"]);ri("onPointerEnter",["pointerout","pointerover"]);ri("onPointerLeave",["pointerout","pointerover"]);On("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));On("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));On("onBeforeInput",["compositionend","keypress","textInput","paste"]);On("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));On("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));On("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var zi="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Mm=new Set("cancel close invalid load scroll toggle".split(" ").concat(zi));function $u(e,t,n){var i=e.type||"unknown-event";e.currentTarget=n,bg(i,t,void 0,e),e.currentTarget=null}function Xd(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var i=e[n],r=i.event;i=i.listeners;t:{var s=void 0;if(t)for(var o=i.length-1;0<=o;o--){var l=i[o],a=l.instance,u=l.currentTarget;if(l=l.listener,a!==s&&r.isPropagationStopped())break t;$u(r,l,u),s=a}else for(o=0;o<i.length;o++){if(l=i[o],a=l.instance,u=l.currentTarget,l=l.listener,a!==s&&r.isPropagationStopped())break t;$u(r,l,u),s=a}}}if(ws)throw e=xl,ws=!1,xl=null,e}function Q(e,t){var n=t[Tl];n===void 0&&(n=t[Tl]=new Set);var i=e+"__bubble";n.has(i)||(Qd(t,e,2,!1),n.add(i))}function Ro(e,t,n){var i=0;t&&(i|=4),Qd(n,e,i,t)}var Fr="_reactListening"+Math.random().toString(36).slice(2);function ir(e){if(!e[Fr]){e[Fr]=!0,nd.forEach(function(n){n!=="selectionchange"&&(Mm.has(n)||Ro(n,!1,e),Ro(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Fr]||(t[Fr]=!0,Ro("selectionchange",!1,t))}}function Qd(e,t,n,i){switch(zd(t)){case 1:var r=Bg;break;case 4:r=Hg;break;default:r=_a}n=r.bind(null,t,n,e),r=void 0,!vl||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),i?r!==void 0?e.addEventListener(t,n,{capture:!0,passive:r}):e.addEventListener(t,n,!0):r!==void 0?e.addEventListener(t,n,{passive:r}):e.addEventListener(t,n,!1)}function Fo(e,t,n,i,r){var s=i;if(!(t&1)&&!(t&2)&&i!==null)t:for(;;){if(i===null)return;var o=i.tag;if(o===3||o===4){var l=i.stateNode.containerInfo;if(l===r||l.nodeType===8&&l.parentNode===r)break;if(o===4)for(o=i.return;o!==null;){var a=o.tag;if((a===3||a===4)&&(a=o.stateNode.containerInfo,a===r||a.nodeType===8&&a.parentNode===r))return;o=o.return}for(;l!==null;){if(o=yn(l),o===null)return;if(a=o.tag,a===5||a===6){i=s=o;continue t}l=l.parentNode}}i=i.return}vd(function(){var u=s,c=ma(n),f=[];t:{var d=Kd.get(e);if(d!==void 0){var h=wa,m=e;switch(e){case"keypress":if(ls(n)===0)break t;case"keydown":case"keyup":h=nm;break;case"focusin":m="focus",h=Eo;break;case"focusout":m="blur",h=Eo;break;case"beforeblur":case"afterblur":h=Eo;break;case"click":if(n.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=zu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=$g;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=sm;break;case Wd:case $d:case Ud:h=Kg;break;case Yd:h=lm;break;case"scroll":h=Vg;break;case"wheel":h=um;break;case"copy":case"cut":case"paste":h=Qg;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Ru}var v=(t&4)!==0,x=!v&&e==="scroll",p=v?d!==null?d+"Capture":null:d;v=[];for(var g=u,y;g!==null;){y=g;var _=y.stateNode;if(y.tag===5&&_!==null&&(y=_,p!==null&&(_=Zi(g,p),_!=null&&v.push(rr(g,_,y)))),x)break;g=g.return}0<v.length&&(d=new h(d,m,null,n,c),f.push({event:d,listeners:v}))}}if(!(t&7)){t:{if(d=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",d&&n!==ml&&(m=n.relatedTarget||n.fromElement)&&(yn(m)||m[Le]))break t;if((h||d)&&(d=c.window===c?c:(d=c.ownerDocument)?d.defaultView||d.parentWindow:window,h?(m=n.relatedTarget||n.toElement,h=u,m=m?yn(m):null,m!==null&&(x=zn(m),m!==x||m.tag!==5&&m.tag!==6)&&(m=null)):(h=null,m=u),h!==m)){if(v=zu,_="onMouseLeave",p="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(v=Ru,_="onPointerLeave",p="onPointerEnter",g="pointer"),x=h==null?d:Vn(h),y=m==null?d:Vn(m),d=new v(_,g+"leave",h,n,c),d.target=x,d.relatedTarget=y,_=null,yn(c)===u&&(v=new v(p,g+"enter",m,n,c),v.target=y,v.relatedTarget=x,_=v),x=_,h&&m)e:{for(v=h,p=m,g=0,y=v;y;y=Fn(y))g++;for(y=0,_=p;_;_=Fn(_))y++;for(;0<g-y;)v=Fn(v),g--;for(;0<y-g;)p=Fn(p),y--;for(;g--;){if(v===p||p!==null&&v===p.alternate)break e;v=Fn(v),p=Fn(p)}v=null}else v=null;h!==null&&Uu(f,d,h,v,!1),m!==null&&x!==null&&Uu(f,x,m,v,!0)}}t:{if(d=u?Vn(u):window,h=d.nodeName&&d.nodeName.toLowerCase(),h==="select"||h==="input"&&d.type==="file")var k=mm;else if(Nu(d))if(Id)k=_m;else{k=vm;var w=ym}else(h=d.nodeName)&&h.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(k=xm);if(k&&(k=k(e,u))){Nd(f,k,n,c);break t}w&&w(e,d,u),e==="focusout"&&(w=d._wrapperState)&&w.controlled&&d.type==="number"&&fl(d,"number",d.value)}switch(w=u?Vn(u):window,e){case"focusin":(Nu(w)||w.contentEditable==="true")&&(Bn=w,Sl=u,Bi=null);break;case"focusout":Bi=Sl=Bn=null;break;case"mousedown":bl=!0;break;case"contextmenu":case"mouseup":case"dragend":bl=!1,Vu(f,n,c);break;case"selectionchange":if(Sm)break;case"keydown":case"keyup":Vu(f,n,c)}var S;if(ba)t:{switch(e){case"compositionstart":var b="onCompositionStart";break t;case"compositionend":b="onCompositionEnd";break t;case"compositionupdate":b="onCompositionUpdate";break t}b=void 0}else jn?Fd(e,n)&&(b="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(b="onCompositionStart");b&&(Rd&&n.locale!=="ko"&&(jn||b!=="onCompositionStart"?b==="onCompositionEnd"&&jn&&(S=Dd()):(Be=c,ka="value"in Be?Be.value:Be.textContent,jn=!0)),w=Ps(u,b),0<w.length&&(b=new Du(b,e,null,n,c),f.push({event:b,listeners:w}),S?b.data=S:(S=Ad(n),S!==null&&(b.data=S)))),(S=fm?dm(e,n):hm(e,n))&&(u=Ps(u,"onBeforeInput"),0<u.length&&(c=new Du("onBeforeInput","beforeinput",null,n,c),f.push({event:c,listeners:u}),c.data=S))}Xd(f,t)})}function rr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ps(e,t){for(var n=t+"Capture",i=[];e!==null;){var r=e,s=r.stateNode;r.tag===5&&s!==null&&(r=s,s=Zi(e,n),s!=null&&i.unshift(rr(e,s,r)),s=Zi(e,t),s!=null&&i.push(rr(e,s,r))),e=e.return}return i}function Fn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Uu(e,t,n,i,r){for(var s=t._reactName,o=[];n!==null&&n!==i;){var l=n,a=l.alternate,u=l.stateNode;if(a!==null&&a===i)break;l.tag===5&&u!==null&&(l=u,r?(a=Zi(n,s),a!=null&&o.unshift(rr(n,a,l))):r||(a=Zi(n,s),a!=null&&o.push(rr(n,a,l)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Pm=/\r\n?/g,Em=/\u0000|\uFFFD/g;function Yu(e){return(typeof e=="string"?e:""+e).replace(Pm,`
`).replace(Em,"")}function Ar(e,t,n){if(t=Yu(t),Yu(e)!==t&&n)throw Error(C(425))}function Es(){}var Cl=null,Ml=null;function Pl(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var El=typeof setTimeout=="function"?setTimeout:void 0,Tm=typeof clearTimeout=="function"?clearTimeout:void 0,Ku=typeof Promise=="function"?Promise:void 0,Lm=typeof queueMicrotask=="function"?queueMicrotask:typeof Ku<"u"?function(e){return Ku.resolve(null).then(e).catch(Om)}:El;function Om(e){setTimeout(function(){throw e})}function Ao(e,t){var n=t,i=0;do{var r=n.nextSibling;if(e.removeChild(n),r&&r.nodeType===8)if(n=r.data,n==="/$"){if(i===0){e.removeChild(r),tr(t);return}i--}else n!=="$"&&n!=="$?"&&n!=="$!"||i++;n=r}while(n);tr(t)}function Qe(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Xu(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var gi=Math.random().toString(36).slice(2),ge="__reactFiber$"+gi,sr="__reactProps$"+gi,Le="__reactContainer$"+gi,Tl="__reactEvents$"+gi,zm="__reactListeners$"+gi,Dm="__reactHandles$"+gi;function yn(e){var t=e[ge];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Le]||n[ge]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Xu(e);e!==null;){if(n=e[ge])return n;e=Xu(e)}return t}e=n,n=e.parentNode}return null}function kr(e){return e=e[ge]||e[Le],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Vn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(C(33))}function ro(e){return e[sr]||null}var Ll=[],Wn=-1;function an(e){return{current:e}}function G(e){0>Wn||(e.current=Ll[Wn],Ll[Wn]=null,Wn--)}function K(e,t){Wn++,Ll[Wn]=e.current,e.current=t}var rn={},St=an(rn),At=an(!1),bn=rn;function si(e,t){var n=e.type.contextTypes;if(!n)return rn;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===t)return i.__reactInternalMemoizedMaskedChildContext;var r={},s;for(s in n)r[s]=t[s];return i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=r),r}function Nt(e){return e=e.childContextTypes,e!=null}function Ts(){G(At),G(St)}function Qu(e,t,n){if(St.current!==rn)throw Error(C(168));K(St,t),K(At,n)}function Gd(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!="function")return n;i=i.getChildContext();for(var r in i)if(!(r in t))throw Error(C(108,yg(e)||"Unknown",r));return it({},n,i)}function Ls(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||rn,bn=St.current,K(St,e),K(At,At.current),!0}function Gu(e,t,n){var i=e.stateNode;if(!i)throw Error(C(169));n?(e=Gd(e,t,bn),i.__reactInternalMemoizedMergedChildContext=e,G(At),G(St),K(St,e)):G(At),K(At,n)}var be=null,so=!1,No=!1;function Zd(e){be===null?be=[e]:be.push(e)}function Rm(e){so=!0,Zd(e)}function un(){if(!No&&be!==null){No=!0;var e=0,t=H;try{var n=be;for(H=1;e<n.length;e++){var i=n[e];do i=i(!0);while(i!==null)}be=null,so=!1}catch(r){throw be!==null&&(be=be.slice(e+1)),wd(ya,un),r}finally{H=t,No=!1}}return null}var $n=[],Un=0,Os=null,zs=0,Xt=[],Qt=0,Cn=null,Me=1,Pe="";function pn(e,t){$n[Un++]=zs,$n[Un++]=Os,Os=e,zs=t}function qd(e,t,n){Xt[Qt++]=Me,Xt[Qt++]=Pe,Xt[Qt++]=Cn,Cn=e;var i=Me;e=Pe;var r=32-oe(i)-1;i&=~(1<<r),n+=1;var s=32-oe(t)+r;if(30<s){var o=r-r%5;s=(i&(1<<o)-1).toString(32),i>>=o,r-=o,Me=1<<32-oe(t)+r|n<<r|i,Pe=s+e}else Me=1<<s|n<<r|i,Pe=e}function Ma(e){e.return!==null&&(pn(e,1),qd(e,1,0))}function Pa(e){for(;e===Os;)Os=$n[--Un],$n[Un]=null,zs=$n[--Un],$n[Un]=null;for(;e===Cn;)Cn=Xt[--Qt],Xt[Qt]=null,Pe=Xt[--Qt],Xt[Qt]=null,Me=Xt[--Qt],Xt[Qt]=null}var Wt=null,Ht=null,q=!1,re=null;function Jd(e,t){var n=Gt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Zu(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Wt=e,Ht=Qe(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Wt=e,Ht=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Cn!==null?{id:Me,overflow:Pe}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Gt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Wt=e,Ht=null,!0):!1;default:return!1}}function Ol(e){return(e.mode&1)!==0&&(e.flags&128)===0}function zl(e){if(q){var t=Ht;if(t){var n=t;if(!Zu(e,t)){if(Ol(e))throw Error(C(418));t=Qe(n.nextSibling);var i=Wt;t&&Zu(e,t)?Jd(i,n):(e.flags=e.flags&-4097|2,q=!1,Wt=e)}}else{if(Ol(e))throw Error(C(418));e.flags=e.flags&-4097|2,q=!1,Wt=e}}}function qu(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Wt=e}function Nr(e){if(e!==Wt)return!1;if(!q)return qu(e),q=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Pl(e.type,e.memoizedProps)),t&&(t=Ht)){if(Ol(e))throw th(),Error(C(418));for(;t;)Jd(e,t),t=Qe(t.nextSibling)}if(qu(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(C(317));t:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Ht=Qe(e.nextSibling);break t}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Ht=null}}else Ht=Wt?Qe(e.stateNode.nextSibling):null;return!0}function th(){for(var e=Ht;e;)e=Qe(e.nextSibling)}function oi(){Ht=Wt=null,q=!1}function Ea(e){re===null?re=[e]:re.push(e)}var Fm=De.ReactCurrentBatchConfig;function ne(e,t){if(e&&e.defaultProps){t=it({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var Ds=an(null),Rs=null,Yn=null,Ta=null;function La(){Ta=Yn=Rs=null}function Oa(e){var t=Ds.current;G(Ds),e._currentValue=t}function Dl(e,t,n){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===n)break;e=e.return}}function ei(e,t){Rs=e,Ta=Yn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ft=!0),e.firstContext=null)}function Jt(e){var t=e._currentValue;if(Ta!==e)if(e={context:e,memoizedValue:t,next:null},Yn===null){if(Rs===null)throw Error(C(308));Yn=e,Rs.dependencies={lanes:0,firstContext:e}}else Yn=Yn.next=e;return t}var vn=null;function za(e){vn===null?vn=[e]:vn.push(e)}function eh(e,t,n,i){var r=t.interleaved;return r===null?(n.next=n,za(t)):(n.next=r.next,r.next=n),t.interleaved=n,Oe(e,i)}function Oe(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Ne=!1;function Da(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function nh(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 Ee(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ge(e,t,n){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,N&2){var r=i.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),i.pending=t,Oe(e,n)}return r=i.interleaved,r===null?(t.next=t,za(i)):(t.next=r.next,r.next=t),i.interleaved=t,Oe(e,n)}function as(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,va(e,n)}}function Ju(e,t){var n=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,n===i)){var r=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?r=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?r=s=t:s=s.next=t}else r=s=t;n={baseState:i.baseState,firstBaseUpdate:r,lastBaseUpdate:s,shared:i.shared,effects:i.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Fs(e,t,n,i){var r=e.updateQueue;Ne=!1;var s=r.firstBaseUpdate,o=r.lastBaseUpdate,l=r.shared.pending;if(l!==null){r.shared.pending=null;var a=l,u=a.next;a.next=null,o===null?s=u:o.next=u,o=a;var c=e.alternate;c!==null&&(c=c.updateQueue,l=c.lastBaseUpdate,l!==o&&(l===null?c.firstBaseUpdate=u:l.next=u,c.lastBaseUpdate=a))}if(s!==null){var f=r.baseState;o=0,c=u=a=null,l=s;do{var d=l.lane,h=l.eventTime;if((i&d)===d){c!==null&&(c=c.next={eventTime:h,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});t:{var m=e,v=l;switch(d=t,h=n,v.tag){case 1:if(m=v.payload,typeof m=="function"){f=m.call(h,f,d);break t}f=m;break t;case 3:m.flags=m.flags&-65537|128;case 0:if(m=v.payload,d=typeof m=="function"?m.call(h,f,d):m,d==null)break t;f=it({},f,d);break t;case 2:Ne=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,d=r.effects,d===null?r.effects=[l]:d.push(l))}else h={eventTime:h,lane:d,tag:l.tag,payload:l.payload,callback:l.callback,next:null},c===null?(u=c=h,a=f):c=c.next=h,o|=d;if(l=l.next,l===null){if(l=r.shared.pending,l===null)break;d=l,l=d.next,d.next=null,r.lastBaseUpdate=d,r.shared.pending=null}}while(1);if(c===null&&(a=f),r.baseState=a,r.firstBaseUpdate=u,r.lastBaseUpdate=c,t=r.shared.interleaved,t!==null){r=t;do o|=r.lane,r=r.next;while(r!==t)}else s===null&&(r.shared.lanes=0);Pn|=o,e.lanes=o,e.memoizedState=f}}function tc(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var i=e[t],r=i.callback;if(r!==null){if(i.callback=null,i=n,typeof r!="function")throw Error(C(191,r));r.call(i)}}}var ih=new ed.Component().refs;function Rl(e,t,n,i){t=e.memoizedState,n=n(i,t),n=n==null?t:it({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var oo={isMounted:function(e){return(e=e._reactInternals)?zn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var i=Tt(),r=qe(e),s=Ee(i,r);s.payload=t,n!=null&&(s.callback=n),t=Ge(e,s,r),t!==null&&(le(t,e,r,i),as(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var i=Tt(),r=qe(e),s=Ee(i,r);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=Ge(e,s,r),t!==null&&(le(t,e,r,i),as(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Tt(),i=qe(e),r=Ee(n,i);r.tag=2,t!=null&&(r.callback=t),t=Ge(e,r,i),t!==null&&(le(t,e,i,n),as(t,e,i))}};function ec(e,t,n,i,r,s,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,s,o):t.prototype&&t.prototype.isPureReactComponent?!nr(n,i)||!nr(r,s):!0}function rh(e,t,n){var i=!1,r=rn,s=t.contextType;return typeof s=="object"&&s!==null?s=Jt(s):(r=Nt(t)?bn:St.current,i=t.contextTypes,s=(i=i!=null)?si(e,r):rn),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=oo,e.stateNode=t,t._reactInternals=e,i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=r,e.__reactInternalMemoizedMaskedChildContext=s),t}function nc(e,t,n,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,i),t.state!==e&&oo.enqueueReplaceState(t,t.state,null)}function Fl(e,t,n,i){var r=e.stateNode;r.props=n,r.state=e.memoizedState,r.refs=ih,Da(e);var s=t.contextType;typeof s=="object"&&s!==null?r.context=Jt(s):(s=Nt(t)?bn:St.current,r.context=si(e,s)),r.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Rl(e,t,s,n),r.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof r.getSnapshotBeforeUpdate=="function"||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(t=r.state,typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount(),t!==r.state&&oo.enqueueReplaceState(r,r.state,null),Fs(e,n,r,i),r.state=e.memoizedState),typeof r.componentDidMount=="function"&&(e.flags|=4194308)}function ki(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(C(309));var i=n.stateNode}if(!i)throw Error(C(147,e));var r=i,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(o){var l=r.refs;l===ih&&(l=r.refs={}),o===null?delete l[s]:l[s]=o},t._stringRef=s,t)}if(typeof e!="string")throw Error(C(284));if(!n._owner)throw Error(C(290,e))}return e}function Ir(e,t){throw e=Object.prototype.toString.call(t),Error(C(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ic(e){var t=e._init;return t(e._payload)}function sh(e){function t(p,g){if(e){var y=p.deletions;y===null?(p.deletions=[g],p.flags|=16):y.push(g)}}function n(p,g){if(!e)return null;for(;g!==null;)t(p,g),g=g.sibling;return null}function i(p,g){for(p=new Map;g!==null;)g.key!==null?p.set(g.key,g):p.set(g.index,g),g=g.sibling;return p}function r(p,g){return p=Je(p,g),p.index=0,p.sibling=null,p}function s(p,g,y){return p.index=y,e?(y=p.alternate,y!==null?(y=y.index,y<g?(p.flags|=2,g):y):(p.flags|=2,g)):(p.flags|=1048576,g)}function o(p){return e&&p.alternate===null&&(p.flags|=2),p}function l(p,g,y,_){return g===null||g.tag!==6?(g=$o(y,p.mode,_),g.return=p,g):(g=r(g,y),g.return=p,g)}function a(p,g,y,_){var k=y.type;return k===In?c(p,g,y.props.children,_,y.key):g!==null&&(g.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Ae&&ic(k)===g.type)?(_=r(g,y.props),_.ref=ki(p,g,y),_.return=p,_):(_=ps(y.type,y.key,y.props,null,p.mode,_),_.ref=ki(p,g,y),_.return=p,_)}function u(p,g,y,_){return g===null||g.tag!==4||g.stateNode.containerInfo!==y.containerInfo||g.stateNode.implementation!==y.implementation?(g=Uo(y,p.mode,_),g.return=p,g):(g=r(g,y.children||[]),g.return=p,g)}function c(p,g,y,_,k){return g===null||g.tag!==7?(g=kn(y,p.mode,_,k),g.return=p,g):(g=r(g,y),g.return=p,g)}function f(p,g,y){if(typeof g=="string"&&g!==""||typeof g=="number")return g=$o(""+g,p.mode,y),g.return=p,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Pr:return y=ps(g.type,g.key,g.props,null,p.mode,y),y.ref=ki(p,null,g),y.return=p,y;case Nn:return g=Uo(g,p.mode,y),g.return=p,g;case Ae:var _=g._init;return f(p,_(g._payload),y)}if(Li(g)||mi(g))return g=kn(g,p.mode,y,null),g.return=p,g;Ir(p,g)}return null}function d(p,g,y,_){var k=g!==null?g.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return k!==null?null:l(p,g,""+y,_);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Pr:return y.key===k?a(p,g,y,_):null;case Nn:return y.key===k?u(p,g,y,_):null;case Ae:return k=y._init,d(p,g,k(y._payload),_)}if(Li(y)||mi(y))return k!==null?null:c(p,g,y,_,null);Ir(p,y)}return null}function h(p,g,y,_,k){if(typeof _=="string"&&_!==""||typeof _=="number")return p=p.get(y)||null,l(g,p,""+_,k);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case Pr:return p=p.get(_.key===null?y:_.key)||null,a(g,p,_,k);case Nn:return p=p.get(_.key===null?y:_.key)||null,u(g,p,_,k);case Ae:var w=_._init;return h(p,g,y,w(_._payload),k)}if(Li(_)||mi(_))return p=p.get(y)||null,c(g,p,_,k,null);Ir(g,_)}return null}function m(p,g,y,_){for(var k=null,w=null,S=g,b=g=0,P=null;S!==null&&b<y.length;b++){S.index>b?(P=S,S=null):P=S.sibling;var M=d(p,S,y[b],_);if(M===null){S===null&&(S=P);break}e&&S&&M.alternate===null&&t(p,S),g=s(M,g,b),w===null?k=M:w.sibling=M,w=M,S=P}if(b===y.length)return n(p,S),q&&pn(p,b),k;if(S===null){for(;b<y.length;b++)S=f(p,y[b],_),S!==null&&(g=s(S,g,b),w===null?k=S:w.sibling=S,w=S);return q&&pn(p,b),k}for(S=i(p,S);b<y.length;b++)P=h(S,p,b,y[b],_),P!==null&&(e&&P.alternate!==null&&S.delete(P.key===null?b:P.key),g=s(P,g,b),w===null?k=P:w.sibling=P,w=P);return e&&S.forEach(function(L){return t(p,L)}),q&&pn(p,b),k}function v(p,g,y,_){var k=mi(y);if(typeof k!="function")throw Error(C(150));if(y=k.call(y),y==null)throw Error(C(151));for(var w=k=null,S=g,b=g=0,P=null,M=y.next();S!==null&&!M.done;b++,M=y.next()){S.index>b?(P=S,S=null):P=S.sibling;var L=d(p,S,M.value,_);if(L===null){S===null&&(S=P);break}e&&S&&L.alternate===null&&t(p,S),g=s(L,g,b),w===null?k=L:w.sibling=L,w=L,S=P}if(M.done)return n(p,S),q&&pn(p,b),k;if(S===null){for(;!M.done;b++,M=y.next())M=f(p,M.value,_),M!==null&&(g=s(M,g,b),w===null?k=M:w.sibling=M,w=M);return q&&pn(p,b),k}for(S=i(p,S);!M.done;b++,M=y.next())M=h(S,p,b,M.value,_),M!==null&&(e&&M.alternate!==null&&S.delete(M.key===null?b:M.key),g=s(M,g,b),w===null?k=M:w.sibling=M,w=M);return e&&S.forEach(function(R){return t(p,R)}),q&&pn(p,b),k}function x(p,g,y,_){if(typeof y=="object"&&y!==null&&y.type===In&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Pr:t:{for(var k=y.key,w=g;w!==null;){if(w.key===k){if(k=y.type,k===In){if(w.tag===7){n(p,w.sibling),g=r(w,y.props.children),g.return=p,p=g;break t}}else if(w.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Ae&&ic(k)===w.type){n(p,w.sibling),g=r(w,y.props),g.ref=ki(p,w,y),g.return=p,p=g;break t}n(p,w);break}else t(p,w);w=w.sibling}y.type===In?(g=kn(y.props.children,p.mode,_,y.key),g.return=p,p=g):(_=ps(y.type,y.key,y.props,null,p.mode,_),_.ref=ki(p,g,y),_.return=p,p=_)}return o(p);case Nn:t:{for(w=y.key;g!==null;){if(g.key===w)if(g.tag===4&&g.stateNode.containerInfo===y.containerInfo&&g.stateNode.implementation===y.implementation){n(p,g.sibling),g=r(g,y.children||[]),g.return=p,p=g;break t}else{n(p,g);break}else t(p,g);g=g.sibling}g=Uo(y,p.mode,_),g.return=p,p=g}return o(p);case Ae:return w=y._init,x(p,g,w(y._payload),_)}if(Li(y))return m(p,g,y,_);if(mi(y))return v(p,g,y,_);Ir(p,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,g!==null&&g.tag===6?(n(p,g.sibling),g=r(g,y),g.return=p,p=g):(n(p,g),g=$o(y,p.mode,_),g.return=p,p=g),o(p)):n(p,g)}return x}var li=sh(!0),oh=sh(!1),wr={},ye=an(wr),or=an(wr),lr=an(wr);function xn(e){if(e===wr)throw Error(C(174));return e}function Ra(e,t){switch(K(lr,t),K(or,e),K(ye,wr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:hl(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=hl(t,e)}G(ye),K(ye,t)}function ai(){G(ye),G(or),G(lr)}function lh(e){xn(lr.current);var t=xn(ye.current),n=hl(t,e.type);t!==n&&(K(or,e),K(ye,n))}function Fa(e){or.current===e&&(G(ye),G(or))}var et=an(0);function As(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Io=[];function Aa(){for(var e=0;e<Io.length;e++)Io[e]._workInProgressVersionPrimary=null;Io.length=0}var us=De.ReactCurrentDispatcher,jo=De.ReactCurrentBatchConfig,Mn=0,nt=null,at=null,dt=null,Ns=!1,Hi=!1,ar=0,Am=0;function xt(){throw Error(C(321))}function Na(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ae(e[n],t[n]))return!1;return!0}function Ia(e,t,n,i,r,s){if(Mn=s,nt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,us.current=e===null||e.memoizedState===null?Bm:Hm,e=n(i,r),Hi){s=0;do{if(Hi=!1,ar=0,25<=s)throw Error(C(301));s+=1,dt=at=null,t.updateQueue=null,us.current=Vm,e=n(i,r)}while(Hi)}if(us.current=Is,t=at!==null&&at.next!==null,Mn=0,dt=at=nt=null,Ns=!1,t)throw Error(C(300));return e}function ja(){var e=ar!==0;return ar=0,e}function de(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return dt===null?nt.memoizedState=dt=e:dt=dt.next=e,dt}function te(){if(at===null){var e=nt.alternate;e=e!==null?e.memoizedState:null}else e=at.next;var t=dt===null?nt.memoizedState:dt.next;if(t!==null)dt=t,at=e;else{if(e===null)throw Error(C(310));at=e,e={memoizedState:at.memoizedState,baseState:at.baseState,baseQueue:at.baseQueue,queue:at.queue,next:null},dt===null?nt.memoizedState=dt=e:dt=dt.next=e}return dt}function ur(e,t){return typeof t=="function"?t(e):t}function Bo(e){var t=te(),n=t.queue;if(n===null)throw Error(C(311));n.lastRenderedReducer=e;var i=at,r=i.baseQueue,s=n.pending;if(s!==null){if(r!==null){var o=r.next;r.next=s.next,s.next=o}i.baseQueue=r=s,n.pending=null}if(r!==null){s=r.next,i=i.baseState;var l=o=null,a=null,u=s;do{var c=u.lane;if((Mn&c)===c)a!==null&&(a=a.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),i=u.hasEagerState?u.eagerState:e(i,u.action);else{var f={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};a===null?(l=a=f,o=i):a=a.next=f,nt.lanes|=c,Pn|=c}u=u.next}while(u!==null&&u!==s);a===null?o=i:a.next=l,ae(i,t.memoizedState)||(Ft=!0),t.memoizedState=i,t.baseState=o,t.baseQueue=a,n.lastRenderedState=i}if(e=n.interleaved,e!==null){r=e;do s=r.lane,nt.lanes|=s,Pn|=s,r=r.next;while(r!==e)}else r===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ho(e){var t=te(),n=t.queue;if(n===null)throw Error(C(311));n.lastRenderedReducer=e;var i=n.dispatch,r=n.pending,s=t.memoizedState;if(r!==null){n.pending=null;var o=r=r.next;do s=e(s,o.action),o=o.next;while(o!==r);ae(s,t.memoizedState)||(Ft=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,i]}function ah(){}function uh(e,t){var n=nt,i=te(),r=t(),s=!ae(i.memoizedState,r);if(s&&(i.memoizedState=r,Ft=!0),i=i.queue,Ba(dh.bind(null,n,i,e),[e]),i.getSnapshot!==t||s||dt!==null&&dt.memoizedState.tag&1){if(n.flags|=2048,cr(9,fh.bind(null,n,i,r,t),void 0,null),pt===null)throw Error(C(349));Mn&30||ch(n,t,r)}return r}function ch(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=nt.updateQueue,t===null?(t={lastEffect:null,stores:null},nt.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function fh(e,t,n,i){t.value=n,t.getSnapshot=i,hh(t)&&ph(e)}function dh(e,t,n){return n(function(){hh(t)&&ph(e)})}function hh(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ae(e,n)}catch{return!0}}function ph(e){var t=Oe(e,1);t!==null&&le(t,e,1,-1)}function rc(e){var t=de();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ur,lastRenderedState:e},t.queue=e,e=e.dispatch=jm.bind(null,nt,e),[t.memoizedState,e]}function cr(e,t,n,i){return e={tag:e,create:t,destroy:n,deps:i,next:null},t=nt.updateQueue,t===null?(t={lastEffect:null,stores:null},nt.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(i=n.next,n.next=e,e.next=i,t.lastEffect=e)),e}function gh(){return te().memoizedState}function cs(e,t,n,i){var r=de();nt.flags|=e,r.memoizedState=cr(1|t,n,void 0,i===void 0?null:i)}function lo(e,t,n,i){var r=te();i=i===void 0?null:i;var s=void 0;if(at!==null){var o=at.memoizedState;if(s=o.destroy,i!==null&&Na(i,o.deps)){r.memoizedState=cr(t,n,s,i);return}}nt.flags|=e,r.memoizedState=cr(1|t,n,s,i)}function sc(e,t){return cs(8390656,8,e,t)}function Ba(e,t){return lo(2048,8,e,t)}function mh(e,t){return lo(4,2,e,t)}function yh(e,t){return lo(4,4,e,t)}function vh(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function xh(e,t,n){return n=n!=null?n.concat([e]):null,lo(4,4,vh.bind(null,t,e),n)}function Ha(){}function _h(e,t){var n=te();t=t===void 0?null:t;var i=n.memoizedState;return i!==null&&t!==null&&Na(t,i[1])?i[0]:(n.memoizedState=[e,t],e)}function kh(e,t){var n=te();t=t===void 0?null:t;var i=n.memoizedState;return i!==null&&t!==null&&Na(t,i[1])?i[0]:(e=e(),n.memoizedState=[e,t],e)}function wh(e,t,n){return Mn&21?(ae(n,t)||(n=Cd(),nt.lanes|=n,Pn|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ft=!0),e.memoizedState=n)}function Nm(e,t){var n=H;H=n!==0&&4>n?n:4,e(!0);var i=jo.transition;jo.transition={};try{e(!1),t()}finally{H=n,jo.transition=i}}function Sh(){return te().memoizedState}function Im(e,t,n){var i=qe(e);if(n={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null},bh(e))Ch(t,n);else if(n=eh(e,t,n,i),n!==null){var r=Tt();le(n,e,i,r),Mh(n,t,i)}}function jm(e,t,n){var i=qe(e),r={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null};if(bh(e))Ch(t,r);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var o=t.lastRenderedState,l=s(o,n);if(r.hasEagerState=!0,r.eagerState=l,ae(l,o)){var a=t.interleaved;a===null?(r.next=r,za(t)):(r.next=a.next,a.next=r),t.interleaved=r;return}}catch{}finally{}n=eh(e,t,r,i),n!==null&&(r=Tt(),le(n,e,i,r),Mh(n,t,i))}}function bh(e){var t=e.alternate;return e===nt||t!==null&&t===nt}function Ch(e,t){Hi=Ns=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Mh(e,t,n){if(n&4194240){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,va(e,n)}}var Is={readContext:Jt,useCallback:xt,useContext:xt,useEffect:xt,useImperativeHandle:xt,useInsertionEffect:xt,useLayoutEffect:xt,useMemo:xt,useReducer:xt,useRef:xt,useState:xt,useDebugValue:xt,useDeferredValue:xt,useTransition:xt,useMutableSource:xt,useSyncExternalStore:xt,useId:xt,unstable_isNewReconciler:!1},Bm={readContext:Jt,useCallback:function(e,t){return de().memoizedState=[e,t===void 0?null:t],e},useContext:Jt,useEffect:sc,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,cs(4194308,4,vh.bind(null,t,e),n)},useLayoutEffect:function(e,t){return cs(4194308,4,e,t)},useInsertionEffect:function(e,t){return cs(4,2,e,t)},useMemo:function(e,t){var n=de();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var i=de();return t=n!==void 0?n(t):t,i.memoizedState=i.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},i.queue=e,e=e.dispatch=Im.bind(null,nt,e),[i.memoizedState,e]},useRef:function(e){var t=de();return e={current:e},t.memoizedState=e},useState:rc,useDebugValue:Ha,useDeferredValue:function(e){return de().memoizedState=e},useTransition:function(){var e=rc(!1),t=e[0];return e=Nm.bind(null,e[1]),de().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=nt,r=de();if(q){if(n===void 0)throw Error(C(407));n=n()}else{if(n=t(),pt===null)throw Error(C(349));Mn&30||ch(i,t,n)}r.memoizedState=n;var s={value:n,getSnapshot:t};return r.queue=s,sc(dh.bind(null,i,s,e),[e]),i.flags|=2048,cr(9,fh.bind(null,i,s,n,t),void 0,null),n},useId:function(){var e=de(),t=pt.identifierPrefix;if(q){var n=Pe,i=Me;n=(i&~(1<<32-oe(i)-1)).toString(32)+n,t=":"+t+"R"+n,n=ar++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Am++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Hm={readContext:Jt,useCallback:_h,useContext:Jt,useEffect:Ba,useImperativeHandle:xh,useInsertionEffect:mh,useLayoutEffect:yh,useMemo:kh,useReducer:Bo,useRef:gh,useState:function(){return Bo(ur)},useDebugValue:Ha,useDeferredValue:function(e){var t=te();return wh(t,at.memoizedState,e)},useTransition:function(){var e=Bo(ur)[0],t=te().memoizedState;return[e,t]},useMutableSource:ah,useSyncExternalStore:uh,useId:Sh,unstable_isNewReconciler:!1},Vm={readContext:Jt,useCallback:_h,useContext:Jt,useEffect:Ba,useImperativeHandle:xh,useInsertionEffect:mh,useLayoutEffect:yh,useMemo:kh,useReducer:Ho,useRef:gh,useState:function(){return Ho(ur)},useDebugValue:Ha,useDeferredValue:function(e){var t=te();return at===null?t.memoizedState=e:wh(t,at.memoizedState,e)},useTransition:function(){var e=Ho(ur)[0],t=te().memoizedState;return[e,t]},useMutableSource:ah,useSyncExternalStore:uh,useId:Sh,unstable_isNewReconciler:!1};function ui(e,t){try{var n="",i=t;do n+=mg(i),i=i.return;while(i);var r=n}catch(s){r=`
Error generating stack: `+s.message+`
`+s.stack}return{value:e,source:t,stack:r,digest:null}}function Vo(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Al(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Wm=typeof WeakMap=="function"?WeakMap:Map;function Ph(e,t,n){n=Ee(-1,n),n.tag=3,n.payload={element:null};var i=t.value;return n.callback=function(){Bs||(Bs=!0,Yl=i),Al(e,t)},n}function Eh(e,t,n){n=Ee(-1,n),n.tag=3;var i=e.type.getDerivedStateFromError;if(typeof i=="function"){var r=t.value;n.payload=function(){return i(r)},n.callback=function(){Al(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Al(e,t),typeof i!="function"&&(Ze===null?Ze=new Set([this]):Ze.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function oc(e,t,n){var i=e.pingCache;if(i===null){i=e.pingCache=new Wm;var r=new Set;i.set(t,r)}else r=i.get(t),r===void 0&&(r=new Set,i.set(t,r));r.has(n)||(r.add(n),e=i0.bind(null,e,t,n),t.then(e,e))}function lc(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function ac(e,t,n,i,r){return e.mode&1?(e.flags|=65536,e.lanes=r,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Ee(-1,1),t.tag=2,Ge(n,t,1))),n.lanes|=1),e)}var $m=De.ReactCurrentOwner,Ft=!1;function Et(e,t,n,i){t.child=e===null?oh(t,null,n,i):li(t,e.child,n,i)}function uc(e,t,n,i,r){n=n.render;var s=t.ref;return ei(t,r),i=Ia(e,t,n,i,s,r),n=ja(),e!==null&&!Ft?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r,ze(e,t,r)):(q&&n&&Ma(t),t.flags|=1,Et(e,t,i,r),t.child)}function cc(e,t,n,i,r){if(e===null){var s=n.type;return typeof s=="function"&&!Qa(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,Th(e,t,s,i,r)):(e=ps(n.type,null,i,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&r)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:nr,n(o,i)&&e.ref===t.ref)return ze(e,t,r)}return t.flags|=1,e=Je(s,i),e.ref=t.ref,e.return=t,t.child=e}function Th(e,t,n,i,r){if(e!==null){var s=e.memoizedProps;if(nr(s,i)&&e.ref===t.ref)if(Ft=!1,t.pendingProps=i=s,(e.lanes&r)!==0)e.flags&131072&&(Ft=!0);else return t.lanes=e.lanes,ze(e,t,r)}return Nl(e,t,n,i,r)}function Lh(e,t,n){var i=t.pendingProps,r=i.children,s=e!==null?e.memoizedState:null;if(i.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},K(Xn,Bt),Bt|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,K(Xn,Bt),Bt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=s!==null?s.baseLanes:n,K(Xn,Bt),Bt|=i}else s!==null?(i=s.baseLanes|n,t.memoizedState=null):i=n,K(Xn,Bt),Bt|=i;return Et(e,t,r,n),t.child}function Oh(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Nl(e,t,n,i,r){var s=Nt(n)?bn:St.current;return s=si(t,s),ei(t,r),n=Ia(e,t,n,i,s,r),i=ja(),e!==null&&!Ft?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r,ze(e,t,r)):(q&&i&&Ma(t),t.flags|=1,Et(e,t,n,r),t.child)}function fc(e,t,n,i,r){if(Nt(n)){var s=!0;Ls(t)}else s=!1;if(ei(t,r),t.stateNode===null)fs(e,t),rh(t,n,i),Fl(t,n,i,r),i=!0;else if(e===null){var o=t.stateNode,l=t.memoizedProps;o.props=l;var a=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=Jt(u):(u=Nt(n)?bn:St.current,u=si(t,u));var c=n.getDerivedStateFromProps,f=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==i||a!==u)&&nc(t,o,i,u),Ne=!1;var d=t.memoizedState;o.state=d,Fs(t,i,o,r),a=t.memoizedState,l!==i||d!==a||At.current||Ne?(typeof c=="function"&&(Rl(t,n,c,i),a=t.memoizedState),(l=Ne||ec(t,n,l,i,d,a,u))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=a),o.props=i,o.state=a,o.context=u,i=l):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{o=t.stateNode,nh(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:ne(t.type,l),o.props=u,f=t.pendingProps,d=o.context,a=n.contextType,typeof a=="object"&&a!==null?a=Jt(a):(a=Nt(n)?bn:St.current,a=si(t,a));var h=n.getDerivedStateFromProps;(c=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==f||d!==a)&&nc(t,o,i,a),Ne=!1,d=t.memoizedState,o.state=d,Fs(t,i,o,r);var m=t.memoizedState;l!==f||d!==m||At.current||Ne?(typeof h=="function"&&(Rl(t,n,h,i),m=t.memoizedState),(u=Ne||ec(t,n,u,i,d,m,a)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(i,m,a),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(i,m,a)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=m),o.props=i,o.state=m,o.context=a,i=u):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),i=!1)}return Il(e,t,n,i,s,r)}function Il(e,t,n,i,r,s){Oh(e,t);var o=(t.flags&128)!==0;if(!i&&!o)return r&&Gu(t,n,!1),ze(e,t,s);i=t.stateNode,$m.current=t;var l=o&&typeof n.getDerivedStateFromError!="function"?null:i.render();return t.flags|=1,e!==null&&o?(t.child=li(t,e.child,null,s),t.child=li(t,null,l,s)):Et(e,t,l,s),t.memoizedState=i.state,r&&Gu(t,n,!0),t.child}function zh(e){var t=e.stateNode;t.pendingContext?Qu(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Qu(e,t.context,!1),Ra(e,t.containerInfo)}function dc(e,t,n,i,r){return oi(),Ea(r),t.flags|=256,Et(e,t,n,i),t.child}var jl={dehydrated:null,treeContext:null,retryLane:0};function Bl(e){return{baseLanes:e,cachePool:null,transitions:null}}function Dh(e,t,n){var i=t.pendingProps,r=et.current,s=!1,o=(t.flags&128)!==0,l;if((l=o)||(l=e!==null&&e.memoizedState===null?!1:(r&2)!==0),l?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(r|=1),K(et,r&1),e===null)return zl(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=i.children,e=i.fallback,s?(i=t.mode,s=t.child,o={mode:"hidden",children:o},!(i&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=co(o,i,0,null),e=kn(e,i,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Bl(n),t.memoizedState=jl,e):Va(t,o));if(r=e.memoizedState,r!==null&&(l=r.dehydrated,l!==null))return Um(e,t,o,i,l,r,n);if(s){s=i.fallback,o=t.mode,r=e.child,l=r.sibling;var a={mode:"hidden",children:i.children};return!(o&1)&&t.child!==r?(i=t.child,i.childLanes=0,i.pendingProps=a,t.deletions=null):(i=Je(r,a),i.subtreeFlags=r.subtreeFlags&14680064),l!==null?s=Je(l,s):(s=kn(s,o,n,null),s.flags|=2),s.return=t,i.return=t,i.sibling=s,t.child=i,i=s,s=t.child,o=e.child.memoizedState,o=o===null?Bl(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=jl,i}return s=e.child,e=s.sibling,i=Je(s,{mode:"visible",children:i.children}),!(t.mode&1)&&(i.lanes=n),i.return=t,i.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function Va(e,t){return t=co({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function jr(e,t,n,i){return i!==null&&Ea(i),li(t,e.child,null,n),e=Va(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Um(e,t,n,i,r,s,o){if(n)return t.flags&256?(t.flags&=-257,i=Vo(Error(C(422))),jr(e,t,o,i)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=i.fallback,r=t.mode,i=co({mode:"visible",children:i.children},r,0,null),s=kn(s,r,o,null),s.flags|=2,i.return=t,s.return=t,i.sibling=s,t.child=i,t.mode&1&&li(t,e.child,null,o),t.child.memoizedState=Bl(o),t.memoizedState=jl,s);if(!(t.mode&1))return jr(e,t,o,null);if(r.data==="$!"){if(i=r.nextSibling&&r.nextSibling.dataset,i)var l=i.dgst;return i=l,s=Error(C(419)),i=Vo(s,i,void 0),jr(e,t,o,i)}if(l=(o&e.childLanes)!==0,Ft||l){if(i=pt,i!==null){switch(o&-o){case 4:r=2;break;case 16:r=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:r=32;break;case 536870912:r=268435456;break;default:r=0}r=r&(i.suspendedLanes|o)?0:r,r!==0&&r!==s.retryLane&&(s.retryLane=r,Oe(e,r),le(i,e,r,-1))}return Xa(),i=Vo(Error(C(421))),jr(e,t,o,i)}return r.data==="$?"?(t.flags|=128,t.child=e.child,t=r0.bind(null,e),r._reactRetry=t,null):(e=s.treeContext,Ht=Qe(r.nextSibling),Wt=t,q=!0,re=null,e!==null&&(Xt[Qt++]=Me,Xt[Qt++]=Pe,Xt[Qt++]=Cn,Me=e.id,Pe=e.overflow,Cn=t),t=Va(t,i.children),t.flags|=4096,t)}function hc(e,t,n){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),Dl(e.return,t,n)}function Wo(e,t,n,i,r){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:n,tailMode:r}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=i,s.tail=n,s.tailMode=r)}function Rh(e,t,n){var i=t.pendingProps,r=i.revealOrder,s=i.tail;if(Et(e,t,i.children,n),i=et.current,i&2)i=i&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)t:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&hc(e,n,t);else if(e.tag===19)hc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break t;for(;e.sibling===null;){if(e.return===null||e.return===t)break t;e=e.return}e.sibling.return=e.return,e=e.sibling}i&=1}if(K(et,i),!(t.mode&1))t.memoizedState=null;else switch(r){case"forwards":for(n=t.child,r=null;n!==null;)e=n.alternate,e!==null&&As(e)===null&&(r=n),n=n.sibling;n=r,n===null?(r=t.child,t.child=null):(r=n.sibling,n.sibling=null),Wo(t,!1,r,n,s);break;case"backwards":for(n=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&As(e)===null){t.child=r;break}e=r.sibling,r.sibling=n,n=r,r=e}Wo(t,!0,n,null,s);break;case"together":Wo(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function fs(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ze(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Pn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(C(153));if(t.child!==null){for(e=t.child,n=Je(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Je(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ym(e,t,n){switch(t.tag){case 3:zh(t),oi();break;case 5:lh(t);break;case 1:Nt(t.type)&&Ls(t);break;case 4:Ra(t,t.stateNode.containerInfo);break;case 10:var i=t.type._context,r=t.memoizedProps.value;K(Ds,i._currentValue),i._currentValue=r;break;case 13:if(i=t.memoizedState,i!==null)return i.dehydrated!==null?(K(et,et.current&1),t.flags|=128,null):n&t.child.childLanes?Dh(e,t,n):(K(et,et.current&1),e=ze(e,t,n),e!==null?e.sibling:null);K(et,et.current&1);break;case 19:if(i=(n&t.childLanes)!==0,e.flags&128){if(i)return Rh(e,t,n);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),K(et,et.current),i)break;return null;case 22:case 23:return t.lanes=0,Lh(e,t,n)}return ze(e,t,n)}var Fh,Hl,Ah,Nh;Fh=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Hl=function(){};Ah=function(e,t,n,i){var r=e.memoizedProps;if(r!==i){e=t.stateNode,xn(ye.current);var s=null;switch(n){case"input":r=ul(e,r),i=ul(e,i),s=[];break;case"select":r=it({},r,{value:void 0}),i=it({},i,{value:void 0}),s=[];break;case"textarea":r=dl(e,r),i=dl(e,i),s=[];break;default:typeof r.onClick!="function"&&typeof i.onClick=="function"&&(e.onclick=Es)}pl(n,i);var o;n=null;for(u in r)if(!i.hasOwnProperty(u)&&r.hasOwnProperty(u)&&r[u]!=null)if(u==="style"){var l=r[u];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Qi.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in i){var a=i[u];if(l=r!=null?r[u]:void 0,i.hasOwnProperty(u)&&a!==l&&(a!=null||l!=null))if(u==="style")if(l){for(o in l)!l.hasOwnProperty(o)||a&&a.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in a)a.hasOwnProperty(o)&&l[o]!==a[o]&&(n||(n={}),n[o]=a[o])}else n||(s||(s=[]),s.push(u,n)),n=a;else u==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,l=l?l.__html:void 0,a!=null&&l!==a&&(s=s||[]).push(u,a)):u==="children"?typeof a!="string"&&typeof a!="number"||(s=s||[]).push(u,""+a):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Qi.hasOwnProperty(u)?(a!=null&&u==="onScroll"&&Q("scroll",e),s||l===a||(s=[])):(s=s||[]).push(u,a))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}};Nh=function(e,t,n,i){n!==i&&(t.flags|=4)};function wi(e,t){if(!q)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function _t(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,i=0;if(t)for(var r=e.child;r!==null;)n|=r.lanes|r.childLanes,i|=r.subtreeFlags&14680064,i|=r.flags&14680064,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)n|=r.lanes|r.childLanes,i|=r.subtreeFlags,i|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=i,e.childLanes=n,t}function Km(e,t,n){var i=t.pendingProps;switch(Pa(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return _t(t),null;case 1:return Nt(t.type)&&Ts(),_t(t),null;case 3:return i=t.stateNode,ai(),G(At),G(St),Aa(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Nr(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,re!==null&&(Ql(re),re=null))),Hl(e,t),_t(t),null;case 5:Fa(t);var r=xn(lr.current);if(n=t.type,e!==null&&t.stateNode!=null)Ah(e,t,n,i,r),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(C(166));return _t(t),null}if(e=xn(ye.current),Nr(t)){i=t.stateNode,n=t.type;var s=t.memoizedProps;switch(i[ge]=t,i[sr]=s,e=(t.mode&1)!==0,n){case"dialog":Q("cancel",i),Q("close",i);break;case"iframe":case"object":case"embed":Q("load",i);break;case"video":case"audio":for(r=0;r<zi.length;r++)Q(zi[r],i);break;case"source":Q("error",i);break;case"img":case"image":case"link":Q("error",i),Q("load",i);break;case"details":Q("toggle",i);break;case"input":wu(i,s),Q("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!s.multiple},Q("invalid",i);break;case"textarea":bu(i,s),Q("invalid",i)}pl(n,s),r=null;for(var o in s)if(s.hasOwnProperty(o)){var l=s[o];o==="children"?typeof l=="string"?i.textContent!==l&&(s.suppressHydrationWarning!==!0&&Ar(i.textContent,l,e),r=["children",l]):typeof l=="number"&&i.textContent!==""+l&&(s.suppressHydrationWarning!==!0&&Ar(i.textContent,l,e),r=["children",""+l]):Qi.hasOwnProperty(o)&&l!=null&&o==="onScroll"&&Q("scroll",i)}switch(n){case"input":Er(i),Su(i,s,!0);break;case"textarea":Er(i),Cu(i);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(i.onclick=Es)}i=r,t.updateQueue=i,i!==null&&(t.flags|=4)}else{o=r.nodeType===9?r:r.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=cd(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof i.is=="string"?e=o.createElement(n,{is:i.is}):(e=o.createElement(n),n==="select"&&(o=e,i.multiple?o.multiple=!0:i.size&&(o.size=i.size))):e=o.createElementNS(e,n),e[ge]=t,e[sr]=i,Fh(e,t,!1,!1),t.stateNode=e;t:{switch(o=gl(n,i),n){case"dialog":Q("cancel",e),Q("close",e),r=i;break;case"iframe":case"object":case"embed":Q("load",e),r=i;break;case"video":case"audio":for(r=0;r<zi.length;r++)Q(zi[r],e);r=i;break;case"source":Q("error",e),r=i;break;case"img":case"image":case"link":Q("error",e),Q("load",e),r=i;break;case"details":Q("toggle",e),r=i;break;case"input":wu(e,i),r=ul(e,i),Q("invalid",e);break;case"option":r=i;break;case"select":e._wrapperState={wasMultiple:!!i.multiple},r=it({},i,{value:void 0}),Q("invalid",e);break;case"textarea":bu(e,i),r=dl(e,i),Q("invalid",e);break;default:r=i}pl(n,r),l=r;for(s in l)if(l.hasOwnProperty(s)){var a=l[s];s==="style"?hd(e,a):s==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&fd(e,a)):s==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&Gi(e,a):typeof a=="number"&&Gi(e,""+a):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Qi.hasOwnProperty(s)?a!=null&&s==="onScroll"&&Q("scroll",e):a!=null&&da(e,s,a,o))}switch(n){case"input":Er(e),Su(e,i,!1);break;case"textarea":Er(e),Cu(e);break;case"option":i.value!=null&&e.setAttribute("value",""+nn(i.value));break;case"select":e.multiple=!!i.multiple,s=i.value,s!=null?Zn(e,!!i.multiple,s,!1):i.defaultValue!=null&&Zn(e,!!i.multiple,i.defaultValue,!0);break;default:typeof r.onClick=="function"&&(e.onclick=Es)}switch(n){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break t;case"img":i=!0;break t;default:i=!1}}i&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return _t(t),null;case 6:if(e&&t.stateNode!=null)Nh(e,t,e.memoizedProps,i);else{if(typeof i!="string"&&t.stateNode===null)throw Error(C(166));if(n=xn(lr.current),xn(ye.current),Nr(t)){if(i=t.stateNode,n=t.memoizedProps,i[ge]=t,(s=i.nodeValue!==n)&&(e=Wt,e!==null))switch(e.tag){case 3:Ar(i.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ar(i.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else i=(n.nodeType===9?n:n.ownerDocument).createTextNode(i),i[ge]=t,t.stateNode=i}return _t(t),null;case 13:if(G(et),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(q&&Ht!==null&&t.mode&1&&!(t.flags&128))th(),oi(),t.flags|=98560,s=!1;else if(s=Nr(t),i!==null&&i.dehydrated!==null){if(e===null){if(!s)throw Error(C(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(C(317));s[ge]=t}else oi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;_t(t),s=!1}else re!==null&&(Ql(re),re=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,t.mode&1&&(e===null||et.current&1?ut===0&&(ut=3):Xa())),t.updateQueue!==null&&(t.flags|=4),_t(t),null);case 4:return ai(),Hl(e,t),e===null&&ir(t.stateNode.containerInfo),_t(t),null;case 10:return Oa(t.type._context),_t(t),null;case 17:return Nt(t.type)&&Ts(),_t(t),null;case 19:if(G(et),s=t.memoizedState,s===null)return _t(t),null;if(i=(t.flags&128)!==0,o=s.rendering,o===null)if(i)wi(s,!1);else{if(ut!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=As(e),o!==null){for(t.flags|=128,wi(s,!1),i=o.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=n,n=t.child;n!==null;)s=n,e=i,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,e=o.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return K(et,et.current&1|2),t.child}e=e.sibling}s.tail!==null&&ot()>ci&&(t.flags|=128,i=!0,wi(s,!1),t.lanes=4194304)}else{if(!i)if(e=As(o),e!==null){if(t.flags|=128,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),wi(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!q)return _t(t),null}else 2*ot()-s.renderingStartTime>ci&&n!==1073741824&&(t.flags|=128,i=!0,wi(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(n=s.last,n!==null?n.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=ot(),t.sibling=null,n=et.current,K(et,i?n&1|2:n&1),t):(_t(t),null);case 22:case 23:return Ka(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?Bt&1073741824&&(_t(t),t.subtreeFlags&6&&(t.flags|=8192)):_t(t),null;case 24:return null;case 25:return null}throw Error(C(156,t.tag))}function Xm(e,t){switch(Pa(t),t.tag){case 1:return Nt(t.type)&&Ts(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ai(),G(At),G(St),Aa(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Fa(t),null;case 13:if(G(et),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(C(340));oi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return G(et),null;case 4:return ai(),null;case 10:return Oa(t.type._context),null;case 22:case 23:return Ka(),null;case 24:return null;default:return null}}var Br=!1,wt=!1,Qm=typeof WeakSet=="function"?WeakSet:Set,T=null;function Kn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(i){rt(e,t,i)}else n.current=null}function Vl(e,t,n){try{n()}catch(i){rt(e,t,i)}}var pc=!1;function Gm(e,t){if(Cl=Cs,e=Hd(),Ca(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else t:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var r=i.anchorOffset,s=i.focusNode;i=i.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break t}var o=0,l=-1,a=-1,u=0,c=0,f=e,d=null;e:for(;;){for(var h;f!==n||r!==0&&f.nodeType!==3||(l=o+r),f!==s||i!==0&&f.nodeType!==3||(a=o+i),f.nodeType===3&&(o+=f.nodeValue.length),(h=f.firstChild)!==null;)d=f,f=h;for(;;){if(f===e)break e;if(d===n&&++u===r&&(l=o),d===s&&++c===i&&(a=o),(h=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=h}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ml={focusedElem:e,selectionRange:n},Cs=!1,T=t;T!==null;)if(t=T,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,T=e;else for(;T!==null;){t=T;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var v=m.memoizedProps,x=m.memoizedState,p=t.stateNode,g=p.getSnapshotBeforeUpdate(t.elementType===t.type?v:ne(t.type,v),x);p.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(C(163))}}catch(_){rt(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,T=e;break}T=t.return}return m=pc,pc=!1,m}function Vi(e,t,n){var i=t.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var r=i=i.next;do{if((r.tag&e)===e){var s=r.destroy;r.destroy=void 0,s!==void 0&&Vl(t,n,s)}r=r.next}while(r!==i)}}function ao(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var i=n.create;n.destroy=i()}n=n.next}while(n!==t)}}function Wl(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Ih(e){var t=e.alternate;t!==null&&(e.alternate=null,Ih(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ge],delete t[sr],delete t[Tl],delete t[zm],delete t[Dm])),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 jh(e){return e.tag===5||e.tag===3||e.tag===4}function gc(e){t:for(;;){for(;e.sibling===null;){if(e.return===null||jh(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 t;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function $l(e,t,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Es));else if(i!==4&&(e=e.child,e!==null))for($l(e,t,n),e=e.sibling;e!==null;)$l(e,t,n),e=e.sibling}function Ul(e,t,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(i!==4&&(e=e.child,e!==null))for(Ul(e,t,n),e=e.sibling;e!==null;)Ul(e,t,n),e=e.sibling}var mt=null,ie=!1;function Re(e,t,n){for(n=n.child;n!==null;)Bh(e,t,n),n=n.sibling}function Bh(e,t,n){if(me&&typeof me.onCommitFiberUnmount=="function")try{me.onCommitFiberUnmount(to,n)}catch{}switch(n.tag){case 5:wt||Kn(n,t);case 6:var i=mt,r=ie;mt=null,Re(e,t,n),mt=i,ie=r,mt!==null&&(ie?(e=mt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):mt.removeChild(n.stateNode));break;case 18:mt!==null&&(ie?(e=mt,n=n.stateNode,e.nodeType===8?Ao(e.parentNode,n):e.nodeType===1&&Ao(e,n),tr(e)):Ao(mt,n.stateNode));break;case 4:i=mt,r=ie,mt=n.stateNode.containerInfo,ie=!0,Re(e,t,n),mt=i,ie=r;break;case 0:case 11:case 14:case 15:if(!wt&&(i=n.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){r=i=i.next;do{var s=r,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&Vl(n,t,o),r=r.next}while(r!==i)}Re(e,t,n);break;case 1:if(!wt&&(Kn(n,t),i=n.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=n.memoizedProps,i.state=n.memoizedState,i.componentWillUnmount()}catch(l){rt(n,t,l)}Re(e,t,n);break;case 21:Re(e,t,n);break;case 22:n.mode&1?(wt=(i=wt)||n.memoizedState!==null,Re(e,t,n),wt=i):Re(e,t,n);break;default:Re(e,t,n)}}function mc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Qm),t.forEach(function(i){var r=s0.bind(null,e,i);n.has(i)||(n.add(i),i.then(r,r))})}}function ee(e,t){var n=t.deletions;if(n!==null)for(var i=0;i<n.length;i++){var r=n[i];try{var s=e,o=t,l=o;t:for(;l!==null;){switch(l.tag){case 5:mt=l.stateNode,ie=!1;break t;case 3:mt=l.stateNode.containerInfo,ie=!0;break t;case 4:mt=l.stateNode.containerInfo,ie=!0;break t}l=l.return}if(mt===null)throw Error(C(160));Bh(s,o,r),mt=null,ie=!1;var a=r.alternate;a!==null&&(a.return=null),r.return=null}catch(u){rt(r,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Hh(t,e),t=t.sibling}function Hh(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ee(t,e),ce(e),i&4){try{Vi(3,e,e.return),ao(3,e)}catch(v){rt(e,e.return,v)}try{Vi(5,e,e.return)}catch(v){rt(e,e.return,v)}}break;case 1:ee(t,e),ce(e),i&512&&n!==null&&Kn(n,n.return);break;case 5:if(ee(t,e),ce(e),i&512&&n!==null&&Kn(n,n.return),e.flags&32){var r=e.stateNode;try{Gi(r,"")}catch(v){rt(e,e.return,v)}}if(i&4&&(r=e.stateNode,r!=null)){var s=e.memoizedProps,o=n!==null?n.memoizedProps:s,l=e.type,a=e.updateQueue;if(e.updateQueue=null,a!==null)try{l==="input"&&s.type==="radio"&&s.name!=null&&ad(r,s),gl(l,o);var u=gl(l,s);for(o=0;o<a.length;o+=2){var c=a[o],f=a[o+1];c==="style"?hd(r,f):c==="dangerouslySetInnerHTML"?fd(r,f):c==="children"?Gi(r,f):da(r,c,f,u)}switch(l){case"input":cl(r,s);break;case"textarea":ud(r,s);break;case"select":var d=r._wrapperState.wasMultiple;r._wrapperState.wasMultiple=!!s.multiple;var h=s.value;h!=null?Zn(r,!!s.multiple,h,!1):d!==!!s.multiple&&(s.defaultValue!=null?Zn(r,!!s.multiple,s.defaultValue,!0):Zn(r,!!s.multiple,s.multiple?[]:"",!1))}r[sr]=s}catch(v){rt(e,e.return,v)}}break;case 6:if(ee(t,e),ce(e),i&4){if(e.stateNode===null)throw Error(C(162));r=e.stateNode,s=e.memoizedProps;try{r.nodeValue=s}catch(v){rt(e,e.return,v)}}break;case 3:if(ee(t,e),ce(e),i&4&&n!==null&&n.memoizedState.isDehydrated)try{tr(t.containerInfo)}catch(v){rt(e,e.return,v)}break;case 4:ee(t,e),ce(e);break;case 13:ee(t,e),ce(e),r=e.child,r.flags&8192&&(s=r.memoizedState!==null,r.stateNode.isHidden=s,!s||r.alternate!==null&&r.alternate.memoizedState!==null||(Ua=ot())),i&4&&mc(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(wt=(u=wt)||c,ee(t,e),wt=u):ee(t,e),ce(e),i&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(T=e,c=e.child;c!==null;){for(f=T=c;T!==null;){switch(d=T,h=d.child,d.tag){case 0:case 11:case 14:case 15:Vi(4,d,d.return);break;case 1:Kn(d,d.return);var m=d.stateNode;if(typeof m.componentWillUnmount=="function"){i=d,n=d.return;try{t=i,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(v){rt(i,n,v)}}break;case 5:Kn(d,d.return);break;case 22:if(d.memoizedState!==null){vc(f);continue}}h!==null?(h.return=d,T=h):vc(f)}c=c.sibling}t:for(c=null,f=e;;){if(f.tag===5){if(c===null){c=f;try{r=f.stateNode,u?(s=r.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(l=f.stateNode,a=f.memoizedProps.style,o=a!=null&&a.hasOwnProperty("display")?a.display:null,l.style.display=dd("display",o))}catch(v){rt(e,e.return,v)}}}else if(f.tag===6){if(c===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(v){rt(e,e.return,v)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break t;for(;f.sibling===null;){if(f.return===null||f.return===e)break t;c===f&&(c=null),f=f.return}c===f&&(c=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:ee(t,e),ce(e),i&4&&mc(e);break;case 21:break;default:ee(t,e),ce(e)}}function ce(e){var t=e.flags;if(t&2){try{t:{for(var n=e.return;n!==null;){if(jh(n)){var i=n;break t}n=n.return}throw Error(C(160))}switch(i.tag){case 5:var r=i.stateNode;i.flags&32&&(Gi(r,""),i.flags&=-33);var s=gc(e);Ul(e,s,r);break;case 3:case 4:var o=i.stateNode.containerInfo,l=gc(e);$l(e,l,o);break;default:throw Error(C(161))}}catch(a){rt(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Zm(e,t,n){T=e,Vh(e)}function Vh(e,t,n){for(var i=(e.mode&1)!==0;T!==null;){var r=T,s=r.child;if(r.tag===22&&i){var o=r.memoizedState!==null||Br;if(!o){var l=r.alternate,a=l!==null&&l.memoizedState!==null||wt;l=Br;var u=wt;if(Br=o,(wt=a)&&!u)for(T=r;T!==null;)o=T,a=o.child,o.tag===22&&o.memoizedState!==null?xc(r):a!==null?(a.return=o,T=a):xc(r);for(;s!==null;)T=s,Vh(s),s=s.sibling;T=r,Br=l,wt=u}yc(e)}else r.subtreeFlags&8772&&s!==null?(s.return=r,T=s):yc(e)}}function yc(e){for(;T!==null;){var t=T;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:wt||ao(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!wt)if(n===null)i.componentDidMount();else{var r=t.elementType===t.type?n.memoizedProps:ne(t.type,n.memoizedProps);i.componentDidUpdate(r,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&tc(t,s,i);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}tc(t,o,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var a=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break;case"img":a.src&&(n.src=a.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var f=c.dehydrated;f!==null&&tr(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(C(163))}wt||t.flags&512&&Wl(t)}catch(d){rt(t,t.return,d)}}if(t===e){T=null;break}if(n=t.sibling,n!==null){n.return=t.return,T=n;break}T=t.return}}function vc(e){for(;T!==null;){var t=T;if(t===e){T=null;break}var n=t.sibling;if(n!==null){n.return=t.return,T=n;break}T=t.return}}function xc(e){for(;T!==null;){var t=T;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{ao(4,t)}catch(a){rt(t,n,a)}break;case 1:var i=t.stateNode;if(typeof i.componentDidMount=="function"){var r=t.return;try{i.componentDidMount()}catch(a){rt(t,r,a)}}var s=t.return;try{Wl(t)}catch(a){rt(t,s,a)}break;case 5:var o=t.return;try{Wl(t)}catch(a){rt(t,o,a)}}}catch(a){rt(t,t.return,a)}if(t===e){T=null;break}var l=t.sibling;if(l!==null){l.return=t.return,T=l;break}T=t.return}}var qm=Math.ceil,js=De.ReactCurrentDispatcher,Wa=De.ReactCurrentOwner,qt=De.ReactCurrentBatchConfig,N=0,pt=null,lt=null,yt=0,Bt=0,Xn=an(0),ut=0,fr=null,Pn=0,uo=0,$a=0,Wi=null,Dt=null,Ua=0,ci=1/0,Se=null,Bs=!1,Yl=null,Ze=null,Hr=!1,He=null,Hs=0,$i=0,Kl=null,ds=-1,hs=0;function Tt(){return N&6?ot():ds!==-1?ds:ds=ot()}function qe(e){return e.mode&1?N&2&&yt!==0?yt&-yt:Fm.transition!==null?(hs===0&&(hs=Cd()),hs):(e=H,e!==0||(e=window.event,e=e===void 0?16:zd(e.type)),e):1}function le(e,t,n,i){if(50<$i)throw $i=0,Kl=null,Error(C(185));xr(e,n,i),(!(N&2)||e!==pt)&&(e===pt&&(!(N&2)&&(uo|=n),ut===4&&je(e,yt)),It(e,i),n===1&&N===0&&!(t.mode&1)&&(ci=ot()+500,so&&un()))}function It(e,t){var n=e.callbackNode;Fg(e,t);var i=bs(e,e===pt?yt:0);if(i===0)n!==null&&Eu(n),e.callbackNode=null,e.callbackPriority=0;else if(t=i&-i,e.callbackPriority!==t){if(n!=null&&Eu(n),t===1)e.tag===0?Rm(_c.bind(null,e)):Zd(_c.bind(null,e)),Lm(function(){!(N&6)&&un()}),n=null;else{switch(Md(i)){case 1:n=ya;break;case 4:n=Sd;break;case 16:n=Ss;break;case 536870912:n=bd;break;default:n=Ss}n=Gh(n,Wh.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Wh(e,t){if(ds=-1,hs=0,N&6)throw Error(C(327));var n=e.callbackNode;if(ni()&&e.callbackNode!==n)return null;var i=bs(e,e===pt?yt:0);if(i===0)return null;if(i&30||i&e.expiredLanes||t)t=Vs(e,i);else{t=i;var r=N;N|=2;var s=Uh();(pt!==e||yt!==t)&&(Se=null,ci=ot()+500,_n(e,t));do try{e0();break}catch(l){$h(e,l)}while(1);La(),js.current=s,N=r,lt!==null?t=0:(pt=null,yt=0,t=ut)}if(t!==0){if(t===2&&(r=_l(e),r!==0&&(i=r,t=Xl(e,r))),t===1)throw n=fr,_n(e,0),je(e,i),It(e,ot()),n;if(t===6)je(e,i);else{if(r=e.current.alternate,!(i&30)&&!Jm(r)&&(t=Vs(e,i),t===2&&(s=_l(e),s!==0&&(i=s,t=Xl(e,s))),t===1))throw n=fr,_n(e,0),je(e,i),It(e,ot()),n;switch(e.finishedWork=r,e.finishedLanes=i,t){case 0:case 1:throw Error(C(345));case 2:gn(e,Dt,Se);break;case 3:if(je(e,i),(i&130023424)===i&&(t=Ua+500-ot(),10<t)){if(bs(e,0)!==0)break;if(r=e.suspendedLanes,(r&i)!==i){Tt(),e.pingedLanes|=e.suspendedLanes&r;break}e.timeoutHandle=El(gn.bind(null,e,Dt,Se),t);break}gn(e,Dt,Se);break;case 4:if(je(e,i),(i&4194240)===i)break;for(t=e.eventTimes,r=-1;0<i;){var o=31-oe(i);s=1<<o,o=t[o],o>r&&(r=o),i&=~s}if(i=r,i=ot()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*qm(i/1960))-i,10<i){e.timeoutHandle=El(gn.bind(null,e,Dt,Se),i);break}gn(e,Dt,Se);break;case 5:gn(e,Dt,Se);break;default:throw Error(C(329))}}}return It(e,ot()),e.callbackNode===n?Wh.bind(null,e):null}function Xl(e,t){var n=Wi;return e.current.memoizedState.isDehydrated&&(_n(e,t).flags|=256),e=Vs(e,t),e!==2&&(t=Dt,Dt=n,t!==null&&Ql(t)),e}function Ql(e){Dt===null?Dt=e:Dt.push.apply(Dt,e)}function Jm(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var i=0;i<n.length;i++){var r=n[i],s=r.getSnapshot;r=r.value;try{if(!ae(s(),r))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function je(e,t){for(t&=~$a,t&=~uo,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-oe(t),i=1<<n;e[n]=-1,t&=~i}}function _c(e){if(N&6)throw Error(C(327));ni();var t=bs(e,0);if(!(t&1))return It(e,ot()),null;var n=Vs(e,t);if(e.tag!==0&&n===2){var i=_l(e);i!==0&&(t=i,n=Xl(e,i))}if(n===1)throw n=fr,_n(e,0),je(e,t),It(e,ot()),n;if(n===6)throw Error(C(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,gn(e,Dt,Se),It(e,ot()),null}function Ya(e,t){var n=N;N|=1;try{return e(t)}finally{N=n,N===0&&(ci=ot()+500,so&&un())}}function En(e){He!==null&&He.tag===0&&!(N&6)&&ni();var t=N;N|=1;var n=qt.transition,i=H;try{if(qt.transition=null,H=1,e)return e()}finally{H=i,qt.transition=n,N=t,!(N&6)&&un()}}function Ka(){Bt=Xn.current,G(Xn)}function _n(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Tm(n)),lt!==null)for(n=lt.return;n!==null;){var i=n;switch(Pa(i),i.tag){case 1:i=i.type.childContextTypes,i!=null&&Ts();break;case 3:ai(),G(At),G(St),Aa();break;case 5:Fa(i);break;case 4:ai();break;case 13:G(et);break;case 19:G(et);break;case 10:Oa(i.type._context);break;case 22:case 23:Ka()}n=n.return}if(pt=e,lt=e=Je(e.current,null),yt=Bt=t,ut=0,fr=null,$a=uo=Pn=0,Dt=Wi=null,vn!==null){for(t=0;t<vn.length;t++)if(n=vn[t],i=n.interleaved,i!==null){n.interleaved=null;var r=i.next,s=n.pending;if(s!==null){var o=s.next;s.next=r,i.next=o}n.pending=i}vn=null}return e}function $h(e,t){do{var n=lt;try{if(La(),us.current=Is,Ns){for(var i=nt.memoizedState;i!==null;){var r=i.queue;r!==null&&(r.pending=null),i=i.next}Ns=!1}if(Mn=0,dt=at=nt=null,Hi=!1,ar=0,Wa.current=null,n===null||n.return===null){ut=1,fr=t,lt=null;break}t:{var s=e,o=n.return,l=n,a=t;if(t=yt,l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){var u=a,c=l,f=c.tag;if(!(c.mode&1)&&(f===0||f===11||f===15)){var d=c.alternate;d?(c.updateQueue=d.updateQueue,c.memoizedState=d.memoizedState,c.lanes=d.lanes):(c.updateQueue=null,c.memoizedState=null)}var h=lc(o);if(h!==null){h.flags&=-257,ac(h,o,l,s,t),h.mode&1&&oc(s,u,t),t=h,a=u;var m=t.updateQueue;if(m===null){var v=new Set;v.add(a),t.updateQueue=v}else m.add(a);break t}else{if(!(t&1)){oc(s,u,t),Xa();break t}a=Error(C(426))}}else if(q&&l.mode&1){var x=lc(o);if(x!==null){!(x.flags&65536)&&(x.flags|=256),ac(x,o,l,s,t),Ea(ui(a,l));break t}}s=a=ui(a,l),ut!==4&&(ut=2),Wi===null?Wi=[s]:Wi.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var p=Ph(s,a,t);Ju(s,p);break t;case 1:l=a;var g=s.type,y=s.stateNode;if(!(s.flags&128)&&(typeof g.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(Ze===null||!Ze.has(y)))){s.flags|=65536,t&=-t,s.lanes|=t;var _=Eh(s,l,t);Ju(s,_);break t}}s=s.return}while(s!==null)}Kh(n)}catch(k){t=k,lt===n&&n!==null&&(lt=n=n.return);continue}break}while(1)}function Uh(){var e=js.current;return js.current=Is,e===null?Is:e}function Xa(){(ut===0||ut===3||ut===2)&&(ut=4),pt===null||!(Pn&268435455)&&!(uo&268435455)||je(pt,yt)}function Vs(e,t){var n=N;N|=2;var i=Uh();(pt!==e||yt!==t)&&(Se=null,_n(e,t));do try{t0();break}catch(r){$h(e,r)}while(1);if(La(),N=n,js.current=i,lt!==null)throw Error(C(261));return pt=null,yt=0,ut}function t0(){for(;lt!==null;)Yh(lt)}function e0(){for(;lt!==null&&!Mg();)Yh(lt)}function Yh(e){var t=Qh(e.alternate,e,Bt);e.memoizedProps=e.pendingProps,t===null?Kh(e):lt=t,Wa.current=null}function Kh(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Xm(n,t),n!==null){n.flags&=32767,lt=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ut=6,lt=null;return}}else if(n=Km(n,t,Bt),n!==null){lt=n;return}if(t=t.sibling,t!==null){lt=t;return}lt=t=e}while(t!==null);ut===0&&(ut=5)}function gn(e,t,n){var i=H,r=qt.transition;try{qt.transition=null,H=1,n0(e,t,n,i)}finally{qt.transition=r,H=i}return null}function n0(e,t,n,i){do ni();while(He!==null);if(N&6)throw Error(C(327));n=e.finishedWork;var r=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(C(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(Ag(e,s),e===pt&&(lt=pt=null,yt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Hr||(Hr=!0,Gh(Ss,function(){return ni(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=qt.transition,qt.transition=null;var o=H;H=1;var l=N;N|=4,Wa.current=null,Gm(e,n),Hh(n,e),wm(Ml),Cs=!!Cl,Ml=Cl=null,e.current=n,Zm(n),Pg(),N=l,H=o,qt.transition=s}else e.current=n;if(Hr&&(Hr=!1,He=e,Hs=r),s=e.pendingLanes,s===0&&(Ze=null),Lg(n.stateNode),It(e,ot()),t!==null)for(i=e.onRecoverableError,n=0;n<t.length;n++)r=t[n],i(r.value,{componentStack:r.stack,digest:r.digest});if(Bs)throw Bs=!1,e=Yl,Yl=null,e;return Hs&1&&e.tag!==0&&ni(),s=e.pendingLanes,s&1?e===Kl?$i++:($i=0,Kl=e):$i=0,un(),null}function ni(){if(He!==null){var e=Md(Hs),t=qt.transition,n=H;try{if(qt.transition=null,H=16>e?16:e,He===null)var i=!1;else{if(e=He,He=null,Hs=0,N&6)throw Error(C(331));var r=N;for(N|=4,T=e.current;T!==null;){var s=T,o=s.child;if(T.flags&16){var l=s.deletions;if(l!==null){for(var a=0;a<l.length;a++){var u=l[a];for(T=u;T!==null;){var c=T;switch(c.tag){case 0:case 11:case 15:Vi(8,c,s)}var f=c.child;if(f!==null)f.return=c,T=f;else for(;T!==null;){c=T;var d=c.sibling,h=c.return;if(Ih(c),c===u){T=null;break}if(d!==null){d.return=h,T=d;break}T=h}}}var m=s.alternate;if(m!==null){var v=m.child;if(v!==null){m.child=null;do{var x=v.sibling;v.sibling=null,v=x}while(v!==null)}}T=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,T=o;else t:for(;T!==null;){if(s=T,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Vi(9,s,s.return)}var p=s.sibling;if(p!==null){p.return=s.return,T=p;break t}T=s.return}}var g=e.current;for(T=g;T!==null;){o=T;var y=o.child;if(o.subtreeFlags&2064&&y!==null)y.return=o,T=y;else t:for(o=g;T!==null;){if(l=T,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:ao(9,l)}}catch(k){rt(l,l.return,k)}if(l===o){T=null;break t}var _=l.sibling;if(_!==null){_.return=l.return,T=_;break t}T=l.return}}if(N=r,un(),me&&typeof me.onPostCommitFiberRoot=="function")try{me.onPostCommitFiberRoot(to,e)}catch{}i=!0}return i}finally{H=n,qt.transition=t}}return!1}function kc(e,t,n){t=ui(n,t),t=Ph(e,t,1),e=Ge(e,t,1),t=Tt(),e!==null&&(xr(e,1,t),It(e,t))}function rt(e,t,n){if(e.tag===3)kc(e,e,n);else for(;t!==null;){if(t.tag===3){kc(t,e,n);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(Ze===null||!Ze.has(i))){e=ui(n,e),e=Eh(t,e,1),t=Ge(t,e,1),e=Tt(),t!==null&&(xr(t,1,e),It(t,e));break}}t=t.return}}function i0(e,t,n){var i=e.pingCache;i!==null&&i.delete(t),t=Tt(),e.pingedLanes|=e.suspendedLanes&n,pt===e&&(yt&n)===n&&(ut===4||ut===3&&(yt&130023424)===yt&&500>ot()-Ua?_n(e,0):$a|=n),It(e,t)}function Xh(e,t){t===0&&(e.mode&1?(t=Or,Or<<=1,!(Or&130023424)&&(Or=4194304)):t=1);var n=Tt();e=Oe(e,t),e!==null&&(xr(e,t,n),It(e,n))}function r0(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Xh(e,n)}function s0(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,r=e.memoizedState;r!==null&&(n=r.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(C(314))}i!==null&&i.delete(t),Xh(e,n)}var Qh;Qh=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||At.current)Ft=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ft=!1,Ym(e,t,n);Ft=!!(e.flags&131072)}else Ft=!1,q&&t.flags&1048576&&qd(t,zs,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;fs(e,t),e=t.pendingProps;var r=si(t,St.current);ei(t,n),r=Ia(null,t,i,e,r,n);var s=ja();return t.flags|=1,typeof r=="object"&&r!==null&&typeof r.render=="function"&&r.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Nt(i)?(s=!0,Ls(t)):s=!1,t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,Da(t),r.updater=oo,t.stateNode=r,r._reactInternals=t,Fl(t,i,e,n),t=Il(null,t,i,!0,s,n)):(t.tag=0,q&&s&&Ma(t),Et(null,t,r,n),t=t.child),t;case 16:i=t.elementType;t:{switch(fs(e,t),e=t.pendingProps,r=i._init,i=r(i._payload),t.type=i,r=t.tag=l0(i),e=ne(i,e),r){case 0:t=Nl(null,t,i,e,n);break t;case 1:t=fc(null,t,i,e,n);break t;case 11:t=uc(null,t,i,e,n);break t;case 14:t=cc(null,t,i,ne(i.type,e),n);break t}throw Error(C(306,i,""))}return t;case 0:return i=t.type,r=t.pendingProps,r=t.elementType===i?r:ne(i,r),Nl(e,t,i,r,n);case 1:return i=t.type,r=t.pendingProps,r=t.elementType===i?r:ne(i,r),fc(e,t,i,r,n);case 3:t:{if(zh(t),e===null)throw Error(C(387));i=t.pendingProps,s=t.memoizedState,r=s.element,nh(e,t),Fs(t,i,null,n);var o=t.memoizedState;if(i=o.element,s.isDehydrated)if(s={element:i,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){r=ui(Error(C(423)),t),t=dc(e,t,i,n,r);break t}else if(i!==r){r=ui(Error(C(424)),t),t=dc(e,t,i,n,r);break t}else for(Ht=Qe(t.stateNode.containerInfo.firstChild),Wt=t,q=!0,re=null,n=oh(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(oi(),i===r){t=ze(e,t,n);break t}Et(e,t,i,n)}t=t.child}return t;case 5:return lh(t),e===null&&zl(t),i=t.type,r=t.pendingProps,s=e!==null?e.memoizedProps:null,o=r.children,Pl(i,r)?o=null:s!==null&&Pl(i,s)&&(t.flags|=32),Oh(e,t),Et(e,t,o,n),t.child;case 6:return e===null&&zl(t),null;case 13:return Dh(e,t,n);case 4:return Ra(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=li(t,null,i,n):Et(e,t,i,n),t.child;case 11:return i=t.type,r=t.pendingProps,r=t.elementType===i?r:ne(i,r),uc(e,t,i,r,n);case 7:return Et(e,t,t.pendingProps,n),t.child;case 8:return Et(e,t,t.pendingProps.children,n),t.child;case 12:return Et(e,t,t.pendingProps.children,n),t.child;case 10:t:{if(i=t.type._context,r=t.pendingProps,s=t.memoizedProps,o=r.value,K(Ds,i._currentValue),i._currentValue=o,s!==null)if(ae(s.value,o)){if(s.children===r.children&&!At.current){t=ze(e,t,n);break t}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var l=s.dependencies;if(l!==null){o=s.child;for(var a=l.firstContext;a!==null;){if(a.context===i){if(s.tag===1){a=Ee(-1,n&-n),a.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),Dl(s.return,n,t),l.lanes|=n;break}a=a.next}}else if(s.tag===10)o=s.type===t.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(C(341));o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),Dl(o,n,t),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}Et(e,t,r.children,n),t=t.child}return t;case 9:return r=t.type,i=t.pendingProps.children,ei(t,n),r=Jt(r),i=i(r),t.flags|=1,Et(e,t,i,n),t.child;case 14:return i=t.type,r=ne(i,t.pendingProps),r=ne(i.type,r),cc(e,t,i,r,n);case 15:return Th(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,r=t.pendingProps,r=t.elementType===i?r:ne(i,r),fs(e,t),t.tag=1,Nt(i)?(e=!0,Ls(t)):e=!1,ei(t,n),rh(t,i,r),Fl(t,i,r,n),Il(null,t,i,!0,e,n);case 19:return Rh(e,t,n);case 22:return Lh(e,t,n)}throw Error(C(156,t.tag))};function Gh(e,t){return wd(e,t)}function o0(e,t,n,i){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Gt(e,t,n,i){return new o0(e,t,n,i)}function Qa(e){return e=e.prototype,!(!e||!e.isReactComponent)}function l0(e){if(typeof e=="function")return Qa(e)?1:0;if(e!=null){if(e=e.$$typeof,e===pa)return 11;if(e===ga)return 14}return 2}function Je(e,t){var n=e.alternate;return n===null?(n=Gt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ps(e,t,n,i,r,s){var o=2;if(i=e,typeof e=="function")Qa(e)&&(o=1);else if(typeof e=="string")o=5;else t:switch(e){case In:return kn(n.children,r,s,t);case ha:o=8,r|=8;break;case sl:return e=Gt(12,n,t,r|2),e.elementType=sl,e.lanes=s,e;case ol:return e=Gt(13,n,t,r),e.elementType=ol,e.lanes=s,e;case ll:return e=Gt(19,n,t,r),e.elementType=ll,e.lanes=s,e;case sd:return co(n,r,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case id:o=10;break t;case rd:o=9;break t;case pa:o=11;break t;case ga:o=14;break t;case Ae:o=16,i=null;break t}throw Error(C(130,e==null?e:typeof e,""))}return t=Gt(o,n,t,r),t.elementType=e,t.type=i,t.lanes=s,t}function kn(e,t,n,i){return e=Gt(7,e,i,t),e.lanes=n,e}function co(e,t,n,i){return e=Gt(22,e,i,t),e.elementType=sd,e.lanes=n,e.stateNode={isHidden:!1},e}function $o(e,t,n){return e=Gt(6,e,null,t),e.lanes=n,e}function Uo(e,t,n){return t=Gt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function a0(e,t,n,i,r){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=Co(0),this.expirationTimes=Co(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Co(0),this.identifierPrefix=i,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function Ga(e,t,n,i,r,s,o,l,a){return e=new a0(e,t,n,l,a),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Gt(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:i,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Da(s),e}function u0(e,t,n){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Nn,key:i==null?null:""+i,children:e,containerInfo:t,implementation:n}}function Zh(e){if(!e)return rn;e=e._reactInternals;t:{if(zn(e)!==e||e.tag!==1)throw Error(C(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break t;case 1:if(Nt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break t}}t=t.return}while(t!==null);throw Error(C(171))}if(e.tag===1){var n=e.type;if(Nt(n))return Gd(e,n,t)}return t}function qh(e,t,n,i,r,s,o,l,a){return e=Ga(n,i,!0,e,r,s,o,l,a),e.context=Zh(null),n=e.current,i=Tt(),r=qe(n),s=Ee(i,r),s.callback=t??null,Ge(n,s,r),e.current.lanes=r,xr(e,r,i),It(e,i),e}function fo(e,t,n,i){var r=t.current,s=Tt(),o=qe(r);return n=Zh(n),t.context===null?t.context=n:t.pendingContext=n,t=Ee(s,o),t.payload={element:e},i=i===void 0?null:i,i!==null&&(t.callback=i),e=Ge(r,t,o),e!==null&&(le(e,r,o,s),as(e,r,o)),o}function Ws(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function wc(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Za(e,t){wc(e,t),(e=e.alternate)&&wc(e,t)}function c0(){return null}var Jh=typeof reportError=="function"?reportError:function(e){console.error(e)};function qa(e){this._internalRoot=e}ho.prototype.render=qa.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(C(409));fo(e,t,null,null)};ho.prototype.unmount=qa.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;En(function(){fo(null,e,null,null)}),t[Le]=null}};function ho(e){this._internalRoot=e}ho.prototype.unstable_scheduleHydration=function(e){if(e){var t=Td();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ie.length&&t!==0&&t<Ie[n].priority;n++);Ie.splice(n,0,e),n===0&&Od(e)}};function Ja(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function po(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Sc(){}function f0(e,t,n,i,r){if(r){if(typeof i=="function"){var s=i;i=function(){var u=Ws(o);s.call(u)}}var o=qh(t,i,e,0,null,!1,!1,"",Sc);return e._reactRootContainer=o,e[Le]=o.current,ir(e.nodeType===8?e.parentNode:e),En(),o}for(;r=e.lastChild;)e.removeChild(r);if(typeof i=="function"){var l=i;i=function(){var u=Ws(a);l.call(u)}}var a=Ga(e,0,!1,null,null,!1,!1,"",Sc);return e._reactRootContainer=a,e[Le]=a.current,ir(e.nodeType===8?e.parentNode:e),En(function(){fo(t,a,n,i)}),a}function go(e,t,n,i,r){var s=n._reactRootContainer;if(s){var o=s;if(typeof r=="function"){var l=r;r=function(){var a=Ws(o);l.call(a)}}fo(t,o,e,r)}else o=f0(n,t,e,r,i);return Ws(o)}Pd=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Oi(t.pendingLanes);n!==0&&(va(t,n|1),It(t,ot()),!(N&6)&&(ci=ot()+500,un()))}break;case 13:En(function(){var i=Oe(e,1);if(i!==null){var r=Tt();le(i,e,1,r)}}),Za(e,1)}};xa=function(e){if(e.tag===13){var t=Oe(e,134217728);if(t!==null){var n=Tt();le(t,e,134217728,n)}Za(e,134217728)}};Ed=function(e){if(e.tag===13){var t=qe(e),n=Oe(e,t);if(n!==null){var i=Tt();le(n,e,t,i)}Za(e,t)}};Td=function(){return H};Ld=function(e,t){var n=H;try{return H=e,t()}finally{H=n}};yl=function(e,t,n){switch(t){case"input":if(cl(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var r=ro(i);if(!r)throw Error(C(90));ld(i),cl(i,r)}}}break;case"textarea":ud(e,n);break;case"select":t=n.value,t!=null&&Zn(e,!!n.multiple,t,!1)}};md=Ya;yd=En;var d0={usingClientEntryPoint:!1,Events:[kr,Vn,ro,pd,gd,Ya]},Si={findFiberByHostInstance:yn,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},h0={bundleType:Si.bundleType,version:Si.version,rendererPackageName:Si.rendererPackageName,rendererConfig:Si.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:De.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=_d(e),e===null?null:e.stateNode},findFiberByHostInstance:Si.findFiberByHostInstance||c0,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Vr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Vr.isDisabled&&Vr.supportsFiber)try{to=Vr.inject(h0),me=Vr}catch{}}Ut.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=d0;Ut.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ja(t))throw Error(C(200));return u0(e,t,null,n)};Ut.createRoot=function(e,t){if(!Ja(e))throw Error(C(299));var n=!1,i="",r=Jh;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(r=t.onRecoverableError)),t=Ga(e,1,!1,null,null,n,!1,i,r),e[Le]=t.current,ir(e.nodeType===8?e.parentNode:e),new qa(t)};Ut.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(C(188)):(e=Object.keys(e).join(","),Error(C(268,e)));return e=_d(t),e=e===null?null:e.stateNode,e};Ut.flushSync=function(e){return En(e)};Ut.hydrate=function(e,t,n){if(!po(t))throw Error(C(200));return go(null,e,t,!0,n)};Ut.hydrateRoot=function(e,t,n){if(!Ja(e))throw Error(C(405));var i=n!=null&&n.hydratedSources||null,r=!1,s="",o=Jh;if(n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=qh(t,null,e,1,n??null,r,!1,s,o),e[Le]=t.current,ir(e),i)for(e=0;e<i.length;e++)n=i[e],r=n._getVersion,r=r(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,r]:t.mutableSourceEagerHydrationData.push(n,r);return new ho(t)};Ut.render=function(e,t,n){if(!po(t))throw Error(C(200));return go(null,e,t,!1,n)};Ut.unmountComponentAtNode=function(e){if(!po(e))throw Error(C(40));return e._reactRootContainer?(En(function(){go(null,null,e,!1,function(){e._reactRootContainer=null,e[Le]=null})}),!0):!1};Ut.unstable_batchedUpdates=Ya;Ut.unstable_renderSubtreeIntoContainer=function(e,t,n,i){if(!po(n))throw Error(C(200));if(e==null||e._reactInternals===void 0)throw Error(C(38));return go(e,t,n,!1,i)};Ut.version="18.2.0-next-9e3b772b8-20220608";function tp(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(tp)}catch(e){console.error(e)}}tp(),qf.exports=Ut;var p0=qf.exports,bc=p0;il.createRoot=bc.createRoot,il.hydrateRoot=bc.hydrateRoot;const Cc=["bg-purple-300","bg-green-300","bg-yellow-300","bg-red-300","bg-blue-300"];function g0({text:e,position:t,margin:n}){const i=e.split(`
`).map((r,s,o)=>O.jsxs(W.Fragment,{children:[r,s!==o.length-1&&O.jsx("br",{})]},s));return O.jsx("span",{style:{marginLeft:n},className:`leading-5 ${i.length===1?"inline-block ":""}${Cc[t%Cc.length]}`,children:i})}/*!
 * @kurkle/color v0.3.2
 * https://github.com/kurkle/color#readme
 * (c) 2023 Jukka Kurkela
 * Released under the MIT License
 */function Sr(e){return e+.5|0}const Ve=(e,t,n)=>Math.max(Math.min(e,n),t);function Di(e){return Ve(Sr(e*2.55),0,255)}function tn(e){return Ve(Sr(e*255),0,255)}function Ce(e){return Ve(Sr(e/2.55)/100,0,1)}function Mc(e){return Ve(Sr(e*100),0,100)}const Kt={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Gl=[..."0123456789ABCDEF"],m0=e=>Gl[e&15],y0=e=>Gl[(e&240)>>4]+Gl[e&15],Wr=e=>(e&240)>>4===(e&15),v0=e=>Wr(e.r)&&Wr(e.g)&&Wr(e.b)&&Wr(e.a);function x0(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&Kt[e[1]]*17,g:255&Kt[e[2]]*17,b:255&Kt[e[3]]*17,a:t===5?Kt[e[4]]*17:255}:(t===7||t===9)&&(n={r:Kt[e[1]]<<4|Kt[e[2]],g:Kt[e[3]]<<4|Kt[e[4]],b:Kt[e[5]]<<4|Kt[e[6]],a:t===9?Kt[e[7]]<<4|Kt[e[8]]:255})),n}const _0=(e,t)=>e<255?t(e):"";function k0(e){var t=v0(e)?m0:y0;return e?"#"+t(e.r)+t(e.g)+t(e.b)+_0(e.a,t):void 0}const w0=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function ep(e,t,n){const i=t*Math.min(n,1-n),r=(s,o=(s+e/30)%12)=>n-i*Math.max(Math.min(o-3,9-o,1),-1);return[r(0),r(8),r(4)]}function S0(e,t,n){const i=(r,s=(r+e/60)%6)=>n-n*t*Math.max(Math.min(s,4-s,1),0);return[i(5),i(3),i(1)]}function b0(e,t,n){const i=ep(e,1,.5);let r;for(t+n>1&&(r=1/(t+n),t*=r,n*=r),r=0;r<3;r++)i[r]*=1-t-n,i[r]+=t;return i}function C0(e,t,n,i,r){return e===r?(t-n)/i+(t<n?6:0):t===r?(n-e)/i+2:(e-t)/i+4}function tu(e){const n=e.r/255,i=e.g/255,r=e.b/255,s=Math.max(n,i,r),o=Math.min(n,i,r),l=(s+o)/2;let a,u,c;return s!==o&&(c=s-o,u=l>.5?c/(2-s-o):c/(s+o),a=C0(n,i,r,c,s),a=a*60+.5),[a|0,u||0,l]}function eu(e,t,n,i){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,i)).map(tn)}function nu(e,t,n){return eu(ep,e,t,n)}function M0(e,t,n){return eu(b0,e,t,n)}function P0(e,t,n){return eu(S0,e,t,n)}function np(e){return(e%360+360)%360}function E0(e){const t=w0.exec(e);let n=255,i;if(!t)return;t[5]!==i&&(n=t[6]?Di(+t[5]):tn(+t[5]));const r=np(+t[2]),s=+t[3]/100,o=+t[4]/100;return t[1]==="hwb"?i=M0(r,s,o):t[1]==="hsv"?i=P0(r,s,o):i=nu(r,s,o),{r:i[0],g:i[1],b:i[2],a:n}}function T0(e,t){var n=tu(e);n[0]=np(n[0]+t),n=nu(n),e.r=n[0],e.g=n[1],e.b=n[2]}function L0(e){if(!e)return;const t=tu(e),n=t[0],i=Mc(t[1]),r=Mc(t[2]);return e.a<255?`hsla(${n}, ${i}%, ${r}%, ${Ce(e.a)})`:`hsl(${n}, ${i}%, ${r}%)`}const Pc={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Ec={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function O0(){const e={},t=Object.keys(Ec),n=Object.keys(Pc);let i,r,s,o,l;for(i=0;i<t.length;i++){for(o=l=t[i],r=0;r<n.length;r++)s=n[r],l=l.replace(s,Pc[s]);s=parseInt(Ec[o],16),e[l]=[s>>16&255,s>>8&255,s&255]}return e}let $r;function z0(e){$r||($r=O0(),$r.transparent=[0,0,0,0]);const t=$r[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const D0=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function R0(e){const t=D0.exec(e);let n=255,i,r,s;if(t){if(t[7]!==i){const o=+t[7];n=t[8]?Di(o):Ve(o*255,0,255)}return i=+t[1],r=+t[3],s=+t[5],i=255&(t[2]?Di(i):Ve(i,0,255)),r=255&(t[4]?Di(r):Ve(r,0,255)),s=255&(t[6]?Di(s):Ve(s,0,255)),{r:i,g:r,b:s,a:n}}}function F0(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${Ce(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const Yo=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,An=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function A0(e,t,n){const i=An(Ce(e.r)),r=An(Ce(e.g)),s=An(Ce(e.b));return{r:tn(Yo(i+n*(An(Ce(t.r))-i))),g:tn(Yo(r+n*(An(Ce(t.g))-r))),b:tn(Yo(s+n*(An(Ce(t.b))-s))),a:e.a+n*(t.a-e.a)}}function Ur(e,t,n){if(e){let i=tu(e);i[t]=Math.max(0,Math.min(i[t]+i[t]*n,t===0?360:1)),i=nu(i),e.r=i[0],e.g=i[1],e.b=i[2]}}function ip(e,t){return e&&Object.assign(t||{},e)}function Tc(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=tn(e[3]))):(t=ip(e,{r:0,g:0,b:0,a:1}),t.a=tn(t.a)),t}function N0(e){return e.charAt(0)==="r"?R0(e):E0(e)}class dr{constructor(t){if(t instanceof dr)return t;const n=typeof t;let i;n==="object"?i=Tc(t):n==="string"&&(i=x0(t)||z0(t)||N0(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=ip(this._rgb);return t&&(t.a=Ce(t.a)),t}set rgb(t){this._rgb=Tc(t)}rgbString(){return this._valid?F0(this._rgb):void 0}hexString(){return this._valid?k0(this._rgb):void 0}hslString(){return this._valid?L0(this._rgb):void 0}mix(t,n){if(t){const i=this.rgb,r=t.rgb;let s;const o=n===s?.5:n,l=2*o-1,a=i.a-r.a,u=((l*a===-1?l:(l+a)/(1+l*a))+1)/2;s=1-u,i.r=255&u*i.r+s*r.r+.5,i.g=255&u*i.g+s*r.g+.5,i.b=255&u*i.b+s*r.b+.5,i.a=o*i.a+(1-o)*r.a,this.rgb=i}return this}interpolate(t,n){return t&&(this._rgb=A0(this._rgb,t._rgb,n)),this}clone(){return new dr(this.rgb)}alpha(t){return this._rgb.a=tn(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=Sr(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Ur(this._rgb,2,t),this}darken(t){return Ur(this._rgb,2,-t),this}saturate(t){return Ur(this._rgb,1,t),this}desaturate(t){return Ur(this._rgb,1,-t),this}rotate(t){return T0(this._rgb,t),this}}/*!
 * Chart.js v4.4.2
 * https://www.chartjs.org
 * (c) 2024 Chart.js Contributors
 * Released under the MIT License
 */function _e(){}const I0=(()=>{let e=0;return()=>e++})();function V(e){return e===null||typeof e>"u"}function J(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function I(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function ht(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function jt(e,t){return ht(e)?e:t}function j(e,t){return typeof e>"u"?t:e}const j0=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function Y(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function B(e,t,n,i){let r,s,o;if(J(e))if(s=e.length,i)for(r=s-1;r>=0;r--)t.call(n,e[r],r);else for(r=0;r<s;r++)t.call(n,e[r],r);else if(I(e))for(o=Object.keys(e),s=o.length,r=0;r<s;r++)t.call(n,e[o[r]],o[r])}function $s(e,t){let n,i,r,s;if(!e||!t||e.length!==t.length)return!1;for(n=0,i=e.length;n<i;++n)if(r=e[n],s=t[n],r.datasetIndex!==s.datasetIndex||r.index!==s.index)return!1;return!0}function Us(e){if(J(e))return e.map(Us);if(I(e)){const t=Object.create(null),n=Object.keys(e),i=n.length;let r=0;for(;r<i;++r)t[n[r]]=Us(e[n[r]]);return t}return e}function rp(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function B0(e,t,n,i){if(!rp(e))return;const r=t[e],s=n[e];I(r)&&I(s)?hr(r,s,i):t[e]=Us(s)}function hr(e,t,n){const i=J(t)?t:[t],r=i.length;if(!I(e))return e;n=n||{};const s=n.merger||B0;let o;for(let l=0;l<r;++l){if(o=i[l],!I(o))continue;const a=Object.keys(o);for(let u=0,c=a.length;u<c;++u)s(a[u],e,o,n)}return e}function Ui(e,t){return hr(e,t,{merger:H0})}function H0(e,t,n){if(!rp(e))return;const i=t[e],r=n[e];I(i)&&I(r)?Ui(i,r):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=Us(r))}const Lc={"":e=>e,x:e=>e.x,y:e=>e.y};function V0(e){const t=e.split("."),n=[];let i="";for(const r of t)i+=r,i.endsWith("\\")?i=i.slice(0,-1)+".":(n.push(i),i="");return n}function W0(e){const t=V0(e);return n=>{for(const i of t){if(i==="")break;n=n&&n[i]}return n}}function fi(e,t){return(Lc[t]||(Lc[t]=W0(t)))(e)}function iu(e){return e.charAt(0).toUpperCase()+e.slice(1)}const pr=e=>typeof e<"u",sn=e=>typeof e=="function",Oc=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function $0(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const gt=Math.PI,ve=2*gt,Ys=Number.POSITIVE_INFINITY,U0=gt/180,Vt=gt/2,cn=gt/4,zc=gt*2/3,We=Math.log10,en=Math.sign;function gs(e,t,n){return Math.abs(e-t)<n}function Dc(e){const t=Math.round(e);e=gs(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(We(e))),i=e/n;return(i<=1?1:i<=2?2:i<=5?5:10)*n}function Y0(e){const t=[],n=Math.sqrt(e);let i;for(i=1;i<n;i++)e%i===0&&(t.push(i),t.push(e/i));return n===(n|0)&&t.push(n),t.sort((r,s)=>r-s).pop(),t}function Ks(e){return!isNaN(parseFloat(e))&&isFinite(e)}function K0(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function sp(e,t,n){let i,r,s;for(i=0,r=e.length;i<r;i++)s=e[i][n],isNaN(s)||(t.min=Math.min(t.min,s),t.max=Math.max(t.max,s))}function $e(e){return e*(gt/180)}function ru(e){return e*(180/gt)}function Rc(e){if(!ht(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function X0(e,t){const n=t.x-e.x,i=t.y-e.y,r=Math.sqrt(n*n+i*i);let s=Math.atan2(i,n);return s<-.5*gt&&(s+=ve),{angle:s,distance:r}}function Q0(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function pe(e){return(e%ve+ve)%ve}function G0(e,t,n,i){const r=pe(e),s=pe(t),o=pe(n),l=pe(s-r),a=pe(o-r),u=pe(r-s),c=pe(r-o);return r===s||r===o||i&&s===o||l>a&&u<c}function se(e,t,n){return Math.max(t,Math.min(n,e))}function Z0(e){return se(e,-32768,32767)}function Qn(e,t,n,i=1e-6){return e>=Math.min(t,n)-i&&e<=Math.max(t,n)+i}function su(e,t,n){n=n||(o=>e[o]<t);let i=e.length-1,r=0,s;for(;i-r>1;)s=r+i>>1,n(s)?r=s:i=s;return{lo:r,hi:i}}const Zl=(e,t,n,i)=>su(e,n,i?r=>{const s=e[r][t];return s<n||s===n&&e[r+1][t]===n}:r=>e[r][t]<n),q0=(e,t,n)=>su(e,n,i=>e[i][t]>=n);function J0(e,t,n){let i=0,r=e.length;for(;i<r&&e[i]<t;)i++;for(;r>i&&e[r-1]>n;)r--;return i>0||r<e.length?e.slice(i,r):e}const op=["push","pop","shift","splice","unshift"];function ty(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),op.forEach(n=>{const i="_onData"+iu(n),r=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...s){const o=r.apply(this,s);return e._chartjs.listeners.forEach(l=>{typeof l[i]=="function"&&l[i](...s)}),o}})})}function Fc(e,t){const n=e._chartjs;if(!n)return;const i=n.listeners,r=i.indexOf(t);r!==-1&&i.splice(r,1),!(i.length>0)&&(op.forEach(s=>{delete e[s]}),delete e._chartjs)}function lp(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const ap=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function up(e,t){let n=[],i=!1;return function(...r){n=r,i||(i=!0,ap.call(window,()=>{i=!1,e.apply(t,n)}))}}function ey(e,t){let n;return function(...i){return t?(clearTimeout(n),n=setTimeout(e,t,i)):e.apply(this,i),t}}const ou=e=>e==="start"?"left":e==="end"?"right":"center",kt=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,ny=(e,t,n,i)=>e===(i?"left":"right")?n:e==="center"?(t+n)/2:t,Yr=e=>e===0||e===1,Ac=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*ve/n)),Nc=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*ve/n)+1,Yi={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*Vt)+1,easeOutSine:e=>Math.sin(e*Vt),easeInOutSine:e=>-.5*(Math.cos(gt*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>Yr(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>Yr(e)?e:Ac(e,.075,.3),easeOutElastic:e=>Yr(e)?e:Nc(e,.075,.3),easeInOutElastic(e){return Yr(e)?e:e<.5?.5*Ac(e*2,.1125,.45):.5+.5*Nc(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-Yi.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?Yi.easeInBounce(e*2)*.5:Yi.easeOutBounce(e*2-1)*.5+.5};function cp(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function Ic(e){return cp(e)?e:new dr(e)}function Ko(e){return cp(e)?e:new dr(e).saturate(.5).darken(.1).hexString()}const iy=["x","y","borderWidth","radius","tension"],ry=["color","borderColor","backgroundColor"];function sy(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:ry},numbers:{type:"number",properties:iy}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function oy(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const jc=new Map;function ly(e,t){t=t||{};const n=e+JSON.stringify(t);let i=jc.get(n);return i||(i=new Intl.NumberFormat(e,t),jc.set(n,i)),i}function lu(e,t,n){return ly(t,n).format(e)}const fp={values(e){return J(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const i=this.chart.options.locale;let r,s=e;if(n.length>1){const u=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(u<1e-4||u>1e15)&&(r="scientific"),s=ay(e,n)}const o=We(Math.abs(s)),l=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),a={notation:r,minimumFractionDigits:l,maximumFractionDigits:l};return Object.assign(a,this.options.ticks.format),lu(e,i,a)},logarithmic(e,t,n){if(e===0)return"0";const i=n[t].significand||e/Math.pow(10,Math.floor(We(e)));return[1,2,3,5,10,15].includes(i)||t>.8*n.length?fp.numeric.call(this,e,t,n):""}};function ay(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var mo={formatters:fp};function uy(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:mo.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Tn=Object.create(null),ql=Object.create(null);function Ki(e,t){if(!t)return e;const n=t.split(".");for(let i=0,r=n.length;i<r;++i){const s=n[i];e=e[s]||(e[s]=Object.create(null))}return e}function Xo(e,t,n){return typeof t=="string"?hr(Ki(e,t),n):hr(Ki(e,""),t)}class cy{constructor(t,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=i=>i.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(i,r)=>Ko(r.backgroundColor),this.hoverBorderColor=(i,r)=>Ko(r.borderColor),this.hoverColor=(i,r)=>Ko(r.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(n)}set(t,n){return Xo(this,t,n)}get(t){return Ki(this,t)}describe(t,n){return Xo(ql,t,n)}override(t,n){return Xo(Tn,t,n)}route(t,n,i,r){const s=Ki(this,t),o=Ki(this,i),l="_"+n;Object.defineProperties(s,{[l]:{value:s[n],writable:!0},[n]:{enumerable:!0,get(){const a=this[l],u=o[r];return I(a)?Object.assign({},u,a):j(a,u)},set(a){this[l]=a}}})}apply(t){t.forEach(n=>n(this))}}var st=new cy({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[sy,oy,uy]);function fy(e){return!e||V(e.size)||V(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function Xs(e,t,n,i,r){let s=t[r];return s||(s=t[r]=e.measureText(r).width,n.push(r)),s>i&&(i=s),i}function dy(e,t,n,i){i=i||{};let r=i.data=i.data||{},s=i.garbageCollect=i.garbageCollect||[];i.font!==t&&(r=i.data={},s=i.garbageCollect=[],i.font=t),e.save(),e.font=t;let o=0;const l=n.length;let a,u,c,f,d;for(a=0;a<l;a++)if(f=n[a],f!=null&&!J(f))o=Xs(e,r,s,o,f);else if(J(f))for(u=0,c=f.length;u<c;u++)d=f[u],d!=null&&!J(d)&&(o=Xs(e,r,s,o,d));e.restore();const h=s.length/2;if(h>n.length){for(a=0;a<h;a++)delete r[s[a]];s.splice(0,h)}return o}function fn(e,t,n){const i=e.currentDevicePixelRatio,r=n!==0?Math.max(n/2,.5):0;return Math.round((t-r)*i)/i+r}function Bc(e,t){t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore()}function Hc(e,t,n,i){dp(e,t,n,i,null)}function dp(e,t,n,i,r){let s,o,l,a,u,c,f,d;const h=t.pointStyle,m=t.rotation,v=t.radius;let x=(m||0)*U0;if(h&&typeof h=="object"&&(s=h.toString(),s==="[object HTMLImageElement]"||s==="[object HTMLCanvasElement]")){e.save(),e.translate(n,i),e.rotate(x),e.drawImage(h,-h.width/2,-h.height/2,h.width,h.height),e.restore();return}if(!(isNaN(v)||v<=0)){switch(e.beginPath(),h){default:r?e.ellipse(n,i,r/2,v,0,0,ve):e.arc(n,i,v,0,ve),e.closePath();break;case"triangle":c=r?r/2:v,e.moveTo(n+Math.sin(x)*c,i-Math.cos(x)*v),x+=zc,e.lineTo(n+Math.sin(x)*c,i-Math.cos(x)*v),x+=zc,e.lineTo(n+Math.sin(x)*c,i-Math.cos(x)*v),e.closePath();break;case"rectRounded":u=v*.516,a=v-u,o=Math.cos(x+cn)*a,f=Math.cos(x+cn)*(r?r/2-u:a),l=Math.sin(x+cn)*a,d=Math.sin(x+cn)*(r?r/2-u:a),e.arc(n-f,i-l,u,x-gt,x-Vt),e.arc(n+d,i-o,u,x-Vt,x),e.arc(n+f,i+l,u,x,x+Vt),e.arc(n-d,i+o,u,x+Vt,x+gt),e.closePath();break;case"rect":if(!m){a=Math.SQRT1_2*v,c=r?r/2:a,e.rect(n-c,i-a,2*c,2*a);break}x+=cn;case"rectRot":f=Math.cos(x)*(r?r/2:v),o=Math.cos(x)*v,l=Math.sin(x)*v,d=Math.sin(x)*(r?r/2:v),e.moveTo(n-f,i-l),e.lineTo(n+d,i-o),e.lineTo(n+f,i+l),e.lineTo(n-d,i+o),e.closePath();break;case"crossRot":x+=cn;case"cross":f=Math.cos(x)*(r?r/2:v),o=Math.cos(x)*v,l=Math.sin(x)*v,d=Math.sin(x)*(r?r/2:v),e.moveTo(n-f,i-l),e.lineTo(n+f,i+l),e.moveTo(n+d,i-o),e.lineTo(n-d,i+o);break;case"star":f=Math.cos(x)*(r?r/2:v),o=Math.cos(x)*v,l=Math.sin(x)*v,d=Math.sin(x)*(r?r/2:v),e.moveTo(n-f,i-l),e.lineTo(n+f,i+l),e.moveTo(n+d,i-o),e.lineTo(n-d,i+o),x+=cn,f=Math.cos(x)*(r?r/2:v),o=Math.cos(x)*v,l=Math.sin(x)*v,d=Math.sin(x)*(r?r/2:v),e.moveTo(n-f,i-l),e.lineTo(n+f,i+l),e.moveTo(n+d,i-o),e.lineTo(n-d,i+o);break;case"line":o=r?r/2:Math.cos(x)*v,l=Math.sin(x)*v,e.moveTo(n-o,i-l),e.lineTo(n+o,i+l);break;case"dash":e.moveTo(n,i),e.lineTo(n+Math.cos(x)*(r?r/2:v),i+Math.sin(x)*v);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function Gn(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function au(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function uu(e){e.restore()}function hy(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),V(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}function py(e,t,n,i,r){if(r.strikethrough||r.underline){const s=e.measureText(i),o=t-s.actualBoundingBoxLeft,l=t+s.actualBoundingBoxRight,a=n-s.actualBoundingBoxAscent,u=n+s.actualBoundingBoxDescent,c=r.strikethrough?(a+u)/2:u;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=r.decorationWidth||2,e.moveTo(o,c),e.lineTo(l,c),e.stroke()}}function gy(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function Ln(e,t,n,i,r,s={}){const o=J(t)?t:[t],l=s.strokeWidth>0&&s.strokeColor!=="";let a,u;for(e.save(),e.font=r.string,hy(e,s),a=0;a<o.length;++a)u=o[a],s.backdrop&&gy(e,s.backdrop),l&&(s.strokeColor&&(e.strokeStyle=s.strokeColor),V(s.strokeWidth)||(e.lineWidth=s.strokeWidth),e.strokeText(u,n,i,s.maxWidth)),e.fillText(u,n,i,s.maxWidth),py(e,n,i,u,s),i+=Number(r.lineHeight);e.restore()}function gr(e,t){const{x:n,y:i,w:r,h:s,radius:o}=t;e.arc(n+o.topLeft,i+o.topLeft,o.topLeft,1.5*gt,gt,!0),e.lineTo(n,i+s-o.bottomLeft),e.arc(n+o.bottomLeft,i+s-o.bottomLeft,o.bottomLeft,gt,Vt,!0),e.lineTo(n+r-o.bottomRight,i+s),e.arc(n+r-o.bottomRight,i+s-o.bottomRight,o.bottomRight,Vt,0,!0),e.lineTo(n+r,i+o.topRight),e.arc(n+r-o.topRight,i+o.topRight,o.topRight,0,-Vt,!0),e.lineTo(n+o.topLeft,i)}const my=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,yy=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function vy(e,t){const n=(""+e).match(my);if(!n||n[1]==="normal")return t*1.2;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100;break}return t*e}const xy=e=>+e||0;function hp(e,t){const n={},i=I(t),r=i?Object.keys(t):t,s=I(e)?i?o=>j(e[o],e[t[o]]):o=>e[o]:()=>e;for(const o of r)n[o]=xy(s(o));return n}function pp(e){return hp(e,{top:"y",right:"x",bottom:"y",left:"x"})}function wn(e){return hp(e,["topLeft","topRight","bottomLeft","bottomRight"])}function bt(e){const t=pp(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function ct(e,t){e=e||{},t=t||st.font;let n=j(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let i=j(e.style,t.style);i&&!(""+i).match(yy)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const r={family:j(e.family,t.family),lineHeight:vy(j(e.lineHeight,t.lineHeight),n),size:n,style:i,weight:j(e.weight,t.weight),string:""};return r.string=fy(r),r}function Kr(e,t,n,i){let r=!0,s,o,l;for(s=0,o=e.length;s<o;++s)if(l=e[s],l!==void 0&&(t!==void 0&&typeof l=="function"&&(l=l(t),r=!1),n!==void 0&&J(l)&&(l=l[n%l.length],r=!1),l!==void 0))return i&&!r&&(i.cacheable=!1),l}function _y(e,t,n){const{min:i,max:r}=e,s=j0(t,(r-i)/2),o=(l,a)=>n&&l===0?0:l+a;return{min:o(i,-Math.abs(s)),max:o(r,s)}}function Dn(e,t){return Object.assign(Object.create(e),t)}function cu(e,t=[""],n,i,r=()=>e[0]){const s=n||e;typeof i>"u"&&(i=vp("_fallback",e));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:s,_fallback:i,_getTarget:r,override:l=>cu([l,...e],t,s,i)};return new Proxy(o,{deleteProperty(l,a){return delete l[a],delete l._keys,delete e[0][a],!0},get(l,a){return mp(l,a,()=>Ey(a,t,e,l))},getOwnPropertyDescriptor(l,a){return Reflect.getOwnPropertyDescriptor(l._scopes[0],a)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(l,a){return Wc(l).includes(a)},ownKeys(l){return Wc(l)},set(l,a,u){const c=l._storage||(l._storage=r());return l[a]=c[a]=u,delete l._keys,!0}})}function di(e,t,n,i){const r={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:gp(e,i),setContext:s=>di(e,s,n,i),override:s=>di(e.override(s),t,n,i)};return new Proxy(r,{deleteProperty(s,o){return delete s[o],delete e[o],!0},get(s,o,l){return mp(s,o,()=>wy(s,o,l))},getOwnPropertyDescriptor(s,o){return s._descriptors.allKeys?Reflect.has(e,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,o)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(s,o){return Reflect.has(e,o)},ownKeys(){return Reflect.ownKeys(e)},set(s,o,l){return e[o]=l,delete s[o],!0}})}function gp(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:i=t.indexable,_allKeys:r=t.allKeys}=e;return{allKeys:r,scriptable:n,indexable:i,isScriptable:sn(n)?n:()=>n,isIndexable:sn(i)?i:()=>i}}const ky=(e,t)=>e?e+iu(t):t,fu=(e,t)=>I(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function mp(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t))return e[t];const i=n();return e[t]=i,i}function wy(e,t,n){const{_proxy:i,_context:r,_subProxy:s,_descriptors:o}=e;let l=i[t];return sn(l)&&o.isScriptable(t)&&(l=Sy(t,l,e,n)),J(l)&&l.length&&(l=by(t,l,e,o.isIndexable)),fu(t,l)&&(l=di(l,r,s&&s[t],o)),l}function Sy(e,t,n,i){const{_proxy:r,_context:s,_subProxy:o,_stack:l}=n;if(l.has(e))throw new Error("Recursion detected: "+Array.from(l).join("->")+"->"+e);l.add(e);let a=t(s,o||i);return l.delete(e),fu(e,a)&&(a=du(r._scopes,r,e,a)),a}function by(e,t,n,i){const{_proxy:r,_context:s,_subProxy:o,_descriptors:l}=n;if(typeof s.index<"u"&&i(e))return t[s.index%t.length];if(I(t[0])){const a=t,u=r._scopes.filter(c=>c!==a);t=[];for(const c of a){const f=du(u,r,e,c);t.push(di(f,s,o&&o[e],l))}}return t}function yp(e,t,n){return sn(e)?e(t,n):e}const Cy=(e,t)=>e===!0?t:typeof e=="string"?fi(t,e):void 0;function My(e,t,n,i,r){for(const s of t){const o=Cy(n,s);if(o){e.add(o);const l=yp(o._fallback,n,r);if(typeof l<"u"&&l!==n&&l!==i)return l}else if(o===!1&&typeof i<"u"&&n!==i)return null}return!1}function du(e,t,n,i){const r=t._rootScopes,s=yp(t._fallback,n,i),o=[...e,...r],l=new Set;l.add(i);let a=Vc(l,o,n,s||n,i);return a===null||typeof s<"u"&&s!==n&&(a=Vc(l,o,s,a,i),a===null)?!1:cu(Array.from(l),[""],r,s,()=>Py(t,n,i))}function Vc(e,t,n,i,r){for(;n;)n=My(e,t,n,i,r);return n}function Py(e,t,n){const i=e._getTarget();t in i||(i[t]={});const r=i[t];return J(r)&&I(n)?n:r||{}}function Ey(e,t,n,i){let r;for(const s of t)if(r=vp(ky(s,e),n),typeof r<"u")return fu(e,r)?du(n,i,e,r):r}function vp(e,t){for(const n of t){if(!n)continue;const i=n[e];if(typeof i<"u")return i}}function Wc(e){let t=e._keys;return t||(t=e._keys=Ty(e._scopes)),t}function Ty(e){const t=new Set;for(const n of e)for(const i of Object.keys(n).filter(r=>!r.startsWith("_")))t.add(i);return Array.from(t)}function hu(){return typeof window<"u"&&typeof document<"u"}function pu(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function Qs(e,t,n){let i;return typeof e=="string"?(i=parseInt(e,10),e.indexOf("%")!==-1&&(i=i/100*t.parentNode[n])):i=e,i}const yo=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function Ly(e,t){return yo(e).getPropertyValue(t)}const Oy=["top","right","bottom","left"];function Sn(e,t,n){const i={};n=n?"-"+n:"";for(let r=0;r<4;r++){const s=Oy[r];i[s]=parseFloat(e[t+"-"+s+n])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const zy=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function Dy(e,t){const n=e.touches,i=n&&n.length?n[0]:e,{offsetX:r,offsetY:s}=i;let o=!1,l,a;if(zy(r,s,e.target))l=r,a=s;else{const u=t.getBoundingClientRect();l=i.clientX-u.left,a=i.clientY-u.top,o=!0}return{x:l,y:a,box:o}}function mn(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:i}=t,r=yo(n),s=r.boxSizing==="border-box",o=Sn(r,"padding"),l=Sn(r,"border","width"),{x:a,y:u,box:c}=Dy(e,n),f=o.left+(c&&l.left),d=o.top+(c&&l.top);let{width:h,height:m}=t;return s&&(h-=o.width+l.width,m-=o.height+l.height),{x:Math.round((a-f)/h*n.width/i),y:Math.round((u-d)/m*n.height/i)}}function Ry(e,t,n){let i,r;if(t===void 0||n===void 0){const s=pu(e);if(!s)t=e.clientWidth,n=e.clientHeight;else{const o=s.getBoundingClientRect(),l=yo(s),a=Sn(l,"border","width"),u=Sn(l,"padding");t=o.width-u.width-a.width,n=o.height-u.height-a.height,i=Qs(l.maxWidth,s,"clientWidth"),r=Qs(l.maxHeight,s,"clientHeight")}}return{width:t,height:n,maxWidth:i||Ys,maxHeight:r||Ys}}const Xr=e=>Math.round(e*10)/10;function Fy(e,t,n,i){const r=yo(e),s=Sn(r,"margin"),o=Qs(r.maxWidth,e,"clientWidth")||Ys,l=Qs(r.maxHeight,e,"clientHeight")||Ys,a=Ry(e,t,n);let{width:u,height:c}=a;if(r.boxSizing==="content-box"){const d=Sn(r,"border","width"),h=Sn(r,"padding");u-=h.width+d.width,c-=h.height+d.height}return u=Math.max(0,u-s.width),c=Math.max(0,i?u/i:c-s.height),u=Xr(Math.min(u,o,a.maxWidth)),c=Xr(Math.min(c,l,a.maxHeight)),u&&!c&&(c=Xr(u/2)),(t!==void 0||n!==void 0)&&i&&a.height&&c>a.height&&(c=a.height,u=Xr(Math.floor(c*i))),{width:u,height:c}}function $c(e,t,n){const i=t||1,r=Math.floor(e.height*i),s=Math.floor(e.width*i);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const o=e.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=`${e.height}px`,o.style.width=`${e.width}px`),e.currentDevicePixelRatio!==i||o.height!==r||o.width!==s?(e.currentDevicePixelRatio=i,o.height=r,o.width=s,e.ctx.setTransform(i,0,0,i,0,0),!0):!1}const Ay=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};hu()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e}();function Uc(e,t){const n=Ly(e,t),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}const Ny=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,i){return n-i},leftForLtr(n,i){return n-i}}},Iy=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function ii(e,t,n){return e?Ny(t,n):Iy()}function xp(e,t){let n,i;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,i=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=i)}function _p(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}/*!
 * Chart.js v4.4.2
 * https://www.chartjs.org
 * (c) 2024 Chart.js Contributors
 * Released under the MIT License
 */class jy{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,i,r){const s=n.listeners[r],o=n.duration;s.forEach(l=>l({chart:t,initial:n.initial,numSteps:o,currentStep:Math.min(i-n.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=ap.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((i,r)=>{if(!i.running||!i.items.length)return;const s=i.items;let o=s.length-1,l=!1,a;for(;o>=0;--o)a=s[o],a._active?(a._total>i.duration&&(i.duration=a._total),a.tick(t),l=!0):(s[o]=s[s.length-1],s.pop());l&&(r.draw(),this._notify(r,i,t,"progress")),s.length||(i.running=!1,this._notify(r,i,t,"complete"),i.initial=!1),n+=s.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let i=n.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,i)),i}listen(t,n,i){this._getAnims(t).listeners[n].push(i)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((i,r)=>Math.max(i,r._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const i=n.items;let r=i.length-1;for(;r>=0;--r)i[r].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var ke=new jy;const Yc="transparent",By={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const i=Ic(e||Yc),r=i.valid&&Ic(t||Yc);return r&&r.valid?r.mix(i,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class Hy{constructor(t,n,i,r){const s=n[i];r=Kr([t.to,r,s,t.from]);const o=Kr([t.from,s,r]);this._active=!0,this._fn=t.fn||By[t.type||typeof o],this._easing=Yi[t.easing]||Yi.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=i,this._from=o,this._to=r,this._promises=void 0}active(){return this._active}update(t,n,i){if(this._active){this._notify(!1);const r=this._target[this._prop],s=i-this._start,o=this._duration-s;this._start=i,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=s,this._loop=!!t.loop,this._to=Kr([t.to,n,r,t.from]),this._from=Kr([t.from,r,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,i=this._duration,r=this._prop,s=this._from,o=this._loop,l=this._to;let a;if(this._active=s!==l&&(o||n<i),!this._active){this._target[r]=l,this._notify(!0);return}if(n<0){this._target[r]=s;return}a=n/i%2,a=o&&a>1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[r]=this._fn(s,l,a)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,i)=>{t.push({res:n,rej:i})})}_notify(t){const n=t?"res":"rej",i=this._promises||[];for(let r=0;r<i.length;r++)i[r][n]()}}class kp{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!I(t))return;const n=Object.keys(st.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach(r=>{const s=t[r];if(!I(s))return;const o={};for(const l of n)o[l]=s[l];(J(s.properties)&&s.properties||[r]).forEach(l=>{(l===r||!i.has(l))&&i.set(l,o)})})}_animateOptions(t,n){const i=n.options,r=Wy(t,i);if(!r)return[];const s=this._createAnimations(r,i);return i.$shared&&Vy(t.options.$animations,i).then(()=>{t.options=i},()=>{}),s}_createAnimations(t,n){const i=this._properties,r=[],s=t.$animations||(t.$animations={}),o=Object.keys(n),l=Date.now();let a;for(a=o.length-1;a>=0;--a){const u=o[a];if(u.charAt(0)==="$")continue;if(u==="options"){r.push(...this._animateOptions(t,n));continue}const c=n[u];let f=s[u];const d=i.get(u);if(f)if(d&&f.active()){f.update(d,c,l);continue}else f.cancel();if(!d||!d.duration){t[u]=c;continue}s[u]=f=new Hy(d,t,u,c),r.push(f)}return r}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const i=this._createAnimations(t,n);if(i.length)return ke.add(this._chart,i),!0}}function Vy(e,t){const n=[],i=Object.keys(t);for(let r=0;r<i.length;r++){const s=e[i[r]];s&&s.active()&&n.push(s.wait())}return Promise.all(n)}function Wy(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function Kc(e,t){const n=e&&e.options||{},i=n.reverse,r=n.min===void 0?t:0,s=n.max===void 0?t:0;return{start:i?s:r,end:i?r:s}}function $y(e,t,n){if(n===!1)return!1;const i=Kc(e,n),r=Kc(t,n);return{top:r.end,right:i.end,bottom:r.start,left:i.start}}function Uy(e){let t,n,i,r;return I(e)?(t=e.top,n=e.right,i=e.bottom,r=e.left):t=n=i=r=e,{top:t,right:n,bottom:i,left:r,disabled:e===!1}}function wp(e,t){const n=[],i=e._getSortedDatasetMetas(t);let r,s;for(r=0,s=i.length;r<s;++r)n.push(i[r].index);return n}function Xc(e,t,n,i={}){const r=e.keys,s=i.mode==="single";let o,l,a,u;if(t!==null){for(o=0,l=r.length;o<l;++o){if(a=+r[o],a===n){if(i.all)continue;break}u=e.values[a],ht(u)&&(s||t===0||en(t)===en(u))&&(t+=u)}return t}}function Yy(e){const t=Object.keys(e),n=new Array(t.length);let i,r,s;for(i=0,r=t.length;i<r;++i)s=t[i],n[i]={x:s,y:e[s]};return n}function Qc(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function Ky(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function Xy(e){const{min:t,max:n,minDefined:i,maxDefined:r}=e.getUserBounds();return{min:i?t:Number.NEGATIVE_INFINITY,max:r?n:Number.POSITIVE_INFINITY}}function Qy(e,t,n){const i=e[t]||(e[t]={});return i[n]||(i[n]={})}function Gc(e,t,n,i){for(const r of t.getMatchingVisibleMetas(i).reverse()){const s=e[r.index];if(n&&s>0||!n&&s<0)return r.index}return null}function Zc(e,t){const{chart:n,_cachedMeta:i}=e,r=n._stacks||(n._stacks={}),{iScale:s,vScale:o,index:l}=i,a=s.axis,u=o.axis,c=Ky(s,o,i),f=t.length;let d;for(let h=0;h<f;++h){const m=t[h],{[a]:v,[u]:x}=m,p=m._stacks||(m._stacks={});d=p[u]=Qy(r,c,v),d[l]=x,d._top=Gc(d,o,!0,i.type),d._bottom=Gc(d,o,!1,i.type);const g=d._visualValues||(d._visualValues={});g[l]=x}}function Qo(e,t){const n=e.scales;return Object.keys(n).filter(i=>n[i].axis===t).shift()}function Gy(e,t){return Dn(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function Zy(e,t,n){return Dn(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function bi(e,t){const n=e.controller.index,i=e.vScale&&e.vScale.axis;if(i){t=t||e._parsed;for(const r of t){const s=r._stacks;if(!s||s[i]===void 0||s[i][n]===void 0)return;delete s[i][n],s[i]._visualValues!==void 0&&s[i]._visualValues[n]!==void 0&&delete s[i]._visualValues[n]}}}const Go=e=>e==="reset"||e==="none",qc=(e,t)=>t?e:Object.assign({},e),qy=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:wp(n,!0),values:null};class Xi{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Qc(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&bi(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,i=this.getDataset(),r=(f,d,h,m)=>f==="x"?d:f==="r"?m:h,s=n.xAxisID=j(i.xAxisID,Qo(t,"x")),o=n.yAxisID=j(i.yAxisID,Qo(t,"y")),l=n.rAxisID=j(i.rAxisID,Qo(t,"r")),a=n.indexAxis,u=n.iAxisID=r(a,s,o,l),c=n.vAxisID=r(a,o,s,l);n.xScale=this.getScaleForId(s),n.yScale=this.getScaleForId(o),n.rScale=this.getScaleForId(l),n.iScale=this.getScaleForId(u),n.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Fc(this._data,this),t._stacked&&bi(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),i=this._data;if(I(n))this._data=Yy(n);else if(i!==n){if(i){Fc(i,this);const r=this._cachedMeta;bi(r),r._parsed=[]}n&&Object.isExtensible(n)&&ty(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,i=this.getDataset();let r=!1;this._dataCheck();const s=n._stacked;n._stacked=Qc(n.vScale,n),n.stack!==i.stack&&(r=!0,bi(n),n.stack=i.stack),this._resyncElements(t),(r||s!==n._stacked)&&Zc(this,n._parsed)}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:i,_data:r}=this,{iScale:s,_stacked:o}=i,l=s.axis;let a=t===0&&n===r.length?!0:i._sorted,u=t>0&&i._parsed[t-1],c,f,d;if(this._parsing===!1)i._parsed=r,i._sorted=!0,d=r;else{J(r[t])?d=this.parseArrayData(i,r,t,n):I(r[t])?d=this.parseObjectData(i,r,t,n):d=this.parsePrimitiveData(i,r,t,n);const h=()=>f[l]===null||u&&f[l]<u[l];for(c=0;c<n;++c)i._parsed[c+t]=f=d[c],a&&(h()&&(a=!1),u=f);i._sorted=a}o&&Zc(this,d)}parsePrimitiveData(t,n,i,r){const{iScale:s,vScale:o}=t,l=s.axis,a=o.axis,u=s.getLabels(),c=s===o,f=new Array(r);let d,h,m;for(d=0,h=r;d<h;++d)m=d+i,f[d]={[l]:c||s.parse(u[m],m),[a]:o.parse(n[m],m)};return f}parseArrayData(t,n,i,r){const{xScale:s,yScale:o}=t,l=new Array(r);let a,u,c,f;for(a=0,u=r;a<u;++a)c=a+i,f=n[c],l[a]={x:s.parse(f[0],c),y:o.parse(f[1],c)};return l}parseObjectData(t,n,i,r){const{xScale:s,yScale:o}=t,{xAxisKey:l="x",yAxisKey:a="y"}=this._parsing,u=new Array(r);let c,f,d,h;for(c=0,f=r;c<f;++c)d=c+i,h=n[d],u[c]={x:s.parse(fi(h,l),d),y:o.parse(fi(h,a),d)};return u}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,i){const r=this.chart,s=this._cachedMeta,o=n[t.axis],l={keys:wp(r,!0),values:n._stacks[t.axis]._visualValues};return Xc(l,o,s.index,{mode:i})}updateRangeFromParsed(t,n,i,r){const s=i[n.axis];let o=s===null?NaN:s;const l=r&&i._stacks[n.axis];r&&l&&(r.values=l,o=Xc(r,s,this._cachedMeta.index)),t.min=Math.min(t.min,o),t.max=Math.max(t.max,o)}getMinMax(t,n){const i=this._cachedMeta,r=i._parsed,s=i._sorted&&t===i.iScale,o=r.length,l=this._getOtherScale(t),a=qy(n,i,this.chart),u={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:f}=Xy(l);let d,h;function m(){h=r[d];const v=h[l.axis];return!ht(h[t.axis])||c>v||f<v}for(d=0;d<o&&!(!m()&&(this.updateRangeFromParsed(u,t,h,a),s));++d);if(s){for(d=o-1;d>=0;--d)if(!m()){this.updateRangeFromParsed(u,t,h,a);break}}return u}getAllParsedValues(t){const n=this._cachedMeta._parsed,i=[];let r,s,o;for(r=0,s=n.length;r<s;++r)o=n[r][t.axis],ht(o)&&i.push(o);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,i=n.iScale,r=n.vScale,s=this.getParsed(t);return{label:i?""+i.getLabelForValue(s[i.axis]):"",value:r?""+r.getLabelForValue(s[r.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=Uy(j(this.options.clip,$y(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,i=this._cachedMeta,r=i.data||[],s=n.chartArea,o=[],l=this._drawStart||0,a=this._drawCount||r.length-l,u=this.options.drawActiveElementsOnTop;let c;for(i.dataset&&i.dataset.draw(t,s,l,a),c=l;c<l+a;++c){const f=r[c];f.hidden||(f.active&&u?o.push(f):f.draw(t,s))}for(c=0;c<o.length;++c)o[c].draw(t,s)}getStyle(t,n){const i=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,n,i){const r=this.getDataset();let s;if(t>=0&&t<this._cachedMeta.data.length){const o=this._cachedMeta.data[t];s=o.$context||(o.$context=Zy(this.getContext(),t,o)),s.parsed=this.getParsed(t),s.raw=r.data[t],s.index=s.dataIndex=t}else s=this.$context||(this.$context=Gy(this.chart.getContext(),this.index)),s.dataset=r,s.index=s.datasetIndex=this.index;return s.active=!!n,s.mode=i,s}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",i){const r=n==="active",s=this._cachedDataOpts,o=t+"-"+n,l=s[o],a=this.enableOptionSharing&&pr(i);if(l)return qc(l,a);const u=this.chart.config,c=u.datasetElementScopeKeys(this._type,t),f=r?[`${t}Hover`,"hover",t,""]:[t,""],d=u.getOptionScopes(this.getDataset(),c),h=Object.keys(st.elements[t]),m=()=>this.getContext(i,r,n),v=u.resolveNamedOptions(d,h,m,f);return v.$shared&&(v.$shared=a,s[o]=Object.freeze(qc(v,a))),v}_resolveAnimations(t,n,i){const r=this.chart,s=this._cachedDataOpts,o=`animation-${n}`,l=s[o];if(l)return l;let a;if(r.options.animation!==!1){const c=this.chart.config,f=c.datasetAnimationScopeKeys(this._type,n),d=c.getOptionScopes(this.getDataset(),f);a=c.createResolver(d,this.getContext(t,i,n))}const u=new kp(r,a&&a.animations);return a&&a._cacheable&&(s[o]=Object.freeze(u)),u}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||Go(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const i=this.resolveDataElementOptions(t,n),r=this._sharedOptions,s=this.getSharedOptions(i),o=this.includeOptions(n,s)||s!==r;return this.updateSharedOptions(s,n,i),{sharedOptions:s,includeOptions:o}}updateElement(t,n,i,r){Go(r)?Object.assign(t,i):this._resolveAnimations(n,r).update(t,i)}updateSharedOptions(t,n,i){t&&!Go(n)&&this._resolveAnimations(void 0,n).update(t,i)}_setStyle(t,n,i,r){t.active=r;const s=this.getStyle(n,r);this._resolveAnimations(n,i,r).update(t,{options:!r&&this.getSharedOptions(s)||s})}removeHoverStyle(t,n,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,n,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,i=this._cachedMeta.data;for(const[l,a,u]of this._syncList)this[l](a,u);this._syncList=[];const r=i.length,s=n.length,o=Math.min(s,r);o&&this.parse(0,o),s>r?this._insertElements(r,s-r,t):s<r&&this._removeElements(s,r-s)}_insertElements(t,n,i=!0){const r=this._cachedMeta,s=r.data,o=t+n;let l;const a=u=>{for(u.length+=n,l=u.length-1;l>=o;l--)u[l]=u[l-n]};for(a(s),l=t;l<o;++l)s[l]=new this.dataElementType;this._parsing&&a(r._parsed),this.parse(t,n),i&&this.updateElements(s,t,n,"reset")}updateElements(t,n,i,r){}_removeElements(t,n){const i=this._cachedMeta;if(this._parsing){const r=i._parsed.splice(t,n);i._stacked&&bi(i,r)}i.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,i,r]=t;this[n](i,r)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,n){n&&this._sync(["_removeElements",t,n]);const i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}F(Xi,"defaults",{}),F(Xi,"datasetElementType",null),F(Xi,"dataElementType",null);function Jy(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let i=[];for(let r=0,s=n.length;r<s;r++)i=i.concat(n[r].controller.getAllParsedValues(e));e._cache.$bar=lp(i.sort((r,s)=>r-s))}return e._cache.$bar}function tv(e){const t=e.iScale,n=Jy(t,e.type);let i=t._length,r,s,o,l;const a=()=>{o===32767||o===-32768||(pr(l)&&(i=Math.min(i,Math.abs(o-l)||i)),l=o)};for(r=0,s=n.length;r<s;++r)o=t.getPixelForValue(n[r]),a();for(l=void 0,r=0,s=t.ticks.length;r<s;++r)o=t.getPixelForTick(r),a();return i}function ev(e,t,n,i){const r=n.barThickness;let s,o;return V(r)?(s=t.min*n.categoryPercentage,o=n.barPercentage):(s=r*i,o=1),{chunk:s/i,ratio:o,start:t.pixels[e]-s/2}}function nv(e,t,n,i){const r=t.pixels,s=r[e];let o=e>0?r[e-1]:null,l=e<r.length-1?r[e+1]:null;const a=n.categoryPercentage;o===null&&(o=s-(l===null?t.end-t.start:l-s)),l===null&&(l=s+s-o);const u=s-(s-Math.min(o,l))/2*a;return{chunk:Math.abs(l-o)/2*a/i,ratio:n.barPercentage,start:u}}function iv(e,t,n,i){const r=n.parse(e[0],i),s=n.parse(e[1],i),o=Math.min(r,s),l=Math.max(r,s);let a=o,u=l;Math.abs(o)>Math.abs(l)&&(a=l,u=o),t[n.axis]=u,t._custom={barStart:a,barEnd:u,start:r,end:s,min:o,max:l}}function Sp(e,t,n,i){return J(e)?iv(e,t,n,i):t[n.axis]=n.parse(e,i),t}function Jc(e,t,n,i){const r=e.iScale,s=e.vScale,o=r.getLabels(),l=r===s,a=[];let u,c,f,d;for(u=n,c=n+i;u<c;++u)d=t[u],f={},f[r.axis]=l||r.parse(o[u],u),a.push(Sp(d,f,s,u));return a}function Zo(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function rv(e,t,n){return e!==0?en(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function sv(e){let t,n,i,r,s;return e.horizontal?(t=e.base>e.x,n="left",i="right"):(t=e.base<e.y,n="bottom",i="top"),t?(r="end",s="start"):(r="start",s="end"),{start:n,end:i,reverse:t,top:r,bottom:s}}function ov(e,t,n,i){let r=t.borderSkipped;const s={};if(!r){e.borderSkipped=s;return}if(r===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:o,end:l,reverse:a,top:u,bottom:c}=sv(e);r==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===i?r=u:(n._bottom||0)===i?r=c:(s[tf(c,o,l,a)]=!0,r=u)),s[tf(r,o,l,a)]=!0,e.borderSkipped=s}function tf(e,t,n,i){return i?(e=lv(e,t,n),e=ef(e,n,t)):e=ef(e,t,n),e}function lv(e,t,n){return e===t?n:e===n?t:e}function ef(e,t,n){return e==="start"?t:e==="end"?n:e}function av(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class ms extends Xi{parsePrimitiveData(t,n,i,r){return Jc(t,n,i,r)}parseArrayData(t,n,i,r){return Jc(t,n,i,r)}parseObjectData(t,n,i,r){const{iScale:s,vScale:o}=t,{xAxisKey:l="x",yAxisKey:a="y"}=this._parsing,u=s.axis==="x"?l:a,c=o.axis==="x"?l:a,f=[];let d,h,m,v;for(d=i,h=i+r;d<h;++d)v=n[d],m={},m[s.axis]=s.parse(fi(v,u),d),f.push(Sp(fi(v,c),m,o,d));return f}updateRangeFromParsed(t,n,i,r){super.updateRangeFromParsed(t,n,i,r);const s=i._custom;s&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,s.min),t.max=Math.max(t.max,s.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta,{iScale:i,vScale:r}=n,s=this.getParsed(t),o=s._custom,l=Zo(o)?"["+o.start+", "+o.end+"]":""+r.getLabelForValue(s[r.axis]);return{label:""+i.getLabelForValue(s[i.axis]),value:l}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,i,r){const s=r==="reset",{index:o,_cachedMeta:{vScale:l}}=this,a=l.getBasePixel(),u=l.isHorizontal(),c=this._getRuler(),{sharedOptions:f,includeOptions:d}=this._getSharedOptions(n,r);for(let h=n;h<n+i;h++){const m=this.getParsed(h),v=s||V(m[l.axis])?{base:a,head:a}:this._calculateBarValuePixels(h),x=this._calculateBarIndexPixels(h,c),p=(m._stacks||{})[l.axis],g={horizontal:u,base:v.base,enableBorderRadius:!p||Zo(m._custom)||o===p._top||o===p._bottom,x:u?v.head:x.center,y:u?x.center:v.head,height:u?x.size:Math.abs(v.size),width:u?Math.abs(v.size):x.size};d&&(g.options=f||this.resolveDataElementOptions(h,t[h].active?"active":r));const y=g.options||t[h].options;ov(g,y,p,o),av(g,y,c.ratio),this.updateElement(t[h],h,g,r)}}_getStacks(t,n){const{iScale:i}=this._cachedMeta,r=i.getMatchingVisibleMetas(this._type).filter(a=>a.controller.options.grouped),s=i.options.stacked,o=[],l=a=>{const u=a.controller.getParsed(n),c=u&&u[a.vScale.axis];if(V(c)||isNaN(c))return!0};for(const a of r)if(!(n!==void 0&&l(a))&&((s===!1||o.indexOf(a.stack)===-1||s===void 0&&a.stack===void 0)&&o.push(a.stack),a.index===t))break;return o.length||o.push(void 0),o}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,n,i){const r=this._getStacks(t,i),s=n!==void 0?r.indexOf(n):-1;return s===-1?r.length-1:s}_getRuler(){const t=this.options,n=this._cachedMeta,i=n.iScale,r=[];let s,o;for(s=0,o=n.data.length;s<o;++s)r.push(i.getPixelForValue(this.getParsed(s)[i.axis],s));const l=t.barThickness;return{min:l||tv(n),pixels:r,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:l?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:n,_stacked:i,index:r},options:{base:s,minBarLength:o}}=this,l=s||0,a=this.getParsed(t),u=a._custom,c=Zo(u);let f=a[n.axis],d=0,h=i?this.applyStack(n,a,i):f,m,v;h!==f&&(d=h-f,h=f),c&&(f=u.barStart,h=u.barEnd-u.barStart,f!==0&&en(f)!==en(u.barEnd)&&(d=0),d+=f);const x=!V(s)&&!c?s:d;let p=n.getPixelForValue(x);if(this.chart.getDataVisibility(t)?m=n.getPixelForValue(d+h):m=p,v=m-p,Math.abs(v)<o){v=rv(v,n,l)*o,f===l&&(p-=v/2);const g=n.getPixelForDecimal(0),y=n.getPixelForDecimal(1),_=Math.min(g,y),k=Math.max(g,y);p=Math.max(Math.min(p,k),_),m=p+v,i&&!c&&(a._stacks[n.axis]._visualValues[r]=n.getValueForPixel(m)-n.getValueForPixel(p))}if(p===n.getPixelForValue(l)){const g=en(v)*n.getLineWidthForValue(l)/2;p+=g,v-=g}return{size:v,base:p,head:m,center:m+v/2}}_calculateBarIndexPixels(t,n){const i=n.scale,r=this.options,s=r.skipNull,o=j(r.maxBarThickness,1/0);let l,a;if(n.grouped){const u=s?this._getStackCount(t):n.stackCount,c=r.barThickness==="flex"?nv(t,n,r,u):ev(t,n,r,u),f=this._getStackIndex(this.index,this._cachedMeta.stack,s?t:void 0);l=c.start+c.chunk*f+c.chunk/2,a=Math.min(o,c.chunk*c.ratio)}else l=i.getPixelForValue(this.getParsed(t)[i.axis],t),a=Math.min(o,n.min*n.ratio);return{base:l-a/2,head:l+a/2,center:l,size:a}}draw(){const t=this._cachedMeta,n=t.vScale,i=t.data,r=i.length;let s=0;for(;s<r;++s)this.getParsed(s)[n.axis]!==null&&i[s].draw(this._ctx)}}F(ms,"id","bar"),F(ms,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),F(ms,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});function dn(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class gu{constructor(t){F(this,"options");this.options=t||{}}static override(t){Object.assign(gu.prototype,t)}init(){}formats(){return dn()}parse(){return dn()}format(){return dn()}add(){return dn()}diff(){return dn()}startOf(){return dn()}endOf(){return dn()}}var uv={_date:gu};function cv(e,t,n,i){const{controller:r,data:s,_sorted:o}=e,l=r._cachedMeta.iScale;if(l&&t===l.axis&&t!=="r"&&o&&s.length){const a=l._reversePixels?q0:Zl;if(i){if(r._sharedOptions){const u=s[0],c=typeof u.getRange=="function"&&u.getRange(t);if(c){const f=a(s,t,n-c),d=a(s,t,n+c);return{lo:f.lo,hi:d.hi}}}}else return a(s,t,n)}return{lo:0,hi:s.length-1}}function br(e,t,n,i,r){const s=e.getSortedVisibleDatasetMetas(),o=n[t];for(let l=0,a=s.length;l<a;++l){const{index:u,data:c}=s[l],{lo:f,hi:d}=cv(s[l],t,o,r);for(let h=f;h<=d;++h){const m=c[h];m.skip||i(m,u,h)}}}function fv(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(i,r){const s=t?Math.abs(i.x-r.x):0,o=n?Math.abs(i.y-r.y):0;return Math.sqrt(Math.pow(s,2)+Math.pow(o,2))}}function qo(e,t,n,i,r){const s=[];return!r&&!e.isPointInArea(t)||br(e,n,t,function(l,a,u){!r&&!Gn(l,e.chartArea,0)||l.inRange(t.x,t.y,i)&&s.push({element:l,datasetIndex:a,index:u})},!0),s}function dv(e,t,n,i){let r=[];function s(o,l,a){const{startAngle:u,endAngle:c}=o.getProps(["startAngle","endAngle"],i),{angle:f}=X0(o,{x:t.x,y:t.y});G0(f,u,c)&&r.push({element:o,datasetIndex:l,index:a})}return br(e,n,t,s),r}function hv(e,t,n,i,r,s){let o=[];const l=fv(n);let a=Number.POSITIVE_INFINITY;function u(c,f,d){const h=c.inRange(t.x,t.y,r);if(i&&!h)return;const m=c.getCenterPoint(r);if(!(!!s||e.isPointInArea(m))&&!h)return;const x=l(t,m);x<a?(o=[{element:c,datasetIndex:f,index:d}],a=x):x===a&&o.push({element:c,datasetIndex:f,index:d})}return br(e,n,t,u),o}function Jo(e,t,n,i,r,s){return!s&&!e.isPointInArea(t)?[]:n==="r"&&!i?dv(e,t,n,r):hv(e,t,n,i,r,s)}function nf(e,t,n,i,r){const s=[],o=n==="x"?"inXRange":"inYRange";let l=!1;return br(e,n,t,(a,u,c)=>{a[o](t[n],r)&&(s.push({element:a,datasetIndex:u,index:c}),l=l||a.inRange(t.x,t.y,r))}),i&&!l?[]:s}var pv={evaluateInteractionItems:br,modes:{index(e,t,n,i){const r=mn(t,e),s=n.axis||"x",o=n.includeInvisible||!1,l=n.intersect?qo(e,r,s,i,o):Jo(e,r,s,!1,i,o),a=[];return l.length?(e.getSortedVisibleDatasetMetas().forEach(u=>{const c=l[0].index,f=u.data[c];f&&!f.skip&&a.push({element:f,datasetIndex:u.index,index:c})}),a):[]},dataset(e,t,n,i){const r=mn(t,e),s=n.axis||"xy",o=n.includeInvisible||!1;let l=n.intersect?qo(e,r,s,i,o):Jo(e,r,s,!1,i,o);if(l.length>0){const a=l[0].datasetIndex,u=e.getDatasetMeta(a).data;l=[];for(let c=0;c<u.length;++c)l.push({element:u[c],datasetIndex:a,index:c})}return l},point(e,t,n,i){const r=mn(t,e),s=n.axis||"xy",o=n.includeInvisible||!1;return qo(e,r,s,i,o)},nearest(e,t,n,i){const r=mn(t,e),s=n.axis||"xy",o=n.includeInvisible||!1;return Jo(e,r,s,n.intersect,i,o)},x(e,t,n,i){const r=mn(t,e);return nf(e,r,"x",n.intersect,i)},y(e,t,n,i){const r=mn(t,e);return nf(e,r,"y",n.intersect,i)}}};const bp=["left","top","right","bottom"];function Ci(e,t){return e.filter(n=>n.pos===t)}function rf(e,t){return e.filter(n=>bp.indexOf(n.pos)===-1&&n.box.axis===t)}function Mi(e,t){return e.sort((n,i)=>{const r=t?i:n,s=t?n:i;return r.weight===s.weight?r.index-s.index:r.weight-s.weight})}function gv(e){const t=[];let n,i,r,s,o,l;for(n=0,i=(e||[]).length;n<i;++n)r=e[n],{position:s,options:{stack:o,stackWeight:l=1}}=r,t.push({index:n,box:r,pos:s,horizontal:r.isHorizontal(),weight:r.weight,stack:o&&s+o,stackWeight:l});return t}function mv(e){const t={};for(const n of e){const{stack:i,pos:r,stackWeight:s}=n;if(!i||!bp.includes(r))continue;const o=t[i]||(t[i]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=s}return t}function yv(e,t){const n=mv(e),{vBoxMaxWidth:i,hBoxMaxHeight:r}=t;let s,o,l;for(s=0,o=e.length;s<o;++s){l=e[s];const{fullSize:a}=l.box,u=n[l.stack],c=u&&l.stackWeight/u.weight;l.horizontal?(l.width=c?c*i:a&&t.availableWidth,l.height=r):(l.width=i,l.height=c?c*r:a&&t.availableHeight)}return n}function vv(e){const t=gv(e),n=Mi(t.filter(u=>u.box.fullSize),!0),i=Mi(Ci(t,"left"),!0),r=Mi(Ci(t,"right")),s=Mi(Ci(t,"top"),!0),o=Mi(Ci(t,"bottom")),l=rf(t,"x"),a=rf(t,"y");return{fullSize:n,leftAndTop:i.concat(s),rightAndBottom:r.concat(a).concat(o).concat(l),chartArea:Ci(t,"chartArea"),vertical:i.concat(r).concat(a),horizontal:s.concat(o).concat(l)}}function sf(e,t,n,i){return Math.max(e[n],t[n])+Math.max(e[i],t[i])}function Cp(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function xv(e,t,n,i){const{pos:r,box:s}=n,o=e.maxPadding;if(!I(r)){n.size&&(e[r]-=n.size);const f=i[n.stack]||{size:0,count:1};f.size=Math.max(f.size,n.horizontal?s.height:s.width),n.size=f.size/f.count,e[r]+=n.size}s.getPadding&&Cp(o,s.getPadding());const l=Math.max(0,t.outerWidth-sf(o,e,"left","right")),a=Math.max(0,t.outerHeight-sf(o,e,"top","bottom")),u=l!==e.w,c=a!==e.h;return e.w=l,e.h=a,n.horizontal?{same:u,other:c}:{same:c,other:u}}function _v(e){const t=e.maxPadding;function n(i){const r=Math.max(t[i]-e[i],0);return e[i]+=r,r}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function kv(e,t){const n=t.maxPadding;function i(r){const s={left:0,top:0,right:0,bottom:0};return r.forEach(o=>{s[o]=Math.max(t[o],n[o])}),s}return i(e?["left","right"]:["top","bottom"])}function Ri(e,t,n,i){const r=[];let s,o,l,a,u,c;for(s=0,o=e.length,u=0;s<o;++s){l=e[s],a=l.box,a.update(l.width||t.w,l.height||t.h,kv(l.horizontal,t));const{same:f,other:d}=xv(t,n,l,i);u|=f&&r.length,c=c||d,a.fullSize||r.push(l)}return u&&Ri(r,t,n,i)||c}function Qr(e,t,n,i,r){e.top=n,e.left=t,e.right=t+i,e.bottom=n+r,e.width=i,e.height=r}function of(e,t,n,i){const r=n.padding;let{x:s,y:o}=t;for(const l of e){const a=l.box,u=i[l.stack]||{count:1,placed:0,weight:1},c=l.stackWeight/u.weight||1;if(l.horizontal){const f=t.w*c,d=u.size||a.height;pr(u.start)&&(o=u.start),a.fullSize?Qr(a,r.left,o,n.outerWidth-r.right-r.left,d):Qr(a,t.left+u.placed,o,f,d),u.start=o,u.placed+=f,o=a.bottom}else{const f=t.h*c,d=u.size||a.width;pr(u.start)&&(s=u.start),a.fullSize?Qr(a,s,r.top,d,n.outerHeight-r.bottom-r.top):Qr(a,s,t.top+u.placed,d,f),u.start=s,u.placed+=f,s=a.right}}t.x=s,t.y=o}var Zt={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,i){if(!e)return;const r=bt(e.options.layout.padding),s=Math.max(t-r.width,0),o=Math.max(n-r.height,0),l=vv(e.boxes),a=l.vertical,u=l.horizontal;B(e.boxes,v=>{typeof v.beforeLayout=="function"&&v.beforeLayout()});const c=a.reduce((v,x)=>x.box.options&&x.box.options.display===!1?v:v+1,0)||1,f=Object.freeze({outerWidth:t,outerHeight:n,padding:r,availableWidth:s,availableHeight:o,vBoxMaxWidth:s/2/c,hBoxMaxHeight:o/2}),d=Object.assign({},r);Cp(d,bt(i));const h=Object.assign({maxPadding:d,w:s,h:o,x:r.left,y:r.top},r),m=yv(a.concat(u),f);Ri(l.fullSize,h,f,m),Ri(a,h,f,m),Ri(u,h,f,m)&&Ri(a,h,f,m),_v(h),of(l.leftAndTop,h,f,m),h.x+=h.w,h.y+=h.h,of(l.rightAndBottom,h,f,m),e.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h,height:h.h,width:h.w},B(l.chartArea,v=>{const x=v.box;Object.assign(x,e.chartArea),x.update(h.w,h.h,{left:0,top:0,right:0,bottom:0})})}};class Mp{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,i){}removeEventListener(t,n,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,i,r){return n=Math.max(0,n||t.width),i=i||t.height,{width:n,height:Math.max(0,r?Math.floor(n/r):i)}}isAttached(t){return!0}updateConfig(t){}}class wv extends Mp{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const ys="$chartjs",Sv={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},lf=e=>e===null||e==="";function bv(e,t){const n=e.style,i=e.getAttribute("height"),r=e.getAttribute("width");if(e[ys]={initial:{height:i,width:r,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",lf(r)){const s=Uc(e,"width");s!==void 0&&(e.width=s)}if(lf(i))if(e.style.height==="")e.height=e.width/(t||2);else{const s=Uc(e,"height");s!==void 0&&(e.height=s)}return e}const Pp=Ay?{passive:!0}:!1;function Cv(e,t,n){e&&e.addEventListener(t,n,Pp)}function Mv(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,Pp)}function Pv(e,t){const n=Sv[e.type]||e.type,{x:i,y:r}=mn(e,t);return{type:n,chart:t,native:e,x:i!==void 0?i:null,y:r!==void 0?r:null}}function Gs(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function Ev(e,t,n){const i=e.canvas,r=new MutationObserver(s=>{let o=!1;for(const l of s)o=o||Gs(l.addedNodes,i),o=o&&!Gs(l.removedNodes,i);o&&n()});return r.observe(document,{childList:!0,subtree:!0}),r}function Tv(e,t,n){const i=e.canvas,r=new MutationObserver(s=>{let o=!1;for(const l of s)o=o||Gs(l.removedNodes,i),o=o&&!Gs(l.addedNodes,i);o&&n()});return r.observe(document,{childList:!0,subtree:!0}),r}const mr=new Map;let af=0;function Ep(){const e=window.devicePixelRatio;e!==af&&(af=e,mr.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function Lv(e,t){mr.size||window.addEventListener("resize",Ep),mr.set(e,t)}function Ov(e){mr.delete(e),mr.size||window.removeEventListener("resize",Ep)}function zv(e,t,n){const i=e.canvas,r=i&&pu(i);if(!r)return;const s=up((l,a)=>{const u=r.clientWidth;n(l,a),u<r.clientWidth&&n()},window),o=new ResizeObserver(l=>{const a=l[0],u=a.contentRect.width,c=a.contentRect.height;u===0&&c===0||s(u,c)});return o.observe(r),Lv(e,s),o}function tl(e,t,n){n&&n.disconnect(),t==="resize"&&Ov(e)}function Dv(e,t,n){const i=e.canvas,r=up(s=>{e.ctx!==null&&n(Pv(s,e))},e);return Cv(i,t,r),r}class Rv extends Mp{acquireContext(t,n){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(bv(t,n),i):null}releaseContext(t){const n=t.canvas;if(!n[ys])return!1;const i=n[ys].initial;["height","width"].forEach(s=>{const o=i[s];V(o)?n.removeAttribute(s):n.setAttribute(s,o)});const r=i.style||{};return Object.keys(r).forEach(s=>{n.style[s]=r[s]}),n.width=n.width,delete n[ys],!0}addEventListener(t,n,i){this.removeEventListener(t,n);const r=t.$proxies||(t.$proxies={}),o={attach:Ev,detach:Tv,resize:zv}[n]||Dv;r[n]=o(t,n,i)}removeEventListener(t,n){const i=t.$proxies||(t.$proxies={}),r=i[n];if(!r)return;({attach:tl,detach:tl,resize:tl}[n]||Mv)(t,n,r),i[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,i,r){return Fy(t,n,i,r)}isAttached(t){const n=pu(t);return!!(n&&n.isConnected)}}function Fv(e){return!hu()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?wv:Rv}class on{constructor(){F(this,"x");F(this,"y");F(this,"active",!1);F(this,"options");F(this,"$animations")}tooltipPosition(t){const{x:n,y:i}=this.getProps(["x","y"],t);return{x:n,y:i}}hasValue(){return Ks(this.x)&&Ks(this.y)}getProps(t,n){const i=this.$animations;if(!n||!i)return this;const r={};return t.forEach(s=>{r[s]=i[s]&&i[s].active()?i[s]._to:this[s]}),r}}F(on,"defaults",{}),F(on,"defaultRoutes");function Av(e,t){const n=e.options.ticks,i=Nv(e),r=Math.min(n.maxTicksLimit||i,i),s=n.major.enabled?jv(t):[],o=s.length,l=s[0],a=s[o-1],u=[];if(o>r)return Bv(t,u,s,o/r),u;const c=Iv(s,t,r);if(o>0){let f,d;const h=o>1?Math.round((a-l)/(o-1)):null;for(Gr(t,u,c,V(h)?0:l-h,l),f=0,d=o-1;f<d;f++)Gr(t,u,c,s[f],s[f+1]);return Gr(t,u,c,a,V(h)?t.length:a+h),u}return Gr(t,u,c),u}function Nv(e){const t=e.options.offset,n=e._tickSize(),i=e._length/n+(t?0:1),r=e._maxLength/n;return Math.floor(Math.min(i,r))}function Iv(e,t,n){const i=Hv(e),r=t.length/n;if(!i)return Math.max(r,1);const s=Y0(i);for(let o=0,l=s.length-1;o<l;o++){const a=s[o];if(a>r)return a}return Math.max(r,1)}function jv(e){const t=[];let n,i;for(n=0,i=e.length;n<i;n++)e[n].major&&t.push(n);return t}function Bv(e,t,n,i){let r=0,s=n[0],o;for(i=Math.ceil(i),o=0;o<e.length;o++)o===s&&(t.push(e[o]),r++,s=n[r*i])}function Gr(e,t,n,i,r){const s=j(i,0),o=Math.min(j(r,e.length),e.length);let l=0,a,u,c;for(n=Math.ceil(n),r&&(a=r-i,n=a/Math.floor(a/n)),c=s;c<0;)l++,c=Math.round(s+l*n);for(u=Math.max(s,0);u<o;u++)u===c&&(t.push(e[u]),l++,c=Math.round(s+l*n))}function Hv(e){const t=e.length;let n,i;if(t<2)return!1;for(i=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==i)return!1;return i}const Vv=e=>e==="left"?"right":e==="right"?"left":e,uf=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,cf=(e,t)=>Math.min(t||e,e);function ff(e,t){const n=[],i=e.length/t,r=e.length;let s=0;for(;s<r;s+=i)n.push(e[Math.floor(s)]);return n}function Wv(e,t,n){const i=e.ticks.length,r=Math.min(t,i-1),s=e._startPixel,o=e._endPixel,l=1e-6;let a=e.getPixelForTick(r),u;if(!(n&&(i===1?u=Math.max(a-s,o-a):t===0?u=(e.getPixelForTick(1)-a)/2:u=(a-e.getPixelForTick(r-1))/2,a+=r<t?u:-u,a<s-l||a>o+l)))return a}function $v(e,t){B(e,n=>{const i=n.gc,r=i.length/2;let s;if(r>t){for(s=0;s<r;++s)delete n.data[i[s]];i.splice(0,r)}})}function Pi(e){return e.drawTicks?e.tickLength:0}function df(e,t){if(!e.display)return 0;const n=ct(e.font,t),i=bt(e.padding);return(J(e.text)?e.text.length:1)*n.lineHeight+i.height}function Uv(e,t){return Dn(e,{scale:t,type:"scale"})}function Yv(e,t,n){return Dn(e,{tick:n,index:t,type:"tick"})}function Kv(e,t,n){let i=ou(e);return(n&&t!=="right"||!n&&t==="right")&&(i=Vv(i)),i}function Xv(e,t,n,i){const{top:r,left:s,bottom:o,right:l,chart:a}=e,{chartArea:u,scales:c}=a;let f=0,d,h,m;const v=o-r,x=l-s;if(e.isHorizontal()){if(h=kt(i,s,l),I(n)){const p=Object.keys(n)[0],g=n[p];m=c[p].getPixelForValue(g)+v-t}else n==="center"?m=(u.bottom+u.top)/2+v-t:m=uf(e,n,t);d=l-s}else{if(I(n)){const p=Object.keys(n)[0],g=n[p];h=c[p].getPixelForValue(g)-x+t}else n==="center"?h=(u.left+u.right)/2-x+t:h=uf(e,n,t);m=kt(i,o,r),f=n==="left"?-Vt:Vt}return{titleX:h,titleY:m,maxWidth:d,rotation:f}}class Rn extends on{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:i,_suggestedMax:r}=this;return t=jt(t,Number.POSITIVE_INFINITY),n=jt(n,Number.NEGATIVE_INFINITY),i=jt(i,Number.POSITIVE_INFINITY),r=jt(r,Number.NEGATIVE_INFINITY),{min:jt(t,i),max:jt(n,r),minDefined:ht(t),maxDefined:ht(n)}}getMinMax(t){let{min:n,max:i,minDefined:r,maxDefined:s}=this.getUserBounds(),o;if(r&&s)return{min:n,max:i};const l=this.getMatchingVisibleMetas();for(let a=0,u=l.length;a<u;++a)o=l[a].controller.getMinMax(this,t),r||(n=Math.min(n,o.min)),s||(i=Math.max(i,o.max));return n=s&&n>i?i:n,i=r&&n>i?n:i,{min:jt(n,jt(i,n)),max:jt(i,jt(n,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Y(this.options.beforeUpdate,[this])}update(t,n,i){const{beginAtZero:r,grace:s,ticks:o}=this.options,l=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=_y(this,s,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=l<this.ticks.length;this._convertTicksToLabels(a?ff(this.ticks,l):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=Av(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),a&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,n,i;this.isHorizontal()?(n=this.left,i=this.right):(n=this.top,i=this.bottom,t=!t),this._startPixel=n,this._endPixel=i,this._reversePixels=t,this._length=i-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Y(this.options.afterUpdate,[this])}beforeSetDimensions(){Y(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){Y(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),Y(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Y(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let i,r,s;for(i=0,r=t.length;i<r;i++)s=t[i],s.label=Y(n.callback,[s.value,i,t],this)}afterTickToLabelConversion(){Y(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Y(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,i=cf(this.ticks.length,t.ticks.maxTicksLimit),r=n.minRotation||0,s=n.maxRotation;let o=r,l,a,u;if(!this._isVisible()||!n.display||r>=s||i<=1||!this.isHorizontal()){this.labelRotation=r;return}const c=this._getLabelSizes(),f=c.widest.width,d=c.highest.height,h=se(this.chart.width-f,0,this.maxWidth);l=t.offset?this.maxWidth/i:h/(i-1),f+6>l&&(l=h/(i-(t.offset?.5:1)),a=this.maxHeight-Pi(t.grid)-n.padding-df(t.title,this.chart.options.font),u=Math.sqrt(f*f+d*d),o=ru(Math.min(Math.asin(se((c.highest.height+6)/l,-1,1)),Math.asin(se(a/u,-1,1))-Math.asin(se(d/u,-1,1)))),o=Math.max(r,Math.min(s,o))),this.labelRotation=o}afterCalculateLabelRotation(){Y(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Y(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:i,title:r,grid:s}}=this,o=this._isVisible(),l=this.isHorizontal();if(o){const a=df(r,n.options.font);if(l?(t.width=this.maxWidth,t.height=Pi(s)+a):(t.height=this.maxHeight,t.width=Pi(s)+a),i.display&&this.ticks.length){const{first:u,last:c,widest:f,highest:d}=this._getLabelSizes(),h=i.padding*2,m=$e(this.labelRotation),v=Math.cos(m),x=Math.sin(m);if(l){const p=i.mirror?0:x*f.width+v*d.height;t.height=Math.min(this.maxHeight,t.height+p+h)}else{const p=i.mirror?0:v*f.width+x*d.height;t.width=Math.min(this.maxWidth,t.width+p+h)}this._calculatePadding(u,c,x,v)}}this._handleMargins(),l?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,i,r){const{ticks:{align:s,padding:o},position:l}=this.options,a=this.labelRotation!==0,u=l!=="top"&&this.axis==="x";if(this.isHorizontal()){const c=this.getPixelForTick(0)-this.left,f=this.right-this.getPixelForTick(this.ticks.length-1);let d=0,h=0;a?u?(d=r*t.width,h=i*n.height):(d=i*t.height,h=r*n.width):s==="start"?h=n.width:s==="end"?d=t.width:s!=="inner"&&(d=t.width/2,h=n.width/2),this.paddingLeft=Math.max((d-c+o)*this.width/(this.width-c),0),this.paddingRight=Math.max((h-f+o)*this.width/(this.width-f),0)}else{let c=n.height/2,f=t.height/2;s==="start"?(c=0,f=t.height):s==="end"&&(c=n.height,f=0),this.paddingTop=c+o,this.paddingBottom=f+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Y(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,i;for(n=0,i=t.length;n<i;n++)V(t[n].label)&&(t.splice(n,1),i--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let i=this.ticks;n<i.length&&(i=ff(i,n)),this._labelSizes=t=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,i){const{ctx:r,_longestTextCache:s}=this,o=[],l=[],a=Math.floor(n/cf(n,i));let u=0,c=0,f,d,h,m,v,x,p,g,y,_,k;for(f=0;f<n;f+=a){if(m=t[f].label,v=this._resolveTickFontOptions(f),r.font=x=v.string,p=s[x]=s[x]||{data:{},gc:[]},g=v.lineHeight,y=_=0,!V(m)&&!J(m))y=Xs(r,p.data,p.gc,y,m),_=g;else if(J(m))for(d=0,h=m.length;d<h;++d)k=m[d],!V(k)&&!J(k)&&(y=Xs(r,p.data,p.gc,y,k),_+=g);o.push(y),l.push(_),u=Math.max(y,u),c=Math.max(_,c)}$v(s,n);const w=o.indexOf(u),S=l.indexOf(c),b=P=>({width:o[P]||0,height:l[P]||0});return{first:b(0),last:b(n-1),widest:b(w),highest:b(S),widths:o,heights:l}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return Z0(this._alignToPixels?fn(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const i=n[t];return i.$context||(i.$context=Yv(this.getContext(),t,i))}return this.$context||(this.$context=Uv(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=$e(this.labelRotation),i=Math.abs(Math.cos(n)),r=Math.abs(Math.sin(n)),s=this._getLabelSizes(),o=t.autoSkipPadding||0,l=s?s.widest.width+o:0,a=s?s.highest.height+o:0;return this.isHorizontal()?a*i>l*r?l/i:a/r:a*r<l*i?a/i:l/r}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis,i=this.chart,r=this.options,{grid:s,position:o,border:l}=r,a=s.offset,u=this.isHorizontal(),f=this.ticks.length+(a?1:0),d=Pi(s),h=[],m=l.setContext(this.getContext()),v=m.display?m.width:0,x=v/2,p=function(tt){return fn(i,tt,v)};let g,y,_,k,w,S,b,P,M,L,R,$;if(o==="top")g=p(this.bottom),S=this.bottom-d,P=g-x,L=p(t.top)+x,$=t.bottom;else if(o==="bottom")g=p(this.top),L=t.top,$=p(t.bottom)-x,S=g+x,P=this.top+d;else if(o==="left")g=p(this.right),w=this.right-d,b=g-x,M=p(t.left)+x,R=t.right;else if(o==="right")g=p(this.left),M=t.left,R=p(t.right)-x,w=g+x,b=this.left+d;else if(n==="x"){if(o==="center")g=p((t.top+t.bottom)/2+.5);else if(I(o)){const tt=Object.keys(o)[0],ft=o[tt];g=p(this.chart.scales[tt].getPixelForValue(ft))}L=t.top,$=t.bottom,S=g+x,P=S+d}else if(n==="y"){if(o==="center")g=p((t.left+t.right)/2);else if(I(o)){const tt=Object.keys(o)[0],ft=o[tt];g=p(this.chart.scales[tt].getPixelForValue(ft))}w=g-x,b=w-d,M=t.left,R=t.right}const Ct=j(r.ticks.maxTicksLimit,f),Z=Math.max(1,Math.ceil(f/Ct));for(y=0;y<f;y+=Z){const tt=this.getContext(y),ft=s.setContext(tt),E=l.setContext(tt),z=ft.lineWidth,D=ft.color,U=E.dash||[],X=E.dashOffset,ue=ft.tickWidth,Mt=ft.tickColor,xe=ft.tickBorderDash||[],Pt=ft.tickBorderDashOffset;_=Wv(this,y,a),_!==void 0&&(k=fn(i,_,z),u?w=b=M=R=k:S=P=L=$=k,h.push({tx1:w,ty1:S,tx2:b,ty2:P,x1:M,y1:L,x2:R,y2:$,width:z,color:D,borderDash:U,borderDashOffset:X,tickWidth:ue,tickColor:Mt,tickBorderDash:xe,tickBorderDashOffset:Pt}))}return this._ticksLength=f,this._borderValue=g,h}_computeLabelItems(t){const n=this.axis,i=this.options,{position:r,ticks:s}=i,o=this.isHorizontal(),l=this.ticks,{align:a,crossAlign:u,padding:c,mirror:f}=s,d=Pi(i.grid),h=d+c,m=f?-c:h,v=-$e(this.labelRotation),x=[];let p,g,y,_,k,w,S,b,P,M,L,R,$="middle";if(r==="top")w=this.bottom-m,S=this._getXAxisLabelAlignment();else if(r==="bottom")w=this.top+m,S=this._getXAxisLabelAlignment();else if(r==="left"){const Z=this._getYAxisLabelAlignment(d);S=Z.textAlign,k=Z.x}else if(r==="right"){const Z=this._getYAxisLabelAlignment(d);S=Z.textAlign,k=Z.x}else if(n==="x"){if(r==="center")w=(t.top+t.bottom)/2+h;else if(I(r)){const Z=Object.keys(r)[0],tt=r[Z];w=this.chart.scales[Z].getPixelForValue(tt)+h}S=this._getXAxisLabelAlignment()}else if(n==="y"){if(r==="center")k=(t.left+t.right)/2-h;else if(I(r)){const Z=Object.keys(r)[0],tt=r[Z];k=this.chart.scales[Z].getPixelForValue(tt)}S=this._getYAxisLabelAlignment(d).textAlign}n==="y"&&(a==="start"?$="top":a==="end"&&($="bottom"));const Ct=this._getLabelSizes();for(p=0,g=l.length;p<g;++p){y=l[p],_=y.label;const Z=s.setContext(this.getContext(p));b=this.getPixelForTick(p)+s.labelOffset,P=this._resolveTickFontOptions(p),M=P.lineHeight,L=J(_)?_.length:1;const tt=L/2,ft=Z.color,E=Z.textStrokeColor,z=Z.textStrokeWidth;let D=S;o?(k=b,S==="inner"&&(p===g-1?D=this.options.reverse?"left":"right":p===0?D=this.options.reverse?"right":"left":D="center"),r==="top"?u==="near"||v!==0?R=-L*M+M/2:u==="center"?R=-Ct.highest.height/2-tt*M+M:R=-Ct.highest.height+M/2:u==="near"||v!==0?R=M/2:u==="center"?R=Ct.highest.height/2-tt*M:R=Ct.highest.height-L*M,f&&(R*=-1),v!==0&&!Z.showLabelBackdrop&&(k+=M/2*Math.sin(v))):(w=b,R=(1-L)*M/2);let U;if(Z.showLabelBackdrop){const X=bt(Z.backdropPadding),ue=Ct.heights[p],Mt=Ct.widths[p];let xe=R-X.top,Pt=0-X.left;switch($){case"middle":xe-=ue/2;break;case"bottom":xe-=ue;break}switch(S){case"center":Pt-=Mt/2;break;case"right":Pt-=Mt;break;case"inner":p===g-1?Pt-=Mt:p>0&&(Pt-=Mt/2);break}U={left:Pt,top:xe,width:Mt+X.width,height:ue+X.height,color:Z.backdropColor}}x.push({label:_,font:P,textOffset:R,options:{rotation:v,color:ft,strokeColor:E,strokeWidth:z,textAlign:D,textBaseline:$,translation:[k,w],backdrop:U}})}return x}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-$e(this.labelRotation))return t==="top"?"left":"right";let r="center";return n.align==="start"?r="left":n.align==="end"?r="right":n.align==="inner"&&(r="inner"),r}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:i,mirror:r,padding:s}}=this.options,o=this._getLabelSizes(),l=t+s,a=o.widest.width;let u,c;return n==="left"?r?(c=this.right+s,i==="near"?u="left":i==="center"?(u="center",c+=a/2):(u="right",c+=a)):(c=this.right-l,i==="near"?u="right":i==="center"?(u="center",c-=a/2):(u="left",c=this.left)):n==="right"?r?(c=this.left+s,i==="near"?u="right":i==="center"?(u="center",c-=a/2):(u="left",c-=a)):(c=this.left+l,i==="near"?u="left":i==="center"?(u="center",c+=a/2):(u="right",c=this.right)):u="right",{textAlign:u,x:c}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:i,top:r,width:s,height:o}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(i,r,s,o),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const r=this.ticks.findIndex(s=>s.value===t);return r>=0?n.setContext(this.getContext(r)).lineWidth:0}drawGrid(t){const n=this.options.grid,i=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let s,o;const l=(a,u,c)=>{!c.width||!c.color||(i.save(),i.lineWidth=c.width,i.strokeStyle=c.color,i.setLineDash(c.borderDash||[]),i.lineDashOffset=c.borderDashOffset,i.beginPath(),i.moveTo(a.x,a.y),i.lineTo(u.x,u.y),i.stroke(),i.restore())};if(n.display)for(s=0,o=r.length;s<o;++s){const a=r[s];n.drawOnChartArea&&l({x:a.x1,y:a.y1},{x:a.x2,y:a.y2},a),n.drawTicks&&l({x:a.tx1,y:a.ty1},{x:a.tx2,y:a.ty2},{color:a.tickColor,width:a.tickWidth,borderDash:a.tickBorderDash,borderDashOffset:a.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:n,options:{border:i,grid:r}}=this,s=i.setContext(this.getContext()),o=i.display?s.width:0;if(!o)return;const l=r.setContext(this.getContext(0)).lineWidth,a=this._borderValue;let u,c,f,d;this.isHorizontal()?(u=fn(t,this.left,o)-o/2,c=fn(t,this.right,l)+l/2,f=d=a):(f=fn(t,this.top,o)-o/2,d=fn(t,this.bottom,l)+l/2,u=c=a),n.save(),n.lineWidth=s.width,n.strokeStyle=s.color,n.beginPath(),n.moveTo(u,f),n.lineTo(c,d),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const i=this.ctx,r=this._computeLabelArea();r&&au(i,r);const s=this.getLabelItems(t);for(const o of s){const l=o.options,a=o.font,u=o.label,c=o.textOffset;Ln(i,u,0,c,a,l)}r&&uu(i)}drawTitle(){const{ctx:t,options:{position:n,title:i,reverse:r}}=this;if(!i.display)return;const s=ct(i.font),o=bt(i.padding),l=i.align;let a=s.lineHeight/2;n==="bottom"||n==="center"||I(n)?(a+=o.bottom,J(i.text)&&(a+=s.lineHeight*(i.text.length-1))):a+=o.top;const{titleX:u,titleY:c,maxWidth:f,rotation:d}=Xv(this,a,n,l);Ln(t,i.text,0,0,s,{color:i.color,maxWidth:f,rotation:d,textAlign:Kv(l,n,r),textBaseline:"middle",translation:[u,c]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,n=t.ticks&&t.ticks.z||0,i=j(t.grid&&t.grid.z,-1),r=j(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==Rn.prototype.draw?[{z:n,draw:s=>{this.draw(s)}}]:[{z:i,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:r,draw:()=>{this.drawBorder()}},{z:n,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",r=[];let s,o;for(s=0,o=n.length;s<o;++s){const l=n[s];l[i]===this.id&&(!t||l.type===t)&&r.push(l)}return r}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return ct(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Zr{constructor(t,n,i){this.type=t,this.scope=n,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let i;Zv(n)&&(i=this.register(n));const r=this.items,s=t.id,o=this.scope+"."+s;if(!s)throw new Error("class does not have id: "+t);return s in r||(r[s]=t,Qv(t,o,i),this.override&&st.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const n=this.items,i=t.id,r=this.scope;i in n&&delete n[i],r&&i in st[r]&&(delete st[r][i],this.override&&delete Tn[i])}}function Qv(e,t,n){const i=hr(Object.create(null),[n?st.get(n):{},st.get(t),e.defaults]);st.set(t,i),e.defaultRoutes&&Gv(t,e.defaultRoutes),e.descriptors&&st.describe(t,e.descriptors)}function Gv(e,t){Object.keys(t).forEach(n=>{const i=n.split("."),r=i.pop(),s=[e].concat(i).join("."),o=t[n].split("."),l=o.pop(),a=o.join(".");st.route(s,r,a,l)})}function Zv(e){return"id"in e&&"defaults"in e}class qv{constructor(){this.controllers=new Zr(Xi,"datasets",!0),this.elements=new Zr(on,"elements"),this.plugins=new Zr(Object,"plugins"),this.scales=new Zr(Rn,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,i){[...n].forEach(r=>{const s=i||this._getRegistryForType(r);i||s.isForType(r)||s===this.plugins&&r.id?this._exec(t,s,r):B(r,o=>{const l=i||this._getRegistryForType(o);this._exec(t,l,o)})})}_exec(t,n,i){const r=iu(t);Y(i["before"+r],[],i),n[t](i),Y(i["after"+r],[],i)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const i=this._typedRegistries[n];if(i.isForType(t))return i}return this.plugins}_get(t,n,i){const r=n.get(t);if(r===void 0)throw new Error('"'+t+'" is not a registered '+i+".");return r}}var he=new qv;class Jv{constructor(){this._init=[]}notify(t,n,i,r){n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const s=r?this._descriptors(t).filter(r):this._descriptors(t),o=this._notify(s,t,n,i);return n==="afterDestroy"&&(this._notify(s,t,"stop"),this._notify(this._init,t,"uninstall")),o}_notify(t,n,i,r){r=r||{};for(const s of t){const o=s.plugin,l=o[i],a=[n,r,s.options];if(Y(l,a,o)===!1&&r.cancelable)return!1}return!0}invalidate(){V(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){const i=t&&t.config,r=j(i.options&&i.options.plugins,{}),s=tx(i);return r===!1&&!n?[]:nx(t,s,r,n)}_notifyStateChanges(t){const n=this._oldCache||[],i=this._cache,r=(s,o)=>s.filter(l=>!o.some(a=>l.plugin.id===a.plugin.id));this._notify(r(n,i),t,"stop"),this._notify(r(i,n),t,"start")}}function tx(e){const t={},n=[],i=Object.keys(he.plugins.items);for(let s=0;s<i.length;s++)n.push(he.getPlugin(i[s]));const r=e.plugins||[];for(let s=0;s<r.length;s++){const o=r[s];n.indexOf(o)===-1&&(n.push(o),t[o.id]=!0)}return{plugins:n,localIds:t}}function ex(e,t){return!t&&e===!1?null:e===!0?{}:e}function nx(e,{plugins:t,localIds:n},i,r){const s=[],o=e.getContext();for(const l of t){const a=l.id,u=ex(i[a],r);u!==null&&s.push({plugin:l,options:ix(e.config,{plugin:l,local:n[a]},u,o)})}return s}function ix(e,{plugin:t,local:n},i,r){const s=e.pluginScopeKeys(t),o=e.getOptionScopes(i,s);return n&&t.defaults&&o.push(t.defaults),e.createResolver(o,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Jl(e,t){const n=st.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function rx(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function sx(e,t){return e===t?"_index_":"_value_"}function hf(e){if(e==="x"||e==="y"||e==="r")return e}function ox(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function ta(e,...t){if(hf(e))return e;for(const n of t){const i=n.axis||ox(n.position)||e.length>1&&hf(e[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function pf(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function lx(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(i=>i.xAxisID===e||i.yAxisID===e);if(n.length)return pf(e,"x",n[0])||pf(e,"y",n[0])}return{}}function ax(e,t){const n=Tn[e.type]||{scales:{}},i=t.scales||{},r=Jl(e.type,t),s=Object.create(null);return Object.keys(i).forEach(o=>{const l=i[o];if(!I(l))return console.error(`Invalid scale configuration for scale: ${o}`);if(l._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);const a=ta(o,l,lx(o,e),st.scales[l.type]),u=sx(a,r),c=n.scales||{};s[o]=Ui(Object.create(null),[{axis:a},l,c[a],c[u]])}),e.data.datasets.forEach(o=>{const l=o.type||e.type,a=o.indexAxis||Jl(l,t),c=(Tn[l]||{}).scales||{};Object.keys(c).forEach(f=>{const d=rx(f,a),h=o[d+"AxisID"]||d;s[h]=s[h]||Object.create(null),Ui(s[h],[{axis:d},i[h],c[f]])})}),Object.keys(s).forEach(o=>{const l=s[o];Ui(l,[st.scales[l.type],st.scale])}),s}function Tp(e){const t=e.options||(e.options={});t.plugins=j(t.plugins,{}),t.scales=ax(e,t)}function Lp(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function ux(e){return e=e||{},e.data=Lp(e.data),Tp(e),e}const gf=new Map,Op=new Set;function qr(e,t){let n=gf.get(e);return n||(n=t(),gf.set(e,n),Op.add(n)),n}const Ei=(e,t,n)=>{const i=fi(t,n);i!==void 0&&e.add(i)};class cx{constructor(t){this._config=ux(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Lp(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),Tp(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return qr(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return qr(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return qr(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,i=this.type;return qr(`${i}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const i=this._scopeCache;let r=i.get(t);return(!r||n)&&(r=new Map,i.set(t,r)),r}getOptionScopes(t,n,i){const{options:r,type:s}=this,o=this._cachedScopes(t,i),l=o.get(n);if(l)return l;const a=new Set;n.forEach(c=>{t&&(a.add(t),c.forEach(f=>Ei(a,t,f))),c.forEach(f=>Ei(a,r,f)),c.forEach(f=>Ei(a,Tn[s]||{},f)),c.forEach(f=>Ei(a,st,f)),c.forEach(f=>Ei(a,ql,f))});const u=Array.from(a);return u.length===0&&u.push(Object.create(null)),Op.has(n)&&o.set(n,u),u}chartOptionScopes(){const{options:t,type:n}=this;return[t,Tn[n]||{},st.datasets[n]||{},{type:n},st,ql]}resolveNamedOptions(t,n,i,r=[""]){const s={$shared:!0},{resolver:o,subPrefixes:l}=mf(this._resolverCache,t,r);let a=o;if(dx(o,n)){s.$shared=!1,i=sn(i)?i():i;const u=this.createResolver(t,i,l);a=di(o,i,u)}for(const u of n)s[u]=a[u];return s}createResolver(t,n,i=[""],r){const{resolver:s}=mf(this._resolverCache,t,i);return I(n)?di(s,n,void 0,r):s}}function mf(e,t,n){let i=e.get(t);i||(i=new Map,e.set(t,i));const r=n.join();let s=i.get(r);return s||(s={resolver:cu(t,n),subPrefixes:n.filter(l=>!l.toLowerCase().includes("hover"))},i.set(r,s)),s}const fx=e=>I(e)&&Object.getOwnPropertyNames(e).some(t=>sn(e[t]));function dx(e,t){const{isScriptable:n,isIndexable:i}=gp(e);for(const r of t){const s=n(r),o=i(r),l=(o||s)&&e[r];if(s&&(sn(l)||fx(l))||o&&J(l))return!0}return!1}var hx="4.4.2";const px=["top","bottom","left","right","chartArea"];function yf(e,t){return e==="top"||e==="bottom"||px.indexOf(e)===-1&&t==="x"}function vf(e,t){return function(n,i){return n[e]===i[e]?n[t]-i[t]:n[e]-i[e]}}function xf(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),Y(n&&n.onComplete,[e],t)}function gx(e){const t=e.chart,n=t.options.animation;Y(n&&n.onProgress,[e],t)}function zp(e){return hu()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const vs={},_f=e=>{const t=zp(e);return Object.values(vs).filter(n=>n.canvas===t).pop()};function mx(e,t,n){const i=Object.keys(e);for(const r of i){const s=+r;if(s>=t){const o=e[r];delete e[r],(n>0||s>t)&&(e[s+n]=o)}}}function yx(e,t,n,i){return!n||e.type==="mouseout"?null:i?t:e}function Jr(e,t,n){return e.options.clip?e[n]:t[n]}function vx(e,t){const{xScale:n,yScale:i}=e;return n&&i?{left:Jr(n,t,"left"),right:Jr(n,t,"right"),top:Jr(i,t,"top"),bottom:Jr(i,t,"bottom")}:t}var Fe;let vo=(Fe=class{static register(...t){he.add(...t),kf()}static unregister(...t){he.remove(...t),kf()}constructor(t,n){const i=this.config=new cx(n),r=zp(t),s=_f(r);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||Fv(r)),this.platform.updateConfig(i);const l=this.platform.acquireContext(r,o.aspectRatio),a=l&&l.canvas,u=a&&a.height,c=a&&a.width;if(this.id=I0(),this.ctx=l,this.canvas=a,this.width=c,this.height=u,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Jv,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=ey(f=>this.update(f),o.resizeDelay||0),this._dataChanges=[],vs[this.id]=this,!l||!a){console.error("Failed to create chart: can't acquire context from the given item");return}ke.listen(this,"complete",xf),ke.listen(this,"progress",gx),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:i,height:r,_aspectRatio:s}=this;return V(t)?n&&s?s:r?i/r:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return he}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():$c(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Bc(this.canvas,this.ctx),this}stop(){return ke.stop(this),this}resize(t,n){ke.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const i=this.options,r=this.canvas,s=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(r,t,n,s),l=i.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,$c(this,l,!0)&&(this.notifyPlugins("resize",{size:o}),Y(i.onResize,[this,o],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};B(n,(i,r)=>{i.id=r})}buildOrUpdateScales(){const t=this.options,n=t.scales,i=this.scales,r=Object.keys(i).reduce((o,l)=>(o[l]=!1,o),{});let s=[];n&&(s=s.concat(Object.keys(n).map(o=>{const l=n[o],a=ta(o,l),u=a==="r",c=a==="x";return{options:l,dposition:u?"chartArea":c?"bottom":"left",dtype:u?"radialLinear":c?"category":"linear"}}))),B(s,o=>{const l=o.options,a=l.id,u=ta(a,l),c=j(l.type,o.dtype);(l.position===void 0||yf(l.position,u)!==yf(o.dposition))&&(l.position=o.dposition),r[a]=!0;let f=null;if(a in i&&i[a].type===c)f=i[a];else{const d=he.getScale(c);f=new d({id:a,type:c,ctx:this.ctx,chart:this}),i[f.id]=f}f.init(l,t)}),B(r,(o,l)=>{o||delete i[l]}),B(i,o=>{Zt.configure(this,o,o.options),Zt.addBox(this,o)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,i=t.length;if(t.sort((r,s)=>r.index-s.index),i>n){for(let r=n;r<i;++r)this._destroyDatasetMeta(r);t.splice(n,i-n)}this._sortedMetasets=t.slice(0).sort(vf("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((i,r)=>{n.filter(s=>s===i._dataset).length===0&&this._destroyDatasetMeta(r)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let i,r;for(this._removeUnreferencedMetasets(),i=0,r=n.length;i<r;i++){const s=n[i];let o=this.getDatasetMeta(i);const l=s.type||this.config.type;if(o.type&&o.type!==l&&(this._destroyDatasetMeta(i),o=this.getDatasetMeta(i)),o.type=l,o.indexAxis=s.indexAxis||Jl(l,this.options),o.order=s.order||0,o.index=i,o.label=""+s.label,o.visible=this.isDatasetVisible(i),o.controller)o.controller.updateIndex(i),o.controller.linkScales();else{const a=he.getController(l),{datasetElementType:u,dataElementType:c}=st.datasets[l];Object.assign(a,{dataElementType:he.getElement(c),datasetElementType:u&&he.getElement(u)}),o.controller=new a(this,i),t.push(o.controller)}}return this._updateMetasets(),t}_resetElements(){B(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const i=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let u=0,c=this.data.datasets.length;u<c;u++){const{controller:f}=this.getDatasetMeta(u),d=!r&&s.indexOf(f)===-1;f.buildOrUpdateElements(d),o=Math.max(+f.getMaxOverflow(),o)}o=this._minPadding=i.layout.autoPadding?o:0,this._updateLayout(o),r||B(s,u=>{u.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(vf("z","_idx"));const{_active:l,_lastEvent:a}=this;a?this._eventHandler(a,!0):l.length&&this._updateHoverStyles(l,l,!0),this.render()}_updateScales(){B(this.scales,t=>{Zt.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),i=new Set(t.events);(!Oc(n,i)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:i,start:r,count:s}of n){const o=i==="_removeElements"?-s:s;mx(t,r,o)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,i=s=>new Set(t.filter(o=>o[0]===s).map((o,l)=>l+","+o.splice(1).join(","))),r=i(0);for(let s=1;s<n;s++)if(!Oc(r,i(s)))return;return Array.from(r).map(s=>s.split(",")).map(s=>({method:s[1],start:+s[2],count:+s[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Zt.update(this,this.width,this.height,t);const n=this.chartArea,i=n.width<=0||n.height<=0;this._layers=[],B(this.boxes,r=>{i&&r.position==="chartArea"||(r.configure&&r.configure(),this._layers.push(...r._layers()))},this),this._layers.forEach((r,s)=>{r._idx=s}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,i=this.data.datasets.length;n<i;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,i=this.data.datasets.length;n<i;++n)this._updateDataset(n,sn(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const i=this.getDatasetMeta(t),r={meta:i,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",r)!==!1&&(i.controller._update(n),r.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",r))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(ke.has(this)?this.attached&&!ke.running(this)&&ke.start(this):(this.draw(),xf({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:i,height:r}=this._resizeBeforeDraw;this._resize(i,r),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets,i=[];let r,s;for(r=0,s=n.length;r<s;++r){const o=n[r];(!t||o.visible)&&i.push(o)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,i=t._clip,r=!i.disabled,s=vx(t,this.chartArea),o={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(r&&au(n,{left:i.left===!1?0:s.left-i.left,right:i.right===!1?this.width:s.right+i.right,top:i.top===!1?0:s.top-i.top,bottom:i.bottom===!1?this.height:s.bottom+i.bottom}),t.controller.draw(),r&&uu(n),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(t){return Gn(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,i,r){const s=pv.modes[n];return typeof s=="function"?s(this,t,i,r):[]}getDatasetMeta(t){const n=this.data.datasets[t],i=this._metasets;let r=i.filter(s=>s&&s._dataset===n).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},i.push(r)),r}getContext(){return this.$context||(this.$context=Dn(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const i=this.getDatasetMeta(t);return typeof i.hidden=="boolean"?!i.hidden:!n.hidden}setDatasetVisibility(t,n){const i=this.getDatasetMeta(t);i.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,i){const r=i?"show":"hide",s=this.getDatasetMeta(t),o=s.controller._resolveAnimations(void 0,r);pr(n)?(s.data[n].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),o.update(s,{visible:i}),this.update(l=>l.datasetIndex===t?r:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),ke.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Bc(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete vs[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,n=this.platform,i=(s,o)=>{n.addEventListener(this,s,o),t[s]=o},r=(s,o,l)=>{s.offsetX=o,s.offsetY=l,this._eventHandler(s)};B(this.options.events,s=>i(s,r))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,i=(a,u)=>{n.addEventListener(this,a,u),t[a]=u},r=(a,u)=>{t[a]&&(n.removeEventListener(this,a,u),delete t[a])},s=(a,u)=>{this.canvas&&this.resize(a,u)};let o;const l=()=>{r("attach",l),this.attached=!0,this.resize(),i("resize",s),i("detach",o)};o=()=>{this.attached=!1,r("resize",s),this._stop(),this._resize(0,0),i("attach",l)},n.isAttached(this.canvas)?l():o()}unbindEvents(){B(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},B(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,i){const r=i?"set":"remove";let s,o,l,a;for(n==="dataset"&&(s=this.getDatasetMeta(t[0].datasetIndex),s.controller["_"+r+"DatasetHoverStyle"]()),l=0,a=t.length;l<a;++l){o=t[l];const u=o&&this.getDatasetMeta(o.datasetIndex).controller;u&&u[r+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],i=t.map(({datasetIndex:s,index:o})=>{const l=this.getDatasetMeta(s);if(!l)throw new Error("No dataset found at index "+s);return{datasetIndex:s,element:l.data[o],index:o}});!$s(i,n)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,n))}notifyPlugins(t,n,i){return this._plugins.notify(this,t,n,i)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,i){const r=this.options.hover,s=(a,u)=>a.filter(c=>!u.some(f=>c.datasetIndex===f.datasetIndex&&c.index===f.index)),o=s(n,t),l=i?t:s(t,n);o.length&&this.updateHoverStyle(o,r.mode,!1),l.length&&r.mode&&this.updateHoverStyle(l,r.mode,!0)}_eventHandler(t,n){const i={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},r=o=>(o.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",i,r)===!1)return;const s=this._handleEvent(t,n,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,r),(s||i.changed)&&this.render(),this}_handleEvent(t,n,i){const{_active:r=[],options:s}=this,o=n,l=this._getActiveElements(t,r,i,o),a=$0(t),u=yx(t,this._lastEvent,i,a);i&&(this._lastEvent=null,Y(s.onHover,[t,l,this],this),a&&Y(s.onClick,[t,l,this],this));const c=!$s(l,r);return(c||n)&&(this._active=l,this._updateHoverStyles(l,r,n)),this._lastEvent=u,c}_getActiveElements(t,n,i,r){if(t.type==="mouseout")return[];if(!i)return n;const s=this.options.hover;return this.getElementsAtEventForMode(t,s.mode,s,r)}},F(Fe,"defaults",st),F(Fe,"instances",vs),F(Fe,"overrides",Tn),F(Fe,"registry",he),F(Fe,"version",hx),F(Fe,"getChart",_f),Fe);function kf(){return B(vo.instances,e=>e._plugins.invalidate())}function Dp(e,t){const{x:n,y:i,base:r,width:s,height:o}=e.getProps(["x","y","base","width","height"],t);let l,a,u,c,f;return e.horizontal?(f=o/2,l=Math.min(n,r),a=Math.max(n,r),u=i-f,c=i+f):(f=s/2,l=n-f,a=n+f,u=Math.min(i,r),c=Math.max(i,r)),{left:l,top:u,right:a,bottom:c}}function Ue(e,t,n,i){return e?0:se(t,n,i)}function xx(e,t,n){const i=e.options.borderWidth,r=e.borderSkipped,s=pp(i);return{t:Ue(r.top,s.top,0,n),r:Ue(r.right,s.right,0,t),b:Ue(r.bottom,s.bottom,0,n),l:Ue(r.left,s.left,0,t)}}function _x(e,t,n){const{enableBorderRadius:i}=e.getProps(["enableBorderRadius"]),r=e.options.borderRadius,s=wn(r),o=Math.min(t,n),l=e.borderSkipped,a=i||I(r);return{topLeft:Ue(!a||l.top||l.left,s.topLeft,0,o),topRight:Ue(!a||l.top||l.right,s.topRight,0,o),bottomLeft:Ue(!a||l.bottom||l.left,s.bottomLeft,0,o),bottomRight:Ue(!a||l.bottom||l.right,s.bottomRight,0,o)}}function kx(e){const t=Dp(e),n=t.right-t.left,i=t.bottom-t.top,r=xx(e,n/2,i/2),s=_x(e,n/2,i/2);return{outer:{x:t.left,y:t.top,w:n,h:i,radius:s},inner:{x:t.left+r.l,y:t.top+r.t,w:n-r.l-r.r,h:i-r.t-r.b,radius:{topLeft:Math.max(0,s.topLeft-Math.max(r.t,r.l)),topRight:Math.max(0,s.topRight-Math.max(r.t,r.r)),bottomLeft:Math.max(0,s.bottomLeft-Math.max(r.b,r.l)),bottomRight:Math.max(0,s.bottomRight-Math.max(r.b,r.r))}}}}function el(e,t,n,i){const r=t===null,s=n===null,l=e&&!(r&&s)&&Dp(e,i);return l&&(r||Qn(t,l.left,l.right))&&(s||Qn(n,l.top,l.bottom))}function wx(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function Sx(e,t){e.rect(t.x,t.y,t.w,t.h)}function nl(e,t,n={}){const i=e.x!==n.x?-t:0,r=e.y!==n.y?-t:0,s=(e.x+e.w!==n.x+n.w?t:0)-i,o=(e.y+e.h!==n.y+n.h?t:0)-r;return{x:e.x+i,y:e.y+r,w:e.w+s,h:e.h+o,radius:e.radius}}class xs extends on{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:n,options:{borderColor:i,backgroundColor:r}}=this,{inner:s,outer:o}=kx(this),l=wx(o.radius)?gr:Sx;t.save(),(o.w!==s.w||o.h!==s.h)&&(t.beginPath(),l(t,nl(o,n,s)),t.clip(),l(t,nl(s,-n,o)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),l(t,nl(s,n)),t.fillStyle=r,t.fill(),t.restore()}inRange(t,n,i){return el(this,t,n,i)}inXRange(t,n){return el(this,t,null,n)}inYRange(t,n){return el(this,null,t,n)}getCenterPoint(t){const{x:n,y:i,base:r,horizontal:s}=this.getProps(["x","y","base","horizontal"],t);return{x:s?(n+r)/2:n,y:s?i:(i+r)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}F(xs,"id","bar"),F(xs,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),F(xs,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});const wf=(e,t)=>{let{boxHeight:n=t,boxWidth:i=t}=e;return e.usePointStyle&&(n=Math.min(n,t),i=e.pointStyleWidth||Math.min(i,t)),{boxWidth:i,boxHeight:n,itemHeight:Math.max(t,n)}},bx=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class Sf extends on{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n,i){this.maxWidth=t,this.maxHeight=n,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let n=Y(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(i=>t.filter(i,this.chart.data))),t.sort&&(n=n.sort((i,r)=>t.sort(i,r,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const i=t.labels,r=ct(i.font),s=r.size,o=this._computeTitleHeight(),{boxWidth:l,itemHeight:a}=wf(i,s);let u,c;n.font=r.string,this.isHorizontal()?(u=this.maxWidth,c=this._fitRows(o,s,l,a)+10):(c=this.maxHeight,u=this._fitCols(o,r,l,a)+10),this.width=Math.min(u,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,n,i,r){const{ctx:s,maxWidth:o,options:{labels:{padding:l}}}=this,a=this.legendHitBoxes=[],u=this.lineWidths=[0],c=r+l;let f=t;s.textAlign="left",s.textBaseline="middle";let d=-1,h=-c;return this.legendItems.forEach((m,v)=>{const x=i+n/2+s.measureText(m.text).width;(v===0||u[u.length-1]+x+2*l>o)&&(f+=c,u[u.length-(v>0?0:1)]=0,h+=c,d++),a[v]={left:0,top:h,row:d,width:x,height:r},u[u.length-1]+=x+l}),f}_fitCols(t,n,i,r){const{ctx:s,maxHeight:o,options:{labels:{padding:l}}}=this,a=this.legendHitBoxes=[],u=this.columnSizes=[],c=o-t;let f=l,d=0,h=0,m=0,v=0;return this.legendItems.forEach((x,p)=>{const{itemWidth:g,itemHeight:y}=Cx(i,n,s,x,r);p>0&&h+y+2*l>c&&(f+=d+l,u.push({width:d,height:h}),m+=d+l,v++,d=h=0),a[p]={left:m,top:h,col:v,width:g,height:y},d=Math.max(d,g),h+=y+l}),f+=d,u.push({width:d,height:h}),f}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:i,labels:{padding:r},rtl:s}}=this,o=ii(s,this.left,this.width);if(this.isHorizontal()){let l=0,a=kt(i,this.left+r,this.right-this.lineWidths[l]);for(const u of n)l!==u.row&&(l=u.row,a=kt(i,this.left+r,this.right-this.lineWidths[l])),u.top+=this.top+t+r,u.left=o.leftForLtr(o.x(a),u.width),a+=u.width+r}else{let l=0,a=kt(i,this.top+t+r,this.bottom-this.columnSizes[l].height);for(const u of n)u.col!==l&&(l=u.col,a=kt(i,this.top+t+r,this.bottom-this.columnSizes[l].height)),u.top=a,u.left+=this.left+r,u.left=o.leftForLtr(o.x(u.left),u.width),a+=u.height+r}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;au(t,this),this._draw(),uu(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:i,ctx:r}=this,{align:s,labels:o}=t,l=st.color,a=ii(t.rtl,this.left,this.width),u=ct(o.font),{padding:c}=o,f=u.size,d=f/2;let h;this.drawTitle(),r.textAlign=a.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=u.string;const{boxWidth:m,boxHeight:v,itemHeight:x}=wf(o,f),p=function(w,S,b){if(isNaN(m)||m<=0||isNaN(v)||v<0)return;r.save();const P=j(b.lineWidth,1);if(r.fillStyle=j(b.fillStyle,l),r.lineCap=j(b.lineCap,"butt"),r.lineDashOffset=j(b.lineDashOffset,0),r.lineJoin=j(b.lineJoin,"miter"),r.lineWidth=P,r.strokeStyle=j(b.strokeStyle,l),r.setLineDash(j(b.lineDash,[])),o.usePointStyle){const M={radius:v*Math.SQRT2/2,pointStyle:b.pointStyle,rotation:b.rotation,borderWidth:P},L=a.xPlus(w,m/2),R=S+d;dp(r,M,L,R,o.pointStyleWidth&&m)}else{const M=S+Math.max((f-v)/2,0),L=a.leftForLtr(w,m),R=wn(b.borderRadius);r.beginPath(),Object.values(R).some($=>$!==0)?gr(r,{x:L,y:M,w:m,h:v,radius:R}):r.rect(L,M,m,v),r.fill(),P!==0&&r.stroke()}r.restore()},g=function(w,S,b){Ln(r,b.text,w,S+x/2,u,{strikethrough:b.hidden,textAlign:a.textAlign(b.textAlign)})},y=this.isHorizontal(),_=this._computeTitleHeight();y?h={x:kt(s,this.left+c,this.right-i[0]),y:this.top+c+_,line:0}:h={x:this.left+c,y:kt(s,this.top+_+c,this.bottom-n[0].height),line:0},xp(this.ctx,t.textDirection);const k=x+c;this.legendItems.forEach((w,S)=>{r.strokeStyle=w.fontColor,r.fillStyle=w.fontColor;const b=r.measureText(w.text).width,P=a.textAlign(w.textAlign||(w.textAlign=o.textAlign)),M=m+d+b;let L=h.x,R=h.y;a.setWidth(this.width),y?S>0&&L+M+c>this.right&&(R=h.y+=k,h.line++,L=h.x=kt(s,this.left+c,this.right-i[h.line])):S>0&&R+k>this.bottom&&(L=h.x=L+n[h.line].width+c,h.line++,R=h.y=kt(s,this.top+_+c,this.bottom-n[h.line].height));const $=a.x(L);if(p($,R,w),L=ny(P,L+m+d,y?L+M:this.right,t.rtl),g(a.x(L),R,w),y)h.x+=M+c;else if(typeof w.text!="string"){const Ct=u.lineHeight;h.y+=Rp(w,Ct)+c}else h.y+=k}),_p(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,i=ct(n.font),r=bt(n.padding);if(!n.display)return;const s=ii(t.rtl,this.left,this.width),o=this.ctx,l=n.position,a=i.size/2,u=r.top+a;let c,f=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),c=this.top+u,f=kt(t.align,f,this.right-d);else{const m=this.columnSizes.reduce((v,x)=>Math.max(v,x.height),0);c=u+kt(t.align,this.top,this.bottom-m-t.labels.padding-this._computeTitleHeight())}const h=kt(l,f,f+d);o.textAlign=s.textAlign(ou(l)),o.textBaseline="middle",o.strokeStyle=n.color,o.fillStyle=n.color,o.font=i.string,Ln(o,n.text,h,c,i)}_computeTitleHeight(){const t=this.options.title,n=ct(t.font),i=bt(t.padding);return t.display?n.lineHeight+i.height:0}_getLegendItemAt(t,n){let i,r,s;if(Qn(t,this.left,this.right)&&Qn(n,this.top,this.bottom)){for(s=this.legendHitBoxes,i=0;i<s.length;++i)if(r=s[i],Qn(t,r.left,r.left+r.width)&&Qn(n,r.top,r.top+r.height))return this.legendItems[i]}return null}handleEvent(t){const n=this.options;if(!Ex(t.type,n))return;const i=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const r=this._hoveredItem,s=bx(r,i);r&&!s&&Y(n.onLeave,[t,r,this],this),this._hoveredItem=i,i&&!s&&Y(n.onHover,[t,i,this],this)}else i&&Y(n.onClick,[t,i,this],this)}}function Cx(e,t,n,i,r){const s=Mx(i,e,t,n),o=Px(r,i,t.lineHeight);return{itemWidth:s,itemHeight:o}}function Mx(e,t,n,i){let r=e.text;return r&&typeof r!="string"&&(r=r.reduce((s,o)=>s.length>o.length?s:o)),t+n.size/2+i.measureText(r).width}function Px(e,t,n){let i=e;return typeof t.text!="string"&&(i=Rp(t,n)),i}function Rp(e,t){const n=e.text?e.text.length:0;return t*n}function Ex(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var Tx={id:"legend",_element:Sf,start(e,t,n){const i=e.legend=new Sf({ctx:e.ctx,options:n,chart:e});Zt.configure(e,i,n),Zt.addBox(e,i)},stop(e){Zt.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const i=e.legend;Zt.configure(e,i,n),i.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const i=t.datasetIndex,r=n.chart;r.isDatasetVisible(i)?(r.hide(i),t.hidden=!0):(r.show(i),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:i,textAlign:r,color:s,useBorderRadius:o,borderRadius:l}}=e.legend.options;return e._getSortedDatasetMetas().map(a=>{const u=a.controller.getStyle(n?0:void 0),c=bt(u.borderWidth);return{text:t[a.index].label,fillStyle:u.backgroundColor,fontColor:s,hidden:!a.visible,lineCap:u.borderCapStyle,lineDash:u.borderDash,lineDashOffset:u.borderDashOffset,lineJoin:u.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:u.borderColor,pointStyle:i||u.pointStyle,rotation:u.rotation,textAlign:r||u.textAlign,borderRadius:o&&(l||u.borderRadius),datasetIndex:a.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class Fp extends on{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n){const i=this.options;if(this.left=0,this.top=0,!i.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=n;const r=J(i.text)?i.text.length:1;this._padding=bt(i.padding);const s=r*ct(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=s:this.width=s}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:i,bottom:r,right:s,options:o}=this,l=o.align;let a=0,u,c,f;return this.isHorizontal()?(c=kt(l,i,s),f=n+t,u=s-i):(o.position==="left"?(c=i+t,f=kt(l,r,n),a=gt*-.5):(c=s-t,f=kt(l,n,r),a=gt*.5),u=r-n),{titleX:c,titleY:f,maxWidth:u,rotation:a}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const i=ct(n.font),s=i.lineHeight/2+this._padding.top,{titleX:o,titleY:l,maxWidth:a,rotation:u}=this._drawArgs(s);Ln(t,n.text,0,0,i,{color:n.color,maxWidth:a,rotation:u,textAlign:ou(n.align),textBaseline:"middle",translation:[o,l]})}}function Lx(e,t){const n=new Fp({ctx:e.ctx,options:t,chart:e});Zt.configure(e,n,t),Zt.addBox(e,n),e.titleBlock=n}var Ox={id:"title",_element:Fp,start(e,t,n){Lx(e,n)},stop(e){const t=e.titleBlock;Zt.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const i=e.titleBlock;Zt.configure(e,i,n),i.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Fi={average(e){if(!e.length)return!1;let t,n,i=new Set,r=0,s=0;for(t=0,n=e.length;t<n;++t){const l=e[t].element;if(l&&l.hasValue()){const a=l.tooltipPosition();i.add(a.x),r+=a.y,++s}}return{x:[...i].reduce((l,a)=>l+a)/i.size,y:r/s}},nearest(e,t){if(!e.length)return!1;let n=t.x,i=t.y,r=Number.POSITIVE_INFINITY,s,o,l;for(s=0,o=e.length;s<o;++s){const a=e[s].element;if(a&&a.hasValue()){const u=a.getCenterPoint(),c=Q0(t,u);c<r&&(r=c,l=a)}}if(l){const a=l.tooltipPosition();n=a.x,i=a.y}return{x:n,y:i}}};function fe(e,t){return t&&(J(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function we(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
`)>-1?e.split(`
`):e}function zx(e,t){const{element:n,datasetIndex:i,index:r}=t,s=e.getDatasetMeta(i).controller,{label:o,value:l}=s.getLabelAndValue(r);return{chart:e,label:o,parsed:s.getParsed(r),raw:e.data.datasets[i].data[r],formattedValue:l,dataset:s.getDataset(),dataIndex:r,datasetIndex:i,element:n}}function bf(e,t){const n=e.chart.ctx,{body:i,footer:r,title:s}=e,{boxWidth:o,boxHeight:l}=t,a=ct(t.bodyFont),u=ct(t.titleFont),c=ct(t.footerFont),f=s.length,d=r.length,h=i.length,m=bt(t.padding);let v=m.height,x=0,p=i.reduce((_,k)=>_+k.before.length+k.lines.length+k.after.length,0);if(p+=e.beforeBody.length+e.afterBody.length,f&&(v+=f*u.lineHeight+(f-1)*t.titleSpacing+t.titleMarginBottom),p){const _=t.displayColors?Math.max(l,a.lineHeight):a.lineHeight;v+=h*_+(p-h)*a.lineHeight+(p-1)*t.bodySpacing}d&&(v+=t.footerMarginTop+d*c.lineHeight+(d-1)*t.footerSpacing);let g=0;const y=function(_){x=Math.max(x,n.measureText(_).width+g)};return n.save(),n.font=u.string,B(e.title,y),n.font=a.string,B(e.beforeBody.concat(e.afterBody),y),g=t.displayColors?o+2+t.boxPadding:0,B(i,_=>{B(_.before,y),B(_.lines,y),B(_.after,y)}),g=0,n.font=c.string,B(e.footer,y),n.restore(),x+=m.width,{width:x,height:v}}function Dx(e,t){const{y:n,height:i}=t;return n<i/2?"top":n>e.height-i/2?"bottom":"center"}function Rx(e,t,n,i){const{x:r,width:s}=i,o=n.caretSize+n.caretPadding;if(e==="left"&&r+s+o>t.width||e==="right"&&r-s-o<0)return!0}function Fx(e,t,n,i){const{x:r,width:s}=n,{width:o,chartArea:{left:l,right:a}}=e;let u="center";return i==="center"?u=r<=(l+a)/2?"left":"right":r<=s/2?u="left":r>=o-s/2&&(u="right"),Rx(u,e,t,n)&&(u="center"),u}function Cf(e,t,n){const i=n.yAlign||t.yAlign||Dx(e,n);return{xAlign:n.xAlign||t.xAlign||Fx(e,t,n,i),yAlign:i}}function Ax(e,t){let{x:n,width:i}=e;return t==="right"?n-=i:t==="center"&&(n-=i/2),n}function Nx(e,t,n){let{y:i,height:r}=e;return t==="top"?i+=n:t==="bottom"?i-=r+n:i-=r/2,i}function Mf(e,t,n,i){const{caretSize:r,caretPadding:s,cornerRadius:o}=e,{xAlign:l,yAlign:a}=n,u=r+s,{topLeft:c,topRight:f,bottomLeft:d,bottomRight:h}=wn(o);let m=Ax(t,l);const v=Nx(t,a,u);return a==="center"?l==="left"?m+=u:l==="right"&&(m-=u):l==="left"?m-=Math.max(c,d)+r:l==="right"&&(m+=Math.max(f,h)+r),{x:se(m,0,i.width-t.width),y:se(v,0,i.height-t.height)}}function ts(e,t,n){const i=bt(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-i.right:e.x+i.left}function Pf(e){return fe([],we(e))}function Ix(e,t,n){return Dn(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function Ef(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const Ap={beforeTitle:_e,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,i=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(i>0&&t.dataIndex<i)return n[t.dataIndex]}return""},afterTitle:_e,beforeBody:_e,beforeLabel:_e,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return V(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:_e,afterBody:_e,beforeFooter:_e,footer:_e,afterFooter:_e};function zt(e,t,n,i){const r=e[t].call(n,i);return typeof r>"u"?Ap[t].call(n,i):r}class ea extends on{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,i=this.options.setContext(this.getContext()),r=i.enabled&&n.options.animation&&i.animations,s=new kp(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=Ix(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:i}=n,r=zt(i,"beforeTitle",this,t),s=zt(i,"title",this,t),o=zt(i,"afterTitle",this,t);let l=[];return l=fe(l,we(r)),l=fe(l,we(s)),l=fe(l,we(o)),l}getBeforeBody(t,n){return Pf(zt(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:i}=n,r=[];return B(t,s=>{const o={before:[],lines:[],after:[]},l=Ef(i,s);fe(o.before,we(zt(l,"beforeLabel",this,s))),fe(o.lines,zt(l,"label",this,s)),fe(o.after,we(zt(l,"afterLabel",this,s))),r.push(o)}),r}getAfterBody(t,n){return Pf(zt(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:i}=n,r=zt(i,"beforeFooter",this,t),s=zt(i,"footer",this,t),o=zt(i,"afterFooter",this,t);let l=[];return l=fe(l,we(r)),l=fe(l,we(s)),l=fe(l,we(o)),l}_createItems(t){const n=this._active,i=this.chart.data,r=[],s=[],o=[];let l=[],a,u;for(a=0,u=n.length;a<u;++a)l.push(zx(this.chart,n[a]));return t.filter&&(l=l.filter((c,f,d)=>t.filter(c,f,d,i))),t.itemSort&&(l=l.sort((c,f)=>t.itemSort(c,f,i))),B(l,c=>{const f=Ef(t.callbacks,c);r.push(zt(f,"labelColor",this,c)),s.push(zt(f,"labelPointStyle",this,c)),o.push(zt(f,"labelTextColor",this,c))}),this.labelColors=r,this.labelPointStyles=s,this.labelTextColors=o,this.dataPoints=l,l}update(t,n){const i=this.options.setContext(this.getContext()),r=this._active;let s,o=[];if(!r.length)this.opacity!==0&&(s={opacity:0});else{const l=Fi[i.position].call(this,r,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const a=this._size=bf(this,i),u=Object.assign({},l,a),c=Cf(this.chart,i,u),f=Mf(i,u,c,this.chart);this.xAlign=c.xAlign,this.yAlign=c.yAlign,s={opacity:1,x:f.x,y:f.y,width:a.width,height:a.height,caretX:l.x,caretY:l.y}}this._tooltipItems=o,this.$context=void 0,s&&this._resolveAnimations().update(this,s),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,i,r){const s=this.getCaretPosition(t,i,r);n.lineTo(s.x1,s.y1),n.lineTo(s.x2,s.y2),n.lineTo(s.x3,s.y3)}getCaretPosition(t,n,i){const{xAlign:r,yAlign:s}=this,{caretSize:o,cornerRadius:l}=i,{topLeft:a,topRight:u,bottomLeft:c,bottomRight:f}=wn(l),{x:d,y:h}=t,{width:m,height:v}=n;let x,p,g,y,_,k;return s==="center"?(_=h+v/2,r==="left"?(x=d,p=x-o,y=_+o,k=_-o):(x=d+m,p=x+o,y=_-o,k=_+o),g=x):(r==="left"?p=d+Math.max(a,c)+o:r==="right"?p=d+m-Math.max(u,f)-o:p=this.caretX,s==="top"?(y=h,_=y-o,x=p-o,g=p+o):(y=h+v,_=y+o,x=p+o,g=p-o),k=y),{x1:x,x2:p,x3:g,y1:y,y2:_,y3:k}}drawTitle(t,n,i){const r=this.title,s=r.length;let o,l,a;if(s){const u=ii(i.rtl,this.x,this.width);for(t.x=ts(this,i.titleAlign,i),n.textAlign=u.textAlign(i.titleAlign),n.textBaseline="middle",o=ct(i.titleFont),l=i.titleSpacing,n.fillStyle=i.titleColor,n.font=o.string,a=0;a<s;++a)n.fillText(r[a],u.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+l,a+1===s&&(t.y+=i.titleMarginBottom-l)}}_drawColorBox(t,n,i,r,s){const o=this.labelColors[i],l=this.labelPointStyles[i],{boxHeight:a,boxWidth:u}=s,c=ct(s.bodyFont),f=ts(this,"left",s),d=r.x(f),h=a<c.lineHeight?(c.lineHeight-a)/2:0,m=n.y+h;if(s.usePointStyle){const v={radius:Math.min(u,a)/2,pointStyle:l.pointStyle,rotation:l.rotation,borderWidth:1},x=r.leftForLtr(d,u)+u/2,p=m+a/2;t.strokeStyle=s.multiKeyBackground,t.fillStyle=s.multiKeyBackground,Hc(t,v,x,p),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,Hc(t,v,x,p)}else{t.lineWidth=I(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,t.strokeStyle=o.borderColor,t.setLineDash(o.borderDash||[]),t.lineDashOffset=o.borderDashOffset||0;const v=r.leftForLtr(d,u),x=r.leftForLtr(r.xPlus(d,1),u-2),p=wn(o.borderRadius);Object.values(p).some(g=>g!==0)?(t.beginPath(),t.fillStyle=s.multiKeyBackground,gr(t,{x:v,y:m,w:u,h:a,radius:p}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),gr(t,{x,y:m+1,w:u-2,h:a-2,radius:p}),t.fill()):(t.fillStyle=s.multiKeyBackground,t.fillRect(v,m,u,a),t.strokeRect(v,m,u,a),t.fillStyle=o.backgroundColor,t.fillRect(x,m+1,u-2,a-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,n,i){const{body:r}=this,{bodySpacing:s,bodyAlign:o,displayColors:l,boxHeight:a,boxWidth:u,boxPadding:c}=i,f=ct(i.bodyFont);let d=f.lineHeight,h=0;const m=ii(i.rtl,this.x,this.width),v=function(b){n.fillText(b,m.x(t.x+h),t.y+d/2),t.y+=d+s},x=m.textAlign(o);let p,g,y,_,k,w,S;for(n.textAlign=o,n.textBaseline="middle",n.font=f.string,t.x=ts(this,x,i),n.fillStyle=i.bodyColor,B(this.beforeBody,v),h=l&&x!=="right"?o==="center"?u/2+c:u+2+c:0,_=0,w=r.length;_<w;++_){for(p=r[_],g=this.labelTextColors[_],n.fillStyle=g,B(p.before,v),y=p.lines,l&&y.length&&(this._drawColorBox(n,t,_,m,i),d=Math.max(f.lineHeight,a)),k=0,S=y.length;k<S;++k)v(y[k]),d=f.lineHeight;B(p.after,v)}h=0,d=f.lineHeight,B(this.afterBody,v),t.y-=s}drawFooter(t,n,i){const r=this.footer,s=r.length;let o,l;if(s){const a=ii(i.rtl,this.x,this.width);for(t.x=ts(this,i.footerAlign,i),t.y+=i.footerMarginTop,n.textAlign=a.textAlign(i.footerAlign),n.textBaseline="middle",o=ct(i.footerFont),n.fillStyle=i.footerColor,n.font=o.string,l=0;l<s;++l)n.fillText(r[l],a.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+i.footerSpacing}}drawBackground(t,n,i,r){const{xAlign:s,yAlign:o}=this,{x:l,y:a}=t,{width:u,height:c}=i,{topLeft:f,topRight:d,bottomLeft:h,bottomRight:m}=wn(r.cornerRadius);n.fillStyle=r.backgroundColor,n.strokeStyle=r.borderColor,n.lineWidth=r.borderWidth,n.beginPath(),n.moveTo(l+f,a),o==="top"&&this.drawCaret(t,n,i,r),n.lineTo(l+u-d,a),n.quadraticCurveTo(l+u,a,l+u,a+d),o==="center"&&s==="right"&&this.drawCaret(t,n,i,r),n.lineTo(l+u,a+c-m),n.quadraticCurveTo(l+u,a+c,l+u-m,a+c),o==="bottom"&&this.drawCaret(t,n,i,r),n.lineTo(l+h,a+c),n.quadraticCurveTo(l,a+c,l,a+c-h),o==="center"&&s==="left"&&this.drawCaret(t,n,i,r),n.lineTo(l,a+f),n.quadraticCurveTo(l,a,l+f,a),n.closePath(),n.fill(),r.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,i=this.$animations,r=i&&i.x,s=i&&i.y;if(r||s){const o=Fi[t.position].call(this,this._active,this._eventPosition);if(!o)return;const l=this._size=bf(this,t),a=Object.assign({},o,this._size),u=Cf(n,t,a),c=Mf(t,a,u,n);(r._to!==c.x||s._to!==c.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=l.width,this.height=l.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,c))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(n);const r={width:this.width,height:this.height},s={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=bt(n.padding),l=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&l&&(t.save(),t.globalAlpha=i,this.drawBackground(s,t,r,n),xp(t,n.textDirection),s.y+=o.top,this.drawTitle(s,t,n),this.drawBody(s,t,n),this.drawFooter(s,t,n),_p(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const i=this._active,r=t.map(({datasetIndex:l,index:a})=>{const u=this.chart.getDatasetMeta(l);if(!u)throw new Error("Cannot find a dataset at index "+l);return{datasetIndex:l,element:u.data[a],index:a}}),s=!$s(i,r),o=this._positionChanged(r,n);(s||o)&&(this._active=r,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,i=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,s=this._active||[],o=this._getActiveElements(t,s,n,i),l=this._positionChanged(o,t),a=n||!$s(o,s)||l;return a&&(this._active=o,(r.enabled||r.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),a}_getActiveElements(t,n,i,r){const s=this.options;if(t.type==="mouseout")return[];if(!r)return n.filter(l=>this.chart.data.datasets[l.datasetIndex]&&this.chart.getDatasetMeta(l.datasetIndex).controller.getParsed(l.index)!==void 0);const o=this.chart.getElementsAtEventForMode(t,s.mode,s,i);return s.reverse&&o.reverse(),o}_positionChanged(t,n){const{caretX:i,caretY:r,options:s}=this,o=Fi[s.position].call(this,t,n);return o!==!1&&(i!==o.x||r!==o.y)}}F(ea,"positioners",Fi);var jx={id:"tooltip",_element:ea,positioners:Fi,afterInit(e,t,n){n&&(e.tooltip=new ea({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Ap},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const Bx=(e,t,n,i)=>(typeof t=="string"?(n=e.push(t)-1,i.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function Hx(e,t,n,i){const r=e.indexOf(t);if(r===-1)return Bx(e,t,n,i);const s=e.lastIndexOf(t);return r!==s?n:r}const Vx=(e,t)=>e===null?null:se(Math.round(e),0,t);function Tf(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class na extends Rn{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const i=this.getLabels();for(const{index:r,label:s}of n)i[r]===s&&i.splice(r,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(V(t))return null;const i=this.getLabels();return n=isFinite(n)&&i[n]===t?n:Hx(i,t,j(n,t),this._addedLabels),Vx(n,i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:i,max:r}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(i=0),n||(r=this.getLabels().length-1)),this.min=i,this.max=r}buildTicks(){const t=this.min,n=this.max,i=this.options.offset,r=[];let s=this.getLabels();s=t===0&&n===s.length-1?s:s.slice(t,n+1),this._valueRange=Math.max(s.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let o=t;o<=n;o++)r.push({value:o});return r}getLabelForValue(t){return Tf.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}F(na,"id","category"),F(na,"defaults",{ticks:{callback:Tf}});function Wx(e,t){const n=[],{bounds:r,step:s,min:o,max:l,precision:a,count:u,maxTicks:c,maxDigits:f,includeBounds:d}=e,h=s||1,m=c-1,{min:v,max:x}=t,p=!V(o),g=!V(l),y=!V(u),_=(x-v)/(f+1);let k=Dc((x-v)/m/h)*h,w,S,b,P;if(k<1e-14&&!p&&!g)return[{value:v},{value:x}];P=Math.ceil(x/k)-Math.floor(v/k),P>m&&(k=Dc(P*k/m/h)*h),V(a)||(w=Math.pow(10,a),k=Math.ceil(k*w)/w),r==="ticks"?(S=Math.floor(v/k)*k,b=Math.ceil(x/k)*k):(S=v,b=x),p&&g&&s&&K0((l-o)/s,k/1e3)?(P=Math.round(Math.min((l-o)/k,c)),k=(l-o)/P,S=o,b=l):y?(S=p?o:S,b=g?l:b,P=u-1,k=(b-S)/P):(P=(b-S)/k,gs(P,Math.round(P),k/1e3)?P=Math.round(P):P=Math.ceil(P));const M=Math.max(Rc(k),Rc(S));w=Math.pow(10,V(a)?M:a),S=Math.round(S*w)/w,b=Math.round(b*w)/w;let L=0;for(p&&(d&&S!==o?(n.push({value:o}),S<o&&L++,gs(Math.round((S+L*k)*w)/w,o,Lf(o,_,e))&&L++):S<o&&L++);L<P;++L){const R=Math.round((S+L*k)*w)/w;if(g&&R>l)break;n.push({value:R})}return g&&d&&b!==l?n.length&&gs(n[n.length-1].value,l,Lf(l,_,e))?n[n.length-1].value=l:n.push({value:l}):(!g||b===l)&&n.push({value:b}),n}function Lf(e,t,{horizontal:n,minRotation:i}){const r=$e(i),s=(n?Math.sin(r):Math.cos(r))||.001,o=.75*t*(""+e).length;return Math.min(t/s,o)}class Zs extends Rn{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return V(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:i}=this.getUserBounds();let{min:r,max:s}=this;const o=a=>r=n?r:a,l=a=>s=i?s:a;if(t){const a=en(r),u=en(s);a<0&&u<0?l(0):a>0&&u>0&&o(0)}if(r===s){let a=s===0?1:Math.abs(s*.05);l(s+a),t||o(r-a)}this.min=r,this.max=s}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:i}=t,r;return i?(r=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,r>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${r} ticks. Limiting to 1000.`),r=1e3)):(r=this.computeTickLimit(),n=n||11),n&&(r=Math.min(n,r)),r}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const r={maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},s=this._range||this,o=Wx(r,s);return t.bounds==="ticks"&&sp(o,this,"value"),t.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const t=this.ticks;let n=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const r=(i-n)/Math.max(t.length-1,1)/2;n-=r,i+=r}this._startValue=n,this._endValue=i,this._valueRange=i-n}getLabelForValue(t){return lu(t,this.chart.options.locale,this.options.ticks.format)}}class ia extends Zs{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=ht(t)?t:0,this.max=ht(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,i=$e(this.options.ticks.minRotation),r=(t?Math.sin(i):Math.cos(i))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,s.lineHeight/r))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}F(ia,"id","linear"),F(ia,"defaults",{ticks:{callback:mo.formatters.numeric}});const yr=e=>Math.floor(We(e)),hn=(e,t)=>Math.pow(10,yr(e)+t);function Of(e){return e/Math.pow(10,yr(e))===1}function zf(e,t,n){const i=Math.pow(10,n),r=Math.floor(e/i);return Math.ceil(t/i)-r}function $x(e,t){const n=t-e;let i=yr(n);for(;zf(e,t,i)>10;)i++;for(;zf(e,t,i)<10;)i--;return Math.min(i,yr(e))}function Ux(e,{min:t,max:n}){t=jt(e.min,t);const i=[],r=yr(t);let s=$x(t,n),o=s<0?Math.pow(10,Math.abs(s)):1;const l=Math.pow(10,s),a=r>s?Math.pow(10,r):0,u=Math.round((t-a)*o)/o,c=Math.floor((t-a)/l/10)*l*10;let f=Math.floor((u-c)/Math.pow(10,s)),d=jt(e.min,Math.round((a+c+f*Math.pow(10,s))*o)/o);for(;d<n;)i.push({value:d,major:Of(d),significand:f}),f>=10?f=f<15?15:20:f++,f>=20&&(s++,f=2,o=s>=0?1:o),d=Math.round((a+c+f*Math.pow(10,s))*o)/o;const h=jt(e.max,d);return i.push({value:h,major:Of(h),significand:f}),i}class Df extends Rn{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){const i=Zs.prototype.parse.apply(this,[t,n]);if(i===0){this._zero=!0;return}return ht(i)&&i>0?i:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=ht(t)?Math.max(0,t):null,this.max=ht(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!ht(this._userMin)&&(this.min=t===hn(this.min,0)?hn(this.min,-1):hn(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let i=this.min,r=this.max;const s=l=>i=t?i:l,o=l=>r=n?r:l;i===r&&(i<=0?(s(1),o(10)):(s(hn(i,-1)),o(hn(r,1)))),i<=0&&s(hn(r,-1)),r<=0&&o(hn(i,1)),this.min=i,this.max=r}buildTicks(){const t=this.options,n={min:this._userMin,max:this._userMax},i=Ux(n,this);return t.bounds==="ticks"&&sp(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(t){return t===void 0?"0":lu(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=We(t),this._valueRange=We(this.max)-We(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(We(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}F(Df,"id","logarithmic"),F(Df,"defaults",{ticks:{callback:mo.formatters.logarithmic,major:{enabled:!0}}});function ra(e){const t=e.ticks;if(t.display&&e.display){const n=bt(t.backdropPadding);return j(t.font&&t.font.size,st.font.size)+n.height}return 0}function Yx(e,t,n){return n=J(n)?n:[n],{w:dy(e,t.string,n),h:n.length*t.lineHeight}}function Rf(e,t,n,i,r){return e===i||e===r?{start:t-n/2,end:t+n/2}:e<i||e>r?{start:t-n,end:t}:{start:t,end:t+n}}function Kx(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),i=[],r=[],s=e._pointLabels.length,o=e.options.pointLabels,l=o.centerPointLabels?gt/s:0;for(let a=0;a<s;a++){const u=o.setContext(e.getPointLabelContext(a));r[a]=u.padding;const c=e.getPointPosition(a,e.drawingArea+r[a],l),f=ct(u.font),d=Yx(e.ctx,f,e._pointLabels[a]);i[a]=d;const h=pe(e.getIndexAngle(a)+l),m=Math.round(ru(h)),v=Rf(m,c.x,d.w,0,180),x=Rf(m,c.y,d.h,90,270);Xx(n,t,h,v,x)}e.setCenterPoint(t.l-n.l,n.r-t.r,t.t-n.t,n.b-t.b),e._pointLabelItems=Zx(e,i,r)}function Xx(e,t,n,i,r){const s=Math.abs(Math.sin(n)),o=Math.abs(Math.cos(n));let l=0,a=0;i.start<t.l?(l=(t.l-i.start)/s,e.l=Math.min(e.l,t.l-l)):i.end>t.r&&(l=(i.end-t.r)/s,e.r=Math.max(e.r,t.r+l)),r.start<t.t?(a=(t.t-r.start)/o,e.t=Math.min(e.t,t.t-a)):r.end>t.b&&(a=(r.end-t.b)/o,e.b=Math.max(e.b,t.b+a))}function Qx(e,t,n){const i=e.drawingArea,{extra:r,additionalAngle:s,padding:o,size:l}=n,a=e.getPointPosition(t,i+r+o,s),u=Math.round(ru(pe(a.angle+Vt))),c=t1(a.y,l.h,u),f=qx(u),d=Jx(a.x,l.w,f);return{visible:!0,x:a.x,y:c,textAlign:f,left:d,top:c,right:d+l.w,bottom:c+l.h}}function Gx(e,t){if(!t)return!0;const{left:n,top:i,right:r,bottom:s}=e;return!(Gn({x:n,y:i},t)||Gn({x:n,y:s},t)||Gn({x:r,y:i},t)||Gn({x:r,y:s},t))}function Zx(e,t,n){const i=[],r=e._pointLabels.length,s=e.options,{centerPointLabels:o,display:l}=s.pointLabels,a={extra:ra(s)/2,additionalAngle:o?gt/r:0};let u;for(let c=0;c<r;c++){a.padding=n[c],a.size=t[c];const f=Qx(e,c,a);i.push(f),l==="auto"&&(f.visible=Gx(f,u),f.visible&&(u=f))}return i}function qx(e){return e===0||e===180?"center":e<180?"left":"right"}function Jx(e,t,n){return n==="right"?e-=t:n==="center"&&(e-=t/2),e}function t1(e,t,n){return n===90||n===270?e-=t/2:(n>270||n<90)&&(e-=t),e}function e1(e,t,n){const{left:i,top:r,right:s,bottom:o}=n,{backdropColor:l}=t;if(!V(l)){const a=wn(t.borderRadius),u=bt(t.backdropPadding);e.fillStyle=l;const c=i-u.left,f=r-u.top,d=s-i+u.width,h=o-r+u.height;Object.values(a).some(m=>m!==0)?(e.beginPath(),gr(e,{x:c,y:f,w:d,h,radius:a}),e.fill()):e.fillRect(c,f,d,h)}}function n1(e,t){const{ctx:n,options:{pointLabels:i}}=e;for(let r=t-1;r>=0;r--){const s=e._pointLabelItems[r];if(!s.visible)continue;const o=i.setContext(e.getPointLabelContext(r));e1(n,o,s);const l=ct(o.font),{x:a,y:u,textAlign:c}=s;Ln(n,e._pointLabels[r],a,u+l.lineHeight/2,l,{color:o.color,textAlign:c,textBaseline:"middle"})}}function Np(e,t,n,i){const{ctx:r}=e;if(n)r.arc(e.xCenter,e.yCenter,t,0,ve);else{let s=e.getPointPosition(0,t);r.moveTo(s.x,s.y);for(let o=1;o<i;o++)s=e.getPointPosition(o,t),r.lineTo(s.x,s.y)}}function i1(e,t,n,i,r){const s=e.ctx,o=t.circular,{color:l,lineWidth:a}=t;!o&&!i||!l||!a||n<0||(s.save(),s.strokeStyle=l,s.lineWidth=a,s.setLineDash(r.dash),s.lineDashOffset=r.dashOffset,s.beginPath(),Np(e,n,o,i),s.closePath(),s.stroke(),s.restore())}function r1(e,t,n){return Dn(e,{label:n,index:t,type:"pointLabel"})}class es extends Zs{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=bt(ra(this.options)/2),n=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+n/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(n,i)/2)}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!1);this.min=ht(t)&&!isNaN(t)?t:0,this.max=ht(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/ra(this.options))}generateTickLabels(t){Zs.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((n,i)=>{const r=Y(this.options.pointLabels.callback,[n,i],this);return r||r===0?r:""}).filter((n,i)=>this.chart.getDataVisibility(i))}fit(){const t=this.options;t.display&&t.pointLabels.display?Kx(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,n,i,r){this.xCenter+=Math.floor((t-n)/2),this.yCenter+=Math.floor((i-r)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,n,i,r))}getIndexAngle(t){const n=ve/(this._pointLabels.length||1),i=this.options.startAngle||0;return pe(t*n+$e(i))}getDistanceFromCenterForValue(t){if(V(t))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*n:(t-this.min)*n}getValueForDistanceFromCenter(t){if(V(t))return NaN;const n=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(t){const n=this._pointLabels||[];if(t>=0&&t<n.length){const i=n[t];return r1(this.getContext(),t,i)}}getPointPosition(t,n,i=0){const r=this.getIndexAngle(t)-Vt+i;return{x:Math.cos(r)*n+this.xCenter,y:Math.sin(r)*n+this.yCenter,angle:r}}getPointPositionForValue(t,n){return this.getPointPosition(t,this.getDistanceFromCenterForValue(n))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:n,top:i,right:r,bottom:s}=this._pointLabelItems[t];return{left:n,top:i,right:r,bottom:s}}drawBackground(){const{backgroundColor:t,grid:{circular:n}}=this.options;if(t){const i=this.ctx;i.save(),i.beginPath(),Np(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){const t=this.ctx,n=this.options,{angleLines:i,grid:r,border:s}=n,o=this._pointLabels.length;let l,a,u;if(n.pointLabels.display&&n1(this,o),r.display&&this.ticks.forEach((c,f)=>{if(f!==0||f===0&&this.min<0){a=this.getDistanceFromCenterForValue(c.value);const d=this.getContext(f),h=r.setContext(d),m=s.setContext(d);i1(this,h,a,o,m)}}),i.display){for(t.save(),l=o-1;l>=0;l--){const c=i.setContext(this.getPointLabelContext(l)),{color:f,lineWidth:d}=c;!d||!f||(t.lineWidth=d,t.strokeStyle=f,t.setLineDash(c.borderDash),t.lineDashOffset=c.borderDashOffset,a=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),u=this.getPointPosition(l,a),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(u.x,u.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,n=this.options,i=n.ticks;if(!i.display)return;const r=this.getIndexAngle(0);let s,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(r),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((l,a)=>{if(a===0&&this.min>=0&&!n.reverse)return;const u=i.setContext(this.getContext(a)),c=ct(u.font);if(s=this.getDistanceFromCenterForValue(this.ticks[a].value),u.showLabelBackdrop){t.font=c.string,o=t.measureText(l.label).width,t.fillStyle=u.backdropColor;const f=bt(u.backdropPadding);t.fillRect(-o/2-f.left,-s-c.size/2-f.top,o+f.width,c.size+f.height)}Ln(t,l.label,0,-s,c,{color:u.color,strokeColor:u.textStrokeColor,strokeWidth:u.textStrokeWidth})}),t.restore()}drawTitle(){}}F(es,"id","radialLinear"),F(es,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:mo.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),F(es,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),F(es,"descriptors",{angleLines:{_fallback:"grid"}});const xo={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Rt=Object.keys(xo);function Ff(e,t){return e-t}function Af(e,t){if(V(t))return null;const n=e._adapter,{parser:i,round:r,isoWeekday:s}=e._parseOpts;let o=t;return typeof i=="function"&&(o=i(o)),ht(o)||(o=typeof i=="string"?n.parse(o,i):n.parse(o)),o===null?null:(r&&(o=r==="week"&&(Ks(s)||s===!0)?n.startOf(o,"isoWeek",s):n.startOf(o,r)),+o)}function Nf(e,t,n,i){const r=Rt.length;for(let s=Rt.indexOf(e);s<r-1;++s){const o=xo[Rt[s]],l=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((n-t)/(l*o.size))<=i)return Rt[s]}return Rt[r-1]}function s1(e,t,n,i,r){for(let s=Rt.length-1;s>=Rt.indexOf(n);s--){const o=Rt[s];if(xo[o].common&&e._adapter.diff(r,i,o)>=t-1)return o}return Rt[n?Rt.indexOf(n):0]}function o1(e){for(let t=Rt.indexOf(e)+1,n=Rt.length;t<n;++t)if(xo[Rt[t]].common)return Rt[t]}function If(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:i,hi:r}=su(n,t),s=n[i]>=t?n[i]:n[r];e[s]=!0}}function l1(e,t,n,i){const r=e._adapter,s=+r.startOf(t[0].value,i),o=t[t.length-1].value;let l,a;for(l=s;l<=o;l=+r.add(l,1,i))a=n[l],a>=0&&(t[a].major=!0);return t}function jf(e,t,n){const i=[],r={},s=t.length;let o,l;for(o=0;o<s;++o)l=t[o],r[l]=o,i.push({value:l,major:!1});return s===0||!n?i:l1(e,i,r,n)}class qs extends Rn{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){const i=t.time||(t.time={}),r=this._adapter=new uv._date(t.adapters.date);r.init(n),Ui(i.displayFormats,r.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:Af(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,i=t.time.unit||"day";let{min:r,max:s,minDefined:o,maxDefined:l}=this.getUserBounds();function a(u){!o&&!isNaN(u.min)&&(r=Math.min(r,u.min)),!l&&!isNaN(u.max)&&(s=Math.max(s,u.max))}(!o||!l)&&(a(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&a(this.getMinMax(!1))),r=ht(r)&&!isNaN(r)?r:+n.startOf(Date.now(),i),s=ht(s)&&!isNaN(s)?s:+n.endOf(Date.now(),i)+1,this.min=Math.min(r,s-1),this.max=Math.max(r+1,s)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],i=t[t.length-1]),{min:n,max:i}}buildTicks(){const t=this.options,n=t.time,i=t.ticks,r=i.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&r.length&&(this.min=this._userMin||r[0],this.max=this._userMax||r[r.length-1]);const s=this.min,o=this.max,l=J0(r,s,o);return this._unit=n.unit||(i.autoSkip?Nf(n.minUnit,this.min,this.max,this._getLabelCapacity(s)):s1(this,l.length,n.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:o1(this._unit),this.initOffsets(r),t.reverse&&l.reverse(),jf(this,l,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,i=0,r,s;this.options.offset&&t.length&&(r=this.getDecimalForValue(t[0]),t.length===1?n=1-r:n=(this.getDecimalForValue(t[1])-r)/2,s=this.getDecimalForValue(t[t.length-1]),t.length===1?i=s:i=(s-this.getDecimalForValue(t[t.length-2]))/2);const o=t.length<3?.5:.25;n=se(n,0,o),i=se(i,0,o),this._offsets={start:n,end:i,factor:1/(n+1+i)}}_generate(){const t=this._adapter,n=this.min,i=this.max,r=this.options,s=r.time,o=s.unit||Nf(s.minUnit,n,i,this._getLabelCapacity(n)),l=j(r.ticks.stepSize,1),a=o==="week"?s.isoWeekday:!1,u=Ks(a)||a===!0,c={};let f=n,d,h;if(u&&(f=+t.startOf(f,"isoWeek",a)),f=+t.startOf(f,u?"day":o),t.diff(i,n,o)>1e5*l)throw new Error(n+" and "+i+" are too far apart with stepSize of "+l+" "+o);const m=r.ticks.source==="data"&&this.getDataTimestamps();for(d=f,h=0;d<i;d=+t.add(d,l,o),h++)If(c,d,m);return(d===i||r.bounds==="ticks"||h===1)&&If(c,d,m),Object.keys(c).sort(Ff).map(v=>+v)}getLabelForValue(t){const n=this._adapter,i=this.options.time;return i.tooltipFormat?n.format(t,i.tooltipFormat):n.format(t,i.displayFormats.datetime)}format(t,n){const r=this.options.time.displayFormats,s=this._unit,o=n||r[s];return this._adapter.format(t,o)}_tickFormatFunction(t,n,i,r){const s=this.options,o=s.ticks.callback;if(o)return Y(o,[t,n,i],this);const l=s.time.displayFormats,a=this._unit,u=this._majorUnit,c=a&&l[a],f=u&&l[u],d=i[n],h=u&&f&&d&&d.major;return this._adapter.format(t,r||(h?f:c))}generateTickLabels(t){let n,i,r;for(n=0,i=t.length;n<i;++n)r=t[n],r.label=this._tickFormatFunction(r.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+i)*n.factor)}getValueForPixel(t){const n=this._offsets,i=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,i=this.ctx.measureText(t).width,r=$e(this.isHorizontal()?n.maxRotation:n.minRotation),s=Math.cos(r),o=Math.sin(r),l=this._resolveTickFontOptions(0).size;return{w:i*s+l*o,h:i*o+l*s}}_getLabelCapacity(t){const n=this.options.time,i=n.displayFormats,r=i[n.unit]||i.millisecond,s=this._tickFormatFunction(t,0,jf(this,[t],this._majorUnit),r),o=this._getLabelSize(s),l=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return l>0?l:1}getDataTimestamps(){let t=this._cache.data||[],n,i;if(t.length)return t;const r=this.getMatchingVisibleMetas();if(this._normalized&&r.length)return this._cache.data=r[0].controller.getAllParsedValues(this);for(n=0,i=r.length;n<i;++n)t=t.concat(r[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,i;if(t.length)return t;const r=this.getLabels();for(n=0,i=r.length;n<i;++n)t.push(Af(this,r[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return lp(t.sort(Ff))}}F(qs,"id","time"),F(qs,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function ns(e,t,n){let i=0,r=e.length-1,s,o,l,a;n?(t>=e[i].pos&&t<=e[r].pos&&({lo:i,hi:r}=Zl(e,"pos",t)),{pos:s,time:l}=e[i],{pos:o,time:a}=e[r]):(t>=e[i].time&&t<=e[r].time&&({lo:i,hi:r}=Zl(e,"time",t)),{time:s,pos:l}=e[i],{time:o,pos:a}=e[r]);const u=o-s;return u?l+(a-l)*(t-s)/u:l}class Bf extends qs{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=ns(n,this.min),this._tableRange=ns(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:i}=this,r=[],s=[];let o,l,a,u,c;for(o=0,l=t.length;o<l;++o)u=t[o],u>=n&&u<=i&&r.push(u);if(r.length<2)return[{time:n,pos:0},{time:i,pos:1}];for(o=0,l=r.length;o<l;++o)c=r[o+1],a=r[o-1],u=r[o],Math.round((c+a)/2)!==u&&s.push({time:u,pos:o/(l-1)});return s}_generate(){const t=this.min,n=this.max;let i=super.getDataTimestamps();return(!i.includes(t)||!i.length)&&i.splice(0,0,t),(!i.includes(n)||i.length===1)&&i.push(n),i.sort((r,s)=>r-s)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),i=this.getLabelTimestamps();return n.length&&i.length?t=this.normalize(n.concat(i)):t=n.length?n:i,t=this._cache.all=t,t}getDecimalForValue(t){return(ns(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,i=this.getDecimalForPixel(t)/n.factor-n.end;return ns(this._table,i*this._tableRange+this._minPos,!0)}}F(Bf,"id","timeseries"),F(Bf,"defaults",qs.defaults);const Ip="label";function Hf(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function a1(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function jp(e,t){e.labels=t}function Bp(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ip;const i=[];e.datasets=t.map(r=>{const s=e.datasets.find(o=>o[n]===r[n]);return!s||!r.data||i.includes(s)?{...r}:(i.push(s),Object.assign(s,r),s)})}function u1(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ip;const n={labels:[],datasets:[]};return jp(n,e.labels),Bp(n,e.datasets,t),n}function c1(e,t){const{height:n=150,width:i=300,redraw:r=!1,datasetIdKey:s,type:o,data:l,options:a,plugins:u=[],fallbackContent:c,updateMode:f,...d}=e,h=W.useRef(null),m=W.useRef(),v=()=>{h.current&&(m.current=new vo(h.current,{type:o,data:u1(l,s),options:a&&{...a},plugins:u}),Hf(t,m.current))},x=()=>{Hf(t,null),m.current&&(m.current.destroy(),m.current=null)};return W.useEffect(()=>{!r&&m.current&&a&&a1(m.current,a)},[r,a]),W.useEffect(()=>{!r&&m.current&&jp(m.current.config.data,l.labels)},[r,l.labels]),W.useEffect(()=>{!r&&m.current&&l.datasets&&Bp(m.current.config.data,l.datasets,s)},[r,l.datasets]),W.useEffect(()=>{m.current&&(r?(x(),setTimeout(v)):m.current.update(f))},[r,a,l.labels,l.datasets,f]),W.useEffect(()=>{m.current&&(x(),setTimeout(v))},[o]),W.useEffect(()=>(v(),()=>x()),[]),ua.createElement("canvas",Object.assign({ref:h,role:"img",height:n,width:i},d),c)}const f1=W.forwardRef(c1);function d1(e,t){return vo.register(t),W.forwardRef((n,i)=>ua.createElement(f1,Object.assign({},n,{ref:i,type:e})))}const h1=d1("bar",ms);vo.register(na,ia,xs,Ox,jx,Tx);function p1(){var b;const e=new URLSearchParams(window.location.search),t=e.get("tokenizer"),n=e.get("text"),[i]=W.useState([]),[r,s]=W.useState({"Xenova/gpt-4o":{tokenIds:[],decodedTokens:[],margins:[]},"Xenova/gpt-4":{tokenIds:[],decodedTokens:[],margins:[]}}),[o,l]=W.useState("text"),[a,u]=W.useState(!0),[c,f]=W.useState(t??"Xenova/gpt-4"),[d,h]=W.useState(!1),m=W.useRef(null),v=W.useRef(null),x=W.useRef(null),p={responsive:!0,plugins:{legend:{position:"bottom"}}},g=Object.keys(r),y={labels:g,datasets:[{label:"Tokenizer Arena",data:g.map(P=>r[P].tokenIds.length),backgroundColor:"rgba(216, 180, 254, 0.7)"}]};W.useEffect(()=>{x.current||(x.current=new Worker(new URL("/assets/worker-81f59b56.js",self.location),{type:"module"}));function P(L,R,$,Ct,Z,tt){tt(ft=>({...ft,[L]:{tokenIds:[...R],decodedTokens:[...$],margins:[...Ct]}}))}const M=L=>{P(L.data.model_id,L.data.token_ids,L.data.decoded,L.data.margins,r,s)};return x.current.addEventListener("message",M),()=>x.current.removeEventListener("message",M)},[r]);const _=W.useCallback(P=>{const M=P.target.value;M.length>1e4&&(l(null),console.log("User most likely pasted in a large body of text (> 10k chars), so we hide the output (until specifically requested by the user).")),Object.entries(r).forEach(([L])=>{x.current.postMessage({model_id:L,text:M})})},[r]);W.useEffect(()=>{n&&_({target:{value:n}})},[_,n]);const k=W.useCallback(P=>{const M=P.target.value;f(M),M!=="custom"?s(L=>({...L,[M]:{tokenIds:[],decodedTokens:[],margins:[]}})):(f(""),h(!0)),x.current.postMessage({model_id:M,text:m.current.value})},[]),w=()=>{c!=""&&s(P=>({...P,[c]:{tokenIds:[],decodedTokens:[],margins:[]}})),h(!1)},S=P=>{s(M=>{const L={...M};return f(""),delete L[P],L})};return O.jsxs("div",{className:"w-full max-w-100vw flex flex-col gap-4 items-center",children:[O.jsxs("div",{children:[O.jsx("h1",{className:"text-5xl font-bold mb-2",children:"Tokenizer Arena"}),O.jsx("h2",{className:"text-lg font-normal",children:"Easily compare between different tokenizers simultaneously"}),O.jsxs("h3",{children:["Create by"," ",O.jsx("a",{className:"font-semibold text-white",href:"https://twitter.com/adithya_s_k",children:"Adithya S K"})," ","on top of"," ",O.jsx("a",{className:"font-semibold text-white",href:"https://github.com/xenova/transformers.js",children:"Transformer js"})]})]}),O.jsx("div",{children:O.jsxs("select",{value:c,onChange:k,className:"border-gray-700 bg-gray-100/10  text-slate-400 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2",children:[O.jsx("option",{value:"Xenova/gpt-4o",children:"gpt-4o"}),O.jsx("option",{value:"Xenova/gpt-4",children:"gpt-4 / gpt-3.5-turbo / text-embedding-ada-002"}),O.jsx("option",{value:"Xenova/text-davinci-003",children:"text-davinci-003 / text-davinci-002"}),O.jsx("option",{value:"Xenova/gpt-3",children:"gpt-3"}),O.jsx("option",{value:"Xenova/grok-1-tokenizer",children:"Grok-1"}),O.jsx("option",{value:"Xenova/claude-tokenizer",children:"Claude"}),O.jsx("option",{value:"Xenova/mistral-tokenizer",children:"Mistral"}),O.jsx("option",{value:"Xenova/gemma-tokenizer",children:"Gemma"}),O.jsx("option",{value:"Xenova/llama-tokenizer",children:"LLaMA / Llama 2"}),O.jsx("option",{value:"AdithyaSK/LLama3Tokenizer",children:"Llama 3"}),O.jsx("option",{value:"microsoft/Phi-3-mini-128k-instruct",children:"Phi 3"}),O.jsx("option",{value:"Xenova/c4ai-command-r-v01-tokenizer",children:"Cohere Command-R"}),O.jsx("option",{value:"Xenova/t5-small",children:"T5"}),O.jsx("option",{value:"Xenova/bert-base-cased",children:"bert-base-cased"}),O.jsx("option",{value:"custom",children:"Custom Tokeniser from HF"})]})}),d&&O.jsxs("form",{className:"flex space-x-2 w-full justify-center",onSubmit:P=>{if(P.preventDefault(),c.trim()===""){alert("Tokeniser field cannot be empty!");return}w()},children:[O.jsx("input",{className:"bg-[#2c2c2c] text-white p-2 rounded-md w-72",type:"text",placeholder:"AdithyaSK/LLama3Tokenizer",value:c,onChange:P=>f(P.target.value)}),O.jsx("button",{className:"bg-[#2c2c2c] text-[#] p-2 rounded-md",type:"submit",children:"Add Tokeniser"})]}),O.jsx("textarea",{ref:m,onChange:_,rows:"2",className:"font-mono text-md text-white block w-full p-2.5 bg-gray-100/10 rounded-lg border-gray-700 ",placeholder:"Enter some text",defaultValue:n??((b=m.current)==null?void 0:b.value)??""}),O.jsx("div",{className:"grid grid-cols-2 gap-4 w-full",children:Object.entries(r).map(([P,M])=>{var L;return O.jsxs("div",{className:"flex flex-col",children:[O.jsxs("p",{children:["Tokenizer Name: ",P]}),O.jsxs("div",{className:"flex justify-center gap-5",children:[O.jsxs("div",{className:"flex flex-col",children:["Tokens: ",M.tokenIds.length.toLocaleString()]}),O.jsxs("div",{className:"flex flex-col",children:["Characters :"," ",(((L=m.current)==null?void 0:L.value.length)??0).toLocaleString()]})]}),O.jsx("div",{ref:v,className:"font-mono text-black text-lg p-2.5  bg-gray-100/10 rounded-t-lg whitespace-pre-wrap text-left h-[150px] overflow-y-auto w-full",children:o==="text"?M.decodedTokens.map((R,$)=>O.jsx(g0,{text:R,position:$,margin:i[$]},$)):o==="token_ids"?O.jsxs("div",{className:"text-white",children:["[",M.tokenIds.join(", "),"]"]}):null}),O.jsx("button",{className:"bg-slate-800 rounded-b-lg",onClick:()=>S(P),children:"Remove"})]},P)})}),O.jsxs("div",{className:"flex items-center gap-2 self-end",children:[O.jsxs("div",{className:"flex items-center",children:[O.jsx("input",{checked:o==="text",onChange:()=>l("text"),id:"output-radio-1",type:"radio",value:"",name:"output-radio",className:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 focus:ring-blue-500"}),O.jsx("label",{htmlFor:"output-radio-1",className:"ml-1 text-sm font-medium text-gray-900 dark:text-gray-300",children:"Text"})]}),O.jsxs("div",{className:"flex items-center",children:[O.jsx("input",{checked:o==="token_ids",onChange:()=>l("token_ids"),id:"output-radio-2",type:"radio",value:"",name:"output-radio",className:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 focus:ring-blue-500"}),O.jsx("label",{htmlFor:"output-radio-2",className:"ml-1 text-sm font-medium text-gray-900 dark:text-gray-300",children:"Token IDs"})]}),O.jsxs("div",{className:"flex items-center",children:[O.jsx("input",{checked:o===null,onChange:()=>l(null),id:"output-radio-3",type:"radio",value:"",name:"output-radio",className:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 focus:ring-blue-500"}),O.jsx("label",{htmlFor:"output-radio-3",className:"ml-1 text-sm font-medium text-gray-900 dark:text-gray-300",children:"Hide"})]}),O.jsxs("div",{children:[O.jsx("input",{id:"output-checkbox-4",type:"checkbox",checked:a,className:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 focus:ring-blue-500",onChange:P=>u(P.target.checked)}),O.jsx("label",{htmlFor:"output-checkbox-4",className:"ml-1 text-sm font-medium text-gray-900 dark:text-gray-300",children:"Show Visualization"})]})]}),a&&O.jsxs("div",{className:"w-1/2",children:[" ",O.jsx(h1,{options:p,data:y})," "]})]})}il.createRoot(document.getElementById("root")).render(O.jsx(ua.StrictMode,{children:O.jsx(p1,{})}));