Files
ui/dist/assets/index-o2ENlayJ.js

64 lines
485 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
(function(){const u=document.createElement("link").relList;if(u&&u.supports&&u.supports("modulepreload"))return;for(const m of document.querySelectorAll('link[rel="modulepreload"]'))c(m);new MutationObserver(m=>{for(const p of m)if(p.type==="childList")for(const _ of p.addedNodes)_.tagName==="LINK"&&_.rel==="modulepreload"&&c(_)}).observe(document,{childList:!0,subtree:!0});function r(m){const p={};return m.integrity&&(p.integrity=m.integrity),m.referrerPolicy&&(p.referrerPolicy=m.referrerPolicy),m.crossOrigin==="use-credentials"?p.credentials="include":m.crossOrigin==="anonymous"?p.credentials="omit":p.credentials="same-origin",p}function c(m){if(m.ep)return;m.ep=!0;const p=r(m);fetch(m.href,p)}})();function zp(f){return f&&f.__esModule&&Object.prototype.hasOwnProperty.call(f,"default")?f.default:f}var bf={exports:{}},go={};/**
* @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 Gm;function wv(){if(Gm)return go;Gm=1;var f=Symbol.for("react.transitional.element"),u=Symbol.for("react.fragment");function r(c,m,p){var _=null;if(p!==void 0&&(_=""+p),m.key!==void 0&&(_=""+m.key),"key"in m){p={};for(var z in m)z!=="key"&&(p[z]=m[z])}else p=m;return m=p.ref,{$$typeof:f,type:c,key:_,ref:m!==void 0?m:null,props:p}}return go.Fragment=u,go.jsx=r,go.jsxs=r,go}var Vm;function zv(){return Vm||(Vm=1,bf.exports=wv()),bf.exports}var b=zv(),Sf={exports:{}},Lt={};/**
* @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 Xm;function Tv(){if(Xm)return Lt;Xm=1;var f=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),p=Symbol.for("react.consumer"),_=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),E=Symbol.for("react.activity"),O=Symbol.iterator;function H(N){return N===null||typeof N!="object"?null:(N=O&&N[O]||N["@@iterator"],typeof N=="function"?N:null)}var A={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},B=Object.assign,V={};function et(N,X,$){this.props=N,this.context=X,this.refs=V,this.updater=$||A}et.prototype.isReactComponent={},et.prototype.setState=function(N,X){if(typeof N!="object"&&typeof N!="function"&&N!=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,N,X,"setState")},et.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function U(){}U.prototype=et.prototype;function k(N,X,$){this.props=N,this.context=X,this.refs=V,this.updater=$||A}var F=k.prototype=new U;F.constructor=k,B(F,et.prototype),F.isPureReactComponent=!0;var mt=Array.isArray;function ht(){}var ft={H:null,A:null,T:null,S:null},pt=Object.prototype.hasOwnProperty;function zt(N,X,$){var lt=$.ref;return{$$typeof:f,type:N,key:X,ref:lt!==void 0?lt:null,props:$}}function Dt(N,X){return zt(N.type,X,N.props)}function vt(N){return typeof N=="object"&&N!==null&&N.$$typeof===f}function wt(N){var X={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function($){return X[$]})}var ce=/\/+/g;function Rt(N,X){return typeof N=="object"&&N!==null&&N.key!=null?wt(""+N.key):X.toString(36)}function Zt(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(ht,ht):(N.status="pending",N.then(function(X){N.status==="pending"&&(N.status="fulfilled",N.value=X)},function(X){N.status==="pending"&&(N.status="rejected",N.reason=X)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function D(N,X,$,lt,ot){var rt=typeof N;(rt==="undefined"||rt==="boolean")&&(N=null);var at=!1;if(N===null)at=!0;else switch(rt){case"bigint":case"string":case"number":at=!0;break;case"object":switch(N.$$typeof){case f:case u:at=!0;break;case T:return at=N._init,D(at(N._payload),X,$,lt,ot)}}if(at)return ot=ot(N),at=lt===""?"."+Rt(N,0):lt,mt(ot)?($="",at!=null&&($=at.replace(ce,"$&/")+"/"),D(ot,X,$,"",function(we){return we})):ot!=null&&(vt(ot)&&(ot=Dt(ot,$+(ot.key==null||N&&N.key===ot.key?"":(""+ot.key).replace(ce,"$&/")+"/")+at)),X.push(ot)),1;at=0;var Ot=lt===""?".":lt+":";if(mt(N))for(var Yt=0;Yt<N.length;Yt++)lt=N[Yt],rt=Ot+Rt(lt,Yt),at+=D(lt,X,$,rt,ot);else if(Yt=H(N),typeof Yt=="function")for(N=Yt.call(N),Yt=0;!(lt=N.next()).done;)lt=lt.value,rt=Ot+Rt(lt,Yt++),at+=D(lt,X,$,rt,ot);else if(rt==="object"){if(typeof N.then=="function")return D(Zt(N),X,$,lt,ot);throw X=String(N),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.")}return at}function q(N,X,$){if(N==null)return N;var lt=[],ot=0;return D(N,lt,"","",function(rt){return X.call($,rt,ot++)}),lt}function I(N){if(N._status===-1){var X=N._result;X=X(),X.then(function($){(N._status===0||N._status===-1)&&(N._status=1,N._result=$)},function($){(N._status===0||N._status===-1)&&(N._status=2,N._result=$)}),N._status===-1&&(N._status=0,N._result=X)}if(N._status===1)return N._result.default;throw N._result}var ut=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var X=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(X))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},st={map:q,forEach:function(N,X,$){q(N,function(){X.apply(this,arguments)},$)},count:function(N){var X=0;return q(N,function(){X++}),X},toArray:function(N){return q(N,function(X){return X})||[]},only:function(N){if(!vt(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return Lt.Activity=E,Lt.Children=st,Lt.Component=et,Lt.Fragment=r,Lt.Profiler=m,Lt.PureComponent=k,Lt.StrictMode=c,Lt.Suspense=y,Lt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ft,Lt.__COMPILER_RUNTIME={__proto__:null,c:function(N){return ft.H.useMemoCache(N)}},Lt.cache=function(N){return function(){return N.apply(null,arguments)}},Lt.cacheSignal=function(){return null},Lt.cloneElement=function(N,X,$){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var lt=B({},N.props),ot=N.key;if(X!=null)for(rt in X.key!==void 0&&(ot=""+X.key),X)!pt.call(X,rt)||rt==="key"||rt==="__self"||rt==="__source"||rt==="ref"&&X.ref===void 0||(lt[rt]=X[rt]);var rt=arguments.length-2;if(rt===1)lt.children=$;else if(1<rt){for(var at=Array(rt),Ot=0;Ot<rt;Ot++)at[Ot]=arguments[Ot+2];lt.children=at}return zt(N.type,ot,lt)},Lt.createContext=function(N){return N={$$typeof:_,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:p,_context:N},N},Lt.createElement=function(N,X,$){var lt,ot={},rt=null;if(X!=null)for(lt in X.key!==void 0&&(rt=""+X.key),X)pt.call(X,lt)&&lt!=="key"&&lt!=="__self"&&lt!=="__source"&&(ot[lt]=X[lt]);var at=arguments.length-2;if(at===1)ot.children=$;else if(1<at){for(var Ot=Array(at),Yt=0;Yt<at;Yt++)Ot[Yt]=arguments[Yt+2];ot.children=Ot}if(N&&N.defaultProps)for(lt in at=N.defaultProps,at)ot[lt]===void 0&&(ot[lt]=at[lt]);return zt(N,rt,ot)},Lt.createRef=function(){return{current:null}},Lt.forwardRef=function(N){return{$$typeof:z,render:N}},Lt.isValidElement=vt,Lt.lazy=function(N){return{$$typeof:T,_payload:{_status:-1,_result:N},_init:I}},Lt.memo=function(N,X){return{$$typeof:x,type:N,compare:X===void 0?null:X}},Lt.startTransition=function(N){var X=ft.T,$={};ft.T=$;try{var lt=N(),ot=ft.S;ot!==null&&ot($,lt),typeof lt=="object"&&lt!==null&&typeof lt.then=="function"&&lt.then(ht,ut)}catch(rt){ut(rt)}finally{X!==null&&$.types!==null&&(X.types=$.types),ft.T=X}},Lt.unstable_useCacheRefresh=function(){return ft.H.useCacheRefresh()},Lt.use=function(N){return ft.H.use(N)},Lt.useActionState=function(N,X,$){return ft.H.useActionState(N,X,$)},Lt.useCallback=function(N,X){return ft.H.useCallback(N,X)},Lt.useContext=function(N){return ft.H.useContext(N)},Lt.useDebugValue=function(){},Lt.useDeferredValue=function(N,X){return ft.H.useDeferredValue(N,X)},Lt.useEffect=function(N,X){return ft.H.useEffect(N,X)},Lt.useEffectEvent=function(N){return ft.H.useEffectEvent(N)},Lt.useId=function(){return ft.H.useId()},Lt.useImperativeHandle=function(N,X,$){return ft.H.useImperativeHandle(N,X,$)},Lt.useInsertionEffect=function(N,X){return ft.H.useInsertionEffect(N,X)},Lt.useLayoutEffect=function(N,X){return ft.H.useLayoutEffect(N,X)},Lt.useMemo=function(N,X){return ft.H.useMemo(N,X)},Lt.useOptimistic=function(N,X){return ft.H.useOptimistic(N,X)},Lt.useReducer=function(N,X,$){return ft.H.useReducer(N,X,$)},Lt.useRef=function(N){return ft.H.useRef(N)},Lt.useState=function(N){return ft.H.useState(N)},Lt.useSyncExternalStore=function(N,X,$){return ft.H.useSyncExternalStore(N,X,$)},Lt.useTransition=function(){return ft.H.useTransition()},Lt.version="19.2.4",Lt}var Km;function Hf(){return Km||(Km=1,Sf.exports=Tv()),Sf.exports}var C=Hf();const Mf=zp(C);var wf={exports:{}},vo={},zf={exports:{}},Tf={};/**
* @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 Qm;function Ev(){return Qm||(Qm=1,(function(f){function u(D,q){var I=D.length;D.push(q);t:for(;0<I;){var ut=I-1>>>1,st=D[ut];if(0<m(st,q))D[ut]=q,D[I]=st,I=ut;else break t}}function r(D){return D.length===0?null:D[0]}function c(D){if(D.length===0)return null;var q=D[0],I=D.pop();if(I!==q){D[0]=I;t:for(var ut=0,st=D.length,N=st>>>1;ut<N;){var X=2*(ut+1)-1,$=D[X],lt=X+1,ot=D[lt];if(0>m($,I))lt<st&&0>m(ot,$)?(D[ut]=ot,D[lt]=I,ut=lt):(D[ut]=$,D[X]=I,ut=X);else if(lt<st&&0>m(ot,I))D[ut]=ot,D[lt]=I,ut=lt;else break t}}return q}function m(D,q){var I=D.sortIndex-q.sortIndex;return I!==0?I:D.id-q.id}if(f.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var p=performance;f.unstable_now=function(){return p.now()}}else{var _=Date,z=_.now();f.unstable_now=function(){return _.now()-z}}var y=[],x=[],T=1,E=null,O=3,H=!1,A=!1,B=!1,V=!1,et=typeof setTimeout=="function"?setTimeout:null,U=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function F(D){for(var q=r(x);q!==null;){if(q.callback===null)c(x);else if(q.startTime<=D)c(x),q.sortIndex=q.expirationTime,u(y,q);else break;q=r(x)}}function mt(D){if(B=!1,F(D),!A)if(r(y)!==null)A=!0,ht||(ht=!0,wt());else{var q=r(x);q!==null&&Zt(mt,q.startTime-D)}}var ht=!1,ft=-1,pt=5,zt=-1;function Dt(){return V?!0:!(f.unstable_now()-zt<pt)}function vt(){if(V=!1,ht){var D=f.unstable_now();zt=D;var q=!0;try{t:{A=!1,B&&(B=!1,U(ft),ft=-1),H=!0;var I=O;try{e:{for(F(D),E=r(y);E!==null&&!(E.expirationTime>D&&Dt());){var ut=E.callback;if(typeof ut=="function"){E.callback=null,O=E.priorityLevel;var st=ut(E.expirationTime<=D);if(D=f.unstable_now(),typeof st=="function"){E.callback=st,F(D),q=!0;break e}E===r(y)&&c(y),F(D)}else c(y);E=r(y)}if(E!==null)q=!0;else{var N=r(x);N!==null&&Zt(mt,N.startTime-D),q=!1}}break t}finally{E=null,O=I,H=!1}q=void 0}}finally{q?wt():ht=!1}}}var wt;if(typeof k=="function")wt=function(){k(vt)};else if(typeof MessageChannel<"u"){var ce=new MessageChannel,Rt=ce.port2;ce.port1.onmessage=vt,wt=function(){Rt.postMessage(null)}}else wt=function(){et(vt,0)};function Zt(D,q){ft=et(function(){D(f.unstable_now())},q)}f.unstable_IdlePriority=5,f.unstable_ImmediatePriority=1,f.unstable_LowPriority=4,f.unstable_NormalPriority=3,f.unstable_Profiling=null,f.unstable_UserBlockingPriority=2,f.unstable_cancelCallback=function(D){D.callback=null},f.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):pt=0<D?Math.floor(1e3/D):5},f.unstable_getCurrentPriorityLevel=function(){return O},f.unstable_next=function(D){switch(O){case 1:case 2:case 3:var q=3;break;default:q=O}var I=O;O=q;try{return D()}finally{O=I}},f.unstable_requestPaint=function(){V=!0},f.unstable_runWithPriority=function(D,q){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var I=O;O=D;try{return q()}finally{O=I}},f.unstable_scheduleCallback=function(D,q,I){var ut=f.unstable_now();switch(typeof I=="object"&&I!==null?(I=I.delay,I=typeof I=="number"&&0<I?ut+I:ut):I=ut,D){case 1:var st=-1;break;case 2:st=250;break;case 5:st=1073741823;break;case 4:st=1e4;break;default:st=5e3}return st=I+st,D={id:T++,callback:q,priorityLevel:D,startTime:I,expirationTime:st,sortIndex:-1},I>ut?(D.sortIndex=I,u(x,D),r(y)===null&&D===r(x)&&(B?(U(ft),ft=-1):B=!0,Zt(mt,I-ut))):(D.sortIndex=st,u(y,D),A||H||(A=!0,ht||(ht=!0,wt()))),D},f.unstable_shouldYield=Dt,f.unstable_wrapCallback=function(D){var q=O;return function(){var I=O;O=q;try{return D.apply(this,arguments)}finally{O=I}}}})(Tf)),Tf}var Jm;function Lv(){return Jm||(Jm=1,zf.exports=Ev()),zf.exports}var Ef={exports:{}},He={};/**
* @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 Fm;function Cv(){if(Fm)return He;Fm=1;var f=Hf();function u(y){var x="https://react.dev/errors/"+y;if(1<arguments.length){x+="?args[]="+encodeURIComponent(arguments[1]);for(var T=2;T<arguments.length;T++)x+="&args[]="+encodeURIComponent(arguments[T])}return"Minified React error #"+y+"; visit "+x+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var c={d:{f:r,r:function(){throw Error(u(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},m=Symbol.for("react.portal");function p(y,x,T){var E=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:m,key:E==null?null:""+E,children:y,containerInfo:x,implementation:T}}var _=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function z(y,x){if(y==="font")return"";if(typeof x=="string")return x==="use-credentials"?x:""}return He.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,He.createPortal=function(y,x){var T=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!x||x.nodeType!==1&&x.nodeType!==9&&x.nodeType!==11)throw Error(u(299));return p(y,x,null,T)},He.flushSync=function(y){var x=_.T,T=c.p;try{if(_.T=null,c.p=2,y)return y()}finally{_.T=x,c.p=T,c.d.f()}},He.preconnect=function(y,x){typeof y=="string"&&(x?(x=x.crossOrigin,x=typeof x=="string"?x==="use-credentials"?x:"":void 0):x=null,c.d.C(y,x))},He.prefetchDNS=function(y){typeof y=="string"&&c.d.D(y)},He.preinit=function(y,x){if(typeof y=="string"&&x&&typeof x.as=="string"){var T=x.as,E=z(T,x.crossOrigin),O=typeof x.integrity=="string"?x.integrity:void 0,H=typeof x.fetchPriority=="string"?x.fetchPriority:void 0;T==="style"?c.d.S(y,typeof x.precedence=="string"?x.precedence:void 0,{crossOrigin:E,integrity:O,fetchPriority:H}):T==="script"&&c.d.X(y,{crossOrigin:E,integrity:O,fetchPriority:H,nonce:typeof x.nonce=="string"?x.nonce:void 0})}},He.preinitModule=function(y,x){if(typeof y=="string")if(typeof x=="object"&&x!==null){if(x.as==null||x.as==="script"){var T=z(x.as,x.crossOrigin);c.d.M(y,{crossOrigin:T,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0})}}else x==null&&c.d.M(y)},He.preload=function(y,x){if(typeof y=="string"&&typeof x=="object"&&x!==null&&typeof x.as=="string"){var T=x.as,E=z(T,x.crossOrigin);c.d.L(y,T,{crossOrigin:E,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0,type:typeof x.type=="string"?x.type:void 0,fetchPriority:typeof x.fetchPriority=="string"?x.fetchPriority:void 0,referrerPolicy:typeof x.referrerPolicy=="string"?x.referrerPolicy:void 0,imageSrcSet:typeof x.imageSrcSet=="string"?x.imageSrcSet:void 0,imageSizes:typeof x.imageSizes=="string"?x.imageSizes:void 0,media:typeof x.media=="string"?x.media:void 0})}},He.preloadModule=function(y,x){if(typeof y=="string")if(x){var T=z(x.as,x.crossOrigin);c.d.m(y,{as:typeof x.as=="string"&&x.as!=="script"?x.as:void 0,crossOrigin:T,integrity:typeof x.integrity=="string"?x.integrity:void 0})}else c.d.m(y)},He.requestFormReset=function(y){c.d.r(y)},He.unstable_batchedUpdates=function(y,x){return y(x)},He.useFormState=function(y,x,T){return _.H.useFormState(y,x,T)},He.useFormStatus=function(){return _.H.useHostTransitionStatus()},He.version="19.2.4",He}var Im;function Tp(){if(Im)return Ef.exports;Im=1;function f(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(f)}catch(u){console.error(u)}}return f(),Ef.exports=Cv(),Ef.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 Wm;function Nv(){if(Wm)return vo;Wm=1;var f=Lv(),u=Hf(),r=Tp();function c(t){var e="https://react.dev/errors/"+t;if(1<arguments.length){e+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)e+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function m(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function p(t){var e=t,i=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,(e.flags&4098)!==0&&(i=e.return),t=e.return;while(t)}return e.tag===3?i:null}function _(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function z(t){if(t.tag===31){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function y(t){if(p(t)!==t)throw Error(c(188))}function x(t){var e=t.alternate;if(!e){if(e=p(t),e===null)throw Error(c(188));return e!==t?null:t}for(var i=t,s=e;;){var o=i.return;if(o===null)break;var h=o.alternate;if(h===null){if(s=o.return,s!==null){i=s;continue}break}if(o.child===h.child){for(h=o.child;h;){if(h===i)return y(o),t;if(h===s)return y(o),e;h=h.sibling}throw Error(c(188))}if(i.return!==s.return)i=o,s=h;else{for(var v=!1,w=o.child;w;){if(w===i){v=!0,i=o,s=h;break}if(w===s){v=!0,s=o,i=h;break}w=w.sibling}if(!v){for(w=h.child;w;){if(w===i){v=!0,i=h,s=o;break}if(w===s){v=!0,s=h,i=o;break}w=w.sibling}if(!v)throw Error(c(189))}}if(i.alternate!==s)throw Error(c(190))}if(i.tag!==3)throw Error(c(188));return i.stateNode.current===i?t:e}function T(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t;for(t=t.child;t!==null;){if(e=T(t),e!==null)return e;t=t.sibling}return null}var E=Object.assign,O=Symbol.for("react.element"),H=Symbol.for("react.transitional.element"),A=Symbol.for("react.portal"),B=Symbol.for("react.fragment"),V=Symbol.for("react.strict_mode"),et=Symbol.for("react.profiler"),U=Symbol.for("react.consumer"),k=Symbol.for("react.context"),F=Symbol.for("react.forward_ref"),mt=Symbol.for("react.suspense"),ht=Symbol.for("react.suspense_list"),ft=Symbol.for("react.memo"),pt=Symbol.for("react.lazy"),zt=Symbol.for("react.activity"),Dt=Symbol.for("react.memo_cache_sentinel"),vt=Symbol.iterator;function wt(t){return t===null||typeof t!="object"?null:(t=vt&&t[vt]||t["@@iterator"],typeof t=="function"?t:null)}var ce=Symbol.for("react.client.reference");function Rt(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===ce?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case B:return"Fragment";case et:return"Profiler";case V:return"StrictMode";case mt:return"Suspense";case ht:return"SuspenseList";case zt:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case A:return"Portal";case k:return t.displayName||"Context";case U:return(t._context.displayName||"Context")+".Consumer";case F:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case ft:return e=t.displayName||null,e!==null?e:Rt(t.type)||"Memo";case pt:e=t._payload,t=t._init;try{return Rt(t(e))}catch{}}return null}var Zt=Array.isArray,D=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I={pending:!1,data:null,method:null,action:null},ut=[],st=-1;function N(t){return{current:t}}function X(t){0>st||(t.current=ut[st],ut[st]=null,st--)}function $(t,e){st++,ut[st]=t.current,t.current=e}var lt=N(null),ot=N(null),rt=N(null),at=N(null);function Ot(t,e){switch($(rt,e),$(ot,t),$(lt,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)&&(t=t.namespaceURI)?dm(t):0;break;default:if(t=e.tagName,e=e.namespaceURI)e=dm(e),t=mm(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}X(lt),$(lt,t)}function Yt(){X(lt),X(ot),X(rt)}function we(t){t.memoizedState!==null&&$(at,t);var e=lt.current,i=mm(e,t.type);e!==i&&($(ot,t),$(lt,i))}function an(t){ot.current===t&&(X(lt),X(ot)),at.current===t&&(X(at),fo._currentValue=I)}var si,us;function li(t){if(si===void 0)try{throw Error()}catch(i){var e=i.stack.trim().match(/\n( *(at )?)/);si=e&&e[1]||"",us=-1<i.stack.indexOf(`
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
`+si+t+us}var cs=!1;function fs(t,e){if(!t||cs)return"";cs=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(e){var it=function(){throw Error()};if(Object.defineProperty(it.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(it,[])}catch(J){var Q=J}Reflect.construct(t,[],it)}else{try{it.call()}catch(J){Q=J}t.call(it.prototype)}}else{try{throw Error()}catch(J){Q=J}(it=t())&&typeof it.catch=="function"&&it.catch(function(){})}}catch(J){if(J&&Q&&typeof J.stack=="string")return[J.stack,Q.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var h=s.DetermineComponentFrameRoot(),v=h[0],w=h[1];if(v&&w){var R=v.split(`
`),G=w.split(`
`);for(o=s=0;s<R.length&&!R[s].includes("DetermineComponentFrameRoot");)s++;for(;o<G.length&&!G[o].includes("DetermineComponentFrameRoot");)o++;if(s===R.length||o===G.length)for(s=R.length-1,o=G.length-1;1<=s&&0<=o&&R[s]!==G[o];)o--;for(;1<=s&&0<=o;s--,o--)if(R[s]!==G[o]){if(s!==1||o!==1)do if(s--,o--,0>o||R[s]!==G[o]){var W=`
`+R[s].replace(" at new "," at ");return t.displayName&&W.includes("<anonymous>")&&(W=W.replace("<anonymous>",t.displayName)),W}while(1<=s&&0<=o);break}}}finally{cs=!1,Error.prepareStackTrace=i}return(i=t?t.displayName||t.name:"")?li(i):""}function ul(t,e){switch(t.tag){case 26:case 27:case 5:return li(t.type);case 16:return li("Lazy");case 13:return t.child!==e&&e!==null?li("Suspense Fallback"):li("Suspense");case 19:return li("SuspenseList");case 0:case 15:return fs(t.type,!1);case 11:return fs(t.type.render,!1);case 1:return fs(t.type,!0);case 31:return li("Activity");default:return""}}function ya(t){try{var e="",i=null;do e+=ul(t,i),i=t,t=t.return;while(t);return e}catch(s){return`
Error generating stack: `+s.message+`
`+s.stack}}var cl=Object.prototype.hasOwnProperty,hs=f.unstable_scheduleCallback,xa=f.unstable_cancelCallback,Co=f.unstable_shouldYield,No=f.unstable_requestPaint,Pe=f.unstable_now,Su=f.unstable_getCurrentPriorityLevel,ds=f.unstable_ImmediatePriority,fl=f.unstable_UserBlockingPriority,ba=f.unstable_NormalPriority,wu=f.unstable_LowPriority,hl=f.unstable_IdlePriority,Oo=f.log,zu=f.unstable_setDisableYieldValue,ji=null,Me=null;function Ln(t){if(typeof Oo=="function"&&zu(t),Me&&typeof Me.setStrictMode=="function")try{Me.setStrictMode(ji,t)}catch{}}var ke=Math.clz32?Math.clz32:Eu,Sa=Math.log,Tu=Math.LN2;function Eu(t){return t>>>=0,t===0?32:31-(Sa(t)/Tu|0)|0}var wa=256,za=262144,Ta=4194304;function oi(t){var e=t&42;if(e!==0)return e;switch(t&-t){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 t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function ms(t,e,i){var s=t.pendingLanes;if(s===0)return 0;var o=0,h=t.suspendedLanes,v=t.pingedLanes;t=t.warmLanes;var w=s&134217727;return w!==0?(s=w&~h,s!==0?o=oi(s):(v&=w,v!==0?o=oi(v):i||(i=w&~t,i!==0&&(o=oi(i))))):(w=s&~h,w!==0?o=oi(w):v!==0?o=oi(v):i||(i=s&~t,i!==0&&(o=oi(i)))),o===0?0:e!==0&&e!==o&&(e&h)===0&&(h=o&-o,i=e&-e,h>=i||h===32&&(i&4194048)!==0)?e:o}function Ea(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function Lu(t,e){switch(t){case 1:case 2:case 4:case 8:case 64:return e+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 e+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 Mo(){var t=Ta;return Ta<<=1,(Ta&62914560)===0&&(Ta=4194304),t}function dl(t){for(var e=[],i=0;31>i;i++)e.push(t);return e}function ri(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Cu(t,e,i,s,o,h){var v=t.pendingLanes;t.pendingLanes=i,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=i,t.entangledLanes&=i,t.errorRecoveryDisabledLanes&=i,t.shellSuspendCounter=0;var w=t.entanglements,R=t.expirationTimes,G=t.hiddenUpdates;for(i=v&~i;0<i;){var W=31-ke(i),it=1<<W;w[W]=0,R[W]=-1;var Q=G[W];if(Q!==null)for(G[W]=null,W=0;W<Q.length;W++){var J=Q[W];J!==null&&(J.lane&=-536870913)}i&=~it}s!==0&&Ao(t,s,0),h!==0&&o===0&&t.tag!==0&&(t.suspendedLanes|=h&~(v&~e))}function Ao(t,e,i){t.pendingLanes|=e,t.suspendedLanes&=~e;var s=31-ke(e);t.entangledLanes|=e,t.entanglements[s]=t.entanglements[s]|1073741824|i&261930}function Ro(t,e){var i=t.entangledLanes|=e;for(t=t.entanglements;i;){var s=31-ke(i),o=1<<s;o&e|t[s]&e&&(t[s]|=e),i&=~o}}function Do(t,e){var i=e&-e;return i=(i&42)!==0?1:Ve(i),(i&(t.suspendedLanes|e))!==0?0:i}function Ve(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function _t(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function ml(){var t=q.p;return t!==0?t:(t=window.event,t===void 0?32:Um(t.type))}function pl(t,e){var i=q.p;try{return q.p=t,e()}finally{q.p=i}}var Cn=Math.random().toString(36).slice(2),ve="__reactFiber$"+Cn,Le="__reactProps$"+Cn,ui="__reactContainer$"+Cn,Zn="__reactEvents$"+Cn,jo="__reactListeners$"+Cn,Nu="__reactHandles$"+Cn,Bo="__reactResources$"+Cn,La="__reactMarker$"+Cn;function gl(t){delete t[ve],delete t[Le],delete t[Zn],delete t[jo],delete t[Nu]}function ci(t){var e=t[ve];if(e)return e;for(var i=t.parentNode;i;){if(e=i[ui]||i[ve]){if(i=e.alternate,e.child!==null||i!==null&&i.child!==null)for(t=bm(t);t!==null;){if(i=t[ve])return i;t=bm(t)}return e}t=i,i=t.parentNode}return null}function Bi(t){if(t=t[ve]||t[ui]){var e=t.tag;if(e===5||e===6||e===13||e===31||e===26||e===27||e===3)return t}return null}function Pn(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t.stateNode;throw Error(c(33))}function Ui(t){var e=t[Bo];return e||(e=t[Bo]={hoistableStyles:new Map,hoistableScripts:new Map}),e}function _e(t){t[La]=!0}var Uo=new Set,Ho={};function fi(t,e){kn(t,e),kn(t+"Capture",e)}function kn(t,e){for(Ho[t]=e,t=0;t<e.length;t++)Uo.add(e[t])}var Ca=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]*$"),vl={},_l={};function Na(t){return cl.call(_l,t)?!0:cl.call(vl,t)?!1:Ca.test(t)?_l[t]=!0:(vl[t]=!0,!1)}function jt(t,e,i){if(Na(e))if(i===null)t.removeAttribute(e);else{switch(typeof i){case"undefined":case"function":case"symbol":t.removeAttribute(e);return;case"boolean":var s=e.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){t.removeAttribute(e);return}}t.setAttribute(e,""+i)}}function Wt(t,e,i){if(i===null)t.removeAttribute(e);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(e);return}t.setAttribute(e,""+i)}}function Xe(t,e,i,s){if(s===null)t.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(i);return}t.setAttributeNS(e,i,""+s)}}function ze(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function hi(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function yl(t,e,i){var s=Object.getOwnPropertyDescriptor(t.constructor.prototype,e);if(!t.hasOwnProperty(e)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var o=s.get,h=s.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return o.call(this)},set:function(v){i=""+v,h.call(this,v)}}),Object.defineProperty(t,e,{enumerable:s.enumerable}),{getValue:function(){return i},setValue:function(v){i=""+v},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Et(t){if(!t._valueTracker){var e=hi(t)?"checked":"value";t._valueTracker=yl(t,e,""+t[e])}}function le(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var i=e.getValue(),s="";return t&&(s=hi(t)?t.checked?"true":"false":t.value),t=s,t!==i?(e.setValue(t),!0):!1}function Hi(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var ps=/[\n"\\]/g;function ae(t){return t.replace(ps,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function xl(t,e,i,s,o,h,v,w){t.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?t.type=v:t.removeAttribute("type"),e!=null?v==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+ze(e)):t.value!==""+ze(e)&&(t.value=""+ze(e)):v!=="submit"&&v!=="reset"||t.removeAttribute("value"),e!=null?Nn(t,v,ze(e)):i!=null?Nn(t,v,ze(i)):s!=null&&t.removeAttribute("value"),o==null&&h!=null&&(t.defaultChecked=!!h),o!=null&&(t.checked=o&&typeof o!="function"&&typeof o!="symbol"),w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?t.name=""+ze(w):t.removeAttribute("name")}function Oa(t,e,i,s,o,h,v,w){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(t.type=h),e!=null||i!=null){if(!(h!=="submit"&&h!=="reset"||e!=null)){Et(t);return}i=i!=null?""+ze(i):"",e=e!=null?""+ze(e):i,w||e===t.value||(t.value=e),t.defaultValue=e}s=s??o,s=typeof s!="function"&&typeof s!="symbol"&&!!s,t.checked=w?t.checked:!!s,t.defaultChecked=!!s,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(t.name=v),Et(t)}function Nn(t,e,i){e==="number"&&Hi(t.ownerDocument)===t||t.defaultValue===""+i||(t.defaultValue=""+i)}function ne(t,e,i,s){if(t=t.options,e){e={};for(var o=0;o<i.length;o++)e["$"+i[o]]=!0;for(i=0;i<t.length;i++)o=e.hasOwnProperty("$"+t[i].value),t[i].selected!==o&&(t[i].selected=o),o&&s&&(t[i].defaultSelected=!0)}else{for(i=""+ze(i),e=null,o=0;o<t.length;o++){if(t[o].value===i){t[o].selected=!0,s&&(t[o].defaultSelected=!0);return}e!==null||t[o].disabled||(e=t[o])}e!==null&&(e.selected=!0)}}function qn(t,e,i){if(e!=null&&(e=""+ze(e),e!==t.value&&(t.value=e),i==null)){t.defaultValue!==e&&(t.defaultValue=e);return}t.defaultValue=i!=null?""+ze(i):""}function Zi(t,e,i,s){if(e==null){if(s!=null){if(i!=null)throw Error(c(92));if(Zt(s)){if(1<s.length)throw Error(c(93));s=s[0]}i=s}i==null&&(i=""),e=i}i=ze(e),t.defaultValue=i,s=t.textContent,s===i&&s!==""&&s!==null&&(t.value=s),Et(t)}function pn(t,e){if(e){var i=t.firstChild;if(i&&i===t.lastChild&&i.nodeType===3){i.nodeValue=e;return}}t.textContent=e}var bl=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 Pi(t,e,i){var s=e.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?s?t.setProperty(e,""):e==="float"?t.cssFloat="":t[e]="":s?t.setProperty(e,i):typeof i!="number"||i===0||bl.has(e)?e==="float"?t.cssFloat=i:t[e]=(""+i).trim():t[e]=i+"px"}function gs(t,e,i){if(e!=null&&typeof e!="object")throw Error(c(62));if(t=t.style,i!=null){for(var s in i)!i.hasOwnProperty(s)||e!=null&&e.hasOwnProperty(s)||(s.indexOf("--")===0?t.setProperty(s,""):s==="float"?t.cssFloat="":t[s]="");for(var o in e)s=e[o],e.hasOwnProperty(o)&&i[o]!==s&&Pi(t,o,s)}else for(var h in e)e.hasOwnProperty(h)&&Pi(t,h,e[h])}function Ma(t){if(t.indexOf("-")===-1)return!1;switch(t){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 vs=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"]]),Sl=/^[\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 ki(t){return Sl.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Ke(){}var _s=null;function Aa(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var qi=null,St=null;function sn(t){var e=Bi(t);if(e&&(t=e.stateNode)){var i=t[Le]||null;t:switch(t=e.stateNode,e.type){case"input":if(xl(t,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),e=i.name,i.type==="radio"&&e!=null){for(i=t;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+ae(""+e)+'"][type="radio"]'),e=0;e<i.length;e++){var s=i[e];if(s!==t&&s.form===t.form){var o=s[Le]||null;if(!o)throw Error(c(90));xl(s,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(e=0;e<i.length;e++)s=i[e],s.form===t.form&&le(s)}break t;case"textarea":qn(t,i.value,i.defaultValue);break t;case"select":e=i.value,e!=null&&ne(t,!!i.multiple,e,!1)}}}var Jt=!1;function wl(t,e,i){if(Jt)return t(e,i);Jt=!0;try{var s=t(e);return s}finally{if(Jt=!1,(qi!==null||St!==null)&&(Dr(),qi&&(e=qi,t=St,St=qi=null,sn(e),t)))for(e=0;e<t.length;e++)sn(t[e])}}function di(t,e){var i=t.stateNode;if(i===null)return null;var s=i[Le]||null;if(s===null)return null;i=s[e];t:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(t=t.type,s=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!s;break t;default:t=!1}if(t)return null;if(i&&typeof i!="function")throw Error(c(231,e,typeof i));return i}var ln=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ra=!1;if(ln)try{var on={};Object.defineProperty(on,"passive",{get:function(){Ra=!0}}),window.addEventListener("test",on,on),window.removeEventListener("test",on,on)}catch{Ra=!1}var gn=null,mi=null,fe=null;function Yn(){if(fe)return fe;var t,e=mi,i=e.length,s,o="value"in gn?gn.value:gn.textContent,h=o.length;for(t=0;t<i&&e[t]===o[t];t++);var v=i-t;for(s=1;s<=v&&e[i-s]===o[h-s];s++);return fe=o.slice(t,1<s?1-s:void 0)}function Da(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function ja(){return!0}function Zo(){return!1}function Ae(t){function e(i,s,o,h,v){this._reactName=i,this._targetInst=o,this.type=s,this.nativeEvent=h,this.target=v,this.currentTarget=null;for(var w in t)t.hasOwnProperty(w)&&(i=t[w],this[w]=i?i(h):h[w]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?ja:Zo,this.isPropagationStopped=Zo,this}return E(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=ja)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=ja)},persist:function(){},isPersistent:ja}),e}var On={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ys=Ae(On),Yi=E({},On,{view:0,detail:0}),Pt=Ae(Yi),zl,qe,Mn,Ba=E({},Yi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ol,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Mn&&(Mn&&t.type==="mousemove"?(zl=t.screenX-Mn.screenX,qe=t.screenY-Mn.screenY):qe=zl=0,Mn=t),zl)},movementY:function(t){return"movementY"in t?t.movementY:qe}}),Po=Ae(Ba),Tl=E({},Ba,{dataTransfer:0}),Ou=Ae(Tl),ko=E({},Yi,{relatedTarget:0}),El=Ae(ko),Mu=E({},On,{animationName:0,elapsedTime:0,pseudoElement:0}),Ll=Ae(Mu),Au=E({},On,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),vn=Ae(Au),Ru=E({},On,{data:0}),Cl=Ae(Ru),Gn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},qo={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"},Yo={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Nl(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=Yo[t])?!!e[t]:!1}function Ol(){return Nl}var Go=E({},Yi,{key:function(t){if(t.key){var e=Gn[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=Da(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?qo[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ol,charCode:function(t){return t.type==="keypress"?Da(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Da(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),Vo=Ae(Go),Du=E({},Ba,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Xo=Ae(Du),Ml=E({},Yi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ol}),ju=Ae(Ml),Ko=E({},On,{propertyName:0,elapsedTime:0,pseudoElement:0}),Qo=Ae(Ko),xs=E({},Ba,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),pi=Ae(xs),Bu=E({},On,{newState:0,oldState:0}),Ua=Ae(Bu),Qe=[9,13,27,32],bs=ln&&"CompositionEvent"in window,Gi=null;ln&&"documentMode"in document&&(Gi=document.documentMode);var Uu=ln&&"TextEvent"in window&&!Gi,Ss=ln&&(!bs||Gi&&8<Gi&&11>=Gi),ws=" ",Jo=!1;function Fo(t,e){switch(t){case"keyup":return Qe.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Al(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Vi=!1;function rn(t,e){switch(t){case"compositionend":return Al(e);case"keypress":return e.which!==32?null:(Jo=!0,ws);case"textInput":return t=e.data,t===ws&&Jo?null:t;default:return null}}function Xi(t,e){if(Vi)return t==="compositionend"||!bs&&Fo(t,e)?(t=Yn(),fe=mi=gn=null,Vi=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return Ss&&e.locale!=="ko"?null:e.data;default:return null}}var Hu={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 _n(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!Hu[t.type]:e==="textarea"}function Io(t,e,i,s){qi?St?St.push(s):St=[s]:qi=s,e=kr(e,"onChange"),0<e.length&&(i=new ys("onChange","change",null,i,s),t.push({event:i,listeners:e}))}var yn=null,Ha=null;function Za(t){om(t,0)}function Pa(t){var e=Pn(t);if(le(e))return t}function ka(t,e){if(t==="change")return e}var Wo=!1;if(ln){var xn;if(ln){var Ki="oninput"in document;if(!Ki){var $o=document.createElement("div");$o.setAttribute("oninput","return;"),Ki=typeof $o.oninput=="function"}xn=Ki}else xn=!1;Wo=xn&&(!document.documentMode||9<document.documentMode)}function zs(){yn&&(yn.detachEvent("onpropertychange",tr),Ha=yn=null)}function tr(t){if(t.propertyName==="value"&&Pa(Ha)){var e=[];Io(e,Ha,t,Aa(t)),wl(Za,e)}}function An(t,e,i){t==="focusin"?(zs(),yn=e,Ha=i,yn.attachEvent("onpropertychange",tr)):t==="focusout"&&zs()}function Zu(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Pa(Ha)}function Qi(t,e){if(t==="click")return Pa(e)}function Pu(t,e){if(t==="input"||t==="change")return Pa(e)}function Rn(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Ce=typeof Object.is=="function"?Object.is:Rn;function Ji(t,e){if(Ce(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var i=Object.keys(t),s=Object.keys(e);if(i.length!==s.length)return!1;for(s=0;s<i.length;s++){var o=i[s];if(!cl.call(e,o)||!Ce(t[o],e[o]))return!1}return!0}function Ts(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function qa(t,e){var i=Ts(t);t=0;for(var s;i;){if(i.nodeType===3){if(s=t+i.textContent.length,t<=e&&s>=e)return{node:i,offset:e-t};t=s}t:{for(;i;){if(i.nextSibling){i=i.nextSibling;break t}i=i.parentNode}i=void 0}i=Ts(i)}}function Es(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Es(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Ya(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=Hi(t.document);e instanceof t.HTMLIFrameElement;){try{var i=typeof e.contentWindow.location.href=="string"}catch{i=!1}if(i)t=e.contentWindow;else break;e=Hi(t.document)}return e}function Vn(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var Ls=ln&&"documentMode"in document&&11>=document.documentMode,Xn=null,Cs=null,Ga=null,Fi=!1;function er(t,e,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Fi||Xn==null||Xn!==Hi(s)||(s=Xn,"selectionStart"in s&&Vn(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Ga&&Ji(Ga,s)||(Ga=s,s=kr(Cs,"onSelect"),0<s.length&&(e=new ys("onSelect","select",null,e,i),t.push({event:e,listeners:s}),e.target=Xn)))}function Kn(t,e){var i={};return i[t.toLowerCase()]=e.toLowerCase(),i["Webkit"+t]="webkit"+e,i["Moz"+t]="moz"+e,i}var Ii={animationend:Kn("Animation","AnimationEnd"),animationiteration:Kn("Animation","AnimationIteration"),animationstart:Kn("Animation","AnimationStart"),transitionrun:Kn("Transition","TransitionRun"),transitionstart:Kn("Transition","TransitionStart"),transitioncancel:Kn("Transition","TransitionCancel"),transitionend:Kn("Transition","TransitionEnd")},Ns={},nr={};ln&&(nr=document.createElement("div").style,"AnimationEvent"in window||(delete Ii.animationend.animation,delete Ii.animationiteration.animation,delete Ii.animationstart.animation),"TransitionEvent"in window||delete Ii.transitionend.transition);function Ne(t){if(Ns[t])return Ns[t];if(!Ii[t])return t;var e=Ii[t],i;for(i in e)if(e.hasOwnProperty(i)&&i in nr)return Ns[t]=e[i];return t}var Va=Ne("animationend"),ir=Ne("animationiteration"),Xa=Ne("animationstart"),ku=Ne("transitionrun"),ar=Ne("transitionstart"),qu=Ne("transitioncancel"),Wi=Ne("transitionend"),sr=new Map,Qn="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(" ");Qn.push("scrollEnd");function Je(t,e){sr.set(t,e),fi(e,[t])}var Ka=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(e))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},Fe=[],Be=0,Os=0;function Qa(){for(var t=Be,e=Os=Be=0;e<t;){var i=Fe[e];Fe[e++]=null;var s=Fe[e];Fe[e++]=null;var o=Fe[e];Fe[e++]=null;var h=Fe[e];if(Fe[e++]=null,s!==null&&o!==null){var v=s.pending;v===null?o.next=o:(o.next=v.next,v.next=o),s.pending=o}h!==0&&$i(i,o,h)}}function Jn(t,e,i,s){Fe[Be++]=t,Fe[Be++]=e,Fe[Be++]=i,Fe[Be++]=s,Os|=s,t.lanes|=s,t=t.alternate,t!==null&&(t.lanes|=s)}function Rl(t,e,i,s){return Jn(t,e,i,s),Ja(t)}function bn(t,e){return Jn(t,null,null,e),Ja(t)}function $i(t,e,i){t.lanes|=i;var s=t.alternate;s!==null&&(s.lanes|=i);for(var o=!1,h=t.return;h!==null;)h.childLanes|=i,s=h.alternate,s!==null&&(s.childLanes|=i),h.tag===22&&(t=h.stateNode,t===null||t._visibility&1||(o=!0)),t=h,h=h.return;return t.tag===3?(h=t.stateNode,o&&e!==null&&(o=31-ke(i),t=h.hiddenUpdates,s=t[o],s===null?t[o]=[e]:s.push(e),e.lane=i|536870912),h):null}function Ja(t){if(50<ao)throw ao=0,Gc=null,Error(c(185));for(var e=t.return;e!==null;)t=e,e=t.return;return t.tag===3?t.stateNode:null}var gi={};function Yu(t,e,i,s){this.tag=t,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ue(t,e,i,s){return new Yu(t,e,i,s)}function Ms(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Sn(t,e){var i=t.alternate;return i===null?(i=Ue(t.tag,e,t.key,t.mode),i.elementType=t.elementType,i.type=t.type,i.stateNode=t.stateNode,i.alternate=t,t.alternate=i):(i.pendingProps=e,i.type=t.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=t.flags&65011712,i.childLanes=t.childLanes,i.lanes=t.lanes,i.child=t.child,i.memoizedProps=t.memoizedProps,i.memoizedState=t.memoizedState,i.updateQueue=t.updateQueue,e=t.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},i.sibling=t.sibling,i.index=t.index,i.ref=t.ref,i.refCleanup=t.refCleanup,i}function Dl(t,e){t.flags&=65011714;var i=t.alternate;return i===null?(t.childLanes=0,t.lanes=e,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=i.childLanes,t.lanes=i.lanes,t.child=i.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=i.memoizedProps,t.memoizedState=i.memoizedState,t.updateQueue=i.updateQueue,t.type=i.type,e=i.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),t}function Fa(t,e,i,s,o,h){var v=0;if(s=t,typeof t=="function")Ms(t)&&(v=1);else if(typeof t=="string")v=fv(t,i,lt.current)?26:t==="html"||t==="head"||t==="body"?27:5;else t:switch(t){case zt:return t=Ue(31,i,e,o),t.elementType=zt,t.lanes=h,t;case B:return vi(i.children,o,h,e);case V:v=8,o|=24;break;case et:return t=Ue(12,i,e,o|2),t.elementType=et,t.lanes=h,t;case mt:return t=Ue(13,i,e,o),t.elementType=mt,t.lanes=h,t;case ht:return t=Ue(19,i,e,o),t.elementType=ht,t.lanes=h,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case k:v=10;break t;case U:v=9;break t;case F:v=11;break t;case ft:v=14;break t;case pt:v=16,s=null;break t}v=29,i=Error(c(130,t===null?"null":typeof t,"")),s=null}return e=Ue(v,i,e,o),e.elementType=t,e.type=s,e.lanes=h,e}function vi(t,e,i,s){return t=Ue(7,t,s,e),t.lanes=i,t}function As(t,e,i){return t=Ue(6,t,null,e),t.lanes=i,t}function jl(t){var e=Ue(18,null,null,0);return e.stateNode=t,e}function Bl(t,e,i){return e=Ue(4,t.children!==null?t.children:[],t.key,e),e.lanes=i,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}var n=new WeakMap;function a(t,e){if(typeof t=="object"&&t!==null){var i=n.get(t);return i!==void 0?i:(e={value:t,source:e,stack:ya(e)},n.set(t,e),e)}return{value:t,source:e,stack:ya(e)}}var l=[],d=0,g=null,S=0,M=[],P=0,K=null,nt=1,ct="";function yt(t,e){l[d++]=S,l[d++]=g,g=t,S=e}function Mt(t,e,i){M[P++]=nt,M[P++]=ct,M[P++]=K,K=t;var s=nt;t=ct;var o=32-ke(s)-1;s&=~(1<<o),i+=1;var h=32-ke(e)+o;if(30<h){var v=o-o%5;h=(s&(1<<v)-1).toString(32),s>>=v,o-=v,nt=1<<32-ke(e)+o|i<<o|s,ct=h+t}else nt=1<<h|i<<o|s,ct=t}function Te(t){t.return!==null&&(yt(t,1),Mt(t,1,0))}function he(t){for(;t===g;)g=l[--d],l[d]=null,S=l[--d],l[d]=null;for(;t===K;)K=M[--P],M[P]=null,ct=M[--P],M[P]=null,nt=M[--P],M[P]=null}function Ye(t,e){M[P++]=nt,M[P++]=ct,M[P++]=K,nt=e.id,ct=e.overflow,K=t}var Gt=null,Vt=null,Bt=!1,Fn=null,Ie=!1,Rs=Error(c(519));function In(t){var e=Error(c(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ia(a(e,t)),Rs}function Ul(t){var e=t.stateNode,i=t.type,s=t.memoizedProps;switch(e[ve]=t,e[Le]=s,i){case"dialog":Ht("cancel",e),Ht("close",e);break;case"iframe":case"object":case"embed":Ht("load",e);break;case"video":case"audio":for(i=0;i<lo.length;i++)Ht(lo[i],e);break;case"source":Ht("error",e);break;case"img":case"image":case"link":Ht("error",e),Ht("load",e);break;case"details":Ht("toggle",e);break;case"input":Ht("invalid",e),Oa(e,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Ht("invalid",e);break;case"textarea":Ht("invalid",e),Zi(e,s.value,s.defaultValue,s.children)}i=s.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||e.textContent===""+i||s.suppressHydrationWarning===!0||fm(e.textContent,i)?(s.popover!=null&&(Ht("beforetoggle",e),Ht("toggle",e)),s.onScroll!=null&&Ht("scroll",e),s.onScrollEnd!=null&&Ht("scrollend",e),s.onClick!=null&&(e.onclick=Ke),e=!0):e=!1,e||In(t,!0)}function ue(t){for(Gt=t.return;Gt;)switch(Gt.tag){case 5:case 31:case 13:Ie=!1;return;case 27:case 3:Ie=!0;return;default:Gt=Gt.return}}function Dn(t){if(t!==Gt)return!1;if(!Bt)return ue(t),Bt=!0,!1;var e=t.tag,i;if((i=e!==3&&e!==27)&&((i=e===5)&&(i=t.type,i=!(i!=="form"&&i!=="button")||lf(t.type,t.memoizedProps)),i=!i),i&&Vt&&In(t),ue(t),e===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(c(317));Vt=xm(t)}else if(e===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(c(317));Vt=xm(t)}else e===27?(e=Vt,da(t.type)?(t=ff,ff=null,Vt=t):Vt=e):Vt=Gt?zn(t.stateNode.nextSibling):null;return!0}function _i(){Vt=Gt=null,Bt=!1}function Hl(){var t=Fn;return t!==null&&(en===null?en=t:en.push.apply(en,t),Fn=null),t}function Ia(t){Fn===null?Fn=[t]:Fn.push(t)}var Wa=N(null),Wn=null,jn=null;function ta(t,e,i){$(Wa,e._currentValue),e._currentValue=i}function yi(t){t._currentValue=Wa.current,X(Wa)}function Gu(t,e,i){for(;t!==null;){var s=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,s!==null&&(s.childLanes|=e)):s!==null&&(s.childLanes&e)!==e&&(s.childLanes|=e),t===i)break;t=t.return}}function Vu(t,e,i,s){var o=t.child;for(o!==null&&(o.return=t);o!==null;){var h=o.dependencies;if(h!==null){var v=o.child;h=h.firstContext;t:for(;h!==null;){var w=h;h=o;for(var R=0;R<e.length;R++)if(w.context===e[R]){h.lanes|=i,w=h.alternate,w!==null&&(w.lanes|=i),Gu(h.return,i,t),s||(v=null);break t}h=w.next}}else if(o.tag===18){if(v=o.return,v===null)throw Error(c(341));v.lanes|=i,h=v.alternate,h!==null&&(h.lanes|=i),Gu(v,i,t),v=null}else v=o.child;if(v!==null)v.return=o;else for(v=o;v!==null;){if(v===t){v=null;break}if(o=v.sibling,o!==null){o.return=v.return,v=o;break}v=v.return}o=v}}function Ds(t,e,i,s){t=null;for(var o=e,h=!1;o!==null;){if(!h){if((o.flags&524288)!==0)h=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var v=o.alternate;if(v===null)throw Error(c(387));if(v=v.memoizedProps,v!==null){var w=o.type;Ce(o.pendingProps.value,v.value)||(t!==null?t.push(w):t=[w])}}else if(o===at.current){if(v=o.alternate,v===null)throw Error(c(387));v.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(t!==null?t.push(fo):t=[fo])}o=o.return}t!==null&&Vu(e,t,i,s),e.flags|=262144}function lr(t){for(t=t.firstContext;t!==null;){if(!Ce(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function $a(t){Wn=t,jn=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Re(t){return Ff(Wn,t)}function or(t,e){return Wn===null&&$a(t),Ff(t,e)}function Ff(t,e){var i=e._currentValue;if(e={context:e,memoizedValue:i,next:null},jn===null){if(t===null)throw Error(c(308));jn=e,t.dependencies={lanes:0,firstContext:e},t.flags|=524288}else jn=jn.next=e;return i}var og=typeof AbortController<"u"?AbortController:function(){var t=[],e=this.signal={aborted:!1,addEventListener:function(i,s){t.push(s)}};this.abort=function(){e.aborted=!0,t.forEach(function(i){return i()})}},rg=f.unstable_scheduleCallback,ug=f.unstable_NormalPriority,ye={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Xu(){return{controller:new og,data:new Map,refCount:0}}function Zl(t){t.refCount--,t.refCount===0&&rg(ug,function(){t.controller.abort()})}var Pl=null,Ku=0,js=0,Bs=null;function cg(t,e){if(Pl===null){var i=Pl=[];Ku=0,js=Fc(),Bs={status:"pending",value:void 0,then:function(s){i.push(s)}}}return Ku++,e.then(If,If),e}function If(){if(--Ku===0&&Pl!==null){Bs!==null&&(Bs.status="fulfilled");var t=Pl;Pl=null,js=0,Bs=null;for(var e=0;e<t.length;e++)(0,t[e])()}}function fg(t,e){var i=[],s={status:"pending",value:null,reason:null,then:function(o){i.push(o)}};return t.then(function(){s.status="fulfilled",s.value=e;for(var o=0;o<i.length;o++)(0,i[o])(e)},function(o){for(s.status="rejected",s.reason=o,o=0;o<i.length;o++)(0,i[o])(void 0)}),s}var Wf=D.S;D.S=function(t,e){jd=Pe(),typeof e=="object"&&e!==null&&typeof e.then=="function"&&cg(t,e),Wf!==null&&Wf(t,e)};var ts=N(null);function Qu(){var t=ts.current;return t!==null?t:ie.pooledCache}function rr(t,e){e===null?$(ts,ts.current):$(ts,e.pool)}function $f(){var t=Qu();return t===null?null:{parent:ye._currentValue,pool:t}}var Us=Error(c(460)),Ju=Error(c(474)),ur=Error(c(542)),cr={then:function(){}};function th(t){return t=t.status,t==="fulfilled"||t==="rejected"}function eh(t,e,i){switch(i=t[i],i===void 0?t.push(e):i!==e&&(e.then(Ke,Ke),e=i),e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,ih(t),t;default:if(typeof e.status=="string")e.then(Ke,Ke);else{if(t=ie,t!==null&&100<t.shellSuspendCounter)throw Error(c(482));t=e,t.status="pending",t.then(function(s){if(e.status==="pending"){var o=e;o.status="fulfilled",o.value=s}},function(s){if(e.status==="pending"){var o=e;o.status="rejected",o.reason=s}})}switch(e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,ih(t),t}throw ns=e,Us}}function es(t){try{var e=t._init;return e(t._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(ns=i,Us):i}}var ns=null;function nh(){if(ns===null)throw Error(c(459));var t=ns;return ns=null,t}function ih(t){if(t===Us||t===ur)throw Error(c(483))}var Hs=null,kl=0;function fr(t){var e=kl;return kl+=1,Hs===null&&(Hs=[]),eh(Hs,t,e)}function ql(t,e){e=e.props.ref,t.ref=e!==void 0?e:null}function hr(t,e){throw e.$$typeof===O?Error(c(525)):(t=Object.prototype.toString.call(e),Error(c(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)))}function ah(t){function e(Z,j){if(t){var Y=Z.deletions;Y===null?(Z.deletions=[j],Z.flags|=16):Y.push(j)}}function i(Z,j){if(!t)return null;for(;j!==null;)e(Z,j),j=j.sibling;return null}function s(Z){for(var j=new Map;Z!==null;)Z.key!==null?j.set(Z.key,Z):j.set(Z.index,Z),Z=Z.sibling;return j}function o(Z,j){return Z=Sn(Z,j),Z.index=0,Z.sibling=null,Z}function h(Z,j,Y){return Z.index=Y,t?(Y=Z.alternate,Y!==null?(Y=Y.index,Y<j?(Z.flags|=67108866,j):Y):(Z.flags|=67108866,j)):(Z.flags|=1048576,j)}function v(Z){return t&&Z.alternate===null&&(Z.flags|=67108866),Z}function w(Z,j,Y,tt){return j===null||j.tag!==6?(j=As(Y,Z.mode,tt),j.return=Z,j):(j=o(j,Y),j.return=Z,j)}function R(Z,j,Y,tt){var xt=Y.type;return xt===B?W(Z,j,Y.props.children,tt,Y.key):j!==null&&(j.elementType===xt||typeof xt=="object"&&xt!==null&&xt.$$typeof===pt&&es(xt)===j.type)?(j=o(j,Y.props),ql(j,Y),j.return=Z,j):(j=Fa(Y.type,Y.key,Y.props,null,Z.mode,tt),ql(j,Y),j.return=Z,j)}function G(Z,j,Y,tt){return j===null||j.tag!==4||j.stateNode.containerInfo!==Y.containerInfo||j.stateNode.implementation!==Y.implementation?(j=Bl(Y,Z.mode,tt),j.return=Z,j):(j=o(j,Y.children||[]),j.return=Z,j)}function W(Z,j,Y,tt,xt){return j===null||j.tag!==7?(j=vi(Y,Z.mode,tt,xt),j.return=Z,j):(j=o(j,Y),j.return=Z,j)}function it(Z,j,Y){if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return j=As(""+j,Z.mode,Y),j.return=Z,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case H:return Y=Fa(j.type,j.key,j.props,null,Z.mode,Y),ql(Y,j),Y.return=Z,Y;case A:return j=Bl(j,Z.mode,Y),j.return=Z,j;case pt:return j=es(j),it(Z,j,Y)}if(Zt(j)||wt(j))return j=vi(j,Z.mode,Y,null),j.return=Z,j;if(typeof j.then=="function")return it(Z,fr(j),Y);if(j.$$typeof===k)return it(Z,or(Z,j),Y);hr(Z,j)}return null}function Q(Z,j,Y,tt){var xt=j!==null?j.key:null;if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return xt!==null?null:w(Z,j,""+Y,tt);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case H:return Y.key===xt?R(Z,j,Y,tt):null;case A:return Y.key===xt?G(Z,j,Y,tt):null;case pt:return Y=es(Y),Q(Z,j,Y,tt)}if(Zt(Y)||wt(Y))return xt!==null?null:W(Z,j,Y,tt,null);if(typeof Y.then=="function")return Q(Z,j,fr(Y),tt);if(Y.$$typeof===k)return Q(Z,j,or(Z,Y),tt);hr(Z,Y)}return null}function J(Z,j,Y,tt,xt){if(typeof tt=="string"&&tt!==""||typeof tt=="number"||typeof tt=="bigint")return Z=Z.get(Y)||null,w(j,Z,""+tt,xt);if(typeof tt=="object"&&tt!==null){switch(tt.$$typeof){case H:return Z=Z.get(tt.key===null?Y:tt.key)||null,R(j,Z,tt,xt);case A:return Z=Z.get(tt.key===null?Y:tt.key)||null,G(j,Z,tt,xt);case pt:return tt=es(tt),J(Z,j,Y,tt,xt)}if(Zt(tt)||wt(tt))return Z=Z.get(Y)||null,W(j,Z,tt,xt,null);if(typeof tt.then=="function")return J(Z,j,Y,fr(tt),xt);if(tt.$$typeof===k)return J(Z,j,Y,or(j,tt),xt);hr(j,tt)}return null}function dt(Z,j,Y,tt){for(var xt=null,Xt=null,gt=j,At=j=0,qt=null;gt!==null&&At<Y.length;At++){gt.index>At?(qt=gt,gt=null):qt=gt.sibling;var Kt=Q(Z,gt,Y[At],tt);if(Kt===null){gt===null&&(gt=qt);break}t&&gt&&Kt.alternate===null&&e(Z,gt),j=h(Kt,j,At),Xt===null?xt=Kt:Xt.sibling=Kt,Xt=Kt,gt=qt}if(At===Y.length)return i(Z,gt),Bt&&yt(Z,At),xt;if(gt===null){for(;At<Y.length;At++)gt=it(Z,Y[At],tt),gt!==null&&(j=h(gt,j,At),Xt===null?xt=gt:Xt.sibling=gt,Xt=gt);return Bt&&yt(Z,At),xt}for(gt=s(gt);At<Y.length;At++)qt=J(gt,Z,At,Y[At],tt),qt!==null&&(t&&qt.alternate!==null&&gt.delete(qt.key===null?At:qt.key),j=h(qt,j,At),Xt===null?xt=qt:Xt.sibling=qt,Xt=qt);return t&&gt.forEach(function(_a){return e(Z,_a)}),Bt&&yt(Z,At),xt}function bt(Z,j,Y,tt){if(Y==null)throw Error(c(151));for(var xt=null,Xt=null,gt=j,At=j=0,qt=null,Kt=Y.next();gt!==null&&!Kt.done;At++,Kt=Y.next()){gt.index>At?(qt=gt,gt=null):qt=gt.sibling;var _a=Q(Z,gt,Kt.value,tt);if(_a===null){gt===null&&(gt=qt);break}t&&gt&&_a.alternate===null&&e(Z,gt),j=h(_a,j,At),Xt===null?xt=_a:Xt.sibling=_a,Xt=_a,gt=qt}if(Kt.done)return i(Z,gt),Bt&&yt(Z,At),xt;if(gt===null){for(;!Kt.done;At++,Kt=Y.next())Kt=it(Z,Kt.value,tt),Kt!==null&&(j=h(Kt,j,At),Xt===null?xt=Kt:Xt.sibling=Kt,Xt=Kt);return Bt&&yt(Z,At),xt}for(gt=s(gt);!Kt.done;At++,Kt=Y.next())Kt=J(gt,Z,At,Kt.value,tt),Kt!==null&&(t&&Kt.alternate!==null&&gt.delete(Kt.key===null?At:Kt.key),j=h(Kt,j,At),Xt===null?xt=Kt:Xt.sibling=Kt,Xt=Kt);return t&&gt.forEach(function(Sv){return e(Z,Sv)}),Bt&&yt(Z,At),xt}function ee(Z,j,Y,tt){if(typeof Y=="object"&&Y!==null&&Y.type===B&&Y.key===null&&(Y=Y.props.children),typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case H:t:{for(var xt=Y.key;j!==null;){if(j.key===xt){if(xt=Y.type,xt===B){if(j.tag===7){i(Z,j.sibling),tt=o(j,Y.props.children),tt.return=Z,Z=tt;break t}}else if(j.elementType===xt||typeof xt=="object"&&xt!==null&&xt.$$typeof===pt&&es(xt)===j.type){i(Z,j.sibling),tt=o(j,Y.props),ql(tt,Y),tt.return=Z,Z=tt;break t}i(Z,j);break}else e(Z,j);j=j.sibling}Y.type===B?(tt=vi(Y.props.children,Z.mode,tt,Y.key),tt.return=Z,Z=tt):(tt=Fa(Y.type,Y.key,Y.props,null,Z.mode,tt),ql(tt,Y),tt.return=Z,Z=tt)}return v(Z);case A:t:{for(xt=Y.key;j!==null;){if(j.key===xt)if(j.tag===4&&j.stateNode.containerInfo===Y.containerInfo&&j.stateNode.implementation===Y.implementation){i(Z,j.sibling),tt=o(j,Y.children||[]),tt.return=Z,Z=tt;break t}else{i(Z,j);break}else e(Z,j);j=j.sibling}tt=Bl(Y,Z.mode,tt),tt.return=Z,Z=tt}return v(Z);case pt:return Y=es(Y),ee(Z,j,Y,tt)}if(Zt(Y))return dt(Z,j,Y,tt);if(wt(Y)){if(xt=wt(Y),typeof xt!="function")throw Error(c(150));return Y=xt.call(Y),bt(Z,j,Y,tt)}if(typeof Y.then=="function")return ee(Z,j,fr(Y),tt);if(Y.$$typeof===k)return ee(Z,j,or(Z,Y),tt);hr(Z,Y)}return typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint"?(Y=""+Y,j!==null&&j.tag===6?(i(Z,j.sibling),tt=o(j,Y),tt.return=Z,Z=tt):(i(Z,j),tt=As(Y,Z.mode,tt),tt.return=Z,Z=tt),v(Z)):i(Z,j)}return function(Z,j,Y,tt){try{kl=0;var xt=ee(Z,j,Y,tt);return Hs=null,xt}catch(gt){if(gt===Us||gt===ur)throw gt;var Xt=Ue(29,gt,null,Z.mode);return Xt.lanes=tt,Xt.return=Z,Xt}finally{}}}var is=ah(!0),sh=ah(!1),ea=!1;function Fu(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Iu(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function na(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function ia(t,e,i){var s=t.updateQueue;if(s===null)return null;if(s=s.shared,(Qt&2)!==0){var o=s.pending;return o===null?e.next=e:(e.next=o.next,o.next=e),s.pending=e,e=Ja(t),$i(t,null,i),e}return Jn(t,s,e,i),Ja(t)}function Yl(t,e,i){if(e=e.updateQueue,e!==null&&(e=e.shared,(i&4194048)!==0)){var s=e.lanes;s&=t.pendingLanes,i|=s,e.lanes=i,Ro(t,i)}}function Wu(t,e){var i=t.updateQueue,s=t.alternate;if(s!==null&&(s=s.updateQueue,i===s)){var o=null,h=null;if(i=i.firstBaseUpdate,i!==null){do{var v={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};h===null?o=h=v:h=h.next=v,i=i.next}while(i!==null);h===null?o=h=e:h=h.next=e}else o=h=e;i={baseState:s.baseState,firstBaseUpdate:o,lastBaseUpdate:h,shared:s.shared,callbacks:s.callbacks},t.updateQueue=i;return}t=i.lastBaseUpdate,t===null?i.firstBaseUpdate=e:t.next=e,i.lastBaseUpdate=e}var $u=!1;function Gl(){if($u){var t=Bs;if(t!==null)throw t}}function Vl(t,e,i,s){$u=!1;var o=t.updateQueue;ea=!1;var h=o.firstBaseUpdate,v=o.lastBaseUpdate,w=o.shared.pending;if(w!==null){o.shared.pending=null;var R=w,G=R.next;R.next=null,v===null?h=G:v.next=G,v=R;var W=t.alternate;W!==null&&(W=W.updateQueue,w=W.lastBaseUpdate,w!==v&&(w===null?W.firstBaseUpdate=G:w.next=G,W.lastBaseUpdate=R))}if(h!==null){var it=o.baseState;v=0,W=G=R=null,w=h;do{var Q=w.lane&-536870913,J=Q!==w.lane;if(J?(kt&Q)===Q:(s&Q)===Q){Q!==0&&Q===js&&($u=!0),W!==null&&(W=W.next={lane:0,tag:w.tag,payload:w.payload,callback:null,next:null});t:{var dt=t,bt=w;Q=e;var ee=i;switch(bt.tag){case 1:if(dt=bt.payload,typeof dt=="function"){it=dt.call(ee,it,Q);break t}it=dt;break t;case 3:dt.flags=dt.flags&-65537|128;case 0:if(dt=bt.payload,Q=typeof dt=="function"?dt.call(ee,it,Q):dt,Q==null)break t;it=E({},it,Q);break t;case 2:ea=!0}}Q=w.callback,Q!==null&&(t.flags|=64,J&&(t.flags|=8192),J=o.callbacks,J===null?o.callbacks=[Q]:J.push(Q))}else J={lane:Q,tag:w.tag,payload:w.payload,callback:w.callback,next:null},W===null?(G=W=J,R=it):W=W.next=J,v|=Q;if(w=w.next,w===null){if(w=o.shared.pending,w===null)break;J=w,w=J.next,J.next=null,o.lastBaseUpdate=J,o.shared.pending=null}}while(!0);W===null&&(R=it),o.baseState=R,o.firstBaseUpdate=G,o.lastBaseUpdate=W,h===null&&(o.shared.lanes=0),ra|=v,t.lanes=v,t.memoizedState=it}}function lh(t,e){if(typeof t!="function")throw Error(c(191,t));t.call(e)}function oh(t,e){var i=t.callbacks;if(i!==null)for(t.callbacks=null,t=0;t<i.length;t++)lh(i[t],e)}var Zs=N(null),dr=N(0);function rh(t,e){t=Ci,$(dr,t),$(Zs,e),Ci=t|e.baseLanes}function tc(){$(dr,Ci),$(Zs,Zs.current)}function ec(){Ci=dr.current,X(Zs),X(dr)}var un=N(null),wn=null;function aa(t){var e=t.alternate;$(pe,pe.current&1),$(un,t),wn===null&&(e===null||Zs.current!==null||e.memoizedState!==null)&&(wn=t)}function nc(t){$(pe,pe.current),$(un,t),wn===null&&(wn=t)}function uh(t){t.tag===22?($(pe,pe.current),$(un,t),wn===null&&(wn=t)):sa()}function sa(){$(pe,pe.current),$(un,un.current)}function cn(t){X(un),wn===t&&(wn=null),X(pe)}var pe=N(0);function mr(t){for(var e=t;e!==null;){if(e.tag===13){var i=e.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||uf(i)||cf(i)))return e}else if(e.tag===19&&(e.memoizedProps.revealOrder==="forwards"||e.memoizedProps.revealOrder==="backwards"||e.memoizedProps.revealOrder==="unstable_legacy-backwards"||e.memoizedProps.revealOrder==="together")){if((e.flags&128)!==0)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var xi=0,Ct=null,$t=null,xe=null,pr=!1,Ps=!1,as=!1,gr=0,Xl=0,ks=null,hg=0;function de(){throw Error(c(321))}function ic(t,e){if(e===null)return!1;for(var i=0;i<e.length&&i<t.length;i++)if(!Ce(t[i],e[i]))return!1;return!0}function ac(t,e,i,s,o,h){return xi=h,Ct=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,D.H=t===null||t.memoizedState===null?Xh:yc,as=!1,h=i(s,o),as=!1,Ps&&(h=fh(e,i,s,o)),ch(t),h}function ch(t){D.H=Jl;var e=$t!==null&&$t.next!==null;if(xi=0,xe=$t=Ct=null,pr=!1,Xl=0,ks=null,e)throw Error(c(300));t===null||be||(t=t.dependencies,t!==null&&lr(t)&&(be=!0))}function fh(t,e,i,s){Ct=t;var o=0;do{if(Ps&&(ks=null),Xl=0,Ps=!1,25<=o)throw Error(c(301));if(o+=1,xe=$t=null,t.updateQueue!=null){var h=t.updateQueue;h.lastEffect=null,h.events=null,h.stores=null,h.memoCache!=null&&(h.memoCache.index=0)}D.H=Kh,h=e(i,s)}while(Ps);return h}function dg(){var t=D.H,e=t.useState()[0];return e=typeof e.then=="function"?Kl(e):e,t=t.useState()[0],($t!==null?$t.memoizedState:null)!==t&&(Ct.flags|=1024),e}function sc(){var t=gr!==0;return gr=0,t}function lc(t,e,i){e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i}function oc(t){if(pr){for(t=t.memoizedState;t!==null;){var e=t.queue;e!==null&&(e.pending=null),t=t.next}pr=!1}xi=0,xe=$t=Ct=null,Ps=!1,Xl=gr=0,ks=null}function Ge(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xe===null?Ct.memoizedState=xe=t:xe=xe.next=t,xe}function ge(){if($t===null){var t=Ct.alternate;t=t!==null?t.memoizedState:null}else t=$t.next;var e=xe===null?Ct.memoizedState:xe.next;if(e!==null)xe=e,$t=t;else{if(t===null)throw Ct.alternate===null?Error(c(467)):Error(c(310));$t=t,t={memoizedState:$t.memoizedState,baseState:$t.baseState,baseQueue:$t.baseQueue,queue:$t.queue,next:null},xe===null?Ct.memoizedState=xe=t:xe=xe.next=t}return xe}function vr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Kl(t){var e=Xl;return Xl+=1,ks===null&&(ks=[]),t=eh(ks,t,e),e=Ct,(xe===null?e.memoizedState:xe.next)===null&&(e=e.alternate,D.H=e===null||e.memoizedState===null?Xh:yc),t}function _r(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Kl(t);if(t.$$typeof===k)return Re(t)}throw Error(c(438,String(t)))}function rc(t){var e=null,i=Ct.updateQueue;if(i!==null&&(e=i.memoCache),e==null){var s=Ct.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(e={data:s.data.map(function(o){return o.slice()}),index:0})))}if(e==null&&(e={data:[],index:0}),i===null&&(i=vr(),Ct.updateQueue=i),i.memoCache=e,i=e.data[e.index],i===void 0)for(i=e.data[e.index]=Array(t),s=0;s<t;s++)i[s]=Dt;return e.index++,i}function bi(t,e){return typeof e=="function"?e(t):e}function yr(t){var e=ge();return uc(e,$t,t)}function uc(t,e,i){var s=t.queue;if(s===null)throw Error(c(311));s.lastRenderedReducer=i;var o=t.baseQueue,h=s.pending;if(h!==null){if(o!==null){var v=o.next;o.next=h.next,h.next=v}e.baseQueue=o=h,s.pending=null}if(h=t.baseState,o===null)t.memoizedState=h;else{e=o.next;var w=v=null,R=null,G=e,W=!1;do{var it=G.lane&-536870913;if(it!==G.lane?(kt&it)===it:(xi&it)===it){var Q=G.revertLane;if(Q===0)R!==null&&(R=R.next={lane:0,revertLane:0,gesture:null,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null}),it===js&&(W=!0);else if((xi&Q)===Q){G=G.next,Q===js&&(W=!0);continue}else it={lane:0,revertLane:G.revertLane,gesture:null,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null},R===null?(w=R=it,v=h):R=R.next=it,Ct.lanes|=Q,ra|=Q;it=G.action,as&&i(h,it),h=G.hasEagerState?G.eagerState:i(h,it)}else Q={lane:it,revertLane:G.revertLane,gesture:G.gesture,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null},R===null?(w=R=Q,v=h):R=R.next=Q,Ct.lanes|=it,ra|=it;G=G.next}while(G!==null&&G!==e);if(R===null?v=h:R.next=w,!Ce(h,t.memoizedState)&&(be=!0,W&&(i=Bs,i!==null)))throw i;t.memoizedState=h,t.baseState=v,t.baseQueue=R,s.lastRenderedState=h}return o===null&&(s.lanes=0),[t.memoizedState,s.dispatch]}function cc(t){var e=ge(),i=e.queue;if(i===null)throw Error(c(311));i.lastRenderedReducer=t;var s=i.dispatch,o=i.pending,h=e.memoizedState;if(o!==null){i.pending=null;var v=o=o.next;do h=t(h,v.action),v=v.next;while(v!==o);Ce(h,e.memoizedState)||(be=!0),e.memoizedState=h,e.baseQueue===null&&(e.baseState=h),i.lastRenderedState=h}return[h,s]}function hh(t,e,i){var s=Ct,o=ge(),h=Bt;if(h){if(i===void 0)throw Error(c(407));i=i()}else i=e();var v=!Ce(($t||o).memoizedState,i);if(v&&(o.memoizedState=i,be=!0),o=o.queue,dc(ph.bind(null,s,o,t),[t]),o.getSnapshot!==e||v||xe!==null&&xe.memoizedState.tag&1){if(s.flags|=2048,qs(9,{destroy:void 0},mh.bind(null,s,o,i,e),null),ie===null)throw Error(c(349));h||(xi&127)!==0||dh(s,e,i)}return i}function dh(t,e,i){t.flags|=16384,t={getSnapshot:e,value:i},e=Ct.updateQueue,e===null?(e=vr(),Ct.updateQueue=e,e.stores=[t]):(i=e.stores,i===null?e.stores=[t]:i.push(t))}function mh(t,e,i,s){e.value=i,e.getSnapshot=s,gh(e)&&vh(t)}function ph(t,e,i){return i(function(){gh(e)&&vh(t)})}function gh(t){var e=t.getSnapshot;t=t.value;try{var i=e();return!Ce(t,i)}catch{return!0}}function vh(t){var e=bn(t,2);e!==null&&nn(e,t,2)}function fc(t){var e=Ge();if(typeof t=="function"){var i=t;if(t=i(),as){Ln(!0);try{i()}finally{Ln(!1)}}}return e.memoizedState=e.baseState=t,e.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:bi,lastRenderedState:t},e}function _h(t,e,i,s){return t.baseState=i,uc(t,$t,typeof s=="function"?s:bi)}function mg(t,e,i,s,o){if(Sr(t))throw Error(c(485));if(t=e.action,t!==null){var h={payload:o,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){h.listeners.push(v)}};D.T!==null?i(!0):h.isTransition=!1,s(h),i=e.pending,i===null?(h.next=e.pending=h,yh(e,h)):(h.next=i.next,e.pending=i.next=h)}}function yh(t,e){var i=e.action,s=e.payload,o=t.state;if(e.isTransition){var h=D.T,v={};D.T=v;try{var w=i(o,s),R=D.S;R!==null&&R(v,w),xh(t,e,w)}catch(G){hc(t,e,G)}finally{h!==null&&v.types!==null&&(h.types=v.types),D.T=h}}else try{h=i(o,s),xh(t,e,h)}catch(G){hc(t,e,G)}}function xh(t,e,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(s){bh(t,e,s)},function(s){return hc(t,e,s)}):bh(t,e,i)}function bh(t,e,i){e.status="fulfilled",e.value=i,Sh(e),t.state=i,e=t.pending,e!==null&&(i=e.next,i===e?t.pending=null:(i=i.next,e.next=i,yh(t,i)))}function hc(t,e,i){var s=t.pending;if(t.pending=null,s!==null){s=s.next;do e.status="rejected",e.reason=i,Sh(e),e=e.next;while(e!==s)}t.action=null}function Sh(t){t=t.listeners;for(var e=0;e<t.length;e++)(0,t[e])()}function wh(t,e){return e}function zh(t,e){if(Bt){var i=ie.formState;if(i!==null){t:{var s=Ct;if(Bt){if(Vt){e:{for(var o=Vt,h=Ie;o.nodeType!==8;){if(!h){o=null;break e}if(o=zn(o.nextSibling),o===null){o=null;break e}}h=o.data,o=h==="F!"||h==="F"?o:null}if(o){Vt=zn(o.nextSibling),s=o.data==="F!";break t}}In(s)}s=!1}s&&(e=i[0])}}return i=Ge(),i.memoizedState=i.baseState=e,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:wh,lastRenderedState:e},i.queue=s,i=Yh.bind(null,Ct,s),s.dispatch=i,s=fc(!1),h=_c.bind(null,Ct,!1,s.queue),s=Ge(),o={state:e,dispatch:null,action:t,pending:null},s.queue=o,i=mg.bind(null,Ct,o,h,i),o.dispatch=i,s.memoizedState=t,[e,i,!1]}function Th(t){var e=ge();return Eh(e,$t,t)}function Eh(t,e,i){if(e=uc(t,e,wh)[0],t=yr(bi)[0],typeof e=="object"&&e!==null&&typeof e.then=="function")try{var s=Kl(e)}catch(v){throw v===Us?ur:v}else s=e;e=ge();var o=e.queue,h=o.dispatch;return i!==e.memoizedState&&(Ct.flags|=2048,qs(9,{destroy:void 0},pg.bind(null,o,i),null)),[s,h,t]}function pg(t,e){t.action=e}function Lh(t){var e=ge(),i=$t;if(i!==null)return Eh(e,i,t);ge(),e=e.memoizedState,i=ge();var s=i.queue.dispatch;return i.memoizedState=t,[e,s,!1]}function qs(t,e,i,s){return t={tag:t,create:i,deps:s,inst:e,next:null},e=Ct.updateQueue,e===null&&(e=vr(),Ct.updateQueue=e),i=e.lastEffect,i===null?e.lastEffect=t.next=t:(s=i.next,i.next=t,t.next=s,e.lastEffect=t),t}function Ch(){return ge().memoizedState}function xr(t,e,i,s){var o=Ge();Ct.flags|=t,o.memoizedState=qs(1|e,{destroy:void 0},i,s===void 0?null:s)}function br(t,e,i,s){var o=ge();s=s===void 0?null:s;var h=o.memoizedState.inst;$t!==null&&s!==null&&ic(s,$t.memoizedState.deps)?o.memoizedState=qs(e,h,i,s):(Ct.flags|=t,o.memoizedState=qs(1|e,h,i,s))}function Nh(t,e){xr(8390656,8,t,e)}function dc(t,e){br(2048,8,t,e)}function gg(t){Ct.flags|=4;var e=Ct.updateQueue;if(e===null)e=vr(),Ct.updateQueue=e,e.events=[t];else{var i=e.events;i===null?e.events=[t]:i.push(t)}}function Oh(t){var e=ge().memoizedState;return gg({ref:e,nextImpl:t}),function(){if((Qt&2)!==0)throw Error(c(440));return e.impl.apply(void 0,arguments)}}function Mh(t,e){return br(4,2,t,e)}function Ah(t,e){return br(4,4,t,e)}function Rh(t,e){if(typeof e=="function"){t=t();var i=e(t);return function(){typeof i=="function"?i():e(null)}}if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function Dh(t,e,i){i=i!=null?i.concat([t]):null,br(4,4,Rh.bind(null,e,t),i)}function mc(){}function jh(t,e){var i=ge();e=e===void 0?null:e;var s=i.memoizedState;return e!==null&&ic(e,s[1])?s[0]:(i.memoizedState=[t,e],t)}function Bh(t,e){var i=ge();e=e===void 0?null:e;var s=i.memoizedState;if(e!==null&&ic(e,s[1]))return s[0];if(s=t(),as){Ln(!0);try{t()}finally{Ln(!1)}}return i.memoizedState=[s,e],s}function pc(t,e,i){return i===void 0||(xi&1073741824)!==0&&(kt&261930)===0?t.memoizedState=e:(t.memoizedState=i,t=Ud(),Ct.lanes|=t,ra|=t,i)}function Uh(t,e,i,s){return Ce(i,e)?i:Zs.current!==null?(t=pc(t,i,s),Ce(t,e)||(be=!0),t):(xi&42)===0||(xi&1073741824)!==0&&(kt&261930)===0?(be=!0,t.memoizedState=i):(t=Ud(),Ct.lanes|=t,ra|=t,e)}function Hh(t,e,i,s,o){var h=q.p;q.p=h!==0&&8>h?h:8;var v=D.T,w={};D.T=w,_c(t,!1,e,i);try{var R=o(),G=D.S;if(G!==null&&G(w,R),R!==null&&typeof R=="object"&&typeof R.then=="function"){var W=fg(R,s);Ql(t,e,W,dn(t))}else Ql(t,e,s,dn(t))}catch(it){Ql(t,e,{then:function(){},status:"rejected",reason:it},dn())}finally{q.p=h,v!==null&&w.types!==null&&(v.types=w.types),D.T=v}}function vg(){}function gc(t,e,i,s){if(t.tag!==5)throw Error(c(476));var o=Zh(t).queue;Hh(t,o,e,I,i===null?vg:function(){return Ph(t),i(s)})}function Zh(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:I,baseState:I,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:bi,lastRenderedState:I},next:null};var i={};return e.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:bi,lastRenderedState:i},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function Ph(t){var e=Zh(t);e.next===null&&(e=t.alternate.memoizedState),Ql(t,e.next.queue,{},dn())}function vc(){return Re(fo)}function kh(){return ge().memoizedState}function qh(){return ge().memoizedState}function _g(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var i=dn();t=na(i);var s=ia(e,t,i);s!==null&&(nn(s,e,i),Yl(s,e,i)),e={cache:Xu()},t.payload=e;return}e=e.return}}function yg(t,e,i){var s=dn();i={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Sr(t)?Gh(e,i):(i=Rl(t,e,i,s),i!==null&&(nn(i,t,s),Vh(i,e,s)))}function Yh(t,e,i){var s=dn();Ql(t,e,i,s)}function Ql(t,e,i,s){var o={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Sr(t))Gh(e,o);else{var h=t.alternate;if(t.lanes===0&&(h===null||h.lanes===0)&&(h=e.lastRenderedReducer,h!==null))try{var v=e.lastRenderedState,w=h(v,i);if(o.hasEagerState=!0,o.eagerState=w,Ce(w,v))return Jn(t,e,o,0),ie===null&&Qa(),!1}catch{}finally{}if(i=Rl(t,e,o,s),i!==null)return nn(i,t,s),Vh(i,e,s),!0}return!1}function _c(t,e,i,s){if(s={lane:2,revertLane:Fc(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Sr(t)){if(e)throw Error(c(479))}else e=Rl(t,i,s,2),e!==null&&nn(e,t,2)}function Sr(t){var e=t.alternate;return t===Ct||e!==null&&e===Ct}function Gh(t,e){Ps=pr=!0;var i=t.pending;i===null?e.next=e:(e.next=i.next,i.next=e),t.pending=e}function Vh(t,e,i){if((i&4194048)!==0){var s=e.lanes;s&=t.pendingLanes,i|=s,e.lanes=i,Ro(t,i)}}var Jl={readContext:Re,use:_r,useCallback:de,useContext:de,useEffect:de,useImperativeHandle:de,useLayoutEffect:de,useInsertionEffect:de,useMemo:de,useReducer:de,useRef:de,useState:de,useDebugValue:de,useDeferredValue:de,useTransition:de,useSyncExternalStore:de,useId:de,useHostTransitionStatus:de,useFormState:de,useActionState:de,useOptimistic:de,useMemoCache:de,useCacheRefresh:de};Jl.useEffectEvent=de;var Xh={readContext:Re,use:_r,useCallback:function(t,e){return Ge().memoizedState=[t,e===void 0?null:e],t},useContext:Re,useEffect:Nh,useImperativeHandle:function(t,e,i){i=i!=null?i.concat([t]):null,xr(4194308,4,Rh.bind(null,e,t),i)},useLayoutEffect:function(t,e){return xr(4194308,4,t,e)},useInsertionEffect:function(t,e){xr(4,2,t,e)},useMemo:function(t,e){var i=Ge();e=e===void 0?null:e;var s=t();if(as){Ln(!0);try{t()}finally{Ln(!1)}}return i.memoizedState=[s,e],s},useReducer:function(t,e,i){var s=Ge();if(i!==void 0){var o=i(e);if(as){Ln(!0);try{i(e)}finally{Ln(!1)}}}else o=e;return s.memoizedState=s.baseState=o,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:o},s.queue=t,t=t.dispatch=yg.bind(null,Ct,t),[s.memoizedState,t]},useRef:function(t){var e=Ge();return t={current:t},e.memoizedState=t},useState:function(t){t=fc(t);var e=t.queue,i=Yh.bind(null,Ct,e);return e.dispatch=i,[t.memoizedState,i]},useDebugValue:mc,useDeferredValue:function(t,e){var i=Ge();return pc(i,t,e)},useTransition:function(){var t=fc(!1);return t=Hh.bind(null,Ct,t.queue,!0,!1),Ge().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,i){var s=Ct,o=Ge();if(Bt){if(i===void 0)throw Error(c(407));i=i()}else{if(i=e(),ie===null)throw Error(c(349));(kt&127)!==0||dh(s,e,i)}o.memoizedState=i;var h={value:i,getSnapshot:e};return o.queue=h,Nh(ph.bind(null,s,h,t),[t]),s.flags|=2048,qs(9,{destroy:void 0},mh.bind(null,s,h,i,e),null),i},useId:function(){var t=Ge(),e=ie.identifierPrefix;if(Bt){var i=ct,s=nt;i=(s&~(1<<32-ke(s)-1)).toString(32)+i,e="_"+e+"R_"+i,i=gr++,0<i&&(e+="H"+i.toString(32)),e+="_"}else i=hg++,e="_"+e+"r_"+i.toString(32)+"_";return t.memoizedState=e},useHostTransitionStatus:vc,useFormState:zh,useActionState:zh,useOptimistic:function(t){var e=Ge();e.memoizedState=e.baseState=t;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return e.queue=i,e=_c.bind(null,Ct,!0,i),i.dispatch=e,[t,e]},useMemoCache:rc,useCacheRefresh:function(){return Ge().memoizedState=_g.bind(null,Ct)},useEffectEvent:function(t){var e=Ge(),i={impl:t};return e.memoizedState=i,function(){if((Qt&2)!==0)throw Error(c(440));return i.impl.apply(void 0,arguments)}}},yc={readContext:Re,use:_r,useCallback:jh,useContext:Re,useEffect:dc,useImperativeHandle:Dh,useInsertionEffect:Mh,useLayoutEffect:Ah,useMemo:Bh,useReducer:yr,useRef:Ch,useState:function(){return yr(bi)},useDebugValue:mc,useDeferredValue:function(t,e){var i=ge();return Uh(i,$t.memoizedState,t,e)},useTransition:function(){var t=yr(bi)[0],e=ge().memoizedState;return[typeof t=="boolean"?t:Kl(t),e]},useSyncExternalStore:hh,useId:kh,useHostTransitionStatus:vc,useFormState:Th,useActionState:Th,useOptimistic:function(t,e){var i=ge();return _h(i,$t,t,e)},useMemoCache:rc,useCacheRefresh:qh};yc.useEffectEvent=Oh;var Kh={readContext:Re,use:_r,useCallback:jh,useContext:Re,useEffect:dc,useImperativeHandle:Dh,useInsertionEffect:Mh,useLayoutEffect:Ah,useMemo:Bh,useReducer:cc,useRef:Ch,useState:function(){return cc(bi)},useDebugValue:mc,useDeferredValue:function(t,e){var i=ge();return $t===null?pc(i,t,e):Uh(i,$t.memoizedState,t,e)},useTransition:function(){var t=cc(bi)[0],e=ge().memoizedState;return[typeof t=="boolean"?t:Kl(t),e]},useSyncExternalStore:hh,useId:kh,useHostTransitionStatus:vc,useFormState:Lh,useActionState:Lh,useOptimistic:function(t,e){var i=ge();return $t!==null?_h(i,$t,t,e):(i.baseState=t,[t,i.queue.dispatch])},useMemoCache:rc,useCacheRefresh:qh};Kh.useEffectEvent=Oh;function xc(t,e,i,s){e=t.memoizedState,i=i(s,e),i=i==null?e:E({},e,i),t.memoizedState=i,t.lanes===0&&(t.updateQueue.baseState=i)}var bc={enqueueSetState:function(t,e,i){t=t._reactInternals;var s=dn(),o=na(s);o.payload=e,i!=null&&(o.callback=i),e=ia(t,o,s),e!==null&&(nn(e,t,s),Yl(e,t,s))},enqueueReplaceState:function(t,e,i){t=t._reactInternals;var s=dn(),o=na(s);o.tag=1,o.payload=e,i!=null&&(o.callback=i),e=ia(t,o,s),e!==null&&(nn(e,t,s),Yl(e,t,s))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var i=dn(),s=na(i);s.tag=2,e!=null&&(s.callback=e),e=ia(t,s,i),e!==null&&(nn(e,t,i),Yl(e,t,i))}};function Qh(t,e,i,s,o,h,v){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(s,h,v):e.prototype&&e.prototype.isPureReactComponent?!Ji(i,s)||!Ji(o,h):!0}function Jh(t,e,i,s){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(i,s),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(i,s),e.state!==t&&bc.enqueueReplaceState(e,e.state,null)}function ss(t,e){var i=e;if("ref"in e){i={};for(var s in e)s!=="ref"&&(i[s]=e[s])}if(t=t.defaultProps){i===e&&(i=E({},i));for(var o in t)i[o]===void 0&&(i[o]=t[o])}return i}function Fh(t){Ka(t)}function Ih(t){console.error(t)}function Wh(t){Ka(t)}function wr(t,e){try{var i=t.onUncaughtError;i(e.value,{componentStack:e.stack})}catch(s){setTimeout(function(){throw s})}}function $h(t,e,i){try{var s=t.onCaughtError;s(i.value,{componentStack:i.stack,errorBoundary:e.tag===1?e.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function Sc(t,e,i){return i=na(i),i.tag=3,i.payload={element:null},i.callback=function(){wr(t,e)},i}function td(t){return t=na(t),t.tag=3,t}function ed(t,e,i,s){var o=i.type.getDerivedStateFromError;if(typeof o=="function"){var h=s.value;t.payload=function(){return o(h)},t.callback=function(){$h(e,i,s)}}var v=i.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(t.callback=function(){$h(e,i,s),typeof o!="function"&&(ua===null?ua=new Set([this]):ua.add(this));var w=s.stack;this.componentDidCatch(s.value,{componentStack:w!==null?w:""})})}function xg(t,e,i,s,o){if(i.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(e=i.alternate,e!==null&&Ds(e,i,o,!0),i=un.current,i!==null){switch(i.tag){case 31:case 13:return wn===null?jr():i.alternate===null&&me===0&&(me=3),i.flags&=-257,i.flags|=65536,i.lanes=o,s===cr?i.flags|=16384:(e=i.updateQueue,e===null?i.updateQueue=new Set([s]):e.add(s),Kc(t,s,o)),!1;case 22:return i.flags|=65536,s===cr?i.flags|=16384:(e=i.updateQueue,e===null?(e={transitions:null,markerInstances:null,retryQueue:new Set([s])},i.updateQueue=e):(i=e.retryQueue,i===null?e.retryQueue=new Set([s]):i.add(s)),Kc(t,s,o)),!1}throw Error(c(435,i.tag))}return Kc(t,s,o),jr(),!1}if(Bt)return e=un.current,e!==null?((e.flags&65536)===0&&(e.flags|=256),e.flags|=65536,e.lanes=o,s!==Rs&&(t=Error(c(422),{cause:s}),Ia(a(t,i)))):(s!==Rs&&(e=Error(c(423),{cause:s}),Ia(a(e,i))),t=t.current.alternate,t.flags|=65536,o&=-o,t.lanes|=o,s=a(s,i),o=Sc(t.stateNode,s,o),Wu(t,o),me!==4&&(me=2)),!1;var h=Error(c(520),{cause:s});if(h=a(h,i),io===null?io=[h]:io.push(h),me!==4&&(me=2),e===null)return!0;s=a(s,i),i=e;do{switch(i.tag){case 3:return i.flags|=65536,t=o&-o,i.lanes|=t,t=Sc(i.stateNode,s,t),Wu(i,t),!1;case 1:if(e=i.type,h=i.stateNode,(i.flags&128)===0&&(typeof e.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(ua===null||!ua.has(h))))return i.flags|=65536,o&=-o,i.lanes|=o,o=td(o),ed(o,t,i,s),Wu(i,o),!1}i=i.return}while(i!==null);return!1}var wc=Error(c(461)),be=!1;function De(t,e,i,s){e.child=t===null?sh(e,null,i,s):is(e,t.child,i,s)}function nd(t,e,i,s,o){i=i.render;var h=e.ref;if("ref"in s){var v={};for(var w in s)w!=="ref"&&(v[w]=s[w])}else v=s;return $a(e),s=ac(t,e,i,v,h,o),w=sc(),t!==null&&!be?(lc(t,e,o),Si(t,e,o)):(Bt&&w&&Te(e),e.flags|=1,De(t,e,s,o),e.child)}function id(t,e,i,s,o){if(t===null){var h=i.type;return typeof h=="function"&&!Ms(h)&&h.defaultProps===void 0&&i.compare===null?(e.tag=15,e.type=h,ad(t,e,h,s,o)):(t=Fa(i.type,null,s,e,e.mode,o),t.ref=e.ref,t.return=e,e.child=t)}if(h=t.child,!Mc(t,o)){var v=h.memoizedProps;if(i=i.compare,i=i!==null?i:Ji,i(v,s)&&t.ref===e.ref)return Si(t,e,o)}return e.flags|=1,t=Sn(h,s),t.ref=e.ref,t.return=e,e.child=t}function ad(t,e,i,s,o){if(t!==null){var h=t.memoizedProps;if(Ji(h,s)&&t.ref===e.ref)if(be=!1,e.pendingProps=s=h,Mc(t,o))(t.flags&131072)!==0&&(be=!0);else return e.lanes=t.lanes,Si(t,e,o)}return zc(t,e,i,s,o)}function sd(t,e,i,s){var o=s.children,h=t!==null?t.memoizedState:null;if(t===null&&e.stateNode===null&&(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((e.flags&128)!==0){if(h=h!==null?h.baseLanes|i:i,t!==null){for(s=e.child=t.child,o=0;s!==null;)o=o|s.lanes|s.childLanes,s=s.sibling;s=o&~h}else s=0,e.child=null;return ld(t,e,h,i,s)}if((i&536870912)!==0)e.memoizedState={baseLanes:0,cachePool:null},t!==null&&rr(e,h!==null?h.cachePool:null),h!==null?rh(e,h):tc(),uh(e);else return s=e.lanes=536870912,ld(t,e,h!==null?h.baseLanes|i:i,i,s)}else h!==null?(rr(e,h.cachePool),rh(e,h),sa(),e.memoizedState=null):(t!==null&&rr(e,null),tc(),sa());return De(t,e,o,i),e.child}function Fl(t,e){return t!==null&&t.tag===22||e.stateNode!==null||(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),e.sibling}function ld(t,e,i,s,o){var h=Qu();return h=h===null?null:{parent:ye._currentValue,pool:h},e.memoizedState={baseLanes:i,cachePool:h},t!==null&&rr(e,null),tc(),uh(e),t!==null&&Ds(t,e,s,!0),e.childLanes=o,null}function zr(t,e){return e=Er({mode:e.mode,children:e.children},t.mode),e.ref=t.ref,t.child=e,e.return=t,e}function od(t,e,i){return is(e,t.child,null,i),t=zr(e,e.pendingProps),t.flags|=2,cn(e),e.memoizedState=null,t}function bg(t,e,i){var s=e.pendingProps,o=(e.flags&128)!==0;if(e.flags&=-129,t===null){if(Bt){if(s.mode==="hidden")return t=zr(e,s),e.lanes=536870912,Fl(null,t);if(nc(e),(t=Vt)?(t=ym(t,Ie),t=t!==null&&t.data==="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:K!==null?{id:nt,overflow:ct}:null,retryLane:536870912,hydrationErrors:null},i=jl(t),i.return=e,e.child=i,Gt=e,Vt=null)):t=null,t===null)throw In(e);return e.lanes=536870912,null}return zr(e,s)}var h=t.memoizedState;if(h!==null){var v=h.dehydrated;if(nc(e),o)if(e.flags&256)e.flags&=-257,e=od(t,e,i);else if(e.memoizedState!==null)e.child=t.child,e.flags|=128,e=null;else throw Error(c(558));else if(be||Ds(t,e,i,!1),o=(i&t.childLanes)!==0,be||o){if(s=ie,s!==null&&(v=Do(s,i),v!==0&&v!==h.retryLane))throw h.retryLane=v,bn(t,v),nn(s,t,v),wc;jr(),e=od(t,e,i)}else t=h.treeContext,Vt=zn(v.nextSibling),Gt=e,Bt=!0,Fn=null,Ie=!1,t!==null&&Ye(e,t),e=zr(e,s),e.flags|=4096;return e}return t=Sn(t.child,{mode:s.mode,children:s.children}),t.ref=e.ref,e.child=t,t.return=e,t}function Tr(t,e){var i=e.ref;if(i===null)t!==null&&t.ref!==null&&(e.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(c(284));(t===null||t.ref!==i)&&(e.flags|=4194816)}}function zc(t,e,i,s,o){return $a(e),i=ac(t,e,i,s,void 0,o),s=sc(),t!==null&&!be?(lc(t,e,o),Si(t,e,o)):(Bt&&s&&Te(e),e.flags|=1,De(t,e,i,o),e.child)}function rd(t,e,i,s,o,h){return $a(e),e.updateQueue=null,i=fh(e,s,i,o),ch(t),s=sc(),t!==null&&!be?(lc(t,e,h),Si(t,e,h)):(Bt&&s&&Te(e),e.flags|=1,De(t,e,i,h),e.child)}function ud(t,e,i,s,o){if($a(e),e.stateNode===null){var h=gi,v=i.contextType;typeof v=="object"&&v!==null&&(h=Re(v)),h=new i(s,h),e.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=bc,e.stateNode=h,h._reactInternals=e,h=e.stateNode,h.props=s,h.state=e.memoizedState,h.refs={},Fu(e),v=i.contextType,h.context=typeof v=="object"&&v!==null?Re(v):gi,h.state=e.memoizedState,v=i.getDerivedStateFromProps,typeof v=="function"&&(xc(e,i,v,s),h.state=e.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(v=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),v!==h.state&&bc.enqueueReplaceState(h,h.state,null),Vl(e,s,h,o),Gl(),h.state=e.memoizedState),typeof h.componentDidMount=="function"&&(e.flags|=4194308),s=!0}else if(t===null){h=e.stateNode;var w=e.memoizedProps,R=ss(i,w);h.props=R;var G=h.context,W=i.contextType;v=gi,typeof W=="object"&&W!==null&&(v=Re(W));var it=i.getDerivedStateFromProps;W=typeof it=="function"||typeof h.getSnapshotBeforeUpdate=="function",w=e.pendingProps!==w,W||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(w||G!==v)&&Jh(e,h,s,v),ea=!1;var Q=e.memoizedState;h.state=Q,Vl(e,s,h,o),Gl(),G=e.memoizedState,w||Q!==G||ea?(typeof it=="function"&&(xc(e,i,it,s),G=e.memoizedState),(R=ea||Qh(e,i,R,s,Q,G,v))?(W||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount()),typeof h.componentDidMount=="function"&&(e.flags|=4194308)):(typeof h.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=s,e.memoizedState=G),h.props=s,h.state=G,h.context=v,s=R):(typeof h.componentDidMount=="function"&&(e.flags|=4194308),s=!1)}else{h=e.stateNode,Iu(t,e),v=e.memoizedProps,W=ss(i,v),h.props=W,it=e.pendingProps,Q=h.context,G=i.contextType,R=gi,typeof G=="object"&&G!==null&&(R=Re(G)),w=i.getDerivedStateFromProps,(G=typeof w=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(v!==it||Q!==R)&&Jh(e,h,s,R),ea=!1,Q=e.memoizedState,h.state=Q,Vl(e,s,h,o),Gl();var J=e.memoizedState;v!==it||Q!==J||ea||t!==null&&t.dependencies!==null&&lr(t.dependencies)?(typeof w=="function"&&(xc(e,i,w,s),J=e.memoizedState),(W=ea||Qh(e,i,W,s,Q,J,R)||t!==null&&t.dependencies!==null&&lr(t.dependencies))?(G||typeof h.UNSAFE_componentWillUpdate!="function"&&typeof h.componentWillUpdate!="function"||(typeof h.componentWillUpdate=="function"&&h.componentWillUpdate(s,J,R),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(s,J,R)),typeof h.componentDidUpdate=="function"&&(e.flags|=4),typeof h.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof h.componentDidUpdate!="function"||v===t.memoizedProps&&Q===t.memoizedState||(e.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||v===t.memoizedProps&&Q===t.memoizedState||(e.flags|=1024),e.memoizedProps=s,e.memoizedState=J),h.props=s,h.state=J,h.context=R,s=W):(typeof h.componentDidUpdate!="function"||v===t.memoizedProps&&Q===t.memoizedState||(e.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||v===t.memoizedProps&&Q===t.memoizedState||(e.flags|=1024),s=!1)}return h=s,Tr(t,e),s=(e.flags&128)!==0,h||s?(h=e.stateNode,i=s&&typeof i.getDerivedStateFromError!="function"?null:h.render(),e.flags|=1,t!==null&&s?(e.child=is(e,t.child,null,o),e.child=is(e,null,i,o)):De(t,e,i,o),e.memoizedState=h.state,t=e.child):t=Si(t,e,o),t}function cd(t,e,i,s){return _i(),e.flags|=256,De(t,e,i,s),e.child}var Tc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ec(t){return{baseLanes:t,cachePool:$f()}}function Lc(t,e,i){return t=t!==null?t.childLanes&~i:0,e&&(t|=hn),t}function fd(t,e,i){var s=e.pendingProps,o=!1,h=(e.flags&128)!==0,v;if((v=h)||(v=t!==null&&t.memoizedState===null?!1:(pe.current&2)!==0),v&&(o=!0,e.flags&=-129),v=(e.flags&32)!==0,e.flags&=-33,t===null){if(Bt){if(o?aa(e):sa(),(t=Vt)?(t=ym(t,Ie),t=t!==null&&t.data!=="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:K!==null?{id:nt,overflow:ct}:null,retryLane:536870912,hydrationErrors:null},i=jl(t),i.return=e,e.child=i,Gt=e,Vt=null)):t=null,t===null)throw In(e);return cf(t)?e.lanes=32:e.lanes=536870912,null}var w=s.children;return s=s.fallback,o?(sa(),o=e.mode,w=Er({mode:"hidden",children:w},o),s=vi(s,o,i,null),w.return=e,s.return=e,w.sibling=s,e.child=w,s=e.child,s.memoizedState=Ec(i),s.childLanes=Lc(t,v,i),e.memoizedState=Tc,Fl(null,s)):(aa(e),Cc(e,w))}var R=t.memoizedState;if(R!==null&&(w=R.dehydrated,w!==null)){if(h)e.flags&256?(aa(e),e.flags&=-257,e=Nc(t,e,i)):e.memoizedState!==null?(sa(),e.child=t.child,e.flags|=128,e=null):(sa(),w=s.fallback,o=e.mode,s=Er({mode:"visible",children:s.children},o),w=vi(w,o,i,null),w.flags|=2,s.return=e,w.return=e,s.sibling=w,e.child=s,is(e,t.child,null,i),s=e.child,s.memoizedState=Ec(i),s.childLanes=Lc(t,v,i),e.memoizedState=Tc,e=Fl(null,s));else if(aa(e),cf(w)){if(v=w.nextSibling&&w.nextSibling.dataset,v)var G=v.dgst;v=G,s=Error(c(419)),s.stack="",s.digest=v,Ia({value:s,source:null,stack:null}),e=Nc(t,e,i)}else if(be||Ds(t,e,i,!1),v=(i&t.childLanes)!==0,be||v){if(v=ie,v!==null&&(s=Do(v,i),s!==0&&s!==R.retryLane))throw R.retryLane=s,bn(t,s),nn(v,t,s),wc;uf(w)||jr(),e=Nc(t,e,i)}else uf(w)?(e.flags|=192,e.child=t.child,e=null):(t=R.treeContext,Vt=zn(w.nextSibling),Gt=e,Bt=!0,Fn=null,Ie=!1,t!==null&&Ye(e,t),e=Cc(e,s.children),e.flags|=4096);return e}return o?(sa(),w=s.fallback,o=e.mode,R=t.child,G=R.sibling,s=Sn(R,{mode:"hidden",children:s.children}),s.subtreeFlags=R.subtreeFlags&65011712,G!==null?w=Sn(G,w):(w=vi(w,o,i,null),w.flags|=2),w.return=e,s.return=e,s.sibling=w,e.child=s,Fl(null,s),s=e.child,w=t.child.memoizedState,w===null?w=Ec(i):(o=w.cachePool,o!==null?(R=ye._currentValue,o=o.parent!==R?{parent:R,pool:R}:o):o=$f(),w={baseLanes:w.baseLanes|i,cachePool:o}),s.memoizedState=w,s.childLanes=Lc(t,v,i),e.memoizedState=Tc,Fl(t.child,s)):(aa(e),i=t.child,t=i.sibling,i=Sn(i,{mode:"visible",children:s.children}),i.return=e,i.sibling=null,t!==null&&(v=e.deletions,v===null?(e.deletions=[t],e.flags|=16):v.push(t)),e.child=i,e.memoizedState=null,i)}function Cc(t,e){return e=Er({mode:"visible",children:e},t.mode),e.return=t,t.child=e}function Er(t,e){return t=Ue(22,t,null,e),t.lanes=0,t}function Nc(t,e,i){return is(e,t.child,null,i),t=Cc(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function hd(t,e,i){t.lanes|=e;var s=t.alternate;s!==null&&(s.lanes|=e),Gu(t.return,e,i)}function Oc(t,e,i,s,o,h){var v=t.memoizedState;v===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:o,treeForkCount:h}:(v.isBackwards=e,v.rendering=null,v.renderingStartTime=0,v.last=s,v.tail=i,v.tailMode=o,v.treeForkCount=h)}function dd(t,e,i){var s=e.pendingProps,o=s.revealOrder,h=s.tail;s=s.children;var v=pe.current,w=(v&2)!==0;if(w?(v=v&1|2,e.flags|=128):v&=1,$(pe,v),De(t,e,s,i),s=Bt?S:0,!w&&t!==null&&(t.flags&128)!==0)t:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&hd(t,i,e);else if(t.tag===19)hd(t,i,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break t;for(;t.sibling===null;){if(t.return===null||t.return===e)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(o){case"forwards":for(i=e.child,o=null;i!==null;)t=i.alternate,t!==null&&mr(t)===null&&(o=i),i=i.sibling;i=o,i===null?(o=e.child,e.child=null):(o=i.sibling,i.sibling=null),Oc(e,!1,o,i,h,s);break;case"backwards":case"unstable_legacy-backwards":for(i=null,o=e.child,e.child=null;o!==null;){if(t=o.alternate,t!==null&&mr(t)===null){e.child=o;break}t=o.sibling,o.sibling=i,i=o,o=t}Oc(e,!0,i,null,h,s);break;case"together":Oc(e,!1,null,null,void 0,s);break;default:e.memoizedState=null}return e.child}function Si(t,e,i){if(t!==null&&(e.dependencies=t.dependencies),ra|=e.lanes,(i&e.childLanes)===0)if(t!==null){if(Ds(t,e,i,!1),(i&e.childLanes)===0)return null}else return null;if(t!==null&&e.child!==t.child)throw Error(c(153));if(e.child!==null){for(t=e.child,i=Sn(t,t.pendingProps),e.child=i,i.return=e;t.sibling!==null;)t=t.sibling,i=i.sibling=Sn(t,t.pendingProps),i.return=e;i.sibling=null}return e.child}function Mc(t,e){return(t.lanes&e)!==0?!0:(t=t.dependencies,!!(t!==null&&lr(t)))}function Sg(t,e,i){switch(e.tag){case 3:Ot(e,e.stateNode.containerInfo),ta(e,ye,t.memoizedState.cache),_i();break;case 27:case 5:we(e);break;case 4:Ot(e,e.stateNode.containerInfo);break;case 10:ta(e,e.type,e.memoizedProps.value);break;case 31:if(e.memoizedState!==null)return e.flags|=128,nc(e),null;break;case 13:var s=e.memoizedState;if(s!==null)return s.dehydrated!==null?(aa(e),e.flags|=128,null):(i&e.child.childLanes)!==0?fd(t,e,i):(aa(e),t=Si(t,e,i),t!==null?t.sibling:null);aa(e);break;case 19:var o=(t.flags&128)!==0;if(s=(i&e.childLanes)!==0,s||(Ds(t,e,i,!1),s=(i&e.childLanes)!==0),o){if(s)return dd(t,e,i);e.flags|=128}if(o=e.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),$(pe,pe.current),s)break;return null;case 22:return e.lanes=0,sd(t,e,i,e.pendingProps);case 24:ta(e,ye,t.memoizedState.cache)}return Si(t,e,i)}function md(t,e,i){if(t!==null)if(t.memoizedProps!==e.pendingProps)be=!0;else{if(!Mc(t,i)&&(e.flags&128)===0)return be=!1,Sg(t,e,i);be=(t.flags&131072)!==0}else be=!1,Bt&&(e.flags&1048576)!==0&&Mt(e,S,e.index);switch(e.lanes=0,e.tag){case 16:t:{var s=e.pendingProps;if(t=es(e.elementType),e.type=t,typeof t=="function")Ms(t)?(s=ss(t,s),e.tag=1,e=ud(null,e,t,s,i)):(e.tag=0,e=zc(null,e,t,s,i));else{if(t!=null){var o=t.$$typeof;if(o===F){e.tag=11,e=nd(null,e,t,s,i);break t}else if(o===ft){e.tag=14,e=id(null,e,t,s,i);break t}}throw e=Rt(t)||t,Error(c(306,e,""))}}return e;case 0:return zc(t,e,e.type,e.pendingProps,i);case 1:return s=e.type,o=ss(s,e.pendingProps),ud(t,e,s,o,i);case 3:t:{if(Ot(e,e.stateNode.containerInfo),t===null)throw Error(c(387));s=e.pendingProps;var h=e.memoizedState;o=h.element,Iu(t,e),Vl(e,s,null,i);var v=e.memoizedState;if(s=v.cache,ta(e,ye,s),s!==h.cache&&Vu(e,[ye],i,!0),Gl(),s=v.element,h.isDehydrated)if(h={element:s,isDehydrated:!1,cache:v.cache},e.updateQueue.baseState=h,e.memoizedState=h,e.flags&256){e=cd(t,e,s,i);break t}else if(s!==o){o=a(Error(c(424)),e),Ia(o),e=cd(t,e,s,i);break t}else{switch(t=e.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(Vt=zn(t.firstChild),Gt=e,Bt=!0,Fn=null,Ie=!0,i=sh(e,null,s,i),e.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(_i(),s===o){e=Si(t,e,i);break t}De(t,e,s,i)}e=e.child}return e;case 26:return Tr(t,e),t===null?(i=Tm(e.type,null,e.pendingProps,null))?e.memoizedState=i:Bt||(i=e.type,t=e.pendingProps,s=qr(rt.current).createElement(i),s[ve]=e,s[Le]=t,je(s,i,t),_e(s),e.stateNode=s):e.memoizedState=Tm(e.type,t.memoizedProps,e.pendingProps,t.memoizedState),null;case 27:return we(e),t===null&&Bt&&(s=e.stateNode=Sm(e.type,e.pendingProps,rt.current),Gt=e,Ie=!0,o=Vt,da(e.type)?(ff=o,Vt=zn(s.firstChild)):Vt=o),De(t,e,e.pendingProps.children,i),Tr(t,e),t===null&&(e.flags|=4194304),e.child;case 5:return t===null&&Bt&&((o=s=Vt)&&(s=Wg(s,e.type,e.pendingProps,Ie),s!==null?(e.stateNode=s,Gt=e,Vt=zn(s.firstChild),Ie=!1,o=!0):o=!1),o||In(e)),we(e),o=e.type,h=e.pendingProps,v=t!==null?t.memoizedProps:null,s=h.children,lf(o,h)?s=null:v!==null&&lf(o,v)&&(e.flags|=32),e.memoizedState!==null&&(o=ac(t,e,dg,null,null,i),fo._currentValue=o),Tr(t,e),De(t,e,s,i),e.child;case 6:return t===null&&Bt&&((t=i=Vt)&&(i=$g(i,e.pendingProps,Ie),i!==null?(e.stateNode=i,Gt=e,Vt=null,t=!0):t=!1),t||In(e)),null;case 13:return fd(t,e,i);case 4:return Ot(e,e.stateNode.containerInfo),s=e.pendingProps,t===null?e.child=is(e,null,s,i):De(t,e,s,i),e.child;case 11:return nd(t,e,e.type,e.pendingProps,i);case 7:return De(t,e,e.pendingProps,i),e.child;case 8:return De(t,e,e.pendingProps.children,i),e.child;case 12:return De(t,e,e.pendingProps.children,i),e.child;case 10:return s=e.pendingProps,ta(e,e.type,s.value),De(t,e,s.children,i),e.child;case 9:return o=e.type._context,s=e.pendingProps.children,$a(e),o=Re(o),s=s(o),e.flags|=1,De(t,e,s,i),e.child;case 14:return id(t,e,e.type,e.pendingProps,i);case 15:return ad(t,e,e.type,e.pendingProps,i);case 19:return dd(t,e,i);case 31:return bg(t,e,i);case 22:return sd(t,e,i,e.pendingProps);case 24:return $a(e),s=Re(ye),t===null?(o=Qu(),o===null&&(o=ie,h=Xu(),o.pooledCache=h,h.refCount++,h!==null&&(o.pooledCacheLanes|=i),o=h),e.memoizedState={parent:s,cache:o},Fu(e),ta(e,ye,o)):((t.lanes&i)!==0&&(Iu(t,e),Vl(e,null,null,i),Gl()),o=t.memoizedState,h=e.memoizedState,o.parent!==s?(o={parent:s,cache:s},e.memoizedState=o,e.lanes===0&&(e.memoizedState=e.updateQueue.baseState=o),ta(e,ye,s)):(s=h.cache,ta(e,ye,s),s!==o.cache&&Vu(e,[ye],i,!0))),De(t,e,e.pendingProps.children,i),e.child;case 29:throw e.pendingProps}throw Error(c(156,e.tag))}function wi(t){t.flags|=4}function Ac(t,e,i,s,o){if((e=(t.mode&32)!==0)&&(e=!1),e){if(t.flags|=16777216,(o&335544128)===o)if(t.stateNode.complete)t.flags|=8192;else if(kd())t.flags|=8192;else throw ns=cr,Ju}else t.flags&=-16777217}function pd(t,e){if(e.type!=="stylesheet"||(e.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Om(e))if(kd())t.flags|=8192;else throw ns=cr,Ju}function Lr(t,e){e!==null&&(t.flags|=4),t.flags&16384&&(e=t.tag!==22?Mo():536870912,t.lanes|=e,Xs|=e)}function Il(t,e){if(!Bt)switch(t.tailMode){case"hidden":e=t.tail;for(var i=null;e!==null;)e.alternate!==null&&(i=e),e=e.sibling;i===null?t.tail=null:i.sibling=null;break;case"collapsed":i=t.tail;for(var s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:s.sibling=null}}function se(t){var e=t.alternate!==null&&t.alternate.child===t.child,i=0,s=0;if(e)for(var o=t.child;o!==null;)i|=o.lanes|o.childLanes,s|=o.subtreeFlags&65011712,s|=o.flags&65011712,o.return=t,o=o.sibling;else for(o=t.child;o!==null;)i|=o.lanes|o.childLanes,s|=o.subtreeFlags,s|=o.flags,o.return=t,o=o.sibling;return t.subtreeFlags|=s,t.childLanes=i,e}function wg(t,e,i){var s=e.pendingProps;switch(he(e),e.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return se(e),null;case 1:return se(e),null;case 3:return i=e.stateNode,s=null,t!==null&&(s=t.memoizedState.cache),e.memoizedState.cache!==s&&(e.flags|=2048),yi(ye),Yt(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(t===null||t.child===null)&&(Dn(e)?wi(e):t===null||t.memoizedState.isDehydrated&&(e.flags&256)===0||(e.flags|=1024,Hl())),se(e),null;case 26:var o=e.type,h=e.memoizedState;return t===null?(wi(e),h!==null?(se(e),pd(e,h)):(se(e),Ac(e,o,null,s,i))):h?h!==t.memoizedState?(wi(e),se(e),pd(e,h)):(se(e),e.flags&=-16777217):(t=t.memoizedProps,t!==s&&wi(e),se(e),Ac(e,o,t,s,i)),null;case 27:if(an(e),i=rt.current,o=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==s&&wi(e);else{if(!s){if(e.stateNode===null)throw Error(c(166));return se(e),null}t=lt.current,Dn(e)?Ul(e):(t=Sm(o,s,i),e.stateNode=t,wi(e))}return se(e),null;case 5:if(an(e),o=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==s&&wi(e);else{if(!s){if(e.stateNode===null)throw Error(c(166));return se(e),null}if(h=lt.current,Dn(e))Ul(e);else{var v=qr(rt.current);switch(h){case 1:h=v.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:h=v.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":h=v.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":h=v.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":h=v.createElement("div"),h.innerHTML="<script><\/script>",h=h.removeChild(h.firstChild);break;case"select":h=typeof s.is=="string"?v.createElement("select",{is:s.is}):v.createElement("select"),s.multiple?h.multiple=!0:s.size&&(h.size=s.size);break;default:h=typeof s.is=="string"?v.createElement(o,{is:s.is}):v.createElement(o)}}h[ve]=e,h[Le]=s;t:for(v=e.child;v!==null;){if(v.tag===5||v.tag===6)h.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===e)break t;for(;v.sibling===null;){if(v.return===null||v.return===e)break t;v=v.return}v.sibling.return=v.return,v=v.sibling}e.stateNode=h;t:switch(je(h,o,s),o){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break t;case"img":s=!0;break t;default:s=!1}s&&wi(e)}}return se(e),Ac(e,e.type,t===null?null:t.memoizedProps,e.pendingProps,i),null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==s&&wi(e);else{if(typeof s!="string"&&e.stateNode===null)throw Error(c(166));if(t=rt.current,Dn(e)){if(t=e.stateNode,i=e.memoizedProps,s=null,o=Gt,o!==null)switch(o.tag){case 27:case 5:s=o.memoizedProps}t[ve]=e,t=!!(t.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||fm(t.nodeValue,i)),t||In(e,!0)}else t=qr(t).createTextNode(s),t[ve]=e,e.stateNode=t}return se(e),null;case 31:if(i=e.memoizedState,t===null||t.memoizedState!==null){if(s=Dn(e),i!==null){if(t===null){if(!s)throw Error(c(318));if(t=e.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(c(557));t[ve]=e}else _i(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;se(e),t=!1}else i=Hl(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=i),t=!0;if(!t)return e.flags&256?(cn(e),e):(cn(e),null);if((e.flags&128)!==0)throw Error(c(558))}return se(e),null;case 13:if(s=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(o=Dn(e),s!==null&&s.dehydrated!==null){if(t===null){if(!o)throw Error(c(318));if(o=e.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(c(317));o[ve]=e}else _i(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;se(e),o=!1}else o=Hl(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=o),o=!0;if(!o)return e.flags&256?(cn(e),e):(cn(e),null)}return cn(e),(e.flags&128)!==0?(e.lanes=i,e):(i=s!==null,t=t!==null&&t.memoizedState!==null,i&&(s=e.child,o=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(o=s.alternate.memoizedState.cachePool.pool),h=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(h=s.memoizedState.cachePool.pool),h!==o&&(s.flags|=2048)),i!==t&&i&&(e.child.flags|=8192),Lr(e,e.updateQueue),se(e),null);case 4:return Yt(),t===null&&tf(e.stateNode.containerInfo),se(e),null;case 10:return yi(e.type),se(e),null;case 19:if(X(pe),s=e.memoizedState,s===null)return se(e),null;if(o=(e.flags&128)!==0,h=s.rendering,h===null)if(o)Il(s,!1);else{if(me!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(h=mr(t),h!==null){for(e.flags|=128,Il(s,!1),t=h.updateQueue,e.updateQueue=t,Lr(e,t),e.subtreeFlags=0,t=i,i=e.child;i!==null;)Dl(i,t),i=i.sibling;return $(pe,pe.current&1|2),Bt&&yt(e,s.treeForkCount),e.child}t=t.sibling}s.tail!==null&&Pe()>Ar&&(e.flags|=128,o=!0,Il(s,!1),e.lanes=4194304)}else{if(!o)if(t=mr(h),t!==null){if(e.flags|=128,o=!0,t=t.updateQueue,e.updateQueue=t,Lr(e,t),Il(s,!0),s.tail===null&&s.tailMode==="hidden"&&!h.alternate&&!Bt)return se(e),null}else 2*Pe()-s.renderingStartTime>Ar&&i!==536870912&&(e.flags|=128,o=!0,Il(s,!1),e.lanes=4194304);s.isBackwards?(h.sibling=e.child,e.child=h):(t=s.last,t!==null?t.sibling=h:e.child=h,s.last=h)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Pe(),t.sibling=null,i=pe.current,$(pe,o?i&1|2:i&1),Bt&&yt(e,s.treeForkCount),t):(se(e),null);case 22:case 23:return cn(e),ec(),s=e.memoizedState!==null,t!==null?t.memoizedState!==null!==s&&(e.flags|=8192):s&&(e.flags|=8192),s?(i&536870912)!==0&&(e.flags&128)===0&&(se(e),e.subtreeFlags&6&&(e.flags|=8192)):se(e),i=e.updateQueue,i!==null&&Lr(e,i.retryQueue),i=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),s=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),s!==i&&(e.flags|=2048),t!==null&&X(ts),null;case 24:return i=null,t!==null&&(i=t.memoizedState.cache),e.memoizedState.cache!==i&&(e.flags|=2048),yi(ye),se(e),null;case 25:return null;case 30:return null}throw Error(c(156,e.tag))}function zg(t,e){switch(he(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return yi(ye),Yt(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return an(e),null;case 31:if(e.memoizedState!==null){if(cn(e),e.alternate===null)throw Error(c(340));_i()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 13:if(cn(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(c(340));_i()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return X(pe),null;case 4:return Yt(),null;case 10:return yi(e.type),null;case 22:case 23:return cn(e),ec(),t!==null&&X(ts),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return yi(ye),null;case 25:return null;default:return null}}function gd(t,e){switch(he(e),e.tag){case 3:yi(ye),Yt();break;case 26:case 27:case 5:an(e);break;case 4:Yt();break;case 31:e.memoizedState!==null&&cn(e);break;case 13:cn(e);break;case 19:X(pe);break;case 10:yi(e.type);break;case 22:case 23:cn(e),ec(),t!==null&&X(ts);break;case 24:yi(ye)}}function Wl(t,e){try{var i=e.updateQueue,s=i!==null?i.lastEffect:null;if(s!==null){var o=s.next;i=o;do{if((i.tag&t)===t){s=void 0;var h=i.create,v=i.inst;s=h(),v.destroy=s}i=i.next}while(i!==o)}}catch(w){It(e,e.return,w)}}function la(t,e,i){try{var s=e.updateQueue,o=s!==null?s.lastEffect:null;if(o!==null){var h=o.next;s=h;do{if((s.tag&t)===t){var v=s.inst,w=v.destroy;if(w!==void 0){v.destroy=void 0,o=e;var R=i,G=w;try{G()}catch(W){It(o,R,W)}}}s=s.next}while(s!==h)}}catch(W){It(e,e.return,W)}}function vd(t){var e=t.updateQueue;if(e!==null){var i=t.stateNode;try{oh(e,i)}catch(s){It(t,t.return,s)}}}function _d(t,e,i){i.props=ss(t.type,t.memoizedProps),i.state=t.memoizedState;try{i.componentWillUnmount()}catch(s){It(t,e,s)}}function $l(t,e){try{var i=t.ref;if(i!==null){switch(t.tag){case 26:case 27:case 5:var s=t.stateNode;break;case 30:s=t.stateNode;break;default:s=t.stateNode}typeof i=="function"?t.refCleanup=i(s):i.current=s}}catch(o){It(t,e,o)}}function $n(t,e){var i=t.ref,s=t.refCleanup;if(i!==null)if(typeof s=="function")try{s()}catch(o){It(t,e,o)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(o){It(t,e,o)}else i.current=null}function yd(t){var e=t.type,i=t.memoizedProps,s=t.stateNode;try{t:switch(e){case"button":case"input":case"select":case"textarea":i.autoFocus&&s.focus();break t;case"img":i.src?s.src=i.src:i.srcSet&&(s.srcset=i.srcSet)}}catch(o){It(t,t.return,o)}}function Rc(t,e,i){try{var s=t.stateNode;Xg(s,t.type,i,e),s[Le]=e}catch(o){It(t,t.return,o)}}function xd(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&da(t.type)||t.tag===4}function Dc(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||xd(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&da(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function jc(t,e,i){var s=t.tag;if(s===5||s===6)t=t.stateNode,e?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(t,e):(e=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,e.appendChild(t),i=i._reactRootContainer,i!=null||e.onclick!==null||(e.onclick=Ke));else if(s!==4&&(s===27&&da(t.type)&&(i=t.stateNode,e=null),t=t.child,t!==null))for(jc(t,e,i),t=t.sibling;t!==null;)jc(t,e,i),t=t.sibling}function Cr(t,e,i){var s=t.tag;if(s===5||s===6)t=t.stateNode,e?i.insertBefore(t,e):i.appendChild(t);else if(s!==4&&(s===27&&da(t.type)&&(i=t.stateNode),t=t.child,t!==null))for(Cr(t,e,i),t=t.sibling;t!==null;)Cr(t,e,i),t=t.sibling}function bd(t){var e=t.stateNode,i=t.memoizedProps;try{for(var s=t.type,o=e.attributes;o.length;)e.removeAttributeNode(o[0]);je(e,s,i),e[ve]=t,e[Le]=i}catch(h){It(t,t.return,h)}}var zi=!1,Se=!1,Bc=!1,Sd=typeof WeakSet=="function"?WeakSet:Set,Oe=null;function Tg(t,e){if(t=t.containerInfo,af=Jr,t=Ya(t),Vn(t)){if("selectionStart"in t)var i={start:t.selectionStart,end:t.selectionEnd};else t:{i=(i=t.ownerDocument)&&i.defaultView||window;var s=i.getSelection&&i.getSelection();if(s&&s.rangeCount!==0){i=s.anchorNode;var o=s.anchorOffset,h=s.focusNode;s=s.focusOffset;try{i.nodeType,h.nodeType}catch{i=null;break t}var v=0,w=-1,R=-1,G=0,W=0,it=t,Q=null;e:for(;;){for(var J;it!==i||o!==0&&it.nodeType!==3||(w=v+o),it!==h||s!==0&&it.nodeType!==3||(R=v+s),it.nodeType===3&&(v+=it.nodeValue.length),(J=it.firstChild)!==null;)Q=it,it=J;for(;;){if(it===t)break e;if(Q===i&&++G===o&&(w=v),Q===h&&++W===s&&(R=v),(J=it.nextSibling)!==null)break;it=Q,Q=it.parentNode}it=J}i=w===-1||R===-1?null:{start:w,end:R}}else i=null}i=i||{start:0,end:0}}else i=null;for(sf={focusedElem:t,selectionRange:i},Jr=!1,Oe=e;Oe!==null;)if(e=Oe,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Oe=t;else for(;Oe!==null;){switch(e=Oe,h=e.alternate,t=e.flags,e.tag){case 0:if((t&4)!==0&&(t=e.updateQueue,t=t!==null?t.events:null,t!==null))for(i=0;i<t.length;i++)o=t[i],o.ref.impl=o.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&h!==null){t=void 0,i=e,o=h.memoizedProps,h=h.memoizedState,s=i.stateNode;try{var dt=ss(i.type,o);t=s.getSnapshotBeforeUpdate(dt,h),s.__reactInternalSnapshotBeforeUpdate=t}catch(bt){It(i,i.return,bt)}}break;case 3:if((t&1024)!==0){if(t=e.stateNode.containerInfo,i=t.nodeType,i===9)rf(t);else if(i===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":rf(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(c(163))}if(t=e.sibling,t!==null){t.return=e.return,Oe=t;break}Oe=e.return}}function wd(t,e,i){var s=i.flags;switch(i.tag){case 0:case 11:case 15:Ei(t,i),s&4&&Wl(5,i);break;case 1:if(Ei(t,i),s&4)if(t=i.stateNode,e===null)try{t.componentDidMount()}catch(v){It(i,i.return,v)}else{var o=ss(i.type,e.memoizedProps);e=e.memoizedState;try{t.componentDidUpdate(o,e,t.__reactInternalSnapshotBeforeUpdate)}catch(v){It(i,i.return,v)}}s&64&&vd(i),s&512&&$l(i,i.return);break;case 3:if(Ei(t,i),s&64&&(t=i.updateQueue,t!==null)){if(e=null,i.child!==null)switch(i.child.tag){case 27:case 5:e=i.child.stateNode;break;case 1:e=i.child.stateNode}try{oh(t,e)}catch(v){It(i,i.return,v)}}break;case 27:e===null&&s&4&&bd(i);case 26:case 5:Ei(t,i),e===null&&s&4&&yd(i),s&512&&$l(i,i.return);break;case 12:Ei(t,i);break;case 31:Ei(t,i),s&4&&Ed(t,i);break;case 13:Ei(t,i),s&4&&Ld(t,i),s&64&&(t=i.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(i=Dg.bind(null,i),tv(t,i))));break;case 22:if(s=i.memoizedState!==null||zi,!s){e=e!==null&&e.memoizedState!==null||Se,o=zi;var h=Se;zi=s,(Se=e)&&!h?Li(t,i,(i.subtreeFlags&8772)!==0):Ei(t,i),zi=o,Se=h}break;case 30:break;default:Ei(t,i)}}function zd(t){var e=t.alternate;e!==null&&(t.alternate=null,zd(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&gl(e)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var oe=null,We=!1;function Ti(t,e,i){for(i=i.child;i!==null;)Td(t,e,i),i=i.sibling}function Td(t,e,i){if(Me&&typeof Me.onCommitFiberUnmount=="function")try{Me.onCommitFiberUnmount(ji,i)}catch{}switch(i.tag){case 26:Se||$n(i,e),Ti(t,e,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:Se||$n(i,e);var s=oe,o=We;da(i.type)&&(oe=i.stateNode,We=!1),Ti(t,e,i),ro(i.stateNode),oe=s,We=o;break;case 5:Se||$n(i,e);case 6:if(s=oe,o=We,oe=null,Ti(t,e,i),oe=s,We=o,oe!==null)if(We)try{(oe.nodeType===9?oe.body:oe.nodeName==="HTML"?oe.ownerDocument.body:oe).removeChild(i.stateNode)}catch(h){It(i,e,h)}else try{oe.removeChild(i.stateNode)}catch(h){It(i,e,h)}break;case 18:oe!==null&&(We?(t=oe,vm(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,i.stateNode),tl(t)):vm(oe,i.stateNode));break;case 4:s=oe,o=We,oe=i.stateNode.containerInfo,We=!0,Ti(t,e,i),oe=s,We=o;break;case 0:case 11:case 14:case 15:la(2,i,e),Se||la(4,i,e),Ti(t,e,i);break;case 1:Se||($n(i,e),s=i.stateNode,typeof s.componentWillUnmount=="function"&&_d(i,e,s)),Ti(t,e,i);break;case 21:Ti(t,e,i);break;case 22:Se=(s=Se)||i.memoizedState!==null,Ti(t,e,i),Se=s;break;default:Ti(t,e,i)}}function Ed(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{tl(t)}catch(i){It(e,e.return,i)}}}function Ld(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{tl(t)}catch(i){It(e,e.return,i)}}function Eg(t){switch(t.tag){case 31:case 13:case 19:var e=t.stateNode;return e===null&&(e=t.stateNode=new Sd),e;case 22:return t=t.stateNode,e=t._retryCache,e===null&&(e=t._retryCache=new Sd),e;default:throw Error(c(435,t.tag))}}function Nr(t,e){var i=Eg(t);e.forEach(function(s){if(!i.has(s)){i.add(s);var o=jg.bind(null,t,s);s.then(o,o)}})}function $e(t,e){var i=e.deletions;if(i!==null)for(var s=0;s<i.length;s++){var o=i[s],h=t,v=e,w=v;t:for(;w!==null;){switch(w.tag){case 27:if(da(w.type)){oe=w.stateNode,We=!1;break t}break;case 5:oe=w.stateNode,We=!1;break t;case 3:case 4:oe=w.stateNode.containerInfo,We=!0;break t}w=w.return}if(oe===null)throw Error(c(160));Td(h,v,o),oe=null,We=!1,h=o.alternate,h!==null&&(h.return=null),o.return=null}if(e.subtreeFlags&13886)for(e=e.child;e!==null;)Cd(e,t),e=e.sibling}var Bn=null;function Cd(t,e){var i=t.alternate,s=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:$e(e,t),tn(t),s&4&&(la(3,t,t.return),Wl(3,t),la(5,t,t.return));break;case 1:$e(e,t),tn(t),s&512&&(Se||i===null||$n(i,i.return)),s&64&&zi&&(t=t.updateQueue,t!==null&&(s=t.callbacks,s!==null&&(i=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=i===null?s:i.concat(s))));break;case 26:var o=Bn;if($e(e,t),tn(t),s&512&&(Se||i===null||$n(i,i.return)),s&4){var h=i!==null?i.memoizedState:null;if(s=t.memoizedState,i===null)if(s===null)if(t.stateNode===null){t:{s=t.type,i=t.memoizedProps,o=o.ownerDocument||o;e:switch(s){case"title":h=o.getElementsByTagName("title")[0],(!h||h[La]||h[ve]||h.namespaceURI==="http://www.w3.org/2000/svg"||h.hasAttribute("itemprop"))&&(h=o.createElement(s),o.head.insertBefore(h,o.querySelector("head > title"))),je(h,s,i),h[ve]=t,_e(h),s=h;break t;case"link":var v=Cm("link","href",o).get(s+(i.href||""));if(v){for(var w=0;w<v.length;w++)if(h=v[w],h.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&h.getAttribute("rel")===(i.rel==null?null:i.rel)&&h.getAttribute("title")===(i.title==null?null:i.title)&&h.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){v.splice(w,1);break e}}h=o.createElement(s),je(h,s,i),o.head.appendChild(h);break;case"meta":if(v=Cm("meta","content",o).get(s+(i.content||""))){for(w=0;w<v.length;w++)if(h=v[w],h.getAttribute("content")===(i.content==null?null:""+i.content)&&h.getAttribute("name")===(i.name==null?null:i.name)&&h.getAttribute("property")===(i.property==null?null:i.property)&&h.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&h.getAttribute("charset")===(i.charSet==null?null:i.charSet)){v.splice(w,1);break e}}h=o.createElement(s),je(h,s,i),o.head.appendChild(h);break;default:throw Error(c(468,s))}h[ve]=t,_e(h),s=h}t.stateNode=s}else Nm(o,t.type,t.stateNode);else t.stateNode=Lm(o,s,t.memoizedProps);else h!==s?(h===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):h.count--,s===null?Nm(o,t.type,t.stateNode):Lm(o,s,t.memoizedProps)):s===null&&t.stateNode!==null&&Rc(t,t.memoizedProps,i.memoizedProps)}break;case 27:$e(e,t),tn(t),s&512&&(Se||i===null||$n(i,i.return)),i!==null&&s&4&&Rc(t,t.memoizedProps,i.memoizedProps);break;case 5:if($e(e,t),tn(t),s&512&&(Se||i===null||$n(i,i.return)),t.flags&32){o=t.stateNode;try{pn(o,"")}catch(dt){It(t,t.return,dt)}}s&4&&t.stateNode!=null&&(o=t.memoizedProps,Rc(t,o,i!==null?i.memoizedProps:o)),s&1024&&(Bc=!0);break;case 6:if($e(e,t),tn(t),s&4){if(t.stateNode===null)throw Error(c(162));s=t.memoizedProps,i=t.stateNode;try{i.nodeValue=s}catch(dt){It(t,t.return,dt)}}break;case 3:if(Vr=null,o=Bn,Bn=Yr(e.containerInfo),$e(e,t),Bn=o,tn(t),s&4&&i!==null&&i.memoizedState.isDehydrated)try{tl(e.containerInfo)}catch(dt){It(t,t.return,dt)}Bc&&(Bc=!1,Nd(t));break;case 4:s=Bn,Bn=Yr(t.stateNode.containerInfo),$e(e,t),tn(t),Bn=s;break;case 12:$e(e,t),tn(t);break;case 31:$e(e,t),tn(t),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,Nr(t,s)));break;case 13:$e(e,t),tn(t),t.child.flags&8192&&t.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Mr=Pe()),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,Nr(t,s)));break;case 22:o=t.memoizedState!==null;var R=i!==null&&i.memoizedState!==null,G=zi,W=Se;if(zi=G||o,Se=W||R,$e(e,t),Se=W,zi=G,tn(t),s&8192)t:for(e=t.stateNode,e._visibility=o?e._visibility&-2:e._visibility|1,o&&(i===null||R||zi||Se||ls(t)),i=null,e=t;;){if(e.tag===5||e.tag===26){if(i===null){R=i=e;try{if(h=R.stateNode,o)v=h.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{w=R.stateNode;var it=R.memoizedProps.style,Q=it!=null&&it.hasOwnProperty("display")?it.display:null;w.style.display=Q==null||typeof Q=="boolean"?"":(""+Q).trim()}}catch(dt){It(R,R.return,dt)}}}else if(e.tag===6){if(i===null){R=e;try{R.stateNode.nodeValue=o?"":R.memoizedProps}catch(dt){It(R,R.return,dt)}}}else if(e.tag===18){if(i===null){R=e;try{var J=R.stateNode;o?_m(J,!0):_m(R.stateNode,!1)}catch(dt){It(R,R.return,dt)}}}else if((e.tag!==22&&e.tag!==23||e.memoizedState===null||e===t)&&e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break t;for(;e.sibling===null;){if(e.return===null||e.return===t)break t;i===e&&(i=null),e=e.return}i===e&&(i=null),e.sibling.return=e.return,e=e.sibling}s&4&&(s=t.updateQueue,s!==null&&(i=s.retryQueue,i!==null&&(s.retryQueue=null,Nr(t,i))));break;case 19:$e(e,t),tn(t),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,Nr(t,s)));break;case 30:break;case 21:break;default:$e(e,t),tn(t)}}function tn(t){var e=t.flags;if(e&2){try{for(var i,s=t.return;s!==null;){if(xd(s)){i=s;break}s=s.return}if(i==null)throw Error(c(160));switch(i.tag){case 27:var o=i.stateNode,h=Dc(t);Cr(t,h,o);break;case 5:var v=i.stateNode;i.flags&32&&(pn(v,""),i.flags&=-33);var w=Dc(t);Cr(t,w,v);break;case 3:case 4:var R=i.stateNode.containerInfo,G=Dc(t);jc(t,G,R);break;default:throw Error(c(161))}}catch(W){It(t,t.return,W)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function Nd(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var e=t;Nd(e),e.tag===5&&e.flags&1024&&e.stateNode.reset(),t=t.sibling}}function Ei(t,e){if(e.subtreeFlags&8772)for(e=e.child;e!==null;)wd(t,e.alternate,e),e=e.sibling}function ls(t){for(t=t.child;t!==null;){var e=t;switch(e.tag){case 0:case 11:case 14:case 15:la(4,e,e.return),ls(e);break;case 1:$n(e,e.return);var i=e.stateNode;typeof i.componentWillUnmount=="function"&&_d(e,e.return,i),ls(e);break;case 27:ro(e.stateNode);case 26:case 5:$n(e,e.return),ls(e);break;case 22:e.memoizedState===null&&ls(e);break;case 30:ls(e);break;default:ls(e)}t=t.sibling}}function Li(t,e,i){for(i=i&&(e.subtreeFlags&8772)!==0,e=e.child;e!==null;){var s=e.alternate,o=t,h=e,v=h.flags;switch(h.tag){case 0:case 11:case 15:Li(o,h,i),Wl(4,h);break;case 1:if(Li(o,h,i),s=h,o=s.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(G){It(s,s.return,G)}if(s=h,o=s.updateQueue,o!==null){var w=s.stateNode;try{var R=o.shared.hiddenCallbacks;if(R!==null)for(o.shared.hiddenCallbacks=null,o=0;o<R.length;o++)lh(R[o],w)}catch(G){It(s,s.return,G)}}i&&v&64&&vd(h),$l(h,h.return);break;case 27:bd(h);case 26:case 5:Li(o,h,i),i&&s===null&&v&4&&yd(h),$l(h,h.return);break;case 12:Li(o,h,i);break;case 31:Li(o,h,i),i&&v&4&&Ed(o,h);break;case 13:Li(o,h,i),i&&v&4&&Ld(o,h);break;case 22:h.memoizedState===null&&Li(o,h,i),$l(h,h.return);break;case 30:break;default:Li(o,h,i)}e=e.sibling}}function Uc(t,e){var i=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),t=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(t=e.memoizedState.cachePool.pool),t!==i&&(t!=null&&t.refCount++,i!=null&&Zl(i))}function Hc(t,e){t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&Zl(t))}function Un(t,e,i,s){if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Od(t,e,i,s),e=e.sibling}function Od(t,e,i,s){var o=e.flags;switch(e.tag){case 0:case 11:case 15:Un(t,e,i,s),o&2048&&Wl(9,e);break;case 1:Un(t,e,i,s);break;case 3:Un(t,e,i,s),o&2048&&(t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&Zl(t)));break;case 12:if(o&2048){Un(t,e,i,s),t=e.stateNode;try{var h=e.memoizedProps,v=h.id,w=h.onPostCommit;typeof w=="function"&&w(v,e.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(R){It(e,e.return,R)}}else Un(t,e,i,s);break;case 31:Un(t,e,i,s);break;case 13:Un(t,e,i,s);break;case 23:break;case 22:h=e.stateNode,v=e.alternate,e.memoizedState!==null?h._visibility&2?Un(t,e,i,s):to(t,e):h._visibility&2?Un(t,e,i,s):(h._visibility|=2,Ys(t,e,i,s,(e.subtreeFlags&10256)!==0||!1)),o&2048&&Uc(v,e);break;case 24:Un(t,e,i,s),o&2048&&Hc(e.alternate,e);break;default:Un(t,e,i,s)}}function Ys(t,e,i,s,o){for(o=o&&((e.subtreeFlags&10256)!==0||!1),e=e.child;e!==null;){var h=t,v=e,w=i,R=s,G=v.flags;switch(v.tag){case 0:case 11:case 15:Ys(h,v,w,R,o),Wl(8,v);break;case 23:break;case 22:var W=v.stateNode;v.memoizedState!==null?W._visibility&2?Ys(h,v,w,R,o):to(h,v):(W._visibility|=2,Ys(h,v,w,R,o)),o&&G&2048&&Uc(v.alternate,v);break;case 24:Ys(h,v,w,R,o),o&&G&2048&&Hc(v.alternate,v);break;default:Ys(h,v,w,R,o)}e=e.sibling}}function to(t,e){if(e.subtreeFlags&10256)for(e=e.child;e!==null;){var i=t,s=e,o=s.flags;switch(s.tag){case 22:to(i,s),o&2048&&Uc(s.alternate,s);break;case 24:to(i,s),o&2048&&Hc(s.alternate,s);break;default:to(i,s)}e=e.sibling}}var eo=8192;function Gs(t,e,i){if(t.subtreeFlags&eo)for(t=t.child;t!==null;)Md(t,e,i),t=t.sibling}function Md(t,e,i){switch(t.tag){case 26:Gs(t,e,i),t.flags&eo&&t.memoizedState!==null&&hv(i,Bn,t.memoizedState,t.memoizedProps);break;case 5:Gs(t,e,i);break;case 3:case 4:var s=Bn;Bn=Yr(t.stateNode.containerInfo),Gs(t,e,i),Bn=s;break;case 22:t.memoizedState===null&&(s=t.alternate,s!==null&&s.memoizedState!==null?(s=eo,eo=16777216,Gs(t,e,i),eo=s):Gs(t,e,i));break;default:Gs(t,e,i)}}function Ad(t){var e=t.alternate;if(e!==null&&(t=e.child,t!==null)){e.child=null;do e=t.sibling,t.sibling=null,t=e;while(t!==null)}}function no(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var i=0;i<e.length;i++){var s=e[i];Oe=s,Dd(s,t)}Ad(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Rd(t),t=t.sibling}function Rd(t){switch(t.tag){case 0:case 11:case 15:no(t),t.flags&2048&&la(9,t,t.return);break;case 3:no(t);break;case 12:no(t);break;case 22:var e=t.stateNode;t.memoizedState!==null&&e._visibility&2&&(t.return===null||t.return.tag!==13)?(e._visibility&=-3,Or(t)):no(t);break;default:no(t)}}function Or(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var i=0;i<e.length;i++){var s=e[i];Oe=s,Dd(s,t)}Ad(t)}for(t=t.child;t!==null;){switch(e=t,e.tag){case 0:case 11:case 15:la(8,e,e.return),Or(e);break;case 22:i=e.stateNode,i._visibility&2&&(i._visibility&=-3,Or(e));break;default:Or(e)}t=t.sibling}}function Dd(t,e){for(;Oe!==null;){var i=Oe;switch(i.tag){case 0:case 11:case 15:la(8,i,e);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var s=i.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:Zl(i.memoizedState.cache)}if(s=i.child,s!==null)s.return=i,Oe=s;else t:for(i=t;Oe!==null;){s=Oe;var o=s.sibling,h=s.return;if(zd(s),s===i){Oe=null;break t}if(o!==null){o.return=h,Oe=o;break t}Oe=h}}}var Lg={getCacheForType:function(t){var e=Re(ye),i=e.data.get(t);return i===void 0&&(i=t(),e.data.set(t,i)),i},cacheSignal:function(){return Re(ye).controller.signal}},Cg=typeof WeakMap=="function"?WeakMap:Map,Qt=0,ie=null,Ut=null,kt=0,Ft=0,fn=null,oa=!1,Vs=!1,Zc=!1,Ci=0,me=0,ra=0,os=0,Pc=0,hn=0,Xs=0,io=null,en=null,kc=!1,Mr=0,jd=0,Ar=1/0,Rr=null,ua=null,Ee=0,ca=null,Ks=null,Ni=0,qc=0,Yc=null,Bd=null,ao=0,Gc=null;function dn(){return(Qt&2)!==0&&kt!==0?kt&-kt:D.T!==null?Fc():ml()}function Ud(){if(hn===0)if((kt&536870912)===0||Bt){var t=za;za<<=1,(za&3932160)===0&&(za=262144),hn=t}else hn=536870912;return t=un.current,t!==null&&(t.flags|=32),hn}function nn(t,e,i){(t===ie&&(Ft===2||Ft===9)||t.cancelPendingCommit!==null)&&(Qs(t,0),fa(t,kt,hn,!1)),ri(t,i),((Qt&2)===0||t!==ie)&&(t===ie&&((Qt&2)===0&&(os|=i),me===4&&fa(t,kt,hn,!1)),ti(t))}function Hd(t,e,i){if((Qt&6)!==0)throw Error(c(327));var s=!i&&(e&127)===0&&(e&t.expiredLanes)===0||Ea(t,e),o=s?Mg(t,e):Xc(t,e,!0),h=s;do{if(o===0){Vs&&!s&&fa(t,e,0,!1);break}else{if(i=t.current.alternate,h&&!Ng(i)){o=Xc(t,e,!1),h=!1;continue}if(o===2){if(h=e,t.errorRecoveryDisabledLanes&h)var v=0;else v=t.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){e=v;t:{var w=t;o=io;var R=w.current.memoizedState.isDehydrated;if(R&&(Qs(w,v).flags|=256),v=Xc(w,v,!1),v!==2){if(Zc&&!R){w.errorRecoveryDisabledLanes|=h,os|=h,o=4;break t}h=en,en=o,h!==null&&(en===null?en=h:en.push.apply(en,h))}o=v}if(h=!1,o!==2)continue}}if(o===1){Qs(t,0),fa(t,e,0,!0);break}t:{switch(s=t,h=o,h){case 0:case 1:throw Error(c(345));case 4:if((e&4194048)!==e)break;case 6:fa(s,e,hn,!oa);break t;case 2:en=null;break;case 3:case 5:break;default:throw Error(c(329))}if((e&62914560)===e&&(o=Mr+300-Pe(),10<o)){if(fa(s,e,hn,!oa),ms(s,0,!0)!==0)break t;Ni=e,s.timeoutHandle=pm(Zd.bind(null,s,i,en,Rr,kc,e,hn,os,Xs,oa,h,"Throttled",-0,0),o);break t}Zd(s,i,en,Rr,kc,e,hn,os,Xs,oa,h,null,-0,0)}}break}while(!0);ti(t)}function Zd(t,e,i,s,o,h,v,w,R,G,W,it,Q,J){if(t.timeoutHandle=-1,it=e.subtreeFlags,it&8192||(it&16785408)===16785408){it={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ke},Md(e,h,it);var dt=(h&62914560)===h?Mr-Pe():(h&4194048)===h?jd-Pe():0;if(dt=dv(it,dt),dt!==null){Ni=h,t.cancelPendingCommit=dt(Kd.bind(null,t,e,h,i,s,o,v,w,R,W,it,null,Q,J)),fa(t,h,v,!G);return}}Kd(t,e,h,i,s,o,v,w,R)}function Ng(t){for(var e=t;;){var i=e.tag;if((i===0||i===11||i===15)&&e.flags&16384&&(i=e.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var s=0;s<i.length;s++){var o=i[s],h=o.getSnapshot;o=o.value;try{if(!Ce(h(),o))return!1}catch{return!1}}if(i=e.child,e.subtreeFlags&16384&&i!==null)i.return=e,e=i;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function fa(t,e,i,s){e&=~Pc,e&=~os,t.suspendedLanes|=e,t.pingedLanes&=~e,s&&(t.warmLanes|=e),s=t.expirationTimes;for(var o=e;0<o;){var h=31-ke(o),v=1<<h;s[h]=-1,o&=~v}i!==0&&Ao(t,i,e)}function Dr(){return(Qt&6)===0?(so(0),!1):!0}function Vc(){if(Ut!==null){if(Ft===0)var t=Ut.return;else t=Ut,jn=Wn=null,oc(t),Hs=null,kl=0,t=Ut;for(;t!==null;)gd(t.alternate,t),t=t.return;Ut=null}}function Qs(t,e){var i=t.timeoutHandle;i!==-1&&(t.timeoutHandle=-1,Jg(i)),i=t.cancelPendingCommit,i!==null&&(t.cancelPendingCommit=null,i()),Ni=0,Vc(),ie=t,Ut=i=Sn(t.current,null),kt=e,Ft=0,fn=null,oa=!1,Vs=Ea(t,e),Zc=!1,Xs=hn=Pc=os=ra=me=0,en=io=null,kc=!1,(e&8)!==0&&(e|=e&32);var s=t.entangledLanes;if(s!==0)for(t=t.entanglements,s&=e;0<s;){var o=31-ke(s),h=1<<o;e|=t[o],s&=~h}return Ci=e,Qa(),i}function Pd(t,e){Ct=null,D.H=Jl,e===Us||e===ur?(e=nh(),Ft=3):e===Ju?(e=nh(),Ft=4):Ft=e===wc?8:e!==null&&typeof e=="object"&&typeof e.then=="function"?6:1,fn=e,Ut===null&&(me=1,wr(t,a(e,t.current)))}function kd(){var t=un.current;return t===null?!0:(kt&4194048)===kt?wn===null:(kt&62914560)===kt||(kt&536870912)!==0?t===wn:!1}function qd(){var t=D.H;return D.H=Jl,t===null?Jl:t}function Yd(){var t=D.A;return D.A=Lg,t}function jr(){me=4,oa||(kt&4194048)!==kt&&un.current!==null||(Vs=!0),(ra&134217727)===0&&(os&134217727)===0||ie===null||fa(ie,kt,hn,!1)}function Xc(t,e,i){var s=Qt;Qt|=2;var o=qd(),h=Yd();(ie!==t||kt!==e)&&(Rr=null,Qs(t,e)),e=!1;var v=me;t:do try{if(Ft!==0&&Ut!==null){var w=Ut,R=fn;switch(Ft){case 8:Vc(),v=6;break t;case 3:case 2:case 9:case 6:un.current===null&&(e=!0);var G=Ft;if(Ft=0,fn=null,Js(t,w,R,G),i&&Vs){v=0;break t}break;default:G=Ft,Ft=0,fn=null,Js(t,w,R,G)}}Og(),v=me;break}catch(W){Pd(t,W)}while(!0);return e&&t.shellSuspendCounter++,jn=Wn=null,Qt=s,D.H=o,D.A=h,Ut===null&&(ie=null,kt=0,Qa()),v}function Og(){for(;Ut!==null;)Gd(Ut)}function Mg(t,e){var i=Qt;Qt|=2;var s=qd(),o=Yd();ie!==t||kt!==e?(Rr=null,Ar=Pe()+500,Qs(t,e)):Vs=Ea(t,e);t:do try{if(Ft!==0&&Ut!==null){e=Ut;var h=fn;e:switch(Ft){case 1:Ft=0,fn=null,Js(t,e,h,1);break;case 2:case 9:if(th(h)){Ft=0,fn=null,Vd(e);break}e=function(){Ft!==2&&Ft!==9||ie!==t||(Ft=7),ti(t)},h.then(e,e);break t;case 3:Ft=7;break t;case 4:Ft=5;break t;case 7:th(h)?(Ft=0,fn=null,Vd(e)):(Ft=0,fn=null,Js(t,e,h,7));break;case 5:var v=null;switch(Ut.tag){case 26:v=Ut.memoizedState;case 5:case 27:var w=Ut;if(v?Om(v):w.stateNode.complete){Ft=0,fn=null;var R=w.sibling;if(R!==null)Ut=R;else{var G=w.return;G!==null?(Ut=G,Br(G)):Ut=null}break e}}Ft=0,fn=null,Js(t,e,h,5);break;case 6:Ft=0,fn=null,Js(t,e,h,6);break;case 8:Vc(),me=6;break t;default:throw Error(c(462))}}Ag();break}catch(W){Pd(t,W)}while(!0);return jn=Wn=null,D.H=s,D.A=o,Qt=i,Ut!==null?0:(ie=null,kt=0,Qa(),me)}function Ag(){for(;Ut!==null&&!Co();)Gd(Ut)}function Gd(t){var e=md(t.alternate,t,Ci);t.memoizedProps=t.pendingProps,e===null?Br(t):Ut=e}function Vd(t){var e=t,i=e.alternate;switch(e.tag){case 15:case 0:e=rd(i,e,e.pendingProps,e.type,void 0,kt);break;case 11:e=rd(i,e,e.pendingProps,e.type.render,e.ref,kt);break;case 5:oc(e);default:gd(i,e),e=Ut=Dl(e,Ci),e=md(i,e,Ci)}t.memoizedProps=t.pendingProps,e===null?Br(t):Ut=e}function Js(t,e,i,s){jn=Wn=null,oc(e),Hs=null,kl=0;var o=e.return;try{if(xg(t,o,e,i,kt)){me=1,wr(t,a(i,t.current)),Ut=null;return}}catch(h){if(o!==null)throw Ut=o,h;me=1,wr(t,a(i,t.current)),Ut=null;return}e.flags&32768?(Bt||s===1?t=!0:Vs||(kt&536870912)!==0?t=!1:(oa=t=!0,(s===2||s===9||s===3||s===6)&&(s=un.current,s!==null&&s.tag===13&&(s.flags|=16384))),Xd(e,t)):Br(e)}function Br(t){var e=t;do{if((e.flags&32768)!==0){Xd(e,oa);return}t=e.return;var i=wg(e.alternate,e,Ci);if(i!==null){Ut=i;return}if(e=e.sibling,e!==null){Ut=e;return}Ut=e=t}while(e!==null);me===0&&(me=5)}function Xd(t,e){do{var i=zg(t.alternate,t);if(i!==null){i.flags&=32767,Ut=i;return}if(i=t.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!e&&(t=t.sibling,t!==null)){Ut=t;return}Ut=t=i}while(t!==null);me=6,Ut=null}function Kd(t,e,i,s,o,h,v,w,R){t.cancelPendingCommit=null;do Ur();while(Ee!==0);if((Qt&6)!==0)throw Error(c(327));if(e!==null){if(e===t.current)throw Error(c(177));if(h=e.lanes|e.childLanes,h|=Os,Cu(t,i,h,v,w,R),t===ie&&(Ut=ie=null,kt=0),Ks=e,ca=t,Ni=i,qc=h,Yc=o,Bd=s,(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,Bg(ba,function(){return Wd(),null})):(t.callbackNode=null,t.callbackPriority=0),s=(e.flags&13878)!==0,(e.subtreeFlags&13878)!==0||s){s=D.T,D.T=null,o=q.p,q.p=2,v=Qt,Qt|=4;try{Tg(t,e,i)}finally{Qt=v,q.p=o,D.T=s}}Ee=1,Qd(),Jd(),Fd()}}function Qd(){if(Ee===1){Ee=0;var t=ca,e=Ks,i=(e.flags&13878)!==0;if((e.subtreeFlags&13878)!==0||i){i=D.T,D.T=null;var s=q.p;q.p=2;var o=Qt;Qt|=4;try{Cd(e,t);var h=sf,v=Ya(t.containerInfo),w=h.focusedElem,R=h.selectionRange;if(v!==w&&w&&w.ownerDocument&&Es(w.ownerDocument.documentElement,w)){if(R!==null&&Vn(w)){var G=R.start,W=R.end;if(W===void 0&&(W=G),"selectionStart"in w)w.selectionStart=G,w.selectionEnd=Math.min(W,w.value.length);else{var it=w.ownerDocument||document,Q=it&&it.defaultView||window;if(Q.getSelection){var J=Q.getSelection(),dt=w.textContent.length,bt=Math.min(R.start,dt),ee=R.end===void 0?bt:Math.min(R.end,dt);!J.extend&&bt>ee&&(v=ee,ee=bt,bt=v);var Z=qa(w,bt),j=qa(w,ee);if(Z&&j&&(J.rangeCount!==1||J.anchorNode!==Z.node||J.anchorOffset!==Z.offset||J.focusNode!==j.node||J.focusOffset!==j.offset)){var Y=it.createRange();Y.setStart(Z.node,Z.offset),J.removeAllRanges(),bt>ee?(J.addRange(Y),J.extend(j.node,j.offset)):(Y.setEnd(j.node,j.offset),J.addRange(Y))}}}}for(it=[],J=w;J=J.parentNode;)J.nodeType===1&&it.push({element:J,left:J.scrollLeft,top:J.scrollTop});for(typeof w.focus=="function"&&w.focus(),w=0;w<it.length;w++){var tt=it[w];tt.element.scrollLeft=tt.left,tt.element.scrollTop=tt.top}}Jr=!!af,sf=af=null}finally{Qt=o,q.p=s,D.T=i}}t.current=e,Ee=2}}function Jd(){if(Ee===2){Ee=0;var t=ca,e=Ks,i=(e.flags&8772)!==0;if((e.subtreeFlags&8772)!==0||i){i=D.T,D.T=null;var s=q.p;q.p=2;var o=Qt;Qt|=4;try{wd(t,e.alternate,e)}finally{Qt=o,q.p=s,D.T=i}}Ee=3}}function Fd(){if(Ee===4||Ee===3){Ee=0,No();var t=ca,e=Ks,i=Ni,s=Bd;(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?Ee=5:(Ee=0,Ks=ca=null,Id(t,t.pendingLanes));var o=t.pendingLanes;if(o===0&&(ua=null),_t(i),e=e.stateNode,Me&&typeof Me.onCommitFiberRoot=="function")try{Me.onCommitFiberRoot(ji,e,void 0,(e.current.flags&128)===128)}catch{}if(s!==null){e=D.T,o=q.p,q.p=2,D.T=null;try{for(var h=t.onRecoverableError,v=0;v<s.length;v++){var w=s[v];h(w.value,{componentStack:w.stack})}}finally{D.T=e,q.p=o}}(Ni&3)!==0&&Ur(),ti(t),o=t.pendingLanes,(i&261930)!==0&&(o&42)!==0?t===Gc?ao++:(ao=0,Gc=t):ao=0,so(0)}}function Id(t,e){(t.pooledCacheLanes&=e)===0&&(e=t.pooledCache,e!=null&&(t.pooledCache=null,Zl(e)))}function Ur(){return Qd(),Jd(),Fd(),Wd()}function Wd(){if(Ee!==5)return!1;var t=ca,e=qc;qc=0;var i=_t(Ni),s=D.T,o=q.p;try{q.p=32>i?32:i,D.T=null,i=Yc,Yc=null;var h=ca,v=Ni;if(Ee=0,Ks=ca=null,Ni=0,(Qt&6)!==0)throw Error(c(331));var w=Qt;if(Qt|=4,Rd(h.current),Od(h,h.current,v,i),Qt=w,so(0,!1),Me&&typeof Me.onPostCommitFiberRoot=="function")try{Me.onPostCommitFiberRoot(ji,h)}catch{}return!0}finally{q.p=o,D.T=s,Id(t,e)}}function $d(t,e,i){e=a(i,e),e=Sc(t.stateNode,e,2),t=ia(t,e,2),t!==null&&(ri(t,2),ti(t))}function It(t,e,i){if(t.tag===3)$d(t,t,i);else for(;e!==null;){if(e.tag===3){$d(e,t,i);break}else if(e.tag===1){var s=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(ua===null||!ua.has(s))){t=a(i,t),i=td(2),s=ia(e,i,2),s!==null&&(ed(i,s,e,t),ri(s,2),ti(s));break}}e=e.return}}function Kc(t,e,i){var s=t.pingCache;if(s===null){s=t.pingCache=new Cg;var o=new Set;s.set(e,o)}else o=s.get(e),o===void 0&&(o=new Set,s.set(e,o));o.has(i)||(Zc=!0,o.add(i),t=Rg.bind(null,t,e,i),e.then(t,t))}function Rg(t,e,i){var s=t.pingCache;s!==null&&s.delete(e),t.pingedLanes|=t.suspendedLanes&i,t.warmLanes&=~i,ie===t&&(kt&i)===i&&(me===4||me===3&&(kt&62914560)===kt&&300>Pe()-Mr?(Qt&2)===0&&Qs(t,0):Pc|=i,Xs===kt&&(Xs=0)),ti(t)}function tm(t,e){e===0&&(e=Mo()),t=bn(t,e),t!==null&&(ri(t,e),ti(t))}function Dg(t){var e=t.memoizedState,i=0;e!==null&&(i=e.retryLane),tm(t,i)}function jg(t,e){var i=0;switch(t.tag){case 31:case 13:var s=t.stateNode,o=t.memoizedState;o!==null&&(i=o.retryLane);break;case 19:s=t.stateNode;break;case 22:s=t.stateNode._retryCache;break;default:throw Error(c(314))}s!==null&&s.delete(e),tm(t,i)}function Bg(t,e){return hs(t,e)}var Hr=null,Fs=null,Qc=!1,Zr=!1,Jc=!1,ha=0;function ti(t){t!==Fs&&t.next===null&&(Fs===null?Hr=Fs=t:Fs=Fs.next=t),Zr=!0,Qc||(Qc=!0,Hg())}function so(t,e){if(!Jc&&Zr){Jc=!0;do for(var i=!1,s=Hr;s!==null;){if(t!==0){var o=s.pendingLanes;if(o===0)var h=0;else{var v=s.suspendedLanes,w=s.pingedLanes;h=(1<<31-ke(42|t)+1)-1,h&=o&~(v&~w),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(i=!0,am(s,h))}else h=kt,h=ms(s,s===ie?h:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(h&3)===0||Ea(s,h)||(i=!0,am(s,h));s=s.next}while(i);Jc=!1}}function Ug(){em()}function em(){Zr=Qc=!1;var t=0;ha!==0&&Qg()&&(t=ha);for(var e=Pe(),i=null,s=Hr;s!==null;){var o=s.next,h=nm(s,e);h===0?(s.next=null,i===null?Hr=o:i.next=o,o===null&&(Fs=i)):(i=s,(t!==0||(h&3)!==0)&&(Zr=!0)),s=o}Ee!==0&&Ee!==5||so(t),ha!==0&&(ha=0)}function nm(t,e){for(var i=t.suspendedLanes,s=t.pingedLanes,o=t.expirationTimes,h=t.pendingLanes&-62914561;0<h;){var v=31-ke(h),w=1<<v,R=o[v];R===-1?((w&i)===0||(w&s)!==0)&&(o[v]=Lu(w,e)):R<=e&&(t.expiredLanes|=w),h&=~w}if(e=ie,i=kt,i=ms(t,t===e?i:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),s=t.callbackNode,i===0||t===e&&(Ft===2||Ft===9)||t.cancelPendingCommit!==null)return s!==null&&s!==null&&xa(s),t.callbackNode=null,t.callbackPriority=0;if((i&3)===0||Ea(t,i)){if(e=i&-i,e===t.callbackPriority)return e;switch(s!==null&&xa(s),_t(i)){case 2:case 8:i=fl;break;case 32:i=ba;break;case 268435456:i=hl;break;default:i=ba}return s=im.bind(null,t),i=hs(i,s),t.callbackPriority=e,t.callbackNode=i,e}return s!==null&&s!==null&&xa(s),t.callbackPriority=2,t.callbackNode=null,2}function im(t,e){if(Ee!==0&&Ee!==5)return t.callbackNode=null,t.callbackPriority=0,null;var i=t.callbackNode;if(Ur()&&t.callbackNode!==i)return null;var s=kt;return s=ms(t,t===ie?s:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),s===0?null:(Hd(t,s,e),nm(t,Pe()),t.callbackNode!=null&&t.callbackNode===i?im.bind(null,t):null)}function am(t,e){if(Ur())return null;Hd(t,e,!0)}function Hg(){Fg(function(){(Qt&6)!==0?hs(ds,Ug):em()})}function Fc(){if(ha===0){var t=js;t===0&&(t=wa,wa<<=1,(wa&261888)===0&&(wa=256)),ha=t}return ha}function sm(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:ki(""+t)}function lm(t,e){var i=e.ownerDocument.createElement("input");return i.name=e.name,i.value=e.value,t.id&&i.setAttribute("form",t.id),e.parentNode.insertBefore(i,e),t=new FormData(t),i.parentNode.removeChild(i),t}function Zg(t,e,i,s,o){if(e==="submit"&&i&&i.stateNode===o){var h=sm((o[Le]||null).action),v=s.submitter;v&&(e=(e=v[Le]||null)?sm(e.formAction):v.getAttribute("formAction"),e!==null&&(h=e,v=null));var w=new ys("action","action",null,s,o);t.push({event:w,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(ha!==0){var R=v?lm(o,v):new FormData(o);gc(i,{pending:!0,data:R,method:o.method,action:h},null,R)}}else typeof h=="function"&&(w.preventDefault(),R=v?lm(o,v):new FormData(o),gc(i,{pending:!0,data:R,method:o.method,action:h},h,R))},currentTarget:o}]})}}for(var Ic=0;Ic<Qn.length;Ic++){var Wc=Qn[Ic],Pg=Wc.toLowerCase(),kg=Wc[0].toUpperCase()+Wc.slice(1);Je(Pg,"on"+kg)}Je(Va,"onAnimationEnd"),Je(ir,"onAnimationIteration"),Je(Xa,"onAnimationStart"),Je("dblclick","onDoubleClick"),Je("focusin","onFocus"),Je("focusout","onBlur"),Je(ku,"onTransitionRun"),Je(ar,"onTransitionStart"),Je(qu,"onTransitionCancel"),Je(Wi,"onTransitionEnd"),kn("onMouseEnter",["mouseout","mouseover"]),kn("onMouseLeave",["mouseout","mouseover"]),kn("onPointerEnter",["pointerout","pointerover"]),kn("onPointerLeave",["pointerout","pointerover"]),fi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),fi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),fi("onBeforeInput",["compositionend","keypress","textInput","paste"]),fi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),fi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),fi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var lo="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(" "),qg=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(lo));function om(t,e){e=(e&4)!==0;for(var i=0;i<t.length;i++){var s=t[i],o=s.event;s=s.listeners;t:{var h=void 0;if(e)for(var v=s.length-1;0<=v;v--){var w=s[v],R=w.instance,G=w.currentTarget;if(w=w.listener,R!==h&&o.isPropagationStopped())break t;h=w,o.currentTarget=G;try{h(o)}catch(W){Ka(W)}o.currentTarget=null,h=R}else for(v=0;v<s.length;v++){if(w=s[v],R=w.instance,G=w.currentTarget,w=w.listener,R!==h&&o.isPropagationStopped())break t;h=w,o.currentTarget=G;try{h(o)}catch(W){Ka(W)}o.currentTarget=null,h=R}}}}function Ht(t,e){var i=e[Zn];i===void 0&&(i=e[Zn]=new Set);var s=t+"__bubble";i.has(s)||(rm(e,t,2,!1),i.add(s))}function $c(t,e,i){var s=0;e&&(s|=4),rm(i,t,s,e)}var Pr="_reactListening"+Math.random().toString(36).slice(2);function tf(t){if(!t[Pr]){t[Pr]=!0,Uo.forEach(function(i){i!=="selectionchange"&&(qg.has(i)||$c(i,!1,t),$c(i,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[Pr]||(e[Pr]=!0,$c("selectionchange",!1,e))}}function rm(t,e,i,s){switch(Um(e)){case 2:var o=gv;break;case 8:o=vv;break;default:o=gf}i=o.bind(null,e,i,t),o=void 0,!Ra||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(o=!0),s?o!==void 0?t.addEventListener(e,i,{capture:!0,passive:o}):t.addEventListener(e,i,!0):o!==void 0?t.addEventListener(e,i,{passive:o}):t.addEventListener(e,i,!1)}function ef(t,e,i,s,o){var h=s;if((e&1)===0&&(e&2)===0&&s!==null)t:for(;;){if(s===null)return;var v=s.tag;if(v===3||v===4){var w=s.stateNode.containerInfo;if(w===o)break;if(v===4)for(v=s.return;v!==null;){var R=v.tag;if((R===3||R===4)&&v.stateNode.containerInfo===o)return;v=v.return}for(;w!==null;){if(v=ci(w),v===null)return;if(R=v.tag,R===5||R===6||R===26||R===27){s=h=v;continue t}w=w.parentNode}}s=s.return}wl(function(){var G=h,W=Aa(i),it=[];t:{var Q=sr.get(t);if(Q!==void 0){var J=ys,dt=t;switch(t){case"keypress":if(Da(i)===0)break t;case"keydown":case"keyup":J=Vo;break;case"focusin":dt="focus",J=El;break;case"focusout":dt="blur",J=El;break;case"beforeblur":case"afterblur":J=El;break;case"click":if(i.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":J=Po;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":J=Ou;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":J=ju;break;case Va:case ir:case Xa:J=Ll;break;case Wi:J=Qo;break;case"scroll":case"scrollend":J=Pt;break;case"wheel":J=pi;break;case"copy":case"cut":case"paste":J=vn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":J=Xo;break;case"toggle":case"beforetoggle":J=Ua}var bt=(e&4)!==0,ee=!bt&&(t==="scroll"||t==="scrollend"),Z=bt?Q!==null?Q+"Capture":null:Q;bt=[];for(var j=G,Y;j!==null;){var tt=j;if(Y=tt.stateNode,tt=tt.tag,tt!==5&&tt!==26&&tt!==27||Y===null||Z===null||(tt=di(j,Z),tt!=null&&bt.push(oo(j,tt,Y))),ee)break;j=j.return}0<bt.length&&(Q=new J(Q,dt,null,i,W),it.push({event:Q,listeners:bt}))}}if((e&7)===0){t:{if(Q=t==="mouseover"||t==="pointerover",J=t==="mouseout"||t==="pointerout",Q&&i!==_s&&(dt=i.relatedTarget||i.fromElement)&&(ci(dt)||dt[ui]))break t;if((J||Q)&&(Q=W.window===W?W:(Q=W.ownerDocument)?Q.defaultView||Q.parentWindow:window,J?(dt=i.relatedTarget||i.toElement,J=G,dt=dt?ci(dt):null,dt!==null&&(ee=p(dt),bt=dt.tag,dt!==ee||bt!==5&&bt!==27&&bt!==6)&&(dt=null)):(J=null,dt=G),J!==dt)){if(bt=Po,tt="onMouseLeave",Z="onMouseEnter",j="mouse",(t==="pointerout"||t==="pointerover")&&(bt=Xo,tt="onPointerLeave",Z="onPointerEnter",j="pointer"),ee=J==null?Q:Pn(J),Y=dt==null?Q:Pn(dt),Q=new bt(tt,j+"leave",J,i,W),Q.target=ee,Q.relatedTarget=Y,tt=null,ci(W)===G&&(bt=new bt(Z,j+"enter",dt,i,W),bt.target=Y,bt.relatedTarget=ee,tt=bt),ee=tt,J&&dt)e:{for(bt=Yg,Z=J,j=dt,Y=0,tt=Z;tt;tt=bt(tt))Y++;tt=0;for(var xt=j;xt;xt=bt(xt))tt++;for(;0<Y-tt;)Z=bt(Z),Y--;for(;0<tt-Y;)j=bt(j),tt--;for(;Y--;){if(Z===j||j!==null&&Z===j.alternate){bt=Z;break e}Z=bt(Z),j=bt(j)}bt=null}else bt=null;J!==null&&um(it,Q,J,bt,!1),dt!==null&&ee!==null&&um(it,ee,dt,bt,!0)}}t:{if(Q=G?Pn(G):window,J=Q.nodeName&&Q.nodeName.toLowerCase(),J==="select"||J==="input"&&Q.type==="file")var Xt=ka;else if(_n(Q))if(Wo)Xt=Pu;else{Xt=Zu;var gt=An}else J=Q.nodeName,!J||J.toLowerCase()!=="input"||Q.type!=="checkbox"&&Q.type!=="radio"?G&&Ma(G.elementType)&&(Xt=ka):Xt=Qi;if(Xt&&(Xt=Xt(t,G))){Io(it,Xt,i,W);break t}gt&&gt(t,Q,G),t==="focusout"&&G&&Q.type==="number"&&G.memoizedProps.value!=null&&Nn(Q,"number",Q.value)}switch(gt=G?Pn(G):window,t){case"focusin":(_n(gt)||gt.contentEditable==="true")&&(Xn=gt,Cs=G,Ga=null);break;case"focusout":Ga=Cs=Xn=null;break;case"mousedown":Fi=!0;break;case"contextmenu":case"mouseup":case"dragend":Fi=!1,er(it,i,W);break;case"selectionchange":if(Ls)break;case"keydown":case"keyup":er(it,i,W)}var At;if(bs)t:{switch(t){case"compositionstart":var qt="onCompositionStart";break t;case"compositionend":qt="onCompositionEnd";break t;case"compositionupdate":qt="onCompositionUpdate";break t}qt=void 0}else Vi?Fo(t,i)&&(qt="onCompositionEnd"):t==="keydown"&&i.keyCode===229&&(qt="onCompositionStart");qt&&(Ss&&i.locale!=="ko"&&(Vi||qt!=="onCompositionStart"?qt==="onCompositionEnd"&&Vi&&(At=Yn()):(gn=W,mi="value"in gn?gn.value:gn.textContent,Vi=!0)),gt=kr(G,qt),0<gt.length&&(qt=new Cl(qt,t,null,i,W),it.push({event:qt,listeners:gt}),At?qt.data=At:(At=Al(i),At!==null&&(qt.data=At)))),(At=Uu?rn(t,i):Xi(t,i))&&(qt=kr(G,"onBeforeInput"),0<qt.length&&(gt=new Cl("onBeforeInput","beforeinput",null,i,W),it.push({event:gt,listeners:qt}),gt.data=At)),Zg(it,t,G,i,W)}om(it,e)})}function oo(t,e,i){return{instance:t,listener:e,currentTarget:i}}function kr(t,e){for(var i=e+"Capture",s=[];t!==null;){var o=t,h=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||h===null||(o=di(t,i),o!=null&&s.unshift(oo(t,o,h)),o=di(t,e),o!=null&&s.push(oo(t,o,h))),t.tag===3)return s;t=t.return}return[]}function Yg(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function um(t,e,i,s,o){for(var h=e._reactName,v=[];i!==null&&i!==s;){var w=i,R=w.alternate,G=w.stateNode;if(w=w.tag,R!==null&&R===s)break;w!==5&&w!==26&&w!==27||G===null||(R=G,o?(G=di(i,h),G!=null&&v.unshift(oo(i,G,R))):o||(G=di(i,h),G!=null&&v.push(oo(i,G,R)))),i=i.return}v.length!==0&&t.push({event:e,listeners:v})}var Gg=/\r\n?/g,Vg=/\u0000|\uFFFD/g;function cm(t){return(typeof t=="string"?t:""+t).replace(Gg,`
`).replace(Vg,"")}function fm(t,e){return e=cm(e),cm(t)===e}function te(t,e,i,s,o,h){switch(i){case"children":typeof s=="string"?e==="body"||e==="textarea"&&s===""||pn(t,s):(typeof s=="number"||typeof s=="bigint")&&e!=="body"&&pn(t,""+s);break;case"className":Wt(t,"class",s);break;case"tabIndex":Wt(t,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":Wt(t,i,s);break;case"style":gs(t,s,h);break;case"data":if(e!=="object"){Wt(t,"data",s);break}case"src":case"href":if(s===""&&(e!=="a"||i!=="href")){t.removeAttribute(i);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){t.removeAttribute(i);break}s=ki(""+s),t.setAttribute(i,s);break;case"action":case"formAction":if(typeof s=="function"){t.setAttribute(i,"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 h=="function"&&(i==="formAction"?(e!=="input"&&te(t,e,"name",o.name,o,null),te(t,e,"formEncType",o.formEncType,o,null),te(t,e,"formMethod",o.formMethod,o,null),te(t,e,"formTarget",o.formTarget,o,null)):(te(t,e,"encType",o.encType,o,null),te(t,e,"method",o.method,o,null),te(t,e,"target",o.target,o,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){t.removeAttribute(i);break}s=ki(""+s),t.setAttribute(i,s);break;case"onClick":s!=null&&(t.onclick=Ke);break;case"onScroll":s!=null&&Ht("scroll",t);break;case"onScrollEnd":s!=null&&Ht("scrollend",t);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(c(61));if(i=s.__html,i!=null){if(o.children!=null)throw Error(c(60));t.innerHTML=i}}break;case"multiple":t.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":t.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){t.removeAttribute("xlink:href");break}i=ki(""+s),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(i,""+s):t.removeAttribute(i);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":s&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(i,""):t.removeAttribute(i);break;case"capture":case"download":s===!0?t.setAttribute(i,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(i,s):t.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?t.setAttribute(i,s):t.removeAttribute(i);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?t.removeAttribute(i):t.setAttribute(i,s);break;case"popover":Ht("beforetoggle",t),Ht("toggle",t),jt(t,"popover",s);break;case"xlinkActuate":Xe(t,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":Xe(t,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":Xe(t,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":Xe(t,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":Xe(t,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":Xe(t,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":Xe(t,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":Xe(t,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":Xe(t,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":jt(t,"is",s);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=vs.get(i)||i,jt(t,i,s))}}function nf(t,e,i,s,o,h){switch(i){case"style":gs(t,s,h);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(c(61));if(i=s.__html,i!=null){if(o.children!=null)throw Error(c(60));t.innerHTML=i}}break;case"children":typeof s=="string"?pn(t,s):(typeof s=="number"||typeof s=="bigint")&&pn(t,""+s);break;case"onScroll":s!=null&&Ht("scroll",t);break;case"onScrollEnd":s!=null&&Ht("scrollend",t);break;case"onClick":s!=null&&(t.onclick=Ke);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ho.hasOwnProperty(i))t:{if(i[0]==="o"&&i[1]==="n"&&(o=i.endsWith("Capture"),e=i.slice(2,o?i.length-7:void 0),h=t[Le]||null,h=h!=null?h[i]:null,typeof h=="function"&&t.removeEventListener(e,h,o),typeof s=="function")){typeof h!="function"&&h!==null&&(i in t?t[i]=null:t.hasAttribute(i)&&t.removeAttribute(i)),t.addEventListener(e,s,o);break t}i in t?t[i]=s:s===!0?t.setAttribute(i,""):jt(t,i,s)}}}function je(t,e,i){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ht("error",t),Ht("load",t);var s=!1,o=!1,h;for(h in i)if(i.hasOwnProperty(h)){var v=i[h];if(v!=null)switch(h){case"src":s=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(c(137,e));default:te(t,e,h,v,i,null)}}o&&te(t,e,"srcSet",i.srcSet,i,null),s&&te(t,e,"src",i.src,i,null);return;case"input":Ht("invalid",t);var w=h=v=o=null,R=null,G=null;for(s in i)if(i.hasOwnProperty(s)){var W=i[s];if(W!=null)switch(s){case"name":o=W;break;case"type":v=W;break;case"checked":R=W;break;case"defaultChecked":G=W;break;case"value":h=W;break;case"defaultValue":w=W;break;case"children":case"dangerouslySetInnerHTML":if(W!=null)throw Error(c(137,e));break;default:te(t,e,s,W,i,null)}}Oa(t,h,w,R,G,v,o,!1);return;case"select":Ht("invalid",t),s=v=h=null;for(o in i)if(i.hasOwnProperty(o)&&(w=i[o],w!=null))switch(o){case"value":h=w;break;case"defaultValue":v=w;break;case"multiple":s=w;default:te(t,e,o,w,i,null)}e=h,i=v,t.multiple=!!s,e!=null?ne(t,!!s,e,!1):i!=null&&ne(t,!!s,i,!0);return;case"textarea":Ht("invalid",t),h=o=s=null;for(v in i)if(i.hasOwnProperty(v)&&(w=i[v],w!=null))switch(v){case"value":s=w;break;case"defaultValue":o=w;break;case"children":h=w;break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(c(91));break;default:te(t,e,v,w,i,null)}Zi(t,s,o,h);return;case"option":for(R in i)if(i.hasOwnProperty(R)&&(s=i[R],s!=null))switch(R){case"selected":t.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:te(t,e,R,s,i,null)}return;case"dialog":Ht("beforetoggle",t),Ht("toggle",t),Ht("cancel",t),Ht("close",t);break;case"iframe":case"object":Ht("load",t);break;case"video":case"audio":for(s=0;s<lo.length;s++)Ht(lo[s],t);break;case"image":Ht("error",t),Ht("load",t);break;case"details":Ht("toggle",t);break;case"embed":case"source":case"link":Ht("error",t),Ht("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(G in i)if(i.hasOwnProperty(G)&&(s=i[G],s!=null))switch(G){case"children":case"dangerouslySetInnerHTML":throw Error(c(137,e));default:te(t,e,G,s,i,null)}return;default:if(Ma(e)){for(W in i)i.hasOwnProperty(W)&&(s=i[W],s!==void 0&&nf(t,e,W,s,i,void 0));return}}for(w in i)i.hasOwnProperty(w)&&(s=i[w],s!=null&&te(t,e,w,s,i,null))}function Xg(t,e,i,s){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,h=null,v=null,w=null,R=null,G=null,W=null;for(J in i){var it=i[J];if(i.hasOwnProperty(J)&&it!=null)switch(J){case"checked":break;case"value":break;case"defaultValue":R=it;default:s.hasOwnProperty(J)||te(t,e,J,null,s,it)}}for(var Q in s){var J=s[Q];if(it=i[Q],s.hasOwnProperty(Q)&&(J!=null||it!=null))switch(Q){case"type":h=J;break;case"name":o=J;break;case"checked":G=J;break;case"defaultChecked":W=J;break;case"value":v=J;break;case"defaultValue":w=J;break;case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(c(137,e));break;default:J!==it&&te(t,e,Q,J,s,it)}}xl(t,v,w,R,G,W,h,o);return;case"select":J=v=w=Q=null;for(h in i)if(R=i[h],i.hasOwnProperty(h)&&R!=null)switch(h){case"value":break;case"multiple":J=R;default:s.hasOwnProperty(h)||te(t,e,h,null,s,R)}for(o in s)if(h=s[o],R=i[o],s.hasOwnProperty(o)&&(h!=null||R!=null))switch(o){case"value":Q=h;break;case"defaultValue":w=h;break;case"multiple":v=h;default:h!==R&&te(t,e,o,h,s,R)}e=w,i=v,s=J,Q!=null?ne(t,!!i,Q,!1):!!s!=!!i&&(e!=null?ne(t,!!i,e,!0):ne(t,!!i,i?[]:"",!1));return;case"textarea":J=Q=null;for(w in i)if(o=i[w],i.hasOwnProperty(w)&&o!=null&&!s.hasOwnProperty(w))switch(w){case"value":break;case"children":break;default:te(t,e,w,null,s,o)}for(v in s)if(o=s[v],h=i[v],s.hasOwnProperty(v)&&(o!=null||h!=null))switch(v){case"value":Q=o;break;case"defaultValue":J=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(c(91));break;default:o!==h&&te(t,e,v,o,s,h)}qn(t,Q,J);return;case"option":for(var dt in i)if(Q=i[dt],i.hasOwnProperty(dt)&&Q!=null&&!s.hasOwnProperty(dt))switch(dt){case"selected":t.selected=!1;break;default:te(t,e,dt,null,s,Q)}for(R in s)if(Q=s[R],J=i[R],s.hasOwnProperty(R)&&Q!==J&&(Q!=null||J!=null))switch(R){case"selected":t.selected=Q&&typeof Q!="function"&&typeof Q!="symbol";break;default:te(t,e,R,Q,s,J)}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 bt in i)Q=i[bt],i.hasOwnProperty(bt)&&Q!=null&&!s.hasOwnProperty(bt)&&te(t,e,bt,null,s,Q);for(G in s)if(Q=s[G],J=i[G],s.hasOwnProperty(G)&&Q!==J&&(Q!=null||J!=null))switch(G){case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(c(137,e));break;default:te(t,e,G,Q,s,J)}return;default:if(Ma(e)){for(var ee in i)Q=i[ee],i.hasOwnProperty(ee)&&Q!==void 0&&!s.hasOwnProperty(ee)&&nf(t,e,ee,void 0,s,Q);for(W in s)Q=s[W],J=i[W],!s.hasOwnProperty(W)||Q===J||Q===void 0&&J===void 0||nf(t,e,W,Q,s,J);return}}for(var Z in i)Q=i[Z],i.hasOwnProperty(Z)&&Q!=null&&!s.hasOwnProperty(Z)&&te(t,e,Z,null,s,Q);for(it in s)Q=s[it],J=i[it],!s.hasOwnProperty(it)||Q===J||Q==null&&J==null||te(t,e,it,Q,s,J)}function hm(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Kg(){if(typeof performance.getEntriesByType=="function"){for(var t=0,e=0,i=performance.getEntriesByType("resource"),s=0;s<i.length;s++){var o=i[s],h=o.transferSize,v=o.initiatorType,w=o.duration;if(h&&w&&hm(v)){for(v=0,w=o.responseEnd,s+=1;s<i.length;s++){var R=i[s],G=R.startTime;if(G>w)break;var W=R.transferSize,it=R.initiatorType;W&&hm(it)&&(R=R.responseEnd,v+=W*(R<w?1:(w-G)/(R-G)))}if(--s,e+=8*(h+v)/(o.duration/1e3),t++,10<t)break}}if(0<t)return e/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var af=null,sf=null;function qr(t){return t.nodeType===9?t:t.ownerDocument}function dm(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function mm(t,e){if(t===0)switch(e){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&e==="foreignObject"?0:t}function lf(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.children=="bigint"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var of=null;function Qg(){var t=window.event;return t&&t.type==="popstate"?t===of?!1:(of=t,!0):(of=null,!1)}var pm=typeof setTimeout=="function"?setTimeout:void 0,Jg=typeof clearTimeout=="function"?clearTimeout:void 0,gm=typeof Promise=="function"?Promise:void 0,Fg=typeof queueMicrotask=="function"?queueMicrotask:typeof gm<"u"?function(t){return gm.resolve(null).then(t).catch(Ig)}:pm;function Ig(t){setTimeout(function(){throw t})}function da(t){return t==="head"}function vm(t,e){var i=e,s=0;do{var o=i.nextSibling;if(t.removeChild(i),o&&o.nodeType===8)if(i=o.data,i==="/$"||i==="/&"){if(s===0){t.removeChild(o),tl(e);return}s--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")s++;else if(i==="html")ro(t.ownerDocument.documentElement);else if(i==="head"){i=t.ownerDocument.head,ro(i);for(var h=i.firstChild;h;){var v=h.nextSibling,w=h.nodeName;h[La]||w==="SCRIPT"||w==="STYLE"||w==="LINK"&&h.rel.toLowerCase()==="stylesheet"||i.removeChild(h),h=v}}else i==="body"&&ro(t.ownerDocument.body);i=o}while(i);tl(e)}function _m(t,e){var i=t;t=0;do{var s=i.nextSibling;if(i.nodeType===1?e?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(e?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),s&&s.nodeType===8)if(i=s.data,i==="/$"){if(t===0)break;t--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||t++;i=s}while(i)}function rf(t){var e=t.firstChild;for(e&&e.nodeType===10&&(e=e.nextSibling);e;){var i=e;switch(e=e.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":rf(i),gl(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}t.removeChild(i)}}function Wg(t,e,i,s){for(;t.nodeType===1;){var o=i;if(t.nodeName.toLowerCase()!==e.toLowerCase()){if(!s&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(s){if(!t[La])switch(e){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(h=t.getAttribute("rel"),h==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(h!==o.rel||t.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||t.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||t.getAttribute("title")!==(o.title==null?null:o.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(h=t.getAttribute("src"),(h!==(o.src==null?null:o.src)||t.getAttribute("type")!==(o.type==null?null:o.type)||t.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&h&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(e==="input"&&t.type==="hidden"){var h=o.name==null?null:""+o.name;if(o.type==="hidden"&&t.getAttribute("name")===h)return t}else return t;if(t=zn(t.nextSibling),t===null)break}return null}function $g(t,e,i){if(e==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!i||(t=zn(t.nextSibling),t===null))return null;return t}function ym(t,e){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!e||(t=zn(t.nextSibling),t===null))return null;return t}function uf(t){return t.data==="$?"||t.data==="$~"}function cf(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function tv(t,e){var i=t.ownerDocument;if(t.data==="$~")t._reactRetry=e;else if(t.data!=="$?"||i.readyState!=="loading")e();else{var s=function(){e(),i.removeEventListener("DOMContentLoaded",s)};i.addEventListener("DOMContentLoaded",s),t._reactRetry=s}}function zn(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?"||e==="$~"||e==="&"||e==="F!"||e==="F")break;if(e==="/$"||e==="/&")return null}}return t}var ff=null;function xm(t){t=t.nextSibling;for(var e=0;t;){if(t.nodeType===8){var i=t.data;if(i==="/$"||i==="/&"){if(e===0)return zn(t.nextSibling);e--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||e++}t=t.nextSibling}return null}function bm(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var i=t.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(e===0)return t;e--}else i!=="/$"&&i!=="/&"||e++}t=t.previousSibling}return null}function Sm(t,e,i){switch(e=qr(i),t){case"html":if(t=e.documentElement,!t)throw Error(c(452));return t;case"head":if(t=e.head,!t)throw Error(c(453));return t;case"body":if(t=e.body,!t)throw Error(c(454));return t;default:throw Error(c(451))}}function ro(t){for(var e=t.attributes;e.length;)t.removeAttributeNode(e[0]);gl(t)}var Tn=new Map,wm=new Set;function Yr(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var Oi=q.d;q.d={f:ev,r:nv,D:iv,C:av,L:sv,m:lv,X:rv,S:ov,M:uv};function ev(){var t=Oi.f(),e=Dr();return t||e}function nv(t){var e=Bi(t);e!==null&&e.tag===5&&e.type==="form"?Ph(e):Oi.r(t)}var Is=typeof document>"u"?null:document;function zm(t,e,i){var s=Is;if(s&&typeof e=="string"&&e){var o=ae(e);o='link[rel="'+t+'"][href="'+o+'"]',typeof i=="string"&&(o+='[crossorigin="'+i+'"]'),wm.has(o)||(wm.add(o),t={rel:t,crossOrigin:i,href:e},s.querySelector(o)===null&&(e=s.createElement("link"),je(e,"link",t),_e(e),s.head.appendChild(e)))}}function iv(t){Oi.D(t),zm("dns-prefetch",t,null)}function av(t,e){Oi.C(t,e),zm("preconnect",t,e)}function sv(t,e,i){Oi.L(t,e,i);var s=Is;if(s&&t&&e){var o='link[rel="preload"][as="'+ae(e)+'"]';e==="image"&&i&&i.imageSrcSet?(o+='[imagesrcset="'+ae(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(o+='[imagesizes="'+ae(i.imageSizes)+'"]')):o+='[href="'+ae(t)+'"]';var h=o;switch(e){case"style":h=Ws(t);break;case"script":h=$s(t)}Tn.has(h)||(t=E({rel:"preload",href:e==="image"&&i&&i.imageSrcSet?void 0:t,as:e},i),Tn.set(h,t),s.querySelector(o)!==null||e==="style"&&s.querySelector(uo(h))||e==="script"&&s.querySelector(co(h))||(e=s.createElement("link"),je(e,"link",t),_e(e),s.head.appendChild(e)))}}function lv(t,e){Oi.m(t,e);var i=Is;if(i&&t){var s=e&&typeof e.as=="string"?e.as:"script",o='link[rel="modulepreload"][as="'+ae(s)+'"][href="'+ae(t)+'"]',h=o;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=$s(t)}if(!Tn.has(h)&&(t=E({rel:"modulepreload",href:t},e),Tn.set(h,t),i.querySelector(o)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(co(h)))return}s=i.createElement("link"),je(s,"link",t),_e(s),i.head.appendChild(s)}}}function ov(t,e,i){Oi.S(t,e,i);var s=Is;if(s&&t){var o=Ui(s).hoistableStyles,h=Ws(t);e=e||"default";var v=o.get(h);if(!v){var w={loading:0,preload:null};if(v=s.querySelector(uo(h)))w.loading=5;else{t=E({rel:"stylesheet",href:t,"data-precedence":e},i),(i=Tn.get(h))&&hf(t,i);var R=v=s.createElement("link");_e(R),je(R,"link",t),R._p=new Promise(function(G,W){R.onload=G,R.onerror=W}),R.addEventListener("load",function(){w.loading|=1}),R.addEventListener("error",function(){w.loading|=2}),w.loading|=4,Gr(v,e,s)}v={type:"stylesheet",instance:v,count:1,state:w},o.set(h,v)}}}function rv(t,e){Oi.X(t,e);var i=Is;if(i&&t){var s=Ui(i).hoistableScripts,o=$s(t),h=s.get(o);h||(h=i.querySelector(co(o)),h||(t=E({src:t,async:!0},e),(e=Tn.get(o))&&df(t,e),h=i.createElement("script"),_e(h),je(h,"link",t),i.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},s.set(o,h))}}function uv(t,e){Oi.M(t,e);var i=Is;if(i&&t){var s=Ui(i).hoistableScripts,o=$s(t),h=s.get(o);h||(h=i.querySelector(co(o)),h||(t=E({src:t,async:!0,type:"module"},e),(e=Tn.get(o))&&df(t,e),h=i.createElement("script"),_e(h),je(h,"link",t),i.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},s.set(o,h))}}function Tm(t,e,i,s){var o=(o=rt.current)?Yr(o):null;if(!o)throw Error(c(446));switch(t){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(e=Ws(i.href),i=Ui(o).hoistableStyles,s=i.get(e),s||(s={type:"style",instance:null,count:0,state:null},i.set(e,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){t=Ws(i.href);var h=Ui(o).hoistableStyles,v=h.get(t);if(v||(o=o.ownerDocument||o,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(t,v),(h=o.querySelector(uo(t)))&&!h._p&&(v.instance=h,v.state.loading=5),Tn.has(t)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},Tn.set(t,i),h||cv(o,t,i,v.state))),e&&s===null)throw Error(c(528,""));return v}if(e&&s!==null)throw Error(c(529,""));return null;case"script":return e=i.async,i=i.src,typeof i=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(e=$s(i),i=Ui(o).hoistableScripts,s=i.get(e),s||(s={type:"script",instance:null,count:0,state:null},i.set(e,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(c(444,t))}}function Ws(t){return'href="'+ae(t)+'"'}function uo(t){return'link[rel="stylesheet"]['+t+"]"}function Em(t){return E({},t,{"data-precedence":t.precedence,precedence:null})}function cv(t,e,i,s){t.querySelector('link[rel="preload"][as="style"]['+e+"]")?s.loading=1:(e=t.createElement("link"),s.preload=e,e.addEventListener("load",function(){return s.loading|=1}),e.addEventListener("error",function(){return s.loading|=2}),je(e,"link",i),_e(e),t.head.appendChild(e))}function $s(t){return'[src="'+ae(t)+'"]'}function co(t){return"script[async]"+t}function Lm(t,e,i){if(e.count++,e.instance===null)switch(e.type){case"style":var s=t.querySelector('style[data-href~="'+ae(i.href)+'"]');if(s)return e.instance=s,_e(s),s;var o=E({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return s=(t.ownerDocument||t).createElement("style"),_e(s),je(s,"style",o),Gr(s,i.precedence,t),e.instance=s;case"stylesheet":o=Ws(i.href);var h=t.querySelector(uo(o));if(h)return e.state.loading|=4,e.instance=h,_e(h),h;s=Em(i),(o=Tn.get(o))&&hf(s,o),h=(t.ownerDocument||t).createElement("link"),_e(h);var v=h;return v._p=new Promise(function(w,R){v.onload=w,v.onerror=R}),je(h,"link",s),e.state.loading|=4,Gr(h,i.precedence,t),e.instance=h;case"script":return h=$s(i.src),(o=t.querySelector(co(h)))?(e.instance=o,_e(o),o):(s=i,(o=Tn.get(h))&&(s=E({},i),df(s,o)),t=t.ownerDocument||t,o=t.createElement("script"),_e(o),je(o,"link",s),t.head.appendChild(o),e.instance=o);case"void":return null;default:throw Error(c(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(s=e.instance,e.state.loading|=4,Gr(s,i.precedence,t));return e.instance}function Gr(t,e,i){for(var s=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=s.length?s[s.length-1]:null,h=o,v=0;v<s.length;v++){var w=s[v];if(w.dataset.precedence===e)h=w;else if(h!==o)break}h?h.parentNode.insertBefore(t,h.nextSibling):(e=i.nodeType===9?i.head:i,e.insertBefore(t,e.firstChild))}function hf(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.title==null&&(t.title=e.title)}function df(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.integrity==null&&(t.integrity=e.integrity)}var Vr=null;function Cm(t,e,i){if(Vr===null){var s=new Map,o=Vr=new Map;o.set(i,s)}else o=Vr,s=o.get(i),s||(s=new Map,o.set(i,s));if(s.has(t))return s;for(s.set(t,null),i=i.getElementsByTagName(t),o=0;o<i.length;o++){var h=i[o];if(!(h[La]||h[ve]||t==="link"&&h.getAttribute("rel")==="stylesheet")&&h.namespaceURI!=="http://www.w3.org/2000/svg"){var v=h.getAttribute(e)||"";v=t+v;var w=s.get(v);w?w.push(h):s.set(v,[h])}}return s}function Nm(t,e,i){t=t.ownerDocument||t,t.head.insertBefore(i,e==="title"?t.querySelector("head > title"):null)}function fv(t,e,i){if(i===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;switch(e.rel){case"stylesheet":return t=e.disabled,typeof e.precedence=="string"&&t==null;default:return!0}case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function Om(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function hv(t,e,i,s){if(i.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var o=Ws(s.href),h=e.querySelector(uo(o));if(h){e=h._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(t.count++,t=Xr.bind(t),e.then(t,t)),i.state.loading|=4,i.instance=h,_e(h);return}h=e.ownerDocument||e,s=Em(s),(o=Tn.get(o))&&hf(s,o),h=h.createElement("link"),_e(h);var v=h;v._p=new Promise(function(w,R){v.onload=w,v.onerror=R}),je(h,"link",s),i.instance=h}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(i,e),(e=i.state.preload)&&(i.state.loading&3)===0&&(t.count++,i=Xr.bind(t),e.addEventListener("load",i),e.addEventListener("error",i))}}var mf=0;function dv(t,e){return t.stylesheets&&t.count===0&&Qr(t,t.stylesheets),0<t.count||0<t.imgCount?function(i){var s=setTimeout(function(){if(t.stylesheets&&Qr(t,t.stylesheets),t.unsuspend){var h=t.unsuspend;t.unsuspend=null,h()}},6e4+e);0<t.imgBytes&&mf===0&&(mf=62500*Kg());var o=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&Qr(t,t.stylesheets),t.unsuspend)){var h=t.unsuspend;t.unsuspend=null,h()}},(t.imgBytes>mf?50:800)+e);return t.unsuspend=i,function(){t.unsuspend=null,clearTimeout(s),clearTimeout(o)}}:null}function Xr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Qr(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Kr=null;function Qr(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Kr=new Map,e.forEach(mv,t),Kr=null,Xr.call(t))}function mv(t,e){if(!(e.state.loading&4)){var i=Kr.get(t);if(i)var s=i.get(null);else{i=new Map,Kr.set(t,i);for(var o=t.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h<o.length;h++){var v=o[h];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(i.set(v.dataset.precedence,v),s=v)}s&&i.set(null,s)}o=e.instance,v=o.getAttribute("data-precedence"),h=i.get(v)||s,h===s&&i.set(null,o),i.set(v,o),this.count++,s=Xr.bind(this),o.addEventListener("load",s),o.addEventListener("error",s),h?h.parentNode.insertBefore(o,h.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(o,t.firstChild)),e.state.loading|=4}}var fo={$$typeof:k,Provider:null,Consumer:null,_currentValue:I,_currentValue2:I,_threadCount:0};function pv(t,e,i,s,o,h,v,w,R){this.tag=1,this.containerInfo=t,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=dl(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=dl(0),this.hiddenUpdates=dl(null),this.identifierPrefix=s,this.onUncaughtError=o,this.onCaughtError=h,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=R,this.incompleteTransitions=new Map}function Mm(t,e,i,s,o,h,v,w,R,G,W,it){return t=new pv(t,e,i,v,R,G,W,it,w),e=1,h===!0&&(e|=24),h=Ue(3,null,null,e),t.current=h,h.stateNode=t,e=Xu(),e.refCount++,t.pooledCache=e,e.refCount++,h.memoizedState={element:s,isDehydrated:i,cache:e},Fu(h),t}function Am(t){return t?(t=gi,t):gi}function Rm(t,e,i,s,o,h){o=Am(o),s.context===null?s.context=o:s.pendingContext=o,s=na(e),s.payload={element:i},h=h===void 0?null:h,h!==null&&(s.callback=h),i=ia(t,s,e),i!==null&&(nn(i,t,e),Yl(i,t,e))}function Dm(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var i=t.retryLane;t.retryLane=i!==0&&i<e?i:e}}function pf(t,e){Dm(t,e),(t=t.alternate)&&Dm(t,e)}function jm(t){if(t.tag===13||t.tag===31){var e=bn(t,67108864);e!==null&&nn(e,t,67108864),pf(t,67108864)}}function Bm(t){if(t.tag===13||t.tag===31){var e=dn();e=Ve(e);var i=bn(t,e);i!==null&&nn(i,t,e),pf(t,e)}}var Jr=!0;function gv(t,e,i,s){var o=D.T;D.T=null;var h=q.p;try{q.p=2,gf(t,e,i,s)}finally{q.p=h,D.T=o}}function vv(t,e,i,s){var o=D.T;D.T=null;var h=q.p;try{q.p=8,gf(t,e,i,s)}finally{q.p=h,D.T=o}}function gf(t,e,i,s){if(Jr){var o=vf(s);if(o===null)ef(t,e,s,Fr,i),Hm(t,s);else if(yv(o,t,e,i,s))s.stopPropagation();else if(Hm(t,s),e&4&&-1<_v.indexOf(t)){for(;o!==null;){var h=Bi(o);if(h!==null)switch(h.tag){case 3:if(h=h.stateNode,h.current.memoizedState.isDehydrated){var v=oi(h.pendingLanes);if(v!==0){var w=h;for(w.pendingLanes|=2,w.entangledLanes|=2;v;){var R=1<<31-ke(v);w.entanglements[1]|=R,v&=~R}ti(h),(Qt&6)===0&&(Ar=Pe()+500,so(0))}}break;case 31:case 13:w=bn(h,2),w!==null&&nn(w,h,2),Dr(),pf(h,2)}if(h=vf(s),h===null&&ef(t,e,s,Fr,i),h===o)break;o=h}o!==null&&s.stopPropagation()}else ef(t,e,s,null,i)}}function vf(t){return t=Aa(t),_f(t)}var Fr=null;function _f(t){if(Fr=null,t=ci(t),t!==null){var e=p(t);if(e===null)t=null;else{var i=e.tag;if(i===13){if(t=_(e),t!==null)return t;t=null}else if(i===31){if(t=z(e),t!==null)return t;t=null}else if(i===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null)}}return Fr=t,null}function Um(t){switch(t){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(Su()){case ds:return 2;case fl:return 8;case ba:case wu:return 32;case hl:return 268435456;default:return 32}default:return 32}}var yf=!1,ma=null,pa=null,ga=null,ho=new Map,mo=new Map,va=[],_v="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 Hm(t,e){switch(t){case"focusin":case"focusout":ma=null;break;case"dragenter":case"dragleave":pa=null;break;case"mouseover":case"mouseout":ga=null;break;case"pointerover":case"pointerout":ho.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":mo.delete(e.pointerId)}}function po(t,e,i,s,o,h){return t===null||t.nativeEvent!==h?(t={blockedOn:e,domEventName:i,eventSystemFlags:s,nativeEvent:h,targetContainers:[o]},e!==null&&(e=Bi(e),e!==null&&jm(e)),t):(t.eventSystemFlags|=s,e=t.targetContainers,o!==null&&e.indexOf(o)===-1&&e.push(o),t)}function yv(t,e,i,s,o){switch(e){case"focusin":return ma=po(ma,t,e,i,s,o),!0;case"dragenter":return pa=po(pa,t,e,i,s,o),!0;case"mouseover":return ga=po(ga,t,e,i,s,o),!0;case"pointerover":var h=o.pointerId;return ho.set(h,po(ho.get(h)||null,t,e,i,s,o)),!0;case"gotpointercapture":return h=o.pointerId,mo.set(h,po(mo.get(h)||null,t,e,i,s,o)),!0}return!1}function Zm(t){var e=ci(t.target);if(e!==null){var i=p(e);if(i!==null){if(e=i.tag,e===13){if(e=_(i),e!==null){t.blockedOn=e,pl(t.priority,function(){Bm(i)});return}}else if(e===31){if(e=z(i),e!==null){t.blockedOn=e,pl(t.priority,function(){Bm(i)});return}}else if(e===3&&i.stateNode.current.memoizedState.isDehydrated){t.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Ir(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var i=vf(t.nativeEvent);if(i===null){i=t.nativeEvent;var s=new i.constructor(i.type,i);_s=s,i.target.dispatchEvent(s),_s=null}else return e=Bi(i),e!==null&&jm(e),t.blockedOn=i,!1;e.shift()}return!0}function Pm(t,e,i){Ir(t)&&i.delete(e)}function xv(){yf=!1,ma!==null&&Ir(ma)&&(ma=null),pa!==null&&Ir(pa)&&(pa=null),ga!==null&&Ir(ga)&&(ga=null),ho.forEach(Pm),mo.forEach(Pm)}function Wr(t,e){t.blockedOn===e&&(t.blockedOn=null,yf||(yf=!0,f.unstable_scheduleCallback(f.unstable_NormalPriority,xv)))}var $r=null;function km(t){$r!==t&&($r=t,f.unstable_scheduleCallback(f.unstable_NormalPriority,function(){$r===t&&($r=null);for(var e=0;e<t.length;e+=3){var i=t[e],s=t[e+1],o=t[e+2];if(typeof s!="function"){if(_f(s||i)===null)continue;break}var h=Bi(i);h!==null&&(t.splice(e,3),e-=3,gc(h,{pending:!0,data:o,method:i.method,action:s},s,o))}}))}function tl(t){function e(R){return Wr(R,t)}ma!==null&&Wr(ma,t),pa!==null&&Wr(pa,t),ga!==null&&Wr(ga,t),ho.forEach(e),mo.forEach(e);for(var i=0;i<va.length;i++){var s=va[i];s.blockedOn===t&&(s.blockedOn=null)}for(;0<va.length&&(i=va[0],i.blockedOn===null);)Zm(i),i.blockedOn===null&&va.shift();if(i=(t.ownerDocument||t).$$reactFormReplay,i!=null)for(s=0;s<i.length;s+=3){var o=i[s],h=i[s+1],v=o[Le]||null;if(typeof h=="function")v||km(i);else if(v){var w=null;if(h&&h.hasAttribute("formAction")){if(o=h,v=h[Le]||null)w=v.formAction;else if(_f(o)!==null)continue}else w=v.action;typeof w=="function"?i[s+1]=w:(i.splice(s,3),s-=3),km(i)}}}function qm(){function t(h){h.canIntercept&&h.info==="react-transition"&&h.intercept({handler:function(){return new Promise(function(v){return o=v})},focusReset:"manual",scroll:"manual"})}function e(){o!==null&&(o(),o=null),s||setTimeout(i,20)}function i(){if(!s&&!navigation.transition){var h=navigation.currentEntry;h&&h.url!=null&&navigation.navigate(h.url,{state:h.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,o=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",e),navigation.addEventListener("navigateerror",e),setTimeout(i,100),function(){s=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",e),navigation.removeEventListener("navigateerror",e),o!==null&&(o(),o=null)}}}function xf(t){this._internalRoot=t}tu.prototype.render=xf.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(c(409));var i=e.current,s=dn();Rm(i,s,t,e,null,null)},tu.prototype.unmount=xf.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Rm(t.current,2,null,t,null,null),Dr(),e[ui]=null}};function tu(t){this._internalRoot=t}tu.prototype.unstable_scheduleHydration=function(t){if(t){var e=ml();t={blockedOn:null,target:t,priority:e};for(var i=0;i<va.length&&e!==0&&e<va[i].priority;i++);va.splice(i,0,t),i===0&&Zm(t)}};var Ym=u.version;if(Ym!=="19.2.4")throw Error(c(527,Ym,"19.2.4"));q.findDOMNode=function(t){var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(c(188)):(t=Object.keys(t).join(","),Error(c(268,t)));return t=x(e),t=t!==null?T(t):null,t=t===null?null:t.stateNode,t};var bv={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var eu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!eu.isDisabled&&eu.supportsFiber)try{ji=eu.inject(bv),Me=eu}catch{}}return vo.createRoot=function(t,e){if(!m(t))throw Error(c(299));var i=!1,s="",o=Fh,h=Ih,v=Wh;return e!=null&&(e.unstable_strictMode===!0&&(i=!0),e.identifierPrefix!==void 0&&(s=e.identifierPrefix),e.onUncaughtError!==void 0&&(o=e.onUncaughtError),e.onCaughtError!==void 0&&(h=e.onCaughtError),e.onRecoverableError!==void 0&&(v=e.onRecoverableError)),e=Mm(t,1,!1,null,null,i,s,null,o,h,v,qm),t[ui]=e.current,tf(t),new xf(e)},vo.hydrateRoot=function(t,e,i){if(!m(t))throw Error(c(299));var s=!1,o="",h=Fh,v=Ih,w=Wh,R=null;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(o=i.identifierPrefix),i.onUncaughtError!==void 0&&(h=i.onUncaughtError),i.onCaughtError!==void 0&&(v=i.onCaughtError),i.onRecoverableError!==void 0&&(w=i.onRecoverableError),i.formState!==void 0&&(R=i.formState)),e=Mm(t,1,!0,e,i??null,s,o,R,h,v,w,qm),e.context=Am(null),i=e.current,s=dn(),s=Ve(s),o=na(s),o.callback=null,ia(i,o,s),i=s,e.current.lanes=i,ri(e,i),ti(e),t[ui]=e.current,tf(t),new tu(e)},vo.version="19.2.4",vo}var $m;function Ov(){if($m)return wf.exports;$m=1;function f(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(f)}catch(u){console.error(u)}}return f(),wf.exports=Nv(),wf.exports}var Mv=Ov();/**
* react-router v7.13.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 tp="popstate";function ep(f){return typeof f=="object"&&f!=null&&"pathname"in f&&"search"in f&&"hash"in f&&"state"in f&&"key"in f}function Av(f={}){function u(c,m){var x;let p=(x=m.state)==null?void 0:x.masked,{pathname:_,search:z,hash:y}=p||c.location;return Af("",{pathname:_,search:z,hash:y},m.state&&m.state.usr||null,m.state&&m.state.key||"default",p?{pathname:c.location.pathname,search:c.location.search,hash:c.location.hash}:void 0)}function r(c,m){return typeof m=="string"?m:zo(m)}return Dv(u,r,null,f)}function re(f,u){if(f===!1||f===null||typeof f>"u")throw new Error(u)}function Hn(f,u){if(!f){typeof console<"u"&&console.warn(u);try{throw new Error(u)}catch{}}}function Rv(){return Math.random().toString(36).substring(2,10)}function np(f,u){return{usr:f.state,key:f.key,idx:u,masked:f.unstable_mask?{pathname:f.pathname,search:f.search,hash:f.hash}:void 0}}function Af(f,u,r=null,c,m){return{pathname:typeof f=="string"?f:f.pathname,search:"",hash:"",...typeof u=="string"?sl(u):u,state:r,key:u&&u.key||c||Rv(),unstable_mask:m}}function zo({pathname:f="/",search:u="",hash:r=""}){return u&&u!=="?"&&(f+=u.charAt(0)==="?"?u:"?"+u),r&&r!=="#"&&(f+=r.charAt(0)==="#"?r:"#"+r),f}function sl(f){let u={};if(f){let r=f.indexOf("#");r>=0&&(u.hash=f.substring(r),f=f.substring(0,r));let c=f.indexOf("?");c>=0&&(u.search=f.substring(c),f=f.substring(0,c)),f&&(u.pathname=f)}return u}function Dv(f,u,r,c={}){let{window:m=document.defaultView,v5Compat:p=!1}=c,_=m.history,z="POP",y=null,x=T();x==null&&(x=0,_.replaceState({..._.state,idx:x},""));function T(){return(_.state||{idx:null}).idx}function E(){z="POP";let V=T(),et=V==null?null:V-x;x=V,y&&y({action:z,location:B.location,delta:et})}function O(V,et){z="PUSH";let U=ep(V)?V:Af(B.location,V,et);x=T()+1;let k=np(U,x),F=B.createHref(U.unstable_mask||U);try{_.pushState(k,"",F)}catch(mt){if(mt instanceof DOMException&&mt.name==="DataCloneError")throw mt;m.location.assign(F)}p&&y&&y({action:z,location:B.location,delta:1})}function H(V,et){z="REPLACE";let U=ep(V)?V:Af(B.location,V,et);x=T();let k=np(U,x),F=B.createHref(U.unstable_mask||U);_.replaceState(k,"",F),p&&y&&y({action:z,location:B.location,delta:0})}function A(V){return jv(V)}let B={get action(){return z},get location(){return f(m,_)},listen(V){if(y)throw new Error("A history only accepts one active listener");return m.addEventListener(tp,E),y=V,()=>{m.removeEventListener(tp,E),y=null}},createHref(V){return u(m,V)},createURL:A,encodeLocation(V){let et=A(V);return{pathname:et.pathname,search:et.search,hash:et.hash}},push:O,replace:H,go(V){return _.go(V)}};return B}function jv(f,u=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),re(r,"No window.location.(origin|href) available to create URL");let c=typeof f=="string"?f:zo(f);return c=c.replace(/ $/,"%20"),!u&&c.startsWith("//")&&(c=r+c),new URL(c,r)}function Ep(f,u,r="/"){return Bv(f,u,r,!1)}function Bv(f,u,r,c){let m=typeof u=="string"?sl(u):u,p=Ri(m.pathname||"/",r);if(p==null)return null;let _=Lp(f);Uv(_);let z=null;for(let y=0;z==null&&y<_.length;++y){let x=Qv(p);z=Xv(_[y],x,c)}return z}function Lp(f,u=[],r=[],c="",m=!1){let p=(_,z,y=m,x)=>{let T={relativePath:x===void 0?_.path||"":x,caseSensitive:_.caseSensitive===!0,childrenIndex:z,route:_};if(T.relativePath.startsWith("/")){if(!T.relativePath.startsWith(c)&&y)return;re(T.relativePath.startsWith(c),`Absolute route path "${T.relativePath}" nested under path "${c}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),T.relativePath=T.relativePath.slice(c.length)}let E=ii([c,T.relativePath]),O=r.concat(T);_.children&&_.children.length>0&&(re(_.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${E}".`),Lp(_.children,u,O,E,y)),!(_.path==null&&!_.index)&&u.push({path:E,score:Gv(E,_.index),routesMeta:O})};return f.forEach((_,z)=>{var y;if(_.path===""||!((y=_.path)!=null&&y.includes("?")))p(_,z);else for(let x of Cp(_.path))p(_,z,!0,x)}),u}function Cp(f){let u=f.split("/");if(u.length===0)return[];let[r,...c]=u,m=r.endsWith("?"),p=r.replace(/\?$/,"");if(c.length===0)return m?[p,""]:[p];let _=Cp(c.join("/")),z=[];return z.push(..._.map(y=>y===""?p:[p,y].join("/"))),m&&z.push(..._),z.map(y=>f.startsWith("/")&&y===""?"/":y)}function Uv(f){f.sort((u,r)=>u.score!==r.score?r.score-u.score:Vv(u.routesMeta.map(c=>c.childrenIndex),r.routesMeta.map(c=>c.childrenIndex)))}var Hv=/^:[\w-]+$/,Zv=3,Pv=2,kv=1,qv=10,Yv=-2,ip=f=>f==="*";function Gv(f,u){let r=f.split("/"),c=r.length;return r.some(ip)&&(c+=Yv),u&&(c+=Pv),r.filter(m=>!ip(m)).reduce((m,p)=>m+(Hv.test(p)?Zv:p===""?kv:qv),c)}function Vv(f,u){return f.length===u.length&&f.slice(0,-1).every((c,m)=>c===u[m])?f[f.length-1]-u[u.length-1]:0}function Xv(f,u,r=!1){let{routesMeta:c}=f,m={},p="/",_=[];for(let z=0;z<c.length;++z){let y=c[z],x=z===c.length-1,T=p==="/"?u:u.slice(p.length)||"/",E=ou({path:y.relativePath,caseSensitive:y.caseSensitive,end:x},T),O=y.route;if(!E&&x&&r&&!c[c.length-1].route.index&&(E=ou({path:y.relativePath,caseSensitive:y.caseSensitive,end:!1},T)),!E)return null;Object.assign(m,E.params),_.push({params:m,pathname:ii([p,E.pathname]),pathnameBase:Wv(ii([p,E.pathnameBase])),route:O}),E.pathnameBase!=="/"&&(p=ii([p,E.pathnameBase]))}return _}function ou(f,u){typeof f=="string"&&(f={path:f,caseSensitive:!1,end:!0});let[r,c]=Kv(f.path,f.caseSensitive,f.end),m=u.match(r);if(!m)return null;let p=m[0],_=p.replace(/(.)\/+$/,"$1"),z=m.slice(1);return{params:c.reduce((x,{paramName:T,isOptional:E},O)=>{if(T==="*"){let A=z[O]||"";_=p.slice(0,p.length-A.length).replace(/(.)\/+$/,"$1")}const H=z[O];return E&&!H?x[T]=void 0:x[T]=(H||"").replace(/%2F/g,"/"),x},{}),pathname:p,pathnameBase:_,pattern:f}}function Kv(f,u=!1,r=!0){Hn(f==="*"||!f.endsWith("*")||f.endsWith("/*"),`Route path "${f}" will be treated as if it were "${f.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${f.replace(/\*$/,"/*")}".`);let c=[],m="^"+f.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(_,z,y,x,T)=>{if(c.push({paramName:z,isOptional:y!=null}),y){let E=T.charAt(x+_.length);return E&&E!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return f.endsWith("*")?(c.push({paramName:"*"}),m+=f==="*"||f==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?m+="\\/*$":f!==""&&f!=="/"&&(m+="(?:(?=\\/|$))"),[new RegExp(m,u?void 0:"i"),c]}function Qv(f){try{return f.split("/").map(u=>decodeURIComponent(u).replace(/\//g,"%2F")).join("/")}catch(u){return Hn(!1,`The URL path "${f}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${u}).`),f}}function Ri(f,u){if(u==="/")return f;if(!f.toLowerCase().startsWith(u.toLowerCase()))return null;let r=u.endsWith("/")?u.length-1:u.length,c=f.charAt(r);return c&&c!=="/"?null:f.slice(r)||"/"}var Jv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Fv(f,u="/"){let{pathname:r,search:c="",hash:m=""}=typeof f=="string"?sl(f):f,p;return r?(r=r.replace(/\/\/+/g,"/"),r.startsWith("/")?p=ap(r.substring(1),"/"):p=ap(r,u)):p=u,{pathname:p,search:$v(c),hash:t_(m)}}function ap(f,u){let r=u.replace(/\/+$/,"").split("/");return f.split("/").forEach(m=>{m===".."?r.length>1&&r.pop():m!=="."&&r.push(m)}),r.length>1?r.join("/"):"/"}function Lf(f,u,r,c){return`Cannot include a '${f}' character in a manually specified \`to.${u}\` field [${JSON.stringify(c)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Iv(f){return f.filter((u,r)=>r===0||u.route.path&&u.route.path.length>0)}function Zf(f){let u=Iv(f);return u.map((r,c)=>c===u.length-1?r.pathname:r.pathnameBase)}function du(f,u,r,c=!1){let m;typeof f=="string"?m=sl(f):(m={...f},re(!m.pathname||!m.pathname.includes("?"),Lf("?","pathname","search",m)),re(!m.pathname||!m.pathname.includes("#"),Lf("#","pathname","hash",m)),re(!m.search||!m.search.includes("#"),Lf("#","search","hash",m)));let p=f===""||m.pathname==="",_=p?"/":m.pathname,z;if(_==null)z=r;else{let E=u.length-1;if(!c&&_.startsWith("..")){let O=_.split("/");for(;O[0]==="..";)O.shift(),E-=1;m.pathname=O.join("/")}z=E>=0?u[E]:"/"}let y=Fv(m,z),x=_&&_!=="/"&&_.endsWith("/"),T=(p||_===".")&&r.endsWith("/");return!y.pathname.endsWith("/")&&(x||T)&&(y.pathname+="/"),y}var ii=f=>f.join("/").replace(/\/\/+/g,"/"),Wv=f=>f.replace(/\/+$/,"").replace(/^\/*/,"/"),$v=f=>!f||f==="?"?"":f.startsWith("?")?f:"?"+f,t_=f=>!f||f==="#"?"":f.startsWith("#")?f:"#"+f,e_=class{constructor(f,u,r,c=!1){this.status=f,this.statusText=u||"",this.internal=c,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function n_(f){return f!=null&&typeof f.status=="number"&&typeof f.statusText=="string"&&typeof f.internal=="boolean"&&"data"in f}function i_(f){return f.map(u=>u.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Np=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Op(f,u){let r=f;if(typeof r!="string"||!Jv.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let c=r,m=!1;if(Np)try{let p=new URL(window.location.href),_=r.startsWith("//")?new URL(p.protocol+r):new URL(r),z=Ri(_.pathname,u);_.origin===p.origin&&z!=null?r=z+_.search+_.hash:m=!0}catch{Hn(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:c,isExternal:m,to:r}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Mp=["POST","PUT","PATCH","DELETE"];new Set(Mp);var a_=["GET",...Mp];new Set(a_);var ll=C.createContext(null);ll.displayName="DataRouter";var mu=C.createContext(null);mu.displayName="DataRouterState";var s_=C.createContext(!1),Ap=C.createContext({isTransitioning:!1});Ap.displayName="ViewTransition";var l_=C.createContext(new Map);l_.displayName="Fetchers";var o_=C.createContext(null);o_.displayName="Await";var mn=C.createContext(null);mn.displayName="Navigation";var Eo=C.createContext(null);Eo.displayName="Location";var ai=C.createContext({outlet:null,matches:[],isDataRoute:!1});ai.displayName="Route";var Pf=C.createContext(null);Pf.displayName="RouteError";var Rp="REACT_ROUTER_ERROR",r_="REDIRECT",u_="ROUTE_ERROR_RESPONSE";function c_(f){if(f.startsWith(`${Rp}:${r_}:{`))try{let u=JSON.parse(f.slice(28));if(typeof u=="object"&&u&&typeof u.status=="number"&&typeof u.statusText=="string"&&typeof u.location=="string"&&typeof u.reloadDocument=="boolean"&&typeof u.replace=="boolean")return u}catch{}}function f_(f){if(f.startsWith(`${Rp}:${u_}:{`))try{let u=JSON.parse(f.slice(40));if(typeof u=="object"&&u&&typeof u.status=="number"&&typeof u.statusText=="string")return new e_(u.status,u.statusText,u.data)}catch{}}function h_(f,{relative:u}={}){re(ol(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:c}=C.useContext(mn),{hash:m,pathname:p,search:_}=Lo(f,{relative:u}),z=p;return r!=="/"&&(z=p==="/"?r:ii([r,p])),c.createHref({pathname:z,search:_,hash:m})}function ol(){return C.useContext(Eo)!=null}function Di(){return re(ol(),"useLocation() may be used only in the context of a <Router> component."),C.useContext(Eo).location}var Dp="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function jp(f){C.useContext(mn).static||C.useLayoutEffect(f)}function pu(){let{isDataRoute:f}=C.useContext(ai);return f?T_():d_()}function d_(){re(ol(),"useNavigate() may be used only in the context of a <Router> component.");let f=C.useContext(ll),{basename:u,navigator:r}=C.useContext(mn),{matches:c}=C.useContext(ai),{pathname:m}=Di(),p=JSON.stringify(Zf(c)),_=C.useRef(!1);return jp(()=>{_.current=!0}),C.useCallback((y,x={})=>{if(Hn(_.current,Dp),!_.current)return;if(typeof y=="number"){r.go(y);return}let T=du(y,JSON.parse(p),m,x.relative==="path");f==null&&u!=="/"&&(T.pathname=T.pathname==="/"?u:ii([u,T.pathname])),(x.replace?r.replace:r.push)(T,x.state,x)},[u,r,p,m,f])}C.createContext(null);function Lo(f,{relative:u}={}){let{matches:r}=C.useContext(ai),{pathname:c}=Di(),m=JSON.stringify(Zf(r));return C.useMemo(()=>du(f,JSON.parse(m),c,u==="path"),[f,m,c,u])}function m_(f,u){return Bp(f,u)}function Bp(f,u,r){var V;re(ol(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:c}=C.useContext(mn),{matches:m}=C.useContext(ai),p=m[m.length-1],_=p?p.params:{},z=p?p.pathname:"/",y=p?p.pathnameBase:"/",x=p&&p.route;{let et=x&&x.path||"";Hp(z,!x||et.endsWith("*")||et.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${z}" (under <Route path="${et}">) 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="${et}"> to <Route path="${et==="/"?"*":`${et}/*`}">.`)}let T=Di(),E;if(u){let et=typeof u=="string"?sl(u):u;re(y==="/"||((V=et.pathname)==null?void 0:V.startsWith(y)),`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 "${y}" but pathname "${et.pathname}" was given in the \`location\` prop.`),E=et}else E=T;let O=E.pathname||"/",H=O;if(y!=="/"){let et=y.replace(/^\//,"").split("/");H="/"+O.replace(/^\//,"").split("/").slice(et.length).join("/")}let A=Ep(f,{pathname:H});Hn(x||A!=null,`No routes matched location "${E.pathname}${E.search}${E.hash}" `),Hn(A==null||A[A.length-1].route.element!==void 0||A[A.length-1].route.Component!==void 0||A[A.length-1].route.lazy!==void 0,`Matched leaf route at location "${E.pathname}${E.search}${E.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 B=y_(A&&A.map(et=>Object.assign({},et,{params:Object.assign({},_,et.params),pathname:ii([y,c.encodeLocation?c.encodeLocation(et.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:et.pathname]),pathnameBase:et.pathnameBase==="/"?y:ii([y,c.encodeLocation?c.encodeLocation(et.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:et.pathnameBase])})),m,r);return u&&B?C.createElement(Eo.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...E},navigationType:"POP"}},B):B}function p_(){let f=z_(),u=n_(f)?`${f.status} ${f.statusText}`:f instanceof Error?f.message:JSON.stringify(f),r=f instanceof Error?f.stack:null,c="rgba(200,200,200, 0.5)",m={padding:"0.5rem",backgroundColor:c},p={padding:"2px 4px",backgroundColor:c},_=null;return console.error("Error handled by React Router default ErrorBoundary:",f),_=C.createElement(C.Fragment,null,C.createElement("p",null,"💿 Hey developer 👋"),C.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",C.createElement("code",{style:p},"ErrorBoundary")," or"," ",C.createElement("code",{style:p},"errorElement")," prop on your route.")),C.createElement(C.Fragment,null,C.createElement("h2",null,"Unexpected Application Error!"),C.createElement("h3",{style:{fontStyle:"italic"}},u),r?C.createElement("pre",{style:m},r):null,_)}var g_=C.createElement(p_,null),Up=class extends C.Component{constructor(f){super(f),this.state={location:f.location,revalidation:f.revalidation,error:f.error}}static getDerivedStateFromError(f){return{error:f}}static getDerivedStateFromProps(f,u){return u.location!==f.location||u.revalidation!=="idle"&&f.revalidation==="idle"?{error:f.error,location:f.location,revalidation:f.revalidation}:{error:f.error!==void 0?f.error:u.error,location:u.location,revalidation:f.revalidation||u.revalidation}}componentDidCatch(f,u){this.props.onError?this.props.onError(f,u):console.error("React Router caught the following error during render",f)}render(){let f=this.state.error;if(this.context&&typeof f=="object"&&f&&"digest"in f&&typeof f.digest=="string"){const r=f_(f.digest);r&&(f=r)}let u=f!==void 0?C.createElement(ai.Provider,{value:this.props.routeContext},C.createElement(Pf.Provider,{value:f,children:this.props.component})):this.props.children;return this.context?C.createElement(v_,{error:f},u):u}};Up.contextType=s_;var Cf=new WeakMap;function v_({children:f,error:u}){let{basename:r}=C.useContext(mn);if(typeof u=="object"&&u&&"digest"in u&&typeof u.digest=="string"){let c=c_(u.digest);if(c){let m=Cf.get(u);if(m)throw m;let p=Op(c.location,r);if(Np&&!Cf.get(u))if(p.isExternal||c.reloadDocument)window.location.href=p.absoluteURL||p.to;else{const _=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(p.to,{replace:c.replace}));throw Cf.set(u,_),_}return C.createElement("meta",{httpEquiv:"refresh",content:`0;url=${p.absoluteURL||p.to}`})}}return f}function __({routeContext:f,match:u,children:r}){let c=C.useContext(ll);return c&&c.static&&c.staticContext&&(u.route.errorElement||u.route.ErrorBoundary)&&(c.staticContext._deepestRenderedBoundaryId=u.route.id),C.createElement(ai.Provider,{value:f},r)}function y_(f,u=[],r){let c=r==null?void 0:r.state;if(f==null){if(!c)return null;if(c.errors)f=c.matches;else if(u.length===0&&!c.initialized&&c.matches.length>0)f=c.matches;else return null}let m=f,p=c==null?void 0:c.errors;if(p!=null){let T=m.findIndex(E=>E.route.id&&(p==null?void 0:p[E.route.id])!==void 0);re(T>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(p).join(",")}`),m=m.slice(0,Math.min(m.length,T+1))}let _=!1,z=-1;if(r&&c){_=c.renderFallback;for(let T=0;T<m.length;T++){let E=m[T];if((E.route.HydrateFallback||E.route.hydrateFallbackElement)&&(z=T),E.route.id){let{loaderData:O,errors:H}=c,A=E.route.loader&&!O.hasOwnProperty(E.route.id)&&(!H||H[E.route.id]===void 0);if(E.route.lazy||A){r.isStatic&&(_=!0),z>=0?m=m.slice(0,z+1):m=[m[0]];break}}}}let y=r==null?void 0:r.onError,x=c&&y?(T,E)=>{var O,H;y(T,{location:c.location,params:((H=(O=c.matches)==null?void 0:O[0])==null?void 0:H.params)??{},unstable_pattern:i_(c.matches),errorInfo:E})}:void 0;return m.reduceRight((T,E,O)=>{let H,A=!1,B=null,V=null;c&&(H=p&&E.route.id?p[E.route.id]:void 0,B=E.route.errorElement||g_,_&&(z<0&&O===0?(Hp("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),A=!0,V=null):z===O&&(A=!0,V=E.route.hydrateFallbackElement||null)));let et=u.concat(m.slice(0,O+1)),U=()=>{let k;return H?k=B:A?k=V:E.route.Component?k=C.createElement(E.route.Component,null):E.route.element?k=E.route.element:k=T,C.createElement(__,{match:E,routeContext:{outlet:T,matches:et,isDataRoute:c!=null},children:k})};return c&&(E.route.ErrorBoundary||E.route.errorElement||O===0)?C.createElement(Up,{location:c.location,revalidation:c.revalidation,component:B,error:H,children:U(),routeContext:{outlet:null,matches:et,isDataRoute:!0},onError:x}):U()},null)}function kf(f){return`${f} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function x_(f){let u=C.useContext(ll);return re(u,kf(f)),u}function b_(f){let u=C.useContext(mu);return re(u,kf(f)),u}function S_(f){let u=C.useContext(ai);return re(u,kf(f)),u}function qf(f){let u=S_(f),r=u.matches[u.matches.length-1];return re(r.route.id,`${f} can only be used on routes that contain a unique "id"`),r.route.id}function w_(){return qf("useRouteId")}function z_(){var c;let f=C.useContext(Pf),u=b_("useRouteError"),r=qf("useRouteError");return f!==void 0?f:(c=u.errors)==null?void 0:c[r]}function T_(){let{router:f}=x_("useNavigate"),u=qf("useNavigate"),r=C.useRef(!1);return jp(()=>{r.current=!0}),C.useCallback(async(m,p={})=>{Hn(r.current,Dp),r.current&&(typeof m=="number"?await f.navigate(m):await f.navigate(m,{fromRouteId:u,...p}))},[f,u])}var sp={};function Hp(f,u,r){!u&&!sp[f]&&(sp[f]=!0,Hn(!1,r))}C.memo(E_);function E_({routes:f,future:u,state:r,isStatic:c,onError:m}){return Bp(f,void 0,{state:r,isStatic:c,onError:m})}function Zp({to:f,replace:u,state:r,relative:c}){re(ol(),"<Navigate> may be used only in the context of a <Router> component.");let{static:m}=C.useContext(mn);Hn(!m,"<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:p}=C.useContext(ai),{pathname:_}=Di(),z=pu(),y=du(f,Zf(p),_,c==="path"),x=JSON.stringify(y);return C.useEffect(()=>{z(JSON.parse(x),{replace:u,state:r,relative:c})},[z,x,c,u,r]),null}function Mi(f){re(!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 L_({basename:f="/",children:u=null,location:r,navigationType:c="POP",navigator:m,static:p=!1,unstable_useTransitions:_}){re(!ol(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let z=f.replace(/^\/*/,"/"),y=C.useMemo(()=>({basename:z,navigator:m,static:p,unstable_useTransitions:_,future:{}}),[z,m,p,_]);typeof r=="string"&&(r=sl(r));let{pathname:x="/",search:T="",hash:E="",state:O=null,key:H="default",unstable_mask:A}=r,B=C.useMemo(()=>{let V=Ri(x,z);return V==null?null:{location:{pathname:V,search:T,hash:E,state:O,key:H,unstable_mask:A},navigationType:c}},[z,x,T,E,O,H,c,A]);return Hn(B!=null,`<Router basename="${z}"> is not able to match the URL "${x}${T}${E}" because it does not start with the basename, so the <Router> won't render anything.`),B==null?null:C.createElement(mn.Provider,{value:y},C.createElement(Eo.Provider,{children:u,value:B}))}function lp({children:f,location:u}){return m_(Rf(f),u)}function Rf(f,u=[]){let r=[];return C.Children.forEach(f,(c,m)=>{if(!C.isValidElement(c))return;let p=[...u,m];if(c.type===C.Fragment){r.push.apply(r,Rf(c.props.children,p));return}re(c.type===Mi,`[${typeof c.type=="string"?c.type:c.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),re(!c.props.index||!c.props.children,"An index route cannot have child routes.");let _={id:c.props.id||p.join("-"),caseSensitive:c.props.caseSensitive,element:c.props.element,Component:c.props.Component,index:c.props.index,path:c.props.path,middleware:c.props.middleware,loader:c.props.loader,action:c.props.action,hydrateFallbackElement:c.props.hydrateFallbackElement,HydrateFallback:c.props.HydrateFallback,errorElement:c.props.errorElement,ErrorBoundary:c.props.ErrorBoundary,hasErrorBoundary:c.props.hasErrorBoundary===!0||c.props.ErrorBoundary!=null||c.props.errorElement!=null,shouldRevalidate:c.props.shouldRevalidate,handle:c.props.handle,lazy:c.props.lazy};c.props.children&&(_.children=Rf(c.props.children,p)),r.push(_)}),r}var su="get",lu="application/x-www-form-urlencoded";function gu(f){return typeof HTMLElement<"u"&&f instanceof HTMLElement}function C_(f){return gu(f)&&f.tagName.toLowerCase()==="button"}function N_(f){return gu(f)&&f.tagName.toLowerCase()==="form"}function O_(f){return gu(f)&&f.tagName.toLowerCase()==="input"}function M_(f){return!!(f.metaKey||f.altKey||f.ctrlKey||f.shiftKey)}function A_(f,u){return f.button===0&&(!u||u==="_self")&&!M_(f)}var nu=null;function R_(){if(nu===null)try{new FormData(document.createElement("form"),0),nu=!1}catch{nu=!0}return nu}var D_=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Nf(f){return f!=null&&!D_.has(f)?(Hn(!1,`"${f}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${lu}"`),null):f}function j_(f,u){let r,c,m,p,_;if(N_(f)){let z=f.getAttribute("action");c=z?Ri(z,u):null,r=f.getAttribute("method")||su,m=Nf(f.getAttribute("enctype"))||lu,p=new FormData(f)}else if(C_(f)||O_(f)&&(f.type==="submit"||f.type==="image")){let z=f.form;if(z==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let y=f.getAttribute("formaction")||z.getAttribute("action");if(c=y?Ri(y,u):null,r=f.getAttribute("formmethod")||z.getAttribute("method")||su,m=Nf(f.getAttribute("formenctype"))||Nf(z.getAttribute("enctype"))||lu,p=new FormData(z,f),!R_()){let{name:x,type:T,value:E}=f;if(T==="image"){let O=x?`${x}.`:"";p.append(`${O}x`,"0"),p.append(`${O}y`,"0")}else x&&p.append(x,E)}}else{if(gu(f))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=su,c=null,m=lu,_=f}return p&&m==="text/plain"&&(_=p,p=void 0),{action:c,method:r.toLowerCase(),encType:m,formData:p,body:_}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Yf(f,u){if(f===!1||f===null||typeof f>"u")throw new Error(u)}function B_(f,u,r,c){let m=typeof f=="string"?new URL(f,typeof window>"u"?"server://singlefetch/":window.location.origin):f;return r?m.pathname.endsWith("/")?m.pathname=`${m.pathname}_.${c}`:m.pathname=`${m.pathname}.${c}`:m.pathname==="/"?m.pathname=`_root.${c}`:u&&Ri(m.pathname,u)==="/"?m.pathname=`${u.replace(/\/$/,"")}/_root.${c}`:m.pathname=`${m.pathname.replace(/\/$/,"")}.${c}`,m}async function U_(f,u){if(f.id in u)return u[f.id];try{let r=await import(f.module);return u[f.id]=r,r}catch(r){return console.error(`Error loading route module \`${f.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function H_(f){return f==null?!1:f.href==null?f.rel==="preload"&&typeof f.imageSrcSet=="string"&&typeof f.imageSizes=="string":typeof f.rel=="string"&&typeof f.href=="string"}async function Z_(f,u,r){let c=await Promise.all(f.map(async m=>{let p=u.routes[m.route.id];if(p){let _=await U_(p,r);return _.links?_.links():[]}return[]}));return Y_(c.flat(1).filter(H_).filter(m=>m.rel==="stylesheet"||m.rel==="preload").map(m=>m.rel==="stylesheet"?{...m,rel:"prefetch",as:"style"}:{...m,rel:"prefetch"}))}function op(f,u,r,c,m,p){let _=(y,x)=>r[x]?y.route.id!==r[x].route.id:!0,z=(y,x)=>{var T;return r[x].pathname!==y.pathname||((T=r[x].route.path)==null?void 0:T.endsWith("*"))&&r[x].params["*"]!==y.params["*"]};return p==="assets"?u.filter((y,x)=>_(y,x)||z(y,x)):p==="data"?u.filter((y,x)=>{var E;let T=c.routes[y.route.id];if(!T||!T.hasLoader)return!1;if(_(y,x)||z(y,x))return!0;if(y.route.shouldRevalidate){let O=y.route.shouldRevalidate({currentUrl:new URL(m.pathname+m.search+m.hash,window.origin),currentParams:((E=r[0])==null?void 0:E.params)||{},nextUrl:new URL(f,window.origin),nextParams:y.params,defaultShouldRevalidate:!0});if(typeof O=="boolean")return O}return!0}):[]}function P_(f,u,{includeHydrateFallback:r}={}){return k_(f.map(c=>{let m=u.routes[c.route.id];if(!m)return[];let p=[m.module];return m.clientActionModule&&(p=p.concat(m.clientActionModule)),m.clientLoaderModule&&(p=p.concat(m.clientLoaderModule)),r&&m.hydrateFallbackModule&&(p=p.concat(m.hydrateFallbackModule)),m.imports&&(p=p.concat(m.imports)),p}).flat(1))}function k_(f){return[...new Set(f)]}function q_(f){let u={},r=Object.keys(f).sort();for(let c of r)u[c]=f[c];return u}function Y_(f,u){let r=new Set;return new Set(u),f.reduce((c,m)=>{let p=JSON.stringify(q_(m));return r.has(p)||(r.add(p),c.push({key:p,link:m})),c},[])}function Pp(){let f=C.useContext(ll);return Yf(f,"You must render this element inside a <DataRouterContext.Provider> element"),f}function G_(){let f=C.useContext(mu);return Yf(f,"You must render this element inside a <DataRouterStateContext.Provider> element"),f}var Gf=C.createContext(void 0);Gf.displayName="FrameworkContext";function kp(){let f=C.useContext(Gf);return Yf(f,"You must render this element inside a <HydratedRouter> element"),f}function V_(f,u){let r=C.useContext(Gf),[c,m]=C.useState(!1),[p,_]=C.useState(!1),{onFocus:z,onBlur:y,onMouseEnter:x,onMouseLeave:T,onTouchStart:E}=u,O=C.useRef(null);C.useEffect(()=>{if(f==="render"&&_(!0),f==="viewport"){let B=et=>{et.forEach(U=>{_(U.isIntersecting)})},V=new IntersectionObserver(B,{threshold:.5});return O.current&&V.observe(O.current),()=>{V.disconnect()}}},[f]),C.useEffect(()=>{if(c){let B=setTimeout(()=>{_(!0)},100);return()=>{clearTimeout(B)}}},[c]);let H=()=>{m(!0)},A=()=>{m(!1),_(!1)};return r?f!=="intent"?[p,O,{}]:[p,O,{onFocus:_o(z,H),onBlur:_o(y,A),onMouseEnter:_o(x,H),onMouseLeave:_o(T,A),onTouchStart:_o(E,H)}]:[!1,O,{}]}function _o(f,u){return r=>{f&&f(r),r.defaultPrevented||u(r)}}function X_({page:f,...u}){let{router:r}=Pp(),c=C.useMemo(()=>Ep(r.routes,f,r.basename),[r.routes,f,r.basename]);return c?C.createElement(Q_,{page:f,matches:c,...u}):null}function K_(f){let{manifest:u,routeModules:r}=kp(),[c,m]=C.useState([]);return C.useEffect(()=>{let p=!1;return Z_(f,u,r).then(_=>{p||m(_)}),()=>{p=!0}},[f,u,r]),c}function Q_({page:f,matches:u,...r}){let c=Di(),{future:m,manifest:p,routeModules:_}=kp(),{basename:z}=Pp(),{loaderData:y,matches:x}=G_(),T=C.useMemo(()=>op(f,u,x,p,c,"data"),[f,u,x,p,c]),E=C.useMemo(()=>op(f,u,x,p,c,"assets"),[f,u,x,p,c]),O=C.useMemo(()=>{if(f===c.pathname+c.search+c.hash)return[];let B=new Set,V=!1;if(u.forEach(U=>{var F;let k=p.routes[U.route.id];!k||!k.hasLoader||(!T.some(mt=>mt.route.id===U.route.id)&&U.route.id in y&&((F=_[U.route.id])!=null&&F.shouldRevalidate)||k.hasClientLoader?V=!0:B.add(U.route.id))}),B.size===0)return[];let et=B_(f,z,m.unstable_trailingSlashAwareDataRequests,"data");return V&&B.size>0&&et.searchParams.set("_routes",u.filter(U=>B.has(U.route.id)).map(U=>U.route.id).join(",")),[et.pathname+et.search]},[z,m.unstable_trailingSlashAwareDataRequests,y,c,p,T,u,f,_]),H=C.useMemo(()=>P_(E,p),[E,p]),A=K_(E);return C.createElement(C.Fragment,null,O.map(B=>C.createElement("link",{key:B,rel:"prefetch",as:"fetch",href:B,...r})),H.map(B=>C.createElement("link",{key:B,rel:"modulepreload",href:B,...r})),A.map(({key:B,link:V})=>C.createElement("link",{key:B,nonce:r.nonce,...V,crossOrigin:V.crossOrigin??r.crossOrigin})))}function J_(...f){return u=>{f.forEach(r=>{typeof r=="function"?r(u):r!=null&&(r.current=u)})}}var F_=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{F_&&(window.__reactRouterVersion="7.13.1")}catch{}function I_({basename:f,children:u,unstable_useTransitions:r,window:c}){let m=C.useRef();m.current==null&&(m.current=Av({window:c,v5Compat:!0}));let p=m.current,[_,z]=C.useState({action:p.action,location:p.location}),y=C.useCallback(x=>{r===!1?z(x):C.startTransition(()=>z(x))},[r]);return C.useLayoutEffect(()=>p.listen(y),[p,y]),C.createElement(L_,{basename:f,children:u,location:_.location,navigationType:_.action,navigator:p,unstable_useTransitions:r})}var qp=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Yp=C.forwardRef(function({onClick:u,discover:r="render",prefetch:c="none",relative:m,reloadDocument:p,replace:_,unstable_mask:z,state:y,target:x,to:T,preventScrollReset:E,viewTransition:O,unstable_defaultShouldRevalidate:H,...A},B){let{basename:V,navigator:et,unstable_useTransitions:U}=C.useContext(mn),k=typeof T=="string"&&qp.test(T),F=Op(T,V);T=F.to;let mt=h_(T,{relative:m}),ht=Di(),ft=null;if(z){let Zt=du(z,[],ht.unstable_mask?ht.unstable_mask.pathname:"/",!0);V!=="/"&&(Zt.pathname=Zt.pathname==="/"?V:ii([V,Zt.pathname])),ft=et.createHref(Zt)}let[pt,zt,Dt]=V_(c,A),vt=ty(T,{replace:_,unstable_mask:z,state:y,target:x,preventScrollReset:E,relative:m,viewTransition:O,unstable_defaultShouldRevalidate:H,unstable_useTransitions:U});function wt(Zt){u&&u(Zt),Zt.defaultPrevented||vt(Zt)}let ce=!(F.isExternal||p),Rt=C.createElement("a",{...A,...Dt,href:(ce?ft:void 0)||F.absoluteURL||mt,onClick:ce?wt:u,ref:J_(B,zt),target:x,"data-discover":!k&&r==="render"?"true":void 0});return pt&&!k?C.createElement(C.Fragment,null,Rt,C.createElement(X_,{page:mt})):Rt});Yp.displayName="Link";var xo=C.forwardRef(function({"aria-current":u="page",caseSensitive:r=!1,className:c="",end:m=!1,style:p,to:_,viewTransition:z,children:y,...x},T){let E=Lo(_,{relative:x.relative}),O=Di(),H=C.useContext(mu),{navigator:A,basename:B}=C.useContext(mn),V=H!=null&&sy(E)&&z===!0,et=A.encodeLocation?A.encodeLocation(E).pathname:E.pathname,U=O.pathname,k=H&&H.navigation&&H.navigation.location?H.navigation.location.pathname:null;r||(U=U.toLowerCase(),k=k?k.toLowerCase():null,et=et.toLowerCase()),k&&B&&(k=Ri(k,B)||k);const F=et!=="/"&&et.endsWith("/")?et.length-1:et.length;let mt=U===et||!m&&U.startsWith(et)&&U.charAt(F)==="/",ht=k!=null&&(k===et||!m&&k.startsWith(et)&&k.charAt(et.length)==="/"),ft={isActive:mt,isPending:ht,isTransitioning:V},pt=mt?u:void 0,zt;typeof c=="function"?zt=c(ft):zt=[c,mt?"active":null,ht?"pending":null,V?"transitioning":null].filter(Boolean).join(" ");let Dt=typeof p=="function"?p(ft):p;return C.createElement(Yp,{...x,"aria-current":pt,className:zt,ref:T,style:Dt,to:_,viewTransition:z},typeof y=="function"?y(ft):y)});xo.displayName="NavLink";var W_=C.forwardRef(({discover:f="render",fetcherKey:u,navigate:r,reloadDocument:c,replace:m,state:p,method:_=su,action:z,onSubmit:y,relative:x,preventScrollReset:T,viewTransition:E,unstable_defaultShouldRevalidate:O,...H},A)=>{let{unstable_useTransitions:B}=C.useContext(mn),V=iy(),et=ay(z,{relative:x}),U=_.toLowerCase()==="get"?"get":"post",k=typeof z=="string"&&qp.test(z),F=mt=>{if(y&&y(mt),mt.defaultPrevented)return;mt.preventDefault();let ht=mt.nativeEvent.submitter,ft=(ht==null?void 0:ht.getAttribute("formmethod"))||_,pt=()=>V(ht||mt.currentTarget,{fetcherKey:u,method:ft,navigate:r,replace:m,state:p,relative:x,preventScrollReset:T,viewTransition:E,unstable_defaultShouldRevalidate:O});B&&r!==!1?C.startTransition(()=>pt()):pt()};return C.createElement("form",{ref:A,method:U,action:et,onSubmit:c?y:F,...H,"data-discover":!k&&f==="render"?"true":void 0})});W_.displayName="Form";function $_(f){return`${f} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Gp(f){let u=C.useContext(ll);return re(u,$_(f)),u}function ty(f,{target:u,replace:r,unstable_mask:c,state:m,preventScrollReset:p,relative:_,viewTransition:z,unstable_defaultShouldRevalidate:y,unstable_useTransitions:x}={}){let T=pu(),E=Di(),O=Lo(f,{relative:_});return C.useCallback(H=>{if(A_(H,u)){H.preventDefault();let A=r!==void 0?r:zo(E)===zo(O),B=()=>T(f,{replace:A,unstable_mask:c,state:m,preventScrollReset:p,relative:_,viewTransition:z,unstable_defaultShouldRevalidate:y});x?C.startTransition(()=>B()):B()}},[E,T,O,r,c,m,u,f,p,_,z,y,x])}var ey=0,ny=()=>`__${String(++ey)}__`;function iy(){let{router:f}=Gp("useSubmit"),{basename:u}=C.useContext(mn),r=w_(),c=f.fetch,m=f.navigate;return C.useCallback(async(p,_={})=>{let{action:z,method:y,encType:x,formData:T,body:E}=j_(p,u);if(_.navigate===!1){let O=_.fetcherKey||ny();await c(O,r,_.action||z,{unstable_defaultShouldRevalidate:_.unstable_defaultShouldRevalidate,preventScrollReset:_.preventScrollReset,formData:T,body:E,formMethod:_.method||y,formEncType:_.encType||x,flushSync:_.flushSync})}else await m(_.action||z,{unstable_defaultShouldRevalidate:_.unstable_defaultShouldRevalidate,preventScrollReset:_.preventScrollReset,formData:T,body:E,formMethod:_.method||y,formEncType:_.encType||x,replace:_.replace,state:_.state,fromRouteId:r,flushSync:_.flushSync,viewTransition:_.viewTransition})},[c,m,u,r])}function ay(f,{relative:u}={}){let{basename:r}=C.useContext(mn),c=C.useContext(ai);re(c,"useFormAction must be used inside a RouteContext");let[m]=c.matches.slice(-1),p={...Lo(f||".",{relative:u})},_=Di();if(f==null){p.search=_.search;let z=new URLSearchParams(p.search),y=z.getAll("index");if(y.some(T=>T==="")){z.delete("index"),y.filter(E=>E).forEach(E=>z.append("index",E));let T=z.toString();p.search=T?`?${T}`:""}}return(!f||f===".")&&m.route.index&&(p.search=p.search?p.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(p.pathname=p.pathname==="/"?r:ii([r,p.pathname])),zo(p)}function sy(f,{relative:u}={}){let r=C.useContext(Ap);re(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:c}=Gp("useViewTransitionState"),m=Lo(f,{relative:u});if(!r.isTransitioning)return!1;let p=Ri(r.currentLocation.pathname,c)||r.currentLocation.pathname,_=Ri(r.nextLocation.pathname,c)||r.nextLocation.pathname;return ou(m.pathname,_)!=null||ou(m.pathname,p)!=null}var ly=Tp();let al=null;function So(f){al=f}function oy(){return al}async function ry(f){if(f.status!==204){if(!f.ok){const u=await f.text().catch(()=>"");throw new Error(`${f.status}: ${u||f.statusText}`)}return f.json()}}async function el(f,u={}){const r=new Headers(u.headers);al&&r.set("Authorization",`Bearer ${al}`),u.body&&typeof u.body=="string"&&r.set("Content-Type","application/json");let c=await fetch(f,{...u,headers:r});if(c.status===401&&al)if(await uy())r.set("Authorization",`Bearer ${al}`),c=await fetch(f,{...u,headers:r});else throw So(null),window.location.href="/login",new Error("Session expired");return ry(c)}async function uy(){try{const f=await fetch("/api/admin/auth/refresh",{method:"POST",credentials:"include"});if(!f.ok)return!1;const u=await f.json();return So(u.token),!0}catch{return!1}}const Nt={get:f=>el(f),post:(f,u)=>el(f,{method:"POST",body:u?JSON.stringify(u):void 0}),put:(f,u)=>el(f,{method:"PUT",body:u?JSON.stringify(u):void 0}),patch:(f,u)=>el(f,{method:"PATCH",body:u?JSON.stringify(u):void 0}),delete:f=>el(f,{method:"DELETE"}),upload:(f,u)=>el(f,{method:"POST",body:u})},Vp=C.createContext(null);function Vf(){return C.useContext(Vp)}function cy({children:f}){const[u,r]=C.useState(null),[c,m]=C.useState(!0);C.useEffect(()=>{Nt.get("/api/admin/auth/refresh").then(y=>{So(y.token),r(y.user)}).catch(()=>{}).finally(()=>m(!1))},[]);const p=C.useCallback(async(y,x)=>{const T=await Nt.post("/api/admin/auth/login",{email:y,password:x});So(T.token),r(T.user)},[]),_=C.useCallback(async()=>{try{await Nt.post("/api/admin/auth/logout")}catch{}So(null),r(null)},[]),z=C.useCallback(y=>(u==null?void 0:u.permissions.includes(y))??!1,[u]);return b.jsx(Vp.Provider,{value:{user:u,loading:c,login:p,logout:_,hasPermission:z},children:f})}const Xp=C.createContext(null);function vu(){return C.useContext(Xp)}function fy({children:f}){const[u,r]=C.useState([]),[c,m]=C.useState(null),p=C.useCallback(async()=>{try{const z=await Nt.get("/api/flights?pageSize=1000");r(z.items??[])}catch{}},[]);C.useEffect(()=>{p(),Nt.get("/api/annotations/settings/user").then(z=>{z!=null&&z.selectedFlightId&&Nt.get(`/api/flights/${z.selectedFlightId}`).then(y=>m(y)).catch(()=>{})}).catch(()=>{})},[p]);const _=C.useCallback(z=>{m(z),Nt.put("/api/annotations/settings/user",{selectedFlightId:(z==null?void 0:z.id)??null}).catch(()=>{})},[]);return b.jsx(Xp.Provider,{value:{flights:u,selectedFlight:c,selectFlight:_,refreshFlights:p},children:f})}function hy({children:f}){const{user:u,loading:r}=Vf();return r?b.jsx("div",{className:"flex items-center justify-center h-screen bg-az-bg",children:b.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-2 border-az-orange border-t-transparent"})}):u?b.jsx(b.Fragment,{children:f}):b.jsx(Zp,{to:"/login",replace:!0})}const dy=(f,u,r,c)=>{var p,_,z,y;const m=[r,{code:u,...c||{}}];if((_=(p=f==null?void 0:f.services)==null?void 0:p.logger)!=null&&_.forward)return f.services.logger.forward(m,"warn","react-i18next::",!0);rs(m[0])&&(m[0]=`react-i18next:: ${m[0]}`),(y=(z=f==null?void 0:f.services)==null?void 0:z.logger)!=null&&y.warn?f.services.logger.warn(...m):console!=null&&console.warn&&console.warn(...m)},rp={},Df=(f,u,r,c)=>{rs(r)&&rp[r]||(rs(r)&&(rp[r]=new Date),dy(f,u,r,c))},Kp=(f,u)=>()=>{if(f.isInitialized)u();else{const r=()=>{setTimeout(()=>{f.off("initialized",r)},0),u()};f.on("initialized",r)}},jf=(f,u,r)=>{f.loadNamespaces(u,Kp(f,r))},up=(f,u,r,c)=>{if(rs(r)&&(r=[r]),f.options.preload&&f.options.preload.indexOf(u)>-1)return jf(f,r,c);r.forEach(m=>{f.options.ns.indexOf(m)<0&&f.options.ns.push(m)}),f.loadLanguages(u,Kp(f,c))},my=(f,u,r={})=>!u.languages||!u.languages.length?(Df(u,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:u.languages}),!0):u.hasLoadedNamespace(f,{lng:r.lng,precheck:(c,m)=>{if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&c.services.backendConnector.backend&&c.isLanguageChangingTo&&!m(c.isLanguageChangingTo,f))return!1}}),rs=f=>typeof f=="string",py=f=>typeof f=="object"&&f!==null,gy=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,vy={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},_y=f=>vy[f],yy=f=>f.replace(gy,_y);let Bf={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:yy};const xy=(f={})=>{Bf={...Bf,...f}},by=()=>Bf;let Qp;const Sy=f=>{Qp=f},wy=()=>Qp,zy={type:"3rdParty",init(f){xy(f.options.react),Sy(f)}},Ty=C.createContext();class Ey{constructor(){this.usedNamespaces={}}addUsedNamespaces(u){u.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const Ly=(f,u)=>{const r=C.useRef();return C.useEffect(()=>{r.current=f},[f,u]),r.current},Jp=(f,u,r,c)=>f.getFixedT(u,r,c),Cy=(f,u,r,c)=>C.useCallback(Jp(f,u,r,c),[f,u,r,c]),En=(f,u={})=>{var F,mt,ht,ft;const{i18n:r}=u,{i18n:c,defaultNS:m}=C.useContext(Ty)||{},p=r||c||wy();if(p&&!p.reportNamespaces&&(p.reportNamespaces=new Ey),!p){Df(p,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const pt=(Dt,vt)=>rs(vt)?vt:py(vt)&&rs(vt.defaultValue)?vt.defaultValue:Array.isArray(Dt)?Dt[Dt.length-1]:Dt,zt=[pt,{},!1];return zt.t=pt,zt.i18n={},zt.ready=!1,zt}(F=p.options.react)!=null&&F.wait&&Df(p,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const _={...by(),...p.options.react,...u},{useSuspense:z,keyPrefix:y}=_;let x=m||((mt=p.options)==null?void 0:mt.defaultNS);x=rs(x)?[x]:x||["translation"],(ft=(ht=p.reportNamespaces).addUsedNamespaces)==null||ft.call(ht,x);const T=(p.isInitialized||p.initializedStoreOnce)&&x.every(pt=>my(pt,p,_)),E=Cy(p,u.lng||null,_.nsMode==="fallback"?x:x[0],y),O=()=>E,H=()=>Jp(p,u.lng||null,_.nsMode==="fallback"?x:x[0],y),[A,B]=C.useState(O);let V=x.join();u.lng&&(V=`${u.lng}${V}`);const et=Ly(V),U=C.useRef(!0);C.useEffect(()=>{const{bindI18n:pt,bindI18nStore:zt}=_;U.current=!0,!T&&!z&&(u.lng?up(p,u.lng,x,()=>{U.current&&B(H)}):jf(p,x,()=>{U.current&&B(H)})),T&&et&&et!==V&&U.current&&B(H);const Dt=()=>{U.current&&B(H)};return pt&&(p==null||p.on(pt,Dt)),zt&&(p==null||p.store.on(zt,Dt)),()=>{U.current=!1,p&&pt&&(pt==null||pt.split(" ").forEach(vt=>p.off(vt,Dt))),zt&&p&&zt.split(" ").forEach(vt=>p.store.off(vt,Dt))}},[p,V]),C.useEffect(()=>{U.current&&T&&B(O)},[p,y,T]);const k=[A,p,T];if(k.t=A,k.i18n=p,k.ready=T,T||!T&&!z)return k;throw new Promise(pt=>{u.lng?up(p,u.lng,x,()=>pt()):jf(p,x,()=>pt())})},Ny={idle:"",authenticating:"login.authenticating",downloadingKey:"login.downloadingKey",decrypting:"login.decrypting",startingServices:"login.startingServices",ready:"login.ready"};function Oy(){const{t:f}=En(),{login:u}=Vf(),r=pu(),[c,m]=C.useState(""),[p,_]=C.useState(""),[z,y]=C.useState(""),[x,T]=C.useState("idle"),E=async()=>{const H=["downloadingKey","decrypting","startingServices","ready"];for(const A of H)T(A),await new Promise(B=>setTimeout(B,600));r("/flights")},O=async H=>{H.preventDefault(),y(""),T("authenticating");try{await u(c,p),await E()}catch{T("idle"),y(f("login.error"))}};return b.jsx("div",{className:"flex items-center justify-center h-screen bg-az-bg",children:b.jsxs("form",{onSubmit:O,className:"bg-az-panel border border-az-border rounded-lg p-6 w-[400px] shadow-2xl",children:[b.jsx("h1",{className:"text-2xl font-bold text-az-orange text-center mb-6 tracking-widest",children:f("login.title")}),x!=="idle"&&b.jsxs("div",{className:"mb-4 text-center",children:[b.jsx("div",{className:"inline-block animate-spin rounded-full h-6 w-6 border-2 border-az-orange border-t-transparent mb-2"}),b.jsx("div",{className:"text-sm text-az-text",children:f(Ny[x])})]}),x==="idle"&&b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"mb-3",children:[b.jsx("label",{className:"block text-xs text-az-muted mb-1",children:f("login.email")}),b.jsx("input",{type:"email",value:c,onChange:H=>m(H.target.value),className:"w-full bg-az-bg border border-az-border rounded px-3 py-2 text-az-text outline-none focus:border-az-orange",required:!0,autoFocus:!0})]}),b.jsxs("div",{className:"mb-4",children:[b.jsx("label",{className:"block text-xs text-az-muted mb-1",children:f("login.password")}),b.jsx("input",{type:"password",value:p,onChange:H=>_(H.target.value),className:"w-full bg-az-bg border border-az-border rounded px-3 py-2 text-az-text outline-none focus:border-az-orange",required:!0})]}),z&&b.jsx("div",{className:"text-az-red text-sm mb-3",children:z}),b.jsx("button",{type:"submit",className:"w-full bg-az-orange text-white font-semibold py-2 rounded hover:bg-orange-600 transition",children:f("login.submit")})]})]})})}function Fp(f,u,r){const c=oy(),m=c?`${f}${f.includes("?")?"&":"?"}access_token=${c}`:f,p=new EventSource(m);return p.onmessage=_=>{try{const z=JSON.parse(_.data);u(z)}catch{}},p.onerror=_=>{},()=>p.close()}function ru(f,u=100,r=600){const[c,m]=C.useState(f),p=C.useRef(!1),_=C.useRef(0),z=C.useRef(0),y=C.useCallback(x=>{p.current=!0,_.current=x.clientX,z.current=c,x.preventDefault()},[c]);return C.useEffect(()=>{const x=E=>{if(!p.current)return;const O=E.clientX-_.current;m(Math.min(r,Math.max(u,z.current+O)))},T=()=>{p.current=!1};return window.addEventListener("mousemove",x),window.addEventListener("mouseup",T),()=>{window.removeEventListener("mousemove",x),window.removeEventListener("mouseup",T)}},[u,r]),{width:c,onMouseDown:y,setWidth:m}}function Xf({open:f,title:u,message:r,onConfirm:c,onCancel:m}){const{t:p}=En(),_=C.useRef(null);return C.useEffect(()=>{var z;f&&((z=_.current)==null||z.focus())},[f]),C.useEffect(()=>{if(!f)return;const z=y=>{y.key==="Escape"&&m()};return window.addEventListener("keydown",z),()=>window.removeEventListener("keydown",z)},[f,m]),f?b.jsx("div",{className:"fixed inset-0 bg-black/60 flex items-center justify-center z-[100]",children:b.jsxs("div",{className:"bg-az-panel border border-az-border rounded-lg p-4 w-80 shadow-xl",children:[b.jsx("h3",{className:"text-white font-semibold mb-2",children:u}),r&&b.jsx("p",{className:"text-az-text text-sm mb-4",children:r}),b.jsxs("div",{className:"flex justify-end gap-2",children:[b.jsx("button",{ref:_,onClick:m,className:"px-3 py-1 text-sm border border-az-border rounded hover:bg-az-bg text-az-text",children:p("common.cancel")}),b.jsx("button",{onClick:c,className:"px-3 py-1 text-sm bg-az-red rounded hover:bg-red-600 text-white",children:p("common.confirm")})]})]})}):null}function Ip(f,u){const r=C.useRef(u);C.useEffect(function(){u!==r.current&&f.attributionControl!=null&&(r.current!=null&&f.attributionControl.removeAttribution(r.current),u!=null&&f.attributionControl.addAttribution(u)),r.current=u},[f,u])}const My=1;function Ay(f){return Object.freeze({__version:My,map:f})}function Wp(f,u){return Object.freeze({...f,...u})}const Kf=C.createContext(null);function Qf(){const f=C.use(Kf);if(f==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>");return f}function $p(f){function u(r,c){const{instance:m,context:p}=f(r).current;C.useImperativeHandle(c,()=>m);const{children:_}=r;return _==null?null:Mf.createElement(Kf,{value:p},_)}return C.forwardRef(u)}function Ry(f){function u(r,c){const[m,p]=C.useState(!1),{instance:_}=f(r,p).current;C.useImperativeHandle(c,()=>_),C.useEffect(function(){m&&_.update()},[_,m,r.children]);const z=_._contentNode;return z?ly.createPortal(r.children,z):null}return C.forwardRef(u)}function Dy(f){function u(r,c){const{instance:m}=f(r).current;return C.useImperativeHandle(c,()=>m),null}return C.forwardRef(u)}function Jf(f,u){const r=C.useRef(void 0);C.useEffect(function(){return u!=null&&f.instance.on(u),r.current=u,function(){r.current!=null&&f.instance.off(r.current),r.current=null}},[f,u])}function _u(f,u){const r=f.pane??u.pane;return r?{...f,pane:r}:f}function jy(f,u){return function(c,m){const p=Qf(),_=f(_u(c,p),p);return Ip(p.map,c.attribution),Jf(_.current,c.eventHandlers),u(_.current,p,c,m),_}}var bo={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 By=bo.exports,cp;function Uy(){return cp||(cp=1,(function(f,u){(function(r,c){c(u)})(By,(function(r){var c="1.9.4";function m(n){var a,l,d,g;for(l=1,d=arguments.length;l<d;l++){g=arguments[l];for(a in g)n[a]=g[a]}return n}var p=Object.create||(function(){function n(){}return function(a){return n.prototype=a,new n}})();function _(n,a){var l=Array.prototype.slice;if(n.bind)return n.bind.apply(n,l.call(arguments,1));var d=l.call(arguments,2);return function(){return n.apply(a,d.length?d.concat(l.call(arguments)):arguments)}}var z=0;function y(n){return"_leaflet_id"in n||(n._leaflet_id=++z),n._leaflet_id}function x(n,a,l){var d,g,S,M;return M=function(){d=!1,g&&(S.apply(l,g),g=!1)},S=function(){d?g=arguments:(n.apply(l,arguments),setTimeout(M,a),d=!0)},S}function T(n,a,l){var d=a[1],g=a[0],S=d-g;return n===d&&l?n:((n-g)%S+S)%S+g}function E(){return!1}function O(n,a){if(a===!1)return n;var l=Math.pow(10,a===void 0?6:a);return Math.round(n*l)/l}function H(n){return n.trim?n.trim():n.replace(/^\s+|\s+$/g,"")}function A(n){return H(n).split(/\s+/)}function B(n,a){Object.prototype.hasOwnProperty.call(n,"options")||(n.options=n.options?p(n.options):{});for(var l in a)n.options[l]=a[l];return n.options}function V(n,a,l){var d=[];for(var g in n)d.push(encodeURIComponent(l?g.toUpperCase():g)+"="+encodeURIComponent(n[g]));return(!a||a.indexOf("?")===-1?"?":"&")+d.join("&")}var et=/\{ *([\w_ -]+) *\}/g;function U(n,a){return n.replace(et,function(l,d){var g=a[d];if(g===void 0)throw new Error("No value provided for variable "+l);return typeof g=="function"&&(g=g(a)),g})}var k=Array.isArray||function(n){return Object.prototype.toString.call(n)==="[object Array]"};function F(n,a){for(var l=0;l<n.length;l++)if(n[l]===a)return l;return-1}var mt="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function ht(n){return window["webkit"+n]||window["moz"+n]||window["ms"+n]}var ft=0;function pt(n){var a=+new Date,l=Math.max(0,16-(a-ft));return ft=a+l,window.setTimeout(n,l)}var zt=window.requestAnimationFrame||ht("RequestAnimationFrame")||pt,Dt=window.cancelAnimationFrame||ht("CancelAnimationFrame")||ht("CancelRequestAnimationFrame")||function(n){window.clearTimeout(n)};function vt(n,a,l){if(l&&zt===pt)n.call(a);else return zt.call(window,_(n,a))}function wt(n){n&&Dt.call(window,n)}var ce={__proto__:null,extend:m,create:p,bind:_,get lastId(){return z},stamp:y,throttle:x,wrapNum:T,falseFn:E,formatNum:O,trim:H,splitWords:A,setOptions:B,getParamString:V,template:U,isArray:k,indexOf:F,emptyImageUrl:mt,requestFn:zt,cancelFn:Dt,requestAnimFrame:vt,cancelAnimFrame:wt};function Rt(){}Rt.extend=function(n){var a=function(){B(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},l=a.__super__=this.prototype,d=p(l);d.constructor=a,a.prototype=d;for(var g in this)Object.prototype.hasOwnProperty.call(this,g)&&g!=="prototype"&&g!=="__super__"&&(a[g]=this[g]);return n.statics&&m(a,n.statics),n.includes&&(Zt(n.includes),m.apply(null,[d].concat(n.includes))),m(d,n),delete d.statics,delete d.includes,d.options&&(d.options=l.options?p(l.options):{},m(d.options,n.options)),d._initHooks=[],d.callInitHooks=function(){if(!this._initHooksCalled){l.callInitHooks&&l.callInitHooks.call(this),this._initHooksCalled=!0;for(var S=0,M=d._initHooks.length;S<M;S++)d._initHooks[S].call(this)}},a},Rt.include=function(n){var a=this.prototype.options;return m(this.prototype,n),n.options&&(this.prototype.options=a,this.mergeOptions(n.options)),this},Rt.mergeOptions=function(n){return m(this.prototype.options,n),this},Rt.addInitHook=function(n){var a=Array.prototype.slice.call(arguments,1),l=typeof n=="function"?n:function(){this[n].apply(this,a)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(l),this};function Zt(n){if(!(typeof L>"u"||!L||!L.Mixin)){n=k(n)?n:[n];for(var a=0;a<n.length;a++)n[a]===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 D={on:function(n,a,l){if(typeof n=="object")for(var d in n)this._on(d,n[d],a);else{n=A(n);for(var g=0,S=n.length;g<S;g++)this._on(n[g],a,l)}return this},off:function(n,a,l){if(!arguments.length)delete this._events;else if(typeof n=="object")for(var d in n)this._off(d,n[d],a);else{n=A(n);for(var g=arguments.length===1,S=0,M=n.length;S<M;S++)g?this._off(n[S]):this._off(n[S],a,l)}return this},_on:function(n,a,l,d){if(typeof a!="function"){console.warn("wrong listener type: "+typeof a);return}if(this._listens(n,a,l)===!1){l===this&&(l=void 0);var g={fn:a,ctx:l};d&&(g.once=!0),this._events=this._events||{},this._events[n]=this._events[n]||[],this._events[n].push(g)}},_off:function(n,a,l){var d,g,S;if(this._events&&(d=this._events[n],!!d)){if(arguments.length===1){if(this._firingCount)for(g=0,S=d.length;g<S;g++)d[g].fn=E;delete this._events[n];return}if(typeof a!="function"){console.warn("wrong listener type: "+typeof a);return}var M=this._listens(n,a,l);if(M!==!1){var P=d[M];this._firingCount&&(P.fn=E,this._events[n]=d=d.slice()),d.splice(M,1)}}},fire:function(n,a,l){if(!this.listens(n,l))return this;var d=m({},a,{type:n,target:this,sourceTarget:a&&a.sourceTarget||this});if(this._events){var g=this._events[n];if(g){this._firingCount=this._firingCount+1||1;for(var S=0,M=g.length;S<M;S++){var P=g[S],K=P.fn;P.once&&this.off(n,K,P.ctx),K.call(P.ctx||this,d)}this._firingCount--}}return l&&this._propagateEvent(d),this},listens:function(n,a,l,d){typeof n!="string"&&console.warn('"string" type argument expected');var g=a;typeof a!="function"&&(d=!!a,g=void 0,l=void 0);var S=this._events&&this._events[n];if(S&&S.length&&this._listens(n,g,l)!==!1)return!0;if(d){for(var M in this._eventParents)if(this._eventParents[M].listens(n,a,l,d))return!0}return!1},_listens:function(n,a,l){if(!this._events)return!1;var d=this._events[n]||[];if(!a)return!!d.length;l===this&&(l=void 0);for(var g=0,S=d.length;g<S;g++)if(d[g].fn===a&&d[g].ctx===l)return g;return!1},once:function(n,a,l){if(typeof n=="object")for(var d in n)this._on(d,n[d],a,!0);else{n=A(n);for(var g=0,S=n.length;g<S;g++)this._on(n[g],a,l,!0)}return this},addEventParent:function(n){return this._eventParents=this._eventParents||{},this._eventParents[y(n)]=n,this},removeEventParent:function(n){return this._eventParents&&delete this._eventParents[y(n)],this},_propagateEvent:function(n){for(var a in this._eventParents)this._eventParents[a].fire(n.type,m({layer:n.target,propagatedFrom:n.target},n),!0)}};D.addEventListener=D.on,D.removeEventListener=D.clearAllEventListeners=D.off,D.addOneTimeEventListener=D.once,D.fireEvent=D.fire,D.hasEventListeners=D.listens;var q=Rt.extend(D);function I(n,a,l){this.x=l?Math.round(n):n,this.y=l?Math.round(a):a}var ut=Math.trunc||function(n){return n>0?Math.floor(n):Math.ceil(n)};I.prototype={clone:function(){return new I(this.x,this.y)},add:function(n){return this.clone()._add(st(n))},_add:function(n){return this.x+=n.x,this.y+=n.y,this},subtract:function(n){return this.clone()._subtract(st(n))},_subtract:function(n){return this.x-=n.x,this.y-=n.y,this},divideBy:function(n){return this.clone()._divideBy(n)},_divideBy:function(n){return this.x/=n,this.y/=n,this},multiplyBy:function(n){return this.clone()._multiplyBy(n)},_multiplyBy:function(n){return this.x*=n,this.y*=n,this},scaleBy:function(n){return new I(this.x*n.x,this.y*n.y)},unscaleBy:function(n){return new I(this.x/n.x,this.y/n.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=ut(this.x),this.y=ut(this.y),this},distanceTo:function(n){n=st(n);var a=n.x-this.x,l=n.y-this.y;return Math.sqrt(a*a+l*l)},equals:function(n){return n=st(n),n.x===this.x&&n.y===this.y},contains:function(n){return n=st(n),Math.abs(n.x)<=Math.abs(this.x)&&Math.abs(n.y)<=Math.abs(this.y)},toString:function(){return"Point("+O(this.x)+", "+O(this.y)+")"}};function st(n,a,l){return n instanceof I?n:k(n)?new I(n[0],n[1]):n==null?n:typeof n=="object"&&"x"in n&&"y"in n?new I(n.x,n.y):new I(n,a,l)}function N(n,a){if(n)for(var l=a?[n,a]:n,d=0,g=l.length;d<g;d++)this.extend(l[d])}N.prototype={extend:function(n){var a,l;if(!n)return this;if(n instanceof I||typeof n[0]=="number"||"x"in n)a=l=st(n);else if(n=X(n),a=n.min,l=n.max,!a||!l)return this;return!this.min&&!this.max?(this.min=a.clone(),this.max=l.clone()):(this.min.x=Math.min(a.x,this.min.x),this.max.x=Math.max(l.x,this.max.x),this.min.y=Math.min(a.y,this.min.y),this.max.y=Math.max(l.y,this.max.y)),this},getCenter:function(n){return st((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,n)},getBottomLeft:function(){return st(this.min.x,this.max.y)},getTopRight:function(){return st(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(n){var a,l;return typeof n[0]=="number"||n instanceof I?n=st(n):n=X(n),n instanceof N?(a=n.min,l=n.max):a=l=n,a.x>=this.min.x&&l.x<=this.max.x&&a.y>=this.min.y&&l.y<=this.max.y},intersects:function(n){n=X(n);var a=this.min,l=this.max,d=n.min,g=n.max,S=g.x>=a.x&&d.x<=l.x,M=g.y>=a.y&&d.y<=l.y;return S&&M},overlaps:function(n){n=X(n);var a=this.min,l=this.max,d=n.min,g=n.max,S=g.x>a.x&&d.x<l.x,M=g.y>a.y&&d.y<l.y;return S&&M},isValid:function(){return!!(this.min&&this.max)},pad:function(n){var a=this.min,l=this.max,d=Math.abs(a.x-l.x)*n,g=Math.abs(a.y-l.y)*n;return X(st(a.x-d,a.y-g),st(l.x+d,l.y+g))},equals:function(n){return n?(n=X(n),this.min.equals(n.getTopLeft())&&this.max.equals(n.getBottomRight())):!1}};function X(n,a){return!n||n instanceof N?n:new N(n,a)}function $(n,a){if(n)for(var l=a?[n,a]:n,d=0,g=l.length;d<g;d++)this.extend(l[d])}$.prototype={extend:function(n){var a=this._southWest,l=this._northEast,d,g;if(n instanceof ot)d=n,g=n;else if(n instanceof $){if(d=n._southWest,g=n._northEast,!d||!g)return this}else return n?this.extend(rt(n)||lt(n)):this;return!a&&!l?(this._southWest=new ot(d.lat,d.lng),this._northEast=new ot(g.lat,g.lng)):(a.lat=Math.min(d.lat,a.lat),a.lng=Math.min(d.lng,a.lng),l.lat=Math.max(g.lat,l.lat),l.lng=Math.max(g.lng,l.lng)),this},pad:function(n){var a=this._southWest,l=this._northEast,d=Math.abs(a.lat-l.lat)*n,g=Math.abs(a.lng-l.lng)*n;return new $(new ot(a.lat-d,a.lng-g),new ot(l.lat+d,l.lng+g))},getCenter:function(){return new ot((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 ot(this.getNorth(),this.getWest())},getSouthEast:function(){return new ot(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(n){typeof n[0]=="number"||n instanceof ot||"lat"in n?n=rt(n):n=lt(n);var a=this._southWest,l=this._northEast,d,g;return n instanceof $?(d=n.getSouthWest(),g=n.getNorthEast()):d=g=n,d.lat>=a.lat&&g.lat<=l.lat&&d.lng>=a.lng&&g.lng<=l.lng},intersects:function(n){n=lt(n);var a=this._southWest,l=this._northEast,d=n.getSouthWest(),g=n.getNorthEast(),S=g.lat>=a.lat&&d.lat<=l.lat,M=g.lng>=a.lng&&d.lng<=l.lng;return S&&M},overlaps:function(n){n=lt(n);var a=this._southWest,l=this._northEast,d=n.getSouthWest(),g=n.getNorthEast(),S=g.lat>a.lat&&d.lat<l.lat,M=g.lng>a.lng&&d.lng<l.lng;return S&&M},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(n,a){return n?(n=lt(n),this._southWest.equals(n.getSouthWest(),a)&&this._northEast.equals(n.getNorthEast(),a)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function lt(n,a){return n instanceof $?n:new $(n,a)}function ot(n,a,l){if(isNaN(n)||isNaN(a))throw new Error("Invalid LatLng object: ("+n+", "+a+")");this.lat=+n,this.lng=+a,l!==void 0&&(this.alt=+l)}ot.prototype={equals:function(n,a){if(!n)return!1;n=rt(n);var l=Math.max(Math.abs(this.lat-n.lat),Math.abs(this.lng-n.lng));return l<=(a===void 0?1e-9:a)},toString:function(n){return"LatLng("+O(this.lat,n)+", "+O(this.lng,n)+")"},distanceTo:function(n){return Ot.distance(this,rt(n))},wrap:function(){return Ot.wrapLatLng(this)},toBounds:function(n){var a=180*n/40075017,l=a/Math.cos(Math.PI/180*this.lat);return lt([this.lat-a,this.lng-l],[this.lat+a,this.lng+l])},clone:function(){return new ot(this.lat,this.lng,this.alt)}};function rt(n,a,l){return n instanceof ot?n:k(n)&&typeof n[0]!="object"?n.length===3?new ot(n[0],n[1],n[2]):n.length===2?new ot(n[0],n[1]):null:n==null?n:typeof n=="object"&&"lat"in n?new ot(n.lat,"lng"in n?n.lng:n.lon,n.alt):a===void 0?null:new ot(n,a,l)}var at={latLngToPoint:function(n,a){var l=this.projection.project(n),d=this.scale(a);return this.transformation._transform(l,d)},pointToLatLng:function(n,a){var l=this.scale(a),d=this.transformation.untransform(n,l);return this.projection.unproject(d)},project:function(n){return this.projection.project(n)},unproject:function(n){return this.projection.unproject(n)},scale:function(n){return 256*Math.pow(2,n)},zoom:function(n){return Math.log(n/256)/Math.LN2},getProjectedBounds:function(n){if(this.infinite)return null;var a=this.projection.bounds,l=this.scale(n),d=this.transformation.transform(a.min,l),g=this.transformation.transform(a.max,l);return new N(d,g)},infinite:!1,wrapLatLng:function(n){var a=this.wrapLng?T(n.lng,this.wrapLng,!0):n.lng,l=this.wrapLat?T(n.lat,this.wrapLat,!0):n.lat,d=n.alt;return new ot(l,a,d)},wrapLatLngBounds:function(n){var a=n.getCenter(),l=this.wrapLatLng(a),d=a.lat-l.lat,g=a.lng-l.lng;if(d===0&&g===0)return n;var S=n.getSouthWest(),M=n.getNorthEast(),P=new ot(S.lat-d,S.lng-g),K=new ot(M.lat-d,M.lng-g);return new $(P,K)}},Ot=m({},at,{wrapLng:[-180,180],R:6371e3,distance:function(n,a){var l=Math.PI/180,d=n.lat*l,g=a.lat*l,S=Math.sin((a.lat-n.lat)*l/2),M=Math.sin((a.lng-n.lng)*l/2),P=S*S+Math.cos(d)*Math.cos(g)*M*M,K=2*Math.atan2(Math.sqrt(P),Math.sqrt(1-P));return this.R*K}}),Yt=6378137,we={R:Yt,MAX_LATITUDE:85.0511287798,project:function(n){var a=Math.PI/180,l=this.MAX_LATITUDE,d=Math.max(Math.min(l,n.lat),-l),g=Math.sin(d*a);return new I(this.R*n.lng*a,this.R*Math.log((1+g)/(1-g))/2)},unproject:function(n){var a=180/Math.PI;return new ot((2*Math.atan(Math.exp(n.y/this.R))-Math.PI/2)*a,n.x*a/this.R)},bounds:(function(){var n=Yt*Math.PI;return new N([-n,-n],[n,n])})()};function an(n,a,l,d){if(k(n)){this._a=n[0],this._b=n[1],this._c=n[2],this._d=n[3];return}this._a=n,this._b=a,this._c=l,this._d=d}an.prototype={transform:function(n,a){return this._transform(n.clone(),a)},_transform:function(n,a){return a=a||1,n.x=a*(this._a*n.x+this._b),n.y=a*(this._c*n.y+this._d),n},untransform:function(n,a){return a=a||1,new I((n.x/a-this._b)/this._a,(n.y/a-this._d)/this._c)}};function si(n,a,l,d){return new an(n,a,l,d)}var us=m({},Ot,{code:"EPSG:3857",projection:we,transformation:(function(){var n=.5/(Math.PI*we.R);return si(n,.5,-n,.5)})()}),li=m({},us,{code:"EPSG:900913"});function cs(n){return document.createElementNS("http://www.w3.org/2000/svg",n)}function fs(n,a){var l="",d,g,S,M,P,K;for(d=0,S=n.length;d<S;d++){for(P=n[d],g=0,M=P.length;g<M;g++)K=P[g],l+=(g?"L":"M")+K.x+" "+K.y;l+=a?_t.svg?"z":"x":""}return l||"M0 0"}var ul=document.documentElement.style,ya="ActiveXObject"in window,cl=ya&&!document.addEventListener,hs="msLaunchUri"in navigator&&!("documentMode"in document),xa=Ve("webkit"),Co=Ve("android"),No=Ve("android 2")||Ve("android 3"),Pe=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),Su=Co&&Ve("Google")&&Pe<537&&!("AudioNode"in window),ds=!!window.opera,fl=!hs&&Ve("chrome"),ba=Ve("gecko")&&!xa&&!ds&&!ya,wu=!fl&&Ve("safari"),hl=Ve("phantom"),Oo="OTransition"in ul,zu=navigator.platform.indexOf("Win")===0,ji=ya&&"transition"in ul,Me="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!No,Ln="MozPerspective"in ul,ke=!window.L_DISABLE_3D&&(ji||Me||Ln)&&!Oo&&!hl,Sa=typeof orientation<"u"||Ve("mobile"),Tu=Sa&&xa,Eu=Sa&&Me,wa=!window.PointerEvent&&window.MSPointerEvent,za=!!(window.PointerEvent||wa),Ta="ontouchstart"in window||!!window.TouchEvent,oi=!window.L_NO_TOUCH&&(Ta||za),ms=Sa&&ds,Ea=Sa&&ba,Lu=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Mo=(function(){var n=!1;try{var a=Object.defineProperty({},"passive",{get:function(){n=!0}});window.addEventListener("testPassiveEventSupport",E,a),window.removeEventListener("testPassiveEventSupport",E,a)}catch{}return n})(),dl=(function(){return!!document.createElement("canvas").getContext})(),ri=!!(document.createElementNS&&cs("svg").createSVGRect),Cu=!!ri&&(function(){var n=document.createElement("div");return n.innerHTML="<svg/>",(n.firstChild&&n.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"})(),Ao=!ri&&(function(){try{var n=document.createElement("div");n.innerHTML='<v:shape adj="1"/>';var a=n.firstChild;return a.style.behavior="url(#default#VML)",a&&typeof a.adj=="object"}catch{return!1}})(),Ro=navigator.platform.indexOf("Mac")===0,Do=navigator.platform.indexOf("Linux")===0;function Ve(n){return navigator.userAgent.toLowerCase().indexOf(n)>=0}var _t={ie:ya,ielt9:cl,edge:hs,webkit:xa,android:Co,android23:No,androidStock:Su,opera:ds,chrome:fl,gecko:ba,safari:wu,phantom:hl,opera12:Oo,win:zu,ie3d:ji,webkit3d:Me,gecko3d:Ln,any3d:ke,mobile:Sa,mobileWebkit:Tu,mobileWebkit3d:Eu,msPointer:wa,pointer:za,touch:oi,touchNative:Ta,mobileOpera:ms,mobileGecko:Ea,retina:Lu,passiveEvents:Mo,canvas:dl,svg:ri,vml:Ao,inlineSvg:Cu,mac:Ro,linux:Do},ml=_t.msPointer?"MSPointerDown":"pointerdown",pl=_t.msPointer?"MSPointerMove":"pointermove",Cn=_t.msPointer?"MSPointerUp":"pointerup",ve=_t.msPointer?"MSPointerCancel":"pointercancel",Le={touchstart:ml,touchmove:pl,touchend:Cn,touchcancel:ve},ui={touchstart:Ui,touchmove:Pn,touchend:Pn,touchcancel:Pn},Zn={},jo=!1;function Nu(n,a,l){return a==="touchstart"&&Bi(),ui[a]?(l=ui[a].bind(this,l),n.addEventListener(Le[a],l,!1),l):(console.warn("wrong event specified:",a),E)}function Bo(n,a,l){if(!Le[a]){console.warn("wrong event specified:",a);return}n.removeEventListener(Le[a],l,!1)}function La(n){Zn[n.pointerId]=n}function gl(n){Zn[n.pointerId]&&(Zn[n.pointerId]=n)}function ci(n){delete Zn[n.pointerId]}function Bi(){jo||(document.addEventListener(ml,La,!0),document.addEventListener(pl,gl,!0),document.addEventListener(Cn,ci,!0),document.addEventListener(ve,ci,!0),jo=!0)}function Pn(n,a){if(a.pointerType!==(a.MSPOINTER_TYPE_MOUSE||"mouse")){a.touches=[];for(var l in Zn)a.touches.push(Zn[l]);a.changedTouches=[a],n(a)}}function Ui(n,a){a.MSPOINTER_TYPE_TOUCH&&a.pointerType===a.MSPOINTER_TYPE_TOUCH&&fe(a),Pn(n,a)}function _e(n){var a={},l,d;for(d in n)l=n[d],a[d]=l&&l.bind?l.bind(n):l;return n=a,a.type="dblclick",a.detail=2,a.isTrusted=!1,a._simulated=!0,a}var Uo=200;function Ho(n,a){n.addEventListener("dblclick",a);var l=0,d;function g(S){if(S.detail!==1){d=S.detail;return}if(!(S.pointerType==="mouse"||S.sourceCapabilities&&!S.sourceCapabilities.firesTouchEvents)){var M=Da(S);if(!(M.some(function(K){return K instanceof HTMLLabelElement&&K.attributes.for})&&!M.some(function(K){return K instanceof HTMLInputElement||K instanceof HTMLSelectElement}))){var P=Date.now();P-l<=Uo?(d++,d===2&&a(_e(S))):d=1,l=P}}}return n.addEventListener("click",g),{dblclick:a,simDblclick:g}}function fi(n,a){n.removeEventListener("dblclick",a.dblclick),n.removeEventListener("click",a.simDblclick)}var kn=Oa(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Ca=Oa(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),vl=Ca==="webkitTransition"||Ca==="OTransition"?Ca+"End":"transitionend";function _l(n){return typeof n=="string"?document.getElementById(n):n}function Na(n,a){var l=n.style[a]||n.currentStyle&&n.currentStyle[a];if((!l||l==="auto")&&document.defaultView){var d=document.defaultView.getComputedStyle(n,null);l=d?d[a]:null}return l==="auto"?null:l}function jt(n,a,l){var d=document.createElement(n);return d.className=a||"",l&&l.appendChild(d),d}function Wt(n){var a=n.parentNode;a&&a.removeChild(n)}function Xe(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function ze(n){var a=n.parentNode;a&&a.lastChild!==n&&a.appendChild(n)}function hi(n){var a=n.parentNode;a&&a.firstChild!==n&&a.insertBefore(n,a.firstChild)}function yl(n,a){if(n.classList!==void 0)return n.classList.contains(a);var l=ps(n);return l.length>0&&new RegExp("(^|\\s)"+a+"(\\s|$)").test(l)}function Et(n,a){if(n.classList!==void 0)for(var l=A(a),d=0,g=l.length;d<g;d++)n.classList.add(l[d]);else if(!yl(n,a)){var S=ps(n);Hi(n,(S?S+" ":"")+a)}}function le(n,a){n.classList!==void 0?n.classList.remove(a):Hi(n,H((" "+ps(n)+" ").replace(" "+a+" "," ")))}function Hi(n,a){n.className.baseVal===void 0?n.className=a:n.className.baseVal=a}function ps(n){return n.correspondingElement&&(n=n.correspondingElement),n.className.baseVal===void 0?n.className:n.className.baseVal}function ae(n,a){"opacity"in n.style?n.style.opacity=a:"filter"in n.style&&xl(n,a)}function xl(n,a){var l=!1,d="DXImageTransform.Microsoft.Alpha";try{l=n.filters.item(d)}catch{if(a===1)return}a=Math.round(a*100),l?(l.Enabled=a!==100,l.Opacity=a):n.style.filter+=" progid:"+d+"(opacity="+a+")"}function Oa(n){for(var a=document.documentElement.style,l=0;l<n.length;l++)if(n[l]in a)return n[l];return!1}function Nn(n,a,l){var d=a||new I(0,0);n.style[kn]=(_t.ie3d?"translate("+d.x+"px,"+d.y+"px)":"translate3d("+d.x+"px,"+d.y+"px,0)")+(l?" scale("+l+")":"")}function ne(n,a){n._leaflet_pos=a,_t.any3d?Nn(n,a):(n.style.left=a.x+"px",n.style.top=a.y+"px")}function qn(n){return n._leaflet_pos||new I(0,0)}var Zi,pn,bl;if("onselectstart"in document)Zi=function(){St(window,"selectstart",fe)},pn=function(){Jt(window,"selectstart",fe)};else{var Pi=Oa(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);Zi=function(){if(Pi){var n=document.documentElement.style;bl=n[Pi],n[Pi]="none"}},pn=function(){Pi&&(document.documentElement.style[Pi]=bl,bl=void 0)}}function gs(){St(window,"dragstart",fe)}function Ma(){Jt(window,"dragstart",fe)}var vs,Sl;function ki(n){for(;n.tabIndex===-1;)n=n.parentNode;n.style&&(Ke(),vs=n,Sl=n.style.outlineStyle,n.style.outlineStyle="none",St(window,"keydown",Ke))}function Ke(){vs&&(vs.style.outlineStyle=Sl,vs=void 0,Sl=void 0,Jt(window,"keydown",Ke))}function _s(n){do n=n.parentNode;while((!n.offsetWidth||!n.offsetHeight)&&n!==document.body);return n}function Aa(n){var a=n.getBoundingClientRect();return{x:a.width/n.offsetWidth||1,y:a.height/n.offsetHeight||1,boundingClientRect:a}}var qi={__proto__:null,TRANSFORM:kn,TRANSITION:Ca,TRANSITION_END:vl,get:_l,getStyle:Na,create:jt,remove:Wt,empty:Xe,toFront:ze,toBack:hi,hasClass:yl,addClass:Et,removeClass:le,setClass:Hi,getClass:ps,setOpacity:ae,testProp:Oa,setTransform:Nn,setPosition:ne,getPosition:qn,get disableTextSelection(){return Zi},get enableTextSelection(){return pn},disableImageDrag:gs,enableImageDrag:Ma,preventOutline:ki,restoreOutline:Ke,getSizedParentNode:_s,getScale:Aa};function St(n,a,l,d){if(a&&typeof a=="object")for(var g in a)ln(n,g,a[g],l);else{a=A(a);for(var S=0,M=a.length;S<M;S++)ln(n,a[S],l,d)}return this}var sn="_leaflet_events";function Jt(n,a,l,d){if(arguments.length===1)wl(n),delete n[sn];else if(a&&typeof a=="object")for(var g in a)Ra(n,g,a[g],l);else if(a=A(a),arguments.length===2)wl(n,function(P){return F(a,P)!==-1});else for(var S=0,M=a.length;S<M;S++)Ra(n,a[S],l,d);return this}function wl(n,a){for(var l in n[sn]){var d=l.split(/\d/)[0];(!a||a(d))&&Ra(n,d,null,null,l)}}var di={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function ln(n,a,l,d){var g=a+y(l)+(d?"_"+y(d):"");if(n[sn]&&n[sn][g])return this;var S=function(P){return l.call(d||n,P||window.event)},M=S;!_t.touchNative&&_t.pointer&&a.indexOf("touch")===0?S=Nu(n,a,S):_t.touch&&a==="dblclick"?S=Ho(n,S):"addEventListener"in n?a==="touchstart"||a==="touchmove"||a==="wheel"||a==="mousewheel"?n.addEventListener(di[a]||a,S,_t.passiveEvents?{passive:!1}:!1):a==="mouseenter"||a==="mouseleave"?(S=function(P){P=P||window.event,On(n,P)&&M(P)},n.addEventListener(di[a],S,!1)):n.addEventListener(a,M,!1):n.attachEvent("on"+a,S),n[sn]=n[sn]||{},n[sn][g]=S}function Ra(n,a,l,d,g){g=g||a+y(l)+(d?"_"+y(d):"");var S=n[sn]&&n[sn][g];if(!S)return this;!_t.touchNative&&_t.pointer&&a.indexOf("touch")===0?Bo(n,a,S):_t.touch&&a==="dblclick"?fi(n,S):"removeEventListener"in n?n.removeEventListener(di[a]||a,S,!1):n.detachEvent("on"+a,S),n[sn][g]=null}function on(n){return n.stopPropagation?n.stopPropagation():n.originalEvent?n.originalEvent._stopped=!0:n.cancelBubble=!0,this}function gn(n){return ln(n,"wheel",on),this}function mi(n){return St(n,"mousedown touchstart dblclick contextmenu",on),n._leaflet_disable_click=!0,this}function fe(n){return n.preventDefault?n.preventDefault():n.returnValue=!1,this}function Yn(n){return fe(n),on(n),this}function Da(n){if(n.composedPath)return n.composedPath();for(var a=[],l=n.target;l;)a.push(l),l=l.parentNode;return a}function ja(n,a){if(!a)return new I(n.clientX,n.clientY);var l=Aa(a),d=l.boundingClientRect;return new I((n.clientX-d.left)/l.x-a.clientLeft,(n.clientY-d.top)/l.y-a.clientTop)}var Zo=_t.linux&&_t.chrome?window.devicePixelRatio:_t.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function Ae(n){return _t.edge?n.wheelDeltaY/2:n.deltaY&&n.deltaMode===0?-n.deltaY/Zo:n.deltaY&&n.deltaMode===1?-n.deltaY*20:n.deltaY&&n.deltaMode===2?-n.deltaY*60:n.deltaX||n.deltaZ?0:n.wheelDelta?(n.wheelDeltaY||n.wheelDelta)/2:n.detail&&Math.abs(n.detail)<32765?-n.detail*20:n.detail?n.detail/-32765*60:0}function On(n,a){var l=a.relatedTarget;if(!l)return!0;try{for(;l&&l!==n;)l=l.parentNode}catch{return!1}return l!==n}var ys={__proto__:null,on:St,off:Jt,stopPropagation:on,disableScrollPropagation:gn,disableClickPropagation:mi,preventDefault:fe,stop:Yn,getPropagationPath:Da,getMousePosition:ja,getWheelDelta:Ae,isExternalTarget:On,addListener:St,removeListener:Jt},Yi=q.extend({run:function(n,a,l,d){this.stop(),this._el=n,this._inProgress=!0,this._duration=l||.25,this._easeOutPower=1/Math.max(d||.5,.2),this._startPos=qn(n),this._offset=a.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=vt(this._animate,this),this._step()},_step:function(n){var a=+new Date-this._startTime,l=this._duration*1e3;a<l?this._runFrame(this._easeOut(a/l),n):(this._runFrame(1),this._complete())},_runFrame:function(n,a){var l=this._startPos.add(this._offset.multiplyBy(n));a&&l._round(),ne(this._el,l),this.fire("step")},_complete:function(){wt(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(n){return 1-Math.pow(1-n,this._easeOutPower)}}),Pt=q.extend({options:{crs:us,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(n,a){a=B(this,a),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(n),this._initLayout(),this._onResize=_(this._onResize,this),this._initEvents(),a.maxBounds&&this.setMaxBounds(a.maxBounds),a.zoom!==void 0&&(this._zoom=this._limitZoom(a.zoom)),a.center&&a.zoom!==void 0&&this.setView(rt(a.center),a.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=Ca&&_t.any3d&&!_t.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),St(this._proxy,vl,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(n,a,l){if(a=a===void 0?this._zoom:this._limitZoom(a),n=this._limitCenter(rt(n),a,this.options.maxBounds),l=l||{},this._stop(),this._loaded&&!l.reset&&l!==!0){l.animate!==void 0&&(l.zoom=m({animate:l.animate},l.zoom),l.pan=m({animate:l.animate,duration:l.duration},l.pan));var d=this._zoom!==a?this._tryAnimatedZoom&&this._tryAnimatedZoom(n,a,l.zoom):this._tryAnimatedPan(n,l.pan);if(d)return clearTimeout(this._sizeTimer),this}return this._resetView(n,a,l.pan&&l.pan.noMoveStart),this},setZoom:function(n,a){return this._loaded?this.setView(this.getCenter(),n,{zoom:a}):(this._zoom=n,this)},zoomIn:function(n,a){return n=n||(_t.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+n,a)},zoomOut:function(n,a){return n=n||(_t.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-n,a)},setZoomAround:function(n,a,l){var d=this.getZoomScale(a),g=this.getSize().divideBy(2),S=n instanceof I?n:this.latLngToContainerPoint(n),M=S.subtract(g).multiplyBy(1-1/d),P=this.containerPointToLatLng(g.add(M));return this.setView(P,a,{zoom:l})},_getBoundsCenterZoom:function(n,a){a=a||{},n=n.getBounds?n.getBounds():lt(n);var l=st(a.paddingTopLeft||a.padding||[0,0]),d=st(a.paddingBottomRight||a.padding||[0,0]),g=this.getBoundsZoom(n,!1,l.add(d));if(g=typeof a.maxZoom=="number"?Math.min(a.maxZoom,g):g,g===1/0)return{center:n.getCenter(),zoom:g};var S=d.subtract(l).divideBy(2),M=this.project(n.getSouthWest(),g),P=this.project(n.getNorthEast(),g),K=this.unproject(M.add(P).divideBy(2).add(S),g);return{center:K,zoom:g}},fitBounds:function(n,a){if(n=lt(n),!n.isValid())throw new Error("Bounds are not valid.");var l=this._getBoundsCenterZoom(n,a);return this.setView(l.center,l.zoom,a)},fitWorld:function(n){return this.fitBounds([[-90,-180],[90,180]],n)},panTo:function(n,a){return this.setView(n,this._zoom,{pan:a})},panBy:function(n,a){if(n=st(n).round(),a=a||{},!n.x&&!n.y)return this.fire("moveend");if(a.animate!==!0&&!this.getSize().contains(n))return this._resetView(this.unproject(this.project(this.getCenter()).add(n)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new Yi,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),a.noMoveStart||this.fire("movestart"),a.animate!==!1){Et(this._mapPane,"leaflet-pan-anim");var l=this._getMapPanePos().subtract(n).round();this._panAnim.run(this._mapPane,l,a.duration||.25,a.easeLinearity)}else this._rawPanBy(n),this.fire("move").fire("moveend");return this},flyTo:function(n,a,l){if(l=l||{},l.animate===!1||!_t.any3d)return this.setView(n,a,l);this._stop();var d=this.project(this.getCenter()),g=this.project(n),S=this.getSize(),M=this._zoom;n=rt(n),a=a===void 0?M:a;var P=Math.max(S.x,S.y),K=P*this.getZoomScale(M,a),nt=g.distanceTo(d)||1,ct=1.42,yt=ct*ct;function Mt(ue){var Dn=ue?-1:1,_i=ue?K:P,Hl=K*K-P*P+Dn*yt*yt*nt*nt,Ia=2*_i*yt*nt,Wa=Hl/Ia,Wn=Math.sqrt(Wa*Wa+1)-Wa,jn=Wn<1e-9?-18:Math.log(Wn);return jn}function Te(ue){return(Math.exp(ue)-Math.exp(-ue))/2}function he(ue){return(Math.exp(ue)+Math.exp(-ue))/2}function Ye(ue){return Te(ue)/he(ue)}var Gt=Mt(0);function Vt(ue){return P*(he(Gt)/he(Gt+ct*ue))}function Bt(ue){return P*(he(Gt)*Ye(Gt+ct*ue)-Te(Gt))/yt}function Fn(ue){return 1-Math.pow(1-ue,1.5)}var Ie=Date.now(),Rs=(Mt(1)-Gt)/ct,In=l.duration?1e3*l.duration:1e3*Rs*.8;function Ul(){var ue=(Date.now()-Ie)/In,Dn=Fn(ue)*Rs;ue<=1?(this._flyToFrame=vt(Ul,this),this._move(this.unproject(d.add(g.subtract(d).multiplyBy(Bt(Dn)/nt)),M),this.getScaleZoom(P/Vt(Dn),M),{flyTo:!0})):this._move(n,a)._moveEnd(!0)}return this._moveStart(!0,l.noMoveStart),Ul.call(this),this},flyToBounds:function(n,a){var l=this._getBoundsCenterZoom(n,a);return this.flyTo(l.center,l.zoom,a)},setMaxBounds:function(n){return n=lt(n),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),n.isValid()?(this.options.maxBounds=n,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(n){var a=this.options.minZoom;return this.options.minZoom=n,this._loaded&&a!==n&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(n):this},setMaxZoom:function(n){var a=this.options.maxZoom;return this.options.maxZoom=n,this._loaded&&a!==n&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(n):this},panInsideBounds:function(n,a){this._enforcingBounds=!0;var l=this.getCenter(),d=this._limitCenter(l,this._zoom,lt(n));return l.equals(d)||this.panTo(d,a),this._enforcingBounds=!1,this},panInside:function(n,a){a=a||{};var l=st(a.paddingTopLeft||a.padding||[0,0]),d=st(a.paddingBottomRight||a.padding||[0,0]),g=this.project(this.getCenter()),S=this.project(n),M=this.getPixelBounds(),P=X([M.min.add(l),M.max.subtract(d)]),K=P.getSize();if(!P.contains(S)){this._enforcingBounds=!0;var nt=S.subtract(P.getCenter()),ct=P.extend(S).getSize().subtract(K);g.x+=nt.x<0?-ct.x:ct.x,g.y+=nt.y<0?-ct.y:ct.y,this.panTo(this.unproject(g),a),this._enforcingBounds=!1}return this},invalidateSize:function(n){if(!this._loaded)return this;n=m({animate:!1,pan:!0},n===!0?{animate:!0}:n);var a=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var l=this.getSize(),d=a.divideBy(2).round(),g=l.divideBy(2).round(),S=d.subtract(g);return!S.x&&!S.y?this:(n.animate&&n.pan?this.panBy(S):(n.pan&&this._rawPanBy(S),this.fire("move"),n.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(_(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:a,newSize:l}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(n){if(n=this._locateOptions=m({timeout:1e4,watch:!1},n),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var a=_(this._handleGeolocationResponse,this),l=_(this._handleGeolocationError,this);return n.watch?this._locationWatchId=navigator.geolocation.watchPosition(a,l,n):navigator.geolocation.getCurrentPosition(a,l,n),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(n){if(this._container._leaflet_id){var a=n.code,l=n.message||(a===1?"permission denied":a===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:a,message:"Geolocation error: "+l+"."})}},_handleGeolocationResponse:function(n){if(this._container._leaflet_id){var a=n.coords.latitude,l=n.coords.longitude,d=new ot(a,l),g=d.toBounds(n.coords.accuracy*2),S=this._locateOptions;if(S.setView){var M=this.getBoundsZoom(g);this.setView(d,S.maxZoom?Math.min(M,S.maxZoom):M)}var P={latlng:d,bounds:g,timestamp:n.timestamp};for(var K in n.coords)typeof n.coords[K]=="number"&&(P[K]=n.coords[K]);this.fire("locationfound",P)}},addHandler:function(n,a){if(!a)return this;var l=this[n]=new a(this);return this._handlers.push(l),this.options[n]&&l.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(),Wt(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(wt(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var n;for(n in this._layers)this._layers[n].remove();for(n in this._panes)Wt(this._panes[n]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(n,a){var l="leaflet-pane"+(n?" leaflet-"+n.replace("Pane","")+"-pane":""),d=jt("div",l,a||this._mapPane);return n&&(this._panes[n]=d),d},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var n=this.getPixelBounds(),a=this.unproject(n.getBottomLeft()),l=this.unproject(n.getTopRight());return new $(a,l)},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(n,a,l){n=lt(n),l=st(l||[0,0]);var d=this.getZoom()||0,g=this.getMinZoom(),S=this.getMaxZoom(),M=n.getNorthWest(),P=n.getSouthEast(),K=this.getSize().subtract(l),nt=X(this.project(P,d),this.project(M,d)).getSize(),ct=_t.any3d?this.options.zoomSnap:1,yt=K.x/nt.x,Mt=K.y/nt.y,Te=a?Math.max(yt,Mt):Math.min(yt,Mt);return d=this.getScaleZoom(Te,d),ct&&(d=Math.round(d/(ct/100))*(ct/100),d=a?Math.ceil(d/ct)*ct:Math.floor(d/ct)*ct),Math.max(g,Math.min(S,d))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new I(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(n,a){var l=this._getTopLeftPoint(n,a);return new N(l,l.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(n){return this.options.crs.getProjectedBounds(n===void 0?this.getZoom():n)},getPane:function(n){return typeof n=="string"?this._panes[n]:n},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(n,a){var l=this.options.crs;return a=a===void 0?this._zoom:a,l.scale(n)/l.scale(a)},getScaleZoom:function(n,a){var l=this.options.crs;a=a===void 0?this._zoom:a;var d=l.zoom(n*l.scale(a));return isNaN(d)?1/0:d},project:function(n,a){return a=a===void 0?this._zoom:a,this.options.crs.latLngToPoint(rt(n),a)},unproject:function(n,a){return a=a===void 0?this._zoom:a,this.options.crs.pointToLatLng(st(n),a)},layerPointToLatLng:function(n){var a=st(n).add(this.getPixelOrigin());return this.unproject(a)},latLngToLayerPoint:function(n){var a=this.project(rt(n))._round();return a._subtract(this.getPixelOrigin())},wrapLatLng:function(n){return this.options.crs.wrapLatLng(rt(n))},wrapLatLngBounds:function(n){return this.options.crs.wrapLatLngBounds(lt(n))},distance:function(n,a){return this.options.crs.distance(rt(n),rt(a))},containerPointToLayerPoint:function(n){return st(n).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(n){return st(n).add(this._getMapPanePos())},containerPointToLatLng:function(n){var a=this.containerPointToLayerPoint(st(n));return this.layerPointToLatLng(a)},latLngToContainerPoint:function(n){return this.layerPointToContainerPoint(this.latLngToLayerPoint(rt(n)))},mouseEventToContainerPoint:function(n){return ja(n,this._container)},mouseEventToLayerPoint:function(n){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(n))},mouseEventToLatLng:function(n){return this.layerPointToLatLng(this.mouseEventToLayerPoint(n))},_initContainer:function(n){var a=this._container=_l(n);if(a){if(a._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");St(a,"scroll",this._onScroll,this),this._containerId=y(a)},_initLayout:function(){var n=this._container;this._fadeAnimated=this.options.fadeAnimation&&_t.any3d,Et(n,"leaflet-container"+(_t.touch?" leaflet-touch":"")+(_t.retina?" leaflet-retina":"")+(_t.ielt9?" leaflet-oldie":"")+(_t.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var a=Na(n,"position");a!=="absolute"&&a!=="relative"&&a!=="fixed"&&a!=="sticky"&&(n.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var n=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),ne(this._mapPane,new I(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Et(n.markerPane,"leaflet-zoom-hide"),Et(n.shadowPane,"leaflet-zoom-hide"))},_resetView:function(n,a,l){ne(this._mapPane,new I(0,0));var d=!this._loaded;this._loaded=!0,a=this._limitZoom(a),this.fire("viewprereset");var g=this._zoom!==a;this._moveStart(g,l)._move(n,a)._moveEnd(g),this.fire("viewreset"),d&&this.fire("load")},_moveStart:function(n,a){return n&&this.fire("zoomstart"),a||this.fire("movestart"),this},_move:function(n,a,l,d){a===void 0&&(a=this._zoom);var g=this._zoom!==a;return this._zoom=a,this._lastCenter=n,this._pixelOrigin=this._getNewPixelOrigin(n),d?l&&l.pinch&&this.fire("zoom",l):((g||l&&l.pinch)&&this.fire("zoom",l),this.fire("move",l)),this},_moveEnd:function(n){return n&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return wt(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(n){ne(this._mapPane,this._getMapPanePos().subtract(n))},_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(n){this._targets={},this._targets[y(this._container)]=this;var a=n?Jt:St;a(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&a(window,"resize",this._onResize,this),_t.any3d&&this.options.transform3DLimit&&(n?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){wt(this._resizeRequest),this._resizeRequest=vt(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var n=this._getMapPanePos();Math.max(Math.abs(n.x),Math.abs(n.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(n,a){for(var l=[],d,g=a==="mouseout"||a==="mouseover",S=n.target||n.srcElement,M=!1;S;){if(d=this._targets[y(S)],d&&(a==="click"||a==="preclick")&&this._draggableMoved(d)){M=!0;break}if(d&&d.listens(a,!0)&&(g&&!On(S,n)||(l.push(d),g))||S===this._container)break;S=S.parentNode}return!l.length&&!M&&!g&&this.listens(a,!0)&&(l=[this]),l},_isClickDisabled:function(n){for(;n&&n!==this._container;){if(n._leaflet_disable_click)return!0;n=n.parentNode}},_handleDOMEvent:function(n){var a=n.target||n.srcElement;if(!(!this._loaded||a._leaflet_disable_events||n.type==="click"&&this._isClickDisabled(a))){var l=n.type;l==="mousedown"&&ki(a),this._fireDOMEvent(n,l)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(n,a,l){if(n.type==="click"){var d=m({},n);d.type="preclick",this._fireDOMEvent(d,d.type,l)}var g=this._findEventTargets(n,a);if(l){for(var S=[],M=0;M<l.length;M++)l[M].listens(a,!0)&&S.push(l[M]);g=S.concat(g)}if(g.length){a==="contextmenu"&&fe(n);var P=g[0],K={originalEvent:n};if(n.type!=="keypress"&&n.type!=="keydown"&&n.type!=="keyup"){var nt=P.getLatLng&&(!P._radius||P._radius<=10);K.containerPoint=nt?this.latLngToContainerPoint(P.getLatLng()):this.mouseEventToContainerPoint(n),K.layerPoint=this.containerPointToLayerPoint(K.containerPoint),K.latlng=nt?P.getLatLng():this.layerPointToLatLng(K.layerPoint)}for(M=0;M<g.length;M++)if(g[M].fire(a,K,!0),K.originalEvent._stopped||g[M].options.bubblingMouseEvents===!1&&F(this._mouseEvents,a)!==-1)return}},_draggableMoved:function(n){return n=n.dragging&&n.dragging.enabled()?n:this,n.dragging&&n.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var n=0,a=this._handlers.length;n<a;n++)this._handlers[n].disable()},whenReady:function(n,a){return this._loaded?n.call(a||this,{target:this}):this.on("load",n,a),this},_getMapPanePos:function(){return qn(this._mapPane)||new I(0,0)},_moved:function(){var n=this._getMapPanePos();return n&&!n.equals([0,0])},_getTopLeftPoint:function(n,a){var l=n&&a!==void 0?this._getNewPixelOrigin(n,a):this.getPixelOrigin();return l.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(n,a){var l=this.getSize()._divideBy(2);return this.project(n,a)._subtract(l)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(n,a,l){var d=this._getNewPixelOrigin(l,a);return this.project(n,a)._subtract(d)},_latLngBoundsToNewLayerBounds:function(n,a,l){var d=this._getNewPixelOrigin(l,a);return X([this.project(n.getSouthWest(),a)._subtract(d),this.project(n.getNorthWest(),a)._subtract(d),this.project(n.getSouthEast(),a)._subtract(d),this.project(n.getNorthEast(),a)._subtract(d)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(n){return this.latLngToLayerPoint(n).subtract(this._getCenterLayerPoint())},_limitCenter:function(n,a,l){if(!l)return n;var d=this.project(n,a),g=this.getSize().divideBy(2),S=new N(d.subtract(g),d.add(g)),M=this._getBoundsOffset(S,l,a);return Math.abs(M.x)<=1&&Math.abs(M.y)<=1?n:this.unproject(d.add(M),a)},_limitOffset:function(n,a){if(!a)return n;var l=this.getPixelBounds(),d=new N(l.min.add(n),l.max.add(n));return n.add(this._getBoundsOffset(d,a))},_getBoundsOffset:function(n,a,l){var d=X(this.project(a.getNorthEast(),l),this.project(a.getSouthWest(),l)),g=d.min.subtract(n.min),S=d.max.subtract(n.max),M=this._rebound(g.x,-S.x),P=this._rebound(g.y,-S.y);return new I(M,P)},_rebound:function(n,a){return n+a>0?Math.round(n-a)/2:Math.max(0,Math.ceil(n))-Math.max(0,Math.floor(a))},_limitZoom:function(n){var a=this.getMinZoom(),l=this.getMaxZoom(),d=_t.any3d?this.options.zoomSnap:1;return d&&(n=Math.round(n/d)*d),Math.max(a,Math.min(l,n))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){le(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(n,a){var l=this._getCenterOffset(n)._trunc();return(a&&a.animate)!==!0&&!this.getSize().contains(l)?!1:(this.panBy(l,a),!0)},_createAnimProxy:function(){var n=this._proxy=jt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(n),this.on("zoomanim",function(a){var l=kn,d=this._proxy.style[l];Nn(this._proxy,this.project(a.center,a.zoom),this.getZoomScale(a.zoom,1)),d===this._proxy.style[l]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){Wt(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var n=this.getCenter(),a=this.getZoom();Nn(this._proxy,this.project(n,a),this.getZoomScale(a,1))},_catchTransitionEnd:function(n){this._animatingZoom&&n.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(n,a,l){if(this._animatingZoom)return!0;if(l=l||{},!this._zoomAnimated||l.animate===!1||this._nothingToAnimate()||Math.abs(a-this._zoom)>this.options.zoomAnimationThreshold)return!1;var d=this.getZoomScale(a),g=this._getCenterOffset(n)._divideBy(1-1/d);return l.animate!==!0&&!this.getSize().contains(g)?!1:(vt(function(){this._moveStart(!0,l.noMoveStart||!1)._animateZoom(n,a,!0)},this),!0)},_animateZoom:function(n,a,l,d){this._mapPane&&(l&&(this._animatingZoom=!0,this._animateToCenter=n,this._animateToZoom=a,Et(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:n,zoom:a,noUpdate:d}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(_(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&le(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 zl(n,a){return new Pt(n,a)}var qe=Rt.extend({options:{position:"topright"},initialize:function(n){B(this,n)},getPosition:function(){return this.options.position},setPosition:function(n){var a=this._map;return a&&a.removeControl(this),this.options.position=n,a&&a.addControl(this),this},getContainer:function(){return this._container},addTo:function(n){this.remove(),this._map=n;var a=this._container=this.onAdd(n),l=this.getPosition(),d=n._controlCorners[l];return Et(a,"leaflet-control"),l.indexOf("bottom")!==-1?d.insertBefore(a,d.firstChild):d.appendChild(a),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(Wt(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(n){this._map&&n&&n.screenX>0&&n.screenY>0&&this._map.getContainer().focus()}}),Mn=function(n){return new qe(n)};Pt.include({addControl:function(n){return n.addTo(this),this},removeControl:function(n){return n.remove(),this},_initControlPos:function(){var n=this._controlCorners={},a="leaflet-",l=this._controlContainer=jt("div",a+"control-container",this._container);function d(g,S){var M=a+g+" "+a+S;n[g+S]=jt("div",M,l)}d("top","left"),d("top","right"),d("bottom","left"),d("bottom","right")},_clearControlPos:function(){for(var n in this._controlCorners)Wt(this._controlCorners[n]);Wt(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Ba=qe.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(n,a,l,d){return l<d?-1:d<l?1:0}},initialize:function(n,a,l){B(this,l),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(var d in n)this._addLayer(n[d],d);for(d in a)this._addLayer(a[d],d,!0)},onAdd:function(n){this._initLayout(),this._update(),this._map=n,n.on("zoomend",this._checkDisabledLayers,this);for(var a=0;a<this._layers.length;a++)this._layers[a].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(n){return qe.prototype.addTo.call(this,n),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var n=0;n<this._layers.length;n++)this._layers[n].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(n,a){return this._addLayer(n,a),this._map?this._update():this},addOverlay:function(n,a){return this._addLayer(n,a,!0),this._map?this._update():this},removeLayer:function(n){n.off("add remove",this._onLayerChange,this);var a=this._getLayer(y(n));return a&&this._layers.splice(this._layers.indexOf(a),1),this._map?this._update():this},expand:function(){Et(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var n=this._map.getSize().y-(this._container.offsetTop+50);return n<this._section.clientHeight?(Et(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=n+"px"):le(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return le(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var n="leaflet-control-layers",a=this._container=jt("div",n),l=this.options.collapsed;a.setAttribute("aria-haspopup",!0),mi(a),gn(a);var d=this._section=jt("section",n+"-list");l&&(this._map.on("click",this.collapse,this),St(a,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var g=this._layersLink=jt("a",n+"-toggle",a);g.href="#",g.title="Layers",g.setAttribute("role","button"),St(g,{keydown:function(S){S.keyCode===13&&this._expandSafely()},click:function(S){fe(S),this._expandSafely()}},this),l||this.expand(),this._baseLayersList=jt("div",n+"-base",d),this._separator=jt("div",n+"-separator",d),this._overlaysList=jt("div",n+"-overlays",d),a.appendChild(d)},_getLayer:function(n){for(var a=0;a<this._layers.length;a++)if(this._layers[a]&&y(this._layers[a].layer)===n)return this._layers[a]},_addLayer:function(n,a,l){this._map&&n.on("add remove",this._onLayerChange,this),this._layers.push({layer:n,name:a,overlay:l}),this.options.sortLayers&&this._layers.sort(_(function(d,g){return this.options.sortFunction(d.layer,g.layer,d.name,g.name)},this)),this.options.autoZIndex&&n.setZIndex&&(this._lastZIndex++,n.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;Xe(this._baseLayersList),Xe(this._overlaysList),this._layerControlInputs=[];var n,a,l,d,g=0;for(l=0;l<this._layers.length;l++)d=this._layers[l],this._addItem(d),a=a||d.overlay,n=n||!d.overlay,g+=d.overlay?0:1;return this.options.hideSingleBase&&(n=n&&g>1,this._baseLayersList.style.display=n?"":"none"),this._separator.style.display=a&&n?"":"none",this},_onLayerChange:function(n){this._handlingClick||this._update();var a=this._getLayer(y(n.target)),l=a.overlay?n.type==="add"?"overlayadd":"overlayremove":n.type==="add"?"baselayerchange":null;l&&this._map.fire(l,a)},_createRadioElement:function(n,a){var l='<input type="radio" class="leaflet-control-layers-selector" name="'+n+'"'+(a?' checked="checked"':"")+"/>",d=document.createElement("div");return d.innerHTML=l,d.firstChild},_addItem:function(n){var a=document.createElement("label"),l=this._map.hasLayer(n.layer),d;n.overlay?(d=document.createElement("input"),d.type="checkbox",d.className="leaflet-control-layers-selector",d.defaultChecked=l):d=this._createRadioElement("leaflet-base-layers_"+y(this),l),this._layerControlInputs.push(d),d.layerId=y(n.layer),St(d,"click",this._onInputClick,this);var g=document.createElement("span");g.innerHTML=" "+n.name;var S=document.createElement("span");a.appendChild(S),S.appendChild(d),S.appendChild(g);var M=n.overlay?this._overlaysList:this._baseLayersList;return M.appendChild(a),this._checkDisabledLayers(),a},_onInputClick:function(){if(!this._preventClick){var n=this._layerControlInputs,a,l,d=[],g=[];this._handlingClick=!0;for(var S=n.length-1;S>=0;S--)a=n[S],l=this._getLayer(a.layerId).layer,a.checked?d.push(l):a.checked||g.push(l);for(S=0;S<g.length;S++)this._map.hasLayer(g[S])&&this._map.removeLayer(g[S]);for(S=0;S<d.length;S++)this._map.hasLayer(d[S])||this._map.addLayer(d[S]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var n=this._layerControlInputs,a,l,d=this._map.getZoom(),g=n.length-1;g>=0;g--)a=n[g],l=this._getLayer(a.layerId).layer,a.disabled=l.options.minZoom!==void 0&&d<l.options.minZoom||l.options.maxZoom!==void 0&&d>l.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var n=this._section;this._preventClick=!0,St(n,"click",fe),this.expand();var a=this;setTimeout(function(){Jt(n,"click",fe),a._preventClick=!1})}}),Po=function(n,a,l){return new Ba(n,a,l)},Tl=qe.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">&#x2212;</span>',zoomOutTitle:"Zoom out"},onAdd:function(n){var a="leaflet-control-zoom",l=jt("div",a+" leaflet-bar"),d=this.options;return this._zoomInButton=this._createButton(d.zoomInText,d.zoomInTitle,a+"-in",l,this._zoomIn),this._zoomOutButton=this._createButton(d.zoomOutText,d.zoomOutTitle,a+"-out",l,this._zoomOut),this._updateDisabled(),n.on("zoomend zoomlevelschange",this._updateDisabled,this),l},onRemove:function(n){n.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(n){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(n.shiftKey?3:1))},_zoomOut:function(n){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(n.shiftKey?3:1))},_createButton:function(n,a,l,d,g){var S=jt("a",l,d);return S.innerHTML=n,S.href="#",S.title=a,S.setAttribute("role","button"),S.setAttribute("aria-label",a),mi(S),St(S,"click",Yn),St(S,"click",g,this),St(S,"click",this._refocusOnMap,this),S},_updateDisabled:function(){var n=this._map,a="leaflet-disabled";le(this._zoomInButton,a),le(this._zoomOutButton,a),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||n._zoom===n.getMinZoom())&&(Et(this._zoomOutButton,a),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||n._zoom===n.getMaxZoom())&&(Et(this._zoomInButton,a),this._zoomInButton.setAttribute("aria-disabled","true"))}});Pt.mergeOptions({zoomControl:!0}),Pt.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Tl,this.addControl(this.zoomControl))});var Ou=function(n){return new Tl(n)},ko=qe.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(n){var a="leaflet-control-scale",l=jt("div",a),d=this.options;return this._addScales(d,a+"-line",l),n.on(d.updateWhenIdle?"moveend":"move",this._update,this),n.whenReady(this._update,this),l},onRemove:function(n){n.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(n,a,l){n.metric&&(this._mScale=jt("div",a,l)),n.imperial&&(this._iScale=jt("div",a,l))},_update:function(){var n=this._map,a=n.getSize().y/2,l=n.distance(n.containerPointToLatLng([0,a]),n.containerPointToLatLng([this.options.maxWidth,a]));this._updateScales(l)},_updateScales:function(n){this.options.metric&&n&&this._updateMetric(n),this.options.imperial&&n&&this._updateImperial(n)},_updateMetric:function(n){var a=this._getRoundNum(n),l=a<1e3?a+" m":a/1e3+" km";this._updateScale(this._mScale,l,a/n)},_updateImperial:function(n){var a=n*3.2808399,l,d,g;a>5280?(l=a/5280,d=this._getRoundNum(l),this._updateScale(this._iScale,d+" mi",d/l)):(g=this._getRoundNum(a),this._updateScale(this._iScale,g+" ft",g/a))},_updateScale:function(n,a,l){n.style.width=Math.round(this.options.maxWidth*l)+"px",n.innerHTML=a},_getRoundNum:function(n){var a=Math.pow(10,(Math.floor(n)+"").length-1),l=n/a;return l=l>=10?10:l>=5?5:l>=3?3:l>=2?2:1,a*l}}),El=function(n){return new ko(n)},Mu='<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>',Ll=qe.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(_t.inlineSvg?Mu+" ":"")+"Leaflet</a>"},initialize:function(n){B(this,n),this._attributions={}},onAdd:function(n){n.attributionControl=this,this._container=jt("div","leaflet-control-attribution"),mi(this._container);for(var a in n._layers)n._layers[a].getAttribution&&this.addAttribution(n._layers[a].getAttribution());return this._update(),n.on("layeradd",this._addAttribution,this),this._container},onRemove:function(n){n.off("layeradd",this._addAttribution,this)},_addAttribution:function(n){n.layer.getAttribution&&(this.addAttribution(n.layer.getAttribution()),n.layer.once("remove",function(){this.removeAttribution(n.layer.getAttribution())},this))},setPrefix:function(n){return this.options.prefix=n,this._update(),this},addAttribution:function(n){return n?(this._attributions[n]||(this._attributions[n]=0),this._attributions[n]++,this._update(),this):this},removeAttribution:function(n){return n?(this._attributions[n]&&(this._attributions[n]--,this._update()),this):this},_update:function(){if(this._map){var n=[];for(var a in this._attributions)this._attributions[a]&&n.push(a);var l=[];this.options.prefix&&l.push(this.options.prefix),n.length&&l.push(n.join(", ")),this._container.innerHTML=l.join(' <span aria-hidden="true">|</span> ')}}});Pt.mergeOptions({attributionControl:!0}),Pt.addInitHook(function(){this.options.attributionControl&&new Ll().addTo(this)});var Au=function(n){return new Ll(n)};qe.Layers=Ba,qe.Zoom=Tl,qe.Scale=ko,qe.Attribution=Ll,Mn.layers=Po,Mn.zoom=Ou,Mn.scale=El,Mn.attribution=Au;var vn=Rt.extend({initialize:function(n){this._map=n},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}});vn.addTo=function(n,a){return n.addHandler(a,this),this};var Ru={Events:D},Cl=_t.touch?"touchstart mousedown":"mousedown",Gn=q.extend({options:{clickTolerance:3},initialize:function(n,a,l,d){B(this,d),this._element=n,this._dragStartTarget=a||n,this._preventOutline=l},enable:function(){this._enabled||(St(this._dragStartTarget,Cl,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Gn._dragging===this&&this.finishDrag(!0),Jt(this._dragStartTarget,Cl,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(n){if(this._enabled&&(this._moved=!1,!yl(this._element,"leaflet-zoom-anim"))){if(n.touches&&n.touches.length!==1){Gn._dragging===this&&this.finishDrag();return}if(!(Gn._dragging||n.shiftKey||n.which!==1&&n.button!==1&&!n.touches)&&(Gn._dragging=this,this._preventOutline&&ki(this._element),gs(),Zi(),!this._moving)){this.fire("down");var a=n.touches?n.touches[0]:n,l=_s(this._element);this._startPoint=new I(a.clientX,a.clientY),this._startPos=qn(this._element),this._parentScale=Aa(l);var d=n.type==="mousedown";St(document,d?"mousemove":"touchmove",this._onMove,this),St(document,d?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(n){if(this._enabled){if(n.touches&&n.touches.length>1){this._moved=!0;return}var a=n.touches&&n.touches.length===1?n.touches[0]:n,l=new I(a.clientX,a.clientY)._subtract(this._startPoint);!l.x&&!l.y||Math.abs(l.x)+Math.abs(l.y)<this.options.clickTolerance||(l.x/=this._parentScale.x,l.y/=this._parentScale.y,fe(n),this._moved||(this.fire("dragstart"),this._moved=!0,Et(document.body,"leaflet-dragging"),this._lastTarget=n.target||n.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),Et(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(l),this._moving=!0,this._lastEvent=n,this._updatePosition())}},_updatePosition:function(){var n={originalEvent:this._lastEvent};this.fire("predrag",n),ne(this._element,this._newPos),this.fire("drag",n)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(n){le(document.body,"leaflet-dragging"),this._lastTarget&&(le(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Jt(document,"mousemove touchmove",this._onMove,this),Jt(document,"mouseup touchend touchcancel",this._onUp,this),Ma(),pn();var a=this._moved&&this._moving;this._moving=!1,Gn._dragging=!1,a&&this.fire("dragend",{noInertia:n,distance:this._newPos.distanceTo(this._startPos)})}});function qo(n,a,l){var d,g=[1,4,2,8],S,M,P,K,nt,ct,yt,Mt;for(S=0,ct=n.length;S<ct;S++)n[S]._code=pi(n[S],a);for(P=0;P<4;P++){for(yt=g[P],d=[],S=0,ct=n.length,M=ct-1;S<ct;M=S++)K=n[S],nt=n[M],K._code&yt?nt._code&yt||(Mt=xs(nt,K,yt,a,l),Mt._code=pi(Mt,a),d.push(Mt)):(nt._code&yt&&(Mt=xs(nt,K,yt,a,l),Mt._code=pi(Mt,a),d.push(Mt)),d.push(K));n=d}return n}function Yo(n,a){var l,d,g,S,M,P,K,nt,ct;if(!n||n.length===0)throw new Error("latlngs not passed");Qe(n)||(console.warn("latlngs are not flat! Only the first ring will be used"),n=n[0]);var yt=rt([0,0]),Mt=lt(n),Te=Mt.getNorthWest().distanceTo(Mt.getSouthWest())*Mt.getNorthEast().distanceTo(Mt.getNorthWest());Te<1700&&(yt=Nl(n));var he=n.length,Ye=[];for(l=0;l<he;l++){var Gt=rt(n[l]);Ye.push(a.project(rt([Gt.lat-yt.lat,Gt.lng-yt.lng])))}for(P=K=nt=0,l=0,d=he-1;l<he;d=l++)g=Ye[l],S=Ye[d],M=g.y*S.x-S.y*g.x,K+=(g.x+S.x)*M,nt+=(g.y+S.y)*M,P+=M*3;P===0?ct=Ye[0]:ct=[K/P,nt/P];var Vt=a.unproject(st(ct));return rt([Vt.lat+yt.lat,Vt.lng+yt.lng])}function Nl(n){for(var a=0,l=0,d=0,g=0;g<n.length;g++){var S=rt(n[g]);a+=S.lat,l+=S.lng,d++}return rt([a/d,l/d])}var Ol={__proto__:null,clipPolygon:qo,polygonCenter:Yo,centroid:Nl};function Go(n,a){if(!a||!n.length)return n.slice();var l=a*a;return n=ju(n,l),n=Xo(n,l),n}function Vo(n,a,l){return Math.sqrt(Ua(n,a,l,!0))}function Du(n,a,l){return Ua(n,a,l)}function Xo(n,a){var l=n.length,d=typeof Uint8Array<"u"?Uint8Array:Array,g=new d(l);g[0]=g[l-1]=1,Ml(n,g,a,0,l-1);var S,M=[];for(S=0;S<l;S++)g[S]&&M.push(n[S]);return M}function Ml(n,a,l,d,g){var S=0,M,P,K;for(P=d+1;P<=g-1;P++)K=Ua(n[P],n[d],n[g],!0),K>S&&(M=P,S=K);S>l&&(a[M]=1,Ml(n,a,l,d,M),Ml(n,a,l,M,g))}function ju(n,a){for(var l=[n[0]],d=1,g=0,S=n.length;d<S;d++)Bu(n[d],n[g])>a&&(l.push(n[d]),g=d);return g<S-1&&l.push(n[S-1]),l}var Ko;function Qo(n,a,l,d,g){var S=d?Ko:pi(n,l),M=pi(a,l),P,K,nt;for(Ko=M;;){if(!(S|M))return[n,a];if(S&M)return!1;P=S||M,K=xs(n,a,P,l,g),nt=pi(K,l),P===S?(n=K,S=nt):(a=K,M=nt)}}function xs(n,a,l,d,g){var S=a.x-n.x,M=a.y-n.y,P=d.min,K=d.max,nt,ct;return l&8?(nt=n.x+S*(K.y-n.y)/M,ct=K.y):l&4?(nt=n.x+S*(P.y-n.y)/M,ct=P.y):l&2?(nt=K.x,ct=n.y+M*(K.x-n.x)/S):l&1&&(nt=P.x,ct=n.y+M*(P.x-n.x)/S),new I(nt,ct,g)}function pi(n,a){var l=0;return n.x<a.min.x?l|=1:n.x>a.max.x&&(l|=2),n.y<a.min.y?l|=4:n.y>a.max.y&&(l|=8),l}function Bu(n,a){var l=a.x-n.x,d=a.y-n.y;return l*l+d*d}function Ua(n,a,l,d){var g=a.x,S=a.y,M=l.x-g,P=l.y-S,K=M*M+P*P,nt;return K>0&&(nt=((n.x-g)*M+(n.y-S)*P)/K,nt>1?(g=l.x,S=l.y):nt>0&&(g+=M*nt,S+=P*nt)),M=n.x-g,P=n.y-S,d?M*M+P*P:new I(g,S)}function Qe(n){return!k(n[0])||typeof n[0][0]!="object"&&typeof n[0][0]<"u"}function bs(n){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Qe(n)}function Gi(n,a){var l,d,g,S,M,P,K,nt;if(!n||n.length===0)throw new Error("latlngs not passed");Qe(n)||(console.warn("latlngs are not flat! Only the first ring will be used"),n=n[0]);var ct=rt([0,0]),yt=lt(n),Mt=yt.getNorthWest().distanceTo(yt.getSouthWest())*yt.getNorthEast().distanceTo(yt.getNorthWest());Mt<1700&&(ct=Nl(n));var Te=n.length,he=[];for(l=0;l<Te;l++){var Ye=rt(n[l]);he.push(a.project(rt([Ye.lat-ct.lat,Ye.lng-ct.lng])))}for(l=0,d=0;l<Te-1;l++)d+=he[l].distanceTo(he[l+1])/2;if(d===0)nt=he[0];else for(l=0,S=0;l<Te-1;l++)if(M=he[l],P=he[l+1],g=M.distanceTo(P),S+=g,S>d){K=(S-d)/g,nt=[P.x-K*(P.x-M.x),P.y-K*(P.y-M.y)];break}var Gt=a.unproject(st(nt));return rt([Gt.lat+ct.lat,Gt.lng+ct.lng])}var Uu={__proto__:null,simplify:Go,pointToSegmentDistance:Vo,closestPointOnSegment:Du,clipSegment:Qo,_getEdgeIntersection:xs,_getBitCode:pi,_sqClosestPointOnSegment:Ua,isFlat:Qe,_flat:bs,polylineCenter:Gi},Ss={project:function(n){return new I(n.lng,n.lat)},unproject:function(n){return new ot(n.y,n.x)},bounds:new N([-180,-90],[180,90])},ws={R:6378137,R_MINOR:6356752314245179e-9,bounds:new N([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(n){var a=Math.PI/180,l=this.R,d=n.lat*a,g=this.R_MINOR/l,S=Math.sqrt(1-g*g),M=S*Math.sin(d),P=Math.tan(Math.PI/4-d/2)/Math.pow((1-M)/(1+M),S/2);return d=-l*Math.log(Math.max(P,1e-10)),new I(n.lng*a*l,d)},unproject:function(n){for(var a=180/Math.PI,l=this.R,d=this.R_MINOR/l,g=Math.sqrt(1-d*d),S=Math.exp(-n.y/l),M=Math.PI/2-2*Math.atan(S),P=0,K=.1,nt;P<15&&Math.abs(K)>1e-7;P++)nt=g*Math.sin(M),nt=Math.pow((1-nt)/(1+nt),g/2),K=Math.PI/2-2*Math.atan(S*nt)-M,M+=K;return new ot(M*a,n.x*a/l)}},Jo={__proto__:null,LonLat:Ss,Mercator:ws,SphericalMercator:we},Fo=m({},Ot,{code:"EPSG:3395",projection:ws,transformation:(function(){var n=.5/(Math.PI*ws.R);return si(n,.5,-n,.5)})()}),Al=m({},Ot,{code:"EPSG:4326",projection:Ss,transformation:si(1/180,1,-1/180,.5)}),Vi=m({},at,{projection:Ss,transformation:si(1,0,-1,0),scale:function(n){return Math.pow(2,n)},zoom:function(n){return Math.log(n)/Math.LN2},distance:function(n,a){var l=a.lng-n.lng,d=a.lat-n.lat;return Math.sqrt(l*l+d*d)},infinite:!0});at.Earth=Ot,at.EPSG3395=Fo,at.EPSG3857=us,at.EPSG900913=li,at.EPSG4326=Al,at.Simple=Vi;var rn=q.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(n){return n.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(n){return n&&n.removeLayer(this),this},getPane:function(n){return this._map.getPane(n?this.options[n]||n:this.options.pane)},addInteractiveTarget:function(n){return this._map._targets[y(n)]=this,this},removeInteractiveTarget:function(n){return delete this._map._targets[y(n)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(n){var a=n.target;if(a.hasLayer(this)){if(this._map=a,this._zoomAnimated=a._zoomAnimated,this.getEvents){var l=this.getEvents();a.on(l,this),this.once("remove",function(){a.off(l,this)},this)}this.onAdd(a),this.fire("add"),a.fire("layeradd",{layer:this})}}});Pt.include({addLayer:function(n){if(!n._layerAdd)throw new Error("The provided object is not a Layer.");var a=y(n);return this._layers[a]?this:(this._layers[a]=n,n._mapToAdd=this,n.beforeAdd&&n.beforeAdd(this),this.whenReady(n._layerAdd,n),this)},removeLayer:function(n){var a=y(n);return this._layers[a]?(this._loaded&&n.onRemove(this),delete this._layers[a],this._loaded&&(this.fire("layerremove",{layer:n}),n.fire("remove")),n._map=n._mapToAdd=null,this):this},hasLayer:function(n){return y(n)in this._layers},eachLayer:function(n,a){for(var l in this._layers)n.call(a,this._layers[l]);return this},_addLayers:function(n){n=n?k(n)?n:[n]:[];for(var a=0,l=n.length;a<l;a++)this.addLayer(n[a])},_addZoomLimit:function(n){(!isNaN(n.options.maxZoom)||!isNaN(n.options.minZoom))&&(this._zoomBoundLayers[y(n)]=n,this._updateZoomLevels())},_removeZoomLimit:function(n){var a=y(n);this._zoomBoundLayers[a]&&(delete this._zoomBoundLayers[a],this._updateZoomLevels())},_updateZoomLevels:function(){var n=1/0,a=-1/0,l=this._getZoomSpan();for(var d in this._zoomBoundLayers){var g=this._zoomBoundLayers[d].options;n=g.minZoom===void 0?n:Math.min(n,g.minZoom),a=g.maxZoom===void 0?a:Math.max(a,g.maxZoom)}this._layersMaxZoom=a===-1/0?void 0:a,this._layersMinZoom=n===1/0?void 0:n,l!==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 Xi=rn.extend({initialize:function(n,a){B(this,a),this._layers={};var l,d;if(n)for(l=0,d=n.length;l<d;l++)this.addLayer(n[l])},addLayer:function(n){var a=this.getLayerId(n);return this._layers[a]=n,this._map&&this._map.addLayer(n),this},removeLayer:function(n){var a=n in this._layers?n:this.getLayerId(n);return this._map&&this._layers[a]&&this._map.removeLayer(this._layers[a]),delete this._layers[a],this},hasLayer:function(n){var a=typeof n=="number"?n:this.getLayerId(n);return a in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(n){var a=Array.prototype.slice.call(arguments,1),l,d;for(l in this._layers)d=this._layers[l],d[n]&&d[n].apply(d,a);return this},onAdd:function(n){this.eachLayer(n.addLayer,n)},onRemove:function(n){this.eachLayer(n.removeLayer,n)},eachLayer:function(n,a){for(var l in this._layers)n.call(a,this._layers[l]);return this},getLayer:function(n){return this._layers[n]},getLayers:function(){var n=[];return this.eachLayer(n.push,n),n},setZIndex:function(n){return this.invoke("setZIndex",n)},getLayerId:function(n){return y(n)}}),Hu=function(n,a){return new Xi(n,a)},_n=Xi.extend({addLayer:function(n){return this.hasLayer(n)?this:(n.addEventParent(this),Xi.prototype.addLayer.call(this,n),this.fire("layeradd",{layer:n}))},removeLayer:function(n){return this.hasLayer(n)?(n in this._layers&&(n=this._layers[n]),n.removeEventParent(this),Xi.prototype.removeLayer.call(this,n),this.fire("layerremove",{layer:n})):this},setStyle:function(n){return this.invoke("setStyle",n)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var n=new $;for(var a in this._layers){var l=this._layers[a];n.extend(l.getBounds?l.getBounds():l.getLatLng())}return n}}),Io=function(n,a){return new _n(n,a)},yn=Rt.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(n){B(this,n)},createIcon:function(n){return this._createIcon("icon",n)},createShadow:function(n){return this._createIcon("shadow",n)},_createIcon:function(n,a){var l=this._getIconUrl(n);if(!l){if(n==="icon")throw new Error("iconUrl not set in Icon options (see the docs).");return null}var d=this._createImg(l,a&&a.tagName==="IMG"?a:null);return this._setIconStyles(d,n),(this.options.crossOrigin||this.options.crossOrigin==="")&&(d.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),d},_setIconStyles:function(n,a){var l=this.options,d=l[a+"Size"];typeof d=="number"&&(d=[d,d]);var g=st(d),S=st(a==="shadow"&&l.shadowAnchor||l.iconAnchor||g&&g.divideBy(2,!0));n.className="leaflet-marker-"+a+" "+(l.className||""),S&&(n.style.marginLeft=-S.x+"px",n.style.marginTop=-S.y+"px"),g&&(n.style.width=g.x+"px",n.style.height=g.y+"px")},_createImg:function(n,a){return a=a||document.createElement("img"),a.src=n,a},_getIconUrl:function(n){return _t.retina&&this.options[n+"RetinaUrl"]||this.options[n+"Url"]}});function Ha(n){return new yn(n)}var Za=yn.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(n){return typeof Za.imagePath!="string"&&(Za.imagePath=this._detectIconPath()),(this.options.imagePath||Za.imagePath)+yn.prototype._getIconUrl.call(this,n)},_stripUrl:function(n){var a=function(l,d,g){var S=d.exec(l);return S&&S[g]};return n=a(n,/^url\((['"])?(.+)\1\)$/,2),n&&a(n,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var n=jt("div","leaflet-default-icon-path",document.body),a=Na(n,"background-image")||Na(n,"backgroundImage");if(document.body.removeChild(n),a=this._stripUrl(a),a)return a;var l=document.querySelector('link[href$="leaflet.css"]');return l?l.href.substring(0,l.href.length-11-1):""}}),Pa=vn.extend({initialize:function(n){this._marker=n},addHooks:function(){var n=this._marker._icon;this._draggable||(this._draggable=new Gn(n,n,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),Et(n,"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&&le(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(n){var a=this._marker,l=a._map,d=this._marker.options.autoPanSpeed,g=this._marker.options.autoPanPadding,S=qn(a._icon),M=l.getPixelBounds(),P=l.getPixelOrigin(),K=X(M.min._subtract(P).add(g),M.max._subtract(P).subtract(g));if(!K.contains(S)){var nt=st((Math.max(K.max.x,S.x)-K.max.x)/(M.max.x-K.max.x)-(Math.min(K.min.x,S.x)-K.min.x)/(M.min.x-K.min.x),(Math.max(K.max.y,S.y)-K.max.y)/(M.max.y-K.max.y)-(Math.min(K.min.y,S.y)-K.min.y)/(M.min.y-K.min.y)).multiplyBy(d);l.panBy(nt,{animate:!1}),this._draggable._newPos._add(nt),this._draggable._startPos._add(nt),ne(a._icon,this._draggable._newPos),this._onDrag(n),this._panRequest=vt(this._adjustPan.bind(this,n))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(n){this._marker.options.autoPan&&(wt(this._panRequest),this._panRequest=vt(this._adjustPan.bind(this,n)))},_onDrag:function(n){var a=this._marker,l=a._shadow,d=qn(a._icon),g=a._map.layerPointToLatLng(d);l&&ne(l,d),a._latlng=g,n.latlng=g,n.oldLatLng=this._oldLatLng,a.fire("move",n).fire("drag",n)},_onDragEnd:function(n){wt(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",n)}}),ka=rn.extend({options:{icon:new Za,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(n,a){B(this,a),this._latlng=rt(n)},onAdd:function(n){this._zoomAnimated=this._zoomAnimated&&n.options.markerZoomAnimation,this._zoomAnimated&&n.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(n){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&n.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(n){var a=this._latlng;return this._latlng=rt(n),this.update(),this.fire("move",{oldLatLng:a,latlng:this._latlng})},setZIndexOffset:function(n){return this.options.zIndexOffset=n,this.update()},getIcon:function(){return this.options.icon},setIcon:function(n){return this.options.icon=n,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 n=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(n)}return this},_initIcon:function(){var n=this.options,a="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),l=n.icon.createIcon(this._icon),d=!1;l!==this._icon&&(this._icon&&this._removeIcon(),d=!0,n.title&&(l.title=n.title),l.tagName==="IMG"&&(l.alt=n.alt||"")),Et(l,a),n.keyboard&&(l.tabIndex="0",l.setAttribute("role","button")),this._icon=l,n.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&St(l,"focus",this._panOnFocus,this);var g=n.icon.createShadow(this._shadow),S=!1;g!==this._shadow&&(this._removeShadow(),S=!0),g&&(Et(g,a),g.alt=""),this._shadow=g,n.opacity<1&&this._updateOpacity(),d&&this.getPane().appendChild(this._icon),this._initInteraction(),g&&S&&this.getPane(n.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Jt(this._icon,"focus",this._panOnFocus,this),Wt(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&Wt(this._shadow),this._shadow=null},_setPos:function(n){this._icon&&ne(this._icon,n),this._shadow&&ne(this._shadow,n),this._zIndex=n.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(n){this._icon&&(this._icon.style.zIndex=this._zIndex+n)},_animateZoom:function(n){var a=this._map._latLngToNewLayerPoint(this._latlng,n.zoom,n.center).round();this._setPos(a)},_initInteraction:function(){if(this.options.interactive&&(Et(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Pa)){var n=this.options.draggable;this.dragging&&(n=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Pa(this),n&&this.dragging.enable()}},setOpacity:function(n){return this.options.opacity=n,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var n=this.options.opacity;this._icon&&ae(this._icon,n),this._shadow&&ae(this._shadow,n)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var n=this._map;if(n){var a=this.options.icon.options,l=a.iconSize?st(a.iconSize):st(0,0),d=a.iconAnchor?st(a.iconAnchor):st(0,0);n.panInside(this._latlng,{paddingTopLeft:d,paddingBottomRight:l.subtract(d)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function Wo(n,a){return new ka(n,a)}var xn=rn.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(n){this._renderer=n.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(n){return B(this,n),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&n&&Object.prototype.hasOwnProperty.call(n,"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)}}),Ki=xn.extend({options:{fill:!0,radius:10},initialize:function(n,a){B(this,a),this._latlng=rt(n),this._radius=this.options.radius},setLatLng:function(n){var a=this._latlng;return this._latlng=rt(n),this.redraw(),this.fire("move",{oldLatLng:a,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(n){return this.options.radius=this._radius=n,this.redraw()},getRadius:function(){return this._radius},setStyle:function(n){var a=n&&n.radius||this._radius;return xn.prototype.setStyle.call(this,n),this.setRadius(a),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var n=this._radius,a=this._radiusY||n,l=this._clickTolerance(),d=[n+l,a+l];this._pxBounds=new N(this._point.subtract(d),this._point.add(d))},_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(n){return n.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function $o(n,a){return new Ki(n,a)}var zs=Ki.extend({initialize:function(n,a,l){if(typeof a=="number"&&(a=m({},l,{radius:a})),B(this,a),this._latlng=rt(n),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(n){return this._mRadius=n,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var n=[this._radius,this._radiusY||this._radius];return new $(this._map.layerPointToLatLng(this._point.subtract(n)),this._map.layerPointToLatLng(this._point.add(n)))},setStyle:xn.prototype.setStyle,_project:function(){var n=this._latlng.lng,a=this._latlng.lat,l=this._map,d=l.options.crs;if(d.distance===Ot.distance){var g=Math.PI/180,S=this._mRadius/Ot.R/g,M=l.project([a+S,n]),P=l.project([a-S,n]),K=M.add(P).divideBy(2),nt=l.unproject(K).lat,ct=Math.acos((Math.cos(S*g)-Math.sin(a*g)*Math.sin(nt*g))/(Math.cos(a*g)*Math.cos(nt*g)))/g;(isNaN(ct)||ct===0)&&(ct=S/Math.cos(Math.PI/180*a)),this._point=K.subtract(l.getPixelOrigin()),this._radius=isNaN(ct)?0:K.x-l.project([nt,n-ct]).x,this._radiusY=K.y-M.y}else{var yt=d.unproject(d.project(this._latlng).subtract([this._mRadius,0]));this._point=l.latLngToLayerPoint(this._latlng),this._radius=this._point.x-l.latLngToLayerPoint(yt).x}this._updateBounds()}});function tr(n,a,l){return new zs(n,a,l)}var An=xn.extend({options:{smoothFactor:1,noClip:!1},initialize:function(n,a){B(this,a),this._setLatLngs(n)},getLatLngs:function(){return this._latlngs},setLatLngs:function(n){return this._setLatLngs(n),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(n){for(var a=1/0,l=null,d=Ua,g,S,M=0,P=this._parts.length;M<P;M++)for(var K=this._parts[M],nt=1,ct=K.length;nt<ct;nt++){g=K[nt-1],S=K[nt];var yt=d(n,g,S,!0);yt<a&&(a=yt,l=d(n,g,S))}return l&&(l.distance=Math.sqrt(a)),l},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return Gi(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(n,a){return a=a||this._defaultShape(),n=rt(n),a.push(n),this._bounds.extend(n),this.redraw()},_setLatLngs:function(n){this._bounds=new $,this._latlngs=this._convertLatLngs(n)},_defaultShape:function(){return Qe(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(n){for(var a=[],l=Qe(n),d=0,g=n.length;d<g;d++)l?(a[d]=rt(n[d]),this._bounds.extend(a[d])):a[d]=this._convertLatLngs(n[d]);return a},_project:function(){var n=new N;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,n),this._bounds.isValid()&&n.isValid()&&(this._rawPxBounds=n,this._updateBounds())},_updateBounds:function(){var n=this._clickTolerance(),a=new I(n,n);this._rawPxBounds&&(this._pxBounds=new N([this._rawPxBounds.min.subtract(a),this._rawPxBounds.max.add(a)]))},_projectLatlngs:function(n,a,l){var d=n[0]instanceof ot,g=n.length,S,M;if(d){for(M=[],S=0;S<g;S++)M[S]=this._map.latLngToLayerPoint(n[S]),l.extend(M[S]);a.push(M)}else for(S=0;S<g;S++)this._projectLatlngs(n[S],a,l)},_clipPoints:function(){var n=this._renderer._bounds;if(this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(n))){if(this.options.noClip){this._parts=this._rings;return}var a=this._parts,l,d,g,S,M,P,K;for(l=0,g=0,S=this._rings.length;l<S;l++)for(K=this._rings[l],d=0,M=K.length;d<M-1;d++)P=Qo(K[d],K[d+1],n,d,!0),P&&(a[g]=a[g]||[],a[g].push(P[0]),(P[1]!==K[d+1]||d===M-2)&&(a[g].push(P[1]),g++))}},_simplifyPoints:function(){for(var n=this._parts,a=this.options.smoothFactor,l=0,d=n.length;l<d;l++)n[l]=Go(n[l],a)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(n,a){var l,d,g,S,M,P,K=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(n))return!1;for(l=0,S=this._parts.length;l<S;l++)for(P=this._parts[l],d=0,M=P.length,g=M-1;d<M;g=d++)if(!(!a&&d===0)&&Vo(n,P[g],P[d])<=K)return!0;return!1}});function Zu(n,a){return new An(n,a)}An._flat=bs;var Qi=An.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 Yo(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(n){var a=An.prototype._convertLatLngs.call(this,n),l=a.length;return l>=2&&a[0]instanceof ot&&a[0].equals(a[l-1])&&a.pop(),a},_setLatLngs:function(n){An.prototype._setLatLngs.call(this,n),Qe(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Qe(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var n=this._renderer._bounds,a=this.options.weight,l=new I(a,a);if(n=new N(n.min.subtract(l),n.max.add(l)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(n))){if(this.options.noClip){this._parts=this._rings;return}for(var d=0,g=this._rings.length,S;d<g;d++)S=qo(this._rings[d],n,!0),S.length&&this._parts.push(S)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(n){var a=!1,l,d,g,S,M,P,K,nt;if(!this._pxBounds||!this._pxBounds.contains(n))return!1;for(S=0,K=this._parts.length;S<K;S++)for(l=this._parts[S],M=0,nt=l.length,P=nt-1;M<nt;P=M++)d=l[M],g=l[P],d.y>n.y!=g.y>n.y&&n.x<(g.x-d.x)*(n.y-d.y)/(g.y-d.y)+d.x&&(a=!a);return a||An.prototype._containsPoint.call(this,n,!0)}});function Pu(n,a){return new Qi(n,a)}var Rn=_n.extend({initialize:function(n,a){B(this,a),this._layers={},n&&this.addData(n)},addData:function(n){var a=k(n)?n:n.features,l,d,g;if(a){for(l=0,d=a.length;l<d;l++)g=a[l],(g.geometries||g.geometry||g.features||g.coordinates)&&this.addData(g);return this}var S=this.options;if(S.filter&&!S.filter(n))return this;var M=Ce(n,S);return M?(M.feature=Ls(n),M.defaultOptions=M.options,this.resetStyle(M),S.onEachFeature&&S.onEachFeature(n,M),this.addLayer(M)):this},resetStyle:function(n){return n===void 0?this.eachLayer(this.resetStyle,this):(n.options=m({},n.defaultOptions),this._setLayerStyle(n,this.options.style),this)},setStyle:function(n){return this.eachLayer(function(a){this._setLayerStyle(a,n)},this)},_setLayerStyle:function(n,a){n.setStyle&&(typeof a=="function"&&(a=a(n.feature)),n.setStyle(a))}});function Ce(n,a){var l=n.type==="Feature"?n.geometry:n,d=l?l.coordinates:null,g=[],S=a&&a.pointToLayer,M=a&&a.coordsToLatLng||Ts,P,K,nt,ct;if(!d&&!l)return null;switch(l.type){case"Point":return P=M(d),Ji(S,n,P,a);case"MultiPoint":for(nt=0,ct=d.length;nt<ct;nt++)P=M(d[nt]),g.push(Ji(S,n,P,a));return new _n(g);case"LineString":case"MultiLineString":return K=qa(d,l.type==="LineString"?0:1,M),new An(K,a);case"Polygon":case"MultiPolygon":return K=qa(d,l.type==="Polygon"?1:2,M),new Qi(K,a);case"GeometryCollection":for(nt=0,ct=l.geometries.length;nt<ct;nt++){var yt=Ce({geometry:l.geometries[nt],type:"Feature",properties:n.properties},a);yt&&g.push(yt)}return new _n(g);case"FeatureCollection":for(nt=0,ct=l.features.length;nt<ct;nt++){var Mt=Ce(l.features[nt],a);Mt&&g.push(Mt)}return new _n(g);default:throw new Error("Invalid GeoJSON object.")}}function Ji(n,a,l,d){return n?n(a,l):new ka(l,d&&d.markersInheritOptions&&d)}function Ts(n){return new ot(n[1],n[0],n[2])}function qa(n,a,l){for(var d=[],g=0,S=n.length,M;g<S;g++)M=a?qa(n[g],a-1,l):(l||Ts)(n[g]),d.push(M);return d}function Es(n,a){return n=rt(n),n.alt!==void 0?[O(n.lng,a),O(n.lat,a),O(n.alt,a)]:[O(n.lng,a),O(n.lat,a)]}function Ya(n,a,l,d){for(var g=[],S=0,M=n.length;S<M;S++)g.push(a?Ya(n[S],Qe(n[S])?0:a-1,l,d):Es(n[S],d));return!a&&l&&g.length>0&&g.push(g[0].slice()),g}function Vn(n,a){return n.feature?m({},n.feature,{geometry:a}):Ls(a)}function Ls(n){return n.type==="Feature"||n.type==="FeatureCollection"?n:{type:"Feature",properties:{},geometry:n}}var Xn={toGeoJSON:function(n){return Vn(this,{type:"Point",coordinates:Es(this.getLatLng(),n)})}};ka.include(Xn),zs.include(Xn),Ki.include(Xn),An.include({toGeoJSON:function(n){var a=!Qe(this._latlngs),l=Ya(this._latlngs,a?1:0,!1,n);return Vn(this,{type:(a?"Multi":"")+"LineString",coordinates:l})}}),Qi.include({toGeoJSON:function(n){var a=!Qe(this._latlngs),l=a&&!Qe(this._latlngs[0]),d=Ya(this._latlngs,l?2:a?1:0,!0,n);return a||(d=[d]),Vn(this,{type:(l?"Multi":"")+"Polygon",coordinates:d})}}),Xi.include({toMultiPoint:function(n){var a=[];return this.eachLayer(function(l){a.push(l.toGeoJSON(n).geometry.coordinates)}),Vn(this,{type:"MultiPoint",coordinates:a})},toGeoJSON:function(n){var a=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(a==="MultiPoint")return this.toMultiPoint(n);var l=a==="GeometryCollection",d=[];return this.eachLayer(function(g){if(g.toGeoJSON){var S=g.toGeoJSON(n);if(l)d.push(S.geometry);else{var M=Ls(S);M.type==="FeatureCollection"?d.push.apply(d,M.features):d.push(M)}}}),l?Vn(this,{geometries:d,type:"GeometryCollection"}):{type:"FeatureCollection",features:d}}});function Cs(n,a){return new Rn(n,a)}var Ga=Cs,Fi=rn.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(n,a,l){this._url=n,this._bounds=lt(a),B(this,l)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(Et(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){Wt(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(n){return this.options.opacity=n,this._image&&this._updateOpacity(),this},setStyle:function(n){return n.opacity&&this.setOpacity(n.opacity),this},bringToFront:function(){return this._map&&ze(this._image),this},bringToBack:function(){return this._map&&hi(this._image),this},setUrl:function(n){return this._url=n,this._image&&(this._image.src=n),this},setBounds:function(n){return this._bounds=lt(n),this._map&&this._reset(),this},getEvents:function(){var n={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(n.zoomanim=this._animateZoom),n},setZIndex:function(n){return this.options.zIndex=n,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var n=this._url.tagName==="IMG",a=this._image=n?this._url:jt("img");if(Et(a,"leaflet-image-layer"),this._zoomAnimated&&Et(a,"leaflet-zoom-animated"),this.options.className&&Et(a,this.options.className),a.onselectstart=E,a.onmousemove=E,a.onload=_(this.fire,this,"load"),a.onerror=_(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(a.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),n){this._url=a.src;return}a.src=this._url,a.alt=this.options.alt},_animateZoom:function(n){var a=this._map.getZoomScale(n.zoom),l=this._map._latLngBoundsToNewLayerBounds(this._bounds,n.zoom,n.center).min;Nn(this._image,l,a)},_reset:function(){var n=this._image,a=new N(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),l=a.getSize();ne(n,a.min),n.style.width=l.x+"px",n.style.height=l.y+"px"},_updateOpacity:function(){ae(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 n=this.options.errorOverlayUrl;n&&this._url!==n&&(this._url=n,this._image.src=n)},getCenter:function(){return this._bounds.getCenter()}}),er=function(n,a,l){return new Fi(n,a,l)},Kn=Fi.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var n=this._url.tagName==="VIDEO",a=this._image=n?this._url:jt("video");if(Et(a,"leaflet-image-layer"),this._zoomAnimated&&Et(a,"leaflet-zoom-animated"),this.options.className&&Et(a,this.options.className),a.onselectstart=E,a.onmousemove=E,a.onloadeddata=_(this.fire,this,"load"),n){for(var l=a.getElementsByTagName("source"),d=[],g=0;g<l.length;g++)d.push(l[g].src);this._url=l.length>0?d:[a.src];return}k(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(a.style,"objectFit")&&(a.style.objectFit="fill"),a.autoplay=!!this.options.autoplay,a.loop=!!this.options.loop,a.muted=!!this.options.muted,a.playsInline=!!this.options.playsInline;for(var S=0;S<this._url.length;S++){var M=jt("source");M.src=this._url[S],a.appendChild(M)}}});function Ii(n,a,l){return new Kn(n,a,l)}var Ns=Fi.extend({_initImage:function(){var n=this._image=this._url;Et(n,"leaflet-image-layer"),this._zoomAnimated&&Et(n,"leaflet-zoom-animated"),this.options.className&&Et(n,this.options.className),n.onselectstart=E,n.onmousemove=E}});function nr(n,a,l){return new Ns(n,a,l)}var Ne=rn.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(n,a){n&&(n instanceof ot||k(n))?(this._latlng=rt(n),B(this,a)):(B(this,n),this._source=a),this.options.content&&(this._content=this.options.content)},openOn:function(n){return n=arguments.length?n:this._source._map,n.hasLayer(this)||n.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(n){return this._map?this.close():(arguments.length?this._source=n:n=this._source,this._prepareOpen(),this.openOn(n._map)),this},onAdd:function(n){this._zoomAnimated=n._zoomAnimated,this._container||this._initLayout(),n._fadeAnimated&&ae(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),n._fadeAnimated&&ae(this._container,1),this.bringToFront(),this.options.interactive&&(Et(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(n){n._fadeAnimated?(ae(this._container,0),this._removeTimeout=setTimeout(_(Wt,void 0,this._container),200)):Wt(this._container),this.options.interactive&&(le(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(n){return this._latlng=rt(n),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(n){return this._content=n,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 n={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(n.zoomanim=this._animateZoom),n},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&ze(this._container),this},bringToBack:function(){return this._map&&hi(this._container),this},_prepareOpen:function(n){var a=this._source;if(!a._map)return!1;if(a instanceof _n){a=null;var l=this._source._layers;for(var d in l)if(l[d]._map){a=l[d];break}if(!a)return!1;this._source=a}if(!n)if(a.getCenter)n=a.getCenter();else if(a.getLatLng)n=a.getLatLng();else if(a.getBounds)n=a.getBounds().getCenter();else throw new Error("Unable to get source layer LatLng.");return this.setLatLng(n),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var n=this._contentNode,a=typeof this._content=="function"?this._content(this._source||this):this._content;if(typeof a=="string")n.innerHTML=a;else{for(;n.hasChildNodes();)n.removeChild(n.firstChild);n.appendChild(a)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var n=this._map.latLngToLayerPoint(this._latlng),a=st(this.options.offset),l=this._getAnchor();this._zoomAnimated?ne(this._container,n.add(l)):a=a.add(n).add(l);var d=this._containerBottom=-a.y,g=this._containerLeft=-Math.round(this._containerWidth/2)+a.x;this._container.style.bottom=d+"px",this._container.style.left=g+"px"}},_getAnchor:function(){return[0,0]}});Pt.include({_initOverlay:function(n,a,l,d){var g=a;return g instanceof n||(g=new n(d).setContent(a)),l&&g.setLatLng(l),g}}),rn.include({_initOverlay:function(n,a,l,d){var g=l;return g instanceof n?(B(g,d),g._source=this):(g=a&&!d?a:new n(d,this),g.setContent(l)),g}});var Va=Ne.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(n){return n=arguments.length?n:this._source._map,!n.hasLayer(this)&&n._popup&&n._popup.options.autoClose&&n.removeLayer(n._popup),n._popup=this,Ne.prototype.openOn.call(this,n)},onAdd:function(n){Ne.prototype.onAdd.call(this,n),n.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof xn||this._source.on("preclick",on))},onRemove:function(n){Ne.prototype.onRemove.call(this,n),n.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof xn||this._source.off("preclick",on))},getEvents:function(){var n=Ne.prototype.getEvents.call(this);return(this.options.closeOnClick!==void 0?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(n.preclick=this.close),this.options.keepInView&&(n.moveend=this._adjustPan),n},_initLayout:function(){var n="leaflet-popup",a=this._container=jt("div",n+" "+(this.options.className||"")+" leaflet-zoom-animated"),l=this._wrapper=jt("div",n+"-content-wrapper",a);if(this._contentNode=jt("div",n+"-content",l),mi(a),gn(this._contentNode),St(a,"contextmenu",on),this._tipContainer=jt("div",n+"-tip-container",a),this._tip=jt("div",n+"-tip",this._tipContainer),this.options.closeButton){var d=this._closeButton=jt("a",n+"-close-button",a);d.setAttribute("role","button"),d.setAttribute("aria-label","Close popup"),d.href="#close",d.innerHTML='<span aria-hidden="true">&#215;</span>',St(d,"click",function(g){fe(g),this.close()},this)}},_updateLayout:function(){var n=this._contentNode,a=n.style;a.width="",a.whiteSpace="nowrap";var l=n.offsetWidth;l=Math.min(l,this.options.maxWidth),l=Math.max(l,this.options.minWidth),a.width=l+1+"px",a.whiteSpace="",a.height="";var d=n.offsetHeight,g=this.options.maxHeight,S="leaflet-popup-scrolled";g&&d>g?(a.height=g+"px",Et(n,S)):le(n,S),this._containerWidth=this._container.offsetWidth},_animateZoom:function(n){var a=this._map._latLngToNewLayerPoint(this._latlng,n.zoom,n.center),l=this._getAnchor();ne(this._container,a.add(l))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var n=this._map,a=parseInt(Na(this._container,"marginBottom"),10)||0,l=this._container.offsetHeight+a,d=this._containerWidth,g=new I(this._containerLeft,-l-this._containerBottom);g._add(qn(this._container));var S=n.layerPointToContainerPoint(g),M=st(this.options.autoPanPadding),P=st(this.options.autoPanPaddingTopLeft||M),K=st(this.options.autoPanPaddingBottomRight||M),nt=n.getSize(),ct=0,yt=0;S.x+d+K.x>nt.x&&(ct=S.x+d-nt.x+K.x),S.x-ct-P.x<0&&(ct=S.x-P.x),S.y+l+K.y>nt.y&&(yt=S.y+l-nt.y+K.y),S.y-yt-P.y<0&&(yt=S.y-P.y),(ct||yt)&&(this.options.keepInView&&(this._autopanning=!0),n.fire("autopanstart").panBy([ct,yt]))}},_getAnchor:function(){return st(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),ir=function(n,a){return new Va(n,a)};Pt.mergeOptions({closePopupOnClick:!0}),Pt.include({openPopup:function(n,a,l){return this._initOverlay(Va,n,a,l).openOn(this),this},closePopup:function(n){return n=arguments.length?n:this._popup,n&&n.close(),this}}),rn.include({bindPopup:function(n,a){return this._popup=this._initOverlay(Va,this._popup,n,a),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(n){return this._popup&&(this instanceof _n||(this._popup._source=this),this._popup._prepareOpen(n||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(n){return this._popup&&this._popup.setContent(n),this},getPopup:function(){return this._popup},_openPopup:function(n){if(!(!this._popup||!this._map)){Yn(n);var a=n.layer||n.target;if(this._popup._source===a&&!(a instanceof xn)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(n.latlng);return}this._popup._source=a,this.openPopup(n.latlng)}},_movePopup:function(n){this._popup.setLatLng(n.latlng)},_onKeyPress:function(n){n.originalEvent.keyCode===13&&this._openPopup(n)}});var Xa=Ne.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(n){Ne.prototype.onAdd.call(this,n),this.setOpacity(this.options.opacity),n.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(n){Ne.prototype.onRemove.call(this,n),n.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var n=Ne.prototype.getEvents.call(this);return this.options.permanent||(n.preclick=this.close),n},_initLayout:function(){var n="leaflet-tooltip",a=n+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=jt("div",a),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+y(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(n){var a,l,d=this._map,g=this._container,S=d.latLngToContainerPoint(d.getCenter()),M=d.layerPointToContainerPoint(n),P=this.options.direction,K=g.offsetWidth,nt=g.offsetHeight,ct=st(this.options.offset),yt=this._getAnchor();P==="top"?(a=K/2,l=nt):P==="bottom"?(a=K/2,l=0):P==="center"?(a=K/2,l=nt/2):P==="right"?(a=0,l=nt/2):P==="left"?(a=K,l=nt/2):M.x<S.x?(P="right",a=0,l=nt/2):(P="left",a=K+(ct.x+yt.x)*2,l=nt/2),n=n.subtract(st(a,l,!0)).add(ct).add(yt),le(g,"leaflet-tooltip-right"),le(g,"leaflet-tooltip-left"),le(g,"leaflet-tooltip-top"),le(g,"leaflet-tooltip-bottom"),Et(g,"leaflet-tooltip-"+P),ne(g,n)},_updatePosition:function(){var n=this._map.latLngToLayerPoint(this._latlng);this._setPosition(n)},setOpacity:function(n){this.options.opacity=n,this._container&&ae(this._container,n)},_animateZoom:function(n){var a=this._map._latLngToNewLayerPoint(this._latlng,n.zoom,n.center);this._setPosition(a)},_getAnchor:function(){return st(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),ku=function(n,a){return new Xa(n,a)};Pt.include({openTooltip:function(n,a,l){return this._initOverlay(Xa,n,a,l).openOn(this),this},closeTooltip:function(n){return n.close(),this}}),rn.include({bindTooltip:function(n,a){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Xa,this._tooltip,n,a),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(n){if(!(!n&&this._tooltipHandlersAdded)){var a=n?"off":"on",l={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?l.add=this._openTooltip:(l.mouseover=this._openTooltip,l.mouseout=this.closeTooltip,l.click=this._openTooltip,this._map?this._addFocusListeners():l.add=this._addFocusListeners),this._tooltip.options.sticky&&(l.mousemove=this._moveTooltip),this[a](l),this._tooltipHandlersAdded=!n}},openTooltip:function(n){return this._tooltip&&(this instanceof _n||(this._tooltip._source=this),this._tooltip._prepareOpen(n)&&(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(n){return this._tooltip&&this._tooltip.setContent(n),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(n){var a=typeof n.getElement=="function"&&n.getElement();a&&(St(a,"focus",function(){this._tooltip._source=n,this.openTooltip()},this),St(a,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(n){var a=typeof n.getElement=="function"&&n.getElement();a&&a.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(n){if(!(!this._tooltip||!this._map)){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var a=this;this._map.once("moveend",function(){a._openOnceFlag=!1,a._openTooltip(n)});return}this._tooltip._source=n.layer||n.target,this.openTooltip(this._tooltip.options.sticky?n.latlng:void 0)}},_moveTooltip:function(n){var a=n.latlng,l,d;this._tooltip.options.sticky&&n.originalEvent&&(l=this._map.mouseEventToContainerPoint(n.originalEvent),d=this._map.containerPointToLayerPoint(l),a=this._map.layerPointToLatLng(d)),this._tooltip.setLatLng(a)}});var ar=yn.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(n){var a=n&&n.tagName==="DIV"?n:document.createElement("div"),l=this.options;if(l.html instanceof Element?(Xe(a),a.appendChild(l.html)):a.innerHTML=l.html!==!1?l.html:"",l.bgPos){var d=st(l.bgPos);a.style.backgroundPosition=-d.x+"px "+-d.y+"px"}return this._setIconStyles(a,"icon"),a},createShadow:function(){return null}});function qu(n){return new ar(n)}yn.Default=Za;var Wi=rn.extend({options:{tileSize:256,opacity:1,updateWhenIdle:_t.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(n){B(this,n)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(n){n._addZoomLimit(this)},onRemove:function(n){this._removeAllTiles(),Wt(this._container),n._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(ze(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(hi(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(n){return this.options.opacity=n,this._updateOpacity(),this},setZIndex:function(n){return this.options.zIndex=n,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var n=this._clampZoom(this._map.getZoom());n!==this._tileZoom&&(this._tileZoom=n,this._updateLevels()),this._update()}return this},getEvents:function(){var n={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=x(this._onMoveEnd,this.options.updateInterval,this)),n.move=this._onMove),this._zoomAnimated&&(n.zoomanim=this._animateZoom),n},createTile:function(){return document.createElement("div")},getTileSize:function(){var n=this.options.tileSize;return n instanceof I?n:new I(n,n)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(n){for(var a=this.getPane().children,l=-n(-1/0,1/0),d=0,g=a.length,S;d<g;d++)S=a[d].style.zIndex,a[d]!==this._container&&S&&(l=n(l,+S));isFinite(l)&&(this.options.zIndex=l+n(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!_t.ielt9){ae(this._container,this.options.opacity);var n=+new Date,a=!1,l=!1;for(var d in this._tiles){var g=this._tiles[d];if(!(!g.current||!g.loaded)){var S=Math.min(1,(n-g.loaded)/200);ae(g.el,S),S<1?a=!0:(g.active?l=!0:this._onOpaqueTile(g),g.active=!0)}}l&&!this._noPrune&&this._pruneTiles(),a&&(wt(this._fadeFrame),this._fadeFrame=vt(this._updateOpacity,this))}},_onOpaqueTile:E,_initContainer:function(){this._container||(this._container=jt("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var n=this._tileZoom,a=this.options.maxZoom;if(n!==void 0){for(var l in this._levels)l=Number(l),this._levels[l].el.children.length||l===n?(this._levels[l].el.style.zIndex=a-Math.abs(n-l),this._onUpdateLevel(l)):(Wt(this._levels[l].el),this._removeTilesAtZoom(l),this._onRemoveLevel(l),delete this._levels[l]);var d=this._levels[n],g=this._map;return d||(d=this._levels[n]={},d.el=jt("div","leaflet-tile-container leaflet-zoom-animated",this._container),d.el.style.zIndex=a,d.origin=g.project(g.unproject(g.getPixelOrigin()),n).round(),d.zoom=n,this._setZoomTransform(d,g.getCenter(),g.getZoom()),E(d.el.offsetWidth),this._onCreateLevel(d)),this._level=d,d}},_onUpdateLevel:E,_onRemoveLevel:E,_onCreateLevel:E,_pruneTiles:function(){if(this._map){var n,a,l=this._map.getZoom();if(l>this.options.maxZoom||l<this.options.minZoom){this._removeAllTiles();return}for(n in this._tiles)a=this._tiles[n],a.retain=a.current;for(n in this._tiles)if(a=this._tiles[n],a.current&&!a.active){var d=a.coords;this._retainParent(d.x,d.y,d.z,d.z-5)||this._retainChildren(d.x,d.y,d.z,d.z+2)}for(n in this._tiles)this._tiles[n].retain||this._removeTile(n)}},_removeTilesAtZoom:function(n){for(var a in this._tiles)this._tiles[a].coords.z===n&&this._removeTile(a)},_removeAllTiles:function(){for(var n in this._tiles)this._removeTile(n)},_invalidateAll:function(){for(var n in this._levels)Wt(this._levels[n].el),this._onRemoveLevel(Number(n)),delete this._levels[n];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(n,a,l,d){var g=Math.floor(n/2),S=Math.floor(a/2),M=l-1,P=new I(+g,+S);P.z=+M;var K=this._tileCoordsToKey(P),nt=this._tiles[K];return nt&&nt.active?(nt.retain=!0,!0):(nt&&nt.loaded&&(nt.retain=!0),M>d?this._retainParent(g,S,M,d):!1)},_retainChildren:function(n,a,l,d){for(var g=2*n;g<2*n+2;g++)for(var S=2*a;S<2*a+2;S++){var M=new I(g,S);M.z=l+1;var P=this._tileCoordsToKey(M),K=this._tiles[P];if(K&&K.active){K.retain=!0;continue}else K&&K.loaded&&(K.retain=!0);l+1<d&&this._retainChildren(g,S,l+1,d)}},_resetView:function(n){var a=n&&(n.pinch||n.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),a,a)},_animateZoom:function(n){this._setView(n.center,n.zoom,!0,n.noUpdate)},_clampZoom:function(n){var a=this.options;return a.minNativeZoom!==void 0&&n<a.minNativeZoom?a.minNativeZoom:a.maxNativeZoom!==void 0&&a.maxNativeZoom<n?a.maxNativeZoom:n},_setView:function(n,a,l,d){var g=Math.round(a);this.options.maxZoom!==void 0&&g>this.options.maxZoom||this.options.minZoom!==void 0&&g<this.options.minZoom?g=void 0:g=this._clampZoom(g);var S=this.options.updateWhenZooming&&g!==this._tileZoom;(!d||S)&&(this._tileZoom=g,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),g!==void 0&&this._update(n),l||this._pruneTiles(),this._noPrune=!!l),this._setZoomTransforms(n,a)},_setZoomTransforms:function(n,a){for(var l in this._levels)this._setZoomTransform(this._levels[l],n,a)},_setZoomTransform:function(n,a,l){var d=this._map.getZoomScale(l,n.zoom),g=n.origin.multiplyBy(d).subtract(this._map._getNewPixelOrigin(a,l)).round();_t.any3d?Nn(n.el,g,d):ne(n.el,g)},_resetGrid:function(){var n=this._map,a=n.options.crs,l=this._tileSize=this.getTileSize(),d=this._tileZoom,g=this._map.getPixelWorldBounds(this._tileZoom);g&&(this._globalTileRange=this._pxBoundsToTileRange(g)),this._wrapX=a.wrapLng&&!this.options.noWrap&&[Math.floor(n.project([0,a.wrapLng[0]],d).x/l.x),Math.ceil(n.project([0,a.wrapLng[1]],d).x/l.y)],this._wrapY=a.wrapLat&&!this.options.noWrap&&[Math.floor(n.project([a.wrapLat[0],0],d).y/l.x),Math.ceil(n.project([a.wrapLat[1],0],d).y/l.y)]},_onMoveEnd:function(){!this._map||this._map._animatingZoom||this._update()},_getTiledPixelBounds:function(n){var a=this._map,l=a._animatingZoom?Math.max(a._animateToZoom,a.getZoom()):a.getZoom(),d=a.getZoomScale(l,this._tileZoom),g=a.project(n,this._tileZoom).floor(),S=a.getSize().divideBy(d*2);return new N(g.subtract(S),g.add(S))},_update:function(n){var a=this._map;if(a){var l=this._clampZoom(a.getZoom());if(n===void 0&&(n=a.getCenter()),this._tileZoom!==void 0){var d=this._getTiledPixelBounds(n),g=this._pxBoundsToTileRange(d),S=g.getCenter(),M=[],P=this.options.keepBuffer,K=new N(g.getBottomLeft().subtract([P,-P]),g.getTopRight().add([P,-P]));if(!(isFinite(g.min.x)&&isFinite(g.min.y)&&isFinite(g.max.x)&&isFinite(g.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var nt in this._tiles){var ct=this._tiles[nt].coords;(ct.z!==this._tileZoom||!K.contains(new I(ct.x,ct.y)))&&(this._tiles[nt].current=!1)}if(Math.abs(l-this._tileZoom)>1){this._setView(n,l);return}for(var yt=g.min.y;yt<=g.max.y;yt++)for(var Mt=g.min.x;Mt<=g.max.x;Mt++){var Te=new I(Mt,yt);if(Te.z=this._tileZoom,!!this._isValidTile(Te)){var he=this._tiles[this._tileCoordsToKey(Te)];he?he.current=!0:M.push(Te)}}if(M.sort(function(Gt,Vt){return Gt.distanceTo(S)-Vt.distanceTo(S)}),M.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Ye=document.createDocumentFragment();for(Mt=0;Mt<M.length;Mt++)this._addTile(M[Mt],Ye);this._level.el.appendChild(Ye)}}}},_isValidTile:function(n){var a=this._map.options.crs;if(!a.infinite){var l=this._globalTileRange;if(!a.wrapLng&&(n.x<l.min.x||n.x>l.max.x)||!a.wrapLat&&(n.y<l.min.y||n.y>l.max.y))return!1}if(!this.options.bounds)return!0;var d=this._tileCoordsToBounds(n);return lt(this.options.bounds).overlaps(d)},_keyToBounds:function(n){return this._tileCoordsToBounds(this._keyToTileCoords(n))},_tileCoordsToNwSe:function(n){var a=this._map,l=this.getTileSize(),d=n.scaleBy(l),g=d.add(l),S=a.unproject(d,n.z),M=a.unproject(g,n.z);return[S,M]},_tileCoordsToBounds:function(n){var a=this._tileCoordsToNwSe(n),l=new $(a[0],a[1]);return this.options.noWrap||(l=this._map.wrapLatLngBounds(l)),l},_tileCoordsToKey:function(n){return n.x+":"+n.y+":"+n.z},_keyToTileCoords:function(n){var a=n.split(":"),l=new I(+a[0],+a[1]);return l.z=+a[2],l},_removeTile:function(n){var a=this._tiles[n];a&&(Wt(a.el),delete this._tiles[n],this.fire("tileunload",{tile:a.el,coords:this._keyToTileCoords(n)}))},_initTile:function(n){Et(n,"leaflet-tile");var a=this.getTileSize();n.style.width=a.x+"px",n.style.height=a.y+"px",n.onselectstart=E,n.onmousemove=E,_t.ielt9&&this.options.opacity<1&&ae(n,this.options.opacity)},_addTile:function(n,a){var l=this._getTilePos(n),d=this._tileCoordsToKey(n),g=this.createTile(this._wrapCoords(n),_(this._tileReady,this,n));this._initTile(g),this.createTile.length<2&&vt(_(this._tileReady,this,n,null,g)),ne(g,l),this._tiles[d]={el:g,coords:n,current:!0},a.appendChild(g),this.fire("tileloadstart",{tile:g,coords:n})},_tileReady:function(n,a,l){a&&this.fire("tileerror",{error:a,tile:l,coords:n});var d=this._tileCoordsToKey(n);l=this._tiles[d],l&&(l.loaded=+new Date,this._map._fadeAnimated?(ae(l.el,0),wt(this._fadeFrame),this._fadeFrame=vt(this._updateOpacity,this)):(l.active=!0,this._pruneTiles()),a||(Et(l.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:l.el,coords:n})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),_t.ielt9||!this._map._fadeAnimated?vt(this._pruneTiles,this):setTimeout(_(this._pruneTiles,this),250)))},_getTilePos:function(n){return n.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(n){var a=new I(this._wrapX?T(n.x,this._wrapX):n.x,this._wrapY?T(n.y,this._wrapY):n.y);return a.z=n.z,a},_pxBoundsToTileRange:function(n){var a=this.getTileSize();return new N(n.min.unscaleBy(a).floor(),n.max.unscaleBy(a).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var n in this._tiles)if(!this._tiles[n].loaded)return!1;return!0}});function sr(n){return new Wi(n)}var Qn=Wi.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(n,a){this._url=n,a=B(this,a),a.detectRetina&&_t.retina&&a.maxZoom>0?(a.tileSize=Math.floor(a.tileSize/2),a.zoomReverse?(a.zoomOffset--,a.minZoom=Math.min(a.maxZoom,a.minZoom+1)):(a.zoomOffset++,a.maxZoom=Math.max(a.minZoom,a.maxZoom-1)),a.minZoom=Math.max(0,a.minZoom)):a.zoomReverse?a.minZoom=Math.min(a.maxZoom,a.minZoom):a.maxZoom=Math.max(a.minZoom,a.maxZoom),typeof a.subdomains=="string"&&(a.subdomains=a.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(n,a){return this._url===n&&a===void 0&&(a=!0),this._url=n,a||this.redraw(),this},createTile:function(n,a){var l=document.createElement("img");return St(l,"load",_(this._tileOnLoad,this,a,l)),St(l,"error",_(this._tileOnError,this,a,l)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(l.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(l.referrerPolicy=this.options.referrerPolicy),l.alt="",l.src=this.getTileUrl(n),l},getTileUrl:function(n){var a={r:_t.retina?"@2x":"",s:this._getSubdomain(n),x:n.x,y:n.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var l=this._globalTileRange.max.y-n.y;this.options.tms&&(a.y=l),a["-y"]=l}return U(this._url,m(a,this.options))},_tileOnLoad:function(n,a){_t.ielt9?setTimeout(_(n,this,null,a),0):n(null,a)},_tileOnError:function(n,a,l){var d=this.options.errorTileUrl;d&&a.getAttribute("src")!==d&&(a.src=d),n(l,a)},_onTileRemove:function(n){n.tile.onload=null},_getZoomForUrl:function(){var n=this._tileZoom,a=this.options.maxZoom,l=this.options.zoomReverse,d=this.options.zoomOffset;return l&&(n=a-n),n+d},_getSubdomain:function(n){var a=Math.abs(n.x+n.y)%this.options.subdomains.length;return this.options.subdomains[a]},_abortLoading:function(){var n,a;for(n in this._tiles)if(this._tiles[n].coords.z!==this._tileZoom&&(a=this._tiles[n].el,a.onload=E,a.onerror=E,!a.complete)){a.src=mt;var l=this._tiles[n].coords;Wt(a),delete this._tiles[n],this.fire("tileabort",{tile:a,coords:l})}},_removeTile:function(n){var a=this._tiles[n];if(a)return a.el.setAttribute("src",mt),Wi.prototype._removeTile.call(this,n)},_tileReady:function(n,a,l){if(!(!this._map||l&&l.getAttribute("src")===mt))return Wi.prototype._tileReady.call(this,n,a,l)}});function Je(n,a){return new Qn(n,a)}var Ka=Qn.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(n,a){this._url=n;var l=m({},this.defaultWmsParams);for(var d in a)d in this.options||(l[d]=a[d]);a=B(this,a);var g=a.detectRetina&&_t.retina?2:1,S=this.getTileSize();l.width=S.x*g,l.height=S.y*g,this.wmsParams=l},onAdd:function(n){this._crs=this.options.crs||n.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var a=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[a]=this._crs.code,Qn.prototype.onAdd.call(this,n)},getTileUrl:function(n){var a=this._tileCoordsToNwSe(n),l=this._crs,d=X(l.project(a[0]),l.project(a[1])),g=d.min,S=d.max,M=(this._wmsVersion>=1.3&&this._crs===Al?[g.y,g.x,S.y,S.x]:[g.x,g.y,S.x,S.y]).join(","),P=Qn.prototype.getTileUrl.call(this,n);return P+V(this.wmsParams,P,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+M},setParams:function(n,a){return m(this.wmsParams,n),a||this.redraw(),this}});function Fe(n,a){return new Ka(n,a)}Qn.WMS=Ka,Je.wms=Fe;var Be=rn.extend({options:{padding:.1},initialize:function(n){B(this,n),y(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),Et(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 n={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(n.zoomanim=this._onAnimZoom),n},_onAnimZoom:function(n){this._updateTransform(n.center,n.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(n,a){var l=this._map.getZoomScale(a,this._zoom),d=this._map.getSize().multiplyBy(.5+this.options.padding),g=this._map.project(this._center,a),S=d.multiplyBy(-l).add(g).subtract(this._map._getNewPixelOrigin(n,a));_t.any3d?Nn(this._container,S,l):ne(this._container,S)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var n in this._layers)this._layers[n]._reset()},_onZoomEnd:function(){for(var n in this._layers)this._layers[n]._project()},_updatePaths:function(){for(var n in this._layers)this._layers[n]._update()},_update:function(){var n=this.options.padding,a=this._map.getSize(),l=this._map.containerPointToLayerPoint(a.multiplyBy(-n)).round();this._bounds=new N(l,l.add(a.multiplyBy(1+n*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Os=Be.extend({options:{tolerance:0},getEvents:function(){var n=Be.prototype.getEvents.call(this);return n.viewprereset=this._onViewPreReset,n},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Be.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var n=this._container=document.createElement("canvas");St(n,"mousemove",this._onMouseMove,this),St(n,"click dblclick mousedown mouseup contextmenu",this._onClick,this),St(n,"mouseout",this._handleMouseOut,this),n._leaflet_disable_events=!0,this._ctx=n.getContext("2d")},_destroyContainer:function(){wt(this._redrawRequest),delete this._ctx,Wt(this._container),Jt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var n;this._redrawBounds=null;for(var a in this._layers)n=this._layers[a],n._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Be.prototype._update.call(this);var n=this._bounds,a=this._container,l=n.getSize(),d=_t.retina?2:1;ne(a,n.min),a.width=d*l.x,a.height=d*l.y,a.style.width=l.x+"px",a.style.height=l.y+"px",_t.retina&&this._ctx.scale(2,2),this._ctx.translate(-n.min.x,-n.min.y),this.fire("update")}},_reset:function(){Be.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(n){this._updateDashArray(n),this._layers[y(n)]=n;var a=n._order={layer:n,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=a),this._drawLast=a,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(n){this._requestRedraw(n)},_removePath:function(n){var a=n._order,l=a.next,d=a.prev;l?l.prev=d:this._drawLast=d,d?d.next=l:this._drawFirst=l,delete n._order,delete this._layers[y(n)],this._requestRedraw(n)},_updatePath:function(n){this._extendRedrawBounds(n),n._project(),n._update(),this._requestRedraw(n)},_updateStyle:function(n){this._updateDashArray(n),this._requestRedraw(n)},_updateDashArray:function(n){if(typeof n.options.dashArray=="string"){var a=n.options.dashArray.split(/[, ]+/),l=[],d,g;for(g=0;g<a.length;g++){if(d=Number(a[g]),isNaN(d))return;l.push(d)}n.options._dashArray=l}else n.options._dashArray=n.options.dashArray},_requestRedraw:function(n){this._map&&(this._extendRedrawBounds(n),this._redrawRequest=this._redrawRequest||vt(this._redraw,this))},_extendRedrawBounds:function(n){if(n._pxBounds){var a=(n.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new N,this._redrawBounds.extend(n._pxBounds.min.subtract([a,a])),this._redrawBounds.extend(n._pxBounds.max.add([a,a]))}},_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 n=this._redrawBounds;if(n){var a=n.getSize();this._ctx.clearRect(n.min.x,n.min.y,a.x,a.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 n,a=this._redrawBounds;if(this._ctx.save(),a){var l=a.getSize();this._ctx.beginPath(),this._ctx.rect(a.min.x,a.min.y,l.x,l.y),this._ctx.clip()}this._drawing=!0;for(var d=this._drawFirst;d;d=d.next)n=d.layer,(!a||n._pxBounds&&n._pxBounds.intersects(a))&&n._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(n,a){if(this._drawing){var l,d,g,S,M=n._parts,P=M.length,K=this._ctx;if(P){for(K.beginPath(),l=0;l<P;l++){for(d=0,g=M[l].length;d<g;d++)S=M[l][d],K[d?"lineTo":"moveTo"](S.x,S.y);a&&K.closePath()}this._fillStroke(K,n)}}},_updateCircle:function(n){if(!(!this._drawing||n._empty())){var a=n._point,l=this._ctx,d=Math.max(Math.round(n._radius),1),g=(Math.max(Math.round(n._radiusY),1)||d)/d;g!==1&&(l.save(),l.scale(1,g)),l.beginPath(),l.arc(a.x,a.y/g,d,0,Math.PI*2,!1),g!==1&&l.restore(),this._fillStroke(l,n)}},_fillStroke:function(n,a){var l=a.options;l.fill&&(n.globalAlpha=l.fillOpacity,n.fillStyle=l.fillColor||l.color,n.fill(l.fillRule||"evenodd")),l.stroke&&l.weight!==0&&(n.setLineDash&&n.setLineDash(a.options&&a.options._dashArray||[]),n.globalAlpha=l.opacity,n.lineWidth=l.weight,n.strokeStyle=l.color,n.lineCap=l.lineCap,n.lineJoin=l.lineJoin,n.stroke())},_onClick:function(n){for(var a=this._map.mouseEventToLayerPoint(n),l,d,g=this._drawFirst;g;g=g.next)l=g.layer,l.options.interactive&&l._containsPoint(a)&&(!(n.type==="click"||n.type==="preclick")||!this._map._draggableMoved(l))&&(d=l);this._fireEvent(d?[d]:!1,n)},_onMouseMove:function(n){if(!(!this._map||this._map.dragging.moving()||this._map._animatingZoom)){var a=this._map.mouseEventToLayerPoint(n);this._handleMouseHover(n,a)}},_handleMouseOut:function(n){var a=this._hoveredLayer;a&&(le(this._container,"leaflet-interactive"),this._fireEvent([a],n,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(n,a){if(!this._mouseHoverThrottled){for(var l,d,g=this._drawFirst;g;g=g.next)l=g.layer,l.options.interactive&&l._containsPoint(a)&&(d=l);d!==this._hoveredLayer&&(this._handleMouseOut(n),d&&(Et(this._container,"leaflet-interactive"),this._fireEvent([d],n,"mouseover"),this._hoveredLayer=d)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,n),this._mouseHoverThrottled=!0,setTimeout(_(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(n,a,l){this._map._fireDOMEvent(a,l||a.type,n)},_bringToFront:function(n){var a=n._order;if(a){var l=a.next,d=a.prev;if(l)l.prev=d;else return;d?d.next=l:l&&(this._drawFirst=l),a.prev=this._drawLast,this._drawLast.next=a,a.next=null,this._drawLast=a,this._requestRedraw(n)}},_bringToBack:function(n){var a=n._order;if(a){var l=a.next,d=a.prev;if(d)d.next=l;else return;l?l.prev=d:d&&(this._drawLast=d),a.prev=null,a.next=this._drawFirst,this._drawFirst.prev=a,this._drawFirst=a,this._requestRedraw(n)}}});function Qa(n){return _t.canvas?new Os(n):null}var Jn=(function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(n){return document.createElement("<lvml:"+n+' class="lvml">')}}catch{}return function(n){return document.createElement("<"+n+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}})(),Rl={_initContainer:function(){this._container=jt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Be.prototype._update.call(this),this.fire("update"))},_initPath:function(n){var a=n._container=Jn("shape");Et(a,"leaflet-vml-shape "+(this.options.className||"")),a.coordsize="1 1",n._path=Jn("path"),a.appendChild(n._path),this._updateStyle(n),this._layers[y(n)]=n},_addPath:function(n){var a=n._container;this._container.appendChild(a),n.options.interactive&&n.addInteractiveTarget(a)},_removePath:function(n){var a=n._container;Wt(a),n.removeInteractiveTarget(a),delete this._layers[y(n)]},_updateStyle:function(n){var a=n._stroke,l=n._fill,d=n.options,g=n._container;g.stroked=!!d.stroke,g.filled=!!d.fill,d.stroke?(a||(a=n._stroke=Jn("stroke")),g.appendChild(a),a.weight=d.weight+"px",a.color=d.color,a.opacity=d.opacity,d.dashArray?a.dashStyle=k(d.dashArray)?d.dashArray.join(" "):d.dashArray.replace(/( *, *)/g," "):a.dashStyle="",a.endcap=d.lineCap.replace("butt","flat"),a.joinstyle=d.lineJoin):a&&(g.removeChild(a),n._stroke=null),d.fill?(l||(l=n._fill=Jn("fill")),g.appendChild(l),l.color=d.fillColor||d.color,l.opacity=d.fillOpacity):l&&(g.removeChild(l),n._fill=null)},_updateCircle:function(n){var a=n._point.round(),l=Math.round(n._radius),d=Math.round(n._radiusY||l);this._setPath(n,n._empty()?"M0 0":"AL "+a.x+","+a.y+" "+l+","+d+" 0,"+65535*360)},_setPath:function(n,a){n._path.v=a},_bringToFront:function(n){ze(n._container)},_bringToBack:function(n){hi(n._container)}},bn=_t.vml?Jn:cs,$i=Be.extend({_initContainer:function(){this._container=bn("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=bn("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Wt(this._container),Jt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Be.prototype._update.call(this);var n=this._bounds,a=n.getSize(),l=this._container;(!this._svgSize||!this._svgSize.equals(a))&&(this._svgSize=a,l.setAttribute("width",a.x),l.setAttribute("height",a.y)),ne(l,n.min),l.setAttribute("viewBox",[n.min.x,n.min.y,a.x,a.y].join(" ")),this.fire("update")}},_initPath:function(n){var a=n._path=bn("path");n.options.className&&Et(a,n.options.className),n.options.interactive&&Et(a,"leaflet-interactive"),this._updateStyle(n),this._layers[y(n)]=n},_addPath:function(n){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(n._path),n.addInteractiveTarget(n._path)},_removePath:function(n){Wt(n._path),n.removeInteractiveTarget(n._path),delete this._layers[y(n)]},_updatePath:function(n){n._project(),n._update()},_updateStyle:function(n){var a=n._path,l=n.options;a&&(l.stroke?(a.setAttribute("stroke",l.color),a.setAttribute("stroke-opacity",l.opacity),a.setAttribute("stroke-width",l.weight),a.setAttribute("stroke-linecap",l.lineCap),a.setAttribute("stroke-linejoin",l.lineJoin),l.dashArray?a.setAttribute("stroke-dasharray",l.dashArray):a.removeAttribute("stroke-dasharray"),l.dashOffset?a.setAttribute("stroke-dashoffset",l.dashOffset):a.removeAttribute("stroke-dashoffset")):a.setAttribute("stroke","none"),l.fill?(a.setAttribute("fill",l.fillColor||l.color),a.setAttribute("fill-opacity",l.fillOpacity),a.setAttribute("fill-rule",l.fillRule||"evenodd")):a.setAttribute("fill","none"))},_updatePoly:function(n,a){this._setPath(n,fs(n._parts,a))},_updateCircle:function(n){var a=n._point,l=Math.max(Math.round(n._radius),1),d=Math.max(Math.round(n._radiusY),1)||l,g="a"+l+","+d+" 0 1,0 ",S=n._empty()?"M0 0":"M"+(a.x-l)+","+a.y+g+l*2+",0 "+g+-l*2+",0 ";this._setPath(n,S)},_setPath:function(n,a){n._path.setAttribute("d",a)},_bringToFront:function(n){ze(n._path)},_bringToBack:function(n){hi(n._path)}});_t.vml&&$i.include(Rl);function Ja(n){return _t.svg||_t.vml?new $i(n):null}Pt.include({getRenderer:function(n){var a=n.options.renderer||this._getPaneRenderer(n.options.pane)||this.options.renderer||this._renderer;return a||(a=this._renderer=this._createRenderer()),this.hasLayer(a)||this.addLayer(a),a},_getPaneRenderer:function(n){if(n==="overlayPane"||n===void 0)return!1;var a=this._paneRenderers[n];return a===void 0&&(a=this._createRenderer({pane:n}),this._paneRenderers[n]=a),a},_createRenderer:function(n){return this.options.preferCanvas&&Qa(n)||Ja(n)}});var gi=Qi.extend({initialize:function(n,a){Qi.prototype.initialize.call(this,this._boundsToLatLngs(n),a)},setBounds:function(n){return this.setLatLngs(this._boundsToLatLngs(n))},_boundsToLatLngs:function(n){return n=lt(n),[n.getSouthWest(),n.getNorthWest(),n.getNorthEast(),n.getSouthEast()]}});function Yu(n,a){return new gi(n,a)}$i.create=bn,$i.pointsToPath=fs,Rn.geometryToLayer=Ce,Rn.coordsToLatLng=Ts,Rn.coordsToLatLngs=qa,Rn.latLngToCoords=Es,Rn.latLngsToCoords=Ya,Rn.getFeature=Vn,Rn.asFeature=Ls,Pt.mergeOptions({boxZoom:!0});var Ue=vn.extend({initialize:function(n){this._map=n,this._container=n._container,this._pane=n._panes.overlayPane,this._resetStateTimeout=0,n.on("unload",this._destroy,this)},addHooks:function(){St(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Jt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Wt(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(n){if(!n.shiftKey||n.which!==1&&n.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),Zi(),gs(),this._startPoint=this._map.mouseEventToContainerPoint(n),St(document,{contextmenu:Yn,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(n){this._moved||(this._moved=!0,this._box=jt("div","leaflet-zoom-box",this._container),Et(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(n);var a=new N(this._point,this._startPoint),l=a.getSize();ne(this._box,a.min),this._box.style.width=l.x+"px",this._box.style.height=l.y+"px"},_finish:function(){this._moved&&(Wt(this._box),le(this._container,"leaflet-crosshair")),pn(),Ma(),Jt(document,{contextmenu:Yn,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(n){if(!(n.which!==1&&n.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(_(this._resetState,this),0);var a=new $(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(a).fire("boxzoomend",{boxZoomBounds:a})}},_onKeyDown:function(n){n.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});Pt.addInitHook("addHandler","boxZoom",Ue),Pt.mergeOptions({doubleClickZoom:!0});var Ms=vn.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(n){var a=this._map,l=a.getZoom(),d=a.options.zoomDelta,g=n.originalEvent.shiftKey?l-d:l+d;a.options.doubleClickZoom==="center"?a.setZoom(g):a.setZoomAround(n.containerPoint,g)}});Pt.addInitHook("addHandler","doubleClickZoom",Ms),Pt.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Sn=vn.extend({addHooks:function(){if(!this._draggable){var n=this._map;this._draggable=new Gn(n._mapPane,n._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),n.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),n.on("zoomend",this._onZoomEnd,this),n.whenReady(this._onZoomEnd,this))}Et(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){le(this._map._container,"leaflet-grab"),le(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 n=this._map;if(n._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var a=lt(this._map.options.maxBounds);this._offsetLimit=X(this._map.latLngToContainerPoint(a.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(a.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;n.fire("movestart").fire("dragstart"),n.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(n){if(this._map.options.inertia){var a=this._lastTime=+new Date,l=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(l),this._times.push(a),this._prunePositions(a)}this._map.fire("move",n).fire("drag",n)},_prunePositions:function(n){for(;this._positions.length>1&&n-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var n=this._map.getSize().divideBy(2),a=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=a.subtract(n).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(n,a){return n-(n-a)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var n=this._draggable._newPos.subtract(this._draggable._startPos),a=this._offsetLimit;n.x<a.min.x&&(n.x=this._viscousLimit(n.x,a.min.x)),n.y<a.min.y&&(n.y=this._viscousLimit(n.y,a.min.y)),n.x>a.max.x&&(n.x=this._viscousLimit(n.x,a.max.x)),n.y>a.max.y&&(n.y=this._viscousLimit(n.y,a.max.y)),this._draggable._newPos=this._draggable._startPos.add(n)}},_onPreDragWrap:function(){var n=this._worldWidth,a=Math.round(n/2),l=this._initialWorldOffset,d=this._draggable._newPos.x,g=(d-a+l)%n+a-l,S=(d+a+l)%n-a-l,M=Math.abs(g+l)<Math.abs(S+l)?g:S;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=M},_onDragEnd:function(n){var a=this._map,l=a.options,d=!l.inertia||n.noInertia||this._times.length<2;if(a.fire("dragend",n),d)a.fire("moveend");else{this._prunePositions(+new Date);var g=this._lastPos.subtract(this._positions[0]),S=(this._lastTime-this._times[0])/1e3,M=l.easeLinearity,P=g.multiplyBy(M/S),K=P.distanceTo([0,0]),nt=Math.min(l.inertiaMaxSpeed,K),ct=P.multiplyBy(nt/K),yt=nt/(l.inertiaDeceleration*M),Mt=ct.multiplyBy(-yt/2).round();!Mt.x&&!Mt.y?a.fire("moveend"):(Mt=a._limitOffset(Mt,a.options.maxBounds),vt(function(){a.panBy(Mt,{duration:yt,easeLinearity:M,noMoveStart:!0,animate:!0})}))}}});Pt.addInitHook("addHandler","dragging",Sn),Pt.mergeOptions({keyboard:!0,keyboardPanDelta:80});var Dl=vn.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(n){this._map=n,this._setPanDelta(n.options.keyboardPanDelta),this._setZoomDelta(n.options.zoomDelta)},addHooks:function(){var n=this._map._container;n.tabIndex<=0&&(n.tabIndex="0"),St(n,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Jt(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 n=document.body,a=document.documentElement,l=n.scrollTop||a.scrollTop,d=n.scrollLeft||a.scrollLeft;this._map._container.focus(),window.scrollTo(d,l)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(n){var a=this._panKeys={},l=this.keyCodes,d,g;for(d=0,g=l.left.length;d<g;d++)a[l.left[d]]=[-1*n,0];for(d=0,g=l.right.length;d<g;d++)a[l.right[d]]=[n,0];for(d=0,g=l.down.length;d<g;d++)a[l.down[d]]=[0,n];for(d=0,g=l.up.length;d<g;d++)a[l.up[d]]=[0,-1*n]},_setZoomDelta:function(n){var a=this._zoomKeys={},l=this.keyCodes,d,g;for(d=0,g=l.zoomIn.length;d<g;d++)a[l.zoomIn[d]]=n;for(d=0,g=l.zoomOut.length;d<g;d++)a[l.zoomOut[d]]=-n},_addHooks:function(){St(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Jt(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(n){if(!(n.altKey||n.ctrlKey||n.metaKey)){var a=n.keyCode,l=this._map,d;if(a in this._panKeys){if(!l._panAnim||!l._panAnim._inProgress)if(d=this._panKeys[a],n.shiftKey&&(d=st(d).multiplyBy(3)),l.options.maxBounds&&(d=l._limitOffset(st(d),l.options.maxBounds)),l.options.worldCopyJump){var g=l.wrapLatLng(l.unproject(l.project(l.getCenter()).add(d)));l.panTo(g)}else l.panBy(d)}else if(a in this._zoomKeys)l.setZoom(l.getZoom()+(n.shiftKey?3:1)*this._zoomKeys[a]);else if(a===27&&l._popup&&l._popup.options.closeOnEscapeKey)l.closePopup();else return;Yn(n)}}});Pt.addInitHook("addHandler","keyboard",Dl),Pt.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var Fa=vn.extend({addHooks:function(){St(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Jt(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(n){var a=Ae(n),l=this._map.options.wheelDebounceTime;this._delta+=a,this._lastMousePos=this._map.mouseEventToContainerPoint(n),this._startTime||(this._startTime=+new Date);var d=Math.max(l-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(_(this._performZoom,this),d),Yn(n)},_performZoom:function(){var n=this._map,a=n.getZoom(),l=this._map.options.zoomSnap||0;n._stop();var d=this._delta/(this._map.options.wheelPxPerZoomLevel*4),g=4*Math.log(2/(1+Math.exp(-Math.abs(d))))/Math.LN2,S=l?Math.ceil(g/l)*l:g,M=n._limitZoom(a+(this._delta>0?S:-S))-a;this._delta=0,this._startTime=null,M&&(n.options.scrollWheelZoom==="center"?n.setZoom(a+M):n.setZoomAround(this._lastMousePos,a+M))}});Pt.addInitHook("addHandler","scrollWheelZoom",Fa);var vi=600;Pt.mergeOptions({tapHold:_t.touchNative&&_t.safari&&_t.mobile,tapTolerance:15});var As=vn.extend({addHooks:function(){St(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Jt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(n){if(clearTimeout(this._holdTimeout),n.touches.length===1){var a=n.touches[0];this._startPos=this._newPos=new I(a.clientX,a.clientY),this._holdTimeout=setTimeout(_(function(){this._cancel(),this._isTapValid()&&(St(document,"touchend",fe),St(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",a))},this),vi),St(document,"touchend touchcancel contextmenu",this._cancel,this),St(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function n(){Jt(document,"touchend",fe),Jt(document,"touchend touchcancel",n)},_cancel:function(){clearTimeout(this._holdTimeout),Jt(document,"touchend touchcancel contextmenu",this._cancel,this),Jt(document,"touchmove",this._onMove,this)},_onMove:function(n){var a=n.touches[0];this._newPos=new I(a.clientX,a.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(n,a){var l=new MouseEvent(n,{bubbles:!0,cancelable:!0,view:window,screenX:a.screenX,screenY:a.screenY,clientX:a.clientX,clientY:a.clientY});l._simulated=!0,a.target.dispatchEvent(l)}});Pt.addInitHook("addHandler","tapHold",As),Pt.mergeOptions({touchZoom:_t.touch,bounceAtZoomLimits:!0});var jl=vn.extend({addHooks:function(){Et(this._map._container,"leaflet-touch-zoom"),St(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){le(this._map._container,"leaflet-touch-zoom"),Jt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(n){var a=this._map;if(!(!n.touches||n.touches.length!==2||a._animatingZoom||this._zooming)){var l=a.mouseEventToContainerPoint(n.touches[0]),d=a.mouseEventToContainerPoint(n.touches[1]);this._centerPoint=a.getSize()._divideBy(2),this._startLatLng=a.containerPointToLatLng(this._centerPoint),a.options.touchZoom!=="center"&&(this._pinchStartLatLng=a.containerPointToLatLng(l.add(d)._divideBy(2))),this._startDist=l.distanceTo(d),this._startZoom=a.getZoom(),this._moved=!1,this._zooming=!0,a._stop(),St(document,"touchmove",this._onTouchMove,this),St(document,"touchend touchcancel",this._onTouchEnd,this),fe(n)}},_onTouchMove:function(n){if(!(!n.touches||n.touches.length!==2||!this._zooming)){var a=this._map,l=a.mouseEventToContainerPoint(n.touches[0]),d=a.mouseEventToContainerPoint(n.touches[1]),g=l.distanceTo(d)/this._startDist;if(this._zoom=a.getScaleZoom(g,this._startZoom),!a.options.bounceAtZoomLimits&&(this._zoom<a.getMinZoom()&&g<1||this._zoom>a.getMaxZoom()&&g>1)&&(this._zoom=a._limitZoom(this._zoom)),a.options.touchZoom==="center"){if(this._center=this._startLatLng,g===1)return}else{var S=l._add(d)._divideBy(2)._subtract(this._centerPoint);if(g===1&&S.x===0&&S.y===0)return;this._center=a.unproject(a.project(this._pinchStartLatLng,this._zoom).subtract(S),this._zoom)}this._moved||(a._moveStart(!0,!1),this._moved=!0),wt(this._animRequest);var M=_(a._move,a,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=vt(M,this,!0),fe(n)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,wt(this._animRequest),Jt(document,"touchmove",this._onTouchMove,this),Jt(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))}});Pt.addInitHook("addHandler","touchZoom",jl),Pt.BoxZoom=Ue,Pt.DoubleClickZoom=Ms,Pt.Drag=Sn,Pt.Keyboard=Dl,Pt.ScrollWheelZoom=Fa,Pt.TapHold=As,Pt.TouchZoom=jl,r.Bounds=N,r.Browser=_t,r.CRS=at,r.Canvas=Os,r.Circle=zs,r.CircleMarker=Ki,r.Class=Rt,r.Control=qe,r.DivIcon=ar,r.DivOverlay=Ne,r.DomEvent=ys,r.DomUtil=qi,r.Draggable=Gn,r.Evented=q,r.FeatureGroup=_n,r.GeoJSON=Rn,r.GridLayer=Wi,r.Handler=vn,r.Icon=yn,r.ImageOverlay=Fi,r.LatLng=ot,r.LatLngBounds=$,r.Layer=rn,r.LayerGroup=Xi,r.LineUtil=Uu,r.Map=Pt,r.Marker=ka,r.Mixin=Ru,r.Path=xn,r.Point=I,r.PolyUtil=Ol,r.Polygon=Qi,r.Polyline=An,r.Popup=Va,r.PosAnimation=Yi,r.Projection=Jo,r.Rectangle=gi,r.Renderer=Be,r.SVG=$i,r.SVGOverlay=Ns,r.TileLayer=Qn,r.Tooltip=Xa,r.Transformation=an,r.Util=ce,r.VideoOverlay=Kn,r.bind=_,r.bounds=X,r.canvas=Qa,r.circle=tr,r.circleMarker=$o,r.control=Mn,r.divIcon=qu,r.extend=m,r.featureGroup=Io,r.geoJSON=Cs,r.geoJson=Ga,r.gridLayer=sr,r.icon=Ha,r.imageOverlay=er,r.latLng=rt,r.latLngBounds=lt,r.layerGroup=Hu,r.map=zl,r.marker=Wo,r.point=st,r.polygon=Pu,r.polyline=Zu,r.popup=ir,r.rectangle=Yu,r.setOptions=B,r.stamp=y,r.svg=Ja,r.svgOverlay=nr,r.tileLayer=Je,r.tooltip=ku,r.transformation=si,r.version=c,r.videoOverlay=Ii;var Bl=window.L;r.noConflict=function(){return window.L=Bl,this},window.L=r}))})(bo,bo.exports)),bo.exports}var rl=Uy();const Hy=zp(rl);function yu(f,u,r){return Object.freeze({instance:f,context:u,container:r})}function xu(f,u){return u==null?function(c,m){const p=C.useRef(void 0);return p.current||(p.current=f(c,m)),p}:function(c,m){const p=C.useRef(void 0);p.current||(p.current=f(c,m));const _=C.useRef(c),{instance:z}=p.current;return C.useEffect(function(){_.current!==c&&(u(z,c,_.current),_.current=c)},[z,c,u]),p}}function tg(f,u){C.useEffect(function(){return(u.layerContainer??u.map).addLayer(f.instance),function(){var p;(p=u.layerContainer)==null||p.removeLayer(f.instance),u.map.removeLayer(f.instance)}},[u,f])}function eg(f){return function(r){const c=Qf(),m=f(_u(r,c),c);return Ip(c.map,r.attribution),Jf(m.current,r.eventHandlers),tg(m.current,c),m}}function Zy(f,u){const r=C.useRef(void 0);C.useEffect(function(){if(u.pathOptions!==r.current){const m=u.pathOptions??{};f.instance.setStyle(m),r.current=m}},[f,u])}function Py(f){return function(r){const c=Qf(),m=f(_u(r,c),c);return Jf(m.current,r.eventHandlers),tg(m.current,c),Zy(m.current,r),m}}function ky(f,u){const r=xu(f,u),c=eg(r);return $p(c)}function qy(f,u){const r=xu(f),c=jy(r,u);return Ry(c)}function Yy(f,u){const r=xu(f,u),c=Py(r);return $p(c)}function Gy(f,u){const r=xu(f,u),c=eg(r);return Dy(c)}function Vy(f,u,r){const{opacity:c,zIndex:m}=u;c!=null&&c!==r.opacity&&f.setOpacity(c),m!=null&&m!==r.zIndex&&f.setZIndex(m)}function Xy({bounds:f,boundsOptions:u,center:r,children:c,className:m,id:p,placeholder:_,style:z,whenReady:y,zoom:x,...T},E){const[O]=C.useState({className:m,id:p,style:z}),[H,A]=C.useState(null),B=C.useRef(void 0);C.useImperativeHandle(E,()=>(H==null?void 0:H.map)??null,[H]);const V=C.useCallback(U=>{if(U!==null&&!B.current){const k=new rl.Map(U,T);B.current=k,r!=null&&x!=null?k.setView(r,x):f!=null&&k.fitBounds(f,u),y!=null&&k.whenReady(y),A(Ay(k))}},[]);C.useEffect(()=>()=>{H==null||H.map.remove()},[H]);const et=H?Mf.createElement(Kf,{value:H},c):_??null;return Mf.createElement("div",{...O,ref:V},et)}const Ky=C.forwardRef(Xy),Qy=ky(function({position:u,...r},c){const m=new rl.Marker(u,r);return yu(m,Wp(c,{overlayContainer:m}))},function(u,r,c){r.position!==c.position&&u.setLatLng(r.position),r.icon!=null&&r.icon!==c.icon&&u.setIcon(r.icon),r.zIndexOffset!=null&&r.zIndexOffset!==c.zIndexOffset&&u.setZIndexOffset(r.zIndexOffset),r.opacity!=null&&r.opacity!==c.opacity&&u.setOpacity(r.opacity),u.dragging!=null&&r.draggable!==c.draggable&&(r.draggable===!0?u.dragging.enable():u.dragging.disable())}),Jy=Yy(function({positions:u,...r},c){const m=new rl.Polyline(u,r);return yu(m,Wp(c,{overlayContainer:m}))},function(u,r,c){r.positions!==c.positions&&u.setLatLngs(r.positions)}),Fy=qy(function(u,r){const c=new rl.Popup(u,r.overlayContainer);return yu(c,r)},function(u,r,{position:c},m){C.useEffect(function(){const{instance:_}=u;function z(x){x.popup===_&&(_.update(),m(!0))}function y(x){x.popup===_&&m(!1)}return r.map.on({popupopen:z,popupclose:y}),r.overlayContainer==null?(c!=null&&_.setLatLng(c),_.openOn(r.map)):r.overlayContainer.bindPopup(_),function(){var T;r.map.off({popupopen:z,popupclose:y}),(T=r.overlayContainer)==null||T.unbindPopup(),r.map.removeLayer(_)}},[u,r,m,c])}),Iy=Gy(function({url:u,...r},c){const m=new rl.TileLayer(u,_u(r,c));return yu(m,c)},function(u,r,c){Vy(u,r,c);const{url:m}=r;m!=null&&m!==c.url&&u.setUrl(m)}),Wy=Hy.divIcon({className:"bg-az-orange rounded-full w-3 h-3 border border-white",iconSize:[12,12]});function $y({waypoints:f}){const u=f.length>0?[f[0].latitude,f[0].longitude]:[50.45,30.52],r=f.sort((c,m)=>c.order-m.order).map(c=>[c.latitude,c.longitude]);return b.jsxs(Ky,{center:u,zoom:13,className:"h-full w-full",children:[b.jsx(Iy,{attribution:'© <a href="https://www.openstreetmap.org/copyright">OSM</a>',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),f.map(c=>b.jsx(Qy,{position:[c.latitude,c.longitude],icon:Wy,children:b.jsx(Fy,{children:c.name})},c.id)),r.length>1&&b.jsx(Jy,{positions:r,color:"#fd7e14",weight:2})]},u.join(","))}function tx(){const{t:f}=En(),{flights:u,selectedFlight:r,selectFlight:c,refreshFlights:m}=vu(),[p,_]=C.useState("params"),[z,y]=C.useState([]),[x,T]=C.useState([]),[E,O]=C.useState(null),[H,A]=C.useState(null),[B,V]=C.useState(""),et=ru(200,150,350);C.useEffect(()=>{Nt.get("/api/flights/aircrafts").then(T).catch(()=>{})},[]),C.useEffect(()=>{if(!r){y([]);return}Nt.get(`/api/flights/${r.id}/waypoints`).then(y).catch(()=>{})},[r]),C.useEffect(()=>{if(!(!r||p!=="gps"))return Fp(`/api/flights/${r.id}/live-gps`,ht=>O(ht))},[r,p]);const U=async()=>{B.trim()&&(await Nt.post("/api/flights",{name:B.trim()}),V(""),m())},k=async()=>{H&&(await Nt.delete(`/api/flights/${H}`),(r==null?void 0:r.id)===H&&c(null),A(null),m())},F=async()=>{if(!r)return;await Nt.post(`/api/flights/${r.id}/waypoints`,{name:`Point ${z.length}`,latitude:50.45,longitude:30.52,order:z.length});const ht=await Nt.get(`/api/flights/${r.id}/waypoints`);y(ht)},mt=async ht=>{r&&(await Nt.delete(`/api/flights/${r.id}/waypoints/${ht}`),y(ft=>ft.filter(pt=>pt.id!==ht)))};return b.jsxs("div",{className:"flex h-full",children:[b.jsxs("div",{style:{width:et.width},className:"bg-az-panel border-r border-az-border flex flex-col shrink-0",children:[b.jsx("div",{className:"p-2 border-b border-az-border",children:b.jsxs("div",{className:"flex gap-1",children:[b.jsx("input",{value:B,onChange:ht=>V(ht.target.value),onKeyDown:ht=>ht.key==="Enter"&&U(),placeholder:f("flights.create"),className:"flex-1 bg-az-bg border border-az-border rounded px-2 py-1 text-xs text-az-text outline-none"}),b.jsx("button",{onClick:U,className:"bg-az-orange text-white text-xs px-2 py-1 rounded",children:"+"})]})}),b.jsx("div",{className:"flex-1 overflow-y-auto",children:u.map(ht=>b.jsxs("div",{onClick:()=>c(ht),className:`px-2 py-1.5 cursor-pointer border-b border-az-border text-sm ${(r==null?void 0:r.id)===ht.id?"bg-az-bg text-white":"text-az-text hover:bg-az-bg"}`,children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx("span",{className:"truncate",children:ht.name}),b.jsx("button",{onClick:ft=>{ft.stopPropagation(),A(ht.id)},className:"text-az-muted hover:text-az-red text-xs",children:"×"})]}),b.jsx("div",{className:"text-xs text-az-muted",children:new Date(ht.createdDate).toLocaleDateString()})]},ht.id))})]}),b.jsx("div",{onMouseDown:et.onMouseDown,className:"w-1 cursor-col-resize bg-az-border hover:bg-az-orange shrink-0"}),r&&b.jsxs("div",{className:"w-64 bg-az-panel border-r border-az-border flex flex-col shrink-0 overflow-y-auto",children:[b.jsxs("div",{className:"flex border-b border-az-border",children:[b.jsx("button",{onClick:()=>_("params"),className:`flex-1 py-1.5 text-xs ${p==="params"?"bg-az-bg text-white":"text-az-muted"}`,children:f("flights.params")}),b.jsx("button",{onClick:()=>_("gps"),className:`flex-1 py-1.5 text-xs ${p==="gps"?"bg-az-bg text-white":"text-az-muted"}`,children:f("flights.gpsDenied")})]}),p==="params"&&b.jsxs("div",{className:"p-2 space-y-2 text-xs",children:[b.jsxs("div",{children:[b.jsx("label",{className:"text-az-muted block mb-0.5",children:f("flights.aircraft")}),b.jsx("select",{className:"w-full bg-az-bg border border-az-border rounded px-2 py-1 text-az-text",children:x.map(ht=>b.jsx("option",{value:ht.id,children:ht.model},ht.id))})]}),b.jsxs("div",{children:[b.jsx("label",{className:"text-az-muted block mb-0.5",children:f("flights.height")}),b.jsx("input",{type:"number",className:"w-full bg-az-bg border border-az-border rounded px-2 py-1 text-az-text",defaultValue:100})]}),b.jsxs("div",{children:[b.jsxs("div",{className:"flex justify-between items-center mb-1",children:[b.jsx("label",{className:"text-az-muted",children:f("flights.waypoints")}),b.jsx("button",{onClick:F,className:"text-az-orange text-xs",children:"+ Add"})]}),b.jsx("div",{className:"space-y-0.5",children:z.map(ht=>b.jsxs("div",{className:"flex items-center justify-between bg-az-bg rounded px-1.5 py-0.5",children:[b.jsx("span",{className:"text-az-text",children:ht.name}),b.jsx("button",{onClick:()=>mt(ht.id),className:"text-az-muted hover:text-az-red",children:"×"})]},ht.id))})]})]}),p==="gps"&&b.jsxs("div",{className:"p-2 space-y-2 text-xs",children:[b.jsxs("div",{children:[b.jsx("label",{className:"text-az-muted block mb-1",children:f("flights.liveGps")}),E?b.jsxs("div",{className:"bg-az-bg rounded p-1.5 space-y-0.5",children:[b.jsxs("div",{className:"text-az-text",children:["Status: ",b.jsx("span",{className:"text-az-green",children:E.status})]}),b.jsxs("div",{className:"text-az-text",children:["Lat: ",E.lat.toFixed(6)]}),b.jsxs("div",{className:"text-az-text",children:["Lon: ",E.lon.toFixed(6)]}),b.jsxs("div",{className:"text-az-text",children:["Sats: ",E.satellites]})]}):b.jsx("div",{className:"text-az-muted",children:"Waiting for GPS signal..."})]}),b.jsxs("button",{onClick:()=>_("params"),className:"text-az-orange text-xs",children:["← ",f("flights.back")]})]})]}),b.jsx("div",{className:"flex-1 relative",children:b.jsx($y,{waypoints:z})}),b.jsx(Xf,{open:!!H,title:f("common.delete"),message:"Delete this flight and all its data?",onConfirm:k,onCancel:()=>A(null)})]})}function ng(f,u){const[r,c]=C.useState(f);return C.useEffect(()=>{const m=setTimeout(()=>c(f),u);return()=>clearTimeout(m)},[f,u]),r}function ex({selectedMedia:f,onSelect:u,onAnnotationsLoaded:r}){const{t:c}=En(),{selectedFlight:m}=vu(),[p,_]=C.useState([]),[z,y]=C.useState(""),x=ng(z,300),[T,E]=C.useState(null),[O,H]=C.useState(!1),A=C.useCallback(async()=>{const k=new URLSearchParams({pageSize:"1000"});m&&k.set("flightId",m.id),x&&k.set("name",x);try{const F=await Nt.get(`/api/annotations/media?${k}`);_(F.items)}catch{}},[m,x]);C.useEffect(()=>{A()},[A]);const B=async k=>{u(k);try{const F=await Nt.get(`/api/annotations/annotations?mediaId=${k.id}&pageSize=1000`);r(F.items)}catch{}},V=async()=>{T&&(await Nt.delete(`/api/annotations/media/${T}`),E(null),A())},et=async k=>{if(k.preventDefault(),H(!1),!m||!k.dataTransfer.files.length)return;const F=new FormData;F.append("waypointId","");for(const mt of k.dataTransfer.files)F.append("files",mt);await Nt.upload("/api/annotations/media/batch",F),A()},U=async k=>{var mt;if(!((mt=k.target.files)!=null&&mt.length))return;const F=new FormData;F.append("waypointId","");for(const ht of k.target.files)F.append("files",ht);await Nt.upload("/api/annotations/media/batch",F),A(),k.target.value=""};return b.jsxs("div",{className:`flex-1 flex flex-col overflow-hidden ${O?"ring-2 ring-az-orange ring-inset":""}`,onDragOver:k=>{k.preventDefault(),H(!0)},onDragLeave:()=>H(!1),onDrop:et,children:[b.jsxs("div",{className:"p-2 border-b border-az-border flex gap-1",children:[b.jsx("input",{value:z,onChange:k=>y(k.target.value),placeholder:c("annotations.mediaList"),className:"flex-1 bg-az-bg border border-az-border rounded px-2 py-1 text-xs text-az-text outline-none"}),b.jsxs("label",{className:"bg-az-orange text-white text-xs px-2 py-1 rounded cursor-pointer",children:["↑",b.jsx("input",{type:"file",multiple:!0,className:"hidden",onChange:U})]})]}),b.jsx("div",{className:"flex-1 overflow-y-auto",children:p.map(k=>b.jsxs("div",{onClick:()=>B(k),onContextMenu:F=>{F.preventDefault(),E(k.id)},className:`px-2 py-1 cursor-pointer border-b border-az-border text-xs flex items-center gap-1.5 ${(f==null?void 0:f.id)===k.id?"bg-az-bg text-white":""} ${k.annotationCount>0?"bg-az-bg/50":""} text-az-text hover:bg-az-bg`,children:[b.jsx("span",{className:`font-mono text-[10px] px-1 rounded ${k.mediaType===2?"bg-az-blue/20 text-az-blue":"bg-az-green/20 text-az-green"}`,children:k.mediaType===2?"V":"P"}),b.jsx("span",{className:"truncate flex-1",children:k.name}),k.duration&&b.jsx("span",{className:"text-az-muted",children:k.duration})]},k.id))}),b.jsx(Xf,{open:!!T,title:c("annotations.deleteMedia"),onConfirm:V,onCancel:()=>E(null)})]})}function nx({media:f,onTimeUpdate:u,selectedClassNum:r}){const{t:c}=En(),m=C.useRef(null),[p,_]=C.useState(!1),[z,y]=C.useState(0),[x,T]=C.useState(0),[E,O]=C.useState(!1),H=`/api/annotations/media/${f.id}/file`,A=C.useCallback(U=>{const k=m.current;if(!k)return;const F=30;k.currentTime=Math.max(0,Math.min(k.duration,k.currentTime+U/F))},[]),B=C.useCallback(()=>{const U=m.current;U&&(U.paused?(U.play(),_(!0)):(U.pause(),_(!1)))},[]),V=C.useCallback(()=>{const U=m.current;U&&(U.pause(),U.currentTime=0,_(!1))},[]);C.useEffect(()=>{const U=k=>{if(!(k.target instanceof HTMLInputElement||k.target instanceof HTMLTextAreaElement))switch(k.key){case" ":k.preventDefault(),B();break;case"ArrowLeft":k.preventDefault(),A(k.ctrlKey?-150:-1);break;case"ArrowRight":k.preventDefault(),A(k.ctrlKey?150:1);break;case"m":case"M":O(F=>!F);break}};return window.addEventListener("keydown",U),()=>window.removeEventListener("keydown",U)},[B,A]);const et=U=>{const k=Math.floor(U/60),F=Math.floor(U%60);return`${k.toString().padStart(2,"0")}:${F.toString().padStart(2,"0")}`};return b.jsxs("div",{className:"bg-black flex flex-col",children:[b.jsx("video",{ref:m,src:H,muted:E,className:"w-full max-h-[50vh] object-contain",onTimeUpdate:U=>{const k=U.target.currentTime;y(k),u(k)},onLoadedMetadata:U=>T(U.target.duration),onClick:B}),b.jsx("div",{className:"h-1 bg-az-border cursor-pointer",onClick:U=>{const k=U.currentTarget.getBoundingClientRect(),F=(U.clientX-k.left)/k.width;m.current&&(m.current.currentTime=F*x)},children:b.jsx("div",{className:"h-full bg-az-orange",style:{width:`${x?z/x*100:0}%`}})}),b.jsxs("div",{className:"flex items-center gap-1 px-2 py-1 bg-az-header text-xs",children:[b.jsx("button",{onClick:B,className:"text-az-text hover:text-white px-1",children:p?"⏸":"▶"}),b.jsx("button",{onClick:V,className:"text-az-text hover:text-white px-1",children:"⏹"}),[1,5,10,30,60].map(U=>b.jsxs("button",{onClick:()=>A(-U),className:"text-az-muted hover:text-white px-0.5",children:["-",U]},`prev-${U}`)),b.jsx("span",{className:"text-az-muted mx-1",children:"|"}),[1,5,10,30,60].map(U=>b.jsxs("button",{onClick:()=>A(U),className:"text-az-muted hover:text-white px-0.5",children:["+",U]},`next-${U}`)),b.jsx("div",{className:"flex-1"}),b.jsx("button",{onClick:()=>O(U=>!U),className:"text-az-text hover:text-white px-1",children:E?"🔇":"🔊"}),b.jsxs("span",{className:"text-az-muted",children:[et(z)," / ",et(x)]})]})]})}const ei=6,iu=12,ix={0:"#FFD700",1:"#228be6",2:"#fa5252"};function ig({media:f,annotation:u,detections:r,onDetectionsChange:c,selectedClassNum:m,currentTime:p,annotations:_}){const z=C.useRef(null),y=C.useRef(null),x=C.useRef(null),[T,E]=C.useState(1),[O,H]=C.useState({x:0,y:0}),[A,B]=C.useState(new Set),[V,et]=C.useState(null),[U,k]=C.useState(null),[F,mt]=C.useState({w:0,h:0}),ht=C.useCallback(()=>{const D=new Image;D.crossOrigin="anonymous",u?D.src=`/api/annotations/annotations/${u.id}/image`:D.src=`/api/annotations/media/${f.id}/file`,D.onload=()=>{x.current=D,mt({w:D.naturalWidth,h:D.naturalHeight})}},[f,u]);C.useEffect(()=>{ht()},[ht]),C.useCallback((D,q)=>({x:D*F.w*T+O.x,y:q*F.h*T+O.y}),[F,T,O]);const ft=C.useCallback((D,q)=>({x:Math.max(0,Math.min(1,(D-O.x)/(F.w*T))),y:Math.max(0,Math.min(1,(q-O.y)/(F.h*T)))}),[F,T,O]),pt=C.useCallback(()=>{const D=z.current,q=D==null?void 0:D.getContext("2d");if(!D||!q||!x.current)return;const I=y.current;I&&(D.width=I.clientWidth,D.height=I.clientHeight),q.clearRect(0,0,D.width,D.height),q.save(),q.drawImage(x.current,O.x,O.y,F.w*T,F.h*T);const ut=zt();[...r,...ut].forEach((N,X)=>{const $=A.has(X)&&X<r.length,lt=(N.centerX-N.width/2)*F.w*T+O.x,ot=(N.centerY-N.height/2)*F.h*T+O.y,rt=N.width*F.w*T,at=N.height*F.h*T,Ot=ix[N.affiliation]||"#FFD700";q.strokeStyle=Ot,q.lineWidth=$?2:1,q.strokeRect(lt,ot,rt,at),q.fillStyle=Ot,q.globalAlpha=.1,q.fillRect(lt,ot,rt,at),q.globalAlpha=1;const Yt=N.confidence<.995?`${N.label} ${(N.confidence*100).toFixed(0)}%`:N.label;q.fillStyle=Ot,q.font="11px sans-serif",q.fillText(Yt,lt+2,ot-3),N.combatReadiness===1&&(q.fillStyle="#40c057",q.beginPath(),q.arc(lt+rt-6,ot+6,3,0,Math.PI*2),q.fill()),$&&Dt(lt,ot,rt,at).forEach(an=>{q.fillStyle="#fff",q.fillRect(an.x-ei/2,an.y-ei/2,ei,ei),q.strokeStyle=Ot,q.strokeRect(an.x-ei/2,an.y-ei/2,ei,ei)})}),U&&(q.strokeStyle="#fd7e14",q.lineWidth=1,q.setLineDash([4,4]),q.strokeRect(U.x,U.y,U.w,U.h),q.setLineDash([])),q.restore()},[r,A,T,O,F,U,p,_]);C.useEffect(()=>{const D=requestAnimationFrame(pt);return()=>cancelAnimationFrame(D)},[pt]),C.useEffect(()=>{const D=y.current;if(!D)return;const q=new ResizeObserver(()=>pt());return q.observe(D),()=>q.disconnect()},[pt]);const zt=()=>{if(f.mediaType!==2)return[];const D=p*1e7;return _.filter(q=>{if(!q.time)return!1;const I=q.time.split(":").map(Number),ut=(I[0]*3600+I[1]*60+I[2])*1e7;return Math.abs(ut-D)<2e6}).flatMap(q=>q.detections)},Dt=(D,q,I,ut)=>[{x:D,y:q,cursor:"nw-resize",name:"tl"},{x:D+I/2,y:q,cursor:"n-resize",name:"tc"},{x:D+I,y:q,cursor:"ne-resize",name:"tr"},{x:D+I,y:q+ut/2,cursor:"e-resize",name:"mr"},{x:D+I,y:q+ut,cursor:"se-resize",name:"br"},{x:D+I/2,y:q+ut,cursor:"s-resize",name:"bc"},{x:D,y:q+ut,cursor:"sw-resize",name:"bl"},{x:D,y:q+ut/2,cursor:"w-resize",name:"ml"}],vt=(D,q)=>{for(let I=r.length-1;I>=0;I--){const ut=r[I],st=(ut.centerX-ut.width/2)*F.w*T+O.x,N=(ut.centerY-ut.height/2)*F.h*T+O.y,X=ut.width*F.w*T,$=ut.height*F.h*T;if(A.has(I)){const lt=Dt(st,N,X,$);for(const ot of lt)if(Math.abs(D-ot.x)<ei&&Math.abs(q-ot.y)<ei)return{type:"handle",index:I,handle:ot.name}}if(D>=st&&D<=st+X&&q>=N&&q<=N+$)return{type:"box",index:I}}return null},wt=D=>{var N;const q=(N=z.current)==null?void 0:N.getBoundingClientRect();if(!q)return;const I=D.clientX-q.left,ut=D.clientY-q.top;if(D.ctrlKey&&D.button===0){et({type:"draw",startX:I,startY:ut});return}const st=vt(I,ut);(st==null?void 0:st.type)==="handle"?et({type:"resize",startX:I,startY:ut,detectionIndex:st.index,handle:st.handle}):(st==null?void 0:st.type)==="box"?(D.ctrlKey?B(X=>{const $=new Set(X);return $.has(st.index)?$.delete(st.index):$.add(st.index),$}):B(new Set([st.index])),et({type:"move",startX:I,startY:ut,detectionIndex:st.index})):(B(new Set),et({type:"draw",startX:I,startY:ut}))},ce=D=>{var st;if(!V)return;const q=(st=z.current)==null?void 0:st.getBoundingClientRect();if(!q)return;const I=D.clientX-q.left,ut=D.clientY-q.top;if(V.type==="draw")k({x:Math.min(V.startX,I),y:Math.min(V.startY,ut),w:Math.abs(I-V.startX),h:Math.abs(ut-V.startY)});else if(V.type==="move"&&V.detectionIndex!==void 0){const N=(I-V.startX)/(F.w*T),X=(ut-V.startY)/(F.h*T),$=[...r];(A.size>0?Array.from(A):[V.detectionIndex]).forEach(ot=>{$[ot]&&($[ot]={...$[ot],centerX:Math.max($[ot].width/2,Math.min(1-$[ot].width/2,$[ot].centerX+N)),centerY:Math.max($[ot].height/2,Math.min(1-$[ot].height/2,$[ot].centerY+X))})}),c($),et({...V,startX:I,startY:ut})}else if(V.type==="resize"&&V.detectionIndex!==void 0&&V.handle){const N=V.detectionIndex,X=r[N],$=ft(I,ut),lt=[...r];let ot=X.centerX-X.width/2,rt=X.centerY-X.height/2,at=X.centerX+X.width/2,Ot=X.centerY+X.height/2;V.handle.includes("l")&&(ot=$.x),V.handle.includes("r")&&(at=$.x),V.handle.includes("t")&&(rt=$.y),V.handle.includes("b")&&(Ot=$.y);const Yt=Math.abs(at-ot),we=Math.abs(Ot-rt);Yt*F.w*T>=iu&&we*F.h*T>=iu&&(lt[N]={...X,centerX:Math.min(ot,at)+Yt/2,centerY:Math.min(rt,Ot)+we/2,width:Yt,height:we},c(lt))}},Rt=()=>{if((V==null?void 0:V.type)==="draw"&&U){const D=U.w/(F.w*T),q=U.h/(F.h*T);if(D*F.w>=iu&&q*F.h>=iu){const I=ft(U.x+U.w/2,U.y+U.h/2),ut={id:crypto.randomUUID(),classNum:m,label:"",confidence:1,affiliation:0,combatReadiness:0,centerX:I.x,centerY:I.y,width:D,height:q};c([...r,ut]),B(new Set([r.length]))}k(null)}et(null)},Zt=D=>{if(!D.ctrlKey)return;D.preventDefault();const q=D.deltaY>0?.9:1.1;E(I=>Math.max(.1,Math.min(10,I*q)))};return C.useEffect(()=>{const D=q=>{if(!(q.target instanceof HTMLInputElement)&&(q.key==="Delete"&&A.size>0&&(c(r.filter((I,ut)=>!A.has(ut))),B(new Set)),q.key==="x"||q.key==="X")){if(q.target instanceof HTMLInputElement)return;c([]),B(new Set)}};return window.addEventListener("keydown",D),()=>window.removeEventListener("keydown",D)},[r,A,c]),b.jsx("div",{ref:y,className:"flex-1 relative overflow-hidden cursor-crosshair",children:b.jsx("canvas",{ref:z,className:"absolute inset-0",onMouseDown:wt,onMouseMove:ce,onMouseUp:Rt,onMouseLeave:Rt,onWheel:Zt})})}function ax({media:f,annotations:u,selectedAnnotation:r,onSelect:c,onAnnotationsUpdate:m}){const{t:p}=En(),[_,z]=C.useState(!1),[y,x]=C.useState([]);C.useEffect(()=>{if(f)return Fp("/api/annotations/annotations/events",A=>{A.mediaId===f.id&&Nt.get(`/api/annotations/annotations?mediaId=${f.id}&pageSize=1000`).then(B=>m(B.items)).catch(()=>{})})},[f,m]);const T=async()=>{if(f){z(!0),x(["Starting AI detection..."]);try{await Nt.post(`/api/detect/${f.id}`),x(A=>[...A,"Detection complete."])}catch(A){x(B=>[...B,`Error: ${A.message}`])}}},E=A=>A.detections.length===0?"rgba(221,221,221,0.25)":`linear-gradient(to right, ${A.detections.map((V,et)=>{const U=et/Math.max(A.detections.length-1,1)*100,k=Math.min(1,V.confidence);return`${V.label?H(V.classNum):"#888"}${Math.round(k*40).toString(16).padStart(2,"0")} ${U}%`}).join(", ")})`,O={},H=A=>{if(O[A])return O[A];const B=["#FF0000","#00FF00","#0000FF","#FFFF00","#FF00FF","#00FFFF","#188021","#800000","#008000","#000080"];return B[A%B.length]};return b.jsxs("div",{className:"flex flex-col h-full",children:[b.jsxs("div",{className:"p-2 border-b border-az-border flex items-center justify-between",children:[b.jsx("span",{className:"text-xs font-semibold text-az-muted",children:p("annotations.title")}),b.jsx("button",{onClick:T,disabled:!f,className:"text-xs bg-az-blue text-white px-2 py-0.5 rounded disabled:opacity-50",children:p("annotations.detect")})]}),b.jsxs("div",{className:"flex-1 overflow-y-auto",children:[u.map(A=>b.jsx("div",{onClick:()=>c(A),className:`px-2 py-1 cursor-pointer border-b border-az-border text-xs ${(r==null?void 0:r.id)===A.id?"ring-1 ring-az-orange ring-inset":""}`,style:{background:E(A)},children:b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx("span",{className:"text-az-text font-mono",children:A.time||"—"}),b.jsx("span",{className:"text-az-muted",children:A.detections.length>0?A.detections[0].label:"—"})]})},A.id)),u.length===0&&b.jsx("div",{className:"p-2 text-az-muted text-xs text-center",children:p("common.noData")})]}),_&&b.jsx("div",{className:"fixed inset-0 bg-black/60 flex items-center justify-center z-[100]",children:b.jsxs("div",{className:"bg-az-panel border border-az-border rounded-lg p-4 w-96 max-h-80 flex flex-col",children:[b.jsx("h3",{className:"text-white font-semibold mb-2",children:p("annotations.detect")}),b.jsx("div",{className:"flex-1 overflow-y-auto bg-az-bg rounded p-2 text-xs text-az-text font-mono space-y-0.5 mb-2",children:y.map((A,B)=>b.jsx("div",{children:A},B))}),b.jsx("button",{onClick:()=>z(!1),className:"self-end text-xs bg-az-border text-az-text px-3 py-1 rounded",children:"Close"})]})})]})}function ag({selectedClassNum:f,onSelect:u,photoMode:r,onPhotoModeChange:c}){const{t:m}=En(),[p,_]=C.useState([]);C.useEffect(()=>{Nt.get("/api/annotations/classes").then(_).catch(()=>{})},[]),C.useEffect(()=>{const y=x=>{const T=parseInt(x.key);if(T>=1&&T<=9){const E=T-1,O=p[E+r];O&&u(O.id)}};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[p,r,u]);const z=[{value:0,label:m("annotations.regular")},{value:20,label:m("annotations.winter")},{value:40,label:m("annotations.night")}];return b.jsxs("div",{className:"border-t border-az-border p-2",children:[b.jsx("div",{className:"text-xs text-az-muted mb-1 font-semibold",children:m("annotations.classes")}),b.jsx("div",{className:"flex gap-1 mb-2",children:z.map(y=>b.jsx("button",{onClick:()=>c(y.value),className:`text-xs px-2 py-0.5 rounded ${r===y.value?"bg-az-orange text-white":"bg-az-bg text-az-muted"}`,children:y.label},y.value))}),b.jsx("div",{className:"space-y-0.5 max-h-48 overflow-y-auto",children:p.filter(y=>y.photoMode===r).map((y,x)=>b.jsxs("button",{onClick:()=>u(y.id),className:`w-full flex items-center gap-1.5 px-1.5 py-0.5 rounded text-xs text-left ${f===y.id?"bg-az-border text-white":"text-az-text hover:bg-az-bg"}`,children:[b.jsx("span",{className:"w-2.5 h-2.5 rounded-full shrink-0",style:{backgroundColor:y.color}}),b.jsxs("span",{className:"text-az-muted",children:[x+1,"."]}),b.jsx("span",{className:"truncate",children:y.name}),b.jsx("span",{className:"text-az-muted ml-auto",children:y.shortName})]},y.id))})]})}function sx(){const[f,u]=C.useState(null),[r,c]=C.useState(0),[m,p]=C.useState([]),[_,z]=C.useState(null),[y,x]=C.useState(0),[T,E]=C.useState(0),[O,H]=C.useState([]),A=ru(250,200,400),B=ru(200,150,350),V=C.useCallback(k=>{z(k),H(k.detections)},[]),et=C.useCallback(k=>{H(k)},[]),U=(f==null?void 0:f.mediaType)===2;return b.jsxs("div",{className:"flex h-full",children:[b.jsxs("div",{style:{width:A.width},className:"bg-az-panel border-r border-az-border flex flex-col shrink-0",children:[b.jsx(ex,{selectedMedia:f,onSelect:u,onAnnotationsLoaded:p}),b.jsx(ag,{selectedClassNum:y,onSelect:x,photoMode:T,onPhotoModeChange:E})]}),b.jsx("div",{onMouseDown:A.onMouseDown,className:"w-1 cursor-col-resize bg-az-border hover:bg-az-orange shrink-0"}),b.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[f&&U&&b.jsx(nx,{media:f,onTimeUpdate:c,selectedClassNum:y}),f&&b.jsx(ig,{media:f,annotation:_,detections:O,onDetectionsChange:et,selectedClassNum:y,currentTime:r,annotations:m}),!f&&b.jsx("div",{className:"flex-1 flex items-center justify-center text-az-muted text-sm",children:"Select a media file to start"})]}),b.jsx("div",{onMouseDown:B.onMouseDown,className:"w-1 cursor-col-resize bg-az-border hover:bg-az-orange shrink-0"}),b.jsx("div",{style:{width:B.width},className:"bg-az-panel border-l border-az-border flex flex-col shrink-0",children:b.jsx(ax,{media:f,annotations:m,selectedAnnotation:_,onSelect:V,onAnnotationsUpdate:p})})]})}var Ai=(f=>(f[f.Created=0]="Created",f[f.Edited=1]="Edited",f[f.Validated=2]="Validated",f))(Ai||{});function lx(){const{t:f}=En(),{selectedFlight:u}=vu(),r=ru(250,200,400),[c,m]=C.useState([]),[p,_]=C.useState(0),[z,y]=C.useState(1),[x]=C.useState(20),[T,E]=C.useState(""),[O,H]=C.useState(""),[A,B]=C.useState(null),[V,et]=C.useState(!1),[U,k]=C.useState(""),F=ng(U,400),[mt,ht]=C.useState(0),[ft,pt]=C.useState(0),[zt,Dt]=C.useState(new Set),[vt,wt]=C.useState("annotations"),[ce,Rt]=C.useState(null),[Zt,D]=C.useState([]),[q,I]=C.useState([]),ut=C.useCallback(async()=>{const at=new URLSearchParams({page:String(z),pageSize:String(x)});T&&at.set("fromDate",T),O&&at.set("toDate",O),u&&at.set("flightId",u.id),A!==null&&at.set("status",String(A)),mt&&at.set("classNum",String(mt)),V&&at.set("hasDetections","true"),F&&at.set("name",F);try{const Ot=await Nt.get(`/api/annotations/dataset?${at}`);m(Ot.items),_(Ot.totalCount)}catch{}},[z,x,T,O,u,A,mt,V,F]);C.useEffect(()=>{ut()},[ut]);const st=async at=>{try{const Ot=await Nt.get(`/api/annotations/dataset/${at.annotationId}`);Rt(Ot),D(Ot.detections),wt("editor")}catch{}},N=async()=>{zt.size!==0&&(await Nt.post("/api/annotations/dataset/bulk-status",{annotationIds:Array.from(zt),status:Ai.Validated}),Dt(new Set),ut())},X=C.useCallback(async()=>{try{const at=await Nt.get("/api/annotations/dataset/class-distribution");I(at)}catch{}},[]);C.useEffect(()=>{vt==="distribution"&&X()},[vt,X]);const $=Math.max(...q.map(at=>at.count),1),lt=Math.ceil(p/x),ot=ce?{id:ce.mediaId,name:"",path:"",mediaType:1,mediaStatus:0,duration:null,annotationCount:0,waypointId:null,userId:""}:null,rt=[{label:"All",value:null},{label:f("dataset.status.created"),value:Ai.Created},{label:f("dataset.status.edited"),value:Ai.Edited},{label:f("dataset.status.validated"),value:Ai.Validated}];return b.jsxs("div",{className:"flex h-full",children:[b.jsxs("div",{style:{width:r.width},className:"bg-az-panel border-r border-az-border flex flex-col shrink-0",children:[b.jsx(ag,{selectedClassNum:mt,onSelect:ht,photoMode:ft,onPhotoModeChange:pt}),b.jsx("div",{className:"p-2 border-t border-az-border",children:b.jsxs("label",{className:"flex items-center gap-1.5 text-xs text-az-text cursor-pointer",children:[b.jsx("input",{type:"checkbox",checked:V,onChange:at=>et(at.target.checked),className:"accent-az-orange"}),f("dataset.objectsOnly")]})}),b.jsx("div",{className:"p-2 border-t border-az-border",children:b.jsx("input",{value:U,onChange:at=>k(at.target.value),placeholder:f("dataset.search"),className:"w-full bg-az-bg border border-az-border rounded px-2 py-1 text-xs text-az-text outline-none"})})]}),b.jsx("div",{onMouseDown:r.onMouseDown,className:"w-1 cursor-col-resize bg-az-border hover:bg-az-orange shrink-0"}),b.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[b.jsxs("div",{className:"flex items-center gap-2 p-2 border-b border-az-border bg-az-panel text-xs flex-wrap",children:[b.jsx("input",{type:"date",value:T,onChange:at=>E(at.target.value),className:"bg-az-bg border border-az-border rounded px-2 py-1 text-az-text"}),b.jsx("input",{type:"date",value:O,onChange:at=>H(at.target.value),className:"bg-az-bg border border-az-border rounded px-2 py-1 text-az-text"}),rt.map(at=>b.jsx("button",{onClick:()=>{B(at.value),y(1)},className:`px-2 py-0.5 rounded ${A===at.value?"bg-az-orange text-white":"bg-az-bg text-az-muted"}`,children:at.label},String(at.value))),b.jsx("div",{className:"flex-1"}),zt.size>0&&b.jsxs("button",{onClick:N,className:"bg-az-green text-white px-2 py-0.5 rounded",children:[f("dataset.validate")," (",zt.size,")"]})]}),b.jsx("div",{className:"flex border-b border-az-border bg-az-panel",children:["annotations","editor","distribution"].map(at=>b.jsx("button",{onClick:()=>wt(at),className:`px-3 py-1.5 text-xs ${vt===at?"bg-az-bg text-white border-b-2 border-az-orange":"text-az-muted"}`,children:f(`dataset.${at==="distribution"?"classDistribution":at}`)},at))}),vt==="annotations"&&b.jsxs("div",{className:"flex-1 overflow-y-auto p-2",children:[b.jsx("div",{className:"grid gap-2",style:{gridTemplateColumns:"repeat(auto-fill, minmax(180px, 1fr))"},children:c.map(at=>b.jsxs("div",{onClick:Ot=>{Ot.ctrlKey?Dt(Yt=>{const we=new Set(Yt);return we.has(at.annotationId)?we.delete(at.annotationId):we.add(at.annotationId),we}):Dt(new Set([at.annotationId]))},onDoubleClick:()=>st(at),className:`bg-az-panel border rounded overflow-hidden cursor-pointer ${zt.has(at.annotationId)?"border-az-orange":"border-az-border"} ${at.isSeed?"ring-2 ring-az-red":""}`,children:[b.jsx("img",{src:`/api/annotations/annotations/${at.annotationId}/thumbnail`,alt:at.imageName,className:"w-full h-32 object-cover bg-az-bg",loading:"lazy"}),b.jsxs("div",{className:"p-1.5 text-xs",children:[b.jsx("div",{className:"truncate text-az-text",children:at.imageName}),b.jsxs("div",{className:"flex justify-between",children:[b.jsx("span",{className:"text-az-muted",children:new Date(at.createdDate).toLocaleDateString()}),b.jsx("span",{className:`px-1 rounded ${at.status===Ai.Validated?"bg-az-green/20 text-az-green":at.status===Ai.Edited?"bg-az-blue/20 text-az-blue":"bg-az-muted/20 text-az-muted"}`,children:at.status===Ai.Validated?f("dataset.status.validated"):at.status===Ai.Edited?f("dataset.status.edited"):f("dataset.status.created")})]})]})]},at.annotationId))}),lt>1&&b.jsxs("div",{className:"flex justify-center gap-2 py-3",children:[b.jsx("button",{onClick:()=>y(at=>Math.max(1,at-1)),disabled:z===1,className:"text-xs text-az-muted disabled:opacity-30 px-2 py-1 bg-az-panel rounded",children:"Prev"}),b.jsxs("span",{className:"text-xs text-az-text py-1",children:[z," / ",lt]}),b.jsx("button",{onClick:()=>y(at=>Math.min(lt,at+1)),disabled:z===lt,className:"text-xs text-az-muted disabled:opacity-30 px-2 py-1 bg-az-panel rounded",children:"Next"})]})]}),vt==="editor"&&ot&&ce&&b.jsx("div",{className:"flex-1 overflow-hidden",children:b.jsx(ig,{media:ot,annotation:ce,detections:Zt,onDetectionsChange:D,selectedClassNum:mt,currentTime:0,annotations:[]})}),vt==="distribution"&&b.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:b.jsx("div",{className:"space-y-1.5 max-w-2xl",children:q.map(at=>b.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[b.jsx("span",{className:"w-2.5 h-2.5 rounded-full shrink-0",style:{backgroundColor:at.color}}),b.jsx("span",{className:"w-40 truncate text-az-text",children:at.label}),b.jsx("div",{className:"flex-1 bg-az-bg rounded h-4 overflow-hidden",children:b.jsx("div",{className:"h-full rounded",style:{width:`${at.count/$*100}%`,backgroundColor:at.color,opacity:.7}})}),b.jsx("span",{className:"text-az-muted w-12 text-right",children:at.count})]},at.classNum))})})]})]})}function ox(){const{t:f}=En(),[u,r]=C.useState([]),[c,m]=C.useState([]),[p,_]=C.useState([]),[z,y]=C.useState({name:"",shortName:"",color:"#FF0000",maxSizeM:7}),[x,T]=C.useState({name:"",email:"",password:"",role:"Annotator"}),[E,O]=C.useState(null);C.useEffect(()=>{Nt.get("/api/annotations/classes").then(r).catch(()=>{}),Nt.get("/api/flights/aircrafts").then(m).catch(()=>{}),Nt.get("/api/admin/users").then(_).catch(()=>{})},[]);const H=async()=>{if(!z.name)return;await Nt.post("/api/admin/classes",z);const U=await Nt.get("/api/annotations/classes");r(U),y({name:"",shortName:"",color:"#FF0000",maxSizeM:7})},A=async U=>{await Nt.delete(`/api/admin/classes/${U}`),r(k=>k.filter(F=>F.id!==U))},B=async()=>{if(!x.email||!x.password)return;await Nt.post("/api/admin/users",x);const U=await Nt.get("/api/admin/users");_(U),T({name:"",email:"",password:"",role:"Annotator"})},V=async()=>{E&&(await Nt.patch(`/api/admin/users/${E}`,{isActive:!1}),_(U=>U.map(k=>k.id===E?{...k,isActive:!1}:k)),O(null))},et=async U=>{await Nt.patch(`/api/flights/aircrafts/${U.id}`,{isDefault:!U.isDefault}),m(k=>k.map(F=>F.id===U.id?{...F,isDefault:!F.isDefault}:F))};return b.jsxs("div",{className:"flex h-full overflow-y-auto p-4 gap-4",children:[b.jsxs("div",{className:"w-[340px] shrink-0",children:[b.jsx("h2",{className:"text-sm font-semibold text-white mb-2",children:f("admin.classes")}),b.jsxs("div",{className:"bg-az-panel border border-az-border rounded overflow-hidden",children:[b.jsxs("table",{className:"w-full text-xs",children:[b.jsx("thead",{children:b.jsxs("tr",{className:"border-b border-az-border text-az-muted",children:[b.jsx("th",{className:"px-2 py-1 text-left",children:"#"}),b.jsx("th",{className:"px-2 py-1 text-left",children:"Name"}),b.jsx("th",{className:"px-2 py-1",children:"Color"}),b.jsx("th",{className:"px-2 py-1"})]})}),b.jsx("tbody",{children:u.map(U=>b.jsxs("tr",{className:"border-b border-az-border text-az-text",children:[b.jsx("td",{className:"px-2 py-1",children:U.id}),b.jsx("td",{className:"px-2 py-1",children:U.name}),b.jsx("td",{className:"px-2 py-1 text-center",children:b.jsx("span",{className:"inline-block w-3 h-3 rounded-full",style:{backgroundColor:U.color}})}),b.jsx("td",{className:"px-2 py-1",children:b.jsx("button",{onClick:()=>A(U.id),className:"text-az-muted hover:text-az-red",children:"×"})})]},U.id))})]}),b.jsxs("div",{className:"p-2 flex gap-1 border-t border-az-border",children:[b.jsx("input",{value:z.name,onChange:U=>y(k=>({...k,name:U.target.value})),placeholder:"Name",className:"flex-1 bg-az-bg border border-az-border rounded px-2 py-1 text-xs text-az-text"}),b.jsx("input",{type:"color",value:z.color,onChange:U=>y(k=>({...k,color:U.target.value})),className:"w-8 h-7 border-0 bg-transparent cursor-pointer"}),b.jsx("button",{onClick:H,className:"bg-az-orange text-white text-xs px-2 py-1 rounded",children:"+"})]})]})]}),b.jsxs("div",{className:"flex-1 space-y-4 max-w-md",children:[b.jsxs("div",{children:[b.jsx("h2",{className:"text-sm font-semibold text-white mb-2",children:f("admin.aiSettings")}),b.jsxs("div",{className:"bg-az-panel border border-az-border rounded p-3 space-y-2 text-xs",children:[b.jsxs("div",{children:[b.jsx("label",{className:"text-az-muted",children:"Frame Period Recognition"}),b.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"})]}),b.jsxs("div",{children:[b.jsx("label",{className:"text-az-muted",children:"Frame Recognition Seconds"}),b.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"})]}),b.jsxs("div",{children:[b.jsx("label",{className:"text-az-muted",children:"Probability Threshold"}),b.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"})]}),b.jsx("button",{className:"bg-az-orange text-white text-xs px-3 py-1 rounded",children:f("common.save")})]})]}),b.jsxs("div",{children:[b.jsx("h2",{className:"text-sm font-semibold text-white mb-2",children:f("admin.gpsSettings")}),b.jsxs("div",{className:"bg-az-panel border border-az-border rounded p-3 space-y-2 text-xs",children:[b.jsxs("div",{children:[b.jsx("label",{className:"text-az-muted",children:"Device Address"}),b.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"})]}),b.jsxs("div",{children:[b.jsx("label",{className:"text-az-muted",children:"Port"}),b.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"})]}),b.jsxs("div",{children:[b.jsx("label",{className:"text-az-muted",children:"Protocol"}),b.jsxs("select",{className:"w-full bg-az-bg border border-az-border rounded px-2 py-1 mt-0.5 text-az-text",children:[b.jsx("option",{children:"TCP"}),b.jsx("option",{children:"UDP"})]})]}),b.jsx("button",{className:"bg-az-orange text-white text-xs px-3 py-1 rounded",children:f("common.save")})]})]}),b.jsxs("div",{children:[b.jsx("h2",{className:"text-sm font-semibold text-white mb-2",children:f("admin.users")}),b.jsxs("div",{className:"bg-az-panel border border-az-border rounded overflow-hidden",children:[b.jsxs("table",{className:"w-full text-xs",children:[b.jsx("thead",{children:b.jsxs("tr",{className:"border-b border-az-border text-az-muted",children:[b.jsx("th",{className:"px-2 py-1 text-left",children:"Name"}),b.jsx("th",{className:"px-2 py-1 text-left",children:"Email"}),b.jsx("th",{className:"px-2 py-1",children:"Role"}),b.jsx("th",{className:"px-2 py-1",children:"Status"}),b.jsx("th",{className:"px-2 py-1"})]})}),b.jsx("tbody",{children:p.map(U=>b.jsxs("tr",{className:"border-b border-az-border text-az-text",children:[b.jsx("td",{className:"px-2 py-1",children:U.name}),b.jsx("td",{className:"px-2 py-1",children:U.email}),b.jsx("td",{className:"px-2 py-1 text-center",children:U.role}),b.jsx("td",{className:"px-2 py-1 text-center",children:b.jsx("span",{className:`px-1 rounded ${U.isActive?"text-az-green":"text-az-red"}`,children:U.isActive?"Active":"Inactive"})}),b.jsx("td",{className:"px-2 py-1",children:U.isActive&&b.jsx("button",{onClick:()=>O(U.id),className:"text-az-muted hover:text-az-red text-xs",children:f("admin.deactivate")})})]},U.id))})]}),b.jsxs("div",{className:"p-2 flex gap-1 border-t border-az-border",children:[b.jsx("input",{value:x.name,onChange:U=>T(k=>({...k,name:U.target.value})),placeholder:"Name",className:"flex-1 bg-az-bg border border-az-border rounded px-2 py-1 text-xs text-az-text"}),b.jsx("input",{value:x.email,onChange:U=>T(k=>({...k,email:U.target.value})),placeholder:"Email",className:"flex-1 bg-az-bg border border-az-border rounded px-2 py-1 text-xs text-az-text"}),b.jsx("input",{value:x.password,onChange:U=>T(k=>({...k,password:U.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"}),b.jsxs("select",{value:x.role,onChange:U=>T(k=>({...k,role:U.target.value})),className:"bg-az-bg border border-az-border rounded px-2 py-1 text-xs text-az-text",children:[b.jsx("option",{children:"Annotator"}),b.jsx("option",{children:"Admin"}),b.jsx("option",{children:"Viewer"})]}),b.jsx("button",{onClick:B,className:"bg-az-orange text-white text-xs px-2 py-1 rounded",children:"+"})]})]})]})]}),b.jsxs("div",{className:"w-[280px] shrink-0",children:[b.jsx("h2",{className:"text-sm font-semibold text-white mb-2",children:f("admin.aircrafts")}),b.jsx("div",{className:"bg-az-panel border border-az-border rounded p-2 space-y-1",children:c.map(U=>b.jsxs("div",{onClick:()=>et(U),className:"flex items-center gap-2 px-2 py-1 rounded cursor-pointer hover:bg-az-bg text-xs text-az-text",children:[b.jsx("span",{className:`px-1 rounded text-[10px] ${U.type==="Plane"?"bg-az-blue/20 text-az-blue":"bg-az-green/20 text-az-green"}`,children:U.type==="Plane"?"P":"C"}),b.jsx("span",{className:"flex-1",children:U.model}),b.jsx("span",{className:`text-sm ${U.isDefault?"text-az-orange":"text-az-muted"}`,children:"★"})]},U.id))})]}),b.jsx(Xf,{open:!!E,title:f("admin.deactivate"),message:"Deactivate this user?",onConfirm:V,onCancel:()=>O(null)})]})}function rx(){const{t:f}=En(),[u,r]=C.useState(null),[c,m]=C.useState(null),[p,_]=C.useState([]),[z,y]=C.useState(!1);C.useEffect(()=>{Nt.get("/api/annotations/settings/system").then(r).catch(()=>{}),Nt.get("/api/annotations/settings/directories").then(m).catch(()=>{}),Nt.get("/api/flights/aircrafts").then(_).catch(()=>{})},[]);const x=async()=>{u&&(y(!0),await Nt.put("/api/annotations/settings/system",u),y(!1))},T=async()=>{c&&(y(!0),await Nt.put("/api/annotations/settings/directories",c),y(!1))},E=async H=>{await Nt.patch(`/api/flights/aircrafts/${H.id}`,{isDefault:!H.isDefault}),_(A=>A.map(B=>B.id===H.id?{...B,isDefault:!B.isDefault}:B))},O=(H,A,B,V="text")=>b.jsxs("div",{children:[b.jsx("label",{className:"text-az-muted text-xs block mb-0.5",children:H}),b.jsx("input",{type:V,value:A??"",onChange:et=>B(et.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 b.jsxs("div",{className:"flex h-full overflow-y-auto p-4 gap-6",children:[b.jsxs("div",{className:"w-[300px] shrink-0",children:[b.jsx("h2",{className:"text-sm font-semibold text-white mb-2",children:f("settings.tenant")}),u&&b.jsxs("div",{className:"bg-az-panel border border-az-border rounded p-3 space-y-2",children:[O("Military Unit",u.militaryUnit,H=>r(A=>A&&{...A,militaryUnit:H})),O("Name",u.name,H=>r(A=>A&&{...A,name:H})),O("Default Camera Width",u.defaultCameraWidth,H=>r(A=>A&&{...A,defaultCameraWidth:parseInt(H)||0}),"number"),O("Default Camera FoV",u.defaultCameraFoV,H=>r(A=>A&&{...A,defaultCameraFoV:parseFloat(H)||0}),"number"),b.jsx("button",{onClick:x,disabled:z,className:"bg-az-orange text-white text-xs px-3 py-1 rounded disabled:opacity-50",children:f("settings.save")})]})]}),b.jsxs("div",{className:"w-[300px] shrink-0",children:[b.jsx("h2",{className:"text-sm font-semibold text-white mb-2",children:f("settings.directories")}),c&&b.jsxs("div",{className:"bg-az-panel border border-az-border rounded p-3 space-y-2",children:[O("Videos Dir",c.videosDir,H=>m(A=>A&&{...A,videosDir:H})),O("Images Dir",c.imagesDir,H=>m(A=>A&&{...A,imagesDir:H})),O("Labels Dir",c.labelsDir,H=>m(A=>A&&{...A,labelsDir:H})),O("Results Dir",c.resultsDir,H=>m(A=>A&&{...A,resultsDir:H})),O("Thumbnails Dir",c.thumbnailsDir,H=>m(A=>A&&{...A,thumbnailsDir:H})),O("GPS Sat Dir",c.gpsSatDir,H=>m(A=>A&&{...A,gpsSatDir:H})),O("GPS Route Dir",c.gpsRouteDir,H=>m(A=>A&&{...A,gpsRouteDir:H})),b.jsx("button",{onClick:T,disabled:z,className:"bg-az-orange text-white text-xs px-3 py-1 rounded disabled:opacity-50",children:f("settings.save")})]})]}),b.jsxs("div",{className:"flex-1 max-w-sm",children:[b.jsx("h2",{className:"text-sm font-semibold text-white mb-2",children:f("settings.aircrafts")}),b.jsx("div",{className:"bg-az-panel border border-az-border rounded p-2 space-y-1",children:p.map(H=>b.jsxs("div",{className:"flex items-center gap-2 px-2 py-1.5 rounded hover:bg-az-bg text-xs text-az-text",children:[b.jsx("span",{className:"flex-1",children:H.model}),b.jsx("span",{className:`px-1 rounded text-[10px] ${H.type==="Plane"?"bg-az-blue/20 text-az-blue":"bg-az-green/20 text-az-green"}`,children:H.type}),b.jsx("button",{onClick:()=>E(H),className:`text-sm ${H.isDefault?"text-az-orange":"text-az-muted hover:text-az-orange"}`,children:"★"})]},H.id))})]})]})}const ux=[{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 cx({open:f,onClose:u}){const{i18n:r}=En();if(!f)return null;const c=r.language==="ua"?"ua":"en";return b.jsx("div",{className:"fixed inset-0 bg-black/60 flex items-center justify-center z-[100]",onClick:u,children:b.jsxs("div",{className:"bg-az-panel border border-az-border rounded-lg p-5 w-[500px] max-h-[80vh] overflow-y-auto",onClick:m=>m.stopPropagation(),children:[b.jsx("h2",{className:"text-white font-semibold text-lg mb-4",children:"How to Annotate"}),b.jsx("ol",{className:"space-y-2",children:ux.map((m,p)=>b.jsxs("li",{className:"flex gap-2 text-sm text-az-text",children:[b.jsxs("span",{className:"text-az-orange font-semibold shrink-0",children:[p+1,"."]}),b.jsx("span",{children:m[c]})]},p))}),b.jsx("h3",{className:"text-white font-semibold mt-5 mb-2",children:"Keyboard Shortcuts"}),b.jsxs("div",{className:"grid grid-cols-2 gap-1 text-xs text-az-text",children:[b.jsx("span",{className:"text-az-muted",children:"Space"}),b.jsx("span",{children:"Play / Pause"}),b.jsx("span",{className:"text-az-muted",children:"← →"}),b.jsx("span",{children:"Frame step"}),b.jsx("span",{className:"text-az-muted",children:"Ctrl + ← →"}),b.jsx("span",{children:"5 second skip"}),b.jsx("span",{className:"text-az-muted",children:"Enter"}),b.jsx("span",{children:"Save annotation"}),b.jsx("span",{className:"text-az-muted",children:"Delete"}),b.jsx("span",{children:"Delete selected"}),b.jsx("span",{className:"text-az-muted",children:"X"}),b.jsx("span",{children:"Delete all detections"}),b.jsx("span",{className:"text-az-muted",children:"1-9"}),b.jsx("span",{children:"Select detection class"}),b.jsx("span",{className:"text-az-muted",children:"M"}),b.jsx("span",{children:"Mute / Unmute"}),b.jsx("span",{className:"text-az-muted",children:"Ctrl + Scroll"}),b.jsx("span",{children:"Zoom canvas"}),b.jsx("span",{className:"text-az-muted",children:"Esc"}),b.jsx("span",{children:"Close dialog / editor"}),b.jsx("span",{className:"text-az-muted",children:"V"}),b.jsx("span",{children:"Validate (Dataset)"}),b.jsx("span",{className:"text-az-muted",children:"PageUp/Down"}),b.jsx("span",{children:"Navigate media / pages"})]}),b.jsx("div",{className:"mt-4 flex justify-end",children:b.jsx("button",{onClick:u,className:"bg-az-border text-az-text text-xs px-3 py-1 rounded hover:bg-az-muted",children:"Close"})})]})})}function fx(){const{t:f,i18n:u}=En(),{user:r,logout:c,hasPermission:m}=Vf(),{flights:p,selectedFlight:_,selectFlight:z}=vu(),y=pu(),[x,T]=C.useState(!1),[E,O]=C.useState(""),[H,A]=C.useState(!1),B=C.useRef(null);C.useEffect(()=>{const F=mt=>{B.current&&!B.current.contains(mt.target)&&T(!1)};return document.addEventListener("mousedown",F),()=>document.removeEventListener("mousedown",F)},[]);const V=p.filter(F=>F.name.toLowerCase().includes(E.toLowerCase())),et=async()=>{await c(),y("/login")},U=[{to:"/flights",label:f("nav.flights"),perm:"FL"},{to:"/annotations",label:f("nav.annotations"),perm:"ANN"},{to:"/dataset",label:f("nav.dataset"),perm:"DATASET"},{to:"/admin",label:f("nav.admin"),perm:"ADM"}],k=()=>{u.changeLanguage(u.language==="en"?"ua":"en")};return b.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:[b.jsx("span",{className:"font-bold text-az-orange tracking-wider",children:"AZAION"}),b.jsxs("div",{className:"relative",ref:B,children:[b.jsx("button",{onClick:()=>T(!x),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:(_==null?void 0:_.name)||"— Select Flight —"}),x&&b.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:[b.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:E,onChange:F=>O(F.target.value),autoFocus:!0}),b.jsxs("div",{className:"max-h-60 overflow-y-auto",children:[V.map(F=>b.jsxs("button",{onClick:()=>{z(F),T(!1),O("")},className:`w-full text-left px-2 py-1 hover:bg-az-bg text-az-text text-sm ${(_==null?void 0:_.id)===F.id?"bg-az-bg font-semibold":""}`,children:[b.jsx("div",{children:F.name}),b.jsx("div",{className:"text-xs text-az-muted",children:new Date(F.createdDate).toLocaleDateString()})]},F.id)),V.length===0&&b.jsx("div",{className:"px-2 py-2 text-az-muted text-xs",children:"No flights"})]})]})]}),b.jsx("nav",{className:"hidden sm:flex items-center gap-1 ml-2",children:U.filter(F=>m(F.perm)).map(F=>b.jsx(xo,{to:F.to,className:({isActive:mt})=>`px-2 py-1 rounded text-sm ${mt?"bg-az-bg font-semibold text-white":"text-az-text hover:text-white"}`,children:F.label},F.to))}),b.jsx("div",{className:"flex-1"}),b.jsx("span",{className:"text-xs text-az-muted hidden sm:block",children:r==null?void 0:r.email}),b.jsx("button",{onClick:k,className:"text-xs text-az-muted hover:text-white px-1",children:u.language==="en"?"UA":"EN"}),b.jsx("button",{onClick:()=>A(!0),className:"text-az-muted hover:text-white text-xs",children:"?"}),b.jsx(xo,{to:"/settings",className:"text-az-muted hover:text-white",children:"⚙"}),b.jsx("button",{onClick:et,className:"text-az-muted hover:text-az-red text-xs",children:f("nav.logout")}),b.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:[U.filter(F=>m(F.perm)).map(F=>b.jsx(xo,{to:F.to,className:({isActive:mt})=>`text-xs px-2 py-1 ${mt?"text-az-orange font-semibold":"text-az-muted"}`,children:F.label},F.to)),b.jsx(xo,{to:"/settings",className:({isActive:F})=>`text-xs px-2 py-1 ${F?"text-az-orange":"text-az-muted"}`,children:"⚙"})]}),b.jsx(cx,{open:H,onClose:()=>A(!1)})]})}function hx(){return b.jsx(cy,{children:b.jsxs(lp,{children:[b.jsx(Mi,{path:"/login",element:b.jsx(Oy,{})}),b.jsx(Mi,{path:"/*",element:b.jsx(hy,{children:b.jsx(fy,{children:b.jsxs("div",{className:"flex flex-col h-screen",children:[b.jsx(fx,{}),b.jsx("div",{className:"flex-1 overflow-hidden",children:b.jsxs(lp,{children:[b.jsx(Mi,{path:"/flights",element:b.jsx(tx,{})}),b.jsx(Mi,{path:"/annotations",element:b.jsx(sx,{})}),b.jsx(Mi,{path:"/dataset",element:b.jsx(lx,{})}),b.jsx(Mi,{path:"/admin",element:b.jsx(ox,{})}),b.jsx(Mi,{path:"/settings",element:b.jsx(rx,{})}),b.jsx(Mi,{path:"*",element:b.jsx(Zp,{to:"/flights",replace:!0})})]})})]})})})})]})})}const Tt=f=>typeof f=="string",yo=()=>{let f,u;const r=new Promise((c,m)=>{f=c,u=m});return r.resolve=f,r.reject=u,r},fp=f=>f==null?"":""+f,dx=(f,u,r)=>{f.forEach(c=>{u[c]&&(r[c]=u[c])})},mx=/###/g,hp=f=>f&&f.indexOf("###")>-1?f.replace(mx,"."):f,dp=f=>!f||Tt(f),wo=(f,u,r)=>{const c=Tt(u)?u.split("."):u;let m=0;for(;m<c.length-1;){if(dp(f))return{};const p=hp(c[m]);!f[p]&&r&&(f[p]=new r),Object.prototype.hasOwnProperty.call(f,p)?f=f[p]:f={},++m}return dp(f)?{}:{obj:f,k:hp(c[m])}},mp=(f,u,r)=>{const{obj:c,k:m}=wo(f,u,Object);if(c!==void 0||u.length===1){c[m]=r;return}let p=u[u.length-1],_=u.slice(0,u.length-1),z=wo(f,_,Object);for(;z.obj===void 0&&_.length;)p=`${_[_.length-1]}.${p}`,_=_.slice(0,_.length-1),z=wo(f,_,Object),z!=null&&z.obj&&typeof z.obj[`${z.k}.${p}`]<"u"&&(z.obj=void 0);z.obj[`${z.k}.${p}`]=r},px=(f,u,r,c)=>{const{obj:m,k:p}=wo(f,u,Object);m[p]=m[p]||[],m[p].push(r)},uu=(f,u)=>{const{obj:r,k:c}=wo(f,u);if(r&&Object.prototype.hasOwnProperty.call(r,c))return r[c]},gx=(f,u,r)=>{const c=uu(f,r);return c!==void 0?c:uu(u,r)},sg=(f,u,r)=>{for(const c in u)c!=="__proto__"&&c!=="constructor"&&(c in f?Tt(f[c])||f[c]instanceof String||Tt(u[c])||u[c]instanceof String?r&&(f[c]=u[c]):sg(f[c],u[c],r):f[c]=u[c]);return f},nl=f=>f.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var vx={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const _x=f=>Tt(f)?f.replace(/[&<>"'\/]/g,u=>vx[u]):f;class yx{constructor(u){this.capacity=u,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(u){const r=this.regExpMap.get(u);if(r!==void 0)return r;const c=new RegExp(u);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(u,c),this.regExpQueue.push(u),c}}const xx=[" ",",","?","!",";"],bx=new yx(20),Sx=(f,u,r)=>{u=u||"",r=r||"";const c=xx.filter(_=>u.indexOf(_)<0&&r.indexOf(_)<0);if(c.length===0)return!0;const m=bx.getRegExp(`(${c.map(_=>_==="?"?"\\?":_).join("|")})`);let p=!m.test(f);if(!p){const _=f.indexOf(r);_>0&&!m.test(f.substring(0,_))&&(p=!0)}return p},Uf=function(f,u){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!f)return;if(f[u])return Object.prototype.hasOwnProperty.call(f,u)?f[u]:void 0;const c=u.split(r);let m=f;for(let p=0;p<c.length;){if(!m||typeof m!="object")return;let _,z="";for(let y=p;y<c.length;++y)if(y!==p&&(z+=r),z+=c[y],_=m[z],_!==void 0){if(["string","number","boolean"].indexOf(typeof _)>-1&&y<c.length-1)continue;p+=y-p+1;break}m=_}return m},cu=f=>f==null?void 0:f.replace("_","-"),wx={type:"logger",log(f){this.output("log",f)},warn(f){this.output("warn",f)},error(f){this.output("error",f)},output(f,u){var r,c;(c=(r=console==null?void 0:console[f])==null?void 0:r.apply)==null||c.call(r,console,u)}};class fu{constructor(u){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(u,r)}init(u){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=u||wx,this.options=r,this.debug=r.debug}log(){for(var u=arguments.length,r=new Array(u),c=0;c<u;c++)r[c]=arguments[c];return this.forward(r,"log","",!0)}warn(){for(var u=arguments.length,r=new Array(u),c=0;c<u;c++)r[c]=arguments[c];return this.forward(r,"warn","",!0)}error(){for(var u=arguments.length,r=new Array(u),c=0;c<u;c++)r[c]=arguments[c];return this.forward(r,"error","")}deprecate(){for(var u=arguments.length,r=new Array(u),c=0;c<u;c++)r[c]=arguments[c];return this.forward(r,"warn","WARNING DEPRECATED: ",!0)}forward(u,r,c,m){return m&&!this.debug?null:(Tt(u[0])&&(u[0]=`${c}${this.prefix} ${u[0]}`),this.logger[r](u))}create(u){return new fu(this.logger,{prefix:`${this.prefix}:${u}:`,...this.options})}clone(u){return u=u||this.options,u.prefix=u.prefix||this.prefix,new fu(this.logger,u)}}var ni=new fu;class bu{constructor(){this.observers={}}on(u,r){return u.split(" ").forEach(c=>{this.observers[c]||(this.observers[c]=new Map);const m=this.observers[c].get(r)||0;this.observers[c].set(r,m+1)}),this}off(u,r){if(this.observers[u]){if(!r){delete this.observers[u];return}this.observers[u].delete(r)}}emit(u){for(var r=arguments.length,c=new Array(r>1?r-1:0),m=1;m<r;m++)c[m-1]=arguments[m];this.observers[u]&&Array.from(this.observers[u].entries()).forEach(_=>{let[z,y]=_;for(let x=0;x<y;x++)z(...c)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(_=>{let[z,y]=_;for(let x=0;x<y;x++)z.apply(z,[u,...c])})}}class pp extends bu{constructor(u){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=u||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(u){this.options.ns.indexOf(u)<0&&this.options.ns.push(u)}removeNamespaces(u){const r=this.options.ns.indexOf(u);r>-1&&this.options.ns.splice(r,1)}getResource(u,r,c){var x,T;let m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const p=m.keySeparator!==void 0?m.keySeparator:this.options.keySeparator,_=m.ignoreJSONStructure!==void 0?m.ignoreJSONStructure:this.options.ignoreJSONStructure;let z;u.indexOf(".")>-1?z=u.split("."):(z=[u,r],c&&(Array.isArray(c)?z.push(...c):Tt(c)&&p?z.push(...c.split(p)):z.push(c)));const y=uu(this.data,z);return!y&&!r&&!c&&u.indexOf(".")>-1&&(u=z[0],r=z[1],c=z.slice(2).join(".")),y||!_||!Tt(c)?y:Uf((T=(x=this.data)==null?void 0:x[u])==null?void 0:T[r],c,p)}addResource(u,r,c,m){let p=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const _=p.keySeparator!==void 0?p.keySeparator:this.options.keySeparator;let z=[u,r];c&&(z=z.concat(_?c.split(_):c)),u.indexOf(".")>-1&&(z=u.split("."),m=r,r=z[1]),this.addNamespaces(r),mp(this.data,z,m),p.silent||this.emit("added",u,r,c,m)}addResources(u,r,c){let m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const p in c)(Tt(c[p])||Array.isArray(c[p]))&&this.addResource(u,r,p,c[p],{silent:!0});m.silent||this.emit("added",u,r,c)}addResourceBundle(u,r,c,m,p){let _=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},z=[u,r];u.indexOf(".")>-1&&(z=u.split("."),m=c,c=r,r=z[1]),this.addNamespaces(r);let y=uu(this.data,z)||{};_.skipCopy||(c=JSON.parse(JSON.stringify(c))),m?sg(y,c,p):y={...y,...c},mp(this.data,z,y),_.silent||this.emit("added",u,r,c)}removeResourceBundle(u,r){this.hasResourceBundle(u,r)&&delete this.data[u][r],this.removeNamespaces(r),this.emit("removed",u,r)}hasResourceBundle(u,r){return this.getResource(u,r)!==void 0}getResourceBundle(u,r){return r||(r=this.options.defaultNS),this.getResource(u,r)}getDataByLanguage(u){return this.data[u]}hasLanguageSomeTranslations(u){const r=this.getDataByLanguage(u);return!!(r&&Object.keys(r)||[]).find(m=>r[m]&&Object.keys(r[m]).length>0)}toJSON(){return this.data}}var lg={processors:{},addPostProcessor(f){this.processors[f.name]=f},handle(f,u,r,c,m){return f.forEach(p=>{var _;u=((_=this.processors[p])==null?void 0:_.process(u,r,c,m))??u}),u}};const gp={},vp=f=>!Tt(f)&&typeof f!="boolean"&&typeof f!="number";class hu extends bu{constructor(u){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),dx(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],u,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ni.create("translator")}changeLanguage(u){u&&(this.language=u)}exists(u){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(u==null)return!1;const c=this.resolve(u,r);return(c==null?void 0:c.res)!==void 0}extractFromKey(u,r){let c=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;c===void 0&&(c=":");const m=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let p=r.ns||this.options.defaultNS||[];const _=c&&u.indexOf(c)>-1,z=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!Sx(u,c,m);if(_&&!z){const y=u.match(this.interpolator.nestingRegexp);if(y&&y.length>0)return{key:u,namespaces:Tt(p)?[p]:p};const x=u.split(c);(c!==m||c===m&&this.options.ns.indexOf(x[0])>-1)&&(p=x.shift()),u=x.join(m)}return{key:u,namespaces:Tt(p)?[p]:p}}translate(u,r,c){if(typeof r!="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),typeof r=="object"&&(r={...r}),r||(r={}),u==null)return"";Array.isArray(u)||(u=[String(u)]);const m=r.returnDetails!==void 0?r.returnDetails:this.options.returnDetails,p=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,{key:_,namespaces:z}=this.extractFromKey(u[u.length-1],r),y=z[z.length-1],x=r.lng||this.language,T=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((x==null?void 0:x.toLowerCase())==="cimode"){if(T){const vt=r.nsSeparator||this.options.nsSeparator;return m?{res:`${y}${vt}${_}`,usedKey:_,exactUsedKey:_,usedLng:x,usedNS:y,usedParams:this.getUsedParamsDetails(r)}:`${y}${vt}${_}`}return m?{res:_,usedKey:_,exactUsedKey:_,usedLng:x,usedNS:y,usedParams:this.getUsedParamsDetails(r)}:_}const E=this.resolve(u,r);let O=E==null?void 0:E.res;const H=(E==null?void 0:E.usedKey)||_,A=(E==null?void 0:E.exactUsedKey)||_,B=["[object Number]","[object Function]","[object RegExp]"],V=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,et=!this.i18nFormat||this.i18nFormat.handleAsObject,U=r.count!==void 0&&!Tt(r.count),k=hu.hasDefaultValue(r),F=U?this.pluralResolver.getSuffix(x,r.count,r):"",mt=r.ordinal&&U?this.pluralResolver.getSuffix(x,r.count,{ordinal:!1}):"",ht=U&&!r.ordinal&&r.count===0,ft=ht&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${F}`]||r[`defaultValue${mt}`]||r.defaultValue;let pt=O;et&&!O&&k&&(pt=ft);const zt=vp(pt),Dt=Object.prototype.toString.apply(pt);if(et&&pt&&zt&&B.indexOf(Dt)<0&&!(Tt(V)&&Array.isArray(pt))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const vt=this.options.returnedObjectHandler?this.options.returnedObjectHandler(H,pt,{...r,ns:z}):`key '${_} (${this.language})' returned an object instead of string.`;return m?(E.res=vt,E.usedParams=this.getUsedParamsDetails(r),E):vt}if(p){const vt=Array.isArray(pt),wt=vt?[]:{},ce=vt?A:H;for(const Rt in pt)if(Object.prototype.hasOwnProperty.call(pt,Rt)){const Zt=`${ce}${p}${Rt}`;k&&!O?wt[Rt]=this.translate(Zt,{...r,defaultValue:vp(ft)?ft[Rt]:void 0,joinArrays:!1,ns:z}):wt[Rt]=this.translate(Zt,{...r,joinArrays:!1,ns:z}),wt[Rt]===Zt&&(wt[Rt]=pt[Rt])}O=wt}}else if(et&&Tt(V)&&Array.isArray(O))O=O.join(V),O&&(O=this.extendTranslation(O,u,r,c));else{let vt=!1,wt=!1;!this.isValidLookup(O)&&k&&(vt=!0,O=ft),this.isValidLookup(O)||(wt=!0,O=_);const Rt=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&wt?void 0:O,Zt=k&&ft!==O&&this.options.updateMissing;if(wt||vt||Zt){if(this.logger.log(Zt?"updateKey":"missingKey",x,y,_,Zt?ft:O),p){const ut=this.resolve(_,{...r,keySeparator:!1});ut&&ut.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 D=[];const q=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&q&&q[0])for(let ut=0;ut<q.length;ut++)D.push(q[ut]);else this.options.saveMissingTo==="all"?D=this.languageUtils.toResolveHierarchy(r.lng||this.language):D.push(r.lng||this.language);const I=(ut,st,N)=>{var $;const X=k&&N!==O?N:Rt;this.options.missingKeyHandler?this.options.missingKeyHandler(ut,y,st,X,Zt,r):($=this.backendConnector)!=null&&$.saveMissing&&this.backendConnector.saveMissing(ut,y,st,X,Zt,r),this.emit("missingKey",ut,y,st,O)};this.options.saveMissing&&(this.options.saveMissingPlurals&&U?D.forEach(ut=>{const st=this.pluralResolver.getSuffixes(ut,r);ht&&r[`defaultValue${this.options.pluralSeparator}zero`]&&st.indexOf(`${this.options.pluralSeparator}zero`)<0&&st.push(`${this.options.pluralSeparator}zero`),st.forEach(N=>{I([ut],_+N,r[`defaultValue${N}`]||ft)})}):I(D,_,ft))}O=this.extendTranslation(O,u,r,E,c),wt&&O===_&&this.options.appendNamespaceToMissingKey&&(O=`${y}:${_}`),(wt||vt)&&this.options.parseMissingKeyHandler&&(O=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${y}:${_}`:_,vt?O:void 0))}return m?(E.res=O,E.usedParams=this.getUsedParamsDetails(r),E):O}extendTranslation(u,r,c,m,p){var x,T;var _=this;if((x=this.i18nFormat)!=null&&x.parse)u=this.i18nFormat.parse(u,{...this.options.interpolation.defaultVariables,...c},c.lng||this.language||m.usedLng,m.usedNS,m.usedKey,{resolved:m});else if(!c.skipInterpolation){c.interpolation&&this.interpolator.init({...c,interpolation:{...this.options.interpolation,...c.interpolation}});const E=Tt(u)&&(((T=c==null?void 0:c.interpolation)==null?void 0:T.skipOnVariables)!==void 0?c.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let O;if(E){const A=u.match(this.interpolator.nestingRegexp);O=A&&A.length}let H=c.replace&&!Tt(c.replace)?c.replace:c;if(this.options.interpolation.defaultVariables&&(H={...this.options.interpolation.defaultVariables,...H}),u=this.interpolator.interpolate(u,H,c.lng||this.language||m.usedLng,c),E){const A=u.match(this.interpolator.nestingRegexp),B=A&&A.length;O<B&&(c.nest=!1)}!c.lng&&m&&m.res&&(c.lng=this.language||m.usedLng),c.nest!==!1&&(u=this.interpolator.nest(u,function(){for(var A=arguments.length,B=new Array(A),V=0;V<A;V++)B[V]=arguments[V];return(p==null?void 0:p[0])===B[0]&&!c.context?(_.logger.warn(`It seems you are nesting recursively key: ${B[0]} in key: ${r[0]}`),null):_.translate(...B,r)},c)),c.interpolation&&this.interpolator.reset()}const z=c.postProcess||this.options.postProcess,y=Tt(z)?[z]:z;return u!=null&&(y!=null&&y.length)&&c.applyPostProcessor!==!1&&(u=lg.handle(y,u,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...m,usedParams:this.getUsedParamsDetails(c)},...c}:c,this)),u}resolve(u){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c,m,p,_,z;return Tt(u)&&(u=[u]),u.forEach(y=>{if(this.isValidLookup(c))return;const x=this.extractFromKey(y,r),T=x.key;m=T;let E=x.namespaces;this.options.fallbackNS&&(E=E.concat(this.options.fallbackNS));const O=r.count!==void 0&&!Tt(r.count),H=O&&!r.ordinal&&r.count===0,A=r.context!==void 0&&(Tt(r.context)||typeof r.context=="number")&&r.context!=="",B=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);E.forEach(V=>{var et,U;this.isValidLookup(c)||(z=V,!gp[`${B[0]}-${V}`]&&((et=this.utils)!=null&&et.hasLoadedNamespace)&&!((U=this.utils)!=null&&U.hasLoadedNamespace(z))&&(gp[`${B[0]}-${V}`]=!0,this.logger.warn(`key "${m}" for languages "${B.join(", ")}" won't get resolved as namespace "${z}" 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!!!")),B.forEach(k=>{var ht;if(this.isValidLookup(c))return;_=k;const F=[T];if((ht=this.i18nFormat)!=null&&ht.addLookupKeys)this.i18nFormat.addLookupKeys(F,T,k,V,r);else{let ft;O&&(ft=this.pluralResolver.getSuffix(k,r.count,r));const pt=`${this.options.pluralSeparator}zero`,zt=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(O&&(F.push(T+ft),r.ordinal&&ft.indexOf(zt)===0&&F.push(T+ft.replace(zt,this.options.pluralSeparator)),H&&F.push(T+pt)),A){const Dt=`${T}${this.options.contextSeparator}${r.context}`;F.push(Dt),O&&(F.push(Dt+ft),r.ordinal&&ft.indexOf(zt)===0&&F.push(Dt+ft.replace(zt,this.options.pluralSeparator)),H&&F.push(Dt+pt))}}let mt;for(;mt=F.pop();)this.isValidLookup(c)||(p=mt,c=this.getResource(k,V,mt,r))}))})}),{res:c,usedKey:m,exactUsedKey:p,usedLng:_,usedNS:z}}isValidLookup(u){return u!==void 0&&!(!this.options.returnNull&&u===null)&&!(!this.options.returnEmptyString&&u==="")}getResource(u,r,c){var p;let m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return(p=this.i18nFormat)!=null&&p.getResource?this.i18nFormat.getResource(u,r,c,m):this.resourceStore.getResource(u,r,c,m)}getUsedParamsDetails(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],c=u.replace&&!Tt(u.replace);let m=c?u.replace:u;if(c&&typeof u.count<"u"&&(m.count=u.count),this.options.interpolation.defaultVariables&&(m={...this.options.interpolation.defaultVariables,...m}),!c){m={...m};for(const p of r)delete m[p]}return m}static hasDefaultValue(u){const r="defaultValue";for(const c in u)if(Object.prototype.hasOwnProperty.call(u,c)&&r===c.substring(0,r.length)&&u[c]!==void 0)return!0;return!1}}class _p{constructor(u){this.options=u,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ni.create("languageUtils")}getScriptPartFromCode(u){if(u=cu(u),!u||u.indexOf("-")<0)return null;const r=u.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(u){if(u=cu(u),!u||u.indexOf("-")<0)return u;const r=u.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(u){if(Tt(u)&&u.indexOf("-")>-1){let r;try{r=Intl.getCanonicalLocales(u)[0]}catch{}return r&&this.options.lowerCaseLng&&(r=r.toLowerCase()),r||(this.options.lowerCaseLng?u.toLowerCase():u)}return this.options.cleanCode||this.options.lowerCaseLng?u.toLowerCase():u}isSupportedCode(u){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(u=this.getLanguagePartFromCode(u)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(u)>-1}getBestMatchFromCodes(u){if(!u)return null;let r;return u.forEach(c=>{if(r)return;const m=this.formatLanguageCode(c);(!this.options.supportedLngs||this.isSupportedCode(m))&&(r=m)}),!r&&this.options.supportedLngs&&u.forEach(c=>{if(r)return;const m=this.getLanguagePartFromCode(c);if(this.isSupportedCode(m))return r=m;r=this.options.supportedLngs.find(p=>{if(p===m)return p;if(!(p.indexOf("-")<0&&m.indexOf("-")<0)&&(p.indexOf("-")>0&&m.indexOf("-")<0&&p.substring(0,p.indexOf("-"))===m||p.indexOf(m)===0&&m.length>1))return p})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(u,r){if(!u)return[];if(typeof u=="function"&&(u=u(r)),Tt(u)&&(u=[u]),Array.isArray(u))return u;if(!r)return u.default||[];let c=u[r];return c||(c=u[this.getScriptPartFromCode(r)]),c||(c=u[this.formatLanguageCode(r)]),c||(c=u[this.getLanguagePartFromCode(r)]),c||(c=u.default),c||[]}toResolveHierarchy(u,r){const c=this.getFallbackCodes(r||this.options.fallbackLng||[],u),m=[],p=_=>{_&&(this.isSupportedCode(_)?m.push(_):this.logger.warn(`rejecting language code not found in supportedLngs: ${_}`))};return Tt(u)&&(u.indexOf("-")>-1||u.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&p(this.formatLanguageCode(u)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&p(this.getScriptPartFromCode(u)),this.options.load!=="currentOnly"&&p(this.getLanguagePartFromCode(u))):Tt(u)&&p(this.formatLanguageCode(u)),c.forEach(_=>{m.indexOf(_)<0&&p(this.formatLanguageCode(_))}),m}}const yp={zero:0,one:1,two:2,few:3,many:4,other:5},xp={select:f=>f===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class zx{constructor(u){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=u,this.options=r,this.logger=ni.create("pluralResolver"),this.pluralRulesCache={}}addRule(u,r){this.rules[u]=r}clearCache(){this.pluralRulesCache={}}getRule(u){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const c=cu(u==="dev"?"en":u),m=r.ordinal?"ordinal":"cardinal",p=JSON.stringify({cleanedCode:c,type:m});if(p in this.pluralRulesCache)return this.pluralRulesCache[p];let _;try{_=new Intl.PluralRules(c,{type:m})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),xp;if(!u.match(/-|_/))return xp;const y=this.languageUtils.getLanguagePartFromCode(u);_=this.getRule(y,r)}return this.pluralRulesCache[p]=_,_}needsPlural(u){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=this.getRule(u,r);return c||(c=this.getRule("dev",r)),(c==null?void 0:c.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(u,r){let c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(u,c).map(m=>`${r}${m}`)}getSuffixes(u){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=this.getRule(u,r);return c||(c=this.getRule("dev",r)),c?c.resolvedOptions().pluralCategories.sort((m,p)=>yp[m]-yp[p]).map(m=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${m}`):[]}getSuffix(u,r){let c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const m=this.getRule(u,c);return m?`${this.options.prepend}${c.ordinal?`ordinal${this.options.prepend}`:""}${m.select(r)}`:(this.logger.warn(`no plural rule found for: ${u}`),this.getSuffix("dev",r,c))}}const bp=function(f,u,r){let c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",m=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,p=gx(f,u,r);return!p&&m&&Tt(r)&&(p=Uf(f,r,c),p===void 0&&(p=Uf(u,r,c))),p},Of=f=>f.replace(/\$/g,"$$$$");class Tx{constructor(){var r;let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ni.create("interpolator"),this.options=u,this.format=((r=u==null?void 0:u.interpolation)==null?void 0:r.format)||(c=>c),this.init(u)}init(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};u.interpolation||(u.interpolation={escapeValue:!0});const{escape:r,escapeValue:c,useRawValueToEscape:m,prefix:p,prefixEscaped:_,suffix:z,suffixEscaped:y,formatSeparator:x,unescapeSuffix:T,unescapePrefix:E,nestingPrefix:O,nestingPrefixEscaped:H,nestingSuffix:A,nestingSuffixEscaped:B,nestingOptionsSeparator:V,maxReplaces:et,alwaysFormat:U}=u.interpolation;this.escape=r!==void 0?r:_x,this.escapeValue=c!==void 0?c:!0,this.useRawValueToEscape=m!==void 0?m:!1,this.prefix=p?nl(p):_||"{{",this.suffix=z?nl(z):y||"}}",this.formatSeparator=x||",",this.unescapePrefix=T?"":E||"-",this.unescapeSuffix=this.unescapePrefix?"":T||"",this.nestingPrefix=O?nl(O):H||nl("$t("),this.nestingSuffix=A?nl(A):B||nl(")"),this.nestingOptionsSeparator=V||",",this.maxReplaces=et||1e3,this.alwaysFormat=U!==void 0?U:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const u=(r,c)=>(r==null?void 0:r.source)===c?(r.lastIndex=0,r):new RegExp(c,"g");this.regexp=u(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=u(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=u(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(u,r,c,m){var H;let p,_,z;const y=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},x=A=>{if(A.indexOf(this.formatSeparator)<0){const U=bp(r,y,A,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(U,void 0,c,{...m,...r,interpolationkey:A}):U}const B=A.split(this.formatSeparator),V=B.shift().trim(),et=B.join(this.formatSeparator).trim();return this.format(bp(r,y,V,this.options.keySeparator,this.options.ignoreJSONStructure),et,c,{...m,...r,interpolationkey:V})};this.resetRegExp();const T=(m==null?void 0:m.missingInterpolationHandler)||this.options.missingInterpolationHandler,E=((H=m==null?void 0:m.interpolation)==null?void 0:H.skipOnVariables)!==void 0?m.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:A=>Of(A)},{regex:this.regexp,safeValue:A=>this.escapeValue?Of(this.escape(A)):Of(A)}].forEach(A=>{for(z=0;p=A.regex.exec(u);){const B=p[1].trim();if(_=x(B),_===void 0)if(typeof T=="function"){const et=T(u,p,m);_=Tt(et)?et:""}else if(m&&Object.prototype.hasOwnProperty.call(m,B))_="";else if(E){_=p[0];continue}else this.logger.warn(`missed to pass in variable ${B} for interpolating ${u}`),_="";else!Tt(_)&&!this.useRawValueToEscape&&(_=fp(_));const V=A.safeValue(_);if(u=u.replace(p[0],V),E?(A.regex.lastIndex+=_.length,A.regex.lastIndex-=p[0].length):A.regex.lastIndex=0,z++,z>=this.maxReplaces)break}}),u}nest(u,r){let c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},m,p,_;const z=(y,x)=>{const T=this.nestingOptionsSeparator;if(y.indexOf(T)<0)return y;const E=y.split(new RegExp(`${T}[ ]*{`));let O=`{${E[1]}`;y=E[0],O=this.interpolate(O,_);const H=O.match(/'/g),A=O.match(/"/g);(((H==null?void 0:H.length)??0)%2===0&&!A||A.length%2!==0)&&(O=O.replace(/'/g,'"'));try{_=JSON.parse(O),x&&(_={...x,..._})}catch(B){return this.logger.warn(`failed parsing options string in nesting for key ${y}`,B),`${y}${T}${O}`}return _.defaultValue&&_.defaultValue.indexOf(this.prefix)>-1&&delete _.defaultValue,y};for(;m=this.nestingRegexp.exec(u);){let y=[];_={...c},_=_.replace&&!Tt(_.replace)?_.replace:_,_.applyPostProcessor=!1,delete _.defaultValue;let x=!1;if(m[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(m[1])){const T=m[1].split(this.formatSeparator).map(E=>E.trim());m[1]=T.shift(),y=T,x=!0}if(p=r(z.call(this,m[1].trim(),_),_),p&&m[0]===u&&!Tt(p))return p;Tt(p)||(p=fp(p)),p||(this.logger.warn(`missed to resolve ${m[1]} for nesting ${u}`),p=""),x&&(p=y.reduce((T,E)=>this.format(T,E,c.lng,{...c,interpolationkey:m[1].trim()}),p.trim())),u=u.replace(m[0],p),this.regexp.lastIndex=0}return u}}const Ex=f=>{let u=f.toLowerCase().trim();const r={};if(f.indexOf("(")>-1){const c=f.split("(");u=c[0].toLowerCase().trim();const m=c[1].substring(0,c[1].length-1);u==="currency"&&m.indexOf(":")<0?r.currency||(r.currency=m.trim()):u==="relativetime"&&m.indexOf(":")<0?r.range||(r.range=m.trim()):m.split(";").forEach(_=>{if(_){const[z,...y]=_.split(":"),x=y.join(":").trim().replace(/^'+|'+$/g,""),T=z.trim();r[T]||(r[T]=x),x==="false"&&(r[T]=!1),x==="true"&&(r[T]=!0),isNaN(x)||(r[T]=parseInt(x,10))}})}return{formatName:u,formatOptions:r}},il=f=>{const u={};return(r,c,m)=>{let p=m;m&&m.interpolationkey&&m.formatParams&&m.formatParams[m.interpolationkey]&&m[m.interpolationkey]&&(p={...p,[m.interpolationkey]:void 0});const _=c+JSON.stringify(p);let z=u[_];return z||(z=f(cu(c),m),u[_]=z),z(r)}};class Lx{constructor(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ni.create("formatter"),this.options=u,this.formats={number:il((r,c)=>{const m=new Intl.NumberFormat(r,{...c});return p=>m.format(p)}),currency:il((r,c)=>{const m=new Intl.NumberFormat(r,{...c,style:"currency"});return p=>m.format(p)}),datetime:il((r,c)=>{const m=new Intl.DateTimeFormat(r,{...c});return p=>m.format(p)}),relativetime:il((r,c)=>{const m=new Intl.RelativeTimeFormat(r,{...c});return p=>m.format(p,c.range||"day")}),list:il((r,c)=>{const m=new Intl.ListFormat(r,{...c});return p=>m.format(p)})},this.init(u)}init(u){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=r.interpolation.formatSeparator||","}add(u,r){this.formats[u.toLowerCase().trim()]=r}addCached(u,r){this.formats[u.toLowerCase().trim()]=il(r)}format(u,r,c){let m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const p=r.split(this.formatSeparator);if(p.length>1&&p[0].indexOf("(")>1&&p[0].indexOf(")")<0&&p.find(z=>z.indexOf(")")>-1)){const z=p.findIndex(y=>y.indexOf(")")>-1);p[0]=[p[0],...p.splice(1,z)].join(this.formatSeparator)}return p.reduce((z,y)=>{var E;const{formatName:x,formatOptions:T}=Ex(y);if(this.formats[x]){let O=z;try{const H=((E=m==null?void 0:m.formatParams)==null?void 0:E[m.interpolationkey])||{},A=H.locale||H.lng||m.locale||m.lng||c;O=this.formats[x](z,A,{...T,...m,...H})}catch(H){this.logger.warn(H)}return O}else this.logger.warn(`there was no format function for ${x}`);return z},u)}}const Cx=(f,u)=>{f.pending[u]!==void 0&&(delete f.pending[u],f.pendingCount--)};class Nx extends bu{constructor(u,r,c){var p,_;let m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=u,this.store=r,this.services=c,this.languageUtils=c.languageUtils,this.options=m,this.logger=ni.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=m.maxParallelReads||10,this.readingCalls=0,this.maxRetries=m.maxRetries>=0?m.maxRetries:5,this.retryTimeout=m.retryTimeout>=1?m.retryTimeout:350,this.state={},this.queue=[],(_=(p=this.backend)==null?void 0:p.init)==null||_.call(p,c,m.backend,m)}queueLoad(u,r,c,m){const p={},_={},z={},y={};return u.forEach(x=>{let T=!0;r.forEach(E=>{const O=`${x}|${E}`;!c.reload&&this.store.hasResourceBundle(x,E)?this.state[O]=2:this.state[O]<0||(this.state[O]===1?_[O]===void 0&&(_[O]=!0):(this.state[O]=1,T=!1,_[O]===void 0&&(_[O]=!0),p[O]===void 0&&(p[O]=!0),y[E]===void 0&&(y[E]=!0)))}),T||(z[x]=!0)}),(Object.keys(p).length||Object.keys(_).length)&&this.queue.push({pending:_,pendingCount:Object.keys(_).length,loaded:{},errors:[],callback:m}),{toLoad:Object.keys(p),pending:Object.keys(_),toLoadLanguages:Object.keys(z),toLoadNamespaces:Object.keys(y)}}loaded(u,r,c){const m=u.split("|"),p=m[0],_=m[1];r&&this.emit("failedLoading",p,_,r),!r&&c&&this.store.addResourceBundle(p,_,c,void 0,void 0,{skipCopy:!0}),this.state[u]=r?-1:2,r&&c&&(this.state[u]=0);const z={};this.queue.forEach(y=>{px(y.loaded,[p],_),Cx(y,u),r&&y.errors.push(r),y.pendingCount===0&&!y.done&&(Object.keys(y.loaded).forEach(x=>{z[x]||(z[x]={});const T=y.loaded[x];T.length&&T.forEach(E=>{z[x][E]===void 0&&(z[x][E]=!0)})}),y.done=!0,y.errors.length?y.callback(y.errors):y.callback())}),this.emit("loaded",z),this.queue=this.queue.filter(y=>!y.done)}read(u,r,c){let m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,p=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,_=arguments.length>5?arguments[5]:void 0;if(!u.length)return _(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:u,ns:r,fcName:c,tried:m,wait:p,callback:_});return}this.readingCalls++;const z=(x,T)=>{if(this.readingCalls--,this.waitingReads.length>0){const E=this.waitingReads.shift();this.read(E.lng,E.ns,E.fcName,E.tried,E.wait,E.callback)}if(x&&T&&m<this.maxRetries){setTimeout(()=>{this.read.call(this,u,r,c,m+1,p*2,_)},p);return}_(x,T)},y=this.backend[c].bind(this.backend);if(y.length===2){try{const x=y(u,r);x&&typeof x.then=="function"?x.then(T=>z(null,T)).catch(z):z(null,x)}catch(x){z(x)}return}return y(u,r,z)}prepareLoading(u,r){let c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},m=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."),m&&m();Tt(u)&&(u=this.languageUtils.toResolveHierarchy(u)),Tt(r)&&(r=[r]);const p=this.queueLoad(u,r,c,m);if(!p.toLoad.length)return p.pending.length||m(),null;p.toLoad.forEach(_=>{this.loadOne(_)})}load(u,r,c){this.prepareLoading(u,r,{},c)}reload(u,r,c){this.prepareLoading(u,r,{reload:!0},c)}loadOne(u){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const c=u.split("|"),m=c[0],p=c[1];this.read(m,p,"read",void 0,void 0,(_,z)=>{_&&this.logger.warn(`${r}loading namespace ${p} for language ${m} failed`,_),!_&&z&&this.logger.log(`${r}loaded namespace ${p} for language ${m}`,z),this.loaded(u,_,z)})}saveMissing(u,r,c,m,p){var y,x,T,E,O;let _=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},z=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if((x=(y=this.services)==null?void 0:y.utils)!=null&&x.hasLoadedNamespace&&!((E=(T=this.services)==null?void 0:T.utils)!=null&&E.hasLoadedNamespace(r))){this.logger.warn(`did not save key "${c}" as the namespace "${r}" 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(!(c==null||c==="")){if((O=this.backend)!=null&&O.create){const H={..._,isUpdate:p},A=this.backend.create.bind(this.backend);if(A.length<6)try{let B;A.length===5?B=A(u,r,c,m,H):B=A(u,r,c,m),B&&typeof B.then=="function"?B.then(V=>z(null,V)).catch(z):z(null,B)}catch(B){z(B)}else A(u,r,c,m,z,H)}!u||!u[0]||this.store.addResource(u[0],r,c,m)}}}const Sp=()=>({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:f=>{let u={};if(typeof f[1]=="object"&&(u=f[1]),Tt(f[1])&&(u.defaultValue=f[1]),Tt(f[2])&&(u.tDescription=f[2]),typeof f[2]=="object"||typeof f[3]=="object"){const r=f[3]||f[2];Object.keys(r).forEach(c=>{u[c]=r[c]})}return u},interpolation:{escapeValue:!0,format:f=>f,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),wp=f=>{var u,r;return Tt(f.ns)&&(f.ns=[f.ns]),Tt(f.fallbackLng)&&(f.fallbackLng=[f.fallbackLng]),Tt(f.fallbackNS)&&(f.fallbackNS=[f.fallbackNS]),((r=(u=f.supportedLngs)==null?void 0:u.indexOf)==null?void 0:r.call(u,"cimode"))<0&&(f.supportedLngs=f.supportedLngs.concat(["cimode"])),typeof f.initImmediate=="boolean"&&(f.initAsync=f.initImmediate),f},au=()=>{},Ox=f=>{Object.getOwnPropertyNames(Object.getPrototypeOf(f)).forEach(r=>{typeof f[r]=="function"&&(f[r]=f[r].bind(f))})};class To extends bu{constructor(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(super(),this.options=wp(u),this.services={},this.logger=ni,this.modules={external:[]},Ox(this),r&&!this.isInitialized&&!u.isClone){if(!this.options.initAsync)return this.init(u,r),this;setTimeout(()=>{this.init(u,r)},0)}}init(){var u=this;let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof r=="function"&&(c=r,r={}),r.defaultNS==null&&r.ns&&(Tt(r.ns)?r.defaultNS=r.ns:r.ns.indexOf("translation")<0&&(r.defaultNS=r.ns[0]));const m=Sp();this.options={...m,...this.options,...wp(r)},this.options.interpolation={...m.interpolation,...this.options.interpolation},r.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=r.keySeparator),r.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=r.nsSeparator);const p=T=>T?typeof T=="function"?new T:T:null;if(!this.options.isClone){this.modules.logger?ni.init(p(this.modules.logger),this.options):ni.init(null,this.options);let T;this.modules.formatter?T=this.modules.formatter:T=Lx;const E=new _p(this.options);this.store=new pp(this.options.resources,this.options);const O=this.services;O.logger=ni,O.resourceStore=this.store,O.languageUtils=E,O.pluralResolver=new zx(E,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),T&&(!this.options.interpolation.format||this.options.interpolation.format===m.interpolation.format)&&(O.formatter=p(T),O.formatter.init(O,this.options),this.options.interpolation.format=O.formatter.format.bind(O.formatter)),O.interpolator=new Tx(this.options),O.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},O.backendConnector=new Nx(p(this.modules.backend),O.resourceStore,O,this.options),O.backendConnector.on("*",function(H){for(var A=arguments.length,B=new Array(A>1?A-1:0),V=1;V<A;V++)B[V-1]=arguments[V];u.emit(H,...B)}),this.modules.languageDetector&&(O.languageDetector=p(this.modules.languageDetector),O.languageDetector.init&&O.languageDetector.init(O,this.options.detection,this.options)),this.modules.i18nFormat&&(O.i18nFormat=p(this.modules.i18nFormat),O.i18nFormat.init&&O.i18nFormat.init(this)),this.translator=new hu(this.services,this.options),this.translator.on("*",function(H){for(var A=arguments.length,B=new Array(A>1?A-1:0),V=1;V<A;V++)B[V-1]=arguments[V];u.emit(H,...B)}),this.modules.external.forEach(H=>{H.init&&H.init(this)})}if(this.format=this.options.interpolation.format,c||(c=au),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const T=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);T.length>0&&T[0]!=="dev"&&(this.options.lng=T[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(T=>{this[T]=function(){return u.store[T](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(T=>{this[T]=function(){return u.store[T](...arguments),u}});const y=yo(),x=()=>{const T=(E,O)=>{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),y.resolve(O),c(E,O)};if(this.languages&&!this.isInitialized)return T(null,this.t.bind(this));this.changeLanguage(this.options.lng,T)};return this.options.resources||!this.options.initAsync?x():setTimeout(x,0),y}loadResources(u){var p,_;let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:au;const m=Tt(u)?u:this.language;if(typeof u=="function"&&(c=u),!this.options.resources||this.options.partialBundledLanguages){if((m==null?void 0:m.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return c();const z=[],y=x=>{if(!x||x==="cimode")return;this.services.languageUtils.toResolveHierarchy(x).forEach(E=>{E!=="cimode"&&z.indexOf(E)<0&&z.push(E)})};m?y(m):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(T=>y(T)),(_=(p=this.options.preload)==null?void 0:p.forEach)==null||_.call(p,x=>y(x)),this.services.backendConnector.load(z,this.options.ns,x=>{!x&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),c(x)})}else c(null)}reloadResources(u,r,c){const m=yo();return typeof u=="function"&&(c=u,u=void 0),typeof r=="function"&&(c=r,r=void 0),u||(u=this.languages),r||(r=this.options.ns),c||(c=au),this.services.backendConnector.reload(u,r,p=>{m.resolve(),c(p)}),m}use(u){if(!u)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!u.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return u.type==="backend"&&(this.modules.backend=u),(u.type==="logger"||u.log&&u.warn&&u.error)&&(this.modules.logger=u),u.type==="languageDetector"&&(this.modules.languageDetector=u),u.type==="i18nFormat"&&(this.modules.i18nFormat=u),u.type==="postProcessor"&&lg.addPostProcessor(u),u.type==="formatter"&&(this.modules.formatter=u),u.type==="3rdParty"&&this.modules.external.push(u),this}setResolvedLanguage(u){if(!(!u||!this.languages)&&!(["cimode","dev"].indexOf(u)>-1))for(let r=0;r<this.languages.length;r++){const c=this.languages[r];if(!(["cimode","dev"].indexOf(c)>-1)&&this.store.hasLanguageSomeTranslations(c)){this.resolvedLanguage=c;break}}}changeLanguage(u,r){var c=this;this.isLanguageChangingTo=u;const m=yo();this.emit("languageChanging",u);const p=y=>{this.language=y,this.languages=this.services.languageUtils.toResolveHierarchy(y),this.resolvedLanguage=void 0,this.setResolvedLanguage(y)},_=(y,x)=>{x?(p(x),this.translator.changeLanguage(x),this.isLanguageChangingTo=void 0,this.emit("languageChanged",x),this.logger.log("languageChanged",x)):this.isLanguageChangingTo=void 0,m.resolve(function(){return c.t(...arguments)}),r&&r(y,function(){return c.t(...arguments)})},z=y=>{var T,E;!u&&!y&&this.services.languageDetector&&(y=[]);const x=Tt(y)?y:this.services.languageUtils.getBestMatchFromCodes(y);x&&(this.language||p(x),this.translator.language||this.translator.changeLanguage(x),(E=(T=this.services.languageDetector)==null?void 0:T.cacheUserLanguage)==null||E.call(T,x)),this.loadResources(x,O=>{_(O,x)})};return!u&&this.services.languageDetector&&!this.services.languageDetector.async?z(this.services.languageDetector.detect()):!u&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(z):this.services.languageDetector.detect(z):z(u),m}getFixedT(u,r,c){var m=this;const p=function(_,z){let y;if(typeof z!="object"){for(var x=arguments.length,T=new Array(x>2?x-2:0),E=2;E<x;E++)T[E-2]=arguments[E];y=m.options.overloadTranslationOptionHandler([_,z].concat(T))}else y={...z};y.lng=y.lng||p.lng,y.lngs=y.lngs||p.lngs,y.ns=y.ns||p.ns,y.keyPrefix!==""&&(y.keyPrefix=y.keyPrefix||c||p.keyPrefix);const O=m.options.keySeparator||".";let H;return y.keyPrefix&&Array.isArray(_)?H=_.map(A=>`${y.keyPrefix}${O}${A}`):H=y.keyPrefix?`${y.keyPrefix}${O}${_}`:_,m.t(H,y)};return Tt(u)?p.lng=u:p.lngs=u,p.ns=r,p.keyPrefix=c,p}t(){var m;for(var u=arguments.length,r=new Array(u),c=0;c<u;c++)r[c]=arguments[c];return(m=this.translator)==null?void 0:m.translate(...r)}exists(){var m;for(var u=arguments.length,r=new Array(u),c=0;c<u;c++)r[c]=arguments[c];return(m=this.translator)==null?void 0:m.exists(...r)}setDefaultNamespace(u){this.options.defaultNS=u}hasLoadedNamespace(u){let r=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 c=r.lng||this.resolvedLanguage||this.languages[0],m=this.options?this.options.fallbackLng:!1,p=this.languages[this.languages.length-1];if(c.toLowerCase()==="cimode")return!0;const _=(z,y)=>{const x=this.services.backendConnector.state[`${z}|${y}`];return x===-1||x===0||x===2};if(r.precheck){const z=r.precheck(this,_);if(z!==void 0)return z}return!!(this.hasResourceBundle(c,u)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||_(c,u)&&(!m||_(p,u)))}loadNamespaces(u,r){const c=yo();return this.options.ns?(Tt(u)&&(u=[u]),u.forEach(m=>{this.options.ns.indexOf(m)<0&&this.options.ns.push(m)}),this.loadResources(m=>{c.resolve(),r&&r(m)}),c):(r&&r(),Promise.resolve())}loadLanguages(u,r){const c=yo();Tt(u)&&(u=[u]);const m=this.options.preload||[],p=u.filter(_=>m.indexOf(_)<0&&this.services.languageUtils.isSupportedCode(_));return p.length?(this.options.preload=m.concat(p),this.loadResources(_=>{c.resolve(),r&&r(_)}),c):(r&&r(),Promise.resolve())}dir(u){var m,p;if(u||(u=this.resolvedLanguage||(((m=this.languages)==null?void 0:m.length)>0?this.languages[0]:this.language)),!u)return"rtl";const r=["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"],c=((p=this.services)==null?void 0:p.languageUtils)||new _p(Sp());return r.indexOf(c.getLanguagePartFromCode(u))>-1||u.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new To(u,r)}cloneInstance(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:au;const c=u.forkResourceStore;c&&delete u.forkResourceStore;const m={...this.options,...u,isClone:!0},p=new To(m);if((u.debug!==void 0||u.prefix!==void 0)&&(p.logger=p.logger.clone(u)),["store","services","language"].forEach(z=>{p[z]=this[z]}),p.services={...this.services},p.services.utils={hasLoadedNamespace:p.hasLoadedNamespace.bind(p)},c){const z=Object.keys(this.store.data).reduce((y,x)=>(y[x]={...this.store.data[x]},Object.keys(y[x]).reduce((T,E)=>(T[E]={...y[x][E]},T),{})),{});p.store=new pp(z,m),p.services.resourceStore=p.store}return p.translator=new hu(p.services,m),p.translator.on("*",function(z){for(var y=arguments.length,x=new Array(y>1?y-1:0),T=1;T<y;T++)x[T-1]=arguments[T];p.emit(z,...x)}),p.init(m,r),p.translator.options=m,p.translator.backendConnector.services.utils={hasLoadedNamespace:p.hasLoadedNamespace.bind(p)},p}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Ze=To.createInstance();Ze.createInstance=To.createInstance;Ze.createInstance;Ze.dir;Ze.init;Ze.loadResources;Ze.reloadResources;Ze.use;Ze.changeLanguage;Ze.getFixedT;Ze.t;Ze.exists;Ze.setDefaultNamespace;Ze.hasLoadedNamespace;Ze.loadNamespaces;Ze.loadLanguages;const Mx={flights:"Flights",annotations:"Annotations",dataset:"Dataset Explorer",admin:"Admin",settings:"Settings",logout:"Logout"},Ax={title:"AZAION",email:"Email",password:"Password",submit:"Sign In",authenticating:"Authenticating...",downloadingKey:"Downloading key...",decrypting:"Decrypting...",startingServices:"Starting services...",ready:"Ready",error:"Invalid credentials"},Rx={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"},Dx={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"},jx={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"}},Bx={title:"Admin",classes:"Detection Classes",aiSettings:"AI Recognition Settings",gpsSettings:"GPS Device Settings",aircrafts:"Default Aircrafts",users:"User Management",addUser:"Add User",deactivate:"Deactivate"},Ux={title:"Settings",tenant:"Tenant Configuration",directories:"Directories",aircrafts:"Aircrafts",save:"Save"},Hx={confirm:"Confirm",cancel:"Cancel",delete:"Delete",save:"Save",loading:"Loading...",noData:"No data",help:"How to Annotate"},Zx={nav:Mx,login:Ax,flights:Rx,annotations:Dx,dataset:jx,admin:Bx,settings:Ux,common:Hx},Px={flights:"Польоти",annotations:"Анотації",dataset:"Датасет",admin:"Адмін",settings:"Налаштування",logout:"Вийти"},kx={title:"AZAION",email:"Email",password:"Пароль",submit:"Увійти",authenticating:"Автентифікація...",downloadingKey:"Завантаження ключа...",decrypting:"Розшифрування...",startingServices:"Запуск сервісів...",ready:"Готово",error:"Невірні облікові дані"},qx={title:"Польоти",create:"Створити новий",params:"Параметри польоту",gpsDenied:"GPS-Denied",waypoints:"Точки маршруту",aircraft:"Літальний апарат",height:"Висота за замовч.",upload:"Завантажити",back:"До польоту",orthophoto:"Ортофото",liveGps:"GPS Потік",correction:"Корекція GPS",apply:"Застосувати",telemetry:"Телеметрія"},Yx={title:"Анотації",mediaList:"Медіа",upload:"Завантажити файли",deleteMedia:"Видалити медіа?",detect:"AI Розпізнавання",save:"Зберегти",delete:"Видалити",deleteAll:"Видалити все",classes:"Класи детекцій",photoMode:"Режим фото",regular:"Звичайний",winter:"Зимовий",night:"Нічний"},Gx={title:"Датасет",annotations:"Анотації",editor:"Редактор",classDistribution:"Розподіл класів",objectsOnly:"Тільки з об'єктами",search:"Пошук...",validate:"Валідувати",status:{created:"Створено",edited:"Відредаговано",validated:"Валідовано"}},Vx={title:"Адмін",classes:"Класи детекцій",aiSettings:"AI Налаштування",gpsSettings:"GPS Пристрій",aircrafts:"Літальні апарати",users:"Користувачі",addUser:"Додати користувача",deactivate:"Деактивувати"},Xx={title:"Налаштування",tenant:"Конфігурація",directories:"Директорії",aircrafts:"Літальні апарати",save:"Зберегти"},Kx={confirm:"Підтвердити",cancel:"Скасувати",delete:"Видалити",save:"Зберегти",loading:"Завантаження...",noData:"Немає даних",help:"Як анотувати"},Qx={nav:Px,login:kx,flights:qx,annotations:Yx,dataset:Gx,admin:Vx,settings:Xx,common:Kx};Ze.use(zy).init({resources:{en:{translation:Zx},ua:{translation:Qx}},lng:"en",fallbackLng:"en",interpolation:{escapeValue:!1}});Mv.createRoot(document.getElementById("root")).render(b.jsx(C.StrictMode,{children:b.jsx(I_,{children:b.jsx(hx,{})})}));