mirror of
https://github.com/azaion/ui.git
synced 2026-06-21 17:31:12 +00:00
63cc18e788
Add local annotation save fallback, PNG+txt download with drawn boxes, shared classColors helper, photo mode icon toggles, and react-dropzone / react-icons dependencies.
165 lines
1002 KiB
JavaScript
165 lines
1002 KiB
JavaScript
var iM=Object.defineProperty;var aM=(t,e,n)=>e in t?iM(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Lt=(t,e,n)=>aM(t,typeof e!="symbol"?e+"":e,n);function rM(t,e){for(var n=0;n<e.length;n++){const i=e[n];if(typeof i!="string"&&!Array.isArray(i)){for(const a in i)if(a!=="default"&&!(a in t)){const s=Object.getOwnPropertyDescriptor(i,a);s&&Object.defineProperty(t,a,s.get?s:{enumerable:!0,get:()=>i[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))i(a);new MutationObserver(a=>{for(const s of a)if(s.type==="childList")for(const l of s.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&i(l)}).observe(document,{childList:!0,subtree:!0});function n(a){const s={};return a.integrity&&(s.integrity=a.integrity),a.referrerPolicy&&(s.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?s.credentials="include":a.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(a){if(a.ep)return;a.ep=!0;const s=n(a);fetch(a.href,s)}})();function Sd(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var uv={exports:{}},hu={};/**
|
||
* @license React
|
||
* react-jsx-runtime.production.js
|
||
*
|
||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var e1;function sM(){if(e1)return hu;e1=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(i,a,s){var l=null;if(s!==void 0&&(l=""+s),a.key!==void 0&&(l=""+a.key),"key"in a){s={};for(var d in a)d!=="key"&&(s[d]=a[d])}else s=a;return a=s.ref,{$$typeof:t,type:i,key:l,ref:a!==void 0?a:null,props:s}}return hu.Fragment=e,hu.jsx=n,hu.jsxs=n,hu}var n1;function oM(){return n1||(n1=1,uv.exports=sM()),uv.exports}var T=oM(),dv={exports:{}},Qt={};/**
|
||
* @license React
|
||
* react.production.js
|
||
*
|
||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var i1;function lM(){if(i1)return Qt;i1=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),l=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),y=Symbol.iterator;function _(F){return F===null||typeof F!="object"?null:(F=y&&F[y]||F["@@iterator"],typeof F=="function"?F:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,A={};function k(F,K,at){this.props=F,this.context=K,this.refs=A,this.updater=at||w}k.prototype.isReactComponent={},k.prototype.setState=function(F,K){if(typeof F!="object"&&typeof F!="function"&&F!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,F,K,"setState")},k.prototype.forceUpdate=function(F){this.updater.enqueueForceUpdate(this,F,"forceUpdate")};function z(){}z.prototype=k.prototype;function j(F,K,at){this.props=F,this.context=K,this.refs=A,this.updater=at||w}var P=j.prototype=new z;P.constructor=j,C(P,k.prototype),P.isPureReactComponent=!0;var H=Array.isArray;function V(){}var U={H:null,A:null,T:null,S:null},Z=Object.prototype.hasOwnProperty;function Q(F,K,at){var mt=at.ref;return{$$typeof:t,type:F,key:K,ref:mt!==void 0?mt:null,props:at}}function et(F,K){return Q(F.type,K,F.props)}function X(F){return typeof F=="object"&&F!==null&&F.$$typeof===t}function R(F){var K={"=":"=0",":":"=2"};return"$"+F.replace(/[=:]/g,function(at){return K[at]})}var dt=/\/+/g;function it(F,K){return typeof F=="object"&&F!==null&&F.key!=null?R(""+F.key):K.toString(36)}function ut(F){switch(F.status){case"fulfilled":return F.value;case"rejected":throw F.reason;default:switch(typeof F.status=="string"?F.then(V,V):(F.status="pending",F.then(function(K){F.status==="pending"&&(F.status="fulfilled",F.value=K)},function(K){F.status==="pending"&&(F.status="rejected",F.reason=K)})),F.status){case"fulfilled":return F.value;case"rejected":throw F.reason}}throw F}function I(F,K,at,mt,pt){var yt=typeof F;(yt==="undefined"||yt==="boolean")&&(F=null);var ft=!1;if(F===null)ft=!0;else switch(yt){case"bigint":case"string":case"number":ft=!0;break;case"object":switch(F.$$typeof){case t:case e:ft=!0;break;case g:return ft=F._init,I(ft(F._payload),K,at,mt,pt)}}if(ft)return pt=pt(F),ft=mt===""?"."+it(F,0):mt,H(pt)?(at="",ft!=null&&(at=ft.replace(dt,"$&/")+"/"),I(pt,K,at,"",function(Mt){return Mt})):pt!=null&&(X(pt)&&(pt=et(pt,at+(pt.key==null||F&&F.key===pt.key?"":(""+pt.key).replace(dt,"$&/")+"/")+ft)),K.push(pt)),1;ft=0;var Ht=mt===""?".":mt+":";if(H(F))for(var Tt=0;Tt<F.length;Tt++)mt=F[Tt],yt=Ht+it(mt,Tt),ft+=I(mt,K,at,yt,pt);else if(Tt=_(F),typeof Tt=="function")for(F=Tt.call(F),Tt=0;!(mt=F.next()).done;)mt=mt.value,yt=Ht+it(mt,Tt++),ft+=I(mt,K,at,yt,pt);else if(yt==="object"){if(typeof F.then=="function")return I(ut(F),K,at,mt,pt);throw K=String(F),Error("Objects are not valid as a React child (found: "+(K==="[object Object]"?"object with keys {"+Object.keys(F).join(", ")+"}":K)+"). If you meant to render a collection of children, use an array instead.")}return ft}function $(F,K,at){if(F==null)return F;var mt=[],pt=0;return I(F,mt,"","",function(yt){return K.call(at,yt,pt++)}),mt}function q(F){if(F._status===-1){var K=F._result;K=K(),K.then(function(at){(F._status===0||F._status===-1)&&(F._status=1,F._result=at)},function(at){(F._status===0||F._status===-1)&&(F._status=2,F._result=at)}),F._status===-1&&(F._status=0,F._result=K)}if(F._status===1)return F._result.default;throw F._result}var nt=typeof reportError=="function"?reportError:function(F){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var K=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof F=="object"&&F!==null&&typeof F.message=="string"?String(F.message):String(F),error:F});if(!window.dispatchEvent(K))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",F);return}console.error(F)},ot={map:$,forEach:function(F,K,at){$(F,function(){K.apply(this,arguments)},at)},count:function(F){var K=0;return $(F,function(){K++}),K},toArray:function(F){return $(F,function(K){return K})||[]},only:function(F){if(!X(F))throw Error("React.Children.only expected to receive a single React element child.");return F}};return Qt.Activity=v,Qt.Children=ot,Qt.Component=k,Qt.Fragment=n,Qt.Profiler=a,Qt.PureComponent=j,Qt.StrictMode=i,Qt.Suspense=f,Qt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=U,Qt.__COMPILER_RUNTIME={__proto__:null,c:function(F){return U.H.useMemoCache(F)}},Qt.cache=function(F){return function(){return F.apply(null,arguments)}},Qt.cacheSignal=function(){return null},Qt.cloneElement=function(F,K,at){if(F==null)throw Error("The argument must be a React element, but you passed "+F+".");var mt=C({},F.props),pt=F.key;if(K!=null)for(yt in K.key!==void 0&&(pt=""+K.key),K)!Z.call(K,yt)||yt==="key"||yt==="__self"||yt==="__source"||yt==="ref"&&K.ref===void 0||(mt[yt]=K[yt]);var yt=arguments.length-2;if(yt===1)mt.children=at;else if(1<yt){for(var ft=Array(yt),Ht=0;Ht<yt;Ht++)ft[Ht]=arguments[Ht+2];mt.children=ft}return Q(F.type,pt,mt)},Qt.createContext=function(F){return F={$$typeof:l,_currentValue:F,_currentValue2:F,_threadCount:0,Provider:null,Consumer:null},F.Provider=F,F.Consumer={$$typeof:s,_context:F},F},Qt.createElement=function(F,K,at){var mt,pt={},yt=null;if(K!=null)for(mt in K.key!==void 0&&(yt=""+K.key),K)Z.call(K,mt)&&mt!=="key"&&mt!=="__self"&&mt!=="__source"&&(pt[mt]=K[mt]);var ft=arguments.length-2;if(ft===1)pt.children=at;else if(1<ft){for(var Ht=Array(ft),Tt=0;Tt<ft;Tt++)Ht[Tt]=arguments[Tt+2];pt.children=Ht}if(F&&F.defaultProps)for(mt in ft=F.defaultProps,ft)pt[mt]===void 0&&(pt[mt]=ft[mt]);return Q(F,yt,pt)},Qt.createRef=function(){return{current:null}},Qt.forwardRef=function(F){return{$$typeof:d,render:F}},Qt.isValidElement=X,Qt.lazy=function(F){return{$$typeof:g,_payload:{_status:-1,_result:F},_init:q}},Qt.memo=function(F,K){return{$$typeof:p,type:F,compare:K===void 0?null:K}},Qt.startTransition=function(F){var K=U.T,at={};U.T=at;try{var mt=F(),pt=U.S;pt!==null&&pt(at,mt),typeof mt=="object"&&mt!==null&&typeof mt.then=="function"&&mt.then(V,nt)}catch(yt){nt(yt)}finally{K!==null&&at.types!==null&&(K.types=at.types),U.T=K}},Qt.unstable_useCacheRefresh=function(){return U.H.useCacheRefresh()},Qt.use=function(F){return U.H.use(F)},Qt.useActionState=function(F,K,at){return U.H.useActionState(F,K,at)},Qt.useCallback=function(F,K){return U.H.useCallback(F,K)},Qt.useContext=function(F){return U.H.useContext(F)},Qt.useDebugValue=function(){},Qt.useDeferredValue=function(F,K){return U.H.useDeferredValue(F,K)},Qt.useEffect=function(F,K){return U.H.useEffect(F,K)},Qt.useEffectEvent=function(F){return U.H.useEffectEvent(F)},Qt.useId=function(){return U.H.useId()},Qt.useImperativeHandle=function(F,K,at){return U.H.useImperativeHandle(F,K,at)},Qt.useInsertionEffect=function(F,K){return U.H.useInsertionEffect(F,K)},Qt.useLayoutEffect=function(F,K){return U.H.useLayoutEffect(F,K)},Qt.useMemo=function(F,K){return U.H.useMemo(F,K)},Qt.useOptimistic=function(F,K){return U.H.useOptimistic(F,K)},Qt.useReducer=function(F,K,at){return U.H.useReducer(F,K,at)},Qt.useRef=function(F){return U.H.useRef(F)},Qt.useState=function(F){return U.H.useState(F)},Qt.useSyncExternalStore=function(F,K,at){return U.H.useSyncExternalStore(F,K,at)},Qt.useTransition=function(){return U.H.useTransition()},Qt.version="19.2.5",Qt}var a1;function Op(){return a1||(a1=1,dv.exports=lM()),dv.exports}var O=Op();const be=Sd(O),r1=rM({__proto__:null,default:be},[O]);var fv={exports:{}},pu={},hv={exports:{}},pv={};/**
|
||
* @license React
|
||
* scheduler.production.js
|
||
*
|
||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var s1;function cM(){return s1||(s1=1,(function(t){function e(I,$){var q=I.length;I.push($);t:for(;0<q;){var nt=q-1>>>1,ot=I[nt];if(0<a(ot,$))I[nt]=$,I[q]=ot,q=nt;else break t}}function n(I){return I.length===0?null:I[0]}function i(I){if(I.length===0)return null;var $=I[0],q=I.pop();if(q!==$){I[0]=q;t:for(var nt=0,ot=I.length,F=ot>>>1;nt<F;){var K=2*(nt+1)-1,at=I[K],mt=K+1,pt=I[mt];if(0>a(at,q))mt<ot&&0>a(pt,at)?(I[nt]=pt,I[mt]=q,nt=mt):(I[nt]=at,I[K]=q,nt=K);else if(mt<ot&&0>a(pt,q))I[nt]=pt,I[mt]=q,nt=mt;else break t}}return $}function a(I,$){var q=I.sortIndex-$.sortIndex;return q!==0?q:I.id-$.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var l=Date,d=l.now();t.unstable_now=function(){return l.now()-d}}var f=[],p=[],g=1,v=null,y=3,_=!1,w=!1,C=!1,A=!1,k=typeof setTimeout=="function"?setTimeout:null,z=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;function P(I){for(var $=n(p);$!==null;){if($.callback===null)i(p);else if($.startTime<=I)i(p),$.sortIndex=$.expirationTime,e(f,$);else break;$=n(p)}}function H(I){if(C=!1,P(I),!w)if(n(f)!==null)w=!0,V||(V=!0,R());else{var $=n(p);$!==null&&ut(H,$.startTime-I)}}var V=!1,U=-1,Z=5,Q=-1;function et(){return A?!0:!(t.unstable_now()-Q<Z)}function X(){if(A=!1,V){var I=t.unstable_now();Q=I;var $=!0;try{t:{w=!1,C&&(C=!1,z(U),U=-1),_=!0;var q=y;try{e:{for(P(I),v=n(f);v!==null&&!(v.expirationTime>I&&et());){var nt=v.callback;if(typeof nt=="function"){v.callback=null,y=v.priorityLevel;var ot=nt(v.expirationTime<=I);if(I=t.unstable_now(),typeof ot=="function"){v.callback=ot,P(I),$=!0;break e}v===n(f)&&i(f),P(I)}else i(f);v=n(f)}if(v!==null)$=!0;else{var F=n(p);F!==null&&ut(H,F.startTime-I),$=!1}}break t}finally{v=null,y=q,_=!1}$=void 0}}finally{$?R():V=!1}}}var R;if(typeof j=="function")R=function(){j(X)};else if(typeof MessageChannel<"u"){var dt=new MessageChannel,it=dt.port2;dt.port1.onmessage=X,R=function(){it.postMessage(null)}}else R=function(){k(X,0)};function ut(I,$){U=k(function(){I(t.unstable_now())},$)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(I){I.callback=null},t.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Z=0<I?Math.floor(1e3/I):5},t.unstable_getCurrentPriorityLevel=function(){return y},t.unstable_next=function(I){switch(y){case 1:case 2:case 3:var $=3;break;default:$=y}var q=y;y=$;try{return I()}finally{y=q}},t.unstable_requestPaint=function(){A=!0},t.unstable_runWithPriority=function(I,$){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var q=y;y=I;try{return $()}finally{y=q}},t.unstable_scheduleCallback=function(I,$,q){var nt=t.unstable_now();switch(typeof q=="object"&&q!==null?(q=q.delay,q=typeof q=="number"&&0<q?nt+q:nt):q=nt,I){case 1:var ot=-1;break;case 2:ot=250;break;case 5:ot=1073741823;break;case 4:ot=1e4;break;default:ot=5e3}return ot=q+ot,I={id:g++,callback:$,priorityLevel:I,startTime:q,expirationTime:ot,sortIndex:-1},q>nt?(I.sortIndex=q,e(p,I),n(f)===null&&I===n(p)&&(C?(z(U),U=-1):C=!0,ut(H,q-nt))):(I.sortIndex=ot,e(f,I),w||_||(w=!0,V||(V=!0,R()))),I},t.unstable_shouldYield=et,t.unstable_wrapCallback=function(I){var $=y;return function(){var q=y;y=$;try{return I.apply(this,arguments)}finally{y=q}}}})(pv)),pv}var o1;function uM(){return o1||(o1=1,hv.exports=cM()),hv.exports}var mv={exports:{}},Yn={};/**
|
||
* @license React
|
||
* react-dom.production.js
|
||
*
|
||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var l1;function dM(){if(l1)return Yn;l1=1;var t=Op();function e(f){var p="https://react.dev/errors/"+f;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)p+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+f+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var i={d:{f:n,r:function(){throw Error(e(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},a=Symbol.for("react.portal");function s(f,p,g){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:v==null?null:""+v,children:f,containerInfo:p,implementation:g}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(f,p){if(f==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return Yn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,Yn.createPortal=function(f,p){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(e(299));return s(f,p,null,g)},Yn.flushSync=function(f){var p=l.T,g=i.p;try{if(l.T=null,i.p=2,f)return f()}finally{l.T=p,i.p=g,i.d.f()}},Yn.preconnect=function(f,p){typeof f=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,i.d.C(f,p))},Yn.prefetchDNS=function(f){typeof f=="string"&&i.d.D(f)},Yn.preinit=function(f,p){if(typeof f=="string"&&p&&typeof p.as=="string"){var g=p.as,v=d(g,p.crossOrigin),y=typeof p.integrity=="string"?p.integrity:void 0,_=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;g==="style"?i.d.S(f,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:v,integrity:y,fetchPriority:_}):g==="script"&&i.d.X(f,{crossOrigin:v,integrity:y,fetchPriority:_,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},Yn.preinitModule=function(f,p){if(typeof f=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var g=d(p.as,p.crossOrigin);i.d.M(f,{crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&i.d.M(f)},Yn.preload=function(f,p){if(typeof f=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var g=p.as,v=d(g,p.crossOrigin);i.d.L(f,g,{crossOrigin:v,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},Yn.preloadModule=function(f,p){if(typeof f=="string")if(p){var g=d(p.as,p.crossOrigin);i.d.m(f,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else i.d.m(f)},Yn.requestFormReset=function(f){i.d.r(f)},Yn.unstable_batchedUpdates=function(f,p){return f(p)},Yn.useFormState=function(f,p,g){return l.H.useFormState(f,p,g)},Yn.useFormStatus=function(){return l.H.useHostTransitionStatus()},Yn.version="19.2.5",Yn}var c1;function Qw(){if(c1)return mv.exports;c1=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),mv.exports=dM(),mv.exports}/**
|
||
* @license React
|
||
* react-dom-client.production.js
|
||
*
|
||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var u1;function fM(){if(u1)return pu;u1=1;var t=uM(),e=Op(),n=Qw();function i(r){var o="https://react.dev/errors/"+r;if(1<arguments.length){o+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)o+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+r+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function s(r){var o=r,u=r;if(r.alternate)for(;o.return;)o=o.return;else{r=o;do o=r,(o.flags&4098)!==0&&(u=o.return),r=o.return;while(r)}return o.tag===3?u:null}function l(r){if(r.tag===13){var o=r.memoizedState;if(o===null&&(r=r.alternate,r!==null&&(o=r.memoizedState)),o!==null)return o.dehydrated}return null}function d(r){if(r.tag===31){var o=r.memoizedState;if(o===null&&(r=r.alternate,r!==null&&(o=r.memoizedState)),o!==null)return o.dehydrated}return null}function f(r){if(s(r)!==r)throw Error(i(188))}function p(r){var o=r.alternate;if(!o){if(o=s(r),o===null)throw Error(i(188));return o!==r?null:r}for(var u=r,m=o;;){var x=u.return;if(x===null)break;var S=x.alternate;if(S===null){if(m=x.return,m!==null){u=m;continue}break}if(x.child===S.child){for(S=x.child;S;){if(S===u)return f(x),r;if(S===m)return f(x),o;S=S.sibling}throw Error(i(188))}if(u.return!==m.return)u=x,m=S;else{for(var M=!1,B=x.child;B;){if(B===u){M=!0,u=x,m=S;break}if(B===m){M=!0,m=x,u=S;break}B=B.sibling}if(!M){for(B=S.child;B;){if(B===u){M=!0,u=S,m=x;break}if(B===m){M=!0,m=S,u=x;break}B=B.sibling}if(!M)throw Error(i(189))}}if(u.alternate!==m)throw Error(i(190))}if(u.tag!==3)throw Error(i(188));return u.stateNode.current===u?r:o}function g(r){var o=r.tag;if(o===5||o===26||o===27||o===6)return r;for(r=r.child;r!==null;){if(o=g(r),o!==null)return o;r=r.sibling}return null}var v=Object.assign,y=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),z=Symbol.for("react.consumer"),j=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),H=Symbol.for("react.suspense"),V=Symbol.for("react.suspense_list"),U=Symbol.for("react.memo"),Z=Symbol.for("react.lazy"),Q=Symbol.for("react.activity"),et=Symbol.for("react.memo_cache_sentinel"),X=Symbol.iterator;function R(r){return r===null||typeof r!="object"?null:(r=X&&r[X]||r["@@iterator"],typeof r=="function"?r:null)}var dt=Symbol.for("react.client.reference");function it(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===dt?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case C:return"Fragment";case k:return"Profiler";case A:return"StrictMode";case H:return"Suspense";case V:return"SuspenseList";case Q:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case w:return"Portal";case j:return r.displayName||"Context";case z:return(r._context.displayName||"Context")+".Consumer";case P:var o=r.render;return r=r.displayName,r||(r=o.displayName||o.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case U:return o=r.displayName||null,o!==null?o:it(r.type)||"Memo";case Z:o=r._payload,r=r._init;try{return it(r(o))}catch{}}return null}var ut=Array.isArray,I=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q={pending:!1,data:null,method:null,action:null},nt=[],ot=-1;function F(r){return{current:r}}function K(r){0>ot||(r.current=nt[ot],nt[ot]=null,ot--)}function at(r,o){ot++,nt[ot]=r.current,r.current=o}var mt=F(null),pt=F(null),yt=F(null),ft=F(null);function Ht(r,o){switch(at(yt,o),at(pt,r),at(mt,null),o.nodeType){case 9:case 11:r=(r=o.documentElement)&&(r=r.namespaceURI)?C_(r):0;break;default:if(r=o.tagName,o=o.namespaceURI)o=C_(o),r=E_(o,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}K(mt),at(mt,r)}function Tt(){K(mt),K(pt),K(yt)}function Mt(r){r.memoizedState!==null&&at(ft,r);var o=mt.current,u=E_(o,r.type);o!==u&&(at(pt,r),at(mt,u))}function Ee(r){pt.current===r&&(K(mt),K(pt)),ft.current===r&&(K(ft),cu._currentValue=q)}var Ut,ye;function ge(r){if(Ut===void 0)try{throw Error()}catch(u){var o=u.stack.trim().match(/\n( *(at )?)/);Ut=o&&o[1]||"",ye=-1<u.stack.indexOf(`
|
||
at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
|
||
`+Ut+r+ye}var ve=!1;function Cn(r,o){if(!r||ve)return"";ve=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var m={DetermineComponentFrameRoot:function(){try{if(o){var St=function(){throw Error()};if(Object.defineProperty(St.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(St,[])}catch(ht){var ct=ht}Reflect.construct(r,[],St)}else{try{St.call()}catch(ht){ct=ht}r.call(St.prototype)}}else{try{throw Error()}catch(ht){ct=ht}(St=r())&&typeof St.catch=="function"&&St.catch(function(){})}}catch(ht){if(ht&&ct&&typeof ht.stack=="string")return[ht.stack,ct.stack]}return[null,null]}};m.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var x=Object.getOwnPropertyDescriptor(m.DetermineComponentFrameRoot,"name");x&&x.configurable&&Object.defineProperty(m.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var S=m.DetermineComponentFrameRoot(),M=S[0],B=S[1];if(M&&B){var W=M.split(`
|
||
`),st=B.split(`
|
||
`);for(x=m=0;m<W.length&&!W[m].includes("DetermineComponentFrameRoot");)m++;for(;x<st.length&&!st[x].includes("DetermineComponentFrameRoot");)x++;if(m===W.length||x===st.length)for(m=W.length-1,x=st.length-1;1<=m&&0<=x&&W[m]!==st[x];)x--;for(;1<=m&&0<=x;m--,x--)if(W[m]!==st[x]){if(m!==1||x!==1)do if(m--,x--,0>x||W[m]!==st[x]){var vt=`
|
||
`+W[m].replace(" at new "," at ");return r.displayName&&vt.includes("<anonymous>")&&(vt=vt.replace("<anonymous>",r.displayName)),vt}while(1<=m&&0<=x);break}}}finally{ve=!1,Error.prepareStackTrace=u}return(u=r?r.displayName||r.name:"")?ge(u):""}function En(r,o){switch(r.tag){case 26:case 27:case 5:return ge(r.type);case 16:return ge("Lazy");case 13:return r.child!==o&&o!==null?ge("Suspense Fallback"):ge("Suspense");case 19:return ge("SuspenseList");case 0:case 15:return Cn(r.type,!1);case 11:return Cn(r.type.render,!1);case 1:return Cn(r.type,!0);case 31:return ge("Activity");default:return""}}function nn(r){try{var o="",u=null;do o+=En(r,u),u=r,r=r.return;while(r);return o}catch(m){return`
|
||
Error generating stack: `+m.message+`
|
||
`+m.stack}}var mn=Object.prototype.hasOwnProperty,kn=t.unstable_scheduleCallback,gn=t.unstable_cancelCallback,wi=t.unstable_shouldYield,Rt=t.unstable_requestPaint,At=t.unstable_now,wt=t.unstable_getCurrentPriorityLevel,Et=t.unstable_ImmediatePriority,zt=t.unstable_UserBlockingPriority,Yt=t.unstable_NormalPriority,re=t.unstable_LowPriority,gt=t.unstable_IdlePriority,Ct=t.log,Ot=t.unstable_setDisableYieldValue,jt=null,Gt=null;function Bt(r){if(typeof Ct=="function"&&Ot(r),Gt&&typeof Gt.setStrictMode=="function")try{Gt.setStrictMode(jt,r)}catch{}}var Vt=Math.clz32?Math.clz32:Wn,ae=Math.log,An=Math.LN2;function Wn(r){return r>>>=0,r===0?32:31-(ae(r)/An|0)|0}var ra=256,Rs=262144,Ps=4194304;function Xa(r){var o=r&42;if(o!==0)return o;switch(r&-r){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return r&261888;case 262144:case 524288:case 1048576:case 2097152:return r&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return r&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return r}}function Vo(r,o,u){var m=r.pendingLanes;if(m===0)return 0;var x=0,S=r.suspendedLanes,M=r.pingedLanes;r=r.warmLanes;var B=m&134217727;return B!==0?(m=B&~S,m!==0?x=Xa(m):(M&=B,M!==0?x=Xa(M):u||(u=B&~r,u!==0&&(x=Xa(u))))):(B=m&~S,B!==0?x=Xa(B):M!==0?x=Xa(M):u||(u=m&~r,u!==0&&(x=Xa(u)))),x===0?0:o!==0&&o!==x&&(o&S)===0&&(S=x&-x,u=o&-o,S>=u||S===32&&(u&4194048)!==0)?o:x}function Ns(r,o){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&o)===0}function vm(r,o){switch(r){case 1:case 2:case 4:case 8:case 64:return o+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function zd(){var r=Ps;return Ps<<=1,(Ps&62914560)===0&&(Ps=4194304),r}function dc(r){for(var o=[],u=0;31>u;u++)o.push(r);return o}function Ka(r,o){r.pendingLanes|=o,o!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function bm(r,o,u,m,x,S){var M=r.pendingLanes;r.pendingLanes=u,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=u,r.entangledLanes&=u,r.errorRecoveryDisabledLanes&=u,r.shellSuspendCounter=0;var B=r.entanglements,W=r.expirationTimes,st=r.hiddenUpdates;for(u=M&~u;0<u;){var vt=31-Vt(u),St=1<<vt;B[vt]=0,W[vt]=-1;var ct=st[vt];if(ct!==null)for(st[vt]=null,vt=0;vt<ct.length;vt++){var ht=ct[vt];ht!==null&&(ht.lane&=-536870913)}u&=~St}m!==0&&Rd(r,m,0),S!==0&&x===0&&r.tag!==0&&(r.suspendedLanes|=S&~(M&~o))}function Rd(r,o,u){r.pendingLanes|=o,r.suspendedLanes&=~o;var m=31-Vt(o);r.entangledLanes|=o,r.entanglements[m]=r.entanglements[m]|1073741824|u&261930}function Pd(r,o){var u=r.entangledLanes|=o;for(r=r.entanglements;u;){var m=31-Vt(u),x=1<<m;x&o|r[m]&o&&(r[m]|=o),u&=~x}}function Nd(r,o){var u=o&-o;return u=(u&42)!==0?1:oi(u),(u&(r.suspendedLanes|o))!==0?0:u}function oi(r){switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:r=128;break;case 268435456:r=134217728;break;default:r=0}return r}function It(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function fc(){var r=$.p;return r!==0?r:(r=window.event,r===void 0?32:q_(r.type))}function hc(r,o){var u=$.p;try{return $.p=r,o()}finally{$.p=u}}var sa=Math.random().toString(36).slice(2),vn="__reactFiber$"+sa,Ln="__reactProps$"+sa,Qa="__reactContainer$"+sa,_a="__reactEvents$"+sa,jd="__reactListeners$"+sa,ym="__reactHandles$"+sa,Bd="__reactResources$"+sa,js="__reactMarker$"+sa;function pc(r){delete r[vn],delete r[Ln],delete r[_a],delete r[jd],delete r[ym]}function Ja(r){var o=r[vn];if(o)return o;for(var u=r.parentNode;u;){if(o=u[Qa]||u[vn]){if(u=o.alternate,o.child!==null||u!==null&&u.child!==null)for(r=L_(r);r!==null;){if(u=r[vn])return u;r=L_(r)}return o}r=u,u=r.parentNode}return null}function zr(r){if(r=r[vn]||r[Qa]){var o=r.tag;if(o===5||o===6||o===13||o===31||o===26||o===27||o===3)return r}return null}function Sa(r){var o=r.tag;if(o===5||o===26||o===27||o===6)return r.stateNode;throw Error(i(33))}function Rr(r){var o=r[Bd];return o||(o=r[Bd]={hoistableStyles:new Map,hoistableScripts:new Map}),o}function bn(r){r[js]=!0}var Id=new Set,Fd={};function tr(r,o){wa(r,o),wa(r+"Capture",o)}function wa(r,o){for(Fd[r]=o,r=0;r<o.length;r++)Id.add(o[r])}var Bs=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),mc={},gc={};function Is(r){return mn.call(gc,r)?!0:mn.call(mc,r)?!1:Bs.test(r)?gc[r]=!0:(mc[r]=!0,!1)}function se(r,o,u){if(Is(o))if(u===null)r.removeAttribute(o);else{switch(typeof u){case"undefined":case"function":case"symbol":r.removeAttribute(o);return;case"boolean":var m=o.toLowerCase().slice(0,5);if(m!=="data-"&&m!=="aria-"){r.removeAttribute(o);return}}r.setAttribute(o,""+u)}}function Ne(r,o,u){if(u===null)r.removeAttribute(o);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(o);return}r.setAttribute(o,""+u)}}function li(r,o,u,m){if(m===null)r.removeAttribute(u);else{switch(typeof m){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(u);return}r.setAttributeNS(o,u,""+m)}}function Tn(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function er(r){var o=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function vc(r,o,u){var m=Object.getOwnPropertyDescriptor(r.constructor.prototype,o);if(!r.hasOwnProperty(o)&&typeof m<"u"&&typeof m.get=="function"&&typeof m.set=="function"){var x=m.get,S=m.set;return Object.defineProperty(r,o,{configurable:!0,get:function(){return x.call(this)},set:function(M){u=""+M,S.call(this,M)}}),Object.defineProperty(r,o,{enumerable:m.enumerable}),{getValue:function(){return u},setValue:function(M){u=""+M},stopTracking:function(){r._valueTracker=null,delete r[o]}}}}function Kt(r){if(!r._valueTracker){var o=er(r)?"checked":"value";r._valueTracker=vc(r,o,""+r[o])}}function Ye(r){if(!r)return!1;var o=r._valueTracker;if(!o)return!0;var u=o.getValue(),m="";return r&&(m=er(r)?r.checked?"true":"false":r.value),r=m,r!==u?(o.setValue(r),!0):!1}function Pr(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}var $o=/[\n"\\]/g;function Ge(r){return r.replace($o,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function bc(r,o,u,m,x,S,M,B){r.name="",M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?r.type=M:r.removeAttribute("type"),o!=null?M==="number"?(o===0&&r.value===""||r.value!=o)&&(r.value=""+Tn(o)):r.value!==""+Tn(o)&&(r.value=""+Tn(o)):M!=="submit"&&M!=="reset"||r.removeAttribute("value"),o!=null?oa(r,M,Tn(o)):u!=null?oa(r,M,Tn(u)):m!=null&&r.removeAttribute("value"),x==null&&S!=null&&(r.defaultChecked=!!S),x!=null&&(r.checked=x&&typeof x!="function"&&typeof x!="symbol"),B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"?r.name=""+Tn(B):r.removeAttribute("name")}function Fs(r,o,u,m,x,S,M,B){if(S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(r.type=S),o!=null||u!=null){if(!(S!=="submit"&&S!=="reset"||o!=null)){Kt(r);return}u=u!=null?""+Tn(u):"",o=o!=null?""+Tn(o):u,B||o===r.value||(r.value=o),r.defaultValue=o}m=m??x,m=typeof m!="function"&&typeof m!="symbol"&&!!m,r.checked=B?r.checked:!!m,r.defaultChecked=!!m,M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"&&(r.name=M),Kt(r)}function oa(r,o,u){o==="number"&&Pr(r.ownerDocument)===r||r.defaultValue===""+u||(r.defaultValue=""+u)}function He(r,o,u,m){if(r=r.options,o){o={};for(var x=0;x<u.length;x++)o["$"+u[x]]=!0;for(u=0;u<r.length;u++)x=o.hasOwnProperty("$"+r[u].value),r[u].selected!==x&&(r[u].selected=x),x&&m&&(r[u].defaultSelected=!0)}else{for(u=""+Tn(u),o=null,x=0;x<r.length;x++){if(r[x].value===u){r[x].selected=!0,m&&(r[x].defaultSelected=!0);return}o!==null||r[x].disabled||(o=r[x])}o!==null&&(o.selected=!0)}}function Ca(r,o,u){if(o!=null&&(o=""+Tn(o),o!==r.value&&(r.value=o),u==null)){r.defaultValue!==o&&(r.defaultValue=o);return}r.defaultValue=u!=null?""+Tn(u):""}function Nr(r,o,u,m){if(o==null){if(m!=null){if(u!=null)throw Error(i(92));if(ut(m)){if(1<m.length)throw Error(i(93));m=m[0]}u=m}u==null&&(u=""),o=u}u=Tn(o),r.defaultValue=u,m=r.textContent,m===u&&m!==""&&m!==null&&(r.value=m),Kt(r)}function Fi(r,o){if(o){var u=r.firstChild;if(u&&u===r.lastChild&&u.nodeType===3){u.nodeValue=o;return}}r.textContent=o}var yc=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function jr(r,o,u){var m=o.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?m?r.setProperty(o,""):o==="float"?r.cssFloat="":r[o]="":m?r.setProperty(o,u):typeof u!="number"||u===0||yc.has(o)?o==="float"?r.cssFloat=u:r[o]=(""+u).trim():r[o]=u+"px"}function Go(r,o,u){if(o!=null&&typeof o!="object")throw Error(i(62));if(r=r.style,u!=null){for(var m in u)!u.hasOwnProperty(m)||o!=null&&o.hasOwnProperty(m)||(m.indexOf("--")===0?r.setProperty(m,""):m==="float"?r.cssFloat="":r[m]="");for(var x in o)m=o[x],o.hasOwnProperty(x)&&u[x]!==m&&jr(r,x,m)}else for(var S in o)o.hasOwnProperty(S)&&jr(r,S,o[S])}function Hs(r){if(r.indexOf("-")===-1)return!1;switch(r){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 Wo=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),xc=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Br(r){return xc.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function ci(){}var Zo=null;function Us(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Ir=null,qt=null;function Ci(r){var o=zr(r);if(o&&(r=o.stateNode)){var u=r[Ln]||null;t:switch(r=o.stateNode,o.type){case"input":if(bc(r,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),o=u.name,u.type==="radio"&&o!=null){for(u=r;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+Ge(""+o)+'"][type="radio"]'),o=0;o<u.length;o++){var m=u[o];if(m!==r&&m.form===r.form){var x=m[Ln]||null;if(!x)throw Error(i(90));bc(m,x.value,x.defaultValue,x.defaultValue,x.checked,x.defaultChecked,x.type,x.name)}}for(o=0;o<u.length;o++)m=u[o],m.form===r.form&&Ye(m)}break t;case"textarea":Ca(r,u.value,u.defaultValue);break t;case"select":o=u.value,o!=null&&He(r,!!u.multiple,o,!1)}}}var Me=!1;function _c(r,o,u){if(Me)return r(o,u);Me=!0;try{var m=r(o);return m}finally{if(Me=!1,(Ir!==null||qt!==null)&&(jf(),Ir&&(o=Ir,r=qt,qt=Ir=null,Ci(o),r)))for(o=0;o<r.length;o++)Ci(r[o])}}function nr(r,o){var u=r.stateNode;if(u===null)return null;var m=u[Ln]||null;if(m===null)return null;u=m[o];t:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(m=!m.disabled)||(r=r.type,m=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!m;break t;default:r=!1}if(r)return null;if(u&&typeof u!="function")throw Error(i(231,o,typeof u));return u}var Ei=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Vs=!1;if(Ei)try{var Ai={};Object.defineProperty(Ai,"passive",{get:function(){Vs=!0}}),window.addEventListener("test",Ai,Ai),window.removeEventListener("test",Ai,Ai)}catch{Vs=!1}var Hi=null,ir=null,an=null;function Ea(){if(an)return an;var r,o=ir,u=o.length,m,x="value"in Hi?Hi.value:Hi.textContent,S=x.length;for(r=0;r<u&&o[r]===x[r];r++);var M=u-r;for(m=1;m<=M&&o[u-m]===x[S-m];m++);return an=x.slice(r,1<m?1-m:void 0)}function $s(r){var o=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&o===13&&(r=13)):r=o,r===10&&(r=13),32<=r||r===13?r:0}function Gs(){return!0}function Hd(){return!1}function In(r){function o(u,m,x,S,M){this._reactName=u,this._targetInst=x,this.type=m,this.nativeEvent=S,this.target=M,this.currentTarget=null;for(var B in r)r.hasOwnProperty(B)&&(u=r[B],this[B]=u?u(S):S[B]);return this.isDefaultPrevented=(S.defaultPrevented!=null?S.defaultPrevented:S.returnValue===!1)?Gs:Hd,this.isPropagationStopped=Hd,this}return v(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=Gs)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Gs)},persist:function(){},isPersistent:Gs}),o}var la={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},qo=In(la),Fr=v({},la,{view:0,detail:0}),de=In(Fr),Sc,ni,ca,Ws=v({},Fr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Dc,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==ca&&(ca&&r.type==="mousemove"?(Sc=r.screenX-ca.screenX,ni=r.screenY-ca.screenY):ni=Sc=0,ca=r),Sc)},movementY:function(r){return"movementY"in r?r.movementY:ni}}),Ud=In(Ws),wc=v({},Ws,{dataTransfer:0}),xm=In(wc),Vd=v({},Fr,{relatedTarget:0}),Cc=In(Vd),_m=v({},la,{animationName:0,elapsedTime:0,pseudoElement:0}),Ec=In(_m),Sm=v({},la,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),Ui=In(Sm),wm=v({},la,{data:0}),Ac=In(wm),Aa={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},$d={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"},Gd={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Tc(r){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(r):(r=Gd[r])?!!o[r]:!1}function Dc(){return Tc}var Wd=v({},Fr,{key:function(r){if(r.key){var o=Aa[r.key]||r.key;if(o!=="Unidentified")return o}return r.type==="keypress"?(r=$s(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?$d[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Dc,charCode:function(r){return r.type==="keypress"?$s(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?$s(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),Zd=In(Wd),Cm=v({},Ws,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),qd=In(Cm),Mc=v({},Fr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Dc}),Em=In(Mc),Yd=v({},la,{propertyName:0,elapsedTime:0,pseudoElement:0}),Xd=In(Yd),Yo=v({},Ws,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),ar=In(Yo),Am=v({},la,{newState:0,oldState:0}),Zs=In(Am),ui=[9,13,27,32],Xo=Ei&&"CompositionEvent"in window,Hr=null;Ei&&"documentMode"in document&&(Hr=document.documentMode);var Tm=Ei&&"TextEvent"in window&&!Hr,Ko=Ei&&(!Xo||Hr&&8<Hr&&11>=Hr),Qo=" ",Kd=!1;function Qd(r,o){switch(r){case"keyup":return ui.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Oc(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Ur=!1;function Ti(r,o){switch(r){case"compositionend":return Oc(o);case"keypress":return o.which!==32?null:(Kd=!0,Qo);case"textInput":return r=o.data,r===Qo&&Kd?null:r;default:return null}}function Vr(r,o){if(Ur)return r==="compositionend"||!Xo&&Qd(r,o)?(r=Ea(),an=ir=Hi=null,Ur=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return Ko&&o.locale!=="ko"?null:o.data;default:return null}}var Dm={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 Vi(r){var o=r&&r.nodeName&&r.nodeName.toLowerCase();return o==="input"?!!Dm[r.type]:o==="textarea"}function Jd(r,o,u,m){Ir?qt?qt.push(m):qt=[m]:Ir=m,o=$f(o,"onChange"),0<o.length&&(u=new qo("onChange","change",null,u,m),r.push({event:u,listeners:o}))}var $i=null,qs=null;function Ys(r){b_(r,0)}function Xs(r){var o=Sa(r);if(Ye(o))return r}function Ks(r,o){if(r==="change")return o}var tf=!1;if(Ei){var Gi;if(Ei){var $r="oninput"in document;if(!$r){var ef=document.createElement("div");ef.setAttribute("oninput","return;"),$r=typeof ef.oninput=="function"}Gi=$r}else Gi=!1;tf=Gi&&(!document.documentMode||9<document.documentMode)}function Jo(){$i&&($i.detachEvent("onpropertychange",nf),qs=$i=null)}function nf(r){if(r.propertyName==="value"&&Xs(qs)){var o=[];Jd(o,qs,r,Us(r)),_c(Ys,o)}}function ua(r,o,u){r==="focusin"?(Jo(),$i=o,qs=u,$i.attachEvent("onpropertychange",nf)):r==="focusout"&&Jo()}function Mm(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Xs(qs)}function Gr(r,o){if(r==="click")return Xs(o)}function Om(r,o){if(r==="input"||r==="change")return Xs(o)}function da(r,o){return r===o&&(r!==0||1/r===1/o)||r!==r&&o!==o}var zn=typeof Object.is=="function"?Object.is:da;function Wr(r,o){if(zn(r,o))return!0;if(typeof r!="object"||r===null||typeof o!="object"||o===null)return!1;var u=Object.keys(r),m=Object.keys(o);if(u.length!==m.length)return!1;for(m=0;m<u.length;m++){var x=u[m];if(!mn.call(o,x)||!zn(r[x],o[x]))return!1}return!0}function tl(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function Qs(r,o){var u=tl(r);r=0;for(var m;u;){if(u.nodeType===3){if(m=r+u.textContent.length,r<=o&&m>=o)return{node:u,offset:o-r};r=m}t:{for(;u;){if(u.nextSibling){u=u.nextSibling;break t}u=u.parentNode}u=void 0}u=tl(u)}}function el(r,o){return r&&o?r===o?!0:r&&r.nodeType===3?!1:o&&o.nodeType===3?el(r,o.parentNode):"contains"in r?r.contains(o):r.compareDocumentPosition?!!(r.compareDocumentPosition(o)&16):!1:!1}function Js(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var o=Pr(r.document);o instanceof r.HTMLIFrameElement;){try{var u=typeof o.contentWindow.location.href=="string"}catch{u=!1}if(u)r=o.contentWindow;else break;o=Pr(r.document)}return o}function Ta(r){var o=r&&r.nodeName&&r.nodeName.toLowerCase();return o&&(o==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||o==="textarea"||r.contentEditable==="true")}var nl=Ei&&"documentMode"in document&&11>=document.documentMode,Da=null,il=null,to=null,Zr=!1;function af(r,o,u){var m=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;Zr||Da==null||Da!==Pr(m)||(m=Da,"selectionStart"in m&&Ta(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),to&&Wr(to,m)||(to=m,m=$f(il,"onSelect"),0<m.length&&(o=new qo("onSelect","select",null,o,u),r.push({event:o,listeners:m}),o.target=Da)))}function Ma(r,o){var u={};return u[r.toLowerCase()]=o.toLowerCase(),u["Webkit"+r]="webkit"+o,u["Moz"+r]="moz"+o,u}var qr={animationend:Ma("Animation","AnimationEnd"),animationiteration:Ma("Animation","AnimationIteration"),animationstart:Ma("Animation","AnimationStart"),transitionrun:Ma("Transition","TransitionRun"),transitionstart:Ma("Transition","TransitionStart"),transitioncancel:Ma("Transition","TransitionCancel"),transitionend:Ma("Transition","TransitionEnd")},al={},rf={};Ei&&(rf=document.createElement("div").style,"AnimationEvent"in window||(delete qr.animationend.animation,delete qr.animationiteration.animation,delete qr.animationstart.animation),"TransitionEvent"in window||delete qr.transitionend.transition);function Rn(r){if(al[r])return al[r];if(!qr[r])return r;var o=qr[r],u;for(u in o)if(o.hasOwnProperty(u)&&u in rf)return al[r]=o[u];return r}var eo=Rn("animationend"),sf=Rn("animationiteration"),no=Rn("animationstart"),km=Rn("transitionrun"),of=Rn("transitionstart"),Lm=Rn("transitioncancel"),Yr=Rn("transitionend"),lf=new Map,Oa="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Oa.push("scrollEnd");function di(r,o){lf.set(r,o),tr(o,[r])}var io=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var o=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(o))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},fi=[],Zn=0,rl=0;function ao(){for(var r=Zn,o=rl=Zn=0;o<r;){var u=fi[o];fi[o++]=null;var m=fi[o];fi[o++]=null;var x=fi[o];fi[o++]=null;var S=fi[o];if(fi[o++]=null,m!==null&&x!==null){var M=m.pending;M===null?x.next=x:(x.next=M.next,M.next=x),m.pending=x}S!==0&&Xr(u,x,S)}}function ka(r,o,u,m){fi[Zn++]=r,fi[Zn++]=o,fi[Zn++]=u,fi[Zn++]=m,rl|=m,r.lanes|=m,r=r.alternate,r!==null&&(r.lanes|=m)}function kc(r,o,u,m){return ka(r,o,u,m),ro(r)}function Wi(r,o){return ka(r,null,null,o),ro(r)}function Xr(r,o,u){r.lanes|=u;var m=r.alternate;m!==null&&(m.lanes|=u);for(var x=!1,S=r.return;S!==null;)S.childLanes|=u,m=S.alternate,m!==null&&(m.childLanes|=u),S.tag===22&&(r=S.stateNode,r===null||r._visibility&1||(x=!0)),r=S,S=S.return;return r.tag===3?(S=r.stateNode,x&&o!==null&&(x=31-Vt(u),r=S.hiddenUpdates,m=r[x],m===null?r[x]=[o]:m.push(o),o.lane=u|536870912),S):null}function ro(r){if(50<nu)throw nu=0,Rg=null,Error(i(185));for(var o=r.return;o!==null;)r=o,o=r.return;return r.tag===3?r.stateNode:null}var rr={};function zm(r,o,u,m){this.tag=r,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function qn(r,o,u,m){return new zm(r,o,u,m)}function sl(r){return r=r.prototype,!(!r||!r.isReactComponent)}function Zi(r,o){var u=r.alternate;return u===null?(u=qn(r.tag,o,r.key,r.mode),u.elementType=r.elementType,u.type=r.type,u.stateNode=r.stateNode,u.alternate=r,r.alternate=u):(u.pendingProps=o,u.type=r.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=r.flags&65011712,u.childLanes=r.childLanes,u.lanes=r.lanes,u.child=r.child,u.memoizedProps=r.memoizedProps,u.memoizedState=r.memoizedState,u.updateQueue=r.updateQueue,o=r.dependencies,u.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},u.sibling=r.sibling,u.index=r.index,u.ref=r.ref,u.refCleanup=r.refCleanup,u}function Lc(r,o){r.flags&=65011714;var u=r.alternate;return u===null?(r.childLanes=0,r.lanes=o,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=u.childLanes,r.lanes=u.lanes,r.child=u.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=u.memoizedProps,r.memoizedState=u.memoizedState,r.updateQueue=u.updateQueue,r.type=u.type,o=u.dependencies,r.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext}),r}function so(r,o,u,m,x,S){var M=0;if(m=r,typeof r=="function")sl(r)&&(M=1);else if(typeof r=="string")M=GD(r,u,mt.current)?26:r==="html"||r==="head"||r==="body"?27:5;else t:switch(r){case Q:return r=qn(31,u,o,x),r.elementType=Q,r.lanes=S,r;case C:return sr(u.children,x,S,o);case A:M=8,x|=24;break;case k:return r=qn(12,u,o,x|2),r.elementType=k,r.lanes=S,r;case H:return r=qn(13,u,o,x),r.elementType=H,r.lanes=S,r;case V:return r=qn(19,u,o,x),r.elementType=V,r.lanes=S,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case j:M=10;break t;case z:M=9;break t;case P:M=11;break t;case U:M=14;break t;case Z:M=16,m=null;break t}M=29,u=Error(i(130,r===null?"null":typeof r,"")),m=null}return o=qn(M,u,o,x),o.elementType=r,o.type=m,o.lanes=S,o}function sr(r,o,u,m){return r=qn(7,r,m,o),r.lanes=u,r}function ol(r,o,u){return r=qn(6,r,null,o),r.lanes=u,r}function zc(r){var o=qn(18,null,null,0);return o.stateNode=r,o}function Rc(r,o,u){return o=qn(4,r.children!==null?r.children:[],r.key,o),o.lanes=u,o.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},o}var c=new WeakMap;function h(r,o){if(typeof r=="object"&&r!==null){var u=c.get(r);return u!==void 0?u:(o={value:r,source:o,stack:nn(o)},c.set(r,o),o)}return{value:r,source:o,stack:nn(o)}}var b=[],E=0,D=null,N=0,G=[],tt=0,lt=null,_t=1,kt="";function Ft(r,o){b[E++]=N,b[E++]=D,D=r,N=o}function ee(r,o,u){G[tt++]=_t,G[tt++]=kt,G[tt++]=lt,lt=r;var m=_t;r=kt;var x=32-Vt(m)-1;m&=~(1<<x),u+=1;var S=32-Vt(o)+x;if(30<S){var M=x-x%5;S=(m&(1<<M)-1).toString(32),m>>=M,x-=M,_t=1<<32-Vt(o)+x|u<<x|m,kt=S+r}else _t=1<<S|u<<x|m,kt=r}function Dn(r){r.return!==null&&(Ft(r,1),ee(r,1,0))}function rn(r){for(;r===D;)D=b[--E],b[E]=null,N=b[--E],b[E]=null;for(;r===lt;)lt=G[--tt],G[tt]=null,kt=G[--tt],G[tt]=null,_t=G[--tt],G[tt]=null}function ii(r,o){G[tt++]=_t,G[tt++]=kt,G[tt++]=lt,_t=o.id,kt=o.overflow,lt=r}var xe=null,_e=null,oe=!1,La=null,hi=!1,ll=Error(i(519));function za(r){var o=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw oo(h(o,r)),ll}function Pc(r){var o=r.stateNode,u=r.type,m=r.memoizedProps;switch(o[vn]=r,o[Ln]=m,u){case"dialog":ce("cancel",o),ce("close",o);break;case"iframe":case"object":case"embed":ce("load",o);break;case"video":case"audio":for(u=0;u<au.length;u++)ce(au[u],o);break;case"source":ce("error",o);break;case"img":case"image":case"link":ce("error",o),ce("load",o);break;case"details":ce("toggle",o);break;case"input":ce("invalid",o),Fs(o,m.value,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name,!0);break;case"select":ce("invalid",o);break;case"textarea":ce("invalid",o),Nr(o,m.value,m.defaultValue,m.children)}u=m.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||o.textContent===""+u||m.suppressHydrationWarning===!0||S_(o.textContent,u)?(m.popover!=null&&(ce("beforetoggle",o),ce("toggle",o)),m.onScroll!=null&&ce("scroll",o),m.onScrollEnd!=null&&ce("scrollend",o),m.onClick!=null&&(o.onclick=ci),o=!0):o=!1,o||za(r,!0)}function en(r){for(xe=r.return;xe;)switch(xe.tag){case 5:case 31:case 13:hi=!1;return;case 27:case 3:hi=!0;return;default:xe=xe.return}}function fa(r){if(r!==xe)return!1;if(!oe)return en(r),oe=!0,!1;var o=r.tag,u;if((u=o!==3&&o!==27)&&((u=o===5)&&(u=r.type,u=!(u!=="form"&&u!=="button")||Yg(r.type,r.memoizedProps)),u=!u),u&&_e&&za(r),en(r),o===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));_e=k_(r)}else if(o===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));_e=k_(r)}else o===27?(o=_e,us(r.type)?(r=tv,tv=null,_e=r):_e=o):_e=xe?Yi(r.stateNode.nextSibling):null;return!0}function or(){_e=xe=null,oe=!1}function Nc(){var r=La;return r!==null&&(vi===null?vi=r:vi.push.apply(vi,r),La=null),r}function oo(r){La===null?La=[r]:La.push(r)}var lo=F(null),Ra=null,ha=null;function Kr(r,o,u){at(lo,o._currentValue),o._currentValue=u}function lr(r){r._currentValue=lo.current,K(lo)}function Rm(r,o,u){for(;r!==null;){var m=r.alternate;if((r.childLanes&o)!==o?(r.childLanes|=o,m!==null&&(m.childLanes|=o)):m!==null&&(m.childLanes&o)!==o&&(m.childLanes|=o),r===u)break;r=r.return}}function Pm(r,o,u,m){var x=r.child;for(x!==null&&(x.return=r);x!==null;){var S=x.dependencies;if(S!==null){var M=x.child;S=S.firstContext;t:for(;S!==null;){var B=S;S=x;for(var W=0;W<o.length;W++)if(B.context===o[W]){S.lanes|=u,B=S.alternate,B!==null&&(B.lanes|=u),Rm(S.return,u,r),m||(M=null);break t}S=B.next}}else if(x.tag===18){if(M=x.return,M===null)throw Error(i(341));M.lanes|=u,S=M.alternate,S!==null&&(S.lanes|=u),Rm(M,u,r),M=null}else M=x.child;if(M!==null)M.return=x;else for(M=x;M!==null;){if(M===r){M=null;break}if(x=M.sibling,x!==null){x.return=M.return,M=x;break}M=M.return}x=M}}function cl(r,o,u,m){r=null;for(var x=o,S=!1;x!==null;){if(!S){if((x.flags&524288)!==0)S=!0;else if((x.flags&262144)!==0)break}if(x.tag===10){var M=x.alternate;if(M===null)throw Error(i(387));if(M=M.memoizedProps,M!==null){var B=x.type;zn(x.pendingProps.value,M.value)||(r!==null?r.push(B):r=[B])}}else if(x===ft.current){if(M=x.alternate,M===null)throw Error(i(387));M.memoizedState.memoizedState!==x.memoizedState.memoizedState&&(r!==null?r.push(cu):r=[cu])}x=x.return}r!==null&&Pm(o,r,u,m),o.flags|=262144}function cf(r){for(r=r.firstContext;r!==null;){if(!zn(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function co(r){Ra=r,ha=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function Fn(r){return ox(Ra,r)}function uf(r,o){return Ra===null&&co(r),ox(r,o)}function ox(r,o){var u=o._currentValue;if(o={context:o,memoizedValue:u,next:null},ha===null){if(r===null)throw Error(i(308));ha=o,r.dependencies={lanes:0,firstContext:o},r.flags|=524288}else ha=ha.next=o;return u}var HT=typeof AbortController<"u"?AbortController:function(){var r=[],o=this.signal={aborted:!1,addEventListener:function(u,m){r.push(m)}};this.abort=function(){o.aborted=!0,r.forEach(function(u){return u()})}},UT=t.unstable_scheduleCallback,VT=t.unstable_NormalPriority,yn={$$typeof:j,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Nm(){return{controller:new HT,data:new Map,refCount:0}}function jc(r){r.refCount--,r.refCount===0&&UT(VT,function(){r.controller.abort()})}var Bc=null,jm=0,ul=0,dl=null;function $T(r,o){if(Bc===null){var u=Bc=[];jm=0,ul=Fg(),dl={status:"pending",value:void 0,then:function(m){u.push(m)}}}return jm++,o.then(lx,lx),o}function lx(){if(--jm===0&&Bc!==null){dl!==null&&(dl.status="fulfilled");var r=Bc;Bc=null,ul=0,dl=null;for(var o=0;o<r.length;o++)(0,r[o])()}}function GT(r,o){var u=[],m={status:"pending",value:null,reason:null,then:function(x){u.push(x)}};return r.then(function(){m.status="fulfilled",m.value=o;for(var x=0;x<u.length;x++)(0,u[x])(o)},function(x){for(m.status="rejected",m.reason=x,x=0;x<u.length;x++)(0,u[x])(void 0)}),m}var cx=I.S;I.S=function(r,o){W0=At(),typeof o=="object"&&o!==null&&typeof o.then=="function"&&$T(r,o),cx!==null&&cx(r,o)};var uo=F(null);function Bm(){var r=uo.current;return r!==null?r:Ue.pooledCache}function df(r,o){o===null?at(uo,uo.current):at(uo,o.pool)}function ux(){var r=Bm();return r===null?null:{parent:yn._currentValue,pool:r}}var fl=Error(i(460)),Im=Error(i(474)),ff=Error(i(542)),hf={then:function(){}};function dx(r){return r=r.status,r==="fulfilled"||r==="rejected"}function fx(r,o,u){switch(u=r[u],u===void 0?r.push(o):u!==o&&(o.then(ci,ci),o=u),o.status){case"fulfilled":return o.value;case"rejected":throw r=o.reason,px(r),r;default:if(typeof o.status=="string")o.then(ci,ci);else{if(r=Ue,r!==null&&100<r.shellSuspendCounter)throw Error(i(482));r=o,r.status="pending",r.then(function(m){if(o.status==="pending"){var x=o;x.status="fulfilled",x.value=m}},function(m){if(o.status==="pending"){var x=o;x.status="rejected",x.reason=m}})}switch(o.status){case"fulfilled":return o.value;case"rejected":throw r=o.reason,px(r),r}throw ho=o,fl}}function fo(r){try{var o=r._init;return o(r._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(ho=u,fl):u}}var ho=null;function hx(){if(ho===null)throw Error(i(459));var r=ho;return ho=null,r}function px(r){if(r===fl||r===ff)throw Error(i(483))}var hl=null,Ic=0;function pf(r){var o=Ic;return Ic+=1,hl===null&&(hl=[]),fx(hl,r,o)}function Fc(r,o){o=o.props.ref,r.ref=o!==void 0?o:null}function mf(r,o){throw o.$$typeof===y?Error(i(525)):(r=Object.prototype.toString.call(o),Error(i(31,r==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":r)))}function mx(r){function o(J,Y){if(r){var rt=J.deletions;rt===null?(J.deletions=[Y],J.flags|=16):rt.push(Y)}}function u(J,Y){if(!r)return null;for(;Y!==null;)o(J,Y),Y=Y.sibling;return null}function m(J){for(var Y=new Map;J!==null;)J.key!==null?Y.set(J.key,J):Y.set(J.index,J),J=J.sibling;return Y}function x(J,Y){return J=Zi(J,Y),J.index=0,J.sibling=null,J}function S(J,Y,rt){return J.index=rt,r?(rt=J.alternate,rt!==null?(rt=rt.index,rt<Y?(J.flags|=67108866,Y):rt):(J.flags|=67108866,Y)):(J.flags|=1048576,Y)}function M(J){return r&&J.alternate===null&&(J.flags|=67108866),J}function B(J,Y,rt,xt){return Y===null||Y.tag!==6?(Y=ol(rt,J.mode,xt),Y.return=J,Y):(Y=x(Y,rt),Y.return=J,Y)}function W(J,Y,rt,xt){var Wt=rt.type;return Wt===C?vt(J,Y,rt.props.children,xt,rt.key):Y!==null&&(Y.elementType===Wt||typeof Wt=="object"&&Wt!==null&&Wt.$$typeof===Z&&fo(Wt)===Y.type)?(Y=x(Y,rt.props),Fc(Y,rt),Y.return=J,Y):(Y=so(rt.type,rt.key,rt.props,null,J.mode,xt),Fc(Y,rt),Y.return=J,Y)}function st(J,Y,rt,xt){return Y===null||Y.tag!==4||Y.stateNode.containerInfo!==rt.containerInfo||Y.stateNode.implementation!==rt.implementation?(Y=Rc(rt,J.mode,xt),Y.return=J,Y):(Y=x(Y,rt.children||[]),Y.return=J,Y)}function vt(J,Y,rt,xt,Wt){return Y===null||Y.tag!==7?(Y=sr(rt,J.mode,xt,Wt),Y.return=J,Y):(Y=x(Y,rt),Y.return=J,Y)}function St(J,Y,rt){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return Y=ol(""+Y,J.mode,rt),Y.return=J,Y;if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case _:return rt=so(Y.type,Y.key,Y.props,null,J.mode,rt),Fc(rt,Y),rt.return=J,rt;case w:return Y=Rc(Y,J.mode,rt),Y.return=J,Y;case Z:return Y=fo(Y),St(J,Y,rt)}if(ut(Y)||R(Y))return Y=sr(Y,J.mode,rt,null),Y.return=J,Y;if(typeof Y.then=="function")return St(J,pf(Y),rt);if(Y.$$typeof===j)return St(J,uf(J,Y),rt);mf(J,Y)}return null}function ct(J,Y,rt,xt){var Wt=Y!==null?Y.key:null;if(typeof rt=="string"&&rt!==""||typeof rt=="number"||typeof rt=="bigint")return Wt!==null?null:B(J,Y,""+rt,xt);if(typeof rt=="object"&&rt!==null){switch(rt.$$typeof){case _:return rt.key===Wt?W(J,Y,rt,xt):null;case w:return rt.key===Wt?st(J,Y,rt,xt):null;case Z:return rt=fo(rt),ct(J,Y,rt,xt)}if(ut(rt)||R(rt))return Wt!==null?null:vt(J,Y,rt,xt,null);if(typeof rt.then=="function")return ct(J,Y,pf(rt),xt);if(rt.$$typeof===j)return ct(J,Y,uf(J,rt),xt);mf(J,rt)}return null}function ht(J,Y,rt,xt,Wt){if(typeof xt=="string"&&xt!==""||typeof xt=="number"||typeof xt=="bigint")return J=J.get(rt)||null,B(Y,J,""+xt,Wt);if(typeof xt=="object"&&xt!==null){switch(xt.$$typeof){case _:return J=J.get(xt.key===null?rt:xt.key)||null,W(Y,J,xt,Wt);case w:return J=J.get(xt.key===null?rt:xt.key)||null,st(Y,J,xt,Wt);case Z:return xt=fo(xt),ht(J,Y,rt,xt,Wt)}if(ut(xt)||R(xt))return J=J.get(rt)||null,vt(Y,J,xt,Wt,null);if(typeof xt.then=="function")return ht(J,Y,rt,pf(xt),Wt);if(xt.$$typeof===j)return ht(J,Y,rt,uf(Y,xt),Wt);mf(Y,xt)}return null}function Pt(J,Y,rt,xt){for(var Wt=null,Se=null,Nt=Y,ne=Y=0,he=null;Nt!==null&&ne<rt.length;ne++){Nt.index>ne?(he=Nt,Nt=null):he=Nt.sibling;var we=ct(J,Nt,rt[ne],xt);if(we===null){Nt===null&&(Nt=he);break}r&&Nt&&we.alternate===null&&o(J,Nt),Y=S(we,Y,ne),Se===null?Wt=we:Se.sibling=we,Se=we,Nt=he}if(ne===rt.length)return u(J,Nt),oe&&Ft(J,ne),Wt;if(Nt===null){for(;ne<rt.length;ne++)Nt=St(J,rt[ne],xt),Nt!==null&&(Y=S(Nt,Y,ne),Se===null?Wt=Nt:Se.sibling=Nt,Se=Nt);return oe&&Ft(J,ne),Wt}for(Nt=m(Nt);ne<rt.length;ne++)he=ht(Nt,J,ne,rt[ne],xt),he!==null&&(r&&he.alternate!==null&&Nt.delete(he.key===null?ne:he.key),Y=S(he,Y,ne),Se===null?Wt=he:Se.sibling=he,Se=he);return r&&Nt.forEach(function(ms){return o(J,ms)}),oe&&Ft(J,ne),Wt}function Zt(J,Y,rt,xt){if(rt==null)throw Error(i(151));for(var Wt=null,Se=null,Nt=Y,ne=Y=0,he=null,we=rt.next();Nt!==null&&!we.done;ne++,we=rt.next()){Nt.index>ne?(he=Nt,Nt=null):he=Nt.sibling;var ms=ct(J,Nt,we.value,xt);if(ms===null){Nt===null&&(Nt=he);break}r&&Nt&&ms.alternate===null&&o(J,Nt),Y=S(ms,Y,ne),Se===null?Wt=ms:Se.sibling=ms,Se=ms,Nt=he}if(we.done)return u(J,Nt),oe&&Ft(J,ne),Wt;if(Nt===null){for(;!we.done;ne++,we=rt.next())we=St(J,we.value,xt),we!==null&&(Y=S(we,Y,ne),Se===null?Wt=we:Se.sibling=we,Se=we);return oe&&Ft(J,ne),Wt}for(Nt=m(Nt);!we.done;ne++,we=rt.next())we=ht(Nt,J,ne,we.value,xt),we!==null&&(r&&we.alternate!==null&&Nt.delete(we.key===null?ne:we.key),Y=S(we,Y,ne),Se===null?Wt=we:Se.sibling=we,Se=we);return r&&Nt.forEach(function(nM){return o(J,nM)}),oe&&Ft(J,ne),Wt}function Ie(J,Y,rt,xt){if(typeof rt=="object"&&rt!==null&&rt.type===C&&rt.key===null&&(rt=rt.props.children),typeof rt=="object"&&rt!==null){switch(rt.$$typeof){case _:t:{for(var Wt=rt.key;Y!==null;){if(Y.key===Wt){if(Wt=rt.type,Wt===C){if(Y.tag===7){u(J,Y.sibling),xt=x(Y,rt.props.children),xt.return=J,J=xt;break t}}else if(Y.elementType===Wt||typeof Wt=="object"&&Wt!==null&&Wt.$$typeof===Z&&fo(Wt)===Y.type){u(J,Y.sibling),xt=x(Y,rt.props),Fc(xt,rt),xt.return=J,J=xt;break t}u(J,Y);break}else o(J,Y);Y=Y.sibling}rt.type===C?(xt=sr(rt.props.children,J.mode,xt,rt.key),xt.return=J,J=xt):(xt=so(rt.type,rt.key,rt.props,null,J.mode,xt),Fc(xt,rt),xt.return=J,J=xt)}return M(J);case w:t:{for(Wt=rt.key;Y!==null;){if(Y.key===Wt)if(Y.tag===4&&Y.stateNode.containerInfo===rt.containerInfo&&Y.stateNode.implementation===rt.implementation){u(J,Y.sibling),xt=x(Y,rt.children||[]),xt.return=J,J=xt;break t}else{u(J,Y);break}else o(J,Y);Y=Y.sibling}xt=Rc(rt,J.mode,xt),xt.return=J,J=xt}return M(J);case Z:return rt=fo(rt),Ie(J,Y,rt,xt)}if(ut(rt))return Pt(J,Y,rt,xt);if(R(rt)){if(Wt=R(rt),typeof Wt!="function")throw Error(i(150));return rt=Wt.call(rt),Zt(J,Y,rt,xt)}if(typeof rt.then=="function")return Ie(J,Y,pf(rt),xt);if(rt.$$typeof===j)return Ie(J,Y,uf(J,rt),xt);mf(J,rt)}return typeof rt=="string"&&rt!==""||typeof rt=="number"||typeof rt=="bigint"?(rt=""+rt,Y!==null&&Y.tag===6?(u(J,Y.sibling),xt=x(Y,rt),xt.return=J,J=xt):(u(J,Y),xt=ol(rt,J.mode,xt),xt.return=J,J=xt),M(J)):u(J,Y)}return function(J,Y,rt,xt){try{Ic=0;var Wt=Ie(J,Y,rt,xt);return hl=null,Wt}catch(Nt){if(Nt===fl||Nt===ff)throw Nt;var Se=qn(29,Nt,null,J.mode);return Se.lanes=xt,Se.return=J,Se}finally{}}}var po=mx(!0),gx=mx(!1),Qr=!1;function Fm(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Hm(r,o){r=r.updateQueue,o.updateQueue===r&&(o.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function Jr(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function ts(r,o,u){var m=r.updateQueue;if(m===null)return null;if(m=m.shared,(Ae&2)!==0){var x=m.pending;return x===null?o.next=o:(o.next=x.next,x.next=o),m.pending=o,o=ro(r),Xr(r,null,u),o}return ka(r,m,o,u),ro(r)}function Hc(r,o,u){if(o=o.updateQueue,o!==null&&(o=o.shared,(u&4194048)!==0)){var m=o.lanes;m&=r.pendingLanes,u|=m,o.lanes=u,Pd(r,u)}}function Um(r,o){var u=r.updateQueue,m=r.alternate;if(m!==null&&(m=m.updateQueue,u===m)){var x=null,S=null;if(u=u.firstBaseUpdate,u!==null){do{var M={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};S===null?x=S=M:S=S.next=M,u=u.next}while(u!==null);S===null?x=S=o:S=S.next=o}else x=S=o;u={baseState:m.baseState,firstBaseUpdate:x,lastBaseUpdate:S,shared:m.shared,callbacks:m.callbacks},r.updateQueue=u;return}r=u.lastBaseUpdate,r===null?u.firstBaseUpdate=o:r.next=o,u.lastBaseUpdate=o}var Vm=!1;function Uc(){if(Vm){var r=dl;if(r!==null)throw r}}function Vc(r,o,u,m){Vm=!1;var x=r.updateQueue;Qr=!1;var S=x.firstBaseUpdate,M=x.lastBaseUpdate,B=x.shared.pending;if(B!==null){x.shared.pending=null;var W=B,st=W.next;W.next=null,M===null?S=st:M.next=st,M=W;var vt=r.alternate;vt!==null&&(vt=vt.updateQueue,B=vt.lastBaseUpdate,B!==M&&(B===null?vt.firstBaseUpdate=st:B.next=st,vt.lastBaseUpdate=W))}if(S!==null){var St=x.baseState;M=0,vt=st=W=null,B=S;do{var ct=B.lane&-536870913,ht=ct!==B.lane;if(ht?(fe&ct)===ct:(m&ct)===ct){ct!==0&&ct===ul&&(Vm=!0),vt!==null&&(vt=vt.next={lane:0,tag:B.tag,payload:B.payload,callback:null,next:null});t:{var Pt=r,Zt=B;ct=o;var Ie=u;switch(Zt.tag){case 1:if(Pt=Zt.payload,typeof Pt=="function"){St=Pt.call(Ie,St,ct);break t}St=Pt;break t;case 3:Pt.flags=Pt.flags&-65537|128;case 0:if(Pt=Zt.payload,ct=typeof Pt=="function"?Pt.call(Ie,St,ct):Pt,ct==null)break t;St=v({},St,ct);break t;case 2:Qr=!0}}ct=B.callback,ct!==null&&(r.flags|=64,ht&&(r.flags|=8192),ht=x.callbacks,ht===null?x.callbacks=[ct]:ht.push(ct))}else ht={lane:ct,tag:B.tag,payload:B.payload,callback:B.callback,next:null},vt===null?(st=vt=ht,W=St):vt=vt.next=ht,M|=ct;if(B=B.next,B===null){if(B=x.shared.pending,B===null)break;ht=B,B=ht.next,ht.next=null,x.lastBaseUpdate=ht,x.shared.pending=null}}while(!0);vt===null&&(W=St),x.baseState=W,x.firstBaseUpdate=st,x.lastBaseUpdate=vt,S===null&&(x.shared.lanes=0),rs|=M,r.lanes=M,r.memoizedState=St}}function vx(r,o){if(typeof r!="function")throw Error(i(191,r));r.call(o)}function bx(r,o){var u=r.callbacks;if(u!==null)for(r.callbacks=null,r=0;r<u.length;r++)vx(u[r],o)}var pl=F(null),gf=F(0);function yx(r,o){r=vr,at(gf,r),at(pl,o),vr=r|o.baseLanes}function $m(){at(gf,vr),at(pl,pl.current)}function Gm(){vr=gf.current,K(pl),K(gf)}var Di=F(null),qi=null;function es(r){var o=r.alternate;at(dn,dn.current&1),at(Di,r),qi===null&&(o===null||pl.current!==null||o.memoizedState!==null)&&(qi=r)}function Wm(r){at(dn,dn.current),at(Di,r),qi===null&&(qi=r)}function xx(r){r.tag===22?(at(dn,dn.current),at(Di,r),qi===null&&(qi=r)):ns()}function ns(){at(dn,dn.current),at(Di,Di.current)}function Mi(r){K(Di),qi===r&&(qi=null),K(dn)}var dn=F(0);function vf(r){for(var o=r;o!==null;){if(o.tag===13){var u=o.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||Qg(u)||Jg(u)))return o}else if(o.tag===19&&(o.memoizedProps.revealOrder==="forwards"||o.memoizedProps.revealOrder==="backwards"||o.memoizedProps.revealOrder==="unstable_legacy-backwards"||o.memoizedProps.revealOrder==="together")){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===r)break;for(;o.sibling===null;){if(o.return===null||o.return===r)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var cr=0,te=null,je=null,xn=null,bf=!1,ml=!1,mo=!1,yf=0,$c=0,gl=null,WT=0;function sn(){throw Error(i(321))}function Zm(r,o){if(o===null)return!1;for(var u=0;u<o.length&&u<r.length;u++)if(!zn(r[u],o[u]))return!1;return!0}function qm(r,o,u,m,x,S){return cr=S,te=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,I.H=r===null||r.memoizedState===null?i0:cg,mo=!1,S=u(m,x),mo=!1,ml&&(S=Sx(o,u,m,x)),_x(r),S}function _x(r){I.H=Zc;var o=je!==null&&je.next!==null;if(cr=0,xn=je=te=null,bf=!1,$c=0,gl=null,o)throw Error(i(300));r===null||_n||(r=r.dependencies,r!==null&&cf(r)&&(_n=!0))}function Sx(r,o,u,m){te=r;var x=0;do{if(ml&&(gl=null),$c=0,ml=!1,25<=x)throw Error(i(301));if(x+=1,xn=je=null,r.updateQueue!=null){var S=r.updateQueue;S.lastEffect=null,S.events=null,S.stores=null,S.memoCache!=null&&(S.memoCache.index=0)}I.H=a0,S=o(u,m)}while(ml);return S}function ZT(){var r=I.H,o=r.useState()[0];return o=typeof o.then=="function"?Gc(o):o,r=r.useState()[0],(je!==null?je.memoizedState:null)!==r&&(te.flags|=1024),o}function Ym(){var r=yf!==0;return yf=0,r}function Xm(r,o,u){o.updateQueue=r.updateQueue,o.flags&=-2053,r.lanes&=~u}function Km(r){if(bf){for(r=r.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}bf=!1}cr=0,xn=je=te=null,ml=!1,$c=yf=0,gl=null}function ai(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xn===null?te.memoizedState=xn=r:xn=xn.next=r,xn}function fn(){if(je===null){var r=te.alternate;r=r!==null?r.memoizedState:null}else r=je.next;var o=xn===null?te.memoizedState:xn.next;if(o!==null)xn=o,je=r;else{if(r===null)throw te.alternate===null?Error(i(467)):Error(i(310));je=r,r={memoizedState:je.memoizedState,baseState:je.baseState,baseQueue:je.baseQueue,queue:je.queue,next:null},xn===null?te.memoizedState=xn=r:xn=xn.next=r}return xn}function xf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Gc(r){var o=$c;return $c+=1,gl===null&&(gl=[]),r=fx(gl,r,o),o=te,(xn===null?o.memoizedState:xn.next)===null&&(o=o.alternate,I.H=o===null||o.memoizedState===null?i0:cg),r}function _f(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return Gc(r);if(r.$$typeof===j)return Fn(r)}throw Error(i(438,String(r)))}function Qm(r){var o=null,u=te.updateQueue;if(u!==null&&(o=u.memoCache),o==null){var m=te.alternate;m!==null&&(m=m.updateQueue,m!==null&&(m=m.memoCache,m!=null&&(o={data:m.data.map(function(x){return x.slice()}),index:0})))}if(o==null&&(o={data:[],index:0}),u===null&&(u=xf(),te.updateQueue=u),u.memoCache=o,u=o.data[o.index],u===void 0)for(u=o.data[o.index]=Array(r),m=0;m<r;m++)u[m]=et;return o.index++,u}function ur(r,o){return typeof o=="function"?o(r):o}function Sf(r){var o=fn();return Jm(o,je,r)}function Jm(r,o,u){var m=r.queue;if(m===null)throw Error(i(311));m.lastRenderedReducer=u;var x=r.baseQueue,S=m.pending;if(S!==null){if(x!==null){var M=x.next;x.next=S.next,S.next=M}o.baseQueue=x=S,m.pending=null}if(S=r.baseState,x===null)r.memoizedState=S;else{o=x.next;var B=M=null,W=null,st=o,vt=!1;do{var St=st.lane&-536870913;if(St!==st.lane?(fe&St)===St:(cr&St)===St){var ct=st.revertLane;if(ct===0)W!==null&&(W=W.next={lane:0,revertLane:0,gesture:null,action:st.action,hasEagerState:st.hasEagerState,eagerState:st.eagerState,next:null}),St===ul&&(vt=!0);else if((cr&ct)===ct){st=st.next,ct===ul&&(vt=!0);continue}else St={lane:0,revertLane:st.revertLane,gesture:null,action:st.action,hasEagerState:st.hasEagerState,eagerState:st.eagerState,next:null},W===null?(B=W=St,M=S):W=W.next=St,te.lanes|=ct,rs|=ct;St=st.action,mo&&u(S,St),S=st.hasEagerState?st.eagerState:u(S,St)}else ct={lane:St,revertLane:st.revertLane,gesture:st.gesture,action:st.action,hasEagerState:st.hasEagerState,eagerState:st.eagerState,next:null},W===null?(B=W=ct,M=S):W=W.next=ct,te.lanes|=St,rs|=St;st=st.next}while(st!==null&&st!==o);if(W===null?M=S:W.next=B,!zn(S,r.memoizedState)&&(_n=!0,vt&&(u=dl,u!==null)))throw u;r.memoizedState=S,r.baseState=M,r.baseQueue=W,m.lastRenderedState=S}return x===null&&(m.lanes=0),[r.memoizedState,m.dispatch]}function tg(r){var o=fn(),u=o.queue;if(u===null)throw Error(i(311));u.lastRenderedReducer=r;var m=u.dispatch,x=u.pending,S=o.memoizedState;if(x!==null){u.pending=null;var M=x=x.next;do S=r(S,M.action),M=M.next;while(M!==x);zn(S,o.memoizedState)||(_n=!0),o.memoizedState=S,o.baseQueue===null&&(o.baseState=S),u.lastRenderedState=S}return[S,m]}function wx(r,o,u){var m=te,x=fn(),S=oe;if(S){if(u===void 0)throw Error(i(407));u=u()}else u=o();var M=!zn((je||x).memoizedState,u);if(M&&(x.memoizedState=u,_n=!0),x=x.queue,ig(Ax.bind(null,m,x,r),[r]),x.getSnapshot!==o||M||xn!==null&&xn.memoizedState.tag&1){if(m.flags|=2048,vl(9,{destroy:void 0},Ex.bind(null,m,x,u,o),null),Ue===null)throw Error(i(349));S||(cr&127)!==0||Cx(m,o,u)}return u}function Cx(r,o,u){r.flags|=16384,r={getSnapshot:o,value:u},o=te.updateQueue,o===null?(o=xf(),te.updateQueue=o,o.stores=[r]):(u=o.stores,u===null?o.stores=[r]:u.push(r))}function Ex(r,o,u,m){o.value=u,o.getSnapshot=m,Tx(o)&&Dx(r)}function Ax(r,o,u){return u(function(){Tx(o)&&Dx(r)})}function Tx(r){var o=r.getSnapshot;r=r.value;try{var u=o();return!zn(r,u)}catch{return!0}}function Dx(r){var o=Wi(r,2);o!==null&&bi(o,r,2)}function eg(r){var o=ai();if(typeof r=="function"){var u=r;if(r=u(),mo){Bt(!0);try{u()}finally{Bt(!1)}}}return o.memoizedState=o.baseState=r,o.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ur,lastRenderedState:r},o}function Mx(r,o,u,m){return r.baseState=u,Jm(r,je,typeof m=="function"?m:ur)}function qT(r,o,u,m,x){if(Ef(r))throw Error(i(485));if(r=o.action,r!==null){var S={payload:x,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(M){S.listeners.push(M)}};I.T!==null?u(!0):S.isTransition=!1,m(S),u=o.pending,u===null?(S.next=o.pending=S,Ox(o,S)):(S.next=u.next,o.pending=u.next=S)}}function Ox(r,o){var u=o.action,m=o.payload,x=r.state;if(o.isTransition){var S=I.T,M={};I.T=M;try{var B=u(x,m),W=I.S;W!==null&&W(M,B),kx(r,o,B)}catch(st){ng(r,o,st)}finally{S!==null&&M.types!==null&&(S.types=M.types),I.T=S}}else try{S=u(x,m),kx(r,o,S)}catch(st){ng(r,o,st)}}function kx(r,o,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(m){Lx(r,o,m)},function(m){return ng(r,o,m)}):Lx(r,o,u)}function Lx(r,o,u){o.status="fulfilled",o.value=u,zx(o),r.state=u,o=r.pending,o!==null&&(u=o.next,u===o?r.pending=null:(u=u.next,o.next=u,Ox(r,u)))}function ng(r,o,u){var m=r.pending;if(r.pending=null,m!==null){m=m.next;do o.status="rejected",o.reason=u,zx(o),o=o.next;while(o!==m)}r.action=null}function zx(r){r=r.listeners;for(var o=0;o<r.length;o++)(0,r[o])()}function Rx(r,o){return o}function Px(r,o){if(oe){var u=Ue.formState;if(u!==null){t:{var m=te;if(oe){if(_e){e:{for(var x=_e,S=hi;x.nodeType!==8;){if(!S){x=null;break e}if(x=Yi(x.nextSibling),x===null){x=null;break e}}S=x.data,x=S==="F!"||S==="F"?x:null}if(x){_e=Yi(x.nextSibling),m=x.data==="F!";break t}}za(m)}m=!1}m&&(o=u[0])}}return u=ai(),u.memoizedState=u.baseState=o,m={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Rx,lastRenderedState:o},u.queue=m,u=t0.bind(null,te,m),m.dispatch=u,m=eg(!1),S=lg.bind(null,te,!1,m.queue),m=ai(),x={state:o,dispatch:null,action:r,pending:null},m.queue=x,u=qT.bind(null,te,x,S,u),x.dispatch=u,m.memoizedState=r,[o,u,!1]}function Nx(r){var o=fn();return jx(o,je,r)}function jx(r,o,u){if(o=Jm(r,o,Rx)[0],r=Sf(ur)[0],typeof o=="object"&&o!==null&&typeof o.then=="function")try{var m=Gc(o)}catch(M){throw M===fl?ff:M}else m=o;o=fn();var x=o.queue,S=x.dispatch;return u!==o.memoizedState&&(te.flags|=2048,vl(9,{destroy:void 0},YT.bind(null,x,u),null)),[m,S,r]}function YT(r,o){r.action=o}function Bx(r){var o=fn(),u=je;if(u!==null)return jx(o,u,r);fn(),o=o.memoizedState,u=fn();var m=u.queue.dispatch;return u.memoizedState=r,[o,m,!1]}function vl(r,o,u,m){return r={tag:r,create:u,deps:m,inst:o,next:null},o=te.updateQueue,o===null&&(o=xf(),te.updateQueue=o),u=o.lastEffect,u===null?o.lastEffect=r.next=r:(m=u.next,u.next=r,r.next=m,o.lastEffect=r),r}function Ix(){return fn().memoizedState}function wf(r,o,u,m){var x=ai();te.flags|=r,x.memoizedState=vl(1|o,{destroy:void 0},u,m===void 0?null:m)}function Cf(r,o,u,m){var x=fn();m=m===void 0?null:m;var S=x.memoizedState.inst;je!==null&&m!==null&&Zm(m,je.memoizedState.deps)?x.memoizedState=vl(o,S,u,m):(te.flags|=r,x.memoizedState=vl(1|o,S,u,m))}function Fx(r,o){wf(8390656,8,r,o)}function ig(r,o){Cf(2048,8,r,o)}function XT(r){te.flags|=4;var o=te.updateQueue;if(o===null)o=xf(),te.updateQueue=o,o.events=[r];else{var u=o.events;u===null?o.events=[r]:u.push(r)}}function Hx(r){var o=fn().memoizedState;return XT({ref:o,nextImpl:r}),function(){if((Ae&2)!==0)throw Error(i(440));return o.impl.apply(void 0,arguments)}}function Ux(r,o){return Cf(4,2,r,o)}function Vx(r,o){return Cf(4,4,r,o)}function $x(r,o){if(typeof o=="function"){r=r();var u=o(r);return function(){typeof u=="function"?u():o(null)}}if(o!=null)return r=r(),o.current=r,function(){o.current=null}}function Gx(r,o,u){u=u!=null?u.concat([r]):null,Cf(4,4,$x.bind(null,o,r),u)}function ag(){}function Wx(r,o){var u=fn();o=o===void 0?null:o;var m=u.memoizedState;return o!==null&&Zm(o,m[1])?m[0]:(u.memoizedState=[r,o],r)}function Zx(r,o){var u=fn();o=o===void 0?null:o;var m=u.memoizedState;if(o!==null&&Zm(o,m[1]))return m[0];if(m=r(),mo){Bt(!0);try{r()}finally{Bt(!1)}}return u.memoizedState=[m,o],m}function rg(r,o,u){return u===void 0||(cr&1073741824)!==0&&(fe&261930)===0?r.memoizedState=o:(r.memoizedState=u,r=q0(),te.lanes|=r,rs|=r,u)}function qx(r,o,u,m){return zn(u,o)?u:pl.current!==null?(r=rg(r,u,m),zn(r,o)||(_n=!0),r):(cr&42)===0||(cr&1073741824)!==0&&(fe&261930)===0?(_n=!0,r.memoizedState=u):(r=q0(),te.lanes|=r,rs|=r,o)}function Yx(r,o,u,m,x){var S=$.p;$.p=S!==0&&8>S?S:8;var M=I.T,B={};I.T=B,lg(r,!1,o,u);try{var W=x(),st=I.S;if(st!==null&&st(B,W),W!==null&&typeof W=="object"&&typeof W.then=="function"){var vt=GT(W,m);Wc(r,o,vt,Li(r))}else Wc(r,o,m,Li(r))}catch(St){Wc(r,o,{then:function(){},status:"rejected",reason:St},Li())}finally{$.p=S,M!==null&&B.types!==null&&(M.types=B.types),I.T=M}}function KT(){}function sg(r,o,u,m){if(r.tag!==5)throw Error(i(476));var x=Xx(r).queue;Yx(r,x,o,q,u===null?KT:function(){return Kx(r),u(m)})}function Xx(r){var o=r.memoizedState;if(o!==null)return o;o={memoizedState:q,baseState:q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ur,lastRenderedState:q},next:null};var u={};return o.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ur,lastRenderedState:u},next:null},r.memoizedState=o,r=r.alternate,r!==null&&(r.memoizedState=o),o}function Kx(r){var o=Xx(r);o.next===null&&(o=r.alternate.memoizedState),Wc(r,o.next.queue,{},Li())}function og(){return Fn(cu)}function Qx(){return fn().memoizedState}function Jx(){return fn().memoizedState}function QT(r){for(var o=r.return;o!==null;){switch(o.tag){case 24:case 3:var u=Li();r=Jr(u);var m=ts(o,r,u);m!==null&&(bi(m,o,u),Hc(m,o,u)),o={cache:Nm()},r.payload=o;return}o=o.return}}function JT(r,o,u){var m=Li();u={lane:m,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Ef(r)?e0(o,u):(u=kc(r,o,u,m),u!==null&&(bi(u,r,m),n0(u,o,m)))}function t0(r,o,u){var m=Li();Wc(r,o,u,m)}function Wc(r,o,u,m){var x={lane:m,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(Ef(r))e0(o,x);else{var S=r.alternate;if(r.lanes===0&&(S===null||S.lanes===0)&&(S=o.lastRenderedReducer,S!==null))try{var M=o.lastRenderedState,B=S(M,u);if(x.hasEagerState=!0,x.eagerState=B,zn(B,M))return ka(r,o,x,0),Ue===null&&ao(),!1}catch{}finally{}if(u=kc(r,o,x,m),u!==null)return bi(u,r,m),n0(u,o,m),!0}return!1}function lg(r,o,u,m){if(m={lane:2,revertLane:Fg(),gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},Ef(r)){if(o)throw Error(i(479))}else o=kc(r,u,m,2),o!==null&&bi(o,r,2)}function Ef(r){var o=r.alternate;return r===te||o!==null&&o===te}function e0(r,o){ml=bf=!0;var u=r.pending;u===null?o.next=o:(o.next=u.next,u.next=o),r.pending=o}function n0(r,o,u){if((u&4194048)!==0){var m=o.lanes;m&=r.pendingLanes,u|=m,o.lanes=u,Pd(r,u)}}var Zc={readContext:Fn,use:_f,useCallback:sn,useContext:sn,useEffect:sn,useImperativeHandle:sn,useLayoutEffect:sn,useInsertionEffect:sn,useMemo:sn,useReducer:sn,useRef:sn,useState:sn,useDebugValue:sn,useDeferredValue:sn,useTransition:sn,useSyncExternalStore:sn,useId:sn,useHostTransitionStatus:sn,useFormState:sn,useActionState:sn,useOptimistic:sn,useMemoCache:sn,useCacheRefresh:sn};Zc.useEffectEvent=sn;var i0={readContext:Fn,use:_f,useCallback:function(r,o){return ai().memoizedState=[r,o===void 0?null:o],r},useContext:Fn,useEffect:Fx,useImperativeHandle:function(r,o,u){u=u!=null?u.concat([r]):null,wf(4194308,4,$x.bind(null,o,r),u)},useLayoutEffect:function(r,o){return wf(4194308,4,r,o)},useInsertionEffect:function(r,o){wf(4,2,r,o)},useMemo:function(r,o){var u=ai();o=o===void 0?null:o;var m=r();if(mo){Bt(!0);try{r()}finally{Bt(!1)}}return u.memoizedState=[m,o],m},useReducer:function(r,o,u){var m=ai();if(u!==void 0){var x=u(o);if(mo){Bt(!0);try{u(o)}finally{Bt(!1)}}}else x=o;return m.memoizedState=m.baseState=x,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:x},m.queue=r,r=r.dispatch=JT.bind(null,te,r),[m.memoizedState,r]},useRef:function(r){var o=ai();return r={current:r},o.memoizedState=r},useState:function(r){r=eg(r);var o=r.queue,u=t0.bind(null,te,o);return o.dispatch=u,[r.memoizedState,u]},useDebugValue:ag,useDeferredValue:function(r,o){var u=ai();return rg(u,r,o)},useTransition:function(){var r=eg(!1);return r=Yx.bind(null,te,r.queue,!0,!1),ai().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,o,u){var m=te,x=ai();if(oe){if(u===void 0)throw Error(i(407));u=u()}else{if(u=o(),Ue===null)throw Error(i(349));(fe&127)!==0||Cx(m,o,u)}x.memoizedState=u;var S={value:u,getSnapshot:o};return x.queue=S,Fx(Ax.bind(null,m,S,r),[r]),m.flags|=2048,vl(9,{destroy:void 0},Ex.bind(null,m,S,u,o),null),u},useId:function(){var r=ai(),o=Ue.identifierPrefix;if(oe){var u=kt,m=_t;u=(m&~(1<<32-Vt(m)-1)).toString(32)+u,o="_"+o+"R_"+u,u=yf++,0<u&&(o+="H"+u.toString(32)),o+="_"}else u=WT++,o="_"+o+"r_"+u.toString(32)+"_";return r.memoizedState=o},useHostTransitionStatus:og,useFormState:Px,useActionState:Px,useOptimistic:function(r){var o=ai();o.memoizedState=o.baseState=r;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return o.queue=u,o=lg.bind(null,te,!0,u),u.dispatch=o,[r,o]},useMemoCache:Qm,useCacheRefresh:function(){return ai().memoizedState=QT.bind(null,te)},useEffectEvent:function(r){var o=ai(),u={impl:r};return o.memoizedState=u,function(){if((Ae&2)!==0)throw Error(i(440));return u.impl.apply(void 0,arguments)}}},cg={readContext:Fn,use:_f,useCallback:Wx,useContext:Fn,useEffect:ig,useImperativeHandle:Gx,useInsertionEffect:Ux,useLayoutEffect:Vx,useMemo:Zx,useReducer:Sf,useRef:Ix,useState:function(){return Sf(ur)},useDebugValue:ag,useDeferredValue:function(r,o){var u=fn();return qx(u,je.memoizedState,r,o)},useTransition:function(){var r=Sf(ur)[0],o=fn().memoizedState;return[typeof r=="boolean"?r:Gc(r),o]},useSyncExternalStore:wx,useId:Qx,useHostTransitionStatus:og,useFormState:Nx,useActionState:Nx,useOptimistic:function(r,o){var u=fn();return Mx(u,je,r,o)},useMemoCache:Qm,useCacheRefresh:Jx};cg.useEffectEvent=Hx;var a0={readContext:Fn,use:_f,useCallback:Wx,useContext:Fn,useEffect:ig,useImperativeHandle:Gx,useInsertionEffect:Ux,useLayoutEffect:Vx,useMemo:Zx,useReducer:tg,useRef:Ix,useState:function(){return tg(ur)},useDebugValue:ag,useDeferredValue:function(r,o){var u=fn();return je===null?rg(u,r,o):qx(u,je.memoizedState,r,o)},useTransition:function(){var r=tg(ur)[0],o=fn().memoizedState;return[typeof r=="boolean"?r:Gc(r),o]},useSyncExternalStore:wx,useId:Qx,useHostTransitionStatus:og,useFormState:Bx,useActionState:Bx,useOptimistic:function(r,o){var u=fn();return je!==null?Mx(u,je,r,o):(u.baseState=r,[r,u.queue.dispatch])},useMemoCache:Qm,useCacheRefresh:Jx};a0.useEffectEvent=Hx;function ug(r,o,u,m){o=r.memoizedState,u=u(m,o),u=u==null?o:v({},o,u),r.memoizedState=u,r.lanes===0&&(r.updateQueue.baseState=u)}var dg={enqueueSetState:function(r,o,u){r=r._reactInternals;var m=Li(),x=Jr(m);x.payload=o,u!=null&&(x.callback=u),o=ts(r,x,m),o!==null&&(bi(o,r,m),Hc(o,r,m))},enqueueReplaceState:function(r,o,u){r=r._reactInternals;var m=Li(),x=Jr(m);x.tag=1,x.payload=o,u!=null&&(x.callback=u),o=ts(r,x,m),o!==null&&(bi(o,r,m),Hc(o,r,m))},enqueueForceUpdate:function(r,o){r=r._reactInternals;var u=Li(),m=Jr(u);m.tag=2,o!=null&&(m.callback=o),o=ts(r,m,u),o!==null&&(bi(o,r,u),Hc(o,r,u))}};function r0(r,o,u,m,x,S,M){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(m,S,M):o.prototype&&o.prototype.isPureReactComponent?!Wr(u,m)||!Wr(x,S):!0}function s0(r,o,u,m){r=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(u,m),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(u,m),o.state!==r&&dg.enqueueReplaceState(o,o.state,null)}function go(r,o){var u=o;if("ref"in o){u={};for(var m in o)m!=="ref"&&(u[m]=o[m])}if(r=r.defaultProps){u===o&&(u=v({},u));for(var x in r)u[x]===void 0&&(u[x]=r[x])}return u}function o0(r){io(r)}function l0(r){console.error(r)}function c0(r){io(r)}function Af(r,o){try{var u=r.onUncaughtError;u(o.value,{componentStack:o.stack})}catch(m){setTimeout(function(){throw m})}}function u0(r,o,u){try{var m=r.onCaughtError;m(u.value,{componentStack:u.stack,errorBoundary:o.tag===1?o.stateNode:null})}catch(x){setTimeout(function(){throw x})}}function fg(r,o,u){return u=Jr(u),u.tag=3,u.payload={element:null},u.callback=function(){Af(r,o)},u}function d0(r){return r=Jr(r),r.tag=3,r}function f0(r,o,u,m){var x=u.type.getDerivedStateFromError;if(typeof x=="function"){var S=m.value;r.payload=function(){return x(S)},r.callback=function(){u0(o,u,m)}}var M=u.stateNode;M!==null&&typeof M.componentDidCatch=="function"&&(r.callback=function(){u0(o,u,m),typeof x!="function"&&(ss===null?ss=new Set([this]):ss.add(this));var B=m.stack;this.componentDidCatch(m.value,{componentStack:B!==null?B:""})})}function tD(r,o,u,m,x){if(u.flags|=32768,m!==null&&typeof m=="object"&&typeof m.then=="function"){if(o=u.alternate,o!==null&&cl(o,u,x,!0),u=Di.current,u!==null){switch(u.tag){case 31:case 13:return qi===null?Bf():u.alternate===null&&on===0&&(on=3),u.flags&=-257,u.flags|=65536,u.lanes=x,m===hf?u.flags|=16384:(o=u.updateQueue,o===null?u.updateQueue=new Set([m]):o.add(m),jg(r,m,x)),!1;case 22:return u.flags|=65536,m===hf?u.flags|=16384:(o=u.updateQueue,o===null?(o={transitions:null,markerInstances:null,retryQueue:new Set([m])},u.updateQueue=o):(u=o.retryQueue,u===null?o.retryQueue=new Set([m]):u.add(m)),jg(r,m,x)),!1}throw Error(i(435,u.tag))}return jg(r,m,x),Bf(),!1}if(oe)return o=Di.current,o!==null?((o.flags&65536)===0&&(o.flags|=256),o.flags|=65536,o.lanes=x,m!==ll&&(r=Error(i(422),{cause:m}),oo(h(r,u)))):(m!==ll&&(o=Error(i(423),{cause:m}),oo(h(o,u))),r=r.current.alternate,r.flags|=65536,x&=-x,r.lanes|=x,m=h(m,u),x=fg(r.stateNode,m,x),Um(r,x),on!==4&&(on=2)),!1;var S=Error(i(520),{cause:m});if(S=h(S,u),eu===null?eu=[S]:eu.push(S),on!==4&&(on=2),o===null)return!0;m=h(m,u),u=o;do{switch(u.tag){case 3:return u.flags|=65536,r=x&-x,u.lanes|=r,r=fg(u.stateNode,m,r),Um(u,r),!1;case 1:if(o=u.type,S=u.stateNode,(u.flags&128)===0&&(typeof o.getDerivedStateFromError=="function"||S!==null&&typeof S.componentDidCatch=="function"&&(ss===null||!ss.has(S))))return u.flags|=65536,x&=-x,u.lanes|=x,x=d0(x),f0(x,r,u,m),Um(u,x),!1}u=u.return}while(u!==null);return!1}var hg=Error(i(461)),_n=!1;function Hn(r,o,u,m){o.child=r===null?gx(o,null,u,m):po(o,r.child,u,m)}function h0(r,o,u,m,x){u=u.render;var S=o.ref;if("ref"in m){var M={};for(var B in m)B!=="ref"&&(M[B]=m[B])}else M=m;return co(o),m=qm(r,o,u,M,S,x),B=Ym(),r!==null&&!_n?(Xm(r,o,x),dr(r,o,x)):(oe&&B&&Dn(o),o.flags|=1,Hn(r,o,m,x),o.child)}function p0(r,o,u,m,x){if(r===null){var S=u.type;return typeof S=="function"&&!sl(S)&&S.defaultProps===void 0&&u.compare===null?(o.tag=15,o.type=S,m0(r,o,S,m,x)):(r=so(u.type,null,m,o,o.mode,x),r.ref=o.ref,r.return=o,o.child=r)}if(S=r.child,!_g(r,x)){var M=S.memoizedProps;if(u=u.compare,u=u!==null?u:Wr,u(M,m)&&r.ref===o.ref)return dr(r,o,x)}return o.flags|=1,r=Zi(S,m),r.ref=o.ref,r.return=o,o.child=r}function m0(r,o,u,m,x){if(r!==null){var S=r.memoizedProps;if(Wr(S,m)&&r.ref===o.ref)if(_n=!1,o.pendingProps=m=S,_g(r,x))(r.flags&131072)!==0&&(_n=!0);else return o.lanes=r.lanes,dr(r,o,x)}return pg(r,o,u,m,x)}function g0(r,o,u,m){var x=m.children,S=r!==null?r.memoizedState:null;if(r===null&&o.stateNode===null&&(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),m.mode==="hidden"){if((o.flags&128)!==0){if(S=S!==null?S.baseLanes|u:u,r!==null){for(m=o.child=r.child,x=0;m!==null;)x=x|m.lanes|m.childLanes,m=m.sibling;m=x&~S}else m=0,o.child=null;return v0(r,o,S,u,m)}if((u&536870912)!==0)o.memoizedState={baseLanes:0,cachePool:null},r!==null&&df(o,S!==null?S.cachePool:null),S!==null?yx(o,S):$m(),xx(o);else return m=o.lanes=536870912,v0(r,o,S!==null?S.baseLanes|u:u,u,m)}else S!==null?(df(o,S.cachePool),yx(o,S),ns(),o.memoizedState=null):(r!==null&&df(o,null),$m(),ns());return Hn(r,o,x,u),o.child}function qc(r,o){return r!==null&&r.tag===22||o.stateNode!==null||(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.sibling}function v0(r,o,u,m,x){var S=Bm();return S=S===null?null:{parent:yn._currentValue,pool:S},o.memoizedState={baseLanes:u,cachePool:S},r!==null&&df(o,null),$m(),xx(o),r!==null&&cl(r,o,m,!0),o.childLanes=x,null}function Tf(r,o){return o=Mf({mode:o.mode,children:o.children},r.mode),o.ref=r.ref,r.child=o,o.return=r,o}function b0(r,o,u){return po(o,r.child,null,u),r=Tf(o,o.pendingProps),r.flags|=2,Mi(o),o.memoizedState=null,r}function eD(r,o,u){var m=o.pendingProps,x=(o.flags&128)!==0;if(o.flags&=-129,r===null){if(oe){if(m.mode==="hidden")return r=Tf(o,m),o.lanes=536870912,qc(null,r);if(Wm(o),(r=_e)?(r=O_(r,hi),r=r!==null&&r.data==="&"?r:null,r!==null&&(o.memoizedState={dehydrated:r,treeContext:lt!==null?{id:_t,overflow:kt}:null,retryLane:536870912,hydrationErrors:null},u=zc(r),u.return=o,o.child=u,xe=o,_e=null)):r=null,r===null)throw za(o);return o.lanes=536870912,null}return Tf(o,m)}var S=r.memoizedState;if(S!==null){var M=S.dehydrated;if(Wm(o),x)if(o.flags&256)o.flags&=-257,o=b0(r,o,u);else if(o.memoizedState!==null)o.child=r.child,o.flags|=128,o=null;else throw Error(i(558));else if(_n||cl(r,o,u,!1),x=(u&r.childLanes)!==0,_n||x){if(m=Ue,m!==null&&(M=Nd(m,u),M!==0&&M!==S.retryLane))throw S.retryLane=M,Wi(r,M),bi(m,r,M),hg;Bf(),o=b0(r,o,u)}else r=S.treeContext,_e=Yi(M.nextSibling),xe=o,oe=!0,La=null,hi=!1,r!==null&&ii(o,r),o=Tf(o,m),o.flags|=4096;return o}return r=Zi(r.child,{mode:m.mode,children:m.children}),r.ref=o.ref,o.child=r,r.return=o,r}function Df(r,o){var u=o.ref;if(u===null)r!==null&&r.ref!==null&&(o.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(i(284));(r===null||r.ref!==u)&&(o.flags|=4194816)}}function pg(r,o,u,m,x){return co(o),u=qm(r,o,u,m,void 0,x),m=Ym(),r!==null&&!_n?(Xm(r,o,x),dr(r,o,x)):(oe&&m&&Dn(o),o.flags|=1,Hn(r,o,u,x),o.child)}function y0(r,o,u,m,x,S){return co(o),o.updateQueue=null,u=Sx(o,m,u,x),_x(r),m=Ym(),r!==null&&!_n?(Xm(r,o,S),dr(r,o,S)):(oe&&m&&Dn(o),o.flags|=1,Hn(r,o,u,S),o.child)}function x0(r,o,u,m,x){if(co(o),o.stateNode===null){var S=rr,M=u.contextType;typeof M=="object"&&M!==null&&(S=Fn(M)),S=new u(m,S),o.memoizedState=S.state!==null&&S.state!==void 0?S.state:null,S.updater=dg,o.stateNode=S,S._reactInternals=o,S=o.stateNode,S.props=m,S.state=o.memoizedState,S.refs={},Fm(o),M=u.contextType,S.context=typeof M=="object"&&M!==null?Fn(M):rr,S.state=o.memoizedState,M=u.getDerivedStateFromProps,typeof M=="function"&&(ug(o,u,M,m),S.state=o.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof S.getSnapshotBeforeUpdate=="function"||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(M=S.state,typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount(),M!==S.state&&dg.enqueueReplaceState(S,S.state,null),Vc(o,m,S,x),Uc(),S.state=o.memoizedState),typeof S.componentDidMount=="function"&&(o.flags|=4194308),m=!0}else if(r===null){S=o.stateNode;var B=o.memoizedProps,W=go(u,B);S.props=W;var st=S.context,vt=u.contextType;M=rr,typeof vt=="object"&&vt!==null&&(M=Fn(vt));var St=u.getDerivedStateFromProps;vt=typeof St=="function"||typeof S.getSnapshotBeforeUpdate=="function",B=o.pendingProps!==B,vt||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(B||st!==M)&&s0(o,S,m,M),Qr=!1;var ct=o.memoizedState;S.state=ct,Vc(o,m,S,x),Uc(),st=o.memoizedState,B||ct!==st||Qr?(typeof St=="function"&&(ug(o,u,St,m),st=o.memoizedState),(W=Qr||r0(o,u,W,m,ct,st,M))?(vt||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount()),typeof S.componentDidMount=="function"&&(o.flags|=4194308)):(typeof S.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=m,o.memoizedState=st),S.props=m,S.state=st,S.context=M,m=W):(typeof S.componentDidMount=="function"&&(o.flags|=4194308),m=!1)}else{S=o.stateNode,Hm(r,o),M=o.memoizedProps,vt=go(u,M),S.props=vt,St=o.pendingProps,ct=S.context,st=u.contextType,W=rr,typeof st=="object"&&st!==null&&(W=Fn(st)),B=u.getDerivedStateFromProps,(st=typeof B=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(M!==St||ct!==W)&&s0(o,S,m,W),Qr=!1,ct=o.memoizedState,S.state=ct,Vc(o,m,S,x),Uc();var ht=o.memoizedState;M!==St||ct!==ht||Qr||r!==null&&r.dependencies!==null&&cf(r.dependencies)?(typeof B=="function"&&(ug(o,u,B,m),ht=o.memoizedState),(vt=Qr||r0(o,u,vt,m,ct,ht,W)||r!==null&&r.dependencies!==null&&cf(r.dependencies))?(st||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(m,ht,W),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(m,ht,W)),typeof S.componentDidUpdate=="function"&&(o.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof S.componentDidUpdate!="function"||M===r.memoizedProps&&ct===r.memoizedState||(o.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||M===r.memoizedProps&&ct===r.memoizedState||(o.flags|=1024),o.memoizedProps=m,o.memoizedState=ht),S.props=m,S.state=ht,S.context=W,m=vt):(typeof S.componentDidUpdate!="function"||M===r.memoizedProps&&ct===r.memoizedState||(o.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||M===r.memoizedProps&&ct===r.memoizedState||(o.flags|=1024),m=!1)}return S=m,Df(r,o),m=(o.flags&128)!==0,S||m?(S=o.stateNode,u=m&&typeof u.getDerivedStateFromError!="function"?null:S.render(),o.flags|=1,r!==null&&m?(o.child=po(o,r.child,null,x),o.child=po(o,null,u,x)):Hn(r,o,u,x),o.memoizedState=S.state,r=o.child):r=dr(r,o,x),r}function _0(r,o,u,m){return or(),o.flags|=256,Hn(r,o,u,m),o.child}var mg={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function gg(r){return{baseLanes:r,cachePool:ux()}}function vg(r,o,u){return r=r!==null?r.childLanes&~u:0,o&&(r|=ki),r}function S0(r,o,u){var m=o.pendingProps,x=!1,S=(o.flags&128)!==0,M;if((M=S)||(M=r!==null&&r.memoizedState===null?!1:(dn.current&2)!==0),M&&(x=!0,o.flags&=-129),M=(o.flags&32)!==0,o.flags&=-33,r===null){if(oe){if(x?es(o):ns(),(r=_e)?(r=O_(r,hi),r=r!==null&&r.data!=="&"?r:null,r!==null&&(o.memoizedState={dehydrated:r,treeContext:lt!==null?{id:_t,overflow:kt}:null,retryLane:536870912,hydrationErrors:null},u=zc(r),u.return=o,o.child=u,xe=o,_e=null)):r=null,r===null)throw za(o);return Jg(r)?o.lanes=32:o.lanes=536870912,null}var B=m.children;return m=m.fallback,x?(ns(),x=o.mode,B=Mf({mode:"hidden",children:B},x),m=sr(m,x,u,null),B.return=o,m.return=o,B.sibling=m,o.child=B,m=o.child,m.memoizedState=gg(u),m.childLanes=vg(r,M,u),o.memoizedState=mg,qc(null,m)):(es(o),bg(o,B))}var W=r.memoizedState;if(W!==null&&(B=W.dehydrated,B!==null)){if(S)o.flags&256?(es(o),o.flags&=-257,o=yg(r,o,u)):o.memoizedState!==null?(ns(),o.child=r.child,o.flags|=128,o=null):(ns(),B=m.fallback,x=o.mode,m=Mf({mode:"visible",children:m.children},x),B=sr(B,x,u,null),B.flags|=2,m.return=o,B.return=o,m.sibling=B,o.child=m,po(o,r.child,null,u),m=o.child,m.memoizedState=gg(u),m.childLanes=vg(r,M,u),o.memoizedState=mg,o=qc(null,m));else if(es(o),Jg(B)){if(M=B.nextSibling&&B.nextSibling.dataset,M)var st=M.dgst;M=st,m=Error(i(419)),m.stack="",m.digest=M,oo({value:m,source:null,stack:null}),o=yg(r,o,u)}else if(_n||cl(r,o,u,!1),M=(u&r.childLanes)!==0,_n||M){if(M=Ue,M!==null&&(m=Nd(M,u),m!==0&&m!==W.retryLane))throw W.retryLane=m,Wi(r,m),bi(M,r,m),hg;Qg(B)||Bf(),o=yg(r,o,u)}else Qg(B)?(o.flags|=192,o.child=r.child,o=null):(r=W.treeContext,_e=Yi(B.nextSibling),xe=o,oe=!0,La=null,hi=!1,r!==null&&ii(o,r),o=bg(o,m.children),o.flags|=4096);return o}return x?(ns(),B=m.fallback,x=o.mode,W=r.child,st=W.sibling,m=Zi(W,{mode:"hidden",children:m.children}),m.subtreeFlags=W.subtreeFlags&65011712,st!==null?B=Zi(st,B):(B=sr(B,x,u,null),B.flags|=2),B.return=o,m.return=o,m.sibling=B,o.child=m,qc(null,m),m=o.child,B=r.child.memoizedState,B===null?B=gg(u):(x=B.cachePool,x!==null?(W=yn._currentValue,x=x.parent!==W?{parent:W,pool:W}:x):x=ux(),B={baseLanes:B.baseLanes|u,cachePool:x}),m.memoizedState=B,m.childLanes=vg(r,M,u),o.memoizedState=mg,qc(r.child,m)):(es(o),u=r.child,r=u.sibling,u=Zi(u,{mode:"visible",children:m.children}),u.return=o,u.sibling=null,r!==null&&(M=o.deletions,M===null?(o.deletions=[r],o.flags|=16):M.push(r)),o.child=u,o.memoizedState=null,u)}function bg(r,o){return o=Mf({mode:"visible",children:o},r.mode),o.return=r,r.child=o}function Mf(r,o){return r=qn(22,r,null,o),r.lanes=0,r}function yg(r,o,u){return po(o,r.child,null,u),r=bg(o,o.pendingProps.children),r.flags|=2,o.memoizedState=null,r}function w0(r,o,u){r.lanes|=o;var m=r.alternate;m!==null&&(m.lanes|=o),Rm(r.return,o,u)}function xg(r,o,u,m,x,S){var M=r.memoizedState;M===null?r.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:m,tail:u,tailMode:x,treeForkCount:S}:(M.isBackwards=o,M.rendering=null,M.renderingStartTime=0,M.last=m,M.tail=u,M.tailMode=x,M.treeForkCount=S)}function C0(r,o,u){var m=o.pendingProps,x=m.revealOrder,S=m.tail;m=m.children;var M=dn.current,B=(M&2)!==0;if(B?(M=M&1|2,o.flags|=128):M&=1,at(dn,M),Hn(r,o,m,u),m=oe?N:0,!B&&r!==null&&(r.flags&128)!==0)t:for(r=o.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&w0(r,u,o);else if(r.tag===19)w0(r,u,o);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===o)break t;for(;r.sibling===null;){if(r.return===null||r.return===o)break t;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(x){case"forwards":for(u=o.child,x=null;u!==null;)r=u.alternate,r!==null&&vf(r)===null&&(x=u),u=u.sibling;u=x,u===null?(x=o.child,o.child=null):(x=u.sibling,u.sibling=null),xg(o,!1,x,u,S,m);break;case"backwards":case"unstable_legacy-backwards":for(u=null,x=o.child,o.child=null;x!==null;){if(r=x.alternate,r!==null&&vf(r)===null){o.child=x;break}r=x.sibling,x.sibling=u,u=x,x=r}xg(o,!0,u,null,S,m);break;case"together":xg(o,!1,null,null,void 0,m);break;default:o.memoizedState=null}return o.child}function dr(r,o,u){if(r!==null&&(o.dependencies=r.dependencies),rs|=o.lanes,(u&o.childLanes)===0)if(r!==null){if(cl(r,o,u,!1),(u&o.childLanes)===0)return null}else return null;if(r!==null&&o.child!==r.child)throw Error(i(153));if(o.child!==null){for(r=o.child,u=Zi(r,r.pendingProps),o.child=u,u.return=o;r.sibling!==null;)r=r.sibling,u=u.sibling=Zi(r,r.pendingProps),u.return=o;u.sibling=null}return o.child}function _g(r,o){return(r.lanes&o)!==0?!0:(r=r.dependencies,!!(r!==null&&cf(r)))}function nD(r,o,u){switch(o.tag){case 3:Ht(o,o.stateNode.containerInfo),Kr(o,yn,r.memoizedState.cache),or();break;case 27:case 5:Mt(o);break;case 4:Ht(o,o.stateNode.containerInfo);break;case 10:Kr(o,o.type,o.memoizedProps.value);break;case 31:if(o.memoizedState!==null)return o.flags|=128,Wm(o),null;break;case 13:var m=o.memoizedState;if(m!==null)return m.dehydrated!==null?(es(o),o.flags|=128,null):(u&o.child.childLanes)!==0?S0(r,o,u):(es(o),r=dr(r,o,u),r!==null?r.sibling:null);es(o);break;case 19:var x=(r.flags&128)!==0;if(m=(u&o.childLanes)!==0,m||(cl(r,o,u,!1),m=(u&o.childLanes)!==0),x){if(m)return C0(r,o,u);o.flags|=128}if(x=o.memoizedState,x!==null&&(x.rendering=null,x.tail=null,x.lastEffect=null),at(dn,dn.current),m)break;return null;case 22:return o.lanes=0,g0(r,o,u,o.pendingProps);case 24:Kr(o,yn,r.memoizedState.cache)}return dr(r,o,u)}function E0(r,o,u){if(r!==null)if(r.memoizedProps!==o.pendingProps)_n=!0;else{if(!_g(r,u)&&(o.flags&128)===0)return _n=!1,nD(r,o,u);_n=(r.flags&131072)!==0}else _n=!1,oe&&(o.flags&1048576)!==0&&ee(o,N,o.index);switch(o.lanes=0,o.tag){case 16:t:{var m=o.pendingProps;if(r=fo(o.elementType),o.type=r,typeof r=="function")sl(r)?(m=go(r,m),o.tag=1,o=x0(null,o,r,m,u)):(o.tag=0,o=pg(null,o,r,m,u));else{if(r!=null){var x=r.$$typeof;if(x===P){o.tag=11,o=h0(null,o,r,m,u);break t}else if(x===U){o.tag=14,o=p0(null,o,r,m,u);break t}}throw o=it(r)||r,Error(i(306,o,""))}}return o;case 0:return pg(r,o,o.type,o.pendingProps,u);case 1:return m=o.type,x=go(m,o.pendingProps),x0(r,o,m,x,u);case 3:t:{if(Ht(o,o.stateNode.containerInfo),r===null)throw Error(i(387));m=o.pendingProps;var S=o.memoizedState;x=S.element,Hm(r,o),Vc(o,m,null,u);var M=o.memoizedState;if(m=M.cache,Kr(o,yn,m),m!==S.cache&&Pm(o,[yn],u,!0),Uc(),m=M.element,S.isDehydrated)if(S={element:m,isDehydrated:!1,cache:M.cache},o.updateQueue.baseState=S,o.memoizedState=S,o.flags&256){o=_0(r,o,m,u);break t}else if(m!==x){x=h(Error(i(424)),o),oo(x),o=_0(r,o,m,u);break t}else{switch(r=o.stateNode.containerInfo,r.nodeType){case 9:r=r.body;break;default:r=r.nodeName==="HTML"?r.ownerDocument.body:r}for(_e=Yi(r.firstChild),xe=o,oe=!0,La=null,hi=!0,u=gx(o,null,m,u),o.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling}else{if(or(),m===x){o=dr(r,o,u);break t}Hn(r,o,m,u)}o=o.child}return o;case 26:return Df(r,o),r===null?(u=N_(o.type,null,o.pendingProps,null))?o.memoizedState=u:oe||(u=o.type,r=o.pendingProps,m=Gf(yt.current).createElement(u),m[vn]=o,m[Ln]=r,Un(m,u,r),bn(m),o.stateNode=m):o.memoizedState=N_(o.type,r.memoizedProps,o.pendingProps,r.memoizedState),null;case 27:return Mt(o),r===null&&oe&&(m=o.stateNode=z_(o.type,o.pendingProps,yt.current),xe=o,hi=!0,x=_e,us(o.type)?(tv=x,_e=Yi(m.firstChild)):_e=x),Hn(r,o,o.pendingProps.children,u),Df(r,o),r===null&&(o.flags|=4194304),o.child;case 5:return r===null&&oe&&((x=m=_e)&&(m=LD(m,o.type,o.pendingProps,hi),m!==null?(o.stateNode=m,xe=o,_e=Yi(m.firstChild),hi=!1,x=!0):x=!1),x||za(o)),Mt(o),x=o.type,S=o.pendingProps,M=r!==null?r.memoizedProps:null,m=S.children,Yg(x,S)?m=null:M!==null&&Yg(x,M)&&(o.flags|=32),o.memoizedState!==null&&(x=qm(r,o,ZT,null,null,u),cu._currentValue=x),Df(r,o),Hn(r,o,m,u),o.child;case 6:return r===null&&oe&&((r=u=_e)&&(u=zD(u,o.pendingProps,hi),u!==null?(o.stateNode=u,xe=o,_e=null,r=!0):r=!1),r||za(o)),null;case 13:return S0(r,o,u);case 4:return Ht(o,o.stateNode.containerInfo),m=o.pendingProps,r===null?o.child=po(o,null,m,u):Hn(r,o,m,u),o.child;case 11:return h0(r,o,o.type,o.pendingProps,u);case 7:return Hn(r,o,o.pendingProps,u),o.child;case 8:return Hn(r,o,o.pendingProps.children,u),o.child;case 12:return Hn(r,o,o.pendingProps.children,u),o.child;case 10:return m=o.pendingProps,Kr(o,o.type,m.value),Hn(r,o,m.children,u),o.child;case 9:return x=o.type._context,m=o.pendingProps.children,co(o),x=Fn(x),m=m(x),o.flags|=1,Hn(r,o,m,u),o.child;case 14:return p0(r,o,o.type,o.pendingProps,u);case 15:return m0(r,o,o.type,o.pendingProps,u);case 19:return C0(r,o,u);case 31:return eD(r,o,u);case 22:return g0(r,o,u,o.pendingProps);case 24:return co(o),m=Fn(yn),r===null?(x=Bm(),x===null&&(x=Ue,S=Nm(),x.pooledCache=S,S.refCount++,S!==null&&(x.pooledCacheLanes|=u),x=S),o.memoizedState={parent:m,cache:x},Fm(o),Kr(o,yn,x)):((r.lanes&u)!==0&&(Hm(r,o),Vc(o,null,null,u),Uc()),x=r.memoizedState,S=o.memoizedState,x.parent!==m?(x={parent:m,cache:m},o.memoizedState=x,o.lanes===0&&(o.memoizedState=o.updateQueue.baseState=x),Kr(o,yn,m)):(m=S.cache,Kr(o,yn,m),m!==x.cache&&Pm(o,[yn],u,!0))),Hn(r,o,o.pendingProps.children,u),o.child;case 29:throw o.pendingProps}throw Error(i(156,o.tag))}function fr(r){r.flags|=4}function Sg(r,o,u,m,x){if((o=(r.mode&32)!==0)&&(o=!1),o){if(r.flags|=16777216,(x&335544128)===x)if(r.stateNode.complete)r.flags|=8192;else if(Q0())r.flags|=8192;else throw ho=hf,Im}else r.flags&=-16777217}function A0(r,o){if(o.type!=="stylesheet"||(o.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!H_(o))if(Q0())r.flags|=8192;else throw ho=hf,Im}function Of(r,o){o!==null&&(r.flags|=4),r.flags&16384&&(o=r.tag!==22?zd():536870912,r.lanes|=o,_l|=o)}function Yc(r,o){if(!oe)switch(r.tailMode){case"hidden":o=r.tail;for(var u=null;o!==null;)o.alternate!==null&&(u=o),o=o.sibling;u===null?r.tail=null:u.sibling=null;break;case"collapsed":u=r.tail;for(var m=null;u!==null;)u.alternate!==null&&(m=u),u=u.sibling;m===null?o||r.tail===null?r.tail=null:r.tail.sibling=null:m.sibling=null}}function We(r){var o=r.alternate!==null&&r.alternate.child===r.child,u=0,m=0;if(o)for(var x=r.child;x!==null;)u|=x.lanes|x.childLanes,m|=x.subtreeFlags&65011712,m|=x.flags&65011712,x.return=r,x=x.sibling;else for(x=r.child;x!==null;)u|=x.lanes|x.childLanes,m|=x.subtreeFlags,m|=x.flags,x.return=r,x=x.sibling;return r.subtreeFlags|=m,r.childLanes=u,o}function iD(r,o,u){var m=o.pendingProps;switch(rn(o),o.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return We(o),null;case 1:return We(o),null;case 3:return u=o.stateNode,m=null,r!==null&&(m=r.memoizedState.cache),o.memoizedState.cache!==m&&(o.flags|=2048),lr(yn),Tt(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(r===null||r.child===null)&&(fa(o)?fr(o):r===null||r.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,Nc())),We(o),null;case 26:var x=o.type,S=o.memoizedState;return r===null?(fr(o),S!==null?(We(o),A0(o,S)):(We(o),Sg(o,x,null,m,u))):S?S!==r.memoizedState?(fr(o),We(o),A0(o,S)):(We(o),o.flags&=-16777217):(r=r.memoizedProps,r!==m&&fr(o),We(o),Sg(o,x,r,m,u)),null;case 27:if(Ee(o),u=yt.current,x=o.type,r!==null&&o.stateNode!=null)r.memoizedProps!==m&&fr(o);else{if(!m){if(o.stateNode===null)throw Error(i(166));return We(o),null}r=mt.current,fa(o)?Pc(o):(r=z_(x,m,u),o.stateNode=r,fr(o))}return We(o),null;case 5:if(Ee(o),x=o.type,r!==null&&o.stateNode!=null)r.memoizedProps!==m&&fr(o);else{if(!m){if(o.stateNode===null)throw Error(i(166));return We(o),null}if(S=mt.current,fa(o))Pc(o);else{var M=Gf(yt.current);switch(S){case 1:S=M.createElementNS("http://www.w3.org/2000/svg",x);break;case 2:S=M.createElementNS("http://www.w3.org/1998/Math/MathML",x);break;default:switch(x){case"svg":S=M.createElementNS("http://www.w3.org/2000/svg",x);break;case"math":S=M.createElementNS("http://www.w3.org/1998/Math/MathML",x);break;case"script":S=M.createElement("div"),S.innerHTML="<script><\/script>",S=S.removeChild(S.firstChild);break;case"select":S=typeof m.is=="string"?M.createElement("select",{is:m.is}):M.createElement("select"),m.multiple?S.multiple=!0:m.size&&(S.size=m.size);break;default:S=typeof m.is=="string"?M.createElement(x,{is:m.is}):M.createElement(x)}}S[vn]=o,S[Ln]=m;t:for(M=o.child;M!==null;){if(M.tag===5||M.tag===6)S.appendChild(M.stateNode);else if(M.tag!==4&&M.tag!==27&&M.child!==null){M.child.return=M,M=M.child;continue}if(M===o)break t;for(;M.sibling===null;){if(M.return===null||M.return===o)break t;M=M.return}M.sibling.return=M.return,M=M.sibling}o.stateNode=S;t:switch(Un(S,x,m),x){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break t;case"img":m=!0;break t;default:m=!1}m&&fr(o)}}return We(o),Sg(o,o.type,r===null?null:r.memoizedProps,o.pendingProps,u),null;case 6:if(r&&o.stateNode!=null)r.memoizedProps!==m&&fr(o);else{if(typeof m!="string"&&o.stateNode===null)throw Error(i(166));if(r=yt.current,fa(o)){if(r=o.stateNode,u=o.memoizedProps,m=null,x=xe,x!==null)switch(x.tag){case 27:case 5:m=x.memoizedProps}r[vn]=o,r=!!(r.nodeValue===u||m!==null&&m.suppressHydrationWarning===!0||S_(r.nodeValue,u)),r||za(o,!0)}else r=Gf(r).createTextNode(m),r[vn]=o,o.stateNode=r}return We(o),null;case 31:if(u=o.memoizedState,r===null||r.memoizedState!==null){if(m=fa(o),u!==null){if(r===null){if(!m)throw Error(i(318));if(r=o.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(557));r[vn]=o}else or(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;We(o),r=!1}else u=Nc(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=u),r=!0;if(!r)return o.flags&256?(Mi(o),o):(Mi(o),null);if((o.flags&128)!==0)throw Error(i(558))}return We(o),null;case 13:if(m=o.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(x=fa(o),m!==null&&m.dehydrated!==null){if(r===null){if(!x)throw Error(i(318));if(x=o.memoizedState,x=x!==null?x.dehydrated:null,!x)throw Error(i(317));x[vn]=o}else or(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;We(o),x=!1}else x=Nc(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=x),x=!0;if(!x)return o.flags&256?(Mi(o),o):(Mi(o),null)}return Mi(o),(o.flags&128)!==0?(o.lanes=u,o):(u=m!==null,r=r!==null&&r.memoizedState!==null,u&&(m=o.child,x=null,m.alternate!==null&&m.alternate.memoizedState!==null&&m.alternate.memoizedState.cachePool!==null&&(x=m.alternate.memoizedState.cachePool.pool),S=null,m.memoizedState!==null&&m.memoizedState.cachePool!==null&&(S=m.memoizedState.cachePool.pool),S!==x&&(m.flags|=2048)),u!==r&&u&&(o.child.flags|=8192),Of(o,o.updateQueue),We(o),null);case 4:return Tt(),r===null&&$g(o.stateNode.containerInfo),We(o),null;case 10:return lr(o.type),We(o),null;case 19:if(K(dn),m=o.memoizedState,m===null)return We(o),null;if(x=(o.flags&128)!==0,S=m.rendering,S===null)if(x)Yc(m,!1);else{if(on!==0||r!==null&&(r.flags&128)!==0)for(r=o.child;r!==null;){if(S=vf(r),S!==null){for(o.flags|=128,Yc(m,!1),r=S.updateQueue,o.updateQueue=r,Of(o,r),o.subtreeFlags=0,r=u,u=o.child;u!==null;)Lc(u,r),u=u.sibling;return at(dn,dn.current&1|2),oe&&Ft(o,m.treeForkCount),o.child}r=r.sibling}m.tail!==null&&At()>Pf&&(o.flags|=128,x=!0,Yc(m,!1),o.lanes=4194304)}else{if(!x)if(r=vf(S),r!==null){if(o.flags|=128,x=!0,r=r.updateQueue,o.updateQueue=r,Of(o,r),Yc(m,!0),m.tail===null&&m.tailMode==="hidden"&&!S.alternate&&!oe)return We(o),null}else 2*At()-m.renderingStartTime>Pf&&u!==536870912&&(o.flags|=128,x=!0,Yc(m,!1),o.lanes=4194304);m.isBackwards?(S.sibling=o.child,o.child=S):(r=m.last,r!==null?r.sibling=S:o.child=S,m.last=S)}return m.tail!==null?(r=m.tail,m.rendering=r,m.tail=r.sibling,m.renderingStartTime=At(),r.sibling=null,u=dn.current,at(dn,x?u&1|2:u&1),oe&&Ft(o,m.treeForkCount),r):(We(o),null);case 22:case 23:return Mi(o),Gm(),m=o.memoizedState!==null,r!==null?r.memoizedState!==null!==m&&(o.flags|=8192):m&&(o.flags|=8192),m?(u&536870912)!==0&&(o.flags&128)===0&&(We(o),o.subtreeFlags&6&&(o.flags|=8192)):We(o),u=o.updateQueue,u!==null&&Of(o,u.retryQueue),u=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(u=r.memoizedState.cachePool.pool),m=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(m=o.memoizedState.cachePool.pool),m!==u&&(o.flags|=2048),r!==null&&K(uo),null;case 24:return u=null,r!==null&&(u=r.memoizedState.cache),o.memoizedState.cache!==u&&(o.flags|=2048),lr(yn),We(o),null;case 25:return null;case 30:return null}throw Error(i(156,o.tag))}function aD(r,o){switch(rn(o),o.tag){case 1:return r=o.flags,r&65536?(o.flags=r&-65537|128,o):null;case 3:return lr(yn),Tt(),r=o.flags,(r&65536)!==0&&(r&128)===0?(o.flags=r&-65537|128,o):null;case 26:case 27:case 5:return Ee(o),null;case 31:if(o.memoizedState!==null){if(Mi(o),o.alternate===null)throw Error(i(340));or()}return r=o.flags,r&65536?(o.flags=r&-65537|128,o):null;case 13:if(Mi(o),r=o.memoizedState,r!==null&&r.dehydrated!==null){if(o.alternate===null)throw Error(i(340));or()}return r=o.flags,r&65536?(o.flags=r&-65537|128,o):null;case 19:return K(dn),null;case 4:return Tt(),null;case 10:return lr(o.type),null;case 22:case 23:return Mi(o),Gm(),r!==null&&K(uo),r=o.flags,r&65536?(o.flags=r&-65537|128,o):null;case 24:return lr(yn),null;case 25:return null;default:return null}}function T0(r,o){switch(rn(o),o.tag){case 3:lr(yn),Tt();break;case 26:case 27:case 5:Ee(o);break;case 4:Tt();break;case 31:o.memoizedState!==null&&Mi(o);break;case 13:Mi(o);break;case 19:K(dn);break;case 10:lr(o.type);break;case 22:case 23:Mi(o),Gm(),r!==null&&K(uo);break;case 24:lr(yn)}}function Xc(r,o){try{var u=o.updateQueue,m=u!==null?u.lastEffect:null;if(m!==null){var x=m.next;u=x;do{if((u.tag&r)===r){m=void 0;var S=u.create,M=u.inst;m=S(),M.destroy=m}u=u.next}while(u!==x)}}catch(B){Le(o,o.return,B)}}function is(r,o,u){try{var m=o.updateQueue,x=m!==null?m.lastEffect:null;if(x!==null){var S=x.next;m=S;do{if((m.tag&r)===r){var M=m.inst,B=M.destroy;if(B!==void 0){M.destroy=void 0,x=o;var W=u,st=B;try{st()}catch(vt){Le(x,W,vt)}}}m=m.next}while(m!==S)}}catch(vt){Le(o,o.return,vt)}}function D0(r){var o=r.updateQueue;if(o!==null){var u=r.stateNode;try{bx(o,u)}catch(m){Le(r,r.return,m)}}}function M0(r,o,u){u.props=go(r.type,r.memoizedProps),u.state=r.memoizedState;try{u.componentWillUnmount()}catch(m){Le(r,o,m)}}function Kc(r,o){try{var u=r.ref;if(u!==null){switch(r.tag){case 26:case 27:case 5:var m=r.stateNode;break;case 30:m=r.stateNode;break;default:m=r.stateNode}typeof u=="function"?r.refCleanup=u(m):u.current=m}}catch(x){Le(r,o,x)}}function Pa(r,o){var u=r.ref,m=r.refCleanup;if(u!==null)if(typeof m=="function")try{m()}catch(x){Le(r,o,x)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(x){Le(r,o,x)}else u.current=null}function O0(r){var o=r.type,u=r.memoizedProps,m=r.stateNode;try{t:switch(o){case"button":case"input":case"select":case"textarea":u.autoFocus&&m.focus();break t;case"img":u.src?m.src=u.src:u.srcSet&&(m.srcset=u.srcSet)}}catch(x){Le(r,r.return,x)}}function wg(r,o,u){try{var m=r.stateNode;AD(m,r.type,u,o),m[Ln]=o}catch(x){Le(r,r.return,x)}}function k0(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&us(r.type)||r.tag===4}function Cg(r){t:for(;;){for(;r.sibling===null;){if(r.return===null||k0(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.tag===27&&us(r.type)||r.flags&2||r.child===null||r.tag===4)continue t;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function Eg(r,o,u){var m=r.tag;if(m===5||m===6)r=r.stateNode,o?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(r,o):(o=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,o.appendChild(r),u=u._reactRootContainer,u!=null||o.onclick!==null||(o.onclick=ci));else if(m!==4&&(m===27&&us(r.type)&&(u=r.stateNode,o=null),r=r.child,r!==null))for(Eg(r,o,u),r=r.sibling;r!==null;)Eg(r,o,u),r=r.sibling}function kf(r,o,u){var m=r.tag;if(m===5||m===6)r=r.stateNode,o?u.insertBefore(r,o):u.appendChild(r);else if(m!==4&&(m===27&&us(r.type)&&(u=r.stateNode),r=r.child,r!==null))for(kf(r,o,u),r=r.sibling;r!==null;)kf(r,o,u),r=r.sibling}function L0(r){var o=r.stateNode,u=r.memoizedProps;try{for(var m=r.type,x=o.attributes;x.length;)o.removeAttributeNode(x[0]);Un(o,m,u),o[vn]=r,o[Ln]=u}catch(S){Le(r,r.return,S)}}var hr=!1,Sn=!1,Ag=!1,z0=typeof WeakSet=="function"?WeakSet:Set,Pn=null;function rD(r,o){if(r=r.containerInfo,Zg=Qf,r=Js(r),Ta(r)){if("selectionStart"in r)var u={start:r.selectionStart,end:r.selectionEnd};else t:{u=(u=r.ownerDocument)&&u.defaultView||window;var m=u.getSelection&&u.getSelection();if(m&&m.rangeCount!==0){u=m.anchorNode;var x=m.anchorOffset,S=m.focusNode;m=m.focusOffset;try{u.nodeType,S.nodeType}catch{u=null;break t}var M=0,B=-1,W=-1,st=0,vt=0,St=r,ct=null;e:for(;;){for(var ht;St!==u||x!==0&&St.nodeType!==3||(B=M+x),St!==S||m!==0&&St.nodeType!==3||(W=M+m),St.nodeType===3&&(M+=St.nodeValue.length),(ht=St.firstChild)!==null;)ct=St,St=ht;for(;;){if(St===r)break e;if(ct===u&&++st===x&&(B=M),ct===S&&++vt===m&&(W=M),(ht=St.nextSibling)!==null)break;St=ct,ct=St.parentNode}St=ht}u=B===-1||W===-1?null:{start:B,end:W}}else u=null}u=u||{start:0,end:0}}else u=null;for(qg={focusedElem:r,selectionRange:u},Qf=!1,Pn=o;Pn!==null;)if(o=Pn,r=o.child,(o.subtreeFlags&1028)!==0&&r!==null)r.return=o,Pn=r;else for(;Pn!==null;){switch(o=Pn,S=o.alternate,r=o.flags,o.tag){case 0:if((r&4)!==0&&(r=o.updateQueue,r=r!==null?r.events:null,r!==null))for(u=0;u<r.length;u++)x=r[u],x.ref.impl=x.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&S!==null){r=void 0,u=o,x=S.memoizedProps,S=S.memoizedState,m=u.stateNode;try{var Pt=go(u.type,x);r=m.getSnapshotBeforeUpdate(Pt,S),m.__reactInternalSnapshotBeforeUpdate=r}catch(Zt){Le(u,u.return,Zt)}}break;case 3:if((r&1024)!==0){if(r=o.stateNode.containerInfo,u=r.nodeType,u===9)Kg(r);else if(u===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":Kg(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(i(163))}if(r=o.sibling,r!==null){r.return=o.return,Pn=r;break}Pn=o.return}}function R0(r,o,u){var m=u.flags;switch(u.tag){case 0:case 11:case 15:mr(r,u),m&4&&Xc(5,u);break;case 1:if(mr(r,u),m&4)if(r=u.stateNode,o===null)try{r.componentDidMount()}catch(M){Le(u,u.return,M)}else{var x=go(u.type,o.memoizedProps);o=o.memoizedState;try{r.componentDidUpdate(x,o,r.__reactInternalSnapshotBeforeUpdate)}catch(M){Le(u,u.return,M)}}m&64&&D0(u),m&512&&Kc(u,u.return);break;case 3:if(mr(r,u),m&64&&(r=u.updateQueue,r!==null)){if(o=null,u.child!==null)switch(u.child.tag){case 27:case 5:o=u.child.stateNode;break;case 1:o=u.child.stateNode}try{bx(r,o)}catch(M){Le(u,u.return,M)}}break;case 27:o===null&&m&4&&L0(u);case 26:case 5:mr(r,u),o===null&&m&4&&O0(u),m&512&&Kc(u,u.return);break;case 12:mr(r,u);break;case 31:mr(r,u),m&4&&j0(r,u);break;case 13:mr(r,u),m&4&&B0(r,u),m&64&&(r=u.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(u=pD.bind(null,u),RD(r,u))));break;case 22:if(m=u.memoizedState!==null||hr,!m){o=o!==null&&o.memoizedState!==null||Sn,x=hr;var S=Sn;hr=m,(Sn=o)&&!S?gr(r,u,(u.subtreeFlags&8772)!==0):mr(r,u),hr=x,Sn=S}break;case 30:break;default:mr(r,u)}}function P0(r){var o=r.alternate;o!==null&&(r.alternate=null,P0(o)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(o=r.stateNode,o!==null&&pc(o)),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}var Xe=null,pi=!1;function pr(r,o,u){for(u=u.child;u!==null;)N0(r,o,u),u=u.sibling}function N0(r,o,u){if(Gt&&typeof Gt.onCommitFiberUnmount=="function")try{Gt.onCommitFiberUnmount(jt,u)}catch{}switch(u.tag){case 26:Sn||Pa(u,o),pr(r,o,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:Sn||Pa(u,o);var m=Xe,x=pi;us(u.type)&&(Xe=u.stateNode,pi=!1),pr(r,o,u),su(u.stateNode),Xe=m,pi=x;break;case 5:Sn||Pa(u,o);case 6:if(m=Xe,x=pi,Xe=null,pr(r,o,u),Xe=m,pi=x,Xe!==null)if(pi)try{(Xe.nodeType===9?Xe.body:Xe.nodeName==="HTML"?Xe.ownerDocument.body:Xe).removeChild(u.stateNode)}catch(S){Le(u,o,S)}else try{Xe.removeChild(u.stateNode)}catch(S){Le(u,o,S)}break;case 18:Xe!==null&&(pi?(r=Xe,D_(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,u.stateNode),Ml(r)):D_(Xe,u.stateNode));break;case 4:m=Xe,x=pi,Xe=u.stateNode.containerInfo,pi=!0,pr(r,o,u),Xe=m,pi=x;break;case 0:case 11:case 14:case 15:is(2,u,o),Sn||is(4,u,o),pr(r,o,u);break;case 1:Sn||(Pa(u,o),m=u.stateNode,typeof m.componentWillUnmount=="function"&&M0(u,o,m)),pr(r,o,u);break;case 21:pr(r,o,u);break;case 22:Sn=(m=Sn)||u.memoizedState!==null,pr(r,o,u),Sn=m;break;default:pr(r,o,u)}}function j0(r,o){if(o.memoizedState===null&&(r=o.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{Ml(r)}catch(u){Le(o,o.return,u)}}}function B0(r,o){if(o.memoizedState===null&&(r=o.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{Ml(r)}catch(u){Le(o,o.return,u)}}function sD(r){switch(r.tag){case 31:case 13:case 19:var o=r.stateNode;return o===null&&(o=r.stateNode=new z0),o;case 22:return r=r.stateNode,o=r._retryCache,o===null&&(o=r._retryCache=new z0),o;default:throw Error(i(435,r.tag))}}function Lf(r,o){var u=sD(r);o.forEach(function(m){if(!u.has(m)){u.add(m);var x=mD.bind(null,r,m);m.then(x,x)}})}function mi(r,o){var u=o.deletions;if(u!==null)for(var m=0;m<u.length;m++){var x=u[m],S=r,M=o,B=M;t:for(;B!==null;){switch(B.tag){case 27:if(us(B.type)){Xe=B.stateNode,pi=!1;break t}break;case 5:Xe=B.stateNode,pi=!1;break t;case 3:case 4:Xe=B.stateNode.containerInfo,pi=!0;break t}B=B.return}if(Xe===null)throw Error(i(160));N0(S,M,x),Xe=null,pi=!1,S=x.alternate,S!==null&&(S.return=null),x.return=null}if(o.subtreeFlags&13886)for(o=o.child;o!==null;)I0(o,r),o=o.sibling}var pa=null;function I0(r,o){var u=r.alternate,m=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:mi(o,r),gi(r),m&4&&(is(3,r,r.return),Xc(3,r),is(5,r,r.return));break;case 1:mi(o,r),gi(r),m&512&&(Sn||u===null||Pa(u,u.return)),m&64&&hr&&(r=r.updateQueue,r!==null&&(m=r.callbacks,m!==null&&(u=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=u===null?m:u.concat(m))));break;case 26:var x=pa;if(mi(o,r),gi(r),m&512&&(Sn||u===null||Pa(u,u.return)),m&4){var S=u!==null?u.memoizedState:null;if(m=r.memoizedState,u===null)if(m===null)if(r.stateNode===null){t:{m=r.type,u=r.memoizedProps,x=x.ownerDocument||x;e:switch(m){case"title":S=x.getElementsByTagName("title")[0],(!S||S[js]||S[vn]||S.namespaceURI==="http://www.w3.org/2000/svg"||S.hasAttribute("itemprop"))&&(S=x.createElement(m),x.head.insertBefore(S,x.querySelector("head > title"))),Un(S,m,u),S[vn]=r,bn(S),m=S;break t;case"link":var M=I_("link","href",x).get(m+(u.href||""));if(M){for(var B=0;B<M.length;B++)if(S=M[B],S.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&S.getAttribute("rel")===(u.rel==null?null:u.rel)&&S.getAttribute("title")===(u.title==null?null:u.title)&&S.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){M.splice(B,1);break e}}S=x.createElement(m),Un(S,m,u),x.head.appendChild(S);break;case"meta":if(M=I_("meta","content",x).get(m+(u.content||""))){for(B=0;B<M.length;B++)if(S=M[B],S.getAttribute("content")===(u.content==null?null:""+u.content)&&S.getAttribute("name")===(u.name==null?null:u.name)&&S.getAttribute("property")===(u.property==null?null:u.property)&&S.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&S.getAttribute("charset")===(u.charSet==null?null:u.charSet)){M.splice(B,1);break e}}S=x.createElement(m),Un(S,m,u),x.head.appendChild(S);break;default:throw Error(i(468,m))}S[vn]=r,bn(S),m=S}r.stateNode=m}else F_(x,r.type,r.stateNode);else r.stateNode=B_(x,m,r.memoizedProps);else S!==m?(S===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):S.count--,m===null?F_(x,r.type,r.stateNode):B_(x,m,r.memoizedProps)):m===null&&r.stateNode!==null&&wg(r,r.memoizedProps,u.memoizedProps)}break;case 27:mi(o,r),gi(r),m&512&&(Sn||u===null||Pa(u,u.return)),u!==null&&m&4&&wg(r,r.memoizedProps,u.memoizedProps);break;case 5:if(mi(o,r),gi(r),m&512&&(Sn||u===null||Pa(u,u.return)),r.flags&32){x=r.stateNode;try{Fi(x,"")}catch(Pt){Le(r,r.return,Pt)}}m&4&&r.stateNode!=null&&(x=r.memoizedProps,wg(r,x,u!==null?u.memoizedProps:x)),m&1024&&(Ag=!0);break;case 6:if(mi(o,r),gi(r),m&4){if(r.stateNode===null)throw Error(i(162));m=r.memoizedProps,u=r.stateNode;try{u.nodeValue=m}catch(Pt){Le(r,r.return,Pt)}}break;case 3:if(qf=null,x=pa,pa=Wf(o.containerInfo),mi(o,r),pa=x,gi(r),m&4&&u!==null&&u.memoizedState.isDehydrated)try{Ml(o.containerInfo)}catch(Pt){Le(r,r.return,Pt)}Ag&&(Ag=!1,F0(r));break;case 4:m=pa,pa=Wf(r.stateNode.containerInfo),mi(o,r),gi(r),pa=m;break;case 12:mi(o,r),gi(r);break;case 31:mi(o,r),gi(r),m&4&&(m=r.updateQueue,m!==null&&(r.updateQueue=null,Lf(r,m)));break;case 13:mi(o,r),gi(r),r.child.flags&8192&&r.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(Rf=At()),m&4&&(m=r.updateQueue,m!==null&&(r.updateQueue=null,Lf(r,m)));break;case 22:x=r.memoizedState!==null;var W=u!==null&&u.memoizedState!==null,st=hr,vt=Sn;if(hr=st||x,Sn=vt||W,mi(o,r),Sn=vt,hr=st,gi(r),m&8192)t:for(o=r.stateNode,o._visibility=x?o._visibility&-2:o._visibility|1,x&&(u===null||W||hr||Sn||vo(r)),u=null,o=r;;){if(o.tag===5||o.tag===26){if(u===null){W=u=o;try{if(S=W.stateNode,x)M=S.style,typeof M.setProperty=="function"?M.setProperty("display","none","important"):M.display="none";else{B=W.stateNode;var St=W.memoizedProps.style,ct=St!=null&&St.hasOwnProperty("display")?St.display:null;B.style.display=ct==null||typeof ct=="boolean"?"":(""+ct).trim()}}catch(Pt){Le(W,W.return,Pt)}}}else if(o.tag===6){if(u===null){W=o;try{W.stateNode.nodeValue=x?"":W.memoizedProps}catch(Pt){Le(W,W.return,Pt)}}}else if(o.tag===18){if(u===null){W=o;try{var ht=W.stateNode;x?M_(ht,!0):M_(W.stateNode,!1)}catch(Pt){Le(W,W.return,Pt)}}}else if((o.tag!==22&&o.tag!==23||o.memoizedState===null||o===r)&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===r)break t;for(;o.sibling===null;){if(o.return===null||o.return===r)break t;u===o&&(u=null),o=o.return}u===o&&(u=null),o.sibling.return=o.return,o=o.sibling}m&4&&(m=r.updateQueue,m!==null&&(u=m.retryQueue,u!==null&&(m.retryQueue=null,Lf(r,u))));break;case 19:mi(o,r),gi(r),m&4&&(m=r.updateQueue,m!==null&&(r.updateQueue=null,Lf(r,m)));break;case 30:break;case 21:break;default:mi(o,r),gi(r)}}function gi(r){var o=r.flags;if(o&2){try{for(var u,m=r.return;m!==null;){if(k0(m)){u=m;break}m=m.return}if(u==null)throw Error(i(160));switch(u.tag){case 27:var x=u.stateNode,S=Cg(r);kf(r,S,x);break;case 5:var M=u.stateNode;u.flags&32&&(Fi(M,""),u.flags&=-33);var B=Cg(r);kf(r,B,M);break;case 3:case 4:var W=u.stateNode.containerInfo,st=Cg(r);Eg(r,st,W);break;default:throw Error(i(161))}}catch(vt){Le(r,r.return,vt)}r.flags&=-3}o&4096&&(r.flags&=-4097)}function F0(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var o=r;F0(o),o.tag===5&&o.flags&1024&&o.stateNode.reset(),r=r.sibling}}function mr(r,o){if(o.subtreeFlags&8772)for(o=o.child;o!==null;)R0(r,o.alternate,o),o=o.sibling}function vo(r){for(r=r.child;r!==null;){var o=r;switch(o.tag){case 0:case 11:case 14:case 15:is(4,o,o.return),vo(o);break;case 1:Pa(o,o.return);var u=o.stateNode;typeof u.componentWillUnmount=="function"&&M0(o,o.return,u),vo(o);break;case 27:su(o.stateNode);case 26:case 5:Pa(o,o.return),vo(o);break;case 22:o.memoizedState===null&&vo(o);break;case 30:vo(o);break;default:vo(o)}r=r.sibling}}function gr(r,o,u){for(u=u&&(o.subtreeFlags&8772)!==0,o=o.child;o!==null;){var m=o.alternate,x=r,S=o,M=S.flags;switch(S.tag){case 0:case 11:case 15:gr(x,S,u),Xc(4,S);break;case 1:if(gr(x,S,u),m=S,x=m.stateNode,typeof x.componentDidMount=="function")try{x.componentDidMount()}catch(st){Le(m,m.return,st)}if(m=S,x=m.updateQueue,x!==null){var B=m.stateNode;try{var W=x.shared.hiddenCallbacks;if(W!==null)for(x.shared.hiddenCallbacks=null,x=0;x<W.length;x++)vx(W[x],B)}catch(st){Le(m,m.return,st)}}u&&M&64&&D0(S),Kc(S,S.return);break;case 27:L0(S);case 26:case 5:gr(x,S,u),u&&m===null&&M&4&&O0(S),Kc(S,S.return);break;case 12:gr(x,S,u);break;case 31:gr(x,S,u),u&&M&4&&j0(x,S);break;case 13:gr(x,S,u),u&&M&4&&B0(x,S);break;case 22:S.memoizedState===null&&gr(x,S,u),Kc(S,S.return);break;case 30:break;default:gr(x,S,u)}o=o.sibling}}function Tg(r,o){var u=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(u=r.memoizedState.cachePool.pool),r=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(r=o.memoizedState.cachePool.pool),r!==u&&(r!=null&&r.refCount++,u!=null&&jc(u))}function Dg(r,o){r=null,o.alternate!==null&&(r=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==r&&(o.refCount++,r!=null&&jc(r))}function ma(r,o,u,m){if(o.subtreeFlags&10256)for(o=o.child;o!==null;)H0(r,o,u,m),o=o.sibling}function H0(r,o,u,m){var x=o.flags;switch(o.tag){case 0:case 11:case 15:ma(r,o,u,m),x&2048&&Xc(9,o);break;case 1:ma(r,o,u,m);break;case 3:ma(r,o,u,m),x&2048&&(r=null,o.alternate!==null&&(r=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==r&&(o.refCount++,r!=null&&jc(r)));break;case 12:if(x&2048){ma(r,o,u,m),r=o.stateNode;try{var S=o.memoizedProps,M=S.id,B=S.onPostCommit;typeof B=="function"&&B(M,o.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(W){Le(o,o.return,W)}}else ma(r,o,u,m);break;case 31:ma(r,o,u,m);break;case 13:ma(r,o,u,m);break;case 23:break;case 22:S=o.stateNode,M=o.alternate,o.memoizedState!==null?S._visibility&2?ma(r,o,u,m):Qc(r,o):S._visibility&2?ma(r,o,u,m):(S._visibility|=2,bl(r,o,u,m,(o.subtreeFlags&10256)!==0||!1)),x&2048&&Tg(M,o);break;case 24:ma(r,o,u,m),x&2048&&Dg(o.alternate,o);break;default:ma(r,o,u,m)}}function bl(r,o,u,m,x){for(x=x&&((o.subtreeFlags&10256)!==0||!1),o=o.child;o!==null;){var S=r,M=o,B=u,W=m,st=M.flags;switch(M.tag){case 0:case 11:case 15:bl(S,M,B,W,x),Xc(8,M);break;case 23:break;case 22:var vt=M.stateNode;M.memoizedState!==null?vt._visibility&2?bl(S,M,B,W,x):Qc(S,M):(vt._visibility|=2,bl(S,M,B,W,x)),x&&st&2048&&Tg(M.alternate,M);break;case 24:bl(S,M,B,W,x),x&&st&2048&&Dg(M.alternate,M);break;default:bl(S,M,B,W,x)}o=o.sibling}}function Qc(r,o){if(o.subtreeFlags&10256)for(o=o.child;o!==null;){var u=r,m=o,x=m.flags;switch(m.tag){case 22:Qc(u,m),x&2048&&Tg(m.alternate,m);break;case 24:Qc(u,m),x&2048&&Dg(m.alternate,m);break;default:Qc(u,m)}o=o.sibling}}var Jc=8192;function yl(r,o,u){if(r.subtreeFlags&Jc)for(r=r.child;r!==null;)U0(r,o,u),r=r.sibling}function U0(r,o,u){switch(r.tag){case 26:yl(r,o,u),r.flags&Jc&&r.memoizedState!==null&&WD(u,pa,r.memoizedState,r.memoizedProps);break;case 5:yl(r,o,u);break;case 3:case 4:var m=pa;pa=Wf(r.stateNode.containerInfo),yl(r,o,u),pa=m;break;case 22:r.memoizedState===null&&(m=r.alternate,m!==null&&m.memoizedState!==null?(m=Jc,Jc=16777216,yl(r,o,u),Jc=m):yl(r,o,u));break;default:yl(r,o,u)}}function V0(r){var o=r.alternate;if(o!==null&&(r=o.child,r!==null)){o.child=null;do o=r.sibling,r.sibling=null,r=o;while(r!==null)}}function tu(r){var o=r.deletions;if((r.flags&16)!==0){if(o!==null)for(var u=0;u<o.length;u++){var m=o[u];Pn=m,G0(m,r)}V0(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)$0(r),r=r.sibling}function $0(r){switch(r.tag){case 0:case 11:case 15:tu(r),r.flags&2048&&is(9,r,r.return);break;case 3:tu(r);break;case 12:tu(r);break;case 22:var o=r.stateNode;r.memoizedState!==null&&o._visibility&2&&(r.return===null||r.return.tag!==13)?(o._visibility&=-3,zf(r)):tu(r);break;default:tu(r)}}function zf(r){var o=r.deletions;if((r.flags&16)!==0){if(o!==null)for(var u=0;u<o.length;u++){var m=o[u];Pn=m,G0(m,r)}V0(r)}for(r=r.child;r!==null;){switch(o=r,o.tag){case 0:case 11:case 15:is(8,o,o.return),zf(o);break;case 22:u=o.stateNode,u._visibility&2&&(u._visibility&=-3,zf(o));break;default:zf(o)}r=r.sibling}}function G0(r,o){for(;Pn!==null;){var u=Pn;switch(u.tag){case 0:case 11:case 15:is(8,u,o);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var m=u.memoizedState.cachePool.pool;m!=null&&m.refCount++}break;case 24:jc(u.memoizedState.cache)}if(m=u.child,m!==null)m.return=u,Pn=m;else t:for(u=r;Pn!==null;){m=Pn;var x=m.sibling,S=m.return;if(P0(m),m===u){Pn=null;break t}if(x!==null){x.return=S,Pn=x;break t}Pn=S}}}var oD={getCacheForType:function(r){var o=Fn(yn),u=o.data.get(r);return u===void 0&&(u=r(),o.data.set(r,u)),u},cacheSignal:function(){return Fn(yn).controller.signal}},lD=typeof WeakMap=="function"?WeakMap:Map,Ae=0,Ue=null,le=null,fe=0,ke=0,Oi=null,as=!1,xl=!1,Mg=!1,vr=0,on=0,rs=0,bo=0,Og=0,ki=0,_l=0,eu=null,vi=null,kg=!1,Rf=0,W0=0,Pf=1/0,Nf=null,ss=null,Mn=0,os=null,Sl=null,br=0,Lg=0,zg=null,Z0=null,nu=0,Rg=null;function Li(){return(Ae&2)!==0&&fe!==0?fe&-fe:I.T!==null?Fg():fc()}function q0(){if(ki===0)if((fe&536870912)===0||oe){var r=Rs;Rs<<=1,(Rs&3932160)===0&&(Rs=262144),ki=r}else ki=536870912;return r=Di.current,r!==null&&(r.flags|=32),ki}function bi(r,o,u){(r===Ue&&(ke===2||ke===9)||r.cancelPendingCommit!==null)&&(wl(r,0),ls(r,fe,ki,!1)),Ka(r,u),((Ae&2)===0||r!==Ue)&&(r===Ue&&((Ae&2)===0&&(bo|=u),on===4&&ls(r,fe,ki,!1)),Na(r))}function Y0(r,o,u){if((Ae&6)!==0)throw Error(i(327));var m=!u&&(o&127)===0&&(o&r.expiredLanes)===0||Ns(r,o),x=m?dD(r,o):Ng(r,o,!0),S=m;do{if(x===0){xl&&!m&&ls(r,o,0,!1);break}else{if(u=r.current.alternate,S&&!cD(u)){x=Ng(r,o,!1),S=!1;continue}if(x===2){if(S=o,r.errorRecoveryDisabledLanes&S)var M=0;else M=r.pendingLanes&-536870913,M=M!==0?M:M&536870912?536870912:0;if(M!==0){o=M;t:{var B=r;x=eu;var W=B.current.memoizedState.isDehydrated;if(W&&(wl(B,M).flags|=256),M=Ng(B,M,!1),M!==2){if(Mg&&!W){B.errorRecoveryDisabledLanes|=S,bo|=S,x=4;break t}S=vi,vi=x,S!==null&&(vi===null?vi=S:vi.push.apply(vi,S))}x=M}if(S=!1,x!==2)continue}}if(x===1){wl(r,0),ls(r,o,0,!0);break}t:{switch(m=r,S=x,S){case 0:case 1:throw Error(i(345));case 4:if((o&4194048)!==o)break;case 6:ls(m,o,ki,!as);break t;case 2:vi=null;break;case 3:case 5:break;default:throw Error(i(329))}if((o&62914560)===o&&(x=Rf+300-At(),10<x)){if(ls(m,o,ki,!as),Vo(m,0,!0)!==0)break t;br=o,m.timeoutHandle=A_(X0.bind(null,m,u,vi,Nf,kg,o,ki,bo,_l,as,S,"Throttled",-0,0),x);break t}X0(m,u,vi,Nf,kg,o,ki,bo,_l,as,S,null,-0,0)}}break}while(!0);Na(r)}function X0(r,o,u,m,x,S,M,B,W,st,vt,St,ct,ht){if(r.timeoutHandle=-1,St=o.subtreeFlags,St&8192||(St&16785408)===16785408){St={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ci},U0(o,S,St);var Pt=(S&62914560)===S?Rf-At():(S&4194048)===S?W0-At():0;if(Pt=ZD(St,Pt),Pt!==null){br=S,r.cancelPendingCommit=Pt(a_.bind(null,r,o,S,u,m,x,M,B,W,vt,St,null,ct,ht)),ls(r,S,M,!st);return}}a_(r,o,S,u,m,x,M,B,W)}function cD(r){for(var o=r;;){var u=o.tag;if((u===0||u===11||u===15)&&o.flags&16384&&(u=o.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var m=0;m<u.length;m++){var x=u[m],S=x.getSnapshot;x=x.value;try{if(!zn(S(),x))return!1}catch{return!1}}if(u=o.child,o.subtreeFlags&16384&&u!==null)u.return=o,o=u;else{if(o===r)break;for(;o.sibling===null;){if(o.return===null||o.return===r)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function ls(r,o,u,m){o&=~Og,o&=~bo,r.suspendedLanes|=o,r.pingedLanes&=~o,m&&(r.warmLanes|=o),m=r.expirationTimes;for(var x=o;0<x;){var S=31-Vt(x),M=1<<S;m[S]=-1,x&=~M}u!==0&&Rd(r,u,o)}function jf(){return(Ae&6)===0?(iu(0),!1):!0}function Pg(){if(le!==null){if(ke===0)var r=le.return;else r=le,ha=Ra=null,Km(r),hl=null,Ic=0,r=le;for(;r!==null;)T0(r.alternate,r),r=r.return;le=null}}function wl(r,o){var u=r.timeoutHandle;u!==-1&&(r.timeoutHandle=-1,MD(u)),u=r.cancelPendingCommit,u!==null&&(r.cancelPendingCommit=null,u()),br=0,Pg(),Ue=r,le=u=Zi(r.current,null),fe=o,ke=0,Oi=null,as=!1,xl=Ns(r,o),Mg=!1,_l=ki=Og=bo=rs=on=0,vi=eu=null,kg=!1,(o&8)!==0&&(o|=o&32);var m=r.entangledLanes;if(m!==0)for(r=r.entanglements,m&=o;0<m;){var x=31-Vt(m),S=1<<x;o|=r[x],m&=~S}return vr=o,ao(),u}function K0(r,o){te=null,I.H=Zc,o===fl||o===ff?(o=hx(),ke=3):o===Im?(o=hx(),ke=4):ke=o===hg?8:o!==null&&typeof o=="object"&&typeof o.then=="function"?6:1,Oi=o,le===null&&(on=1,Af(r,h(o,r.current)))}function Q0(){var r=Di.current;return r===null?!0:(fe&4194048)===fe?qi===null:(fe&62914560)===fe||(fe&536870912)!==0?r===qi:!1}function J0(){var r=I.H;return I.H=Zc,r===null?Zc:r}function t_(){var r=I.A;return I.A=oD,r}function Bf(){on=4,as||(fe&4194048)!==fe&&Di.current!==null||(xl=!0),(rs&134217727)===0&&(bo&134217727)===0||Ue===null||ls(Ue,fe,ki,!1)}function Ng(r,o,u){var m=Ae;Ae|=2;var x=J0(),S=t_();(Ue!==r||fe!==o)&&(Nf=null,wl(r,o)),o=!1;var M=on;t:do try{if(ke!==0&&le!==null){var B=le,W=Oi;switch(ke){case 8:Pg(),M=6;break t;case 3:case 2:case 9:case 6:Di.current===null&&(o=!0);var st=ke;if(ke=0,Oi=null,Cl(r,B,W,st),u&&xl){M=0;break t}break;default:st=ke,ke=0,Oi=null,Cl(r,B,W,st)}}uD(),M=on;break}catch(vt){K0(r,vt)}while(!0);return o&&r.shellSuspendCounter++,ha=Ra=null,Ae=m,I.H=x,I.A=S,le===null&&(Ue=null,fe=0,ao()),M}function uD(){for(;le!==null;)e_(le)}function dD(r,o){var u=Ae;Ae|=2;var m=J0(),x=t_();Ue!==r||fe!==o?(Nf=null,Pf=At()+500,wl(r,o)):xl=Ns(r,o);t:do try{if(ke!==0&&le!==null){o=le;var S=Oi;e:switch(ke){case 1:ke=0,Oi=null,Cl(r,o,S,1);break;case 2:case 9:if(dx(S)){ke=0,Oi=null,n_(o);break}o=function(){ke!==2&&ke!==9||Ue!==r||(ke=7),Na(r)},S.then(o,o);break t;case 3:ke=7;break t;case 4:ke=5;break t;case 7:dx(S)?(ke=0,Oi=null,n_(o)):(ke=0,Oi=null,Cl(r,o,S,7));break;case 5:var M=null;switch(le.tag){case 26:M=le.memoizedState;case 5:case 27:var B=le;if(M?H_(M):B.stateNode.complete){ke=0,Oi=null;var W=B.sibling;if(W!==null)le=W;else{var st=B.return;st!==null?(le=st,If(st)):le=null}break e}}ke=0,Oi=null,Cl(r,o,S,5);break;case 6:ke=0,Oi=null,Cl(r,o,S,6);break;case 8:Pg(),on=6;break t;default:throw Error(i(462))}}fD();break}catch(vt){K0(r,vt)}while(!0);return ha=Ra=null,I.H=m,I.A=x,Ae=u,le!==null?0:(Ue=null,fe=0,ao(),on)}function fD(){for(;le!==null&&!wi();)e_(le)}function e_(r){var o=E0(r.alternate,r,vr);r.memoizedProps=r.pendingProps,o===null?If(r):le=o}function n_(r){var o=r,u=o.alternate;switch(o.tag){case 15:case 0:o=y0(u,o,o.pendingProps,o.type,void 0,fe);break;case 11:o=y0(u,o,o.pendingProps,o.type.render,o.ref,fe);break;case 5:Km(o);default:T0(u,o),o=le=Lc(o,vr),o=E0(u,o,vr)}r.memoizedProps=r.pendingProps,o===null?If(r):le=o}function Cl(r,o,u,m){ha=Ra=null,Km(o),hl=null,Ic=0;var x=o.return;try{if(tD(r,x,o,u,fe)){on=1,Af(r,h(u,r.current)),le=null;return}}catch(S){if(x!==null)throw le=x,S;on=1,Af(r,h(u,r.current)),le=null;return}o.flags&32768?(oe||m===1?r=!0:xl||(fe&536870912)!==0?r=!1:(as=r=!0,(m===2||m===9||m===3||m===6)&&(m=Di.current,m!==null&&m.tag===13&&(m.flags|=16384))),i_(o,r)):If(o)}function If(r){var o=r;do{if((o.flags&32768)!==0){i_(o,as);return}r=o.return;var u=iD(o.alternate,o,vr);if(u!==null){le=u;return}if(o=o.sibling,o!==null){le=o;return}le=o=r}while(o!==null);on===0&&(on=5)}function i_(r,o){do{var u=aD(r.alternate,r);if(u!==null){u.flags&=32767,le=u;return}if(u=r.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!o&&(r=r.sibling,r!==null)){le=r;return}le=r=u}while(r!==null);on=6,le=null}function a_(r,o,u,m,x,S,M,B,W){r.cancelPendingCommit=null;do Ff();while(Mn!==0);if((Ae&6)!==0)throw Error(i(327));if(o!==null){if(o===r.current)throw Error(i(177));if(S=o.lanes|o.childLanes,S|=rl,bm(r,u,S,M,B,W),r===Ue&&(le=Ue=null,fe=0),Sl=o,os=r,br=u,Lg=S,zg=x,Z0=m,(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,gD(Yt,function(){return c_(),null})):(r.callbackNode=null,r.callbackPriority=0),m=(o.flags&13878)!==0,(o.subtreeFlags&13878)!==0||m){m=I.T,I.T=null,x=$.p,$.p=2,M=Ae,Ae|=4;try{rD(r,o,u)}finally{Ae=M,$.p=x,I.T=m}}Mn=1,r_(),s_(),o_()}}function r_(){if(Mn===1){Mn=0;var r=os,o=Sl,u=(o.flags&13878)!==0;if((o.subtreeFlags&13878)!==0||u){u=I.T,I.T=null;var m=$.p;$.p=2;var x=Ae;Ae|=4;try{I0(o,r);var S=qg,M=Js(r.containerInfo),B=S.focusedElem,W=S.selectionRange;if(M!==B&&B&&B.ownerDocument&&el(B.ownerDocument.documentElement,B)){if(W!==null&&Ta(B)){var st=W.start,vt=W.end;if(vt===void 0&&(vt=st),"selectionStart"in B)B.selectionStart=st,B.selectionEnd=Math.min(vt,B.value.length);else{var St=B.ownerDocument||document,ct=St&&St.defaultView||window;if(ct.getSelection){var ht=ct.getSelection(),Pt=B.textContent.length,Zt=Math.min(W.start,Pt),Ie=W.end===void 0?Zt:Math.min(W.end,Pt);!ht.extend&&Zt>Ie&&(M=Ie,Ie=Zt,Zt=M);var J=Qs(B,Zt),Y=Qs(B,Ie);if(J&&Y&&(ht.rangeCount!==1||ht.anchorNode!==J.node||ht.anchorOffset!==J.offset||ht.focusNode!==Y.node||ht.focusOffset!==Y.offset)){var rt=St.createRange();rt.setStart(J.node,J.offset),ht.removeAllRanges(),Zt>Ie?(ht.addRange(rt),ht.extend(Y.node,Y.offset)):(rt.setEnd(Y.node,Y.offset),ht.addRange(rt))}}}}for(St=[],ht=B;ht=ht.parentNode;)ht.nodeType===1&&St.push({element:ht,left:ht.scrollLeft,top:ht.scrollTop});for(typeof B.focus=="function"&&B.focus(),B=0;B<St.length;B++){var xt=St[B];xt.element.scrollLeft=xt.left,xt.element.scrollTop=xt.top}}Qf=!!Zg,qg=Zg=null}finally{Ae=x,$.p=m,I.T=u}}r.current=o,Mn=2}}function s_(){if(Mn===2){Mn=0;var r=os,o=Sl,u=(o.flags&8772)!==0;if((o.subtreeFlags&8772)!==0||u){u=I.T,I.T=null;var m=$.p;$.p=2;var x=Ae;Ae|=4;try{R0(r,o.alternate,o)}finally{Ae=x,$.p=m,I.T=u}}Mn=3}}function o_(){if(Mn===4||Mn===3){Mn=0,Rt();var r=os,o=Sl,u=br,m=Z0;(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?Mn=5:(Mn=0,Sl=os=null,l_(r,r.pendingLanes));var x=r.pendingLanes;if(x===0&&(ss=null),It(u),o=o.stateNode,Gt&&typeof Gt.onCommitFiberRoot=="function")try{Gt.onCommitFiberRoot(jt,o,void 0,(o.current.flags&128)===128)}catch{}if(m!==null){o=I.T,x=$.p,$.p=2,I.T=null;try{for(var S=r.onRecoverableError,M=0;M<m.length;M++){var B=m[M];S(B.value,{componentStack:B.stack})}}finally{I.T=o,$.p=x}}(br&3)!==0&&Ff(),Na(r),x=r.pendingLanes,(u&261930)!==0&&(x&42)!==0?r===Rg?nu++:(nu=0,Rg=r):nu=0,iu(0)}}function l_(r,o){(r.pooledCacheLanes&=o)===0&&(o=r.pooledCache,o!=null&&(r.pooledCache=null,jc(o)))}function Ff(){return r_(),s_(),o_(),c_()}function c_(){if(Mn!==5)return!1;var r=os,o=Lg;Lg=0;var u=It(br),m=I.T,x=$.p;try{$.p=32>u?32:u,I.T=null,u=zg,zg=null;var S=os,M=br;if(Mn=0,Sl=os=null,br=0,(Ae&6)!==0)throw Error(i(331));var B=Ae;if(Ae|=4,$0(S.current),H0(S,S.current,M,u),Ae=B,iu(0,!1),Gt&&typeof Gt.onPostCommitFiberRoot=="function")try{Gt.onPostCommitFiberRoot(jt,S)}catch{}return!0}finally{$.p=x,I.T=m,l_(r,o)}}function u_(r,o,u){o=h(u,o),o=fg(r.stateNode,o,2),r=ts(r,o,2),r!==null&&(Ka(r,2),Na(r))}function Le(r,o,u){if(r.tag===3)u_(r,r,u);else for(;o!==null;){if(o.tag===3){u_(o,r,u);break}else if(o.tag===1){var m=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(ss===null||!ss.has(m))){r=h(u,r),u=d0(2),m=ts(o,u,2),m!==null&&(f0(u,m,o,r),Ka(m,2),Na(m));break}}o=o.return}}function jg(r,o,u){var m=r.pingCache;if(m===null){m=r.pingCache=new lD;var x=new Set;m.set(o,x)}else x=m.get(o),x===void 0&&(x=new Set,m.set(o,x));x.has(u)||(Mg=!0,x.add(u),r=hD.bind(null,r,o,u),o.then(r,r))}function hD(r,o,u){var m=r.pingCache;m!==null&&m.delete(o),r.pingedLanes|=r.suspendedLanes&u,r.warmLanes&=~u,Ue===r&&(fe&u)===u&&(on===4||on===3&&(fe&62914560)===fe&&300>At()-Rf?(Ae&2)===0&&wl(r,0):Og|=u,_l===fe&&(_l=0)),Na(r)}function d_(r,o){o===0&&(o=zd()),r=Wi(r,o),r!==null&&(Ka(r,o),Na(r))}function pD(r){var o=r.memoizedState,u=0;o!==null&&(u=o.retryLane),d_(r,u)}function mD(r,o){var u=0;switch(r.tag){case 31:case 13:var m=r.stateNode,x=r.memoizedState;x!==null&&(u=x.retryLane);break;case 19:m=r.stateNode;break;case 22:m=r.stateNode._retryCache;break;default:throw Error(i(314))}m!==null&&m.delete(o),d_(r,u)}function gD(r,o){return kn(r,o)}var Hf=null,El=null,Bg=!1,Uf=!1,Ig=!1,cs=0;function Na(r){r!==El&&r.next===null&&(El===null?Hf=El=r:El=El.next=r),Uf=!0,Bg||(Bg=!0,bD())}function iu(r,o){if(!Ig&&Uf){Ig=!0;do for(var u=!1,m=Hf;m!==null;){if(r!==0){var x=m.pendingLanes;if(x===0)var S=0;else{var M=m.suspendedLanes,B=m.pingedLanes;S=(1<<31-Vt(42|r)+1)-1,S&=x&~(M&~B),S=S&201326741?S&201326741|1:S?S|2:0}S!==0&&(u=!0,m_(m,S))}else S=fe,S=Vo(m,m===Ue?S:0,m.cancelPendingCommit!==null||m.timeoutHandle!==-1),(S&3)===0||Ns(m,S)||(u=!0,m_(m,S));m=m.next}while(u);Ig=!1}}function vD(){f_()}function f_(){Uf=Bg=!1;var r=0;cs!==0&&DD()&&(r=cs);for(var o=At(),u=null,m=Hf;m!==null;){var x=m.next,S=h_(m,o);S===0?(m.next=null,u===null?Hf=x:u.next=x,x===null&&(El=u)):(u=m,(r!==0||(S&3)!==0)&&(Uf=!0)),m=x}Mn!==0&&Mn!==5||iu(r),cs!==0&&(cs=0)}function h_(r,o){for(var u=r.suspendedLanes,m=r.pingedLanes,x=r.expirationTimes,S=r.pendingLanes&-62914561;0<S;){var M=31-Vt(S),B=1<<M,W=x[M];W===-1?((B&u)===0||(B&m)!==0)&&(x[M]=vm(B,o)):W<=o&&(r.expiredLanes|=B),S&=~B}if(o=Ue,u=fe,u=Vo(r,r===o?u:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),m=r.callbackNode,u===0||r===o&&(ke===2||ke===9)||r.cancelPendingCommit!==null)return m!==null&&m!==null&&gn(m),r.callbackNode=null,r.callbackPriority=0;if((u&3)===0||Ns(r,u)){if(o=u&-u,o===r.callbackPriority)return o;switch(m!==null&&gn(m),It(u)){case 2:case 8:u=zt;break;case 32:u=Yt;break;case 268435456:u=gt;break;default:u=Yt}return m=p_.bind(null,r),u=kn(u,m),r.callbackPriority=o,r.callbackNode=u,o}return m!==null&&m!==null&&gn(m),r.callbackPriority=2,r.callbackNode=null,2}function p_(r,o){if(Mn!==0&&Mn!==5)return r.callbackNode=null,r.callbackPriority=0,null;var u=r.callbackNode;if(Ff()&&r.callbackNode!==u)return null;var m=fe;return m=Vo(r,r===Ue?m:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),m===0?null:(Y0(r,m,o),h_(r,At()),r.callbackNode!=null&&r.callbackNode===u?p_.bind(null,r):null)}function m_(r,o){if(Ff())return null;Y0(r,o,!0)}function bD(){OD(function(){(Ae&6)!==0?kn(Et,vD):f_()})}function Fg(){if(cs===0){var r=ul;r===0&&(r=ra,ra<<=1,(ra&261888)===0&&(ra=256)),cs=r}return cs}function g_(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:Br(""+r)}function v_(r,o){var u=o.ownerDocument.createElement("input");return u.name=o.name,u.value=o.value,r.id&&u.setAttribute("form",r.id),o.parentNode.insertBefore(u,o),r=new FormData(r),u.parentNode.removeChild(u),r}function yD(r,o,u,m,x){if(o==="submit"&&u&&u.stateNode===x){var S=g_((x[Ln]||null).action),M=m.submitter;M&&(o=(o=M[Ln]||null)?g_(o.formAction):M.getAttribute("formAction"),o!==null&&(S=o,M=null));var B=new qo("action","action",null,m,x);r.push({event:B,listeners:[{instance:null,listener:function(){if(m.defaultPrevented){if(cs!==0){var W=M?v_(x,M):new FormData(x);sg(u,{pending:!0,data:W,method:x.method,action:S},null,W)}}else typeof S=="function"&&(B.preventDefault(),W=M?v_(x,M):new FormData(x),sg(u,{pending:!0,data:W,method:x.method,action:S},S,W))},currentTarget:x}]})}}for(var Hg=0;Hg<Oa.length;Hg++){var Ug=Oa[Hg],xD=Ug.toLowerCase(),_D=Ug[0].toUpperCase()+Ug.slice(1);di(xD,"on"+_D)}di(eo,"onAnimationEnd"),di(sf,"onAnimationIteration"),di(no,"onAnimationStart"),di("dblclick","onDoubleClick"),di("focusin","onFocus"),di("focusout","onBlur"),di(km,"onTransitionRun"),di(of,"onTransitionStart"),di(Lm,"onTransitionCancel"),di(Yr,"onTransitionEnd"),wa("onMouseEnter",["mouseout","mouseover"]),wa("onMouseLeave",["mouseout","mouseover"]),wa("onPointerEnter",["pointerout","pointerover"]),wa("onPointerLeave",["pointerout","pointerover"]),tr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),tr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),tr("onBeforeInput",["compositionend","keypress","textInput","paste"]),tr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),tr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),tr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var au="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(" "),SD=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(au));function b_(r,o){o=(o&4)!==0;for(var u=0;u<r.length;u++){var m=r[u],x=m.event;m=m.listeners;t:{var S=void 0;if(o)for(var M=m.length-1;0<=M;M--){var B=m[M],W=B.instance,st=B.currentTarget;if(B=B.listener,W!==S&&x.isPropagationStopped())break t;S=B,x.currentTarget=st;try{S(x)}catch(vt){io(vt)}x.currentTarget=null,S=W}else for(M=0;M<m.length;M++){if(B=m[M],W=B.instance,st=B.currentTarget,B=B.listener,W!==S&&x.isPropagationStopped())break t;S=B,x.currentTarget=st;try{S(x)}catch(vt){io(vt)}x.currentTarget=null,S=W}}}}function ce(r,o){var u=o[_a];u===void 0&&(u=o[_a]=new Set);var m=r+"__bubble";u.has(m)||(y_(o,r,2,!1),u.add(m))}function Vg(r,o,u){var m=0;o&&(m|=4),y_(u,r,m,o)}var Vf="_reactListening"+Math.random().toString(36).slice(2);function $g(r){if(!r[Vf]){r[Vf]=!0,Id.forEach(function(u){u!=="selectionchange"&&(SD.has(u)||Vg(u,!1,r),Vg(u,!0,r))});var o=r.nodeType===9?r:r.ownerDocument;o===null||o[Vf]||(o[Vf]=!0,Vg("selectionchange",!1,o))}}function y_(r,o,u,m){switch(q_(o)){case 2:var x=XD;break;case 8:x=KD;break;default:x=rv}u=x.bind(null,o,u,r),x=void 0,!Vs||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(x=!0),m?x!==void 0?r.addEventListener(o,u,{capture:!0,passive:x}):r.addEventListener(o,u,!0):x!==void 0?r.addEventListener(o,u,{passive:x}):r.addEventListener(o,u,!1)}function Gg(r,o,u,m,x){var S=m;if((o&1)===0&&(o&2)===0&&m!==null)t:for(;;){if(m===null)return;var M=m.tag;if(M===3||M===4){var B=m.stateNode.containerInfo;if(B===x)break;if(M===4)for(M=m.return;M!==null;){var W=M.tag;if((W===3||W===4)&&M.stateNode.containerInfo===x)return;M=M.return}for(;B!==null;){if(M=Ja(B),M===null)return;if(W=M.tag,W===5||W===6||W===26||W===27){m=S=M;continue t}B=B.parentNode}}m=m.return}_c(function(){var st=S,vt=Us(u),St=[];t:{var ct=lf.get(r);if(ct!==void 0){var ht=qo,Pt=r;switch(r){case"keypress":if($s(u)===0)break t;case"keydown":case"keyup":ht=Zd;break;case"focusin":Pt="focus",ht=Cc;break;case"focusout":Pt="blur",ht=Cc;break;case"beforeblur":case"afterblur":ht=Cc;break;case"click":if(u.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ht=Ud;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ht=xm;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ht=Em;break;case eo:case sf:case no:ht=Ec;break;case Yr:ht=Xd;break;case"scroll":case"scrollend":ht=de;break;case"wheel":ht=ar;break;case"copy":case"cut":case"paste":ht=Ui;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ht=qd;break;case"toggle":case"beforetoggle":ht=Zs}var Zt=(o&4)!==0,Ie=!Zt&&(r==="scroll"||r==="scrollend"),J=Zt?ct!==null?ct+"Capture":null:ct;Zt=[];for(var Y=st,rt;Y!==null;){var xt=Y;if(rt=xt.stateNode,xt=xt.tag,xt!==5&&xt!==26&&xt!==27||rt===null||J===null||(xt=nr(Y,J),xt!=null&&Zt.push(ru(Y,xt,rt))),Ie)break;Y=Y.return}0<Zt.length&&(ct=new ht(ct,Pt,null,u,vt),St.push({event:ct,listeners:Zt}))}}if((o&7)===0){t:{if(ct=r==="mouseover"||r==="pointerover",ht=r==="mouseout"||r==="pointerout",ct&&u!==Zo&&(Pt=u.relatedTarget||u.fromElement)&&(Ja(Pt)||Pt[Qa]))break t;if((ht||ct)&&(ct=vt.window===vt?vt:(ct=vt.ownerDocument)?ct.defaultView||ct.parentWindow:window,ht?(Pt=u.relatedTarget||u.toElement,ht=st,Pt=Pt?Ja(Pt):null,Pt!==null&&(Ie=s(Pt),Zt=Pt.tag,Pt!==Ie||Zt!==5&&Zt!==27&&Zt!==6)&&(Pt=null)):(ht=null,Pt=st),ht!==Pt)){if(Zt=Ud,xt="onMouseLeave",J="onMouseEnter",Y="mouse",(r==="pointerout"||r==="pointerover")&&(Zt=qd,xt="onPointerLeave",J="onPointerEnter",Y="pointer"),Ie=ht==null?ct:Sa(ht),rt=Pt==null?ct:Sa(Pt),ct=new Zt(xt,Y+"leave",ht,u,vt),ct.target=Ie,ct.relatedTarget=rt,xt=null,Ja(vt)===st&&(Zt=new Zt(J,Y+"enter",Pt,u,vt),Zt.target=rt,Zt.relatedTarget=Ie,xt=Zt),Ie=xt,ht&&Pt)e:{for(Zt=wD,J=ht,Y=Pt,rt=0,xt=J;xt;xt=Zt(xt))rt++;xt=0;for(var Wt=Y;Wt;Wt=Zt(Wt))xt++;for(;0<rt-xt;)J=Zt(J),rt--;for(;0<xt-rt;)Y=Zt(Y),xt--;for(;rt--;){if(J===Y||Y!==null&&J===Y.alternate){Zt=J;break e}J=Zt(J),Y=Zt(Y)}Zt=null}else Zt=null;ht!==null&&x_(St,ct,ht,Zt,!1),Pt!==null&&Ie!==null&&x_(St,Ie,Pt,Zt,!0)}}t:{if(ct=st?Sa(st):window,ht=ct.nodeName&&ct.nodeName.toLowerCase(),ht==="select"||ht==="input"&&ct.type==="file")var Se=Ks;else if(Vi(ct))if(tf)Se=Om;else{Se=Mm;var Nt=ua}else ht=ct.nodeName,!ht||ht.toLowerCase()!=="input"||ct.type!=="checkbox"&&ct.type!=="radio"?st&&Hs(st.elementType)&&(Se=Ks):Se=Gr;if(Se&&(Se=Se(r,st))){Jd(St,Se,u,vt);break t}Nt&&Nt(r,ct,st),r==="focusout"&&st&&ct.type==="number"&&st.memoizedProps.value!=null&&oa(ct,"number",ct.value)}switch(Nt=st?Sa(st):window,r){case"focusin":(Vi(Nt)||Nt.contentEditable==="true")&&(Da=Nt,il=st,to=null);break;case"focusout":to=il=Da=null;break;case"mousedown":Zr=!0;break;case"contextmenu":case"mouseup":case"dragend":Zr=!1,af(St,u,vt);break;case"selectionchange":if(nl)break;case"keydown":case"keyup":af(St,u,vt)}var ne;if(Xo)t:{switch(r){case"compositionstart":var he="onCompositionStart";break t;case"compositionend":he="onCompositionEnd";break t;case"compositionupdate":he="onCompositionUpdate";break t}he=void 0}else Ur?Qd(r,u)&&(he="onCompositionEnd"):r==="keydown"&&u.keyCode===229&&(he="onCompositionStart");he&&(Ko&&u.locale!=="ko"&&(Ur||he!=="onCompositionStart"?he==="onCompositionEnd"&&Ur&&(ne=Ea()):(Hi=vt,ir="value"in Hi?Hi.value:Hi.textContent,Ur=!0)),Nt=$f(st,he),0<Nt.length&&(he=new Ac(he,r,null,u,vt),St.push({event:he,listeners:Nt}),ne?he.data=ne:(ne=Oc(u),ne!==null&&(he.data=ne)))),(ne=Tm?Ti(r,u):Vr(r,u))&&(he=$f(st,"onBeforeInput"),0<he.length&&(Nt=new Ac("onBeforeInput","beforeinput",null,u,vt),St.push({event:Nt,listeners:he}),Nt.data=ne)),yD(St,r,st,u,vt)}b_(St,o)})}function ru(r,o,u){return{instance:r,listener:o,currentTarget:u}}function $f(r,o){for(var u=o+"Capture",m=[];r!==null;){var x=r,S=x.stateNode;if(x=x.tag,x!==5&&x!==26&&x!==27||S===null||(x=nr(r,u),x!=null&&m.unshift(ru(r,x,S)),x=nr(r,o),x!=null&&m.push(ru(r,x,S))),r.tag===3)return m;r=r.return}return[]}function wD(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function x_(r,o,u,m,x){for(var S=o._reactName,M=[];u!==null&&u!==m;){var B=u,W=B.alternate,st=B.stateNode;if(B=B.tag,W!==null&&W===m)break;B!==5&&B!==26&&B!==27||st===null||(W=st,x?(st=nr(u,S),st!=null&&M.unshift(ru(u,st,W))):x||(st=nr(u,S),st!=null&&M.push(ru(u,st,W)))),u=u.return}M.length!==0&&r.push({event:o,listeners:M})}var CD=/\r\n?/g,ED=/\u0000|\uFFFD/g;function __(r){return(typeof r=="string"?r:""+r).replace(CD,`
|
||
`).replace(ED,"")}function S_(r,o){return o=__(o),__(r)===o}function Be(r,o,u,m,x,S){switch(u){case"children":typeof m=="string"?o==="body"||o==="textarea"&&m===""||Fi(r,m):(typeof m=="number"||typeof m=="bigint")&&o!=="body"&&Fi(r,""+m);break;case"className":Ne(r,"class",m);break;case"tabIndex":Ne(r,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":Ne(r,u,m);break;case"style":Go(r,m,S);break;case"data":if(o!=="object"){Ne(r,"data",m);break}case"src":case"href":if(m===""&&(o!=="a"||u!=="href")){r.removeAttribute(u);break}if(m==null||typeof m=="function"||typeof m=="symbol"||typeof m=="boolean"){r.removeAttribute(u);break}m=Br(""+m),r.setAttribute(u,m);break;case"action":case"formAction":if(typeof m=="function"){r.setAttribute(u,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof S=="function"&&(u==="formAction"?(o!=="input"&&Be(r,o,"name",x.name,x,null),Be(r,o,"formEncType",x.formEncType,x,null),Be(r,o,"formMethod",x.formMethod,x,null),Be(r,o,"formTarget",x.formTarget,x,null)):(Be(r,o,"encType",x.encType,x,null),Be(r,o,"method",x.method,x,null),Be(r,o,"target",x.target,x,null)));if(m==null||typeof m=="symbol"||typeof m=="boolean"){r.removeAttribute(u);break}m=Br(""+m),r.setAttribute(u,m);break;case"onClick":m!=null&&(r.onclick=ci);break;case"onScroll":m!=null&&ce("scroll",r);break;case"onScrollEnd":m!=null&&ce("scrollend",r);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(i(61));if(u=m.__html,u!=null){if(x.children!=null)throw Error(i(60));r.innerHTML=u}}break;case"multiple":r.multiple=m&&typeof m!="function"&&typeof m!="symbol";break;case"muted":r.muted=m&&typeof m!="function"&&typeof m!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(m==null||typeof m=="function"||typeof m=="boolean"||typeof m=="symbol"){r.removeAttribute("xlink:href");break}u=Br(""+m),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":m!=null&&typeof m!="function"&&typeof m!="symbol"?r.setAttribute(u,""+m):r.removeAttribute(u);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":m&&typeof m!="function"&&typeof m!="symbol"?r.setAttribute(u,""):r.removeAttribute(u);break;case"capture":case"download":m===!0?r.setAttribute(u,""):m!==!1&&m!=null&&typeof m!="function"&&typeof m!="symbol"?r.setAttribute(u,m):r.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":m!=null&&typeof m!="function"&&typeof m!="symbol"&&!isNaN(m)&&1<=m?r.setAttribute(u,m):r.removeAttribute(u);break;case"rowSpan":case"start":m==null||typeof m=="function"||typeof m=="symbol"||isNaN(m)?r.removeAttribute(u):r.setAttribute(u,m);break;case"popover":ce("beforetoggle",r),ce("toggle",r),se(r,"popover",m);break;case"xlinkActuate":li(r,"http://www.w3.org/1999/xlink","xlink:actuate",m);break;case"xlinkArcrole":li(r,"http://www.w3.org/1999/xlink","xlink:arcrole",m);break;case"xlinkRole":li(r,"http://www.w3.org/1999/xlink","xlink:role",m);break;case"xlinkShow":li(r,"http://www.w3.org/1999/xlink","xlink:show",m);break;case"xlinkTitle":li(r,"http://www.w3.org/1999/xlink","xlink:title",m);break;case"xlinkType":li(r,"http://www.w3.org/1999/xlink","xlink:type",m);break;case"xmlBase":li(r,"http://www.w3.org/XML/1998/namespace","xml:base",m);break;case"xmlLang":li(r,"http://www.w3.org/XML/1998/namespace","xml:lang",m);break;case"xmlSpace":li(r,"http://www.w3.org/XML/1998/namespace","xml:space",m);break;case"is":se(r,"is",m);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=Wo.get(u)||u,se(r,u,m))}}function Wg(r,o,u,m,x,S){switch(u){case"style":Go(r,m,S);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(i(61));if(u=m.__html,u!=null){if(x.children!=null)throw Error(i(60));r.innerHTML=u}}break;case"children":typeof m=="string"?Fi(r,m):(typeof m=="number"||typeof m=="bigint")&&Fi(r,""+m);break;case"onScroll":m!=null&&ce("scroll",r);break;case"onScrollEnd":m!=null&&ce("scrollend",r);break;case"onClick":m!=null&&(r.onclick=ci);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Fd.hasOwnProperty(u))t:{if(u[0]==="o"&&u[1]==="n"&&(x=u.endsWith("Capture"),o=u.slice(2,x?u.length-7:void 0),S=r[Ln]||null,S=S!=null?S[u]:null,typeof S=="function"&&r.removeEventListener(o,S,x),typeof m=="function")){typeof S!="function"&&S!==null&&(u in r?r[u]=null:r.hasAttribute(u)&&r.removeAttribute(u)),r.addEventListener(o,m,x);break t}u in r?r[u]=m:m===!0?r.setAttribute(u,""):se(r,u,m)}}}function Un(r,o,u){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ce("error",r),ce("load",r);var m=!1,x=!1,S;for(S in u)if(u.hasOwnProperty(S)){var M=u[S];if(M!=null)switch(S){case"src":m=!0;break;case"srcSet":x=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,o));default:Be(r,o,S,M,u,null)}}x&&Be(r,o,"srcSet",u.srcSet,u,null),m&&Be(r,o,"src",u.src,u,null);return;case"input":ce("invalid",r);var B=S=M=x=null,W=null,st=null;for(m in u)if(u.hasOwnProperty(m)){var vt=u[m];if(vt!=null)switch(m){case"name":x=vt;break;case"type":M=vt;break;case"checked":W=vt;break;case"defaultChecked":st=vt;break;case"value":S=vt;break;case"defaultValue":B=vt;break;case"children":case"dangerouslySetInnerHTML":if(vt!=null)throw Error(i(137,o));break;default:Be(r,o,m,vt,u,null)}}Fs(r,S,B,W,st,M,x,!1);return;case"select":ce("invalid",r),m=M=S=null;for(x in u)if(u.hasOwnProperty(x)&&(B=u[x],B!=null))switch(x){case"value":S=B;break;case"defaultValue":M=B;break;case"multiple":m=B;default:Be(r,o,x,B,u,null)}o=S,u=M,r.multiple=!!m,o!=null?He(r,!!m,o,!1):u!=null&&He(r,!!m,u,!0);return;case"textarea":ce("invalid",r),S=x=m=null;for(M in u)if(u.hasOwnProperty(M)&&(B=u[M],B!=null))switch(M){case"value":m=B;break;case"defaultValue":x=B;break;case"children":S=B;break;case"dangerouslySetInnerHTML":if(B!=null)throw Error(i(91));break;default:Be(r,o,M,B,u,null)}Nr(r,m,x,S);return;case"option":for(W in u)if(u.hasOwnProperty(W)&&(m=u[W],m!=null))switch(W){case"selected":r.selected=m&&typeof m!="function"&&typeof m!="symbol";break;default:Be(r,o,W,m,u,null)}return;case"dialog":ce("beforetoggle",r),ce("toggle",r),ce("cancel",r),ce("close",r);break;case"iframe":case"object":ce("load",r);break;case"video":case"audio":for(m=0;m<au.length;m++)ce(au[m],r);break;case"image":ce("error",r),ce("load",r);break;case"details":ce("toggle",r);break;case"embed":case"source":case"link":ce("error",r),ce("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(st in u)if(u.hasOwnProperty(st)&&(m=u[st],m!=null))switch(st){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,o));default:Be(r,o,st,m,u,null)}return;default:if(Hs(o)){for(vt in u)u.hasOwnProperty(vt)&&(m=u[vt],m!==void 0&&Wg(r,o,vt,m,u,void 0));return}}for(B in u)u.hasOwnProperty(B)&&(m=u[B],m!=null&&Be(r,o,B,m,u,null))}function AD(r,o,u,m){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var x=null,S=null,M=null,B=null,W=null,st=null,vt=null;for(ht in u){var St=u[ht];if(u.hasOwnProperty(ht)&&St!=null)switch(ht){case"checked":break;case"value":break;case"defaultValue":W=St;default:m.hasOwnProperty(ht)||Be(r,o,ht,null,m,St)}}for(var ct in m){var ht=m[ct];if(St=u[ct],m.hasOwnProperty(ct)&&(ht!=null||St!=null))switch(ct){case"type":S=ht;break;case"name":x=ht;break;case"checked":st=ht;break;case"defaultChecked":vt=ht;break;case"value":M=ht;break;case"defaultValue":B=ht;break;case"children":case"dangerouslySetInnerHTML":if(ht!=null)throw Error(i(137,o));break;default:ht!==St&&Be(r,o,ct,ht,m,St)}}bc(r,M,B,W,st,vt,S,x);return;case"select":ht=M=B=ct=null;for(S in u)if(W=u[S],u.hasOwnProperty(S)&&W!=null)switch(S){case"value":break;case"multiple":ht=W;default:m.hasOwnProperty(S)||Be(r,o,S,null,m,W)}for(x in m)if(S=m[x],W=u[x],m.hasOwnProperty(x)&&(S!=null||W!=null))switch(x){case"value":ct=S;break;case"defaultValue":B=S;break;case"multiple":M=S;default:S!==W&&Be(r,o,x,S,m,W)}o=B,u=M,m=ht,ct!=null?He(r,!!u,ct,!1):!!m!=!!u&&(o!=null?He(r,!!u,o,!0):He(r,!!u,u?[]:"",!1));return;case"textarea":ht=ct=null;for(B in u)if(x=u[B],u.hasOwnProperty(B)&&x!=null&&!m.hasOwnProperty(B))switch(B){case"value":break;case"children":break;default:Be(r,o,B,null,m,x)}for(M in m)if(x=m[M],S=u[M],m.hasOwnProperty(M)&&(x!=null||S!=null))switch(M){case"value":ct=x;break;case"defaultValue":ht=x;break;case"children":break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(i(91));break;default:x!==S&&Be(r,o,M,x,m,S)}Ca(r,ct,ht);return;case"option":for(var Pt in u)if(ct=u[Pt],u.hasOwnProperty(Pt)&&ct!=null&&!m.hasOwnProperty(Pt))switch(Pt){case"selected":r.selected=!1;break;default:Be(r,o,Pt,null,m,ct)}for(W in m)if(ct=m[W],ht=u[W],m.hasOwnProperty(W)&&ct!==ht&&(ct!=null||ht!=null))switch(W){case"selected":r.selected=ct&&typeof ct!="function"&&typeof ct!="symbol";break;default:Be(r,o,W,ct,m,ht)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Zt in u)ct=u[Zt],u.hasOwnProperty(Zt)&&ct!=null&&!m.hasOwnProperty(Zt)&&Be(r,o,Zt,null,m,ct);for(st in m)if(ct=m[st],ht=u[st],m.hasOwnProperty(st)&&ct!==ht&&(ct!=null||ht!=null))switch(st){case"children":case"dangerouslySetInnerHTML":if(ct!=null)throw Error(i(137,o));break;default:Be(r,o,st,ct,m,ht)}return;default:if(Hs(o)){for(var Ie in u)ct=u[Ie],u.hasOwnProperty(Ie)&&ct!==void 0&&!m.hasOwnProperty(Ie)&&Wg(r,o,Ie,void 0,m,ct);for(vt in m)ct=m[vt],ht=u[vt],!m.hasOwnProperty(vt)||ct===ht||ct===void 0&&ht===void 0||Wg(r,o,vt,ct,m,ht);return}}for(var J in u)ct=u[J],u.hasOwnProperty(J)&&ct!=null&&!m.hasOwnProperty(J)&&Be(r,o,J,null,m,ct);for(St in m)ct=m[St],ht=u[St],!m.hasOwnProperty(St)||ct===ht||ct==null&&ht==null||Be(r,o,St,ct,m,ht)}function w_(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function TD(){if(typeof performance.getEntriesByType=="function"){for(var r=0,o=0,u=performance.getEntriesByType("resource"),m=0;m<u.length;m++){var x=u[m],S=x.transferSize,M=x.initiatorType,B=x.duration;if(S&&B&&w_(M)){for(M=0,B=x.responseEnd,m+=1;m<u.length;m++){var W=u[m],st=W.startTime;if(st>B)break;var vt=W.transferSize,St=W.initiatorType;vt&&w_(St)&&(W=W.responseEnd,M+=vt*(W<B?1:(B-st)/(W-st)))}if(--m,o+=8*(S+M)/(x.duration/1e3),r++,10<r)break}}if(0<r)return o/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var Zg=null,qg=null;function Gf(r){return r.nodeType===9?r:r.ownerDocument}function C_(r){switch(r){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function E_(r,o){if(r===0)switch(o){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&o==="foreignObject"?0:r}function Yg(r,o){return r==="textarea"||r==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.children=="bigint"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var Xg=null;function DD(){var r=window.event;return r&&r.type==="popstate"?r===Xg?!1:(Xg=r,!0):(Xg=null,!1)}var A_=typeof setTimeout=="function"?setTimeout:void 0,MD=typeof clearTimeout=="function"?clearTimeout:void 0,T_=typeof Promise=="function"?Promise:void 0,OD=typeof queueMicrotask=="function"?queueMicrotask:typeof T_<"u"?function(r){return T_.resolve(null).then(r).catch(kD)}:A_;function kD(r){setTimeout(function(){throw r})}function us(r){return r==="head"}function D_(r,o){var u=o,m=0;do{var x=u.nextSibling;if(r.removeChild(u),x&&x.nodeType===8)if(u=x.data,u==="/$"||u==="/&"){if(m===0){r.removeChild(x),Ml(o);return}m--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")m++;else if(u==="html")su(r.ownerDocument.documentElement);else if(u==="head"){u=r.ownerDocument.head,su(u);for(var S=u.firstChild;S;){var M=S.nextSibling,B=S.nodeName;S[js]||B==="SCRIPT"||B==="STYLE"||B==="LINK"&&S.rel.toLowerCase()==="stylesheet"||u.removeChild(S),S=M}}else u==="body"&&su(r.ownerDocument.body);u=x}while(u);Ml(o)}function M_(r,o){var u=r;r=0;do{var m=u.nextSibling;if(u.nodeType===1?o?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(o?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),m&&m.nodeType===8)if(u=m.data,u==="/$"){if(r===0)break;r--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||r++;u=m}while(u)}function Kg(r){var o=r.firstChild;for(o&&o.nodeType===10&&(o=o.nextSibling);o;){var u=o;switch(o=o.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":Kg(u),pc(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}r.removeChild(u)}}function LD(r,o,u,m){for(;r.nodeType===1;){var x=u;if(r.nodeName.toLowerCase()!==o.toLowerCase()){if(!m&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(m){if(!r[js])switch(o){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(S=r.getAttribute("rel"),S==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(S!==x.rel||r.getAttribute("href")!==(x.href==null||x.href===""?null:x.href)||r.getAttribute("crossorigin")!==(x.crossOrigin==null?null:x.crossOrigin)||r.getAttribute("title")!==(x.title==null?null:x.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(S=r.getAttribute("src"),(S!==(x.src==null?null:x.src)||r.getAttribute("type")!==(x.type==null?null:x.type)||r.getAttribute("crossorigin")!==(x.crossOrigin==null?null:x.crossOrigin))&&S&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(o==="input"&&r.type==="hidden"){var S=x.name==null?null:""+x.name;if(x.type==="hidden"&&r.getAttribute("name")===S)return r}else return r;if(r=Yi(r.nextSibling),r===null)break}return null}function zD(r,o,u){if(o==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!u||(r=Yi(r.nextSibling),r===null))return null;return r}function O_(r,o){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!o||(r=Yi(r.nextSibling),r===null))return null;return r}function Qg(r){return r.data==="$?"||r.data==="$~"}function Jg(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function RD(r,o){var u=r.ownerDocument;if(r.data==="$~")r._reactRetry=o;else if(r.data!=="$?"||u.readyState!=="loading")o();else{var m=function(){o(),u.removeEventListener("DOMContentLoaded",m)};u.addEventListener("DOMContentLoaded",m),r._reactRetry=m}}function Yi(r){for(;r!=null;r=r.nextSibling){var o=r.nodeType;if(o===1||o===3)break;if(o===8){if(o=r.data,o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"||o==="F!"||o==="F")break;if(o==="/$"||o==="/&")return null}}return r}var tv=null;function k_(r){r=r.nextSibling;for(var o=0;r;){if(r.nodeType===8){var u=r.data;if(u==="/$"||u==="/&"){if(o===0)return Yi(r.nextSibling);o--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||o++}r=r.nextSibling}return null}function L_(r){r=r.previousSibling;for(var o=0;r;){if(r.nodeType===8){var u=r.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(o===0)return r;o--}else u!=="/$"&&u!=="/&"||o++}r=r.previousSibling}return null}function z_(r,o,u){switch(o=Gf(u),r){case"html":if(r=o.documentElement,!r)throw Error(i(452));return r;case"head":if(r=o.head,!r)throw Error(i(453));return r;case"body":if(r=o.body,!r)throw Error(i(454));return r;default:throw Error(i(451))}}function su(r){for(var o=r.attributes;o.length;)r.removeAttributeNode(o[0]);pc(r)}var Xi=new Map,R_=new Set;function Wf(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var yr=$.d;$.d={f:PD,r:ND,D:jD,C:BD,L:ID,m:FD,X:UD,S:HD,M:VD};function PD(){var r=yr.f(),o=jf();return r||o}function ND(r){var o=zr(r);o!==null&&o.tag===5&&o.type==="form"?Kx(o):yr.r(r)}var Al=typeof document>"u"?null:document;function P_(r,o,u){var m=Al;if(m&&typeof o=="string"&&o){var x=Ge(o);x='link[rel="'+r+'"][href="'+x+'"]',typeof u=="string"&&(x+='[crossorigin="'+u+'"]'),R_.has(x)||(R_.add(x),r={rel:r,crossOrigin:u,href:o},m.querySelector(x)===null&&(o=m.createElement("link"),Un(o,"link",r),bn(o),m.head.appendChild(o)))}}function jD(r){yr.D(r),P_("dns-prefetch",r,null)}function BD(r,o){yr.C(r,o),P_("preconnect",r,o)}function ID(r,o,u){yr.L(r,o,u);var m=Al;if(m&&r&&o){var x='link[rel="preload"][as="'+Ge(o)+'"]';o==="image"&&u&&u.imageSrcSet?(x+='[imagesrcset="'+Ge(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(x+='[imagesizes="'+Ge(u.imageSizes)+'"]')):x+='[href="'+Ge(r)+'"]';var S=x;switch(o){case"style":S=Tl(r);break;case"script":S=Dl(r)}Xi.has(S)||(r=v({rel:"preload",href:o==="image"&&u&&u.imageSrcSet?void 0:r,as:o},u),Xi.set(S,r),m.querySelector(x)!==null||o==="style"&&m.querySelector(ou(S))||o==="script"&&m.querySelector(lu(S))||(o=m.createElement("link"),Un(o,"link",r),bn(o),m.head.appendChild(o)))}}function FD(r,o){yr.m(r,o);var u=Al;if(u&&r){var m=o&&typeof o.as=="string"?o.as:"script",x='link[rel="modulepreload"][as="'+Ge(m)+'"][href="'+Ge(r)+'"]',S=x;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":S=Dl(r)}if(!Xi.has(S)&&(r=v({rel:"modulepreload",href:r},o),Xi.set(S,r),u.querySelector(x)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(lu(S)))return}m=u.createElement("link"),Un(m,"link",r),bn(m),u.head.appendChild(m)}}}function HD(r,o,u){yr.S(r,o,u);var m=Al;if(m&&r){var x=Rr(m).hoistableStyles,S=Tl(r);o=o||"default";var M=x.get(S);if(!M){var B={loading:0,preload:null};if(M=m.querySelector(ou(S)))B.loading=5;else{r=v({rel:"stylesheet",href:r,"data-precedence":o},u),(u=Xi.get(S))&&ev(r,u);var W=M=m.createElement("link");bn(W),Un(W,"link",r),W._p=new Promise(function(st,vt){W.onload=st,W.onerror=vt}),W.addEventListener("load",function(){B.loading|=1}),W.addEventListener("error",function(){B.loading|=2}),B.loading|=4,Zf(M,o,m)}M={type:"stylesheet",instance:M,count:1,state:B},x.set(S,M)}}}function UD(r,o){yr.X(r,o);var u=Al;if(u&&r){var m=Rr(u).hoistableScripts,x=Dl(r),S=m.get(x);S||(S=u.querySelector(lu(x)),S||(r=v({src:r,async:!0},o),(o=Xi.get(x))&&nv(r,o),S=u.createElement("script"),bn(S),Un(S,"link",r),u.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},m.set(x,S))}}function VD(r,o){yr.M(r,o);var u=Al;if(u&&r){var m=Rr(u).hoistableScripts,x=Dl(r),S=m.get(x);S||(S=u.querySelector(lu(x)),S||(r=v({src:r,async:!0,type:"module"},o),(o=Xi.get(x))&&nv(r,o),S=u.createElement("script"),bn(S),Un(S,"link",r),u.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},m.set(x,S))}}function N_(r,o,u,m){var x=(x=yt.current)?Wf(x):null;if(!x)throw Error(i(446));switch(r){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(o=Tl(u.href),u=Rr(x).hoistableStyles,m=u.get(o),m||(m={type:"style",instance:null,count:0,state:null},u.set(o,m)),m):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){r=Tl(u.href);var S=Rr(x).hoistableStyles,M=S.get(r);if(M||(x=x.ownerDocument||x,M={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},S.set(r,M),(S=x.querySelector(ou(r)))&&!S._p&&(M.instance=S,M.state.loading=5),Xi.has(r)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},Xi.set(r,u),S||$D(x,r,u,M.state))),o&&m===null)throw Error(i(528,""));return M}if(o&&m!==null)throw Error(i(529,""));return null;case"script":return o=u.async,u=u.src,typeof u=="string"&&o&&typeof o!="function"&&typeof o!="symbol"?(o=Dl(u),u=Rr(x).hoistableScripts,m=u.get(o),m||(m={type:"script",instance:null,count:0,state:null},u.set(o,m)),m):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,r))}}function Tl(r){return'href="'+Ge(r)+'"'}function ou(r){return'link[rel="stylesheet"]['+r+"]"}function j_(r){return v({},r,{"data-precedence":r.precedence,precedence:null})}function $D(r,o,u,m){r.querySelector('link[rel="preload"][as="style"]['+o+"]")?m.loading=1:(o=r.createElement("link"),m.preload=o,o.addEventListener("load",function(){return m.loading|=1}),o.addEventListener("error",function(){return m.loading|=2}),Un(o,"link",u),bn(o),r.head.appendChild(o))}function Dl(r){return'[src="'+Ge(r)+'"]'}function lu(r){return"script[async]"+r}function B_(r,o,u){if(o.count++,o.instance===null)switch(o.type){case"style":var m=r.querySelector('style[data-href~="'+Ge(u.href)+'"]');if(m)return o.instance=m,bn(m),m;var x=v({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return m=(r.ownerDocument||r).createElement("style"),bn(m),Un(m,"style",x),Zf(m,u.precedence,r),o.instance=m;case"stylesheet":x=Tl(u.href);var S=r.querySelector(ou(x));if(S)return o.state.loading|=4,o.instance=S,bn(S),S;m=j_(u),(x=Xi.get(x))&&ev(m,x),S=(r.ownerDocument||r).createElement("link"),bn(S);var M=S;return M._p=new Promise(function(B,W){M.onload=B,M.onerror=W}),Un(S,"link",m),o.state.loading|=4,Zf(S,u.precedence,r),o.instance=S;case"script":return S=Dl(u.src),(x=r.querySelector(lu(S)))?(o.instance=x,bn(x),x):(m=u,(x=Xi.get(S))&&(m=v({},u),nv(m,x)),r=r.ownerDocument||r,x=r.createElement("script"),bn(x),Un(x,"link",m),r.head.appendChild(x),o.instance=x);case"void":return null;default:throw Error(i(443,o.type))}else o.type==="stylesheet"&&(o.state.loading&4)===0&&(m=o.instance,o.state.loading|=4,Zf(m,u.precedence,r));return o.instance}function Zf(r,o,u){for(var m=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),x=m.length?m[m.length-1]:null,S=x,M=0;M<m.length;M++){var B=m[M];if(B.dataset.precedence===o)S=B;else if(S!==x)break}S?S.parentNode.insertBefore(r,S.nextSibling):(o=u.nodeType===9?u.head:u,o.insertBefore(r,o.firstChild))}function ev(r,o){r.crossOrigin==null&&(r.crossOrigin=o.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=o.referrerPolicy),r.title==null&&(r.title=o.title)}function nv(r,o){r.crossOrigin==null&&(r.crossOrigin=o.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=o.referrerPolicy),r.integrity==null&&(r.integrity=o.integrity)}var qf=null;function I_(r,o,u){if(qf===null){var m=new Map,x=qf=new Map;x.set(u,m)}else x=qf,m=x.get(u),m||(m=new Map,x.set(u,m));if(m.has(r))return m;for(m.set(r,null),u=u.getElementsByTagName(r),x=0;x<u.length;x++){var S=u[x];if(!(S[js]||S[vn]||r==="link"&&S.getAttribute("rel")==="stylesheet")&&S.namespaceURI!=="http://www.w3.org/2000/svg"){var M=S.getAttribute(o)||"";M=r+M;var B=m.get(M);B?B.push(S):m.set(M,[S])}}return m}function F_(r,o,u){r=r.ownerDocument||r,r.head.insertBefore(u,o==="title"?r.querySelector("head > title"):null)}function GD(r,o,u){if(u===1||o.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof o.precedence!="string"||typeof o.href!="string"||o.href==="")break;return!0;case"link":if(typeof o.rel!="string"||typeof o.href!="string"||o.href===""||o.onLoad||o.onError)break;switch(o.rel){case"stylesheet":return r=o.disabled,typeof o.precedence=="string"&&r==null;default:return!0}case"script":if(o.async&&typeof o.async!="function"&&typeof o.async!="symbol"&&!o.onLoad&&!o.onError&&o.src&&typeof o.src=="string")return!0}return!1}function H_(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function WD(r,o,u,m){if(u.type==="stylesheet"&&(typeof m.media!="string"||matchMedia(m.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var x=Tl(m.href),S=o.querySelector(ou(x));if(S){o=S._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(r.count++,r=Yf.bind(r),o.then(r,r)),u.state.loading|=4,u.instance=S,bn(S);return}S=o.ownerDocument||o,m=j_(m),(x=Xi.get(x))&&ev(m,x),S=S.createElement("link"),bn(S);var M=S;M._p=new Promise(function(B,W){M.onload=B,M.onerror=W}),Un(S,"link",m),u.instance=S}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(u,o),(o=u.state.preload)&&(u.state.loading&3)===0&&(r.count++,u=Yf.bind(r),o.addEventListener("load",u),o.addEventListener("error",u))}}var iv=0;function ZD(r,o){return r.stylesheets&&r.count===0&&Kf(r,r.stylesheets),0<r.count||0<r.imgCount?function(u){var m=setTimeout(function(){if(r.stylesheets&&Kf(r,r.stylesheets),r.unsuspend){var S=r.unsuspend;r.unsuspend=null,S()}},6e4+o);0<r.imgBytes&&iv===0&&(iv=62500*TD());var x=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&Kf(r,r.stylesheets),r.unsuspend)){var S=r.unsuspend;r.unsuspend=null,S()}},(r.imgBytes>iv?50:800)+o);return r.unsuspend=u,function(){r.unsuspend=null,clearTimeout(m),clearTimeout(x)}}:null}function Yf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Kf(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var Xf=null;function Kf(r,o){r.stylesheets=null,r.unsuspend!==null&&(r.count++,Xf=new Map,o.forEach(qD,r),Xf=null,Yf.call(r))}function qD(r,o){if(!(o.state.loading&4)){var u=Xf.get(r);if(u)var m=u.get(null);else{u=new Map,Xf.set(r,u);for(var x=r.querySelectorAll("link[data-precedence],style[data-precedence]"),S=0;S<x.length;S++){var M=x[S];(M.nodeName==="LINK"||M.getAttribute("media")!=="not all")&&(u.set(M.dataset.precedence,M),m=M)}m&&u.set(null,m)}x=o.instance,M=x.getAttribute("data-precedence"),S=u.get(M)||m,S===m&&u.set(null,x),u.set(M,x),this.count++,m=Yf.bind(this),x.addEventListener("load",m),x.addEventListener("error",m),S?S.parentNode.insertBefore(x,S.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(x,r.firstChild)),o.state.loading|=4}}var cu={$$typeof:j,Provider:null,Consumer:null,_currentValue:q,_currentValue2:q,_threadCount:0};function YD(r,o,u,m,x,S,M,B,W){this.tag=1,this.containerInfo=r,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=dc(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=dc(0),this.hiddenUpdates=dc(null),this.identifierPrefix=m,this.onUncaughtError=x,this.onCaughtError=S,this.onRecoverableError=M,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=W,this.incompleteTransitions=new Map}function U_(r,o,u,m,x,S,M,B,W,st,vt,St){return r=new YD(r,o,u,M,W,st,vt,St,B),o=1,S===!0&&(o|=24),S=qn(3,null,null,o),r.current=S,S.stateNode=r,o=Nm(),o.refCount++,r.pooledCache=o,o.refCount++,S.memoizedState={element:m,isDehydrated:u,cache:o},Fm(S),r}function V_(r){return r?(r=rr,r):rr}function $_(r,o,u,m,x,S){x=V_(x),m.context===null?m.context=x:m.pendingContext=x,m=Jr(o),m.payload={element:u},S=S===void 0?null:S,S!==null&&(m.callback=S),u=ts(r,m,o),u!==null&&(bi(u,r,o),Hc(u,r,o))}function G_(r,o){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var u=r.retryLane;r.retryLane=u!==0&&u<o?u:o}}function av(r,o){G_(r,o),(r=r.alternate)&&G_(r,o)}function W_(r){if(r.tag===13||r.tag===31){var o=Wi(r,67108864);o!==null&&bi(o,r,67108864),av(r,67108864)}}function Z_(r){if(r.tag===13||r.tag===31){var o=Li();o=oi(o);var u=Wi(r,o);u!==null&&bi(u,r,o),av(r,o)}}var Qf=!0;function XD(r,o,u,m){var x=I.T;I.T=null;var S=$.p;try{$.p=2,rv(r,o,u,m)}finally{$.p=S,I.T=x}}function KD(r,o,u,m){var x=I.T;I.T=null;var S=$.p;try{$.p=8,rv(r,o,u,m)}finally{$.p=S,I.T=x}}function rv(r,o,u,m){if(Qf){var x=sv(m);if(x===null)Gg(r,o,m,Jf,u),Y_(r,m);else if(JD(x,r,o,u,m))m.stopPropagation();else if(Y_(r,m),o&4&&-1<QD.indexOf(r)){for(;x!==null;){var S=zr(x);if(S!==null)switch(S.tag){case 3:if(S=S.stateNode,S.current.memoizedState.isDehydrated){var M=Xa(S.pendingLanes);if(M!==0){var B=S;for(B.pendingLanes|=2,B.entangledLanes|=2;M;){var W=1<<31-Vt(M);B.entanglements[1]|=W,M&=~W}Na(S),(Ae&6)===0&&(Pf=At()+500,iu(0))}}break;case 31:case 13:B=Wi(S,2),B!==null&&bi(B,S,2),jf(),av(S,2)}if(S=sv(m),S===null&&Gg(r,o,m,Jf,u),S===x)break;x=S}x!==null&&m.stopPropagation()}else Gg(r,o,m,null,u)}}function sv(r){return r=Us(r),ov(r)}var Jf=null;function ov(r){if(Jf=null,r=Ja(r),r!==null){var o=s(r);if(o===null)r=null;else{var u=o.tag;if(u===13){if(r=l(o),r!==null)return r;r=null}else if(u===31){if(r=d(o),r!==null)return r;r=null}else if(u===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;r=null}else o!==r&&(r=null)}}return Jf=r,null}function q_(r){switch(r){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(wt()){case Et:return 2;case zt:return 8;case Yt:case re:return 32;case gt:return 268435456;default:return 32}default:return 32}}var lv=!1,ds=null,fs=null,hs=null,uu=new Map,du=new Map,ps=[],QD="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Y_(r,o){switch(r){case"focusin":case"focusout":ds=null;break;case"dragenter":case"dragleave":fs=null;break;case"mouseover":case"mouseout":hs=null;break;case"pointerover":case"pointerout":uu.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":du.delete(o.pointerId)}}function fu(r,o,u,m,x,S){return r===null||r.nativeEvent!==S?(r={blockedOn:o,domEventName:u,eventSystemFlags:m,nativeEvent:S,targetContainers:[x]},o!==null&&(o=zr(o),o!==null&&W_(o)),r):(r.eventSystemFlags|=m,o=r.targetContainers,x!==null&&o.indexOf(x)===-1&&o.push(x),r)}function JD(r,o,u,m,x){switch(o){case"focusin":return ds=fu(ds,r,o,u,m,x),!0;case"dragenter":return fs=fu(fs,r,o,u,m,x),!0;case"mouseover":return hs=fu(hs,r,o,u,m,x),!0;case"pointerover":var S=x.pointerId;return uu.set(S,fu(uu.get(S)||null,r,o,u,m,x)),!0;case"gotpointercapture":return S=x.pointerId,du.set(S,fu(du.get(S)||null,r,o,u,m,x)),!0}return!1}function X_(r){var o=Ja(r.target);if(o!==null){var u=s(o);if(u!==null){if(o=u.tag,o===13){if(o=l(u),o!==null){r.blockedOn=o,hc(r.priority,function(){Z_(u)});return}}else if(o===31){if(o=d(u),o!==null){r.blockedOn=o,hc(r.priority,function(){Z_(u)});return}}else if(o===3&&u.stateNode.current.memoizedState.isDehydrated){r.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}r.blockedOn=null}function th(r){if(r.blockedOn!==null)return!1;for(var o=r.targetContainers;0<o.length;){var u=sv(r.nativeEvent);if(u===null){u=r.nativeEvent;var m=new u.constructor(u.type,u);Zo=m,u.target.dispatchEvent(m),Zo=null}else return o=zr(u),o!==null&&W_(o),r.blockedOn=u,!1;o.shift()}return!0}function K_(r,o,u){th(r)&&u.delete(o)}function tM(){lv=!1,ds!==null&&th(ds)&&(ds=null),fs!==null&&th(fs)&&(fs=null),hs!==null&&th(hs)&&(hs=null),uu.forEach(K_),du.forEach(K_)}function eh(r,o){r.blockedOn===o&&(r.blockedOn=null,lv||(lv=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,tM)))}var nh=null;function Q_(r){nh!==r&&(nh=r,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){nh===r&&(nh=null);for(var o=0;o<r.length;o+=3){var u=r[o],m=r[o+1],x=r[o+2];if(typeof m!="function"){if(ov(m||u)===null)continue;break}var S=zr(u);S!==null&&(r.splice(o,3),o-=3,sg(S,{pending:!0,data:x,method:u.method,action:m},m,x))}}))}function Ml(r){function o(W){return eh(W,r)}ds!==null&&eh(ds,r),fs!==null&&eh(fs,r),hs!==null&&eh(hs,r),uu.forEach(o),du.forEach(o);for(var u=0;u<ps.length;u++){var m=ps[u];m.blockedOn===r&&(m.blockedOn=null)}for(;0<ps.length&&(u=ps[0],u.blockedOn===null);)X_(u),u.blockedOn===null&&ps.shift();if(u=(r.ownerDocument||r).$$reactFormReplay,u!=null)for(m=0;m<u.length;m+=3){var x=u[m],S=u[m+1],M=x[Ln]||null;if(typeof S=="function")M||Q_(u);else if(M){var B=null;if(S&&S.hasAttribute("formAction")){if(x=S,M=S[Ln]||null)B=M.formAction;else if(ov(x)!==null)continue}else B=M.action;typeof B=="function"?u[m+1]=B:(u.splice(m,3),m-=3),Q_(u)}}}function J_(){function r(S){S.canIntercept&&S.info==="react-transition"&&S.intercept({handler:function(){return new Promise(function(M){return x=M})},focusReset:"manual",scroll:"manual"})}function o(){x!==null&&(x(),x=null),m||setTimeout(u,20)}function u(){if(!m&&!navigation.transition){var S=navigation.currentEntry;S&&S.url!=null&&navigation.navigate(S.url,{state:S.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var m=!1,x=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",o),navigation.addEventListener("navigateerror",o),setTimeout(u,100),function(){m=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",o),navigation.removeEventListener("navigateerror",o),x!==null&&(x(),x=null)}}}function cv(r){this._internalRoot=r}ih.prototype.render=cv.prototype.render=function(r){var o=this._internalRoot;if(o===null)throw Error(i(409));var u=o.current,m=Li();$_(u,m,r,o,null,null)},ih.prototype.unmount=cv.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var o=r.containerInfo;$_(r.current,2,null,r,null,null),jf(),o[Qa]=null}};function ih(r){this._internalRoot=r}ih.prototype.unstable_scheduleHydration=function(r){if(r){var o=fc();r={blockedOn:null,target:r,priority:o};for(var u=0;u<ps.length&&o!==0&&o<ps[u].priority;u++);ps.splice(u,0,r),u===0&&X_(r)}};var t1=e.version;if(t1!=="19.2.5")throw Error(i(527,t1,"19.2.5"));$.findDOMNode=function(r){var o=r._reactInternals;if(o===void 0)throw typeof r.render=="function"?Error(i(188)):(r=Object.keys(r).join(","),Error(i(268,r)));return r=p(o),r=r!==null?g(r):null,r=r===null?null:r.stateNode,r};var eM={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:I,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ah=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ah.isDisabled&&ah.supportsFiber)try{jt=ah.inject(eM),Gt=ah}catch{}}return pu.createRoot=function(r,o){if(!a(r))throw Error(i(299));var u=!1,m="",x=o0,S=l0,M=c0;return o!=null&&(o.unstable_strictMode===!0&&(u=!0),o.identifierPrefix!==void 0&&(m=o.identifierPrefix),o.onUncaughtError!==void 0&&(x=o.onUncaughtError),o.onCaughtError!==void 0&&(S=o.onCaughtError),o.onRecoverableError!==void 0&&(M=o.onRecoverableError)),o=U_(r,1,!1,null,null,u,m,null,x,S,M,J_),r[Qa]=o.current,$g(r),new cv(o)},pu.hydrateRoot=function(r,o,u){if(!a(r))throw Error(i(299));var m=!1,x="",S=o0,M=l0,B=c0,W=null;return u!=null&&(u.unstable_strictMode===!0&&(m=!0),u.identifierPrefix!==void 0&&(x=u.identifierPrefix),u.onUncaughtError!==void 0&&(S=u.onUncaughtError),u.onCaughtError!==void 0&&(M=u.onCaughtError),u.onRecoverableError!==void 0&&(B=u.onRecoverableError),u.formState!==void 0&&(W=u.formState)),o=U_(r,1,!0,o,u??null,m,x,W,S,M,B,J_),o.context=V_(null),u=o.current,m=Li(),m=oi(m),x=Jr(m),x.callback=null,ts(u,x,m),u=m,o.current.lanes=u,Ka(o,u),Na(o),r[Qa]=o.current,$g(r),new ih(o)},pu.version="19.2.5",pu}var d1;function hM(){if(d1)return fv.exports;d1=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),fv.exports=fM(),fv.exports}var pM=hM();/**
|
||
* react-router v7.14.1
|
||
*
|
||
* Copyright (c) Remix Software Inc.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE.md file in the root directory of this source tree.
|
||
*
|
||
* @license MIT
|
||
*/var f1="popstate";function h1(t){return typeof t=="object"&&t!=null&&"pathname"in t&&"search"in t&&"hash"in t&&"state"in t&&"key"in t}function mM(t={}){function e(i,a){var p;let s=(p=a.state)==null?void 0:p.masked,{pathname:l,search:d,hash:f}=s||i.location;return sb("",{pathname:l,search:d,hash:f},a.state&&a.state.usr||null,a.state&&a.state.key||"default",s?{pathname:i.location.pathname,search:i.location.search,hash:i.location.hash}:void 0)}function n(i,a){return typeof a=="string"?a:Yu(a)}return vM(e,n,null,t)}function tn(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function xa(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function gM(){return Math.random().toString(36).substring(2,10)}function p1(t,e){return{usr:t.state,key:t.key,idx:e,masked:t.unstable_mask?{pathname:t.pathname,search:t.search,hash:t.hash}:void 0}}function sb(t,e,n=null,i,a){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof e=="string"?ec(e):e,state:n,key:e&&e.key||i||gM(),unstable_mask:a}}function Yu({pathname:t="/",search:e="",hash:n=""}){return e&&e!=="?"&&(t+=e.charAt(0)==="?"?e:"?"+e),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function ec(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substring(n),t=t.substring(0,n));let i=t.indexOf("?");i>=0&&(e.search=t.substring(i),t=t.substring(0,i)),t&&(e.pathname=t)}return e}function vM(t,e,n,i={}){let{window:a=document.defaultView,v5Compat:s=!1}=i,l=a.history,d="POP",f=null,p=g();p==null&&(p=0,l.replaceState({...l.state,idx:p},""));function g(){return(l.state||{idx:null}).idx}function v(){d="POP";let A=g(),k=A==null?null:A-p;p=A,f&&f({action:d,location:C.location,delta:k})}function y(A,k){d="PUSH";let z=h1(A)?A:sb(C.location,A,k);p=g()+1;let j=p1(z,p),P=C.createHref(z.unstable_mask||z);try{l.pushState(j,"",P)}catch(H){if(H instanceof DOMException&&H.name==="DataCloneError")throw H;a.location.assign(P)}s&&f&&f({action:d,location:C.location,delta:1})}function _(A,k){d="REPLACE";let z=h1(A)?A:sb(C.location,A,k);p=g();let j=p1(z,p),P=C.createHref(z.unstable_mask||z);l.replaceState(j,"",P),s&&f&&f({action:d,location:C.location,delta:0})}function w(A){return bM(A)}let C={get action(){return d},get location(){return t(a,l)},listen(A){if(f)throw new Error("A history only accepts one active listener");return a.addEventListener(f1,v),f=A,()=>{a.removeEventListener(f1,v),f=null}},createHref(A){return e(a,A)},createURL:w,encodeLocation(A){let k=w(A);return{pathname:k.pathname,search:k.search,hash:k.hash}},push:y,replace:_,go(A){return l.go(A)}};return C}function bM(t,e=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),tn(n,"No window.location.(origin|href) available to create URL");let i=typeof t=="string"?t:Yu(t);return i=i.replace(/ $/,"%20"),!e&&i.startsWith("//")&&(i=n+i),new URL(i,n)}function Jw(t,e,n="/"){return yM(t,e,n,!1)}function yM(t,e,n,i){let a=typeof e=="string"?ec(e):e,s=kr(a.pathname||"/",n);if(s==null)return null;let l=tC(t);xM(l);let d=null;for(let f=0;d==null&&f<l.length;++f){let p=kM(s);d=MM(l[f],p,i)}return d}function tC(t,e=[],n=[],i="",a=!1){let s=(l,d,f=a,p)=>{let g={relativePath:p===void 0?l.path||"":p,caseSensitive:l.caseSensitive===!0,childrenIndex:d,route:l};if(g.relativePath.startsWith("/")){if(!g.relativePath.startsWith(i)&&f)return;tn(g.relativePath.startsWith(i),`Absolute route path "${g.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),g.relativePath=g.relativePath.slice(i.length)}let v=ba([i,g.relativePath]),y=n.concat(g);l.children&&l.children.length>0&&(tn(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${v}".`),tC(l.children,e,y,v,f)),!(l.path==null&&!l.index)&&e.push({path:v,score:TM(v,l.index),routesMeta:y})};return t.forEach((l,d)=>{var f;if(l.path===""||!((f=l.path)!=null&&f.includes("?")))s(l,d);else for(let p of eC(l.path))s(l,d,!0,p)}),e}function eC(t){let e=t.split("/");if(e.length===0)return[];let[n,...i]=e,a=n.endsWith("?"),s=n.replace(/\?$/,"");if(i.length===0)return a?[s,""]:[s];let l=eC(i.join("/")),d=[];return d.push(...l.map(f=>f===""?s:[s,f].join("/"))),a&&d.push(...l),d.map(f=>t.startsWith("/")&&f===""?"/":f)}function xM(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:DM(e.routesMeta.map(i=>i.childrenIndex),n.routesMeta.map(i=>i.childrenIndex)))}var _M=/^:[\w-]+$/,SM=3,wM=2,CM=1,EM=10,AM=-2,m1=t=>t==="*";function TM(t,e){let n=t.split("/"),i=n.length;return n.some(m1)&&(i+=AM),e&&(i+=wM),n.filter(a=>!m1(a)).reduce((a,s)=>a+(_M.test(s)?SM:s===""?CM:EM),i)}function DM(t,e){return t.length===e.length&&t.slice(0,-1).every((i,a)=>i===e[a])?t[t.length-1]-e[e.length-1]:0}function MM(t,e,n=!1){let{routesMeta:i}=t,a={},s="/",l=[];for(let d=0;d<i.length;++d){let f=i[d],p=d===i.length-1,g=s==="/"?e:e.slice(s.length)||"/",v=Kh({path:f.relativePath,caseSensitive:f.caseSensitive,end:p},g),y=f.route;if(!v&&p&&n&&!i[i.length-1].route.index&&(v=Kh({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},g)),!v)return null;Object.assign(a,v.params),l.push({params:a,pathname:ba([s,v.pathname]),pathnameBase:PM(ba([s,v.pathnameBase])),route:y}),v.pathnameBase!=="/"&&(s=ba([s,v.pathnameBase]))}return l}function Kh(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[n,i]=OM(t.path,t.caseSensitive,t.end),a=e.match(n);if(!a)return null;let s=a[0],l=s.replace(/(.)\/+$/,"$1"),d=a.slice(1);return{params:i.reduce((p,{paramName:g,isOptional:v},y)=>{if(g==="*"){let w=d[y]||"";l=s.slice(0,s.length-w.length).replace(/(.)\/+$/,"$1")}const _=d[y];return v&&!_?p[g]=void 0:p[g]=(_||"").replace(/%2F/g,"/"),p},{}),pathname:s,pathnameBase:l,pattern:t}}function OM(t,e=!1,n=!0){xa(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let i=[],a="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,d,f,p,g)=>{if(i.push({paramName:d,isOptional:f!=null}),f){let v=g.charAt(p+l.length);return v&&v!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(i.push({paramName:"*"}),a+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":t!==""&&t!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,e?void 0:"i"),i]}function kM(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return xa(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),t}}function kr(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,i=t.charAt(n);return i&&i!=="/"?null:t.slice(n)||"/"}var LM=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function zM(t,e="/"){let{pathname:n,search:i="",hash:a=""}=typeof t=="string"?ec(t):t,s;return n?(n=nC(n),n.startsWith("/")?s=g1(n.substring(1),"/"):s=g1(n,e)):s=e,{pathname:s,search:NM(i),hash:jM(a)}}function g1(t,e){let n=Qh(e).split("/");return t.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function gv(t,e,n,i){return`Cannot include a '${t}' character in a manually specified \`to.${e}\` field [${JSON.stringify(i)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function RM(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function Kb(t){let e=RM(t);return e.map((n,i)=>i===e.length-1?n.pathname:n.pathnameBase)}function kp(t,e,n,i=!1){let a;typeof t=="string"?a=ec(t):(a={...t},tn(!a.pathname||!a.pathname.includes("?"),gv("?","pathname","search",a)),tn(!a.pathname||!a.pathname.includes("#"),gv("#","pathname","hash",a)),tn(!a.search||!a.search.includes("#"),gv("#","search","hash",a)));let s=t===""||a.pathname==="",l=s?"/":a.pathname,d;if(l==null)d=n;else{let v=e.length-1;if(!i&&l.startsWith("..")){let y=l.split("/");for(;y[0]==="..";)y.shift(),v-=1;a.pathname=y.join("/")}d=v>=0?e[v]:"/"}let f=zM(a,d),p=l&&l!=="/"&&l.endsWith("/"),g=(s||l===".")&&n.endsWith("/");return!f.pathname.endsWith("/")&&(p||g)&&(f.pathname+="/"),f}var nC=t=>t.replace(/\/\/+/g,"/"),ba=t=>nC(t.join("/")),Qh=t=>t.replace(/\/+$/,""),PM=t=>Qh(t).replace(/^\/*/,"/"),NM=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,jM=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,BM=class{constructor(t,e,n,i=!1){this.status=t,this.statusText=e||"",this.internal=i,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function IM(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}function FM(t){let e=t.map(n=>n.route.path).filter(Boolean);return ba(e)||"/"}var iC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function aC(t,e){let n=t;if(typeof n!="string"||!LM.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let i=n,a=!1;if(iC)try{let s=new URL(window.location.href),l=n.startsWith("//")?new URL(s.protocol+n):new URL(n),d=kr(l.pathname,e);l.origin===s.origin&&d!=null?n=d+l.search+l.hash:a=!0}catch{xa(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:i,isExternal:a,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var rC=["POST","PUT","PATCH","DELETE"];new Set(rC);var HM=["GET",...rC];new Set(HM);var nc=O.createContext(null);nc.displayName="DataRouter";var Lp=O.createContext(null);Lp.displayName="DataRouterState";var sC=O.createContext(!1);function UM(){return O.useContext(sC)}var oC=O.createContext({isTransitioning:!1});oC.displayName="ViewTransition";var VM=O.createContext(new Map);VM.displayName="Fetchers";var $M=O.createContext(null);$M.displayName="Await";var Ii=O.createContext(null);Ii.displayName="Navigation";var wd=O.createContext(null);wd.displayName="Location";var qa=O.createContext({outlet:null,matches:[],isDataRoute:!1});qa.displayName="Route";var Qb=O.createContext(null);Qb.displayName="RouteError";var lC="REACT_ROUTER_ERROR",GM="REDIRECT",WM="ROUTE_ERROR_RESPONSE";function ZM(t){if(t.startsWith(`${lC}:${GM}:{`))try{let e=JSON.parse(t.slice(28));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.location=="string"&&typeof e.reloadDocument=="boolean"&&typeof e.replace=="boolean")return e}catch{}}function qM(t){if(t.startsWith(`${lC}:${WM}:{`))try{let e=JSON.parse(t.slice(40));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string")return new BM(e.status,e.statusText,e.data)}catch{}}function YM(t,{relative:e}={}){tn(ic(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:i}=O.useContext(Ii),{hash:a,pathname:s,search:l}=Cd(t,{relative:e}),d=s;return n!=="/"&&(d=s==="/"?n:ba([n,s])),i.createHref({pathname:d,search:l,hash:a})}function ic(){return O.useContext(wd)!=null}function Ya(){return tn(ic(),"useLocation() may be used only in the context of a <Router> component."),O.useContext(wd).location}var cC="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function uC(t){O.useContext(Ii).static||O.useLayoutEffect(t)}function Jb(){let{isDataRoute:t}=O.useContext(qa);return t?lO():XM()}function XM(){tn(ic(),"useNavigate() may be used only in the context of a <Router> component.");let t=O.useContext(nc),{basename:e,navigator:n}=O.useContext(Ii),{matches:i}=O.useContext(qa),{pathname:a}=Ya(),s=JSON.stringify(Kb(i)),l=O.useRef(!1);return uC(()=>{l.current=!0}),O.useCallback((f,p={})=>{if(xa(l.current,cC),!l.current)return;if(typeof f=="number"){n.go(f);return}let g=kp(f,JSON.parse(s),a,p.relative==="path");t==null&&e!=="/"&&(g.pathname=g.pathname==="/"?e:ba([e,g.pathname])),(p.replace?n.replace:n.push)(g,p.state,p)},[e,n,s,a,t])}O.createContext(null);function Cd(t,{relative:e}={}){let{matches:n}=O.useContext(qa),{pathname:i}=Ya(),a=JSON.stringify(Kb(n));return O.useMemo(()=>kp(t,JSON.parse(a),i,e==="path"),[t,a,i,e])}function KM(t,e){return dC(t,e)}function dC(t,e,n){var A;tn(ic(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=O.useContext(Ii),{matches:a}=O.useContext(qa),s=a[a.length-1],l=s?s.params:{},d=s?s.pathname:"/",f=s?s.pathnameBase:"/",p=s&&s.route;{let k=p&&p.path||"";hC(d,!p||k.endsWith("*")||k.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${k}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
||
|
||
Please change the parent <Route path="${k}"> to <Route path="${k==="/"?"*":`${k}/*`}">.`)}let g=Ya(),v;if(e){let k=typeof e=="string"?ec(e):e;tn(f==="/"||((A=k.pathname)==null?void 0:A.startsWith(f)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${f}" but pathname "${k.pathname}" was given in the \`location\` prop.`),v=k}else v=g;let y=v.pathname||"/",_=y;if(f!=="/"){let k=f.replace(/^\//,"").split("/");_="/"+y.replace(/^\//,"").split("/").slice(k.length).join("/")}let w=Jw(t,{pathname:_});xa(p||w!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),xa(w==null||w[w.length-1].route.element!==void 0||w[w.length-1].route.Component!==void 0||w[w.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let C=nO(w&&w.map(k=>Object.assign({},k,{params:Object.assign({},l,k.params),pathname:ba([f,i.encodeLocation?i.encodeLocation(k.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathname]),pathnameBase:k.pathnameBase==="/"?f:ba([f,i.encodeLocation?i.encodeLocation(k.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathnameBase])})),a,n);return e&&C?O.createElement(wd.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...v},navigationType:"POP"}},C):C}function QM(){let t=oO(),e=IM(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,i="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:i},s={padding:"2px 4px",backgroundColor:i},l=null;return console.error("Error handled by React Router default ErrorBoundary:",t),l=O.createElement(O.Fragment,null,O.createElement("p",null,"💿 Hey developer 👋"),O.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",O.createElement("code",{style:s},"ErrorBoundary")," or"," ",O.createElement("code",{style:s},"errorElement")," prop on your route.")),O.createElement(O.Fragment,null,O.createElement("h2",null,"Unexpected Application Error!"),O.createElement("h3",{style:{fontStyle:"italic"}},e),n?O.createElement("pre",{style:a},n):null,l)}var JM=O.createElement(QM,null),fC=class extends O.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||e.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){this.props.onError?this.props.onError(t,e):console.error("React Router caught the following error during render",t)}render(){let t=this.state.error;if(this.context&&typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){const n=qM(t.digest);n&&(t=n)}let e=t!==void 0?O.createElement(qa.Provider,{value:this.props.routeContext},O.createElement(Qb.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?O.createElement(tO,{error:t},e):e}};fC.contextType=sC;var vv=new WeakMap;function tO({children:t,error:e}){let{basename:n}=O.useContext(Ii);if(typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let i=ZM(e.digest);if(i){let a=vv.get(e);if(a)throw a;let s=aC(i.location,n);if(iC&&!vv.get(e))if(s.isExternal||i.reloadDocument)window.location.href=s.absoluteURL||s.to;else{const l=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(s.to,{replace:i.replace}));throw vv.set(e,l),l}return O.createElement("meta",{httpEquiv:"refresh",content:`0;url=${s.absoluteURL||s.to}`})}}return t}function eO({routeContext:t,match:e,children:n}){let i=O.useContext(nc);return i&&i.static&&i.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=e.route.id),O.createElement(qa.Provider,{value:t},n)}function nO(t,e=[],n){let i=n==null?void 0:n.state;if(t==null){if(!i)return null;if(i.errors)t=i.matches;else if(e.length===0&&!i.initialized&&i.matches.length>0)t=i.matches;else return null}let a=t,s=i==null?void 0:i.errors;if(s!=null){let g=a.findIndex(v=>v.route.id&&(s==null?void 0:s[v.route.id])!==void 0);tn(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),a=a.slice(0,Math.min(a.length,g+1))}let l=!1,d=-1;if(n&&i){l=i.renderFallback;for(let g=0;g<a.length;g++){let v=a[g];if((v.route.HydrateFallback||v.route.hydrateFallbackElement)&&(d=g),v.route.id){let{loaderData:y,errors:_}=i,w=v.route.loader&&!y.hasOwnProperty(v.route.id)&&(!_||_[v.route.id]===void 0);if(v.route.lazy||w){n.isStatic&&(l=!0),d>=0?a=a.slice(0,d+1):a=[a[0]];break}}}}let f=n==null?void 0:n.onError,p=i&&f?(g,v)=>{var y,_;f(g,{location:i.location,params:((_=(y=i.matches)==null?void 0:y[0])==null?void 0:_.params)??{},unstable_pattern:FM(i.matches),errorInfo:v})}:void 0;return a.reduceRight((g,v,y)=>{let _,w=!1,C=null,A=null;i&&(_=s&&v.route.id?s[v.route.id]:void 0,C=v.route.errorElement||JM,l&&(d<0&&y===0?(hC("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,A=null):d===y&&(w=!0,A=v.route.hydrateFallbackElement||null)));let k=e.concat(a.slice(0,y+1)),z=()=>{let j;return _?j=C:w?j=A:v.route.Component?j=O.createElement(v.route.Component,null):v.route.element?j=v.route.element:j=g,O.createElement(eO,{match:v,routeContext:{outlet:g,matches:k,isDataRoute:i!=null},children:j})};return i&&(v.route.ErrorBoundary||v.route.errorElement||y===0)?O.createElement(fC,{location:i.location,revalidation:i.revalidation,component:C,error:_,children:z(),routeContext:{outlet:null,matches:k,isDataRoute:!0},onError:p}):z()},null)}function ty(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function iO(t){let e=O.useContext(nc);return tn(e,ty(t)),e}function aO(t){let e=O.useContext(Lp);return tn(e,ty(t)),e}function rO(t){let e=O.useContext(qa);return tn(e,ty(t)),e}function ey(t){let e=rO(t),n=e.matches[e.matches.length-1];return tn(n.route.id,`${t} can only be used on routes that contain a unique "id"`),n.route.id}function sO(){return ey("useRouteId")}function oO(){var i;let t=O.useContext(Qb),e=aO("useRouteError"),n=ey("useRouteError");return t!==void 0?t:(i=e.errors)==null?void 0:i[n]}function lO(){let{router:t}=iO("useNavigate"),e=ey("useNavigate"),n=O.useRef(!1);return uC(()=>{n.current=!0}),O.useCallback(async(a,s={})=>{xa(n.current,cC),n.current&&(typeof a=="number"?await t.navigate(a):await t.navigate(a,{fromRouteId:e,...s}))},[t,e])}var v1={};function hC(t,e,n){!e&&!v1[t]&&(v1[t]=!0,xa(!1,n))}O.memo(cO);function cO({routes:t,future:e,state:n,isStatic:i,onError:a}){return dC(t,void 0,{state:n,isStatic:i,onError:a})}function b1({to:t,replace:e,state:n,relative:i}){tn(ic(),"<Navigate> may be used only in the context of a <Router> component.");let{static:a}=O.useContext(Ii);xa(!a,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:s}=O.useContext(qa),{pathname:l}=Ya(),d=Jb(),f=kp(t,Kb(s),l,i==="path"),p=JSON.stringify(f);return O.useEffect(()=>{d(JSON.parse(p),{replace:e,state:n,relative:i})},[d,p,i,e,n]),null}function Sr(t){tn(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function uO({basename:t="/",children:e=null,location:n,navigationType:i="POP",navigator:a,static:s=!1,unstable_useTransitions:l}){tn(!ic(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=t.replace(/^\/*/,"/"),f=O.useMemo(()=>({basename:d,navigator:a,static:s,unstable_useTransitions:l,future:{}}),[d,a,s,l]);typeof n=="string"&&(n=ec(n));let{pathname:p="/",search:g="",hash:v="",state:y=null,key:_="default",unstable_mask:w}=n,C=O.useMemo(()=>{let A=kr(p,d);return A==null?null:{location:{pathname:A,search:g,hash:v,state:y,key:_,unstable_mask:w},navigationType:i}},[d,p,g,v,y,_,i,w]);return xa(C!=null,`<Router basename="${d}"> is not able to match the URL "${p}${g}${v}" because it does not start with the basename, so the <Router> won't render anything.`),C==null?null:O.createElement(Ii.Provider,{value:f},O.createElement(wd.Provider,{children:e,value:C}))}function y1({children:t,location:e}){return KM(ob(t),e)}function ob(t,e=[]){let n=[];return O.Children.forEach(t,(i,a)=>{if(!O.isValidElement(i))return;let s=[...e,a];if(i.type===O.Fragment){n.push.apply(n,ob(i.props.children,s));return}tn(i.type===Sr,`[${typeof i.type=="string"?i.type:i.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),tn(!i.props.index||!i.props.children,"An index route cannot have child routes.");let l={id:i.props.id||s.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,middleware:i.props.middleware,loader:i.props.loader,action:i.props.action,hydrateFallbackElement:i.props.hydrateFallbackElement,HydrateFallback:i.props.HydrateFallback,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.hasErrorBoundary===!0||i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(l.children=ob(i.props.children,s)),n.push(l)}),n}var Lh="get",zh="application/x-www-form-urlencoded";function zp(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function dO(t){return zp(t)&&t.tagName.toLowerCase()==="button"}function fO(t){return zp(t)&&t.tagName.toLowerCase()==="form"}function hO(t){return zp(t)&&t.tagName.toLowerCase()==="input"}function pO(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function mO(t,e){return t.button===0&&(!e||e==="_self")&&!pO(t)}var rh=null;function gO(){if(rh===null)try{new FormData(document.createElement("form"),0),rh=!1}catch{rh=!0}return rh}var vO=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function bv(t){return t!=null&&!vO.has(t)?(xa(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${zh}"`),null):t}function bO(t,e){let n,i,a,s,l;if(fO(t)){let d=t.getAttribute("action");i=d?kr(d,e):null,n=t.getAttribute("method")||Lh,a=bv(t.getAttribute("enctype"))||zh,s=new FormData(t)}else if(dO(t)||hO(t)&&(t.type==="submit"||t.type==="image")){let d=t.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=t.getAttribute("formaction")||d.getAttribute("action");if(i=f?kr(f,e):null,n=t.getAttribute("formmethod")||d.getAttribute("method")||Lh,a=bv(t.getAttribute("formenctype"))||bv(d.getAttribute("enctype"))||zh,s=new FormData(d,t),!gO()){let{name:p,type:g,value:v}=t;if(g==="image"){let y=p?`${p}.`:"";s.append(`${y}x`,"0"),s.append(`${y}y`,"0")}else p&&s.append(p,v)}}else{if(zp(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Lh,i=null,a=zh,l=t}return s&&a==="text/plain"&&(l=s,s=void 0),{action:i,method:n.toLowerCase(),encType:a,formData:s,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function ny(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function pC(t,e,n,i){let a=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return n?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${i}`:a.pathname=`${a.pathname}.${i}`:a.pathname==="/"?a.pathname=`_root.${i}`:e&&kr(a.pathname,e)==="/"?a.pathname=`${Qh(e)}/_root.${i}`:a.pathname=`${Qh(a.pathname)}.${i}`,a}async function yO(t,e){if(t.id in e)return e[t.id];try{let n=await import(t.module);return e[t.id]=n,n}catch(n){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function xO(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function _O(t,e,n){let i=await Promise.all(t.map(async a=>{let s=e.routes[a.route.id];if(s){let l=await yO(s,n);return l.links?l.links():[]}return[]}));return EO(i.flat(1).filter(xO).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function x1(t,e,n,i,a,s){let l=(f,p)=>n[p]?f.route.id!==n[p].route.id:!0,d=(f,p)=>{var g;return n[p].pathname!==f.pathname||((g=n[p].route.path)==null?void 0:g.endsWith("*"))&&n[p].params["*"]!==f.params["*"]};return s==="assets"?e.filter((f,p)=>l(f,p)||d(f,p)):s==="data"?e.filter((f,p)=>{var v;let g=i.routes[f.route.id];if(!g||!g.hasLoader)return!1;if(l(f,p)||d(f,p))return!0;if(f.route.shouldRevalidate){let y=f.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:((v=n[0])==null?void 0:v.params)||{},nextUrl:new URL(t,window.origin),nextParams:f.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function SO(t,e,{includeHydrateFallback:n}={}){return wO(t.map(i=>{let a=e.routes[i.route.id];if(!a)return[];let s=[a.module];return a.clientActionModule&&(s=s.concat(a.clientActionModule)),a.clientLoaderModule&&(s=s.concat(a.clientLoaderModule)),n&&a.hydrateFallbackModule&&(s=s.concat(a.hydrateFallbackModule)),a.imports&&(s=s.concat(a.imports)),s}).flat(1))}function wO(t){return[...new Set(t)]}function CO(t){let e={},n=Object.keys(t).sort();for(let i of n)e[i]=t[i];return e}function EO(t,e){let n=new Set;return new Set(e),t.reduce((i,a)=>{let s=JSON.stringify(CO(a));return n.has(s)||(n.add(s),i.push({key:s,link:a})),i},[])}function iy(){let t=O.useContext(nc);return ny(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function AO(){let t=O.useContext(Lp);return ny(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var ay=O.createContext(void 0);ay.displayName="FrameworkContext";function ry(){let t=O.useContext(ay);return ny(t,"You must render this element inside a <HydratedRouter> element"),t}function TO(t,e){let n=O.useContext(ay),[i,a]=O.useState(!1),[s,l]=O.useState(!1),{onFocus:d,onBlur:f,onMouseEnter:p,onMouseLeave:g,onTouchStart:v}=e,y=O.useRef(null);O.useEffect(()=>{if(t==="render"&&l(!0),t==="viewport"){let C=k=>{k.forEach(z=>{l(z.isIntersecting)})},A=new IntersectionObserver(C,{threshold:.5});return y.current&&A.observe(y.current),()=>{A.disconnect()}}},[t]),O.useEffect(()=>{if(i){let C=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(C)}}},[i]);let _=()=>{a(!0)},w=()=>{a(!1),l(!1)};return n?t!=="intent"?[s,y,{}]:[s,y,{onFocus:mu(d,_),onBlur:mu(f,w),onMouseEnter:mu(p,_),onMouseLeave:mu(g,w),onTouchStart:mu(v,_)}]:[!1,y,{}]}function mu(t,e){return n=>{t&&t(n),n.defaultPrevented||e(n)}}function DO({page:t,...e}){let n=UM(),{router:i}=iy(),a=O.useMemo(()=>Jw(i.routes,t,i.basename),[i.routes,t,i.basename]);return a?n?O.createElement(OO,{page:t,matches:a,...e}):O.createElement(kO,{page:t,matches:a,...e}):null}function MO(t){let{manifest:e,routeModules:n}=ry(),[i,a]=O.useState([]);return O.useEffect(()=>{let s=!1;return _O(t,e,n).then(l=>{s||a(l)}),()=>{s=!0}},[t,e,n]),i}function OO({page:t,matches:e,...n}){let i=Ya(),{future:a}=ry(),{basename:s}=iy(),l=O.useMemo(()=>{if(t===i.pathname+i.search+i.hash)return[];let d=pC(t,s,a.unstable_trailingSlashAwareDataRequests,"rsc"),f=!1,p=[];for(let g of e)typeof g.route.shouldRevalidate=="function"?f=!0:p.push(g.route.id);return f&&p.length>0&&d.searchParams.set("_routes",p.join(",")),[d.pathname+d.search]},[s,a.unstable_trailingSlashAwareDataRequests,t,i,e]);return O.createElement(O.Fragment,null,l.map(d=>O.createElement("link",{key:d,rel:"prefetch",as:"fetch",href:d,...n})))}function kO({page:t,matches:e,...n}){let i=Ya(),{future:a,manifest:s,routeModules:l}=ry(),{basename:d}=iy(),{loaderData:f,matches:p}=AO(),g=O.useMemo(()=>x1(t,e,p,s,i,"data"),[t,e,p,s,i]),v=O.useMemo(()=>x1(t,e,p,s,i,"assets"),[t,e,p,s,i]),y=O.useMemo(()=>{if(t===i.pathname+i.search+i.hash)return[];let C=new Set,A=!1;if(e.forEach(z=>{var P;let j=s.routes[z.route.id];!j||!j.hasLoader||(!g.some(H=>H.route.id===z.route.id)&&z.route.id in f&&((P=l[z.route.id])!=null&&P.shouldRevalidate)||j.hasClientLoader?A=!0:C.add(z.route.id))}),C.size===0)return[];let k=pC(t,d,a.unstable_trailingSlashAwareDataRequests,"data");return A&&C.size>0&&k.searchParams.set("_routes",e.filter(z=>C.has(z.route.id)).map(z=>z.route.id).join(",")),[k.pathname+k.search]},[d,a.unstable_trailingSlashAwareDataRequests,f,i,s,g,e,t,l]),_=O.useMemo(()=>SO(v,s),[v,s]),w=MO(v);return O.createElement(O.Fragment,null,y.map(C=>O.createElement("link",{key:C,rel:"prefetch",as:"fetch",href:C,...n})),_.map(C=>O.createElement("link",{key:C,rel:"modulepreload",href:C,...n})),w.map(({key:C,link:A})=>O.createElement("link",{key:C,nonce:n.nonce,...A,crossOrigin:A.crossOrigin??n.crossOrigin})))}function LO(...t){return e=>{t.forEach(n=>{typeof n=="function"?n(e):n!=null&&(n.current=e)})}}var zO=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{zO&&(window.__reactRouterVersion="7.14.1")}catch{}function RO({basename:t,children:e,unstable_useTransitions:n,window:i}){let a=O.useRef();a.current==null&&(a.current=mM({window:i,v5Compat:!0}));let s=a.current,[l,d]=O.useState({action:s.action,location:s.location}),f=O.useCallback(p=>{n===!1?d(p):O.startTransition(()=>d(p))},[n]);return O.useLayoutEffect(()=>s.listen(f),[s,f]),O.createElement(uO,{basename:t,children:e,location:l.location,navigationType:l.action,navigator:s,unstable_useTransitions:n})}var mC=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,gC=O.forwardRef(function({onClick:e,discover:n="render",prefetch:i="none",relative:a,reloadDocument:s,replace:l,unstable_mask:d,state:f,target:p,to:g,preventScrollReset:v,viewTransition:y,unstable_defaultShouldRevalidate:_,...w},C){let{basename:A,navigator:k,unstable_useTransitions:z}=O.useContext(Ii),j=typeof g=="string"&&mC.test(g),P=aC(g,A);g=P.to;let H=YM(g,{relative:a}),V=Ya(),U=null;if(d){let ut=kp(d,[],V.unstable_mask?V.unstable_mask.pathname:"/",!0);A!=="/"&&(ut.pathname=ut.pathname==="/"?A:ba([A,ut.pathname])),U=k.createHref(ut)}let[Z,Q,et]=TO(i,w),X=jO(g,{replace:l,unstable_mask:d,state:f,target:p,preventScrollReset:v,relative:a,viewTransition:y,unstable_defaultShouldRevalidate:_,unstable_useTransitions:z});function R(ut){e&&e(ut),ut.defaultPrevented||X(ut)}let dt=!(P.isExternal||s),it=O.createElement("a",{...w,...et,href:(dt?U:void 0)||P.absoluteURL||H,onClick:dt?R:e,ref:LO(C,Q),target:p,"data-discover":!j&&n==="render"?"true":void 0});return Z&&!j?O.createElement(O.Fragment,null,it,O.createElement(DO,{page:H})):it});gC.displayName="Link";var Mu=O.forwardRef(function({"aria-current":e="page",caseSensitive:n=!1,className:i="",end:a=!1,style:s,to:l,viewTransition:d,children:f,...p},g){let v=Cd(l,{relative:p.relative}),y=Ya(),_=O.useContext(Lp),{navigator:w,basename:C}=O.useContext(Ii),A=_!=null&&UO(v)&&d===!0,k=w.encodeLocation?w.encodeLocation(v).pathname:v.pathname,z=y.pathname,j=_&&_.navigation&&_.navigation.location?_.navigation.location.pathname:null;n||(z=z.toLowerCase(),j=j?j.toLowerCase():null,k=k.toLowerCase()),j&&C&&(j=kr(j,C)||j);const P=k!=="/"&&k.endsWith("/")?k.length-1:k.length;let H=z===k||!a&&z.startsWith(k)&&z.charAt(P)==="/",V=j!=null&&(j===k||!a&&j.startsWith(k)&&j.charAt(k.length)==="/"),U={isActive:H,isPending:V,isTransitioning:A},Z=H?e:void 0,Q;typeof i=="function"?Q=i(U):Q=[i,H?"active":null,V?"pending":null,A?"transitioning":null].filter(Boolean).join(" ");let et=typeof s=="function"?s(U):s;return O.createElement(gC,{...p,"aria-current":Z,className:Q,ref:g,style:et,to:l,viewTransition:d},typeof f=="function"?f(U):f)});Mu.displayName="NavLink";var PO=O.forwardRef(({discover:t="render",fetcherKey:e,navigate:n,reloadDocument:i,replace:a,state:s,method:l=Lh,action:d,onSubmit:f,relative:p,preventScrollReset:g,viewTransition:v,unstable_defaultShouldRevalidate:y,..._},w)=>{let{unstable_useTransitions:C}=O.useContext(Ii),A=FO(),k=HO(d,{relative:p}),z=l.toLowerCase()==="get"?"get":"post",j=typeof d=="string"&&mC.test(d),P=H=>{if(f&&f(H),H.defaultPrevented)return;H.preventDefault();let V=H.nativeEvent.submitter,U=(V==null?void 0:V.getAttribute("formmethod"))||l,Z=()=>A(V||H.currentTarget,{fetcherKey:e,method:U,navigate:n,replace:a,state:s,relative:p,preventScrollReset:g,viewTransition:v,unstable_defaultShouldRevalidate:y});C&&n!==!1?O.startTransition(()=>Z()):Z()};return O.createElement("form",{ref:w,method:z,action:k,onSubmit:i?f:P,..._,"data-discover":!j&&t==="render"?"true":void 0})});PO.displayName="Form";function NO(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function vC(t){let e=O.useContext(nc);return tn(e,NO(t)),e}function jO(t,{target:e,replace:n,unstable_mask:i,state:a,preventScrollReset:s,relative:l,viewTransition:d,unstable_defaultShouldRevalidate:f,unstable_useTransitions:p}={}){let g=Jb(),v=Ya(),y=Cd(t,{relative:l});return O.useCallback(_=>{if(mO(_,e)){_.preventDefault();let w=n!==void 0?n:Yu(v)===Yu(y),C=()=>g(t,{replace:w,unstable_mask:i,state:a,preventScrollReset:s,relative:l,viewTransition:d,unstable_defaultShouldRevalidate:f});p?O.startTransition(()=>C()):C()}},[v,g,y,n,i,a,e,t,s,l,d,f,p])}var BO=0,IO=()=>`__${String(++BO)}__`;function FO(){let{router:t}=vC("useSubmit"),{basename:e}=O.useContext(Ii),n=sO(),i=t.fetch,a=t.navigate;return O.useCallback(async(s,l={})=>{let{action:d,method:f,encType:p,formData:g,body:v}=bO(s,e);if(l.navigate===!1){let y=l.fetcherKey||IO();await i(y,n,l.action||d,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:g,body:v,formMethod:l.method||f,formEncType:l.encType||p,flushSync:l.flushSync})}else await a(l.action||d,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:g,body:v,formMethod:l.method||f,formEncType:l.encType||p,replace:l.replace,state:l.state,fromRouteId:n,flushSync:l.flushSync,viewTransition:l.viewTransition})},[i,a,e,n])}function HO(t,{relative:e}={}){let{basename:n}=O.useContext(Ii),i=O.useContext(qa);tn(i,"useFormAction must be used inside a RouteContext");let[a]=i.matches.slice(-1),s={...Cd(t||".",{relative:e})},l=Ya();if(t==null){s.search=l.search;let d=new URLSearchParams(s.search),f=d.getAll("index");if(f.some(g=>g==="")){d.delete("index"),f.filter(v=>v).forEach(v=>d.append("index",v));let g=d.toString();s.search=g?`?${g}`:""}}return(!t||t===".")&&a.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(s.pathname=s.pathname==="/"?n:ba([n,s.pathname])),Yu(s)}function UO(t,{relative:e}={}){let n=O.useContext(oC);tn(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=vC("useViewTransitionState"),a=Cd(t,{relative:e});if(!n.isTransitioning)return!1;let s=kr(n.currentLocation.pathname,i)||n.currentLocation.pathname,l=kr(n.nextLocation.pathname,i)||n.nextLocation.pathname;return Kh(a.pathname,l)!=null||Kh(a.pathname,s)!=null}var Rp=Qw();const VO=Sd(Rp);let Ul=null;function Jh(t){Ul=t}function $O(){return Ul}async function GO(t){if(t.status!==204){if(!t.ok){const e=await t.text().catch(()=>"");throw new Error(`${t.status}: ${e||t.statusText}`)}return t.json()}}async function Ol(t,e={}){const n=new Headers(e.headers);Ul&&n.set("Authorization",`Bearer ${Ul}`),e.body&&typeof e.body=="string"&&n.set("Content-Type","application/json");let i=await fetch(t,{...e,headers:n});if(i.status===401&&Ul)if(await WO())n.set("Authorization",`Bearer ${Ul}`),i=await fetch(t,{...e,headers:n});else throw Jh(null),window.location.href="/login",new Error("Session expired");return GO(i)}async function WO(){try{const t=await fetch("/api/admin/auth/refresh",{method:"POST",credentials:"include"});if(!t.ok)return!1;const e=await t.json();return Jh(e.token),!0}catch{return!1}}const ie={get:t=>Ol(t),post:(t,e)=>Ol(t,{method:"POST",body:e?JSON.stringify(e):void 0}),put:(t,e)=>Ol(t,{method:"PUT",body:e?JSON.stringify(e):void 0}),patch:(t,e)=>Ol(t,{method:"PATCH",body:e?JSON.stringify(e):void 0}),delete:t=>Ol(t,{method:"DELETE"}),upload:(t,e)=>Ol(t,{method:"POST",body:e})},bC=O.createContext(null);function ZO(){return O.useContext(bC)}function qO({children:t}){const[e,n]=O.useState({id:"dev",email:"dev@localhost",name:"Dev User",role:"admin",permissions:["FL","ANN","DATASET","ADM"]}),[i]=O.useState(!1),a=O.useCallback(async(d,f)=>{const p=await ie.post("/api/admin/auth/login",{email:d,password:f});Jh(p.token),n(p.user)},[]),s=O.useCallback(async()=>{try{await ie.post("/api/admin/auth/logout")}catch{}Jh(null),n(null)},[]),l=O.useCallback(d=>(e==null?void 0:e.permissions.includes(d))??!1,[e]);return T.jsx(bC.Provider,{value:{user:e,loading:i,login:a,logout:s,hasPermission:l},children:t})}const yC=O.createContext(null);function Pp(){return O.useContext(yC)}function YO({children:t}){const[e,n]=O.useState([]),[i,a]=O.useState(null),s=O.useCallback(async()=>{try{const d=await ie.get("/api/flights?pageSize=1000");n(d.items??[])}catch{}},[]);O.useEffect(()=>{s(),ie.get("/api/annotations/settings/user").then(d=>{d!=null&&d.selectedFlightId&&ie.get(`/api/flights/${d.selectedFlightId}`).then(f=>a(f)).catch(()=>{})}).catch(()=>{})},[s]);const l=O.useCallback(d=>{a(d),ie.put("/api/annotations/settings/user",{selectedFlightId:(d==null?void 0:d.id)??null}).catch(()=>{})},[]);return T.jsx(yC.Provider,{value:{flights:e,selectedFlight:i,selectFlight:l,refreshFlights:s},children:t})}function XO({children:t}){return T.jsx(T.Fragment,{children:t})}const KO=(t,e,n,i)=>{var s,l,d,f;const a=[n,{code:e,...i||{}}];if((l=(s=t==null?void 0:t.services)==null?void 0:s.logger)!=null&&l.forward)return t.services.logger.forward(a,"warn","react-i18next::",!0);Lo(a[0])&&(a[0]=`react-i18next:: ${a[0]}`),(f=(d=t==null?void 0:t.services)==null?void 0:d.logger)!=null&&f.warn?t.services.logger.warn(...a):console!=null&&console.warn&&console.warn(...a)},_1={},lb=(t,e,n,i)=>{Lo(n)&&_1[n]||(Lo(n)&&(_1[n]=new Date),KO(t,e,n,i))},xC=(t,e)=>()=>{if(t.isInitialized)e();else{const n=()=>{setTimeout(()=>{t.off("initialized",n)},0),e()};t.on("initialized",n)}},cb=(t,e,n)=>{t.loadNamespaces(e,xC(t,n))},S1=(t,e,n,i)=>{if(Lo(n)&&(n=[n]),t.options.preload&&t.options.preload.indexOf(e)>-1)return cb(t,n,i);n.forEach(a=>{t.options.ns.indexOf(a)<0&&t.options.ns.push(a)}),t.loadLanguages(e,xC(t,i))},QO=(t,e,n={})=>!e.languages||!e.languages.length?(lb(e,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:e.languages}),!0):e.hasLoadedNamespace(t,{lng:n.lng,precheck:(i,a)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!a(i.isLanguageChangingTo,t))return!1}}),Lo=t=>typeof t=="string",JO=t=>typeof t=="object"&&t!==null,tk=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,ek={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},nk=t=>ek[t],ik=t=>t.replace(tk,nk);let ub={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:ik};const ak=(t={})=>{ub={...ub,...t}},rk=()=>ub;let _C;const sk=t=>{_C=t},ok=()=>_C,lk={type:"3rdParty",init(t){ak(t.options.react),sk(t)}},ck=O.createContext();class uk{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const dk=(t,e)=>{const n=O.useRef();return O.useEffect(()=>{n.current=t},[t,e]),n.current},SC=(t,e,n,i)=>t.getFixedT(e,n,i),fk=(t,e,n,i)=>O.useCallback(SC(t,e,n,i),[t,e,n,i]),Gn=(t,e={})=>{var P,H,V,U;const{i18n:n}=e,{i18n:i,defaultNS:a}=O.useContext(ck)||{},s=n||i||ok();if(s&&!s.reportNamespaces&&(s.reportNamespaces=new uk),!s){lb(s,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const Z=(et,X)=>Lo(X)?X:JO(X)&&Lo(X.defaultValue)?X.defaultValue:Array.isArray(et)?et[et.length-1]:et,Q=[Z,{},!1];return Q.t=Z,Q.i18n={},Q.ready=!1,Q}(P=s.options.react)!=null&&P.wait&&lb(s,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const l={...rk(),...s.options.react,...e},{useSuspense:d,keyPrefix:f}=l;let p=a||((H=s.options)==null?void 0:H.defaultNS);p=Lo(p)?[p]:p||["translation"],(U=(V=s.reportNamespaces).addUsedNamespaces)==null||U.call(V,p);const g=(s.isInitialized||s.initializedStoreOnce)&&p.every(Z=>QO(Z,s,l)),v=fk(s,e.lng||null,l.nsMode==="fallback"?p:p[0],f),y=()=>v,_=()=>SC(s,e.lng||null,l.nsMode==="fallback"?p:p[0],f),[w,C]=O.useState(y);let A=p.join();e.lng&&(A=`${e.lng}${A}`);const k=dk(A),z=O.useRef(!0);O.useEffect(()=>{const{bindI18n:Z,bindI18nStore:Q}=l;z.current=!0,!g&&!d&&(e.lng?S1(s,e.lng,p,()=>{z.current&&C(_)}):cb(s,p,()=>{z.current&&C(_)})),g&&k&&k!==A&&z.current&&C(_);const et=()=>{z.current&&C(_)};return Z&&(s==null||s.on(Z,et)),Q&&(s==null||s.store.on(Q,et)),()=>{z.current=!1,s&&Z&&(Z==null||Z.split(" ").forEach(X=>s.off(X,et))),Q&&s&&Q.split(" ").forEach(X=>s.store.off(X,et))}},[s,A]),O.useEffect(()=>{z.current&&g&&C(y)},[s,f,g]);const j=[w,s,g];if(j.t=w,j.i18n=s,j.ready=g,g||!g&&!d)return j;throw new Promise(Z=>{e.lng?S1(s,e.lng,p,()=>Z()):cb(s,p,()=>Z())})};var Ou={exports:{}};/* @preserve
|
||
* Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
|
||
* (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
|
||
*/var hk=Ou.exports,w1;function wC(){return w1||(w1=1,(function(t,e){(function(n,i){i(e)})(hk,(function(n){var i="1.9.4";function a(c){var h,b,E,D;for(b=1,E=arguments.length;b<E;b++){D=arguments[b];for(h in D)c[h]=D[h]}return c}var s=Object.create||(function(){function c(){}return function(h){return c.prototype=h,new c}})();function l(c,h){var b=Array.prototype.slice;if(c.bind)return c.bind.apply(c,b.call(arguments,1));var E=b.call(arguments,2);return function(){return c.apply(h,E.length?E.concat(b.call(arguments)):arguments)}}var d=0;function f(c){return"_leaflet_id"in c||(c._leaflet_id=++d),c._leaflet_id}function p(c,h,b){var E,D,N,G;return G=function(){E=!1,D&&(N.apply(b,D),D=!1)},N=function(){E?D=arguments:(c.apply(b,arguments),setTimeout(G,h),E=!0)},N}function g(c,h,b){var E=h[1],D=h[0],N=E-D;return c===E&&b?c:((c-D)%N+N)%N+D}function v(){return!1}function y(c,h){if(h===!1)return c;var b=Math.pow(10,h===void 0?6:h);return Math.round(c*b)/b}function _(c){return c.trim?c.trim():c.replace(/^\s+|\s+$/g,"")}function w(c){return _(c).split(/\s+/)}function C(c,h){Object.prototype.hasOwnProperty.call(c,"options")||(c.options=c.options?s(c.options):{});for(var b in h)c.options[b]=h[b];return c.options}function A(c,h,b){var E=[];for(var D in c)E.push(encodeURIComponent(b?D.toUpperCase():D)+"="+encodeURIComponent(c[D]));return(!h||h.indexOf("?")===-1?"?":"&")+E.join("&")}var k=/\{ *([\w_ -]+) *\}/g;function z(c,h){return c.replace(k,function(b,E){var D=h[E];if(D===void 0)throw new Error("No value provided for variable "+b);return typeof D=="function"&&(D=D(h)),D})}var j=Array.isArray||function(c){return Object.prototype.toString.call(c)==="[object Array]"};function P(c,h){for(var b=0;b<c.length;b++)if(c[b]===h)return b;return-1}var H="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function V(c){return window["webkit"+c]||window["moz"+c]||window["ms"+c]}var U=0;function Z(c){var h=+new Date,b=Math.max(0,16-(h-U));return U=h+b,window.setTimeout(c,b)}var Q=window.requestAnimationFrame||V("RequestAnimationFrame")||Z,et=window.cancelAnimationFrame||V("CancelAnimationFrame")||V("CancelRequestAnimationFrame")||function(c){window.clearTimeout(c)};function X(c,h,b){if(b&&Q===Z)c.call(h);else return Q.call(window,l(c,h))}function R(c){c&&et.call(window,c)}var dt={__proto__:null,extend:a,create:s,bind:l,get lastId(){return d},stamp:f,throttle:p,wrapNum:g,falseFn:v,formatNum:y,trim:_,splitWords:w,setOptions:C,getParamString:A,template:z,isArray:j,indexOf:P,emptyImageUrl:H,requestFn:Q,cancelFn:et,requestAnimFrame:X,cancelAnimFrame:R};function it(){}it.extend=function(c){var h=function(){C(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},b=h.__super__=this.prototype,E=s(b);E.constructor=h,h.prototype=E;for(var D in this)Object.prototype.hasOwnProperty.call(this,D)&&D!=="prototype"&&D!=="__super__"&&(h[D]=this[D]);return c.statics&&a(h,c.statics),c.includes&&(ut(c.includes),a.apply(null,[E].concat(c.includes))),a(E,c),delete E.statics,delete E.includes,E.options&&(E.options=b.options?s(b.options):{},a(E.options,c.options)),E._initHooks=[],E.callInitHooks=function(){if(!this._initHooksCalled){b.callInitHooks&&b.callInitHooks.call(this),this._initHooksCalled=!0;for(var N=0,G=E._initHooks.length;N<G;N++)E._initHooks[N].call(this)}},h},it.include=function(c){var h=this.prototype.options;return a(this.prototype,c),c.options&&(this.prototype.options=h,this.mergeOptions(c.options)),this},it.mergeOptions=function(c){return a(this.prototype.options,c),this},it.addInitHook=function(c){var h=Array.prototype.slice.call(arguments,1),b=typeof c=="function"?c:function(){this[c].apply(this,h)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(b),this};function ut(c){if(!(typeof L>"u"||!L||!L.Mixin)){c=j(c)?c:[c];for(var h=0;h<c.length;h++)c[h]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",new Error().stack)}}var I={on:function(c,h,b){if(typeof c=="object")for(var E in c)this._on(E,c[E],h);else{c=w(c);for(var D=0,N=c.length;D<N;D++)this._on(c[D],h,b)}return this},off:function(c,h,b){if(!arguments.length)delete this._events;else if(typeof c=="object")for(var E in c)this._off(E,c[E],h);else{c=w(c);for(var D=arguments.length===1,N=0,G=c.length;N<G;N++)D?this._off(c[N]):this._off(c[N],h,b)}return this},_on:function(c,h,b,E){if(typeof h!="function"){console.warn("wrong listener type: "+typeof h);return}if(this._listens(c,h,b)===!1){b===this&&(b=void 0);var D={fn:h,ctx:b};E&&(D.once=!0),this._events=this._events||{},this._events[c]=this._events[c]||[],this._events[c].push(D)}},_off:function(c,h,b){var E,D,N;if(this._events&&(E=this._events[c],!!E)){if(arguments.length===1){if(this._firingCount)for(D=0,N=E.length;D<N;D++)E[D].fn=v;delete this._events[c];return}if(typeof h!="function"){console.warn("wrong listener type: "+typeof h);return}var G=this._listens(c,h,b);if(G!==!1){var tt=E[G];this._firingCount&&(tt.fn=v,this._events[c]=E=E.slice()),E.splice(G,1)}}},fire:function(c,h,b){if(!this.listens(c,b))return this;var E=a({},h,{type:c,target:this,sourceTarget:h&&h.sourceTarget||this});if(this._events){var D=this._events[c];if(D){this._firingCount=this._firingCount+1||1;for(var N=0,G=D.length;N<G;N++){var tt=D[N],lt=tt.fn;tt.once&&this.off(c,lt,tt.ctx),lt.call(tt.ctx||this,E)}this._firingCount--}}return b&&this._propagateEvent(E),this},listens:function(c,h,b,E){typeof c!="string"&&console.warn('"string" type argument expected');var D=h;typeof h!="function"&&(E=!!h,D=void 0,b=void 0);var N=this._events&&this._events[c];if(N&&N.length&&this._listens(c,D,b)!==!1)return!0;if(E){for(var G in this._eventParents)if(this._eventParents[G].listens(c,h,b,E))return!0}return!1},_listens:function(c,h,b){if(!this._events)return!1;var E=this._events[c]||[];if(!h)return!!E.length;b===this&&(b=void 0);for(var D=0,N=E.length;D<N;D++)if(E[D].fn===h&&E[D].ctx===b)return D;return!1},once:function(c,h,b){if(typeof c=="object")for(var E in c)this._on(E,c[E],h,!0);else{c=w(c);for(var D=0,N=c.length;D<N;D++)this._on(c[D],h,b,!0)}return this},addEventParent:function(c){return this._eventParents=this._eventParents||{},this._eventParents[f(c)]=c,this},removeEventParent:function(c){return this._eventParents&&delete this._eventParents[f(c)],this},_propagateEvent:function(c){for(var h in this._eventParents)this._eventParents[h].fire(c.type,a({layer:c.target,propagatedFrom:c.target},c),!0)}};I.addEventListener=I.on,I.removeEventListener=I.clearAllEventListeners=I.off,I.addOneTimeEventListener=I.once,I.fireEvent=I.fire,I.hasEventListeners=I.listens;var $=it.extend(I);function q(c,h,b){this.x=b?Math.round(c):c,this.y=b?Math.round(h):h}var nt=Math.trunc||function(c){return c>0?Math.floor(c):Math.ceil(c)};q.prototype={clone:function(){return new q(this.x,this.y)},add:function(c){return this.clone()._add(ot(c))},_add:function(c){return this.x+=c.x,this.y+=c.y,this},subtract:function(c){return this.clone()._subtract(ot(c))},_subtract:function(c){return this.x-=c.x,this.y-=c.y,this},divideBy:function(c){return this.clone()._divideBy(c)},_divideBy:function(c){return this.x/=c,this.y/=c,this},multiplyBy:function(c){return this.clone()._multiplyBy(c)},_multiplyBy:function(c){return this.x*=c,this.y*=c,this},scaleBy:function(c){return new q(this.x*c.x,this.y*c.y)},unscaleBy:function(c){return new q(this.x/c.x,this.y/c.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=nt(this.x),this.y=nt(this.y),this},distanceTo:function(c){c=ot(c);var h=c.x-this.x,b=c.y-this.y;return Math.sqrt(h*h+b*b)},equals:function(c){return c=ot(c),c.x===this.x&&c.y===this.y},contains:function(c){return c=ot(c),Math.abs(c.x)<=Math.abs(this.x)&&Math.abs(c.y)<=Math.abs(this.y)},toString:function(){return"Point("+y(this.x)+", "+y(this.y)+")"}};function ot(c,h,b){return c instanceof q?c:j(c)?new q(c[0],c[1]):c==null?c:typeof c=="object"&&"x"in c&&"y"in c?new q(c.x,c.y):new q(c,h,b)}function F(c,h){if(c)for(var b=h?[c,h]:c,E=0,D=b.length;E<D;E++)this.extend(b[E])}F.prototype={extend:function(c){var h,b;if(!c)return this;if(c instanceof q||typeof c[0]=="number"||"x"in c)h=b=ot(c);else if(c=K(c),h=c.min,b=c.max,!h||!b)return this;return!this.min&&!this.max?(this.min=h.clone(),this.max=b.clone()):(this.min.x=Math.min(h.x,this.min.x),this.max.x=Math.max(b.x,this.max.x),this.min.y=Math.min(h.y,this.min.y),this.max.y=Math.max(b.y,this.max.y)),this},getCenter:function(c){return ot((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,c)},getBottomLeft:function(){return ot(this.min.x,this.max.y)},getTopRight:function(){return ot(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(c){var h,b;return typeof c[0]=="number"||c instanceof q?c=ot(c):c=K(c),c instanceof F?(h=c.min,b=c.max):h=b=c,h.x>=this.min.x&&b.x<=this.max.x&&h.y>=this.min.y&&b.y<=this.max.y},intersects:function(c){c=K(c);var h=this.min,b=this.max,E=c.min,D=c.max,N=D.x>=h.x&&E.x<=b.x,G=D.y>=h.y&&E.y<=b.y;return N&&G},overlaps:function(c){c=K(c);var h=this.min,b=this.max,E=c.min,D=c.max,N=D.x>h.x&&E.x<b.x,G=D.y>h.y&&E.y<b.y;return N&&G},isValid:function(){return!!(this.min&&this.max)},pad:function(c){var h=this.min,b=this.max,E=Math.abs(h.x-b.x)*c,D=Math.abs(h.y-b.y)*c;return K(ot(h.x-E,h.y-D),ot(b.x+E,b.y+D))},equals:function(c){return c?(c=K(c),this.min.equals(c.getTopLeft())&&this.max.equals(c.getBottomRight())):!1}};function K(c,h){return!c||c instanceof F?c:new F(c,h)}function at(c,h){if(c)for(var b=h?[c,h]:c,E=0,D=b.length;E<D;E++)this.extend(b[E])}at.prototype={extend:function(c){var h=this._southWest,b=this._northEast,E,D;if(c instanceof pt)E=c,D=c;else if(c instanceof at){if(E=c._southWest,D=c._northEast,!E||!D)return this}else return c?this.extend(yt(c)||mt(c)):this;return!h&&!b?(this._southWest=new pt(E.lat,E.lng),this._northEast=new pt(D.lat,D.lng)):(h.lat=Math.min(E.lat,h.lat),h.lng=Math.min(E.lng,h.lng),b.lat=Math.max(D.lat,b.lat),b.lng=Math.max(D.lng,b.lng)),this},pad:function(c){var h=this._southWest,b=this._northEast,E=Math.abs(h.lat-b.lat)*c,D=Math.abs(h.lng-b.lng)*c;return new at(new pt(h.lat-E,h.lng-D),new pt(b.lat+E,b.lng+D))},getCenter:function(){return new pt((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new pt(this.getNorth(),this.getWest())},getSouthEast:function(){return new pt(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(c){typeof c[0]=="number"||c instanceof pt||"lat"in c?c=yt(c):c=mt(c);var h=this._southWest,b=this._northEast,E,D;return c instanceof at?(E=c.getSouthWest(),D=c.getNorthEast()):E=D=c,E.lat>=h.lat&&D.lat<=b.lat&&E.lng>=h.lng&&D.lng<=b.lng},intersects:function(c){c=mt(c);var h=this._southWest,b=this._northEast,E=c.getSouthWest(),D=c.getNorthEast(),N=D.lat>=h.lat&&E.lat<=b.lat,G=D.lng>=h.lng&&E.lng<=b.lng;return N&&G},overlaps:function(c){c=mt(c);var h=this._southWest,b=this._northEast,E=c.getSouthWest(),D=c.getNorthEast(),N=D.lat>h.lat&&E.lat<b.lat,G=D.lng>h.lng&&E.lng<b.lng;return N&&G},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(c,h){return c?(c=mt(c),this._southWest.equals(c.getSouthWest(),h)&&this._northEast.equals(c.getNorthEast(),h)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function mt(c,h){return c instanceof at?c:new at(c,h)}function pt(c,h,b){if(isNaN(c)||isNaN(h))throw new Error("Invalid LatLng object: ("+c+", "+h+")");this.lat=+c,this.lng=+h,b!==void 0&&(this.alt=+b)}pt.prototype={equals:function(c,h){if(!c)return!1;c=yt(c);var b=Math.max(Math.abs(this.lat-c.lat),Math.abs(this.lng-c.lng));return b<=(h===void 0?1e-9:h)},toString:function(c){return"LatLng("+y(this.lat,c)+", "+y(this.lng,c)+")"},distanceTo:function(c){return Ht.distance(this,yt(c))},wrap:function(){return Ht.wrapLatLng(this)},toBounds:function(c){var h=180*c/40075017,b=h/Math.cos(Math.PI/180*this.lat);return mt([this.lat-h,this.lng-b],[this.lat+h,this.lng+b])},clone:function(){return new pt(this.lat,this.lng,this.alt)}};function yt(c,h,b){return c instanceof pt?c:j(c)&&typeof c[0]!="object"?c.length===3?new pt(c[0],c[1],c[2]):c.length===2?new pt(c[0],c[1]):null:c==null?c:typeof c=="object"&&"lat"in c?new pt(c.lat,"lng"in c?c.lng:c.lon,c.alt):h===void 0?null:new pt(c,h,b)}var ft={latLngToPoint:function(c,h){var b=this.projection.project(c),E=this.scale(h);return this.transformation._transform(b,E)},pointToLatLng:function(c,h){var b=this.scale(h),E=this.transformation.untransform(c,b);return this.projection.unproject(E)},project:function(c){return this.projection.project(c)},unproject:function(c){return this.projection.unproject(c)},scale:function(c){return 256*Math.pow(2,c)},zoom:function(c){return Math.log(c/256)/Math.LN2},getProjectedBounds:function(c){if(this.infinite)return null;var h=this.projection.bounds,b=this.scale(c),E=this.transformation.transform(h.min,b),D=this.transformation.transform(h.max,b);return new F(E,D)},infinite:!1,wrapLatLng:function(c){var h=this.wrapLng?g(c.lng,this.wrapLng,!0):c.lng,b=this.wrapLat?g(c.lat,this.wrapLat,!0):c.lat,E=c.alt;return new pt(b,h,E)},wrapLatLngBounds:function(c){var h=c.getCenter(),b=this.wrapLatLng(h),E=h.lat-b.lat,D=h.lng-b.lng;if(E===0&&D===0)return c;var N=c.getSouthWest(),G=c.getNorthEast(),tt=new pt(N.lat-E,N.lng-D),lt=new pt(G.lat-E,G.lng-D);return new at(tt,lt)}},Ht=a({},ft,{wrapLng:[-180,180],R:6371e3,distance:function(c,h){var b=Math.PI/180,E=c.lat*b,D=h.lat*b,N=Math.sin((h.lat-c.lat)*b/2),G=Math.sin((h.lng-c.lng)*b/2),tt=N*N+Math.cos(E)*Math.cos(D)*G*G,lt=2*Math.atan2(Math.sqrt(tt),Math.sqrt(1-tt));return this.R*lt}}),Tt=6378137,Mt={R:Tt,MAX_LATITUDE:85.0511287798,project:function(c){var h=Math.PI/180,b=this.MAX_LATITUDE,E=Math.max(Math.min(b,c.lat),-b),D=Math.sin(E*h);return new q(this.R*c.lng*h,this.R*Math.log((1+D)/(1-D))/2)},unproject:function(c){var h=180/Math.PI;return new pt((2*Math.atan(Math.exp(c.y/this.R))-Math.PI/2)*h,c.x*h/this.R)},bounds:(function(){var c=Tt*Math.PI;return new F([-c,-c],[c,c])})()};function Ee(c,h,b,E){if(j(c)){this._a=c[0],this._b=c[1],this._c=c[2],this._d=c[3];return}this._a=c,this._b=h,this._c=b,this._d=E}Ee.prototype={transform:function(c,h){return this._transform(c.clone(),h)},_transform:function(c,h){return h=h||1,c.x=h*(this._a*c.x+this._b),c.y=h*(this._c*c.y+this._d),c},untransform:function(c,h){return h=h||1,new q((c.x/h-this._b)/this._a,(c.y/h-this._d)/this._c)}};function Ut(c,h,b,E){return new Ee(c,h,b,E)}var ye=a({},Ht,{code:"EPSG:3857",projection:Mt,transformation:(function(){var c=.5/(Math.PI*Mt.R);return Ut(c,.5,-c,.5)})()}),ge=a({},ye,{code:"EPSG:900913"});function ve(c){return document.createElementNS("http://www.w3.org/2000/svg",c)}function Cn(c,h){var b="",E,D,N,G,tt,lt;for(E=0,N=c.length;E<N;E++){for(tt=c[E],D=0,G=tt.length;D<G;D++)lt=tt[D],b+=(D?"L":"M")+lt.x+" "+lt.y;b+=h?It.svg?"z":"x":""}return b||"M0 0"}var En=document.documentElement.style,nn="ActiveXObject"in window,mn=nn&&!document.addEventListener,kn="msLaunchUri"in navigator&&!("documentMode"in document),gn=oi("webkit"),wi=oi("android"),Rt=oi("android 2")||oi("android 3"),At=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),wt=wi&&oi("Google")&&At<537&&!("AudioNode"in window),Et=!!window.opera,zt=!kn&&oi("chrome"),Yt=oi("gecko")&&!gn&&!Et&&!nn,re=!zt&&oi("safari"),gt=oi("phantom"),Ct="OTransition"in En,Ot=navigator.platform.indexOf("Win")===0,jt=nn&&"transition"in En,Gt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!Rt,Bt="MozPerspective"in En,Vt=!window.L_DISABLE_3D&&(jt||Gt||Bt)&&!Ct&&!gt,ae=typeof orientation<"u"||oi("mobile"),An=ae&&gn,Wn=ae&&Gt,ra=!window.PointerEvent&&window.MSPointerEvent,Rs=!!(window.PointerEvent||ra),Ps="ontouchstart"in window||!!window.TouchEvent,Xa=!window.L_NO_TOUCH&&(Ps||Rs),Vo=ae&&Et,Ns=ae&&Yt,vm=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,zd=(function(){var c=!1;try{var h=Object.defineProperty({},"passive",{get:function(){c=!0}});window.addEventListener("testPassiveEventSupport",v,h),window.removeEventListener("testPassiveEventSupport",v,h)}catch{}return c})(),dc=(function(){return!!document.createElement("canvas").getContext})(),Ka=!!(document.createElementNS&&ve("svg").createSVGRect),bm=!!Ka&&(function(){var c=document.createElement("div");return c.innerHTML="<svg/>",(c.firstChild&&c.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"})(),Rd=!Ka&&(function(){try{var c=document.createElement("div");c.innerHTML='<v:shape adj="1"/>';var h=c.firstChild;return h.style.behavior="url(#default#VML)",h&&typeof h.adj=="object"}catch{return!1}})(),Pd=navigator.platform.indexOf("Mac")===0,Nd=navigator.platform.indexOf("Linux")===0;function oi(c){return navigator.userAgent.toLowerCase().indexOf(c)>=0}var It={ie:nn,ielt9:mn,edge:kn,webkit:gn,android:wi,android23:Rt,androidStock:wt,opera:Et,chrome:zt,gecko:Yt,safari:re,phantom:gt,opera12:Ct,win:Ot,ie3d:jt,webkit3d:Gt,gecko3d:Bt,any3d:Vt,mobile:ae,mobileWebkit:An,mobileWebkit3d:Wn,msPointer:ra,pointer:Rs,touch:Xa,touchNative:Ps,mobileOpera:Vo,mobileGecko:Ns,retina:vm,passiveEvents:zd,canvas:dc,svg:Ka,vml:Rd,inlineSvg:bm,mac:Pd,linux:Nd},fc=It.msPointer?"MSPointerDown":"pointerdown",hc=It.msPointer?"MSPointerMove":"pointermove",sa=It.msPointer?"MSPointerUp":"pointerup",vn=It.msPointer?"MSPointerCancel":"pointercancel",Ln={touchstart:fc,touchmove:hc,touchend:sa,touchcancel:vn},Qa={touchstart:Rr,touchmove:Sa,touchend:Sa,touchcancel:Sa},_a={},jd=!1;function ym(c,h,b){return h==="touchstart"&&zr(),Qa[h]?(b=Qa[h].bind(this,b),c.addEventListener(Ln[h],b,!1),b):(console.warn("wrong event specified:",h),v)}function Bd(c,h,b){if(!Ln[h]){console.warn("wrong event specified:",h);return}c.removeEventListener(Ln[h],b,!1)}function js(c){_a[c.pointerId]=c}function pc(c){_a[c.pointerId]&&(_a[c.pointerId]=c)}function Ja(c){delete _a[c.pointerId]}function zr(){jd||(document.addEventListener(fc,js,!0),document.addEventListener(hc,pc,!0),document.addEventListener(sa,Ja,!0),document.addEventListener(vn,Ja,!0),jd=!0)}function Sa(c,h){if(h.pointerType!==(h.MSPOINTER_TYPE_MOUSE||"mouse")){h.touches=[];for(var b in _a)h.touches.push(_a[b]);h.changedTouches=[h],c(h)}}function Rr(c,h){h.MSPOINTER_TYPE_TOUCH&&h.pointerType===h.MSPOINTER_TYPE_TOUCH&&an(h),Sa(c,h)}function bn(c){var h={},b,E;for(E in c)b=c[E],h[E]=b&&b.bind?b.bind(c):b;return c=h,h.type="dblclick",h.detail=2,h.isTrusted=!1,h._simulated=!0,h}var Id=200;function Fd(c,h){c.addEventListener("dblclick",h);var b=0,E;function D(N){if(N.detail!==1){E=N.detail;return}if(!(N.pointerType==="mouse"||N.sourceCapabilities&&!N.sourceCapabilities.firesTouchEvents)){var G=$s(N);if(!(G.some(function(lt){return lt instanceof HTMLLabelElement&<.attributes.for})&&!G.some(function(lt){return lt instanceof HTMLInputElement||lt instanceof HTMLSelectElement}))){var tt=Date.now();tt-b<=Id?(E++,E===2&&h(bn(N))):E=1,b=tt}}}return c.addEventListener("click",D),{dblclick:h,simDblclick:D}}function tr(c,h){c.removeEventListener("dblclick",h.dblclick),c.removeEventListener("click",h.simDblclick)}var wa=Fs(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Bs=Fs(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),mc=Bs==="webkitTransition"||Bs==="OTransition"?Bs+"End":"transitionend";function gc(c){return typeof c=="string"?document.getElementById(c):c}function Is(c,h){var b=c.style[h]||c.currentStyle&&c.currentStyle[h];if((!b||b==="auto")&&document.defaultView){var E=document.defaultView.getComputedStyle(c,null);b=E?E[h]:null}return b==="auto"?null:b}function se(c,h,b){var E=document.createElement(c);return E.className=h||"",b&&b.appendChild(E),E}function Ne(c){var h=c.parentNode;h&&h.removeChild(c)}function li(c){for(;c.firstChild;)c.removeChild(c.firstChild)}function Tn(c){var h=c.parentNode;h&&h.lastChild!==c&&h.appendChild(c)}function er(c){var h=c.parentNode;h&&h.firstChild!==c&&h.insertBefore(c,h.firstChild)}function vc(c,h){if(c.classList!==void 0)return c.classList.contains(h);var b=$o(c);return b.length>0&&new RegExp("(^|\\s)"+h+"(\\s|$)").test(b)}function Kt(c,h){if(c.classList!==void 0)for(var b=w(h),E=0,D=b.length;E<D;E++)c.classList.add(b[E]);else if(!vc(c,h)){var N=$o(c);Pr(c,(N?N+" ":"")+h)}}function Ye(c,h){c.classList!==void 0?c.classList.remove(h):Pr(c,_((" "+$o(c)+" ").replace(" "+h+" "," ")))}function Pr(c,h){c.className.baseVal===void 0?c.className=h:c.className.baseVal=h}function $o(c){return c.correspondingElement&&(c=c.correspondingElement),c.className.baseVal===void 0?c.className:c.className.baseVal}function Ge(c,h){"opacity"in c.style?c.style.opacity=h:"filter"in c.style&&bc(c,h)}function bc(c,h){var b=!1,E="DXImageTransform.Microsoft.Alpha";try{b=c.filters.item(E)}catch{if(h===1)return}h=Math.round(h*100),b?(b.Enabled=h!==100,b.Opacity=h):c.style.filter+=" progid:"+E+"(opacity="+h+")"}function Fs(c){for(var h=document.documentElement.style,b=0;b<c.length;b++)if(c[b]in h)return c[b];return!1}function oa(c,h,b){var E=h||new q(0,0);c.style[wa]=(It.ie3d?"translate("+E.x+"px,"+E.y+"px)":"translate3d("+E.x+"px,"+E.y+"px,0)")+(b?" scale("+b+")":"")}function He(c,h){c._leaflet_pos=h,It.any3d?oa(c,h):(c.style.left=h.x+"px",c.style.top=h.y+"px")}function Ca(c){return c._leaflet_pos||new q(0,0)}var Nr,Fi,yc;if("onselectstart"in document)Nr=function(){qt(window,"selectstart",an)},Fi=function(){Me(window,"selectstart",an)};else{var jr=Fs(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);Nr=function(){if(jr){var c=document.documentElement.style;yc=c[jr],c[jr]="none"}},Fi=function(){jr&&(document.documentElement.style[jr]=yc,yc=void 0)}}function Go(){qt(window,"dragstart",an)}function Hs(){Me(window,"dragstart",an)}var Wo,xc;function Br(c){for(;c.tabIndex===-1;)c=c.parentNode;c.style&&(ci(),Wo=c,xc=c.style.outlineStyle,c.style.outlineStyle="none",qt(window,"keydown",ci))}function ci(){Wo&&(Wo.style.outlineStyle=xc,Wo=void 0,xc=void 0,Me(window,"keydown",ci))}function Zo(c){do c=c.parentNode;while((!c.offsetWidth||!c.offsetHeight)&&c!==document.body);return c}function Us(c){var h=c.getBoundingClientRect();return{x:h.width/c.offsetWidth||1,y:h.height/c.offsetHeight||1,boundingClientRect:h}}var Ir={__proto__:null,TRANSFORM:wa,TRANSITION:Bs,TRANSITION_END:mc,get:gc,getStyle:Is,create:se,remove:Ne,empty:li,toFront:Tn,toBack:er,hasClass:vc,addClass:Kt,removeClass:Ye,setClass:Pr,getClass:$o,setOpacity:Ge,testProp:Fs,setTransform:oa,setPosition:He,getPosition:Ca,get disableTextSelection(){return Nr},get enableTextSelection(){return Fi},disableImageDrag:Go,enableImageDrag:Hs,preventOutline:Br,restoreOutline:ci,getSizedParentNode:Zo,getScale:Us};function qt(c,h,b,E){if(h&&typeof h=="object")for(var D in h)Ei(c,D,h[D],b);else{h=w(h);for(var N=0,G=h.length;N<G;N++)Ei(c,h[N],b,E)}return this}var Ci="_leaflet_events";function Me(c,h,b,E){if(arguments.length===1)_c(c),delete c[Ci];else if(h&&typeof h=="object")for(var D in h)Vs(c,D,h[D],b);else if(h=w(h),arguments.length===2)_c(c,function(tt){return P(h,tt)!==-1});else for(var N=0,G=h.length;N<G;N++)Vs(c,h[N],b,E);return this}function _c(c,h){for(var b in c[Ci]){var E=b.split(/\d/)[0];(!h||h(E))&&Vs(c,E,null,null,b)}}var nr={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Ei(c,h,b,E){var D=h+f(b)+(E?"_"+f(E):"");if(c[Ci]&&c[Ci][D])return this;var N=function(tt){return b.call(E||c,tt||window.event)},G=N;!It.touchNative&&It.pointer&&h.indexOf("touch")===0?N=ym(c,h,N):It.touch&&h==="dblclick"?N=Fd(c,N):"addEventListener"in c?h==="touchstart"||h==="touchmove"||h==="wheel"||h==="mousewheel"?c.addEventListener(nr[h]||h,N,It.passiveEvents?{passive:!1}:!1):h==="mouseenter"||h==="mouseleave"?(N=function(tt){tt=tt||window.event,la(c,tt)&&G(tt)},c.addEventListener(nr[h],N,!1)):c.addEventListener(h,G,!1):c.attachEvent("on"+h,N),c[Ci]=c[Ci]||{},c[Ci][D]=N}function Vs(c,h,b,E,D){D=D||h+f(b)+(E?"_"+f(E):"");var N=c[Ci]&&c[Ci][D];if(!N)return this;!It.touchNative&&It.pointer&&h.indexOf("touch")===0?Bd(c,h,N):It.touch&&h==="dblclick"?tr(c,N):"removeEventListener"in c?c.removeEventListener(nr[h]||h,N,!1):c.detachEvent("on"+h,N),c[Ci][D]=null}function Ai(c){return c.stopPropagation?c.stopPropagation():c.originalEvent?c.originalEvent._stopped=!0:c.cancelBubble=!0,this}function Hi(c){return Ei(c,"wheel",Ai),this}function ir(c){return qt(c,"mousedown touchstart dblclick contextmenu",Ai),c._leaflet_disable_click=!0,this}function an(c){return c.preventDefault?c.preventDefault():c.returnValue=!1,this}function Ea(c){return an(c),Ai(c),this}function $s(c){if(c.composedPath)return c.composedPath();for(var h=[],b=c.target;b;)h.push(b),b=b.parentNode;return h}function Gs(c,h){if(!h)return new q(c.clientX,c.clientY);var b=Us(h),E=b.boundingClientRect;return new q((c.clientX-E.left)/b.x-h.clientLeft,(c.clientY-E.top)/b.y-h.clientTop)}var Hd=It.linux&&It.chrome?window.devicePixelRatio:It.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function In(c){return It.edge?c.wheelDeltaY/2:c.deltaY&&c.deltaMode===0?-c.deltaY/Hd:c.deltaY&&c.deltaMode===1?-c.deltaY*20:c.deltaY&&c.deltaMode===2?-c.deltaY*60:c.deltaX||c.deltaZ?0:c.wheelDelta?(c.wheelDeltaY||c.wheelDelta)/2:c.detail&&Math.abs(c.detail)<32765?-c.detail*20:c.detail?c.detail/-32765*60:0}function la(c,h){var b=h.relatedTarget;if(!b)return!0;try{for(;b&&b!==c;)b=b.parentNode}catch{return!1}return b!==c}var qo={__proto__:null,on:qt,off:Me,stopPropagation:Ai,disableScrollPropagation:Hi,disableClickPropagation:ir,preventDefault:an,stop:Ea,getPropagationPath:$s,getMousePosition:Gs,getWheelDelta:In,isExternalTarget:la,addListener:qt,removeListener:Me},Fr=$.extend({run:function(c,h,b,E){this.stop(),this._el=c,this._inProgress=!0,this._duration=b||.25,this._easeOutPower=1/Math.max(E||.5,.2),this._startPos=Ca(c),this._offset=h.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=X(this._animate,this),this._step()},_step:function(c){var h=+new Date-this._startTime,b=this._duration*1e3;h<b?this._runFrame(this._easeOut(h/b),c):(this._runFrame(1),this._complete())},_runFrame:function(c,h){var b=this._startPos.add(this._offset.multiplyBy(c));h&&b._round(),He(this._el,b),this.fire("step")},_complete:function(){R(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(c){return 1-Math.pow(1-c,this._easeOutPower)}}),de=$.extend({options:{crs:ye,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(c,h){h=C(this,h),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(c),this._initLayout(),this._onResize=l(this._onResize,this),this._initEvents(),h.maxBounds&&this.setMaxBounds(h.maxBounds),h.zoom!==void 0&&(this._zoom=this._limitZoom(h.zoom)),h.center&&h.zoom!==void 0&&this.setView(yt(h.center),h.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=Bs&&It.any3d&&!It.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),qt(this._proxy,mc,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(c,h,b){if(h=h===void 0?this._zoom:this._limitZoom(h),c=this._limitCenter(yt(c),h,this.options.maxBounds),b=b||{},this._stop(),this._loaded&&!b.reset&&b!==!0){b.animate!==void 0&&(b.zoom=a({animate:b.animate},b.zoom),b.pan=a({animate:b.animate,duration:b.duration},b.pan));var E=this._zoom!==h?this._tryAnimatedZoom&&this._tryAnimatedZoom(c,h,b.zoom):this._tryAnimatedPan(c,b.pan);if(E)return clearTimeout(this._sizeTimer),this}return this._resetView(c,h,b.pan&&b.pan.noMoveStart),this},setZoom:function(c,h){return this._loaded?this.setView(this.getCenter(),c,{zoom:h}):(this._zoom=c,this)},zoomIn:function(c,h){return c=c||(It.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+c,h)},zoomOut:function(c,h){return c=c||(It.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-c,h)},setZoomAround:function(c,h,b){var E=this.getZoomScale(h),D=this.getSize().divideBy(2),N=c instanceof q?c:this.latLngToContainerPoint(c),G=N.subtract(D).multiplyBy(1-1/E),tt=this.containerPointToLatLng(D.add(G));return this.setView(tt,h,{zoom:b})},_getBoundsCenterZoom:function(c,h){h=h||{},c=c.getBounds?c.getBounds():mt(c);var b=ot(h.paddingTopLeft||h.padding||[0,0]),E=ot(h.paddingBottomRight||h.padding||[0,0]),D=this.getBoundsZoom(c,!1,b.add(E));if(D=typeof h.maxZoom=="number"?Math.min(h.maxZoom,D):D,D===1/0)return{center:c.getCenter(),zoom:D};var N=E.subtract(b).divideBy(2),G=this.project(c.getSouthWest(),D),tt=this.project(c.getNorthEast(),D),lt=this.unproject(G.add(tt).divideBy(2).add(N),D);return{center:lt,zoom:D}},fitBounds:function(c,h){if(c=mt(c),!c.isValid())throw new Error("Bounds are not valid.");var b=this._getBoundsCenterZoom(c,h);return this.setView(b.center,b.zoom,h)},fitWorld:function(c){return this.fitBounds([[-90,-180],[90,180]],c)},panTo:function(c,h){return this.setView(c,this._zoom,{pan:h})},panBy:function(c,h){if(c=ot(c).round(),h=h||{},!c.x&&!c.y)return this.fire("moveend");if(h.animate!==!0&&!this.getSize().contains(c))return this._resetView(this.unproject(this.project(this.getCenter()).add(c)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new Fr,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),h.noMoveStart||this.fire("movestart"),h.animate!==!1){Kt(this._mapPane,"leaflet-pan-anim");var b=this._getMapPanePos().subtract(c).round();this._panAnim.run(this._mapPane,b,h.duration||.25,h.easeLinearity)}else this._rawPanBy(c),this.fire("move").fire("moveend");return this},flyTo:function(c,h,b){if(b=b||{},b.animate===!1||!It.any3d)return this.setView(c,h,b);this._stop();var E=this.project(this.getCenter()),D=this.project(c),N=this.getSize(),G=this._zoom;c=yt(c),h=h===void 0?G:h;var tt=Math.max(N.x,N.y),lt=tt*this.getZoomScale(G,h),_t=D.distanceTo(E)||1,kt=1.42,Ft=kt*kt;function ee(en){var fa=en?-1:1,or=en?lt:tt,Nc=lt*lt-tt*tt+fa*Ft*Ft*_t*_t,oo=2*or*Ft*_t,lo=Nc/oo,Ra=Math.sqrt(lo*lo+1)-lo,ha=Ra<1e-9?-18:Math.log(Ra);return ha}function Dn(en){return(Math.exp(en)-Math.exp(-en))/2}function rn(en){return(Math.exp(en)+Math.exp(-en))/2}function ii(en){return Dn(en)/rn(en)}var xe=ee(0);function _e(en){return tt*(rn(xe)/rn(xe+kt*en))}function oe(en){return tt*(rn(xe)*ii(xe+kt*en)-Dn(xe))/Ft}function La(en){return 1-Math.pow(1-en,1.5)}var hi=Date.now(),ll=(ee(1)-xe)/kt,za=b.duration?1e3*b.duration:1e3*ll*.8;function Pc(){var en=(Date.now()-hi)/za,fa=La(en)*ll;en<=1?(this._flyToFrame=X(Pc,this),this._move(this.unproject(E.add(D.subtract(E).multiplyBy(oe(fa)/_t)),G),this.getScaleZoom(tt/_e(fa),G),{flyTo:!0})):this._move(c,h)._moveEnd(!0)}return this._moveStart(!0,b.noMoveStart),Pc.call(this),this},flyToBounds:function(c,h){var b=this._getBoundsCenterZoom(c,h);return this.flyTo(b.center,b.zoom,h)},setMaxBounds:function(c){return c=mt(c),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),c.isValid()?(this.options.maxBounds=c,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(c){var h=this.options.minZoom;return this.options.minZoom=c,this._loaded&&h!==c&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(c):this},setMaxZoom:function(c){var h=this.options.maxZoom;return this.options.maxZoom=c,this._loaded&&h!==c&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(c):this},panInsideBounds:function(c,h){this._enforcingBounds=!0;var b=this.getCenter(),E=this._limitCenter(b,this._zoom,mt(c));return b.equals(E)||this.panTo(E,h),this._enforcingBounds=!1,this},panInside:function(c,h){h=h||{};var b=ot(h.paddingTopLeft||h.padding||[0,0]),E=ot(h.paddingBottomRight||h.padding||[0,0]),D=this.project(this.getCenter()),N=this.project(c),G=this.getPixelBounds(),tt=K([G.min.add(b),G.max.subtract(E)]),lt=tt.getSize();if(!tt.contains(N)){this._enforcingBounds=!0;var _t=N.subtract(tt.getCenter()),kt=tt.extend(N).getSize().subtract(lt);D.x+=_t.x<0?-kt.x:kt.x,D.y+=_t.y<0?-kt.y:kt.y,this.panTo(this.unproject(D),h),this._enforcingBounds=!1}return this},invalidateSize:function(c){if(!this._loaded)return this;c=a({animate:!1,pan:!0},c===!0?{animate:!0}:c);var h=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var b=this.getSize(),E=h.divideBy(2).round(),D=b.divideBy(2).round(),N=E.subtract(D);return!N.x&&!N.y?this:(c.animate&&c.pan?this.panBy(N):(c.pan&&this._rawPanBy(N),this.fire("move"),c.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(l(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:h,newSize:b}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(c){if(c=this._locateOptions=a({timeout:1e4,watch:!1},c),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var h=l(this._handleGeolocationResponse,this),b=l(this._handleGeolocationError,this);return c.watch?this._locationWatchId=navigator.geolocation.watchPosition(h,b,c):navigator.geolocation.getCurrentPosition(h,b,c),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(c){if(this._container._leaflet_id){var h=c.code,b=c.message||(h===1?"permission denied":h===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:h,message:"Geolocation error: "+b+"."})}},_handleGeolocationResponse:function(c){if(this._container._leaflet_id){var h=c.coords.latitude,b=c.coords.longitude,E=new pt(h,b),D=E.toBounds(c.coords.accuracy*2),N=this._locateOptions;if(N.setView){var G=this.getBoundsZoom(D);this.setView(E,N.maxZoom?Math.min(G,N.maxZoom):G)}var tt={latlng:E,bounds:D,timestamp:c.timestamp};for(var lt in c.coords)typeof c.coords[lt]=="number"&&(tt[lt]=c.coords[lt]);this.fire("locationfound",tt)}},addHandler:function(c,h){if(!h)return this;var b=this[c]=new h(this);return this._handlers.push(b),this.options[c]&&b.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),Ne(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(R(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var c;for(c in this._layers)this._layers[c].remove();for(c in this._panes)Ne(this._panes[c]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(c,h){var b="leaflet-pane"+(c?" leaflet-"+c.replace("Pane","")+"-pane":""),E=se("div",b,h||this._mapPane);return c&&(this._panes[c]=E),E},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var c=this.getPixelBounds(),h=this.unproject(c.getBottomLeft()),b=this.unproject(c.getTopRight());return new at(h,b)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(c,h,b){c=mt(c),b=ot(b||[0,0]);var E=this.getZoom()||0,D=this.getMinZoom(),N=this.getMaxZoom(),G=c.getNorthWest(),tt=c.getSouthEast(),lt=this.getSize().subtract(b),_t=K(this.project(tt,E),this.project(G,E)).getSize(),kt=It.any3d?this.options.zoomSnap:1,Ft=lt.x/_t.x,ee=lt.y/_t.y,Dn=h?Math.max(Ft,ee):Math.min(Ft,ee);return E=this.getScaleZoom(Dn,E),kt&&(E=Math.round(E/(kt/100))*(kt/100),E=h?Math.ceil(E/kt)*kt:Math.floor(E/kt)*kt),Math.max(D,Math.min(N,E))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new q(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(c,h){var b=this._getTopLeftPoint(c,h);return new F(b,b.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(c){return this.options.crs.getProjectedBounds(c===void 0?this.getZoom():c)},getPane:function(c){return typeof c=="string"?this._panes[c]:c},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(c,h){var b=this.options.crs;return h=h===void 0?this._zoom:h,b.scale(c)/b.scale(h)},getScaleZoom:function(c,h){var b=this.options.crs;h=h===void 0?this._zoom:h;var E=b.zoom(c*b.scale(h));return isNaN(E)?1/0:E},project:function(c,h){return h=h===void 0?this._zoom:h,this.options.crs.latLngToPoint(yt(c),h)},unproject:function(c,h){return h=h===void 0?this._zoom:h,this.options.crs.pointToLatLng(ot(c),h)},layerPointToLatLng:function(c){var h=ot(c).add(this.getPixelOrigin());return this.unproject(h)},latLngToLayerPoint:function(c){var h=this.project(yt(c))._round();return h._subtract(this.getPixelOrigin())},wrapLatLng:function(c){return this.options.crs.wrapLatLng(yt(c))},wrapLatLngBounds:function(c){return this.options.crs.wrapLatLngBounds(mt(c))},distance:function(c,h){return this.options.crs.distance(yt(c),yt(h))},containerPointToLayerPoint:function(c){return ot(c).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(c){return ot(c).add(this._getMapPanePos())},containerPointToLatLng:function(c){var h=this.containerPointToLayerPoint(ot(c));return this.layerPointToLatLng(h)},latLngToContainerPoint:function(c){return this.layerPointToContainerPoint(this.latLngToLayerPoint(yt(c)))},mouseEventToContainerPoint:function(c){return Gs(c,this._container)},mouseEventToLayerPoint:function(c){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(c))},mouseEventToLatLng:function(c){return this.layerPointToLatLng(this.mouseEventToLayerPoint(c))},_initContainer:function(c){var h=this._container=gc(c);if(h){if(h._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");qt(h,"scroll",this._onScroll,this),this._containerId=f(h)},_initLayout:function(){var c=this._container;this._fadeAnimated=this.options.fadeAnimation&&It.any3d,Kt(c,"leaflet-container"+(It.touch?" leaflet-touch":"")+(It.retina?" leaflet-retina":"")+(It.ielt9?" leaflet-oldie":"")+(It.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var h=Is(c,"position");h!=="absolute"&&h!=="relative"&&h!=="fixed"&&h!=="sticky"&&(c.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var c=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),He(this._mapPane,new q(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Kt(c.markerPane,"leaflet-zoom-hide"),Kt(c.shadowPane,"leaflet-zoom-hide"))},_resetView:function(c,h,b){He(this._mapPane,new q(0,0));var E=!this._loaded;this._loaded=!0,h=this._limitZoom(h),this.fire("viewprereset");var D=this._zoom!==h;this._moveStart(D,b)._move(c,h)._moveEnd(D),this.fire("viewreset"),E&&this.fire("load")},_moveStart:function(c,h){return c&&this.fire("zoomstart"),h||this.fire("movestart"),this},_move:function(c,h,b,E){h===void 0&&(h=this._zoom);var D=this._zoom!==h;return this._zoom=h,this._lastCenter=c,this._pixelOrigin=this._getNewPixelOrigin(c),E?b&&b.pinch&&this.fire("zoom",b):((D||b&&b.pinch)&&this.fire("zoom",b),this.fire("move",b)),this},_moveEnd:function(c){return c&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return R(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(c){He(this._mapPane,this._getMapPanePos().subtract(c))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(c){this._targets={},this._targets[f(this._container)]=this;var h=c?Me:qt;h(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&h(window,"resize",this._onResize,this),It.any3d&&this.options.transform3DLimit&&(c?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){R(this._resizeRequest),this._resizeRequest=X(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var c=this._getMapPanePos();Math.max(Math.abs(c.x),Math.abs(c.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(c,h){for(var b=[],E,D=h==="mouseout"||h==="mouseover",N=c.target||c.srcElement,G=!1;N;){if(E=this._targets[f(N)],E&&(h==="click"||h==="preclick")&&this._draggableMoved(E)){G=!0;break}if(E&&E.listens(h,!0)&&(D&&!la(N,c)||(b.push(E),D))||N===this._container)break;N=N.parentNode}return!b.length&&!G&&!D&&this.listens(h,!0)&&(b=[this]),b},_isClickDisabled:function(c){for(;c&&c!==this._container;){if(c._leaflet_disable_click)return!0;c=c.parentNode}},_handleDOMEvent:function(c){var h=c.target||c.srcElement;if(!(!this._loaded||h._leaflet_disable_events||c.type==="click"&&this._isClickDisabled(h))){var b=c.type;b==="mousedown"&&Br(h),this._fireDOMEvent(c,b)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(c,h,b){if(c.type==="click"){var E=a({},c);E.type="preclick",this._fireDOMEvent(E,E.type,b)}var D=this._findEventTargets(c,h);if(b){for(var N=[],G=0;G<b.length;G++)b[G].listens(h,!0)&&N.push(b[G]);D=N.concat(D)}if(D.length){h==="contextmenu"&&an(c);var tt=D[0],lt={originalEvent:c};if(c.type!=="keypress"&&c.type!=="keydown"&&c.type!=="keyup"){var _t=tt.getLatLng&&(!tt._radius||tt._radius<=10);lt.containerPoint=_t?this.latLngToContainerPoint(tt.getLatLng()):this.mouseEventToContainerPoint(c),lt.layerPoint=this.containerPointToLayerPoint(lt.containerPoint),lt.latlng=_t?tt.getLatLng():this.layerPointToLatLng(lt.layerPoint)}for(G=0;G<D.length;G++)if(D[G].fire(h,lt,!0),lt.originalEvent._stopped||D[G].options.bubblingMouseEvents===!1&&P(this._mouseEvents,h)!==-1)return}},_draggableMoved:function(c){return c=c.dragging&&c.dragging.enabled()?c:this,c.dragging&&c.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var c=0,h=this._handlers.length;c<h;c++)this._handlers[c].disable()},whenReady:function(c,h){return this._loaded?c.call(h||this,{target:this}):this.on("load",c,h),this},_getMapPanePos:function(){return Ca(this._mapPane)||new q(0,0)},_moved:function(){var c=this._getMapPanePos();return c&&!c.equals([0,0])},_getTopLeftPoint:function(c,h){var b=c&&h!==void 0?this._getNewPixelOrigin(c,h):this.getPixelOrigin();return b.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(c,h){var b=this.getSize()._divideBy(2);return this.project(c,h)._subtract(b)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(c,h,b){var E=this._getNewPixelOrigin(b,h);return this.project(c,h)._subtract(E)},_latLngBoundsToNewLayerBounds:function(c,h,b){var E=this._getNewPixelOrigin(b,h);return K([this.project(c.getSouthWest(),h)._subtract(E),this.project(c.getNorthWest(),h)._subtract(E),this.project(c.getSouthEast(),h)._subtract(E),this.project(c.getNorthEast(),h)._subtract(E)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(c){return this.latLngToLayerPoint(c).subtract(this._getCenterLayerPoint())},_limitCenter:function(c,h,b){if(!b)return c;var E=this.project(c,h),D=this.getSize().divideBy(2),N=new F(E.subtract(D),E.add(D)),G=this._getBoundsOffset(N,b,h);return Math.abs(G.x)<=1&&Math.abs(G.y)<=1?c:this.unproject(E.add(G),h)},_limitOffset:function(c,h){if(!h)return c;var b=this.getPixelBounds(),E=new F(b.min.add(c),b.max.add(c));return c.add(this._getBoundsOffset(E,h))},_getBoundsOffset:function(c,h,b){var E=K(this.project(h.getNorthEast(),b),this.project(h.getSouthWest(),b)),D=E.min.subtract(c.min),N=E.max.subtract(c.max),G=this._rebound(D.x,-N.x),tt=this._rebound(D.y,-N.y);return new q(G,tt)},_rebound:function(c,h){return c+h>0?Math.round(c-h)/2:Math.max(0,Math.ceil(c))-Math.max(0,Math.floor(h))},_limitZoom:function(c){var h=this.getMinZoom(),b=this.getMaxZoom(),E=It.any3d?this.options.zoomSnap:1;return E&&(c=Math.round(c/E)*E),Math.max(h,Math.min(b,c))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Ye(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(c,h){var b=this._getCenterOffset(c)._trunc();return(h&&h.animate)!==!0&&!this.getSize().contains(b)?!1:(this.panBy(b,h),!0)},_createAnimProxy:function(){var c=this._proxy=se("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(c),this.on("zoomanim",function(h){var b=wa,E=this._proxy.style[b];oa(this._proxy,this.project(h.center,h.zoom),this.getZoomScale(h.zoom,1)),E===this._proxy.style[b]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){Ne(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var c=this.getCenter(),h=this.getZoom();oa(this._proxy,this.project(c,h),this.getZoomScale(h,1))},_catchTransitionEnd:function(c){this._animatingZoom&&c.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(c,h,b){if(this._animatingZoom)return!0;if(b=b||{},!this._zoomAnimated||b.animate===!1||this._nothingToAnimate()||Math.abs(h-this._zoom)>this.options.zoomAnimationThreshold)return!1;var E=this.getZoomScale(h),D=this._getCenterOffset(c)._divideBy(1-1/E);return b.animate!==!0&&!this.getSize().contains(D)?!1:(X(function(){this._moveStart(!0,b.noMoveStart||!1)._animateZoom(c,h,!0)},this),!0)},_animateZoom:function(c,h,b,E){this._mapPane&&(b&&(this._animatingZoom=!0,this._animateToCenter=c,this._animateToZoom=h,Kt(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:c,zoom:h,noUpdate:E}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(l(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Ye(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function Sc(c,h){return new de(c,h)}var ni=it.extend({options:{position:"topright"},initialize:function(c){C(this,c)},getPosition:function(){return this.options.position},setPosition:function(c){var h=this._map;return h&&h.removeControl(this),this.options.position=c,h&&h.addControl(this),this},getContainer:function(){return this._container},addTo:function(c){this.remove(),this._map=c;var h=this._container=this.onAdd(c),b=this.getPosition(),E=c._controlCorners[b];return Kt(h,"leaflet-control"),b.indexOf("bottom")!==-1?E.insertBefore(h,E.firstChild):E.appendChild(h),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(Ne(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(c){this._map&&c&&c.screenX>0&&c.screenY>0&&this._map.getContainer().focus()}}),ca=function(c){return new ni(c)};de.include({addControl:function(c){return c.addTo(this),this},removeControl:function(c){return c.remove(),this},_initControlPos:function(){var c=this._controlCorners={},h="leaflet-",b=this._controlContainer=se("div",h+"control-container",this._container);function E(D,N){var G=h+D+" "+h+N;c[D+N]=se("div",G,b)}E("top","left"),E("top","right"),E("bottom","left"),E("bottom","right")},_clearControlPos:function(){for(var c in this._controlCorners)Ne(this._controlCorners[c]);Ne(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Ws=ni.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(c,h,b,E){return b<E?-1:E<b?1:0}},initialize:function(c,h,b){C(this,b),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(var E in c)this._addLayer(c[E],E);for(E in h)this._addLayer(h[E],E,!0)},onAdd:function(c){this._initLayout(),this._update(),this._map=c,c.on("zoomend",this._checkDisabledLayers,this);for(var h=0;h<this._layers.length;h++)this._layers[h].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(c){return ni.prototype.addTo.call(this,c),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var c=0;c<this._layers.length;c++)this._layers[c].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(c,h){return this._addLayer(c,h),this._map?this._update():this},addOverlay:function(c,h){return this._addLayer(c,h,!0),this._map?this._update():this},removeLayer:function(c){c.off("add remove",this._onLayerChange,this);var h=this._getLayer(f(c));return h&&this._layers.splice(this._layers.indexOf(h),1),this._map?this._update():this},expand:function(){Kt(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var c=this._map.getSize().y-(this._container.offsetTop+50);return c<this._section.clientHeight?(Kt(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=c+"px"):Ye(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return Ye(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var c="leaflet-control-layers",h=this._container=se("div",c),b=this.options.collapsed;h.setAttribute("aria-haspopup",!0),ir(h),Hi(h);var E=this._section=se("section",c+"-list");b&&(this._map.on("click",this.collapse,this),qt(h,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var D=this._layersLink=se("a",c+"-toggle",h);D.href="#",D.title="Layers",D.setAttribute("role","button"),qt(D,{keydown:function(N){N.keyCode===13&&this._expandSafely()},click:function(N){an(N),this._expandSafely()}},this),b||this.expand(),this._baseLayersList=se("div",c+"-base",E),this._separator=se("div",c+"-separator",E),this._overlaysList=se("div",c+"-overlays",E),h.appendChild(E)},_getLayer:function(c){for(var h=0;h<this._layers.length;h++)if(this._layers[h]&&f(this._layers[h].layer)===c)return this._layers[h]},_addLayer:function(c,h,b){this._map&&c.on("add remove",this._onLayerChange,this),this._layers.push({layer:c,name:h,overlay:b}),this.options.sortLayers&&this._layers.sort(l(function(E,D){return this.options.sortFunction(E.layer,D.layer,E.name,D.name)},this)),this.options.autoZIndex&&c.setZIndex&&(this._lastZIndex++,c.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;li(this._baseLayersList),li(this._overlaysList),this._layerControlInputs=[];var c,h,b,E,D=0;for(b=0;b<this._layers.length;b++)E=this._layers[b],this._addItem(E),h=h||E.overlay,c=c||!E.overlay,D+=E.overlay?0:1;return this.options.hideSingleBase&&(c=c&&D>1,this._baseLayersList.style.display=c?"":"none"),this._separator.style.display=h&&c?"":"none",this},_onLayerChange:function(c){this._handlingClick||this._update();var h=this._getLayer(f(c.target)),b=h.overlay?c.type==="add"?"overlayadd":"overlayremove":c.type==="add"?"baselayerchange":null;b&&this._map.fire(b,h)},_createRadioElement:function(c,h){var b='<input type="radio" class="leaflet-control-layers-selector" name="'+c+'"'+(h?' checked="checked"':"")+"/>",E=document.createElement("div");return E.innerHTML=b,E.firstChild},_addItem:function(c){var h=document.createElement("label"),b=this._map.hasLayer(c.layer),E;c.overlay?(E=document.createElement("input"),E.type="checkbox",E.className="leaflet-control-layers-selector",E.defaultChecked=b):E=this._createRadioElement("leaflet-base-layers_"+f(this),b),this._layerControlInputs.push(E),E.layerId=f(c.layer),qt(E,"click",this._onInputClick,this);var D=document.createElement("span");D.innerHTML=" "+c.name;var N=document.createElement("span");h.appendChild(N),N.appendChild(E),N.appendChild(D);var G=c.overlay?this._overlaysList:this._baseLayersList;return G.appendChild(h),this._checkDisabledLayers(),h},_onInputClick:function(){if(!this._preventClick){var c=this._layerControlInputs,h,b,E=[],D=[];this._handlingClick=!0;for(var N=c.length-1;N>=0;N--)h=c[N],b=this._getLayer(h.layerId).layer,h.checked?E.push(b):h.checked||D.push(b);for(N=0;N<D.length;N++)this._map.hasLayer(D[N])&&this._map.removeLayer(D[N]);for(N=0;N<E.length;N++)this._map.hasLayer(E[N])||this._map.addLayer(E[N]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var c=this._layerControlInputs,h,b,E=this._map.getZoom(),D=c.length-1;D>=0;D--)h=c[D],b=this._getLayer(h.layerId).layer,h.disabled=b.options.minZoom!==void 0&&E<b.options.minZoom||b.options.maxZoom!==void 0&&E>b.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var c=this._section;this._preventClick=!0,qt(c,"click",an),this.expand();var h=this;setTimeout(function(){Me(c,"click",an),h._preventClick=!1})}}),Ud=function(c,h,b){return new Ws(c,h,b)},wc=ni.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">−</span>',zoomOutTitle:"Zoom out"},onAdd:function(c){var h="leaflet-control-zoom",b=se("div",h+" leaflet-bar"),E=this.options;return this._zoomInButton=this._createButton(E.zoomInText,E.zoomInTitle,h+"-in",b,this._zoomIn),this._zoomOutButton=this._createButton(E.zoomOutText,E.zoomOutTitle,h+"-out",b,this._zoomOut),this._updateDisabled(),c.on("zoomend zoomlevelschange",this._updateDisabled,this),b},onRemove:function(c){c.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(c){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(c.shiftKey?3:1))},_zoomOut:function(c){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(c.shiftKey?3:1))},_createButton:function(c,h,b,E,D){var N=se("a",b,E);return N.innerHTML=c,N.href="#",N.title=h,N.setAttribute("role","button"),N.setAttribute("aria-label",h),ir(N),qt(N,"click",Ea),qt(N,"click",D,this),qt(N,"click",this._refocusOnMap,this),N},_updateDisabled:function(){var c=this._map,h="leaflet-disabled";Ye(this._zoomInButton,h),Ye(this._zoomOutButton,h),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||c._zoom===c.getMinZoom())&&(Kt(this._zoomOutButton,h),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||c._zoom===c.getMaxZoom())&&(Kt(this._zoomInButton,h),this._zoomInButton.setAttribute("aria-disabled","true"))}});de.mergeOptions({zoomControl:!0}),de.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new wc,this.addControl(this.zoomControl))});var xm=function(c){return new wc(c)},Vd=ni.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(c){var h="leaflet-control-scale",b=se("div",h),E=this.options;return this._addScales(E,h+"-line",b),c.on(E.updateWhenIdle?"moveend":"move",this._update,this),c.whenReady(this._update,this),b},onRemove:function(c){c.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(c,h,b){c.metric&&(this._mScale=se("div",h,b)),c.imperial&&(this._iScale=se("div",h,b))},_update:function(){var c=this._map,h=c.getSize().y/2,b=c.distance(c.containerPointToLatLng([0,h]),c.containerPointToLatLng([this.options.maxWidth,h]));this._updateScales(b)},_updateScales:function(c){this.options.metric&&c&&this._updateMetric(c),this.options.imperial&&c&&this._updateImperial(c)},_updateMetric:function(c){var h=this._getRoundNum(c),b=h<1e3?h+" m":h/1e3+" km";this._updateScale(this._mScale,b,h/c)},_updateImperial:function(c){var h=c*3.2808399,b,E,D;h>5280?(b=h/5280,E=this._getRoundNum(b),this._updateScale(this._iScale,E+" mi",E/b)):(D=this._getRoundNum(h),this._updateScale(this._iScale,D+" ft",D/h))},_updateScale:function(c,h,b){c.style.width=Math.round(this.options.maxWidth*b)+"px",c.innerHTML=h},_getRoundNum:function(c){var h=Math.pow(10,(Math.floor(c)+"").length-1),b=c/h;return b=b>=10?10:b>=5?5:b>=3?3:b>=2?2:1,h*b}}),Cc=function(c){return new Vd(c)},_m='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>',Ec=ni.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(It.inlineSvg?_m+" ":"")+"Leaflet</a>"},initialize:function(c){C(this,c),this._attributions={}},onAdd:function(c){c.attributionControl=this,this._container=se("div","leaflet-control-attribution"),ir(this._container);for(var h in c._layers)c._layers[h].getAttribution&&this.addAttribution(c._layers[h].getAttribution());return this._update(),c.on("layeradd",this._addAttribution,this),this._container},onRemove:function(c){c.off("layeradd",this._addAttribution,this)},_addAttribution:function(c){c.layer.getAttribution&&(this.addAttribution(c.layer.getAttribution()),c.layer.once("remove",function(){this.removeAttribution(c.layer.getAttribution())},this))},setPrefix:function(c){return this.options.prefix=c,this._update(),this},addAttribution:function(c){return c?(this._attributions[c]||(this._attributions[c]=0),this._attributions[c]++,this._update(),this):this},removeAttribution:function(c){return c?(this._attributions[c]&&(this._attributions[c]--,this._update()),this):this},_update:function(){if(this._map){var c=[];for(var h in this._attributions)this._attributions[h]&&c.push(h);var b=[];this.options.prefix&&b.push(this.options.prefix),c.length&&b.push(c.join(", ")),this._container.innerHTML=b.join(' <span aria-hidden="true">|</span> ')}}});de.mergeOptions({attributionControl:!0}),de.addInitHook(function(){this.options.attributionControl&&new Ec().addTo(this)});var Sm=function(c){return new Ec(c)};ni.Layers=Ws,ni.Zoom=wc,ni.Scale=Vd,ni.Attribution=Ec,ca.layers=Ud,ca.zoom=xm,ca.scale=Cc,ca.attribution=Sm;var Ui=it.extend({initialize:function(c){this._map=c},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Ui.addTo=function(c,h){return c.addHandler(h,this),this};var wm={Events:I},Ac=It.touch?"touchstart mousedown":"mousedown",Aa=$.extend({options:{clickTolerance:3},initialize:function(c,h,b,E){C(this,E),this._element=c,this._dragStartTarget=h||c,this._preventOutline=b},enable:function(){this._enabled||(qt(this._dragStartTarget,Ac,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Aa._dragging===this&&this.finishDrag(!0),Me(this._dragStartTarget,Ac,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(c){if(this._enabled&&(this._moved=!1,!vc(this._element,"leaflet-zoom-anim"))){if(c.touches&&c.touches.length!==1){Aa._dragging===this&&this.finishDrag();return}if(!(Aa._dragging||c.shiftKey||c.which!==1&&c.button!==1&&!c.touches)&&(Aa._dragging=this,this._preventOutline&&Br(this._element),Go(),Nr(),!this._moving)){this.fire("down");var h=c.touches?c.touches[0]:c,b=Zo(this._element);this._startPoint=new q(h.clientX,h.clientY),this._startPos=Ca(this._element),this._parentScale=Us(b);var E=c.type==="mousedown";qt(document,E?"mousemove":"touchmove",this._onMove,this),qt(document,E?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(c){if(this._enabled){if(c.touches&&c.touches.length>1){this._moved=!0;return}var h=c.touches&&c.touches.length===1?c.touches[0]:c,b=new q(h.clientX,h.clientY)._subtract(this._startPoint);!b.x&&!b.y||Math.abs(b.x)+Math.abs(b.y)<this.options.clickTolerance||(b.x/=this._parentScale.x,b.y/=this._parentScale.y,an(c),this._moved||(this.fire("dragstart"),this._moved=!0,Kt(document.body,"leaflet-dragging"),this._lastTarget=c.target||c.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),Kt(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(b),this._moving=!0,this._lastEvent=c,this._updatePosition())}},_updatePosition:function(){var c={originalEvent:this._lastEvent};this.fire("predrag",c),He(this._element,this._newPos),this.fire("drag",c)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(c){Ye(document.body,"leaflet-dragging"),this._lastTarget&&(Ye(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Me(document,"mousemove touchmove",this._onMove,this),Me(document,"mouseup touchend touchcancel",this._onUp,this),Hs(),Fi();var h=this._moved&&this._moving;this._moving=!1,Aa._dragging=!1,h&&this.fire("dragend",{noInertia:c,distance:this._newPos.distanceTo(this._startPos)})}});function $d(c,h,b){var E,D=[1,4,2,8],N,G,tt,lt,_t,kt,Ft,ee;for(N=0,kt=c.length;N<kt;N++)c[N]._code=ar(c[N],h);for(tt=0;tt<4;tt++){for(Ft=D[tt],E=[],N=0,kt=c.length,G=kt-1;N<kt;G=N++)lt=c[N],_t=c[G],lt._code&Ft?_t._code&Ft||(ee=Yo(_t,lt,Ft,h,b),ee._code=ar(ee,h),E.push(ee)):(_t._code&Ft&&(ee=Yo(_t,lt,Ft,h,b),ee._code=ar(ee,h),E.push(ee)),E.push(lt));c=E}return c}function Gd(c,h){var b,E,D,N,G,tt,lt,_t,kt;if(!c||c.length===0)throw new Error("latlngs not passed");ui(c)||(console.warn("latlngs are not flat! Only the first ring will be used"),c=c[0]);var Ft=yt([0,0]),ee=mt(c),Dn=ee.getNorthWest().distanceTo(ee.getSouthWest())*ee.getNorthEast().distanceTo(ee.getNorthWest());Dn<1700&&(Ft=Tc(c));var rn=c.length,ii=[];for(b=0;b<rn;b++){var xe=yt(c[b]);ii.push(h.project(yt([xe.lat-Ft.lat,xe.lng-Ft.lng])))}for(tt=lt=_t=0,b=0,E=rn-1;b<rn;E=b++)D=ii[b],N=ii[E],G=D.y*N.x-N.y*D.x,lt+=(D.x+N.x)*G,_t+=(D.y+N.y)*G,tt+=G*3;tt===0?kt=ii[0]:kt=[lt/tt,_t/tt];var _e=h.unproject(ot(kt));return yt([_e.lat+Ft.lat,_e.lng+Ft.lng])}function Tc(c){for(var h=0,b=0,E=0,D=0;D<c.length;D++){var N=yt(c[D]);h+=N.lat,b+=N.lng,E++}return yt([h/E,b/E])}var Dc={__proto__:null,clipPolygon:$d,polygonCenter:Gd,centroid:Tc};function Wd(c,h){if(!h||!c.length)return c.slice();var b=h*h;return c=Em(c,b),c=qd(c,b),c}function Zd(c,h,b){return Math.sqrt(Zs(c,h,b,!0))}function Cm(c,h,b){return Zs(c,h,b)}function qd(c,h){var b=c.length,E=typeof Uint8Array<"u"?Uint8Array:Array,D=new E(b);D[0]=D[b-1]=1,Mc(c,D,h,0,b-1);var N,G=[];for(N=0;N<b;N++)D[N]&&G.push(c[N]);return G}function Mc(c,h,b,E,D){var N=0,G,tt,lt;for(tt=E+1;tt<=D-1;tt++)lt=Zs(c[tt],c[E],c[D],!0),lt>N&&(G=tt,N=lt);N>b&&(h[G]=1,Mc(c,h,b,E,G),Mc(c,h,b,G,D))}function Em(c,h){for(var b=[c[0]],E=1,D=0,N=c.length;E<N;E++)Am(c[E],c[D])>h&&(b.push(c[E]),D=E);return D<N-1&&b.push(c[N-1]),b}var Yd;function Xd(c,h,b,E,D){var N=E?Yd:ar(c,b),G=ar(h,b),tt,lt,_t;for(Yd=G;;){if(!(N|G))return[c,h];if(N&G)return!1;tt=N||G,lt=Yo(c,h,tt,b,D),_t=ar(lt,b),tt===N?(c=lt,N=_t):(h=lt,G=_t)}}function Yo(c,h,b,E,D){var N=h.x-c.x,G=h.y-c.y,tt=E.min,lt=E.max,_t,kt;return b&8?(_t=c.x+N*(lt.y-c.y)/G,kt=lt.y):b&4?(_t=c.x+N*(tt.y-c.y)/G,kt=tt.y):b&2?(_t=lt.x,kt=c.y+G*(lt.x-c.x)/N):b&1&&(_t=tt.x,kt=c.y+G*(tt.x-c.x)/N),new q(_t,kt,D)}function ar(c,h){var b=0;return c.x<h.min.x?b|=1:c.x>h.max.x&&(b|=2),c.y<h.min.y?b|=4:c.y>h.max.y&&(b|=8),b}function Am(c,h){var b=h.x-c.x,E=h.y-c.y;return b*b+E*E}function Zs(c,h,b,E){var D=h.x,N=h.y,G=b.x-D,tt=b.y-N,lt=G*G+tt*tt,_t;return lt>0&&(_t=((c.x-D)*G+(c.y-N)*tt)/lt,_t>1?(D=b.x,N=b.y):_t>0&&(D+=G*_t,N+=tt*_t)),G=c.x-D,tt=c.y-N,E?G*G+tt*tt:new q(D,N)}function ui(c){return!j(c[0])||typeof c[0][0]!="object"&&typeof c[0][0]<"u"}function Xo(c){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),ui(c)}function Hr(c,h){var b,E,D,N,G,tt,lt,_t;if(!c||c.length===0)throw new Error("latlngs not passed");ui(c)||(console.warn("latlngs are not flat! Only the first ring will be used"),c=c[0]);var kt=yt([0,0]),Ft=mt(c),ee=Ft.getNorthWest().distanceTo(Ft.getSouthWest())*Ft.getNorthEast().distanceTo(Ft.getNorthWest());ee<1700&&(kt=Tc(c));var Dn=c.length,rn=[];for(b=0;b<Dn;b++){var ii=yt(c[b]);rn.push(h.project(yt([ii.lat-kt.lat,ii.lng-kt.lng])))}for(b=0,E=0;b<Dn-1;b++)E+=rn[b].distanceTo(rn[b+1])/2;if(E===0)_t=rn[0];else for(b=0,N=0;b<Dn-1;b++)if(G=rn[b],tt=rn[b+1],D=G.distanceTo(tt),N+=D,N>E){lt=(N-E)/D,_t=[tt.x-lt*(tt.x-G.x),tt.y-lt*(tt.y-G.y)];break}var xe=h.unproject(ot(_t));return yt([xe.lat+kt.lat,xe.lng+kt.lng])}var Tm={__proto__:null,simplify:Wd,pointToSegmentDistance:Zd,closestPointOnSegment:Cm,clipSegment:Xd,_getEdgeIntersection:Yo,_getBitCode:ar,_sqClosestPointOnSegment:Zs,isFlat:ui,_flat:Xo,polylineCenter:Hr},Ko={project:function(c){return new q(c.lng,c.lat)},unproject:function(c){return new pt(c.y,c.x)},bounds:new F([-180,-90],[180,90])},Qo={R:6378137,R_MINOR:6356752314245179e-9,bounds:new F([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(c){var h=Math.PI/180,b=this.R,E=c.lat*h,D=this.R_MINOR/b,N=Math.sqrt(1-D*D),G=N*Math.sin(E),tt=Math.tan(Math.PI/4-E/2)/Math.pow((1-G)/(1+G),N/2);return E=-b*Math.log(Math.max(tt,1e-10)),new q(c.lng*h*b,E)},unproject:function(c){for(var h=180/Math.PI,b=this.R,E=this.R_MINOR/b,D=Math.sqrt(1-E*E),N=Math.exp(-c.y/b),G=Math.PI/2-2*Math.atan(N),tt=0,lt=.1,_t;tt<15&&Math.abs(lt)>1e-7;tt++)_t=D*Math.sin(G),_t=Math.pow((1-_t)/(1+_t),D/2),lt=Math.PI/2-2*Math.atan(N*_t)-G,G+=lt;return new pt(G*h,c.x*h/b)}},Kd={__proto__:null,LonLat:Ko,Mercator:Qo,SphericalMercator:Mt},Qd=a({},Ht,{code:"EPSG:3395",projection:Qo,transformation:(function(){var c=.5/(Math.PI*Qo.R);return Ut(c,.5,-c,.5)})()}),Oc=a({},Ht,{code:"EPSG:4326",projection:Ko,transformation:Ut(1/180,1,-1/180,.5)}),Ur=a({},ft,{projection:Ko,transformation:Ut(1,0,-1,0),scale:function(c){return Math.pow(2,c)},zoom:function(c){return Math.log(c)/Math.LN2},distance:function(c,h){var b=h.lng-c.lng,E=h.lat-c.lat;return Math.sqrt(b*b+E*E)},infinite:!0});ft.Earth=Ht,ft.EPSG3395=Qd,ft.EPSG3857=ye,ft.EPSG900913=ge,ft.EPSG4326=Oc,ft.Simple=Ur;var Ti=$.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(c){return c.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(c){return c&&c.removeLayer(this),this},getPane:function(c){return this._map.getPane(c?this.options[c]||c:this.options.pane)},addInteractiveTarget:function(c){return this._map._targets[f(c)]=this,this},removeInteractiveTarget:function(c){return delete this._map._targets[f(c)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(c){var h=c.target;if(h.hasLayer(this)){if(this._map=h,this._zoomAnimated=h._zoomAnimated,this.getEvents){var b=this.getEvents();h.on(b,this),this.once("remove",function(){h.off(b,this)},this)}this.onAdd(h),this.fire("add"),h.fire("layeradd",{layer:this})}}});de.include({addLayer:function(c){if(!c._layerAdd)throw new Error("The provided object is not a Layer.");var h=f(c);return this._layers[h]?this:(this._layers[h]=c,c._mapToAdd=this,c.beforeAdd&&c.beforeAdd(this),this.whenReady(c._layerAdd,c),this)},removeLayer:function(c){var h=f(c);return this._layers[h]?(this._loaded&&c.onRemove(this),delete this._layers[h],this._loaded&&(this.fire("layerremove",{layer:c}),c.fire("remove")),c._map=c._mapToAdd=null,this):this},hasLayer:function(c){return f(c)in this._layers},eachLayer:function(c,h){for(var b in this._layers)c.call(h,this._layers[b]);return this},_addLayers:function(c){c=c?j(c)?c:[c]:[];for(var h=0,b=c.length;h<b;h++)this.addLayer(c[h])},_addZoomLimit:function(c){(!isNaN(c.options.maxZoom)||!isNaN(c.options.minZoom))&&(this._zoomBoundLayers[f(c)]=c,this._updateZoomLevels())},_removeZoomLimit:function(c){var h=f(c);this._zoomBoundLayers[h]&&(delete this._zoomBoundLayers[h],this._updateZoomLevels())},_updateZoomLevels:function(){var c=1/0,h=-1/0,b=this._getZoomSpan();for(var E in this._zoomBoundLayers){var D=this._zoomBoundLayers[E].options;c=D.minZoom===void 0?c:Math.min(c,D.minZoom),h=D.maxZoom===void 0?h:Math.max(h,D.maxZoom)}this._layersMaxZoom=h===-1/0?void 0:h,this._layersMinZoom=c===1/0?void 0:c,b!==this._getZoomSpan()&&this.fire("zoomlevelschange"),this.options.maxZoom===void 0&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var Vr=Ti.extend({initialize:function(c,h){C(this,h),this._layers={};var b,E;if(c)for(b=0,E=c.length;b<E;b++)this.addLayer(c[b])},addLayer:function(c){var h=this.getLayerId(c);return this._layers[h]=c,this._map&&this._map.addLayer(c),this},removeLayer:function(c){var h=c in this._layers?c:this.getLayerId(c);return this._map&&this._layers[h]&&this._map.removeLayer(this._layers[h]),delete this._layers[h],this},hasLayer:function(c){var h=typeof c=="number"?c:this.getLayerId(c);return h in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(c){var h=Array.prototype.slice.call(arguments,1),b,E;for(b in this._layers)E=this._layers[b],E[c]&&E[c].apply(E,h);return this},onAdd:function(c){this.eachLayer(c.addLayer,c)},onRemove:function(c){this.eachLayer(c.removeLayer,c)},eachLayer:function(c,h){for(var b in this._layers)c.call(h,this._layers[b]);return this},getLayer:function(c){return this._layers[c]},getLayers:function(){var c=[];return this.eachLayer(c.push,c),c},setZIndex:function(c){return this.invoke("setZIndex",c)},getLayerId:function(c){return f(c)}}),Dm=function(c,h){return new Vr(c,h)},Vi=Vr.extend({addLayer:function(c){return this.hasLayer(c)?this:(c.addEventParent(this),Vr.prototype.addLayer.call(this,c),this.fire("layeradd",{layer:c}))},removeLayer:function(c){return this.hasLayer(c)?(c in this._layers&&(c=this._layers[c]),c.removeEventParent(this),Vr.prototype.removeLayer.call(this,c),this.fire("layerremove",{layer:c})):this},setStyle:function(c){return this.invoke("setStyle",c)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var c=new at;for(var h in this._layers){var b=this._layers[h];c.extend(b.getBounds?b.getBounds():b.getLatLng())}return c}}),Jd=function(c,h){return new Vi(c,h)},$i=it.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(c){C(this,c)},createIcon:function(c){return this._createIcon("icon",c)},createShadow:function(c){return this._createIcon("shadow",c)},_createIcon:function(c,h){var b=this._getIconUrl(c);if(!b){if(c==="icon")throw new Error("iconUrl not set in Icon options (see the docs).");return null}var E=this._createImg(b,h&&h.tagName==="IMG"?h:null);return this._setIconStyles(E,c),(this.options.crossOrigin||this.options.crossOrigin==="")&&(E.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),E},_setIconStyles:function(c,h){var b=this.options,E=b[h+"Size"];typeof E=="number"&&(E=[E,E]);var D=ot(E),N=ot(h==="shadow"&&b.shadowAnchor||b.iconAnchor||D&&D.divideBy(2,!0));c.className="leaflet-marker-"+h+" "+(b.className||""),N&&(c.style.marginLeft=-N.x+"px",c.style.marginTop=-N.y+"px"),D&&(c.style.width=D.x+"px",c.style.height=D.y+"px")},_createImg:function(c,h){return h=h||document.createElement("img"),h.src=c,h},_getIconUrl:function(c){return It.retina&&this.options[c+"RetinaUrl"]||this.options[c+"Url"]}});function qs(c){return new $i(c)}var Ys=$i.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(c){return typeof Ys.imagePath!="string"&&(Ys.imagePath=this._detectIconPath()),(this.options.imagePath||Ys.imagePath)+$i.prototype._getIconUrl.call(this,c)},_stripUrl:function(c){var h=function(b,E,D){var N=E.exec(b);return N&&N[D]};return c=h(c,/^url\((['"])?(.+)\1\)$/,2),c&&h(c,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var c=se("div","leaflet-default-icon-path",document.body),h=Is(c,"background-image")||Is(c,"backgroundImage");if(document.body.removeChild(c),h=this._stripUrl(h),h)return h;var b=document.querySelector('link[href$="leaflet.css"]');return b?b.href.substring(0,b.href.length-11-1):""}}),Xs=Ui.extend({initialize:function(c){this._marker=c},addHooks:function(){var c=this._marker._icon;this._draggable||(this._draggable=new Aa(c,c,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),Kt(c,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&Ye(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(c){var h=this._marker,b=h._map,E=this._marker.options.autoPanSpeed,D=this._marker.options.autoPanPadding,N=Ca(h._icon),G=b.getPixelBounds(),tt=b.getPixelOrigin(),lt=K(G.min._subtract(tt).add(D),G.max._subtract(tt).subtract(D));if(!lt.contains(N)){var _t=ot((Math.max(lt.max.x,N.x)-lt.max.x)/(G.max.x-lt.max.x)-(Math.min(lt.min.x,N.x)-lt.min.x)/(G.min.x-lt.min.x),(Math.max(lt.max.y,N.y)-lt.max.y)/(G.max.y-lt.max.y)-(Math.min(lt.min.y,N.y)-lt.min.y)/(G.min.y-lt.min.y)).multiplyBy(E);b.panBy(_t,{animate:!1}),this._draggable._newPos._add(_t),this._draggable._startPos._add(_t),He(h._icon,this._draggable._newPos),this._onDrag(c),this._panRequest=X(this._adjustPan.bind(this,c))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(c){this._marker.options.autoPan&&(R(this._panRequest),this._panRequest=X(this._adjustPan.bind(this,c)))},_onDrag:function(c){var h=this._marker,b=h._shadow,E=Ca(h._icon),D=h._map.layerPointToLatLng(E);b&&He(b,E),h._latlng=D,c.latlng=D,c.oldLatLng=this._oldLatLng,h.fire("move",c).fire("drag",c)},_onDragEnd:function(c){R(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",c)}}),Ks=Ti.extend({options:{icon:new Ys,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(c,h){C(this,h),this._latlng=yt(c)},onAdd:function(c){this._zoomAnimated=this._zoomAnimated&&c.options.markerZoomAnimation,this._zoomAnimated&&c.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(c){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&c.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(c){var h=this._latlng;return this._latlng=yt(c),this.update(),this.fire("move",{oldLatLng:h,latlng:this._latlng})},setZIndexOffset:function(c){return this.options.zIndexOffset=c,this.update()},getIcon:function(){return this.options.icon},setIcon:function(c){return this.options.icon=c,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var c=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(c)}return this},_initIcon:function(){var c=this.options,h="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),b=c.icon.createIcon(this._icon),E=!1;b!==this._icon&&(this._icon&&this._removeIcon(),E=!0,c.title&&(b.title=c.title),b.tagName==="IMG"&&(b.alt=c.alt||"")),Kt(b,h),c.keyboard&&(b.tabIndex="0",b.setAttribute("role","button")),this._icon=b,c.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&qt(b,"focus",this._panOnFocus,this);var D=c.icon.createShadow(this._shadow),N=!1;D!==this._shadow&&(this._removeShadow(),N=!0),D&&(Kt(D,h),D.alt=""),this._shadow=D,c.opacity<1&&this._updateOpacity(),E&&this.getPane().appendChild(this._icon),this._initInteraction(),D&&N&&this.getPane(c.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Me(this._icon,"focus",this._panOnFocus,this),Ne(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&Ne(this._shadow),this._shadow=null},_setPos:function(c){this._icon&&He(this._icon,c),this._shadow&&He(this._shadow,c),this._zIndex=c.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(c){this._icon&&(this._icon.style.zIndex=this._zIndex+c)},_animateZoom:function(c){var h=this._map._latLngToNewLayerPoint(this._latlng,c.zoom,c.center).round();this._setPos(h)},_initInteraction:function(){if(this.options.interactive&&(Kt(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Xs)){var c=this.options.draggable;this.dragging&&(c=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Xs(this),c&&this.dragging.enable()}},setOpacity:function(c){return this.options.opacity=c,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var c=this.options.opacity;this._icon&&Ge(this._icon,c),this._shadow&&Ge(this._shadow,c)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var c=this._map;if(c){var h=this.options.icon.options,b=h.iconSize?ot(h.iconSize):ot(0,0),E=h.iconAnchor?ot(h.iconAnchor):ot(0,0);c.panInside(this._latlng,{paddingTopLeft:E,paddingBottomRight:b.subtract(E)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function tf(c,h){return new Ks(c,h)}var Gi=Ti.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(c){this._renderer=c.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(c){return C(this,c),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&c&&Object.prototype.hasOwnProperty.call(c,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),$r=Gi.extend({options:{fill:!0,radius:10},initialize:function(c,h){C(this,h),this._latlng=yt(c),this._radius=this.options.radius},setLatLng:function(c){var h=this._latlng;return this._latlng=yt(c),this.redraw(),this.fire("move",{oldLatLng:h,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(c){return this.options.radius=this._radius=c,this.redraw()},getRadius:function(){return this._radius},setStyle:function(c){var h=c&&c.radius||this._radius;return Gi.prototype.setStyle.call(this,c),this.setRadius(h),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var c=this._radius,h=this._radiusY||c,b=this._clickTolerance(),E=[c+b,h+b];this._pxBounds=new F(this._point.subtract(E),this._point.add(E))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(c){return c.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function ef(c,h){return new $r(c,h)}var Jo=$r.extend({initialize:function(c,h,b){if(typeof h=="number"&&(h=a({},b,{radius:h})),C(this,h),this._latlng=yt(c),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(c){return this._mRadius=c,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var c=[this._radius,this._radiusY||this._radius];return new at(this._map.layerPointToLatLng(this._point.subtract(c)),this._map.layerPointToLatLng(this._point.add(c)))},setStyle:Gi.prototype.setStyle,_project:function(){var c=this._latlng.lng,h=this._latlng.lat,b=this._map,E=b.options.crs;if(E.distance===Ht.distance){var D=Math.PI/180,N=this._mRadius/Ht.R/D,G=b.project([h+N,c]),tt=b.project([h-N,c]),lt=G.add(tt).divideBy(2),_t=b.unproject(lt).lat,kt=Math.acos((Math.cos(N*D)-Math.sin(h*D)*Math.sin(_t*D))/(Math.cos(h*D)*Math.cos(_t*D)))/D;(isNaN(kt)||kt===0)&&(kt=N/Math.cos(Math.PI/180*h)),this._point=lt.subtract(b.getPixelOrigin()),this._radius=isNaN(kt)?0:lt.x-b.project([_t,c-kt]).x,this._radiusY=lt.y-G.y}else{var Ft=E.unproject(E.project(this._latlng).subtract([this._mRadius,0]));this._point=b.latLngToLayerPoint(this._latlng),this._radius=this._point.x-b.latLngToLayerPoint(Ft).x}this._updateBounds()}});function nf(c,h,b){return new Jo(c,h,b)}var ua=Gi.extend({options:{smoothFactor:1,noClip:!1},initialize:function(c,h){C(this,h),this._setLatLngs(c)},getLatLngs:function(){return this._latlngs},setLatLngs:function(c){return this._setLatLngs(c),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(c){for(var h=1/0,b=null,E=Zs,D,N,G=0,tt=this._parts.length;G<tt;G++)for(var lt=this._parts[G],_t=1,kt=lt.length;_t<kt;_t++){D=lt[_t-1],N=lt[_t];var Ft=E(c,D,N,!0);Ft<h&&(h=Ft,b=E(c,D,N))}return b&&(b.distance=Math.sqrt(h)),b},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return Hr(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(c,h){return h=h||this._defaultShape(),c=yt(c),h.push(c),this._bounds.extend(c),this.redraw()},_setLatLngs:function(c){this._bounds=new at,this._latlngs=this._convertLatLngs(c)},_defaultShape:function(){return ui(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(c){for(var h=[],b=ui(c),E=0,D=c.length;E<D;E++)b?(h[E]=yt(c[E]),this._bounds.extend(h[E])):h[E]=this._convertLatLngs(c[E]);return h},_project:function(){var c=new F;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,c),this._bounds.isValid()&&c.isValid()&&(this._rawPxBounds=c,this._updateBounds())},_updateBounds:function(){var c=this._clickTolerance(),h=new q(c,c);this._rawPxBounds&&(this._pxBounds=new F([this._rawPxBounds.min.subtract(h),this._rawPxBounds.max.add(h)]))},_projectLatlngs:function(c,h,b){var E=c[0]instanceof pt,D=c.length,N,G;if(E){for(G=[],N=0;N<D;N++)G[N]=this._map.latLngToLayerPoint(c[N]),b.extend(G[N]);h.push(G)}else for(N=0;N<D;N++)this._projectLatlngs(c[N],h,b)},_clipPoints:function(){var c=this._renderer._bounds;if(this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(c))){if(this.options.noClip){this._parts=this._rings;return}var h=this._parts,b,E,D,N,G,tt,lt;for(b=0,D=0,N=this._rings.length;b<N;b++)for(lt=this._rings[b],E=0,G=lt.length;E<G-1;E++)tt=Xd(lt[E],lt[E+1],c,E,!0),tt&&(h[D]=h[D]||[],h[D].push(tt[0]),(tt[1]!==lt[E+1]||E===G-2)&&(h[D].push(tt[1]),D++))}},_simplifyPoints:function(){for(var c=this._parts,h=this.options.smoothFactor,b=0,E=c.length;b<E;b++)c[b]=Wd(c[b],h)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(c,h){var b,E,D,N,G,tt,lt=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(c))return!1;for(b=0,N=this._parts.length;b<N;b++)for(tt=this._parts[b],E=0,G=tt.length,D=G-1;E<G;D=E++)if(!(!h&&E===0)&&Zd(c,tt[D],tt[E])<=lt)return!0;return!1}});function Mm(c,h){return new ua(c,h)}ua._flat=Xo;var Gr=ua.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return Gd(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(c){var h=ua.prototype._convertLatLngs.call(this,c),b=h.length;return b>=2&&h[0]instanceof pt&&h[0].equals(h[b-1])&&h.pop(),h},_setLatLngs:function(c){ua.prototype._setLatLngs.call(this,c),ui(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return ui(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var c=this._renderer._bounds,h=this.options.weight,b=new q(h,h);if(c=new F(c.min.subtract(b),c.max.add(b)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(c))){if(this.options.noClip){this._parts=this._rings;return}for(var E=0,D=this._rings.length,N;E<D;E++)N=$d(this._rings[E],c,!0),N.length&&this._parts.push(N)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(c){var h=!1,b,E,D,N,G,tt,lt,_t;if(!this._pxBounds||!this._pxBounds.contains(c))return!1;for(N=0,lt=this._parts.length;N<lt;N++)for(b=this._parts[N],G=0,_t=b.length,tt=_t-1;G<_t;tt=G++)E=b[G],D=b[tt],E.y>c.y!=D.y>c.y&&c.x<(D.x-E.x)*(c.y-E.y)/(D.y-E.y)+E.x&&(h=!h);return h||ua.prototype._containsPoint.call(this,c,!0)}});function Om(c,h){return new Gr(c,h)}var da=Vi.extend({initialize:function(c,h){C(this,h),this._layers={},c&&this.addData(c)},addData:function(c){var h=j(c)?c:c.features,b,E,D;if(h){for(b=0,E=h.length;b<E;b++)D=h[b],(D.geometries||D.geometry||D.features||D.coordinates)&&this.addData(D);return this}var N=this.options;if(N.filter&&!N.filter(c))return this;var G=zn(c,N);return G?(G.feature=nl(c),G.defaultOptions=G.options,this.resetStyle(G),N.onEachFeature&&N.onEachFeature(c,G),this.addLayer(G)):this},resetStyle:function(c){return c===void 0?this.eachLayer(this.resetStyle,this):(c.options=a({},c.defaultOptions),this._setLayerStyle(c,this.options.style),this)},setStyle:function(c){return this.eachLayer(function(h){this._setLayerStyle(h,c)},this)},_setLayerStyle:function(c,h){c.setStyle&&(typeof h=="function"&&(h=h(c.feature)),c.setStyle(h))}});function zn(c,h){var b=c.type==="Feature"?c.geometry:c,E=b?b.coordinates:null,D=[],N=h&&h.pointToLayer,G=h&&h.coordsToLatLng||tl,tt,lt,_t,kt;if(!E&&!b)return null;switch(b.type){case"Point":return tt=G(E),Wr(N,c,tt,h);case"MultiPoint":for(_t=0,kt=E.length;_t<kt;_t++)tt=G(E[_t]),D.push(Wr(N,c,tt,h));return new Vi(D);case"LineString":case"MultiLineString":return lt=Qs(E,b.type==="LineString"?0:1,G),new ua(lt,h);case"Polygon":case"MultiPolygon":return lt=Qs(E,b.type==="Polygon"?1:2,G),new Gr(lt,h);case"GeometryCollection":for(_t=0,kt=b.geometries.length;_t<kt;_t++){var Ft=zn({geometry:b.geometries[_t],type:"Feature",properties:c.properties},h);Ft&&D.push(Ft)}return new Vi(D);case"FeatureCollection":for(_t=0,kt=b.features.length;_t<kt;_t++){var ee=zn(b.features[_t],h);ee&&D.push(ee)}return new Vi(D);default:throw new Error("Invalid GeoJSON object.")}}function Wr(c,h,b,E){return c?c(h,b):new Ks(b,E&&E.markersInheritOptions&&E)}function tl(c){return new pt(c[1],c[0],c[2])}function Qs(c,h,b){for(var E=[],D=0,N=c.length,G;D<N;D++)G=h?Qs(c[D],h-1,b):(b||tl)(c[D]),E.push(G);return E}function el(c,h){return c=yt(c),c.alt!==void 0?[y(c.lng,h),y(c.lat,h),y(c.alt,h)]:[y(c.lng,h),y(c.lat,h)]}function Js(c,h,b,E){for(var D=[],N=0,G=c.length;N<G;N++)D.push(h?Js(c[N],ui(c[N])?0:h-1,b,E):el(c[N],E));return!h&&b&&D.length>0&&D.push(D[0].slice()),D}function Ta(c,h){return c.feature?a({},c.feature,{geometry:h}):nl(h)}function nl(c){return c.type==="Feature"||c.type==="FeatureCollection"?c:{type:"Feature",properties:{},geometry:c}}var Da={toGeoJSON:function(c){return Ta(this,{type:"Point",coordinates:el(this.getLatLng(),c)})}};Ks.include(Da),Jo.include(Da),$r.include(Da),ua.include({toGeoJSON:function(c){var h=!ui(this._latlngs),b=Js(this._latlngs,h?1:0,!1,c);return Ta(this,{type:(h?"Multi":"")+"LineString",coordinates:b})}}),Gr.include({toGeoJSON:function(c){var h=!ui(this._latlngs),b=h&&!ui(this._latlngs[0]),E=Js(this._latlngs,b?2:h?1:0,!0,c);return h||(E=[E]),Ta(this,{type:(b?"Multi":"")+"Polygon",coordinates:E})}}),Vr.include({toMultiPoint:function(c){var h=[];return this.eachLayer(function(b){h.push(b.toGeoJSON(c).geometry.coordinates)}),Ta(this,{type:"MultiPoint",coordinates:h})},toGeoJSON:function(c){var h=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(h==="MultiPoint")return this.toMultiPoint(c);var b=h==="GeometryCollection",E=[];return this.eachLayer(function(D){if(D.toGeoJSON){var N=D.toGeoJSON(c);if(b)E.push(N.geometry);else{var G=nl(N);G.type==="FeatureCollection"?E.push.apply(E,G.features):E.push(G)}}}),b?Ta(this,{geometries:E,type:"GeometryCollection"}):{type:"FeatureCollection",features:E}}});function il(c,h){return new da(c,h)}var to=il,Zr=Ti.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(c,h,b){this._url=c,this._bounds=mt(h),C(this,b)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(Kt(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){Ne(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(c){return this.options.opacity=c,this._image&&this._updateOpacity(),this},setStyle:function(c){return c.opacity&&this.setOpacity(c.opacity),this},bringToFront:function(){return this._map&&Tn(this._image),this},bringToBack:function(){return this._map&&er(this._image),this},setUrl:function(c){return this._url=c,this._image&&(this._image.src=c),this},setBounds:function(c){return this._bounds=mt(c),this._map&&this._reset(),this},getEvents:function(){var c={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(c.zoomanim=this._animateZoom),c},setZIndex:function(c){return this.options.zIndex=c,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var c=this._url.tagName==="IMG",h=this._image=c?this._url:se("img");if(Kt(h,"leaflet-image-layer"),this._zoomAnimated&&Kt(h,"leaflet-zoom-animated"),this.options.className&&Kt(h,this.options.className),h.onselectstart=v,h.onmousemove=v,h.onload=l(this.fire,this,"load"),h.onerror=l(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(h.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),c){this._url=h.src;return}h.src=this._url,h.alt=this.options.alt},_animateZoom:function(c){var h=this._map.getZoomScale(c.zoom),b=this._map._latLngBoundsToNewLayerBounds(this._bounds,c.zoom,c.center).min;oa(this._image,b,h)},_reset:function(){var c=this._image,h=new F(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),b=h.getSize();He(c,h.min),c.style.width=b.x+"px",c.style.height=b.y+"px"},_updateOpacity:function(){Ge(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var c=this.options.errorOverlayUrl;c&&this._url!==c&&(this._url=c,this._image.src=c)},getCenter:function(){return this._bounds.getCenter()}}),af=function(c,h,b){return new Zr(c,h,b)},Ma=Zr.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var c=this._url.tagName==="VIDEO",h=this._image=c?this._url:se("video");if(Kt(h,"leaflet-image-layer"),this._zoomAnimated&&Kt(h,"leaflet-zoom-animated"),this.options.className&&Kt(h,this.options.className),h.onselectstart=v,h.onmousemove=v,h.onloadeddata=l(this.fire,this,"load"),c){for(var b=h.getElementsByTagName("source"),E=[],D=0;D<b.length;D++)E.push(b[D].src);this._url=b.length>0?E:[h.src];return}j(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(h.style,"objectFit")&&(h.style.objectFit="fill"),h.autoplay=!!this.options.autoplay,h.loop=!!this.options.loop,h.muted=!!this.options.muted,h.playsInline=!!this.options.playsInline;for(var N=0;N<this._url.length;N++){var G=se("source");G.src=this._url[N],h.appendChild(G)}}});function qr(c,h,b){return new Ma(c,h,b)}var al=Zr.extend({_initImage:function(){var c=this._image=this._url;Kt(c,"leaflet-image-layer"),this._zoomAnimated&&Kt(c,"leaflet-zoom-animated"),this.options.className&&Kt(c,this.options.className),c.onselectstart=v,c.onmousemove=v}});function rf(c,h,b){return new al(c,h,b)}var Rn=Ti.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(c,h){c&&(c instanceof pt||j(c))?(this._latlng=yt(c),C(this,h)):(C(this,c),this._source=h),this.options.content&&(this._content=this.options.content)},openOn:function(c){return c=arguments.length?c:this._source._map,c.hasLayer(this)||c.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(c){return this._map?this.close():(arguments.length?this._source=c:c=this._source,this._prepareOpen(),this.openOn(c._map)),this},onAdd:function(c){this._zoomAnimated=c._zoomAnimated,this._container||this._initLayout(),c._fadeAnimated&&Ge(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),c._fadeAnimated&&Ge(this._container,1),this.bringToFront(),this.options.interactive&&(Kt(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(c){c._fadeAnimated?(Ge(this._container,0),this._removeTimeout=setTimeout(l(Ne,void 0,this._container),200)):Ne(this._container),this.options.interactive&&(Ye(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(c){return this._latlng=yt(c),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(c){return this._content=c,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var c={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(c.zoomanim=this._animateZoom),c},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&Tn(this._container),this},bringToBack:function(){return this._map&&er(this._container),this},_prepareOpen:function(c){var h=this._source;if(!h._map)return!1;if(h instanceof Vi){h=null;var b=this._source._layers;for(var E in b)if(b[E]._map){h=b[E];break}if(!h)return!1;this._source=h}if(!c)if(h.getCenter)c=h.getCenter();else if(h.getLatLng)c=h.getLatLng();else if(h.getBounds)c=h.getBounds().getCenter();else throw new Error("Unable to get source layer LatLng.");return this.setLatLng(c),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var c=this._contentNode,h=typeof this._content=="function"?this._content(this._source||this):this._content;if(typeof h=="string")c.innerHTML=h;else{for(;c.hasChildNodes();)c.removeChild(c.firstChild);c.appendChild(h)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var c=this._map.latLngToLayerPoint(this._latlng),h=ot(this.options.offset),b=this._getAnchor();this._zoomAnimated?He(this._container,c.add(b)):h=h.add(c).add(b);var E=this._containerBottom=-h.y,D=this._containerLeft=-Math.round(this._containerWidth/2)+h.x;this._container.style.bottom=E+"px",this._container.style.left=D+"px"}},_getAnchor:function(){return[0,0]}});de.include({_initOverlay:function(c,h,b,E){var D=h;return D instanceof c||(D=new c(E).setContent(h)),b&&D.setLatLng(b),D}}),Ti.include({_initOverlay:function(c,h,b,E){var D=b;return D instanceof c?(C(D,E),D._source=this):(D=h&&!E?h:new c(E,this),D.setContent(b)),D}});var eo=Rn.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(c){return c=arguments.length?c:this._source._map,!c.hasLayer(this)&&c._popup&&c._popup.options.autoClose&&c.removeLayer(c._popup),c._popup=this,Rn.prototype.openOn.call(this,c)},onAdd:function(c){Rn.prototype.onAdd.call(this,c),c.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Gi||this._source.on("preclick",Ai))},onRemove:function(c){Rn.prototype.onRemove.call(this,c),c.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Gi||this._source.off("preclick",Ai))},getEvents:function(){var c=Rn.prototype.getEvents.call(this);return(this.options.closeOnClick!==void 0?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(c.preclick=this.close),this.options.keepInView&&(c.moveend=this._adjustPan),c},_initLayout:function(){var c="leaflet-popup",h=this._container=se("div",c+" "+(this.options.className||"")+" leaflet-zoom-animated"),b=this._wrapper=se("div",c+"-content-wrapper",h);if(this._contentNode=se("div",c+"-content",b),ir(h),Hi(this._contentNode),qt(h,"contextmenu",Ai),this._tipContainer=se("div",c+"-tip-container",h),this._tip=se("div",c+"-tip",this._tipContainer),this.options.closeButton){var E=this._closeButton=se("a",c+"-close-button",h);E.setAttribute("role","button"),E.setAttribute("aria-label","Close popup"),E.href="#close",E.innerHTML='<span aria-hidden="true">×</span>',qt(E,"click",function(D){an(D),this.close()},this)}},_updateLayout:function(){var c=this._contentNode,h=c.style;h.width="",h.whiteSpace="nowrap";var b=c.offsetWidth;b=Math.min(b,this.options.maxWidth),b=Math.max(b,this.options.minWidth),h.width=b+1+"px",h.whiteSpace="",h.height="";var E=c.offsetHeight,D=this.options.maxHeight,N="leaflet-popup-scrolled";D&&E>D?(h.height=D+"px",Kt(c,N)):Ye(c,N),this._containerWidth=this._container.offsetWidth},_animateZoom:function(c){var h=this._map._latLngToNewLayerPoint(this._latlng,c.zoom,c.center),b=this._getAnchor();He(this._container,h.add(b))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var c=this._map,h=parseInt(Is(this._container,"marginBottom"),10)||0,b=this._container.offsetHeight+h,E=this._containerWidth,D=new q(this._containerLeft,-b-this._containerBottom);D._add(Ca(this._container));var N=c.layerPointToContainerPoint(D),G=ot(this.options.autoPanPadding),tt=ot(this.options.autoPanPaddingTopLeft||G),lt=ot(this.options.autoPanPaddingBottomRight||G),_t=c.getSize(),kt=0,Ft=0;N.x+E+lt.x>_t.x&&(kt=N.x+E-_t.x+lt.x),N.x-kt-tt.x<0&&(kt=N.x-tt.x),N.y+b+lt.y>_t.y&&(Ft=N.y+b-_t.y+lt.y),N.y-Ft-tt.y<0&&(Ft=N.y-tt.y),(kt||Ft)&&(this.options.keepInView&&(this._autopanning=!0),c.fire("autopanstart").panBy([kt,Ft]))}},_getAnchor:function(){return ot(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),sf=function(c,h){return new eo(c,h)};de.mergeOptions({closePopupOnClick:!0}),de.include({openPopup:function(c,h,b){return this._initOverlay(eo,c,h,b).openOn(this),this},closePopup:function(c){return c=arguments.length?c:this._popup,c&&c.close(),this}}),Ti.include({bindPopup:function(c,h){return this._popup=this._initOverlay(eo,this._popup,c,h),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(c){return this._popup&&(this instanceof Vi||(this._popup._source=this),this._popup._prepareOpen(c||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(c){return this._popup&&this._popup.setContent(c),this},getPopup:function(){return this._popup},_openPopup:function(c){if(!(!this._popup||!this._map)){Ea(c);var h=c.layer||c.target;if(this._popup._source===h&&!(h instanceof Gi)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(c.latlng);return}this._popup._source=h,this.openPopup(c.latlng)}},_movePopup:function(c){this._popup.setLatLng(c.latlng)},_onKeyPress:function(c){c.originalEvent.keyCode===13&&this._openPopup(c)}});var no=Rn.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(c){Rn.prototype.onAdd.call(this,c),this.setOpacity(this.options.opacity),c.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(c){Rn.prototype.onRemove.call(this,c),c.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var c=Rn.prototype.getEvents.call(this);return this.options.permanent||(c.preclick=this.close),c},_initLayout:function(){var c="leaflet-tooltip",h=c+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=se("div",h),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+f(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(c){var h,b,E=this._map,D=this._container,N=E.latLngToContainerPoint(E.getCenter()),G=E.layerPointToContainerPoint(c),tt=this.options.direction,lt=D.offsetWidth,_t=D.offsetHeight,kt=ot(this.options.offset),Ft=this._getAnchor();tt==="top"?(h=lt/2,b=_t):tt==="bottom"?(h=lt/2,b=0):tt==="center"?(h=lt/2,b=_t/2):tt==="right"?(h=0,b=_t/2):tt==="left"?(h=lt,b=_t/2):G.x<N.x?(tt="right",h=0,b=_t/2):(tt="left",h=lt+(kt.x+Ft.x)*2,b=_t/2),c=c.subtract(ot(h,b,!0)).add(kt).add(Ft),Ye(D,"leaflet-tooltip-right"),Ye(D,"leaflet-tooltip-left"),Ye(D,"leaflet-tooltip-top"),Ye(D,"leaflet-tooltip-bottom"),Kt(D,"leaflet-tooltip-"+tt),He(D,c)},_updatePosition:function(){var c=this._map.latLngToLayerPoint(this._latlng);this._setPosition(c)},setOpacity:function(c){this.options.opacity=c,this._container&&Ge(this._container,c)},_animateZoom:function(c){var h=this._map._latLngToNewLayerPoint(this._latlng,c.zoom,c.center);this._setPosition(h)},_getAnchor:function(){return ot(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),km=function(c,h){return new no(c,h)};de.include({openTooltip:function(c,h,b){return this._initOverlay(no,c,h,b).openOn(this),this},closeTooltip:function(c){return c.close(),this}}),Ti.include({bindTooltip:function(c,h){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(no,this._tooltip,c,h),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(c){if(!(!c&&this._tooltipHandlersAdded)){var h=c?"off":"on",b={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?b.add=this._openTooltip:(b.mouseover=this._openTooltip,b.mouseout=this.closeTooltip,b.click=this._openTooltip,this._map?this._addFocusListeners():b.add=this._addFocusListeners),this._tooltip.options.sticky&&(b.mousemove=this._moveTooltip),this[h](b),this._tooltipHandlersAdded=!c}},openTooltip:function(c){return this._tooltip&&(this instanceof Vi||(this._tooltip._source=this),this._tooltip._prepareOpen(c)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(c){return this._tooltip&&this._tooltip.setContent(c),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(c){var h=typeof c.getElement=="function"&&c.getElement();h&&(qt(h,"focus",function(){this._tooltip._source=c,this.openTooltip()},this),qt(h,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(c){var h=typeof c.getElement=="function"&&c.getElement();h&&h.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(c){if(!(!this._tooltip||!this._map)){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var h=this;this._map.once("moveend",function(){h._openOnceFlag=!1,h._openTooltip(c)});return}this._tooltip._source=c.layer||c.target,this.openTooltip(this._tooltip.options.sticky?c.latlng:void 0)}},_moveTooltip:function(c){var h=c.latlng,b,E;this._tooltip.options.sticky&&c.originalEvent&&(b=this._map.mouseEventToContainerPoint(c.originalEvent),E=this._map.containerPointToLayerPoint(b),h=this._map.layerPointToLatLng(E)),this._tooltip.setLatLng(h)}});var of=$i.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(c){var h=c&&c.tagName==="DIV"?c:document.createElement("div"),b=this.options;if(b.html instanceof Element?(li(h),h.appendChild(b.html)):h.innerHTML=b.html!==!1?b.html:"",b.bgPos){var E=ot(b.bgPos);h.style.backgroundPosition=-E.x+"px "+-E.y+"px"}return this._setIconStyles(h,"icon"),h},createShadow:function(){return null}});function Lm(c){return new of(c)}$i.Default=Ys;var Yr=Ti.extend({options:{tileSize:256,opacity:1,updateWhenIdle:It.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(c){C(this,c)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(c){c._addZoomLimit(this)},onRemove:function(c){this._removeAllTiles(),Ne(this._container),c._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(Tn(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(er(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(c){return this.options.opacity=c,this._updateOpacity(),this},setZIndex:function(c){return this.options.zIndex=c,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var c=this._clampZoom(this._map.getZoom());c!==this._tileZoom&&(this._tileZoom=c,this._updateLevels()),this._update()}return this},getEvents:function(){var c={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=p(this._onMoveEnd,this.options.updateInterval,this)),c.move=this._onMove),this._zoomAnimated&&(c.zoomanim=this._animateZoom),c},createTile:function(){return document.createElement("div")},getTileSize:function(){var c=this.options.tileSize;return c instanceof q?c:new q(c,c)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(c){for(var h=this.getPane().children,b=-c(-1/0,1/0),E=0,D=h.length,N;E<D;E++)N=h[E].style.zIndex,h[E]!==this._container&&N&&(b=c(b,+N));isFinite(b)&&(this.options.zIndex=b+c(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!It.ielt9){Ge(this._container,this.options.opacity);var c=+new Date,h=!1,b=!1;for(var E in this._tiles){var D=this._tiles[E];if(!(!D.current||!D.loaded)){var N=Math.min(1,(c-D.loaded)/200);Ge(D.el,N),N<1?h=!0:(D.active?b=!0:this._onOpaqueTile(D),D.active=!0)}}b&&!this._noPrune&&this._pruneTiles(),h&&(R(this._fadeFrame),this._fadeFrame=X(this._updateOpacity,this))}},_onOpaqueTile:v,_initContainer:function(){this._container||(this._container=se("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var c=this._tileZoom,h=this.options.maxZoom;if(c!==void 0){for(var b in this._levels)b=Number(b),this._levels[b].el.children.length||b===c?(this._levels[b].el.style.zIndex=h-Math.abs(c-b),this._onUpdateLevel(b)):(Ne(this._levels[b].el),this._removeTilesAtZoom(b),this._onRemoveLevel(b),delete this._levels[b]);var E=this._levels[c],D=this._map;return E||(E=this._levels[c]={},E.el=se("div","leaflet-tile-container leaflet-zoom-animated",this._container),E.el.style.zIndex=h,E.origin=D.project(D.unproject(D.getPixelOrigin()),c).round(),E.zoom=c,this._setZoomTransform(E,D.getCenter(),D.getZoom()),v(E.el.offsetWidth),this._onCreateLevel(E)),this._level=E,E}},_onUpdateLevel:v,_onRemoveLevel:v,_onCreateLevel:v,_pruneTiles:function(){if(this._map){var c,h,b=this._map.getZoom();if(b>this.options.maxZoom||b<this.options.minZoom){this._removeAllTiles();return}for(c in this._tiles)h=this._tiles[c],h.retain=h.current;for(c in this._tiles)if(h=this._tiles[c],h.current&&!h.active){var E=h.coords;this._retainParent(E.x,E.y,E.z,E.z-5)||this._retainChildren(E.x,E.y,E.z,E.z+2)}for(c in this._tiles)this._tiles[c].retain||this._removeTile(c)}},_removeTilesAtZoom:function(c){for(var h in this._tiles)this._tiles[h].coords.z===c&&this._removeTile(h)},_removeAllTiles:function(){for(var c in this._tiles)this._removeTile(c)},_invalidateAll:function(){for(var c in this._levels)Ne(this._levels[c].el),this._onRemoveLevel(Number(c)),delete this._levels[c];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(c,h,b,E){var D=Math.floor(c/2),N=Math.floor(h/2),G=b-1,tt=new q(+D,+N);tt.z=+G;var lt=this._tileCoordsToKey(tt),_t=this._tiles[lt];return _t&&_t.active?(_t.retain=!0,!0):(_t&&_t.loaded&&(_t.retain=!0),G>E?this._retainParent(D,N,G,E):!1)},_retainChildren:function(c,h,b,E){for(var D=2*c;D<2*c+2;D++)for(var N=2*h;N<2*h+2;N++){var G=new q(D,N);G.z=b+1;var tt=this._tileCoordsToKey(G),lt=this._tiles[tt];if(lt&<.active){lt.retain=!0;continue}else lt&<.loaded&&(lt.retain=!0);b+1<E&&this._retainChildren(D,N,b+1,E)}},_resetView:function(c){var h=c&&(c.pinch||c.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),h,h)},_animateZoom:function(c){this._setView(c.center,c.zoom,!0,c.noUpdate)},_clampZoom:function(c){var h=this.options;return h.minNativeZoom!==void 0&&c<h.minNativeZoom?h.minNativeZoom:h.maxNativeZoom!==void 0&&h.maxNativeZoom<c?h.maxNativeZoom:c},_setView:function(c,h,b,E){var D=Math.round(h);this.options.maxZoom!==void 0&&D>this.options.maxZoom||this.options.minZoom!==void 0&&D<this.options.minZoom?D=void 0:D=this._clampZoom(D);var N=this.options.updateWhenZooming&&D!==this._tileZoom;(!E||N)&&(this._tileZoom=D,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),D!==void 0&&this._update(c),b||this._pruneTiles(),this._noPrune=!!b),this._setZoomTransforms(c,h)},_setZoomTransforms:function(c,h){for(var b in this._levels)this._setZoomTransform(this._levels[b],c,h)},_setZoomTransform:function(c,h,b){var E=this._map.getZoomScale(b,c.zoom),D=c.origin.multiplyBy(E).subtract(this._map._getNewPixelOrigin(h,b)).round();It.any3d?oa(c.el,D,E):He(c.el,D)},_resetGrid:function(){var c=this._map,h=c.options.crs,b=this._tileSize=this.getTileSize(),E=this._tileZoom,D=this._map.getPixelWorldBounds(this._tileZoom);D&&(this._globalTileRange=this._pxBoundsToTileRange(D)),this._wrapX=h.wrapLng&&!this.options.noWrap&&[Math.floor(c.project([0,h.wrapLng[0]],E).x/b.x),Math.ceil(c.project([0,h.wrapLng[1]],E).x/b.y)],this._wrapY=h.wrapLat&&!this.options.noWrap&&[Math.floor(c.project([h.wrapLat[0],0],E).y/b.x),Math.ceil(c.project([h.wrapLat[1],0],E).y/b.y)]},_onMoveEnd:function(){!this._map||this._map._animatingZoom||this._update()},_getTiledPixelBounds:function(c){var h=this._map,b=h._animatingZoom?Math.max(h._animateToZoom,h.getZoom()):h.getZoom(),E=h.getZoomScale(b,this._tileZoom),D=h.project(c,this._tileZoom).floor(),N=h.getSize().divideBy(E*2);return new F(D.subtract(N),D.add(N))},_update:function(c){var h=this._map;if(h){var b=this._clampZoom(h.getZoom());if(c===void 0&&(c=h.getCenter()),this._tileZoom!==void 0){var E=this._getTiledPixelBounds(c),D=this._pxBoundsToTileRange(E),N=D.getCenter(),G=[],tt=this.options.keepBuffer,lt=new F(D.getBottomLeft().subtract([tt,-tt]),D.getTopRight().add([tt,-tt]));if(!(isFinite(D.min.x)&&isFinite(D.min.y)&&isFinite(D.max.x)&&isFinite(D.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var _t in this._tiles){var kt=this._tiles[_t].coords;(kt.z!==this._tileZoom||!lt.contains(new q(kt.x,kt.y)))&&(this._tiles[_t].current=!1)}if(Math.abs(b-this._tileZoom)>1){this._setView(c,b);return}for(var Ft=D.min.y;Ft<=D.max.y;Ft++)for(var ee=D.min.x;ee<=D.max.x;ee++){var Dn=new q(ee,Ft);if(Dn.z=this._tileZoom,!!this._isValidTile(Dn)){var rn=this._tiles[this._tileCoordsToKey(Dn)];rn?rn.current=!0:G.push(Dn)}}if(G.sort(function(xe,_e){return xe.distanceTo(N)-_e.distanceTo(N)}),G.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var ii=document.createDocumentFragment();for(ee=0;ee<G.length;ee++)this._addTile(G[ee],ii);this._level.el.appendChild(ii)}}}},_isValidTile:function(c){var h=this._map.options.crs;if(!h.infinite){var b=this._globalTileRange;if(!h.wrapLng&&(c.x<b.min.x||c.x>b.max.x)||!h.wrapLat&&(c.y<b.min.y||c.y>b.max.y))return!1}if(!this.options.bounds)return!0;var E=this._tileCoordsToBounds(c);return mt(this.options.bounds).overlaps(E)},_keyToBounds:function(c){return this._tileCoordsToBounds(this._keyToTileCoords(c))},_tileCoordsToNwSe:function(c){var h=this._map,b=this.getTileSize(),E=c.scaleBy(b),D=E.add(b),N=h.unproject(E,c.z),G=h.unproject(D,c.z);return[N,G]},_tileCoordsToBounds:function(c){var h=this._tileCoordsToNwSe(c),b=new at(h[0],h[1]);return this.options.noWrap||(b=this._map.wrapLatLngBounds(b)),b},_tileCoordsToKey:function(c){return c.x+":"+c.y+":"+c.z},_keyToTileCoords:function(c){var h=c.split(":"),b=new q(+h[0],+h[1]);return b.z=+h[2],b},_removeTile:function(c){var h=this._tiles[c];h&&(Ne(h.el),delete this._tiles[c],this.fire("tileunload",{tile:h.el,coords:this._keyToTileCoords(c)}))},_initTile:function(c){Kt(c,"leaflet-tile");var h=this.getTileSize();c.style.width=h.x+"px",c.style.height=h.y+"px",c.onselectstart=v,c.onmousemove=v,It.ielt9&&this.options.opacity<1&&Ge(c,this.options.opacity)},_addTile:function(c,h){var b=this._getTilePos(c),E=this._tileCoordsToKey(c),D=this.createTile(this._wrapCoords(c),l(this._tileReady,this,c));this._initTile(D),this.createTile.length<2&&X(l(this._tileReady,this,c,null,D)),He(D,b),this._tiles[E]={el:D,coords:c,current:!0},h.appendChild(D),this.fire("tileloadstart",{tile:D,coords:c})},_tileReady:function(c,h,b){h&&this.fire("tileerror",{error:h,tile:b,coords:c});var E=this._tileCoordsToKey(c);b=this._tiles[E],b&&(b.loaded=+new Date,this._map._fadeAnimated?(Ge(b.el,0),R(this._fadeFrame),this._fadeFrame=X(this._updateOpacity,this)):(b.active=!0,this._pruneTiles()),h||(Kt(b.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:b.el,coords:c})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),It.ielt9||!this._map._fadeAnimated?X(this._pruneTiles,this):setTimeout(l(this._pruneTiles,this),250)))},_getTilePos:function(c){return c.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(c){var h=new q(this._wrapX?g(c.x,this._wrapX):c.x,this._wrapY?g(c.y,this._wrapY):c.y);return h.z=c.z,h},_pxBoundsToTileRange:function(c){var h=this.getTileSize();return new F(c.min.unscaleBy(h).floor(),c.max.unscaleBy(h).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var c in this._tiles)if(!this._tiles[c].loaded)return!1;return!0}});function lf(c){return new Yr(c)}var Oa=Yr.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(c,h){this._url=c,h=C(this,h),h.detectRetina&&It.retina&&h.maxZoom>0?(h.tileSize=Math.floor(h.tileSize/2),h.zoomReverse?(h.zoomOffset--,h.minZoom=Math.min(h.maxZoom,h.minZoom+1)):(h.zoomOffset++,h.maxZoom=Math.max(h.minZoom,h.maxZoom-1)),h.minZoom=Math.max(0,h.minZoom)):h.zoomReverse?h.minZoom=Math.min(h.maxZoom,h.minZoom):h.maxZoom=Math.max(h.minZoom,h.maxZoom),typeof h.subdomains=="string"&&(h.subdomains=h.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(c,h){return this._url===c&&h===void 0&&(h=!0),this._url=c,h||this.redraw(),this},createTile:function(c,h){var b=document.createElement("img");return qt(b,"load",l(this._tileOnLoad,this,h,b)),qt(b,"error",l(this._tileOnError,this,h,b)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(b.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(b.referrerPolicy=this.options.referrerPolicy),b.alt="",b.src=this.getTileUrl(c),b},getTileUrl:function(c){var h={r:It.retina?"@2x":"",s:this._getSubdomain(c),x:c.x,y:c.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var b=this._globalTileRange.max.y-c.y;this.options.tms&&(h.y=b),h["-y"]=b}return z(this._url,a(h,this.options))},_tileOnLoad:function(c,h){It.ielt9?setTimeout(l(c,this,null,h),0):c(null,h)},_tileOnError:function(c,h,b){var E=this.options.errorTileUrl;E&&h.getAttribute("src")!==E&&(h.src=E),c(b,h)},_onTileRemove:function(c){c.tile.onload=null},_getZoomForUrl:function(){var c=this._tileZoom,h=this.options.maxZoom,b=this.options.zoomReverse,E=this.options.zoomOffset;return b&&(c=h-c),c+E},_getSubdomain:function(c){var h=Math.abs(c.x+c.y)%this.options.subdomains.length;return this.options.subdomains[h]},_abortLoading:function(){var c,h;for(c in this._tiles)if(this._tiles[c].coords.z!==this._tileZoom&&(h=this._tiles[c].el,h.onload=v,h.onerror=v,!h.complete)){h.src=H;var b=this._tiles[c].coords;Ne(h),delete this._tiles[c],this.fire("tileabort",{tile:h,coords:b})}},_removeTile:function(c){var h=this._tiles[c];if(h)return h.el.setAttribute("src",H),Yr.prototype._removeTile.call(this,c)},_tileReady:function(c,h,b){if(!(!this._map||b&&b.getAttribute("src")===H))return Yr.prototype._tileReady.call(this,c,h,b)}});function di(c,h){return new Oa(c,h)}var io=Oa.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(c,h){this._url=c;var b=a({},this.defaultWmsParams);for(var E in h)E in this.options||(b[E]=h[E]);h=C(this,h);var D=h.detectRetina&&It.retina?2:1,N=this.getTileSize();b.width=N.x*D,b.height=N.y*D,this.wmsParams=b},onAdd:function(c){this._crs=this.options.crs||c.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var h=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[h]=this._crs.code,Oa.prototype.onAdd.call(this,c)},getTileUrl:function(c){var h=this._tileCoordsToNwSe(c),b=this._crs,E=K(b.project(h[0]),b.project(h[1])),D=E.min,N=E.max,G=(this._wmsVersion>=1.3&&this._crs===Oc?[D.y,D.x,N.y,N.x]:[D.x,D.y,N.x,N.y]).join(","),tt=Oa.prototype.getTileUrl.call(this,c);return tt+A(this.wmsParams,tt,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+G},setParams:function(c,h){return a(this.wmsParams,c),h||this.redraw(),this}});function fi(c,h){return new io(c,h)}Oa.WMS=io,di.wms=fi;var Zn=Ti.extend({options:{padding:.1},initialize:function(c){C(this,c),f(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),Kt(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var c={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(c.zoomanim=this._onAnimZoom),c},_onAnimZoom:function(c){this._updateTransform(c.center,c.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(c,h){var b=this._map.getZoomScale(h,this._zoom),E=this._map.getSize().multiplyBy(.5+this.options.padding),D=this._map.project(this._center,h),N=E.multiplyBy(-b).add(D).subtract(this._map._getNewPixelOrigin(c,h));It.any3d?oa(this._container,N,b):He(this._container,N)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var c in this._layers)this._layers[c]._reset()},_onZoomEnd:function(){for(var c in this._layers)this._layers[c]._project()},_updatePaths:function(){for(var c in this._layers)this._layers[c]._update()},_update:function(){var c=this.options.padding,h=this._map.getSize(),b=this._map.containerPointToLayerPoint(h.multiplyBy(-c)).round();this._bounds=new F(b,b.add(h.multiplyBy(1+c*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),rl=Zn.extend({options:{tolerance:0},getEvents:function(){var c=Zn.prototype.getEvents.call(this);return c.viewprereset=this._onViewPreReset,c},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Zn.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var c=this._container=document.createElement("canvas");qt(c,"mousemove",this._onMouseMove,this),qt(c,"click dblclick mousedown mouseup contextmenu",this._onClick,this),qt(c,"mouseout",this._handleMouseOut,this),c._leaflet_disable_events=!0,this._ctx=c.getContext("2d")},_destroyContainer:function(){R(this._redrawRequest),delete this._ctx,Ne(this._container),Me(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var c;this._redrawBounds=null;for(var h in this._layers)c=this._layers[h],c._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Zn.prototype._update.call(this);var c=this._bounds,h=this._container,b=c.getSize(),E=It.retina?2:1;He(h,c.min),h.width=E*b.x,h.height=E*b.y,h.style.width=b.x+"px",h.style.height=b.y+"px",It.retina&&this._ctx.scale(2,2),this._ctx.translate(-c.min.x,-c.min.y),this.fire("update")}},_reset:function(){Zn.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(c){this._updateDashArray(c),this._layers[f(c)]=c;var h=c._order={layer:c,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=h),this._drawLast=h,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(c){this._requestRedraw(c)},_removePath:function(c){var h=c._order,b=h.next,E=h.prev;b?b.prev=E:this._drawLast=E,E?E.next=b:this._drawFirst=b,delete c._order,delete this._layers[f(c)],this._requestRedraw(c)},_updatePath:function(c){this._extendRedrawBounds(c),c._project(),c._update(),this._requestRedraw(c)},_updateStyle:function(c){this._updateDashArray(c),this._requestRedraw(c)},_updateDashArray:function(c){if(typeof c.options.dashArray=="string"){var h=c.options.dashArray.split(/[, ]+/),b=[],E,D;for(D=0;D<h.length;D++){if(E=Number(h[D]),isNaN(E))return;b.push(E)}c.options._dashArray=b}else c.options._dashArray=c.options.dashArray},_requestRedraw:function(c){this._map&&(this._extendRedrawBounds(c),this._redrawRequest=this._redrawRequest||X(this._redraw,this))},_extendRedrawBounds:function(c){if(c._pxBounds){var h=(c.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new F,this._redrawBounds.extend(c._pxBounds.min.subtract([h,h])),this._redrawBounds.extend(c._pxBounds.max.add([h,h]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var c=this._redrawBounds;if(c){var h=c.getSize();this._ctx.clearRect(c.min.x,c.min.y,h.x,h.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var c,h=this._redrawBounds;if(this._ctx.save(),h){var b=h.getSize();this._ctx.beginPath(),this._ctx.rect(h.min.x,h.min.y,b.x,b.y),this._ctx.clip()}this._drawing=!0;for(var E=this._drawFirst;E;E=E.next)c=E.layer,(!h||c._pxBounds&&c._pxBounds.intersects(h))&&c._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(c,h){if(this._drawing){var b,E,D,N,G=c._parts,tt=G.length,lt=this._ctx;if(tt){for(lt.beginPath(),b=0;b<tt;b++){for(E=0,D=G[b].length;E<D;E++)N=G[b][E],lt[E?"lineTo":"moveTo"](N.x,N.y);h&<.closePath()}this._fillStroke(lt,c)}}},_updateCircle:function(c){if(!(!this._drawing||c._empty())){var h=c._point,b=this._ctx,E=Math.max(Math.round(c._radius),1),D=(Math.max(Math.round(c._radiusY),1)||E)/E;D!==1&&(b.save(),b.scale(1,D)),b.beginPath(),b.arc(h.x,h.y/D,E,0,Math.PI*2,!1),D!==1&&b.restore(),this._fillStroke(b,c)}},_fillStroke:function(c,h){var b=h.options;b.fill&&(c.globalAlpha=b.fillOpacity,c.fillStyle=b.fillColor||b.color,c.fill(b.fillRule||"evenodd")),b.stroke&&b.weight!==0&&(c.setLineDash&&c.setLineDash(h.options&&h.options._dashArray||[]),c.globalAlpha=b.opacity,c.lineWidth=b.weight,c.strokeStyle=b.color,c.lineCap=b.lineCap,c.lineJoin=b.lineJoin,c.stroke())},_onClick:function(c){for(var h=this._map.mouseEventToLayerPoint(c),b,E,D=this._drawFirst;D;D=D.next)b=D.layer,b.options.interactive&&b._containsPoint(h)&&(!(c.type==="click"||c.type==="preclick")||!this._map._draggableMoved(b))&&(E=b);this._fireEvent(E?[E]:!1,c)},_onMouseMove:function(c){if(!(!this._map||this._map.dragging.moving()||this._map._animatingZoom)){var h=this._map.mouseEventToLayerPoint(c);this._handleMouseHover(c,h)}},_handleMouseOut:function(c){var h=this._hoveredLayer;h&&(Ye(this._container,"leaflet-interactive"),this._fireEvent([h],c,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(c,h){if(!this._mouseHoverThrottled){for(var b,E,D=this._drawFirst;D;D=D.next)b=D.layer,b.options.interactive&&b._containsPoint(h)&&(E=b);E!==this._hoveredLayer&&(this._handleMouseOut(c),E&&(Kt(this._container,"leaflet-interactive"),this._fireEvent([E],c,"mouseover"),this._hoveredLayer=E)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,c),this._mouseHoverThrottled=!0,setTimeout(l(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(c,h,b){this._map._fireDOMEvent(h,b||h.type,c)},_bringToFront:function(c){var h=c._order;if(h){var b=h.next,E=h.prev;if(b)b.prev=E;else return;E?E.next=b:b&&(this._drawFirst=b),h.prev=this._drawLast,this._drawLast.next=h,h.next=null,this._drawLast=h,this._requestRedraw(c)}},_bringToBack:function(c){var h=c._order;if(h){var b=h.next,E=h.prev;if(E)E.next=b;else return;b?b.prev=E:E&&(this._drawLast=E),h.prev=null,h.next=this._drawFirst,this._drawFirst.prev=h,this._drawFirst=h,this._requestRedraw(c)}}});function ao(c){return It.canvas?new rl(c):null}var ka=(function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(c){return document.createElement("<lvml:"+c+' class="lvml">')}}catch{}return function(c){return document.createElement("<"+c+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}})(),kc={_initContainer:function(){this._container=se("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Zn.prototype._update.call(this),this.fire("update"))},_initPath:function(c){var h=c._container=ka("shape");Kt(h,"leaflet-vml-shape "+(this.options.className||"")),h.coordsize="1 1",c._path=ka("path"),h.appendChild(c._path),this._updateStyle(c),this._layers[f(c)]=c},_addPath:function(c){var h=c._container;this._container.appendChild(h),c.options.interactive&&c.addInteractiveTarget(h)},_removePath:function(c){var h=c._container;Ne(h),c.removeInteractiveTarget(h),delete this._layers[f(c)]},_updateStyle:function(c){var h=c._stroke,b=c._fill,E=c.options,D=c._container;D.stroked=!!E.stroke,D.filled=!!E.fill,E.stroke?(h||(h=c._stroke=ka("stroke")),D.appendChild(h),h.weight=E.weight+"px",h.color=E.color,h.opacity=E.opacity,E.dashArray?h.dashStyle=j(E.dashArray)?E.dashArray.join(" "):E.dashArray.replace(/( *, *)/g," "):h.dashStyle="",h.endcap=E.lineCap.replace("butt","flat"),h.joinstyle=E.lineJoin):h&&(D.removeChild(h),c._stroke=null),E.fill?(b||(b=c._fill=ka("fill")),D.appendChild(b),b.color=E.fillColor||E.color,b.opacity=E.fillOpacity):b&&(D.removeChild(b),c._fill=null)},_updateCircle:function(c){var h=c._point.round(),b=Math.round(c._radius),E=Math.round(c._radiusY||b);this._setPath(c,c._empty()?"M0 0":"AL "+h.x+","+h.y+" "+b+","+E+" 0,"+65535*360)},_setPath:function(c,h){c._path.v=h},_bringToFront:function(c){Tn(c._container)},_bringToBack:function(c){er(c._container)}},Wi=It.vml?ka:ve,Xr=Zn.extend({_initContainer:function(){this._container=Wi("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Wi("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Ne(this._container),Me(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Zn.prototype._update.call(this);var c=this._bounds,h=c.getSize(),b=this._container;(!this._svgSize||!this._svgSize.equals(h))&&(this._svgSize=h,b.setAttribute("width",h.x),b.setAttribute("height",h.y)),He(b,c.min),b.setAttribute("viewBox",[c.min.x,c.min.y,h.x,h.y].join(" ")),this.fire("update")}},_initPath:function(c){var h=c._path=Wi("path");c.options.className&&Kt(h,c.options.className),c.options.interactive&&Kt(h,"leaflet-interactive"),this._updateStyle(c),this._layers[f(c)]=c},_addPath:function(c){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(c._path),c.addInteractiveTarget(c._path)},_removePath:function(c){Ne(c._path),c.removeInteractiveTarget(c._path),delete this._layers[f(c)]},_updatePath:function(c){c._project(),c._update()},_updateStyle:function(c){var h=c._path,b=c.options;h&&(b.stroke?(h.setAttribute("stroke",b.color),h.setAttribute("stroke-opacity",b.opacity),h.setAttribute("stroke-width",b.weight),h.setAttribute("stroke-linecap",b.lineCap),h.setAttribute("stroke-linejoin",b.lineJoin),b.dashArray?h.setAttribute("stroke-dasharray",b.dashArray):h.removeAttribute("stroke-dasharray"),b.dashOffset?h.setAttribute("stroke-dashoffset",b.dashOffset):h.removeAttribute("stroke-dashoffset")):h.setAttribute("stroke","none"),b.fill?(h.setAttribute("fill",b.fillColor||b.color),h.setAttribute("fill-opacity",b.fillOpacity),h.setAttribute("fill-rule",b.fillRule||"evenodd")):h.setAttribute("fill","none"))},_updatePoly:function(c,h){this._setPath(c,Cn(c._parts,h))},_updateCircle:function(c){var h=c._point,b=Math.max(Math.round(c._radius),1),E=Math.max(Math.round(c._radiusY),1)||b,D="a"+b+","+E+" 0 1,0 ",N=c._empty()?"M0 0":"M"+(h.x-b)+","+h.y+D+b*2+",0 "+D+-b*2+",0 ";this._setPath(c,N)},_setPath:function(c,h){c._path.setAttribute("d",h)},_bringToFront:function(c){Tn(c._path)},_bringToBack:function(c){er(c._path)}});It.vml&&Xr.include(kc);function ro(c){return It.svg||It.vml?new Xr(c):null}de.include({getRenderer:function(c){var h=c.options.renderer||this._getPaneRenderer(c.options.pane)||this.options.renderer||this._renderer;return h||(h=this._renderer=this._createRenderer()),this.hasLayer(h)||this.addLayer(h),h},_getPaneRenderer:function(c){if(c==="overlayPane"||c===void 0)return!1;var h=this._paneRenderers[c];return h===void 0&&(h=this._createRenderer({pane:c}),this._paneRenderers[c]=h),h},_createRenderer:function(c){return this.options.preferCanvas&&ao(c)||ro(c)}});var rr=Gr.extend({initialize:function(c,h){Gr.prototype.initialize.call(this,this._boundsToLatLngs(c),h)},setBounds:function(c){return this.setLatLngs(this._boundsToLatLngs(c))},_boundsToLatLngs:function(c){return c=mt(c),[c.getSouthWest(),c.getNorthWest(),c.getNorthEast(),c.getSouthEast()]}});function zm(c,h){return new rr(c,h)}Xr.create=Wi,Xr.pointsToPath=Cn,da.geometryToLayer=zn,da.coordsToLatLng=tl,da.coordsToLatLngs=Qs,da.latLngToCoords=el,da.latLngsToCoords=Js,da.getFeature=Ta,da.asFeature=nl,de.mergeOptions({boxZoom:!0});var qn=Ui.extend({initialize:function(c){this._map=c,this._container=c._container,this._pane=c._panes.overlayPane,this._resetStateTimeout=0,c.on("unload",this._destroy,this)},addHooks:function(){qt(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Me(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Ne(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(c){if(!c.shiftKey||c.which!==1&&c.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),Nr(),Go(),this._startPoint=this._map.mouseEventToContainerPoint(c),qt(document,{contextmenu:Ea,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(c){this._moved||(this._moved=!0,this._box=se("div","leaflet-zoom-box",this._container),Kt(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(c);var h=new F(this._point,this._startPoint),b=h.getSize();He(this._box,h.min),this._box.style.width=b.x+"px",this._box.style.height=b.y+"px"},_finish:function(){this._moved&&(Ne(this._box),Ye(this._container,"leaflet-crosshair")),Fi(),Hs(),Me(document,{contextmenu:Ea,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(c){if(!(c.which!==1&&c.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(l(this._resetState,this),0);var h=new at(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(h).fire("boxzoomend",{boxZoomBounds:h})}},_onKeyDown:function(c){c.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});de.addInitHook("addHandler","boxZoom",qn),de.mergeOptions({doubleClickZoom:!0});var sl=Ui.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(c){var h=this._map,b=h.getZoom(),E=h.options.zoomDelta,D=c.originalEvent.shiftKey?b-E:b+E;h.options.doubleClickZoom==="center"?h.setZoom(D):h.setZoomAround(c.containerPoint,D)}});de.addInitHook("addHandler","doubleClickZoom",sl),de.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Zi=Ui.extend({addHooks:function(){if(!this._draggable){var c=this._map;this._draggable=new Aa(c._mapPane,c._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),c.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),c.on("zoomend",this._onZoomEnd,this),c.whenReady(this._onZoomEnd,this))}Kt(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Ye(this._map._container,"leaflet-grab"),Ye(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var c=this._map;if(c._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var h=mt(this._map.options.maxBounds);this._offsetLimit=K(this._map.latLngToContainerPoint(h.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(h.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;c.fire("movestart").fire("dragstart"),c.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(c){if(this._map.options.inertia){var h=this._lastTime=+new Date,b=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(b),this._times.push(h),this._prunePositions(h)}this._map.fire("move",c).fire("drag",c)},_prunePositions:function(c){for(;this._positions.length>1&&c-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var c=this._map.getSize().divideBy(2),h=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=h.subtract(c).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(c,h){return c-(c-h)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var c=this._draggable._newPos.subtract(this._draggable._startPos),h=this._offsetLimit;c.x<h.min.x&&(c.x=this._viscousLimit(c.x,h.min.x)),c.y<h.min.y&&(c.y=this._viscousLimit(c.y,h.min.y)),c.x>h.max.x&&(c.x=this._viscousLimit(c.x,h.max.x)),c.y>h.max.y&&(c.y=this._viscousLimit(c.y,h.max.y)),this._draggable._newPos=this._draggable._startPos.add(c)}},_onPreDragWrap:function(){var c=this._worldWidth,h=Math.round(c/2),b=this._initialWorldOffset,E=this._draggable._newPos.x,D=(E-h+b)%c+h-b,N=(E+h+b)%c-h-b,G=Math.abs(D+b)<Math.abs(N+b)?D:N;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=G},_onDragEnd:function(c){var h=this._map,b=h.options,E=!b.inertia||c.noInertia||this._times.length<2;if(h.fire("dragend",c),E)h.fire("moveend");else{this._prunePositions(+new Date);var D=this._lastPos.subtract(this._positions[0]),N=(this._lastTime-this._times[0])/1e3,G=b.easeLinearity,tt=D.multiplyBy(G/N),lt=tt.distanceTo([0,0]),_t=Math.min(b.inertiaMaxSpeed,lt),kt=tt.multiplyBy(_t/lt),Ft=_t/(b.inertiaDeceleration*G),ee=kt.multiplyBy(-Ft/2).round();!ee.x&&!ee.y?h.fire("moveend"):(ee=h._limitOffset(ee,h.options.maxBounds),X(function(){h.panBy(ee,{duration:Ft,easeLinearity:G,noMoveStart:!0,animate:!0})}))}}});de.addInitHook("addHandler","dragging",Zi),de.mergeOptions({keyboard:!0,keyboardPanDelta:80});var Lc=Ui.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(c){this._map=c,this._setPanDelta(c.options.keyboardPanDelta),this._setZoomDelta(c.options.zoomDelta)},addHooks:function(){var c=this._map._container;c.tabIndex<=0&&(c.tabIndex="0"),qt(c,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Me(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var c=document.body,h=document.documentElement,b=c.scrollTop||h.scrollTop,E=c.scrollLeft||h.scrollLeft;this._map._container.focus(),window.scrollTo(E,b)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(c){var h=this._panKeys={},b=this.keyCodes,E,D;for(E=0,D=b.left.length;E<D;E++)h[b.left[E]]=[-1*c,0];for(E=0,D=b.right.length;E<D;E++)h[b.right[E]]=[c,0];for(E=0,D=b.down.length;E<D;E++)h[b.down[E]]=[0,c];for(E=0,D=b.up.length;E<D;E++)h[b.up[E]]=[0,-1*c]},_setZoomDelta:function(c){var h=this._zoomKeys={},b=this.keyCodes,E,D;for(E=0,D=b.zoomIn.length;E<D;E++)h[b.zoomIn[E]]=c;for(E=0,D=b.zoomOut.length;E<D;E++)h[b.zoomOut[E]]=-c},_addHooks:function(){qt(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Me(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(c){if(!(c.altKey||c.ctrlKey||c.metaKey)){var h=c.keyCode,b=this._map,E;if(h in this._panKeys){if(!b._panAnim||!b._panAnim._inProgress)if(E=this._panKeys[h],c.shiftKey&&(E=ot(E).multiplyBy(3)),b.options.maxBounds&&(E=b._limitOffset(ot(E),b.options.maxBounds)),b.options.worldCopyJump){var D=b.wrapLatLng(b.unproject(b.project(b.getCenter()).add(E)));b.panTo(D)}else b.panBy(E)}else if(h in this._zoomKeys)b.setZoom(b.getZoom()+(c.shiftKey?3:1)*this._zoomKeys[h]);else if(h===27&&b._popup&&b._popup.options.closeOnEscapeKey)b.closePopup();else return;Ea(c)}}});de.addInitHook("addHandler","keyboard",Lc),de.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var so=Ui.extend({addHooks:function(){qt(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Me(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(c){var h=In(c),b=this._map.options.wheelDebounceTime;this._delta+=h,this._lastMousePos=this._map.mouseEventToContainerPoint(c),this._startTime||(this._startTime=+new Date);var E=Math.max(b-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(l(this._performZoom,this),E),Ea(c)},_performZoom:function(){var c=this._map,h=c.getZoom(),b=this._map.options.zoomSnap||0;c._stop();var E=this._delta/(this._map.options.wheelPxPerZoomLevel*4),D=4*Math.log(2/(1+Math.exp(-Math.abs(E))))/Math.LN2,N=b?Math.ceil(D/b)*b:D,G=c._limitZoom(h+(this._delta>0?N:-N))-h;this._delta=0,this._startTime=null,G&&(c.options.scrollWheelZoom==="center"?c.setZoom(h+G):c.setZoomAround(this._lastMousePos,h+G))}});de.addInitHook("addHandler","scrollWheelZoom",so);var sr=600;de.mergeOptions({tapHold:It.touchNative&&It.safari&&It.mobile,tapTolerance:15});var ol=Ui.extend({addHooks:function(){qt(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Me(this._map._container,"touchstart",this._onDown,this)},_onDown:function(c){if(clearTimeout(this._holdTimeout),c.touches.length===1){var h=c.touches[0];this._startPos=this._newPos=new q(h.clientX,h.clientY),this._holdTimeout=setTimeout(l(function(){this._cancel(),this._isTapValid()&&(qt(document,"touchend",an),qt(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",h))},this),sr),qt(document,"touchend touchcancel contextmenu",this._cancel,this),qt(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function c(){Me(document,"touchend",an),Me(document,"touchend touchcancel",c)},_cancel:function(){clearTimeout(this._holdTimeout),Me(document,"touchend touchcancel contextmenu",this._cancel,this),Me(document,"touchmove",this._onMove,this)},_onMove:function(c){var h=c.touches[0];this._newPos=new q(h.clientX,h.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(c,h){var b=new MouseEvent(c,{bubbles:!0,cancelable:!0,view:window,screenX:h.screenX,screenY:h.screenY,clientX:h.clientX,clientY:h.clientY});b._simulated=!0,h.target.dispatchEvent(b)}});de.addInitHook("addHandler","tapHold",ol),de.mergeOptions({touchZoom:It.touch,bounceAtZoomLimits:!0});var zc=Ui.extend({addHooks:function(){Kt(this._map._container,"leaflet-touch-zoom"),qt(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Ye(this._map._container,"leaflet-touch-zoom"),Me(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(c){var h=this._map;if(!(!c.touches||c.touches.length!==2||h._animatingZoom||this._zooming)){var b=h.mouseEventToContainerPoint(c.touches[0]),E=h.mouseEventToContainerPoint(c.touches[1]);this._centerPoint=h.getSize()._divideBy(2),this._startLatLng=h.containerPointToLatLng(this._centerPoint),h.options.touchZoom!=="center"&&(this._pinchStartLatLng=h.containerPointToLatLng(b.add(E)._divideBy(2))),this._startDist=b.distanceTo(E),this._startZoom=h.getZoom(),this._moved=!1,this._zooming=!0,h._stop(),qt(document,"touchmove",this._onTouchMove,this),qt(document,"touchend touchcancel",this._onTouchEnd,this),an(c)}},_onTouchMove:function(c){if(!(!c.touches||c.touches.length!==2||!this._zooming)){var h=this._map,b=h.mouseEventToContainerPoint(c.touches[0]),E=h.mouseEventToContainerPoint(c.touches[1]),D=b.distanceTo(E)/this._startDist;if(this._zoom=h.getScaleZoom(D,this._startZoom),!h.options.bounceAtZoomLimits&&(this._zoom<h.getMinZoom()&&D<1||this._zoom>h.getMaxZoom()&&D>1)&&(this._zoom=h._limitZoom(this._zoom)),h.options.touchZoom==="center"){if(this._center=this._startLatLng,D===1)return}else{var N=b._add(E)._divideBy(2)._subtract(this._centerPoint);if(D===1&&N.x===0&&N.y===0)return;this._center=h.unproject(h.project(this._pinchStartLatLng,this._zoom).subtract(N),this._zoom)}this._moved||(h._moveStart(!0,!1),this._moved=!0),R(this._animRequest);var G=l(h._move,h,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=X(G,this,!0),an(c)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,R(this._animRequest),Me(document,"touchmove",this._onTouchMove,this),Me(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});de.addInitHook("addHandler","touchZoom",zc),de.BoxZoom=qn,de.DoubleClickZoom=sl,de.Drag=Zi,de.Keyboard=Lc,de.ScrollWheelZoom=so,de.TapHold=ol,de.TouchZoom=zc,n.Bounds=F,n.Browser=It,n.CRS=ft,n.Canvas=rl,n.Circle=Jo,n.CircleMarker=$r,n.Class=it,n.Control=ni,n.DivIcon=of,n.DivOverlay=Rn,n.DomEvent=qo,n.DomUtil=Ir,n.Draggable=Aa,n.Evented=$,n.FeatureGroup=Vi,n.GeoJSON=da,n.GridLayer=Yr,n.Handler=Ui,n.Icon=$i,n.ImageOverlay=Zr,n.LatLng=pt,n.LatLngBounds=at,n.Layer=Ti,n.LayerGroup=Vr,n.LineUtil=Tm,n.Map=de,n.Marker=Ks,n.Mixin=wm,n.Path=Gi,n.Point=q,n.PolyUtil=Dc,n.Polygon=Gr,n.Polyline=ua,n.Popup=eo,n.PosAnimation=Fr,n.Projection=Kd,n.Rectangle=rr,n.Renderer=Zn,n.SVG=Xr,n.SVGOverlay=al,n.TileLayer=Oa,n.Tooltip=no,n.Transformation=Ee,n.Util=dt,n.VideoOverlay=Ma,n.bind=l,n.bounds=K,n.canvas=ao,n.circle=nf,n.circleMarker=ef,n.control=ca,n.divIcon=Lm,n.extend=a,n.featureGroup=Jd,n.geoJSON=il,n.geoJson=to,n.gridLayer=lf,n.icon=qs,n.imageOverlay=af,n.latLng=yt,n.latLngBounds=mt,n.layerGroup=Dm,n.map=Sc,n.marker=tf,n.point=ot,n.polygon=Om,n.polyline=Mm,n.popup=sf,n.rectangle=zm,n.setOptions=C,n.stamp=f,n.svg=ro,n.svgOverlay=rf,n.tileLayer=di,n.tooltip=km,n.transformation=Ut,n.version=i,n.videoOverlay=qr;var Rc=window.L;n.noConflict=function(){return window.L=Rc,this},window.L=n}))})(Ou,Ou.exports)),Ou.exports}var Ls=wC();const xi=Sd(Ls);function pk(t,e,n){const i=$O(),a=i?`${t}${t.includes("?")?"&":"?"}access_token=${i}`:t,s=new EventSource(a);return s.onmessage=l=>{try{const d=JSON.parse(l.data);e(d)}catch{}},s.onerror=l=>{},()=>s.close()}function CC({open:t,title:e,message:n,onConfirm:i,onCancel:a}){const{t:s}=Gn(),l=O.useRef(null);return O.useEffect(()=>{var d;t&&((d=l.current)==null||d.focus())},[t]),O.useEffect(()=>{if(!t)return;const d=f=>{f.key==="Escape"&&a()};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[t,a]),t?T.jsx("div",{className:"fixed inset-0 bg-black/60 flex items-center justify-center z-[100]",children:T.jsxs("div",{className:"bg-az-panel border border-az-border rounded-lg p-4 w-80 shadow-xl",children:[T.jsx("h3",{className:"text-white font-semibold mb-2",children:e}),n&&T.jsx("p",{className:"text-az-text text-sm mb-4",children:n}),T.jsxs("div",{className:"flex justify-end gap-2",children:[T.jsx("button",{ref:l,onClick:a,className:"px-3 py-1 text-sm border border-az-border rounded hover:bg-az-bg text-az-text",children:s("common.cancel")}),T.jsx("button",{onClick:i,className:"px-3 py-1 text-sm bg-az-red rounded hover:bg-red-600 text-white",children:s("common.confirm")})]})]})}):null}function mk({flights:t,selectedFlight:e,onSelect:n,onCreate:i,onDelete:a}){const{t:s}=Gn(),[l,d]=O.useState(""),[f,p]=O.useState(!1),g=()=>{const y=l.trim();if(!y){p(!1);return}i(y),d(""),p(!1)},v=()=>{d(""),p(!1)};return T.jsxs("div",{className:"bg-az-panel border-r border-az-border flex flex-col shrink-0 w-[160px]",children:[T.jsx("div",{className:"px-2 py-2 border-b border-az-border text-[10px] text-az-muted uppercase tracking-wide",children:s("flights.title")}),T.jsx("div",{className:"flex-1 overflow-y-auto",children:t.map(y=>T.jsxs("div",{onClick:()=>n(y),className:`px-2 py-1.5 cursor-pointer border-b border-az-border text-xs ${(e==null?void 0:e.id)===y.id?"bg-az-bg text-white":"text-az-text hover:bg-az-bg"}`,children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsx("span",{className:"truncate",children:y.name}),T.jsx("button",{onClick:_=>{_.stopPropagation(),a(y.id)},className:"text-az-muted hover:text-az-red text-xs",children:"×"})]}),T.jsx("div",{className:"text-[10px] text-az-muted",children:new Date(y.createdDate).toLocaleDateString()})]},y.id))}),f?T.jsxs("div",{className:"flex gap-1 mx-3 my-2",children:[T.jsx("input",{autoFocus:!0,value:l,onChange:y=>d(y.target.value),onKeyDown:y=>{y.key==="Enter"&&g(),y.key==="Escape"&&v()},placeholder:"Flight name",className:"flex-1 min-w-0 bg-az-bg border border-az-border rounded px-2 py-1.5 text-xs text-az-text outline-none focus:border-az-orange"}),T.jsx("button",{onClick:g,className:"shrink-0 bg-az-blue text-white text-xs px-3 py-1.5 rounded hover:brightness-110",children:"OK"})]}):T.jsxs("button",{onClick:()=>p(!0),className:"mx-3 my-2 py-1.5 bg-az-blue text-white rounded text-xs hover:brightness-110",children:["+ ",s("flights.create")]}),T.jsxs("div",{className:"border-t border-az-border p-2",children:[T.jsx("label",{className:"block text-[9px] text-az-muted uppercase tracking-wide mb-1",children:s("flights.telemetry")}),T.jsx("input",{type:"date",className:"w-full bg-az-bg border border-az-border rounded px-2 py-1 text-[10px] text-az-text"})]})]})}function si(t){return`Minified Redux error #${t}; visit https://redux.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var gk=typeof Symbol=="function"&&Symbol.observable||"@@observable",C1=gk,E1=()=>Math.random().toString(36).substring(7).split("").join("."),vk={INIT:`@@redux/INIT${E1()}`,REPLACE:`@@redux/REPLACE${E1()}`},A1=vk;function bk(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function EC(t,e,n){if(typeof t!="function")throw new Error(si(2));if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(si(0));if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(si(1));return n(EC)(t,e)}let i=t,a=e,s=new Map,l=s,d=0,f=!1;function p(){l===s&&(l=new Map,s.forEach((A,k)=>{l.set(k,A)}))}function g(){if(f)throw new Error(si(3));return a}function v(A){if(typeof A!="function")throw new Error(si(4));if(f)throw new Error(si(5));let k=!0;p();const z=d++;return l.set(z,A),function(){if(k){if(f)throw new Error(si(6));k=!1,p(),l.delete(z),s=null}}}function y(A){if(!bk(A))throw new Error(si(7));if(typeof A.type>"u")throw new Error(si(8));if(typeof A.type!="string")throw new Error(si(17));if(f)throw new Error(si(9));try{f=!0,a=i(a,A)}finally{f=!1}return(s=l).forEach(z=>{z()}),A}function _(A){if(typeof A!="function")throw new Error(si(10));i=A,y({type:A1.REPLACE})}function w(){const A=v;return{subscribe(k){if(typeof k!="object"||k===null)throw new Error(si(11));function z(){const P=k;P.next&&P.next(g())}return z(),{unsubscribe:A(z)}},[C1](){return this}}}return y({type:A1.INIT}),{dispatch:y,subscribe:v,getState:g,replaceReducer:_,[C1]:w}}function T1(t,e){return function(...n){return e(t.apply(this,n))}}function D1(t,e){if(typeof t=="function")return T1(t,e);if(typeof t!="object"||t===null)throw new Error(si(16));const n={};for(const i in t){const a=t[i];typeof a=="function"&&(n[i]=T1(a,e))}return n}function AC(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,n)=>(...i)=>e(n(...i)))}function yk(...t){return e=>(n,i)=>{const a=e(n,i);let s=()=>{throw new Error(si(15))};const l={getState:a.getState,dispatch:(f,...p)=>s(f,...p)},d=t.map(f=>f(l));return s=AC(...d)(a.dispatch),{...a,dispatch:s}}}var yv={exports:{}},xv={};/**
|
||
* @license React
|
||
* use-sync-external-store-with-selector.production.js
|
||
*
|
||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var M1;function xk(){if(M1)return xv;M1=1;var t=Op();function e(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var n=typeof Object.is=="function"?Object.is:e,i=t.useSyncExternalStore,a=t.useRef,s=t.useEffect,l=t.useMemo,d=t.useDebugValue;return xv.useSyncExternalStoreWithSelector=function(f,p,g,v,y){var _=a(null);if(_.current===null){var w={hasValue:!1,value:null};_.current=w}else w=_.current;_=l(function(){function A(H){if(!k){if(k=!0,z=H,H=v(H),y!==void 0&&w.hasValue){var V=w.value;if(y(V,H))return j=V}return j=H}if(V=j,n(z,H))return V;var U=v(H);return y!==void 0&&y(V,U)?(z=H,V):(z=H,j=U)}var k=!1,z,j,P=g===void 0?null:g;return[function(){return A(p())},P===null?void 0:function(){return A(P())}]},[p,g,v,y]);var C=i(f,_[0],_[1]);return s(function(){w.hasValue=!0,w.value=C},[C]),d(C),C},xv}var O1;function _k(){return O1||(O1=1,yv.exports=xk()),yv.exports}_k();var Sk=O.version.startsWith("19"),wk=Symbol.for(Sk?"react.transitional.element":"react.element"),Ck=Symbol.for("react.portal"),Ek=Symbol.for("react.fragment"),Ak=Symbol.for("react.strict_mode"),Tk=Symbol.for("react.profiler"),Dk=Symbol.for("react.consumer"),Mk=Symbol.for("react.context"),TC=Symbol.for("react.forward_ref"),Ok=Symbol.for("react.suspense"),kk=Symbol.for("react.suspense_list"),sy=Symbol.for("react.memo"),Lk=Symbol.for("react.lazy"),zk=TC,Rk=sy;function Pk(t){if(typeof t=="object"&&t!==null){const{$$typeof:e}=t;switch(e){case wk:switch(t=t.type,t){case Ek:case Tk:case Ak:case Ok:case kk:return t;default:switch(t=t&&t.$$typeof,t){case Mk:case TC:case Lk:case sy:return t;case Dk:return t;default:return e}}case Ck:return e}}}function Nk(t){return Pk(t)===sy}function jk(t,e,n,i,{areStatesEqual:a,areOwnPropsEqual:s,areStatePropsEqual:l}){let d=!1,f,p,g,v,y;function _(z,j){return f=z,p=j,g=t(f,p),v=e(i,p),y=n(g,v,p),d=!0,y}function w(){return g=t(f,p),e.dependsOnOwnProps&&(v=e(i,p)),y=n(g,v,p),y}function C(){return t.dependsOnOwnProps&&(g=t(f,p)),e.dependsOnOwnProps&&(v=e(i,p)),y=n(g,v,p),y}function A(){const z=t(f,p),j=!l(z,g);return g=z,j&&(y=n(g,v,p)),y}function k(z,j){const P=!s(j,p),H=!a(z,f,j,p);return f=z,p=j,P&&H?w():P?C():H?A():y}return function(j,P){return d?k(j,P):_(j,P)}}function Bk(t,{initMapStateToProps:e,initMapDispatchToProps:n,initMergeProps:i,...a}){const s=e(t,a),l=n(t,a),d=i(t,a);return jk(s,l,d,t,a)}function Ik(t,e){const n={};for(const i in t){const a=t[i];typeof a=="function"&&(n[i]=(...s)=>e(a(...s)))}return n}function db(t){return function(n){const i=t(n);function a(){return i}return a.dependsOnOwnProps=!1,a}}function k1(t){return t.dependsOnOwnProps?!!t.dependsOnOwnProps:t.length!==1}function DC(t,e){return function(i,{displayName:a}){const s=function(d,f){return s.dependsOnOwnProps?s.mapToProps(d,f):s.mapToProps(d,void 0)};return s.dependsOnOwnProps=!0,s.mapToProps=function(d,f){s.mapToProps=t,s.dependsOnOwnProps=k1(t);let p=s(d,f);return typeof p=="function"&&(s.mapToProps=p,s.dependsOnOwnProps=k1(p),p=s(d,f)),p},s}}function oy(t,e){return(n,i)=>{throw new Error(`Invalid value of type ${typeof t} for ${e} argument when connecting component ${i.wrappedComponentName}.`)}}function Fk(t){return t&&typeof t=="object"?db(e=>Ik(t,e)):t?typeof t=="function"?DC(t):oy(t,"mapDispatchToProps"):db(e=>({dispatch:e}))}function Hk(t){return t?typeof t=="function"?DC(t):oy(t,"mapStateToProps"):db(()=>({}))}function Uk(t,e,n){return{...n,...t,...e}}function Vk(t){return function(n,{displayName:i,areMergedPropsEqual:a}){let s=!1,l;return function(f,p,g){const v=t(f,p,g);return s?a(v,l)||(l=v):(s=!0,l=v),l}}}function $k(t){return t?typeof t=="function"?Vk(t):oy(t,"mergeProps"):()=>Uk}function Gk(t){t()}function Wk(){let t=null,e=null;return{clear(){t=null,e=null},notify(){Gk(()=>{let n=t;for(;n;)n.callback(),n=n.next})},get(){const n=[];let i=t;for(;i;)n.push(i),i=i.next;return n},subscribe(n){let i=!0;const a=e={callback:n,next:null,prev:e};return a.prev?a.prev.next=a:t=a,function(){!i||t===null||(i=!1,a.next?a.next.prev=a.prev:e=a.prev,a.prev?a.prev.next=a.next:t=a.next)}}}}var L1={notify(){},get:()=>[]};function MC(t,e){let n,i=L1,a=0,s=!1;function l(C){g();const A=i.subscribe(C);let k=!1;return()=>{k||(k=!0,A(),v())}}function d(){i.notify()}function f(){w.onStateChange&&w.onStateChange()}function p(){return s}function g(){a++,n||(n=e?e.addNestedSub(f):t.subscribe(f),i=Wk())}function v(){a--,n&&a===0&&(n(),n=void 0,i.clear(),i=L1)}function y(){s||(s=!0,g())}function _(){s&&(s=!1,v())}const w={addNestedSub:l,notifyNestedSubs:d,handleChangeWrapper:f,isSubscribed:p,trySubscribe:y,tryUnsubscribe:_,getListeners:()=>i};return w}var Zk=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",qk=Zk(),Yk=()=>typeof navigator<"u"&&navigator.product==="ReactNative",Xk=Yk(),Kk=()=>qk||Xk?O.useLayoutEffect:O.useEffect,tp=Kk();function z1(t,e){return t===e?t!==0||e!==0||1/t===1/e:t!==t&&e!==e}function _v(t,e){if(z1(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;const n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(let a=0;a<n.length;a++)if(!Object.prototype.hasOwnProperty.call(e,n[a])||!z1(t[n[a]],e[n[a]]))return!1;return!0}var Qk={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Jk={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},tL={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},OC={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},eL={[zk]:tL,[Rk]:OC};function R1(t){return Nk(t)?OC:eL[t.$$typeof]||Qk}var nL=Object.defineProperty,iL=Object.getOwnPropertyNames,P1=Object.getOwnPropertySymbols,aL=Object.getOwnPropertyDescriptor,rL=Object.getPrototypeOf,N1=Object.prototype;function fb(t,e){if(typeof e!="string"){if(N1){const s=rL(e);s&&s!==N1&&fb(t,s)}let n=iL(e);P1&&(n=n.concat(P1(e)));const i=R1(t),a=R1(e);for(let s=0;s<n.length;++s){const l=n[s];if(!Jk[l]&&!(a&&a[l])&&!(i&&i[l])){const d=aL(e,l);try{nL(t,l,d)}catch{}}}}return t}var Sv=Symbol.for("react-redux-context"),wv=typeof globalThis<"u"?globalThis:{};function sL(){if(!O.createContext)return{};const t=wv[Sv]??(wv[Sv]=new Map);let e=t.get(O.createContext);return e||(e=O.createContext(null),t.set(O.createContext,e)),e}var kC=sL(),oL=[null,null];function lL(t,e,n){tp(()=>t(...e),n)}function cL(t,e,n,i,a,s){t.current=i,n.current=!1,a.current&&(a.current=null,s())}function uL(t,e,n,i,a,s,l,d,f,p,g){if(!t)return()=>{};let v=!1,y=null;const _=()=>{if(v||!d.current)return;const C=e.getState();let A,k;try{A=i(C,a.current)}catch(z){k=z,y=z}k||(y=null),A===s.current?l.current||p():(s.current=A,f.current=A,l.current=!0,g())};return n.onStateChange=_,n.trySubscribe(),_(),()=>{if(v=!0,n.tryUnsubscribe(),n.onStateChange=null,y)throw y}}function dL(t,e){return t===e}function fL(t,e,n,{pure:i,areStatesEqual:a=dL,areOwnPropsEqual:s=_v,areStatePropsEqual:l=_v,areMergedPropsEqual:d=_v,forwardRef:f=!1,context:p=kC}={}){const g=p,v=Hk(t),y=Fk(e),_=$k(n),w=!!t;return A=>{const k=A.displayName||A.name||"Component",z=`Connect(${k})`,j={shouldHandleStateChanges:w,displayName:z,wrappedComponentName:k,WrappedComponent:A,initMapStateToProps:v,initMapDispatchToProps:y,initMergeProps:_,areStatesEqual:a,areStatePropsEqual:l,areOwnPropsEqual:s,areMergedPropsEqual:d};function P(U){const[Z,Q,et]=O.useMemo(()=>{const{reactReduxForwardedRef:Ut,...ye}=U;return[U.context,Ut,ye]},[U]),X=O.useMemo(()=>{let Ut=g;return Z!=null&&Z.Consumer,Ut},[Z,g]),R=O.useContext(X),dt=!!U.store&&!!U.store.getState&&!!U.store.dispatch,it=!!R&&!!R.store,ut=dt?U.store:R.store,I=it?R.getServerState:ut.getState,$=O.useMemo(()=>Bk(ut.dispatch,j),[ut]),[q,nt]=O.useMemo(()=>{if(!w)return oL;const Ut=MC(ut,dt?void 0:R.subscription),ye=Ut.notifyNestedSubs.bind(Ut);return[Ut,ye]},[ut,dt,R]),ot=O.useMemo(()=>dt?R:{...R,subscription:q},[dt,R,q]),F=O.useRef(void 0),K=O.useRef(et),at=O.useRef(void 0),mt=O.useRef(!1),pt=O.useRef(!1),yt=O.useRef(void 0);tp(()=>(pt.current=!0,()=>{pt.current=!1}),[]);const ft=O.useMemo(()=>()=>at.current&&et===K.current?at.current:$(ut.getState(),et),[ut,et]),Ht=O.useMemo(()=>ye=>q?uL(w,ut,q,$,K,F,mt,pt,at,nt,ye):()=>{},[q]);lL(cL,[K,F,mt,et,at,nt]);let Tt;try{Tt=O.useSyncExternalStore(Ht,ft,I?()=>$(I(),et):ft)}catch(Ut){throw yt.current&&(Ut.message+=`
|
||
The error may be correlated with this previous error:
|
||
${yt.current.stack}
|
||
|
||
`),Ut}tp(()=>{yt.current=void 0,at.current=void 0,F.current=Tt});const Mt=O.useMemo(()=>O.createElement(A,{...Tt,ref:Q}),[Q,A,Tt]);return O.useMemo(()=>w?O.createElement(X.Provider,{value:ot},Mt):Mt,[X,Mt,ot])}const V=O.memo(P);if(V.WrappedComponent=A,V.displayName=P.displayName=z,f){const Z=O.forwardRef(function(et,X){return O.createElement(V,{...et,reactReduxForwardedRef:X})});return Z.displayName=z,Z.WrappedComponent=A,fb(Z,A)}return fb(V,A)}}var LC=fL;function hL(t){const{children:e,context:n,serverState:i,store:a}=t,s=O.useMemo(()=>{const f=MC(a);return{store:a,subscription:f,getServerState:i?()=>i:void 0}},[a,i]),l=O.useMemo(()=>a.getState(),[a]);tp(()=>{const{subscription:f}=s;return f.onStateChange=f.notifyNestedSubs,f.trySubscribe(),l!==a.getState()&&f.notifyNestedSubs(),()=>{f.tryUnsubscribe(),f.onStateChange=void 0}},[s,l]);const d=n||kC;return O.createElement(d.Provider,{value:s},e)}var pL=hL,mL="Invariant failed";function gL(t,e){throw new Error(mL)}var ga=function(e){var n=e.top,i=e.right,a=e.bottom,s=e.left,l=i-s,d=a-n,f={top:n,right:i,bottom:a,left:s,width:l,height:d,x:s,y:n,center:{x:(i+s)/2,y:(a+n)/2}};return f},ly=function(e,n){return{top:e.top-n.top,left:e.left-n.left,bottom:e.bottom+n.bottom,right:e.right+n.right}},j1=function(e,n){return{top:e.top+n.top,left:e.left+n.left,bottom:e.bottom-n.bottom,right:e.right-n.right}},vL=function(e,n){return{top:e.top+n.y,left:e.left+n.x,bottom:e.bottom+n.y,right:e.right+n.x}},Cv={top:0,right:0,bottom:0,left:0},cy=function(e){var n=e.borderBox,i=e.margin,a=i===void 0?Cv:i,s=e.border,l=s===void 0?Cv:s,d=e.padding,f=d===void 0?Cv:d,p=ga(ly(n,a)),g=ga(j1(n,l)),v=ga(j1(g,f));return{marginBox:p,borderBox:ga(n),paddingBox:g,contentBox:v,margin:a,border:l,padding:f}},Ki=function(e){var n=e.slice(0,-2),i=e.slice(-2);if(i!=="px")return 0;var a=Number(n);return isNaN(a)&&gL(),a},bL=function(){return{x:window.pageXOffset,y:window.pageYOffset}},ep=function(e,n){var i=e.borderBox,a=e.border,s=e.margin,l=e.padding,d=vL(i,n);return cy({borderBox:d,border:a,margin:s,padding:l})},np=function(e,n){return n===void 0&&(n=bL()),ep(e,n)},zC=function(e,n){var i={top:Ki(n.marginTop),right:Ki(n.marginRight),bottom:Ki(n.marginBottom),left:Ki(n.marginLeft)},a={top:Ki(n.paddingTop),right:Ki(n.paddingRight),bottom:Ki(n.paddingBottom),left:Ki(n.paddingLeft)},s={top:Ki(n.borderTopWidth),right:Ki(n.borderRightWidth),bottom:Ki(n.borderBottomWidth),left:Ki(n.borderLeftWidth)};return cy({borderBox:e,margin:i,padding:a,border:s})},RC=function(e){var n=e.getBoundingClientRect(),i=window.getComputedStyle(e);return zC(n,i)},Xu=function(e){var n=[],i=null,a=function(){for(var l=arguments.length,d=new Array(l),f=0;f<l;f++)d[f]=arguments[f];n=d,!i&&(i=requestAnimationFrame(function(){i=null,e.apply(void 0,n)}))};return a.cancel=function(){i&&(cancelAnimationFrame(i),i=null)},a};function Ku(){return Ku=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)({}).hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Ku.apply(null,arguments)}function PC(t,e){}PC.bind(null,"warn");PC.bind(null,"error");function Cs(){}function yL(t,e){return{...t,...e}}function ta(t,e,n){const i=e.map(a=>{const s=yL(n,a.options);return t.addEventListener(a.eventName,a.fn,s),function(){t.removeEventListener(a.eventName,a.fn,s)}});return function(){i.forEach(s=>{s()})}}const xL="Invariant failed";class ip extends Error{}ip.prototype.toString=function(){return this.message};function Dt(t,e){throw new ip(xL)}class _L extends be.Component{constructor(...e){super(...e),this.callbacks=null,this.unbind=Cs,this.onWindowError=n=>{const i=this.getCallbacks();i.isDragging()&&i.tryAbort(),n.error instanceof ip&&n.preventDefault()},this.getCallbacks=()=>{if(!this.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return this.callbacks},this.setCallbacks=n=>{this.callbacks=n}}componentDidMount(){this.unbind=ta(window,[{eventName:"error",fn:this.onWindowError}])}componentDidCatch(e){if(e instanceof ip){this.setState({});return}throw e}componentWillUnmount(){this.unbind()}render(){return this.props.children(this.setCallbacks)}}const SL=`
|
||
Press space bar to start a drag.
|
||
When dragging you can use the arrow keys to move the item around and escape to cancel.
|
||
Some screen readers may require you to be in focus mode or to use your pass through key
|
||
`,ap=t=>t+1,wL=t=>`
|
||
You have lifted an item in position ${ap(t.source.index)}
|
||
`,NC=(t,e)=>{const n=t.droppableId===e.droppableId,i=ap(t.index),a=ap(e.index);return n?`
|
||
You have moved the item from position ${i}
|
||
to position ${a}
|
||
`:`
|
||
You have moved the item from position ${i}
|
||
in list ${t.droppableId}
|
||
to list ${e.droppableId}
|
||
in position ${a}
|
||
`},jC=(t,e,n)=>e.droppableId===n.droppableId?`
|
||
The item ${t}
|
||
has been combined with ${n.draggableId}`:`
|
||
The item ${t}
|
||
in list ${e.droppableId}
|
||
has been combined with ${n.draggableId}
|
||
in list ${n.droppableId}
|
||
`,CL=t=>{const e=t.destination;if(e)return NC(t.source,e);const n=t.combine;return n?jC(t.draggableId,t.source,n):"You are over an area that cannot be dropped on"},B1=t=>`
|
||
The item has returned to its starting position
|
||
of ${ap(t.index)}
|
||
`,EL=t=>{if(t.reason==="CANCEL")return`
|
||
Movement cancelled.
|
||
${B1(t.source)}
|
||
`;const e=t.destination,n=t.combine;return e?`
|
||
You have dropped the item.
|
||
${NC(t.source,e)}
|
||
`:n?`
|
||
You have dropped the item.
|
||
${jC(t.draggableId,t.source,n)}
|
||
`:`
|
||
The item has been dropped while not over a drop area.
|
||
${B1(t.source)}
|
||
`},Rh={dragHandleUsageInstructions:SL,onDragStart:wL,onDragUpdate:CL,onDragEnd:EL};function AL(t,e){return!!(t===e||Number.isNaN(t)&&Number.isNaN(e))}function BC(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(!AL(t[n],e[n]))return!1;return!0}function me(t,e){const n=O.useState(()=>({inputs:e,result:t()}))[0],i=O.useRef(!0),a=O.useRef(n),l=i.current||!!(e&&a.current.inputs&&BC(e,a.current.inputs))?a.current:{inputs:e,result:t()};return O.useEffect(()=>{i.current=!1,a.current=l},[l]),l.result}function $t(t,e){return me(()=>t,e)}const Bn={x:0,y:0},$n=(t,e)=>({x:t.x+e.x,y:t.y+e.y}),Pi=(t,e)=>({x:t.x-e.x,y:t.y-e.y}),Es=(t,e)=>t.x===e.x&&t.y===e.y,ac=t=>({x:t.x!==0?-t.x:0,y:t.y!==0?-t.y:0}),No=(t,e,n=0)=>t==="x"?{x:e,y:n}:{x:n,y:e},Qu=(t,e)=>Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2),I1=(t,e)=>Math.min(...e.map(n=>Qu(t,n))),IC=t=>e=>({x:t(e.x),y:t(e.y)});var TL=(t,e)=>{const n=ga({top:Math.max(e.top,t.top),right:Math.min(e.right,t.right),bottom:Math.min(e.bottom,t.bottom),left:Math.max(e.left,t.left)});return n.width<=0||n.height<=0?null:n};const Ed=(t,e)=>({top:t.top+e.y,left:t.left+e.x,bottom:t.bottom+e.y,right:t.right+e.x}),F1=t=>[{x:t.left,y:t.top},{x:t.right,y:t.top},{x:t.left,y:t.bottom},{x:t.right,y:t.bottom}],DL={top:0,right:0,bottom:0,left:0},ML=(t,e)=>e?Ed(t,e.scroll.diff.displacement):t,OL=(t,e,n)=>n&&n.increasedBy?{...t,[e.end]:t[e.end]+n.increasedBy[e.line]}:t,kL=(t,e)=>e&&e.shouldClipSubject?TL(e.pageMarginBox,t):ga(t);var Wl=({page:t,withPlaceholder:e,axis:n,frame:i})=>{const a=ML(t.marginBox,i),s=OL(a,n,e),l=kL(s,i);return{page:t,withPlaceholder:e,active:l}},uy=(t,e)=>{t.frame||Dt();const n=t.frame,i=Pi(e,n.scroll.initial),a=ac(i),s={...n,scroll:{initial:n.scroll.initial,current:e,diff:{value:i,displacement:a},max:n.scroll.max}},l=Wl({page:t.subject.page,withPlaceholder:t.subject.withPlaceholder,axis:t.axis,frame:s});return{...t,frame:s,subject:l}};function jn(t,e=BC){let n=null;function i(...a){if(n&&n.lastThis===this&&e(a,n.lastArgs))return n.lastResult;const s=t.apply(this,a);return n={lastResult:s,lastArgs:a,lastThis:this},s}return i.clear=function(){n=null},i}const FC=jn(t=>t.reduce((e,n)=>(e[n.descriptor.id]=n,e),{})),HC=jn(t=>t.reduce((e,n)=>(e[n.descriptor.id]=n,e),{})),Np=jn(t=>Object.values(t)),LL=jn(t=>Object.values(t));var rc=jn((t,e)=>LL(e).filter(i=>t===i.descriptor.droppableId).sort((i,a)=>i.descriptor.index-a.descriptor.index));function dy(t){return t.at&&t.at.type==="REORDER"?t.at.destination:null}function jp(t){return t.at&&t.at.type==="COMBINE"?t.at.combine:null}var Bp=jn((t,e)=>e.filter(n=>n.descriptor.id!==t.descriptor.id)),zL=({isMovingForward:t,draggable:e,destination:n,insideDestination:i,previousImpact:a})=>{if(!n.isCombineEnabled||!dy(a))return null;function l(_){const w={type:"COMBINE",combine:{draggableId:_,droppableId:n.descriptor.id}};return{...a,at:w}}const d=a.displaced.all,f=d.length?d[0]:null;if(t)return f?l(f):null;const p=Bp(e,i);if(!f){if(!p.length)return null;const _=p[p.length-1];return l(_.descriptor.id)}const g=p.findIndex(_=>_.descriptor.id===f);g===-1&&Dt();const v=g-1;if(v<0)return null;const y=p[v];return l(y.descriptor.id)},sc=(t,e)=>t.descriptor.droppableId===e.descriptor.id;const UC={point:Bn,value:0},Ju={invisible:{},visible:{},all:[]},RL={displaced:Ju,displacedBy:UC,at:null};var na=(t,e)=>n=>t<=n&&n<=e,VC=t=>{const e=na(t.top,t.bottom),n=na(t.left,t.right);return i=>{if(e(i.top)&&e(i.bottom)&&n(i.left)&&n(i.right))return!0;const s=e(i.top)||e(i.bottom),l=n(i.left)||n(i.right);if(s&&l)return!0;const f=i.top<t.top&&i.bottom>t.bottom,p=i.left<t.left&&i.right>t.right;return f&&p?!0:f&&l||p&&s}},PL=t=>{const e=na(t.top,t.bottom),n=na(t.left,t.right);return i=>e(i.top)&&e(i.bottom)&&n(i.left)&&n(i.right)};const fy={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},$C={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"};var NL=t=>e=>{const n=na(e.top,e.bottom),i=na(e.left,e.right);return a=>t===fy?n(a.top)&&n(a.bottom):i(a.left)&&i(a.right)};const jL=(t,e)=>{const n=e.frame?e.frame.scroll.diff.displacement:Bn;return Ed(t,n)},BL=(t,e,n)=>e.subject.active?n(e.subject.active)(t):!1,IL=(t,e,n)=>n(e)(t),hy=({target:t,destination:e,viewport:n,withDroppableDisplacement:i,isVisibleThroughFrameFn:a})=>{const s=i?jL(t,e):t;return BL(s,e,a)&&IL(s,n,a)},FL=t=>hy({...t,isVisibleThroughFrameFn:VC}),GC=t=>hy({...t,isVisibleThroughFrameFn:PL}),HL=t=>hy({...t,isVisibleThroughFrameFn:NL(t.destination.axis)}),UL=(t,e,n)=>{if(typeof n=="boolean")return n;if(!e)return!0;const{invisible:i,visible:a}=e;if(i[t])return!1;const s=a[t];return s?s.shouldAnimate:!0};function VL(t,e){const n=t.page.marginBox,i={top:e.point.y,right:0,bottom:0,left:e.point.x};return ga(ly(n,i))}function td({afterDragging:t,destination:e,displacedBy:n,viewport:i,forceShouldAnimate:a,last:s}){return t.reduce(function(d,f){const p=VL(f,n),g=f.descriptor.id;if(d.all.push(g),!FL({target:p,destination:e,viewport:i,withDroppableDisplacement:!0}))return d.invisible[f.descriptor.id]=!0,d;const y=UL(g,s,a),_={draggableId:g,shouldAnimate:y};return d.visible[g]=_,d},{all:[],visible:{},invisible:{}})}function $L(t,e){if(!t.length)return 0;const n=t[t.length-1].descriptor.index;return e.inHomeList?n:n+1}function H1({insideDestination:t,inHomeList:e,displacedBy:n,destination:i}){const a=$L(t,{inHomeList:e});return{displaced:Ju,displacedBy:n,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:a}}}}function rp({draggable:t,insideDestination:e,destination:n,viewport:i,displacedBy:a,last:s,index:l,forceShouldAnimate:d}){const f=sc(t,n);if(l==null)return H1({insideDestination:e,inHomeList:f,displacedBy:a,destination:n});const p=e.find(w=>w.descriptor.index===l);if(!p)return H1({insideDestination:e,inHomeList:f,displacedBy:a,destination:n});const g=Bp(t,e),v=e.indexOf(p),y=g.slice(v);return{displaced:td({afterDragging:y,destination:n,displacedBy:a,last:s,viewport:i.frame,forceShouldAnimate:d}),displacedBy:a,at:{type:"REORDER",destination:{droppableId:n.descriptor.id,index:l}}}}function Ds(t,e){return!!e.effected[t]}var GL=({isMovingForward:t,destination:e,draggables:n,combine:i,afterCritical:a})=>{if(!e.isCombineEnabled)return null;const s=i.draggableId,d=n[s].descriptor.index;return Ds(s,a)?t?d:d-1:t?d+1:d},WL=({isMovingForward:t,isInHomeList:e,insideDestination:n,location:i})=>{if(!n.length)return null;const a=i.index,s=t?a+1:a-1,l=n[0].descriptor.index,d=n[n.length-1].descriptor.index,f=e?d:d+1;return s<l||s>f?null:s},ZL=({isMovingForward:t,isInHomeList:e,draggable:n,draggables:i,destination:a,insideDestination:s,previousImpact:l,viewport:d,afterCritical:f})=>{const p=l.at;if(p||Dt(),p.type==="REORDER"){const v=WL({isMovingForward:t,isInHomeList:e,location:p.destination,insideDestination:s});return v==null?null:rp({draggable:n,insideDestination:s,destination:a,viewport:d,last:l.displaced,displacedBy:l.displacedBy,index:v})}const g=GL({isMovingForward:t,destination:a,displaced:l.displaced,draggables:i,combine:p.combine,afterCritical:f});return g==null?null:rp({draggable:n,insideDestination:s,destination:a,viewport:d,last:l.displaced,displacedBy:l.displacedBy,index:g})},qL=({displaced:t,afterCritical:e,combineWith:n,displacedBy:i})=>{const a=!!(t.visible[n]||t.invisible[n]);return Ds(n,e)?a?Bn:ac(i.point):a?i.point:Bn},YL=({afterCritical:t,impact:e,draggables:n})=>{const i=jp(e);i||Dt();const a=i.draggableId,s=n[a].page.borderBox.center,l=qL({displaced:e.displaced,afterCritical:t,combineWith:a,displacedBy:e.displacedBy});return $n(s,l)};const WC=(t,e)=>e.margin[t.start]+e.borderBox[t.size]/2,XL=(t,e)=>e.margin[t.end]+e.borderBox[t.size]/2,py=(t,e,n)=>e[t.crossAxisStart]+n.margin[t.crossAxisStart]+n.borderBox[t.crossAxisSize]/2,U1=({axis:t,moveRelativeTo:e,isMoving:n})=>No(t.line,e.marginBox[t.end]+WC(t,n),py(t,e.marginBox,n)),V1=({axis:t,moveRelativeTo:e,isMoving:n})=>No(t.line,e.marginBox[t.start]-XL(t,n),py(t,e.marginBox,n)),KL=({axis:t,moveInto:e,isMoving:n})=>No(t.line,e.contentBox[t.start]+WC(t,n),py(t,e.contentBox,n));var QL=({impact:t,draggable:e,draggables:n,droppable:i,afterCritical:a})=>{const s=rc(i.descriptor.id,n),l=e.page,d=i.axis;if(!s.length)return KL({axis:d,moveInto:i.page,isMoving:l});const{displaced:f,displacedBy:p}=t,g=f.all[0];if(g){const y=n[g];if(Ds(g,a))return V1({axis:d,moveRelativeTo:y.page,isMoving:l});const _=ep(y.page,p.point);return V1({axis:d,moveRelativeTo:_,isMoving:l})}const v=s[s.length-1];if(v.descriptor.id===e.descriptor.id)return l.borderBox.center;if(Ds(v.descriptor.id,a)){const y=ep(v.page,ac(a.displacedBy.point));return U1({axis:d,moveRelativeTo:y,isMoving:l})}return U1({axis:d,moveRelativeTo:v.page,isMoving:l})},hb=(t,e)=>{const n=t.frame;return n?$n(e,n.scroll.diff.displacement):e};const JL=({impact:t,draggable:e,droppable:n,draggables:i,afterCritical:a})=>{const s=e.page.borderBox.center,l=t.at;return!n||!l?s:l.type==="REORDER"?QL({impact:t,draggable:e,draggables:i,droppable:n,afterCritical:a}):YL({impact:t,draggables:i,afterCritical:a})};var Ip=t=>{const e=JL(t),n=t.droppable;return n?hb(n,e):e},ZC=(t,e)=>{const n=Pi(e,t.scroll.initial),i=ac(n);return{frame:ga({top:e.y,bottom:e.y+t.frame.height,left:e.x,right:e.x+t.frame.width}),scroll:{initial:t.scroll.initial,max:t.scroll.max,current:e,diff:{value:n,displacement:i}}}};function $1(t,e){return t.map(n=>e[n])}function tz(t,e){for(let n=0;n<e.length;n++){const i=e[n].visible[t];if(i)return i}return null}var ez=({impact:t,viewport:e,destination:n,draggables:i,maxScrollChange:a})=>{const s=ZC(e,$n(e.scroll.current,a)),l=n.frame?uy(n,$n(n.frame.scroll.current,a)):n,d=t.displaced,f=td({afterDragging:$1(d.all,i),destination:n,displacedBy:t.displacedBy,viewport:s.frame,last:d,forceShouldAnimate:!1}),p=td({afterDragging:$1(d.all,i),destination:l,displacedBy:t.displacedBy,viewport:e.frame,last:d,forceShouldAnimate:!1}),g={},v={},y=[d,f,p];return d.all.forEach(w=>{const C=tz(w,y);if(C){v[w]=C;return}g[w]=!0}),{...t,displaced:{all:d.all,invisible:g,visible:v}}},nz=(t,e)=>$n(t.scroll.diff.displacement,e),my=({pageBorderBoxCenter:t,draggable:e,viewport:n})=>{const i=nz(n,t),a=Pi(i,e.page.borderBox.center);return $n(e.client.borderBox.center,a)},qC=({draggable:t,destination:e,newPageBorderBoxCenter:n,viewport:i,withDroppableDisplacement:a,onlyOnMainAxis:s=!1})=>{const l=Pi(n,t.page.borderBox.center),f={target:Ed(t.page.borderBox,l),destination:e,withDroppableDisplacement:a,viewport:i};return s?HL(f):GC(f)},iz=({isMovingForward:t,draggable:e,destination:n,draggables:i,previousImpact:a,viewport:s,previousPageBorderBoxCenter:l,previousClientSelection:d,afterCritical:f})=>{if(!n.isEnabled)return null;const p=rc(n.descriptor.id,i),g=sc(e,n),v=zL({isMovingForward:t,draggable:e,destination:n,insideDestination:p,previousImpact:a})||ZL({isMovingForward:t,isInHomeList:g,draggable:e,draggables:i,destination:n,insideDestination:p,previousImpact:a,viewport:s,afterCritical:f});if(!v)return null;const y=Ip({impact:v,draggable:e,droppable:n,draggables:i,afterCritical:f});if(qC({draggable:e,destination:n,newPageBorderBoxCenter:y,viewport:s.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:my({pageBorderBoxCenter:y,draggable:e,viewport:s}),impact:v,scrollJumpRequest:null};const w=Pi(y,l),C=ez({impact:v,viewport:s,destination:n,draggables:i,maxScrollChange:w});return{clientSelection:d,impact:C,scrollJumpRequest:w}};const ri=t=>{const e=t.subject.active;return e||Dt(),e};var az=({isMovingForward:t,pageBorderBoxCenter:e,source:n,droppables:i,viewport:a})=>{const s=n.subject.active;if(!s)return null;const l=n.axis,d=na(s[l.start],s[l.end]),f=Np(i).filter(g=>g!==n).filter(g=>g.isEnabled).filter(g=>!!g.subject.active).filter(g=>VC(a.frame)(ri(g))).filter(g=>{const v=ri(g);return t?s[l.crossAxisEnd]<v[l.crossAxisEnd]:v[l.crossAxisStart]<s[l.crossAxisStart]}).filter(g=>{const v=ri(g),y=na(v[l.start],v[l.end]);return d(v[l.start])||d(v[l.end])||y(s[l.start])||y(s[l.end])}).sort((g,v)=>{const y=ri(g)[l.crossAxisStart],_=ri(v)[l.crossAxisStart];return t?y-_:_-y}).filter((g,v,y)=>ri(g)[l.crossAxisStart]===ri(y[0])[l.crossAxisStart]);if(!f.length)return null;if(f.length===1)return f[0];const p=f.filter(g=>na(ri(g)[l.start],ri(g)[l.end])(e[l.line]));return p.length===1?p[0]:p.length>1?p.sort((g,v)=>ri(g)[l.start]-ri(v)[l.start])[0]:f.sort((g,v)=>{const y=I1(e,F1(ri(g))),_=I1(e,F1(ri(v)));return y!==_?y-_:ri(g)[l.start]-ri(v)[l.start]})[0]};const G1=(t,e)=>{const n=t.page.borderBox.center;return Ds(t.descriptor.id,e)?Pi(n,e.displacedBy.point):n},rz=(t,e)=>{const n=t.page.borderBox;return Ds(t.descriptor.id,e)?Ed(n,ac(e.displacedBy.point)):n};var sz=({pageBorderBoxCenter:t,viewport:e,destination:n,insideDestination:i,afterCritical:a})=>i.filter(l=>GC({target:rz(l,a),destination:n,viewport:e.frame,withDroppableDisplacement:!0})).sort((l,d)=>{const f=Qu(t,hb(n,G1(l,a))),p=Qu(t,hb(n,G1(d,a)));return f<p?-1:p<f?1:l.descriptor.index-d.descriptor.index})[0]||null,Ad=jn(function(e,n){const i=n[e.line];return{value:i,point:No(e.line,i)}});const oz=(t,e,n)=>{const i=t.axis;if(t.descriptor.mode==="virtual")return No(i.line,e[i.line]);const a=t.subject.page.contentBox[i.size],f=rc(t.descriptor.id,n).reduce((p,g)=>p+g.client.marginBox[i.size],0)+e[i.line]-a;return f<=0?null:No(i.line,f)},YC=(t,e)=>({...t,scroll:{...t.scroll,max:e}}),XC=(t,e,n)=>{const i=t.frame;sc(e,t)&&Dt(),t.subject.withPlaceholder&&Dt();const a=Ad(t.axis,e.displaceBy).point,s=oz(t,a,n),l={placeholderSize:a,increasedBy:s,oldFrameMaxScroll:t.frame?t.frame.scroll.max:null};if(!i){const g=Wl({page:t.subject.page,withPlaceholder:l,axis:t.axis,frame:t.frame});return{...t,subject:g}}const d=s?$n(i.scroll.max,s):i.scroll.max,f=YC(i,d),p=Wl({page:t.subject.page,withPlaceholder:l,axis:t.axis,frame:f});return{...t,subject:p,frame:f}},lz=t=>{const e=t.subject.withPlaceholder;e||Dt();const n=t.frame;if(!n){const l=Wl({page:t.subject.page,axis:t.axis,frame:null,withPlaceholder:null});return{...t,subject:l}}const i=e.oldFrameMaxScroll;i||Dt();const a=YC(n,i),s=Wl({page:t.subject.page,axis:t.axis,frame:a,withPlaceholder:null});return{...t,subject:s,frame:a}};var cz=({previousPageBorderBoxCenter:t,moveRelativeTo:e,insideDestination:n,draggable:i,draggables:a,destination:s,viewport:l,afterCritical:d})=>{if(!e){if(n.length)return null;const v={displaced:Ju,displacedBy:UC,at:{type:"REORDER",destination:{droppableId:s.descriptor.id,index:0}}},y=Ip({impact:v,draggable:i,droppable:s,draggables:a,afterCritical:d}),_=sc(i,s)?s:XC(s,i,a);return qC({draggable:i,destination:_,newPageBorderBoxCenter:y,viewport:l.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?v:null}const f=t[s.axis.line]<=e.page.borderBox.center[s.axis.line],p=(()=>{const v=e.descriptor.index;return e.descriptor.id===i.descriptor.id||f?v:v+1})(),g=Ad(s.axis,i.displaceBy);return rp({draggable:i,insideDestination:n,destination:s,viewport:l,displacedBy:g,last:Ju,index:p})},uz=({isMovingForward:t,previousPageBorderBoxCenter:e,draggable:n,isOver:i,draggables:a,droppables:s,viewport:l,afterCritical:d})=>{const f=az({isMovingForward:t,pageBorderBoxCenter:e,source:i,droppables:s,viewport:l});if(!f)return null;const p=rc(f.descriptor.id,a),g=sz({pageBorderBoxCenter:e,viewport:l,destination:f,insideDestination:p,afterCritical:d}),v=cz({previousPageBorderBoxCenter:e,destination:f,draggable:n,draggables:a,moveRelativeTo:g,insideDestination:p,viewport:l,afterCritical:d});if(!v)return null;const y=Ip({impact:v,draggable:n,droppable:f,draggables:a,afterCritical:d});return{clientSelection:my({pageBorderBoxCenter:y,draggable:n,viewport:l}),impact:v,scrollJumpRequest:null}},Ni=t=>{const e=t.at;return e?e.type==="REORDER"?e.destination.droppableId:e.combine.droppableId:null};const dz=(t,e)=>{const n=Ni(t);return n?e[n]:null};var fz=({state:t,type:e})=>{const n=dz(t.impact,t.dimensions.droppables),i=!!n,a=t.dimensions.droppables[t.critical.droppable.id],s=n||a,l=s.axis.direction,d=l==="vertical"&&(e==="MOVE_UP"||e==="MOVE_DOWN")||l==="horizontal"&&(e==="MOVE_LEFT"||e==="MOVE_RIGHT");if(d&&!i)return null;const f=e==="MOVE_DOWN"||e==="MOVE_RIGHT",p=t.dimensions.draggables[t.critical.draggable.id],g=t.current.page.borderBoxCenter,{draggables:v,droppables:y}=t.dimensions;return d?iz({isMovingForward:f,previousPageBorderBoxCenter:g,draggable:p,destination:s,draggables:v,viewport:t.viewport,previousClientSelection:t.current.client.selection,previousImpact:t.impact,afterCritical:t.afterCritical}):uz({isMovingForward:f,previousPageBorderBoxCenter:g,draggable:p,isOver:s,draggables:v,droppables:y,viewport:t.viewport,afterCritical:t.afterCritical})};function Eo(t){return t.phase==="DRAGGING"||t.phase==="COLLECTING"}function KC(t){const e=na(t.top,t.bottom),n=na(t.left,t.right);return function(a){return e(a.y)&&n(a.x)}}function hz(t,e){return t.left<e.right&&t.right>e.left&&t.top<e.bottom&&t.bottom>e.top}function pz({pageBorderBox:t,draggable:e,candidates:n}){const i=e.page.borderBox.center,a=n.map(s=>{const l=s.axis,d=No(s.axis.line,t.center[l.line],s.page.borderBox.center[l.crossAxisLine]);return{id:s.descriptor.id,distance:Qu(i,d)}}).sort((s,l)=>l.distance-s.distance);return a[0]?a[0].id:null}function mz({pageBorderBox:t,draggable:e,droppables:n}){const i=Np(n).filter(a=>{if(!a.isEnabled)return!1;const s=a.subject.active;if(!s||!hz(t,s))return!1;if(KC(s)(t.center))return!0;const l=a.axis,d=s.center[l.crossAxisLine],f=t[l.crossAxisStart],p=t[l.crossAxisEnd],g=na(s[l.crossAxisStart],s[l.crossAxisEnd]),v=g(f),y=g(p);return!v&&!y?!0:v?f<d:p>d});return i.length?i.length===1?i[0].descriptor.id:pz({pageBorderBox:t,draggable:e,candidates:i}):null}const QC=(t,e)=>ga(Ed(t,e));var gz=(t,e)=>{const n=t.frame;return n?QC(e,n.scroll.diff.value):e};function JC({displaced:t,id:e}){return!!(t.visible[e]||t.invisible[e])}function vz({draggable:t,closest:e,inHomeList:n}){return e?n&&e.descriptor.index>t.descriptor.index?e.descriptor.index-1:e.descriptor.index:null}var bz=({pageBorderBoxWithDroppableScroll:t,draggable:e,destination:n,insideDestination:i,last:a,viewport:s,afterCritical:l})=>{const d=n.axis,f=Ad(n.axis,e.displaceBy),p=f.value,g=t[d.start],v=t[d.end],_=Bp(e,i).find(C=>{const A=C.descriptor.id,k=C.page.borderBox.center[d.line],z=Ds(A,l),j=JC({displaced:a,id:A});return z?j?v<=k:g<k-p:j?v<=k+p:g<k})||null,w=vz({draggable:e,closest:_,inHomeList:sc(e,n)});return rp({draggable:e,insideDestination:i,destination:n,viewport:s,last:a,displacedBy:f,index:w})};const yz=4;var xz=({draggable:t,pageBorderBoxWithDroppableScroll:e,previousImpact:n,destination:i,insideDestination:a,afterCritical:s})=>{if(!i.isCombineEnabled)return null;const l=i.axis,d=Ad(i.axis,t.displaceBy),f=d.value,p=e[l.start],g=e[l.end],y=Bp(t,a).find(w=>{const C=w.descriptor.id,A=w.page.borderBox,z=A[l.size]/yz,j=Ds(C,s),P=JC({displaced:n.displaced,id:C});return j?P?g>A[l.start]+z&&g<A[l.end]-z:p>A[l.start]-f+z&&p<A[l.end]-f-z:P?g>A[l.start]+f+z&&g<A[l.end]+f-z:p>A[l.start]+z&&p<A[l.end]-z});return y?{displacedBy:d,displaced:n.displaced,at:{type:"COMBINE",combine:{draggableId:y.descriptor.id,droppableId:i.descriptor.id}}}:null},tE=({pageOffset:t,draggable:e,draggables:n,droppables:i,previousImpact:a,viewport:s,afterCritical:l})=>{const d=QC(e.page.borderBox,t),f=mz({pageBorderBox:d,draggable:e,droppables:i});if(!f)return RL;const p=i[f],g=rc(p.descriptor.id,n),v=gz(p,d);return xz({pageBorderBoxWithDroppableScroll:v,draggable:e,previousImpact:a,destination:p,insideDestination:g,afterCritical:l})||bz({pageBorderBoxWithDroppableScroll:v,draggable:e,destination:p,insideDestination:g,last:a.displaced,viewport:s,afterCritical:l})},gy=(t,e)=>({...t,[e.descriptor.id]:e});const _z=({previousImpact:t,impact:e,droppables:n})=>{const i=Ni(t),a=Ni(e);if(!i||i===a)return n;const s=n[i];if(!s.subject.withPlaceholder)return n;const l=lz(s);return gy(n,l)};var Sz=({draggable:t,draggables:e,droppables:n,previousImpact:i,impact:a})=>{const s=_z({previousImpact:i,impact:a,droppables:n}),l=Ni(a);if(!l)return s;const d=n[l];if(sc(t,d)||d.subject.withPlaceholder)return s;const f=XC(d,t,e);return gy(s,f)},Fu=({state:t,clientSelection:e,dimensions:n,viewport:i,impact:a,scrollJumpRequest:s})=>{const l=i||t.viewport,d=n||t.dimensions,f=e||t.current.client.selection,p=Pi(f,t.initial.client.selection),g={offset:p,selection:f,borderBoxCenter:$n(t.initial.client.borderBoxCenter,p)},v={selection:$n(g.selection,l.scroll.current),borderBoxCenter:$n(g.borderBoxCenter,l.scroll.current),offset:$n(g.offset,l.scroll.diff.value)},y={client:g,page:v};if(t.phase==="COLLECTING")return{...t,dimensions:d,viewport:l,current:y};const _=d.draggables[t.critical.draggable.id],w=a||tE({pageOffset:v.offset,draggable:_,draggables:d.draggables,droppables:d.droppables,previousImpact:t.impact,viewport:l,afterCritical:t.afterCritical}),C=Sz({draggable:_,impact:w,previousImpact:t.impact,draggables:d.draggables,droppables:d.droppables});return{...t,current:y,dimensions:{draggables:d.draggables,droppables:C},impact:w,viewport:l,scrollJumpRequest:s||null,forceShouldAnimate:s?!1:null}};function wz(t,e){return t.map(n=>e[n])}var eE=({impact:t,viewport:e,draggables:n,destination:i,forceShouldAnimate:a})=>{const s=t.displaced,l=wz(s.all,n),d=td({afterDragging:l,destination:i,displacedBy:t.displacedBy,viewport:e.frame,forceShouldAnimate:a,last:s});return{...t,displaced:d}},nE=({impact:t,draggable:e,droppable:n,draggables:i,viewport:a,afterCritical:s})=>{const l=Ip({impact:t,draggable:e,draggables:i,droppable:n,afterCritical:s});return my({pageBorderBoxCenter:l,draggable:e,viewport:a})},iE=({state:t,dimensions:e,viewport:n})=>{t.movementMode!=="SNAP"&&Dt();const i=t.impact,a=n||t.viewport,s=e||t.dimensions,{draggables:l,droppables:d}=s,f=l[t.critical.draggable.id],p=Ni(i);p||Dt();const g=d[p],v=eE({impact:i,viewport:a,destination:g,draggables:l}),y=nE({impact:v,draggable:f,droppable:g,draggables:l,viewport:a,afterCritical:t.afterCritical});return Fu({impact:v,clientSelection:y,state:t,dimensions:s,viewport:a})},Cz=t=>({index:t.index,droppableId:t.droppableId}),aE=({draggable:t,home:e,draggables:n,viewport:i})=>{const a=Ad(e.axis,t.displaceBy),s=rc(e.descriptor.id,n),l=s.indexOf(t);l===-1&&Dt();const d=s.slice(l+1),f=d.reduce((y,_)=>(y[_.descriptor.id]=!0,y),{}),p={inVirtualList:e.descriptor.mode==="virtual",displacedBy:a,effected:f};return{impact:{displaced:td({afterDragging:d,destination:e,displacedBy:a,last:null,viewport:i.frame,forceShouldAnimate:!1}),displacedBy:a,at:{type:"REORDER",destination:Cz(t.descriptor)}},afterCritical:p}},Ez=(t,e)=>({draggables:t.draggables,droppables:gy(t.droppables,e)}),Az=({draggable:t,offset:e,initialWindowScroll:n})=>{const i=ep(t.client,e),a=np(i,n);return{...t,placeholder:{...t.placeholder,client:i},client:i,page:a}},Tz=t=>{const e=t.frame;return e||Dt(),e},Dz=({additions:t,updatedDroppables:e,viewport:n})=>{const i=n.scroll.diff.value;return t.map(a=>{const s=a.descriptor.droppableId,l=e[s],f=Tz(l).scroll.diff.value,p=$n(i,f);return Az({draggable:a,offset:p,initialWindowScroll:n.scroll.initial})})},Mz=({state:t,published:e})=>{const n=e.modified.map(k=>{const z=t.dimensions.droppables[k.droppableId];return uy(z,k.scroll)}),i={...t.dimensions.droppables,...FC(n)},a=HC(Dz({additions:e.additions,updatedDroppables:i,viewport:t.viewport})),s={...t.dimensions.draggables,...a};e.removals.forEach(k=>{delete s[k]});const l={droppables:i,draggables:s},d=Ni(t.impact),f=d?l.droppables[d]:null,p=l.draggables[t.critical.draggable.id],g=l.droppables[t.critical.droppable.id],{impact:v,afterCritical:y}=aE({draggable:p,home:g,draggables:s,viewport:t.viewport}),_=f&&f.isCombineEnabled?t.impact:v,w=tE({pageOffset:t.current.page.offset,draggable:l.draggables[t.critical.draggable.id],draggables:l.draggables,droppables:l.droppables,previousImpact:_,viewport:t.viewport,afterCritical:y}),C={...t,phase:"DRAGGING",impact:w,onLiftImpact:v,dimensions:l,afterCritical:y,forceShouldAnimate:!1};return t.phase==="COLLECTING"?C:{...C,phase:"DROP_PENDING",reason:t.reason,isWaiting:!1}};const pb=t=>t.movementMode==="SNAP",Ev=(t,e,n)=>{const i=Ez(t.dimensions,e);return!pb(t)||n?Fu({state:t,dimensions:i}):iE({state:t,dimensions:i})};function Av(t){return t.isDragging&&t.movementMode==="SNAP"?{...t,scrollJumpRequest:null}:t}const W1={phase:"IDLE",completed:null,shouldFlush:!1};var Oz=(t=W1,e)=>{if(e.type==="FLUSH")return{...W1,shouldFlush:!0};if(e.type==="INITIAL_PUBLISH"){t.phase!=="IDLE"&&Dt();const{critical:n,clientSelection:i,viewport:a,dimensions:s,movementMode:l}=e.payload,d=s.draggables[n.draggable.id],f=s.droppables[n.droppable.id],p={selection:i,borderBoxCenter:d.client.borderBox.center,offset:Bn},g={client:p,page:{selection:$n(p.selection,a.scroll.initial),borderBoxCenter:$n(p.selection,a.scroll.initial),offset:$n(p.selection,a.scroll.diff.value)}},v=Np(s.droppables).every(C=>!C.isFixedOnPage),{impact:y,afterCritical:_}=aE({draggable:d,home:f,draggables:s.draggables,viewport:a});return{phase:"DRAGGING",isDragging:!0,critical:n,movementMode:l,dimensions:s,initial:g,current:g,isWindowScrollAllowed:v,impact:y,afterCritical:_,onLiftImpact:y,viewport:a,scrollJumpRequest:null,forceShouldAnimate:null}}if(e.type==="COLLECTION_STARTING")return t.phase==="COLLECTING"||t.phase==="DROP_PENDING"?t:(t.phase!=="DRAGGING"&&Dt(),{...t,phase:"COLLECTING"});if(e.type==="PUBLISH_WHILE_DRAGGING")return t.phase==="COLLECTING"||t.phase==="DROP_PENDING"||Dt(),Mz({state:t,published:e.payload});if(e.type==="MOVE"){if(t.phase==="DROP_PENDING")return t;Eo(t)||Dt();const{client:n}=e.payload;return Es(n,t.current.client.selection)?t:Fu({state:t,clientSelection:n,impact:pb(t)?t.impact:null})}if(e.type==="UPDATE_DROPPABLE_SCROLL"){if(t.phase==="DROP_PENDING"||t.phase==="COLLECTING")return Av(t);Eo(t)||Dt();const{id:n,newScroll:i}=e.payload,a=t.dimensions.droppables[n];if(!a)return t;const s=uy(a,i);return Ev(t,s,!1)}if(e.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(t.phase==="DROP_PENDING")return t;Eo(t)||Dt();const{id:n,isEnabled:i}=e.payload,a=t.dimensions.droppables[n];a||Dt(),a.isEnabled===i&&Dt();const s={...a,isEnabled:i};return Ev(t,s,!0)}if(e.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(t.phase==="DROP_PENDING")return t;Eo(t)||Dt();const{id:n,isCombineEnabled:i}=e.payload,a=t.dimensions.droppables[n];a||Dt(),a.isCombineEnabled===i&&Dt();const s={...a,isCombineEnabled:i};return Ev(t,s,!0)}if(e.type==="MOVE_BY_WINDOW_SCROLL"){if(t.phase==="DROP_PENDING"||t.phase==="DROP_ANIMATING")return t;Eo(t)||Dt(),t.isWindowScrollAllowed||Dt();const n=e.payload.newScroll;if(Es(t.viewport.scroll.current,n))return Av(t);const i=ZC(t.viewport,n);return pb(t)?iE({state:t,viewport:i}):Fu({state:t,viewport:i})}if(e.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!Eo(t))return t;const n=e.payload.maxScroll;if(Es(n,t.viewport.scroll.max))return t;const i={...t.viewport,scroll:{...t.viewport.scroll,max:n}};return{...t,viewport:i}}if(e.type==="MOVE_UP"||e.type==="MOVE_DOWN"||e.type==="MOVE_LEFT"||e.type==="MOVE_RIGHT"){if(t.phase==="COLLECTING"||t.phase==="DROP_PENDING")return t;t.phase!=="DRAGGING"&&Dt();const n=fz({state:t,type:e.type});return n?Fu({state:t,impact:n.impact,clientSelection:n.clientSelection,scrollJumpRequest:n.scrollJumpRequest}):t}if(e.type==="DROP_PENDING"){const n=e.payload.reason;return t.phase!=="COLLECTING"&&Dt(),{...t,phase:"DROP_PENDING",isWaiting:!0,reason:n}}if(e.type==="DROP_ANIMATE"){const{completed:n,dropDuration:i,newHomeClientOffset:a}=e.payload;return t.phase==="DRAGGING"||t.phase==="DROP_PENDING"||Dt(),{phase:"DROP_ANIMATING",completed:n,dropDuration:i,newHomeClientOffset:a,dimensions:t.dimensions}}if(e.type==="DROP_COMPLETE"){const{completed:n}=e.payload;return{phase:"IDLE",completed:n,shouldFlush:!1}}return t};function Oe(t,e){return t instanceof Object&&"type"in t&&t.type===e}const kz=t=>({type:"BEFORE_INITIAL_CAPTURE",payload:t}),Lz=t=>({type:"LIFT",payload:t}),zz=t=>({type:"INITIAL_PUBLISH",payload:t}),Rz=t=>({type:"PUBLISH_WHILE_DRAGGING",payload:t}),Pz=()=>({type:"COLLECTION_STARTING",payload:null}),Nz=t=>({type:"UPDATE_DROPPABLE_SCROLL",payload:t}),jz=t=>({type:"UPDATE_DROPPABLE_IS_ENABLED",payload:t}),Bz=t=>({type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:t}),rE=t=>({type:"MOVE",payload:t}),Iz=t=>({type:"MOVE_BY_WINDOW_SCROLL",payload:t}),Fz=t=>({type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:t}),Hz=()=>({type:"MOVE_UP",payload:null}),Uz=()=>({type:"MOVE_DOWN",payload:null}),Vz=()=>({type:"MOVE_RIGHT",payload:null}),$z=()=>({type:"MOVE_LEFT",payload:null}),vy=()=>({type:"FLUSH",payload:null}),Gz=t=>({type:"DROP_ANIMATE",payload:t}),by=t=>({type:"DROP_COMPLETE",payload:t}),sE=t=>({type:"DROP",payload:t}),Wz=t=>({type:"DROP_PENDING",payload:t}),oE=()=>({type:"DROP_ANIMATION_FINISHED",payload:null});var Zz=t=>({getState:e,dispatch:n})=>i=>a=>{if(!Oe(a,"LIFT")){i(a);return}const{id:s,clientSelection:l,movementMode:d}=a.payload,f=e();f.phase==="DROP_ANIMATING"&&n(by({completed:f.completed})),e().phase!=="IDLE"&&Dt(),n(vy()),n(kz({draggableId:s,movementMode:d}));const g={draggableId:s,scrollOptions:{shouldPublishImmediately:d==="SNAP"}},{critical:v,dimensions:y,viewport:_}=t.startPublishing(g);n(zz({critical:v,dimensions:y,clientSelection:l,movementMode:d,viewport:_}))},qz=t=>()=>e=>n=>{Oe(n,"INITIAL_PUBLISH")&&t.dragging(),Oe(n,"DROP_ANIMATE")&&t.dropping(n.payload.completed.result.reason),(Oe(n,"FLUSH")||Oe(n,"DROP_COMPLETE"))&&t.resting(),e(n)};const yy={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},ed={opacity:{drop:0,combining:.7},scale:{drop:.75}},lE={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},yo=`${lE.outOfTheWay}s ${yy.outOfTheWay}`,Hu={fluid:`opacity ${yo}`,snap:`transform ${yo}, opacity ${yo}`,drop:t=>{const e=`${t}s ${yy.drop}`;return`transform ${e}, opacity ${e}`},outOfTheWay:`transform ${yo}`,placeholder:`height ${yo}, width ${yo}, margin ${yo}`},Z1=t=>Es(t,Bn)?void 0:`translate(${t.x}px, ${t.y}px)`,mb={moveTo:Z1,drop:(t,e)=>{const n=Z1(t);if(n)return e?`${n} scale(${ed.scale.drop})`:n}},{minDropTime:gb,maxDropTime:cE}=lE,Yz=cE-gb,q1=1500,Xz=.6;var Kz=({current:t,destination:e,reason:n})=>{const i=Qu(t,e);if(i<=0)return gb;if(i>=q1)return cE;const a=i/q1,s=gb+Yz*a,l=n==="CANCEL"?s*Xz:s;return Number(l.toFixed(2))},Qz=({impact:t,draggable:e,dimensions:n,viewport:i,afterCritical:a})=>{const{draggables:s,droppables:l}=n,d=Ni(t),f=d?l[d]:null,p=l[e.descriptor.droppableId],g=nE({impact:t,draggable:e,draggables:s,afterCritical:a,droppable:f||p,viewport:i});return Pi(g,e.client.borderBox.center)},Jz=({draggables:t,reason:e,lastImpact:n,home:i,viewport:a,onLiftImpact:s})=>!n.at||e!=="DROP"?{impact:eE({draggables:t,impact:s,destination:i,viewport:a,forceShouldAnimate:!0}),didDropInsideDroppable:!1}:n.at.type==="REORDER"?{impact:n,didDropInsideDroppable:!0}:{impact:{...n,displaced:Ju},didDropInsideDroppable:!0};const t3=({getState:t,dispatch:e})=>n=>i=>{if(!Oe(i,"DROP")){n(i);return}const a=t(),s=i.payload.reason;if(a.phase==="COLLECTING"){e(Wz({reason:s}));return}if(a.phase==="IDLE")return;a.phase==="DROP_PENDING"&&a.isWaiting&&Dt(),a.phase==="DRAGGING"||a.phase==="DROP_PENDING"||Dt();const d=a.critical,f=a.dimensions,p=f.draggables[a.critical.draggable.id],{impact:g,didDropInsideDroppable:v}=Jz({reason:s,lastImpact:a.impact,afterCritical:a.afterCritical,onLiftImpact:a.onLiftImpact,home:a.dimensions.droppables[a.critical.droppable.id],viewport:a.viewport,draggables:a.dimensions.draggables}),y=v?dy(g):null,_=v?jp(g):null,w={index:d.draggable.index,droppableId:d.droppable.id},C={draggableId:p.descriptor.id,type:p.descriptor.type,source:w,reason:s,mode:a.movementMode,destination:y,combine:_},A=Qz({impact:g,draggable:p,dimensions:f,viewport:a.viewport,afterCritical:a.afterCritical}),k={critical:a.critical,afterCritical:a.afterCritical,result:C,impact:g};if(!(!Es(a.current.client.offset,A)||!!C.combine)){e(by({completed:k}));return}const j=Kz({current:a.current.client.offset,destination:A,reason:s});e(Gz({newHomeClientOffset:A,dropDuration:j,completed:k}))};var uE=()=>({x:window.pageXOffset,y:window.pageYOffset});function e3(t){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:e=>{e.target!==window&&e.target!==window.document||t()}}}function n3({onWindowScroll:t}){function e(){t(uE())}const n=Xu(e),i=e3(n);let a=Cs;function s(){return a!==Cs}function l(){s()&&Dt(),a=ta(window,[i])}function d(){s()||Dt(),n.cancel(),a(),a=Cs}return{start:l,stop:d,isActive:s}}const i3=t=>Oe(t,"DROP_COMPLETE")||Oe(t,"DROP_ANIMATE")||Oe(t,"FLUSH"),a3=t=>{const e=n3({onWindowScroll:n=>{t.dispatch(Iz({newScroll:n}))}});return n=>i=>{!e.isActive()&&Oe(i,"INITIAL_PUBLISH")&&e.start(),e.isActive()&&i3(i)&&e.stop(),n(i)}};var r3=t=>{let e=!1,n=!1;const i=setTimeout(()=>{n=!0}),a=s=>{e||n||(e=!0,t(s),clearTimeout(i))};return a.wasCalled=()=>e,a},s3=()=>{const t=[],e=a=>{const s=t.findIndex(d=>d.timerId===a);s===-1&&Dt();const[l]=t.splice(s,1);l.callback()};return{add:a=>{const s=setTimeout(()=>e(s)),l={timerId:s,callback:a};t.push(l)},flush:()=>{if(!t.length)return;const a=[...t];t.length=0,a.forEach(s=>{clearTimeout(s.timerId),s.callback()})}}};const o3=(t,e)=>t==null&&e==null?!0:t==null||e==null?!1:t.droppableId===e.droppableId&&t.index===e.index,l3=(t,e)=>t==null&&e==null?!0:t==null||e==null?!1:t.draggableId===e.draggableId&&t.droppableId===e.droppableId,c3=(t,e)=>{if(t===e)return!0;const n=t.draggable.id===e.draggable.id&&t.draggable.droppableId===e.draggable.droppableId&&t.draggable.type===e.draggable.type&&t.draggable.index===e.draggable.index,i=t.droppable.id===e.droppable.id&&t.droppable.type===e.droppable.type;return n&&i},gu=(t,e)=>{e()},sh=(t,e)=>({draggableId:t.draggable.id,type:t.droppable.type,source:{droppableId:t.droppable.id,index:t.draggable.index},mode:e});function Tv(t,e,n,i){if(!t){n(i(e));return}const a=r3(n);t(e,{announce:a}),a.wasCalled()||n(i(e))}var u3=(t,e)=>{const n=s3();let i=null;const a=(v,y)=>{i&&Dt(),gu("onBeforeCapture",()=>{const _=t().onBeforeCapture;_&&_({draggableId:v,mode:y})})},s=(v,y)=>{i&&Dt(),gu("onBeforeDragStart",()=>{const _=t().onBeforeDragStart;_&&_(sh(v,y))})},l=(v,y)=>{i&&Dt();const _=sh(v,y);i={mode:y,lastCritical:v,lastLocation:_.source,lastCombine:null},n.add(()=>{gu("onDragStart",()=>Tv(t().onDragStart,_,e,Rh.onDragStart))})},d=(v,y)=>{const _=dy(y),w=jp(y);i||Dt();const C=!c3(v,i.lastCritical);C&&(i.lastCritical=v);const A=!o3(i.lastLocation,_);A&&(i.lastLocation=_);const k=!l3(i.lastCombine,w);if(k&&(i.lastCombine=w),!C&&!A&&!k)return;const z={...sh(v,i.mode),combine:w,destination:_};n.add(()=>{gu("onDragUpdate",()=>Tv(t().onDragUpdate,z,e,Rh.onDragUpdate))})},f=()=>{i||Dt(),n.flush()},p=v=>{i||Dt(),i=null,gu("onDragEnd",()=>Tv(t().onDragEnd,v,e,Rh.onDragEnd))};return{beforeCapture:a,beforeStart:s,start:l,update:d,flush:f,drop:p,abort:()=>{if(!i)return;const v={...sh(i.lastCritical,i.mode),combine:null,destination:null,reason:"CANCEL"};p(v)}}},d3=(t,e)=>{const n=u3(t,e);return i=>a=>s=>{if(Oe(s,"BEFORE_INITIAL_CAPTURE")){n.beforeCapture(s.payload.draggableId,s.payload.movementMode);return}if(Oe(s,"INITIAL_PUBLISH")){const d=s.payload.critical;n.beforeStart(d,s.payload.movementMode),a(s),n.start(d,s.payload.movementMode);return}if(Oe(s,"DROP_COMPLETE")){const d=s.payload.completed.result;n.flush(),a(s),n.drop(d);return}if(a(s),Oe(s,"FLUSH")){n.abort();return}const l=i.getState();l.phase==="DRAGGING"&&n.update(l.critical,l.impact)}};const f3=t=>e=>n=>{if(!Oe(n,"DROP_ANIMATION_FINISHED")){e(n);return}const i=t.getState();i.phase!=="DROP_ANIMATING"&&Dt(),t.dispatch(by({completed:i.completed}))},h3=t=>{let e=null,n=null;function i(){n&&(cancelAnimationFrame(n),n=null),e&&(e(),e=null)}return a=>s=>{if((Oe(s,"FLUSH")||Oe(s,"DROP_COMPLETE")||Oe(s,"DROP_ANIMATION_FINISHED"))&&i(),a(s),!Oe(s,"DROP_ANIMATE"))return;const l={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){t.getState().phase==="DROP_ANIMATING"&&t.dispatch(oE())}};n=requestAnimationFrame(()=>{n=null,e=ta(window,[l])})}};var p3=t=>()=>e=>n=>{(Oe(n,"DROP_COMPLETE")||Oe(n,"FLUSH")||Oe(n,"DROP_ANIMATE"))&&t.stopPublishing(),e(n)},m3=t=>{let e=!1;return()=>n=>i=>{if(Oe(i,"INITIAL_PUBLISH")){e=!0,t.tryRecordFocus(i.payload.critical.draggable.id),n(i),t.tryRestoreFocusRecorded();return}if(n(i),!!e){if(Oe(i,"FLUSH")){e=!1,t.tryRestoreFocusRecorded();return}if(Oe(i,"DROP_COMPLETE")){e=!1;const a=i.payload.completed.result;a.combine&&t.tryShiftRecord(a.draggableId,a.combine.draggableId),t.tryRestoreFocusRecorded()}}}};const g3=t=>Oe(t,"DROP_COMPLETE")||Oe(t,"DROP_ANIMATE")||Oe(t,"FLUSH");var v3=t=>e=>n=>i=>{if(g3(i)){t.stop(),n(i);return}if(Oe(i,"INITIAL_PUBLISH")){n(i);const a=e.getState();a.phase!=="DRAGGING"&&Dt(),t.start(a);return}n(i),t.scroll(e.getState())};const b3=t=>e=>n=>{if(e(n),!Oe(n,"PUBLISH_WHILE_DRAGGING"))return;const i=t.getState();i.phase==="DROP_PENDING"&&(i.isWaiting||t.dispatch(sE({reason:i.reason})))},y3=AC;var x3=({dimensionMarshal:t,focusMarshal:e,styleMarshal:n,getResponders:i,announce:a,autoScroller:s})=>EC(Oz,y3(yk(qz(n),p3(t),Zz(t),t3,f3,h3,b3,v3(s),a3,m3(e),d3(i,a))));const Dv=()=>({additions:{},removals:{},modified:{}});function _3({registry:t,callbacks:e}){let n=Dv(),i=null;const a=()=>{i||(e.collectionStarting(),i=requestAnimationFrame(()=>{i=null;const{additions:f,removals:p,modified:g}=n,v=Object.keys(f).map(w=>t.draggable.getById(w).getDimension(Bn)).sort((w,C)=>w.descriptor.index-C.descriptor.index),y=Object.keys(g).map(w=>{const A=t.droppable.getById(w).callbacks.getScrollWhileDragging();return{droppableId:w,scroll:A}}),_={additions:v,removals:Object.keys(p),modified:y};n=Dv(),e.publish(_)}))};return{add:f=>{const p=f.descriptor.id;n.additions[p]=f,n.modified[f.descriptor.droppableId]=!0,n.removals[p]&&delete n.removals[p],a()},remove:f=>{const p=f.descriptor;n.removals[p.id]=!0,n.modified[p.droppableId]=!0,n.additions[p.id]&&delete n.additions[p.id],a()},stop:()=>{i&&(cancelAnimationFrame(i),i=null,n=Dv())}}}var dE=({scrollHeight:t,scrollWidth:e,height:n,width:i})=>{const a=Pi({x:e,y:t},{x:i,y:n});return{x:Math.max(0,a.x),y:Math.max(0,a.y)}},fE=()=>{const t=document.documentElement;return t||Dt(),t},hE=()=>{const t=fE();return dE({scrollHeight:t.scrollHeight,scrollWidth:t.scrollWidth,width:t.clientWidth,height:t.clientHeight})},S3=()=>{const t=uE(),e=hE(),n=t.y,i=t.x,a=fE(),s=a.clientWidth,l=a.clientHeight,d=i+s,f=n+l;return{frame:ga({top:n,left:i,right:d,bottom:f}),scroll:{initial:t,current:t,max:e,diff:{value:Bn,displacement:Bn}}}},w3=({critical:t,scrollOptions:e,registry:n})=>{const i=S3(),a=i.scroll.current,s=t.droppable,l=n.droppable.getAllByType(s.type).map(g=>g.callbacks.getDimensionAndWatchScroll(a,e)),d=n.draggable.getAllByType(t.draggable.type).map(g=>g.getDimension(a));return{dimensions:{draggables:HC(d),droppables:FC(l)},critical:t,viewport:i}};function Y1(t,e,n){return!(n.descriptor.id===e.id||n.descriptor.type!==e.type||t.droppable.getById(n.descriptor.droppableId).descriptor.mode!=="virtual")}var C3=(t,e)=>{let n=null;const i=_3({callbacks:{publish:e.publishWhileDragging,collectionStarting:e.collectionStarting},registry:t}),a=(y,_)=>{t.droppable.exists(y)||Dt(),n&&e.updateDroppableIsEnabled({id:y,isEnabled:_})},s=(y,_)=>{n&&(t.droppable.exists(y)||Dt(),e.updateDroppableIsCombineEnabled({id:y,isCombineEnabled:_}))},l=(y,_)=>{n&&(t.droppable.exists(y)||Dt(),e.updateDroppableScroll({id:y,newScroll:_}))},d=(y,_)=>{n&&t.droppable.getById(y).callbacks.scroll(_)},f=()=>{if(!n)return;i.stop();const y=n.critical.droppable;t.droppable.getAllByType(y.type).forEach(_=>_.callbacks.dragStopped()),n.unsubscribe(),n=null},p=y=>{n||Dt();const _=n.critical.draggable;y.type==="ADDITION"&&Y1(t,_,y.value)&&i.add(y.value),y.type==="REMOVAL"&&Y1(t,_,y.value)&&i.remove(y.value)};return{updateDroppableIsEnabled:a,updateDroppableIsCombineEnabled:s,scrollDroppable:d,updateDroppableScroll:l,startPublishing:y=>{n&&Dt();const _=t.draggable.getById(y.draggableId),w=t.droppable.getById(_.descriptor.droppableId),C={draggable:_.descriptor,droppable:w.descriptor},A=t.subscribe(p);return n={critical:C,unsubscribe:A},w3({critical:C,registry:t,scrollOptions:y.scrollOptions})},stopPublishing:f}},pE=(t,e)=>t.phase==="IDLE"?!0:t.phase!=="DROP_ANIMATING"||t.completed.result.draggableId===e?!1:t.completed.result.reason==="DROP",E3=t=>{window.scrollBy(t.x,t.y)};const A3=jn(t=>Np(t).filter(e=>!(!e.isEnabled||!e.frame))),T3=(t,e)=>A3(e).find(i=>(i.frame||Dt(),KC(i.frame.pageMarginBox)(t)))||null;var D3=({center:t,destination:e,droppables:n})=>{if(e){const a=n[e];return a.frame?a:null}return T3(t,n)};const nd={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:t=>t**2,durationDampening:{stopDampeningAt:1200,accelerateAt:360},disabled:!1};var M3=(t,e,n=()=>nd)=>{const i=n(),a=t[e.size]*i.startFromPercentage,s=t[e.size]*i.maxScrollAtPercentage;return{startScrollingFrom:a,maxScrollValueAt:s}},mE=({startOfRange:t,endOfRange:e,current:n})=>{const i=e-t;return i===0?0:(n-t)/i},xy=1,O3=(t,e,n=()=>nd)=>{const i=n();if(t>e.startScrollingFrom)return 0;if(t<=e.maxScrollValueAt)return i.maxPixelScroll;if(t===e.startScrollingFrom)return xy;const s=1-mE({startOfRange:e.maxScrollValueAt,endOfRange:e.startScrollingFrom,current:t}),l=i.maxPixelScroll*i.ease(s);return Math.ceil(l)},k3=(t,e,n)=>{const i=n(),a=i.durationDampening.accelerateAt,s=i.durationDampening.stopDampeningAt,l=e,d=s,p=Date.now()-l;if(p>=s)return t;if(p<a)return xy;const g=mE({startOfRange:a,endOfRange:d,current:p}),v=t*i.ease(g);return Math.ceil(v)},X1=({distanceToEdge:t,thresholds:e,dragStartTime:n,shouldUseTimeDampening:i,getAutoScrollerOptions:a})=>{const s=O3(t,e,a);return s===0?0:i?Math.max(k3(s,n,a),xy):s},K1=({container:t,distanceToEdges:e,dragStartTime:n,axis:i,shouldUseTimeDampening:a,getAutoScrollerOptions:s})=>{const l=M3(t,i,s);return e[i.end]<e[i.start]?X1({distanceToEdge:e[i.end],thresholds:l,dragStartTime:n,shouldUseTimeDampening:a,getAutoScrollerOptions:s}):-1*X1({distanceToEdge:e[i.start],thresholds:l,dragStartTime:n,shouldUseTimeDampening:a,getAutoScrollerOptions:s})},L3=({container:t,subject:e,proposedScroll:n})=>{const i=e.height>t.height,a=e.width>t.width;return!a&&!i?n:a&&i?null:{x:a?0:n.x,y:i?0:n.y}};const z3=IC(t=>t===0?0:t);var gE=({dragStartTime:t,container:e,subject:n,center:i,shouldUseTimeDampening:a,getAutoScrollerOptions:s})=>{const l={top:i.y-e.top,right:e.right-i.x,bottom:e.bottom-i.y,left:i.x-e.left},d=K1({container:e,distanceToEdges:l,dragStartTime:t,axis:fy,shouldUseTimeDampening:a,getAutoScrollerOptions:s}),f=K1({container:e,distanceToEdges:l,dragStartTime:t,axis:$C,shouldUseTimeDampening:a,getAutoScrollerOptions:s}),p=z3({x:f,y:d});if(Es(p,Bn))return null;const g=L3({container:e,subject:n,proposedScroll:p});return g?Es(g,Bn)?null:g:null};const R3=IC(t=>t===0?0:t>0?1:-1),_y=(()=>{const t=(e,n)=>e<0?e:e>n?e-n:0;return({current:e,max:n,change:i})=>{const a=$n(e,i),s={x:t(a.x,n.x),y:t(a.y,n.y)};return Es(s,Bn)?null:s}})(),vE=({max:t,current:e,change:n})=>{const i={x:Math.max(e.x,t.x),y:Math.max(e.y,t.y)},a=R3(n),s=_y({max:i,current:e,change:a});return!s||a.x!==0&&s.x===0||a.y!==0&&s.y===0},Sy=(t,e)=>vE({current:t.scroll.current,max:t.scroll.max,change:e}),P3=(t,e)=>{if(!Sy(t,e))return null;const n=t.scroll.max,i=t.scroll.current;return _y({current:i,max:n,change:e})},wy=(t,e)=>{const n=t.frame;return n?vE({current:n.scroll.current,max:n.scroll.max,change:e}):!1},N3=(t,e)=>{const n=t.frame;return!n||!wy(t,e)?null:_y({current:n.scroll.current,max:n.scroll.max,change:e})};var j3=({viewport:t,subject:e,center:n,dragStartTime:i,shouldUseTimeDampening:a,getAutoScrollerOptions:s})=>{const l=gE({dragStartTime:i,container:t.frame,subject:e,center:n,shouldUseTimeDampening:a,getAutoScrollerOptions:s});return l&&Sy(t,l)?l:null},B3=({droppable:t,subject:e,center:n,dragStartTime:i,shouldUseTimeDampening:a,getAutoScrollerOptions:s})=>{const l=t.frame;if(!l)return null;const d=gE({dragStartTime:i,container:l.pageMarginBox,subject:e,center:n,shouldUseTimeDampening:a,getAutoScrollerOptions:s});return d&&wy(t,d)?d:null},Q1=({state:t,dragStartTime:e,shouldUseTimeDampening:n,scrollWindow:i,scrollDroppable:a,getAutoScrollerOptions:s})=>{const l=t.current.page.borderBoxCenter,f=t.dimensions.draggables[t.critical.draggable.id].page.marginBox;if(t.isWindowScrollAllowed){const v=t.viewport,y=j3({dragStartTime:e,viewport:v,subject:f,center:l,shouldUseTimeDampening:n,getAutoScrollerOptions:s});if(y){i(y);return}}const p=D3({center:l,destination:Ni(t.impact),droppables:t.dimensions.droppables});if(!p)return;const g=B3({dragStartTime:e,droppable:p,subject:f,center:l,shouldUseTimeDampening:n,getAutoScrollerOptions:s});g&&a(p.descriptor.id,g)},I3=({scrollWindow:t,scrollDroppable:e,getAutoScrollerOptions:n=()=>nd})=>{const i=Xu(t),a=Xu(e);let s=null;const l=p=>{s||Dt();const{shouldUseTimeDampening:g,dragStartTime:v}=s;Q1({state:p,scrollWindow:i,scrollDroppable:a,dragStartTime:v,shouldUseTimeDampening:g,getAutoScrollerOptions:n})};return{start:p=>{s&&Dt();const g=Date.now();let v=!1;const y=()=>{v=!0};Q1({state:p,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:y,scrollDroppable:y,getAutoScrollerOptions:n}),s={dragStartTime:g,shouldUseTimeDampening:v},v&&l(p)},stop:()=>{s&&(i.cancel(),a.cancel(),s=null)},scroll:l}},F3=({move:t,scrollDroppable:e,scrollWindow:n})=>{const i=(d,f)=>{const p=$n(d.current.client.selection,f);t({client:p})},a=(d,f)=>{if(!wy(d,f))return f;const p=N3(d,f);if(!p)return e(d.descriptor.id,f),null;const g=Pi(f,p);return e(d.descriptor.id,g),Pi(f,g)},s=(d,f,p)=>{if(!d||!Sy(f,p))return p;const g=P3(f,p);if(!g)return n(p),null;const v=Pi(p,g);return n(v),Pi(p,v)};return d=>{const f=d.scrollJumpRequest;if(!f)return;const p=Ni(d.impact);p||Dt();const g=a(d.dimensions.droppables[p],f);if(!g)return;const v=d.viewport,y=s(d.isWindowScrollAllowed,v,g);y&&i(d,y)}},H3=({scrollDroppable:t,scrollWindow:e,move:n,getAutoScrollerOptions:i})=>{const a=I3({scrollWindow:e,scrollDroppable:t,getAutoScrollerOptions:i}),s=F3({move:n,scrollWindow:e,scrollDroppable:t});return{scroll:f=>{if(!(i().disabled||f.phase!=="DRAGGING")){if(f.movementMode==="FLUID"){a.scroll(f);return}f.scrollJumpRequest&&s(f)}},start:a.start,stop:a.stop}};const Zl="data-rfd",ql=(()=>{const t=`${Zl}-drag-handle`;return{base:t,draggableId:`${t}-draggable-id`,contextId:`${t}-context-id`}})(),vb=(()=>{const t=`${Zl}-draggable`;return{base:t,contextId:`${t}-context-id`,id:`${t}-id`}})(),U3=(()=>{const t=`${Zl}-droppable`;return{base:t,contextId:`${t}-context-id`,id:`${t}-id`}})(),J1={contextId:`${Zl}-scroll-container-context-id`},V3=t=>e=>`[${e}="${t}"]`,vu=(t,e)=>t.map(n=>{const i=n.styles[e];return i?`${n.selector} { ${i} }`:""}).join(" "),$3="pointer-events: none;";var G3=t=>{const e=V3(t),n=(()=>{const d=`
|
||
cursor: -webkit-grab;
|
||
cursor: grab;
|
||
`;return{selector:e(ql.contextId),styles:{always:`
|
||
-webkit-touch-callout: none;
|
||
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
||
touch-action: manipulation;
|
||
`,resting:d,dragging:$3,dropAnimating:d}}})(),i=(()=>{const d=`
|
||
transition: ${Hu.outOfTheWay};
|
||
`;return{selector:e(vb.contextId),styles:{dragging:d,dropAnimating:d,userCancel:d}}})(),a={selector:e(U3.contextId),styles:{always:"overflow-anchor: none;"}},l=[i,n,a,{selector:"body",styles:{dragging:`
|
||
cursor: grabbing;
|
||
cursor: -webkit-grabbing;
|
||
user-select: none;
|
||
-webkit-user-select: none;
|
||
-moz-user-select: none;
|
||
-ms-user-select: none;
|
||
overflow-anchor: none;
|
||
`}}];return{always:vu(l,"always"),resting:vu(l,"resting"),dragging:vu(l,"dragging"),dropAnimating:vu(l,"dropAnimating"),userCancel:vu(l,"userCancel")}};const ji=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?O.useLayoutEffect:O.useEffect,Mv=()=>{const t=document.querySelector("head");return t||Dt(),t},tS=t=>{const e=document.createElement("style");return t&&e.setAttribute("nonce",t),e.type="text/css",e};function W3(t,e){const n=me(()=>G3(t),[t]),i=O.useRef(null),a=O.useRef(null),s=$t(jn(v=>{const y=a.current;y||Dt(),y.textContent=v}),[]),l=$t(v=>{const y=i.current;y||Dt(),y.textContent=v},[]);ji(()=>{!i.current&&!a.current||Dt();const v=tS(e),y=tS(e);return i.current=v,a.current=y,v.setAttribute(`${Zl}-always`,t),y.setAttribute(`${Zl}-dynamic`,t),Mv().appendChild(v),Mv().appendChild(y),l(n.always),s(n.resting),()=>{const _=w=>{const C=w.current;C||Dt(),Mv().removeChild(C),w.current=null};_(i),_(a)}},[e,l,s,n.always,n.resting,t]);const d=$t(()=>s(n.dragging),[s,n.dragging]),f=$t(v=>{if(v==="DROP"){s(n.dropAnimating);return}s(n.userCancel)},[s,n.dropAnimating,n.userCancel]),p=$t(()=>{a.current&&s(n.resting)},[s,n.resting]);return me(()=>({dragging:d,dropping:f,resting:p}),[d,f,p])}function bE(t,e){return Array.from(t.querySelectorAll(e))}var yE=t=>t&&t.ownerDocument&&t.ownerDocument.defaultView?t.ownerDocument.defaultView:window;function Fp(t){return t instanceof yE(t).HTMLElement}function Z3(t,e){const n=`[${ql.contextId}="${t}"]`,i=bE(document,n);if(!i.length)return null;const a=i.find(s=>s.getAttribute(ql.draggableId)===e);return!a||!Fp(a)?null:a}function q3(t){const e=O.useRef({}),n=O.useRef(null),i=O.useRef(null),a=O.useRef(!1),s=$t(function(y,_){const w={id:y,focus:_};return e.current[y]=w,function(){const A=e.current;A[y]!==w&&delete A[y]}},[]),l=$t(function(y){const _=Z3(t,y);_&&_!==document.activeElement&&_.focus()},[t]),d=$t(function(y,_){n.current===y&&(n.current=_)},[]),f=$t(function(){i.current||a.current&&(i.current=requestAnimationFrame(()=>{i.current=null;const y=n.current;y&&l(y)}))},[l]),p=$t(function(y){n.current=null;const _=document.activeElement;_&&_.getAttribute(ql.draggableId)===y&&(n.current=y)},[]);return ji(()=>(a.current=!0,function(){a.current=!1;const y=i.current;y&&cancelAnimationFrame(y)}),[]),me(()=>({register:s,tryRecordFocus:p,tryRestoreFocusRecorded:f,tryShiftRecord:d}),[s,p,f,d])}function Y3(){const t={draggables:{},droppables:{}},e=[];function n(v){return e.push(v),function(){const _=e.indexOf(v);_!==-1&&e.splice(_,1)}}function i(v){e.length&&e.forEach(y=>y(v))}function a(v){return t.draggables[v]||null}function s(v){const y=a(v);return y||Dt(),y}const l={register:v=>{t.draggables[v.descriptor.id]=v,i({type:"ADDITION",value:v})},update:(v,y)=>{const _=t.draggables[y.descriptor.id];_&&_.uniqueId===v.uniqueId&&(delete t.draggables[y.descriptor.id],t.draggables[v.descriptor.id]=v)},unregister:v=>{const y=v.descriptor.id,_=a(y);_&&v.uniqueId===_.uniqueId&&(delete t.draggables[y],t.droppables[v.descriptor.droppableId]&&i({type:"REMOVAL",value:v}))},getById:s,findById:a,exists:v=>!!a(v),getAllByType:v=>Object.values(t.draggables).filter(y=>y.descriptor.type===v)};function d(v){return t.droppables[v]||null}function f(v){const y=d(v);return y||Dt(),y}const p={register:v=>{t.droppables[v.descriptor.id]=v},unregister:v=>{const y=d(v.descriptor.id);y&&v.uniqueId===y.uniqueId&&delete t.droppables[v.descriptor.id]},getById:f,findById:d,exists:v=>!!d(v),getAllByType:v=>Object.values(t.droppables).filter(y=>y.descriptor.type===v)};function g(){t.draggables={},t.droppables={},e.length=0}return{draggable:l,droppable:p,subscribe:n,clean:g}}function X3(){const t=me(Y3,[]);return O.useEffect(()=>function(){t.clean()},[t]),t}var Cy=be.createContext(null),sp=()=>{const t=document.body;return t||Dt(),t};const K3={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},Q3=t=>`rfd-announcement-${t}`;function J3(t){const e=me(()=>Q3(t),[t]),n=O.useRef(null);return O.useEffect(function(){const s=document.createElement("div");return n.current=s,s.id=e,s.setAttribute("aria-live","assertive"),s.setAttribute("aria-atomic","true"),Ku(s.style,K3),sp().appendChild(s),function(){setTimeout(function(){const f=sp();f.contains(s)&&f.removeChild(s),s===n.current&&(n.current=null)})}},[e]),$t(a=>{const s=n.current;if(s){s.textContent=a;return}},[])}const tR={separator:"::"};function Ey(t,e=tR){const n=be.useId();return me(()=>`${t}${e.separator}${n}`,[e.separator,t,n])}function eR({contextId:t,uniqueId:e}){return`rfd-hidden-text-${t}-${e}`}function nR({contextId:t,text:e}){const n=Ey("hidden-text",{separator:"-"}),i=me(()=>eR({contextId:t,uniqueId:n}),[n,t]);return O.useEffect(function(){const s=document.createElement("div");return s.id=i,s.textContent=e,s.style.display="none",sp().appendChild(s),function(){const d=sp();d.contains(s)&&d.removeChild(s)}},[i,e]),i}var Hp=be.createContext(null);function xE(t){const e=O.useRef(t);return O.useEffect(()=>{e.current=t}),e}function iR(){let t=null;function e(){return!!t}function n(l){return l===t}function i(l){t&&Dt();const d={abandon:l};return t=d,d}function a(){t||Dt(),t=null}function s(){t&&(t.abandon(),a())}return{isClaimed:e,isActive:n,claim:i,release:a,tryAbandon:s}}function id(t){return t.phase==="IDLE"||t.phase==="DROP_ANIMATING"?!1:t.isDragging}const aR=9,rR=13,Ay=27,_E=32,sR=33,oR=34,lR=35,cR=36,uR=37,dR=38,fR=39,hR=40,pR={[rR]:!0,[aR]:!0};var SE=t=>{pR[t.keyCode]&&t.preventDefault()};const Up=(()=>{const t="visibilitychange";return typeof document>"u"?t:[t,`ms${t}`,`webkit${t}`,`moz${t}`,`o${t}`].find(i=>`on${i}`in document)||t})(),wE=0,eS=5;function mR(t,e){return Math.abs(e.x-t.x)>=eS||Math.abs(e.y-t.y)>=eS}const nS={type:"IDLE"};function gR({cancel:t,completed:e,getPhase:n,setPhase:i}){return[{eventName:"mousemove",fn:a=>{const{button:s,clientX:l,clientY:d}=a;if(s!==wE)return;const f={x:l,y:d},p=n();if(p.type==="DRAGGING"){a.preventDefault(),p.actions.move(f);return}p.type!=="PENDING"&&Dt();const g=p.point;if(!mR(g,f))return;a.preventDefault();const v=p.actions.fluidLift(f);i({type:"DRAGGING",actions:v})}},{eventName:"mouseup",fn:a=>{const s=n();if(s.type!=="DRAGGING"){t();return}a.preventDefault(),s.actions.drop({shouldBlockNextClick:!0}),e()}},{eventName:"mousedown",fn:a=>{n().type==="DRAGGING"&&a.preventDefault(),t()}},{eventName:"keydown",fn:a=>{if(n().type==="PENDING"){t();return}if(a.keyCode===Ay){a.preventDefault(),t();return}SE(a)}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:()=>{n().type==="PENDING"&&t()}},{eventName:"webkitmouseforcedown",fn:a=>{const s=n();if(s.type==="IDLE"&&Dt(),s.actions.shouldRespectForcePress()){t();return}a.preventDefault()}},{eventName:Up,fn:t}]}function vR(t){const e=O.useRef(nS),n=O.useRef(Cs),i=me(()=>({eventName:"mousedown",fn:function(v){if(v.defaultPrevented||v.button!==wE||v.ctrlKey||v.metaKey||v.shiftKey||v.altKey)return;const y=t.findClosestDraggableId(v);if(!y)return;const _=t.tryGetLock(y,l,{sourceEvent:v});if(!_)return;v.preventDefault();const w={x:v.clientX,y:v.clientY};n.current(),p(_,w)}}),[t]),a=me(()=>({eventName:"webkitmouseforcewillbegin",fn:g=>{if(g.defaultPrevented)return;const v=t.findClosestDraggableId(g);if(!v)return;const y=t.findOptionsForDraggable(v);y&&(y.shouldRespectForcePress||t.canGetLock(v)&&g.preventDefault())}}),[t]),s=$t(function(){const v={passive:!1,capture:!0};n.current=ta(window,[a,i],v)},[a,i]),l=$t(()=>{e.current.type!=="IDLE"&&(e.current=nS,n.current(),s())},[s]),d=$t(()=>{const g=e.current;l(),g.type==="DRAGGING"&&g.actions.cancel({shouldBlockNextClick:!0}),g.type==="PENDING"&&g.actions.abort()},[l]),f=$t(function(){const v={capture:!0,passive:!1},y=gR({cancel:d,completed:l,getPhase:()=>e.current,setPhase:_=>{e.current=_}});n.current=ta(window,y,v)},[d,l]),p=$t(function(v,y){e.current.type!=="IDLE"&&Dt(),e.current={type:"PENDING",point:y,actions:v},f()},[f]);ji(function(){return s(),function(){n.current()}},[s])}function bR(){}const yR={[oR]:!0,[sR]:!0,[cR]:!0,[lR]:!0};function xR(t,e){function n(){e(),t.cancel()}function i(){e(),t.drop()}return[{eventName:"keydown",fn:a=>{if(a.keyCode===Ay){a.preventDefault(),n();return}if(a.keyCode===_E){a.preventDefault(),i();return}if(a.keyCode===hR){a.preventDefault(),t.moveDown();return}if(a.keyCode===dR){a.preventDefault(),t.moveUp();return}if(a.keyCode===fR){a.preventDefault(),t.moveRight();return}if(a.keyCode===uR){a.preventDefault(),t.moveLeft();return}if(yR[a.keyCode]){a.preventDefault();return}SE(a)}},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:Up,fn:n}]}function _R(t){const e=O.useRef(bR),n=me(()=>({eventName:"keydown",fn:function(s){if(s.defaultPrevented||s.keyCode!==_E)return;const l=t.findClosestDraggableId(s);if(!l)return;const d=t.tryGetLock(l,g,{sourceEvent:s});if(!d)return;s.preventDefault();let f=!0;const p=d.snapLift();e.current();function g(){f||Dt(),f=!1,e.current(),i()}e.current=ta(window,xR(p,g),{capture:!0,passive:!1})}}),[t]),i=$t(function(){const s={passive:!1,capture:!0};e.current=ta(window,[n],s)},[n]);ji(function(){return i(),function(){e.current()}},[i])}const Ov={type:"IDLE"},SR=120,wR=.15;function CR({cancel:t,getPhase:e}){return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:n=>{n.preventDefault()}},{eventName:"keydown",fn:n=>{if(e().type!=="DRAGGING"){t();return}n.keyCode===Ay&&n.preventDefault(),t()}},{eventName:Up,fn:t}]}function ER({cancel:t,completed:e,getPhase:n}){return[{eventName:"touchmove",options:{capture:!1},fn:i=>{const a=n();if(a.type!=="DRAGGING"){t();return}a.hasMoved=!0;const{clientX:s,clientY:l}=i.touches[0],d={x:s,y:l};i.preventDefault(),a.actions.move(d)}},{eventName:"touchend",fn:i=>{const a=n();if(a.type!=="DRAGGING"){t();return}i.preventDefault(),a.actions.drop({shouldBlockNextClick:!0}),e()}},{eventName:"touchcancel",fn:i=>{if(n().type!=="DRAGGING"){t();return}i.preventDefault(),t()}},{eventName:"touchforcechange",fn:i=>{const a=n();a.type==="IDLE"&&Dt();const s=i.touches[0];if(!s||!(s.force>=wR))return;const d=a.actions.shouldRespectForcePress();if(a.type==="PENDING"){d&&t();return}if(d){if(a.hasMoved){i.preventDefault();return}t();return}i.preventDefault()}},{eventName:Up,fn:t}]}function AR(t){const e=O.useRef(Ov),n=O.useRef(Cs),i=$t(function(){return e.current},[]),a=$t(function(_){e.current=_},[]),s=me(()=>({eventName:"touchstart",fn:function(_){if(_.defaultPrevented)return;const w=t.findClosestDraggableId(_);if(!w)return;const C=t.tryGetLock(w,d,{sourceEvent:_});if(!C)return;const A=_.touches[0],{clientX:k,clientY:z}=A,j={x:k,y:z};n.current(),v(C,j)}}),[t]),l=$t(function(){const _={capture:!0,passive:!1};n.current=ta(window,[s],_)},[s]),d=$t(()=>{const y=e.current;y.type!=="IDLE"&&(y.type==="PENDING"&&clearTimeout(y.longPressTimerId),a(Ov),n.current(),l())},[l,a]),f=$t(()=>{const y=e.current;d(),y.type==="DRAGGING"&&y.actions.cancel({shouldBlockNextClick:!0}),y.type==="PENDING"&&y.actions.abort()},[d]),p=$t(function(){const _={capture:!0,passive:!1},w={cancel:f,completed:d,getPhase:i},C=ta(window,ER(w),_),A=ta(window,CR(w),_);n.current=function(){C(),A()}},[f,i,d]),g=$t(function(){const _=i();_.type!=="PENDING"&&Dt();const w=_.actions.fluidLift(_.point);a({type:"DRAGGING",actions:w,hasMoved:!1})},[i,a]),v=$t(function(_,w){i().type!=="IDLE"&&Dt();const C=setTimeout(g,SR);a({type:"PENDING",point:w,actions:_,longPressTimerId:C}),p()},[p,i,a,g]);ji(function(){return l(),function(){n.current();const w=i();w.type==="PENDING"&&(clearTimeout(w.longPressTimerId),a(Ov))}},[i,l,a]),ji(function(){return ta(window,[{eventName:"touchmove",fn:()=>{},options:{capture:!1,passive:!1}}])},[])}const TR=["input","button","textarea","select","option","optgroup","video","audio"];function CE(t,e){if(e==null)return!1;if(TR.includes(e.tagName.toLowerCase()))return!0;const i=e.getAttribute("contenteditable");return i==="true"||i===""?!0:e===t?!1:CE(t,e.parentElement)}function DR(t,e){const n=e.target;return Fp(n)?CE(t,n):!1}var MR=t=>ga(t.getBoundingClientRect()).center;function OR(t){return t instanceof yE(t).Element}const kR=(()=>{const t="matches";return typeof document>"u"?t:[t,"msMatchesSelector","webkitMatchesSelector"].find(i=>i in Element.prototype)||t})();function EE(t,e){return t==null?null:t[kR](e)?t:EE(t.parentElement,e)}function LR(t,e){return t.closest?t.closest(e):EE(t,e)}function zR(t){return`[${ql.contextId}="${t}"]`}function RR(t,e){const n=e.target;if(!OR(n))return null;const i=zR(t),a=LR(n,i);return!a||!Fp(a)?null:a}function PR(t,e){const n=RR(t,e);return n?n.getAttribute(ql.draggableId):null}function NR(t,e){const n=`[${vb.contextId}="${t}"]`,a=bE(document,n).find(s=>s.getAttribute(vb.id)===e);return!a||!Fp(a)?null:a}function jR(t){t.preventDefault()}function oh({expected:t,phase:e,isLockActive:n,shouldWarn:i}){return!(!n()||t!==e)}function AE({lockAPI:t,store:e,registry:n,draggableId:i}){if(t.isClaimed())return!1;const a=n.draggable.findById(i);return!(!a||!a.options.isEnabled||!pE(e.getState(),i))}function BR({lockAPI:t,contextId:e,store:n,registry:i,draggableId:a,forceSensorStop:s,sourceEvent:l}){if(!AE({lockAPI:t,store:n,registry:i,draggableId:a}))return null;const f=i.draggable.getById(a),p=NR(e,f.descriptor.id);if(!p||l&&!f.options.canDragInteractiveElements&&DR(p,l))return null;const g=t.claim(s||Cs);let v="PRE_DRAG";function y(){return f.options.shouldRespectForcePress}function _(){return t.isActive(g)}function w(H,V){oh({expected:H,phase:v,isLockActive:_,shouldWarn:!0})&&n.dispatch(V())}const C=w.bind(null,"DRAGGING");function A(H){function V(){t.release(),v="COMPLETED"}v!=="PRE_DRAG"&&(V(),Dt()),n.dispatch(Lz(H.liftActionArgs)),v="DRAGGING";function U(Z,Q={shouldBlockNextClick:!1}){if(H.cleanup(),Q.shouldBlockNextClick){const et=ta(window,[{eventName:"click",fn:jR,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(et)}V(),n.dispatch(sE({reason:Z}))}return{isActive:()=>oh({expected:"DRAGGING",phase:v,isLockActive:_,shouldWarn:!1}),shouldRespectForcePress:y,drop:Z=>U("DROP",Z),cancel:Z=>U("CANCEL",Z),...H.actions}}function k(H){const V=Xu(Z=>{C(()=>rE({client:Z}))});return{...A({liftActionArgs:{id:a,clientSelection:H,movementMode:"FLUID"},cleanup:()=>V.cancel(),actions:{move:V}}),move:V}}function z(){const H={moveUp:()=>C(Hz),moveRight:()=>C(Vz),moveDown:()=>C(Uz),moveLeft:()=>C($z)};return A({liftActionArgs:{id:a,clientSelection:MR(p),movementMode:"SNAP"},cleanup:Cs,actions:H})}function j(){oh({expected:"PRE_DRAG",phase:v,isLockActive:_,shouldWarn:!0})&&t.release()}return{isActive:()=>oh({expected:"PRE_DRAG",phase:v,isLockActive:_,shouldWarn:!1}),shouldRespectForcePress:y,fluidLift:k,snapLift:z,abort:j}}const IR=[vR,_R,AR];function FR({contextId:t,store:e,registry:n,customSensors:i,enableDefaultSensors:a}){const s=[...a?IR:[],...i||[]],l=O.useState(()=>iR())[0],d=$t(function(A,k){id(A)&&!id(k)&&l.tryAbandon()},[l]);ji(function(){let A=e.getState();return e.subscribe(()=>{const z=e.getState();d(A,z),A=z})},[l,e,d]),ji(()=>l.tryAbandon,[l.tryAbandon]);const f=$t(C=>AE({lockAPI:l,registry:n,store:e,draggableId:C}),[l,n,e]),p=$t((C,A,k)=>BR({lockAPI:l,registry:n,contextId:t,store:e,draggableId:C,forceSensorStop:A||null,sourceEvent:k&&k.sourceEvent?k.sourceEvent:null}),[t,l,n,e]),g=$t(C=>PR(t,C),[t]),v=$t(C=>{const A=n.draggable.findById(C);return A?A.options:null},[n.draggable]),y=$t(function(){l.isClaimed()&&(l.tryAbandon(),e.getState().phase!=="IDLE"&&e.dispatch(vy()))},[l,e]),_=$t(()=>l.isClaimed(),[l]),w=me(()=>({canGetLock:f,tryGetLock:p,findClosestDraggableId:g,findOptionsForDraggable:v,tryReleaseLock:y,isLockClaimed:_}),[f,p,g,v,y,_]);for(let C=0;C<s.length;C++)s[C](w)}const HR=t=>({onBeforeCapture:e=>{const n=()=>{t.onBeforeCapture&&t.onBeforeCapture(e)};Rp.flushSync(n)},onBeforeDragStart:t.onBeforeDragStart,onDragStart:t.onDragStart,onDragEnd:t.onDragEnd,onDragUpdate:t.onDragUpdate}),UR=t=>({...nd,...t.autoScrollerOptions,durationDampening:{...nd.durationDampening,...t.autoScrollerOptions}});function bu(t){return t.current||Dt(),t.current}function VR(t){const{contextId:e,setCallbacks:n,sensors:i,nonce:a,dragHandleUsageInstructions:s}=t,l=O.useRef(null),d=xE(t),f=$t(()=>HR(d.current),[d]),p=$t(()=>UR(d.current),[d]),g=J3(e),v=nR({contextId:e,text:s}),y=W3(e,a),_=$t(et=>{bu(l).dispatch(et)},[]),w=me(()=>D1({publishWhileDragging:Rz,updateDroppableScroll:Nz,updateDroppableIsEnabled:jz,updateDroppableIsCombineEnabled:Bz,collectionStarting:Pz},_),[_]),C=X3(),A=me(()=>C3(C,w),[C,w]),k=me(()=>H3({scrollWindow:E3,scrollDroppable:A.scrollDroppable,getAutoScrollerOptions:p,...D1({move:rE},_)}),[A.scrollDroppable,_,p]),z=q3(e),j=me(()=>x3({announce:g,autoScroller:k,dimensionMarshal:A,focusMarshal:z,getResponders:f,styleMarshal:y}),[g,k,A,z,f,y]);l.current=j;const P=$t(()=>{const et=bu(l);et.getState().phase!=="IDLE"&&et.dispatch(vy())},[]),H=$t(()=>{const et=bu(l).getState();return et.phase==="DROP_ANIMATING"?!0:et.phase==="IDLE"?!1:et.isDragging},[]),V=me(()=>({isDragging:H,tryAbort:P}),[H,P]);n(V);const U=$t(et=>pE(bu(l).getState(),et),[]),Z=$t(()=>Eo(bu(l).getState()),[]),Q=me(()=>({marshal:A,focus:z,contextId:e,canLift:U,isMovementAllowed:Z,dragHandleUsageInstructionsId:v,registry:C}),[e,A,v,z,U,Z,C]);return FR({contextId:e,store:j,registry:C,customSensors:i||null,enableDefaultSensors:t.enableDefaultSensors!==!1}),O.useEffect(()=>P,[P]),be.createElement(Hp.Provider,{value:Q},be.createElement(pL,{context:Cy,store:j},t.children))}function $R(){return be.useId()}function GR(t){const e=$R(),n=t.dragHandleUsageInstructions||Rh.dragHandleUsageInstructions;return be.createElement(_L,null,i=>be.createElement(VR,{nonce:t.nonce,contextId:e,setCallbacks:i,dragHandleUsageInstructions:n,enableDefaultSensors:t.enableDefaultSensors,sensors:t.sensors,onBeforeCapture:t.onBeforeCapture,onBeforeDragStart:t.onBeforeDragStart,onDragStart:t.onDragStart,onDragUpdate:t.onDragUpdate,onDragEnd:t.onDragEnd,autoScrollerOptions:t.autoScrollerOptions},t.children))}const iS={dragging:5e3,dropAnimating:4500},WR=(t,e)=>e?Hu.drop(e.duration):t?Hu.snap:Hu.fluid,ZR=(t,e)=>{if(t)return e?ed.opacity.drop:ed.opacity.combining},qR=t=>t.forceShouldAnimate!=null?t.forceShouldAnimate:t.mode==="SNAP";function YR(t){const n=t.dimension.client,{offset:i,combineWith:a,dropping:s}=t,l=!!a,d=qR(t),f=!!s,p=f?mb.drop(i,l):mb.moveTo(i);return{position:"fixed",top:n.marginBox.top,left:n.marginBox.left,boxSizing:"border-box",width:n.borderBox.width,height:n.borderBox.height,transition:WR(d,s),transform:p,opacity:ZR(l,f),zIndex:f?iS.dropAnimating:iS.dragging,pointerEvents:"none"}}function XR(t){return{transform:mb.moveTo(t.offset),transition:t.shouldAnimateDisplacement?void 0:"none"}}function KR(t){return t.type==="DRAGGING"?YR(t):XR(t)}function QR(t,e,n=Bn){const i=window.getComputedStyle(e),a=e.getBoundingClientRect(),s=zC(a,i),l=np(s,n),d={client:s,tagName:e.tagName.toLowerCase(),display:i.display},f={x:s.marginBox.width,y:s.marginBox.height};return{descriptor:t,placeholder:d,displaceBy:f,client:s,page:l}}function JR(t){const e=Ey("draggable"),{descriptor:n,registry:i,getDraggableRef:a,canDragInteractiveElements:s,shouldRespectForcePress:l,isEnabled:d}=t,f=me(()=>({canDragInteractiveElements:s,shouldRespectForcePress:l,isEnabled:d}),[s,d,l]),p=$t(_=>{const w=a();return w||Dt(),QR(n,w,_)},[n,a]),g=me(()=>({uniqueId:e,descriptor:n,options:f,getDimension:p}),[n,p,f,e]),v=O.useRef(g),y=O.useRef(!0);ji(()=>(i.draggable.register(v.current),()=>i.draggable.unregister(v.current)),[i.draggable]),ji(()=>{if(y.current){y.current=!1;return}const _=v.current;v.current=g,i.draggable.update(g,_)},[g,i.draggable])}var Ty=be.createContext(null);function op(t){const e=O.useContext(t);return e||Dt(),e}function t5(t){t.preventDefault()}const e5=t=>{const e=O.useRef(null),n=$t((V=null)=>{e.current=V},[]),i=$t(()=>e.current,[]),{contextId:a,dragHandleUsageInstructionsId:s,registry:l}=op(Hp),{type:d,droppableId:f}=op(Ty),p=me(()=>({id:t.draggableId,index:t.index,type:d,droppableId:f}),[t.draggableId,t.index,d,f]),{children:g,draggableId:v,isEnabled:y,shouldRespectForcePress:_,canDragInteractiveElements:w,isClone:C,mapped:A,dropAnimationFinished:k}=t;if(!C){const V=me(()=>({descriptor:p,registry:l,getDraggableRef:i,canDragInteractiveElements:w,shouldRespectForcePress:_,isEnabled:y}),[p,l,i,w,_,y]);JR(V)}const z=me(()=>y?{tabIndex:0,role:"button","aria-describedby":s,"data-rfd-drag-handle-draggable-id":v,"data-rfd-drag-handle-context-id":a,draggable:!1,onDragStart:t5}:null,[a,s,v,y]),j=$t(V=>{A.type==="DRAGGING"&&A.dropping&&V.propertyName==="transform"&&Rp.flushSync(k)},[k,A]),P=me(()=>{const V=KR(A),U=A.type==="DRAGGING"&&A.dropping?j:void 0;return{innerRef:n,draggableProps:{"data-rfd-draggable-context-id":a,"data-rfd-draggable-id":v,style:V,onTransitionEnd:U},dragHandleProps:z}},[a,z,v,A,j,n]),H=me(()=>({draggableId:p.id,type:p.type,source:{index:p.index,droppableId:p.droppableId}}),[p.droppableId,p.id,p.index,p.type]);return be.createElement(be.Fragment,null,g(P,A.snapshot,H))};var TE=(t,e)=>t===e,DE=t=>{const{combine:e,destination:n}=t;return n?n.droppableId:e?e.droppableId:null};const n5=t=>t.combine?t.combine.draggableId:null,i5=t=>t.at&&t.at.type==="COMBINE"?t.at.combine.draggableId:null;function a5(){const t=jn((a,s)=>({x:a,y:s})),e=jn((a,s,l=null,d=null,f=null)=>({isDragging:!0,isClone:s,isDropAnimating:!!f,dropAnimation:f,mode:a,draggingOver:l,combineWith:d,combineTargetFor:null})),n=jn((a,s,l,d,f=null,p=null,g=null)=>({mapped:{type:"DRAGGING",dropping:null,draggingOver:f,combineWith:p,mode:s,offset:a,dimension:l,forceShouldAnimate:g,snapshot:e(s,d,f,p,null)}}));return(a,s)=>{if(id(a)){if(a.critical.draggable.id!==s.draggableId)return null;const l=a.current.client.offset,d=a.dimensions.draggables[s.draggableId],f=Ni(a.impact),p=i5(a.impact),g=a.forceShouldAnimate;return n(t(l.x,l.y),a.movementMode,d,s.isClone,f,p,g)}if(a.phase==="DROP_ANIMATING"){const l=a.completed;if(l.result.draggableId!==s.draggableId)return null;const d=s.isClone,f=a.dimensions.draggables[s.draggableId],p=l.result,g=p.mode,v=DE(p),y=n5(p),w={duration:a.dropDuration,curve:yy.drop,moveTo:a.newHomeClientOffset,opacity:y?ed.opacity.drop:null,scale:y?ed.scale.drop:null};return{mapped:{type:"DRAGGING",offset:a.newHomeClientOffset,dimension:f,dropping:w,draggingOver:v,combineWith:y,mode:g,forceShouldAnimate:null,snapshot:e(g,d,v,y,w)}}}return null}}function ME(t=null){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:t,combineWith:null}}const r5={mapped:{type:"SECONDARY",offset:Bn,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:ME(null)}};function s5(){const t=jn((l,d)=>({x:l,y:d})),e=jn(ME),n=jn((l,d=null,f)=>({mapped:{type:"SECONDARY",offset:l,combineTargetFor:d,shouldAnimateDisplacement:f,snapshot:e(d)}})),i=l=>l?n(Bn,l,!0):null,a=(l,d,f,p)=>{const g=f.displaced.visible[l],v=!!(p.inVirtualList&&p.effected[l]),y=jp(f),_=y&&y.draggableId===l?d:null;if(!g){if(!v)return i(_);if(f.displaced.invisible[l])return null;const A=ac(p.displacedBy.point),k=t(A.x,A.y);return n(k,_,!0)}if(v)return i(_);const w=f.displacedBy.point,C=t(w.x,w.y);return n(C,_,g.shouldAnimate)};return(l,d)=>{if(id(l))return l.critical.draggable.id===d.draggableId?null:a(d.draggableId,l.critical.draggable.id,l.impact,l.afterCritical);if(l.phase==="DROP_ANIMATING"){const f=l.completed;return f.result.draggableId===d.draggableId?null:a(d.draggableId,f.result.draggableId,f.impact,f.afterCritical)}return null}}const o5=()=>{const t=a5(),e=s5();return(i,a)=>t(i,a)||e(i,a)||r5},l5={dropAnimationFinished:oE},c5=LC(o5,l5,null,{context:Cy,areStatePropsEqual:TE})(e5);function OE(t){return op(Ty).isUsingCloneFor===t.draggableId&&!t.isClone?null:be.createElement(c5,t)}function u5(t){const e=typeof t.isDragDisabled=="boolean"?!t.isDragDisabled:!0,n=!!t.disableInteractiveElementBlocking,i=!!t.shouldRespectForcePress;return be.createElement(OE,Ku({},t,{isClone:!1,isEnabled:e,canDragInteractiveElements:n,shouldRespectForcePress:i}))}const kE=t=>e=>t===e,d5=kE("scroll"),f5=kE("auto"),aS=(t,e)=>e(t.overflowX)||e(t.overflowY),h5=t=>{const e=window.getComputedStyle(t),n={overflowX:e.overflowX,overflowY:e.overflowY};return aS(n,d5)||aS(n,f5)},p5=()=>!1,LE=t=>t==null?null:t===document.body?p5()?t:null:t===document.documentElement?null:h5(t)?t:LE(t.parentElement);var bb=t=>({x:t.scrollLeft,y:t.scrollTop});const zE=t=>t?window.getComputedStyle(t).position==="fixed"?!0:zE(t.parentElement):!1;var m5=t=>{const e=LE(t),n=zE(t);return{closestScrollable:e,isFixedOnPage:n}},g5=({descriptor:t,isEnabled:e,isCombineEnabled:n,isFixedOnPage:i,direction:a,client:s,page:l,closest:d})=>{const f=(()=>{if(!d)return null;const{scrollSize:y,client:_}=d,w=dE({scrollHeight:y.scrollHeight,scrollWidth:y.scrollWidth,height:_.paddingBox.height,width:_.paddingBox.width});return{pageMarginBox:d.page.marginBox,frameClient:_,scrollSize:y,shouldClipSubject:d.shouldClipSubject,scroll:{initial:d.scroll,current:d.scroll,max:w,diff:{value:Bn,displacement:Bn}}}})(),p=a==="vertical"?fy:$C,g=Wl({page:l,withPlaceholder:null,axis:p,frame:f});return{descriptor:t,isCombineEnabled:n,isFixedOnPage:i,axis:p,isEnabled:e,client:s,page:l,frame:f,subject:g}};const v5=(t,e)=>{const n=RC(t);if(!e||t!==e)return n;const i=n.paddingBox.top-e.scrollTop,a=n.paddingBox.left-e.scrollLeft,s=i+e.scrollHeight,l=a+e.scrollWidth,f=ly({top:i,right:l,bottom:s,left:a},n.border);return cy({borderBox:f,margin:n.margin,border:n.border,padding:n.padding})};var b5=({ref:t,descriptor:e,env:n,windowScroll:i,direction:a,isDropDisabled:s,isCombineEnabled:l,shouldClipSubject:d})=>{const f=n.closestScrollable,p=v5(t,f),g=np(p,i),v=(()=>{if(!f)return null;const _=RC(f),w={scrollHeight:f.scrollHeight,scrollWidth:f.scrollWidth};return{client:_,page:np(_,i),scroll:bb(f),scrollSize:w,shouldClipSubject:d}})();return g5({descriptor:e,isEnabled:!s,isCombineEnabled:l,isFixedOnPage:n.isFixedOnPage,direction:a,client:p,page:g,closest:v})};const y5={passive:!1},x5={passive:!0};var rS=t=>t.shouldPublishImmediately?y5:x5;const lh=t=>t&&t.env.closestScrollable||null;function _5(t){const e=O.useRef(null),n=op(Hp),i=Ey("droppable"),{registry:a,marshal:s}=n,l=xE(t),d=me(()=>({id:t.droppableId,type:t.type,mode:t.mode}),[t.droppableId,t.mode,t.type]),f=O.useRef(d),p=me(()=>jn((P,H)=>{e.current||Dt();const V={x:P,y:H};s.updateDroppableScroll(d.id,V)}),[d.id,s]),g=$t(()=>{const P=e.current;return!P||!P.env.closestScrollable?Bn:bb(P.env.closestScrollable)},[]),v=$t(()=>{const P=g();p(P.x,P.y)},[g,p]),y=me(()=>Xu(v),[v]),_=$t(()=>{const P=e.current,H=lh(P);if(P&&H||Dt(),P.scrollOptions.shouldPublishImmediately){v();return}y()},[y,v]),w=$t((P,H)=>{e.current&&Dt();const V=l.current,U=V.getDroppableRef();U||Dt();const Z=m5(U),Q={ref:U,descriptor:d,env:Z,scrollOptions:H};e.current=Q;const et=b5({ref:U,descriptor:d,env:Z,windowScroll:P,direction:V.direction,isDropDisabled:V.isDropDisabled,isCombineEnabled:V.isCombineEnabled,shouldClipSubject:!V.ignoreContainerClipping}),X=Z.closestScrollable;return X&&(X.setAttribute(J1.contextId,n.contextId),X.addEventListener("scroll",_,rS(Q.scrollOptions))),et},[n.contextId,d,_,l]),C=$t(()=>{const P=e.current,H=lh(P);return P&&H||Dt(),bb(H)},[]),A=$t(()=>{const P=e.current;P||Dt();const H=lh(P);e.current=null,H&&(y.cancel(),H.removeAttribute(J1.contextId),H.removeEventListener("scroll",_,rS(P.scrollOptions)))},[_,y]),k=$t(P=>{const H=e.current;H||Dt();const V=lh(H);V||Dt(),V.scrollTop+=P.y,V.scrollLeft+=P.x},[]),z=me(()=>({getDimensionAndWatchScroll:w,getScrollWhileDragging:C,dragStopped:A,scroll:k}),[A,w,C,k]),j=me(()=>({uniqueId:i,descriptor:d,callbacks:z}),[z,d,i]);ji(()=>(f.current=j.descriptor,a.droppable.register(j),()=>{e.current&&A(),a.droppable.unregister(j)}),[z,d,A,j,s,a.droppable]),ji(()=>{e.current&&s.updateDroppableIsEnabled(f.current.id,!t.isDropDisabled)},[t.isDropDisabled,s]),ji(()=>{e.current&&s.updateDroppableIsCombineEnabled(f.current.id,t.isCombineEnabled)},[t.isCombineEnabled,s])}function kv(){}const sS={width:0,height:0,margin:DL},S5=({isAnimatingOpenOnMount:t,placeholder:e,animate:n})=>t||n==="close"?sS:{height:e.client.borderBox.height,width:e.client.borderBox.width,margin:e.client.margin},w5=({isAnimatingOpenOnMount:t,placeholder:e,animate:n})=>{const i=S5({isAnimatingOpenOnMount:t,placeholder:e,animate:n});return{display:e.display,boxSizing:"border-box",width:i.width,height:i.height,marginTop:i.margin.top,marginRight:i.margin.right,marginBottom:i.margin.bottom,marginLeft:i.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:n!=="none"?Hu.placeholder:null}},C5=t=>{const e=O.useRef(null),n=$t(()=>{e.current&&(clearTimeout(e.current),e.current=null)},[]),{animate:i,onTransitionEnd:a,onClose:s,contextId:l}=t,[d,f]=O.useState(t.animate==="open");O.useEffect(()=>d?i!=="open"?(n(),f(!1),kv):e.current?kv:(e.current=setTimeout(()=>{e.current=null,f(!1)}),n):kv,[i,d,n]);const p=$t(v=>{v.propertyName==="height"&&(a(),i==="close"&&s())},[i,s,a]),g=w5({isAnimatingOpenOnMount:d,animate:t.animate,placeholder:t.placeholder});return be.createElement(t.placeholder.tagName,{style:g,"data-rfd-placeholder-context-id":l,onTransitionEnd:p,ref:t.innerRef})};var E5=be.memo(C5);class A5 extends be.PureComponent{constructor(...e){super(...e),this.state={isVisible:!!this.props.on,data:this.props.on,animate:this.props.shouldAnimate&&this.props.on?"open":"none"},this.onClose=()=>{this.state.animate==="close"&&this.setState({isVisible:!1})}}static getDerivedStateFromProps(e,n){return e.shouldAnimate?e.on?{isVisible:!0,data:e.on,animate:"open"}:n.isVisible?{isVisible:!0,data:n.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!e.on,data:e.on,animate:"none"}}render(){if(!this.state.isVisible)return null;const e={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(e)}}const T5=t=>{const e=O.useContext(Hp);e||Dt();const{contextId:n,isMovementAllowed:i}=e,a=O.useRef(null),s=O.useRef(null),{children:l,droppableId:d,type:f,mode:p,direction:g,ignoreContainerClipping:v,isDropDisabled:y,isCombineEnabled:_,snapshot:w,useClone:C,updateViewportMaxScroll:A,getContainerForClone:k}=t,z=$t(()=>a.current,[]),j=$t((X=null)=>{a.current=X},[]);$t(()=>s.current,[]);const P=$t((X=null)=>{s.current=X},[]),H=$t(()=>{i()&&A({maxScroll:hE()})},[i,A]);_5({droppableId:d,type:f,mode:p,direction:g,isDropDisabled:y,isCombineEnabled:_,ignoreContainerClipping:v,getDroppableRef:z});const V=me(()=>be.createElement(A5,{on:t.placeholder,shouldAnimate:t.shouldAnimatePlaceholder},({onClose:X,data:R,animate:dt})=>be.createElement(E5,{placeholder:R,onClose:X,innerRef:P,animate:dt,contextId:n,onTransitionEnd:H})),[n,H,t.placeholder,t.shouldAnimatePlaceholder,P]),U=me(()=>({innerRef:j,placeholder:V,droppableProps:{"data-rfd-droppable-id":d,"data-rfd-droppable-context-id":n}}),[n,d,V,j]),Z=C?C.dragging.draggableId:null,Q=me(()=>({droppableId:d,type:f,isUsingCloneFor:Z}),[d,Z,f]);function et(){if(!C)return null;const{dragging:X,render:R}=C,dt=be.createElement(OE,{draggableId:X.draggableId,index:X.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(it,ut)=>R(it,ut,X));return VO.createPortal(dt,k())}return be.createElement(Ty.Provider,{value:Q},l(U,w),et())};function D5(){return document.body||Dt(),document.body}const oS={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:D5},RE=t=>{let e={...t},n;for(n in oS)t[n]===void 0&&(e={...e,[n]:oS[n]});return e},Lv=(t,e)=>t===e.droppable.type,lS=(t,e)=>e.draggables[t.draggable.id],M5=()=>{const t={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},e={...t,shouldAnimatePlaceholder:!1},n=jn(s=>({draggableId:s.id,type:s.type,source:{index:s.index,droppableId:s.droppableId}})),i=jn((s,l,d,f,p,g)=>{const v=p.descriptor.id;if(p.descriptor.droppableId===s){const w=g?{render:g,dragging:n(p.descriptor)}:null,C={isDraggingOver:d,draggingOverWith:d?v:null,draggingFromThisWith:v,isUsingPlaceholder:!0};return{placeholder:p.placeholder,shouldAnimatePlaceholder:!1,snapshot:C,useClone:w}}if(!l)return e;if(!f)return t;const _={isDraggingOver:d,draggingOverWith:v,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:p.placeholder,shouldAnimatePlaceholder:!0,snapshot:_,useClone:null}});return(s,l)=>{const d=RE(l),f=d.droppableId,p=d.type,g=!d.isDropDisabled,v=d.renderClone;if(id(s)){const y=s.critical;if(!Lv(p,y))return e;const _=lS(y,s.dimensions),w=Ni(s.impact)===f;return i(f,g,w,w,_,v)}if(s.phase==="DROP_ANIMATING"){const y=s.completed;if(!Lv(p,y.critical))return e;const _=lS(y.critical,s.dimensions);return i(f,g,DE(y.result)===f,Ni(y.impact)===f,_,v)}if(s.phase==="IDLE"&&s.completed&&!s.shouldFlush){const y=s.completed;if(!Lv(p,y.critical))return e;const _=Ni(y.impact)===f,w=!!(y.impact.at&&y.impact.at.type==="COMBINE"),C=y.critical.droppable.id===f;return _?w?t:e:C?t:e}return e}},O5={updateViewportMaxScroll:Fz},k5=LC(M5,O5,(t,e,n)=>({...RE(n),...t,...e}),{context:Cy,areStatePropsEqual:TE})(T5);function L5({points:t,calculatedPointInfo:e,onReorder:n,onEdit:i,onRemove:a}){const{t:s}=Gn(),l=f=>{if(!f.destination)return;const p=Array.from(t),[g]=p.splice(f.source.index,1);p.splice(f.destination.index,0,g),n(p)},d=(f,p)=>{if(!f)return`${p}${s("flights.planner.metres")}`;const g=Math.floor(f.time),v=Math.floor((f.time-g)*60),y=g>=1?`${g}${s("flights.planner.hour")}${v}${s("flights.planner.minutes")}`:`${v}${s("flights.planner.minutes")}`;return`${p}${s("flights.planner.metres")} ${Math.floor(f.bat)}%${s("flights.planner.battery")} ${y}`};return T.jsx(GR,{onDragEnd:l,children:T.jsx(k5,{droppableId:"waypoints",children:f=>T.jsxs("div",{ref:f.innerRef,...f.droppableProps,className:"space-y-0.5",children:[t.map((p,g)=>T.jsx(u5,{draggableId:p.id,index:g,children:v=>T.jsxs("div",{ref:v.innerRef,...v.draggableProps,...v.dragHandleProps,className:"flex items-center justify-between bg-az-bg rounded px-1.5 py-1 text-[10px] text-az-text group",children:[T.jsxs("span",{children:[T.jsx("span",{className:"text-az-orange font-bold mr-1",children:String(g+1).padStart(2,"0")}),d(e[g],p.altitude)]}),T.jsxs("span",{className:"flex gap-1 opacity-0 group-hover:opacity-100",children:[T.jsx("button",{onClick:()=>i(p),className:"hover:text-az-orange",children:"✎"}),T.jsx("button",{onClick:()=>a(p.id),className:"hover:text-az-red",children:"×"})]})]})},p.id)),f.placeholder]})})})}/*!
|
||
* @kurkle/color v0.3.4
|
||
* https://github.com/kurkle/color#readme
|
||
* (c) 2024 Jukka Kurkela
|
||
* Released under the MIT License
|
||
*/function Td(t){return t+.5|0}const ys=(t,e,n)=>Math.max(Math.min(t,n),e);function ku(t){return ys(Td(t*2.55),0,255)}function As(t){return ys(Td(t*255),0,255)}function Ar(t){return ys(Td(t/2.55)/100,0,1)}function cS(t){return ys(Td(t*100),0,100)}const Qi={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},yb=[..."0123456789ABCDEF"],z5=t=>yb[t&15],R5=t=>yb[(t&240)>>4]+yb[t&15],ch=t=>(t&240)>>4===(t&15),P5=t=>ch(t.r)&&ch(t.g)&&ch(t.b)&&ch(t.a);function N5(t){var e=t.length,n;return t[0]==="#"&&(e===4||e===5?n={r:255&Qi[t[1]]*17,g:255&Qi[t[2]]*17,b:255&Qi[t[3]]*17,a:e===5?Qi[t[4]]*17:255}:(e===7||e===9)&&(n={r:Qi[t[1]]<<4|Qi[t[2]],g:Qi[t[3]]<<4|Qi[t[4]],b:Qi[t[5]]<<4|Qi[t[6]],a:e===9?Qi[t[7]]<<4|Qi[t[8]]:255})),n}const j5=(t,e)=>t<255?e(t):"";function B5(t){var e=P5(t)?z5:R5;return t?"#"+e(t.r)+e(t.g)+e(t.b)+j5(t.a,e):void 0}const I5=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function PE(t,e,n){const i=e*Math.min(n,1-n),a=(s,l=(s+t/30)%12)=>n-i*Math.max(Math.min(l-3,9-l,1),-1);return[a(0),a(8),a(4)]}function F5(t,e,n){const i=(a,s=(a+t/60)%6)=>n-n*e*Math.max(Math.min(s,4-s,1),0);return[i(5),i(3),i(1)]}function H5(t,e,n){const i=PE(t,1,.5);let a;for(e+n>1&&(a=1/(e+n),e*=a,n*=a),a=0;a<3;a++)i[a]*=1-e-n,i[a]+=e;return i}function U5(t,e,n,i,a){return t===a?(e-n)/i+(e<n?6:0):e===a?(n-t)/i+2:(t-e)/i+4}function Dy(t){const n=t.r/255,i=t.g/255,a=t.b/255,s=Math.max(n,i,a),l=Math.min(n,i,a),d=(s+l)/2;let f,p,g;return s!==l&&(g=s-l,p=d>.5?g/(2-s-l):g/(s+l),f=U5(n,i,a,g,s),f=f*60+.5),[f|0,p||0,d]}function My(t,e,n,i){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,i)).map(As)}function Oy(t,e,n){return My(PE,t,e,n)}function V5(t,e,n){return My(H5,t,e,n)}function $5(t,e,n){return My(F5,t,e,n)}function NE(t){return(t%360+360)%360}function G5(t){const e=I5.exec(t);let n=255,i;if(!e)return;e[5]!==i&&(n=e[6]?ku(+e[5]):As(+e[5]));const a=NE(+e[2]),s=+e[3]/100,l=+e[4]/100;return e[1]==="hwb"?i=V5(a,s,l):e[1]==="hsv"?i=$5(a,s,l):i=Oy(a,s,l),{r:i[0],g:i[1],b:i[2],a:n}}function W5(t,e){var n=Dy(t);n[0]=NE(n[0]+e),n=Oy(n),t.r=n[0],t.g=n[1],t.b=n[2]}function Z5(t){if(!t)return;const e=Dy(t),n=e[0],i=cS(e[1]),a=cS(e[2]);return t.a<255?`hsla(${n}, ${i}%, ${a}%, ${Ar(t.a)})`:`hsl(${n}, ${i}%, ${a}%)`}const uS={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"},dS={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 q5(){const t={},e=Object.keys(dS),n=Object.keys(uS);let i,a,s,l,d;for(i=0;i<e.length;i++){for(l=d=e[i],a=0;a<n.length;a++)s=n[a],d=d.replace(s,uS[s]);s=parseInt(dS[l],16),t[d]=[s>>16&255,s>>8&255,s&255]}return t}let uh;function Y5(t){uh||(uh=q5(),uh.transparent=[0,0,0,0]);const e=uh[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const X5=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function K5(t){const e=X5.exec(t);let n=255,i,a,s;if(e){if(e[7]!==i){const l=+e[7];n=e[8]?ku(l):ys(l*255,0,255)}return i=+e[1],a=+e[3],s=+e[5],i=255&(e[2]?ku(i):ys(i,0,255)),a=255&(e[4]?ku(a):ys(a,0,255)),s=255&(e[6]?ku(s):ys(s,0,255)),{r:i,g:a,b:s,a:n}}}function Q5(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${Ar(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const zv=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,kl=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function J5(t,e,n){const i=kl(Ar(t.r)),a=kl(Ar(t.g)),s=kl(Ar(t.b));return{r:As(zv(i+n*(kl(Ar(e.r))-i))),g:As(zv(a+n*(kl(Ar(e.g))-a))),b:As(zv(s+n*(kl(Ar(e.b))-s))),a:t.a+n*(e.a-t.a)}}function dh(t,e,n){if(t){let i=Dy(t);i[e]=Math.max(0,Math.min(i[e]+i[e]*n,e===0?360:1)),i=Oy(i),t.r=i[0],t.g=i[1],t.b=i[2]}}function jE(t,e){return t&&Object.assign(e||{},t)}function fS(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=As(t[3]))):(e=jE(t,{r:0,g:0,b:0,a:1}),e.a=As(e.a)),e}function tP(t){return t.charAt(0)==="r"?K5(t):G5(t)}class ad{constructor(e){if(e instanceof ad)return e;const n=typeof e;let i;n==="object"?i=fS(e):n==="string"&&(i=N5(e)||Y5(e)||tP(e)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var e=jE(this._rgb);return e&&(e.a=Ar(e.a)),e}set rgb(e){this._rgb=fS(e)}rgbString(){return this._valid?Q5(this._rgb):void 0}hexString(){return this._valid?B5(this._rgb):void 0}hslString(){return this._valid?Z5(this._rgb):void 0}mix(e,n){if(e){const i=this.rgb,a=e.rgb;let s;const l=n===s?.5:n,d=2*l-1,f=i.a-a.a,p=((d*f===-1?d:(d+f)/(1+d*f))+1)/2;s=1-p,i.r=255&p*i.r+s*a.r+.5,i.g=255&p*i.g+s*a.g+.5,i.b=255&p*i.b+s*a.b+.5,i.a=l*i.a+(1-l)*a.a,this.rgb=i}return this}interpolate(e,n){return e&&(this._rgb=J5(this._rgb,e._rgb,n)),this}clone(){return new ad(this.rgb)}alpha(e){return this._rgb.a=As(e),this}clearer(e){const n=this._rgb;return n.a*=1-e,this}greyscale(){const e=this._rgb,n=Td(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=n,this}opaquer(e){const n=this._rgb;return n.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return dh(this._rgb,2,e),this}darken(e){return dh(this._rgb,2,-e),this}saturate(e){return dh(this._rgb,1,e),this}desaturate(e){return dh(this._rgb,1,-e),this}rotate(e){return W5(this._rgb,e),this}}/*!
|
||
* Chart.js v4.5.1
|
||
* https://www.chartjs.org
|
||
* (c) 2025 Chart.js Contributors
|
||
* Released under the MIT License
|
||
*/function xr(){}const eP=(()=>{let t=0;return()=>t++})();function ue(t){return t==null}function Qe(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function pe(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function un(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function zi(t,e){return un(t)?t:e}function Jt(t,e){return typeof t>"u"?e:t}const nP=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/e,BE=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function $e(t,e,n){if(t&&typeof t.call=="function")return t.apply(n,e)}function Pe(t,e,n,i){let a,s,l;if(Qe(t))for(s=t.length,a=0;a<s;a++)e.call(n,t[a],a);else if(pe(t))for(l=Object.keys(t),s=l.length,a=0;a<s;a++)e.call(n,t[l[a]],l[a])}function lp(t,e){let n,i,a,s;if(!t||!e||t.length!==e.length)return!1;for(n=0,i=t.length;n<i;++n)if(a=t[n],s=e[n],a.datasetIndex!==s.datasetIndex||a.index!==s.index)return!1;return!0}function cp(t){if(Qe(t))return t.map(cp);if(pe(t)){const e=Object.create(null),n=Object.keys(t),i=n.length;let a=0;for(;a<i;++a)e[n[a]]=cp(t[n[a]]);return e}return t}function IE(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function iP(t,e,n,i){if(!IE(t))return;const a=e[t],s=n[t];pe(a)&&pe(s)?rd(a,s,i):e[t]=cp(s)}function rd(t,e,n){const i=Qe(e)?e:[e],a=i.length;if(!pe(t))return t;n=n||{};const s=n.merger||iP;let l;for(let d=0;d<a;++d){if(l=i[d],!pe(l))continue;const f=Object.keys(l);for(let p=0,g=f.length;p<g;++p)s(f[p],t,l,n)}return t}function Uu(t,e){return rd(t,e,{merger:aP})}function aP(t,e,n){if(!IE(t))return;const i=e[t],a=n[t];pe(i)&&pe(a)?Uu(i,a):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=cp(a))}const hS={"":t=>t,x:t=>t.x,y:t=>t.y};function rP(t){const e=t.split("."),n=[];let i="";for(const a of e)i+=a,i.endsWith("\\")?i=i.slice(0,-1)+".":(n.push(i),i="");return n}function sP(t){const e=rP(t);return n=>{for(const i of e){if(i==="")break;n=n&&n[i]}return n}}function Ms(t,e){return(hS[e]||(hS[e]=sP(e)))(t)}function ky(t){return t.charAt(0).toUpperCase()+t.slice(1)}const sd=t=>typeof t<"u",Os=t=>typeof t=="function",pS=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};function oP(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const Ce=Math.PI,qe=2*Ce,lP=qe+Ce,up=Number.POSITIVE_INFINITY,cP=Ce/180,hn=Ce/2,xo=Ce/4,mS=Ce*2/3,xs=Math.log10,Wa=Math.sign;function Vu(t,e,n){return Math.abs(t-e)<n}function gS(t){const e=Math.round(t);t=Vu(t,e,t/1e3)?e:t;const n=Math.pow(10,Math.floor(xs(t))),i=t/n;return(i<=1?1:i<=2?2:i<=5?5:10)*n}function uP(t){const e=[],n=Math.sqrt(t);let i;for(i=1;i<n;i++)t%i===0&&(e.push(i),e.push(t/i));return n===(n|0)&&e.push(n),e.sort((a,s)=>a-s).pop(),e}function dP(t){return typeof t=="symbol"||typeof t=="object"&&t!==null&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}function Yl(t){return!dP(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function fP(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}function FE(t,e,n){let i,a,s;for(i=0,a=t.length;i<a;i++)s=t[i][n],isNaN(s)||(e.min=Math.min(e.min,s),e.max=Math.max(e.max,s))}function va(t){return t*(Ce/180)}function Ly(t){return t*(180/Ce)}function vS(t){if(!un(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function HE(t,e){const n=e.x-t.x,i=e.y-t.y,a=Math.sqrt(n*n+i*i);let s=Math.atan2(i,n);return s<-.5*Ce&&(s+=qe),{angle:s,distance:a}}function xb(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function hP(t,e){return(t-e+lP)%qe-Ce}function Qn(t){return(t%qe+qe)%qe}function od(t,e,n,i){const a=Qn(t),s=Qn(e),l=Qn(n),d=Qn(s-a),f=Qn(l-a),p=Qn(a-s),g=Qn(a-l);return a===s||a===l||i&&s===l||d>f&&p<g}function Nn(t,e,n){return Math.max(e,Math.min(n,t))}function pP(t){return Nn(t,-32768,32767)}function Dr(t,e,n,i=1e-6){return t>=Math.min(e,n)-i&&t<=Math.max(e,n)+i}function zy(t,e,n){n=n||(l=>t[l]<e);let i=t.length-1,a=0,s;for(;i-a>1;)s=a+i>>1,n(s)?a=s:i=s;return{lo:a,hi:i}}const Mr=(t,e,n,i)=>zy(t,n,i?a=>{const s=t[a][e];return s<n||s===n&&t[a+1][e]===n}:a=>t[a][e]<n),mP=(t,e,n)=>zy(t,n,i=>t[i][e]>=n);function gP(t,e,n){let i=0,a=t.length;for(;i<a&&t[i]<e;)i++;for(;a>i&&t[a-1]>n;)a--;return i>0||a<t.length?t.slice(i,a):t}const UE=["push","pop","shift","splice","unshift"];function vP(t,e){if(t._chartjs){t._chartjs.listeners.push(e);return}Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),UE.forEach(n=>{const i="_onData"+ky(n),a=t[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!1,value(...s){const l=a.apply(this,s);return t._chartjs.listeners.forEach(d=>{typeof d[i]=="function"&&d[i](...s)}),l}})})}function bS(t,e){const n=t._chartjs;if(!n)return;const i=n.listeners,a=i.indexOf(e);a!==-1&&i.splice(a,1),!(i.length>0)&&(UE.forEach(s=>{delete t[s]}),delete t._chartjs)}function VE(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const $E=(function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame})();function GE(t,e){let n=[],i=!1;return function(...a){n=a,i||(i=!0,$E.call(window,()=>{i=!1,t.apply(e,n)}))}}function bP(t,e){let n;return function(...i){return e?(clearTimeout(n),n=setTimeout(t,e,i)):t.apply(this,i),e}}const Ry=t=>t==="start"?"left":t==="end"?"right":"center",Kn=(t,e,n)=>t==="start"?e:t==="end"?n:(e+n)/2,yP=(t,e,n,i)=>t===(i?"left":"right")?n:t==="center"?(e+n)/2:e;function WE(t,e,n){const i=e.length;let a=0,s=i;if(t._sorted){const{iScale:l,vScale:d,_parsed:f}=t,p=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null,g=l.axis,{min:v,max:y,minDefined:_,maxDefined:w}=l.getUserBounds();if(_){if(a=Math.min(Mr(f,g,v).lo,n?i:Mr(e,g,l.getPixelForValue(v)).lo),p){const C=f.slice(0,a+1).reverse().findIndex(A=>!ue(A[d.axis]));a-=Math.max(0,C)}a=Nn(a,0,i-1)}if(w){let C=Math.max(Mr(f,l.axis,y,!0).hi+1,n?0:Mr(e,g,l.getPixelForValue(y),!0).hi+1);if(p){const A=f.slice(C-1).findIndex(k=>!ue(k[d.axis]));C+=Math.max(0,A)}s=Nn(C,a,i)-a}else s=i-a}return{start:a,count:s}}function ZE(t){const{xScale:e,yScale:n,_scaleRanges:i}=t,a={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!i)return t._scaleRanges=a,!0;const s=i.xmin!==e.min||i.xmax!==e.max||i.ymin!==n.min||i.ymax!==n.max;return Object.assign(i,a),s}const fh=t=>t===0||t===1,yS=(t,e,n)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*qe/n)),xS=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*qe/n)+1,$u={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*hn)+1,easeOutSine:t=>Math.sin(t*hn),easeInOutSine:t=>-.5*(Math.cos(Ce*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>fh(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>fh(t)?t:yS(t,.075,.3),easeOutElastic:t=>fh(t)?t:xS(t,.075,.3),easeInOutElastic(t){return fh(t)?t:t<.5?.5*yS(t*2,.1125,.45):.5+.5*xS(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return(t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-$u.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?$u.easeInBounce(t*2)*.5:$u.easeOutBounce(t*2-1)*.5+.5};function Py(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function _S(t){return Py(t)?t:new ad(t)}function Rv(t){return Py(t)?t:new ad(t).saturate(.5).darken(.1).hexString()}const xP=["x","y","borderWidth","radius","tension"],_P=["color","borderColor","backgroundColor"];function SP(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),t.set("animations",{colors:{type:"color",properties:_P},numbers:{type:"number",properties:xP}}),t.describe("animations",{_fallback:"animation"}),t.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:e=>e|0}}}})}function wP(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const SS=new Map;function CP(t,e){e=e||{};const n=t+JSON.stringify(e);let i=SS.get(n);return i||(i=new Intl.NumberFormat(t,e),SS.set(n,i)),i}function Dd(t,e,n){return CP(e,n).format(t)}const qE={values(t){return Qe(t)?t:""+t},numeric(t,e,n){if(t===0)return"0";const i=this.chart.options.locale;let a,s=t;if(n.length>1){const p=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(p<1e-4||p>1e15)&&(a="scientific"),s=EP(t,n)}const l=xs(Math.abs(s)),d=isNaN(l)?1:Math.max(Math.min(-1*Math.floor(l),20),0),f={notation:a,minimumFractionDigits:d,maximumFractionDigits:d};return Object.assign(f,this.options.ticks.format),Dd(t,i,f)},logarithmic(t,e,n){if(t===0)return"0";const i=n[e].significand||t/Math.pow(10,Math.floor(xs(t)));return[1,2,3,5,10,15].includes(i)||e>.8*n.length?qE.numeric.call(this,t,e,n):""}};function EP(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}var Vp={formatters:qE};function AP(t){t.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:(e,n)=>n.lineWidth,tickColor:(e,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:Vp.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const jo=Object.create(null),_b=Object.create(null);function Gu(t,e){if(!e)return t;const n=e.split(".");for(let i=0,a=n.length;i<a;++i){const s=n[i];t=t[s]||(t[s]=Object.create(null))}return t}function Pv(t,e,n){return typeof e=="string"?rd(Gu(t,e),n):rd(Gu(t,""),e)}class TP{constructor(e,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,a)=>Rv(a.backgroundColor),this.hoverBorderColor=(i,a)=>Rv(a.borderColor),this.hoverColor=(i,a)=>Rv(a.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(e),this.apply(n)}set(e,n){return Pv(this,e,n)}get(e){return Gu(this,e)}describe(e,n){return Pv(_b,e,n)}override(e,n){return Pv(jo,e,n)}route(e,n,i,a){const s=Gu(this,e),l=Gu(this,i),d="_"+n;Object.defineProperties(s,{[d]:{value:s[n],writable:!0},[n]:{enumerable:!0,get(){const f=this[d],p=l[a];return pe(f)?Object.assign({},p,f):Jt(f,p)},set(f){this[d]=f}}})}apply(e){e.forEach(n=>n(this))}}var Je=new TP({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[SP,wP,AP]);function DP(t){return!t||ue(t.size)||ue(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function dp(t,e,n,i,a){let s=e[a];return s||(s=e[a]=t.measureText(a).width,n.push(a)),s>i&&(i=s),i}function MP(t,e,n,i){i=i||{};let a=i.data=i.data||{},s=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(a=i.data={},s=i.garbageCollect=[],i.font=e),t.save(),t.font=e;let l=0;const d=n.length;let f,p,g,v,y;for(f=0;f<d;f++)if(v=n[f],v!=null&&!Qe(v))l=dp(t,a,s,l,v);else if(Qe(v))for(p=0,g=v.length;p<g;p++)y=v[p],y!=null&&!Qe(y)&&(l=dp(t,a,s,l,y));t.restore();const _=s.length/2;if(_>n.length){for(f=0;f<_;f++)delete a[s[f]];s.splice(0,_)}return l}function _o(t,e,n){const i=t.currentDevicePixelRatio,a=n!==0?Math.max(n/2,.5):0;return Math.round((e-a)*i)/i+a}function wS(t,e){!e&&!t||(e=e||t.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function Sb(t,e,n,i){YE(t,e,n,i,null)}function YE(t,e,n,i,a){let s,l,d,f,p,g,v,y;const _=e.pointStyle,w=e.rotation,C=e.radius;let A=(w||0)*cP;if(_&&typeof _=="object"&&(s=_.toString(),s==="[object HTMLImageElement]"||s==="[object HTMLCanvasElement]")){t.save(),t.translate(n,i),t.rotate(A),t.drawImage(_,-_.width/2,-_.height/2,_.width,_.height),t.restore();return}if(!(isNaN(C)||C<=0)){switch(t.beginPath(),_){default:a?t.ellipse(n,i,a/2,C,0,0,qe):t.arc(n,i,C,0,qe),t.closePath();break;case"triangle":g=a?a/2:C,t.moveTo(n+Math.sin(A)*g,i-Math.cos(A)*C),A+=mS,t.lineTo(n+Math.sin(A)*g,i-Math.cos(A)*C),A+=mS,t.lineTo(n+Math.sin(A)*g,i-Math.cos(A)*C),t.closePath();break;case"rectRounded":p=C*.516,f=C-p,l=Math.cos(A+xo)*f,v=Math.cos(A+xo)*(a?a/2-p:f),d=Math.sin(A+xo)*f,y=Math.sin(A+xo)*(a?a/2-p:f),t.arc(n-v,i-d,p,A-Ce,A-hn),t.arc(n+y,i-l,p,A-hn,A),t.arc(n+v,i+d,p,A,A+hn),t.arc(n-y,i+l,p,A+hn,A+Ce),t.closePath();break;case"rect":if(!w){f=Math.SQRT1_2*C,g=a?a/2:f,t.rect(n-g,i-f,2*g,2*f);break}A+=xo;case"rectRot":v=Math.cos(A)*(a?a/2:C),l=Math.cos(A)*C,d=Math.sin(A)*C,y=Math.sin(A)*(a?a/2:C),t.moveTo(n-v,i-d),t.lineTo(n+y,i-l),t.lineTo(n+v,i+d),t.lineTo(n-y,i+l),t.closePath();break;case"crossRot":A+=xo;case"cross":v=Math.cos(A)*(a?a/2:C),l=Math.cos(A)*C,d=Math.sin(A)*C,y=Math.sin(A)*(a?a/2:C),t.moveTo(n-v,i-d),t.lineTo(n+v,i+d),t.moveTo(n+y,i-l),t.lineTo(n-y,i+l);break;case"star":v=Math.cos(A)*(a?a/2:C),l=Math.cos(A)*C,d=Math.sin(A)*C,y=Math.sin(A)*(a?a/2:C),t.moveTo(n-v,i-d),t.lineTo(n+v,i+d),t.moveTo(n+y,i-l),t.lineTo(n-y,i+l),A+=xo,v=Math.cos(A)*(a?a/2:C),l=Math.cos(A)*C,d=Math.sin(A)*C,y=Math.sin(A)*(a?a/2:C),t.moveTo(n-v,i-d),t.lineTo(n+v,i+d),t.moveTo(n+y,i-l),t.lineTo(n-y,i+l);break;case"line":l=a?a/2:Math.cos(A)*C,d=Math.sin(A)*C,t.moveTo(n-l,i-d),t.lineTo(n+l,i+d);break;case"dash":t.moveTo(n,i),t.lineTo(n+Math.cos(A)*(a?a/2:C),i+Math.sin(A)*C);break;case!1:t.closePath();break}t.fill(),e.borderWidth>0&&t.stroke()}}function Or(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n}function $p(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function Gp(t){t.restore()}function OP(t,e,n,i,a){if(!e)return t.lineTo(n.x,n.y);if(a==="middle"){const s=(e.x+n.x)/2;t.lineTo(s,e.y),t.lineTo(s,n.y)}else a==="after"!=!!i?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}function kP(t,e,n,i){if(!e)return t.lineTo(n.x,n.y);t.bezierCurveTo(i?e.cp1x:e.cp2x,i?e.cp1y:e.cp2y,i?n.cp2x:n.cp1x,i?n.cp2y:n.cp1y,n.x,n.y)}function LP(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),ue(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}function zP(t,e,n,i,a){if(a.strikethrough||a.underline){const s=t.measureText(i),l=e-s.actualBoundingBoxLeft,d=e+s.actualBoundingBoxRight,f=n-s.actualBoundingBoxAscent,p=n+s.actualBoundingBoxDescent,g=a.strikethrough?(f+p)/2:p;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=a.decorationWidth||2,t.moveTo(l,g),t.lineTo(d,g),t.stroke()}}function RP(t,e){const n=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=n}function Bo(t,e,n,i,a,s={}){const l=Qe(e)?e:[e],d=s.strokeWidth>0&&s.strokeColor!=="";let f,p;for(t.save(),t.font=a.string,LP(t,s),f=0;f<l.length;++f)p=l[f],s.backdrop&&RP(t,s.backdrop),d&&(s.strokeColor&&(t.strokeStyle=s.strokeColor),ue(s.strokeWidth)||(t.lineWidth=s.strokeWidth),t.strokeText(p,n,i,s.maxWidth)),t.fillText(p,n,i,s.maxWidth),zP(t,n,i,p,s),i+=Number(a.lineHeight);t.restore()}function ld(t,e){const{x:n,y:i,w:a,h:s,radius:l}=e;t.arc(n+l.topLeft,i+l.topLeft,l.topLeft,1.5*Ce,Ce,!0),t.lineTo(n,i+s-l.bottomLeft),t.arc(n+l.bottomLeft,i+s-l.bottomLeft,l.bottomLeft,Ce,hn,!0),t.lineTo(n+a-l.bottomRight,i+s),t.arc(n+a-l.bottomRight,i+s-l.bottomRight,l.bottomRight,hn,0,!0),t.lineTo(n+a,i+l.topRight),t.arc(n+a-l.topRight,i+l.topRight,l.topRight,0,-hn,!0),t.lineTo(n+l.topLeft,i)}const PP=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,NP=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function jP(t,e){const n=(""+t).match(PP);if(!n||n[1]==="normal")return e*1.2;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100;break}return e*t}const BP=t=>+t||0;function Ny(t,e){const n={},i=pe(e),a=i?Object.keys(e):e,s=pe(t)?i?l=>Jt(t[l],t[e[l]]):l=>t[l]:()=>t;for(const l of a)n[l]=BP(s(l));return n}function XE(t){return Ny(t,{top:"y",right:"x",bottom:"y",left:"x"})}function zo(t){return Ny(t,["topLeft","topRight","bottomLeft","bottomRight"])}function ti(t){const e=XE(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function On(t,e){t=t||{},e=e||Je.font;let n=Jt(t.size,e.size);typeof n=="string"&&(n=parseInt(n,10));let i=Jt(t.style,e.style);i&&!(""+i).match(NP)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const a={family:Jt(t.family,e.family),lineHeight:jP(Jt(t.lineHeight,e.lineHeight),n),size:n,style:i,weight:Jt(t.weight,e.weight),string:""};return a.string=DP(a),a}function Lu(t,e,n,i){let a,s,l;for(a=0,s=t.length;a<s;++a)if(l=t[a],l!==void 0&&l!==void 0)return l}function IP(t,e,n){const{min:i,max:a}=t,s=BE(e,(a-i)/2),l=(d,f)=>n&&d===0?0:d+f;return{min:l(i,-Math.abs(s)),max:l(a,s)}}function zs(t,e){return Object.assign(Object.create(t),e)}function jy(t,e=[""],n,i,a=()=>t[0]){const s=n||t;typeof i>"u"&&(i=tA("_fallback",t));const l={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:s,_fallback:i,_getTarget:a,override:d=>jy([d,...t],e,s,i)};return new Proxy(l,{deleteProperty(d,f){return delete d[f],delete d._keys,delete t[0][f],!0},get(d,f){return QE(d,f,()=>ZP(f,e,t,d))},getOwnPropertyDescriptor(d,f){return Reflect.getOwnPropertyDescriptor(d._scopes[0],f)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(d,f){return ES(d).includes(f)},ownKeys(d){return ES(d)},set(d,f,p){const g=d._storage||(d._storage=a());return d[f]=g[f]=p,delete d._keys,!0}})}function Xl(t,e,n,i){const a={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:KE(t,i),setContext:s=>Xl(t,s,n,i),override:s=>Xl(t.override(s),e,n,i)};return new Proxy(a,{deleteProperty(s,l){return delete s[l],delete t[l],!0},get(s,l,d){return QE(s,l,()=>HP(s,l,d))},getOwnPropertyDescriptor(s,l){return s._descriptors.allKeys?Reflect.has(t,l)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,l)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(s,l){return Reflect.has(t,l)},ownKeys(){return Reflect.ownKeys(t)},set(s,l,d){return t[l]=d,delete s[l],!0}})}function KE(t,e={scriptable:!0,indexable:!0}){const{_scriptable:n=e.scriptable,_indexable:i=e.indexable,_allKeys:a=e.allKeys}=t;return{allKeys:a,scriptable:n,indexable:i,isScriptable:Os(n)?n:()=>n,isIndexable:Os(i)?i:()=>i}}const FP=(t,e)=>t?t+ky(e):e,By=(t,e)=>pe(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function QE(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e)||e==="constructor")return t[e];const i=n();return t[e]=i,i}function HP(t,e,n){const{_proxy:i,_context:a,_subProxy:s,_descriptors:l}=t;let d=i[e];return Os(d)&&l.isScriptable(e)&&(d=UP(e,d,t,n)),Qe(d)&&d.length&&(d=VP(e,d,t,l.isIndexable)),By(e,d)&&(d=Xl(d,a,s&&s[e],l)),d}function UP(t,e,n,i){const{_proxy:a,_context:s,_subProxy:l,_stack:d}=n;if(d.has(t))throw new Error("Recursion detected: "+Array.from(d).join("->")+"->"+t);d.add(t);let f=e(s,l||i);return d.delete(t),By(t,f)&&(f=Iy(a._scopes,a,t,f)),f}function VP(t,e,n,i){const{_proxy:a,_context:s,_subProxy:l,_descriptors:d}=n;if(typeof s.index<"u"&&i(t))return e[s.index%e.length];if(pe(e[0])){const f=e,p=a._scopes.filter(g=>g!==f);e=[];for(const g of f){const v=Iy(p,a,t,g);e.push(Xl(v,s,l&&l[t],d))}}return e}function JE(t,e,n){return Os(t)?t(e,n):t}const $P=(t,e)=>t===!0?e:typeof t=="string"?Ms(e,t):void 0;function GP(t,e,n,i,a){for(const s of e){const l=$P(n,s);if(l){t.add(l);const d=JE(l._fallback,n,a);if(typeof d<"u"&&d!==n&&d!==i)return d}else if(l===!1&&typeof i<"u"&&n!==i)return null}return!1}function Iy(t,e,n,i){const a=e._rootScopes,s=JE(e._fallback,n,i),l=[...t,...a],d=new Set;d.add(i);let f=CS(d,l,n,s||n,i);return f===null||typeof s<"u"&&s!==n&&(f=CS(d,l,s,f,i),f===null)?!1:jy(Array.from(d),[""],a,s,()=>WP(e,n,i))}function CS(t,e,n,i,a){for(;n;)n=GP(t,e,n,i,a);return n}function WP(t,e,n){const i=t._getTarget();e in i||(i[e]={});const a=i[e];return Qe(a)&&pe(n)?n:a||{}}function ZP(t,e,n,i){let a;for(const s of e)if(a=tA(FP(s,t),n),typeof a<"u")return By(t,a)?Iy(n,i,t,a):a}function tA(t,e){for(const n of e){if(!n)continue;const i=n[t];if(typeof i<"u")return i}}function ES(t){let e=t._keys;return e||(e=t._keys=qP(t._scopes)),e}function qP(t){const e=new Set;for(const n of t)for(const i of Object.keys(n).filter(a=>!a.startsWith("_")))e.add(i);return Array.from(e)}function eA(t,e,n,i){const{iScale:a}=t,{key:s="r"}=this._parsing,l=new Array(i);let d,f,p,g;for(d=0,f=i;d<f;++d)p=d+n,g=e[p],l[d]={r:a.parse(Ms(g,s),p)};return l}const YP=Number.EPSILON||1e-14,Kl=(t,e)=>e<t.length&&!t[e].skip&&t[e],nA=t=>t==="x"?"y":"x";function XP(t,e,n,i){const a=t.skip?e:t,s=e,l=n.skip?e:n,d=xb(s,a),f=xb(l,s);let p=d/(d+f),g=f/(d+f);p=isNaN(p)?0:p,g=isNaN(g)?0:g;const v=i*p,y=i*g;return{previous:{x:s.x-v*(l.x-a.x),y:s.y-v*(l.y-a.y)},next:{x:s.x+y*(l.x-a.x),y:s.y+y*(l.y-a.y)}}}function KP(t,e,n){const i=t.length;let a,s,l,d,f,p=Kl(t,0);for(let g=0;g<i-1;++g)if(f=p,p=Kl(t,g+1),!(!f||!p)){if(Vu(e[g],0,YP)){n[g]=n[g+1]=0;continue}a=n[g]/e[g],s=n[g+1]/e[g],d=Math.pow(a,2)+Math.pow(s,2),!(d<=9)&&(l=3/Math.sqrt(d),n[g]=a*l*e[g],n[g+1]=s*l*e[g])}}function QP(t,e,n="x"){const i=nA(n),a=t.length;let s,l,d,f=Kl(t,0);for(let p=0;p<a;++p){if(l=d,d=f,f=Kl(t,p+1),!d)continue;const g=d[n],v=d[i];l&&(s=(g-l[n])/3,d[`cp1${n}`]=g-s,d[`cp1${i}`]=v-s*e[p]),f&&(s=(f[n]-g)/3,d[`cp2${n}`]=g+s,d[`cp2${i}`]=v+s*e[p])}}function JP(t,e="x"){const n=nA(e),i=t.length,a=Array(i).fill(0),s=Array(i);let l,d,f,p=Kl(t,0);for(l=0;l<i;++l)if(d=f,f=p,p=Kl(t,l+1),!!f){if(p){const g=p[e]-f[e];a[l]=g!==0?(p[n]-f[n])/g:0}s[l]=d?p?Wa(a[l-1])!==Wa(a[l])?0:(a[l-1]+a[l])/2:a[l-1]:a[l]}KP(t,a,s),QP(t,s,e)}function hh(t,e,n){return Math.max(Math.min(t,n),e)}function tN(t,e){let n,i,a,s,l,d=Or(t[0],e);for(n=0,i=t.length;n<i;++n)l=s,s=d,d=n<i-1&&Or(t[n+1],e),s&&(a=t[n],l&&(a.cp1x=hh(a.cp1x,e.left,e.right),a.cp1y=hh(a.cp1y,e.top,e.bottom)),d&&(a.cp2x=hh(a.cp2x,e.left,e.right),a.cp2y=hh(a.cp2y,e.top,e.bottom)))}function eN(t,e,n,i,a){let s,l,d,f;if(e.spanGaps&&(t=t.filter(p=>!p.skip)),e.cubicInterpolationMode==="monotone")JP(t,a);else{let p=i?t[t.length-1]:t[0];for(s=0,l=t.length;s<l;++s)d=t[s],f=XP(p,d,t[Math.min(s+1,l-(i?0:1))%l],e.tension),d.cp1x=f.previous.x,d.cp1y=f.previous.y,d.cp2x=f.next.x,d.cp2y=f.next.y,p=d}e.capBezierPoints&&tN(t,n)}function Fy(){return typeof window<"u"&&typeof document<"u"}function Hy(t){let e=t.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function fp(t,e,n){let i;return typeof t=="string"?(i=parseInt(t,10),t.indexOf("%")!==-1&&(i=i/100*e.parentNode[n])):i=t,i}const Wp=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function nN(t,e){return Wp(t).getPropertyValue(e)}const iN=["top","right","bottom","left"];function Ro(t,e,n){const i={};n=n?"-"+n:"";for(let a=0;a<4;a++){const s=iN[a];i[s]=parseFloat(t[e+"-"+s+n])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const aN=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function rN(t,e){const n=t.touches,i=n&&n.length?n[0]:t,{offsetX:a,offsetY:s}=i;let l=!1,d,f;if(aN(a,s,t.target))d=a,f=s;else{const p=e.getBoundingClientRect();d=i.clientX-p.left,f=i.clientY-p.top,l=!0}return{x:d,y:f,box:l}}function Ao(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:i}=e,a=Wp(n),s=a.boxSizing==="border-box",l=Ro(a,"padding"),d=Ro(a,"border","width"),{x:f,y:p,box:g}=rN(t,n),v=l.left+(g&&d.left),y=l.top+(g&&d.top);let{width:_,height:w}=e;return s&&(_-=l.width+d.width,w-=l.height+d.height),{x:Math.round((f-v)/_*n.width/i),y:Math.round((p-y)/w*n.height/i)}}function sN(t,e,n){let i,a;if(e===void 0||n===void 0){const s=t&&Hy(t);if(!s)e=t.clientWidth,n=t.clientHeight;else{const l=s.getBoundingClientRect(),d=Wp(s),f=Ro(d,"border","width"),p=Ro(d,"padding");e=l.width-p.width-f.width,n=l.height-p.height-f.height,i=fp(d.maxWidth,s,"clientWidth"),a=fp(d.maxHeight,s,"clientHeight")}}return{width:e,height:n,maxWidth:i||up,maxHeight:a||up}}const _s=t=>Math.round(t*10)/10;function oN(t,e,n,i){const a=Wp(t),s=Ro(a,"margin"),l=fp(a.maxWidth,t,"clientWidth")||up,d=fp(a.maxHeight,t,"clientHeight")||up,f=sN(t,e,n);let{width:p,height:g}=f;if(a.boxSizing==="content-box"){const y=Ro(a,"border","width"),_=Ro(a,"padding");p-=_.width+y.width,g-=_.height+y.height}return p=Math.max(0,p-s.width),g=Math.max(0,i?p/i:g-s.height),p=_s(Math.min(p,l,f.maxWidth)),g=_s(Math.min(g,d,f.maxHeight)),p&&!g&&(g=_s(p/2)),(e!==void 0||n!==void 0)&&i&&f.height&&g>f.height&&(g=f.height,p=_s(Math.floor(g*i))),{width:p,height:g}}function AS(t,e,n){const i=e||1,a=_s(t.height*i),s=_s(t.width*i);t.height=_s(t.height),t.width=_s(t.width);const l=t.canvas;return l.style&&(n||!l.style.height&&!l.style.width)&&(l.style.height=`${t.height}px`,l.style.width=`${t.width}px`),t.currentDevicePixelRatio!==i||l.height!==a||l.width!==s?(t.currentDevicePixelRatio=i,l.height=a,l.width=s,t.ctx.setTransform(i,0,0,i,0,0),!0):!1}const lN=(function(){let t=!1;try{const e={get passive(){return t=!0,!1}};Fy()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return t})();function TS(t,e){const n=nN(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function To(t,e,n,i){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function cN(t,e,n,i){return{x:t.x+n*(e.x-t.x),y:i==="middle"?n<.5?t.y:e.y:i==="after"?n<1?t.y:e.y:n>0?e.y:t.y}}function uN(t,e,n,i){const a={x:t.cp2x,y:t.cp2y},s={x:e.cp1x,y:e.cp1y},l=To(t,a,n),d=To(a,s,n),f=To(s,e,n),p=To(l,d,n),g=To(d,f,n);return To(p,g,n)}const dN=function(t,e){return{x(n){return t+t+e-n},setWidth(n){e=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,i){return n-i},leftForLtr(n,i){return n-i}}},fN=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function Vl(t,e,n){return t?dN(e,n):fN()}function iA(t,e){let n,i;(e==="ltr"||e==="rtl")&&(n=t.canvas.style,i=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=i)}function aA(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function rA(t){return t==="angle"?{between:od,compare:hP,normalize:Qn}:{between:Dr,compare:(e,n)=>e-n,normalize:e=>e}}function DS({start:t,end:e,count:n,loop:i,style:a}){return{start:t%n,end:e%n,loop:i&&(e-t+1)%n===0,style:a}}function hN(t,e,n){const{property:i,start:a,end:s}=n,{between:l,normalize:d}=rA(i),f=e.length;let{start:p,end:g,loop:v}=t,y,_;if(v){for(p+=f,g+=f,y=0,_=f;y<_&&l(d(e[p%f][i]),a,s);++y)p--,g--;p%=f,g%=f}return g<p&&(g+=f),{start:p,end:g,loop:v,style:t.style}}function sA(t,e,n){if(!n)return[t];const{property:i,start:a,end:s}=n,l=e.length,{compare:d,between:f,normalize:p}=rA(i),{start:g,end:v,loop:y,style:_}=hN(t,e,n),w=[];let C=!1,A=null,k,z,j;const P=()=>f(a,j,k)&&d(a,j)!==0,H=()=>d(s,k)===0||f(s,j,k),V=()=>C||P(),U=()=>!C||H();for(let Z=g,Q=g;Z<=v;++Z)z=e[Z%l],!z.skip&&(k=p(z[i]),k!==j&&(C=f(k,a,s),A===null&&V()&&(A=d(k,a)===0?Z:Q),A!==null&&U()&&(w.push(DS({start:A,end:Z,loop:y,count:l,style:_})),A=null),Q=Z,j=k));return A!==null&&w.push(DS({start:A,end:v,loop:y,count:l,style:_})),w}function oA(t,e){const n=[],i=t.segments;for(let a=0;a<i.length;a++){const s=sA(i[a],t.points,e);s.length&&n.push(...s)}return n}function pN(t,e,n,i){let a=0,s=e-1;if(n&&!i)for(;a<e&&!t[a].skip;)a++;for(;a<e&&t[a].skip;)a++;for(a%=e,n&&(s+=a);s>a&&t[s%e].skip;)s--;return s%=e,{start:a,end:s}}function mN(t,e,n,i){const a=t.length,s=[];let l=e,d=t[e],f;for(f=e+1;f<=n;++f){const p=t[f%a];p.skip||p.stop?d.skip||(i=!1,s.push({start:e%a,end:(f-1)%a,loop:i}),e=l=p.stop?f:null):(l=f,d.skip&&(e=f)),d=p}return l!==null&&s.push({start:e%a,end:l%a,loop:i}),s}function gN(t,e){const n=t.points,i=t.options.spanGaps,a=n.length;if(!a)return[];const s=!!t._loop,{start:l,end:d}=pN(n,a,s,i);if(i===!0)return MS(t,[{start:l,end:d,loop:s}],n,e);const f=d<l?d+a:d,p=!!t._fullLoop&&l===0&&d===a-1;return MS(t,mN(n,l,f,p),n,e)}function MS(t,e,n,i){return!i||!i.setContext||!n?e:vN(t,e,n,i)}function vN(t,e,n,i){const a=t._chart.getContext(),s=OS(t.options),{_datasetIndex:l,options:{spanGaps:d}}=t,f=n.length,p=[];let g=s,v=e[0].start,y=v;function _(w,C,A,k){const z=d?-1:1;if(w!==C){for(w+=f;n[w%f].skip;)w-=z;for(;n[C%f].skip;)C+=z;w%f!==C%f&&(p.push({start:w%f,end:C%f,loop:A,style:k}),g=k,v=C%f)}}for(const w of e){v=d?v:w.start;let C=n[v%f],A;for(y=v+1;y<=w.end;y++){const k=n[y%f];A=OS(i.setContext(zs(a,{type:"segment",p0:C,p1:k,p0DataIndex:(y-1)%f,p1DataIndex:y%f,datasetIndex:l}))),bN(A,g)&&_(v,y-1,w.loop,g),C=k,g=A}v<y-1&&_(v,y-1,w.loop,g)}return p}function OS(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function bN(t,e){if(!e)return!1;const n=[],i=function(a,s){return Py(s)?(n.includes(s)||n.push(s),n.indexOf(s)):s};return JSON.stringify(t,i)!==JSON.stringify(e,i)}function ph(t,e,n){return t.options.clip?t[n]:e[n]}function yN(t,e){const{xScale:n,yScale:i}=t;return n&&i?{left:ph(n,e,"left"),right:ph(n,e,"right"),top:ph(i,e,"top"),bottom:ph(i,e,"bottom")}:e}function lA(t,e){const n=e._clip;if(n.disabled)return!1;const i=yN(e,t.chartArea);return{left:n.left===!1?0:i.left-(n.left===!0?0:n.left),right:n.right===!1?t.width:i.right+(n.right===!0?0:n.right),top:n.top===!1?0:i.top-(n.top===!0?0:n.top),bottom:n.bottom===!1?t.height:i.bottom+(n.bottom===!0?0:n.bottom)}}/*!
|
||
* Chart.js v4.5.1
|
||
* https://www.chartjs.org
|
||
* (c) 2025 Chart.js Contributors
|
||
* Released under the MIT License
|
||
*/class xN{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,n,i,a){const s=n.listeners[a],l=n.duration;s.forEach(d=>d({chart:e,initial:n.initial,numSteps:l,currentStep:Math.min(i-n.start,l)}))}_refresh(){this._request||(this._running=!0,this._request=$E.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let n=0;this._charts.forEach((i,a)=>{if(!i.running||!i.items.length)return;const s=i.items;let l=s.length-1,d=!1,f;for(;l>=0;--l)f=s[l],f._active?(f._total>i.duration&&(i.duration=f._total),f.tick(e),d=!0):(s[l]=s[s.length-1],s.pop());d&&(a.draw(),this._notify(a,i,e,"progress")),s.length||(i.running=!1,this._notify(a,i,e,"complete"),i.initial=!1),n+=s.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){const n=this._charts;let i=n.get(e);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,i)),i}listen(e,n,i){this._getAnims(e).listeners[n].push(i)}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n)}has(e){return this._getAnims(e).items.length>0}start(e){const n=this._charts.get(e);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((i,a)=>Math.max(i,a._duration),0),this._refresh())}running(e){if(!this._running)return!1;const n=this._charts.get(e);return!(!n||!n.running||!n.items.length)}stop(e){const n=this._charts.get(e);if(!n||!n.items.length)return;const i=n.items;let a=i.length-1;for(;a>=0;--a)i[a].cancel();n.items=[],this._notify(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var wr=new xN;const kS="transparent",_N={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const i=_S(t||kS),a=i.valid&&_S(e||kS);return a&&a.valid?a.mix(i,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class SN{constructor(e,n,i,a){const s=n[i];a=Lu([e.to,a,s,e.from]);const l=Lu([e.from,s,a]);this._active=!0,this._fn=e.fn||_N[e.type||typeof l],this._easing=$u[e.easing]||$u.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=i,this._from=l,this._to=a,this._promises=void 0}active(){return this._active}update(e,n,i){if(this._active){this._notify(!1);const a=this._target[this._prop],s=i-this._start,l=this._duration-s;this._start=i,this._duration=Math.floor(Math.max(l,e.duration)),this._total+=s,this._loop=!!e.loop,this._to=Lu([e.to,n,a,e.from]),this._from=Lu([e.from,a,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const n=e-this._start,i=this._duration,a=this._prop,s=this._from,l=this._loop,d=this._to;let f;if(this._active=s!==d&&(l||n<i),!this._active){this._target[a]=d,this._notify(!0);return}if(n<0){this._target[a]=s;return}f=n/i%2,f=l&&f>1?2-f:f,f=this._easing(Math.min(1,Math.max(0,f))),this._target[a]=this._fn(s,d,f)}wait(){const e=this._promises||(this._promises=[]);return new Promise((n,i)=>{e.push({res:n,rej:i})})}_notify(e){const n=e?"res":"rej",i=this._promises||[];for(let a=0;a<i.length;a++)i[a][n]()}}class cA{constructor(e,n){this._chart=e,this._properties=new Map,this.configure(n)}configure(e){if(!pe(e))return;const n=Object.keys(Je.animation),i=this._properties;Object.getOwnPropertyNames(e).forEach(a=>{const s=e[a];if(!pe(s))return;const l={};for(const d of n)l[d]=s[d];(Qe(s.properties)&&s.properties||[a]).forEach(d=>{(d===a||!i.has(d))&&i.set(d,l)})})}_animateOptions(e,n){const i=n.options,a=CN(e,i);if(!a)return[];const s=this._createAnimations(a,i);return i.$shared&&wN(e.options.$animations,i).then(()=>{e.options=i},()=>{}),s}_createAnimations(e,n){const i=this._properties,a=[],s=e.$animations||(e.$animations={}),l=Object.keys(n),d=Date.now();let f;for(f=l.length-1;f>=0;--f){const p=l[f];if(p.charAt(0)==="$")continue;if(p==="options"){a.push(...this._animateOptions(e,n));continue}const g=n[p];let v=s[p];const y=i.get(p);if(v)if(y&&v.active()){v.update(y,g,d);continue}else v.cancel();if(!y||!y.duration){e[p]=g;continue}s[p]=v=new SN(y,e,p,g),a.push(v)}return a}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}const i=this._createAnimations(e,n);if(i.length)return wr.add(this._chart,i),!0}}function wN(t,e){const n=[],i=Object.keys(e);for(let a=0;a<i.length;a++){const s=t[i[a]];s&&s.active()&&n.push(s.wait())}return Promise.all(n)}function CN(t,e){if(!e)return;let n=t.options;if(!n){t.options=e;return}return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function LS(t,e){const n=t&&t.options||{},i=n.reverse,a=n.min===void 0?e:0,s=n.max===void 0?e:0;return{start:i?s:a,end:i?a:s}}function EN(t,e,n){if(n===!1)return!1;const i=LS(t,n),a=LS(e,n);return{top:a.end,right:i.end,bottom:a.start,left:i.start}}function AN(t){let e,n,i,a;return pe(t)?(e=t.top,n=t.right,i=t.bottom,a=t.left):e=n=i=a=t,{top:e,right:n,bottom:i,left:a,disabled:t===!1}}function uA(t,e){const n=[],i=t._getSortedDatasetMetas(e);let a,s;for(a=0,s=i.length;a<s;++a)n.push(i[a].index);return n}function zS(t,e,n,i={}){const a=t.keys,s=i.mode==="single";let l,d,f,p;if(e===null)return;let g=!1;for(l=0,d=a.length;l<d;++l){if(f=+a[l],f===n){if(g=!0,i.all)continue;break}p=t.values[f],un(p)&&(s||e===0||Wa(e)===Wa(p))&&(e+=p)}return!g&&!i.all?0:e}function TN(t,e){const{iScale:n,vScale:i}=e,a=n.axis==="x"?"x":"y",s=i.axis==="x"?"x":"y",l=Object.keys(t),d=new Array(l.length);let f,p,g;for(f=0,p=l.length;f<p;++f)g=l[f],d[f]={[a]:g,[s]:t[g]};return d}function Nv(t,e){const n=t&&t.options.stacked;return n||n===void 0&&e.stack!==void 0}function DN(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}function MN(t){const{min:e,max:n,minDefined:i,maxDefined:a}=t.getUserBounds();return{min:i?e:Number.NEGATIVE_INFINITY,max:a?n:Number.POSITIVE_INFINITY}}function ON(t,e,n){const i=t[e]||(t[e]={});return i[n]||(i[n]={})}function RS(t,e,n,i){for(const a of e.getMatchingVisibleMetas(i).reverse()){const s=t[a.index];if(n&&s>0||!n&&s<0)return a.index}return null}function PS(t,e){const{chart:n,_cachedMeta:i}=t,a=n._stacks||(n._stacks={}),{iScale:s,vScale:l,index:d}=i,f=s.axis,p=l.axis,g=DN(s,l,i),v=e.length;let y;for(let _=0;_<v;++_){const w=e[_],{[f]:C,[p]:A}=w,k=w._stacks||(w._stacks={});y=k[p]=ON(a,g,C),y[d]=A,y._top=RS(y,l,!0,i.type),y._bottom=RS(y,l,!1,i.type);const z=y._visualValues||(y._visualValues={});z[d]=A}}function jv(t,e){const n=t.scales;return Object.keys(n).filter(i=>n[i].axis===e).shift()}function kN(t,e){return zs(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function LN(t,e,n){return zs(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function yu(t,e){const n=t.controller.index,i=t.vScale&&t.vScale.axis;if(i){e=e||t._parsed;for(const a of e){const s=a._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 Bv=t=>t==="reset"||t==="none",NS=(t,e)=>e?t:Object.assign({},t),zN=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:uA(n,!0),values:null};class ya{constructor(e,n){this.chart=e,this._ctx=e.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 e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=Nv(e.vScale,e),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(e){this.index!==e&&yu(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,n=this._cachedMeta,i=this.getDataset(),a=(v,y,_,w)=>v==="x"?y:v==="r"?w:_,s=n.xAxisID=Jt(i.xAxisID,jv(e,"x")),l=n.yAxisID=Jt(i.yAxisID,jv(e,"y")),d=n.rAxisID=Jt(i.rAxisID,jv(e,"r")),f=n.indexAxis,p=n.iAxisID=a(f,s,l,d),g=n.vAxisID=a(f,l,s,d);n.xScale=this.getScaleForId(s),n.yScale=this.getScaleForId(l),n.rScale=this.getScaleForId(d),n.iScale=this.getScaleForId(p),n.vScale=this.getScaleForId(g)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const n=this._cachedMeta;return e===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&bS(this._data,this),e._stacked&&yu(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),i=this._data;if(pe(n)){const a=this._cachedMeta;this._data=TN(n,a)}else if(i!==n){if(i){bS(i,this);const a=this._cachedMeta;yu(a),a._parsed=[]}n&&Object.isExtensible(n)&&vP(n,this),this._syncList=[],this._data=n}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const n=this._cachedMeta,i=this.getDataset();let a=!1;this._dataCheck();const s=n._stacked;n._stacked=Nv(n.vScale,n),n.stack!==i.stack&&(a=!0,yu(n),n.stack=i.stack),this._resyncElements(e),(a||s!==n._stacked)&&(PS(this,n._parsed),n._stacked=Nv(n.vScale,n))}configure(){const e=this.chart.config,n=e.datasetScopeKeys(this._type),i=e.getOptionScopes(this.getDataset(),n,!0);this.options=e.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,n){const{_cachedMeta:i,_data:a}=this,{iScale:s,_stacked:l}=i,d=s.axis;let f=e===0&&n===a.length?!0:i._sorted,p=e>0&&i._parsed[e-1],g,v,y;if(this._parsing===!1)i._parsed=a,i._sorted=!0,y=a;else{Qe(a[e])?y=this.parseArrayData(i,a,e,n):pe(a[e])?y=this.parseObjectData(i,a,e,n):y=this.parsePrimitiveData(i,a,e,n);const _=()=>v[d]===null||p&&v[d]<p[d];for(g=0;g<n;++g)i._parsed[g+e]=v=y[g],f&&(_()&&(f=!1),p=v);i._sorted=f}l&&PS(this,y)}parsePrimitiveData(e,n,i,a){const{iScale:s,vScale:l}=e,d=s.axis,f=l.axis,p=s.getLabels(),g=s===l,v=new Array(a);let y,_,w;for(y=0,_=a;y<_;++y)w=y+i,v[y]={[d]:g||s.parse(p[w],w),[f]:l.parse(n[w],w)};return v}parseArrayData(e,n,i,a){const{xScale:s,yScale:l}=e,d=new Array(a);let f,p,g,v;for(f=0,p=a;f<p;++f)g=f+i,v=n[g],d[f]={x:s.parse(v[0],g),y:l.parse(v[1],g)};return d}parseObjectData(e,n,i,a){const{xScale:s,yScale:l}=e,{xAxisKey:d="x",yAxisKey:f="y"}=this._parsing,p=new Array(a);let g,v,y,_;for(g=0,v=a;g<v;++g)y=g+i,_=n[y],p[g]={x:s.parse(Ms(_,d),y),y:l.parse(Ms(_,f),y)};return p}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,n,i){const a=this.chart,s=this._cachedMeta,l=n[e.axis],d={keys:uA(a,!0),values:n._stacks[e.axis]._visualValues};return zS(d,l,s.index,{mode:i})}updateRangeFromParsed(e,n,i,a){const s=i[n.axis];let l=s===null?NaN:s;const d=a&&i._stacks[n.axis];a&&d&&(a.values=d,l=zS(a,s,this._cachedMeta.index)),e.min=Math.min(e.min,l),e.max=Math.max(e.max,l)}getMinMax(e,n){const i=this._cachedMeta,a=i._parsed,s=i._sorted&&e===i.iScale,l=a.length,d=this._getOtherScale(e),f=zN(n,i,this.chart),p={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:g,max:v}=MN(d);let y,_;function w(){_=a[y];const C=_[d.axis];return!un(_[e.axis])||g>C||v<C}for(y=0;y<l&&!(!w()&&(this.updateRangeFromParsed(p,e,_,f),s));++y);if(s){for(y=l-1;y>=0;--y)if(!w()){this.updateRangeFromParsed(p,e,_,f);break}}return p}getAllParsedValues(e){const n=this._cachedMeta._parsed,i=[];let a,s,l;for(a=0,s=n.length;a<s;++a)l=n[a][e.axis],un(l)&&i.push(l);return i}getMaxOverflow(){return!1}getLabelAndValue(e){const n=this._cachedMeta,i=n.iScale,a=n.vScale,s=this.getParsed(e);return{label:i?""+i.getLabelForValue(s[i.axis]):"",value:a?""+a.getLabelForValue(s[a.axis]):""}}_update(e){const n=this._cachedMeta;this.update(e||"default"),n._clip=AN(Jt(this.options.clip,EN(n.xScale,n.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,n=this.chart,i=this._cachedMeta,a=i.data||[],s=n.chartArea,l=[],d=this._drawStart||0,f=this._drawCount||a.length-d,p=this.options.drawActiveElementsOnTop;let g;for(i.dataset&&i.dataset.draw(e,s,d,f),g=d;g<d+f;++g){const v=a[g];v.hidden||(v.active&&p?l.push(v):v.draw(e,s))}for(g=0;g<l.length;++g)l[g].draw(e,s)}getStyle(e,n){const i=n?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(e||0,i)}getContext(e,n,i){const a=this.getDataset();let s;if(e>=0&&e<this._cachedMeta.data.length){const l=this._cachedMeta.data[e];s=l.$context||(l.$context=LN(this.getContext(),e,l)),s.parsed=this.getParsed(e),s.raw=a.data[e],s.index=s.dataIndex=e}else s=this.$context||(this.$context=kN(this.chart.getContext(),this.index)),s.dataset=a,s.index=s.datasetIndex=this.index;return s.active=!!n,s.mode=i,s}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,n){return this._resolveElementOptions(this.dataElementType.id,n,e)}_resolveElementOptions(e,n="default",i){const a=n==="active",s=this._cachedDataOpts,l=e+"-"+n,d=s[l],f=this.enableOptionSharing&&sd(i);if(d)return NS(d,f);const p=this.chart.config,g=p.datasetElementScopeKeys(this._type,e),v=a?[`${e}Hover`,"hover",e,""]:[e,""],y=p.getOptionScopes(this.getDataset(),g),_=Object.keys(Je.elements[e]),w=()=>this.getContext(i,a,n),C=p.resolveNamedOptions(y,_,w,v);return C.$shared&&(C.$shared=f,s[l]=Object.freeze(NS(C,f))),C}_resolveAnimations(e,n,i){const a=this.chart,s=this._cachedDataOpts,l=`animation-${n}`,d=s[l];if(d)return d;let f;if(a.options.animation!==!1){const g=this.chart.config,v=g.datasetAnimationScopeKeys(this._type,n),y=g.getOptionScopes(this.getDataset(),v);f=g.createResolver(y,this.getContext(e,i,n))}const p=new cA(a,f&&f.animations);return f&&f._cacheable&&(s[l]=Object.freeze(p)),p}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return!n||Bv(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){const i=this.resolveDataElementOptions(e,n),a=this._sharedOptions,s=this.getSharedOptions(i),l=this.includeOptions(n,s)||s!==a;return this.updateSharedOptions(s,n,i),{sharedOptions:s,includeOptions:l}}updateElement(e,n,i,a){Bv(a)?Object.assign(e,i):this._resolveAnimations(n,a).update(e,i)}updateSharedOptions(e,n,i){e&&!Bv(n)&&this._resolveAnimations(void 0,n).update(e,i)}_setStyle(e,n,i,a){e.active=a;const s=this.getStyle(n,a);this._resolveAnimations(n,i,a).update(e,{options:!a&&this.getSharedOptions(s)||s})}removeHoverStyle(e,n,i){this._setStyle(e,i,"active",!1)}setHoverStyle(e,n,i){this._setStyle(e,i,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const n=this._data,i=this._cachedMeta.data;for(const[d,f,p]of this._syncList)this[d](f,p);this._syncList=[];const a=i.length,s=n.length,l=Math.min(s,a);l&&this.parse(0,l),s>a?this._insertElements(a,s-a,e):s<a&&this._removeElements(s,a-s)}_insertElements(e,n,i=!0){const a=this._cachedMeta,s=a.data,l=e+n;let d;const f=p=>{for(p.length+=n,d=p.length-1;d>=l;d--)p[d]=p[d-n]};for(f(s),d=e;d<l;++d)s[d]=new this.dataElementType;this._parsing&&f(a._parsed),this.parse(e,n),i&&this.updateElements(s,e,n,"reset")}updateElements(e,n,i,a){}_removeElements(e,n){const i=this._cachedMeta;if(this._parsing){const a=i._parsed.splice(e,n);i._stacked&&yu(i,a)}i.data.splice(e,n)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[n,i,a]=e;this[n](i,a)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,n){n&&this._sync(["_removeElements",e,n]);const i=arguments.length-2;i&&this._sync(["_insertElements",e,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}Lt(ya,"defaults",{}),Lt(ya,"datasetElementType",null),Lt(ya,"dataElementType",null);function RN(t,e){if(!t._cache.$bar){const n=t.getMatchingVisibleMetas(e);let i=[];for(let a=0,s=n.length;a<s;a++)i=i.concat(n[a].controller.getAllParsedValues(t));t._cache.$bar=VE(i.sort((a,s)=>a-s))}return t._cache.$bar}function PN(t){const e=t.iScale,n=RN(e,t.type);let i=e._length,a,s,l,d;const f=()=>{l===32767||l===-32768||(sd(d)&&(i=Math.min(i,Math.abs(l-d)||i)),d=l)};for(a=0,s=n.length;a<s;++a)l=e.getPixelForValue(n[a]),f();for(d=void 0,a=0,s=e.ticks.length;a<s;++a)l=e.getPixelForTick(a),f();return i}function NN(t,e,n,i){const a=n.barThickness;let s,l;return ue(a)?(s=e.min*n.categoryPercentage,l=n.barPercentage):(s=a*i,l=1),{chunk:s/i,ratio:l,start:e.pixels[t]-s/2}}function jN(t,e,n,i){const a=e.pixels,s=a[t];let l=t>0?a[t-1]:null,d=t<a.length-1?a[t+1]:null;const f=n.categoryPercentage;l===null&&(l=s-(d===null?e.end-e.start:d-s)),d===null&&(d=s+s-l);const p=s-(s-Math.min(l,d))/2*f;return{chunk:Math.abs(d-l)/2*f/i,ratio:n.barPercentage,start:p}}function BN(t,e,n,i){const a=n.parse(t[0],i),s=n.parse(t[1],i),l=Math.min(a,s),d=Math.max(a,s);let f=l,p=d;Math.abs(l)>Math.abs(d)&&(f=d,p=l),e[n.axis]=p,e._custom={barStart:f,barEnd:p,start:a,end:s,min:l,max:d}}function dA(t,e,n,i){return Qe(t)?BN(t,e,n,i):e[n.axis]=n.parse(t,i),e}function jS(t,e,n,i){const a=t.iScale,s=t.vScale,l=a.getLabels(),d=a===s,f=[];let p,g,v,y;for(p=n,g=n+i;p<g;++p)y=e[p],v={},v[a.axis]=d||a.parse(l[p],p),f.push(dA(y,v,s,p));return f}function Iv(t){return t&&t.barStart!==void 0&&t.barEnd!==void 0}function IN(t,e,n){return t!==0?Wa(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}function FN(t){let e,n,i,a,s;return t.horizontal?(e=t.base>t.x,n="left",i="right"):(e=t.base<t.y,n="bottom",i="top"),e?(a="end",s="start"):(a="start",s="end"),{start:n,end:i,reverse:e,top:a,bottom:s}}function HN(t,e,n,i){let a=e.borderSkipped;const s={};if(!a){t.borderSkipped=s;return}if(a===!0){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:l,end:d,reverse:f,top:p,bottom:g}=FN(t);a==="middle"&&n&&(t.enableBorderRadius=!0,(n._top||0)===i?a=p:(n._bottom||0)===i?a=g:(s[BS(g,l,d,f)]=!0,a=p)),s[BS(a,l,d,f)]=!0,t.borderSkipped=s}function BS(t,e,n,i){return i?(t=UN(t,e,n),t=IS(t,n,e)):t=IS(t,e,n),t}function UN(t,e,n){return t===e?n:t===n?e:t}function IS(t,e,n){return t==="start"?e:t==="end"?n:t}function VN(t,{inflateAmount:e},n){t.inflateAmount=e==="auto"?n===1?.33:0:e}class Ph extends ya{parsePrimitiveData(e,n,i,a){return jS(e,n,i,a)}parseArrayData(e,n,i,a){return jS(e,n,i,a)}parseObjectData(e,n,i,a){const{iScale:s,vScale:l}=e,{xAxisKey:d="x",yAxisKey:f="y"}=this._parsing,p=s.axis==="x"?d:f,g=l.axis==="x"?d:f,v=[];let y,_,w,C;for(y=i,_=i+a;y<_;++y)C=n[y],w={},w[s.axis]=s.parse(Ms(C,p),y),v.push(dA(Ms(C,g),w,l,y));return v}updateRangeFromParsed(e,n,i,a){super.updateRangeFromParsed(e,n,i,a);const s=i._custom;s&&n===this._cachedMeta.vScale&&(e.min=Math.min(e.min,s.min),e.max=Math.max(e.max,s.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const n=this._cachedMeta,{iScale:i,vScale:a}=n,s=this.getParsed(e),l=s._custom,d=Iv(l)?"["+l.start+", "+l.end+"]":""+a.getLabelForValue(s[a.axis]);return{label:""+i.getLabelForValue(s[i.axis]),value:d}}initialize(){this.enableOptionSharing=!0,super.initialize();const e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,e)}updateElements(e,n,i,a){const s=a==="reset",{index:l,_cachedMeta:{vScale:d}}=this,f=d.getBasePixel(),p=d.isHorizontal(),g=this._getRuler(),{sharedOptions:v,includeOptions:y}=this._getSharedOptions(n,a);for(let _=n;_<n+i;_++){const w=this.getParsed(_),C=s||ue(w[d.axis])?{base:f,head:f}:this._calculateBarValuePixels(_),A=this._calculateBarIndexPixels(_,g),k=(w._stacks||{})[d.axis],z={horizontal:p,base:C.base,enableBorderRadius:!k||Iv(w._custom)||l===k._top||l===k._bottom,x:p?C.head:A.center,y:p?A.center:C.head,height:p?A.size:Math.abs(C.size),width:p?Math.abs(C.size):A.size};y&&(z.options=v||this.resolveDataElementOptions(_,e[_].active?"active":a));const j=z.options||e[_].options;HN(z,j,k,l),VN(z,j,g.ratio),this.updateElement(e[_],_,z,a)}}_getStacks(e,n){const{iScale:i}=this._cachedMeta,a=i.getMatchingVisibleMetas(this._type).filter(g=>g.controller.options.grouped),s=i.options.stacked,l=[],d=this._cachedMeta.controller.getParsed(n),f=d&&d[i.axis],p=g=>{const v=g._parsed.find(_=>_[i.axis]===f),y=v&&v[g.vScale.axis];if(ue(y)||isNaN(y))return!0};for(const g of a)if(!(n!==void 0&&p(g))&&((s===!1||l.indexOf(g.stack)===-1||s===void 0&&g.stack===void 0)&&l.push(g.stack),g.index===e))break;return l.length||l.push(void 0),l}_getStackCount(e){return this._getStacks(void 0,e).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const e=this.chart.scales,n=this.chart.options.indexAxis;return Object.keys(e).filter(i=>e[i].axis===n).shift()}_getAxis(){const e={},n=this.getFirstScaleIdForIndexAxis();for(const i of this.chart.data.datasets)e[Jt(this.chart.options.indexAxis==="x"?i.xAxisID:i.yAxisID,n)]=!0;return Object.keys(e)}_getStackIndex(e,n,i){const a=this._getStacks(e,i),s=n!==void 0?a.indexOf(n):-1;return s===-1?a.length-1:s}_getRuler(){const e=this.options,n=this._cachedMeta,i=n.iScale,a=[];let s,l;for(s=0,l=n.data.length;s<l;++s)a.push(i.getPixelForValue(this.getParsed(s)[i.axis],s));const d=e.barThickness;return{min:d||PN(n),pixels:a,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:e.grouped,ratio:d?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:n,_stacked:i,index:a},options:{base:s,minBarLength:l}}=this,d=s||0,f=this.getParsed(e),p=f._custom,g=Iv(p);let v=f[n.axis],y=0,_=i?this.applyStack(n,f,i):v,w,C;_!==v&&(y=_-v,_=v),g&&(v=p.barStart,_=p.barEnd-p.barStart,v!==0&&Wa(v)!==Wa(p.barEnd)&&(y=0),y+=v);const A=!ue(s)&&!g?s:y;let k=n.getPixelForValue(A);if(this.chart.getDataVisibility(e)?w=n.getPixelForValue(y+_):w=k,C=w-k,Math.abs(C)<l){C=IN(C,n,d)*l,v===d&&(k-=C/2);const z=n.getPixelForDecimal(0),j=n.getPixelForDecimal(1),P=Math.min(z,j),H=Math.max(z,j);k=Math.max(Math.min(k,H),P),w=k+C,i&&!g&&(f._stacks[n.axis]._visualValues[a]=n.getValueForPixel(w)-n.getValueForPixel(k))}if(k===n.getPixelForValue(d)){const z=Wa(C)*n.getLineWidthForValue(d)/2;k+=z,C-=z}return{size:C,base:k,head:w,center:w+C/2}}_calculateBarIndexPixels(e,n){const i=n.scale,a=this.options,s=a.skipNull,l=Jt(a.maxBarThickness,1/0);let d,f;const p=this._getAxisCount();if(n.grouped){const g=s?this._getStackCount(e):n.stackCount,v=a.barThickness==="flex"?jN(e,n,a,g*p):NN(e,n,a,g*p),y=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,_=this._getAxis().indexOf(Jt(y,this.getFirstScaleIdForIndexAxis())),w=this._getStackIndex(this.index,this._cachedMeta.stack,s?e:void 0)+_;d=v.start+v.chunk*w+v.chunk/2,f=Math.min(l,v.chunk*v.ratio)}else d=i.getPixelForValue(this.getParsed(e)[i.axis],e),f=Math.min(l,n.min*n.ratio);return{base:d-f/2,head:d+f/2,center:d,size:f}}draw(){const e=this._cachedMeta,n=e.vScale,i=e.data,a=i.length;let s=0;for(;s<a;++s)this.getParsed(s)[n.axis]!==null&&!i[s].hidden&&i[s].draw(this._ctx)}}Lt(Ph,"id","bar"),Lt(Ph,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),Lt(Ph,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class Nh extends ya{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(e,n,i,a){const s=super.parsePrimitiveData(e,n,i,a);for(let l=0;l<s.length;l++)s[l]._custom=this.resolveDataElementOptions(l+i).radius;return s}parseArrayData(e,n,i,a){const s=super.parseArrayData(e,n,i,a);for(let l=0;l<s.length;l++){const d=n[i+l];s[l]._custom=Jt(d[2],this.resolveDataElementOptions(l+i).radius)}return s}parseObjectData(e,n,i,a){const s=super.parseObjectData(e,n,i,a);for(let l=0;l<s.length;l++){const d=n[i+l];s[l]._custom=Jt(d&&d.r&&+d.r,this.resolveDataElementOptions(l+i).radius)}return s}getMaxOverflow(){const e=this._cachedMeta.data;let n=0;for(let i=e.length-1;i>=0;--i)n=Math.max(n,e[i].size(this.resolveDataElementOptions(i))/2);return n>0&&n}getLabelAndValue(e){const n=this._cachedMeta,i=this.chart.data.labels||[],{xScale:a,yScale:s}=n,l=this.getParsed(e),d=a.getLabelForValue(l.x),f=s.getLabelForValue(l.y),p=l._custom;return{label:i[e]||"",value:"("+d+", "+f+(p?", "+p:"")+")"}}update(e){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,e)}updateElements(e,n,i,a){const s=a==="reset",{iScale:l,vScale:d}=this._cachedMeta,{sharedOptions:f,includeOptions:p}=this._getSharedOptions(n,a),g=l.axis,v=d.axis;for(let y=n;y<n+i;y++){const _=e[y],w=!s&&this.getParsed(y),C={},A=C[g]=s?l.getPixelForDecimal(.5):l.getPixelForValue(w[g]),k=C[v]=s?d.getBasePixel():d.getPixelForValue(w[v]);C.skip=isNaN(A)||isNaN(k),p&&(C.options=f||this.resolveDataElementOptions(y,_.active?"active":a),s&&(C.options.radius=0)),this.updateElement(_,y,C,a)}}resolveDataElementOptions(e,n){const i=this.getParsed(e);let a=super.resolveDataElementOptions(e,n);a.$shared&&(a=Object.assign({},a,{$shared:!1}));const s=a.radius;return n!=="active"&&(a.radius=0),a.radius+=Jt(i&&i._custom,s),a}}Lt(Nh,"id","bubble"),Lt(Nh,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),Lt(Nh,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function $N(t,e,n){let i=1,a=1,s=0,l=0;if(e<qe){const d=t,f=d+e,p=Math.cos(d),g=Math.sin(d),v=Math.cos(f),y=Math.sin(f),_=(j,P,H)=>od(j,d,f,!0)?1:Math.max(P,P*n,H,H*n),w=(j,P,H)=>od(j,d,f,!0)?-1:Math.min(P,P*n,H,H*n),C=_(0,p,v),A=_(hn,g,y),k=w(Ce,p,v),z=w(Ce+hn,g,y);i=(C-k)/2,a=(A-z)/2,s=-(C+k)/2,l=-(A+z)/2}return{ratioX:i,ratioY:a,offsetX:s,offsetY:l}}class Oo extends ya{constructor(e,n){super(e,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,n){const i=this.getDataset().data,a=this._cachedMeta;if(this._parsing===!1)a._parsed=i;else{let s=f=>+i[f];if(pe(i[e])){const{key:f="value"}=this._parsing;s=p=>+Ms(i[p],f)}let l,d;for(l=e,d=e+n;l<d;++l)a._parsed[l]=s(l)}}_getRotation(){return va(this.options.rotation-90)}_getCircumference(){return va(this.options.circumference)}_getRotationExtents(){let e=qe,n=-qe;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){const a=this.chart.getDatasetMeta(i).controller,s=a._getRotation(),l=a._getCircumference();e=Math.min(e,s),n=Math.max(n,s+l)}return{rotation:e,circumference:n-e}}update(e){const n=this.chart,{chartArea:i}=n,a=this._cachedMeta,s=a.data,l=this.getMaxBorderWidth()+this.getMaxOffset(s)+this.options.spacing,d=Math.max((Math.min(i.width,i.height)-l)/2,0),f=Math.min(nP(this.options.cutout,d),1),p=this._getRingWeight(this.index),{circumference:g,rotation:v}=this._getRotationExtents(),{ratioX:y,ratioY:_,offsetX:w,offsetY:C}=$N(v,g,f),A=(i.width-l)/y,k=(i.height-l)/_,z=Math.max(Math.min(A,k)/2,0),j=BE(this.options.radius,z),P=Math.max(j*f,0),H=(j-P)/this._getVisibleDatasetWeightTotal();this.offsetX=w*j,this.offsetY=C*j,a.total=this.calculateTotal(),this.outerRadius=j-H*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-H*p,0),this.updateElements(s,0,s.length,e)}_circumference(e,n){const i=this.options,a=this._cachedMeta,s=this._getCircumference();return n&&i.animation.animateRotate||!this.chart.getDataVisibility(e)||a._parsed[e]===null||a.data[e].hidden?0:this.calculateCircumference(a._parsed[e]*s/qe)}updateElements(e,n,i,a){const s=a==="reset",l=this.chart,d=l.chartArea,p=l.options.animation,g=(d.left+d.right)/2,v=(d.top+d.bottom)/2,y=s&&p.animateScale,_=y?0:this.innerRadius,w=y?0:this.outerRadius,{sharedOptions:C,includeOptions:A}=this._getSharedOptions(n,a);let k=this._getRotation(),z;for(z=0;z<n;++z)k+=this._circumference(z,s);for(z=n;z<n+i;++z){const j=this._circumference(z,s),P=e[z],H={x:g+this.offsetX,y:v+this.offsetY,startAngle:k,endAngle:k+j,circumference:j,outerRadius:w,innerRadius:_};A&&(H.options=C||this.resolveDataElementOptions(z,P.active?"active":a)),k+=j,this.updateElement(P,z,H,a)}}calculateTotal(){const e=this._cachedMeta,n=e.data;let i=0,a;for(a=0;a<n.length;a++){const s=e._parsed[a];s!==null&&!isNaN(s)&&this.chart.getDataVisibility(a)&&!n[a].hidden&&(i+=Math.abs(s))}return i}calculateCircumference(e){const n=this._cachedMeta.total;return n>0&&!isNaN(e)?qe*(Math.abs(e)/n):0}getLabelAndValue(e){const n=this._cachedMeta,i=this.chart,a=i.data.labels||[],s=Dd(n._parsed[e],i.options.locale);return{label:a[e]||"",value:s}}getMaxBorderWidth(e){let n=0;const i=this.chart;let a,s,l,d,f;if(!e){for(a=0,s=i.data.datasets.length;a<s;++a)if(i.isDatasetVisible(a)){l=i.getDatasetMeta(a),e=l.data,d=l.controller;break}}if(!e)return 0;for(a=0,s=e.length;a<s;++a)f=d.resolveDataElementOptions(a),f.borderAlign!=="inner"&&(n=Math.max(n,f.borderWidth||0,f.hoverBorderWidth||0));return n}getMaxOffset(e){let n=0;for(let i=0,a=e.length;i<a;++i){const s=this.resolveDataElementOptions(i);n=Math.max(n,s.offset||0,s.hoverOffset||0)}return n}_getRingWeightOffset(e){let n=0;for(let i=0;i<e;++i)this.chart.isDatasetVisible(i)&&(n+=this._getRingWeight(i));return n}_getRingWeight(e){return Math.max(Jt(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}Lt(Oo,"id","doughnut"),Lt(Oo,"defaults",{datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"}),Lt(Oo,"descriptors",{_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")}),Lt(Oo,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data,{labels:{pointStyle:i,textAlign:a,color:s,useBorderRadius:l,borderRadius:d}}=e.legend.options;return n.labels.length&&n.datasets.length?n.labels.map((f,p)=>{const v=e.getDatasetMeta(0).controller.getStyle(p);return{text:f,fillStyle:v.backgroundColor,fontColor:s,hidden:!e.getDataVisibility(p),lineDash:v.borderDash,lineDashOffset:v.borderDashOffset,lineJoin:v.borderJoinStyle,lineWidth:v.borderWidth,strokeStyle:v.borderColor,textAlign:a,pointStyle:i,borderRadius:l&&(d||v.borderRadius),index:p}}):[]}},onClick(e,n,i){i.chart.toggleDataVisibility(n.index),i.chart.update()}}}});class Wu extends ya{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const n=this._cachedMeta,{dataset:i,data:a=[],_dataset:s}=n,l=this.chart._animationsDisabled;let{start:d,count:f}=WE(n,a,l);this._drawStart=d,this._drawCount=f,ZE(n)&&(d=0,f=a.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!s._decimated,i.points=a;const p=this.resolveDatasetElementOptions(e);this.options.showLine||(p.borderWidth=0),p.segment=this.options.segment,this.updateElement(i,void 0,{animated:!l,options:p},e),this.updateElements(a,d,f,e)}updateElements(e,n,i,a){const s=a==="reset",{iScale:l,vScale:d,_stacked:f,_dataset:p}=this._cachedMeta,{sharedOptions:g,includeOptions:v}=this._getSharedOptions(n,a),y=l.axis,_=d.axis,{spanGaps:w,segment:C}=this.options,A=Yl(w)?w:Number.POSITIVE_INFINITY,k=this.chart._animationsDisabled||s||a==="none",z=n+i,j=e.length;let P=n>0&&this.getParsed(n-1);for(let H=0;H<j;++H){const V=e[H],U=k?V:{};if(H<n||H>=z){U.skip=!0;continue}const Z=this.getParsed(H),Q=ue(Z[_]),et=U[y]=l.getPixelForValue(Z[y],H),X=U[_]=s||Q?d.getBasePixel():d.getPixelForValue(f?this.applyStack(d,Z,f):Z[_],H);U.skip=isNaN(et)||isNaN(X)||Q,U.stop=H>0&&Math.abs(Z[y]-P[y])>A,C&&(U.parsed=Z,U.raw=p.data[H]),v&&(U.options=g||this.resolveDataElementOptions(H,V.active?"active":a)),k||this.updateElement(V,H,U,a),P=Z}}getMaxOverflow(){const e=this._cachedMeta,n=e.dataset,i=n.options&&n.options.borderWidth||0,a=e.data||[];if(!a.length)return i;const s=a[0].size(this.resolveDataElementOptions(0)),l=a[a.length-1].size(this.resolveDataElementOptions(a.length-1));return Math.max(i,s,l)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}Lt(Wu,"id","line"),Lt(Wu,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),Lt(Wu,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Zu extends ya{constructor(e,n){super(e,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const n=this._cachedMeta,i=this.chart,a=i.data.labels||[],s=Dd(n._parsed[e].r,i.options.locale);return{label:a[e]||"",value:s}}parseObjectData(e,n,i,a){return eA.bind(this)(e,n,i,a)}update(e){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,e)}getMinMax(){const e=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((i,a)=>{const s=this.getParsed(a).r;!isNaN(s)&&this.chart.getDataVisibility(a)&&(s<n.min&&(n.min=s),s>n.max&&(n.max=s))}),n}_updateRadius(){const e=this.chart,n=e.chartArea,i=e.options,a=Math.min(n.right-n.left,n.bottom-n.top),s=Math.max(a/2,0),l=Math.max(i.cutoutPercentage?s/100*i.cutoutPercentage:1,0),d=(s-l)/e.getVisibleDatasetCount();this.outerRadius=s-d*this.index,this.innerRadius=this.outerRadius-d}updateElements(e,n,i,a){const s=a==="reset",l=this.chart,f=l.options.animation,p=this._cachedMeta.rScale,g=p.xCenter,v=p.yCenter,y=p.getIndexAngle(0)-.5*Ce;let _=y,w;const C=360/this.countVisibleElements();for(w=0;w<n;++w)_+=this._computeAngle(w,a,C);for(w=n;w<n+i;w++){const A=e[w];let k=_,z=_+this._computeAngle(w,a,C),j=l.getDataVisibility(w)?p.getDistanceFromCenterForValue(this.getParsed(w).r):0;_=z,s&&(f.animateScale&&(j=0),f.animateRotate&&(k=z=y));const P={x:g,y:v,innerRadius:0,outerRadius:j,startAngle:k,endAngle:z,options:this.resolveDataElementOptions(w,A.active?"active":a)};this.updateElement(A,w,P,a)}}countVisibleElements(){const e=this._cachedMeta;let n=0;return e.data.forEach((i,a)=>{!isNaN(this.getParsed(a).r)&&this.chart.getDataVisibility(a)&&n++}),n}_computeAngle(e,n,i){return this.chart.getDataVisibility(e)?va(this.resolveDataElementOptions(e,n).angle||i):0}}Lt(Zu,"id","polarArea"),Lt(Zu,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),Lt(Zu,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:i,color:a}}=e.legend.options;return n.labels.map((s,l)=>{const f=e.getDatasetMeta(0).controller.getStyle(l);return{text:s,fillStyle:f.backgroundColor,strokeStyle:f.borderColor,fontColor:a,lineWidth:f.borderWidth,pointStyle:i,hidden:!e.getDataVisibility(l),index:l}})}return[]}},onClick(e,n,i){i.chart.toggleDataVisibility(n.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class wb extends Oo{}Lt(wb,"id","pie"),Lt(wb,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class jh extends ya{getLabelAndValue(e){const n=this._cachedMeta.vScale,i=this.getParsed(e);return{label:n.getLabels()[e],value:""+n.getLabelForValue(i[n.axis])}}parseObjectData(e,n,i,a){return eA.bind(this)(e,n,i,a)}update(e){const n=this._cachedMeta,i=n.dataset,a=n.data||[],s=n.iScale.getLabels();if(i.points=a,e!=="resize"){const l=this.resolveDatasetElementOptions(e);this.options.showLine||(l.borderWidth=0);const d={_loop:!0,_fullLoop:s.length===a.length,options:l};this.updateElement(i,void 0,d,e)}this.updateElements(a,0,a.length,e)}updateElements(e,n,i,a){const s=this._cachedMeta.rScale,l=a==="reset";for(let d=n;d<n+i;d++){const f=e[d],p=this.resolveDataElementOptions(d,f.active?"active":a),g=s.getPointPositionForValue(d,this.getParsed(d).r),v=l?s.xCenter:g.x,y=l?s.yCenter:g.y,_={x:v,y,angle:g.angle,skip:isNaN(v)||isNaN(y),options:p};this.updateElement(f,d,_,a)}}}Lt(jh,"id","radar"),Lt(jh,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),Lt(jh,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class Bh extends ya{getLabelAndValue(e){const n=this._cachedMeta,i=this.chart.data.labels||[],{xScale:a,yScale:s}=n,l=this.getParsed(e),d=a.getLabelForValue(l.x),f=s.getLabelForValue(l.y);return{label:i[e]||"",value:"("+d+", "+f+")"}}update(e){const n=this._cachedMeta,{data:i=[]}=n,a=this.chart._animationsDisabled;let{start:s,count:l}=WE(n,i,a);if(this._drawStart=s,this._drawCount=l,ZE(n)&&(s=0,l=i.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:d,_dataset:f}=n;d._chart=this.chart,d._datasetIndex=this.index,d._decimated=!!f._decimated,d.points=i;const p=this.resolveDatasetElementOptions(e);p.segment=this.options.segment,this.updateElement(d,void 0,{animated:!a,options:p},e)}else this.datasetElementType&&(delete n.dataset,this.datasetElementType=!1);this.updateElements(i,s,l,e)}addElements(){const{showLine:e}=this.options;!this.datasetElementType&&e&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(e,n,i,a){const s=a==="reset",{iScale:l,vScale:d,_stacked:f,_dataset:p}=this._cachedMeta,g=this.resolveDataElementOptions(n,a),v=this.getSharedOptions(g),y=this.includeOptions(a,v),_=l.axis,w=d.axis,{spanGaps:C,segment:A}=this.options,k=Yl(C)?C:Number.POSITIVE_INFINITY,z=this.chart._animationsDisabled||s||a==="none";let j=n>0&&this.getParsed(n-1);for(let P=n;P<n+i;++P){const H=e[P],V=this.getParsed(P),U=z?H:{},Z=ue(V[w]),Q=U[_]=l.getPixelForValue(V[_],P),et=U[w]=s||Z?d.getBasePixel():d.getPixelForValue(f?this.applyStack(d,V,f):V[w],P);U.skip=isNaN(Q)||isNaN(et)||Z,U.stop=P>0&&Math.abs(V[_]-j[_])>k,A&&(U.parsed=V,U.raw=p.data[P]),y&&(U.options=v||this.resolveDataElementOptions(P,H.active?"active":a)),z||this.updateElement(H,P,U,a),j=V}this.updateSharedOptions(v,a,g)}getMaxOverflow(){const e=this._cachedMeta,n=e.data||[];if(!this.options.showLine){let d=0;for(let f=n.length-1;f>=0;--f)d=Math.max(d,n[f].size(this.resolveDataElementOptions(f))/2);return d>0&&d}const i=e.dataset,a=i.options&&i.options.borderWidth||0;if(!n.length)return a;const s=n[0].size(this.resolveDataElementOptions(0)),l=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(a,s,l)/2}}Lt(Bh,"id","scatter"),Lt(Bh,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),Lt(Bh,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var GN=Object.freeze({__proto__:null,BarController:Ph,BubbleController:Nh,DoughnutController:Oo,LineController:Wu,PieController:wb,PolarAreaController:Zu,RadarController:jh,ScatterController:Bh});function So(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Uy{constructor(e){Lt(this,"options");this.options=e||{}}static override(e){Object.assign(Uy.prototype,e)}init(){}formats(){return So()}parse(){return So()}format(){return So()}add(){return So()}diff(){return So()}startOf(){return So()}endOf(){return So()}}var WN={_date:Uy};function ZN(t,e,n,i){const{controller:a,data:s,_sorted:l}=t,d=a._cachedMeta.iScale,f=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(d&&e===d.axis&&e!=="r"&&l&&s.length){const p=d._reversePixels?mP:Mr;if(i){if(a._sharedOptions){const g=s[0],v=typeof g.getRange=="function"&&g.getRange(e);if(v){const y=p(s,e,n-v),_=p(s,e,n+v);return{lo:y.lo,hi:_.hi}}}}else{const g=p(s,e,n);if(f){const{vScale:v}=a._cachedMeta,{_parsed:y}=t,_=y.slice(0,g.lo+1).reverse().findIndex(C=>!ue(C[v.axis]));g.lo-=Math.max(0,_);const w=y.slice(g.hi).findIndex(C=>!ue(C[v.axis]));g.hi+=Math.max(0,w)}return g}}return{lo:0,hi:s.length-1}}function Zp(t,e,n,i,a){const s=t.getSortedVisibleDatasetMetas(),l=n[e];for(let d=0,f=s.length;d<f;++d){const{index:p,data:g}=s[d],{lo:v,hi:y}=ZN(s[d],e,l,a);for(let _=v;_<=y;++_){const w=g[_];w.skip||i(w,p,_)}}}function qN(t){const e=t.indexOf("x")!==-1,n=t.indexOf("y")!==-1;return function(i,a){const s=e?Math.abs(i.x-a.x):0,l=n?Math.abs(i.y-a.y):0;return Math.sqrt(Math.pow(s,2)+Math.pow(l,2))}}function Fv(t,e,n,i,a){const s=[];return!a&&!t.isPointInArea(e)||Zp(t,n,e,function(d,f,p){!a&&!Or(d,t.chartArea,0)||d.inRange(e.x,e.y,i)&&s.push({element:d,datasetIndex:f,index:p})},!0),s}function YN(t,e,n,i){let a=[];function s(l,d,f){const{startAngle:p,endAngle:g}=l.getProps(["startAngle","endAngle"],i),{angle:v}=HE(l,{x:e.x,y:e.y});od(v,p,g)&&a.push({element:l,datasetIndex:d,index:f})}return Zp(t,n,e,s),a}function XN(t,e,n,i,a,s){let l=[];const d=qN(n);let f=Number.POSITIVE_INFINITY;function p(g,v,y){const _=g.inRange(e.x,e.y,a);if(i&&!_)return;const w=g.getCenterPoint(a);if(!(!!s||t.isPointInArea(w))&&!_)return;const A=d(e,w);A<f?(l=[{element:g,datasetIndex:v,index:y}],f=A):A===f&&l.push({element:g,datasetIndex:v,index:y})}return Zp(t,n,e,p),l}function Hv(t,e,n,i,a,s){return!s&&!t.isPointInArea(e)?[]:n==="r"&&!i?YN(t,e,n,a):XN(t,e,n,i,a,s)}function FS(t,e,n,i,a){const s=[],l=n==="x"?"inXRange":"inYRange";let d=!1;return Zp(t,n,e,(f,p,g)=>{f[l]&&f[l](e[n],a)&&(s.push({element:f,datasetIndex:p,index:g}),d=d||f.inRange(e.x,e.y,a))}),i&&!d?[]:s}var KN={modes:{index(t,e,n,i){const a=Ao(e,t),s=n.axis||"x",l=n.includeInvisible||!1,d=n.intersect?Fv(t,a,s,i,l):Hv(t,a,s,!1,i,l),f=[];return d.length?(t.getSortedVisibleDatasetMetas().forEach(p=>{const g=d[0].index,v=p.data[g];v&&!v.skip&&f.push({element:v,datasetIndex:p.index,index:g})}),f):[]},dataset(t,e,n,i){const a=Ao(e,t),s=n.axis||"xy",l=n.includeInvisible||!1;let d=n.intersect?Fv(t,a,s,i,l):Hv(t,a,s,!1,i,l);if(d.length>0){const f=d[0].datasetIndex,p=t.getDatasetMeta(f).data;d=[];for(let g=0;g<p.length;++g)d.push({element:p[g],datasetIndex:f,index:g})}return d},point(t,e,n,i){const a=Ao(e,t),s=n.axis||"xy",l=n.includeInvisible||!1;return Fv(t,a,s,i,l)},nearest(t,e,n,i){const a=Ao(e,t),s=n.axis||"xy",l=n.includeInvisible||!1;return Hv(t,a,s,n.intersect,i,l)},x(t,e,n,i){const a=Ao(e,t);return FS(t,a,"x",n.intersect,i)},y(t,e,n,i){const a=Ao(e,t);return FS(t,a,"y",n.intersect,i)}}};const fA=["left","top","right","bottom"];function xu(t,e){return t.filter(n=>n.pos===e)}function HS(t,e){return t.filter(n=>fA.indexOf(n.pos)===-1&&n.box.axis===e)}function _u(t,e){return t.sort((n,i)=>{const a=e?i:n,s=e?n:i;return a.weight===s.weight?a.index-s.index:a.weight-s.weight})}function QN(t){const e=[];let n,i,a,s,l,d;for(n=0,i=(t||[]).length;n<i;++n)a=t[n],{position:s,options:{stack:l,stackWeight:d=1}}=a,e.push({index:n,box:a,pos:s,horizontal:a.isHorizontal(),weight:a.weight,stack:l&&s+l,stackWeight:d});return e}function JN(t){const e={};for(const n of t){const{stack:i,pos:a,stackWeight:s}=n;if(!i||!fA.includes(a))continue;const l=e[i]||(e[i]={count:0,placed:0,weight:0,size:0});l.count++,l.weight+=s}return e}function t6(t,e){const n=JN(t),{vBoxMaxWidth:i,hBoxMaxHeight:a}=e;let s,l,d;for(s=0,l=t.length;s<l;++s){d=t[s];const{fullSize:f}=d.box,p=n[d.stack],g=p&&d.stackWeight/p.weight;d.horizontal?(d.width=g?g*i:f&&e.availableWidth,d.height=a):(d.width=i,d.height=g?g*a:f&&e.availableHeight)}return n}function e6(t){const e=QN(t),n=_u(e.filter(p=>p.box.fullSize),!0),i=_u(xu(e,"left"),!0),a=_u(xu(e,"right")),s=_u(xu(e,"top"),!0),l=_u(xu(e,"bottom")),d=HS(e,"x"),f=HS(e,"y");return{fullSize:n,leftAndTop:i.concat(s),rightAndBottom:a.concat(f).concat(l).concat(d),chartArea:xu(e,"chartArea"),vertical:i.concat(a).concat(f),horizontal:s.concat(l).concat(d)}}function US(t,e,n,i){return Math.max(t[n],e[n])+Math.max(t[i],e[i])}function hA(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function n6(t,e,n,i){const{pos:a,box:s}=n,l=t.maxPadding;if(!pe(a)){n.size&&(t[a]-=n.size);const v=i[n.stack]||{size:0,count:1};v.size=Math.max(v.size,n.horizontal?s.height:s.width),n.size=v.size/v.count,t[a]+=n.size}s.getPadding&&hA(l,s.getPadding());const d=Math.max(0,e.outerWidth-US(l,t,"left","right")),f=Math.max(0,e.outerHeight-US(l,t,"top","bottom")),p=d!==t.w,g=f!==t.h;return t.w=d,t.h=f,n.horizontal?{same:p,other:g}:{same:g,other:p}}function i6(t){const e=t.maxPadding;function n(i){const a=Math.max(e[i]-t[i],0);return t[i]+=a,a}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}function a6(t,e){const n=e.maxPadding;function i(a){const s={left:0,top:0,right:0,bottom:0};return a.forEach(l=>{s[l]=Math.max(e[l],n[l])}),s}return i(t?["left","right"]:["top","bottom"])}function zu(t,e,n,i){const a=[];let s,l,d,f,p,g;for(s=0,l=t.length,p=0;s<l;++s){d=t[s],f=d.box,f.update(d.width||e.w,d.height||e.h,a6(d.horizontal,e));const{same:v,other:y}=n6(e,n,d,i);p|=v&&a.length,g=g||y,f.fullSize||a.push(d)}return p&&zu(a,e,n,i)||g}function mh(t,e,n,i,a){t.top=n,t.left=e,t.right=e+i,t.bottom=n+a,t.width=i,t.height=a}function VS(t,e,n,i){const a=n.padding;let{x:s,y:l}=e;for(const d of t){const f=d.box,p=i[d.stack]||{placed:0,weight:1},g=d.stackWeight/p.weight||1;if(d.horizontal){const v=e.w*g,y=p.size||f.height;sd(p.start)&&(l=p.start),f.fullSize?mh(f,a.left,l,n.outerWidth-a.right-a.left,y):mh(f,e.left+p.placed,l,v,y),p.start=l,p.placed+=v,l=f.bottom}else{const v=e.h*g,y=p.size||f.width;sd(p.start)&&(s=p.start),f.fullSize?mh(f,s,a.top,y,n.outerHeight-a.bottom-a.top):mh(f,s,e.top+p.placed,y,v),p.start=s,p.placed+=v,s=f.right}}e.x=s,e.y=l}var Jn={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(n){e.draw(n)}}]},t.boxes.push(e)},removeBox(t,e){const n=t.boxes?t.boxes.indexOf(e):-1;n!==-1&&t.boxes.splice(n,1)},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},update(t,e,n,i){if(!t)return;const a=ti(t.options.layout.padding),s=Math.max(e-a.width,0),l=Math.max(n-a.height,0),d=e6(t.boxes),f=d.vertical,p=d.horizontal;Pe(t.boxes,C=>{typeof C.beforeLayout=="function"&&C.beforeLayout()});const g=f.reduce((C,A)=>A.box.options&&A.box.options.display===!1?C:C+1,0)||1,v=Object.freeze({outerWidth:e,outerHeight:n,padding:a,availableWidth:s,availableHeight:l,vBoxMaxWidth:s/2/g,hBoxMaxHeight:l/2}),y=Object.assign({},a);hA(y,ti(i));const _=Object.assign({maxPadding:y,w:s,h:l,x:a.left,y:a.top},a),w=t6(f.concat(p),v);zu(d.fullSize,_,v,w),zu(f,_,v,w),zu(p,_,v,w)&&zu(f,_,v,w),i6(_),VS(d.leftAndTop,_,v,w),_.x+=_.w,_.y+=_.h,VS(d.rightAndBottom,_,v,w),t.chartArea={left:_.left,top:_.top,right:_.left+_.w,bottom:_.top+_.h,height:_.h,width:_.w},Pe(d.chartArea,C=>{const A=C.box;Object.assign(A,t.chartArea),A.update(_.w,_.h,{left:0,top:0,right:0,bottom:0})})}};class pA{acquireContext(e,n){}releaseContext(e){return!1}addEventListener(e,n,i){}removeEventListener(e,n,i){}getDevicePixelRatio(){return 1}getMaximumSize(e,n,i,a){return n=Math.max(0,n||e.width),i=i||e.height,{width:n,height:Math.max(0,a?Math.floor(n/a):i)}}isAttached(e){return!0}updateConfig(e){}}class r6 extends pA{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const Ih="$chartjs",s6={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},$S=t=>t===null||t==="";function o6(t,e){const n=t.style,i=t.getAttribute("height"),a=t.getAttribute("width");if(t[Ih]={initial:{height:i,width:a,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",$S(a)){const s=TS(t,"width");s!==void 0&&(t.width=s)}if($S(i))if(t.style.height==="")t.height=t.width/(e||2);else{const s=TS(t,"height");s!==void 0&&(t.height=s)}return t}const mA=lN?{passive:!0}:!1;function l6(t,e,n){t&&t.addEventListener(e,n,mA)}function c6(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,mA)}function u6(t,e){const n=s6[t.type]||t.type,{x:i,y:a}=Ao(t,e);return{type:n,chart:e,native:t,x:i!==void 0?i:null,y:a!==void 0?a:null}}function hp(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function d6(t,e,n){const i=t.canvas,a=new MutationObserver(s=>{let l=!1;for(const d of s)l=l||hp(d.addedNodes,i),l=l&&!hp(d.removedNodes,i);l&&n()});return a.observe(document,{childList:!0,subtree:!0}),a}function f6(t,e,n){const i=t.canvas,a=new MutationObserver(s=>{let l=!1;for(const d of s)l=l||hp(d.removedNodes,i),l=l&&!hp(d.addedNodes,i);l&&n()});return a.observe(document,{childList:!0,subtree:!0}),a}const cd=new Map;let GS=0;function gA(){const t=window.devicePixelRatio;t!==GS&&(GS=t,cd.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function h6(t,e){cd.size||window.addEventListener("resize",gA),cd.set(t,e)}function p6(t){cd.delete(t),cd.size||window.removeEventListener("resize",gA)}function m6(t,e,n){const i=t.canvas,a=i&&Hy(i);if(!a)return;const s=GE((d,f)=>{const p=a.clientWidth;n(d,f),p<a.clientWidth&&n()},window),l=new ResizeObserver(d=>{const f=d[0],p=f.contentRect.width,g=f.contentRect.height;p===0&&g===0||s(p,g)});return l.observe(a),h6(t,s),l}function Uv(t,e,n){n&&n.disconnect(),e==="resize"&&p6(t)}function g6(t,e,n){const i=t.canvas,a=GE(s=>{t.ctx!==null&&n(u6(s,t))},t);return l6(i,e,a),a}class v6 extends pA{acquireContext(e,n){const i=e&&e.getContext&&e.getContext("2d");return i&&i.canvas===e?(o6(e,n),i):null}releaseContext(e){const n=e.canvas;if(!n[Ih])return!1;const i=n[Ih].initial;["height","width"].forEach(s=>{const l=i[s];ue(l)?n.removeAttribute(s):n.setAttribute(s,l)});const a=i.style||{};return Object.keys(a).forEach(s=>{n.style[s]=a[s]}),n.width=n.width,delete n[Ih],!0}addEventListener(e,n,i){this.removeEventListener(e,n);const a=e.$proxies||(e.$proxies={}),l={attach:d6,detach:f6,resize:m6}[n]||g6;a[n]=l(e,n,i)}removeEventListener(e,n){const i=e.$proxies||(e.$proxies={}),a=i[n];if(!a)return;({attach:Uv,detach:Uv,resize:Uv}[n]||c6)(e,n,a),i[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,i,a){return oN(e,n,i,a)}isAttached(e){const n=e&&Hy(e);return!!(n&&n.isConnected)}}function b6(t){return!Fy()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?r6:v6}var kh;let Lr=(kh=class{constructor(){Lt(this,"x");Lt(this,"y");Lt(this,"active",!1);Lt(this,"options");Lt(this,"$animations")}tooltipPosition(e){const{x:n,y:i}=this.getProps(["x","y"],e);return{x:n,y:i}}hasValue(){return Yl(this.x)&&Yl(this.y)}getProps(e,n){const i=this.$animations;if(!n||!i)return this;const a={};return e.forEach(s=>{a[s]=i[s]&&i[s].active()?i[s]._to:this[s]}),a}},Lt(kh,"defaults",{}),Lt(kh,"defaultRoutes"),kh);function y6(t,e){const n=t.options.ticks,i=x6(t),a=Math.min(n.maxTicksLimit||i,i),s=n.major.enabled?S6(e):[],l=s.length,d=s[0],f=s[l-1],p=[];if(l>a)return w6(e,p,s,l/a),p;const g=_6(s,e,a);if(l>0){let v,y;const _=l>1?Math.round((f-d)/(l-1)):null;for(gh(e,p,g,ue(_)?0:d-_,d),v=0,y=l-1;v<y;v++)gh(e,p,g,s[v],s[v+1]);return gh(e,p,g,f,ue(_)?e.length:f+_),p}return gh(e,p,g),p}function x6(t){const e=t.options.offset,n=t._tickSize(),i=t._length/n+(e?0:1),a=t._maxLength/n;return Math.floor(Math.min(i,a))}function _6(t,e,n){const i=C6(t),a=e.length/n;if(!i)return Math.max(a,1);const s=uP(i);for(let l=0,d=s.length-1;l<d;l++){const f=s[l];if(f>a)return f}return Math.max(a,1)}function S6(t){const e=[];let n,i;for(n=0,i=t.length;n<i;n++)t[n].major&&e.push(n);return e}function w6(t,e,n,i){let a=0,s=n[0],l;for(i=Math.ceil(i),l=0;l<t.length;l++)l===s&&(e.push(t[l]),a++,s=n[a*i])}function gh(t,e,n,i,a){const s=Jt(i,0),l=Math.min(Jt(a,t.length),t.length);let d=0,f,p,g;for(n=Math.ceil(n),a&&(f=a-i,n=f/Math.floor(f/n)),g=s;g<0;)d++,g=Math.round(s+d*n);for(p=Math.max(s,0);p<l;p++)p===g&&(e.push(t[p]),d++,g=Math.round(s+d*n))}function C6(t){const e=t.length;let n,i;if(e<2)return!1;for(i=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==i)return!1;return i}const E6=t=>t==="left"?"right":t==="right"?"left":t,WS=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,ZS=(t,e)=>Math.min(e||t,t);function qS(t,e){const n=[],i=t.length/e,a=t.length;let s=0;for(;s<a;s+=i)n.push(t[Math.floor(s)]);return n}function A6(t,e,n){const i=t.ticks.length,a=Math.min(e,i-1),s=t._startPixel,l=t._endPixel,d=1e-6;let f=t.getPixelForTick(a),p;if(!(n&&(i===1?p=Math.max(f-s,l-f):e===0?p=(t.getPixelForTick(1)-f)/2:p=(f-t.getPixelForTick(a-1))/2,f+=a<e?p:-p,f<s-d||f>l+d)))return f}function T6(t,e){Pe(t,n=>{const i=n.gc,a=i.length/2;let s;if(a>e){for(s=0;s<a;++s)delete n.data[i[s]];i.splice(0,a)}})}function Su(t){return t.drawTicks?t.tickLength:0}function YS(t,e){if(!t.display)return 0;const n=On(t.font,e),i=ti(t.padding);return(Qe(t.text)?t.text.length:1)*n.lineHeight+i.height}function D6(t,e){return zs(t,{scale:e,type:"scale"})}function M6(t,e,n){return zs(t,{tick:n,index:e,type:"tick"})}function O6(t,e,n){let i=Ry(t);return(n&&e!=="right"||!n&&e==="right")&&(i=E6(i)),i}function k6(t,e,n,i){const{top:a,left:s,bottom:l,right:d,chart:f}=t,{chartArea:p,scales:g}=f;let v=0,y,_,w;const C=l-a,A=d-s;if(t.isHorizontal()){if(_=Kn(i,s,d),pe(n)){const k=Object.keys(n)[0],z=n[k];w=g[k].getPixelForValue(z)+C-e}else n==="center"?w=(p.bottom+p.top)/2+C-e:w=WS(t,n,e);y=d-s}else{if(pe(n)){const k=Object.keys(n)[0],z=n[k];_=g[k].getPixelForValue(z)-A+e}else n==="center"?_=(p.left+p.right)/2-A+e:_=WS(t,n,e);w=Kn(i,l,a),v=n==="left"?-hn:hn}return{titleX:_,titleY:w,maxWidth:y,rotation:v}}class Fo extends Lr{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.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(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,n){return e}getUserBounds(){let{_userMin:e,_userMax:n,_suggestedMin:i,_suggestedMax:a}=this;return e=zi(e,Number.POSITIVE_INFINITY),n=zi(n,Number.NEGATIVE_INFINITY),i=zi(i,Number.POSITIVE_INFINITY),a=zi(a,Number.NEGATIVE_INFINITY),{min:zi(e,i),max:zi(n,a),minDefined:un(e),maxDefined:un(n)}}getMinMax(e){let{min:n,max:i,minDefined:a,maxDefined:s}=this.getUserBounds(),l;if(a&&s)return{min:n,max:i};const d=this.getMatchingVisibleMetas();for(let f=0,p=d.length;f<p;++f)l=d[f].controller.getMinMax(this,e),a||(n=Math.min(n,l.min)),s||(i=Math.max(i,l.max));return n=s&&n>i?i:n,i=a&&n>i?n:i,{min:zi(n,zi(i,n)),max:zi(i,zi(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 e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){$e(this.options.beforeUpdate,[this])}update(e,n,i){const{beginAtZero:a,grace:s,ticks:l}=this.options,d=l.sampleSize;this.beforeUpdate(),this.maxWidth=e,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=IP(this,s,a),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const f=d<this.ticks.length;this._convertTicksToLabels(f?qS(this.ticks,d):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),l.display&&(l.autoSkip||l.source==="auto")&&(this.ticks=y6(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),f&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,n,i;this.isHorizontal()?(n=this.left,i=this.right):(n=this.top,i=this.bottom,e=!e),this._startPixel=n,this._endPixel=i,this._reversePixels=e,this._length=i-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){$e(this.options.afterUpdate,[this])}beforeSetDimensions(){$e(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(){$e(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),$e(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){$e(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const n=this.options.ticks;let i,a,s;for(i=0,a=e.length;i<a;i++)s=e[i],s.label=$e(n.callback,[s.value,i,e],this)}afterTickToLabelConversion(){$e(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){$e(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,n=e.ticks,i=ZS(this.ticks.length,e.ticks.maxTicksLimit),a=n.minRotation||0,s=n.maxRotation;let l=a,d,f,p;if(!this._isVisible()||!n.display||a>=s||i<=1||!this.isHorizontal()){this.labelRotation=a;return}const g=this._getLabelSizes(),v=g.widest.width,y=g.highest.height,_=Nn(this.chart.width-v,0,this.maxWidth);d=e.offset?this.maxWidth/i:_/(i-1),v+6>d&&(d=_/(i-(e.offset?.5:1)),f=this.maxHeight-Su(e.grid)-n.padding-YS(e.title,this.chart.options.font),p=Math.sqrt(v*v+y*y),l=Ly(Math.min(Math.asin(Nn((g.highest.height+6)/d,-1,1)),Math.asin(Nn(f/p,-1,1))-Math.asin(Nn(y/p,-1,1)))),l=Math.max(a,Math.min(s,l))),this.labelRotation=l}afterCalculateLabelRotation(){$e(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){$e(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:n,options:{ticks:i,title:a,grid:s}}=this,l=this._isVisible(),d=this.isHorizontal();if(l){const f=YS(a,n.options.font);if(d?(e.width=this.maxWidth,e.height=Su(s)+f):(e.height=this.maxHeight,e.width=Su(s)+f),i.display&&this.ticks.length){const{first:p,last:g,widest:v,highest:y}=this._getLabelSizes(),_=i.padding*2,w=va(this.labelRotation),C=Math.cos(w),A=Math.sin(w);if(d){const k=i.mirror?0:A*v.width+C*y.height;e.height=Math.min(this.maxHeight,e.height+k+_)}else{const k=i.mirror?0:C*v.width+A*y.height;e.width=Math.min(this.maxWidth,e.width+k+_)}this._calculatePadding(p,g,A,C)}}this._handleMargins(),d?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,n,i,a){const{ticks:{align:s,padding:l},position:d}=this.options,f=this.labelRotation!==0,p=d!=="top"&&this.axis==="x";if(this.isHorizontal()){const g=this.getPixelForTick(0)-this.left,v=this.right-this.getPixelForTick(this.ticks.length-1);let y=0,_=0;f?p?(y=a*e.width,_=i*n.height):(y=i*e.height,_=a*n.width):s==="start"?_=n.width:s==="end"?y=e.width:s!=="inner"&&(y=e.width/2,_=n.width/2),this.paddingLeft=Math.max((y-g+l)*this.width/(this.width-g),0),this.paddingRight=Math.max((_-v+l)*this.width/(this.width-v),0)}else{let g=n.height/2,v=e.height/2;s==="start"?(g=0,v=e.height):s==="end"&&(g=n.height,v=0),this.paddingTop=g+l,this.paddingBottom=v+l}}_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(){$e(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:n}=this.options;return n==="top"||n==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let n,i;for(n=0,i=e.length;n<i;n++)ue(e[n].label)&&(e.splice(n,1),i--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const n=this.options.ticks.sampleSize;let i=this.ticks;n<i.length&&(i=qS(i,n)),this._labelSizes=e=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,n,i){const{ctx:a,_longestTextCache:s}=this,l=[],d=[],f=Math.floor(n/ZS(n,i));let p=0,g=0,v,y,_,w,C,A,k,z,j,P,H;for(v=0;v<n;v+=f){if(w=e[v].label,C=this._resolveTickFontOptions(v),a.font=A=C.string,k=s[A]=s[A]||{data:{},gc:[]},z=C.lineHeight,j=P=0,!ue(w)&&!Qe(w))j=dp(a,k.data,k.gc,j,w),P=z;else if(Qe(w))for(y=0,_=w.length;y<_;++y)H=w[y],!ue(H)&&!Qe(H)&&(j=dp(a,k.data,k.gc,j,H),P+=z);l.push(j),d.push(P),p=Math.max(j,p),g=Math.max(P,g)}T6(s,n);const V=l.indexOf(p),U=d.indexOf(g),Z=Q=>({width:l[Q]||0,height:d[Q]||0});return{first:Z(0),last:Z(n-1),widest:Z(V),highest:Z(U),widths:l,heights:d}}getLabelForValue(e){return e}getPixelForValue(e,n){return NaN}getValueForPixel(e){}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const n=this._startPixel+e*this._length;return pP(this._alignToPixels?_o(this.chart,n,0):n)}getDecimalForPixel(e){const n=(e-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:n}=this;return e<0&&n<0?n:e>0&&n>0?e:0}getContext(e){const n=this.ticks||[];if(e>=0&&e<n.length){const i=n[e];return i.$context||(i.$context=M6(this.getContext(),e,i))}return this.$context||(this.$context=D6(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,n=va(this.labelRotation),i=Math.abs(Math.cos(n)),a=Math.abs(Math.sin(n)),s=this._getLabelSizes(),l=e.autoSkipPadding||0,d=s?s.widest.width+l:0,f=s?s.highest.height+l:0;return this.isHorizontal()?f*i>d*a?d/i:f/a:f*a<d*i?f/i:d/a}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const n=this.axis,i=this.chart,a=this.options,{grid:s,position:l,border:d}=a,f=s.offset,p=this.isHorizontal(),v=this.ticks.length+(f?1:0),y=Su(s),_=[],w=d.setContext(this.getContext()),C=w.display?w.width:0,A=C/2,k=function(I){return _o(i,I,C)};let z,j,P,H,V,U,Z,Q,et,X,R,dt;if(l==="top")z=k(this.bottom),U=this.bottom-y,Q=z-A,X=k(e.top)+A,dt=e.bottom;else if(l==="bottom")z=k(this.top),X=e.top,dt=k(e.bottom)-A,U=z+A,Q=this.top+y;else if(l==="left")z=k(this.right),V=this.right-y,Z=z-A,et=k(e.left)+A,R=e.right;else if(l==="right")z=k(this.left),et=e.left,R=k(e.right)-A,V=z+A,Z=this.left+y;else if(n==="x"){if(l==="center")z=k((e.top+e.bottom)/2+.5);else if(pe(l)){const I=Object.keys(l)[0],$=l[I];z=k(this.chart.scales[I].getPixelForValue($))}X=e.top,dt=e.bottom,U=z+A,Q=U+y}else if(n==="y"){if(l==="center")z=k((e.left+e.right)/2);else if(pe(l)){const I=Object.keys(l)[0],$=l[I];z=k(this.chart.scales[I].getPixelForValue($))}V=z-A,Z=V-y,et=e.left,R=e.right}const it=Jt(a.ticks.maxTicksLimit,v),ut=Math.max(1,Math.ceil(v/it));for(j=0;j<v;j+=ut){const I=this.getContext(j),$=s.setContext(I),q=d.setContext(I),nt=$.lineWidth,ot=$.color,F=q.dash||[],K=q.dashOffset,at=$.tickWidth,mt=$.tickColor,pt=$.tickBorderDash||[],yt=$.tickBorderDashOffset;P=A6(this,j,f),P!==void 0&&(H=_o(i,P,nt),p?V=Z=et=R=H:U=Q=X=dt=H,_.push({tx1:V,ty1:U,tx2:Z,ty2:Q,x1:et,y1:X,x2:R,y2:dt,width:nt,color:ot,borderDash:F,borderDashOffset:K,tickWidth:at,tickColor:mt,tickBorderDash:pt,tickBorderDashOffset:yt}))}return this._ticksLength=v,this._borderValue=z,_}_computeLabelItems(e){const n=this.axis,i=this.options,{position:a,ticks:s}=i,l=this.isHorizontal(),d=this.ticks,{align:f,crossAlign:p,padding:g,mirror:v}=s,y=Su(i.grid),_=y+g,w=v?-g:_,C=-va(this.labelRotation),A=[];let k,z,j,P,H,V,U,Z,Q,et,X,R,dt="middle";if(a==="top")V=this.bottom-w,U=this._getXAxisLabelAlignment();else if(a==="bottom")V=this.top+w,U=this._getXAxisLabelAlignment();else if(a==="left"){const ut=this._getYAxisLabelAlignment(y);U=ut.textAlign,H=ut.x}else if(a==="right"){const ut=this._getYAxisLabelAlignment(y);U=ut.textAlign,H=ut.x}else if(n==="x"){if(a==="center")V=(e.top+e.bottom)/2+_;else if(pe(a)){const ut=Object.keys(a)[0],I=a[ut];V=this.chart.scales[ut].getPixelForValue(I)+_}U=this._getXAxisLabelAlignment()}else if(n==="y"){if(a==="center")H=(e.left+e.right)/2-_;else if(pe(a)){const ut=Object.keys(a)[0],I=a[ut];H=this.chart.scales[ut].getPixelForValue(I)}U=this._getYAxisLabelAlignment(y).textAlign}n==="y"&&(f==="start"?dt="top":f==="end"&&(dt="bottom"));const it=this._getLabelSizes();for(k=0,z=d.length;k<z;++k){j=d[k],P=j.label;const ut=s.setContext(this.getContext(k));Z=this.getPixelForTick(k)+s.labelOffset,Q=this._resolveTickFontOptions(k),et=Q.lineHeight,X=Qe(P)?P.length:1;const I=X/2,$=ut.color,q=ut.textStrokeColor,nt=ut.textStrokeWidth;let ot=U;l?(H=Z,U==="inner"&&(k===z-1?ot=this.options.reverse?"left":"right":k===0?ot=this.options.reverse?"right":"left":ot="center"),a==="top"?p==="near"||C!==0?R=-X*et+et/2:p==="center"?R=-it.highest.height/2-I*et+et:R=-it.highest.height+et/2:p==="near"||C!==0?R=et/2:p==="center"?R=it.highest.height/2-I*et:R=it.highest.height-X*et,v&&(R*=-1),C!==0&&!ut.showLabelBackdrop&&(H+=et/2*Math.sin(C))):(V=Z,R=(1-X)*et/2);let F;if(ut.showLabelBackdrop){const K=ti(ut.backdropPadding),at=it.heights[k],mt=it.widths[k];let pt=R-K.top,yt=0-K.left;switch(dt){case"middle":pt-=at/2;break;case"bottom":pt-=at;break}switch(U){case"center":yt-=mt/2;break;case"right":yt-=mt;break;case"inner":k===z-1?yt-=mt:k>0&&(yt-=mt/2);break}F={left:yt,top:pt,width:mt+K.width,height:at+K.height,color:ut.backdropColor}}A.push({label:P,font:Q,textOffset:R,options:{rotation:C,color:$,strokeColor:q,strokeWidth:nt,textAlign:ot,textBaseline:dt,translation:[H,V],backdrop:F}})}return A}_getXAxisLabelAlignment(){const{position:e,ticks:n}=this.options;if(-va(this.labelRotation))return e==="top"?"left":"right";let a="center";return n.align==="start"?a="left":n.align==="end"?a="right":n.align==="inner"&&(a="inner"),a}_getYAxisLabelAlignment(e){const{position:n,ticks:{crossAlign:i,mirror:a,padding:s}}=this.options,l=this._getLabelSizes(),d=e+s,f=l.widest.width;let p,g;return n==="left"?a?(g=this.right+s,i==="near"?p="left":i==="center"?(p="center",g+=f/2):(p="right",g+=f)):(g=this.right-d,i==="near"?p="right":i==="center"?(p="center",g-=f/2):(p="left",g=this.left)):n==="right"?a?(g=this.left+s,i==="near"?p="right":i==="center"?(p="center",g-=f/2):(p="left",g-=f)):(g=this.left+d,i==="near"?p="left":i==="center"?(p="center",g+=f/2):(p="right",g=this.right)):p="right",{textAlign:p,x:g}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:n},left:i,top:a,width:s,height:l}=this;n&&(e.save(),e.fillStyle=n,e.fillRect(i,a,s,l),e.restore())}getLineWidthForValue(e){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const a=this.ticks.findIndex(s=>s.value===e);return a>=0?n.setContext(this.getContext(a)).lineWidth:0}drawGrid(e){const n=this.options.grid,i=this.ctx,a=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let s,l;const d=(f,p,g)=>{!g.width||!g.color||(i.save(),i.lineWidth=g.width,i.strokeStyle=g.color,i.setLineDash(g.borderDash||[]),i.lineDashOffset=g.borderDashOffset,i.beginPath(),i.moveTo(f.x,f.y),i.lineTo(p.x,p.y),i.stroke(),i.restore())};if(n.display)for(s=0,l=a.length;s<l;++s){const f=a[s];n.drawOnChartArea&&d({x:f.x1,y:f.y1},{x:f.x2,y:f.y2},f),n.drawTicks&&d({x:f.tx1,y:f.ty1},{x:f.tx2,y:f.ty2},{color:f.tickColor,width:f.tickWidth,borderDash:f.tickBorderDash,borderDashOffset:f.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:n,options:{border:i,grid:a}}=this,s=i.setContext(this.getContext()),l=i.display?s.width:0;if(!l)return;const d=a.setContext(this.getContext(0)).lineWidth,f=this._borderValue;let p,g,v,y;this.isHorizontal()?(p=_o(e,this.left,l)-l/2,g=_o(e,this.right,d)+d/2,v=y=f):(v=_o(e,this.top,l)-l/2,y=_o(e,this.bottom,d)+d/2,p=g=f),n.save(),n.lineWidth=s.width,n.strokeStyle=s.color,n.beginPath(),n.moveTo(p,v),n.lineTo(g,y),n.stroke(),n.restore()}drawLabels(e){if(!this.options.ticks.display)return;const i=this.ctx,a=this._computeLabelArea();a&&$p(i,a);const s=this.getLabelItems(e);for(const l of s){const d=l.options,f=l.font,p=l.label,g=l.textOffset;Bo(i,p,0,g,f,d)}a&&Gp(i)}drawTitle(){const{ctx:e,options:{position:n,title:i,reverse:a}}=this;if(!i.display)return;const s=On(i.font),l=ti(i.padding),d=i.align;let f=s.lineHeight/2;n==="bottom"||n==="center"||pe(n)?(f+=l.bottom,Qe(i.text)&&(f+=s.lineHeight*(i.text.length-1))):f+=l.top;const{titleX:p,titleY:g,maxWidth:v,rotation:y}=k6(this,f,n,d);Bo(e,i.text,0,0,s,{color:i.color,maxWidth:v,rotation:y,textAlign:O6(d,n,a),textBaseline:"middle",translation:[p,g]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,n=e.ticks&&e.ticks.z||0,i=Jt(e.grid&&e.grid.z,-1),a=Jt(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==Fo.prototype.draw?[{z:n,draw:s=>{this.draw(s)}}]:[{z:i,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:a,draw:()=>{this.drawBorder()}},{z:n,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(e){const n=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",a=[];let s,l;for(s=0,l=n.length;s<l;++s){const d=n[s];d[i]===this.id&&(!e||d.type===e)&&a.push(d)}return a}_resolveTickFontOptions(e){const n=this.options.ticks.setContext(this.getContext(e));return On(n.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class vh{constructor(e,n,i){this.type=e,this.scope=n,this.override=i,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const n=Object.getPrototypeOf(e);let i;R6(n)&&(i=this.register(n));const a=this.items,s=e.id,l=this.scope+"."+s;if(!s)throw new Error("class does not have id: "+e);return s in a||(a[s]=e,L6(e,l,i),this.override&&Je.override(e.id,e.overrides)),l}get(e){return this.items[e]}unregister(e){const n=this.items,i=e.id,a=this.scope;i in n&&delete n[i],a&&i in Je[a]&&(delete Je[a][i],this.override&&delete jo[i])}}function L6(t,e,n){const i=rd(Object.create(null),[n?Je.get(n):{},Je.get(e),t.defaults]);Je.set(e,i),t.defaultRoutes&&z6(e,t.defaultRoutes),t.descriptors&&Je.describe(e,t.descriptors)}function z6(t,e){Object.keys(e).forEach(n=>{const i=n.split("."),a=i.pop(),s=[t].concat(i).join("."),l=e[n].split("."),d=l.pop(),f=l.join(".");Je.route(s,a,f,d)})}function R6(t){return"id"in t&&"defaults"in t}class P6{constructor(){this.controllers=new vh(ya,"datasets",!0),this.elements=new vh(Lr,"elements"),this.plugins=new vh(Object,"plugins"),this.scales=new vh(Fo,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,n,i){[...n].forEach(a=>{const s=i||this._getRegistryForType(a);i||s.isForType(a)||s===this.plugins&&a.id?this._exec(e,s,a):Pe(a,l=>{const d=i||this._getRegistryForType(l);this._exec(e,d,l)})})}_exec(e,n,i){const a=ky(e);$e(i["before"+a],[],i),n[e](i),$e(i["after"+a],[],i)}_getRegistryForType(e){for(let n=0;n<this._typedRegistries.length;n++){const i=this._typedRegistries[n];if(i.isForType(e))return i}return this.plugins}_get(e,n,i){const a=n.get(e);if(a===void 0)throw new Error('"'+e+'" is not a registered '+i+".");return a}}var Ha=new P6;class N6{constructor(){this._init=void 0}notify(e,n,i,a){if(n==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install")),this._init===void 0)return;const s=a?this._descriptors(e).filter(a):this._descriptors(e),l=this._notify(s,e,n,i);return n==="afterDestroy"&&(this._notify(s,e,"stop"),this._notify(this._init,e,"uninstall"),this._init=void 0),l}_notify(e,n,i,a){a=a||{};for(const s of e){const l=s.plugin,d=l[i],f=[n,a,s.options];if($e(d,f,l)===!1&&a.cancelable)return!1}return!0}invalidate(){ue(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),n}_createDescriptors(e,n){const i=e&&e.config,a=Jt(i.options&&i.options.plugins,{}),s=j6(i);return a===!1&&!n?[]:I6(e,s,a,n)}_notifyStateChanges(e){const n=this._oldCache||[],i=this._cache,a=(s,l)=>s.filter(d=>!l.some(f=>d.plugin.id===f.plugin.id));this._notify(a(n,i),e,"stop"),this._notify(a(i,n),e,"start")}}function j6(t){const e={},n=[],i=Object.keys(Ha.plugins.items);for(let s=0;s<i.length;s++)n.push(Ha.getPlugin(i[s]));const a=t.plugins||[];for(let s=0;s<a.length;s++){const l=a[s];n.indexOf(l)===-1&&(n.push(l),e[l.id]=!0)}return{plugins:n,localIds:e}}function B6(t,e){return!e&&t===!1?null:t===!0?{}:t}function I6(t,{plugins:e,localIds:n},i,a){const s=[],l=t.getContext();for(const d of e){const f=d.id,p=B6(i[f],a);p!==null&&s.push({plugin:d,options:F6(t.config,{plugin:d,local:n[f]},p,l)})}return s}function F6(t,{plugin:e,local:n},i,a){const s=t.pluginScopeKeys(e),l=t.getOptionScopes(i,s);return n&&e.defaults&&l.push(e.defaults),t.createResolver(l,a,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Cb(t,e){const n=Je.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function H6(t,e){let n=t;return t==="_index_"?n=e:t==="_value_"&&(n=e==="x"?"y":"x"),n}function U6(t,e){return t===e?"_index_":"_value_"}function XS(t){if(t==="x"||t==="y"||t==="r")return t}function V6(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function Eb(t,...e){if(XS(t))return t;for(const n of e){const i=n.axis||V6(n.position)||t.length>1&&XS(t[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function KS(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function $6(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter(i=>i.xAxisID===t||i.yAxisID===t);if(n.length)return KS(t,"x",n[0])||KS(t,"y",n[0])}return{}}function G6(t,e){const n=jo[t.type]||{scales:{}},i=e.scales||{},a=Cb(t.type,e),s=Object.create(null);return Object.keys(i).forEach(l=>{const d=i[l];if(!pe(d))return console.error(`Invalid scale configuration for scale: ${l}`);if(d._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${l}`);const f=Eb(l,d,$6(l,t),Je.scales[d.type]),p=U6(f,a),g=n.scales||{};s[l]=Uu(Object.create(null),[{axis:f},d,g[f],g[p]])}),t.data.datasets.forEach(l=>{const d=l.type||t.type,f=l.indexAxis||Cb(d,e),g=(jo[d]||{}).scales||{};Object.keys(g).forEach(v=>{const y=H6(v,f),_=l[y+"AxisID"]||y;s[_]=s[_]||Object.create(null),Uu(s[_],[{axis:y},i[_],g[v]])})}),Object.keys(s).forEach(l=>{const d=s[l];Uu(d,[Je.scales[d.type],Je.scale])}),s}function vA(t){const e=t.options||(t.options={});e.plugins=Jt(e.plugins,{}),e.scales=G6(t,e)}function bA(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function W6(t){return t=t||{},t.data=bA(t.data),vA(t),t}const QS=new Map,yA=new Set;function bh(t,e){let n=QS.get(t);return n||(n=e(),QS.set(t,n),yA.add(n)),n}const wu=(t,e,n)=>{const i=Ms(e,n);i!==void 0&&t.add(i)};class Z6{constructor(e){this._config=W6(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=bA(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),vA(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return bh(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,n){return bh(`${e}.transition.${n}`,()=>[[`datasets.${e}.transitions.${n}`,`transitions.${n}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,n){return bh(`${e}-${n}`,()=>[[`datasets.${e}.elements.${n}`,`datasets.${e}`,`elements.${n}`,""]])}pluginScopeKeys(e){const n=e.id,i=this.type;return bh(`${i}-plugin-${n}`,()=>[[`plugins.${n}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,n){const i=this._scopeCache;let a=i.get(e);return(!a||n)&&(a=new Map,i.set(e,a)),a}getOptionScopes(e,n,i){const{options:a,type:s}=this,l=this._cachedScopes(e,i),d=l.get(n);if(d)return d;const f=new Set;n.forEach(g=>{e&&(f.add(e),g.forEach(v=>wu(f,e,v))),g.forEach(v=>wu(f,a,v)),g.forEach(v=>wu(f,jo[s]||{},v)),g.forEach(v=>wu(f,Je,v)),g.forEach(v=>wu(f,_b,v))});const p=Array.from(f);return p.length===0&&p.push(Object.create(null)),yA.has(n)&&l.set(n,p),p}chartOptionScopes(){const{options:e,type:n}=this;return[e,jo[n]||{},Je.datasets[n]||{},{type:n},Je,_b]}resolveNamedOptions(e,n,i,a=[""]){const s={$shared:!0},{resolver:l,subPrefixes:d}=JS(this._resolverCache,e,a);let f=l;if(Y6(l,n)){s.$shared=!1,i=Os(i)?i():i;const p=this.createResolver(e,i,d);f=Xl(l,i,p)}for(const p of n)s[p]=f[p];return s}createResolver(e,n,i=[""],a){const{resolver:s}=JS(this._resolverCache,e,i);return pe(n)?Xl(s,n,void 0,a):s}}function JS(t,e,n){let i=t.get(e);i||(i=new Map,t.set(e,i));const a=n.join();let s=i.get(a);return s||(s={resolver:jy(e,n),subPrefixes:n.filter(d=>!d.toLowerCase().includes("hover"))},i.set(a,s)),s}const q6=t=>pe(t)&&Object.getOwnPropertyNames(t).some(e=>Os(t[e]));function Y6(t,e){const{isScriptable:n,isIndexable:i}=KE(t);for(const a of e){const s=n(a),l=i(a),d=(l||s)&&t[a];if(s&&(Os(d)||q6(d))||l&&Qe(d))return!0}return!1}var X6="4.5.1";const K6=["top","bottom","left","right","chartArea"];function t2(t,e){return t==="top"||t==="bottom"||K6.indexOf(t)===-1&&e==="x"}function e2(t,e){return function(n,i){return n[t]===i[t]?n[e]-i[e]:n[t]-i[t]}}function n2(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),$e(n&&n.onComplete,[t],e)}function Q6(t){const e=t.chart,n=e.options.animation;$e(n&&n.onProgress,[t],e)}function xA(t){return Fy()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Fh={},i2=t=>{const e=xA(t);return Object.values(Fh).filter(n=>n.canvas===e).pop()};function J6(t,e,n){const i=Object.keys(t);for(const a of i){const s=+a;if(s>=e){const l=t[a];delete t[a],(n>0||s>e)&&(t[s+n]=l)}}}function t4(t,e,n,i){return!n||t.type==="mouseout"?null:i?e:t}var vs;let qp=(vs=class{static register(...e){Ha.add(...e),a2()}static unregister(...e){Ha.remove(...e),a2()}constructor(e,n){const i=this.config=new Z6(n),a=xA(e),s=i2(a);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 l=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||b6(a)),this.platform.updateConfig(i);const d=this.platform.acquireContext(a,l.aspectRatio),f=d&&d.canvas,p=f&&f.height,g=f&&f.width;if(this.id=eP(),this.ctx=d,this.canvas=f,this.width=g,this.height=p,this._options=l,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 N6,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=bP(v=>this.update(v),l.resizeDelay||0),this._dataChanges=[],Fh[this.id]=this,!d||!f){console.error("Failed to create chart: can't acquire context from the given item");return}wr.listen(this,"complete",n2),wr.listen(this,"progress",Q6),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:n},width:i,height:a,_aspectRatio:s}=this;return ue(e)?n&&s?s:a?i/a:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return Ha}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():AS(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return wS(this.canvas,this.ctx),this}stop(){return wr.stop(this),this}resize(e,n){wr.running(this)?this._resizeBeforeDraw={width:e,height:n}:this._resize(e,n)}_resize(e,n){const i=this.options,a=this.canvas,s=i.maintainAspectRatio&&this.aspectRatio,l=this.platform.getMaximumSize(a,e,n,s),d=i.devicePixelRatio||this.platform.getDevicePixelRatio(),f=this.width?"resize":"attach";this.width=l.width,this.height=l.height,this._aspectRatio=this.aspectRatio,AS(this,d,!0)&&(this.notifyPlugins("resize",{size:l}),$e(i.onResize,[this,l],this),this.attached&&this._doResize(f)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Pe(n,(i,a)=>{i.id=a})}buildOrUpdateScales(){const e=this.options,n=e.scales,i=this.scales,a=Object.keys(i).reduce((l,d)=>(l[d]=!1,l),{});let s=[];n&&(s=s.concat(Object.keys(n).map(l=>{const d=n[l],f=Eb(l,d),p=f==="r",g=f==="x";return{options:d,dposition:p?"chartArea":g?"bottom":"left",dtype:p?"radialLinear":g?"category":"linear"}}))),Pe(s,l=>{const d=l.options,f=d.id,p=Eb(f,d),g=Jt(d.type,l.dtype);(d.position===void 0||t2(d.position,p)!==t2(l.dposition))&&(d.position=l.dposition),a[f]=!0;let v=null;if(f in i&&i[f].type===g)v=i[f];else{const y=Ha.getScale(g);v=new y({id:f,type:g,ctx:this.ctx,chart:this}),i[v.id]=v}v.init(d,e)}),Pe(a,(l,d)=>{l||delete i[d]}),Pe(i,l=>{Jn.configure(this,l,l.options),Jn.addBox(this,l)})}_updateMetasets(){const e=this._metasets,n=this.data.datasets.length,i=e.length;if(e.sort((a,s)=>a.index-s.index),i>n){for(let a=n;a<i;++a)this._destroyDatasetMeta(a);e.splice(n,i-n)}this._sortedMetasets=e.slice(0).sort(e2("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:n}}=this;e.length>n.length&&delete this._stacks,e.forEach((i,a)=>{n.filter(s=>s===i._dataset).length===0&&this._destroyDatasetMeta(a)})}buildOrUpdateControllers(){const e=[],n=this.data.datasets;let i,a;for(this._removeUnreferencedMetasets(),i=0,a=n.length;i<a;i++){const s=n[i];let l=this.getDatasetMeta(i);const d=s.type||this.config.type;if(l.type&&l.type!==d&&(this._destroyDatasetMeta(i),l=this.getDatasetMeta(i)),l.type=d,l.indexAxis=s.indexAxis||Cb(d,this.options),l.order=s.order||0,l.index=i,l.label=""+s.label,l.visible=this.isDatasetVisible(i),l.controller)l.controller.updateIndex(i),l.controller.linkScales();else{const f=Ha.getController(d),{datasetElementType:p,dataElementType:g}=Je.datasets[d];Object.assign(f,{dataElementType:Ha.getElement(g),datasetElementType:p&&Ha.getElement(p)}),l.controller=new f(this,i),e.push(l.controller)}}return this._updateMetasets(),e}_resetElements(){Pe(this.data.datasets,(e,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const n=this.config;n.update();const i=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),a=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let l=0;for(let p=0,g=this.data.datasets.length;p<g;p++){const{controller:v}=this.getDatasetMeta(p),y=!a&&s.indexOf(v)===-1;v.buildOrUpdateElements(y),l=Math.max(+v.getMaxOverflow(),l)}l=this._minPadding=i.layout.autoPadding?l:0,this._updateLayout(l),a||Pe(s,p=>{p.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(e2("z","_idx"));const{_active:d,_lastEvent:f}=this;f?this._eventHandler(f,!0):d.length&&this._updateHoverStyles(d,d,!0),this.render()}_updateScales(){Pe(this.scales,e=>{Jn.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,n=new Set(Object.keys(this._listeners)),i=new Set(e.events);(!pS(n,i)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,n=this._getUniformDataChanges()||[];for(const{method:i,start:a,count:s}of n){const l=i==="_removeElements"?-s:s;J6(e,a,l)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const n=this.data.datasets.length,i=s=>new Set(e.filter(l=>l[0]===s).map((l,d)=>d+","+l.splice(1).join(","))),a=i(0);for(let s=1;s<n;s++)if(!pS(a,i(s)))return;return Array.from(a).map(s=>s.split(",")).map(s=>({method:s[1],start:+s[2],count:+s[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Jn.update(this,this.width,this.height,e);const n=this.chartArea,i=n.width<=0||n.height<=0;this._layers=[],Pe(this.boxes,a=>{i&&a.position==="chartArea"||(a.configure&&a.configure(),this._layers.push(...a._layers()))},this),this._layers.forEach((a,s)=>{a._idx=s}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,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,Os(e)?e({datasetIndex:n}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,n){const i=this.getDatasetMeta(e),a={meta:i,index:e,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",a)!==!1&&(i.controller._update(n),a.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",a))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(wr.has(this)?this.attached&&!wr.running(this)&&wr.start(this):(this.draw(),n2({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:i,height:a}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(i,a)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(this.chartArea);for(this._drawDatasets();e<n.length;++e)n[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const n=this._sortedMetasets,i=[];let a,s;for(a=0,s=n.length;a<s;++a){const l=n[a];(!e||l.visible)&&i.push(l)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let n=e.length-1;n>=0;--n)this._drawDataset(e[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const n=this.ctx,i={meta:e,index:e.index,cancelable:!0},a=lA(this,e);this.notifyPlugins("beforeDatasetDraw",i)!==!1&&(a&&$p(n,a),e.controller.draw(),a&&Gp(n),i.cancelable=!1,this.notifyPlugins("afterDatasetDraw",i))}isPointInArea(e){return Or(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,i,a){const s=KN.modes[n];return typeof s=="function"?s(this,e,i,a):[]}getDatasetMeta(e){const n=this.data.datasets[e],i=this._metasets;let a=i.filter(s=>s&&s._dataset===n).pop();return a||(a={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:e,_dataset:n,_parsed:[],_sorted:!1},i.push(a)),a}getContext(){return this.$context||(this.$context=zs(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const n=this.data.datasets[e];if(!n)return!1;const i=this.getDatasetMeta(e);return typeof i.hidden=="boolean"?!i.hidden:!n.hidden}setDatasetVisibility(e,n){const i=this.getDatasetMeta(e);i.hidden=!n}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,n,i){const a=i?"show":"hide",s=this.getDatasetMeta(e),l=s.controller._resolveAnimations(void 0,a);sd(n)?(s.data[n].hidden=!i,this.update()):(this.setDatasetVisibility(e,i),l.update(s,{visible:i}),this.update(d=>d.datasetIndex===e?a:void 0))}hide(e,n){this._updateVisibility(e,n,!1)}show(e,n){this._updateVisibility(e,n,!0)}_destroyDatasetMeta(e){const n=this._metasets[e];n&&n.controller&&n.controller._destroy(),delete this._metasets[e]}_stop(){let e,n;for(this.stop(),wr.remove(this),e=0,n=this.data.datasets.length;e<n;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:n}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),wS(e,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete Fh[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,n=this.platform,i=(s,l)=>{n.addEventListener(this,s,l),e[s]=l},a=(s,l,d)=>{s.offsetX=l,s.offsetY=d,this._eventHandler(s)};Pe(this.options.events,s=>i(s,a))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,n=this.platform,i=(f,p)=>{n.addEventListener(this,f,p),e[f]=p},a=(f,p)=>{e[f]&&(n.removeEventListener(this,f,p),delete e[f])},s=(f,p)=>{this.canvas&&this.resize(f,p)};let l;const d=()=>{a("attach",d),this.attached=!0,this.resize(),i("resize",s),i("detach",l)};l=()=>{this.attached=!1,a("resize",s),this._stop(),this._resize(0,0),i("attach",d)},n.isAttached(this.canvas)?d():l()}unbindEvents(){Pe(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._listeners={},Pe(this._responsiveListeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,n,i){const a=i?"set":"remove";let s,l,d,f;for(n==="dataset"&&(s=this.getDatasetMeta(e[0].datasetIndex),s.controller["_"+a+"DatasetHoverStyle"]()),d=0,f=e.length;d<f;++d){l=e[d];const p=l&&this.getDatasetMeta(l.datasetIndex).controller;p&&p[a+"HoverStyle"](l.element,l.datasetIndex,l.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const n=this._active||[],i=e.map(({datasetIndex:s,index:l})=>{const d=this.getDatasetMeta(s);if(!d)throw new Error("No dataset found at index "+s);return{datasetIndex:s,element:d.data[l],index:l}});!lp(i,n)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,n))}notifyPlugins(e,n,i){return this._plugins.notify(this,e,n,i)}isPluginEnabled(e){return this._plugins._cache.filter(n=>n.plugin.id===e).length===1}_updateHoverStyles(e,n,i){const a=this.options.hover,s=(f,p)=>f.filter(g=>!p.some(v=>g.datasetIndex===v.datasetIndex&&g.index===v.index)),l=s(n,e),d=i?e:s(e,n);l.length&&this.updateHoverStyle(l,a.mode,!1),d.length&&a.mode&&this.updateHoverStyle(d,a.mode,!0)}_eventHandler(e,n){const i={event:e,replay:n,cancelable:!0,inChartArea:this.isPointInArea(e)},a=l=>(l.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",i,a)===!1)return;const s=this._handleEvent(e,n,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,a),(s||i.changed)&&this.render(),this}_handleEvent(e,n,i){const{_active:a=[],options:s}=this,l=n,d=this._getActiveElements(e,a,i,l),f=oP(e),p=t4(e,this._lastEvent,i,f);i&&(this._lastEvent=null,$e(s.onHover,[e,d,this],this),f&&$e(s.onClick,[e,d,this],this));const g=!lp(d,a);return(g||n)&&(this._active=d,this._updateHoverStyles(d,a,n)),this._lastEvent=p,g}_getActiveElements(e,n,i,a){if(e.type==="mouseout")return[];if(!i)return n;const s=this.options.hover;return this.getElementsAtEventForMode(e,s.mode,s,a)}},Lt(vs,"defaults",Je),Lt(vs,"instances",Fh),Lt(vs,"overrides",jo),Lt(vs,"registry",Ha),Lt(vs,"version",X6),Lt(vs,"getChart",i2),vs);function a2(){return Pe(qp.instances,t=>t._plugins.invalidate())}function e4(t,e,n){const{startAngle:i,x:a,y:s,outerRadius:l,innerRadius:d,options:f}=e,{borderWidth:p,borderJoinStyle:g}=f,v=Math.min(p/l,Qn(i-n));if(t.beginPath(),t.arc(a,s,l-p/2,i+v/2,n-v/2),d>0){const y=Math.min(p/d,Qn(i-n));t.arc(a,s,d+p/2,n-y/2,i+y/2,!0)}else{const y=Math.min(p/2,l*Qn(i-n));if(g==="round")t.arc(a,s,y,n-Ce/2,i+Ce/2,!0);else if(g==="bevel"){const _=2*y*y,w=-_*Math.cos(n+Ce/2)+a,C=-_*Math.sin(n+Ce/2)+s,A=_*Math.cos(i+Ce/2)+a,k=_*Math.sin(i+Ce/2)+s;t.lineTo(w,C),t.lineTo(A,k)}}t.closePath(),t.moveTo(0,0),t.rect(0,0,t.canvas.width,t.canvas.height),t.clip("evenodd")}function n4(t,e,n){const{startAngle:i,pixelMargin:a,x:s,y:l,outerRadius:d,innerRadius:f}=e;let p=a/d;t.beginPath(),t.arc(s,l,d,i-p,n+p),f>a?(p=a/f,t.arc(s,l,f,n+p,i-p,!0)):t.arc(s,l,a,n+hn,i-hn),t.closePath(),t.clip()}function i4(t){return Ny(t,["outerStart","outerEnd","innerStart","innerEnd"])}function a4(t,e,n,i){const a=i4(t.options.borderRadius),s=(n-e)/2,l=Math.min(s,i*e/2),d=f=>{const p=(n-Math.min(s,f))*i/2;return Nn(f,0,Math.min(s,p))};return{outerStart:d(a.outerStart),outerEnd:d(a.outerEnd),innerStart:Nn(a.innerStart,0,l),innerEnd:Nn(a.innerEnd,0,l)}}function Ll(t,e,n,i){return{x:n+t*Math.cos(e),y:i+t*Math.sin(e)}}function pp(t,e,n,i,a,s){const{x:l,y:d,startAngle:f,pixelMargin:p,innerRadius:g}=e,v=Math.max(e.outerRadius+i+n-p,0),y=g>0?g+i+n+p:0;let _=0;const w=a-f;if(i){const ut=g>0?g-i:0,I=v>0?v-i:0,$=(ut+I)/2,q=$!==0?w*$/($+i):w;_=(w-q)/2}const C=Math.max(.001,w*v-n/Ce)/v,A=(w-C)/2,k=f+A+_,z=a-A-_,{outerStart:j,outerEnd:P,innerStart:H,innerEnd:V}=a4(e,y,v,z-k),U=v-j,Z=v-P,Q=k+j/U,et=z-P/Z,X=y+H,R=y+V,dt=k+H/X,it=z-V/R;if(t.beginPath(),s){const ut=(Q+et)/2;if(t.arc(l,d,v,Q,ut),t.arc(l,d,v,ut,et),P>0){const nt=Ll(Z,et,l,d);t.arc(nt.x,nt.y,P,et,z+hn)}const I=Ll(R,z,l,d);if(t.lineTo(I.x,I.y),V>0){const nt=Ll(R,it,l,d);t.arc(nt.x,nt.y,V,z+hn,it+Math.PI)}const $=(z-V/y+(k+H/y))/2;if(t.arc(l,d,y,z-V/y,$,!0),t.arc(l,d,y,$,k+H/y,!0),H>0){const nt=Ll(X,dt,l,d);t.arc(nt.x,nt.y,H,dt+Math.PI,k-hn)}const q=Ll(U,k,l,d);if(t.lineTo(q.x,q.y),j>0){const nt=Ll(U,Q,l,d);t.arc(nt.x,nt.y,j,k-hn,Q)}}else{t.moveTo(l,d);const ut=Math.cos(Q)*v+l,I=Math.sin(Q)*v+d;t.lineTo(ut,I);const $=Math.cos(et)*v+l,q=Math.sin(et)*v+d;t.lineTo($,q)}t.closePath()}function r4(t,e,n,i,a){const{fullCircles:s,startAngle:l,circumference:d}=e;let f=e.endAngle;if(s){pp(t,e,n,i,f,a);for(let p=0;p<s;++p)t.fill();isNaN(d)||(f=l+(d%qe||qe))}return pp(t,e,n,i,f,a),t.fill(),f}function s4(t,e,n,i,a){const{fullCircles:s,startAngle:l,circumference:d,options:f}=e,{borderWidth:p,borderJoinStyle:g,borderDash:v,borderDashOffset:y,borderRadius:_}=f,w=f.borderAlign==="inner";if(!p)return;t.setLineDash(v||[]),t.lineDashOffset=y,w?(t.lineWidth=p*2,t.lineJoin=g||"round"):(t.lineWidth=p,t.lineJoin=g||"bevel");let C=e.endAngle;if(s){pp(t,e,n,i,C,a);for(let A=0;A<s;++A)t.stroke();isNaN(d)||(C=l+(d%qe||qe))}w&&n4(t,e,C),f.selfJoin&&C-l>=Ce&&_===0&&g!=="miter"&&e4(t,e,C),s||(pp(t,e,n,i,C,a),t.stroke())}class Ru extends Lr{constructor(n){super();Lt(this,"circumference");Lt(this,"endAngle");Lt(this,"fullCircles");Lt(this,"innerRadius");Lt(this,"outerRadius");Lt(this,"pixelMargin");Lt(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,n&&Object.assign(this,n)}inRange(n,i,a){const s=this.getProps(["x","y"],a),{angle:l,distance:d}=HE(s,{x:n,y:i}),{startAngle:f,endAngle:p,innerRadius:g,outerRadius:v,circumference:y}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],a),_=(this.options.spacing+this.options.borderWidth)/2,w=Jt(y,p-f),C=od(l,f,p)&&f!==p,A=w>=qe||C,k=Dr(d,g+_,v+_);return A&&k}getCenterPoint(n){const{x:i,y:a,startAngle:s,endAngle:l,innerRadius:d,outerRadius:f}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:p,spacing:g}=this.options,v=(s+l)/2,y=(d+f+g+p)/2;return{x:i+Math.cos(v)*y,y:a+Math.sin(v)*y}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:i,circumference:a}=this,s=(i.offset||0)/4,l=(i.spacing||0)/2,d=i.circular;if(this.pixelMargin=i.borderAlign==="inner"?.33:0,this.fullCircles=a>qe?Math.floor(a/qe):0,a===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const f=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(f)*s,Math.sin(f)*s);const p=1-Math.sin(Math.min(Ce,a||0)),g=s*p;n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,r4(n,this,g,l,d),s4(n,this,g,l,d),n.restore()}}Lt(Ru,"id","arc"),Lt(Ru,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1}),Lt(Ru,"defaultRoutes",{backgroundColor:"backgroundColor"}),Lt(Ru,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function _A(t,e,n=e){t.lineCap=Jt(n.borderCapStyle,e.borderCapStyle),t.setLineDash(Jt(n.borderDash,e.borderDash)),t.lineDashOffset=Jt(n.borderDashOffset,e.borderDashOffset),t.lineJoin=Jt(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=Jt(n.borderWidth,e.borderWidth),t.strokeStyle=Jt(n.borderColor,e.borderColor)}function o4(t,e,n){t.lineTo(n.x,n.y)}function l4(t){return t.stepped?OP:t.tension||t.cubicInterpolationMode==="monotone"?kP:o4}function SA(t,e,n={}){const i=t.length,{start:a=0,end:s=i-1}=n,{start:l,end:d}=e,f=Math.max(a,l),p=Math.min(s,d),g=a<l&&s<l||a>d&&s>d;return{count:i,start:f,loop:e.loop,ilen:p<f&&!g?i+p-f:p-f}}function c4(t,e,n,i){const{points:a,options:s}=e,{count:l,start:d,loop:f,ilen:p}=SA(a,n,i),g=l4(s);let{move:v=!0,reverse:y}=i||{},_,w,C;for(_=0;_<=p;++_)w=a[(d+(y?p-_:_))%l],!w.skip&&(v?(t.moveTo(w.x,w.y),v=!1):g(t,C,w,y,s.stepped),C=w);return f&&(w=a[(d+(y?p:0))%l],g(t,C,w,y,s.stepped)),!!f}function u4(t,e,n,i){const a=e.points,{count:s,start:l,ilen:d}=SA(a,n,i),{move:f=!0,reverse:p}=i||{};let g=0,v=0,y,_,w,C,A,k;const z=P=>(l+(p?d-P:P))%s,j=()=>{C!==A&&(t.lineTo(g,A),t.lineTo(g,C),t.lineTo(g,k))};for(f&&(_=a[z(0)],t.moveTo(_.x,_.y)),y=0;y<=d;++y){if(_=a[z(y)],_.skip)continue;const P=_.x,H=_.y,V=P|0;V===w?(H<C?C=H:H>A&&(A=H),g=(v*g+P)/++v):(j(),t.lineTo(P,H),w=V,v=0,C=A=H),k=H}j()}function Ab(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!n?u4:c4}function d4(t){return t.stepped?cN:t.tension||t.cubicInterpolationMode==="monotone"?uN:To}function f4(t,e,n,i){let a=e._path;a||(a=e._path=new Path2D,e.path(a,n,i)&&a.closePath()),_A(t,e.options),t.stroke(a)}function h4(t,e,n,i){const{segments:a,options:s}=e,l=Ab(e);for(const d of a)_A(t,s,d.style),t.beginPath(),l(t,e,d,{start:n,end:n+i-1})&&t.closePath(),t.stroke()}const p4=typeof Path2D=="function";function m4(t,e,n,i){p4&&!e.options.segment?f4(t,e,n,i):h4(t,e,n,i)}class Ss extends Lr{constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,n){const i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const a=i.spanGaps?this._loop:this._fullLoop;eN(this._points,i,e,a,n),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=gN(this,this.options.segment))}first(){const e=this.segments,n=this.points;return e.length&&n[e[0].start]}last(){const e=this.segments,n=this.points,i=e.length;return i&&n[e[i-1].end]}interpolate(e,n){const i=this.options,a=e[n],s=this.points,l=oA(this,{property:n,start:a,end:a});if(!l.length)return;const d=[],f=d4(i);let p,g;for(p=0,g=l.length;p<g;++p){const{start:v,end:y}=l[p],_=s[v],w=s[y];if(_===w){d.push(_);continue}const C=Math.abs((a-_[n])/(w[n]-_[n])),A=f(_,w,C,i.stepped);A[n]=e[n],d.push(A)}return d.length===1?d[0]:d}pathSegment(e,n,i){return Ab(this)(e,this,n,i)}path(e,n,i){const a=this.segments,s=Ab(this);let l=this._loop;n=n||0,i=i||this.points.length-n;for(const d of a)l&=s(e,this,d,{start:n,end:n+i-1});return!!l}draw(e,n,i,a){const s=this.options||{};(this.points||[]).length&&s.borderWidth&&(e.save(),m4(e,this,i,a),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}Lt(Ss,"id","line"),Lt(Ss,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),Lt(Ss,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),Lt(Ss,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"});function r2(t,e,n,i){const a=t.options,{[n]:s}=t.getProps([n],i);return Math.abs(e-s)<a.radius+a.hitRadius}class Hh extends Lr{constructor(n){super();Lt(this,"parsed");Lt(this,"skip");Lt(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,i,a){const s=this.options,{x:l,y:d}=this.getProps(["x","y"],a);return Math.pow(n-l,2)+Math.pow(i-d,2)<Math.pow(s.hitRadius+s.radius,2)}inXRange(n,i){return r2(this,n,"x",i)}inYRange(n,i){return r2(this,n,"y",i)}getCenterPoint(n){const{x:i,y:a}=this.getProps(["x","y"],n);return{x:i,y:a}}size(n){n=n||this.options||{};let i=n.radius||0;i=Math.max(i,i&&n.hoverRadius||0);const a=i&&n.borderWidth||0;return(i+a)*2}draw(n,i){const a=this.options;this.skip||a.radius<.1||!Or(this,i,this.size(a)/2)||(n.strokeStyle=a.borderColor,n.lineWidth=a.borderWidth,n.fillStyle=a.backgroundColor,Sb(n,a,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}Lt(Hh,"id","point"),Lt(Hh,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),Lt(Hh,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function wA(t,e){const{x:n,y:i,base:a,width:s,height:l}=t.getProps(["x","y","base","width","height"],e);let d,f,p,g,v;return t.horizontal?(v=l/2,d=Math.min(n,a),f=Math.max(n,a),p=i-v,g=i+v):(v=s/2,d=n-v,f=n+v,p=Math.min(i,a),g=Math.max(i,a)),{left:d,top:p,right:f,bottom:g}}function ws(t,e,n,i){return t?0:Nn(e,n,i)}function g4(t,e,n){const i=t.options.borderWidth,a=t.borderSkipped,s=XE(i);return{t:ws(a.top,s.top,0,n),r:ws(a.right,s.right,0,e),b:ws(a.bottom,s.bottom,0,n),l:ws(a.left,s.left,0,e)}}function v4(t,e,n){const{enableBorderRadius:i}=t.getProps(["enableBorderRadius"]),a=t.options.borderRadius,s=zo(a),l=Math.min(e,n),d=t.borderSkipped,f=i||pe(a);return{topLeft:ws(!f||d.top||d.left,s.topLeft,0,l),topRight:ws(!f||d.top||d.right,s.topRight,0,l),bottomLeft:ws(!f||d.bottom||d.left,s.bottomLeft,0,l),bottomRight:ws(!f||d.bottom||d.right,s.bottomRight,0,l)}}function b4(t){const e=wA(t),n=e.right-e.left,i=e.bottom-e.top,a=g4(t,n/2,i/2),s=v4(t,n/2,i/2);return{outer:{x:e.left,y:e.top,w:n,h:i,radius:s},inner:{x:e.left+a.l,y:e.top+a.t,w:n-a.l-a.r,h:i-a.t-a.b,radius:{topLeft:Math.max(0,s.topLeft-Math.max(a.t,a.l)),topRight:Math.max(0,s.topRight-Math.max(a.t,a.r)),bottomLeft:Math.max(0,s.bottomLeft-Math.max(a.b,a.l)),bottomRight:Math.max(0,s.bottomRight-Math.max(a.b,a.r))}}}}function Vv(t,e,n,i){const a=e===null,s=n===null,d=t&&!(a&&s)&&wA(t,i);return d&&(a||Dr(e,d.left,d.right))&&(s||Dr(n,d.top,d.bottom))}function y4(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function x4(t,e){t.rect(e.x,e.y,e.w,e.h)}function $v(t,e,n={}){const i=t.x!==n.x?-e:0,a=t.y!==n.y?-e:0,s=(t.x+t.w!==n.x+n.w?e:0)-i,l=(t.y+t.h!==n.y+n.h?e:0)-a;return{x:t.x+i,y:t.y+a,w:t.w+s,h:t.h+l,radius:t.radius}}class Uh extends Lr{constructor(e){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,e&&Object.assign(this,e)}draw(e){const{inflateAmount:n,options:{borderColor:i,backgroundColor:a}}=this,{inner:s,outer:l}=b4(this),d=y4(l.radius)?ld:x4;e.save(),(l.w!==s.w||l.h!==s.h)&&(e.beginPath(),d(e,$v(l,n,s)),e.clip(),d(e,$v(s,-n,l)),e.fillStyle=i,e.fill("evenodd")),e.beginPath(),d(e,$v(s,n)),e.fillStyle=a,e.fill(),e.restore()}inRange(e,n,i){return Vv(this,e,n,i)}inXRange(e,n){return Vv(this,e,null,n)}inYRange(e,n){return Vv(this,null,e,n)}getCenterPoint(e){const{x:n,y:i,base:a,horizontal:s}=this.getProps(["x","y","base","horizontal"],e);return{x:s?(n+a)/2:n,y:s?i:(i+a)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}Lt(Uh,"id","bar"),Lt(Uh,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),Lt(Uh,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var _4=Object.freeze({__proto__:null,ArcElement:Ru,BarElement:Uh,LineElement:Ss,PointElement:Hh});const Tb=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],s2=Tb.map(t=>t.replace("rgb(","rgba(").replace(")",", 0.5)"));function CA(t){return Tb[t%Tb.length]}function EA(t){return s2[t%s2.length]}function S4(t,e){return t.borderColor=CA(e),t.backgroundColor=EA(e),++e}function w4(t,e){return t.backgroundColor=t.data.map(()=>CA(e++)),e}function C4(t,e){return t.backgroundColor=t.data.map(()=>EA(e++)),e}function E4(t){let e=0;return(n,i)=>{const a=t.getDatasetMeta(i).controller;a instanceof Oo?e=w4(n,e):a instanceof Zu?e=C4(n,e):a&&(e=S4(n,e))}}function o2(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}function A4(t){return t&&(t.borderColor||t.backgroundColor)}function T4(){return Je.borderColor!=="rgba(0,0,0,0.1)"||Je.backgroundColor!=="rgba(0,0,0,0.1)"}var D4={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,n){if(!n.enabled)return;const{data:{datasets:i},options:a}=t.config,{elements:s}=a,l=o2(i)||A4(a)||s&&o2(s)||T4();if(!n.forceOverride&&l)return;const d=E4(t);i.forEach(d)}};function M4(t,e,n,i,a){const s=a.samples||i;if(s>=n)return t.slice(e,e+n);const l=[],d=(n-2)/(s-2);let f=0;const p=e+n-1;let g=e,v,y,_,w,C;for(l[f++]=t[g],v=0;v<s-2;v++){let A=0,k=0,z;const j=Math.floor((v+1)*d)+1+e,P=Math.min(Math.floor((v+2)*d)+1,n)+e,H=P-j;for(z=j;z<P;z++)A+=t[z].x,k+=t[z].y;A/=H,k/=H;const V=Math.floor(v*d)+1+e,U=Math.min(Math.floor((v+1)*d)+1,n)+e,{x:Z,y:Q}=t[g];for(_=w=-1,z=V;z<U;z++)w=.5*Math.abs((Z-A)*(t[z].y-Q)-(Z-t[z].x)*(k-Q)),w>_&&(_=w,y=t[z],C=z);l[f++]=y,g=C}return l[f++]=t[p],l}function O4(t,e,n,i){let a=0,s=0,l,d,f,p,g,v,y,_,w,C;const A=[],k=e+n-1,z=t[e].x,P=t[k].x-z;for(l=e;l<e+n;++l){d=t[l],f=(d.x-z)/P*i,p=d.y;const H=f|0;if(H===g)p<w?(w=p,v=l):p>C&&(C=p,y=l),a=(s*a+d.x)/++s;else{const V=l-1;if(!ue(v)&&!ue(y)){const U=Math.min(v,y),Z=Math.max(v,y);U!==_&&U!==V&&A.push({...t[U],x:a}),Z!==_&&Z!==V&&A.push({...t[Z],x:a})}l>0&&V!==_&&A.push(t[V]),A.push(d),g=H,s=0,w=C=p,v=y=_=l}}return A}function AA(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function l2(t){t.data.datasets.forEach(e=>{AA(e)})}function k4(t,e){const n=e.length;let i=0,a;const{iScale:s}=t,{min:l,max:d,minDefined:f,maxDefined:p}=s.getUserBounds();return f&&(i=Nn(Mr(e,s.axis,l).lo,0,n-1)),p?a=Nn(Mr(e,s.axis,d).hi+1,i,n)-i:a=n-i,{start:i,count:a}}var L4={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,n)=>{if(!n.enabled){l2(t);return}const i=t.width;t.data.datasets.forEach((a,s)=>{const{_data:l,indexAxis:d}=a,f=t.getDatasetMeta(s),p=l||a.data;if(Lu([d,t.options.indexAxis])==="y"||!f.controller.supportsDecimation)return;const g=t.scales[f.xAxisID];if(g.type!=="linear"&&g.type!=="time"||t.options.parsing)return;let{start:v,count:y}=k4(f,p);const _=n.threshold||4*i;if(y<=_){AA(a);return}ue(l)&&(a._data=p,delete a.data,Object.defineProperty(a,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(C){this._data=C}}));let w;switch(n.algorithm){case"lttb":w=M4(p,v,y,i,n);break;case"min-max":w=O4(p,v,y,i);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}a._decimated=w})},destroy(t){l2(t)}};function z4(t,e,n){const i=t.segments,a=t.points,s=e.points,l=[];for(const d of i){let{start:f,end:p}=d;p=Yp(f,p,a);const g=Db(n,a[f],a[p],d.loop);if(!e.segments){l.push({source:d,target:g,start:a[f],end:a[p]});continue}const v=oA(e,g);for(const y of v){const _=Db(n,s[y.start],s[y.end],y.loop),w=sA(d,a,_);for(const C of w)l.push({source:C,target:y,start:{[n]:c2(g,_,"start",Math.max)},end:{[n]:c2(g,_,"end",Math.min)}})}}return l}function Db(t,e,n,i){if(i)return;let a=e[t],s=n[t];return t==="angle"&&(a=Qn(a),s=Qn(s)),{property:t,start:a,end:s}}function R4(t,e){const{x:n=null,y:i=null}=t||{},a=e.points,s=[];return e.segments.forEach(({start:l,end:d})=>{d=Yp(l,d,a);const f=a[l],p=a[d];i!==null?(s.push({x:f.x,y:i}),s.push({x:p.x,y:i})):n!==null&&(s.push({x:n,y:f.y}),s.push({x:n,y:p.y}))}),s}function Yp(t,e,n){for(;e>t;e--){const i=n[e];if(!isNaN(i.x)&&!isNaN(i.y))break}return e}function c2(t,e,n,i){return t&&e?i(t[n],e[n]):t?t[n]:e?e[n]:0}function TA(t,e){let n=[],i=!1;return Qe(t)?(i=!0,n=t):n=R4(t,e),n.length?new Ss({points:n,options:{tension:0},_loop:i,_fullLoop:i}):null}function u2(t){return t&&t.fill!==!1}function P4(t,e,n){let a=t[e].fill;const s=[e];let l;if(!n)return a;for(;a!==!1&&s.indexOf(a)===-1;){if(!un(a))return a;if(l=t[a],!l)return!1;if(l.visible)return a;s.push(a),a=l.fill}return!1}function N4(t,e,n){const i=F4(t);if(pe(i))return isNaN(i.value)?!1:i;let a=parseFloat(i);return un(a)&&Math.floor(a)===a?j4(i[0],e,a,n):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function j4(t,e,n,i){return(t==="-"||t==="+")&&(n=e+n),n===e||n<0||n>=i?!1:n}function B4(t,e){let n=null;return t==="start"?n=e.bottom:t==="end"?n=e.top:pe(t)?n=e.getPixelForValue(t.value):e.getBasePixel&&(n=e.getBasePixel()),n}function I4(t,e,n){let i;return t==="start"?i=n:t==="end"?i=e.options.reverse?e.min:e.max:pe(t)?i=t.value:i=e.getBaseValue(),i}function F4(t){const e=t.options,n=e.fill;let i=Jt(n&&n.target,n);return i===void 0&&(i=!!e.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function H4(t){const{scale:e,index:n,line:i}=t,a=[],s=i.segments,l=i.points,d=U4(e,n);d.push(TA({x:null,y:e.bottom},i));for(let f=0;f<s.length;f++){const p=s[f];for(let g=p.start;g<=p.end;g++)V4(a,l[g],d)}return new Ss({points:a,options:{}})}function U4(t,e){const n=[],i=t.getMatchingVisibleMetas("line");for(let a=0;a<i.length;a++){const s=i[a];if(s.index===e)break;s.hidden||n.unshift(s.dataset)}return n}function V4(t,e,n){const i=[];for(let a=0;a<n.length;a++){const s=n[a],{first:l,last:d,point:f}=$4(s,e,"x");if(!(!f||l&&d)){if(l)i.unshift(f);else if(t.push(f),!d)break}}t.push(...i)}function $4(t,e,n){const i=t.interpolate(e,n);if(!i)return{};const a=i[n],s=t.segments,l=t.points;let d=!1,f=!1;for(let p=0;p<s.length;p++){const g=s[p],v=l[g.start][n],y=l[g.end][n];if(Dr(a,v,y)){d=a===v,f=a===y;break}}return{first:d,last:f,point:i}}class DA{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,n,i){const{x:a,y:s,radius:l}=this;return n=n||{start:0,end:qe},e.arc(a,s,l,n.end,n.start,!0),!i.bounds}interpolate(e){const{x:n,y:i,radius:a}=this,s=e.angle;return{x:n+Math.cos(s)*a,y:i+Math.sin(s)*a,angle:s}}}function G4(t){const{chart:e,fill:n,line:i}=t;if(un(n))return W4(e,n);if(n==="stack")return H4(t);if(n==="shape")return!0;const a=Z4(t);return a instanceof DA?a:TA(a,i)}function W4(t,e){const n=t.getDatasetMeta(e);return n&&t.isDatasetVisible(e)?n.dataset:null}function Z4(t){return(t.scale||{}).getPointPositionForValue?Y4(t):q4(t)}function q4(t){const{scale:e={},fill:n}=t,i=B4(n,e);if(un(i)){const a=e.isHorizontal();return{x:a?i:null,y:a?null:i}}return null}function Y4(t){const{scale:e,fill:n}=t,i=e.options,a=e.getLabels().length,s=i.reverse?e.max:e.min,l=I4(n,e,s),d=[];if(i.grid.circular){const f=e.getPointPositionForValue(0,s);return new DA({x:f.x,y:f.y,radius:e.getDistanceFromCenterForValue(l)})}for(let f=0;f<a;++f)d.push(e.getPointPositionForValue(f,l));return d}function Gv(t,e,n){const i=G4(e),{chart:a,index:s,line:l,scale:d,axis:f}=e,p=l.options,g=p.fill,v=p.backgroundColor,{above:y=v,below:_=v}=g||{},w=a.getDatasetMeta(s),C=lA(a,w);i&&l.points.length&&($p(t,n),X4(t,{line:l,target:i,above:y,below:_,area:n,scale:d,axis:f,clip:C}),Gp(t))}function X4(t,e){const{line:n,target:i,above:a,below:s,area:l,scale:d,clip:f}=e,p=n._loop?"angle":e.axis;t.save();let g=s;s!==a&&(p==="x"?(d2(t,i,l.top),Wv(t,{line:n,target:i,color:a,scale:d,property:p,clip:f}),t.restore(),t.save(),d2(t,i,l.bottom)):p==="y"&&(f2(t,i,l.left),Wv(t,{line:n,target:i,color:s,scale:d,property:p,clip:f}),t.restore(),t.save(),f2(t,i,l.right),g=a)),Wv(t,{line:n,target:i,color:g,scale:d,property:p,clip:f}),t.restore()}function d2(t,e,n){const{segments:i,points:a}=e;let s=!0,l=!1;t.beginPath();for(const d of i){const{start:f,end:p}=d,g=a[f],v=a[Yp(f,p,a)];s?(t.moveTo(g.x,g.y),s=!1):(t.lineTo(g.x,n),t.lineTo(g.x,g.y)),l=!!e.pathSegment(t,d,{move:l}),l?t.closePath():t.lineTo(v.x,n)}t.lineTo(e.first().x,n),t.closePath(),t.clip()}function f2(t,e,n){const{segments:i,points:a}=e;let s=!0,l=!1;t.beginPath();for(const d of i){const{start:f,end:p}=d,g=a[f],v=a[Yp(f,p,a)];s?(t.moveTo(g.x,g.y),s=!1):(t.lineTo(n,g.y),t.lineTo(g.x,g.y)),l=!!e.pathSegment(t,d,{move:l}),l?t.closePath():t.lineTo(n,v.y)}t.lineTo(n,e.first().y),t.closePath(),t.clip()}function Wv(t,e){const{line:n,target:i,property:a,color:s,scale:l,clip:d}=e,f=z4(n,i,a);for(const{source:p,target:g,start:v,end:y}of f){const{style:{backgroundColor:_=s}={}}=p,w=i!==!0;t.save(),t.fillStyle=_,K4(t,l,d,w&&Db(a,v,y)),t.beginPath();const C=!!n.pathSegment(t,p);let A;if(w){C?t.closePath():h2(t,i,y,a);const k=!!i.pathSegment(t,g,{move:C,reverse:!0});A=C&&k,A||h2(t,i,v,a)}t.closePath(),t.fill(A?"evenodd":"nonzero"),t.restore()}}function K4(t,e,n,i){const a=e.chart.chartArea,{property:s,start:l,end:d}=i||{};if(s==="x"||s==="y"){let f,p,g,v;s==="x"?(f=l,p=a.top,g=d,v=a.bottom):(f=a.left,p=l,g=a.right,v=d),t.beginPath(),n&&(f=Math.max(f,n.left),g=Math.min(g,n.right),p=Math.max(p,n.top),v=Math.min(v,n.bottom)),t.rect(f,p,g-f,v-p),t.clip()}}function h2(t,e,n,i){const a=e.interpolate(n,i);a&&t.lineTo(a.x,a.y)}var Q4={id:"filler",afterDatasetsUpdate(t,e,n){const i=(t.data.datasets||[]).length,a=[];let s,l,d,f;for(l=0;l<i;++l)s=t.getDatasetMeta(l),d=s.dataset,f=null,d&&d.options&&d instanceof Ss&&(f={visible:t.isDatasetVisible(l),index:l,fill:N4(d,l,i),chart:t,axis:s.controller.options.indexAxis,scale:s.vScale,line:d}),s.$filler=f,a.push(f);for(l=0;l<i;++l)f=a[l],!(!f||f.fill===!1)&&(f.fill=P4(a,l,n.propagate))},beforeDraw(t,e,n){const i=n.drawTime==="beforeDraw",a=t.getSortedVisibleDatasetMetas(),s=t.chartArea;for(let l=a.length-1;l>=0;--l){const d=a[l].$filler;d&&(d.line.updateControlPoints(s,d.axis),i&&d.fill&&Gv(t.ctx,d,s))}},beforeDatasetsDraw(t,e,n){if(n.drawTime!=="beforeDatasetsDraw")return;const i=t.getSortedVisibleDatasetMetas();for(let a=i.length-1;a>=0;--a){const s=i[a].$filler;u2(s)&&Gv(t.ctx,s,t.chartArea)}},beforeDatasetDraw(t,e,n){const i=e.meta.$filler;!u2(i)||n.drawTime!=="beforeDatasetDraw"||Gv(t.ctx,i,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const p2=(t,e)=>{let{boxHeight:n=e,boxWidth:i=e}=t;return t.usePointStyle&&(n=Math.min(n,e),i=t.pointStyleWidth||Math.min(i,e)),{boxWidth:i,boxHeight:n,itemHeight:Math.max(e,n)}},J4=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class m2 extends Lr{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.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(e,n,i){this.maxWidth=e,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 e=this.options.labels||{};let n=$e(e.generateLabels,[this.chart],this)||[];e.filter&&(n=n.filter(i=>e.filter(i,this.chart.data))),e.sort&&(n=n.sort((i,a)=>e.sort(i,a,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:e,ctx:n}=this;if(!e.display){this.width=this.height=0;return}const i=e.labels,a=On(i.font),s=a.size,l=this._computeTitleHeight(),{boxWidth:d,itemHeight:f}=p2(i,s);let p,g;n.font=a.string,this.isHorizontal()?(p=this.maxWidth,g=this._fitRows(l,s,d,f)+10):(g=this.maxHeight,p=this._fitCols(l,a,d,f)+10),this.width=Math.min(p,e.maxWidth||this.maxWidth),this.height=Math.min(g,e.maxHeight||this.maxHeight)}_fitRows(e,n,i,a){const{ctx:s,maxWidth:l,options:{labels:{padding:d}}}=this,f=this.legendHitBoxes=[],p=this.lineWidths=[0],g=a+d;let v=e;s.textAlign="left",s.textBaseline="middle";let y=-1,_=-g;return this.legendItems.forEach((w,C)=>{const A=i+n/2+s.measureText(w.text).width;(C===0||p[p.length-1]+A+2*d>l)&&(v+=g,p[p.length-(C>0?0:1)]=0,_+=g,y++),f[C]={left:0,top:_,row:y,width:A,height:a},p[p.length-1]+=A+d}),v}_fitCols(e,n,i,a){const{ctx:s,maxHeight:l,options:{labels:{padding:d}}}=this,f=this.legendHitBoxes=[],p=this.columnSizes=[],g=l-e;let v=d,y=0,_=0,w=0,C=0;return this.legendItems.forEach((A,k)=>{const{itemWidth:z,itemHeight:j}=t8(i,n,s,A,a);k>0&&_+j+2*d>g&&(v+=y+d,p.push({width:y,height:_}),w+=y+d,C++,y=_=0),f[k]={left:w,top:_,col:C,width:z,height:j},y=Math.max(y,z),_+=j+d}),v+=y,p.push({width:y,height:_}),v}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:i,labels:{padding:a},rtl:s}}=this,l=Vl(s,this.left,this.width);if(this.isHorizontal()){let d=0,f=Kn(i,this.left+a,this.right-this.lineWidths[d]);for(const p of n)d!==p.row&&(d=p.row,f=Kn(i,this.left+a,this.right-this.lineWidths[d])),p.top+=this.top+e+a,p.left=l.leftForLtr(l.x(f),p.width),f+=p.width+a}else{let d=0,f=Kn(i,this.top+e+a,this.bottom-this.columnSizes[d].height);for(const p of n)p.col!==d&&(d=p.col,f=Kn(i,this.top+e+a,this.bottom-this.columnSizes[d].height)),p.top=f,p.left+=this.left+a,p.left=l.leftForLtr(l.x(p.left),p.width),f+=p.height+a}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;$p(e,this),this._draw(),Gp(e)}}_draw(){const{options:e,columnSizes:n,lineWidths:i,ctx:a}=this,{align:s,labels:l}=e,d=Je.color,f=Vl(e.rtl,this.left,this.width),p=On(l.font),{padding:g}=l,v=p.size,y=v/2;let _;this.drawTitle(),a.textAlign=f.textAlign("left"),a.textBaseline="middle",a.lineWidth=.5,a.font=p.string;const{boxWidth:w,boxHeight:C,itemHeight:A}=p2(l,v),k=function(V,U,Z){if(isNaN(w)||w<=0||isNaN(C)||C<0)return;a.save();const Q=Jt(Z.lineWidth,1);if(a.fillStyle=Jt(Z.fillStyle,d),a.lineCap=Jt(Z.lineCap,"butt"),a.lineDashOffset=Jt(Z.lineDashOffset,0),a.lineJoin=Jt(Z.lineJoin,"miter"),a.lineWidth=Q,a.strokeStyle=Jt(Z.strokeStyle,d),a.setLineDash(Jt(Z.lineDash,[])),l.usePointStyle){const et={radius:C*Math.SQRT2/2,pointStyle:Z.pointStyle,rotation:Z.rotation,borderWidth:Q},X=f.xPlus(V,w/2),R=U+y;YE(a,et,X,R,l.pointStyleWidth&&w)}else{const et=U+Math.max((v-C)/2,0),X=f.leftForLtr(V,w),R=zo(Z.borderRadius);a.beginPath(),Object.values(R).some(dt=>dt!==0)?ld(a,{x:X,y:et,w,h:C,radius:R}):a.rect(X,et,w,C),a.fill(),Q!==0&&a.stroke()}a.restore()},z=function(V,U,Z){Bo(a,Z.text,V,U+A/2,p,{strikethrough:Z.hidden,textAlign:f.textAlign(Z.textAlign)})},j=this.isHorizontal(),P=this._computeTitleHeight();j?_={x:Kn(s,this.left+g,this.right-i[0]),y:this.top+g+P,line:0}:_={x:this.left+g,y:Kn(s,this.top+P+g,this.bottom-n[0].height),line:0},iA(this.ctx,e.textDirection);const H=A+g;this.legendItems.forEach((V,U)=>{a.strokeStyle=V.fontColor,a.fillStyle=V.fontColor;const Z=a.measureText(V.text).width,Q=f.textAlign(V.textAlign||(V.textAlign=l.textAlign)),et=w+y+Z;let X=_.x,R=_.y;f.setWidth(this.width),j?U>0&&X+et+g>this.right&&(R=_.y+=H,_.line++,X=_.x=Kn(s,this.left+g,this.right-i[_.line])):U>0&&R+H>this.bottom&&(X=_.x=X+n[_.line].width+g,_.line++,R=_.y=Kn(s,this.top+P+g,this.bottom-n[_.line].height));const dt=f.x(X);if(k(dt,R,V),X=yP(Q,X+w+y,j?X+et:this.right,e.rtl),z(f.x(X),R,V),j)_.x+=et+g;else if(typeof V.text!="string"){const it=p.lineHeight;_.y+=MA(V,it)+g}else _.y+=H}),aA(this.ctx,e.textDirection)}drawTitle(){const e=this.options,n=e.title,i=On(n.font),a=ti(n.padding);if(!n.display)return;const s=Vl(e.rtl,this.left,this.width),l=this.ctx,d=n.position,f=i.size/2,p=a.top+f;let g,v=this.left,y=this.width;if(this.isHorizontal())y=Math.max(...this.lineWidths),g=this.top+p,v=Kn(e.align,v,this.right-y);else{const w=this.columnSizes.reduce((C,A)=>Math.max(C,A.height),0);g=p+Kn(e.align,this.top,this.bottom-w-e.labels.padding-this._computeTitleHeight())}const _=Kn(d,v,v+y);l.textAlign=s.textAlign(Ry(d)),l.textBaseline="middle",l.strokeStyle=n.color,l.fillStyle=n.color,l.font=i.string,Bo(l,n.text,_,g,i)}_computeTitleHeight(){const e=this.options.title,n=On(e.font),i=ti(e.padding);return e.display?n.lineHeight+i.height:0}_getLegendItemAt(e,n){let i,a,s;if(Dr(e,this.left,this.right)&&Dr(n,this.top,this.bottom)){for(s=this.legendHitBoxes,i=0;i<s.length;++i)if(a=s[i],Dr(e,a.left,a.left+a.width)&&Dr(n,a.top,a.top+a.height))return this.legendItems[i]}return null}handleEvent(e){const n=this.options;if(!i8(e.type,n))return;const i=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const a=this._hoveredItem,s=J4(a,i);a&&!s&&$e(n.onLeave,[e,a,this],this),this._hoveredItem=i,i&&!s&&$e(n.onHover,[e,i,this],this)}else i&&$e(n.onClick,[e,i,this],this)}}function t8(t,e,n,i,a){const s=e8(i,t,e,n),l=n8(a,i,e.lineHeight);return{itemWidth:s,itemHeight:l}}function e8(t,e,n,i){let a=t.text;return a&&typeof a!="string"&&(a=a.reduce((s,l)=>s.length>l.length?s:l)),e+n.size/2+i.measureText(a).width}function n8(t,e,n){let i=t;return typeof e.text!="string"&&(i=MA(e,n)),i}function MA(t,e){const n=t.text?t.text.length:0;return e*n}function i8(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var a8={id:"legend",_element:m2,start(t,e,n){const i=t.legend=new m2({ctx:t.ctx,options:n,chart:t});Jn.configure(t,i,n),Jn.addBox(t,i)},stop(t){Jn.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const i=t.legend;Jn.configure(t,i,n),i.options=n},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,n){const i=e.datasetIndex,a=n.chart;a.isDatasetVisible(i)?(a.hide(i),e.hidden=!0):(a.show(i),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:n,pointStyle:i,textAlign:a,color:s,useBorderRadius:l,borderRadius:d}}=t.legend.options;return t._getSortedDatasetMetas().map(f=>{const p=f.controller.getStyle(n?0:void 0),g=ti(p.borderWidth);return{text:e[f.index].label,fillStyle:p.backgroundColor,fontColor:s,hidden:!f.visible,lineCap:p.borderCapStyle,lineDash:p.borderDash,lineDashOffset:p.borderDashOffset,lineJoin:p.borderJoinStyle,lineWidth:(g.width+g.height)/4,strokeStyle:p.borderColor,pointStyle:i||p.pointStyle,rotation:p.rotation,textAlign:a||p.textAlign,borderRadius:l&&(d||p.borderRadius),datasetIndex:f.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class Vy extends Lr{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.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(e,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=e,this.height=this.bottom=n;const a=Qe(i.text)?i.text.length:1;this._padding=ti(i.padding);const s=a*On(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=s:this.width=s}isHorizontal(){const e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){const{top:n,left:i,bottom:a,right:s,options:l}=this,d=l.align;let f=0,p,g,v;return this.isHorizontal()?(g=Kn(d,i,s),v=n+e,p=s-i):(l.position==="left"?(g=i+e,v=Kn(d,a,n),f=Ce*-.5):(g=s-e,v=Kn(d,n,a),f=Ce*.5),p=a-n),{titleX:g,titleY:v,maxWidth:p,rotation:f}}draw(){const e=this.ctx,n=this.options;if(!n.display)return;const i=On(n.font),s=i.lineHeight/2+this._padding.top,{titleX:l,titleY:d,maxWidth:f,rotation:p}=this._drawArgs(s);Bo(e,n.text,0,0,i,{color:n.color,maxWidth:f,rotation:p,textAlign:Ry(n.align),textBaseline:"middle",translation:[l,d]})}}function r8(t,e){const n=new Vy({ctx:t.ctx,options:e,chart:t});Jn.configure(t,n,e),Jn.addBox(t,n),t.titleBlock=n}var s8={id:"title",_element:Vy,start(t,e,n){r8(t,n)},stop(t){const e=t.titleBlock;Jn.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const i=t.titleBlock;Jn.configure(t,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 yh=new WeakMap;var o8={id:"subtitle",start(t,e,n){const i=new Vy({ctx:t.ctx,options:n,chart:t});Jn.configure(t,i,n),Jn.addBox(t,i),yh.set(t,i)},stop(t){Jn.removeBox(t,yh.get(t)),yh.delete(t)},beforeUpdate(t,e,n){const i=yh.get(t);Jn.configure(t,i,n),i.options=n},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Pu={average(t){if(!t.length)return!1;let e,n,i=new Set,a=0,s=0;for(e=0,n=t.length;e<n;++e){const d=t[e].element;if(d&&d.hasValue()){const f=d.tooltipPosition();i.add(f.x),a+=f.y,++s}}return s===0||i.size===0?!1:{x:[...i].reduce((d,f)=>d+f)/i.size,y:a/s}},nearest(t,e){if(!t.length)return!1;let n=e.x,i=e.y,a=Number.POSITIVE_INFINITY,s,l,d;for(s=0,l=t.length;s<l;++s){const f=t[s].element;if(f&&f.hasValue()){const p=f.getCenterPoint(),g=xb(e,p);g<a&&(a=g,d=f)}}if(d){const f=d.tooltipPosition();n=f.x,i=f.y}return{x:n,y:i}}};function Fa(t,e){return e&&(Qe(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Cr(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(`
|
||
`)>-1?t.split(`
|
||
`):t}function l8(t,e){const{element:n,datasetIndex:i,index:a}=e,s=t.getDatasetMeta(i).controller,{label:l,value:d}=s.getLabelAndValue(a);return{chart:t,label:l,parsed:s.getParsed(a),raw:t.data.datasets[i].data[a],formattedValue:d,dataset:s.getDataset(),dataIndex:a,datasetIndex:i,element:n}}function g2(t,e){const n=t.chart.ctx,{body:i,footer:a,title:s}=t,{boxWidth:l,boxHeight:d}=e,f=On(e.bodyFont),p=On(e.titleFont),g=On(e.footerFont),v=s.length,y=a.length,_=i.length,w=ti(e.padding);let C=w.height,A=0,k=i.reduce((P,H)=>P+H.before.length+H.lines.length+H.after.length,0);if(k+=t.beforeBody.length+t.afterBody.length,v&&(C+=v*p.lineHeight+(v-1)*e.titleSpacing+e.titleMarginBottom),k){const P=e.displayColors?Math.max(d,f.lineHeight):f.lineHeight;C+=_*P+(k-_)*f.lineHeight+(k-1)*e.bodySpacing}y&&(C+=e.footerMarginTop+y*g.lineHeight+(y-1)*e.footerSpacing);let z=0;const j=function(P){A=Math.max(A,n.measureText(P).width+z)};return n.save(),n.font=p.string,Pe(t.title,j),n.font=f.string,Pe(t.beforeBody.concat(t.afterBody),j),z=e.displayColors?l+2+e.boxPadding:0,Pe(i,P=>{Pe(P.before,j),Pe(P.lines,j),Pe(P.after,j)}),z=0,n.font=g.string,Pe(t.footer,j),n.restore(),A+=w.width,{width:A,height:C}}function c8(t,e){const{y:n,height:i}=e;return n<i/2?"top":n>t.height-i/2?"bottom":"center"}function u8(t,e,n,i){const{x:a,width:s}=i,l=n.caretSize+n.caretPadding;if(t==="left"&&a+s+l>e.width||t==="right"&&a-s-l<0)return!0}function d8(t,e,n,i){const{x:a,width:s}=n,{width:l,chartArea:{left:d,right:f}}=t;let p="center";return i==="center"?p=a<=(d+f)/2?"left":"right":a<=s/2?p="left":a>=l-s/2&&(p="right"),u8(p,t,e,n)&&(p="center"),p}function v2(t,e,n){const i=n.yAlign||e.yAlign||c8(t,n);return{xAlign:n.xAlign||e.xAlign||d8(t,e,n,i),yAlign:i}}function f8(t,e){let{x:n,width:i}=t;return e==="right"?n-=i:e==="center"&&(n-=i/2),n}function h8(t,e,n){let{y:i,height:a}=t;return e==="top"?i+=n:e==="bottom"?i-=a+n:i-=a/2,i}function b2(t,e,n,i){const{caretSize:a,caretPadding:s,cornerRadius:l}=t,{xAlign:d,yAlign:f}=n,p=a+s,{topLeft:g,topRight:v,bottomLeft:y,bottomRight:_}=zo(l);let w=f8(e,d);const C=h8(e,f,p);return f==="center"?d==="left"?w+=p:d==="right"&&(w-=p):d==="left"?w-=Math.max(g,y)+a:d==="right"&&(w+=Math.max(v,_)+a),{x:Nn(w,0,i.width-e.width),y:Nn(C,0,i.height-e.height)}}function xh(t,e,n){const i=ti(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-i.right:t.x+i.left}function y2(t){return Fa([],Cr(t))}function p8(t,e,n){return zs(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function x2(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const OA={beforeTitle:xr,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,i=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(i>0&&e.dataIndex<i)return n[e.dataIndex]}return""},afterTitle:xr,beforeBody:xr,beforeLabel:xr,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return ue(n)||(e+=n),e},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.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(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:xr,afterBody:xr,beforeFooter:xr,footer:xr,afterFooter:xr};function yi(t,e,n,i){const a=t[e].call(n,i);return typeof a>"u"?OA[e].call(n,i):a}class Mb extends Lr{constructor(e){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=e.chart,this.options=e.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(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,i=this.options.setContext(this.getContext()),a=i.enabled&&n.options.animation&&i.animations,s=new cA(this.chart,a);return a._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=p8(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:i}=n,a=yi(i,"beforeTitle",this,e),s=yi(i,"title",this,e),l=yi(i,"afterTitle",this,e);let d=[];return d=Fa(d,Cr(a)),d=Fa(d,Cr(s)),d=Fa(d,Cr(l)),d}getBeforeBody(e,n){return y2(yi(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:i}=n,a=[];return Pe(e,s=>{const l={before:[],lines:[],after:[]},d=x2(i,s);Fa(l.before,Cr(yi(d,"beforeLabel",this,s))),Fa(l.lines,yi(d,"label",this,s)),Fa(l.after,Cr(yi(d,"afterLabel",this,s))),a.push(l)}),a}getAfterBody(e,n){return y2(yi(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:i}=n,a=yi(i,"beforeFooter",this,e),s=yi(i,"footer",this,e),l=yi(i,"afterFooter",this,e);let d=[];return d=Fa(d,Cr(a)),d=Fa(d,Cr(s)),d=Fa(d,Cr(l)),d}_createItems(e){const n=this._active,i=this.chart.data,a=[],s=[],l=[];let d=[],f,p;for(f=0,p=n.length;f<p;++f)d.push(l8(this.chart,n[f]));return e.filter&&(d=d.filter((g,v,y)=>e.filter(g,v,y,i))),e.itemSort&&(d=d.sort((g,v)=>e.itemSort(g,v,i))),Pe(d,g=>{const v=x2(e.callbacks,g);a.push(yi(v,"labelColor",this,g)),s.push(yi(v,"labelPointStyle",this,g)),l.push(yi(v,"labelTextColor",this,g))}),this.labelColors=a,this.labelPointStyles=s,this.labelTextColors=l,this.dataPoints=d,d}update(e,n){const i=this.options.setContext(this.getContext()),a=this._active;let s,l=[];if(!a.length)this.opacity!==0&&(s={opacity:0});else{const d=Pu[i.position].call(this,a,this._eventPosition);l=this._createItems(i),this.title=this.getTitle(l,i),this.beforeBody=this.getBeforeBody(l,i),this.body=this.getBody(l,i),this.afterBody=this.getAfterBody(l,i),this.footer=this.getFooter(l,i);const f=this._size=g2(this,i),p=Object.assign({},d,f),g=v2(this.chart,i,p),v=b2(i,p,g,this.chart);this.xAlign=g.xAlign,this.yAlign=g.yAlign,s={opacity:1,x:v.x,y:v.y,width:f.width,height:f.height,caretX:d.x,caretY:d.y}}this._tooltipItems=l,this.$context=void 0,s&&this._resolveAnimations().update(this,s),e&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,i,a){const s=this.getCaretPosition(e,i,a);n.lineTo(s.x1,s.y1),n.lineTo(s.x2,s.y2),n.lineTo(s.x3,s.y3)}getCaretPosition(e,n,i){const{xAlign:a,yAlign:s}=this,{caretSize:l,cornerRadius:d}=i,{topLeft:f,topRight:p,bottomLeft:g,bottomRight:v}=zo(d),{x:y,y:_}=e,{width:w,height:C}=n;let A,k,z,j,P,H;return s==="center"?(P=_+C/2,a==="left"?(A=y,k=A-l,j=P+l,H=P-l):(A=y+w,k=A+l,j=P-l,H=P+l),z=A):(a==="left"?k=y+Math.max(f,g)+l:a==="right"?k=y+w-Math.max(p,v)-l:k=this.caretX,s==="top"?(j=_,P=j-l,A=k-l,z=k+l):(j=_+C,P=j+l,A=k+l,z=k-l),H=j),{x1:A,x2:k,x3:z,y1:j,y2:P,y3:H}}drawTitle(e,n,i){const a=this.title,s=a.length;let l,d,f;if(s){const p=Vl(i.rtl,this.x,this.width);for(e.x=xh(this,i.titleAlign,i),n.textAlign=p.textAlign(i.titleAlign),n.textBaseline="middle",l=On(i.titleFont),d=i.titleSpacing,n.fillStyle=i.titleColor,n.font=l.string,f=0;f<s;++f)n.fillText(a[f],p.x(e.x),e.y+l.lineHeight/2),e.y+=l.lineHeight+d,f+1===s&&(e.y+=i.titleMarginBottom-d)}}_drawColorBox(e,n,i,a,s){const l=this.labelColors[i],d=this.labelPointStyles[i],{boxHeight:f,boxWidth:p}=s,g=On(s.bodyFont),v=xh(this,"left",s),y=a.x(v),_=f<g.lineHeight?(g.lineHeight-f)/2:0,w=n.y+_;if(s.usePointStyle){const C={radius:Math.min(p,f)/2,pointStyle:d.pointStyle,rotation:d.rotation,borderWidth:1},A=a.leftForLtr(y,p)+p/2,k=w+f/2;e.strokeStyle=s.multiKeyBackground,e.fillStyle=s.multiKeyBackground,Sb(e,C,A,k),e.strokeStyle=l.borderColor,e.fillStyle=l.backgroundColor,Sb(e,C,A,k)}else{e.lineWidth=pe(l.borderWidth)?Math.max(...Object.values(l.borderWidth)):l.borderWidth||1,e.strokeStyle=l.borderColor,e.setLineDash(l.borderDash||[]),e.lineDashOffset=l.borderDashOffset||0;const C=a.leftForLtr(y,p),A=a.leftForLtr(a.xPlus(y,1),p-2),k=zo(l.borderRadius);Object.values(k).some(z=>z!==0)?(e.beginPath(),e.fillStyle=s.multiKeyBackground,ld(e,{x:C,y:w,w:p,h:f,radius:k}),e.fill(),e.stroke(),e.fillStyle=l.backgroundColor,e.beginPath(),ld(e,{x:A,y:w+1,w:p-2,h:f-2,radius:k}),e.fill()):(e.fillStyle=s.multiKeyBackground,e.fillRect(C,w,p,f),e.strokeRect(C,w,p,f),e.fillStyle=l.backgroundColor,e.fillRect(A,w+1,p-2,f-2))}e.fillStyle=this.labelTextColors[i]}drawBody(e,n,i){const{body:a}=this,{bodySpacing:s,bodyAlign:l,displayColors:d,boxHeight:f,boxWidth:p,boxPadding:g}=i,v=On(i.bodyFont);let y=v.lineHeight,_=0;const w=Vl(i.rtl,this.x,this.width),C=function(Z){n.fillText(Z,w.x(e.x+_),e.y+y/2),e.y+=y+s},A=w.textAlign(l);let k,z,j,P,H,V,U;for(n.textAlign=l,n.textBaseline="middle",n.font=v.string,e.x=xh(this,A,i),n.fillStyle=i.bodyColor,Pe(this.beforeBody,C),_=d&&A!=="right"?l==="center"?p/2+g:p+2+g:0,P=0,V=a.length;P<V;++P){for(k=a[P],z=this.labelTextColors[P],n.fillStyle=z,Pe(k.before,C),j=k.lines,d&&j.length&&(this._drawColorBox(n,e,P,w,i),y=Math.max(v.lineHeight,f)),H=0,U=j.length;H<U;++H)C(j[H]),y=v.lineHeight;Pe(k.after,C)}_=0,y=v.lineHeight,Pe(this.afterBody,C),e.y-=s}drawFooter(e,n,i){const a=this.footer,s=a.length;let l,d;if(s){const f=Vl(i.rtl,this.x,this.width);for(e.x=xh(this,i.footerAlign,i),e.y+=i.footerMarginTop,n.textAlign=f.textAlign(i.footerAlign),n.textBaseline="middle",l=On(i.footerFont),n.fillStyle=i.footerColor,n.font=l.string,d=0;d<s;++d)n.fillText(a[d],f.x(e.x),e.y+l.lineHeight/2),e.y+=l.lineHeight+i.footerSpacing}}drawBackground(e,n,i,a){const{xAlign:s,yAlign:l}=this,{x:d,y:f}=e,{width:p,height:g}=i,{topLeft:v,topRight:y,bottomLeft:_,bottomRight:w}=zo(a.cornerRadius);n.fillStyle=a.backgroundColor,n.strokeStyle=a.borderColor,n.lineWidth=a.borderWidth,n.beginPath(),n.moveTo(d+v,f),l==="top"&&this.drawCaret(e,n,i,a),n.lineTo(d+p-y,f),n.quadraticCurveTo(d+p,f,d+p,f+y),l==="center"&&s==="right"&&this.drawCaret(e,n,i,a),n.lineTo(d+p,f+g-w),n.quadraticCurveTo(d+p,f+g,d+p-w,f+g),l==="bottom"&&this.drawCaret(e,n,i,a),n.lineTo(d+_,f+g),n.quadraticCurveTo(d,f+g,d,f+g-_),l==="center"&&s==="left"&&this.drawCaret(e,n,i,a),n.lineTo(d,f+v),n.quadraticCurveTo(d,f,d+v,f),n.closePath(),n.fill(),a.borderWidth>0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,i=this.$animations,a=i&&i.x,s=i&&i.y;if(a||s){const l=Pu[e.position].call(this,this._active,this._eventPosition);if(!l)return;const d=this._size=g2(this,e),f=Object.assign({},l,this._size),p=v2(n,e,f),g=b2(e,f,p,n);(a._to!==g.x||s._to!==g.y)&&(this.xAlign=p.xAlign,this.yAlign=p.yAlign,this.width=d.width,this.height=d.height,this.caretX=l.x,this.caretY=l.y,this._resolveAnimations().update(this,g))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(n);const a={width:this.width,height:this.height},s={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const l=ti(n.padding),d=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&d&&(e.save(),e.globalAlpha=i,this.drawBackground(s,e,a,n),iA(e,n.textDirection),s.y+=l.top,this.drawTitle(s,e,n),this.drawBody(s,e,n),this.drawFooter(s,e,n),aA(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const i=this._active,a=e.map(({datasetIndex:d,index:f})=>{const p=this.chart.getDatasetMeta(d);if(!p)throw new Error("Cannot find a dataset at index "+d);return{datasetIndex:d,element:p.data[f],index:f}}),s=!lp(i,a),l=this._positionChanged(a,n);(s||l)&&(this._active=a,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,i=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const a=this.options,s=this._active||[],l=this._getActiveElements(e,s,n,i),d=this._positionChanged(l,e),f=n||!lp(l,s)||d;return f&&(this._active=l,(a.enabled||a.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),f}_getActiveElements(e,n,i,a){const s=this.options;if(e.type==="mouseout")return[];if(!a)return n.filter(d=>this.chart.data.datasets[d.datasetIndex]&&this.chart.getDatasetMeta(d.datasetIndex).controller.getParsed(d.index)!==void 0);const l=this.chart.getElementsAtEventForMode(e,s.mode,s,i);return s.reverse&&l.reverse(),l}_positionChanged(e,n){const{caretX:i,caretY:a,options:s}=this,l=Pu[s.position].call(this,e,n);return l!==!1&&(i!==l.x||a!==l.y)}}Lt(Mb,"positioners",Pu);var m8={id:"tooltip",_element:Mb,positioners:Pu,afterInit(t,e,n){n&&(t.tooltip=new Mb({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.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:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.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:OA},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},g8=Object.freeze({__proto__:null,Colors:D4,Decimation:L4,Filler:Q4,Legend:a8,SubTitle:o8,Title:s8,Tooltip:m8});const v8=(t,e,n,i)=>(typeof e=="string"?(n=t.push(e)-1,i.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function b8(t,e,n,i){const a=t.indexOf(e);if(a===-1)return v8(t,e,n,i);const s=t.lastIndexOf(e);return a!==s?n:a}const y8=(t,e)=>t===null?null:Nn(Math.round(t),0,e);function _2(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class Ob extends Fo{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const n=this._addedLabels;if(n.length){const i=this.getLabels();for(const{index:a,label:s}of n)i[a]===s&&i.splice(a,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(ue(e))return null;const i=this.getLabels();return n=isFinite(n)&&i[n]===e?n:b8(i,e,Jt(n,e),this._addedLabels),y8(n,i.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:i,max:a}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(i=0),n||(a=this.getLabels().length-1)),this.min=i,this.max=a}buildTicks(){const e=this.min,n=this.max,i=this.options.offset,a=[];let s=this.getLabels();s=e===0&&n===s.length-1?s:s.slice(e,n+1),this._valueRange=Math.max(s.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let l=e;l<=n;l++)a.push({value:l});return a}getLabelForValue(e){return _2.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}Lt(Ob,"id","category"),Lt(Ob,"defaults",{ticks:{callback:_2}});function x8(t,e){const n=[],{bounds:a,step:s,min:l,max:d,precision:f,count:p,maxTicks:g,maxDigits:v,includeBounds:y}=t,_=s||1,w=g-1,{min:C,max:A}=e,k=!ue(l),z=!ue(d),j=!ue(p),P=(A-C)/(v+1);let H=gS((A-C)/w/_)*_,V,U,Z,Q;if(H<1e-14&&!k&&!z)return[{value:C},{value:A}];Q=Math.ceil(A/H)-Math.floor(C/H),Q>w&&(H=gS(Q*H/w/_)*_),ue(f)||(V=Math.pow(10,f),H=Math.ceil(H*V)/V),a==="ticks"?(U=Math.floor(C/H)*H,Z=Math.ceil(A/H)*H):(U=C,Z=A),k&&z&&s&&fP((d-l)/s,H/1e3)?(Q=Math.round(Math.min((d-l)/H,g)),H=(d-l)/Q,U=l,Z=d):j?(U=k?l:U,Z=z?d:Z,Q=p-1,H=(Z-U)/Q):(Q=(Z-U)/H,Vu(Q,Math.round(Q),H/1e3)?Q=Math.round(Q):Q=Math.ceil(Q));const et=Math.max(vS(H),vS(U));V=Math.pow(10,ue(f)?et:f),U=Math.round(U*V)/V,Z=Math.round(Z*V)/V;let X=0;for(k&&(y&&U!==l?(n.push({value:l}),U<l&&X++,Vu(Math.round((U+X*H)*V)/V,l,S2(l,P,t))&&X++):U<l&&X++);X<Q;++X){const R=Math.round((U+X*H)*V)/V;if(z&&R>d)break;n.push({value:R})}return z&&y&&Z!==d?n.length&&Vu(n[n.length-1].value,d,S2(d,P,t))?n[n.length-1].value=d:n.push({value:d}):(!z||Z===d)&&n.push({value:Z}),n}function S2(t,e,{horizontal:n,minRotation:i}){const a=va(i),s=(n?Math.sin(a):Math.cos(a))||.001,l=.75*e*(""+t).length;return Math.min(e/s,l)}class mp extends Fo{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return ue(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:i}=this.getUserBounds();let{min:a,max:s}=this;const l=f=>a=n?a:f,d=f=>s=i?s:f;if(e){const f=Wa(a),p=Wa(s);f<0&&p<0?d(0):f>0&&p>0&&l(0)}if(a===s){let f=s===0?1:Math.abs(s*.05);d(s+f),e||l(a-f)}this.min=a,this.max=s}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:i}=e,a;return i?(a=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,a>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${a} ticks. Limiting to 1000.`),a=1e3)):(a=this.computeTickLimit(),n=n||11),n&&(a=Math.min(n,a)),a}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,n=e.ticks;let i=this.getTickLimit();i=Math.max(2,i);const a={maxTicks:i,bounds:e.bounds,min:e.min,max:e.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,l=x8(a,s);return e.bounds==="ticks"&&FE(l,this,"value"),e.reverse?(l.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),l}configure(){const e=this.ticks;let n=this.min,i=this.max;if(super.configure(),this.options.offset&&e.length){const a=(i-n)/Math.max(e.length-1,1)/2;n-=a,i+=a}this._startValue=n,this._endValue=i,this._valueRange=i-n}getLabelForValue(e){return Dd(e,this.chart.options.locale,this.options.ticks.format)}}class kb extends mp{determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=un(e)?e:0,this.max=un(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,i=va(this.options.ticks.minRotation),a=(e?Math.sin(i):Math.cos(i))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,s.lineHeight/a))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}Lt(kb,"id","linear"),Lt(kb,"defaults",{ticks:{callback:Vp.formatters.numeric}});const ud=t=>Math.floor(xs(t)),wo=(t,e)=>Math.pow(10,ud(t)+e);function w2(t){return t/Math.pow(10,ud(t))===1}function C2(t,e,n){const i=Math.pow(10,n),a=Math.floor(t/i);return Math.ceil(e/i)-a}function _8(t,e){const n=e-t;let i=ud(n);for(;C2(t,e,i)>10;)i++;for(;C2(t,e,i)<10;)i--;return Math.min(i,ud(t))}function S8(t,{min:e,max:n}){e=zi(t.min,e);const i=[],a=ud(e);let s=_8(e,n),l=s<0?Math.pow(10,Math.abs(s)):1;const d=Math.pow(10,s),f=a>s?Math.pow(10,a):0,p=Math.round((e-f)*l)/l,g=Math.floor((e-f)/d/10)*d*10;let v=Math.floor((p-g)/Math.pow(10,s)),y=zi(t.min,Math.round((f+g+v*Math.pow(10,s))*l)/l);for(;y<n;)i.push({value:y,major:w2(y),significand:v}),v>=10?v=v<15?15:20:v++,v>=20&&(s++,v=2,l=s>=0?1:l),y=Math.round((f+g+v*Math.pow(10,s))*l)/l;const _=zi(t.max,y);return i.push({value:_,major:w2(_),significand:v}),i}class Lb extends Fo{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,n){const i=mp.prototype.parse.apply(this,[e,n]);if(i===0){this._zero=!0;return}return un(i)&&i>0?i:null}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=un(e)?Math.max(0,e):null,this.max=un(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!un(this._userMin)&&(this.min=e===wo(this.min,0)?wo(this.min,-1):wo(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let i=this.min,a=this.max;const s=d=>i=e?i:d,l=d=>a=n?a:d;i===a&&(i<=0?(s(1),l(10)):(s(wo(i,-1)),l(wo(a,1)))),i<=0&&s(wo(a,-1)),a<=0&&l(wo(i,1)),this.min=i,this.max=a}buildTicks(){const e=this.options,n={min:this._userMin,max:this._userMax},i=S8(n,this);return e.bounds==="ticks"&&FE(i,this,"value"),e.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(e){return e===void 0?"0":Dd(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=xs(e),this._valueRange=xs(this.max)-xs(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(xs(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const n=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+n*this._valueRange)}}Lt(Lb,"id","logarithmic"),Lt(Lb,"defaults",{ticks:{callback:Vp.formatters.logarithmic,major:{enabled:!0}}});function zb(t){const e=t.ticks;if(e.display&&t.display){const n=ti(e.backdropPadding);return Jt(e.font&&e.font.size,Je.font.size)+n.height}return 0}function w8(t,e,n){return n=Qe(n)?n:[n],{w:MP(t,e.string,n),h:n.length*e.lineHeight}}function E2(t,e,n,i,a){return t===i||t===a?{start:e-n/2,end:e+n/2}:t<i||t>a?{start:e-n,end:e}:{start:e,end:e+n}}function C8(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},n=Object.assign({},e),i=[],a=[],s=t._pointLabels.length,l=t.options.pointLabels,d=l.centerPointLabels?Ce/s:0;for(let f=0;f<s;f++){const p=l.setContext(t.getPointLabelContext(f));a[f]=p.padding;const g=t.getPointPosition(f,t.drawingArea+a[f],d),v=On(p.font),y=w8(t.ctx,v,t._pointLabels[f]);i[f]=y;const _=Qn(t.getIndexAngle(f)+d),w=Math.round(Ly(_)),C=E2(w,g.x,y.w,0,180),A=E2(w,g.y,y.h,90,270);E8(n,e,_,C,A)}t.setCenterPoint(e.l-n.l,n.r-e.r,e.t-n.t,n.b-e.b),t._pointLabelItems=D8(t,i,a)}function E8(t,e,n,i,a){const s=Math.abs(Math.sin(n)),l=Math.abs(Math.cos(n));let d=0,f=0;i.start<e.l?(d=(e.l-i.start)/s,t.l=Math.min(t.l,e.l-d)):i.end>e.r&&(d=(i.end-e.r)/s,t.r=Math.max(t.r,e.r+d)),a.start<e.t?(f=(e.t-a.start)/l,t.t=Math.min(t.t,e.t-f)):a.end>e.b&&(f=(a.end-e.b)/l,t.b=Math.max(t.b,e.b+f))}function A8(t,e,n){const i=t.drawingArea,{extra:a,additionalAngle:s,padding:l,size:d}=n,f=t.getPointPosition(e,i+a+l,s),p=Math.round(Ly(Qn(f.angle+hn))),g=k8(f.y,d.h,p),v=M8(p),y=O8(f.x,d.w,v);return{visible:!0,x:f.x,y:g,textAlign:v,left:y,top:g,right:y+d.w,bottom:g+d.h}}function T8(t,e){if(!e)return!0;const{left:n,top:i,right:a,bottom:s}=t;return!(Or({x:n,y:i},e)||Or({x:n,y:s},e)||Or({x:a,y:i},e)||Or({x:a,y:s},e))}function D8(t,e,n){const i=[],a=t._pointLabels.length,s=t.options,{centerPointLabels:l,display:d}=s.pointLabels,f={extra:zb(s)/2,additionalAngle:l?Ce/a:0};let p;for(let g=0;g<a;g++){f.padding=n[g],f.size=e[g];const v=A8(t,g,f);i.push(v),d==="auto"&&(v.visible=T8(v,p),v.visible&&(p=v))}return i}function M8(t){return t===0||t===180?"center":t<180?"left":"right"}function O8(t,e,n){return n==="right"?t-=e:n==="center"&&(t-=e/2),t}function k8(t,e,n){return n===90||n===270?t-=e/2:(n>270||n<90)&&(t-=e),t}function L8(t,e,n){const{left:i,top:a,right:s,bottom:l}=n,{backdropColor:d}=e;if(!ue(d)){const f=zo(e.borderRadius),p=ti(e.backdropPadding);t.fillStyle=d;const g=i-p.left,v=a-p.top,y=s-i+p.width,_=l-a+p.height;Object.values(f).some(w=>w!==0)?(t.beginPath(),ld(t,{x:g,y:v,w:y,h:_,radius:f}),t.fill()):t.fillRect(g,v,y,_)}}function z8(t,e){const{ctx:n,options:{pointLabels:i}}=t;for(let a=e-1;a>=0;a--){const s=t._pointLabelItems[a];if(!s.visible)continue;const l=i.setContext(t.getPointLabelContext(a));L8(n,l,s);const d=On(l.font),{x:f,y:p,textAlign:g}=s;Bo(n,t._pointLabels[a],f,p+d.lineHeight/2,d,{color:l.color,textAlign:g,textBaseline:"middle"})}}function kA(t,e,n,i){const{ctx:a}=t;if(n)a.arc(t.xCenter,t.yCenter,e,0,qe);else{let s=t.getPointPosition(0,e);a.moveTo(s.x,s.y);for(let l=1;l<i;l++)s=t.getPointPosition(l,e),a.lineTo(s.x,s.y)}}function R8(t,e,n,i,a){const s=t.ctx,l=e.circular,{color:d,lineWidth:f}=e;!l&&!i||!d||!f||n<0||(s.save(),s.strokeStyle=d,s.lineWidth=f,s.setLineDash(a.dash||[]),s.lineDashOffset=a.dashOffset,s.beginPath(),kA(t,n,l,i),s.closePath(),s.stroke(),s.restore())}function P8(t,e,n){return zs(t,{label:n,index:e,type:"pointLabel"})}class Nu extends mp{constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const e=this._padding=ti(zb(this.options)/2),n=this.width=this.maxWidth-e.width,i=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+n/2+e.left),this.yCenter=Math.floor(this.top+i/2+e.top),this.drawingArea=Math.floor(Math.min(n,i)/2)}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!1);this.min=un(e)&&!isNaN(e)?e:0,this.max=un(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/zb(this.options))}generateTickLabels(e){mp.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((n,i)=>{const a=$e(this.options.pointLabels.callback,[n,i],this);return a||a===0?a:""}).filter((n,i)=>this.chart.getDataVisibility(i))}fit(){const e=this.options;e.display&&e.pointLabels.display?C8(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,n,i,a){this.xCenter+=Math.floor((e-n)/2),this.yCenter+=Math.floor((i-a)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,n,i,a))}getIndexAngle(e){const n=qe/(this._pointLabels.length||1),i=this.options.startAngle||0;return Qn(e*n+va(i))}getDistanceFromCenterForValue(e){if(ue(e))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*n:(e-this.min)*n}getValueForDistanceFromCenter(e){if(ue(e))return NaN;const n=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(e){const n=this._pointLabels||[];if(e>=0&&e<n.length){const i=n[e];return P8(this.getContext(),e,i)}}getPointPosition(e,n,i=0){const a=this.getIndexAngle(e)-hn+i;return{x:Math.cos(a)*n+this.xCenter,y:Math.sin(a)*n+this.yCenter,angle:a}}getPointPositionForValue(e,n){return this.getPointPosition(e,this.getDistanceFromCenterForValue(n))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){const{left:n,top:i,right:a,bottom:s}=this._pointLabelItems[e];return{left:n,top:i,right:a,bottom:s}}drawBackground(){const{backgroundColor:e,grid:{circular:n}}=this.options;if(e){const i=this.ctx;i.save(),i.beginPath(),kA(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),i.closePath(),i.fillStyle=e,i.fill(),i.restore()}}drawGrid(){const e=this.ctx,n=this.options,{angleLines:i,grid:a,border:s}=n,l=this._pointLabels.length;let d,f,p;if(n.pointLabels.display&&z8(this,l),a.display&&this.ticks.forEach((g,v)=>{if(v!==0||v===0&&this.min<0){f=this.getDistanceFromCenterForValue(g.value);const y=this.getContext(v),_=a.setContext(y),w=s.setContext(y);R8(this,_,f,l,w)}}),i.display){for(e.save(),d=l-1;d>=0;d--){const g=i.setContext(this.getPointLabelContext(d)),{color:v,lineWidth:y}=g;!y||!v||(e.lineWidth=y,e.strokeStyle=v,e.setLineDash(g.borderDash),e.lineDashOffset=g.borderDashOffset,f=this.getDistanceFromCenterForValue(n.reverse?this.min:this.max),p=this.getPointPosition(d,f),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(p.x,p.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,n=this.options,i=n.ticks;if(!i.display)return;const a=this.getIndexAngle(0);let s,l;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(a),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((d,f)=>{if(f===0&&this.min>=0&&!n.reverse)return;const p=i.setContext(this.getContext(f)),g=On(p.font);if(s=this.getDistanceFromCenterForValue(this.ticks[f].value),p.showLabelBackdrop){e.font=g.string,l=e.measureText(d.label).width,e.fillStyle=p.backdropColor;const v=ti(p.backdropPadding);e.fillRect(-l/2-v.left,-s-g.size/2-v.top,l+v.width,g.size+v.height)}Bo(e,d.label,0,-s,g,{color:p.color,strokeColor:p.textStrokeColor,strokeWidth:p.textStrokeWidth})}),e.restore()}drawTitle(){}}Lt(Nu,"id","radialLinear"),Lt(Nu,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Vp.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}}),Lt(Nu,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),Lt(Nu,"descriptors",{angleLines:{_fallback:"grid"}});const Xp={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}},_i=Object.keys(Xp);function A2(t,e){return t-e}function T2(t,e){if(ue(e))return null;const n=t._adapter,{parser:i,round:a,isoWeekday:s}=t._parseOpts;let l=e;return typeof i=="function"&&(l=i(l)),un(l)||(l=typeof i=="string"?n.parse(l,i):n.parse(l)),l===null?null:(a&&(l=a==="week"&&(Yl(s)||s===!0)?n.startOf(l,"isoWeek",s):n.startOf(l,a)),+l)}function D2(t,e,n,i){const a=_i.length;for(let s=_i.indexOf(t);s<a-1;++s){const l=Xp[_i[s]],d=l.steps?l.steps:Number.MAX_SAFE_INTEGER;if(l.common&&Math.ceil((n-e)/(d*l.size))<=i)return _i[s]}return _i[a-1]}function N8(t,e,n,i,a){for(let s=_i.length-1;s>=_i.indexOf(n);s--){const l=_i[s];if(Xp[l].common&&t._adapter.diff(a,i,l)>=e-1)return l}return _i[n?_i.indexOf(n):0]}function j8(t){for(let e=_i.indexOf(t)+1,n=_i.length;e<n;++e)if(Xp[_i[e]].common)return _i[e]}function M2(t,e,n){if(!n)t[e]=!0;else if(n.length){const{lo:i,hi:a}=zy(n,e),s=n[i]>=e?n[i]:n[a];t[s]=!0}}function B8(t,e,n,i){const a=t._adapter,s=+a.startOf(e[0].value,i),l=e[e.length-1].value;let d,f;for(d=s;d<=l;d=+a.add(d,1,i))f=n[d],f>=0&&(e[f].major=!0);return e}function O2(t,e,n){const i=[],a={},s=e.length;let l,d;for(l=0;l<s;++l)d=e[l],a[d]=l,i.push({value:d,major:!1});return s===0||!n?i:B8(t,i,a,n)}class dd extends Fo{constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,n={}){const i=e.time||(e.time={}),a=this._adapter=new WN._date(e.adapters.date);a.init(n),Uu(i.displayFormats,a.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(e),this._normalized=n.normalized}parse(e,n){return e===void 0?null:T2(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,n=this._adapter,i=e.time.unit||"day";let{min:a,max:s,minDefined:l,maxDefined:d}=this.getUserBounds();function f(p){!l&&!isNaN(p.min)&&(a=Math.min(a,p.min)),!d&&!isNaN(p.max)&&(s=Math.max(s,p.max))}(!l||!d)&&(f(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&f(this.getMinMax(!1))),a=un(a)&&!isNaN(a)?a:+n.startOf(Date.now(),i),s=un(s)&&!isNaN(s)?s:+n.endOf(Date.now(),i)+1,this.min=Math.min(a,s-1),this.max=Math.max(a+1,s)}_getLabelBounds(){const e=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],i=e[e.length-1]),{min:n,max:i}}buildTicks(){const e=this.options,n=e.time,i=e.ticks,a=i.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&a.length&&(this.min=this._userMin||a[0],this.max=this._userMax||a[a.length-1]);const s=this.min,l=this.max,d=gP(a,s,l);return this._unit=n.unit||(i.autoSkip?D2(n.minUnit,this.min,this.max,this._getLabelCapacity(s)):N8(this,d.length,n.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:j8(this._unit),this.initOffsets(a),e.reverse&&d.reverse(),O2(this,d,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let n=0,i=0,a,s;this.options.offset&&e.length&&(a=this.getDecimalForValue(e[0]),e.length===1?n=1-a:n=(this.getDecimalForValue(e[1])-a)/2,s=this.getDecimalForValue(e[e.length-1]),e.length===1?i=s:i=(s-this.getDecimalForValue(e[e.length-2]))/2);const l=e.length<3?.5:.25;n=Nn(n,0,l),i=Nn(i,0,l),this._offsets={start:n,end:i,factor:1/(n+1+i)}}_generate(){const e=this._adapter,n=this.min,i=this.max,a=this.options,s=a.time,l=s.unit||D2(s.minUnit,n,i,this._getLabelCapacity(n)),d=Jt(a.ticks.stepSize,1),f=l==="week"?s.isoWeekday:!1,p=Yl(f)||f===!0,g={};let v=n,y,_;if(p&&(v=+e.startOf(v,"isoWeek",f)),v=+e.startOf(v,p?"day":l),e.diff(i,n,l)>1e5*d)throw new Error(n+" and "+i+" are too far apart with stepSize of "+d+" "+l);const w=a.ticks.source==="data"&&this.getDataTimestamps();for(y=v,_=0;y<i;y=+e.add(y,d,l),_++)M2(g,y,w);return(y===i||a.bounds==="ticks"||_===1)&&M2(g,y,w),Object.keys(g).sort(A2).map(C=>+C)}getLabelForValue(e){const n=this._adapter,i=this.options.time;return i.tooltipFormat?n.format(e,i.tooltipFormat):n.format(e,i.displayFormats.datetime)}format(e,n){const a=this.options.time.displayFormats,s=this._unit,l=n||a[s];return this._adapter.format(e,l)}_tickFormatFunction(e,n,i,a){const s=this.options,l=s.ticks.callback;if(l)return $e(l,[e,n,i],this);const d=s.time.displayFormats,f=this._unit,p=this._majorUnit,g=f&&d[f],v=p&&d[p],y=i[n],_=p&&v&&y&&y.major;return this._adapter.format(e,a||(_?v:g))}generateTickLabels(e){let n,i,a;for(n=0,i=e.length;n<i;++n)a=e[n],a.label=this._tickFormatFunction(a.value,n,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const n=this._offsets,i=this.getDecimalForValue(e);return this.getPixelForDecimal((n.start+i)*n.factor)}getValueForPixel(e){const n=this._offsets,i=this.getDecimalForPixel(e)/n.factor-n.end;return this.min+i*(this.max-this.min)}_getLabelSize(e){const n=this.options.ticks,i=this.ctx.measureText(e).width,a=va(this.isHorizontal()?n.maxRotation:n.minRotation),s=Math.cos(a),l=Math.sin(a),d=this._resolveTickFontOptions(0).size;return{w:i*s+d*l,h:i*l+d*s}}_getLabelCapacity(e){const n=this.options.time,i=n.displayFormats,a=i[n.unit]||i.millisecond,s=this._tickFormatFunction(e,0,O2(this,[e],this._majorUnit),a),l=this._getLabelSize(s),d=Math.floor(this.isHorizontal()?this.width/l.w:this.height/l.h)-1;return d>0?d:1}getDataTimestamps(){let e=this._cache.data||[],n,i;if(e.length)return e;const a=this.getMatchingVisibleMetas();if(this._normalized&&a.length)return this._cache.data=a[0].controller.getAllParsedValues(this);for(n=0,i=a.length;n<i;++n)e=e.concat(a[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let n,i;if(e.length)return e;const a=this.getLabels();for(n=0,i=a.length;n<i;++n)e.push(T2(this,a[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return VE(e.sort(A2))}}Lt(dd,"id","time"),Lt(dd,"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 _h(t,e,n){let i=0,a=t.length-1,s,l,d,f;n?(e>=t[i].pos&&e<=t[a].pos&&({lo:i,hi:a}=Mr(t,"pos",e)),{pos:s,time:d}=t[i],{pos:l,time:f}=t[a]):(e>=t[i].time&&e<=t[a].time&&({lo:i,hi:a}=Mr(t,"time",e)),{time:s,pos:d}=t[i],{time:l,pos:f}=t[a]);const p=l-s;return p?d+(f-d)*(e-s)/p:d}class Rb extends dd{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=_h(n,this.min),this._tableRange=_h(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:i}=this,a=[],s=[];let l,d,f,p,g;for(l=0,d=e.length;l<d;++l)p=e[l],p>=n&&p<=i&&a.push(p);if(a.length<2)return[{time:n,pos:0},{time:i,pos:1}];for(l=0,d=a.length;l<d;++l)g=a[l+1],f=a[l-1],p=a[l],Math.round((g+f)/2)!==p&&s.push({time:p,pos:l/(d-1)});return s}_generate(){const e=this.min,n=this.max;let i=super.getDataTimestamps();return(!i.includes(e)||!i.length)&&i.splice(0,0,e),(!i.includes(n)||i.length===1)&&i.push(n),i.sort((a,s)=>a-s)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),i=this.getLabelTimestamps();return n.length&&i.length?e=this.normalize(n.concat(i)):e=n.length?n:i,e=this._cache.all=e,e}getDecimalForValue(e){return(_h(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,i=this.getDecimalForPixel(e)/n.factor-n.end;return _h(this._table,i*this._tableRange+this._minPos,!0)}}Lt(Rb,"id","timeseries"),Lt(Rb,"defaults",dd.defaults);var I8=Object.freeze({__proto__:null,CategoryScale:Ob,LinearScale:kb,LogarithmicScale:Lb,RadialLinearScale:Nu,TimeScale:dd,TimeSeriesScale:Rb});const F8=[GN,_4,g8,I8],LA="label";function k2(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function H8(t,e){const n=t.options;n&&e&&Object.assign(n,e)}function zA(t,e){t.labels=e}function RA(t,e,n=LA){const i=[];t.datasets=e.map(a=>{const s=t.datasets.find(l=>l[n]===a[n]);return!s||!a.data||i.includes(s)?{...a}:(i.push(s),Object.assign(s,a),s)})}function U8(t,e=LA){const n={labels:[],datasets:[]};return zA(n,t.labels),RA(n,t.datasets,e),n}function V8(t,e){const{height:n=150,width:i=300,redraw:a=!1,datasetIdKey:s,type:l,data:d,options:f,plugins:p=[],fallbackContent:g,updateMode:v,...y}=t,_=O.useRef(null),w=O.useRef(null),C=()=>{_.current&&(w.current=new qp(_.current,{type:l,data:U8(d,s),options:f&&{...f},plugins:p}),k2(e,w.current))},A=()=>{k2(e,null),w.current&&(w.current.destroy(),w.current=null)};return O.useEffect(()=>{!a&&w.current&&f&&H8(w.current,f)},[a,f]),O.useEffect(()=>{!a&&w.current&&zA(w.current.config.data,d.labels)},[a,d.labels]),O.useEffect(()=>{!a&&w.current&&d.datasets&&RA(w.current.config.data,d.datasets,s)},[a,d.datasets]),O.useEffect(()=>{w.current&&(a?(A(),setTimeout(C)):w.current.update(v))},[a,f,d.labels,d.datasets,v]),O.useEffect(()=>{w.current&&(A(),setTimeout(C))},[l]),O.useEffect(()=>(C(),()=>A()),[]),T.jsx("canvas",{ref:_,role:"img",height:n,width:i,...y,children:g})}const $8=O.forwardRef(V8);function G8(t,e){return qp.register(e),O.forwardRef((n,i)=>T.jsx($8,{...n,ref:i,type:t}))}const W8=G8("line",Wu);qp.register(...F8);function Z8({points:t}){const{t:e}=Gn();if(t.length===0)return null;const n={labels:t.map((a,s)=>s+1),datasets:[{label:e("flights.planner.altitude"),data:t.map(a=>a.altitude),borderColor:"#228be6",backgroundColor:"rgba(34,139,230,0.2)",pointBackgroundColor:"#fd7e14",pointBorderColor:"#1e1e1e",pointBorderWidth:1,tension:.1}]},i={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1}},scales:{x:{ticks:{font:{size:10},color:"#6c757d"},grid:{color:"#495057"}},y:{ticks:{font:{size:10},color:"#6c757d"},grid:{color:"#495057"}}}};return T.jsx("div",{className:"h-16",children:T.jsx(W8,{data:n,options:i})})}function q8({wind:t,onChange:e}){const{t:n}=Gn();return T.jsxs("div",{className:"flex gap-2",children:[T.jsxs("div",{className:"flex-1",children:[T.jsx("label",{className:"text-az-muted block mb-0.5 text-[9px]",children:n("flights.planner.windDirection")}),T.jsx("input",{type:"number",min:0,max:360,value:t.direction,onChange:i=>e({...t,direction:Number(i.target.value)}),className:"w-full bg-az-bg border border-az-border rounded px-2 py-1 text-xs text-az-text outline-none focus:border-az-orange"})]}),T.jsxs("div",{className:"flex-1",children:[T.jsx("label",{className:"text-az-muted block mb-0.5 text-[9px]",children:n("flights.planner.windSpeed")}),T.jsx("input",{type:"number",min:0,value:t.speed,onChange:i=>e({...t,speed:Number(i.target.value)}),className:"w-full bg-az-bg border border-az-border rounded px-2 py-1 text-xs text-az-text outline-none focus:border-az-orange"})]})]})}function Y8({points:t,calculatedPointInfo:e,aircrafts:n,initialAltitude:i,actionMode:a,wind:s,locationInput:l,currentPosition:d,totalDistance:f,totalTime:p,batteryStatus:g,onInitialAltitudeChange:v,onActionModeChange:y,onWindChange:_,onLocationInputChange:w,onLocationSearch:C,onReorderPoints:A,onEditPoint:k,onRemovePoint:z,onSave:j,onUpload:P,onEditJson:H,onExport:V}){const{t:U}=Gn(),Z=(Q,et,X)=>{const R=a===Q,dt={orange:{border:"border-az-orange",text:"text-az-orange",bg:"bg-az-orange/20",hover:"hover:bg-az-orange/10"},green:{border:"border-az-green",text:"text-az-green",bg:"bg-az-green/20",hover:"hover:bg-az-green/10"},red:{border:"border-az-red",text:"text-az-red",bg:"bg-az-red/20",hover:"hover:bg-az-red/10"}}[X];return T.jsx("button",{onClick:()=>y(Q),className:`flex-1 px-2.5 py-1 rounded border text-[11px] ${dt.border} ${dt.text} ${R?dt.bg:dt.hover}`,children:et})};return T.jsxs("div",{className:"p-2 space-y-2 text-xs overflow-y-auto flex-1",children:[T.jsxs("div",{className:"flex gap-1",children:[Z("points",U("flights.planner.addPoints"),"orange"),Z("workArea",U("flights.planner.workArea"),"green"),Z("prohibitedArea",U("flights.planner.prohibitedArea"),"red")]}),T.jsxs("div",{children:[T.jsx("label",{className:"text-az-muted block mb-0.5 text-[9px]",children:U("flights.planner.location")}),T.jsx("input",{value:l,onChange:Q=>w(Q.target.value),onKeyDown:Q=>Q.key==="Enter"&&C(),placeholder:"47.242, 35.024",className:"w-full bg-az-bg border border-az-border rounded px-2 py-1 text-az-text outline-none focus:border-az-orange"}),T.jsxs("div",{className:"text-az-muted text-[9px] mt-0.5",children:[U("flights.planner.currentLocation"),": ",d.lat.toFixed(6),", ",d.lng.toFixed(6)]})]}),T.jsxs("div",{children:[T.jsx("label",{className:"text-az-muted block mb-0.5 text-[9px]",children:U("flights.aircraft")}),T.jsx("select",{className:"w-full bg-az-bg border border-az-border rounded px-2 py-1 text-az-text",children:n.map(Q=>T.jsx("option",{value:Q.id,children:Q.model},Q.id))})]}),T.jsxs("div",{children:[T.jsx("label",{className:"text-az-muted block mb-0.5 text-[9px]",children:U("flights.planner.initialAltitude")}),T.jsx("input",{type:"number",value:i,onChange:Q=>v(Number(Q.target.value)),className:"w-full bg-az-bg border border-az-border rounded px-2 py-1 text-az-text outline-none focus:border-az-orange"})]}),T.jsxs("div",{children:[T.jsx("label",{className:"text-az-muted block mb-0.5 text-[9px]",children:U("flights.planner.cameraFov")}),T.jsx("input",{type:"text",placeholder:U("flights.planner.cameraFovPlaceholder"),className:"w-full bg-az-bg border border-az-border rounded px-2 py-1 text-az-text outline-none focus:border-az-orange"})]}),T.jsxs("div",{children:[T.jsx("label",{className:"text-az-muted block mb-0.5 text-[9px]",children:U("flights.planner.commAddr")}),T.jsx("input",{type:"text",placeholder:U("flights.planner.commAddrPlaceholder"),className:"w-full bg-az-bg border border-az-border rounded px-2 py-1 text-az-text outline-none focus:border-az-orange"})]}),T.jsxs("div",{children:[T.jsx("label",{className:"text-az-muted block mb-1 text-[9px]",children:U("flights.waypoints")}),T.jsx(L5,{points:t,calculatedPointInfo:e,onReorder:A,onEdit:k,onRemove:z})]}),t.length>1&&T.jsxs("div",{className:"bg-az-header rounded px-2 py-1 flex gap-2 text-[10px]",children:[T.jsx("span",{children:f}),T.jsx("span",{children:p}),T.jsx("span",{style:{color:g.color},children:g.label})]}),T.jsx(Z8,{points:t}),T.jsx(q8,{wind:s,onChange:_}),T.jsxs("div",{className:"flex gap-1",children:[T.jsx("button",{onClick:j,className:"flex-1 px-2.5 py-1 rounded border border-az-green text-az-green text-[11px] hover:bg-az-green/10",children:U("flights.planner.save")}),T.jsx("button",{onClick:P,className:"flex-1 px-2.5 py-1 rounded border border-az-blue text-az-blue text-[11px] hover:bg-az-blue/10",children:U("flights.planner.upload")})]}),T.jsxs("div",{className:"flex gap-1",children:[T.jsx("button",{onClick:H,className:"flex-1 px-2.5 py-1 rounded border border-az-muted text-az-text text-[11px] hover:border-az-text hover:text-white",children:U("flights.planner.editAsJson")}),T.jsx("button",{onClick:V,className:"flex-1 px-2.5 py-1 rounded border border-az-muted text-az-text text-[11px] hover:border-az-text hover:text-white",children:U("flights.planner.exportMapData")})]})]})}function PA(t,e){const n=O.useRef(e);O.useEffect(function(){e!==n.current&&t.attributionControl!=null&&(n.current!=null&&t.attributionControl.removeAttribution(n.current),e!=null&&t.attributionControl.addAttribution(e)),n.current=e},[t,e])}function X8(t,e,n){e.center!==n.center&&t.setLatLng(e.center),e.radius!=null&&e.radius!==n.radius&&t.setRadius(e.radius)}const K8=1;function Q8(t){return Object.freeze({__version:K8,map:t})}function Kp(t,e){return Object.freeze({...t,...e})}const $y=O.createContext(null);function Qp(){const t=O.use($y);if(t==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>");return t}function NA(t){function e(n,i){const{instance:a,context:s}=t(n).current;O.useImperativeHandle(i,()=>a);const{children:l}=n;return l==null?null:be.createElement($y,{value:s},l)}return O.forwardRef(e)}function J8(t){function e(n,i){const[a,s]=O.useState(!1),{instance:l}=t(n,s).current;O.useImperativeHandle(i,()=>l),O.useEffect(function(){a&&l.update()},[l,a,n.children]);const d=l._contentNode;return d?Rp.createPortal(n.children,d):null}return O.forwardRef(e)}function tj(t){function e(n,i){const{instance:a}=t(n).current;return O.useImperativeHandle(i,()=>a),null}return O.forwardRef(e)}function Gy(t,e){const n=O.useRef(void 0);O.useEffect(function(){return e!=null&&t.instance.on(e),n.current=e,function(){n.current!=null&&t.instance.off(n.current),n.current=null}},[t,e])}function Jp(t,e){const n=t.pane??e.pane;return n?{...t,pane:n}:t}function ej(t,e){return function(i,a){const s=Qp(),l=t(Jp(i,s),s);return PA(s.map,i.attribution),Gy(l.current,i.eventHandlers),e(l.current,s,i,a),l}}function oc(t,e,n){return Object.freeze({instance:t,context:e,container:n})}function tm(t,e){return e==null?function(i,a){const s=O.useRef(void 0);return s.current||(s.current=t(i,a)),s}:function(i,a){const s=O.useRef(void 0);s.current||(s.current=t(i,a));const l=O.useRef(i),{instance:d}=s.current;return O.useEffect(function(){l.current!==i&&(e(d,i,l.current),l.current=i)},[d,i,e]),s}}function jA(t,e){O.useEffect(function(){return(e.layerContainer??e.map).addLayer(t.instance),function(){var s;(s=e.layerContainer)==null||s.removeLayer(t.instance),e.map.removeLayer(t.instance)}},[e,t])}function BA(t){return function(n){const i=Qp(),a=t(Jp(n,i),i);return PA(i.map,n.attribution),Gy(a.current,n.eventHandlers),jA(a.current,i),a}}function nj(t,e){const n=O.useRef(void 0);O.useEffect(function(){if(e.pathOptions!==n.current){const a=e.pathOptions??{};t.instance.setStyle(a),n.current=a}},[t,e])}function ij(t){return function(n){const i=Qp(),a=t(Jp(n,i),i);return Gy(a.current,n.eventHandlers),jA(a.current,i),nj(a.current,n),a}}function aj(t,e){const n=tm(t,e),i=BA(n);return NA(i)}function rj(t,e){const n=tm(t),i=ej(n,e);return J8(i)}function Wy(t,e){const n=tm(t,e),i=ij(n);return NA(i)}function sj(t,e){const n=tm(t,e),i=BA(n);return tj(i)}function oj(t,e,n){const{opacity:i,zIndex:a}=e;i!=null&&i!==n.opacity&&t.setOpacity(i),a!=null&&a!==n.zIndex&&t.setZIndex(a)}function Md(){return Qp().map}function lj(t){const e=Md();return O.useEffect(function(){return e.on(t),function(){e.off(t)}},[e,t]),e}const cj=Wy(function({center:e,children:n,...i},a){const s=new Ls.CircleMarker(e,i);return oc(s,Kp(a,{overlayContainer:s}))},X8);function uj({bounds:t,boundsOptions:e,center:n,children:i,className:a,id:s,placeholder:l,style:d,whenReady:f,zoom:p,...g},v){const[y]=O.useState({className:a,id:s,style:d}),[_,w]=O.useState(null),C=O.useRef(void 0);O.useImperativeHandle(v,()=>(_==null?void 0:_.map)??null,[_]);const A=O.useCallback(z=>{if(z!==null&&!C.current){const j=new Ls.Map(z,g);C.current=j,n!=null&&p!=null?j.setView(n,p):t!=null&&j.fitBounds(t,e),f!=null&&j.whenReady(f),w(Q8(j))}},[]);O.useEffect(()=>()=>{_==null||_.map.remove()},[_]);const k=_?be.createElement($y,{value:_},i):l??null;return be.createElement("div",{...y,ref:A},k)}const IA=O.forwardRef(uj),FA=aj(function({position:e,...n},i){const a=new Ls.Marker(e,n);return oc(a,Kp(i,{overlayContainer:a}))},function(e,n,i){n.position!==i.position&&e.setLatLng(n.position),n.icon!=null&&n.icon!==i.icon&&e.setIcon(n.icon),n.zIndexOffset!=null&&n.zIndexOffset!==i.zIndexOffset&&e.setZIndexOffset(n.zIndexOffset),n.opacity!=null&&n.opacity!==i.opacity&&e.setOpacity(n.opacity),e.dragging!=null&&n.draggable!==i.draggable&&(n.draggable===!0?e.dragging.enable():e.dragging.disable())}),dj=Wy(function({positions:e,...n},i){const a=new Ls.Polyline(e,n);return oc(a,Kp(i,{overlayContainer:a}))},function(e,n,i){n.positions!==i.positions&&e.setLatLngs(n.positions)}),HA=rj(function(e,n){const i=new Ls.Popup(e,n.overlayContainer);return oc(i,n)},function(e,n,{position:i},a){O.useEffect(function(){const{instance:l}=e;function d(p){p.popup===l&&(l.update(),a(!0))}function f(p){p.popup===l&&a(!1)}return n.map.on({popupopen:d,popupclose:f}),n.overlayContainer==null?(i!=null&&l.setLatLng(i),l.openOn(n.map)):n.overlayContainer.bindPopup(l),function(){var g;n.map.off({popupopen:d,popupclose:f}),(g=n.overlayContainer)==null||g.unbindPopup(),n.map.removeLayer(l)}},[e,n,a,i])}),fj=Wy(function({bounds:e,...n},i){const a=new Ls.Rectangle(e,n);return oc(a,Kp(i,{overlayContainer:a}))},function(e,n,i){n.bounds!==i.bounds&&e.setBounds(n.bounds)}),UA=sj(function({url:e,...n},i){const a=new Ls.TileLayer(e,Jp(n,i));return oc(a,i)},function(e,n,i){oj(e,n,i);const{url:a}=n;a!=null&&a!==i.url&&e.setUrl(a)});var Pb={exports:{}},hj=Pb.exports,L2;function pj(){return L2||(L2=1,(function(t,e){(function(n,i){i(wC())})(hj,(function(n){n=n&&n.hasOwnProperty("default")?n.default:n;function i(_,w){var C=w.x-_.x,A=w.y-_.y;return Math.sqrt(C*C+A*A)}var a=function(w,C){return(Math.atan2(C.y-w.y,C.x-w.x)*180/Math.PI+90+360)%360},s=function(w,C){var A=w.value,k=w.isInPixels;return k?A/C:A};function l(_){if(typeof _=="string"&&_.indexOf("%")!==-1)return{value:parseFloat(_)/100,isInPixels:!1};var w=_?parseFloat(_):0;return{value:w,isInPixels:w>0}}var d=function(w,C){return w.x===C.x&&w.y===C.y};function f(_){return _.reduce(function(w,C,A,k){if(A>0&&!d(C,k[A-1])){var z=k[A-1],j=w.length>0?w[w.length-1].distB:0,P=i(z,C);w.push({a:z,b:C,distA:j,distB:j+P,heading:a(z,C)})}return w},[])}function p(_,w){var C=f(_),A=C.length;if(A===0)return[];var k=C[A-1].distB,z=s(w.offset,k),j=s(w.endOffset,k),P=s(w.repeat,k),H=k*P,V=z>0?k*z:0,U=j>0?k*j:0,Z=[],Q=V;do Z.push(Q),Q+=H;while(H>0&&Q<k-U);var et=0,X=C[0];return Z.map(function(R){for(;R>X.distB&&et<A-1;)et++,X=C[et];var dt=(R-X.distA)/(X.distB-X.distA);return{pt:g(X.a,X.b,dt),heading:X.heading}})}function g(_,w,C){return w.x!==_.x?{x:_.x+C*(w.x-_.x),y:_.y+C*(w.y-_.y)}:{x:_.x,y:_.y+(w.y-_.y)*C}}(function(){var _=L.Marker.prototype._initIcon,w=L.Marker.prototype._setPos,C=L.DomUtil.TRANSFORM==="msTransform";L.Marker.addInitHook(function(){var A=this.options.icon&&this.options.icon.options,k=A&&this.options.icon.options.iconAnchor;k&&(k=k[0]+"px "+k[1]+"px"),this.options.rotationOrigin=this.options.rotationOrigin||k||"center bottom",this.options.rotationAngle=this.options.rotationAngle||0,this.on("drag",function(z){z.target._applyRotation()})}),L.Marker.include({_initIcon:function(){_.call(this)},_setPos:function(A){w.call(this,A),this._applyRotation()},_applyRotation:function(){this.options.rotationAngle&&(this._icon.style[L.DomUtil.TRANSFORM+"Origin"]=this.options.rotationOrigin,C?this._icon.style[L.DomUtil.TRANSFORM]="rotate("+this.options.rotationAngle+"deg)":this._icon.style[L.DomUtil.TRANSFORM]+=" rotateZ("+this.options.rotationAngle+"deg)")},setRotationAngle:function(A){return this.options.rotationAngle=A,this.update(),this},setRotationOrigin:function(A){return this.options.rotationOrigin=A,this.update(),this}})})(),n.Symbol=n.Symbol||{},n.Symbol.Dash=n.Class.extend({options:{pixelSize:10,pathOptions:{}},initialize:function(w){n.Util.setOptions(this,w),this.options.pathOptions.clickable=!1},buildSymbol:function(w,C,A,k,z){var j=this.options,P=Math.PI/180;if(j.pixelSize<=1)return n.polyline([w.latLng,w.latLng],j.pathOptions);var H=A.project(w.latLng),V=-(w.heading-90)*P,U=n.point(H.x+j.pixelSize*Math.cos(V+Math.PI)/2,H.y+j.pixelSize*Math.sin(V)/2),Z=H.add(H.subtract(U));return n.polyline([A.unproject(U),A.unproject(Z)],j.pathOptions)}}),n.Symbol.dash=function(_){return new n.Symbol.Dash(_)},n.Symbol.ArrowHead=n.Class.extend({options:{polygon:!0,pixelSize:10,headAngle:60,pathOptions:{stroke:!1,weight:2}},initialize:function(w){n.Util.setOptions(this,w),this.options.pathOptions.clickable=!1},buildSymbol:function(w,C,A,k,z){return this.options.polygon?n.polygon(this._buildArrowPath(w,A),this.options.pathOptions):n.polyline(this._buildArrowPath(w,A),this.options.pathOptions)},_buildArrowPath:function(w,C){var A=Math.PI/180,k=C.project(w.latLng),z=-(w.heading-90)*A,j=this.options.headAngle/2*A,P=z+j,H=z-j,V=n.point(k.x-this.options.pixelSize*Math.cos(P),k.y+this.options.pixelSize*Math.sin(P)),U=n.point(k.x-this.options.pixelSize*Math.cos(H),k.y+this.options.pixelSize*Math.sin(H));return[C.unproject(V),w.latLng,C.unproject(U)]}}),n.Symbol.arrowHead=function(_){return new n.Symbol.ArrowHead(_)},n.Symbol.Marker=n.Class.extend({options:{markerOptions:{},rotate:!1},initialize:function(w){n.Util.setOptions(this,w),this.options.markerOptions.clickable=!1,this.options.markerOptions.draggable=!1},buildSymbol:function(w,C,A,k,z){return this.options.rotate&&(this.options.markerOptions.rotationAngle=w.heading+(this.options.angleCorrection||0)),n.marker(w.latLng,this.options.markerOptions)}}),n.Symbol.marker=function(_){return new n.Symbol.Marker(_)};var v=function(w){return w instanceof n.LatLng||Array.isArray(w)&&w.length===2&&typeof w[0]=="number"},y=function(w){return Array.isArray(w)&&v(w[0])};n.PolylineDecorator=n.FeatureGroup.extend({options:{patterns:[]},initialize:function(w,C){n.FeatureGroup.prototype.initialize.call(this),n.Util.setOptions(this,C),this._map=null,this._paths=this._initPaths(w),this._bounds=this._initBounds(),this._patterns=this._initPatterns(this.options.patterns)},_initPaths:function(w,C){var A=this;if(y(w)){var k=C?w.concat([w[0]]):w;return[k]}return w instanceof n.Polyline?this._initPaths(w.getLatLngs(),w instanceof n.Polygon):Array.isArray(w)?w.reduce(function(z,j){return z.concat(A._initPaths(j,C))},[]):[]},_initPatterns:function(w){return w.map(this._parsePatternDef)},setPatterns:function(w){this.options.patterns=w,this._patterns=this._initPatterns(this.options.patterns),this.redraw()},setPaths:function(w){this._paths=this._initPaths(w),this._bounds=this._initBounds(),this.redraw()},_parsePatternDef:function(w,C){return{symbolFactory:w.symbol,offset:l(w.offset),endOffset:l(w.endOffset),repeat:l(w.repeat)}},onAdd:function(w){this._map=w,this._draw(),this._map.on("moveend",this.redraw,this)},onRemove:function(w){this._map.off("moveend",this.redraw,this),this._map=null,n.FeatureGroup.prototype.onRemove.call(this,w)},_initBounds:function(){var w=this._paths.reduce(function(C,A){return C.concat(A)},[]);return n.latLngBounds(w)},getBounds:function(){return this._bounds},_buildSymbols:function(w,C,A){var k=this;return A.map(function(z,j){return C.buildSymbol(z,w,k._map,j,A.length)})},_getDirectionPoints:function(w,C){var A=this;if(w.length<2)return[];var k=w.map(function(z){return A._map.project(z)});return p(k,C).map(function(z){return{latLng:A._map.unproject(n.point(z.pt)),heading:z.heading}})},redraw:function(){this._map&&(this.clearLayers(),this._draw())},_getPatternLayers:function(w){var C=this,A=this._map.getBounds().pad(.1);return this._paths.map(function(k){var z=C._getDirectionPoints(k,w).filter(function(j){return A.contains(j.latLng)});return n.featureGroup(C._buildSymbols(k,w.symbolFactory,z))})},_draw:function(){var w=this;this._patterns.map(function(C){return w._getPatternLayers(C)}).forEach(function(C){w.addLayer(n.featureGroup(C))})}}),n.polylineDecorator=function(_,w){return new n.PolylineDecorator(_,w)}}))})()),Pb.exports}pj();function ju(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}function VA(t,e,n,i,a,s){if(!(t!=null&&t.position)||!(e!=null&&e.position))return 0;const l=6371,{lat:d,lng:f}=t.position,{lat:p,lng:g}=e.position,v=t.altitude||0,y=e.altitude||0,_=et=>et*Math.PI/180,w=_(p-d),C=_(g-f),A=Math.sin(w/2)*Math.sin(w/2)+Math.cos(_(d))*Math.cos(_(p))*Math.sin(C/2)*Math.sin(C/2),k=2*Math.atan2(Math.sqrt(A),Math.sqrt(1-A)),z=l*k,j=i/1e3,P=v/1e3,H=y/1e3,V=_(a||.01),U=_(s||.01);if(n==="Plane"){const et=Math.max(0,(j-P)/Math.sin(U)),X=Math.max(0,(j-H)/Math.sin(V)),R=Math.max(0,et*Math.cos(U)),dt=Math.max(0,X*Math.cos(V));return z-(dt+R)+Math.max(0,X)+Math.max(0,et)}const Z=Math.abs(j-P),Q=Math.abs(j-H);return Z+z+Q}async function mj(t,e){const i=`https://api.openweathermap.org/data/2.5/weather?lat=${t}&lon=${e}&appid=335799082893fad97fa36118b131f919&units=metric`;try{const s=await(await fetch(i)).json();return{windSpeed:s.wind.speed,windAngle:s.wind.deg}}catch{return null}}async function gj(t,e,n,i){const a=await mj(n.lat,n.lon),s=1.05,l=t/3.6,d=((a==null?void 0:a.windSpeed)??0)*Math.cos(Math.PI/180*((a==null?void 0:a.windAngle)??0)),f=l+d,g=.5*s*f**2*i.dragCoefficient*i.frontalArea+i.weight*9.8*.05;let v=i.thrustWatts[i.thrustWatts.length-1].watts;for(const w of i.thrustWatts)if(w.thrust/1e3*9.8>g){v=w.watts;break}const _=v/i.propellerEfficiency*e;return Math.min(_/i.batteryCapacity*100,100)}async function vj(t,e,n){const i=[{bat:100,time:0}];for(let a=1;a<t.length;a++){const s=t[a-1],l=t[a],f=VA(s,l,e.type,n,e.downang,e.upang)/e.speed,p={lat:(s.position.lat+l.position.lat)/2,lon:(s.position.lng+l.position.lng)/2},g=await gj(e.speed,f,p,e);i.push({bat:i[a-1].bat-g,time:i[a-1].time+f})}return i}function bj(t){const n=t.trim().replace(/[°NSEW]/gi,"").split(/[,\s]+/).filter(Boolean);if(n.length>=2){const i=parseFloat(n[0]),a=parseFloat(n[1]);if(!isNaN(i)&&!isNaN(a)&&i>=-90&&i<=90&&a>=-180&&a<=180)return{lat:i,lng:a}}return null}function yj(){return{type:"Plane",downang:40,upang:45,weight:3.4,speed:80,frontalArea:.12,dragCoefficient:.45,batteryCapacity:315,thrustWatts:[{thrust:500,watts:55.5},{thrust:750,watts:91.02},{thrust:1e3,watts:137.64},{thrust:1250,watts:191},{thrust:1500,watts:246},{thrust:1750,watts:308},{thrust:2e3,watts:381}],propellerEfficiency:.95}}function xj({color:t,actionMode:e,setRectangles:n}){const i=Md(),a=O.useRef(null),s=O.useRef(null),l=O.useRef(t);return O.useEffect(()=>{l.current=t},[t]),O.useEffect(()=>{if(!(e==="workArea"||e==="prohibitedArea"))return;const f=i.getContainer(),p=f.style.cursor;f.style.cursor="crosshair";const g=_=>{a.current=_.latlng,i.dragging.disable(),s.current&&(i.removeLayer(s.current),s.current=null)},v=_=>{if(!a.current)return;const w=xi.latLngBounds(a.current,_.latlng);s.current?s.current.setBounds(w):s.current=xi.rectangle(w,{color:l.current,weight:2,fillOpacity:.2}).addTo(i)},y=_=>{if(!a.current)return;const w=a.current,C=_.latlng;if(a.current=null,i.dragging.enable(),s.current&&(i.removeLayer(s.current),s.current=null),Math.abs(w.lat-C.lat)<1e-6&&Math.abs(w.lng-C.lng)<1e-6)return;const A=xi.latLngBounds(w,C),k=xi.rectangle(A,{color:l.current,weight:2,fillOpacity:.2}).addTo(i);n(z=>[...z,{id:ju(),layer:k,color:l.current,bounds:A}])};return i.on("mousedown",g),i.on("mousemove",v),i.on("mouseup",y),()=>{i.off("mousedown",g),i.off("mousemove",v),i.off("mouseup",y),f.style.cursor=p,i.dragging.enable(),s.current&&(i.removeLayer(s.current),s.current=null),a.current=null}},[e,i,n]),null}function Zy(t){return xi.divIcon({className:"",html:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512" width="24" height="24" fill="${t}"><path d="M384 192c0 87.4-117 243-168.3 307.2a24 24 0 0 1-47.4 0C117 435 0 279.4 0 192 0 86 86 0 192 0s192 86 192 192z"/></svg>`,iconSize:[24,24],iconAnchor:[12,24],popupAnchor:[0,-24]})}const _j=Zy("#1ed013"),Sj=Zy("#228be6"),wj=Zy("#fa5252"),Cj=new xi.Icon({iconUrl:"https://unpkg.com/leaflet@1.7.1/dist/images/marker-icon.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34]}),Ua=[{value:"tank",label:"options.tank"},{value:"artillery",label:"options.artillery"}],Zv=8,gp={classic:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",satellite:"https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"};function Ej({point:t,points:e,index:n,mapElement:i,onDrag:a,onDragEnd:s,onAltitudeChange:l,onMetaChange:d,onRemove:f,onMoving:p}){const{t:g}=Gn(),v=O.useRef(null),y=n===0?_j:n===e.length-1?wj:Sj,_=C=>{const A=v.current;if(!A||!i)return;const k=A._icon;if(!k)return;const z=i.getBoundingClientRect(),j=k.getBoundingClientRect(),P=j.left-z.left+j.width>z.width/2?-150:200,H=j.top+j.height>z.height/2?-150:150;p({x:j.left-z.left+P,y:j.top-z.top+H,latlng:C.target.getLatLng()})},w=C=>{const A=t.meta.includes(C)?t.meta.filter(k=>k!==C):[...t.meta,C];d(n,A)};return T.jsx(FA,{position:t.position,icon:y,draggable:!0,ref:v,eventHandlers:{drag:C=>a(n,C.target.getLatLng()),dragend:C=>{s(n,C.target.getLatLng()),p(null)},move:_},children:T.jsx(HA,{children:T.jsxs("div",{className:"text-xs space-y-1.5 min-w-[140px]",children:[T.jsxs("div",{className:"font-semibold",children:[g("flights.planner.point")," ",n+1]}),T.jsxs("div",{children:[T.jsx("label",{className:"text-az-muted text-[10px]",children:g("flights.planner.altitude")}),T.jsx("input",{type:"range",min:0,max:3e3,value:t.altitude,onChange:C=>l(n,Number(C.target.value)),className:"w-full accent-az-orange"}),T.jsxs("span",{className:"text-[10px] text-az-muted",children:[t.altitude,"m"]})]}),T.jsx("div",{className:"flex gap-2",children:Ua.map(C=>T.jsxs("label",{className:"flex items-center gap-1 text-[10px] cursor-pointer",children:[T.jsx("input",{type:"checkbox",checked:t.meta.includes(C.value),onChange:()=>w(C.value),className:"accent-az-orange"}),g(`flights.planner.${C.label}`)]},C.value))}),T.jsx("button",{onClick:()=>f(t.id),className:"text-az-red text-[10px] hover:underline",children:g("flights.planner.removePoint")})]})})})}function Aj({latlng:t}){const e=Md();return O.useEffect(()=>{e.setView(t)},[t,e]),null}function Tj({pointPosition:t,mapType:e}){return T.jsx("div",{className:"absolute w-[240px] h-[180px] border border-az-border rounded shadow-lg z-[1000] overflow-hidden pointer-events-none",style:{top:t.y,left:t.x},children:T.jsxs(IA,{center:t.latlng,zoom:18,zoomControl:!1,className:"w-full h-full",attributionControl:!1,children:[T.jsx(UA,{url:e==="classic"?gp.classic:gp.satellite}),T.jsx(cj,{center:t.latlng,radius:3,color:"#fa5252"}),T.jsx(Aj,{latlng:t.latlng})]})})}function Dj({points:t,handlePolylineClick:e,containerRef:n,onMapMove:i}){const a=Md(),s=O.useRef(null),l=O.useRef(null);return O.useEffect(()=>{const d=()=>i(a.getCenter());return a.on("moveend",d),()=>{a.off("moveend",d)}},[a,i]),O.useEffect(()=>{if(s.current&&a.removeLayer(s.current),l.current&&a.removeLayer(l.current),t.length>1){const f=t.map(p=>[p.position.lat,p.position.lng]);s.current=xi.polyline(f,{color:"#228be6",weight:6,opacity:.7,lineJoin:"round"}).addTo(a),l.current=xi.polylineDecorator(s.current,{patterns:[{offset:"10%",repeat:"40%",symbol:xi.Symbol.arrowHead({pixelSize:12,pathOptions:{fillOpacity:1,weight:0,color:"#228be6"}})}]}).addTo(a),s.current.on("click",e)}const d=new ResizeObserver(()=>a.invalidateSize());return n.current&&d.observe(n.current),()=>{s.current&&(a.removeLayer(s.current),s.current=null),l.current&&(a.removeLayer(l.current),l.current=null),d.disconnect()}},[a,t,e,n]),null}function Mj({center:t}){const e=Md();return O.useEffect(()=>{e.setView(t)},[t,e]),null}function Oj({points:t,currentPosition:e,rectangles:n,setRectangles:i,rectangleColor:a,actionMode:s,onAddPoint:l,onUpdatePoint:d,onRemovePoint:f,onAltitudeChange:p,onMetaChange:g,onPolylineClick:v,onPositionChange:y,onMapMove:_}){const{t:w}=Gn(),C=O.useRef(null),[A,k]=O.useState("satellite"),[z,j]=O.useState(null),[P,H]=O.useState(t),V=O.useRef(!1);O.useEffect(()=>{H(t)},[t]);function U(){return lj({click(et){s==="points"&&(V.current||l(et.latlng.lat,et.latlng.lng),V.current=!1)}}),null}const Z=et=>{s==="points"&&(V.current=!0,v(et))},Q=(et,X)=>{const R=[...P];R[et]={...R[et],position:X},H(R)};return T.jsxs("div",{className:"flex-1 relative",ref:C,children:[T.jsxs(IA,{center:e,zoom:15,className:"h-full w-full",children:[T.jsx(U,{}),T.jsx(UA,{url:A==="classic"?gp.classic:gp.satellite,attribution:A==="classic"?'© <a href="https://www.openstreetmap.org/copyright">OSM</a>':"Satellite"}),T.jsx(Dj,{points:P,handlePolylineClick:Z,containerRef:C,onMapMove:_}),T.jsx(Mj,{center:e}),z&&T.jsx(Tj,{pointPosition:z,mapType:A}),P.map((et,X)=>T.jsx(Ej,{point:et,points:P,index:X,mapElement:C.current,onDrag:Q,onDragEnd:(R,dt)=>d(R,dt),onAltitudeChange:p,onMetaChange:g,onRemove:f,onMoving:j},et.id)),P.length>1&&T.jsx(dj,{positions:[[P[P.length-1].position.lat,P[P.length-1].position.lng],[P[0].position.lat,P[0].position.lng]],color:"#228be6",dashArray:"5,10"}),e&&T.jsx(FA,{position:e,icon:Cj,draggable:!0,eventHandlers:{dragend:et=>y(et.target.getLatLng())},children:T.jsx(HA,{children:w("flights.planner.currentLocation")})}),n.map(et=>T.jsx(fj,{bounds:et.bounds,pathOptions:{color:et.color}},et.id)),T.jsx(xj,{color:a,actionMode:s,rectangles:n,setRectangles:i})]}),(s==="workArea"||s==="prohibitedArea")&&T.jsxs("div",{className:"absolute top-2 left-1/2 -translate-x-1/2 z-[400] bg-az-panel/90 border border-az-border rounded px-3 py-1 text-[11px] text-az-text pointer-events-none",children:["Click and drag on the map to draw a ",s==="workArea"?"work area":"no-go zone"]}),T.jsx("button",{onClick:()=>k(et=>et==="classic"?"satellite":"classic"),className:`absolute top-2 right-2 z-[400] px-2 py-1 text-xs rounded border ${A==="satellite"?"bg-az-panel border-az-orange text-white":"bg-az-panel border-az-border text-az-text"}`,children:w("flights.planner.satellite")})]})}function kj({open:t,isEditMode:e,latitude:n,longitude:i,altitude:a,meta:s,onLatitudeChange:l,onLongitudeChange:d,onAltitudeChange:f,onMetaChange:p,onSubmit:g,onClose:v}){const{t:y}=Gn();if(!t)return null;const _=(C,A)=>{const k=parseFloat(C);isNaN(k)||A(parseFloat(k.toFixed(Zv)))},w=C=>{p(s.includes(C)?s.filter(A=>A!==C):[...s,C])};return T.jsx("div",{className:"fixed inset-0 bg-black/60 flex items-center justify-center z-[2000]",children:T.jsxs("div",{className:"bg-az-panel border border-az-border rounded-lg p-4 w-96 shadow-xl",children:[T.jsx("h3",{className:"text-white font-semibold mb-1",children:y(e?"flights.planner.titleEdit":"flights.planner.titleAdd")}),T.jsx("p",{className:"text-az-muted text-xs mb-3",children:y("flights.planner.description")}),T.jsxs("div",{className:"space-y-2 text-xs",children:[T.jsxs("div",{children:[T.jsx("label",{className:"text-az-muted block mb-0.5",children:y("flights.planner.latitude")}),T.jsx("input",{type:"number",step:"any",value:n.toFixed(Zv),onChange:C=>_(C.target.value,l),className:"w-full bg-az-bg border border-az-border rounded px-2 py-1.5 text-az-text outline-none focus:border-az-orange"})]}),T.jsxs("div",{children:[T.jsx("label",{className:"text-az-muted block mb-0.5",children:y("flights.planner.longitude")}),T.jsx("input",{type:"number",step:"any",value:i.toFixed(Zv),onChange:C=>_(C.target.value,d),className:"w-full bg-az-bg border border-az-border rounded px-2 py-1.5 text-az-text outline-none focus:border-az-orange"})]}),T.jsxs("div",{children:[T.jsx("label",{className:"text-az-muted block mb-0.5",children:y("flights.planner.altitude")}),T.jsx("input",{type:"number",value:a,onChange:C=>f(Number(C.target.value)),className:"w-full bg-az-bg border border-az-border rounded px-2 py-1.5 text-az-text outline-none focus:border-az-orange"})]}),T.jsxs("div",{children:[T.jsx("label",{className:"text-az-muted block mb-1",children:y("flights.planner.purpose")}),T.jsx("div",{className:"flex gap-3",children:Ua.map(C=>T.jsxs("label",{className:"flex items-center gap-1.5 cursor-pointer text-az-text",children:[T.jsx("input",{type:"checkbox",checked:s.includes(C.value),onChange:()=>w(C.value),className:"rounded border-az-border bg-az-bg accent-az-orange"}),y(`flights.planner.${C.label}`)]},C.value))})]})]}),T.jsxs("div",{className:"flex justify-end gap-2 mt-4",children:[T.jsx("button",{onClick:v,className:"px-3 py-1 text-sm border border-az-border rounded hover:bg-az-bg text-az-text",children:y("flights.planner.cancel")}),T.jsx("button",{onClick:g,className:"px-3 py-1 text-sm bg-az-orange rounded hover:bg-orange-600 text-white",children:y(e?"flights.planner.submitEdit":"flights.planner.submitAdd")})]})]})})}function Lj({open:t,jsonText:e,onClose:n,onSave:i}){const{t:a}=Gn(),[s,l]=O.useState(e),[d,f]=O.useState(!0);O.useEffect(()=>{l(e)},[e]);const p=g=>{l(g);try{JSON.parse(g),f(!0)}catch{f(!1)}};return t?T.jsx("div",{className:"fixed inset-0 bg-black/60 flex items-center justify-center z-[2000]",children:T.jsxs("div",{className:"bg-az-panel border border-az-border rounded-lg p-4 w-[700px] max-h-[80vh] shadow-xl flex flex-col",children:[T.jsx("h3",{className:"text-white font-semibold mb-2",children:a("flights.planner.editAsJson")}),T.jsx("textarea",{value:s,onChange:g=>p(g.target.value),rows:20,className:`flex-1 w-full bg-az-bg border rounded px-3 py-2 text-az-text text-xs font-mono outline-none resize-none ${d?"border-az-border focus:border-az-orange":"border-az-red"}`}),T.jsx("p",{className:`text-xs mt-1 ${d?"text-az-muted":"text-az-red"}`,children:a(d?"flights.planner.editJsonHint":"flights.planner.invalidJson")}),T.jsxs("div",{className:"flex justify-end gap-2 mt-3",children:[T.jsx("button",{onClick:n,className:"px-3 py-1 text-sm border border-az-border rounded hover:bg-az-bg text-az-text",children:a("flights.planner.cancel")}),T.jsx("button",{onClick:()=>d&&i(s),disabled:!d,className:"px-3 py-1 text-sm bg-az-orange rounded hover:bg-orange-600 text-white disabled:opacity-40",children:a("flights.planner.save")})]})]})}):null}function zj(){var mn,kn,gn,wi;const{t}=Gn(),{flights:e,selectedFlight:n,selectFlight:i,refreshFlights:a}=Pp(),[s,l]=O.useState("params"),[d,f]=O.useState(null),[p,g]=O.useState(!1),[v,y]=O.useState([]),[_,w]=O.useState(null),[C,A]=O.useState(null),[k,z]=O.useState([]),[j,P]=O.useState([]),[H,V]=O.useState([]),[U,Z]=O.useState("points"),[Q,et]=O.useState({direction:0,speed:0}),[X,R]=O.useState(1e3),[dt,it]=O.useState({lat:47.242,lng:35.024}),[ut,I]=O.useState(""),[$,q]=O.useState({open:!1,point:null,isEdit:!1}),[nt,ot]=O.useState({open:!1,text:""});O.useEffect(()=>{ie.get("/api/flights/aircrafts").then(y).catch(()=>{}),A(yj()),navigator.geolocation.getCurrentPosition(Rt=>it({lat:Rt.coords.latitude,lng:Rt.coords.longitude}),()=>{})},[]),O.useEffect(()=>{if(!n){z([]);return}ie.get(`/api/flights/${n.id}/waypoints`).then(Rt=>{z(Rt.sort((At,wt)=>At.order-wt.order).map(At=>({id:At.id,position:{lat:At.latitude,lng:At.longitude},altitude:300,meta:[Ua[0].value,Ua[1].value]})))}).catch(()=>{})},[n]),O.useEffect(()=>{if(!(!n||s!=="gps"))return pk(`/api/flights/${n.id}/live-gps`,Rt=>w(Rt))},[n,s]),O.useEffect(()=>{if(!C||k.length<2){P([{bat:100,time:0}]);return}vj(k,C,X).then(P)},[k,C,X]);const F=async Rt=>{await ie.post("/api/flights",{name:Rt}),a()},K=async()=>{d&&(await ie.delete(`/api/flights/${d}`),(n==null?void 0:n.id)===d&&i(null),f(null),a())},at=O.useCallback((Rt,At)=>{const wt={id:ju(),position:{lat:Rt,lng:At},altitude:X,meta:[Ua[0].value,Ua[1].value]};z(Et=>[...Et,wt])},[X]),mt=O.useCallback((Rt,At)=>{z(wt=>wt.map((Et,zt)=>zt===Rt?{...Et,position:At}:Et))},[]),pt=O.useCallback(Rt=>{z(At=>At.filter(wt=>wt.id!==Rt))},[]),yt=O.useCallback(Rt=>{const At=Rt.latlng;let wt=-1,Et=1/0;if(k.forEach((zt,Yt)=>{if(Yt<k.length-1){const re=xi.LineUtil.pointToSegmentDistance(xi.point(At.lng,At.lat),xi.point(zt.position.lng,zt.position.lat),xi.point(k[Yt+1].position.lng,k[Yt+1].position.lat));re<Et&&(Et=re,wt=Yt)}}),wt!==-1){const zt=(k[wt].altitude+k[wt+1].altitude)/2,Yt={id:ju(),position:{lat:At.lat,lng:At.lng},altitude:zt,meta:[Ua[0].value,Ua[1].value]};z(re=>{const gt=[...re];return gt.splice(wt+1,0,Yt),gt})}},[k]),ft=Rt=>{q({open:!0,point:{...Rt},isEdit:!0})},Ht=()=>{$.point&&($.isEdit?z(Rt=>Rt.map(At=>At.id===$.point.id?$.point:At)):z(Rt=>[...Rt,$.point]),q({open:!1,point:null,isEdit:!1}))},Tt=()=>{const Rt={operational_height:{currentAltitude:X},geofences:{polygons:H.map(At=>{const wt=At.bounds.getSouthWest(),Et=At.bounds.getNorthEast();return{northWest:{lat:Et.lat,lon:wt.lng},southEast:{lat:wt.lat,lon:Et.lng},fence_type:At.color==="red"?"EXCLUSION":"INCLUSION"}})},action_points:k.map(At=>({point:{lat:At.position.lat,lon:At.position.lng},height:At.altitude,action:"search",action_specific:{targets:At.meta}}))};ot({open:!0,text:JSON.stringify(Rt,null,2)})},Mt=()=>{const Rt={operational_height:{currentAltitude:X},geofences:{polygons:H.map(zt=>{const Yt=zt.bounds.getSouthWest(),re=zt.bounds.getNorthEast();return{northWest:{lat:re.lat,lon:Yt.lng},southEast:{lat:Yt.lat,lon:re.lng},fence_type:zt.color==="red"?"EXCLUSION":"INCLUSION"}})},action_points:k.map(zt=>({point:{lat:zt.position.lat,lon:zt.position.lng},height:zt.altitude,action:"search",action_specific:{targets:zt.meta}}))},At=new Blob([JSON.stringify(Rt,null,2)],{type:"application/json"}),wt=URL.createObjectURL(At),Et=document.createElement("a");Et.href=wt,Et.download=`${(n==null?void 0:n.name)??"flight-plan"}.json`,Et.click(),URL.revokeObjectURL(wt)},Ee=()=>{const Rt=document.createElement("input");Rt.type="file",Rt.accept="application/json",Rt.onchange=async At=>{var zt;const wt=(zt=At.target.files)==null?void 0:zt[0];if(!wt)return;const Et=await wt.text();Ut(Et)},Rt.click()},Ut=Rt=>{var At,wt;try{const Et=JSON.parse(Rt);Et.action_points&&z(Et.action_points.map(zt=>{var Yt,re,gt;return{id:ju(),position:{lat:((Yt=zt.point)==null?void 0:Yt.lat)??zt.lat,lng:((re=zt.point)==null?void 0:re.lon)??zt.lon},altitude:zt.height||300,meta:((gt=zt.action_specific)==null?void 0:gt.targets)||[Ua[0].value,Ua[1].value]}})),(At=Et.geofences)!=null&&At.polygons&&V(Et.geofences.polygons.map(zt=>({id:ju(),bounds:xi.latLngBounds([zt.southEast.lat,zt.northWest.lon],[zt.northWest.lat,zt.southEast.lon]),color:zt.fence_type==="EXCLUSION"?"red":"green"}))),(wt=Et.operational_height)!=null&&wt.currentAltitude&&R(Et.operational_height.currentAltitude),ot({open:!1,text:""})}catch{alert(t("flights.planner.invalidJson"))}},ye=async()=>{if(!n)return;const Rt=await ie.get(`/api/flights/${n.id}/waypoints`).catch(()=>[]);for(const At of Rt)await ie.delete(`/api/flights/${n.id}/waypoints/${At.id}`).catch(()=>{});for(let At=0;At<k.length;At++)await ie.post(`/api/flights/${n.id}/waypoints`,{name:`Point ${At+1}`,latitude:k[At].position.lat,longitude:k[At].position.lng,order:At}).catch(()=>{})},ge=()=>{const Rt=bj(ut);Rt&&it(Rt)},ve=j[j.length-1],Cn=ve?ve.bat>12?{label:t("flights.planner.statusGood"),color:"#40c057"}:ve.bat>5?{label:t("flights.planner.statusCaution"),color:"#FFFF00"}:{label:t("flights.planner.statusLow"),color:"#fa5252"}:{label:"",color:"#6c757d"},En=C&&k.length>1?k.reduce((Rt,At,wt)=>wt===0?0:Rt+VA(k[wt-1],At,C.type,X,C.downang,C.upang),0).toFixed(1)+t("flights.planner.km"):"",nn=ve&&ve.time>0?`${Math.floor(ve.time)>=1?Math.floor(ve.time)+t("flights.planner.hour"):""}${Math.floor((ve.time-Math.floor(ve.time))*60)}${t("flights.planner.minutes")}`:"";return T.jsxs("div",{className:"flex h-full",children:[T.jsx(mk,{flights:e,selectedFlight:n,onSelect:i,onCreate:F,onDelete:Rt=>f(Rt)}),p?T.jsxs("div",{className:"w-10 bg-az-panel border-r border-az-border flex flex-col items-center py-2 gap-2 shrink-0",children:[T.jsx("button",{onClick:()=>g(!1),title:"Expand",className:"w-8 h-8 rounded border border-az-border text-az-text hover:border-az-orange hover:text-az-orange text-sm",children:"»"}),T.jsx("button",{onClick:()=>Z("points"),title:t("flights.planner.addPoints"),className:`w-8 h-8 rounded border text-sm ${U==="points"?"border-az-orange text-az-orange bg-az-orange/20":"border-az-border text-az-text hover:border-az-orange"}`,children:"●"}),T.jsx("button",{onClick:()=>Z("workArea"),title:t("flights.planner.workArea"),className:`w-8 h-8 rounded border text-az-green text-sm ${U==="workArea"?"border-az-green bg-az-green/20":"border-az-border hover:border-az-green"}`,children:"▣"}),T.jsx("button",{onClick:()=>Z("prohibitedArea"),title:t("flights.planner.prohibitedArea"),className:`w-8 h-8 rounded border text-az-red text-sm ${U==="prohibitedArea"?"border-az-red bg-az-red/20":"border-az-border hover:border-az-red"}`,children:"▣"})]}):T.jsxs("div",{className:"w-80 bg-az-panel border-r border-az-border flex flex-col shrink-0",children:[T.jsxs("div",{className:"flex border-b border-az-border items-stretch",children:[T.jsx("button",{onClick:()=>l("params"),className:`flex-1 py-1.5 text-[10px] ${s==="params"?"bg-az-bg text-white":"text-az-muted"}`,children:t("flights.params")}),T.jsx("button",{onClick:()=>l("gps"),className:`flex-1 py-1.5 text-[10px] ${s==="gps"?"bg-az-bg text-white":"text-az-muted"}`,children:t("flights.gpsDenied")}),T.jsx("button",{onClick:()=>g(!0),title:"Collapse",className:"px-2 text-az-muted hover:text-az-orange text-sm border-l border-az-border",children:"«"})]}),s==="params"&&T.jsx(Y8,{points:k,calculatedPointInfo:j,aircrafts:v,initialAltitude:X,actionMode:U,wind:Q,locationInput:ut,currentPosition:dt,totalDistance:En,totalTime:nn,batteryStatus:Cn,onInitialAltitudeChange:R,onActionModeChange:Z,onWindChange:et,onLocationInputChange:I,onLocationSearch:ge,onReorderPoints:z,onEditPoint:ft,onRemovePoint:pt,onSave:ye,onUpload:Ee,onEditJson:Tt,onExport:Mt}),s==="gps"&&T.jsxs("div",{className:"p-2 space-y-2 text-xs",children:[T.jsxs("div",{children:[T.jsx("label",{className:"text-az-muted block mb-1",children:t("flights.liveGps")}),_?T.jsxs("div",{className:"bg-az-bg rounded p-1.5 space-y-0.5",children:[T.jsxs("div",{className:"text-az-text",children:["Status: ",T.jsx("span",{className:"text-az-green",children:_.status})]}),T.jsxs("div",{className:"text-az-text",children:["Lat: ",_.lat.toFixed(6)]}),T.jsxs("div",{className:"text-az-text",children:["Lon: ",_.lon.toFixed(6)]}),T.jsxs("div",{className:"text-az-text",children:["Sats: ",_.satellites]})]}):T.jsx("div",{className:"text-az-muted",children:"Waiting for GPS signal..."})]}),T.jsxs("button",{onClick:()=>l("params"),className:"text-az-orange text-xs",children:["← ",t("flights.back")]})]})]}),T.jsx(Oj,{points:k,calculatedPointInfo:j,currentPosition:dt,rectangles:H,setRectangles:V,rectangleColor:U==="workArea"?"green":"red",actionMode:U,onAddPoint:at,onUpdatePoint:mt,onRemovePoint:pt,onAltitudeChange:(Rt,At)=>z(wt=>wt.map((Et,zt)=>zt===Rt?{...Et,altitude:At}:Et)),onMetaChange:(Rt,At)=>z(wt=>wt.map((Et,zt)=>zt===Rt?{...Et,meta:At}:Et)),onPolylineClick:yt,onPositionChange:it,onMapMove:()=>{}}),T.jsx(kj,{open:$.open,isEditMode:$.isEdit,latitude:((mn=$.point)==null?void 0:mn.position.lat)??0,longitude:((kn=$.point)==null?void 0:kn.position.lng)??0,altitude:((gn=$.point)==null?void 0:gn.altitude)??300,meta:((wi=$.point)==null?void 0:wi.meta)??[],onLatitudeChange:Rt=>q(At=>({...At,point:At.point?{...At.point,position:{...At.point.position,lat:Rt}}:null})),onLongitudeChange:Rt=>q(At=>({...At,point:At.point?{...At.point,position:{...At.point.position,lng:Rt}}:null})),onAltitudeChange:Rt=>q(At=>({...At,point:At.point?{...At.point,altitude:Rt}:null})),onMetaChange:Rt=>q(At=>({...At,point:At.point?{...At.point,meta:Rt}:null})),onSubmit:Ht,onClose:()=>q({open:!1,point:null,isEdit:!1})}),T.jsx(Lj,{open:nt.open,jsonText:nt.text,onClose:()=>ot({open:!1,text:""}),onSave:Ut}),T.jsx(CC,{open:!!d,title:t("common.delete"),message:"Delete this flight and all its data?",onConfirm:K,onCancel:()=>f(null)})]})}function Rj({children:t,videoFile:e,videoUrl:n,currentTime:i,videoRef:a,isPlaying:s,onSizeChanged:l,onSetCurrentTime:d}){const f=O.useRef(null),[p,g]=O.useState(null),v=O.useRef(null),y=O.useRef(!1);return O.useEffect(()=>{if(a.current){if(e)try{v.current&&URL.revokeObjectURL(v.current);const _=URL.createObjectURL(e);return v.current=_,a.current.pause(),a.current.src=_,a.current.load(),g(null),()=>{URL.revokeObjectURL(_),v.current=null}}catch(_){g(`Error loading video: ${_.message}`)}else if(n)try{a.current.pause(),a.current.src=n,a.current.load(),g(null)}catch(_){g(`Error loading video: ${_.message}`)}}},[e,n]),O.useEffect(()=>{if(!a.current)return;const _=()=>{if(!a.current)return;const w=a.current.videoWidth||640,C=a.current.videoHeight||480;l&&l(w,C)};return a.current.addEventListener("loadedmetadata",_),()=>{var w;return(w=a.current)==null?void 0:w.removeEventListener("loadedmetadata",_)}},[l]),O.useEffect(()=>{if(!a.current)return;(async()=>{try{s?(y.current=!0,await a.current.play(),g(null)):a.current.pause()}catch(w){g(`Playback error: ${w.message}`)}})()},[s]),O.useEffect(()=>{if(a.current)if(y.current)y.current=!1;else try{a.current.readyState>0&&(a.current.currentTime=i)}catch{}},[i]),O.useEffect(()=>{if(!a.current)return;const _=()=>{a.current&&d&&s&&(y.current=!0,d(a.current.currentTime))},w=()=>{a.current&&d&&d(a.current.currentTime)};return a.current.addEventListener("timeupdate",_),a.current.addEventListener("seeked",w),()=>{var C,A;(C=a.current)==null||C.removeEventListener("timeupdate",_),(A=a.current)==null||A.removeEventListener("seeked",w)}},[d,s]),T.jsxs("div",{className:"player",ref:f,children:[T.jsx("video",{className:"video",ref:a,preload:"auto",playsInline:!0,muted:!0}),p&&T.jsx("div",{className:"player-error",children:p}),T.jsx("div",{className:"player-item",children:t})]})}function Pj({annotations:t,onAnnotationClick:e}){return T.jsxs("div",{className:"annotation-section",children:[T.jsx("h3",{className:"menu-title",children:"Annotations"}),T.jsx("ul",{className:"annotation-list",children:t.map((n,i)=>{var a;return T.jsxs("li",{className:"annotation-list-item",onClick:()=>e(i),children:[n.time?`${n.time.substring(3,8)} - `:`Frame ${i+1} - `,((a=n.detections)==null?void 0:a.length)??0," objects"]},n.id??i)})})]})}var qv={exports:{}},Yv,z2;function Nj(){if(z2)return Yv;z2=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Yv=t,Yv}var Xv,R2;function jj(){if(R2)return Xv;R2=1;var t=Nj();function e(){}function n(){}return n.resetWarningCache=e,Xv=function(){function i(l,d,f,p,g,v){if(v!==t){var y=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw y.name="Invariant Violation",y}}i.isRequired=i;function a(){return i}var s={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:a,element:i,elementType:i,instanceOf:a,node:i,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:n,resetWarningCache:e};return s.PropTypes=s,s},Xv}var P2;function Bj(){return P2||(P2=1,qv.exports=jj()()),qv.exports}var Ij=Bj();const Ve=Sd(Ij);function Ho(t,e,n,i){function a(s){return s instanceof n?s:new n(function(l){l(s)})}return new(n||(n=Promise))(function(s,l){function d(g){try{p(i.next(g))}catch(v){l(v)}}function f(g){try{p(i.throw(g))}catch(v){l(v)}}function p(g){g.done?s(g.value):a(g.value).then(d,f)}p((i=i.apply(t,e||[])).next())})}const Fj=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function Ql(t,e,n){const i=Hj(t),{webkitRelativePath:a}=t,s=typeof e=="string"?e:typeof a=="string"&&a.length>0?a:`./${t.name}`;return typeof i.path!="string"&&N2(i,"path",s),N2(i,"relativePath",s),i}function Hj(t){const{name:e}=t;if(e&&e.lastIndexOf(".")!==-1&&!t.type){const i=e.split(".").pop().toLowerCase(),a=Fj.get(i);a&&Object.defineProperty(t,"type",{value:a,writable:!1,configurable:!1,enumerable:!0})}return t}function N2(t,e,n){Object.defineProperty(t,e,{value:n,writable:!1,configurable:!1,enumerable:!0})}const Uj=[".DS_Store","Thumbs.db"];function Vj(t){return Ho(this,void 0,void 0,function*(){return vp(t)&&$j(t.dataTransfer)?qj(t.dataTransfer,t.type):Gj(t)?Wj(t):Array.isArray(t)&&t.every(e=>"getFile"in e&&typeof e.getFile=="function")?Zj(t):[]})}function $j(t){return vp(t)}function Gj(t){return vp(t)&&vp(t.target)}function vp(t){return typeof t=="object"&&t!==null}function Wj(t){return Nb(t.target.files).map(e=>Ql(e))}function Zj(t){return Ho(this,void 0,void 0,function*(){return(yield Promise.all(t.map(n=>n.getFile()))).map(n=>Ql(n))})}function qj(t,e){return Ho(this,void 0,void 0,function*(){if(t.items){const n=Nb(t.items).filter(a=>a.kind==="file");if(e!=="drop")return n;const i=yield Promise.all(n.map(Yj));return j2($A(i))}return j2(Nb(t.files).map(n=>Ql(n)))})}function j2(t){return t.filter(e=>Uj.indexOf(e.name)===-1)}function Nb(t){if(t===null)return[];const e=[];for(let n=0;n<t.length;n++){const i=t[n];e.push(i)}return e}function Yj(t){if(typeof t.webkitGetAsEntry!="function")return B2(t);const e=t.webkitGetAsEntry();return e&&e.isDirectory?GA(e):B2(t,e)}function $A(t){return t.reduce((e,n)=>[...e,...Array.isArray(n)?$A(n):[n]],[])}function B2(t,e){return Ho(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&typeof t.getAsFileSystemHandle=="function"){const s=yield t.getAsFileSystemHandle();if(s===null)throw new Error(`${t} is not a File`);if(s!==void 0){const l=yield s.getFile();return l.handle=s,Ql(l)}}const i=t.getAsFile();if(!i)throw new Error(`${t} is not a File`);return Ql(i,(n=e==null?void 0:e.fullPath)!==null&&n!==void 0?n:void 0)})}function Xj(t){return Ho(this,void 0,void 0,function*(){return t.isDirectory?GA(t):Kj(t)})}function GA(t){const e=t.createReader();return new Promise((n,i)=>{const a=[];function s(){e.readEntries(l=>Ho(this,void 0,void 0,function*(){if(l.length){const d=Promise.all(l.map(Xj));a.push(d),s()}else try{const d=yield Promise.all(a);n(d)}catch(d){i(d)}}),l=>{i(l)})}s()})}function Kj(t){return Ho(this,void 0,void 0,function*(){return new Promise((e,n)=>{t.file(i=>{const a=Ql(i,t.fullPath);e(a)},i=>{n(i)})})})}var Sh={},I2;function Qj(){return I2||(I2=1,Sh.__esModule=!0,Sh.default=function(t,e){if(t&&e){var n=Array.isArray(e)?e:e.split(",");if(n.length===0)return!0;var i=t.name||"",a=(t.type||"").toLowerCase(),s=a.replace(/\/.*$/,"");return n.some(function(l){var d=l.trim().toLowerCase();return d.charAt(0)==="."?i.toLowerCase().endsWith(d):d.endsWith("/*")?s===d.replace(/\/.*$/,""):a===d})}return!0}),Sh}var Jj=Qj();const Kv=Sd(Jj);function F2(t){return nB(t)||eB(t)||ZA(t)||tB()}function tB(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eB(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function nB(t){if(Array.isArray(t))return jb(t)}function H2(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,i)}return n}function U2(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?H2(Object(n),!0).forEach(function(i){WA(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):H2(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function WA(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function fd(t,e){return rB(t)||aB(t,e)||ZA(t,e)||iB()}function iB(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZA(t,e){if(t){if(typeof t=="string")return jb(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return jb(t,e)}}function jb(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function aB(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var i=[],a=!0,s=!1,l,d;try{for(n=n.call(t);!(a=(l=n.next()).done)&&(i.push(l.value),!(e&&i.length===e));a=!0);}catch(f){s=!0,d=f}finally{try{!a&&n.return!=null&&n.return()}finally{if(s)throw d}}return i}}function rB(t){if(Array.isArray(t))return t}var sB=typeof Kv=="function"?Kv:Kv.default,oB="file-invalid-type",lB="file-too-large",cB="file-too-small",uB="too-many-files",dB=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=e.split(","),i=n.length>1?"one of ".concat(n.join(", ")):n[0];return{code:oB,message:"File type must be ".concat(i)}},V2=function(e){return{code:lB,message:"File is larger than ".concat(e," ").concat(e===1?"byte":"bytes")}},$2=function(e){return{code:cB,message:"File is smaller than ".concat(e," ").concat(e===1?"byte":"bytes")}},fB={code:uB,message:"Too many files"};function hB(t){return t.type===""&&typeof t.getAsFile=="function"}function qA(t,e){var n=t.type==="application/x-moz-file"||sB(t,e)||hB(t);return[n,n?null:dB(e)]}function YA(t,e,n){if(Mo(t.size))if(Mo(e)&&Mo(n)){if(t.size>n)return[!1,V2(n)];if(t.size<e)return[!1,$2(e)]}else{if(Mo(e)&&t.size<e)return[!1,$2(e)];if(Mo(n)&&t.size>n)return[!1,V2(n)]}return[!0,null]}function Mo(t){return t!=null}function pB(t){var e=t.files,n=t.accept,i=t.minSize,a=t.maxSize,s=t.multiple,l=t.maxFiles,d=t.validator;return!s&&e.length>1||s&&l>=1&&e.length>l?!1:e.every(function(f){var p=qA(f,n),g=fd(p,1),v=g[0],y=YA(f,i,a),_=fd(y,1),w=_[0],C=d?d(f):null;return v&&w&&!C})}function bp(t){return typeof t.isPropagationStopped=="function"?t.isPropagationStopped():typeof t.cancelBubble<"u"?t.cancelBubble:!1}function Cu(t){return t.dataTransfer?Array.prototype.some.call(t.dataTransfer.types,function(e){return e==="Files"||e==="application/x-moz-file"}):!!t.target&&!!t.target.files}function G2(t){t.preventDefault()}function mB(t){return t.indexOf("MSIE")!==-1||t.indexOf("Trident/")!==-1}function gB(t){return t.indexOf("Edge/")!==-1}function vB(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return mB(t)||gB(t)}function ja(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(i){for(var a=arguments.length,s=new Array(a>1?a-1:0),l=1;l<a;l++)s[l-1]=arguments[l];return e.some(function(d){return!bp(i)&&d&&d.apply(void 0,[i].concat(s)),bp(i)})}}function bB(){return"showOpenFilePicker"in window}function yB(t){if(Mo(t)){var e=Object.entries(t).filter(function(n){var i=fd(n,2),a=i[0],s=i[1],l=!0;return XA(a)||(console.warn('Skipped "'.concat(a,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),l=!1),(!Array.isArray(s)||!s.every(KA))&&(console.warn('Skipped "'.concat(a,'" because an invalid file extension was provided.')),l=!1),l}).reduce(function(n,i){var a=fd(i,2),s=a[0],l=a[1];return U2(U2({},n),{},WA({},s,l))},{});return[{description:"Files",accept:e}]}return t}function xB(t){if(Mo(t))return Object.entries(t).reduce(function(e,n){var i=fd(n,2),a=i[0],s=i[1];return[].concat(F2(e),[a],F2(s))},[]).filter(function(e){return XA(e)||KA(e)}).join(",")}function _B(t){return t instanceof DOMException&&(t.name==="AbortError"||t.code===t.ABORT_ERR)}function SB(t){return t instanceof DOMException&&(t.name==="SecurityError"||t.code===t.SECURITY_ERR)}function XA(t){return t==="audio/*"||t==="video/*"||t==="image/*"||t==="text/*"||t==="application/*"||/\w+\/[-+.\w]+/g.test(t)}function KA(t){return/^.*\.[\w]+$/.test(t)}var wB=["children"],CB=["open"],EB=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],AB=["refKey","onChange","onClick"];function W2(t){return MB(t)||DB(t)||QA(t)||TB()}function TB(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function DB(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function MB(t){if(Array.isArray(t))return Bb(t)}function Qv(t,e){return LB(t)||kB(t,e)||QA(t,e)||OB()}function OB(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function QA(t,e){if(t){if(typeof t=="string")return Bb(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Bb(t,e)}}function Bb(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function kB(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var i=[],a=!0,s=!1,l,d;try{for(n=n.call(t);!(a=(l=n.next()).done)&&(i.push(l.value),!(e&&i.length===e));a=!0);}catch(f){s=!0,d=f}finally{try{!a&&n.return!=null&&n.return()}finally{if(s)throw d}}return i}}function LB(t){if(Array.isArray(t))return t}function Z2(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,i)}return n}function Ze(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Z2(Object(n),!0).forEach(function(i){Ib(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Z2(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function Ib(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function yp(t,e){if(t==null)return{};var n=zB(t,e),i,a;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(a=0;a<s.length;a++)i=s[a],!(e.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}function zB(t,e){if(t==null)return{};var n={},i=Object.keys(t),a,s;for(s=0;s<i.length;s++)a=i[s],!(e.indexOf(a)>=0)&&(n[a]=t[a]);return n}var qy=O.forwardRef(function(t,e){var n=t.children,i=yp(t,wB),a=Hb(i),s=a.open,l=yp(a,CB);return O.useImperativeHandle(e,function(){return{open:s}},[s]),be.createElement(O.Fragment,null,n(Ze(Ze({},l),{},{open:s})))});qy.displayName="Dropzone";var JA={disabled:!1,getFilesFromEvent:Vj,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};qy.defaultProps=JA;qy.propTypes={children:Ve.func,accept:Ve.objectOf(Ve.arrayOf(Ve.string)),multiple:Ve.bool,preventDropOnDocument:Ve.bool,noClick:Ve.bool,noKeyboard:Ve.bool,noDrag:Ve.bool,noDragEventsBubbling:Ve.bool,minSize:Ve.number,maxSize:Ve.number,maxFiles:Ve.number,disabled:Ve.bool,getFilesFromEvent:Ve.func,onFileDialogCancel:Ve.func,onFileDialogOpen:Ve.func,useFsAccessApi:Ve.bool,autoFocus:Ve.bool,onDragEnter:Ve.func,onDragLeave:Ve.func,onDragOver:Ve.func,onDrop:Ve.func,onDropAccepted:Ve.func,onDropRejected:Ve.func,onError:Ve.func,validator:Ve.func};var Fb={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,isDragGlobal:!1,acceptedFiles:[],fileRejections:[]};function Hb(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=Ze(Ze({},JA),t),n=e.accept,i=e.disabled,a=e.getFilesFromEvent,s=e.maxSize,l=e.minSize,d=e.multiple,f=e.maxFiles,p=e.onDragEnter,g=e.onDragLeave,v=e.onDragOver,y=e.onDrop,_=e.onDropAccepted,w=e.onDropRejected,C=e.onFileDialogCancel,A=e.onFileDialogOpen,k=e.useFsAccessApi,z=e.autoFocus,j=e.preventDropOnDocument,P=e.noClick,H=e.noKeyboard,V=e.noDrag,U=e.noDragEventsBubbling,Z=e.onError,Q=e.validator,et=O.useMemo(function(){return xB(n)},[n]),X=O.useMemo(function(){return yB(n)},[n]),R=O.useMemo(function(){return typeof A=="function"?A:q2},[A]),dt=O.useMemo(function(){return typeof C=="function"?C:q2},[C]),it=O.useRef(null),ut=O.useRef(null),I=O.useReducer(RB,Fb),$=Qv(I,2),q=$[0],nt=$[1],ot=q.isFocused,F=q.isFileDialogActive,K=O.useRef(typeof window<"u"&&window.isSecureContext&&k&&bB()),at=function(){!K.current&&F&&setTimeout(function(){if(ut.current){var Et=ut.current.files;Et.length||(nt({type:"closeDialog"}),dt())}},300)};O.useEffect(function(){return window.addEventListener("focus",at,!1),function(){window.removeEventListener("focus",at,!1)}},[ut,F,dt,K]);var mt=O.useRef([]),pt=O.useRef([]),yt=function(Et){it.current&&it.current.contains(Et.target)||(Et.preventDefault(),mt.current=[])};O.useEffect(function(){return j&&(document.addEventListener("dragover",G2,!1),document.addEventListener("drop",yt,!1)),function(){j&&(document.removeEventListener("dragover",G2),document.removeEventListener("drop",yt))}},[it,j]),O.useEffect(function(){var wt=function(gt){pt.current=[].concat(W2(pt.current),[gt.target]),Cu(gt)&&nt({isDragGlobal:!0,type:"setDragGlobal"})},Et=function(gt){pt.current=pt.current.filter(function(Ct){return Ct!==gt.target&&Ct!==null}),!(pt.current.length>0)&&nt({isDragGlobal:!1,type:"setDragGlobal"})},zt=function(){pt.current=[],nt({isDragGlobal:!1,type:"setDragGlobal"})},Yt=function(){pt.current=[],nt({isDragGlobal:!1,type:"setDragGlobal"})};return document.addEventListener("dragenter",wt,!1),document.addEventListener("dragleave",Et,!1),document.addEventListener("dragend",zt,!1),document.addEventListener("drop",Yt,!1),function(){document.removeEventListener("dragenter",wt),document.removeEventListener("dragleave",Et),document.removeEventListener("dragend",zt),document.removeEventListener("drop",Yt)}},[it]),O.useEffect(function(){return!i&&z&&it.current&&it.current.focus(),function(){}},[it,z,i]);var ft=O.useCallback(function(wt){Z?Z(wt):console.error(wt)},[Z]),Ht=O.useCallback(function(wt){wt.preventDefault(),wt.persist(),gn(wt),mt.current=[].concat(W2(mt.current),[wt.target]),Cu(wt)&&Promise.resolve(a(wt)).then(function(Et){if(!(bp(wt)&&!U)){var zt=Et.length,Yt=zt>0&&pB({files:Et,accept:et,minSize:l,maxSize:s,multiple:d,maxFiles:f,validator:Q}),re=zt>0&&!Yt;nt({isDragAccept:Yt,isDragReject:re,isDragActive:!0,type:"setDraggedFiles"}),p&&p(wt)}}).catch(function(Et){return ft(Et)})},[a,p,ft,U,et,l,s,d,f,Q]),Tt=O.useCallback(function(wt){wt.preventDefault(),wt.persist(),gn(wt);var Et=Cu(wt);if(Et&&wt.dataTransfer)try{wt.dataTransfer.dropEffect="copy"}catch{}return Et&&v&&v(wt),!1},[v,U]),Mt=O.useCallback(function(wt){wt.preventDefault(),wt.persist(),gn(wt);var Et=mt.current.filter(function(Yt){return it.current&&it.current.contains(Yt)}),zt=Et.indexOf(wt.target);zt!==-1&&Et.splice(zt,1),mt.current=Et,!(Et.length>0)&&(nt({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Cu(wt)&&g&&g(wt))},[it,g,U]),Ee=O.useCallback(function(wt,Et){var zt=[],Yt=[];wt.forEach(function(re){var gt=qA(re,et),Ct=Qv(gt,2),Ot=Ct[0],jt=Ct[1],Gt=YA(re,l,s),Bt=Qv(Gt,2),Vt=Bt[0],ae=Bt[1],An=Q?Q(re):null;if(Ot&&Vt&&!An)zt.push(re);else{var Wn=[jt,ae];An&&(Wn=Wn.concat(An)),Yt.push({file:re,errors:Wn.filter(function(ra){return ra})})}}),(!d&&zt.length>1||d&&f>=1&&zt.length>f)&&(zt.forEach(function(re){Yt.push({file:re,errors:[fB]})}),zt.splice(0)),nt({acceptedFiles:zt,fileRejections:Yt,type:"setFiles"}),y&&y(zt,Yt,Et),Yt.length>0&&w&&w(Yt,Et),zt.length>0&&_&&_(zt,Et)},[nt,d,et,l,s,f,y,_,w,Q]),Ut=O.useCallback(function(wt){wt.preventDefault(),wt.persist(),gn(wt),mt.current=[],Cu(wt)&&Promise.resolve(a(wt)).then(function(Et){bp(wt)&&!U||Ee(Et,wt)}).catch(function(Et){return ft(Et)}),nt({type:"reset"})},[a,Ee,ft,U]),ye=O.useCallback(function(){if(K.current){nt({type:"openDialog"}),R();var wt={multiple:d,types:X};window.showOpenFilePicker(wt).then(function(Et){return a(Et)}).then(function(Et){Ee(Et,null),nt({type:"closeDialog"})}).catch(function(Et){_B(Et)?(dt(Et),nt({type:"closeDialog"})):SB(Et)?(K.current=!1,ut.current?(ut.current.value=null,ut.current.click()):ft(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):ft(Et)});return}ut.current&&(nt({type:"openDialog"}),R(),ut.current.value=null,ut.current.click())},[nt,R,dt,k,Ee,ft,X,d]),ge=O.useCallback(function(wt){!it.current||!it.current.isEqualNode(wt.target)||(wt.key===" "||wt.key==="Enter"||wt.keyCode===32||wt.keyCode===13)&&(wt.preventDefault(),ye())},[it,ye]),ve=O.useCallback(function(){nt({type:"focus"})},[]),Cn=O.useCallback(function(){nt({type:"blur"})},[]),En=O.useCallback(function(){P||(vB()?setTimeout(ye,0):ye())},[P,ye]),nn=function(Et){return i?null:Et},mn=function(Et){return H?null:nn(Et)},kn=function(Et){return V?null:nn(Et)},gn=function(Et){U&&Et.stopPropagation()},wi=O.useMemo(function(){return function(){var wt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Et=wt.refKey,zt=Et===void 0?"ref":Et,Yt=wt.role,re=wt.onKeyDown,gt=wt.onFocus,Ct=wt.onBlur,Ot=wt.onClick,jt=wt.onDragEnter,Gt=wt.onDragOver,Bt=wt.onDragLeave,Vt=wt.onDrop,ae=yp(wt,EB);return Ze(Ze(Ib({onKeyDown:mn(ja(re,ge)),onFocus:mn(ja(gt,ve)),onBlur:mn(ja(Ct,Cn)),onClick:nn(ja(Ot,En)),onDragEnter:kn(ja(jt,Ht)),onDragOver:kn(ja(Gt,Tt)),onDragLeave:kn(ja(Bt,Mt)),onDrop:kn(ja(Vt,Ut)),role:typeof Yt=="string"&&Yt!==""?Yt:"presentation"},zt,it),!i&&!H?{tabIndex:0}:{}),ae)}},[it,ge,ve,Cn,En,Ht,Tt,Mt,Ut,H,V,i]),Rt=O.useCallback(function(wt){wt.stopPropagation()},[]),At=O.useMemo(function(){return function(){var wt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Et=wt.refKey,zt=Et===void 0?"ref":Et,Yt=wt.onChange,re=wt.onClick,gt=yp(wt,AB),Ct=Ib({accept:et,multiple:d,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:nn(ja(Yt,Ut)),onClick:nn(ja(re,Rt)),tabIndex:-1},zt,ut);return Ze(Ze({},Ct),gt)}},[ut,n,d,Ut,i]);return Ze(Ze({},q),{},{isFocused:ot&&!i,getRootProps:wi,getInputProps:At,rootRef:it,inputRef:ut,open:nn(ye)})}function RB(t,e){switch(e.type){case"focus":return Ze(Ze({},t),{},{isFocused:!0});case"blur":return Ze(Ze({},t),{},{isFocused:!1});case"openDialog":return Ze(Ze({},Fb),{},{isFileDialogActive:!0});case"closeDialog":return Ze(Ze({},t),{},{isFileDialogActive:!1});case"setDraggedFiles":return Ze(Ze({},t),{},{isDragActive:e.isDragActive,isDragAccept:e.isDragAccept,isDragReject:e.isDragReject});case"setFiles":return Ze(Ze({},t),{},{acceptedFiles:e.acceptedFiles,fileRejections:e.fileRejections,isDragReject:!1});case"setDragGlobal":return Ze(Ze({},t),{},{isDragGlobal:e.isDragGlobal});case"reset":return Ze({},Fb);default:return t}}function q2(){}function PB(t,e,n){var d,f;const i=(t.x2-t.x1)/e,a=(t.y2-t.y1)/n,s=t.x1/e+i/2,l=t.y1/n+a/2;return{id:crypto.randomUUID(),classNum:((d=t.class)==null?void 0:d.Id)??0,label:((f=t.class)==null?void 0:f.Name)??"",confidence:1,affiliation:t.affiliation??0,combatReadiness:t.combatReadiness??0,centerX:s,centerY:l,width:i,height:a}}function NB(t){const e=Math.floor(t/3600),n=Math.floor(t%3600/60),i=Math.floor(t%60),a=Math.floor((t-Math.floor(t))*1e3);return`${String(e).padStart(2,"0")}:${String(n).padStart(2,"0")}:${String(i).padStart(2,"0")}.${String(a).padStart(3,"0")}`}async function jB(t,e,n,i,a){const s={mediaId:t,time:e!=null?NB(e):null,detections:n.map(l=>PB(l,i,a))};return ie.post("/api/annotations/annotations",s)}async function BB(t){const e=t?`?flightId=${t}`:"";return ie.get(`/api/annotations/media${e}`)}async function IB(t,e){const n=new FormData;return n.append("file",e),t&&n.append("flightId",t),ie.upload("/api/annotations/media",n)}async function FB(t){return ie.delete(`/api/annotations/media/${t}`)}async function Y2(t){return(await ie.get(`/api/annotations/annotations?mediaId=${t}&pageSize=1000`)).items??[]}async function HB(){return ie.get("/api/admin/detection-classes")}function X2(t){return`/api/annotations/media/${t}/file`}function UB({files:t,selectedFile:e,onFileSelect:n,flightId:i,onRefresh:a}){const[s,l]=O.useState(""),d=async k=>{for(const z of k)try{await IB(i,z)}catch(j){console.error("Upload failed",j)}a&&a()},{getRootProps:f,getInputProps:p,isDragActive:g,open:v}=Hb({onDrop:d,multiple:!0}),{getRootProps:y,getInputProps:_,open:w}=Hb({onDrop:d,multiple:!0}),C=t.filter(k=>(k.name??"").toLowerCase().includes(s.toLowerCase())),A=async(k,z)=>{if(k.stopPropagation(),!!confirm(`Delete ${z.name}?`))try{await FB(z.id),a&&a()}catch(j){console.error(j)}};return T.jsxs("div",{className:"explorer",children:[T.jsxs("div",{className:"explorer-head",children:[T.jsx("h3",{className:"menu-title",children:"Files"}),T.jsx("button",{className:"open-btn",type:"button",onClick:v,children:"Open File"}),T.jsx("button",{className:"open-btn",type:"button",onClick:w,children:"Open Folder"})]}),T.jsx("input",{className:"file-filter",type:"text",placeholder:"Filename",onChange:k=>l(k.target.value)}),T.jsx("ul",{className:"file-list-group",children:C.map(k=>T.jsxs("li",{className:"file-list-item",style:{backgroundColor:(e==null?void 0:e.id)===k.id?"#474A52":"#858CA2"},onClick:()=>n(k),children:[T.jsx("span",{children:k.name}),T.jsx("button",{style:{float:"right",background:"none",border:0,color:"#fff",cursor:"pointer"},onClick:z=>A(z,k),children:"×"})]},k.id??k.name))}),T.jsxs("div",{className:"file-input-block",...f(),children:[T.jsx("input",{...p()}),T.jsx("div",{style:{display:"none"},children:T.jsx("input",{..._(),webkitdirectory:"true",mozdirectory:"true"})}),g?T.jsx("p",{className:"label",children:"Drop here"}):T.jsx("p",{className:"label",children:"Drag new files"})]})]})}class K2{constructor(e,n,i){this.Id=e,this.Name=n,this.Color=i}}var tT={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Q2=be.createContext&&be.createContext(tT),VB=["attr","size","title"];function $B(t,e){if(t==null)return{};var n,i,a=GB(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)n=s[i],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(a[n]=t[n])}return a}function GB(t,e){if(t==null)return{};var n={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.indexOf(i)!==-1)continue;n[i]=t[i]}return n}function xp(){return xp=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)({}).hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},xp.apply(null,arguments)}function J2(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,i)}return n}function _p(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?J2(Object(n),!0).forEach(function(i){WB(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):J2(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function WB(t,e,n){return(e=ZB(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ZB(t){var e=qB(t,"string");return typeof e=="symbol"?e:e+""}function qB(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function eT(t){return t&&t.map((e,n)=>be.createElement(e.tag,_p({key:n},e.attr),eT(e.child)))}function Yy(t){return e=>be.createElement(YB,xp({attr:_p({},t.attr)},e),eT(t.child))}function YB(t){var e=n=>{var{attr:i,size:a,title:s}=t,l=$B(t,VB),d=a||n.size||"1em",f;return n.className&&(f=n.className),t.className&&(f=(f?f+" ":"")+t.className),be.createElement("svg",xp({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,i,l,{className:f,style:_p(_p({color:t.color||n.color},n.style),t.style),height:d,width:d,xmlns:"http://www.w3.org/2000/svg"}),s&&be.createElement("title",null,s),t.children)};return Q2!==void 0?be.createElement(Q2.Consumer,null,n=>e(n)):e(tT)}function XB(t){return Yy({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m6.76 4.84-1.8-1.79-1.41 1.41 1.79 1.79zM1 10.5h3v2H1zM11 .55h2V3.5h-2zm8.04 2.495 1.408 1.407-1.79 1.79-1.407-1.408zm-1.8 15.115 1.79 1.8 1.41-1.41-1.8-1.79zM20 10.5h3v2h-3zm-8-5c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6zm0 10c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4zm-1 4h2v2.95h-2zm-7.45-.96 1.41 1.41 1.79-1.8-1.41-1.41z"},child:[]}]})(t)}function KB(t){return Yy({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15.5 22c1.05 0 2.05-.16 3-.46-4.06-1.27-7-5.06-7-9.54s2.94-8.27 7-9.54c-.95-.3-1.95-.46-3-.46-5.52 0-10 4.48-10 10s4.48 10 10 10z"},child:[]}]})(t)}function QB(t){return Yy({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M440.1 355.2l-39.2-23 34.1-9.3c8.4-2.3 13.4-11.1 11.1-19.6l-4.1-15.5c-2.2-8.5-10.9-13.6-19.3-11.3L343 298.2 271.2 256l71.9-42.2 79.7 21.7c8.4 2.3 17-2.8 19.3-11.3l4.1-15.5c2.2-8.5-2.7-17.3-11.1-19.6l-34.1-9.3 39.2-23c7.5-4.4 10.1-14.2 5.8-21.9l-7.9-13.9c-4.3-7.7-14-10.3-21.5-5.9l-39.2 23 9.1-34.7c2.2-8.5-2.7-17.3-11.1-19.6l-15.2-4.1c-8.4-2.3-17 2.8-19.3 11.3l-21.3 81-71.9 42.2v-84.5L306 70.4c6.1-6.2 6.1-16.4 0-22.6l-11.1-11.3c-6.1-6.2-16.1-6.2-22.2 0l-24.9 25.4V16c0-8.8-7-16-15.7-16h-15.7c-8.7 0-15.7 7.2-15.7 16v46.1l-24.9-25.4c-6.1-6.2-16.1-6.2-22.2 0L142.1 48c-6.1 6.2-6.1 16.4 0 22.6l58.3 59.3v84.5l-71.9-42.2-21.3-81c-2.2-8.5-10.9-13.6-19.3-11.3L72.7 84c-8.4 2.3-13.4 11.1-11.1 19.6l9.1 34.7-39.2-23c-7.5-4.4-17.1-1.8-21.5 5.9l-7.9 13.9c-4.3 7.7-1.8 17.4 5.8 21.9l39.2 23-34.1 9.1c-8.4 2.3-13.4 11.1-11.1 19.6L6 224.2c2.2 8.5 10.9 13.6 19.3 11.3l79.7-21.7 71.9 42.2-71.9 42.2-79.7-21.7c-8.4-2.3-17 2.8-19.3 11.3l-4.1 15.5c-2.2 8.5 2.7 17.3 11.1 19.6l34.1 9.3-39.2 23c-7.5 4.4-10.1 14.2-5.8 21.9L10 391c4.3 7.7 14 10.3 21.5 5.9l39.2-23-9.1 34.7c-2.2 8.5 2.7 17.3 11.1 19.6l15.2 4.1c8.4 2.3 17-2.8 19.3-11.3l21.3-81 71.9-42.2v84.5l-58.3 59.3c-6.1 6.2-6.1 16.4 0 22.6l11.1 11.3c6.1 6.2 16.1 6.2 22.2 0l24.9-25.4V496c0 8.8 7 16 15.7 16h15.7c8.7 0 15.7-7.2 15.7-16v-46.1l24.9 25.4c6.1 6.2 16.1 6.2 22.2 0l11.1-11.3c6.1-6.2 6.1-16.4 0-22.6l-58.3-59.3v-84.5l71.9 42.2 21.3 81c2.2 8.5 10.9 13.6 19.3 11.3L375 428c8.4-2.3 13.4-11.1 11.1-19.6l-9.1-34.7 39.2 23c7.5 4.4 17.1 1.8 21.5-5.9l7.9-13.9c4.6-7.5 2.1-17.3-5.5-21.7z"},child:[]}]})(t)}const bs={day:"day",night:"night",winter:"winter"},wh=["#FF0000","#00FF00","#0000FF","#FFFF00","#FF00FF","#00FFFF","#000000","#800000","#008000","#000080","#808000","#800080","#008080","#808080","#C00000","#00C000","#0000C0","#C0C000","#C000C0","#00C0C0","#C0C0C0"];function tw(t,e="0.2"){if(!t)return`rgba(128, 128, 128, ${e})`;const n=parseInt(t.slice(1,3),16),i=parseInt(t.slice(3,5),16),a=parseInt(t.slice(5,7),16);return`rgba(${n}, ${i}, ${a}, ${e})`}function JB({onClassSelect:t,detectionType:e,setDetectionType:n}){const[i,a]=O.useState([]),[s,l]=O.useState(null);O.useEffect(()=>{HB().then(p=>{const g=(p??[]).map(v=>new K2(v.id??v.Id,v.name??v.Name,v.color??wh[(v.id??v.Id)%wh.length]));a(g),g.length>0&&!s&&(l(g[0]),t&&t(g[0]))}).catch(()=>{const p=[{Id:0,Name:"Car"},{Id:1,Name:"Person"},{Id:2,Name:"Truck"},{Id:3,Name:"Bicycle"},{Id:4,Name:"Motorcycle"},{Id:5,Name:"Bus"}].map(g=>new K2(g.Id,g.Name,wh[g.Id%wh.length]));a(p),!s&&p.length&&(l(p[0]),t&&t(p[0]))})},[]);const d=p=>{l(p),t&&t(p)},f=p=>n(p);return T.jsxs("div",{className:"detection",children:[T.jsxs("div",{className:"class-list",children:[T.jsx("h3",{className:"menu-title",children:"Classes"}),T.jsx("ul",{className:"class-list-group",children:i.map(p=>{const g=tw(p.Color,"0.2"),v=tw(p.Color,"0.8"),y=s&&s.Id===p.Id;return T.jsx("li",{className:"class-list-item",style:{border:`1px solid ${y?"#000":"#eee0"}`,backgroundColor:y?v:g},onClick:()=>d(p),children:p.Name},p.Id)})})]}),T.jsxs("div",{className:"detection-type-group",children:[T.jsx("button",{className:e===bs.day?"detection-type-btn active-type":"detection-type-btn",title:"Day",onClick:()=>f(bs.day),children:T.jsx(XB,{})}),T.jsx("button",{className:e===bs.night?"detection-type-btn active-type":"detection-type-btn",title:"Night",onClick:()=>f(bs.night),children:T.jsx(KB,{})}),T.jsx("button",{className:e===bs.winter?"detection-type-btn active-type":"detection-type-btn",title:"Winter",onClick:()=>f(bs.winter),children:T.jsx(QB,{})})]})]})}const Vh=(t,e)=>{if(!e.current)return{x:0,y:0};const n=e.current.getBoundingClientRect();return{x:t.clientX-n.left,y:t.clientY-n.top}},tI=(t,e,n,i)=>{if(!i.current)return!1;const{x:a,y:s}=Vh({clientX:t,clientY:e},i);return a>=n.x1&&a<=n.x2&&s>=n.y1&&s<=n.y2},ew=(t,e,n,i,a)=>{let s=t-n.x,l=e-n.y,d=s+(i.x2-i.x1),f=l+(i.y2-i.y1);if(!a.current)return{newX1:s,newY1:l,newX2:d,newY2:f};let p=a.current.offsetWidth,g=a.current.offsetHeight;return s<0&&(s=0,d=i.x2-i.x1),l<0&&(l=0,f=i.y2-i.y1),d>p&&(d=p,s=d-(i.x2-i.x1)),f>g&&(f=g,l=f-(i.y2-i.y1)),{newX1:s,newY1:l,newX2:d,newY2:f}},eI=(t,e,n,i,a)=>{var v,y;let{x1:s,y1:l,x2:d,y2:f}=i;const p=((v=a.current)==null?void 0:v.offsetWidth)||640,g=((y=a.current)==null?void 0:y.offsetHeight)||480;switch(n){case"top-left":s=Math.min(t,i.x2-5),l=Math.min(e,i.y2-5);break;case"top-right":d=Math.max(t,i.x1+5),l=Math.min(e,i.y2-5);break;case"bottom-left":s=Math.min(t,i.x2-5),f=Math.max(e,i.y1+5);break;case"bottom-right":d=Math.max(t,i.x1+5),f=Math.max(e,i.y1+5);break;case"top-middle":l=Math.min(e,i.y2-5);break;case"bottom-middle":f=Math.max(e,i.y1+5);break;case"left-middle":s=Math.min(t,i.x2-5);break;case"right-middle":d=Math.max(t,i.x1+5);break}return s=Math.max(0,s),l=Math.max(0,l),d=Math.min(p,d),f=Math.min(g,f),{...i,x1:s,y1:l,x2:d,y2:f}},nT={0:"#FFD700",1:"#228be6",2:"#fa5252"};function nI({affiliation:t}){const e=nT[t];return e?t===1?T.jsx("rect",{x:0,y:0,width:10,height:7,fill:e,stroke:"#000",strokeWidth:.5}):t===2?T.jsx("polygon",{points:"5,0 10,5 5,10 0,5",fill:e,stroke:"#000",strokeWidth:.5}):T.jsx("circle",{cx:5,cy:5,r:4,fill:e,stroke:"#000",strokeWidth:.5}):null}function nw({detection:t,isSelected:e,onDetectionMouseDown:n,onResize:i,detectionType:a}){if(!t||!t.class)return null;const{Color:s}=t.class;if(!s)return null;const l=s.startsWith("rgba")?s.replace(/rgba\((\d+),\s*(\d+),\s*(\d+),\s*[\d.]+\)/,"rgba($1, $2, $3, 1)"):s,d=8,f=[{position:"top-left",cursor:"nwse-resize",x:-d,y:-d},{position:"top-right",cursor:"nesw-resize",x:t.x2-t.x1,y:-d},{position:"bottom-left",cursor:"nesw-resize",x:-d,y:t.y2-t.y1},{position:"bottom-right",cursor:"nwse-resize",x:t.x2-t.x1,y:t.y2-t.y1},{position:"top-middle",cursor:"ns-resize",x:(t.x2-t.x1)/2-d/2,y:-d},{position:"bottom-middle",cursor:"ns-resize",x:(t.x2-t.x1)/2-d/2,y:t.y2-t.y1},{position:"left-middle",cursor:"ew-resize",x:-d,y:(t.y2-t.y1)/2-d/2},{position:"right-middle",cursor:"ew-resize",x:t.x2-t.x1,y:(t.y2-t.y1)/2-d/2}],p={position:"absolute",left:`${t.x1}px`,top:`${t.y1}px`,width:`${t.x2-t.x1}px`,height:`${t.y2-t.y1}px`,border:`2px solid ${l}`,boxSizing:"border-box",cursor:e?"move":"default",pointerEvents:"auto",zIndex:e?2:1};e&&(p.border="3px solid black",p.boxShadow=`0 0 4px 4px ${l}`);const g=y=>{y.stopPropagation(),n(y)},v=(y,_)=>{y.stopPropagation(),y.preventDefault(),i(y,_)};return T.jsxs("div",{style:p,onMouseDown:g,children:[e&&f.map(y=>T.jsx("div",{style:{position:"absolute",left:`${y.x}px`,top:`${y.y}px`,width:`${d}px`,height:`${d}px`,backgroundColor:"black",cursor:y.cursor,pointerEvents:"auto",zIndex:3},onMouseDown:_=>v(_,y.position)},y.position)),T.jsxs("span",{style:{color:"white",fontSize:"12px",position:"absolute",top:"-18px",left:"0px",textShadow:"1px 1px 2px black",pointerEvents:"none",display:"inline-flex",alignItems:"center",gap:"4px"},children:[t.class.Name,a!==bs.day?` (${a})`:"",nT[t.affiliation]&&T.jsx("svg",{width:10,height:10,viewBox:"0 0 10 10",children:T.jsx(nI,{affiliation:t.affiliation})})]}),t.combatReadiness===1&&T.jsx("div",{style:{position:"absolute",top:"4px",right:"4px",width:"6px",height:"6px",borderRadius:"50%",backgroundColor:"#40c057",pointerEvents:"none"}})]})}function iw({detections:t,selectedDetectionIndices:e,onDetectionMouseDown:n,currentDetection:i,onResize:a,detectionType:s,readOnly:l}){return T.jsxs(T.Fragment,{children:[t.map((d,f)=>T.jsx(nw,{detection:d,isSelected:!l&&e.includes(f),onDetectionMouseDown:l?()=>{}:p=>n(p,f),onResize:l?()=>{}:(p,g)=>a(p,f,g),detectionType:s},f)),i&&T.jsx(nw,{detection:i,isSelected:!1,onDetectionMouseDown:()=>{},onResize:()=>{},detectionType:s})]})}function aw({width:t,height:e,detections:n,initialCurrentDetection:i=null,selectedDetectionIndices:a,onDetectionsChange:s,onSelectionChange:l,children:d,detectionClass:f,detectionType:p,timeWindowDetections:g=[]}){const v=O.useRef(null),[y,_]=O.useState(i),[w,C]=O.useState(null),[A,k]=O.useState({x:0,y:0}),[z,j]=O.useState(null),[P,H]=O.useState(n||[]),[V,U]=O.useState(a||[]),[,Z]=O.useState({width:t||640,height:e||480}),[Q,et]=O.useState(!1);O.useEffect(()=>{t&&e&&Z({width:t,height:e})},[t,e]),O.useEffect(()=>{H(n||[])},[n]),O.useEffect(()=>{U(a||[])},[a]);const X=I=>{if(I.preventDefault(),!v.current)return;const{x:$,y:q}=Vh(I,v);C({mouseX:$,mouseY:q});let nt=!1;for(let ot=P.length-1;ot>=0;ot--)if(tI(I.clientX,I.clientY,P[ot],v)){const F=I.ctrlKey?V.includes(ot)?V.filter(K=>K!==ot):[...V,ot]:[ot];U(F),l&&l(F),k({x:$-P[ot].x1,y:q-P[ot].y1}),et(!0),nt=!0;break}nt||(I.ctrlKey||(U([]),l&&l([])),f&&_({x1:$,y1:q,x2:$,y2:q,class:f}))},R=I=>{if(!v.current)return;const{x:$,y:q}=Vh(I,v);if(V.length>0&&w&&!z){et(!0);const nt=[...P],ot=V[0];if(ot===void 0||!nt[ot])return;const F=nt[ot],{newX1:K,newY1:at}=ew($,q,A,F,v),mt=K-F.x1,pt=at-F.y1;V.forEach(yt=>{if(nt[yt]===void 0)return;const ft=nt[yt],Ht=ft.x1+mt,Tt=ft.y1+pt,Mt=ft.x2+mt,Ee=ft.y2+pt,Ut=ew(Ht+A.x,Tt+A.y,A,{...ft,x1:Ht,y1:Tt,x2:Mt,y2:Ee},v);ft.x1=Ut.newX1,ft.y1=Ut.newY1,ft.x2=Ut.newX2,ft.y2=Ut.newY2}),H(nt),s&&s(nt)}else if(y&&!z)_(nt=>({...nt,x2:$,y2:q}));else if(z){et(!0);const{index:nt,position:ot}=z;if(P[nt]===void 0)return;const F=[...P],K={...F[nt]};F[nt]=eI($,q,ot,K,v),H(F),s&&s(F)}},dt=I=>{if((Q||z)&&I.stopPropagation(),y&&w){const $=Math.abs(y.x2-y.x1),q=Math.abs(y.y2-y.y1);if($>5&&q>5){const nt={...y,x1:Math.min(y.x1,y.x2),y1:Math.min(y.y1,y.y2),x2:Math.max(y.x1,y.x2),y2:Math.max(y.y1,y.y2),kw:t/v.current.offsetWidth,kh:e/v.current.offsetHeight},ot=[...P,nt];H(ot),s&&s(ot)}}_(null),C(null),k({x:0,y:0}),j(null),et(!1)},it=(I,$)=>{if(I.stopPropagation(),!V.includes($)){const ot=I.ctrlKey?[...V,$]:[$];U(ot),l&&l(ot)}const{x:q,y:nt}=Vh(I,v);k({x:q-P[$].x1,y:nt-P[$].y1}),C({x:q,y:nt}),et(!0)},ut=(I,$,q)=>{if(I.stopPropagation(),j({index:$,position:q}),!V.includes($)){const nt=I.ctrlKey?[...V,$]:[$];U(nt),l&&l(nt)}et(!0)};return O.useEffect(()=>{if(Q||z){const I=q=>R(q),$=q=>dt(q);return document.addEventListener("mousemove",I),document.addEventListener("mouseup",$),()=>{document.removeEventListener("mousemove",I),document.removeEventListener("mouseup",$)}}},[Q,z,w]),T.jsx("div",{className:"editor-container",children:T.jsxs("div",{className:"canvas-editor",ref:v,onMouseDown:X,onMouseMove:R,onMouseUp:dt,onMouseLeave:dt,children:[d,T.jsx(iw,{detections:g,selectedDetectionIndices:[],onDetectionMouseDown:()=>{},onResize:()=>{},detectionType:p,readOnly:!0}),T.jsx(iw,{detections:P,selectedDetectionIndices:V,onDetectionMouseDown:it,currentDetection:y,onResize:ut,detectionType:p})]})})}const hd={black:"#000",white:"#fff"},zl={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},Rl={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Pl={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Nl={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},jl={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"},Eu={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},iI={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};function Io(t,...e){const n=new URL(`https://mui.com/production-error/?code=${t}`);return e.forEach(i=>n.searchParams.append("args[]",i)),`Minified MUI error #${t}; visit ${n} for the full message.`}const aI="$$material";function rI(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function sI(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var oI=(function(){function t(n){var i=this;this._insertTag=function(a){var s;i.tags.length===0?i.insertionPoint?s=i.insertionPoint.nextSibling:i.prepend?s=i.container.firstChild:s=i.before:s=i.tags[i.tags.length-1].nextSibling,i.container.insertBefore(a,s),i.tags.push(a)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(i){i.forEach(this._insertTag)},e.insert=function(i){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(sI(this));var a=this.tags[this.tags.length-1];if(this.isSpeedy){var s=rI(a);try{s.insertRule(i,s.cssRules.length)}catch{}}else a.appendChild(document.createTextNode(i));this.ctr++},e.flush=function(){this.tags.forEach(function(i){var a;return(a=i.parentNode)==null?void 0:a.removeChild(i)}),this.tags=[],this.ctr=0},t})(),Xn="-ms-",Sp="-moz-",Te="-webkit-",iT="comm",Xy="rule",Ky="decl",lI="@import",aT="@keyframes",cI="@layer",uI=Math.abs,em=String.fromCharCode,dI=Object.assign;function fI(t,e){return Vn(t,0)^45?(((e<<2^Vn(t,0))<<2^Vn(t,1))<<2^Vn(t,2))<<2^Vn(t,3):0}function rT(t){return t.trim()}function hI(t,e){return(t=e.exec(t))?t[0]:t}function De(t,e,n){return t.replace(e,n)}function Ub(t,e){return t.indexOf(e)}function Vn(t,e){return t.charCodeAt(e)|0}function pd(t,e,n){return t.slice(e,n)}function Va(t){return t.length}function Qy(t){return t.length}function Ch(t,e){return e.push(t),t}function pI(t,e){return t.map(e).join("")}var nm=1,Jl=1,sT=0,Si=0,wn=0,lc="";function im(t,e,n,i,a,s,l){return{value:t,root:e,parent:n,type:i,props:a,children:s,line:nm,column:Jl,length:l,return:""}}function Au(t,e){return dI(im("",null,null,"",null,null,0),t,{length:-t.length},e)}function mI(){return wn}function gI(){return wn=Si>0?Vn(lc,--Si):0,Jl--,wn===10&&(Jl=1,nm--),wn}function Bi(){return wn=Si<sT?Vn(lc,Si++):0,Jl++,wn===10&&(Jl=1,nm++),wn}function Za(){return Vn(lc,Si)}function $h(){return Si}function Od(t,e){return pd(lc,t,e)}function md(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function oT(t){return nm=Jl=1,sT=Va(lc=t),Si=0,[]}function lT(t){return lc="",t}function Gh(t){return rT(Od(Si-1,Vb(t===91?t+2:t===40?t+1:t)))}function vI(t){for(;(wn=Za())&&wn<33;)Bi();return md(t)>2||md(wn)>3?"":" "}function bI(t,e){for(;--e&&Bi()&&!(wn<48||wn>102||wn>57&&wn<65||wn>70&&wn<97););return Od(t,$h()+(e<6&&Za()==32&&Bi()==32))}function Vb(t){for(;Bi();)switch(wn){case t:return Si;case 34:case 39:t!==34&&t!==39&&Vb(wn);break;case 40:t===41&&Vb(t);break;case 92:Bi();break}return Si}function yI(t,e){for(;Bi()&&t+wn!==57;)if(t+wn===84&&Za()===47)break;return"/*"+Od(e,Si-1)+"*"+em(t===47?t:Bi())}function xI(t){for(;!md(Za());)Bi();return Od(t,Si)}function _I(t){return lT(Wh("",null,null,null,[""],t=oT(t),0,[0],t))}function Wh(t,e,n,i,a,s,l,d,f){for(var p=0,g=0,v=l,y=0,_=0,w=0,C=1,A=1,k=1,z=0,j="",P=a,H=s,V=i,U=j;A;)switch(w=z,z=Bi()){case 40:if(w!=108&&Vn(U,v-1)==58){Ub(U+=De(Gh(z),"&","&\f"),"&\f")!=-1&&(k=-1);break}case 34:case 39:case 91:U+=Gh(z);break;case 9:case 10:case 13:case 32:U+=vI(w);break;case 92:U+=bI($h()-1,7);continue;case 47:switch(Za()){case 42:case 47:Ch(SI(yI(Bi(),$h()),e,n),f);break;default:U+="/"}break;case 123*C:d[p++]=Va(U)*k;case 125*C:case 59:case 0:switch(z){case 0:case 125:A=0;case 59+g:k==-1&&(U=De(U,/\f/g,"")),_>0&&Va(U)-v&&Ch(_>32?sw(U+";",i,n,v-1):sw(De(U," ","")+";",i,n,v-2),f);break;case 59:U+=";";default:if(Ch(V=rw(U,e,n,p,g,a,d,j,P=[],H=[],v),s),z===123)if(g===0)Wh(U,e,V,V,P,s,v,d,H);else switch(y===99&&Vn(U,3)===110?100:y){case 100:case 108:case 109:case 115:Wh(t,V,V,i&&Ch(rw(t,V,V,0,0,a,d,j,a,P=[],v),H),a,H,v,d,i?P:H);break;default:Wh(U,V,V,V,[""],H,0,d,H)}}p=g=_=0,C=k=1,j=U="",v=l;break;case 58:v=1+Va(U),_=w;default:if(C<1){if(z==123)--C;else if(z==125&&C++==0&&gI()==125)continue}switch(U+=em(z),z*C){case 38:k=g>0?1:(U+="\f",-1);break;case 44:d[p++]=(Va(U)-1)*k,k=1;break;case 64:Za()===45&&(U+=Gh(Bi())),y=Za(),g=v=Va(j=U+=xI($h())),z++;break;case 45:w===45&&Va(U)==2&&(C=0)}}return s}function rw(t,e,n,i,a,s,l,d,f,p,g){for(var v=a-1,y=a===0?s:[""],_=Qy(y),w=0,C=0,A=0;w<i;++w)for(var k=0,z=pd(t,v+1,v=uI(C=l[w])),j=t;k<_;++k)(j=rT(C>0?y[k]+" "+z:De(z,/&\f/g,y[k])))&&(f[A++]=j);return im(t,e,n,a===0?Xy:d,f,p,g)}function SI(t,e,n){return im(t,e,n,iT,em(mI()),pd(t,2,-2),0)}function sw(t,e,n,i){return im(t,e,n,Ky,pd(t,0,i),pd(t,i+1,-1),i)}function $l(t,e){for(var n="",i=Qy(t),a=0;a<i;a++)n+=e(t[a],a,t,e)||"";return n}function wI(t,e,n,i){switch(t.type){case cI:if(t.children.length)break;case lI:case Ky:return t.return=t.return||t.value;case iT:return"";case aT:return t.return=t.value+"{"+$l(t.children,i)+"}";case Xy:t.value=t.props.join(",")}return Va(n=$l(t.children,i))?t.return=t.value+"{"+n+"}":""}function CI(t){var e=Qy(t);return function(n,i,a,s){for(var l="",d=0;d<e;d++)l+=t[d](n,i,a,s)||"";return l}}function EI(t){return function(e){e.root||(e=e.return)&&t(e)}}function cT(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var AI=function(e,n,i){for(var a=0,s=0;a=s,s=Za(),a===38&&s===12&&(n[i]=1),!md(s);)Bi();return Od(e,Si)},TI=function(e,n){var i=-1,a=44;do switch(md(a)){case 0:a===38&&Za()===12&&(n[i]=1),e[i]+=AI(Si-1,n,i);break;case 2:e[i]+=Gh(a);break;case 4:if(a===44){e[++i]=Za()===58?"&\f":"",n[i]=e[i].length;break}default:e[i]+=em(a)}while(a=Bi());return e},DI=function(e,n){return lT(TI(oT(e),n))},ow=new WeakMap,MI=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var n=e.value,i=e.parent,a=e.column===i.column&&e.line===i.line;i.type!=="rule";)if(i=i.parent,!i)return;if(!(e.props.length===1&&n.charCodeAt(0)!==58&&!ow.get(i))&&!a){ow.set(e,!0);for(var s=[],l=DI(n,s),d=i.props,f=0,p=0;f<l.length;f++)for(var g=0;g<d.length;g++,p++)e.props[p]=s[f]?l[f].replace(/&\f/g,d[g]):d[g]+" "+l[f]}}},OI=function(e){if(e.type==="decl"){var n=e.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(e.return="",e.value="")}};function uT(t,e){switch(fI(t,e)){case 5103:return Te+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Te+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return Te+t+Sp+t+Xn+t+t;case 6828:case 4268:return Te+t+Xn+t+t;case 6165:return Te+t+Xn+"flex-"+t+t;case 5187:return Te+t+De(t,/(\w+).+(:[^]+)/,Te+"box-$1$2"+Xn+"flex-$1$2")+t;case 5443:return Te+t+Xn+"flex-item-"+De(t,/flex-|-self/,"")+t;case 4675:return Te+t+Xn+"flex-line-pack"+De(t,/align-content|flex-|-self/,"")+t;case 5548:return Te+t+Xn+De(t,"shrink","negative")+t;case 5292:return Te+t+Xn+De(t,"basis","preferred-size")+t;case 6060:return Te+"box-"+De(t,"-grow","")+Te+t+Xn+De(t,"grow","positive")+t;case 4554:return Te+De(t,/([^-])(transform)/g,"$1"+Te+"$2")+t;case 6187:return De(De(De(t,/(zoom-|grab)/,Te+"$1"),/(image-set)/,Te+"$1"),t,"")+t;case 5495:case 3959:return De(t,/(image-set\([^]*)/,Te+"$1$`$1");case 4968:return De(De(t,/(.+:)(flex-)?(.*)/,Te+"box-pack:$3"+Xn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Te+t+t;case 4095:case 3583:case 4068:case 2532:return De(t,/(.+)-inline(.+)/,Te+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Va(t)-1-e>6)switch(Vn(t,e+1)){case 109:if(Vn(t,e+4)!==45)break;case 102:return De(t,/(.+:)(.+)-([^]+)/,"$1"+Te+"$2-$3$1"+Sp+(Vn(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~Ub(t,"stretch")?uT(De(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(Vn(t,e+1)!==115)break;case 6444:switch(Vn(t,Va(t)-3-(~Ub(t,"!important")&&10))){case 107:return De(t,":",":"+Te)+t;case 101:return De(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Te+(Vn(t,14)===45?"inline-":"")+"box$3$1"+Te+"$2$3$1"+Xn+"$2box$3")+t}break;case 5936:switch(Vn(t,e+11)){case 114:return Te+t+Xn+De(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return Te+t+Xn+De(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return Te+t+Xn+De(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return Te+t+Xn+t+t}return t}var kI=function(e,n,i,a){if(e.length>-1&&!e.return)switch(e.type){case Ky:e.return=uT(e.value,e.length);break;case aT:return $l([Au(e,{value:De(e.value,"@","@"+Te)})],a);case Xy:if(e.length)return pI(e.props,function(s){switch(hI(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return $l([Au(e,{props:[De(s,/:(read-\w+)/,":"+Sp+"$1")]})],a);case"::placeholder":return $l([Au(e,{props:[De(s,/:(plac\w+)/,":"+Te+"input-$1")]}),Au(e,{props:[De(s,/:(plac\w+)/,":"+Sp+"$1")]}),Au(e,{props:[De(s,/:(plac\w+)/,Xn+"input-$1")]})],a)}return""})}},LI=[kI],zI=function(e){var n=e.key;if(n==="css"){var i=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(i,function(C){var A=C.getAttribute("data-emotion");A.indexOf(" ")!==-1&&(document.head.appendChild(C),C.setAttribute("data-s",""))})}var a=e.stylisPlugins||LI,s={},l,d=[];l=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(C){for(var A=C.getAttribute("data-emotion").split(" "),k=1;k<A.length;k++)s[A[k]]=!0;d.push(C)});var f,p=[MI,OI];{var g,v=[wI,EI(function(C){g.insert(C)})],y=CI(p.concat(a,v)),_=function(A){return $l(_I(A),y)};f=function(A,k,z,j){g=z,_(A?A+"{"+k.styles+"}":k.styles),j&&(w.inserted[k.name]=!0)}}var w={key:n,sheet:new oI({key:n,container:l,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:f};return w.sheet.hydrate(d),w},RI=!0;function PI(t,e,n){var i="";return n.split(" ").forEach(function(a){t[a]!==void 0?e.push(t[a]+";"):a&&(i+=a+" ")}),i}var dT=function(e,n,i){var a=e.key+"-"+n.name;(i===!1||RI===!1)&&e.registered[a]===void 0&&(e.registered[a]=n.styles)},NI=function(e,n,i){dT(e,n,i);var a=e.key+"-"+n.name;if(e.inserted[n.name]===void 0){var s=n;do e.insert(n===s?"."+a:"",s,e.sheet,!0),s=s.next;while(s!==void 0)}};function jI(t){for(var e=0,n,i=0,a=t.length;a>=4;++i,a-=4)n=t.charCodeAt(i)&255|(t.charCodeAt(++i)&255)<<8|(t.charCodeAt(++i)&255)<<16|(t.charCodeAt(++i)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(a){case 3:e^=(t.charCodeAt(i+2)&255)<<16;case 2:e^=(t.charCodeAt(i+1)&255)<<8;case 1:e^=t.charCodeAt(i)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var BI={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},II=/[A-Z]|^ms/g,FI=/_EMO_([^_]+?)_([^]*?)_EMO_/g,fT=function(e){return e.charCodeAt(1)===45},lw=function(e){return e!=null&&typeof e!="boolean"},Jv=cT(function(t){return fT(t)?t:t.replace(II,"-$&").toLowerCase()}),cw=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(FI,function(i,a,s){return $a={name:a,styles:s,next:$a},a})}return BI[e]!==1&&!fT(e)&&typeof n=="number"&&n!==0?n+"px":n};function gd(t,e,n){if(n==null)return"";var i=n;if(i.__emotion_styles!==void 0)return i;switch(typeof n){case"boolean":return"";case"object":{var a=n;if(a.anim===1)return $a={name:a.name,styles:a.styles,next:$a},a.name;var s=n;if(s.styles!==void 0){var l=s.next;if(l!==void 0)for(;l!==void 0;)$a={name:l.name,styles:l.styles,next:$a},l=l.next;var d=s.styles+";";return d}return HI(t,e,n)}case"function":{if(t!==void 0){var f=$a,p=n(t);return $a=f,gd(t,e,p)}break}}var g=n;if(e==null)return g;var v=e[g];return v!==void 0?v:g}function HI(t,e,n){var i="";if(Array.isArray(n))for(var a=0;a<n.length;a++)i+=gd(t,e,n[a])+";";else for(var s in n){var l=n[s];if(typeof l!="object"){var d=l;e!=null&&e[d]!==void 0?i+=s+"{"+e[d]+"}":lw(d)&&(i+=Jv(s)+":"+cw(s,d)+";")}else if(Array.isArray(l)&&typeof l[0]=="string"&&(e==null||e[l[0]]===void 0))for(var f=0;f<l.length;f++)lw(l[f])&&(i+=Jv(s)+":"+cw(s,l[f])+";");else{var p=gd(t,e,l);switch(s){case"animation":case"animationName":{i+=Jv(s)+":"+p+";";break}default:i+=s+"{"+p+"}"}}}return i}var uw=/label:\s*([^\s;{]+)\s*(;|$)/g,$a;function hT(t,e,n){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var i=!0,a="";$a=void 0;var s=t[0];if(s==null||s.raw===void 0)i=!1,a+=gd(n,e,s);else{var l=s;a+=l[0]}for(var d=1;d<t.length;d++)if(a+=gd(n,e,t[d]),i){var f=s;a+=f[d]}uw.lastIndex=0;for(var p="",g;(g=uw.exec(a))!==null;)p+="-"+g[1];var v=jI(a)+p;return{name:v,styles:a,next:$a}}var UI=function(e){return e()},VI=r1.useInsertionEffect?r1.useInsertionEffect:!1,$I=VI||UI,pT=O.createContext(typeof HTMLElement<"u"?zI({key:"css"}):null);pT.Provider;var GI=function(e){return O.forwardRef(function(n,i){var a=O.useContext(pT);return e(n,a,i)})},WI=O.createContext({}),ZI=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,qI=cT(function(t){return ZI.test(t)||t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)<91}),YI=qI,XI=function(e){return e!=="theme"},dw=function(e){return typeof e=="string"&&e.charCodeAt(0)>96?YI:XI},fw=function(e,n,i){var a;if(n){var s=n.shouldForwardProp;a=e.__emotion_forwardProp&&s?function(l){return e.__emotion_forwardProp(l)&&s(l)}:s}return typeof a!="function"&&i&&(a=e.__emotion_forwardProp),a},KI=function(e){var n=e.cache,i=e.serialized,a=e.isStringTag;return dT(n,i,a),$I(function(){return NI(n,i,a)}),null},QI=function t(e,n){var i=e.__emotion_real===e,a=i&&e.__emotion_base||e,s,l;n!==void 0&&(s=n.label,l=n.target);var d=fw(e,n,i),f=d||dw(a),p=!f("as");return function(){var g=arguments,v=i&&e.__emotion_styles!==void 0?e.__emotion_styles.slice(0):[];if(s!==void 0&&v.push("label:"+s+";"),g[0]==null||g[0].raw===void 0)v.push.apply(v,g);else{var y=g[0];v.push(y[0]);for(var _=g.length,w=1;w<_;w++)v.push(g[w],y[w])}var C=GI(function(A,k,z){var j=p&&A.as||a,P="",H=[],V=A;if(A.theme==null){V={};for(var U in A)V[U]=A[U];V.theme=O.useContext(WI)}typeof A.className=="string"?P=PI(k.registered,H,A.className):A.className!=null&&(P=A.className+" ");var Z=hT(v.concat(H),k.registered,V);P+=k.key+"-"+Z.name,l!==void 0&&(P+=" "+l);var Q=p&&d===void 0?dw(j):f,et={};for(var X in A)p&&X==="as"||Q(X)&&(et[X]=A[X]);return et.className=P,z&&(et.ref=z),O.createElement(O.Fragment,null,O.createElement(KI,{cache:k,serialized:Z,isStringTag:typeof j=="string"}),O.createElement(j,et))});return C.displayName=s!==void 0?s:"Styled("+(typeof a=="string"?a:a.displayName||a.name||"Component")+")",C.defaultProps=e.defaultProps,C.__emotion_real=C,C.__emotion_base=a,C.__emotion_styles=v,C.__emotion_forwardProp=d,Object.defineProperty(C,"toString",{value:function(){return"."+l}}),C.withComponent=function(A,k){var z=t(A,Ku({},n,k,{shouldForwardProp:fw(C,k,!0)}));return z.apply(void 0,v)},C}},JI=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],$b=QI.bind(null);JI.forEach(function(t){$b[t]=$b(t)});function t9(t,e){return $b(t,e)}function e9(t,e){Array.isArray(t.__emotion_styles)&&(t.__emotion_styles=e(t.__emotion_styles))}const hw=[];function Po(t){return hw[0]=t,hT(hw)}var tb={exports:{}},Fe={};/**
|
||
* @license React
|
||
* react-is.production.js
|
||
*
|
||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var pw;function n9(){if(pw)return Fe;pw=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),l=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),y=Symbol.for("react.view_transition"),_=Symbol.for("react.client.reference");function w(C){if(typeof C=="object"&&C!==null){var A=C.$$typeof;switch(A){case t:switch(C=C.type,C){case n:case a:case i:case f:case p:case y:return C;default:switch(C=C&&C.$$typeof,C){case l:case d:case v:case g:return C;case s:return C;default:return A}}case e:return A}}}return Fe.ContextConsumer=s,Fe.ContextProvider=l,Fe.Element=t,Fe.ForwardRef=d,Fe.Fragment=n,Fe.Lazy=v,Fe.Memo=g,Fe.Portal=e,Fe.Profiler=a,Fe.StrictMode=i,Fe.Suspense=f,Fe.SuspenseList=p,Fe.isContextConsumer=function(C){return w(C)===s},Fe.isContextProvider=function(C){return w(C)===l},Fe.isElement=function(C){return typeof C=="object"&&C!==null&&C.$$typeof===t},Fe.isForwardRef=function(C){return w(C)===d},Fe.isFragment=function(C){return w(C)===n},Fe.isLazy=function(C){return w(C)===v},Fe.isMemo=function(C){return w(C)===g},Fe.isPortal=function(C){return w(C)===e},Fe.isProfiler=function(C){return w(C)===a},Fe.isStrictMode=function(C){return w(C)===i},Fe.isSuspense=function(C){return w(C)===f},Fe.isSuspenseList=function(C){return w(C)===p},Fe.isValidElementType=function(C){return typeof C=="string"||typeof C=="function"||C===n||C===a||C===i||C===f||C===p||typeof C=="object"&&C!==null&&(C.$$typeof===v||C.$$typeof===g||C.$$typeof===l||C.$$typeof===s||C.$$typeof===d||C.$$typeof===_||C.getModuleId!==void 0)},Fe.typeOf=w,Fe}var mw;function i9(){return mw||(mw=1,tb.exports=n9()),tb.exports}var mT=i9();function Tr(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function gT(t){if(O.isValidElement(t)||mT.isValidElementType(t)||!Tr(t))return t;const e={};return Object.keys(t).forEach(n=>{e[n]=gT(t[n])}),e}function ia(t,e,n={clone:!0}){const i=n.clone?{...t}:t;return Tr(t)&&Tr(e)&&Object.keys(e).forEach(a=>{O.isValidElement(e[a])||mT.isValidElementType(e[a])?i[a]=e[a]:Tr(e[a])&&Object.prototype.hasOwnProperty.call(t,a)&&Tr(t[a])?i[a]=ia(t[a],e[a],n):n.clone?i[a]=Tr(e[a])?gT(e[a]):e[a]:i[a]=e[a]}),i}const a9=t=>{const e=Object.keys(t).map(n=>({key:n,val:t[n]}))||[];return e.sort((n,i)=>n.val-i.val),e.reduce((n,i)=>({...n,[i.key]:i.val}),{})};function vT(t){const{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:i=5,...a}=t,s=a9(e),l=Object.keys(s);function d(_){return`@media (min-width:${typeof e[_]=="number"?e[_]:_}${n})`}function f(_){return`@media (max-width:${(typeof e[_]=="number"?e[_]:_)-i/100}${n})`}function p(_,w){const C=l.indexOf(w);return`@media (min-width:${typeof e[_]=="number"?e[_]:_}${n}) and (max-width:${(C!==-1&&typeof e[l[C]]=="number"?e[l[C]]:w)-i/100}${n})`}function g(_){return l.indexOf(_)+1<l.length?p(_,l[l.indexOf(_)+1]):d(_)}function v(_){const w=l.indexOf(_);return w===0?d(l[1]):w===l.length-1?f(l[w]):p(_,l[l.indexOf(_)+1]).replace("@media","@media not all and")}const y=[];for(let _=0;_<l.length;_+=1)y.push(d(l[_]));return{keys:l,values:s,up:d,down:f,between:p,only:g,not:v,unit:n,internal_mediaKeys:y,...a}}const gw=/min-width:\s*([0-9.]+)/;function vw(t,e){if(!t.containerQueries||!r9(e))return e;const n=[];for(const a in e)a.startsWith("@container")&&n.push(a);n.sort((a,s)=>{var l,d;return+(((l=a.match(gw))==null?void 0:l[1])||0)-+(((d=s.match(gw))==null?void 0:d[1])||0)});const i=e;for(let a=0;a<n.length;a+=1){const s=n[a],l=i[s];delete i[s],i[s]=l}return i}function r9(t){for(const e in t)if(e.startsWith("@container"))return!0;return!1}function bT(t,e){return e==="@"||e.startsWith("@")&&(t.some(n=>e.startsWith(`@${n}`))||!!e.match(/^@\d/))}function s9(t,e){const n=e.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,i,a]=n,s=Number.isNaN(+i)?i||0:+i;return t.containerQueries(a).up(s)}function o9(t){const e=(s,l)=>s.replace("@media",l?`@container ${l}`:"@container");function n(s,l){s.up=(...d)=>e(t.breakpoints.up(...d),l),s.down=(...d)=>e(t.breakpoints.down(...d),l),s.between=(...d)=>e(t.breakpoints.between(...d),l),s.only=(...d)=>e(t.breakpoints.only(...d),l),s.not=(...d)=>{const f=e(t.breakpoints.not(...d),l);return f.includes("not all and")?f.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):f}}const i={},a=s=>(n(i,s),i);return n(a),{...t,containerQueries:a}}const l9={borderRadius:4};function yT(t){if(t==null)return!0;for(const e in t)return!1;return!0}function vd(t,e){const n=Array.isArray(e),i=Array.isArray(t);return h9(e)?e:p9(t)?tc(e):n&&i?d9(t,e):n!==i?tc(e):m9(t,e)}function c9(t){let e=0;const n=t.length,i=new Array(n);for(e=0;e<n;e+=1)i[e]=tc(t[e]);return i}function u9(t){const e={};for(const n in t)e[n]=tc(t[n]);return e}function d9(t,e){const n=t.length;for(let i=0;i<e.length;i+=1)t[n+i]=tc(e[i]);return t}function f9(t){return typeof t=="object"&&t!==null&&!(t instanceof RegExp)&&!(t instanceof Date)}function h9(t){return typeof t!="object"||t===null}function p9(t){return typeof t!="object"||t===null||t instanceof RegExp||t instanceof Date}function tc(t){return f9(t)?Array.isArray(t)?c9(t):u9(t):t}function m9(t,e){for(const n in e)n in t?t[n]=vd(t[n],e[n]):t[n]=tc(e[n]);return t}const g9={},am={xs:0,sm:600,md:900,lg:1200,xl:1536},wp=vT({values:am}),v9={containerQueries:t=>({up:e=>{let n=typeof e=="number"?e:am[e]||e;return typeof n=="number"&&(n=`${n}px`),t?`@container ${t} (min-width:${n})`:`@container (min-width:${n})`}})};function cc(t,e,n){const i={};return rm(i,t.theme,e,(a,s,l)=>{const d=n(s,l);a?i[a]=d:vd(i,d)})}function rm(t,e,n,i){if(e??(e=g9),Array.isArray(n)){const a=e.breakpoints??wp;for(let s=0;s<n.length;s+=1)eb(t,a.up(a.keys[s]),n[s],void 0,i);return t}if(typeof n=="object"){const a=e.breakpoints??wp,s=a.values??am;for(const l in n)if(bT(a.keys,l)){const d=s9(e.containerQueries?e:v9,l);d&&eb(t,d,n[l],l,i)}else if(l in s){const d=a.up(l);eb(t,d,n[l],l,i)}else{const d=l;t[d]=n[d]}return t}return i(void 0,n),t}function eb(t,e,n,i,a){t[e]??(t[e]={}),a(e,n,i)}function b9(t=wp){const{internal_mediaKeys:e}=t,n={};for(let i=0;i<e.length;i+=1)n[e[i]]={};return n}function bw(t,e){const n=t.internal_mediaKeys;for(let i=0;i<n.length;i+=1){const a=n[i];yT(e[a])&&delete e[a]}return e}function y9(t,e){if(Array.isArray(e))return!0;if(typeof e=="object"&&e!==null){for(let i=0;i<t.keys.length;i+=1)if(t.keys[i]in e)return!0;const n=Object.keys(e);for(let i=0;i<n.length;i+=1)if(bT(t.keys,n[i]))return!0}return!1}function bd(t){if(typeof t!="string")throw new Error(Io(7));return t.charAt(0).toUpperCase()+t.slice(1)}function xT(t,e,n,i){let a;return typeof t=="function"?a=t(n):Array.isArray(t)?a=t[n]||n:typeof n=="string"?a=sm(t,n,!0,i)||n:a=n,e&&(a=e(a,n,t)),a}function sm(t,e,n=!0,i=void 0){if(!t||!e)return null;const a=e.split(".");if(t.vars&&n){const s=yw(t.vars,a,i);if(s!=null)return s}return yw(t,a,i)}function yw(t,e,n=void 0){let i,a=t,s=0;for(;s<e.length;){if(a==null)return a;i=a,a=a[e[s]],s+=1}if(n&&a===void 0){const l=e[e.length-1],d=`${n}${l==="default"?"":bd(l)}`;return i==null?void 0:i[d]}return a}function pn(t){const{prop:e,cssProperty:n=t.prop,themeKey:i,transform:a}=t,s=l=>{if(l[e]==null)return null;const d=l[e],f=l.theme,p=sm(f,i)||{};return cc(l,d,v=>{const y=xT(p,a,v,e);return n===!1?y:{[n]:y}})};return s.propTypes={},s.filterProps=[e],s}const x9={internal_cache:{}},Cp={m:"margin",p:"padding"},xw={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},_w={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},yd={};for(const t in Cp)yd[t]=[Cp[t]];for(const t in Cp)for(const e in xw){const n=Cp[t],i=xw[e],a=Array.isArray(i)?i.map(s=>n+s):[n+i];yd[t+e]=a}for(const t in _w)yd[t]=yd[_w[t]];const Jy=new Set(["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"]),tx=new Set(["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"]);[...Jy,...tx];function kd(t,e,n,i){const a=sm(t,e,!0)??n;return typeof a=="number"||typeof a=="string"?s=>typeof s=="string"?s:typeof a=="string"?a.startsWith("var(")&&s===0?0:a.startsWith("var(")&&s===1?a:`calc(${s} * ${a})`:a*s:Array.isArray(a)?s=>{if(typeof s=="string")return s;const l=Math.abs(s),d=a[l];return s>=0?d:typeof d=="number"?-d:typeof d=="string"&&d.startsWith("var(")?`calc(-1 * ${d})`:`-${d}`}:typeof a=="function"?a:()=>{}}function ex(t){return kd(t,"spacing",8)}function Ld(t,e){return typeof e=="string"||e==null?e:t(e)}const Sw=[""];function _T(t,e){var s;const n=t.theme??x9,i=((s=n==null?void 0:n.internal_cache)==null?void 0:s.unarySpacing)??ex(n),a={};for(const l in t){if(!e.has(l))continue;const d=yd[l]??(Sw[0]=l,Sw),f=t[l];rm(a,t.theme,f,(p,g)=>{const v=p?a[p]:a;for(let y=0;y<d.length;y+=1)v[d[y]]=Ld(i,g)})}return a}function ln(t){return _T(t,Jy)}ln.propTypes={};ln.filterProps=Jy;function cn(t){return _T(t,tx)}cn.propTypes={};cn.filterProps=tx;function ST(t=8,e=ex({spacing:t})){if(t.mui)return t;const n=(...i)=>(i.length===0?[1]:i).map(s=>{const l=e(s);return typeof l=="number"?`${l}px`:l}).join(" ");return n.mui=!0,n}function om(...t){const e=t.reduce((i,a)=>(a.filterProps.forEach(s=>{i[s]=a}),i),{}),n=i=>{const a={};for(const s in i)e[s]&&vd(a,e[s](i));return a};return n.propTypes={},n.filterProps=t.reduce((i,a)=>i.concat(a.filterProps),[]),n}function Ji(t){return typeof t!="number"?t:`${t}px solid`}function aa(t,e){return pn({prop:t,themeKey:"borders",transform:e})}const _9=aa("border",Ji),S9=aa("borderTop",Ji),w9=aa("borderRight",Ji),C9=aa("borderBottom",Ji),E9=aa("borderLeft",Ji),A9=aa("borderColor"),T9=aa("borderTopColor"),D9=aa("borderRightColor"),M9=aa("borderBottomColor"),O9=aa("borderLeftColor"),k9=aa("outline",Ji),L9=aa("outlineColor"),lm=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){const e=kd(t.theme,"shape.borderRadius",4),n=i=>({borderRadius:Ld(e,i)});return cc(t,t.borderRadius,n)}return null};lm.propTypes={};lm.filterProps=["borderRadius"];om(_9,S9,w9,C9,E9,A9,T9,D9,M9,O9,lm,k9,L9);const cm=t=>{if(t.gap!==void 0&&t.gap!==null){const e=kd(t.theme,"spacing",8),n=i=>({gap:Ld(e,i)});return cc(t,t.gap,n)}return null};cm.propTypes={};cm.filterProps=["gap"];const um=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){const e=kd(t.theme,"spacing",8),n=i=>({columnGap:Ld(e,i)});return cc(t,t.columnGap,n)}return null};um.propTypes={};um.filterProps=["columnGap"];const dm=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){const e=kd(t.theme,"spacing",8),n=i=>({rowGap:Ld(e,i)});return cc(t,t.rowGap,n)}return null};dm.propTypes={};dm.filterProps=["rowGap"];const z9=pn({prop:"gridColumn"}),R9=pn({prop:"gridRow"}),P9=pn({prop:"gridAutoFlow"}),N9=pn({prop:"gridAutoColumns"}),j9=pn({prop:"gridAutoRows"}),B9=pn({prop:"gridTemplateColumns"}),I9=pn({prop:"gridTemplateRows"}),F9=pn({prop:"gridTemplateAreas"}),H9=pn({prop:"gridArea"});om(cm,um,dm,z9,R9,P9,N9,j9,B9,I9,F9,H9);function Gl(t,e){return e==="grey"?e:t}const U9=pn({prop:"color",themeKey:"palette",transform:Gl}),V9=pn({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Gl}),$9=pn({prop:"backgroundColor",themeKey:"palette",transform:Gl});om(U9,V9,$9);function Ri(t){return t<=1&&t!==0?`${t*100}%`:t}const G9=pn({prop:"width",transform:Ri}),nx=t=>{if(t.maxWidth!==void 0&&t.maxWidth!==null){const e=n=>{var a,s,l,d,f;const i=((l=(s=(a=t.theme)==null?void 0:a.breakpoints)==null?void 0:s.values)==null?void 0:l[n])||am[n];return i?((f=(d=t.theme)==null?void 0:d.breakpoints)==null?void 0:f.unit)!=="px"?{maxWidth:`${i}${t.theme.breakpoints.unit}`}:{maxWidth:i}:{maxWidth:Ri(n)}};return cc(t,t.maxWidth,e)}return null};nx.filterProps=["maxWidth"];const W9=pn({prop:"minWidth",transform:Ri}),Z9=pn({prop:"height",transform:Ri}),q9=pn({prop:"maxHeight",transform:Ri}),Y9=pn({prop:"minHeight",transform:Ri});pn({prop:"size",cssProperty:"width",transform:Ri});pn({prop:"size",cssProperty:"height",transform:Ri});const X9=pn({prop:"boxSizing"});om(G9,nx,W9,Z9,q9,Y9,X9);const fm={border:{themeKey:"borders",transform:Ji},borderTop:{themeKey:"borders",transform:Ji},borderRight:{themeKey:"borders",transform:Ji},borderBottom:{themeKey:"borders",transform:Ji},borderLeft:{themeKey:"borders",transform:Ji},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Ji},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:lm},color:{themeKey:"palette",transform:Gl},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Gl},backgroundColor:{themeKey:"palette",transform:Gl},p:{style:cn},pt:{style:cn},pr:{style:cn},pb:{style:cn},pl:{style:cn},px:{style:cn},py:{style:cn},padding:{style:cn},paddingTop:{style:cn},paddingRight:{style:cn},paddingBottom:{style:cn},paddingLeft:{style:cn},paddingX:{style:cn},paddingY:{style:cn},paddingInline:{style:cn},paddingInlineStart:{style:cn},paddingInlineEnd:{style:cn},paddingBlock:{style:cn},paddingBlockStart:{style:cn},paddingBlockEnd:{style:cn},m:{style:ln},mt:{style:ln},mr:{style:ln},mb:{style:ln},ml:{style:ln},mx:{style:ln},my:{style:ln},margin:{style:ln},marginTop:{style:ln},marginRight:{style:ln},marginBottom:{style:ln},marginLeft:{style:ln},marginX:{style:ln},marginY:{style:ln},marginInline:{style:ln},marginInlineStart:{style:ln},marginInlineEnd:{style:ln},marginBlock:{style:ln},marginBlockStart:{style:ln},marginBlockEnd:{style:ln},displayPrint:{cssProperty:!1,transform:t=>({"@media print":{display:t}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:cm},rowGap:{style:dm},columnGap:{style:um},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Ri},maxWidth:{style:nx},minWidth:{transform:Ri},height:{transform:Ri},maxHeight:{transform:Ri},minHeight:{transform:Ri},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},K9={};function Q9(){function t(e){if(!e.sx)return null;const{sx:n,theme:i=K9,nested:a}=e,s=i.unstable_sxConfig??fm,l={sx:null,theme:i,nested:!0};function d(f){let p=f;if(typeof f=="function")p=f(i);else if(typeof f!="object")return f;if(!p)return null;const g=i.breakpoints??wp,v=b9(g);for(const y in p){const _=J9(p[y],i);if(_!=null){if(typeof _!="object"){ww(v,y,_,i,s);continue}if(s[y]){ww(v,y,_,i,s);continue}y9(g,_)?rm(v,e.theme,_,(w,C)=>{v[w][y]=C}):(l.sx=_,v[y]=t(l))}}return!a&&i.modularCssLayers?{"@layer sx":vw(i,bw(g,v))}:vw(i,bw(g,v))}return Array.isArray(n)?n.map(d):d(n)}return t.filterProps=["sx"],t}const xd=Q9();function ww(t,e,n,i,a){const s=a[e];if(!s){t[e]=n;return}if(n==null)return;const{themeKey:l}=s;if(l==="typography"&&n==="inherit"){t[e]=n;return}const{style:d}=s;if(d){vd(t,d({[e]:n,theme:i}));return}const{cssProperty:f=e,transform:p}=s,g=sm(i,l);rm(t,i,n,(v,y)=>{const _=xT(g,p,y,e);f===!1?v?t[v]=_:vd(t,_):v?t[v][f]=_:t[f]=_})}function J9(t,e){return typeof t=="function"?t(e):t}function t7(t,e){var i;const n=this;if(n.vars){if(!((i=n.colorSchemes)!=null&&i[t])||typeof n.getColorSchemeSelector!="function")return{};let a=n.getColorSchemeSelector(t);return a==="&"?e:((a.includes("data-")||a.includes("."))&&(a=`*:where(${a.replace(/\s*&$/,"")}) &`),{[a]:e})}return n.palette.mode===t?e:{}}function wT(t={},...e){const{breakpoints:n={},palette:i={},spacing:a,shape:s={},...l}=t,d=vT(n),f=ST(a);let p=ia({breakpoints:d,direction:"ltr",components:{},palette:{mode:"light",...i},spacing:f,shape:{...l9,...s}},l);return p=o9(p),p.applyStyles=t7,p=e.reduce((g,v)=>ia(g,v),p),p.unstable_sxConfig={...fm,...l==null?void 0:l.unstable_sxConfig},p.unstable_sx=function(v){return xd({sx:v,theme:this})},p.internal_cache={},p}const Cw=t=>t,e7=()=>{let t=Cw;return{configure(e){t=e},generate(e){return t(e)},reset(){t=Cw}}},n7=e7();function CT(t){var e,n,i="";if(typeof t=="string"||typeof t=="number")i+=t;else if(typeof t=="object")if(Array.isArray(t)){var a=t.length;for(e=0;e<a;e++)t[e]&&(n=CT(t[e]))&&(i&&(i+=" "),i+=n)}else for(n in t)t[n]&&(i&&(i+=" "),i+=n);return i}function Ts(){for(var t,e,n=0,i="",a=arguments.length;n<a;n++)(t=arguments[n])&&(e=CT(t))&&(i&&(i+=" "),i+=e);return i}const i7={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function ET(t,e,n="Mui"){const i=i7[e];return i?`${n}-${i}`:`${n7.generate(t)}-${e}`}function a7(t,e,n="Mui"){const i={};return e.forEach(a=>{i[a]=ET(t,a,n)}),i}function AT(t){const{variants:e,...n}=t,i={variants:e,style:Po(n),isProcessed:!0};return i.style===n||e&&e.forEach(a=>{typeof a.style!="function"&&(a.style=Po(a.style))}),i}const r7=wT();function nb(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}function ko(t,e){return e&&t&&typeof t=="object"&&t.styles&&!t.styles.startsWith("@layer")&&(t.styles=`@layer ${e}{${String(t.styles)}}`),t}function s7(t){return t?(e,n)=>n[t]:null}function o7(t,e,n){t.theme=yT(t.theme)?n:t.theme[e]||t.theme}function Zh(t,e,n){const i=typeof e=="function"?e(t):e;if(Array.isArray(i))return i.flatMap(a=>Zh(t,a,n));if(Array.isArray(i==null?void 0:i.variants)){let a;if(i.isProcessed)a=n?ko(i.style,n):i.style;else{const{variants:s,...l}=i;a=n?ko(Po(l),n):l}return TT(t,i.variants,[a],n)}return i!=null&&i.isProcessed?n?ko(Po(i.style),n):i.style:n?ko(Po(i),n):i}function TT(t,e,n=[],i=void 0){var s;let a;t:for(let l=0;l<e.length;l+=1){const d=e[l];if(typeof d.props=="function"){if(a??(a={...t,...t.ownerState,ownerState:t.ownerState}),!d.props(a))continue}else for(const f in d.props)if(t[f]!==d.props[f]&&((s=t.ownerState)==null?void 0:s[f])!==d.props[f])continue t;typeof d.style=="function"?(a??(a={...t,...t.ownerState,ownerState:t.ownerState}),n.push(i?ko(Po(d.style(a)),i):d.style(a))):n.push(i?ko(Po(d.style),i):d.style)}return n}function l7(t={}){const{themeId:e,defaultTheme:n=r7,rootShouldForwardProp:i=nb,slotShouldForwardProp:a=nb}=t;function s(d){o7(d,e,n)}return(d,f={})=>{e9(d,V=>V.filter(U=>U!==xd));const{name:p,slot:g,skipVariantsResolver:v,skipSx:y,overridesResolver:_=s7(d7(g)),...w}=f,C=p&&p.startsWith("Mui")||g?"components":"custom",A=v!==void 0?v:g&&g!=="Root"&&g!=="root"||!1,k=y||!1;let z=nb;g==="Root"||g==="root"?z=i:g?z=a:u7(d)&&(z=void 0);const j=t9(d,{shouldForwardProp:z,label:c7(),...w}),P=V=>{if(V.__emotion_real===V)return V;if(typeof V=="function")return function(Z){return Zh(Z,V,Z.theme.modularCssLayers?C:void 0)};if(Tr(V)){const U=AT(V);return function(Q){return U.variants?Zh(Q,U,Q.theme.modularCssLayers?C:void 0):Q.theme.modularCssLayers?ko(U.style,C):U.style}}return V},H=(...V)=>{const U=[],Z=V.map(P),Q=[];if(U.push(s),p&&_&&Q.push(function(dt){var $,q;const ut=(q=($=dt.theme.components)==null?void 0:$[p])==null?void 0:q.styleOverrides;if(!ut)return null;const I={};for(const nt in ut)I[nt]=Zh(dt,ut[nt],dt.theme.modularCssLayers?"theme":void 0);return _(dt,I)}),p&&!A&&Q.push(function(dt){var I,$;const it=dt.theme,ut=($=(I=it==null?void 0:it.components)==null?void 0:I[p])==null?void 0:$.variants;return ut?TT(dt,ut,[],dt.theme.modularCssLayers?"theme":void 0):null}),k||Q.push(xd),Array.isArray(Z[0])){const R=Z.shift(),dt=new Array(U.length).fill(""),it=new Array(Q.length).fill("");let ut;ut=[...dt,...R,...it],ut.raw=[...dt,...R.raw,...it],U.unshift(ut)}const et=[...U,...Z,...Q],X=j(...et);return d.muiName&&(X.muiName=d.muiName),X};return j.withConfig&&(H.withConfig=j.withConfig),H}}function c7(t,e){return void 0}function u7(t){return typeof t=="string"&&t.charCodeAt(0)>96}function d7(t){return t&&t.charAt(0).toLowerCase()+t.slice(1)}function Gb(t,e,n=!1){const i={...e};for(const a in t)if(Object.prototype.hasOwnProperty.call(t,a)){const s=a;if(s==="components"||s==="slots")i[s]={...t[s],...i[s]};else if(s==="componentsProps"||s==="slotProps"){const l=t[s],d=e[s];if(!d)i[s]=l||{};else if(!l)i[s]=d;else{i[s]={...d};for(const f in l)if(Object.prototype.hasOwnProperty.call(l,f)){const p=f;i[s][p]=Gb(l[p],d[p],n)}}}else s==="className"&&n&&e.className?i.className=Ts(t==null?void 0:t.className,e==null?void 0:e.className):s==="style"&&n&&e.style?i.style={...t==null?void 0:t.style,...e==null?void 0:e.style}:i[s]===void 0&&(i[s]=t[s])}return i}const DT=typeof window<"u"?O.useLayoutEffect:O.useEffect;function Do(t,e=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(e,Math.min(t,n))}function ix(t,e=0,n=1){return Do(t,e,n)}function f7(t){t=t.slice(1);const e=new RegExp(`.{1,${t.length>=6?2:1}}`,"g");let n=t.match(e);return n&&n[0].length===1&&(n=n.map(i=>i+i)),n?`rgb${n.length===4?"a":""}(${n.map((i,a)=>a<3?parseInt(i,16):Math.round(parseInt(i,16)/255*1e3)/1e3).join(", ")})`:""}function ks(t){if(t.type)return t;if(t.charAt(0)==="#")return ks(f7(t));const e=t.indexOf("("),n=t.substring(0,e);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(Io(9,t));let i=t.substring(e+1,t.length-1),a;if(n==="color"){if(i=i.split(" "),a=i.shift(),i.length===4&&i[3].charAt(0)==="/"&&(i[3]=i[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(a))throw new Error(Io(10,a))}else i=i.split(",");return i=i.map(s=>parseFloat(s)),{type:n,values:i,colorSpace:a}}const h7=t=>{const e=ks(t);return e.values.slice(0,3).map((n,i)=>e.type.includes("hsl")&&i!==0?`${n}%`:n).join(" ")},Bu=(t,e)=>{try{return h7(t)}catch{return t}};function hm(t){const{type:e,colorSpace:n}=t;let{values:i}=t;return e.includes("rgb")?i=i.map((a,s)=>s<3?parseInt(a,10):a):e.includes("hsl")&&(i[1]=`${i[1]}%`,i[2]=`${i[2]}%`),e.includes("color")?i=`${n} ${i.join(" ")}`:i=`${i.join(", ")}`,`${e}(${i})`}function MT(t){t=ks(t);const{values:e}=t,n=e[0],i=e[1]/100,a=e[2]/100,s=i*Math.min(a,1-a),l=(p,g=(p+n/30)%12)=>a-s*Math.max(Math.min(g-3,9-g,1),-1);let d="rgb";const f=[Math.round(l(0)*255),Math.round(l(8)*255),Math.round(l(4)*255)];return t.type==="hsla"&&(d+="a",f.push(e[3])),hm({type:d,values:f})}function Wb(t){t=ks(t);let e=t.type==="hsl"||t.type==="hsla"?ks(MT(t)).values:t.values;return e=e.map(n=>(t.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3))}function p7(t,e){const n=Wb(t),i=Wb(e);return(Math.max(n,i)+.05)/(Math.min(n,i)+.05)}function OT(t,e){return t=ks(t),e=ix(e),(t.type==="rgb"||t.type==="hsl")&&(t.type+="a"),t.type==="color"?t.values[3]=`/${e}`:t.values[3]=e,hm(t)}function Co(t,e,n){try{return OT(t,e)}catch{return t}}function pm(t,e){if(t=ks(t),e=ix(e),t.type.includes("hsl"))t.values[2]*=1-e;else if(t.type.includes("rgb")||t.type.includes("color"))for(let n=0;n<3;n+=1)t.values[n]*=1-e;return hm(t)}function ze(t,e,n){try{return pm(t,e)}catch{return t}}function mm(t,e){if(t=ks(t),e=ix(e),t.type.includes("hsl"))t.values[2]+=(100-t.values[2])*e;else if(t.type.includes("rgb"))for(let n=0;n<3;n+=1)t.values[n]+=(255-t.values[n])*e;else if(t.type.includes("color"))for(let n=0;n<3;n+=1)t.values[n]+=(1-t.values[n])*e;return hm(t)}function Re(t,e,n){try{return mm(t,e)}catch{return t}}function m7(t,e=.15){return Wb(t)>.5?pm(t,e):mm(t,e)}function Eh(t,e,n){try{return m7(t,e)}catch{return t}}const g7=O.createContext(),v7=()=>O.useContext(g7)??!1,b7=O.createContext(void 0);function y7(t){const{theme:e,name:n,props:i}=t;if(!e||!e.components||!e.components[n])return i;const a=e.components[n];return a.defaultProps?Gb(a.defaultProps,i,e.components.mergeClassNameAndStyle):!a.styleOverrides&&!a.variants?Gb(a,i,e.components.mergeClassNameAndStyle):i}function x7({props:t,name:e}){const n=O.useContext(b7);return y7({props:t,name:e,theme:{components:n}})}const Ew={theme:void 0};function _7(t){let e,n;return function(a){let s=e;return(s===void 0||a.theme!==n)&&(Ew.theme=a.theme,s=AT(t(Ew)),e=s,n=a.theme),s}}function S7(t=""){function e(...i){if(!i.length)return"";const a=i[0];return typeof a=="string"&&!a.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${t?`${t}-`:""}${a}${e(...i.slice(1))})`:`, ${a}`}return(i,...a)=>`var(--${t?`${t}-`:""}${i}${e(...a)})`}const Aw=(t,e,n,i=[])=>{let a=t;e.forEach((s,l)=>{l===e.length-1?Array.isArray(a)?a[Number(s)]=n:a&&typeof a=="object"&&(a[s]=n):a&&typeof a=="object"&&(a[s]||(a[s]=i.includes(s)?[]:{}),a=a[s])})},w7=(t,e,n)=>{function i(a,s=[],l=[]){Object.entries(a).forEach(([d,f])=>{(!n||n&&!n([...s,d]))&&f!=null&&(typeof f=="object"&&Object.keys(f).length>0?i(f,[...s,d],Array.isArray(f)?[...l,d]:l):e([...s,d],f,l))})}i(t)},C7=(t,e)=>typeof e=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(i=>t.includes(i))||t[t.length-1].toLowerCase().includes("opacity")?e:`${e}px`:e;function ib(t,e){const{prefix:n,shouldSkipGeneratingVar:i}=e||{},a={},s={},l={};return w7(t,(d,f,p)=>{if((typeof f=="string"||typeof f=="number")&&(!i||!i(d,f))){const g=`--${n?`${n}-`:""}${d.join("-")}`,v=C7(d,f);Object.assign(a,{[g]:v}),Aw(s,d,`var(${g})`,p),Aw(l,d,`var(${g}, ${v})`,p)}},d=>d[0]==="vars"),{css:a,vars:s,varsWithDefaults:l}}function E7(t,e={}){const{getSelector:n=k,disableCssColorScheme:i,colorSchemeSelector:a,enableContrastVars:s}=e,{colorSchemes:l={},components:d,defaultColorScheme:f="light",...p}=t,{vars:g,css:v,varsWithDefaults:y}=ib(p,e);let _=y;const w={},{[f]:C,...A}=l;if(Object.entries(A||{}).forEach(([P,H])=>{const{vars:V,css:U,varsWithDefaults:Z}=ib(H,e);_=ia(_,Z),w[P]={css:U,vars:V}}),C){const{css:P,vars:H,varsWithDefaults:V}=ib(C,e);_=ia(_,V),w[f]={css:P,vars:H}}function k(P,H){var U,Z;let V=a;if(a==="class"&&(V=".%s"),a==="data"&&(V="[data-%s]"),a!=null&&a.startsWith("data-")&&!a.includes("%s")&&(V=`[${a}="%s"]`),P){if(V==="media")return t.defaultColorScheme===P?":root":{[`@media (prefers-color-scheme: ${((Z=(U=l[P])==null?void 0:U.palette)==null?void 0:Z.mode)||P})`]:{":root":H}};if(V)return t.defaultColorScheme===P?`:root, ${V.replace("%s",String(P))}`:V.replace("%s",String(P))}return":root"}return{vars:_,generateThemeVars:()=>{let P={...g};return Object.entries(w).forEach(([,{vars:H}])=>{P=ia(P,H)}),P},generateStyleSheets:()=>{var Q,et;const P=[],H=t.defaultColorScheme||"light";function V(X,R){Object.keys(R).length&&P.push(typeof X=="string"?{[X]:{...R}}:X)}V(n(void 0,{...v}),v);const{[H]:U,...Z}=w;if(U){const{css:X}=U,R=(et=(Q=l[H])==null?void 0:Q.palette)==null?void 0:et.mode,dt=!i&&R?{colorScheme:R,...X}:{...X};V(n(H,{...dt}),dt)}return Object.entries(Z).forEach(([X,{css:R}])=>{var ut,I;const dt=(I=(ut=l[X])==null?void 0:ut.palette)==null?void 0:I.mode,it=!i&&dt?{colorScheme:dt,...R}:{...R};V(n(X,{...it}),it)}),s&&P.push({":root":{"--__l-threshold":"0.7","--__l":"clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)","--__a":"clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)"}}),P}}}function A7(t){return function(n){return t==="media"?`@media (prefers-color-scheme: ${n})`:t?t.startsWith("data-")&&!t.includes("%s")?`[${t}="${n}"] &`:t==="class"?`.${n} &`:t==="data"?`[data-${n}] &`:`${t.replace("%s",n)} &`:"&"}}function T7(t,e,n=void 0){const i={};for(const a in t){const s=t[a];let l="",d=!0;for(let f=0;f<s.length;f+=1){const p=s[f];p&&(l+=(d===!0?"":" ")+e(p),d=!1,n&&n[p]&&(l+=" "+n[p]))}i[a]=l}return i}function kT(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:hd.white,default:hd.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const LT=kT();function zT(){return{text:{primary:hd.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:hd.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const Zb=zT();function Tw(t,e,n,i){const a=i.light||i,s=i.dark||i*1.5;t[e]||(t.hasOwnProperty(n)?t[e]=t[n]:e==="light"?t.light=mm(t.main,a):e==="dark"&&(t.dark=pm(t.main,s)))}function Dw(t,e,n,i,a){const s=a.light||a,l=a.dark||a*1.5;e[n]||(e.hasOwnProperty(i)?e[n]=e[i]:n==="light"?e.light=`color-mix(in ${t}, ${e.main}, #fff ${(s*100).toFixed(0)}%)`:n==="dark"&&(e.dark=`color-mix(in ${t}, ${e.main}, #000 ${(l*100).toFixed(0)}%)`))}function D7(t="light"){return t==="dark"?{main:Pl[200],light:Pl[50],dark:Pl[400]}:{main:Pl[700],light:Pl[400],dark:Pl[800]}}function M7(t="light"){return t==="dark"?{main:Rl[200],light:Rl[50],dark:Rl[400]}:{main:Rl[500],light:Rl[300],dark:Rl[700]}}function O7(t="light"){return t==="dark"?{main:zl[500],light:zl[300],dark:zl[700]}:{main:zl[700],light:zl[400],dark:zl[800]}}function k7(t="light"){return t==="dark"?{main:Nl[400],light:Nl[300],dark:Nl[700]}:{main:Nl[700],light:Nl[500],dark:Nl[900]}}function L7(t="light"){return t==="dark"?{main:jl[400],light:jl[300],dark:jl[700]}:{main:jl[800],light:jl[500],dark:jl[900]}}function z7(t="light"){return t==="dark"?{main:Eu[400],light:Eu[300],dark:Eu[700]}:{main:"#ed6c02",light:Eu[500],dark:Eu[900]}}function R7(t){return`oklch(from ${t} var(--__l) 0 h / var(--__a))`}function ax(t){const{mode:e="light",contrastThreshold:n=3,tonalOffset:i=.2,colorSpace:a,...s}=t,l=t.primary||D7(e),d=t.secondary||M7(e),f=t.error||O7(e),p=t.info||k7(e),g=t.success||L7(e),v=t.warning||z7(e);function y(A){return a?R7(A):p7(A,Zb.text.primary)>=n?Zb.text.primary:LT.text.primary}const _=({color:A,name:k,mainShade:z=500,lightShade:j=300,darkShade:P=700})=>{if(A={...A},!A.main&&A[z]&&(A.main=A[z]),!A.hasOwnProperty("main"))throw new Error(Io(11,k?` (${k})`:"",z));if(typeof A.main!="string")throw new Error(Io(12,k?` (${k})`:"",JSON.stringify(A.main)));return a?(Dw(a,A,"light",j,i),Dw(a,A,"dark",P,i)):(Tw(A,"light",j,i),Tw(A,"dark",P,i)),A.contrastText||(A.contrastText=y(A.main)),A};let w;return e==="light"?w=kT():e==="dark"&&(w=zT()),ia({common:{...hd},mode:e,primary:_({color:l,name:"primary"}),secondary:_({color:d,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:_({color:f,name:"error"}),warning:_({color:v,name:"warning"}),info:_({color:p,name:"info"}),success:_({color:g,name:"success"}),grey:iI,contrastThreshold:n,getContrastText:y,augmentColor:_,tonalOffset:i,...w},s)}function P7(t){const e={};return Object.entries(t).forEach(i=>{const[a,s]=i;typeof s=="object"&&(e[a]=`${s.fontStyle?`${s.fontStyle} `:""}${s.fontVariant?`${s.fontVariant} `:""}${s.fontWeight?`${s.fontWeight} `:""}${s.fontStretch?`${s.fontStretch} `:""}${s.fontSize||""}${s.lineHeight?`/${s.lineHeight} `:""}${s.fontFamily||""}`)}),e}function N7(t,e){return{toolbar:{minHeight:56,[t.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[t.up("sm")]:{minHeight:64}},...e}}function j7(t){return Math.round(t*1e5)/1e5}const Mw={textTransform:"uppercase"},Ow='"Roboto", "Helvetica", "Arial", sans-serif';function B7(t,e){const{fontFamily:n=Ow,fontSize:i=14,fontWeightLight:a=300,fontWeightRegular:s=400,fontWeightMedium:l=500,fontWeightBold:d=700,htmlFontSize:f=16,allVariants:p,pxToRem:g,...v}=typeof e=="function"?e(t):e,y=i/14,_=g||(A=>`${A/f*y}rem`),w=(A,k,z,j,P)=>({fontFamily:n,fontWeight:A,fontSize:_(k),lineHeight:z,...n===Ow?{letterSpacing:`${j7(j/k)}em`}:{},...P,...p}),C={h1:w(a,96,1.167,-1.5),h2:w(a,60,1.2,-.5),h3:w(s,48,1.167,0),h4:w(s,34,1.235,.25),h5:w(s,24,1.334,0),h6:w(l,20,1.6,.15),subtitle1:w(s,16,1.75,.15),subtitle2:w(l,14,1.57,.1),body1:w(s,16,1.5,.15),body2:w(s,14,1.43,.15),button:w(l,14,1.75,.4,Mw),caption:w(s,12,1.66,.4),overline:w(s,12,2.66,1,Mw),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return ia({htmlFontSize:f,pxToRem:_,fontFamily:n,fontSize:i,fontWeightLight:a,fontWeightRegular:s,fontWeightMedium:l,fontWeightBold:d,...C},v,{clone:!1})}const I7=.2,F7=.14,H7=.12;function Ke(...t){return[`${t[0]}px ${t[1]}px ${t[2]}px ${t[3]}px rgba(0,0,0,${I7})`,`${t[4]}px ${t[5]}px ${t[6]}px ${t[7]}px rgba(0,0,0,${F7})`,`${t[8]}px ${t[9]}px ${t[10]}px ${t[11]}px rgba(0,0,0,${H7})`].join(",")}const U7=["none",Ke(0,2,1,-1,0,1,1,0,0,1,3,0),Ke(0,3,1,-2,0,2,2,0,0,1,5,0),Ke(0,3,3,-2,0,3,4,0,0,1,8,0),Ke(0,2,4,-1,0,4,5,0,0,1,10,0),Ke(0,3,5,-1,0,5,8,0,0,1,14,0),Ke(0,3,5,-1,0,6,10,0,0,1,18,0),Ke(0,4,5,-2,0,7,10,1,0,2,16,1),Ke(0,5,5,-3,0,8,10,1,0,3,14,2),Ke(0,5,6,-3,0,9,12,1,0,3,16,2),Ke(0,6,6,-3,0,10,14,1,0,4,18,3),Ke(0,6,7,-4,0,11,15,1,0,4,20,3),Ke(0,7,8,-4,0,12,17,2,0,5,22,4),Ke(0,7,8,-4,0,13,19,2,0,5,24,4),Ke(0,7,9,-4,0,14,21,2,0,5,26,4),Ke(0,8,9,-5,0,15,22,2,0,6,28,5),Ke(0,8,10,-5,0,16,24,2,0,6,30,5),Ke(0,8,11,-5,0,17,26,2,0,6,32,5),Ke(0,9,11,-5,0,18,28,2,0,7,34,6),Ke(0,9,12,-6,0,19,29,2,0,7,36,6),Ke(0,10,13,-6,0,20,31,3,0,8,38,7),Ke(0,10,13,-6,0,21,33,3,0,8,40,7),Ke(0,10,14,-6,0,22,35,3,0,8,42,7),Ke(0,11,14,-7,0,23,36,3,0,9,44,8),Ke(0,11,15,-7,0,24,38,3,0,9,46,8)],V7={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},$7={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function kw(t){return`${Math.round(t)}ms`}function G7(t){if(!t)return 0;const e=t/36;return Math.min(Math.round((4+15*e**.25+e/5)*10),3e3)}function W7(t){const e={...V7,...t.easing},n={...$7,...t.duration};return{getAutoHeightDuration:G7,create:(a=["all"],s={})=>{const{duration:l=n.standard,easing:d=e.easeInOut,delay:f=0,...p}=s;return(Array.isArray(a)?a:[a]).map(g=>`${g} ${typeof l=="string"?l:kw(l)} ${d} ${typeof f=="string"?f:kw(f)}`).join(",")},...t,easing:e,duration:n}}const Z7={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function q7(t){return Tr(t)||typeof t>"u"||typeof t=="string"||typeof t=="boolean"||typeof t=="number"||Array.isArray(t)}function RT(t={}){const e={...t};function n(i){const a=Object.entries(i);for(let s=0;s<a.length;s++){const[l,d]=a[s];!q7(d)||l.startsWith("unstable_")||l.startsWith("internal_")?delete i[l]:Tr(d)&&(i[l]={...d},n(i[l]))}}return n(e),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
|
||
|
||
const theme = ${JSON.stringify(e,null,2)};
|
||
|
||
theme.breakpoints = createBreakpoints(theme.breakpoints || {});
|
||
theme.transitions = createTransitions(theme.transitions || {});
|
||
|
||
export default theme;`}function Lw(t){return typeof t=="number"?`${(t*100).toFixed(0)}%`:`calc((${t}) * 100%)`}const Y7=t=>{if(!Number.isNaN(+t))return+t;const e=t.match(/\d*\.?\d+/g);if(!e)return 0;let n=0;for(let i=0;i<e.length;i+=1)n+=+e[i];return n};function X7(t){Object.assign(t,{alpha(e,n){const i=this||t;return i.colorSpace?`oklch(from ${e} l c h / ${typeof n=="string"?`calc(${n})`:n})`:i.vars?`rgba(${e.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,"var(--$1Channel)")} / ${typeof n=="string"?`calc(${n})`:n})`:OT(e,Y7(n))},lighten(e,n){const i=this||t;return i.colorSpace?`color-mix(in ${i.colorSpace}, ${e}, #fff ${Lw(n)})`:mm(e,n)},darken(e,n){const i=this||t;return i.colorSpace?`color-mix(in ${i.colorSpace}, ${e}, #000 ${Lw(n)})`:pm(e,n)}})}function qb(t={},...e){const{breakpoints:n,mixins:i={},spacing:a,palette:s={},transitions:l={},typography:d={},shape:f,colorSpace:p,...g}=t;if(t.vars&&t.generateThemeVars===void 0)throw new Error(Io(22));const v=ax({...s,colorSpace:p}),y=wT(t);let _=ia(y,{mixins:N7(y.breakpoints,i),palette:v,shadows:U7.slice(),typography:B7(v,d),transitions:W7(l),zIndex:{...Z7}});return _=ia(_,g),_=e.reduce((w,C)=>ia(w,C),_),_.unstable_sxConfig={...fm,...g==null?void 0:g.unstable_sxConfig},_.unstable_sx=function(C){return xd({sx:C,theme:this})},_.toRuntimeSource=RT,X7(_),_}function K7(t){let e;return t<1?e=5.11916*t**2:e=4.5*Math.log(t+1)+2,Math.round(e*10)/1e3}const Q7=[...Array(25)].map((t,e)=>{if(e===0)return"none";const n=K7(e);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function PT(t){return{inputPlaceholder:t==="dark"?.5:.42,inputUnderline:t==="dark"?.7:.42,switchTrackDisabled:t==="dark"?.2:.12,switchTrack:t==="dark"?.3:.38}}function NT(t){return t==="dark"?Q7:[]}function J7(t){const{palette:e={mode:"light"},opacity:n,overlays:i,colorSpace:a,...s}=t,l=ax({...e,colorSpace:a});return{palette:l,opacity:{...PT(l.mode),...n},overlays:i||NT(l.mode),...s}}function tF(t){var e;return!!t[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!t[0].match(/sxConfig$/)||t[0]==="palette"&&!!((e=t[1])!=null&&e.match(/(mode|contrastThreshold|tonalOffset)/))}const eF=t=>[...[...Array(25)].map((e,n)=>`--${t?`${t}-`:""}overlays-${n}`),`--${t?`${t}-`:""}palette-AppBar-darkBg`,`--${t?`${t}-`:""}palette-AppBar-darkColor`],nF=t=>(e,n)=>{const i=t.rootSelector||":root",a=t.colorSchemeSelector;let s=a;if(a==="class"&&(s=".%s"),a==="data"&&(s="[data-%s]"),a!=null&&a.startsWith("data-")&&!a.includes("%s")&&(s=`[${a}="%s"]`),t.defaultColorScheme===e){if(e==="dark"){const l={};return eF(t.cssVarPrefix).forEach(d=>{l[d]=n[d],delete n[d]}),s==="media"?{[i]:n,"@media (prefers-color-scheme: dark)":{[i]:l}}:s?{[s.replace("%s",e)]:l,[`${i}, ${s.replace("%s",e)}`]:n}:{[i]:{...n,...l}}}if(s&&s!=="media")return`${i}, ${s.replace("%s",String(e))}`}else if(e){if(s==="media")return{[`@media (prefers-color-scheme: ${String(e)})`]:{[i]:n}};if(s)return s.replace("%s",String(e))}return i};function iF(t,e){e.forEach(n=>{t[n]||(t[n]={})})}function bt(t,e,n){!t[e]&&n&&(t[e]=n)}function Iu(t){return typeof t!="string"||!t.startsWith("hsl")?t:MT(t)}function _r(t,e){`${e}Channel`in t||(t[`${e}Channel`]=Bu(Iu(t[e])))}function aF(t){return typeof t=="number"?`${t}px`:typeof t=="string"||typeof t=="function"||Array.isArray(t)?t:"8px"}const Ba=t=>{try{return t()}catch{}},rF=(t="mui")=>S7(t);function ab(t,e,n,i,a){if(!n)return;n=n===!0?{}:n;const s=a==="dark"?"dark":"light";if(!i){e[a]=J7({...n,palette:{mode:s,...n==null?void 0:n.palette},colorSpace:t});return}const{palette:l,...d}=qb({...i,palette:{mode:s,...n==null?void 0:n.palette},colorSpace:t});return e[a]={...n,palette:l,opacity:{...PT(s),...n==null?void 0:n.opacity},overlays:(n==null?void 0:n.overlays)||NT(s)},d}function sF(t={},...e){const{colorSchemes:n={light:!0},defaultColorScheme:i,disableCssColorScheme:a=!1,cssVarPrefix:s="mui",nativeColor:l=!1,shouldSkipGeneratingVar:d=tF,colorSchemeSelector:f=n.light&&n.dark?"media":void 0,rootSelector:p=":root",...g}=t,v=Object.keys(n)[0],y=i||(n.light&&v!=="light"?"light":v),_=rF(s),{[y]:w,light:C,dark:A,...k}=n,z={...k};let j=w;if((y==="dark"&&!("dark"in n)||y==="light"&&!("light"in n))&&(j=!0),!j)throw new Error(Io(21,y));let P;l&&(P="oklch");const H=ab(P,z,j,g,y);C&&!z.light&&ab(P,z,C,void 0,"light"),A&&!z.dark&&ab(P,z,A,void 0,"dark");let V={defaultColorScheme:y,...H,cssVarPrefix:s,colorSchemeSelector:f,rootSelector:p,getCssVar:_,colorSchemes:z,font:{...P7(H.typography),...H.font},spacing:aF(g.spacing)};Object.keys(V.colorSchemes).forEach(X=>{const R=V.colorSchemes[X].palette,dt=ut=>{const I=ut.split("-"),$=I[1],q=I[2];return _(ut,R[$][q])};R.mode==="light"&&(bt(R.common,"background","#fff"),bt(R.common,"onBackground","#000")),R.mode==="dark"&&(bt(R.common,"background","#000"),bt(R.common,"onBackground","#fff"));function it(ut,I,$){if(P){let q;return ut===Co&&(q=`transparent ${((1-$)*100).toFixed(0)}%`),ut===ze&&(q=`#000 ${($*100).toFixed(0)}%`),ut===Re&&(q=`#fff ${($*100).toFixed(0)}%`),`color-mix(in ${P}, ${I}, ${q})`}return ut(I,$)}if(iF(R,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),R.mode==="light"){bt(R.Alert,"errorColor",it(ze,l?_("palette-error-light"):R.error.light,.6)),bt(R.Alert,"infoColor",it(ze,l?_("palette-info-light"):R.info.light,.6)),bt(R.Alert,"successColor",it(ze,l?_("palette-success-light"):R.success.light,.6)),bt(R.Alert,"warningColor",it(ze,l?_("palette-warning-light"):R.warning.light,.6)),bt(R.Alert,"errorFilledBg",dt("palette-error-main")),bt(R.Alert,"infoFilledBg",dt("palette-info-main")),bt(R.Alert,"successFilledBg",dt("palette-success-main")),bt(R.Alert,"warningFilledBg",dt("palette-warning-main")),bt(R.Alert,"errorFilledColor",Ba(()=>R.getContrastText(R.error.main))),bt(R.Alert,"infoFilledColor",Ba(()=>R.getContrastText(R.info.main))),bt(R.Alert,"successFilledColor",Ba(()=>R.getContrastText(R.success.main))),bt(R.Alert,"warningFilledColor",Ba(()=>R.getContrastText(R.warning.main))),bt(R.Alert,"errorStandardBg",it(Re,l?_("palette-error-light"):R.error.light,.9)),bt(R.Alert,"infoStandardBg",it(Re,l?_("palette-info-light"):R.info.light,.9)),bt(R.Alert,"successStandardBg",it(Re,l?_("palette-success-light"):R.success.light,.9)),bt(R.Alert,"warningStandardBg",it(Re,l?_("palette-warning-light"):R.warning.light,.9)),bt(R.Alert,"errorIconColor",dt("palette-error-main")),bt(R.Alert,"infoIconColor",dt("palette-info-main")),bt(R.Alert,"successIconColor",dt("palette-success-main")),bt(R.Alert,"warningIconColor",dt("palette-warning-main")),bt(R.AppBar,"defaultBg",dt("palette-grey-100")),bt(R.Avatar,"defaultBg",dt("palette-grey-400")),bt(R.Button,"inheritContainedBg",dt("palette-grey-300")),bt(R.Button,"inheritContainedHoverBg",dt("palette-grey-A100")),bt(R.Chip,"defaultBorder",dt("palette-grey-400")),bt(R.Chip,"defaultAvatarColor",dt("palette-grey-700")),bt(R.Chip,"defaultIconColor",dt("palette-grey-700")),bt(R.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),bt(R.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),bt(R.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),bt(R.LinearProgress,"primaryBg",it(Re,l?_("palette-primary-main"):R.primary.main,.62)),bt(R.LinearProgress,"secondaryBg",it(Re,l?_("palette-secondary-main"):R.secondary.main,.62)),bt(R.LinearProgress,"errorBg",it(Re,l?_("palette-error-main"):R.error.main,.62)),bt(R.LinearProgress,"infoBg",it(Re,l?_("palette-info-main"):R.info.main,.62)),bt(R.LinearProgress,"successBg",it(Re,l?_("palette-success-main"):R.success.main,.62)),bt(R.LinearProgress,"warningBg",it(Re,l?_("palette-warning-light"):R.warning.main,.62)),bt(R.Skeleton,"bg",P?it(Co,l?_("palette-text-primary"):R.text.primary,.11):`rgba(${dt("palette-text-primaryChannel")} / 0.11)`),bt(R.Slider,"primaryTrack",it(Re,l?_("palette-primary-main"):R.primary.main,.62)),bt(R.Slider,"secondaryTrack",it(Re,l?_("palette-secondary-main"):R.secondary.main,.62)),bt(R.Slider,"errorTrack",it(Re,l?_("palette-error-main"):R.error.main,.62)),bt(R.Slider,"infoTrack",it(Re,l?_("palette-info-main"):R.info.main,.62)),bt(R.Slider,"successTrack",it(Re,l?_("palette-success-main"):R.success.main,.62)),bt(R.Slider,"warningTrack",it(Re,l?_("palette-warning-main"):R.warning.main,.62));const ut=P?it(ze,l?_("palette-background-default"):R.background.default,.6825):Eh(R.background.default,.8);bt(R.SnackbarContent,"bg",ut),bt(R.SnackbarContent,"color",Ba(()=>P?Zb.text.primary:R.getContrastText(ut))),bt(R.SpeedDialAction,"fabHoverBg",Eh(R.background.paper,.15)),bt(R.StepConnector,"border",dt("palette-grey-400")),bt(R.StepContent,"border",dt("palette-grey-400")),bt(R.Switch,"defaultColor",dt("palette-common-white")),bt(R.Switch,"defaultDisabledColor",dt("palette-grey-100")),bt(R.Switch,"primaryDisabledColor",it(Re,l?_("palette-primary-main"):R.primary.main,.62)),bt(R.Switch,"secondaryDisabledColor",it(Re,l?_("palette-secondary-main"):R.secondary.main,.62)),bt(R.Switch,"errorDisabledColor",it(Re,l?_("palette-error-main"):R.error.main,.62)),bt(R.Switch,"infoDisabledColor",it(Re,l?_("palette-info-main"):R.info.main,.62)),bt(R.Switch,"successDisabledColor",it(Re,l?_("palette-success-main"):R.success.main,.62)),bt(R.Switch,"warningDisabledColor",it(Re,l?_("palette-warning-main"):R.warning.main,.62)),bt(R.TableCell,"border",it(Re,Co(l?_("palette-divider"):R.divider,1),.88)),bt(R.Tooltip,"bg",it(Co,l?_("palette-grey-700"):R.grey[700],.92))}if(R.mode==="dark"){bt(R.Alert,"errorColor",it(Re,l?_("palette-error-light"):R.error.light,.6)),bt(R.Alert,"infoColor",it(Re,l?_("palette-info-light"):R.info.light,.6)),bt(R.Alert,"successColor",it(Re,l?_("palette-success-light"):R.success.light,.6)),bt(R.Alert,"warningColor",it(Re,l?_("palette-warning-light"):R.warning.light,.6)),bt(R.Alert,"errorFilledBg",dt("palette-error-dark")),bt(R.Alert,"infoFilledBg",dt("palette-info-dark")),bt(R.Alert,"successFilledBg",dt("palette-success-dark")),bt(R.Alert,"warningFilledBg",dt("palette-warning-dark")),bt(R.Alert,"errorFilledColor",Ba(()=>R.getContrastText(R.error.dark))),bt(R.Alert,"infoFilledColor",Ba(()=>R.getContrastText(R.info.dark))),bt(R.Alert,"successFilledColor",Ba(()=>R.getContrastText(R.success.dark))),bt(R.Alert,"warningFilledColor",Ba(()=>R.getContrastText(R.warning.dark))),bt(R.Alert,"errorStandardBg",it(ze,l?_("palette-error-light"):R.error.light,.9)),bt(R.Alert,"infoStandardBg",it(ze,l?_("palette-info-light"):R.info.light,.9)),bt(R.Alert,"successStandardBg",it(ze,l?_("palette-success-light"):R.success.light,.9)),bt(R.Alert,"warningStandardBg",it(ze,l?_("palette-warning-light"):R.warning.light,.9)),bt(R.Alert,"errorIconColor",dt("palette-error-main")),bt(R.Alert,"infoIconColor",dt("palette-info-main")),bt(R.Alert,"successIconColor",dt("palette-success-main")),bt(R.Alert,"warningIconColor",dt("palette-warning-main")),bt(R.AppBar,"defaultBg",dt("palette-grey-900")),bt(R.AppBar,"darkBg",dt("palette-background-paper")),bt(R.AppBar,"darkColor",dt("palette-text-primary")),bt(R.Avatar,"defaultBg",dt("palette-grey-600")),bt(R.Button,"inheritContainedBg",dt("palette-grey-800")),bt(R.Button,"inheritContainedHoverBg",dt("palette-grey-700")),bt(R.Chip,"defaultBorder",dt("palette-grey-700")),bt(R.Chip,"defaultAvatarColor",dt("palette-grey-300")),bt(R.Chip,"defaultIconColor",dt("palette-grey-300")),bt(R.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),bt(R.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),bt(R.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),bt(R.LinearProgress,"primaryBg",it(ze,l?_("palette-primary-main"):R.primary.main,.5)),bt(R.LinearProgress,"secondaryBg",it(ze,l?_("palette-secondary-main"):R.secondary.main,.5)),bt(R.LinearProgress,"errorBg",it(ze,l?_("palette-error-main"):R.error.main,.5)),bt(R.LinearProgress,"infoBg",it(ze,l?_("palette-info-main"):R.info.main,.5)),bt(R.LinearProgress,"successBg",it(ze,l?_("palette-success-main"):R.success.main,.5)),bt(R.LinearProgress,"warningBg",it(ze,l?_("palette-warning-main"):R.warning.main,.5)),bt(R.Skeleton,"bg",P?it(Co,l?_("palette-text-primary"):R.text.primary,.13):`rgba(${dt("palette-text-primaryChannel")} / 0.13)`),bt(R.Slider,"primaryTrack",it(ze,l?_("palette-primary-main"):R.primary.main,.5)),bt(R.Slider,"secondaryTrack",it(ze,l?_("palette-secondary-main"):R.secondary.main,.5)),bt(R.Slider,"errorTrack",it(ze,l?_("palette-error-main"):R.error.main,.5)),bt(R.Slider,"infoTrack",it(ze,l?_("palette-info-main"):R.info.main,.5)),bt(R.Slider,"successTrack",it(ze,l?_("palette-success-main"):R.success.main,.5)),bt(R.Slider,"warningTrack",it(ze,l?_("palette-warning-light"):R.warning.main,.5));const ut=P?it(Re,l?_("palette-background-default"):R.background.default,.985):Eh(R.background.default,.98);bt(R.SnackbarContent,"bg",ut),bt(R.SnackbarContent,"color",Ba(()=>P?LT.text.primary:R.getContrastText(ut))),bt(R.SpeedDialAction,"fabHoverBg",Eh(R.background.paper,.15)),bt(R.StepConnector,"border",dt("palette-grey-600")),bt(R.StepContent,"border",dt("palette-grey-600")),bt(R.Switch,"defaultColor",dt("palette-grey-300")),bt(R.Switch,"defaultDisabledColor",dt("palette-grey-600")),bt(R.Switch,"primaryDisabledColor",it(ze,l?_("palette-primary-main"):R.primary.main,.55)),bt(R.Switch,"secondaryDisabledColor",it(ze,l?_("palette-secondary-main"):R.secondary.main,.55)),bt(R.Switch,"errorDisabledColor",it(ze,l?_("palette-error-main"):R.error.main,.55)),bt(R.Switch,"infoDisabledColor",it(ze,l?_("palette-info-main"):R.info.main,.55)),bt(R.Switch,"successDisabledColor",it(ze,l?_("palette-success-main"):R.success.main,.55)),bt(R.Switch,"warningDisabledColor",it(ze,l?_("palette-warning-light"):R.warning.main,.55)),bt(R.TableCell,"border",it(ze,Co(l?_("palette-divider"):R.divider,1),.68)),bt(R.Tooltip,"bg",it(Co,l?_("palette-grey-700"):R.grey[700],.92))}l||(_r(R.background,"default"),_r(R.background,"paper"),_r(R.common,"background"),_r(R.common,"onBackground"),_r(R,"divider")),Object.keys(R).forEach(ut=>{const I=R[ut];ut!=="tonalOffset"&&!l&&I&&typeof I=="object"&&(I.main&&bt(R[ut],"mainChannel",Bu(Iu(I.main))),I.light&&bt(R[ut],"lightChannel",Bu(Iu(I.light))),I.dark&&bt(R[ut],"darkChannel",Bu(Iu(I.dark))),I.contrastText&&bt(R[ut],"contrastTextChannel",Bu(Iu(I.contrastText))),ut==="text"&&(_r(R[ut],"primary"),_r(R[ut],"secondary")),ut==="action"&&(I.active&&_r(R[ut],"active"),I.selected&&_r(R[ut],"selected")))})}),V=e.reduce((X,R)=>ia(X,R),V);const U={prefix:s,disableCssColorScheme:a,shouldSkipGeneratingVar:d,getSelector:nF(V),enableContrastVars:l},{vars:Z,generateThemeVars:Q,generateStyleSheets:et}=E7(V,U);return V.vars=Z,Object.entries(V.colorSchemes[V.defaultColorScheme]).forEach(([X,R])=>{V[X]=R}),V.generateThemeVars=Q,V.generateStyleSheets=et,V.generateSpacing=function(){return ST(g.spacing,ex(this))},V.getColorSchemeSelector=A7(f),V.spacing=V.generateSpacing(),V.shouldSkipGeneratingVar=d,V.unstable_sxConfig={...fm,...g==null?void 0:g.unstable_sxConfig},V.unstable_sx=function(R){return xd({sx:R,theme:this})},V.internal_cache={},V.toRuntimeSource=RT,V}function zw(t,e,n){t.colorSchemes&&n&&(t.colorSchemes[e]={...n!==!0&&n,palette:ax({...n===!0?{}:n.palette,mode:e})})}function oF(t={},...e){const{palette:n,cssVariables:i=!1,colorSchemes:a=n?void 0:{light:!0},defaultColorScheme:s=n==null?void 0:n.mode,...l}=t,d=s||"light",f=a==null?void 0:a[d],p={...a,...n?{[d]:{...typeof f!="boolean"&&f,palette:n}}:void 0};if(i===!1){if(!("colorSchemes"in t))return qb(t,...e);let g=n;"palette"in t||p[d]&&(p[d]!==!0?g=p[d].palette:d==="dark"&&(g={mode:"dark"}));const v=qb({...t,palette:g},...e);return v.defaultColorScheme=d,v.colorSchemes=p,v.palette.mode==="light"&&(v.colorSchemes.light={...p.light!==!0&&p.light,palette:v.palette},zw(v,"dark",p.dark)),v.palette.mode==="dark"&&(v.colorSchemes.dark={...p.dark!==!0&&p.dark,palette:v.palette},zw(v,"light",p.light)),v}return!n&&!("light"in p)&&d==="light"&&(p.light=!0),sF({...l,colorSchemes:p,defaultColorScheme:d,...typeof i!="boolean"&&i},...e)}const lF=oF();function rx(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const cF=t=>rx(t)&&t!=="classes",Uo=l7({themeId:aI,defaultTheme:lF,rootShouldForwardProp:cF}),uc=_7;function uF(t){return x7(t)}function Yb(t){var n;let e=t.activeElement;for(;((n=e==null?void 0:e.shadowRoot)==null?void 0:n.activeElement)!=null;)e=e.shadowRoot.activeElement;return e}function Hl(t){return t&&t.ownerDocument||document}function dF(t){const{controlled:e,default:n}=t,{current:i}=O.useRef(e!==void 0),[a,s]=O.useState(n),l=i?e:a,d=O.useCallback(f=>{i||s(f)},[]);return[l,d]}function Tu(t){const e=O.useRef(t);return DT(()=>{e.current=t}),O.useRef((...n)=>(0,e.current)(...n)).current}function jT(...t){const e=O.useRef(void 0),n=O.useCallback(i=>{const a=t.map(s=>{if(s==null)return null;if(typeof s=="function"){const l=s,d=l(i);return typeof d=="function"?d:()=>{l(null)}}return s.current=i,()=>{s.current=null}});return()=>{a.forEach(s=>s==null?void 0:s())}},t);return O.useMemo(()=>t.every(i=>i==null)?null:i=>{e.current&&(e.current(),e.current=void 0),i!=null&&(e.current=n(i))},t)}function qh(t){return typeof t=="string"}function fF(t,e,n){return t===void 0||qh(t)?e:{...e,ownerState:{...e.ownerState,...n}}}function hF(t,e,n){return typeof t=="function"?t(e,n):t}function Yh(t,e=[]){if(t===void 0)return{};const n={};return Object.keys(t).filter(i=>i.match(/^on[A-Z]/)&&typeof t[i]=="function"&&!e.includes(i)).forEach(i=>{n[i]=t[i]}),n}function Rw(t){if(t===void 0)return{};const e={};return Object.keys(t).filter(n=>!(n.match(/^on[A-Z]/)&&typeof t[n]=="function")).forEach(n=>{e[n]=t[n]}),e}function pF(t){const{getSlotProps:e,additionalProps:n,externalSlotProps:i,externalForwardedProps:a,className:s}=t;if(!e){const _=Ts(n==null?void 0:n.className,s,a==null?void 0:a.className,i==null?void 0:i.className),w={...n==null?void 0:n.style,...a==null?void 0:a.style,...i==null?void 0:i.style},C={...n,...a,...i};return _.length>0&&(C.className=_),Object.keys(w).length>0&&(C.style=w),{props:C,internalRef:void 0}}const l=Yh({...a,...i}),d=Rw(i),f=Rw(a),p=e(l),g=Ts(p==null?void 0:p.className,n==null?void 0:n.className,s,a==null?void 0:a.className,i==null?void 0:i.className),v={...p==null?void 0:p.style,...n==null?void 0:n.style,...a==null?void 0:a.style,...i==null?void 0:i.style},y={...p,...n,...f,...d};return g.length>0&&(y.className=g),Object.keys(v).length>0&&(y.style=v),{props:y,internalRef:p.ref}}function gs(t,e){const{className:n,elementType:i,ownerState:a,externalForwardedProps:s,internalForwardedProps:l,shouldForwardComponentProp:d=!1,...f}=e,{component:p,slots:g={[t]:void 0},slotProps:v={[t]:void 0},...y}=s,_=g[t]||i,w=hF(v[t],a),{props:{component:C,...A},internalRef:k}=pF({className:n,...f,externalForwardedProps:t==="root"?y:void 0,externalSlotProps:w}),z=jT(k,w==null?void 0:w.ref,e.ref),j=t==="root"?C||p:C,P=fF(_,{...t==="root"&&!p&&!g[t]&&l,...t!=="root"&&!g[t]&&l,...A,...j&&!d&&{as:j},...j&&d&&{component:j},ref:z},a);return[_,P]}function Pw(t){try{return t.matches(":focus-visible")}catch{}return!1}function mF(t){return typeof t.main=="string"}function gF(t,e=[]){if(!mF(t))return!1;for(const n of e)if(!t.hasOwnProperty(n)||typeof t[n]!="string")return!1;return!0}function sx(t=[]){return([,e])=>e&&gF(e,t)}const vF={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function bF(t,e,n=(i,a)=>i===a){return t.length===e.length&&t.every((i,a)=>n(i,e[a]))}const yF=2,xF=[],Xh={};function Bl(t,e,n,i,a){return n===1?Math.min(t+e,a):Math.max(t-e,i)}function BT(t,e){return t-e}function Nw(t,e,n=-1){const i=t.reduce((s,l,d)=>{const f=Math.abs(e-l);return s==null||f<=s.distance?{distance:f,index:d}:s},null)??Xh,{index:a}=i;return a==null?a:n>=0&&t[n]===t[a]?n:a}function Ah(t,e){if(e.current!=null&&t.changedTouches){const n=t;for(let i=0;i<n.changedTouches.length;i+=1){const a=n.changedTouches[i];if(a.identifier===e.current)return{x:a.clientX,y:a.clientY}}return!1}return{x:t.clientX,y:t.clientY}}function Ep(t,e,n){return(t-e)*100/(n-e)}function _F(t,e,n){return(n-e)*t+e}function SF(t){if(Math.abs(t)<1){const n=t.toExponential().split("e-"),i=n[0].split(".")[1];return(i?i.length:0)+parseInt(n[1],10)}const e=t.toString().split(".")[1];return e?e.length:0}function wF(t,e,n){const i=Math.round((t-n)/e)*e+n;return Number(i.toFixed(SF(e)))}function jw(t,e,n){const i=t.slice();return i[n]=e,i.sort(BT)}function Th(t,e,n,i){var l,d;const a=Hl(t.current),s=Yb(a);if(!((l=t.current)!=null&&l.contains(s))||Number(s==null?void 0:s.getAttribute("data-index"))!==e){const f=(d=t.current)==null?void 0:d.querySelector(`[type="range"][data-index="${e}"]`);f!=null&&(i==null?f.focus({preventScroll:!0}):f.focus({preventScroll:!0,focusVisible:i}))}n&&n(e)}function Dh(t,e){return typeof t=="number"&&typeof e=="number"?t===e:typeof t=="object"&&typeof e=="object"?bF(t,e):!1}const CF={horizontal:{offset:t=>({left:`${t}%`}),leap:t=>({width:`${t}%`})},"horizontal-reverse":{offset:t=>({right:`${t}%`}),leap:t=>({width:`${t}%`})},vertical:{offset:t=>({bottom:`${t}%`}),leap:t=>({height:`${t}%`})}},EF=t=>t;function AF(t){const{"aria-labelledby":e,defaultValue:n,disabled:i=!1,disableSwap:a=!1,isRtl:s=!1,marks:l=!1,max:d=100,min:f=0,name:p,onChange:g,onChangeCommitted:v,orientation:y="horizontal",rootRef:_,scale:w=EF,step:C=1,shiftStep:A=10,tabIndex:k,value:z}=t,j=O.useRef(void 0),P=O.useRef(null),[H,V]=O.useState(-1),[U,Z]=O.useState(-1),[Q,et]=O.useState(!1),X=O.useRef(0),R=O.useRef(-1),dt=O.useRef(!1),it=O.useRef(-1),ut=Tu(()=>{P.current!=null&&(cancelAnimationFrame(P.current),P.current=null)}),I=O.useRef(null),[$,q]=dF({controlled:z,default:n??f}),nt=Tu((gt,Ct,Ot)=>{const jt="nativeEvent"in gt?gt.nativeEvent:gt,Gt=new jt.constructor(jt.type,jt);Object.defineProperty(Gt,"target",{writable:!0,value:{value:Ct,name:p}}),I.current=Ct,g==null||g(Gt,Ct,Ot)}),ot=Array.isArray($),F=O.useMemo(()=>{if(typeof $=="number")return[Do($,f,d)];if($==null)return[f];const gt=$.slice().sort(BT);for(let Ct=0;Ct<gt.length;Ct+=1){const Ot=gt[Ct];gt[Ct]=Ot==null?f:Do(Ot,f,d)}return gt},[$,f,d]),K=O.useMemo(()=>{if(l===!0&&C!=null){const gt=new Array(Math.floor((d-f)/C)+1);for(let Ct=0;Ct<gt.length;Ct+=1)gt[Ct]={value:f+C*Ct};return gt}return Array.isArray(l)?l:xF},[l,C,f,d]),at=O.useMemo(()=>{const gt=new Array(K.length);for(let Ct=0;Ct<K.length;Ct+=1)gt[Ct]=K[Ct].value;return gt},[K]),[mt,pt]=O.useState(-1),yt=O.useRef(null),ft=jT(_,yt),Ht=gt=>Ct=>{var jt;const Ot=Number(Ct.currentTarget.getAttribute("data-index"));Pw(Ct.target)&&pt(Ot),Z(Ot),(jt=gt==null?void 0:gt.onFocus)==null||jt.call(gt,Ct)},Tt=gt=>Ct=>{var Ot;Pw(Ct.target)||pt(-1),Z(-1),(Ot=gt==null?void 0:gt.onBlur)==null||Ot.call(gt,Ct)},Mt=(gt,Ct)=>{const Ot=Number(gt.currentTarget.getAttribute("data-index")),jt=F[Ot],Gt=at.indexOf(jt);let Bt=Ct;if(K&&C==null){const Vt=at[at.length-1];Bt>=Vt?Bt=Vt:Bt<=at[0]?Bt=at[0]:Bt=Bt<jt?at[Gt-1]:at[Gt+1]}if(Bt=Do(Bt,f,d),ot){a&&(Bt=Do(Bt,F[Ot-1]||-1/0,F[Ot+1]||1/0));const Vt=Bt;Bt=jw(F,Bt,Ot);let ae=Ot;a||(ae=Bt.indexOf(Vt)),Th(yt,ae)}q(Bt),pt(Ot),g&&!Dh(Bt,$)&&nt(gt,Bt,Ot),v&&v(gt,I.current??Bt)},Ee=gt=>Ct=>{var Ot;if(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End"].includes(Ct.key)){Ct.preventDefault();const jt=Number(Ct.currentTarget.getAttribute("data-index")),Gt=F[jt];let Bt=null;if(C!=null){const Vt=Ct.shiftKey?A:C;switch(Ct.key){case"ArrowUp":Bt=Bl(Gt,Vt,1,f,d);break;case"ArrowRight":Bt=Bl(Gt,Vt,s?-1:1,f,d);break;case"ArrowDown":Bt=Bl(Gt,Vt,-1,f,d);break;case"ArrowLeft":Bt=Bl(Gt,Vt,s?1:-1,f,d);break;case"PageUp":Bt=Bl(Gt,A,1,f,d);break;case"PageDown":Bt=Bl(Gt,A,-1,f,d);break;case"Home":Bt=f;break;case"End":Bt=d;break}}else if(K){const Vt=at[at.length-1],ae=at.indexOf(Gt),An=[s?"ArrowRight":"ArrowLeft","ArrowDown","PageDown","Home"],Wn=[s?"ArrowLeft":"ArrowRight","ArrowUp","PageUp","End"];An.includes(Ct.key)?ae===0?Bt=at[0]:Bt=at[ae-1]:Wn.includes(Ct.key)&&(ae===at.length-1?Bt=Vt:Bt=at[ae+1])}Bt!=null&&Mt(Ct,Bt)}(Ot=gt==null?void 0:gt.onKeyDown)==null||Ot.call(gt,Ct)};DT(()=>{var Ct;const gt=Yb(Hl(yt.current));i&&((Ct=yt.current)!=null&&Ct.contains(gt))&>!=null&&"blur"in gt&>.blur()},[i]),i&&H!==-1&&V(-1),i&&mt!==-1&&pt(-1);const Ut=gt=>Ct=>{var Ot;(Ot=gt.onChange)==null||Ot.call(gt,Ct),Mt(Ct,Ct.currentTarget.valueAsNumber)},ye=O.useRef(void 0);let ge=y;s&&y==="horizontal"&&(ge+="-reverse");const ve=gt=>{const{current:Ct}=yt;if(!Ct)return null;const{width:Ot,height:jt,bottom:Gt,left:Bt}=Ct.getBoundingClientRect();let Vt;ge.startsWith("vertical")?Vt=(Gt-gt.y)/jt:Vt=(gt.x-Bt)/Ot,ge.includes("-reverse")&&(Vt=1-Vt);let ae;if(ae=_F(Vt,f,d),C)ae=wF(ae,C,f);else{const Wn=Nw(at,ae);ae=at[Wn]}ae=Do(ae,f,d);let An=0;if(ot){const Wn=ye.current!==-1;An=Wn?ye.current:Nw(F,ae,R.current),a&&(ae=Do(ae,F[An-1]||-1/0,F[An+1]||1/0));const ra=ae;ae=jw(F,ae,An),a&&Wn||(An=ae.indexOf(ra),ye.current=An)}return{newValue:ae,activeIndex:An}},Cn=Tu(gt=>{if("pointerId"in gt&>.pointerId!==it.current)return;const Ct=Ah(gt,j);if(!Ct)return;if(X.current+=1,gt.type==="pointermove"&>.buttons===0){En(gt);return}const Ot=ve(Ct);Ot&&(Th(yt,Ot.activeIndex,V,!1),R.current=Ot.activeIndex,q(Ot.newValue),!Q&&X.current>yF&&et(!0),g&&!Dh(Ot.newValue,$)&&nt(gt,Ot.newValue,Ot.activeIndex))}),En=Tu(gt=>{var jt;if("pointerId"in gt&>.pointerId!==it.current)return;const Ct=Ah(gt,j);if(et(!1),!Ct)return;const Ot=ve(Ct);V(-1),gt.type==="touchend"&&Z(-1),Ot&&v&&v(gt,I.current??Ot.newValue),"pointerType"in gt&&((jt=yt.current)!=null&&jt.hasPointerCapture(gt.pointerId))&&yt.current.releasePointerCapture(gt.pointerId),j.current=void 0,it.current=-1,mn()}),nn=Tu(gt=>{if(i)return;if(dt.current){dt.current=!1;const Gt=gt.changedTouches[0];Gt!=null&&(j.current=Gt.identifier);return}const Ct=gt.changedTouches[0];Ct!=null&&(j.current=Ct.identifier);const Ot=Ah(gt,j);if(Ot!==!1){ye.current=-1;const Gt=ve(Ot);Gt&&(Th(yt,Gt.activeIndex,V,!1),R.current=Gt.activeIndex,q(Gt.newValue),g&&!Dh(Gt.newValue,$)&&nt(gt,Gt.newValue,Gt.activeIndex))}X.current=0;const jt=Hl(yt.current);jt.addEventListener("touchmove",Cn,{passive:!0}),jt.addEventListener("touchend",En,{passive:!0})}),mn=O.useCallback(()=>{const gt=Hl(yt.current);gt.removeEventListener("pointermove",Cn),gt.removeEventListener("pointerup",En),gt.removeEventListener("touchmove",Cn),gt.removeEventListener("touchend",En)},[En,Cn]);O.useEffect(()=>{const gt=yt.current;if(gt)return gt.addEventListener("touchstart",nn,{passive:!0}),()=>{gt.removeEventListener("touchstart",nn),ut(),mn()}},[mn,nn,ut]),O.useEffect(()=>{i&&(mn(),ut())},[i,mn,ut]);const kn=gt=>Ct=>{var Gt,Bt;if((Gt=gt.onPointerDown)==null||Gt.call(gt,Ct),Ct.pointerType==="touch"&&(dt.current=!0),i||Ct.defaultPrevented||Ct.button!==0)return;const Ot=Ah(Ct,j);if(Ot!==!1){ye.current=-1;const Vt=ve(Ot);if(Vt){const ae=(Bt=yt.current)==null?void 0:Bt.querySelector(`input[type="range"][data-index="${Vt.activeIndex}"]`),An=Hl(yt.current),Wn=ae!=null&&ae===Yb(An);V(Vt.activeIndex),R.current=Vt.activeIndex,Wn?Ct.preventDefault():(ut(),P.current=requestAnimationFrame(()=>{P.current=null,Th(yt,Vt.activeIndex,void 0,!1)})),q(Vt.newValue),g&&!Dh(Vt.newValue,$)&&nt(Ct,Vt.newValue,Vt.activeIndex)}}X.current=0,it.current=Ct.pointerId;const jt=Hl(yt.current);try{Ct.currentTarget.setPointerCapture(Ct.pointerId)}catch{}jt.addEventListener("pointermove",Cn,{passive:!0}),jt.addEventListener("pointerup",En)},gn=Ep(ot?F[0]:f,f,d),wi=Ep(F[F.length-1],f,d)-gn,Rt=(gt=Xh)=>{const Ct=Yh(gt),Ot={onPointerDown:kn(Ct)},jt={...Ct,...Ot};return{...gt,ref:ft,...jt}},At=gt=>Ct=>{var jt;(jt=gt.onMouseOver)==null||jt.call(gt,Ct);const Ot=Number(Ct.currentTarget.getAttribute("data-index"));Z(Ot)},wt=gt=>Ct=>{var Ot;(Ot=gt.onMouseLeave)==null||Ot.call(gt,Ct),Z(-1)},Et=(gt=Xh)=>{const Ct=Yh(gt),Ot={onMouseOver:At(Ct),onMouseLeave:wt(Ct)};return{...gt,...Ct,...Ot}},zt=gt=>{let Ct;return ot?H===gt?Ct=2:R.current===gt&&(Ct=1):H===gt&&(Ct=1),{pointerEvents:H!==-1&&H!==gt?"none":void 0,zIndex:Ct}};let Yt;return y==="vertical"&&(Yt=s?"vertical-rl":"vertical-lr"),{active:H,axis:ge,axisProps:CF,dragging:Q,focusedThumbIndex:mt,getHiddenInputProps:(gt=Xh)=>{const Ct=Yh(gt),Ot={onChange:Ut(Ct),onFocus:Ht(Ct),onBlur:Tt(Ct),onKeyDown:Ee(Ct)},jt={...Ct,...Ot};return{tabIndex:k,"aria-labelledby":e,"aria-orientation":y,"aria-valuemax":w(d),"aria-valuemin":w(f),name:p,type:"range",min:t.min,max:t.max,step:t.step===null&&t.marks?"any":t.step??void 0,disabled:i,...gt,...jt,style:{...vF,direction:s?"rtl":"ltr",width:"100%",height:"100%",writingMode:Yt}}},getRootProps:Rt,getThumbProps:Et,marks:K,open:U,range:ot,rootRef:ft,trackLeap:wi,trackOffset:gn,values:F,getThumbStyle:zt}}function TF(t){return ET("MuiSlider",t)}const ea=a7("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","track","trackInverted","trackFalse","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]),DF=t=>{const{open:e}=t;return{offset:Ts(e&&ea.valueLabelOpen),circle:ea.valueLabelCircle,label:ea.valueLabelLabel}};function MF(t){const{children:e,className:n,value:i}=t,a=DF(t);return e?O.cloneElement(e,{className:e.props.className},T.jsxs(O.Fragment,{children:[e.props.children,T.jsx("span",{className:Ts(a.offset,n),"aria-hidden":!0,children:T.jsx("span",{className:a.circle,children:T.jsx("span",{className:a.label,children:i})})})]})):null}function Bw(t){return t}const OF=Uo("span",{name:"MuiSlider",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`color${bd(n.color)}`],n.size!=="medium"&&e[`size${bd(n.size)}`],n.marked&&e.marked,n.orientation==="vertical"&&e.vertical,n.track==="inverted"&&e.trackInverted,n.track===!1&&e.trackFalse]}})(uc(({theme:t})=>({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${ea.disabled}`]:{pointerEvents:"none",cursor:"default",color:(t.vars||t).palette.grey[400]},[`&.${ea.dragging}`]:{[`& .${ea.thumb}, & .${ea.track}`]:{transition:"none"}},variants:[...Object.entries(t.palette).filter(sx()).map(([e])=>({props:{color:e},style:{color:(t.vars||t).palette[e].main}})),{props:{orientation:"horizontal"},style:{height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}}},{props:{orientation:"horizontal",size:"small"},style:{height:2}},{props:{orientation:"horizontal",marked:!0},style:{marginBottom:20}},{props:{orientation:"vertical"},style:{height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}}},{props:{orientation:"vertical",size:"small"},style:{width:2}},{props:{orientation:"vertical",marked:!0},style:{marginRight:44}}]}))),kF=Uo("span",{name:"MuiSlider",slot:"Rail"})({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38,variants:[{props:{orientation:"horizontal"},style:{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:"inverted"},style:{opacity:1}}]}),LF=Uo("span",{name:"MuiSlider",slot:"Track"})(uc(({theme:t})=>({display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:t.transitions.create(["left","width","bottom","height"],{duration:t.transitions.duration.shortest}),variants:[{props:{size:"small"},style:{border:"none"}},{props:{orientation:"horizontal"},style:{height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:!1},style:{display:"none"}},...Object.entries(t.palette).filter(sx()).map(([e])=>({props:{color:e,track:"inverted"},style:{...t.vars?{backgroundColor:t.vars.palette.Slider[`${e}Track`],borderColor:t.vars.palette.Slider[`${e}Track`]}:{backgroundColor:t.lighten(t.palette[e].main,.62),borderColor:t.lighten(t.palette[e].main,.62),...t.applyStyles("dark",{backgroundColor:t.darken(t.palette[e].main,.5)}),...t.applyStyles("dark",{borderColor:t.darken(t.palette[e].main,.5)})}}}))]}))),zF=Uo("span",{name:"MuiSlider",slot:"Thumb"})(uc(({theme:t})=>({position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:t.transitions.create(["box-shadow","left","bottom"],{duration:t.transitions.duration.shortest}),"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(t.vars||t).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&.${ea.disabled}`]:{"&:hover":{boxShadow:"none"}},variants:[{props:{size:"small"},style:{width:12,height:12,"&::before":{boxShadow:"none"}}},{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-50%, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 50%)"}},...Object.entries(t.palette).filter(sx()).map(([e])=>({props:{color:e},style:{[`&:hover, &.${ea.focusVisible}`]:{boxShadow:`0px 0px 0px 8px ${t.alpha((t.vars||t).palette[e].main,.16)}`,"@media (hover: none)":{boxShadow:"none"}},[`&.${ea.active}`]:{boxShadow:`0px 0px 0px 14px ${t.alpha((t.vars||t).palette[e].main,.16)}`}}}))]}))),RF=Uo(MF,{name:"MuiSlider",slot:"ValueLabel"})(uc(({theme:t})=>({zIndex:1,whiteSpace:"nowrap",...t.typography.body2,fontWeight:500,transition:t.transitions.create(["transform"],{duration:t.transitions.duration.shortest}),position:"absolute",backgroundColor:(t.vars||t).palette.grey[600],borderRadius:2,color:(t.vars||t).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem",variants:[{props:{orientation:"horizontal"},style:{transform:"translateY(-100%) scale(0)",top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"},[`&.${ea.valueLabelOpen}`]:{transform:"translateY(-100%) scale(1)"}}},{props:{orientation:"vertical"},style:{transform:"translateY(-50%) scale(0)",right:"30px",top:"50%",transformOrigin:"right center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"},[`&.${ea.valueLabelOpen}`]:{transform:"translateY(-50%) scale(1)"}}},{props:{size:"small"},style:{fontSize:t.typography.pxToRem(12),padding:"0.25rem 0.5rem"}},{props:{orientation:"vertical",size:"small"},style:{right:"20px"}}]}))),PF=Uo("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:t=>rx(t)&&t!=="markActive",overridesResolver:(t,e)=>{const{markActive:n}=t;return[e.mark,n&&e.markActive]}})(uc(({theme:t})=>({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor",variants:[{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-1px, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 1px)"}},{props:{markActive:!0},style:{backgroundColor:(t.vars||t).palette.background.paper,opacity:.8}}]}))),NF=Uo("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:t=>rx(t)&&t!=="markLabelActive"})(uc(({theme:t})=>({...t.typography.body2,color:(t.vars||t).palette.text.secondary,position:"absolute",whiteSpace:"nowrap",variants:[{props:{orientation:"horizontal"},style:{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}}},{props:{orientation:"vertical"},style:{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(t.vars||t).palette.text.primary}}]}))),jF=t=>{const{disabled:e,dragging:n,marked:i,orientation:a,track:s,classes:l,color:d,size:f}=t,p={root:["root",e&&"disabled",n&&"dragging",i&&"marked",a==="vertical"&&"vertical",s==="inverted"&&"trackInverted",s===!1&&"trackFalse",d&&`color${bd(d)}`,f&&`size${bd(f)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",e&&"disabled"],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return T7(p,TF,l)},BF=({children:t})=>t,IF=O.forwardRef(function(e,n){const i=uF({props:e,name:"MuiSlider"}),a=v7(),{"aria-label":s,"aria-valuetext":l,"aria-labelledby":d,color:f="primary",classes:p,className:g,disableSwap:v=!1,disabled:y=!1,getAriaLabel:_,getAriaValueText:w,marks:C=!1,max:A=100,min:k=0,name:z,onChange:j,onChangeCommitted:P,orientation:H="horizontal",shiftStep:V=10,size:U="medium",step:Z=1,scale:Q=Bw,slotProps:et={},slots:X={},tabIndex:R,track:dt="normal",value:it,valueLabelDisplay:ut="off",valueLabelFormat:I=Bw,...$}=i,q={...i,isRtl:a,max:A,min:k,classes:p,disabled:y,disableSwap:v,orientation:H,marks:C,color:f,size:U,step:Z,shiftStep:V,scale:Q,track:dt,valueLabelDisplay:ut,valueLabelFormat:I},{axisProps:nt,getRootProps:ot,getHiddenInputProps:F,getThumbProps:K,open:at,active:mt,axis:pt,focusedThumbIndex:yt,range:ft,dragging:Ht,marks:Tt,values:Mt,trackOffset:Ee,trackLeap:Ut,getThumbStyle:ye}=AF({...q,rootRef:n});q.marked=Tt.length>0&&Tt.some(Ot=>Ot.label),q.dragging=Ht,q.focusedThumbIndex=yt;const ge=jF(q),ve={slots:X,slotProps:et},[Cn,En]=gs("root",{elementType:OF,getSlotProps:ot,externalForwardedProps:{...ve,...$},ownerState:q,className:[ge.root,g]}),[nn,mn]=gs("rail",{elementType:kF,externalForwardedProps:ve,ownerState:q,className:ge.rail}),[kn,gn]=gs("track",{elementType:LF,externalForwardedProps:ve,additionalProps:{style:{...nt[pt].offset(Ee),...nt[pt].leap(Ut)}},ownerState:q,className:ge.track}),[wi,Rt]=gs("thumb",{elementType:zF,getSlotProps:K,externalForwardedProps:ve,ownerState:q,className:ge.thumb}),[At,wt]=gs("valueLabel",{elementType:RF,externalForwardedProps:ve,ownerState:q,className:ge.valueLabel}),[Et,zt]=gs("mark",{elementType:PF,externalForwardedProps:ve,ownerState:q,className:ge.mark}),[Yt,re]=gs("markLabel",{elementType:NF,externalForwardedProps:ve,ownerState:q,className:ge.markLabel}),[gt,Ct]=gs("input",{elementType:"input",getSlotProps:F,externalForwardedProps:ve,ownerState:q});return T.jsxs(Cn,{...En,children:[T.jsx(nn,{...mn}),T.jsx(kn,{...gn}),Tt.filter(Ot=>Ot.value>=k&&Ot.value<=A).map((Ot,jt)=>{const Gt=Ep(Ot.value,k,A),Bt=nt[pt].offset(Gt);let Vt;return dt===!1?Vt=Mt.includes(Ot.value):Vt=dt==="normal"&&(ft?Ot.value>=Mt[0]&&Ot.value<=Mt[Mt.length-1]:Ot.value<=Mt[0])||dt==="inverted"&&(ft?Ot.value<=Mt[0]||Ot.value>=Mt[Mt.length-1]:Ot.value>=Mt[0]),T.jsxs(O.Fragment,{children:[T.jsx(Et,{"data-index":jt,...zt,...!qh(Et)&&{markActive:Vt},style:{...Bt,...zt.style},className:Ts(zt.className,Vt&&ge.markActive)}),Ot.label!=null?T.jsx(Yt,{"aria-hidden":!0,"data-index":jt,...re,...!qh(Yt)&&{markLabelActive:Vt},style:{...Bt,...re.style},className:Ts(ge.markLabel,re.className,Vt&&ge.markLabelActive),children:Ot.label}):null]},jt)}),Mt.map((Ot,jt)=>{const Gt=Ep(Ot,k,A),Bt=nt[pt].offset(Gt),Vt=ut==="off"?BF:At;return T.jsx(Vt,{...!qh(Vt)&&{valueLabelFormat:I,valueLabelDisplay:ut,value:typeof I=="function"?I(Q(Ot),jt):I,index:jt,open:at===jt||mt===jt||ut==="on",disabled:y},...wt,children:T.jsx(wi,{"data-index":jt,...Rt,className:Ts(ge.thumb,Rt.className,mt===jt&&ge.active,yt===jt&&ge.focusVisible),style:{...Bt,...ye(jt),...Rt.style},children:T.jsx(gt,{"data-index":jt,"aria-label":_?_(jt):s,"aria-valuenow":Q(Ot),"aria-labelledby":d,"aria-valuetext":w?w(Q(Ot),jt):l,value:Mt[jt],...Ct})})},jt)})]})}),FF=({width:t=32,height:e=32})=>T.jsxs("svg",{width:t,height:e,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[T.jsx("path",{d:"M26.9879 9.62609V22.3861C26.9879 24.9995 24.1479 26.6395 21.8812 25.3328L16.3479 22.1461L10.8146 18.9461C8.54793 17.6395 8.54793 14.3728 10.8146 13.0661L16.3479 9.86609L21.8812 6.67943C24.1479 5.37276 26.9879 6.99943 26.9879 9.62609Z",fill:"#858CA2"}),T.jsx("path",{d:"M5.01562 25.2404C4.46896 25.2404 4.01562 24.7871 4.01562 24.2404V7.76044C4.01562 7.21377 4.46896 6.76044 5.01562 6.76044C5.56229 6.76044 6.01563 7.21377 6.01563 7.76044V24.2404C6.01563 24.7871 5.56229 25.2404 5.01562 25.2404Z",fill:"#858CA2"})]}),HF=({width:t=32,height:e=32})=>T.jsx("svg",{width:t,height:e,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:T.jsx("path",{d:"M28.5448 12.4701C31.374 14.0087 31.374 17.9914 28.5448 19.5299L11.4622 28.8194C8.71248 30.3147 5.33334 28.3684 5.33334 25.2895V6.71055C5.33334 3.63159 8.71248 1.68538 11.4622 3.18066L28.5448 12.4701Z",fill:"#858CA2"})}),UF=({width:t=32,height:e=32})=>T.jsxs("svg",{width:t,height:e,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[T.jsx("path",{d:"M2.66669 8.00002C2.66669 5.48586 2.66669 4.22878 3.44774 3.44774C4.22878 2.66669 5.48586 2.66669 8.00002 2.66669C10.5142 2.66669 11.7713 2.66669 12.5523 3.44774C13.3334 4.22878 13.3334 5.48586 13.3334 8.00002V24C13.3334 26.5142 13.3334 27.7712 12.5523 28.5523C11.7713 29.3334 10.5142 29.3334 8.00002 29.3334C5.48586 29.3334 4.22878 29.3334 3.44774 28.5523C2.66669 27.7712 2.66669 26.5142 2.66669 24V8.00002Z",fill:"#858CA2"}),T.jsx("path",{d:"M18.6667 8.00002C18.6667 5.48586 18.6667 4.22878 19.4478 3.44774C20.2288 2.66669 21.4859 2.66669 24 2.66669C26.5142 2.66669 27.7712 2.66669 28.5523 3.44774C29.3334 4.22878 29.3334 5.48586 29.3334 8.00002V24C29.3334 26.5142 29.3334 27.7712 28.5523 28.5523C27.7712 29.3334 26.5142 29.3334 24 29.3334C21.4859 29.3334 20.2288 29.3334 19.4478 28.5523C18.6667 27.7712 18.6667 26.5142 18.6667 24V8.00002Z",fill:"#858CA2"})]}),VF=({width:t=32,height:e=32})=>T.jsxs("svg",{width:t,height:e,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[T.jsx("path",{d:"M5.01213 22.3739V9.61386C5.01213 7.00053 7.85213 5.36053 10.1188 6.6672L15.6521 9.85387L21.1854 13.0539C23.4521 14.3605 23.4521 17.6272 21.1854 18.9339L15.6521 22.1339L10.1188 25.3206C7.85213 26.6272 5.01213 25.0006 5.01213 22.3739Z",fill:"#858CA2"}),T.jsx("path",{d:"M26.9844 6.75958C27.531 6.75958 27.9844 7.21291 27.9844 7.75958V24.2396C27.9844 24.7862 27.531 25.2396 26.9844 25.2396C26.4377 25.2396 25.9844 24.7862 25.9844 24.2396V7.75958C25.9844 7.21291 26.4377 6.75958 26.9844 6.75958Z",fill:"#858CA2"})]}),$F=({width:t=32,height:e=32})=>T.jsx("svg",{width:t,height:e,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:T.jsx("path",{d:"M2.66666 16C2.66666 9.71462 2.66666 6.57193 4.61928 4.61931C6.5719 2.66669 9.71459 2.66669 16 2.66669C22.2853 2.66669 25.4281 2.66669 27.3807 4.61931C29.3333 6.57193 29.3333 9.71462 29.3333 16C29.3333 22.2854 29.3333 25.4282 27.3807 27.3807C25.4281 29.3334 22.2853 29.3334 16 29.3334C9.71459 29.3334 6.5719 29.3334 4.61928 27.3807C2.66666 25.4282 2.66666 22.2854 2.66666 16Z",fill:"#858CA2"})}),GF=({width:t=32,height:e=32})=>T.jsx("svg",{width:t,height:e,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:T.jsx("path",{d:"M30 28.4444V10.4218C29.9999 10.0093 29.836 9.61366 29.5442 9.322L22.678 2.45578C22.3863 2.16403 21.9907 2.00009 21.5782 2H3.55556C3.143 2 2.74733 2.16389 2.45561 2.45561C2.16389 2.74733 2 3.143 2 3.55556V28.4444C2 28.857 2.16389 29.2527 2.45561 29.5444C2.74733 29.8361 3.143 30 3.55556 30H28.4444C28.857 30 29.2527 29.8361 29.5444 29.5444C29.8361 29.2527 30 28.857 30 28.4444ZM11.3333 9.77778H17.5556C17.9681 9.77778 18.3638 9.94167 18.6555 10.2334C18.9472 10.5251 19.1111 10.9208 19.1111 11.3333C19.1111 11.7459 18.9472 12.1416 18.6555 12.4333C18.3638 12.725 17.9681 12.8889 17.5556 12.8889H11.3333C10.9208 12.8889 10.5251 12.725 10.2334 12.4333C9.94167 12.1416 9.77778 11.7459 9.77778 11.3333C9.77778 10.9208 9.94167 10.5251 10.2334 10.2334C10.5251 9.94167 10.9208 9.77778 11.3333 9.77778ZM22.2222 24.8889C22.2222 25.9935 21.3268 26.8889 20.2222 26.8889H11.7778C10.6732 26.8889 9.77778 25.9935 9.77778 24.8889V20.6667C9.77778 20.2541 9.94167 19.8584 10.2334 19.5667C10.5251 19.275 10.9208 19.1111 11.3333 19.1111H20.6667C21.0792 19.1111 21.4749 19.275 21.7666 19.5667C22.0583 19.8584 22.2222 20.2541 22.2222 20.6667V24.8889Z",fill:"#858CA2"})}),WF=({width:t=32,height:e=32})=>T.jsx("svg",{width:t,height:e,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:T.jsx("path",{d:"M25.0339 1.78576C24.5443 1.79004 24.0845 1.98731 23.8248 2.38613L19.6867 10.2253C19.9933 10.3325 20.6829 10.6413 22.9734 11.6834L23.0074 11.7005C23.4033 11.8806 23.7056 12.0093 23.8248 12.0607C23.8652 12.08 23.9036 12.11 23.944 12.1293L26.9582 3.72411C27.1476 3.05941 26.675 2.29393 25.9194 1.9916C25.6384 1.85008 25.3276 1.78361 25.0339 1.78576ZM17.2516 10.8943C16.1979 10.9736 15.2805 11.5011 14.6291 12.421C15.0399 13.1178 15.7594 13.9691 16.7748 13.9476C17.043 13.9369 17.2686 14.132 17.3197 14.3936C17.5262 14.7174 18.7948 15.292 19.1588 15.1484C19.3121 15.0883 19.476 15.1012 19.6186 15.1827C19.7612 15.2642 19.8634 15.3971 19.8911 15.5601C19.9124 15.6501 20.1508 15.9653 20.6404 16.1947C21.0256 16.3748 21.4003 16.4199 21.611 16.3148C21.7473 16.2462 21.8963 16.2441 22.0368 16.2977C22.1794 16.3513 22.3028 16.4649 22.3603 16.6064C22.7286 17.5113 24.4102 17.5777 25.5618 17.4813C25.7299 16.7458 25.6852 15.9803 25.4255 15.2684C25.0658 14.2885 24.3527 13.5145 23.382 13.0728C23.2799 13.0278 22.9499 12.8691 22.5306 12.6783C20.5893 11.7949 19.493 11.3146 19.278 11.2545C18.5671 10.9715 17.8838 10.8471 17.2516 10.8943ZM14.0501 13.5188C13.8798 13.9262 13.6861 14.3078 13.4882 14.6681C13.7223 15.2427 14.4141 16.5743 15.6849 16.2805C15.8318 16.2462 15.9872 16.2655 16.1106 16.3491C16.2362 16.4327 16.3065 16.5614 16.332 16.7093C16.3682 16.9152 16.6087 17.1596 16.9451 17.344C17.4219 17.6035 17.937 17.6614 18.1541 17.567C18.2967 17.5048 18.4564 17.5006 18.5969 17.567C18.7374 17.6335 18.8438 17.76 18.8864 17.9101C18.963 18.1717 19.2312 18.4397 19.6016 18.6305C20.038 18.8535 20.5361 18.935 20.8617 18.8192C21.1129 18.7313 21.3811 18.8385 21.5088 19.0765C21.9899 19.975 23.5694 20.0714 24.7955 19.9857C24.9509 19.5397 25.0956 19.0808 25.2382 18.5962C25.0913 18.6048 24.9381 18.6134 24.7784 18.6134C23.6375 18.6134 22.273 18.3861 21.594 17.4469C21.1342 17.5091 20.6063 17.4083 20.0784 17.1382C19.6953 16.9409 19.2738 16.6386 19.0226 16.2634C18.3287 16.2634 17.5304 15.8753 17.1324 15.6287C16.8237 15.4378 16.5832 15.2491 16.4342 15.0454C15.3528 14.9447 14.5801 14.2349 14.0501 13.5188ZM12.807 15.7487C9.42885 20.4767 3.66025 20.3373 3.59426 20.3287C3.37927 20.3094 3.16853 20.4252 3.06636 20.6204C2.96418 20.8155 2.97908 21.0492 3.11744 21.2207C4.09023 22.4301 5.13539 23.4528 6.19971 24.3255C6.70206 24.4263 9.86309 24.8766 12.9943 21.2207C13.1901 20.9913 13.5329 20.972 13.7606 21.1693C13.9884 21.3665 14.0075 21.7117 13.8117 21.9412C11.6277 24.4906 9.32454 25.2883 7.71529 25.4577C9.06059 26.3711 10.4165 27.0615 11.6831 27.5847C12.4877 27.4153 15.1868 26.6027 17.5751 22.9361C17.7412 22.6831 18.0903 22.5973 18.3414 22.7645C18.5926 22.9318 18.6607 23.2834 18.4947 23.5365C16.6939 26.3003 14.7228 27.5976 13.3349 28.2022C16.1681 29.1264 18.2818 29.2078 18.4606 29.2143H18.4777C18.5798 29.2143 18.6799 29.1843 18.7672 29.1285C18.9204 29.032 22.0751 26.9564 24.3868 21.1178C24.2974 21.1199 24.2058 21.135 24.1143 21.135C22.9223 21.135 21.545 20.8927 20.7936 19.9514C20.2657 20.0157 19.6612 19.8935 19.1077 19.6083C18.6565 19.3746 18.2989 19.0615 18.069 18.6992C17.49 18.7485 16.8642 18.5383 16.4342 18.3046C15.9914 18.0623 15.6445 17.7579 15.4465 17.4126C14.1927 17.4791 13.3221 16.6193 12.807 15.7487Z",fill:"#858CA2"})}),ZF=({width:t=32,height:e=32})=>T.jsxs("svg",{width:t,height:e,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[T.jsx("path",{d:"M22.6667 5.33335V6.66669H20V5.33335H12V6.66669H9.33334V5.33335C9.33334 4.62611 9.61429 3.94783 10.1144 3.44774C10.6145 2.94764 11.2928 2.66669 12 2.66669H20C20.7073 2.66669 21.3855 2.94764 21.8856 3.44774C22.3857 3.94783 22.6667 4.62611 22.6667 5.33335Z",fill:"#858CA2"}),T.jsx("path",{d:"M26.6667 8H5.33333C4.97971 8 4.64057 8.14048 4.39052 8.39052C4.14048 8.64057 4 8.97971 4 9.33333C4 9.68696 4.14048 10.0261 4.39052 10.2761C4.64057 10.5262 4.97971 10.6667 5.33333 10.6667H6.76L7.92 26.8533C7.96732 27.5277 8.26903 28.159 8.76409 28.6194C9.25915 29.0798 9.91061 29.335 10.5867 29.3333H21.44C22.1161 29.335 22.7675 29.0798 23.2626 28.6194C23.7576 28.159 24.0593 27.5277 24.1067 26.8533L25.24 10.6667H26.6667C27.0203 10.6667 27.3594 10.5262 27.6095 10.2761C27.8595 10.0261 28 9.68696 28 9.33333C28 8.97971 27.8595 8.64057 27.6095 8.39052C27.3594 8.14048 27.0203 8 26.6667 8ZM17.3333 22.6667C17.3333 23.0203 17.1929 23.3594 16.9428 23.6095C16.6928 23.8595 16.3536 24 16 24C15.6464 24 15.3072 23.8595 15.0572 23.6095C14.8071 23.3594 14.6667 23.0203 14.6667 22.6667V14.6667C14.6667 14.313 14.8071 13.9739 15.0572 13.7239C15.3072 13.4738 15.6464 13.3333 16 13.3333C16.3536 13.3333 16.6928 13.4738 16.9428 13.7239C17.1929 13.9739 17.3333 14.313 17.3333 14.6667V22.6667Z",fill:"#858CA2"})]});function qF({videoRef:t,currentTime:e,setCurrentTime:n,onFrameBackward:i,onPlayPause:a,isPlaying:s,onFrameForward:l,onSaveAnnotation:d,onStop:f,onDelete:p,onDeleteAll:g}){function v(_){if(Number.isNaN(_))return"0:00";const w=Math.floor(_/60),C=Math.floor(_-w*60);return`${w}:${C<10?`0${C}`:C}`}const y=_=>n(_.target.value);return T.jsxs("div",{className:"controls",children:[T.jsxs("div",{className:"input-group",children:[T.jsx("p",{className:"time",children:v(e)}),T.jsx(IF,{"aria-label":"time-indicator",value:e,onChange:y,min:0,max:t.current===null?1:t.current.duration,step:.1,className:"video-slider"}),t.current!==null?T.jsx("p",{className:"time",children:v(t.current.duration-e)}):T.jsx("p",{className:"time",children:v(0)})]}),T.jsxs("div",{className:"buttons-group",children:[T.jsx("button",{className:"control-btn arrow-btn",onClick:i,title:"Previous Frame",children:T.jsx(FF,{})}),T.jsx("button",{className:s?"control-btn pause-btn":"control-btn play-btn",onClick:a,children:s?T.jsx(UF,{}):T.jsx(HF,{})}),T.jsx("button",{className:"control-btn arrow-btn",onClick:l,title:"Next Frame",children:T.jsx(VF,{})}),T.jsx("button",{className:"control-btn stop-btn",onClick:f,title:"Stop",children:T.jsx($F,{})}),T.jsx("button",{className:"control-btn save-btn",onClick:d,title:"Save",children:T.jsx(GF,{})}),T.jsx("button",{className:"control-btn delete-btn",onClick:p,title:"Delete",children:T.jsx(ZF,{})}),T.jsx("button",{className:"control-btn clean-btn",onClick:g,title:"DeleteAll",children:T.jsx(WF,{})})]})]})}function YF({flightId:t}){const[e,n]=O.useState([]),[i,a]=O.useState(null),[s,l]=O.useState([]),[d,f]=O.useState(0),[p,g]=O.useState(null),[v,y]=O.useState([]),[_,w]=O.useState([]),[C,A]=O.useState(!1),[k,z]=O.useState(640),[j,P]=O.useState(480),[H,V]=O.useState(""),[U,Z]=O.useState(bs.day),Q=O.useRef(null),et=O.useRef(null),X=O.useCallback(async()=>{try{const Tt=await BB(t);n(Tt??[])}catch(Tt){console.error(Tt),n([])}},[t]);O.useEffect(()=>{X()},[X]),O.useEffect(()=>{if(!i){l([]);return}Y2(i.id).then(l).catch(()=>l([]))},[i]);const R=Tt=>{Tt&&(a(Tt),y([]),w([]),f(0),A(!1),V(""))},dt=async()=>{if(!i)return;if(!v||v.length===0){V("Please create at least one detection before saving");return}const Tt=i.mediaType===2;try{await jB(i.id,Tt?d:null,v,k,j);const Mt=await Y2(i.id);l(Mt),V("")}catch(Mt){V(`Save failed: ${(Mt==null?void 0:Mt.message)??"unknown"}`)}},it=()=>{if(_.length===0){V("Please select a detection to delete");return}y(v.filter((Tt,Mt)=>!_.includes(Mt))),w([]),V("")},ut=()=>{y([])},I=Tt=>{const Mt=s[Tt];if(!Mt)return;if(Mt.time){const Ut=Mt.time.split(":").map(Number),ye=Ut[0]*3600+Ut[1]*60+Ut[2];f(ye),Q.current&&(Q.current.currentTime=ye)}const Ee=(Mt.detections??[]).map(Ut=>({x1:Ut.centerX*k-Ut.width*k/2,y1:Ut.centerY*j-Ut.height*j/2,x2:Ut.centerX*k+Ut.width*k/2,y2:Ut.centerY*j+Ut.height*j/2,class:p?{...p,Id:Ut.classNum,Name:Ut.label||p.Name}:{Id:Ut.classNum,Name:Ut.label,Color:"#FF0000"},affiliation:Ut.affiliation,combatReadiness:Ut.combatReadiness,kw:1,kh:1}));y(Ee),w([]),A(!1)},$=Tt=>g(Tt),q=Tt=>y(Tt),nt=Tt=>w(Tt),ot=()=>A(Tt=>!Tt),F=()=>{A(!1),f(0)},K=()=>{Q.current&&(Q.current.currentTime+=1/30,f(Q.current.currentTime))},at=()=>{Q.current&&(Q.current.currentTime-=1/30,f(Q.current.currentTime))},mt=(Tt,Mt)=>{z(Tt),P(Mt)},pt=Tt=>f(Tt),yt=O.useCallback(()=>!i||i.mediaType!==2?[]:s.filter(Tt=>{if(!Tt.time)return!1;const Mt=Tt.time.split(":").map(Number),Ee=Mt[0]*3600+Mt[1]*60+Mt[2];return Math.abs(Ee-d)<.2}).flatMap(Tt=>(Tt.detections??[]).map(Mt=>({x1:Mt.centerX*k-Mt.width*k/2,y1:Mt.centerY*j-Mt.height*j/2,x2:Mt.centerX*k+Mt.width*k/2,y2:Mt.centerY*j+Mt.height*j/2,class:{Id:Mt.classNum,Name:Mt.label,Color:"#888888"},affiliation:Mt.affiliation,combatReadiness:Mt.combatReadiness}))),[i,s,d,k,j]);O.useEffect(()=>{const Tt=Mt=>{if(!(Mt.target instanceof HTMLInputElement||Mt.target instanceof HTMLTextAreaElement))switch(Mt.key){case" ":(i==null?void 0:i.mediaType)===2&&(Mt.preventDefault(),ot());break;case"Enter":Mt.preventDefault(),dt();break;case"Delete":it();break;case"x":case"X":ut();break}};return window.addEventListener("keydown",Tt),()=>window.removeEventListener("keydown",Tt)},[i,v,_]);const ft=(i==null?void 0:i.mediaType)===2,Ht=(i==null?void 0:i.mediaType)===1;return T.jsxs("div",{className:"content-wrapper",children:[T.jsxs("div",{className:"side-menu left-menu",children:[T.jsx(UB,{files:e,selectedFile:i,onFileSelect:R,flightId:t,onRefresh:X}),T.jsx(JB,{onClassSelect:$,detectionType:U,setDetectionType:Z})]}),T.jsxs("div",{className:"player-wrapper",children:[H&&T.jsx("div",{className:"error-message",children:H}),T.jsxs("div",{className:"player-container",ref:et,children:[T.jsxs("div",{className:"player-block",children:[ft&&T.jsx(Rj,{videoUrl:X2(i.id),currentTime:d,videoRef:Q,isPlaying:C,onSizeChanged:mt,onSetCurrentTime:pt,children:T.jsx(aw,{width:k,height:j,detections:v,selectedDetectionIndices:_,onDetectionsChange:q,onSelectionChange:nt,detectionClass:p,detectionType:U,timeWindowDetections:yt()})}),Ht&&T.jsxs("div",{className:"player",children:[T.jsx("img",{src:X2(i.id),alt:i.name,style:{width:"100%",height:"100%",objectFit:"contain"},onLoad:Tt=>mt(Tt.currentTarget.naturalWidth,Tt.currentTarget.naturalHeight)}),T.jsx("div",{className:"player-item",children:T.jsx(aw,{width:k,height:j,detections:v,selectedDetectionIndices:_,onDetectionsChange:q,onSelectionChange:nt,detectionClass:p,detectionType:U})})]})]}),ft&&T.jsx(qF,{videoRef:Q,currentTime:d,setCurrentTime:f,onFrameBackward:at,onPlayPause:ot,isPlaying:C,onFrameForward:K,onSaveAnnotation:dt,onStop:F,onDelete:it,onDeleteAll:ut}),Ht&&T.jsx("div",{className:"controls",children:T.jsxs("div",{className:"buttons-group",children:[T.jsx("button",{className:"control-btn save-btn",onClick:dt,title:"Save",children:"Save"}),T.jsx("button",{className:"control-btn delete-btn",onClick:it,title:"Delete",children:"Del"}),T.jsx("button",{className:"control-btn clean-btn",onClick:ut,title:"DeleteAll",children:"X"})]})})]})]}),T.jsx("div",{className:"side-menu right-menu",children:T.jsx(Pj,{annotations:s,onAnnotationClick:I})})]})}function XF(){const{selectedFlight:t}=Pp();return T.jsx(YF,{flightId:(t==null?void 0:t.id)??null})}function KF(t,e){const[n,i]=O.useState(t);return O.useEffect(()=>{const a=setTimeout(()=>i(t),e);return()=>clearTimeout(a)},[t,e]),n}function QF(t,e=100,n=600){const[i,a]=O.useState(t),s=O.useRef(!1),l=O.useRef(0),d=O.useRef(0),f=O.useCallback(p=>{s.current=!0,l.current=p.clientX,d.current=i,p.preventDefault()},[i]);return O.useEffect(()=>{const p=v=>{if(!s.current)return;const y=v.clientX-l.current;a(Math.min(n,Math.max(e,d.current+y)))},g=()=>{s.current=!1};return window.addEventListener("mousemove",p),window.addEventListener("mouseup",g),()=>{window.removeEventListener("mousemove",p),window.removeEventListener("mouseup",g)}},[e,n]),{width:i,onMouseDown:f,setWidth:a}}function JF({selectedClassNum:t,onSelect:e,photoMode:n,onPhotoModeChange:i}){const{t:a}=Gn(),[s,l]=O.useState([]);O.useEffect(()=>{ie.get("/api/annotations/classes").then(l).catch(()=>{})},[]),O.useEffect(()=>{const f=p=>{const g=parseInt(p.key);if(g>=1&&g<=9){const v=g-1,y=s[v+n];y&&e(y.id)}};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[s,n,e]);const d=[{value:0,label:a("annotations.regular")},{value:20,label:a("annotations.winter")},{value:40,label:a("annotations.night")}];return T.jsxs("div",{className:"border-t border-az-border p-2",children:[T.jsx("div",{className:"text-xs text-az-muted mb-1 font-semibold",children:a("annotations.classes")}),T.jsx("div",{className:"flex gap-1 mb-2",children:d.map(f=>T.jsx("button",{onClick:()=>i(f.value),className:`text-xs px-2 py-0.5 rounded ${n===f.value?"bg-az-orange text-white":"bg-az-bg text-az-muted"}`,children:f.label},f.value))}),T.jsx("div",{className:"space-y-0.5 max-h-48 overflow-y-auto",children:s.filter(f=>f.photoMode===n).map((f,p)=>T.jsxs("button",{onClick:()=>e(f.id),className:`w-full flex items-center gap-1.5 px-1.5 py-0.5 rounded text-xs text-left ${t===f.id?"bg-az-border text-white":"text-az-text hover:bg-az-bg"}`,children:[T.jsx("span",{className:"w-2.5 h-2.5 rounded-full shrink-0",style:{backgroundColor:f.color}}),T.jsxs("span",{className:"text-az-muted",children:[p+1,"."]}),T.jsx("span",{className:"truncate",children:f.name}),T.jsx("span",{className:"text-az-muted ml-auto",children:f.shortName})]},f.id))})]})}const Ia=6,Mh=12,tH={0:"#FFD700",1:"#228be6",2:"#fa5252"};function eH({media:t,annotation:e,detections:n,onDetectionsChange:i,selectedClassNum:a,currentTime:s,annotations:l}){const d=O.useRef(null),f=O.useRef(null),p=O.useRef(null),[g,v]=O.useState(1),[y,_]=O.useState({x:0,y:0}),[w,C]=O.useState(new Set),[A,k]=O.useState(null),[z,j]=O.useState(null),[P,H]=O.useState({w:0,h:0}),V=O.useCallback(()=>{const I=new Image;I.crossOrigin="anonymous",e?I.src=`/api/annotations/annotations/${e.id}/image`:I.src=`/api/annotations/media/${t.id}/file`,I.onload=()=>{p.current=I,H({w:I.naturalWidth,h:I.naturalHeight})}},[t,e]);O.useEffect(()=>{V()},[V]),O.useCallback((I,$)=>({x:I*P.w*g+y.x,y:$*P.h*g+y.y}),[P,g,y]);const U=O.useCallback((I,$)=>({x:Math.max(0,Math.min(1,(I-y.x)/(P.w*g))),y:Math.max(0,Math.min(1,($-y.y)/(P.h*g)))}),[P,g,y]),Z=O.useCallback(()=>{const I=d.current,$=I==null?void 0:I.getContext("2d");if(!I||!$||!p.current)return;const q=f.current;q&&(I.width=q.clientWidth,I.height=q.clientHeight),$.clearRect(0,0,I.width,I.height),$.save(),$.drawImage(p.current,y.x,y.y,P.w*g,P.h*g);const nt=Q();[...n,...nt].forEach((F,K)=>{const at=w.has(K)&&K<n.length,mt=(F.centerX-F.width/2)*P.w*g+y.x,pt=(F.centerY-F.height/2)*P.h*g+y.y,yt=F.width*P.w*g,ft=F.height*P.h*g,Ht=tH[F.affiliation]||"#FFD700";$.strokeStyle=Ht,$.lineWidth=at?2:1,$.strokeRect(mt,pt,yt,ft),$.fillStyle=Ht,$.globalAlpha=.1,$.fillRect(mt,pt,yt,ft),$.globalAlpha=1;const Tt=F.confidence<.995?`${F.label} ${(F.confidence*100).toFixed(0)}%`:F.label;$.fillStyle=Ht,$.font="11px sans-serif",$.fillText(Tt,mt+2,pt-3),F.combatReadiness===1&&($.fillStyle="#40c057",$.beginPath(),$.arc(mt+yt-6,pt+6,3,0,Math.PI*2),$.fill()),at&&et(mt,pt,yt,ft).forEach(Ee=>{$.fillStyle="#fff",$.fillRect(Ee.x-Ia/2,Ee.y-Ia/2,Ia,Ia),$.strokeStyle=Ht,$.strokeRect(Ee.x-Ia/2,Ee.y-Ia/2,Ia,Ia)})}),z&&($.strokeStyle="#fd7e14",$.lineWidth=1,$.setLineDash([4,4]),$.strokeRect(z.x,z.y,z.w,z.h),$.setLineDash([])),$.restore()},[n,w,g,y,P,z,s,l]);O.useEffect(()=>{const I=requestAnimationFrame(Z);return()=>cancelAnimationFrame(I)},[Z]),O.useEffect(()=>{const I=f.current;if(!I)return;const $=new ResizeObserver(()=>Z());return $.observe(I),()=>$.disconnect()},[Z]);const Q=()=>{if(t.mediaType!==2)return[];const I=s*1e7;return l.filter($=>{if(!$.time)return!1;const q=$.time.split(":").map(Number),nt=(q[0]*3600+q[1]*60+q[2])*1e7;return Math.abs(nt-I)<2e6}).flatMap($=>$.detections)},et=(I,$,q,nt)=>[{x:I,y:$,cursor:"nw-resize",name:"tl"},{x:I+q/2,y:$,cursor:"n-resize",name:"tc"},{x:I+q,y:$,cursor:"ne-resize",name:"tr"},{x:I+q,y:$+nt/2,cursor:"e-resize",name:"mr"},{x:I+q,y:$+nt,cursor:"se-resize",name:"br"},{x:I+q/2,y:$+nt,cursor:"s-resize",name:"bc"},{x:I,y:$+nt,cursor:"sw-resize",name:"bl"},{x:I,y:$+nt/2,cursor:"w-resize",name:"ml"}],X=(I,$)=>{for(let q=n.length-1;q>=0;q--){const nt=n[q],ot=(nt.centerX-nt.width/2)*P.w*g+y.x,F=(nt.centerY-nt.height/2)*P.h*g+y.y,K=nt.width*P.w*g,at=nt.height*P.h*g;if(w.has(q)){const mt=et(ot,F,K,at);for(const pt of mt)if(Math.abs(I-pt.x)<Ia&&Math.abs($-pt.y)<Ia)return{type:"handle",index:q,handle:pt.name}}if(I>=ot&&I<=ot+K&&$>=F&&$<=F+at)return{type:"box",index:q}}return null},R=I=>{var F;const $=(F=d.current)==null?void 0:F.getBoundingClientRect();if(!$)return;const q=I.clientX-$.left,nt=I.clientY-$.top;if(I.ctrlKey&&I.button===0){k({type:"draw",startX:q,startY:nt});return}const ot=X(q,nt);(ot==null?void 0:ot.type)==="handle"?k({type:"resize",startX:q,startY:nt,detectionIndex:ot.index,handle:ot.handle}):(ot==null?void 0:ot.type)==="box"?(I.ctrlKey?C(K=>{const at=new Set(K);return at.has(ot.index)?at.delete(ot.index):at.add(ot.index),at}):C(new Set([ot.index])),k({type:"move",startX:q,startY:nt,detectionIndex:ot.index})):(C(new Set),k({type:"draw",startX:q,startY:nt}))},dt=I=>{var ot;if(!A)return;const $=(ot=d.current)==null?void 0:ot.getBoundingClientRect();if(!$)return;const q=I.clientX-$.left,nt=I.clientY-$.top;if(A.type==="draw")j({x:Math.min(A.startX,q),y:Math.min(A.startY,nt),w:Math.abs(q-A.startX),h:Math.abs(nt-A.startY)});else if(A.type==="move"&&A.detectionIndex!==void 0){const F=(q-A.startX)/(P.w*g),K=(nt-A.startY)/(P.h*g),at=[...n];(w.size>0?Array.from(w):[A.detectionIndex]).forEach(pt=>{at[pt]&&(at[pt]={...at[pt],centerX:Math.max(at[pt].width/2,Math.min(1-at[pt].width/2,at[pt].centerX+F)),centerY:Math.max(at[pt].height/2,Math.min(1-at[pt].height/2,at[pt].centerY+K))})}),i(at),k({...A,startX:q,startY:nt})}else if(A.type==="resize"&&A.detectionIndex!==void 0&&A.handle){const F=A.detectionIndex,K=n[F],at=U(q,nt),mt=[...n];let pt=K.centerX-K.width/2,yt=K.centerY-K.height/2,ft=K.centerX+K.width/2,Ht=K.centerY+K.height/2;A.handle.includes("l")&&(pt=at.x),A.handle.includes("r")&&(ft=at.x),A.handle.includes("t")&&(yt=at.y),A.handle.includes("b")&&(Ht=at.y);const Tt=Math.abs(ft-pt),Mt=Math.abs(Ht-yt);Tt*P.w*g>=Mh&&Mt*P.h*g>=Mh&&(mt[F]={...K,centerX:Math.min(pt,ft)+Tt/2,centerY:Math.min(yt,Ht)+Mt/2,width:Tt,height:Mt},i(mt))}},it=()=>{if((A==null?void 0:A.type)==="draw"&&z){const I=z.w/(P.w*g),$=z.h/(P.h*g);if(I*P.w>=Mh&&$*P.h>=Mh){const q=U(z.x+z.w/2,z.y+z.h/2),nt={id:crypto.randomUUID(),classNum:a,label:"",confidence:1,affiliation:0,combatReadiness:0,centerX:q.x,centerY:q.y,width:I,height:$};i([...n,nt]),C(new Set([n.length]))}j(null)}k(null)},ut=I=>{if(!I.ctrlKey)return;I.preventDefault();const $=I.deltaY>0?.9:1.1;v(q=>Math.max(.1,Math.min(10,q*$)))};return O.useEffect(()=>{const I=$=>{if(!($.target instanceof HTMLInputElement)&&($.key==="Delete"&&w.size>0&&(i(n.filter((q,nt)=>!w.has(nt))),C(new Set)),$.key==="x"||$.key==="X")){if($.target instanceof HTMLInputElement)return;i([]),C(new Set)}};return window.addEventListener("keydown",I),()=>window.removeEventListener("keydown",I)},[n,w,i]),T.jsx("div",{ref:f,className:"flex-1 relative overflow-hidden cursor-crosshair",children:T.jsx("canvas",{ref:d,className:"absolute inset-0",onMouseDown:R,onMouseMove:dt,onMouseUp:it,onMouseLeave:it,onWheel:ut})})}var Er=(t=>(t[t.Created=0]="Created",t[t.Edited=1]="Edited",t[t.Validated=2]="Validated",t))(Er||{});function nH(){const{t}=Gn(),{selectedFlight:e}=Pp(),n=QF(250,200,400),[i,a]=O.useState([]),[s,l]=O.useState(0),[d,f]=O.useState(1),[p]=O.useState(20),[g,v]=O.useState(""),[y,_]=O.useState(""),[w,C]=O.useState(null),[A,k]=O.useState(!1),[z,j]=O.useState(""),P=KF(z,400),[H,V]=O.useState(0),[U,Z]=O.useState(0),[Q,et]=O.useState(new Set),[X,R]=O.useState("annotations"),[dt,it]=O.useState(null),[ut,I]=O.useState([]),[$,q]=O.useState([]),nt=O.useCallback(async()=>{const ft=new URLSearchParams({page:String(d),pageSize:String(p)});g&&ft.set("fromDate",g),y&&ft.set("toDate",y),e&&ft.set("flightId",e.id),w!==null&&ft.set("status",String(w)),H&&ft.set("classNum",String(H)),A&&ft.set("hasDetections","true"),P&&ft.set("name",P);try{const Ht=await ie.get(`/api/annotations/dataset?${ft}`);a(Ht.items),l(Ht.totalCount)}catch{}},[d,p,g,y,e,w,H,A,P]);O.useEffect(()=>{nt()},[nt]);const ot=async ft=>{try{const Ht=await ie.get(`/api/annotations/dataset/${ft.annotationId}`);it(Ht),I(Ht.detections),R("editor")}catch{}},F=async()=>{Q.size!==0&&(await ie.post("/api/annotations/dataset/bulk-status",{annotationIds:Array.from(Q),status:Er.Validated}),et(new Set),nt())},K=O.useCallback(async()=>{try{const ft=await ie.get("/api/annotations/dataset/class-distribution");q(ft)}catch{}},[]);O.useEffect(()=>{X==="distribution"&&K()},[X,K]);const at=Math.max(...$.map(ft=>ft.count),1),mt=Math.ceil(s/p),pt=dt?{id:dt.mediaId,name:"",path:"",mediaType:1,mediaStatus:0,duration:null,annotationCount:0,waypointId:null,userId:""}:null,yt=[{label:"All",value:null},{label:t("dataset.status.created"),value:Er.Created},{label:t("dataset.status.edited"),value:Er.Edited},{label:t("dataset.status.validated"),value:Er.Validated}];return T.jsxs("div",{className:"flex h-full",children:[T.jsxs("div",{style:{width:n.width},className:"bg-az-panel border-r border-az-border flex flex-col shrink-0",children:[T.jsx(JF,{selectedClassNum:H,onSelect:V,photoMode:U,onPhotoModeChange:Z}),T.jsx("div",{className:"p-2 border-t border-az-border",children:T.jsxs("label",{className:"flex items-center gap-1.5 text-xs text-az-text cursor-pointer",children:[T.jsx("input",{type:"checkbox",checked:A,onChange:ft=>k(ft.target.checked),className:"accent-az-orange"}),t("dataset.objectsOnly")]})}),T.jsx("div",{className:"p-2 border-t border-az-border",children:T.jsx("input",{value:z,onChange:ft=>j(ft.target.value),placeholder:t("dataset.search"),className:"w-full bg-az-bg border border-az-border rounded px-2 py-1 text-xs text-az-text outline-none"})})]}),T.jsx("div",{onMouseDown:n.onMouseDown,className:"w-1 cursor-col-resize bg-az-border hover:bg-az-orange shrink-0"}),T.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[T.jsxs("div",{className:"flex items-center gap-2 p-2 border-b border-az-border bg-az-panel text-xs flex-wrap",children:[T.jsx("input",{type:"date",value:g,onChange:ft=>v(ft.target.value),className:"bg-az-bg border border-az-border rounded px-2 py-1 text-az-text"}),T.jsx("input",{type:"date",value:y,onChange:ft=>_(ft.target.value),className:"bg-az-bg border border-az-border rounded px-2 py-1 text-az-text"}),yt.map(ft=>T.jsx("button",{onClick:()=>{C(ft.value),f(1)},className:`px-2 py-0.5 rounded ${w===ft.value?"bg-az-orange text-white":"bg-az-bg text-az-muted"}`,children:ft.label},String(ft.value))),T.jsx("div",{className:"flex-1"}),Q.size>0&&T.jsxs("button",{onClick:F,className:"bg-az-green text-white px-2 py-0.5 rounded",children:[t("dataset.validate")," (",Q.size,")"]})]}),T.jsx("div",{className:"flex border-b border-az-border bg-az-panel",children:["annotations","editor","distribution"].map(ft=>T.jsx("button",{onClick:()=>R(ft),className:`px-3 py-1.5 text-xs ${X===ft?"bg-az-bg text-white border-b-2 border-az-orange":"text-az-muted"}`,children:t(`dataset.${ft==="distribution"?"classDistribution":ft}`)},ft))}),X==="annotations"&&T.jsxs("div",{className:"flex-1 overflow-y-auto p-2",children:[T.jsx("div",{className:"grid gap-2",style:{gridTemplateColumns:"repeat(auto-fill, minmax(180px, 1fr))"},children:i.map(ft=>T.jsxs("div",{onClick:Ht=>{Ht.ctrlKey?et(Tt=>{const Mt=new Set(Tt);return Mt.has(ft.annotationId)?Mt.delete(ft.annotationId):Mt.add(ft.annotationId),Mt}):et(new Set([ft.annotationId]))},onDoubleClick:()=>ot(ft),className:`bg-az-panel border rounded overflow-hidden cursor-pointer ${Q.has(ft.annotationId)?"border-az-orange":"border-az-border"} ${ft.isSeed?"ring-2 ring-az-red":""}`,children:[T.jsx("img",{src:`/api/annotations/annotations/${ft.annotationId}/thumbnail`,alt:ft.imageName,className:"w-full h-32 object-cover bg-az-bg",loading:"lazy"}),T.jsxs("div",{className:"p-1.5 text-xs",children:[T.jsx("div",{className:"truncate text-az-text",children:ft.imageName}),T.jsxs("div",{className:"flex justify-between",children:[T.jsx("span",{className:"text-az-muted",children:new Date(ft.createdDate).toLocaleDateString()}),T.jsx("span",{className:`px-1 rounded ${ft.status===Er.Validated?"bg-az-green/20 text-az-green":ft.status===Er.Edited?"bg-az-blue/20 text-az-blue":"bg-az-muted/20 text-az-muted"}`,children:ft.status===Er.Validated?t("dataset.status.validated"):ft.status===Er.Edited?t("dataset.status.edited"):t("dataset.status.created")})]})]})]},ft.annotationId))}),mt>1&&T.jsxs("div",{className:"flex justify-center gap-2 py-3",children:[T.jsx("button",{onClick:()=>f(ft=>Math.max(1,ft-1)),disabled:d===1,className:"text-xs text-az-muted disabled:opacity-30 px-2 py-1 bg-az-panel rounded",children:"Prev"}),T.jsxs("span",{className:"text-xs text-az-text py-1",children:[d," / ",mt]}),T.jsx("button",{onClick:()=>f(ft=>Math.min(mt,ft+1)),disabled:d===mt,className:"text-xs text-az-muted disabled:opacity-30 px-2 py-1 bg-az-panel rounded",children:"Next"})]})]}),X==="editor"&&pt&&dt&&T.jsx("div",{className:"flex-1 overflow-hidden",children:T.jsx(eH,{media:pt,annotation:dt,detections:ut,onDetectionsChange:I,selectedClassNum:H,currentTime:0,annotations:[]})}),X==="distribution"&&T.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:T.jsx("div",{className:"space-y-1.5 max-w-2xl",children:$.map(ft=>T.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[T.jsx("span",{className:"w-2.5 h-2.5 rounded-full shrink-0",style:{backgroundColor:ft.color}}),T.jsx("span",{className:"w-40 truncate text-az-text",children:ft.label}),T.jsx("div",{className:"flex-1 bg-az-bg rounded h-4 overflow-hidden",children:T.jsx("div",{className:"h-full rounded",style:{width:`${ft.count/at*100}%`,backgroundColor:ft.color,opacity:.7}})}),T.jsx("span",{className:"text-az-muted w-12 text-right",children:ft.count})]},ft.classNum))})})]})]})}function iH(){const{t}=Gn(),[e,n]=O.useState([]),[i,a]=O.useState([]),[s,l]=O.useState([]),[d,f]=O.useState({name:"",shortName:"",color:"#FF0000",maxSizeM:7}),[p,g]=O.useState({name:"",email:"",password:"",role:"Annotator"}),[v,y]=O.useState(null);O.useEffect(()=>{ie.get("/api/annotations/classes").then(n).catch(()=>{}),ie.get("/api/flights/aircrafts").then(a).catch(()=>{}),ie.get("/api/admin/users").then(l).catch(()=>{})},[]);const _=async()=>{if(!d.name)return;await ie.post("/api/admin/classes",d);const z=await ie.get("/api/annotations/classes");n(z),f({name:"",shortName:"",color:"#FF0000",maxSizeM:7})},w=async z=>{await ie.delete(`/api/admin/classes/${z}`),n(j=>j.filter(P=>P.id!==z))},C=async()=>{if(!p.email||!p.password)return;await ie.post("/api/admin/users",p);const z=await ie.get("/api/admin/users");l(z),g({name:"",email:"",password:"",role:"Annotator"})},A=async()=>{v&&(await ie.patch(`/api/admin/users/${v}`,{isActive:!1}),l(z=>z.map(j=>j.id===v?{...j,isActive:!1}:j)),y(null))},k=async z=>{await ie.patch(`/api/flights/aircrafts/${z.id}`,{isDefault:!z.isDefault}),a(j=>j.map(P=>P.id===z.id?{...P,isDefault:!P.isDefault}:P))};return T.jsxs("div",{className:"flex h-full overflow-y-auto p-4 gap-4",children:[T.jsxs("div",{className:"w-[340px] shrink-0",children:[T.jsx("h2",{className:"text-sm font-semibold text-white mb-2",children:t("admin.classes")}),T.jsxs("div",{className:"bg-az-panel border border-az-border rounded overflow-hidden",children:[T.jsxs("table",{className:"w-full text-xs",children:[T.jsx("thead",{children:T.jsxs("tr",{className:"border-b border-az-border text-az-muted",children:[T.jsx("th",{className:"px-2 py-1 text-left",children:"#"}),T.jsx("th",{className:"px-2 py-1 text-left",children:"Name"}),T.jsx("th",{className:"px-2 py-1",children:"Color"}),T.jsx("th",{className:"px-2 py-1"})]})}),T.jsx("tbody",{children:e.map(z=>T.jsxs("tr",{className:"border-b border-az-border text-az-text",children:[T.jsx("td",{className:"px-2 py-1",children:z.id}),T.jsx("td",{className:"px-2 py-1",children:z.name}),T.jsx("td",{className:"px-2 py-1 text-center",children:T.jsx("span",{className:"inline-block w-3 h-3 rounded-full",style:{backgroundColor:z.color}})}),T.jsx("td",{className:"px-2 py-1",children:T.jsx("button",{onClick:()=>w(z.id),className:"text-az-muted hover:text-az-red",children:"×"})})]},z.id))})]}),T.jsxs("div",{className:"p-2 flex gap-1 border-t border-az-border",children:[T.jsx("input",{value:d.name,onChange:z=>f(j=>({...j,name:z.target.value})),placeholder:"Name",className:"flex-1 bg-az-bg border border-az-border rounded px-2 py-1 text-xs text-az-text"}),T.jsx("input",{type:"color",value:d.color,onChange:z=>f(j=>({...j,color:z.target.value})),className:"w-8 h-7 border-0 bg-transparent cursor-pointer"}),T.jsx("button",{onClick:_,className:"bg-az-orange text-white text-xs px-2 py-1 rounded",children:"+"})]})]})]}),T.jsxs("div",{className:"flex-1 space-y-4 max-w-md",children:[T.jsxs("div",{children:[T.jsx("h2",{className:"text-sm font-semibold text-white mb-2",children:t("admin.aiSettings")}),T.jsxs("div",{className:"bg-az-panel border border-az-border rounded p-3 space-y-2 text-xs",children:[T.jsxs("div",{children:[T.jsx("label",{className:"text-az-muted",children:"Frame Period Recognition"}),T.jsx("input",{type:"number",defaultValue:5,className:"w-full bg-az-bg border border-az-border rounded px-2 py-1 mt-0.5 text-az-text"})]}),T.jsxs("div",{children:[T.jsx("label",{className:"text-az-muted",children:"Frame Recognition Seconds"}),T.jsx("input",{type:"number",defaultValue:1,className:"w-full bg-az-bg border border-az-border rounded px-2 py-1 mt-0.5 text-az-text"})]}),T.jsxs("div",{children:[T.jsx("label",{className:"text-az-muted",children:"Probability Threshold"}),T.jsx("input",{type:"number",defaultValue:.5,step:.05,min:0,max:1,className:"w-full bg-az-bg border border-az-border rounded px-2 py-1 mt-0.5 text-az-text"})]}),T.jsx("button",{className:"bg-az-orange text-white text-xs px-3 py-1 rounded",children:t("common.save")})]})]}),T.jsxs("div",{children:[T.jsx("h2",{className:"text-sm font-semibold text-white mb-2",children:t("admin.gpsSettings")}),T.jsxs("div",{className:"bg-az-panel border border-az-border rounded p-3 space-y-2 text-xs",children:[T.jsxs("div",{children:[T.jsx("label",{className:"text-az-muted",children:"Device Address"}),T.jsx("input",{defaultValue:"192.168.1.100",className:"w-full bg-az-bg border border-az-border rounded px-2 py-1 mt-0.5 text-az-text"})]}),T.jsxs("div",{children:[T.jsx("label",{className:"text-az-muted",children:"Port"}),T.jsx("input",{type:"number",defaultValue:5535,className:"w-full bg-az-bg border border-az-border rounded px-2 py-1 mt-0.5 text-az-text"})]}),T.jsxs("div",{children:[T.jsx("label",{className:"text-az-muted",children:"Protocol"}),T.jsxs("select",{className:"w-full bg-az-bg border border-az-border rounded px-2 py-1 mt-0.5 text-az-text",children:[T.jsx("option",{children:"TCP"}),T.jsx("option",{children:"UDP"})]})]}),T.jsx("button",{className:"bg-az-orange text-white text-xs px-3 py-1 rounded",children:t("common.save")})]})]}),T.jsxs("div",{children:[T.jsx("h2",{className:"text-sm font-semibold text-white mb-2",children:t("admin.users")}),T.jsxs("div",{className:"bg-az-panel border border-az-border rounded overflow-hidden",children:[T.jsxs("table",{className:"w-full text-xs",children:[T.jsx("thead",{children:T.jsxs("tr",{className:"border-b border-az-border text-az-muted",children:[T.jsx("th",{className:"px-2 py-1 text-left",children:"Name"}),T.jsx("th",{className:"px-2 py-1 text-left",children:"Email"}),T.jsx("th",{className:"px-2 py-1",children:"Role"}),T.jsx("th",{className:"px-2 py-1",children:"Status"}),T.jsx("th",{className:"px-2 py-1"})]})}),T.jsx("tbody",{children:s.map(z=>T.jsxs("tr",{className:"border-b border-az-border text-az-text",children:[T.jsx("td",{className:"px-2 py-1",children:z.name}),T.jsx("td",{className:"px-2 py-1",children:z.email}),T.jsx("td",{className:"px-2 py-1 text-center",children:z.role}),T.jsx("td",{className:"px-2 py-1 text-center",children:T.jsx("span",{className:`px-1 rounded ${z.isActive?"text-az-green":"text-az-red"}`,children:z.isActive?"Active":"Inactive"})}),T.jsx("td",{className:"px-2 py-1",children:z.isActive&&T.jsx("button",{onClick:()=>y(z.id),className:"text-az-muted hover:text-az-red text-xs",children:t("admin.deactivate")})})]},z.id))})]}),T.jsxs("div",{className:"p-2 flex gap-1 border-t border-az-border",children:[T.jsx("input",{value:p.name,onChange:z=>g(j=>({...j,name:z.target.value})),placeholder:"Name",className:"flex-1 bg-az-bg border border-az-border rounded px-2 py-1 text-xs text-az-text"}),T.jsx("input",{value:p.email,onChange:z=>g(j=>({...j,email:z.target.value})),placeholder:"Email",className:"flex-1 bg-az-bg border border-az-border rounded px-2 py-1 text-xs text-az-text"}),T.jsx("input",{value:p.password,onChange:z=>g(j=>({...j,password:z.target.value})),placeholder:"Password",type:"password",className:"flex-1 bg-az-bg border border-az-border rounded px-2 py-1 text-xs text-az-text"}),T.jsxs("select",{value:p.role,onChange:z=>g(j=>({...j,role:z.target.value})),className:"bg-az-bg border border-az-border rounded px-2 py-1 text-xs text-az-text",children:[T.jsx("option",{children:"Annotator"}),T.jsx("option",{children:"Admin"}),T.jsx("option",{children:"Viewer"})]}),T.jsx("button",{onClick:C,className:"bg-az-orange text-white text-xs px-2 py-1 rounded",children:"+"})]})]})]})]}),T.jsxs("div",{className:"w-[280px] shrink-0",children:[T.jsx("h2",{className:"text-sm font-semibold text-white mb-2",children:t("admin.aircrafts")}),T.jsx("div",{className:"bg-az-panel border border-az-border rounded p-2 space-y-1",children:i.map(z=>T.jsxs("div",{onClick:()=>k(z),className:"flex items-center gap-2 px-2 py-1 rounded cursor-pointer hover:bg-az-bg text-xs text-az-text",children:[T.jsx("span",{className:`px-1 rounded text-[10px] ${z.type==="Plane"?"bg-az-blue/20 text-az-blue":"bg-az-green/20 text-az-green"}`,children:z.type==="Plane"?"P":"C"}),T.jsx("span",{className:"flex-1",children:z.model}),T.jsx("span",{className:`text-sm ${z.isDefault?"text-az-orange":"text-az-muted"}`,children:"★"})]},z.id))})]}),T.jsx(CC,{open:!!v,title:t("admin.deactivate"),message:"Deactivate this user?",onConfirm:A,onCancel:()=>y(null)})]})}function aH(){const{t}=Gn(),[e,n]=O.useState(null),[i,a]=O.useState(null),[s,l]=O.useState([]),[d,f]=O.useState(!1);O.useEffect(()=>{ie.get("/api/annotations/settings/system").then(n).catch(()=>{}),ie.get("/api/annotations/settings/directories").then(a).catch(()=>{}),ie.get("/api/flights/aircrafts").then(l).catch(()=>{})},[]);const p=async()=>{e&&(f(!0),await ie.put("/api/annotations/settings/system",e),f(!1))},g=async()=>{i&&(f(!0),await ie.put("/api/annotations/settings/directories",i),f(!1))},v=async _=>{await ie.patch(`/api/flights/aircrafts/${_.id}`,{isDefault:!_.isDefault}),l(w=>w.map(C=>C.id===_.id?{...C,isDefault:!C.isDefault}:C))},y=(_,w,C,A="text")=>T.jsxs("div",{children:[T.jsx("label",{className:"text-az-muted text-xs block mb-0.5",children:_}),T.jsx("input",{type:A,value:w??"",onChange:k=>C(k.target.value),className:"w-full bg-az-bg border border-az-border rounded px-2 py-1 text-xs text-az-text outline-none focus:border-az-orange"})]});return T.jsxs("div",{className:"flex h-full overflow-y-auto p-4 gap-6",children:[T.jsxs("div",{className:"w-[300px] shrink-0",children:[T.jsx("h2",{className:"text-sm font-semibold text-white mb-2",children:t("settings.tenant")}),e&&T.jsxs("div",{className:"bg-az-panel border border-az-border rounded p-3 space-y-2",children:[y("Military Unit",e.militaryUnit,_=>n(w=>w&&{...w,militaryUnit:_})),y("Name",e.name,_=>n(w=>w&&{...w,name:_})),y("Default Camera Width",e.defaultCameraWidth,_=>n(w=>w&&{...w,defaultCameraWidth:parseInt(_)||0}),"number"),y("Default Camera FoV",e.defaultCameraFoV,_=>n(w=>w&&{...w,defaultCameraFoV:parseFloat(_)||0}),"number"),T.jsx("button",{onClick:p,disabled:d,className:"bg-az-orange text-white text-xs px-3 py-1 rounded disabled:opacity-50",children:t("settings.save")})]})]}),T.jsxs("div",{className:"w-[300px] shrink-0",children:[T.jsx("h2",{className:"text-sm font-semibold text-white mb-2",children:t("settings.directories")}),i&&T.jsxs("div",{className:"bg-az-panel border border-az-border rounded p-3 space-y-2",children:[y("Videos Dir",i.videosDir,_=>a(w=>w&&{...w,videosDir:_})),y("Images Dir",i.imagesDir,_=>a(w=>w&&{...w,imagesDir:_})),y("Labels Dir",i.labelsDir,_=>a(w=>w&&{...w,labelsDir:_})),y("Results Dir",i.resultsDir,_=>a(w=>w&&{...w,resultsDir:_})),y("Thumbnails Dir",i.thumbnailsDir,_=>a(w=>w&&{...w,thumbnailsDir:_})),y("GPS Sat Dir",i.gpsSatDir,_=>a(w=>w&&{...w,gpsSatDir:_})),y("GPS Route Dir",i.gpsRouteDir,_=>a(w=>w&&{...w,gpsRouteDir:_})),T.jsx("button",{onClick:g,disabled:d,className:"bg-az-orange text-white text-xs px-3 py-1 rounded disabled:opacity-50",children:t("settings.save")})]})]}),T.jsxs("div",{className:"flex-1 max-w-sm",children:[T.jsx("h2",{className:"text-sm font-semibold text-white mb-2",children:t("settings.aircrafts")}),T.jsx("div",{className:"bg-az-panel border border-az-border rounded p-2 space-y-1",children:s.map(_=>T.jsxs("div",{className:"flex items-center gap-2 px-2 py-1.5 rounded hover:bg-az-bg text-xs text-az-text",children:[T.jsx("span",{className:"flex-1",children:_.model}),T.jsx("span",{className:`px-1 rounded text-[10px] ${_.type==="Plane"?"bg-az-blue/20 text-az-blue":"bg-az-green/20 text-az-green"}`,children:_.type}),T.jsx("button",{onClick:()=>v(_),className:`text-sm ${_.isDefault?"text-az-orange":"text-az-muted hover:text-az-orange"}`,children:"★"})]},_.id))})]})]})}const rH=[{en:"Draw bounding boxes tightly around the target",ua:"Малюйте рамки щільно навколо цілі"},{en:"Do not include shadow in the box unless the target is the shadow itself",ua:"Не включайте тінь у рамку, якщо ціль не є тінню"},{en:"If the target is partially occluded, annotate the visible part",ua:"Якщо ціль частково перекрита, анотуйте видиму частину"},{en:"Choose the correct class for each detection",ua:"Обирайте правильний клас для кожної детекції"},{en:"Set the affiliation (Friendly/Hostile/Unknown) for military targets",ua:"Встановіть приналежність (Свій/Ворожий/Невідомий) для військових цілей"},{en:"Validate annotations before they are used for training",ua:"Валідуйте анотації перед використанням для навчання"}];function sH({open:t,onClose:e}){const{i18n:n}=Gn();if(!t)return null;const i=n.language==="ua"?"ua":"en";return T.jsx("div",{className:"fixed inset-0 bg-black/60 flex items-center justify-center z-[100]",onClick:e,children:T.jsxs("div",{className:"bg-az-panel border border-az-border rounded-lg p-5 w-[500px] max-h-[80vh] overflow-y-auto",onClick:a=>a.stopPropagation(),children:[T.jsx("h2",{className:"text-white font-semibold text-lg mb-4",children:"How to Annotate"}),T.jsx("ol",{className:"space-y-2",children:rH.map((a,s)=>T.jsxs("li",{className:"flex gap-2 text-sm text-az-text",children:[T.jsxs("span",{className:"text-az-orange font-semibold shrink-0",children:[s+1,"."]}),T.jsx("span",{children:a[i]})]},s))}),T.jsx("h3",{className:"text-white font-semibold mt-5 mb-2",children:"Keyboard Shortcuts"}),T.jsxs("div",{className:"grid grid-cols-2 gap-1 text-xs text-az-text",children:[T.jsx("span",{className:"text-az-muted",children:"Space"}),T.jsx("span",{children:"Play / Pause"}),T.jsx("span",{className:"text-az-muted",children:"← →"}),T.jsx("span",{children:"Frame step"}),T.jsx("span",{className:"text-az-muted",children:"Ctrl + ← →"}),T.jsx("span",{children:"5 second skip"}),T.jsx("span",{className:"text-az-muted",children:"Enter"}),T.jsx("span",{children:"Save annotation"}),T.jsx("span",{className:"text-az-muted",children:"Delete"}),T.jsx("span",{children:"Delete selected"}),T.jsx("span",{className:"text-az-muted",children:"X"}),T.jsx("span",{children:"Delete all detections"}),T.jsx("span",{className:"text-az-muted",children:"1-9"}),T.jsx("span",{children:"Select detection class"}),T.jsx("span",{className:"text-az-muted",children:"M"}),T.jsx("span",{children:"Mute / Unmute"}),T.jsx("span",{className:"text-az-muted",children:"Ctrl + Scroll"}),T.jsx("span",{children:"Zoom canvas"}),T.jsx("span",{className:"text-az-muted",children:"Esc"}),T.jsx("span",{children:"Close dialog / editor"}),T.jsx("span",{className:"text-az-muted",children:"V"}),T.jsx("span",{children:"Validate (Dataset)"}),T.jsx("span",{className:"text-az-muted",children:"PageUp/Down"}),T.jsx("span",{children:"Navigate media / pages"})]}),T.jsx("div",{className:"mt-4 flex justify-end",children:T.jsx("button",{onClick:e,className:"bg-az-border text-az-text text-xs px-3 py-1 rounded hover:bg-az-muted",children:"Close"})})]})})}function oH(){const{t,i18n:e}=Gn(),{user:n,logout:i,hasPermission:a}=ZO(),{flights:s,selectedFlight:l,selectFlight:d}=Pp(),f=Jb(),[p,g]=O.useState(!1),[v,y]=O.useState(""),[_,w]=O.useState(!1),C=O.useRef(null);O.useEffect(()=>{const P=H=>{C.current&&!C.current.contains(H.target)&&g(!1)};return document.addEventListener("mousedown",P),()=>document.removeEventListener("mousedown",P)},[]);const A=s.filter(P=>P.name.toLowerCase().includes(v.toLowerCase())),k=async()=>{await i(),f("/login")},z=[{to:"/flights",label:t("nav.flights"),perm:"FL"},{to:"/annotations",label:t("nav.annotations"),perm:"ANN"},{to:"/dataset",label:t("nav.dataset"),perm:"DATASET"},{to:"/admin",label:t("nav.admin"),perm:"ADM"}],j=()=>{e.changeLanguage(e.language==="en"?"ua":"en")};return T.jsxs("header",{className:"flex items-center h-10 bg-az-header border-b border-az-border px-3 gap-3 text-sm shrink-0",children:[T.jsx("span",{className:"font-bold text-az-orange tracking-wider",children:"AZAION"}),T.jsxs("div",{className:"relative",ref:C,children:[T.jsx("button",{onClick:()=>g(!p),className:"bg-az-panel border border-az-border rounded px-2 py-0.5 text-az-text hover:border-az-muted min-w-[160px] text-left truncate",children:(l==null?void 0:l.name)||"— Select Flight —"}),p&&T.jsxs("div",{className:"absolute top-full left-0 mt-1 bg-az-panel border border-az-border rounded shadow-lg z-50 w-64",children:[T.jsx("input",{className:"w-full bg-az-bg border-b border-az-border px-2 py-1 text-az-text text-sm outline-none",placeholder:"Filter...",value:v,onChange:P=>y(P.target.value),autoFocus:!0}),T.jsxs("div",{className:"max-h-60 overflow-y-auto",children:[A.map(P=>T.jsxs("button",{onClick:()=>{d(P),g(!1),y("")},className:`w-full text-left px-2 py-1 hover:bg-az-bg text-az-text text-sm ${(l==null?void 0:l.id)===P.id?"bg-az-bg font-semibold":""}`,children:[T.jsx("div",{children:P.name}),T.jsx("div",{className:"text-xs text-az-muted",children:new Date(P.createdDate).toLocaleDateString()})]},P.id)),A.length===0&&T.jsx("div",{className:"px-2 py-2 text-az-muted text-xs",children:"No flights"})]})]})]}),T.jsx("nav",{className:"hidden sm:flex items-center gap-1 ml-2",children:z.filter(P=>a(P.perm)).map(P=>T.jsx(Mu,{to:P.to,className:({isActive:H})=>`px-2 py-1 rounded text-sm ${H?"bg-az-bg font-semibold text-white":"text-az-text hover:text-white"}`,children:P.label},P.to))}),T.jsx("div",{className:"flex-1"}),T.jsx("span",{className:"text-xs text-az-muted hidden sm:block",children:n==null?void 0:n.email}),T.jsx("button",{onClick:j,className:"text-xs text-az-muted hover:text-white px-1",children:e.language==="en"?"UA":"EN"}),T.jsx("button",{onClick:()=>w(!0),className:"text-az-muted hover:text-white text-xs",children:"?"}),T.jsx(Mu,{to:"/settings",className:"text-az-muted hover:text-white",children:"⚙"}),T.jsx("button",{onClick:k,className:"text-az-muted hover:text-az-red text-xs",children:t("nav.logout")}),T.jsxs("nav",{className:"sm:hidden fixed bottom-0 left-0 right-0 bg-az-header border-t border-az-border flex justify-around py-1.5 z-50",children:[z.filter(P=>a(P.perm)).map(P=>T.jsx(Mu,{to:P.to,className:({isActive:H})=>`text-xs px-2 py-1 ${H?"text-az-orange font-semibold":"text-az-muted"}`,children:P.label},P.to)),T.jsx(Mu,{to:"/settings",className:({isActive:P})=>`text-xs px-2 py-1 ${P?"text-az-orange":"text-az-muted"}`,children:"⚙"})]}),T.jsx(sH,{open:_,onClose:()=>w(!1)})]})}function lH(){return T.jsx(qO,{children:T.jsxs(y1,{children:[T.jsx(Sr,{path:"/login",element:T.jsx(b1,{to:"/flights",replace:!0})}),T.jsx(Sr,{path:"/*",element:T.jsx(XO,{children:T.jsx(YO,{children:T.jsxs("div",{className:"flex flex-col h-screen",children:[T.jsx(oH,{}),T.jsx("div",{className:"flex-1 overflow-hidden",children:T.jsxs(y1,{children:[T.jsx(Sr,{path:"/flights",element:T.jsx(zj,{})}),T.jsx(Sr,{path:"/annotations",element:T.jsx(XF,{})}),T.jsx(Sr,{path:"/dataset",element:T.jsx(nH,{})}),T.jsx(Sr,{path:"/admin",element:T.jsx(iH,{})}),T.jsx(Sr,{path:"/settings",element:T.jsx(aH,{})}),T.jsx(Sr,{path:"*",element:T.jsx(b1,{to:"/flights",replace:!0})})]})})]})})})})]})})}const Xt=t=>typeof t=="string",Du=()=>{let t,e;const n=new Promise((i,a)=>{t=i,e=a});return n.resolve=t,n.reject=e,n},Iw=t=>t==null?"":""+t,cH=(t,e,n)=>{t.forEach(i=>{e[i]&&(n[i]=e[i])})},uH=/###/g,Fw=t=>t&&t.indexOf("###")>-1?t.replace(uH,"."):t,Hw=t=>!t||Xt(t),qu=(t,e,n)=>{const i=Xt(e)?e.split("."):e;let a=0;for(;a<i.length-1;){if(Hw(t))return{};const s=Fw(i[a]);!t[s]&&n&&(t[s]=new n),Object.prototype.hasOwnProperty.call(t,s)?t=t[s]:t={},++a}return Hw(t)?{}:{obj:t,k:Fw(i[a])}},Uw=(t,e,n)=>{const{obj:i,k:a}=qu(t,e,Object);if(i!==void 0||e.length===1){i[a]=n;return}let s=e[e.length-1],l=e.slice(0,e.length-1),d=qu(t,l,Object);for(;d.obj===void 0&&l.length;)s=`${l[l.length-1]}.${s}`,l=l.slice(0,l.length-1),d=qu(t,l,Object),d!=null&&d.obj&&typeof d.obj[`${d.k}.${s}`]<"u"&&(d.obj=void 0);d.obj[`${d.k}.${s}`]=n},dH=(t,e,n,i)=>{const{obj:a,k:s}=qu(t,e,Object);a[s]=a[s]||[],a[s].push(n)},Ap=(t,e)=>{const{obj:n,k:i}=qu(t,e);if(n&&Object.prototype.hasOwnProperty.call(n,i))return n[i]},fH=(t,e,n)=>{const i=Ap(t,n);return i!==void 0?i:Ap(e,n)},IT=(t,e,n)=>{for(const i in e)i!=="__proto__"&&i!=="constructor"&&(i in t?Xt(t[i])||t[i]instanceof String||Xt(e[i])||e[i]instanceof String?n&&(t[i]=e[i]):IT(t[i],e[i],n):t[i]=e[i]);return t},Il=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var hH={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const pH=t=>Xt(t)?t.replace(/[&<>"'\/]/g,e=>hH[e]):t;class mH{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const n=this.regExpMap.get(e);if(n!==void 0)return n;const i=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,i),this.regExpQueue.push(e),i}}const gH=[" ",",","?","!",";"],vH=new mH(20),bH=(t,e,n)=>{e=e||"",n=n||"";const i=gH.filter(l=>e.indexOf(l)<0&&n.indexOf(l)<0);if(i.length===0)return!0;const a=vH.getRegExp(`(${i.map(l=>l==="?"?"\\?":l).join("|")})`);let s=!a.test(t);if(!s){const l=t.indexOf(n);l>0&&!a.test(t.substring(0,l))&&(s=!0)}return s},Xb=function(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!t)return;if(t[e])return Object.prototype.hasOwnProperty.call(t,e)?t[e]:void 0;const i=e.split(n);let a=t;for(let s=0;s<i.length;){if(!a||typeof a!="object")return;let l,d="";for(let f=s;f<i.length;++f)if(f!==s&&(d+=n),d+=i[f],l=a[d],l!==void 0){if(["string","number","boolean"].indexOf(typeof l)>-1&&f<i.length-1)continue;s+=f-s+1;break}a=l}return a},Tp=t=>t==null?void 0:t.replace("_","-"),yH={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){var n,i;(i=(n=console==null?void 0:console[t])==null?void 0:n.apply)==null||i.call(n,console,e)}};class Dp{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,n)}init(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=e||yH,this.options=n,this.debug=n.debug}log(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"log","",!0)}warn(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"warn","",!0)}error(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"error","")}deprecate(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(e,n,i,a){return a&&!this.debug?null:(Xt(e[0])&&(e[0]=`${i}${this.prefix} ${e[0]}`),this.logger[n](e))}create(e){return new Dp(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new Dp(this.logger,e)}}var Ga=new Dp;class gm{constructor(){this.observers={}}on(e,n){return e.split(" ").forEach(i=>{this.observers[i]||(this.observers[i]=new Map);const a=this.observers[i].get(n)||0;this.observers[i].set(n,a+1)}),this}off(e,n){if(this.observers[e]){if(!n){delete this.observers[e];return}this.observers[e].delete(n)}}emit(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(l=>{let[d,f]=l;for(let p=0;p<f;p++)d(...i)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(l=>{let[d,f]=l;for(let p=0;p<f;p++)d.apply(d,[e,...i])})}}class Vw extends gm{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const n=this.options.ns.indexOf(e);n>-1&&this.options.ns.splice(n,1)}getResource(e,n,i){var p,g;let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,l=a.ignoreJSONStructure!==void 0?a.ignoreJSONStructure:this.options.ignoreJSONStructure;let d;e.indexOf(".")>-1?d=e.split("."):(d=[e,n],i&&(Array.isArray(i)?d.push(...i):Xt(i)&&s?d.push(...i.split(s)):d.push(i)));const f=Ap(this.data,d);return!f&&!n&&!i&&e.indexOf(".")>-1&&(e=d[0],n=d[1],i=d.slice(2).join(".")),f||!l||!Xt(i)?f:Xb((g=(p=this.data)==null?void 0:p[e])==null?void 0:g[n],i,s)}addResource(e,n,i,a){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const l=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let d=[e,n];i&&(d=d.concat(l?i.split(l):i)),e.indexOf(".")>-1&&(d=e.split("."),a=n,n=d[1]),this.addNamespaces(n),Uw(this.data,d,a),s.silent||this.emit("added",e,n,i,a)}addResources(e,n,i){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const s in i)(Xt(i[s])||Array.isArray(i[s]))&&this.addResource(e,n,s,i[s],{silent:!0});a.silent||this.emit("added",e,n,i)}addResourceBundle(e,n,i,a,s){let l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},d=[e,n];e.indexOf(".")>-1&&(d=e.split("."),a=i,i=n,n=d[1]),this.addNamespaces(n);let f=Ap(this.data,d)||{};l.skipCopy||(i=JSON.parse(JSON.stringify(i))),a?IT(f,i,s):f={...f,...i},Uw(this.data,d,f),l.silent||this.emit("added",e,n,i)}removeResourceBundle(e,n){this.hasResourceBundle(e,n)&&delete this.data[e][n],this.removeNamespaces(n),this.emit("removed",e,n)}hasResourceBundle(e,n){return this.getResource(e,n)!==void 0}getResourceBundle(e,n){return n||(n=this.options.defaultNS),this.getResource(e,n)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const n=this.getDataByLanguage(e);return!!(n&&Object.keys(n)||[]).find(a=>n[a]&&Object.keys(n[a]).length>0)}toJSON(){return this.data}}var FT={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,i,a){return t.forEach(s=>{var l;e=((l=this.processors[s])==null?void 0:l.process(e,n,i,a))??e}),e}};const $w={},Gw=t=>!Xt(t)&&typeof t!="boolean"&&typeof t!="number";class Mp extends gm{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),cH(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Ga.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const i=this.resolve(e,n);return(i==null?void 0:i.res)!==void 0}extractFromKey(e,n){let i=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");const a=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let s=n.ns||this.options.defaultNS||[];const l=i&&e.indexOf(i)>-1,d=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!bH(e,i,a);if(l&&!d){const f=e.match(this.interpolator.nestingRegexp);if(f&&f.length>0)return{key:e,namespaces:Xt(s)?[s]:s};const p=e.split(i);(i!==a||i===a&&this.options.ns.indexOf(p[0])>-1)&&(s=p.shift()),e=p.join(a)}return{key:e,namespaces:Xt(s)?[s]:s}}translate(e,n,i){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const a=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:l,namespaces:d}=this.extractFromKey(e[e.length-1],n),f=d[d.length-1],p=n.lng||this.language,g=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((p==null?void 0:p.toLowerCase())==="cimode"){if(g){const X=n.nsSeparator||this.options.nsSeparator;return a?{res:`${f}${X}${l}`,usedKey:l,exactUsedKey:l,usedLng:p,usedNS:f,usedParams:this.getUsedParamsDetails(n)}:`${f}${X}${l}`}return a?{res:l,usedKey:l,exactUsedKey:l,usedLng:p,usedNS:f,usedParams:this.getUsedParamsDetails(n)}:l}const v=this.resolve(e,n);let y=v==null?void 0:v.res;const _=(v==null?void 0:v.usedKey)||l,w=(v==null?void 0:v.exactUsedKey)||l,C=["[object Number]","[object Function]","[object RegExp]"],A=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,k=!this.i18nFormat||this.i18nFormat.handleAsObject,z=n.count!==void 0&&!Xt(n.count),j=Mp.hasDefaultValue(n),P=z?this.pluralResolver.getSuffix(p,n.count,n):"",H=n.ordinal&&z?this.pluralResolver.getSuffix(p,n.count,{ordinal:!1}):"",V=z&&!n.ordinal&&n.count===0,U=V&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${P}`]||n[`defaultValue${H}`]||n.defaultValue;let Z=y;k&&!y&&j&&(Z=U);const Q=Gw(Z),et=Object.prototype.toString.apply(Z);if(k&&Z&&Q&&C.indexOf(et)<0&&!(Xt(A)&&Array.isArray(Z))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const X=this.options.returnedObjectHandler?this.options.returnedObjectHandler(_,Z,{...n,ns:d}):`key '${l} (${this.language})' returned an object instead of string.`;return a?(v.res=X,v.usedParams=this.getUsedParamsDetails(n),v):X}if(s){const X=Array.isArray(Z),R=X?[]:{},dt=X?w:_;for(const it in Z)if(Object.prototype.hasOwnProperty.call(Z,it)){const ut=`${dt}${s}${it}`;j&&!y?R[it]=this.translate(ut,{...n,defaultValue:Gw(U)?U[it]:void 0,joinArrays:!1,ns:d}):R[it]=this.translate(ut,{...n,joinArrays:!1,ns:d}),R[it]===ut&&(R[it]=Z[it])}y=R}}else if(k&&Xt(A)&&Array.isArray(y))y=y.join(A),y&&(y=this.extendTranslation(y,e,n,i));else{let X=!1,R=!1;!this.isValidLookup(y)&&j&&(X=!0,y=U),this.isValidLookup(y)||(R=!0,y=l);const it=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&R?void 0:y,ut=j&&U!==y&&this.options.updateMissing;if(R||X||ut){if(this.logger.log(ut?"updateKey":"missingKey",p,f,l,ut?U:y),s){const nt=this.resolve(l,{...n,keySeparator:!1});nt&&nt.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let I=[];const $=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&$&&$[0])for(let nt=0;nt<$.length;nt++)I.push($[nt]);else this.options.saveMissingTo==="all"?I=this.languageUtils.toResolveHierarchy(n.lng||this.language):I.push(n.lng||this.language);const q=(nt,ot,F)=>{var at;const K=j&&F!==y?F:it;this.options.missingKeyHandler?this.options.missingKeyHandler(nt,f,ot,K,ut,n):(at=this.backendConnector)!=null&&at.saveMissing&&this.backendConnector.saveMissing(nt,f,ot,K,ut,n),this.emit("missingKey",nt,f,ot,y)};this.options.saveMissing&&(this.options.saveMissingPlurals&&z?I.forEach(nt=>{const ot=this.pluralResolver.getSuffixes(nt,n);V&&n[`defaultValue${this.options.pluralSeparator}zero`]&&ot.indexOf(`${this.options.pluralSeparator}zero`)<0&&ot.push(`${this.options.pluralSeparator}zero`),ot.forEach(F=>{q([nt],l+F,n[`defaultValue${F}`]||U)})}):q(I,l,U))}y=this.extendTranslation(y,e,n,v,i),R&&y===l&&this.options.appendNamespaceToMissingKey&&(y=`${f}:${l}`),(R||X)&&this.options.parseMissingKeyHandler&&(y=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${f}:${l}`:l,X?y:void 0))}return a?(v.res=y,v.usedParams=this.getUsedParamsDetails(n),v):y}extendTranslation(e,n,i,a,s){var p,g;var l=this;if((p=this.i18nFormat)!=null&&p.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||a.usedLng,a.usedNS,a.usedKey,{resolved:a});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const v=Xt(e)&&(((g=i==null?void 0:i.interpolation)==null?void 0:g.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let y;if(v){const w=e.match(this.interpolator.nestingRegexp);y=w&&w.length}let _=i.replace&&!Xt(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(_={...this.options.interpolation.defaultVariables,..._}),e=this.interpolator.interpolate(e,_,i.lng||this.language||a.usedLng,i),v){const w=e.match(this.interpolator.nestingRegexp),C=w&&w.length;y<C&&(i.nest=!1)}!i.lng&&a&&a.res&&(i.lng=this.language||a.usedLng),i.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var w=arguments.length,C=new Array(w),A=0;A<w;A++)C[A]=arguments[A];return(s==null?void 0:s[0])===C[0]&&!i.context?(l.logger.warn(`It seems you are nesting recursively key: ${C[0]} in key: ${n[0]}`),null):l.translate(...C,n)},i)),i.interpolation&&this.interpolator.reset()}const d=i.postProcess||this.options.postProcess,f=Xt(d)?[d]:d;return e!=null&&(f!=null&&f.length)&&i.applyPostProcessor!==!1&&(e=FT.handle(f,e,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...a,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),e}resolve(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i,a,s,l,d;return Xt(e)&&(e=[e]),e.forEach(f=>{if(this.isValidLookup(i))return;const p=this.extractFromKey(f,n),g=p.key;a=g;let v=p.namespaces;this.options.fallbackNS&&(v=v.concat(this.options.fallbackNS));const y=n.count!==void 0&&!Xt(n.count),_=y&&!n.ordinal&&n.count===0,w=n.context!==void 0&&(Xt(n.context)||typeof n.context=="number")&&n.context!=="",C=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);v.forEach(A=>{var k,z;this.isValidLookup(i)||(d=A,!$w[`${C[0]}-${A}`]&&((k=this.utils)!=null&&k.hasLoadedNamespace)&&!((z=this.utils)!=null&&z.hasLoadedNamespace(d))&&($w[`${C[0]}-${A}`]=!0,this.logger.warn(`key "${a}" for languages "${C.join(", ")}" won't get resolved as namespace "${d}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),C.forEach(j=>{var V;if(this.isValidLookup(i))return;l=j;const P=[g];if((V=this.i18nFormat)!=null&&V.addLookupKeys)this.i18nFormat.addLookupKeys(P,g,j,A,n);else{let U;y&&(U=this.pluralResolver.getSuffix(j,n.count,n));const Z=`${this.options.pluralSeparator}zero`,Q=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(y&&(P.push(g+U),n.ordinal&&U.indexOf(Q)===0&&P.push(g+U.replace(Q,this.options.pluralSeparator)),_&&P.push(g+Z)),w){const et=`${g}${this.options.contextSeparator}${n.context}`;P.push(et),y&&(P.push(et+U),n.ordinal&&U.indexOf(Q)===0&&P.push(et+U.replace(Q,this.options.pluralSeparator)),_&&P.push(et+Z))}}let H;for(;H=P.pop();)this.isValidLookup(i)||(s=H,i=this.getResource(j,A,H,n))}))})}),{res:i,usedKey:a,exactUsedKey:s,usedLng:l,usedNS:d}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,n,i){var s;let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return(s=this.i18nFormat)!=null&&s.getResource?this.i18nFormat.getResource(e,n,i,a):this.resourceStore.getResource(e,n,i,a)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=e.replace&&!Xt(e.replace);let a=i?e.replace:e;if(i&&typeof e.count<"u"&&(a.count=e.count),this.options.interpolation.defaultVariables&&(a={...this.options.interpolation.defaultVariables,...a}),!i){a={...a};for(const s of n)delete a[s]}return a}static hasDefaultValue(e){const n="defaultValue";for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&n===i.substring(0,n.length)&&e[i]!==void 0)return!0;return!1}}class Ww{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Ga.create("languageUtils")}getScriptPartFromCode(e){if(e=Tp(e),!e||e.indexOf("-")<0)return null;const n=e.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(e){if(e=Tp(e),!e||e.indexOf("-")<0)return e;const n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(Xt(e)&&e.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(e)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let n;return e.forEach(i=>{if(n)return;const a=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(a))&&(n=a)}),!n&&this.options.supportedLngs&&e.forEach(i=>{if(n)return;const a=this.getLanguagePartFromCode(i);if(this.isSupportedCode(a))return n=a;n=this.options.supportedLngs.find(s=>{if(s===a)return s;if(!(s.indexOf("-")<0&&a.indexOf("-")<0)&&(s.indexOf("-")>0&&a.indexOf("-")<0&&s.substring(0,s.indexOf("-"))===a||s.indexOf(a)===0&&a.length>1))return s})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(e,n){if(!e)return[];if(typeof e=="function"&&(e=e(n)),Xt(e)&&(e=[e]),Array.isArray(e))return e;if(!n)return e.default||[];let i=e[n];return i||(i=e[this.getScriptPartFromCode(n)]),i||(i=e[this.formatLanguageCode(n)]),i||(i=e[this.getLanguagePartFromCode(n)]),i||(i=e.default),i||[]}toResolveHierarchy(e,n){const i=this.getFallbackCodes(n||this.options.fallbackLng||[],e),a=[],s=l=>{l&&(this.isSupportedCode(l)?a.push(l):this.logger.warn(`rejecting language code not found in supportedLngs: ${l}`))};return Xt(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(e))):Xt(e)&&s(this.formatLanguageCode(e)),i.forEach(l=>{a.indexOf(l)<0&&s(this.formatLanguageCode(l))}),a}}const Zw={zero:0,one:1,two:2,few:3,many:4,other:5},qw={select:t=>t===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class xH{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=n,this.logger=Ga.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,n){this.rules[e]=n}clearCache(){this.pluralRulesCache={}}getRule(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=Tp(e==="dev"?"en":e),a=n.ordinal?"ordinal":"cardinal",s=JSON.stringify({cleanedCode:i,type:a});if(s in this.pluralRulesCache)return this.pluralRulesCache[s];let l;try{l=new Intl.PluralRules(i,{type:a})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),qw;if(!e.match(/-|_/))return qw;const f=this.languageUtils.getLanguagePartFromCode(e);l=this.getRule(f,n)}return this.pluralRulesCache[s]=l,l}needsPlural(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=this.getRule(e,n);return i||(i=this.getRule("dev",n)),(i==null?void 0:i.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,i).map(a=>`${n}${a}`)}getSuffixes(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=this.getRule(e,n);return i||(i=this.getRule("dev",n)),i?i.resolvedOptions().pluralCategories.sort((a,s)=>Zw[a]-Zw[s]).map(a=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${a}`):[]}getSuffix(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const a=this.getRule(e,i);return a?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${a.select(n)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",n,i))}}const Yw=function(t,e,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=fH(t,e,n);return!s&&a&&Xt(n)&&(s=Xb(t,n,i),s===void 0&&(s=Xb(e,n,i))),s},rb=t=>t.replace(/\$/g,"$$$$");class _H{constructor(){var n;let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Ga.create("interpolator"),this.options=e,this.format=((n=e==null?void 0:e.interpolation)==null?void 0:n.format)||(i=>i),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:n,escapeValue:i,useRawValueToEscape:a,prefix:s,prefixEscaped:l,suffix:d,suffixEscaped:f,formatSeparator:p,unescapeSuffix:g,unescapePrefix:v,nestingPrefix:y,nestingPrefixEscaped:_,nestingSuffix:w,nestingSuffixEscaped:C,nestingOptionsSeparator:A,maxReplaces:k,alwaysFormat:z}=e.interpolation;this.escape=n!==void 0?n:pH,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=a!==void 0?a:!1,this.prefix=s?Il(s):l||"{{",this.suffix=d?Il(d):f||"}}",this.formatSeparator=p||",",this.unescapePrefix=g?"":v||"-",this.unescapeSuffix=this.unescapePrefix?"":g||"",this.nestingPrefix=y?Il(y):_||Il("$t("),this.nestingSuffix=w?Il(w):C||Il(")"),this.nestingOptionsSeparator=A||",",this.maxReplaces=k||1e3,this.alwaysFormat=z!==void 0?z:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(n,i)=>(n==null?void 0:n.source)===i?(n.lastIndex=0,n):new RegExp(i,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,n,i,a){var _;let s,l,d;const f=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},p=w=>{if(w.indexOf(this.formatSeparator)<0){const z=Yw(n,f,w,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(z,void 0,i,{...a,...n,interpolationkey:w}):z}const C=w.split(this.formatSeparator),A=C.shift().trim(),k=C.join(this.formatSeparator).trim();return this.format(Yw(n,f,A,this.options.keySeparator,this.options.ignoreJSONStructure),k,i,{...a,...n,interpolationkey:A})};this.resetRegExp();const g=(a==null?void 0:a.missingInterpolationHandler)||this.options.missingInterpolationHandler,v=((_=a==null?void 0:a.interpolation)==null?void 0:_.skipOnVariables)!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:w=>rb(w)},{regex:this.regexp,safeValue:w=>this.escapeValue?rb(this.escape(w)):rb(w)}].forEach(w=>{for(d=0;s=w.regex.exec(e);){const C=s[1].trim();if(l=p(C),l===void 0)if(typeof g=="function"){const k=g(e,s,a);l=Xt(k)?k:""}else if(a&&Object.prototype.hasOwnProperty.call(a,C))l="";else if(v){l=s[0];continue}else this.logger.warn(`missed to pass in variable ${C} for interpolating ${e}`),l="";else!Xt(l)&&!this.useRawValueToEscape&&(l=Iw(l));const A=w.safeValue(l);if(e=e.replace(s[0],A),v?(w.regex.lastIndex+=l.length,w.regex.lastIndex-=s[0].length):w.regex.lastIndex=0,d++,d>=this.maxReplaces)break}}),e}nest(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a,s,l;const d=(f,p)=>{const g=this.nestingOptionsSeparator;if(f.indexOf(g)<0)return f;const v=f.split(new RegExp(`${g}[ ]*{`));let y=`{${v[1]}`;f=v[0],y=this.interpolate(y,l);const _=y.match(/'/g),w=y.match(/"/g);(((_==null?void 0:_.length)??0)%2===0&&!w||w.length%2!==0)&&(y=y.replace(/'/g,'"'));try{l=JSON.parse(y),p&&(l={...p,...l})}catch(C){return this.logger.warn(`failed parsing options string in nesting for key ${f}`,C),`${f}${g}${y}`}return l.defaultValue&&l.defaultValue.indexOf(this.prefix)>-1&&delete l.defaultValue,f};for(;a=this.nestingRegexp.exec(e);){let f=[];l={...i},l=l.replace&&!Xt(l.replace)?l.replace:l,l.applyPostProcessor=!1,delete l.defaultValue;let p=!1;if(a[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(a[1])){const g=a[1].split(this.formatSeparator).map(v=>v.trim());a[1]=g.shift(),f=g,p=!0}if(s=n(d.call(this,a[1].trim(),l),l),s&&a[0]===e&&!Xt(s))return s;Xt(s)||(s=Iw(s)),s||(this.logger.warn(`missed to resolve ${a[1]} for nesting ${e}`),s=""),p&&(s=f.reduce((g,v)=>this.format(g,v,i.lng,{...i,interpolationkey:a[1].trim()}),s.trim())),e=e.replace(a[0],s),this.regexp.lastIndex=0}return e}}const SH=t=>{let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const i=t.split("(");e=i[0].toLowerCase().trim();const a=i[1].substring(0,i[1].length-1);e==="currency"&&a.indexOf(":")<0?n.currency||(n.currency=a.trim()):e==="relativetime"&&a.indexOf(":")<0?n.range||(n.range=a.trim()):a.split(";").forEach(l=>{if(l){const[d,...f]=l.split(":"),p=f.join(":").trim().replace(/^'+|'+$/g,""),g=d.trim();n[g]||(n[g]=p),p==="false"&&(n[g]=!1),p==="true"&&(n[g]=!0),isNaN(p)||(n[g]=parseInt(p,10))}})}return{formatName:e,formatOptions:n}},Fl=t=>{const e={};return(n,i,a)=>{let s=a;a&&a.interpolationkey&&a.formatParams&&a.formatParams[a.interpolationkey]&&a[a.interpolationkey]&&(s={...s,[a.interpolationkey]:void 0});const l=i+JSON.stringify(s);let d=e[l];return d||(d=t(Tp(i),a),e[l]=d),d(n)}};class wH{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Ga.create("formatter"),this.options=e,this.formats={number:Fl((n,i)=>{const a=new Intl.NumberFormat(n,{...i});return s=>a.format(s)}),currency:Fl((n,i)=>{const a=new Intl.NumberFormat(n,{...i,style:"currency"});return s=>a.format(s)}),datetime:Fl((n,i)=>{const a=new Intl.DateTimeFormat(n,{...i});return s=>a.format(s)}),relativetime:Fl((n,i)=>{const a=new Intl.RelativeTimeFormat(n,{...i});return s=>a.format(s,i.range||"day")}),list:Fl((n,i)=>{const a=new Intl.ListFormat(n,{...i});return s=>a.format(s)})},this.init(e)}init(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(e,n){this.formats[e.toLowerCase().trim()]=n}addCached(e,n){this.formats[e.toLowerCase().trim()]=Fl(n)}format(e,n,i){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=n.split(this.formatSeparator);if(s.length>1&&s[0].indexOf("(")>1&&s[0].indexOf(")")<0&&s.find(d=>d.indexOf(")")>-1)){const d=s.findIndex(f=>f.indexOf(")")>-1);s[0]=[s[0],...s.splice(1,d)].join(this.formatSeparator)}return s.reduce((d,f)=>{var v;const{formatName:p,formatOptions:g}=SH(f);if(this.formats[p]){let y=d;try{const _=((v=a==null?void 0:a.formatParams)==null?void 0:v[a.interpolationkey])||{},w=_.locale||_.lng||a.locale||a.lng||i;y=this.formats[p](d,w,{...g,...a,..._})}catch(_){this.logger.warn(_)}return y}else this.logger.warn(`there was no format function for ${p}`);return d},e)}}const CH=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class EH extends gm{constructor(e,n,i){var s,l;let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=n,this.services=i,this.languageUtils=i.languageUtils,this.options=a,this.logger=Ga.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=a.maxParallelReads||10,this.readingCalls=0,this.maxRetries=a.maxRetries>=0?a.maxRetries:5,this.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,this.state={},this.queue=[],(l=(s=this.backend)==null?void 0:s.init)==null||l.call(s,i,a.backend,a)}queueLoad(e,n,i,a){const s={},l={},d={},f={};return e.forEach(p=>{let g=!0;n.forEach(v=>{const y=`${p}|${v}`;!i.reload&&this.store.hasResourceBundle(p,v)?this.state[y]=2:this.state[y]<0||(this.state[y]===1?l[y]===void 0&&(l[y]=!0):(this.state[y]=1,g=!1,l[y]===void 0&&(l[y]=!0),s[y]===void 0&&(s[y]=!0),f[v]===void 0&&(f[v]=!0)))}),g||(d[p]=!0)}),(Object.keys(s).length||Object.keys(l).length)&&this.queue.push({pending:l,pendingCount:Object.keys(l).length,loaded:{},errors:[],callback:a}),{toLoad:Object.keys(s),pending:Object.keys(l),toLoadLanguages:Object.keys(d),toLoadNamespaces:Object.keys(f)}}loaded(e,n,i){const a=e.split("|"),s=a[0],l=a[1];n&&this.emit("failedLoading",s,l,n),!n&&i&&this.store.addResourceBundle(s,l,i,void 0,void 0,{skipCopy:!0}),this.state[e]=n?-1:2,n&&i&&(this.state[e]=0);const d={};this.queue.forEach(f=>{dH(f.loaded,[s],l),CH(f,e),n&&f.errors.push(n),f.pendingCount===0&&!f.done&&(Object.keys(f.loaded).forEach(p=>{d[p]||(d[p]={});const g=f.loaded[p];g.length&&g.forEach(v=>{d[p][v]===void 0&&(d[p][v]=!0)})}),f.done=!0,f.errors.length?f.callback(f.errors):f.callback())}),this.emit("loaded",d),this.queue=this.queue.filter(f=>!f.done)}read(e,n,i){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,l=arguments.length>5?arguments[5]:void 0;if(!e.length)return l(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:n,fcName:i,tried:a,wait:s,callback:l});return}this.readingCalls++;const d=(p,g)=>{if(this.readingCalls--,this.waitingReads.length>0){const v=this.waitingReads.shift();this.read(v.lng,v.ns,v.fcName,v.tried,v.wait,v.callback)}if(p&&g&&a<this.maxRetries){setTimeout(()=>{this.read.call(this,e,n,i,a+1,s*2,l)},s);return}l(p,g)},f=this.backend[i].bind(this.backend);if(f.length===2){try{const p=f(e,n);p&&typeof p.then=="function"?p.then(g=>d(null,g)).catch(d):d(null,p)}catch(p){d(p)}return}return f(e,n,d)}prepareLoading(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),a&&a();Xt(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Xt(n)&&(n=[n]);const s=this.queueLoad(e,n,i,a);if(!s.toLoad.length)return s.pending.length||a(),null;s.toLoad.forEach(l=>{this.loadOne(l)})}load(e,n,i){this.prepareLoading(e,n,{},i)}reload(e,n,i){this.prepareLoading(e,n,{reload:!0},i)}loadOne(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const i=e.split("|"),a=i[0],s=i[1];this.read(a,s,"read",void 0,void 0,(l,d)=>{l&&this.logger.warn(`${n}loading namespace ${s} for language ${a} failed`,l),!l&&d&&this.logger.log(`${n}loaded namespace ${s} for language ${a}`,d),this.loaded(e,l,d)})}saveMissing(e,n,i,a,s){var f,p,g,v,y;let l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},d=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if((p=(f=this.services)==null?void 0:f.utils)!=null&&p.hasLoadedNamespace&&!((v=(g=this.services)==null?void 0:g.utils)!=null&&v.hasLoadedNamespace(n))){this.logger.warn(`did not save key "${i}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(i==null||i==="")){if((y=this.backend)!=null&&y.create){const _={...l,isUpdate:s},w=this.backend.create.bind(this.backend);if(w.length<6)try{let C;w.length===5?C=w(e,n,i,a,_):C=w(e,n,i,a),C&&typeof C.then=="function"?C.then(A=>d(null,A)).catch(d):d(null,C)}catch(C){d(C)}else w(e,n,i,a,d,_)}!e||!e[0]||this.store.addResource(e[0],n,i,a)}}}const Xw=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let e={};if(typeof t[1]=="object"&&(e=t[1]),Xt(t[1])&&(e.defaultValue=t[1]),Xt(t[2])&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const n=t[3]||t[2];Object.keys(n).forEach(i=>{e[i]=n[i]})}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Kw=t=>{var e,n;return Xt(t.ns)&&(t.ns=[t.ns]),Xt(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),Xt(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),((n=(e=t.supportedLngs)==null?void 0:e.indexOf)==null?void 0:n.call(e,"cimode"))<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),typeof t.initImmediate=="boolean"&&(t.initAsync=t.initImmediate),t},Oh=()=>{},AH=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})};class _d extends gm{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Kw(e),this.services={},this.logger=Ga,this.modules={external:[]},AH(this),n&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,n),this;setTimeout(()=>{this.init(e,n)},0)}}init(){var e=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(i=n,n={}),n.defaultNS==null&&n.ns&&(Xt(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const a=Xw();this.options={...a,...this.options,...Kw(n)},this.options.interpolation={...a.interpolation,...this.options.interpolation},n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const s=g=>g?typeof g=="function"?new g:g:null;if(!this.options.isClone){this.modules.logger?Ga.init(s(this.modules.logger),this.options):Ga.init(null,this.options);let g;this.modules.formatter?g=this.modules.formatter:g=wH;const v=new Ww(this.options);this.store=new Vw(this.options.resources,this.options);const y=this.services;y.logger=Ga,y.resourceStore=this.store,y.languageUtils=v,y.pluralResolver=new xH(v,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),g&&(!this.options.interpolation.format||this.options.interpolation.format===a.interpolation.format)&&(y.formatter=s(g),y.formatter.init(y,this.options),this.options.interpolation.format=y.formatter.format.bind(y.formatter)),y.interpolator=new _H(this.options),y.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},y.backendConnector=new EH(s(this.modules.backend),y.resourceStore,y,this.options),y.backendConnector.on("*",function(_){for(var w=arguments.length,C=new Array(w>1?w-1:0),A=1;A<w;A++)C[A-1]=arguments[A];e.emit(_,...C)}),this.modules.languageDetector&&(y.languageDetector=s(this.modules.languageDetector),y.languageDetector.init&&y.languageDetector.init(y,this.options.detection,this.options)),this.modules.i18nFormat&&(y.i18nFormat=s(this.modules.i18nFormat),y.i18nFormat.init&&y.i18nFormat.init(this)),this.translator=new Mp(this.services,this.options),this.translator.on("*",function(_){for(var w=arguments.length,C=new Array(w>1?w-1:0),A=1;A<w;A++)C[A-1]=arguments[A];e.emit(_,...C)}),this.modules.external.forEach(_=>{_.init&&_.init(this)})}if(this.format=this.options.interpolation.format,i||(i=Oh),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const g=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);g.length>0&&g[0]!=="dev"&&(this.options.lng=g[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(g=>{this[g]=function(){return e.store[g](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(g=>{this[g]=function(){return e.store[g](...arguments),e}});const f=Du(),p=()=>{const g=(v,y)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),f.resolve(y),i(v,y)};if(this.languages&&!this.isInitialized)return g(null,this.t.bind(this));this.changeLanguage(this.options.lng,g)};return this.options.resources||!this.options.initAsync?p():setTimeout(p,0),f}loadResources(e){var s,l;let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Oh;const a=Xt(e)?e:this.language;if(typeof e=="function"&&(i=e),!this.options.resources||this.options.partialBundledLanguages){if((a==null?void 0:a.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const d=[],f=p=>{if(!p||p==="cimode")return;this.services.languageUtils.toResolveHierarchy(p).forEach(v=>{v!=="cimode"&&d.indexOf(v)<0&&d.push(v)})};a?f(a):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(g=>f(g)),(l=(s=this.options.preload)==null?void 0:s.forEach)==null||l.call(s,p=>f(p)),this.services.backendConnector.load(d,this.options.ns,p=>{!p&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(p)})}else i(null)}reloadResources(e,n,i){const a=Du();return typeof e=="function"&&(i=e,e=void 0),typeof n=="function"&&(i=n,n=void 0),e||(e=this.languages),n||(n=this.options.ns),i||(i=Oh),this.services.backendConnector.reload(e,n,s=>{a.resolve(),i(s)}),a}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&FT.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let n=0;n<this.languages.length;n++){const i=this.languages[n];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}}changeLanguage(e,n){var i=this;this.isLanguageChangingTo=e;const a=Du();this.emit("languageChanging",e);const s=f=>{this.language=f,this.languages=this.services.languageUtils.toResolveHierarchy(f),this.resolvedLanguage=void 0,this.setResolvedLanguage(f)},l=(f,p)=>{p?(s(p),this.translator.changeLanguage(p),this.isLanguageChangingTo=void 0,this.emit("languageChanged",p),this.logger.log("languageChanged",p)):this.isLanguageChangingTo=void 0,a.resolve(function(){return i.t(...arguments)}),n&&n(f,function(){return i.t(...arguments)})},d=f=>{var g,v;!e&&!f&&this.services.languageDetector&&(f=[]);const p=Xt(f)?f:this.services.languageUtils.getBestMatchFromCodes(f);p&&(this.language||s(p),this.translator.language||this.translator.changeLanguage(p),(v=(g=this.services.languageDetector)==null?void 0:g.cacheUserLanguage)==null||v.call(g,p)),this.loadResources(p,y=>{l(y,p)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?d(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(d):this.services.languageDetector.detect(d):d(e),a}getFixedT(e,n,i){var a=this;const s=function(l,d){let f;if(typeof d!="object"){for(var p=arguments.length,g=new Array(p>2?p-2:0),v=2;v<p;v++)g[v-2]=arguments[v];f=a.options.overloadTranslationOptionHandler([l,d].concat(g))}else f={...d};f.lng=f.lng||s.lng,f.lngs=f.lngs||s.lngs,f.ns=f.ns||s.ns,f.keyPrefix!==""&&(f.keyPrefix=f.keyPrefix||i||s.keyPrefix);const y=a.options.keySeparator||".";let _;return f.keyPrefix&&Array.isArray(l)?_=l.map(w=>`${f.keyPrefix}${y}${w}`):_=f.keyPrefix?`${f.keyPrefix}${y}${l}`:l,a.t(_,f)};return Xt(e)?s.lng=e:s.lngs=e,s.ns=n,s.keyPrefix=i,s}t(){var a;for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return(a=this.translator)==null?void 0:a.translate(...n)}exists(){var a;for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return(a=this.translator)==null?void 0:a.exists(...n)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const i=n.lng||this.resolvedLanguage||this.languages[0],a=this.options?this.options.fallbackLng:!1,s=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const l=(d,f)=>{const p=this.services.backendConnector.state[`${d}|${f}`];return p===-1||p===0||p===2};if(n.precheck){const d=n.precheck(this,l);if(d!==void 0)return d}return!!(this.hasResourceBundle(i,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||l(i,e)&&(!a||l(s,e)))}loadNamespaces(e,n){const i=Du();return this.options.ns?(Xt(e)&&(e=[e]),e.forEach(a=>{this.options.ns.indexOf(a)<0&&this.options.ns.push(a)}),this.loadResources(a=>{i.resolve(),n&&n(a)}),i):(n&&n(),Promise.resolve())}loadLanguages(e,n){const i=Du();Xt(e)&&(e=[e]);const a=this.options.preload||[],s=e.filter(l=>a.indexOf(l)<0&&this.services.languageUtils.isSupportedCode(l));return s.length?(this.options.preload=a.concat(s),this.loadResources(l=>{i.resolve(),n&&n(l)}),i):(n&&n(),Promise.resolve())}dir(e){var a,s;if(e||(e=this.resolvedLanguage||(((a=this.languages)==null?void 0:a.length)>0?this.languages[0]:this.language)),!e)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],i=((s=this.services)==null?void 0:s.languageUtils)||new Ww(Xw());return n.indexOf(i.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new _d(e,n)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Oh;const i=e.forkResourceStore;i&&delete e.forkResourceStore;const a={...this.options,...e,isClone:!0},s=new _d(a);if((e.debug!==void 0||e.prefix!==void 0)&&(s.logger=s.logger.clone(e)),["store","services","language"].forEach(d=>{s[d]=this[d]}),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},i){const d=Object.keys(this.store.data).reduce((f,p)=>(f[p]={...this.store.data[p]},Object.keys(f[p]).reduce((g,v)=>(g[v]={...f[p][v]},g),{})),{});s.store=new Vw(d,a),s.services.resourceStore=s.store}return s.translator=new Mp(s.services,a),s.translator.on("*",function(d){for(var f=arguments.length,p=new Array(f>1?f-1:0),g=1;g<f;g++)p[g-1]=arguments[g];s.emit(d,...p)}),s.init(a,n),s.translator.options=a,s.translator.backendConnector.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const ei=_d.createInstance();ei.createInstance=_d.createInstance;ei.createInstance;ei.dir;ei.init;ei.loadResources;ei.reloadResources;ei.use;ei.changeLanguage;ei.getFixedT;ei.t;ei.exists;ei.setDefaultNamespace;ei.hasLoadedNamespace;ei.loadNamespaces;ei.loadLanguages;const TH={flights:"Flights",annotations:"Annotations",dataset:"Dataset Explorer",admin:"Admin",settings:"Settings",logout:"Logout"},DH={title:"AZAION",email:"Email",password:"Password",submit:"Sign In",authenticating:"Authenticating...",downloadingKey:"Downloading key...",decrypting:"Decrypting...",startingServices:"Starting services...",ready:"Ready",error:"Invalid credentials"},MH={title:"Flights",create:"Create New",params:"Flight Parameters",gpsDenied:"GPS-Denied",waypoints:"Waypoints",aircraft:"Aircraft",height:"Default Height",upload:"Upload",back:"Back to Flight",orthophoto:"Orthophoto",liveGps:"Live GPS",correction:"GPS Correction",apply:"Apply",telemetry:"Telemetry",planner:{point:"Point",altitude:"Altitude",initialAltitude:"Initial Altitude",addPoints:"Points",workArea:"Work Area",prohibitedArea:"No-Go Zone",location:"Location",currentLocation:"Current location",operations:"Operations",editAsJson:"Edit JSON",exportMapData:"Export",save:"Save",upload:"Upload",titleAdd:"Add New Point",titleEdit:"Edit Point",description:"Enter the coordinates, altitude, and purpose of the point.",latitude:"Latitude",longitude:"Longitude",purpose:"Purpose",cancel:"Cancel",submitAdd:"Add Point",submitEdit:"Save Changes",removePoint:"Delete",windSpeed:"Wind spd",windDirection:"Wind dir",setWind:"Set Wind",battery:"bat.",metres:"m",km:"km",hour:"h",minutes:"min",calculated:"calculated",error:"Calculation error",statusGood:"Good",statusCaution:"Caution",statusLow:"Can't complete",options:{artillery:"Artillery",tank:"Tank"},invalidJson:"Invalid JSON format",editJsonHint:"Edit the JSON data as needed.",satellite:"Satellite",cameraFov:"Camera FOV / Length / Field",cameraFovPlaceholder:"FOV parameters",commAddr:"Communication Addr / Port",commAddrPlaceholder:"192.168.1.1:8080"}},OH={title:"Annotations",mediaList:"Media",upload:"Upload Files",deleteMedia:"Delete media?",detect:"AI Detect",save:"Save",delete:"Delete",deleteAll:"Delete All",classes:"Detection Classes",photoMode:"Photo Mode",regular:"Regular",winter:"Winter",night:"Night"},kH={title:"Dataset Explorer",annotations:"Annotations",editor:"Editor",classDistribution:"Class Distribution",objectsOnly:"Show with objects only",search:"Search...",validate:"Validate",status:{created:"Created",edited:"Edited",validated:"Validated"}},LH={title:"Admin",classes:"Detection Classes",aiSettings:"AI Recognition Settings",gpsSettings:"GPS Device Settings",aircrafts:"Default Aircrafts",users:"User Management",addUser:"Add User",deactivate:"Deactivate"},zH={title:"Settings",tenant:"Tenant Configuration",directories:"Directories",aircrafts:"Aircrafts",save:"Save"},RH={confirm:"Confirm",cancel:"Cancel",delete:"Delete",save:"Save",loading:"Loading...",noData:"No data",help:"How to Annotate"},PH={nav:TH,login:DH,flights:MH,annotations:OH,dataset:kH,admin:LH,settings:zH,common:RH},NH={flights:"Польоти",annotations:"Анотації",dataset:"Датасет",admin:"Адмін",settings:"Налаштування",logout:"Вийти"},jH={title:"AZAION",email:"Email",password:"Пароль",submit:"Увійти",authenticating:"Автентифікація...",downloadingKey:"Завантаження ключа...",decrypting:"Розшифрування...",startingServices:"Запуск сервісів...",ready:"Готово",error:"Невірні облікові дані"},BH={title:"Польоти",create:"Створити новий",params:"Параметри польоту",gpsDenied:"GPS-Denied",waypoints:"Точки маршруту",aircraft:"Літальний апарат",height:"Висота за замовч.",upload:"Завантажити",back:"До польоту",orthophoto:"Ортофото",liveGps:"GPS Потік",correction:"Корекція GPS",apply:"Застосувати",telemetry:"Телеметрія",planner:{point:"Точка",altitude:"Висота",initialAltitude:"Початкова висота",addPoints:"Точки",workArea:"Робоча зона",prohibitedArea:"Заборонена зона",location:"Місцезнаходження",currentLocation:"Поточне місцезнаходження",operations:"Операції",editAsJson:"Редагувати JSON",exportMapData:"Експорт",save:"Зберегти",upload:"Завантажити",titleAdd:"Додати нову точку",titleEdit:"Редагувати точку",description:"Введіть координати, висоту та мету точки.",latitude:"Широта",longitude:"Довгота",purpose:"Мета",cancel:"Скасувати",submitAdd:"Додати точку",submitEdit:"Зберегти зміни",removePoint:"Видалити",windSpeed:"Шв. вітру",windDirection:"Напр. вітру",setWind:"Вітер",battery:"бат.",metres:"м",km:"км",hour:"год",minutes:"хв",calculated:"розрахункова",error:"Помилка розрахунку",statusGood:"Долетить",statusCaution:"Є ризики",statusLow:"Не долетить",options:{artillery:"Артилерія",tank:"Танк"},invalidJson:"Невірний JSON формат",editJsonHint:"Відредагуйте JSON дані за потреби.",satellite:"Супутник",cameraFov:"Камера FOV / Фокус",cameraFovPlaceholder:"Параметри FOV",commAddr:"Адреса / Порт",commAddrPlaceholder:"192.168.1.1:8080"}},IH={title:"Анотації",mediaList:"Медіа",upload:"Завантажити файли",deleteMedia:"Видалити медіа?",detect:"AI Розпізнавання",save:"Зберегти",delete:"Видалити",deleteAll:"Видалити все",classes:"Класи детекцій",photoMode:"Режим фото",regular:"Звичайний",winter:"Зимовий",night:"Нічний"},FH={title:"Датасет",annotations:"Анотації",editor:"Редактор",classDistribution:"Розподіл класів",objectsOnly:"Тільки з об'єктами",search:"Пошук...",validate:"Валідувати",status:{created:"Створено",edited:"Відредаговано",validated:"Валідовано"}},HH={title:"Адмін",classes:"Класи детекцій",aiSettings:"AI Налаштування",gpsSettings:"GPS Пристрій",aircrafts:"Літальні апарати",users:"Користувачі",addUser:"Додати користувача",deactivate:"Деактивувати"},UH={title:"Налаштування",tenant:"Конфігурація",directories:"Директорії",aircrafts:"Літальні апарати",save:"Зберегти"},VH={confirm:"Підтвердити",cancel:"Скасувати",delete:"Видалити",save:"Зберегти",loading:"Завантаження...",noData:"Немає даних",help:"Як анотувати"},$H={nav:NH,login:jH,flights:BH,annotations:IH,dataset:FH,admin:HH,settings:UH,common:VH};ei.use(lk).init({resources:{en:{translation:PH},ua:{translation:$H}},lng:"en",fallbackLng:"en",interpolation:{escapeValue:!1}});pM.createRoot(document.getElementById("root")).render(T.jsx(O.StrictMode,{children:T.jsx(RO,{children:T.jsx(lH,{})})}));
|